@devalok/shilp-sutra 0.17.1 → 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 +41 -31
- 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 -164
- 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 -448
- 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 +674 -656
- 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/_chunks/avatar.js
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
import { jsxs as p, jsx as l } from "react/jsx-runtime";
|
|
3
3
|
import * as i from "react";
|
|
4
4
|
import { R as n, I as o, F as t } from "./primitives.js";
|
|
5
|
-
import {
|
|
5
|
+
import { ag as u } from "./vendor-utils.js";
|
|
6
|
+
import { t as h } from "./motion2.js";
|
|
6
7
|
import { c as r } from "./utils.js";
|
|
7
|
-
|
|
8
|
+
import { m as w } from "./motion.js";
|
|
9
|
+
const x = u("relative flex shrink-0 overflow-hidden", {
|
|
8
10
|
variants: {
|
|
9
11
|
size: {
|
|
10
12
|
xs: "h-ds-xs w-ds-xs",
|
|
@@ -20,31 +22,31 @@ const h = u("relative flex shrink-0 overflow-hidden", {
|
|
|
20
22
|
}
|
|
21
23
|
},
|
|
22
24
|
defaultVariants: { size: "md", shape: "circle" }
|
|
23
|
-
}),
|
|
24
|
-
online: "bg-success",
|
|
25
|
-
offline: "bg-
|
|
26
|
-
busy: "bg-error",
|
|
27
|
-
away: "bg-warning"
|
|
28
|
-
},
|
|
25
|
+
}), g = {
|
|
26
|
+
online: "bg-success-9",
|
|
27
|
+
offline: "bg-surface-3",
|
|
28
|
+
busy: "bg-error-9",
|
|
29
|
+
away: "bg-warning-9"
|
|
30
|
+
}, b = {
|
|
29
31
|
online: "Online",
|
|
30
32
|
offline: "Offline",
|
|
31
33
|
busy: "Busy",
|
|
32
34
|
away: "Away"
|
|
33
|
-
},
|
|
35
|
+
}, y = {
|
|
34
36
|
xs: "h-ds-02b w-ds-02b",
|
|
35
37
|
sm: "h-[8px] w-[8px]",
|
|
36
38
|
md: "h-ds-03 w-ds-03",
|
|
37
39
|
lg: "h-[12px] w-[12px]",
|
|
38
40
|
xl: "h-ds-04 w-ds-04"
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
41
|
+
}, N = i.forwardRef(({ className: s, size: a, shape: e, status: d, children: m, ...c }, f) => p("span", { className: "relative inline-flex shrink-0", children: [l(n, { ref: f, className: r(x({ size: a, shape: e }), s), ...c, children: m }), d && l("span", { className: r("absolute bottom-0 right-0 rounded-ds-full ring-2 ring-surface-1", g[d], y[a ?? "md"]), role: "img", "aria-label": b[d] })] }));
|
|
42
|
+
N.displayName = n.displayName;
|
|
43
|
+
const v = i.forwardRef(({ className: s, ...a }, e) => l(w.span, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: h.fade, className: "h-full w-full", children: l(o, { ref: e, className: r("aspect-square h-full w-full", s), ...a }) }));
|
|
44
|
+
v.displayName = o.displayName;
|
|
45
|
+
const R = i.forwardRef(({ className: s, ...a }, e) => l(t, { ref: e, className: r("flex h-full w-full items-center justify-center rounded-ds-full bg-accent-2 text-accent-11", s), ...a }));
|
|
46
|
+
R.displayName = t.displayName;
|
|
45
47
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
N as A,
|
|
49
|
+
v as a,
|
|
50
|
+
R as b,
|
|
51
|
+
x as c
|
|
50
52
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import * as o from "react";
|
|
4
|
+
import { c as f } from "./utils.js";
|
|
5
|
+
const l = o.createContext({});
|
|
6
|
+
function h() {
|
|
7
|
+
return o.useContext(l);
|
|
8
|
+
}
|
|
9
|
+
const p = o.forwardRef(({ className: u, variant: t, color: n, size: e, orientation: i = "horizontal", children: d, ...s }, c) => {
|
|
10
|
+
const a = o.useMemo(() => ({ variant: t, color: n, size: e }), [t, n, e]);
|
|
11
|
+
return r(l.Provider, { value: a, children: r("div", { ref: c, role: "group", className: f("inline-flex", i === "horizontal" ? [
|
|
12
|
+
"flex-row",
|
|
13
|
+
"[&>*:not(:first-child)]:rounded-l-none",
|
|
14
|
+
"[&>*:not(:last-child)]:rounded-r-none",
|
|
15
|
+
"[&>*:not(:first-child)]:-ml-px"
|
|
16
|
+
] : [
|
|
17
|
+
"flex-col",
|
|
18
|
+
"[&>*:not(:first-child)]:rounded-t-none",
|
|
19
|
+
"[&>*:not(:last-child)]:rounded-b-none",
|
|
20
|
+
"[&>*:not(:first-child)]:-mt-px"
|
|
21
|
+
], u), ...s, children: d }) });
|
|
22
|
+
});
|
|
23
|
+
p.displayName = "ButtonGroup";
|
|
24
|
+
export {
|
|
25
|
+
p as B,
|
|
26
|
+
h as u
|
|
27
|
+
};
|
package/dist/_chunks/button.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
2
|
+
import { jsx as e, jsxs as C } from "react/jsx-runtime";
|
|
3
|
+
import { ag as K } from "./vendor-utils.js";
|
|
4
|
+
import { IconCheck as L, IconX as O } from "@tabler/icons-react";
|
|
5
|
+
import { S as P, a as Q } from "./primitives.js";
|
|
6
|
+
import * as n from "react";
|
|
7
|
+
import { u as U } from "./button-group.js";
|
|
8
|
+
import { s as Y } from "./motion2.js";
|
|
9
|
+
import { c as a } from "./utils.js";
|
|
10
|
+
import { S as Z } from "./spinner.js";
|
|
11
|
+
import { A as _, m as $ } from "./motion.js";
|
|
12
|
+
const R = K("inline-flex items-center justify-center gap-ds-03 whitespace-nowrap font-sans font-semibold select-none border border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-action-disabled", {
|
|
9
13
|
variants: {
|
|
10
14
|
variant: {
|
|
11
15
|
solid: "",
|
|
@@ -15,7 +19,7 @@ const p = V("inline-flex items-center justify-center gap-ds-03 whitespace-nowrap
|
|
|
15
19
|
ghost: "",
|
|
16
20
|
destructive: "",
|
|
17
21
|
// alias → solid + error
|
|
18
|
-
link: "text-
|
|
22
|
+
link: "text-info-11 underline-offset-4 hover:underline active:opacity-80"
|
|
19
23
|
},
|
|
20
24
|
color: {
|
|
21
25
|
default: "",
|
|
@@ -34,30 +38,30 @@ const p = V("inline-flex items-center justify-center gap-ds-03 whitespace-nowrap
|
|
|
34
38
|
},
|
|
35
39
|
compoundVariants: [
|
|
36
40
|
// solid + default (primary)
|
|
37
|
-
{ variant: "solid", color: "default", className: "bg-
|
|
41
|
+
{ variant: "solid", color: "default", className: "bg-accent-9 text-accent-fg hover:bg-accent-10 active:bg-accent-10 shadow-01 hover:shadow-brand" },
|
|
38
42
|
// "default" alias → same as solid + default
|
|
39
|
-
{ variant: "default", color: "default", className: "bg-
|
|
40
|
-
{ variant: "default", color: "error", className: "bg-error text-
|
|
43
|
+
{ variant: "default", color: "default", className: "bg-accent-9 text-accent-fg hover:bg-accent-10 active:bg-accent-10 shadow-01 hover:shadow-brand" },
|
|
44
|
+
{ variant: "default", color: "error", className: "bg-error-9 text-accent-fg hover:bg-error-9 active:bg-error-9 shadow-01" },
|
|
41
45
|
// "destructive" alias → solid + error
|
|
42
|
-
{ variant: "destructive", color: "default", className: "bg-error text-
|
|
43
|
-
{ variant: "destructive", color: "error", className: "bg-error text-
|
|
46
|
+
{ variant: "destructive", color: "default", className: "bg-error-9 text-accent-fg hover:bg-error-9 active:bg-error-9 shadow-01" },
|
|
47
|
+
{ variant: "destructive", color: "error", className: "bg-error-9 text-accent-fg hover:bg-error-9 active:bg-error-9 shadow-01" },
|
|
44
48
|
// solid + error
|
|
45
|
-
{ variant: "solid", color: "error", className: "bg-error text-
|
|
49
|
+
{ variant: "solid", color: "error", className: "bg-error-9 text-accent-fg hover:bg-error-9 active:bg-error-9 shadow-01" },
|
|
46
50
|
// outline + default (secondary)
|
|
47
|
-
{ variant: "outline", color: "default", className: "bg-transparent text-
|
|
51
|
+
{ variant: "outline", color: "default", className: "bg-transparent text-accent-11 border-accent-7 hover:bg-accent-2 active:bg-surface-4" },
|
|
48
52
|
// outline + error (error-ghost)
|
|
49
|
-
{ variant: "outline", color: "error", className: "bg-transparent text-error border border-
|
|
53
|
+
{ variant: "outline", color: "error", className: "bg-transparent text-error-11 border border-error-7 hover:bg-error-3 active:bg-error-3" },
|
|
50
54
|
// ghost + default
|
|
51
|
-
{ variant: "ghost", color: "default", className: "bg-transparent text-
|
|
55
|
+
{ variant: "ghost", color: "default", className: "bg-transparent text-surface-fg-muted hover:bg-surface-2 hover:text-surface-fg active:bg-surface-4" },
|
|
52
56
|
// ghost + error
|
|
53
|
-
{ variant: "ghost", color: "error", className: "bg-transparent text-error hover:bg-error-
|
|
57
|
+
{ variant: "ghost", color: "error", className: "bg-transparent text-error-11 hover:bg-error-3 hover:text-error-11 active:bg-error-3" }
|
|
54
58
|
],
|
|
55
59
|
defaultVariants: {
|
|
56
60
|
variant: "solid",
|
|
57
61
|
color: "default",
|
|
58
62
|
size: "md"
|
|
59
63
|
}
|
|
60
|
-
}),
|
|
64
|
+
}), W = {
|
|
61
65
|
sm: "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
62
66
|
md: "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
63
67
|
lg: "h-ico-md w-ico-md [&>svg]:h-ico-md [&>svg]:w-ico-md",
|
|
@@ -65,7 +69,7 @@ const p = V("inline-flex items-center justify-center gap-ds-03 whitespace-nowrap
|
|
|
65
69
|
"icon-sm": "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
66
70
|
"icon-md": "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
67
71
|
"icon-lg": "h-ico-md w-ico-md [&>svg]:h-ico-md [&>svg]:w-ico-md"
|
|
68
|
-
},
|
|
72
|
+
}, ee = {
|
|
69
73
|
sm: "sm",
|
|
70
74
|
md: "sm",
|
|
71
75
|
lg: "md",
|
|
@@ -73,23 +77,37 @@ const p = V("inline-flex items-center justify-center gap-ds-03 whitespace-nowrap
|
|
|
73
77
|
"icon-sm": "sm",
|
|
74
78
|
"icon-md": "sm",
|
|
75
79
|
"icon-lg": "md"
|
|
76
|
-
},
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
|
|
80
|
+
}, re = n.forwardRef(({ className: h, variant: A, color: B, size: V, asChild: E = !1, startIcon: b, endIcon: p, loading: F = !1, loadingPosition: d = "start", fullWidth: w = !1, disabled: x, onClick: M, onClickAsync: m, asyncFeedbackDuration: T = 1500, children: c, ...N }, y) => {
|
|
81
|
+
const u = U(), S = A ?? u.variant, z = B ?? u.color, i = V ?? u.size ?? "md", f = W[i], G = ee[i], [t, l] = n.useState("idle"), j = n.useRef(), o = n.useRef(!0);
|
|
82
|
+
n.useEffect(() => () => {
|
|
83
|
+
o.current = !1, clearTimeout(j.current);
|
|
84
|
+
}, []);
|
|
85
|
+
const I = (v) => {
|
|
86
|
+
!m || t !== "idle" || (l("loading"), m(v).then(() => {
|
|
87
|
+
o.current && l("success");
|
|
88
|
+
}).catch(() => {
|
|
89
|
+
o.current && l("error");
|
|
90
|
+
}).finally(() => {
|
|
91
|
+
o.current && (j.current = setTimeout(() => {
|
|
92
|
+
o.current && l("idle");
|
|
93
|
+
}, T));
|
|
94
|
+
}));
|
|
95
|
+
}, k = !!m, r = k ? t === "loading" : F, s = t === "success" || t === "error", g = r ? e(Z, { size: G }) : null;
|
|
96
|
+
if (E) {
|
|
97
|
+
const v = {
|
|
98
|
+
className: a(R({ variant: S, color: z, size: i }), w && "w-full", h),
|
|
99
|
+
ref: y,
|
|
100
|
+
disabled: x || r,
|
|
101
|
+
"aria-busy": r || void 0,
|
|
102
|
+
...N
|
|
85
103
|
};
|
|
86
|
-
return
|
|
104
|
+
return e(P, { ...v, children: e(Q, { children: c }) });
|
|
87
105
|
}
|
|
88
|
-
const
|
|
89
|
-
return
|
|
106
|
+
const X = () => r && d === "start" ? g : b ? e("span", { className: a("inline-flex shrink-0 items-center justify-center", f), children: b }) : null, q = () => r && d === "end" ? g : p ? e("span", { className: a("inline-flex shrink-0 items-center justify-center", f), children: p }) : null, D = () => r && d === "center" ? C("span", { className: "relative inline-flex items-center justify-center", children: [e("span", { className: "invisible", children: c }), e("span", { className: "absolute inset-0 flex items-center justify-center", children: g })] }) : c, H = s ? t === "success" ? "bg-success-9 text-accent-fg border-transparent hover:bg-success-9" : "bg-error-9 text-accent-fg border-transparent hover:bg-error-9" : void 0, J = s ? e(_, { mode: "wait", children: e($.span, { initial: { opacity: 0, scale: 0.5 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.5 }, transition: Y.bouncy, className: a("inline-flex shrink-0 items-center justify-center", f), children: t === "success" ? e(L, { className: "h-full w-full" }) : e(O, { className: "h-full w-full" }) }, t) }) : null;
|
|
107
|
+
return C("button", { ...N, className: a(R({ variant: S, color: z, size: i }), w && "w-full", !r && !s && "active:scale-[0.97] transition-transform duration-100", H, s && "transition-colors duration-200", h), ref: y, disabled: x || r || s, "aria-busy": r || void 0, onClick: k ? I : M, children: [s ? J : X(), s ? c : D(), s ? null : q()] });
|
|
90
108
|
});
|
|
91
|
-
|
|
109
|
+
re.displayName = "Button";
|
|
92
110
|
export {
|
|
93
|
-
|
|
94
|
-
|
|
111
|
+
re as B,
|
|
112
|
+
R as b
|
|
95
113
|
};
|
package/dist/_chunks/card.js
CHANGED
|
@@ -1,40 +1,50 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import * as o from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
4
|
+
import { bc as f, bd as h } from "./primitives.js";
|
|
5
|
+
import { s as l, m as v } from "./motion2.js";
|
|
6
|
+
import { c as d } from "./utils.js";
|
|
7
|
+
import { m } from "./motion.js";
|
|
8
|
+
import { ag as N } from "./vendor-utils.js";
|
|
9
|
+
const C = o.forwardRef(({ className: e, error: a, checked: r, defaultChecked: n, onCheckedChange: t, ...i }, b) => {
|
|
10
|
+
const [u, p] = o.useState(n ?? !1), g = r !== void 0 ? r : u, w = o.useCallback((c) => {
|
|
11
|
+
r === void 0 && p(c), t == null || t(c);
|
|
12
|
+
}, [r, t]);
|
|
13
|
+
return s(f, { className: d("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-ds-full border-2 border-surface-border-strong shadow-01 transition-colors duration-fast-01 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-action-disabled data-[state=checked]:border-transparent data-[state=checked]:bg-accent-9 data-[state=unchecked]:bg-surface-border-strong", a && "border-error-7 data-[state=checked]:bg-error-9", e), checked: r, defaultChecked: n, onCheckedChange: w, ...i, ref: b, children: s(h, { asChild: !0, children: s(m.span, { className: "pointer-events-none block h-ico-md w-ico-md rounded-ds-full bg-accent-fg shadow-02 ring-0", animate: { x: g ? 20 : 0 }, transition: l.snappy }) }) });
|
|
14
|
+
});
|
|
15
|
+
C.displayName = f.displayName;
|
|
16
|
+
const y = N("rounded-ds-lg text-surface-fg", {
|
|
10
17
|
variants: {
|
|
11
18
|
variant: {
|
|
12
|
-
default: "bg-
|
|
13
|
-
elevated: "bg-
|
|
14
|
-
outline: "bg-transparent border-2 border-border shadow-none",
|
|
15
|
-
flat: "bg-
|
|
19
|
+
default: "bg-surface-1 border border-surface-border shadow-01",
|
|
20
|
+
elevated: "bg-surface-1 border border-surface-border shadow-02",
|
|
21
|
+
outline: "bg-transparent border-2 border-surface-border-strong shadow-none",
|
|
22
|
+
flat: "bg-surface-2 border-none shadow-none"
|
|
16
23
|
}
|
|
17
24
|
},
|
|
18
25
|
defaultVariants: { variant: "default" }
|
|
19
|
-
}),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
}), x = o.forwardRef(({ className: e, variant: a, interactive: r, ...n }, t) => {
|
|
27
|
+
const i = d(y({ variant: a }), r && "hover:shadow-02 hover:border-surface-border-strong cursor-pointer", e);
|
|
28
|
+
return r ? s(m.div, { ref: t, whileHover: { y: -2 }, whileTap: { scale: 0.98 }, transition: l.snappy, className: i, ...v(n) }) : s("div", { ref: t, className: i, ...n });
|
|
29
|
+
});
|
|
30
|
+
x.displayName = "Card";
|
|
31
|
+
const R = o.forwardRef(({ className: e, ...a }, r) => s("div", { ref: r, className: d("flex flex-col space-y-ds-02b p-ds-06", e), ...a }));
|
|
32
|
+
R.displayName = "CardHeader";
|
|
33
|
+
const k = o.forwardRef(({ className: e, ...a }, r) => s("div", { ref: r, className: d("font-sans font-semibold leading-ds-none tracking-ds-tight text-surface-fg", e), ...a }));
|
|
34
|
+
k.displayName = "CardTitle";
|
|
35
|
+
const T = o.forwardRef(({ className: e, ...a }, r) => s("div", { ref: r, className: d("text-ds-md text-surface-fg-muted", e), ...a }));
|
|
36
|
+
T.displayName = "CardDescription";
|
|
37
|
+
const H = o.forwardRef(({ className: e, ...a }, r) => s("div", { ref: r, className: d("p-ds-06 pt-0", e), ...a }));
|
|
38
|
+
H.displayName = "CardContent";
|
|
39
|
+
const S = o.forwardRef(({ className: e, ...a }, r) => s("div", { ref: r, className: d("flex items-center p-ds-06 pt-0", e), ...a }));
|
|
40
|
+
S.displayName = "CardFooter";
|
|
31
41
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
x as C,
|
|
43
|
+
C as S,
|
|
44
|
+
R as a,
|
|
45
|
+
k as b,
|
|
46
|
+
H as c,
|
|
47
|
+
T as d,
|
|
48
|
+
S as e,
|
|
49
|
+
y as f
|
|
40
50
|
};
|
package/dist/_chunks/checkbox.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { C as
|
|
4
|
-
import { IconMinus as
|
|
5
|
-
import * as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { C as a, b as m } from "./primitives.js";
|
|
4
|
+
import { IconMinus as l, IconCheck as f } from "@tabler/icons-react";
|
|
5
|
+
import * as b from "react";
|
|
6
|
+
import { s as u } from "./motion2.js";
|
|
7
|
+
import { c as h } from "./utils.js";
|
|
8
|
+
import { A as p, m as x } from "./motion.js";
|
|
9
|
+
const g = b.forwardRef(({ className: c, error: i, indeterminate: r, checked: s, ...o }, n) => {
|
|
10
|
+
const t = r ? "indeterminate" : s, d = t === !0 || t === "indeterminate";
|
|
11
|
+
return e(a, { ref: n, checked: t, className: h("peer flex items-center justify-center h-ico-md w-ico-md shrink-0 rounded-ds-sm", "border border-surface-border-strong", "bg-surface-3", "transition-colors duration-fast-01", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2", "disabled:cursor-not-allowed disabled:opacity-action-disabled", "data-[state=checked]:bg-accent-9 data-[state=checked]:border-accent-7 data-[state=checked]:text-accent-fg", "data-[state=indeterminate]:bg-accent-9 data-[state=indeterminate]:border-accent-7 data-[state=indeterminate]:text-accent-fg", i && "border-error-7", c), ...o, children: e(p, { children: d && e(m, { forceMount: !0, asChild: !0, children: e(x.span, { className: "flex items-center justify-center text-current", initial: { scale: 0, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0, opacity: 0 }, transition: u.bouncy, children: t === "indeterminate" ? e(l, { className: "h-ico-sm w-ico-sm" }) : e(f, { className: "h-ico-sm w-ico-sm" }) }) }) }) });
|
|
10
12
|
});
|
|
11
|
-
|
|
13
|
+
g.displayName = a.displayName;
|
|
12
14
|
export {
|
|
13
|
-
|
|
15
|
+
g as C
|
|
14
16
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function a(t) {
|
|
3
|
+
const n = typeof t == "string" ? new Date(t) : t, f = (/* @__PURE__ */ new Date()).getTime() - n.getTime(), o = Math.floor(f / 6e4);
|
|
4
|
+
if (o < 1) return "Just now";
|
|
5
|
+
if (o < 60) return `${o}m ago`;
|
|
6
|
+
const e = Math.floor(o / 60);
|
|
7
|
+
if (e < 24) return `${e}h ago`;
|
|
8
|
+
const r = Math.floor(e / 24);
|
|
9
|
+
return r < 7 ? `${r}d ago` : n.toLocaleDateString("en-IN", { month: "short", day: "numeric" });
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
a as f
|
|
13
|
+
};
|
package/dist/_chunks/form.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
3
3
|
import * as e from "react";
|
|
4
|
-
import { c as
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
return
|
|
4
|
+
import { c as m } from "./utils.js";
|
|
5
|
+
const i = e.createContext({}), u = e.forwardRef(({ className: a, helperTextId: n, state: t = "helper", required: r, children: l, ...s }, o) => {
|
|
6
|
+
const c = e.useId(), x = n || `${c}-helper`, p = e.useMemo(() => ({ state: t, helperTextId: x, required: r }), [t, x, r]);
|
|
7
|
+
return d(i.Provider, { value: p, children: d("div", { ref: o, className: m("flex flex-col gap-ds-02", a), ...s, children: l }) });
|
|
8
8
|
});
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
helper: "text-
|
|
12
|
-
error: "text-
|
|
13
|
-
warning: "text-
|
|
14
|
-
success: "text-
|
|
15
|
-
},
|
|
16
|
-
const
|
|
17
|
-
return
|
|
9
|
+
u.displayName = "FormField";
|
|
10
|
+
const f = {
|
|
11
|
+
helper: "text-surface-fg-subtle",
|
|
12
|
+
error: "text-error-11",
|
|
13
|
+
warning: "text-warning-11",
|
|
14
|
+
success: "text-success-11"
|
|
15
|
+
}, F = e.forwardRef(({ className: a, id: n, state: t, ...r }, l) => {
|
|
16
|
+
const s = e.useContext(i), o = t ?? s.state ?? "helper", c = n ?? s.helperTextId;
|
|
17
|
+
return d("p", { ref: l, id: c, role: o === "error" ? "alert" : void 0, className: m("text-ds-sm", f[o], a), ...r });
|
|
18
18
|
});
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
return e.useContext(
|
|
19
|
+
F.displayName = "FormHelperText";
|
|
20
|
+
function I() {
|
|
21
|
+
return e.useContext(i);
|
|
22
22
|
}
|
|
23
23
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
u as F,
|
|
25
|
+
F as a,
|
|
26
|
+
I as u
|
|
27
27
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
const o = n.forwardRef(({ href: t, ...e }, i) => /* @__PURE__ */ r("a", { ref: i, href: t, ...e }));
|
|
5
|
+
o.displayName = "DefaultLink";
|
|
6
|
+
const a = n.createContext(o);
|
|
7
|
+
function s({
|
|
8
|
+
component: t,
|
|
9
|
+
children: e
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ r(a.Provider, { value: t, children: e });
|
|
12
|
+
}
|
|
13
|
+
function f() {
|
|
14
|
+
return n.useContext(a);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
s as L,
|
|
18
|
+
f as u
|
|
19
|
+
};
|