this.gui 1.3.22 → 1.3.26
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/this-gui.es.js +0 -1
- package/dist/this-gui.umd.js +65 -65
- package/index.ts +3 -2
- package/init/index.html +4 -5
- package/init/package-lock.json +2 -2
- package/init/package.json +1 -1
- package/init/src/App.tsx +24 -0
- package/init/src/index.css +16 -0
- package/init/src/main.tsx +14 -0
- package/init/src/router/DerivableRouter.tsx +36 -0
- package/package.json +1 -1
- package/src/GUI.tsx +15 -0
- package/src/components/generics/Cards/Gridme.jsx +52 -0
- package/src/components/generics/Cards/LilBox.jsx +65 -0
- package/src/components/generics/Cards/ModuleCard.jsx +106 -0
- package/src/components/generics/Chats/FullChatBot.jsx +223 -0
- package/src/components/generics/Code/CodeBlock.jsx +33 -0
- package/src/components/generics/Feedback/Callout.jsx +92 -0
- package/src/components/generics/Layout/GridX.jsx +29 -0
- package/src/components/generics/Layout/Hero2.jsx +132 -0
- package/src/components/generics/Layout/PageContainer.jsx +29 -0
- package/src/components/generics/Layout/PageDivider.jsx +20 -0
- package/src/components/generics/Layout/Section.jsx +43 -0
- package/src/components/generics/Layout/SectionHeader.jsx +21 -0
- package/src/components/generics/Media/Img.jsx +58 -0
- package/src/components/generics/Media/VideoEmbed.jsx +51 -0
- package/src/components/generics/Organization/TableOfContents.jsx +51 -0
- package/src/components/generics/Organization/Tabs.jsx +45 -0
- package/src/components/generics/Text/TextList.jsx +41 -0
- package/src/components/generics/Text/TextParagraph.jsx +28 -0
- package/src/components/generics/Text/TextQuote.jsx +23 -0
- package/src/components/generics/Text/TextTitle.jsx +44 -0
- package/src/gui/Layouts/ResponsiveUI/Content/Content.resolver.tsx +0 -0
- package/src/gui/Layouts/ResponsiveUI/Content/Content.stories.tsx +88 -0
- package/src/gui/Layouts/ResponsiveUI/Content/Content.tsx +53 -0
- package/src/gui/Layouts/ResponsiveUI/Content/Content.types.tsx +40 -0
- package/src/gui/Layouts/ResponsiveUI/Footer/Footer.resolver.tsx +45 -0
- package/src/gui/Layouts/ResponsiveUI/Footer/Footer.stories.tsx +209 -0
- package/src/gui/Layouts/ResponsiveUI/Footer/Footer.tsx +337 -0
- package/src/gui/Layouts/ResponsiveUI/Footer/Footer.types.ts +40 -0
- package/src/gui/Layouts/ResponsiveUI/Layout/Layout.resolver.tsx +37 -0
- package/src/gui/Layouts/ResponsiveUI/Layout/Layout.stories.tsx +290 -0
- package/src/gui/Layouts/ResponsiveUI/Layout/Layout.tsx +112 -0
- package/src/gui/Layouts/ResponsiveUI/Layout/Layout.types.ts +56 -0
- package/src/gui/Layouts/ResponsiveUI/Layout/useLayoutBreakpoints.ts +9 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/LeftSidebar.resolver.tsx +87 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/LeftSidebar.stories.tsx +199 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/LeftSidebar.tsx +311 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/LeftSidebar.types.ts +41 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/SidebarToggleButton.tsx +53 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.resolver.tsx +19 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.tsx +107 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.resolver.tsx +0 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.tsx +122 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.types.ts +13 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarMenu/LeftSidebarMenu.tsx +142 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarToggleButton/LeftSidebarToggleButton.tsx +23 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/RightSidebar.resolver.tsx +35 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/RightSidebar.stories.tsx +240 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/RightSidebar.tsx +319 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/RightSidebar.types.ts +17 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/components/RightSidebarAction/RightSidebarAction.tsx +102 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/components/RightSidebarLink/RightSidebarLink.tsx +132 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/components/RightSidebarMenu/RightSidebarMenu.tsx +140 -0
- package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/components/RightSidebarToggleButton/RightSidebarToggleButton.tsx +22 -0
- package/src/gui/Layouts/ResponsiveUI/StickyOptions/StickyOptionsTop.stories.tsx +469 -0
- package/src/gui/Layouts/ResponsiveUI/StickyOptions/StickyOptionsTop.tsx +489 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/TopBar.resolver.tsx +86 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/TopBar.stories.tsx +350 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/TopBar.tsx +281 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/TopBar.types.ts +39 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarAction/TopBarAction.stories.tsx +83 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarAction/TopBarAction.tsx +18 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarAction/TopBarAction.types.ts +4 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarLink/TopBarLink.stories.tsx +189 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarLink/TopBarLink.tsx +30 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarLink/TopBarLink.types.ts +9 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarMenu/TopBarMenu.resolver.tsx +14 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarMenu/TopBarMenu.stories.tsx +56 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarMenu/TopBarMenu.tsx +123 -0
- package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarMenu/TopBarMenu.types.ts +44 -0
- package/src/gui/Theme/GuiProvider.tsx +125 -0
- package/src/gui/Theme/Icon/Icon.resolver.tsx +29 -0
- package/src/gui/Theme/Icon/Icon.tsx +43 -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 +273 -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/apis/codegen.api.ts +38 -0
- package/src/gui/components/atoms/AppBar/AppBar.resolver.tsx +41 -0
- package/src/gui/components/atoms/AppBar/AppBar.stories.tsx +225 -0
- package/src/gui/components/atoms/AppBar/AppBar.tsx +8 -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/TextField/TextField.stories.tsx +28 -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.tsx +138 -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/HeroSection/HeroSection.stories.tsx +141 -0
- package/src/gui/components/molecules/HeroSection/HeroSection.tsx +152 -0
- package/src/gui/components/molecules/HeroSection/HeroSection.types.tsx +18 -0
- package/src/gui/components/molecules/ModalBox/ModalBox.resolver.tsx +38 -0
- package/src/gui/components/molecules/ModalBox/ModalBox.stories.tsx +82 -0
- package/src/gui/components/molecules/ModalBox/ModalBox.tsx +106 -0
- package/src/gui/components/molecules/ModalBox/ModalBox.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/organism/ChatGPTInterface/ChatGPTInterface.stories.tsx +17 -0
- package/src/gui/components/organism/ChatGPTInterface/ChatGPTInterface.tsx +71 -0
- package/src/gui/components/organism/RootDomain/RootDomain.stories.tsx +31 -0
- package/src/gui/components/organism/RootDomain/RootDomain.tsx +100 -0
- package/src/gui/components/organism/RootDomain/staticServices.ts +66 -0
- package/src/gui/components/window/Nodes/node.ts +0 -0
- package/src/gui/components/window/code/block/node.tsx +0 -0
- package/src/gui/components/window/code/hugging.face.api.ts +11 -0
- package/src/gui/components/window/connectors/index.ts +19 -0
- package/src/gui/components/window/window.stories.tsx +20 -0
- package/src/gui/components/window/window.tsx +633 -0
- package/src/gui/contexts/InsetsContext.tsx +38 -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/me/Logic.tsx +31 -0
- package/src/gui/me/Me.stories.tsx +8 -0
- package/src/gui/me/Me.tsx +197 -0
- package/src/gui/me/fundamentals/verbs/verbs.tsx +94 -0
- package/src/gui/me/modificators/Adjectives.ts +0 -0
- package/src/gui/me/modificators/Adverbs.ts +0 -0
- package/src/gui/me/modificators/Complements.ts +27 -0
- package/src/gui/me/utils/Context.tsx +14 -0
- package/src/gui/me/utils/hooks/useMe.js +37 -0
- package/src/gui/utils/nodeID.ts +11 -0
- package/src/registry/GuiRegistry.ts +19 -0
- package/src/registry/factory.ts +12 -0
- package/src/registry/index.ts +3 -0
- package/src/registry/types.ts +6 -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/types/gui.d.ts +67 -0
- package/src/types/theme.d.ts +191 -0
- package/src/types/viewport.ts +132 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { useTheme } from '@mui/material/styles';
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
const variantStyles = {
|
|
5
|
+
warning: {
|
|
6
|
+
light: {
|
|
7
|
+
background: '#fff8e1',
|
|
8
|
+
border: '#f4b400',
|
|
9
|
+
color: '#f4b400',
|
|
10
|
+
},
|
|
11
|
+
dark: {
|
|
12
|
+
background: '#2c1a00',
|
|
13
|
+
border: '#f4b400',
|
|
14
|
+
color: '#f4b400',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
info: {
|
|
18
|
+
light: {
|
|
19
|
+
background: '#e3f2fd',
|
|
20
|
+
border: '#2196f3',
|
|
21
|
+
color: '#0d47a1',
|
|
22
|
+
},
|
|
23
|
+
dark: {
|
|
24
|
+
background: '#0d2b45',
|
|
25
|
+
border: '#64b5f6',
|
|
26
|
+
color: '#90caf9',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
success: {
|
|
30
|
+
light: {
|
|
31
|
+
background: '#e8f5e9',
|
|
32
|
+
border: '#4caf50',
|
|
33
|
+
color: '#2e7d32',
|
|
34
|
+
},
|
|
35
|
+
dark: {
|
|
36
|
+
background: '#1b3c28',
|
|
37
|
+
border: '#66bb6a',
|
|
38
|
+
color: '#a5d6a7',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
alert: {
|
|
42
|
+
light: {
|
|
43
|
+
background: '#ffebee',
|
|
44
|
+
border: '#f44336',
|
|
45
|
+
color: '#b71c1c',
|
|
46
|
+
},
|
|
47
|
+
dark: {
|
|
48
|
+
background: '#3d0000',
|
|
49
|
+
border: '#ef5350',
|
|
50
|
+
color: '#ef9a9a',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
neutral: {
|
|
54
|
+
light: {
|
|
55
|
+
background: '#f5f5f5',
|
|
56
|
+
border: '#9e9e9e',
|
|
57
|
+
color: '#424242',
|
|
58
|
+
},
|
|
59
|
+
dark: {
|
|
60
|
+
background: '#2c2c2c',
|
|
61
|
+
border: '#bdbdbd',
|
|
62
|
+
color: '#e0e0e0',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default function Callout({
|
|
68
|
+
children = "This repository is in continuous development and may be unstable.",
|
|
69
|
+
variant = "warning", // default variant
|
|
70
|
+
}) {
|
|
71
|
+
const theme = useTheme();
|
|
72
|
+
const mode = theme.palette.mode;
|
|
73
|
+
const styles = variantStyles[variant]?.[mode] || variantStyles.warning.light;
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<Box
|
|
77
|
+
sx={{
|
|
78
|
+
backgroundColor: styles.background,
|
|
79
|
+
border: `1px solid ${styles.border}`,
|
|
80
|
+
color: styles.color,
|
|
81
|
+
padding: '10px 16px',
|
|
82
|
+
borderRadius: '4px',
|
|
83
|
+
fontWeight: 'bold',
|
|
84
|
+
marginBottom: '1.5rem',
|
|
85
|
+
textAlign: 'center',
|
|
86
|
+
fontSize: '0.9rem',
|
|
87
|
+
}}
|
|
88
|
+
>
|
|
89
|
+
{children}
|
|
90
|
+
</Box>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Grid, Box, Typography } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PageGrid
|
|
5
|
+
* Standardized grid container for organizing content in pages.
|
|
6
|
+
*
|
|
7
|
+
* Props:
|
|
8
|
+
* - items: Array of { title, content, xs, md }
|
|
9
|
+
* - spacing: Grid spacing (default 3)
|
|
10
|
+
* - sx: Additional styling for the Box wrapper
|
|
11
|
+
*/
|
|
12
|
+
export default function GridX({ items = [], spacing = 3, sx = {} }) {
|
|
13
|
+
return (
|
|
14
|
+
<Box sx={{ width: '100%', mt: 2, ...sx }}>
|
|
15
|
+
<Grid container spacing={spacing}>
|
|
16
|
+
{items.map((item, index) => (
|
|
17
|
+
<Grid item xs={item.xs || 12} md={item.md || 6} key={index}>
|
|
18
|
+
{item.title && (
|
|
19
|
+
<Typography variant="h6" sx={{ fontWeight: 500, mb: 1 }}>
|
|
20
|
+
{item.title}
|
|
21
|
+
</Typography>
|
|
22
|
+
)}
|
|
23
|
+
{item.content}
|
|
24
|
+
</Grid>
|
|
25
|
+
))}
|
|
26
|
+
</Grid>
|
|
27
|
+
</Box>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// neurons.me — this.GUI
|
|
2
|
+
// Generic Hero2 component with video background, overlay and titles
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { Box, Typography } from '@mui/material';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Hero2
|
|
9
|
+
* A compact hero/cover with background video or image, an opacity layer, and title/subtitle.
|
|
10
|
+
*
|
|
11
|
+
* Props:
|
|
12
|
+
* - videoSrc: string URL for the background video.
|
|
13
|
+
* - poster: string URL for the poster/fallback image.
|
|
14
|
+
* - height: CSS size for hero height (e.g., '220px', '30vh'). Default: '220px'.
|
|
15
|
+
* - title: string | ReactNode, main title text.
|
|
16
|
+
* - subTitle: string | ReactNode, secondary text.
|
|
17
|
+
* - overlayOpacity: number [0..1], darkness of overlay. Default: 0.5.
|
|
18
|
+
* - overlayColor: CSS color of overlay. Default: '#000'.
|
|
19
|
+
* - overlayBlur: CSS blur amount for overlay backdrop. Default: '8px'.
|
|
20
|
+
* - overlayGradient: CSS gradient string for overlay background.
|
|
21
|
+
* - borderRadius: number | string for rounding container. Default: 12.
|
|
22
|
+
* - textColor: CSS color for text. Default: '#fff'.
|
|
23
|
+
* - align: 'center' | 'left' | 'right'. Default: 'center'.
|
|
24
|
+
* - autoPlay, loop, muted, playsInline: booleans for <video>. Defaults true/true/true/true.
|
|
25
|
+
* - objectFit: how the media covers the box. Default: 'cover'.
|
|
26
|
+
* - TitleComponent: optional component to render the title (defaults to GUI.TextTitle or 'h1').
|
|
27
|
+
* - children: extra nodes rendered under the subtitle (e.g., buttons).
|
|
28
|
+
*/
|
|
29
|
+
export default function Hero2({
|
|
30
|
+
videoSrc = '/apps/neurons1.mp4',
|
|
31
|
+
poster,
|
|
32
|
+
height = '220px',
|
|
33
|
+
title = 'Apps',
|
|
34
|
+
subTitle,
|
|
35
|
+
overlayOpacity = 0.5,
|
|
36
|
+
overlayColor = '#000',
|
|
37
|
+
overlayBlur = '8px',
|
|
38
|
+
overlayGradient,
|
|
39
|
+
borderRadius = 8,
|
|
40
|
+
textColor = '#fff',
|
|
41
|
+
align = 'center',
|
|
42
|
+
autoPlay = true,
|
|
43
|
+
loop = true,
|
|
44
|
+
muted = true,
|
|
45
|
+
playsInline = true,
|
|
46
|
+
objectFit = 'cover',
|
|
47
|
+
TitleComponent,
|
|
48
|
+
children,
|
|
49
|
+
}) {
|
|
50
|
+
const Title = TitleComponent || 'h1';
|
|
51
|
+
const alignMap = {
|
|
52
|
+
center: { justifyContent: 'center', alignItems: 'center', textAlign: 'center' },
|
|
53
|
+
left: { justifyContent: 'center', alignItems: 'flex-start', textAlign: 'left', paddingLeft: '1rem' },
|
|
54
|
+
right: { justifyContent: 'center', alignItems: 'flex-end', textAlign: 'right', paddingRight: '1rem' },
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<Box sx={{ position: 'relative', width: '100%', height, overflow: 'hidden', borderRadius, mb: '2rem' }}>
|
|
59
|
+
{/* Background Video */}
|
|
60
|
+
{videoSrc ? (
|
|
61
|
+
<Box component="video"
|
|
62
|
+
autoPlay={autoPlay}
|
|
63
|
+
loop={loop}
|
|
64
|
+
muted={muted}
|
|
65
|
+
playsInline={playsInline}
|
|
66
|
+
poster={poster}
|
|
67
|
+
sx={{ width: '100%', height: '100%', objectFit }}>
|
|
68
|
+
<source src={videoSrc} type="video/mp4" />
|
|
69
|
+
{/* Fallback text */}
|
|
70
|
+
Tu navegador no soporta video.
|
|
71
|
+
</Box>
|
|
72
|
+
) : (
|
|
73
|
+
// If no videoSrc, show poster as background
|
|
74
|
+
<Box sx={{ width: '100%', height: '100%', backgroundImage: poster ? `url(${poster})` : 'none', backgroundSize: 'cover', backgroundPosition: 'center' }} />
|
|
75
|
+
)}
|
|
76
|
+
|
|
77
|
+
{/* Opacity Layer */}
|
|
78
|
+
<Box
|
|
79
|
+
sx={{
|
|
80
|
+
position: 'absolute', inset: 0, pointerEvents: 'none',
|
|
81
|
+
background: overlayGradient || overlayColor,
|
|
82
|
+
opacity: overlayOpacity,
|
|
83
|
+
backdropFilter: `blur(${overlayBlur})`,
|
|
84
|
+
WebkitBackdropFilter: `blur(${overlayBlur})`,
|
|
85
|
+
}}
|
|
86
|
+
/>
|
|
87
|
+
|
|
88
|
+
{/* Foreground Content */}
|
|
89
|
+
<Box sx={{ position: 'absolute', inset: 0, display: 'flex', ...alignMap[align] }}>
|
|
90
|
+
<Box sx={{ color: textColor, textShadow: '0 2px 10px rgba(0,0,0,.6)' }}>
|
|
91
|
+
{title && (
|
|
92
|
+
<Title style={{ margin: 0, fontWeight: 800, fontSize: '2rem' }}>
|
|
93
|
+
{title}
|
|
94
|
+
</Title>
|
|
95
|
+
)}
|
|
96
|
+
{subTitle && (
|
|
97
|
+
<Typography variant="subtitle1" sx={{ mt: 0.5, opacity: 0.9 }}>
|
|
98
|
+
{subTitle}
|
|
99
|
+
</Typography>
|
|
100
|
+
)}
|
|
101
|
+
{children && (
|
|
102
|
+
<Box sx={{ mt: 1.25 }}>
|
|
103
|
+
{children}
|
|
104
|
+
</Box>
|
|
105
|
+
)}
|
|
106
|
+
</Box>
|
|
107
|
+
</Box>
|
|
108
|
+
</Box>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
Hero2.propTypes = {
|
|
113
|
+
videoSrc: PropTypes.string,
|
|
114
|
+
poster: PropTypes.string,
|
|
115
|
+
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
116
|
+
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
117
|
+
subTitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
118
|
+
overlayOpacity: PropTypes.number,
|
|
119
|
+
overlayColor: PropTypes.string,
|
|
120
|
+
overlayBlur: PropTypes.string,
|
|
121
|
+
overlayGradient: PropTypes.string,
|
|
122
|
+
borderRadius: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
123
|
+
textColor: PropTypes.string,
|
|
124
|
+
align: PropTypes.oneOf(['center', 'left', 'right']),
|
|
125
|
+
autoPlay: PropTypes.bool,
|
|
126
|
+
loop: PropTypes.bool,
|
|
127
|
+
muted: PropTypes.bool,
|
|
128
|
+
playsInline: PropTypes.bool,
|
|
129
|
+
objectFit: PropTypes.string,
|
|
130
|
+
TitleComponent: PropTypes.elementType,
|
|
131
|
+
children: PropTypes.node,
|
|
132
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//components/Pages/PageContainer.jsx
|
|
2
|
+
import { Box, useTheme, useMediaQuery } from "@mui/material";
|
|
3
|
+
/**
|
|
4
|
+
* PageContainer
|
|
5
|
+
* Generic content wrapper for page layouts.
|
|
6
|
+
* Provides consistent padding and background only.
|
|
7
|
+
*/
|
|
8
|
+
export default function PageContainer({ children }) {
|
|
9
|
+
const theme = useTheme();
|
|
10
|
+
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
|
|
11
|
+
return (
|
|
12
|
+
<Box
|
|
13
|
+
sx={{
|
|
14
|
+
px: isMobile ? 2 : 3,
|
|
15
|
+
pt: 3,
|
|
16
|
+
maxWidth: "987px",
|
|
17
|
+
minHeight: "100vh",
|
|
18
|
+
display: "flex",
|
|
19
|
+
flexDirection: "column",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
position: "relative",
|
|
22
|
+
backgroundColor: theme.palette.background.default,
|
|
23
|
+
margin: "0 auto"
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
{children}
|
|
27
|
+
</Box>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Divider } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PageDivider Component
|
|
5
|
+
* A standardized divider to visually separate sections or content blocks.
|
|
6
|
+
*
|
|
7
|
+
* Props:
|
|
8
|
+
* - spacing: Adds vertical spacing above and below the divider (default: 2).
|
|
9
|
+
* - variant: MUI Divider variant, e.g., "fullWidth", "middle" (default: "fullWidth").
|
|
10
|
+
*/
|
|
11
|
+
export default function PageDivider({ spacing = 2, variant = "fullWidth" }) {
|
|
12
|
+
return (
|
|
13
|
+
<Divider
|
|
14
|
+
variant={variant}
|
|
15
|
+
sx={{
|
|
16
|
+
my: spacing,
|
|
17
|
+
}}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Box } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Section
|
|
5
|
+
* Minimal container that respects parent width.
|
|
6
|
+
* Controls: width, padding, margins, background color.
|
|
7
|
+
*/
|
|
8
|
+
export default function Section({
|
|
9
|
+
children,
|
|
10
|
+
width = "100%", // toma el ancho del padre por defecto
|
|
11
|
+
padding = 1.6, // padding base (MUI spacing units)
|
|
12
|
+
paddingX, // opcional: override horizontal
|
|
13
|
+
paddingY, // opcional: override vertical
|
|
14
|
+
marginY = 3, // separación vertical por defecto
|
|
15
|
+
marginTop, // override superior
|
|
16
|
+
marginBottom, // override inferior
|
|
17
|
+
bgcolor = "background.paper",
|
|
18
|
+
sx = {},
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
const px = paddingX ?? padding;
|
|
22
|
+
const py = paddingY ?? padding;
|
|
23
|
+
const mt = marginTop ?? marginY;
|
|
24
|
+
const mb = marginBottom ?? marginY;
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<Box
|
|
28
|
+
component="section"
|
|
29
|
+
sx={{
|
|
30
|
+
width,
|
|
31
|
+
px,
|
|
32
|
+
py,
|
|
33
|
+
mt,
|
|
34
|
+
mb,
|
|
35
|
+
bgcolor,
|
|
36
|
+
...sx,
|
|
37
|
+
}}
|
|
38
|
+
{...props}
|
|
39
|
+
>
|
|
40
|
+
{children}
|
|
41
|
+
</Box>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Typography } from "@mui/material";
|
|
2
|
+
/**
|
|
3
|
+
* SectionHeader
|
|
4
|
+
* Heading block to use inside Section (optional).
|
|
5
|
+
*/
|
|
6
|
+
export default function SectionHeader({ title, subtitle, sx = {} }) {
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
{title && (
|
|
10
|
+
<Typography variant="h4" sx={{ fontWeight: 600, mb: subtitle ? 0.5 : 1, ...sx }}>
|
|
11
|
+
{title}
|
|
12
|
+
</Typography>
|
|
13
|
+
)}
|
|
14
|
+
{subtitle && (
|
|
15
|
+
<Typography variant="body2" sx={{ color: "text.secondary", mb: 1 }}>
|
|
16
|
+
{subtitle}
|
|
17
|
+
</Typography>
|
|
18
|
+
)}
|
|
19
|
+
</>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Box, Typography } from "@mui/material";
|
|
2
|
+
/**
|
|
3
|
+
* PageImage Component
|
|
4
|
+
* Displays an image with optional alignment and caption.
|
|
5
|
+
*
|
|
6
|
+
* Props:
|
|
7
|
+
* - src: URL of the image (required).
|
|
8
|
+
* - alt: Alternative text for accessibility (default: "").
|
|
9
|
+
* - align: "left" | "center" | "right" (default: "center").
|
|
10
|
+
* - caption: Optional text displayed below the image.
|
|
11
|
+
* - maxWidth: Maximum width of the image (default: "100%").
|
|
12
|
+
*/
|
|
13
|
+
export default function Img({
|
|
14
|
+
src,
|
|
15
|
+
alt = "",
|
|
16
|
+
align = "center",
|
|
17
|
+
caption,
|
|
18
|
+
maxWidth = "100%",
|
|
19
|
+
}) {
|
|
20
|
+
const justifyContent =
|
|
21
|
+
align === "left"
|
|
22
|
+
? "flex-start"
|
|
23
|
+
: align === "right"
|
|
24
|
+
? "flex-end"
|
|
25
|
+
: "center";
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Box sx={{ display: "flex", flexDirection: "column", alignItems: align }}>
|
|
29
|
+
<Box
|
|
30
|
+
sx={{
|
|
31
|
+
display: "flex",
|
|
32
|
+
justifyContent,
|
|
33
|
+
width: "100%",
|
|
34
|
+
mb: caption ? 1 : 0,
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<img
|
|
38
|
+
src={src}
|
|
39
|
+
alt={alt}
|
|
40
|
+
style={{
|
|
41
|
+
maxWidth,
|
|
42
|
+
height: "auto",
|
|
43
|
+
borderRadius: "4px",
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
</Box>
|
|
47
|
+
{caption && (
|
|
48
|
+
<Typography
|
|
49
|
+
variant="caption"
|
|
50
|
+
color="text.secondary"
|
|
51
|
+
sx={{ textAlign: align }}
|
|
52
|
+
>
|
|
53
|
+
{caption}
|
|
54
|
+
</Typography>
|
|
55
|
+
)}
|
|
56
|
+
</Box>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Box } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PageEmbed Component
|
|
5
|
+
* Embeds external content such as videos, maps, or other iframes with a responsive aspect ratio.
|
|
6
|
+
*
|
|
7
|
+
* Props:
|
|
8
|
+
* - src: The URL of the content to embed (required).
|
|
9
|
+
* - title: Accessible title for the iframe (required for accessibility).
|
|
10
|
+
* - ratio: Aspect ratio of the embed. Accepts "16:9", "4:3", or custom (default: "16:9").
|
|
11
|
+
* - allowFullScreen: Allows fullscreen mode (default: true).
|
|
12
|
+
*/
|
|
13
|
+
export default function VideoEmbed({
|
|
14
|
+
src,
|
|
15
|
+
title,
|
|
16
|
+
ratio = "16:9",
|
|
17
|
+
allowFullScreen = true,
|
|
18
|
+
}) {
|
|
19
|
+
if (!src) return null;
|
|
20
|
+
|
|
21
|
+
const [w, h] = ratio.split(":").map(Number);
|
|
22
|
+
const paddingTop = (h / w) * 100;
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Box
|
|
26
|
+
sx={{
|
|
27
|
+
position: "relative",
|
|
28
|
+
width: "100%",
|
|
29
|
+
paddingTop: `${paddingTop}%`,
|
|
30
|
+
borderRadius: "6px",
|
|
31
|
+
overflow: "hidden",
|
|
32
|
+
boxShadow: 1,
|
|
33
|
+
my: 2,
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
<iframe
|
|
37
|
+
src={src}
|
|
38
|
+
title={title}
|
|
39
|
+
allowFullScreen={allowFullScreen}
|
|
40
|
+
style={{
|
|
41
|
+
position: "absolute",
|
|
42
|
+
top: 0,
|
|
43
|
+
left: 0,
|
|
44
|
+
width: "100%",
|
|
45
|
+
height: "100%",
|
|
46
|
+
border: 0,
|
|
47
|
+
}}
|
|
48
|
+
/>
|
|
49
|
+
</Box>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { List, ListItemButton, ListItemText, Typography } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PageTableOfContents Component
|
|
5
|
+
* Generates a table of contents (TOC) from an array of headings.
|
|
6
|
+
*
|
|
7
|
+
* Props:
|
|
8
|
+
* - headings: Array of objects with { id, text, level }:
|
|
9
|
+
* - id: The anchor or unique identifier (used for scrolling).
|
|
10
|
+
* - text: The heading text to display.
|
|
11
|
+
* - level: Heading level (1, 2, or 3). Used to indent items.
|
|
12
|
+
* - onNavigate: Optional callback when a TOC item is clicked (receives id).
|
|
13
|
+
*/
|
|
14
|
+
export default function TableOfContents({ headings = [], onNavigate }) {
|
|
15
|
+
if (!headings || headings.length === 0) return null;
|
|
16
|
+
|
|
17
|
+
const handleClick = (id) => {
|
|
18
|
+
if (onNavigate) {
|
|
19
|
+
onNavigate(id);
|
|
20
|
+
} else {
|
|
21
|
+
const el = document.getElementById(id);
|
|
22
|
+
if (el) el.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div style={{ padding: "1rem" }}>
|
|
28
|
+
<Typography variant="h6" sx={{ mb: 1 }}>
|
|
29
|
+
Table of Contents
|
|
30
|
+
</Typography>
|
|
31
|
+
<List dense>
|
|
32
|
+
{headings.map((heading, index) => (
|
|
33
|
+
<ListItemButton
|
|
34
|
+
key={index}
|
|
35
|
+
sx={{
|
|
36
|
+
pl: heading.level === 1 ? 1 : heading.level === 2 ? 3 : 5,
|
|
37
|
+
}}
|
|
38
|
+
onClick={() => handleClick(heading.id)}
|
|
39
|
+
>
|
|
40
|
+
<ListItemText
|
|
41
|
+
primaryTypographyProps={{
|
|
42
|
+
variant: heading.level === 1 ? "body1" : "body2",
|
|
43
|
+
}}
|
|
44
|
+
primary={heading.text}
|
|
45
|
+
/>
|
|
46
|
+
</ListItemButton>
|
|
47
|
+
))}
|
|
48
|
+
</List>
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { Tabs as MuiTabs, Tab, Box, Typography } from "@mui/material";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Tabs Component
|
|
6
|
+
* A simple tab system to switch between different content sections.
|
|
7
|
+
*
|
|
8
|
+
* Props:
|
|
9
|
+
* - tabs: Array of objects { label, content } (required).
|
|
10
|
+
* - initialIndex: Index of the tab to show first (default: 0).
|
|
11
|
+
* - variant: Tabs variant ("standard" | "scrollable" | "fullWidth"). Default: "standard".
|
|
12
|
+
*/
|
|
13
|
+
export default function Tabs({ tabs = [], initialIndex = 0, variant = "standard" }) {
|
|
14
|
+
const [value, setValue] = useState(initialIndex);
|
|
15
|
+
|
|
16
|
+
const handleChange = (event, newValue) => {
|
|
17
|
+
setValue(newValue);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
if (!tabs || tabs.length === 0) {
|
|
21
|
+
return <Typography variant="body2">No tabs available.</Typography>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Box sx={{ width: "100%" }}>
|
|
26
|
+
<MuiTabs
|
|
27
|
+
value={value}
|
|
28
|
+
onChange={handleChange}
|
|
29
|
+
variant={variant}
|
|
30
|
+
sx={{ mb: 2 }}
|
|
31
|
+
>
|
|
32
|
+
{tabs.map((tab, index) => (
|
|
33
|
+
<Tab key={index} label={tab.label} />
|
|
34
|
+
))}
|
|
35
|
+
</MuiTabs>
|
|
36
|
+
<Box sx={{ p: 2 }}>
|
|
37
|
+
{tabs[value]?.content || (
|
|
38
|
+
<Typography variant="body2" color="text.secondary">
|
|
39
|
+
No content for this tab.
|
|
40
|
+
</Typography>
|
|
41
|
+
)}
|
|
42
|
+
</Box>
|
|
43
|
+
</Box>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { List, ListItem, ListItemText } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TextList Component
|
|
5
|
+
* Standardized list component for ordered or unordered lists.
|
|
6
|
+
*
|
|
7
|
+
* Props:
|
|
8
|
+
* - items: Array of strings or objects with { primary, secondary } (required).
|
|
9
|
+
* - type: "unordered" | "ordered" (default: "unordered").
|
|
10
|
+
* - dense: Reduces vertical spacing (default: false).
|
|
11
|
+
*/
|
|
12
|
+
export default function PageList({ items = [], type = "unordered", dense = false }) {
|
|
13
|
+
const isOrdered = type === "ordered";
|
|
14
|
+
|
|
15
|
+
if (!items || items.length === 0) return null;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<List
|
|
19
|
+
dense={dense}
|
|
20
|
+
sx={{
|
|
21
|
+
listStyleType: isOrdered ? "decimal" : "disc",
|
|
22
|
+
pl: 3,
|
|
23
|
+
"& .MuiListItem-root": {
|
|
24
|
+
display: "list-item",
|
|
25
|
+
py: dense ? 0.25 : 0.5,
|
|
26
|
+
},
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
{items.map((item, index) => {
|
|
30
|
+
const primary = typeof item === "string" ? item : item.primary;
|
|
31
|
+
const secondary = typeof item === "string" ? null : item.secondary;
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<ListItem key={index}>
|
|
35
|
+
<ListItemText primary={primary} secondary={secondary} />
|
|
36
|
+
</ListItem>
|
|
37
|
+
);
|
|
38
|
+
})}
|
|
39
|
+
</List>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Typography } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TextParagraph Component
|
|
5
|
+
* Standardized paragraph text for pages with consistent spacing and alignment.
|
|
6
|
+
*
|
|
7
|
+
* Props:
|
|
8
|
+
* - children: Text or elements to display as paragraph content.
|
|
9
|
+
* - align: "left" | "center" | "right" | "justify" (default: "left").
|
|
10
|
+
* - variant: MUI Typography variant, e.g., "body1" | "body2" | "caption" (default: "body1").
|
|
11
|
+
* - gutterBottom: Adds bottom spacing (default: true).
|
|
12
|
+
*/
|
|
13
|
+
export default function PageParagraph({
|
|
14
|
+
children,
|
|
15
|
+
align = "left",
|
|
16
|
+
variant = "body1",
|
|
17
|
+
gutterBottom = true,
|
|
18
|
+
}) {
|
|
19
|
+
return (
|
|
20
|
+
<Typography
|
|
21
|
+
variant={variant}
|
|
22
|
+
align={align}
|
|
23
|
+
sx={{ mb: gutterBottom ? 2 : 0 }}
|
|
24
|
+
>
|
|
25
|
+
{children}
|
|
26
|
+
</Typography>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Box, Typography } from "@mui/material";
|
|
2
|
+
import { useTheme } from "@mui/material/styles";
|
|
3
|
+
|
|
4
|
+
export default function TextQuote({ children }) {
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
const isDark = theme.palette.mode === "dark";
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<Box
|
|
10
|
+
component="blockquote"
|
|
11
|
+
sx={{
|
|
12
|
+
borderLeft: `4px solid ${theme.palette.primary.main}`,
|
|
13
|
+
padding: "1rem 1.5rem",
|
|
14
|
+
margin: "1.5rem 0",
|
|
15
|
+
fontStyle: "italic",
|
|
16
|
+
color: theme.palette.text.secondary,
|
|
17
|
+
"& p": { margin: 0 },
|
|
18
|
+
}}
|
|
19
|
+
>
|
|
20
|
+
<Typography variant="body1">{children}</Typography>
|
|
21
|
+
</Box>
|
|
22
|
+
);
|
|
23
|
+
}
|