@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
@@ -30,7 +30,7 @@ import {
30
30
  WaterfallChart,
31
31
  } from './index';
32
32
 
33
- const meta: Meta<typeof Chart> = {
33
+ const meta = {
34
34
  title: 'Components/Chart',
35
35
  component: Chart,
36
36
  parameters: {
@@ -38,17 +38,15 @@ const meta: Meta<typeof Chart> = {
38
38
  docs: {
39
39
  description: {
40
40
  component:
41
- 'Modern chart library with 20+ chart types, real-time updates, animations, and advanced interactions.',
42
- },
43
- source: {
44
- code: `<Icon name="Rocket" /> Modern chart library with 20+ chart types, real-time updates, animations, and advanced interactions.`,
41
+ 'The Chart component provides a comprehensive charting library with 20+ chart types including line, bar, pie, area, and more. Charts support real-time data updates, animations, interactive tooltips, and advanced customization options. Ideal for dashboards, analytics, data visualization, and any application requiring graphical data representation.',
45
42
  },
46
43
  },
47
44
  },
48
- };
45
+ tags: ['autodocs'],
46
+ } satisfies Meta<typeof Chart>;
49
47
 
50
48
  export default meta;
51
- type Story = StoryObj<typeof Chart>;
49
+ type Story = StoryObj<typeof meta>;
52
50
 
53
51
  // Glass Variant Story
54
52
  export const GlassVariant: Story = {
@@ -205,22 +205,6 @@ const Chart = memo(
205
205
  panEnabled,
206
206
  });
207
207
 
208
- // Legacy handlers for backward compatibility
209
- const handleFullscreen = useCallback(() => {
210
- toolbarHandlers.onFullscreen(!toolbarState.isFullscreen);
211
- }, [toolbarHandlers, toolbarState.isFullscreen]);
212
-
213
- const handleExport = useCallback(
214
- async (format: string) => {
215
- await toolbarHandlers.onExport(format);
216
- },
217
- [toolbarHandlers]
218
- );
219
-
220
- const handleRefresh = useCallback(() => {
221
- toolbarHandlers.onRefresh();
222
- }, [toolbarHandlers]);
223
-
224
208
  // Sync all toolbar state with component state
225
209
  useEffect(() => {
226
210
  setIsFullscreen(toolbarState.isFullscreen);
@@ -238,7 +238,7 @@ const ChartRenderer = memo(
238
238
  onMouseUp: handleMouseUp,
239
239
  onWheel: () => {
240
240
  // Wheel handling is done via native event listener (non-passive)
241
- // This is kept for API compatibility but not used
241
+ // Wheel handling is done via native event listener (non-passive)
242
242
  },
243
243
  }),
244
244
  [
@@ -172,7 +172,6 @@ const DonutChart = memo(
172
172
  };
173
173
  });
174
174
 
175
- // Use toolbar state if available, fallback to config for backward compatibility
176
175
  const showTooltips = toolbarState?.showTooltips ?? renderConfig?.showTooltips ?? true;
177
176
 
178
177
  return (
@@ -138,7 +138,6 @@ const FunnelChart = memo(
138
138
  }: ChartRenderContentParams) => {
139
139
  if (!funnelData.length) return null;
140
140
 
141
- // Use toolbar state if available, fallback to config for backward compatibility
142
141
  const showTooltips = toolbarState?.showTooltips ?? renderConfig?.showTooltips ?? true;
143
142
  const shouldAnimate = toolbarState?.animationsEnabled ?? renderConfig?.animate ?? animate;
144
143
 
@@ -140,7 +140,6 @@ const GaugeChart = memo(
140
140
  }: ChartRenderContentParams) => {
141
141
  const width = scales.width;
142
142
 
143
- // Use toolbar state if available, fallback to config for backward compatibility
144
143
  const shouldAnimate = toolbarState?.animationsEnabled ?? renderConfig?.animate ?? animate;
145
144
  const height = scales.height;
146
145
  const centerX = width / 2;
@@ -267,7 +267,6 @@ const HeatmapChart = memo(
267
267
  }: ChartRenderContentParams) => {
268
268
  const { matrix, xLabels, yLabels } = processedData;
269
269
 
270
- // Use toolbar state if available, fallback to config for backward compatibility
271
270
  const showTooltips = toolbarState?.showTooltips ?? renderConfig?.showTooltips ?? true;
272
271
  if (!matrix.length) {
273
272
  return null;
@@ -80,7 +80,6 @@ const LineChart = memo(
80
80
  }: ChartRenderContentParams) => {
81
81
  if (!renderedDatasets.length) return null;
82
82
 
83
- // Use toolbar state if available, fallback to config for backward compatibility
84
83
  const showTooltips = toolbarState?.showTooltips ?? renderConfig?.showTooltips ?? true;
85
84
  const shouldAnimate = toolbarState?.animationsEnabled ?? renderConfig?.animate ?? mergedLineOptions.smooth;
86
85
 
@@ -164,7 +164,6 @@ const MultiAxisChart = memo(
164
164
  }: ChartRenderContentParams) => {
165
165
  if (!datasets.length) return null;
166
166
 
167
- // Use toolbar state if available, fallback to config for backward compatibility
168
167
  const effectiveShowTooltips = toolbarState?.showTooltips ?? renderConfig?.showTooltips ?? showTooltips ?? true;
169
168
  const effectiveShowGrid = toolbarState?.showGrid ?? true; // Grid visibility from toolbar
170
169
 
@@ -73,7 +73,6 @@ const PieChart = memo(
73
73
  };
74
74
  });
75
75
 
76
- // Use toolbar state if available, fallback to config for backward compatibility
77
76
  const showTooltips = toolbarState?.showTooltips ?? renderConfig?.showTooltips ?? true;
78
77
 
79
78
  return (
@@ -89,7 +89,6 @@ const RadarChart = memo(
89
89
  }: ChartRenderContentParams) => {
90
90
  if (!renderedDatasets.length) return null;
91
91
 
92
- // Use toolbar state if available, fallback to config for backward compatibility
93
92
  const showTooltips = toolbarState?.showTooltips ?? renderConfig?.showTooltips ?? true;
94
93
 
95
94
  const centerX = scales.width / 2;
@@ -52,7 +52,6 @@ const ScatterChart = memo(
52
52
  }: ChartRenderContentParams) => {
53
53
  if (!renderedDatasets.length) return null;
54
54
 
55
- // Use toolbar state if available, fallback to config for backward compatibility
56
55
  const showTooltips = toolbarState?.showTooltips ?? renderConfig?.showTooltips ?? true;
57
56
 
58
57
  const points: React.ReactNode[] = [];
@@ -129,7 +129,6 @@ const WaterfallChart = memo(
129
129
  }: ChartRenderContentParams) => {
130
130
  if (!waterfallData.length) return null;
131
131
 
132
- // Use toolbar state if available, fallback to config for backward compatibility
133
132
  const shouldAnimate = toolbarState?.animationsEnabled ?? renderConfig?.animate ?? animate;
134
133
 
135
134
  const padding = 60;
@@ -8,7 +8,14 @@ const meta = {
8
8
  component: ColorModeToggle,
9
9
  parameters: {
10
10
  layout: 'centered',
11
+ docs: {
12
+ description: {
13
+ component:
14
+ 'The ColorModeToggle component provides a user-friendly switch for toggling between light and dark color modes. It automatically detects system preferences, persists user choices, and provides visual feedback. Essential for applications supporting theme customization and accessibility preferences.',
15
+ },
16
+ },
11
17
  },
18
+ tags: ['autodocs'],
12
19
  argTypes: {
13
20
  size: {
14
21
  control: 'select',
@@ -1,31 +1,38 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { useState } from 'react';
3
3
  import { DataTableColumn } from '../../lib/types/components';
4
4
  import { DataTable } from './DataTable';
5
5
 
6
- const meta: Meta<typeof DataTable> = {
6
+ const meta = {
7
7
  title: 'Components/DataTable',
8
8
  component: DataTable,
9
9
  parameters: {
10
10
  layout: 'padded',
11
+ docs: {
12
+ description: {
13
+ component:
14
+ 'The DataTable component provides a powerful and flexible way to display structured data in rows and columns. It supports sorting, filtering, pagination, selection, and various display options. DataTables are ideal for displaying large datasets, user lists, product catalogs, or any tabular information requiring advanced data manipulation.',
15
+ },
16
+ },
11
17
  },
18
+ tags: ['autodocs'],
12
19
  argTypes: {
13
- data: { control: 'object' },
14
- columns: { control: 'object' },
15
- sortable: { control: 'boolean' },
16
- filterable: { control: 'boolean' },
17
- paginated: { control: 'boolean' },
18
- pageSize: { control: 'number' },
19
- striped: { control: 'boolean' },
20
- bordered: { control: 'boolean' },
21
- dense: { control: 'boolean' },
22
- loading: { control: 'boolean' },
23
- emptyMessage: { control: 'text' },
24
- },
25
- };
20
+ data: { control: 'object', description: 'Array of data objects to display' },
21
+ columns: { control: 'object', description: 'Column definitions for the table' },
22
+ sortable: { control: 'boolean', description: 'Whether columns are sortable' },
23
+ filterable: { control: 'boolean', description: 'Whether the table is filterable' },
24
+ paginated: { control: 'boolean', description: 'Whether to enable pagination' },
25
+ pageSize: { control: 'number', description: 'Number of rows per page' },
26
+ striped: { control: 'boolean', description: 'Whether to apply striped row styling' },
27
+ bordered: { control: 'boolean', description: 'Whether to show table borders' },
28
+ dense: { control: 'boolean', description: 'Whether to use dense row spacing' },
29
+ loading: { control: 'boolean', description: 'Whether the table is in loading state' },
30
+ emptyMessage: { control: 'text', description: 'Message to display when table is empty' },
31
+ },
32
+ } satisfies Meta<typeof DataTable>;
26
33
 
27
34
  export default meta;
28
- type Story = StoryObj<typeof DataTable>;
35
+ type Story = StoryObj<typeof meta>;
29
36
 
30
37
  // Generate more sample data for better pagination testing
31
38
  const generateUsers = (count: number) => {
@@ -1,37 +1,46 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { useState } from 'react';
3
3
  import DatePicker from './DatePicker';
4
4
  import { DateRange } from './types';
5
5
  import { formatDateRange } from './utils';
6
+ import { SIZES } from '../../lib/constants/components';
6
7
 
7
- const meta: Meta<typeof DatePicker> = {
8
+ const meta = {
8
9
  title: 'Components/DatePicker',
9
10
  component: DatePicker,
10
11
  parameters: {
11
12
  layout: 'padded',
13
+ docs: {
14
+ description: {
15
+ component:
16
+ 'The DatePicker component provides a user-friendly interface for selecting dates or date ranges. It supports single date selection, date range selection, custom date formatting, and various display options. DatePickers are essential for forms requiring date input and provide calendar-based selection with keyboard navigation.',
17
+ },
18
+ },
12
19
  },
20
+ tags: ['autodocs'],
13
21
  argTypes: {
14
- value: { control: 'date' },
15
- startDate: { control: 'date' },
16
- endDate: { control: 'date' },
22
+ value: { control: 'date', description: 'Selected date value' },
23
+ startDate: { control: 'date', description: 'Start date for range selection' },
24
+ endDate: { control: 'date', description: 'End date for range selection' },
17
25
  selectionMode: {
18
26
  control: { type: 'radio' },
19
27
  options: ['single', 'range'],
20
28
  description: 'Selection mode - single date or date range',
21
29
  },
22
- minDate: { control: 'date' },
23
- maxDate: { control: 'date' },
24
- format: { control: 'text' },
25
- placeholder: { control: 'text' },
26
- disabled: { control: 'boolean' },
27
- readOnly: { control: 'boolean' },
28
- clearable: { control: 'boolean' },
29
- showTodayButton: { control: 'boolean' },
30
- showWeekNumbers: { control: 'boolean' },
31
- inline: { control: 'boolean' },
30
+ minDate: { control: 'date', description: 'Minimum selectable date' },
31
+ maxDate: { control: 'date', description: 'Maximum selectable date' },
32
+ format: { control: 'text', description: 'Date format string' },
33
+ placeholder: { control: 'text', description: 'Placeholder text' },
34
+ disabled: { control: 'boolean', description: 'Whether the date picker is disabled' },
35
+ readOnly: { control: 'boolean', description: 'Whether the date picker is read-only' },
36
+ clearable: { control: 'boolean', description: 'Whether the date can be cleared' },
37
+ showTodayButton: { control: 'boolean', description: 'Whether to show a "Today" button' },
38
+ showWeekNumbers: { control: 'boolean', description: 'Whether to show week numbers' },
39
+ inline: { control: 'boolean', description: 'Whether to display inline (always visible)' },
32
40
  size: {
33
41
  control: { type: 'select' },
34
- options: ['sm', 'md', 'lg'],
42
+ options: SIZES,
43
+ description: 'Size of the date picker',
35
44
  },
36
45
  placement: {
37
46
  control: { type: 'select' },
@@ -51,11 +60,10 @@ const meta: Meta<typeof DatePicker> = {
51
60
  description: 'Apply glass morphism effect to the calendar dropdown',
52
61
  },
53
62
  },
54
- };
63
+ } satisfies Meta<typeof DatePicker>;
55
64
 
56
65
  export default meta;
57
-
58
- type Story = StoryObj<typeof DatePicker>;
66
+ type Story = StoryObj<typeof meta>;
59
67
 
60
68
  export const Default: Story = {
61
69
  args: {
@@ -1,10 +1,11 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import React, { useState } from 'react';
3
3
  import { ThemeColor } from '../../lib/types/components';
4
4
  import { Icon } from '../Icon';
5
5
  import { Dropdown, DropdownDivider, DropdownHeader, DropdownItem } from './index';
6
+ import { THEME_COLORS } from '../../lib/constants/components';
6
7
 
7
- const meta: Meta<typeof Dropdown> = {
8
+ const meta = {
8
9
  title: 'Components/Dropdown',
9
10
  component: Dropdown,
10
11
  parameters: {
@@ -12,13 +13,14 @@ const meta: Meta<typeof Dropdown> = {
12
13
  docs: {
13
14
  description: {
14
15
  component:
15
- 'Dropdown component with a toggleable menu. The dropdown menu appears on click or hover, depending on the trigger prop.',
16
+ 'The Dropdown component provides a toggleable menu that appears relative to a trigger element. It supports multiple placement options, click or hover triggers, and can include dividers, headers, and icons. Dropdowns are ideal for navigation menus, action menus, or any context where options need to be revealed on demand.',
16
17
  },
17
18
  },
18
19
  },
20
+ tags: ['autodocs'],
19
21
  argTypes: {
20
22
  placement: {
21
- control: 'select',
23
+ control: { type: 'select' },
22
24
  options: [
23
25
  'bottom-start',
24
26
  'bottom-end',
@@ -32,23 +34,13 @@ const meta: Meta<typeof Dropdown> = {
32
34
  description: 'The placement of the dropdown menu relative to the trigger element',
33
35
  },
34
36
  trigger: {
35
- control: 'radio',
37
+ control: { type: 'radio' },
36
38
  options: ['click', 'hover'],
37
39
  description: 'How the dropdown is triggered - by click or hover',
38
40
  },
39
41
  variant: {
40
- control: 'select',
41
- options: [
42
- 'primary',
43
- 'secondary',
44
- 'tertiary',
45
- 'success',
46
- 'info',
47
- 'warning',
48
- 'error',
49
- 'light',
50
- 'dark',
51
- ],
42
+ control: { type: 'select' },
43
+ options: THEME_COLORS,
52
44
  description: 'The color variant of the dropdown',
53
45
  },
54
46
  minWidth: {
@@ -72,10 +64,10 @@ const meta: Meta<typeof Dropdown> = {
72
64
  description: 'Enable glass morphism effect',
73
65
  },
74
66
  },
75
- };
67
+ } satisfies Meta<typeof Dropdown>;
76
68
 
77
69
  export default meta;
78
- type Story = StoryObj<typeof Dropdown>;
70
+ type Story = StoryObj<typeof meta>;
79
71
 
80
72
  /**
81
73
  * Interactive dropdown component that can be used in Storybook
@@ -17,6 +17,7 @@ const meta = {
17
17
  },
18
18
  },
19
19
  },
20
+ tags: ['autodocs'],
20
21
  argTypes: {
21
22
  position: {
22
23
  control: { type: 'select' },
@@ -3,8 +3,9 @@ import type { Meta, StoryObj } from '@storybook/react';
3
3
  import { Footer } from './Footer';
4
4
  import { FooterSection } from './FooterSection';
5
5
  import { FooterLink } from './FooterLink';
6
+ import { THEME_COLORS, SIZES } from '../../lib/constants/components';
6
7
 
7
- const meta: Meta<typeof Footer> = {
8
+ const meta = {
8
9
  title: 'Components/Footer',
9
10
  component: Footer,
10
11
  parameters: {
@@ -12,10 +13,11 @@ const meta: Meta<typeof Footer> = {
12
13
  docs: {
13
14
  description: {
14
15
  component:
15
- 'A modern, comprehensive footer component with enhanced visual effects, accessibility features, responsive design, and multiple layout variants. Features include design token integration, improved hover effects, modern gradients, and comprehensive accessibility support following Atomix design patterns.',
16
+ 'The Footer component provides a comprehensive footer section for websites with multiple layout variants, sections, links, and optional features like newsletter signup and back-to-top buttons. Footers support various color variants, sizes, and can be sticky. Essential for site navigation, branding, and additional information display.',
16
17
  },
17
18
  },
18
19
  },
20
+ tags: ['autodocs'],
19
21
  argTypes: {
20
22
  layout: {
21
23
  control: 'select',
@@ -24,12 +26,12 @@ const meta: Meta<typeof Footer> = {
24
26
  },
25
27
  variant: {
26
28
  control: 'select',
27
- options: ['primary', 'secondary', 'success', 'info', 'warning', 'error', 'light', 'dark'],
29
+ options: THEME_COLORS,
28
30
  description: 'Color variant',
29
31
  },
30
32
  size: {
31
33
  control: 'select',
32
- options: ['sm', 'md', 'lg'],
34
+ options: SIZES,
33
35
  description: 'Size variant',
34
36
  },
35
37
  showNewsletter: {
@@ -49,10 +51,10 @@ const meta: Meta<typeof Footer> = {
49
51
  description: 'Whether footer should be sticky',
50
52
  },
51
53
  },
52
- };
54
+ } satisfies Meta<typeof Footer>;
53
55
 
54
56
  export default meta;
55
- type Story = StoryObj<typeof Footer>;
57
+ type Story = StoryObj<typeof meta>;
56
58
 
57
59
  // Sample social links
58
60
  const sampleSocialLinks = [
@@ -49,8 +49,15 @@ export const FooterLink = forwardRef<HTMLAnchorElement, FooterLinkProps>(
49
49
 
50
50
  if (LinkComponent) {
51
51
  const Component = LinkComponent as React.ComponentType<any>;
52
+ // Only pass href if the link is not disabled and href exists
53
+ const componentProps = {
54
+ ref,
55
+ ...(href && !disabled ? { to: href } : {}),
56
+ ...linkProps,
57
+ };
58
+
52
59
  return (
53
- <Component ref={ref} to={href} {...linkProps}>
60
+ <Component {...componentProps}>
54
61
  {icon && <span className="c-footer__link-icon">{icon}</span>}
55
62
  <span className="c-footer__link-text">{children}</span>
56
63
  {external && <span className="c-footer__link-external">↗</span>}
@@ -70,4 +77,4 @@ export const FooterLink = forwardRef<HTMLAnchorElement, FooterLinkProps>(
70
77
 
71
78
  FooterLink.displayName = 'FooterLink';
72
79
 
73
- export default FooterLink;
80
+ export default FooterLink;
@@ -6,7 +6,14 @@ const meta = {
6
6
  component: Checkbox,
7
7
  parameters: {
8
8
  layout: 'centered',
9
+ docs: {
10
+ description: {
11
+ component:
12
+ 'The Checkbox component allows users to select one or more options from a set. It supports checked, unchecked, and indeterminate states, and can be used in forms or as standalone controls. Checkboxes provide clear visual feedback and support keyboard navigation.',
13
+ },
14
+ },
9
15
  },
16
+ tags: ['autodocs'],
10
17
  argTypes: {
11
18
  label: {
12
19
  control: 'text',
@@ -18,7 +18,14 @@ const meta = {
18
18
  component: Form,
19
19
  parameters: {
20
20
  layout: 'centered',
21
+ docs: {
22
+ description: {
23
+ component:
24
+ 'The Form component provides a semantic HTML form wrapper with enhanced functionality. It supports form validation, submission handling, and can be disabled as a whole. Forms work seamlessly with FormGroup and all form input components to create complete, accessible form experiences.',
25
+ },
26
+ },
21
27
  },
28
+ tags: ['autodocs'],
22
29
  argTypes: {
23
30
  disabled: {
24
31
  control: 'boolean',
@@ -5,13 +5,21 @@ import { Input } from './Input';
5
5
  import { Radio } from './Radio';
6
6
  import { Select } from './Select';
7
7
  import { Textarea } from './Textarea';
8
+ import { SIZES } from '../../lib/constants/components';
8
9
 
9
10
  const meta = {
10
11
  title: 'Components/Form/FormGroup',
11
12
  component: FormGroup,
12
13
  parameters: {
13
14
  layout: 'centered',
15
+ docs: {
16
+ description: {
17
+ component:
18
+ 'The FormGroup component provides a structured wrapper for form fields, including labels, inputs, helper text, and error messages. It ensures proper accessibility, consistent spacing, and validation state display. FormGroups are essential for creating well-organized and accessible forms.',
19
+ },
20
+ },
14
21
  },
22
+ tags: ['autodocs'],
15
23
  argTypes: {
16
24
  label: {
17
25
  control: 'text',
@@ -39,7 +47,7 @@ const meta = {
39
47
  },
40
48
  size: {
41
49
  control: { type: 'select' },
42
- options: ['sm', 'md', 'lg'],
50
+ options: SIZES,
43
51
  description: 'Size variant',
44
52
  },
45
53
  },