@shohojdhara/atomix 0.3.14 → 0.3.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/build-tools/EXAMPLES.md +372 -0
  3. package/build-tools/README.md +242 -0
  4. package/build-tools/__tests__/error-handler.test.js +230 -0
  5. package/build-tools/__tests__/index.test.js +141 -0
  6. package/build-tools/__tests__/rollup-plugin.test.js +194 -0
  7. package/build-tools/__tests__/utils.test.js +161 -0
  8. package/build-tools/__tests__/vite-plugin.test.js +129 -0
  9. package/build-tools/__tests__/webpack-loader.test.js +190 -0
  10. package/build-tools/error-handler.js +308 -0
  11. package/build-tools/index.d.ts +43 -0
  12. package/build-tools/index.js +88 -0
  13. package/build-tools/package.json +67 -0
  14. package/build-tools/rollup-plugin.js +236 -0
  15. package/build-tools/types.d.ts +163 -0
  16. package/build-tools/utils.js +203 -0
  17. package/build-tools/vite-plugin.js +161 -0
  18. package/build-tools/webpack-loader.js +123 -0
  19. package/dist/atomix.css +203 -90
  20. package/dist/atomix.css.map +1 -1
  21. package/dist/atomix.min.css +3 -3
  22. package/dist/atomix.min.css.map +1 -1
  23. package/dist/build-tools/EXAMPLES.md +372 -0
  24. package/dist/build-tools/README.md +242 -0
  25. package/dist/build-tools/__tests__/error-handler.test.js +230 -0
  26. package/dist/build-tools/__tests__/index.test.js +141 -0
  27. package/dist/build-tools/__tests__/rollup-plugin.test.js +194 -0
  28. package/dist/build-tools/__tests__/utils.test.js +161 -0
  29. package/dist/build-tools/__tests__/vite-plugin.test.js +129 -0
  30. package/dist/build-tools/__tests__/webpack-loader.test.js +190 -0
  31. package/dist/build-tools/error-handler.js +308 -0
  32. package/dist/build-tools/index.d.ts +43 -0
  33. package/dist/build-tools/index.js +88 -0
  34. package/dist/build-tools/package.json +67 -0
  35. package/dist/build-tools/rollup-plugin.js +236 -0
  36. package/dist/build-tools/types.d.ts +163 -0
  37. package/dist/build-tools/utils.js +203 -0
  38. package/dist/build-tools/vite-plugin.js +161 -0
  39. package/dist/build-tools/webpack-loader.js +123 -0
  40. package/dist/charts.d.ts +1 -1
  41. package/dist/charts.js +86 -57
  42. package/dist/charts.js.map +1 -1
  43. package/dist/core.d.ts +1 -1
  44. package/dist/core.js +136 -112
  45. package/dist/core.js.map +1 -1
  46. package/dist/forms.d.ts +2 -5
  47. package/dist/forms.js +140 -128
  48. package/dist/forms.js.map +1 -1
  49. package/dist/heavy.d.ts +1 -1
  50. package/dist/heavy.js +136 -112
  51. package/dist/heavy.js.map +1 -1
  52. package/dist/index.d.ts +9 -61
  53. package/dist/index.esm.js +237 -286
  54. package/dist/index.esm.js.map +1 -1
  55. package/dist/index.js +250 -299
  56. package/dist/index.js.map +1 -1
  57. package/dist/index.min.js +1 -1
  58. package/dist/index.min.js.map +1 -1
  59. package/package.json +23 -8
  60. package/scripts/atomix-cli.js +170 -73
  61. package/scripts/cli/__tests__/README.md +81 -0
  62. package/scripts/cli/__tests__/basic.test.js +115 -0
  63. package/scripts/cli/__tests__/component-generator.test.js +332 -0
  64. package/scripts/cli/__tests__/integration.test.js +327 -0
  65. package/scripts/cli/__tests__/test-setup.js +133 -0
  66. package/scripts/cli/__tests__/token-manager.test.js +251 -0
  67. package/scripts/cli/__tests__/utils.test.js +161 -0
  68. package/scripts/cli/component-generator.js +253 -299
  69. package/scripts/cli/dependency-checker.js +355 -0
  70. package/scripts/cli/interactive-init.js +46 -5
  71. package/scripts/cli/template-manager.js +0 -2
  72. package/scripts/cli/templates/common-templates.js +636 -0
  73. package/scripts/cli/templates/composable-templates.js +148 -126
  74. package/scripts/cli/templates/index.js +23 -16
  75. package/scripts/cli/templates/project-templates.js +151 -23
  76. package/scripts/cli/templates/react-templates.js +280 -210
  77. package/scripts/cli/templates/scss-templates.js +90 -91
  78. package/scripts/cli/templates/testing-templates.js +206 -27
  79. package/scripts/cli/templates/testing-utils.js +278 -0
  80. package/scripts/cli/templates/types-templates.js +70 -56
  81. package/scripts/cli/theme-bridge.js +8 -2
  82. package/scripts/cli/token-manager.js +318 -206
  83. package/scripts/cli/utils.js +0 -1
  84. package/src/components/Accordion/Accordion.stories.tsx +369 -870
  85. package/src/components/AtomixGlass/AtomixGlass.tsx +80 -39
  86. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +103 -81
  87. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +8 -7
  88. package/src/components/AtomixGlass/glass-utils.ts +2 -2
  89. package/src/components/AtomixGlass/shader-utils.ts +5 -0
  90. package/src/components/AtomixGlass/stories/Customization.stories.tsx +131 -0
  91. package/src/components/AtomixGlass/stories/Examples.stories.tsx +2957 -2853
  92. package/src/components/AtomixGlass/stories/Modes.stories.tsx +1 -1
  93. package/src/components/AtomixGlass/stories/Overview.stories.tsx +348 -0
  94. package/src/components/AtomixGlass/stories/Performance.stories.tsx +103 -0
  95. package/src/components/AtomixGlass/stories/Playground.stories.tsx +50 -35
  96. package/src/components/AtomixGlass/stories/{ShaderVariants.stories.tsx → Shaders.stories.tsx} +1 -1
  97. package/src/components/AtomixGlass/stories/shared-components.tsx +90 -190
  98. package/src/components/Avatar/Avatar.stories.tsx +213 -1
  99. package/src/components/Badge/Badge.stories.tsx +121 -362
  100. package/src/components/Block/Block.stories.tsx +21 -12
  101. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +141 -23
  102. package/src/components/Button/Button.stories.tsx +463 -1126
  103. package/src/components/Button/Button.test.tsx +107 -0
  104. package/src/components/Button/Button.tsx +46 -50
  105. package/src/components/Button/ButtonGroup.stories.tsx +373 -217
  106. package/src/components/Callout/Callout.stories.tsx +289 -634
  107. package/src/components/Card/Card.stories.tsx +248 -68
  108. package/src/components/Chart/Chart.stories.tsx +150 -8
  109. package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +151 -69
  110. package/src/components/Countdown/Countdown.stories.tsx +115 -8
  111. package/src/components/DataTable/DataTable.stories.tsx +346 -146
  112. package/src/components/DatePicker/DatePicker.stories.tsx +325 -1066
  113. package/src/components/Dropdown/Dropdown.stories.tsx +153 -33
  114. package/src/components/EdgePanel/EdgePanel.stories.tsx +230 -21
  115. package/src/components/Footer/Footer.stories.tsx +392 -328
  116. package/src/components/Form/Checkbox.stories.tsx +140 -6
  117. package/src/components/Form/Checkbox.test.tsx +63 -0
  118. package/src/components/Form/Checkbox.tsx +87 -51
  119. package/src/components/Form/Form.stories.tsx +119 -20
  120. package/src/components/Form/FormGroup.stories.tsx +127 -4
  121. package/src/components/Form/Radio.stories.tsx +140 -5
  122. package/src/components/Form/Select.stories.tsx +140 -8
  123. package/src/components/Form/Textarea.stories.tsx +149 -6
  124. package/src/components/Hero/Hero.stories.tsx +333 -32
  125. package/src/components/List/List.stories.tsx +141 -3
  126. package/src/components/Modal/Modal.stories.tsx +181 -42
  127. package/src/components/Popover/Popover.stories.tsx +448 -98
  128. package/src/components/Progress/Progress.stories.tsx +167 -5
  129. package/src/components/River/River.stories.tsx +1 -1
  130. package/src/components/SectionIntro/SectionIntro.stories.tsx +240 -48
  131. package/src/components/Spinner/Spinner.stories.tsx +102 -8
  132. package/src/components/Steps/Steps.stories.tsx +172 -43
  133. package/src/components/Tabs/Tabs.stories.tsx +136 -10
  134. package/src/components/Testimonial/Testimonial.stories.tsx +120 -3
  135. package/src/components/Todo/Todo.stories.tsx +198 -9
  136. package/src/components/Toggle/Toggle.stories.tsx +126 -39
  137. package/src/components/Tooltip/Tooltip.stories.tsx +194 -104
  138. package/src/components/Upload/Upload.stories.tsx +113 -24
  139. package/src/lib/README.md +2 -2
  140. package/src/lib/__tests__/theme-tools.test.ts +193 -0
  141. package/src/lib/composables/index.ts +2 -2
  142. package/src/lib/composables/useAtomixGlass.ts +28 -56
  143. package/src/lib/composables/useChartExport.ts +2 -7
  144. package/src/lib/composables/useDataTable.ts +46 -29
  145. package/src/lib/constants/components.ts +9 -32
  146. package/src/lib/theme/devtools/CLI.ts +1 -1
  147. package/src/lib/types/components.ts +1 -1
  148. package/src/lib/utils/__tests__/csv.test.ts +45 -0
  149. package/src/lib/utils/csv.ts +17 -0
  150. package/src/lib/utils/dataTableExport.ts +1 -10
  151. package/src/styles/01-settings/_index.scss +2 -1
  152. package/src/styles/01-settings/_settings.accordion.scss +28 -7
  153. package/src/styles/01-settings/_settings.colors.scss +11 -11
  154. package/src/styles/01-settings/_settings.typography.scss +5 -5
  155. package/src/styles/02-tools/_tools.utility-api.scss +14 -0
  156. package/src/styles/06-components/_components.accordion.scss +56 -14
  157. package/src/styles/06-components/_components.checkbox.scss +23 -17
  158. package/src/styles/99-utilities/_index.scss +2 -0
  159. package/src/styles/99-utilities/_utilities.scss +3 -1
  160. package/src/styles/99-utilities/_utilities.text-gradient.scss +45 -0
  161. package/themes/dark-complementary/README.md +98 -0
  162. package/themes/dark-complementary/index.scss +158 -0
  163. package/themes/default-light/README.md +81 -0
  164. package/themes/default-light/index.scss +154 -0
  165. package/themes/high-contrast/README.md +105 -0
  166. package/themes/high-contrast/index.scss +172 -0
  167. package/themes/test-theme/README.md +38 -0
  168. package/themes/test-theme/index.scss +47 -0
  169. package/scripts/cli/templates-original-backup.js +0 -1655
  170. package/scripts/cli/templates_backup.js +0 -684
  171. package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +0 -1438
  172. package/src/lib/composables/useButton.ts +0 -93
  173. package/src/lib/composables/useCheckbox.ts +0 -70
