import React, {useState} from "react"; import {Checkbox} from "../src/Components/Forms/Checkbox"; import {Radio} from "../src/Components/Forms/Radio"; import {AirTrafficControl, Basket, FloppyDisk, House, TrashSimple, XCircle} from "@phosphor-icons/react"; import {Card} from "../src/Components/Card"; import {PasswordInput} from "../src/Components/Forms/PasswordInput"; import {RequiredField} from "../src/Components/Forms/RequiredField"; import {Float} from "../src/Components/Floating/Float"; import {Tooltip} from "../src/Components/Floating/Tooltip"; import {DatepickerInput} from "../src/Components/Forms/DatepickerInput"; import {TimepickerInput} from "../src/Components/Forms/TimepickerInput"; import {Select} from "../src/Components/Select/Select"; import {SpinningLoader} from "../src/Components/Loaders/SpinningLoader"; import {ListLoader} from "../src/Components/Loaders/ListLoader"; import {GenericLoader} from "../src/Components/Loaders/GenericLoader"; import {MainMenu} from "../src/Components/Menus/MainMenu"; import {SubmenuFloat} from "../src/Components/Menus/SubmenuFloat"; import {Submenu} from "../src/Components/Menus/Submenu"; import {SubmenuItem, SubmenuItemSubmenu} from "../src/Components/Menus/SubmenuItem"; import {MainMenuItemSubmenu, MainMenuLink} from "../src/Components/Menus/MainMenuItem"; import {AppItem, AppLink, AppsMenu} from "../src/Components/Menus/AppsMenu"; import {Application} from "../src/Application/Application"; import {Outlet} from "react-router-dom"; import {ToggleSwitch} from "../src/Components/Forms/ToggleSwitch"; import {Step, Steps} from "../src/Components/Steps/Steps"; import {AsyncPaginate, AutoPaginate, Paginate} from "../src/Components/Pagination/Paginate"; import {useCallableCurtain, useCurtains} from "../src/Components/Curtains/Curtains"; import {Subapp, useCallableSubapp, useSubapps} from "../src/Components/Subapps/Subapps"; import {DemoSubapp} from "./DemoSubapp"; import {DemoCurtain} from "./DemoCurtain"; import {DemoModal} from "./DemoModal"; import {useCallableModal} from "../src/Components/Modals/Modals"; import {ModalType} from "../src/Components/Modals/ModalsTypes"; import {Buttons} from "../src/Components/Buttons/Buttons"; import {useNotify} from "../src/Components/Notifications/Notifications"; import {Notification, NotificationType} from "../src/Components/Notifications/Notification"; import {Box} from "../src/Components/Box"; import {Await, useAsync} from "../src/Async"; import {NotifyErrorsBoundary} from "../src/Components/Errors/NotifyErrorsBoundary"; import {DemoFailingComponent, DemoResetComponent} from "./DemoFailingComponent"; import {Tip} from "../src/Components/Tips/Tip"; export function DemoApp() { const curtains = useCurtains(); const subapps = useSubapps(); // Easy curtain. const easyCurtain = useCallableCurtain(); // Easy subapp. const easySubapp = useCallableSubapp(); // Easy modal. const easyModal = useCallableModal((type: ModalType = ModalType.NONE) => ); const notify = useNotify(); const [datetime, setDatetime] = useState(null); const [selected, setSelected] = useState(null); const [anotherSelected, setAnotherSelected] = useState(null); const [page, setPage] = useState(11); const [asyncChange, setAsyncChange] = useState(0); const [anotherChange, setAnotherChange] = useState(0); const [asyncData] = useAsync(() => new Promise((resolve, reject) => { setTimeout(() => { resolve("async data (" + Math.random() + ")"); }, 2000); }), [asyncChange]); const [failingComponentsCount, setFailingComponentsCount] = useState(0); return ( Home Test Test 1 Test 2 Test A Test B First last choice Another last choice }> Submenu in submenu }> Submenu }> Submenu

KernelUI

Headings

Demo app

Second title

Third title

Fourth title

Fifth title
Sixth title

Buttons

A link button

Forms

Test password Date test Time test

Currently selected datetime: {datetime ? datetime.toISOString() : "none"}

Checkbox demo Toggle switch demo Radio box test Radio box test A tip component, very useful in forms which require some explanations.

HTML

Lorem ipsum dolor sit amet, consectetur adipiscing elit aleph. Donec accumsan pulvinar felis, vitae eleifend augue lacinia tempus. Integer nec iaculis ante. Duis a quam urna. Nullam tincidunt rutrum felis, a efficitur enim facilisis sit amet. Quisque dictum semper sagittis. Maecenas in orci hendrerit, tempor nunc non, tempus mi. Praesent blandit varius rutrum. Nullam quis mauris eros. Vestibulum commodo libero sed pellentesque pharetra. Donec eget fringilla ante. Aliquam id leo massa. Duis dictum nunc ut dolor iaculis malesuada. Nulla elementum justo a sem eleifend finibus. Phasellus bibendum elit nibh, at tempor odio efficitur id.

Steps

Step one

Step two

Step three

Lists

  • One
  • Two
  • Three
  • Four
  1. One
  2. Two
  3. Three
  4. Four

Tables

Column 1 Column 2 Column 3
A B C D
Lorem Ipsum Dolor Amet
Foo Bar Baz John
Alice Bob Jack

Cards

Card title

Donec lobortis quam sapien, et efficitur dolor laoreet ut. Ut pretium, lacus at bibendum rutrum, nibh nibh scelerisque nisi, nec semper dolor turpis sed tortor. Nulla massa sapien, accumsan id vestibulum et, elementum eget metus. Morbi quis bibendum purus. Nunc at fermentum tortor. Quisque viverra diam in sem auctor blandit. Vestibulum dignissim bibendum nunc, non tristique quam sollicitudin eu. Ut feugiat lectus tellus, tempus viverra sapien aliquet vel. Morbi ac est mauris. Praesent facilisis ut tellus at cursus. Aenean placerat nulla non mi vulputate hendrerit. Praesent fermentum dui eu gravida pharetra. Quisque rhoncus, magna non congue egestas, leo lorem malesuada felis, eu imperdiet orci magna ultrices est.

Another small card

Popovers

I am focused}> You can add complex (clickable) content in me. )}>
()}> {(show, hide) => ( )}

