this.gui 1.0.14 → 1.0.16

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 (259) hide show
  1. package/README.md +0 -39
  2. package/dist/style.css +1 -1
  3. package/dist/this-gui.es.js +3751 -1882
  4. package/dist/this-gui.umd.js +34 -22
  5. package/package.json +14 -12
  6. package/src/App.jsx +50 -21
  7. package/src/SiteBuilder.jsx +39 -0
  8. package/src/index.mdx +10 -0
  9. package/src/main.jsx +11 -14
  10. package/src/scripts/postinstall.js +28 -31
  11. package/src/scripts/verifyLayouts.js +175 -0
  12. package/src/scripts/verifyTemplates.js +154 -0
  13. package/src/stories/Atoms/Alert/Alert.css +196 -14
  14. package/src/stories/Atoms/Alert/Alert.jsx +43 -28
  15. package/src/stories/Atoms/Alert/Alert.stories.jsx +154 -28
  16. package/src/stories/Atoms/Audio/Audio.css +246 -16
  17. package/src/stories/Atoms/Audio/Audio.jsx +204 -29
  18. package/src/stories/Atoms/Audio/Audio.stories.jsx +178 -28
  19. package/src/stories/Atoms/Badge/Badge.css +234 -15
  20. package/src/stories/Atoms/Badge/Badge.jsx +44 -31
  21. package/src/stories/Atoms/Badge/Badge.stories.jsx +108 -29
  22. package/src/stories/Atoms/Button/Button.css +106 -45
  23. package/src/stories/Atoms/Button/Button.jsx +31 -82
  24. package/src/stories/Atoms/Button/Button.stories.jsx +170 -40
  25. package/src/stories/Atoms/Caption/Caption.css +156 -16
  26. package/src/stories/Atoms/Caption/Caption.jsx +62 -31
  27. package/src/stories/Atoms/Caption/Caption.stories.jsx +194 -28
  28. package/src/stories/Atoms/Checkbox/Checkbox.css +168 -15
  29. package/src/stories/Atoms/Checkbox/Checkbox.jsx +73 -31
  30. package/src/stories/Atoms/Checkbox/Checkbox.stories.jsx +98 -27
  31. package/src/stories/Atoms/Container/Container.css +75 -15
  32. package/src/stories/Atoms/Container/Container.jsx +41 -28
  33. package/src/stories/Atoms/Container/Container.stories.jsx +92 -29
  34. package/src/stories/Atoms/Divider/Divider.css +131 -13
  35. package/src/stories/Atoms/Divider/Divider.jsx +54 -33
  36. package/src/stories/Atoms/Divider/Divider.stories.jsx +93 -29
  37. package/src/stories/Atoms/Heading/Heading.css +99 -16
  38. package/src/stories/Atoms/Heading/Heading.jsx +57 -29
  39. package/src/stories/Atoms/Heading/Heading.stories.jsx +117 -28
  40. package/src/stories/Atoms/Icon/Icon.css +219 -27
  41. package/src/stories/Atoms/Icon/Icon.jsx +67 -38
  42. package/src/stories/Atoms/Icon/Icon.stories.jsx +156 -51
  43. package/src/stories/Atoms/Image/Image.css +231 -15
  44. package/src/stories/Atoms/Image/Image.jsx +166 -32
  45. package/src/stories/Atoms/Image/Image.stories.jsx +319 -28
  46. package/src/stories/Atoms/Label/Label.css +158 -16
  47. package/src/stories/Atoms/Label/Label.jsx +61 -31
  48. package/src/stories/Atoms/Label/Label.stories.jsx +167 -28
  49. package/src/stories/Atoms/Link/Link.css +58 -16
  50. package/src/stories/Atoms/Link/Link.jsx +73 -32
  51. package/src/stories/Atoms/Link/Link.stories.jsx +141 -29
  52. package/src/stories/Atoms/Loader/Loader.css +93 -16
  53. package/src/stories/Atoms/Loader/Loader.jsx +47 -30
  54. package/src/stories/Atoms/Loader/Loader.stories.jsx +86 -28
  55. package/src/stories/Atoms/Logo/Logo.css +94 -0
  56. package/src/stories/Atoms/Logo/Logo.jsx +53 -0
  57. package/src/stories/Atoms/Logo/Logo.stories.jsx +120 -0
  58. package/src/stories/Atoms/Paragraph/Paragraph.css +167 -16
  59. package/src/stories/Atoms/Paragraph/Paragraph.jsx +67 -31
  60. package/src/stories/Atoms/Paragraph/Paragraph.stories.jsx +130 -28
  61. package/src/stories/Atoms/ProgressBar/ProgressBar.css +115 -17
  62. package/src/stories/Atoms/ProgressBar/ProgressBar.jsx +30 -31
  63. package/src/stories/Atoms/ProgressBar/ProgressBar.stories.jsx +72 -27
  64. package/src/stories/Atoms/RadioButton/RadioButton.css +118 -17
  65. package/src/stories/Atoms/RadioButton/RadioButton.jsx +77 -31
  66. package/src/stories/Atoms/RadioButton/RadioButton.stories.jsx +99 -27
  67. package/src/stories/Atoms/Range/Range.css +169 -0
  68. package/src/stories/Atoms/Range/Range.jsx +87 -0
  69. package/src/stories/Atoms/Range/Range.stories.jsx +110 -0
  70. package/src/stories/Atoms/Select/Select.css +74 -16
  71. package/src/stories/Atoms/Select/Select.jsx +62 -30
  72. package/src/stories/Atoms/Select/Select.stories.jsx +95 -27
  73. package/src/stories/Atoms/Slider/Slider.css +77 -16
  74. package/src/stories/Atoms/Slider/Slider.jsx +119 -31
  75. package/src/stories/Atoms/Slider/Slider.stories.jsx +77 -28
  76. package/src/stories/Atoms/Snackbar/Snackbar.css +297 -13
  77. package/src/stories/Atoms/Snackbar/Snackbar.jsx +62 -31
  78. package/src/stories/Atoms/Snackbar/Snackbar.stories.jsx +63 -26
  79. package/src/stories/Atoms/Spacer/Spacer.css +101 -16
  80. package/src/stories/Atoms/Spacer/Spacer.jsx +26 -32
  81. package/src/stories/Atoms/Spacer/Spacer.stories.jsx +50 -30
  82. package/src/stories/Atoms/Spinner/Spinner.css +97 -16
  83. package/src/stories/Atoms/Spinner/Spinner.jsx +50 -26
  84. package/src/stories/Atoms/Spinner/Spinner.stories.jsx +47 -30
  85. package/src/stories/Atoms/Tag/Tag.css +97 -14
  86. package/src/stories/Atoms/Tag/Tag.jsx +58 -24
  87. package/src/stories/Atoms/Tag/Tag.stories.jsx +55 -29
  88. package/src/stories/Atoms/TextArea/TextArea.css +84 -15
  89. package/src/stories/Atoms/TextArea/TextArea.jsx +107 -31
  90. package/src/stories/Atoms/TextArea/TextArea.stories.jsx +24 -30
  91. package/src/stories/Atoms/TextInput/TextInput.css +89 -17
  92. package/src/stories/Atoms/TextInput/TextInput.jsx +118 -27
  93. package/src/stories/Atoms/TextInput/TextInput.stories.jsx +52 -25
  94. package/src/stories/Atoms/Toggle/Toggle.css +105 -17
  95. package/src/stories/Atoms/Toggle/Toggle.jsx +55 -28
  96. package/src/stories/Atoms/Toggle/Toggle.stories.jsx +23 -30
  97. package/src/stories/Atoms/Tooltip/Tooltip.css +367 -14
  98. package/src/stories/Atoms/Tooltip/Tooltip.jsx +32 -28
  99. package/src/stories/Atoms/Tooltip/Tooltip.stories.jsx +41 -31
  100. package/src/stories/Atoms/Video/Video.css +27 -18
  101. package/src/stories/Atoms/Video/Video.jsx +65 -29
  102. package/src/stories/Atoms/Video/Video.stories.jsx +29 -30
  103. package/src/stories/Atoms/index.js +5 -2
  104. package/src/stories/Atoms/meta_Atoms.js +3 -1
  105. package/src/stories/Layouts/Accordion/Accordion.css +16 -0
  106. package/src/stories/Layouts/Accordion/Accordion.jsx +31 -0
  107. package/src/stories/Layouts/Accordion/Accordion.stories.jsx +28 -0
  108. package/src/stories/Layouts/DropdownMenu/DropdownMenu.css +16 -0
  109. package/src/stories/Layouts/DropdownMenu/DropdownMenu.jsx +31 -0
  110. package/src/stories/Layouts/DropdownMenu/DropdownMenu.stories.jsx +28 -0
  111. package/src/stories/Layouts/Flexbox/Flexbox.css +16 -0
  112. package/src/stories/Layouts/Flexbox/Flexbox.jsx +11 -0
  113. package/src/stories/Layouts/Flexbox/Flexbox.stories.jsx +28 -0
  114. package/src/stories/Layouts/Footer/Footer.css +16 -0
  115. package/src/stories/Layouts/Footer/Footer.jsx +31 -0
  116. package/src/stories/Layouts/Footer/Footer.stories.jsx +28 -0
  117. package/src/stories/Layouts/Grid/Grid.jsx +2 -4
  118. package/src/stories/Layouts/Grid/Grid.stories.jsx +20 -18
  119. package/src/stories/Layouts/Header/Header.css +16 -0
  120. package/src/stories/Layouts/Header/Header.jsx +31 -0
  121. package/src/stories/Layouts/Header/Header.stories.jsx +28 -0
  122. package/src/stories/Layouts/HeroBanner/HeroBanner.css +16 -0
  123. package/src/stories/Layouts/HeroBanner/HeroBanner.jsx +31 -0
  124. package/src/stories/Layouts/HeroBanner/HeroBanner.stories.jsx +28 -0
  125. package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.css +16 -0
  126. package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.jsx +31 -0
  127. package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.stories.jsx +28 -0
  128. package/src/stories/Layouts/Pagination/Pagination.css +16 -0
  129. package/src/stories/Layouts/Pagination/Pagination.jsx +31 -0
  130. package/src/stories/Layouts/Pagination/Pagination.stories.jsx +28 -0
  131. package/src/stories/Layouts/Section/Section.css +16 -0
  132. package/src/stories/Layouts/Section/Section.jsx +31 -0
  133. package/src/stories/Layouts/Section/Section.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 +31 -0
  141. package/src/stories/Layouts/meta_Layouts.js +31 -0
  142. package/src/stories/Molecules/Navbar/Navbar.css +63 -59
  143. package/src/stories/Molecules/Navbar/Navbar.jsx +43 -48
  144. package/src/stories/Molecules/Navbar/Navbar.stories.jsx +58 -8
  145. package/src/stories/Molecules/SearchBar/SearchBar.css +66 -1
  146. package/src/stories/Molecules/SearchBar/SearchBar.jsx +59 -11
  147. package/src/stories/Molecules/SearchBar/SearchBar.stories.jsx +16 -7
  148. package/src/stories/Molecules/SelectTheme/SelectTheme.jsx +16 -38
  149. package/src/stories/Molecules/SelectTheme/SelectTheme.stories.jsx +1 -2
  150. package/src/stories/Molecules/Sidebar/Sidebar.css +65 -2
  151. package/src/stories/Molecules/Sidebar/Sidebar.jsx +66 -11
  152. package/src/stories/Molecules/Sidebar/Sidebar.stories.jsx +20 -5
  153. package/src/stories/Templates/AdminDashboard/AdminDashboard.css +7 -0
  154. package/src/stories/Templates/AdminDashboard/AdminDashboard.jsx +24 -0
  155. package/src/stories/Templates/AdminDashboard/AdminDashboard.stories.jsx +20 -0
  156. package/src/stories/Templates/CallToAction/CallToAction.css +7 -0
  157. package/src/stories/Templates/CallToAction/CallToAction.jsx +24 -0
  158. package/src/stories/Templates/CallToAction/CallToAction.stories.jsx +20 -0
  159. package/src/stories/Templates/FeaturesList/FeaturesList.css +7 -0
  160. package/src/stories/Templates/FeaturesList/FeaturesList.jsx +24 -0
  161. package/src/stories/Templates/FeaturesList/FeaturesList.stories.jsx +20 -0
  162. package/src/stories/Templates/FormSection/FormSection.css +7 -0
  163. package/src/stories/Templates/FormSection/FormSection.jsx +24 -0
  164. package/src/stories/Templates/FormSection/FormSection.stories.jsx +20 -0
  165. package/src/stories/Templates/HeroSection/HeroSection.css +7 -0
  166. package/src/stories/Templates/HeroSection/HeroSection.jsx +24 -0
  167. package/src/stories/Templates/HeroSection/HeroSection.stories.jsx +20 -0
  168. package/src/stories/Templates/LocationInfo/LocationInfo.css +7 -0
  169. package/src/stories/Templates/LocationInfo/LocationInfo.jsx +24 -0
  170. package/src/stories/Templates/LocationInfo/LocationInfo.stories.jsx +20 -0
  171. package/src/stories/Templates/ProductPage/ProductPage.css +7 -0
  172. package/src/stories/Templates/ProductPage/ProductPage.jsx +24 -0
  173. package/src/stories/Templates/ProductPage/ProductPage.stories.jsx +20 -0
  174. package/src/stories/Templates/RegistrationPage/RegistrationPage.css +7 -0
  175. package/src/stories/Templates/RegistrationPage/RegistrationPage.jsx +24 -0
  176. package/src/stories/Templates/RegistrationPage/RegistrationPage.stories.jsx +20 -0
  177. package/src/stories/Templates/ShoppingCart/ShoppingCart.css +7 -0
  178. package/src/stories/Templates/ShoppingCart/ShoppingCart.jsx +24 -0
  179. package/src/stories/Templates/ShoppingCart/ShoppingCart.stories.jsx +20 -0
  180. package/src/stories/Templates/SidebarTopNav/SidebarTopNav.css +7 -0
  181. package/src/stories/Templates/SidebarTopNav/SidebarTopNav.jsx +24 -0
  182. package/src/stories/Templates/SidebarTopNav/SidebarTopNav.stories.jsx +20 -0
  183. package/src/stories/Templates/SignInPage/SignInPage.css +7 -0
  184. package/src/stories/Templates/SignInPage/SignInPage.jsx +24 -0
  185. package/src/stories/Templates/SignInPage/SignInPage.stories.jsx +20 -0
  186. package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.css +7 -0
  187. package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.jsx +24 -0
  188. package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.stories.jsx +20 -0
  189. package/src/stories/Templates/Testimonials/Testimonials.css +7 -0
  190. package/src/stories/Templates/Testimonials/Testimonials.jsx +24 -0
  191. package/src/stories/Templates/Testimonials/Testimonials.stories.jsx +20 -0
  192. package/src/stories/Templates/index.js +33 -0
  193. package/src/stories/Templates/{Templates.js → meta_Templates.js} +3 -1
  194. package/src/stories/assets/logo.png +0 -0
  195. package/src/stories/assets/logo.svg +106 -0
  196. package/src/stories/assets/test.svg +3 -0
  197. package/src/themes/README.md +301 -0
  198. package/src/themes/ThemeProvider.jsx +47 -22
  199. package/src/themes/styles/dracula/dark.css +0 -0
  200. package/src/themes/styles/dracula/light.css +0 -0
  201. package/src/themes/styles/github/dark.css +0 -0
  202. package/src/themes/styles/github/light.css +0 -0
  203. package/src/themes/styles/neurons/dark.css +247 -0
  204. package/src/themes/styles/neurons/light.css +280 -0
  205. package/dist/github-3688a83a.js +0 -5
  206. package/dist/gothic-94a7ecd6.js +0 -5
  207. package/dist/newsprint-32bf94d9.js +0 -5
  208. package/dist/night-4a954853.js +0 -5
  209. package/dist/pixyll-94de4610.js +0 -5
  210. package/dist/whitey-db68723e.js +0 -5
  211. package/src/MDXEditor.jsx +0 -32
  212. package/src/stories/Atoms/RangeInput/RangeInput.css +0 -29
  213. package/src/stories/Atoms/RangeInput/RangeInput.jsx +0 -41
  214. package/src/stories/Atoms/RangeInput/RangeInput.stories.jsx +0 -41
  215. package/src/stories/Components.md +0 -189
  216. package/src/stories/Layouts/Layout.js +0 -28
  217. package/src/styles/Header.modules.css +0 -32
  218. package/src/styles/global.css +0 -59
  219. package/src/themes/Themes.js +0 -44
  220. package/src/themes/dark.js +0 -22
  221. package/src/themes/light.js +0 -22
  222. package/src/themes/typ/Readme.md +0 -4
  223. package/src/themes/typ/github/open-sans-v17-latin-ext_latin-700.woff2 +0 -0
  224. package/src/themes/typ/github/open-sans-v17-latin-ext_latin-700italic.woff2 +0 -0
  225. package/src/themes/typ/github/open-sans-v17-latin-ext_latin-italic.woff2 +0 -0
  226. package/src/themes/typ/github/open-sans-v17-latin-ext_latin-regular.woff2 +0 -0
  227. package/src/themes/typ/github.css +0 -416
  228. package/src/themes/typ/gothic/GUST e-foundry License.txt +0 -29
  229. package/src/themes/typ/gothic/didact-gothic-c-ext.woff2 +0 -0
  230. package/src/themes/typ/gothic/didact-gothic-c.woff2 +0 -0
  231. package/src/themes/typ/gothic/texgyreadventor-bold.woff +0 -0
  232. package/src/themes/typ/gothic/texgyreadventor-bolditalic.woff +0 -0
  233. package/src/themes/typ/gothic/texgyreadventor-italic.woff +0 -0
  234. package/src/themes/typ/gothic/texgyreadventor-regular.woff +0 -0
  235. package/src/themes/typ/gothic.css +0 -410
  236. package/src/themes/typ/newsprint/pt-serif-v11-latin-700.woff2 +0 -0
  237. package/src/themes/typ/newsprint/pt-serif-v11-latin-700italic.woff2 +0 -0
  238. package/src/themes/typ/newsprint/pt-serif-v11-latin-italic.woff2 +0 -0
  239. package/src/themes/typ/newsprint/pt-serif-v11-latin-regular.woff2 +0 -0
  240. package/src/themes/typ/newsprint.css +0 -622
  241. package/src/themes/typ/night/codeblock.dark.css +0 -113
  242. package/src/themes/typ/night/credit.html +0 -1
  243. package/src/themes/typ/night/cursor.png +0 -0
  244. package/src/themes/typ/night/cursor@2x.png +0 -0
  245. package/src/themes/typ/night/mermaid.dark.css +0 -7
  246. package/src/themes/typ/night/sourcemode.dark.css +0 -38
  247. package/src/themes/typ/night.css +0 -1032
  248. package/src/themes/typ/pixyll/lato-v14-latin-300.woff +0 -0
  249. package/src/themes/typ/pixyll/lato-v14-latin-300italic.woff +0 -0
  250. package/src/themes/typ/pixyll/lato-v14-latin-900.woff +0 -0
  251. package/src/themes/typ/pixyll/lato-v14-latin-900italic.woff +0 -0
  252. package/src/themes/typ/pixyll/merriweather-v19-latin-300.woff +0 -0
  253. package/src/themes/typ/pixyll/merriweather-v19-latin-300italic.woff +0 -0
  254. package/src/themes/typ/pixyll/merriweather-v19-latin-700.woff +0 -0
  255. package/src/themes/typ/pixyll/merriweather-v19-latin-700italic.woff +0 -0
  256. package/src/themes/typ/pixyll.css +0 -528
  257. package/src/themes/typ/whitey.css +0 -299
  258. /package/src/stories/Molecules/{Molecules.js → meta_Molecules.js} +0 -0
  259. /package/src/stories/Organisms/{Organisms.js → meta_Organisms.js} +0 -0