@@ -0,0 +1,172 @@
1
+ // Theme: high-contrast
2
+ // =============================================================================
3
+
4
+ @import '../../src/styles/01-settings';
5
+ @import '../../src/styles/02-tools';
6
+
7
+ // Theme Variables
8
+ // =============================================================================
9
+ :root[data-theme="high-contrast"] {
10
+ // Colors (high contrast - pure black/white with bright accents)
11
+ --atomix-color-primary: #0066cc; // Bright blue for high visibility
12
+ --atomix-color-primary-light: #3399ff;
13
+ --atomix-color-primary-dark: #004d99;
14
+ --atomix-color-secondary: #666666; // Medium gray
15
+ --atomix-color-secondary-light: #999999;
16
+ --atomix-color-secondary-dark: #333333;
17
+ --atomix-color-success: #008000; // Pure green
18
+ --atomix-color-success-light: #00cc00;
19
+ --atomix-color-success-dark: #004d00;
20
+ --atomix-color-error: #cc0000; // Bright red
21
+ --atomix-color-error-light: #ff3333;
22
+ --atomix-color-error-dark: #990000;
23
+ --atomix-color-warning: #ffcc00; // Bright yellow
24
+ --atomix-color-warning-light: #ffff66;
25
+ --atomix-color-warning-dark: #cc9900;
26
+ --atomix-color-info: #0099cc; // Bright cyan
27
+ --atomix-color-info-light: #33ccff;
28
+ --atomix-color-info-dark: #006699;
29
+
30
+ // Background (pure white/black)
31
+ --atomix-color-background: #ffffff;
32
+ --atomix-color-background-paper: #ffffff;
33
+ --atomix-color-background-subtle: #f0f0f0;
34
+
35
+ // Text (pure black/white)
36
+ --atomix-color-text: #000000;
37
+ --atomix-color-text-secondary: #333333;
38
+ --atomix-color-text-disabled: #666666;
39
+
40
+ // Border (thick black borders for maximum visibility)
41
+ --atomix-color-border: #000000;
42
+ --atomix-color-border-light: #333333;
43
+ --atomix-color-border-dark: #000000;
44
+
45
+ // Spacing (same as other themes)
46
+ --atomix-space-0: 0;
47
+ --atomix-space-1: 0.25rem;
48
+ --atomix-space-2: 0.5rem;
49
+ --atomix-space-3: 0.75rem;
50
+ --atomix-space-4: 1rem;
51
+ --atomix-space-5: 1.25rem;
52
+ --atomix-space-6: 1.5rem;
53
+ --atomix-space-8: 2rem;
54
+ --atomix-space-10: 2.5rem;
55
+ --atomix-space-12: 3rem;
56
+ --atomix-space-16: 4rem;
57
+ --atomix-space-20: 5rem;
58
+ --atomix-space-24: 6rem;
59
+ --atomix-space-32: 8rem;
60
+ --atomix-space-base: 1rem;
61
+
62
+ // Typography (high contrast fonts)
63
+ --atomix-font-family-base: 'Arial', 'Helvetica', sans-serif; // More readable fonts
64
+ --atomix-font-family-heading: 'Arial Black', 'Arial', 'Helvetica', sans-serif;
65
+ --atomix-font-family-mono: 'Courier New', 'Monaco', 'Consolas', monospace;
66
+
67
+ --atomix-font-size-xs: 0.875rem; // Slightly larger for better readability
68
+ --atomix-font-size-sm: 1rem;
69
+ --atomix-font-size-base: 1.125rem;
70
+ --atomix-font-size-lg: 1.25rem;
71
+ --atomix-font-size-xl: 1.375rem;
72
+ --atomix-font-size-2xl: 1.625rem;
73
+ --atomix-font-size-3xl: 2rem;
74
+ --atomix-font-size-4xl: 2.5rem;
75
+ --atomix-font-size-5xl: 3.25rem;
76
+
77
+ --atomix-font-weight-light: 400; // No light fonts for better readability
78
+ --atomix-font-weight-normal: 400;
79
+ --atomix-font-weight-medium: 600;
80
+ --atomix-font-weight-semibold: 700;
81
+ --atomix-font-weight-bold: 700;
82
+ --atomix-font-weight-extrabold: 900;
83
+
84
+ --atomix-line-height-tight: 1.4;
85
+ --atomix-line-height-snug: 1.5;
86
+ --atomix-line-height-normal: 1.6;
87
+ --atomix-line-height-relaxed: 1.7;
88
+ --atomix-line-height-loose: 2;
89
+
90
+ // Shadows (minimal for high contrast)
91
+ --atomix-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
92
+ --atomix-shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.5);
93
+ --atomix-shadow-md: 0 4px 8px 0 rgba(0, 0, 0, 0.5);
94
+ --atomix-shadow-lg: 0 8px 16px 0 rgba(0, 0, 0, 0.5);
95
+ --atomix-shadow-xl: 0 16px 32px 0 rgba(0, 0, 0, 0.5);
96
+ --atomix-shadow-2xl: 0 24px 48px 0 rgba(0, 0, 0, 0.5);
97
+ --atomix-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.5);
98
+ --atomix-shadow-outline: 0 0 0 4px #0066cc; // Thick focus ring
99
+
100
+ // Animations/Transitions (reduced for accessibility)
101
+ --atomix-transition-fast: 100ms ease-in-out;
102
+ --atomix-transition-base: 150ms ease-in-out;
103
+ --atomix-transition-slow: 200ms ease-in-out;
104
+
105
+ --atomix-animation-duration-fast: 100ms;
106
+ --atomix-animation-duration-base: 150ms;
107
+ --atomix-animation-duration-slow: 200ms;
108
+
109
+ --atomix-animation-easing-ease: ease;
110
+ --atomix-animation-easing-ease-in: ease-in;
111
+ --atomix-animation-easing-ease-out: ease-out;
112
+ --atomix-animation-easing-ease-in-out: ease-in-out;
113
+
114
+ // Border Radius (minimal for high contrast)
115
+ --atomix-radius-none: 0;
116
+ --atomix-radius-sm: 0.125rem;
117
+ --atomix-radius-base: 0.25rem;
118
+ --atomix-radius-md: 0.25rem;
119
+ --atomix-radius-lg: 0.25rem;
120
+ --atomix-radius-xl: 0.5rem;
121
+ --atomix-radius-2xl: 0.5rem;
122
+ --atomix-radius-full: 9999px;
123
+ }
124
+
125
+ // Theme-specific Component Overrides
126
+ // =============================================================================
127
+ [data-theme="high-contrast"] {
128
+ // Button overrides (high contrast)
129
+ .c-button {
130
+ border: 2px solid var(--atomix-color-border);
131
+ border-radius: var(--atomix-radius-sm);
132
+ transition: all var(--atomix-transition-fast);
133
+ font-weight: var(--atomix-font-weight-bold);
134
+ background-color: var(--atomix-color-background);
135
+
136
+ &:hover {
137
+ background-color: var(--atomix-color-background-subtle);
138
+ border-color: var(--atomix-color-primary);
139
+ color: var(--atomix-color-primary);
140
+ }
141
+
142
+ &:focus {
143
+ outline: none;
144
+ box-shadow: var(--atomix-shadow-outline);
145
+ border-color: var(--atomix-color-primary);
146
+ }
147
+
148
+ &:active {
149
+ background-color: var(--atomix-color-primary);
150
+ color: var(--atomix-color-background);
151
+ border-color: var(--atomix-color-primary);
152
+ }
153
+ }
154
+
155
+ // Card overrides (high contrast)
156
+ .c-card {
157
+ border: 3px solid var(--atomix-color-border);
158
+ border-radius: var(--atomix-radius-sm);
159
+ box-shadow: var(--atomix-shadow-sm);
160
+ background-color: var(--atomix-color-background);
161
+
162
+ &:hover {
163
+ border-color: var(--atomix-color-primary);
164
+ box-shadow: var(--atomix-shadow-md);
165
+ }
166
+
167
+ &:focus-within {
168
+ border-color: var(--atomix-color-primary);
169
+ box-shadow: var(--atomix-shadow-outline);
170
+ }
171
+ }
172
+ }
@@ -0,0 +1,38 @@
1
+ # test-theme Theme
2
+
3
+ ## Description
4
+
5
+ A custom theme for Atomix Design System.
6
+
7
+ ## Usage
8
+
9
+ ### CSS Theme
10
+
11
+ ```scss
12
+ @import 'themes/test-theme';
13
+ ```
14
+
15
+ ### JavaScript Theme
16
+
17
+ ```typescript
18
+ import { testThemeTheme } from './themes/test-theme';
19
+ import { ThemeProvider } from '@shohojdhara/atomix/theme';
20
+
21
+ function App() {
22
+ return (
23
+ <ThemeProvider theme={testThemeTheme}>
24
+ {/* Your app */}
25
+ </ThemeProvider>
26
+ );
27
+ }
28
+ ```
29
+
30
+ ## Customization
31
+
32
+ Edit the theme variables in `index.scss` to customize colors, typography, spacing, and more.
33
+
34
+ ## Build
35
+
36
+ ```bash
37
+ atomix build-theme themes/test-theme
38
+ ```
@@ -0,0 +1,47 @@
1
+ // Theme: test-theme
2
+ // =============================================================================
3
+
4
+ @import '../../src/styles/01-settings';
5
+ @import '../../src/styles/02-tools';
6
+
7
+ // Theme Variables
8
+ // =============================================================================
9
+ :root[data-theme="test-theme"] {
10
+ // Colors
11
+ --atomix-color-primary: #7AFFD7;
12
+ --atomix-color-secondary: #FF5733;
13
+ --atomix-color-success: #4DFF9F;
14
+ --atomix-color-error: #FF1A1A;
15
+ --atomix-color-warning: #FFB84D;
16
+
17
+ // Background
18
+ --atomix-color-background: #000000;
19
+ --atomix-color-surface: #212121;
20
+
21
+ // Text
22
+ --atomix-color-text: #FFFFFF;
23
+ --atomix-color-text-secondary: rgba(255, 255, 255, 0.8);
24
+
25
+ // Border
26
+ --atomix-color-border: rgba(255, 255, 255, 0.1);
27
+
28
+ // Spacing (if needed)
29
+ // --atomix-space-base: 16px;
30
+
31
+ // Typography (if needed)
32
+ // --atomix-font-family-base: 'Inter', sans-serif;
33
+ }
34
+
35
+ // Theme-specific Component Overrides
36
+ // =============================================================================
37
+ [data-theme="test-theme"] {
38
+ // Add component-specific overrides here
39
+
40
+ .c-button {
41
+ // Button overrides
42
+ }
43
+
44
+ .c-card {
45
+ // Card overrides
46
+ }
47
+ }