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.
- package/README.md +40 -0
- package/dist/cli/index.js +3780 -28
- package/dist/cli-new/cli/build-css.d.ts +19 -0
- package/dist/cli-new/cli/build-css.js +88 -0
- package/dist/cli-new/cli/generators/button.d.ts +9 -0
- package/dist/cli-new/cli/generators/button.js +224 -0
- package/dist/cli-new/cli/generators/card.d.ts +9 -0
- package/dist/cli-new/cli/generators/card.js +104 -0
- package/dist/cli-new/cli/generators/checkbox.d.ts +6 -0
- package/dist/cli-new/cli/generators/checkbox.js +163 -0
- package/dist/cli-new/cli/generators/index.d.ts +10 -0
- package/dist/cli-new/cli/generators/index.js +40 -0
- package/dist/cli-new/cli/generators/input.d.ts +9 -0
- package/dist/cli-new/cli/generators/input.js +231 -0
- package/dist/cli-new/cli/generators/switch.d.ts +6 -0
- package/dist/cli-new/cli/generators/switch.js +156 -0
- package/dist/cli-new/cli/generators/utilities.d.ts +9 -0
- package/dist/cli-new/cli/generators/utilities.js +150 -0
- package/dist/cli-new/cli/index.d.ts +8 -0
- package/dist/cli-new/cli/index.js +288 -0
- package/dist/cli-new/cli/token-resolver.d.ts +44 -0
- package/dist/cli-new/cli/token-resolver.js +137 -0
- package/dist/cli-new/cli/utils/deep-merge.d.ts +15 -0
- package/dist/cli-new/cli/utils/deep-merge.js +41 -0
- package/dist/cli-new/cli/validate-config.d.ts +19 -0
- package/dist/cli-new/cli/validate-config.js +151 -0
- package/dist/cli-new/src/core/component-defaults.d.ts +7 -0
- package/dist/cli-new/src/core/component-defaults.js +467 -0
- package/dist/cli-new/src/core/types/config.d.ts +489 -0
- package/dist/cli-new/src/core/types/config.js +5 -0
- package/dist/cli-new/src/presets/index.d.ts +44 -0
- package/dist/cli-new/src/presets/index.js +194 -0
- package/dist/components.css +1579 -2
- package/dist/react/core/component-defaults.d.ts +8 -0
- package/dist/react/core/component-defaults.d.ts.map +1 -0
- package/dist/react/core/types/config.d.ts +490 -0
- package/dist/react/core/types/config.d.ts.map +1 -0
- package/dist/react/index.cjs +11577 -17
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.ts +407 -4
- package/dist/react/index.js +11532 -6
- package/dist/react/index.js.map +1 -1
- package/dist/react/presets/index.d.ts +45 -0
- package/dist/react/presets/index.d.ts.map +1 -0
- package/dist/react/react/components/accordion.d.ts +30 -0
- package/dist/react/react/components/accordion.d.ts.map +1 -0
- package/dist/react/react/components/alert.d.ts +7 -0
- package/dist/react/react/components/alert.d.ts.map +1 -0
- package/dist/react/react/components/aspect-ratio.d.ts +8 -0
- package/dist/react/react/components/aspect-ratio.d.ts.map +1 -0
- package/dist/react/react/components/avatar.d.ts +10 -0
- package/dist/react/react/components/avatar.d.ts.map +1 -0
- package/dist/react/react/components/breadcrumb.d.ts +28 -0
- package/dist/react/react/components/breadcrumb.d.ts.map +1 -0
- package/dist/react/react/components/button.d.ts +3 -2
- package/dist/react/react/components/button.d.ts.map +1 -1
- package/dist/react/react/components/checkbox.d.ts +9 -0
- package/dist/react/react/components/checkbox.d.ts.map +1 -0
- package/dist/react/react/components/code.d.ts +6 -0
- package/dist/react/react/components/code.d.ts.map +1 -0
- package/dist/react/react/components/container.d.ts +8 -0
- package/dist/react/react/components/container.d.ts.map +1 -0
- package/dist/react/react/components/dialog.d.ts +28 -0
- package/dist/react/react/components/dialog.d.ts.map +1 -0
- package/dist/react/react/components/dropdown-menu.d.ts +32 -0
- package/dist/react/react/components/dropdown-menu.d.ts.map +1 -0
- package/dist/react/react/components/grid.d.ts +8 -0
- package/dist/react/react/components/grid.d.ts.map +1 -0
- package/dist/react/react/components/input.d.ts +4 -0
- package/dist/react/react/components/input.d.ts.map +1 -1
- package/dist/react/react/components/kbd.d.ts +6 -0
- package/dist/react/react/components/kbd.d.ts.map +1 -0
- package/dist/react/react/components/label.d.ts +7 -0
- package/dist/react/react/components/label.d.ts.map +1 -0
- package/dist/react/react/components/progress.d.ts +10 -0
- package/dist/react/react/components/progress.d.ts.map +1 -0
- package/dist/react/react/components/radio-group.d.ts +15 -0
- package/dist/react/react/components/radio-group.d.ts.map +1 -0
- package/dist/react/react/components/scroll-area.d.ts +8 -0
- package/dist/react/react/components/scroll-area.d.ts.map +1 -0
- package/dist/react/react/components/select.d.ts +29 -0
- package/dist/react/react/components/select.d.ts.map +1 -0
- package/dist/react/react/components/separator.d.ts +8 -0
- package/dist/react/react/components/separator.d.ts.map +1 -0
- package/dist/react/react/components/skeleton.d.ts +8 -0
- package/dist/react/react/components/skeleton.d.ts.map +1 -0
- package/dist/react/react/components/spinner.d.ts +7 -0
- package/dist/react/react/components/spinner.d.ts.map +1 -0
- package/dist/react/react/components/stack.d.ts +11 -0
- package/dist/react/react/components/stack.d.ts.map +1 -0
- package/dist/react/react/components/switch.d.ts +10 -0
- package/dist/react/react/components/switch.d.ts.map +1 -0
- package/dist/react/react/components/table.d.ts +27 -0
- package/dist/react/react/components/table.d.ts.map +1 -0
- package/dist/react/react/components/tabs.d.ts +21 -0
- package/dist/react/react/components/tabs.d.ts.map +1 -0
- package/dist/react/react/components/tag.d.ts +10 -0
- package/dist/react/react/components/tag.d.ts.map +1 -0
- package/dist/react/react/components/textarea.d.ts +11 -0
- package/dist/react/react/components/textarea.d.ts.map +1 -0
- package/dist/react/react/components/toast.d.ts +28 -0
- package/dist/react/react/components/toast.d.ts.map +1 -0
- package/dist/react/react/components/tooltip.d.ts +16 -0
- package/dist/react/react/components/tooltip.d.ts.map +1 -0
- package/dist/react/react/components/visually-hidden.d.ts +7 -0
- package/dist/react/react/components/visually-hidden.d.ts.map +1 -0
- package/dist/react/react/hooks/index.d.ts +5 -0
- package/dist/react/react/hooks/index.d.ts.map +1 -0
- package/dist/react/react/hooks/use-theme.d.ts +17 -0
- package/dist/react/react/hooks/use-theme.d.ts.map +1 -0
- package/dist/react/react/index.d.ts +30 -0
- package/dist/react/react/index.d.ts.map +1 -1
- package/dist/styles.css +1579 -2
- 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
|
+
};
|