@shohojdhara/atomix 0.3.15 → 0.4.0

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 (245) hide show
  1. package/build-tools/index.d.ts +31 -30
  2. package/build-tools/package.json +4 -21
  3. package/dist/atomix.css +20924 -2611
  4. package/dist/atomix.css.map +1 -1
  5. package/dist/atomix.min.css +76 -2
  6. package/dist/atomix.min.css.map +1 -1
  7. package/dist/build-tools/index.d.ts +31 -30
  8. package/dist/build-tools/package.json +4 -21
  9. package/dist/charts.js.map +1 -1
  10. package/dist/core.js.map +1 -1
  11. package/dist/forms.js.map +1 -1
  12. package/dist/heavy.js.map +1 -1
  13. package/dist/index.d.ts +144 -18
  14. package/dist/index.esm.js +110 -55
  15. package/dist/index.esm.js.map +1 -1
  16. package/dist/index.js +110 -55
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.min.js +1 -1
  19. package/dist/index.min.js.map +1 -1
  20. package/dist/layout.js.map +1 -1
  21. package/dist/theme.d.ts +9 -9
  22. package/dist/theme.js.map +1 -1
  23. package/package.json +1 -1
  24. package/src/components/Accordion/Accordion.stories.tsx +32 -23
  25. package/src/components/Accordion/Accordion.test.tsx +70 -50
  26. package/src/components/Accordion/Accordion.tsx +99 -94
  27. package/src/components/AtomixGlass/AtomixGlass.test.tsx +1 -1
  28. package/src/components/AtomixGlass/GlassFilter.tsx +9 -16
  29. package/src/components/AtomixGlass/glass-utils.ts +4 -3
  30. package/src/components/AtomixGlass/shader-utils.ts +128 -52
  31. package/src/components/AtomixGlass/stories/Playground.stories.tsx +1 -1
  32. package/src/components/AtomixGlass/stories/Shaders.stories.tsx +1 -1
  33. package/src/components/Avatar/Avatar.stories.tsx +45 -62
  34. package/src/components/Avatar/Avatar.tsx +58 -56
  35. package/src/components/Badge/Badge.stories.tsx +20 -9
  36. package/src/components/Badge/Badge.test.tsx +41 -41
  37. package/src/components/Badge/Badge.tsx +64 -62
  38. package/src/components/Block/Block.stories.tsx +14 -4
  39. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +9 -8
  40. package/src/components/Breadcrumb/Breadcrumb.tsx +62 -60
  41. package/src/components/Button/Button.stories.tsx +13 -22
  42. package/src/components/Button/Button.test.tsx +97 -81
  43. package/src/components/Button/Button.tsx +46 -14
  44. package/src/components/Button/ButtonGroup.stories.tsx +37 -32
  45. package/src/components/Button/ButtonGroup.tsx +4 -15
  46. package/src/components/Callout/Callout.stories.tsx +109 -16
  47. package/src/components/Card/Card.stories.tsx +67 -36
  48. package/src/components/Card/Card.tsx +30 -14
  49. package/src/components/Chart/AreaChart.tsx +1 -1
  50. package/src/components/Chart/CandlestickChart.tsx +23 -16
  51. package/src/components/Chart/Chart.stories.tsx +4 -9
  52. package/src/components/Chart/Chart.tsx +40 -44
  53. package/src/components/Chart/ChartRenderer.tsx +39 -12
  54. package/src/components/Chart/ChartToolbar.tsx +21 -5
  55. package/src/components/Chart/DonutChart.tsx +1 -1
  56. package/src/components/Chart/FunnelChart.tsx +4 -1
  57. package/src/components/Chart/GaugeChart.tsx +3 -1
  58. package/src/components/Chart/HeatmapChart.tsx +50 -37
  59. package/src/components/Chart/LineChart.tsx +3 -2
  60. package/src/components/Chart/MultiAxisChart.tsx +24 -16
  61. package/src/components/Chart/RadarChart.tsx +19 -17
  62. package/src/components/Chart/ScatterChart.tsx +29 -21
  63. package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +6 -2
  64. package/src/components/ColorModeToggle/ColorModeToggle.tsx +15 -3
  65. package/src/components/Countdown/Countdown.stories.tsx +7 -7
  66. package/src/components/DataTable/DataTable.stories.tsx +43 -38
  67. package/src/components/DataTable/DataTable.test.tsx +26 -148
  68. package/src/components/DataTable/DataTable.tsx +485 -456
  69. package/src/components/DatePicker/DatePicker.stories.tsx +32 -47
  70. package/src/components/DatePicker/DatePicker.tsx +31 -26
  71. package/src/components/Dropdown/Dropdown.stories.tsx +2 -5
  72. package/src/components/Dropdown/Dropdown.tsx +313 -299
  73. package/src/components/EdgePanel/EdgePanel.stories.tsx +6 -19
  74. package/src/components/EdgePanel/EdgePanel.tsx +1 -3
  75. package/src/components/Footer/Footer.stories.tsx +21 -16
  76. package/src/components/Footer/Footer.tsx +130 -128
  77. package/src/components/Footer/FooterLink.tsx +2 -2
  78. package/src/components/Form/Checkbox.test.tsx +49 -49
  79. package/src/components/Form/Checkbox.tsx +108 -100
  80. package/src/components/Form/Form.stories.tsx +2 -10
  81. package/src/components/Form/Input.stories.tsx +22 -39
  82. package/src/components/Form/Input.test.tsx +38 -44
  83. package/src/components/Form/Radio.stories.tsx +6 -12
  84. package/src/components/Form/Radio.tsx +68 -66
  85. package/src/components/Form/Select.tsx +184 -182
  86. package/src/components/Form/Textarea.test.tsx +27 -32
  87. package/src/components/Hero/Hero.stories.tsx +56 -23
  88. package/src/components/Hero/Hero.tsx +201 -55
  89. package/src/components/Icon/index.ts +7 -1
  90. package/src/components/List/List.tsx +19 -23
  91. package/src/components/Modal/Modal.stories.tsx +2 -1
  92. package/src/components/Modal/Modal.tsx +130 -127
  93. package/src/components/Navigation/Menu/MegaMenu.tsx +70 -70
  94. package/src/components/Navigation/Nav/NavDropdown.tsx +1 -5
  95. package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +128 -28
  96. package/src/components/Navigation/SideMenu/SideMenu.tsx +5 -7
  97. package/src/components/Navigation/SideMenu/SideMenuItem.tsx +4 -5
  98. package/src/components/Pagination/Pagination.stories.tsx +7 -4
  99. package/src/components/Pagination/Pagination.tsx +199 -202
  100. package/src/components/PhotoViewer/PhotoViewer.tsx +4 -1
  101. package/src/components/Popover/Popover.stories.tsx +99 -192
  102. package/src/components/Popover/Popover.tsx +41 -37
  103. package/src/components/Progress/Progress.stories.tsx +35 -44
  104. package/src/components/River/River.stories.tsx +2 -1
  105. package/src/components/SectionIntro/SectionIntro.stories.tsx +71 -71
  106. package/src/components/Slider/Slider.stories.tsx +12 -4
  107. package/src/components/Spinner/Spinner.stories.tsx +3 -1
  108. package/src/components/Spinner/Spinner.test.tsx +23 -23
  109. package/src/components/Spinner/Spinner.tsx +43 -46
  110. package/src/components/Steps/Steps.stories.tsx +8 -6
  111. package/src/components/Tabs/Tabs.stories.tsx +12 -9
  112. package/src/components/Tabs/Tabs.tsx +74 -72
  113. package/src/components/Toggle/Toggle.stories.tsx +27 -13
  114. package/src/components/Toggle/Toggle.test.tsx +65 -70
  115. package/src/components/Toggle/Toggle.tsx +4 -1
  116. package/src/components/Tooltip/Tooltip.stories.tsx +24 -20
  117. package/src/components/Tooltip/Tooltip.tsx +104 -106
  118. package/src/components/Upload/Upload.stories.tsx +129 -127
  119. package/src/components/Upload/Upload.tsx +287 -283
  120. package/src/components/VideoPlayer/VideoPlayer.tsx +6 -1
  121. package/src/components/index.ts +13 -2
  122. package/src/layouts/Grid/Grid.stories.tsx +9 -3
  123. package/src/layouts/MasonryGrid/MasonryGrid.tsx +5 -1
  124. package/src/lib/__tests__/theme-tools.test.ts +32 -6
  125. package/src/lib/composables/shared-mouse-tracker.ts +13 -14
  126. package/src/lib/composables/useAtomixGlass.ts +106 -49
  127. package/src/lib/composables/useChartExport.ts +1 -1
  128. package/src/lib/composables/useDataTable.ts +29 -17
  129. package/src/lib/composables/useHero.ts +58 -14
  130. package/src/lib/composables/useHeroBackgroundSlider.ts +2 -9
  131. package/src/lib/composables/useInput.ts +10 -8
  132. package/src/lib/composables/useSideMenu.ts +6 -5
  133. package/src/lib/composables/useTooltip.ts +1 -2
  134. package/src/lib/composables/useVideoPlayer.ts +44 -35
  135. package/src/lib/config/index.ts +154 -154
  136. package/src/lib/constants/cssVariables.ts +29 -29
  137. package/src/lib/hooks/__tests__/useComponentCustomization.test.ts +2 -6
  138. package/src/lib/hooks/index.ts +1 -1
  139. package/src/lib/hooks/useComponentCustomization.ts +11 -17
  140. package/src/lib/hooks/usePerformanceMonitor.ts +6 -7
  141. package/src/lib/patterns/__tests__/slots.test.ts +1 -1
  142. package/src/lib/patterns/index.ts +1 -1
  143. package/src/lib/patterns/slots.tsx +8 -13
  144. package/src/lib/storybook/InteractiveDemo.tsx +13 -18
  145. package/src/lib/storybook/PreviewContainer.tsx +1 -1
  146. package/src/lib/storybook/VariantsGrid.tsx +3 -7
  147. package/src/lib/storybook/index.ts +1 -1
  148. package/src/lib/theme/adapters/cssVariableMapper.ts +47 -74
  149. package/src/lib/theme/adapters/index.ts +3 -9
  150. package/src/lib/theme/adapters/themeAdapter.ts +41 -26
  151. package/src/lib/theme/config/index.ts +1 -1
  152. package/src/lib/theme/config/types.ts +2 -2
  153. package/src/lib/theme/config/validator.ts +10 -5
  154. package/src/lib/theme/constants/constants.ts +2 -2
  155. package/src/lib/theme/constants/index.ts +1 -2
  156. package/src/lib/theme/core/__tests__/createTheme.test.ts +20 -22
  157. package/src/lib/theme/core/composeTheme.ts +32 -26
  158. package/src/lib/theme/core/createTheme.ts +1 -1
  159. package/src/lib/theme/core/createThemeObject.ts +308 -301
  160. package/src/lib/theme/core/index.ts +3 -3
  161. package/src/lib/theme/devtools/CLI.ts +106 -104
  162. package/src/lib/theme/devtools/Comparator.tsx +50 -32
  163. package/src/lib/theme/devtools/DesignTokensCustomizer.stories.tsx +50 -48
  164. package/src/lib/theme/devtools/DesignTokensCustomizer.tsx +257 -63
  165. package/src/lib/theme/devtools/Inspector.tsx +75 -60
  166. package/src/lib/theme/devtools/LiveEditor.tsx +97 -76
  167. package/src/lib/theme/devtools/Preview.tsx +150 -106
  168. package/src/lib/theme/devtools/ThemeValidator.ts +29 -21
  169. package/src/lib/theme/devtools/index.ts +3 -9
  170. package/src/lib/theme/devtools/useHistory.ts +23 -21
  171. package/src/lib/theme/errors/errors.ts +12 -11
  172. package/src/lib/theme/errors/index.ts +2 -7
  173. package/src/lib/theme/generators/generateCSS.ts +9 -13
  174. package/src/lib/theme/generators/generateCSSNested.ts +1 -6
  175. package/src/lib/theme/generators/generateCSSVariables.ts +673 -630
  176. package/src/lib/theme/generators/index.ts +1 -4
  177. package/src/lib/theme/i18n/index.ts +1 -1
  178. package/src/lib/theme/i18n/rtl.ts +13 -13
  179. package/src/lib/theme/index.ts +7 -16
  180. package/src/lib/theme/runtime/ThemeApplicator.ts +4 -4
  181. package/src/lib/theme/runtime/ThemeContext.tsx +1 -1
  182. package/src/lib/theme/runtime/ThemeErrorBoundary.tsx +19 -23
  183. package/src/lib/theme/runtime/ThemeProvider.tsx +230 -239
  184. package/src/lib/theme/runtime/__tests__/ThemeProvider.integration.test.tsx +1 -1
  185. package/src/lib/theme/runtime/__tests__/ThemeProvider.test.tsx +24 -29
  186. package/src/lib/theme/runtime/index.ts +2 -5
  187. package/src/lib/theme/runtime/useTheme.ts +18 -18
  188. package/src/lib/theme/runtime/useThemeTokens.ts +22 -22
  189. package/src/lib/theme/test/testTheme.ts +15 -16
  190. package/src/lib/theme/tokens/index.ts +2 -7
  191. package/src/lib/theme/tokens/tokens.ts +25 -24
  192. package/src/lib/theme/types.ts +428 -411
  193. package/src/lib/theme/utils/__tests__/themeValidation.test.ts +3 -3
  194. package/src/lib/theme/utils/componentTheming.ts +18 -18
  195. package/src/lib/theme/utils/domUtils.ts +277 -289
  196. package/src/lib/theme/utils/index.ts +1 -2
  197. package/src/lib/theme/utils/injectCSS.ts +10 -14
  198. package/src/lib/theme/utils/naming.ts +20 -16
  199. package/src/lib/theme/utils/themeHelpers.ts +10 -12
  200. package/src/lib/theme/utils/themeUtils.ts +85 -86
  201. package/src/lib/theme/utils/themeValidation.ts +82 -33
  202. package/src/lib/theme-tools.ts +8 -6
  203. package/src/lib/types/components.ts +172 -71
  204. package/src/lib/types/partProps.ts +1 -1
  205. package/src/lib/utils/__tests__/csv.test.ts +1 -1
  206. package/src/lib/utils/componentUtils.ts +8 -12
  207. package/src/lib/utils/csv.ts +3 -1
  208. package/src/lib/utils/dataTableExport.ts +1 -5
  209. package/src/lib/utils/fontPreloader.ts +10 -19
  210. package/src/lib/utils/icons.ts +4 -1
  211. package/src/lib/utils/index.ts +2 -6
  212. package/src/lib/utils/memoryMonitor.ts +10 -8
  213. package/src/lib/utils/themeNaming.ts +2 -2
  214. package/src/styles/01-settings/_index.scss +0 -1
  215. package/src/styles/01-settings/_settings.colors.scss +8 -8
  216. package/src/styles/01-settings/_settings.design-tokens.scss +61 -50
  217. package/src/styles/01-settings/_settings.navbar.scss +1 -1
  218. package/src/styles/01-settings/_settings.spacing.scss +3 -4
  219. package/src/styles/01-settings/_settings.tooltip.scss +1 -1
  220. package/src/styles/01-settings/_settings.typography.scss +1 -1
  221. package/src/styles/02-tools/_tools.button.scss +51 -21
  222. package/src/styles/02-tools/_tools.utility-api.scss +30 -18
  223. package/src/styles/03-generic/_generic.root.scss +4 -3
  224. package/src/styles/06-components/_components.atomix-glass.scss +13 -9
  225. package/src/styles/06-components/_components.button.scss +16 -4
  226. package/src/styles/06-components/_components.callout.scss +27 -21
  227. package/src/styles/06-components/_components.card.scss +5 -14
  228. package/src/styles/06-components/_components.chart.scss +22 -19
  229. package/src/styles/06-components/_components.checkbox.scss +3 -1
  230. package/src/styles/06-components/_components.color-mode-toggle.scss +3 -1
  231. package/src/styles/06-components/_components.edge-panel.scss +9 -2
  232. package/src/styles/06-components/_components.footer.scss +1 -1
  233. package/src/styles/06-components/_components.side-menu.scss +5 -5
  234. package/src/styles/06-components/_components.toggle.scss +18 -0
  235. package/src/styles/06-components/_index.scss +1 -1
  236. package/src/styles/06-components/old.chart.styles.scss +0 -2
  237. package/src/styles/99-utilities/_utilities.border.scss +69 -27
  238. package/src/styles/99-utilities/_utilities.display.scss +1 -1
  239. package/src/styles/99-utilities/_utilities.opacity.scss +10 -0
  240. package/src/styles/99-utilities/_utilities.position.scss +16 -9
  241. package/src/styles/99-utilities/_utilities.scss +1 -1
  242. package/src/styles/99-utilities/_utilities.sizes.scss +47 -18
  243. package/src/styles/99-utilities/_utilities.spacing.scss +118 -66
  244. package/src/styles/99-utilities/_utilities.text-gradient.scss +30 -30
  245. package/src/styles/99-utilities/_utilities.text.scss +67 -46
