this.gui 1.0.12 → 1.0.14

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.
Files changed (266) hide show
  1. package/package.json +5 -2
  2. package/src/App.jsx +31 -0
  3. package/src/MDXEditor.jsx +32 -0
  4. package/src/MdxProvider.jsx +20 -0
  5. package/src/Theme.jsx +28 -0
  6. package/src/components/CodeBlock.jsx +22 -0
  7. package/src/components/ComponentFactory.jsx +36 -0
  8. package/src/components/ComponentRegistry.js +21 -0
  9. package/src/index.mdx +154 -0
  10. package/src/main.jsx +18 -0
  11. package/src/scripts/generateComponents.js +166 -0
  12. package/src/scripts/logASCIIArt.js +12 -0
  13. package/src/scripts/postinstall.js +64 -0
  14. package/src/scripts/verifyMolecules.js +158 -0
  15. package/src/scripts/verify_and_install_atoms.js +211 -0
  16. package/src/stories/Atoms/Alert/Alert.css +29 -0
  17. package/src/stories/Atoms/Alert/Alert.jsx +41 -0
  18. package/src/stories/Atoms/Alert/Alert.stories.jsx +41 -0
  19. package/src/stories/Atoms/Audio/Audio.css +29 -0
  20. package/src/stories/Atoms/Audio/Audio.jsx +41 -0
  21. package/src/stories/Atoms/Audio/Audio.stories.jsx +41 -0
  22. package/src/stories/Atoms/Badge/Badge.css +29 -0
  23. package/src/stories/Atoms/Badge/Badge.jsx +41 -0
  24. package/src/stories/Atoms/Badge/Badge.stories.jsx +41 -0
  25. package/src/stories/Atoms/Button/Button.css +70 -0
  26. package/src/stories/Atoms/Button/Button.jsx +98 -0
  27. package/src/stories/Atoms/Button/Button.stories.jsx +54 -0
  28. package/src/stories/Atoms/Caption/Caption.css +29 -0
  29. package/src/stories/Atoms/Caption/Caption.jsx +41 -0
  30. package/src/stories/Atoms/Caption/Caption.stories.jsx +41 -0
  31. package/src/stories/Atoms/Checkbox/Checkbox.css +29 -0
  32. package/src/stories/Atoms/Checkbox/Checkbox.jsx +41 -0
  33. package/src/stories/Atoms/Checkbox/Checkbox.stories.jsx +41 -0
  34. package/src/stories/Atoms/Container/Container.css +29 -0
  35. package/src/stories/Atoms/Container/Container.jsx +41 -0
  36. package/src/stories/Atoms/Container/Container.stories.jsx +41 -0
  37. package/src/stories/Atoms/Divider/Divider.css +29 -0
  38. package/src/stories/Atoms/Divider/Divider.jsx +41 -0
  39. package/src/stories/Atoms/Divider/Divider.stories.jsx +41 -0
  40. package/src/stories/Atoms/Heading/Heading.css +29 -0
  41. package/src/stories/Atoms/Heading/Heading.jsx +41 -0
  42. package/src/stories/Atoms/Heading/Heading.stories.jsx +41 -0
  43. package/src/stories/Atoms/Icon/Icon.css +48 -0
  44. package/src/stories/Atoms/Icon/Icon.jsx +51 -0
  45. package/src/stories/Atoms/Icon/Icon.stories.jsx +72 -0
  46. package/src/stories/Atoms/Image/Image.css +29 -0
  47. package/src/stories/Atoms/Image/Image.jsx +41 -0
  48. package/src/stories/Atoms/Image/Image.stories.jsx +41 -0
  49. package/src/stories/Atoms/Label/Label.css +29 -0
  50. package/src/stories/Atoms/Label/Label.jsx +41 -0
  51. package/src/stories/Atoms/Label/Label.stories.jsx +41 -0
  52. package/src/stories/Atoms/Link/Link.css +29 -0
  53. package/src/stories/Atoms/Link/Link.jsx +41 -0
  54. package/src/stories/Atoms/Link/Link.stories.jsx +41 -0
  55. package/src/stories/Atoms/Loader/Loader.css +29 -0
  56. package/src/stories/Atoms/Loader/Loader.jsx +41 -0
  57. package/src/stories/Atoms/Loader/Loader.stories.jsx +41 -0
  58. package/src/stories/Atoms/Paragraph/Paragraph.css +29 -0
  59. package/src/stories/Atoms/Paragraph/Paragraph.jsx +41 -0
  60. package/src/stories/Atoms/Paragraph/Paragraph.stories.jsx +41 -0
  61. package/src/stories/Atoms/ProgressBar/ProgressBar.css +29 -0
  62. package/src/stories/Atoms/ProgressBar/ProgressBar.jsx +41 -0
  63. package/src/stories/Atoms/ProgressBar/ProgressBar.stories.jsx +41 -0
  64. package/src/stories/Atoms/RadioButton/RadioButton.css +29 -0
  65. package/src/stories/Atoms/RadioButton/RadioButton.jsx +41 -0
  66. package/src/stories/Atoms/RadioButton/RadioButton.stories.jsx +41 -0
  67. package/src/stories/Atoms/RangeInput/RangeInput.css +29 -0
  68. package/src/stories/Atoms/RangeInput/RangeInput.jsx +41 -0
  69. package/src/stories/Atoms/RangeInput/RangeInput.stories.jsx +41 -0
  70. package/src/stories/Atoms/Select/Select.css +29 -0
  71. package/src/stories/Atoms/Select/Select.jsx +41 -0
  72. package/src/stories/Atoms/Select/Select.stories.jsx +41 -0
  73. package/src/stories/Atoms/Slider/Slider.css +29 -0
  74. package/src/stories/Atoms/Slider/Slider.jsx +41 -0
  75. package/src/stories/Atoms/Slider/Slider.stories.jsx +41 -0
  76. package/src/stories/Atoms/Snackbar/Snackbar.css +29 -0
  77. package/src/stories/Atoms/Snackbar/Snackbar.jsx +41 -0
  78. package/src/stories/Atoms/Snackbar/Snackbar.stories.jsx +41 -0
  79. package/src/stories/Atoms/Spacer/Spacer.css +29 -0
  80. package/src/stories/Atoms/Spacer/Spacer.jsx +41 -0
  81. package/src/stories/Atoms/Spacer/Spacer.stories.jsx +41 -0
  82. package/src/stories/Atoms/Spinner/Spinner.css +29 -0
  83. package/src/stories/Atoms/Spinner/Spinner.jsx +41 -0
  84. package/src/stories/Atoms/Spinner/Spinner.stories.jsx +41 -0
  85. package/src/stories/Atoms/Tag/Tag.css +29 -0
  86. package/src/stories/Atoms/Tag/Tag.jsx +41 -0
  87. package/src/stories/Atoms/Tag/Tag.stories.jsx +41 -0
  88. package/src/stories/Atoms/TextArea/TextArea.css +29 -0
  89. package/src/stories/Atoms/TextArea/TextArea.jsx +41 -0
  90. package/src/stories/Atoms/TextArea/TextArea.stories.jsx +41 -0
  91. package/src/stories/Atoms/TextInput/TextInput.css +29 -0
  92. package/src/stories/Atoms/TextInput/TextInput.jsx +41 -0
  93. package/src/stories/Atoms/TextInput/TextInput.stories.jsx +41 -0
  94. package/src/stories/Atoms/Toggle/Toggle.css +29 -0
  95. package/src/stories/Atoms/Toggle/Toggle.jsx +41 -0
  96. package/src/stories/Atoms/Toggle/Toggle.stories.jsx +41 -0
  97. package/src/stories/Atoms/Tooltip/Tooltip.css +29 -0
  98. package/src/stories/Atoms/Tooltip/Tooltip.jsx +41 -0
  99. package/src/stories/Atoms/Tooltip/Tooltip.stories.jsx +41 -0
  100. package/src/stories/Atoms/Video/Video.css +29 -0
  101. package/src/stories/Atoms/Video/Video.jsx +41 -0
  102. package/src/stories/Atoms/Video/Video.stories.jsx +41 -0
  103. package/src/stories/Atoms/index.js +65 -0
  104. package/src/stories/Atoms/meta_Atoms.js +46 -0
  105. package/src/stories/Components.js +198 -0
  106. package/src/stories/Components.md +189 -0
  107. package/src/stories/Getting Started.mdx +239 -0
  108. package/src/stories/Layouts/Grid/Grid.css +4 -0
  109. package/src/stories/Layouts/Grid/Grid.jsx +15 -0
  110. package/src/stories/Layouts/Grid/Grid.stories.jsx +26 -0
  111. package/src/stories/Layouts/Layout.js +28 -0
  112. package/src/stories/MDX.mdx +118 -0
  113. package/src/stories/Miscellaneous/Miscellaneous.js +24 -0
  114. package/src/stories/Molecules/Accordion/Accordion.css +4 -0
  115. package/src/stories/Molecules/Accordion/Accordion.jsx +25 -0
  116. package/src/stories/Molecules/Accordion/Accordion.stories.jsx +20 -0
  117. package/src/stories/Molecules/AudioPlayer/AudioPlayer.css +4 -0
  118. package/src/stories/Molecules/AudioPlayer/AudioPlayer.jsx +25 -0
  119. package/src/stories/Molecules/AudioPlayer/AudioPlayer.stories.jsx +20 -0
  120. package/src/stories/Molecules/AvatarWithName/AvatarWithName.css +4 -0
  121. package/src/stories/Molecules/AvatarWithName/AvatarWithName.jsx +25 -0
  122. package/src/stories/Molecules/AvatarWithName/AvatarWithName.stories.jsx +20 -0
  123. package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.css +4 -0
  124. package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.jsx +25 -0
  125. package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.stories.jsx +20 -0
  126. package/src/stories/Molecules/ButtonGroup/ButtonGroup.css +4 -0
  127. package/src/stories/Molecules/ButtonGroup/ButtonGroup.jsx +25 -0
  128. package/src/stories/Molecules/ButtonGroup/ButtonGroup.stories.jsx +20 -0
  129. package/src/stories/Molecules/Card/Card.css +4 -0
  130. package/src/stories/Molecules/Card/Card.jsx +25 -0
  131. package/src/stories/Molecules/Card/Card.stories.jsx +20 -0
  132. package/src/stories/Molecules/ComparisonTable/ComparisonTable.css +4 -0
  133. package/src/stories/Molecules/ComparisonTable/ComparisonTable.jsx +25 -0
  134. package/src/stories/Molecules/ComparisonTable/ComparisonTable.stories.jsx +20 -0
  135. package/src/stories/Molecules/DataTable/DataTable.css +4 -0
  136. package/src/stories/Molecules/DataTable/DataTable.jsx +25 -0
  137. package/src/stories/Molecules/DataTable/DataTable.stories.jsx +20 -0
  138. package/src/stories/Molecules/FileUpload/FileUpload.css +4 -0
  139. package/src/stories/Molecules/FileUpload/FileUpload.jsx +25 -0
  140. package/src/stories/Molecules/FileUpload/FileUpload.stories.jsx +20 -0
  141. package/src/stories/Molecules/FormField/FormField.css +4 -0
  142. package/src/stories/Molecules/FormField/FormField.jsx +25 -0
  143. package/src/stories/Molecules/FormField/FormField.stories.jsx +20 -0
  144. package/src/stories/Molecules/Header/Header.css +35 -0
  145. package/src/stories/Molecules/Header/Header.jsx +76 -0
  146. package/src/stories/Molecules/Header/Header.stories.jsx +28 -0
  147. package/src/stories/Molecules/IconButton/IconButton.css +4 -0
  148. package/src/stories/Molecules/IconButton/IconButton.jsx +25 -0
  149. package/src/stories/Molecules/IconButton/IconButton.stories.jsx +20 -0
  150. package/src/stories/Molecules/ImageWithCaption/ImageWithCaption.css +4 -0
  151. package/src/stories/Molecules/ImageWithCaption/ImageWithCaption.jsx +25 -0
  152. package/src/stories/Molecules/ImageWithCaption/ImageWithCaption.stories.jsx +20 -0
  153. package/src/stories/Molecules/InputGroup/InputGroup.css +4 -0
  154. package/src/stories/Molecules/InputGroup/InputGroup.jsx +25 -0
  155. package/src/stories/Molecules/InputGroup/InputGroup.stories.jsx +20 -0
  156. package/src/stories/Molecules/InputWithLabel/InputWithLabel.css +4 -0
  157. package/src/stories/Molecules/InputWithLabel/InputWithLabel.jsx +25 -0
  158. package/src/stories/Molecules/InputWithLabel/InputWithLabel.stories.jsx +20 -0
  159. package/src/stories/Molecules/List/List.css +4 -0
  160. package/src/stories/Molecules/List/List.jsx +25 -0
  161. package/src/stories/Molecules/List/List.stories.jsx +20 -0
  162. package/src/stories/Molecules/MediaCard/MediaCard.css +4 -0
  163. package/src/stories/Molecules/MediaCard/MediaCard.jsx +25 -0
  164. package/src/stories/Molecules/MediaCard/MediaCard.stories.jsx +20 -0
  165. package/src/stories/Molecules/Modal/Modal.css +4 -0
  166. package/src/stories/Molecules/Modal/Modal.jsx +25 -0
  167. package/src/stories/Molecules/Modal/Modal.stories.jsx +20 -0
  168. package/src/stories/Molecules/Molecules.js +44 -0
  169. package/src/stories/Molecules/Navbar/Navbar.css +87 -0
  170. package/src/stories/Molecules/Navbar/Navbar.jsx +87 -0
  171. package/src/stories/Molecules/Navbar/Navbar.stories.jsx +20 -0
  172. package/src/stories/Molecules/Notification/Notification.css +4 -0
  173. package/src/stories/Molecules/Notification/Notification.jsx +25 -0
  174. package/src/stories/Molecules/Notification/Notification.stories.jsx +20 -0
  175. package/src/stories/Molecules/PricingTable/PricingTable.css +4 -0
  176. package/src/stories/Molecules/PricingTable/PricingTable.jsx +25 -0
  177. package/src/stories/Molecules/PricingTable/PricingTable.stories.jsx +20 -0
  178. package/src/stories/Molecules/SearchBar/SearchBar.css +4 -0
  179. package/src/stories/Molecules/SearchBar/SearchBar.jsx +25 -0
  180. package/src/stories/Molecules/SearchBar/SearchBar.stories.jsx +20 -0
  181. package/src/stories/Molecules/SelectTheme/SelectTheme.css +25 -0
  182. package/src/stories/Molecules/SelectTheme/SelectTheme.jsx +44 -0
  183. package/src/stories/Molecules/SelectTheme/SelectTheme.stories.jsx +25 -0
  184. package/src/stories/Molecules/Sidebar/Sidebar.css +4 -0
  185. package/src/stories/Molecules/Sidebar/Sidebar.jsx +25 -0
  186. package/src/stories/Molecules/Sidebar/Sidebar.stories.jsx +20 -0
  187. package/src/stories/Molecules/VideoWithDescription/VideoWithDescription.css +4 -0
  188. package/src/stories/Molecules/VideoWithDescription/VideoWithDescription.jsx +25 -0
  189. package/src/stories/Molecules/VideoWithDescription/VideoWithDescription.stories.jsx +20 -0
  190. package/src/stories/Molecules/index.js +57 -0
  191. package/src/stories/Organisms/Organisms.js +39 -0
  192. package/src/stories/Organisms/Profile/UserFriends/UserFriends.context.jsx +15 -0
  193. package/src/stories/Organisms/Profile/UserFriends/UserFriends.css +4 -0
  194. package/src/stories/Organisms/Profile/UserFriends/UserFriends.jsx +13 -0
  195. package/src/stories/Organisms/Profile/UserFriends/UserFriends.stories.jsx +26 -0
  196. package/src/stories/Organisms/Profile/UserPosts/UserPosts.context.jsx +15 -0
  197. package/src/stories/Organisms/Profile/UserPosts/UserPosts.css +4 -0
  198. package/src/stories/Organisms/Profile/UserPosts/UserPosts.jsx +13 -0
  199. package/src/stories/Organisms/Profile/UserPosts/UserPosts.stories.jsx +26 -0
  200. package/src/stories/Organisms/Profile/UserProfile/UserProfile.context.jsx +15 -0
  201. package/src/stories/Organisms/Profile/UserProfile/UserProfile.css +4 -0
  202. package/src/stories/Organisms/Profile/UserProfile/UserProfile.jsx +13 -0
  203. package/src/stories/Organisms/Profile/UserProfile/UserProfile.stories.jsx +26 -0
  204. package/src/stories/Pages/Page/Page.css +69 -0
  205. package/src/stories/Pages/Page/Page.jsx +69 -0
  206. package/src/stories/Pages/Page/Page.stories.js +26 -0
  207. package/src/stories/Pages/Page/Pages.js +31 -0
  208. package/src/stories/Templates/Templates.js +27 -0
  209. package/src/stories/assets/accessibility.png +0 -0
  210. package/src/stories/assets/accessibility.svg +1 -0
  211. package/src/stories/assets/addon-library.png +0 -0
  212. package/src/stories/assets/assets.png +0 -0
  213. package/src/stories/assets/avif-test-image.avif +0 -0
  214. package/src/stories/assets/context.png +0 -0
  215. package/src/stories/assets/discord.svg +1 -0
  216. package/src/stories/assets/docs.png +0 -0
  217. package/src/stories/assets/figma-plugin.png +0 -0
  218. package/src/stories/assets/github.svg +1 -0
  219. package/src/stories/assets/share.png +0 -0
  220. package/src/stories/assets/styling.png +0 -0
  221. package/src/stories/assets/testing.png +0 -0
  222. package/src/stories/assets/theming.png +0 -0
  223. package/src/stories/assets/tutorials.svg +1 -0
  224. package/src/stories/assets/youtube.svg +1 -0
  225. package/src/styles/Header.modules.css +32 -0
  226. package/src/styles/global.css +59 -0
  227. package/src/themes/ThemeProvider.jsx +36 -0
  228. package/src/themes/Themes.js +44 -0
  229. package/src/themes/dark.js +22 -0
  230. package/src/themes/light.js +22 -0
  231. package/src/themes/typ/Readme.md +4 -0
  232. package/src/themes/typ/github/open-sans-v17-latin-ext_latin-700.woff2 +0 -0
  233. package/src/themes/typ/github/open-sans-v17-latin-ext_latin-700italic.woff2 +0 -0
  234. package/src/themes/typ/github/open-sans-v17-latin-ext_latin-italic.woff2 +0 -0
  235. package/src/themes/typ/github/open-sans-v17-latin-ext_latin-regular.woff2 +0 -0
  236. package/src/themes/typ/github.css +416 -0
  237. package/src/themes/typ/gothic/GUST e-foundry License.txt +29 -0
  238. package/src/themes/typ/gothic/didact-gothic-c-ext.woff2 +0 -0
  239. package/src/themes/typ/gothic/didact-gothic-c.woff2 +0 -0
  240. package/src/themes/typ/gothic/texgyreadventor-bold.woff +0 -0
  241. package/src/themes/typ/gothic/texgyreadventor-bolditalic.woff +0 -0
  242. package/src/themes/typ/gothic/texgyreadventor-italic.woff +0 -0
  243. package/src/themes/typ/gothic/texgyreadventor-regular.woff +0 -0
  244. package/src/themes/typ/gothic.css +410 -0
  245. package/src/themes/typ/newsprint/pt-serif-v11-latin-700.woff2 +0 -0
  246. package/src/themes/typ/newsprint/pt-serif-v11-latin-700italic.woff2 +0 -0
  247. package/src/themes/typ/newsprint/pt-serif-v11-latin-italic.woff2 +0 -0
  248. package/src/themes/typ/newsprint/pt-serif-v11-latin-regular.woff2 +0 -0
  249. package/src/themes/typ/newsprint.css +622 -0
  250. package/src/themes/typ/night/codeblock.dark.css +113 -0
  251. package/src/themes/typ/night/credit.html +1 -0
  252. package/src/themes/typ/night/cursor.png +0 -0
  253. package/src/themes/typ/night/cursor@2x.png +0 -0
  254. package/src/themes/typ/night/mermaid.dark.css +7 -0
  255. package/src/themes/typ/night/sourcemode.dark.css +38 -0
  256. package/src/themes/typ/night.css +1032 -0
  257. package/src/themes/typ/pixyll/lato-v14-latin-300.woff +0 -0
  258. package/src/themes/typ/pixyll/lato-v14-latin-300italic.woff +0 -0
  259. package/src/themes/typ/pixyll/lato-v14-latin-900.woff +0 -0
  260. package/src/themes/typ/pixyll/lato-v14-latin-900italic.woff +0 -0
  261. package/src/themes/typ/pixyll/merriweather-v19-latin-300.woff +0 -0
  262. package/src/themes/typ/pixyll/merriweather-v19-latin-300italic.woff +0 -0
  263. package/src/themes/typ/pixyll/merriweather-v19-latin-700.woff +0 -0
  264. package/src/themes/typ/pixyll/merriweather-v19-latin-700italic.woff +0 -0
  265. package/src/themes/typ/pixyll.css +528 -0
  266. package/src/themes/typ/whitey.css +299 -0
