this.gui 1.0.15 → 1.0.17
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/README.md +178 -49
- package/dist/style.css +1 -1
- package/dist/this-gui.es.js +4645 -1922
- package/dist/this-gui.umd.js +34 -22
- package/package.json +14 -14
- package/src/App.jsx +53 -21
- package/src/Page.jsx +28 -0
- package/src/SiteBuilder.jsx +39 -0
- package/src/example.json +43 -0
- package/src/index.mdx +10 -0
- package/src/main.jsx +11 -14
- package/src/scripts/ComponentRegistry.js +70 -0
- package/src/scripts/postinstall.js +40 -1
- package/src/scripts/renderComponents.js +11 -0
- package/src/stories/Atoms/Alert/Alert.css +196 -14
- package/src/stories/Atoms/Alert/Alert.jsx +43 -28
- package/src/stories/Atoms/Alert/Alert.stories.jsx +154 -28
- package/src/stories/Atoms/Audio/Audio.css +246 -16
- package/src/stories/Atoms/Audio/Audio.jsx +204 -29
- package/src/stories/Atoms/Audio/Audio.stories.jsx +178 -28
- package/src/stories/Atoms/Badge/Badge.css +235 -15
- package/src/stories/Atoms/Badge/Badge.jsx +44 -31
- package/src/stories/Atoms/Badge/Badge.stories.jsx +109 -29
- package/src/stories/Atoms/Button/Button.css +106 -45
- package/src/stories/Atoms/Button/Button.jsx +31 -82
- package/src/stories/Atoms/Button/Button.stories.jsx +170 -40
- package/src/stories/Atoms/Caption/Caption.css +156 -16
- package/src/stories/Atoms/Caption/Caption.jsx +62 -31
- package/src/stories/Atoms/Caption/Caption.stories.jsx +194 -28
- package/src/stories/Atoms/Checkbox/Checkbox.css +168 -15
- package/src/stories/Atoms/Checkbox/Checkbox.jsx +73 -31
- package/src/stories/Atoms/Checkbox/Checkbox.stories.jsx +98 -27
- package/src/stories/Atoms/Container/Container.css +75 -15
- package/src/stories/Atoms/Container/Container.jsx +41 -28
- package/src/stories/Atoms/Container/Container.stories.jsx +92 -29
- package/src/stories/Atoms/Divider/Divider.css +131 -13
- package/src/stories/Atoms/Divider/Divider.jsx +54 -33
- package/src/stories/Atoms/Divider/Divider.stories.jsx +93 -29
- package/src/stories/Atoms/Grid/Grid.css +160 -0
- package/src/stories/Atoms/Grid/Grid.jsx +43 -0
- package/src/stories/Atoms/Grid/Grid.stories.jsx +84 -0
- package/src/stories/Atoms/Heading/Heading.css +99 -16
- package/src/stories/Atoms/Heading/Heading.jsx +57 -29
- package/src/stories/Atoms/Heading/Heading.stories.jsx +117 -28
- package/src/stories/Atoms/Icon/Icon.css +219 -27
- package/src/stories/Atoms/Icon/Icon.jsx +67 -38
- package/src/stories/Atoms/Icon/Icon.stories.jsx +156 -51
- package/src/stories/Atoms/Image/Image.css +231 -15
- package/src/stories/Atoms/Image/Image.jsx +166 -32
- package/src/stories/Atoms/Image/Image.stories.jsx +319 -28
- package/src/stories/Atoms/Label/Label.css +158 -16
- package/src/stories/Atoms/Label/Label.jsx +61 -31
- package/src/stories/Atoms/Label/Label.stories.jsx +167 -28
- package/src/stories/Atoms/Link/Link.css +58 -16
- package/src/stories/Atoms/Link/Link.jsx +73 -32
- package/src/stories/Atoms/Link/Link.stories.jsx +141 -29
- package/src/stories/Atoms/Loader/Loader.css +93 -16
- package/src/stories/Atoms/Loader/Loader.jsx +47 -30
- package/src/stories/Atoms/Loader/Loader.stories.jsx +86 -28
- package/src/stories/Atoms/Logo/Logo.css +94 -0
- package/src/stories/Atoms/Logo/Logo.jsx +53 -0
- package/src/stories/Atoms/Logo/Logo.stories.jsx +120 -0
- package/src/stories/Atoms/Paragraph/Paragraph.css +167 -16
- package/src/stories/Atoms/Paragraph/Paragraph.jsx +67 -31
- package/src/stories/Atoms/Paragraph/Paragraph.stories.jsx +130 -28
- package/src/stories/Atoms/ProgressBar/ProgressBar.css +115 -17
- package/src/stories/Atoms/ProgressBar/ProgressBar.jsx +30 -31
- package/src/stories/Atoms/ProgressBar/ProgressBar.stories.jsx +72 -27
- package/src/stories/Atoms/RadioButton/RadioButton.css +118 -17
- package/src/stories/Atoms/RadioButton/RadioButton.jsx +77 -31
- package/src/stories/Atoms/RadioButton/RadioButton.stories.jsx +99 -27
- package/src/stories/Atoms/Range/Range.css +169 -0
- package/src/stories/Atoms/Range/Range.jsx +87 -0
- package/src/stories/Atoms/Range/Range.stories.jsx +110 -0
- package/src/stories/Atoms/Section/Section.css +268 -0
- package/src/stories/Atoms/Section/Section.jsx +63 -0
- package/src/stories/Atoms/Section/Section.stories.jsx +46 -0
- package/src/stories/Atoms/Select/Select.css +74 -16
- package/src/stories/Atoms/Select/Select.jsx +62 -30
- package/src/stories/Atoms/Select/Select.stories.jsx +95 -27
- package/src/stories/Atoms/Slider/Slider.css +77 -16
- package/src/stories/Atoms/Slider/Slider.jsx +119 -31
- package/src/stories/Atoms/Slider/Slider.stories.jsx +77 -28
- package/src/stories/Atoms/Snackbar/Snackbar.css +297 -13
- package/src/stories/Atoms/Snackbar/Snackbar.jsx +62 -31
- package/src/stories/Atoms/Snackbar/Snackbar.stories.jsx +63 -26
- package/src/stories/Atoms/Spacer/Spacer.css +101 -16
- package/src/stories/Atoms/Spacer/Spacer.jsx +26 -32
- package/src/stories/Atoms/Spacer/Spacer.stories.jsx +50 -30
- package/src/stories/Atoms/Spinner/Spinner.css +97 -16
- package/src/stories/Atoms/Spinner/Spinner.jsx +50 -26
- package/src/stories/Atoms/Spinner/Spinner.stories.jsx +47 -30
- package/src/stories/Atoms/Tag/Tag.css +97 -14
- package/src/stories/Atoms/Tag/Tag.jsx +58 -24
- package/src/stories/Atoms/Tag/Tag.stories.jsx +55 -29
- package/src/stories/Atoms/TextArea/TextArea.css +85 -15
- package/src/stories/Atoms/TextArea/TextArea.jsx +108 -31
- package/src/stories/Atoms/TextArea/TextArea.stories.jsx +25 -30
- package/src/stories/Atoms/TextInput/TextInput.css +90 -17
- package/src/stories/Atoms/TextInput/TextInput.jsx +119 -27
- package/src/stories/Atoms/TextInput/TextInput.stories.jsx +53 -25
- package/src/stories/Atoms/Toggle/Toggle.css +106 -17
- package/src/stories/Atoms/Toggle/Toggle.jsx +56 -28
- package/src/stories/Atoms/Toggle/Toggle.stories.jsx +24 -30
- package/src/stories/Atoms/Tooltip/Tooltip.css +368 -14
- package/src/stories/Atoms/Tooltip/Tooltip.jsx +33 -28
- package/src/stories/Atoms/Tooltip/Tooltip.stories.jsx +42 -31
- package/src/stories/Atoms/Video/Video.css +28 -18
- package/src/stories/Atoms/Video/Video.jsx +66 -29
- package/src/stories/Atoms/Video/Video.stories.jsx +30 -30
- package/src/stories/Atoms/index.js +9 -2
- package/src/stories/Atoms/meta_Atoms.js +6 -1
- package/src/stories/Layouts/Accordion/Accordion.css +293 -0
- package/src/stories/Layouts/Accordion/Accordion.jsx +74 -0
- package/src/stories/Layouts/Accordion/Accordion.stories.jsx +39 -0
- package/src/stories/Layouts/Flexbox/Flexbox.css +16 -0
- package/src/stories/Layouts/Flexbox/Flexbox.jsx +11 -0
- package/src/stories/Layouts/Flexbox/Flexbox.stories.jsx +28 -0
- package/src/stories/Layouts/Footer/Footer.css +16 -0
- package/src/stories/Layouts/Footer/Footer.jsx +31 -0
- package/src/stories/Layouts/Footer/Footer.stories.jsx +28 -0
- package/src/stories/Layouts/Header/Header.css +16 -0
- package/src/stories/Layouts/Header/Header.jsx +31 -0
- package/src/stories/Layouts/Header/Header.stories.jsx +28 -0
- package/src/stories/Layouts/HeroBanner/HeroBanner.css +16 -0
- package/src/stories/Layouts/HeroBanner/HeroBanner.jsx +31 -0
- package/src/stories/Layouts/HeroBanner/HeroBanner.stories.jsx +28 -0
- package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.css +16 -0
- package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.jsx +31 -0
- package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.stories.jsx +28 -0
- package/src/stories/Layouts/Pagination/Pagination.css +16 -0
- package/src/stories/Layouts/Pagination/Pagination.jsx +31 -0
- package/src/stories/Layouts/Pagination/Pagination.stories.jsx +28 -0
- package/src/stories/Layouts/Sidebar/Sidebar.css +16 -0
- package/src/stories/Layouts/Sidebar/Sidebar.jsx +71 -0
- package/src/stories/Layouts/Sidebar/Sidebar.stories.jsx +28 -0
- package/src/stories/Layouts/Tabs/Tabs.css +16 -0
- package/src/stories/Layouts/Tabs/Tabs.jsx +31 -0
- package/src/stories/Layouts/Tabs/Tabs.stories.jsx +28 -0
- package/src/stories/Layouts/index.js +25 -0
- package/src/stories/Layouts/meta_Layouts.js +28 -0
- package/src/stories/Molecules/Accordion/Accordion.css +1 -1
- package/src/stories/Molecules/Accordion/Accordion.jsx +1 -1
- package/src/stories/Molecules/Accordion/Accordion.stories.jsx +1 -1
- package/src/stories/Molecules/AudioPlayer/AudioPlayer.css +95 -2
- package/src/stories/Molecules/AudioPlayer/AudioPlayer.jsx +232 -13
- package/src/stories/Molecules/AudioPlayer/AudioPlayer.stories.jsx +46 -11
- package/src/stories/Molecules/AvatarWithName/AvatarWithName.css +128 -2
- package/src/stories/Molecules/AvatarWithName/AvatarWithName.jsx +69 -14
- package/src/stories/Molecules/AvatarWithName/AvatarWithName.stories.jsx +12 -12
- package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.css +145 -2
- package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.jsx +39 -13
- package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.stories.jsx +27 -11
- package/src/stories/Molecules/ButtonGroup/ButtonGroup.css +463 -2
- package/src/stories/Molecules/ButtonGroup/ButtonGroup.jsx +34 -12
- package/src/stories/Molecules/ButtonGroup/ButtonGroup.stories.jsx +36 -12
- package/src/stories/Molecules/Card/Card.css +39 -2
- package/src/stories/Molecules/Card/Card.jsx +80 -13
- package/src/stories/Molecules/Card/Card.stories.jsx +27 -13
- package/src/stories/Molecules/ComparisonTable/ComparisonTable.css +33 -2
- package/src/stories/Molecules/ComparisonTable/ComparisonTable.jsx +91 -12
- package/src/stories/Molecules/ComparisonTable/ComparisonTable.stories.jsx +73 -12
- package/src/stories/Molecules/Dropdown/Dropdown.css +192 -0
- package/src/stories/Molecules/Dropdown/Dropdown.jsx +96 -0
- package/src/stories/Molecules/Dropdown/Dropdown.stories.jsx +45 -0
- package/src/stories/Molecules/Navbar/Navbar.css +63 -59
- package/src/stories/Molecules/Navbar/Navbar.jsx +43 -48
- package/src/stories/Molecules/Navbar/Navbar.stories.jsx +58 -8
- package/src/stories/Molecules/SearchBar/SearchBar.css +66 -1
- package/src/stories/Molecules/SearchBar/SearchBar.jsx +59 -11
- package/src/stories/Molecules/SearchBar/SearchBar.stories.jsx +16 -7
- package/src/stories/Molecules/SelectTheme/SelectTheme.jsx +16 -38
- package/src/stories/Molecules/SelectTheme/SelectTheme.stories.jsx +1 -2
- package/src/stories/Molecules/Sidebar/Sidebar.css +65 -2
- package/src/stories/Molecules/Sidebar/Sidebar.jsx +66 -11
- package/src/stories/Molecules/Sidebar/Sidebar.stories.jsx +20 -5
- package/src/stories/Molecules/index.js +2 -1
- package/src/stories/Molecules/{Molecules.js → meta_Molecules.js} +6 -3
- package/src/stories/Templates/AdminDashboard/AdminDashboard.css +7 -0
- package/src/stories/Templates/AdminDashboard/AdminDashboard.jsx +24 -0
- package/src/stories/Templates/AdminDashboard/AdminDashboard.stories.jsx +20 -0
- package/src/stories/Templates/CallToAction/CallToAction.css +7 -0
- package/src/stories/Templates/CallToAction/CallToAction.jsx +24 -0
- package/src/stories/Templates/CallToAction/CallToAction.stories.jsx +20 -0
- package/src/stories/Templates/FeaturesList/FeaturesList.css +7 -0
- package/src/stories/Templates/FeaturesList/FeaturesList.jsx +24 -0
- package/src/stories/Templates/FeaturesList/FeaturesList.stories.jsx +20 -0
- package/src/stories/Templates/FormSection/FormSection.css +7 -0
- package/src/stories/Templates/FormSection/FormSection.jsx +24 -0
- package/src/stories/Templates/FormSection/FormSection.stories.jsx +20 -0
- package/src/stories/Templates/HeroSection/HeroSection.css +7 -0
- package/src/stories/Templates/HeroSection/HeroSection.jsx +24 -0
- package/src/stories/Templates/HeroSection/HeroSection.stories.jsx +20 -0
- package/src/stories/Templates/LocationInfo/LocationInfo.css +7 -0
- package/src/stories/Templates/LocationInfo/LocationInfo.jsx +24 -0
- package/src/stories/Templates/LocationInfo/LocationInfo.stories.jsx +20 -0
- package/src/stories/Templates/ProductPage/ProductPage.css +7 -0
- package/src/stories/Templates/ProductPage/ProductPage.jsx +24 -0
- package/src/stories/Templates/ProductPage/ProductPage.stories.jsx +20 -0
- package/src/stories/Templates/RegistrationPage/RegistrationPage.css +7 -0
- package/src/stories/Templates/RegistrationPage/RegistrationPage.jsx +24 -0
- package/src/stories/Templates/RegistrationPage/RegistrationPage.stories.jsx +20 -0
- package/src/stories/Templates/ShoppingCart/ShoppingCart.css +7 -0
- package/src/stories/Templates/ShoppingCart/ShoppingCart.jsx +24 -0
- package/src/stories/Templates/ShoppingCart/ShoppingCart.stories.jsx +20 -0
- package/src/stories/Templates/SidebarTopNav/SidebarTopNav.css +7 -0
- package/src/stories/Templates/SidebarTopNav/SidebarTopNav.jsx +24 -0
- package/src/stories/Templates/SidebarTopNav/SidebarTopNav.stories.jsx +20 -0
- package/src/stories/Templates/SignInPage/SignInPage.css +7 -0
- package/src/stories/Templates/SignInPage/SignInPage.jsx +24 -0
- package/src/stories/Templates/SignInPage/SignInPage.stories.jsx +20 -0
- package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.css +7 -0
- package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.jsx +24 -0
- package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.stories.jsx +20 -0
- package/src/stories/Templates/Testimonials/Testimonials.css +7 -0
- package/src/stories/Templates/Testimonials/Testimonials.jsx +24 -0
- package/src/stories/Templates/Testimonials/Testimonials.stories.jsx +20 -0
- package/src/stories/Templates/index.js +33 -0
- package/src/stories/Templates/{Templates.js → meta_Templates.js} +3 -1
- package/src/stories/assets/logo.png +0 -0
- package/src/stories/assets/logo.svg +106 -0
- package/src/stories/assets/test.svg +3 -0
- package/src/themes/README_Styles.md +301 -0
- package/src/themes/ThemeProvider.jsx +47 -22
- package/src/themes/styles/dracula/dark.css +0 -0
- package/src/themes/styles/dracula/light.css +0 -0
- package/src/themes/styles/github/dark.css +0 -0
- package/src/themes/styles/github/light.css +0 -0
- package/src/themes/styles/neurons/dark.css +247 -0
- package/src/themes/styles/neurons/light.css +280 -0
- package/dist/Styles.md +0 -446
- package/dist/context.md +0 -942
- package/dist/github-3688a83a.js +0 -5
- package/dist/gothic-94a7ecd6.js +0 -5
- package/dist/newsprint-32bf94d9.js +0 -5
- package/dist/night-4a954853.js +0 -5
- package/dist/pixyll-94de4610.js +0 -5
- package/dist/whitey-db68723e.js +0 -5
- package/src/MDXEditor.jsx +0 -32
- package/src/Theme.jsx +0 -28
- package/src/components/CodeBlock.jsx +0 -22
- package/src/components/ComponentFactory.jsx +0 -36
- package/src/components/ComponentRegistry.js +0 -21
- package/src/scripts/generateComponents.js +0 -166
- package/src/scripts/verifyMolecules.js +0 -158
- package/src/scripts/verify_and_install_atoms.js +0 -211
- package/src/stories/Atoms/RangeInput/RangeInput.css +0 -29
- package/src/stories/Atoms/RangeInput/RangeInput.jsx +0 -41
- package/src/stories/Atoms/RangeInput/RangeInput.stories.jsx +0 -41
- package/src/stories/Components.md +0 -189
- package/src/stories/Layouts/Grid/Grid.css +0 -4
- package/src/stories/Layouts/Grid/Grid.jsx +0 -15
- package/src/stories/Layouts/Grid/Grid.stories.jsx +0 -26
- package/src/stories/Layouts/Layout.js +0 -28
- package/src/styles/Header.modules.css +0 -32
- package/src/styles/global.css +0 -59
- package/src/themes/Themes.js +0 -44
- package/src/themes/dark.js +0 -22
- package/src/themes/light.js +0 -22
- package/src/themes/typ/Readme.md +0 -4
- package/src/themes/typ/github/open-sans-v17-latin-ext_latin-700.woff2 +0 -0
- package/src/themes/typ/github/open-sans-v17-latin-ext_latin-700italic.woff2 +0 -0
- package/src/themes/typ/github/open-sans-v17-latin-ext_latin-italic.woff2 +0 -0
- package/src/themes/typ/github/open-sans-v17-latin-ext_latin-regular.woff2 +0 -0
- package/src/themes/typ/github.css +0 -416
- package/src/themes/typ/gothic/GUST e-foundry License.txt +0 -29
- package/src/themes/typ/gothic/didact-gothic-c-ext.woff2 +0 -0
- package/src/themes/typ/gothic/didact-gothic-c.woff2 +0 -0
- package/src/themes/typ/gothic/texgyreadventor-bold.woff +0 -0
- package/src/themes/typ/gothic/texgyreadventor-bolditalic.woff +0 -0
- package/src/themes/typ/gothic/texgyreadventor-italic.woff +0 -0
- package/src/themes/typ/gothic/texgyreadventor-regular.woff +0 -0
- package/src/themes/typ/gothic.css +0 -410
- package/src/themes/typ/newsprint/pt-serif-v11-latin-700.woff2 +0 -0
- package/src/themes/typ/newsprint/pt-serif-v11-latin-700italic.woff2 +0 -0
- package/src/themes/typ/newsprint/pt-serif-v11-latin-italic.woff2 +0 -0
- package/src/themes/typ/newsprint/pt-serif-v11-latin-regular.woff2 +0 -0
- package/src/themes/typ/newsprint.css +0 -622
- package/src/themes/typ/night/codeblock.dark.css +0 -113
- package/src/themes/typ/night/credit.html +0 -1
- package/src/themes/typ/night/cursor.png +0 -0
- package/src/themes/typ/night/cursor@2x.png +0 -0
- package/src/themes/typ/night/mermaid.dark.css +0 -7
- package/src/themes/typ/night/sourcemode.dark.css +0 -38
- package/src/themes/typ/night.css +0 -1032
- package/src/themes/typ/pixyll/lato-v14-latin-300.woff +0 -0
- package/src/themes/typ/pixyll/lato-v14-latin-300italic.woff +0 -0
- package/src/themes/typ/pixyll/lato-v14-latin-900.woff +0 -0
- package/src/themes/typ/pixyll/lato-v14-latin-900italic.woff +0 -0
- package/src/themes/typ/pixyll/merriweather-v19-latin-300.woff +0 -0
- package/src/themes/typ/pixyll/merriweather-v19-latin-300italic.woff +0 -0
- package/src/themes/typ/pixyll/merriweather-v19-latin-700.woff +0 -0
- package/src/themes/typ/pixyll/merriweather-v19-latin-700italic.woff +0 -0
- package/src/themes/typ/pixyll.css +0 -528
- package/src/themes/typ/whitey.css +0 -299
- /package/src/stories/Organisms/{Organisms.js → meta_Organisms.js} +0 -0
package/README.md
CHANGED
|
@@ -1,76 +1,205 @@
|
|
|
1
1
|
<img src="https://suign.github.io/assets/imgs/this_GUI.svg" alt="Cleaker Me" width="377" height="377">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
# **THIS.GUI**
|
|
6
|
+
|
|
7
|
+
**this.GUI** aims to automate the **GUI** generation process by allowing users to pass data or configurations. It then dynamically builds the UI based on these inputs. This package exports pre-defined components, theme providers, MDX integration, and a Site/App builder for rapid prototyping and deployment.
|
|
8
|
+
|
|
9
|
+
#### **Installation & Setup**
|
|
10
|
+
|
|
11
|
+
Install this.gui via **npm**:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
12
14
|
npm install this.gui
|
|
13
15
|
```
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
|
|
17
|
+
After installation, you can start the development server using:
|
|
18
|
+
|
|
19
|
+
```bas
|
|
16
20
|
npm start
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This command will initialize the app, allowing you to use the **Site Builder** and **Component Library**.
|
|
24
|
+
|
|
25
|
+
#### **Key Features**
|
|
26
|
+
|
|
27
|
+
**1. Pre-built Components**
|
|
28
|
+
|
|
29
|
+
• **Atoms**: Smallest building blocks like buttons, inputs, text elements, etc.
|
|
30
|
+
|
|
31
|
+
• **Molecules**: Combinations of atoms to form reusable UI elements like cards, forms, tables, etc.
|
|
32
|
+
|
|
33
|
+
• **Organisms**: More complex components that combine multiple molecules.
|
|
34
|
+
|
|
35
|
+
• **Layouts & Templates**: Predefined page structures that can be customized using the JSON configuration.
|
|
36
|
+
|
|
37
|
+
#### **2. MDX & Theme Providers**
|
|
38
|
+
|
|
39
|
+
• MDX integration for dynamic content rendering.
|
|
40
|
+
|
|
41
|
+
• Easy-to-use theme providers for switching between light and dark modes.
|
|
42
|
+
|
|
43
|
+
#### **3. Site & App Builder**
|
|
44
|
+
|
|
45
|
+
• Drag-and-drop interface for building entire pages or applications.
|
|
46
|
+
|
|
47
|
+
• Generates JSON configuration that maps to your UI structure.
|
|
48
|
+
|
|
49
|
+
• The JSON-based UI renderer automatically handles rendering of components based on the passed configuration.
|
|
50
|
+
|
|
51
|
+
**Getting Started**
|
|
52
|
+
|
|
53
|
+
Here’s a quick overview of how to use **this.GUI** in your project.
|
|
54
|
+
|
|
55
|
+
**1. Direct JSX Usage**
|
|
56
|
+
|
|
57
|
+
The **index.js** file allows you to import and use pre-built components directly in your JSX/JS files.
|
|
58
|
+
|
|
59
|
+
```jsx
|
|
60
|
+
import { Button, TextInput } from 'this.gui/Atoms';
|
|
17
61
|
|
|
62
|
+
function MyComponent() {
|
|
63
|
+
return (
|
|
64
|
+
<div>
|
|
65
|
+
<Button label="Click Me" color="primary" />
|
|
66
|
+
<TextInput placeholder="Enter text" />
|
|
67
|
+
</div>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
18
70
|
```
|
|
19
|
-
a. Export Pre-built Components
|
|
20
|
-
Components are categorized (Atoms, Molecules, etc.) and are exportable so users can easily import them into their MDX files or directly in their React components.
|
|
21
71
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
72
|
+
**2. Dynamic UI via JSON**
|
|
73
|
+
|
|
74
|
+
Use the **ComponentRegistry** and **renderComponent** function to build dynamic UIs from JSON configurations.
|
|
75
|
+
|
|
76
|
+
Example JSON:
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"layout": [
|
|
81
|
+
{
|
|
82
|
+
"type": "Button",
|
|
83
|
+
"props": { "label": "Click Me", "color": "primary" }
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "Heading",
|
|
87
|
+
"props": { "text": "Welcome to Our Site", "level": 1 }
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Rendering the above JSON with **this.GUI**:
|
|
94
|
+
|
|
95
|
+
```jsx
|
|
96
|
+
import React from 'react';
|
|
97
|
+
import { Page } from 'this.gui/Page';
|
|
98
|
+
|
|
99
|
+
const config = {
|
|
100
|
+
layout: [
|
|
101
|
+
{ type: 'Button', props: { label: 'Click Me', color: 'primary' } },
|
|
102
|
+
{ type: 'Heading', props: { text: 'Welcome to Our Site', level: 1 } }
|
|
103
|
+
]
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
function App() {
|
|
107
|
+
return <Page config={config} />;
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**3. Component Registry & JSON Mapping**
|
|
112
|
+
|
|
113
|
+
**ComponentRegistry** maps JSON keys to the corresponding React components. This allows dynamic rendering of components via JSON without directly importing each component.
|
|
114
|
+
|
|
115
|
+
```jsx
|
|
116
|
+
const ComponentRegistry = {
|
|
117
|
+
Button: Atoms.Button,
|
|
118
|
+
Heading: Atoms.Heading,
|
|
119
|
+
Paragraph: Atoms.Paragraph,
|
|
120
|
+
*// More mappings...*
|
|
121
|
+
};
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Component Categories**
|
|
125
|
+
|
|
126
|
+
• **Atoms**: Small, reusable components like Buttons, Inputs, Paragraphs.
|
|
127
|
+
|
|
128
|
+
• Examples: Button, TextInput, Paragraph, Image, Icon, etc.
|
|
129
|
+
|
|
130
|
+
• **Molecules**: Components that combine multiple atoms.
|
|
131
|
+
|
|
132
|
+
• Examples: Card, Navbar, Breadcrumbs, FormField, AudioPlayer, etc.
|
|
25
133
|
|
|
26
|
-
• **
|
|
27
|
-
Accordion, AudioPlayer, AvatarWithName, Breadcrumbs, ButtonGroup, Card, ComparisonTable, DataTable, FileUpload, FormField, Header, IconButton, ImageWithCaption, InputGroup, InputWithLabel, List, MediaCard, Modal, Navbar, Notification, PricingTable, SearchBar, Sidebar, VideoWithDescription.
|
|
134
|
+
• **Organisms**: More complex components combining multiple molecules.
|
|
28
135
|
|
|
29
|
-
•
|
|
30
|
-
• **Layout**: Components related to structuring and organizing content across the page.
|
|
31
|
-
• **Templates**: Layouts of full pages, combining organisms and layout components.
|
|
32
|
-
• **Pages**: Complete and functional pages made up of templates and content.
|
|
33
|
-
• **Miscellaneous**: Utility components that don’t fit into the above categories but provide important functions, such as popovers, overlays, and media controls.
|
|
136
|
+
• Examples: LoginForm, SidebarLayout, etc.
|
|
34
137
|
|
|
35
|
-
|
|
138
|
+
• **Layouts & Templates**: Complete page structures.
|
|
36
139
|
|
|
140
|
+
• Examples: TwoColumnLayout, LandingPageTemplate, etc.
|
|
37
141
|
|
|
38
|
-
├── /GUI # Dedicated directory for GUI components and MDX pages
|
|
39
|
-
│ ├── /components # Custom components created by the user
|
|
40
|
-
│ ├── /mdx # MDX files defining pages and content using components
|
|
41
|
-
│ └── /styles # Custom styles for components (optional)
|
|
42
142
|
|
|
43
|
-
Breakdown of Each Subdirectory:
|
|
44
|
-
/components:
|
|
45
|
-
This is where users build their custom React components. They can create new components, extend existing ones from this.GUI, or modify them as needed. These components can then be used throughout the MDX files.
|
|
46
143
|
|
|
47
|
-
|
|
48
|
-
This folder is used to store MDX files that act as pages or sections of the application. Users can import and use components from the /components folder or from the generic set provided by this.GUI. This allows for a highly modular and customizable interface creation.
|
|
144
|
+
**Key Components**
|
|
49
145
|
|
|
50
|
-
|
|
51
|
-
This optional directory can be used for custom CSS or style files that modify the look and feel of the components and layouts. Users can define global styles, component-specific styles, or themes to match their brand.
|
|
146
|
+
1. **Component Registry**
|
|
52
147
|
|
|
53
|
-
|
|
54
|
-
Install this.GUI:
|
|
55
|
-
npm install this.GUI will automatically set up the /GUI directory with the necessary subdirectories.
|
|
148
|
+
• Maps JSON keys to components for dynamic rendering.
|
|
56
149
|
|
|
57
|
-
|
|
58
|
-
Users can start creating their own components in /components, using the provided components as a base or inspiration.
|
|
150
|
+
2. **JSON Configuration Files**
|
|
59
151
|
|
|
60
|
-
|
|
61
|
-
|
|
152
|
+
• Define the layout and structure of your UI in JSON.
|
|
153
|
+
|
|
154
|
+
3. **Rendering Engine**
|
|
155
|
+
|
|
156
|
+
• Reads the JSON configuration and renders the appropriate components dynamically.
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
**Example Usage**
|
|
161
|
+
|
|
162
|
+
Here’s an example that showcases how to use the JSON configuration for rendering a dynamic UI.
|
|
163
|
+
|
|
164
|
+
```json
|
|
165
|
+
{
|
|
166
|
+
"layout": [
|
|
167
|
+
{
|
|
168
|
+
"type": "Card",
|
|
169
|
+
"props": { "variant": "solid", "color": "primary-color", "width": "300px" },
|
|
170
|
+
"children": [
|
|
171
|
+
{
|
|
172
|
+
"type": "Paragraph",
|
|
173
|
+
"props": { "text": "Welcome to our site!" }
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
You can pass this JSON configuration to the Page component to render the UI dynamically:
|
|
184
|
+
|
|
185
|
+
```jsx
|
|
186
|
+
import { Page } from 'this.gui/Page';
|
|
187
|
+
import config from './config.json'; *// Import the JSON configuration*
|
|
188
|
+
|
|
189
|
+
function App() {
|
|
190
|
+
return <Page config={config} />;
|
|
191
|
+
}
|
|
192
|
+
```
|
|
62
193
|
|
|
63
|
-
|
|
64
|
-
Any additional styling or theming can be managed in the /styles directory, keeping design consistent and organized.
|
|
194
|
+
**Additional Resources**
|
|
65
195
|
|
|
66
|
-
|
|
67
|
-
Users run their main app using their existing development setup, and the MDX files will render the React components, effectively creating the desired GUI.
|
|
196
|
+
• **Storybook**: For browsing and testing all pre-built components. Launch Storybook with:
|
|
68
197
|
|
|
69
|
-
|
|
70
|
-
Once development is complete, the GUI directory can be built into a dist folder, packaging the components, pages, and styles for deployment or distribution.
|
|
198
|
+
npm run storybook
|
|
71
199
|
|
|
72
|
-
|
|
200
|
+
•**MDX Editor**: Edit and visualize MDX content in real time.
|
|
73
201
|
|
|
202
|
+
**this.GUI** is part of the **Neurons.me** ecosystem, a set of modular data structures designed to work together across multiple domains.
|
|
74
203
|
|
|
75
204
|
# About All.This
|
|
76
205
|
###### Modular Data Structures
|