@@ -1,41 +1,180 @@
1
-
1
+ // src/stories/Atoms/Label/Label.stories.jsx
2
+ import React from 'react';
2
3
  import { Label } from './Label';
4
+ import './Label.css';
3
5
 
4
- // Storybook configuration for Label component
5
6
  export default {
6
7
  title: 'Atoms/Text/Label',
7
8
  component: Label,
8
- parameters: {
9
- layout: 'centered',
10
- },
11
9
  argTypes: {
12
- children: { control: 'text' },
10
+ text: {
11
+ control: 'text',
12
+ description: 'Text content of the label.',
13
+ },
14
+ color: {
15
+ control: {
16
+ type: 'select',
17
+ options: [
18
+ 'primary',
19
+ 'secondary',
20
+ 'info',
21
+ 'warning',
22
+ 'alert',
23
+ 'success',
24
+ 'neutral',
25
+ 'dark',
26
+ 'classy-color-1',
27
+ 'classy-color-2',
28
+ 'classy-color-3',
29
+ 'classy-color-4',
30
+ 'classy-color-5',
31
+ 'small-switch-color-1',
32
+ 'small-switch-color-2',
33
+ 'natural-color-1',
34
+ 'natural-color-2',
35
+ 'natural-color-3',
36
+ 'grey-friend-1',
37
+ 'grey-friend-2',
38
+ 'shade-1',
39
+ 'shade-2',
40
+ 'shade-3',
41
+ 'shade-4',
42
+ ],
43
+ },
44
+ description: 'Color of the label.',
45
+ },
46
+ background: {
47
+ control: 'boolean',
48
+ description: 'Whether the label has a background.',
49
+ },
50
+ shape: {
51
+ control: {
52
+ type: 'select',
53
+ options: ['rounded', 'square', 'pill'],
54
+ },
55
+ description: 'Shape of the label.',
56
+ },
57
+ size: {
58
+ control: {
59
+ type: 'select',
60
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
61
+ },
62
+ description: 'Size of the label.',
63
+ },
64
+ className: {
65
+ control: 'text',
66
+ description: 'Additional CSS classes.',
67
+ },
68
+ style: {
69
+ control: 'object',
70
+ description: 'Inline styles.',
71
+ },
13
72
  },
14
73
  };
