impact-nova 0.1.13 → 1.0.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/components/layout/dashboard-layout.d.ts +21 -6
- package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +32 -33
- package/dist/components/ui/accordion.js +25 -23
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +5 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +50 -52
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +34 -34
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +8 -11
- package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +17 -17
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +3 -3
- package/dist/components/ui/alert-dialog.js +45 -40
- package/dist/components/ui/alert.d.ts +21 -4
- package/dist/components/ui/alert.js +45 -25
- package/dist/components/ui/avatar.js +19 -16
- package/dist/components/ui/badge.js +8 -1
- package/dist/components/ui/breadcrumb.js +1 -0
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button-group.js +27 -32
- package/dist/components/ui/button-variants.d.ts +1 -1
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.js +11 -9
- package/dist/components/ui/calendar.d.ts +14 -2
- package/dist/components/ui/calendar.js +443 -376
- package/dist/components/ui/card.js +7 -6
- package/dist/components/ui/checkbox.js +64 -48
- package/dist/components/ui/chips.d.ts +1 -0
- package/dist/components/ui/chips.js +27 -19
- package/dist/components/ui/data-table/data-table-column-list.d.ts +4 -1
- package/dist/components/ui/data-table/data-table-column-list.js +58 -54
- package/dist/components/ui/data-table/data-table-sheet.d.ts +1 -1
- package/dist/components/ui/data-table/data-table-sheet.js +43 -40
- package/dist/components/ui/data-table/data-table-view-options.js +17 -17
- package/dist/components/ui/data-table/data-table.js +21 -20
- package/dist/components/ui/date-picker/date-picker.js +83 -87
- package/dist/components/ui/date-picker/date-range-picker.js +129 -125
- package/dist/components/ui/date-picker/month-picker.js +90 -93
- package/dist/components/ui/date-picker/month-range-picker.js +132 -129
- package/dist/components/ui/date-picker/multi-date-picker.js +37 -38
- package/dist/components/ui/date-picker/multi-month-picker.js +29 -30
- package/dist/components/ui/date-picker/multi-week-picker.js +49 -38
- package/dist/components/ui/date-picker/week-picker.js +116 -112
- package/dist/components/ui/date-picker/week-range-picker.js +153 -142
- package/dist/components/ui/dialog.js +15 -6
- package/dist/components/ui/drawer.js +16 -13
- package/dist/components/ui/dropdown-menu.js +4 -2
- package/dist/components/ui/dynamic-layout.d.ts +2 -2
- package/dist/components/ui/dynamic-layout.js +18 -15
- package/dist/components/ui/empty-container.js +69 -64
- package/dist/components/ui/file-upload.js +113 -106
- package/dist/components/ui/filter-panel/filter-panel.js +49 -46
- package/dist/components/ui/filter-strip/filter-strip.js +41 -37
- package/dist/components/ui/header.js +26 -25
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +43 -40
- package/dist/components/ui/hover-card.js +6 -5
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.js +79 -68
- package/dist/components/ui/loader.d.ts +1 -0
- package/dist/components/ui/loader.js +23 -13
- package/dist/components/ui/nested-list/components/NestedListContent.d.ts +1 -3
- package/dist/components/ui/nested-list/components/NestedListContent.js +16 -15
- package/dist/components/ui/nested-list/components/SortableItem.js +116 -80
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.d.ts +13 -1
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +162 -112
- package/dist/components/ui/nested-list/nested-list.js +182 -189
- package/dist/components/ui/notification-panel/notification-item.js +19 -17
- package/dist/components/ui/notification-panel/notification-list.js +21 -21
- package/dist/components/ui/notification-panel/notification-panel.js +25 -25
- package/dist/components/ui/popover.js +37 -34
- package/dist/components/ui/progress.js +12 -10
- package/dist/components/ui/prompt.js +29 -27
- package/dist/components/ui/radio-group.js +55 -46
- package/dist/components/ui/select/components/Submenu.d.ts +1 -2
- package/dist/components/ui/select/components/Submenu.js +52 -48
- package/dist/components/ui/select/select.js +321 -324
- package/dist/components/ui/sheet.js +18 -15
- package/dist/components/ui/sidebar.d.ts +2 -2
- package/dist/components/ui/sidebar.js +3 -3
- package/dist/components/ui/skeleton.d.ts +2 -1
- package/dist/components/ui/skeleton.js +12 -11
- package/dist/components/ui/slider.js +39 -12
- package/dist/components/ui/smart-input.js +44 -39
- package/dist/components/ui/stepper.js +33 -29
- package/dist/components/ui/switch.js +6 -4
- package/dist/components/ui/tabs.js +50 -45
- package/dist/components/ui/tag-group.d.ts +2 -1
- package/dist/components/ui/tag-group.js +29 -25
- package/dist/components/ui/tag.d.ts +1 -0
- package/dist/components/ui/tag.js +26 -20
- package/dist/components/ui/textarea.js +18 -17
- package/dist/components/ui/toast.d.ts +1 -1
- package/dist/components/ui/toast.js +47 -41
- package/dist/components/ui/toaster.js +42 -42
- package/dist/components/ui/tooltip.js +18 -16
- package/dist/components/ui/types/date-picker.types.d.ts +33 -0
- package/dist/components/ui/types/empty-container.types.d.ts +5 -0
- package/dist/components/ui/types/nested-list.types.d.ts +1 -0
- package/dist/components/ui/types/select.types.d.ts +0 -1
- package/dist/icons/assets/bookmark.svg.js +4 -0
- package/dist/icons/assets/bookmark.svg2.js +5 -0
- package/dist/icons/assets/bookmarkFilled.svg.js +4 -0
- package/dist/icons/assets/bookmarkFilled.svg2.js +5 -0
- package/dist/icons/assets/download.svg.js +4 -0
- package/dist/icons/assets/download.svg2.js +5 -0
- package/dist/icons/index.d.ts +20 -6
- package/dist/icons/index.js +398 -370
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +318 -314
- package/dist/lib/fiscal-calendar.d.ts +62 -0
- package/dist/lib/fiscal-calendar.js +99 -0
- package/package.json +5 -5
- package/dist/components/ui/select/hooks/useClickOutside.d.ts +0 -15
- package/dist/components/ui/select/hooks/useClickOutside.js +0 -43
- package/dist/components/ui/select/hooks/useMenuPosition.d.ts +0 -2
- package/dist/components/ui/select/hooks/useMenuPosition.js +0 -89
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import d, { useRef as p, useEffect as x } from "react";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as n } from "../../../lib/utils.js";
|
|
4
4
|
import { Loader2 as h } from "lucide-react";
|
|
5
5
|
import { MulticolorBell as b } from "../../../icons/index.js";
|
|
6
|
-
const E = ({ className:
|
|
6
|
+
const E = ({ className: t, ...r }) => /* @__PURE__ */ i("div", { className: n("flex flex-col gap-4 items-center justify-center h-full text-center p-8", t), ...r, children: [
|
|
7
7
|
/* @__PURE__ */ e(b, { size: 72 }),
|
|
8
|
-
/* @__PURE__ */
|
|
8
|
+
/* @__PURE__ */ i("div", { children: [
|
|
9
9
|
/* @__PURE__ */ e("h3", { className: "text-xl font-bold text-[#0d152c]", children: "Everything looks quiet for now" }),
|
|
10
10
|
/* @__PURE__ */ e("p", { className: "text-sm text-[#7a8294]", children: "We'll notify you when something new comes up" })
|
|
11
11
|
] })
|
|
12
12
|
] }), j = ({
|
|
13
|
-
children:
|
|
14
|
-
className:
|
|
15
|
-
onLoadMore:
|
|
13
|
+
children: t,
|
|
14
|
+
className: r,
|
|
15
|
+
onLoadMore: o,
|
|
16
16
|
isLoading: c,
|
|
17
|
-
hasMore:
|
|
18
|
-
loader:
|
|
17
|
+
hasMore: s,
|
|
18
|
+
loader: u,
|
|
19
19
|
emptyState: f
|
|
20
20
|
}) => {
|
|
21
|
-
const
|
|
21
|
+
const l = p(null);
|
|
22
22
|
return x(() => {
|
|
23
|
-
const
|
|
23
|
+
const a = new IntersectionObserver(
|
|
24
24
|
(m) => {
|
|
25
|
-
m[0].isIntersecting &&
|
|
25
|
+
m[0].isIntersecting && s && !c && o && o();
|
|
26
26
|
},
|
|
27
27
|
{ threshold: 0.1 }
|
|
28
28
|
);
|
|
29
|
-
return
|
|
30
|
-
|
|
29
|
+
return l.current && a.observe(l.current), () => {
|
|
30
|
+
l.current && a.unobserve(l.current);
|
|
31
31
|
};
|
|
32
|
-
}, [
|
|
33
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children:
|
|
34
|
-
/* @__PURE__ */ e("div", { ref:
|
|
35
|
-
c && /* @__PURE__ */ e("div", { className: "flex justify-center p-4", children:
|
|
32
|
+
}, [s, c, o]), d.Children.count(t) === 0 && !c && f ? /* @__PURE__ */ e("div", { className: "h-full w-full", children: f }) : /* @__PURE__ */ i("div", { className: n("flex flex-1 flex-col overflow-y-auto min-h-0", r), children: [
|
|
33
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children: t }),
|
|
34
|
+
/* @__PURE__ */ e("div", { ref: l, className: "h-4 w-full flex-shrink-0" }),
|
|
35
|
+
c && /* @__PURE__ */ e("div", { className: "flex justify-center p-4", children: u || /* @__PURE__ */ e(h, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })
|
|
36
36
|
] });
|
|
37
|
-
}, z = ({ label:
|
|
38
|
-
/* @__PURE__ */ e("div", { className: "sticky top-0 z-10 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 px-4 py-2 text-sm font-medium text-muted-foreground border-b border-border/50", children:
|
|
39
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children:
|
|
37
|
+
}, z = ({ label: t, children: r, className: o }) => /* @__PURE__ */ i("div", { "data-component": "notification-group", className: n("flex flex-col", o), children: [
|
|
38
|
+
/* @__PURE__ */ e("div", { "data-component": "notification-group-label", className: "sticky top-0 z-10 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 px-4 py-2 text-sm font-medium text-muted-foreground border-b border-border/50", children: t }),
|
|
39
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children: r })
|
|
40
40
|
] });
|
|
41
41
|
export {
|
|
42
42
|
E as NotificationEmpty,
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { Sheet as m, SheetContent as h, SheetDescription as
|
|
4
|
-
import { Button as
|
|
2
|
+
import { useContext as d, createContext as f } from "react";
|
|
3
|
+
import { Sheet as m, SheetContent as h, SheetDescription as p, SheetTitle as x, SheetClose as u } from "../sheet.js";
|
|
4
|
+
import { Button as N } from "../button.js";
|
|
5
5
|
import { Bell as w, X as b } from "lucide-react";
|
|
6
|
-
import { cn as
|
|
7
|
-
const l =
|
|
8
|
-
const e =
|
|
6
|
+
import { cn as a } from "../../../lib/utils.js";
|
|
7
|
+
const l = f(null), S = () => {
|
|
8
|
+
const e = d(l);
|
|
9
9
|
if (!e)
|
|
10
10
|
throw new Error("useNotificationContext must be used within a NotificationPanel");
|
|
11
11
|
return e;
|
|
12
12
|
}, D = ({
|
|
13
13
|
open: e,
|
|
14
|
-
onOpenChange:
|
|
15
|
-
children:
|
|
16
|
-
className:
|
|
17
|
-
preventClose:
|
|
14
|
+
onOpenChange: n,
|
|
15
|
+
children: i,
|
|
16
|
+
className: s,
|
|
17
|
+
preventClose: c = !1
|
|
18
18
|
}) => /* @__PURE__ */ t(l.Provider, { value: { setPreventClose: () => {
|
|
19
|
-
} }, children: /* @__PURE__ */ t(m, { open: e, onOpenChange:
|
|
19
|
+
} }, children: /* @__PURE__ */ t(m, { open: e, onOpenChange: n, children: /* @__PURE__ */ o(
|
|
20
20
|
h,
|
|
21
21
|
{
|
|
22
22
|
side: "right",
|
|
23
|
-
className:
|
|
23
|
+
className: a(
|
|
24
24
|
"w-full !max-w-[640px] p-0 sm:!max-w-[640px] gap-0 border-l shadow-xl transition-all duration-300 ease-in-out bg-white",
|
|
25
|
-
|
|
25
|
+
s
|
|
26
26
|
),
|
|
27
|
-
onInteractOutside: (
|
|
28
|
-
|
|
27
|
+
onInteractOutside: (r) => {
|
|
28
|
+
c && r.preventDefault();
|
|
29
29
|
},
|
|
30
|
-
onEscapeKeyDown: (
|
|
31
|
-
|
|
30
|
+
onEscapeKeyDown: (r) => {
|
|
31
|
+
c && r.preventDefault();
|
|
32
32
|
},
|
|
33
33
|
children: [
|
|
34
|
-
/* @__PURE__ */ t(
|
|
35
|
-
|
|
34
|
+
/* @__PURE__ */ t(p, { className: "sr-only", children: "Notifications" }),
|
|
35
|
+
i
|
|
36
36
|
]
|
|
37
37
|
}
|
|
38
|
-
) }) }), k = ({ children: e, className:
|
|
38
|
+
) }) }), k = ({ children: e, className: n }) => /* @__PURE__ */ t("div", { "data-component": "notification-panel-content", className: a("flex h-full flex-col bg-white", n), children: e }), B = ({ title: e = "Notifications", children: n, className: i }) => /* @__PURE__ */ o("div", { "data-component": "notification-panel-header", className: a("flex shrink-0 items-center justify-between border-b px-4 py-3 bg-white", i), children: [
|
|
39
39
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-3", children: [
|
|
40
40
|
/* @__PURE__ */ t("div", { className: "flex h-6 w-6 items-center justify-center", children: /* @__PURE__ */ t(w, { className: "h-5 w-5 text-gray-500" }) }),
|
|
41
|
-
typeof e == "string" ? /* @__PURE__ */ t(
|
|
41
|
+
typeof e == "string" ? /* @__PURE__ */ t(x, { className: "text-lg font-bold text-[#1f2b4d]", children: e }) : e
|
|
42
42
|
] }),
|
|
43
43
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
44
|
-
|
|
45
|
-
/* @__PURE__ */ t(
|
|
44
|
+
n,
|
|
45
|
+
/* @__PURE__ */ t(u, { asChild: !0, children: /* @__PURE__ */ t(N, { variant: "secondary", size: "icon", "aria-label": "Close", "data-component": "notification-panel-close", children: /* @__PURE__ */ t(b, { className: "h-4 w-4" }) }) })
|
|
46
46
|
] })
|
|
47
|
-
] }), E = ({ children: e, className:
|
|
48
|
-
/* @__PURE__ */ t("div", { children:
|
|
47
|
+
] }), E = ({ children: e, className: n }) => /* @__PURE__ */ t("div", { "data-component": "notification-panel-body", className: a("flex flex-1 flex-col overflow-hidden bg-background", n), children: e }), z = ({ children: e, className: n, leftAction: i }) => /* @__PURE__ */ o("div", { "data-component": "notification-panel-footer", className: a("flex items-center justify-between border-t p-4 bg-white shrink-0 mt-auto shadow-md", n), children: [
|
|
48
|
+
/* @__PURE__ */ t("div", { children: i }),
|
|
49
49
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: e })
|
|
50
50
|
] });
|
|
51
51
|
export {
|
|
@@ -1,74 +1,77 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
3
|
import * as a from "@radix-ui/react-popover";
|
|
4
|
-
import { X as
|
|
5
|
-
import { cn as
|
|
6
|
-
const P = a.Root, u = a.Trigger, b = a.Anchor, m =
|
|
4
|
+
import { X as l } from "lucide-react";
|
|
5
|
+
import { cn as n } from "../../lib/utils.js";
|
|
6
|
+
const P = a.Root, u = a.Trigger, b = a.Anchor, m = d.forwardRef(({ className: e, align: o = "center", sideOffset: r = 4, ...i }, p) => /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(
|
|
7
7
|
a.Content,
|
|
8
8
|
{
|
|
9
|
-
ref:
|
|
10
|
-
align:
|
|
11
|
-
sideOffset:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
ref: p,
|
|
10
|
+
align: o,
|
|
11
|
+
sideOffset: r,
|
|
12
|
+
"data-component": "popover-content",
|
|
13
|
+
className: n(
|
|
14
|
+
"z-50 min-w-[240px] rounded-xl border bg-popover p-3 text-popover-foreground shadow-md outline-none overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",
|
|
15
|
+
e
|
|
15
16
|
),
|
|
16
|
-
...
|
|
17
|
+
...i
|
|
17
18
|
}
|
|
18
19
|
) }));
|
|
19
20
|
m.displayName = a.Content.displayName;
|
|
20
21
|
const c = ({
|
|
21
|
-
className:
|
|
22
|
-
...
|
|
22
|
+
className: e,
|
|
23
|
+
...o
|
|
23
24
|
}) => /* @__PURE__ */ t(
|
|
24
25
|
"div",
|
|
25
26
|
{
|
|
26
|
-
className:
|
|
27
|
-
...
|
|
27
|
+
className: n("flex items-center justify-between gap-4 mb-3", e),
|
|
28
|
+
...o
|
|
28
29
|
}
|
|
29
30
|
);
|
|
30
31
|
c.displayName = "PopoverHeader";
|
|
31
32
|
const f = ({
|
|
32
|
-
className:
|
|
33
|
-
...
|
|
33
|
+
className: e,
|
|
34
|
+
...o
|
|
34
35
|
}) => /* @__PURE__ */ t(
|
|
35
36
|
"h3",
|
|
36
37
|
{
|
|
37
|
-
|
|
38
|
+
"data-component": "popover-title",
|
|
39
|
+
className: n(
|
|
38
40
|
"text-[16px] font-extrabold leading-none text-[#1f2b4d]",
|
|
39
|
-
|
|
41
|
+
e
|
|
40
42
|
),
|
|
41
|
-
...
|
|
43
|
+
...o
|
|
42
44
|
}
|
|
43
45
|
);
|
|
44
46
|
f.displayName = "PopoverTitle";
|
|
45
|
-
const v =
|
|
47
|
+
const v = d.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ s(
|
|
46
48
|
a.Close,
|
|
47
49
|
{
|
|
48
|
-
ref:
|
|
49
|
-
|
|
50
|
+
ref: r,
|
|
51
|
+
"data-component": "popover-close",
|
|
52
|
+
className: n(
|
|
50
53
|
"rounded-sm opacity-70 transition-opacity hover:opacity-100 outline-none focus:ring-0 disabled:pointer-events-none",
|
|
51
|
-
|
|
54
|
+
e
|
|
52
55
|
),
|
|
53
|
-
...
|
|
56
|
+
...o,
|
|
54
57
|
children: [
|
|
55
|
-
/* @__PURE__ */ t(
|
|
58
|
+
/* @__PURE__ */ t(l, { className: "h-4 w-4 text-[#60697d]" }),
|
|
56
59
|
/* @__PURE__ */ t("span", { className: "sr-only", children: "Close" })
|
|
57
60
|
]
|
|
58
61
|
}
|
|
59
62
|
));
|
|
60
63
|
v.displayName = a.Close.displayName;
|
|
61
64
|
const x = ({
|
|
62
|
-
className:
|
|
63
|
-
...
|
|
64
|
-
}) => /* @__PURE__ */ t("div", { className:
|
|
65
|
+
className: e,
|
|
66
|
+
...o
|
|
67
|
+
}) => /* @__PURE__ */ t("div", { className: n("text-sm", e), ...o });
|
|
65
68
|
x.displayName = "PopoverBody";
|
|
66
69
|
const N = ({
|
|
67
|
-
className:
|
|
68
|
-
...
|
|
69
|
-
}) => /* @__PURE__ */
|
|
70
|
+
className: e,
|
|
71
|
+
...o
|
|
72
|
+
}) => /* @__PURE__ */ s("div", { className: n("mt-4 flex flex-col gap-3", e), ...o, children: [
|
|
70
73
|
/* @__PURE__ */ t("div", { className: "h-[1px] w-full bg-[#f0f2f5]" }),
|
|
71
|
-
/* @__PURE__ */ t("div", { className: "flex justify-end gap-2", children:
|
|
74
|
+
/* @__PURE__ */ t("div", { className: "flex justify-end gap-2", children: o.children })
|
|
72
75
|
] });
|
|
73
76
|
N.displayName = "PopoverFooter";
|
|
74
77
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as n from "react";
|
|
3
3
|
import * as c from "@radix-ui/react-progress";
|
|
4
4
|
import { cn as d } from "../../lib/utils.js";
|
|
5
|
-
const
|
|
6
|
-
({ className:
|
|
7
|
-
const l =
|
|
5
|
+
const a = n.forwardRef(
|
|
6
|
+
({ className: u, value: r, variant: e = "default", label: s, time: t, ...m }, i) => {
|
|
7
|
+
const l = n.useMemo(() => {
|
|
8
8
|
if (s === !1 || s === null) return null;
|
|
9
9
|
if (s && typeof s != "boolean") return s;
|
|
10
10
|
if (e === "success") return "Completed";
|
|
@@ -12,10 +12,11 @@ const g = u.forwardRef(
|
|
|
12
12
|
const f = `${Math.round(r || 0)}%`;
|
|
13
13
|
return t ? `${f} • ${t} seconds remaining` : f;
|
|
14
14
|
}, [s, e, r, t]);
|
|
15
|
-
return /* @__PURE__ */ p("div", { className: "w-full", children: [
|
|
15
|
+
return /* @__PURE__ */ p("div", { className: "w-full", "data-component": "progress", "data-variant": e, children: [
|
|
16
16
|
l && /* @__PURE__ */ o(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
|
+
"data-component": "progress-label",
|
|
19
20
|
className: d(
|
|
20
21
|
"text-[12px] font-medium mb-1",
|
|
21
22
|
e === "default" && "text-[#60697d]",
|
|
@@ -28,19 +29,20 @@ const g = u.forwardRef(
|
|
|
28
29
|
/* @__PURE__ */ o(
|
|
29
30
|
c.Root,
|
|
30
31
|
{
|
|
31
|
-
ref:
|
|
32
|
+
ref: i,
|
|
32
33
|
className: d(
|
|
33
34
|
"relative h-2 w-full overflow-hidden rounded-full",
|
|
34
35
|
e === "default" && "bg-primary/10",
|
|
35
36
|
e === "success" && "bg-green-100",
|
|
36
37
|
e === "destructive" && "bg-red-100",
|
|
37
|
-
|
|
38
|
+
u
|
|
38
39
|
),
|
|
39
40
|
value: r,
|
|
40
|
-
...
|
|
41
|
+
...m,
|
|
41
42
|
children: /* @__PURE__ */ o(
|
|
42
43
|
c.Indicator,
|
|
43
44
|
{
|
|
45
|
+
"data-component": "progress-indicator",
|
|
44
46
|
className: d(
|
|
45
47
|
"h-full w-full flex-1 transition-all",
|
|
46
48
|
e === "default" && "bg-[#4259ee]",
|
|
@@ -55,7 +57,7 @@ const g = u.forwardRef(
|
|
|
55
57
|
] });
|
|
56
58
|
}
|
|
57
59
|
);
|
|
58
|
-
|
|
60
|
+
a.displayName = c.Root.displayName;
|
|
59
61
|
export {
|
|
60
|
-
|
|
62
|
+
a as Progress
|
|
61
63
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import * as k from "react";
|
|
3
3
|
import { cva as P } from "class-variance-authority";
|
|
4
4
|
import { Info as T, CheckCircle2 as V, AlertTriangle as R, Trash2 as A } from "lucide-react";
|
|
@@ -21,16 +21,16 @@ const U = P("", {
|
|
|
21
21
|
}), G = k.forwardRef(
|
|
22
22
|
({
|
|
23
23
|
open: f,
|
|
24
|
-
onOpenChange:
|
|
24
|
+
onOpenChange: c,
|
|
25
25
|
title: d,
|
|
26
|
-
description:
|
|
26
|
+
description: l,
|
|
27
27
|
confirmLabel: m = "Confirm",
|
|
28
|
-
cancelLabel:
|
|
29
|
-
onConfirm:
|
|
30
|
-
onCancel:
|
|
28
|
+
cancelLabel: p = "Cancel",
|
|
29
|
+
onConfirm: u,
|
|
30
|
+
onCancel: x,
|
|
31
31
|
confirmVariant: b,
|
|
32
32
|
cancelVariant: h = "secondary",
|
|
33
|
-
variant:
|
|
33
|
+
variant: e = "default",
|
|
34
34
|
showClose: g = !0,
|
|
35
35
|
preventOutsideClick: w = !1,
|
|
36
36
|
footer: a,
|
|
@@ -39,11 +39,11 @@ const U = P("", {
|
|
|
39
39
|
...C
|
|
40
40
|
}, D) => {
|
|
41
41
|
const v = () => {
|
|
42
|
-
|
|
42
|
+
u?.(), c?.(!1);
|
|
43
43
|
}, y = () => {
|
|
44
|
-
|
|
45
|
-
}, s =
|
|
46
|
-
return /* @__PURE__ */
|
|
44
|
+
x?.(), c?.(!1);
|
|
45
|
+
}, s = e !== "default", j = b || (e === "destructive" ? "destructive" : "default");
|
|
46
|
+
return /* @__PURE__ */ t(B, { open: f, onOpenChange: c, ...C, children: /* @__PURE__ */ i(
|
|
47
47
|
F,
|
|
48
48
|
{
|
|
49
49
|
ref: D,
|
|
@@ -57,22 +57,24 @@ const U = P("", {
|
|
|
57
57
|
s && "flex flex-col items-center p-6 pt-10 text-center",
|
|
58
58
|
N
|
|
59
59
|
),
|
|
60
|
+
"data-component": "prompt",
|
|
61
|
+
"data-variant": e,
|
|
60
62
|
children: [
|
|
61
63
|
s && /* @__PURE__ */ i(
|
|
62
64
|
"div",
|
|
63
65
|
{
|
|
64
66
|
className: r(
|
|
65
67
|
"mb-4 flex h-12 w-12 items-center justify-center rounded-xl",
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
e === "info" && "bg-[#eceefd] text-[#4259ee]",
|
|
69
|
+
e === "success" && "bg-[#ebf7f1] text-[#10b981]",
|
|
70
|
+
e === "warning" && "bg-[#f6ebbf] text-[#d97706]",
|
|
71
|
+
e === "destructive" && "bg-[#fceeee] text-[#ef4444]"
|
|
70
72
|
),
|
|
71
73
|
children: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
e === "info" && /* @__PURE__ */ t(T, { size: 24 }),
|
|
75
|
+
e === "success" && /* @__PURE__ */ t(V, { size: 24 }),
|
|
76
|
+
e === "warning" && /* @__PURE__ */ t(R, { size: 24 }),
|
|
77
|
+
e === "destructive" && /* @__PURE__ */ t(A, { size: 24 })
|
|
76
78
|
]
|
|
77
79
|
}
|
|
78
80
|
),
|
|
@@ -81,7 +83,7 @@ const U = P("", {
|
|
|
81
83
|
{
|
|
82
84
|
className: r(s && "mb-6 space-y-2 items-center bg-white border-none"),
|
|
83
85
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ t(
|
|
85
87
|
I,
|
|
86
88
|
{
|
|
87
89
|
className: r(
|
|
@@ -90,34 +92,34 @@ const U = P("", {
|
|
|
90
92
|
children: d
|
|
91
93
|
}
|
|
92
94
|
),
|
|
93
|
-
|
|
95
|
+
l && /* @__PURE__ */ t(
|
|
94
96
|
q,
|
|
95
97
|
{
|
|
96
98
|
className: r(s && "text-sm text-[#60697d]"),
|
|
97
|
-
children:
|
|
99
|
+
children: l
|
|
98
100
|
}
|
|
99
101
|
)
|
|
100
102
|
]
|
|
101
103
|
}
|
|
102
104
|
),
|
|
103
|
-
o && /* @__PURE__ */
|
|
104
|
-
a ? /* @__PURE__ */
|
|
105
|
+
o && /* @__PURE__ */ t("div", { className: r("w-full py-4", s && "text-center"), children: o }),
|
|
106
|
+
a ? /* @__PURE__ */ t("div", { className: "w-full", children: a }) : /* @__PURE__ */ i(
|
|
105
107
|
E,
|
|
106
108
|
{
|
|
107
109
|
className: r(
|
|
108
110
|
s && "mt-6 flex flex-row justify-center gap-3 w-full sm:justify-center px-0 pb-0"
|
|
109
111
|
),
|
|
110
112
|
children: [
|
|
111
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ t(
|
|
112
114
|
n,
|
|
113
115
|
{
|
|
114
116
|
variant: h,
|
|
115
117
|
onClick: y,
|
|
116
118
|
className: r(s && "h-10 px-6"),
|
|
117
|
-
children:
|
|
119
|
+
children: p
|
|
118
120
|
}
|
|
119
121
|
),
|
|
120
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ t(
|
|
121
123
|
n,
|
|
122
124
|
{
|
|
123
125
|
variant: j,
|
|
@@ -1,62 +1,71 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as n from "react";
|
|
3
3
|
import * as a from "@radix-ui/react-radio-group";
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as t } from "../../lib/utils.js";
|
|
5
5
|
import { Info as p } from "../../icons/index.js";
|
|
6
|
-
const b =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
const b = n.forwardRef(({ className: o, orientation: i = "horizontal", label: d, helperText: c, isError: r, required: m, ...l }, u) => /* @__PURE__ */ s(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
className: t("grid gap-1.5", o),
|
|
10
|
+
"data-component": "radio-group",
|
|
11
|
+
"data-invalid": r || void 0,
|
|
12
|
+
children: [
|
|
13
|
+
d && /* @__PURE__ */ s(
|
|
14
|
+
"label",
|
|
15
|
+
{
|
|
16
|
+
className: t(
|
|
17
|
+
"text-xs font-medium leading-[18px] text-[#60697d]",
|
|
18
|
+
// Exact legacy color
|
|
19
|
+
l.disabled && "opacity-70",
|
|
20
|
+
r && "text-destructive"
|
|
21
|
+
),
|
|
22
|
+
children: [
|
|
23
|
+
d,
|
|
24
|
+
" ",
|
|
25
|
+
m && /* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
|
|
26
|
+
]
|
|
27
|
+
}
|
|
15
28
|
),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"flex gap-4 group",
|
|
28
|
-
i === "vertical" && "flex-col gap-2"
|
|
29
|
+
/* @__PURE__ */ e(
|
|
30
|
+
a.Root,
|
|
31
|
+
{
|
|
32
|
+
className: t(
|
|
33
|
+
"flex gap-4 group",
|
|
34
|
+
i === "vertical" && "flex-col gap-2"
|
|
35
|
+
),
|
|
36
|
+
"data-error": r,
|
|
37
|
+
...l,
|
|
38
|
+
ref: u
|
|
39
|
+
}
|
|
29
40
|
),
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
)
|
|
48
|
-
] })
|
|
49
|
-
] }));
|
|
41
|
+
c && /* @__PURE__ */ s("div", { className: t("flex items-center gap-1", r && "text-destructive"), children: [
|
|
42
|
+
!r && /* @__PURE__ */ e(p, { size: 10, className: "shrink-0 text-muted-foreground" }),
|
|
43
|
+
/* @__PURE__ */ e(
|
|
44
|
+
"p",
|
|
45
|
+
{
|
|
46
|
+
className: t(
|
|
47
|
+
"text-[10px] text-[#7a8294]",
|
|
48
|
+
// Exact legacy color
|
|
49
|
+
r && "text-destructive"
|
|
50
|
+
),
|
|
51
|
+
children: c
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
));
|
|
50
58
|
b.displayName = a.Root.displayName;
|
|
51
|
-
const f =
|
|
59
|
+
const f = n.forwardRef(({ className: o, ...i }, d) => /* @__PURE__ */ e(
|
|
52
60
|
a.Item,
|
|
53
61
|
{
|
|
54
62
|
ref: d,
|
|
55
|
-
className:
|
|
63
|
+
className: t(
|
|
56
64
|
"aspect-square h-4 w-4 rounded-full border border-tertiary-border bg-white text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:bg-disabled-secondary-bg disabled:border-border data-[state=checked]:border-primary hover:border-primary",
|
|
57
65
|
"group-data-[error=true]:border-destructive group-data-[error=true]:data-[state=checked]:border-destructive group-data-[error=true]:text-destructive",
|
|
58
66
|
o
|
|
59
67
|
),
|
|
68
|
+
"data-component": "radio-group-item",
|
|
60
69
|
...i,
|
|
61
70
|
children: /* @__PURE__ */ e(a.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-2.5 w-2.5 rounded-full bg-current peer-disabled:bg-accordion-bg" }) })
|
|
62
71
|
}
|
|
@@ -2,7 +2,6 @@ import { Option } from '../../types/select.types';
|
|
|
2
2
|
import { FlatOption } from '../hooks/useFlattenOptions';
|
|
3
3
|
interface SubmenuProps {
|
|
4
4
|
parentOption: FlatOption | Option;
|
|
5
|
-
parentRect: DOMRect;
|
|
6
5
|
isMulti: boolean;
|
|
7
6
|
isReadOnly: boolean;
|
|
8
7
|
isSelected: (option: Option) => boolean;
|
|
@@ -11,5 +10,5 @@ interface SubmenuProps {
|
|
|
11
10
|
handleSelect: (option: Option) => void;
|
|
12
11
|
id?: string;
|
|
13
12
|
}
|
|
14
|
-
declare const Submenu: ({ parentOption,
|
|
13
|
+
declare const Submenu: ({ parentOption, isMulti, isReadOnly, isSelected, getIndeterminateState, getSelectedCount, handleSelect, id, }: SubmenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
export default Submenu;
|