@@ -18,29 +18,29 @@ const meta = {
18
18
  },
19
19
  tags: ['autodocs'],
20
20
  argTypes: {
21
- title: {
22
- control: 'text',
23
- description: 'Main title text (supports ReactNode)',
21
+ title: {
22
+ control: 'text',
23
+ description: 'Main title text (supports ReactNode)',
24
24
  table: {
25
25
  type: { summary: 'ReactNode' },
26
26
  defaultValue: { summary: 'undefined' },
27
- }
27
+ },
28
28
  },
29
- label: {
30
- control: 'text',
31
- description: 'Label text displayed above the title (supports ReactNode)',
29
+ label: {
30
+ control: 'text',
31
+ description: 'Label text displayed above the title (supports ReactNode)',
32
32
  table: {
33
33
  type: { summary: 'ReactNode' },
34
34
  defaultValue: { summary: 'undefined' },
35
- }
35
+ },
36
36
  },
37
- text: {
38
- control: 'text',
39
- description: 'Description text content (supports ReactNode)',
37
+ text: {
38
+ control: 'text',
39
+ description: 'Description text content (supports ReactNode)',
40
40
  table: {
41
41
  type: { summary: 'ReactNode' },
42
42
  defaultValue: { summary: 'undefined' },
43
- }
43
+ },
44
44
  },
45
45
  alignment: {
46
46
  control: { type: 'radio', options: ['left', 'center', 'right'] },
@@ -49,7 +49,7 @@ const meta = {
49
49
  table: {
50
50
  type: { summary: '"left" | "center" | "right"' },
51
51
  defaultValue: { summary: 'left' },
52
- }
52
+ },
53
53
  },
54
54
  size: {
55
55
  control: { type: 'radio', options: SIZES },
@@ -58,55 +58,55 @@ const meta = {
58
58
  table: {
59
59
  type: { summary: '"sm" | "md" | "lg"' },
60
60
  defaultValue: { summary: 'md' },
61
- }
61
+ },
62
62
  },
63
- skeleton: {
63
+ skeleton: {
64
64
  control: 'boolean',
65
65
  description: 'Show skeleton loading state',
66
66
  table: {
67
67
  type: { summary: 'boolean' },
68
68
  defaultValue: { summary: false },
69
- }
69
+ },
70
70
  },
71
- showOverlay: {
71
+ showOverlay: {
72
72
  control: 'boolean',
73
73
  description: 'Whether to show an overlay on the background',
74
74
  table: {
75
75
  type: { summary: 'boolean' },
76
76
  defaultValue: { summary: false },
77
- }
77
+ },
78
78
  },
79
- actions: {
79
+ actions: {
80
80
  control: { type: 'text' },
81
81
  description: 'Call to action elements (supports ReactNode)',
82
82
  table: {
83
83
  type: { summary: 'ReactNode' },
84
84
  defaultValue: { summary: 'undefined' },
85
- }
85
+ },
86
86
  },
87
- backgroundImageSrc: {
87
+ backgroundImageSrc: {
88
88
  control: 'text',
89
89
  description: 'URL for the background image',
90
90
  table: {
91
91
  type: { summary: 'string' },
92
92
  defaultValue: { summary: 'undefined' },
93
- }
93
+ },
94
94
  },
95
- imageSrc: {
95
+ imageSrc: {
96
96
  control: 'text',
97
97
  description: 'URL for the foreground image',
98
98
  table: {
99
99
  type: { summary: 'string' },
100
100
  defaultValue: { summary: 'undefined' },
101
- }
101
+ },
102
102
  },
103
- imageAlt: {
104
- control: 'text',
105
- description: 'Alt text for the image',
103
+ imageAlt: {
104
+ control: 'text',
105
+ description: 'Alt text for the image',
106
106
  table: {
107
107
  type: { summary: 'string' },
108
108
  defaultValue: { summary: 'Section image' },
109
- }
109
+ },
110
110
  },
111
111
  className: {
112
112
  control: 'text',
@@ -114,7 +114,7 @@ const meta = {
114
114
  table: {
115
115
  type: { summary: 'string' },
116
116
  defaultValue: { summary: '' },
117
- }
117
+ },
118
118
  },
119
119
  style: {
120
120
  control: 'object',
@@ -122,7 +122,7 @@ const meta = {
122
122
  table: {
123
123
  type: { summary: 'CSSProperties' },
124
124
  defaultValue: { summary: '{}' },
125
- }
125
+ },
126
126
  },
127
127
  },
