@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
@@ -1,16 +1,16 @@
1
1
  /**
2
2
  * Atomix Configuration System
3
- *
3
+ *
4
4
  * Tailwind-like configuration for customizing the Atomix Design System.
5
- *
5
+ *
6
6
  * External developers can create `atomix.config.ts` in their project root
7
7
  * to customize design tokens, similar to Tailwind's tailwind.config.js
8
- *
8
+ *
9
9
  * @example
10
10
  * ```typescript
11
11
  * // atomix.config.ts (in your project)
12
12
  * import { defineConfig } from '@shohojdhara/atomix/config';
13
- *
13
+ *
14
14
  * export default defineConfig({
15
15
  * theme: {
16
16
  * extend: {
@@ -29,104 +29,104 @@ import type { Theme } from '../theme/types';
29
29
  * Color Scale (1-10)
30
30
  */
31
31
  export interface ColorScale {
32
- 1?: string;
33
- 2?: string;
34
- 3?: string;
35
- 4?: string;
36
- 5?: string;
37
- 6?: string;
38
- 7?: string;
39
- 8?: string;
40
- 9?: string;
41
- 10?: string;
42
- [key: string]: string | undefined;
32
+ 1?: string;
33
+ 2?: string;
34
+ 3?: string;
35
+ 4?: string;
36
+ 5?: string;
37
+ 6?: string;
38
+ 7?: string;
39
+ 8?: string;
40
+ 9?: string;
41
+ 10?: string;
42
+ [key: string]: string | undefined;
43
43
  }
44
44
 
45
45
  /**
46
46
  * Palette Color Options
47
47
  */
48
48
  export interface PaletteColorOptions {
49
- main: string;
50
- light?: string;
51
- dark?: string;
52
- contrastText?: string;
49
+ main: string;
50
+ light?: string;
51
+ dark?: string;
52
+ contrastText?: string;
53
53
  }
54
54
 
55
55
  /**
56
56
  * Design Tokens Schema (Tailwind-like)
57
57
  */
58
58
  export interface ThemeTokens {
59
- /** Color palette */
60
- colors?: Record<string, string | PaletteColorOptions | ColorScale | Record<string, string>>;
61
- /** Spacing scale */
62
- spacing?: Record<string, string>;
63
- /** Border radius scale */
64
- borderRadius?: Record<string, string>;
65
- /** Typography scale and settings */
66
- typography?: {
67
- fontFamilies?: Record<string, string>;
68
- fontSizes?: Record<string, string>;
69
- fontWeights?: Record<string, string | number>;
70
- lineHeights?: Record<string, string | number>;
71
- letterSpacings?: Record<string, string>;
72
- };
73
- /** Shadow scale */
74
- shadows?: Record<string, string>;
75
- /** Z-index scale */
76
- zIndex?: Record<string, string | number>;
77
- /** Breakpoints scale */
78
- breakpoints?: Record<string, string | number>;
79
- /** Transitions settings */
80
- transitions?: {
81
- durations?: Record<string, string>;
82
- easings?: Record<string, string>;
83
- };
59
+ /** Color palette */
60
+ colors?: Record<string, string | PaletteColorOptions | ColorScale | Record<string, string>>;
61
+ /** Spacing scale */
62
+ spacing?: Record<string, string>;
63
+ /** Border radius scale */
64
+ borderRadius?: Record<string, string>;
65
+ /** Typography scale and settings */
66
+ typography?: {
67
+ fontFamilies?: Record<string, string>;
68
+ fontSizes?: Record<string, string>;
69
+ fontWeights?: Record<string, string | number>;
70
+ lineHeights?: Record<string, string | number>;
71
+ letterSpacings?: Record<string, string>;
72
+ };
73
+ /** Shadow scale */
74
+ shadows?: Record<string, string>;
75
+ /** Z-index scale */
76
+ zIndex?: Record<string, string | number>;
77
+ /** Breakpoints scale */
78
+ breakpoints?: Record<string, string | number>;
79
+ /** Transitions settings */
80
+ transitions?: {
81
+ durations?: Record<string, string>;
82
+ easings?: Record<string, string>;
83
+ };
84
84
  }
85
85
 
86
86
  /**
87
87
  * CSS Theme Definition
88
88
  */
