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.
Files changed (296) hide show
  1. package/README.md +178 -49
  2. package/dist/style.css +1 -1
  3. package/dist/this-gui.es.js +4645 -1922
  4. package/dist/this-gui.umd.js +34 -22
  5. package/package.json +14 -14
  6. package/src/App.jsx +53 -21
  7. package/src/Page.jsx +28 -0
  8. package/src/SiteBuilder.jsx +39 -0
  9. package/src/example.json +43 -0
  10. package/src/index.mdx +10 -0
  11. package/src/main.jsx +11 -14
  12. package/src/scripts/ComponentRegistry.js +70 -0
  13. package/src/scripts/postinstall.js +40 -1
  14. package/src/scripts/renderComponents.js +11 -0
  15. package/src/stories/Atoms/Alert/Alert.css +196 -14
  16. package/src/stories/Atoms/Alert/Alert.jsx +43 -28
  17. package/src/stories/Atoms/Alert/Alert.stories.jsx +154 -28
  18. package/src/stories/Atoms/Audio/Audio.css +246 -16
  19. package/src/stories/Atoms/Audio/Audio.jsx +204 -29
  20. package/src/stories/Atoms/Audio/Audio.stories.jsx +178 -28
  21. package/src/stories/Atoms/Badge/Badge.css +235 -15
  22. package/src/stories/Atoms/Badge/Badge.jsx +44 -31
  23. package/src/stories/Atoms/Badge/Badge.stories.jsx +109 -29
  24. package/src/stories/Atoms/Button/Button.css +106 -45
  25. package/src/stories/Atoms/Button/Button.jsx +31 -82
  26. package/src/stories/Atoms/Button/Button.stories.jsx +170 -40
  27. package/src/stories/Atoms/Caption/Caption.css +156 -16
  28. package/src/stories/Atoms/Caption/Caption.jsx +62 -31
  29. package/src/stories/Atoms/Caption/Caption.stories.jsx +194 -28
  30. package/src/stories/Atoms/Checkbox/Checkbox.css +168 -15
  31. package/src/stories/Atoms/Checkbox/Checkbox.jsx +73 -31
  32. package/src/stories/Atoms/Checkbox/Checkbox.stories.jsx +98 -27
  33. package/src/stories/Atoms/Container/Container.css +75 -15
  34. package/src/stories/Atoms/Container/Container.jsx +41 -28
  35. package/src/stories/Atoms/Container/Container.stories.jsx +92 -29
  36. package/src/stories/Atoms/Divider/Divider.css +131 -13
  37. package/src/stories/Atoms/Divider/Divider.jsx +54 -33
  38. package/src/stories/Atoms/Divider/Divider.stories.jsx +93 -29
  39. package/src/stories/Atoms/Grid/Grid.css +160 -0
  40. package/src/stories/Atoms/Grid/Grid.jsx +43 -0
  41. package/src/stories/Atoms/Grid/Grid.stories.jsx +84 -0
  42. package/src/stories/Atoms/Heading/Heading.css +99 -16
  43. package/src/stories/Atoms/Heading/Heading.jsx +57 -29
  44. package/src/stories/Atoms/Heading/Heading.stories.jsx +117 -28
  45. package/src/stories/Atoms/Icon/Icon.css +219 -27
  46. package/src/stories/Atoms/Icon/Icon.jsx +67 -38
  47. package/src/stories/Atoms/Icon/Icon.stories.jsx +156 -51
  48. package/src/stories/Atoms/Image/Image.css +231 -15
  49. package/src/stories/Atoms/Image/Image.jsx +166 -32
  50. package/src/stories/Atoms/Image/Image.stories.jsx +319 -28
  51. package/src/stories/Atoms/Label/Label.css +158 -16
  52. package/src/stories/Atoms/Label/Label.jsx +61 -31
  53. package/src/stories/Atoms/Label/Label.stories.jsx +167 -28
  54. package/src/stories/Atoms/Link/Link.css +58 -16
  55. package/src/stories/Atoms/Link/Link.jsx +73 -32
  56. package/src/stories/Atoms/Link/Link.stories.jsx +141 -29
  57. package/src/stories/Atoms/Loader/Loader.css +93 -16
  58. package/src/stories/Atoms/Loader/Loader.jsx +47 -30
  59. package/src/stories/Atoms/Loader/Loader.stories.jsx +86 -28
  60. package/src/stories/Atoms/Logo/Logo.css +94 -0
  61. package/src/stories/Atoms/Logo/Logo.jsx +53 -0
  62. package/src/stories/Atoms/Logo/Logo.stories.jsx +120 -0
  63. package/src/stories/Atoms/Paragraph/Paragraph.css +167 -16
  64. package/src/stories/Atoms/Paragraph/Paragraph.jsx +67 -31
  65. package/src/stories/Atoms/Paragraph/Paragraph.stories.jsx +130 -28
  66. package/src/stories/Atoms/ProgressBar/ProgressBar.css +115 -17
  67. package/src/stories/Atoms/ProgressBar/ProgressBar.jsx +30 -31
  68. package/src/stories/Atoms/ProgressBar/ProgressBar.stories.jsx +72 -27
  69. package/src/stories/Atoms/RadioButton/RadioButton.css +118 -17
  70. package/src/stories/Atoms/RadioButton/RadioButton.jsx +77 -31
  71. package/src/stories/Atoms/RadioButton/RadioButton.stories.jsx +99 -27
  72. package/src/stories/Atoms/Range/Range.css +169 -0
  73. package/src/stories/Atoms/Range/Range.jsx +87 -0
  74. package/src/stories/Atoms/Range/Range.stories.jsx +110 -0
  75. package/src/stories/Atoms/Section/Section.css +268 -0
  76. package/src/stories/Atoms/Section/Section.jsx +63 -0
  77. package/src/stories/Atoms/Section/Section.stories.jsx +46 -0
  78. package/src/stories/Atoms/Select/Select.css +74 -16
  79. package/src/stories/Atoms/Select/Select.jsx +62 -30
  80. package/src/stories/Atoms/Select/Select.stories.jsx +95 -27
  81. package/src/stories/Atoms/Slider/Slider.css +77 -16
  82. package/src/stories/Atoms/Slider/Slider.jsx +119 -31
  83. package/src/stories/Atoms/Slider/Slider.stories.jsx +77 -28
  84. package/src/stories/Atoms/Snackbar/Snackbar.css +297 -13
  85. package/src/stories/Atoms/Snackbar/Snackbar.jsx +62 -31
  86. package/src/stories/Atoms/Snackbar/Snackbar.stories.jsx +63 -26
  87. package/src/stories/Atoms/Spacer/Spacer.css +101 -16
  88. package/src/stories/Atoms/Spacer/Spacer.jsx +26 -32
  89. package/src/stories/Atoms/Spacer/Spacer.stories.jsx +50 -30
  90. package/src/stories/Atoms/Spinner/Spinner.css +97 -16
  91. package/src/stories/Atoms/Spinner/Spinner.jsx +50 -26
  92. package/src/stories/Atoms/Spinner/Spinner.stories.jsx +47 -30
  93. package/src/stories/Atoms/Tag/Tag.css +97 -14
  94. package/src/stories/Atoms/Tag/Tag.jsx +58 -24
  95. package/src/stories/Atoms/Tag/Tag.stories.jsx +55 -29
  96. package/src/stories/Atoms/TextArea/TextArea.css +85 -15
  97. package/src/stories/Atoms/TextArea/TextArea.jsx +108 -31
  98. package/src/stories/Atoms/TextArea/TextArea.stories.jsx +25 -30
  99. package/src/stories/Atoms/TextInput/TextInput.css +90 -17
  100. package/src/stories/Atoms/TextInput/TextInput.jsx +119 -27
  101. package/src/stories/Atoms/TextInput/TextInput.stories.jsx +53 -25
  102. package/src/stories/Atoms/Toggle/Toggle.css +106 -17
  103. package/src/stories/Atoms/Toggle/Toggle.jsx +56 -28
  104. package/src/stories/Atoms/Toggle/Toggle.stories.jsx +24 -30
  105. package/src/stories/Atoms/Tooltip/Tooltip.css +368 -14
  106. package/src/stories/Atoms/Tooltip/Tooltip.jsx +33 -28
  107. package/src/stories/Atoms/Tooltip/Tooltip.stories.jsx +42 -31
  108. package/src/stories/Atoms/Video/Video.css +28 -18
  109. package/src/stories/Atoms/Video/Video.jsx +66 -29
  110. package/src/stories/Atoms/Video/Video.stories.jsx +30 -30
  111. package/src/stories/Atoms/index.js +9 -2
  112. package/src/stories/Atoms/meta_Atoms.js +6 -1
  113. package/src/stories/Layouts/Accordion/Accordion.css +293 -0
  114. package/src/stories/Layouts/Accordion/Accordion.jsx +74 -0
  115. package/src/stories/Layouts/Accordion/Accordion.stories.jsx +39 -0
  116. package/src/stories/Layouts/Flexbox/Flexbox.css +16 -0
  117. package/src/stories/Layouts/Flexbox/Flexbox.jsx +11 -0
  118. package/src/stories/Layouts/Flexbox/Flexbox.stories.jsx +28 -0
  119. package/src/stories/Layouts/Footer/Footer.css +16 -0
  120. package/src/stories/Layouts/Footer/Footer.jsx +31 -0
  121. package/src/stories/Layouts/Footer/Footer.stories.jsx +28 -0
  122. package/src/stories/Layouts/Header/Header.css +16 -0
  123. package/src/stories/Layouts/Header/Header.jsx +31 -0
  124. package/src/stories/Layouts/Header/Header.stories.jsx +28 -0
  125. package/src/stories/Layouts/HeroBanner/HeroBanner.css +16 -0
  126. package/src/stories/Layouts/HeroBanner/HeroBanner.jsx +31 -0
  127. package/src/stories/Layouts/HeroBanner/HeroBanner.stories.jsx +28 -0
  128. package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.css +16 -0
  129. package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.jsx +31 -0
  130. package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.stories.jsx +28 -0
  131. package/src/stories/Layouts/Pagination/Pagination.css +16 -0
  132. package/src/stories/Layouts/Pagination/Pagination.jsx +31 -0
  133. package/src/stories/Layouts/Pagination/Pagination.stories.jsx +28 -0
  134. package/src/stories/Layouts/Sidebar/Sidebar.css +16 -0
  135. package/src/stories/Layouts/Sidebar/Sidebar.jsx +71 -0
  136. package/src/stories/Layouts/Sidebar/Sidebar.stories.jsx +28 -0
  137. package/src/stories/Layouts/Tabs/Tabs.css +16 -0
  138. package/src/stories/Layouts/Tabs/Tabs.jsx +31 -0
  139. package/src/stories/Layouts/Tabs/Tabs.stories.jsx +28 -0
  140. package/src/stories/Layouts/index.js +25 -0
  141. package/src/stories/Layouts/meta_Layouts.js +28 -0
  142. package/src/stories/Molecules/Accordion/Accordion.css +1 -1
  143. package/src/stories/Molecules/Accordion/Accordion.jsx +1 -1
  144. package/src/stories/Molecules/Accordion/Accordion.stories.jsx +1 -1
  145. package/src/stories/Molecules/AudioPlayer/AudioPlayer.css +95 -2
  146. package/src/stories/Molecules/AudioPlayer/AudioPlayer.jsx +232 -13
  147. package/src/stories/Molecules/AudioPlayer/AudioPlayer.stories.jsx +46 -11
  148. package/src/stories/Molecules/AvatarWithName/AvatarWithName.css +128 -2
  149. package/src/stories/Molecules/AvatarWithName/AvatarWithName.jsx +69 -14
  150. package/src/stories/Molecules/AvatarWithName/AvatarWithName.stories.jsx +12 -12
  151. package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.css +145 -2
  152. package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.jsx +39 -13
  153. package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.stories.jsx +27 -11
  154. package/src/stories/Molecules/ButtonGroup/ButtonGroup.css +463 -2
  155. package/src/stories/Molecules/ButtonGroup/ButtonGroup.jsx +34 -12
  156. package/src/stories/Molecules/ButtonGroup/ButtonGroup.stories.jsx +36 -12
  157. package/src/stories/Molecules/Card/Card.css +39 -2
  158. package/src/stories/Molecules/Card/Card.jsx +80 -13
  159. package/src/stories/Molecules/Card/Card.stories.jsx +27 -13
  160. package/src/stories/Molecules/ComparisonTable/ComparisonTable.css +33 -2
  161. package/src/stories/Molecules/ComparisonTable/ComparisonTable.jsx +91 -12
  162. package/src/stories/Molecules/ComparisonTable/ComparisonTable.stories.jsx +73 -12
  163. package/src/stories/Molecules/Dropdown/Dropdown.css +192 -0
  164. package/src/stories/Molecules/Dropdown/Dropdown.jsx +96 -0
  165. package/src/stories/Molecules/Dropdown/Dropdown.stories.jsx +45 -0
  166. package/src/stories/Molecules/Navbar/Navbar.css +63 -59
  167. package/src/stories/Molecules/Navbar/Navbar.jsx +43 -48
  168. package/src/stories/Molecules/Navbar/Navbar.stories.jsx +58 -8
  169. package/src/stories/Molecules/SearchBar/SearchBar.css +66 -1
  170. package/src/stories/Molecules/SearchBar/SearchBar.jsx +59 -11
  171. package/src/stories/Molecules/SearchBar/SearchBar.stories.jsx +16 -7
  172. package/src/stories/Molecules/SelectTheme/SelectTheme.jsx +16 -38
  173. package/src/stories/Molecules/SelectTheme/SelectTheme.stories.jsx +1 -2
  174. package/src/stories/Molecules/Sidebar/Sidebar.css +65 -2
  175. package/src/stories/Molecules/Sidebar/Sidebar.jsx +66 -11
  176. package/src/stories/Molecules/Sidebar/Sidebar.stories.jsx +20 -5
  177. package/src/stories/Molecules/index.js +2 -1
  178. package/src/stories/Molecules/{Molecules.js → meta_Molecules.js} +6 -3
  179. package/src/stories/Templates/AdminDashboard/AdminDashboard.css +7 -0
  180. package/src/stories/Templates/AdminDashboard/AdminDashboard.jsx +24 -0
  181. package/src/stories/Templates/AdminDashboard/AdminDashboard.stories.jsx +20 -0
  182. package/src/stories/Templates/CallToAction/CallToAction.css +7 -0
  183. package/src/stories/Templates/CallToAction/CallToAction.jsx +24 -0
  184. package/src/stories/Templates/CallToAction/CallToAction.stories.jsx +20 -0
  185. package/src/stories/Templates/FeaturesList/FeaturesList.css +7 -0
  186. package/src/stories/Templates/FeaturesList/FeaturesList.jsx +24 -0
  187. package/src/stories/Templates/FeaturesList/FeaturesList.stories.jsx +20 -0
  188. package/src/stories/Templates/FormSection/FormSection.css +7 -0
  189. package/src/stories/Templates/FormSection/FormSection.jsx +24 -0
  190. package/src/stories/Templates/FormSection/FormSection.stories.jsx +20 -0
  191. package/src/stories/Templates/HeroSection/HeroSection.css +7 -0
  192. package/src/stories/Templates/HeroSection/HeroSection.jsx +24 -0
  193. package/src/stories/Templates/HeroSection/HeroSection.stories.jsx +20 -0
  194. package/src/stories/Templates/LocationInfo/LocationInfo.css +7 -0
  195. package/src/stories/Templates/LocationInfo/LocationInfo.jsx +24 -0
  196. package/src/stories/Templates/LocationInfo/LocationInfo.stories.jsx +20 -0
  197. package/src/stories/Templates/ProductPage/ProductPage.css +7 -0
  198. package/src/stories/Templates/ProductPage/ProductPage.jsx +24 -0
  199. package/src/stories/Templates/ProductPage/ProductPage.stories.jsx +20 -0
  200. package/src/stories/Templates/RegistrationPage/RegistrationPage.css +7 -0
  201. package/src/stories/Templates/RegistrationPage/RegistrationPage.jsx +24 -0
  202. package/src/stories/Templates/RegistrationPage/RegistrationPage.stories.jsx +20 -0
  203. package/src/stories/Templates/ShoppingCart/ShoppingCart.css +7 -0
  204. package/src/stories/Templates/ShoppingCart/ShoppingCart.jsx +24 -0
  205. package/src/stories/Templates/ShoppingCart/ShoppingCart.stories.jsx +20 -0
  206. package/src/stories/Templates/SidebarTopNav/SidebarTopNav.css +7 -0
  207. package/src/stories/Templates/SidebarTopNav/SidebarTopNav.jsx +24 -0
  208. package/src/stories/Templates/SidebarTopNav/SidebarTopNav.stories.jsx +20 -0
  209. package/src/stories/Templates/SignInPage/SignInPage.css +7 -0
  210. package/src/stories/Templates/SignInPage/SignInPage.jsx +24 -0
  211. package/src/stories/Templates/SignInPage/SignInPage.stories.jsx +20 -0
  212. package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.css +7 -0
  213. package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.jsx +24 -0
  214. package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.stories.jsx +20 -0
  215. package/src/stories/Templates/Testimonials/Testimonials.css +7 -0
  216. package/src/stories/Templates/Testimonials/Testimonials.jsx +24 -0
  217. package/src/stories/Templates/Testimonials/Testimonials.stories.jsx +20 -0
  218. package/src/stories/Templates/index.js +33 -0
  219. package/src/stories/Templates/{Templates.js → meta_Templates.js} +3 -1
  220. package/src/stories/assets/logo.png +0 -0
  221. package/src/stories/assets/logo.svg +106 -0
  222. package/src/stories/assets/test.svg +3 -0
  223. package/src/themes/README_Styles.md +301 -0
  224. package/src/themes/ThemeProvider.jsx +47 -22
  225. package/src/themes/styles/dracula/dark.css +0 -0
  226. package/src/themes/styles/dracula/light.css +0 -0
  227. package/src/themes/styles/github/dark.css +0 -0
  228. package/src/themes/styles/github/light.css +0 -0
  229. package/src/themes/styles/neurons/dark.css +247 -0
  230. package/src/themes/styles/neurons/light.css +280 -0
  231. package/dist/Styles.md +0 -446
  232. package/dist/context.md +0 -942
  233. package/dist/github-3688a83a.js +0 -5
  234. package/dist/gothic-94a7ecd6.js +0 -5
  235. package/dist/newsprint-32bf94d9.js +0 -5
  236. package/dist/night-4a954853.js +0 -5
  237. package/dist/pixyll-94de4610.js +0 -5
  238. package/dist/whitey-db68723e.js +0 -5
  239. package/src/MDXEditor.jsx +0 -32
  240. package/src/Theme.jsx +0 -28
  241. package/src/components/CodeBlock.jsx +0 -22
  242. package/src/components/ComponentFactory.jsx +0 -36
  243. package/src/components/ComponentRegistry.js +0 -21
  244. package/src/scripts/generateComponents.js +0 -166
  245. package/src/scripts/verifyMolecules.js +0 -158
  246. package/src/scripts/verify_and_install_atoms.js +0 -211
  247. package/src/stories/Atoms/RangeInput/RangeInput.css +0 -29
  248. package/src/stories/Atoms/RangeInput/RangeInput.jsx +0 -41
  249. package/src/stories/Atoms/RangeInput/RangeInput.stories.jsx +0 -41
  250. package/src/stories/Components.md +0 -189
  251. package/src/stories/Layouts/Grid/Grid.css +0 -4
  252. package/src/stories/Layouts/Grid/Grid.jsx +0 -15
  253. package/src/stories/Layouts/Grid/Grid.stories.jsx +0 -26
  254. package/src/stories/Layouts/Layout.js +0 -28
  255. package/src/styles/Header.modules.css +0 -32
  256. package/src/styles/global.css +0 -59
  257. package/src/themes/Themes.js +0 -44
  258. package/src/themes/dark.js +0 -22
  259. package/src/themes/light.js +0 -22
  260. package/src/themes/typ/Readme.md +0 -4
  261. package/src/themes/typ/github/open-sans-v17-latin-ext_latin-700.woff2 +0 -0
  262. package/src/themes/typ/github/open-sans-v17-latin-ext_latin-700italic.woff2 +0 -0
  263. package/src/themes/typ/github/open-sans-v17-latin-ext_latin-italic.woff2 +0 -0
  264. package/src/themes/typ/github/open-sans-v17-latin-ext_latin-regular.woff2 +0 -0
  265. package/src/themes/typ/github.css +0 -416
  266. package/src/themes/typ/gothic/GUST e-foundry License.txt +0 -29
  267. package/src/themes/typ/gothic/didact-gothic-c-ext.woff2 +0 -0
  268. package/src/themes/typ/gothic/didact-gothic-c.woff2 +0 -0
  269. package/src/themes/typ/gothic/texgyreadventor-bold.woff +0 -0
  270. package/src/themes/typ/gothic/texgyreadventor-bolditalic.woff +0 -0
  271. package/src/themes/typ/gothic/texgyreadventor-italic.woff +0 -0
  272. package/src/themes/typ/gothic/texgyreadventor-regular.woff +0 -0
  273. package/src/themes/typ/gothic.css +0 -410
  274. package/src/themes/typ/newsprint/pt-serif-v11-latin-700.woff2 +0 -0
  275. package/src/themes/typ/newsprint/pt-serif-v11-latin-700italic.woff2 +0 -0
  276. package/src/themes/typ/newsprint/pt-serif-v11-latin-italic.woff2 +0 -0
  277. package/src/themes/typ/newsprint/pt-serif-v11-latin-regular.woff2 +0 -0
  278. package/src/themes/typ/newsprint.css +0 -622
  279. package/src/themes/typ/night/codeblock.dark.css +0 -113
  280. package/src/themes/typ/night/credit.html +0 -1
  281. package/src/themes/typ/night/cursor.png +0 -0
  282. package/src/themes/typ/night/cursor@2x.png +0 -0
  283. package/src/themes/typ/night/mermaid.dark.css +0 -7
  284. package/src/themes/typ/night/sourcemode.dark.css +0 -38
  285. package/src/themes/typ/night.css +0 -1032
  286. package/src/themes/typ/pixyll/lato-v14-latin-300.woff +0 -0
  287. package/src/themes/typ/pixyll/lato-v14-latin-300italic.woff +0 -0
  288. package/src/themes/typ/pixyll/lato-v14-latin-900.woff +0 -0
  289. package/src/themes/typ/pixyll/lato-v14-latin-900italic.woff +0 -0
  290. package/src/themes/typ/pixyll/merriweather-v19-latin-300.woff +0 -0
  291. package/src/themes/typ/pixyll/merriweather-v19-latin-300italic.woff +0 -0
  292. package/src/themes/typ/pixyll/merriweather-v19-latin-700.woff +0 -0
  293. package/src/themes/typ/pixyll/merriweather-v19-latin-700italic.woff +0 -0
  294. package/src/themes/typ/pixyll.css +0 -528
  295. package/src/themes/typ/whitey.css +0 -299
  296. /package/src/stories/Organisms/{Organisms.js → meta_Organisms.js} +0 -0
