raft-ui 0.0.9 → 0.0.11
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 +27 -0
- package/dist/index.d.mts +1128 -75
- package/dist/index.mjs +2082 -133
- package/dist/styles.css +40 -0
- package/dist/tv-UUMwNowu.d.mts +16 -0
- package/dist/use-theme-Y_h1DKll.mjs +34 -0
- package/dist/wip.d.mts +3 -156
- package/dist/wip.mjs +5 -337
- package/package.json +1 -1
- package/dist/button-jUlaK4eN.mjs +0 -722
- package/dist/index-lPUAF7fl.d.mts +0 -267
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { cn } from "./cn.mjs";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as tv, i as ThemeStateContext, n as useThemeFamily, r as ThemeContext, t as useTheme } from "./use-theme-Y_h1DKll.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";
|
|
5
|
+
import { Children, Fragment, cloneElement, createContext, isValidElement, use, useCallback, useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
6
|
+
import { Button as Button$1 } from "@base-ui/react/button";
|
|
6
7
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
8
|
import { useRender } from "@base-ui/react/use-render";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { Drawer } from "vaul";
|
|
9
11
|
import { useClipboard } from "foxact/use-clipboard";
|
|
10
12
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
11
13
|
import { Avatar as Avatar$1, ContextMenu as ContextMenu$1 } from "@base-ui/react";
|
|
12
14
|
import { Menu } from "@base-ui/react/menu";
|
|
15
|
+
import { useHotkey } from "@tanstack/react-hotkeys";
|
|
13
16
|
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
14
17
|
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
18
|
+
import { PreviewCard as PreviewCard$1 } from "@base-ui/react/preview-card";
|
|
15
19
|
import { Input as Input$1 } from "@base-ui/react/input";
|
|
16
20
|
import { Field as Field$1 } from "@base-ui/react/field";
|
|
17
21
|
import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
|
|
@@ -19,10 +23,696 @@ import { Select as Select$1 } from "@base-ui/react/select";
|
|
|
19
23
|
import { Radio } from "@base-ui/react/radio";
|
|
20
24
|
import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
21
25
|
import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
26
|
+
import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
27
|
+
import { Toast } from "@base-ui/react/toast";
|
|
22
28
|
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
23
29
|
import { DndContext, PointerSensor, TouchSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
|
|
24
30
|
import { SortableContext, arrayMove, horizontalListSortingStrategy, useSortable } from "@dnd-kit/sortable";
|
|
25
31
|
import { Separator as Separator$1 } from "@base-ui/react/separator";
|
|
32
|
+
//#region src/components/spinner/spinner.tsx
|
|
33
|
+
const SPINNER_STYLE = `
|
|
34
|
+
@keyframes raft-braille-spinner {
|
|
35
|
+
0%,
|
|
36
|
+
9.99% {
|
|
37
|
+
content: "⠋";
|
|
38
|
+
}
|
|
39
|
+
10%,
|
|
40
|
+
19.99% {
|
|
41
|
+
content: "⠙";
|
|
42
|
+
}
|
|
43
|
+
20%,
|
|
44
|
+
29.99% {
|
|
45
|
+
content: "⠹";
|
|
46
|
+
}
|
|
47
|
+
30%,
|
|
48
|
+
39.99% {
|
|
49
|
+
content: "⠸";
|
|
50
|
+
}
|
|
51
|
+
40%,
|
|
52
|
+
49.99% {
|
|
53
|
+
content: "⠼";
|
|
54
|
+
}
|
|
55
|
+
50%,
|
|
56
|
+
59.99% {
|
|
57
|
+
content: "⠴";
|
|
58
|
+
}
|
|
59
|
+
60%,
|
|
60
|
+
69.99% {
|
|
61
|
+
content: "⠦";
|
|
62
|
+
}
|
|
63
|
+
70%,
|
|
64
|
+
79.99% {
|
|
65
|
+
content: "⠧";
|
|
66
|
+
}
|
|
67
|
+
80%,
|
|
68
|
+
89.99% {
|
|
69
|
+
content: "⠇";
|
|
70
|
+
}
|
|
71
|
+
90%,
|
|
72
|
+
100% {
|
|
73
|
+
content: "⠏";
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
[data-slot="spinner"] [data-spinner-glyph]::before {
|
|
78
|
+
content: "⠋";
|
|
79
|
+
animation: raft-braille-spinner 800ms steps(1, end) infinite;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media (prefers-reduced-motion: reduce) {
|
|
83
|
+
[data-slot="spinner"] [data-spinner-glyph]::before {
|
|
84
|
+
animation-duration: 1600ms;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@keyframes raft-elegant-spinner-spin {
|
|
89
|
+
to {
|
|
90
|
+
transform: rotate(360deg);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@keyframes raft-elegant-spinner-dash {
|
|
95
|
+
0% {
|
|
96
|
+
stroke-dasharray: 1 150;
|
|
97
|
+
stroke-dashoffset: 0;
|
|
98
|
+
}
|
|
99
|
+
50% {
|
|
100
|
+
stroke-dasharray: 90 150;
|
|
101
|
+
stroke-dashoffset: -35;
|
|
102
|
+
}
|
|
103
|
+
100% {
|
|
104
|
+
stroke-dasharray: 90 150;
|
|
105
|
+
stroke-dashoffset: -124;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[data-slot="spinner"] [data-spinner-ring] {
|
|
110
|
+
animation: raft-elegant-spinner-spin 1600ms linear infinite;
|
|
111
|
+
transform-box: fill-box;
|
|
112
|
+
transform-origin: center;
|
|
113
|
+
will-change: transform;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[data-slot="spinner"] [data-spinner-arc] {
|
|
117
|
+
animation: raft-elegant-spinner-dash 1400ms cubic-bezier(0.42, 0, 0.58, 1) infinite;
|
|
118
|
+
stroke-dasharray: 1 150;
|
|
119
|
+
stroke-dashoffset: 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@media (prefers-reduced-motion: reduce) {
|
|
123
|
+
[data-slot="spinner"] [data-spinner-ring] {
|
|
124
|
+
animation-duration: 2400ms;
|
|
125
|
+
will-change: auto;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
[data-slot="spinner"] [data-spinner-arc] {
|
|
129
|
+
animation: none;
|
|
130
|
+
stroke-dasharray: 72 150;
|
|
131
|
+
stroke-dashoffset: -30;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
`;
|
|
135
|
+
const spinner = tv({
|
|
136
|
+
slots: {
|
|
137
|
+
root: ["relative inline-flex shrink-0 items-center justify-center", "leading-none text-current"],
|
|
138
|
+
glyph: "inline-block min-w-[1ch] font-mono tabular-nums",
|
|
139
|
+
ring: "block size-full shrink-0"
|
|
140
|
+
},
|
|
141
|
+
variants: {
|
|
142
|
+
theme: {
|
|
143
|
+
brutal: {},
|
|
144
|
+
elegant: {}
|
|
145
|
+
},
|
|
146
|
+
size: {
|
|
147
|
+
sm: {},
|
|
148
|
+
lg: {}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
defaultVariants: { size: "sm" },
|
|
152
|
+
compoundVariants: [
|
|
153
|
+
{
|
|
154
|
+
theme: "brutal",
|
|
155
|
+
size: "sm",
|
|
156
|
+
class: { root: "h-4 text-base" }
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
theme: "brutal",
|
|
160
|
+
size: "lg",
|
|
161
|
+
class: { root: "h-6 text-xl" }
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
theme: "elegant",
|
|
165
|
+
size: "sm",
|
|
166
|
+
class: { root: "size-3.5" }
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
theme: "elegant",
|
|
170
|
+
size: "lg",
|
|
171
|
+
class: { root: "size-[18px]" }
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
});
|
|
175
|
+
const spinnerStyle = /* @__PURE__ */ jsx("style", {
|
|
176
|
+
href: "raft-ui-spinner",
|
|
177
|
+
precedence: "default",
|
|
178
|
+
children: SPINNER_STYLE
|
|
179
|
+
});
|
|
180
|
+
function Spinner({ size = "sm", className, render, ...props }) {
|
|
181
|
+
const theme = useThemeFamily();
|
|
182
|
+
const { root, glyph, ring } = spinner({
|
|
183
|
+
theme,
|
|
184
|
+
size
|
|
185
|
+
});
|
|
186
|
+
const children = theme === "elegant" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [spinnerStyle, /* @__PURE__ */ jsxs("svg", {
|
|
187
|
+
"data-spinner-ring": "",
|
|
188
|
+
"aria-hidden": "true",
|
|
189
|
+
className: ring(),
|
|
190
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
191
|
+
fill: "none",
|
|
192
|
+
viewBox: "0 0 24 24",
|
|
193
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
194
|
+
className: "opacity-20",
|
|
195
|
+
cx: "12",
|
|
196
|
+
cy: "12",
|
|
197
|
+
r: "10",
|
|
198
|
+
stroke: "currentColor",
|
|
199
|
+
strokeWidth: "2.5"
|
|
200
|
+
}), /* @__PURE__ */ jsx("circle", {
|
|
201
|
+
"data-spinner-arc": "",
|
|
202
|
+
className: "opacity-80",
|
|
203
|
+
cx: "12",
|
|
204
|
+
cy: "12",
|
|
205
|
+
r: "10",
|
|
206
|
+
fill: "none",
|
|
207
|
+
pathLength: "150",
|
|
208
|
+
stroke: "currentColor",
|
|
209
|
+
strokeLinecap: "round",
|
|
210
|
+
strokeWidth: "2.5"
|
|
211
|
+
})]
|
|
212
|
+
})] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [spinnerStyle, /* @__PURE__ */ jsx("span", {
|
|
213
|
+
"data-spinner-glyph": "",
|
|
214
|
+
"aria-hidden": "true",
|
|
215
|
+
className: glyph()
|
|
216
|
+
})] });
|
|
217
|
+
return useRender({
|
|
218
|
+
defaultTagName: "span",
|
|
219
|
+
render,
|
|
220
|
+
props: mergeProps({
|
|
221
|
+
role: "status",
|
|
222
|
+
"aria-label": "Loading",
|
|
223
|
+
className: root({ className }),
|
|
224
|
+
children
|
|
225
|
+
}, props),
|
|
226
|
+
state: {
|
|
227
|
+
slot: "spinner",
|
|
228
|
+
size
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region src/components/button/button.tsx
|
|
234
|
+
const buttonVariants = tv({
|
|
235
|
+
slots: {
|
|
236
|
+
root: [
|
|
237
|
+
"relative inline-flex shrink-0 items-center justify-center",
|
|
238
|
+
"font-heading leading-none whitespace-nowrap select-none",
|
|
239
|
+
"border-line rounded-none",
|
|
240
|
+
"shadow-sm transition-all duration-100",
|
|
241
|
+
"outline outline-[1px] outline-offset-2 outline-transparent",
|
|
242
|
+
"data-[loading=true]:cursor-wait",
|
|
243
|
+
"disabled:pointer-events-none disabled:opacity-40 data-[loading=true]:opacity-100",
|
|
244
|
+
"disabled:transform-none",
|
|
245
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
246
|
+
],
|
|
247
|
+
content: "relative z-10 inline-flex items-center justify-center gap-[inherit] data-[loading=true]:invisible",
|
|
248
|
+
loadingIndicator: "pointer-events-none absolute inset-0 z-10 flex items-center justify-center"
|
|
249
|
+
},
|
|
250
|
+
variants: {
|
|
251
|
+
theme: {
|
|
252
|
+
brutal: { root: ["border-2 font-bold focus-visible:outline-transparent"] },
|
|
253
|
+
elegant: { root: [
|
|
254
|
+
"overflow-clip border-0 font-sans font-medium antialiased",
|
|
255
|
+
"focus-visible:outline-[var(--button-focus-outline,transparent)]",
|
|
256
|
+
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_0_0_1px_var(--line-subtle)]",
|
|
257
|
+
"before:pointer-events-none before:absolute before:inset-0 before:z-0 before:rounded-[inherit]",
|
|
258
|
+
"active:not-aria-[haspopup]:scale-[0.985]"
|
|
259
|
+
] }
|
|
260
|
+
},
|
|
261
|
+
variant: {
|
|
262
|
+
primary: { root: ["border-line-strong bg-primary-400 text-primary-950", "hover:bg-primary-500"] },
|
|
263
|
+
default: { root: ["border-line-strong bg-layer-panel text-foreground-strong", "hover:bg-layer-panel"] },
|
|
264
|
+
information: { root: ["border-line-strong bg-info-base text-foreground-inverse", "hover:bg-info-base"] },
|
|
265
|
+
muted: { root: ["border-line-strong bg-secondary-400 text-secondary-950", "hover:border-line-strong hover:bg-secondary-400"] },
|
|
266
|
+
accent: { root: ["border-line-strong bg-accent-400 text-accent-950", "hover:bg-accent-500"] },
|
|
267
|
+
warning: { root: ["border-line-strong bg-warning-base text-foreground-inverse", "hover:bg-warning-base"] },
|
|
268
|
+
outline: { root: [
|
|
269
|
+
"border-line-strong bg-transparent text-foreground-strong",
|
|
270
|
+
"hover:bg-layer-muted",
|
|
271
|
+
"shadow-none"
|
|
272
|
+
] },
|
|
273
|
+
ghost: { root: ["border-transparent bg-transparent text-foreground shadow-none", "hover:border-line-strong hover:bg-layer-muted"] },
|
|
274
|
+
link: { root: ["border-transparent bg-transparent text-foreground-strong shadow-none underline-offset-4", "hover:underline"] },
|
|
275
|
+
"danger-secondary": { root: ["border-line-strong bg-danger-lighter text-danger-base", "hover:bg-danger-lighter"] },
|
|
276
|
+
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)]"] },
|
|
277
|
+
"danger-outline": { root: [
|
|
278
|
+
"border-line-strong bg-transparent text-danger-base",
|
|
279
|
+
"hover:bg-layer-muted",
|
|
280
|
+
"shadow-none"
|
|
281
|
+
] }
|
|
282
|
+
},
|
|
283
|
+
size: {
|
|
284
|
+
xs: { root: [
|
|
285
|
+
"gap-1 px-2 py-[5px] text-[11px]",
|
|
286
|
+
"has-data-[icon=inline-start]:pl-1.5 has-data-[icon=inline-end]:pr-1.5",
|
|
287
|
+
"[&_[data-icon]]:size-[1em]",
|
|
288
|
+
"[&_svg:not([class*='size-'])]:size-3"
|
|
289
|
+
] },
|
|
290
|
+
sm: { root: [
|
|
291
|
+
"gap-[5px] px-2.5 py-[6px] text-xs",
|
|
292
|
+
"has-data-[icon=inline-start]:pl-2 has-data-[icon=inline-end]:pr-2",
|
|
293
|
+
"[&_[data-icon]]:size-[1em]",
|
|
294
|
+
"[&_svg:not([class*='size-'])]:size-3.5"
|
|
295
|
+
] },
|
|
296
|
+
md: { root: [
|
|
297
|
+
"gap-[5.5px] px-3 py-[7px] text-sm",
|
|
298
|
+
"has-data-[icon=inline-start]:pl-2.5 has-data-[icon=inline-end]:pr-2.5",
|
|
299
|
+
"[&_[data-icon]]:size-[1em]"
|
|
300
|
+
] },
|
|
301
|
+
lg: { root: [
|
|
302
|
+
"gap-[6px] px-3.5 py-2 text-base",
|
|
303
|
+
"has-data-[icon=inline-start]:pl-3 has-data-[icon=inline-end]:pr-3",
|
|
304
|
+
"[&_[data-icon]]:size-[1em]",
|
|
305
|
+
"[&_svg:not([class*='size-'])]:size-4"
|
|
306
|
+
] },
|
|
307
|
+
"icon-xs": { root: ["p-[5px] text-[11px]", "[&_svg:not([class*='size-'])]:size-3"] },
|
|
308
|
+
"icon-sm": { root: ["p-[6px] text-xs", "[&_svg:not([class*='size-'])]:size-3.5"] },
|
|
309
|
+
"icon-md": { root: ["p-2 text-sm", "[&_svg:not([class*='size-'])]:size-4"] },
|
|
310
|
+
"icon-lg": { root: ["p-3 text-sm", "[&_svg:not([class*='size-'])]:size-4"] }
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
defaultVariants: {
|
|
314
|
+
variant: "default",
|
|
315
|
+
size: "md"
|
|
316
|
+
},
|
|
317
|
+
compoundVariants: [
|
|
318
|
+
{
|
|
319
|
+
theme: "elegant",
|
|
320
|
+
size: ["xs", "icon-xs"],
|
|
321
|
+
class: { root: "rounded-sm" }
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
theme: "elegant",
|
|
325
|
+
size: ["sm", "icon-sm"],
|
|
326
|
+
class: { root: "rounded" }
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
theme: "elegant",
|
|
330
|
+
size: ["md", "icon-md"],
|
|
331
|
+
class: { root: "rounded-md" }
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
theme: "elegant",
|
|
335
|
+
size: "md",
|
|
336
|
+
class: { root: "py-1.5" }
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
theme: "elegant",
|
|
340
|
+
size: ["lg", "icon-lg"],
|
|
341
|
+
class: { root: "rounded-md" }
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
theme: "elegant",
|
|
345
|
+
size: "lg",
|
|
346
|
+
class: { root: "py-[7px]" }
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
theme: "elegant",
|
|
350
|
+
variant: ["outline", "danger-outline"],
|
|
351
|
+
size: "xs",
|
|
352
|
+
class: { root: "py-[6px]" }
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
theme: "elegant",
|
|
356
|
+
variant: ["outline", "danger-outline"],
|
|
357
|
+
size: "sm",
|
|
358
|
+
class: { root: "py-[6.75px]" }
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
theme: "elegant",
|
|
362
|
+
variant: ["outline", "danger-outline"],
|
|
363
|
+
size: "md",
|
|
364
|
+
class: { root: "py-[7.25px]" }
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
theme: "elegant",
|
|
368
|
+
variant: ["outline", "danger-outline"],
|
|
369
|
+
size: "lg",
|
|
370
|
+
class: { root: "py-[7.75px]" }
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
theme: "elegant",
|
|
374
|
+
variant: [
|
|
375
|
+
"primary",
|
|
376
|
+
"default",
|
|
377
|
+
"information",
|
|
378
|
+
"muted",
|
|
379
|
+
"accent",
|
|
380
|
+
"warning",
|
|
381
|
+
"danger-secondary",
|
|
382
|
+
"danger"
|
|
383
|
+
],
|
|
384
|
+
size: "xs",
|
|
385
|
+
class: { root: "py-[5.75px]" }
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
theme: "elegant",
|
|
389
|
+
variant: [
|
|
390
|
+
"primary",
|
|
391
|
+
"default",
|
|
392
|
+
"information",
|
|
393
|
+
"muted",
|
|
394
|
+
"accent",
|
|
395
|
+
"warning",
|
|
396
|
+
"danger-secondary",
|
|
397
|
+
"danger"
|
|
398
|
+
],
|
|
399
|
+
size: "sm",
|
|
400
|
+
class: { root: "py-[6.75px]" }
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
theme: "elegant",
|
|
404
|
+
variant: [
|
|
405
|
+
"primary",
|
|
406
|
+
"default",
|
|
407
|
+
"information",
|
|
408
|
+
"muted",
|
|
409
|
+
"accent",
|
|
410
|
+
"warning",
|
|
411
|
+
"danger-secondary",
|
|
412
|
+
"danger"
|
|
413
|
+
],
|
|
414
|
+
size: "md",
|
|
415
|
+
class: { root: "py-[6.75px]" }
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
theme: "elegant",
|
|
419
|
+
variant: [
|
|
420
|
+
"primary",
|
|
421
|
+
"default",
|
|
422
|
+
"information",
|
|
423
|
+
"muted",
|
|
424
|
+
"accent",
|
|
425
|
+
"warning",
|
|
426
|
+
"danger-secondary",
|
|
427
|
+
"danger"
|
|
428
|
+
],
|
|
429
|
+
size: "lg",
|
|
430
|
+
class: { root: "py-[7.75px]" }
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
theme: "brutal",
|
|
434
|
+
variant: "primary",
|
|
435
|
+
class: { root: "bg-brutal-yellow text-black hover:bg-brutal-yellow" }
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
theme: "brutal",
|
|
439
|
+
variant: "default",
|
|
440
|
+
class: { root: "bg-white text-black hover:bg-white" }
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
theme: "brutal",
|
|
444
|
+
variant: "outline",
|
|
445
|
+
class: { root: "bg-white text-black shadow-sm hover:bg-white" }
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
theme: "brutal",
|
|
449
|
+
variant: "information",
|
|
450
|
+
class: { root: "bg-brutal-cyan text-black hover:bg-brutal-cyan" }
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
theme: "brutal",
|
|
454
|
+
variant: "muted",
|
|
455
|
+
class: { root: "bg-brutal-stone text-black hover:bg-brutal-stone" }
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
theme: "brutal",
|
|
459
|
+
variant: "accent",
|
|
460
|
+
class: { root: "bg-brutal-pink text-black hover:bg-brutal-pink" }
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
theme: "brutal",
|
|
464
|
+
variant: "danger",
|
|
465
|
+
class: { root: "bg-brutal-red text-black hover:bg-brutal-red" }
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
theme: "brutal",
|
|
469
|
+
variant: "warning",
|
|
470
|
+
class: { root: "bg-[oklch(0.785_0.123_50.11)] text-black hover:bg-[oklch(0.785_0.123_50.11)]" }
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
theme: "brutal",
|
|
474
|
+
size: "xs",
|
|
475
|
+
class: { root: ["h-6 px-2 py-0 text-[11px]", "has-data-[icon=inline-start]:pl-1.5 has-data-[icon=inline-end]:pr-1.5"] }
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
theme: "brutal",
|
|
479
|
+
size: "sm",
|
|
480
|
+
class: { root: ["h-7 px-2.5 py-0 text-xs", "has-data-[icon=inline-start]:pl-2 has-data-[icon=inline-end]:pr-2"] }
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
theme: "brutal",
|
|
484
|
+
size: "md",
|
|
485
|
+
class: { root: ["h-8 px-3 py-0 text-sm", "has-data-[icon=inline-start]:pl-2.5 has-data-[icon=inline-end]:pr-2.5"] }
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
theme: "brutal",
|
|
489
|
+
size: "lg",
|
|
490
|
+
class: { root: ["h-10 px-4 py-0 text-sm", "has-data-[icon=inline-start]:pl-3.5 has-data-[icon=inline-end]:pr-3.5"] }
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
theme: "brutal",
|
|
494
|
+
size: "icon-xs",
|
|
495
|
+
class: { root: "size-6 p-0 text-[11px]" }
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
theme: "brutal",
|
|
499
|
+
size: "icon-sm",
|
|
500
|
+
class: { root: "size-7 p-0 text-xs" }
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
theme: "brutal",
|
|
504
|
+
size: "icon-md",
|
|
505
|
+
class: { root: "size-8 p-0 text-sm" }
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
theme: "brutal",
|
|
509
|
+
size: "icon-lg",
|
|
510
|
+
class: { root: "size-10 p-0 text-sm" }
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
theme: "elegant",
|
|
514
|
+
variant: "default",
|
|
515
|
+
class: { root: [
|
|
516
|
+
"bg-foreground-strong text-foreground-inverse",
|
|
517
|
+
"[--button-focus-outline:var(--foreground-strong)]",
|
|
518
|
+
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.12),0_0_0_1px_var(--foreground-strong)]",
|
|
519
|
+
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_8%)_0%,oklab(0%_0_0_/_0%)_100%)]",
|
|
520
|
+
"hover:bg-[oklch(0.31_0.006_285)]"
|
|
521
|
+
] }
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
theme: "elegant",
|
|
525
|
+
variant: "primary",
|
|
526
|
+
class: { root: [
|
|
527
|
+
"bg-primary-400 text-primary-950",
|
|
528
|
+
"[--button-focus-outline:var(--primary-400)]",
|
|
529
|
+
"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)]",
|
|
530
|
+
"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%)]",
|
|
531
|
+
"hover:bg-[oklch(0.86_0.15_91.89)]"
|
|
532
|
+
] }
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
theme: "elegant",
|
|
536
|
+
variant: "outline",
|
|
537
|
+
class: { root: [
|
|
538
|
+
"bg-layer-panel text-foreground-strong",
|
|
539
|
+
"[--button-focus-outline:var(--layer-panel)]",
|
|
540
|
+
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_0_0_1px_var(--line-subtle)]",
|
|
541
|
+
"before:bg-[linear-gradient(in_oklab_180deg,oklab(0%_0_0_/_0%)_30%,oklab(0%_0_0_/_1%)_100%)]",
|
|
542
|
+
"hover:bg-layer-muted"
|
|
543
|
+
] }
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
theme: "elegant",
|
|
547
|
+
variant: "ghost",
|
|
548
|
+
class: { root: [
|
|
549
|
+
"bg-transparent text-foreground-muted shadow-none",
|
|
550
|
+
"[--button-focus-outline:var(--line-muted)]",
|
|
551
|
+
"before:bg-transparent hover:bg-line-muted"
|
|
552
|
+
] }
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
theme: "elegant",
|
|
556
|
+
variant: "danger-secondary",
|
|
557
|
+
class: { root: [
|
|
558
|
+
"bg-danger-lighter text-danger-base",
|
|
559
|
+
"[--button-focus-outline:var(--state-danger-lighter)]",
|
|
560
|
+
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.18),0_0_0_1px_var(--state-danger-light)]",
|
|
561
|
+
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_9%)_0%,oklab(0%_0_0_/_1%)_100%)]",
|
|
562
|
+
"hover:bg-danger-light"
|
|
563
|
+
] }
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
theme: "elegant",
|
|
567
|
+
variant: "danger",
|
|
568
|
+
class: { root: [
|
|
569
|
+
"bg-danger-base text-foreground-inverse",
|
|
570
|
+
"[--button-focus-outline:var(--state-danger-base)]",
|
|
571
|
+
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.12),0_0_0_1px_var(--state-danger-base)]",
|
|
572
|
+
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_10%)_0%,oklab(0%_0_0_/_0%)_100%)]",
|
|
573
|
+
"hover:bg-[oklch(0.56_0.23_26.758)]"
|
|
574
|
+
] }
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
theme: "brutal",
|
|
578
|
+
variant: "danger",
|
|
579
|
+
class: { root: [
|
|
580
|
+
"border-line-strong bg-brutal-red text-black",
|
|
581
|
+
"shadow-sm",
|
|
582
|
+
"hover:border-line-strong hover:bg-brutal-red",
|
|
583
|
+
"hover:-translate-y-px hover:shadow-md",
|
|
584
|
+
"active:not-aria-[haspopup]:translate-x-px active:not-aria-[haspopup]:translate-y-px",
|
|
585
|
+
"active:shadow-xs"
|
|
586
|
+
] }
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
theme: "brutal",
|
|
590
|
+
variant: "danger-secondary",
|
|
591
|
+
class: { root: [
|
|
592
|
+
"border-line-strong bg-danger-lighter text-[color-mix(in_oklab,var(--state-danger-base)_72%,transparent)]",
|
|
593
|
+
"shadow-sm",
|
|
594
|
+
"hover:border-line-strong hover:bg-danger-lighter",
|
|
595
|
+
"hover:-translate-y-px hover:shadow-md",
|
|
596
|
+
"active:not-aria-[haspopup]:translate-x-px active:not-aria-[haspopup]:translate-y-px",
|
|
597
|
+
"active:shadow-xs"
|
|
598
|
+
] }
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
theme: "elegant",
|
|
602
|
+
variant: "danger-outline",
|
|
603
|
+
class: { root: [
|
|
604
|
+
"bg-layer-panel text-danger-base",
|
|
605
|
+
"[--button-focus-outline:var(--layer-panel)]",
|
|
606
|
+
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_0_0_1px_var(--state-danger-light)]",
|
|
607
|
+
"before:bg-[linear-gradient(in_oklab_180deg,oklab(0%_0_0_/_0%)_30%,oklab(0%_0_0_/_1%)_100%)]",
|
|
608
|
+
"hover:bg-danger-lighter"
|
|
609
|
+
] }
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
theme: "elegant",
|
|
613
|
+
variant: "accent",
|
|
614
|
+
class: { root: [
|
|
615
|
+
"bg-accent-400 text-white",
|
|
616
|
+
"[--button-focus-outline:var(--accent-400)]",
|
|
617
|
+
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.12),0_0_0_1px_var(--accent-400)]",
|
|
618
|
+
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_8%)_0%,oklab(0%_0_0_/_0%)_100%)]",
|
|
619
|
+
"hover:bg-[oklch(0.72_0.15_0.71)]"
|
|
620
|
+
] }
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
theme: "elegant",
|
|
624
|
+
variant: "warning",
|
|
625
|
+
class: { root: [
|
|
626
|
+
"bg-warning-base text-foreground-inverse",
|
|
627
|
+
"[--button-focus-outline:var(--state-warning-base)]",
|
|
628
|
+
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.14),0_0_0_1px_var(--state-warning-base)]",
|
|
629
|
+
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_10%)_0%,oklab(0%_0_0_/_0%)_100%)]",
|
|
630
|
+
"hover:bg-[oklch(0.65_0.19_44.441)]"
|
|
631
|
+
] }
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
theme: "elegant",
|
|
635
|
+
variant: "link",
|
|
636
|
+
class: { root: [
|
|
637
|
+
"bg-transparent text-foreground-muted shadow-none",
|
|
638
|
+
"[--button-focus-outline:transparent]",
|
|
639
|
+
"before:bg-transparent hover:bg-transparent hover:text-foreground-muted"
|
|
640
|
+
] }
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
theme: "elegant",
|
|
644
|
+
variant: "information",
|
|
645
|
+
class: { root: [
|
|
646
|
+
"bg-info-base text-foreground-inverse",
|
|
647
|
+
"[--button-focus-outline:var(--state-info-base)]",
|
|
648
|
+
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.12),0_0_0_1px_var(--state-info-base)]",
|
|
649
|
+
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_8%)_0%,oklab(0%_0_0_/_0%)_100%)]",
|
|
650
|
+
"hover:bg-[oklch(0.74_0.13_219.2)]"
|
|
651
|
+
] }
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
theme: "elegant",
|
|
655
|
+
variant: "muted",
|
|
656
|
+
class: { root: [
|
|
657
|
+
"bg-layer-muted text-foreground-placeholder",
|
|
658
|
+
"[--button-focus-outline:var(--layer-muted)]",
|
|
659
|
+
"shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_0_0_1px_var(--line-subtle)]",
|
|
660
|
+
"before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_5%)_0%,oklab(0%_0_0_/_1%)_100%)]",
|
|
661
|
+
"hover:bg-line-subtle"
|
|
662
|
+
] }
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
theme: "brutal",
|
|
666
|
+
variant: [
|
|
667
|
+
"primary",
|
|
668
|
+
"default",
|
|
669
|
+
"information",
|
|
670
|
+
"muted",
|
|
671
|
+
"accent",
|
|
672
|
+
"warning",
|
|
673
|
+
"outline"
|
|
674
|
+
],
|
|
675
|
+
class: { root: [
|
|
676
|
+
"hover:-translate-y-px hover:shadow-md",
|
|
677
|
+
"active:not-aria-[haspopup]:translate-x-px active:not-aria-[haspopup]:translate-y-px",
|
|
678
|
+
"active:shadow-xs"
|
|
679
|
+
] }
|
|
680
|
+
}
|
|
681
|
+
]
|
|
682
|
+
});
|
|
683
|
+
function defaultNativeButton(render) {
|
|
684
|
+
if (!render || typeof render !== "object" || !("type" in render)) return;
|
|
685
|
+
const element = render;
|
|
686
|
+
if (typeof element.type === "string") return element.type === "button";
|
|
687
|
+
}
|
|
688
|
+
function Button({ variant, size, loading = false, loadingLabel = "Loading", disabled, className, children, render, nativeButton, ...props }) {
|
|
689
|
+
const { root, content, loadingIndicator } = buttonVariants({
|
|
690
|
+
theme: useThemeFamily(),
|
|
691
|
+
variant,
|
|
692
|
+
size
|
|
693
|
+
});
|
|
694
|
+
return /* @__PURE__ */ jsxs(Button$1, {
|
|
695
|
+
...props,
|
|
696
|
+
render,
|
|
697
|
+
nativeButton: nativeButton ?? defaultNativeButton(render),
|
|
698
|
+
"data-slot": "button",
|
|
699
|
+
className: root({ className }),
|
|
700
|
+
"data-loading": loading ? "true" : void 0,
|
|
701
|
+
disabled: disabled || loading,
|
|
702
|
+
"aria-disabled": loading || void 0,
|
|
703
|
+
children: [loading ? /* @__PURE__ */ jsx("span", {
|
|
704
|
+
"data-slot": "button-loading-indicator",
|
|
705
|
+
className: loadingIndicator(),
|
|
706
|
+
children: /* @__PURE__ */ jsx(Spinner, { "aria-label": loadingLabel })
|
|
707
|
+
}) : null, /* @__PURE__ */ jsx("span", {
|
|
708
|
+
"data-slot": "button-content",
|
|
709
|
+
"data-loading": loading ? "true" : void 0,
|
|
710
|
+
className: content(),
|
|
711
|
+
children
|
|
712
|
+
})]
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
//#endregion
|
|
26
716
|
//#region src/components/alert-dialog/alert-dialog.tsx
|
|
27
717
|
const alertDialog = tv({
|
|
28
718
|
slots: {
|
|
@@ -321,6 +1011,202 @@ function DialogDescription({ className, ...props }) {
|
|
|
321
1011
|
});
|
|
322
1012
|
}
|
|
323
1013
|
//#endregion
|
|
1014
|
+
//#region src/components/bottom-sheet/bottom-sheet.tsx
|
|
1015
|
+
const bottomSheet = tv({
|
|
1016
|
+
slots: {
|
|
1017
|
+
portal: [],
|
|
1018
|
+
overlay: ["fixed inset-0 z-50", "![animation-duration:0.2s]"],
|
|
1019
|
+
positioner: ["contents"],
|
|
1020
|
+
content: [
|
|
1021
|
+
"fixed z-50 flex h-auto flex-col outline-none",
|
|
1022
|
+
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 md:data-[vaul-drawer-direction=bottom]:inset-x-3",
|
|
1023
|
+
"data-[vaul-drawer-direction=bottom]:mx-auto data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:min-h-64 data-[vaul-drawer-direction=bottom]:max-h-[82vh] data-[vaul-drawer-direction=bottom]:max-w-lg md:data-[vaul-drawer-direction=bottom]:max-w-md",
|
|
1024
|
+
"data-[vaul-drawer-direction=top]:inset-x-3 data-[vaul-drawer-direction=top]:top-3",
|
|
1025
|
+
"data-[vaul-drawer-direction=top]:mx-auto data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:max-w-md",
|
|
1026
|
+
"data-[vaul-drawer-direction=left]:inset-y-3 data-[vaul-drawer-direction=left]:left-3 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:max-w-sm",
|
|
1027
|
+
"data-[vaul-drawer-direction=right]:inset-y-3 data-[vaul-drawer-direction=right]:right-3 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:max-w-sm",
|
|
1028
|
+
"!duration-200 ![animation-duration:0.2s]"
|
|
1029
|
+
],
|
|
1030
|
+
header: ["flex flex-col items-center px-6 pt-8 pb-2 text-center"],
|
|
1031
|
+
body: ["flex flex-1 flex-col items-center px-6 pt-4 pb-6 text-center"],
|
|
1032
|
+
footer: ["mt-auto px-6 py-5 md:pb-11"],
|
|
1033
|
+
actions: ["mx-auto w-full items-center justify-center gap-2.5", "[&_[data-slot=button]]:w-full"],
|
|
1034
|
+
title: ["max-w-sm text-pretty text-center text-2xl leading-8 text-foreground-strong"],
|
|
1035
|
+
description: ["max-w-sm text-pretty text-center text-sm leading-5 text-foreground/60"]
|
|
1036
|
+
},
|
|
1037
|
+
variants: { theme: {
|
|
1038
|
+
brutal: {
|
|
1039
|
+
overlay: ["bg-layer-backdrop"],
|
|
1040
|
+
title: ["font-bold"],
|
|
1041
|
+
content: [
|
|
1042
|
+
"border-2 border-black bg-white text-black shadow-[var(--shadow-lg)]",
|
|
1043
|
+
"data-[vaul-drawer-direction=bottom]:border-x-0 md:data-[vaul-drawer-direction=bottom]:border-x-2",
|
|
1044
|
+
"data-[vaul-drawer-direction=bottom]:border-b-0 md:data-[vaul-drawer-direction=bottom]:border-b-2"
|
|
1045
|
+
]
|
|
1046
|
+
},
|
|
1047
|
+
elegant: {
|
|
1048
|
+
overlay: ["bg-layer-backdrop backdrop-blur-[2px]"],
|
|
1049
|
+
content: [
|
|
1050
|
+
"overflow-clip rounded-lg bg-layer-popover text-foreground shadow-xl md:rounded-xl",
|
|
1051
|
+
"data-[vaul-drawer-direction=bottom]:rounded-b-none",
|
|
1052
|
+
"md:data-[vaul-drawer-direction=bottom]:max-w-md",
|
|
1053
|
+
"md:data-[vaul-drawer-direction=top]:max-w-md",
|
|
1054
|
+
"md:data-[vaul-drawer-direction=left]:max-w-md",
|
|
1055
|
+
"md:data-[vaul-drawer-direction=right]:max-w-md"
|
|
1056
|
+
],
|
|
1057
|
+
header: ["bg-white px-8 pt-9 pb-2"],
|
|
1058
|
+
body: ["bg-white px-8 pt-4 pb-7"],
|
|
1059
|
+
footer: ["mt-0 px-8 py-5 md:pb-11"],
|
|
1060
|
+
actions: ["flex w-fit max-w-none flex-row justify-center", "[&_[data-slot=button]]:w-auto"],
|
|
1061
|
+
title: ["font-sans text-2xl leading-8 font-semibold text-[oklch(0.22_0_0)]"],
|
|
1062
|
+
description: ["font-sans text-sm leading-5 text-[oklch(0.48_0_0)]"]
|
|
1063
|
+
}
|
|
1064
|
+
} }
|
|
1065
|
+
});
|
|
1066
|
+
function BottomSheet({ direction = "bottom", ...props }) {
|
|
1067
|
+
return /* @__PURE__ */ jsx(Drawer.Root, {
|
|
1068
|
+
direction,
|
|
1069
|
+
...props
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
function BottomSheetTrigger({ children, render, ...props }) {
|
|
1073
|
+
if (render) return /* @__PURE__ */ jsx(Drawer.Trigger, {
|
|
1074
|
+
"data-slot": "bottom-sheet-trigger",
|
|
1075
|
+
asChild: true,
|
|
1076
|
+
...props,
|
|
1077
|
+
children: cloneElement(render, void 0, children ?? render.props.children)
|
|
1078
|
+
});
|
|
1079
|
+
return /* @__PURE__ */ jsx(Drawer.Trigger, {
|
|
1080
|
+
"data-slot": "bottom-sheet-trigger",
|
|
1081
|
+
...props,
|
|
1082
|
+
children
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
function BottomSheetPortal({ className, children, ...props }) {
|
|
1086
|
+
const portalChildren = Children.map(children, (child) => {
|
|
1087
|
+
if (isValidElement(child) && child.type === BottomSheetPositioner) return Children.map(child.props.children, (positionerChild) => withPortalClassName(positionerChild, className));
|
|
1088
|
+
return withPortalClassName(child, className);
|
|
1089
|
+
});
|
|
1090
|
+
return /* @__PURE__ */ jsx(Drawer.Portal, {
|
|
1091
|
+
...props,
|
|
1092
|
+
children: portalChildren
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
function withPortalClassName(child, className) {
|
|
1096
|
+
if (!className || !isValidElement(child)) return child;
|
|
1097
|
+
return cloneElement(child, { className: cn(child.props.className, className) });
|
|
1098
|
+
}
|
|
1099
|
+
function BottomSheetPositioner({ className, ...props }) {
|
|
1100
|
+
const { positioner } = bottomSheet({ theme: useThemeFamily() });
|
|
1101
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1102
|
+
"data-slot": "bottom-sheet-positioner",
|
|
1103
|
+
className: positioner({ className }),
|
|
1104
|
+
...props
|
|
1105
|
+
});
|
|
1106
|
+
}
|
|
1107
|
+
function BottomSheetOverlay({ className, ...props }) {
|
|
1108
|
+
const theme = useThemeFamily();
|
|
1109
|
+
const { overlay } = bottomSheet({ theme });
|
|
1110
|
+
return /* @__PURE__ */ jsx(Drawer.Overlay, {
|
|
1111
|
+
"data-slot": "bottom-sheet-overlay",
|
|
1112
|
+
"data-theme": theme,
|
|
1113
|
+
className: overlay({ className }),
|
|
1114
|
+
...props
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
function BottomSheetContent({ className, ...props }) {
|
|
1118
|
+
const { content } = bottomSheet({ theme: useThemeFamily() });
|
|
1119
|
+
return /* @__PURE__ */ jsx(Drawer.Content, {
|
|
1120
|
+
"data-slot": "bottom-sheet-content",
|
|
1121
|
+
className: content({ className }),
|
|
1122
|
+
...props
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
function BottomSheetClose({ className, variant, size, children, render, ...props }) {
|
|
1126
|
+
const isBrutal = useThemeFamily() === "brutal";
|
|
1127
|
+
if (render) return /* @__PURE__ */ jsx(Drawer.Close, {
|
|
1128
|
+
"data-slot": "bottom-sheet-close",
|
|
1129
|
+
asChild: true,
|
|
1130
|
+
...props,
|
|
1131
|
+
children: cloneElement(render, void 0, children ?? render.props.children)
|
|
1132
|
+
});
|
|
1133
|
+
return /* @__PURE__ */ jsx(Drawer.Close, {
|
|
1134
|
+
"data-slot": "bottom-sheet-close",
|
|
1135
|
+
asChild: true,
|
|
1136
|
+
...props,
|
|
1137
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
1138
|
+
variant: variant ?? (isBrutal ? "outline" : "ghost"),
|
|
1139
|
+
size: size ?? (isBrutal ? "icon-sm" : "icon-sm"),
|
|
1140
|
+
"aria-label": "Close",
|
|
1141
|
+
className: cn(isBrutal ? "absolute top-3 right-3" : "absolute top-4 right-6", isBrutal ? "bg-white" : "p-0 text-foreground-placeholder hover:bg-transparent hover:text-foreground", className),
|
|
1142
|
+
children: children ?? /* @__PURE__ */ jsx(X, { className: "size-4" })
|
|
1143
|
+
})
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
function BottomSheetHeader({ className, render, ...props }) {
|
|
1147
|
+
const { header } = bottomSheet({ theme: useThemeFamily() });
|
|
1148
|
+
return useRender({
|
|
1149
|
+
defaultTagName: "div",
|
|
1150
|
+
render,
|
|
1151
|
+
props: mergeProps({ className: header({ className }) }, props),
|
|
1152
|
+
state: { slot: "bottom-sheet-header" }
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1155
|
+
function BottomSheetFooter({ className, render, ...props }) {
|
|
1156
|
+
const { footer } = bottomSheet({ theme: useThemeFamily() });
|
|
1157
|
+
return useRender({
|
|
1158
|
+
defaultTagName: "div",
|
|
1159
|
+
render,
|
|
1160
|
+
props: mergeProps({ className: footer({ className }) }, props),
|
|
1161
|
+
state: { slot: "bottom-sheet-footer" }
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1164
|
+
function BottomSheetBody({ className, render, ...props }) {
|
|
1165
|
+
const { body } = bottomSheet({ theme: useThemeFamily() });
|
|
1166
|
+
return useRender({
|
|
1167
|
+
defaultTagName: "div",
|
|
1168
|
+
render,
|
|
1169
|
+
props: mergeProps({ className: body({ className }) }, props),
|
|
1170
|
+
state: { slot: "bottom-sheet-body" }
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
function BottomSheetActions({ className, render, children, ...props }) {
|
|
1174
|
+
const theme = useThemeFamily();
|
|
1175
|
+
const { actions } = bottomSheet({ theme });
|
|
1176
|
+
const count = Math.min(3, countActionChildren(children));
|
|
1177
|
+
return useRender({
|
|
1178
|
+
defaultTagName: "div",
|
|
1179
|
+
render,
|
|
1180
|
+
props: mergeProps({
|
|
1181
|
+
className: actions({ className: cn(theme === "elegant" ? "flex-row" : count <= 1 ? "flex max-w-64 flex-col" : count === 2 ? "flex max-w-64 flex-col-reverse" : "grid max-w-[32rem] grid-cols-3", className) }),
|
|
1182
|
+
children
|
|
1183
|
+
}, props),
|
|
1184
|
+
state: { slot: "bottom-sheet-actions" }
|
|
1185
|
+
});
|
|
1186
|
+
}
|
|
1187
|
+
function countActionChildren(children) {
|
|
1188
|
+
return Children.toArray(children).reduce((count, child) => {
|
|
1189
|
+
if (isValidElement(child) && child.type === Fragment) return count + countActionChildren(child.props.children);
|
|
1190
|
+
return count + 1;
|
|
1191
|
+
}, 0);
|
|
1192
|
+
}
|
|
1193
|
+
function BottomSheetTitle({ className, ...props }) {
|
|
1194
|
+
const { title } = bottomSheet({ theme: useThemeFamily() });
|
|
1195
|
+
return /* @__PURE__ */ jsx(Drawer.Title, {
|
|
1196
|
+
"data-slot": "bottom-sheet-title",
|
|
1197
|
+
className: title({ className }),
|
|
1198
|
+
...props
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
function BottomSheetDescription({ className, ...props }) {
|
|
1202
|
+
const { description } = bottomSheet({ theme: useThemeFamily() });
|
|
1203
|
+
return /* @__PURE__ */ jsx(Drawer.Description, {
|
|
1204
|
+
"data-slot": "bottom-sheet-description",
|
|
1205
|
+
className: description({ className }),
|
|
1206
|
+
...props
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
//#endregion
|
|
324
1210
|
//#region src/components/copyable-code/copyable-code.tsx
|
|
325
1211
|
const copyableCode = tv({
|
|
326
1212
|
slots: {
|
|
@@ -1741,47 +2627,282 @@ function DropdownMenuCheckIcon() {
|
|
|
1741
2627
|
})
|
|
1742
2628
|
});
|
|
1743
2629
|
}
|
|
1744
|
-
function DropdownMenuRadioGroup({ ...props }) {
|
|
1745
|
-
return /* @__PURE__ */ jsx(Menu.RadioGroup, {
|
|
1746
|
-
"data-slot": "dropdown-menu-radio-group",
|
|
1747
|
-
...props
|
|
2630
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
2631
|
+
return /* @__PURE__ */ jsx(Menu.RadioGroup, {
|
|
2632
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
2633
|
+
...props
|
|
2634
|
+
});
|
|
2635
|
+
}
|
|
2636
|
+
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
2637
|
+
const { radioItem, indicator } = dropdownMenu({ theme: useThemeFamily() });
|
|
2638
|
+
return /* @__PURE__ */ jsxs(Menu.RadioItem, {
|
|
2639
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
2640
|
+
className: radioItem({ className }),
|
|
2641
|
+
...props,
|
|
2642
|
+
children: [children, /* @__PURE__ */ jsx("span", {
|
|
2643
|
+
className: indicator(),
|
|
2644
|
+
children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(DropdownMenuCheckIcon, {}) })
|
|
2645
|
+
})]
|
|
2646
|
+
});
|
|
2647
|
+
}
|
|
2648
|
+
function DropdownMenuRadioItemIndicator({ className, ...props }) {
|
|
2649
|
+
return /* @__PURE__ */ jsx(Menu.RadioItemIndicator, {
|
|
2650
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
2651
|
+
className,
|
|
2652
|
+
...props
|
|
2653
|
+
});
|
|
2654
|
+
}
|
|
2655
|
+
function DropdownMenuCheckboxItem({ className, children, ...props }) {
|
|
2656
|
+
const { item, indicator } = dropdownMenu({ theme: useThemeFamily() });
|
|
2657
|
+
return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
|
|
2658
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
2659
|
+
className: item({ className }),
|
|
2660
|
+
...props,
|
|
2661
|
+
children: [children, /* @__PURE__ */ jsx("span", {
|
|
2662
|
+
className: indicator(),
|
|
2663
|
+
children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(DropdownMenuCheckIcon, {}) })
|
|
2664
|
+
})]
|
|
2665
|
+
});
|
|
2666
|
+
}
|
|
2667
|
+
function DropdownMenuCheckboxItemIndicator({ className, ...props }) {
|
|
2668
|
+
return /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, {
|
|
2669
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
2670
|
+
className,
|
|
2671
|
+
...props
|
|
2672
|
+
});
|
|
2673
|
+
}
|
|
2674
|
+
//#endregion
|
|
2675
|
+
//#region src/components/lightbox/lightbox.tsx
|
|
2676
|
+
const lightbox = tv({
|
|
2677
|
+
slots: {
|
|
2678
|
+
backdrop: ["fixed inset-0 z-[70] bg-layer-backdrop data-[closed]:hidden"],
|
|
2679
|
+
content: ["pointer-events-none fixed inset-0 z-[71] data-[closed]:hidden"],
|
|
2680
|
+
header: ["safe-top safe-left safe-right pointer-events-auto shrink-0"],
|
|
2681
|
+
title: ["min-w-0 flex-1 truncate font-heading text-sm font-bold"],
|
|
2682
|
+
actions: ["flex shrink-0 items-center gap-1.5"],
|
|
2683
|
+
stage: ["pointer-events-none relative flex min-h-0 flex-1 items-center justify-center overflow-hidden"],
|
|
2684
|
+
media: ["pointer-events-auto max-h-[80vh] max-w-[86vw] border-2"],
|
|
2685
|
+
navigationButton: [
|
|
2686
|
+
"pointer-events-auto absolute z-10 inline-flex items-center justify-center",
|
|
2687
|
+
"border-2 border-line-strong bg-layer-panel text-foreground-strong shadow-sm",
|
|
2688
|
+
"transition-[background-color,color,opacity,box-shadow,transform] duration-150",
|
|
2689
|
+
"outline outline-[1px] outline-offset-2 outline-transparent",
|
|
2690
|
+
"focus-visible:outline-foreground-strong",
|
|
2691
|
+
"data-[disabled=true]:cursor-default",
|
|
2692
|
+
"[&_svg]:pointer-events-none [&_svg]:size-6 [&_svg]:shrink-0"
|
|
2693
|
+
],
|
|
2694
|
+
infoBar: [
|
|
2695
|
+
"pointer-events-auto flex min-w-0 items-center",
|
|
2696
|
+
"bg-layer-panel text-foreground-strong",
|
|
2697
|
+
"shadow-[0_12px_32px_-18px_oklch(0_0_0_/_0.55)]"
|
|
2698
|
+
],
|
|
2699
|
+
infoTitle: ["min-w-0 flex-1 truncate font-heading text-sm font-bold"],
|
|
2700
|
+
infoActions: ["flex shrink-0 items-center gap-1.5"],
|
|
2701
|
+
close: []
|
|
2702
|
+
},
|
|
2703
|
+
variants: { theme: {
|
|
2704
|
+
brutal: {
|
|
2705
|
+
header: ["bg-transparent shadow-none"],
|
|
2706
|
+
title: ["text-foreground-strong"],
|
|
2707
|
+
media: ["border-line-strong bg-layer-panel shadow-xl"],
|
|
2708
|
+
navigationButton: [
|
|
2709
|
+
"size-8 rounded-none",
|
|
2710
|
+
"hover:bg-layer-panel data-[disabled=true]:text-black/35",
|
|
2711
|
+
"[&_svg]:size-6"
|
|
2712
|
+
],
|
|
2713
|
+
infoBar: [
|
|
2714
|
+
"w-[clamp(9rem,20vw,14rem)] max-w-[calc(100vw-3rem)] min-w-[9rem]",
|
|
2715
|
+
"gap-2 rounded-none border-2 border-black py-0.5 pr-0.5 pl-2.5 shadow-[var(--shadow)]",
|
|
2716
|
+
"[&_[data-slot=button]_svg]:stroke-2"
|
|
2717
|
+
],
|
|
2718
|
+
infoTitle: ["text-xs text-black"]
|
|
2719
|
+
},
|
|
2720
|
+
elegant: {
|
|
2721
|
+
backdrop: ["bg-[oklch(0_0_0_/_0.72)] backdrop-blur-[2px]"],
|
|
2722
|
+
header: ["bg-transparent shadow-none"],
|
|
2723
|
+
title: ["font-sans font-medium text-foreground-strong"],
|
|
2724
|
+
actions: ["gap-2"],
|
|
2725
|
+
media: ["border border-line-subtle bg-layer-panel shadow-none"],
|
|
2726
|
+
navigationButton: [
|
|
2727
|
+
"size-8 rounded-full border-0",
|
|
2728
|
+
"bg-white/75 backdrop-blur-md",
|
|
2729
|
+
"text-foreground-muted",
|
|
2730
|
+
"shadow-none",
|
|
2731
|
+
"hover:bg-white/85 hover:text-foreground-strong",
|
|
2732
|
+
"active:scale-[0.97]",
|
|
2733
|
+
"data-[disabled=true]:bg-white/35 data-[disabled=true]:text-black/30 data-[disabled=true]:shadow-none",
|
|
2734
|
+
"data-[disabled=true]:hover:bg-white/35 data-[disabled=true]:active:scale-100",
|
|
2735
|
+
"[&_svg]:size-5"
|
|
2736
|
+
],
|
|
2737
|
+
infoBar: [
|
|
2738
|
+
"w-[clamp(9rem,20vw,14rem)] max-w-[calc(100vw-3rem)] min-w-[9rem]",
|
|
2739
|
+
"gap-2 rounded py-0.5 pr-0.5 pl-2.5",
|
|
2740
|
+
"bg-[rgba(245,245,245,0.8)] text-neutral-900 shadow-none backdrop-blur-[10px]",
|
|
2741
|
+
"[&_[data-slot=button]]:text-neutral-600 [&_[data-slot=button]]:hover:bg-neutral-900/10 [&_[data-slot=button]]:hover:text-neutral-800"
|
|
2742
|
+
],
|
|
2743
|
+
infoTitle: ["font-sans text-xs font-medium text-neutral-800"],
|
|
2744
|
+
infoActions: ["gap-1"]
|
|
2745
|
+
}
|
|
2746
|
+
} }
|
|
2747
|
+
});
|
|
2748
|
+
function Lightbox({ closeOnModW = true, defaultOpen = false, modal = true, onOpenChange, open, children, ...props }) {
|
|
2749
|
+
const dialogRef = useRef(null);
|
|
2750
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
|
|
2751
|
+
const effectiveOpen = open ?? uncontrolledOpen;
|
|
2752
|
+
const handleOpenChange = useCallback((nextOpen, eventDetails) => {
|
|
2753
|
+
if (open === void 0) setUncontrolledOpen(nextOpen);
|
|
2754
|
+
onOpenChange?.(nextOpen, eventDetails);
|
|
2755
|
+
}, [onOpenChange, open]);
|
|
2756
|
+
const modWClose = closeOnModW && effectiveOpen ? /* @__PURE__ */ jsx(LightboxModWClose, { dialogRef }) : null;
|
|
2757
|
+
return /* @__PURE__ */ jsxs(Dialog$1.Root, {
|
|
2758
|
+
actionsRef: dialogRef,
|
|
2759
|
+
defaultOpen,
|
|
2760
|
+
modal,
|
|
2761
|
+
onOpenChange: handleOpenChange,
|
|
2762
|
+
open,
|
|
2763
|
+
...props,
|
|
2764
|
+
children: [modWClose, children]
|
|
2765
|
+
});
|
|
2766
|
+
}
|
|
2767
|
+
function LightboxModWClose({ dialogRef }) {
|
|
2768
|
+
useHotkey("Mod+W", (event) => {
|
|
2769
|
+
event.preventDefault();
|
|
2770
|
+
event.stopPropagation();
|
|
2771
|
+
dialogRef.current?.close();
|
|
2772
|
+
}, { meta: {
|
|
2773
|
+
name: "Close lightbox",
|
|
2774
|
+
description: "Close the active lightbox before the browser closes the tab."
|
|
2775
|
+
} });
|
|
2776
|
+
return null;
|
|
2777
|
+
}
|
|
2778
|
+
function LightboxTrigger(props) {
|
|
2779
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
|
|
2780
|
+
"data-slot": "lightbox-trigger",
|
|
2781
|
+
...props
|
|
2782
|
+
});
|
|
2783
|
+
}
|
|
2784
|
+
function LightboxPortal(props) {
|
|
2785
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, {
|
|
2786
|
+
"data-slot": "lightbox-portal",
|
|
2787
|
+
...props
|
|
2788
|
+
});
|
|
2789
|
+
}
|
|
2790
|
+
function LightboxContent({ className, initialFocus = false, finalFocus = false, ...props }) {
|
|
2791
|
+
const theme = useThemeFamily();
|
|
2792
|
+
const { backdrop, content } = lightbox({ theme });
|
|
2793
|
+
return /* @__PURE__ */ jsxs(LightboxPortal, { children: [/* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
2794
|
+
"data-slot": "lightbox-backdrop",
|
|
2795
|
+
"data-theme": theme,
|
|
2796
|
+
className: backdrop()
|
|
2797
|
+
}), /* @__PURE__ */ jsx(Dialog$1.Popup, {
|
|
2798
|
+
"data-slot": "lightbox-content",
|
|
2799
|
+
"data-theme": theme,
|
|
2800
|
+
initialFocus,
|
|
2801
|
+
finalFocus,
|
|
2802
|
+
className: content({ className }),
|
|
2803
|
+
...props
|
|
2804
|
+
})] });
|
|
2805
|
+
}
|
|
2806
|
+
function LightboxHeader({ render, className, ...props }) {
|
|
2807
|
+
const { header } = lightbox({ theme: useThemeFamily() });
|
|
2808
|
+
return useRender({
|
|
2809
|
+
defaultTagName: "div",
|
|
2810
|
+
render,
|
|
2811
|
+
props: mergeProps({ className: header({ className }) }, props),
|
|
2812
|
+
state: { slot: "lightbox-header" }
|
|
2813
|
+
});
|
|
2814
|
+
}
|
|
2815
|
+
function LightboxTitle({ render, className, ...props }) {
|
|
2816
|
+
const { title } = lightbox({ theme: useThemeFamily() });
|
|
2817
|
+
return useRender({
|
|
2818
|
+
defaultTagName: "div",
|
|
2819
|
+
render,
|
|
2820
|
+
props: mergeProps({ className: title({ className }) }, props),
|
|
2821
|
+
state: { slot: "lightbox-title" }
|
|
2822
|
+
});
|
|
2823
|
+
}
|
|
2824
|
+
function LightboxActions({ render, className, ...props }) {
|
|
2825
|
+
const { actions } = lightbox({ theme: useThemeFamily() });
|
|
2826
|
+
return useRender({
|
|
2827
|
+
defaultTagName: "div",
|
|
2828
|
+
render,
|
|
2829
|
+
props: mergeProps({ className: actions({ className }) }, props),
|
|
2830
|
+
state: { slot: "lightbox-actions" }
|
|
2831
|
+
});
|
|
2832
|
+
}
|
|
2833
|
+
function LightboxStage({ render, className, ...props }) {
|
|
2834
|
+
const { stage } = lightbox({ theme: useThemeFamily() });
|
|
2835
|
+
return useRender({
|
|
2836
|
+
defaultTagName: "div",
|
|
2837
|
+
render,
|
|
2838
|
+
props: mergeProps({ className: stage({ className }) }, props),
|
|
2839
|
+
state: { slot: "lightbox-stage" }
|
|
1748
2840
|
});
|
|
1749
2841
|
}
|
|
1750
|
-
function
|
|
1751
|
-
const {
|
|
1752
|
-
return
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
className: indicator(),
|
|
1758
|
-
children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(DropdownMenuCheckIcon, {}) })
|
|
1759
|
-
})]
|
|
2842
|
+
function LightboxMedia({ render, className, ...props }) {
|
|
2843
|
+
const { media } = lightbox({ theme: useThemeFamily() });
|
|
2844
|
+
return useRender({
|
|
2845
|
+
defaultTagName: "div",
|
|
2846
|
+
render,
|
|
2847
|
+
props: mergeProps({ className: media({ className }) }, props),
|
|
2848
|
+
state: { slot: "lightbox-media" }
|
|
1760
2849
|
});
|
|
1761
2850
|
}
|
|
1762
|
-
function
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
2851
|
+
function LightboxNavigationButton({ className, direction, disabled, onClick, type = "button", ...props }) {
|
|
2852
|
+
const { navigationButton } = lightbox({ theme: useThemeFamily() });
|
|
2853
|
+
const handleClick = useCallback((event) => {
|
|
2854
|
+
event.stopPropagation();
|
|
2855
|
+
if (disabled) {
|
|
2856
|
+
event.preventDefault();
|
|
2857
|
+
return;
|
|
2858
|
+
}
|
|
2859
|
+
onClick?.(event);
|
|
2860
|
+
}, [disabled, onClick]);
|
|
2861
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
2862
|
+
"aria-disabled": disabled,
|
|
2863
|
+
className: navigationButton({ className: cn(direction === "previous" ? "left-8" : "right-8", className) }),
|
|
2864
|
+
"data-disabled": disabled ? "true" : void 0,
|
|
2865
|
+
"data-slot": "lightbox-navigation-button",
|
|
2866
|
+
"data-direction": direction,
|
|
2867
|
+
onClick: handleClick,
|
|
2868
|
+
size: "icon-lg",
|
|
2869
|
+
type,
|
|
2870
|
+
variant: "outline",
|
|
1766
2871
|
...props
|
|
1767
2872
|
});
|
|
1768
2873
|
}
|
|
1769
|
-
function
|
|
1770
|
-
const {
|
|
1771
|
-
return
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
className: indicator(),
|
|
1777
|
-
children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(DropdownMenuCheckIcon, {}) })
|
|
1778
|
-
})]
|
|
2874
|
+
function LightboxInfoBar({ render, className, ...props }) {
|
|
2875
|
+
const { infoBar } = lightbox({ theme: useThemeFamily() });
|
|
2876
|
+
return useRender({
|
|
2877
|
+
defaultTagName: "div",
|
|
2878
|
+
render,
|
|
2879
|
+
props: mergeProps({ className: infoBar({ className }) }, props),
|
|
2880
|
+
state: { slot: "lightbox-info-bar" }
|
|
1779
2881
|
});
|
|
1780
2882
|
}
|
|
1781
|
-
function
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
2883
|
+
function LightboxInfoTitle({ render, className, ...props }) {
|
|
2884
|
+
const { infoTitle } = lightbox({ theme: useThemeFamily() });
|
|
2885
|
+
return useRender({
|
|
2886
|
+
defaultTagName: "div",
|
|
2887
|
+
render,
|
|
2888
|
+
props: mergeProps({ className: infoTitle({ className }) }, props),
|
|
2889
|
+
state: { slot: "lightbox-info-title" }
|
|
2890
|
+
});
|
|
2891
|
+
}
|
|
2892
|
+
function LightboxInfoActions({ render, className, ...props }) {
|
|
2893
|
+
const { infoActions } = lightbox({ theme: useThemeFamily() });
|
|
2894
|
+
return useRender({
|
|
2895
|
+
defaultTagName: "div",
|
|
2896
|
+
render,
|
|
2897
|
+
props: mergeProps({ className: infoActions({ className }) }, props),
|
|
2898
|
+
state: { slot: "lightbox-info-actions" }
|
|
2899
|
+
});
|
|
2900
|
+
}
|
|
2901
|
+
function LightboxClose({ className, ...props }) {
|
|
2902
|
+
const { close } = lightbox({ theme: useThemeFamily() });
|
|
2903
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
2904
|
+
"data-slot": "lightbox-close",
|
|
2905
|
+
className: close({ className }),
|
|
1785
2906
|
...props
|
|
1786
2907
|
});
|
|
1787
2908
|
}
|
|
@@ -1792,60 +2913,52 @@ const tooltip = tv({
|
|
|
1792
2913
|
trigger: ["select-none"],
|
|
1793
2914
|
positioner: ["isolate z-50 outline-none"],
|
|
1794
2915
|
content: [
|
|
1795
|
-
"relative inline-
|
|
1796
|
-
"text-[13px] leading-[18px] whitespace-normal",
|
|
2916
|
+
"relative inline-block max-w-[min(20rem,var(--available-width,20rem))] min-w-0 px-3 py-2",
|
|
2917
|
+
"text-[13px] leading-[18px] whitespace-normal break-words",
|
|
1797
2918
|
"origin-[var(--transform-origin)] outline-none",
|
|
1798
|
-
"transition-[opacity,transform] duration-
|
|
1799
|
-
"data-[starting-style]:scale-
|
|
1800
|
-
"data-[ending-style]:scale-
|
|
2919
|
+
"transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
2920
|
+
"data-[starting-style]:scale-[0.97] data-[starting-style]:opacity-0",
|
|
2921
|
+
"data-[ending-style]:scale-[0.99] data-[ending-style]:opacity-0",
|
|
1801
2922
|
"data-[instant]:transition-none",
|
|
1802
|
-
"
|
|
2923
|
+
"motion-reduce:transition-none",
|
|
2924
|
+
"[&>svg]:mr-1.5 [&>svg]:inline-block [&>svg]:size-3.5 [&>svg]:shrink-0 [&>svg]:align-[-0.125em]",
|
|
1803
2925
|
"has-[[data-slot=kbd]]:py-1.5 has-[[data-slot=kbd]]:pr-1.5",
|
|
1804
|
-
"[&_[data-slot=kbd]]:relative [&_[data-slot=kbd]]:z-10",
|
|
2926
|
+
"[&_[data-slot=kbd]]:relative [&_[data-slot=kbd]]:z-10 [&_[data-slot=kbd]]:ml-1.5",
|
|
1805
2927
|
"[&_[data-slot=kbd]]:h-4 [&_[data-slot=kbd]]:min-w-4 [&_[data-slot=kbd]]:px-1 [&_[data-slot=kbd]]:py-0",
|
|
1806
2928
|
"[&_[data-slot=kbd]]:text-[10px] [&_[data-slot=kbd]]:font-semibold [&_[data-slot=kbd]]:leading-none"
|
|
1807
2929
|
],
|
|
1808
2930
|
arrow: [
|
|
1809
|
-
"pointer-events-none flex",
|
|
1810
|
-
"data-[side=top]:bottom-[-
|
|
1811
|
-
"data-[side=bottom]:top-[-
|
|
2931
|
+
"pointer-events-none flex overflow-visible",
|
|
2932
|
+
"data-[side=top]:bottom-[-5px]",
|
|
2933
|
+
"data-[side=bottom]:top-[-5px] data-[side=bottom]:rotate-180",
|
|
1812
2934
|
"data-[side=left]:right-[-8px] data-[side=left]:-rotate-90",
|
|
1813
2935
|
"data-[side=right]:left-[-8px] data-[side=right]:rotate-90",
|
|
1814
2936
|
"data-[side=inline-start]:right-[-8px] data-[side=inline-start]:-rotate-90",
|
|
1815
2937
|
"data-[side=inline-end]:left-[-8px] data-[side=inline-end]:rotate-90"
|
|
1816
2938
|
]
|
|
1817
2939
|
},
|
|
1818
|
-
variants: {
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
arrow: ["hidden"]
|
|
1828
|
-
},
|
|
1829
|
-
elegant: {
|
|
1830
|
-
content: [
|
|
1831
|
-
"rounded-md bg-layer-popover",
|
|
1832
|
-
"font-sans text-[13px] font-medium tracking-[-0.005em] text-foreground-strong",
|
|
1833
|
-
"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)]",
|
|
1834
|
-
"[&_[data-slot=kbd]]:bg-foreground-muted/10 [&_[data-slot=kbd]]:text-foreground-muted [&_[data-slot=kbd]]:ring-0"
|
|
1835
|
-
],
|
|
1836
|
-
arrow: []
|
|
1837
|
-
}
|
|
2940
|
+
variants: { theme: {
|
|
2941
|
+
brutal: {
|
|
2942
|
+
content: [
|
|
2943
|
+
"border-2 border-black bg-soft-signal",
|
|
2944
|
+
"font-sans font-bold text-black",
|
|
2945
|
+
"shadow-[var(--shadow-brutal-sm)]",
|
|
2946
|
+
"[&_[data-slot=kbd]]:border-black/70 [&_[data-slot=kbd]]:bg-white [&_[data-slot=kbd]]:text-black/70 [&_[data-slot=kbd]]:ring-0"
|
|
2947
|
+
],
|
|
2948
|
+
arrow: ["hidden"]
|
|
1838
2949
|
},
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
"
|
|
1843
|
-
"
|
|
1844
|
-
"[
|
|
1845
|
-
|
|
2950
|
+
elegant: {
|
|
2951
|
+
content: [
|
|
2952
|
+
"rounded-md bg-[oklch(0.263_0.009_294.9)] text-[oklch(0.965_0.002_286)]",
|
|
2953
|
+
"font-sans text-[13px] font-medium tracking-[-0.005em]",
|
|
2954
|
+
"shadow-[0_18px_42px_-18px_oklch(0_0_0_/_0.54)]",
|
|
2955
|
+
"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-['']",
|
|
2956
|
+
"dark:bg-[oklch(0.230_0.010_294.8)] dark:shadow-[0_18px_42px_-18px_oklch(0_0_0_/_0.68)]",
|
|
2957
|
+
"[&_[data-slot=kbd]]:bg-white/[0.08] [&_[data-slot=kbd]]:text-white/72 [&_[data-slot=kbd]]:ring-0"
|
|
2958
|
+
],
|
|
2959
|
+
arrow: []
|
|
1846
2960
|
}
|
|
1847
|
-
}
|
|
1848
|
-
defaultVariants: { variant: "default" }
|
|
2961
|
+
} }
|
|
1849
2962
|
});
|
|
1850
2963
|
function TooltipProvider({ delay = 0, ...props }) {
|
|
1851
2964
|
return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
|
|
@@ -1870,43 +2983,38 @@ function TooltipPortal(props) {
|
|
|
1870
2983
|
...props
|
|
1871
2984
|
});
|
|
1872
2985
|
}
|
|
1873
|
-
function TooltipArrow({ className,
|
|
1874
|
-
const
|
|
1875
|
-
|
|
1876
|
-
variant
|
|
1877
|
-
});
|
|
2986
|
+
function TooltipArrow({ className, ...props }) {
|
|
2987
|
+
const theme = useThemeFamily();
|
|
2988
|
+
const { arrow } = tooltip({ theme });
|
|
1878
2989
|
return /* @__PURE__ */ jsx(Tooltip$1.Arrow, {
|
|
1879
2990
|
"data-slot": "tooltip-arrow",
|
|
1880
2991
|
className: arrow({ className }),
|
|
1881
2992
|
...props,
|
|
1882
|
-
children: /* @__PURE__ */ jsx(TooltipArrowSvg, {
|
|
2993
|
+
children: /* @__PURE__ */ jsx(TooltipArrowSvg, { theme })
|
|
1883
2994
|
});
|
|
1884
2995
|
}
|
|
1885
|
-
function TooltipArrowSvg({
|
|
1886
|
-
const
|
|
1887
|
-
return /* @__PURE__ */
|
|
2996
|
+
function TooltipArrowSvg({ theme, ...props }) {
|
|
2997
|
+
const isElegant = theme === "elegant";
|
|
2998
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
1888
2999
|
width: "12",
|
|
1889
3000
|
height: "6",
|
|
1890
3001
|
viewBox: "0 0 12 6",
|
|
1891
3002
|
fill: "none",
|
|
1892
3003
|
...props,
|
|
1893
|
-
children:
|
|
3004
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
1894
3005
|
d: "M1 0H11L6 5.25Z",
|
|
1895
|
-
className:
|
|
1896
|
-
})
|
|
1897
|
-
d: "M1 0.5L6 5.25L11 0.5",
|
|
1898
|
-
className: isInverse ? "stroke-[oklch(0_0_0_/_0.18)]" : "stroke-[oklch(0.21_0.006_285_/_0.10)]",
|
|
1899
|
-
strokeLinecap: "round",
|
|
1900
|
-
strokeLinejoin: "round",
|
|
1901
|
-
vectorEffect: "non-scaling-stroke"
|
|
1902
|
-
})]
|
|
3006
|
+
className: isElegant ? "fill-[oklch(0.263_0.009_294.9)] dark:fill-[oklch(0.230_0.010_294.8)]" : "fill-layer-popover"
|
|
3007
|
+
})
|
|
1903
3008
|
});
|
|
1904
3009
|
}
|
|
1905
|
-
function TooltipContent({ align = "center", alignOffset = 0, anchor, arrowPadding, collisionAvoidance
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
3010
|
+
function TooltipContent({ align = "center", alignOffset = 0, anchor, arrowPadding, collisionAvoidance = {
|
|
3011
|
+
side: "shift",
|
|
3012
|
+
align: "shift",
|
|
3013
|
+
fallbackAxisSide: "none"
|
|
3014
|
+
}, collisionBoundary, collisionPadding, disableAnchorTracking = false, positionMethod = "fixed", side = "top", sideOffset, sticky, portalProps, className, children, ...props }) {
|
|
3015
|
+
const theme = useThemeFamily();
|
|
3016
|
+
const { positioner, content } = tooltip({ theme });
|
|
3017
|
+
const resolvedSideOffset = sideOffset ?? (theme === "elegant" ? 8 : 6);
|
|
1910
3018
|
return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
|
|
1911
3019
|
...portalProps,
|
|
1912
3020
|
children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
@@ -1920,14 +3028,14 @@ function TooltipContent({ align = "center", alignOffset = 0, anchor, arrowPaddin
|
|
|
1920
3028
|
disableAnchorTracking,
|
|
1921
3029
|
positionMethod,
|
|
1922
3030
|
side,
|
|
1923
|
-
sideOffset,
|
|
3031
|
+
sideOffset: resolvedSideOffset,
|
|
1924
3032
|
sticky,
|
|
1925
3033
|
className: positioner(),
|
|
1926
3034
|
children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
|
|
1927
3035
|
"data-slot": "tooltip-content",
|
|
1928
3036
|
className: content({ className }),
|
|
1929
3037
|
...props,
|
|
1930
|
-
children: [children, /* @__PURE__ */ jsx(TooltipArrow, {
|
|
3038
|
+
children: [children, /* @__PURE__ */ jsx(TooltipArrow, {})]
|
|
1931
3039
|
})
|
|
1932
3040
|
})
|
|
1933
3041
|
});
|
|
@@ -2096,6 +3204,142 @@ function PopoverBackdrop({ className, ...props }) {
|
|
|
2096
3204
|
});
|
|
2097
3205
|
}
|
|
2098
3206
|
//#endregion
|
|
3207
|
+
//#region src/components/preview-card/preview-card.tsx
|
|
3208
|
+
const previewCard = tv({
|
|
3209
|
+
slots: {
|
|
3210
|
+
trigger: ["select-none"],
|
|
3211
|
+
positioner: ["isolate z-50 outline-none"],
|
|
3212
|
+
popup: [
|
|
3213
|
+
"max-h-[var(--available-height)] min-w-[220px] overflow-hidden",
|
|
3214
|
+
"outline-none",
|
|
3215
|
+
"origin-[var(--transform-origin)] transform-gpu opacity-100 will-change-[transform,opacity]",
|
|
3216
|
+
"transition-[opacity,transform] duration-[250ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
3217
|
+
"data-[starting-style]:scale-[0.97] data-[starting-style]:opacity-0",
|
|
3218
|
+
"data-[ending-style]:scale-[0.99] data-[ending-style]:opacity-0 data-[ending-style]:duration-150",
|
|
3219
|
+
"data-[instant]:transition-none motion-reduce:transition-none"
|
|
3220
|
+
],
|
|
3221
|
+
header: ["flex items-start gap-3 px-3 pt-3 pb-2"],
|
|
3222
|
+
separator: ["border-t"],
|
|
3223
|
+
title: ["m-0 truncate text-sm leading-none"],
|
|
3224
|
+
description: ["m-0 truncate px-3 py-2 text-xs leading-5"],
|
|
3225
|
+
arrow: ["size-2 rotate-45"]
|
|
3226
|
+
},
|
|
3227
|
+
variants: { theme: {
|
|
3228
|
+
brutal: {
|
|
3229
|
+
popup: ["border-2 border-black bg-white shadow-lg"],
|
|
3230
|
+
separator: ["border-black"],
|
|
3231
|
+
title: ["font-sans font-bold text-black"],
|
|
3232
|
+
description: ["font-sans text-black/70"],
|
|
3233
|
+
arrow: ["hidden"]
|
|
3234
|
+
},
|
|
3235
|
+
elegant: {
|
|
3236
|
+
popup: ["rounded-md bg-layer-popover shadow-xl"],
|
|
3237
|
+
separator: ["border-line-subtle"],
|
|
3238
|
+
title: ["font-sans font-medium text-foreground-strong"],
|
|
3239
|
+
description: ["bg-black/[0.015] font-sans", "text-[oklch(0.48_0_0)] dark:text-[oklch(0.76_0_0)]"],
|
|
3240
|
+
arrow: ["border-l border-t border-line-muted bg-layer-popover"]
|
|
3241
|
+
}
|
|
3242
|
+
} }
|
|
3243
|
+
});
|
|
3244
|
+
function PreviewCard(props) {
|
|
3245
|
+
return /* @__PURE__ */ jsx(PreviewCard$1.Root, {
|
|
3246
|
+
"data-slot": "preview-card",
|
|
3247
|
+
...props
|
|
3248
|
+
});
|
|
3249
|
+
}
|
|
3250
|
+
function PreviewCardTrigger({ delay = 80, closeDelay = 40, className, ...props }) {
|
|
3251
|
+
const { trigger } = previewCard({ theme: useThemeFamily() });
|
|
3252
|
+
return /* @__PURE__ */ jsx(PreviewCard$1.Trigger, {
|
|
3253
|
+
"data-slot": "preview-card-trigger",
|
|
3254
|
+
delay,
|
|
3255
|
+
closeDelay,
|
|
3256
|
+
className: trigger({ className }),
|
|
3257
|
+
...props
|
|
3258
|
+
});
|
|
3259
|
+
}
|
|
3260
|
+
function PreviewCardPortal(props) {
|
|
3261
|
+
return /* @__PURE__ */ jsx(PreviewCard$1.Portal, {
|
|
3262
|
+
"data-slot": "preview-card-portal",
|
|
3263
|
+
...props
|
|
3264
|
+
});
|
|
3265
|
+
}
|
|
3266
|
+
function PreviewCardPopup({ className, ...props }) {
|
|
3267
|
+
const { popup } = previewCard({ theme: useThemeFamily() });
|
|
3268
|
+
return /* @__PURE__ */ jsx("div", {
|
|
3269
|
+
"data-slot": "preview-card-content",
|
|
3270
|
+
className: popup({ className }),
|
|
3271
|
+
...props
|
|
3272
|
+
});
|
|
3273
|
+
}
|
|
3274
|
+
function PreviewCardContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = true, positionMethod = "fixed", side = "bottom", sideOffset = 6, sticky, portalProps, className, ...props }) {
|
|
3275
|
+
const { positioner, popup } = previewCard({ theme: useThemeFamily() });
|
|
3276
|
+
return /* @__PURE__ */ jsx(PreviewCard$1.Portal, {
|
|
3277
|
+
...portalProps,
|
|
3278
|
+
children: /* @__PURE__ */ jsx(PreviewCard$1.Positioner, {
|
|
3279
|
+
align,
|
|
3280
|
+
alignOffset,
|
|
3281
|
+
anchor,
|
|
3282
|
+
arrowPadding,
|
|
3283
|
+
collisionAvoidance,
|
|
3284
|
+
collisionBoundary,
|
|
3285
|
+
collisionPadding,
|
|
3286
|
+
disableAnchorTracking,
|
|
3287
|
+
positionMethod,
|
|
3288
|
+
side,
|
|
3289
|
+
sideOffset,
|
|
3290
|
+
sticky,
|
|
3291
|
+
className: positioner(),
|
|
3292
|
+
children: /* @__PURE__ */ jsx(PreviewCard$1.Popup, {
|
|
3293
|
+
"data-slot": "preview-card-content",
|
|
3294
|
+
className: popup({ className }),
|
|
3295
|
+
...props
|
|
3296
|
+
})
|
|
3297
|
+
})
|
|
3298
|
+
});
|
|
3299
|
+
}
|
|
3300
|
+
function PreviewCardHeader({ className, ...props }) {
|
|
3301
|
+
const { header } = previewCard({ theme: useThemeFamily() });
|
|
3302
|
+
return /* @__PURE__ */ jsx("div", {
|
|
3303
|
+
"data-slot": "preview-card-header",
|
|
3304
|
+
className: header({ className }),
|
|
3305
|
+
...props
|
|
3306
|
+
});
|
|
3307
|
+
}
|
|
3308
|
+
function PreviewCardSeparator({ className, ...props }) {
|
|
3309
|
+
const { separator } = previewCard({ theme: useThemeFamily() });
|
|
3310
|
+
return /* @__PURE__ */ jsx("div", {
|
|
3311
|
+
role: "separator",
|
|
3312
|
+
"aria-orientation": "horizontal",
|
|
3313
|
+
"data-slot": "preview-card-separator",
|
|
3314
|
+
className: separator({ className }),
|
|
3315
|
+
...props
|
|
3316
|
+
});
|
|
3317
|
+
}
|
|
3318
|
+
function PreviewCardTitle({ className, ...props }) {
|
|
3319
|
+
const { title } = previewCard({ theme: useThemeFamily() });
|
|
3320
|
+
return /* @__PURE__ */ jsx("p", {
|
|
3321
|
+
"data-slot": "preview-card-title",
|
|
3322
|
+
className: title({ className }),
|
|
3323
|
+
...props
|
|
3324
|
+
});
|
|
3325
|
+
}
|
|
3326
|
+
function PreviewCardDescription({ className, ...props }) {
|
|
3327
|
+
const { description } = previewCard({ theme: useThemeFamily() });
|
|
3328
|
+
return /* @__PURE__ */ jsx("p", {
|
|
3329
|
+
"data-slot": "preview-card-description",
|
|
3330
|
+
className: description({ className }),
|
|
3331
|
+
...props
|
|
3332
|
+
});
|
|
3333
|
+
}
|
|
3334
|
+
function PreviewCardArrow({ className, ...props }) {
|
|
3335
|
+
const { arrow } = previewCard({ theme: useThemeFamily() });
|
|
3336
|
+
return /* @__PURE__ */ jsx(PreviewCard$1.Arrow, {
|
|
3337
|
+
"data-slot": "preview-card-arrow",
|
|
3338
|
+
className: arrow({ className }),
|
|
3339
|
+
...props
|
|
3340
|
+
});
|
|
3341
|
+
}
|
|
3342
|
+
//#endregion
|
|
2099
3343
|
//#region src/components/label/label.tsx
|
|
2100
3344
|
const label = tv({
|
|
2101
3345
|
slots: {
|
|
@@ -4057,29 +5301,230 @@ const statusStyle = /* @__PURE__ */ jsx("style", {
|
|
|
4057
5301
|
precedence: "default",
|
|
4058
5302
|
children: STATUS_STYLE
|
|
4059
5303
|
});
|
|
4060
|
-
function StatusRoot({ size, variant, pulse, className, render, ...props }) {
|
|
4061
|
-
const { root } = status({
|
|
5304
|
+
function StatusRoot({ size, variant, pulse, className, render, ...props }) {
|
|
5305
|
+
const { root } = status({
|
|
5306
|
+
theme: useThemeFamily(),
|
|
5307
|
+
size,
|
|
5308
|
+
variant,
|
|
5309
|
+
pulse
|
|
5310
|
+
});
|
|
5311
|
+
return useRender({
|
|
5312
|
+
defaultTagName: "span",
|
|
5313
|
+
render,
|
|
5314
|
+
props: mergeProps({
|
|
5315
|
+
className: root({ className }),
|
|
5316
|
+
children: statusStyle
|
|
5317
|
+
}, props),
|
|
5318
|
+
state: {
|
|
5319
|
+
slot: "status",
|
|
5320
|
+
variant,
|
|
5321
|
+
pulse,
|
|
5322
|
+
size
|
|
5323
|
+
}
|
|
5324
|
+
});
|
|
5325
|
+
}
|
|
5326
|
+
const Status = StatusRoot;
|
|
5327
|
+
//#endregion
|
|
5328
|
+
//#region src/components/progress/progress.tsx
|
|
5329
|
+
const PROGRESS_STYLE = `
|
|
5330
|
+
@keyframes raft-progress-indeterminate {
|
|
5331
|
+
0% {
|
|
5332
|
+
transform: translateX(-65%) scaleX(0.35);
|
|
5333
|
+
}
|
|
5334
|
+
50% {
|
|
5335
|
+
transform: translateX(70%) scaleX(0.6);
|
|
5336
|
+
}
|
|
5337
|
+
100% {
|
|
5338
|
+
transform: translateX(185%) scaleX(0.35);
|
|
5339
|
+
}
|
|
5340
|
+
}
|
|
5341
|
+
|
|
5342
|
+
@media (prefers-reduced-motion: reduce) {
|
|
5343
|
+
[data-slot="progress-indicator"][data-indeterminate] {
|
|
5344
|
+
animation-duration: 2400ms;
|
|
5345
|
+
}
|
|
5346
|
+
}
|
|
5347
|
+
`;
|
|
5348
|
+
const progress = tv({
|
|
5349
|
+
slots: {
|
|
5350
|
+
root: [
|
|
5351
|
+
"group/progress grid w-full min-w-0 gap-1.5",
|
|
5352
|
+
"[--progress-color:var(--foreground-strong)]",
|
|
5353
|
+
"[--progress-light:var(--layer-muted)]",
|
|
5354
|
+
"[--progress-indicator:var(--progress-color)]",
|
|
5355
|
+
"[--progress-track:var(--layer-muted)]"
|
|
5356
|
+
],
|
|
5357
|
+
header: ["flex min-w-0 items-center justify-between gap-3"],
|
|
5358
|
+
label: ["min-w-0 truncate"],
|
|
5359
|
+
value: ["shrink-0 tabular-nums"],
|
|
5360
|
+
track: ["relative w-full overflow-hidden bg-[var(--progress-track)]"],
|
|
5361
|
+
indicator: [
|
|
5362
|
+
"block h-full bg-[var(--progress-indicator)]",
|
|
5363
|
+
"transition-[width,background-color] duration-200 ease-out",
|
|
5364
|
+
"data-[indeterminate]:absolute data-[indeterminate]:inset-y-0 data-[indeterminate]:w-1/2",
|
|
5365
|
+
"data-[indeterminate]:origin-left data-[indeterminate]:[animation:raft-progress-indeterminate_1.4s_ease-in-out_infinite]"
|
|
5366
|
+
]
|
|
5367
|
+
},
|
|
5368
|
+
variants: {
|
|
5369
|
+
theme: {
|
|
5370
|
+
brutal: {
|
|
5371
|
+
root: ["font-heading"],
|
|
5372
|
+
label: ["text-xs font-bold text-foreground-strong"],
|
|
5373
|
+
value: ["font-mono text-xs font-bold text-foreground/70"],
|
|
5374
|
+
track: [
|
|
5375
|
+
"border-2 border-line-strong bg-layer-panel",
|
|
5376
|
+
"shadow-xs",
|
|
5377
|
+
"group-data-[complete]/progress:shadow-none"
|
|
5378
|
+
]
|
|
5379
|
+
},
|
|
5380
|
+
elegant: {
|
|
5381
|
+
root: [
|
|
5382
|
+
"font-sans",
|
|
5383
|
+
"[--progress-indicator:color-mix(in_oklab,var(--progress-color)_90%,transparent)]",
|
|
5384
|
+
"[--progress-track:color-mix(in_oklab,var(--line-subtle)_35%,var(--layer-panel))]",
|
|
5385
|
+
"data-[indeterminate]:[--progress-track:color-mix(in_oklab,var(--line-subtle)_65%,var(--layer-panel))]"
|
|
5386
|
+
],
|
|
5387
|
+
label: ["text-[13px] font-medium leading-5 text-foreground"],
|
|
5388
|
+
value: ["font-mono text-[11px] font-medium leading-5 text-foreground-placeholder"],
|
|
5389
|
+
track: ["rounded-full"],
|
|
5390
|
+
indicator: ["rounded-full"]
|
|
5391
|
+
}
|
|
5392
|
+
},
|
|
5393
|
+
variant: {
|
|
5394
|
+
primary: { root: ["[--progress-color:var(--color-primary-400)]", "[--progress-light:var(--color-primary-200)]"] },
|
|
5395
|
+
information: { root: ["[--progress-color:var(--color-info-base)]", "[--progress-light:var(--color-info-light)]"] },
|
|
5396
|
+
accent: { root: ["[--progress-color:var(--color-accent-400)]", "[--progress-light:var(--color-accent-200)]"] },
|
|
5397
|
+
success: { root: ["[--progress-color:var(--color-success-base)]", "[--progress-light:var(--color-success-light)]"] },
|
|
5398
|
+
warning: { root: ["[--progress-color:var(--color-warning-base)]", "[--progress-light:var(--color-warning-light)]"] },
|
|
5399
|
+
danger: { root: ["[--progress-color:var(--color-danger-base)]", "[--progress-light:var(--color-danger-light)]"] }
|
|
5400
|
+
},
|
|
5401
|
+
size: {
|
|
5402
|
+
sm: { track: ["h-1.5"] },
|
|
5403
|
+
md: { track: ["h-2"] },
|
|
5404
|
+
lg: { track: ["h-2.5"] }
|
|
5405
|
+
}
|
|
5406
|
+
},
|
|
5407
|
+
defaultVariants: {
|
|
5408
|
+
variant: "primary",
|
|
5409
|
+
size: "md"
|
|
5410
|
+
},
|
|
5411
|
+
compoundVariants: [
|
|
5412
|
+
{
|
|
5413
|
+
theme: "brutal",
|
|
5414
|
+
size: "sm",
|
|
5415
|
+
class: { track: "h-3" }
|
|
5416
|
+
},
|
|
5417
|
+
{
|
|
5418
|
+
theme: "brutal",
|
|
5419
|
+
size: "md",
|
|
5420
|
+
class: { track: "h-4" }
|
|
5421
|
+
},
|
|
5422
|
+
{
|
|
5423
|
+
theme: "brutal",
|
|
5424
|
+
size: "lg",
|
|
5425
|
+
class: { track: "h-5" }
|
|
5426
|
+
}
|
|
5427
|
+
]
|
|
5428
|
+
});
|
|
5429
|
+
const progressStyle = /* @__PURE__ */ jsx("style", {
|
|
5430
|
+
href: "raft-ui-progress",
|
|
5431
|
+
precedence: "default",
|
|
5432
|
+
children: PROGRESS_STYLE
|
|
5433
|
+
});
|
|
5434
|
+
function Progress({ size = "md", variant = "primary", className, ...props }) {
|
|
5435
|
+
const { root } = progress({
|
|
4062
5436
|
theme: useThemeFamily(),
|
|
4063
5437
|
size,
|
|
4064
|
-
variant
|
|
4065
|
-
pulse
|
|
5438
|
+
variant
|
|
4066
5439
|
});
|
|
4067
|
-
return
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
5440
|
+
return /* @__PURE__ */ jsx(Progress$1.Root, {
|
|
5441
|
+
"data-slot": "progress",
|
|
5442
|
+
"data-size": size,
|
|
5443
|
+
"data-variant": variant,
|
|
5444
|
+
className: root({ className }),
|
|
5445
|
+
...props
|
|
5446
|
+
});
|
|
5447
|
+
}
|
|
5448
|
+
function ProgressHeader({ className, ...props }) {
|
|
5449
|
+
const { header } = progress({ theme: useThemeFamily() });
|
|
5450
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5451
|
+
"data-slot": "progress-header",
|
|
5452
|
+
className: header({ className }),
|
|
5453
|
+
...props
|
|
5454
|
+
});
|
|
5455
|
+
}
|
|
5456
|
+
function ProgressLabel({ className, ...props }) {
|
|
5457
|
+
const { label } = progress({ theme: useThemeFamily() });
|
|
5458
|
+
return /* @__PURE__ */ jsx(Progress$1.Label, {
|
|
5459
|
+
"data-slot": "progress-label",
|
|
5460
|
+
className: label({ className }),
|
|
5461
|
+
...props
|
|
5462
|
+
});
|
|
5463
|
+
}
|
|
5464
|
+
function ProgressValue({ className, ...props }) {
|
|
5465
|
+
const { value } = progress({ theme: useThemeFamily() });
|
|
5466
|
+
return /* @__PURE__ */ jsx(Progress$1.Value, {
|
|
5467
|
+
"data-slot": "progress-value",
|
|
5468
|
+
className: value({ className }),
|
|
5469
|
+
...props
|
|
5470
|
+
});
|
|
5471
|
+
}
|
|
5472
|
+
function ProgressTrack({ className, ...props }) {
|
|
5473
|
+
const { track } = progress({ theme: useThemeFamily() });
|
|
5474
|
+
return /* @__PURE__ */ jsx(Progress$1.Track, {
|
|
5475
|
+
"data-slot": "progress-track",
|
|
5476
|
+
className: track({ className }),
|
|
5477
|
+
...props
|
|
5478
|
+
});
|
|
5479
|
+
}
|
|
5480
|
+
function ProgressIndicator({ className, ...props }) {
|
|
5481
|
+
const { indicator } = progress({ theme: useThemeFamily() });
|
|
5482
|
+
return /* @__PURE__ */ jsx(Progress$1.Indicator, {
|
|
5483
|
+
"data-slot": "progress-indicator",
|
|
5484
|
+
className: indicator({ className }),
|
|
5485
|
+
...props,
|
|
5486
|
+
children: progressStyle
|
|
5487
|
+
});
|
|
5488
|
+
}
|
|
5489
|
+
//#endregion
|
|
5490
|
+
//#region src/components/skeleton/skeleton.tsx
|
|
5491
|
+
const skeleton = tv({
|
|
5492
|
+
slots: { root: ["animate-pulse", "aria-hidden:pointer-events-none"] },
|
|
5493
|
+
variants: {
|
|
5494
|
+
theme: {
|
|
5495
|
+
brutal: { root: ["data-[variant=line]:bg-black/10", "data-[variant=block]:bg-black/10"] },
|
|
5496
|
+
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]"] }
|
|
5497
|
+
},
|
|
5498
|
+
variant: {
|
|
5499
|
+
line: { root: "h-3" },
|
|
5500
|
+
block: { root: "" },
|
|
5501
|
+
circle: { root: "rounded-full" }
|
|
4079
5502
|
}
|
|
5503
|
+
},
|
|
5504
|
+
compoundVariants: [{
|
|
5505
|
+
theme: "brutal",
|
|
5506
|
+
variant: "circle",
|
|
5507
|
+
class: { root: "bg-black/10" }
|
|
5508
|
+
}, {
|
|
5509
|
+
theme: "elegant",
|
|
5510
|
+
variant: "circle",
|
|
5511
|
+
class: { root: "bg-foreground/[0.08]" }
|
|
5512
|
+
}],
|
|
5513
|
+
defaultVariants: { variant: "block" }
|
|
5514
|
+
});
|
|
5515
|
+
function Skeleton({ variant = "block", className, ...props }) {
|
|
5516
|
+
const { root } = skeleton({
|
|
5517
|
+
theme: useThemeFamily(),
|
|
5518
|
+
variant
|
|
5519
|
+
});
|
|
5520
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5521
|
+
"aria-hidden": "true",
|
|
5522
|
+
"data-slot": "skeleton",
|
|
5523
|
+
"data-variant": variant,
|
|
5524
|
+
className: root({ className }),
|
|
5525
|
+
...props
|
|
4080
5526
|
});
|
|
4081
5527
|
}
|
|
4082
|
-
const Status = StatusRoot;
|
|
4083
5528
|
//#endregion
|
|
4084
5529
|
//#region src/components/banner/banner.tsx
|
|
4085
5530
|
const banner = tv({
|
|
@@ -4747,6 +6192,478 @@ function NotificationCenterEmptyState(props) {
|
|
|
4747
6192
|
});
|
|
4748
6193
|
}
|
|
4749
6194
|
//#endregion
|
|
6195
|
+
//#region src/components/toast/toast.tsx
|
|
6196
|
+
const toastStyles = tv({
|
|
6197
|
+
slots: {
|
|
6198
|
+
viewport: ["pointer-events-none isolate z-[70] w-[min(24rem,calc(100vw-2rem))]", "outline-none"],
|
|
6199
|
+
positioner: ["isolate z-[70] outline-none"],
|
|
6200
|
+
root: [
|
|
6201
|
+
"group/toast pointer-events-auto",
|
|
6202
|
+
"select-text overflow-hidden text-foreground-strong",
|
|
6203
|
+
"outline outline-1 outline-offset-2 outline-transparent",
|
|
6204
|
+
"[--toast-scale:calc(max(0.84,1-(var(--toast-index)*0.04)))]",
|
|
6205
|
+
"[--toast-peek:0.5rem]",
|
|
6206
|
+
"[--toast-gap:0.5rem]",
|
|
6207
|
+
"[--toast-stack-height:var(--toast-frontmost-height,var(--toast-height))]",
|
|
6208
|
+
"[--toast-y:calc((var(--toast-offset-y)*-1)-(var(--toast-index)*var(--toast-gap))+var(--toast-swipe-movement-y))]",
|
|
6209
|
+
"transition-[transform,opacity,height] duration-[220ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
6210
|
+
"data-[limited]:opacity-0",
|
|
6211
|
+
"data-[starting-style]:opacity-0",
|
|
6212
|
+
"data-[ending-style]:opacity-0",
|
|
6213
|
+
"motion-reduce:transition-none"
|
|
6214
|
+
],
|
|
6215
|
+
content: [
|
|
6216
|
+
"relative grid grid-cols-[minmax(0,1fr)] items-center gap-x-3 overflow-hidden",
|
|
6217
|
+
"[&:has([data-slot=toast-description])_[data-slot=toast-body]]:self-start [&:has([data-slot=toast-description])_[data-slot=toast-icon]]:self-start",
|
|
6218
|
+
"[&: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)]",
|
|
6219
|
+
"[&: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)]",
|
|
6220
|
+
"[&: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)]",
|
|
6221
|
+
"[&: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)]",
|
|
6222
|
+
"[&: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",
|
|
6223
|
+
"transition-opacity duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
6224
|
+
"data-[behind]:opacity-0 data-[expanded]:opacity-100",
|
|
6225
|
+
"motion-reduce:transition-none"
|
|
6226
|
+
],
|
|
6227
|
+
icon: ["flex size-5 shrink-0 items-center justify-center", "[&_svg]:size-3.5 [&_svg]:shrink-0"],
|
|
6228
|
+
body: ["min-w-0"],
|
|
6229
|
+
title: ["m-0 truncate text-sm leading-5"],
|
|
6230
|
+
description: ["m-0 text-sm leading-5"],
|
|
6231
|
+
actions: ["flex items-center justify-end gap-1.5"],
|
|
6232
|
+
close: [
|
|
6233
|
+
"absolute top-1.5 right-1.5 inline-flex size-7 shrink-0 items-center justify-center",
|
|
6234
|
+
"outline outline-1 outline-offset-2 outline-transparent",
|
|
6235
|
+
"transition-[background-color,color,border-color,box-shadow,transform] duration-150",
|
|
6236
|
+
"disabled:pointer-events-none disabled:opacity-40",
|
|
6237
|
+
"focus-visible:outline-line-strong",
|
|
6238
|
+
"[&_svg]:size-3.5"
|
|
6239
|
+
],
|
|
6240
|
+
arrow: [
|
|
6241
|
+
"pointer-events-none flex",
|
|
6242
|
+
"data-[side=top]:bottom-[-6px]",
|
|
6243
|
+
"data-[side=bottom]:top-[-6px] data-[side=bottom]:rotate-180",
|
|
6244
|
+
"data-[side=left]:right-[-8px] data-[side=left]:-rotate-90",
|
|
6245
|
+
"data-[side=right]:left-[-8px] data-[side=right]:rotate-90",
|
|
6246
|
+
"data-[side=inline-start]:right-[-8px] data-[side=inline-start]:-rotate-90",
|
|
6247
|
+
"data-[side=inline-end]:left-[-8px] data-[side=inline-end]:rotate-90"
|
|
6248
|
+
]
|
|
6249
|
+
},
|
|
6250
|
+
variants: {
|
|
6251
|
+
theme: {
|
|
6252
|
+
brutal: {
|
|
6253
|
+
root: ["border-2 border-black bg-soft-signal text-black shadow-[var(--shadow-brutal)]", "focus-visible:outline-transparent"],
|
|
6254
|
+
content: [
|
|
6255
|
+
"min-h-0 min-w-0 grid-cols-1 px-3 py-2 font-sans",
|
|
6256
|
+
"gap-y-1.5",
|
|
6257
|
+
"[&:has([data-slot=toast-icon])]:grid-cols-[auto_minmax(0,1fr)]"
|
|
6258
|
+
],
|
|
6259
|
+
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]"],
|
|
6260
|
+
title: ["font-bold text-black"],
|
|
6261
|
+
description: ["font-semibold text-black/75"],
|
|
6262
|
+
actions: ["col-start-1 row-start-2 col-span-full w-full justify-self-stretch justify-end gap-1"],
|
|
6263
|
+
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"],
|
|
6264
|
+
arrow: ["hidden"]
|
|
6265
|
+
},
|
|
6266
|
+
elegant: {
|
|
6267
|
+
root: [
|
|
6268
|
+
"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",
|
|
6269
|
+
"shadow-[0_18px_42px_-18px_oklch(0_0_0_/_0.54)]",
|
|
6270
|
+
"data-[expanded]:bg-[oklch(0.254_0.010_298_/_0.54)] data-[expanded]:shadow-[0_18px_40px_-18px_oklch(0_0_0_/_0.54)]",
|
|
6271
|
+
"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-['']",
|
|
6272
|
+
"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)]"
|
|
6273
|
+
],
|
|
6274
|
+
content: [
|
|
6275
|
+
"gap-x-3.5 font-sans",
|
|
6276
|
+
"[&:has([data-slot=toast-icon])]:grid-cols-[auto_minmax(0,1fr)]",
|
|
6277
|
+
"[&:has([data-slot=toast-actions])]:min-w-[18rem]",
|
|
6278
|
+
"[&:has([data-slot=toast-actions])]:min-h-14",
|
|
6279
|
+
"[&:has([data-slot=toast-actions])]:py-3",
|
|
6280
|
+
"[&:has([data-slot=toast-actions])]:pl-3.5",
|
|
6281
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:min-h-14",
|
|
6282
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:min-w-[18rem]",
|
|
6283
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:py-3",
|
|
6284
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-title])]:pl-3.5",
|
|
6285
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-icon])]:min-h-14",
|
|
6286
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-icon])]:min-w-[18rem]",
|
|
6287
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-icon])]:py-3",
|
|
6288
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-icon])]:pl-3.5",
|
|
6289
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-close])]:min-h-14",
|
|
6290
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-close])]:min-w-[18rem]",
|
|
6291
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-close])]:py-3",
|
|
6292
|
+
"[&:has([data-slot=toast-description]):has([data-slot=toast-close])]:pl-3.5",
|
|
6293
|
+
"[&:has([data-slot=toast-close])]:pr-3",
|
|
6294
|
+
"[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:min-w-0",
|
|
6295
|
+
"[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:min-h-10",
|
|
6296
|
+
"[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:pl-3.5",
|
|
6297
|
+
"[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:py-2",
|
|
6298
|
+
"[&:has([data-slot=toast-icon]):not(:has([data-slot=toast-actions])):not(:has([data-slot=toast-description]))]:pr-3.5",
|
|
6299
|
+
"[&:has([data-slot=toast-actions])]:grid-cols-[minmax(0,1fr)]",
|
|
6300
|
+
"[&:has([data-slot=toast-actions])]:gap-y-2",
|
|
6301
|
+
"[&:has([data-slot=toast-icon]):has([data-slot=toast-actions])]:grid-cols-[auto_minmax(0,1fr)]"
|
|
6302
|
+
],
|
|
6303
|
+
icon: ["text-white/85", "[&_svg]:size-[1.125rem] [&_svg]:stroke-[1.5]"],
|
|
6304
|
+
title: ["font-medium text-[oklch(0.985_0.001_286)]"],
|
|
6305
|
+
description: ["text-white/62"],
|
|
6306
|
+
actions: ["col-start-1 row-start-2 col-span-full w-full justify-self-stretch justify-end"],
|
|
6307
|
+
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]"],
|
|
6308
|
+
arrow: []
|
|
6309
|
+
}
|
|
6310
|
+
},
|
|
6311
|
+
placement: {
|
|
6312
|
+
"bottom-center": { viewport: "bottom-4 left-1/2 -translate-x-1/2" },
|
|
6313
|
+
"bottom-right": { viewport: "right-4 bottom-4" },
|
|
6314
|
+
"top-center": { viewport: "top-4 left-1/2 -translate-x-1/2" },
|
|
6315
|
+
"top-right": { viewport: "top-4 right-4" },
|
|
6316
|
+
none: { viewport: "contents" }
|
|
6317
|
+
},
|
|
6318
|
+
strategy: {
|
|
6319
|
+
fixed: { viewport: "fixed" },
|
|
6320
|
+
absolute: { viewport: "absolute" }
|
|
6321
|
+
},
|
|
6322
|
+
layout: {
|
|
6323
|
+
stacked: { root: [
|
|
6324
|
+
"absolute right-0 bottom-0 left-0 mx-auto h-[var(--toast-stack-height)] w-full origin-bottom",
|
|
6325
|
+
"z-[calc(70-var(--toast-index))]",
|
|
6326
|
+
"[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))))_scale(var(--toast-scale))]",
|
|
6327
|
+
"data-[expanded]:h-[var(--toast-height)]",
|
|
6328
|
+
"data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-y))_scale(1)]",
|
|
6329
|
+
"data-[starting-style]:[transform:translateY(120%)_scale(0.98)]",
|
|
6330
|
+
"[&[data-ending-style]:not([data-swipe-direction])]:[transform:translateY(120%)_scale(0.98)]",
|
|
6331
|
+
"data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+120%))_translateY(var(--toast-y))]",
|
|
6332
|
+
"data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-120%))_translateY(var(--toast-y))]",
|
|
6333
|
+
"data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+120%))]",
|
|
6334
|
+
"data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-120%))]"
|
|
6335
|
+
] },
|
|
6336
|
+
inline: { root: [
|
|
6337
|
+
"relative mx-auto w-max max-w-[min(24rem,var(--available-width,calc(100vw-2rem)))] overflow-visible",
|
|
6338
|
+
"origin-[var(--transform-origin)]",
|
|
6339
|
+
"data-[starting-style]:[transform:scale(0.97)]",
|
|
6340
|
+
"data-[ending-style]:[transform:scale(0.99)]"
|
|
6341
|
+
] }
|
|
6342
|
+
},
|
|
6343
|
+
tone: {
|
|
6344
|
+
info: {},
|
|
6345
|
+
success: {},
|
|
6346
|
+
warning: {},
|
|
6347
|
+
error: {}
|
|
6348
|
+
}
|
|
6349
|
+
},
|
|
6350
|
+
defaultVariants: {
|
|
6351
|
+
placement: "bottom-center",
|
|
6352
|
+
layout: "stacked",
|
|
6353
|
+
strategy: "fixed"
|
|
6354
|
+
},
|
|
6355
|
+
compoundVariants: [
|
|
6356
|
+
{
|
|
6357
|
+
theme: "brutal",
|
|
6358
|
+
tone: "success",
|
|
6359
|
+
class: { root: "bg-brutal-lime" }
|
|
6360
|
+
},
|
|
6361
|
+
{
|
|
6362
|
+
theme: "brutal",
|
|
6363
|
+
tone: "warning",
|
|
6364
|
+
class: { root: "bg-brutal-orange" }
|
|
6365
|
+
},
|
|
6366
|
+
{
|
|
6367
|
+
theme: "brutal",
|
|
6368
|
+
tone: "error",
|
|
6369
|
+
class: { root: "bg-brutal-orange shadow-[var(--shadow-brutal-sm)]" }
|
|
6370
|
+
},
|
|
6371
|
+
{
|
|
6372
|
+
theme: "brutal",
|
|
6373
|
+
layout: "stacked",
|
|
6374
|
+
class: { root: "w-max max-w-full" }
|
|
6375
|
+
}
|
|
6376
|
+
]
|
|
6377
|
+
});
|
|
6378
|
+
const toastAction = tv({
|
|
6379
|
+
extend: buttonVariants,
|
|
6380
|
+
slots: { root: [
|
|
6381
|
+
"inline-flex min-h-7 shrink-0 items-center justify-center whitespace-nowrap px-2 text-xs leading-none",
|
|
6382
|
+
"font-sans shadow-none",
|
|
6383
|
+
"outline outline-1 outline-offset-2 outline-transparent",
|
|
6384
|
+
"transition-[background-color,color,border-color,box-shadow,transform] duration-150",
|
|
6385
|
+
"disabled:pointer-events-none disabled:opacity-40 data-[loading=true]:opacity-100",
|
|
6386
|
+
"focus-visible:outline-line-strong",
|
|
6387
|
+
"[&_[data-icon]]:size-[1em] [&_svg:not([class*='size-'])]:size-3"
|
|
6388
|
+
] },
|
|
6389
|
+
variants: { toastTheme: {
|
|
6390
|
+
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"] },
|
|
6391
|
+
elegant: { root: [
|
|
6392
|
+
"toast-gradient-border order-2 min-h-7 rounded-full bg-white/[0.06] px-3 font-medium text-white/74",
|
|
6393
|
+
"[--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)]",
|
|
6394
|
+
"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]"
|
|
6395
|
+
] }
|
|
6396
|
+
} },
|
|
6397
|
+
defaultVariants: {
|
|
6398
|
+
variant: void 0,
|
|
6399
|
+
size: void 0
|
|
6400
|
+
}
|
|
6401
|
+
});
|
|
6402
|
+
const createToastManager = Toast.createToastManager;
|
|
6403
|
+
const useToastManager = Toast.useToastManager;
|
|
6404
|
+
const defaultToastManager = createToastManager();
|
|
6405
|
+
function addDefaultToast(intent, title, options = {}) {
|
|
6406
|
+
const { action, dismissible, icon, priority, ...toastOptions } = options;
|
|
6407
|
+
return defaultToastManager.add({
|
|
6408
|
+
...toastOptions,
|
|
6409
|
+
actionProps: action ? {
|
|
6410
|
+
children: action.label,
|
|
6411
|
+
onClick: action.onClick
|
|
6412
|
+
} : void 0,
|
|
6413
|
+
title,
|
|
6414
|
+
type: intent,
|
|
6415
|
+
priority: priority ?? (intent === "error" ? "high" : void 0),
|
|
6416
|
+
data: {
|
|
6417
|
+
intent,
|
|
6418
|
+
hasClose: dismissible,
|
|
6419
|
+
hasIcon: icon
|
|
6420
|
+
}
|
|
6421
|
+
});
|
|
6422
|
+
}
|
|
6423
|
+
const toast = {
|
|
6424
|
+
add(options) {
|
|
6425
|
+
const { title, type = "info", ...toastOptions } = options;
|
|
6426
|
+
return addDefaultToast(type, title, toastOptions);
|
|
6427
|
+
},
|
|
6428
|
+
info(title, options) {
|
|
6429
|
+
return addDefaultToast("info", title, options);
|
|
6430
|
+
},
|
|
6431
|
+
success(title, options) {
|
|
6432
|
+
return addDefaultToast("success", title, options);
|
|
6433
|
+
},
|
|
6434
|
+
warning(title, options) {
|
|
6435
|
+
return addDefaultToast("warning", title, options);
|
|
6436
|
+
},
|
|
6437
|
+
error(title, options) {
|
|
6438
|
+
return addDefaultToast("error", title, options);
|
|
6439
|
+
},
|
|
6440
|
+
dismiss(id) {
|
|
6441
|
+
return defaultToastManager.close(id);
|
|
6442
|
+
}
|
|
6443
|
+
};
|
|
6444
|
+
function getToastTone(type) {
|
|
6445
|
+
if (type === "success" || type === "warning" || type === "error") return type;
|
|
6446
|
+
return "info";
|
|
6447
|
+
}
|
|
6448
|
+
function ToastProvider({ children, portalContainer, renderViewport = true, toastManager = defaultToastManager, viewportClassName, viewportPlacement = "bottom-center", viewportStrategy = "fixed", ...props }) {
|
|
6449
|
+
return /* @__PURE__ */ jsxs(Toast.Provider, {
|
|
6450
|
+
toastManager,
|
|
6451
|
+
...props,
|
|
6452
|
+
children: [children, renderViewport ? /* @__PURE__ */ jsx(DefaultToastLayer, {
|
|
6453
|
+
placement: viewportPlacement,
|
|
6454
|
+
portalContainer,
|
|
6455
|
+
strategy: viewportStrategy,
|
|
6456
|
+
viewportClassName
|
|
6457
|
+
}) : null]
|
|
6458
|
+
});
|
|
6459
|
+
}
|
|
6460
|
+
function ToastPortal(props) {
|
|
6461
|
+
return /* @__PURE__ */ jsx(Toast.Portal, {
|
|
6462
|
+
"data-slot": "toast-portal",
|
|
6463
|
+
...props
|
|
6464
|
+
});
|
|
6465
|
+
}
|
|
6466
|
+
function ToastViewport({ placement = "bottom-center", strategy = "fixed", className, ...props }) {
|
|
6467
|
+
const { viewport } = toastStyles({
|
|
6468
|
+
theme: useThemeFamily(),
|
|
6469
|
+
placement,
|
|
6470
|
+
strategy
|
|
6471
|
+
});
|
|
6472
|
+
return /* @__PURE__ */ jsx(Toast.Viewport, {
|
|
6473
|
+
"data-slot": "toast-viewport",
|
|
6474
|
+
className: viewport({ className }),
|
|
6475
|
+
...props
|
|
6476
|
+
});
|
|
6477
|
+
}
|
|
6478
|
+
function ToastPositioner({ className, ...props }) {
|
|
6479
|
+
const { positioner } = toastStyles({ theme: useThemeFamily() });
|
|
6480
|
+
return /* @__PURE__ */ jsx(Toast.Positioner, {
|
|
6481
|
+
"data-slot": "toast-positioner",
|
|
6482
|
+
className: positioner({ className }),
|
|
6483
|
+
...props
|
|
6484
|
+
});
|
|
6485
|
+
}
|
|
6486
|
+
function ToastRoot({ layout = "stacked", className, toast: toastObject, ...props }) {
|
|
6487
|
+
const { root } = toastStyles({
|
|
6488
|
+
theme: useThemeFamily(),
|
|
6489
|
+
layout,
|
|
6490
|
+
tone: getToastTone(toastObject.type)
|
|
6491
|
+
});
|
|
6492
|
+
return /* @__PURE__ */ jsx(Toast.Root, {
|
|
6493
|
+
"data-slot": "toast",
|
|
6494
|
+
"data-toast-type": toastObject.type ?? "info",
|
|
6495
|
+
toast: toastObject,
|
|
6496
|
+
className: root({ className }),
|
|
6497
|
+
...props
|
|
6498
|
+
});
|
|
6499
|
+
}
|
|
6500
|
+
function ToastContent({ children, className, ...props }) {
|
|
6501
|
+
const { content } = toastStyles({ theme: useThemeFamily() });
|
|
6502
|
+
return /* @__PURE__ */ jsx(Toast.Content, {
|
|
6503
|
+
"data-slot": "toast-content",
|
|
6504
|
+
className: content({ className }),
|
|
6505
|
+
...props,
|
|
6506
|
+
children
|
|
6507
|
+
});
|
|
6508
|
+
}
|
|
6509
|
+
function ToastIcon({ className, ...props }) {
|
|
6510
|
+
const { icon } = toastStyles({ theme: useThemeFamily() });
|
|
6511
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6512
|
+
"data-slot": "toast-icon",
|
|
6513
|
+
className: icon({ className }),
|
|
6514
|
+
...props
|
|
6515
|
+
});
|
|
6516
|
+
}
|
|
6517
|
+
function ToastBody({ className, ...props }) {
|
|
6518
|
+
const { body } = toastStyles({ theme: useThemeFamily() });
|
|
6519
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6520
|
+
"data-slot": "toast-body",
|
|
6521
|
+
className: body({ className }),
|
|
6522
|
+
...props
|
|
6523
|
+
});
|
|
6524
|
+
}
|
|
6525
|
+
function ToastActions({ className, ...props }) {
|
|
6526
|
+
const { actions } = toastStyles({ theme: useThemeFamily() });
|
|
6527
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6528
|
+
"data-slot": "toast-actions",
|
|
6529
|
+
className: actions({ className }),
|
|
6530
|
+
...props
|
|
6531
|
+
});
|
|
6532
|
+
}
|
|
6533
|
+
function ToastTitle({ className, ...props }) {
|
|
6534
|
+
const { title } = toastStyles({ theme: useThemeFamily() });
|
|
6535
|
+
return /* @__PURE__ */ jsx(Toast.Title, {
|
|
6536
|
+
"data-slot": "toast-title",
|
|
6537
|
+
className: title({ className }),
|
|
6538
|
+
...props
|
|
6539
|
+
});
|
|
6540
|
+
}
|
|
6541
|
+
function ToastDescription({ className, ...props }) {
|
|
6542
|
+
const { description } = toastStyles({ theme: useThemeFamily() });
|
|
6543
|
+
return /* @__PURE__ */ jsx(Toast.Description, {
|
|
6544
|
+
"data-slot": "toast-description",
|
|
6545
|
+
className: description({ className }),
|
|
6546
|
+
...props
|
|
6547
|
+
});
|
|
6548
|
+
}
|
|
6549
|
+
function ToastAction({ className, children, disabled, loading = false, loadingLabel = "Loading", render, ...props }) {
|
|
6550
|
+
const { root, content, loadingIndicator } = toastAction({ toastTheme: useThemeFamily() });
|
|
6551
|
+
const renderActionContent = (actionChildren) => /* @__PURE__ */ jsxs(Fragment$1, { children: [loading ? /* @__PURE__ */ jsx("span", {
|
|
6552
|
+
"data-slot": "toast-action-loading-indicator",
|
|
6553
|
+
className: loadingIndicator(),
|
|
6554
|
+
children: /* @__PURE__ */ jsx(Spinner, { "aria-label": loadingLabel })
|
|
6555
|
+
}) : null, /* @__PURE__ */ jsx("span", {
|
|
6556
|
+
"data-slot": "toast-action-content",
|
|
6557
|
+
"data-loading": loading ? "true" : void 0,
|
|
6558
|
+
className: content(),
|
|
6559
|
+
children: actionChildren
|
|
6560
|
+
})] });
|
|
6561
|
+
const renderAction = (renderProps, state) => {
|
|
6562
|
+
const actionChildren = renderActionContent(renderProps.children);
|
|
6563
|
+
const nextRenderProps = {
|
|
6564
|
+
...renderProps,
|
|
6565
|
+
children: actionChildren
|
|
6566
|
+
};
|
|
6567
|
+
if (typeof render === "function") return render(nextRenderProps, state);
|
|
6568
|
+
if (isValidElement(render)) {
|
|
6569
|
+
const renderElement = render;
|
|
6570
|
+
return cloneElement(renderElement, {
|
|
6571
|
+
...nextRenderProps,
|
|
6572
|
+
className: cn(renderProps.className, renderElement.props.className),
|
|
6573
|
+
children: actionChildren
|
|
6574
|
+
});
|
|
6575
|
+
}
|
|
6576
|
+
return /* @__PURE__ */ jsx("button", { ...nextRenderProps });
|
|
6577
|
+
};
|
|
6578
|
+
return /* @__PURE__ */ jsx(Toast.Action, {
|
|
6579
|
+
"data-slot": "toast-action",
|
|
6580
|
+
"data-loading": loading ? "true" : void 0,
|
|
6581
|
+
className: root({ className }),
|
|
6582
|
+
disabled: disabled || loading,
|
|
6583
|
+
"aria-disabled": loading || void 0,
|
|
6584
|
+
render: renderAction,
|
|
6585
|
+
...props,
|
|
6586
|
+
children
|
|
6587
|
+
});
|
|
6588
|
+
}
|
|
6589
|
+
function ToastClose({ className, children, ...props }) {
|
|
6590
|
+
const { close } = toastStyles({ theme: useThemeFamily() });
|
|
6591
|
+
const usesDefaultText = children == null;
|
|
6592
|
+
return /* @__PURE__ */ jsx(Toast.Close, {
|
|
6593
|
+
"aria-label": usesDefaultText ? void 0 : "Dismiss toast",
|
|
6594
|
+
"data-slot": "toast-close",
|
|
6595
|
+
className: close({ className }),
|
|
6596
|
+
...props,
|
|
6597
|
+
children: children ?? "Dismiss"
|
|
6598
|
+
});
|
|
6599
|
+
}
|
|
6600
|
+
function ToastArrow({ className, ...props }) {
|
|
6601
|
+
const theme = useThemeFamily();
|
|
6602
|
+
const { arrow } = toastStyles({ theme });
|
|
6603
|
+
return /* @__PURE__ */ jsx(Toast.Arrow, {
|
|
6604
|
+
"data-slot": "toast-arrow",
|
|
6605
|
+
className: arrow({ className }),
|
|
6606
|
+
...props,
|
|
6607
|
+
children: /* @__PURE__ */ jsx(ToastArrowSvg, { theme })
|
|
6608
|
+
});
|
|
6609
|
+
}
|
|
6610
|
+
function DefaultToastLayer({ placement, portalContainer, strategy, viewportClassName }) {
|
|
6611
|
+
return /* @__PURE__ */ jsx(ToastPortal, {
|
|
6612
|
+
container: portalContainer,
|
|
6613
|
+
children: /* @__PURE__ */ jsx(ToastViewport, {
|
|
6614
|
+
placement,
|
|
6615
|
+
strategy,
|
|
6616
|
+
className: viewportClassName,
|
|
6617
|
+
children: /* @__PURE__ */ jsx(DefaultToastList, {})
|
|
6618
|
+
})
|
|
6619
|
+
});
|
|
6620
|
+
}
|
|
6621
|
+
function DefaultToastList() {
|
|
6622
|
+
const { toasts } = useToastManager();
|
|
6623
|
+
return toasts.map((toastObject) => /* @__PURE__ */ jsx(DefaultToastItem, { toast: toastObject }, toastObject.id));
|
|
6624
|
+
}
|
|
6625
|
+
function DefaultToastItem({ toast: toastObject }) {
|
|
6626
|
+
const showDescription = Boolean(toastObject.description);
|
|
6627
|
+
const showAction = Boolean(toastObject.actionProps?.children);
|
|
6628
|
+
const showClose = toastObject.data?.hasClose !== false;
|
|
6629
|
+
const showIcon = toastObject.data?.hasIcon !== false;
|
|
6630
|
+
return /* @__PURE__ */ jsx(ToastRoot, {
|
|
6631
|
+
toast: toastObject,
|
|
6632
|
+
layout: !showIcon && !showDescription && !showAction && !showClose ? "inline" : "stacked",
|
|
6633
|
+
children: /* @__PURE__ */ jsxs(ToastContent, {
|
|
6634
|
+
className: toastObject.data?.contentClassName,
|
|
6635
|
+
children: [
|
|
6636
|
+
showIcon ? /* @__PURE__ */ jsx(DefaultToastIcon, { toast: toastObject }) : null,
|
|
6637
|
+
/* @__PURE__ */ jsxs(ToastBody, { children: [/* @__PURE__ */ jsx(ToastTitle, {}), showDescription ? /* @__PURE__ */ jsx(ToastDescription, {}) : null] }),
|
|
6638
|
+
showAction || showClose ? /* @__PURE__ */ jsxs(ToastActions, { children: [showClose ? /* @__PURE__ */ jsx(ToastClose, {}) : null, showAction ? /* @__PURE__ */ jsx(ToastAction, {}) : null] }) : null
|
|
6639
|
+
]
|
|
6640
|
+
})
|
|
6641
|
+
});
|
|
6642
|
+
}
|
|
6643
|
+
function DefaultToastIcon({ toast: toastObject }) {
|
|
6644
|
+
const intent = toastObject.data?.intent ?? getToastTone(toastObject.type);
|
|
6645
|
+
return /* @__PURE__ */ jsx(ToastIcon, { children: /* @__PURE__ */ jsx(intent === "success" ? CheckCircle2 : intent === "warning" || intent === "error" ? AlertTriangle : Info, { "aria-hidden": true }) });
|
|
6646
|
+
}
|
|
6647
|
+
function ToastArrowSvg({ theme, ...props }) {
|
|
6648
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
6649
|
+
width: "12",
|
|
6650
|
+
height: "6",
|
|
6651
|
+
viewBox: "0 0 12 6",
|
|
6652
|
+
fill: "none",
|
|
6653
|
+
...props,
|
|
6654
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
6655
|
+
d: "M1 0H11L6 5.25Z",
|
|
6656
|
+
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"
|
|
6657
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
6658
|
+
d: "M1 0.5L6 5.25L11 0.5",
|
|
6659
|
+
className: theme === "elegant" ? "stroke-white/28" : "stroke-line-strong",
|
|
6660
|
+
strokeLinecap: "round",
|
|
6661
|
+
strokeLinejoin: "round",
|
|
6662
|
+
vectorEffect: "non-scaling-stroke"
|
|
6663
|
+
})]
|
|
6664
|
+
});
|
|
6665
|
+
}
|
|
6666
|
+
//#endregion
|
|
4750
6667
|
//#region src/components/tabs/tabs.tsx
|
|
4751
6668
|
const tabs = tv({
|
|
4752
6669
|
slots: {
|
|
@@ -5082,28 +6999,60 @@ function reconcileTabOrder(items, order) {
|
|
|
5082
6999
|
//#endregion
|
|
5083
7000
|
//#region src/components/separator/separator.tsx
|
|
5084
7001
|
const separator = tv({
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
7002
|
+
slots: {
|
|
7003
|
+
root: [
|
|
7004
|
+
"shrink-0",
|
|
7005
|
+
"data-[orientation=horizontal]:w-full",
|
|
7006
|
+
"data-[orientation=vertical]:self-stretch"
|
|
7007
|
+
],
|
|
7008
|
+
labeledRoot: ["grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 py-3"],
|
|
7009
|
+
labeledLine: ["w-full shrink-0"],
|
|
7010
|
+
labeledContent: ["min-w-0 font-mono text-xs font-medium"]
|
|
7011
|
+
},
|
|
5090
7012
|
variants: { theme: {
|
|
5091
|
-
brutal:
|
|
5092
|
-
|
|
5093
|
-
"
|
|
5094
|
-
"
|
|
5095
|
-
|
|
5096
|
-
|
|
7013
|
+
brutal: {
|
|
7014
|
+
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"],
|
|
7015
|
+
labeledLine: ["h-0 border-t-2 border-line-strong"],
|
|
7016
|
+
labeledContent: ["font-medium text-foreground/70"]
|
|
7017
|
+
},
|
|
7018
|
+
elegant: {
|
|
7019
|
+
root: [
|
|
7020
|
+
"bg-line-muted",
|
|
7021
|
+
"data-[orientation=horizontal]:h-px",
|
|
7022
|
+
"data-[orientation=vertical]:w-px"
|
|
7023
|
+
],
|
|
7024
|
+
labeledLine: ["h-px bg-line-muted"],
|
|
7025
|
+
labeledContent: ["text-foreground-placeholder"]
|
|
7026
|
+
}
|
|
5097
7027
|
} }
|
|
5098
7028
|
});
|
|
5099
|
-
function Separator({ className, orientation = "horizontal", ...props }) {
|
|
7029
|
+
function Separator({ children, className, orientation = "horizontal", ...props }) {
|
|
7030
|
+
const { labeledContent, labeledLine, labeledRoot, root } = separator({ theme: useThemeFamily() });
|
|
7031
|
+
if (children != null && orientation === "horizontal") return /* @__PURE__ */ jsxs(Separator$1, {
|
|
7032
|
+
"data-slot": "separator",
|
|
7033
|
+
orientation,
|
|
7034
|
+
className: labeledRoot({ className }),
|
|
7035
|
+
...props,
|
|
7036
|
+
children: [
|
|
7037
|
+
/* @__PURE__ */ jsx("span", {
|
|
7038
|
+
"aria-hidden": "true",
|
|
7039
|
+
className: labeledLine()
|
|
7040
|
+
}),
|
|
7041
|
+
/* @__PURE__ */ jsx("span", {
|
|
7042
|
+
"data-slot": "separator-content",
|
|
7043
|
+
className: labeledContent(),
|
|
7044
|
+
children
|
|
7045
|
+
}),
|
|
7046
|
+
/* @__PURE__ */ jsx("span", {
|
|
7047
|
+
"aria-hidden": "true",
|
|
7048
|
+
className: labeledLine()
|
|
7049
|
+
})
|
|
7050
|
+
]
|
|
7051
|
+
});
|
|
5100
7052
|
return /* @__PURE__ */ jsx(Separator$1, {
|
|
5101
7053
|
"data-slot": "separator",
|
|
5102
7054
|
orientation,
|
|
5103
|
-
className:
|
|
5104
|
-
theme: useThemeFamily(),
|
|
5105
|
-
className
|
|
5106
|
-
}),
|
|
7055
|
+
className: root({ className }),
|
|
5107
7056
|
...props
|
|
5108
7057
|
});
|
|
5109
7058
|
}
|
|
@@ -5202,4 +7151,4 @@ function ThemeProvider({ theme, defaultTheme = "brutal", onThemeChange, mode, de
|
|
|
5202
7151
|
});
|
|
5203
7152
|
}
|
|
5204
7153
|
//#endregion
|
|
5205
|
-
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 };
|
|
7154
|
+
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, BottomSheet, BottomSheetActions, BottomSheetBody, BottomSheetClose, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHeader, BottomSheetOverlay, BottomSheetPortal, BottomSheetPositioner, BottomSheetTitle, BottomSheetTrigger, 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, Lightbox, LightboxActions, LightboxClose, LightboxContent, LightboxHeader, LightboxInfoActions, LightboxInfoBar, LightboxInfoTitle, LightboxMedia, LightboxNavigationButton, LightboxPortal, LightboxStage, LightboxTitle, LightboxTrigger, 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 };
|