15
74
 
16
- export const Primary = {
17
- args: {
18
- primary: true,
19
- children: 'This is a primary Label',
20
- },
21
- };
75
+ /**
76
+ * Primary Label with Background
77
+ */
78
+ export const PrimaryLabel = () => (
79
+ <Label
80
+ text="Primary Label"
81
+ color="primary"
82
+ background={true}
83
+ shape="pill"
84
+ size="md"
85
+ />
86
+ );
22
87
 
23
- export const Secondary = {
24
- args: {
25
- children: 'This is a secondary Label',
26
- },
27
- };
88
+ /**
89
+ * Secondary Label without Background
90
+ */
91
+ export const SecondaryLabel = () => (
92
+ <Label
93
+ text="Secondary Label"
94
+ color="secondary"
95
+ background={false}
96
+ shape="rounded"
97
+ size="md"
98
+ />
99
+ );
28
100
 
29
- export const Large = {
30
- args: {
31
- size: 'large',
32
- children: 'This is a large Label',
33
- },
34
- };
101
+ /**
102
+ * All Color Variations
103
+ */
104
+ export const AllColors = () => (
105
+ <div className="label-colors">
106
+ {[
107
+ 'primary',
108
+ 'secondary',
109
+ 'info',
110
+ 'warning',
111
+ 'alert',
112
+ 'success',
113
+ 'neutral',
114
+ 'dark',
115
+ 'classy-color-1',
116
+ 'classy-color-2',
117
+ 'classy-color-3',
118
+ 'classy-color-4',
119
+ 'classy-color-5',
120
+ 'small-switch-color-1',
121
+ 'small-switch-color-2',
122
+ 'natural-color-1',
123
+ 'natural-color-2',
124
+ 'natural-color-3',
125
+ 'grey-friend-1',
126
+ 'grey-friend-2',
127
+ 'shade-1',
128
+ 'shade-2',
129
+ 'shade-3',
130
+ 'shade-4',
131
+ ].map((color) => (
132
+ <Label
133
+ key={color}
134
+ text={color}
135
+ color={color}
136
+ background={color !== 'secondary'}
137
+ shape="rounded"
138
+ size="sm"
139
+ />
140
+ ))}
141
+ </div>
142
+ );
35
143
 
