@datum-cloud/datum-ui 0.3.2-dev.5bd364b → 0.5.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/README.md +118 -49
- package/dist/alert/index.mjs +2 -3
- package/dist/{alert-BC2Mccfo.mjs → alert-BDj6od5I.mjs} +2 -4
- package/dist/app-navigation/index.mjs +4 -12
- package/dist/{app-navigation-CCvjPijd.mjs → app-navigation-84ro28PU.mjs} +5 -8
- package/dist/autocomplete/index.mjs +2 -7
- package/dist/{autocomplete-DcKO7pj5.mjs → autocomplete-V5-qslzS.mjs} +5 -7
- package/dist/avatar/index.mjs +2 -0
- package/dist/avatar-BtKVcvO4.mjs +28 -0
- package/dist/avatar-stack/index.mjs +2 -5
- package/dist/{avatar-stack-B21McFeb.mjs → avatar-stack-oVr8tsU7.mjs} +4 -31
- package/dist/badge/index.mjs +2 -3
- package/dist/{badge-bFgeYceE.mjs → badge-DJR33ftJ.mjs} +2 -4
- package/dist/breadcrumb/index.mjs +2 -4
- package/dist/{breadcrumb-BGYJgom_.mjs → breadcrumb-B-9G347O.mjs} +2 -4
- package/dist/button/index.mjs +3 -4
- package/dist/{button-C1wRfGtT.mjs → button-BllvE9Lm.mjs} +3 -5
- package/dist/{button-AzpnV-WB.mjs → button-D3RrsMfQ.mjs} +2 -4
- package/dist/{link-button-TIF2Zdrk.mjs → button-fO8nazJE.mjs} +3 -5
- package/dist/button-group/index.mjs +2 -5
- package/dist/{button-group-C1IB2K5s.mjs → button-group-CYPka2zz.mjs} +3 -5
- package/dist/calendar/index.mjs +2 -5
- package/dist/{calendar-DlIHeWb0.mjs → calendar-DEkCw7I1.mjs} +4 -6
- package/dist/{calendar-date-picker-Bw6Mrr-P.mjs → calendar-date-picker-DWK94_DC.mjs} +6 -8
- package/dist/card/index.mjs +2 -4
- package/dist/{card-3Kd0VdNf.mjs → card-DKG1Cwlj.mjs} +3 -6
- package/dist/chart/index.mjs +2 -4
- package/dist/{chart-BZqUKpkh.mjs → chart-CUa21ynK.mjs} +2 -4
- package/dist/checkbox/index.mjs +2 -4
- package/dist/{checkbox-LG1OKTpG.mjs → checkbox-I5BvrMPe.mjs} +3 -6
- package/dist/{close.icon-CMNMoXM_.mjs → close.icon-HCfS4Y-N.mjs} +2 -4
- package/dist/{cn-DWCc1QRE.mjs → cn-D2KYQ917.mjs} +1 -3
- package/dist/code-editor/index.mjs +2 -0
- package/dist/{col-DCneNxQj.mjs → col-q-J99UHe.mjs} +2 -7
- package/dist/collapsible/index.mjs +2 -3
- package/dist/{collapsible-Bt9UYfv3.mjs → collapsible-CUphkSBt.mjs} +1 -3
- package/dist/command/index.mjs +2 -5
- package/dist/{command-s0Yv3abE.mjs → command-DqHWukGK.mjs} +3 -5
- package/dist/components/base/avatar/index.d.ts +2 -0
- package/dist/components/base/avatar/index.d.ts.map +1 -0
- package/dist/components/base/index.d.ts +1 -0
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/features/code-editor/code-editor-tabs.d.ts +63 -0
- package/dist/components/features/code-editor/code-editor-tabs.d.ts.map +1 -0
- package/dist/components/features/code-editor/code-editor.d.ts +58 -0
- package/dist/components/features/code-editor/code-editor.d.ts.map +1 -0
- package/dist/components/features/code-editor/index.d.ts +6 -0
- package/dist/components/features/code-editor/index.d.ts.map +1 -0
- package/dist/components/features/code-editor/lib/editor.d.ts +7 -0
- package/dist/components/features/code-editor/lib/editor.d.ts.map +1 -0
- package/dist/components/features/code-editor/types.d.ts +98 -0
- package/dist/components/features/code-editor/types.d.ts.map +1 -0
- package/dist/components/features/index.d.ts +1 -0
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/components/toast.d.ts +2 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/data-table/index.mjs +21 -51
- package/dist/date-picker/index.mjs +3 -10
- package/dist/dialog/index.mjs +2 -5
- package/dist/{dialog-bnMMf9GD.mjs → dialog-Bm2H9lrx.mjs} +4 -6
- package/dist/{dialog-DXBaT9gA.mjs → dialog-DASRaFxD.mjs} +2 -4
- package/dist/dropdown/index.mjs +2 -3
- package/dist/{dropdown-Dgm_b6Mm.mjs → dropdown-DZiAt-jS.mjs} +3 -5
- package/dist/{dropdown-menu-DAFyO-qD.mjs → dropdown-menu-lALvDnab.mjs} +5 -7
- package/dist/dropzone/index.mjs +2 -5
- package/dist/{dropzone-DR6O9OdU.mjs → dropzone-ogtpQ4fy.mjs} +5 -8
- package/dist/empty-content/index.mjs +2 -3
- package/dist/{empty-content-Dm7_5jO9.mjs → empty-content-C63GPJ5d.mjs} +3 -9
- package/dist/form/index.mjs +2 -146
- package/dist/{use-stepper-DJd8o9dV.mjs → form-Co3fM4B7.mjs} +148 -51
- package/dist/grid/index.mjs +2 -3
- package/dist/hooks/index.mjs +3 -4
- package/dist/{use-debounce-Dc95PFRX.mjs → hooks-Cb7YlxN4.mjs} +1 -3
- package/dist/hover-card/index.mjs +2 -4
- package/dist/{hover-card-CUPfFUqE.mjs → hover-card-DDWWD5Hx.mjs} +2 -4
- package/dist/{icon-wrapper-9ticVbRL.mjs → icon-wrapper-DuLp3RM1.mjs} +1 -3
- package/dist/icons/index.mjs +4 -5
- package/dist/index.mjs +65 -70
- package/dist/input/index.mjs +2 -5
- package/dist/{input-DuyjEKEW.mjs → input-DOmNpcQJ.mjs} +2 -4
- package/dist/{input-fzXBheCN.mjs → input-FKGqZypx.mjs} +3 -5
- package/dist/input-group/index.mjs +2 -7
- package/dist/{input-group-CPaFSTEV.mjs → input-group-DDtz-RT7.mjs} +5 -7
- package/dist/input-number/index.mjs +2 -6
- package/dist/{input-number-D1HCcTXO.mjs → input-number-mDB-5M5C.mjs} +4 -6
- package/dist/input-with-addons/index.mjs +28 -3
- package/dist/label/index.mjs +2 -4
- package/dist/{label-_ste_Re3.mjs → label-cnAhY-ej.mjs} +3 -6
- package/dist/loader-overlay/index.mjs +2 -3
- package/dist/{loader-overlay-CpA0zV8D.mjs → loader-overlay-BTFdkp7W.mjs} +3 -5
- package/dist/map/index.mjs +2 -14
- package/dist/{map-2RG9pYZR.mjs → map-ClxB41Hg.mjs} +10 -14
- package/dist/{map-leaflet-imports-CgEyVRnp.mjs → map-leaflet-imports-CaMm_rdF.mjs} +1 -2
- package/dist/more-actions/index.mjs +2 -5
- package/dist/{more-actions-BODYgG1C.mjs → more-actions-CGagbIDT.mjs} +5 -7
- package/dist/nprogress/index.mjs +1 -3
- package/dist/page-title/index.mjs +2 -3
- package/dist/{page-title-D62FV6vD.mjs → page-title-R7QbfbWp.mjs} +2 -4
- package/dist/popover/index.mjs +2 -4
- package/dist/{popover-Ds9624qY.mjs → popover-FJAcbYoH.mjs} +2 -4
- package/dist/radio-group/index.mjs +2 -4
- package/dist/{radio-group-B9Hm77LQ.mjs → radio-group-CiITR0LO.mjs} +3 -6
- package/dist/select/index.mjs +2 -4
- package/dist/{select-CwVIFWFO.mjs → select-CiLR_DiQ.mjs} +3 -6
- package/dist/separator/index.mjs +2 -4
- package/dist/{separator-T2ppyD-8.mjs → separator-DXVTncCK.mjs} +2 -4
- package/dist/sheet/index.mjs +3 -5
- package/dist/{sheet-mx5XjyEY.mjs → sheet-BzXksqYY.mjs} +4 -6
- package/dist/{sheet-Cemwh78x.mjs → sheet-Di3b-oPu.mjs} +2 -4
- package/dist/sidebar/index.mjs +2 -10
- package/dist/{sidebar-BW76ss_f.mjs → sidebar-BnhnjvfO.mjs} +10 -14
- package/dist/skeleton/index.mjs +2 -5
- package/dist/{skeleton-CkE23wsL.mjs → skeleton-BKl4mfJt.mjs} +2 -4
- package/dist/{skeleton-DZ31pU4B.mjs → skeleton-D1MUhAVo.mjs} +3 -5
- package/dist/spinner/index.mjs +2 -4
- package/dist/{spinner-earfjpJs.mjs → spinner-OyOf9-Yu.mjs} +2 -4
- package/dist/{spinner.icon-Bg8zgGh0.mjs → spinner.icon-C-vjSM6o.mjs} +2 -4
- package/dist/stepper/index.mjs +321 -5
- package/dist/switch/index.mjs +2 -4
- package/dist/{switch-Cn9IM2gC.mjs → switch-DQJQhPIQ.mjs} +3 -6
- package/dist/table/index.mjs +2 -4
- package/dist/{table-Dpzh0VPK.mjs → table-Cdsh-39-.mjs} +2 -4
- package/dist/tabs/index.mjs +50 -3
- package/dist/tag-input/index.mjs +2 -5
- package/dist/{tag-input-DorFQ9bA.mjs → tag-input-BVSwNcRd.mjs} +5 -7
- package/dist/task-queue/index.mjs +2 -7
- package/dist/{task-queue-dropdown-DtS0IKci.mjs → task-queue-dropdown-DyM5R8KF.mjs} +10 -30
- package/dist/textarea/index.mjs +2 -5
- package/dist/{textarea-QYRcDEpK.mjs → textarea-94vq_G_S.mjs} +2 -4
- package/dist/{textarea-KZUKGHlO.mjs → textarea-BwD-MmTV.mjs} +3 -5
- package/dist/theme/index.mjs +2 -3
- package/dist/{theme.provider-BG3cS9xe.mjs → themes-DG1md8FI.mjs} +1 -6
- package/dist/{to-api-format-CzPt5UAX.mjs → to-api-format-BnbRFYQI.mjs} +9 -18
- package/dist/toast/index.mjs +3 -3
- package/dist/{use-toast-DBmysDS6.mjs → toast-BWnN5fax.mjs} +5 -42
- package/dist/toast-DpxlFNNx.mjs +37 -0
- package/dist/tooltip/index.mjs +2 -4
- package/dist/{tooltip-U3XxlW4l.mjs → tooltip-Cruvl5F6.mjs} +3 -6
- package/dist/types-BZNk3q65.mjs +357 -0
- package/dist/typography/index.mjs +2 -3
- package/dist/{typography-DdrxIJMd.mjs → typography-ClB8k55E.mjs} +2 -4
- package/dist/{use-copy-to-clipboard-C9cT2Qb-.mjs → use-copy-to-clipboard-BGdTmkFV.mjs} +2 -4
- package/dist/utils/index.mjs +2 -3
- package/dist/{utils-Bfgoe-Gm.mjs → utils-C8KwMfT_.mjs} +1 -3
- package/dist/visually-hidden/index.mjs +2 -3
- package/dist/{visuallyhidden-CfBnXfvh.mjs → visuallyhidden-BLUsJpYH.mjs} +1 -3
- package/package.json +30 -4
- package/dist/input-with-addons-DN9LGwUU.mjs +0 -30
- package/dist/stepper-CZeks9Ex.mjs +0 -323
- package/dist/tabs-OYVCDOif.mjs +0 -52
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { t as cn$1 } from "./utils-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as cn$1 } from "./utils-C8KwMfT_.mjs";
|
|
3
3
|
import { CircleIcon } from "lucide-react";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
7
|
-
|
|
8
7
|
//#region ../shadcn/ui/radio-group.tsx
|
|
9
8
|
function RadioGroup$1({ className, ...props }) {
|
|
10
9
|
return /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, {
|
|
@@ -25,7 +24,6 @@ function RadioGroupItem$1({ className, ...props }) {
|
|
|
25
24
|
})
|
|
26
25
|
});
|
|
27
26
|
}
|
|
28
|
-
|
|
29
27
|
//#endregion
|
|
30
28
|
//#region src/components/base/radio-group/radio-group.tsx
|
|
31
29
|
function RadioGroup({ ref, className, ...props }) {
|
|
@@ -44,6 +42,5 @@ function RadioGroupItem({ ref, className, ...props }) {
|
|
|
44
42
|
});
|
|
45
43
|
}
|
|
46
44
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
47
|
-
|
|
48
45
|
//#endregion
|
|
49
|
-
export { RadioGroupItem as n, RadioGroup as t };
|
|
46
|
+
export { RadioGroupItem as n, RadioGroup as t };
|
package/dist/select/index.mjs
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
1
|
+
import { a as SelectLabel, c as SelectSeparator, i as SelectItem, l as SelectTrigger, n as SelectContent, o as SelectScrollDownButton, r as SelectGroup, s as SelectScrollUpButton, t as Select, u as SelectValue } from "../select-CiLR_DiQ.mjs";
|
|
2
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { t as cn$1 } from "./utils-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as cn$1 } from "./utils-C8KwMfT_.mjs";
|
|
3
3
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
7
|
-
|
|
8
7
|
//#region ../shadcn/ui/select.tsx
|
|
9
8
|
const Select$1 = ({ ...props }) => {
|
|
10
9
|
return /* @__PURE__ */ jsx(SelectPrimitive.Root, {
|
|
@@ -92,7 +91,6 @@ const SelectScrollDownButton$1 = ({ className, ...props }) => {
|
|
|
92
91
|
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
93
92
|
});
|
|
94
93
|
};
|
|
95
|
-
|
|
96
94
|
//#endregion
|
|
97
95
|
//#region src/components/base/select/select.tsx
|
|
98
96
|
const Select = Select$1;
|
|
@@ -161,6 +159,5 @@ function SelectScrollDownButton({ ref, className, ...props }) {
|
|
|
161
159
|
});
|
|
162
160
|
}
|
|
163
161
|
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
164
|
-
|
|
165
162
|
//#endregion
|
|
166
|
-
export { SelectLabel as a, SelectSeparator as c, SelectItem as i, SelectTrigger as l, SelectContent as n, SelectScrollDownButton as o, SelectGroup as r, SelectScrollUpButton as s, Select as t, SelectValue as u };
|
|
163
|
+
export { SelectLabel as a, SelectSeparator as c, SelectItem as i, SelectTrigger as l, SelectContent as n, SelectScrollDownButton as o, SelectGroup as r, SelectScrollUpButton as s, Select as t, SelectValue as u };
|
package/dist/separator/index.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
1
|
+
import { t as cn } from "./utils-C8KwMfT_.mjs";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
5
|
-
|
|
6
5
|
//#region ../shadcn/ui/separator.tsx
|
|
7
6
|
const Separator = ({ className, orientation = "horizontal", decorative = true, ...props }) => {
|
|
8
7
|
return /* @__PURE__ */ jsx(SeparatorPrimitive.Root, {
|
|
@@ -13,6 +12,5 @@ const Separator = ({ className, orientation = "horizontal", decorative = true, .
|
|
|
13
12
|
...props
|
|
14
13
|
});
|
|
15
14
|
};
|
|
16
|
-
|
|
17
15
|
//#endregion
|
|
18
|
-
export { Separator as t };
|
|
16
|
+
export { Separator as t };
|
package/dist/sheet/index.mjs
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger };
|
|
1
|
+
import { a as SheetHeader, i as SheetFooter, o as SheetTitle, r as SheetDescription, s as SheetTrigger } from "../sheet-Di3b-oPu.mjs";
|
|
2
|
+
import { i as SheetOverlay, n as SheetClose, r as SheetContent, t as Sheet } from "../sheet-BzXksqYY.mjs";
|
|
3
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { t as CloseIcon } from "./close.icon-
|
|
3
|
-
import { a as SheetHeader, i as SheetFooter, o as SheetTitle, r as SheetDescription, s as SheetTrigger, t as Sheet$1 } from "./sheet-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as CloseIcon } from "./close.icon-HCfS4Y-N.mjs";
|
|
3
|
+
import { a as SheetHeader, i as SheetFooter, o as SheetTitle, r as SheetDescription, s as SheetTrigger, t as Sheet$1 } from "./sheet-Di3b-oPu.mjs";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
7
|
-
|
|
8
7
|
//#region src/components/base/sheet/sheet.tsx
|
|
9
8
|
const SheetClose = SheetPrimitive.Close;
|
|
10
9
|
function SheetOverlay({ className, ...props }) {
|
|
@@ -40,6 +39,5 @@ const Sheet = Object.assign(Sheet$1, {
|
|
|
40
39
|
Title: SheetTitle,
|
|
41
40
|
Description: SheetDescription
|
|
42
41
|
});
|
|
43
|
-
|
|
44
42
|
//#endregion
|
|
45
|
-
export { SheetOverlay as i, SheetClose as n, SheetContent as r, Sheet as t };
|
|
43
|
+
export { SheetOverlay as i, SheetClose as n, SheetContent as r, Sheet as t };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
1
|
+
import { t as cn } from "./utils-C8KwMfT_.mjs";
|
|
2
2
|
import { XIcon } from "lucide-react";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
6
|
-
|
|
7
6
|
//#region ../shadcn/ui/sheet.tsx
|
|
8
7
|
const Sheet = ({ ...props }) => {
|
|
9
8
|
return /* @__PURE__ */ jsx(SheetPrimitive.Root, {
|
|
@@ -72,6 +71,5 @@ const SheetDescription = ({ className, ...props }) => {
|
|
|
72
71
|
...props
|
|
73
72
|
});
|
|
74
73
|
};
|
|
75
|
-
|
|
76
74
|
//#endregion
|
|
77
|
-
export { SheetHeader as a, SheetFooter as i, SheetContent as n, SheetTitle as o, SheetDescription as r, SheetTrigger as s, Sheet as t };
|
|
75
|
+
export { SheetHeader as a, SheetFooter as i, SheetContent as n, SheetTitle as o, SheetDescription as r, SheetTrigger as s, Sheet as t };
|
package/dist/sidebar/index.mjs
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
|
|
3
|
-
import "../button-AzpnV-WB.mjs";
|
|
4
|
-
import "../input-DuyjEKEW.mjs";
|
|
5
|
-
import "../sheet-Cemwh78x.mjs";
|
|
6
|
-
import { C as SidebarTrigger, S as SidebarSeparator, _ as SidebarMenuSub, a as SidebarGroupAction, b as SidebarProvider, c as SidebarHeader, d as SidebarMenu, f as SidebarMenuAction, g as SidebarMenuSkeleton, h as SidebarMenuItem, i as SidebarGroup, l as SidebarInput, m as SidebarMenuButton, n as SidebarContent, o as SidebarGroupContent, p as SidebarMenuBadge, r as SidebarFooter, s as SidebarGroupLabel, t as Sidebar, u as SidebarInset, v as SidebarMenuSubButton, w as useSidebar, x as SidebarRail, y as SidebarMenuSubItem } from "../sidebar-BW76ss_f.mjs";
|
|
7
|
-
import "../skeleton-CkE23wsL.mjs";
|
|
8
|
-
import "../tooltip-U3XxlW4l.mjs";
|
|
9
|
-
|
|
10
|
-
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
1
|
+
import { C as SidebarTrigger, S as SidebarSeparator, _ as SidebarMenuSub, a as SidebarGroupAction, b as SidebarProvider, c as SidebarHeader, d as SidebarMenu, f as SidebarMenuAction, g as SidebarMenuSkeleton, h as SidebarMenuItem, i as SidebarGroup, l as SidebarInput, m as SidebarMenuButton, n as SidebarContent, o as SidebarGroupContent, p as SidebarMenuBadge, r as SidebarFooter, s as SidebarGroupLabel, t as Sidebar, u as SidebarInset, v as SidebarMenuSubButton, w as useSidebar, x as SidebarRail, y as SidebarMenuSubItem } from "../sidebar-BnhnjvfO.mjs";
|
|
2
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { t as Separator } from "./separator-
|
|
3
|
-
import { t as Button } from "./button-
|
|
4
|
-
import { t as Icon } from "./icon-wrapper-
|
|
5
|
-
import { t as Input } from "./input-
|
|
6
|
-
import { a as SheetHeader, n as SheetContent, o as SheetTitle, r as SheetDescription, t as Sheet } from "./sheet-
|
|
7
|
-
import { t as Skeleton } from "./skeleton-
|
|
8
|
-
import { i as TooltipProvider, t as Tooltip } from "./tooltip-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as Separator } from "./separator-DXVTncCK.mjs";
|
|
3
|
+
import { t as Button } from "./button-D3RrsMfQ.mjs";
|
|
4
|
+
import { t as Icon } from "./icon-wrapper-DuLp3RM1.mjs";
|
|
5
|
+
import { t as Input } from "./input-FKGqZypx.mjs";
|
|
6
|
+
import { a as SheetHeader, n as SheetContent, o as SheetTitle, r as SheetDescription, t as Sheet } from "./sheet-Di3b-oPu.mjs";
|
|
7
|
+
import { t as Skeleton } from "./skeleton-BKl4mfJt.mjs";
|
|
8
|
+
import { i as TooltipProvider, t as Tooltip } from "./tooltip-Cruvl5F6.mjs";
|
|
9
9
|
import { cva } from "class-variance-authority";
|
|
10
10
|
import { PanelLeftCloseIcon, PanelLeftOpenIcon } from "lucide-react";
|
|
11
11
|
import * as React$1 from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { Slot } from "@radix-ui/react-slot";
|
|
14
|
-
|
|
15
14
|
//#region ../shadcn/hooks/use-mobile.ts
|
|
16
15
|
const MOBILE_BREAKPOINT = 768;
|
|
17
16
|
function useIsMobile() {
|
|
@@ -27,7 +26,6 @@ function useIsMobile() {
|
|
|
27
26
|
}, []);
|
|
28
27
|
return !!isMobile;
|
|
29
28
|
}
|
|
30
|
-
|
|
31
29
|
//#endregion
|
|
32
30
|
//#region src/components/base/sidebar/sidebar.tsx
|
|
33
31
|
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
@@ -87,10 +85,9 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
87
85
|
}, [expandOnHover]);
|
|
88
86
|
const handleMouseLeave = React$1.useCallback(() => {
|
|
89
87
|
if (!expandOnHover) return;
|
|
90
|
-
const delay = expandBehavior === "overlay" ? 200 : 300;
|
|
91
88
|
hoverTimeoutRef.current = setTimeout(() => {
|
|
92
89
|
setIsHovered(false);
|
|
93
|
-
},
|
|
90
|
+
}, expandBehavior === "overlay" ? 200 : 300);
|
|
94
91
|
}, [expandOnHover, expandBehavior]);
|
|
95
92
|
const toggleSidebar = React$1.useCallback(() => {
|
|
96
93
|
if (isMobile) {
|
|
@@ -531,6 +528,5 @@ function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false,
|
|
|
531
528
|
...props
|
|
532
529
|
});
|
|
533
530
|
}
|
|
534
|
-
|
|
535
531
|
//#endregion
|
|
536
|
-
export { SidebarTrigger as C, SidebarSeparator as S, SidebarMenuSub as _, SidebarGroupAction as a, SidebarProvider as b, SidebarHeader as c, SidebarMenu as d, SidebarMenuAction as f, SidebarMenuSkeleton as g, SidebarMenuItem as h, SidebarGroup as i, SidebarInput as l, SidebarMenuButton as m, SidebarContent as n, SidebarGroupContent as o, SidebarMenuBadge as p, SidebarFooter as r, SidebarGroupLabel as s, Sidebar as t, SidebarInset as u, SidebarMenuSubButton as v, useSidebar as w, SidebarRail as x, SidebarMenuSubItem as y };
|
|
532
|
+
export { SidebarTrigger as C, SidebarSeparator as S, SidebarMenuSub as _, SidebarGroupAction as a, SidebarProvider as b, SidebarHeader as c, SidebarMenu as d, SidebarMenuAction as f, SidebarMenuSkeleton as g, SidebarMenuItem as h, SidebarGroup as i, SidebarInput as l, SidebarMenuButton as m, SidebarContent as n, SidebarGroupContent as o, SidebarMenuBadge as p, SidebarFooter as r, SidebarGroupLabel as s, Sidebar as t, SidebarInset as u, SidebarMenuSubButton as v, useSidebar as w, SidebarRail as x, SidebarMenuSubItem as y };
|
package/dist/skeleton/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
1
|
+
import { t as cn } from "./utils-C8KwMfT_.mjs";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
3
|
//#region ../shadcn/ui/skeleton.tsx
|
|
5
4
|
function Skeleton({ className, ...props }) {
|
|
6
5
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -8,6 +7,5 @@ function Skeleton({ className, ...props }) {
|
|
|
8
7
|
...props
|
|
9
8
|
});
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
//#endregion
|
|
13
|
-
export { Skeleton as t };
|
|
11
|
+
export { Skeleton as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { t as Skeleton$1 } from "./skeleton-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as Skeleton$1 } from "./skeleton-BKl4mfJt.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
5
|
//#region src/components/base/skeleton/skeleton.tsx
|
|
7
6
|
/**
|
|
8
7
|
* Datum Skeleton component – extends shadcn Skeleton with Datum-specific styling.
|
|
@@ -23,6 +22,5 @@ function Skeleton({ ref, className, ...props }) {
|
|
|
23
22
|
});
|
|
24
23
|
}
|
|
25
24
|
Skeleton.displayName = "Skeleton";
|
|
26
|
-
|
|
27
25
|
//#endregion
|
|
28
|
-
export { Skeleton as t };
|
|
26
|
+
export { Skeleton as t };
|
package/dist/spinner/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
1
|
+
import { t as cn } from "./utils-C8KwMfT_.mjs";
|
|
2
2
|
import { Loader2Icon } from "lucide-react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
4
|
//#region ../shadcn/ui/spinner.tsx
|
|
6
5
|
function Spinner({ className, ...props }) {
|
|
7
6
|
return /* @__PURE__ */ jsx(Loader2Icon, {
|
|
@@ -11,6 +10,5 @@ function Spinner({ className, ...props }) {
|
|
|
11
10
|
...props
|
|
12
11
|
});
|
|
13
12
|
}
|
|
14
|
-
|
|
15
13
|
//#endregion
|
|
16
|
-
export { Spinner as t };
|
|
14
|
+
export { Spinner as t };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
4
|
//#region src/components/icons/spinner.icon.tsx
|
|
6
5
|
const spinnerVariants = cva("animate-spin", {
|
|
7
6
|
variants: { size: {
|
|
@@ -45,6 +44,5 @@ function SpinnerIcon({ size, className, trackClassName = "text-border", indicato
|
|
|
45
44
|
})]
|
|
46
45
|
});
|
|
47
46
|
}
|
|
48
|
-
|
|
49
47
|
//#endregion
|
|
50
|
-
export { SpinnerIcon as t };
|
|
48
|
+
export { SpinnerIcon as t };
|
package/dist/stepper/index.mjs
CHANGED
|
@@ -1,5 +1,321 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../button-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { t as cn } from "../cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as Button } from "../button-D3RrsMfQ.mjs";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
7
|
+
import * as Stepperize from "@stepperize/react";
|
|
8
|
+
//#region src/components/features/stepper/stepper.tsx
|
|
9
|
+
const StepperContext = React$1.createContext(null);
|
|
10
|
+
function useStepperProvider() {
|
|
11
|
+
const context = React$1.use(StepperContext);
|
|
12
|
+
if (!context) throw new Error("useStepper must be used within a StepperProvider.");
|
|
13
|
+
return context;
|
|
14
|
+
}
|
|
15
|
+
const classForNavigationList = cva("flex gap-2", { variants: { variant: {
|
|
16
|
+
horizontal: "flex-row items-center justify-between",
|
|
17
|
+
vertical: "flex-col",
|
|
18
|
+
circle: "flex-row items-center justify-between"
|
|
19
|
+
} } });
|
|
20
|
+
const classForSeparator = cva([
|
|
21
|
+
"bg-muted",
|
|
22
|
+
"data-[state=completed]:bg-primary data-[disabled]:opacity-50",
|
|
23
|
+
"transition-all duration-300 ease-in-out"
|
|
24
|
+
], { variants: {
|
|
25
|
+
orientation: {
|
|
26
|
+
horizontal: "h-0.5 flex-1",
|
|
27
|
+
vertical: "h-full w-0.5"
|
|
28
|
+
},
|
|
29
|
+
labelOrientation: { vertical: "absolute left-[calc(50%+30px)] right-[calc(-50%+20px)] top-5 block shrink-0" }
|
|
30
|
+
} });
|
|
31
|
+
function defineStepper(...steps) {
|
|
32
|
+
const { Scoped, useStepper, steps: stepList, Stepper: StepperizePrimitives } = Stepperize.defineStepper(...steps);
|
|
33
|
+
const StepperContainer = ({ children, className, ...props }) => {
|
|
34
|
+
const methods = useStepper();
|
|
35
|
+
return /* @__PURE__ */ jsx("div", {
|
|
36
|
+
"date-component": "stepper",
|
|
37
|
+
className: cn("w-full", className),
|
|
38
|
+
...props,
|
|
39
|
+
children: typeof children === "function" ? children({ methods }) : children
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
steps: stepList,
|
|
44
|
+
useStepper,
|
|
45
|
+
Stepper: {
|
|
46
|
+
...StepperizePrimitives,
|
|
47
|
+
Provider: ({ variant = "horizontal", labelOrientation = "horizontal", tracking = false, children, className, ...props }) => {
|
|
48
|
+
return /* @__PURE__ */ jsx(StepperContext, {
|
|
49
|
+
value: {
|
|
50
|
+
variant,
|
|
51
|
+
labelOrientation,
|
|
52
|
+
tracking
|
|
53
|
+
},
|
|
54
|
+
children: /* @__PURE__ */ jsx(Scoped, {
|
|
55
|
+
initialStep: props.initialStep,
|
|
56
|
+
initialMetadata: props.initialMetadata,
|
|
57
|
+
children: /* @__PURE__ */ jsx(StepperContainer, {
|
|
58
|
+
className,
|
|
59
|
+
...props,
|
|
60
|
+
children
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
Navigation: ({ children, "aria-label": ariaLabel = "Stepper Navigation", ...props }) => {
|
|
66
|
+
const { variant } = useStepperProvider();
|
|
67
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
68
|
+
"date-component": "stepper-navigation",
|
|
69
|
+
"aria-label": ariaLabel,
|
|
70
|
+
role: "tablist",
|
|
71
|
+
...props,
|
|
72
|
+
children: /* @__PURE__ */ jsx("ol", {
|
|
73
|
+
"date-component": "stepper-navigation-list",
|
|
74
|
+
className: classForNavigationList({ variant }),
|
|
75
|
+
children
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
Step: ({ children, className, icon, ...props }) => {
|
|
80
|
+
const { variant, labelOrientation } = useStepperProvider();
|
|
81
|
+
const stepper = useStepper();
|
|
82
|
+
const steps = stepList;
|
|
83
|
+
const stepIndex = stepper.lookup.getIndex(props.of);
|
|
84
|
+
const step = steps[stepIndex];
|
|
85
|
+
const currentIndex = stepper.lookup.getIndex(stepper.state.current.data.id);
|
|
86
|
+
const isLast = stepper.lookup.getLast().id === props.of;
|
|
87
|
+
const isActive = stepper.state.current.data.id === props.of;
|
|
88
|
+
const dataState = getStepState(currentIndex, stepIndex);
|
|
89
|
+
const childMap = useStepChildren(children);
|
|
90
|
+
const title = childMap.get("title");
|
|
91
|
+
const description = childMap.get("description");
|
|
92
|
+
const panel = childMap.get("panel");
|
|
93
|
+
if (variant === "circle") return /* @__PURE__ */ jsxs("li", {
|
|
94
|
+
"date-component": "stepper-step",
|
|
95
|
+
className: cn("flex shrink-0 items-center gap-4 rounded-md transition-colors", className),
|
|
96
|
+
children: [/* @__PURE__ */ jsx(CircleStepIndicator, {
|
|
97
|
+
currentStep: stepIndex + 1,
|
|
98
|
+
totalSteps: steps.length
|
|
99
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
100
|
+
"date-component": "stepper-step-content",
|
|
101
|
+
className: "flex flex-col items-start gap-1",
|
|
102
|
+
children: [title, description]
|
|
103
|
+
})]
|
|
104
|
+
});
|
|
105
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
106
|
+
/* @__PURE__ */ jsxs("li", {
|
|
107
|
+
"date-component": "stepper-step",
|
|
108
|
+
className: cn([
|
|
109
|
+
"group peer relative flex items-center gap-2",
|
|
110
|
+
"data-[variant=vertical]:flex-row",
|
|
111
|
+
"data-[label-orientation=vertical]:w-full",
|
|
112
|
+
"data-[label-orientation=vertical]:flex-col",
|
|
113
|
+
"data-[label-orientation=vertical]:justify-center"
|
|
114
|
+
]),
|
|
115
|
+
"data-variant": variant,
|
|
116
|
+
"data-label-orientation": labelOrientation,
|
|
117
|
+
"data-state": dataState,
|
|
118
|
+
"data-disabled": props.disabled,
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ jsx(Button, {
|
|
121
|
+
id: `step-${step.id}`,
|
|
122
|
+
"date-component": "stepper-step-indicator",
|
|
123
|
+
type: "button",
|
|
124
|
+
role: "tab",
|
|
125
|
+
tabIndex: dataState !== "inactive" ? 0 : -1,
|
|
126
|
+
className: cn("rounded-full", className),
|
|
127
|
+
variant: dataState !== "inactive" ? "default" : "secondary",
|
|
128
|
+
size: "icon",
|
|
129
|
+
"aria-controls": `step-panel-${props.of}`,
|
|
130
|
+
"aria-current": isActive ? "step" : void 0,
|
|
131
|
+
"aria-posinset": stepIndex + 1,
|
|
132
|
+
"aria-setsize": steps.length,
|
|
133
|
+
"aria-selected": isActive,
|
|
134
|
+
onKeyDown: (e) => onStepKeyDown(e, stepper.lookup.getNext(props.of), stepper.lookup.getPrev(props.of)),
|
|
135
|
+
...props,
|
|
136
|
+
children: icon ?? stepIndex + 1
|
|
137
|
+
}),
|
|
138
|
+
variant === "horizontal" && labelOrientation === "vertical" && /* @__PURE__ */ jsx(StepperSeparator, {
|
|
139
|
+
orientation: "horizontal",
|
|
140
|
+
labelOrientation,
|
|
141
|
+
isLast,
|
|
142
|
+
state: dataState,
|
|
143
|
+
disabled: props.disabled
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ jsxs("div", {
|
|
146
|
+
"date-component": "stepper-step-content",
|
|
147
|
+
className: "flex flex-col items-start",
|
|
148
|
+
children: [title, description]
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
}),
|
|
152
|
+
variant === "horizontal" && labelOrientation === "horizontal" && /* @__PURE__ */ jsx(StepperSeparator, {
|
|
153
|
+
orientation: "horizontal",
|
|
154
|
+
isLast,
|
|
155
|
+
state: dataState,
|
|
156
|
+
disabled: props.disabled
|
|
157
|
+
}),
|
|
158
|
+
variant === "vertical" && /* @__PURE__ */ jsxs("div", {
|
|
159
|
+
className: "flex gap-4",
|
|
160
|
+
children: [!isLast && /* @__PURE__ */ jsx("div", {
|
|
161
|
+
className: "flex justify-center ps-[calc(var(--spacing)_*_4.5_-_1px)]",
|
|
162
|
+
children: /* @__PURE__ */ jsx(StepperSeparator, {
|
|
163
|
+
orientation: "vertical",
|
|
164
|
+
isLast,
|
|
165
|
+
state: dataState,
|
|
166
|
+
disabled: props.disabled
|
|
167
|
+
})
|
|
168
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
169
|
+
className: "my-3 flex-1 ps-4",
|
|
170
|
+
children: panel
|
|
171
|
+
})]
|
|
172
|
+
})
|
|
173
|
+
] });
|
|
174
|
+
},
|
|
175
|
+
Title,
|
|
176
|
+
Description,
|
|
177
|
+
Panel: ({ children, asChild, ...props }) => {
|
|
178
|
+
const Comp = asChild ? Slot : "div";
|
|
179
|
+
const { tracking } = useStepperProvider();
|
|
180
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
181
|
+
"date-component": "stepper-step-panel",
|
|
182
|
+
ref: (node) => scrollIntoStepperPanel(node, tracking),
|
|
183
|
+
...props,
|
|
184
|
+
children
|
|
185
|
+
});
|
|
186
|
+
},
|
|
187
|
+
Controls: ({ children, className, asChild, ...props }) => {
|
|
188
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "div", {
|
|
189
|
+
"date-component": "stepper-controls",
|
|
190
|
+
className: cn("flex justify-end gap-4", className),
|
|
191
|
+
...props,
|
|
192
|
+
children
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function Title({ children, className, asChild, ...props }) {
|
|
199
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "h4", {
|
|
200
|
+
"date-component": "stepper-step-title",
|
|
201
|
+
className: cn("text-base font-medium", className),
|
|
202
|
+
...props,
|
|
203
|
+
children
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
function Description({ children, className, asChild, ...props }) {
|
|
207
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "p", {
|
|
208
|
+
"date-component": "stepper-step-description",
|
|
209
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
210
|
+
...props,
|
|
211
|
+
children
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
function StepperSeparator({ orientation, isLast, labelOrientation, state, disabled }) {
|
|
215
|
+
if (isLast) return null;
|
|
216
|
+
return /* @__PURE__ */ jsx("div", {
|
|
217
|
+
"date-component": "stepper-separator",
|
|
218
|
+
"data-orientation": orientation,
|
|
219
|
+
"data-state": state,
|
|
220
|
+
"data-disabled": disabled,
|
|
221
|
+
role: "separator",
|
|
222
|
+
tabIndex: -1,
|
|
223
|
+
className: classForSeparator({
|
|
224
|
+
orientation,
|
|
225
|
+
labelOrientation
|
|
226
|
+
})
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
function CircleStepIndicator({ currentStep, totalSteps, size = 80, strokeWidth = 6 }) {
|
|
230
|
+
const radius = (size - strokeWidth) / 2;
|
|
231
|
+
const circumference = radius * 2 * Math.PI;
|
|
232
|
+
const dashOffset = circumference - circumference * (currentStep / totalSteps * 100) / 100;
|
|
233
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
234
|
+
"date-component": "stepper-step-indicator",
|
|
235
|
+
role: "progressbar",
|
|
236
|
+
"aria-valuenow": currentStep,
|
|
237
|
+
"aria-valuemin": 1,
|
|
238
|
+
"aria-valuemax": totalSteps,
|
|
239
|
+
tabIndex: -1,
|
|
240
|
+
className: "relative inline-flex items-center justify-center",
|
|
241
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
242
|
+
width: size,
|
|
243
|
+
height: size,
|
|
244
|
+
children: [
|
|
245
|
+
/* @__PURE__ */ jsx("title", { children: "Step Indicator" }),
|
|
246
|
+
/* @__PURE__ */ jsx("circle", {
|
|
247
|
+
cx: size / 2,
|
|
248
|
+
cy: size / 2,
|
|
249
|
+
r: radius,
|
|
250
|
+
fill: "none",
|
|
251
|
+
stroke: "currentColor",
|
|
252
|
+
strokeWidth,
|
|
253
|
+
className: "text-muted-foreground"
|
|
254
|
+
}),
|
|
255
|
+
/* @__PURE__ */ jsx("circle", {
|
|
256
|
+
cx: size / 2,
|
|
257
|
+
cy: size / 2,
|
|
258
|
+
r: radius,
|
|
259
|
+
fill: "none",
|
|
260
|
+
stroke: "currentColor",
|
|
261
|
+
strokeWidth,
|
|
262
|
+
strokeDasharray: circumference,
|
|
263
|
+
strokeDashoffset: dashOffset,
|
|
264
|
+
className: "text-primary transition-all duration-300 ease-in-out",
|
|
265
|
+
transform: `rotate(-90 ${size / 2} ${size / 2})`
|
|
266
|
+
})
|
|
267
|
+
]
|
|
268
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
269
|
+
className: "absolute inset-0 flex items-center justify-center",
|
|
270
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
271
|
+
className: "text-sm font-medium",
|
|
272
|
+
"aria-live": "polite",
|
|
273
|
+
children: [
|
|
274
|
+
currentStep,
|
|
275
|
+
" ",
|
|
276
|
+
"of",
|
|
277
|
+
totalSteps
|
|
278
|
+
]
|
|
279
|
+
})
|
|
280
|
+
})]
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
function scrollIntoStepperPanel(node, tracking) {
|
|
284
|
+
if (tracking) node?.scrollIntoView({
|
|
285
|
+
behavior: "smooth",
|
|
286
|
+
block: "center"
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
function useStepChildren(children) {
|
|
290
|
+
return React$1.useMemo(() => extractChildren(children), [children]);
|
|
291
|
+
}
|
|
292
|
+
function extractChildren(children) {
|
|
293
|
+
const childrenArray = React$1.Children.toArray(children);
|
|
294
|
+
const map = /* @__PURE__ */ new Map();
|
|
295
|
+
for (const child of childrenArray) if (React$1.isValidElement(child)) if (child.type === Title) map.set("title", child);
|
|
296
|
+
else if (child.type === Description) map.set("description", child);
|
|
297
|
+
else map.set("panel", child);
|
|
298
|
+
return map;
|
|
299
|
+
}
|
|
300
|
+
function onStepKeyDown(e, nextStep, prevStep) {
|
|
301
|
+
const { key } = e;
|
|
302
|
+
const directions = {
|
|
303
|
+
next: ["ArrowRight", "ArrowDown"],
|
|
304
|
+
prev: ["ArrowLeft", "ArrowUp"]
|
|
305
|
+
};
|
|
306
|
+
if (directions.next.includes(key) || directions.prev.includes(key)) {
|
|
307
|
+
const direction = directions.next.includes(key) ? "next" : "prev";
|
|
308
|
+
const step = direction === "next" ? nextStep : prevStep;
|
|
309
|
+
if (!step) return;
|
|
310
|
+
const stepElement = document.getElementById(`step-${step.id}`);
|
|
311
|
+
if (!stepElement) return;
|
|
312
|
+
if (stepElement.parentElement?.getAttribute("data-state") !== "inactive" || direction === "prev") stepElement.focus();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
function getStepState(currentIndex, stepIndex) {
|
|
316
|
+
if (currentIndex === stepIndex) return "active";
|
|
317
|
+
if (currentIndex > stepIndex) return "completed";
|
|
318
|
+
return "inactive";
|
|
319
|
+
}
|
|
320
|
+
//#endregion
|
|
321
|
+
export { defineStepper };
|
package/dist/switch/index.mjs
CHANGED