@shohojdhara/atomix 0.3.4 → 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 (237) hide show
  1. package/README.md +101 -199
  2. package/atomix.config.ts +241 -0
  3. package/dist/atomix.css +269 -189
  4. package/dist/atomix.css.map +1 -0
  5. package/dist/atomix.min.css +15179 -11
  6. package/dist/atomix.min.css.map +1 -0
  7. package/dist/charts.d.ts +1929 -0
  8. package/dist/charts.js +6477 -0
  9. package/dist/charts.js.map +1 -0
  10. package/dist/core.d.ts +1289 -0
  11. package/dist/core.js +3373 -0
  12. package/dist/core.js.map +1 -0
  13. package/dist/forms.d.ts +1085 -0
  14. package/dist/forms.js +2466 -0
  15. package/dist/forms.js.map +1 -0
  16. package/dist/heavy.d.ts +636 -0
  17. package/dist/heavy.js +4566 -0
  18. package/dist/heavy.js.map +1 -0
  19. package/dist/index.d.ts +5171 -4792
  20. package/dist/index.esm.js +6098 -4563
  21. package/dist/index.esm.js.map +1 -1
  22. package/dist/index.js +6291 -4747
  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/layout.d.ts +300 -0
  27. package/dist/layout.js +336 -0
  28. package/dist/layout.js.map +1 -0
  29. package/dist/theme.d.ts +2122 -0
  30. package/dist/theme.js +6084 -0
  31. package/dist/theme.js.map +1 -0
  32. package/package.json +59 -27
  33. package/scripts/atomix-cli.js +544 -16
  34. package/scripts/cli/__tests__/cli-commands.test.js +204 -0
  35. package/scripts/cli/__tests__/utils.test.js +201 -0
  36. package/scripts/cli/__tests__/vitest.config.js +26 -0
  37. package/scripts/cli/interactive-init.js +1 -1
  38. package/scripts/cli/token-manager.js +32 -7
  39. package/scripts/cli/utils.js +347 -0
  40. package/src/components/Accordion/Accordion.stories.tsx +50 -17
  41. package/src/components/Accordion/Accordion.tsx +5 -54
  42. package/src/components/Accordion/index.ts +1 -1
  43. package/src/components/AtomixGlass/AtomixGlass.tsx +65 -31
  44. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +11 -4
  45. package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +1 -32
  46. package/src/components/AtomixGlass/stories/Examples.stories.tsx +2 -2
  47. package/src/components/AtomixGlass/stories/shared-components.tsx +0 -31
  48. package/src/components/Avatar/Avatar.stories.tsx +7 -0
  49. package/src/components/Avatar/Avatar.tsx +3 -3
  50. package/src/components/Badge/Badge.stories.tsx +91 -13
  51. package/src/components/Badge/Badge.tsx +3 -3
  52. package/src/components/Block/Block.stories.tsx +7 -23
  53. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +7 -0
  54. package/src/components/Breadcrumb/Breadcrumb.tsx +3 -3
  55. package/src/components/Button/Button.stories.tsx +141 -22
  56. package/src/components/Button/ButtonGroup.stories.tsx +315 -0
  57. package/src/components/Button/ButtonGroup.tsx +67 -0
  58. package/src/components/Button/index.ts +2 -0
  59. package/src/components/Callout/Callout.stories.tsx +8 -6
  60. package/src/components/Card/Card.stories.tsx +82 -28
  61. package/src/components/Card/ElevationCard.tsx +1 -1
  62. package/src/components/Chart/AnimatedChart.tsx +19 -18
  63. package/src/components/Chart/AreaChart.tsx +5 -2
  64. package/src/components/Chart/BarChart.tsx +1 -1
  65. package/src/components/Chart/BubbleChart.tsx +6 -6
  66. package/src/components/Chart/CandlestickChart.tsx +0 -1
  67. package/src/components/Chart/Chart.stories.tsx +5 -7
  68. package/src/components/Chart/Chart.tsx +0 -16
  69. package/src/components/Chart/ChartRenderer.tsx +1 -1
  70. package/src/components/Chart/ChartToolbar.tsx +1 -0
  71. package/src/components/Chart/DonutChart.tsx +0 -1
  72. package/src/components/Chart/FunnelChart.tsx +1 -2
  73. package/src/components/Chart/GaugeChart.tsx +0 -1
  74. package/src/components/Chart/HeatmapChart.tsx +0 -1
  75. package/src/components/Chart/LineChart.tsx +0 -1
  76. package/src/components/Chart/MultiAxisChart.tsx +0 -1
  77. package/src/components/Chart/PieChart.tsx +0 -1
  78. package/src/components/Chart/RadarChart.tsx +19 -13
  79. package/src/components/Chart/ScatterChart.tsx +3 -4
  80. package/src/components/Chart/TreemapChart.tsx +2 -1
  81. package/src/components/Chart/WaterfallChart.tsx +0 -2
  82. package/src/components/Chart/types.ts +12 -2
  83. package/src/components/Chart/utils.ts +4 -3
  84. package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +7 -0
  85. package/src/components/DataTable/DataTable.stories.tsx +23 -16
  86. package/src/components/DataTable/DataTable.tsx +3 -3
  87. package/src/components/DatePicker/DatePicker.stories.tsx +27 -19
  88. package/src/components/Dropdown/Dropdown.stories.tsx +11 -19
  89. package/src/components/Dropdown/Dropdown.tsx +12 -9
  90. package/src/components/EdgePanel/EdgePanel.stories.tsx +1 -0
  91. package/src/components/Footer/Footer.stories.tsx +8 -6
  92. package/src/components/Footer/FooterLink.tsx +9 -2
  93. package/src/components/Footer/FooterSection.tsx +3 -3
  94. package/src/components/Form/Checkbox.stories.tsx +7 -0
  95. package/src/components/Form/Checkbox.tsx +3 -3
  96. package/src/components/Form/Form.stories.tsx +7 -0
  97. package/src/components/Form/FormGroup.stories.tsx +9 -1
  98. package/src/components/Form/Input.stories.tsx +69 -16
  99. package/src/components/Form/Input.tsx +4 -2
  100. package/src/components/Form/Radio.stories.tsx +9 -1
  101. package/src/components/Form/Radio.tsx +3 -3
  102. package/src/components/Form/Select.stories.tsx +9 -1
  103. package/src/components/Form/Select.tsx +3 -3
  104. package/src/components/Form/Textarea.stories.tsx +10 -2
  105. package/src/components/Form/Textarea.tsx +4 -2
  106. package/src/components/Hero/Hero.stories.tsx +7 -0
  107. package/src/components/List/List.stories.tsx +10 -3
  108. package/src/components/List/List.tsx +3 -3
  109. package/src/components/List/ListGroup.tsx +3 -1
  110. package/src/components/Messages/Messages.stories.tsx +8 -7
  111. package/src/components/Modal/Modal.stories.tsx +17 -6
  112. package/src/components/Modal/Modal.tsx +3 -3
  113. package/src/components/Navigation/Menu/MegaMenu.tsx +9 -3
  114. package/src/components/Navigation/Menu/Menu.stories.tsx +7 -0
  115. package/src/components/Navigation/Menu/Menu.tsx +9 -3
  116. package/src/components/Navigation/Nav/Nav.stories.tsx +7 -0
  117. package/src/components/Navigation/Navbar/Navbar.stories.tsx +1 -0
  118. package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +1 -1
  119. package/src/components/Pagination/Pagination.stories.tsx +188 -111
  120. package/src/components/Pagination/Pagination.tsx +88 -7
  121. package/src/components/PhotoViewer/PhotoViewer.stories.tsx +10 -5
  122. package/src/components/PhotoViewer/PhotoViewerImage.tsx +2 -2
  123. package/src/components/Popover/Popover.stories.tsx +191 -115
  124. package/src/components/Popover/Popover.tsx +4 -4
  125. package/src/components/ProductReview/ProductReview.stories.tsx +80 -58
  126. package/src/components/Progress/Progress.stories.tsx +79 -49
  127. package/src/components/Progress/Progress.tsx +6 -2
  128. package/src/components/Rating/Rating.stories.tsx +109 -84
  129. package/src/components/Rating/Rating.tsx +5 -2
  130. package/src/components/River/River.stories.tsx +194 -114
  131. package/src/components/SectionIntro/SectionIntro.stories.tsx +19 -9
  132. package/src/components/Slider/Slider.stories.tsx +7 -0
  133. package/src/components/Slider/Slider.tsx +10 -9
  134. package/src/components/Spinner/Spinner.stories.tsx +15 -11
  135. package/src/components/Spinner/Spinner.tsx +3 -3
  136. package/src/components/Steps/Steps.stories.tsx +132 -98
  137. package/src/components/Tabs/Tabs.stories.tsx +163 -112
  138. package/src/components/Tabs/Tabs.tsx +3 -3
  139. package/src/components/Testimonial/Testimonial.stories.tsx +114 -68
  140. package/src/components/Todo/Todo.stories.tsx +38 -12
  141. package/src/components/Toggle/Toggle.stories.tsx +61 -28
  142. package/src/components/Tooltip/Tooltip.stories.tsx +318 -200
  143. package/src/components/Tooltip/Tooltip.tsx +3 -3
  144. package/src/components/Upload/Upload.stories.tsx +122 -84
  145. package/src/components/VideoPlayer/VideoPlayer.stories.tsx +7 -24
  146. package/src/components/index.ts +6 -2
  147. package/src/layouts/MasonryGrid/MasonryGrid.tsx +2 -2
  148. package/src/lib/composables/useAtomixGlass.ts +2 -3
  149. package/src/lib/composables/useChartPerformance.ts +102 -78
  150. package/src/lib/composables/useChartScale.ts +10 -0
  151. package/src/lib/composables/useHero.ts +9 -2
  152. package/src/lib/composables/useHeroBackgroundSlider.ts +5 -3
  153. package/src/lib/composables/useNavbar.ts +0 -10
  154. package/src/lib/composables/useSideMenu.ts +1 -0
  155. package/src/lib/composables/useVideoPlayer.ts +3 -2
  156. package/src/lib/config/loader.ts +57 -14
  157. package/src/lib/constants/components.ts +10 -0
  158. package/src/lib/hooks/index.ts +0 -1
  159. package/src/lib/hooks/useComponentCustomization.ts +11 -15
  160. package/src/lib/hooks/usePerformanceMonitor.ts +149 -0
  161. package/src/lib/patterns/index.ts +2 -2
  162. package/src/lib/patterns/slots.tsx +2 -2
  163. package/src/lib/theme/README.md +174 -0
  164. package/src/lib/theme/adapters/index.ts +31 -0
  165. package/src/lib/theme/adapters/themeAdapter.ts +287 -0
  166. package/src/lib/theme/config/__tests__/configLoader.test.ts +207 -0
  167. package/src/lib/theme/config/configLoader.ts +254 -0
  168. package/src/lib/theme/config/loader.ts +37 -48
  169. package/src/lib/theme/config/types.ts +2 -2
  170. package/src/lib/theme/config/validator.ts +15 -91
  171. package/src/lib/theme/{constants.ts → constants/constants.ts} +0 -18
  172. package/src/lib/theme/constants/index.ts +8 -0
  173. package/src/lib/theme/core/ThemeRegistry.ts +19 -6
  174. package/src/lib/theme/core/__tests__/createTheme.test.ts +132 -0
  175. package/src/lib/theme/core/composeTheme.ts +155 -0
  176. package/src/lib/theme/core/createTheme.ts +94 -0
  177. package/src/lib/theme/{createTheme.ts → core/createThemeObject.ts} +10 -6
  178. package/src/lib/theme/core/index.ts +5 -19
  179. package/src/lib/theme/devtools/Comparator.tsx +346 -22
  180. package/src/lib/theme/devtools/IMPROVEMENTS.md +139 -38
  181. package/src/lib/theme/devtools/Inspector.tsx +335 -51
  182. package/src/lib/theme/devtools/LiveEditor.tsx +489 -112
  183. package/src/lib/theme/devtools/Preview.tsx +471 -221
  184. package/src/lib/theme/{core → devtools}/ThemeValidator.ts +6 -3
  185. package/src/lib/theme/devtools/index.ts +14 -4
  186. package/src/lib/theme/devtools/useHistory.ts +130 -0
  187. package/src/lib/theme/errors/index.ts +12 -0
  188. package/src/lib/theme/generators/cssFile.ts +79 -0
  189. package/src/lib/theme/generators/generateCSS.ts +89 -0
  190. package/src/lib/theme/{generateCSSVariables.ts → generators/generateCSSVariables.ts} +4 -14
  191. package/src/lib/theme/generators/index.ts +19 -0
  192. package/src/lib/theme/i18n/rtl.ts +7 -7
  193. package/src/lib/theme/index.ts +120 -15
  194. package/src/lib/theme/runtime/ThemeApplicator.ts +53 -95
  195. package/src/lib/theme/{ThemeContext.tsx → runtime/ThemeContext.tsx} +1 -1
  196. package/src/lib/theme/runtime/ThemeErrorBoundary.tsx +4 -4
  197. package/src/lib/theme/runtime/ThemeProvider.tsx +456 -179
  198. package/src/lib/theme/runtime/index.ts +1 -2
  199. package/src/lib/theme/runtime/useTheme.ts +1 -2
  200. package/src/lib/theme/test/testTheme.ts +385 -0
  201. package/src/lib/theme/tokens/index.ts +12 -0
  202. package/src/lib/theme/tokens/tokens.ts +721 -0
  203. package/src/lib/theme/types.ts +6 -42
  204. package/src/lib/theme/{utils.ts → utils/domUtils.ts} +2 -2
  205. package/src/lib/theme/utils/index.ts +11 -0
  206. package/src/lib/theme/utils/injectCSS.ts +90 -0
  207. package/src/lib/theme/utils/themeHelpers.ts +78 -0
  208. package/src/lib/theme/{themeUtils.ts → utils/themeUtils.ts} +1 -1
  209. package/src/lib/theme-tools.ts +8 -9
  210. package/src/lib/types/components.ts +93 -34
  211. package/src/lib/types/partProps.ts +0 -16
  212. package/src/lib/utils/componentUtils.ts +1 -1
  213. package/src/lib/utils/fontPreloader.ts +148 -0
  214. package/src/lib/utils/index.ts +11 -0
  215. package/src/lib/utils/memoryMonitor.ts +189 -0
  216. package/src/styles/01-settings/_settings.design-tokens.scss +4 -1
  217. package/src/styles/01-settings/_settings.fonts.scss +2 -5
  218. package/src/styles/02-tools/_tools.button.scss +66 -79
  219. package/src/styles/06-components/_components.atomix-glass.scss +13 -3
  220. package/src/styles/06-components/_components.navbar.scss +0 -6
  221. package/src/styles/06-components/_components.pagination.scss +88 -0
  222. package/scripts/build-themes.js +0 -208
  223. package/scripts/sync-theme-config.js +0 -309
  224. package/src/components/AtomixGlass/atomixGLass.old.tsx +0 -1263
  225. package/src/lib/theme/composeTheme.ts +0 -370
  226. package/src/lib/theme/core/ThemeCache.ts +0 -283
  227. package/src/lib/theme/core/ThemeEngine.test.ts +0 -146
  228. package/src/lib/theme/core/ThemeEngine.ts +0 -657
  229. package/src/lib/theme/createThemeFromConfig.ts +0 -132
  230. package/src/lib/theme/devtools/CLI.ts +0 -364
  231. package/src/lib/theme/runtime/ThemeManager.test.ts +0 -192
  232. package/src/lib/theme/runtime/ThemeManager.ts +0 -442
  233. package/src/styles/03-generic/_generated-root.css +0 -5
  234. package/src/themes/README.md +0 -442
  235. package/src/themes/themes.config.js +0 -35
  236. /package/src/lib/theme/{cssVariableMapper.ts → adapters/cssVariableMapper.ts} +0 -0
  237. /package/src/lib/theme/{errors.ts → errors/errors.ts} +0 -0
