impact-nova 1.6.4 → 1.6.6
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/accordion.js +34 -33
- package/dist/components/ui/ag-grid-react/index.js +151 -122
- package/dist/components/ui/alert-dialog.js +37 -34
- package/dist/components/ui/calendar.js +148 -133
- package/dist/components/ui/checkbox.js +44 -41
- package/dist/components/ui/date-picker/month-range-picker.js +63 -63
- package/dist/components/ui/date-picker/multi-month-picker.js +46 -43
- package/dist/components/ui/date-picker/multi-week-picker.js +22 -20
- package/dist/components/ui/dialog.js +56 -53
- package/dist/components/ui/filter-strip/filter-strip.js +9 -9
- package/dist/components/ui/filter-strip/filter-summary.js +3 -3
- package/dist/components/ui/input.js +12 -11
- package/dist/components/ui/sheet.js +48 -45
- package/dist/components/ui/sidebar.js +2 -2
- package/dist/components/ui/tabs.js +15 -13
- package/dist/icons/assets/layers.svg.js +7 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +214 -212
- package/dist/impact-nova.css +1 -1
- package/package.json +1 -1
|
@@ -1,65 +1,66 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import * as o from "@radix-ui/react-accordion";
|
|
4
4
|
import { ChevronRight as f } from "lucide-react";
|
|
5
5
|
import { cn as n } from "../../lib/utils.js";
|
|
6
|
-
import { Tooltip as p, TooltipTrigger as g, TooltipContent as
|
|
7
|
-
import { useImpactNovaI18n as
|
|
8
|
-
const C =
|
|
9
|
-
|
|
6
|
+
import { Tooltip as p, TooltipTrigger as g, TooltipContent as v } from "./tooltip.js";
|
|
7
|
+
import { useImpactNovaI18n as h } from "../../i18n/ImpactNovaI18nContext.js";
|
|
8
|
+
const C = o.Root, x = l.forwardRef(({ className: i, ...t }, r) => /* @__PURE__ */ e(
|
|
9
|
+
o.Item,
|
|
10
10
|
{
|
|
11
11
|
ref: r,
|
|
12
12
|
"data-item": t.value,
|
|
13
13
|
"data-disabled": t.disabled ? "" : void 0,
|
|
14
14
|
className: n(
|
|
15
|
-
"ia-accordion-item border
|
|
16
|
-
|
|
15
|
+
"ia-accordion-item border rounded-lg bg-white border-[#D9DDE7]",
|
|
16
|
+
i
|
|
17
17
|
),
|
|
18
18
|
...t
|
|
19
19
|
}
|
|
20
20
|
));
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const { t: m } =
|
|
24
|
-
return /* @__PURE__ */ e(
|
|
25
|
-
|
|
21
|
+
x.displayName = "AccordionItem";
|
|
22
|
+
const u = l.forwardRef(({ className: i, children: t, badge: r, rightActions: s, ...d }, c) => {
|
|
23
|
+
const { t: m } = h();
|
|
24
|
+
return /* @__PURE__ */ e(o.Header, { className: "flex", style: { overflow: "visible" }, children: /* @__PURE__ */ a(
|
|
25
|
+
o.Trigger,
|
|
26
26
|
{
|
|
27
|
-
ref:
|
|
27
|
+
ref: c,
|
|
28
28
|
className: n(
|
|
29
|
-
"flex flex-1 items-center gap-3 px-4 py-2 text-sm font-semibold transition-all text-left [&[data-state=open]>div>svg]:-rotate-90",
|
|
30
|
-
|
|
29
|
+
"flex flex-1 items-center gap-3 px-4 py-2 text-sm font-semibold transition-all text-left [&[data-state=open]>div>svg]:-rotate-90 focus-visible:outline-none",
|
|
30
|
+
i
|
|
31
31
|
),
|
|
32
|
-
|
|
32
|
+
style: { outline: "none" },
|
|
33
|
+
...d,
|
|
33
34
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ a(p, { children: [
|
|
35
36
|
/* @__PURE__ */ e(g, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center h-8 w-8 shrink-0 rounded-lg bg-secondary text-secondary-foreground transition-transform duration-200", children: /* @__PURE__ */ e(f, { className: "h-4 w-4 transition-transform duration-200" }) }) }),
|
|
36
|
-
/* @__PURE__ */ e(
|
|
37
|
+
/* @__PURE__ */ e(v, { side: "top", variant: "tertiary", children: m("aria.toggle") })
|
|
37
38
|
] }),
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ a("div", { className: "flex flex-1 items-center justify-between", children: [
|
|
40
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
40
41
|
t,
|
|
41
42
|
r
|
|
42
43
|
] }),
|
|
43
|
-
|
|
44
|
+
s
|
|
44
45
|
] })
|
|
45
46
|
]
|
|
46
47
|
}
|
|
47
48
|
) });
|
|
48
49
|
});
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
50
|
+
u.displayName = o.Trigger.displayName;
|
|
51
|
+
const N = l.forwardRef(({ className: i, children: t, surfaceClassName: r, ...s }, d) => /* @__PURE__ */ e(
|
|
52
|
+
o.Content,
|
|
52
53
|
{
|
|
53
|
-
ref:
|
|
54
|
+
ref: d,
|
|
54
55
|
className: n("overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down data-[state=open]:overflow-visible", r),
|
|
55
|
-
...
|
|
56
|
-
children: /* @__PURE__ */ e("div", { className: n("px-4 pb-4 pt-2",
|
|
56
|
+
...s,
|
|
57
|
+
children: /* @__PURE__ */ e("div", { className: n("px-4 pb-4 pt-2", i), children: t })
|
|
57
58
|
}
|
|
58
59
|
));
|
|
59
|
-
|
|
60
|
+
N.displayName = o.Content.displayName;
|
|
60
61
|
export {
|
|
61
62
|
C as Accordion,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
N as AccordionContent,
|
|
64
|
+
x as AccordionItem,
|
|
65
|
+
u as AccordionTrigger
|
|
65
66
|
};
|
|
@@ -1,111 +1,140 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { lazy as
|
|
3
|
-
import { ModuleRegistry as
|
|
1
|
+
import { jsxs as P, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as V, useRef as E, useState as p, useCallback as v, useMemo as F, useEffect as W, Suspense as _ } from "react";
|
|
3
|
+
import { ModuleRegistry as $, AllCommunityModule as q, ValidationModule as K } from "ag-grid-community";
|
|
4
4
|
import { AllEnterpriseModule as U } from "ag-grid-enterprise";
|
|
5
|
-
import { AgGridReact as
|
|
6
|
-
import { customAgGridTheme as
|
|
7
|
-
import { CustomHeader as
|
|
8
|
-
import { CustomHeaderGroup as
|
|
9
|
-
import { GridHeaderContext as
|
|
10
|
-
import { convertToAgGridFilterModel as
|
|
11
|
-
import { ColumnSettingsMenu as
|
|
12
|
-
import { AG_GRID_VALUE_FORMATTERS as
|
|
5
|
+
import { AgGridReact as z } from "ag-grid-react";
|
|
6
|
+
import { customAgGridTheme as J } from "./theme.js";
|
|
7
|
+
import { CustomHeader as B } from "./headers/custom-header.js";
|
|
8
|
+
import { CustomHeaderGroup as Q } from "./headers/custom-header-group.js";
|
|
9
|
+
import { GridHeaderContext as X } from "./headers/context/grid-header-context.js";
|
|
10
|
+
import { convertToAgGridFilterModel as Y, getMultiFilterIndices as Z, convertFromAgGridFilterModel as ee } from "./headers/utils/filter-utils.js";
|
|
11
|
+
import { ColumnSettingsMenu as te } from "./headers/column-menu/column-settings-menu.js";
|
|
12
|
+
import { AG_GRID_VALUE_FORMATTERS as re } from "./value-formatters.js";
|
|
13
13
|
/* empty css */
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
children:
|
|
18
|
-
defaultColDef:
|
|
19
|
-
defaultColGroupDef:
|
|
20
|
-
columnDefs:
|
|
21
|
-
valueFormatters:
|
|
22
|
-
onGridReady:
|
|
23
|
-
...
|
|
14
|
+
const ne = V(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
|
|
15
|
+
$.registerModules([q, U, K]);
|
|
16
|
+
function Fe({
|
|
17
|
+
children: c,
|
|
18
|
+
defaultColDef: l,
|
|
19
|
+
defaultColGroupDef: i,
|
|
20
|
+
columnDefs: f,
|
|
21
|
+
valueFormatters: d,
|
|
22
|
+
onGridReady: m,
|
|
23
|
+
...u
|
|
24
24
|
}) {
|
|
25
|
-
const
|
|
26
|
-
if (!
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
}, []),
|
|
25
|
+
const r = E(null), s = E(null), [g, M] = p(null), [G, h] = p(!1), [y, x] = p(null), [R, S] = p(!1), [b, k] = p(null), [I, O] = p(null), D = v((e) => {
|
|
26
|
+
if (!r.current) return;
|
|
27
|
+
const t = Y(e);
|
|
28
|
+
r.current.setFilterModel(t), r.current.onFilterChanged();
|
|
29
|
+
}, []), C = F(() => ({
|
|
30
30
|
openSearch: (e) => {
|
|
31
|
-
if (!
|
|
32
|
-
const
|
|
33
|
-
|
|
31
|
+
if (!r.current) return;
|
|
32
|
+
const t = r.current.getGridOption("context") || {};
|
|
33
|
+
r.current.setGridOption("context", { ...t, activeSearchColumnId: e }), r.current.refreshHeader();
|
|
34
34
|
},
|
|
35
35
|
closeSearch: () => {
|
|
36
|
-
if (!
|
|
37
|
-
const e =
|
|
38
|
-
|
|
36
|
+
if (!r.current) return;
|
|
37
|
+
const e = r.current.getGridOption("context") || {};
|
|
38
|
+
r.current.setGridOption("context", { ...e, activeSearchColumnId: null }), r.current.refreshHeader();
|
|
39
39
|
},
|
|
40
40
|
openAdvancedFilter: (e) => {
|
|
41
|
-
|
|
41
|
+
x(e || null), h(!0);
|
|
42
42
|
},
|
|
43
43
|
closeAdvancedFilter: () => {
|
|
44
|
-
|
|
44
|
+
h(!1), x(null);
|
|
45
45
|
},
|
|
46
46
|
applyAdvancedFilter: (e) => {
|
|
47
|
-
|
|
47
|
+
D(e);
|
|
48
48
|
},
|
|
49
|
-
openMenu: (e,
|
|
50
|
-
|
|
49
|
+
openMenu: (e, t) => {
|
|
50
|
+
k(e), O(t), S(!0);
|
|
51
51
|
},
|
|
52
52
|
closeMenu: () => {
|
|
53
|
-
S(!1),
|
|
53
|
+
S(!1), k(null), O(null);
|
|
54
|
+
},
|
|
55
|
+
activeMenuColumnId: b
|
|
56
|
+
}), [D, b]), H = v((e) => {
|
|
57
|
+
r.current = e.api, M(e.api), e.api.setGridOption("context", { activeSearchColumnId: null }), m && m(e);
|
|
58
|
+
}, [m]);
|
|
59
|
+
W(() => {
|
|
60
|
+
const e = s.current;
|
|
61
|
+
if (!e) return;
|
|
62
|
+
const t = (o) => {
|
|
63
|
+
if (o.key !== "Enter" && o.key !== " ") return;
|
|
64
|
+
const n = o.target;
|
|
65
|
+
if (!n.classList.contains("ag-cell") && !n.classList.contains("ag-header-cell")) return;
|
|
66
|
+
const A = n.querySelector(
|
|
67
|
+
'button, [role="checkbox"], [role="switch"], [role="combobox"], [role="button"], [role="link"], a, input, select, textarea, .cursor-pointer'
|
|
68
|
+
);
|
|
69
|
+
A && (o.preventDefault(), o.stopPropagation(), A.click(), A.focus());
|
|
70
|
+
};
|
|
71
|
+
return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
|
|
72
|
+
}, []);
|
|
73
|
+
const N = F(() => ({
|
|
74
|
+
headerComponent: B,
|
|
75
|
+
...l,
|
|
76
|
+
suppressHeaderKeyboardEvent: (e) => {
|
|
77
|
+
const { event: t } = e;
|
|
78
|
+
if (t.key === "Enter" || t.key === " ") {
|
|
79
|
+
const o = t.target.closest(".ag-header-cell");
|
|
80
|
+
if (o) {
|
|
81
|
+
const n = o.querySelector('[role="checkbox"], button, [role="switch"], input');
|
|
82
|
+
if (n)
|
|
83
|
+
return t.preventDefault(), n.click(), !0;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return l?.suppressHeaderKeyboardEvent?.(e) ?? !1;
|
|
54
87
|
},
|
|
55
|
-
activeMenuColumnId: y
|
|
56
|
-
}), [O, y]), R = h((e) => {
|
|
57
|
-
t.current = e.api, M(e.api), e.api.setGridOption("context", { activeSearchColumnId: null }), s && s(e);
|
|
58
|
-
}, [s]), N = F(() => ({
|
|
59
|
-
headerComponent: J,
|
|
60
|
-
...n,
|
|
61
88
|
headerComponentParams: {
|
|
62
|
-
...
|
|
89
|
+
...l?.headerComponentParams
|
|
63
90
|
}
|
|
64
|
-
}), [
|
|
65
|
-
headerGroupComponent:
|
|
66
|
-
...
|
|
91
|
+
}), [l]), j = F(() => ({
|
|
92
|
+
headerGroupComponent: Q,
|
|
93
|
+
...i,
|
|
67
94
|
headerGroupComponentParams: {
|
|
68
|
-
...
|
|
95
|
+
...i?.headerGroupComponentParams
|
|
69
96
|
}
|
|
70
|
-
}), [
|
|
71
|
-
...
|
|
97
|
+
}), [i]), L = F(() => ({
|
|
98
|
+
...re,
|
|
72
99
|
// Always available - value formatters
|
|
73
|
-
...
|
|
100
|
+
...u.components,
|
|
74
101
|
// User components override
|
|
75
|
-
...
|
|
102
|
+
...d
|
|
76
103
|
// Optional custom formatters override defaults
|
|
77
|
-
}), [
|
|
104
|
+
}), [d, u.components]), T = v((e) => {
|
|
78
105
|
if (e.value !== null && e.value !== void 0 && typeof e.value == "object") {
|
|
79
|
-
const
|
|
80
|
-
return
|
|
106
|
+
const t = Object.entries(e.value).map(([o, n]) => n && typeof n == "object" && "value" in n ? n.value : typeof n != "object" && typeof n < "u" ? n : null).filter((o) => o != null);
|
|
107
|
+
return t.length > 0 ? t.join(" ") : "";
|
|
81
108
|
}
|
|
82
109
|
return e.value;
|
|
83
|
-
}, []),
|
|
110
|
+
}, []), w = v((e) => {
|
|
84
111
|
if (typeof e.value == "string") {
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
112
|
+
const t = e.value.trim();
|
|
113
|
+
if (t.startsWith("{") || t.startsWith("["))
|
|
87
114
|
try {
|
|
88
|
-
return JSON.parse(
|
|
115
|
+
return JSON.parse(t);
|
|
89
116
|
} catch {
|
|
90
117
|
return e.value;
|
|
91
118
|
}
|
|
92
119
|
}
|
|
93
120
|
return e.value;
|
|
94
121
|
}, []);
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
|
|
122
|
+
return /* @__PURE__ */ P(X.Provider, { value: C, children: [
|
|
123
|
+
/* @__PURE__ */ a("div", { ref: s, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ a(
|
|
124
|
+
z,
|
|
98
125
|
{
|
|
99
|
-
theme:
|
|
126
|
+
theme: J,
|
|
100
127
|
defaultColDef: N,
|
|
101
|
-
columnDefs:
|
|
128
|
+
columnDefs: f,
|
|
102
129
|
cellSelection: !0,
|
|
103
130
|
defaultColGroupDef: j,
|
|
104
|
-
onGridReady:
|
|
105
|
-
components:
|
|
106
|
-
processCellForClipboard:
|
|
107
|
-
processCellFromClipboard:
|
|
131
|
+
onGridReady: H,
|
|
132
|
+
components: L,
|
|
133
|
+
processCellForClipboard: T,
|
|
134
|
+
processCellFromClipboard: w,
|
|
108
135
|
ensureDomOrder: !0,
|
|
136
|
+
suppressHeaderFocus: !1,
|
|
137
|
+
suppressFocusAfterRefresh: !0,
|
|
109
138
|
suppressGroupRowsSticky: !0,
|
|
110
139
|
columnTypes: {
|
|
111
140
|
numericColumn: {
|
|
@@ -129,78 +158,78 @@ function ge({
|
|
|
129
158
|
filter: "agDateColumnFilter"
|
|
130
159
|
}
|
|
131
160
|
},
|
|
132
|
-
...
|
|
161
|
+
...u
|
|
133
162
|
}
|
|
134
|
-
),
|
|
135
|
-
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
|
|
163
|
+
) }),
|
|
164
|
+
c,
|
|
165
|
+
/* @__PURE__ */ a(
|
|
166
|
+
oe,
|
|
138
167
|
{
|
|
139
|
-
isOpen:
|
|
140
|
-
columnId:
|
|
141
|
-
gridApi:
|
|
142
|
-
onClose:
|
|
143
|
-
onApply:
|
|
168
|
+
isOpen: G,
|
|
169
|
+
columnId: y,
|
|
170
|
+
gridApi: g,
|
|
171
|
+
onClose: C.closeAdvancedFilter,
|
|
172
|
+
onApply: C.applyAdvancedFilter
|
|
144
173
|
}
|
|
145
174
|
),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
|
|
175
|
+
/* @__PURE__ */ a(
|
|
176
|
+
le,
|
|
148
177
|
{
|
|
149
|
-
isOpen:
|
|
150
|
-
columnId:
|
|
151
|
-
gridApi:
|
|
178
|
+
isOpen: R,
|
|
179
|
+
columnId: b,
|
|
180
|
+
gridApi: g,
|
|
152
181
|
anchor: I,
|
|
153
|
-
onClose:
|
|
182
|
+
onClose: C.closeMenu
|
|
154
183
|
}
|
|
155
184
|
)
|
|
156
185
|
] });
|
|
157
186
|
}
|
|
158
|
-
function
|
|
159
|
-
isOpen:
|
|
160
|
-
columnId:
|
|
161
|
-
gridApi:
|
|
162
|
-
onClose:
|
|
163
|
-
onApply:
|
|
187
|
+
function oe({
|
|
188
|
+
isOpen: c,
|
|
189
|
+
columnId: l,
|
|
190
|
+
gridApi: i,
|
|
191
|
+
onClose: f,
|
|
192
|
+
onApply: d
|
|
164
193
|
}) {
|
|
165
|
-
if (!
|
|
166
|
-
const
|
|
167
|
-
if (!
|
|
168
|
-
const
|
|
169
|
-
return /* @__PURE__ */
|
|
170
|
-
|
|
194
|
+
if (!c || !l || !i) return null;
|
|
195
|
+
const m = i.getColumn(l);
|
|
196
|
+
if (!m) return null;
|
|
197
|
+
const u = m.getColDef(), r = u.headerComponentParams, s = Z(u), g = s.text !== -1 || s.number !== -1 || s.date !== -1, M = s.set !== -1, h = u.filter === "agMultiColumnFilter" && (g || M) ? "multi" : u.filter === "agNumberColumnFilter" ? "number" : u.filter === "agDateColumnFilter" ? "date" : u.filter === "agSetColumnFilter" || r?.selectOptions ? "select" : "text", y = ee(i.getFilterModel());
|
|
198
|
+
return /* @__PURE__ */ a(_, { fallback: null, children: /* @__PURE__ */ a(
|
|
199
|
+
ne,
|
|
171
200
|
{
|
|
172
|
-
isOpen:
|
|
173
|
-
onClose:
|
|
174
|
-
onApply:
|
|
175
|
-
columnId:
|
|
176
|
-
columnLabel:
|
|
177
|
-
columnType:
|
|
178
|
-
selectOptions:
|
|
179
|
-
isMultiSelect:
|
|
180
|
-
initialModel:
|
|
181
|
-
api:
|
|
201
|
+
isOpen: c,
|
|
202
|
+
onClose: f,
|
|
203
|
+
onApply: d,
|
|
204
|
+
columnId: l,
|
|
205
|
+
columnLabel: u.headerName || l,
|
|
206
|
+
columnType: h,
|
|
207
|
+
selectOptions: r?.selectOptions,
|
|
208
|
+
isMultiSelect: r?.isMultiSelect,
|
|
209
|
+
initialModel: y,
|
|
210
|
+
api: i
|
|
182
211
|
}
|
|
183
212
|
) });
|
|
184
213
|
}
|
|
185
|
-
function
|
|
186
|
-
isOpen:
|
|
187
|
-
columnId:
|
|
188
|
-
gridApi:
|
|
189
|
-
anchor:
|
|
190
|
-
onClose:
|
|
214
|
+
function le({
|
|
215
|
+
isOpen: c,
|
|
216
|
+
columnId: l,
|
|
217
|
+
gridApi: i,
|
|
218
|
+
anchor: f,
|
|
219
|
+
onClose: d
|
|
191
220
|
}) {
|
|
192
|
-
return !
|
|
193
|
-
|
|
221
|
+
return !c || !l || !i ? null : /* @__PURE__ */ a(
|
|
222
|
+
te,
|
|
194
223
|
{
|
|
195
|
-
isOpen:
|
|
196
|
-
columnId:
|
|
197
|
-
gridApi:
|
|
198
|
-
anchor:
|
|
199
|
-
onClose:
|
|
224
|
+
isOpen: c,
|
|
225
|
+
columnId: l,
|
|
226
|
+
gridApi: i,
|
|
227
|
+
anchor: f,
|
|
228
|
+
onClose: d
|
|
200
229
|
}
|
|
201
230
|
);
|
|
202
231
|
}
|
|
203
232
|
export {
|
|
204
|
-
|
|
205
|
-
|
|
233
|
+
Fe as AgGridWrapper,
|
|
234
|
+
Fe as default
|
|
206
235
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
1
|
+
import { jsx as l, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-alert-dialog";
|
|
4
4
|
import { cn as s } from "../../lib/utils.js";
|
|
5
|
-
import { buttonVariants as
|
|
6
|
-
const
|
|
5
|
+
import { buttonVariants as r } from "./button-variants.js";
|
|
6
|
+
const R = e.Root, b = e.Trigger, p = e.Portal, n = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
|
|
7
7
|
e.Overlay,
|
|
8
8
|
{
|
|
9
9
|
className: s(
|
|
@@ -14,25 +14,28 @@ const v = e.Root, w = e.Trigger, m = e.Portal, r = i.forwardRef(({ className: a,
|
|
|
14
14
|
ref: o
|
|
15
15
|
}
|
|
16
16
|
));
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
/* @__PURE__ */ l(
|
|
17
|
+
n.displayName = e.Overlay.displayName;
|
|
18
|
+
const f = i.forwardRef(({ className: a, onOpenAutoFocus: t, ...o }, m) => /* @__PURE__ */ c(p, { children: [
|
|
19
|
+
/* @__PURE__ */ l(n, {}),
|
|
20
20
|
/* @__PURE__ */ l(
|
|
21
21
|
e.Content,
|
|
22
22
|
{
|
|
23
|
-
ref:
|
|
23
|
+
ref: m,
|
|
24
24
|
"aria-describedby": void 0,
|
|
25
25
|
"data-component": "alert-dialog-content",
|
|
26
|
+
onOpenAutoFocus: (d) => {
|
|
27
|
+
d.preventDefault(), t?.(d);
|
|
28
|
+
},
|
|
26
29
|
className: s(
|
|
27
30
|
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-canvas p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
28
31
|
a
|
|
29
32
|
),
|
|
30
|
-
...
|
|
33
|
+
...o
|
|
31
34
|
}
|
|
32
35
|
)
|
|
33
36
|
] }));
|
|
34
|
-
|
|
35
|
-
const
|
|
37
|
+
f.displayName = e.Content.displayName;
|
|
38
|
+
const g = ({
|
|
36
39
|
className: a,
|
|
37
40
|
...t
|
|
38
41
|
}) => /* @__PURE__ */ l(
|
|
@@ -45,8 +48,8 @@ const p = ({
|
|
|
45
48
|
...t
|
|
46
49
|
}
|
|
47
50
|
);
|
|
48
|
-
|
|
49
|
-
const
|
|
51
|
+
g.displayName = "AlertDialogHeader";
|
|
52
|
+
const N = ({
|
|
50
53
|
className: a,
|
|
51
54
|
...t
|
|
52
55
|
}) => /* @__PURE__ */ l(
|
|
@@ -59,8 +62,8 @@ const f = ({
|
|
|
59
62
|
...t
|
|
60
63
|
}
|
|
61
64
|
);
|
|
62
|
-
|
|
63
|
-
const
|
|
65
|
+
N.displayName = "AlertDialogFooter";
|
|
66
|
+
const y = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
|
|
64
67
|
e.Title,
|
|
65
68
|
{
|
|
66
69
|
ref: o,
|
|
@@ -69,8 +72,8 @@ const g = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
|
|
|
69
72
|
...t
|
|
70
73
|
}
|
|
71
74
|
));
|
|
72
|
-
|
|
73
|
-
const
|
|
75
|
+
y.displayName = e.Title.displayName;
|
|
76
|
+
const x = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
|
|
74
77
|
e.Description,
|
|
75
78
|
{
|
|
76
79
|
ref: o,
|
|
@@ -79,41 +82,41 @@ const N = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
|
|
|
79
82
|
...t
|
|
80
83
|
}
|
|
81
84
|
));
|
|
82
|
-
|
|
83
|
-
const
|
|
85
|
+
x.displayName = e.Description.displayName;
|
|
86
|
+
const A = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
|
|
84
87
|
e.Action,
|
|
85
88
|
{
|
|
86
89
|
ref: o,
|
|
87
90
|
"data-component": "alert-dialog-action",
|
|
88
|
-
className: s(
|
|
91
|
+
className: s(r(), a),
|
|
89
92
|
...t
|
|
90
93
|
}
|
|
91
94
|
));
|
|
92
|
-
|
|
93
|
-
const
|
|
95
|
+
A.displayName = e.Action.displayName;
|
|
96
|
+
const D = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
|
|
94
97
|
e.Cancel,
|
|
95
98
|
{
|
|
96
99
|
ref: o,
|
|
97
100
|
"data-component": "alert-dialog-cancel",
|
|
98
101
|
className: s(
|
|
99
|
-
|
|
102
|
+
r({ variant: "outline" }),
|
|
100
103
|
"mt-2 sm:mt-0",
|
|
101
104
|
a
|
|
102
105
|
),
|
|
103
106
|
...t
|
|
104
107
|
}
|
|
105
108
|
));
|
|
106
|
-
|
|
109
|
+
D.displayName = e.Cancel.displayName;
|
|
107
110
|
export {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
111
|
+
R as AlertDialog,
|
|
112
|
+
A as AlertDialogAction,
|
|
113
|
+
D as AlertDialogCancel,
|
|
114
|
+
f as AlertDialogContent,
|
|
115
|
+
x as AlertDialogDescription,
|
|
116
|
+
N as AlertDialogFooter,
|
|
117
|
+
g as AlertDialogHeader,
|
|
118
|
+
n as AlertDialogOverlay,
|
|
119
|
+
p as AlertDialogPortal,
|
|
120
|
+
y as AlertDialogTitle,
|
|
121
|
+
b as AlertDialogTrigger
|
|
119
122
|
};
|