this.gui 1.3.40 → 1.3.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/init/index.html +27 -0
- package/dist/init/package-lock.json +5779 -0
- package/dist/init/package.json +24 -0
- package/dist/init/src/App.tsx +40 -0
- package/dist/init/src/index.css +16 -0
- package/dist/init/src/main.tsx +13 -0
- package/dist/init/src/router/DerivableRouter.tsx +36 -0
- package/dist/init/tsconfig.json +17 -0
- package/dist/init/vite.config.ts +11 -0
- package/package.json +5 -3
- package/src/GUI.tsx +46 -0
- package/src/QRouter/QRegistry.tsx +53 -0
- package/src/QRouter/QRouter.stories.tsx +31 -0
- package/src/QRouter/QRouter.tsx +57 -0
- package/src/gui/Theme/GuiProvider.tsx +111 -0
- package/src/gui/Theme/Icon/Icon.resolver.tsx +29 -0
- package/src/gui/Theme/Icon/Icon.tsx +43 -0
- package/src/gui/Theme/Layout/Content/Content.resolver.tsx +0 -0
- package/src/gui/Theme/Layout/Content/Content.stories.tsx +88 -0
- package/src/gui/Theme/Layout/Content/Content.tsx +53 -0
- package/src/gui/Theme/Layout/Content/Content.types.tsx +40 -0
- package/src/gui/Theme/Layout/Footer/Footer.resolver.tsx +45 -0
- package/src/gui/Theme/Layout/Footer/Footer.stories.tsx +205 -0
- package/src/gui/Theme/Layout/Footer/Footer.tsx +337 -0
- package/src/gui/Theme/Layout/Footer/Footer.types.ts +40 -0
- package/src/gui/Theme/Layout/Layout/Layout.resolver.tsx +37 -0
- package/src/gui/Theme/Layout/Layout/Layout.stories.tsx +289 -0
- package/src/gui/Theme/Layout/Layout/Layout.tsx +117 -0
- package/src/gui/Theme/Layout/Layout/Layout.types.ts +57 -0
- package/src/gui/Theme/Layout/Layout/useLayoutBreakpoints.ts +9 -0
- package/src/gui/Theme/Layout/Namespace/Namespace.stories.tsx +105 -0
- package/src/gui/Theme/Layout/Namespace/Namespace.tsx +26 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.resolver.tsx +87 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.stories.tsx +199 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.tsx +311 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.types.ts +41 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/SidebarToggleButton.tsx +53 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.resolver.tsx +19 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.tsx +107 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.resolver.tsx +0 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.tsx +134 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.types.ts +15 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarMenu/LeftSidebarMenu.tsx +142 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarToggleButton/LeftSidebarToggleButton.tsx +23 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.resolver.tsx +35 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.stories.tsx +239 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.tsx +319 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.types.ts +17 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarAction/RightSidebarAction.tsx +102 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarLink/RightSidebarLink.tsx +132 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarMenu/RightSidebarMenu.tsx +140 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarToggleButton/RightSidebarToggleButton.tsx +22 -0
- package/src/gui/Theme/Layout/StickyOptions/StickyOptionsTop.stories.tsx +469 -0
- package/src/gui/Theme/Layout/StickyOptions/StickyOptionsTop.tsx +489 -0
- package/src/gui/Theme/Layout/TopBar/TopBar.resolver.tsx +86 -0
- package/src/gui/Theme/Layout/TopBar/TopBar.stories.tsx +350 -0
- package/src/gui/Theme/Layout/TopBar/TopBar.tsx +292 -0
- package/src/gui/Theme/Layout/TopBar/TopBar.types.ts +39 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.stories.tsx +83 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.tsx +18 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.types.ts +4 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.stories.tsx +189 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.tsx +30 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.types.ts +9 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.resolver.tsx +14 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.stories.tsx +56 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.tsx +123 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.types.ts +44 -0
- package/src/gui/Theme/catalog/CherryByte/CherryByte.png +0 -0
- package/src/gui/Theme/catalog/CherryByte/dark.tokens.ts +47 -0
- package/src/gui/Theme/catalog/CherryByte/light.tokens.ts +47 -0
- package/src/gui/Theme/catalog/CherryByte/manifest.ts +24 -0
- package/src/gui/Theme/catalog/GhostShell/dark.tokens.ts +43 -0
- package/src/gui/Theme/catalog/GhostShell/ghost.png +0 -0
- package/src/gui/Theme/catalog/GhostShell/light.tokens.ts +39 -0
- package/src/gui/Theme/catalog/GhostShell/manifest.ts +24 -0
- package/src/gui/Theme/catalog/LunaHex/LunaHex.png +0 -0
- package/src/gui/Theme/catalog/LunaHex/dark.tokens.ts +34 -0
- package/src/gui/Theme/catalog/LunaHex/light.tokens.ts +74 -0
- package/src/gui/Theme/catalog/LunaHex/manifest.ts +24 -0
- package/src/gui/Theme/catalog/MUI/MUI.png +0 -0
- package/src/gui/Theme/catalog/MUI/dark.tokens.ts +58 -0
- package/src/gui/Theme/catalog/MUI/light.tokens.ts +74 -0
- package/src/gui/Theme/catalog/MUI/manifest.ts +24 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/dark.tokens.ts +48 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/light.tokens.ts +47 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/manifest.ts +24 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/prince.png +0 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/princeOfDarkness.png +0 -0
- package/src/gui/Theme/catalog/Seafoam/dark.tokens.ts +49 -0
- package/src/gui/Theme/catalog/Seafoam/light.tokens.ts +47 -0
- package/src/gui/Theme/catalog/Seafoam/manifest.ts +24 -0
- package/src/gui/Theme/catalog/Seafoam/seaFoam.png +0 -0
- package/src/gui/Theme/catalog/neurons/dark.tokens.ts +58 -0
- package/src/gui/Theme/catalog/neurons/light.tokens.ts +74 -0
- package/src/gui/Theme/catalog/neurons/manifest.ts +24 -0
- package/src/gui/Theme/catalog/neurons/neurons.me.png +0 -0
- package/src/gui/Theme/fromTokens.ts +272 -0
- package/src/gui/Theme/gui.css +31 -0
- package/src/gui/Theme/index.ts +17 -0
- package/src/gui/Theme/styles/buildShadows.ts +83 -0
- package/src/gui/Theme/styles/theme.tokens.ts +108 -0
- package/src/gui/Theme/utils/catalog.ts +61 -0
- package/src/gui/Theme/utils/persistence.ts +66 -0
- package/src/gui/Theme/utils/themeUtils.ts +34 -0
- package/src/gui/components/atoms/AppBar/AppBar.resolver.tsx +46 -0
- package/src/gui/components/atoms/AppBar/AppBar.stories.tsx +251 -0
- package/src/gui/components/atoms/AppBar/AppBar.tsx +107 -0
- package/src/gui/components/atoms/AppBar/AppBar.types.ts +28 -0
- package/src/gui/components/atoms/Avatar/Avatar.resolver.tsx +61 -0
- package/src/gui/components/atoms/Avatar/Avatar.stories.tsx +36 -0
- package/src/gui/components/atoms/Avatar/Avatar.tsx +14 -0
- package/src/gui/components/atoms/Box/Box.resolver.tsx +171 -0
- package/src/gui/components/atoms/Box/Box.stories.tsx +263 -0
- package/src/gui/components/atoms/Box/Box.tsx +15 -0
- package/src/gui/components/atoms/Button/Button.resolver.tsx +103 -0
- package/src/gui/components/atoms/Button/Button.stories.tsx +219 -0
- package/src/gui/components/atoms/Button/Button.tsx +40 -0
- package/src/gui/components/atoms/Card/Card.resolver.tsx +63 -0
- package/src/gui/components/atoms/Card/Card.stories.tsx +54 -0
- package/src/gui/components/atoms/Card/Card.tsx +13 -0
- package/src/gui/components/atoms/CardActions/CardActions.resolver.tsx +59 -0
- package/src/gui/components/atoms/CardActions/CardActions.stories.tsx +32 -0
- package/src/gui/components/atoms/CardActions/CardActions.tsx +14 -0
- package/src/gui/components/atoms/CardContent/CardContent.resolver.tsx +60 -0
- package/src/gui/components/atoms/CardContent/CardContent.stories.tsx +34 -0
- package/src/gui/components/atoms/CardContent/CardContent.tsx +13 -0
- package/src/gui/components/atoms/CardHeader/CardHeader.resolver.tsx +68 -0
- package/src/gui/components/atoms/CardHeader/CardHeader.stories.tsx +40 -0
- package/src/gui/components/atoms/CardHeader/CardHeader.tsx +12 -0
- package/src/gui/components/atoms/Collapse/Collapse.resolver.tsx +85 -0
- package/src/gui/components/atoms/Collapse/Collapse.stories.tsx +130 -0
- package/src/gui/components/atoms/Collapse/Collapse.tsx +17 -0
- package/src/gui/components/atoms/Divider/Divider.resolver.tsx +95 -0
- package/src/gui/components/atoms/Divider/Divider.stories.tsx +108 -0
- package/src/gui/components/atoms/Divider/Divider.tsx +14 -0
- package/src/gui/components/atoms/Drawer/Drawer.resolver.tsx +116 -0
- package/src/gui/components/atoms/Drawer/Drawer.stories.tsx +223 -0
- package/src/gui/components/atoms/Drawer/Drawer.tsx +25 -0
- package/src/gui/components/atoms/Grid/Grid.resolver.tsx +33 -0
- package/src/gui/components/atoms/Grid/Grid.stories.tsx +136 -0
- package/src/gui/components/atoms/Grid/Grid.tsx +15 -0
- package/src/gui/components/atoms/Grid/Grid.types.ts +9 -0
- package/src/gui/components/atoms/IconButton/IconButton.resolver.tsx +137 -0
- package/src/gui/components/atoms/IconButton/IconButton.stories.tsx +134 -0
- package/src/gui/components/atoms/IconButton/IconButton.tsx +22 -0
- package/src/gui/components/atoms/Link/Link.resolver.tsx +74 -0
- package/src/gui/components/atoms/Link/Link.stories.tsx +157 -0
- package/src/gui/components/atoms/Link/Link.tsx +36 -0
- package/src/gui/components/atoms/List/List.resolver.tsx +94 -0
- package/src/gui/components/atoms/List/List.stories.tsx +137 -0
- package/src/gui/components/atoms/List/List.tsx +20 -0
- package/src/gui/components/atoms/ListItem/ListItem.resolver.tsx +88 -0
- package/src/gui/components/atoms/ListItem/ListItem.stories.tsx +151 -0
- package/src/gui/components/atoms/ListItem/ListItem.tsx +19 -0
- package/src/gui/components/atoms/ListItemButton/ListItemButton.resolver.tsx +214 -0
- package/src/gui/components/atoms/ListItemButton/ListItemButton.stories.tsx +155 -0
- package/src/gui/components/atoms/ListItemButton/ListItemButton.tsx +15 -0
- package/src/gui/components/atoms/ListItemIcon/ListItemIcon.resolver.tsx +102 -0
- package/src/gui/components/atoms/ListItemIcon/ListItemIcon.stories.tsx +132 -0
- package/src/gui/components/atoms/ListItemIcon/ListItemIcon.tsx +11 -0
- package/src/gui/components/atoms/ListItemText/ListItemText.resolver.tsx +112 -0
- package/src/gui/components/atoms/ListItemText/ListItemText.stories.tsx +156 -0
- package/src/gui/components/atoms/ListItemText/ListItemText.tsx +15 -0
- package/src/gui/components/atoms/Menu/Menu.resolver.tsx +112 -0
- package/src/gui/components/atoms/Menu/Menu.stories.tsx +162 -0
- package/src/gui/components/atoms/Menu/Menu.tsx +17 -0
- package/src/gui/components/atoms/MenuItem/MenuItem.resolver.tsx +183 -0
- package/src/gui/components/atoms/MenuItem/MenuItem.stories.tsx +134 -0
- package/src/gui/components/atoms/MenuItem/MenuItem.tsx +14 -0
- package/src/gui/components/atoms/Paper/Paper.resolver.tsx +98 -0
- package/src/gui/components/atoms/Paper/Paper.stories.tsx +184 -0
- package/src/gui/components/atoms/Paper/Paper.tsx +15 -0
- package/src/gui/components/atoms/Section/Section.resolver.tsx +10 -0
- package/src/gui/components/atoms/Section/Section.stories.tsx +189 -0
- package/src/gui/components/atoms/Section/Section.tsx +76 -0
- package/src/gui/components/atoms/Section/Section.types.tsx +24 -0
- package/src/gui/components/atoms/Stack/Stack.resolver.tsx +94 -0
- package/src/gui/components/atoms/Stack/Stack.stories.tsx +160 -0
- package/src/gui/components/atoms/Stack/Stack.tsx +15 -0
- package/src/gui/components/atoms/Surface/Surface.resolver.tsx +37 -0
- package/src/gui/components/atoms/Surface/Surface.tsx +49 -0
- package/src/gui/components/atoms/Surface/Surface.types.ts +20 -0
- package/src/gui/components/atoms/Switch/Switch.resolver.tsx +53 -0
- package/src/gui/components/atoms/Switch/Switch.stories.tsx +236 -0
- package/src/gui/components/atoms/Switch/Switch.tsx +22 -0
- package/src/gui/components/atoms/Table/Body/TableBody.tsx +7 -0
- package/src/gui/components/atoms/Table/Cell/TableCell.tsx +18 -0
- package/src/gui/components/atoms/Table/Head/TableHead.tsx +9 -0
- package/src/gui/components/atoms/Table/Row/TableRow.tsx +20 -0
- package/src/gui/components/atoms/Table/Table.resolver.tsx +77 -0
- package/src/gui/components/atoms/Table/Table.stories.tsx +173 -0
- package/src/gui/components/atoms/Table/Table.tsx +20 -0
- package/src/gui/components/atoms/TextField/TextField.stories.tsx +25 -0
- package/src/gui/components/atoms/TextField/TextField.tsx +15 -0
- package/src/gui/components/atoms/Toolbar/Toolbar.resolver.tsx +60 -0
- package/src/gui/components/atoms/Toolbar/Toolbar.stories.tsx +155 -0
- package/src/gui/components/atoms/Toolbar/Toolbar.tsx +16 -0
- package/src/gui/components/atoms/Tooltip/Tooltip.resolver.tsx +142 -0
- package/src/gui/components/atoms/Tooltip/Tooltip.stories.tsx +117 -0
- package/src/gui/components/atoms/Tooltip/Tooltip.tsx +70 -0
- package/src/gui/components/atoms/Typography/Typography.resolver.tsx +158 -0
- package/src/gui/components/atoms/Typography/Typography.stories.tsx +222 -0
- package/src/gui/components/atoms/Typography/Typography.tsx +27 -0
- package/src/gui/components/atoms/Window/Nodes/node.ts +0 -0
- package/src/gui/components/atoms/Window/code/block/node.tsx +0 -0
- package/src/gui/components/atoms/Window/code/hugging.face.api.ts +11 -0
- package/src/gui/components/atoms/Window/connectors/index.ts +19 -0
- package/src/gui/components/atoms/Window/window.stories.tsx +20 -0
- package/src/gui/components/atoms/Window/window.tsx +636 -0
- package/src/gui/components/atoms/atoms.tsx +151 -0
- package/src/gui/components/atoms/index.ts +2 -0
- package/src/gui/components/generics/Cards/Gridme.jsx +52 -0
- package/src/gui/components/generics/Cards/LilBox.jsx +65 -0
- package/src/gui/components/generics/Cards/ModuleCard.jsx +106 -0
- package/src/gui/components/generics/Chats/FullChatBot.jsx +223 -0
- package/src/gui/components/generics/Code/CodeBlock.jsx +33 -0
- package/src/gui/components/generics/EmojiCursor/EmojiCursor.stories.tsx +153 -0
- package/src/gui/components/generics/EmojiCursor/EmojiCursor.tsx +23 -0
- package/src/gui/components/generics/Feedback/Callout.jsx +92 -0
- package/src/gui/components/generics/Layout/GridX.jsx +29 -0
- package/src/gui/components/generics/Layout/Hero2.jsx +132 -0
- package/src/gui/components/generics/Layout/PageContainer.jsx +29 -0
- package/src/gui/components/generics/Layout/PageDivider.jsx +20 -0
- package/src/gui/components/generics/Layout/Section.jsx +43 -0
- package/src/gui/components/generics/Layout/SectionHeader.jsx +21 -0
- package/src/gui/components/generics/Media/Img.jsx +58 -0
- package/src/gui/components/generics/Media/VideoEmbed.jsx +51 -0
- package/src/gui/components/generics/Organization/TableOfContents.jsx +51 -0
- package/src/gui/components/generics/Organization/Tabs.jsx +45 -0
- package/src/gui/components/generics/Text/TextList.jsx +41 -0
- package/src/gui/components/generics/Text/TextParagraph.jsx +28 -0
- package/src/gui/components/generics/Text/TextQuote.jsx +23 -0
- package/src/gui/components/generics/Text/TextTitle.jsx +44 -0
- package/src/gui/components/molecules/Dialog/Dialog.stories.tsx +18 -0
- package/src/gui/components/molecules/Dialog/Dialog.tsx +5 -0
- package/src/gui/components/molecules/Hero/Hero.stories.tsx +140 -0
- package/src/gui/components/molecules/Hero/Hero.tsx +152 -0
- package/src/gui/components/molecules/Hero/Hero.types.tsx +18 -0
- package/src/gui/components/molecules/Modal/Modal.resolver.tsx +38 -0
- package/src/gui/components/molecules/Modal/Modal.stories.tsx +82 -0
- package/src/gui/components/molecules/Modal/Modal.tsx +110 -0
- package/src/gui/components/molecules/Modal/Modal.types.ts +29 -0
- package/src/gui/components/molecules/Page/Page.stories.tsx +135 -0
- package/src/gui/components/molecules/Page/Page.tsx +94 -0
- package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.resolver.tsx +58 -0
- package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.stories.tsx +133 -0
- package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.tsx +101 -0
- package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.types.ts +29 -0
- package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.resolver.tsx +15 -0
- package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.stories.tsx +88 -0
- package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.tsx +167 -0
- package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.types.ts +34 -0
- package/src/gui/components/molecules/molecules.ts +49 -0
- package/src/gui/components/organisms/Blockchain/Blocks/BlocksTable.tsx +119 -0
- package/src/gui/components/organisms/Blockchain/Usernames/Identities.stories.tsx +20 -0
- package/src/gui/components/organisms/Blockchain/Usernames/QR.tsx +566 -0
- package/src/gui/components/organisms/Blockchain/Usernames/Usernames.tsx +448 -0
- package/src/gui/components/organisms/Blockchain/Usernames/identities.tsx +710 -0
- package/src/gui/components/organisms/Blockchain/blockchain.stories.tsx +17 -0
- package/src/gui/components/organisms/Blockchain/blockchain.tsx +368 -0
- package/src/gui/components/organisms/Blockchain/scripts/connection.ts +82 -0
- package/src/gui/components/organisms/Blockchain/scripts/match_face.ts +143 -0
- package/src/gui/components/organisms/HighLighter/HighLighter.stories.tsx +168 -0
- package/src/gui/components/organisms/HighLighter/HighLighter.tsx +420 -0
- package/src/gui/components/organisms/HighLighter/HighLightsDrawer.tsx +197 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/FaceRecognition.stories.tsx +312 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/FaceRecognition.tsx +765 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceCameraPermission.ts +70 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceLandmarker.ts +106 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceOverlay.ts +489 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceTemplate.ts +32 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceTemplateBurst.ts +178 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/verifyTemplate.ts +136 -0
- package/src/gui/components/organisms/IdentityNoise/IdentityNoise.tsx +403 -0
- package/src/gui/components/organisms/IdentityNoise/IndentityNoise.stories.tsx +15 -0
- package/src/gui/components/organisms/IdentityNoise/Noise/Noise.stories.tsx +206 -0
- package/src/gui/components/organisms/IdentityNoise/Noise/Noise.tsx +394 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/QR.tsx +566 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/Tiad.stories.tsx +6 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/Triad.tsx +917 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/handleCleak.ts +0 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/identity.ts +31 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/me/fundamentals/vectors/vectors.tsx +252 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/me/me.stories.tsx +314 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/me/me.tsx +0 -0
- package/src/gui/components/organisms/organisms.ts +15 -0
- package/src/gui/contexts/InsetsContext.tsx +40 -0
- package/src/gui/contexts/LeftSidebarContext.tsx +20 -0
- package/src/gui/contexts/RightSidebarContext.tsx +25 -0
- package/src/gui/contexts/ThemeContext.ts +34 -0
- package/src/gui/contexts/index.ts +4 -0
- package/src/gui/hooks/index.ts +11 -0
- package/src/gui/hooks/resolveColorToken.ts +39 -0
- package/src/gui/hooks/useCodeGen.ts +12 -0
- package/src/gui/hooks/useGuiMediaQuery.ts +18 -0
- package/src/gui/hooks/useGuiTheme.ts +18 -0
- package/src/gui/hooks/useInsets.ts +26 -0
- package/src/gui/hooks/useIsMobile.ts +13 -0
- package/src/gui/hooks/useIsTouchDevice.ts +25 -0
- package/src/gui/hooks/useLeftSidebar.ts +10 -0
- package/src/gui/hooks/useRightSidebar.ts +12 -0
- package/src/gui/hooks/useViewportKey.ts +19 -0
- package/src/gui/hooks/useViewportProp.ts +17 -0
- package/src/gui/registry/GuiRegistry.ts +19 -0
- package/src/gui/registry/factory.ts +12 -0
- package/src/gui/registry/index.ts +3 -0
- package/src/gui/registry/types.ts +6 -0
- package/src/gui/utils/nodeID.ts +11 -0
- package/src/registry/GuiRegistry.ts +19 -0
- package/src/stories/01.Home.mdx +22 -0
- package/src/stories/02.Understanding.This.GUI.mdx +149 -0
- package/src/stories/Theme/Palette.stories.tsx +86 -0
- package/src/stories/Theme/ThemeViewer.stories.tsx +91 -0
- package/src/stories/Theme/Typography.stories.jsx +211 -0
- package/src/stories/assets/this.GUI.png +0 -0
- package/src/types/gui.d.ts +67 -0
- package/src/types/theme.d.ts +191 -0
- package/src/types/viewport.ts +132 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default function resolveLeftSidebarAction({
|
|
2
|
+
action,
|
|
3
|
+
context,
|
|
4
|
+
}: {
|
|
5
|
+
action: string | (() => any);
|
|
6
|
+
context?: any;
|
|
7
|
+
}) {
|
|
8
|
+
try {
|
|
9
|
+
if (typeof action === 'function') return action();
|
|
10
|
+
if (typeof action === 'string') {
|
|
11
|
+
const fn = (window as any)[action];
|
|
12
|
+
if (typeof fn === 'function') return fn(context);
|
|
13
|
+
console.warn(`LeftSidebarAction: No global function found for "${action}"`);
|
|
14
|
+
}
|
|
15
|
+
} catch (err) {
|
|
16
|
+
console.error(`Error executing LeftSidebarAction for "${action}":`, err);
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.tsx
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { Box, Typography, Tooltip } from '@/gui/components/atoms';
|
|
4
|
+
import Icon from '@/gui/Theme/Icon/Icon';
|
|
5
|
+
import type { LeftSidebarMode } from '../../LeftSidebar.types';
|
|
6
|
+
import { useLeftSidebar } from '@/gui/hooks';
|
|
7
|
+
|
|
8
|
+
export type LeftSidebarActionProps = {
|
|
9
|
+
label?: string;
|
|
10
|
+
icon?: string;
|
|
11
|
+
iconColor?: string;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
active?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
resolver?: string; // optional resolver name or JS function string
|
|
17
|
+
view: LeftSidebarMode; // added line
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const LeftSidebarAction: React.FC<LeftSidebarActionProps> = ({
|
|
21
|
+
label,
|
|
22
|
+
icon,
|
|
23
|
+
iconColor,
|
|
24
|
+
onClick,
|
|
25
|
+
active = false,
|
|
26
|
+
className,
|
|
27
|
+
style,
|
|
28
|
+
resolver,
|
|
29
|
+
view,
|
|
30
|
+
}) => {
|
|
31
|
+
const handleClick = onClick || (resolver ? () => { try { new Function(resolver)(); } catch (e) { console.error(e); } } : undefined);
|
|
32
|
+
|
|
33
|
+
const content = (
|
|
34
|
+
<Box
|
|
35
|
+
sx={{
|
|
36
|
+
display: 'flex',
|
|
37
|
+
gap: 1.123,
|
|
38
|
+
justifyContent: view === 'rail' ? 'center' : 'flex-start',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
width: '100%',
|
|
41
|
+
textAlign: view === 'rail' ? 'center' : 'left',
|
|
42
|
+
px: view === 'rail' ? 0 : 1.23,
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
<Icon name={icon || ''} iconColor={iconColor || (active ? 'primary.main' : 'text.secondary')} />
|
|
46
|
+
{view !== 'rail' && (
|
|
47
|
+
<Typography
|
|
48
|
+
variant="body2"
|
|
49
|
+
sx={{
|
|
50
|
+
whiteSpace: 'nowrap',
|
|
51
|
+
overflow: 'hidden',
|
|
52
|
+
textOverflow: 'ellipsis',
|
|
53
|
+
color: active ? 'primary.main' : 'text.primary',
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
{label}
|
|
57
|
+
</Typography>
|
|
58
|
+
)}
|
|
59
|
+
</Box>
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<Box
|
|
64
|
+
component="button"
|
|
65
|
+
onClick={handleClick}
|
|
66
|
+
className={clsx('LeftSidebarAction', className)}
|
|
67
|
+
style={style}
|
|
68
|
+
sx={{
|
|
69
|
+
p: 1.123,
|
|
70
|
+
display: 'flex',
|
|
71
|
+
flexDirection: 'column',
|
|
72
|
+
alignItems: view === 'rail' ? 'center' : 'flex-start',
|
|
73
|
+
borderLeft: 2,
|
|
74
|
+
borderLeftColor: active ? 'primary.main' : 'transparent',
|
|
75
|
+
borderLeftStyle: 'solid',
|
|
76
|
+
cursor: 'pointer',
|
|
77
|
+
backgroundColor: active ? 'action.selected' : 'transparent',
|
|
78
|
+
'&:hover': {
|
|
79
|
+
backgroundColor: 'action.hover',
|
|
80
|
+
borderLeftColor: 'primary.main',
|
|
81
|
+
},
|
|
82
|
+
color: active ? 'primary.main' : 'text.primary',
|
|
83
|
+
width: '100%',
|
|
84
|
+
textAlign: view === 'rail' ? 'center' : 'left',
|
|
85
|
+
outline: 'none',
|
|
86
|
+
border: 'none',
|
|
87
|
+
}}
|
|
88
|
+
aria-pressed={active}
|
|
89
|
+
type="button"
|
|
90
|
+
>
|
|
91
|
+
{view === 'rail' ? (
|
|
92
|
+
<Tooltip
|
|
93
|
+
title={label}
|
|
94
|
+
placement="right"
|
|
95
|
+
arrow
|
|
96
|
+
slotProps={{ tooltip: { sx: { fontSize: '0.9rem', py: 0.5, px: 1 } } }}
|
|
97
|
+
>
|
|
98
|
+
{content}
|
|
99
|
+
</Tooltip>
|
|
100
|
+
) : (
|
|
101
|
+
content
|
|
102
|
+
)}
|
|
103
|
+
</Box>
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export default LeftSidebarAction;
|
|
File without changes
|
package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.tsx
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Box, Typography, Tooltip } from '@/gui/components/atoms';
|
|
3
|
+
import Icon from '@/gui/Theme/Icon/Icon';
|
|
4
|
+
import type { LeftSidebarItemProps } from './LeftSidebarLink.types';
|
|
5
|
+
import { useLeftSidebar } from '@/gui/hooks';
|
|
6
|
+
import { Link as RouterLink } from 'react-router-dom';
|
|
7
|
+
|
|
8
|
+
const LeftSidebarLink: React.FC<LeftSidebarItemProps> = ({
|
|
9
|
+
label,
|
|
10
|
+
icon,
|
|
11
|
+
iconColor,
|
|
12
|
+
href,
|
|
13
|
+
to,
|
|
14
|
+
active,
|
|
15
|
+
external,
|
|
16
|
+
onClick,
|
|
17
|
+
children
|
|
18
|
+
}) => {
|
|
19
|
+
const { view } = useLeftSidebar();
|
|
20
|
+
const [expanded, setExpanded] = useState(false);
|
|
21
|
+
const hasChildren = Boolean(children);
|
|
22
|
+
|
|
23
|
+
const handleClick = () => {
|
|
24
|
+
if (hasChildren) setExpanded((prev) => !prev);
|
|
25
|
+
if (onClick) onClick();
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const content = (
|
|
29
|
+
<Box
|
|
30
|
+
sx={{
|
|
31
|
+
display: 'flex',
|
|
32
|
+
gap: 1.123,
|
|
33
|
+
justifyContent: view === 'rail' ? 'center' : 'flex-start',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
width: '100%',
|
|
36
|
+
textAlign: view === 'rail' ? 'center' : 'left',
|
|
37
|
+
px: view === 'rail' ? 0 : 1.23,
|
|
38
|
+
}}
|
|
39
|
+
>
|
|
40
|
+
{icon && (
|
|
41
|
+
<Icon name={icon} iconColor={iconColor}/>
|
|
42
|
+
)}
|
|
43
|
+
{view !== 'rail' && <Typography variant="body2">{label}</Typography>}
|
|
44
|
+
{hasChildren && (
|
|
45
|
+
<Icon
|
|
46
|
+
name={expanded ? 'expand_less' : 'expand_more'}
|
|
47
|
+
iconColor={iconColor}
|
|
48
|
+
/>
|
|
49
|
+
)}
|
|
50
|
+
</Box>
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<Box
|
|
55
|
+
component={to ? (RouterLink as any) : href ? 'a' : 'div'}
|
|
56
|
+
{...(to ? ({ to } as any) : {})}
|
|
57
|
+
{...(!to && href ? ({ href, target: external ? '_blank' : undefined, rel: external ? 'noreferrer' : undefined } as any) : {})}
|
|
58
|
+
sx={{
|
|
59
|
+
display: 'flex',
|
|
60
|
+
flexDirection: 'column',
|
|
61
|
+
alignItems: 'flex-start',
|
|
62
|
+
p: 1.123,
|
|
63
|
+
backgroundColor: 'transparent',
|
|
64
|
+
border: active ? '1px solid' : 'none',
|
|
65
|
+
borderColor: active ? 'primary.main' : 'transparent',
|
|
66
|
+
color: active ? 'white' : 'text.primary',
|
|
67
|
+
cursor: 'pointer',
|
|
68
|
+
borderRadius: 1,
|
|
69
|
+
textDecoration: 'none',
|
|
70
|
+
'&:hover': {
|
|
71
|
+
backgroundColor: 'action.hover',
|
|
72
|
+
textDecoration: 'none',
|
|
73
|
+
},
|
|
74
|
+
position: 'relative',
|
|
75
|
+
}}
|
|
76
|
+
onClick={(e: any) => {
|
|
77
|
+
if (hasChildren) {
|
|
78
|
+
e.preventDefault();
|
|
79
|
+
}
|
|
80
|
+
handleClick();
|
|
81
|
+
}}
|
|
82
|
+
>
|
|
83
|
+
{view === 'rail' ? (
|
|
84
|
+
<Tooltip
|
|
85
|
+
title={label}
|
|
86
|
+
placement="right"
|
|
87
|
+
arrow
|
|
88
|
+
slotProps={{ tooltip: { sx: { fontSize: '0.9rem', py: 0.5, px: 1 } } }}
|
|
89
|
+
>
|
|
90
|
+
{content}
|
|
91
|
+
</Tooltip>
|
|
92
|
+
) : (
|
|
93
|
+
content
|
|
94
|
+
)}
|
|
95
|
+
{hasChildren && (
|
|
96
|
+
<>
|
|
97
|
+
{expanded && view !== 'rail' && (
|
|
98
|
+
<Box sx={{ pl: 2, pt: 0.5 }}>
|
|
99
|
+
{React.Children.map(children, (child, index) =>
|
|
100
|
+
React.isValidElement(child) ? (
|
|
101
|
+
React.cloneElement(child, { key: index })
|
|
102
|
+
) : null
|
|
103
|
+
)}
|
|
104
|
+
</Box>
|
|
105
|
+
)}
|
|
106
|
+
{expanded && view === 'rail' && (
|
|
107
|
+
<Box
|
|
108
|
+
sx={{
|
|
109
|
+
position: 'absolute',
|
|
110
|
+
left: '100%',
|
|
111
|
+
top: 0,
|
|
112
|
+
backgroundColor: 'background.paper',
|
|
113
|
+
boxShadow: 3,
|
|
114
|
+
borderRadius: 1,
|
|
115
|
+
mt: -1,
|
|
116
|
+
zIndex: 10,
|
|
117
|
+
p: 1,
|
|
118
|
+
minWidth: 180,
|
|
119
|
+
}}
|
|
120
|
+
>
|
|
121
|
+
{React.Children.map(children, (child, index) =>
|
|
122
|
+
React.isValidElement(child)
|
|
123
|
+
? React.cloneElement(child, { key: index })
|
|
124
|
+
: null
|
|
125
|
+
)}
|
|
126
|
+
</Box>
|
|
127
|
+
)}
|
|
128
|
+
</>
|
|
129
|
+
)}
|
|
130
|
+
</Box>
|
|
131
|
+
);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export default LeftSidebarLink;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LeftSidebarView } from '@/gui/contexts/LeftSidebarContext';
|
|
3
|
+
export type LeftSidebarItemProps = {
|
|
4
|
+
label?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
iconColor?: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
/** react-router path */
|
|
9
|
+
to?: string;
|
|
10
|
+
active?: boolean;
|
|
11
|
+
external?: boolean;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
view?: LeftSidebarView;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
};
|
package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarMenu/LeftSidebarMenu.tsx
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import Box from "@/gui/atoms/Box/Box";
|
|
3
|
+
import Collapse from "@/gui/atoms/Collapse/Collapse";
|
|
4
|
+
import Typography from "@/gui/atoms/Typography/Typography";
|
|
5
|
+
import Icon from "@/gui/Theme/Icon/Icon";
|
|
6
|
+
type LeftSidebarMenuItem = {
|
|
7
|
+
label?: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
type LeftSidebarMenuProps = {
|
|
13
|
+
label?: string;
|
|
14
|
+
icon?: string;
|
|
15
|
+
items?: LeftSidebarMenuItem[];
|
|
16
|
+
view?: 'rail' | 'expanded' | 'mobile';
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const LeftSidebarMenu: React.FC<LeftSidebarMenuProps> = ({ label, icon, items, view }) => {
|
|
20
|
+
const [open, setOpen] = useState(false);
|
|
21
|
+
const [anchorTop, setAnchorTop] = useState<number | null>(null);
|
|
22
|
+
const isRail = view === 'rail';
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Box
|
|
26
|
+
onMouseEnter={(e) => {
|
|
27
|
+
if (isRail) {
|
|
28
|
+
const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();
|
|
29
|
+
setAnchorTop(rect.top);
|
|
30
|
+
setOpen(true);
|
|
31
|
+
}
|
|
32
|
+
}}
|
|
33
|
+
onMouseLeave={() => {
|
|
34
|
+
if (isRail) {
|
|
35
|
+
setOpen(false);
|
|
36
|
+
setAnchorTop(null);
|
|
37
|
+
}
|
|
38
|
+
}}
|
|
39
|
+
sx={{
|
|
40
|
+
display: 'flex',
|
|
41
|
+
flexDirection: 'column',
|
|
42
|
+
alignItems: 'flex-start',
|
|
43
|
+
p: 1.123,
|
|
44
|
+
backgroundColor: 'transparent',
|
|
45
|
+
cursor: 'pointer',
|
|
46
|
+
borderRadius: 1,
|
|
47
|
+
color: 'text.primary',
|
|
48
|
+
'&:hover': { backgroundColor: 'action.hover' },
|
|
49
|
+
position: 'relative',
|
|
50
|
+
}}
|
|
51
|
+
onClick={() => !isRail && setOpen(!open)}
|
|
52
|
+
>
|
|
53
|
+
<Box
|
|
54
|
+
sx={{
|
|
55
|
+
display: 'flex',
|
|
56
|
+
gap: 1.5,
|
|
57
|
+
justifyContent: view === 'rail' ? 'center' : 'flex-start',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
width: '100%',
|
|
60
|
+
textAlign: view === 'rail' ? 'center' : 'left',
|
|
61
|
+
px: view === 'rail' ? 0 : 1.23,
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
<Icon name={icon ?? ''} />
|
|
65
|
+
{view !== 'rail' && <Typography variant="body2">{label}</Typography>}
|
|
66
|
+
{!isRail && (
|
|
67
|
+
<Icon name={open ? 'expand_less' : 'expand_more'} />
|
|
68
|
+
)}
|
|
69
|
+
</Box>
|
|
70
|
+
|
|
71
|
+
{isRail ? (
|
|
72
|
+
open && (
|
|
73
|
+
<Box
|
|
74
|
+
sx={{
|
|
75
|
+
position: 'fixed',
|
|
76
|
+
left: 'calc(var(--gui-rail-width, 60px) + 2px)',
|
|
77
|
+
marginLeft: '-2px',
|
|
78
|
+
top: anchorTop ?? 0,
|
|
79
|
+
backgroundColor: 'background.paper',
|
|
80
|
+
color: 'text.primary',
|
|
81
|
+
borderRadius: 1,
|
|
82
|
+
boxShadow: 3,
|
|
83
|
+
zIndex: 1500,
|
|
84
|
+
border: '1px solid',
|
|
85
|
+
borderColor: 'divider',
|
|
86
|
+
minWidth: 180,
|
|
87
|
+
maxHeight: '80vh',
|
|
88
|
+
overflowY: 'auto',
|
|
89
|
+
py: 1,
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
92
|
+
{(items ?? []).map((item, idx) => (
|
|
93
|
+
<Box
|
|
94
|
+
key={idx}
|
|
95
|
+
onClick={item.onClick}
|
|
96
|
+
sx={{
|
|
97
|
+
display: 'flex',
|
|
98
|
+
alignItems: 'center',
|
|
99
|
+
px: 2,
|
|
100
|
+
py: 0.75,
|
|
101
|
+
gap: 1.5,
|
|
102
|
+
cursor: 'pointer',
|
|
103
|
+
borderRadius: 1,
|
|
104
|
+
color: 'text.primary',
|
|
105
|
+
'&:hover': { backgroundColor: 'action.hover' },
|
|
106
|
+
}}
|
|
107
|
+
>
|
|
108
|
+
<Icon name={item.icon ?? ''} />
|
|
109
|
+
<Typography variant="body2">{item.label}</Typography>
|
|
110
|
+
</Box>
|
|
111
|
+
))}
|
|
112
|
+
</Box>
|
|
113
|
+
)
|
|
114
|
+
) : (
|
|
115
|
+
<Collapse in={open}>
|
|
116
|
+
{(items ?? []).map((item, idx) => (
|
|
117
|
+
<Box
|
|
118
|
+
key={idx}
|
|
119
|
+
onClick={item.onClick}
|
|
120
|
+
sx={{
|
|
121
|
+
display: 'flex',
|
|
122
|
+
alignItems: 'center',
|
|
123
|
+
px: 2,
|
|
124
|
+
py: 0.75,
|
|
125
|
+
gap: 1.123,
|
|
126
|
+
cursor: 'pointer',
|
|
127
|
+
borderRadius: 1,
|
|
128
|
+
color: 'text.primary',
|
|
129
|
+
'&:hover': { backgroundColor: 'action.hover' },
|
|
130
|
+
}}
|
|
131
|
+
>
|
|
132
|
+
<Icon name={item.icon ?? ''} />
|
|
133
|
+
<Typography variant="body2">{item.label}</Typography>
|
|
134
|
+
</Box>
|
|
135
|
+
))}
|
|
136
|
+
</Collapse>
|
|
137
|
+
)}
|
|
138
|
+
</Box>
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export default LeftSidebarMenu;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//@/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarToggleButton/LeftSidebarToggleButton.tsx
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import IconButton from '@mui/material/IconButton';
|
|
4
|
+
import Icon from '@/gui/Theme/Icon/Icon';
|
|
5
|
+
|
|
6
|
+
type LeftSidebarToggleButtonProps = {
|
|
7
|
+
expanded: boolean;
|
|
8
|
+
onToggle: () => void;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const LeftSidebarToggleButton: React.FC<LeftSidebarToggleButtonProps> = ({ expanded, onToggle }) => {
|
|
12
|
+
return (
|
|
13
|
+
<IconButton
|
|
14
|
+
aria-label="Toggle Sidebar"
|
|
15
|
+
onClick={onToggle}
|
|
16
|
+
sx={{ margin: 1 }}
|
|
17
|
+
>
|
|
18
|
+
<Icon name={expanded ? 'chevron_left' : 'chevron_right'} />
|
|
19
|
+
</IconButton>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default LeftSidebarToggleButton;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { RegistryEntry } from '@/gui/registry/types';
|
|
3
|
+
import RightSidebar from './RightSidebar';
|
|
4
|
+
import type { RightSidebarElement } from './RightSidebar.types';
|
|
5
|
+
|
|
6
|
+
type RightSidebarSpec = {
|
|
7
|
+
type: 'RightSidebar';
|
|
8
|
+
props?: {
|
|
9
|
+
elements?: RightSidebarElement[];
|
|
10
|
+
footerElements?: RightSidebarElement[];
|
|
11
|
+
initialView?: 'rail' | 'expanded' | 'mobile';
|
|
12
|
+
className?: string;
|
|
13
|
+
id?: string;
|
|
14
|
+
'data-testid'?: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const RightSidebarResolver: RegistryEntry = {
|
|
19
|
+
type: 'RightSidebar',
|
|
20
|
+
resolve(spec: RightSidebarSpec) {
|
|
21
|
+
const props = spec.props ?? {};
|
|
22
|
+
return (
|
|
23
|
+
<RightSidebar
|
|
24
|
+
elements={props.elements ?? []}
|
|
25
|
+
footerElements={props.footerElements ?? []}
|
|
26
|
+
initialView={props.initialView}
|
|
27
|
+
className={props.className}
|
|
28
|
+
id={props.id}
|
|
29
|
+
data-testid={props['data-testid']}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default RightSidebarResolver;
|