@devalok/shilp-sutra 0.17.2 → 0.18.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/dist/_chunks/avatar.js +21 -19
- package/dist/_chunks/button-group.js +27 -0
- package/dist/_chunks/button.js +53 -35
- package/dist/_chunks/card.js +50 -0
- package/dist/_chunks/checkbox.js +11 -9
- package/dist/_chunks/date-utils.js +13 -0
- package/dist/_chunks/form.js +20 -20
- package/dist/_chunks/link-context.js +19 -0
- package/dist/_chunks/motion.js +1376 -0
- package/dist/_chunks/motion2.js +35 -0
- package/dist/_chunks/primitives.js +3499 -3920
- package/dist/_chunks/sidebar.js +225 -211
- package/dist/_chunks/spinner.js +58 -28
- package/dist/_chunks/tiptap.js +1 -1
- package/dist/_chunks/tooltip.js +27 -10
- package/dist/_chunks/tree-view.js +180 -178
- package/dist/_chunks/use-calendar.js +531 -515
- package/dist/_chunks/utils.js +3 -3
- package/dist/_chunks/vendor-client.js +1792 -1049
- package/dist/_chunks/vendor-utils.js +5123 -1169
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +71 -74
- package/dist/composed/avatar-group.js +36 -36
- package/dist/composed/command-palette.d.ts +1 -1
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +207 -158
- package/dist/composed/confirm-dialog.d.ts +3 -5
- package/dist/composed/confirm-dialog.d.ts.map +1 -1
- package/dist/composed/confirm-dialog.js +46 -41
- package/dist/composed/content-card.d.ts +1 -1
- package/dist/composed/content-card.js +29 -29
- package/dist/composed/date-picker/calendar-grid.d.ts +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/month-picker.d.ts +1 -1
- package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/presets.d.ts +1 -1
- package/dist/composed/date-picker/presets.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/year-picker.d.ts +1 -1
- package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
- package/dist/composed/empty-state.d.ts +1 -0
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +51 -47
- package/dist/composed/error-boundary.d.ts +1 -1
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +48 -48
- package/dist/composed/extensions/mention-suggestion.d.ts +1 -1
- package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -1
- package/dist/composed/global-loading.d.ts +1 -1
- package/dist/composed/global-loading.d.ts.map +1 -1
- package/dist/composed/global-loading.js +23 -20
- package/dist/composed/index.d.ts +2 -4
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +26 -29
- package/dist/composed/loading-skeleton.d.ts +1 -1
- package/dist/composed/loading-skeleton.d.ts.map +1 -1
- package/dist/composed/loading-skeleton.js +92 -87
- package/dist/composed/member-picker.d.ts +1 -1
- package/dist/composed/member-picker.d.ts.map +1 -1
- package/dist/composed/member-picker.js +47 -43
- package/dist/composed/page-header.js +36 -36
- package/dist/composed/page-skeletons.d.ts +9 -3
- package/dist/composed/page-skeletons.d.ts.map +1 -1
- package/dist/composed/page-skeletons.js +58 -58
- package/dist/composed/priority-indicator.js +19 -19
- package/dist/composed/rich-text-editor.d.ts +3 -3
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +316 -309
- package/dist/composed/schedule-view.js +88 -88
- package/dist/composed/simple-tooltip.d.ts +2 -5
- package/dist/composed/simple-tooltip.d.ts.map +1 -1
- package/dist/composed/simple-tooltip.js +19 -14
- package/dist/composed/status-badge.d.ts +2 -1
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +76 -63
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -4
- package/dist/hooks/use-toast.d.ts +15 -45
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/use-toast.js +2 -95
- package/dist/motion/index.d.ts +4 -0
- package/dist/motion/index.d.ts.map +1 -0
- package/dist/motion/index.js +10 -0
- package/dist/motion/motion-provider.d.ts +18 -0
- package/dist/motion/motion-provider.d.ts.map +1 -0
- package/dist/motion/motion-provider.js +24 -0
- package/dist/motion/primitives-index.d.ts +3 -0
- package/dist/motion/primitives-index.d.ts.map +1 -0
- package/dist/motion/primitives-index.js +11 -0
- package/dist/motion/primitives.d.ts +38 -0
- package/dist/motion/primitives.d.ts.map +1 -0
- package/dist/motion/primitives.js +187 -0
- package/dist/shell/app-command-palette.d.ts +14 -5
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +152 -130
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +90 -92
- package/dist/shell/command-registry.d.ts +23 -0
- package/dist/shell/command-registry.d.ts.map +1 -0
- package/dist/shell/command-registry.js +18 -0
- package/dist/shell/index.d.ts +2 -1
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +14 -11
- package/dist/shell/link-context.d.ts +6 -10
- package/dist/shell/link-context.d.ts.map +1 -1
- package/dist/shell/link-context.js +3 -16
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +137 -132
- package/dist/shell/notification-preferences.d.ts +10 -5
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +168 -165
- package/dist/shell/sidebar.js +119 -119
- package/dist/shell/top-bar.js +65 -65
- package/dist/tailwind/index.cjs +118 -297
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +118 -297
- package/dist/tokens/generate-scale.d.ts +86 -0
- package/dist/tokens/generate-scale.d.ts.map +1 -0
- package/dist/tokens/primitives.css +415 -187
- package/dist/tokens/semantic.css +244 -270
- package/dist/tokens/typography.css +6 -6
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +32 -22
- package/dist/ui/alert-dialog.d.ts +4 -1
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +114 -73
- package/dist/ui/alert.d.ts +6 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +64 -49
- package/dist/ui/aspect-ratio.d.ts +2 -1
- package/dist/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/ui/aspect-ratio.js +14 -4
- package/dist/ui/autocomplete.d.ts +11 -2
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +82 -57
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +45 -34
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +70 -65
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +53 -39
- package/dist/ui/breadcrumb.d.ts +2 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +21 -21
- package/dist/ui/button.d.ts +10 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +103 -67
- package/dist/ui/card.d.ts +2 -2
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +61 -53
- package/dist/ui/charts/_internal/animation.d.ts +1 -1
- package/dist/ui/charts/_internal/animation.d.ts.map +1 -1
- package/dist/ui/charts/area-chart.d.ts +3 -5
- package/dist/ui/charts/area-chart.d.ts.map +1 -1
- package/dist/ui/charts/bar-chart.d.ts +3 -5
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts +2 -5
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/gauge-chart.d.ts +3 -5
- package/dist/ui/charts/gauge-chart.d.ts.map +1 -1
- package/dist/ui/charts/index.js +1204 -1095
- package/dist/ui/charts/line-chart.d.ts +3 -5
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/charts/pie-chart.d.ts +2 -5
- package/dist/ui/charts/pie-chart.d.ts.map +1 -1
- package/dist/ui/charts/radar-chart.d.ts +3 -5
- package/dist/ui/charts/radar-chart.d.ts.map +1 -1
- package/dist/ui/charts/sparkline.d.ts +5 -5
- package/dist/ui/charts/sparkline.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +31 -19
- package/dist/ui/chip.d.ts +3 -2
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +62 -54
- package/dist/ui/code.js +16 -16
- package/dist/ui/collapsible.d.ts.map +1 -1
- package/dist/ui/collapsible.js +23 -15
- package/dist/ui/color-input.d.ts +1 -1
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +27 -27
- package/dist/ui/combobox.d.ts +2 -0
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +177 -166
- package/dist/ui/context-menu.d.ts +4 -2
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +146 -86
- package/dist/ui/data-table-toolbar.d.ts +3 -2
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +61 -59
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +289 -254
- package/dist/ui/dialog.d.ts +3 -1
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +114 -74
- package/dist/ui/dropdown-menu.d.ts +5 -3
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +150 -89
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +169 -127
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +29 -26
- package/dist/ui/hover-card.d.ts +1 -1
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +53 -21
- package/dist/ui/index.d.ts +18 -18
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +432 -449
- package/dist/ui/input-otp.d.ts +2 -0
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +7 -7
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +36 -34
- package/dist/ui/label.js +12 -12
- package/dist/ui/lib/date-utils.d.ts +6 -0
- package/dist/ui/lib/date-utils.d.ts.map +1 -0
- package/dist/ui/lib/index.d.ts +7 -0
- package/dist/ui/lib/index.d.ts.map +1 -0
- package/dist/ui/lib/link-context.d.ts +13 -0
- package/dist/ui/lib/link-context.d.ts.map +1 -0
- package/dist/ui/lib/motion.d.ts +44 -9
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/use-ripple.d.ts.map +1 -1
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/link.js +11 -11
- package/dist/ui/menubar.d.ts +4 -2
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +141 -97
- package/dist/ui/navigation-menu.d.ts +2 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +176 -73
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +56 -49
- package/dist/ui/pagination.js +22 -22
- package/dist/ui/popover.d.ts +2 -1
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +54 -22
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +58 -42
- package/dist/ui/radio.js +19 -19
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +28 -33
- package/dist/ui/segmented-control.d.ts +2 -2
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +143 -124
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +72 -61
- package/dist/ui/separator.js +11 -11
- package/dist/ui/sheet.d.ts +1 -1
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +111 -75
- package/dist/ui/sidebar.d.ts +6 -1
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +27 -25
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.d.ts +9 -0
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/slider.js +33 -27
- package/dist/ui/spinner.d.ts +32 -25
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/spinner.js +199 -40
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +183 -116
- package/dist/ui/stepper.d.ts +22 -1
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +121 -43
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +39 -26
- package/dist/ui/table.d.ts +3 -0
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +47 -47
- package/dist/ui/tabs.d.ts +4 -1
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +94 -44
- package/dist/ui/text.d.ts +3 -3
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +29 -27
- package/dist/ui/toast-types.d.ts +43 -0
- package/dist/ui/toast-types.d.ts.map +1 -0
- package/dist/ui/toast-types.js +2 -0
- package/dist/ui/toast.d.ts +60 -26
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +535 -89
- package/dist/ui/toaster.d.ts +19 -23
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js +31 -21
- package/dist/ui/toggle-group.d.ts +2 -2
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js +29 -26
- package/dist/ui/toggle.d.ts +2 -2
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +21 -17
- package/dist/ui/tooltip.d.ts +2 -1
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +58 -21
- package/dist/ui/tree-view/tree-view.d.ts +1 -1
- package/dist/ui/tree-view/tree-view.d.ts.map +1 -1
- package/llms-full.txt +221 -102
- package/llms.txt +65 -12
- package/package.json +26 -8
- package/dist/_chunks/switch.js +0 -10
- package/dist/composed/upload-progress.d.ts +0 -33
- package/dist/composed/upload-progress.d.ts.map +0 -1
- package/dist/composed/upload-progress.js +0 -386
- package/dist/ui/lib/use-reduced-motion.d.ts +0 -4
- package/dist/ui/lib/use-reduced-motion.d.ts.map +0 -1
- package/dist/ui/transitions.d.ts +0 -17
- package/dist/ui/transitions.d.ts.map +0 -1
- package/dist/ui/transitions.js +0 -111
package/dist/ui/toast.js
CHANGED
|
@@ -1,99 +1,545 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
import { jsx as s, jsxs as d } from "react/jsx-runtime";
|
|
3
|
+
import * as g from "react";
|
|
4
|
+
import { t as f } from "../_chunks/vendor-client.js";
|
|
5
|
+
import { IconInfoCircle as D, IconAlertTriangle as M, IconCircleX as O, IconCircleCheck as P, IconCheck as B, IconAlertCircle as U, IconPhoto as j, IconFile as L, IconRefresh as _, IconX as z, IconUpload as G } from "@tabler/icons-react";
|
|
6
|
+
import { c as b } from "../_chunks/utils.js";
|
|
7
|
+
import { s as p, t as y } from "../_chunks/motion2.js";
|
|
8
|
+
import { S as E } from "../_chunks/spinner.js";
|
|
9
|
+
import { Progress as X } from "./progress.js";
|
|
10
|
+
import { m as o, A as T } from "../_chunks/motion.js";
|
|
11
|
+
const k = 5e3, H = 8e3, $ = 3e3, F = {
|
|
12
|
+
message: {
|
|
13
|
+
accentClass: "",
|
|
14
|
+
iconClass: "",
|
|
15
|
+
icon: null,
|
|
16
|
+
timerBarClass: "bg-surface-border"
|
|
17
|
+
},
|
|
18
|
+
success: {
|
|
19
|
+
accentClass: "bg-success-9",
|
|
20
|
+
iconClass: "text-success-11",
|
|
21
|
+
icon: P,
|
|
22
|
+
timerBarClass: "bg-success-9"
|
|
23
|
+
},
|
|
24
|
+
error: {
|
|
25
|
+
accentClass: "bg-error-9",
|
|
26
|
+
iconClass: "text-error-11",
|
|
27
|
+
icon: O,
|
|
28
|
+
timerBarClass: "bg-error-9"
|
|
29
|
+
},
|
|
30
|
+
warning: {
|
|
31
|
+
accentClass: "bg-warning-9",
|
|
32
|
+
iconClass: "text-warning-11",
|
|
33
|
+
icon: M,
|
|
34
|
+
timerBarClass: "bg-warning-9"
|
|
35
|
+
},
|
|
36
|
+
info: {
|
|
37
|
+
accentClass: "bg-info-9",
|
|
38
|
+
iconClass: "text-info-11",
|
|
39
|
+
icon: D,
|
|
40
|
+
timerBarClass: "bg-info-9"
|
|
41
|
+
},
|
|
42
|
+
loading: {
|
|
43
|
+
accentClass: "bg-accent-9",
|
|
44
|
+
iconClass: "text-accent-11",
|
|
45
|
+
icon: null,
|
|
46
|
+
timerBarClass: "bg-accent-9"
|
|
17
47
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
48
|
+
};
|
|
49
|
+
function S({
|
|
50
|
+
duration: e,
|
|
51
|
+
type: t,
|
|
52
|
+
paused: a
|
|
53
|
+
}) {
|
|
54
|
+
const r = F[t];
|
|
55
|
+
return /* @__PURE__ */ s("div", { className: "absolute bottom-0 left-0 right-0 h-[2px] overflow-hidden", children: /* @__PURE__ */ s(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: b(
|
|
59
|
+
"h-full w-full origin-left opacity-30",
|
|
60
|
+
r.timerBarClass,
|
|
61
|
+
"motion-safe:animate-timer-bar"
|
|
62
|
+
),
|
|
63
|
+
style: {
|
|
64
|
+
animationDuration: `${e}ms`,
|
|
65
|
+
animationPlayState: a ? "paused" : "running"
|
|
30
66
|
}
|
|
31
|
-
},
|
|
32
|
-
defaultVariants: {
|
|
33
|
-
color: "neutral"
|
|
34
67
|
}
|
|
68
|
+
) });
|
|
69
|
+
}
|
|
70
|
+
function I({
|
|
71
|
+
type: e,
|
|
72
|
+
title: t,
|
|
73
|
+
description: a,
|
|
74
|
+
action: r,
|
|
75
|
+
cancel: n,
|
|
76
|
+
duration: i = k,
|
|
77
|
+
showTimerBar: w = !0,
|
|
78
|
+
selfDismissId: l
|
|
79
|
+
}) {
|
|
80
|
+
const [u, v] = g.useState(!1), h = F[e], C = h.icon, N = g.useRef(i), c = g.useRef(0);
|
|
81
|
+
return g.useEffect(() => {
|
|
82
|
+
if (l == null || i === 1 / 0) return;
|
|
83
|
+
if (u) {
|
|
84
|
+
const A = Date.now() - c.current;
|
|
85
|
+
N.current = Math.max(0, N.current - A);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
c.current = Date.now();
|
|
89
|
+
const R = setTimeout(() => {
|
|
90
|
+
f.dismiss(l);
|
|
91
|
+
}, N.current);
|
|
92
|
+
return () => clearTimeout(R);
|
|
93
|
+
}, [l, i, u]), /* @__PURE__ */ d(
|
|
94
|
+
o.div,
|
|
95
|
+
{
|
|
96
|
+
layout: "position",
|
|
97
|
+
role: "status",
|
|
98
|
+
"aria-live": "polite",
|
|
99
|
+
className: "group relative flex w-full overflow-hidden rounded-ds-md border border-surface-border-strong bg-surface-1 shadow-02",
|
|
100
|
+
onMouseEnter: () => v(!0),
|
|
101
|
+
onMouseLeave: () => v(!1),
|
|
102
|
+
transition: p.smooth,
|
|
103
|
+
children: [
|
|
104
|
+
h.accentClass && /* @__PURE__ */ s(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
className: b("w-1 shrink-0 rounded-l-ds-md", h.accentClass)
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ d("div", { className: "flex min-w-0 flex-1 items-start gap-ds-03 p-ds-04", children: [
|
|
111
|
+
/* @__PURE__ */ s(T, { mode: "wait", children: e === "loading" ? /* @__PURE__ */ s(
|
|
112
|
+
o.div,
|
|
113
|
+
{
|
|
114
|
+
initial: { opacity: 0, scale: 0.5 },
|
|
115
|
+
animate: { opacity: 1, scale: 1 },
|
|
116
|
+
exit: { opacity: 0, scale: 0.5 },
|
|
117
|
+
transition: y.fade,
|
|
118
|
+
className: "mt-0.5 shrink-0",
|
|
119
|
+
children: /* @__PURE__ */ s(E, { size: "sm", className: "h-4 w-4" })
|
|
120
|
+
},
|
|
121
|
+
"loading"
|
|
122
|
+
) : C ? /* @__PURE__ */ s(
|
|
123
|
+
o.div,
|
|
124
|
+
{
|
|
125
|
+
initial: { opacity: 0, scale: 0.5 },
|
|
126
|
+
animate: { opacity: 1, scale: 1 },
|
|
127
|
+
exit: { opacity: 0, scale: 0.5 },
|
|
128
|
+
transition: p.bouncy,
|
|
129
|
+
className: "mt-0.5 shrink-0",
|
|
130
|
+
children: /* @__PURE__ */ s(C, { className: b("h-4 w-4", h.iconClass) })
|
|
131
|
+
},
|
|
132
|
+
e
|
|
133
|
+
) : null }),
|
|
134
|
+
/* @__PURE__ */ d("div", { className: "min-w-0 flex-1", children: [
|
|
135
|
+
t && /* @__PURE__ */ s("p", { className: "text-ds-md font-semibold text-surface-fg", children: t }),
|
|
136
|
+
a && /* @__PURE__ */ s(
|
|
137
|
+
"p",
|
|
138
|
+
{
|
|
139
|
+
className: b(
|
|
140
|
+
"text-ds-sm text-surface-fg-muted",
|
|
141
|
+
t && "mt-0.5"
|
|
142
|
+
),
|
|
143
|
+
children: a
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
(r || n) && /* @__PURE__ */ d("div", { className: "mt-ds-03 flex items-center gap-ds-03", children: [
|
|
147
|
+
r && /* @__PURE__ */ s(
|
|
148
|
+
"button",
|
|
149
|
+
{
|
|
150
|
+
type: "button",
|
|
151
|
+
onClick: r.onClick,
|
|
152
|
+
className: "text-ds-sm font-medium text-accent-11 underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:rounded-ds-sm",
|
|
153
|
+
children: r.label
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
n && /* @__PURE__ */ s(
|
|
157
|
+
"button",
|
|
158
|
+
{
|
|
159
|
+
type: "button",
|
|
160
|
+
onClick: n.onClick,
|
|
161
|
+
className: "text-ds-sm text-surface-fg-muted hover:text-surface-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:rounded-ds-sm",
|
|
162
|
+
children: n.label
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
] })
|
|
166
|
+
] })
|
|
167
|
+
] }),
|
|
168
|
+
w && e !== "loading" && /* @__PURE__ */ s(S, { duration: i, type: e, paused: u })
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
const Y = /* @__PURE__ */ new Set([
|
|
174
|
+
"jpg",
|
|
175
|
+
"jpeg",
|
|
176
|
+
"png",
|
|
177
|
+
"gif",
|
|
178
|
+
"webp",
|
|
179
|
+
"svg",
|
|
180
|
+
"bmp",
|
|
181
|
+
"ico",
|
|
182
|
+
"avif"
|
|
183
|
+
]);
|
|
184
|
+
function K(e) {
|
|
185
|
+
var a;
|
|
186
|
+
if (e.previewUrl) return !0;
|
|
187
|
+
const t = ((a = e.name.split(".").pop()) == null ? void 0 : a.toLowerCase()) ?? "";
|
|
188
|
+
return Y.has(t);
|
|
189
|
+
}
|
|
190
|
+
function V(e) {
|
|
191
|
+
switch (e) {
|
|
192
|
+
case "complete":
|
|
193
|
+
return "success";
|
|
194
|
+
case "error":
|
|
195
|
+
return "error";
|
|
196
|
+
default:
|
|
197
|
+
return "default";
|
|
35
198
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
199
|
+
}
|
|
200
|
+
function W(e) {
|
|
201
|
+
switch (e.status) {
|
|
202
|
+
case "pending":
|
|
203
|
+
return 0;
|
|
204
|
+
case "uploading":
|
|
205
|
+
return e.progress ?? 0;
|
|
206
|
+
case "processing":
|
|
207
|
+
return;
|
|
208
|
+
case "complete":
|
|
209
|
+
return 100;
|
|
210
|
+
case "error":
|
|
211
|
+
return e.progress ?? 0;
|
|
44
212
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
213
|
+
}
|
|
214
|
+
function q(e) {
|
|
215
|
+
return !e || e < 0 || !Number.isFinite(e) ? "0 B" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(1)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
216
|
+
}
|
|
217
|
+
function J({
|
|
218
|
+
file: e,
|
|
219
|
+
onRetry: t,
|
|
220
|
+
onRemove: a
|
|
221
|
+
}) {
|
|
222
|
+
const r = e.status === "complete" || e.status === "error", n = e.status === "uploading" || e.status === "processing";
|
|
223
|
+
return /* @__PURE__ */ d(
|
|
224
|
+
o.div,
|
|
225
|
+
{
|
|
226
|
+
layout: !0,
|
|
227
|
+
className: "flex items-center gap-ds-02 py-1",
|
|
228
|
+
initial: !1,
|
|
229
|
+
animate: { opacity: 1, y: 0 },
|
|
230
|
+
exit: { opacity: 0, x: -20, height: 0 },
|
|
231
|
+
transition: p.snappy,
|
|
232
|
+
children: [
|
|
233
|
+
/* @__PURE__ */ s("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ s(T, { mode: "wait", children: e.status === "complete" ? /* @__PURE__ */ s(
|
|
234
|
+
o.div,
|
|
235
|
+
{
|
|
236
|
+
initial: { opacity: 0, scale: 0.5 },
|
|
237
|
+
animate: { opacity: 1, scale: 1 },
|
|
238
|
+
exit: { opacity: 0, scale: 0.5 },
|
|
239
|
+
transition: p.bouncy,
|
|
240
|
+
children: /* @__PURE__ */ s(B, { className: "h-3.5 w-3.5 text-success-11" })
|
|
241
|
+
},
|
|
242
|
+
"complete"
|
|
243
|
+
) : e.status === "error" ? /* @__PURE__ */ s(
|
|
244
|
+
o.div,
|
|
245
|
+
{
|
|
246
|
+
initial: { opacity: 0, scale: 0.5 },
|
|
247
|
+
animate: { opacity: 1, scale: 1 },
|
|
248
|
+
exit: { opacity: 0, scale: 0.5 },
|
|
249
|
+
transition: y.fade,
|
|
250
|
+
children: /* @__PURE__ */ s(U, { className: "h-3.5 w-3.5 text-error-11" })
|
|
251
|
+
},
|
|
252
|
+
"error"
|
|
253
|
+
) : e.status === "processing" ? /* @__PURE__ */ s(
|
|
254
|
+
o.div,
|
|
255
|
+
{
|
|
256
|
+
initial: { opacity: 0 },
|
|
257
|
+
animate: { opacity: 1 },
|
|
258
|
+
exit: { opacity: 0 },
|
|
259
|
+
transition: y.fade,
|
|
260
|
+
children: /* @__PURE__ */ s(E, { size: "sm", className: "h-3.5 w-3.5" })
|
|
261
|
+
},
|
|
262
|
+
"processing"
|
|
263
|
+
) : K(e) ? /* @__PURE__ */ s(
|
|
264
|
+
o.div,
|
|
265
|
+
{
|
|
266
|
+
initial: { opacity: 0 },
|
|
267
|
+
animate: { opacity: 1 },
|
|
268
|
+
exit: { opacity: 0 },
|
|
269
|
+
transition: y.fade,
|
|
270
|
+
children: /* @__PURE__ */ s(j, { className: "h-3.5 w-3.5 text-surface-fg-muted" })
|
|
271
|
+
},
|
|
272
|
+
"image"
|
|
273
|
+
) : /* @__PURE__ */ s(
|
|
274
|
+
o.div,
|
|
275
|
+
{
|
|
276
|
+
initial: { opacity: 0 },
|
|
277
|
+
animate: { opacity: 1 },
|
|
278
|
+
exit: { opacity: 0 },
|
|
279
|
+
transition: y.fade,
|
|
280
|
+
children: /* @__PURE__ */ s(L, { className: "h-3.5 w-3.5 text-surface-fg-muted" })
|
|
281
|
+
},
|
|
282
|
+
"file"
|
|
283
|
+
) }) }),
|
|
284
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1 truncate text-ds-xs text-surface-fg", children: e.name }),
|
|
285
|
+
n ? /* @__PURE__ */ d("div", { className: "flex w-16 items-center gap-1", children: [
|
|
286
|
+
/* @__PURE__ */ s(
|
|
287
|
+
X,
|
|
288
|
+
{
|
|
289
|
+
size: "sm",
|
|
290
|
+
color: V(e.status),
|
|
291
|
+
value: W(e),
|
|
292
|
+
className: "flex-1"
|
|
293
|
+
}
|
|
294
|
+
),
|
|
295
|
+
e.progress !== void 0 && /* @__PURE__ */ d("span", { className: "shrink-0 text-[10px] tabular-nums text-surface-fg-muted", children: [
|
|
296
|
+
e.progress,
|
|
297
|
+
"%"
|
|
298
|
+
] })
|
|
299
|
+
] }) : e.status === "complete" ? /* @__PURE__ */ s("span", { className: "text-[10px] text-success-11", children: "Done" }) : e.status === "error" ? /* @__PURE__ */ s("span", { className: "max-w-[60px] truncate text-[10px] text-error-11", children: e.error || "Failed" }) : /* @__PURE__ */ s("span", { className: "text-[10px] text-surface-fg-muted", children: q(e.size) }),
|
|
300
|
+
e.status === "error" && t && /* @__PURE__ */ s(
|
|
301
|
+
"button",
|
|
302
|
+
{
|
|
303
|
+
type: "button",
|
|
304
|
+
onClick: () => t(e.id),
|
|
305
|
+
className: "flex h-4 w-4 items-center justify-center rounded-ds-sm text-surface-fg-muted hover:text-surface-fg",
|
|
306
|
+
"aria-label": `Retry ${e.name}`,
|
|
307
|
+
children: /* @__PURE__ */ s(_, { className: "h-3 w-3" })
|
|
308
|
+
}
|
|
309
|
+
),
|
|
310
|
+
!r && a && /* @__PURE__ */ s(
|
|
311
|
+
"button",
|
|
312
|
+
{
|
|
313
|
+
type: "button",
|
|
314
|
+
onClick: () => a(e.id),
|
|
315
|
+
className: "flex h-4 w-4 items-center justify-center rounded-ds-sm text-surface-fg-muted hover:text-surface-fg",
|
|
316
|
+
"aria-label": `Cancel ${e.name}`,
|
|
317
|
+
children: /* @__PURE__ */ s(z, { className: "h-3 w-3" })
|
|
318
|
+
}
|
|
319
|
+
)
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
function Q({
|
|
325
|
+
files: e,
|
|
326
|
+
onRetry: t,
|
|
327
|
+
onRemove: a,
|
|
328
|
+
selfDismissId: r
|
|
329
|
+
}) {
|
|
330
|
+
const [n, i] = g.useState(!1), w = e.filter((c) => c.status === "complete").length, l = e.filter((c) => c.status === "error").length, u = e.every(
|
|
331
|
+
(c) => c.status === "complete" || c.status === "error"
|
|
332
|
+
), v = g.useRef($), h = g.useRef(0);
|
|
333
|
+
g.useEffect(() => {
|
|
334
|
+
if (r == null || !u) return;
|
|
335
|
+
if (n) {
|
|
336
|
+
const R = Date.now() - h.current;
|
|
337
|
+
v.current = Math.max(0, v.current - R);
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
h.current = Date.now();
|
|
341
|
+
const c = setTimeout(() => {
|
|
342
|
+
f.dismiss(r);
|
|
343
|
+
}, v.current);
|
|
344
|
+
return () => clearTimeout(c);
|
|
345
|
+
}, [r, u, n]);
|
|
346
|
+
const C = u ? l > 0 ? "bg-error-7" : "bg-success-7" : "bg-accent-9", N = u ? l > 0 ? "error" : "success" : "loading";
|
|
347
|
+
return /* @__PURE__ */ d(
|
|
348
|
+
o.div,
|
|
349
|
+
{
|
|
350
|
+
layout: !0,
|
|
351
|
+
role: "status",
|
|
352
|
+
"aria-live": "polite",
|
|
353
|
+
"aria-label": "File uploads",
|
|
354
|
+
className: "group relative flex w-full overflow-hidden rounded-ds-md border border-surface-border-strong bg-surface-1 shadow-02",
|
|
355
|
+
onMouseEnter: () => i(!0),
|
|
356
|
+
onMouseLeave: () => i(!1),
|
|
357
|
+
transition: p.smooth,
|
|
358
|
+
children: [
|
|
359
|
+
/* @__PURE__ */ s("div", { className: b("w-1 shrink-0 rounded-l-ds-md", C) }),
|
|
360
|
+
/* @__PURE__ */ d("div", { className: "min-w-0 flex-1 p-ds-04", children: [
|
|
361
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-ds-02", children: [
|
|
362
|
+
/* @__PURE__ */ s(T, { mode: "wait", children: u ? l > 0 ? /* @__PURE__ */ s(
|
|
363
|
+
o.div,
|
|
364
|
+
{
|
|
365
|
+
initial: { opacity: 0, scale: 0.5 },
|
|
366
|
+
animate: { opacity: 1, scale: 1 },
|
|
367
|
+
exit: { opacity: 0, scale: 0.5 },
|
|
368
|
+
transition: p.bouncy,
|
|
369
|
+
children: /* @__PURE__ */ s(U, { className: "h-4 w-4 shrink-0 text-error-11" })
|
|
370
|
+
},
|
|
371
|
+
"error-icon"
|
|
372
|
+
) : /* @__PURE__ */ s(
|
|
373
|
+
o.div,
|
|
374
|
+
{
|
|
375
|
+
initial: { opacity: 0, scale: 0.5 },
|
|
376
|
+
animate: { opacity: 1, scale: 1 },
|
|
377
|
+
exit: { opacity: 0, scale: 0.5 },
|
|
378
|
+
transition: p.bouncy,
|
|
379
|
+
children: /* @__PURE__ */ s(B, { className: "h-4 w-4 shrink-0 text-success-11" })
|
|
380
|
+
},
|
|
381
|
+
"success-icon"
|
|
382
|
+
) : /* @__PURE__ */ s(
|
|
383
|
+
o.div,
|
|
384
|
+
{
|
|
385
|
+
initial: { opacity: 0 },
|
|
386
|
+
animate: { opacity: 1 },
|
|
387
|
+
exit: { opacity: 0 },
|
|
388
|
+
transition: y.fade,
|
|
389
|
+
children: /* @__PURE__ */ s(G, { className: "h-4 w-4 shrink-0 text-surface-fg-muted" })
|
|
390
|
+
},
|
|
391
|
+
"upload-icon"
|
|
392
|
+
) }),
|
|
393
|
+
/* @__PURE__ */ s("p", { className: "text-ds-md font-semibold text-surface-fg", children: u ? l > 0 ? `${w} of ${e.length} uploaded` : `${e.length} file${e.length > 1 ? "s" : ""} uploaded` : `Uploading ${e.length} file${e.length > 1 ? "s" : ""}` })
|
|
394
|
+
] }),
|
|
395
|
+
!u && /* @__PURE__ */ d("p", { className: "mt-0.5 text-ds-xs text-surface-fg-muted", children: [
|
|
396
|
+
w,
|
|
397
|
+
" of ",
|
|
398
|
+
e.length,
|
|
399
|
+
" complete",
|
|
400
|
+
l > 0 && ` · ${l} failed`
|
|
401
|
+
] }),
|
|
402
|
+
/* @__PURE__ */ s("div", { className: "mt-ds-02 max-h-[140px] overflow-y-auto", children: /* @__PURE__ */ s(T, { children: e.map((c) => /* @__PURE__ */ s(
|
|
403
|
+
J,
|
|
404
|
+
{
|
|
405
|
+
file: c,
|
|
406
|
+
onRetry: t,
|
|
407
|
+
onRemove: a
|
|
408
|
+
},
|
|
409
|
+
c.id
|
|
410
|
+
)) }) }),
|
|
411
|
+
/* @__PURE__ */ d("div", { className: "sr-only", "aria-live": "polite", children: [
|
|
412
|
+
w,
|
|
413
|
+
" of ",
|
|
414
|
+
e.length,
|
|
415
|
+
" files uploaded",
|
|
416
|
+
l > 0 && `, ${l} failed`
|
|
417
|
+
] })
|
|
418
|
+
] }),
|
|
419
|
+
u && /* @__PURE__ */ s(
|
|
420
|
+
S,
|
|
421
|
+
{
|
|
422
|
+
duration: $,
|
|
423
|
+
type: N,
|
|
424
|
+
paused: !1
|
|
425
|
+
}
|
|
426
|
+
)
|
|
427
|
+
]
|
|
428
|
+
}
|
|
429
|
+
);
|
|
430
|
+
}
|
|
431
|
+
function Z(e, t) {
|
|
432
|
+
return {
|
|
433
|
+
id: e == null ? void 0 : e.id,
|
|
434
|
+
duration: (e == null ? void 0 : e.duration) ?? t ?? k,
|
|
435
|
+
unstyled: !0,
|
|
436
|
+
classNames: { toast: "w-full" }
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
function x(e, t, a) {
|
|
440
|
+
const r = (a == null ? void 0 : a.duration) ?? k;
|
|
441
|
+
return f.custom(
|
|
442
|
+
() => /* @__PURE__ */ s(
|
|
443
|
+
I,
|
|
444
|
+
{
|
|
445
|
+
type: e,
|
|
446
|
+
title: t,
|
|
447
|
+
description: a == null ? void 0 : a.description,
|
|
448
|
+
action: a == null ? void 0 : a.action,
|
|
449
|
+
cancel: a == null ? void 0 : a.cancel,
|
|
450
|
+
duration: r
|
|
451
|
+
}
|
|
54
452
|
),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
453
|
+
Z(a, r)
|
|
454
|
+
);
|
|
455
|
+
}
|
|
456
|
+
function m(e, t) {
|
|
457
|
+
return x("message", e, t);
|
|
458
|
+
}
|
|
459
|
+
m.message = (e, t) => x("message", e, t);
|
|
460
|
+
m.success = (e, t) => x("success", e, t);
|
|
461
|
+
m.error = (e, t) => x("error", e, t);
|
|
462
|
+
m.warning = (e, t) => x("warning", e, t);
|
|
463
|
+
m.info = (e, t) => x("info", e, t);
|
|
464
|
+
m.loading = (e, t) => x("loading", e, {
|
|
465
|
+
...t,
|
|
466
|
+
duration: (t == null ? void 0 : t.duration) ?? 1 / 0
|
|
467
|
+
});
|
|
468
|
+
m.promise = (e, t) => {
|
|
469
|
+
const a = f.custom(
|
|
470
|
+
() => /* @__PURE__ */ s(I, { type: "loading", title: t.loading, showTimerBar: !1 }),
|
|
471
|
+
{ duration: 1 / 0, unstyled: !0, classNames: { toast: "w-full" } }
|
|
472
|
+
), r = (n, i) => {
|
|
473
|
+
f.custom(
|
|
474
|
+
() => /* @__PURE__ */ s(
|
|
475
|
+
I,
|
|
476
|
+
{
|
|
477
|
+
type: n,
|
|
478
|
+
title: i,
|
|
479
|
+
duration: k,
|
|
480
|
+
selfDismissId: a
|
|
481
|
+
}
|
|
482
|
+
),
|
|
483
|
+
{ id: a, duration: 1 / 0, unstyled: !0, classNames: { toast: "w-full" } }
|
|
484
|
+
);
|
|
485
|
+
};
|
|
486
|
+
return e.then((n) => {
|
|
487
|
+
const i = typeof t.success == "function" ? t.success(n) : t.success;
|
|
488
|
+
r("success", i);
|
|
489
|
+
}).catch((n) => {
|
|
490
|
+
const i = typeof t.error == "function" ? t.error(n) : t.error;
|
|
491
|
+
r("error", i);
|
|
492
|
+
}), a;
|
|
493
|
+
};
|
|
494
|
+
m.undo = (e, t) => {
|
|
495
|
+
const a = t.duration ?? H;
|
|
496
|
+
return f.custom(
|
|
497
|
+
() => /* @__PURE__ */ s(
|
|
498
|
+
I,
|
|
499
|
+
{
|
|
500
|
+
type: "message",
|
|
501
|
+
title: e,
|
|
502
|
+
description: t.description,
|
|
503
|
+
action: { label: "Undo", onClick: t.onUndo },
|
|
504
|
+
duration: a
|
|
505
|
+
}
|
|
66
506
|
),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
));
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
507
|
+
{ duration: a, unstyled: !0, classNames: { toast: "w-full" } }
|
|
508
|
+
);
|
|
509
|
+
};
|
|
510
|
+
m.upload = (e) => {
|
|
511
|
+
const t = e.id ?? String(Date.now());
|
|
512
|
+
return f.custom(
|
|
513
|
+
() => /* @__PURE__ */ s(
|
|
514
|
+
Q,
|
|
515
|
+
{
|
|
516
|
+
files: e.files,
|
|
517
|
+
onRetry: e.onRetry,
|
|
518
|
+
onRemove: e.onRemove,
|
|
519
|
+
selfDismissId: t
|
|
520
|
+
}
|
|
521
|
+
),
|
|
522
|
+
{
|
|
523
|
+
id: t,
|
|
524
|
+
duration: 1 / 0,
|
|
525
|
+
unstyled: !0,
|
|
526
|
+
classNames: { toast: "w-full" }
|
|
527
|
+
}
|
|
528
|
+
), t;
|
|
529
|
+
};
|
|
530
|
+
m.custom = (e, t) => f.custom(e, {
|
|
531
|
+
...t,
|
|
532
|
+
unstyled: !0,
|
|
533
|
+
classNames: { toast: "w-full", ...t == null ? void 0 : t.classNames }
|
|
534
|
+
});
|
|
535
|
+
m.dismiss = (e) => {
|
|
536
|
+
e !== void 0 ? f.dismiss(e) : f.dismiss();
|
|
537
|
+
};
|
|
91
538
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
b as ToastViewport
|
|
539
|
+
S as TimerBar,
|
|
540
|
+
I as ToastContent,
|
|
541
|
+
J as UploadFileRow,
|
|
542
|
+
Q as UploadToastContent,
|
|
543
|
+
q as formatFileSize,
|
|
544
|
+
m as toast
|
|
99
545
|
};
|