Tooltips

This is a very simple tooltip.

Loaders

Simple loaders

Generic loader

Sample content.

Menus

Test 1 Test 2 Test A Test B }> Submenu } floatingOptions={{placement: "right-start"}}>

App selectors

Home Test link Test 3

App steps

Basic

First step

ABC STEP

Big content

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam id dignissim ligula, ut tempus sem. Sed faucibus tincidunt ante vel iaculis. Duis hendrerit, orci eu gravida interdum, nulla lacus congue augue, nec efficitur diam dui sollicitudin eros. Donec lacus lectus, aliquam nec feugiat non, gravida ac est. Suspendisse feugiat justo quis dui vehicula, sed auctor est mollis. Sed hendrerit nisi non lectus lacinia, id posuere dolor dignissim. Quisque commodo mi sit amet quam tincidunt auctor. Ut sit amet scelerisque sem. Nulla rhoncus, orci vitae cursus ullamcorper, ex odio rhoncus enim, et blandit elit libero quis est. Suspendisse lectus nunc, gravida sit amet vulputate eget, porta ac odio.

Mauris egestas bibendum facilisis. Maecenas accumsan lorem arcu, ut faucibus dui euismod et. Nulla et dignissim est, interdum luctus diam. Aliquam condimentum ex augue, id porttitor enim vestibulum quis. Vivamus sed convallis leo. Duis finibus, ipsum sed condimentum viverra, ipsum sapien congue nunc, sed fermentum metus ante quis ligula. Fusce eleifend ante in leo molestie, at suscipit metus cursus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed laoreet justo ac lacus porta, sed ultricies est mattis. Integer finibus purus metus, quis posuere risus suscipit suscipit. Nulla facilisi. Duis tincidunt vitae enim eu sagittis.

Donec rutrum tellus vitae vehicula tempor. Sed porta tempus leo, vel aliquam risus scelerisque nec. Pellentesque diam nibh, ultrices in rhoncus ut, rhoncus et ligula. Duis pellentesque diam purus, ut scelerisque turpis condimentum sit amet. Sed sit amet efficitur tortor, vitae aliquet quam. Nullam placerat dui eu sapien condimentum, placerat convallis sapien imperdiet. Suspendisse vitae laoreet ex. Etiam quis rhoncus ante. Ut egestas eget ipsum ultrices tempus. Vivamus non odio non nisl aliquet rhoncus. Ut et nisl placerat, interdum turpis a, condimentum mauris. In laoreet lobortis justo. Maecenas vehicula magna non libero posuere rutrum. Praesent eget lectus feugiat dui pellentesque vehicula a sed felis. Curabitur nunc orci, vehicula non gravida sed, suscipit sed diam. Nam semper, dui eu volutpat vulputate, metus mauris congue lectus, ultrices sollicitudin eros felis ac erat.

Proin et rhoncus purus. Etiam nulla libero, dictum sed quam lacinia, consequat euismod ipsum. Donec quis tristique metus. Cras vitae pretium massa. Etiam laoreet, eros in rhoncus ultrices, nibh nibh bibendum diam, nec ultricies mi ante non ex. Pellentesque eget mattis dolor, eget pulvinar lorem. Nullam ante dolor, ultricies et malesuada in, efficitur sit amet diam. Duis ligula augue, vestibulum sit amet ligula ac, vestibulum tincidunt eros. Nullam commodo euismod vulputate. Morbi varius accumsan diam eu pellentesque. Nunc vehicula pretium risus dapibus cursus. Mauris sit amet est at ipsum scelerisque lobortis. Aenean eget quam sit amet arcu mattis interdum in at neque.

Mauris efficitur, enim pellentesque maximus faucibus, nibh enim gravida urna, quis dignissim turpis velit quis nibh. Mauris eget vestibulum tellus. Duis mollis, ante in egestas lacinia, felis massa rutrum ante, vel placerat lectus neque in purus. Fusce sodales nunc vel ligula mollis tincidunt. Sed ac viverra ligula. Vestibulum ut velit sit amet ipsum cursus posuere in nec lacus. Praesent vel odio pellentesque, ullamcorper metus in, accumsan dolor. Donec vel mi ultrices, interdum arcu vel, pellentesque nunc.

Third step

GHI STEP

Pagination

Normal pagination

Page {page}

Auto pagination

{(page) => ( Page {page} )}

Async pagination

{ return 72; }} getData={async () => (["a", Math.random(), "c"])}> {(data) => ( <> { data.map((value, index) => (
{value}
)) } )}

Curtains & co

Curtains

Subapps

) }}>Open a subapp

Modals

Notifications

Async

Async data test: }> {(data) => (

Data: {data}

)}

Error boundaries

}> { [...Array(failingComponentsCount)].map(() => ) }
); }