@@ -1,41 +1,86 @@
1
-
1
+ // this.GUI/src/stories/Atoms/ProgressBar/ProgressBar.stories.jsx
2
+ import React from 'react';
2
3
  import { ProgressBar } from './ProgressBar';
4
+ import './ProgressBar.css'; // Import the CSS styles
3
5
 
4
- // Storybook configuration for ProgressBar component
5
6
  export default {
6
7
  title: 'Atoms/Feedback/ProgressBar',
7
8
  component: ProgressBar,
8
- parameters: {
9
- layout: 'centered',
10
- },
11
9
  argTypes: {
12
- children: { control: 'text' },
10
+ color: {
11
+ control: {
12
+ type: 'select',
13
+ options: [
14
+ 'primary', 'secondary', 'info', 'warning', 'alert', 'success', 'neutral', 'dark',
15
+ 'classy-1', 'classy-2', 'classy-3', 'classy-4', 'classy-5',
16
+ 'small-switch-1', 'small-switch-2',
17
+ 'natural-1', 'natural-2', 'natural-3',
18
+ 'grey-friend-1', 'grey-friend-2',
19
+ 'shade-1', 'shade-2', 'shade-3', 'shade-4'
20
+ ],
21
+ },
22
+ description: 'Semantic color of the progress bar.',
23
+ table: {
24
+ type: { summary: 'string' },
25
+ defaultValue: { summary: 'primary' },
26
+ },
27
+ },
28
+ progress: {
29
+ control: {
30
+ type: 'number',
31
+ },
32
+ description: 'Percentage of progress completed.',
33
+ table: {
34
+ type: { summary: 'number' },
35
+ },
36
+ },
37
+ label: {
38
+ control: 'text',
39
+ description: 'Optional label text displayed within the progress bar.',
40
+ table: {
41
+ type: { summary: 'string' },
42
+ },
43
+ },
44
+ showLabel: {
45
+ control: 'boolean',
46
+ description: 'Whether to display the label within the progress bar.',
47
+ table: {
48
+ type: { summary: 'boolean' },
49
+ defaultValue: { summary: true },
50
+ },
51
+ },
13
52
  },
14
53
  };
