@devalok/shilp-sutra 0.33.2 → 0.34.1
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 +306 -246
- package/dist/_chunks/chat.js +513 -0
- package/dist/_chunks/date-picker.js +748 -0
- package/dist/_chunks/document-preview.js +109 -90
- package/dist/_chunks/file-preview.js +492 -504
- package/dist/_chunks/framer.js +5564 -5613
- package/dist/_chunks/image-preview.js +127 -88
- package/dist/_chunks/keybinding.js +12 -14
- package/dist/_chunks/link-context.js +19 -16
- package/dist/_chunks/mention-suggestion.js +353 -350
- package/dist/_chunks/motion-provider.js +26 -20
- package/dist/_chunks/popover.js +127 -0
- package/dist/_chunks/primitives.js +7584 -6425
- package/dist/_chunks/rich-chat-input.js +2070 -0
- package/dist/_chunks/rolldown-runtime.js +21 -0
- package/dist/_chunks/shared.js +126 -0
- package/dist/_chunks/sonner.js +605 -734
- package/dist/_chunks/stat-row.js +418 -440
- package/dist/_chunks/tiptap.js +15850 -19964
- package/dist/_chunks/tree-view.js +231 -290
- package/dist/_chunks/use-calendar.js +161 -208
- package/dist/_chunks/vendor-client.js +314 -2199
- package/dist/_chunks/vendor-utils.js +1721 -2978
- package/dist/ai/ai-command-provider.js +23 -17
- package/dist/ai/block-renderer.js +68 -51
- package/dist/ai/blocks/index.js +2 -12
- package/dist/ai/command-bar.js +470 -519
- package/dist/ai/conversation.js +241 -227
- package/dist/ai/index.js +181 -167
- package/dist/ai/types.js +0 -1
- package/dist/composed/activity-feed.js +232 -202
- package/dist/composed/avatar-group.js +164 -222
- package/dist/composed/bulk-action-bar.js +174 -165
- package/dist/composed/command-palette.js +290 -308
- package/dist/composed/confirm-dialog.js +28 -48
- package/dist/composed/content-card.js +69 -108
- package/dist/composed/date-picker/index.js +3 -13
- package/dist/composed/deadline-indicator.js +68 -74
- package/dist/composed/emoji-picker.js +83 -110
- package/dist/composed/empty-state.js +64 -103
- package/dist/composed/error-boundary.js +129 -127
- package/dist/composed/file-preview.js +2 -12
- package/dist/composed/filter-bar.js +98 -130
- package/dist/composed/form-section.js +61 -45
- package/dist/composed/global-loading.js +34 -47
- package/dist/composed/index.js +34 -92
- package/dist/composed/inline-edit.js +92 -107
- package/dist/composed/lib/string-utils.js +8 -8
- package/dist/composed/loading-skeleton.js +103 -171
- package/dist/composed/markdown-viewer.js +187 -139
- package/dist/composed/master-detail.js +147 -156
- package/dist/composed/member-picker.js +46 -49
- package/dist/composed/multi-select-popover.js +181 -179
- package/dist/composed/page-header.js +54 -76
- package/dist/composed/page-skeletons.js +143 -127
- package/dist/composed/priority-indicator.js +105 -111
- package/dist/composed/responsive-overlay.js +36 -41
- package/dist/composed/rich-chat-input.js +2 -1860
- package/dist/composed/rich-text-editor.js +561 -424
- package/dist/composed/schedule-view.js +134 -185
- package/dist/composed/simple-tooltip.js +21 -21
- package/dist/composed/status-badge.js +133 -137
- package/dist/hooks/index.js +7 -12
- package/dist/hooks/use-color-mode.js +28 -25
- package/dist/hooks/use-mobile.js +13 -13
- package/dist/hooks/use-toast.js +2 -4
- package/dist/hooks/use-touch-device.js +9 -11
- package/dist/hooks/use-viewport-height.js +14 -14
- package/dist/motion/index.js +3 -11
- package/dist/motion/primitives-index.js +226 -186
- package/dist/shell/app-command-palette.js +203 -234
- package/dist/shell/bottom-navbar.js +150 -190
- package/dist/shell/command-registry.js +13 -14
- package/dist/shell/index.js +10 -20
- package/dist/shell/link-context.js +2 -5
- package/dist/shell/notification-center.js +238 -259
- package/dist/shell/notification-preferences.js +241 -184
- package/dist/shell/sidebar.js +251 -281
- package/dist/shell/top-bar.js +203 -237
- package/dist/tailwind/index.cjs +426 -451
- package/dist/tailwind/index.js +2 -4
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +443 -468
- package/dist/ui/accordion.js +52 -60
- package/dist/ui/alert-dialog.js +111 -156
- package/dist/ui/alert.js +177 -99
- package/dist/ui/aspect-ratio.js +13 -16
- package/dist/ui/autocomplete.js +112 -148
- package/dist/ui/avatar.js +196 -169
- package/dist/ui/badge-group.js +2 -7
- package/dist/ui/badge-indicator.js +42 -51
- package/dist/ui/badge.js +2 -15
- package/dist/ui/banner.js +76 -68
- package/dist/ui/breadcrumb.js +65 -84
- package/dist/ui/button-group.js +109 -102
- package/dist/ui/button-processing.js +69 -73
- package/dist/ui/button.js +393 -279
- package/dist/ui/card.js +151 -157
- package/dist/ui/charts/index.js +1002 -1319
- package/dist/ui/chat/index.js +2 -11
- package/dist/ui/checkbox.js +77 -100
- package/dist/ui/code.js +18 -32
- package/dist/ui/collapsible.js +21 -29
- package/dist/ui/color-input.js +453 -372
- package/dist/ui/color-swatch.js +60 -90
- package/dist/ui/combobox.js +244 -293
- package/dist/ui/container.js +18 -24
- package/dist/ui/context-menu.js +154 -203
- package/dist/ui/data-table-body.js +116 -213
- package/dist/ui/data-table-bulk-actions.js +43 -59
- package/dist/ui/data-table-card.js +84 -71
- package/dist/ui/data-table-context.js +39 -42
- package/dist/ui/data-table-header.js +98 -139
- package/dist/ui/data-table-pagination.js +69 -82
- package/dist/ui/data-table-toolbar.js +104 -130
- package/dist/ui/data-table.js +278 -354
- package/dist/ui/devalok-grain.js +77 -66
- package/dist/ui/dialog.js +122 -151
- package/dist/ui/dropdown-menu.js +152 -203
- package/dist/ui/file-upload.js +242 -266
- package/dist/ui/form.js +60 -56
- package/dist/ui/hover-card.js +54 -54
- package/dist/ui/icon-button.js +21 -26
- package/dist/ui/icon-context.js +17 -17
- package/dist/ui/icon-group.js +22 -29
- package/dist/ui/icon.js +201 -121
- package/dist/ui/index.js +74 -350
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +44 -48
- package/dist/ui/input.js +92 -169
- package/dist/ui/label.js +17 -22
- package/dist/ui/lib/date-utils.js +14 -11
- package/dist/ui/lib/motion.js +77 -36
- package/dist/ui/lib/utils.js +39 -16
- package/dist/ui/link.js +13 -24
- package/dist/ui/menubar.js +132 -210
- package/dist/ui/navigation-menu.js +164 -194
- package/dist/ui/number-input.js +72 -95
- package/dist/ui/pagination.js +122 -159
- package/dist/ui/popover.js +2 -131
- package/dist/ui/progress-ring.js +133 -143
- package/dist/ui/progress.js +51 -95
- package/dist/ui/radio.js +41 -50
- package/dist/ui/search-input.js +51 -53
- package/dist/ui/segmented-control.js +93 -114
- package/dist/ui/select.js +131 -157
- package/dist/ui/separator.js +15 -25
- package/dist/ui/sheet.js +135 -163
- package/dist/ui/sidebar.js +357 -600
- package/dist/ui/skeleton.js +179 -231
- package/dist/ui/slider.js +24 -34
- package/dist/ui/spinner.js +226 -205
- package/dist/ui/split-button.js +227 -276
- package/dist/ui/stack.js +56 -70
- package/dist/ui/stat-card.js +259 -251
- package/dist/ui/status-dot.js +67 -63
- package/dist/ui/stepper.js +119 -168
- package/dist/ui/switch.js +51 -54
- package/dist/ui/table.js +57 -90
- package/dist/ui/tabs.js +139 -156
- package/dist/ui/text.js +52 -59
- package/dist/ui/textarea.js +40 -57
- package/dist/ui/toast-types.js +0 -1
- package/dist/ui/toast.js +554 -536
- package/dist/ui/toaster.js +23 -33
- package/dist/ui/toggle-group.js +37 -41
- package/dist/ui/toggle.js +36 -40
- package/dist/ui/tooltip.js +80 -65
- package/dist/ui/tree-view/index.js +2 -6
- package/dist/ui/visually-hidden.js +12 -10
- package/llms-full.txt +1 -1
- package/llms.txt +12 -0
- package/package.json +3 -3
- package/dist/_chunks/date-time-picker.js +0 -851
- package/dist/_chunks/typing-indicator.js +0 -565
package/dist/ui/hover-card.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { cn as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
H.displayName = "HoverCard";
|
|
23
|
-
const M = C, w = r.forwardRef(({ className: t, align: n = "center", sideOffset: a = 4, children: s, ...i }, c) => {
|
|
24
|
-
const o = r.useContext(m);
|
|
25
|
-
return /* @__PURE__ */ e(x, { children: o && /* @__PURE__ */ e(u, { forceMount: !0, children: /* @__PURE__ */ e(
|
|
26
|
-
p,
|
|
27
|
-
{
|
|
28
|
-
ref: c,
|
|
29
|
-
align: n,
|
|
30
|
-
sideOffset: a,
|
|
31
|
-
forceMount: !0,
|
|
32
|
-
asChild: !0,
|
|
33
|
-
...i,
|
|
34
|
-
children: /* @__PURE__ */ e(
|
|
35
|
-
b.div,
|
|
36
|
-
{
|
|
37
|
-
initial: { opacity: 0, scale: 0.95 },
|
|
38
|
-
animate: { opacity: 1, scale: 1 },
|
|
39
|
-
exit: { opacity: 0, scale: 0.95 },
|
|
40
|
-
transition: { ...h.snappy, opacity: y.fade },
|
|
41
|
-
className: v(
|
|
42
|
-
"z-popover w-64 rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-05 shadow-floating outline-none",
|
|
43
|
-
t
|
|
44
|
-
),
|
|
45
|
-
children: s
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
) }) });
|
|
50
|
-
});
|
|
51
|
-
w.displayName = p.displayName;
|
|
52
|
-
export {
|
|
53
|
-
H as HoverCard,
|
|
54
|
-
w as HoverCardContent,
|
|
55
|
-
M as HoverCardTrigger
|
|
2
|
+
import { dt as e, ft as t, mt as n, pt as r } from "../_chunks/primitives.js";
|
|
3
|
+
import { a as i, c as a } from "../_chunks/framer.js";
|
|
4
|
+
import { springs as o, tweens as s } from "./lib/motion.js";
|
|
5
|
+
import { cn as c } from "./lib/utils.js";
|
|
6
|
+
import * as l from "react";
|
|
7
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
8
|
+
//#region src/ui/hover-card.tsx
|
|
9
|
+
var d = l.createContext(!1), f = ({ open: e, defaultOpen: t = !1, onOpenChange: n, ...i }) => {
|
|
10
|
+
let [a, o] = l.useState(t), s = e !== void 0, c = s ? e : a, f = l.useCallback((e) => {
|
|
11
|
+
s || o(e), n?.(e);
|
|
12
|
+
}, [s, n]);
|
|
13
|
+
return /* @__PURE__ */ u(d.Provider, {
|
|
14
|
+
value: c,
|
|
15
|
+
children: /* @__PURE__ */ u(r, {
|
|
16
|
+
open: c,
|
|
17
|
+
onOpenChange: f,
|
|
18
|
+
...i
|
|
19
|
+
})
|
|
20
|
+
});
|
|
56
21
|
};
|
|
22
|
+
f.displayName = "HoverCard";
|
|
23
|
+
var p = n, m = l.forwardRef(({ className: n, align: r = "center", sideOffset: f = 4, children: p, ...m }, h) => /* @__PURE__ */ u(a, { children: l.useContext(d) && /* @__PURE__ */ u(t, {
|
|
24
|
+
forceMount: !0,
|
|
25
|
+
children: /* @__PURE__ */ u(e, {
|
|
26
|
+
ref: h,
|
|
27
|
+
align: r,
|
|
28
|
+
sideOffset: f,
|
|
29
|
+
forceMount: !0,
|
|
30
|
+
asChild: !0,
|
|
31
|
+
...m,
|
|
32
|
+
children: /* @__PURE__ */ u(i.div, {
|
|
33
|
+
initial: {
|
|
34
|
+
opacity: 0,
|
|
35
|
+
scale: .95
|
|
36
|
+
},
|
|
37
|
+
animate: {
|
|
38
|
+
opacity: 1,
|
|
39
|
+
scale: 1
|
|
40
|
+
},
|
|
41
|
+
exit: {
|
|
42
|
+
opacity: 0,
|
|
43
|
+
scale: .95
|
|
44
|
+
},
|
|
45
|
+
transition: {
|
|
46
|
+
...o.snappy,
|
|
47
|
+
opacity: s.fade
|
|
48
|
+
},
|
|
49
|
+
className: c("z-popover w-64 rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-05 shadow-floating outline-hidden", n),
|
|
50
|
+
children: p
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
}) }));
|
|
54
|
+
m.displayName = e.displayName;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { f as HoverCard, m as HoverCardContent, p as HoverCardTrigger };
|
package/dist/ui/icon-button.js
CHANGED
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
);
|
|
24
|
-
f.displayName = "IconButton";
|
|
25
|
-
export {
|
|
26
|
-
f as IconButton
|
|
27
|
-
};
|
|
2
|
+
import { cn as e } from "./lib/utils.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
//#region src/ui/icon-button.tsx
|
|
7
|
+
var i = {
|
|
8
|
+
sm: "icon-sm",
|
|
9
|
+
md: "icon-md",
|
|
10
|
+
lg: "icon-lg"
|
|
11
|
+
}, a = n.forwardRef(({ icon: n, shape: a = "square", size: o = "md", className: s, loading: c, ...l }, u) => /* @__PURE__ */ r(t, {
|
|
12
|
+
ref: u,
|
|
13
|
+
size: i[o],
|
|
14
|
+
className: e(a === "circle" && "rounded-ds-full", s),
|
|
15
|
+
loading: c,
|
|
16
|
+
loadingPosition: "center",
|
|
17
|
+
...l,
|
|
18
|
+
children: n
|
|
19
|
+
}));
|
|
20
|
+
a.displayName = "IconButton";
|
|
21
|
+
//#endregion
|
|
22
|
+
export { a as IconButton };
|
package/dist/ui/icon-context.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/ui/icon-context.tsx
|
|
5
|
+
var n = e.createContext({});
|
|
6
|
+
function r({ size: r, stroke: i, children: a }) {
|
|
7
|
+
let o = e.useMemo(() => ({
|
|
8
|
+
size: r,
|
|
9
|
+
stroke: i
|
|
10
|
+
}), [r, i]);
|
|
11
|
+
return /* @__PURE__ */ t(n.Provider, {
|
|
12
|
+
value: o,
|
|
13
|
+
children: a
|
|
14
|
+
});
|
|
12
15
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
16
|
+
function i() {
|
|
17
|
+
return e.useContext(n);
|
|
15
18
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
i as IconProvider,
|
|
19
|
-
m as useIconContext
|
|
20
|
-
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { n as IconContext, r as IconProvider, i as useIconContext };
|
package/dist/ui/icon-group.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { cn as e } from "./lib/utils.js";
|
|
3
|
+
import { IconProvider as t } from "./icon-context.js";
|
|
4
|
+
import * as n from "react";
|
|
2
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
role: o,
|
|
23
|
-
"aria-label": o ? i : void 0,
|
|
24
|
-
className: n("inline-flex items-center", f[t], l),
|
|
25
|
-
children: p
|
|
26
|
-
}
|
|
27
|
-
) }));
|
|
28
|
-
d.displayName = "IconGroup";
|
|
29
|
-
export {
|
|
30
|
-
d as IconGroup
|
|
31
|
-
};
|
|
6
|
+
//#region src/ui/icon-group.tsx
|
|
7
|
+
var i = {
|
|
8
|
+
tight: "gap-0.5",
|
|
9
|
+
default: "gap-1",
|
|
10
|
+
loose: "gap-2"
|
|
11
|
+
}, a = n.forwardRef(({ size: n, stroke: a, gap: o = "default", label: s, role: c, className: l, children: u }, d) => /* @__PURE__ */ r(t, {
|
|
12
|
+
size: n,
|
|
13
|
+
stroke: a,
|
|
14
|
+
children: /* @__PURE__ */ r("div", {
|
|
15
|
+
ref: d,
|
|
16
|
+
role: c,
|
|
17
|
+
"aria-label": c ? s : void 0,
|
|
18
|
+
className: e("inline-flex items-center", i[o], l),
|
|
19
|
+
children: u
|
|
20
|
+
})
|
|
21
|
+
}));
|
|
22
|
+
a.displayName = "IconGroup";
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a as IconGroup };
|
package/dist/ui/icon.js
CHANGED
|
@@ -1,122 +1,202 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
2
|
+
import { a as e, c as t, n } from "../_chunks/framer.js";
|
|
3
|
+
import { springs as r, tweens as i } from "./lib/motion.js";
|
|
4
|
+
import { cn as a } from "./lib/utils.js";
|
|
5
|
+
import { Spinner as o } from "./spinner.js";
|
|
6
|
+
import { useIconContext as s } from "./icon-context.js";
|
|
7
|
+
import * as c from "react";
|
|
8
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
//#region src/ui/icon.tsx
|
|
10
|
+
var f = {
|
|
11
|
+
xs: 14,
|
|
12
|
+
sm: 16,
|
|
13
|
+
md: 18,
|
|
14
|
+
lg: 20,
|
|
15
|
+
xl: 24,
|
|
16
|
+
"2xl": 32
|
|
17
|
+
}, p = {
|
|
18
|
+
light: {
|
|
19
|
+
xs: 1.25,
|
|
20
|
+
sm: 1.5,
|
|
21
|
+
md: 1.5,
|
|
22
|
+
lg: 1.75,
|
|
23
|
+
xl: 2,
|
|
24
|
+
"2xl": 2
|
|
25
|
+
},
|
|
26
|
+
regular: {
|
|
27
|
+
xs: 1.5,
|
|
28
|
+
sm: 2,
|
|
29
|
+
md: 2,
|
|
30
|
+
lg: 2,
|
|
31
|
+
xl: 2,
|
|
32
|
+
"2xl": 2.25
|
|
33
|
+
},
|
|
34
|
+
bold: {
|
|
35
|
+
xs: 2,
|
|
36
|
+
sm: 2.5,
|
|
37
|
+
md: 2.5,
|
|
38
|
+
lg: 2.5,
|
|
39
|
+
xl: 2.5,
|
|
40
|
+
"2xl": 2.5
|
|
41
|
+
}
|
|
42
|
+
}, m = {
|
|
43
|
+
spin: {
|
|
44
|
+
animate: { rotate: 360 },
|
|
45
|
+
transition: {
|
|
46
|
+
duration: 1,
|
|
47
|
+
repeat: Infinity,
|
|
48
|
+
ease: "linear"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
pulse: {
|
|
52
|
+
animate: { scale: [
|
|
53
|
+
1,
|
|
54
|
+
1.15,
|
|
55
|
+
1
|
|
56
|
+
] },
|
|
57
|
+
transition: {
|
|
58
|
+
duration: 2,
|
|
59
|
+
repeat: Infinity,
|
|
60
|
+
ease: "easeInOut"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
bounce: {
|
|
64
|
+
animate: { y: [
|
|
65
|
+
0,
|
|
66
|
+
-4,
|
|
67
|
+
0
|
|
68
|
+
] },
|
|
69
|
+
transition: {
|
|
70
|
+
duration: 1.5,
|
|
71
|
+
repeat: Infinity,
|
|
72
|
+
ease: "easeInOut"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}, h = {
|
|
76
|
+
xs: "sm",
|
|
77
|
+
sm: "sm",
|
|
78
|
+
md: "md",
|
|
79
|
+
lg: "md",
|
|
80
|
+
xl: "lg",
|
|
81
|
+
"2xl": "lg"
|
|
82
|
+
}, g = c.forwardRef(({ icon: c, size: g, stroke: _, label: v, animate: y, state: b, className: x }, S) => {
|
|
83
|
+
let C = s(), w = g ?? C.size ?? "md", T = _ ?? C.stroke ?? "regular", E = f[w], D = p[T][w], O = n();
|
|
84
|
+
if (b && b !== "idle") {
|
|
85
|
+
let n = h[w], r = b === "loading" ? "spinning" : b;
|
|
86
|
+
return /* @__PURE__ */ u(t, {
|
|
87
|
+
mode: "wait",
|
|
88
|
+
children: /* @__PURE__ */ u(e.span, {
|
|
89
|
+
initial: { opacity: 0 },
|
|
90
|
+
animate: { opacity: 1 },
|
|
91
|
+
exit: { opacity: 0 },
|
|
92
|
+
transition: i.fade,
|
|
93
|
+
className: "inline-flex",
|
|
94
|
+
children: /* @__PURE__ */ u(o, {
|
|
95
|
+
size: n,
|
|
96
|
+
state: r,
|
|
97
|
+
variant: "bare"
|
|
98
|
+
})
|
|
99
|
+
}, "spinner")
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (y === "draw" && !O) {
|
|
103
|
+
let t = {
|
|
104
|
+
initial: {
|
|
105
|
+
pathLength: 0,
|
|
106
|
+
opacity: 0
|
|
107
|
+
},
|
|
108
|
+
animate: {
|
|
109
|
+
pathLength: 1,
|
|
110
|
+
opacity: 1
|
|
111
|
+
},
|
|
112
|
+
transition: {
|
|
113
|
+
pathLength: {
|
|
114
|
+
duration: .35,
|
|
115
|
+
ease: "easeOut"
|
|
116
|
+
},
|
|
117
|
+
opacity: { duration: .1 }
|
|
118
|
+
}
|
|
119
|
+
}, n = c.displayName ?? "", r = n === "Check" || n === "IconCheck" || n === "CircleCheck";
|
|
120
|
+
if (r || n === "X" || n === "IconX") return /* @__PURE__ */ u("svg", {
|
|
121
|
+
ref: S,
|
|
122
|
+
width: E,
|
|
123
|
+
height: E,
|
|
124
|
+
viewBox: "0 0 24 24",
|
|
125
|
+
fill: "none",
|
|
126
|
+
stroke: "currentColor",
|
|
127
|
+
strokeWidth: D,
|
|
128
|
+
strokeLinecap: "round",
|
|
129
|
+
strokeLinejoin: "round",
|
|
130
|
+
className: x,
|
|
131
|
+
"aria-hidden": v ? void 0 : "true",
|
|
132
|
+
"aria-label": v,
|
|
133
|
+
role: v ? "img" : void 0,
|
|
134
|
+
children: r ? /* @__PURE__ */ u(e.polyline, {
|
|
135
|
+
points: "4 12 10 18 20 6",
|
|
136
|
+
...t
|
|
137
|
+
}) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(e.line, {
|
|
138
|
+
x1: "6",
|
|
139
|
+
y1: "6",
|
|
140
|
+
x2: "18",
|
|
141
|
+
y2: "18",
|
|
142
|
+
...t
|
|
143
|
+
}), /* @__PURE__ */ u(e.line, {
|
|
144
|
+
x1: "18",
|
|
145
|
+
y1: "6",
|
|
146
|
+
x2: "6",
|
|
147
|
+
y2: "18",
|
|
148
|
+
...t,
|
|
149
|
+
transition: {
|
|
150
|
+
pathLength: {
|
|
151
|
+
duration: .25,
|
|
152
|
+
ease: "easeOut",
|
|
153
|
+
delay: .1
|
|
154
|
+
},
|
|
155
|
+
opacity: {
|
|
156
|
+
duration: .1,
|
|
157
|
+
delay: .1
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
})] })
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
let k = typeof y == "string" && y !== "none" && y !== "draw" ? m[y] : null, A = typeof y == "object" && y && (y.rotate !== void 0 || y.scale !== void 0) ? y : null;
|
|
164
|
+
if (O || !k && !A) return v ? /* @__PURE__ */ u(c, {
|
|
165
|
+
ref: S,
|
|
166
|
+
size: E,
|
|
167
|
+
stroke: D,
|
|
168
|
+
className: x,
|
|
169
|
+
title: v,
|
|
170
|
+
"aria-label": v,
|
|
171
|
+
role: "img"
|
|
172
|
+
}) : /* @__PURE__ */ u(c, {
|
|
173
|
+
ref: S,
|
|
174
|
+
size: E,
|
|
175
|
+
stroke: D,
|
|
176
|
+
className: x,
|
|
177
|
+
"aria-hidden": "true"
|
|
178
|
+
});
|
|
179
|
+
let j = k ?? {
|
|
180
|
+
animate: A,
|
|
181
|
+
transition: r.snappy
|
|
182
|
+
}, M = v ? /* @__PURE__ */ u(c, {
|
|
183
|
+
size: E,
|
|
184
|
+
stroke: D,
|
|
185
|
+
title: v,
|
|
186
|
+
"aria-label": v,
|
|
187
|
+
role: "img"
|
|
188
|
+
}) : /* @__PURE__ */ u(c, {
|
|
189
|
+
size: E,
|
|
190
|
+
stroke: D,
|
|
191
|
+
"aria-hidden": "true"
|
|
192
|
+
});
|
|
193
|
+
return /* @__PURE__ */ u(e.span, {
|
|
194
|
+
ref: S,
|
|
195
|
+
className: a("inline-flex", x),
|
|
196
|
+
...j,
|
|
197
|
+
children: M
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
g.displayName = "Icon";
|
|
201
|
+
//#endregion
|
|
202
|
+
export { g as Icon };
|