impact-nova 1.3.0 → 1.5.2
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 +49 -0
- package/dist/components/layout/dashboard-layout.d.ts +15 -1
- package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +65 -64
- package/dist/components/ui/accordion.js +38 -34
- package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +1 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.d.ts +58 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.js +104 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +62 -54
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +4 -6
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +54 -68
- package/dist/components/ui/ag-grid-react/cell-renderers/index.d.ts +3 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/index.js +33 -27
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +3 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +28 -12
- package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.d.ts +2 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +45 -44
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.d.ts +4 -6
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +23 -37
- package/dist/components/ui/ag-grid-react/cell-renderers/types.d.ts +33 -17
- package/dist/components/ui/ag-grid-react/editable-utils.d.ts +27 -0
- package/dist/components/ui/ag-grid-react/editable-utils.js +62 -0
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +99 -98
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +110 -143
- package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +72 -69
- package/dist/components/ui/ag-grid-react/headers/components/header-info.js +36 -35
- package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +14 -12
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +111 -110
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +204 -203
- package/dist/components/ui/alert.js +62 -58
- package/dist/components/ui/breadcrumb.js +81 -74
- package/dist/components/ui/calendar.js +354 -354
- package/dist/components/ui/chart/chart.js +63 -62
- package/dist/components/ui/chips.js +42 -38
- package/dist/components/ui/command-palette/command-palette-context.d.ts +52 -0
- package/dist/components/ui/command-palette/command-palette-context.js +110 -0
- package/dist/components/ui/command-palette/command-palette.d.ts +67 -0
- package/dist/components/ui/command-palette/command-palette.js +402 -0
- package/dist/components/ui/command-palette/index.d.ts +23 -0
- package/dist/components/ui/command-palette/index.js +44 -0
- package/dist/components/ui/command-palette/kbd.d.ts +28 -0
- package/dist/components/ui/command-palette/kbd.js +52 -0
- package/dist/components/ui/command-palette/shortcut-registry.d.ts +68 -0
- package/dist/components/ui/command-palette/shortcut-registry.js +183 -0
- package/dist/components/ui/command-palette/shortcut-scope-provider.d.ts +55 -0
- package/dist/components/ui/command-palette/shortcut-scope-provider.js +55 -0
- package/dist/components/ui/command-palette/shortcut-settings.d.ts +27 -0
- package/dist/components/ui/command-palette/shortcut-settings.js +266 -0
- package/dist/components/ui/command-palette/use-browser-shortcuts.d.ts +32 -0
- package/dist/components/ui/command-palette/use-browser-shortcuts.js +48 -0
- package/dist/components/ui/command-palette/use-global-shortcut.d.ts +3 -0
- package/dist/components/ui/command-palette/use-global-shortcut.js +7 -0
- package/dist/components/ui/command-palette/use-shortcut.d.ts +47 -0
- package/dist/components/ui/command-palette/use-shortcut.js +49 -0
- package/dist/components/ui/command-palette/utils.d.ts +119 -0
- package/dist/components/ui/command-palette/utils.js +248 -0
- package/dist/components/ui/data-table/data-table-column-list.js +87 -86
- package/dist/components/ui/data-table/data-table-format-options.js +45 -44
- package/dist/components/ui/data-table/data-table-view-options.js +39 -38
- package/dist/components/ui/date-picker/date-picker.js +89 -87
- package/dist/components/ui/date-picker/date-range-picker.js +140 -138
- package/dist/components/ui/date-picker/month-picker.js +82 -81
- package/dist/components/ui/date-picker/month-range-picker.js +108 -105
- package/dist/components/ui/date-picker/multi-date-picker.js +68 -66
- package/dist/components/ui/date-picker/multi-month-picker.js +59 -58
- package/dist/components/ui/date-picker/multi-week-picker.js +80 -78
- package/dist/components/ui/date-picker/week-picker.js +117 -115
- package/dist/components/ui/date-picker/week-range-picker.js +166 -164
- package/dist/components/ui/dialog.js +78 -73
- package/dist/components/ui/drawer.js +71 -66
- package/dist/components/ui/file-upload.js +131 -127
- package/dist/components/ui/filter-panel/filter-panel.js +98 -94
- package/dist/components/ui/filter-strip/filter-strip.js +95 -91
- package/dist/components/ui/filter-strip/filter-summary.js +91 -90
- package/dist/components/ui/header.js +57 -53
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +78 -76
- package/dist/components/ui/loader.js +17 -16
- package/dist/components/ui/nested-list/components/NestedListHeader.d.ts +1 -0
- package/dist/components/ui/nested-list/components/NestedListHeader.js +51 -48
- package/dist/components/ui/nested-list/components/SortableItem.js +60 -59
- package/dist/components/ui/nested-list/nested-list.js +184 -182
- package/dist/components/ui/notification-panel/notification-panel.js +60 -53
- package/dist/components/ui/popover.js +45 -40
- package/dist/components/ui/prompt.js +90 -86
- package/dist/components/ui/select/select.js +206 -209
- package/dist/components/ui/sheet.d.ts +1 -0
- package/dist/components/ui/sheet.js +50 -48
- package/dist/components/ui/sidebar.js +273 -267
- package/dist/components/ui/stepper.js +75 -63
- package/dist/components/ui/tag.js +48 -44
- package/dist/components/ui/toast.js +46 -41
- package/dist/i18n/ImpactNovaI18nContext.d.ts +21 -0
- package/dist/i18n/ImpactNovaI18nContext.js +76 -0
- package/dist/i18n/defaultMessages.d.ts +231 -0
- package/dist/i18n/defaultMessages.js +206 -0
- package/dist/i18n/getDateFnsLocale.d.ts +11 -0
- package/dist/i18n/getDateFnsLocale.js +21 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/locales/de.d.ts +2 -0
- package/dist/i18n/locales/de.js +206 -0
- package/dist/i18n/locales/es.d.ts +2 -0
- package/dist/i18n/locales/es.js +206 -0
- package/dist/i18n/locales/hi.d.ts +2 -0
- package/dist/i18n/locales/hi.js +206 -0
- package/dist/i18n/locales/index.d.ts +4 -0
- package/dist/i18n/locales/kn.d.ts +2 -0
- package/dist/i18n/locales/kn.js +206 -0
- package/dist/icons/assets/boxAdd.svg.js +5 -0
- package/dist/icons/assets/boxed.svg.js +5 -0
- package/dist/icons/assets/trolley.svg.js +5 -0
- package/dist/icons/assets/unlocked.svg.js +5 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +179 -171
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +232 -172
- package/package.json +36 -4
- package/dist/components/ui/ag-grid-react/cell-renderers/types.js +0 -74
|
@@ -1,58 +1,65 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { Sheet as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Bell as
|
|
6
|
-
import { cn as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as m, createContext as h } from "react";
|
|
3
|
+
import { Sheet as p, SheetContent as x, SheetDescription as u, SheetTitle as N, SheetClose as w } from "../sheet.js";
|
|
4
|
+
import { Button as b } from "../button.js";
|
|
5
|
+
import { Bell as v, X as g } from "lucide-react";
|
|
6
|
+
import { cn as r } from "../../../lib/utils.js";
|
|
7
|
+
import { useImpactNovaI18n as s } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
8
|
+
const d = h(null), B = () => {
|
|
9
|
+
const t = m(d);
|
|
10
|
+
if (!t)
|
|
10
11
|
throw new Error("useNotificationContext must be used within a NotificationPanel");
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
open:
|
|
12
|
+
return t;
|
|
13
|
+
}, I = ({
|
|
14
|
+
open: t,
|
|
14
15
|
onOpenChange: n,
|
|
15
|
-
children:
|
|
16
|
-
className:
|
|
17
|
-
preventClose:
|
|
18
|
-
}) =>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
] }),
|
|
48
|
-
|
|
49
|
-
|
|
16
|
+
children: o,
|
|
17
|
+
className: l,
|
|
18
|
+
preventClose: i = !1
|
|
19
|
+
}) => {
|
|
20
|
+
const { t: f } = s();
|
|
21
|
+
return /* @__PURE__ */ e(d.Provider, { value: { setPreventClose: () => {
|
|
22
|
+
} }, children: /* @__PURE__ */ e(p, { open: t, onOpenChange: n, children: /* @__PURE__ */ a(
|
|
23
|
+
x,
|
|
24
|
+
{
|
|
25
|
+
side: "right",
|
|
26
|
+
className: r(
|
|
27
|
+
"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",
|
|
28
|
+
l
|
|
29
|
+
),
|
|
30
|
+
onInteractOutside: (c) => {
|
|
31
|
+
i && c.preventDefault();
|
|
32
|
+
},
|
|
33
|
+
onEscapeKeyDown: (c) => {
|
|
34
|
+
i && c.preventDefault();
|
|
35
|
+
},
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ e(u, { className: "sr-only", children: f("notificationPanel.description") }),
|
|
38
|
+
o
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
) }) });
|
|
42
|
+
}, E = ({ children: t, className: n }) => /* @__PURE__ */ e("div", { "data-component": "notification-panel-content", className: r("flex h-full flex-col bg-white", n), children: t }), T = ({ title: t, children: n, className: o }) => {
|
|
43
|
+
const { t: l } = s(), i = t ?? l("notificationPanel.title");
|
|
44
|
+
return /* @__PURE__ */ a("div", { "data-component": "notification-panel-header", className: r("flex shrink-0 items-center justify-between border-b px-4 py-3 bg-white", o), children: [
|
|
45
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
46
|
+
/* @__PURE__ */ e("div", { className: "flex h-6 w-6 items-center justify-center", children: /* @__PURE__ */ e(v, { className: "h-5 w-5 text-gray-500" }) }),
|
|
47
|
+
typeof i == "string" ? /* @__PURE__ */ e(N, { className: "text-lg font-bold text-[#1f2b4d]", children: i }) : i
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
50
|
+
n,
|
|
51
|
+
/* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(b, { variant: "secondary", size: "icon", "aria-label": l("aria.close"), "data-component": "notification-panel-close", children: /* @__PURE__ */ e(g, { className: "h-4 w-4" }) }) })
|
|
52
|
+
] })
|
|
53
|
+
] });
|
|
54
|
+
}, z = ({ children: t, className: n }) => /* @__PURE__ */ e("div", { "data-component": "notification-panel-body", className: r("flex flex-1 flex-col overflow-hidden bg-background", n), children: t }), F = ({ children: t, className: n, leftAction: o }) => /* @__PURE__ */ a("div", { "data-component": "notification-panel-footer", className: r("flex items-center justify-between border-t p-4 bg-white shrink-0 mt-auto shadow-md", n), children: [
|
|
55
|
+
/* @__PURE__ */ e("div", { children: o }),
|
|
56
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: t })
|
|
50
57
|
] });
|
|
51
58
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
I as NotificationPanel,
|
|
60
|
+
z as NotificationPanelBody,
|
|
61
|
+
E as NotificationPanelContent,
|
|
62
|
+
F as NotificationPanelFooter,
|
|
63
|
+
T as NotificationPanelHeader,
|
|
64
|
+
B as useNotificationContext
|
|
58
65
|
};
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
3
|
import * as a from "@radix-ui/react-popover";
|
|
4
4
|
import { X as p } from "lucide-react";
|
|
5
5
|
import { Tooltip as m, TooltipTrigger as c, TooltipContent as f } from "./tooltip.js";
|
|
6
6
|
import { cn as r } from "../../lib/utils.js";
|
|
7
|
-
|
|
7
|
+
import { useImpactNovaI18n as v } from "../../i18n/ImpactNovaI18nContext.js";
|
|
8
|
+
const j = a.Root, R = a.Trigger, z = a.Anchor, h = l.forwardRef(({ className: e, align: o = "center", sideOffset: i = 4, ...s }, n) => /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(
|
|
8
9
|
a.Content,
|
|
9
10
|
{
|
|
10
|
-
ref:
|
|
11
|
+
ref: n,
|
|
11
12
|
align: o,
|
|
12
|
-
sideOffset:
|
|
13
|
+
sideOffset: i,
|
|
13
14
|
"data-component": "popover-content",
|
|
14
15
|
className: r(
|
|
15
16
|
"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] pointer-events-auto",
|
|
16
17
|
e
|
|
17
18
|
),
|
|
18
|
-
...
|
|
19
|
+
...s
|
|
19
20
|
}
|
|
20
21
|
) }));
|
|
21
|
-
|
|
22
|
-
const
|
|
22
|
+
h.displayName = a.Content.displayName;
|
|
23
|
+
const N = ({
|
|
23
24
|
className: e,
|
|
24
25
|
...o
|
|
25
26
|
}) => /* @__PURE__ */ t(
|
|
@@ -29,7 +30,7 @@ const h = ({
|
|
|
29
30
|
...o
|
|
30
31
|
}
|
|
31
32
|
);
|
|
32
|
-
|
|
33
|
+
N.displayName = "PopoverHeader";
|
|
33
34
|
const g = ({
|
|
34
35
|
className: e,
|
|
35
36
|
...o
|
|
@@ -45,47 +46,51 @@ const g = ({
|
|
|
45
46
|
}
|
|
46
47
|
);
|
|
47
48
|
g.displayName = "PopoverTitle";
|
|
48
|
-
const x =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
49
|
+
const x = l.forwardRef(({ className: e, ...o }, i) => {
|
|
50
|
+
const { t: s } = v(), n = s("aria.close");
|
|
51
|
+
return /* @__PURE__ */ d(m, { children: [
|
|
52
|
+
/* @__PURE__ */ t(c, { asChild: !0, children: /* @__PURE__ */ d(
|
|
53
|
+
a.Close,
|
|
54
|
+
{
|
|
55
|
+
ref: i,
|
|
56
|
+
"data-component": "popover-close",
|
|
57
|
+
className: r(
|
|
58
|
+
"rounded-sm opacity-70 transition-opacity hover:opacity-100 outline-none focus:ring-0 disabled:pointer-events-none",
|
|
59
|
+
e
|
|
60
|
+
),
|
|
61
|
+
"aria-label": n,
|
|
62
|
+
...o,
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ t(p, { className: "h-4 w-4 text-[#60697d]" }),
|
|
65
|
+
/* @__PURE__ */ t("span", { className: "sr-only", children: n })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
) }),
|
|
69
|
+
/* @__PURE__ */ t(f, { variant: "tertiary", side: "top", children: n })
|
|
70
|
+
] });
|
|
71
|
+
});
|
|
67
72
|
x.displayName = a.Close.displayName;
|
|
68
|
-
const
|
|
73
|
+
const y = ({
|
|
69
74
|
className: e,
|
|
70
75
|
...o
|
|
71
76
|
}) => /* @__PURE__ */ t("div", { className: r("text-sm", e), ...o });
|
|
72
|
-
|
|
73
|
-
const
|
|
77
|
+
y.displayName = "PopoverBody";
|
|
78
|
+
const u = ({
|
|
74
79
|
className: e,
|
|
75
80
|
...o
|
|
76
|
-
}) => /* @__PURE__ */
|
|
81
|
+
}) => /* @__PURE__ */ d("div", { className: r("mt-4 flex flex-col gap-3", e), ...o, children: [
|
|
77
82
|
/* @__PURE__ */ t("div", { className: "h-[1px] w-full bg-[#f0f2f5]" }),
|
|
78
83
|
/* @__PURE__ */ t("div", { className: "flex justify-end gap-2", children: o.children })
|
|
79
84
|
] });
|
|
80
|
-
|
|
85
|
+
u.displayName = "PopoverFooter";
|
|
81
86
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
j as Popover,
|
|
88
|
+
z as PopoverAnchor,
|
|
89
|
+
y as PopoverBody,
|
|
85
90
|
x as PopoverClose,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
h as PopoverContent,
|
|
92
|
+
u as PopoverFooter,
|
|
93
|
+
N as PopoverHeader,
|
|
89
94
|
g as PopoverTitle,
|
|
90
|
-
|
|
95
|
+
R as PopoverTrigger
|
|
91
96
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { X as
|
|
5
|
-
import { Info3d as
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import { cva as V } from "class-variance-authority";
|
|
4
|
+
import { X as k } from "lucide-react";
|
|
5
|
+
import { Info3d as B, Success3d as F, Warning3d as H, Delete3d as S } from "../../icons/index.js";
|
|
6
6
|
import { cn as r } from "../../lib/utils.js";
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
import { Button as
|
|
9
|
-
import { Dialog as
|
|
10
|
-
|
|
7
|
+
import { Tooltip as W, TooltipTrigger as X, TooltipContent as q } from "./tooltip.js";
|
|
8
|
+
import { Button as m } from "./button.js";
|
|
9
|
+
import { Dialog as A, DialogContent as E, DialogHeader as G, DialogTitle as J, DialogDescription as K, DialogFooter as M } from "./dialog.js";
|
|
10
|
+
import { useImpactNovaI18n as u } from "../../i18n/ImpactNovaI18nContext.js";
|
|
11
|
+
const se = V("", {
|
|
11
12
|
variants: {
|
|
12
13
|
variant: {
|
|
13
14
|
default: "",
|
|
@@ -20,64 +21,67 @@ const O = T("", {
|
|
|
20
21
|
defaultVariants: {
|
|
21
22
|
variant: "default"
|
|
22
23
|
}
|
|
23
|
-
}),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
}), Q = p.forwardRef(({ className: c, ...s }, l) => {
|
|
25
|
+
const { t: i } = u();
|
|
26
|
+
return /* @__PURE__ */ a(W, { children: [
|
|
27
|
+
/* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(
|
|
28
|
+
"button",
|
|
29
|
+
{
|
|
30
|
+
ref: l,
|
|
31
|
+
className: r("text-[#60697d] hover:text-[#0d152c] transition-colors", c),
|
|
32
|
+
type: "button",
|
|
33
|
+
"aria-label": i("aria.close"),
|
|
34
|
+
...s,
|
|
35
|
+
children: /* @__PURE__ */ e(k, { size: 16 })
|
|
36
|
+
}
|
|
37
|
+
) }),
|
|
38
|
+
/* @__PURE__ */ e(q, { side: "top", variant: "tertiary", children: i("aria.close") })
|
|
39
|
+
] });
|
|
40
|
+
});
|
|
41
|
+
Q.displayName = "PromptClose";
|
|
42
|
+
const U = p.forwardRef(
|
|
39
43
|
({
|
|
40
|
-
open:
|
|
41
|
-
onOpenChange:
|
|
42
|
-
title:
|
|
43
|
-
description:
|
|
44
|
-
confirmLabel:
|
|
45
|
-
cancelLabel:
|
|
46
|
-
onConfirm:
|
|
47
|
-
onCancel:
|
|
48
|
-
confirmVariant:
|
|
49
|
-
cancelVariant:
|
|
44
|
+
open: c,
|
|
45
|
+
onOpenChange: s,
|
|
46
|
+
title: l,
|
|
47
|
+
description: i,
|
|
48
|
+
confirmLabel: x,
|
|
49
|
+
cancelLabel: b,
|
|
50
|
+
onConfirm: h,
|
|
51
|
+
onCancel: g,
|
|
52
|
+
confirmVariant: N,
|
|
53
|
+
cancelVariant: w = "secondary",
|
|
50
54
|
variant: t = "default",
|
|
51
|
-
showClose:
|
|
52
|
-
preventOutsideClick:
|
|
55
|
+
showClose: v = !0,
|
|
56
|
+
preventOutsideClick: y = !1,
|
|
53
57
|
footer: n,
|
|
54
58
|
children: d,
|
|
55
|
-
className:
|
|
56
|
-
...
|
|
57
|
-
},
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
return /* @__PURE__ */ e(
|
|
64
|
-
|
|
59
|
+
className: C,
|
|
60
|
+
...D
|
|
61
|
+
}, j) => {
|
|
62
|
+
const { t: f } = u(), z = b ?? f("prompt.cancel"), P = x ?? f("prompt.confirm"), T = () => {
|
|
63
|
+
h?.(), s?.(!1);
|
|
64
|
+
}, I = () => {
|
|
65
|
+
g?.(), s?.(!1);
|
|
66
|
+
}, o = t !== "default", L = N || (t === "destructive" ? "destructive" : "default");
|
|
67
|
+
return /* @__PURE__ */ e(A, { open: c, onOpenChange: s, ...D, children: /* @__PURE__ */ a(
|
|
68
|
+
E,
|
|
65
69
|
{
|
|
66
|
-
ref:
|
|
70
|
+
ref: j,
|
|
67
71
|
"aria-describedby": void 0,
|
|
68
|
-
hideClose: !
|
|
69
|
-
onPointerDownOutside: (
|
|
70
|
-
|
|
72
|
+
hideClose: !v,
|
|
73
|
+
onPointerDownOutside: (R) => {
|
|
74
|
+
y && R.preventDefault();
|
|
71
75
|
},
|
|
72
76
|
className: r(
|
|
73
77
|
"max-w-[400px] gap-0",
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
o && "flex flex-col items-center p-6 pt-6 text-center",
|
|
79
|
+
C
|
|
76
80
|
),
|
|
77
81
|
"data-component": "prompt",
|
|
78
82
|
"data-variant": t,
|
|
79
83
|
children: [
|
|
80
|
-
|
|
84
|
+
o && /* @__PURE__ */ a(
|
|
81
85
|
"div",
|
|
82
86
|
{
|
|
83
87
|
className: r(
|
|
@@ -88,61 +92,61 @@ const K = m.forwardRef(
|
|
|
88
92
|
t === "destructive" && "bg-[#fceeee] text-[#ef4444]"
|
|
89
93
|
),
|
|
90
94
|
children: [
|
|
91
|
-
t === "info" && /* @__PURE__ */ e(
|
|
92
|
-
t === "success" && /* @__PURE__ */ e(
|
|
93
|
-
t === "warning" && /* @__PURE__ */ e(
|
|
94
|
-
t === "destructive" && /* @__PURE__ */ e(
|
|
95
|
+
t === "info" && /* @__PURE__ */ e(B, { size: 24 }),
|
|
96
|
+
t === "success" && /* @__PURE__ */ e(F, { size: 24 }),
|
|
97
|
+
t === "warning" && /* @__PURE__ */ e(H, { size: 24 }),
|
|
98
|
+
t === "destructive" && /* @__PURE__ */ e(S, { size: 24 })
|
|
95
99
|
]
|
|
96
100
|
}
|
|
97
101
|
),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
|
|
102
|
+
/* @__PURE__ */ a(
|
|
103
|
+
G,
|
|
100
104
|
{
|
|
101
|
-
className: r(
|
|
105
|
+
className: r(o && "space-y-2 items-center bg-white border-none"),
|
|
102
106
|
children: [
|
|
103
107
|
/* @__PURE__ */ e(
|
|
104
|
-
|
|
108
|
+
J,
|
|
105
109
|
{
|
|
106
110
|
className: r(
|
|
107
|
-
|
|
111
|
+
o && "text-[18px] font-extrabold text-[#1f2b4d]"
|
|
108
112
|
),
|
|
109
|
-
children:
|
|
113
|
+
children: l
|
|
110
114
|
}
|
|
111
115
|
),
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
i && /* @__PURE__ */ e(
|
|
117
|
+
K,
|
|
114
118
|
{
|
|
115
|
-
className: r(
|
|
116
|
-
children:
|
|
119
|
+
className: r(o && "text-sm text-[#60697d]"),
|
|
120
|
+
children: i
|
|
117
121
|
}
|
|
118
122
|
)
|
|
119
123
|
]
|
|
120
124
|
}
|
|
121
125
|
),
|
|
122
|
-
d && /* @__PURE__ */ e("div", { className: r("w-full py-2",
|
|
123
|
-
n ? /* @__PURE__ */ e("div", { className: "w-full", children: n }) : /* @__PURE__ */
|
|
124
|
-
|
|
126
|
+
d && /* @__PURE__ */ e("div", { className: r("w-full py-2", o && "text-center"), children: d }),
|
|
127
|
+
n ? /* @__PURE__ */ e("div", { className: "w-full", children: n }) : /* @__PURE__ */ a(
|
|
128
|
+
M,
|
|
125
129
|
{
|
|
126
130
|
className: r(
|
|
127
|
-
|
|
131
|
+
o && "mt-6 flex flex-row justify-center gap-3 w-full sm:justify-center px-0 pb-0"
|
|
128
132
|
),
|
|
129
133
|
children: [
|
|
130
134
|
/* @__PURE__ */ e(
|
|
131
|
-
|
|
135
|
+
m,
|
|
132
136
|
{
|
|
133
|
-
variant:
|
|
134
|
-
onClick:
|
|
135
|
-
className: r(
|
|
136
|
-
children:
|
|
137
|
+
variant: w,
|
|
138
|
+
onClick: I,
|
|
139
|
+
className: r(o && "h-10 px-6"),
|
|
140
|
+
children: z
|
|
137
141
|
}
|
|
138
142
|
),
|
|
139
143
|
/* @__PURE__ */ e(
|
|
140
|
-
|
|
144
|
+
m,
|
|
141
145
|
{
|
|
142
|
-
variant:
|
|
143
|
-
onClick:
|
|
144
|
-
className: r(
|
|
145
|
-
children:
|
|
146
|
+
variant: L,
|
|
147
|
+
onClick: T,
|
|
148
|
+
className: r(o && "h-10 px-6"),
|
|
149
|
+
children: P
|
|
146
150
|
}
|
|
147
151
|
)
|
|
148
152
|
]
|
|
@@ -153,9 +157,9 @@ const K = m.forwardRef(
|
|
|
153
157
|
) });
|
|
154
158
|
}
|
|
155
159
|
);
|
|
156
|
-
|
|
160
|
+
U.displayName = "Prompt";
|
|
157
161
|
export {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
162
|
+
U as Prompt,
|
|
163
|
+
Q as PromptClose,
|
|
164
|
+
se as promptVariants
|
|
161
165
|
};
|