@shohojdhara/atomix 0.3.12 → 0.3.14

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 (155) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +2 -0
  3. package/dist/atomix.css +101 -88
  4. package/dist/atomix.css.map +1 -1
  5. package/dist/atomix.min.css +5 -15258
  6. package/dist/atomix.min.css.map +1 -1
  7. package/dist/charts.d.ts +1 -1
  8. package/dist/charts.js +17 -19
  9. package/dist/charts.js.map +1 -1
  10. package/dist/core.d.ts +41 -11
  11. package/dist/core.js +55 -41
  12. package/dist/core.js.map +1 -1
  13. package/dist/forms.d.ts +28 -11
  14. package/dist/forms.js +25 -24
  15. package/dist/forms.js.map +1 -1
  16. package/dist/heavy.d.ts +1 -1
  17. package/dist/heavy.js +32 -25
  18. package/dist/heavy.js.map +1 -1
  19. package/dist/index.d.ts +122 -46
  20. package/dist/index.esm.js +865 -200
  21. package/dist/index.esm.js.map +1 -1
  22. package/dist/index.js +870 -204
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.min.js +1 -1
  25. package/dist/index.min.js.map +1 -1
  26. package/dist/theme.d.ts +27 -2
  27. package/dist/theme.js +721 -108
  28. package/dist/theme.js.map +1 -1
  29. package/package.json +1 -1
  30. package/scripts/atomix-cli.js +610 -1111
  31. package/scripts/cli/component-generator.js +610 -0
  32. package/scripts/cli/documentation-sync.js +542 -0
  33. package/scripts/cli/interactive-init.js +84 -288
  34. package/scripts/cli/mappings.js +211 -0
  35. package/scripts/cli/migration-tools.js +95 -288
  36. package/scripts/cli/template-manager.js +107 -0
  37. package/scripts/cli/templates/README.md +123 -0
  38. package/scripts/cli/templates/composable-templates.js +149 -0
  39. package/scripts/cli/templates/config-templates.js +126 -0
  40. package/scripts/cli/templates/index.js +95 -0
  41. package/scripts/cli/templates/project-templates.js +214 -0
  42. package/scripts/cli/templates/react-templates.js +261 -0
  43. package/scripts/cli/templates/scss-templates.js +156 -0
  44. package/scripts/cli/templates/storybook-templates.js +236 -0
  45. package/scripts/cli/templates/testing-templates.js +45 -0
  46. package/scripts/cli/templates/token-templates.js +447 -0
  47. package/scripts/cli/templates/types-templates.js +133 -0
  48. package/scripts/cli/templates-original-backup.js +1655 -0
  49. package/scripts/cli/templates.js +35 -0
  50. package/scripts/cli/templates_backup.js +684 -0
  51. package/scripts/cli/theme-bridge.js +20 -14
  52. package/scripts/cli/token-manager.js +150 -77
  53. package/scripts/cli/utils.js +37 -25
  54. package/src/components/Accordion/Accordion.stories.tsx +5 -5
  55. package/src/components/Accordion/Accordion.test.tsx +57 -0
  56. package/src/components/Accordion/Accordion.tsx +4 -0
  57. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +41 -44
  58. package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +1 -1
  59. package/src/components/AtomixGlass/stories/Examples.stories.tsx +37 -37
  60. package/src/components/AtomixGlass/stories/Modes.stories.tsx +1 -2
  61. package/src/components/AtomixGlass/stories/Playground.stories.tsx +50 -51
  62. package/src/components/Avatar/Avatar.stories.tsx +26 -26
  63. package/src/components/Badge/Badge.stories.tsx +31 -31
  64. package/src/components/Badge/Badge.test.tsx +51 -0
  65. package/src/components/Badge/Badge.tsx +20 -1
  66. package/src/components/Block/Block.stories.tsx +5 -5
  67. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +1 -1
  68. package/src/components/Breadcrumb/Breadcrumb.tsx +2 -2
  69. package/src/components/Button/Button.stories.tsx +13 -13
  70. package/src/components/Button/Button.tsx +4 -4
  71. package/src/components/Button/ButtonGroup.stories.tsx +2 -2
  72. package/src/components/Button/README.md +5 -0
  73. package/src/components/Callout/Callout.stories.tsx +11 -11
  74. package/src/components/Callout/Callout.test.tsx +10 -10
  75. package/src/components/Callout/Callout.tsx +7 -7
  76. package/src/components/Callout/README.md +9 -8
  77. package/src/components/Card/Card.tsx +2 -2
  78. package/src/components/Chart/Chart.stories.tsx +6 -6
  79. package/src/components/Chart/Chart.tsx +1 -1
  80. package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +1 -1
  81. package/src/components/DataTable/DataTable.tsx +14 -12
  82. package/src/components/DatePicker/DatePicker.stories.tsx +6 -6
  83. package/src/components/Dropdown/Dropdown.stories.tsx +4 -4
  84. package/src/components/Form/Checkbox.stories.tsx +3 -3
  85. package/src/components/Form/Checkbox.tsx +4 -2
  86. package/src/components/Form/Form.stories.tsx +3 -3
  87. package/src/components/Form/FormGroup.stories.tsx +1 -1
  88. package/src/components/Form/Input.stories.tsx +28 -16
  89. package/src/components/Form/Input.test.tsx +59 -0
  90. package/src/components/Form/Input.tsx +97 -95
  91. package/src/components/Form/Radio.stories.tsx +94 -94
  92. package/src/components/Form/Radio.tsx +2 -2
  93. package/src/components/Form/Select.stories.tsx +4 -4
  94. package/src/components/Form/Select.tsx +2 -2
  95. package/src/components/Form/Textarea.stories.tsx +22 -7
  96. package/src/components/Form/Textarea.test.tsx +45 -0
  97. package/src/components/Form/Textarea.tsx +88 -86
  98. package/src/components/List/List.stories.tsx +2 -2
  99. package/src/components/Modal/Modal.stories.tsx +4 -4
  100. package/src/components/Navigation/Navbar/Navbar.stories.tsx +5 -5
  101. package/src/components/Navigation/Navbar/Navbar.tsx +1 -1
  102. package/src/components/Navigation/README.md +1 -1
  103. package/src/components/Pagination/Pagination.stories.tsx +5 -2
  104. package/src/components/Pagination/Pagination.tsx +1 -1
  105. package/src/components/PhotoViewer/PhotoViewer.stories.tsx +10 -10
  106. package/src/components/Popover/Popover.stories.tsx +1 -1
  107. package/src/components/ProductReview/ProductReview.tsx +1 -1
  108. package/src/components/Progress/Progress.tsx +46 -46
  109. package/src/components/Rating/Rating.stories.tsx +4 -4
  110. package/src/components/Rating/Rating.tsx +8 -8
  111. package/src/components/Slider/Slider.stories.tsx +63 -63
  112. package/src/components/Spinner/Spinner.stories.tsx +2 -2
  113. package/src/components/Spinner/Spinner.test.tsx +35 -0
  114. package/src/components/Spinner/Spinner.tsx +9 -2
  115. package/src/components/Testimonial/Testimonial.stories.tsx +1 -1
  116. package/src/components/Toggle/Toggle.stories.tsx +32 -9
  117. package/src/components/Toggle/Toggle.test.tsx +91 -0
  118. package/src/components/Toggle/Toggle.tsx +44 -27
  119. package/src/components/Tooltip/Tooltip.tsx +1 -1
  120. package/src/layouts/Grid/Grid.stories.tsx +49 -49
  121. package/src/layouts/MasonryGrid/MasonryGrid.stories.tsx +2 -2
  122. package/src/lib/composables/useAccordion.ts +12 -3
  123. package/src/lib/composables/useBreadcrumb.ts +2 -2
  124. package/src/lib/composables/useCallout.ts +7 -7
  125. package/src/lib/composables/useNavbar.ts +1 -1
  126. package/src/lib/constants/components.ts +1 -1
  127. package/src/lib/storybook/InteractiveDemo.tsx +113 -0
  128. package/src/lib/storybook/PreviewContainer.tsx +36 -0
  129. package/src/lib/storybook/VariantsGrid.tsx +21 -0
  130. package/src/lib/storybook/index.ts +3 -0
  131. package/src/lib/theme/core/createThemeObject.ts +9 -5
  132. package/src/lib/theme/devtools/CLI.ts +155 -0
  133. package/src/lib/theme/devtools/DesignTokensCustomizer.stories.tsx +213 -0
  134. package/src/lib/theme/devtools/DesignTokensCustomizer.tsx +566 -0
  135. package/src/lib/theme/devtools/LiveEditor.tsx +2 -1
  136. package/src/lib/theme/devtools/index.ts +3 -0
  137. package/src/lib/theme/errors/errors.ts +8 -0
  138. package/src/lib/theme/runtime/ThemeProvider.tsx +117 -57
  139. package/src/lib/theme/runtime/__tests__/ThemeProvider.integration.test.tsx +305 -0
  140. package/src/lib/theme/runtime/__tests__/ThemeProvider.test.tsx +588 -0
  141. package/src/lib/theme/utils/__tests__/themeValidation.test.ts +264 -0
  142. package/src/lib/theme/utils/index.ts +1 -0
  143. package/src/lib/theme/utils/themeValidation.ts +501 -0
  144. package/src/lib/theme-tools.ts +32 -3
  145. package/src/lib/types/components.ts +81 -26
  146. package/src/lib/utils/themeNaming.ts +1 -1
  147. package/src/styles/06-components/_components.atomix-glass.scss +14 -15
  148. package/src/styles/06-components/_components.callout.scss +29 -33
  149. package/src/styles/06-components/_index.scss +1 -1
  150. package/src/styles/99-utilities/_utilities.display.scss +14 -3
  151. package/src/styles/99-utilities/_utilities.flex.scss +10 -10
  152. package/src/styles/99-utilities/_utilities.text.scss +28 -8
  153. package/scripts/cli/__tests__/cli-commands.test.js +0 -204
  154. package/scripts/cli/__tests__/utils.test.js +0 -201
  155. package/scripts/cli/__tests__/vitest.config.js +0 -26