128
128
  args: {
@@ -151,10 +151,10 @@ export const BasicUsage: Story = {
151
151
  parameters: {
152
152
  docs: {
153
153
  description: {
154
- story: 'Basic usage of the SectionIntro component with title, label, and text.'
155
- }
156
- }
157
- }
154
+ story: 'Basic usage of the SectionIntro component with title, label, and text.',
155
+ },
156
+ },
157
+ },
158
158
  };
159
159
 
160
160
  // With actions example
@@ -175,10 +175,10 @@ export const WithActions: Story = {
175
175
  parameters: {
176
176
  docs: {
177
177
  description: {
178
- story: 'SectionIntro with call-to-action buttons.'
179
- }
180
- }
181
- }
178
+ story: 'SectionIntro with call-to-action buttons.',
179
+ },
180
+ },
181
+ },
182
182
  };
183
183
 
184
184
  // Center-aligned example
@@ -193,10 +193,10 @@ export const CenterAligned: Story = {
193
193
  parameters: {
194
194
  docs: {
195
195
  description: {
196
- story: 'Center-aligned SectionIntro content.'
197
- }
198
- }
199
- }
196
+ story: 'Center-aligned SectionIntro content.',
197
+ },
198
+ },
199
+ },
200
200
  };
201
201
 
202
202
  // Right-aligned example
