impact-nova 1.2.3 → 1.3.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/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +52 -51
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +170 -155
- package/dist/components/ui/alert.d.ts +1 -1
- package/dist/components/ui/alert.js +59 -47
- package/dist/components/ui/data-table/data-table-column-list.d.ts +1 -2
- package/dist/components/ui/data-table/data-table-column-list.js +120 -121
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/prompt.js +32 -31
- package/dist/components/ui/select/select.js +252 -240
- package/dist/components/ui/tabs.d.ts +11 -1
- package/dist/components/ui/tabs.js +79 -54
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/icons/assets/webp/delete-3d.webp.js +4 -0
- package/dist/icons/assets/webp/info-3d.webp.js +4 -0
- package/dist/icons/assets/webp/success-3d.webp.js +4 -0
- package/dist/icons/assets/webp/warning-3d.webp.js +4 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +143 -135
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +69 -68
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { Slot as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { X as u
|
|
8
|
-
const
|
|
9
|
-
"relative w-full rounded-lg border px-4 py-
|
|
1
|
+
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { Slot as p } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva as g } from "class-variance-authority";
|
|
5
|
+
import { cn as n } from "../../lib/utils.js";
|
|
6
|
+
import { Button as m } from "./button.js";
|
|
7
|
+
import { X as u } from "lucide-react";
|
|
8
|
+
const b = g(
|
|
9
|
+
"relative w-full rounded-lg border px-4 py-2 text-sm flex gap-3 items-start",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
@@ -21,69 +21,81 @@ const w = p(
|
|
|
21
21
|
variant: "default"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
),
|
|
25
|
-
({ className: e, variant:
|
|
26
|
-
|
|
24
|
+
), v = i.forwardRef(
|
|
25
|
+
({ className: e, variant: t, asChild: a = !1, removable: s, onClose: c, children: d, ...f }, h) => /* @__PURE__ */ o(
|
|
26
|
+
a ? p : "div",
|
|
27
27
|
{
|
|
28
|
-
ref:
|
|
28
|
+
ref: h,
|
|
29
29
|
role: "alert",
|
|
30
30
|
"data-component": "alert",
|
|
31
|
-
"data-variant":
|
|
32
|
-
className:
|
|
33
|
-
...
|
|
31
|
+
"data-variant": t ?? "default",
|
|
32
|
+
className: n(b({ variant: t }), e),
|
|
33
|
+
...f,
|
|
34
34
|
children: [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
d,
|
|
36
|
+
s && /* @__PURE__ */ r(
|
|
37
|
+
m,
|
|
38
38
|
{
|
|
39
39
|
variant: "ghost",
|
|
40
40
|
size: "icon",
|
|
41
41
|
className: "absolute right-4 top-3 h-4 w-4 p-0 text-secondary-foreground hover:text-foreground hover:bg-transparent",
|
|
42
|
-
onClick:
|
|
42
|
+
onClick: c,
|
|
43
43
|
"aria-label": "Close",
|
|
44
|
-
children: /* @__PURE__ */
|
|
44
|
+
children: /* @__PURE__ */ r(u, { className: "h-4 w-4" })
|
|
45
45
|
}
|
|
46
46
|
)
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
)
|
|
50
50
|
);
|
|
51
|
-
|
|
52
|
-
const
|
|
51
|
+
v.displayName = "Alert";
|
|
52
|
+
const x = i.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r(
|
|
53
53
|
"h5",
|
|
54
54
|
{
|
|
55
|
-
ref:
|
|
55
|
+
ref: a,
|
|
56
56
|
"data-component": "alert-title",
|
|
57
|
-
className:
|
|
58
|
-
...
|
|
57
|
+
className: n("font-semibold leading-[21px] tracking-tight text-foreground", e),
|
|
58
|
+
...t
|
|
59
59
|
}
|
|
60
60
|
));
|
|
61
|
-
|
|
62
|
-
const
|
|
61
|
+
x.displayName = "AlertTitle";
|
|
62
|
+
const w = i.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
|
-
ref:
|
|
65
|
+
ref: a,
|
|
66
66
|
"data-component": "alert-description",
|
|
67
|
-
className:
|
|
68
|
-
...
|
|
67
|
+
className: n("text-[12px] leading-[18px] text-secondary-foreground", e),
|
|
68
|
+
...t
|
|
69
69
|
}
|
|
70
70
|
));
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
w.displayName = "AlertDescription";
|
|
72
|
+
const l = ({ className: e }) => /* @__PURE__ */ o("svg", { className: e, focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", children: [
|
|
73
|
+
/* @__PURE__ */ r("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z", fill: "#4259ee" }),
|
|
74
|
+
/* @__PURE__ */ r("path", { d: "M13 17h-2v-6h2v6zm0-8h-2V7h2v2z", fill: "white" })
|
|
75
|
+
] }), z = ({ className: e }) => /* @__PURE__ */ o("svg", { className: e, focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", children: [
|
|
76
|
+
/* @__PURE__ */ r("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z", fill: "#3bb273" }),
|
|
77
|
+
/* @__PURE__ */ r("path", { d: "M10 14.17l-3.59-3.59L5 12l5 5 9-9-1.41-1.41L10 14.17z", fill: "white" })
|
|
78
|
+
] }), C = ({ className: e }) => /* @__PURE__ */ o("svg", { className: e, focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", children: [
|
|
79
|
+
/* @__PURE__ */ r("path", { d: "M1 21h22L12 2 1 21z", fill: "#e1bc29" }),
|
|
80
|
+
/* @__PURE__ */ r("path", { d: "M13 18h-2v-2h2v2zm0-4h-2v-4h2v4z", fill: "white" })
|
|
81
|
+
] }), I = ({ className: e }) => /* @__PURE__ */ o("svg", { className: e, focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", children: [
|
|
82
|
+
/* @__PURE__ */ r("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z", fill: "#e15554" }),
|
|
83
|
+
/* @__PURE__ */ r("path", { d: "M17 15.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z", fill: "white" })
|
|
84
|
+
] }), M = {
|
|
85
|
+
default: l,
|
|
86
|
+
info: l,
|
|
87
|
+
success: z,
|
|
88
|
+
warning: C,
|
|
89
|
+
error: I
|
|
90
|
+
}, N = ({ variant: e = "info", className: t = "h-5 w-5 shrink-0 mt-[2px]" }) => {
|
|
91
|
+
const a = M[e] || l;
|
|
92
|
+
return /* @__PURE__ */ r(a, { className: t });
|
|
81
93
|
};
|
|
82
|
-
|
|
94
|
+
N.displayName = "AlertIcon";
|
|
83
95
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
96
|
+
v as Alert,
|
|
97
|
+
w as AlertDescription,
|
|
98
|
+
N as AlertIcon,
|
|
99
|
+
x as AlertTitle,
|
|
100
|
+
b as alertVariants
|
|
89
101
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
interface DataTableColumnListProps {
|
|
2
2
|
enableApplyDiscard?: boolean;
|
|
3
|
-
enableLazyHierarchy?: boolean;
|
|
4
3
|
showSearch?: boolean;
|
|
5
4
|
showSelectAll?: boolean;
|
|
6
5
|
showCollapse?: boolean;
|
|
7
6
|
}
|
|
8
|
-
export declare const DataTableColumnList: ({ enableApplyDiscard,
|
|
7
|
+
export declare const DataTableColumnList: ({ enableApplyDiscard, showSearch, showSelectAll, showCollapse }: DataTableColumnListProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -1,157 +1,156 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useDataTable as
|
|
4
|
-
import { NestedList as
|
|
5
|
-
import { SelectionMode as
|
|
6
|
-
function
|
|
7
|
-
return "getChildren" in u && typeof u.getChildren == "function";
|
|
8
|
-
}
|
|
9
|
-
function _(u, h) {
|
|
1
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
+
import { useState as P, useRef as w, useCallback as m, useEffect as F } from "react";
|
|
3
|
+
import { useDataTable as q } from "./data-table-context.js";
|
|
4
|
+
import { NestedList as B } from "../nested-list/nested-list.js";
|
|
5
|
+
import { SelectionMode as H } from "../types/nested-list.types.js";
|
|
6
|
+
function J(d, S) {
|
|
10
7
|
let f = null;
|
|
11
|
-
return ((...
|
|
12
|
-
f && clearTimeout(f), f = setTimeout(() =>
|
|
8
|
+
return ((...D) => {
|
|
9
|
+
f && clearTimeout(f), f = setTimeout(() => d(...D), S);
|
|
13
10
|
});
|
|
14
11
|
}
|
|
15
|
-
const
|
|
16
|
-
enableApplyDiscard:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
showCollapse: I = !0
|
|
12
|
+
const $ = ({
|
|
13
|
+
enableApplyDiscard: d = !1,
|
|
14
|
+
showSearch: S = !0,
|
|
15
|
+
showSelectAll: f = !0,
|
|
16
|
+
showCollapse: D = !0
|
|
21
17
|
}) => {
|
|
22
|
-
const { gridApi:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
category: "group"
|
|
39
|
-
};
|
|
40
|
-
} else {
|
|
41
|
-
const e = o.getColId(), c = k.current.get(e), d = c ? !c.hide : o.isVisible();
|
|
42
|
-
return {
|
|
43
|
-
id: e,
|
|
44
|
-
label: o.getColDef().headerName || o.getColDef().field || e,
|
|
45
|
-
checked: d
|
|
46
|
-
};
|
|
47
|
-
}
|
|
18
|
+
const { gridApi: l } = q(), [j, R] = P([]), [A, U] = P(!1), y = w(!1), V = w(/* @__PURE__ */ new Map()), p = m(() => {
|
|
19
|
+
if (!l || y.current) return;
|
|
20
|
+
const n = l.getColumnState(), o = new Map(n.map((t) => [t.colId, t]));
|
|
21
|
+
V.current = o;
|
|
22
|
+
const s = l.getColumns() || [], a = new Map(s.map((t) => [t.getColId(), t])), u = [], e = [], I = /* @__PURE__ */ new Map(), k = (t, c) => {
|
|
23
|
+
const r = t.getGroupId();
|
|
24
|
+
let i = I.get(r);
|
|
25
|
+
if (i) return i;
|
|
26
|
+
const h = t.getOriginalParent(), C = h ? k(h, c).children : c, b = t.getColGroupDef();
|
|
27
|
+
return i = {
|
|
28
|
+
id: r,
|
|
29
|
+
label: b?.headerName || r,
|
|
30
|
+
checked: !0,
|
|
31
|
+
children: [],
|
|
32
|
+
category: "group"
|
|
33
|
+
}, I.set(r, i), C.push(i), i;
|
|
48
34
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const n = t.getLeftDisplayedColumnGroups() || [], o = t.getCenterDisplayedColumnGroups() || [], i = t.getRightDisplayedColumnGroups() || [], e = D(
|
|
60
|
-
[...n, ...i],
|
|
61
|
-
["frozen"]
|
|
62
|
-
), c = D(
|
|
63
|
-
o,
|
|
64
|
-
["scrollable"]
|
|
65
|
-
), d = [
|
|
66
|
-
{
|
|
67
|
-
id: "root-frozen",
|
|
68
|
-
label: "Frozen Columns",
|
|
69
|
-
checked: e.length === 0 || e.every((s) => s.checked),
|
|
70
|
-
children: e,
|
|
71
|
-
category: "structure",
|
|
72
|
-
isDragDisabled: !0
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: "root-scrollable",
|
|
76
|
-
label: "Scrollable Columns",
|
|
77
|
-
checked: c.length === 0 || c.every((s) => s.checked),
|
|
78
|
-
children: c,
|
|
79
|
-
category: "structure",
|
|
80
|
-
isDragDisabled: !0
|
|
35
|
+
let M = 0, L = 0, v = 0, O = 0;
|
|
36
|
+
n.forEach((t) => {
|
|
37
|
+
const c = a.get(t.colId);
|
|
38
|
+
if (!c) return;
|
|
39
|
+
let r = l.getDisplayNameForColumn(c, "header");
|
|
40
|
+
if (r === "") return;
|
|
41
|
+
if (r == null) {
|
|
42
|
+
const N = c.getColDef();
|
|
43
|
+
if (N.headerName === "") return;
|
|
44
|
+
r = N.headerName || N.field || t.colId;
|
|
81
45
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
46
|
+
if (!r || r.trim() === "")
|
|
47
|
+
return;
|
|
48
|
+
const i = !t.hide, h = {
|
|
49
|
+
id: t.colId,
|
|
50
|
+
label: r,
|
|
51
|
+
checked: i
|
|
52
|
+
};
|
|
53
|
+
t.pinned ? (M++, i && L++) : (v++, i && O++);
|
|
54
|
+
const C = t.pinned ? u : e, b = c.getOriginalParent();
|
|
55
|
+
b ? k(b, C).children.push(h) : C.push(h);
|
|
56
|
+
});
|
|
57
|
+
const G = (t) => {
|
|
58
|
+
let c = t.length > 0;
|
|
59
|
+
for (const r of t)
|
|
60
|
+
r.children && (r.checked = G(r.children)), r.checked || (c = !1);
|
|
61
|
+
return c;
|
|
62
|
+
};
|
|
63
|
+
G(u), G(e);
|
|
64
|
+
const E = [];
|
|
65
|
+
u.length > 0 && E.push({
|
|
66
|
+
id: "root-frozen",
|
|
67
|
+
label: "Frozen Columns",
|
|
68
|
+
checked: M > 0 && L === M,
|
|
69
|
+
children: u,
|
|
70
|
+
category: "structure",
|
|
71
|
+
isDragDisabled: !0
|
|
72
|
+
}), e.length > 0 && E.push({
|
|
73
|
+
id: "root-scrollable",
|
|
74
|
+
label: "Scrollable Columns",
|
|
75
|
+
checked: v > 0 && O === v,
|
|
76
|
+
children: e,
|
|
77
|
+
category: "structure",
|
|
78
|
+
isDragDisabled: !0
|
|
79
|
+
}), R(E), U(!0);
|
|
80
|
+
}, [l]), x = w(null);
|
|
81
|
+
F(() => {
|
|
82
|
+
x.current = J(p, 150);
|
|
83
|
+
}, [p]), F(() => {
|
|
84
|
+
if (!l) return;
|
|
85
|
+
const n = setTimeout(() => p(), 0), o = [
|
|
90
86
|
"columnVisible",
|
|
91
87
|
"columnPinned",
|
|
92
88
|
"columnMoved",
|
|
93
89
|
"newColumnsLoaded",
|
|
94
90
|
"gridReady",
|
|
95
|
-
"columnGroupOpened"
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
"columnGroupOpened",
|
|
92
|
+
"columnRowGroupChanged",
|
|
93
|
+
"columnPivotModeChanged",
|
|
94
|
+
"columnEverythingChanged"
|
|
95
|
+
], s = () => {
|
|
96
|
+
x.current?.();
|
|
98
97
|
};
|
|
99
|
-
return
|
|
100
|
-
clearTimeout(
|
|
98
|
+
return l.isDestroyed() || o.forEach((a) => l.addEventListener(a, s)), () => {
|
|
99
|
+
clearTimeout(n), l.isDestroyed() || o.forEach((a) => l.removeEventListener(a, s));
|
|
101
100
|
};
|
|
102
|
-
}, [
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
|
|
101
|
+
}, [l, p]);
|
|
102
|
+
const z = m((n) => {
|
|
103
|
+
const o = [], s = (a, u) => {
|
|
104
|
+
a.forEach((e) => {
|
|
106
105
|
if (e.id === "root-frozen") {
|
|
107
|
-
e.children &&
|
|
106
|
+
e.children && s(e.children, "left");
|
|
108
107
|
return;
|
|
109
108
|
}
|
|
110
109
|
if (e.id === "root-scrollable") {
|
|
111
|
-
e.children &&
|
|
110
|
+
e.children && s(e.children, null);
|
|
112
111
|
return;
|
|
113
112
|
}
|
|
114
|
-
e.category === "group" || e.children && e.children.length > 0 ? e.children &&
|
|
113
|
+
e.category === "group" || e.children && e.children.length > 0 ? e.children && s(e.children, u) : l?.getColumn(e.id) && o.push({
|
|
115
114
|
colId: e.id,
|
|
116
|
-
pinned:
|
|
115
|
+
pinned: u,
|
|
117
116
|
hide: !e.checked
|
|
118
117
|
});
|
|
119
118
|
});
|
|
120
119
|
};
|
|
121
|
-
return n
|
|
122
|
-
}, [
|
|
123
|
-
if (!
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
state:
|
|
120
|
+
return s(n, null), o;
|
|
121
|
+
}, [l]), g = m((n) => {
|
|
122
|
+
if (!l) return;
|
|
123
|
+
y.current = !0;
|
|
124
|
+
const o = z(n);
|
|
125
|
+
o.length > 0 && l.applyColumnState({
|
|
126
|
+
state: o,
|
|
128
127
|
applyOrder: !0
|
|
129
128
|
}), setTimeout(() => {
|
|
130
|
-
|
|
129
|
+
y.current = !1;
|
|
131
130
|
}, 300);
|
|
132
|
-
}, [
|
|
133
|
-
g(
|
|
134
|
-
}, [g]),
|
|
135
|
-
|
|
136
|
-
}, [
|
|
137
|
-
return
|
|
138
|
-
|
|
131
|
+
}, [l, z]), W = m((n) => {
|
|
132
|
+
g(n);
|
|
133
|
+
}, [g]), _ = m((n) => {
|
|
134
|
+
d || g(n), R(n);
|
|
135
|
+
}, [d, g]);
|
|
136
|
+
return A ? /* @__PURE__ */ T("div", { className: "flex flex-col h-full bg-white", children: /* @__PURE__ */ T(
|
|
137
|
+
B,
|
|
139
138
|
{
|
|
140
|
-
items:
|
|
141
|
-
onChange:
|
|
142
|
-
onSubmit:
|
|
143
|
-
enableApplyDiscard:
|
|
144
|
-
enableSearch:
|
|
145
|
-
enableSelectAll:
|
|
139
|
+
items: j,
|
|
140
|
+
onChange: _,
|
|
141
|
+
onSubmit: W,
|
|
142
|
+
enableApplyDiscard: d,
|
|
143
|
+
enableSearch: S,
|
|
144
|
+
enableSelectAll: f,
|
|
146
145
|
enableDragDrop: !0,
|
|
147
146
|
enableCollapse: !0,
|
|
148
|
-
enableGlobalCollapse:
|
|
149
|
-
selectionMode:
|
|
147
|
+
enableGlobalCollapse: D,
|
|
148
|
+
selectionMode: H.CASCADE_DOWN,
|
|
150
149
|
searchPlaceholder: "Search columns...",
|
|
151
150
|
className: "h-full"
|
|
152
151
|
}
|
|
153
|
-
) }) : /* @__PURE__ */
|
|
152
|
+
) }) : /* @__PURE__ */ T("div", { className: "p-4 text-[13px] text-slate-400", children: "Loading columns..." });
|
|
154
153
|
};
|
|
155
154
|
export {
|
|
156
|
-
|
|
155
|
+
$ as DataTableColumnList
|
|
157
156
|
};
|
|
@@ -12,7 +12,7 @@ const w = a.Root, T = a.Trigger, j = a.Anchor, v = s.forwardRef(({ className: e,
|
|
|
12
12
|
sideOffset: n,
|
|
13
13
|
"data-component": "popover-content",
|
|
14
14
|
className: r(
|
|
15
|
-
"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
|
+
"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
16
|
e
|
|
17
17
|
),
|
|
18
18
|
...d
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import * as m from "react";
|
|
3
|
-
import { cva as
|
|
4
|
-
import {
|
|
3
|
+
import { cva as T } from "class-variance-authority";
|
|
4
|
+
import { X as R } from "lucide-react";
|
|
5
|
+
import { Info3d as V, Success3d as k, Warning3d as B, Delete3d as F } from "../../icons/index.js";
|
|
5
6
|
import { cn as r } from "../../lib/utils.js";
|
|
6
|
-
import { Tooltip as
|
|
7
|
+
import { Tooltip as H, TooltipTrigger as I, TooltipContent as S } from "./tooltip.js";
|
|
7
8
|
import { Button as f } from "./button.js";
|
|
8
|
-
import { Dialog as
|
|
9
|
-
const
|
|
9
|
+
import { Dialog as W, DialogContent as X, DialogHeader as q, DialogTitle as A, DialogDescription as E, DialogFooter as G } from "./dialog.js";
|
|
10
|
+
const O = T("", {
|
|
10
11
|
variants: {
|
|
11
12
|
variant: {
|
|
12
13
|
default: "",
|
|
@@ -19,8 +20,8 @@ const $ = P("", {
|
|
|
19
20
|
defaultVariants: {
|
|
20
21
|
variant: "default"
|
|
21
22
|
}
|
|
22
|
-
}),
|
|
23
|
-
/* @__PURE__ */ e(
|
|
23
|
+
}), J = m.forwardRef(({ className: l, ...i }, a) => /* @__PURE__ */ o(H, { children: [
|
|
24
|
+
/* @__PURE__ */ e(I, { asChild: !0, children: /* @__PURE__ */ e(
|
|
24
25
|
"button",
|
|
25
26
|
{
|
|
26
27
|
ref: a,
|
|
@@ -28,13 +29,13 @@ const $ = P("", {
|
|
|
28
29
|
type: "button",
|
|
29
30
|
"aria-label": "Close",
|
|
30
31
|
...i,
|
|
31
|
-
children: /* @__PURE__ */ e(
|
|
32
|
+
children: /* @__PURE__ */ e(R, { size: 16 })
|
|
32
33
|
}
|
|
33
34
|
) }),
|
|
34
|
-
/* @__PURE__ */ e(
|
|
35
|
+
/* @__PURE__ */ e(S, { side: "top", variant: "tertiary", children: "Close" })
|
|
35
36
|
] }));
|
|
36
|
-
|
|
37
|
-
const
|
|
37
|
+
J.displayName = "PromptClose";
|
|
38
|
+
const K = m.forwardRef(
|
|
38
39
|
({
|
|
39
40
|
open: l,
|
|
40
41
|
onOpenChange: i,
|
|
@@ -56,17 +57,17 @@ const M = m.forwardRef(
|
|
|
56
57
|
}, v) => {
|
|
57
58
|
const D = () => {
|
|
58
59
|
x?.(), i?.(!1);
|
|
59
|
-
},
|
|
60
|
+
}, j = () => {
|
|
60
61
|
h?.(), i?.(!1);
|
|
61
|
-
}, s = t !== "default",
|
|
62
|
-
return /* @__PURE__ */ e(
|
|
63
|
-
|
|
62
|
+
}, s = t !== "default", z = b || (t === "destructive" ? "destructive" : "default");
|
|
63
|
+
return /* @__PURE__ */ e(W, { open: l, onOpenChange: i, ...y, children: /* @__PURE__ */ o(
|
|
64
|
+
X,
|
|
64
65
|
{
|
|
65
66
|
ref: v,
|
|
66
67
|
"aria-describedby": void 0,
|
|
67
68
|
hideClose: !C,
|
|
68
|
-
onPointerDownOutside: (
|
|
69
|
-
w &&
|
|
69
|
+
onPointerDownOutside: (P) => {
|
|
70
|
+
w && P.preventDefault();
|
|
70
71
|
},
|
|
71
72
|
className: r(
|
|
72
73
|
"max-w-[400px] gap-0",
|
|
@@ -87,20 +88,20 @@ const M = m.forwardRef(
|
|
|
87
88
|
t === "destructive" && "bg-[#fceeee] text-[#ef4444]"
|
|
88
89
|
),
|
|
89
90
|
children: [
|
|
90
|
-
t === "info" && /* @__PURE__ */ e(
|
|
91
|
-
t === "success" && /* @__PURE__ */ e(
|
|
92
|
-
t === "warning" && /* @__PURE__ */ e(
|
|
93
|
-
t === "destructive" && /* @__PURE__ */ e(
|
|
91
|
+
t === "info" && /* @__PURE__ */ e(V, { size: 24 }),
|
|
92
|
+
t === "success" && /* @__PURE__ */ e(k, { size: 24 }),
|
|
93
|
+
t === "warning" && /* @__PURE__ */ e(B, { size: 24 }),
|
|
94
|
+
t === "destructive" && /* @__PURE__ */ e(F, { size: 24 })
|
|
94
95
|
]
|
|
95
96
|
}
|
|
96
97
|
),
|
|
97
98
|
/* @__PURE__ */ o(
|
|
98
|
-
|
|
99
|
+
q,
|
|
99
100
|
{
|
|
100
101
|
className: r(s && "space-y-2 items-center bg-white border-none"),
|
|
101
102
|
children: [
|
|
102
103
|
/* @__PURE__ */ e(
|
|
103
|
-
|
|
104
|
+
A,
|
|
104
105
|
{
|
|
105
106
|
className: r(
|
|
106
107
|
s && "text-[18px] font-extrabold text-[#1f2b4d]"
|
|
@@ -109,7 +110,7 @@ const M = m.forwardRef(
|
|
|
109
110
|
}
|
|
110
111
|
),
|
|
111
112
|
c && /* @__PURE__ */ e(
|
|
112
|
-
|
|
113
|
+
E,
|
|
113
114
|
{
|
|
114
115
|
className: r(s && "text-sm text-[#60697d]"),
|
|
115
116
|
children: c
|
|
@@ -120,7 +121,7 @@ const M = m.forwardRef(
|
|
|
120
121
|
),
|
|
121
122
|
d && /* @__PURE__ */ e("div", { className: r("w-full py-2", s && "text-center"), children: d }),
|
|
122
123
|
n ? /* @__PURE__ */ e("div", { className: "w-full", children: n }) : /* @__PURE__ */ o(
|
|
123
|
-
|
|
124
|
+
G,
|
|
124
125
|
{
|
|
125
126
|
className: r(
|
|
126
127
|
s && "mt-6 flex flex-row justify-center gap-3 w-full sm:justify-center px-0 pb-0"
|
|
@@ -130,7 +131,7 @@ const M = m.forwardRef(
|
|
|
130
131
|
f,
|
|
131
132
|
{
|
|
132
133
|
variant: g,
|
|
133
|
-
onClick:
|
|
134
|
+
onClick: j,
|
|
134
135
|
className: r(s && "h-10 px-6"),
|
|
135
136
|
children: u
|
|
136
137
|
}
|
|
@@ -138,7 +139,7 @@ const M = m.forwardRef(
|
|
|
138
139
|
/* @__PURE__ */ e(
|
|
139
140
|
f,
|
|
140
141
|
{
|
|
141
|
-
variant:
|
|
142
|
+
variant: z,
|
|
142
143
|
onClick: D,
|
|
143
144
|
className: r(s && "h-10 px-6"),
|
|
144
145
|
children: p
|
|
@@ -152,9 +153,9 @@ const M = m.forwardRef(
|
|
|
152
153
|
) });
|
|
153
154
|
}
|
|
154
155
|
);
|
|
155
|
-
|
|
156
|
+
K.displayName = "Prompt";
|
|
156
157
|
export {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
K as Prompt,
|
|
159
|
+
J as PromptClose,
|
|
160
|
+
O as promptVariants
|
|
160
161
|
};
|