@@ -0,0 +1,87 @@
1
+ /* src/stories/Molecules/Navigation/Navbar/Navbar.css */
2
+
3
+ /* CSS variables for dynamic styling */
4
+ .navbar {
5
+ --navbar-background-color: rgba(34, 139, 34, 0); /* Light greenish background with low opacity */
6
+ --navbar-border-color: rgba(34, 139, 34, 0.235); /* Light border with dark greenish color and low opacity */
7
+ --navbar-padding: 8px 16px;
8
+ --navbar-margin: 16px;
9
+ --navbar-border-radius: 4px;
10
+
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: space-between;
14
+ background-color: var(--navbar-background-color);
15
+ border: 1px solid var(--navbar-border-color);
16
+ padding: var(--navbar-padding);
17
+ margin: var(--navbar-margin);
18
+ border-radius: var(--navbar-border-radius);
19
+ }
20
+
21
+ .navbar__logo {
22
+ --navbar-logo-margin-right: 24px;
23
+
24
+ display: flex;
25
+ align-items: center;
26
+ margin-right: var(--navbar-logo-margin-right);
27
+ }
28
+
29
+ .navbar__links {
30
+ list-style: none;
31
+ display: flex;
32
+ margin: 0;
33
+ padding: 0;
34
+ }
35
+
36
+ .navbar__item {
37
+ --navbar-item-margin: 0 12px;
38
+
39
+ margin: var(--navbar-item-margin);
40
+ }
41
+
42
+ .navbar__link {
43
+ --navbar-link-color: #006400;
44
+ --navbar-link-padding: 8px;
45
+
46
+ color: var(--navbar-link-color);
47
+ text-decoration: none;
48
+ padding: var(--navbar-link-padding);
49
+ }
50
+
51
+ .navbar__link:hover,
52
+ .navbar__link--active {
53
+ --navbar-link-hover-background-color: rgba(34, 139, 34, 0.1);
54
+ --navbar-link-hover-border-radius: 4px;
55
+
56
+ background-color: var(--navbar-link-hover-background-color);
57
+ border-radius: var(--navbar-link-hover-border-radius);
58
+ }
59
+
60
+ .navbar__controls {
61
+ --navbar-controls-margin-left: 24px;
62
+
63
+ display: flex;
64
+ align-items: center;
65
+ margin-left: var(--navbar-controls-margin-left);
66
+ }
67
+
68
+ .navbar__controls > * {
69
+ --navbar-control-item-margin-left: 12px;
70
+
71
+ margin-left: var(--navbar-control-item-margin-left);
72
+ }
73
+
74
+ /* Button styles */
75
+ .button {
76
+ --button-background-color: #228B22;
77
+ --button-text-color: #fff;
78
+
79
+ background-color: var(--button-background-color);
80
+ color: var(--button-text-color);
81
+ }
82
+
83
+ .button:hover {
84
+ --button-hover-background-color: #1e7a1e;
85
+
86
+ background-color: var(--button-hover-background-color);
87
+ }
@@ -0,0 +1,87 @@
1
+ // src/stories/Molecules/Navigation/Navbar/Navbar.jsx
2
+
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import './Navbar.css';
6
+
7
+ export const Navbar = ({
8
+ links,
9
+ logo,
10
+ userControls,
11
+ styleOverrides = {},
12
+ }) => {
13
+ // Build the style object for CSS variable overrides
14
+ const style = {};
15
+
16
+ // Map of styleOverrides keys to CSS variable names
17
+ const cssVariableMap = {
18
+ navbarBackgroundColor: '--navbar-background-color',
19
+ navbarBorderColor: '--navbar-border-color',
20
+ navbarPadding: '--navbar-padding',
21
+ navbarMargin: '--navbar-margin',
22
+ navbarBorderRadius: '--navbar-border-radius',
23
+ logoMarginRight: '--navbar-logo-margin-right',
24
+ itemMargin: '--navbar-item-margin',
25
+ linkColor: '--navbar-link-color',
26
+ linkPadding: '--navbar-link-padding',
27
+ linkHoverBackgroundColor: '--navbar-link-hover-background-color',
28
+ linkHoverBorderRadius: '--navbar-link-hover-border-radius',
29
+ controlsMarginLeft: '--navbar-controls-margin-left',
30
+ controlItemMarginLeft: '--navbar-control-item-margin-left',
31
+ buttonBackgroundColor: '--button-background-color',
32
+ buttonTextColor: '--button-text-color',
33
+ buttonHoverBackgroundColor: '--button-hover-background-color',
34
+ };
35
+
36
+ // Set CSS variables based on styleOverrides
37
+ Object.keys(styleOverrides).forEach((key) => {
38
+ const cssVar = cssVariableMap[key];
39
+ if (cssVar) {
40
+ style[cssVar] = styleOverrides[key];
41
+ }
42
+ });
43
+
44
+ return (
45
+ <nav className="navbar" style={style}>
46
+ <div className="navbar__logo">
47
+ {logo}
48
+ </div>
49
+ <ul className="navbar__links">
50
+ {links.map((link, index) => (
51
+ <li key={index} className="navbar__item">
52
+ <a
53
+ href={link.url}
54
+ className={`navbar__link ${link.isActive ? 'navbar__link--active' : ''}`}
55
+ >
56
+ {link.label}
57
+ </a>
58
+ </li>
59
+ ))}
60
+ </ul>
61
+ <div className="navbar__controls">
62
+ {userControls}
63
+ </div>
64
+ </nav>
65
+ );
66
+ };
67
+
68
+ Navbar.propTypes = {
69
+ links: PropTypes.arrayOf(
70
+ PropTypes.shape({
71
+ url: PropTypes.string.isRequired,
72
+ label: PropTypes.string.isRequired,
73
+ isActive: PropTypes.bool,
74
+ })
75
+ ).isRequired,
76
+ logo: PropTypes.node,
77
+ userControls: PropTypes.node,
78
+ styleOverrides: PropTypes.object,
79
+ };
80
+
81
+ Navbar.defaultProps = {
82
+ logo: null,
83
+ userControls: null,
84
+ styleOverrides: {},
85
+ };
86
+
87
+ export default Navbar;
@@ -0,0 +1,20 @@
1
+
2
+ import { Navbar } from './Navbar';
3
+
4
+ // Storybook configuration for Navbar component
5
+ export default {
6
+ title: 'Molecules/Navigation/Navbar',
7
+ component: Navbar,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ argTypes: {
12
+ // Define argTypes here
13
+ },
14
+ };
15
+
16
+ export const Default = {
17
+ args: {
18
+ // Define default args here
19
+ },
20
+ };
@@ -0,0 +1,4 @@
1
+
2
+ .notification {
3
+ /* Default styles for Notification */
4
+ }
@@ -0,0 +1,25 @@
1
+
2
+ import React from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import './Notification.css';
5
+
6
+ /**
7
+ * Notification component
8
+ */
9
+ export const Notification = (props) => {
10
+ return (
11
+ <div className="notification" {...props}>
12
+ {/* Component implementation */}
13
+ </div>
14
+ );
15
+ };
16
+
17
+ Notification.propTypes = {
18
+ // Define prop types here
19
+ };
20
+
21
+ Notification.defaultProps = {
22
+ // Define default props here
23
+ };
24
+
25
+ export default Notification;
@@ -0,0 +1,20 @@
1
+
2
+ import { Notification } from './Notification';
3
+
4
+ // Storybook configuration for Notification component
5
+ export default {
6
+ title: 'Molecules/FeedbackMolecules/Notification',
7
+ component: Notification,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ argTypes: {
12
+ // Define argTypes here
13
+ },
14
+ };
15
+
16
+ export const Default = {
17
+ args: {
18
+ // Define default args here
19
+ },
20
+ };
@@ -0,0 +1,4 @@
1
+
2
+ .pricingtable {
3
+ /* Default styles for PricingTable */
4
+ }
@@ -0,0 +1,25 @@
1
+
2
+ import React from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import './PricingTable.css';
5
+
6
+ /**
7
+ * PricingTable component
8
+ */
9
+ export const PricingTable = (props) => {
10
+ return (
11
+ <div className="pricingtable" {...props}>
12
+ {/* Component implementation */}
13
+ </div>
14
+ );
15
+ };
16
+
17
+ PricingTable.propTypes = {
18
+ // Define prop types here
19
+ };
20
+
21
+ PricingTable.defaultProps = {
22
+ // Define default props here
23
+ };
24
+
25
+ export default PricingTable;
@@ -0,0 +1,20 @@
1
+
2
+ import { PricingTable } from './PricingTable';
3
+
4
+ // Storybook configuration for PricingTable component
5
+ export default {
6
+ title: 'Molecules/Tables/PricingTable',
7
+ component: PricingTable,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ argTypes: {
12
+ // Define argTypes here
13
+ },
14
+ };
15
+
16
+ export const Default = {
17
+ args: {
18
+ // Define default args here
19
+ },
20
+ };
@@ -0,0 +1,4 @@
1
+
2
+ .searchbar {
3
+ /* Default styles for SearchBar */
4
+ }
@@ -0,0 +1,25 @@
1
+
2
+ import React from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import './SearchBar.css';
5
+
6
+ /**
7
+ * SearchBar component
8
+ */
9
+ export const SearchBar = (props) => {
10
+ return (
11
+ <div className="searchbar" {...props}>
12
+ {/* Component implementation */}
13
+ </div>
14
+ );
15
+ };
16
+
17
+ SearchBar.propTypes = {
18
+ // Define prop types here
19
+ };
20
+
21
+ SearchBar.defaultProps = {
22
+ // Define default props here
23
+ };
24
+
25
+ export default SearchBar;
@@ -0,0 +1,20 @@
1
+
2
+ import { SearchBar } from './SearchBar';
3
+
4
+ // Storybook configuration for SearchBar component
5
+ export default {
6
+ title: 'Molecules/FormElements/SearchBar',
7
+ component: SearchBar,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ argTypes: {
12
+ // Define argTypes here
13
+ },
14
+ };
15
+
16
+ export const Default = {
17
+ args: {
18
+ // Define default args here
19
+ },
20
+ };
@@ -0,0 +1,25 @@
1
+ .select-theme-container {
2
+ display: flex;
3
+ justify-content: space-between;
4
+ align-items: center;
5
+ padding: 10px;
6
+ background-color: var(--bg-color, #f9f9f9); /* Use dynamic theme colors */
7
+ border-radius: 8px;
8
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
9
+ }
10
+
11
+ .select-theme-label {
12
+ font-family: 'Roboto', sans-serif;
13
+ font-size: 16px;
14
+ color: var(--text-color, #333);
15
+ }
16
+
17
+ .select-theme-dropdown {
18
+ padding: 8px;
19
+ border-radius: 4px;
20
+ border: 1px solid var(--border-color, #ccc);
21
+ background-color: var(--bg-color, #fff);
22
+ color: var(--text-color, #333);
23
+ font-family: 'Roboto', sans-serif;
24
+ font-size: 14px;
25
+ }
@@ -0,0 +1,44 @@
1
+ // src/stories/Molecules/SelectTheme/SelectTheme.jsx
2
+
3
+ import React, { useState, useEffect } from 'react';
4
+ import './SelectTheme.css'; // Import the component styles
5
+
6
+ const themes = [
7
+ { label: 'GitHub', value: 'github' },
8
+ { label: 'Gothic', value: 'gothic' },
9
+ { label: 'Newsprint', value: 'newsprint' },
10
+ { label: 'Night', value: 'night' },
11
+ { label: 'Pixyll', value: 'pixyll' },
12
+ { label: 'Whitey', value: 'whitey' }
13
+ ];
14
+
15
+ export const SelectTheme = () => { // Named export
16
+ const [selectedTheme, setSelectedTheme] = useState('github'); // Default theme
17
+
18
+ useEffect(() => {
19
+ import(`../../../themes/typ/${selectedTheme}.css`).then(() => {
20
+ console.log(`${selectedTheme} theme loaded`);
21
+ });
22
+ }, [selectedTheme]);
23
+
24
+ const handleThemeChange = (event) => {
25
+ setSelectedTheme(event.target.value);
26
+ };
27
+
28
+ return (
29
+ <div className="select-theme-container">
30
+ <span className="select-theme-label">Select Theme:</span>
31
+ <select
32
+ className="select-theme-dropdown"
33
+ value={selectedTheme}
34
+ onChange={handleThemeChange}
35
+ >
36
+ {themes.map((theme) => (
37
+ <option key={theme.value} value={theme.value}>
38
+ {theme.label}
39
+ </option>
40
+ ))}
41
+ </select>
42
+ </div>
43
+ );
44
+ };
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import SelectTheme from './SelectTheme';
3
+
4
+ export default {
5
+ title: 'Molecules/ContentDisplay/SelectTheme',
6
+ component: SelectTheme,
7
+ parameters: {
8
+ docs: {
9
+ description: {
10
+ component: 'SelectTheme allows the user to switch between different CSS themes dynamically.',
11
+ },
12
+ },
13
+ },
14
+ };
15
+
16
+ const Template = (args) => <SelectTheme {...args} />;
17
+
18
+ export const Default = Template.bind({});
19
+ Default.args = {
20
+ // You can pass default props here if needed, though SelectTheme doesn't take any props directly.
21
+ };
22
+
23
+ Default.story = {
24
+ name: 'Default',
25
+ };
@@ -0,0 +1,4 @@
1
+
2
+ .sidebar {
3
+ /* Default styles for Sidebar */
4
+ }
@@ -0,0 +1,25 @@
1
+
2
+ import React from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import './Sidebar.css';
5
+
6
+ /**
7
+ * Sidebar component
8
+ */
9
+ export const Sidebar = (props) => {
10
+ return (
11
+ <div className="sidebar" {...props}>
12
+ {/* Component implementation */}
13
+ </div>
14
+ );
15
+ };
16
+
17
+ Sidebar.propTypes = {
18
+ // Define prop types here
19
+ };
20
+
21
+ Sidebar.defaultProps = {
22
+ // Define default props here
23
+ };
24
+
25
+ export default Sidebar;
@@ -0,0 +1,20 @@
1
+
2
+ import { Sidebar } from './Sidebar';
3
+
4
+ // Storybook configuration for Sidebar component
5
+ export default {
6
+ title: 'Molecules/Navigation/Sidebar',
7
+ component: Sidebar,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ argTypes: {
12
+ // Define argTypes here
13
+ },
14
+ };
15
+
16
+ export const Default = {
17
+ args: {
18
+ // Define default args here
19
+ },
20
+ };
@@ -0,0 +1,4 @@
1
+
2
+ .videowithdescription {
3
+ /* Default styles for VideoWithDescription */
4
+ }
@@ -0,0 +1,25 @@
1
+
2
+ import React from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import './VideoWithDescription.css';
5
+
6
+ /**
7
+ * VideoWithDescription component
8
+ */
9
+ export const VideoWithDescription = (props) => {
10
+ return (
11
+ <div className="videowithdescription" {...props}>
12
+ {/* Component implementation */}
13
+ </div>
14
+ );
15
+ };
16
+
17
+ VideoWithDescription.propTypes = {
18
+ // Define prop types here
19
+ };
20
+
21
+ VideoWithDescription.defaultProps = {
22
+ // Define default props here
23
+ };
24
+
25
+ export default VideoWithDescription;
@@ -0,0 +1,20 @@
1
+
2
+ import { VideoWithDescription } from './VideoWithDescription';
3
+
4
+ // Storybook configuration for VideoWithDescription component
5
+ export default {
6
+ title: 'Molecules/MediaMolecules/VideoWithDescription',
7
+ component: VideoWithDescription,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ argTypes: {
12
+ // Define argTypes here
13
+ },
14
+ };
15
+
16
+ export const Default = {
17
+ args: {
18
+ // Define default args here
19
+ },
20
+ };
@@ -0,0 +1,57 @@
1
+ // src/stories/Molecules/index.js
2
+
3
+ // Import all components as named exports
4
+ import { Navbar } from './Navbar/Navbar';
5
+ import { Sidebar } from './Sidebar/Sidebar';
6
+ import { Breadcrumbs } from './Breadcrumbs/Breadcrumbs';
7
+ import { InputGroup } from './InputGroup/InputGroup';
8
+ import { InputWithLabel } from './InputWithLabel/InputWithLabel';
9
+ import { SearchBar } from './SearchBar/SearchBar';
10
+ import { FileUpload } from './FileUpload/FileUpload';
11
+ import { FormField } from './FormField/FormField';
12
+ import { IconButton } from './IconButton/IconButton';
13
+ import { ButtonGroup } from './ButtonGroup/ButtonGroup';
14
+ import { ImageWithCaption } from './ImageWithCaption/ImageWithCaption';
15
+ import { VideoWithDescription } from './VideoWithDescription/VideoWithDescription';
16
+ import { AvatarWithName } from './AvatarWithName/AvatarWithName';
17
+ import { AudioPlayer } from './AudioPlayer/AudioPlayer';
18
+ import { Card } from './Card/Card';
19
+ import { MediaCard } from './MediaCard/MediaCard';
20
+ import { List } from './List/List';
21
+ import { Accordion } from './Accordion/Accordion';
22
+ import { Notification } from './Notification/Notification';
23
+ import { Modal } from './Modal/Modal';
24
+ import { DataTable } from './DataTable/DataTable';
25
+ import { PricingTable } from './PricingTable/PricingTable';
26
+ import { ComparisonTable } from './ComparisonTable/ComparisonTable';
27
+ import { SelectTheme } from './SelectTheme/SelectTheme';
28
+
29
+ // Flattened export of all components
30
+ const Molecules = {
31
+ Navbar,
32
+ Sidebar,
33
+ Breadcrumbs,
34
+ InputGroup,
35
+ InputWithLabel,
36
+ SearchBar,
37
+ SelectTheme,
38
+ FileUpload,
39
+ FormField,
40
+ IconButton,
41
+ ButtonGroup,
42
+ ImageWithCaption,
43
+ VideoWithDescription,
44
+ AvatarWithName,
45
+ AudioPlayer,
46
+ Card,
47
+ MediaCard,
48
+ List,
49
+ Accordion,
50
+ Notification,
51
+ Modal,
52
+ DataTable,
53
+ PricingTable,
54
+ ComparisonTable,
55
+ };
56
+
57
+ export default Molecules;
@@ -0,0 +1,39 @@
1
+ const organisms = {
2
+ "Organisms": {
3
+ "Forms": [
4
+ { name: "SignInForm", paths: { css: "./SignInForm/SignInForm.css", globalCss: "styles/global.css", jsx: "./SignInForm/SignInForm.jsx", stories: "./SignInForm/SignInForm.stories.jsx" }},
5
+ { name: "RegistrationForm", paths: { css: "./RegistrationForm/RegistrationForm.css", globalCss: "styles/global.css", jsx: "./RegistrationForm/RegistrationForm.jsx", stories: "./RegistrationForm/RegistrationForm.stories.jsx" }},
6
+ { name: "ContactForm", paths: { css: "./ContactForm/ContactForm.css", globalCss: "styles/global.css", jsx: "./ContactForm/ContactForm.jsx", stories: "./ContactForm/ContactForm.stories.jsx" }},
7
+ ],
8
+
9
+ "ContentDisplay": [
10
+ { name: "ProfileCard", paths: { css: "./ProfileCard/ProfileCard.css", globalCss: "styles/global.css", jsx: "./ProfileCard/ProfileCard.jsx", stories: "./ProfileCard/ProfileCard.stories.jsx" }},
11
+ { name: "ProductDetail", paths: { css: "./ProductDetail/ProductDetail.css", globalCss: "styles/global.css", jsx: "./ProductDetail/ProductDetail.jsx", stories: "./ProductDetail/ProductDetail.stories.jsx" }},
12
+ { name: "ArticleContent", paths: { css: "./ArticleContent/ArticleContent.css", globalCss: "styles/global.css", jsx: "./ArticleContent/ArticleContent.jsx", stories: "./ArticleContent/ArticleContent.stories.jsx" }},
13
+ ],
14
+
15
+ "MediaCollections": [
16
+ { name: "ImageGallery", paths: { css: "./ImageGallery/ImageGallery.css", globalCss: "styles/global.css", jsx: "./ImageGallery/ImageGallery.jsx", stories: "./ImageGallery/ImageGallery.stories.jsx" }},
17
+ { name: "VideoPlaylist", paths: { css: "./VideoPlaylist/VideoPlaylist.css", globalCss: "styles/global.css", jsx: "./VideoPlaylist/VideoPlaylist.jsx", stories: "./VideoPlaylist/VideoPlaylist.stories.jsx" }},
18
+ { name: "Carousel", paths: { css: "./Carousel/Carousel.css", globalCss: "styles/global.css", jsx: "./Carousel/Carousel.jsx", stories: "./Carousel/Carousel.stories.jsx" }},
19
+ ],
20
+
21
+ "Interactive": [
22
+ { name: "ShoppingCart", paths: { css: "./ShoppingCart/ShoppingCart.css", globalCss: "styles/global.css", jsx: "./ShoppingCart/ShoppingCart.jsx", stories: "./ShoppingCart/ShoppingCart.stories.jsx" }},
23
+ { name: "UserProfile", paths: { css: "./UserProfile/UserProfile.css", globalCss: "styles/global.css", jsx: "./UserProfile/UserProfile.jsx", stories: "./UserProfile/UserProfile.stories.jsx" }},
24
+ { name: "Checkout", paths: { css: "./Checkout/Checkout.css", globalCss: "styles/global.css", jsx: "./Checkout/Checkout.jsx", stories: "./Checkout/Checkout.stories.jsx" }},
25
+ ],
26
+
27
+ "MediaCollections": [
28
+ { name: "ImageGallery", paths: { css: "./ImageGallery/ImageGallery.css", globalCss: "styles/global.css", jsx: "./ImageGallery/ImageGallery.jsx", stories: "./ImageGallery/ImageGallery.stories.jsx" }},
29
+ { name: "VideoPlaylist", paths: { css: "./VideoPlaylist/VideoPlaylist.css", globalCss: "styles/global.css", jsx: "./VideoPlaylist/VideoPlaylist.jsx", stories: "./VideoPlaylist/VideoPlaylist.stories.jsx" }},
30
+ { name: "Carousel", paths: { css: "./Carousel/Carousel.css", globalCss: "styles/global.css", jsx: "./Carousel/Carousel.jsx", stories: "./Carousel/Carousel.stories.jsx" }},
31
+ ],
32
+
33
+ "Feedback": [
34
+ { name: "UserNotification", paths: { css: "./UserNotification/UserNotification.css", globalCss: "styles/global.css", jsx: "./UserNotification/UserNotification.jsx", stories: "./UserNotification/UserNotification.stories.jsx" }},
35
+ { name: "StatusBanner", paths: { css: "./StatusBanner/StatusBanner.css", globalCss: "styles/global.css", jsx: "./StatusBanner/StatusBanner.jsx", stories: "./StatusBanner/StatusBanner.stories.jsx" }},
36
+ { name: "AlertSystem", paths: { css: "./AlertSystem/AlertSystem.css", globalCss: "styles/global.css", jsx: "./AlertSystem/AlertSystem.jsx", stories: "./AlertSystem/AlertSystem.stories.jsx" }},
37
+ ]
38
+ }
39
+ }
@@ -0,0 +1,15 @@
1
+
2
+ import React, { createContext, useContext, useState } from 'react';
3
+
4
+ const UserFriendsContext = createContext();
5
+
6
+ export const UserFriendsProvider = ({ children }) => {
7
+ const [state, setState] = useState(null);
8
+ return (
9
+ <UserFriendsContext.Provider value={[state, setState]}>
10
+ {children}
11
+ </UserFriendsContext.Provider>
12
+ );
13
+ };
14
+
15
+ export const useUserFriends = () => useContext(UserFriendsContext);