@shohojdhara/atomix 0.3.5 → 0.3.6

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 (173) hide show
  1. package/README.md +101 -199
  2. package/atomix.config.ts +241 -0
  3. package/dist/atomix.css +260 -179
  4. package/dist/atomix.css.map +1 -1
  5. package/dist/atomix.min.css +250 -179
  6. package/dist/atomix.min.css.map +1 -1
  7. package/dist/charts.js +61 -66
  8. package/dist/charts.js.map +1 -1
  9. package/dist/core.js +47 -31
  10. package/dist/core.js.map +1 -1
  11. package/dist/forms.js +47 -31
  12. package/dist/forms.js.map +1 -1
  13. package/dist/heavy.js +47 -31
  14. package/dist/heavy.js.map +1 -1
  15. package/dist/index.d.ts +1841 -1633
  16. package/dist/index.esm.js +4975 -4113
  17. package/dist/index.esm.js.map +1 -1
  18. package/dist/index.js +5151 -4290
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.min.js +1 -1
  21. package/dist/index.min.js.map +1 -1
  22. package/dist/theme.d.ts +1572 -1442
  23. package/dist/theme.js +4816 -4080
  24. package/dist/theme.js.map +1 -1
  25. package/package.json +6 -20
  26. package/src/components/Accordion/Accordion.stories.tsx +50 -17
  27. package/src/components/AtomixGlass/AtomixGlass.tsx +65 -31
  28. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +11 -4
  29. package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +1 -32
  30. package/src/components/AtomixGlass/stories/Examples.stories.tsx +2 -2
  31. package/src/components/AtomixGlass/stories/shared-components.tsx +0 -31
  32. package/src/components/Avatar/Avatar.stories.tsx +7 -0
  33. package/src/components/Badge/Badge.stories.tsx +91 -13
  34. package/src/components/Block/Block.stories.tsx +7 -23
  35. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +7 -0
  36. package/src/components/Button/Button.stories.tsx +141 -22
  37. package/src/components/Button/ButtonGroup.stories.tsx +315 -0
  38. package/src/components/Button/ButtonGroup.tsx +67 -0
  39. package/src/components/Button/index.ts +2 -0
  40. package/src/components/Callout/Callout.stories.tsx +8 -6
  41. package/src/components/Card/Card.stories.tsx +82 -28
  42. package/src/components/Chart/AnimatedChart.tsx +0 -1
  43. package/src/components/Chart/AreaChart.tsx +0 -1
  44. package/src/components/Chart/BarChart.tsx +0 -1
  45. package/src/components/Chart/BubbleChart.tsx +0 -1
  46. package/src/components/Chart/CandlestickChart.tsx +0 -1
  47. package/src/components/Chart/Chart.stories.tsx +5 -7
  48. package/src/components/Chart/Chart.tsx +0 -16
  49. package/src/components/Chart/ChartRenderer.tsx +1 -1
  50. package/src/components/Chart/DonutChart.tsx +0 -1
  51. package/src/components/Chart/FunnelChart.tsx +0 -1
  52. package/src/components/Chart/GaugeChart.tsx +0 -1
  53. package/src/components/Chart/HeatmapChart.tsx +0 -1
  54. package/src/components/Chart/LineChart.tsx +0 -1
  55. package/src/components/Chart/MultiAxisChart.tsx +0 -1
  56. package/src/components/Chart/PieChart.tsx +0 -1
  57. package/src/components/Chart/RadarChart.tsx +0 -1
  58. package/src/components/Chart/ScatterChart.tsx +0 -1
  59. package/src/components/Chart/WaterfallChart.tsx +0 -1
  60. package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +7 -0
  61. package/src/components/DataTable/DataTable.stories.tsx +23 -16
  62. package/src/components/DatePicker/DatePicker.stories.tsx +27 -19
  63. package/src/components/Dropdown/Dropdown.stories.tsx +11 -19
  64. package/src/components/EdgePanel/EdgePanel.stories.tsx +1 -0
  65. package/src/components/Footer/Footer.stories.tsx +8 -6
  66. package/src/components/Footer/FooterLink.tsx +9 -2
  67. package/src/components/Form/Checkbox.stories.tsx +7 -0
  68. package/src/components/Form/Form.stories.tsx +7 -0
  69. package/src/components/Form/FormGroup.stories.tsx +9 -1
  70. package/src/components/Form/Input.stories.tsx +69 -16
  71. package/src/components/Form/Radio.stories.tsx +9 -1
  72. package/src/components/Form/Select.stories.tsx +9 -1
  73. package/src/components/Form/Textarea.stories.tsx +10 -2
  74. package/src/components/Hero/Hero.stories.tsx +7 -0
  75. package/src/components/List/List.stories.tsx +7 -0
  76. package/src/components/Messages/Messages.stories.tsx +8 -7
  77. package/src/components/Modal/Modal.stories.tsx +17 -6
  78. package/src/components/Navigation/Menu/Menu.stories.tsx +7 -0
  79. package/src/components/Navigation/Nav/Nav.stories.tsx +7 -0
  80. package/src/components/Navigation/Navbar/Navbar.stories.tsx +1 -0
  81. package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +1 -1
  82. package/src/components/Pagination/Pagination.stories.tsx +188 -111
  83. package/src/components/Pagination/Pagination.tsx +83 -3
  84. package/src/components/PhotoViewer/PhotoViewer.stories.tsx +10 -5
  85. package/src/components/Popover/Popover.stories.tsx +191 -115
  86. package/src/components/ProductReview/ProductReview.stories.tsx +80 -58
  87. package/src/components/Progress/Progress.stories.tsx +79 -49
  88. package/src/components/Rating/Rating.stories.tsx +109 -84
  89. package/src/components/River/River.stories.tsx +194 -114
  90. package/src/components/SectionIntro/SectionIntro.stories.tsx +19 -9
  91. package/src/components/Slider/Slider.stories.tsx +7 -0
  92. package/src/components/Spinner/Spinner.stories.tsx +15 -11
  93. package/src/components/Steps/Steps.stories.tsx +132 -98
  94. package/src/components/Tabs/Tabs.stories.tsx +163 -112
  95. package/src/components/Testimonial/Testimonial.stories.tsx +114 -68
  96. package/src/components/Todo/Todo.stories.tsx +38 -12
  97. package/src/components/Toggle/Toggle.stories.tsx +61 -28
  98. package/src/components/Tooltip/Tooltip.stories.tsx +318 -200
  99. package/src/components/Upload/Upload.stories.tsx +122 -84
  100. package/src/components/VideoPlayer/VideoPlayer.stories.tsx +7 -24
  101. package/src/components/index.ts +1 -0
  102. package/src/lib/composables/useAtomixGlass.ts +2 -3
  103. package/src/lib/composables/useNavbar.ts +0 -10
  104. package/src/lib/config/loader.ts +2 -1
  105. package/src/lib/constants/components.ts +10 -0
  106. package/src/lib/hooks/useComponentCustomization.ts +1 -1
  107. package/src/lib/theme/README.md +174 -0
  108. package/src/lib/theme/adapters/index.ts +31 -0
  109. package/src/lib/theme/adapters/themeAdapter.ts +287 -0
  110. package/src/lib/theme/config/__tests__/configLoader.test.ts +207 -0
  111. package/src/lib/theme/config/configLoader.ts +254 -0
  112. package/src/lib/theme/config/loader.ts +37 -48
  113. package/src/lib/theme/config/types.ts +2 -2
  114. package/src/lib/theme/config/validator.ts +15 -91
  115. package/src/lib/theme/{constants.ts → constants/constants.ts} +0 -18
  116. package/src/lib/theme/constants/index.ts +8 -0
  117. package/src/lib/theme/core/ThemeRegistry.ts +19 -6
  118. package/src/lib/theme/core/__tests__/createTheme.test.ts +132 -0
  119. package/src/lib/theme/core/composeTheme.ts +155 -0
  120. package/src/lib/theme/core/createTheme.ts +94 -0
  121. package/src/lib/theme/{createTheme.ts → core/createThemeObject.ts} +10 -6
  122. package/src/lib/theme/core/index.ts +5 -19
  123. package/src/lib/theme/devtools/Comparator.tsx +346 -22
  124. package/src/lib/theme/devtools/IMPROVEMENTS.md +139 -38
  125. package/src/lib/theme/devtools/Inspector.tsx +335 -51
  126. package/src/lib/theme/devtools/LiveEditor.tsx +478 -107
  127. package/src/lib/theme/devtools/Preview.tsx +471 -221
  128. package/src/lib/theme/{core → devtools}/ThemeValidator.ts +1 -1
  129. package/src/lib/theme/devtools/index.ts +14 -4
  130. package/src/lib/theme/devtools/useHistory.ts +130 -0
  131. package/src/lib/theme/errors/index.ts +12 -0
  132. package/src/lib/theme/generators/cssFile.ts +79 -0
  133. package/src/lib/theme/generators/generateCSS.ts +89 -0
  134. package/src/lib/theme/{generateCSSVariables.ts → generators/generateCSSVariables.ts} +3 -13
  135. package/src/lib/theme/generators/index.ts +19 -0
  136. package/src/lib/theme/i18n/rtl.ts +5 -6
  137. package/src/lib/theme/index.ts +120 -15
  138. package/src/lib/theme/runtime/ThemeApplicator.ts +52 -111
  139. package/src/lib/theme/{ThemeContext.tsx → runtime/ThemeContext.tsx} +1 -1
  140. package/src/lib/theme/runtime/ThemeErrorBoundary.tsx +1 -1
  141. package/src/lib/theme/runtime/ThemeProvider.tsx +456 -179
  142. package/src/lib/theme/runtime/index.ts +1 -2
  143. package/src/lib/theme/runtime/useTheme.ts +1 -2
  144. package/src/lib/theme/test/testTheme.ts +385 -0
  145. package/src/lib/theme/tokens/index.ts +12 -0
  146. package/src/lib/theme/tokens/tokens.ts +721 -0
  147. package/src/lib/theme/types.ts +6 -42
  148. package/src/lib/theme/{utils.ts → utils/domUtils.ts} +2 -2
  149. package/src/lib/theme/utils/index.ts +11 -0
  150. package/src/lib/theme/utils/injectCSS.ts +90 -0
  151. package/src/lib/theme/utils/themeHelpers.ts +78 -0
  152. package/src/lib/theme/{themeUtils.ts → utils/themeUtils.ts} +1 -1
  153. package/src/lib/theme-tools.ts +7 -8
  154. package/src/lib/types/components.ts +40 -130
  155. package/src/lib/utils/componentUtils.ts +1 -1
  156. package/src/styles/01-settings/_settings.design-tokens.scss +4 -1
  157. package/src/styles/02-tools/_tools.button.scss +66 -79
  158. package/src/styles/06-components/_components.atomix-glass.scss +13 -3
  159. package/src/styles/06-components/_components.pagination.scss +88 -0
  160. package/scripts/sync-theme-config.js +0 -309
  161. package/src/lib/theme/composeTheme.ts +0 -370
  162. package/src/lib/theme/core/ThemeCache.ts +0 -283
  163. package/src/lib/theme/core/ThemeEngine.test.ts +0 -146
  164. package/src/lib/theme/core/ThemeEngine.ts +0 -665
  165. package/src/lib/theme/createThemeFromConfig.ts +0 -132
  166. package/src/lib/theme/devtools/CLI.ts +0 -364
  167. package/src/lib/theme/runtime/ThemeManager.test.ts +0 -192
  168. package/src/lib/theme/runtime/ThemeManager.ts +0 -446
  169. package/src/styles/03-generic/_generated-root.css +0 -26
  170. package/src/themes/README.md +0 -442
  171. package/src/themes/themes.config.js +0 -68
  172. /package/src/lib/theme/{cssVariableMapper.ts → adapters/cssVariableMapper.ts} +0 -0
  173. /package/src/lib/theme/{errors.ts → errors/errors.ts} +0 -0
