@nphuonha/ui-kit 0.0.0-stage → 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/CONVENTIONS.md +38 -0
- package/LICENSE +21 -0
- package/README.md +136 -2
- package/dist/components/ui/_shared/icon-provider.d.ts +18 -0
- package/dist/components/ui/_shared/icon-provider.js +26 -0
- package/dist/components/ui/alert/alert-variants.d.ts +5 -0
- package/dist/components/ui/alert/alert-variants.js +13 -0
- package/dist/components/ui/alert/alert.d.ts +9 -0
- package/dist/components/ui/alert/alert.js +13 -0
- package/dist/components/ui/alert/index.d.ts +2 -0
- package/dist/components/ui/alert/index.js +2 -0
- package/dist/components/ui/badge/badge-variants.d.ts +5 -0
- package/dist/components/ui/badge/badge-variants.js +16 -0
- package/dist/components/ui/badge/badge.d.ts +6 -0
- package/dist/components/ui/badge/badge.js +6 -0
- package/dist/components/ui/badge/index.d.ts +2 -0
- package/dist/components/ui/badge/index.js +2 -0
- package/dist/components/ui/button/button-variants.d.ts +7 -0
- package/dist/components/ui/button/button-variants.js +29 -0
- package/dist/components/ui/button/button.d.ts +10 -0
- package/dist/components/ui/button/button.js +12 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.js +2 -0
- package/dist/components/ui/card/card.d.ts +7 -0
- package/dist/components/ui/card/card.js +20 -0
- package/dist/components/ui/card/index.d.ts +1 -0
- package/dist/components/ui/card/index.js +1 -0
- package/dist/components/ui/checkbox/checkbox.d.ts +8 -0
- package/dist/components/ui/checkbox/checkbox.js +18 -0
- package/dist/components/ui/checkbox/index.d.ts +1 -0
- package/dist/components/ui/checkbox/index.js +1 -0
- package/dist/components/ui/dialog/dialog.d.ts +15 -0
- package/dist/components/ui/dialog/dialog.js +10 -0
- package/dist/components/ui/dialog/index.d.ts +1 -0
- package/dist/components/ui/dialog/index.js +1 -0
- package/dist/components/ui/field/field.d.ts +11 -0
- package/dist/components/ui/field/field.js +22 -0
- package/dist/components/ui/field/index.d.ts +1 -0
- package/dist/components/ui/field/index.js +1 -0
- package/dist/components/ui/icon-button/icon-button.d.ts +7 -0
- package/dist/components/ui/icon-button/icon-button.js +7 -0
- package/dist/components/ui/icon-button/index.d.ts +1 -0
- package/dist/components/ui/icon-button/index.js +1 -0
- package/dist/components/ui/input/index.d.ts +1 -0
- package/dist/components/ui/input/index.js +1 -0
- package/dist/components/ui/input/input.d.ts +5 -0
- package/dist/components/ui/input/input.js +6 -0
- package/dist/components/ui/label/index.d.ts +1 -0
- package/dist/components/ui/label/index.js +1 -0
- package/dist/components/ui/label/label.d.ts +5 -0
- package/dist/components/ui/label/label.js +6 -0
- package/dist/components/ui/popover/index.d.ts +1 -0
- package/dist/components/ui/popover/index.js +1 -0
- package/dist/components/ui/popover/popover.d.ts +14 -0
- package/dist/components/ui/popover/popover.js +7 -0
- package/dist/components/ui/radio-group/index.d.ts +1 -0
- package/dist/components/ui/radio-group/index.js +1 -0
- package/dist/components/ui/radio-group/radio-group.d.ts +17 -0
- package/dist/components/ui/radio-group/radio-group.js +17 -0
- package/dist/components/ui/select/index.d.ts +1 -0
- package/dist/components/ui/select/index.js +1 -0
- package/dist/components/ui/select/select.d.ts +21 -0
- package/dist/components/ui/select/select.js +10 -0
- package/dist/components/ui/separator/index.d.ts +1 -0
- package/dist/components/ui/separator/index.js +1 -0
- package/dist/components/ui/separator/separator.d.ts +6 -0
- package/dist/components/ui/separator/separator.js +5 -0
- package/dist/components/ui/sheet/index.d.ts +1 -0
- package/dist/components/ui/sheet/index.js +1 -0
- package/dist/components/ui/sheet/sheet.d.ts +15 -0
- package/dist/components/ui/sheet/sheet.js +15 -0
- package/dist/components/ui/spinner/index.d.ts +1 -0
- package/dist/components/ui/spinner/index.js +1 -0
- package/dist/components/ui/spinner/spinner.d.ts +5 -0
- package/dist/components/ui/spinner/spinner.js +8 -0
- package/dist/components/ui/switch/index.d.ts +1 -0
- package/dist/components/ui/switch/index.js +1 -0
- package/dist/components/ui/switch/switch.d.ts +7 -0
- package/dist/components/ui/switch/switch.js +15 -0
- package/dist/components/ui/tabs/index.d.ts +1 -0
- package/dist/components/ui/tabs/index.js +1 -0
- package/dist/components/ui/tabs/tabs.d.ts +14 -0
- package/dist/components/ui/tabs/tabs.js +7 -0
- package/dist/components/ui/textarea/index.d.ts +1 -0
- package/dist/components/ui/textarea/index.js +1 -0
- package/dist/components/ui/textarea/textarea.d.ts +5 -0
- package/dist/components/ui/textarea/textarea.js +6 -0
- package/dist/components/ui/toast/index.d.ts +1 -0
- package/dist/components/ui/toast/index.js +1 -0
- package/dist/components/ui/toast/toast.d.ts +19 -0
- package/dist/components/ui/toast/toast.js +20 -0
- package/dist/components/ui/tooltip/index.d.ts +1 -0
- package/dist/components/ui/tooltip/index.js +1 -0
- package/dist/components/ui/tooltip/tooltip.d.ts +12 -0
- package/dist/components/ui/tooltip/tooltip.js +9 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +29 -0
- package/dist/lib/color.d.ts +16 -0
- package/dist/lib/color.js +118 -0
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.js +5 -0
- package/dist/styles/base.css +212 -0
- package/dist/styles/theme.css +121 -0
- package/dist/styles.css +5 -0
- package/package.json +184 -4
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Shared structural layer — solid, clean, flat, modern.
|
|
3
|
+
* Tokens are defined in theme.css.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "tailwindcss";
|
|
7
|
+
@import "tw-animate-css";
|
|
8
|
+
|
|
9
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
10
|
+
|
|
11
|
+
@theme {
|
|
12
|
+
/* Directional light: bright top edge, soft bottom shade. */
|
|
13
|
+
--light-top: color-mix(in srgb, #ffffff 75%, transparent);
|
|
14
|
+
--light-top-soft: color-mix(in srgb, #ffffff 40%, transparent);
|
|
15
|
+
--light-bottom: color-mix(in srgb, #000000 8%, transparent);
|
|
16
|
+
--light-sheen: color-mix(in srgb, #ffffff 55%, transparent);
|
|
17
|
+
--light-sheen-soft: color-mix(in srgb, #ffffff 22%, transparent);
|
|
18
|
+
--light-side: color-mix(in srgb, #ffffff 26%, transparent);
|
|
19
|
+
--light-rim: color-mix(in srgb, #ffffff 60%, transparent);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@theme inline {
|
|
23
|
+
--color-background: var(--background);
|
|
24
|
+
--color-foreground: var(--foreground);
|
|
25
|
+
--color-card: var(--card);
|
|
26
|
+
--color-card-foreground: var(--card-foreground);
|
|
27
|
+
--color-popover: var(--popover);
|
|
28
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
29
|
+
--color-primary: var(--primary);
|
|
30
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
31
|
+
--color-primary-hover: var(--primary-hover);
|
|
32
|
+
--color-primary-active: var(--primary-active);
|
|
33
|
+
--color-primary-soft: var(--primary-soft);
|
|
34
|
+
--color-primary-soft-foreground: var(--primary-soft-foreground);
|
|
35
|
+
--color-secondary: var(--secondary);
|
|
36
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
37
|
+
--color-muted: var(--muted);
|
|
38
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
39
|
+
--color-accent: var(--accent);
|
|
40
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
41
|
+
--color-destructive: var(--destructive);
|
|
42
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
43
|
+
--color-success: var(--success);
|
|
44
|
+
--color-success-foreground: var(--success-foreground);
|
|
45
|
+
--color-warning: var(--warning);
|
|
46
|
+
--color-warning-foreground: var(--warning-foreground);
|
|
47
|
+
--color-info: var(--info);
|
|
48
|
+
--color-info-foreground: var(--info-foreground);
|
|
49
|
+
--color-border: var(--border);
|
|
50
|
+
--color-input: var(--input);
|
|
51
|
+
--color-ring: var(--ring);
|
|
52
|
+
--color-surface: var(--surface);
|
|
53
|
+
--color-surface-hover: var(--surface-hover);
|
|
54
|
+
--color-field: var(--field);
|
|
55
|
+
--color-field-hover: var(--field-hover);
|
|
56
|
+
--color-field-foreground: var(--field-foreground);
|
|
57
|
+
--color-overlay: var(--overlay);
|
|
58
|
+
|
|
59
|
+
--radius-sm: calc(var(--radius-control) - 2px);
|
|
60
|
+
--radius-md: var(--radius-control);
|
|
61
|
+
--radius-lg: var(--radius-card);
|
|
62
|
+
--radius-xl: calc(var(--radius-card) + 4px);
|
|
63
|
+
--radius-control: 0.75rem;
|
|
64
|
+
--radius-card: 1.25rem;
|
|
65
|
+
--radius-overlay: 1.25rem;
|
|
66
|
+
--radius-field: 0.75rem;
|
|
67
|
+
--radius-pill: 9999px;
|
|
68
|
+
|
|
69
|
+
--font-sans: var(--font-body);
|
|
70
|
+
--font-mono: var(--font-mono-family);
|
|
71
|
+
|
|
72
|
+
--ease-out-ui: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
73
|
+
--duration-ui: 160ms;
|
|
74
|
+
--duration-ui-slow: 220ms;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@layer base {
|
|
78
|
+
* {
|
|
79
|
+
@apply border-border;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
html {
|
|
83
|
+
-webkit-text-size-adjust: 100%;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
body {
|
|
87
|
+
@apply bg-background text-foreground antialiased;
|
|
88
|
+
margin: 0;
|
|
89
|
+
font-family: var(--font-body);
|
|
90
|
+
font-feature-settings: "cv02", "cv03", "cv04", "cv11";
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
::selection {
|
|
94
|
+
background: color-mix(in srgb, var(--primary) 24%, transparent);
|
|
95
|
+
color: var(--foreground);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
a,
|
|
99
|
+
button {
|
|
100
|
+
-webkit-tap-highlight-color: transparent;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:focus-visible {
|
|
104
|
+
outline: 2px solid var(--ring);
|
|
105
|
+
outline-offset: 2px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (prefers-reduced-motion: reduce) {
|
|
110
|
+
*,
|
|
111
|
+
*::before,
|
|
112
|
+
*::after {
|
|
113
|
+
animation-duration: 0.01ms !important;
|
|
114
|
+
animation-iteration-count: 1 !important;
|
|
115
|
+
transition-duration: 0.01ms !important;
|
|
116
|
+
scroll-behavior: auto !important;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@utility scrollbar-none {
|
|
121
|
+
scrollbar-width: none;
|
|
122
|
+
-ms-overflow-style: none;
|
|
123
|
+
&::-webkit-scrollbar {
|
|
124
|
+
display: none;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Solid surface with a curved, top-lit look.
|
|
129
|
+
* The rim is strongest on the top edge (as if light grazes it), with a faint
|
|
130
|
+
* glass edge all around and a barely-there vertical gradient for convexity.
|
|
131
|
+
* Uses a pseudo-element so it never fights the element's outer shadow. */
|
|
132
|
+
@utility surface-curved {
|
|
133
|
+
background-image:
|
|
134
|
+
linear-gradient(
|
|
135
|
+
to bottom,
|
|
136
|
+
var(--light-sheen-soft) 0%,
|
|
137
|
+
transparent 28%,
|
|
138
|
+
transparent 72%,
|
|
139
|
+
var(--light-bottom) 100%
|
|
140
|
+
);
|
|
141
|
+
&::before {
|
|
142
|
+
content: "";
|
|
143
|
+
position: absolute;
|
|
144
|
+
inset: 0;
|
|
145
|
+
border-radius: inherit;
|
|
146
|
+
pointer-events: none;
|
|
147
|
+
box-shadow:
|
|
148
|
+
inset 0 1px 0 0 var(--light-top),
|
|
149
|
+
inset 0 0 0 1px color-mix(in srgb, #ffffff 8%, transparent),
|
|
150
|
+
inset 0 -1px 0 0 color-mix(in srgb, #000000 6%, transparent);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Softer variant for tonal fills (secondary buttons, tabs, alerts, tracks). */
|
|
155
|
+
@utility surface-curved-soft {
|
|
156
|
+
background-image: linear-gradient(
|
|
157
|
+
to bottom,
|
|
158
|
+
var(--light-sheen-soft) 0%,
|
|
159
|
+
transparent 36%,
|
|
160
|
+
transparent 100%
|
|
161
|
+
);
|
|
162
|
+
&::before {
|
|
163
|
+
content: "";
|
|
164
|
+
position: absolute;
|
|
165
|
+
inset: 0;
|
|
166
|
+
border-radius: inherit;
|
|
167
|
+
pointer-events: none;
|
|
168
|
+
box-shadow:
|
|
169
|
+
inset 0 1px 0 0 var(--light-top-soft),
|
|
170
|
+
inset 0 0 0 1px color-mix(in srgb, #ffffff 5%, transparent),
|
|
171
|
+
inset 0 -1px 0 0 color-mix(in srgb, #000000 4%, transparent);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Glassy pill edge highlight (switch thumb, segmented pills). */
|
|
176
|
+
@utility surface-curved-pill {
|
|
177
|
+
background-image: linear-gradient(
|
|
178
|
+
to bottom,
|
|
179
|
+
var(--light-sheen) 0%,
|
|
180
|
+
transparent 58%
|
|
181
|
+
);
|
|
182
|
+
&::before {
|
|
183
|
+
content: "";
|
|
184
|
+
position: absolute;
|
|
185
|
+
inset: 0;
|
|
186
|
+
border-radius: inherit;
|
|
187
|
+
pointer-events: none;
|
|
188
|
+
box-shadow:
|
|
189
|
+
inset 0 1px 0 0 var(--light-rim),
|
|
190
|
+
inset 0 0 0 1px color-mix(in srgb, #ffffff 12%, transparent),
|
|
191
|
+
inset 0 -1px 0 0 color-mix(in srgb, #000000 10%, transparent);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Inset version for native form controls (cannot use ::before). */
|
|
196
|
+
@utility surface-inset {
|
|
197
|
+
background-image: linear-gradient(
|
|
198
|
+
to bottom,
|
|
199
|
+
var(--light-sheen-soft) 0%,
|
|
200
|
+
transparent 38%,
|
|
201
|
+
transparent 100%
|
|
202
|
+
);
|
|
203
|
+
box-shadow:
|
|
204
|
+
inset 0 1px 0 0 var(--light-top-soft),
|
|
205
|
+
inset 0 0 0 1px color-mix(in srgb, #ffffff 5%, transparent),
|
|
206
|
+
inset 0 -1px 0 0 color-mix(in srgb, #000000 4%, transparent);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
@utility surface-flat {
|
|
210
|
+
background-image: none;
|
|
211
|
+
box-shadow: none;
|
|
212
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* Modern, borderless, solid-surface theme.
|
|
2
|
+
* Depth comes from tonal surface steps + soft shadows, not outlined boxes.
|
|
3
|
+
* Accent is customizable: override --primary* / --ring (see generateAccentVars in lib/color).
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
:root,
|
|
7
|
+
[data-ui="kit"] {
|
|
8
|
+
color-scheme: light;
|
|
9
|
+
|
|
10
|
+
/* Tonal surface ladder (solid fills) */
|
|
11
|
+
--background: #f3f4f8;
|
|
12
|
+
--foreground: #16181d;
|
|
13
|
+
--card: #ffffff;
|
|
14
|
+
--card-foreground: #16181d;
|
|
15
|
+
--popover: #ffffff;
|
|
16
|
+
--popover-foreground: #16181d;
|
|
17
|
+
--surface: #eceef4;
|
|
18
|
+
--surface-hover: #e2e5ee;
|
|
19
|
+
--field: #eceef4; /* borderless input/control fill */
|
|
20
|
+
--field-hover: #e5e8f0;
|
|
21
|
+
--field-foreground: #16181d;
|
|
22
|
+
--secondary: #eceef4;
|
|
23
|
+
--secondary-foreground: #16181d;
|
|
24
|
+
--muted: #eceef4;
|
|
25
|
+
--muted-foreground: #63697a;
|
|
26
|
+
--accent: #e8eaf6;
|
|
27
|
+
--accent-foreground: #1e2230;
|
|
28
|
+
|
|
29
|
+
/* Vibrant default accent (indigo). Override via generateAccentVars / --primary*. */
|
|
30
|
+
--primary: #4f46e5;
|
|
31
|
+
--primary-foreground: #ffffff;
|
|
32
|
+
--primary-hover: #4338ca;
|
|
33
|
+
--primary-active: #3730a3;
|
|
34
|
+
--primary-soft: #e8e9ff;
|
|
35
|
+
--primary-soft-foreground: #3730a3;
|
|
36
|
+
--ring: #4f46e5;
|
|
37
|
+
|
|
38
|
+
--destructive: #dc2626;
|
|
39
|
+
--destructive-foreground: #ffffff;
|
|
40
|
+
--success: #16a34a;
|
|
41
|
+
--success-foreground: #ffffff;
|
|
42
|
+
--warning: #d97706;
|
|
43
|
+
--warning-foreground: #ffffff;
|
|
44
|
+
--info: #0284c7;
|
|
45
|
+
--info-foreground: #ffffff;
|
|
46
|
+
|
|
47
|
+
/* Hairline only where a border is still necessary (rare) */
|
|
48
|
+
--border: #171a2110;
|
|
49
|
+
--input: #171a2110;
|
|
50
|
+
--overlay: rgb(12 14 20 / 0.5);
|
|
51
|
+
|
|
52
|
+
--radius-control: 0.75rem; /* 12px */
|
|
53
|
+
--radius-card: 1.25rem; /* 20px */
|
|
54
|
+
--radius-overlay: 1.25rem;
|
|
55
|
+
--radius-field: 0.75rem;
|
|
56
|
+
|
|
57
|
+
--shadow-overlay: 0 16px 48px -12px rgb(16 18 26 / 0.22), 0 4px 14px -4px rgb(16 18 26 / 0.1);
|
|
58
|
+
--shadow-raised: 0 2px 6px -2px rgb(16 18 26 / 0.12), 0 8px 24px -12px rgb(16 18 26 / 0.16);
|
|
59
|
+
--shadow-soft: 0 1px 2px rgb(16 18 26 / 0.04), 0 6px 20px -10px rgb(16 18 26 / 0.14);
|
|
60
|
+
|
|
61
|
+
--font-body: "Work Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
62
|
+
--font-mono-family: "Google Sans Code", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[data-ui="kit"].dark,
|
|
66
|
+
.dark [data-ui="kit"],
|
|
67
|
+
.dark:where([data-ui="kit"]) {
|
|
68
|
+
color-scheme: dark;
|
|
69
|
+
|
|
70
|
+
/* Light behaves differently on dark solids: cool rim, no milky wash. */
|
|
71
|
+
--light-top: color-mix(in srgb, #c7d2fe 26%, transparent);
|
|
72
|
+
--light-top-soft: color-mix(in srgb, #e2e8f0 16%, transparent);
|
|
73
|
+
--light-bottom: color-mix(in srgb, #000000 34%, transparent);
|
|
74
|
+
--light-sheen: color-mix(in srgb, #ffffff 9%, transparent);
|
|
75
|
+
--light-sheen-soft: color-mix(in srgb, #ffffff 4%, transparent);
|
|
76
|
+
--light-side: color-mix(in srgb, #ffffff 8%, transparent);
|
|
77
|
+
--light-rim: color-mix(in srgb, #ffffff 20%, transparent);
|
|
78
|
+
|
|
79
|
+
--background: #0d0f15;
|
|
80
|
+
--foreground: #f1f3f8;
|
|
81
|
+
--card: #171a22;
|
|
82
|
+
--card-foreground: #f1f3f8;
|
|
83
|
+
--popover: #1b1f29;
|
|
84
|
+
--popover-foreground: #f1f3f8;
|
|
85
|
+
--surface: #1c2029;
|
|
86
|
+
--surface-hover: #252a35;
|
|
87
|
+
--field: #1c2029;
|
|
88
|
+
--field-hover: #252a35;
|
|
89
|
+
--field-foreground: #f1f3f8;
|
|
90
|
+
--secondary: #1c2029;
|
|
91
|
+
--secondary-foreground: #f1f3f8;
|
|
92
|
+
--muted: #1c2029;
|
|
93
|
+
--muted-foreground: #9ba3b4;
|
|
94
|
+
--accent: #232840;
|
|
95
|
+
--accent-foreground: #f1f3f8;
|
|
96
|
+
|
|
97
|
+
--primary: #818cf8;
|
|
98
|
+
--primary-foreground: #111322;
|
|
99
|
+
--primary-hover: #a5b4fc;
|
|
100
|
+
--primary-active: #6366f1;
|
|
101
|
+
--primary-soft: #24244a;
|
|
102
|
+
--primary-soft-foreground: #c7d2fe;
|
|
103
|
+
--ring: #818cf8;
|
|
104
|
+
|
|
105
|
+
--destructive: #f87171;
|
|
106
|
+
--destructive-foreground: #160b0b;
|
|
107
|
+
--success: #4ade80;
|
|
108
|
+
--success-foreground: #06140b;
|
|
109
|
+
--warning: #fbbf24;
|
|
110
|
+
--warning-foreground: #171004;
|
|
111
|
+
--info: #38bdf8;
|
|
112
|
+
--info-foreground: #04141d;
|
|
113
|
+
|
|
114
|
+
--border: #ffffff14;
|
|
115
|
+
--input: #ffffff14;
|
|
116
|
+
--overlay: rgb(0 0 0 / 0.64);
|
|
117
|
+
|
|
118
|
+
--shadow-overlay: 0 20px 60px -12px rgb(0 0 0 / 0.6), 0 6px 20px -6px rgb(0 0 0 / 0.4);
|
|
119
|
+
--shadow-raised: 0 2px 8px -2px rgb(0 0 0 / 0.4), 0 10px 30px -12px rgb(0 0 0 / 0.5);
|
|
120
|
+
--shadow-soft: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -14px rgb(0 0 0 / 0.5);
|
|
121
|
+
}
|
package/dist/styles.css
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,186 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nphuonha/ui-kit",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Solid, clean, flat, modern React UI kit (Base UI + Tailwind v4).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "nphuonha",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"react",
|
|
10
|
+
"ui",
|
|
11
|
+
"components",
|
|
12
|
+
"design-system",
|
|
13
|
+
"base-ui",
|
|
14
|
+
"tailwindcss"
|
|
15
|
+
],
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"**/*.css"
|
|
21
|
+
],
|
|
22
|
+
"main": "./dist/index.js",
|
|
23
|
+
"module": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./alert": {
|
|
32
|
+
"types": "./dist/components/ui/alert/index.d.ts",
|
|
33
|
+
"import": "./dist/components/ui/alert/index.js",
|
|
34
|
+
"default": "./dist/components/ui/alert/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./badge": {
|
|
37
|
+
"types": "./dist/components/ui/badge/index.d.ts",
|
|
38
|
+
"import": "./dist/components/ui/badge/index.js",
|
|
39
|
+
"default": "./dist/components/ui/badge/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./button": {
|
|
42
|
+
"types": "./dist/components/ui/button/index.d.ts",
|
|
43
|
+
"import": "./dist/components/ui/button/index.js",
|
|
44
|
+
"default": "./dist/components/ui/button/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./card": {
|
|
47
|
+
"types": "./dist/components/ui/card/index.d.ts",
|
|
48
|
+
"import": "./dist/components/ui/card/index.js",
|
|
49
|
+
"default": "./dist/components/ui/card/index.js"
|
|
50
|
+
},
|
|
51
|
+
"./checkbox": {
|
|
52
|
+
"types": "./dist/components/ui/checkbox/index.d.ts",
|
|
53
|
+
"import": "./dist/components/ui/checkbox/index.js",
|
|
54
|
+
"default": "./dist/components/ui/checkbox/index.js"
|
|
55
|
+
},
|
|
56
|
+
"./dialog": {
|
|
57
|
+
"types": "./dist/components/ui/dialog/index.d.ts",
|
|
58
|
+
"import": "./dist/components/ui/dialog/index.js",
|
|
59
|
+
"default": "./dist/components/ui/dialog/index.js"
|
|
60
|
+
},
|
|
61
|
+
"./field": {
|
|
62
|
+
"types": "./dist/components/ui/field/index.d.ts",
|
|
63
|
+
"import": "./dist/components/ui/field/index.js",
|
|
64
|
+
"default": "./dist/components/ui/field/index.js"
|
|
65
|
+
},
|
|
66
|
+
"./icon-button": {
|
|
67
|
+
"types": "./dist/components/ui/icon-button/index.d.ts",
|
|
68
|
+
"import": "./dist/components/ui/icon-button/index.js",
|
|
69
|
+
"default": "./dist/components/ui/icon-button/index.js"
|
|
70
|
+
},
|
|
71
|
+
"./icons": {
|
|
72
|
+
"types": "./dist/components/ui/_shared/icon-provider.d.ts",
|
|
73
|
+
"import": "./dist/components/ui/_shared/icon-provider.js",
|
|
74
|
+
"default": "./dist/components/ui/_shared/icon-provider.js"
|
|
75
|
+
},
|
|
76
|
+
"./input": {
|
|
77
|
+
"types": "./dist/components/ui/input/index.d.ts",
|
|
78
|
+
"import": "./dist/components/ui/input/index.js",
|
|
79
|
+
"default": "./dist/components/ui/input/index.js"
|
|
80
|
+
},
|
|
81
|
+
"./label": {
|
|
82
|
+
"types": "./dist/components/ui/label/index.d.ts",
|
|
83
|
+
"import": "./dist/components/ui/label/index.js",
|
|
84
|
+
"default": "./dist/components/ui/label/index.js"
|
|
85
|
+
},
|
|
86
|
+
"./popover": {
|
|
87
|
+
"types": "./dist/components/ui/popover/index.d.ts",
|
|
88
|
+
"import": "./dist/components/ui/popover/index.js",
|
|
89
|
+
"default": "./dist/components/ui/popover/index.js"
|
|
90
|
+
},
|
|
91
|
+
"./radio-group": {
|
|
92
|
+
"types": "./dist/components/ui/radio-group/index.d.ts",
|
|
93
|
+
"import": "./dist/components/ui/radio-group/index.js",
|
|
94
|
+
"default": "./dist/components/ui/radio-group/index.js"
|
|
95
|
+
},
|
|
96
|
+
"./select": {
|
|
97
|
+
"types": "./dist/components/ui/select/index.d.ts",
|
|
98
|
+
"import": "./dist/components/ui/select/index.js",
|
|
99
|
+
"default": "./dist/components/ui/select/index.js"
|
|
100
|
+
},
|
|
101
|
+
"./separator": {
|
|
102
|
+
"types": "./dist/components/ui/separator/index.d.ts",
|
|
103
|
+
"import": "./dist/components/ui/separator/index.js",
|
|
104
|
+
"default": "./dist/components/ui/separator/index.js"
|
|
105
|
+
},
|
|
106
|
+
"./sheet": {
|
|
107
|
+
"types": "./dist/components/ui/sheet/index.d.ts",
|
|
108
|
+
"import": "./dist/components/ui/sheet/index.js",
|
|
109
|
+
"default": "./dist/components/ui/sheet/index.js"
|
|
110
|
+
},
|
|
111
|
+
"./spinner": {
|
|
112
|
+
"types": "./dist/components/ui/spinner/index.d.ts",
|
|
113
|
+
"import": "./dist/components/ui/spinner/index.js",
|
|
114
|
+
"default": "./dist/components/ui/spinner/index.js"
|
|
115
|
+
},
|
|
116
|
+
"./switch": {
|
|
117
|
+
"types": "./dist/components/ui/switch/index.d.ts",
|
|
118
|
+
"import": "./dist/components/ui/switch/index.js",
|
|
119
|
+
"default": "./dist/components/ui/switch/index.js"
|
|
120
|
+
},
|
|
121
|
+
"./tabs": {
|
|
122
|
+
"types": "./dist/components/ui/tabs/index.d.ts",
|
|
123
|
+
"import": "./dist/components/ui/tabs/index.js",
|
|
124
|
+
"default": "./dist/components/ui/tabs/index.js"
|
|
125
|
+
},
|
|
126
|
+
"./textarea": {
|
|
127
|
+
"types": "./dist/components/ui/textarea/index.d.ts",
|
|
128
|
+
"import": "./dist/components/ui/textarea/index.js",
|
|
129
|
+
"default": "./dist/components/ui/textarea/index.js"
|
|
130
|
+
},
|
|
131
|
+
"./toast": {
|
|
132
|
+
"types": "./dist/components/ui/toast/index.d.ts",
|
|
133
|
+
"import": "./dist/components/ui/toast/index.js",
|
|
134
|
+
"default": "./dist/components/ui/toast/index.js"
|
|
135
|
+
},
|
|
136
|
+
"./tooltip": {
|
|
137
|
+
"types": "./dist/components/ui/tooltip/index.d.ts",
|
|
138
|
+
"import": "./dist/components/ui/tooltip/index.js",
|
|
139
|
+
"default": "./dist/components/ui/tooltip/index.js"
|
|
140
|
+
},
|
|
141
|
+
"./styles.css": "./dist/styles.css",
|
|
142
|
+
"./base.css": "./dist/styles/base.css",
|
|
143
|
+
"./theme.css": "./dist/styles/theme.css",
|
|
144
|
+
"./package.json": "./package.json"
|
|
145
|
+
},
|
|
146
|
+
"files": [
|
|
147
|
+
"dist",
|
|
148
|
+
"README.md",
|
|
149
|
+
"CONVENTIONS.md",
|
|
150
|
+
"LICENSE"
|
|
151
|
+
],
|
|
152
|
+
"scripts": {
|
|
153
|
+
"build": "node scripts/build.mjs",
|
|
154
|
+
"typecheck": "tsc --noEmit",
|
|
155
|
+
"test": "vitest run",
|
|
156
|
+
"test:watch": "vitest",
|
|
157
|
+
"prepack": "npm run build",
|
|
158
|
+
"prepublishOnly": "npm run typecheck && npm run test"
|
|
159
|
+
},
|
|
160
|
+
"peerDependencies": {
|
|
161
|
+
"react": ">=19",
|
|
162
|
+
"react-dom": ">=19",
|
|
163
|
+
"tailwindcss": ">=4"
|
|
164
|
+
},
|
|
165
|
+
"dependencies": {
|
|
166
|
+
"@base-ui/react": "^1.9.0",
|
|
167
|
+
"@phosphor-icons/react": "^2.1.10",
|
|
168
|
+
"class-variance-authority": "^0.7.1",
|
|
169
|
+
"clsx": "^2.1.1",
|
|
170
|
+
"sonner": "^2.0.7",
|
|
171
|
+
"tailwind-merge": "^3.5.0",
|
|
172
|
+
"tw-animate-css": "^1.4.0"
|
|
173
|
+
},
|
|
174
|
+
"devDependencies": {
|
|
175
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
176
|
+
"@testing-library/react": "^16.3.3",
|
|
177
|
+
"@testing-library/user-event": "^14.6.8",
|
|
178
|
+
"@types/node": "^20",
|
|
179
|
+
"@types/react": "^19",
|
|
180
|
+
"@types/react-dom": "^19",
|
|
181
|
+
"@vitejs/plugin-react": "^6.2.1",
|
|
182
|
+
"jsdom": "^31.0.0",
|
|
183
|
+
"typescript": "^5",
|
|
184
|
+
"vitest": "^5.1.0"
|
|
185
|
+
}
|
|
186
|
+
}
|