@@ -211,10 +211,10 @@ export const RightAligned: Story = {
211
211
  parameters: {
212
212
  docs: {
213
213
  description: {
214
- story: 'Right-aligned SectionIntro content.'
215
- }
216
- }
217
- }
214
+ story: 'Right-aligned SectionIntro content.',
215
+ },
216
+ },
217
+ },
218
218
  };
219
219
 
220
220
  // With background image example
@@ -232,10 +232,10 @@ export const WithBackgroundImage: Story = {
232
232
  parameters: {
233
233
  docs: {
234
234
  description: {
235
- story: 'SectionIntro with a background image and overlay.'
236
- }
237
- }
238
- }
235
+ story: 'SectionIntro with a background image and overlay.',
236
+ },
237
+ },
238
+ },
239
239
  };
240
240
 
241
241
  // With foreground image example
@@ -253,10 +253,10 @@ export const WithForegroundImage: Story = {
253
253
  parameters: {
254
254
  docs: {
255
255
  description: {
256
- story: 'SectionIntro with a foreground image.'
257
- }
258
- }
259
- }
256
+ story: 'SectionIntro with a foreground image.',
257
+ },
258
+ },
259
+ },
260
260
  };
261
261
 
262
262
  // Small size example
@@ -271,10 +271,10 @@ export const SmallSize: Story = {
271
271
  parameters: {
272
272
  docs: {
273
273
  description: {
274
- story: 'Small-sized SectionIntro for compact layouts.'
275
- }
276
- }
277
- }
274
+ story: 'Small-sized SectionIntro for compact layouts.',
275
+ },
276
+ },
277
+ },
278
278
  };