36
- export const Small = {
37
- args: {
38
- size: 'small',
39
- children: 'This is a small Label',
40
- },
144
+ /**
145
+ * Label Shapes
146
+ */
147
+ export const LabelShapes = () => (
148
+ <div className="label-shapes">
149
+ <Label text="Rounded" color="info" background={true} shape="rounded" size="md" />
150
+ <Label text="Square" color="warning" background={true} shape="square" size="md" />
151
+ <Label text="Pill" color="success" background={true} shape="pill" size="md" />
152
+ </div>
153
+ );
154
+
155
+ /**
156
+ * Label Sizes
157
+ */
158
+ export const LabelSizes = () => (
159
+ <div className="label-sizes">
160
+ <Label text="XS" color="neutral" background={true} shape="rounded" size="xs" />
161
+ <Label text="SM" color="neutral" background={true} shape="rounded" size="sm" />
162
+ <Label text="MD" color="neutral" background={true} shape="rounded" size="md" />
163
+ <Label text="LG" color="neutral" background={true} shape="rounded" size="lg" />
164
+ <Label text="XL" color="neutral" background={true} shape="rounded" size="xl" />
165
+ </div>
166
+ );
167
+
168
+ /**
169
+ * Interactive Label
170
+ */
171
+ const Template = (args) => <Label {...args} />;
172
+
173
+ export const InteractiveLabel = Template.bind({});
174
+ InteractiveLabel.args = {
175
+ text: 'Interactive Label',
176
+ color: 'primary',
177
+ background: true,
178
+ shape: 'pill',
179
+ size: 'md',
41
180
  };
@@ -1,29 +1,71 @@
1
+ /* src/stories/Atoms/Link/Link.css */
1
2
 
2
3
  .link {
3
- padding: 16px;
4
- border-radius: 8px;
5
- background-color: #f0f0f0;
6
- border: 1px solid #ddd;
4
+ color: var(--link-color);
5
+ font-size: var(--font-size-base);
6
+ font-family: var(--font-family);
7
+ transition: color var(--transition-speed) ease, text-decoration var(--transition-speed) ease;
7
8
  }
8
9
 
9
- .link--primary {
10
- background-color: #e3f2fd;
11
- border-color: #1e88e5;
10
+ .link--underline {
11
+ text-decoration: underline;
12
12
  }
13
13
 
14
- .link--secondary {
15
- background-color: #fff;
16
- border-color: #ccc;
14
+ .link--no-underline {
15
+ text-decoration: none;
16
+ }
17
+
18
+ .link--bold {
19
+ font-weight: var(--font-weight-bold);
20
+ }
21
+
22
+ .link--external {
23
+ display: inline-flex;
24
+ align-items: center;
25
+ }
26
+
27
+ .link__external-icon {
28
+ margin-left: 0.25em;
29
+ font-size: 0.8em;
30
+ }
31
+
32
+ .link:hover {
33
+ color: var(--link-hover-color);
17
34
  }
18
35
 
19
- .link--small {
20
- padding: 8px;
36
+ .link:hover.text-decoration {
37
+ text-decoration: underline;
38
+ }
39
+
40
+ /* Experimental Preview Styles */
41
+ .link__preview {
42
+ position: fixed;
43
+ top: 50%;
44
+ left: 50%;
45
+ transform: translate(-50%, -50%);
46
+ width: 90%;
47
+ max-width: 700px;
48
+ height: 90%;
49
+ max-height: 500px;
50
+ background-color: #fff;
51
+ border: 2px solid var(--primary-color);
52
+ box-shadow: var(--box-shadow);
53
+ z-index: var(--z-index-modal);
54
+ overflow: hidden;
21
55
  }
22
56
 
23
- .link--medium {
24
- padding: 16px;
57
+ .link__preview-iframe {
58
+ width: 100%;
59
+ height: 100%;
60
+ border: none;
25
61
  }
26
62
 
27
- .link--large {
28
- padding: 32px;
63
+ /* Responsive */
64
+ @media (max-width: 768px) {
65
+ .link__preview {
66
+ width: 95%;
67
+ height: 80%;
68
+ max-width: 90%;
69
+ max-height: 400px;
70
+ }
29
71
  }
@@ -1,41 +1,82 @@
1
-
2
- import React from 'react';
1
+ // src/stories/Atoms/Link/Link.jsx
2
+ import React, { useState } from 'react';
3
3
  import PropTypes from 'prop-types';
4
+ import classNames from 'classnames';
4
5
  import './Link.css';
5
6
 
6
- /**
7
- * Link component for user interaction
8
- */
9
- export const Link = ({ primary, size, children, ...props }) => {
10
- const mode = primary ? 'link--primary' : 'link--secondary';
7
+ export const Link = ({
8
+ text,
9
+ href,
10
+ underline = true,
11
+ bold = false,
12
+ newWindow = false,
13
+ external = false,
14
+ experimentalPreview = false,
15
+ className = '',
16
+ style = {},
17
+ ...props
18
+ }) => {
19
+ const [showPreview, setShowPreview] = useState(false);
20
+
21
+ const handleMouseDown = () => {
22
+ if (experimentalPreview) {
23
+ setShowPreview(true);
24
+ }
25
+ };
26
+
27
+ const handleMouseUp = () => {
28
+ if (experimentalPreview) {
29
+ setShowPreview(false);
30
+ }
31
+ };
32
+
33
+ const linkClasses = classNames('link', className, {
34
+ 'link--underline': underline,
35
+ 'link--no-underline': !underline,
36
+ 'link--bold': bold,
37
+ 'link--external': external,
38
+ });
39
+
11
40
  return (
12
- <div
13
- className={['link', `link--${size}`, mode].join(' ')}
14
- {...props}
15
- >
16
- {children}
17
- </div>
41
+ <>
42
+ <a
43
+ href={href}
44
+ className={linkClasses}
45
+ target={newWindow ? '_blank' : '_self'}
46
+ rel={newWindow ? 'noopener noreferrer' : undefined}
47
+ onMouseDown={handleMouseDown}
48
+ onMouseUp={handleMouseUp}
49
+ onBlur={() => setShowPreview(false)}
50
+ {...props}
51
+ >
52
+ {text} {external && <span className="link__external-icon">🔗</span>}
53
+ </a>
54
+ {showPreview && (
55
+ <div className="link__preview">
56
+ <iframe src={href} title="Preview" className="link__preview-iframe" />
57
+ </div>
58
+ )}
59
+ </>
18
60
  );
19
61
  };
20
62
 
21
63
  Link.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,
34
- };
35
-
36
- Link.defaultProps = {
37
- primary: false,
38
- size: 'medium',
64
+ /** Text content of the link */
65
+ text: PropTypes.string.isRequired,
66
+ /** URL the link points to */
67
+ href: PropTypes.string.isRequired,
68
+ /** Whether the link is underlined */
69
+ underline: PropTypes.bool,
70
+ /** Whether the link text is bold */
71
+ bold: PropTypes.bool,
72
+ /** Whether the link opens in a new window */
73
+ newWindow: PropTypes.bool,
74
+ /** Whether the link is external */
75
+ external: PropTypes.bool,
76
+ /** Enable experimental preview on press */
77
+ experimentalPreview: PropTypes.bool,
78
+ /** Additional CSS classes */
79
+ className: PropTypes.string,
80
+ /** Inline styles */
81
+ style: PropTypes.object,
39
82
  };
40
-
41
- export default Link;
@@ -1,41 +1,153 @@
1
-
1
+ // src/stories/Atoms/Link/Link.stories.jsx
2
+ import React from 'react';
2
3
  import { Link } from './Link';
4
+ import './Link.css';
3
5
 
4
- // Storybook configuration for Link component
5
6
  export default {
6
- title: 'Atoms/Interactive/Link',
7
+ title: 'Atoms/Text/Link',
7
8
  component: Link,
8
- parameters: {
9
- layout: 'centered',
10
- },
11
9
  argTypes: {
12
- children: { control: 'text' },
10
+ text: {
11
+ control: 'text',
12
+ description: 'Text content of the link.',
13
+ },
14
+ href: {
15
+ control: 'text',
16
+ description: 'URL the link points to.',
17
+ },
18
+ underline: {
19
+ control: 'boolean',
20
+ description: 'Whether the link is underlined.',
21
+ },
22
+ bold: {
23
+ control: 'boolean',
24
+ description: 'Whether the link text is bold.',
25
+ },
26
+ newWindow: {
27
+ control: 'boolean',
28
+ description: 'Whether the link opens in a new window.',
29
+ },
30
+ external: {
31
+ control: 'boolean',
32
+ description: 'Whether the link is external.',
33
+ },
34
+ experimentalPreview: {
35
+ control: 'boolean',
36
+ description: 'Enable experimental preview on press.',
37
+ },
38
+ className: {
39
+ control: 'text',
40
+ description: 'Additional CSS classes.',
41
+ },
42
+ style: {
43
+ control: 'object',
44
+ description: 'Inline styles.',
45
+ },
13
46
  },
14
47
  };
15
48
 
16
- export const Primary = {
17
- args: {
18
- primary: true,
19
- children: 'This is a primary Link',
20
- },
21
- };
49
+ /**
50
+ * Default Link
51
+ */
52
+ export const DefaultLink = () => (
53
+ <Link
54
+ text="Visit Neurons.me"
55
+ href="https://neurons.me"
56
+ underline={true}
57
+ bold={false}
58
+ newWindow={false}
59
+ external={false}
60
+ experimentalPreview={false}
61
+ />
62
+ );
22
63
 
23
- export const Secondary = {
24
- args: {
25
- children: 'This is a secondary Link',
26
- },
27
- };
64
+ /**
65
+ * Underlined and Bold Link
66
+ */
67
+ export const UnderlinedBoldLink = () => (
68
+ <Link
69
+ text="Bold & Underlined Link"
70
+ href="https://neurons.me"
71
+ underline={true}
72
+ bold={true}
73
+ newWindow={false}
74
+ external={false}
75
+ experimentalPreview={false}
76
+ />
77
+ );
28
78
 
29
- export const Large = {
30
- args: {
31
- size: 'large',
32
- children: 'This is a large Link',
33
- },
34
- };
79
+ /**
80
+ * No Underline, Not Bold Link
81
+ */
82
+ export const NoUnderlineNotBoldLink = () => (
83
+ <Link
84
+ text="Simple Link"
85
+ href="https://neurons.me"
86
+ underline={false}
87
+ bold={false}
88
+ newWindow={false}
89
+ external={false}
90
+ experimentalPreview={false}
91
+ />
92
+ );
35
93
 
36
- export const Small = {
37
- args: {
38
- size: 'small',
39
- children: 'This is a small Link',
40
- },
94
+ /**
95
+ * Open in New Window Link
96
+ */
97
+ export const OpenInNewWindow = () => (
98
+ <Link
99
+ text="Open in New Window"
100
+ href="https://neurons.me"
101
+ underline={true}
102
+ bold={false}
103
+ newWindow={true}
104
+ external={false}
105
+ experimentalPreview={false}
106
+ />
107
+ );
108
+
109
+ /**
110
+ * External Link with Notification
111
+ */
112
+ export const ExternalLink = () => (
113
+ <Link
114
+ text="External Link"
115
+ href="https://external.com"
116
+ underline={true}
117
+ bold={false}
118
+ newWindow={true}
119
+ external={true}
120
+ experimentalPreview={false}
121
+ />
122
+ );
123
+
124
+ /**
125
+ * Experimental Preview Link
126
+ */
127
+ export const ExperimentalPreview = () => (
128
+ <Link
129
+ text="Preview Link"
130
+ href="https://neurons.me"
131
+ underline={true}
132
+ bold={false}
133
+ newWindow={false}
134
+ external={false}
135
+ experimentalPreview={true}
136
+ />
137
+ );
138
+
139
+ /**
140
+ * Interactive Link
141
+ */
142
+ const Template = (args) => <Link {...args} />;
143
+
144
+ export const InteractiveLink = Template.bind({});
145
+ InteractiveLink.args = {
146
+ text: 'Interactive Link',
147
+ href: 'https://neurons.me',
148
+ underline: true,
149
+ bold: true,
150
+ newWindow: true,
151
+ external: true,
152
+ experimentalPreview: true,
41
153
  };