@devalok/shilp-sutra 0.31.0 → 0.32.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/badge-group.js +123 -172
- package/dist/_chunks/document-preview.js +92 -0
- package/dist/_chunks/file-preview.js +511 -0
- package/dist/_chunks/image-preview.js +90 -0
- package/dist/_chunks/primitives.js +109 -109
- package/dist/_chunks/stat-row.js +144 -124
- package/dist/_chunks/use-calendar.js +558 -490
- package/dist/ai/block-renderer.d.ts +2 -1
- package/dist/ai/block-renderer.d.ts.map +1 -1
- package/dist/ai/block-renderer.js +30 -29
- package/dist/ai/blocks/block-table.d.ts.map +1 -1
- package/dist/ai/blocks/confirm.d.ts.map +1 -1
- package/dist/ai/blocks/divider.d.ts.map +1 -1
- package/dist/ai/blocks/error.d.ts.map +1 -1
- package/dist/ai/blocks/info.d.ts.map +1 -1
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/blocks/stat-row.d.ts.map +1 -1
- package/dist/ai/blocks/success.d.ts.map +1 -1
- package/dist/ai/blocks/text.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts +18 -0
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +126 -125
- package/dist/ai/conversation.d.ts +13 -1
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +78 -78
- package/dist/ai/types.d.ts +0 -1
- package/dist/ai/types.d.ts.map +1 -1
- package/dist/ai/types.js +0 -1
- package/dist/composed/bulk-action-bar.d.ts +6 -4
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +102 -58
- package/dist/composed/command-palette.d.ts +9 -0
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +68 -68
- package/dist/composed/confirm-dialog.d.ts +1 -1
- package/dist/composed/confirm-dialog.d.ts.map +1 -1
- package/dist/composed/confirm-dialog.js +10 -10
- package/dist/composed/date-picker/date-picker.d.ts +11 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +39 -36
- package/dist/composed/emoji-picker.d.ts +6 -0
- package/dist/composed/emoji-picker.d.ts.map +1 -1
- package/dist/composed/emoji-picker.js +22 -20
- package/dist/composed/error-boundary.d.ts +21 -1
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +47 -32
- package/dist/composed/file-preview/audio-preview.d.ts +7 -0
- package/dist/composed/file-preview/audio-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/document-preview.d.ts +7 -0
- package/dist/composed/file-preview/document-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/embed-preview.d.ts +7 -0
- package/dist/composed/file-preview/embed-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/image-preview.d.ts +7 -0
- package/dist/composed/file-preview/image-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/shared.d.ts +20 -0
- package/dist/composed/file-preview/shared.d.ts.map +1 -0
- package/dist/composed/file-preview/video-preview.d.ts +6 -0
- package/dist/composed/file-preview/video-preview.d.ts.map +1 -0
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.js +10 -662
- package/dist/composed/filter-bar.d.ts +10 -2
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +42 -43
- package/dist/composed/form-section.d.ts +1 -1
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +22 -21
- package/dist/composed/index.d.ts +2 -2
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +58 -57
- package/dist/composed/inline-edit.d.ts +1 -1
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js +33 -32
- package/dist/composed/markdown-viewer.d.ts +1 -1
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +60 -59
- package/dist/composed/master-detail.d.ts +11 -7
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +123 -84
- package/dist/composed/responsive-overlay.d.ts +8 -0
- package/dist/composed/responsive-overlay.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.d.ts +11 -3
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +21 -20
- package/dist/composed/schedule-view.d.ts +9 -1
- package/dist/composed/schedule-view.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +8 -4
- package/dist/hooks/use-touch-device.d.ts +12 -0
- package/dist/hooks/use-touch-device.d.ts.map +1 -0
- package/dist/hooks/use-touch-device.js +13 -0
- package/dist/hooks/use-viewport-height.d.ts +11 -0
- package/dist/hooks/use-viewport-height.d.ts.map +1 -0
- package/dist/hooks/use-viewport-height.js +16 -0
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +72 -63
- package/dist/shell/command-registry.d.ts.map +1 -1
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +77 -77
- package/dist/shell/top-bar.d.ts +2 -2
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +61 -60
- package/dist/tailwind/index.cjs +51 -7
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +51 -7
- package/dist/tokens/primitives.css +3 -1
- package/dist/tokens/semantic.css +16 -13
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +38 -39
- package/dist/ui/badge.d.ts +104 -2
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +8 -7
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +54 -74
- package/dist/ui/card.js +24 -24
- package/dist/ui/charts/area-chart.d.ts +2 -0
- package/dist/ui/charts/area-chart.d.ts.map +1 -1
- package/dist/ui/charts/bar-chart.d.ts +2 -0
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts +2 -0
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/index.js +583 -577
- package/dist/ui/charts/line-chart.d.ts +2 -0
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/charts/pie-chart.d.ts +2 -0
- package/dist/ui/charts/pie-chart.d.ts.map +1 -1
- package/dist/ui/charts/radar-chart.d.ts +2 -0
- package/dist/ui/charts/radar-chart.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts +2 -0
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +36 -27
- package/dist/ui/color-input.js +5 -5
- package/dist/ui/combobox.d.ts +6 -1
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +1 -1
- package/dist/ui/context-menu.js +1 -1
- package/dist/ui/data-table-body.d.ts +12 -0
- package/dist/ui/data-table-body.d.ts.map +1 -0
- package/dist/ui/data-table-body.js +219 -0
- package/dist/ui/data-table-bulk-actions.d.ts +19 -0
- package/dist/ui/data-table-bulk-actions.d.ts.map +1 -0
- package/dist/ui/data-table-bulk-actions.js +61 -0
- package/dist/ui/data-table-card.d.ts +9 -0
- package/dist/ui/data-table-card.d.ts.map +1 -0
- package/dist/ui/data-table-card.js +73 -0
- package/dist/ui/data-table-context.d.ts +62 -0
- package/dist/ui/data-table-context.d.ts.map +1 -0
- package/dist/ui/data-table-context.js +48 -0
- package/dist/ui/data-table-header.d.ts +10 -0
- package/dist/ui/data-table-header.d.ts.map +1 -0
- package/dist/ui/data-table-header.js +141 -0
- package/dist/ui/data-table-pagination.d.ts +13 -0
- package/dist/ui/data-table-pagination.d.ts.map +1 -0
- package/dist/ui/data-table-pagination.js +84 -0
- package/dist/ui/data-table.d.ts +11 -9
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +258 -573
- package/dist/ui/dialog.d.ts +6 -2
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +84 -82
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/hover-card.d.ts +7 -0
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +3 -3
- package/dist/ui/icon-group.d.ts +2 -4
- package/dist/ui/icon-group.d.ts.map +1 -1
- package/dist/ui/icon-group.js +22 -23
- package/dist/ui/index.d.ts +1 -2
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +94 -99
- package/dist/ui/label.js +1 -1
- package/dist/ui/lib/bottom-sheet.d.ts +16 -0
- package/dist/ui/lib/bottom-sheet.d.ts.map +1 -0
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +64 -73
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +40 -44
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +19 -17
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +107 -32
- package/dist/ui/progress-ring.d.ts.map +1 -1
- package/dist/ui/progress-ring.js +80 -80
- package/dist/ui/progress.js +4 -4
- package/dist/ui/radio.d.ts +5 -2
- package/dist/ui/radio.d.ts.map +1 -1
- package/dist/ui/radio.js +29 -20
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +13 -12
- package/dist/ui/segmented-control.d.ts +6 -108
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +86 -272
- package/dist/ui/select.js +5 -5
- package/dist/ui/separator.js +5 -5
- package/dist/ui/sheet.d.ts +2 -0
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +102 -84
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +200 -175
- package/dist/ui/slider.js +14 -14
- package/dist/ui/status-dot.js +8 -8
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +33 -31
- package/dist/ui/switch.js +3 -3
- package/dist/ui/tabs.js +6 -6
- package/dist/ui/toast-types.d.ts +0 -1
- package/dist/ui/toast-types.d.ts.map +1 -1
- package/dist/ui/toast-types.js +0 -1
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +156 -150
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +1 -1
- package/dist/ui/tooltip.js +3 -3
- package/docs/components/ui/data-table-body.md +13 -0
- package/docs/components/ui/data-table-bulk-actions.md +13 -0
- package/docs/components/ui/data-table-card.md +13 -0
- package/docs/components/ui/data-table-context.md +13 -0
- package/docs/components/ui/data-table-header.md +13 -0
- package/docs/components/ui/data-table-pagination.md +13 -0
- package/llms-full.txt +79 -48
- package/llms.txt +32 -0
- package/package.json +1 -6
- package/dist/ui/chip.d.ts +0 -19
- package/dist/ui/chip.d.ts.map +0 -1
- package/dist/ui/chip.js +0 -14
- package/dist/ui/lib/use-ripple.d.ts +0 -14
- package/dist/ui/lib/use-ripple.d.ts.map +0 -1
package/dist/ui/popover.js
CHANGED
|
@@ -1,57 +1,132 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import { cn as
|
|
6
|
-
import { tweens as
|
|
7
|
-
import {
|
|
8
|
-
|
|
2
|
+
import { jsx as e, jsxs as h } from "react/jsx-runtime";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { ab as P, a6 as R, a5 as M, a7 as w, q as N, r as y, p as A, o as O, bh as j } from "../_chunks/primitives.js";
|
|
5
|
+
import { cn as g } from "./lib/utils.js";
|
|
6
|
+
import { tweens as v, springs as z } from "./lib/motion.js";
|
|
7
|
+
import { useIsMobile as E } from "../hooks/use-mobile.js";
|
|
8
|
+
import { u as k, A as b, m as p } from "../_chunks/framer.js";
|
|
9
|
+
function B({
|
|
10
|
+
open: t,
|
|
11
|
+
onOpenChange: s,
|
|
12
|
+
children: i,
|
|
13
|
+
className: l,
|
|
14
|
+
dragHandle: c = !0,
|
|
15
|
+
swipeable: d = !0,
|
|
16
|
+
title: a
|
|
17
|
+
}) {
|
|
18
|
+
const o = k(), r = n.useRef(null), u = n.useCallback(
|
|
19
|
+
(f, m) => {
|
|
20
|
+
const C = r.current?.getBoundingClientRect().height ?? 300;
|
|
21
|
+
(m.offset.y > C * 0.3 || m.velocity.y > 500) && s(!1);
|
|
22
|
+
},
|
|
23
|
+
[s]
|
|
24
|
+
);
|
|
25
|
+
return /* @__PURE__ */ e(P, { open: t, onOpenChange: s, children: /* @__PURE__ */ e(b, { children: t && /* @__PURE__ */ h(R, { forceMount: !0, children: [
|
|
26
|
+
/* @__PURE__ */ e(M, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ e(
|
|
27
|
+
p.div,
|
|
28
|
+
{
|
|
29
|
+
className: "fixed inset-0 z-modal bg-overlay",
|
|
30
|
+
initial: { opacity: 0 },
|
|
31
|
+
animate: { opacity: 1 },
|
|
32
|
+
exit: { opacity: 0 },
|
|
33
|
+
transition: v.fade
|
|
34
|
+
}
|
|
35
|
+
) }),
|
|
36
|
+
/* @__PURE__ */ e(
|
|
37
|
+
w,
|
|
38
|
+
{
|
|
39
|
+
forceMount: !0,
|
|
40
|
+
asChild: !0,
|
|
41
|
+
"aria-label": a,
|
|
42
|
+
children: /* @__PURE__ */ h(
|
|
43
|
+
p.div,
|
|
44
|
+
{
|
|
45
|
+
ref: r,
|
|
46
|
+
className: g(
|
|
47
|
+
"fixed inset-x-0 bottom-0 z-modal max-h-[85vh] overflow-y-auto rounded-t-ds-xl border-t border-surface-border-strong bg-surface-overlay shadow-overlay outline-none",
|
|
48
|
+
l
|
|
49
|
+
),
|
|
50
|
+
initial: { y: "100%" },
|
|
51
|
+
animate: { y: 0 },
|
|
52
|
+
exit: { y: "100%" },
|
|
53
|
+
transition: o ? { duration: 0 } : { type: "spring", damping: 30, stiffness: 300 },
|
|
54
|
+
drag: d && !o ? "y" : !1,
|
|
55
|
+
dragConstraints: { top: 0 },
|
|
56
|
+
dragElastic: 0.2,
|
|
57
|
+
onDragEnd: u,
|
|
58
|
+
children: [
|
|
59
|
+
c && /* @__PURE__ */ e("div", { className: "flex justify-center pt-ds-03 pb-ds-02", children: /* @__PURE__ */ e("div", { className: "h-1 w-8 rounded-ds-full bg-surface-border" }) }),
|
|
60
|
+
/* @__PURE__ */ e("div", { className: "px-ds-05 pb-ds-06", children: i })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] }) }) });
|
|
67
|
+
}
|
|
68
|
+
const x = n.createContext({ open: !1, onClose: () => {
|
|
69
|
+
} }), D = ({
|
|
9
70
|
open: t,
|
|
10
71
|
defaultOpen: s = !1,
|
|
11
|
-
onOpenChange:
|
|
12
|
-
...
|
|
72
|
+
onOpenChange: i,
|
|
73
|
+
...l
|
|
13
74
|
}) => {
|
|
14
|
-
const [
|
|
15
|
-
(
|
|
16
|
-
|
|
75
|
+
const [c, d] = n.useState(s), a = t !== void 0, o = a ? t : c, r = n.useCallback(
|
|
76
|
+
(f) => {
|
|
77
|
+
a || d(f), i?.(f);
|
|
17
78
|
},
|
|
18
|
-
[
|
|
79
|
+
[a, i]
|
|
80
|
+
), u = n.useMemo(
|
|
81
|
+
() => ({ open: o, onClose: () => r(!1) }),
|
|
82
|
+
[o, r]
|
|
19
83
|
);
|
|
20
|
-
return /* @__PURE__ */
|
|
84
|
+
return /* @__PURE__ */ e(x.Provider, { value: u, children: /* @__PURE__ */ e(O, { open: o, onOpenChange: r, ...l }) });
|
|
21
85
|
};
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
|
|
86
|
+
D.displayName = "Popover";
|
|
87
|
+
const _ = A, $ = j, S = n.forwardRef(({ className: t, align: s = "center", sideOffset: i = 4, children: l, ...c }, d) => {
|
|
88
|
+
const a = E(), { open: o, onClose: r } = n.useContext(x);
|
|
89
|
+
return a ? /* @__PURE__ */ e(
|
|
90
|
+
B,
|
|
91
|
+
{
|
|
92
|
+
open: o,
|
|
93
|
+
onOpenChange: (u) => {
|
|
94
|
+
u || r();
|
|
95
|
+
},
|
|
96
|
+
title: "Options",
|
|
97
|
+
className: t,
|
|
98
|
+
children: l
|
|
99
|
+
}
|
|
100
|
+
) : /* @__PURE__ */ e(b, { children: o && /* @__PURE__ */ e(N, { forceMount: !0, children: /* @__PURE__ */ e(
|
|
101
|
+
y,
|
|
27
102
|
{
|
|
28
|
-
ref:
|
|
103
|
+
ref: d,
|
|
29
104
|
align: s,
|
|
30
|
-
sideOffset:
|
|
105
|
+
sideOffset: i,
|
|
31
106
|
forceMount: !0,
|
|
32
107
|
asChild: !0,
|
|
33
|
-
...
|
|
34
|
-
children: /* @__PURE__ */
|
|
35
|
-
|
|
108
|
+
...c,
|
|
109
|
+
children: /* @__PURE__ */ e(
|
|
110
|
+
p.div,
|
|
36
111
|
{
|
|
37
112
|
initial: { opacity: 0, scale: 0.95 },
|
|
38
113
|
animate: { opacity: 1, scale: 1 },
|
|
39
114
|
exit: { opacity: 0, scale: 0.95 },
|
|
40
|
-
transition: { ...
|
|
41
|
-
className:
|
|
115
|
+
transition: { ...z.snappy, opacity: v.fade },
|
|
116
|
+
className: g(
|
|
42
117
|
"z-popover w-72 rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-05 text-surface-fg shadow-floating outline-none",
|
|
43
118
|
t
|
|
44
119
|
),
|
|
45
|
-
children:
|
|
120
|
+
children: l
|
|
46
121
|
}
|
|
47
122
|
)
|
|
48
123
|
}
|
|
49
124
|
) }) });
|
|
50
125
|
});
|
|
51
|
-
|
|
126
|
+
S.displayName = y.displayName;
|
|
52
127
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
128
|
+
D as Popover,
|
|
129
|
+
$ as PopoverAnchor,
|
|
130
|
+
S as PopoverContent,
|
|
131
|
+
_ as PopoverTrigger
|
|
57
132
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-ring.d.ts","sourceRoot":"","sources":["../../src/ui/progress-ring.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B;;;;;;GAMG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAC1F,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,oBAAoB;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB,yBAAyB;IACzB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC5D,qCAAqC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,QAAA,MAAM,YAAY,yFA2EjB,CAAA;AAGD;;;;;;;;GAQG;AACH,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAC/F,KAAK,EAAE,KAAK,CAAC;QACX,KAAK,EAAE,MAAM,CAAA;QACb,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;QAC5D,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAC,CAAA;IACF,oBAAoB;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC1B;AAED,QAAA,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"progress-ring.d.ts","sourceRoot":"","sources":["../../src/ui/progress-ring.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B;;;;;;GAMG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAC1F,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,oBAAoB;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB,yBAAyB;IACzB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC5D,qCAAqC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,QAAA,MAAM,YAAY,yFA2EjB,CAAA;AAGD;;;;;;;;GAQG;AACH,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAC/F,KAAK,EAAE,KAAK,CAAC;QACX,KAAK,EAAE,MAAM,CAAA;QACb,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;QAC5D,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAC,CAAA;IACF,oBAAoB;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC1B;AAED,QAAA,MAAM,iBAAiB,8FAuDtB,CAAA;AAGD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAA"}
|
package/dist/ui/progress-ring.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as W, jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { springs as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { a as
|
|
7
|
-
const
|
|
2
|
+
import { jsxs as W, jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import * as f from "react";
|
|
4
|
+
import { springs as y } from "./lib/motion.js";
|
|
5
|
+
import { cn as v } from "./lib/utils.js";
|
|
6
|
+
import { u as w, a as b, b as N, c as S, m as M } from "../_chunks/framer.js";
|
|
7
|
+
const R = {
|
|
8
8
|
default: "var(--color-accent-9)",
|
|
9
9
|
success: "var(--color-success-9)",
|
|
10
10
|
warning: "var(--color-warning-9)",
|
|
@@ -14,68 +14,68 @@ const y = {
|
|
|
14
14
|
sm: { size: 32, strokeWidth: 3, fontSize: "text-ds-xs" },
|
|
15
15
|
md: { size: 48, strokeWidth: 3.5, fontSize: "text-ds-sm" },
|
|
16
16
|
lg: { size: 64, strokeWidth: 4, fontSize: "text-ds-md" }
|
|
17
|
-
},
|
|
18
|
-
({ value: l, max:
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
type: "spring"
|
|
25
|
-
|
|
26
|
-
return () =>
|
|
27
|
-
}, [n,
|
|
17
|
+
}, B = f.forwardRef(
|
|
18
|
+
({ value: l, max: d = 100, size: m = "md", color: h = "default", showValue: u = !1, label: g, className: s, ...r }, k) => {
|
|
19
|
+
const i = w(), e = $[m], o = (e.size - e.strokeWidth) / 2, a = 2 * Math.PI * o, n = Math.min(Math.max(l / d, 0), 1), p = a * (1 - n), t = e.size / 2, P = Math.round(n * 100), z = b(0), D = N(z, (x) => `${Math.round(x)}%`);
|
|
20
|
+
return f.useEffect(() => {
|
|
21
|
+
const x = S(
|
|
22
|
+
z,
|
|
23
|
+
n * 100,
|
|
24
|
+
i ? { type: "tween", duration: 0 } : { stiffness: 100, damping: 30, type: "spring" }
|
|
25
|
+
);
|
|
26
|
+
return () => x.stop();
|
|
27
|
+
}, [n, z, i]), /* @__PURE__ */ W(
|
|
28
28
|
"svg",
|
|
29
29
|
{
|
|
30
|
-
ref:
|
|
31
|
-
width:
|
|
32
|
-
height:
|
|
33
|
-
viewBox: `0 0 ${
|
|
30
|
+
ref: k,
|
|
31
|
+
width: e.size,
|
|
32
|
+
height: e.size,
|
|
33
|
+
viewBox: `0 0 ${e.size} ${e.size}`,
|
|
34
34
|
role: "progressbar",
|
|
35
35
|
"aria-valuenow": l,
|
|
36
36
|
"aria-valuemin": 0,
|
|
37
|
-
"aria-valuemax":
|
|
38
|
-
"aria-label":
|
|
39
|
-
className:
|
|
40
|
-
...
|
|
37
|
+
"aria-valuemax": d,
|
|
38
|
+
"aria-label": g ?? `${P}% progress`,
|
|
39
|
+
className: v("shrink-0", s),
|
|
40
|
+
...r,
|
|
41
41
|
children: [
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ c(
|
|
43
43
|
"circle",
|
|
44
44
|
{
|
|
45
|
-
cx:
|
|
46
|
-
cy:
|
|
47
|
-
r:
|
|
45
|
+
cx: t,
|
|
46
|
+
cy: t,
|
|
47
|
+
r: o,
|
|
48
48
|
fill: "none",
|
|
49
|
-
stroke: "var(--color-surface-
|
|
50
|
-
strokeWidth:
|
|
49
|
+
stroke: "var(--color-surface-raised-hover)",
|
|
50
|
+
strokeWidth: e.strokeWidth
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
|
|
53
|
+
/* @__PURE__ */ c(
|
|
54
|
+
M.circle,
|
|
55
55
|
{
|
|
56
|
-
cx:
|
|
57
|
-
cy:
|
|
58
|
-
r:
|
|
56
|
+
cx: t,
|
|
57
|
+
cy: t,
|
|
58
|
+
r: o,
|
|
59
59
|
fill: "none",
|
|
60
|
-
stroke:
|
|
61
|
-
strokeWidth:
|
|
60
|
+
stroke: R[h],
|
|
61
|
+
strokeWidth: e.strokeWidth,
|
|
62
62
|
strokeLinecap: "round",
|
|
63
|
-
strokeDasharray:
|
|
64
|
-
initial: { strokeDashoffset:
|
|
65
|
-
animate: { strokeDashoffset:
|
|
66
|
-
transition:
|
|
67
|
-
transform: `rotate(-90 ${
|
|
63
|
+
strokeDasharray: a,
|
|
64
|
+
initial: { strokeDashoffset: a },
|
|
65
|
+
animate: { strokeDashoffset: p },
|
|
66
|
+
transition: i ? { duration: 0 } : y.smooth,
|
|
67
|
+
transform: `rotate(-90 ${t} ${t})`
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
u && /* @__PURE__ */
|
|
71
|
-
|
|
70
|
+
u && /* @__PURE__ */ c(
|
|
71
|
+
M.text,
|
|
72
72
|
{
|
|
73
|
-
x:
|
|
74
|
-
y:
|
|
73
|
+
x: t,
|
|
74
|
+
y: t,
|
|
75
75
|
textAnchor: "middle",
|
|
76
76
|
dominantBaseline: "central",
|
|
77
|
-
className:
|
|
78
|
-
children:
|
|
77
|
+
className: v(e.fontSize, "fill-surface-fg font-sans font-semibold"),
|
|
78
|
+
children: D
|
|
79
79
|
}
|
|
80
80
|
)
|
|
81
81
|
]
|
|
@@ -83,62 +83,62 @@ const y = {
|
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
({ rings: l, size:
|
|
89
|
-
const
|
|
90
|
-
return /* @__PURE__ */
|
|
86
|
+
B.displayName = "ProgressRing";
|
|
87
|
+
const V = f.forwardRef(
|
|
88
|
+
({ rings: l, size: d = "md", className: m, ...h }, u) => {
|
|
89
|
+
const g = w(), s = $[d], r = s.size / 2, k = s.strokeWidth + 2;
|
|
90
|
+
return /* @__PURE__ */ c(
|
|
91
91
|
"svg",
|
|
92
92
|
{
|
|
93
93
|
ref: u,
|
|
94
|
-
width:
|
|
95
|
-
height:
|
|
96
|
-
viewBox: `0 0 ${
|
|
94
|
+
width: s.size,
|
|
95
|
+
height: s.size,
|
|
96
|
+
viewBox: `0 0 ${s.size} ${s.size}`,
|
|
97
97
|
role: "group",
|
|
98
98
|
"aria-label": "Progress rings",
|
|
99
|
-
className:
|
|
99
|
+
className: v("shrink-0", m),
|
|
100
100
|
...h,
|
|
101
|
-
children: l.map((
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
const
|
|
105
|
-
return /* @__PURE__ */ W(
|
|
106
|
-
/* @__PURE__ */
|
|
101
|
+
children: l.map((i, e) => {
|
|
102
|
+
const o = (s.size - s.strokeWidth) / 2 - e * k;
|
|
103
|
+
if (o <= 0) return null;
|
|
104
|
+
const a = 2 * Math.PI * o, n = Math.min(Math.max(i.value / (i.max ?? 100), 0), 1), p = a * (1 - n);
|
|
105
|
+
return /* @__PURE__ */ W(f.Fragment, { children: [
|
|
106
|
+
/* @__PURE__ */ c(
|
|
107
107
|
"circle",
|
|
108
108
|
{
|
|
109
109
|
cx: r,
|
|
110
110
|
cy: r,
|
|
111
|
-
r:
|
|
111
|
+
r: o,
|
|
112
112
|
fill: "none",
|
|
113
|
-
stroke: "var(--color-surface-
|
|
114
|
-
strokeWidth:
|
|
113
|
+
stroke: "var(--color-surface-raised-hover)",
|
|
114
|
+
strokeWidth: s.strokeWidth
|
|
115
115
|
}
|
|
116
116
|
),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
|
|
117
|
+
/* @__PURE__ */ c(
|
|
118
|
+
M.circle,
|
|
119
119
|
{
|
|
120
120
|
cx: r,
|
|
121
121
|
cy: r,
|
|
122
|
-
r:
|
|
122
|
+
r: o,
|
|
123
123
|
fill: "none",
|
|
124
|
-
stroke:
|
|
125
|
-
strokeWidth:
|
|
124
|
+
stroke: R[i.color ?? "default"],
|
|
125
|
+
strokeWidth: s.strokeWidth,
|
|
126
126
|
strokeLinecap: "round",
|
|
127
|
-
strokeDasharray:
|
|
128
|
-
initial: { strokeDashoffset:
|
|
129
|
-
animate: { strokeDashoffset:
|
|
130
|
-
transition:
|
|
127
|
+
strokeDasharray: a,
|
|
128
|
+
initial: { strokeDashoffset: a },
|
|
129
|
+
animate: { strokeDashoffset: p },
|
|
130
|
+
transition: g ? { duration: 0 } : y.smooth,
|
|
131
131
|
transform: `rotate(-90 ${r} ${r})`
|
|
132
132
|
}
|
|
133
133
|
)
|
|
134
|
-
] },
|
|
134
|
+
] }, e);
|
|
135
135
|
})
|
|
136
136
|
}
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
139
|
);
|
|
140
|
-
|
|
140
|
+
V.displayName = "MultiProgressRing";
|
|
141
141
|
export {
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
V as MultiProgressRing,
|
|
143
|
+
B as ProgressRing
|
|
144
144
|
};
|
package/dist/ui/progress.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import * as x from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { aP as c, aQ as d } from "../_chunks/primitives.js";
|
|
5
5
|
import { a as m } from "../_chunks/vendor-utils.js";
|
|
6
6
|
import { cn as s } from "./lib/utils.js";
|
|
7
7
|
import { springs as N } from "./lib/motion.js";
|
|
@@ -31,7 +31,7 @@ const v = m(
|
|
|
31
31
|
},
|
|
32
32
|
defaultVariants: { color: "default" }
|
|
33
33
|
}
|
|
34
|
-
),
|
|
34
|
+
), V = x.forwardRef(
|
|
35
35
|
({
|
|
36
36
|
className: f,
|
|
37
37
|
value: r,
|
|
@@ -88,9 +88,9 @@ const v = m(
|
|
|
88
88
|
] });
|
|
89
89
|
}
|
|
90
90
|
);
|
|
91
|
-
|
|
91
|
+
V.displayName = c.displayName;
|
|
92
92
|
export {
|
|
93
|
-
|
|
93
|
+
V as Progress,
|
|
94
94
|
l as progressIndicatorVariants,
|
|
95
95
|
v as progressTrackVariants
|
|
96
96
|
};
|
package/dist/ui/radio.d.ts
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
import * as RadioGroupPrimitive from '../primitives/react-radio-group';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
|
|
5
|
+
export interface RadioGroupItemProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item> {
|
|
6
|
+
/** Control size — `sm` (20px), `md` (24px, default, WCAG compliant), `lg` (28px). */
|
|
7
|
+
size?: 'sm' | 'md' | 'lg';
|
|
8
|
+
}
|
|
9
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
10
|
export type RadioGroupProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;
|
|
7
|
-
export type RadioGroupItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;
|
|
8
11
|
export { RadioGroup, RadioGroupItem };
|
|
9
12
|
//# sourceMappingURL=radio.d.ts.map
|
package/dist/ui/radio.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../src/ui/radio.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,+BAA+B,CAAA;AAGpE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,UAAU,+JAKd,CAAA;AAGF,
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../src/ui/radio.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,+BAA+B,CAAA;AAGpE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,UAAU,+JAKd,CAAA;AAGF,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAC1G,qFAAqF;IACrF,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC1B;AAcD,QAAA,MAAM,cAAc,+FAgClB,CAAA;AAGF,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAA;AAE7F,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
|
package/dist/ui/radio.js
CHANGED
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { IconCircle as
|
|
5
|
-
import * as
|
|
6
|
-
import { springs as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { m } from "../_chunks/framer.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
3
|
+
import { aj as i, ak as t, al as n } from "../_chunks/primitives.js";
|
|
4
|
+
import { IconCircle as l } from "@tabler/icons-react";
|
|
5
|
+
import * as c from "react";
|
|
6
|
+
import { springs as m } from "./lib/motion.js";
|
|
7
|
+
import { cn as o } from "./lib/utils.js";
|
|
8
|
+
import { m as f } from "../_chunks/framer.js";
|
|
9
|
+
const u = c.forwardRef(({ className: r, ...a }, s) => /* @__PURE__ */ e(i, { className: o("grid gap-ds-03", r), ...a, ref: s }));
|
|
10
|
+
u.displayName = i.displayName;
|
|
11
|
+
const p = {
|
|
12
|
+
sm: "h-5 w-5",
|
|
13
|
+
md: "h-6 w-6",
|
|
14
|
+
lg: "h-7 w-7"
|
|
15
|
+
}, b = {
|
|
16
|
+
sm: "h-1.5 w-1.5",
|
|
17
|
+
md: "h-ds-03 w-ds-03",
|
|
18
|
+
lg: "h-2.5 w-2.5"
|
|
19
|
+
}, h = c.forwardRef(({ className: r, size: a = "md", ...s }, d) => /* @__PURE__ */ e(
|
|
20
|
+
t,
|
|
13
21
|
{
|
|
14
|
-
ref:
|
|
15
|
-
className:
|
|
16
|
-
"aspect-square
|
|
22
|
+
ref: d,
|
|
23
|
+
className: o(
|
|
24
|
+
"touch-target aspect-square rounded-ds-full",
|
|
25
|
+
p[a],
|
|
17
26
|
"border border-surface-border-strong bg-surface-raised-hover",
|
|
18
27
|
"transition-colors duration-fast-01",
|
|
19
28
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
|
|
@@ -22,21 +31,21 @@ const u = t.forwardRef(({ className: r, ...a }, s) => /* @__PURE__ */ e(
|
|
|
22
31
|
"data-[state=checked]:border-accent-7",
|
|
23
32
|
r
|
|
24
33
|
),
|
|
25
|
-
...
|
|
34
|
+
...s,
|
|
26
35
|
children: /* @__PURE__ */ e(n, { asChild: !0, className: "flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
27
|
-
|
|
36
|
+
f.span,
|
|
28
37
|
{
|
|
29
38
|
className: "flex items-center justify-center",
|
|
30
39
|
initial: { scale: 0 },
|
|
31
40
|
animate: { scale: 1 },
|
|
32
|
-
transition:
|
|
33
|
-
children: /* @__PURE__ */ e(
|
|
41
|
+
transition: m.bouncy,
|
|
42
|
+
children: /* @__PURE__ */ e(l, { className: o(b[a], "fill-accent-9 text-accent-11") })
|
|
34
43
|
}
|
|
35
44
|
) })
|
|
36
45
|
}
|
|
37
46
|
));
|
|
38
|
-
|
|
47
|
+
h.displayName = t.displayName;
|
|
39
48
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
49
|
+
u as RadioGroup,
|
|
50
|
+
h as RadioGroupItem
|
|
42
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-input.d.ts","sourceRoot":"","sources":["../../src/ui/search-input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,KAAK,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACjG,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,oBAAoB;IACpB,IAAI,CAAC,EAAE,eAAe,CAAA;CACvB;AAED,QAAA,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"search-input.d.ts","sourceRoot":"","sources":["../../src/ui/search-input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,KAAK,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACjG,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,oBAAoB;IACpB,IAAI,CAAC,EAAE,eAAe,CAAA;CACvB;AAED,QAAA,MAAM,WAAW,2FA6ChB,CAAA;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/ui/search-input.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { IconX as
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { IconX as f, IconSearch as d } from "@tabler/icons-react";
|
|
4
4
|
import * as h from "react";
|
|
5
5
|
import { springs as y } from "./lib/motion.js";
|
|
6
6
|
import { Spinner as S } from "./spinner.js";
|
|
@@ -9,15 +9,15 @@ import { Input as u } from "./input.js";
|
|
|
9
9
|
import { Button as I } from "./button.js";
|
|
10
10
|
import { A as b, m as x } from "../_chunks/framer.js";
|
|
11
11
|
const C = h.forwardRef(
|
|
12
|
-
({ className: a, value:
|
|
13
|
-
const n =
|
|
12
|
+
({ className: a, value: i, onClear: r, loading: o, size: c = "md", placeholder: m, ...s }, p) => {
|
|
13
|
+
const n = i !== void 0 && i !== "", l = o ? /* @__PURE__ */ t(S, { size: "sm" }) : /* @__PURE__ */ t(b, { children: n && r && /* @__PURE__ */ t(
|
|
14
14
|
x.div,
|
|
15
15
|
{
|
|
16
16
|
initial: { opacity: 0, scale: 0.8 },
|
|
17
17
|
animate: { opacity: 1, scale: 1 },
|
|
18
18
|
exit: { opacity: 0, scale: 0.8 },
|
|
19
19
|
transition: y.snappy,
|
|
20
|
-
children: /* @__PURE__ */
|
|
20
|
+
children: /* @__PURE__ */ t(
|
|
21
21
|
I,
|
|
22
22
|
{
|
|
23
23
|
type: "button",
|
|
@@ -25,22 +25,23 @@ const C = h.forwardRef(
|
|
|
25
25
|
size: "icon-xs",
|
|
26
26
|
onClick: r,
|
|
27
27
|
"aria-label": "Clear search",
|
|
28
|
-
|
|
28
|
+
title: "Clear",
|
|
29
|
+
children: /* @__PURE__ */ t(e, { icon: f })
|
|
29
30
|
}
|
|
30
31
|
)
|
|
31
32
|
}
|
|
32
33
|
) });
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ t(
|
|
34
35
|
u,
|
|
35
36
|
{
|
|
36
37
|
ref: p,
|
|
37
38
|
size: c,
|
|
38
|
-
startSection: /* @__PURE__ */
|
|
39
|
-
endSection:
|
|
40
|
-
endSectionClickable: !!n && !
|
|
39
|
+
startSection: /* @__PURE__ */ t(e, { icon: d }),
|
|
40
|
+
endSection: l,
|
|
41
|
+
endSectionClickable: !!n && !o,
|
|
41
42
|
placeholder: m,
|
|
42
|
-
value:
|
|
43
|
-
"aria-busy":
|
|
43
|
+
value: i,
|
|
44
|
+
"aria-busy": o || void 0,
|
|
44
45
|
className: a,
|
|
45
46
|
...s
|
|
46
47
|
}
|