@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/file-upload.js
CHANGED
|
@@ -1,227 +1,269 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import * as r from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { IconPaperclip as X, IconCheck as Z, IconUpload as q } from "@tabler/icons-react";
|
|
5
5
|
import { c as h } from "../_chunks/utils.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { s as D, t as N } from "../_chunks/motion2.js";
|
|
7
|
+
import { S as B } from "../_chunks/spinner.js";
|
|
8
|
+
import { m as c, A as M } from "../_chunks/motion.js";
|
|
9
|
+
const G = 10 * 1024 * 1024;
|
|
10
|
+
function H(a, l) {
|
|
11
|
+
return l.split(",").map((i) => i.trim()).some((i) => i.startsWith(".") ? a.name.toLowerCase().endsWith(i.toLowerCase()) : i.endsWith("/*") ? a.type.startsWith(i.slice(0, i.indexOf("/") + 1)) : a.type === i);
|
|
9
12
|
}
|
|
10
|
-
function
|
|
11
|
-
return
|
|
13
|
+
function U(a) {
|
|
14
|
+
return a < 1024 ? `${a} B` : a < 1024 * 1024 ? `${(a / 1024).toFixed(1)} KB` : `${(a / (1024 * 1024)).toFixed(1)} MB`;
|
|
12
15
|
}
|
|
13
|
-
const
|
|
16
|
+
const J = r.forwardRef(
|
|
14
17
|
({
|
|
15
|
-
accept:
|
|
16
|
-
maxSize: l =
|
|
17
|
-
multiple:
|
|
18
|
-
uploading:
|
|
19
|
-
progress:
|
|
20
|
-
onFiles:
|
|
21
|
-
error:
|
|
22
|
-
compact:
|
|
23
|
-
disabled:
|
|
24
|
-
className:
|
|
25
|
-
label:
|
|
26
|
-
sublabel:
|
|
27
|
-
...
|
|
28
|
-
},
|
|
29
|
-
const
|
|
18
|
+
accept: a,
|
|
19
|
+
maxSize: l = G,
|
|
20
|
+
multiple: i = !1,
|
|
21
|
+
uploading: o = !1,
|
|
22
|
+
progress: x = 0,
|
|
23
|
+
onFiles: A,
|
|
24
|
+
error: I,
|
|
25
|
+
compact: W = !1,
|
|
26
|
+
disabled: s = !1,
|
|
27
|
+
className: F,
|
|
28
|
+
label: v,
|
|
29
|
+
sublabel: j,
|
|
30
|
+
...E
|
|
31
|
+
}, L) => {
|
|
32
|
+
const y = r.useRef(null), [b, d] = r.useState(!1), [S, f] = r.useState(
|
|
30
33
|
null
|
|
31
|
-
),
|
|
34
|
+
), g = r.useRef(!1), k = r.useRef(!1), u = I || S, C = r.useCallback(() => {
|
|
32
35
|
var e;
|
|
33
|
-
|
|
34
|
-
}, [
|
|
36
|
+
s || o || (e = y.current) == null || e.click();
|
|
37
|
+
}, [s, o]), m = r.useCallback(
|
|
35
38
|
(e) => {
|
|
36
|
-
|
|
37
|
-
for (const
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
`File "${
|
|
39
|
+
f(null);
|
|
40
|
+
for (const n of e) {
|
|
41
|
+
if (n.size > l) {
|
|
42
|
+
f(
|
|
43
|
+
`File "${n.name}" exceeds the maximum size of ${U(l)}`
|
|
41
44
|
);
|
|
42
45
|
return;
|
|
43
46
|
}
|
|
44
|
-
if (
|
|
45
|
-
|
|
46
|
-
`File "${
|
|
47
|
+
if (a && !H(n, a)) {
|
|
48
|
+
f(
|
|
49
|
+
`File "${n.name}" is not an accepted file type`
|
|
47
50
|
);
|
|
48
51
|
return;
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
|
-
|
|
54
|
+
A(e);
|
|
52
55
|
},
|
|
53
|
-
[l,
|
|
54
|
-
),
|
|
56
|
+
[l, a, A]
|
|
57
|
+
), R = r.useCallback(
|
|
55
58
|
(e) => {
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
!
|
|
59
|
+
k.current = !0;
|
|
60
|
+
const n = e.target.files;
|
|
61
|
+
!n || n.length === 0 || (m(Array.from(n)), e.target.value = "");
|
|
59
62
|
},
|
|
60
|
-
[
|
|
61
|
-
),
|
|
62
|
-
|
|
63
|
-
}, []),
|
|
64
|
-
|
|
65
|
-
}, [
|
|
63
|
+
[m]
|
|
64
|
+
), $ = r.useCallback(() => {
|
|
65
|
+
g.current = !0, k.current = !1;
|
|
66
|
+
}, []), P = r.useCallback(() => {
|
|
67
|
+
g.current && !k.current && a && f("File type is not accepted"), g.current = !1;
|
|
68
|
+
}, [a]), z = r.useCallback(
|
|
66
69
|
(e) => {
|
|
67
|
-
e.preventDefault(), e.stopPropagation(), !
|
|
70
|
+
e.preventDefault(), e.stopPropagation(), !s && !o && d(!0);
|
|
68
71
|
},
|
|
69
|
-
[
|
|
70
|
-
),
|
|
72
|
+
[s, o]
|
|
73
|
+
), K = r.useCallback(
|
|
71
74
|
(e) => {
|
|
72
|
-
e.preventDefault(), e.stopPropagation(), !
|
|
75
|
+
e.preventDefault(), e.stopPropagation(), !s && !o && d(!0);
|
|
73
76
|
},
|
|
74
|
-
[
|
|
75
|
-
),
|
|
77
|
+
[s, o]
|
|
78
|
+
), T = r.useCallback(
|
|
76
79
|
(e) => {
|
|
77
|
-
e.preventDefault(), e.stopPropagation(),
|
|
80
|
+
e.preventDefault(), e.stopPropagation(), d(!1);
|
|
78
81
|
},
|
|
79
82
|
[]
|
|
80
|
-
),
|
|
83
|
+
), _ = r.useCallback(
|
|
81
84
|
(e) => {
|
|
82
|
-
if (e.preventDefault(), e.stopPropagation(),
|
|
83
|
-
const
|
|
84
|
-
!
|
|
85
|
+
if (e.preventDefault(), e.stopPropagation(), d(!1), s || o) return;
|
|
86
|
+
const n = e.dataTransfer.files;
|
|
87
|
+
!n || n.length === 0 || m(Array.from(n));
|
|
85
88
|
},
|
|
86
|
-
[
|
|
87
|
-
),
|
|
88
|
-
return
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
[s, o, m]
|
|
90
|
+
), O = v ?? "Drop files here or click to browse", V = j ?? `Max file size: ${U(l)}`, w = r.useId();
|
|
91
|
+
return W ? /* @__PURE__ */ p("div", { ref: L, className: h("inline-flex flex-col", F), ...E, children: [
|
|
92
|
+
/* @__PURE__ */ p(
|
|
90
93
|
"button",
|
|
91
94
|
{
|
|
92
95
|
type: "button",
|
|
93
|
-
onClick:
|
|
94
|
-
disabled:
|
|
96
|
+
onClick: C,
|
|
97
|
+
disabled: s,
|
|
95
98
|
className: h(
|
|
96
99
|
"inline-flex items-center gap-ds-02 rounded-ds-md px-ds-03 py-ds-02",
|
|
97
100
|
"text-ds-sm font-medium",
|
|
98
|
-
"border border-border",
|
|
99
|
-
"bg-
|
|
100
|
-
"hover:bg-
|
|
101
|
-
"disabled:opacity-
|
|
101
|
+
"border border-surface-border-strong",
|
|
102
|
+
"bg-surface-3 text-surface-fg-muted",
|
|
103
|
+
"hover:bg-accent-2",
|
|
104
|
+
"disabled:opacity-action-disabled disabled:cursor-not-allowed",
|
|
102
105
|
"transition-colors"
|
|
103
106
|
),
|
|
104
107
|
children: [
|
|
105
|
-
|
|
106
|
-
|
|
108
|
+
o ? /* @__PURE__ */ t(B, { size: "sm" }) : /* @__PURE__ */ t(X, { className: "h-ico-sm w-ico-sm" }),
|
|
109
|
+
v ?? "Attach files"
|
|
107
110
|
]
|
|
108
111
|
}
|
|
109
112
|
),
|
|
110
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ t(
|
|
111
114
|
"input",
|
|
112
115
|
{
|
|
113
|
-
ref:
|
|
114
|
-
id:
|
|
116
|
+
ref: y,
|
|
117
|
+
id: w,
|
|
115
118
|
type: "file",
|
|
116
119
|
className: "sr-only",
|
|
117
120
|
style: { visibility: "hidden" },
|
|
118
121
|
"aria-hidden": "true",
|
|
119
|
-
"aria-label":
|
|
120
|
-
accept:
|
|
121
|
-
multiple:
|
|
122
|
-
disabled:
|
|
123
|
-
onChange:
|
|
124
|
-
onClick:
|
|
125
|
-
onFocus:
|
|
122
|
+
"aria-label": v ?? "Attach files",
|
|
123
|
+
accept: a,
|
|
124
|
+
multiple: i,
|
|
125
|
+
disabled: s,
|
|
126
|
+
onChange: R,
|
|
127
|
+
onClick: $,
|
|
128
|
+
onFocus: P,
|
|
126
129
|
tabIndex: -1
|
|
127
130
|
}
|
|
128
131
|
),
|
|
129
|
-
|
|
132
|
+
u && /* @__PURE__ */ t(
|
|
130
133
|
"p",
|
|
131
134
|
{
|
|
132
135
|
role: "alert",
|
|
133
136
|
"aria-live": "polite",
|
|
134
|
-
className: "mt-ds-02 text-ds-xs text-error",
|
|
135
|
-
children:
|
|
137
|
+
className: "mt-ds-02 text-ds-xs text-error-11",
|
|
138
|
+
children: u
|
|
136
139
|
}
|
|
137
140
|
)
|
|
138
|
-
] }) : /* @__PURE__ */
|
|
141
|
+
] }) : /* @__PURE__ */ p(
|
|
139
142
|
"div",
|
|
140
143
|
{
|
|
141
|
-
ref:
|
|
142
|
-
...
|
|
144
|
+
ref: L,
|
|
145
|
+
...E,
|
|
143
146
|
role: "presentation",
|
|
144
|
-
className: h("flex flex-col",
|
|
145
|
-
"data-drag-active":
|
|
146
|
-
onDragEnter:
|
|
147
|
-
onDragOver:
|
|
148
|
-
onDragLeave:
|
|
149
|
-
onDrop:
|
|
147
|
+
className: h("flex flex-col", F),
|
|
148
|
+
"data-drag-active": b ? "true" : void 0,
|
|
149
|
+
onDragEnter: z,
|
|
150
|
+
onDragOver: K,
|
|
151
|
+
onDragLeave: T,
|
|
152
|
+
onDrop: _,
|
|
150
153
|
children: [
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
|
|
154
|
+
/* @__PURE__ */ p(
|
|
155
|
+
c.div,
|
|
153
156
|
{
|
|
154
157
|
role: "button",
|
|
155
158
|
tabIndex: 0,
|
|
156
|
-
"aria-disabled":
|
|
157
|
-
onClick:
|
|
159
|
+
"aria-disabled": s || void 0,
|
|
160
|
+
onClick: s ? void 0 : C,
|
|
158
161
|
onKeyDown: (e) => {
|
|
159
|
-
!
|
|
162
|
+
!s && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), C());
|
|
160
163
|
},
|
|
161
164
|
className: h(
|
|
162
165
|
"flex flex-col items-center justify-center gap-ds-03 rounded-ds-lg",
|
|
163
166
|
"border-2 border-dashed p-ds-08",
|
|
164
|
-
"
|
|
165
|
-
"border-border bg-
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
"cursor-pointer",
|
|
168
|
+
"border-surface-border-strong bg-surface-3",
|
|
169
|
+
b && "border-accent-7 bg-accent-2",
|
|
170
|
+
s && "opacity-action-disabled cursor-not-allowed"
|
|
168
171
|
),
|
|
172
|
+
animate: {
|
|
173
|
+
scale: b ? 1.02 : 1
|
|
174
|
+
},
|
|
175
|
+
transition: D.snappy,
|
|
169
176
|
children: [
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
177
|
+
/* @__PURE__ */ t(M, { mode: "wait", children: o ? /* @__PURE__ */ t(
|
|
178
|
+
c.div,
|
|
179
|
+
{
|
|
180
|
+
initial: { opacity: 0, scale: 0.5 },
|
|
181
|
+
animate: { opacity: 1, scale: 1 },
|
|
182
|
+
exit: { opacity: 0, scale: 0.5 },
|
|
183
|
+
transition: N.fade,
|
|
184
|
+
children: /* @__PURE__ */ t(B, { size: "md" })
|
|
185
|
+
},
|
|
186
|
+
"spinner"
|
|
187
|
+
) : x === 100 && !I ? /* @__PURE__ */ t(
|
|
188
|
+
c.div,
|
|
189
|
+
{
|
|
190
|
+
initial: { opacity: 0, scale: 0.5 },
|
|
191
|
+
animate: { opacity: 1, scale: 1 },
|
|
192
|
+
exit: { opacity: 0, scale: 0.5 },
|
|
193
|
+
transition: D.bouncy,
|
|
194
|
+
children: /* @__PURE__ */ t(Z, { className: "h-ds-sm w-ds-sm text-success-11" })
|
|
195
|
+
},
|
|
196
|
+
"complete"
|
|
197
|
+
) : /* @__PURE__ */ t(
|
|
198
|
+
c.div,
|
|
199
|
+
{
|
|
200
|
+
initial: { opacity: 0 },
|
|
201
|
+
animate: { opacity: 1 },
|
|
202
|
+
exit: { opacity: 0 },
|
|
203
|
+
transition: N.fade,
|
|
204
|
+
children: /* @__PURE__ */ t(q, { className: "h-ds-sm w-ds-sm text-surface-fg-subtle" })
|
|
205
|
+
},
|
|
206
|
+
"upload"
|
|
207
|
+
) }),
|
|
208
|
+
/* @__PURE__ */ t("span", { id: w + "-label", className: "text-ds-sm text-surface-fg-muted", children: O }),
|
|
209
|
+
o ? /* @__PURE__ */ t("div", { className: "w-full max-w-xs", children: /* @__PURE__ */ t(
|
|
173
210
|
"div",
|
|
174
211
|
{
|
|
175
212
|
role: "progressbar",
|
|
176
|
-
"aria-valuenow":
|
|
213
|
+
"aria-valuenow": x,
|
|
177
214
|
"aria-valuemin": 0,
|
|
178
215
|
"aria-valuemax": 100,
|
|
179
|
-
className: "h-2 w-full overflow-hidden rounded-ds-full bg-
|
|
180
|
-
children: /* @__PURE__ */
|
|
181
|
-
|
|
216
|
+
className: "h-2 w-full overflow-hidden rounded-ds-full bg-surface-3",
|
|
217
|
+
children: /* @__PURE__ */ t(
|
|
218
|
+
c.div,
|
|
182
219
|
{
|
|
183
|
-
className: "h-full rounded-ds-full bg-
|
|
184
|
-
|
|
220
|
+
className: "h-full rounded-ds-full bg-accent-9",
|
|
221
|
+
animate: { width: `${x}%` },
|
|
222
|
+
transition: D.smooth
|
|
185
223
|
}
|
|
186
224
|
)
|
|
187
225
|
}
|
|
188
|
-
) }) : /* @__PURE__ */
|
|
226
|
+
) }) : /* @__PURE__ */ t("span", { className: "text-ds-xs text-surface-fg-subtle", children: V })
|
|
189
227
|
]
|
|
190
228
|
}
|
|
191
229
|
),
|
|
192
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ t(
|
|
193
231
|
"input",
|
|
194
232
|
{
|
|
195
|
-
ref:
|
|
196
|
-
id:
|
|
233
|
+
ref: y,
|
|
234
|
+
id: w,
|
|
197
235
|
type: "file",
|
|
198
236
|
className: "sr-only",
|
|
199
237
|
style: { visibility: "hidden" },
|
|
200
238
|
"aria-hidden": "true",
|
|
201
|
-
"aria-label":
|
|
202
|
-
accept:
|
|
203
|
-
multiple:
|
|
204
|
-
disabled:
|
|
205
|
-
onChange:
|
|
206
|
-
onClick:
|
|
207
|
-
onFocus:
|
|
239
|
+
"aria-label": O,
|
|
240
|
+
accept: a,
|
|
241
|
+
multiple: i,
|
|
242
|
+
disabled: s,
|
|
243
|
+
onChange: R,
|
|
244
|
+
onClick: $,
|
|
245
|
+
onFocus: P,
|
|
208
246
|
tabIndex: -1
|
|
209
247
|
}
|
|
210
248
|
),
|
|
211
|
-
|
|
212
|
-
|
|
249
|
+
/* @__PURE__ */ t(M, { children: u && /* @__PURE__ */ t(
|
|
250
|
+
c.p,
|
|
213
251
|
{
|
|
214
252
|
role: "alert",
|
|
215
|
-
className: "mt-ds-02 text-ds-xs text-error",
|
|
216
|
-
|
|
253
|
+
className: "mt-ds-02 text-ds-xs text-error-11",
|
|
254
|
+
initial: { opacity: 0, x: 0 },
|
|
255
|
+
animate: { opacity: 1, x: [0, -4, 4, -4, 4, 0] },
|
|
256
|
+
exit: { opacity: 0 },
|
|
257
|
+
transition: { opacity: N.fade, x: { type: "tween", duration: 0.4, ease: "easeOut" } },
|
|
258
|
+
children: u
|
|
217
259
|
}
|
|
218
|
-
)
|
|
260
|
+
) })
|
|
219
261
|
]
|
|
220
262
|
}
|
|
221
263
|
);
|
|
222
264
|
}
|
|
223
265
|
);
|
|
224
|
-
|
|
266
|
+
J.displayName = "FileUpload";
|
|
225
267
|
export {
|
|
226
|
-
|
|
268
|
+
J as FileUpload
|
|
227
269
|
};
|
package/dist/ui/form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/ui/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAExE,UAAU,qBAAqB;IAC7B,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AACD,QAAA,MAAM,gBAAgB,sCAAiD,CAAA;AAEvE;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kFAAkF;IAClF,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/ui/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAExE,UAAU,qBAAqB;IAC7B,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AACD,QAAA,MAAM,gBAAgB,sCAAiD,CAAA;AAEvE;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kFAAkF;IAClF,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,SAAS,uFAqBd,CAAA;AAMD,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;IACrF,KAAK,CAAC,EAAE,eAAe,CAAA;CACxB;AASD,QAAA,MAAM,cAAc,kGAgBnB,CAAA;AAGD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,IAAI,qBAAqB,CAEpD;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAA"}
|
package/dist/ui/form.js
CHANGED
|
@@ -2,48 +2,51 @@
|
|
|
2
2
|
import { jsx as d } from "react/jsx-runtime";
|
|
3
3
|
import * as e from "react";
|
|
4
4
|
import { c as i } from "../_chunks/utils.js";
|
|
5
|
-
const x = e.createContext({}),
|
|
6
|
-
({ className:
|
|
7
|
-
const c = e.useId(),
|
|
8
|
-
|
|
5
|
+
const x = e.createContext({}), u = e.forwardRef(
|
|
6
|
+
({ className: l, helperTextId: n, state: t = "helper", required: r, children: a, ...o }, s) => {
|
|
7
|
+
const c = e.useId(), m = n || `${c}-helper`, p = e.useMemo(
|
|
8
|
+
() => ({ state: t, helperTextId: m, required: r }),
|
|
9
|
+
[t, m, r]
|
|
10
|
+
);
|
|
11
|
+
return /* @__PURE__ */ d(x.Provider, { value: p, children: /* @__PURE__ */ d(
|
|
9
12
|
"div",
|
|
10
13
|
{
|
|
11
|
-
ref:
|
|
12
|
-
className: i("flex flex-col gap-ds-02",
|
|
13
|
-
...
|
|
14
|
-
children:
|
|
14
|
+
ref: s,
|
|
15
|
+
className: i("flex flex-col gap-ds-02", l),
|
|
16
|
+
...o,
|
|
17
|
+
children: a
|
|
15
18
|
}
|
|
16
19
|
) });
|
|
17
20
|
}
|
|
18
21
|
);
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
helper: "text-
|
|
22
|
-
error: "text-
|
|
23
|
-
warning: "text-
|
|
24
|
-
success: "text-
|
|
25
|
-
},
|
|
26
|
-
({ className:
|
|
27
|
-
const
|
|
22
|
+
u.displayName = "FormField";
|
|
23
|
+
const f = {
|
|
24
|
+
helper: "text-surface-fg-subtle",
|
|
25
|
+
error: "text-error-11",
|
|
26
|
+
warning: "text-warning-11",
|
|
27
|
+
success: "text-success-11"
|
|
28
|
+
}, F = e.forwardRef(
|
|
29
|
+
({ className: l, id: n, state: t, ...r }, a) => {
|
|
30
|
+
const o = e.useContext(x), s = t ?? o.state ?? "helper", c = n ?? o.helperTextId;
|
|
28
31
|
return /* @__PURE__ */ d(
|
|
29
32
|
"p",
|
|
30
33
|
{
|
|
31
|
-
ref:
|
|
34
|
+
ref: a,
|
|
32
35
|
id: c,
|
|
33
|
-
role:
|
|
34
|
-
className: i("text-ds-sm",
|
|
35
|
-
...
|
|
36
|
+
role: s === "error" ? "alert" : void 0,
|
|
37
|
+
className: i("text-ds-sm", f[s], l),
|
|
38
|
+
...r
|
|
36
39
|
}
|
|
37
40
|
);
|
|
38
41
|
}
|
|
39
42
|
);
|
|
40
|
-
|
|
41
|
-
function
|
|
43
|
+
F.displayName = "FormHelperText";
|
|
44
|
+
function C() {
|
|
42
45
|
return e.useContext(x);
|
|
43
46
|
}
|
|
44
47
|
export {
|
|
45
|
-
|
|
48
|
+
u as FormField,
|
|
46
49
|
x as FormFieldContext,
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
F as FormHelperText,
|
|
51
|
+
C as useFormField
|
|
49
52
|
};
|
package/dist/ui/hover-card.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import * as HoverCardPrimitive from '../primitives/react-hover-card';
|
|
4
|
-
declare const HoverCard: React.FC<HoverCardPrimitive.
|
|
4
|
+
declare const HoverCard: React.FC<React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Root>>;
|
|
5
5
|
declare const HoverCardTrigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
6
6
|
declare const HoverCardContent: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
export type HoverCardContentProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/ui/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/ui/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,8BAA8B,CAAA;AAUlE,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAuBvF,CAAA;AAGD,QAAA,MAAM,gBAAgB,oHAA6B,CAAA;AAEnD,QAAA,MAAM,gBAAgB,oKAmCpB,CAAA;AAGF,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAA;AAErG,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
|
package/dist/ui/hover-card.js
CHANGED
|
@@ -1,24 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { w as
|
|
5
|
-
import { c as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { w as u, x as p, y as C, z as v } from "../_chunks/primitives.js";
|
|
5
|
+
import { c as y } from "../_chunks/utils.js";
|
|
6
|
+
import { t as x, s as b } from "../_chunks/motion2.js";
|
|
7
|
+
import { A as g, m as w } from "../_chunks/motion.js";
|
|
8
|
+
const m = t.createContext(!1), H = ({
|
|
9
|
+
open: s,
|
|
10
|
+
defaultOpen: a = !1,
|
|
11
|
+
onOpenChange: e,
|
|
12
|
+
...n
|
|
13
|
+
}) => {
|
|
14
|
+
const [i, c] = t.useState(a), o = s !== void 0, d = o ? s : i, f = t.useCallback(
|
|
15
|
+
(l) => {
|
|
16
|
+
o || c(l), e == null || e(l);
|
|
17
|
+
},
|
|
18
|
+
[o, e]
|
|
19
|
+
);
|
|
20
|
+
return /* @__PURE__ */ r(m.Provider, { value: d, children: /* @__PURE__ */ r(v, { open: d, onOpenChange: f, ...n }) });
|
|
21
|
+
};
|
|
22
|
+
H.displayName = "HoverCard";
|
|
23
|
+
const M = C, h = t.forwardRef(({ className: s, align: a = "center", sideOffset: e = 4, children: n, ...i }, c) => {
|
|
24
|
+
const o = t.useContext(m);
|
|
25
|
+
return /* @__PURE__ */ r(g, { children: o && /* @__PURE__ */ r(u, { forceMount: !0, children: /* @__PURE__ */ r(
|
|
26
|
+
p,
|
|
27
|
+
{
|
|
28
|
+
ref: c,
|
|
29
|
+
align: a,
|
|
30
|
+
sideOffset: e,
|
|
31
|
+
forceMount: !0,
|
|
32
|
+
asChild: !0,
|
|
33
|
+
...i,
|
|
34
|
+
children: /* @__PURE__ */ r(
|
|
35
|
+
w.div,
|
|
36
|
+
{
|
|
37
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
38
|
+
animate: { opacity: 1, scale: 1 },
|
|
39
|
+
exit: { opacity: 0, scale: 0.95 },
|
|
40
|
+
transition: { ...b.snappy, opacity: x.fade },
|
|
41
|
+
className: y(
|
|
42
|
+
"z-popover w-64 rounded-ds-lg border border-surface-border-strong bg-surface-1 p-ds-05 shadow-03 outline-none",
|
|
43
|
+
s
|
|
44
|
+
),
|
|
45
|
+
children: n
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
) }) });
|
|
50
|
+
});
|
|
51
|
+
h.displayName = p.displayName;
|
|
20
52
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
53
|
+
H as HoverCard,
|
|
54
|
+
h as HoverCardContent,
|
|
55
|
+
M as HoverCardTrigger
|
|
24
56
|
};
|