89
89
  export interface CSSThemeDefinition {
90
- type: 'css';
91
- name: string;
92
- class?: string;
93
- description?: string;
94
- author?: string;
95
- version?: string;
96
- tags?: string[];
97
- supportsDarkMode?: boolean;
98
- status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
99
- a11y?: {
100
- contrastTarget?: number;
101
- modes?: string[];
102
- };
103
- color?: string;
104
- features?: string[];
105
- dependencies?: string[];
106
- cssPath?: string;
90
+ type: 'css';
91
+ name: string;
92
+ class?: string;
93
+ description?: string;
94
+ author?: string;
95
+ version?: string;
96
+ tags?: string[];
97
+ supportsDarkMode?: boolean;
98
+ status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
99
+ a11y?: {
100
+ contrastTarget?: number;
101
+ modes?: string[];
102
+ };
103
+ color?: string;
104
+ features?: string[];
105
+ dependencies?: string[];
106
+ cssPath?: string;
107
107
  }
108
108
 
109
109
  /**
110
110
  * JavaScript Theme Definition
111
111
  */
112
112
  export interface JSThemeDefinition {
113
- type: 'js';
114
- name: string;
115
- class?: string;
116
- description?: string;
117
- author?: string;
118
- version?: string;
119
- tags?: string[];
120
- supportsDarkMode?: boolean;
121
- status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
122
- a11y?: {
123
- contrastTarget?: number;
124
- modes?: string[];
125
- };
126
- color?: string;
127
- features?: string[];
128
- dependencies?: string[];
129
- createTheme: () => Theme;
113
+ type: 'js';
114
+ name: string;
115
+ class?: string;
116
+ description?: string;
117
+ author?: string;
118
+ version?: string;
119
+ tags?: string[];
120
+ supportsDarkMode?: boolean;
121
+ status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
122
+ a11y?: {
123
+ contrastTarget?: number;
124
+ modes?: string[];
125
+ };
126
+ color?: string;
127
+ features?: string[];
128
+ dependencies?: string[];
129
+ createTheme: () => Theme;
130
130
  }
131
131
 
132
132
  /**
@@ -138,122 +138,122 @@ export type ThemeDefinition = CSSThemeDefinition | JSThemeDefinition;
138
138
  * Build configuration (migrated from theme.config.ts)
139
139
  */