15
54
 
16
- export const Primary = {
17
- args: {
18
- primary: true,
19
- children: 'This is a primary ProgressBar',
20
- },
21
- };
55
+ const Template = (args) => <ProgressBar {...args} />;
22
56
 
23
- export const Secondary = {
24
- args: {
25
- children: 'This is a secondary ProgressBar',
26
- },
57
+ export const Default = Template.bind({});
58
+ Default.args = {
59
+ progress: 50,
60
+ color: 'primary',
61
+ label: '50% Complete',
62
+ showLabel: true,
27
63
  };
28
64
 
29
- export const Large = {
30
- args: {
31
- size: 'large',
32
- children: 'This is a large ProgressBar',
33
- },
34
- };
65
+ export const WithDifferentColors = () => (
66
+ <div style={{ display: 'flex', gap: '10px', flexWrap: 'wrap' }}>
67
+ {[
68
+ 'primary', 'secondary', 'info', 'warning', 'alert', 'success', 'neutral', 'dark',
69
+ 'classy-1', 'classy-2', 'classy-3', 'classy-4', 'classy-5',
70
+ 'small-switch-1', 'small-switch-2',
71
+ 'natural-1', 'natural-2', 'natural-3',
72
+ 'grey-friend-1', 'grey-friend-2',
73
+ 'shade-1', 'shade-2', 'shade-3', 'shade-4'
74
+ ].map((color) => (
75
+ <ProgressBar key={color} progress={75} color={color} label={`${color} bar`} />
76
+ ))}
77
+ </div>
78
+ );
35
79
 
36
- export const Small = {
37
- args: {
38
- size: 'small',
39
- children: 'This is a small ProgressBar',
40
- },
80
+ export const InteractivePlayground = Template.bind({});
81
+ InteractivePlayground.args = {
82
+ progress: 60,
83
+ color: 'info',
84
+ label: 'Interactive Progress',
85
+ showLabel: true,
41
86
  };
@@ -1,29 +1,130 @@
1
+ /* src/stories/Atoms/RadioButton/RadioButton.css */
1
2
 
2
- .radiobutton {
3
- padding: 16px;
4
- border-radius: 8px;
5
- background-color: #f0f0f0;
6
- border: 1px solid #ddd;
3
+ /* Base RadioButton Styles */
4
+ .radio-button {
5
+ position: relative;
6
+ display: inline-flex;
7
+ align-items: center;
8
+ cursor: pointer;
9
+ font-family: var(--font-family);
10
+ font-size: var(--font-size-base); /* Inherit base font size */
11
+ color: var(--text-color);
12
+ user-select: none;
7
13
  }
8
14
 
9
- .radiobutton--primary {
10
- background-color: #e3f2fd;
11
- border-color: #1e88e5;
15
+ /* Disabled State */
16
+ .radio-button--disabled {
17
+ cursor: not-allowed;
18
+ opacity: 0.6;
12
19
  }
13
20
 
14
- .radiobutton--secondary {
15
- background-color: #fff;
16
- border-color: #ccc;
21
+ /* Hidden RadioButton Input */
22
+ .radio-button input {
23
+ opacity: 0;
24
+ position: absolute;
25
+ cursor: pointer;
26
+ height: 0;
27
+ width: 0;
17
28
  }
18
29
 
19
- .radiobutton--small {
20
- padding: 8px;
30
+ /* Custom RadioButton */
31
+ .radio-button::before {
32
+ content: '';
33
+ display: inline-block;
34
+ width: 16px;
35
+ height: 16px;
36
+ margin-right: 8px;
37
+ border: 2px solid var(--border-color);
38
+ border-radius: 50%;
39
+ background-color: var(--background-color);
40
+ transition: background-color var(--transition-speed), border-color var(--transition-speed);
21
41
  }
22
42
 
23
- .radiobutton--medium {
24
- padding: 16px;
43
+ /* Checked State */
44
+ .radio-button input:checked + .radio-button__label::before {
45
+ background-color: var(--primary-color);
46
+ border-color: var(--primary-color);
25
47
  }
26
48
 
27
- .radiobutton--large {
28
- padding: 32px;
49
+ /* Dot inside radio button */
50
+ .radio-button input:checked + .radio-button__label::after {
51
+ content: '';
52
+ position: absolute;
53
+ left: 6px;
54
+ top: 6px;
55
+ width: 6px;
56
+ height: 6px;
57
+ background-color: var(--text-color-inverse);
58
+ border-radius: 50%;
29
59
  }
60
+
61
+ /* Variants */
62
+ .radio-button--primary::before {
63
+ border-color: var(--primary-color);
64
+ }
65
+
66
+ .radio-button--secondary::before {
67
+ border-color: var(--secondary-color);
68
+ }
69
+
70
+ /* Sizes */
71
+ .radio-button--small {
72
+ font-size: var(--font-size-small); /* Inherit small font size */
73
+ }
74
+
75
+ .radio-button--large {
76
+ font-size: var(--font-size-large); /* Inherit large font size */
77
+ }
78
+
79
+ .radio-button--small::before {
80
+ width: 12px;
81
+ height: 12px;
82
+ }
83
+
84
+ .radio-button--large::before {
85
+ width: 20px;
86
+ height: 20px;
87
+ }
88
+
89
+ /* Color Classes */
90
+ .info {
91
+ --primary-color: var(--info-color);
92
+ }
93
+
94
+ .warning {
95
+ --primary-color: var(--warning-color);
96
+ }
97
+
98
+ .alert {
99
+ --primary-color: var(--alert-color);
100
+ }
101
+
102
+ .success {
103
+ --primary-color: var(--success-color);
104
+ }
105
+
106
+ .neutral {
107
+ --primary-color: var(--neutral-color);
108
+ }
109
+
110
+ .dark {
111
+ --primary-color: var(--dark-color);
112
+ }
113
+
114
+ /* Additional color classes for customization */
115
+ .classy-color-1 { --primary-color: var(--classy-color-1); }
116
+ .classy-color-2 { --primary-color: var(--classy-color-2); }
117
+ .classy-color-3 { --primary-color: var(--classy-color-3); }
118
+ .classy-color-4 { --primary-color: var(--classy-color-4); }
119
+ .classy-color-5 { --primary-color: var(--classy-color-5); }
120
+ .small-switch-color-1 { --primary-color: var(--small-switch-color-1); }
121
+ .small-switch-color-2 { --primary-color: var(--small-switch-color-2); }
122
+ .natural-color-1 { --primary-color: var(--natural-color-1); }
123
+ .natural-color-2 { --primary-color: var(--natural-color-2); }
124
+ .natural-color-3 { --primary-color: var(--natural-color-3); }
125
+ .grey-friend-1 { --primary-color: var(--grey-friend-1); }
126
+ .grey-friend-2 { --primary-color: var(--grey-friend-2); }
127
+ .shade-1 { --primary-color: var(--shade-1); }
128
+ .shade-2 { --primary-color: var(--shade-2); }
129
+ .shade-3 { --primary-color: var(--shade-3); }
130
+ .shade-4 { --primary-color: var(--shade-4); }
@@ -1,41 +1,87 @@
1
-
1
+ // src/stories/Atoms/RadioButton/RadioButton.jsx
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
+ import classNames from 'classnames';
4
5
  import './RadioButton.css';
5
6
 
6
- /**
7
- * RadioButton component for user interaction
8
- */
9
- export const RadioButton = ({ primary, size, children, ...props }) => {
10
- const mode = primary ? 'radiobutton--primary' : 'radiobutton--secondary';
7
+ export const RadioButton = ({
8
+ label,
9
+ checked = false,
10
+ onChange,
11
+ variant = 'primary',
12
+ size = 'normal',
13
+ color = 'info',
14
+ rounded = false,
15
+ disabled = false,
16
+ name = '',
17
+ className = '',
18
+ ...props
19
+ }) => {
20
+ const radioButtonClasses = classNames('radio-button', className, {
21
+ [`radio-button--${variant}`]: variant,
22
+ [`radio-button--${size}`]: size !== 'normal',
23
+ [color]: color,
24
+ 'radio-button--rounded': rounded,
25
+ 'radio-button--disabled': disabled,
26
+ });
27
+
11
28
  return (
12
- <div
13
- className={['radiobutton', `radiobutton--${size}`, mode].join(' ')}
14
- {...props}
15
- >
16
- {children}
17
- </div>
29
+ <label className={radioButtonClasses}>
30
+ <input
31
+ type="radio"
32
+ checked={checked}
33
+ onChange={onChange}
34
+ disabled={disabled}
35
+ name={name}
36
+ {...props}
37
+ />
38
+ <span className="radio-button__label">{label}</span>
39
+ </label>
18
40
  );
19
41
  };
20
42
 
21
43
  RadioButton.propTypes = {
22
- /**
23
- * Is this the primary style for the component?
24
- */
25
- primary: PropTypes.bool,
26
- /**
27
- * Size of the component
28
- */
29
- size: PropTypes.oneOf(['small', 'medium', 'large']),
30
- /**
31
- * Content to be rendered inside the component
32
- */
33
- children: PropTypes.node.isRequired,
44
+ /** Label text for the radio button */
45
+ label: PropTypes.string.isRequired,
46
+ /** Checked state of the radio button */
47
+ checked: PropTypes.bool,
48
+ /** Change handler */
49
+ onChange: PropTypes.func,
50
+ /** Radio button variant */
51
+ variant: PropTypes.oneOf(['primary', 'secondary']),
52
+ /** Size of the radio button */
53
+ size: PropTypes.oneOf(['small', 'normal', 'large']),
54
+ /** Color from the global palette */
55
+ color: PropTypes.oneOf([
56
+ 'info',
57
+ 'warning',
58
+ 'alert',
59
+ 'success',
60
+ 'neutral',
61
+ 'dark',
62
+ 'classy-color-1',
63
+ 'classy-color-2',
64
+ 'classy-color-3',
65
+ 'classy-color-4',
66
+ 'classy-color-5',
67
+ 'small-switch-color-1',
68
+ 'small-switch-color-2',
69
+ 'natural-color-1',
70
+ 'natural-color-2',
71
+ 'natural-color-3',
72
+ 'grey-friend-1',
73
+ 'grey-friend-2',
74
+ 'shade-1',
75
+ 'shade-2',
76
+ 'shade-3',
77
+ 'shade-4',
78
+ ]),
79
+ /** Rounded or squared */
80
+ rounded: PropTypes.bool,
81
+ /** Disabled state */
82
+ disabled: PropTypes.bool,
83
+ /** Name of the radio button group */
84
+ name: PropTypes.string.isRequired,
85
+ /** Additional CSS classes */
86
+ className: PropTypes.string,
34
87
  };
35
-
36
- RadioButton.defaultProps = {
37
- primary: false,
38
- size: 'medium',
39
- };
40
-
41
- export default RadioButton;
@@ -1,41 +1,113 @@
1
-
1
+ // src/stories/Atoms/RadioButton/RadioButton.stories.jsx
2
+ import React, { useState } from 'react';
2
3
  import { RadioButton } from './RadioButton';
4
+ import './RadioButton.css';
3
5
 
4
- // Storybook configuration for RadioButton component
5
6
  export default {
6
7
  title: 'Atoms/Interactive/RadioButton',
7
8
  component: RadioButton,
8
- parameters: {
9
- layout: 'centered',
10
- },
11
9
  argTypes: {
12
- children: { control: 'text' },
10
+ label: { control: 'text', defaultValue: 'Radio Button Label' },
11
+ variant: {
12
+ control: { type: 'select', options: ['primary', 'secondary'] },
13
+ description: 'Radio button variant.',
14
+ },
15
+ size: {
16
+ control: { type: 'select', options: ['small', 'normal', 'large'] },
17
+ description: 'Radio button size.',
18
+ },
19
+ color: {
20
+ control: {
21
+ type: 'select',
22
+ options: [
23
+ 'info',
24
+ 'warning',
25
+ 'alert',
26
+ 'success',
27
+ 'neutral',
28
+ 'dark',
29
+ 'classy-color-1',
30
+ 'classy-color-2',
31
+ 'classy-color-3',
32
+ 'classy-color-4',
33
+ 'classy-color-5',
34
+ 'small-switch-color-1',
35
+ 'small-switch-color-2',
36
+ 'natural-color-1',
37
+ 'natural-color-2',
38
+ 'natural-color-3',
39
+ 'grey-friend-1',
40
+ 'grey-friend-2',
41
+ 'shade-1',
42
+ 'shade-2',
43
+ 'shade-3',
44
+ 'shade-4',
45
+ ],
46
+ },
47
+ description: 'Radio button color.',
48
+ },
49
+ rounded: {
50
+ control: 'boolean',
51
+ description: 'Rounded or squared radio button.',
52
+ },
53
+ disabled: {
54
+ control: 'boolean',
55
+ description: 'Disable the radio button.',
56
+ },
13
57
  },
14
58
  };
15
59
 
16
- export const Primary = {
17
- args: {
18
- primary: true,
19
- children: 'This is a primary RadioButton',
20
- },
21
- };
60
+ /**
61
+ * Primary RadioButton - Normal Size
62
+ */
63
+ export const PrimaryNormal = () => (
64
+ <RadioButton label="Primary Normal RadioButton" variant="primary" size="normal" color="info" name="group1" />
65
+ );
22
66
 
23
- export const Secondary = {
24
- args: {
25
- children: 'This is a secondary RadioButton',
26
- },
27
- };
67
+ /**
68
+ * Secondary RadioButton - Large Size - Rounded
69
+ */
70
+ export const SecondaryLargeRounded = () => (
71
+ <RadioButton label="Secondary Large Rounded RadioButton" variant="secondary" size="large" color="warning" rounded name="group2" />
72
+ );
28
73
 
29
- export const Large = {
30
- args: {
31
- size: 'large',
32
- children: 'This is a large RadioButton',
33
- },
74
+ /**
75
+ * Primary RadioButton - Small Size - Rounded
76
+ */
77
+ export const PrimarySmallRounded = () => (
78
+ <RadioButton label="Primary Small Rounded RadioButton" variant="primary" size="small" color="success" rounded name="group3" />
79
+ );
80
+
81
+ /**
82
+ * Secondary RadioButton - Normal Size
83
+ */
84
+ export const SecondaryNormal = () => (
85
+ <RadioButton label="Secondary Normal RadioButton" variant="secondary" size="normal" color="neutral" name="group4" />
86
+ );
87
+
88
+ /**
89
+ * Interactive RadioButton
90
+ */
91
+ const Template = (args) => {
92
+ const [checked, setChecked] = useState(args.checked || false);
93
+
94
+ const handleChange = (e) => {
95
+ setChecked(e.target.checked);
96
+ if (args.onChange) args.onChange(e);
97
+ };
98
+
99
+ return <RadioButton {...args} checked={checked} onChange={handleChange} />;
34
100
  };
35
101
 
36
- export const Small = {
37
- args: {
38
- size: 'small',
39
- children: 'This is a small RadioButton',
40
- },
102
+ export const InteractiveRadioButton = Template.bind({});
103
+ InteractiveRadioButton.args = {
104
+ label: 'Interactive RadioButton',
105
+ variant: 'primary',
106
+ size: 'normal',
107
+ color: 'info',
108
+ rounded: false,
109
+ disabled: false,
110
+ checked: false,
111
+ name: 'interactive',
41
112
  };
113
+ InteractiveRadioButton.storyName = 'Interactive RadioButton';
@@ -0,0 +1,169 @@
1
+ /* src/stories/Atoms/Range/Range.css */
2
+
3
+ /* Base Range Styles */
4
+ .range {
5
+ display: flex;
6
+ align-items: center;
7
+ width: 100%;
8
+ font-family: var(--font-family);
9
+ font-size: var(--font-size-base);
10
+ color: var(--text-color);
11
+ }
12
+
13
+ .range__label {
14
+ margin-right: var(--spacing-md);
15
+ font-weight: var(--font-weight-medium);
16
+ }
17
+
18
+ .range__wrapper {
19
+ flex-grow: 1;
20
+ position: relative;
21
+ }
22
+
23
+ /* The range input */
24
+ .range__input {
25
+ appearance: none;
26
+ width: 100%;
27
+ height: 8px;
28
+ background: linear-gradient(
29
+ to right,
30
+ var(--primary-color) 0%,
31
+ var(--primary-color) 0%,
32
+ var(--neutral-color) 0%
33
+ );
34
+ border-radius: 5px;
35
+ outline: none;
36
+ transition: background-size var(--transition-speed);
37
+ }
38
+
39
+ /* Thumb Style */
40
+ .range__input::-webkit-slider-thumb {
41
+ appearance: none;
42
+ width: 20px;
43
+ height: 20px;
44
+ background-color: var(--thumb-color); /* Thumb color */
45
+ border-radius: 50%;
46
+ cursor: pointer;
47
+ transition: background-color var(--transition-speed);
48
+ }
49
+
50
+ .range__input::-moz-range-thumb {
51
+ width: 20px;
52
+ height: 20px;
53
+ background-color: var(--thumb-color); /* Thumb color */
54
+ border-radius: 50%;
55
+ cursor: pointer;
56
+ }
57
+
58
+ /* Value Display */
59
+ .range__value {
60
+ margin-left: var(--spacing-md);
61
+ font-weight: var(--font-weight-medium);
62
+ }
63
+
64
+ /* Disabled State */
65
+ .range--disabled .range__input {
66
+ background-color: var(--neutral-color-hover);
67
+ }
68
+
69
+ .range--disabled .range__input::-webkit-slider-thumb {
70
+ background-color: var(--neutral-color-hover);
71
+ }
72
+
73
+ /* Responsive Styles */
74
+ @media (max-width: 768px) {
75
+ .range__input {
76
+ height: 6px;
77
+ }
78
+
79
+ .range__input::-webkit-slider-thumb {
80
+ width: 16px;
81
+ height: 16px;
82
+ }
83
+
84
+ .range__input::-moz-range-thumb {
85
+ width: 16px;
86
+ height: 16px;
87
+ }
88
+ }
89
+
90
+ @media (max-width: 480px) {
91
+ .range__input {
92
+ height: 4px;
93
+ }
94
+
95
+ .range__input::-webkit-slider-thumb {
96
+ width: 12px;
97
+ height: 12px;
98
+ }
99
+
100
+ .range__input::-moz-range-thumb {
101
+ width: 12px;
102
+ height: 12px;
103
+ }
104
+ }
105
+
106
+ /* Color Variants (Track) */
107
+ .range--primary .range__input {
108
+ background: linear-gradient(
109
+ to right,
110
+ var(--primary-color) 0%,
111
+ var(--neutral-color) 0%
112
+ );
113
+ }
114
+
115
+ .range--secondary .range__input {
116
+ background: linear-gradient(
117
+ to right,
118
+ var(--secondary-color) 0%,
119
+ var(--neutral-color) 0%
120
+ );
121
+ }
122
+
123
+ .range--info .range__input {
124
+ background: linear-gradient(
125
+ to right,
126
+ var(--info-color) 0%,
127
+ var(--neutral-color) 0%
128
+ );
129
+ }
130
+
131
+ .range--warning .range__input {
132
+ background: linear-gradient(
133
+ to right,
134
+ var(--warning-color) 0%,
135
+ var(--neutral-color) 0%
136
+ );
137
+ }
138
+
139
+ .range--alert .range__input {
140
+ background: linear-gradient(
141
+ to right,
142
+ var(--alert-color) 0%,
143
+ var(--neutral-color) 0%
144
+ );
145
+ }
146
+
147
+ .range--success .range__input {
148
+ background: linear-gradient(
149
+ to right,
150
+ var(--success-color) 0%,
151
+ var(--neutral-color) 0%
152
+ );
153
+ }
154
+
155
+ .range--neutral .range__input {
156
+ background: linear-gradient(
157
+ to right,
158
+ var(--neutral-color) 0%,
159
+ var(--neutral-color) 0%
160
+ );
161
+ }
162
+
163
+ .range--dark .range__input {
164
+ background: linear-gradient(
165
+ to right,
166
+ var(--dark-color) 0%,
167
+ var(--neutral-color) 0%
168
+ );
169
+ }