czero 0.1.0 → 0.2.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 (114) hide show
  1. package/README.md +40 -0
  2. package/dist/cli/index.js +3780 -28
  3. package/dist/cli-new/cli/build-css.d.ts +19 -0
  4. package/dist/cli-new/cli/build-css.js +88 -0
  5. package/dist/cli-new/cli/generators/button.d.ts +9 -0
  6. package/dist/cli-new/cli/generators/button.js +224 -0
  7. package/dist/cli-new/cli/generators/card.d.ts +9 -0
  8. package/dist/cli-new/cli/generators/card.js +104 -0
  9. package/dist/cli-new/cli/generators/checkbox.d.ts +6 -0
  10. package/dist/cli-new/cli/generators/checkbox.js +163 -0
  11. package/dist/cli-new/cli/generators/index.d.ts +10 -0
  12. package/dist/cli-new/cli/generators/index.js +40 -0
  13. package/dist/cli-new/cli/generators/input.d.ts +9 -0
  14. package/dist/cli-new/cli/generators/input.js +231 -0
  15. package/dist/cli-new/cli/generators/switch.d.ts +6 -0
  16. package/dist/cli-new/cli/generators/switch.js +156 -0
  17. package/dist/cli-new/cli/generators/utilities.d.ts +9 -0
  18. package/dist/cli-new/cli/generators/utilities.js +150 -0
  19. package/dist/cli-new/cli/index.d.ts +8 -0
  20. package/dist/cli-new/cli/index.js +288 -0
  21. package/dist/cli-new/cli/token-resolver.d.ts +44 -0
  22. package/dist/cli-new/cli/token-resolver.js +137 -0
  23. package/dist/cli-new/cli/utils/deep-merge.d.ts +15 -0
  24. package/dist/cli-new/cli/utils/deep-merge.js +41 -0
  25. package/dist/cli-new/cli/validate-config.d.ts +19 -0
  26. package/dist/cli-new/cli/validate-config.js +151 -0
  27. package/dist/cli-new/src/core/component-defaults.d.ts +7 -0
  28. package/dist/cli-new/src/core/component-defaults.js +467 -0
  29. package/dist/cli-new/src/core/types/config.d.ts +489 -0
  30. package/dist/cli-new/src/core/types/config.js +5 -0
  31. package/dist/cli-new/src/presets/index.d.ts +44 -0
  32. package/dist/cli-new/src/presets/index.js +194 -0
  33. package/dist/components.css +1579 -2
  34. package/dist/react/core/component-defaults.d.ts +8 -0
  35. package/dist/react/core/component-defaults.d.ts.map +1 -0
  36. package/dist/react/core/types/config.d.ts +490 -0
  37. package/dist/react/core/types/config.d.ts.map +1 -0
  38. package/dist/react/index.cjs +11577 -17
  39. package/dist/react/index.cjs.map +1 -1
  40. package/dist/react/index.d.ts +407 -4
  41. package/dist/react/index.js +11532 -6
  42. package/dist/react/index.js.map +1 -1
  43. package/dist/react/presets/index.d.ts +45 -0
  44. package/dist/react/presets/index.d.ts.map +1 -0
  45. package/dist/react/react/components/accordion.d.ts +30 -0
  46. package/dist/react/react/components/accordion.d.ts.map +1 -0
  47. package/dist/react/react/components/alert.d.ts +7 -0
  48. package/dist/react/react/components/alert.d.ts.map +1 -0
  49. package/dist/react/react/components/aspect-ratio.d.ts +8 -0
  50. package/dist/react/react/components/aspect-ratio.d.ts.map +1 -0
  51. package/dist/react/react/components/avatar.d.ts +10 -0
  52. package/dist/react/react/components/avatar.d.ts.map +1 -0
  53. package/dist/react/react/components/breadcrumb.d.ts +28 -0
  54. package/dist/react/react/components/breadcrumb.d.ts.map +1 -0
  55. package/dist/react/react/components/button.d.ts +3 -2
  56. package/dist/react/react/components/button.d.ts.map +1 -1
  57. package/dist/react/react/components/checkbox.d.ts +9 -0
  58. package/dist/react/react/components/checkbox.d.ts.map +1 -0
  59. package/dist/react/react/components/code.d.ts +6 -0
  60. package/dist/react/react/components/code.d.ts.map +1 -0
  61. package/dist/react/react/components/container.d.ts +8 -0
  62. package/dist/react/react/components/container.d.ts.map +1 -0
  63. package/dist/react/react/components/dialog.d.ts +28 -0
  64. package/dist/react/react/components/dialog.d.ts.map +1 -0
  65. package/dist/react/react/components/dropdown-menu.d.ts +32 -0
  66. package/dist/react/react/components/dropdown-menu.d.ts.map +1 -0
  67. package/dist/react/react/components/grid.d.ts +8 -0
  68. package/dist/react/react/components/grid.d.ts.map +1 -0
  69. package/dist/react/react/components/input.d.ts +4 -0
  70. package/dist/react/react/components/input.d.ts.map +1 -1
  71. package/dist/react/react/components/kbd.d.ts +6 -0
  72. package/dist/react/react/components/kbd.d.ts.map +1 -0
  73. package/dist/react/react/components/label.d.ts +7 -0
  74. package/dist/react/react/components/label.d.ts.map +1 -0
  75. package/dist/react/react/components/progress.d.ts +10 -0
  76. package/dist/react/react/components/progress.d.ts.map +1 -0
  77. package/dist/react/react/components/radio-group.d.ts +15 -0
  78. package/dist/react/react/components/radio-group.d.ts.map +1 -0
  79. package/dist/react/react/components/scroll-area.d.ts +8 -0
  80. package/dist/react/react/components/scroll-area.d.ts.map +1 -0
  81. package/dist/react/react/components/select.d.ts +29 -0
  82. package/dist/react/react/components/select.d.ts.map +1 -0
  83. package/dist/react/react/components/separator.d.ts +8 -0
  84. package/dist/react/react/components/separator.d.ts.map +1 -0
  85. package/dist/react/react/components/skeleton.d.ts +8 -0
  86. package/dist/react/react/components/skeleton.d.ts.map +1 -0
  87. package/dist/react/react/components/spinner.d.ts +7 -0
  88. package/dist/react/react/components/spinner.d.ts.map +1 -0
  89. package/dist/react/react/components/stack.d.ts +11 -0
  90. package/dist/react/react/components/stack.d.ts.map +1 -0
  91. package/dist/react/react/components/switch.d.ts +10 -0
  92. package/dist/react/react/components/switch.d.ts.map +1 -0
  93. package/dist/react/react/components/table.d.ts +27 -0
  94. package/dist/react/react/components/table.d.ts.map +1 -0
  95. package/dist/react/react/components/tabs.d.ts +21 -0
  96. package/dist/react/react/components/tabs.d.ts.map +1 -0
  97. package/dist/react/react/components/tag.d.ts +10 -0
  98. package/dist/react/react/components/tag.d.ts.map +1 -0
  99. package/dist/react/react/components/textarea.d.ts +11 -0
  100. package/dist/react/react/components/textarea.d.ts.map +1 -0
  101. package/dist/react/react/components/toast.d.ts +28 -0
  102. package/dist/react/react/components/toast.d.ts.map +1 -0
  103. package/dist/react/react/components/tooltip.d.ts +16 -0
  104. package/dist/react/react/components/tooltip.d.ts.map +1 -0
  105. package/dist/react/react/components/visually-hidden.d.ts +7 -0
  106. package/dist/react/react/components/visually-hidden.d.ts.map +1 -0
  107. package/dist/react/react/hooks/index.d.ts +5 -0
  108. package/dist/react/react/hooks/index.d.ts.map +1 -0
  109. package/dist/react/react/hooks/use-theme.d.ts +17 -0
  110. package/dist/react/react/hooks/use-theme.d.ts.map +1 -0
  111. package/dist/react/react/index.d.ts +30 -0
  112. package/dist/react/react/index.d.ts.map +1 -1
  113. package/dist/styles.css +1579 -2
  114. package/package.json +35 -4