279
279
 
280
280
  // Large size example
@@ -289,10 +289,10 @@ export const LargeSize: Story = {
289
289
  parameters: {
290
290
  docs: {
291
291
  description: {
292
- story: 'Large-sized SectionIntro for prominent displays.'
293
- }
294
- }
295
- }
292
+ story: 'Large-sized SectionIntro for prominent displays.',
293
+ },
294
+ },
295
+ },
296
296
  };
297
297
 
298
298
  // Skeleton loading state example
@@ -308,10 +308,10 @@ export const SkeletonLoading: Story = {
308
308
  parameters: {
309
309
  docs: {
310
310
  description: {
311
- story: 'Skeleton loading state of the SectionIntro component.'
312
- }
313
- }
314
- }
311
+ story: 'Skeleton loading state of the SectionIntro component.',
312
+ },
313
+ },
314
+ },
315
315
  };
316
316
 
317
317
  // Full featured example
@@ -338,8 +338,8 @@ export const FullFeaturedExample: Story = {
338
338
  parameters: {
339
339
  docs: {
340
340
  description: {
341
- story: 'Full featured SectionIntro with all options enabled.'
342
- }
343
- }
344
- }
345
- };
341
+ story: 'Full featured SectionIntro with all options enabled.',
342
+ },
343
+ },
344
+ },
345
+ };
@@ -225,7 +225,9 @@ const basicSlides: SliderSlide[] = [
225
225
  >
226
226
  <div className="u-text-center">
227
227
  <h2 className="u-text-3 u-c-white u-mb-3">Developer Friendly</h2>
228
- <p className="u-text-base u-c-white u-mb-4">Well documented with clear APIs and examples</p>
228
+ <p className="u-text-base u-c-white u-mb-4">
229
+ Well documented with clear APIs and examples
230
+ </p>
229
231
  <Button variant="primary">View Docs</Button>
230
232
  </div>
231
233
  </div>
@@ -295,7 +297,9 @@ const basicSlides: SliderSlide[] = [
295
297
  >
296
298
  <div className="u-text-center">
297
299
  <h2 className="u-text-3 u-c-white u-mb-3">RTL Support</h2>
298
- <p className="u-text-base u-c-white u-mb-4">Full right-to-left language support built-in</p>
300
+ <p className="u-text-base u-c-white u-mb-4">
301
+ Full right-to-left language support built-in
302
+ </p>
299
303
  <Button variant="info">Learn More</Button>
300
304
  </div>
301
305
  </div>
@@ -317,7 +321,9 @@ const basicSlides: SliderSlide[] = [
317
321
  >
318
322
  <div className="u-text-center">
319
323
  <h2 className="u-text-3 u-c-white u-mb-3">Open Source</h2>
320
- <p className="u-text-base u-c-white u-mb-4">Free to use and contribute to the community</p>
324
+ <p className="u-text-base u-c-white u-mb-4">
325
+ Free to use and contribute to the community
326
+ </p>
321
327
  <Button variant="success">View on GitHub</Button>
322
328
  </div>
323
329
  </div>
@@ -342,7 +348,9 @@ const productSlides: SliderSlide[] = [
342
348
  }}
343
349
  />
344
350
  <h3 className="u-text-4 u-font-bold u-mb-2">Premium Plan</h3>
345
- <p className="u-text-sm u-c-muted u-mb-3">Perfect for small teams and growing businesses</p>
351
+ <p className="u-text-sm u-c-muted u-mb-3">
352
+ Perfect for small teams and growing businesses
353
+ </p>
346
354
  <div className="u-mb-4">
347
355
  <span className="u-text-1 u-font-bold">$29</span>
348
356
  <span className="u-text-sm u-c-muted">/month</span>
@@ -149,7 +149,9 @@ export const AllVariants: Story = {
149
149
 
150
150
  export const Fullscreen: Story = {
151
151
  render: () => (
152
- <div style={{ height: '200px', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
152
+ <div
153
+ style={{ height: '200px', display: 'flex', alignItems: 'center', justifyContent: 'center' }}
154
+ >
153
155
  <Spinner fullscreen={true} variant="primary" size="lg" />
154
156
  </div>
155
157
  ),
@@ -4,32 +4,32 @@ import { Spinner } from './Spinner';
4
4
 
5
5
  // Mock AtomixGlass component
6
6
  vi.mock('../AtomixGlass/AtomixGlass', () => ({
7
- AtomixGlass: ({ children, ...props }: any) => (
8
- <div data-testid="atomix-glass" data-glass-props={JSON.stringify(props)}>
9
- {children}
10
- </div>
11
- ),
7
+ AtomixGlass: ({ children, ...props }: any) => (
8
+ <div data-testid="atomix-glass" data-glass-props={JSON.stringify(props)}>
9
+ {children}
10
+ </div>
11
+ ),
12
12
  }));
13
13
 
14
14
  describe('Spinner Component', () => {
15
- it('renders with default accessibility props', () => {
16
- render(<Spinner />);
17
- const spinner = screen.getByRole('status');
18
- expect(spinner).toBeInTheDocument();
19
- expect(spinner).toHaveAttribute('aria-label', 'Loading');
20
- expect(screen.getByText('Loading...')).toBeInTheDocument();
21
- });
15
+ it('renders with default accessibility props', () => {
16
+ render(<Spinner />);
17
+ const spinner = screen.getByRole('status');
18
+ expect(spinner).toBeInTheDocument();
19
+ expect(spinner).toHaveAttribute('aria-label', 'Loading');
20
+ expect(screen.getByText('Loading...')).toBeInTheDocument();
21
+ });
22
22
 
23
- it('renders with custom accessibility props', () => {
24
- render(<Spinner role="alert" aria-label="Please wait" />);
25
- const spinner = screen.getByRole('alert');
26
- expect(spinner).toBeInTheDocument();
27
- expect(spinner).toHaveAttribute('aria-label', 'Please wait');
28
- expect(screen.getByText('Please wait')).toBeInTheDocument();
29
- });
23
+ it('renders with custom accessibility props', () => {
24
+ render(<Spinner role="alert" aria-label="Please wait" />);
25
+ const spinner = screen.getByRole('alert');
26
+ expect(spinner).toBeInTheDocument();
27
+ expect(spinner).toHaveAttribute('aria-label', 'Please wait');
28
+ expect(screen.getByText('Please wait')).toBeInTheDocument();
29
+ });
30
30
 
31
- it('renders as glass when enabled', () => {
32
- render(<Spinner glass />);
33
- expect(screen.getByTestId('atomix-glass')).toBeInTheDocument();
34
- });
31
+ it('renders as glass when enabled', () => {
32
+ render(<Spinner glass />);
33
+ expect(screen.getByTestId('atomix-glass')).toBeInTheDocument();
34
+ });
35
35
  });
@@ -4,53 +4,50 @@ import { useSpinner } from '../../lib/composables/useSpinner';
4
4
  import { SPINNER } from '../../lib/constants/components';
5
5
  import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
6
6
 
7
- export const Spinner: React.FC<SpinnerProps> = memo(({
8
- size = 'md',
9
- variant = 'primary',
10
- fullscreen = false,
11
- className = '',
12
- style,
13
- glass,
14
- 'aria-label': ariaLabel,
15
- role = 'status',
16
- }) => {
17
- const { generateSpinnerClass } = useSpinner({
18
- size,
19
- variant,
20
- fullscreen,
21
- });
22
-
23
- const spinnerClass = generateSpinnerClass({
24
- size,
25
- variant,
26
- fullscreen,
27
- className: `${className} ${glass ? 'c-spinner--glass' : ''}`.trim(),
28
- });
29
-
30
- const spinnerContent = (
31
- <div
32
- className={spinnerClass}
33
- style={style}
34
- role={role}
35
- aria-label={ariaLabel || 'Loading'}
36
- >
37
- <span className={SPINNER.VISUALLY_HIDDEN}>{ariaLabel || 'Loading...'}</span>
38
- </div>
39
- );
40
-
41
- if (glass) {
42
- const defaultGlassProps = {
43
- displacementScale: 20,
44
- blurAmount: 1,
45
- cornerRadius: 999,
46
- mode: 'shader' as const,
47
- };
48
- const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
49
- return <AtomixGlass {...glassProps}>{spinnerContent}</AtomixGlass>;
7
+ export const Spinner: React.FC<SpinnerProps> = memo(
8
+ ({
9
+ size = 'md',
10
+ variant = 'primary',
11
+ fullscreen = false,
12
+ className = '',
13
+ style,
14
+ glass,
15
+ 'aria-label': ariaLabel,
16
+ role = 'status',
17
+ }) => {
18
+ const { generateSpinnerClass } = useSpinner({
19
+ size,
20
+ variant,
21
+ fullscreen,
22
+ });
23
+
24
+ const spinnerClass = generateSpinnerClass({
25
+ size,
26
+ variant,
27
+ fullscreen,
28
+ className: `${className} ${glass ? 'c-spinner--glass' : ''}`.trim(),
29
+ });
30
+
31
+ const spinnerContent = (
32
+ <div className={spinnerClass} style={style} role={role} aria-label={ariaLabel || 'Loading'}>
33
+ <span className={SPINNER.VISUALLY_HIDDEN}>{ariaLabel || 'Loading...'}</span>
34
+ </div>
35
+ );
36
+
37
+ if (glass) {
38
+ const defaultGlassProps = {
39
+ displacementScale: 20,
40
+ blurAmount: 1,
41
+ cornerRadius: 999,
42
+ mode: 'shader' as const,
43
+ };
44
+ const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
45
+ return <AtomixGlass {...glassProps}>{spinnerContent}</AtomixGlass>;
46
+ }
47
+
48
+ return spinnerContent;
50
49
  }
51
-
52
- return spinnerContent;
53
- });
50
+ );
54
51
 
55
52
  export type { SpinnerProps };
56
53
 
@@ -129,7 +129,7 @@ export const BasicHorizontal: Story = {
129
129
  activeIndex: 1,
130
130
  vertical: false,
131
131
  },
132
- render: (args) => (
132
+ render: args => (
133
133
  <div style={{ padding: '30px' }}>
134
134
  <Steps {...args} />
135
135
  </div>
@@ -156,7 +156,7 @@ export const BasicVertical: Story = {
156
156
  activeIndex: 1,
157
157
  vertical: true,
158
158
  },
159
- render: (args) => (
159
+ render: args => (
160
160
  <div style={{ padding: '30px' }}>
161
161
  <Steps {...args} />
162
162
  </div>
@@ -243,7 +243,9 @@ export const WithIcons: Story = {
243
243
  };
244
244
 
245
245
  // Interactive steps with buttons for navigation
246
- const InteractiveStepsTemplate: React.FC<{ onStepChange?: (index: number) => void }> = ({ onStepChange }) => {
246
+ const InteractiveStepsTemplate: React.FC<{ onStepChange?: (index: number) => void }> = ({
247
+ onStepChange,
248
+ }) => {
247
249
  const [activeStep, setActiveStep] = React.useState(0);
248
250
 
249
251
  const handleStepChange = (stepIndex: number) => {
@@ -316,7 +318,7 @@ export const GlassHorizontal: Story = {
316
318
  vertical: false,
317
319
  glass: true,
318
320
  },
319
- render: (args) => (
321
+ render: args => (
320
322
  <div
321
323
  style={{
322
324
  background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
@@ -356,7 +358,7 @@ export const GlassVertical: Story = {
356
358
  vertical: true,
357
359
  glass: true,
358
360
  },
359
- render: (args) => (
361
+ render: args => (
360
362
  <div
361
363
  style={{
362
364
  background:
@@ -405,7 +407,7 @@ export const GlassCustom: Story = {
405
407
  cornerRadius: 12,
406
408
  },
407
409
  },
408
- render: (args) => (
410
+ render: args => (
409
411
  <div
410
412
  style={{
411
413
  background: 'linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57)',
@@ -180,13 +180,15 @@ export const WithDifferentActiveTab: Story = {
180
180
 
181
181
  export const WithGlassEffect: Story = {
182
182
  render: args => (
183
- <div style={{
184
- maxWidth: '600px',
185
- margin: '0 auto',
186
- padding: '30px',
187
- background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
188
- minHeight: '300px'
189
- }}>
183
+ <div
184
+ style={{
185
+ maxWidth: '600px',
186
+ margin: '0 auto',
187
+ padding: '30px',
188
+ background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
189
+ minHeight: '300px',
190
+ }}
191
+ >
190
192
  <Tabs {...args} />
191
193
  </div>
192
194
  ),
@@ -224,7 +226,8 @@ export const WithRichContent: Story = {
224
226
  parameters: {
225
227
  docs: {
226
228
  description: {
227
- story: 'Demonstrates tabs containing rich HTML content including headings, lists, and tables, showing the flexibility of the tabs component.',
229
+ story:
230
+ 'Demonstrates tabs containing rich HTML content including headings, lists, and tables, showing the flexibility of the tabs component.',
228
231
  },
229
232
  },
230
233
  },
@@ -392,4 +395,4 @@ export const GlassCustom: Story = {
392
395
  </div>
393
396
  </div>
394
397
  ),
395
- };
398
+ };