@@ -33,6 +33,14 @@ import {
33
33
  importTokens
34
34
  } from './cli/token-manager.js';
35
35
  import { createThemeCLIBridge } from './cli/theme-bridge.js';
36
+ import {
37
+ validatePath,
38
+ validateComponentName,
39
+ validateThemeName,
40
+ sanitizeInput,
41
+ fileExists,
42
+ isDebug as checkDebugMode
43
+ } from './cli/utils.js';
36
44
 
37
45
  const __filename = fileURLToPath(import.meta.url);
38
46
  const __dirname = dirname(__filename);
@@ -771,20 +779,36 @@ program
771
779
  debug(`Generating ${type} with name: ${name}`, options);
772
780
 
773
781
  // Validate name
774
- if (!/^[A-Z][a-zA-Z0-9]*$/.test(name)) {
782
+ const nameValidation = validateComponentName(name);
783
+ if (!nameValidation.isValid) {
775
784
  throw new AtomixCLIError(
776
- 'Component name must be in PascalCase (e.g., Button, CardHeader)',
785
+ nameValidation.error,
777
786
  'INVALID_NAME',
778
787
  [
779
788
  'Use PascalCase naming (e.g., MyComponent)',
780
789
  'Start with an uppercase letter',
781
- 'Use only letters and numbers'
790
+ 'Use only letters and numbers',
791
+ 'Avoid reserved words'
782
792
  ]
783
793
  );
784
794
  }
785
795
 
786
796
  if (type === 'component' || type === 'c') {
787
- const componentPath = join(options.path, name);
797
+ // Validate output path
798
+ const pathValidation = validatePath(options.path);
799
+ if (!pathValidation.isValid) {
800
+ throw new AtomixCLIError(
801
+ pathValidation.error,
802
+ 'INVALID_PATH',
803
+ [
804
+ 'Ensure the path is within the project directory',
805
+ 'Avoid using ".." to navigate outside the project',
806
+ 'Check for typos in the path'
807
+ ]
808
+ );
809
+ }
810
+
811
+ const componentPath = join(pathValidation.safePath, name);
788
812
 
789
813
  // Check if component already exists
790
814
  if (existsSync(componentPath) && !options.force) {
@@ -878,15 +902,103 @@ program
878
902
  ));
879
903
 
880
904
  } else if (type === 'token' || type === 't') {
881
- // Token generation logic (to be implemented)
882
- throw new AtomixCLIError(
883
- 'Token generation not yet implemented',
884
- 'NOT_IMPLEMENTED',
885
- [
886
- 'This feature is coming soon',
887
- 'For now, manually edit token files in src/styles/01-settings'
888
- ]
889
- );
905
+ // Token generation
906
+ const validCategories = ['colors', 'spacing', 'typography', 'shadows', 'radius', 'animations'];
907
+
908
+ if (!validCategories.includes(name.toLowerCase())) {
909
+ throw new AtomixCLIError(
910
+ `Invalid token category: ${name}`,
911
+ 'INVALID_TOKEN_CATEGORY',
912
+ [
913
+ `Valid categories: ${validCategories.join(', ')}`,
914
+ 'Example: atomix generate token colors',
915
+ 'Example: atomix g t spacing'
916
+ ]
917
+ );
918
+ }
919
+
920
+ const tokenPath = join(process.cwd(), 'src/styles/01-settings');
921
+
922
+ // Check if settings directory exists
923
+ if (!existsSync(tokenPath)) {
924
+ throw new AtomixCLIError(
925
+ 'Settings directory not found',
926
+ 'MISSING_DIRECTORY',
927
+ [
928
+ 'Ensure you are in an Atomix project directory',
929
+ 'Create the directory: mkdir -p src/styles/01-settings',
930
+ 'Or initialize a new project: atomix init'
931
+ ]
932
+ );
933
+ }
934
+
935
+ // Generate token file based on category
936
+ let tokenContent = '';
937
+ let filename = '';
938
+
939
+ switch (name.toLowerCase()) {
940
+ case 'colors':
941
+ filename = '_settings.colors.custom.scss';
942
+ tokenContent = generateColorTokens();
943
+ break;
944
+ case 'spacing':
945
+ filename = '_settings.spacing.custom.scss';
946
+ tokenContent = generateSpacingTokens();
947
+ break;
948
+ case 'typography':
949
+ filename = '_settings.typography.custom.scss';
950
+ tokenContent = generateTypographyTokens();
951
+ break;
952
+ case 'shadows':
953
+ filename = '_settings.box-shadow.custom.scss';
954
+ tokenContent = generateShadowTokens();
955
+ break;
956
+ case 'radius':
957
+ filename = '_settings.border-radius.custom.scss';
958
+ tokenContent = generateRadiusTokens();
959
+ break;
960
+ case 'animations':
961
+ filename = '_settings.animations.custom.scss';
962
+ tokenContent = generateAnimationTokens();
963
+ break;
964
+ }
965
+
966
+ const filePath = join(tokenPath, filename);
967
+
968
+ // Check if file already exists
969
+ if (existsSync(filePath) && !options.force) {
970
+ throw new AtomixCLIError(
971
+ `Token file already exists: ${filename}`,
972
+ 'FILE_EXISTS',
973
+ [
974
+ 'Use --force flag to overwrite',
975
+ `Or edit the existing file: ${filePath}`,
976
+ 'Or choose a different category'
977
+ ]
978
+ );
979
+ }
980
+
981
+ // Write token file
982
+ await writeFile(filePath, tokenContent, 'utf8');
983
+ spinner.succeed(chalk.green(`✓ Created token file: ${filename}`));
984
+
985
+ // Success message
986
+ console.log(boxen(
987
+ chalk.bold.green(`🎨 ${name} tokens generated successfully!\n\n`) +
988
+ chalk.cyan('Next steps:\n') +
989
+ chalk.gray(`1. Customize your tokens:\n`) +
990
+ chalk.white(` Edit ${filePath}\n\n`) +
991
+ chalk.gray(`2. Import in your theme:\n`) +
992
+ chalk.white(` @use '${filename.replace('.scss', '')}' as *;\n\n`) +
993
+ chalk.gray(`3. Build your styles:\n`) +
994
+ chalk.white(` npm run build`),
995
+ {
996
+ padding: 1,
997
+ margin: 1,
998
+ borderStyle: 'round',
999
+ borderColor: 'green'
1000
+ }
1001
+ ));
890
1002
  } else {
891
1003
  throw new AtomixCLIError(
892
1004
  `Unknown generation type: ${type}`,
@@ -1421,14 +1533,16 @@ themeCommand
1421
1533
  debug(`Creating theme: ${name}`, options);
1422
1534
 
1423
1535
  // Validate name
1424
- if (!/^[a-z][a-z0-9-]*$/.test(name)) {
1536
+ const nameValidation = validateThemeName(name);
1537
+ if (!nameValidation.isValid) {
1425
1538
  throw new AtomixCLIError(
1426
- 'Theme name must be lowercase and use hyphens (e.g., my-theme)',
1539
+ nameValidation.error,
1427
1540
  'INVALID_NAME',
1428
1541
  [
1429
1542
  'Use lowercase letters, numbers, and hyphens',
1430
1543
  'Start with a letter',
1431
- 'Example: dark-theme, light-mode, custom-theme'
1544
+ 'Example: dark-theme, light-mode, custom-theme',
1545
+ 'Avoid consecutive or trailing hyphens'
1432
1546
  ]
1433
1547
  );
1434
1548
  }
@@ -1755,6 +1869,420 @@ program
1755
1869
  }
1756
1870
  });
