raft-ui 0.0.8 → 0.0.10
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/CHANGELOG.md +39 -7
- package/dist/button-jUlaK4eN.mjs +722 -0
- package/dist/index-lPUAF7fl.d.mts +267 -0
- package/dist/index.d.mts +694 -325
- package/dist/index.mjs +981 -732
- package/dist/styles.css +120 -4
- package/dist/wip.d.mts +100 -16
- package/dist/wip.mjs +255 -32
- package/package.json +3 -2
- package/dist/tv-UUMwNowu.d.mts +0 -16
- package/dist/use-theme-Y_h1DKll.mjs +0 -34
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { cn } from "./cn.mjs";
|
|
2
|
-
import { a as tv, i as
|
|
2
|
+
import { a as useThemeFamily, c as tv, i as useTheme, n as buttonVariants, o as ThemeContext, r as Spinner, s as ThemeStateContext, t as Button } from "./button-jUlaK4eN.mjs";
|
|
3
3
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
4
4
|
import { AlertTriangle, Check, CheckCircle2, ChevronDown, Copy, Info, Minus, X } from "lucide-react";
|
|
5
|
-
import { createContext, use, useCallback, useContext, useEffect, useId, useMemo, useState, useSyncExternalStore } from "react";
|
|
6
|
-
import { Button as Button$1 } from "@base-ui/react/button";
|
|
5
|
+
import { cloneElement, createContext, isValidElement, use, useCallback, useContext, useEffect, useId, useMemo, useState, useSyncExternalStore } from "react";
|
|
7
6
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
8
7
|
import { useRender } from "@base-ui/react/use-render";
|
|
9
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { useClipboard } from "foxact/use-clipboard";
|
|
11
10
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
12
11
|
import { Avatar as Avatar$1, ContextMenu as ContextMenu$1 } from "@base-ui/react";
|
|
13
12
|
import { Menu } from "@base-ui/react/menu";
|
|
14
13
|
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
15
14
|
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
15
|
+
import { PreviewCard as PreviewCard$1 } from "@base-ui/react/preview-card";
|
|
16
16
|
import { Input as Input$1 } from "@base-ui/react/input";
|
|
17
17
|
import { Field as Field$1 } from "@base-ui/react/field";
|
|
18
18
|
import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
|
|
@@ -20,616 +20,25 @@ import { Select as Select$1 } from "@base-ui/react/select";
|
|
|
20
20
|
import { Radio } from "@base-ui/react/radio";
|
|
21
21
|
import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
22
22
|
import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
23
|
+
import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
24
|
+
import { Toast } from "@base-ui/react/toast";
|
|
23
25
|
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
24
26
|
import { DndContext, PointerSensor, TouchSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
|
|
25
27
|
import { SortableContext, arrayMove, horizontalListSortingStrategy, useSortable } from "@dnd-kit/sortable";
|
|
26
28
|
import { Separator as Separator$1 } from "@base-ui/react/separator";
|
|
27
|
-
//#region src/components/spinner/spinner.tsx
|
|
28
|
-
const SPINNER_STYLE = `
|
|
29
|
-
@keyframes raft-braille-spinner {
|
|
30
|
-
0%,
|
|
31
|
-
9.99% {
|
|
32
|
-
content: "⠋";
|
|
33
|
-
}
|
|
34
|
-
10%,
|
|
35
|
-
19.99% {
|
|
36
|
-
content: "⠙";
|
|
37
|
-
}
|
|
38
|
-
20%,
|
|
39
|
-
29.99% {
|
|
40
|
-
content: "⠹";
|
|
41
|
-
}
|
|
42
|
-
30%,
|
|
43
|
-
39.99% {
|
|
44
|
-
content: "⠸";
|
|
45
|
-
}
|
|
46
|
-
40%,
|
|
47
|
-
49.99% {
|
|
48
|
-
content: "⠼";
|
|
49
|
-
}
|
|
50
|
-
50%,
|
|
51
|
-
59.99% {
|
|
52
|
-
content: "⠴";
|
|
53
|
-
}
|
|
54
|
-
60%,
|
|
55
|
-
69.99% {
|
|
56
|
-
content: "⠦";
|
|
57
|
-
}
|
|
58
|
-
70%,
|
|
59
|
-
79.99% {
|
|
60
|
-
content: "⠧";
|
|
61
|
-
}
|
|
62
|
-
80%,
|
|
63
|
-
89.99% {
|
|
64
|
-
content: "⠇";
|
|
65
|
-
}
|
|
66
|
-
90%,
|
|
67
|
-
100% {
|
|
68
|
-
content: "⠏";
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
[data-slot="spinner"] [data-spinner-glyph]::before {
|
|
73
|
-
content: "⠋";
|
|
74
|
-
animation: raft-braille-spinner 800ms steps(1, end) infinite;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@media (prefers-reduced-motion: reduce) {
|
|
78
|
-
[data-slot="spinner"] [data-spinner-glyph]::before {
|
|
79
|
-
animation-duration: 1600ms;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@keyframes raft-elegant-spinner-spin {
|
|
84
|
-
to {
|
|
85
|
-
transform: rotate(360deg);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@keyframes raft-elegant-spinner-dash {
|
|
90
|
-
0% {
|
|
91
|
-
stroke-dasharray: 1 150;
|
|
92
|
-
stroke-dashoffset: 0;
|
|
93
|
-
}
|
|
94
|
-
50% {
|
|
95
|
-
stroke-dasharray: 90 150;
|
|
96
|
-
stroke-dashoffset: -35;
|
|
97
|
-
}
|
|
98
|
-
100% {
|
|
99
|
-
stroke-dasharray: 90 150;
|
|
100
|
-
stroke-dashoffset: -124;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
[data-slot="spinner"] [data-spinner-ring] {
|
|
105
|
-
animation: raft-elegant-spinner-spin 1600ms linear infinite;
|
|
106
|
-
transform-box: fill-box;
|
|
107
|
-
transform-origin: center;
|
|
108
|
-
will-change: transform;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
[data-slot="spinner"] [data-spinner-arc] {
|
|
112
|
-
animation: raft-elegant-spinner-dash 1400ms cubic-bezier(0.42, 0, 0.58, 1) infinite;
|
|
113
|
-
stroke-dasharray: 1 150;
|
|
114
|
-
stroke-dashoffset: 0;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
@media (prefers-reduced-motion: reduce) {
|
|
118
|
-
[data-slot="spinner"] [data-spinner-ring] {
|
|
119
|
-
animation-duration: 2400ms;
|
|
120
|
-
will-change: auto;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
[data-slot="spinner"] [data-spinner-arc] {
|
|
124
|
-
animation: none;
|
|
125
|
-
stroke-dasharray: 72 150;
|
|
126
|
-
stroke-dashoffset: -30;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
`;
|
|
130
|
-
const spinner = tv({
|
|
131
|
-
slots: {
|
|
132
|
-
root: ["relative inline-flex shrink-0 items-center justify-center", "leading-none text-current"],
|
|
133
|
-
glyph: "inline-block min-w-[1ch] font-mono tabular-nums",
|
|
134
|
-
ring: "block size-full shrink-0"
|
|
135
|
-
},
|
|
136
|
-
variants: {
|
|
137
|
-
theme: {
|
|
138
|
-
brutal: {},
|
|
139
|
-
elegant: {}
|
|
140
|
-
},
|
|
141
|
-
size: {
|
|
142
|
-
sm: {},
|
|
143
|
-
lg: {}
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
defaultVariants: { size: "sm" },
|
|
147
|
-
compoundVariants: [
|
|
148
|
-
{
|
|
149
|
-
theme: "brutal",
|
|
150
|
-
size: "sm",
|
|
151
|
-
class: { root: "h-4 text-base" }
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
theme: "brutal",
|
|
155
|
-
size: "lg",
|
|
156
|
-
class: { root: "h-6 text-xl" }
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
theme: "elegant",
|
|
160
|
-
size: "sm",
|
|
161
|
-
class: { root: "size-3.5" }
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
theme: "elegant",
|
|
165
|
-
size: "lg",
|
|
166
|
-
class: { root: "size-[18px]" }
|
|
167
|
-
}
|
|
168
|
-
]
|
|
169
|
-
});
|
|
170
|
-
const spinnerStyle = /* @__PURE__ */ jsx("style", {
|
|
171
|
-
href: "raft-ui-spinner",
|
|
172
|
-
precedence: "default",
|
|
173
|
-
children: SPINNER_STYLE
|
|
174
|
-
});
|
|
175
|
-
function Spinner({ size = "sm", className, render, ...props }) {
|
|
176
|
-
const theme = useThemeFamily();
|
|
177
|
-
const { root, glyph, ring } = spinner({
|
|
178
|
-
theme,
|
|
179
|
-
size
|
|
180
|
-
});
|
|
181
|
-
const children = theme === "elegant" ? /* @__PURE__ */ jsxs(Fragment, { children: [spinnerStyle, /* @__PURE__ */ jsxs("svg", {
|
|
182
|
-
"data-spinner-ring": "",
|
|
183
|
-
"aria-hidden": "true",
|
|
184
|
-
className: ring(),
|
|
185
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
186
|
-
fill: "none",
|
|
187
|
-
viewBox: "0 0 24 24",
|
|
188
|
-
children: [/* @__PURE__ */ jsx("circle", {
|
|
189
|
-
className: "opacity-20",
|
|
190
|
-
cx: "12",
|
|
191
|
-
cy: "12",
|
|
192
|
-
r: "10",
|
|
193
|
-
stroke: "currentColor",
|
|
194
|
-
strokeWidth: "2.5"
|
|
195
|
-
}), /* @__PURE__ */ jsx("circle", {
|
|
196
|
-
"data-spinner-arc": "",
|
|
197
|
-
className: "opacity-80",
|
|
198
|
-
cx: "12",
|
|
199
|
-
cy: "12",
|
|
200
|
-
r: "10",
|
|
201
|
-
fill: "none",
|
|
202
|
-
pathLength: "150",
|
|
203
|
-
stroke: "currentColor",
|
|
204
|
-
strokeLinecap: "round",
|
|
205
|
-
strokeWidth: "2.5"
|
|
206
|
-
})]
|
|
207
|
-
})] }) : /* @__PURE__ */ jsxs(Fragment, { children: [spinnerStyle, /* @__PURE__ */ jsx("span", {
|
|
208
|
-
"data-spinner-glyph": "",
|
|
209
|
-
"aria-hidden": "true",
|
|
210
|
-
className: glyph()
|
|
211
|
-
})] });
|
|
212
|
-
return useRender({
|
|
213
|
-
defaultTagName: "span",
|
|
214
|
-
render,
|
|
215
|
-
props: mergeProps({
|
|
216
|
-
role: "status",
|
|
217
|
-
"aria-label": "Loading",
|
|
218
|
-
className: root({ className }),
|
|
219
|
-
children
|
|
220
|
-
}, props),
|
|
221
|
-
state: {
|
|
222
|
-
slot: "spinner",
|
|
223
|
-
size
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
//#endregion
|
|
228
|
-
//#region src/components/button/button.tsx
|
|
229
|
-
const buttonVariants = tv({
|
|
230
|
-
slots: {
|
|
231
|
-
root: [
|
|
232
|
-
"relative inline-flex shrink-0 items-center justify-center",
|
|
233
|
-
"font-heading leading-none whitespace-nowrap select-none",
|
|
234
|
-
"border-line rounded-none",
|
|
235
|
-
"shadow-sm transition-all duration-100",
|
|
236
|
-
"outline outline-[1px] outline-offset-2 outline-transparent",
|
|
237
|
-
"data-[loading=true]:cursor-wait",
|
|
238
|
-
"disabled:pointer-events-none disabled:opacity-40 data-[loading=true]:opacity-100",
|
|
239
|
-
"disabled:transform-none",
|
|
240
|
-
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
241
|
-
],
|
|
242
|
-
content: "relative z-10 inline-flex items-center justify-center gap-[inherit] data-[loading=true]:invisible",
|
|
243
|
-
loadingIndicator: "pointer-events-none absolute inset-0 z-10 flex items-center justify-center"
|
|
244
|
-
},
|
|
245
|
-
variants: {
|
|
246
|
-
theme: {
|
|
247
|
-
brutal: { root: ["border-2 font-bold focus-visible:outline-transparent"] },
|
|
248
|
-
elegant: { root: [
|
|
249
|
-
"overflow-clip border-0 font-sans font-medium antialiased",
|
|
250
|
-
"focus-visible:outline-[var(--button-focus-outline,transparent)]",
|
|
251
|
-
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_0_0_1px_var(--line-subtle)]",
|
|
252
|
-
"before:pointer-events-none before:absolute before:inset-0 before:z-0 before:rounded-[inherit]",
|
|
253
|
-
"active:not-aria-[haspopup]:scale-[0.985]"
|
|
254
|
-
] }
|
|
255
|
-
},
|
|
256
|
-
variant: {
|
|
257
|
-
primary: { root: ["border-line-strong bg-primary-400 text-primary-950", "hover:bg-primary-500"] },
|
|
258
|
-
default: { root: ["border-line-strong bg-layer-panel text-foreground-strong", "hover:bg-layer-panel"] },
|
|
259
|
-
information: { root: ["border-line-strong bg-info-base text-foreground-inverse", "hover:bg-info-base"] },
|
|
260
|
-
muted: { root: ["border-line-strong bg-secondary-400 text-secondary-950", "hover:border-line-strong hover:bg-secondary-400"] },
|
|
261
|
-
accent: { root: ["border-line-strong bg-accent-400 text-accent-950", "hover:bg-accent-500"] },
|
|
262
|
-
warning: { root: ["border-line-strong bg-warning-base text-foreground-inverse", "hover:bg-warning-base"] },
|
|
263
|
-
outline: { root: [
|
|
264
|
-
"border-line-strong bg-transparent text-foreground-strong",
|
|
265
|
-
"hover:bg-layer-muted",
|
|
266
|
-
"shadow-none"
|
|
267
|
-
] },
|
|
268
|
-
ghost: { root: ["border-transparent bg-transparent text-foreground shadow-none", "hover:border-line-strong hover:bg-layer-muted"] },
|
|
269
|
-
link: { root: ["border-transparent bg-transparent text-foreground-strong shadow-none underline-offset-4", "hover:underline"] },
|
|
270
|
-
"danger-secondary": { root: ["border-line-strong bg-danger-lighter text-danger-base", "hover:bg-danger-lighter"] },
|
|
271
|
-
danger: { root: ["border-line-strong bg-danger-base text-foreground-inverse", "hover:border-[oklch(0.595_0.241_26.758)] hover:bg-[oklch(0.595_0.241_26.758)]"] },
|
|
272
|
-
"danger-outline": { root: [
|
|
273
|
-
"border-line-strong bg-transparent text-danger-base",
|
|
274
|
-
"hover:bg-layer-muted",
|
|
275
|
-
"shadow-none"
|
|
276
|
-
] }
|
|
277
|
-
},
|
|
278
|
-
size: {
|
|
279
|
-
xs: { root: [
|
|
280
|
-
"gap-1 px-2 py-[5px] text-[11px]",
|
|
281
|
-
"has-data-[icon=inline-start]:pl-1.5 has-data-[icon=inline-end]:pr-1.5",
|
|
282
|
-
"[&_svg:not([class*='size-'])]:size-3"
|
|
283
|
-
] },
|
|
284
|
-
sm: { root: [
|
|
285
|
-
"gap-1.5 px-2.5 py-[6px] text-xs",
|
|
286
|
-
"has-data-[icon=inline-start]:pl-2 has-data-[icon=inline-end]:pr-2",
|
|
287
|
-
"[&_svg:not([class*='size-'])]:size-3.5"
|
|
288
|
-
] },
|
|
289
|
-
md: { root: ["gap-2 px-3 py-[7px] text-sm", "has-data-[icon=inline-start]:pl-2.5 has-data-[icon=inline-end]:pr-2.5"] },
|
|
290
|
-
lg: { root: [
|
|
291
|
-
"gap-2 px-3.5 py-2 text-base",
|
|
292
|
-
"has-data-[icon=inline-start]:pl-3 has-data-[icon=inline-end]:pr-3",
|
|
293
|
-
"[&_svg:not([class*='size-'])]:size-4"
|
|
294
|
-
] },
|
|
295
|
-
"icon-xs": { root: ["p-[5px] text-[11px]", "[&_svg:not([class*='size-'])]:size-3"] },
|
|
296
|
-
"icon-sm": { root: ["p-[6px] text-xs", "[&_svg:not([class*='size-'])]:size-3.5"] },
|
|
297
|
-
"icon-md": { root: ["p-2 text-sm", "[&_svg:not([class*='size-'])]:size-4"] },
|
|
298
|
-
"icon-lg": { root: ["p-3 text-sm", "[&_svg:not([class*='size-'])]:size-4"] }
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
defaultVariants: {
|
|
302
|
-
variant: "default",
|
|
303
|
-
size: "md"
|
|
304
|
-
},
|
|
305
|
-
compoundVariants: [
|
|
306
|
-
{
|
|
307
|
-
theme: "elegant",
|
|
308
|
-
size: ["xs", "icon-xs"],
|
|
309
|
-
class: { root: "rounded-sm" }
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
theme: "elegant",
|
|
313
|
-
size: ["sm", "icon-sm"],
|
|
314
|
-
class: { root: "rounded" }
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
theme: "elegant",
|
|
318
|
-
size: ["md", "icon-md"],
|
|
319
|
-
class: { root: "rounded-md" }
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
theme: "elegant",
|
|
323
|
-
size: "md",
|
|
324
|
-
class: { root: "py-1.5" }
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
theme: "elegant",
|
|
328
|
-
size: ["lg", "icon-lg"],
|
|
329
|
-
class: { root: "rounded-md" }
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
theme: "elegant",
|
|
333
|
-
size: "lg",
|
|
334
|
-
class: { root: "py-[7px]" }
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
theme: "brutal",
|
|
338
|
-
variant: "primary",
|
|
339
|
-
class: { root: "bg-brutal-yellow text-black hover:bg-brutal-yellow" }
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
theme: "brutal",
|
|
343
|
-
variant: "default",
|
|
344
|
-
class: { root: "bg-white text-black hover:bg-white" }
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
theme: "brutal",
|
|
348
|
-
variant: "outline",
|
|
349
|
-
class: { root: "bg-white text-black shadow-sm hover:bg-white" }
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
theme: "brutal",
|
|
353
|
-
variant: "information",
|
|
354
|
-
class: { root: "bg-brutal-cyan text-black hover:bg-brutal-cyan" }
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
theme: "brutal",
|
|
358
|
-
variant: "muted",
|
|
359
|
-
class: { root: "bg-brutal-stone text-black hover:bg-brutal-stone" }
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
theme: "brutal",
|
|
363
|
-
variant: "accent",
|
|
364
|
-
class: { root: "bg-brutal-pink text-black hover:bg-brutal-pink" }
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
theme: "brutal",
|
|
368
|
-
variant: "danger",
|
|
369
|
-
class: { root: "bg-brutal-red text-black hover:bg-brutal-red" }
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
theme: "brutal",
|
|
373
|
-
variant: "warning",
|
|
374
|
-
class: { root: "bg-[oklch(0.785_0.123_50.11)] text-black hover:bg-[oklch(0.785_0.123_50.11)]" }
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
theme: "brutal",
|
|
378
|
-
size: "xs",
|
|
379
|
-
class: { root: "h-6 px-2 py-0 text-[11px]" }
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
theme: "brutal",
|
|
383
|
-
size: "sm",
|
|
384
|
-
class: { root: "h-7 px-2.5 py-0 text-xs" }
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
theme: "brutal",
|
|
388
|
-
size: "md",
|
|
389
|
-
class: { root: "h-8 px-3 py-0 text-sm" }
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
theme: "brutal",
|
|
393
|
-
size: "lg",
|
|
394
|
-
class: { root: "h-10 px-4 py-0 text-sm" }
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
theme: "brutal",
|
|
398
|
-
size: "icon-xs",
|
|
399
|
-
class: { root: "size-6 p-0 text-[11px]" }
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
theme: "brutal",
|
|
403
|
-
size: "icon-sm",
|
|
404
|
-
class: { root: "size-7 p-0 text-xs" }
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
theme: "brutal",
|
|
408
|
-
size: "icon-md",
|
|
409
|
-
class: { root: "size-8 p-0 text-sm" }
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
theme: "brutal",
|
|
413
|
-
size: "icon-lg",
|
|
414
|
-
class: { root: "size-10 p-0 text-sm" }
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
theme: "elegant",
|
|
418
|
-
variant: "default",
|
|
419
|
-
class: { root: [
|
|
420
|
-
"bg-foreground-strong text-foreground-inverse",
|
|
421
|
-
"[--button-focus-outline:var(--foreground-strong)]",
|
|
422
|
-
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.12),0_0_0_1px_var(--foreground-strong)]",
|
|
423
|
-
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_8%)_0%,oklab(0%_0_0_/_0%)_100%)]",
|
|
424
|
-
"hover:bg-[oklch(0.31_0.006_285)]"
|
|
425
|
-
] }
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
theme: "elegant",
|
|
429
|
-
variant: "primary",
|
|
430
|
-
class: { root: [
|
|
431
|
-
"bg-primary-400 text-primary-950",
|
|
432
|
-
"[--button-focus-outline:var(--primary-400)]",
|
|
433
|
-
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.15),0_0_0_1px_oklch(0.83_0.14_91.89_/_0.83)]",
|
|
434
|
-
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_11%)_0%,oklab(100%_0_0_/_0%)_0%,oklab(0%_0_0_/_0%)_100%)]",
|
|
435
|
-
"hover:bg-[oklch(0.86_0.15_91.89)]"
|
|
436
|
-
] }
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
theme: "elegant",
|
|
440
|
-
variant: "outline",
|
|
441
|
-
class: { root: [
|
|
442
|
-
"bg-layer-panel text-foreground-strong",
|
|
443
|
-
"[--button-focus-outline:var(--layer-panel)]",
|
|
444
|
-
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_0_0_1px_var(--line-subtle)]",
|
|
445
|
-
"before:bg-[linear-gradient(in_oklab_180deg,oklab(0%_0_0_/_0%)_30%,oklab(0%_0_0_/_1%)_100%)]",
|
|
446
|
-
"hover:bg-layer-muted"
|
|
447
|
-
] }
|
|
448
|
-
},
|
|
449
|
-
{
|
|
450
|
-
theme: "elegant",
|
|
451
|
-
variant: "ghost",
|
|
452
|
-
class: { root: [
|
|
453
|
-
"bg-transparent text-foreground-muted shadow-none",
|
|
454
|
-
"[--button-focus-outline:var(--line-muted)]",
|
|
455
|
-
"before:bg-transparent hover:bg-line-muted"
|
|
456
|
-
] }
|
|
457
|
-
},
|
|
458
|
-
{
|
|
459
|
-
theme: "elegant",
|
|
460
|
-
variant: "danger-secondary",
|
|
461
|
-
class: { root: [
|
|
462
|
-
"bg-danger-lighter text-danger-base",
|
|
463
|
-
"[--button-focus-outline:var(--state-danger-lighter)]",
|
|
464
|
-
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.18),0_0_0_1px_var(--state-danger-light)]",
|
|
465
|
-
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_9%)_0%,oklab(0%_0_0_/_1%)_100%)]",
|
|
466
|
-
"hover:bg-danger-light"
|
|
467
|
-
] }
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
theme: "elegant",
|
|
471
|
-
variant: "danger",
|
|
472
|
-
class: { root: [
|
|
473
|
-
"bg-danger-base text-foreground-inverse",
|
|
474
|
-
"[--button-focus-outline:var(--state-danger-base)]",
|
|
475
|
-
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.12),0_0_0_1px_var(--state-danger-base)]",
|
|
476
|
-
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_10%)_0%,oklab(0%_0_0_/_0%)_100%)]",
|
|
477
|
-
"hover:bg-[oklch(0.56_0.23_26.758)]"
|
|
478
|
-
] }
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
theme: "brutal",
|
|
482
|
-
variant: "danger",
|
|
483
|
-
class: { root: [
|
|
484
|
-
"border-line-strong bg-brutal-red text-black",
|
|
485
|
-
"shadow-sm",
|
|
486
|
-
"hover:border-line-strong hover:bg-brutal-red",
|
|
487
|
-
"hover:-translate-y-px hover:shadow-md",
|
|
488
|
-
"active:not-aria-[haspopup]:translate-x-px active:not-aria-[haspopup]:translate-y-px",
|
|
489
|
-
"active:shadow-xs"
|
|
490
|
-
] }
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
theme: "brutal",
|
|
494
|
-
variant: "danger-secondary",
|
|
495
|
-
class: { root: [
|
|
496
|
-
"border-line-strong bg-danger-lighter text-[color-mix(in_oklab,var(--state-danger-base)_72%,transparent)]",
|
|
497
|
-
"shadow-sm",
|
|
498
|
-
"hover:border-line-strong hover:bg-danger-lighter",
|
|
499
|
-
"hover:-translate-y-px hover:shadow-md",
|
|
500
|
-
"active:not-aria-[haspopup]:translate-x-px active:not-aria-[haspopup]:translate-y-px",
|
|
501
|
-
"active:shadow-xs"
|
|
502
|
-
] }
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
theme: "elegant",
|
|
506
|
-
variant: "danger-outline",
|
|
507
|
-
class: { root: [
|
|
508
|
-
"bg-layer-panel text-danger-base",
|
|
509
|
-
"[--button-focus-outline:var(--layer-panel)]",
|
|
510
|
-
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_0_0_1px_var(--state-danger-light)]",
|
|
511
|
-
"before:bg-[linear-gradient(in_oklab_180deg,oklab(0%_0_0_/_0%)_30%,oklab(0%_0_0_/_1%)_100%)]",
|
|
512
|
-
"hover:bg-danger-lighter"
|
|
513
|
-
] }
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
theme: "elegant",
|
|
517
|
-
variant: "accent",
|
|
518
|
-
class: { root: [
|
|
519
|
-
"bg-accent-400 text-white",
|
|
520
|
-
"[--button-focus-outline:var(--accent-400)]",
|
|
521
|
-
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.12),0_0_0_1px_var(--accent-400)]",
|
|
522
|
-
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_8%)_0%,oklab(0%_0_0_/_0%)_100%)]",
|
|
523
|
-
"hover:bg-[oklch(0.72_0.15_0.71)]"
|
|
524
|
-
] }
|
|
525
|
-
},
|
|
526
|
-
{
|
|
527
|
-
theme: "elegant",
|
|
528
|
-
variant: "warning",
|
|
529
|
-
class: { root: [
|
|
530
|
-
"bg-warning-base text-foreground-inverse",
|
|
531
|
-
"[--button-focus-outline:var(--state-warning-base)]",
|
|
532
|
-
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.14),0_0_0_1px_var(--state-warning-base)]",
|
|
533
|
-
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_10%)_0%,oklab(0%_0_0_/_0%)_100%)]",
|
|
534
|
-
"hover:bg-[oklch(0.65_0.19_44.441)]"
|
|
535
|
-
] }
|
|
536
|
-
},
|
|
537
|
-
{
|
|
538
|
-
theme: "elegant",
|
|
539
|
-
variant: "link",
|
|
540
|
-
class: { root: [
|
|
541
|
-
"bg-transparent text-foreground-muted shadow-none",
|
|
542
|
-
"[--button-focus-outline:transparent]",
|
|
543
|
-
"before:bg-transparent hover:bg-transparent hover:text-foreground-muted"
|
|
544
|
-
] }
|
|
545
|
-
},
|
|
546
|
-
{
|
|
547
|
-
theme: "elegant",
|
|
548
|
-
variant: "information",
|
|
549
|
-
class: { root: [
|
|
550
|
-
"bg-info-base text-foreground-inverse",
|
|
551
|
-
"[--button-focus-outline:var(--state-info-base)]",
|
|
552
|
-
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.12),0_0_0_1px_var(--state-info-base)]",
|
|
553
|
-
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_8%)_0%,oklab(0%_0_0_/_0%)_100%)]",
|
|
554
|
-
"hover:bg-[oklch(0.74_0.13_219.2)]"
|
|
555
|
-
] }
|
|
556
|
-
},
|
|
557
|
-
{
|
|
558
|
-
theme: "elegant",
|
|
559
|
-
variant: "muted",
|
|
560
|
-
class: { root: [
|
|
561
|
-
"bg-layer-muted text-foreground-placeholder",
|
|
562
|
-
"[--button-focus-outline:var(--layer-muted)]",
|
|
563
|
-
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_0_0_1px_var(--line-subtle)]",
|
|
564
|
-
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_5%)_0%,oklab(0%_0_0_/_1%)_100%)]",
|
|
565
|
-
"hover:bg-line-subtle"
|
|
566
|
-
] }
|
|
567
|
-
},
|
|
568
|
-
{
|
|
569
|
-
theme: "brutal",
|
|
570
|
-
variant: [
|
|
571
|
-
"primary",
|
|
572
|
-
"default",
|
|
573
|
-
"information",
|
|
574
|
-
"muted",
|
|
575
|
-
"accent",
|
|
576
|
-
"warning",
|
|
577
|
-
"outline"
|
|
578
|
-
],
|
|
579
|
-
class: { root: [
|
|
580
|
-
"hover:-translate-y-px hover:shadow-md",
|
|
581
|
-
"active:not-aria-[haspopup]:translate-x-px active:not-aria-[haspopup]:translate-y-px",
|
|
582
|
-
"active:shadow-xs"
|
|
583
|
-
] }
|
|
584
|
-
}
|
|
585
|
-
]
|
|
586
|
-
});
|
|
587
|
-
function defaultNativeButton(render) {
|
|
588
|
-
if (!render || typeof render !== "object" || !("type" in render)) return;
|
|
589
|
-
const element = render;
|
|
590
|
-
if (typeof element.type === "string") return element.type === "button";
|
|
591
|
-
}
|
|
592
|
-
function Button({ variant, size, loading = false, loadingLabel = "Loading", disabled, className, children, render, nativeButton, ...props }) {
|
|
593
|
-
const { root, content, loadingIndicator } = buttonVariants({
|
|
594
|
-
theme: useThemeFamily(),
|
|
595
|
-
variant,
|
|
596
|
-
size
|
|
597
|
-
});
|
|
598
|
-
return /* @__PURE__ */ jsxs(Button$1, {
|
|
599
|
-
...props,
|
|
600
|
-
render,
|
|
601
|
-
nativeButton: nativeButton ?? defaultNativeButton(render),
|
|
602
|
-
"data-slot": "button",
|
|
603
|
-
className: root({ className }),
|
|
604
|
-
"data-loading": loading ? "true" : void 0,
|
|
605
|
-
disabled: disabled || loading,
|
|
606
|
-
"aria-disabled": loading || void 0,
|
|
607
|
-
children: [loading ? /* @__PURE__ */ jsx("span", {
|
|
608
|
-
"data-slot": "button-loading-indicator",
|
|
609
|
-
className: loadingIndicator(),
|
|
610
|
-
children: /* @__PURE__ */ jsx(Spinner, { "aria-label": loadingLabel })
|
|
611
|
-
}) : null, /* @__PURE__ */ jsx("span", {
|
|
612
|
-
"data-slot": "button-content",
|
|
613
|
-
"data-loading": loading ? "true" : void 0,
|
|
614
|
-
className: content(),
|
|
615
|
-
children
|
|
616
|
-
})]
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
//#endregion
|
|
620
29
|
//#region src/components/alert-dialog/alert-dialog.tsx
|
|
621
30
|
const alertDialog = tv({
|
|
622
31
|
slots: {
|
|
623
32
|
overlay: [
|
|
624
33
|
"fixed inset-0 z-50",
|
|
625
|
-
"transition-opacity duration-
|
|
34
|
+
"transition-opacity duration-150 ease-out",
|
|
626
35
|
"data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"
|
|
627
36
|
],
|
|
628
37
|
content: [
|
|
629
38
|
"fixed top-1/2 left-1/2 z-50 grid w-[calc(100%-2rem)] max-w-[408px] -translate-x-1/2 -translate-y-1/2",
|
|
630
|
-
"outline-none transition-[opacity,transform] duration-
|
|
631
|
-
"data-[starting-style]:scale-
|
|
632
|
-
"data-[ending-style]:
|
|
39
|
+
"origin-center transform-gpu outline-none transition-[opacity,transform] duration-150 ease-out",
|
|
40
|
+
"data-[starting-style]:scale-[.98] data-[starting-style]:opacity-0",
|
|
41
|
+
"data-[ending-style]:opacity-0"
|
|
633
42
|
],
|
|
634
43
|
header: ["grid grid-cols-[minmax(0,1fr)_max-content] items-center gap-3 min-w-0"],
|
|
635
44
|
body: ["min-w-0"],
|
|
@@ -639,18 +48,18 @@ const alertDialog = tv({
|
|
|
639
48
|
},
|
|
640
49
|
variants: { theme: {
|
|
641
50
|
brutal: {
|
|
642
|
-
overlay: ["bg-
|
|
51
|
+
overlay: ["bg-layer-backdrop"],
|
|
643
52
|
content: ["gap-4 border-2 border-line-strong bg-layer-panel px-6 py-4 shadow-xl"],
|
|
644
53
|
body: ["py-2 font-medium"],
|
|
645
54
|
title: ["font-heading text-lg leading-none font-bold uppercase"],
|
|
646
55
|
description: ["font-sans text-sm leading-5 text-foreground/60"]
|
|
647
56
|
},
|
|
648
57
|
elegant: {
|
|
649
|
-
overlay: ["bg-
|
|
58
|
+
overlay: ["bg-layer-backdrop backdrop-blur-[2px]"],
|
|
650
59
|
content: ["overflow-clip rounded-lg bg-layer-popover shadow-xl"],
|
|
651
|
-
header: ["border-b border-line-subtle bg-black/[0.02] px-
|
|
60
|
+
header: ["border-b border-line-subtle bg-black/[0.02] px-5 py-3"],
|
|
652
61
|
body: ["px-6 py-5"],
|
|
653
|
-
footer: ["border-t border-line-subtle bg-black/[0.015] px-
|
|
62
|
+
footer: ["border-t border-line-subtle bg-black/[0.015] px-5 py-3"],
|
|
654
63
|
title: ["font-sans text-sm leading-5 font-medium tracking-[-0.005em]"],
|
|
655
64
|
description: ["font-sans text-sm leading-5 text-[oklch(0.48_0_0)] dark:text-[oklch(0.76_0_0)]"]
|
|
656
65
|
}
|
|
@@ -682,27 +91,32 @@ function AlertDialogClose({ className, variant, size, children, ...props }) {
|
|
|
682
91
|
variant: variant ?? (isBrutal ? "outline" : "ghost"),
|
|
683
92
|
size: size ?? (isBrutal ? "icon-md" : "icon-sm"),
|
|
684
93
|
"aria-label": "Close",
|
|
685
|
-
className: isBrutal ? className : cn("text-foreground-placeholder hover:text-foreground", className)
|
|
94
|
+
className: isBrutal ? className : cn("p-0 text-foreground-placeholder hover:border-transparent hover:bg-transparent hover:text-foreground", className)
|
|
686
95
|
}),
|
|
687
96
|
...props,
|
|
688
97
|
children: children ?? /* @__PURE__ */ jsx(X, { className: isBrutal ? "size-5" : "size-4" })
|
|
689
98
|
});
|
|
690
99
|
}
|
|
691
100
|
function AlertDialogOverlay({ className, ...props }) {
|
|
692
|
-
const
|
|
101
|
+
const theme = useThemeFamily();
|
|
102
|
+
const { overlay } = alertDialog({ theme });
|
|
693
103
|
return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
694
104
|
"data-slot": "alert-dialog-overlay",
|
|
105
|
+
"data-theme": theme,
|
|
695
106
|
className: overlay({ className }),
|
|
696
107
|
...props
|
|
697
108
|
});
|
|
698
109
|
}
|
|
699
110
|
function AlertDialogContent({ className, children, portalProps, overlay, ...props }) {
|
|
700
|
-
const
|
|
111
|
+
const theme = useThemeFamily();
|
|
112
|
+
const { resolvedMode } = useTheme();
|
|
113
|
+
const { content } = alertDialog({ theme });
|
|
701
114
|
return /* @__PURE__ */ jsxs(AlertDialogPortal, {
|
|
702
115
|
...portalProps,
|
|
703
116
|
children: [overlay === false ? null : /* @__PURE__ */ jsx(AlertDialogOverlay, { ...overlay }), /* @__PURE__ */ jsx(Dialog$1.Popup, {
|
|
704
117
|
"data-slot": "alert-dialog-content",
|
|
705
|
-
|
|
118
|
+
"data-theme": theme,
|
|
119
|
+
className: cn(content({ className }), resolvedMode === "dark" && "dark"),
|
|
706
120
|
...props,
|
|
707
121
|
role: "alertdialog",
|
|
708
122
|
children
|
|
@@ -772,14 +186,14 @@ const dialog = tv({
|
|
|
772
186
|
slots: {
|
|
773
187
|
overlay: [
|
|
774
188
|
"fixed inset-0 z-50",
|
|
775
|
-
"transition-opacity duration-
|
|
189
|
+
"transition-opacity duration-150 ease-out",
|
|
776
190
|
"data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"
|
|
777
191
|
],
|
|
778
192
|
content: [
|
|
779
193
|
"fixed top-1/2 left-1/2 z-50 grid w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2",
|
|
780
|
-
"outline-none transition-[opacity,transform] duration-
|
|
781
|
-
"data-[starting-style]:scale-
|
|
782
|
-
"data-[ending-style]:
|
|
194
|
+
"origin-center transform-gpu outline-none transition-[opacity,transform] duration-150 ease-out",
|
|
195
|
+
"data-[starting-style]:scale-[.98] data-[starting-style]:opacity-0",
|
|
196
|
+
"data-[ending-style]:opacity-0"
|
|
783
197
|
],
|
|
784
198
|
header: ["grid grid-cols-[minmax(0,1fr)_max-content] items-center gap-3 min-w-0"],
|
|
785
199
|
body: ["min-w-0"],
|
|
@@ -789,16 +203,16 @@ const dialog = tv({
|
|
|
789
203
|
},
|
|
790
204
|
variants: { theme: {
|
|
791
205
|
brutal: {
|
|
792
|
-
overlay: ["bg-
|
|
206
|
+
overlay: ["bg-layer-backdrop"],
|
|
793
207
|
content: ["gap-4 border-2 border-line-strong bg-layer-panel px-6 py-4 shadow-xl"],
|
|
794
208
|
body: ["py-2 font-medium"],
|
|
795
209
|
title: ["font-heading text-lg leading-none font-bold uppercase"],
|
|
796
210
|
description: ["font-sans text-sm leading-5 text-foreground/60"]
|
|
797
211
|
},
|
|
798
212
|
elegant: {
|
|
799
|
-
overlay: ["bg-
|
|
213
|
+
overlay: ["bg-layer-backdrop backdrop-blur-[2px]"],
|
|
800
214
|
content: ["overflow-clip rounded-lg bg-layer-popover shadow-xl"],
|
|
801
|
-
header: ["border-b border-line-subtle bg-black/[0.02] px-6 py-
|
|
215
|
+
header: ["border-b border-line-subtle bg-black/[0.02] px-6 py-3"],
|
|
802
216
|
body: ["px-6 py-5"],
|
|
803
217
|
footer: ["border-t border-line-subtle bg-black/[0.015] px-6 py-3"],
|
|
804
218
|
title: ["font-sans text-sm leading-5 font-medium tracking-[-0.005em]"],
|
|
@@ -825,20 +239,25 @@ function DialogPortal(props) {
|
|
|
825
239
|
});
|
|
826
240
|
}
|
|
827
241
|
function DialogOverlay({ className, ...props }) {
|
|
828
|
-
const
|
|
242
|
+
const theme = useThemeFamily();
|
|
243
|
+
const { overlay } = dialog({ theme });
|
|
829
244
|
return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
830
245
|
"data-slot": "dialog-overlay",
|
|
246
|
+
"data-theme": theme,
|
|
831
247
|
className: overlay({ className }),
|
|
832
248
|
...props
|
|
833
249
|
});
|
|
834
250
|
}
|
|
835
251
|
function DialogContent({ className, children, portalProps, overlay, ...props }) {
|
|
836
|
-
const
|
|
252
|
+
const theme = useThemeFamily();
|
|
253
|
+
const { resolvedMode } = useTheme();
|
|
254
|
+
const { content } = dialog({ theme });
|
|
837
255
|
return /* @__PURE__ */ jsxs(DialogPortal, {
|
|
838
256
|
...portalProps,
|
|
839
257
|
children: [overlay === false ? null : /* @__PURE__ */ jsx(DialogOverlay, { ...overlay }), /* @__PURE__ */ jsx(Dialog$1.Popup, {
|
|
840
258
|
"data-slot": "dialog-content",
|
|
841
|
-
|
|
259
|
+
"data-theme": theme,
|
|
260
|
+
className: cn(content({ className }), resolvedMode === "dark" && "dark"),
|
|
842
261
|
...props,
|
|
843
262
|
children
|
|
844
263
|
})]
|
|
@@ -858,7 +277,7 @@ function DialogClose({ className, variant, size, children, render, ...props }) {
|
|
|
858
277
|
variant: variant ?? (isBrutal ? "outline" : "ghost"),
|
|
859
278
|
size: size ?? (isBrutal ? "icon-md" : "icon-sm"),
|
|
860
279
|
"aria-label": "Close",
|
|
861
|
-
className: isBrutal ? className : cn("text-foreground-placeholder hover:text-foreground", className)
|
|
280
|
+
className: isBrutal ? className : cn("p-0 text-foreground-placeholder hover:border-transparent hover:bg-transparent hover:text-foreground", className)
|
|
862
281
|
}),
|
|
863
282
|
...props,
|
|
864
283
|
children: children ?? /* @__PURE__ */ jsx(X, { className: isBrutal ? "size-5" : "size-4" })
|
|
@@ -2376,60 +1795,52 @@ const tooltip = tv({
|
|
|
2376
1795
|
trigger: ["select-none"],
|
|
2377
1796
|
positioner: ["isolate z-50 outline-none"],
|
|
2378
1797
|
content: [
|
|
2379
|
-
"relative inline-
|
|
2380
|
-
"text-[13px] leading-[18px] whitespace-normal",
|
|
1798
|
+
"relative inline-block max-w-[min(20rem,var(--available-width,20rem))] min-w-0 px-3 py-2",
|
|
1799
|
+
"text-[13px] leading-[18px] whitespace-normal break-words",
|
|
2381
1800
|
"origin-[var(--transform-origin)] outline-none",
|
|
2382
|
-
"transition-[opacity,transform] duration-
|
|
2383
|
-
"data-[starting-style]:scale-
|
|
2384
|
-
"data-[ending-style]:scale-
|
|
1801
|
+
"transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
1802
|
+
"data-[starting-style]:scale-[0.97] data-[starting-style]:opacity-0",
|
|
1803
|
+
"data-[ending-style]:scale-[0.99] data-[ending-style]:opacity-0",
|
|
2385
1804
|
"data-[instant]:transition-none",
|
|
2386
|
-
"
|
|
1805
|
+
"motion-reduce:transition-none",
|
|
1806
|
+
"[&>svg]:mr-1.5 [&>svg]:inline-block [&>svg]:size-3.5 [&>svg]:shrink-0 [&>svg]:align-[-0.125em]",
|
|
2387
1807
|
"has-[[data-slot=kbd]]:py-1.5 has-[[data-slot=kbd]]:pr-1.5",
|
|
2388
|
-
"[&_[data-slot=kbd]]:relative [&_[data-slot=kbd]]:z-10",
|
|
1808
|
+
"[&_[data-slot=kbd]]:relative [&_[data-slot=kbd]]:z-10 [&_[data-slot=kbd]]:ml-1.5",
|
|
2389
1809
|
"[&_[data-slot=kbd]]:h-4 [&_[data-slot=kbd]]:min-w-4 [&_[data-slot=kbd]]:px-1 [&_[data-slot=kbd]]:py-0",
|
|
2390
1810
|
"[&_[data-slot=kbd]]:text-[10px] [&_[data-slot=kbd]]:font-semibold [&_[data-slot=kbd]]:leading-none"
|
|
2391
1811
|
],
|
|
2392
1812
|
arrow: [
|
|
2393
|
-
"pointer-events-none flex",
|
|
2394
|
-
"data-[side=top]:bottom-[-
|
|
2395
|
-
"data-[side=bottom]:top-[-
|
|
1813
|
+
"pointer-events-none flex overflow-visible",
|
|
1814
|
+
"data-[side=top]:bottom-[-5px]",
|
|
1815
|
+
"data-[side=bottom]:top-[-5px] data-[side=bottom]:rotate-180",
|
|
2396
1816
|
"data-[side=left]:right-[-8px] data-[side=left]:-rotate-90",
|
|
2397
1817
|
"data-[side=right]:left-[-8px] data-[side=right]:rotate-90",
|
|
2398
1818
|
"data-[side=inline-start]:right-[-8px] data-[side=inline-start]:-rotate-90",
|
|
2399
1819
|
"data-[side=inline-end]:left-[-8px] data-[side=inline-end]:rotate-90"
|
|
2400
1820
|
]
|
|
2401
1821
|
},
|
|
2402
|
-
variants: {
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
arrow: ["hidden"]
|
|
2412
|
-
},
|
|
2413
|
-
elegant: {
|
|
2414
|
-
content: [
|
|
2415
|
-
"rounded-md bg-layer-popover",
|
|
2416
|
-
"font-sans text-[13px] font-medium tracking-[-0.005em] text-foreground-strong",
|
|
2417
|
-
"shadow-[0_0_0_1px_oklch(0.21_0.006_285_/_0.10),0_1px_1px_oklch(0.21_0.006_285_/_0.04),0_1px_4px_-3px_oklch(0.21_0.006_285_/_0.10)]",
|
|
2418
|
-
"[&_[data-slot=kbd]]:bg-foreground-muted/10 [&_[data-slot=kbd]]:text-foreground-muted [&_[data-slot=kbd]]:ring-0"
|
|
2419
|
-
],
|
|
2420
|
-
arrow: []
|
|
2421
|
-
}
|
|
1822
|
+
variants: { theme: {
|
|
1823
|
+
brutal: {
|
|
1824
|
+
content: [
|
|
1825
|
+
"border-2 border-black bg-soft-signal",
|
|
1826
|
+
"font-sans font-bold text-black",
|
|
1827
|
+
"shadow-[var(--shadow-brutal-sm)]",
|
|
1828
|
+
"[&_[data-slot=kbd]]:border-black/70 [&_[data-slot=kbd]]:bg-white [&_[data-slot=kbd]]:text-black/70 [&_[data-slot=kbd]]:ring-0"
|
|
1829
|
+
],
|
|
1830
|
+
arrow: ["hidden"]
|
|
2422
1831
|
},
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
"
|
|
2427
|
-
"
|
|
2428
|
-
"[
|
|
2429
|
-
|
|
1832
|
+
elegant: {
|
|
1833
|
+
content: [
|
|
1834
|
+
"rounded-xl bg-[oklch(0.263_0.009_294.9)] text-[oklch(0.965_0.002_286)]",
|
|
1835
|
+
"font-sans text-[13px] font-medium tracking-[-0.005em]",
|
|
1836
|
+
"shadow-[0_18px_42px_-18px_oklch(0_0_0_/_0.54)]",
|
|
1837
|
+
"after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-white/35 after:mix-blend-overlay after:content-['']",
|
|
1838
|
+
"dark:bg-[oklch(0.230_0.010_294.8)] dark:shadow-[0_18px_42px_-18px_oklch(0_0_0_/_0.68)]",
|
|
1839
|
+
"[&_[data-slot=kbd]]:bg-white/[0.08] [&_[data-slot=kbd]]:text-white/72 [&_[data-slot=kbd]]:ring-0"
|
|
1840
|
+
],
|
|
1841
|
+
arrow: []
|
|
2430
1842
|
}
|
|
2431
|
-
}
|
|
2432
|
-
defaultVariants: { variant: "default" }
|
|
1843
|
+
} }
|
|
2433
1844
|
});
|
|
2434
1845
|
function TooltipProvider({ delay = 0, ...props }) {
|
|
2435
1846
|
return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
|
|
@@ -2454,43 +1865,38 @@ function TooltipPortal(props) {
|
|
|
2454
1865
|
...props
|
|
2455
1866
|
});
|
|
2456
1867
|
}
|
|
2457
|
-
function TooltipArrow({ className,
|
|
2458
|
-
const
|
|
2459
|
-
|
|
2460
|
-
variant
|
|
2461
|
-
});
|
|
1868
|
+
function TooltipArrow({ className, ...props }) {
|
|
1869
|
+
const theme = useThemeFamily();
|
|
1870
|
+
const { arrow } = tooltip({ theme });
|
|
2462
1871
|
return /* @__PURE__ */ jsx(Tooltip$1.Arrow, {
|
|
2463
1872
|
"data-slot": "tooltip-arrow",
|
|
2464
1873
|
className: arrow({ className }),
|
|
2465
1874
|
...props,
|
|
2466
|
-
children: /* @__PURE__ */ jsx(TooltipArrowSvg, {
|
|
1875
|
+
children: /* @__PURE__ */ jsx(TooltipArrowSvg, { theme })
|
|
2467
1876
|
});
|
|
2468
1877
|
}
|
|
2469
|
-
function TooltipArrowSvg({
|
|
2470
|
-
const
|
|
2471
|
-
return /* @__PURE__ */
|
|
1878
|
+
function TooltipArrowSvg({ theme, ...props }) {
|
|
1879
|
+
const isElegant = theme === "elegant";
|
|
1880
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
2472
1881
|
width: "12",
|
|
2473
1882
|
height: "6",
|
|
2474
1883
|
viewBox: "0 0 12 6",
|
|
2475
1884
|
fill: "none",
|
|
2476
1885
|
...props,
|
|
2477
|
-
children:
|
|
1886
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
2478
1887
|
d: "M1 0H11L6 5.25Z",
|
|
2479
|
-
className:
|
|
2480
|
-
})
|
|
2481
|
-
d: "M1 0.5L6 5.25L11 0.5",
|
|
2482
|
-
className: isInverse ? "stroke-[oklch(0_0_0_/_0.18)]" : "stroke-[oklch(0.21_0.006_285_/_0.10)]",
|
|
2483
|
-
strokeLinecap: "round",
|
|
2484
|
-
strokeLinejoin: "round",
|
|
2485
|
-
vectorEffect: "non-scaling-stroke"
|
|
2486
|
-
})]
|
|
1888
|
+
className: isElegant ? "fill-[oklch(0.263_0.009_294.9)] dark:fill-[oklch(0.230_0.010_294.8)]" : "fill-layer-popover"
|
|
1889
|
+
})
|
|
2487
1890
|
});
|
|
2488
1891
|
}
|
|
2489
|
-
function TooltipContent({ align = "center", alignOffset = 0, anchor, arrowPadding, collisionAvoidance
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
1892
|
+
function TooltipContent({ align = "center", alignOffset = 0, anchor, arrowPadding, collisionAvoidance = {
|
|
1893
|
+
side: "shift",
|
|
1894
|
+
align: "shift",
|
|
1895
|
+
fallbackAxisSide: "none"
|
|
1896
|
+
}, collisionBoundary, collisionPadding, disableAnchorTracking = false, positionMethod = "fixed", side = "top", sideOffset, sticky, portalProps, className, children, ...props }) {
|
|
1897
|
+
const theme = useThemeFamily();
|
|
1898
|
+
const { positioner, content } = tooltip({ theme });
|
|
1899
|
+
const resolvedSideOffset = sideOffset ?? (theme === "elegant" ? 8 : 6);
|
|
2494
1900
|
return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
|
|
2495
1901
|
...portalProps,
|
|
2496
1902
|
children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
@@ -2504,14 +1910,14 @@ function TooltipContent({ align = "center", alignOffset = 0, anchor, arrowPaddin
|
|
|
2504
1910
|
disableAnchorTracking,
|
|
2505
1911
|
positionMethod,
|
|
2506
1912
|
side,
|
|
2507
|
-
sideOffset,
|
|
1913
|
+
sideOffset: resolvedSideOffset,
|
|
2508
1914
|
sticky,
|
|
2509
1915
|
className: positioner(),
|
|
2510
1916
|
children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
|
|
2511
1917
|
"data-slot": "tooltip-content",
|
|
2512
1918
|
className: content({ className }),
|
|
2513
1919
|
...props,
|
|
2514
|
-
children: [children, /* @__PURE__ */ jsx(TooltipArrow, {
|
|
1920
|
+
children: [children, /* @__PURE__ */ jsx(TooltipArrow, {})]
|
|
2515
1921
|
})
|
|
2516
1922
|
})
|
|
2517
1923
|
});
|
|
@@ -2553,7 +1959,7 @@ const popover = tv({
|
|
|
2553
1959
|
description: ["text-xs leading-5 text-foreground-muted"],
|
|
2554
1960
|
close: ["text-[11px] font-medium tracking-[-0.005em]", "text-foreground-muted transition-colors duration-150 hover:text-foreground-strong"],
|
|
2555
1961
|
arrow: ["border-l border-t border-line-muted bg-layer-popover"],
|
|
2556
|
-
backdrop: ["bg-
|
|
1962
|
+
backdrop: ["bg-layer-backdrop backdrop-blur-[2px]"]
|
|
2557
1963
|
}
|
|
2558
1964
|
} }
|
|
2559
1965
|
});
|
|
@@ -2670,14 +2076,152 @@ function PopoverArrow({ className, ...props }) {
|
|
|
2670
2076
|
});
|
|
2671
2077
|
}
|
|
2672
2078
|
function PopoverBackdrop({ className, ...props }) {
|
|
2673
|
-
const
|
|
2079
|
+
const theme = useThemeFamily();
|
|
2080
|
+
const { backdrop } = popover({ theme });
|
|
2674
2081
|
return /* @__PURE__ */ jsx(Popover$1.Backdrop, {
|
|
2675
2082
|
"data-slot": "popover-backdrop",
|
|
2083
|
+
"data-theme": theme,
|
|
2676
2084
|
className: backdrop({ className }),
|
|
2677
2085
|
...props
|
|
2678
2086
|
});
|
|
2679
2087
|
}
|
|
2680
2088
|
//#endregion
|
|
2089
|
+
//#region src/components/preview-card/preview-card.tsx
|
|
2090
|
+
const previewCard = tv({
|
|
2091
|
+
slots: {
|
|
2092
|
+
trigger: ["select-none"],
|
|
2093
|
+
positioner: ["isolate z-50 outline-none"],
|
|
2094
|
+
popup: [
|
|
2095
|
+
"max-h-[var(--available-height)] min-w-[220px] overflow-hidden",
|
|
2096
|
+
"outline-none",
|
|
2097
|
+
"origin-[var(--transform-origin)] transform-gpu opacity-100 will-change-[transform,opacity]",
|
|
2098
|
+
"transition-[opacity,transform] duration-[250ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
2099
|
+
"data-[starting-style]:scale-[0.97] data-[starting-style]:opacity-0",
|
|
2100
|
+
"data-[ending-style]:scale-[0.99] data-[ending-style]:opacity-0 data-[ending-style]:duration-150",
|
|
2101
|
+
"data-[instant]:transition-none motion-reduce:transition-none"
|
|
2102
|
+
],
|
|
2103
|
+
header: ["flex items-start gap-3 px-3 pt-3 pb-2"],
|
|
2104
|
+
separator: ["border-t"],
|
|
2105
|
+
title: ["m-0 truncate text-sm leading-none"],
|
|
2106
|
+
description: ["m-0 truncate px-3 py-2 text-xs leading-5"],
|
|
2107
|
+
arrow: ["size-2 rotate-45"]
|
|
2108
|
+
},
|
|
2109
|
+
variants: { theme: {
|
|
2110
|
+
brutal: {
|
|
2111
|
+
popup: ["border-2 border-black bg-white shadow-lg"],
|
|
2112
|
+
separator: ["border-black"],
|
|
2113
|
+
title: ["font-sans font-bold text-black"],
|
|
2114
|
+
description: ["font-sans text-black/70"],
|
|
2115
|
+
arrow: ["hidden"]
|
|
2116
|
+
},
|
|
2117
|
+
elegant: {
|
|
2118
|
+
popup: ["rounded-md bg-layer-popover shadow-xl"],
|
|
2119
|
+
separator: ["border-line-subtle"],
|
|
2120
|
+
title: ["font-sans font-medium text-foreground-strong"],
|
|
2121
|
+
description: ["bg-black/[0.015] font-sans", "text-[oklch(0.48_0_0)] dark:text-[oklch(0.76_0_0)]"],
|
|
2122
|
+
arrow: ["border-l border-t border-line-muted bg-layer-popover"]
|
|
2123
|
+
}
|
|
2124
|
+
} }
|
|
2125
|
+
});
|
|
2126
|
+
function PreviewCard(props) {
|
|
2127
|
+
return /* @__PURE__ */ jsx(PreviewCard$1.Root, {
|
|
2128
|
+
"data-slot": "preview-card",
|
|
2129
|
+
...props
|
|
2130
|
+
});
|
|
2131
|
+
}
|
|
2132
|
+
function PreviewCardTrigger({ delay = 80, closeDelay = 40, className, ...props }) {
|
|
2133
|
+
const { trigger } = previewCard({ theme: useThemeFamily() });
|
|
2134
|
+
return /* @__PURE__ */ jsx(PreviewCard$1.Trigger, {
|
|
2135
|
+
"data-slot": "preview-card-trigger",
|
|
2136
|
+
delay,
|
|
2137
|
+
closeDelay,
|
|
2138
|
+
className: trigger({ className }),
|
|
2139
|
+
...props
|
|
2140
|
+
});
|
|
2141
|
+
}
|
|
2142
|
+
function PreviewCardPortal(props) {
|
|
2143
|
+
return /* @__PURE__ */ jsx(PreviewCard$1.Portal, {
|
|
2144
|
+
"data-slot": "preview-card-portal",
|
|
2145
|
+
...props
|
|
2146
|
+
});
|
|
2147
|
+
}
|
|
2148
|
+
function PreviewCardPopup({ className, ...props }) {
|
|
2149
|
+
const { popup } = previewCard({ theme: useThemeFamily() });
|
|
2150
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2151
|
+
"data-slot": "preview-card-content",
|
|
2152
|
+
className: popup({ className }),
|
|
2153
|
+
...props
|
|
2154
|
+
});
|
|
2155
|
+
}
|
|
2156
|
+
function PreviewCardContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = true, positionMethod = "fixed", side = "bottom", sideOffset = 6, sticky, portalProps, className, ...props }) {
|
|
2157
|
+
const { positioner, popup } = previewCard({ theme: useThemeFamily() });
|
|
2158
|
+
return /* @__PURE__ */ jsx(PreviewCard$1.Portal, {
|
|
2159
|
+
...portalProps,
|
|
2160
|
+
children: /* @__PURE__ */ jsx(PreviewCard$1.Positioner, {
|
|
2161
|
+
align,
|
|
2162
|
+
alignOffset,
|
|
2163
|
+
anchor,
|
|
2164
|
+
arrowPadding,
|
|
2165
|
+
collisionAvoidance,
|
|
2166
|
+
collisionBoundary,
|
|
2167
|
+
collisionPadding,
|
|
2168
|
+
disableAnchorTracking,
|
|
2169
|
+
positionMethod,
|
|
2170
|
+
side,
|
|
2171
|
+
sideOffset,
|
|
2172
|
+
sticky,
|
|
2173
|
+
className: positioner(),
|
|
2174
|
+
children: /* @__PURE__ */ jsx(PreviewCard$1.Popup, {
|
|
2175
|
+
"data-slot": "preview-card-content",
|
|
2176
|
+
className: popup({ className }),
|
|
2177
|
+
...props
|
|
2178
|
+
})
|
|
2179
|
+
})
|
|
2180
|
+
});
|
|
2181
|
+
}
|
|
2182
|
+
function PreviewCardHeader({ className, ...props }) {
|
|
2183
|
+
const { header } = previewCard({ theme: useThemeFamily() });
|
|
2184
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2185
|
+
"data-slot": "preview-card-header",
|
|
2186
|
+
className: header({ className }),
|
|
2187
|
+
...props
|
|
2188
|
+
});
|
|
2189
|
+
}
|
|
2190
|
+
function PreviewCardSeparator({ className, ...props }) {
|
|
2191
|
+
const { separator } = previewCard({ theme: useThemeFamily() });
|
|
2192
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2193
|
+
role: "separator",
|
|
2194
|
+
"aria-orientation": "horizontal",
|
|
2195
|
+
"data-slot": "preview-card-separator",
|
|
2196
|
+
className: separator({ className }),
|
|
2197
|
+
...props
|
|
2198
|
+
});
|
|
2199
|
+
}
|
|
2200
|
+
function PreviewCardTitle({ className, ...props }) {
|
|
2201
|
+
const { title } = previewCard({ theme: useThemeFamily() });
|
|
2202
|
+
return /* @__PURE__ */ jsx("p", {
|
|
2203
|
+
"data-slot": "preview-card-title",
|
|
2204
|
+
className: title({ className }),
|
|
2205
|
+
...props
|
|
2206
|
+
});
|
|
2207
|
+
}
|
|
2208
|
+
function PreviewCardDescription({ className, ...props }) {
|
|
2209
|
+
const { description } = previewCard({ theme: useThemeFamily() });
|
|
2210
|
+
return /* @__PURE__ */ jsx("p", {
|
|
2211
|
+
"data-slot": "preview-card-description",
|
|
2212
|
+
className: description({ className }),
|
|
2213
|
+
...props
|
|
2214
|
+
});
|
|
2215
|
+
}
|
|
2216
|
+
function PreviewCardArrow({ className, ...props }) {
|
|
2217
|
+
const { arrow } = previewCard({ theme: useThemeFamily() });
|
|
2218
|
+
return /* @__PURE__ */ jsx(PreviewCard$1.Arrow, {
|
|
2219
|
+
"data-slot": "preview-card-arrow",
|
|
2220
|
+
className: arrow({ className }),
|
|
2221
|
+
...props
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2224
|
+
//#endregion
|
|
2681
2225
|
//#region src/components/label/label.tsx
|
|
2682
2226
|
const label = tv({
|
|
2683
2227
|
slots: {
|
|
@@ -4627,41 +4171,242 @@ const status = tv({
|
|
|
4627
4171
|
pulse: true,
|
|
4628
4172
|
class: { root: "animate-pulse" }
|
|
4629
4173
|
},
|
|
4630
|
-
{
|
|
4631
|
-
theme: "elegant",
|
|
4632
|
-
pulse: true,
|
|
4633
|
-
class: { root: "[animation:raft-status-pulse-background_1.4s_ease-out_infinite] motion-reduce:animate-none" }
|
|
4174
|
+
{
|
|
4175
|
+
theme: "elegant",
|
|
4176
|
+
pulse: true,
|
|
4177
|
+
class: { root: "[animation:raft-status-pulse-background_1.4s_ease-out_infinite] motion-reduce:animate-none" }
|
|
4178
|
+
}
|
|
4179
|
+
]
|
|
4180
|
+
});
|
|
4181
|
+
const statusStyle = /* @__PURE__ */ jsx("style", {
|
|
4182
|
+
href: "raft-ui-status",
|
|
4183
|
+
precedence: "default",
|
|
4184
|
+
children: STATUS_STYLE
|
|
4185
|
+
});
|
|
4186
|
+
function StatusRoot({ size, variant, pulse, className, render, ...props }) {
|
|
4187
|
+
const { root } = status({
|
|
4188
|
+
theme: useThemeFamily(),
|
|
4189
|
+
size,
|
|
4190
|
+
variant,
|
|
4191
|
+
pulse
|
|
4192
|
+
});
|
|
4193
|
+
return useRender({
|
|
4194
|
+
defaultTagName: "span",
|
|
4195
|
+
render,
|
|
4196
|
+
props: mergeProps({
|
|
4197
|
+
className: root({ className }),
|
|
4198
|
+
children: statusStyle
|
|
4199
|
+
}, props),
|
|
4200
|
+
state: {
|
|
4201
|
+
slot: "status",
|
|
4202
|
+
variant,
|
|
4203
|
+
pulse,
|
|
4204
|
+
size
|
|
4205
|
+
}
|
|
4206
|
+
});
|
|
4207
|
+
}
|
|
4208
|
+
const Status = StatusRoot;
|
|
4209
|
+
//#endregion
|
|
4210
|
+
//#region src/components/progress/progress.tsx
|
|
4211
|
+
const PROGRESS_STYLE = `
|
|
4212
|
+
@keyframes raft-progress-indeterminate {
|
|
4213
|
+
0% {
|
|
4214
|
+
transform: translateX(-65%) scaleX(0.35);
|
|
4215
|
+
}
|
|
4216
|
+
50% {
|
|
4217
|
+
transform: translateX(70%) scaleX(0.6);
|
|
4218
|
+
}
|
|
4219
|
+
100% {
|
|
4220
|
+
transform: translateX(185%) scaleX(0.35);
|
|
4221
|
+
}
|
|
4222
|
+
}
|
|
4223
|
+
|
|
4224
|
+
@media (prefers-reduced-motion: reduce) {
|
|
4225
|
+
[data-slot="progress-indicator"][data-indeterminate] {
|
|
4226
|
+
animation-duration: 2400ms;
|
|
4227
|
+
}
|
|
4228
|
+
}
|
|
4229
|
+
`;
|
|
4230
|
+
const progress = tv({
|
|
4231
|
+
slots: {
|
|
4232
|
+
root: [
|
|
4233
|
+
"group/progress grid w-full min-w-0 gap-1.5",
|
|
4234
|
+
"[--progress-color:var(--foreground-strong)]",
|
|
4235
|
+
"[--progress-light:var(--layer-muted)]",
|
|
4236
|
+
"[--progress-indicator:var(--progress-color)]",
|
|
4237
|
+
"[--progress-track:var(--layer-muted)]"
|
|
4238
|
+
],
|
|
4239
|
+
header: ["flex min-w-0 items-center justify-between gap-3"],
|
|
4240
|
+
label: ["min-w-0 truncate"],
|
|
4241
|
+
value: ["shrink-0 tabular-nums"],
|
|
4242
|
+
track: ["relative w-full overflow-hidden bg-[var(--progress-track)]"],
|
|
4243
|
+
indicator: [
|
|
4244
|
+
"block h-full bg-[var(--progress-indicator)]",
|
|
4245
|
+
"transition-[width,background-color] duration-200 ease-out",
|
|
4246
|
+
"data-[indeterminate]:absolute data-[indeterminate]:inset-y-0 data-[indeterminate]:w-1/2",
|
|
4247
|
+
"data-[indeterminate]:origin-left data-[indeterminate]:[animation:raft-progress-indeterminate_1.4s_ease-in-out_infinite]"
|
|
4248
|
+
]
|
|
4249
|
+
},
|
|
4250
|
+
variants: {
|
|
4251
|
+
theme: {
|
|
4252
|
+
brutal: {
|
|
4253
|
+
root: ["font-heading"],
|
|
4254
|
+
label: ["text-xs font-bold text-foreground-strong"],
|
|
4255
|
+
value: ["font-mono text-xs font-bold text-foreground/70"],
|
|
4256
|
+
track: [
|
|
4257
|
+
"border-2 border-line-strong bg-layer-panel",
|
|
4258
|
+
"shadow-xs",
|
|
4259
|
+
"group-data-[complete]/progress:shadow-none"
|
|
4260
|
+
]
|
|
4261
|
+
},
|
|
4262
|
+
elegant: {
|
|
4263
|
+
root: [
|
|
4264
|
+
"font-sans",
|
|
4265
|
+
"[--progress-indicator:color-mix(in_oklab,var(--progress-color)_90%,transparent)]",
|
|
4266
|
+
"[--progress-track:color-mix(in_oklab,var(--line-subtle)_35%,var(--layer-panel))]",
|
|
4267
|
+
"data-[indeterminate]:[--progress-track:color-mix(in_oklab,var(--line-subtle)_65%,var(--layer-panel))]"
|
|
4268
|
+
],
|
|
4269
|
+
label: ["text-[13px] font-medium leading-5 text-foreground"],
|
|
4270
|
+
value: ["font-mono text-[11px] font-medium leading-5 text-foreground-placeholder"],
|
|
4271
|
+
track: ["rounded-full"],
|
|
4272
|
+
indicator: ["rounded-full"]
|
|
4273
|
+
}
|
|
4274
|
+
},
|
|
4275
|
+
variant: {
|
|
4276
|
+
primary: { root: ["[--progress-color:var(--color-primary-400)]", "[--progress-light:var(--color-primary-200)]"] },
|
|
4277
|
+
information: { root: ["[--progress-color:var(--color-info-base)]", "[--progress-light:var(--color-info-light)]"] },
|
|
4278
|
+
accent: { root: ["[--progress-color:var(--color-accent-400)]", "[--progress-light:var(--color-accent-200)]"] },
|
|
4279
|
+
success: { root: ["[--progress-color:var(--color-success-base)]", "[--progress-light:var(--color-success-light)]"] },
|
|
4280
|
+
warning: { root: ["[--progress-color:var(--color-warning-base)]", "[--progress-light:var(--color-warning-light)]"] },
|
|
4281
|
+
danger: { root: ["[--progress-color:var(--color-danger-base)]", "[--progress-light:var(--color-danger-light)]"] }
|
|
4282
|
+
},
|
|
4283
|
+
size: {
|
|
4284
|
+
sm: { track: ["h-1.5"] },
|
|
4285
|
+
md: { track: ["h-2"] },
|
|
4286
|
+
lg: { track: ["h-2.5"] }
|
|
4287
|
+
}
|
|
4288
|
+
},
|
|
4289
|
+
defaultVariants: {
|
|
4290
|
+
variant: "primary",
|
|
4291
|
+
size: "md"
|
|
4292
|
+
},
|
|
4293
|
+
compoundVariants: [
|
|
4294
|
+
{
|
|
4295
|
+
theme: "brutal",
|
|
4296
|
+
size: "sm",
|
|
4297
|
+
class: { track: "h-3" }
|
|
4298
|
+
},
|
|
4299
|
+
{
|
|
4300
|
+
theme: "brutal",
|
|
4301
|
+
size: "md",
|
|
4302
|
+
class: { track: "h-4" }
|
|
4303
|
+
},
|
|
4304
|
+
{
|
|
4305
|
+
theme: "brutal",
|
|
4306
|
+
size: "lg",
|
|
4307
|
+
class: { track: "h-5" }
|
|
4308
|
+
}
|
|
4309
|
+
]
|
|
4310
|
+
});
|
|
4311
|
+
const progressStyle = /* @__PURE__ */ jsx("style", {
|
|
4312
|
+
href: "raft-ui-progress",
|
|
4313
|
+
precedence: "default",
|
|
4314
|
+
children: PROGRESS_STYLE
|
|
4315
|
+
});
|
|
4316
|
+
function Progress({ size = "md", variant = "primary", className, ...props }) {
|
|
4317
|
+
const { root } = progress({
|
|
4318
|
+
theme: useThemeFamily(),
|
|
4319
|
+
size,
|
|
4320
|
+
variant
|
|
4321
|
+
});
|
|
4322
|
+
return /* @__PURE__ */ jsx(Progress$1.Root, {
|
|
4323
|
+
"data-slot": "progress",
|
|
4324
|
+
"data-size": size,
|
|
4325
|
+
"data-variant": variant,
|
|
4326
|
+
className: root({ className }),
|
|
4327
|
+
...props
|
|
4328
|
+
});
|
|
4329
|
+
}
|
|
4330
|
+
function ProgressHeader({ className, ...props }) {
|
|
4331
|
+
const { header } = progress({ theme: useThemeFamily() });
|
|
4332
|
+
return /* @__PURE__ */ jsx("div", {
|
|
4333
|
+
"data-slot": "progress-header",
|
|
4334
|
+
className: header({ className }),
|
|
4335
|
+
...props
|
|
4336
|
+
});
|
|
4337
|
+
}
|
|
4338
|
+
function ProgressLabel({ className, ...props }) {
|
|
4339
|
+
const { label } = progress({ theme: useThemeFamily() });
|
|
4340
|
+
return /* @__PURE__ */ jsx(Progress$1.Label, {
|
|
4341
|
+
"data-slot": "progress-label",
|
|
4342
|
+
className: label({ className }),
|
|
4343
|
+
...props
|
|
4344
|
+
});
|
|
4345
|
+
}
|
|
4346
|
+
function ProgressValue({ className, ...props }) {
|
|
4347
|
+
const { value } = progress({ theme: useThemeFamily() });
|
|
4348
|
+
return /* @__PURE__ */ jsx(Progress$1.Value, {
|
|
4349
|
+
"data-slot": "progress-value",
|
|
4350
|
+
className: value({ className }),
|
|
4351
|
+
...props
|
|
4352
|
+
});
|
|
4353
|
+
}
|
|
4354
|
+
function ProgressTrack({ className, ...props }) {
|
|
4355
|
+
const { track } = progress({ theme: useThemeFamily() });
|
|
4356
|
+
return /* @__PURE__ */ jsx(Progress$1.Track, {
|
|
4357
|
+
"data-slot": "progress-track",
|
|
4358
|
+
className: track({ className }),
|
|
4359
|
+
...props
|
|
4360
|
+
});
|
|
4361
|
+
}
|
|
4362
|
+
function ProgressIndicator({ className, ...props }) {
|
|
4363
|
+
const { indicator } = progress({ theme: useThemeFamily() });
|
|
4364
|
+
return /* @__PURE__ */ jsx(Progress$1.Indicator, {
|
|
4365
|
+
"data-slot": "progress-indicator",
|
|
4366
|
+
className: indicator({ className }),
|
|
4367
|
+
...props,
|
|
4368
|
+
children: progressStyle
|
|
4369
|
+
});
|
|
4370
|
+
}
|
|
4371
|
+
//#endregion
|
|
4372
|
+
//#region src/components/skeleton/skeleton.tsx
|
|
4373
|
+
const skeleton = tv({
|
|
4374
|
+
slots: { root: ["animate-pulse", "aria-hidden:pointer-events-none"] },
|
|
4375
|
+
variants: {
|
|
4376
|
+
theme: {
|
|
4377
|
+
brutal: { root: ["data-[variant=line]:bg-black/10", "data-[variant=block]:bg-black/10"] },
|
|
4378
|
+
elegant: { root: ["data-[variant=line]:rounded-full data-[variant=line]:bg-foreground/[0.08]", "data-[variant=block]:rounded-md data-[variant=block]:bg-foreground/[0.08]"] }
|
|
4379
|
+
},
|
|
4380
|
+
variant: {
|
|
4381
|
+
line: { root: "h-3" },
|
|
4382
|
+
block: { root: "" },
|
|
4383
|
+
circle: { root: "rounded-full" }
|
|
4634
4384
|
}
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4385
|
+
},
|
|
4386
|
+
compoundVariants: [{
|
|
4387
|
+
theme: "brutal",
|
|
4388
|
+
variant: "circle",
|
|
4389
|
+
class: { root: "bg-black/10" }
|
|
4390
|
+
}, {
|
|
4391
|
+
theme: "elegant",
|
|
4392
|
+
variant: "circle",
|
|
4393
|
+
class: { root: "bg-foreground/[0.08]" }
|
|
4394
|
+
}],
|
|
4395
|
+
defaultVariants: { variant: "block" }
|
|
4641
4396
|
});
|
|
4642
|
-
function
|
|
4643
|
-
const { root } =
|
|
4397
|
+
function Skeleton({ variant = "block", className, ...props }) {
|
|
4398
|
+
const { root } = skeleton({
|
|
4644
4399
|
theme: useThemeFamily(),
|
|
4645
|
-
|
|
4646
|
-
variant,
|
|
4647
|
-
pulse
|
|
4400
|
+
variant
|
|
4648
4401
|
});
|
|
4649
|
-
return
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
}, props),
|
|
4656
|
-
state: {
|
|
4657
|
-
slot: "status",
|
|
4658
|
-
variant,
|
|
4659
|
-
pulse,
|
|
4660
|
-
size
|
|
4661
|
-
}
|
|
4402
|
+
return /* @__PURE__ */ jsx("div", {
|
|
4403
|
+
"aria-hidden": "true",
|
|
4404
|
+
"data-slot": "skeleton",
|
|
4405
|
+
"data-variant": variant,
|
|
4406
|
+
className: root({ className }),
|
|
4407
|
+
...props
|
|
4662
4408
|
});
|
|
4663
4409
|
}
|
|
4664
|
-
const Status = StatusRoot;
|
|
4665
4410
|
//#endregion
|
|
4666
4411
|
//#region src/components/banner/banner.tsx
|
|
4667
4412
|
const banner = tv({
|
|
@@ -5329,6 +5074,478 @@ function NotificationCenterEmptyState(props) {
|
|
|
5329
5074
|
});
|
|
5330
5075
|
}
|
|
5331
5076
|
//#endregion
|
|
5077
|
+
//#region src/components/toast/toast.tsx
|
|
5078
|
+
const toastStyles = tv({
|
|
5079
|
+
slots: {
|
|
5080
|
+
viewport: ["pointer-events-none isolate z-[70] w-[min(24rem,calc(100vw-2rem))]", "outline-none"],
|
|
5081
|
+
positioner: ["isolate z-[70] outline-none"],
|
|
5082
|
+
root: [
|
|
5083
|
+
"group/toast pointer-events-auto",
|
|
5084
|
+
"select-text overflow-hidden text-foreground-strong",
|
|
5085
|
+
"outline outline-1 outline-offset-2 outline-transparent",
|
|
5086
|
+
"[--toast-scale:calc(max(0.84,1-(var(--toast-index)*0.04)))]",
|
|
5087
|
+
"[--toast-peek:0.5rem]",
|
|
5088
|
+
"[--toast-gap:0.5rem]",
|
|
5089
|
+
"[--toast-stack-height:var(--toast-frontmost-height,var(--toast-height))]",
|
|
5090
|
+
"[--toast-y:calc((var(--toast-offset-y)*-1)-(var(--toast-index)*var(--toast-gap))+var(--toast-swipe-movement-y))]",
|
|
5091
|
+
"transition-[transform,opacity,height] duration-[220ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
5092
|
+
"data-[limited]:opacity-0",
|
|
5093
|
+
"data-[starting-style]:opacity-0",
|
|
5094
|
+
"data-[ending-style]:opacity-0",
|
|
5095
|
+
"motion-reduce:transition-none"
|
|
5096
|
+
],
|
|
5097
|
+
content: [
|
|
5098
|
+
"relative grid grid-cols-[minmax(0,1fr)] items-center gap-x-3 overflow-hidden",
|
|
5099
|
+
"[&:has([data-slot=toast-description])_[data-slot=toast-body]]:self-start [&:has([data-slot=toast-description])_[data-slot=toast-icon]]:self-start",
|
|
5100
|
+
"[&:not(:has([data-slot=toast-icon])):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:min-h-[var(--toast-title-only-min-h,2.25rem)]",
|
|
5101
|
+
"[&:not(:has([data-slot=toast-icon])):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:min-w-[var(--toast-title-only-min-w,7rem)]",
|
|
5102
|
+
"[&:not(:has([data-slot=toast-icon])):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:px-[var(--toast-title-only-px,0.75rem)]",
|
|
5103
|
+
"[&:not(:has([data-slot=toast-icon])):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:py-[var(--toast-title-only-py,0.5rem)]",
|
|
5104
|
+
"[&:not(:has([data-slot=toast-description]))>[data-slot=toast-body]:only-child]:justify-self-center [&:not(:has([data-slot=toast-description]))>[data-slot=toast-body]:only-child]:text-center",
|
|
5105
|
+
"transition-opacity duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
5106
|
+
"data-[behind]:opacity-0 data-[expanded]:opacity-100",
|
|
5107
|
+
"motion-reduce:transition-none"
|
|
5108
|
+
],
|
|
5109
|
+
icon: ["flex size-5 shrink-0 items-center justify-center", "[&_svg]:size-3.5 [&_svg]:shrink-0"],
|
|
5110
|
+
body: ["min-w-0"],
|
|
5111
|
+
title: ["m-0 truncate text-sm leading-5"],
|
|
5112
|
+
description: ["m-0 text-sm leading-5"],
|
|
5113
|
+
actions: ["flex items-center justify-end gap-1.5"],
|
|
5114
|
+
close: [
|
|
5115
|
+
"absolute top-1.5 right-1.5 inline-flex size-7 shrink-0 items-center justify-center",
|
|
5116
|
+
"outline outline-1 outline-offset-2 outline-transparent",
|
|
5117
|
+
"transition-[background-color,color,border-color,box-shadow,transform] duration-150",
|
|
5118
|
+
"disabled:pointer-events-none disabled:opacity-40",
|
|
5119
|
+
"focus-visible:outline-line-strong",
|
|
5120
|
+
"[&_svg]:size-3.5"
|
|
5121
|
+
],
|
|
5122
|
+
arrow: [
|
|
5123
|
+
"pointer-events-none flex",
|
|
5124
|
+
"data-[side=top]:bottom-[-6px]",
|
|
5125
|
+
"data-[side=bottom]:top-[-6px] data-[side=bottom]:rotate-180",
|
|
5126
|
+
"data-[side=left]:right-[-8px] data-[side=left]:-rotate-90",
|
|
5127
|
+
"data-[side=right]:left-[-8px] data-[side=right]:rotate-90",
|
|
5128
|
+
"data-[side=inline-start]:right-[-8px] data-[side=inline-start]:-rotate-90",
|
|
5129
|
+
"data-[side=inline-end]:left-[-8px] data-[side=inline-end]:rotate-90"
|
|
5130
|
+
]
|
|
5131
|
+
},
|
|
5132
|
+
variants: {
|
|
5133
|
+
theme: {
|
|
5134
|
+
brutal: {
|
|
5135
|
+
root: ["border-2 border-black bg-soft-signal text-black shadow-[var(--shadow-brutal)]", "focus-visible:outline-transparent"],
|
|
5136
|
+
content: [
|
|
5137
|
+
"min-h-0 min-w-0 grid-cols-1 px-3 py-2 font-sans",
|
|
5138
|
+
"gap-y-1.5",
|
|
5139
|
+
"[&:has([data-slot=toast-icon])]:grid-cols-[auto_minmax(0,1fr)]"
|
|
5140
|
+
],
|
|
5141
|
+
icon: ["size-7 border-2 border-black bg-white p-1.5 text-black shadow-[2px_2px_0_0_black]", "[&_svg]:size-4 [&_svg]:stroke-[2.5]"],
|
|
5142
|
+
title: ["font-bold text-black"],
|
|
5143
|
+
description: ["font-semibold text-black/75"],
|
|
5144
|
+
actions: ["col-start-1 row-start-2 col-span-full w-full justify-self-stretch justify-end gap-1"],
|
|
5145
|
+
close: ["static order-1 size-auto min-h-7 shrink-0 whitespace-nowrap border-2 border-line-strong bg-white px-2 text-xs font-bold text-black/70 shadow-xs", "hover:bg-brutal-yellow hover:text-black active:translate-x-px active:translate-y-px active:shadow-none"],
|
|
5146
|
+
arrow: ["hidden"]
|
|
5147
|
+
},
|
|
5148
|
+
elegant: {
|
|
5149
|
+
root: [
|
|
5150
|
+
"relative rounded-xl bg-[oklch(0.263_0.009_294.9_/_0.50)] text-[oklch(0.965_0.002_286)] backdrop-blur-2xl saturate-150",
|
|
5151
|
+
"shadow-[0_18px_42px_-18px_oklch(0_0_0_/_0.54)]",
|
|
5152
|
+
"data-[expanded]:bg-[oklch(0.254_0.010_298_/_0.54)] data-[expanded]:shadow-[0_18px_40px_-18px_oklch(0_0_0_/_0.54)]",
|
|
5153
|
+
"after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-white/35 after:mix-blend-overlay after:content-['']",
|
|
5154
|
+
"dark:bg-[oklch(0.230_0.010_294.8_/_0.50)] dark:shadow-[0_18px_42px_-18px_oklch(0_0_0_/_0.68)] dark:data-[expanded]:bg-[oklch(0.220_0.010_294.7_/_0.54)]"
|
|
5155
|
+
],
|
|
5156
|
+
content: [
|
|
5157
|
+
"gap-x-3.5 font-sans",
|
|
5158
|
+
"[&:has([data-slot=toast-icon])]:grid-cols-[auto_minmax(0,1fr)]",
|
|
5159
|
+
"[&:has([data-slot=toast-actions])]:min-w-[18rem]",
|
|
5160
|
+
"[&:has([data-slot=toast-actions])]:min-h-14",
|
|
5161
|
+
"[&:has([data-slot=toast-actions])]:py-3",
|
|
5162
|
+
"[&:has([data-slot=toast-actions])]:pl-3.5",
|
|
5163
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:min-h-14",
|
|
5164
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:min-w-[18rem]",
|
|
5165
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:py-3",
|
|
5166
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:pl-3.5",
|
|
5167
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-icon])]:min-h-14",
|
|
5168
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-icon])]:min-w-[18rem]",
|
|
5169
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-icon])]:py-3",
|
|
5170
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-icon])]:pl-3.5",
|
|
5171
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-close])]:min-h-14",
|
|
5172
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-close])]:min-w-[18rem]",
|
|
5173
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-close])]:py-3",
|
|
5174
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-close])]:pl-3.5",
|
|
5175
|
+
"[&:has([data-slot=toast-close])]:pr-3",
|
|
5176
|
+
"[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:min-w-0",
|
|
5177
|
+
"[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:min-h-10",
|
|
5178
|
+
"[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:pl-3.5",
|
|
5179
|
+
"[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:py-2",
|
|
5180
|
+
"[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:pr-3.5",
|
|
5181
|
+
"[&:has([data-slot=toast-actions])]:grid-cols-[minmax(0,1fr)]",
|
|
5182
|
+
"[&:has([data-slot=toast-actions])]:gap-y-2",
|
|
5183
|
+
"[&:has([data-slot=toast-icon]):has([data-slot=toast-actions])]:grid-cols-[auto_minmax(0,1fr)]"
|
|
5184
|
+
],
|
|
5185
|
+
icon: ["text-white/85", "[&_svg]:size-[1.125rem] [&_svg]:stroke-[1.5]"],
|
|
5186
|
+
title: ["font-medium text-[oklch(0.985_0.001_286)]"],
|
|
5187
|
+
description: ["text-white/62"],
|
|
5188
|
+
actions: ["col-start-1 row-start-2 col-span-full w-full justify-self-stretch justify-end"],
|
|
5189
|
+
close: ["static order-1 size-auto min-h-7 shrink-0 whitespace-nowrap rounded-full border-0 bg-transparent px-2 text-xs font-medium text-white/52 shadow-none", "hover:bg-white/[0.05] hover:text-white/72 active:scale-[0.985]"],
|
|
5190
|
+
arrow: []
|
|
5191
|
+
}
|
|
5192
|
+
},
|
|
5193
|
+
placement: {
|
|
5194
|
+
"bottom-center": { viewport: "bottom-4 left-1/2 -translate-x-1/2" },
|
|
5195
|
+
"bottom-right": { viewport: "right-4 bottom-4" },
|
|
5196
|
+
"top-center": { viewport: "top-4 left-1/2 -translate-x-1/2" },
|
|
5197
|
+
"top-right": { viewport: "top-4 right-4" },
|
|
5198
|
+
none: { viewport: "contents" }
|
|
5199
|
+
},
|
|
5200
|
+
strategy: {
|
|
5201
|
+
fixed: { viewport: "fixed" },
|
|
5202
|
+
absolute: { viewport: "absolute" }
|
|
5203
|
+
},
|
|
5204
|
+
layout: {
|
|
5205
|
+
stacked: { root: [
|
|
5206
|
+
"absolute right-0 bottom-0 left-0 mx-auto h-[var(--toast-stack-height)] w-full origin-bottom",
|
|
5207
|
+
"z-[calc(70-var(--toast-index))]",
|
|
5208
|
+
"[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))))_scale(var(--toast-scale))]",
|
|
5209
|
+
"data-[expanded]:h-[var(--toast-height)]",
|
|
5210
|
+
"data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-y))_scale(1)]",
|
|
5211
|
+
"data-[starting-style]:[transform:translateY(120%)_scale(0.98)]",
|
|
5212
|
+
"[&[data-ending-style]:not([data-swipe-direction])]:[transform:translateY(120%)_scale(0.98)]",
|
|
5213
|
+
"data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+120%))_translateY(var(--toast-y))]",
|
|
5214
|
+
"data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-120%))_translateY(var(--toast-y))]",
|
|
5215
|
+
"data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+120%))]",
|
|
5216
|
+
"data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-120%))]"
|
|
5217
|
+
] },
|
|
5218
|
+
inline: { root: [
|
|
5219
|
+
"relative mx-auto w-max max-w-[min(24rem,var(--available-width,calc(100vw-2rem)))] overflow-visible",
|
|
5220
|
+
"origin-[var(--transform-origin)]",
|
|
5221
|
+
"data-[starting-style]:[transform:scale(0.97)]",
|
|
5222
|
+
"data-[ending-style]:[transform:scale(0.99)]"
|
|
5223
|
+
] }
|
|
5224
|
+
},
|
|
5225
|
+
tone: {
|
|
5226
|
+
info: {},
|
|
5227
|
+
success: {},
|
|
5228
|
+
warning: {},
|
|
5229
|
+
error: {}
|
|
5230
|
+
}
|
|
5231
|
+
},
|
|
5232
|
+
defaultVariants: {
|
|
5233
|
+
placement: "bottom-center",
|
|
5234
|
+
layout: "stacked",
|
|
5235
|
+
strategy: "fixed"
|
|
5236
|
+
},
|
|
5237
|
+
compoundVariants: [
|
|
5238
|
+
{
|
|
5239
|
+
theme: "brutal",
|
|
5240
|
+
tone: "success",
|
|
5241
|
+
class: { root: "bg-brutal-lime" }
|
|
5242
|
+
},
|
|
5243
|
+
{
|
|
5244
|
+
theme: "brutal",
|
|
5245
|
+
tone: "warning",
|
|
5246
|
+
class: { root: "bg-brutal-orange" }
|
|
5247
|
+
},
|
|
5248
|
+
{
|
|
5249
|
+
theme: "brutal",
|
|
5250
|
+
tone: "error",
|
|
5251
|
+
class: { root: "bg-brutal-orange shadow-[var(--shadow-brutal-sm)]" }
|
|
5252
|
+
},
|
|
5253
|
+
{
|
|
5254
|
+
theme: "brutal",
|
|
5255
|
+
layout: "stacked",
|
|
5256
|
+
class: { root: "w-max max-w-full" }
|
|
5257
|
+
}
|
|
5258
|
+
]
|
|
5259
|
+
});
|
|
5260
|
+
const toastAction = tv({
|
|
5261
|
+
extend: buttonVariants,
|
|
5262
|
+
slots: { root: [
|
|
5263
|
+
"inline-flex min-h-7 shrink-0 items-center justify-center whitespace-nowrap px-2 text-xs leading-none",
|
|
5264
|
+
"font-sans shadow-none",
|
|
5265
|
+
"outline outline-1 outline-offset-2 outline-transparent",
|
|
5266
|
+
"transition-[background-color,color,border-color,box-shadow,transform] duration-150",
|
|
5267
|
+
"disabled:pointer-events-none disabled:opacity-40 data-[loading=true]:opacity-100",
|
|
5268
|
+
"focus-visible:outline-line-strong",
|
|
5269
|
+
"[&_[data-icon]]:size-[1em] [&_svg:not([class*='size-'])]:size-3"
|
|
5270
|
+
] },
|
|
5271
|
+
variants: { toastTheme: {
|
|
5272
|
+
brutal: { root: ["order-2 border-2 border-line-strong bg-black font-bold text-white shadow-xs", "hover:bg-black/85 active:translate-x-px active:translate-y-px active:shadow-none"] },
|
|
5273
|
+
elegant: { root: [
|
|
5274
|
+
"toast-gradient-border order-2 min-h-7 rounded-full bg-white/[0.06] px-3 font-medium text-white/74",
|
|
5275
|
+
"[--toast-gradient-border-angle:to_bottom] [--toast-gradient-border-from:rgb(255_255_255_/_0.1)] [--toast-gradient-border-to:rgb(255_255_255_/_0)] [--toast-gradient-border-via:rgb(255_255_255_/_0.05)]",
|
|
5276
|
+
"hover:bg-white/[0.075] hover:text-white/88 hover:[--toast-gradient-border-from:rgb(255_255_255_/_0.24)] hover:[--toast-gradient-border-via:rgb(255_255_255_/_0.08)] active:scale-[0.985]"
|
|
5277
|
+
] }
|
|
5278
|
+
} },
|
|
5279
|
+
defaultVariants: {
|
|
5280
|
+
variant: void 0,
|
|
5281
|
+
size: void 0
|
|
5282
|
+
}
|
|
5283
|
+
});
|
|
5284
|
+
const createToastManager = Toast.createToastManager;
|
|
5285
|
+
const useToastManager = Toast.useToastManager;
|
|
5286
|
+
const defaultToastManager = createToastManager();
|
|
5287
|
+
function addDefaultToast(intent, title, options = {}) {
|
|
5288
|
+
const { action, dismissible, icon, priority, ...toastOptions } = options;
|
|
5289
|
+
return defaultToastManager.add({
|
|
5290
|
+
...toastOptions,
|
|
5291
|
+
actionProps: action ? {
|
|
5292
|
+
children: action.label,
|
|
5293
|
+
onClick: action.onClick
|
|
5294
|
+
} : void 0,
|
|
5295
|
+
title,
|
|
5296
|
+
type: intent,
|
|
5297
|
+
priority: priority ?? (intent === "error" ? "high" : void 0),
|
|
5298
|
+
data: {
|
|
5299
|
+
intent,
|
|
5300
|
+
hasClose: dismissible,
|
|
5301
|
+
hasIcon: icon
|
|
5302
|
+
}
|
|
5303
|
+
});
|
|
5304
|
+
}
|
|
5305
|
+
const toast = {
|
|
5306
|
+
add(options) {
|
|
5307
|
+
const { title, type = "info", ...toastOptions } = options;
|
|
5308
|
+
return addDefaultToast(type, title, toastOptions);
|
|
5309
|
+
},
|
|
5310
|
+
info(title, options) {
|
|
5311
|
+
return addDefaultToast("info", title, options);
|
|
5312
|
+
},
|
|
5313
|
+
success(title, options) {
|
|
5314
|
+
return addDefaultToast("success", title, options);
|
|
5315
|
+
},
|
|
5316
|
+
warning(title, options) {
|
|
5317
|
+
return addDefaultToast("warning", title, options);
|
|
5318
|
+
},
|
|
5319
|
+
error(title, options) {
|
|
5320
|
+
return addDefaultToast("error", title, options);
|
|
5321
|
+
},
|
|
5322
|
+
dismiss(id) {
|
|
5323
|
+
return defaultToastManager.close(id);
|
|
5324
|
+
}
|
|
5325
|
+
};
|
|
5326
|
+
function getToastTone(type) {
|
|
5327
|
+
if (type === "success" || type === "warning" || type === "error") return type;
|
|
5328
|
+
return "info";
|
|
5329
|
+
}
|
|
5330
|
+
function ToastProvider({ children, portalContainer, renderViewport = true, toastManager = defaultToastManager, viewportClassName, viewportPlacement = "bottom-center", viewportStrategy = "fixed", ...props }) {
|
|
5331
|
+
return /* @__PURE__ */ jsxs(Toast.Provider, {
|
|
5332
|
+
toastManager,
|
|
5333
|
+
...props,
|
|
5334
|
+
children: [children, renderViewport ? /* @__PURE__ */ jsx(DefaultToastLayer, {
|
|
5335
|
+
placement: viewportPlacement,
|
|
5336
|
+
portalContainer,
|
|
5337
|
+
strategy: viewportStrategy,
|
|
5338
|
+
viewportClassName
|
|
5339
|
+
}) : null]
|
|
5340
|
+
});
|
|
5341
|
+
}
|
|
5342
|
+
function ToastPortal(props) {
|
|
5343
|
+
return /* @__PURE__ */ jsx(Toast.Portal, {
|
|
5344
|
+
"data-slot": "toast-portal",
|
|
5345
|
+
...props
|
|
5346
|
+
});
|
|
5347
|
+
}
|
|
5348
|
+
function ToastViewport({ placement = "bottom-center", strategy = "fixed", className, ...props }) {
|
|
5349
|
+
const { viewport } = toastStyles({
|
|
5350
|
+
theme: useThemeFamily(),
|
|
5351
|
+
placement,
|
|
5352
|
+
strategy
|
|
5353
|
+
});
|
|
5354
|
+
return /* @__PURE__ */ jsx(Toast.Viewport, {
|
|
5355
|
+
"data-slot": "toast-viewport",
|
|
5356
|
+
className: viewport({ className }),
|
|
5357
|
+
...props
|
|
5358
|
+
});
|
|
5359
|
+
}
|
|
5360
|
+
function ToastPositioner({ className, ...props }) {
|
|
5361
|
+
const { positioner } = toastStyles({ theme: useThemeFamily() });
|
|
5362
|
+
return /* @__PURE__ */ jsx(Toast.Positioner, {
|
|
5363
|
+
"data-slot": "toast-positioner",
|
|
5364
|
+
className: positioner({ className }),
|
|
5365
|
+
...props
|
|
5366
|
+
});
|
|
5367
|
+
}
|
|
5368
|
+
function ToastRoot({ layout = "stacked", className, toast: toastObject, ...props }) {
|
|
5369
|
+
const { root } = toastStyles({
|
|
5370
|
+
theme: useThemeFamily(),
|
|
5371
|
+
layout,
|
|
5372
|
+
tone: getToastTone(toastObject.type)
|
|
5373
|
+
});
|
|
5374
|
+
return /* @__PURE__ */ jsx(Toast.Root, {
|
|
5375
|
+
"data-slot": "toast",
|
|
5376
|
+
"data-toast-type": toastObject.type ?? "info",
|
|
5377
|
+
toast: toastObject,
|
|
5378
|
+
className: root({ className }),
|
|
5379
|
+
...props
|
|
5380
|
+
});
|
|
5381
|
+
}
|
|
5382
|
+
function ToastContent({ children, className, ...props }) {
|
|
5383
|
+
const { content } = toastStyles({ theme: useThemeFamily() });
|
|
5384
|
+
return /* @__PURE__ */ jsx(Toast.Content, {
|
|
5385
|
+
"data-slot": "toast-content",
|
|
5386
|
+
className: content({ className }),
|
|
5387
|
+
...props,
|
|
5388
|
+
children
|
|
5389
|
+
});
|
|
5390
|
+
}
|
|
5391
|
+
function ToastIcon({ className, ...props }) {
|
|
5392
|
+
const { icon } = toastStyles({ theme: useThemeFamily() });
|
|
5393
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5394
|
+
"data-slot": "toast-icon",
|
|
5395
|
+
className: icon({ className }),
|
|
5396
|
+
...props
|
|
5397
|
+
});
|
|
5398
|
+
}
|
|
5399
|
+
function ToastBody({ className, ...props }) {
|
|
5400
|
+
const { body } = toastStyles({ theme: useThemeFamily() });
|
|
5401
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5402
|
+
"data-slot": "toast-body",
|
|
5403
|
+
className: body({ className }),
|
|
5404
|
+
...props
|
|
5405
|
+
});
|
|
5406
|
+
}
|
|
5407
|
+
function ToastActions({ className, ...props }) {
|
|
5408
|
+
const { actions } = toastStyles({ theme: useThemeFamily() });
|
|
5409
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5410
|
+
"data-slot": "toast-actions",
|
|
5411
|
+
className: actions({ className }),
|
|
5412
|
+
...props
|
|
5413
|
+
});
|
|
5414
|
+
}
|
|
5415
|
+
function ToastTitle({ className, ...props }) {
|
|
5416
|
+
const { title } = toastStyles({ theme: useThemeFamily() });
|
|
5417
|
+
return /* @__PURE__ */ jsx(Toast.Title, {
|
|
5418
|
+
"data-slot": "toast-title",
|
|
5419
|
+
className: title({ className }),
|
|
5420
|
+
...props
|
|
5421
|
+
});
|
|
5422
|
+
}
|
|
5423
|
+
function ToastDescription({ className, ...props }) {
|
|
5424
|
+
const { description } = toastStyles({ theme: useThemeFamily() });
|
|
5425
|
+
return /* @__PURE__ */ jsx(Toast.Description, {
|
|
5426
|
+
"data-slot": "toast-description",
|
|
5427
|
+
className: description({ className }),
|
|
5428
|
+
...props
|
|
5429
|
+
});
|
|
5430
|
+
}
|
|
5431
|
+
function ToastAction({ className, children, disabled, loading = false, loadingLabel = "Loading", render, ...props }) {
|
|
5432
|
+
const { root, content, loadingIndicator } = toastAction({ toastTheme: useThemeFamily() });
|
|
5433
|
+
const renderActionContent = (actionChildren) => /* @__PURE__ */ jsxs(Fragment$1, { children: [loading ? /* @__PURE__ */ jsx("span", {
|
|
5434
|
+
"data-slot": "toast-action-loading-indicator",
|
|
5435
|
+
className: loadingIndicator(),
|
|
5436
|
+
children: /* @__PURE__ */ jsx(Spinner, { "aria-label": loadingLabel })
|
|
5437
|
+
}) : null, /* @__PURE__ */ jsx("span", {
|
|
5438
|
+
"data-slot": "toast-action-content",
|
|
5439
|
+
"data-loading": loading ? "true" : void 0,
|
|
5440
|
+
className: content(),
|
|
5441
|
+
children: actionChildren
|
|
5442
|
+
})] });
|
|
5443
|
+
const renderAction = (renderProps, state) => {
|
|
5444
|
+
const actionChildren = renderActionContent(renderProps.children);
|
|
5445
|
+
const nextRenderProps = {
|
|
5446
|
+
...renderProps,
|
|
5447
|
+
children: actionChildren
|
|
5448
|
+
};
|
|
5449
|
+
if (typeof render === "function") return render(nextRenderProps, state);
|
|
5450
|
+
if (isValidElement(render)) {
|
|
5451
|
+
const renderElement = render;
|
|
5452
|
+
return cloneElement(renderElement, {
|
|
5453
|
+
...nextRenderProps,
|
|
5454
|
+
className: cn(renderProps.className, renderElement.props.className),
|
|
5455
|
+
children: actionChildren
|
|
5456
|
+
});
|
|
5457
|
+
}
|
|
5458
|
+
return /* @__PURE__ */ jsx("button", { ...nextRenderProps });
|
|
5459
|
+
};
|
|
5460
|
+
return /* @__PURE__ */ jsx(Toast.Action, {
|
|
5461
|
+
"data-slot": "toast-action",
|
|
5462
|
+
"data-loading": loading ? "true" : void 0,
|
|
5463
|
+
className: root({ className }),
|
|
5464
|
+
disabled: disabled || loading,
|
|
5465
|
+
"aria-disabled": loading || void 0,
|
|
5466
|
+
render: renderAction,
|
|
5467
|
+
...props,
|
|
5468
|
+
children
|
|
5469
|
+
});
|
|
5470
|
+
}
|
|
5471
|
+
function ToastClose({ className, children, ...props }) {
|
|
5472
|
+
const { close } = toastStyles({ theme: useThemeFamily() });
|
|
5473
|
+
const usesDefaultText = children == null;
|
|
5474
|
+
return /* @__PURE__ */ jsx(Toast.Close, {
|
|
5475
|
+
"aria-label": usesDefaultText ? void 0 : "Dismiss toast",
|
|
5476
|
+
"data-slot": "toast-close",
|
|
5477
|
+
className: close({ className }),
|
|
5478
|
+
...props,
|
|
5479
|
+
children: children ?? "Dismiss"
|
|
5480
|
+
});
|
|
5481
|
+
}
|
|
5482
|
+
function ToastArrow({ className, ...props }) {
|
|
5483
|
+
const theme = useThemeFamily();
|
|
5484
|
+
const { arrow } = toastStyles({ theme });
|
|
5485
|
+
return /* @__PURE__ */ jsx(Toast.Arrow, {
|
|
5486
|
+
"data-slot": "toast-arrow",
|
|
5487
|
+
className: arrow({ className }),
|
|
5488
|
+
...props,
|
|
5489
|
+
children: /* @__PURE__ */ jsx(ToastArrowSvg, { theme })
|
|
5490
|
+
});
|
|
5491
|
+
}
|
|
5492
|
+
function DefaultToastLayer({ placement, portalContainer, strategy, viewportClassName }) {
|
|
5493
|
+
return /* @__PURE__ */ jsx(ToastPortal, {
|
|
5494
|
+
container: portalContainer,
|
|
5495
|
+
children: /* @__PURE__ */ jsx(ToastViewport, {
|
|
5496
|
+
placement,
|
|
5497
|
+
strategy,
|
|
5498
|
+
className: viewportClassName,
|
|
5499
|
+
children: /* @__PURE__ */ jsx(DefaultToastList, {})
|
|
5500
|
+
})
|
|
5501
|
+
});
|
|
5502
|
+
}
|
|
5503
|
+
function DefaultToastList() {
|
|
5504
|
+
const { toasts } = useToastManager();
|
|
5505
|
+
return toasts.map((toastObject) => /* @__PURE__ */ jsx(DefaultToastItem, { toast: toastObject }, toastObject.id));
|
|
5506
|
+
}
|
|
5507
|
+
function DefaultToastItem({ toast: toastObject }) {
|
|
5508
|
+
const showDescription = Boolean(toastObject.description);
|
|
5509
|
+
const showAction = Boolean(toastObject.actionProps?.children);
|
|
5510
|
+
const showClose = toastObject.data?.hasClose !== false;
|
|
5511
|
+
const showIcon = toastObject.data?.hasIcon !== false;
|
|
5512
|
+
return /* @__PURE__ */ jsx(ToastRoot, {
|
|
5513
|
+
toast: toastObject,
|
|
5514
|
+
layout: !showIcon && !showDescription && !showAction && !showClose ? "inline" : "stacked",
|
|
5515
|
+
children: /* @__PURE__ */ jsxs(ToastContent, {
|
|
5516
|
+
className: toastObject.data?.contentClassName,
|
|
5517
|
+
children: [
|
|
5518
|
+
showIcon ? /* @__PURE__ */ jsx(DefaultToastIcon, { toast: toastObject }) : null,
|
|
5519
|
+
/* @__PURE__ */ jsxs(ToastBody, { children: [/* @__PURE__ */ jsx(ToastTitle, {}), showDescription ? /* @__PURE__ */ jsx(ToastDescription, {}) : null] }),
|
|
5520
|
+
showAction || showClose ? /* @__PURE__ */ jsxs(ToastActions, { children: [showClose ? /* @__PURE__ */ jsx(ToastClose, {}) : null, showAction ? /* @__PURE__ */ jsx(ToastAction, {}) : null] }) : null
|
|
5521
|
+
]
|
|
5522
|
+
})
|
|
5523
|
+
});
|
|
5524
|
+
}
|
|
5525
|
+
function DefaultToastIcon({ toast: toastObject }) {
|
|
5526
|
+
const intent = toastObject.data?.intent ?? getToastTone(toastObject.type);
|
|
5527
|
+
return /* @__PURE__ */ jsx(ToastIcon, { children: /* @__PURE__ */ jsx(intent === "success" ? CheckCircle2 : intent === "warning" || intent === "error" ? AlertTriangle : Info, { "aria-hidden": true }) });
|
|
5528
|
+
}
|
|
5529
|
+
function ToastArrowSvg({ theme, ...props }) {
|
|
5530
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
5531
|
+
width: "12",
|
|
5532
|
+
height: "6",
|
|
5533
|
+
viewBox: "0 0 12 6",
|
|
5534
|
+
fill: "none",
|
|
5535
|
+
...props,
|
|
5536
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
5537
|
+
d: "M1 0H11L6 5.25Z",
|
|
5538
|
+
className: theme === "elegant" ? "fill-[oklch(0.263_0.009_294.9_/_0.50)] dark:fill-[oklch(0.230_0.010_294.8_/_0.50)]" : "fill-soft-signal"
|
|
5539
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
5540
|
+
d: "M1 0.5L6 5.25L11 0.5",
|
|
5541
|
+
className: theme === "elegant" ? "stroke-white/28" : "stroke-line-strong",
|
|
5542
|
+
strokeLinecap: "round",
|
|
5543
|
+
strokeLinejoin: "round",
|
|
5544
|
+
vectorEffect: "non-scaling-stroke"
|
|
5545
|
+
})]
|
|
5546
|
+
});
|
|
5547
|
+
}
|
|
5548
|
+
//#endregion
|
|
5332
5549
|
//#region src/components/tabs/tabs.tsx
|
|
5333
5550
|
const tabs = tv({
|
|
5334
5551
|
slots: {
|
|
@@ -5664,28 +5881,60 @@ function reconcileTabOrder(items, order) {
|
|
|
5664
5881
|
//#endregion
|
|
5665
5882
|
//#region src/components/separator/separator.tsx
|
|
5666
5883
|
const separator = tv({
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5884
|
+
slots: {
|
|
5885
|
+
root: [
|
|
5886
|
+
"shrink-0",
|
|
5887
|
+
"data-[orientation=horizontal]:w-full",
|
|
5888
|
+
"data-[orientation=vertical]:self-stretch"
|
|
5889
|
+
],
|
|
5890
|
+
labeledRoot: ["grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 py-3"],
|
|
5891
|
+
labeledLine: ["w-full shrink-0"],
|
|
5892
|
+
labeledContent: ["min-w-0 font-mono text-xs font-medium"]
|
|
5893
|
+
},
|
|
5672
5894
|
variants: { theme: {
|
|
5673
|
-
brutal:
|
|
5674
|
-
|
|
5675
|
-
"
|
|
5676
|
-
"
|
|
5677
|
-
|
|
5678
|
-
|
|
5895
|
+
brutal: {
|
|
5896
|
+
root: ["data-[orientation=horizontal]:h-0 data-[orientation=horizontal]:border-t-2 data-[orientation=horizontal]:border-line-strong", "data-[orientation=vertical]:w-0 data-[orientation=vertical]:border-l-2 data-[orientation=vertical]:border-line-strong"],
|
|
5897
|
+
labeledLine: ["h-0 border-t-2 border-line-strong"],
|
|
5898
|
+
labeledContent: ["font-medium text-foreground/70"]
|
|
5899
|
+
},
|
|
5900
|
+
elegant: {
|
|
5901
|
+
root: [
|
|
5902
|
+
"bg-line-muted",
|
|
5903
|
+
"data-[orientation=horizontal]:h-px",
|
|
5904
|
+
"data-[orientation=vertical]:w-px"
|
|
5905
|
+
],
|
|
5906
|
+
labeledLine: ["h-px bg-line-muted"],
|
|
5907
|
+
labeledContent: ["text-foreground-placeholder"]
|
|
5908
|
+
}
|
|
5679
5909
|
} }
|
|
5680
5910
|
});
|
|
5681
|
-
function Separator({ className, orientation = "horizontal", ...props }) {
|
|
5911
|
+
function Separator({ children, className, orientation = "horizontal", ...props }) {
|
|
5912
|
+
const { labeledContent, labeledLine, labeledRoot, root } = separator({ theme: useThemeFamily() });
|
|
5913
|
+
if (children != null && orientation === "horizontal") return /* @__PURE__ */ jsxs(Separator$1, {
|
|
5914
|
+
"data-slot": "separator",
|
|
5915
|
+
orientation,
|
|
5916
|
+
className: labeledRoot({ className }),
|
|
5917
|
+
...props,
|
|
5918
|
+
children: [
|
|
5919
|
+
/* @__PURE__ */ jsx("span", {
|
|
5920
|
+
"aria-hidden": "true",
|
|
5921
|
+
className: labeledLine()
|
|
5922
|
+
}),
|
|
5923
|
+
/* @__PURE__ */ jsx("span", {
|
|
5924
|
+
"data-slot": "separator-content",
|
|
5925
|
+
className: labeledContent(),
|
|
5926
|
+
children
|
|
5927
|
+
}),
|
|
5928
|
+
/* @__PURE__ */ jsx("span", {
|
|
5929
|
+
"aria-hidden": "true",
|
|
5930
|
+
className: labeledLine()
|
|
5931
|
+
})
|
|
5932
|
+
]
|
|
5933
|
+
});
|
|
5682
5934
|
return /* @__PURE__ */ jsx(Separator$1, {
|
|
5683
5935
|
"data-slot": "separator",
|
|
5684
5936
|
orientation,
|
|
5685
|
-
className:
|
|
5686
|
-
theme: useThemeFamily(),
|
|
5687
|
-
className
|
|
5688
|
-
}),
|
|
5937
|
+
className: root({ className }),
|
|
5689
5938
|
...props
|
|
5690
5939
|
});
|
|
5691
5940
|
}
|
|
@@ -5784,4 +6033,4 @@ function ThemeProvider({ theme, defaultTheme = "brutal", onThemeChange, mode, de
|
|
|
5784
6033
|
});
|
|
5785
6034
|
}
|
|
5786
6035
|
//#endregion
|
|
5787
|
-
export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Banner, BannerAction, BannerDescription, BannerTitle, Button, Checkbox, Combobox, ComboboxChip, ComboboxChipRemove, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxControl, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxHeader, ComboboxInput, ComboboxInputGroup, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, ComboboxList, ComboboxPopup, ComboboxPortal, ComboboxRow, ComboboxSeparator, ComboboxTrigger, ComboboxTriggerIndicator, ComboboxValue, ContextMenu, ContextMenuCheckboxItem, ContextMenuCheckboxItemIndicator, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuRadioItemIndicator, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSubmenu, ContextMenuSubmenuTrigger, ContextMenuTrigger, CopyableCode, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemCount, DropdownMenuLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRadioItemIndicator, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSubmenu, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, EmptyState, EmptyStateActions, EmptyStateContent, EmptyStateDescription, EmptyStateIcon, EmptyStateTitle, Field, FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldValidity, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupInput, Kbd, KbdGroup, Label, LabelAsterisk, LabelOptional, LabelSub, NotificationCenter, NotificationCenterActionButton, NotificationCenterCount, NotificationCenterEmptyState, NotificationCenterHeader, NotificationCenterItem, NotificationCenterItemActions, NotificationCenterItemBody, NotificationCenterItemContent, NotificationCenterItemIcon, NotificationCenterItemRow, NotificationCenterItemTitle, NotificationCenterList, NotificationCenterPopup, NotificationCenterScroller, NotificationCenterTitle, NotificationCenterTrigger, Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverPopup, PopoverPortal, PopoverSeparator, PopoverTitle, PopoverTrigger, PopoverViewport, RadioGroup, RadioGroupIndicator, RadioGroupItem, SegmentedControl, SegmentedControlCount, SegmentedControlItem, SegmentedControlLabel, Select, SelectArrow, SelectContent, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, SelectList, SelectPopup, SelectPortal, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, Separator, SortableTabsList, SortableTabsTab, Spinner, Status, Switch, SwitchThumb, Tabs, TabsBackground, TabsIndicator, TabsLabel, TabsList, TabsPanel, TabsTab, Text, TextHeading, TextMono, TextSans, Textarea, TextareaCounter, TextareaGroup, ThemeProvider, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, buttonVariants, cn, useOrderedTabs, useTheme, useThemeFamily };
|
|
6036
|
+
export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Banner, BannerAction, BannerDescription, BannerTitle, Button, Checkbox, Combobox, ComboboxChip, ComboboxChipRemove, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxControl, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxHeader, ComboboxInput, ComboboxInputGroup, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, ComboboxList, ComboboxPopup, ComboboxPortal, ComboboxRow, ComboboxSeparator, ComboboxTrigger, ComboboxTriggerIndicator, ComboboxValue, ContextMenu, ContextMenuCheckboxItem, ContextMenuCheckboxItemIndicator, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuRadioItemIndicator, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSubmenu, ContextMenuSubmenuTrigger, ContextMenuTrigger, CopyableCode, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemCount, DropdownMenuLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRadioItemIndicator, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSubmenu, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, EmptyState, EmptyStateActions, EmptyStateContent, EmptyStateDescription, EmptyStateIcon, EmptyStateTitle, Field, FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldValidity, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupInput, Kbd, KbdGroup, Label, LabelAsterisk, LabelOptional, LabelSub, NotificationCenter, NotificationCenterActionButton, NotificationCenterCount, NotificationCenterEmptyState, NotificationCenterHeader, NotificationCenterItem, NotificationCenterItemActions, NotificationCenterItemBody, NotificationCenterItemContent, NotificationCenterItemIcon, NotificationCenterItemRow, NotificationCenterItemTitle, NotificationCenterList, NotificationCenterPopup, NotificationCenterScroller, NotificationCenterTitle, NotificationCenterTrigger, Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverPopup, PopoverPortal, PopoverSeparator, PopoverTitle, PopoverTrigger, PopoverViewport, PreviewCard, PreviewCardArrow, PreviewCardContent, PreviewCardDescription, PreviewCardHeader, PreviewCardPopup, PreviewCardPortal, PreviewCardSeparator, PreviewCardTitle, PreviewCardTrigger, Progress, ProgressHeader, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupIndicator, RadioGroupItem, SegmentedControl, SegmentedControlCount, SegmentedControlItem, SegmentedControlLabel, Select, SelectArrow, SelectContent, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, SelectList, SelectPopup, SelectPortal, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, Separator, Skeleton, SortableTabsList, SortableTabsTab, Spinner, Status, Switch, SwitchThumb, Tabs, TabsBackground, TabsIndicator, TabsLabel, TabsList, TabsPanel, TabsTab, Text, TextHeading, TextMono, TextSans, Textarea, TextareaCounter, TextareaGroup, ThemeProvider, ToastAction, ToastActions, ToastArrow, ToastBody, ToastClose, ToastContent, ToastDescription, ToastIcon, ToastPortal, ToastPositioner, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, buttonVariants, cn, createToastManager, toast, useOrderedTabs, useTheme, useThemeFamily, useToastManager };
|