@@ -0,0 +1,447 @@
1
+ /**
2
+ * Token Generation Templates
3
+ * Templates for design system tokens
4
+ */
5
+
6
+ /**
7
+ * Color tokens generation function
8
+ */
9
+ export function generateColorTokens() {
10
+ return `// Custom Color Tokens
11
+ // Generated by Atomix CLI
12
+ // =============================================================================
13
+
14
+ // Brand Colors
15
+ // Customize these to match your brand identity
16
+ $custom-primary-1: #fff9e6 !default;
17
+ $custom-primary-2: #fff4cc !default;
18
+ $custom-primary-3: #ffe699 !default;
19
+ $custom-primary-4: #ffd966 !default;
20
+ $custom-primary-5: #ffcc33 !default;
21
+ $custom-primary-6: #ffb800 !default; // Main brand color
22
+ $custom-primary-7: #e6a600 !default;
23
+ $custom-primary-8: #cc9400 !default;
24
+ $custom-primary-9: #b38200 !default;
25
+ $custom-primary-10: #997000 !default;
26
+
27
+ // Semantic Colors
28
+ $custom-success: #22c55e !default;
29
+ $custom-warning: #eab308 !default;
30
+ $custom-error: #ef4444 !default;
31
+ $custom-info: #3b82f6 !default;
32
+
33
+ // Neutral Colors
34
+ $custom-gray-1: #f9fafb !default;
35
+ $custom-gray-2: #f3f4f6 !default;
36
+ $custom-gray-3: #e5e7eb !default;
37
+ $custom-gray-4: #d1d5db !default;
38
+ $custom-gray-5: #9ca3af !default;
39
+ $custom-gray-6: #6b7280 !default;
40
+ $custom-gray-7: #4b5563 !default;
41
+ $custom-gray-8: #374151 !default;
42
+ $custom-gray-9: #1f2937 !default;
43
+ $custom-gray-10: #111827 !default;
44
+
45
+ // Background Colors
46
+ $custom-body-bg: #ffffff !default;
47
+ $custom-body-bg-dark: #1f2937 !default;
48
+
49
+ // Text Colors
50
+ $custom-body-color: $custom-gray-10 !default;
51
+ $custom-body-color-dark: #ffffff !default;
52
+
53
+ // Link Colors
54
+ $custom-link-color: $custom-primary-6 !default;
55
+ $custom-link-hover-color: $custom-primary-7 !default;
56
+
57
+ // Border Colors
58
+ $custom-border-color: $custom-gray-3 !default;
59
+ $custom-border-color-dark: $custom-gray-7 !default;
60
+
61
+ // Focus Colors
62
+ $custom-focus-color: $custom-primary-5 !default;
63
+ $custom-focus-color-dark: $custom-primary-4 !default;
64
+
65
+ // Export custom colors to override defaults
66
+ $primary: $custom-primary-6 !default;
67
+ $success: $custom-success !default;
68
+ $warning: $custom-warning !default;
69
+ $error: $custom-error !default;
70
+ $info: $custom-info !default;
71
+
72
+ // Dark mode overrides
73
+ $body-bg-dark: $custom-body-bg-dark !default;
74
+ $body-color-dark: $custom-body-color-dark !default;
75
+ $border-color-dark: $custom-border-color-dark !default;
76
+ `;
77
+ }
78
+
79
+ /**
80
+ * Spacing tokens generation function
81
+ */
82
+ export function generateSpacingTokens() {
83
+ return `// Custom Spacing Tokens
84
+ // Generated by Atomix CLI
85
+ // =============================================================================
86
+
87
+ // Base spacing unit (change this to scale all spacing)
88
+ $custom-spacing-base: 0.25rem !default; // 4px
89
+
90
+ // Spacing scale
91
+ $custom-spacing-0: 0 !default;
92
+ $custom-spacing-1: $custom-spacing-base !default; // 4px
93
+ $custom-spacing-2: calc($custom-spacing-base * 2) !default; // 8px
94
+ $custom-spacing-3: calc($custom-spacing-base * 3) !default; // 12px
95
+ $custom-spacing-4: calc($custom-spacing-base * 4) !default; // 16px
96
+ $custom-spacing-5: calc($custom-spacing-base * 5) !default; // 20px
97
+ $custom-spacing-6: calc($custom-spacing-base * 6) !default; // 24px
98
+ $custom-spacing-7: calc($custom-spacing-base * 7) !default; // 28px
99
+ $custom-spacing-8: calc($custom-spacing-base * 8) !default; // 32px
100
+ $custom-spacing-9: calc($custom-spacing-base * 9) !default; // 36px
101
+ $custom-spacing-10: calc($custom-spacing-base * 10) !default; // 40px
102
+ $custom-spacing-11: calc($custom-spacing-base * 11) !default; // 44px
103
+ $custom-spacing-12: calc($custom-spacing-base * 12) !default; // 48px
104
+ $custom-spacing-14: calc($custom-spacing-base * 14) !default; // 56px
105
+ $custom-spacing-16: calc($custom-spacing-base * 16) !default; // 64px
106
+ $custom-spacing-20: calc($custom-spacing-base * 20) !default; // 80px
107
+ $custom-spacing-24: calc($custom-spacing-base * 24) !default; // 96px
108
+ $custom-spacing-28: calc($custom-spacing-base * 28) !default; // 112px
109
+ $custom-spacing-32: calc($custom-spacing-base * 32) !default; // 128px
110
+ $custom-spacing-36: calc($custom-spacing-base * 36) !default; // 144px
111
+ $custom-spacing-40: calc($custom-spacing-base * 40) !default; // 160px
112
+ $custom-spacing-44: calc($custom-spacing-base * 44) !default; // 176px
113
+ $custom-spacing-48: calc($custom-spacing-base * 48) !default; // 192px
114
+ $custom-spacing-52: calc($custom-spacing-base * 52) !default; // 208px
115
+ $custom-spacing-56: calc($custom-spacing-base * 56) !default; // 224px
116
+ $custom-spacing-60: calc($custom-spacing-base * 60) !default; // 240px
117
+ $custom-spacing-64: calc($custom-spacing-base * 64) !default; // 256px
118
+
119
+ // Component-specific spacing
120
+ $custom-button-padding-x: $custom-spacing-4 !default;
121
+ $custom-button-padding-y: $custom-spacing-2 !default;
122
+ $custom-card-padding: $custom-spacing-6 !default;
123
+ $custom-modal-padding: $custom-spacing-8 !default;
124
+
125
+ // Layout spacing
126
+ $custom-container-padding: $custom-spacing-4 !default;
127
+ $custom-grid-gap: $custom-spacing-6 !default;
128
+ $custom-section-spacing: $custom-spacing-16 !default;
129
+
130
+ // Export to override defaults
131
+ $spacing-sizes: (
132
+ 0: $custom-spacing-0,
133
+ 1: $custom-spacing-1,
134
+ 2: $custom-spacing-2,
135
+ 3: $custom-spacing-3,
136
+ 4: $custom-spacing-4,
137
+ 5: $custom-spacing-5,
138
+ 6: $custom-spacing-6,
139
+ 7: $custom-spacing-7,
140
+ 8: $custom-spacing-8,
141
+ 9: $custom-spacing-9,
142
+ 10: $custom-spacing-10,
143
+ 12: $custom-spacing-12,
144
+ 16: $custom-spacing-16,
145
+ 20: $custom-spacing-20,
146
+ 24: $custom-spacing-24,
147
+ 32: $custom-spacing-32,
148
+ 40: $custom-spacing-40,
149
+ 48: $custom-spacing-48,
150
+ 56: $custom-spacing-56,
151
+ 64: $custom-spacing-64,
152
+ ) !default;
153
+ `;
154
+ }
155
+
156
+ /**
157
+ * Typography tokens generation function
158
+ */
159
+ export function generateTypographyTokens() {
160
+ return `// Custom Typography Tokens
161
+ // Generated by Atomix CLI
162
+ // =============================================================================
163
+
164
+ // Font Families
165
+ $custom-font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !default;
166
+ $custom-font-family-serif: Georgia, "Times New Roman", Times, serif !default;
167
+ $custom-font-family-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
168
+
169
+ // Font Size Scale
170
+ $custom-font-size-xs: 0.75rem !default; // 12px
171
+ $custom-font-size-sm: 0.875rem !default; // 14px
172
+ $custom-font-size-base: 1rem !default; // 16px
173
+ $custom-font-size-lg: 1.125rem !default; // 18px
174
+ $custom-font-size-xl: 1.25rem !default; // 20px
175
+ $custom-font-size-2xl: 1.5rem !default; // 24px
176
+ $custom-font-size-3xl: 1.875rem !default; // 30px
177
+ $custom-font-size-4xl: 2.25rem !default; // 36px
178
+ $custom-font-size-5xl: 3rem !default; // 48px
179
+ $custom-font-size-6xl: 3.75rem !default; // 60px
180
+ $custom-font-size-7xl: 4.5rem !default; // 72px
181
+ $custom-font-size-8xl: 6rem !default; // 96px
182
+
183
+ // Line Heights
184
+ $custom-line-height-tight: 1.2 !default;
185
+ $custom-line-height-base: 1.5 !default;
186
+ $custom-line-height-relaxed: 1.75 !default;
187
+ $custom-line-height-loose: 2 !default;
188
+
189
+ // Font Weights
190
+ $custom-font-weight-light: 300 !default;
191
+ $custom-font-weight-normal: 400 !default;
192
+ $custom-font-weight-medium: 500 !default;
193
+ $custom-font-weight-semibold: 600 !default;
194
+ $custom-font-weight-bold: 700 !default;
195
+ $custom-font-weight-heavy: 800 !default;
196
+ $custom-font-weight-black: 900 !default;
197
+
198
+ // Letter Spacing
199
+ $custom-letter-spacing-tight: -0.05em !default;
200
+ $custom-letter-spacing-normal: 0 !default;
201
+ $custom-letter-spacing-wide: 0.025em !default;
202
+ $custom-letter-spacing-wider: 0.05em !default;
203
+ $custom-letter-spacing-widest: 0.1em !default;
204
+
205
+ // Heading Sizes
206
+ $custom-h1-font-size: $custom-font-size-5xl !default;
207
+ $custom-h2-font-size: $custom-font-size-4xl !default;
208
+ $custom-h3-font-size: $custom-font-size-3xl !default;
209
+ $custom-h4-font-size: $custom-font-size-2xl !default;
210
+ $custom-h5-font-size: $custom-font-size-xl !default;
211
+ $custom-h6-font-size: $custom-font-size-lg !default;
212
+
213
+ // Export to override defaults
214
+ $font-family-base: $custom-font-family-sans !default;
215
+ $font-family-monospace: $custom-font-family-mono !default;
216
+ $font-size-base: $custom-font-size-base !default;
217
+ $font-size-sm: $custom-font-size-sm !default;
218
+ $font-size-lg: $custom-font-size-lg !default;
219
+ $line-height-base: $custom-line-height-base !default;
220
+ $font-weight-base: $custom-font-weight-normal !default;
221
+
222
+ // Heading overrides
223
+ $h1-font-size: $custom-h1-font-size !default;
224
+ $h2-font-size: $custom-h2-font-size !default;
225
+ $h3-font-size: $custom-h3-font-size !default;
226
+ $h4-font-size: $custom-h4-font-size !default;
227
+ $h5-font-size: $custom-h5-font-size !default;
228
+ $h6-font-size: $custom-h6-font-size !default;
229
+ `;
230
+ }
231
+
232
+ /**
233
+ * Shadow tokens generation function
234
+ */
235
+ export function generateShadowTokens() {
236
+ return `// Custom Box Shadow Tokens
237
+ // Generated by Atomix CLI
238
+ // =============================================================================
239
+
240
+ // Shadow Colors
241
+ $custom-shadow-color: rgba(0, 0, 0, 0.1) !default;
242
+ $custom-shadow-color-dark: rgba(0, 0, 0, 0.2) !default;
243
+
244
+ // Shadow Sizes
245
+ $custom-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !default;
246
+ $custom-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !default;
247
+ $custom-shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !default;
248
+ $custom-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !default;
249
+ $custom-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !default;
250
+ $custom-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !default;
251
+ $custom-shadow-2xl: 0 35px 60px -15px rgba(0, 0, 0, 0.3) !default;
252
+ $custom-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !default;
253
+ $custom-shadow-none: none !default;
254
+
255
+ // Component-specific shadows
256
+ $custom-button-shadow: $custom-shadow-sm !default;
257
+ $custom-button-shadow-hover: $custom-shadow-md !default;
258
+ $custom-card-shadow: $custom-shadow-base !default;
259
+ $custom-dropdown-shadow: $custom-shadow-lg !default;
260
+ $custom-modal-shadow: $custom-shadow-xl !default;
261
+ $custom-popover-shadow: $custom-shadow-lg !default;
262
+ $custom-tooltip-shadow: $custom-shadow-md !default;
263
+
264
+ // Dark mode shadows
265
+ $custom-shadow-xs-dark: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !default;
266
+ $custom-shadow-sm-dark: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3) !default;
267
+ $custom-shadow-base-dark: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3) !default;
268
+ $custom-shadow-lg-dark: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4) !default;
269
+ $custom-shadow-xl-dark: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !default;
270
+
271
+ // Export to override defaults
272
+ $box-shadow: $custom-shadow-base !default;
273
+ $box-shadow-xs: $custom-shadow-xs !default;
274
+ $box-shadow-sm: $custom-shadow-sm !default;
275
+ $box-shadow-lg: $custom-shadow-lg !default;
276
+ $box-shadow-xl: $custom-shadow-xl !default;
277
+ $box-shadow-inset: $custom-shadow-inner !default;
278
+
279
+ // Dark mode exports
280
+ $box-shadow-dark: $custom-shadow-base-dark !default;
281
+ $box-shadow-xs-dark: $custom-shadow-xs-dark !default;
282
+ $box-shadow-sm-dark: $custom-shadow-sm-dark !default;
283
+ $box-shadow-lg-dark: $custom-shadow-lg-dark !default;
284
+ $box-shadow-xl-dark: $custom-shadow-xl-dark !default;
285
+ `;
286
+ }
287
+
288
+ /**
289
+ * Radius tokens generation function
290
+ */
291
+ export function generateRadiusTokens() {
292
+ return `// Custom Border Radius Tokens
293
+ // Generated by Atomix CLI
294
+ // =============================================================================
295
+
296
+ // Base radius unit
297
+ $custom-radius-base: 0.25rem !default; // 4px
298
+
299
+ // Radius Scale
300
+ $custom-radius-none: 0 !default;
301
+ $custom-radius-sm: calc($custom-radius-base * 0.5) !default; // 2px
302
+ $custom-radius-base: $custom-radius-base !default; // 4px
303
+ $custom-radius-md: calc($custom-radius-base * 1.5) !default; // 6px
304
+ $custom-radius-lg: calc($custom-radius-base * 2) !default; // 8px
305
+ $custom-radius-xl: calc($custom-radius-base * 3) !default; // 12px
306
+ $custom-radius-2xl: calc($custom-radius-base * 4) !default; // 16px
307
+ $custom-radius-3xl: calc($custom-radius-base * 6) !default; // 24px
308
+ $custom-radius-4xl: calc($custom-radius-base * 8) !default; // 32px
309
+ $custom-radius-full: 9999px !default; // Fully rounded
310
+
311
+ // Component-specific radius
312
+ $custom-button-radius: $custom-radius-md !default;
313
+ $custom-button-radius-sm: $custom-radius-sm !default;
314
+ $custom-button-radius-lg: $custom-radius-lg !default;
315
+ $custom-card-radius: $custom-radius-lg !default;
316
+ $custom-input-radius: $custom-radius-md !default;
317
+ $custom-badge-radius: $custom-radius-full !default;
318
+ $custom-chip-radius: $custom-radius-full !default;
319
+ $custom-tooltip-radius: $custom-radius-md !default;
320
+ $custom-modal-radius: $custom-radius-xl !default;
321
+ $custom-dropdown-radius: $custom-radius-lg !default;
322
+
323
+ // Export to override defaults
324
+ $border-radius: $custom-radius-md !default;
325
+ $border-radius-sm: $custom-radius-sm !default;
326
+ $border-radius-lg: $custom-radius-lg !default;
327
+ $border-radius-xl: $custom-radius-xl !default;
328
+ $border-radius-xxl: $custom-radius-2xl !default;
329
+ $border-radius-3xl: $custom-radius-3xl !default;
330
+ $border-radius-4xl: $custom-radius-4xl !default;
331
+ $border-radius-pill: $custom-radius-full !default;
332
+
333
+ // Component radius exports
334
+ $btn-border-radius: $custom-button-radius !default;
335
+ $btn-border-radius-sm: $custom-button-radius-sm !default;
336
+ $btn-border-radius-lg: $custom-button-radius-lg !default;
337
+ $card-border-radius: $custom-card-radius !default;
338
+ $input-border-radius: $custom-input-radius !default;
339
+ $badge-border-radius: $custom-badge-radius !default;
340
+ `;
341
+ }
342
+
343
+ /**
344
+ * Animation tokens generation function
345
+ */
346
+ export function generateAnimationTokens() {
347
+ return `// Custom Animation Tokens
348
+ // Generated by Atomix CLI
349
+ // =============================================================================
350
+
351
+ // Transition Durations
352
+ $custom-duration-instant: 0s !default;
353
+ $custom-duration-fast: 0.15s !default;
354
+ $custom-duration-base: 0.3s !default;
355
+ $custom-duration-slow: 0.5s !default;
356
+ $custom-duration-slower: 0.7s !default;
357
+ $custom-duration-slowest: 1s !default;
358
+
359
+ // Easing Functions
360
+ $custom-ease-linear: linear !default;
361
+ $custom-ease-in: cubic-bezier(0.4, 0, 1, 1) !default;
362
+ $custom-ease-out: cubic-bezier(0, 0, 0.2, 1) !default;
363
+ $custom-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1) !default;
364
+ $custom-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55) !default;
365
+ $custom-ease-smooth: cubic-bezier(0.23, 1, 0.32, 1) !default;
366
+
367
+ // Transition Properties
368
+ $custom-transition-all: all $custom-duration-base $custom-ease-smooth !default;
369
+ $custom-transition-colors: background-color $custom-duration-base $custom-ease-smooth,
370
+ border-color $custom-duration-base $custom-ease-smooth,
371
+ color $custom-duration-base $custom-ease-smooth,
372
+ fill $custom-duration-base $custom-ease-smooth,
373
+ stroke $custom-duration-base $custom-ease-smooth !default;
374
+ $custom-transition-opacity: opacity $custom-duration-base $custom-ease-smooth !default;
375
+ $custom-transition-shadow: box-shadow $custom-duration-base $custom-ease-smooth !default;
376
+ $custom-transition-transform: transform $custom-duration-base $custom-ease-smooth !default;
377
+
378
+ // Component-specific transitions
379
+ $custom-button-transition: $custom-transition-colors, $custom-transition-shadow, $custom-transition-transform !default;
380
+ $custom-link-transition: $custom-transition-colors, text-decoration-color $custom-duration-base $custom-ease-smooth !default;
381
+ $custom-input-transition: $custom-transition-colors, $custom-transition-shadow !default;
382
+ $custom-card-transition: $custom-transition-shadow, $custom-transition-transform !default;
383
+ $custom-modal-transition: $custom-transition-opacity, $custom-transition-transform !default;
384
+ $custom-dropdown-transition: $custom-transition-opacity, $custom-transition-transform !default;
385
+
386
+ // Animation Keyframes (examples)
387
+ @keyframes custom-fade-in {
388
+ from { opacity: 0; }
389
+ to { opacity: 1; }
390
+ }
391
+
392
+ @keyframes custom-slide-in-up {
393
+ from {
394
+ transform: translateY(10px);
395
+ opacity: 0;
396
+ }
397
+ to {
398
+ transform: translateY(0);
399
+ opacity: 1;
400
+ }
401
+ }
402
+
403
+ @keyframes custom-scale-in {
404
+ from {
405
+ transform: scale(0.95);
406
+ opacity: 0;
407
+ }
408
+ to {
409
+ transform: scale(1);
410
+ opacity: 1;
411
+ }
412
+ }
413
+
414
+ @keyframes custom-spin {
415
+ from { transform: rotate(0deg); }
416
+ to { transform: rotate(360deg); }
417
+ }
418
+
419
+ // Export to override defaults
420
+ $transition-fast: $custom-transition-all !default;
421
+ $transition-base: $custom-transition-all !default;
422
+ $transition-slow: all $custom-duration-slow $custom-ease-smooth !default;
423
+
424
+ // Duration exports
425
+ $transition-duration-fast: $custom-duration-fast !default;
426
+ $transition-duration-base: $custom-duration-base !default;
427
+ $transition-duration-slow: $custom-duration-slow !default;
428
+
429
+ // Easing exports
430
+ $easing-base: $custom-ease-smooth !default;
431
+ $easing-ease-in-out: $custom-ease-in-out !default;
432
+ $easing-ease-out: $custom-ease-out !default;
433
+ $easing-ease-in: $custom-ease-in !default;
434
+ `;
435
+ }
436
+
437
+ /**
438
+ * Token templates export object
439
+ */
440
+ export const tokenTemplates = {
441
+ generateColorTokens,
442
+ generateSpacingTokens,
443
+ generateTypographyTokens,
444
+ generateShadowTokens,
445
+ generateRadiusTokens,
446
+ generateAnimationTokens,
447
+ };
@@ -0,0 +1,133 @@
1
+ /**
2
+ * TypeScript Templates
3
+ * Templates for TypeScript definitions and types
4
+ */
5
+
6
+ /**
7
+ * TypeScript interface template for component props
8
+ */
9
+ export const typesTemplate = (name) => `// ${name} Component Types
10
+ // Generated by Atomix CLI
11
+ // These should be added to src/lib/types/components.ts
12
+
13
+ import type { BaseComponentProps } from './base';
14
+
15
+ /**
16
+ * ${name} component props
17
+ */
18
+ export interface ${name}Props extends BaseComponentProps {
19
+ /**
20
+ * Whether the ${name.toLowerCase()} is open
21
+ */
22
+ isOpen?: boolean;
23
+
24
+ /**
25
+ * Whether the ${name.toLowerCase()} is open by default (uncontrolled mode)
26
+ */
27
+ defaultIsOpen?: boolean;
28
+
29
+ /**
30
+ * Callback fired when ${name.toLowerCase()} is toggled
31
+ */
32
+ onToggle?: (isOpen: boolean) => void;
33
+
34
+ /**
35
+ * Content to be rendered inside the ${name.toLowerCase()}
36
+ */
37
+ children?: React.ReactNode;
38
+
39
+ /**
40
+ * Size variant
41
+ */
42
+ size?: 'sm' | 'md' | 'lg';
43
+
44
+ /**
45
+ * Visual variant
46
+ */
47
+ variant?: 'primary' | 'secondary';
48
+
49
+ /**
50
+ * Whether the ${name.toLowerCase()} is disabled
51
+ */
52
+ disabled?: boolean;
53
+ }
54
+
55
+ /**
56
+ * ${name} component state type
57
+ */
58
+ export type ${name}State = {
59
+ isOpen: boolean;
60
+ isControlled: boolean;
61
+ };
62
+
63
+ /**
64
+ * ${name} context interface
65
+ */
66
+ export interface ${name}Context {
67
+ component?: ${name}Props;
68
+ state: ${name}State;
69
+ actions: {
70
+ toggle: () => void;
71
+ open: () => void;
72
+ close: () => void;
73
+ setIsOpen: (isOpen: boolean) => void;
74
+ };
75
+ }
76
+
77
+ // Legacy types for backward compatibility
78
+ export type ${name}Ref = HTMLDivElement;
79
+ `;
80
+
81
+ /**
82
+ * Constants template for component-specific constants
83
+ */
84
+ export const constantsTemplate = (name) => `// ${name} Component Constants
85
+ // Generated by Atomix CLI
86
+ // These should be added to src/lib/constants/components.ts
87
+
88
+ export const ${name.toUpperCase()} = {
89
+ SELECTORS: {
90
+ ${name.toUpperCase()}: '.c-${name.toLowerCase()}',
91
+ HEADER: '.c-${name.toLowerCase()}__header',
92
+ PANEL: '.c-${name.toLowerCase()}__panel',
93
+ CONTENT: '.c-${name.toLowerCase()}-content',
94
+ },
95
+ CLASSES: {
96
+ IS_OPEN: 'is-open',
97
+ IS_DISABLED: 'is-disabled',
98
+ IS_ANIMATED: 'is-animated',
99
+ },
100
+ DATA_ATTRIBUTES: {
101
+ COMPONENT: 'data-${name.toLowerCase()}',
102
+ STATE: 'data-state',
103
+ DISABLED: 'data-disabled',
104
+ },
105
+ DEFAULT_PROPS: {
106
+ // Add default props specific to ${name}
107
+ },
108
+ ANIMATIONS: {
109
+ DURATION: '200ms',
110
+ EASING: 'cubic-bezier(0.4, 0, 0.2, 1)',
111
+ },
112
+ } as const;
113
+
114
+ // Type exports for ${name} component
115
+ export type ${name}State = 'open' | 'closed';
116
+ export type ${name}Size = 'sm' | 'md' | 'lg';
117
+ export type ${name}Variant = 'primary' | 'secondary';
118
+ `;
119
+
120
+ /**
121
+ * Index template for component exports
122
+ */
123
+ export const indexTemplate = (name) => `export { default as ${name} } from './${name}';
124
+ export type { ${name}Props } from '../../lib/types/components';`;
125
+
126
+ /**
127
+ * TypeScript templates object
128
+ */
129
+ export const typesTemplates = {
130
+ types: typesTemplate,
131
+ constants: constantsTemplate,
132
+ index: indexTemplate,
133
+ };