1757
1871
 
1872
+ // Token generation functions
1873
+ function generateColorTokens() {
1874
+ return `// Custom Color Tokens
1875
+ // Generated by Atomix CLI
1876
+ // =============================================================================
1877
+
1878
+ // Brand Colors
1879
+ // Customize these to match your brand identity
1880
+ $custom-primary-1: #fff9e6 !default;
1881
+ $custom-primary-2: #fff4cc !default;
1882
+ $custom-primary-3: #ffe699 !default;
1883
+ $custom-primary-4: #ffd966 !default;
1884
+ $custom-primary-5: #ffcc33 !default;
1885
+ $custom-primary-6: #ffb800 !default; // Main brand color
1886
+ $custom-primary-7: #e6a600 !default;
1887
+ $custom-primary-8: #cc9400 !default;
1888
+ $custom-primary-9: #b38200 !default;
1889
+ $custom-primary-10: #997000 !default;
1890
+
1891
+ // Semantic Colors
1892
+ $custom-success: #22c55e !default;
1893
+ $custom-warning: #eab308 !default;
1894
+ $custom-error: #ef4444 !default;
1895
+ $custom-info: #3b82f6 !default;
1896
+
1897
+ // Neutral Colors
1898
+ $custom-gray-1: #f9fafb !default;
1899
+ $custom-gray-2: #f3f4f6 !default;
1900
+ $custom-gray-3: #e5e7eb !default;
1901
+ $custom-gray-4: #d1d5db !default;
1902
+ $custom-gray-5: #9ca3af !default;
1903
+ $custom-gray-6: #6b7280 !default;
1904
+ $custom-gray-7: #4b5563 !default;
1905
+ $custom-gray-8: #374151 !default;
1906
+ $custom-gray-9: #1f2937 !default;
1907
+ $custom-gray-10: #111827 !default;
1908
+
1909
+ // Background Colors
1910
+ $custom-body-bg: #ffffff !default;
1911
+ $custom-body-bg-dark: #1f2937 !default;
1912
+
1913
+ // Text Colors
1914
+ $custom-body-color: $custom-gray-10 !default;
1915
+ $custom-body-color-dark: #ffffff !default;
1916
+
1917
+ // Link Colors
1918
+ $custom-link-color: $custom-primary-6 !default;
1919
+ $custom-link-hover-color: $custom-primary-7 !default;
1920
+
1921
+ // Border Colors
1922
+ $custom-border-color: $custom-gray-3 !default;
1923
+ $custom-border-color-dark: $custom-gray-7 !default;
1924
+
1925
+ // Focus Colors
1926
+ $custom-focus-color: $custom-primary-5 !default;
1927
+ $custom-focus-color-dark: $custom-primary-4 !default;
1928
+
1929
+ // Export custom colors to override defaults
1930
+ $primary: $custom-primary-6 !default;
1931
+ $success: $custom-success !default;
1932
+ $warning: $custom-warning !default;
1933
+ $error: $custom-error !default;
1934
+ $info: $custom-info !default;
1935
+
1936
+ // Dark mode overrides
1937
+ $body-bg-dark: $custom-body-bg-dark !default;
1938
+ $body-color-dark: $custom-body-color-dark !default;
1939
+ $border-color-dark: $custom-border-color-dark !default;
1940
+ `;
1941
+ }
1942
+
1943
+ function generateSpacingTokens() {
1944
+ return `// Custom Spacing Tokens
1945
+ // Generated by Atomix CLI
1946
+ // =============================================================================
1947
+
1948
+ // Base spacing unit (change this to scale all spacing)
1949
+ $custom-spacing-base: 0.25rem !default; // 4px
1950
+
1951
+ // Spacing scale
1952
+ $custom-spacing-0: 0 !default;
1953
+ $custom-spacing-1: $custom-spacing-base !default; // 4px
1954
+ $custom-spacing-2: calc($custom-spacing-base * 2) !default; // 8px
1955
+ $custom-spacing-3: calc($custom-spacing-base * 3) !default; // 12px
1956
+ $custom-spacing-4: calc($custom-spacing-base * 4) !default; // 16px
1957
+ $custom-spacing-5: calc($custom-spacing-base * 5) !default; // 20px
1958
+ $custom-spacing-6: calc($custom-spacing-base * 6) !default; // 24px
1959
+ $custom-spacing-7: calc($custom-spacing-base * 7) !default; // 28px
1960
+ $custom-spacing-8: calc($custom-spacing-base * 8) !default; // 32px
1961
+ $custom-spacing-9: calc($custom-spacing-base * 9) !default; // 36px
1962
+ $custom-spacing-10: calc($custom-spacing-base * 10) !default; // 40px
1963
+ $custom-spacing-11: calc($custom-spacing-base * 11) !default; // 44px
1964
+ $custom-spacing-12: calc($custom-spacing-base * 12) !default; // 48px
1965
+ $custom-spacing-14: calc($custom-spacing-base * 14) !default; // 56px
1966
+ $custom-spacing-16: calc($custom-spacing-base * 16) !default; // 64px
1967
+ $custom-spacing-20: calc($custom-spacing-base * 20) !default; // 80px
1968
+ $custom-spacing-24: calc($custom-spacing-base * 24) !default; // 96px
1969
+ $custom-spacing-28: calc($custom-spacing-base * 28) !default; // 112px
1970
+ $custom-spacing-32: calc($custom-spacing-base * 32) !default; // 128px
1971
+ $custom-spacing-36: calc($custom-spacing-base * 36) !default; // 144px
1972
+ $custom-spacing-40: calc($custom-spacing-base * 40) !default; // 160px
1973
+ $custom-spacing-44: calc($custom-spacing-base * 44) !default; // 176px
1974
+ $custom-spacing-48: calc($custom-spacing-base * 48) !default; // 192px
1975
+ $custom-spacing-52: calc($custom-spacing-base * 52) !default; // 208px
1976
+ $custom-spacing-56: calc($custom-spacing-base * 56) !default; // 224px
1977
+ $custom-spacing-60: calc($custom-spacing-base * 60) !default; // 240px
1978
+ $custom-spacing-64: calc($custom-spacing-base * 64) !default; // 256px
1979
+
1980
+ // Component-specific spacing
1981
+ $custom-button-padding-x: $custom-spacing-4 !default;
1982
+ $custom-button-padding-y: $custom-spacing-2 !default;
1983
+ $custom-card-padding: $custom-spacing-6 !default;
1984
+ $custom-modal-padding: $custom-spacing-8 !default;
1985
+
1986
+ // Layout spacing
1987
+ $custom-container-padding: $custom-spacing-4 !default;
1988
+ $custom-grid-gap: $custom-spacing-6 !default;
1989
+ $custom-section-spacing: $custom-spacing-16 !default;
1990
+
1991
+ // Export to override defaults
1992
+ $spacing-sizes: (
1993
+ 0: $custom-spacing-0,
1994
+ 1: $custom-spacing-1,
1995
+ 2: $custom-spacing-2,
1996
+ 3: $custom-spacing-3,
1997
+ 4: $custom-spacing-4,
1998
+ 5: $custom-spacing-5,
1999
+ 6: $custom-spacing-6,
2000
+ 7: $custom-spacing-7,
2001
+ 8: $custom-spacing-8,
2002
+ 9: $custom-spacing-9,
2003
+ 10: $custom-spacing-10,
2004
+ 12: $custom-spacing-12,
2005
+ 16: $custom-spacing-16,
2006
+ 20: $custom-spacing-20,
2007
+ 24: $custom-spacing-24,
2008
+ 32: $custom-spacing-32,
2009
+ 40: $custom-spacing-40,
2010
+ 48: $custom-spacing-48,
2011
+ 56: $custom-spacing-56,
2012
+ 64: $custom-spacing-64,
2013
+ ) !default;
2014
+ `;
2015
+ }
2016
+
2017
+ function generateTypographyTokens() {
2018
+ return `// Custom Typography Tokens
2019
+ // Generated by Atomix CLI
2020
+ // =============================================================================
2021
+
2022
+ // Font Families
2023
+ $custom-font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !default;
2024
+ $custom-font-family-serif: Georgia, "Times New Roman", Times, serif !default;
2025
+ $custom-font-family-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
2026
+
2027
+ // Font Size Scale
2028
+ $custom-font-size-xs: 0.75rem !default; // 12px
2029
+ $custom-font-size-sm: 0.875rem !default; // 14px
2030
+ $custom-font-size-base: 1rem !default; // 16px
2031
+ $custom-font-size-lg: 1.125rem !default; // 18px
2032
+ $custom-font-size-xl: 1.25rem !default; // 20px
2033
+ $custom-font-size-2xl: 1.5rem !default; // 24px
2034
+ $custom-font-size-3xl: 1.875rem !default; // 30px
2035
+ $custom-font-size-4xl: 2.25rem !default; // 36px
2036
+ $custom-font-size-5xl: 3rem !default; // 48px
2037
+ $custom-font-size-6xl: 3.75rem !default; // 60px
2038
+ $custom-font-size-7xl: 4.5rem !default; // 72px
2039
+ $custom-font-size-8xl: 6rem !default; // 96px
2040
+
2041
+ // Line Heights
2042
+ $custom-line-height-tight: 1.2 !default;
2043
+ $custom-line-height-base: 1.5 !default;
2044
+ $custom-line-height-relaxed: 1.75 !default;
2045
+ $custom-line-height-loose: 2 !default;
2046
+
2047
+ // Font Weights
2048
+ $custom-font-weight-light: 300 !default;
2049
+ $custom-font-weight-normal: 400 !default;
2050
+ $custom-font-weight-medium: 500 !default;
2051
+ $custom-font-weight-semibold: 600 !default;
2052
+ $custom-font-weight-bold: 700 !default;
2053
+ $custom-font-weight-heavy: 800 !default;
2054
+ $custom-font-weight-black: 900 !default;
2055
+
2056
+ // Letter Spacing
2057
+ $custom-letter-spacing-tight: -0.05em !default;
2058
+ $custom-letter-spacing-normal: 0 !default;
2059
+ $custom-letter-spacing-wide: 0.025em !default;
2060
+ $custom-letter-spacing-wider: 0.05em !default;
2061
+ $custom-letter-spacing-widest: 0.1em !default;
2062
+
2063
+ // Heading Sizes
2064
+ $custom-h1-font-size: $custom-font-size-5xl !default;
2065
+ $custom-h2-font-size: $custom-font-size-4xl !default;
2066
+ $custom-h3-font-size: $custom-font-size-3xl !default;
2067
+ $custom-h4-font-size: $custom-font-size-2xl !default;
2068
+ $custom-h5-font-size: $custom-font-size-xl !default;
2069
+ $custom-h6-font-size: $custom-font-size-lg !default;
2070
+
2071
+ // Export to override defaults
2072
+ $font-family-base: $custom-font-family-sans !default;
2073
+ $font-family-monospace: $custom-font-family-mono !default;
2074
+ $font-size-base: $custom-font-size-base !default;
2075
+ $font-size-sm: $custom-font-size-sm !default;
2076
+ $font-size-lg: $custom-font-size-lg !default;
2077
+ $line-height-base: $custom-line-height-base !default;
2078
+ $font-weight-base: $custom-font-weight-normal !default;
2079
+
2080
+ // Heading overrides
2081
+ $h1-font-size: $custom-h1-font-size !default;
2082
+ $h2-font-size: $custom-h2-font-size !default;
2083
+ $h3-font-size: $custom-h3-font-size !default;
2084
+ $h4-font-size: $custom-h4-font-size !default;
2085
+ $h5-font-size: $custom-h5-font-size !default;
2086
+ $h6-font-size: $custom-h6-font-size !default;
2087
+ `;
2088
+ }
2089
+
2090
+ function generateShadowTokens() {
2091
+ return `// Custom Box Shadow Tokens
2092
+ // Generated by Atomix CLI
2093
+ // =============================================================================
2094
+
2095
+ // Shadow Colors
2096
+ $custom-shadow-color: rgba(0, 0, 0, 0.1) !default;
2097
+ $custom-shadow-color-dark: rgba(0, 0, 0, 0.2) !default;
2098
+
2099
+ // Shadow Sizes
2100
+ $custom-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !default;
2101
+ $custom-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !default;
2102
+ $custom-shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !default;
2103
+ $custom-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !default;
2104
+ $custom-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !default;
2105
+ $custom-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !default;
2106
+ $custom-shadow-2xl: 0 35px 60px -15px rgba(0, 0, 0, 0.3) !default;
2107
+ $custom-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !default;
2108
+ $custom-shadow-none: none !default;
2109
+
2110
+ // Component-specific shadows
2111
+ $custom-button-shadow: $custom-shadow-sm !default;
2112
+ $custom-button-shadow-hover: $custom-shadow-md !default;
2113
+ $custom-card-shadow: $custom-shadow-base !default;
2114
+ $custom-dropdown-shadow: $custom-shadow-lg !default;
2115
+ $custom-modal-shadow: $custom-shadow-xl !default;
2116
+ $custom-popover-shadow: $custom-shadow-lg !default;
2117
+ $custom-tooltip-shadow: $custom-shadow-md !default;
2118
+
2119
+ // Dark mode shadows
2120
+ $custom-shadow-xs-dark: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !default;
2121
+ $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;
2122
+ $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;
2123
+ $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;
2124
+ $custom-shadow-xl-dark: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !default;
2125
+
2126
+ // Export to override defaults
2127
+ $box-shadow: $custom-shadow-base !default;
2128
+ $box-shadow-xs: $custom-shadow-xs !default;
2129
+ $box-shadow-sm: $custom-shadow-sm !default;
2130
+ $box-shadow-lg: $custom-shadow-lg !default;
2131
+ $box-shadow-xl: $custom-shadow-xl !default;
2132
+ $box-shadow-inset: $custom-shadow-inner !default;
2133
+
2134
+ // Dark mode exports
2135
+ $box-shadow-dark: $custom-shadow-base-dark !default;
2136
+ $box-shadow-xs-dark: $custom-shadow-xs-dark !default;
2137
+ $box-shadow-sm-dark: $custom-shadow-sm-dark !default;
2138
+ $box-shadow-lg-dark: $custom-shadow-lg-dark !default;
2139
+ $box-shadow-xl-dark: $custom-shadow-xl-dark !default;
2140
+ `;
2141
+ }
2142
+
2143
+ function generateRadiusTokens() {
2144
+ return `// Custom Border Radius Tokens
2145
+ // Generated by Atomix CLI
2146
+ // =============================================================================
2147
+
2148
+ // Base radius unit
2149
+ $custom-radius-base: 0.25rem !default; // 4px
2150
+
2151
+ // Radius Scale
2152
+ $custom-radius-none: 0 !default;
2153
+ $custom-radius-sm: calc($custom-radius-base * 0.5) !default; // 2px
2154
+ $custom-radius-base: $custom-radius-base !default; // 4px
2155
+ $custom-radius-md: calc($custom-radius-base * 1.5) !default; // 6px
2156
+ $custom-radius-lg: calc($custom-radius-base * 2) !default; // 8px
2157
+ $custom-radius-xl: calc($custom-radius-base * 3) !default; // 12px
2158
+ $custom-radius-2xl: calc($custom-radius-base * 4) !default; // 16px
2159
+ $custom-radius-3xl: calc($custom-radius-base * 6) !default; // 24px
2160
+ $custom-radius-4xl: calc($custom-radius-base * 8) !default; // 32px
2161
+ $custom-radius-full: 9999px !default; // Fully rounded
2162
+
2163
+ // Component-specific radius
2164
+ $custom-button-radius: $custom-radius-md !default;
2165
+ $custom-button-radius-sm: $custom-radius-sm !default;
2166
+ $custom-button-radius-lg: $custom-radius-lg !default;
2167
+ $custom-card-radius: $custom-radius-lg !default;
2168
+ $custom-input-radius: $custom-radius-md !default;
2169
+ $custom-badge-radius: $custom-radius-full !default;
2170
+ $custom-chip-radius: $custom-radius-full !default;
2171
+ $custom-tooltip-radius: $custom-radius-md !default;
2172
+ $custom-modal-radius: $custom-radius-xl !default;
2173
+ $custom-dropdown-radius: $custom-radius-lg !default;
2174
+
2175
+ // Export to override defaults
2176
+ $border-radius: $custom-radius-md !default;
2177
+ $border-radius-sm: $custom-radius-sm !default;
2178
+ $border-radius-lg: $custom-radius-lg !default;
2179
+ $border-radius-xl: $custom-radius-xl !default;
2180
+ $border-radius-xxl: $custom-radius-2xl !default;
2181
+ $border-radius-3xl: $custom-radius-3xl !default;
2182
+ $border-radius-4xl: $custom-radius-4xl !default;
2183
+ $border-radius-pill: $custom-radius-full !default;
2184
+
2185
+ // Component radius exports
2186
+ $btn-border-radius: $custom-button-radius !default;
2187
+ $btn-border-radius-sm: $custom-button-radius-sm !default;
2188
+ $btn-border-radius-lg: $custom-button-radius-lg !default;
2189
+ $card-border-radius: $custom-card-radius !default;
2190
+ $input-border-radius: $custom-input-radius !default;
2191
+ $badge-border-radius: $custom-badge-radius !default;
2192
+ `;
2193
+ }
2194
+
2195
+ function generateAnimationTokens() {
2196
+ return `// Custom Animation Tokens
2197
+ // Generated by Atomix CLI
2198
+ // =============================================================================
2199
+
2200
+ // Transition Durations
2201
+ $custom-duration-instant: 0s !default;
2202
+ $custom-duration-fast: 0.15s !default;
2203
+ $custom-duration-base: 0.3s !default;
2204
+ $custom-duration-slow: 0.5s !default;
2205
+ $custom-duration-slower: 0.7s !default;
2206
+ $custom-duration-slowest: 1s !default;
2207
+
2208
+ // Easing Functions
2209
+ $custom-ease-linear: linear !default;
2210
+ $custom-ease-in: cubic-bezier(0.4, 0, 1, 1) !default;
2211
+ $custom-ease-out: cubic-bezier(0, 0, 0.2, 1) !default;
2212
+ $custom-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1) !default;
2213
+ $custom-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55) !default;
2214
+ $custom-ease-smooth: cubic-bezier(0.23, 1, 0.32, 1) !default;
2215
+
2216
+ // Transition Properties
2217
+ $custom-transition-all: all $custom-duration-base $custom-ease-smooth !default;
2218
+ $custom-transition-colors: background-color $custom-duration-base $custom-ease-smooth,
2219
+ border-color $custom-duration-base $custom-ease-smooth,
2220
+ color $custom-duration-base $custom-ease-smooth,
2221
+ fill $custom-duration-base $custom-ease-smooth,
2222
+ stroke $custom-duration-base $custom-ease-smooth !default;
2223
+ $custom-transition-opacity: opacity $custom-duration-base $custom-ease-smooth !default;
2224
+ $custom-transition-shadow: box-shadow $custom-duration-base $custom-ease-smooth !default;
2225
+ $custom-transition-transform: transform $custom-duration-base $custom-ease-smooth !default;
2226
+
2227
+ // Component-specific transitions
2228
+ $custom-button-transition: $custom-transition-colors, $custom-transition-shadow, $custom-transition-transform !default;
2229
+ $custom-link-transition: $custom-transition-colors, text-decoration-color $custom-duration-base $custom-ease-smooth !default;
2230
+ $custom-input-transition: $custom-transition-colors, $custom-transition-shadow !default;
2231
+ $custom-card-transition: $custom-transition-shadow, $custom-transition-transform !default;
2232
+ $custom-modal-transition: $custom-transition-opacity, $custom-transition-transform !default;
2233
+ $custom-dropdown-transition: $custom-transition-opacity, $custom-transition-transform !default;
2234
+
2235
+ // Animation Keyframes (examples)
2236
+ @keyframes custom-fade-in {
2237
+ from { opacity: 0; }
2238
+ to { opacity: 1; }
2239
+ }
2240
+
2241
+ @keyframes custom-slide-in-up {
2242
+ from {
2243
+ transform: translateY(10px);
2244
+ opacity: 0;
2245
+ }
2246
+ to {
2247
+ transform: translateY(0);
2248
+ opacity: 1;
2249
+ }
2250
+ }
2251
+
2252
+ @keyframes custom-scale-in {
2253
+ from {
2254
+ transform: scale(0.95);
2255
+ opacity: 0;
2256
+ }
2257
+ to {
2258
+ transform: scale(1);
2259
+ opacity: 1;
2260
+ }
2261
+ }
2262
+
2263
+ @keyframes custom-spin {
2264
+ from { transform: rotate(0deg); }
2265
+ to { transform: rotate(360deg); }
2266
+ }
2267
+
2268
+ // Export to override defaults
2269
+ $transition-fast: $custom-transition-all !default;
2270
+ $transition-base: $custom-transition-all !default;
2271
+ $transition-slow: all $custom-duration-slow $custom-ease-smooth !default;
2272
+
2273
+ // Duration exports
2274
+ $transition-duration-fast: $custom-duration-fast !default;
2275
+ $transition-duration-base: $custom-duration-base !default;
2276
+ $transition-duration-slow: $custom-duration-slow !default;
2277
+
2278
+ // Easing exports
2279
+ $easing-base: $custom-ease-smooth !default;
2280
+ $easing-ease-in-out: $custom-ease-in-out !default;
2281
+ $easing-ease-out: $custom-ease-out !default;
2282
+ $easing-ease-in: $custom-ease-in !default;
2283
+ `;
2284
+ }
2285
+
1758
2286
  // Parse arguments
1759
2287
  program.parse(process.argv);
1760
2288