@rark-ui/themes 1.1.0 → 1.2.1
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/dist/.tsbuildinfo +1 -0
- package/dist/default/crafts/message.js +1 -1
- package/dist/default/crafts/toast.js +1 -1
- package/dist/razer/index.css +4 -4
- package/package.json +10 -8
- package/src/default/crafts/badge.ts +56 -0
- package/src/default/crafts/button.ts +68 -0
- package/src/default/crafts/checkbox.ts +75 -0
- package/src/default/crafts/collapsible.ts +61 -0
- package/src/default/crafts/date-picker.ts +261 -0
- package/src/default/crafts/dialog.ts +103 -0
- package/src/default/crafts/editable.ts +108 -0
- package/src/default/crafts/floating-panel.ts +71 -0
- package/src/default/crafts/hotkey.ts +24 -0
- package/src/default/crafts/hover-card.ts +83 -0
- package/src/default/crafts/icon.ts +15 -0
- package/src/default/crafts/index.ts +62 -0
- package/src/default/crafts/input.ts +50 -0
- package/src/default/crafts/menu.ts +118 -0
- package/src/default/crafts/message.ts +66 -0
- package/src/default/crafts/number-input.ts +51 -0
- package/src/default/crafts/pagination.ts +120 -0
- package/src/default/crafts/popover.ts +74 -0
- package/src/default/crafts/progress.ts +131 -0
- package/src/default/crafts/radio-group.ts +100 -0
- package/src/default/crafts/rating-group.ts +46 -0
- package/src/default/crafts/scroll-area.ts +116 -0
- package/src/default/crafts/select.ts +122 -0
- package/src/default/crafts/skeleton.ts +23 -0
- package/src/default/crafts/slider.ts +93 -0
- package/src/default/crafts/spin.ts +64 -0
- package/src/default/crafts/switch.ts +71 -0
- package/src/default/crafts/tabs.ts +122 -0
- package/src/default/crafts/tags-input.ts +81 -0
- package/src/default/crafts/toast.ts +70 -0
- package/src/default/crafts/toggle-group.ts +57 -0
- package/src/default/crafts/toggle.ts +34 -0
- package/src/default/crafts/tooltip.ts +63 -0
- package/src/default/crafts/tree.ts +165 -0
- package/src/default/index.css +3 -0
- package/src/default/index.ts +4 -0
- package/src/default/tailwind.config.ts +9 -0
- package/src/razer/components/arrow.css +20 -0
- package/src/razer/components/badge.css +13 -0
- package/src/razer/components/button.css +40 -0
- package/src/razer/components/checkbox.css +39 -0
- package/src/razer/components/collapsible.css +16 -0
- package/src/razer/components/date-picker.css +46 -0
- package/src/razer/components/dialog.css +29 -0
- package/src/razer/components/editable.css +27 -0
- package/src/razer/components/floating-panel.css +11 -0
- package/src/razer/components/hotkey.css +5 -0
- package/src/razer/components/hover-card.css +14 -0
- package/src/razer/components/input.css +29 -0
- package/src/razer/components/menu.css +47 -0
- package/src/razer/components/message.css +41 -0
- package/src/razer/components/number-input.css +9 -0
- package/src/razer/components/pagination.css +14 -0
- package/src/razer/components/popover.css +19 -0
- package/src/razer/components/progress.css +78 -0
- package/src/razer/components/radio-group.css +44 -0
- package/src/razer/components/rating-group.css +26 -0
- package/src/razer/components/scroll-area.css +14 -0
- package/src/razer/components/select.css +31 -0
- package/src/razer/components/skeleton.css +11 -0
- package/src/razer/components/slider.css +27 -0
- package/src/razer/components/spin.css +15 -0
- package/src/razer/components/switch.css +24 -0
- package/src/razer/components/tabs.css +11 -0
- package/src/razer/components/tags-input.css +16 -0
- package/src/razer/components/toast.css +41 -0
- package/src/razer/components/toggle-group.css +19 -0
- package/src/razer/components/toggle.css +17 -0
- package/src/razer/components/tooltip.css +16 -0
- package/src/razer/components/tree.css +19 -0
- package/src/razer/components/virtual.css +17 -0
- package/src/razer/components.css +33 -0
- package/src/razer/crafts/index.ts +16 -0
- package/src/razer/index.css +6 -0
- package/src/razer/index.ts +4 -0
- package/src/razer/preset.css +261 -0
- package/src/razer/tailwind.config.ts +10 -0
- package/src/shared/css/animation-easing.css +21 -0
- package/src/shared/css/animations.css +252 -0
- package/src/shared/css/index.css +2 -0
- package/src/shared/css/static.css +31 -0
- package/src/shared/utils/cn.ts +1 -0
- package/src/shared/utils/tv.ts +91 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
@import '../shared/css/index.css';
|
|
2
|
+
|
|
3
|
+
@custom-variant skin-razer (&:where(html[data-theme-skin=razer], html[data-theme-skin=razer] *));
|
|
4
|
+
|
|
5
|
+
@custom-variant surface-dark (&:where([data-theme-surface=dark], [data-theme-surface=dark] *));
|
|
6
|
+
@custom-variant surface-light (&:where([data-theme-surface=light], [data-theme-surface=light] *));
|
|
7
|
+
@custom-variant surface-razer (&:where([data-theme-surface=razer], [data-theme-surface=razer] *));
|
|
8
|
+
|
|
9
|
+
@custom-variant success (&:where([data-type=success], [data-type=success] *));
|
|
10
|
+
@custom-variant error (&:where([data-type=error], [data-type=error] *));
|
|
11
|
+
@custom-variant warning (&:where([data-type=warning], [data-type=warning] *));
|
|
12
|
+
@custom-variant info (&:where([data-type=info], [data-type=info] *));
|
|
13
|
+
@custom-variant loading (&:where([data-type=loading], [data-type=loading] *));
|
|
14
|
+
@custom-variant arrow-css (&:where([data-arrow-type="css"]));
|
|
15
|
+
@custom-variant arrow-svg (&:where([data-arrow-type="svg"]));
|
|
16
|
+
|
|
17
|
+
@theme {
|
|
18
|
+
/* Spacing */
|
|
19
|
+
--spacing: 0.25rem;
|
|
20
|
+
|
|
21
|
+
/* Breakpoints */
|
|
22
|
+
--break-point-sm: 1024px;
|
|
23
|
+
--break-point-md: 1440px;
|
|
24
|
+
--break-point-lg: 1920px;
|
|
25
|
+
--break-point-xl: 2560px;
|
|
26
|
+
--break-point-2xl: 3840px;
|
|
27
|
+
|
|
28
|
+
/* Colors */
|
|
29
|
+
--color-*: initial;
|
|
30
|
+
--color-tw-ring-color: transparent;
|
|
31
|
+
--color-rz-green: oklch(76.87% 0.2343 141.32);
|
|
32
|
+
--color-rz-green-dark: oklch(47.48% 0.2343 141.32);
|
|
33
|
+
--color-rz-green-dark-hover: oklch(59.25% 0.2343 141.32);
|
|
34
|
+
--color-rz-green-dark-active: oklch(33.16% 0.2343 141.32);
|
|
35
|
+
--color-rz-green-light: oklch(82.23% 0.2343 141.32);
|
|
36
|
+
--color-rz-green-border: oklch(45.35% 0.2343 141.32);
|
|
37
|
+
--color-rz-green-border-hover: oklch(70.57% 0.2343 141.32);
|
|
38
|
+
--color-rz-green-border-active: oklch(45.88% 0.2343 141.32);
|
|
39
|
+
|
|
40
|
+
--color-rz-orange: oklch(80.16% 0.1705 73.27);
|
|
41
|
+
--color-rz-red: oklch(62.32% 0.2121 25.89);
|
|
42
|
+
--color-rz-blue: oklch(69% 0.1282 229.93);
|
|
43
|
+
|
|
44
|
+
--color-black: oklch(0% 0 0);
|
|
45
|
+
--color-h00: oklch(0% 0 0);
|
|
46
|
+
--color-white: oklch(100% 0 0);
|
|
47
|
+
--color-hff: oklch(100% 0 0);
|
|
48
|
+
--color-h70: oklch(54.52% 0 0);
|
|
49
|
+
--color-h4f: oklch(42.76% 0 0);
|
|
50
|
+
--color-h9b: oklch(68.95% 0 0);
|
|
51
|
+
--color-h83: oklch(61% 0 0);
|
|
52
|
+
--color-h37: oklch(33.68% 0 0);
|
|
53
|
+
--color-hcc: oklch(84.52% 0 0);
|
|
54
|
+
--color-hbb: oklch(79.21% 0 0);
|
|
55
|
+
--color-h33: oklch(32.11% 0 0);
|
|
56
|
+
--color-h24: oklch(26.03% 0 0);
|
|
57
|
+
--color-h8f: oklch(65% 0 0);
|
|
58
|
+
--color-h1a: oklch(21.78% 0 0);
|
|
59
|
+
--color-ha7: oklch(72.84% 0 0);
|
|
60
|
+
--color-h5e: oklch(48.19% 0 0);
|
|
61
|
+
--color-h4c: oklch(41.65% 0 0);
|
|
62
|
+
--color-h55: oklch(44.95% 0 0);
|
|
63
|
+
--color-h54: oklch(44.59% 0 0);
|
|
64
|
+
--color-h66: oklch(51.03% 0 0);
|
|
65
|
+
--color-h58: oklch(46.04% 0 0);
|
|
66
|
+
--color-h28: oklch(27.68% 0 0);
|
|
67
|
+
--color-h78: oklch(57.27% 0 0);
|
|
68
|
+
--color-h88: oklch(62.68% 0 0);
|
|
69
|
+
--color-hee: oklch(94.91% 0 0);
|
|
70
|
+
--color-h44: oklch(38.67% 0 0);
|
|
71
|
+
--color-h22: oklch(25.2% 0 0);
|
|
72
|
+
--color-h16: oklch(20.02% 0 0);
|
|
73
|
+
--color-h11: oklch(15.26% 0 0);
|
|
74
|
+
--color-h2a: oklch(22.22% 0 0);
|
|
75
|
+
--color-h1d: oklch(19.61% 0 0);
|
|
76
|
+
--color-h47: oklch(40.64% 0 0);
|
|
77
|
+
--color-h90: oklch(65.34% 0 0);
|
|
78
|
+
|
|
79
|
+
/* Text */
|
|
80
|
+
--text-3xs: 0.5rem;
|
|
81
|
+
--text-3xs--line-height: 1.25;
|
|
82
|
+
--text-2xs: 0.625rem;
|
|
83
|
+
--text-2xs--line-height: 1.25;
|
|
84
|
+
--text-xs: 0.75rem;
|
|
85
|
+
--text-xs--line-height: 1.25;
|
|
86
|
+
--text-sm: 0.875rem;
|
|
87
|
+
--text-sm--line-height: 1.25;
|
|
88
|
+
--text-base: 1rem;
|
|
89
|
+
--text-base--line-height: 1.25;
|
|
90
|
+
--text-lg: 1.125rem;
|
|
91
|
+
--text-lg--line-height: 1.25;
|
|
92
|
+
--text-xl: 1.25rem;
|
|
93
|
+
--text-xl--line-height: 1.25;
|
|
94
|
+
--text-2xl: 1.5rem;
|
|
95
|
+
--text-2xl--line-height: 1.25;
|
|
96
|
+
--text-3xl: 2rem;
|
|
97
|
+
--text-3xl--line-height: 1.25;
|
|
98
|
+
|
|
99
|
+
/* Shadows */
|
|
100
|
+
--shadow-glory: 0 0 1.5625rem 0 oklch(86.64% 0.2343 141.32 / 47%);
|
|
101
|
+
--shadow-black: 0 0 0.625rem 0 oklch(0% 0 0 / 80%);
|
|
102
|
+
--shadow-black-md: 0 0 0.9375rem 0 oklch(0% 0 0 / 80%);
|
|
103
|
+
|
|
104
|
+
/* Fonts */
|
|
105
|
+
--font-rob: Roboto, var(--font-sans);
|
|
106
|
+
--font-rob-regular: Roboto-Regular, var(--font-sans);
|
|
107
|
+
--font-rob-medium: Roboto-Medium, var(--font-sans);
|
|
108
|
+
--font-rob-bold: Roboto-Bold, var(--font-sans);
|
|
109
|
+
--font-rob-black: Roboto-Black, var(--font-sans);
|
|
110
|
+
--font-rz: RazerF5, var(--font-sans);
|
|
111
|
+
--font-rz-light: RazerF5-Light, var(--font-sans);
|
|
112
|
+
--font-rz-medium: RazerF5-Medium, var(--font-sans);
|
|
113
|
+
--font-rz-bold: RazerF5-Bold, var(--font-sans);
|
|
114
|
+
--font-rz-black: RazerF5-Black, var(--font-sans);
|
|
115
|
+
|
|
116
|
+
/* Border Radius */
|
|
117
|
+
--radius: 0.125rem; /* 2px */
|
|
118
|
+
--radius-md: calc(var(--radius) + 0.125rem); /* 4px */
|
|
119
|
+
--radius-lg: calc(var(--radius) + 0.25rem); /* 6px */
|
|
120
|
+
|
|
121
|
+
/* Other */
|
|
122
|
+
--outline: 2px solid var(--color-rz-green);
|
|
123
|
+
--disabled-opacity: var(--opacity-50, 0.5);
|
|
124
|
+
|
|
125
|
+
/* RUI Theme*/
|
|
126
|
+
--color-rui-parimary: var(--color-rz-green);
|
|
127
|
+
--color-rui-parimary-hover: var(--color-rz-green-dark-hover);
|
|
128
|
+
--color-rui-parimary-active: var(--color-rz-green-dark-active);
|
|
129
|
+
|
|
130
|
+
--color-rui-border: var(--color-h54);
|
|
131
|
+
|
|
132
|
+
--color-rui-toggle-text: var(--color-h88);
|
|
133
|
+
--color-rui-toggle-text-hover: var(--color-hff);
|
|
134
|
+
--color-rui-toggle-text-active: var(--color-hff);
|
|
135
|
+
|
|
136
|
+
--color-rui-success: var(--color-rz-green);
|
|
137
|
+
--color-rui-error: var(--color-rz-red);
|
|
138
|
+
--color-rui-info: var(--color-h88);
|
|
139
|
+
--color-rui-warning: var(--color-rz-orange);
|
|
140
|
+
|
|
141
|
+
--color-rui-close: var(--color-h88);
|
|
142
|
+
--color-rui-close-hover: var(--color-hff);
|
|
143
|
+
|
|
144
|
+
--color-rui-separator: var(--color-h00);
|
|
145
|
+
|
|
146
|
+
--font-rui-label: var(--font-rob-bold);
|
|
147
|
+
|
|
148
|
+
--shadow-rui-popper: 0 0.25rem 0.375rem 0 oklch(0% 0 0 / 80%);
|
|
149
|
+
--shadow-rui-popper-top: 0 -0.25rem 0.375rem 0 oklch(0% 0 0 / 80%);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@theme inline {
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@theme static {
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@layer base {
|
|
159
|
+
*,
|
|
160
|
+
::after,
|
|
161
|
+
::before,
|
|
162
|
+
::backdrop,
|
|
163
|
+
::file-selector-button {
|
|
164
|
+
border-color: var(--color-gray-200, currentColor);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:root {
|
|
168
|
+
font-family: var(--font-roboto, --font-sans);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
*:focus-visible {
|
|
172
|
+
outline: var(--outline);
|
|
173
|
+
outline-offset: 2px;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@utility flex-c {
|
|
178
|
+
@apply flex justify-center items-center;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@utility flex-ac {
|
|
182
|
+
@apply flex justify-around items-center;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@utility flex-bc {
|
|
186
|
+
@apply flex justify-between items-center;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@utility flex-col-c {
|
|
190
|
+
@apply flex flex-col justify-center items-center;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@utility flex-col-ac {
|
|
194
|
+
@apply flex flex-col justify-center items-center;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@utility flex-col-bc {
|
|
198
|
+
@apply flex flex-col justify-between items-center;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@utility hide-scrollbar {
|
|
202
|
+
&::-webkit-scrollbar {
|
|
203
|
+
display: none;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@utility webkit-scrollbar {
|
|
208
|
+
::-webkit-scrollbar {
|
|
209
|
+
@apply size-[6px];
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
::-webkit-scrollbar-track-piece {
|
|
213
|
+
@apply bg-transparent rounded-[6px];
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
::-webkit-scrollbar-thumb {
|
|
217
|
+
@apply h-[30px] bg-h58/40 rounded-[6px] hover:bg-rz-green active:bg-rz-green/70 focus:bg-rz-green/70;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@utility webkit-scrollbar-self {
|
|
222
|
+
&::-webkit-scrollbar {
|
|
223
|
+
@apply size-[6px];
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&::-webkit-scrollbar-track-piece {
|
|
227
|
+
@apply bg-transparent rounded-[6px];
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&::-webkit-scrollbar-thumb {
|
|
231
|
+
@apply h-[30px] bg-h58/40 rounded-[6px] hover:bg-rz-green active:bg-rz-green/70 focus:bg-rz-green/70;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@utility webkit-small-scrollbar {
|
|
236
|
+
::-webkit-scrollbar {
|
|
237
|
+
@apply size-[3px];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
::-webkit-scrollbar-track-piece {
|
|
241
|
+
@apply bg-transparent rounded-[1px];
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
::-webkit-scrollbar-thumb {
|
|
245
|
+
@apply h-[5px] bg-h58/40 rounded-[1px] hover:bg-rz-green active:bg-rz-green/70 focus:bg-rz-green/70;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@utility webkit-small-scrollbar-self {
|
|
250
|
+
&::-webkit-scrollbar {
|
|
251
|
+
@apply size-[3px];
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&::-webkit-scrollbar-track-piece {
|
|
255
|
+
@apply bg-transparent rounded-[1px];
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&::-webkit-scrollbar-thumb {
|
|
259
|
+
@apply h-[5px] bg-h58/40 rounded-[1px] hover:bg-rz-green active:bg-rz-green/70 focus:bg-rz-green/70;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@theme {
|
|
2
|
+
/* tw default duration */
|
|
3
|
+
--tw-duration: var(--motion-duration);
|
|
4
|
+
--default-transition-duration: var(--motion-duration);
|
|
5
|
+
--transition-duration: var(--motion-duration);
|
|
6
|
+
--tw-timing: var(--motion-timing);
|
|
7
|
+
--default-transition-timing-function: var(--motion-timing);
|
|
8
|
+
--transition-timing-function: var(--motion-timing);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@property --motion-duration {
|
|
12
|
+
syntax: '<time>';
|
|
13
|
+
inherits: false;
|
|
14
|
+
initial-value: 200ms;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@property --motion-timing {
|
|
18
|
+
syntax: '*';
|
|
19
|
+
inherits: false;
|
|
20
|
+
initial-value: cubic-bezier(0, 0, 0.2, 1);
|
|
21
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
@import './animation-easing.css';
|
|
2
|
+
|
|
3
|
+
@plugin 'tailwindcss-motion';
|
|
4
|
+
|
|
5
|
+
@theme {
|
|
6
|
+
--animate-accordion-down: accordion-down var(--tw-duration, 200ms)
|
|
7
|
+
var(--tw-timing, ease-out);
|
|
8
|
+
--animate-accordion-up: accordion-up var(--tw-duration, 200ms)
|
|
9
|
+
var(--tw-timing, ease-out);
|
|
10
|
+
--animate-collapsible-down: collapsible-down var(--tw-duration, 200ms)
|
|
11
|
+
var(--tw-timing, ease-in-out);
|
|
12
|
+
--animate-collapsible-up: collapsible-up var(--tw-duration, 200ms)
|
|
13
|
+
var(--tw-timing, ease-in-out);
|
|
14
|
+
--animate-quick-squeeze-x: squeeze-x var(--tw-duration, 200ms)
|
|
15
|
+
var(--tw-timing, ease-in-out);
|
|
16
|
+
--animate-rippling: rippling var(--tw-ripple-duration, 600ms) ease-out;
|
|
17
|
+
--animate-spin: spin 1s linear infinite;
|
|
18
|
+
--animate-fade-scale-in: fade-scale-in var(--tw-duration, 200ms)
|
|
19
|
+
var(--tw-timing, ease-out);
|
|
20
|
+
--animate-fade-scale-out: fade-scale-out var(--tw-duration, 200ms)
|
|
21
|
+
var(--tw-timing, ease-out);
|
|
22
|
+
--animate-backdrop-blur-in: backdrop-blur-in var(--tw-duration, 200ms)
|
|
23
|
+
var(--tw-timing, ease-out) forwards;
|
|
24
|
+
--animate-backdrop-blur-out: backdrop-blur-out var(--tw-duration, 200ms)
|
|
25
|
+
var(--tw-timing, ease-out) forwards;
|
|
26
|
+
|
|
27
|
+
/* toast exit animations */
|
|
28
|
+
--animate-toast-exit-right: toast-exit-right var(--tw-duration, 200ms)
|
|
29
|
+
var(--tw-timing, ease-out);
|
|
30
|
+
--animate-toast-exit-left: toast-exit-left var(--tw-duration, 200ms)
|
|
31
|
+
var(--tw-timing, ease-out);
|
|
32
|
+
--animate-toast-exit-top: toast-exit-top var(--tw-duration, 200ms)
|
|
33
|
+
var(--tw-timing, ease-out);
|
|
34
|
+
--animate-toast-exit-bottom: toast-exit-bottom var(--tw-duration, 200ms)
|
|
35
|
+
var(--tw-timing, ease-out);
|
|
36
|
+
|
|
37
|
+
/* Keyframes */
|
|
38
|
+
@keyframes accordion-down {
|
|
39
|
+
from {
|
|
40
|
+
height: 0px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
to {
|
|
44
|
+
height: var(--reka-accordion-content-height, 0px);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes accordion-up {
|
|
49
|
+
from {
|
|
50
|
+
height: var(--reka-accordion-content-height, 0px);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
to {
|
|
54
|
+
height: 0px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes collapsible-down {
|
|
59
|
+
from {
|
|
60
|
+
height: var(--collapsed-height, 0px);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
to {
|
|
64
|
+
height: var(--height, 0px);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@keyframes collapsible-up {
|
|
69
|
+
from {
|
|
70
|
+
height: var(--height, 0px);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
to {
|
|
74
|
+
height: var(--collapsed-height, 0px);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@keyframes squeeze-x {
|
|
79
|
+
from {
|
|
80
|
+
transform: scaleX(1);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
50% {
|
|
84
|
+
transform: scaleX(1.15);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
to {
|
|
88
|
+
transform: scaleX(1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes path-dash {
|
|
93
|
+
from {
|
|
94
|
+
stroke-dashoffset: var(--dash-offset-from, 0);
|
|
95
|
+
}
|
|
96
|
+
to {
|
|
97
|
+
stroke-dashoffset: var(--dash-offset-to, 0);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@keyframes fade-down-out {
|
|
102
|
+
from {
|
|
103
|
+
opacity: 1;
|
|
104
|
+
transform: translateY(0);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
to {
|
|
108
|
+
opacity: 0;
|
|
109
|
+
transform: translateY(-2rem);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@keyframes blur-in {
|
|
114
|
+
from {
|
|
115
|
+
filter: blur(1rem);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
to {
|
|
119
|
+
filter: blur(0);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@keyframes rippling {
|
|
124
|
+
0% {
|
|
125
|
+
opacity: 1;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
100% {
|
|
129
|
+
transform: scale(2);
|
|
130
|
+
opacity: 0;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@keyframes toast-exit-right {
|
|
135
|
+
from {
|
|
136
|
+
opacity: 1;
|
|
137
|
+
transform: translate3d(var(--reka-toast-swipe-end-x, 0), 0, 0);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
to {
|
|
141
|
+
opacity: 0;
|
|
142
|
+
transform: translate3d(calc(100% + 24px), 0, 0);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@keyframes toast-exit-left {
|
|
147
|
+
from {
|
|
148
|
+
opacity: 1;
|
|
149
|
+
transform: translate3d(var(--reka-toast-swipe-end-x, 0), 0, 0);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
to {
|
|
153
|
+
opacity: 0;
|
|
154
|
+
transform: translate3d(calc(-100% - 24px), 0, 0);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@keyframes toast-exit-top {
|
|
159
|
+
from {
|
|
160
|
+
opacity: 1;
|
|
161
|
+
transform: translate3d(0, var(--reka-toast-swipe-end-y, 0), 0);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
to {
|
|
165
|
+
opacity: 0;
|
|
166
|
+
transform: translate3d(0, calc(-100% - 24px), 0);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@keyframes toast-exit-bottom {
|
|
171
|
+
from {
|
|
172
|
+
opacity: 1;
|
|
173
|
+
transform: translate3d(0, var(--reka-toast-swipe-end-y, 0), 0);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
to {
|
|
177
|
+
opacity: 0;
|
|
178
|
+
transform: translate3d(0, calc(100% + 24px), 0);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@keyframes skeleton-wave {
|
|
183
|
+
to {
|
|
184
|
+
background-position-x: -200%;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@keyframes spin {
|
|
189
|
+
from {
|
|
190
|
+
transform: rotate(0deg);
|
|
191
|
+
}
|
|
192
|
+
to {
|
|
193
|
+
transform: rotate(360deg);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@keyframes fade-scale-in {
|
|
198
|
+
from {
|
|
199
|
+
opacity: 0;
|
|
200
|
+
transform: scale(0.95);
|
|
201
|
+
}
|
|
202
|
+
to {
|
|
203
|
+
opacity: 1;
|
|
204
|
+
transform: scale(1);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@keyframes fade-scale-out {
|
|
209
|
+
from {
|
|
210
|
+
opacity: 1;
|
|
211
|
+
transform: scale(1);
|
|
212
|
+
}
|
|
213
|
+
to {
|
|
214
|
+
opacity: 0;
|
|
215
|
+
transform: scale(0.9);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@keyframes backdrop-blur-in {
|
|
220
|
+
from {
|
|
221
|
+
backdrop-filter: blur(0);
|
|
222
|
+
}
|
|
223
|
+
to {
|
|
224
|
+
backdrop-filter: blur(.3125rem);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
@keyframes backdrop-blur-out {
|
|
228
|
+
from {
|
|
229
|
+
backdrop-filter: blur(.3125rem);
|
|
230
|
+
}
|
|
231
|
+
to {
|
|
232
|
+
backdrop-filter: blur(0);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@utility animate-check-dash {
|
|
238
|
+
--dash-offset-from: -50;
|
|
239
|
+
--dash-offset-to: 0;
|
|
240
|
+
stroke-dasharray: 50;
|
|
241
|
+
stroke-dashoffset: var(--dash-offset-from);
|
|
242
|
+
animation: path-dash var(--tw-duration, 150ms) var(--tw-timing, ease-out)
|
|
243
|
+
forwards;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
@utility animate-indeterminate-dash {
|
|
247
|
+
--dash-offset-from: 50;
|
|
248
|
+
--dash-offset-to: 0;
|
|
249
|
+
stroke-dasharray: 50;
|
|
250
|
+
stroke-dashoffset: var(--dash-offset-from);
|
|
251
|
+
animation: path-dash var(--tw-duration, 150ms) linear forwards;
|
|
252
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@theme static {
|
|
2
|
+
/* z-indexes */
|
|
3
|
+
--z-base: 0;
|
|
4
|
+
--z-sticky: 10;
|
|
5
|
+
--z-dropdown: 50;
|
|
6
|
+
--z-tooltip: 100;
|
|
7
|
+
--z-fixed: 200;
|
|
8
|
+
--z-overlay: 900;
|
|
9
|
+
--z-modal: 1000;
|
|
10
|
+
--z-popover: 1100;
|
|
11
|
+
--z-toast: 1500;
|
|
12
|
+
--z-loading: 2000;
|
|
13
|
+
--z-devtools: 9999;
|
|
14
|
+
--z-max: 2147483647;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@utility overflow-anchor-none {
|
|
18
|
+
overflow-anchor: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@utility overflow-anchor-auto {
|
|
22
|
+
overflow-anchor: auto;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@utility scrollbar-none {
|
|
26
|
+
scrollbar-width: none; /* Firefox */
|
|
27
|
+
&::-webkit-scrollbar {
|
|
28
|
+
display: none; /* Chrome / Safari */
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { cn, cnMerge, cx } from 'tailwind-variants'
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ClassValue,
|
|
3
|
+
TVCompoundSlots,
|
|
4
|
+
TVCompoundVariants,
|
|
5
|
+
TVDefaultVariants,
|
|
6
|
+
TVReturnType,
|
|
7
|
+
TVVariants,
|
|
8
|
+
} from 'tailwind-variants'
|
|
9
|
+
import { tv as originTv } from 'tailwind-variants'
|
|
10
|
+
|
|
11
|
+
type TVSlots = Record<string, ClassValue> | undefined
|
|
12
|
+
export type { VariantProps } from 'tailwind-variants'
|
|
13
|
+
|
|
14
|
+
export function tv<
|
|
15
|
+
V extends TVVariants<S, B, EV>,
|
|
16
|
+
CV extends TVCompoundVariants<V, S, B, EV, ES>,
|
|
17
|
+
DV extends TVDefaultVariants<V, S, EV, ES>,
|
|
18
|
+
B extends ClassValue = undefined,
|
|
19
|
+
S extends TVSlots = undefined,
|
|
20
|
+
// @ts-expect-error error in tailwind-variants
|
|
21
|
+
E extends TVReturnType = TVReturnType<
|
|
22
|
+
V,
|
|
23
|
+
S,
|
|
24
|
+
B,
|
|
25
|
+
// @ts-expect-error error in tailwind-variants
|
|
26
|
+
EV extends undefined ? {} : EV,
|
|
27
|
+
// @ts-expect-error error in tailwind-variants
|
|
28
|
+
ES extends undefined ? {} : ES
|
|
29
|
+
>,
|
|
30
|
+
EV extends TVVariants<ES, B, E['variants'], ES> = E['variants'],
|
|
31
|
+
ES extends TVSlots = E['slots'] extends TVSlots ? E['slots'] : undefined,
|
|
32
|
+
>(
|
|
33
|
+
options: {
|
|
34
|
+
extend?: E
|
|
35
|
+
base?: B
|
|
36
|
+
slots?: S
|
|
37
|
+
variants?: V
|
|
38
|
+
compoundVariants?: CV
|
|
39
|
+
compoundSlots?: TVCompoundSlots<V & { unstyled: { true: ClassValue, false: ClassValue } }, S, B>
|
|
40
|
+
defaultVariants?: DV
|
|
41
|
+
},
|
|
42
|
+
ruiConfig?: {
|
|
43
|
+
class?: ClassValue
|
|
44
|
+
className?: ClassValue
|
|
45
|
+
slots?: Record<keyof S, ClassValue>
|
|
46
|
+
},
|
|
47
|
+
config?: any,
|
|
48
|
+
) {
|
|
49
|
+
type mergedV = V & { unstyled: { true: ClassValue, false: ClassValue } }
|
|
50
|
+
|
|
51
|
+
// fix: extend时, ruiConfig丢失
|
|
52
|
+
const _ruiConfig = ruiConfig ?? options.extend?._ruiConfig
|
|
53
|
+
const variants = {
|
|
54
|
+
...(options.variants ?? {}),
|
|
55
|
+
unstyled: {
|
|
56
|
+
true: '',
|
|
57
|
+
false: _ruiConfig?.class ?? _ruiConfig?.className ?? '',
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const unstyledCompoundSlots: any[] = []
|
|
62
|
+
for (const key in _ruiConfig?.slots) {
|
|
63
|
+
unstyledCompoundSlots.push({
|
|
64
|
+
slots: [key],
|
|
65
|
+
unstyled: false,
|
|
66
|
+
class: _ruiConfig?.slots[key],
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
options.variants = variants as V
|
|
70
|
+
options.defaultVariants = {
|
|
71
|
+
...(options.defaultVariants ?? {}),
|
|
72
|
+
unstyled: false,
|
|
73
|
+
} as unknown as DV
|
|
74
|
+
|
|
75
|
+
options.compoundSlots = (options.compoundSlots ?? []).concat(unstyledCompoundSlots)
|
|
76
|
+
|
|
77
|
+
const result: any = originTv(options as any, config)
|
|
78
|
+
result._ruiConfig = ruiConfig
|
|
79
|
+
return result as ReturnType<
|
|
80
|
+
typeof originTv<
|
|
81
|
+
mergedV,
|
|
82
|
+
TVCompoundVariants<mergedV, S, B, EV, ES>,
|
|
83
|
+
TVDefaultVariants<mergedV, S, EV, ES>,
|
|
84
|
+
B,
|
|
85
|
+
S,
|
|
86
|
+
E,
|
|
87
|
+
EV,
|
|
88
|
+
ES
|
|
89
|
+
>
|
|
90
|
+
>
|
|
91
|
+
}
|