@@ -2,28 +2,39 @@ import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
3
  import { Input } from './Input';
4
4
  import { MagnifyingGlass, Envelope, Lock, User, Phone, Calendar } from '@phosphor-icons/react';
5
+ import { SIZES, THEME_COLORS } from '../../lib/constants/components';
5
6
 
6
7
  const meta = {
7
8
  title: 'Components/Form/Input',
8
9
  component: Input,
9
10
  parameters: {
10
11
  layout: 'centered',
12
+ docs: {
13
+ description: {
14
+ component:
15
+ 'The Input component provides a text input field for user data entry. It supports various input types, sizes, validation states, and can include icons and clear buttons. Inputs are essential form elements for collecting user information and can be customized to match your design system.',
16
+ },
17
+ },
11
18
  },
19
+ tags: ['autodocs'],
12
20
  argTypes: {
13
21
  type: {
14
22
  control: { type: 'select' },
15
23
  options: ['text', 'email', 'password', 'number', 'search', 'tel', 'url'],
16
24
  description: 'Input type',
25
+ defaultValue: 'text',
17
26
  },
18
27
  size: {
19
28
  control: { type: 'select' },
20
- options: ['sm', 'md', 'lg'],
29
+ options: SIZES,
21
30
  description: 'Size of the input',
31
+ defaultValue: 'md',
22
32
  },
23
33
  variant: {
24
34
  control: { type: 'select' },
25
- options: ['primary', 'success', 'error', 'warning', 'info'],
35
+ options: THEME_COLORS,
26
36
  description: 'Color variant of the input',
37
+ defaultValue: 'secondary',
27
38
  },
28
39
  disabled: {
29
40
  control: 'boolean',
@@ -67,7 +78,9 @@ const meta = {
67
78
  export default meta;
68
79
  type Story = StoryObj<typeof meta>;
69
80
 
70
- // Basic text input
81
+ /**
82
+ * Basic text input with placeholder.
83
+ */
71
84
  export const Basic: Story = {
72
85
  args: {
73
86
  placeholder: 'Enter text here',
@@ -75,7 +88,9 @@ export const Basic: Story = {
75
88
  },
76
89
  };
77
90
 
78
- // Input sizes
91
+ /**
92
+ * Showcase of all input sizes (small, medium, large).
93
+ */
79
94
  export const Sizes: Story = {
80
95
  render: () => (
81
96
  <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
@@ -86,7 +101,9 @@ export const Sizes: Story = {
86
101
  ),
87
102
  };
88
103
 
89
- // Input types
104
+ /**
105
+ * Showcase of different input types (text, email, password, number, search, tel, url).
106
+ */
90
107
  export const Types: Story = {
91
108
  render: () => (
92
109
  <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
@@ -101,7 +118,9 @@ export const Types: Story = {
101
118
  ),
102
119
  };
103
120
 
104
- // Input variants
121
+ /**
122
+ * Showcase of input color variants (primary, success, error, warning, info).
123
+ */
105
124
  export const Variants: Story = {
106
125
  render: () => (
107
126
  <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
@@ -114,7 +133,9 @@ export const Variants: Story = {
114
133
  ),
115
134
  };
116
135
 
117
- // States
136
+ /**
137
+ * Showcase of input states (default, disabled, valid, invalid).
138
+ */
118
139
  export const States: Story = {
119
140
  render: () => (
120
141
  <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
@@ -126,7 +147,9 @@ export const States: Story = {
126
147
  ),
127
148
  };
128
149
 
129
- // Prefix and Suffix Icons
150
+ /**
151
+ * Input with prefix and suffix icons for enhanced UX.
152
+ */
130
153
  export const WithIcons: Story = {
131
154
  render: () => (
132
155
  <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
@@ -153,7 +176,9 @@ export const WithIcons: Story = {
153
176
  ),
154
177
  };
155
178
 
156
- // Clearable Input
179
+ /**
180
+ * Input with clear button that appears when there's a value.
181
+ */
157
182
  export const Clearable: Story = {
158
183
  render: () => {
159
184
  const [value, setValue] = React.useState('');
@@ -177,7 +202,9 @@ export const Clearable: Story = {
177
202
  },
178
203
  };
179
204
 
180
- // Character Counter
205
+ /**
206
+ * Input with character counter showing remaining characters.
207
+ */
181
208
  export const WithCounter: Story = {
182
209
  render: () => {
183
210
  const [value, setValue] = React.useState('');
@@ -202,7 +229,9 @@ export const WithCounter: Story = {
202
229
  },
203
230
  };
204
231
 
205
- // Password Toggle
232
+ /**
233
+ * Password input with visibility toggle button.
234
+ */
206
235
  export const PasswordToggle: Story = {
207
236
  render: () => {
208
237
  const [password, setPassword] = React.useState('');
@@ -228,7 +257,9 @@ export const PasswordToggle: Story = {
228
257
  },
229
258
  };
230
259
 
231
- // Error Messages and Helper Text
260
+ /**
261
+ * Input with error messages and helper text for validation feedback.
262
+ */
232
263
  export const WithMessages: Story = {
233
264
  render: () => {
234
265
  const [email, setEmail] = React.useState('');
@@ -263,7 +294,9 @@ export const WithMessages: Story = {
263
294
  },
264
295
  };
265
296
 
266
- // Full Width
297
+ /**
298
+ * Full-width input that takes the full width of its container.
299
+ */
267
300
  export const FullWidth: Story = {
268
301
  render: () => (
269
302
  <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '100%', maxWidth: '500px' }}>
@@ -277,8 +310,17 @@ export const FullWidth: Story = {
277
310
  ),
278
311
  };
279
312
 
280
- // Comprehensive Example
313
+ /**
314
+ * Comprehensive example showcasing multiple input features together.
315
+ */
281
316
  export const Comprehensive: Story = {
317
+ parameters: {
318
+ docs: {
319
+ description: {
320
+ story: 'A comprehensive example demonstrating multiple input features including icons, clearable functionality, password toggle, character counter, and helper text in a form-like layout.',
321
+ },
322
+ },
323
+ },
282
324
  render: () => {
283
325
  const [search, setSearch] = React.useState('');
284
326
  const [password, setPassword] = React.useState('');
@@ -335,7 +377,9 @@ export const Comprehensive: Story = {
335
377
  },
336
378
  };
337
379
 
338
- // Glass Effect
380
+ /**
381
+ * Input with glass morphism effect enabled.
382
+ */
339
383
  export const Glass: Story = {
340
384
  args: {
341
385
  placeholder: 'Glass Input',
@@ -400,8 +444,17 @@ export const GlassVariants: Story = {
400
444
  ),
401
445
  };
402
446
 
403
- // Glass Showcase
447
+ /**
448
+ * Comprehensive showcase of glass morphism effects on inputs.
449
+ */
404
450
  export const GlassShowcase: Story = {
451
+ parameters: {
452
+ docs: {
453
+ description: {
454
+ story: 'Demonstrates glass morphism effects on inputs with different modes and configurations, showing how inputs look over colorful backgrounds.',
455
+ },
456
+ },
457
+ },
405
458
  render: () => (
406
459
  <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
407
460
  {/* Basic Glass */}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { Meta, StoryObj } from '@storybook/react';
2
3
  import { Radio } from './Radio';
3
4
 
@@ -6,7 +7,14 @@ const meta = {
6
7
  component: Radio,
7
8
  parameters: {
8
9
  layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component:
13
+ 'The Radio component allows users to select a single option from a group of mutually exclusive options. Radio buttons are typically used in groups where only one selection is allowed. They provide clear visual feedback and support keyboard navigation.',
14
+ },
15
+ },
9
16
  },
17
+ tags: ['autodocs'],
10
18
  argTypes: {
11
19
  label: {
12
20
  control: 'text',
@@ -134,7 +142,7 @@ export const GlassCustom: Story = {
134
142
  saturation: 200,
135
143
  aberrationIntensity: 0.8,
136
144
  cornerRadius: 12,
137
- },
145
+ } as any,
138
146
  },
139
147
  render: (args: any) => (
140
148
  <div
@@ -1,17 +1,25 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { useState } from 'react';
3
3
  import { Select } from './Select';
4
+ import { SIZES } from '../../lib/constants/components';
4
5
 
5
6
  const meta = {
6
7
  title: 'Components/Form/Select',
7
8
  component: Select,
8
9
  parameters: {
9
10
  layout: 'centered',
11
+ docs: {
12
+ description: {
13
+ component:
14
+ 'The Select component provides a dropdown menu for selecting one or more options from a list. It supports single and multiple selection modes, validation states, and can be customized with different sizes. Select components are essential for forms requiring user choice from predefined options.',
15
+ },
16
+ },
10
17
  },
18
+ tags: ['autodocs'],
11
19
  argTypes: {
12
20
  size: {
13
21
  control: { type: 'select' },
14
- options: ['sm', 'md', 'lg'],
22
+ options: SIZES,
15
23
  description: 'Size of the select',
16
24
  },
17
25
  disabled: {
@@ -1,12 +1,20 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Textarea } from './Textarea';
3
+ import { SIZES, THEME_COLORS } from '../../lib/constants/components';
3
4
 
4
5
  const meta = {
5
6
  title: 'Components/Form/Textarea',
6
7
  component: Textarea,
7
8
  parameters: {
8
9
  layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component:
13
+ 'The Textarea component provides a multi-line text input field for longer content. It supports various sizes, validation states, and can be customized with different variants. Textareas are ideal for comments, descriptions, or any content requiring multiple lines of input.',
14
+ },
15
+ },
9
16
  },
17
+ tags: ['autodocs'],
10
18
  argTypes: {
11
19
  value: {
12
20
  control: 'text',
@@ -26,12 +34,12 @@ const meta = {
26
34
  },
27
35
  size: {
28
36
  control: { type: 'select' },
29
- options: ['sm', 'md', 'lg'],
37
+ options: SIZES,
30
38
  description: 'Size of the textarea',
31
39
  },
32
40
  variant: {
33
41
  control: { type: 'select' },
34
- options: ['primary', 'secondary', 'success', 'error', 'warning', 'info'],
42
+ options: THEME_COLORS,
35
43
  description: 'Color variant of the textarea',
36
44
  },
37
45
  disabled: {
@@ -27,7 +27,14 @@ const meta = {
27
27
  component: Hero,
28
28
  parameters: {
29
29
  layout: 'padded',
30
+ docs: {
31
+ description: {
32
+ component:
33
+ 'The Hero component creates prominent banner sections typically used at the top of pages. It provides a flexible layout for titles, subtitles, text content, call-to-action buttons, and images. Heroes are ideal for landing pages, marketing sections, or any area requiring prominent visual presentation.',
34
+ },
35
+ },
30
36
  },
37
+ tags: ['autodocs'],
31
38
  argTypes: {
32
39
  title: {
33
40
  control: 'text',
@@ -8,7 +8,14 @@ const meta = {
8
8
  component: List,
9
9
  parameters: {
10
10
  layout: 'centered',
11
+ docs: {
12
+ description: {
13
+ component:
14
+ 'The List component provides a flexible way to display ordered or unordered lists of items. It supports multiple style variants including default, dashed, numbered, and text styles. Lists can be used for navigation, content organization, or any scenario requiring structured item display.',
15
+ },
16
+ },
11
17
  },
18
+ tags: ['autodocs'],
12
19
  argTypes: {
13
20
  variant: {
14
21
  control: { type: 'select' },
@@ -1,9 +1,9 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { useState } from 'react';
3
3
  import { MessageItem } from '../../lib/types/components';
4
4
  import { Messages } from './Messages';
5
5
 
6
- const meta: Meta<typeof Messages> = {
6
+ const meta = {
7
7
  title: 'Components/Messages',
8
8
  component: Messages,
9
9
  parameters: {
@@ -11,10 +11,11 @@ const meta: Meta<typeof Messages> = {
11
11
  docs: {
12
12
  description: {
13
13
  component:
14
- 'Messages component for displaying chat conversations with support for text messages, images, and file attachments.',
14
+ 'The Messages component provides a complete chat interface for displaying conversations. It supports text messages, images, file attachments, timestamps, and user avatars. Messages are ideal for chat applications, support systems, or any scenario requiring real-time or historical message display.',
15
15
  },
16
16
  },
17
17
  },
18
+ tags: ['autodocs'],
18
19
  argTypes: {
19
20
  messages: { control: 'object' },
20
21
  width: { control: 'text' },
@@ -23,13 +24,13 @@ const meta: Meta<typeof Messages> = {
23
24
  otherName: { control: 'text' },
24
25
  otherAvatar: { control: 'text' },
25
26
  selfAvatar: { control: 'text' },
26
- placeholder: { control: 'text' },
27
- disabled: { control: 'boolean' },
27
+ placeholder: { control: 'text', description: 'Placeholder text for the input field' },
28
+ disabled: { control: 'boolean', description: 'Whether the messages component is disabled' },
28
29
  },
29
- };
30
+ } satisfies Meta<typeof Messages>;
30
31
 
31
32
  export default meta;
32
- type Story = StoryObj<typeof Messages>;
33
+ type Story = StoryObj<typeof meta>;
33
34
 
34
35
  export const Default: Story = {
35
36
  args: {
@@ -1,16 +1,27 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { useState } from 'react';
3
+ import type { AtomixGlassProps } from '../../lib/types/components';
3
4
  import Modal from './Modal';
4
5
 
5
- const meta: Meta<typeof Modal> = {
6
+ // Helper type for glass props in stories (without children requirement)
7
+ type GlassProps = boolean | Omit<AtomixGlassProps, 'children'>;
8
+
9
+ const meta = {
6
10
  title: 'Components/Modal',
7
11
  component: Modal,
8
12
  parameters: {
9
13
  layout: 'centered',
14
+ docs: {
15
+ description: {
16
+ component:
17
+ 'The Modal component displays content in a focused overlay dialog. It provides a way to present important information or actions that require user attention. Modals support various sizes, can include headers and footers, and support glass morphism effects.',
18
+ },
19
+ },
10
20
  },
21
+ tags: ['autodocs'],
11
22
  argTypes: {
12
23
  size: {
13
- control: 'select',
24
+ control: { type: 'select' },
14
25
  options: ['sm', 'md', 'lg', 'xl'],
15
26
  description: 'Size of the modal',
16
27
  defaultValue: 'md',
@@ -35,10 +46,10 @@ const meta: Meta<typeof Modal> = {
35
46
  description: 'Enable glass morphism effect',
36
47
  },
37
48
  },
38
- };
49
+ } satisfies Meta<typeof Modal>;
39
50
 
40
51
  export default meta;
41
- type Story = StoryObj<typeof Modal>;
52
+ type Story = StoryObj<typeof meta>;
42
53
 
43
54
  /**
44
55
  * Basic modal example with a button to trigger opening.
@@ -377,7 +388,7 @@ export const GlassModalCustom: Story = {
377
388
  aberrationIntensity: 2,
378
389
  cornerRadius: 20,
379
390
  mode: 'polar',
380
- } as any
391
+ } as GlassProps
381
392
  }
382
393
  footer={
383
394
  <>
@@ -6,7 +6,14 @@ const meta = {
6
6
  component: Menu,
7
7
  parameters: {
8
8
  layout: 'centered',
9
+ docs: {
10
+ description: {
11
+ component:
12
+ 'The Menu component provides a vertical list of menu items, typically used in dropdowns, sidebars, or context menus. It supports dividers, icons, and can be nested. Menus are ideal for organizing navigation options, actions, or any hierarchical list of choices.',
13
+ },
14
+ },
9
15
  },
16
+ tags: ['autodocs'],
10
17
  argTypes: {
11
18
  disabled: {
12
19
  control: 'boolean',
@@ -9,7 +9,14 @@ const meta = {
9
9
  component: Nav,
10
10
  parameters: {
11
11
  layout: 'centered',
12
+ docs: {
13
+ description: {
14
+ component:
15
+ 'The Nav component provides a horizontal navigation bar for organizing links and menu items. It supports various alignment options, can include dropdowns, and provides a clean interface for site navigation. Nav components are essential for primary site navigation and work seamlessly with NavItem and NavDropdown components.',
16
+ },
17
+ },
12
18
  },
19
+ tags: ['autodocs'],
13
20
  argTypes: {
14
21
  alignment: {
15
22
  control: { type: 'select' },
@@ -71,6 +71,7 @@ The Navbar component provides a responsive navigation header with brand, navigat
71
71
  },
72
72
  },
73
73
  },
74
+ tags: ['autodocs'],
74
75
  argTypes: {
75
76
  position: {
76
77
  control: { type: 'select' },
@@ -138,7 +138,7 @@ The SideMenu component provides a collapsible navigation menu with title and men
138
138
  } satisfies Meta<typeof SideMenu>;
139
139
 
140
140
  export default meta;
141
- type Story = StoryObj<typeof SideMenu>;
141
+ type Story = StoryObj<typeof meta>;
142
142
 
143
143
  // Default SideMenu
144
144
  export const Default: Story = {