@saasflare/ui 1.1.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -30
- package/dist/{button-B2DR7obe.d.mts → button-DUQJ0X7e.d.mts} +0 -23
- package/dist/{button-B2DR7obe.d.ts → button-DUQJ0X7e.d.ts} +0 -23
- package/dist/chunk-7UGPCRZ6.mjs +130 -0
- package/dist/chunk-CWW36RYE.js +59 -0
- package/dist/chunk-JOVJRQO3.js +0 -1
- package/dist/{chunk-O3CFRMDK.js → chunk-OYH6LQWR.js} +33 -65
- package/dist/{chunk-QEKYM3BT.mjs → chunk-QWLQV6FS.mjs} +3 -25
- package/dist/chunk-S26666D6.mjs +0 -1
- package/dist/chunk-VQQ6MF5I.js +161 -0
- package/dist/chunk-W53NTFPB.mjs +28 -0
- package/dist/dialog-CwyBJeNl.d.mts +22 -0
- package/dist/dialog-CwyBJeNl.d.ts +22 -0
- package/dist/entries/calendar.d.mts +13 -0
- package/dist/entries/calendar.d.ts +13 -0
- package/dist/entries/calendar.js +211 -0
- package/dist/entries/calendar.mjs +188 -0
- package/dist/entries/carousel.d.mts +1 -1
- package/dist/entries/carousel.d.ts +1 -1
- package/dist/entries/carousel.js +5 -3
- package/dist/entries/carousel.mjs +3 -1
- package/dist/entries/chart.js +1 -0
- package/dist/entries/chart.mjs +1 -0
- package/dist/entries/command.d.mts +21 -0
- package/dist/entries/command.d.ts +21 -0
- package/dist/entries/command.js +172 -0
- package/dist/entries/command.mjs +162 -0
- package/dist/entries/drawer.d.mts +16 -0
- package/dist/entries/drawer.d.ts +16 -0
- package/dist/entries/drawer.js +124 -0
- package/dist/entries/drawer.mjs +113 -0
- package/dist/entries/input-otp.d.mts +14 -0
- package/dist/entries/input-otp.d.ts +14 -0
- package/dist/entries/input-otp.js +89 -0
- package/dist/entries/input-otp.mjs +64 -0
- package/dist/entries/resizable.d.mts +10 -0
- package/dist/entries/resizable.d.ts +10 -0
- package/dist/entries/resizable.js +69 -0
- package/dist/entries/resizable.mjs +45 -0
- package/dist/index.d.mts +12 -103
- package/dist/index.d.ts +12 -103
- package/dist/index.js +1265 -832
- package/dist/index.mjs +1172 -740
- package/package.json +66 -21
package/dist/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkOYH6LQWR_js = require('./chunk-OYH6LQWR.js');
|
|
5
|
+
var chunkVQQ6MF5I_js = require('./chunk-VQQ6MF5I.js');
|
|
6
|
+
var chunkCWW36RYE_js = require('./chunk-CWW36RYE.js');
|
|
5
7
|
var chunkJOVJRQO3_js = require('./chunk-JOVJRQO3.js');
|
|
6
|
-
var
|
|
8
|
+
var React5 = require('react');
|
|
7
9
|
var react = require('motion/react');
|
|
8
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
10
|
-
var lucideReact = require('lucide-react');
|
|
11
11
|
var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
|
|
12
|
+
var lucideReact = require('lucide-react');
|
|
12
13
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
13
14
|
var classVarianceAuthority = require('class-variance-authority');
|
|
14
15
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
@@ -21,7 +22,7 @@ var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
|
21
22
|
var HoverCardPrimitive = require('@radix-ui/react-hover-card');
|
|
22
23
|
var SelectPrimitive = require('@radix-ui/react-select');
|
|
23
24
|
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
24
|
-
var
|
|
25
|
+
var SheetPrimitive = require('@radix-ui/react-dialog');
|
|
25
26
|
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
26
27
|
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
27
28
|
var ContextMenuPrimitive = require('@radix-ui/react-context-menu');
|
|
@@ -29,20 +30,17 @@ var MenubarPrimitive = require('@radix-ui/react-menubar');
|
|
|
29
30
|
var NavigationMenuPrimitive = require('@radix-ui/react-navigation-menu');
|
|
30
31
|
var TogglePrimitive = require('@radix-ui/react-toggle');
|
|
31
32
|
var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
|
|
32
|
-
var reactDayPicker = require('react-day-picker');
|
|
33
33
|
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
34
34
|
var CollapsiblePrimitive = require('@radix-ui/react-collapsible');
|
|
35
35
|
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
36
36
|
var nextThemes = require('next-themes');
|
|
37
|
-
var
|
|
37
|
+
var ReactDOM = require('react-dom');
|
|
38
38
|
var AspectRatioPrimitive = require('@radix-ui/react-aspect-ratio');
|
|
39
39
|
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
40
40
|
var cmdk = require('cmdk');
|
|
41
41
|
var Direction = require('@radix-ui/react-direction');
|
|
42
42
|
var LabelPrimitive = require('@radix-ui/react-label');
|
|
43
43
|
var reactHookForm = require('react-hook-form');
|
|
44
|
-
var inputOtp = require('input-otp');
|
|
45
|
-
var ResizablePrimitive = require('react-resizable-panels');
|
|
46
44
|
var Image2 = require('next/image');
|
|
47
45
|
var navigation = require('next/navigation');
|
|
48
46
|
|
|
@@ -66,8 +64,7 @@ function _interopNamespace(e) {
|
|
|
66
64
|
return Object.freeze(n);
|
|
67
65
|
}
|
|
68
66
|
|
|
69
|
-
var
|
|
70
|
-
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
67
|
+
var React5__namespace = /*#__PURE__*/_interopNamespace(React5);
|
|
71
68
|
var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
|
|
72
69
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
73
70
|
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
@@ -80,6 +77,7 @@ var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitiv
|
|
|
80
77
|
var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
|
|
81
78
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
82
79
|
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
80
|
+
var SheetPrimitive__namespace = /*#__PURE__*/_interopNamespace(SheetPrimitive);
|
|
83
81
|
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
84
82
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
85
83
|
var ContextMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(ContextMenuPrimitive);
|
|
@@ -90,17 +88,17 @@ var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroup
|
|
|
90
88
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
91
89
|
var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(CollapsiblePrimitive);
|
|
92
90
|
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
|
|
91
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefault(ReactDOM);
|
|
93
92
|
var AspectRatioPrimitive__namespace = /*#__PURE__*/_interopNamespace(AspectRatioPrimitive);
|
|
94
93
|
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
95
94
|
var Direction__namespace = /*#__PURE__*/_interopNamespace(Direction);
|
|
96
95
|
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
97
|
-
var ResizablePrimitive__namespace = /*#__PURE__*/_interopNamespace(ResizablePrimitive);
|
|
98
96
|
var Image2__default = /*#__PURE__*/_interopDefault(Image2);
|
|
99
97
|
|
|
100
98
|
var MOBILE_BREAKPOINT = 768;
|
|
101
99
|
function useIsMobile() {
|
|
102
|
-
const [isMobile, setIsMobile] =
|
|
103
|
-
|
|
100
|
+
const [isMobile, setIsMobile] = React5__namespace.useState(void 0);
|
|
101
|
+
React5__namespace.useEffect(() => {
|
|
104
102
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
105
103
|
const onChange = () => {
|
|
106
104
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -114,9 +112,9 @@ function useIsMobile() {
|
|
|
114
112
|
function useDisclosure(options = {}) {
|
|
115
113
|
const { defaultOpen = false, isOpen: controlledOpen, onChange } = options;
|
|
116
114
|
const isControlled = controlledOpen !== void 0;
|
|
117
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
115
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React5.useState(defaultOpen);
|
|
118
116
|
const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
|
|
119
|
-
const onOpenChange =
|
|
117
|
+
const onOpenChange = React5.useCallback(
|
|
120
118
|
(open) => {
|
|
121
119
|
if (!isControlled) {
|
|
122
120
|
setUncontrolledOpen(open);
|
|
@@ -125,10 +123,10 @@ function useDisclosure(options = {}) {
|
|
|
125
123
|
},
|
|
126
124
|
[isControlled, onChange]
|
|
127
125
|
);
|
|
128
|
-
const onOpen =
|
|
129
|
-
const onClose =
|
|
130
|
-
const onToggle =
|
|
131
|
-
return
|
|
126
|
+
const onOpen = React5.useCallback(() => onOpenChange(true), [onOpenChange]);
|
|
127
|
+
const onClose = React5.useCallback(() => onOpenChange(false), [onOpenChange]);
|
|
128
|
+
const onToggle = React5.useCallback(() => onOpenChange(!isOpen), [isOpen, onOpenChange]);
|
|
129
|
+
return React5.useMemo(
|
|
132
130
|
() => ({ isOpen, onOpen, onClose, onToggle, onOpenChange, isControlled }),
|
|
133
131
|
[isOpen, onOpen, onClose, onToggle, onOpenChange, isControlled]
|
|
134
132
|
);
|
|
@@ -144,13 +142,13 @@ var INITIAL_MEASUREMENT = {
|
|
|
144
142
|
y: 0
|
|
145
143
|
};
|
|
146
144
|
function useMeasure() {
|
|
147
|
-
const [measurement, setMeasurement] =
|
|
148
|
-
const observerRef =
|
|
149
|
-
const disconnect =
|
|
145
|
+
const [measurement, setMeasurement] = React5.useState(INITIAL_MEASUREMENT);
|
|
146
|
+
const observerRef = React5.useRef(null);
|
|
147
|
+
const disconnect = React5.useCallback(() => {
|
|
150
148
|
observerRef.current?.disconnect();
|
|
151
149
|
observerRef.current = null;
|
|
152
150
|
}, []);
|
|
153
|
-
const ref =
|
|
151
|
+
const ref = React5.useCallback(
|
|
154
152
|
(node) => {
|
|
155
153
|
disconnect();
|
|
156
154
|
if (!node || typeof ResizeObserver === "undefined") return;
|
|
@@ -174,7 +172,7 @@ function useMeasure() {
|
|
|
174
172
|
},
|
|
175
173
|
[disconnect]
|
|
176
174
|
);
|
|
177
|
-
|
|
175
|
+
React5.useEffect(() => disconnect, [disconnect]);
|
|
178
176
|
return [ref, measurement];
|
|
179
177
|
}
|
|
180
178
|
function buildRange(start, end) {
|
|
@@ -186,10 +184,10 @@ function usePagination(options) {
|
|
|
186
184
|
const { total, initialPage = 1, page: controlledPage, siblings = 1, boundaries = 1, onChange } = options;
|
|
187
185
|
const safeTotal = Math.max(1, Math.floor(total));
|
|
188
186
|
const isControlled = controlledPage !== void 0;
|
|
189
|
-
const [uncontrolledPage, setUncontrolledPage] =
|
|
187
|
+
const [uncontrolledPage, setUncontrolledPage] = React5.useState(() => Math.min(Math.max(1, initialPage), safeTotal));
|
|
190
188
|
const rawPage = isControlled ? controlledPage : uncontrolledPage;
|
|
191
189
|
const activePage = Math.min(Math.max(1, rawPage), safeTotal);
|
|
192
|
-
const setPage =
|
|
190
|
+
const setPage = React5.useCallback(
|
|
193
191
|
(next2) => {
|
|
194
192
|
const clamped = Math.min(Math.max(1, Math.floor(next2)), safeTotal);
|
|
195
193
|
if (!isControlled) setUncontrolledPage(clamped);
|
|
@@ -197,15 +195,15 @@ function usePagination(options) {
|
|
|
197
195
|
},
|
|
198
196
|
[isControlled, onChange, safeTotal]
|
|
199
197
|
);
|
|
200
|
-
const next =
|
|
198
|
+
const next = React5.useCallback(() => {
|
|
201
199
|
if (activePage < safeTotal) setPage(activePage + 1);
|
|
202
200
|
}, [activePage, safeTotal, setPage]);
|
|
203
|
-
const previous =
|
|
201
|
+
const previous = React5.useCallback(() => {
|
|
204
202
|
if (activePage > 1) setPage(activePage - 1);
|
|
205
203
|
}, [activePage, setPage]);
|
|
206
|
-
const first =
|
|
207
|
-
const last =
|
|
208
|
-
const range =
|
|
204
|
+
const first = React5.useCallback(() => setPage(1), [setPage]);
|
|
205
|
+
const last = React5.useCallback(() => setPage(safeTotal), [setPage, safeTotal]);
|
|
206
|
+
const range = React5.useMemo(() => {
|
|
209
207
|
const totalPageNumbers = siblings * 2 + 3 + boundaries * 2;
|
|
210
208
|
if (totalPageNumbers >= safeTotal) {
|
|
211
209
|
return buildRange(1, safeTotal);
|
|
@@ -229,13 +227,13 @@ function usePagination(options) {
|
|
|
229
227
|
return { activePage, range, setPage, next, previous, first, last };
|
|
230
228
|
}
|
|
231
229
|
function Card({ className, ...props }) {
|
|
232
|
-
const reduced =
|
|
230
|
+
const reduced = chunkCWW36RYE_js.useReducedMotion();
|
|
233
231
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
234
232
|
react.m.div,
|
|
235
233
|
{
|
|
236
234
|
"data-slot": "card",
|
|
237
235
|
whileHover: reduced ? void 0 : { y: -2, boxShadow: "0 8px 30px rgba(0,0,0,0.08)" },
|
|
238
|
-
transition: reduced ?
|
|
236
|
+
transition: reduced ? chunkCWW36RYE_js.noMotion : chunkCWW36RYE_js.springGentle,
|
|
239
237
|
className: chunkJOVJRQO3_js.cn(
|
|
240
238
|
"flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm transition-[border-color] duration-300 hover:border-primary/20",
|
|
241
239
|
className
|
|
@@ -310,126 +308,6 @@ function CardFooter({ className, ...props }) {
|
|
|
310
308
|
}
|
|
311
309
|
);
|
|
312
310
|
}
|
|
313
|
-
function Dialog({
|
|
314
|
-
...props
|
|
315
|
-
}) {
|
|
316
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { "data-slot": "dialog", ...props });
|
|
317
|
-
}
|
|
318
|
-
function DialogTrigger({
|
|
319
|
-
...props
|
|
320
|
-
}) {
|
|
321
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
322
|
-
}
|
|
323
|
-
function DialogPortal({
|
|
324
|
-
...props
|
|
325
|
-
}) {
|
|
326
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { "data-slot": "dialog-portal", ...props });
|
|
327
|
-
}
|
|
328
|
-
function DialogClose({
|
|
329
|
-
...props
|
|
330
|
-
}) {
|
|
331
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { "data-slot": "dialog-close", ...props });
|
|
332
|
-
}
|
|
333
|
-
function DialogOverlay({
|
|
334
|
-
className,
|
|
335
|
-
...props
|
|
336
|
-
}) {
|
|
337
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
338
|
-
DialogPrimitive__namespace.Overlay,
|
|
339
|
-
{
|
|
340
|
-
"data-slot": "dialog-overlay",
|
|
341
|
-
className: chunkJOVJRQO3_js.cn(
|
|
342
|
-
"fixed inset-0 z-50 bg-black/50 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
343
|
-
className
|
|
344
|
-
),
|
|
345
|
-
...props
|
|
346
|
-
}
|
|
347
|
-
);
|
|
348
|
-
}
|
|
349
|
-
function DialogContent({
|
|
350
|
-
className,
|
|
351
|
-
children,
|
|
352
|
-
...props
|
|
353
|
-
}) {
|
|
354
|
-
const reduced = chunkO3CFRMDK_js.useReducedMotion();
|
|
355
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
356
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
357
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
358
|
-
DialogPrimitive__namespace.Content,
|
|
359
|
-
{
|
|
360
|
-
"data-slot": "dialog-content",
|
|
361
|
-
asChild: true,
|
|
362
|
-
...props,
|
|
363
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
364
|
-
react.m.div,
|
|
365
|
-
{
|
|
366
|
-
initial: reduced ? { opacity: 1 } : { opacity: 0, scale: 0.95, y: 10 },
|
|
367
|
-
animate: { opacity: 1, scale: 1, y: 0 },
|
|
368
|
-
exit: reduced ? { opacity: 0 } : { opacity: 0, scale: 0.95, y: 10 },
|
|
369
|
-
transition: reduced ? chunkO3CFRMDK_js.noMotion : chunkO3CFRMDK_js.springBouncy,
|
|
370
|
-
className: chunkJOVJRQO3_js.cn(
|
|
371
|
-
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg sm:max-w-lg",
|
|
372
|
-
className
|
|
373
|
-
),
|
|
374
|
-
children: [
|
|
375
|
-
children,
|
|
376
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none cursor-pointer [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [
|
|
377
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
|
|
378
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
379
|
-
] })
|
|
380
|
-
]
|
|
381
|
-
}
|
|
382
|
-
)
|
|
383
|
-
}
|
|
384
|
-
)
|
|
385
|
-
] });
|
|
386
|
-
}
|
|
387
|
-
function DialogHeader({ className, ...props }) {
|
|
388
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
389
|
-
"div",
|
|
390
|
-
{
|
|
391
|
-
"data-slot": "dialog-header",
|
|
392
|
-
className: chunkJOVJRQO3_js.cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
393
|
-
...props
|
|
394
|
-
}
|
|
395
|
-
);
|
|
396
|
-
}
|
|
397
|
-
function DialogFooter({ className, ...props }) {
|
|
398
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
399
|
-
"div",
|
|
400
|
-
{
|
|
401
|
-
"data-slot": "dialog-footer",
|
|
402
|
-
className: chunkJOVJRQO3_js.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
403
|
-
...props
|
|
404
|
-
}
|
|
405
|
-
);
|
|
406
|
-
}
|
|
407
|
-
function DialogTitle({
|
|
408
|
-
className,
|
|
409
|
-
...props
|
|
410
|
-
}) {
|
|
411
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
412
|
-
DialogPrimitive__namespace.Title,
|
|
413
|
-
{
|
|
414
|
-
"data-slot": "dialog-title",
|
|
415
|
-
className: chunkJOVJRQO3_js.cn("text-lg leading-none font-semibold", className),
|
|
416
|
-
...props
|
|
417
|
-
}
|
|
418
|
-
);
|
|
419
|
-
}
|
|
420
|
-
function DialogDescription({
|
|
421
|
-
className,
|
|
422
|
-
...props
|
|
423
|
-
}) {
|
|
424
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
425
|
-
DialogPrimitive__namespace.Description,
|
|
426
|
-
{
|
|
427
|
-
"data-slot": "dialog-description",
|
|
428
|
-
className: chunkJOVJRQO3_js.cn("text-sm text-muted-foreground", className),
|
|
429
|
-
...props
|
|
430
|
-
}
|
|
431
|
-
);
|
|
432
|
-
}
|
|
433
311
|
function AlertDialog({
|
|
434
312
|
...props
|
|
435
313
|
}) {
|
|
@@ -466,7 +344,7 @@ function AlertDialogContent({
|
|
|
466
344
|
children,
|
|
467
345
|
...props
|
|
468
346
|
}) {
|
|
469
|
-
const reduced =
|
|
347
|
+
const reduced = chunkCWW36RYE_js.useReducedMotion();
|
|
470
348
|
return /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
|
|
471
349
|
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
|
|
472
350
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -481,7 +359,7 @@ function AlertDialogContent({
|
|
|
481
359
|
initial: reduced ? { opacity: 1 } : { opacity: 0, scale: 0.95, y: 10 },
|
|
482
360
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
483
361
|
exit: reduced ? { opacity: 0 } : { opacity: 0, scale: 0.95, y: 10 },
|
|
484
|
-
transition: reduced ?
|
|
362
|
+
transition: reduced ? chunkCWW36RYE_js.noMotion : chunkCWW36RYE_js.springBouncy,
|
|
485
363
|
className: chunkJOVJRQO3_js.cn(
|
|
486
364
|
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg sm:max-w-lg",
|
|
487
365
|
className
|
|
@@ -547,7 +425,7 @@ function AlertDialogAction({
|
|
|
547
425
|
AlertDialogPrimitive__namespace.Action,
|
|
548
426
|
{
|
|
549
427
|
"data-intent": "primary",
|
|
550
|
-
className: chunkJOVJRQO3_js.cn(
|
|
428
|
+
className: chunkJOVJRQO3_js.cn(chunkOYH6LQWR_js.buttonVariants({ variant: "solid" }), className),
|
|
551
429
|
...props
|
|
552
430
|
}
|
|
553
431
|
);
|
|
@@ -560,7 +438,7 @@ function AlertDialogCancel({
|
|
|
560
438
|
AlertDialogPrimitive__namespace.Cancel,
|
|
561
439
|
{
|
|
562
440
|
"data-intent": "neutral",
|
|
563
|
-
className: chunkJOVJRQO3_js.cn(
|
|
441
|
+
className: chunkJOVJRQO3_js.cn(chunkOYH6LQWR_js.buttonVariants({ variant: "outline" }), className),
|
|
564
442
|
...props
|
|
565
443
|
}
|
|
566
444
|
);
|
|
@@ -588,7 +466,7 @@ function AccordionTrigger({
|
|
|
588
466
|
children,
|
|
589
467
|
...props
|
|
590
468
|
}) {
|
|
591
|
-
const reduced =
|
|
469
|
+
const reduced = chunkCWW36RYE_js.useReducedMotion();
|
|
592
470
|
return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
593
471
|
AccordionPrimitive__namespace.Trigger,
|
|
594
472
|
{
|
|
@@ -605,7 +483,7 @@ function AccordionTrigger({
|
|
|
605
483
|
{
|
|
606
484
|
className: "pointer-events-none shrink-0 translate-y-0.5 text-muted-foreground",
|
|
607
485
|
animate: { rotate: 0 },
|
|
608
|
-
transition: reduced ? { duration: 0 } :
|
|
486
|
+
transition: reduced ? { duration: 0 } : chunkCWW36RYE_js.springBouncy,
|
|
609
487
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4" })
|
|
610
488
|
}
|
|
611
489
|
)
|
|
@@ -618,7 +496,7 @@ function AccordionContent({
|
|
|
618
496
|
children,
|
|
619
497
|
...props
|
|
620
498
|
}) {
|
|
621
|
-
const reduced =
|
|
499
|
+
const reduced = chunkCWW36RYE_js.useReducedMotion();
|
|
622
500
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
623
501
|
AccordionPrimitive__namespace.Content,
|
|
624
502
|
{
|
|
@@ -677,10 +555,10 @@ function TabsList({
|
|
|
677
555
|
children,
|
|
678
556
|
...props
|
|
679
557
|
}) {
|
|
680
|
-
const listRef =
|
|
681
|
-
const reduced =
|
|
682
|
-
const [pos, setPos] =
|
|
683
|
-
|
|
558
|
+
const listRef = React5__namespace.useRef(null);
|
|
559
|
+
const reduced = chunkCWW36RYE_js.useReducedMotion();
|
|
560
|
+
const [pos, setPos] = React5__namespace.useState(null);
|
|
561
|
+
React5__namespace.useLayoutEffect(() => {
|
|
684
562
|
const list = listRef.current;
|
|
685
563
|
if (!list) return;
|
|
686
564
|
const measure = () => {
|
|
@@ -738,7 +616,7 @@ function TabsList({
|
|
|
738
616
|
width: pos.width,
|
|
739
617
|
height: pos.height
|
|
740
618
|
},
|
|
741
|
-
transition: reduced ?
|
|
619
|
+
transition: reduced ? chunkCWW36RYE_js.noMotion : chunkCWW36RYE_js.spring,
|
|
742
620
|
className: "pointer-events-none absolute top-0 left-0 rounded-md bg-background shadow-sm dark:border dark:border-input dark:bg-input/30",
|
|
743
621
|
style: { zIndex: 0 }
|
|
744
622
|
}
|
|
@@ -841,7 +719,7 @@ function Checkbox({
|
|
|
841
719
|
initial: { scale: 0, opacity: 0 },
|
|
842
720
|
animate: { scale: 1, opacity: 1 },
|
|
843
721
|
exit: { scale: 0, opacity: 0 },
|
|
844
|
-
transition:
|
|
722
|
+
transition: chunkCWW36RYE_js.springBouncy,
|
|
845
723
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-3.5" })
|
|
846
724
|
}
|
|
847
725
|
)
|
|
@@ -876,7 +754,7 @@ function Switch({
|
|
|
876
754
|
{
|
|
877
755
|
className: "pointer-events-none block rounded-full bg-background ring-0 group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground",
|
|
878
756
|
layout: true,
|
|
879
|
-
transition:
|
|
757
|
+
transition: chunkCWW36RYE_js.springBouncy
|
|
880
758
|
}
|
|
881
759
|
)
|
|
882
760
|
}
|
|
@@ -889,7 +767,7 @@ function Progress({
|
|
|
889
767
|
value,
|
|
890
768
|
...props
|
|
891
769
|
}) {
|
|
892
|
-
const reduced =
|
|
770
|
+
const reduced = chunkCWW36RYE_js.useReducedMotion();
|
|
893
771
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
894
772
|
ProgressPrimitive__namespace.Root,
|
|
895
773
|
{
|
|
@@ -905,7 +783,7 @@ function Progress({
|
|
|
905
783
|
className: "h-full bg-primary",
|
|
906
784
|
initial: { width: "0%" },
|
|
907
785
|
animate: { width: `${value ?? 0}%` },
|
|
908
|
-
transition: reduced ?
|
|
786
|
+
transition: reduced ? chunkCWW36RYE_js.noMotion : chunkCWW36RYE_js.spring
|
|
909
787
|
}
|
|
910
788
|
) })
|
|
911
789
|
}
|
|
@@ -944,7 +822,7 @@ function Badge({
|
|
|
944
822
|
asChild = false,
|
|
945
823
|
...props
|
|
946
824
|
}) {
|
|
947
|
-
const reduced =
|
|
825
|
+
const reduced = chunkCWW36RYE_js.useReducedMotion();
|
|
948
826
|
let resolvedVariant = variantProp;
|
|
949
827
|
let resolvedIntent = intentProp;
|
|
950
828
|
const legacy = LEGACY_VARIANT_MAP[variantProp];
|
|
@@ -973,7 +851,7 @@ function Badge({
|
|
|
973
851
|
"data-variant": resolvedVariant,
|
|
974
852
|
"data-intent": resolvedIntent,
|
|
975
853
|
whileHover: reduced ? void 0 : { scale: 1.05 },
|
|
976
|
-
transition: reduced ?
|
|
854
|
+
transition: reduced ? chunkCWW36RYE_js.noMotion : chunkCWW36RYE_js.spring,
|
|
977
855
|
className: chunkJOVJRQO3_js.cn(badgeVariants({ variant: resolvedVariant, size }), className),
|
|
978
856
|
...props
|
|
979
857
|
}
|
|
@@ -1021,7 +899,7 @@ function TooltipContent({
|
|
|
1021
899
|
initial: { opacity: 0, scale: 0.92, y: 2 },
|
|
1022
900
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1023
901
|
exit: { opacity: 0, scale: 0.92 },
|
|
1024
|
-
transition:
|
|
902
|
+
transition: chunkCWW36RYE_js.springBouncy,
|
|
1025
903
|
className: chunkJOVJRQO3_js.cn(
|
|
1026
904
|
"z-50 w-fit overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground shadow-md",
|
|
1027
905
|
className
|
|
@@ -1067,7 +945,7 @@ function PopoverContent({
|
|
|
1067
945
|
initial: { opacity: 0, scale: 0.95, y: -4 },
|
|
1068
946
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1069
947
|
exit: { opacity: 0, scale: 0.95, y: -4 },
|
|
1070
|
-
transition:
|
|
948
|
+
transition: chunkCWW36RYE_js.springBouncy,
|
|
1071
949
|
className: chunkJOVJRQO3_js.cn(
|
|
1072
950
|
"z-50 w-72 origin-[var(--radix-popover-content-transform-origin)] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden",
|
|
1073
951
|
className
|
|
@@ -1107,7 +985,7 @@ function HoverCardContent({
|
|
|
1107
985
|
initial: { opacity: 0, scale: 0.95, y: 4 },
|
|
1108
986
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1109
987
|
exit: { opacity: 0, scale: 0.95 },
|
|
1110
|
-
transition:
|
|
988
|
+
transition: chunkCWW36RYE_js.springBouncy,
|
|
1111
989
|
className: chunkJOVJRQO3_js.cn(
|
|
1112
990
|
"z-50 w-64 origin-[var(--radix-hover-card-content-transform-origin)] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden",
|
|
1113
991
|
className
|
|
@@ -1174,7 +1052,7 @@ function SelectContent({
|
|
|
1174
1052
|
{
|
|
1175
1053
|
initial: { opacity: 0, scale: 0.96, y: -4 },
|
|
1176
1054
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1177
|
-
transition:
|
|
1055
|
+
transition: chunkCWW36RYE_js.springBouncy,
|
|
1178
1056
|
className: chunkJOVJRQO3_js.cn(
|
|
1179
1057
|
"relative z-50 max-h-[min(var(--radix-select-content-available-height),24rem)] min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
1180
1058
|
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]",
|
|
@@ -1310,7 +1188,7 @@ function DropdownMenuContent({
|
|
|
1310
1188
|
initial: { opacity: 0, scale: 0.95, y: -4 },
|
|
1311
1189
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1312
1190
|
exit: { opacity: 0, scale: 0.95, y: -4 },
|
|
1313
|
-
transition:
|
|
1191
|
+
transition: chunkCWW36RYE_js.springBouncy,
|
|
1314
1192
|
className: chunkJOVJRQO3_js.cn(
|
|
1315
1193
|
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1316
1194
|
className
|
|
@@ -1432,136 +1310,30 @@ function DropdownMenuSubContent({ className, ...props }) {
|
|
|
1432
1310
|
}
|
|
1433
1311
|
);
|
|
1434
1312
|
}
|
|
1435
|
-
function Drawer({
|
|
1436
|
-
...props
|
|
1437
|
-
}) {
|
|
1438
|
-
return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Root, { "data-slot": "drawer", ...props });
|
|
1439
|
-
}
|
|
1440
|
-
function DrawerTrigger({
|
|
1441
|
-
...props
|
|
1442
|
-
}) {
|
|
1443
|
-
return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
1444
|
-
}
|
|
1445
|
-
function DrawerPortal({
|
|
1446
|
-
...props
|
|
1447
|
-
}) {
|
|
1448
|
-
return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Portal, { "data-slot": "drawer-portal", ...props });
|
|
1449
|
-
}
|
|
1450
|
-
function DrawerClose({
|
|
1451
|
-
...props
|
|
1452
|
-
}) {
|
|
1453
|
-
return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Close, { "data-slot": "drawer-close", ...props });
|
|
1454
|
-
}
|
|
1455
|
-
function DrawerOverlay({
|
|
1456
|
-
className,
|
|
1457
|
-
...props
|
|
1458
|
-
}) {
|
|
1459
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1460
|
-
vaul.Drawer.Overlay,
|
|
1461
|
-
{
|
|
1462
|
-
"data-slot": "drawer-overlay",
|
|
1463
|
-
className: chunkJOVJRQO3_js.cn(
|
|
1464
|
-
"fixed inset-0 z-50 bg-black/50 backdrop-blur-[2px]",
|
|
1465
|
-
className
|
|
1466
|
-
),
|
|
1467
|
-
...props
|
|
1468
|
-
}
|
|
1469
|
-
);
|
|
1470
|
-
}
|
|
1471
|
-
function DrawerContent({
|
|
1472
|
-
className,
|
|
1473
|
-
children,
|
|
1474
|
-
...props
|
|
1475
|
-
}) {
|
|
1476
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { children: [
|
|
1477
|
-
/* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
|
|
1478
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1479
|
-
vaul.Drawer.Content,
|
|
1480
|
-
{
|
|
1481
|
-
"data-slot": "drawer-content",
|
|
1482
|
-
className: chunkJOVJRQO3_js.cn(
|
|
1483
|
-
"group/drawer-content fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[96dvh] flex-col rounded-t-lg border-t bg-background",
|
|
1484
|
-
className
|
|
1485
|
-
),
|
|
1486
|
-
...props,
|
|
1487
|
-
children: [
|
|
1488
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mt-4 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1489
|
-
children
|
|
1490
|
-
]
|
|
1491
|
-
}
|
|
1492
|
-
)
|
|
1493
|
-
] });
|
|
1494
|
-
}
|
|
1495
|
-
function DrawerHeader({ className, ...props }) {
|
|
1496
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1497
|
-
"div",
|
|
1498
|
-
{
|
|
1499
|
-
"data-slot": "drawer-header",
|
|
1500
|
-
className: chunkJOVJRQO3_js.cn("flex flex-col gap-1.5 p-4", className),
|
|
1501
|
-
...props
|
|
1502
|
-
}
|
|
1503
|
-
);
|
|
1504
|
-
}
|
|
1505
|
-
function DrawerFooter({ className, ...props }) {
|
|
1506
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1507
|
-
"div",
|
|
1508
|
-
{
|
|
1509
|
-
"data-slot": "drawer-footer",
|
|
1510
|
-
className: chunkJOVJRQO3_js.cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
1511
|
-
...props
|
|
1512
|
-
}
|
|
1513
|
-
);
|
|
1514
|
-
}
|
|
1515
|
-
function DrawerTitle({
|
|
1516
|
-
className,
|
|
1517
|
-
...props
|
|
1518
|
-
}) {
|
|
1519
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1520
|
-
vaul.Drawer.Title,
|
|
1521
|
-
{
|
|
1522
|
-
"data-slot": "drawer-title",
|
|
1523
|
-
className: chunkJOVJRQO3_js.cn("text-lg leading-none font-semibold", className),
|
|
1524
|
-
...props
|
|
1525
|
-
}
|
|
1526
|
-
);
|
|
1527
|
-
}
|
|
1528
|
-
function DrawerDescription({
|
|
1529
|
-
className,
|
|
1530
|
-
...props
|
|
1531
|
-
}) {
|
|
1532
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1533
|
-
vaul.Drawer.Description,
|
|
1534
|
-
{
|
|
1535
|
-
"data-slot": "drawer-description",
|
|
1536
|
-
className: chunkJOVJRQO3_js.cn("text-sm text-muted-foreground", className),
|
|
1537
|
-
...props
|
|
1538
|
-
}
|
|
1539
|
-
);
|
|
1540
|
-
}
|
|
1541
1313
|
function Sheet({ ...props }) {
|
|
1542
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1314
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Root, { "data-slot": "sheet", ...props });
|
|
1543
1315
|
}
|
|
1544
1316
|
function SheetTrigger({
|
|
1545
1317
|
...props
|
|
1546
1318
|
}) {
|
|
1547
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1319
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
1548
1320
|
}
|
|
1549
1321
|
function SheetClose({
|
|
1550
1322
|
...props
|
|
1551
1323
|
}) {
|
|
1552
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1324
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Close, { "data-slot": "sheet-close", ...props });
|
|
1553
1325
|
}
|
|
1554
1326
|
function SheetPortal({
|
|
1555
1327
|
...props
|
|
1556
1328
|
}) {
|
|
1557
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1329
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Portal, { "data-slot": "sheet-portal", ...props });
|
|
1558
1330
|
}
|
|
1559
1331
|
function SheetOverlay({
|
|
1560
1332
|
className,
|
|
1561
1333
|
...props
|
|
1562
1334
|
}) {
|
|
1563
1335
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1564
|
-
|
|
1336
|
+
SheetPrimitive__namespace.Overlay,
|
|
1565
1337
|
{
|
|
1566
1338
|
"data-slot": "sheet-overlay",
|
|
1567
1339
|
className: chunkJOVJRQO3_js.cn(
|
|
@@ -1582,7 +1354,7 @@ function SheetContent({
|
|
|
1582
1354
|
return /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
1583
1355
|
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
1584
1356
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1585
|
-
|
|
1357
|
+
SheetPrimitive__namespace.Content,
|
|
1586
1358
|
{
|
|
1587
1359
|
"data-slot": "sheet-content",
|
|
1588
1360
|
className: chunkJOVJRQO3_js.cn(
|
|
@@ -1596,7 +1368,7 @@ function SheetContent({
|
|
|
1596
1368
|
...props,
|
|
1597
1369
|
children: [
|
|
1598
1370
|
children,
|
|
1599
|
-
showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1371
|
+
showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
1600
1372
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "size-4" }),
|
|
1601
1373
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
1602
1374
|
] })
|
|
@@ -1630,7 +1402,7 @@ function SheetTitle({
|
|
|
1630
1402
|
...props
|
|
1631
1403
|
}) {
|
|
1632
1404
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1633
|
-
|
|
1405
|
+
SheetPrimitive__namespace.Title,
|
|
1634
1406
|
{
|
|
1635
1407
|
"data-slot": "sheet-title",
|
|
1636
1408
|
className: chunkJOVJRQO3_js.cn("font-semibold text-foreground", className),
|
|
@@ -1643,7 +1415,7 @@ function SheetDescription({
|
|
|
1643
1415
|
...props
|
|
1644
1416
|
}) {
|
|
1645
1417
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1646
|
-
|
|
1418
|
+
SheetPrimitive__namespace.Description,
|
|
1647
1419
|
{
|
|
1648
1420
|
"data-slot": "sheet-description",
|
|
1649
1421
|
className: chunkJOVJRQO3_js.cn("text-sm text-muted-foreground", className),
|
|
@@ -1659,7 +1431,7 @@ function Slider({
|
|
|
1659
1431
|
max = 100,
|
|
1660
1432
|
...props
|
|
1661
1433
|
}) {
|
|
1662
|
-
const _values =
|
|
1434
|
+
const _values = React5__namespace.useMemo(
|
|
1663
1435
|
() => value ?? defaultValue ?? [min],
|
|
1664
1436
|
[value, defaultValue, min]
|
|
1665
1437
|
);
|
|
@@ -1702,7 +1474,7 @@ function Slider({
|
|
|
1702
1474
|
className: "block size-4 shrink-0 cursor-grab rounded-full border border-primary/50 bg-background shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing",
|
|
1703
1475
|
whileHover: { scale: 1.2 },
|
|
1704
1476
|
whileTap: { scale: 0.9 },
|
|
1705
|
-
transition:
|
|
1477
|
+
transition: chunkCWW36RYE_js.springBouncy
|
|
1706
1478
|
}
|
|
1707
1479
|
)
|
|
1708
1480
|
},
|
|
@@ -2508,7 +2280,7 @@ function Toggle({
|
|
|
2508
2280
|
}
|
|
2509
2281
|
);
|
|
2510
2282
|
}
|
|
2511
|
-
var ToggleGroupContext =
|
|
2283
|
+
var ToggleGroupContext = React5__namespace.createContext({
|
|
2512
2284
|
size: "default",
|
|
2513
2285
|
variant: "default",
|
|
2514
2286
|
spacing: 0
|
|
@@ -2545,7 +2317,7 @@ function ToggleGroupItem({
|
|
|
2545
2317
|
size,
|
|
2546
2318
|
...props
|
|
2547
2319
|
}) {
|
|
2548
|
-
const context =
|
|
2320
|
+
const context = React5__namespace.useContext(ToggleGroupContext);
|
|
2549
2321
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2550
2322
|
ToggleGroupPrimitive__namespace.Item,
|
|
2551
2323
|
{
|
|
@@ -2567,183 +2339,6 @@ function ToggleGroupItem({
|
|
|
2567
2339
|
}
|
|
2568
2340
|
);
|
|
2569
2341
|
}
|
|
2570
|
-
function Calendar({
|
|
2571
|
-
className,
|
|
2572
|
-
classNames,
|
|
2573
|
-
showOutsideDays = true,
|
|
2574
|
-
captionLayout = "label",
|
|
2575
|
-
buttonVariant = "ghost",
|
|
2576
|
-
formatters,
|
|
2577
|
-
components,
|
|
2578
|
-
...props
|
|
2579
|
-
}) {
|
|
2580
|
-
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
2581
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2582
|
-
reactDayPicker.DayPicker,
|
|
2583
|
-
{
|
|
2584
|
-
showOutsideDays,
|
|
2585
|
-
className: chunkJOVJRQO3_js.cn(
|
|
2586
|
-
"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
2587
|
-
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
2588
|
-
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
2589
|
-
className
|
|
2590
|
-
),
|
|
2591
|
-
captionLayout,
|
|
2592
|
-
formatters: {
|
|
2593
|
-
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
2594
|
-
...formatters
|
|
2595
|
-
},
|
|
2596
|
-
classNames: {
|
|
2597
|
-
root: chunkJOVJRQO3_js.cn("w-fit", defaultClassNames.root),
|
|
2598
|
-
months: chunkJOVJRQO3_js.cn(
|
|
2599
|
-
"relative flex flex-col gap-4 md:flex-row",
|
|
2600
|
-
defaultClassNames.months
|
|
2601
|
-
),
|
|
2602
|
-
month: chunkJOVJRQO3_js.cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
2603
|
-
nav: chunkJOVJRQO3_js.cn(
|
|
2604
|
-
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
2605
|
-
defaultClassNames.nav
|
|
2606
|
-
),
|
|
2607
|
-
button_previous: chunkJOVJRQO3_js.cn(
|
|
2608
|
-
chunkO3CFRMDK_js.buttonVariants({ variant: buttonVariant }),
|
|
2609
|
-
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
2610
|
-
defaultClassNames.button_previous
|
|
2611
|
-
),
|
|
2612
|
-
button_next: chunkJOVJRQO3_js.cn(
|
|
2613
|
-
chunkO3CFRMDK_js.buttonVariants({ variant: buttonVariant }),
|
|
2614
|
-
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
2615
|
-
defaultClassNames.button_next
|
|
2616
|
-
),
|
|
2617
|
-
month_caption: chunkJOVJRQO3_js.cn(
|
|
2618
|
-
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
2619
|
-
defaultClassNames.month_caption
|
|
2620
|
-
),
|
|
2621
|
-
dropdowns: chunkJOVJRQO3_js.cn(
|
|
2622
|
-
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
2623
|
-
defaultClassNames.dropdowns
|
|
2624
|
-
),
|
|
2625
|
-
dropdown_root: chunkJOVJRQO3_js.cn(
|
|
2626
|
-
"relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
|
|
2627
|
-
defaultClassNames.dropdown_root
|
|
2628
|
-
),
|
|
2629
|
-
dropdown: chunkJOVJRQO3_js.cn(
|
|
2630
|
-
"absolute inset-0 bg-popover opacity-0",
|
|
2631
|
-
defaultClassNames.dropdown
|
|
2632
|
-
),
|
|
2633
|
-
caption_label: chunkJOVJRQO3_js.cn(
|
|
2634
|
-
"font-medium select-none",
|
|
2635
|
-
captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
2636
|
-
defaultClassNames.caption_label
|
|
2637
|
-
),
|
|
2638
|
-
table: "w-full border-collapse",
|
|
2639
|
-
weekdays: chunkJOVJRQO3_js.cn("flex", defaultClassNames.weekdays),
|
|
2640
|
-
weekday: chunkJOVJRQO3_js.cn(
|
|
2641
|
-
"flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
2642
|
-
defaultClassNames.weekday
|
|
2643
|
-
),
|
|
2644
|
-
week: chunkJOVJRQO3_js.cn("mt-2 flex w-full", defaultClassNames.week),
|
|
2645
|
-
week_number_header: chunkJOVJRQO3_js.cn(
|
|
2646
|
-
"w-(--cell-size) select-none",
|
|
2647
|
-
defaultClassNames.week_number_header
|
|
2648
|
-
),
|
|
2649
|
-
week_number: chunkJOVJRQO3_js.cn(
|
|
2650
|
-
"text-[0.8rem] text-muted-foreground select-none",
|
|
2651
|
-
defaultClassNames.week_number
|
|
2652
|
-
),
|
|
2653
|
-
day: chunkJOVJRQO3_js.cn(
|
|
2654
|
-
"group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",
|
|
2655
|
-
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
2656
|
-
defaultClassNames.day
|
|
2657
|
-
),
|
|
2658
|
-
range_start: chunkJOVJRQO3_js.cn(
|
|
2659
|
-
"rounded-l-md bg-accent",
|
|
2660
|
-
defaultClassNames.range_start
|
|
2661
|
-
),
|
|
2662
|
-
range_middle: chunkJOVJRQO3_js.cn("rounded-none", defaultClassNames.range_middle),
|
|
2663
|
-
range_end: chunkJOVJRQO3_js.cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
2664
|
-
today: chunkJOVJRQO3_js.cn(
|
|
2665
|
-
"rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",
|
|
2666
|
-
defaultClassNames.today
|
|
2667
|
-
),
|
|
2668
|
-
outside: chunkJOVJRQO3_js.cn(
|
|
2669
|
-
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
2670
|
-
defaultClassNames.outside
|
|
2671
|
-
),
|
|
2672
|
-
disabled: chunkJOVJRQO3_js.cn(
|
|
2673
|
-
"text-muted-foreground opacity-50",
|
|
2674
|
-
defaultClassNames.disabled
|
|
2675
|
-
),
|
|
2676
|
-
hidden: chunkJOVJRQO3_js.cn("invisible", defaultClassNames.hidden),
|
|
2677
|
-
...classNames
|
|
2678
|
-
},
|
|
2679
|
-
components: {
|
|
2680
|
-
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
2681
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2682
|
-
"div",
|
|
2683
|
-
{
|
|
2684
|
-
"data-slot": "calendar",
|
|
2685
|
-
ref: rootRef,
|
|
2686
|
-
className: chunkJOVJRQO3_js.cn(className2),
|
|
2687
|
-
...props2
|
|
2688
|
-
}
|
|
2689
|
-
);
|
|
2690
|
-
},
|
|
2691
|
-
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
2692
|
-
if (orientation === "left") {
|
|
2693
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className: chunkJOVJRQO3_js.cn("size-4", className2), ...props2 });
|
|
2694
|
-
}
|
|
2695
|
-
if (orientation === "right") {
|
|
2696
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2697
|
-
lucideReact.ChevronRightIcon,
|
|
2698
|
-
{
|
|
2699
|
-
className: chunkJOVJRQO3_js.cn("size-4", className2),
|
|
2700
|
-
...props2
|
|
2701
|
-
}
|
|
2702
|
-
);
|
|
2703
|
-
}
|
|
2704
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: chunkJOVJRQO3_js.cn("size-4", className2), ...props2 });
|
|
2705
|
-
},
|
|
2706
|
-
DayButton: CalendarDayButton,
|
|
2707
|
-
WeekNumber: ({ children, ...props2 }) => {
|
|
2708
|
-
return /* @__PURE__ */ jsxRuntime.jsx("td", { ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
2709
|
-
},
|
|
2710
|
-
...components
|
|
2711
|
-
},
|
|
2712
|
-
...props
|
|
2713
|
-
}
|
|
2714
|
-
);
|
|
2715
|
-
}
|
|
2716
|
-
function CalendarDayButton({
|
|
2717
|
-
className,
|
|
2718
|
-
day,
|
|
2719
|
-
modifiers,
|
|
2720
|
-
...props
|
|
2721
|
-
}) {
|
|
2722
|
-
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
2723
|
-
const ref = React9__namespace.useRef(null);
|
|
2724
|
-
React9__namespace.useEffect(() => {
|
|
2725
|
-
if (modifiers.focused) ref.current?.focus();
|
|
2726
|
-
}, [modifiers.focused]);
|
|
2727
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2728
|
-
chunkO3CFRMDK_js.Button,
|
|
2729
|
-
{
|
|
2730
|
-
ref,
|
|
2731
|
-
variant: "ghost",
|
|
2732
|
-
size: "icon",
|
|
2733
|
-
"data-day": day.date.toLocaleDateString(),
|
|
2734
|
-
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
2735
|
-
"data-range-start": modifiers.range_start,
|
|
2736
|
-
"data-range-end": modifiers.range_end,
|
|
2737
|
-
"data-range-middle": modifiers.range_middle,
|
|
2738
|
-
className: chunkJOVJRQO3_js.cn(
|
|
2739
|
-
"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
|
|
2740
|
-
defaultClassNames.day,
|
|
2741
|
-
className
|
|
2742
|
-
),
|
|
2743
|
-
...props
|
|
2744
|
-
}
|
|
2745
|
-
);
|
|
2746
|
-
}
|
|
2747
2342
|
function RadioGroup4({
|
|
2748
2343
|
className,
|
|
2749
2344
|
...props
|
|
@@ -2868,14 +2463,1094 @@ function ScrollBar({
|
|
|
2868
2463
|
"data-slot": "scroll-area-thumb",
|
|
2869
2464
|
className: "relative flex-1 rounded-full bg-border"
|
|
2870
2465
|
}
|
|
2871
|
-
)
|
|
2466
|
+
)
|
|
2467
|
+
}
|
|
2468
|
+
);
|
|
2469
|
+
}
|
|
2470
|
+
function __insertCSS(code) {
|
|
2471
|
+
if (typeof document == "undefined") return;
|
|
2472
|
+
let head = document.head || document.getElementsByTagName("head")[0];
|
|
2473
|
+
let style = document.createElement("style");
|
|
2474
|
+
style.type = "text/css";
|
|
2475
|
+
head.appendChild(style);
|
|
2476
|
+
style.styleSheet ? style.styleSheet.cssText = code : style.appendChild(document.createTextNode(code));
|
|
2477
|
+
}
|
|
2478
|
+
var getAsset = (type) => {
|
|
2479
|
+
switch (type) {
|
|
2480
|
+
case "success":
|
|
2481
|
+
return SuccessIcon;
|
|
2482
|
+
case "info":
|
|
2483
|
+
return InfoIcon;
|
|
2484
|
+
case "warning":
|
|
2485
|
+
return WarningIcon;
|
|
2486
|
+
case "error":
|
|
2487
|
+
return ErrorIcon;
|
|
2488
|
+
default:
|
|
2489
|
+
return null;
|
|
2490
|
+
}
|
|
2491
|
+
};
|
|
2492
|
+
var bars = Array(12).fill(0);
|
|
2493
|
+
var Loader = ({ visible, className }) => {
|
|
2494
|
+
return /* @__PURE__ */ React5__namespace.default.createElement("div", {
|
|
2495
|
+
className: [
|
|
2496
|
+
"sonner-loading-wrapper",
|
|
2497
|
+
className
|
|
2498
|
+
].filter(Boolean).join(" "),
|
|
2499
|
+
"data-visible": visible
|
|
2500
|
+
}, /* @__PURE__ */ React5__namespace.default.createElement("div", {
|
|
2501
|
+
className: "sonner-spinner"
|
|
2502
|
+
}, bars.map((_, i) => /* @__PURE__ */ React5__namespace.default.createElement("div", {
|
|
2503
|
+
className: "sonner-loading-bar",
|
|
2504
|
+
key: `spinner-bar-${i}`
|
|
2505
|
+
}))));
|
|
2506
|
+
};
|
|
2507
|
+
var SuccessIcon = /* @__PURE__ */ React5__namespace.default.createElement("svg", {
|
|
2508
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2509
|
+
viewBox: "0 0 20 20",
|
|
2510
|
+
fill: "currentColor",
|
|
2511
|
+
height: "20",
|
|
2512
|
+
width: "20"
|
|
2513
|
+
}, /* @__PURE__ */ React5__namespace.default.createElement("path", {
|
|
2514
|
+
fillRule: "evenodd",
|
|
2515
|
+
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
|
|
2516
|
+
clipRule: "evenodd"
|
|
2517
|
+
}));
|
|
2518
|
+
var WarningIcon = /* @__PURE__ */ React5__namespace.default.createElement("svg", {
|
|
2519
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2520
|
+
viewBox: "0 0 24 24",
|
|
2521
|
+
fill: "currentColor",
|
|
2522
|
+
height: "20",
|
|
2523
|
+
width: "20"
|
|
2524
|
+
}, /* @__PURE__ */ React5__namespace.default.createElement("path", {
|
|
2525
|
+
fillRule: "evenodd",
|
|
2526
|
+
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
2527
|
+
clipRule: "evenodd"
|
|
2528
|
+
}));
|
|
2529
|
+
var InfoIcon = /* @__PURE__ */ React5__namespace.default.createElement("svg", {
|
|
2530
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2531
|
+
viewBox: "0 0 20 20",
|
|
2532
|
+
fill: "currentColor",
|
|
2533
|
+
height: "20",
|
|
2534
|
+
width: "20"
|
|
2535
|
+
}, /* @__PURE__ */ React5__namespace.default.createElement("path", {
|
|
2536
|
+
fillRule: "evenodd",
|
|
2537
|
+
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
|
|
2538
|
+
clipRule: "evenodd"
|
|
2539
|
+
}));
|
|
2540
|
+
var ErrorIcon = /* @__PURE__ */ React5__namespace.default.createElement("svg", {
|
|
2541
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2542
|
+
viewBox: "0 0 20 20",
|
|
2543
|
+
fill: "currentColor",
|
|
2544
|
+
height: "20",
|
|
2545
|
+
width: "20"
|
|
2546
|
+
}, /* @__PURE__ */ React5__namespace.default.createElement("path", {
|
|
2547
|
+
fillRule: "evenodd",
|
|
2548
|
+
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
|
|
2549
|
+
clipRule: "evenodd"
|
|
2550
|
+
}));
|
|
2551
|
+
var CloseIcon = /* @__PURE__ */ React5__namespace.default.createElement("svg", {
|
|
2552
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2553
|
+
width: "12",
|
|
2554
|
+
height: "12",
|
|
2555
|
+
viewBox: "0 0 24 24",
|
|
2556
|
+
fill: "none",
|
|
2557
|
+
stroke: "currentColor",
|
|
2558
|
+
strokeWidth: "1.5",
|
|
2559
|
+
strokeLinecap: "round",
|
|
2560
|
+
strokeLinejoin: "round"
|
|
2561
|
+
}, /* @__PURE__ */ React5__namespace.default.createElement("line", {
|
|
2562
|
+
x1: "18",
|
|
2563
|
+
y1: "6",
|
|
2564
|
+
x2: "6",
|
|
2565
|
+
y2: "18"
|
|
2566
|
+
}), /* @__PURE__ */ React5__namespace.default.createElement("line", {
|
|
2567
|
+
x1: "6",
|
|
2568
|
+
y1: "6",
|
|
2569
|
+
x2: "18",
|
|
2570
|
+
y2: "18"
|
|
2571
|
+
}));
|
|
2572
|
+
var useIsDocumentHidden = () => {
|
|
2573
|
+
const [isDocumentHidden, setIsDocumentHidden] = React5__namespace.default.useState(document.hidden);
|
|
2574
|
+
React5__namespace.default.useEffect(() => {
|
|
2575
|
+
const callback = () => {
|
|
2576
|
+
setIsDocumentHidden(document.hidden);
|
|
2577
|
+
};
|
|
2578
|
+
document.addEventListener("visibilitychange", callback);
|
|
2579
|
+
return () => window.removeEventListener("visibilitychange", callback);
|
|
2580
|
+
}, []);
|
|
2581
|
+
return isDocumentHidden;
|
|
2582
|
+
};
|
|
2583
|
+
var toastsCounter = 1;
|
|
2584
|
+
var Observer = class {
|
|
2585
|
+
constructor() {
|
|
2586
|
+
this.subscribe = (subscriber) => {
|
|
2587
|
+
this.subscribers.push(subscriber);
|
|
2588
|
+
return () => {
|
|
2589
|
+
const index = this.subscribers.indexOf(subscriber);
|
|
2590
|
+
this.subscribers.splice(index, 1);
|
|
2591
|
+
};
|
|
2592
|
+
};
|
|
2593
|
+
this.publish = (data) => {
|
|
2594
|
+
this.subscribers.forEach((subscriber) => subscriber(data));
|
|
2595
|
+
};
|
|
2596
|
+
this.addToast = (data) => {
|
|
2597
|
+
this.publish(data);
|
|
2598
|
+
this.toasts = [
|
|
2599
|
+
...this.toasts,
|
|
2600
|
+
data
|
|
2601
|
+
];
|
|
2602
|
+
};
|
|
2603
|
+
this.create = (data) => {
|
|
2604
|
+
var _data_id;
|
|
2605
|
+
const { message, ...rest } = data;
|
|
2606
|
+
const id = typeof (data == null ? void 0 : data.id) === "number" || ((_data_id = data.id) == null ? void 0 : _data_id.length) > 0 ? data.id : toastsCounter++;
|
|
2607
|
+
const alreadyExists = this.toasts.find((toast2) => {
|
|
2608
|
+
return toast2.id === id;
|
|
2609
|
+
});
|
|
2610
|
+
const dismissible = data.dismissible === void 0 ? true : data.dismissible;
|
|
2611
|
+
if (this.dismissedToasts.has(id)) {
|
|
2612
|
+
this.dismissedToasts.delete(id);
|
|
2613
|
+
}
|
|
2614
|
+
if (alreadyExists) {
|
|
2615
|
+
this.toasts = this.toasts.map((toast2) => {
|
|
2616
|
+
if (toast2.id === id) {
|
|
2617
|
+
this.publish({
|
|
2618
|
+
...toast2,
|
|
2619
|
+
...data,
|
|
2620
|
+
id,
|
|
2621
|
+
title: message
|
|
2622
|
+
});
|
|
2623
|
+
return {
|
|
2624
|
+
...toast2,
|
|
2625
|
+
...data,
|
|
2626
|
+
id,
|
|
2627
|
+
dismissible,
|
|
2628
|
+
title: message
|
|
2629
|
+
};
|
|
2630
|
+
}
|
|
2631
|
+
return toast2;
|
|
2632
|
+
});
|
|
2633
|
+
} else {
|
|
2634
|
+
this.addToast({
|
|
2635
|
+
title: message,
|
|
2636
|
+
...rest,
|
|
2637
|
+
dismissible,
|
|
2638
|
+
id
|
|
2639
|
+
});
|
|
2640
|
+
}
|
|
2641
|
+
return id;
|
|
2642
|
+
};
|
|
2643
|
+
this.dismiss = (id) => {
|
|
2644
|
+
if (id) {
|
|
2645
|
+
this.dismissedToasts.add(id);
|
|
2646
|
+
requestAnimationFrame(() => this.subscribers.forEach((subscriber) => subscriber({
|
|
2647
|
+
id,
|
|
2648
|
+
dismiss: true
|
|
2649
|
+
})));
|
|
2650
|
+
} else {
|
|
2651
|
+
this.toasts.forEach((toast2) => {
|
|
2652
|
+
this.subscribers.forEach((subscriber) => subscriber({
|
|
2653
|
+
id: toast2.id,
|
|
2654
|
+
dismiss: true
|
|
2655
|
+
}));
|
|
2656
|
+
});
|
|
2657
|
+
}
|
|
2658
|
+
return id;
|
|
2659
|
+
};
|
|
2660
|
+
this.message = (message, data) => {
|
|
2661
|
+
return this.create({
|
|
2662
|
+
...data,
|
|
2663
|
+
message
|
|
2664
|
+
});
|
|
2665
|
+
};
|
|
2666
|
+
this.error = (message, data) => {
|
|
2667
|
+
return this.create({
|
|
2668
|
+
...data,
|
|
2669
|
+
message,
|
|
2670
|
+
type: "error"
|
|
2671
|
+
});
|
|
2672
|
+
};
|
|
2673
|
+
this.success = (message, data) => {
|
|
2674
|
+
return this.create({
|
|
2675
|
+
...data,
|
|
2676
|
+
type: "success",
|
|
2677
|
+
message
|
|
2678
|
+
});
|
|
2679
|
+
};
|
|
2680
|
+
this.info = (message, data) => {
|
|
2681
|
+
return this.create({
|
|
2682
|
+
...data,
|
|
2683
|
+
type: "info",
|
|
2684
|
+
message
|
|
2685
|
+
});
|
|
2686
|
+
};
|
|
2687
|
+
this.warning = (message, data) => {
|
|
2688
|
+
return this.create({
|
|
2689
|
+
...data,
|
|
2690
|
+
type: "warning",
|
|
2691
|
+
message
|
|
2692
|
+
});
|
|
2693
|
+
};
|
|
2694
|
+
this.loading = (message, data) => {
|
|
2695
|
+
return this.create({
|
|
2696
|
+
...data,
|
|
2697
|
+
type: "loading",
|
|
2698
|
+
message
|
|
2699
|
+
});
|
|
2700
|
+
};
|
|
2701
|
+
this.promise = (promise, data) => {
|
|
2702
|
+
if (!data) {
|
|
2703
|
+
return;
|
|
2704
|
+
}
|
|
2705
|
+
let id = void 0;
|
|
2706
|
+
if (data.loading !== void 0) {
|
|
2707
|
+
id = this.create({
|
|
2708
|
+
...data,
|
|
2709
|
+
promise,
|
|
2710
|
+
type: "loading",
|
|
2711
|
+
message: data.loading,
|
|
2712
|
+
description: typeof data.description !== "function" ? data.description : void 0
|
|
2713
|
+
});
|
|
2714
|
+
}
|
|
2715
|
+
const p = Promise.resolve(promise instanceof Function ? promise() : promise);
|
|
2716
|
+
let shouldDismiss = id !== void 0;
|
|
2717
|
+
let result;
|
|
2718
|
+
const originalPromise = p.then(async (response) => {
|
|
2719
|
+
result = [
|
|
2720
|
+
"resolve",
|
|
2721
|
+
response
|
|
2722
|
+
];
|
|
2723
|
+
const isReactElementResponse = React5__namespace.default.isValidElement(response);
|
|
2724
|
+
if (isReactElementResponse) {
|
|
2725
|
+
shouldDismiss = false;
|
|
2726
|
+
this.create({
|
|
2727
|
+
id,
|
|
2728
|
+
type: "default",
|
|
2729
|
+
message: response
|
|
2730
|
+
});
|
|
2731
|
+
} else if (isHttpResponse(response) && !response.ok) {
|
|
2732
|
+
shouldDismiss = false;
|
|
2733
|
+
const promiseData = typeof data.error === "function" ? await data.error(`HTTP error! status: ${response.status}`) : data.error;
|
|
2734
|
+
const description = typeof data.description === "function" ? await data.description(`HTTP error! status: ${response.status}`) : data.description;
|
|
2735
|
+
const isExtendedResult = typeof promiseData === "object" && !React5__namespace.default.isValidElement(promiseData);
|
|
2736
|
+
const toastSettings = isExtendedResult ? promiseData : {
|
|
2737
|
+
message: promiseData
|
|
2738
|
+
};
|
|
2739
|
+
this.create({
|
|
2740
|
+
id,
|
|
2741
|
+
type: "error",
|
|
2742
|
+
description,
|
|
2743
|
+
...toastSettings
|
|
2744
|
+
});
|
|
2745
|
+
} else if (response instanceof Error) {
|
|
2746
|
+
shouldDismiss = false;
|
|
2747
|
+
const promiseData = typeof data.error === "function" ? await data.error(response) : data.error;
|
|
2748
|
+
const description = typeof data.description === "function" ? await data.description(response) : data.description;
|
|
2749
|
+
const isExtendedResult = typeof promiseData === "object" && !React5__namespace.default.isValidElement(promiseData);
|
|
2750
|
+
const toastSettings = isExtendedResult ? promiseData : {
|
|
2751
|
+
message: promiseData
|
|
2752
|
+
};
|
|
2753
|
+
this.create({
|
|
2754
|
+
id,
|
|
2755
|
+
type: "error",
|
|
2756
|
+
description,
|
|
2757
|
+
...toastSettings
|
|
2758
|
+
});
|
|
2759
|
+
} else if (data.success !== void 0) {
|
|
2760
|
+
shouldDismiss = false;
|
|
2761
|
+
const promiseData = typeof data.success === "function" ? await data.success(response) : data.success;
|
|
2762
|
+
const description = typeof data.description === "function" ? await data.description(response) : data.description;
|
|
2763
|
+
const isExtendedResult = typeof promiseData === "object" && !React5__namespace.default.isValidElement(promiseData);
|
|
2764
|
+
const toastSettings = isExtendedResult ? promiseData : {
|
|
2765
|
+
message: promiseData
|
|
2766
|
+
};
|
|
2767
|
+
this.create({
|
|
2768
|
+
id,
|
|
2769
|
+
type: "success",
|
|
2770
|
+
description,
|
|
2771
|
+
...toastSettings
|
|
2772
|
+
});
|
|
2773
|
+
}
|
|
2774
|
+
}).catch(async (error) => {
|
|
2775
|
+
result = [
|
|
2776
|
+
"reject",
|
|
2777
|
+
error
|
|
2778
|
+
];
|
|
2779
|
+
if (data.error !== void 0) {
|
|
2780
|
+
shouldDismiss = false;
|
|
2781
|
+
const promiseData = typeof data.error === "function" ? await data.error(error) : data.error;
|
|
2782
|
+
const description = typeof data.description === "function" ? await data.description(error) : data.description;
|
|
2783
|
+
const isExtendedResult = typeof promiseData === "object" && !React5__namespace.default.isValidElement(promiseData);
|
|
2784
|
+
const toastSettings = isExtendedResult ? promiseData : {
|
|
2785
|
+
message: promiseData
|
|
2786
|
+
};
|
|
2787
|
+
this.create({
|
|
2788
|
+
id,
|
|
2789
|
+
type: "error",
|
|
2790
|
+
description,
|
|
2791
|
+
...toastSettings
|
|
2792
|
+
});
|
|
2793
|
+
}
|
|
2794
|
+
}).finally(() => {
|
|
2795
|
+
if (shouldDismiss) {
|
|
2796
|
+
this.dismiss(id);
|
|
2797
|
+
id = void 0;
|
|
2798
|
+
}
|
|
2799
|
+
data.finally == null ? void 0 : data.finally.call(data);
|
|
2800
|
+
});
|
|
2801
|
+
const unwrap = () => new Promise((resolve, reject) => originalPromise.then(() => result[0] === "reject" ? reject(result[1]) : resolve(result[1])).catch(reject));
|
|
2802
|
+
if (typeof id !== "string" && typeof id !== "number") {
|
|
2803
|
+
return {
|
|
2804
|
+
unwrap
|
|
2805
|
+
};
|
|
2806
|
+
} else {
|
|
2807
|
+
return Object.assign(id, {
|
|
2808
|
+
unwrap
|
|
2809
|
+
});
|
|
2810
|
+
}
|
|
2811
|
+
};
|
|
2812
|
+
this.custom = (jsx65, data) => {
|
|
2813
|
+
const id = (data == null ? void 0 : data.id) || toastsCounter++;
|
|
2814
|
+
this.create({
|
|
2815
|
+
jsx: jsx65(id),
|
|
2816
|
+
id,
|
|
2817
|
+
...data
|
|
2818
|
+
});
|
|
2819
|
+
return id;
|
|
2820
|
+
};
|
|
2821
|
+
this.getActiveToasts = () => {
|
|
2822
|
+
return this.toasts.filter((toast2) => !this.dismissedToasts.has(toast2.id));
|
|
2823
|
+
};
|
|
2824
|
+
this.subscribers = [];
|
|
2825
|
+
this.toasts = [];
|
|
2826
|
+
this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
2827
|
+
}
|
|
2828
|
+
};
|
|
2829
|
+
var ToastState = new Observer();
|
|
2830
|
+
var toastFunction = (message, data) => {
|
|
2831
|
+
const id = (data == null ? void 0 : data.id) || toastsCounter++;
|
|
2832
|
+
ToastState.addToast({
|
|
2833
|
+
title: message,
|
|
2834
|
+
...data,
|
|
2835
|
+
id
|
|
2836
|
+
});
|
|
2837
|
+
return id;
|
|
2838
|
+
};
|
|
2839
|
+
var isHttpResponse = (data) => {
|
|
2840
|
+
return data && typeof data === "object" && "ok" in data && typeof data.ok === "boolean" && "status" in data && typeof data.status === "number";
|
|
2841
|
+
};
|
|
2842
|
+
var basicToast = toastFunction;
|
|
2843
|
+
var getHistory = () => ToastState.toasts;
|
|
2844
|
+
var getToasts = () => ToastState.getActiveToasts();
|
|
2845
|
+
Object.assign(basicToast, {
|
|
2846
|
+
success: ToastState.success,
|
|
2847
|
+
info: ToastState.info,
|
|
2848
|
+
warning: ToastState.warning,
|
|
2849
|
+
error: ToastState.error,
|
|
2850
|
+
custom: ToastState.custom,
|
|
2851
|
+
message: ToastState.message,
|
|
2852
|
+
promise: ToastState.promise,
|
|
2853
|
+
dismiss: ToastState.dismiss,
|
|
2854
|
+
loading: ToastState.loading
|
|
2855
|
+
}, {
|
|
2856
|
+
getHistory,
|
|
2857
|
+
getToasts
|
|
2858
|
+
});
|
|
2859
|
+
__insertCSS("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
|
|
2860
|
+
function isAction(action) {
|
|
2861
|
+
return action.label !== void 0;
|
|
2862
|
+
}
|
|
2863
|
+
var VISIBLE_TOASTS_AMOUNT = 3;
|
|
2864
|
+
var VIEWPORT_OFFSET = "24px";
|
|
2865
|
+
var MOBILE_VIEWPORT_OFFSET = "16px";
|
|
2866
|
+
var TOAST_LIFETIME = 4e3;
|
|
2867
|
+
var TOAST_WIDTH = 356;
|
|
2868
|
+
var GAP = 14;
|
|
2869
|
+
var SWIPE_THRESHOLD = 45;
|
|
2870
|
+
var TIME_BEFORE_UNMOUNT = 200;
|
|
2871
|
+
function cn2(...classes) {
|
|
2872
|
+
return classes.filter(Boolean).join(" ");
|
|
2873
|
+
}
|
|
2874
|
+
function getDefaultSwipeDirections(position) {
|
|
2875
|
+
const [y, x] = position.split("-");
|
|
2876
|
+
const directions = [];
|
|
2877
|
+
if (y) {
|
|
2878
|
+
directions.push(y);
|
|
2879
|
+
}
|
|
2880
|
+
if (x) {
|
|
2881
|
+
directions.push(x);
|
|
2882
|
+
}
|
|
2883
|
+
return directions;
|
|
2884
|
+
}
|
|
2885
|
+
var Toast = (props) => {
|
|
2886
|
+
var _toast_classNames, _toast_classNames1, _toast_classNames2, _toast_classNames3, _toast_classNames4, _toast_classNames5, _toast_classNames6, _toast_classNames7, _toast_classNames8;
|
|
2887
|
+
const { invert: ToasterInvert, toast: toast2, unstyled, interacting, setHeights, visibleToasts, heights, index, toasts, expanded, removeToast, defaultRichColors, closeButton: closeButtonFromToaster, style, cancelButtonStyle, actionButtonStyle, className = "", descriptionClassName = "", duration: durationFromToaster, position, gap, expandByDefault, classNames, icons, closeButtonAriaLabel = "Close toast" } = props;
|
|
2888
|
+
const [swipeDirection, setSwipeDirection] = React5__namespace.default.useState(null);
|
|
2889
|
+
const [swipeOutDirection, setSwipeOutDirection] = React5__namespace.default.useState(null);
|
|
2890
|
+
const [mounted, setMounted] = React5__namespace.default.useState(false);
|
|
2891
|
+
const [removed, setRemoved] = React5__namespace.default.useState(false);
|
|
2892
|
+
const [swiping, setSwiping] = React5__namespace.default.useState(false);
|
|
2893
|
+
const [swipeOut, setSwipeOut] = React5__namespace.default.useState(false);
|
|
2894
|
+
const [isSwiped, setIsSwiped] = React5__namespace.default.useState(false);
|
|
2895
|
+
const [offsetBeforeRemove, setOffsetBeforeRemove] = React5__namespace.default.useState(0);
|
|
2896
|
+
const [initialHeight, setInitialHeight] = React5__namespace.default.useState(0);
|
|
2897
|
+
const remainingTime = React5__namespace.default.useRef(toast2.duration || durationFromToaster || TOAST_LIFETIME);
|
|
2898
|
+
const dragStartTime = React5__namespace.default.useRef(null);
|
|
2899
|
+
const toastRef = React5__namespace.default.useRef(null);
|
|
2900
|
+
const isFront = index === 0;
|
|
2901
|
+
const isVisible = index + 1 <= visibleToasts;
|
|
2902
|
+
const toastType = toast2.type;
|
|
2903
|
+
const dismissible = toast2.dismissible !== false;
|
|
2904
|
+
const toastClassname = toast2.className || "";
|
|
2905
|
+
const toastDescriptionClassname = toast2.descriptionClassName || "";
|
|
2906
|
+
const heightIndex = React5__namespace.default.useMemo(() => heights.findIndex((height) => height.toastId === toast2.id) || 0, [
|
|
2907
|
+
heights,
|
|
2908
|
+
toast2.id
|
|
2909
|
+
]);
|
|
2910
|
+
const closeButton = React5__namespace.default.useMemo(() => {
|
|
2911
|
+
var _toast_closeButton;
|
|
2912
|
+
return (_toast_closeButton = toast2.closeButton) != null ? _toast_closeButton : closeButtonFromToaster;
|
|
2913
|
+
}, [
|
|
2914
|
+
toast2.closeButton,
|
|
2915
|
+
closeButtonFromToaster
|
|
2916
|
+
]);
|
|
2917
|
+
const duration = React5__namespace.default.useMemo(() => toast2.duration || durationFromToaster || TOAST_LIFETIME, [
|
|
2918
|
+
toast2.duration,
|
|
2919
|
+
durationFromToaster
|
|
2920
|
+
]);
|
|
2921
|
+
const closeTimerStartTimeRef = React5__namespace.default.useRef(0);
|
|
2922
|
+
const offset = React5__namespace.default.useRef(0);
|
|
2923
|
+
const lastCloseTimerStartTimeRef = React5__namespace.default.useRef(0);
|
|
2924
|
+
const pointerStartRef = React5__namespace.default.useRef(null);
|
|
2925
|
+
const [y, x] = position.split("-");
|
|
2926
|
+
const toastsHeightBefore = React5__namespace.default.useMemo(() => {
|
|
2927
|
+
return heights.reduce((prev, curr, reducerIndex) => {
|
|
2928
|
+
if (reducerIndex >= heightIndex) {
|
|
2929
|
+
return prev;
|
|
2930
|
+
}
|
|
2931
|
+
return prev + curr.height;
|
|
2932
|
+
}, 0);
|
|
2933
|
+
}, [
|
|
2934
|
+
heights,
|
|
2935
|
+
heightIndex
|
|
2936
|
+
]);
|
|
2937
|
+
const isDocumentHidden = useIsDocumentHidden();
|
|
2938
|
+
const invert = toast2.invert || ToasterInvert;
|
|
2939
|
+
const disabled = toastType === "loading";
|
|
2940
|
+
offset.current = React5__namespace.default.useMemo(() => heightIndex * gap + toastsHeightBefore, [
|
|
2941
|
+
heightIndex,
|
|
2942
|
+
toastsHeightBefore
|
|
2943
|
+
]);
|
|
2944
|
+
React5__namespace.default.useEffect(() => {
|
|
2945
|
+
remainingTime.current = duration;
|
|
2946
|
+
}, [
|
|
2947
|
+
duration
|
|
2948
|
+
]);
|
|
2949
|
+
React5__namespace.default.useEffect(() => {
|
|
2950
|
+
setMounted(true);
|
|
2951
|
+
}, []);
|
|
2952
|
+
React5__namespace.default.useEffect(() => {
|
|
2953
|
+
const toastNode = toastRef.current;
|
|
2954
|
+
if (toastNode) {
|
|
2955
|
+
const height = toastNode.getBoundingClientRect().height;
|
|
2956
|
+
setInitialHeight(height);
|
|
2957
|
+
setHeights((h) => [
|
|
2958
|
+
{
|
|
2959
|
+
toastId: toast2.id,
|
|
2960
|
+
height,
|
|
2961
|
+
position: toast2.position
|
|
2962
|
+
},
|
|
2963
|
+
...h
|
|
2964
|
+
]);
|
|
2965
|
+
return () => setHeights((h) => h.filter((height2) => height2.toastId !== toast2.id));
|
|
2966
|
+
}
|
|
2967
|
+
}, [
|
|
2968
|
+
setHeights,
|
|
2969
|
+
toast2.id
|
|
2970
|
+
]);
|
|
2971
|
+
React5__namespace.default.useLayoutEffect(() => {
|
|
2972
|
+
if (!mounted) return;
|
|
2973
|
+
const toastNode = toastRef.current;
|
|
2974
|
+
const originalHeight = toastNode.style.height;
|
|
2975
|
+
toastNode.style.height = "auto";
|
|
2976
|
+
const newHeight = toastNode.getBoundingClientRect().height;
|
|
2977
|
+
toastNode.style.height = originalHeight;
|
|
2978
|
+
setInitialHeight(newHeight);
|
|
2979
|
+
setHeights((heights2) => {
|
|
2980
|
+
const alreadyExists = heights2.find((height) => height.toastId === toast2.id);
|
|
2981
|
+
if (!alreadyExists) {
|
|
2982
|
+
return [
|
|
2983
|
+
{
|
|
2984
|
+
toastId: toast2.id,
|
|
2985
|
+
height: newHeight,
|
|
2986
|
+
position: toast2.position
|
|
2987
|
+
},
|
|
2988
|
+
...heights2
|
|
2989
|
+
];
|
|
2990
|
+
} else {
|
|
2991
|
+
return heights2.map((height) => height.toastId === toast2.id ? {
|
|
2992
|
+
...height,
|
|
2993
|
+
height: newHeight
|
|
2994
|
+
} : height);
|
|
2995
|
+
}
|
|
2996
|
+
});
|
|
2997
|
+
}, [
|
|
2998
|
+
mounted,
|
|
2999
|
+
toast2.title,
|
|
3000
|
+
toast2.description,
|
|
3001
|
+
setHeights,
|
|
3002
|
+
toast2.id,
|
|
3003
|
+
toast2.jsx,
|
|
3004
|
+
toast2.action,
|
|
3005
|
+
toast2.cancel
|
|
3006
|
+
]);
|
|
3007
|
+
const deleteToast = React5__namespace.default.useCallback(() => {
|
|
3008
|
+
setRemoved(true);
|
|
3009
|
+
setOffsetBeforeRemove(offset.current);
|
|
3010
|
+
setHeights((h) => h.filter((height) => height.toastId !== toast2.id));
|
|
3011
|
+
setTimeout(() => {
|
|
3012
|
+
removeToast(toast2);
|
|
3013
|
+
}, TIME_BEFORE_UNMOUNT);
|
|
3014
|
+
}, [
|
|
3015
|
+
toast2,
|
|
3016
|
+
removeToast,
|
|
3017
|
+
setHeights,
|
|
3018
|
+
offset
|
|
3019
|
+
]);
|
|
3020
|
+
React5__namespace.default.useEffect(() => {
|
|
3021
|
+
if (toast2.promise && toastType === "loading" || toast2.duration === Infinity || toast2.type === "loading") return;
|
|
3022
|
+
let timeoutId;
|
|
3023
|
+
const pauseTimer = () => {
|
|
3024
|
+
if (lastCloseTimerStartTimeRef.current < closeTimerStartTimeRef.current) {
|
|
3025
|
+
const elapsedTime = (/* @__PURE__ */ new Date()).getTime() - closeTimerStartTimeRef.current;
|
|
3026
|
+
remainingTime.current = remainingTime.current - elapsedTime;
|
|
3027
|
+
}
|
|
3028
|
+
lastCloseTimerStartTimeRef.current = (/* @__PURE__ */ new Date()).getTime();
|
|
3029
|
+
};
|
|
3030
|
+
const startTimer = () => {
|
|
3031
|
+
if (remainingTime.current === Infinity) return;
|
|
3032
|
+
closeTimerStartTimeRef.current = (/* @__PURE__ */ new Date()).getTime();
|
|
3033
|
+
timeoutId = setTimeout(() => {
|
|
3034
|
+
toast2.onAutoClose == null ? void 0 : toast2.onAutoClose.call(toast2, toast2);
|
|
3035
|
+
deleteToast();
|
|
3036
|
+
}, remainingTime.current);
|
|
3037
|
+
};
|
|
3038
|
+
if (expanded || interacting || isDocumentHidden) {
|
|
3039
|
+
pauseTimer();
|
|
3040
|
+
} else {
|
|
3041
|
+
startTimer();
|
|
3042
|
+
}
|
|
3043
|
+
return () => clearTimeout(timeoutId);
|
|
3044
|
+
}, [
|
|
3045
|
+
expanded,
|
|
3046
|
+
interacting,
|
|
3047
|
+
toast2,
|
|
3048
|
+
toastType,
|
|
3049
|
+
isDocumentHidden,
|
|
3050
|
+
deleteToast
|
|
3051
|
+
]);
|
|
3052
|
+
React5__namespace.default.useEffect(() => {
|
|
3053
|
+
if (toast2.delete) {
|
|
3054
|
+
deleteToast();
|
|
3055
|
+
toast2.onDismiss == null ? void 0 : toast2.onDismiss.call(toast2, toast2);
|
|
3056
|
+
}
|
|
3057
|
+
}, [
|
|
3058
|
+
deleteToast,
|
|
3059
|
+
toast2.delete
|
|
3060
|
+
]);
|
|
3061
|
+
function getLoadingIcon() {
|
|
3062
|
+
var _toast_classNames9;
|
|
3063
|
+
if (icons == null ? void 0 : icons.loading) {
|
|
3064
|
+
var _toast_classNames12;
|
|
3065
|
+
return /* @__PURE__ */ React5__namespace.default.createElement("div", {
|
|
3066
|
+
className: cn2(classNames == null ? void 0 : classNames.loader, toast2 == null ? void 0 : (_toast_classNames12 = toast2.classNames) == null ? void 0 : _toast_classNames12.loader, "sonner-loader"),
|
|
3067
|
+
"data-visible": toastType === "loading"
|
|
3068
|
+
}, icons.loading);
|
|
3069
|
+
}
|
|
3070
|
+
return /* @__PURE__ */ React5__namespace.default.createElement(Loader, {
|
|
3071
|
+
className: cn2(classNames == null ? void 0 : classNames.loader, toast2 == null ? void 0 : (_toast_classNames9 = toast2.classNames) == null ? void 0 : _toast_classNames9.loader),
|
|
3072
|
+
visible: toastType === "loading"
|
|
3073
|
+
});
|
|
3074
|
+
}
|
|
3075
|
+
const icon = toast2.icon || (icons == null ? void 0 : icons[toastType]) || getAsset(toastType);
|
|
3076
|
+
var _toast_richColors, _icons_close;
|
|
3077
|
+
return /* @__PURE__ */ React5__namespace.default.createElement("li", {
|
|
3078
|
+
tabIndex: 0,
|
|
3079
|
+
ref: toastRef,
|
|
3080
|
+
className: cn2(className, toastClassname, classNames == null ? void 0 : classNames.toast, toast2 == null ? void 0 : (_toast_classNames = toast2.classNames) == null ? void 0 : _toast_classNames.toast, classNames == null ? void 0 : classNames.default, classNames == null ? void 0 : classNames[toastType], toast2 == null ? void 0 : (_toast_classNames1 = toast2.classNames) == null ? void 0 : _toast_classNames1[toastType]),
|
|
3081
|
+
"data-sonner-toast": "",
|
|
3082
|
+
"data-rich-colors": (_toast_richColors = toast2.richColors) != null ? _toast_richColors : defaultRichColors,
|
|
3083
|
+
"data-styled": !Boolean(toast2.jsx || toast2.unstyled || unstyled),
|
|
3084
|
+
"data-mounted": mounted,
|
|
3085
|
+
"data-promise": Boolean(toast2.promise),
|
|
3086
|
+
"data-swiped": isSwiped,
|
|
3087
|
+
"data-removed": removed,
|
|
3088
|
+
"data-visible": isVisible,
|
|
3089
|
+
"data-y-position": y,
|
|
3090
|
+
"data-x-position": x,
|
|
3091
|
+
"data-index": index,
|
|
3092
|
+
"data-front": isFront,
|
|
3093
|
+
"data-swiping": swiping,
|
|
3094
|
+
"data-dismissible": dismissible,
|
|
3095
|
+
"data-type": toastType,
|
|
3096
|
+
"data-invert": invert,
|
|
3097
|
+
"data-swipe-out": swipeOut,
|
|
3098
|
+
"data-swipe-direction": swipeOutDirection,
|
|
3099
|
+
"data-expanded": Boolean(expanded || expandByDefault && mounted),
|
|
3100
|
+
"data-testid": toast2.testId,
|
|
3101
|
+
style: {
|
|
3102
|
+
"--index": index,
|
|
3103
|
+
"--toasts-before": index,
|
|
3104
|
+
"--z-index": toasts.length - index,
|
|
3105
|
+
"--offset": `${removed ? offsetBeforeRemove : offset.current}px`,
|
|
3106
|
+
"--initial-height": expandByDefault ? "auto" : `${initialHeight}px`,
|
|
3107
|
+
...style,
|
|
3108
|
+
...toast2.style
|
|
3109
|
+
},
|
|
3110
|
+
onDragEnd: () => {
|
|
3111
|
+
setSwiping(false);
|
|
3112
|
+
setSwipeDirection(null);
|
|
3113
|
+
pointerStartRef.current = null;
|
|
3114
|
+
},
|
|
3115
|
+
onPointerDown: (event) => {
|
|
3116
|
+
if (event.button === 2) return;
|
|
3117
|
+
if (disabled || !dismissible) return;
|
|
3118
|
+
dragStartTime.current = /* @__PURE__ */ new Date();
|
|
3119
|
+
setOffsetBeforeRemove(offset.current);
|
|
3120
|
+
event.target.setPointerCapture(event.pointerId);
|
|
3121
|
+
if (event.target.tagName === "BUTTON") return;
|
|
3122
|
+
setSwiping(true);
|
|
3123
|
+
pointerStartRef.current = {
|
|
3124
|
+
x: event.clientX,
|
|
3125
|
+
y: event.clientY
|
|
3126
|
+
};
|
|
3127
|
+
},
|
|
3128
|
+
onPointerUp: () => {
|
|
3129
|
+
var _toastRef_current, _toastRef_current1, _dragStartTime_current;
|
|
3130
|
+
if (swipeOut || !dismissible) return;
|
|
3131
|
+
pointerStartRef.current = null;
|
|
3132
|
+
const swipeAmountX = Number(((_toastRef_current = toastRef.current) == null ? void 0 : _toastRef_current.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0);
|
|
3133
|
+
const swipeAmountY = Number(((_toastRef_current1 = toastRef.current) == null ? void 0 : _toastRef_current1.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0);
|
|
3134
|
+
const timeTaken = (/* @__PURE__ */ new Date()).getTime() - ((_dragStartTime_current = dragStartTime.current) == null ? void 0 : _dragStartTime_current.getTime());
|
|
3135
|
+
const swipeAmount = swipeDirection === "x" ? swipeAmountX : swipeAmountY;
|
|
3136
|
+
const velocity = Math.abs(swipeAmount) / timeTaken;
|
|
3137
|
+
if (Math.abs(swipeAmount) >= SWIPE_THRESHOLD || velocity > 0.11) {
|
|
3138
|
+
setOffsetBeforeRemove(offset.current);
|
|
3139
|
+
toast2.onDismiss == null ? void 0 : toast2.onDismiss.call(toast2, toast2);
|
|
3140
|
+
if (swipeDirection === "x") {
|
|
3141
|
+
setSwipeOutDirection(swipeAmountX > 0 ? "right" : "left");
|
|
3142
|
+
} else {
|
|
3143
|
+
setSwipeOutDirection(swipeAmountY > 0 ? "down" : "up");
|
|
3144
|
+
}
|
|
3145
|
+
deleteToast();
|
|
3146
|
+
setSwipeOut(true);
|
|
3147
|
+
return;
|
|
3148
|
+
} else {
|
|
3149
|
+
var _toastRef_current2, _toastRef_current3;
|
|
3150
|
+
(_toastRef_current2 = toastRef.current) == null ? void 0 : _toastRef_current2.style.setProperty("--swipe-amount-x", `0px`);
|
|
3151
|
+
(_toastRef_current3 = toastRef.current) == null ? void 0 : _toastRef_current3.style.setProperty("--swipe-amount-y", `0px`);
|
|
3152
|
+
}
|
|
3153
|
+
setIsSwiped(false);
|
|
3154
|
+
setSwiping(false);
|
|
3155
|
+
setSwipeDirection(null);
|
|
3156
|
+
},
|
|
3157
|
+
onPointerMove: (event) => {
|
|
3158
|
+
var _window_getSelection, _toastRef_current, _toastRef_current1;
|
|
3159
|
+
if (!pointerStartRef.current || !dismissible) return;
|
|
3160
|
+
const isHighlighted = ((_window_getSelection = window.getSelection()) == null ? void 0 : _window_getSelection.toString().length) > 0;
|
|
3161
|
+
if (isHighlighted) return;
|
|
3162
|
+
const yDelta = event.clientY - pointerStartRef.current.y;
|
|
3163
|
+
const xDelta = event.clientX - pointerStartRef.current.x;
|
|
3164
|
+
var _props_swipeDirections;
|
|
3165
|
+
const swipeDirections = (_props_swipeDirections = props.swipeDirections) != null ? _props_swipeDirections : getDefaultSwipeDirections(position);
|
|
3166
|
+
if (!swipeDirection && (Math.abs(xDelta) > 1 || Math.abs(yDelta) > 1)) {
|
|
3167
|
+
setSwipeDirection(Math.abs(xDelta) > Math.abs(yDelta) ? "x" : "y");
|
|
3168
|
+
}
|
|
3169
|
+
let swipeAmount = {
|
|
3170
|
+
x: 0,
|
|
3171
|
+
y: 0
|
|
3172
|
+
};
|
|
3173
|
+
const getDampening = (delta) => {
|
|
3174
|
+
const factor = Math.abs(delta) / 20;
|
|
3175
|
+
return 1 / (1.5 + factor);
|
|
3176
|
+
};
|
|
3177
|
+
if (swipeDirection === "y") {
|
|
3178
|
+
if (swipeDirections.includes("top") || swipeDirections.includes("bottom")) {
|
|
3179
|
+
if (swipeDirections.includes("top") && yDelta < 0 || swipeDirections.includes("bottom") && yDelta > 0) {
|
|
3180
|
+
swipeAmount.y = yDelta;
|
|
3181
|
+
} else {
|
|
3182
|
+
const dampenedDelta = yDelta * getDampening(yDelta);
|
|
3183
|
+
swipeAmount.y = Math.abs(dampenedDelta) < Math.abs(yDelta) ? dampenedDelta : yDelta;
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
} else if (swipeDirection === "x") {
|
|
3187
|
+
if (swipeDirections.includes("left") || swipeDirections.includes("right")) {
|
|
3188
|
+
if (swipeDirections.includes("left") && xDelta < 0 || swipeDirections.includes("right") && xDelta > 0) {
|
|
3189
|
+
swipeAmount.x = xDelta;
|
|
3190
|
+
} else {
|
|
3191
|
+
const dampenedDelta = xDelta * getDampening(xDelta);
|
|
3192
|
+
swipeAmount.x = Math.abs(dampenedDelta) < Math.abs(xDelta) ? dampenedDelta : xDelta;
|
|
3193
|
+
}
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
if (Math.abs(swipeAmount.x) > 0 || Math.abs(swipeAmount.y) > 0) {
|
|
3197
|
+
setIsSwiped(true);
|
|
3198
|
+
}
|
|
3199
|
+
(_toastRef_current = toastRef.current) == null ? void 0 : _toastRef_current.style.setProperty("--swipe-amount-x", `${swipeAmount.x}px`);
|
|
3200
|
+
(_toastRef_current1 = toastRef.current) == null ? void 0 : _toastRef_current1.style.setProperty("--swipe-amount-y", `${swipeAmount.y}px`);
|
|
3201
|
+
}
|
|
3202
|
+
}, closeButton && !toast2.jsx && toastType !== "loading" ? /* @__PURE__ */ React5__namespace.default.createElement("button", {
|
|
3203
|
+
"aria-label": closeButtonAriaLabel,
|
|
3204
|
+
"data-disabled": disabled,
|
|
3205
|
+
"data-close-button": true,
|
|
3206
|
+
onClick: disabled || !dismissible ? () => {
|
|
3207
|
+
} : () => {
|
|
3208
|
+
deleteToast();
|
|
3209
|
+
toast2.onDismiss == null ? void 0 : toast2.onDismiss.call(toast2, toast2);
|
|
3210
|
+
},
|
|
3211
|
+
className: cn2(classNames == null ? void 0 : classNames.closeButton, toast2 == null ? void 0 : (_toast_classNames2 = toast2.classNames) == null ? void 0 : _toast_classNames2.closeButton)
|
|
3212
|
+
}, (_icons_close = icons == null ? void 0 : icons.close) != null ? _icons_close : CloseIcon) : null, (toastType || toast2.icon || toast2.promise) && toast2.icon !== null && ((icons == null ? void 0 : icons[toastType]) !== null || toast2.icon) ? /* @__PURE__ */ React5__namespace.default.createElement("div", {
|
|
3213
|
+
"data-icon": "",
|
|
3214
|
+
className: cn2(classNames == null ? void 0 : classNames.icon, toast2 == null ? void 0 : (_toast_classNames3 = toast2.classNames) == null ? void 0 : _toast_classNames3.icon)
|
|
3215
|
+
}, toast2.promise || toast2.type === "loading" && !toast2.icon ? toast2.icon || getLoadingIcon() : null, toast2.type !== "loading" ? icon : null) : null, /* @__PURE__ */ React5__namespace.default.createElement("div", {
|
|
3216
|
+
"data-content": "",
|
|
3217
|
+
className: cn2(classNames == null ? void 0 : classNames.content, toast2 == null ? void 0 : (_toast_classNames4 = toast2.classNames) == null ? void 0 : _toast_classNames4.content)
|
|
3218
|
+
}, /* @__PURE__ */ React5__namespace.default.createElement("div", {
|
|
3219
|
+
"data-title": "",
|
|
3220
|
+
className: cn2(classNames == null ? void 0 : classNames.title, toast2 == null ? void 0 : (_toast_classNames5 = toast2.classNames) == null ? void 0 : _toast_classNames5.title)
|
|
3221
|
+
}, toast2.jsx ? toast2.jsx : typeof toast2.title === "function" ? toast2.title() : toast2.title), toast2.description ? /* @__PURE__ */ React5__namespace.default.createElement("div", {
|
|
3222
|
+
"data-description": "",
|
|
3223
|
+
className: cn2(descriptionClassName, toastDescriptionClassname, classNames == null ? void 0 : classNames.description, toast2 == null ? void 0 : (_toast_classNames6 = toast2.classNames) == null ? void 0 : _toast_classNames6.description)
|
|
3224
|
+
}, typeof toast2.description === "function" ? toast2.description() : toast2.description) : null), /* @__PURE__ */ React5__namespace.default.isValidElement(toast2.cancel) ? toast2.cancel : toast2.cancel && isAction(toast2.cancel) ? /* @__PURE__ */ React5__namespace.default.createElement("button", {
|
|
3225
|
+
"data-button": true,
|
|
3226
|
+
"data-cancel": true,
|
|
3227
|
+
style: toast2.cancelButtonStyle || cancelButtonStyle,
|
|
3228
|
+
onClick: (event) => {
|
|
3229
|
+
if (!isAction(toast2.cancel)) return;
|
|
3230
|
+
if (!dismissible) return;
|
|
3231
|
+
toast2.cancel.onClick == null ? void 0 : toast2.cancel.onClick.call(toast2.cancel, event);
|
|
3232
|
+
deleteToast();
|
|
3233
|
+
},
|
|
3234
|
+
className: cn2(classNames == null ? void 0 : classNames.cancelButton, toast2 == null ? void 0 : (_toast_classNames7 = toast2.classNames) == null ? void 0 : _toast_classNames7.cancelButton)
|
|
3235
|
+
}, toast2.cancel.label) : null, /* @__PURE__ */ React5__namespace.default.isValidElement(toast2.action) ? toast2.action : toast2.action && isAction(toast2.action) ? /* @__PURE__ */ React5__namespace.default.createElement("button", {
|
|
3236
|
+
"data-button": true,
|
|
3237
|
+
"data-action": true,
|
|
3238
|
+
style: toast2.actionButtonStyle || actionButtonStyle,
|
|
3239
|
+
onClick: (event) => {
|
|
3240
|
+
if (!isAction(toast2.action)) return;
|
|
3241
|
+
toast2.action.onClick == null ? void 0 : toast2.action.onClick.call(toast2.action, event);
|
|
3242
|
+
if (event.defaultPrevented) return;
|
|
3243
|
+
deleteToast();
|
|
3244
|
+
},
|
|
3245
|
+
className: cn2(classNames == null ? void 0 : classNames.actionButton, toast2 == null ? void 0 : (_toast_classNames8 = toast2.classNames) == null ? void 0 : _toast_classNames8.actionButton)
|
|
3246
|
+
}, toast2.action.label) : null);
|
|
3247
|
+
};
|
|
3248
|
+
function getDocumentDirection() {
|
|
3249
|
+
if (typeof window === "undefined") return "ltr";
|
|
3250
|
+
if (typeof document === "undefined") return "ltr";
|
|
3251
|
+
const dirAttribute = document.documentElement.getAttribute("dir");
|
|
3252
|
+
if (dirAttribute === "auto" || !dirAttribute) {
|
|
3253
|
+
return window.getComputedStyle(document.documentElement).direction;
|
|
3254
|
+
}
|
|
3255
|
+
return dirAttribute;
|
|
3256
|
+
}
|
|
3257
|
+
function assignOffset(defaultOffset, mobileOffset) {
|
|
3258
|
+
const styles = {};
|
|
3259
|
+
[
|
|
3260
|
+
defaultOffset,
|
|
3261
|
+
mobileOffset
|
|
3262
|
+
].forEach((offset, index) => {
|
|
3263
|
+
const isMobile = index === 1;
|
|
3264
|
+
const prefix = isMobile ? "--mobile-offset" : "--offset";
|
|
3265
|
+
const defaultValue = isMobile ? MOBILE_VIEWPORT_OFFSET : VIEWPORT_OFFSET;
|
|
3266
|
+
function assignAll(offset2) {
|
|
3267
|
+
[
|
|
3268
|
+
"top",
|
|
3269
|
+
"right",
|
|
3270
|
+
"bottom",
|
|
3271
|
+
"left"
|
|
3272
|
+
].forEach((key) => {
|
|
3273
|
+
styles[`${prefix}-${key}`] = typeof offset2 === "number" ? `${offset2}px` : offset2;
|
|
3274
|
+
});
|
|
3275
|
+
}
|
|
3276
|
+
if (typeof offset === "number" || typeof offset === "string") {
|
|
3277
|
+
assignAll(offset);
|
|
3278
|
+
} else if (typeof offset === "object") {
|
|
3279
|
+
[
|
|
3280
|
+
"top",
|
|
3281
|
+
"right",
|
|
3282
|
+
"bottom",
|
|
3283
|
+
"left"
|
|
3284
|
+
].forEach((key) => {
|
|
3285
|
+
if (offset[key] === void 0) {
|
|
3286
|
+
styles[`${prefix}-${key}`] = defaultValue;
|
|
3287
|
+
} else {
|
|
3288
|
+
styles[`${prefix}-${key}`] = typeof offset[key] === "number" ? `${offset[key]}px` : offset[key];
|
|
3289
|
+
}
|
|
3290
|
+
});
|
|
3291
|
+
} else {
|
|
3292
|
+
assignAll(defaultValue);
|
|
3293
|
+
}
|
|
3294
|
+
});
|
|
3295
|
+
return styles;
|
|
3296
|
+
}
|
|
3297
|
+
var Toaster = /* @__PURE__ */ React5__namespace.default.forwardRef(function Toaster2(props, ref) {
|
|
3298
|
+
const { id, invert, position = "bottom-right", hotkey = [
|
|
3299
|
+
"altKey",
|
|
3300
|
+
"KeyT"
|
|
3301
|
+
], expand, closeButton, className, offset, mobileOffset, theme = "light", richColors, duration, style, visibleToasts = VISIBLE_TOASTS_AMOUNT, toastOptions, dir = getDocumentDirection(), gap = GAP, icons, containerAriaLabel = "Notifications" } = props;
|
|
3302
|
+
const [toasts, setToasts] = React5__namespace.default.useState([]);
|
|
3303
|
+
const filteredToasts = React5__namespace.default.useMemo(() => {
|
|
3304
|
+
if (id) {
|
|
3305
|
+
return toasts.filter((toast2) => toast2.toasterId === id);
|
|
3306
|
+
}
|
|
3307
|
+
return toasts.filter((toast2) => !toast2.toasterId);
|
|
3308
|
+
}, [
|
|
3309
|
+
toasts,
|
|
3310
|
+
id
|
|
3311
|
+
]);
|
|
3312
|
+
const possiblePositions = React5__namespace.default.useMemo(() => {
|
|
3313
|
+
return Array.from(new Set([
|
|
3314
|
+
position
|
|
3315
|
+
].concat(filteredToasts.filter((toast2) => toast2.position).map((toast2) => toast2.position))));
|
|
3316
|
+
}, [
|
|
3317
|
+
filteredToasts,
|
|
3318
|
+
position
|
|
3319
|
+
]);
|
|
3320
|
+
const [heights, setHeights] = React5__namespace.default.useState([]);
|
|
3321
|
+
const [expanded, setExpanded] = React5__namespace.default.useState(false);
|
|
3322
|
+
const [interacting, setInteracting] = React5__namespace.default.useState(false);
|
|
3323
|
+
const [actualTheme, setActualTheme] = React5__namespace.default.useState(theme !== "system" ? theme : typeof window !== "undefined" ? window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : "light");
|
|
3324
|
+
const listRef = React5__namespace.default.useRef(null);
|
|
3325
|
+
const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
|
|
3326
|
+
const lastFocusedElementRef = React5__namespace.default.useRef(null);
|
|
3327
|
+
const isFocusWithinRef = React5__namespace.default.useRef(false);
|
|
3328
|
+
const removeToast = React5__namespace.default.useCallback((toastToRemove) => {
|
|
3329
|
+
setToasts((toasts2) => {
|
|
3330
|
+
var _toasts_find;
|
|
3331
|
+
if (!((_toasts_find = toasts2.find((toast2) => toast2.id === toastToRemove.id)) == null ? void 0 : _toasts_find.delete)) {
|
|
3332
|
+
ToastState.dismiss(toastToRemove.id);
|
|
3333
|
+
}
|
|
3334
|
+
return toasts2.filter(({ id: id2 }) => id2 !== toastToRemove.id);
|
|
3335
|
+
});
|
|
3336
|
+
}, []);
|
|
3337
|
+
React5__namespace.default.useEffect(() => {
|
|
3338
|
+
return ToastState.subscribe((toast2) => {
|
|
3339
|
+
if (toast2.dismiss) {
|
|
3340
|
+
requestAnimationFrame(() => {
|
|
3341
|
+
setToasts((toasts2) => toasts2.map((t) => t.id === toast2.id ? {
|
|
3342
|
+
...t,
|
|
3343
|
+
delete: true
|
|
3344
|
+
} : t));
|
|
3345
|
+
});
|
|
3346
|
+
return;
|
|
3347
|
+
}
|
|
3348
|
+
setTimeout(() => {
|
|
3349
|
+
ReactDOM__default.default.flushSync(() => {
|
|
3350
|
+
setToasts((toasts2) => {
|
|
3351
|
+
const indexOfExistingToast = toasts2.findIndex((t) => t.id === toast2.id);
|
|
3352
|
+
if (indexOfExistingToast !== -1) {
|
|
3353
|
+
return [
|
|
3354
|
+
...toasts2.slice(0, indexOfExistingToast),
|
|
3355
|
+
{
|
|
3356
|
+
...toasts2[indexOfExistingToast],
|
|
3357
|
+
...toast2
|
|
3358
|
+
},
|
|
3359
|
+
...toasts2.slice(indexOfExistingToast + 1)
|
|
3360
|
+
];
|
|
3361
|
+
}
|
|
3362
|
+
return [
|
|
3363
|
+
toast2,
|
|
3364
|
+
...toasts2
|
|
3365
|
+
];
|
|
3366
|
+
});
|
|
3367
|
+
});
|
|
3368
|
+
});
|
|
3369
|
+
});
|
|
3370
|
+
}, [
|
|
3371
|
+
toasts
|
|
3372
|
+
]);
|
|
3373
|
+
React5__namespace.default.useEffect(() => {
|
|
3374
|
+
if (theme !== "system") {
|
|
3375
|
+
setActualTheme(theme);
|
|
3376
|
+
return;
|
|
3377
|
+
}
|
|
3378
|
+
if (theme === "system") {
|
|
3379
|
+
if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
|
3380
|
+
setActualTheme("dark");
|
|
3381
|
+
} else {
|
|
3382
|
+
setActualTheme("light");
|
|
3383
|
+
}
|
|
3384
|
+
}
|
|
3385
|
+
if (typeof window === "undefined") return;
|
|
3386
|
+
const darkMediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3387
|
+
try {
|
|
3388
|
+
darkMediaQuery.addEventListener("change", ({ matches }) => {
|
|
3389
|
+
if (matches) {
|
|
3390
|
+
setActualTheme("dark");
|
|
3391
|
+
} else {
|
|
3392
|
+
setActualTheme("light");
|
|
3393
|
+
}
|
|
3394
|
+
});
|
|
3395
|
+
} catch (error) {
|
|
3396
|
+
darkMediaQuery.addListener(({ matches }) => {
|
|
3397
|
+
try {
|
|
3398
|
+
if (matches) {
|
|
3399
|
+
setActualTheme("dark");
|
|
3400
|
+
} else {
|
|
3401
|
+
setActualTheme("light");
|
|
3402
|
+
}
|
|
3403
|
+
} catch (e) {
|
|
3404
|
+
console.error(e);
|
|
3405
|
+
}
|
|
3406
|
+
});
|
|
3407
|
+
}
|
|
3408
|
+
}, [
|
|
3409
|
+
theme
|
|
3410
|
+
]);
|
|
3411
|
+
React5__namespace.default.useEffect(() => {
|
|
3412
|
+
if (toasts.length <= 1) {
|
|
3413
|
+
setExpanded(false);
|
|
3414
|
+
}
|
|
3415
|
+
}, [
|
|
3416
|
+
toasts
|
|
3417
|
+
]);
|
|
3418
|
+
React5__namespace.default.useEffect(() => {
|
|
3419
|
+
const handleKeyDown = (event) => {
|
|
3420
|
+
var _listRef_current;
|
|
3421
|
+
const isHotkeyPressed = hotkey.every((key) => event[key] || event.code === key);
|
|
3422
|
+
if (isHotkeyPressed) {
|
|
3423
|
+
var _listRef_current1;
|
|
3424
|
+
setExpanded(true);
|
|
3425
|
+
(_listRef_current1 = listRef.current) == null ? void 0 : _listRef_current1.focus();
|
|
3426
|
+
}
|
|
3427
|
+
if (event.code === "Escape" && (document.activeElement === listRef.current || ((_listRef_current = listRef.current) == null ? void 0 : _listRef_current.contains(document.activeElement)))) {
|
|
3428
|
+
setExpanded(false);
|
|
3429
|
+
}
|
|
3430
|
+
};
|
|
3431
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
3432
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
3433
|
+
}, [
|
|
3434
|
+
hotkey
|
|
3435
|
+
]);
|
|
3436
|
+
React5__namespace.default.useEffect(() => {
|
|
3437
|
+
if (listRef.current) {
|
|
3438
|
+
return () => {
|
|
3439
|
+
if (lastFocusedElementRef.current) {
|
|
3440
|
+
lastFocusedElementRef.current.focus({
|
|
3441
|
+
preventScroll: true
|
|
3442
|
+
});
|
|
3443
|
+
lastFocusedElementRef.current = null;
|
|
3444
|
+
isFocusWithinRef.current = false;
|
|
3445
|
+
}
|
|
3446
|
+
};
|
|
2872
3447
|
}
|
|
3448
|
+
}, [
|
|
3449
|
+
listRef.current
|
|
3450
|
+
]);
|
|
3451
|
+
return (
|
|
3452
|
+
// Remove item from normal navigation flow, only available via hotkey
|
|
3453
|
+
/* @__PURE__ */ React5__namespace.default.createElement("section", {
|
|
3454
|
+
ref,
|
|
3455
|
+
"aria-label": `${containerAriaLabel} ${hotkeyLabel}`,
|
|
3456
|
+
tabIndex: -1,
|
|
3457
|
+
"aria-live": "polite",
|
|
3458
|
+
"aria-relevant": "additions text",
|
|
3459
|
+
"aria-atomic": "false",
|
|
3460
|
+
suppressHydrationWarning: true
|
|
3461
|
+
}, possiblePositions.map((position2, index) => {
|
|
3462
|
+
var _heights_;
|
|
3463
|
+
const [y, x] = position2.split("-");
|
|
3464
|
+
if (!filteredToasts.length) return null;
|
|
3465
|
+
return /* @__PURE__ */ React5__namespace.default.createElement("ol", {
|
|
3466
|
+
key: position2,
|
|
3467
|
+
dir: dir === "auto" ? getDocumentDirection() : dir,
|
|
3468
|
+
tabIndex: -1,
|
|
3469
|
+
ref: listRef,
|
|
3470
|
+
className,
|
|
3471
|
+
"data-sonner-toaster": true,
|
|
3472
|
+
"data-sonner-theme": actualTheme,
|
|
3473
|
+
"data-y-position": y,
|
|
3474
|
+
"data-x-position": x,
|
|
3475
|
+
style: {
|
|
3476
|
+
"--front-toast-height": `${((_heights_ = heights[0]) == null ? void 0 : _heights_.height) || 0}px`,
|
|
3477
|
+
"--width": `${TOAST_WIDTH}px`,
|
|
3478
|
+
"--gap": `${gap}px`,
|
|
3479
|
+
...style,
|
|
3480
|
+
...assignOffset(offset, mobileOffset)
|
|
3481
|
+
},
|
|
3482
|
+
onBlur: (event) => {
|
|
3483
|
+
if (isFocusWithinRef.current && !event.currentTarget.contains(event.relatedTarget)) {
|
|
3484
|
+
isFocusWithinRef.current = false;
|
|
3485
|
+
if (lastFocusedElementRef.current) {
|
|
3486
|
+
lastFocusedElementRef.current.focus({
|
|
3487
|
+
preventScroll: true
|
|
3488
|
+
});
|
|
3489
|
+
lastFocusedElementRef.current = null;
|
|
3490
|
+
}
|
|
3491
|
+
}
|
|
3492
|
+
},
|
|
3493
|
+
onFocus: (event) => {
|
|
3494
|
+
const isNotDismissible = event.target instanceof HTMLElement && event.target.dataset.dismissible === "false";
|
|
3495
|
+
if (isNotDismissible) return;
|
|
3496
|
+
if (!isFocusWithinRef.current) {
|
|
3497
|
+
isFocusWithinRef.current = true;
|
|
3498
|
+
lastFocusedElementRef.current = event.relatedTarget;
|
|
3499
|
+
}
|
|
3500
|
+
},
|
|
3501
|
+
onMouseEnter: () => setExpanded(true),
|
|
3502
|
+
onMouseMove: () => setExpanded(true),
|
|
3503
|
+
onMouseLeave: () => {
|
|
3504
|
+
if (!interacting) {
|
|
3505
|
+
setExpanded(false);
|
|
3506
|
+
}
|
|
3507
|
+
},
|
|
3508
|
+
onDragEnd: () => setExpanded(false),
|
|
3509
|
+
onPointerDown: (event) => {
|
|
3510
|
+
const isNotDismissible = event.target instanceof HTMLElement && event.target.dataset.dismissible === "false";
|
|
3511
|
+
if (isNotDismissible) return;
|
|
3512
|
+
setInteracting(true);
|
|
3513
|
+
},
|
|
3514
|
+
onPointerUp: () => setInteracting(false)
|
|
3515
|
+
}, filteredToasts.filter((toast2) => !toast2.position && index === 0 || toast2.position === position2).map((toast2, index2) => {
|
|
3516
|
+
var _toastOptions_duration, _toastOptions_closeButton;
|
|
3517
|
+
return /* @__PURE__ */ React5__namespace.default.createElement(Toast, {
|
|
3518
|
+
key: toast2.id,
|
|
3519
|
+
icons,
|
|
3520
|
+
index: index2,
|
|
3521
|
+
toast: toast2,
|
|
3522
|
+
defaultRichColors: richColors,
|
|
3523
|
+
duration: (_toastOptions_duration = toastOptions == null ? void 0 : toastOptions.duration) != null ? _toastOptions_duration : duration,
|
|
3524
|
+
className: toastOptions == null ? void 0 : toastOptions.className,
|
|
3525
|
+
descriptionClassName: toastOptions == null ? void 0 : toastOptions.descriptionClassName,
|
|
3526
|
+
invert,
|
|
3527
|
+
visibleToasts,
|
|
3528
|
+
closeButton: (_toastOptions_closeButton = toastOptions == null ? void 0 : toastOptions.closeButton) != null ? _toastOptions_closeButton : closeButton,
|
|
3529
|
+
interacting,
|
|
3530
|
+
position: position2,
|
|
3531
|
+
style: toastOptions == null ? void 0 : toastOptions.style,
|
|
3532
|
+
unstyled: toastOptions == null ? void 0 : toastOptions.unstyled,
|
|
3533
|
+
classNames: toastOptions == null ? void 0 : toastOptions.classNames,
|
|
3534
|
+
cancelButtonStyle: toastOptions == null ? void 0 : toastOptions.cancelButtonStyle,
|
|
3535
|
+
actionButtonStyle: toastOptions == null ? void 0 : toastOptions.actionButtonStyle,
|
|
3536
|
+
closeButtonAriaLabel: toastOptions == null ? void 0 : toastOptions.closeButtonAriaLabel,
|
|
3537
|
+
removeToast,
|
|
3538
|
+
toasts: filteredToasts.filter((t) => t.position == toast2.position),
|
|
3539
|
+
heights: heights.filter((h) => h.position == toast2.position),
|
|
3540
|
+
setHeights,
|
|
3541
|
+
expandByDefault: expand,
|
|
3542
|
+
gap,
|
|
3543
|
+
expanded,
|
|
3544
|
+
swipeDirections: props.swipeDirections
|
|
3545
|
+
});
|
|
3546
|
+
}));
|
|
3547
|
+
}))
|
|
2873
3548
|
);
|
|
2874
|
-
}
|
|
2875
|
-
var
|
|
3549
|
+
});
|
|
3550
|
+
var Toaster3 = ({ ...props }) => {
|
|
2876
3551
|
const { theme = "system" } = nextThemes.useTheme();
|
|
2877
3552
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2878
|
-
|
|
3553
|
+
Toaster,
|
|
2879
3554
|
{
|
|
2880
3555
|
theme,
|
|
2881
3556
|
className: "toaster group",
|
|
@@ -3219,158 +3894,6 @@ function ComboboxSeparator({
|
|
|
3219
3894
|
}
|
|
3220
3895
|
);
|
|
3221
3896
|
}
|
|
3222
|
-
function Command({
|
|
3223
|
-
className,
|
|
3224
|
-
...props
|
|
3225
|
-
}) {
|
|
3226
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3227
|
-
cmdk.Command,
|
|
3228
|
-
{
|
|
3229
|
-
"data-slot": "command",
|
|
3230
|
-
className: chunkJOVJRQO3_js.cn(
|
|
3231
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
3232
|
-
className
|
|
3233
|
-
),
|
|
3234
|
-
...props
|
|
3235
|
-
}
|
|
3236
|
-
);
|
|
3237
|
-
}
|
|
3238
|
-
function CommandDialog({
|
|
3239
|
-
title = "Command Palette",
|
|
3240
|
-
description = "Search for a command to run...",
|
|
3241
|
-
children,
|
|
3242
|
-
className,
|
|
3243
|
-
...props
|
|
3244
|
-
}) {
|
|
3245
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Dialog, { ...props, children: [
|
|
3246
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { className: "sr-only", children: [
|
|
3247
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: title }),
|
|
3248
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: description })
|
|
3249
|
-
] }),
|
|
3250
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3251
|
-
DialogContent,
|
|
3252
|
-
{
|
|
3253
|
-
className: chunkJOVJRQO3_js.cn("overflow-hidden p-0", className),
|
|
3254
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
3255
|
-
}
|
|
3256
|
-
)
|
|
3257
|
-
] });
|
|
3258
|
-
}
|
|
3259
|
-
function CommandInput({
|
|
3260
|
-
className,
|
|
3261
|
-
...props
|
|
3262
|
-
}) {
|
|
3263
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3264
|
-
"div",
|
|
3265
|
-
{
|
|
3266
|
-
"data-slot": "command-input-wrapper",
|
|
3267
|
-
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
3268
|
-
children: [
|
|
3269
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
3270
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3271
|
-
cmdk.Command.Input,
|
|
3272
|
-
{
|
|
3273
|
-
"data-slot": "command-input",
|
|
3274
|
-
className: chunkJOVJRQO3_js.cn(
|
|
3275
|
-
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
3276
|
-
className
|
|
3277
|
-
),
|
|
3278
|
-
...props
|
|
3279
|
-
}
|
|
3280
|
-
)
|
|
3281
|
-
]
|
|
3282
|
-
}
|
|
3283
|
-
);
|
|
3284
|
-
}
|
|
3285
|
-
function CommandList({
|
|
3286
|
-
className,
|
|
3287
|
-
...props
|
|
3288
|
-
}) {
|
|
3289
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3290
|
-
cmdk.Command.List,
|
|
3291
|
-
{
|
|
3292
|
-
"data-slot": "command-list",
|
|
3293
|
-
className: chunkJOVJRQO3_js.cn(
|
|
3294
|
-
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
3295
|
-
className
|
|
3296
|
-
),
|
|
3297
|
-
...props
|
|
3298
|
-
}
|
|
3299
|
-
);
|
|
3300
|
-
}
|
|
3301
|
-
function CommandEmpty({
|
|
3302
|
-
...props
|
|
3303
|
-
}) {
|
|
3304
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3305
|
-
cmdk.Command.Empty,
|
|
3306
|
-
{
|
|
3307
|
-
"data-slot": "command-empty",
|
|
3308
|
-
className: "py-6 text-center text-sm",
|
|
3309
|
-
...props
|
|
3310
|
-
}
|
|
3311
|
-
);
|
|
3312
|
-
}
|
|
3313
|
-
function CommandGroup({
|
|
3314
|
-
className,
|
|
3315
|
-
...props
|
|
3316
|
-
}) {
|
|
3317
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3318
|
-
cmdk.Command.Group,
|
|
3319
|
-
{
|
|
3320
|
-
"data-slot": "command-group",
|
|
3321
|
-
className: chunkJOVJRQO3_js.cn(
|
|
3322
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
3323
|
-
className
|
|
3324
|
-
),
|
|
3325
|
-
...props
|
|
3326
|
-
}
|
|
3327
|
-
);
|
|
3328
|
-
}
|
|
3329
|
-
function CommandSeparator({
|
|
3330
|
-
className,
|
|
3331
|
-
...props
|
|
3332
|
-
}) {
|
|
3333
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3334
|
-
cmdk.Command.Separator,
|
|
3335
|
-
{
|
|
3336
|
-
"data-slot": "command-separator",
|
|
3337
|
-
className: chunkJOVJRQO3_js.cn("-mx-1 h-px bg-border", className),
|
|
3338
|
-
...props
|
|
3339
|
-
}
|
|
3340
|
-
);
|
|
3341
|
-
}
|
|
3342
|
-
function CommandItem({
|
|
3343
|
-
className,
|
|
3344
|
-
...props
|
|
3345
|
-
}) {
|
|
3346
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3347
|
-
cmdk.Command.Item,
|
|
3348
|
-
{
|
|
3349
|
-
"data-slot": "command-item",
|
|
3350
|
-
className: chunkJOVJRQO3_js.cn(
|
|
3351
|
-
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
3352
|
-
className
|
|
3353
|
-
),
|
|
3354
|
-
...props
|
|
3355
|
-
}
|
|
3356
|
-
);
|
|
3357
|
-
}
|
|
3358
|
-
function CommandShortcut({
|
|
3359
|
-
className,
|
|
3360
|
-
...props
|
|
3361
|
-
}) {
|
|
3362
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3363
|
-
"span",
|
|
3364
|
-
{
|
|
3365
|
-
"data-slot": "command-shortcut",
|
|
3366
|
-
className: chunkJOVJRQO3_js.cn(
|
|
3367
|
-
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
3368
|
-
className
|
|
3369
|
-
),
|
|
3370
|
-
...props
|
|
3371
|
-
}
|
|
3372
|
-
);
|
|
3373
|
-
}
|
|
3374
3897
|
function DirectionProvider2({
|
|
3375
3898
|
dir,
|
|
3376
3899
|
direction,
|
|
@@ -3666,7 +4189,7 @@ function FieldError({
|
|
|
3666
4189
|
errors,
|
|
3667
4190
|
...props
|
|
3668
4191
|
}) {
|
|
3669
|
-
const content =
|
|
4192
|
+
const content = React5.useMemo(() => {
|
|
3670
4193
|
if (children) {
|
|
3671
4194
|
return children;
|
|
3672
4195
|
}
|
|
@@ -3698,7 +4221,7 @@ function FieldError({
|
|
|
3698
4221
|
);
|
|
3699
4222
|
}
|
|
3700
4223
|
var Form = reactHookForm.FormProvider;
|
|
3701
|
-
var FormFieldContext =
|
|
4224
|
+
var FormFieldContext = React5__namespace.createContext(
|
|
3702
4225
|
{}
|
|
3703
4226
|
);
|
|
3704
4227
|
var FormField = ({
|
|
@@ -3707,8 +4230,8 @@ var FormField = ({
|
|
|
3707
4230
|
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
|
|
3708
4231
|
};
|
|
3709
4232
|
var useFormField = () => {
|
|
3710
|
-
const fieldContext =
|
|
3711
|
-
const itemContext =
|
|
4233
|
+
const fieldContext = React5__namespace.useContext(FormFieldContext);
|
|
4234
|
+
const itemContext = React5__namespace.useContext(FormItemContext);
|
|
3712
4235
|
const { getFieldState } = reactHookForm.useFormContext();
|
|
3713
4236
|
const formState = reactHookForm.useFormState({ name: fieldContext.name });
|
|
3714
4237
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
@@ -3725,11 +4248,11 @@ var useFormField = () => {
|
|
|
3725
4248
|
...fieldState
|
|
3726
4249
|
};
|
|
3727
4250
|
};
|
|
3728
|
-
var FormItemContext =
|
|
4251
|
+
var FormItemContext = React5__namespace.createContext(
|
|
3729
4252
|
{}
|
|
3730
4253
|
);
|
|
3731
4254
|
function FormItem({ className, ...props }) {
|
|
3732
|
-
const id =
|
|
4255
|
+
const id = React5__namespace.useId();
|
|
3733
4256
|
return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3734
4257
|
"div",
|
|
3735
4258
|
{
|
|
@@ -4055,7 +4578,7 @@ function InputGroupButton({
|
|
|
4055
4578
|
...props
|
|
4056
4579
|
}) {
|
|
4057
4580
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4058
|
-
|
|
4581
|
+
chunkOYH6LQWR_js.Button,
|
|
4059
4582
|
{
|
|
4060
4583
|
type,
|
|
4061
4584
|
"data-size": size,
|
|
@@ -4109,61 +4632,6 @@ function InputGroupTextarea({
|
|
|
4109
4632
|
}
|
|
4110
4633
|
);
|
|
4111
4634
|
}
|
|
4112
|
-
function InputOTP({
|
|
4113
|
-
className,
|
|
4114
|
-
containerClassName,
|
|
4115
|
-
...props
|
|
4116
|
-
}) {
|
|
4117
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4118
|
-
inputOtp.OTPInput,
|
|
4119
|
-
{
|
|
4120
|
-
"data-slot": "input-otp",
|
|
4121
|
-
containerClassName: chunkJOVJRQO3_js.cn(
|
|
4122
|
-
"flex items-center gap-2 has-disabled:opacity-50",
|
|
4123
|
-
containerClassName
|
|
4124
|
-
),
|
|
4125
|
-
className: chunkJOVJRQO3_js.cn("disabled:cursor-not-allowed", className),
|
|
4126
|
-
...props
|
|
4127
|
-
}
|
|
4128
|
-
);
|
|
4129
|
-
}
|
|
4130
|
-
function InputOTPGroup({ className, ...props }) {
|
|
4131
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4132
|
-
"div",
|
|
4133
|
-
{
|
|
4134
|
-
"data-slot": "input-otp-group",
|
|
4135
|
-
className: chunkJOVJRQO3_js.cn("flex items-center", className),
|
|
4136
|
-
...props
|
|
4137
|
-
}
|
|
4138
|
-
);
|
|
4139
|
-
}
|
|
4140
|
-
function InputOTPSlot({
|
|
4141
|
-
index,
|
|
4142
|
-
className,
|
|
4143
|
-
...props
|
|
4144
|
-
}) {
|
|
4145
|
-
const inputOTPContext = React9__namespace.useContext(inputOtp.OTPInputContext);
|
|
4146
|
-
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
4147
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4148
|
-
"div",
|
|
4149
|
-
{
|
|
4150
|
-
"data-slot": "input-otp-slot",
|
|
4151
|
-
"data-active": isActive,
|
|
4152
|
-
className: chunkJOVJRQO3_js.cn(
|
|
4153
|
-
"relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-[3px] data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
|
|
4154
|
-
className
|
|
4155
|
-
),
|
|
4156
|
-
...props,
|
|
4157
|
-
children: [
|
|
4158
|
-
char,
|
|
4159
|
-
hasFakeCaret && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
4160
|
-
]
|
|
4161
|
-
}
|
|
4162
|
-
);
|
|
4163
|
-
}
|
|
4164
|
-
function InputOTPSeparator({ ...props }) {
|
|
4165
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MinusIcon, {}) });
|
|
4166
|
-
}
|
|
4167
4635
|
function ItemGroup({ className, ...props }) {
|
|
4168
4636
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4169
4637
|
"div",
|
|
@@ -4453,7 +4921,7 @@ function PaginationLink({
|
|
|
4453
4921
|
"data-slot": "pagination-link",
|
|
4454
4922
|
"data-active": isActive,
|
|
4455
4923
|
className: chunkJOVJRQO3_js.cn(
|
|
4456
|
-
|
|
4924
|
+
chunkOYH6LQWR_js.buttonVariants({
|
|
4457
4925
|
variant: isActive ? "outline" : "ghost",
|
|
4458
4926
|
size
|
|
4459
4927
|
}),
|
|
@@ -4517,43 +4985,6 @@ function PaginationEllipsis({
|
|
|
4517
4985
|
}
|
|
4518
4986
|
);
|
|
4519
4987
|
}
|
|
4520
|
-
function ResizablePanelGroup({
|
|
4521
|
-
className,
|
|
4522
|
-
...props
|
|
4523
|
-
}) {
|
|
4524
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4525
|
-
ResizablePrimitive__namespace.Group,
|
|
4526
|
-
{
|
|
4527
|
-
"data-slot": "resizable-panel-group",
|
|
4528
|
-
className: chunkJOVJRQO3_js.cn(
|
|
4529
|
-
"flex h-full w-full aria-[orientation=vertical]:flex-col",
|
|
4530
|
-
className
|
|
4531
|
-
),
|
|
4532
|
-
...props
|
|
4533
|
-
}
|
|
4534
|
-
);
|
|
4535
|
-
}
|
|
4536
|
-
function ResizablePanel({ ...props }) {
|
|
4537
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ResizablePrimitive__namespace.Panel, { "data-slot": "resizable-panel", ...props });
|
|
4538
|
-
}
|
|
4539
|
-
function ResizableHandle({
|
|
4540
|
-
withHandle,
|
|
4541
|
-
className,
|
|
4542
|
-
...props
|
|
4543
|
-
}) {
|
|
4544
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4545
|
-
ResizablePrimitive__namespace.Separator,
|
|
4546
|
-
{
|
|
4547
|
-
"data-slot": "resizable-handle",
|
|
4548
|
-
className: chunkJOVJRQO3_js.cn(
|
|
4549
|
-
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",
|
|
4550
|
-
className
|
|
4551
|
-
),
|
|
4552
|
-
...props,
|
|
4553
|
-
children: withHandle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GripVerticalIcon, { className: "size-2.5" }) })
|
|
4554
|
-
}
|
|
4555
|
-
);
|
|
4556
|
-
}
|
|
4557
4988
|
function Table({ className, ...props }) {
|
|
4558
4989
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4559
4990
|
"div",
|
|
@@ -4659,7 +5090,7 @@ function TableCaption({
|
|
|
4659
5090
|
var AnimatedTooltip = ({
|
|
4660
5091
|
items
|
|
4661
5092
|
}) => {
|
|
4662
|
-
const [hoveredIndex, setHoveredIndex] =
|
|
5093
|
+
const [hoveredIndex, setHoveredIndex] = React5.useState(null);
|
|
4663
5094
|
const springConfig = { stiffness: 100, damping: 5 };
|
|
4664
5095
|
const x = react.useMotionValue(0);
|
|
4665
5096
|
const rotate = react.useSpring(react.useTransform(x, [-100, 100], [-45, 45]), springConfig);
|
|
@@ -4727,11 +5158,11 @@ function TypewriterText({
|
|
|
4727
5158
|
onComplete,
|
|
4728
5159
|
className
|
|
4729
5160
|
}) {
|
|
4730
|
-
const [displayedWords, setDisplayedWords] =
|
|
4731
|
-
const [isComplete, setIsComplete] =
|
|
4732
|
-
const words =
|
|
4733
|
-
const timeoutRef =
|
|
4734
|
-
|
|
5161
|
+
const [displayedWords, setDisplayedWords] = React5.useState([]);
|
|
5162
|
+
const [isComplete, setIsComplete] = React5.useState(skipAnimation);
|
|
5163
|
+
const words = React5.useRef(text.split(" "));
|
|
5164
|
+
const timeoutRef = React5.useRef(null);
|
|
5165
|
+
React5.useEffect(() => {
|
|
4735
5166
|
words.current = text.split(" ");
|
|
4736
5167
|
if (skipAnimation) {
|
|
4737
5168
|
setDisplayedWords(words.current);
|
|
@@ -4769,9 +5200,9 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
4769
5200
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
4770
5201
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
4771
5202
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4772
|
-
var SidebarContext =
|
|
5203
|
+
var SidebarContext = React5__namespace.createContext(null);
|
|
4773
5204
|
function useSidebar() {
|
|
4774
|
-
const context =
|
|
5205
|
+
const context = React5__namespace.useContext(SidebarContext);
|
|
4775
5206
|
if (!context) {
|
|
4776
5207
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
4777
5208
|
}
|
|
@@ -4787,10 +5218,10 @@ function SidebarProvider({
|
|
|
4787
5218
|
...props
|
|
4788
5219
|
}) {
|
|
4789
5220
|
const isMobile = useIsMobile();
|
|
4790
|
-
const [openMobile, setOpenMobile] =
|
|
4791
|
-
const [_open, _setOpen] =
|
|
4792
|
-
const [hasHydrated, setHasHydrated] =
|
|
4793
|
-
|
|
5221
|
+
const [openMobile, setOpenMobile] = React5__namespace.useState(false);
|
|
5222
|
+
const [_open, _setOpen] = React5__namespace.useState(defaultOpenProp ?? true);
|
|
5223
|
+
const [hasHydrated, setHasHydrated] = React5__namespace.useState(false);
|
|
5224
|
+
React5__namespace.useEffect(() => {
|
|
4794
5225
|
if (openProp !== void 0 || defaultOpenProp !== void 0) {
|
|
4795
5226
|
setHasHydrated(true);
|
|
4796
5227
|
return;
|
|
@@ -4801,7 +5232,7 @@ function SidebarProvider({
|
|
|
4801
5232
|
}
|
|
4802
5233
|
setHasHydrated(true);
|
|
4803
5234
|
}, [openProp, defaultOpenProp]);
|
|
4804
|
-
|
|
5235
|
+
React5__namespace.useEffect(() => {
|
|
4805
5236
|
if (!hasHydrated) return;
|
|
4806
5237
|
if (openProp !== void 0 || defaultOpenProp !== void 0) return;
|
|
4807
5238
|
const hasCookie = document.cookie.includes(SIDEBAR_COOKIE_NAME);
|
|
@@ -4810,7 +5241,7 @@ function SidebarProvider({
|
|
|
4810
5241
|
}
|
|
4811
5242
|
}, [hasHydrated, isMobile, openProp, defaultOpenProp]);
|
|
4812
5243
|
const open = openProp ?? _open;
|
|
4813
|
-
const setOpen =
|
|
5244
|
+
const setOpen = React5__namespace.useCallback(
|
|
4814
5245
|
(value) => {
|
|
4815
5246
|
const openState = typeof value === "function" ? value(open) : value;
|
|
4816
5247
|
if (setOpenProp) {
|
|
@@ -4822,10 +5253,10 @@ function SidebarProvider({
|
|
|
4822
5253
|
},
|
|
4823
5254
|
[setOpenProp, open]
|
|
4824
5255
|
);
|
|
4825
|
-
const toggleSidebar =
|
|
5256
|
+
const toggleSidebar = React5__namespace.useCallback(() => {
|
|
4826
5257
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
4827
5258
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
4828
|
-
|
|
5259
|
+
React5__namespace.useEffect(() => {
|
|
4829
5260
|
const handleKeyDown = (event) => {
|
|
4830
5261
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
4831
5262
|
event.preventDefault();
|
|
@@ -4836,7 +5267,7 @@ function SidebarProvider({
|
|
|
4836
5267
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
4837
5268
|
}, [toggleSidebar]);
|
|
4838
5269
|
const state = open || openMobile ? "expanded" : "collapsed";
|
|
4839
|
-
const contextValue =
|
|
5270
|
+
const contextValue = React5__namespace.useMemo(
|
|
4840
5271
|
() => ({
|
|
4841
5272
|
state,
|
|
4842
5273
|
open,
|
|
@@ -4873,7 +5304,7 @@ function SidebarTrigger({
|
|
|
4873
5304
|
}) {
|
|
4874
5305
|
const { toggleSidebar } = useSidebar();
|
|
4875
5306
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4876
|
-
|
|
5307
|
+
chunkOYH6LQWR_js.Button,
|
|
4877
5308
|
{
|
|
4878
5309
|
"data-sidebar": "trigger",
|
|
4879
5310
|
"data-slot": "sidebar-trigger",
|
|
@@ -5294,7 +5725,7 @@ function SidebarMenuSkeleton({
|
|
|
5294
5725
|
showIcon = false,
|
|
5295
5726
|
...props
|
|
5296
5727
|
}) {
|
|
5297
|
-
const width =
|
|
5728
|
+
const width = React5__namespace.useMemo(() => {
|
|
5298
5729
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
5299
5730
|
}, []);
|
|
5300
5731
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5704,17 +6135,17 @@ function ScrollToTopButton({
|
|
|
5704
6135
|
className,
|
|
5705
6136
|
...sfProps
|
|
5706
6137
|
}) {
|
|
5707
|
-
const { animated, surface } =
|
|
5708
|
-
const [isVisible, setIsVisible] =
|
|
5709
|
-
const finalId =
|
|
5710
|
-
const getContainer =
|
|
6138
|
+
const { animated, surface } = chunkOYH6LQWR_js.useSaasflareProps(sfProps);
|
|
6139
|
+
const [isVisible, setIsVisible] = React5.useState(false);
|
|
6140
|
+
const finalId = React5.useMemo(() => scrollContainerId ?? null, [scrollContainerId]);
|
|
6141
|
+
const getContainer = React5.useCallback(() => {
|
|
5711
6142
|
if (finalId) {
|
|
5712
6143
|
const el = document.getElementById(finalId);
|
|
5713
6144
|
if (el) return el;
|
|
5714
6145
|
}
|
|
5715
6146
|
return window;
|
|
5716
6147
|
}, [finalId]);
|
|
5717
|
-
|
|
6148
|
+
React5.useEffect(() => {
|
|
5718
6149
|
const container = getContainer();
|
|
5719
6150
|
if (!container) return;
|
|
5720
6151
|
const getScrollTop = () => container instanceof Window ? window.scrollY : container.scrollTop;
|
|
@@ -5761,8 +6192,8 @@ function ThemeModeToggle({
|
|
|
5761
6192
|
className
|
|
5762
6193
|
}) {
|
|
5763
6194
|
const { theme, setTheme } = nextThemes.useTheme();
|
|
5764
|
-
const [mounted, setMounted] =
|
|
5765
|
-
|
|
6195
|
+
const [mounted, setMounted] = React5__namespace.useState(false);
|
|
6196
|
+
React5__namespace.useEffect(() => {
|
|
5766
6197
|
setMounted(true);
|
|
5767
6198
|
}, []);
|
|
5768
6199
|
if (!mounted) {
|
|
@@ -5772,7 +6203,7 @@ function ThemeModeToggle({
|
|
|
5772
6203
|
setTheme(theme === "dark" ? "light" : "dark");
|
|
5773
6204
|
};
|
|
5774
6205
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5775
|
-
|
|
6206
|
+
chunkOYH6LQWR_js.Button,
|
|
5776
6207
|
{
|
|
5777
6208
|
variant: "ghost",
|
|
5778
6209
|
size: showText ? "sm" : "icon",
|
|
@@ -5803,10 +6234,10 @@ function TopLoadingBarAnimated({
|
|
|
5803
6234
|
}) {
|
|
5804
6235
|
const pathname = navigation.usePathname();
|
|
5805
6236
|
const searchParams = navigation.useSearchParams();
|
|
5806
|
-
const [progress, setProgress] =
|
|
5807
|
-
const [visible, setVisible] =
|
|
5808
|
-
const trickleRef =
|
|
5809
|
-
|
|
6237
|
+
const [progress, setProgress] = React5.useState(0);
|
|
6238
|
+
const [visible, setVisible] = React5.useState(false);
|
|
6239
|
+
const trickleRef = React5.useRef(null);
|
|
6240
|
+
React5.useEffect(() => {
|
|
5810
6241
|
const start = setTimeout(() => {
|
|
5811
6242
|
setVisible(true);
|
|
5812
6243
|
setProgress(0.08);
|
|
@@ -5863,8 +6294,8 @@ function TopLoadingBarStatic({
|
|
|
5863
6294
|
}) {
|
|
5864
6295
|
const pathname = navigation.usePathname();
|
|
5865
6296
|
const searchParams = navigation.useSearchParams();
|
|
5866
|
-
const [pending, setPending] =
|
|
5867
|
-
|
|
6297
|
+
const [pending, setPending] = React5.useState(false);
|
|
6298
|
+
React5.useEffect(() => {
|
|
5868
6299
|
const startDelay = setTimeout(() => setPending(true), startDelayMs);
|
|
5869
6300
|
const finish = setTimeout(() => {
|
|
5870
6301
|
clearTimeout(startDelay);
|
|
@@ -5895,9 +6326,9 @@ function TopLoadingBar({
|
|
|
5895
6326
|
finishDelayMs,
|
|
5896
6327
|
...sfProps
|
|
5897
6328
|
}) {
|
|
5898
|
-
const { animated } =
|
|
6329
|
+
const { animated } = chunkOYH6LQWR_js.useSaasflareProps(sfProps);
|
|
5899
6330
|
if (!animated) {
|
|
5900
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6331
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React5.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5901
6332
|
TopLoadingBarStatic,
|
|
5902
6333
|
{
|
|
5903
6334
|
startDelayMs,
|
|
@@ -5905,7 +6336,7 @@ function TopLoadingBar({
|
|
|
5905
6336
|
}
|
|
5906
6337
|
) });
|
|
5907
6338
|
}
|
|
5908
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6339
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React5.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5909
6340
|
TopLoadingBarAnimated,
|
|
5910
6341
|
{
|
|
5911
6342
|
startDelayMs,
|
|
@@ -5927,79 +6358,119 @@ function UserAvatar({ src, name, initials, size = "md", className }) {
|
|
|
5927
6358
|
|
|
5928
6359
|
Object.defineProperty(exports, "Button", {
|
|
5929
6360
|
enumerable: true,
|
|
5930
|
-
get: function () { return
|
|
6361
|
+
get: function () { return chunkOYH6LQWR_js.Button; }
|
|
5931
6362
|
});
|
|
5932
6363
|
Object.defineProperty(exports, "SaasflareProvider", {
|
|
5933
6364
|
enumerable: true,
|
|
5934
|
-
get: function () { return
|
|
6365
|
+
get: function () { return chunkOYH6LQWR_js.SaasflareProvider; }
|
|
5935
6366
|
});
|
|
5936
6367
|
Object.defineProperty(exports, "SaasflareScript", {
|
|
5937
6368
|
enumerable: true,
|
|
5938
|
-
get: function () { return
|
|
6369
|
+
get: function () { return chunkOYH6LQWR_js.SaasflareScript; }
|
|
5939
6370
|
});
|
|
5940
6371
|
Object.defineProperty(exports, "SaasflareShell", {
|
|
5941
6372
|
enumerable: true,
|
|
5942
|
-
get: function () { return
|
|
6373
|
+
get: function () { return chunkOYH6LQWR_js.SaasflareShell; }
|
|
5943
6374
|
});
|
|
5944
6375
|
Object.defineProperty(exports, "SmoothScrollProvider", {
|
|
5945
6376
|
enumerable: true,
|
|
5946
|
-
get: function () { return
|
|
6377
|
+
get: function () { return chunkOYH6LQWR_js.SmoothScrollProvider; }
|
|
5947
6378
|
});
|
|
5948
6379
|
Object.defineProperty(exports, "buttonVariants", {
|
|
5949
6380
|
enumerable: true,
|
|
5950
|
-
get: function () { return
|
|
6381
|
+
get: function () { return chunkOYH6LQWR_js.buttonVariants; }
|
|
6382
|
+
});
|
|
6383
|
+
Object.defineProperty(exports, "useAnimation", {
|
|
6384
|
+
enumerable: true,
|
|
6385
|
+
get: function () { return chunkOYH6LQWR_js.useAnimation; }
|
|
6386
|
+
});
|
|
6387
|
+
Object.defineProperty(exports, "useSaasflareProps", {
|
|
6388
|
+
enumerable: true,
|
|
6389
|
+
get: function () { return chunkOYH6LQWR_js.useSaasflareProps; }
|
|
6390
|
+
});
|
|
6391
|
+
Object.defineProperty(exports, "useSaasflareTheme", {
|
|
6392
|
+
enumerable: true,
|
|
6393
|
+
get: function () { return chunkOYH6LQWR_js.useSaasflareTheme; }
|
|
6394
|
+
});
|
|
6395
|
+
Object.defineProperty(exports, "Dialog", {
|
|
6396
|
+
enumerable: true,
|
|
6397
|
+
get: function () { return chunkVQQ6MF5I_js.Dialog; }
|
|
6398
|
+
});
|
|
6399
|
+
Object.defineProperty(exports, "DialogClose", {
|
|
6400
|
+
enumerable: true,
|
|
6401
|
+
get: function () { return chunkVQQ6MF5I_js.DialogClose; }
|
|
6402
|
+
});
|
|
6403
|
+
Object.defineProperty(exports, "DialogContent", {
|
|
6404
|
+
enumerable: true,
|
|
6405
|
+
get: function () { return chunkVQQ6MF5I_js.DialogContent; }
|
|
6406
|
+
});
|
|
6407
|
+
Object.defineProperty(exports, "DialogDescription", {
|
|
6408
|
+
enumerable: true,
|
|
6409
|
+
get: function () { return chunkVQQ6MF5I_js.DialogDescription; }
|
|
6410
|
+
});
|
|
6411
|
+
Object.defineProperty(exports, "DialogFooter", {
|
|
6412
|
+
enumerable: true,
|
|
6413
|
+
get: function () { return chunkVQQ6MF5I_js.DialogFooter; }
|
|
6414
|
+
});
|
|
6415
|
+
Object.defineProperty(exports, "DialogHeader", {
|
|
6416
|
+
enumerable: true,
|
|
6417
|
+
get: function () { return chunkVQQ6MF5I_js.DialogHeader; }
|
|
6418
|
+
});
|
|
6419
|
+
Object.defineProperty(exports, "DialogOverlay", {
|
|
6420
|
+
enumerable: true,
|
|
6421
|
+
get: function () { return chunkVQQ6MF5I_js.DialogOverlay; }
|
|
6422
|
+
});
|
|
6423
|
+
Object.defineProperty(exports, "DialogPortal", {
|
|
6424
|
+
enumerable: true,
|
|
6425
|
+
get: function () { return chunkVQQ6MF5I_js.DialogPortal; }
|
|
6426
|
+
});
|
|
6427
|
+
Object.defineProperty(exports, "DialogTitle", {
|
|
6428
|
+
enumerable: true,
|
|
6429
|
+
get: function () { return chunkVQQ6MF5I_js.DialogTitle; }
|
|
6430
|
+
});
|
|
6431
|
+
Object.defineProperty(exports, "DialogTrigger", {
|
|
6432
|
+
enumerable: true,
|
|
6433
|
+
get: function () { return chunkVQQ6MF5I_js.DialogTrigger; }
|
|
5951
6434
|
});
|
|
5952
6435
|
Object.defineProperty(exports, "fadeIn", {
|
|
5953
6436
|
enumerable: true,
|
|
5954
|
-
get: function () { return
|
|
6437
|
+
get: function () { return chunkCWW36RYE_js.fadeIn; }
|
|
5955
6438
|
});
|
|
5956
6439
|
Object.defineProperty(exports, "noMotion", {
|
|
5957
6440
|
enumerable: true,
|
|
5958
|
-
get: function () { return
|
|
6441
|
+
get: function () { return chunkCWW36RYE_js.noMotion; }
|
|
5959
6442
|
});
|
|
5960
6443
|
Object.defineProperty(exports, "scaleIn", {
|
|
5961
6444
|
enumerable: true,
|
|
5962
|
-
get: function () { return
|
|
6445
|
+
get: function () { return chunkCWW36RYE_js.scaleIn; }
|
|
5963
6446
|
});
|
|
5964
6447
|
Object.defineProperty(exports, "slideDown", {
|
|
5965
6448
|
enumerable: true,
|
|
5966
|
-
get: function () { return
|
|
6449
|
+
get: function () { return chunkCWW36RYE_js.slideDown; }
|
|
5967
6450
|
});
|
|
5968
6451
|
Object.defineProperty(exports, "slideUp", {
|
|
5969
6452
|
enumerable: true,
|
|
5970
|
-
get: function () { return
|
|
6453
|
+
get: function () { return chunkCWW36RYE_js.slideUp; }
|
|
5971
6454
|
});
|
|
5972
6455
|
Object.defineProperty(exports, "spring", {
|
|
5973
6456
|
enumerable: true,
|
|
5974
|
-
get: function () { return
|
|
6457
|
+
get: function () { return chunkCWW36RYE_js.spring; }
|
|
5975
6458
|
});
|
|
5976
6459
|
Object.defineProperty(exports, "springBouncy", {
|
|
5977
6460
|
enumerable: true,
|
|
5978
|
-
get: function () { return
|
|
6461
|
+
get: function () { return chunkCWW36RYE_js.springBouncy; }
|
|
5979
6462
|
});
|
|
5980
6463
|
Object.defineProperty(exports, "springGentle", {
|
|
5981
6464
|
enumerable: true,
|
|
5982
|
-
get: function () { return
|
|
6465
|
+
get: function () { return chunkCWW36RYE_js.springGentle; }
|
|
5983
6466
|
});
|
|
5984
6467
|
Object.defineProperty(exports, "springStiff", {
|
|
5985
6468
|
enumerable: true,
|
|
5986
|
-
get: function () { return
|
|
5987
|
-
});
|
|
5988
|
-
Object.defineProperty(exports, "useAnimation", {
|
|
5989
|
-
enumerable: true,
|
|
5990
|
-
get: function () { return chunkO3CFRMDK_js.useAnimation; }
|
|
6469
|
+
get: function () { return chunkCWW36RYE_js.springStiff; }
|
|
5991
6470
|
});
|
|
5992
6471
|
Object.defineProperty(exports, "useReducedMotion", {
|
|
5993
6472
|
enumerable: true,
|
|
5994
|
-
get: function () { return
|
|
5995
|
-
});
|
|
5996
|
-
Object.defineProperty(exports, "useSaasflareProps", {
|
|
5997
|
-
enumerable: true,
|
|
5998
|
-
get: function () { return chunkO3CFRMDK_js.useSaasflareProps; }
|
|
5999
|
-
});
|
|
6000
|
-
Object.defineProperty(exports, "useSaasflareTheme", {
|
|
6001
|
-
enumerable: true,
|
|
6002
|
-
get: function () { return chunkO3CFRMDK_js.useSaasflareTheme; }
|
|
6473
|
+
get: function () { return chunkCWW36RYE_js.useReducedMotion; }
|
|
6003
6474
|
});
|
|
6004
6475
|
Object.defineProperty(exports, "cn", {
|
|
6005
6476
|
enumerable: true,
|
|
@@ -6042,8 +6513,6 @@ exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
|
6042
6513
|
exports.ButtonGroup = ButtonGroup;
|
|
6043
6514
|
exports.ButtonGroupSeparator = ButtonGroupSeparator;
|
|
6044
6515
|
exports.ButtonGroupText = ButtonGroupText;
|
|
6045
|
-
exports.Calendar = Calendar;
|
|
6046
|
-
exports.CalendarDayButton = CalendarDayButton;
|
|
6047
6516
|
exports.Card = Card;
|
|
6048
6517
|
exports.CardAction = CardAction;
|
|
6049
6518
|
exports.CardContent = CardContent;
|
|
@@ -6064,15 +6533,6 @@ exports.ComboboxItem = ComboboxItem;
|
|
|
6064
6533
|
exports.ComboboxList = ComboboxList;
|
|
6065
6534
|
exports.ComboboxSeparator = ComboboxSeparator;
|
|
6066
6535
|
exports.ComboboxTrigger = ComboboxTrigger;
|
|
6067
|
-
exports.Command = Command;
|
|
6068
|
-
exports.CommandDialog = CommandDialog;
|
|
6069
|
-
exports.CommandEmpty = CommandEmpty;
|
|
6070
|
-
exports.CommandGroup = CommandGroup;
|
|
6071
|
-
exports.CommandInput = CommandInput;
|
|
6072
|
-
exports.CommandItem = CommandItem;
|
|
6073
|
-
exports.CommandList = CommandList;
|
|
6074
|
-
exports.CommandSeparator = CommandSeparator;
|
|
6075
|
-
exports.CommandShortcut = CommandShortcut;
|
|
6076
6536
|
exports.ContextMenu = ContextMenu;
|
|
6077
6537
|
exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem;
|
|
6078
6538
|
exports.ContextMenuContent = ContextMenuContent;
|
|
@@ -6092,27 +6552,7 @@ exports.DataToolbar = DataToolbar;
|
|
|
6092
6552
|
exports.DataToolbarActions = DataToolbarActions;
|
|
6093
6553
|
exports.DataToolbarFilters = DataToolbarFilters;
|
|
6094
6554
|
exports.DataToolbarSearch = DataToolbarSearch;
|
|
6095
|
-
exports.Dialog = Dialog;
|
|
6096
|
-
exports.DialogClose = DialogClose;
|
|
6097
|
-
exports.DialogContent = DialogContent;
|
|
6098
|
-
exports.DialogDescription = DialogDescription;
|
|
6099
|
-
exports.DialogFooter = DialogFooter;
|
|
6100
|
-
exports.DialogHeader = DialogHeader;
|
|
6101
|
-
exports.DialogOverlay = DialogOverlay;
|
|
6102
|
-
exports.DialogPortal = DialogPortal;
|
|
6103
|
-
exports.DialogTitle = DialogTitle;
|
|
6104
|
-
exports.DialogTrigger = DialogTrigger;
|
|
6105
6555
|
exports.DirectionProvider = DirectionProvider2;
|
|
6106
|
-
exports.Drawer = Drawer;
|
|
6107
|
-
exports.DrawerClose = DrawerClose;
|
|
6108
|
-
exports.DrawerContent = DrawerContent;
|
|
6109
|
-
exports.DrawerDescription = DrawerDescription;
|
|
6110
|
-
exports.DrawerFooter = DrawerFooter;
|
|
6111
|
-
exports.DrawerHeader = DrawerHeader;
|
|
6112
|
-
exports.DrawerOverlay = DrawerOverlay;
|
|
6113
|
-
exports.DrawerPortal = DrawerPortal;
|
|
6114
|
-
exports.DrawerTitle = DrawerTitle;
|
|
6115
|
-
exports.DrawerTrigger = DrawerTrigger;
|
|
6116
6556
|
exports.DropdownMenu = DropdownMenu;
|
|
6117
6557
|
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
6118
6558
|
exports.DropdownMenuContent = DropdownMenuContent;
|
|
@@ -6163,10 +6603,6 @@ exports.InputGroupButton = InputGroupButton;
|
|
|
6163
6603
|
exports.InputGroupInput = InputGroupInput;
|
|
6164
6604
|
exports.InputGroupText = InputGroupText;
|
|
6165
6605
|
exports.InputGroupTextarea = InputGroupTextarea;
|
|
6166
|
-
exports.InputOTP = InputOTP;
|
|
6167
|
-
exports.InputOTPGroup = InputOTPGroup;
|
|
6168
|
-
exports.InputOTPSeparator = InputOTPSeparator;
|
|
6169
|
-
exports.InputOTPSlot = InputOTPSlot;
|
|
6170
6606
|
exports.Item = Item9;
|
|
6171
6607
|
exports.ItemActions = ItemActions;
|
|
6172
6608
|
exports.ItemContent = ItemContent;
|
|
@@ -6226,9 +6662,6 @@ exports.Progress = Progress;
|
|
|
6226
6662
|
exports.RADII = RADII;
|
|
6227
6663
|
exports.RadioGroup = RadioGroup4;
|
|
6228
6664
|
exports.RadioGroupItem = RadioGroupItem;
|
|
6229
|
-
exports.ResizableHandle = ResizableHandle;
|
|
6230
|
-
exports.ResizablePanel = ResizablePanel;
|
|
6231
|
-
exports.ResizablePanelGroup = ResizablePanelGroup;
|
|
6232
6665
|
exports.STYLES = STYLES;
|
|
6233
6666
|
exports.ScrollArea = ScrollArea;
|
|
6234
6667
|
exports.ScrollBar = ScrollBar;
|
|
@@ -6296,7 +6729,7 @@ exports.TabsList = TabsList;
|
|
|
6296
6729
|
exports.TabsTrigger = TabsTrigger;
|
|
6297
6730
|
exports.Textarea = Textarea;
|
|
6298
6731
|
exports.ThemeModeToggle = ThemeModeToggle;
|
|
6299
|
-
exports.Toaster =
|
|
6732
|
+
exports.Toaster = Toaster3;
|
|
6300
6733
|
exports.Toggle = Toggle;
|
|
6301
6734
|
exports.ToggleGroup = ToggleGroup;
|
|
6302
6735
|
exports.ToggleGroupItem = ToggleGroupItem;
|