140
140
  export interface BuildConfig {
141
- output?: {
142
- directory?: string;
143
- formats?: {
144
- expanded?: string;
145
- compressed?: string;
146
- };
147
- };
148
- sass?: {
149
- style?: 'expanded' | 'compressed';
150
- sourceMap?: boolean;
151
- loadPaths?: string[];
141
+ output?: {
142
+ directory?: string;
143
+ formats?: {
144
+ expanded?: string;
145
+ compressed?: string;
152
146
  };
147
+ };
148
+ sass?: {
149
+ style?: 'expanded' | 'compressed';
150
+ sourceMap?: boolean;
151
+ loadPaths?: string[];
152
+ };
153
153
  }
154
154
 
155
155
  /**
156
156
  * Runtime configuration (migrated from theme.config.ts)
157
157
  */
158
158
  export interface RuntimeConfig {
159
- basePath?: string;
160
- cdnPath?: string | null;
161
- preload?: string[];
162
- lazy?: boolean;
163
- defaultTheme?: string;
164
- storageKey?: string;
165
- dataAttribute?: string;
166
- enablePersistence?: boolean;
167
- useMinified?: boolean;
159
+ basePath?: string;
160
+ cdnPath?: string | null;
161
+ preload?: string[];
162
+ lazy?: boolean;
163
+ defaultTheme?: string;
164
+ storageKey?: string;
165
+ dataAttribute?: string;
166
+ enablePersistence?: boolean;
167
+ useMinified?: boolean;
168
168
  }
169
169
 
170
170
  /**
171
171
  * Integration settings (migrated from theme.config.ts)
172
172
  */
173
173
  export interface IntegrationConfig {
174
- cssVariables?: Record<string, string>;
175
- classNames?: {
176
- theme?: string;
177
- colorMode?: string;
178
- };
174
+ cssVariables?: Record<string, string>;
175
+ classNames?: {
176
+ theme?: string;
177
+ colorMode?: string;
178
+ };
179
179
  }
180
180
 
181
181
  /**
182
182
  * Atomix Configuration Interface
183
- *
183
+ *
184
184
  * Tailwind-like configuration for external developers.
185
185
  * Focus on theme customization - build/runtime configs are internal only.
186
186
  */
187
187
  export interface AtomixConfig {
188
- /**
189
- * CSS variable prefix (default: 'atomix')
190
- *
191
- * Change this to customize all CSS variable names.
192
- * Example: prefix: 'myapp' → --myapp-primary instead of --atomix-primary
193
- */
194
- prefix?: string;
188
+ /**
189
+ * CSS variable prefix (default: 'atomix')
190
+ *
191
+ * Change this to customize all CSS variable names.
192
+ * Example: prefix: 'myapp' → --myapp-primary instead of --atomix-primary
193
+ */
194
+ prefix?: string;
195
195
 
196
- /**
197
- * Theme customization (Tailwind-like)
198
- *
199
- * Use `extend` to add or override design tokens.
200
- * Use `tokens` to completely replace the default token system (advanced).
196
+ /**
197
+ * Theme customization (Tailwind-like)
198
+ *
199
+ * Use `extend` to add or override design tokens.
200
+ * Use `tokens` to completely replace the default token system (advanced).
201
+ */
202
+ theme?: {
203
+ /**
204
+ * Extend the default design tokens
205
+ *
206
+ * This is the recommended way to customize Atomix.
207
+ * Your values will override or extend the base tokens.
201
208
  */
202
- theme?: {
203
- /**
204
- * Extend the default design tokens
205
- *
206
- * This is the recommended way to customize Atomix.
207
- * Your values will override or extend the base tokens.
208
- */
209
- extend?: ThemeTokens;
209
+ extend?: ThemeTokens;
210
210
 
211
- /**
212
- * Override the default tokens entirely (advanced)
213
- *
214
- * Use with caution - this replaces the entire token system.
215
- * Most users should use `extend` instead.
216
- */
217
- tokens?: ThemeTokens;
211
+ /**
212
+ * Override the default tokens entirely (advanced)
213
+ *
214
+ * Use with caution - this replaces the entire token system.
215
+ * Most users should use `extend` instead.
216
+ */
217
+ tokens?: ThemeTokens;
218
218
 
219
- /**
220
- * Register custom themes (optional)
221
- *
222
- * Define CSS or JavaScript themes that can be loaded dynamically.
223
- */
224
- themes?: Record<string, ThemeDefinition>;
225
- };
219
+ /**
220
+ * Register custom themes (optional)
221
+ *
222
+ * Define CSS or JavaScript themes that can be loaded dynamically.
223
+ */
224
+ themes?: Record<string, ThemeDefinition>;
225
+ };
226
226
 
227
- // Internal configurations (for library development only)
228
- // These are not needed for external developers
229
- /** @internal Build configuration (internal use only) */
230
- build?: BuildConfig;
231
- /** @internal Runtime configuration (internal use only) */
232
- runtime?: RuntimeConfig;
233
- /** @internal Integration settings (internal use only) */
234
- integration?: IntegrationConfig;
235
- /** @internal Theme dependencies mapping (internal use only) */
236
- dependencies?: Record<string, string[]>;
227
+ // Internal configurations (for library development only)
228
+ // These are not needed for external developers
229
+ /** @internal Build configuration (internal use only) */
230
+ build?: BuildConfig;
231
+ /** @internal Runtime configuration (internal use only) */
232
+ runtime?: RuntimeConfig;
233
+ /** @internal Integration settings (internal use only) */
234
+ integration?: IntegrationConfig;
235
+ /** @internal Theme dependencies mapping (internal use only) */
236
+ dependencies?: Record<string, string[]>;
237
237
  }
238
238
 
239
239
  /**
240
240
  * Helper function to define Atomix configuration with type safety
241
- *
241
+ *
242
242
  * @param config - Atomix configuration object
243
243
  * @returns The configuration object
244
244
  */
245
245
  /**
246
246
  * Helper function to define Atomix configuration with type safety
247
- *
247
+ *
248
248
  * Similar to Tailwind's defineConfig, provides autocomplete and type checking.
249
- *
249
+ *
250
250
  * @param config - Atomix configuration object
251
251
  * @returns The configuration object
252
- *
252
+ *
253
253
  * @example
254
254
  * ```typescript
255
255
  * import { defineConfig } from '@shohojdhara/atomix/config';
256
- *
256
+ *
257
257
  * export default defineConfig({
258
258
  * theme: {
259
259
  * extend: {
@@ -266,7 +266,7 @@ export interface AtomixConfig {
266
266
  * ```
267
267
  */
268
268
  export function defineConfig(config: AtomixConfig): AtomixConfig {
269
- return config;
269
+ return config;
270
270
  }
271
271
 
272
272
  // Export loader functions
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * CSS Variables Constants
3
- *
3
+ *
4
4
  * Comprehensive CSS custom property definitions for all components.
5
5
  * These provide type-safe access to component styling variables.
6
6
  */
@@ -24,7 +24,7 @@ export const BUTTON_CSS_VARS = {
24
24
  '--atomix-button-min-width': 'minimum width',
25
25
  '--atomix-button-min-height': 'minimum height',
26
26
  '--atomix-button-transition': 'transition',
27
-
27
+
28
28
  // State properties
29
29
  '--atomix-button-hover-bg': 'hover background',
30
30
  '--atomix-button-hover-color': 'hover text color',
@@ -35,7 +35,7 @@ export const BUTTON_CSS_VARS = {
35
35
  '--atomix-button-focus-ring-width': 'focus ring width',
36
36
  '--atomix-button-disabled-opacity': 'disabled opacity',
37
37
  '--atomix-button-disabled-bg': 'disabled background',
38
-
38
+
39
39
  // Part properties
40
40
  '--atomix-button-icon-size': 'icon size',
41
41
  '--atomix-button-icon-gap': 'icon spacing',
@@ -57,32 +57,32 @@ export const CARD_CSS_VARS = {
57
57
  '--atomix-card-box-shadow': 'box shadow',
58
58
  '--atomix-card-width': 'width',
59
59
  '--atomix-card-max-width': 'maximum width',
60
-
60
+
61
61
  // State properties
62
62
  '--atomix-card-hover-bg': 'hover background',
63
63
  '--atomix-card-hover-shadow': 'hover shadow',
64
64
  '--atomix-card-hover-transform': 'hover transform',
65
-
65
+
66
66
  // Part properties - Header
67
67
  '--atomix-card-header-padding': 'header padding',
68
68
  '--atomix-card-header-bg': 'header background',
69
69
  '--atomix-card-header-border-bottom': 'header border bottom',
70
-
70
+
71
71
  // Part properties - Body
72
72
  '--atomix-card-body-padding': 'body padding',
73
73
  '--atomix-card-body-font-size': 'body font size',
74
-
74
+
75
75
  // Part properties - Footer
76
76
  '--atomix-card-footer-padding': 'footer padding',
77
77
  '--atomix-card-footer-bg': 'footer background',
78
78
  '--atomix-card-footer-border-top': 'footer border top',
79
-
79
+
80
80
  // Part properties - Title
81
81
  '--atomix-card-title-font-size': 'title font size',
82
82
  '--atomix-card-title-font-weight': 'title font weight',
83
83
  '--atomix-card-title-color': 'title color',
84
84
  '--atomix-card-title-margin-bottom': 'title margin bottom',
85
-
85
+
86
86
  // Part properties - Image
87
87
  '--atomix-card-image-border-radius': 'image border radius',
88
88
  '--atomix-card-image-max-height': 'image max height',
@@ -105,7 +105,7 @@ export const INPUT_CSS_VARS = {
105
105
  '--atomix-input-line-height': 'line height',
106
106
  '--atomix-input-height': 'height',
107
107
  '--atomix-input-placeholder-color': 'placeholder color',
108
-
108
+
109
109
  // State properties
110
110
  '--atomix-input-hover-border-color': 'hover border color',
111
111
  '--atomix-input-focus-border-color': 'focus border color',
@@ -130,27 +130,27 @@ export const MODAL_CSS_VARS = {
130
130
  '--atomix-modal-width': 'width',
131
131
  '--atomix-modal-max-width': 'maximum width',
132
132
  '--atomix-modal-max-height': 'maximum height',
133
-
133
+
134
134
  // Backdrop properties
135
135
  '--atomix-modal-backdrop-bg': 'backdrop background',
136
136
  '--atomix-modal-backdrop-opacity': 'backdrop opacity',
137
137
  '--atomix-modal-backdrop-blur': 'backdrop blur',
138
-
138
+
139
139
  // Part properties - Header
140
140
  '--atomix-modal-header-padding': 'header padding',
141
141
  '--atomix-modal-header-border-bottom': 'header border bottom',
142
142
  '--atomix-modal-title-font-size': 'title font size',
143
143
  '--atomix-modal-title-font-weight': 'title font weight',
144
-
144
+
145
145
  // Part properties - Body
146
146
  '--atomix-modal-body-padding': 'body padding',
147
147
  '--atomix-modal-body-font-size': 'body font size',
148
-
148
+
149
149
  // Part properties - Footer
150
150
  '--atomix-modal-footer-padding': 'footer padding',
151
151
  '--atomix-modal-footer-border-top': 'footer border top',
152
152
  '--atomix-modal-footer-gap': 'footer button gap',
153
-
153
+
154
154
  // Part properties - Close button
155
155
  '--atomix-modal-close-size': 'close button size',
156
156
  '--atomix-modal-close-color': 'close button color',
@@ -171,7 +171,7 @@ export const DROPDOWN_CSS_VARS = {
171
171
  '--atomix-dropdown-min-width': 'minimum width',
172
172
  '--atomix-dropdown-max-height': 'maximum height',
173
173
  '--atomix-dropdown-padding': 'padding',
174
-
174
+
175
175
  // Part properties - Item
176
176
  '--atomix-dropdown-item-padding': 'item padding',
177
177
  '--atomix-dropdown-item-font-size': 'item font size',
@@ -180,11 +180,11 @@ export const DROPDOWN_CSS_VARS = {
180
180
  '--atomix-dropdown-item-active-bg': 'item active background',
181
181
  '--atomix-dropdown-item-active-color': 'item active color',
182
182
  '--atomix-dropdown-item-disabled-opacity': 'item disabled opacity',
183
-
183
+
184
184
  // Part properties - Divider
185
185
  '--atomix-dropdown-divider-color': 'divider color',
186
186
  '--atomix-dropdown-divider-margin': 'divider margin',
187
-
187
+
188
188
  // Part properties - Header
189
189
  '--atomix-dropdown-header-padding': 'header padding',
190
190
  '--atomix-dropdown-header-font-size': 'header font size',
@@ -205,7 +205,7 @@ export const BADGE_CSS_VARS = {
205
205
  '--atomix-badge-font-size': 'font size',
206
206
  '--atomix-badge-font-weight': 'font weight',
207
207
  '--atomix-badge-line-height': 'line height',
208
-
208
+
209
209
  // Part properties
210
210
  '--atomix-badge-icon-size': 'icon size',
211
211
  '--atomix-badge-icon-gap': 'icon spacing',
@@ -219,11 +219,11 @@ export const TABS_CSS_VARS = {
219
219
  '--atomix-tabs-bg': 'background color',
220
220
  '--atomix-tabs-border-color': 'border color',
221
221
  '--atomix-tabs-border-width': 'border width',
222
-
222
+
223
223
  // Part properties - Nav
224
224
  '--atomix-tabs-nav-gap': 'nav gap',
225
225
  '--atomix-tabs-nav-padding': 'nav padding',
226
-
226
+
227
227
  // Part properties - Tab button
228
228
  '--atomix-tabs-btn-padding-x': 'button horizontal padding',
229
229
  '--atomix-tabs-btn-padding-y': 'button vertical padding',
@@ -234,7 +234,7 @@ export const TABS_CSS_VARS = {
234
234
  '--atomix-tabs-btn-active-color': 'button active color',
235
235
  '--atomix-tabs-btn-active-border-color': 'button active border color',
236
236
  '--atomix-tabs-btn-active-border-width': 'button active border width',
237
-
237
+
238
238
  // Part properties - Panel
239
239
  '--atomix-tabs-panel-padding': 'panel padding',
240
240
  '--atomix-tabs-panel-bg': 'panel background',
@@ -248,7 +248,7 @@ export const PROGRESS_CSS_VARS = {
248
248
  '--atomix-progress-bg': 'background color',
249
249
  '--atomix-progress-height': 'height',
250
250
  '--atomix-progress-border-radius': 'border radius',
251
-
251
+
252
252
  // Part properties - Bar
253
253
  '--atomix-progress-bar-bg': 'bar background',
254
254
  '--atomix-progress-bar-transition': 'bar transition',
@@ -268,7 +268,7 @@ export const TOOLTIP_CSS_VARS = {
268
268
  '--atomix-tooltip-max-width': 'maximum width',
269
269
  '--atomix-tooltip-box-shadow': 'box shadow',
270
270
  '--atomix-tooltip-z-index': 'z-index',
271
-
271
+
272
272
  // Arrow properties
273
273
  '--atomix-tooltip-arrow-size': 'arrow size',
274
274
  '--atomix-tooltip-arrow-color': 'arrow color',
@@ -285,7 +285,7 @@ export const CHECKBOX_CSS_VARS = {
285
285
  '--atomix-checkbox-border-width': 'border width',
286
286
  '--atomix-checkbox-border-radius': 'border radius',
287
287
  '--atomix-checkbox-transition': 'transition',
288
-
288
+
289
289
  // State properties
290
290
  '--atomix-checkbox-checked-bg': 'checked background',
291
291
  '--atomix-checkbox-checked-border-color': 'checked border color',
@@ -294,7 +294,7 @@ export const CHECKBOX_CSS_VARS = {
294
294
  '--atomix-checkbox-focus-ring-width': 'focus ring width',
295
295
  '--atomix-checkbox-disabled-opacity': 'disabled opacity',
296
296
  '--atomix-checkbox-invalid-border-color': 'invalid border color',
297
-
297
+
298
298
  // Part properties
299
299
  '--atomix-checkbox-icon-size': 'icon size',
300
300
  '--atomix-checkbox-icon-color': 'icon color',
@@ -313,7 +313,7 @@ export const RADIO_CSS_VARS = {
313
313
  '--atomix-radio-border-color': 'border color',
314
314
  '--atomix-radio-border-width': 'border width',
315
315
  '--atomix-radio-transition': 'transition',
316
-
316
+
317
317
  // State properties
318
318
  '--atomix-radio-checked-bg': 'checked background',
319
319
  '--atomix-radio-checked-border-color': 'checked border color',
@@ -322,7 +322,7 @@ export const RADIO_CSS_VARS = {
322
322
  '--atomix-radio-focus-ring-width': 'focus ring width',
323
323
  '--atomix-radio-disabled-opacity': 'disabled opacity',
324
324
  '--atomix-radio-invalid-border-color': 'invalid border color',
325
-
325
+
326
326
  // Part properties
327
327
  '--atomix-radio-dot-size': 'dot size',
328
328
  '--atomix-radio-dot-color': 'dot color',
@@ -385,6 +385,6 @@ export type ComponentCSSVariables = {
385
385
  */
386
386
  export function getComponentCSSVars<T extends keyof typeof COMPONENT_CSS_VARS>(
387
387
  component: T
388
- ): typeof COMPONENT_CSS_VARS[T] {
388
+ ): (typeof COMPONENT_CSS_VARS)[T] {
389
389
  return COMPONENT_CSS_VARS[component];
390
390
  }
@@ -25,9 +25,7 @@ describe('useComponentCustomization', () => {
25
25
  });
26
26
 
27
27
  it('should handle empty cssVars', () => {
28
- const { result } = renderHook(() =>
29
- useComponentCustomization('Button', {})
30
- );
28
+ const { result } = renderHook(() => useComponentCustomization('Button', {}));
31
29
 
32
30
  expect(result.current.cssVars).toEqual({});
33
31
  });
@@ -77,9 +75,7 @@ describe('useComponentCustomization', () => {
77
75
  });
78
76
 
79
77
  it('should handle empty parts', () => {
80
- const { result } = renderHook(() =>
81
- useComponentCustomization('Button', {})
82
- );
78
+ const { result } = renderHook(() => useComponentCustomization('Button', {}));
83
79
 
84
80
  expect(result.current.parts).toEqual({});
85
81
  });
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Hooks Exports
3
- *
3
+ *
4
4
  * Custom React hooks for component customization
5
5
  */
6
6