@@ -0,0 +1,194 @@
1
+ /**
2
+ * CZero Theme Presets
3
+ * Pre-built theme configurations users can extend
4
+ */
5
+ /**
6
+ * Default preset - balanced, professional look
7
+ */
8
+ export const defaultPreset = {
9
+ // Uses all default values from component-defaults.ts
10
+ };
11
+ /**
12
+ * Compact preset - tighter spacing, smaller sizes
13
+ * Great for data-dense applications
14
+ */
15
+ export const compact = {
16
+ spacing: {
17
+ xs: "0.125rem",
18
+ sm: "0.375rem",
19
+ md: "0.5rem",
20
+ lg: "0.75rem",
21
+ xl: "1rem",
22
+ },
23
+ components: {
24
+ button: {
25
+ height: { sm: "1.75rem", md: "2rem", lg: "2.5rem" },
26
+ paddingX: { sm: "0.5rem", md: "0.75rem", lg: "1rem" },
27
+ gap: "0.375rem",
28
+ },
29
+ input: {
30
+ height: { sm: "1.75rem", md: "2rem", lg: "2.5rem" },
31
+ paddingX: { sm: "0.375rem", md: "0.5rem", lg: "0.75rem" },
32
+ },
33
+ card: {
34
+ padding: "$spacing-md",
35
+ header: { paddingBottom: "$spacing-sm", marginBottom: "$spacing-sm" },
36
+ footer: { paddingTop: "$spacing-sm", marginTop: "$spacing-sm", gap: "0.375rem" },
37
+ },
38
+ switch: {
39
+ width: { sm: "1.75rem", md: "2.25rem", lg: "3rem" },
40
+ height: { sm: "1rem", md: "1.25rem", lg: "1.5rem" },
41
+ thumbSize: { sm: "0.75rem", md: "1rem", lg: "1.25rem" },
42
+ },
43
+ checkbox: {
44
+ size: { sm: "0.875rem", md: "1rem", lg: "1.25rem" },
45
+ iconSize: { sm: "8px", md: "10px", lg: "12px" },
46
+ labelGap: "0.375rem",
47
+ },
48
+ },
49
+ };
50
+ /**
51
+ * Comfortable preset - more spacing, larger touch targets
52
+ * Great for mobile-first or accessibility-focused apps
53
+ */
54
+ export const comfortable = {
55
+ spacing: {
56
+ xs: "0.375rem",
57
+ sm: "0.75rem",
58
+ md: "1rem",
59
+ lg: "1.5rem",
60
+ xl: "2rem",
61
+ },
62
+ components: {
63
+ button: {
64
+ height: { sm: "2.5rem", md: "3rem", lg: "3.5rem" },
65
+ paddingX: { sm: "1rem", md: "1.5rem", lg: "2rem" },
66
+ gap: "0.75rem",
67
+ },
68
+ input: {
69
+ height: { sm: "2.5rem", md: "3rem", lg: "3.5rem" },
70
+ paddingX: { sm: "0.75rem", md: "1rem", lg: "1.25rem" },
71
+ },
72
+ card: {
73
+ padding: "$spacing-xl",
74
+ header: { paddingBottom: "$spacing-lg", marginBottom: "$spacing-lg" },
75
+ footer: { paddingTop: "$spacing-lg", marginTop: "$spacing-lg", gap: "0.75rem" },
76
+ },
77
+ switch: {
78
+ width: { sm: "2.5rem", md: "3.25rem", lg: "4rem" },
79
+ height: { sm: "1.375rem", md: "1.75rem", lg: "2.125rem" },
80
+ thumbSize: { sm: "1.125rem", md: "1.5rem", lg: "1.875rem" },
81
+ },
82
+ checkbox: {
83
+ size: { sm: "1.25rem", md: "1.5rem", lg: "1.75rem" },
84
+ iconSize: { sm: "12px", md: "14px", lg: "16px" },
85
+ labelGap: "0.75rem",
86
+ },
87
+ },
88
+ };
89
+ /**
90
+ * Rounded preset - increased border radius for a softer look
91
+ */
92
+ export const rounded = {
93
+ radius: {
94
+ none: "0",
95
+ sm: "0.5rem",
96
+ md: "0.75rem",
97
+ lg: "1rem",
98
+ xl: "1.5rem",
99
+ full: "9999px",
100
+ },
101
+ components: {
102
+ button: {
103
+ borderRadius: "$radius-lg",
104
+ },
105
+ input: {
106
+ borderRadius: "$radius-lg",
107
+ },
108
+ card: {
109
+ borderRadius: "$radius-xl",
110
+ },
111
+ },
112
+ };
113
+ /**
114
+ * Sharp preset - no border radius for a modern, angular look
115
+ */
116
+ export const sharp = {
117
+ radius: {
118
+ none: "0",
119
+ sm: "0",
120
+ md: "2px",
121
+ lg: "4px",
122
+ xl: "6px",
123
+ full: "9999px",
124
+ },
125
+ components: {
126
+ button: {
127
+ borderRadius: "$radius-sm",
128
+ },
129
+ input: {
130
+ borderRadius: "$radius-sm",
131
+ },
132
+ card: {
133
+ borderRadius: "$radius-md",
134
+ },
135
+ checkbox: {
136
+ borderRadius: "2px",
137
+ },
138
+ },
139
+ };
140
+ /**
141
+ * Minimal preset - reduced shadows, subtle borders
142
+ */
143
+ export const minimal = {
144
+ shadow: {
145
+ none: "none",
146
+ sm: "none",
147
+ md: "0 1px 2px rgb(0 0 0 / 0.03)",
148
+ lg: "0 2px 4px rgb(0 0 0 / 0.05)",
149
+ },
150
+ components: {
151
+ button: {
152
+ states: {
153
+ hover: { opacity: "0.8" },
154
+ focus: { ringWidth: "1px", ringOffset: "1px" },
155
+ },
156
+ },
157
+ card: {
158
+ shadow: "none",
159
+ borderWidth: "1px",
160
+ },
161
+ },
162
+ };
163
+ /**
164
+ * Vibrant preset - bolder colors, more pronounced effects
165
+ */
166
+ export const vibrant = {
167
+ shadow: {
168
+ none: "none",
169
+ sm: "0 2px 4px rgb(0 0 0 / 0.1)",
170
+ md: "0 4px 8px rgb(0 0 0 / 0.12)",
171
+ lg: "0 8px 16px rgb(0 0 0 / 0.15)",
172
+ },
173
+ components: {
174
+ button: {
175
+ states: {
176
+ hover: { opacity: "1", transform: "translateY(-1px)" },
177
+ focus: { ringWidth: "3px", ringOffset: "2px" },
178
+ },
179
+ },
180
+ card: {
181
+ shadow: "$shadow-md",
182
+ },
183
+ },
184
+ };
185
+ // Export all presets
186
+ export const presets = {
187
+ default: defaultPreset,
188
+ compact,
189
+ comfortable,
190
+ rounded,
191
+ sharp,
192
+ minimal,
193
+ vibrant,
194
+ };