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,124 +1,126 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { ChevronRight as
|
|
4
|
-
import { useVirtualizer as
|
|
1
|
+
import { jsxs as c, jsx as t, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { ChevronRight as T } from "lucide-react";
|
|
4
|
+
import { useVirtualizer as $ } from "@tanstack/react-virtual";
|
|
5
5
|
import { cn as h } from "../../../lib/utils.js";
|
|
6
|
-
import { Button as
|
|
7
|
-
|
|
6
|
+
import { Button as A } from "../button.js";
|
|
7
|
+
import { useImpactNovaI18n as D } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
8
|
+
const F = a.forwardRef(
|
|
8
9
|
({
|
|
9
|
-
className:
|
|
10
|
+
className: N,
|
|
10
11
|
items: u,
|
|
11
|
-
renderItem:
|
|
12
|
+
renderItem: R,
|
|
12
13
|
scrollStep: g = 200,
|
|
13
14
|
hideScrollbar: p = !1,
|
|
14
|
-
controlsPosition:
|
|
15
|
+
controlsPosition: s = "right",
|
|
15
16
|
renderPrevious: v,
|
|
16
17
|
renderNext: x,
|
|
17
|
-
maxWidth:
|
|
18
|
+
maxWidth: L = "100%",
|
|
18
19
|
estimateSize: m = 200,
|
|
19
|
-
overscan:
|
|
20
|
-
...
|
|
21
|
-
},
|
|
22
|
-
const l =
|
|
23
|
-
|
|
24
|
-
const i =
|
|
20
|
+
overscan: k = 5,
|
|
21
|
+
...C
|
|
22
|
+
}, B) => {
|
|
23
|
+
const { t: z } = D(), l = a.useRef(null), [o, E] = a.useState(!1), [n, H] = a.useState(!1);
|
|
24
|
+
a.useImperativeHandle(B, () => l.current);
|
|
25
|
+
const i = $({
|
|
25
26
|
count: u.length,
|
|
26
27
|
getScrollElement: () => l.current,
|
|
27
28
|
estimateSize: typeof m == "function" ? m : () => m,
|
|
28
29
|
horizontal: !0,
|
|
29
|
-
overscan:
|
|
30
|
-
}),
|
|
30
|
+
overscan: k
|
|
31
|
+
}), V = i.getTotalSize(), d = a.useCallback(() => {
|
|
31
32
|
const e = l.current;
|
|
32
|
-
e && (
|
|
33
|
+
e && (E(e.scrollLeft > 0), H(Math.ceil(e.scrollLeft + e.clientWidth) < e.scrollWidth));
|
|
33
34
|
}, []);
|
|
34
|
-
|
|
35
|
+
a.useEffect(() => {
|
|
35
36
|
const e = l.current;
|
|
36
37
|
if (!e) return;
|
|
37
38
|
d();
|
|
38
|
-
const
|
|
39
|
-
e.addEventListener("scroll",
|
|
39
|
+
const r = () => d();
|
|
40
|
+
e.addEventListener("scroll", r);
|
|
40
41
|
const f = new ResizeObserver(() => {
|
|
41
42
|
d();
|
|
42
43
|
});
|
|
43
44
|
return f.observe(e), () => {
|
|
44
|
-
e.removeEventListener("scroll",
|
|
45
|
+
e.removeEventListener("scroll", r), f.disconnect();
|
|
45
46
|
};
|
|
46
|
-
}, [d, u,
|
|
47
|
+
}, [d, u, V]);
|
|
47
48
|
const b = () => {
|
|
48
49
|
l.current?.scrollBy({ left: -g, behavior: "smooth" });
|
|
49
50
|
}, w = () => {
|
|
50
51
|
l.current?.scrollBy({ left: g, behavior: "smooth" });
|
|
51
52
|
}, y = ({
|
|
52
53
|
direction: e,
|
|
53
|
-
onClick:
|
|
54
|
+
onClick: r,
|
|
54
55
|
disabled: f
|
|
55
|
-
}) =>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"aria-label": `Scroll ${e}`,
|
|
66
|
-
"data-component": e === "left" ? "horizontal-scroller-prev" : "horizontal-scroller-next",
|
|
67
|
-
children: [
|
|
68
|
-
/* @__PURE__ */ r(
|
|
69
|
-
j,
|
|
70
|
-
{
|
|
71
|
-
className: h("h-4 w-4", e === "left" && "rotate-180")
|
|
72
|
-
}
|
|
56
|
+
}) => {
|
|
57
|
+
if (f) return null;
|
|
58
|
+
const S = z(e === "left" ? "horizontalScroller.scrollLeft" : "horizontalScroller.scrollRight");
|
|
59
|
+
return /* @__PURE__ */ c(
|
|
60
|
+
A,
|
|
61
|
+
{
|
|
62
|
+
variant: "ghost",
|
|
63
|
+
size: "icon",
|
|
64
|
+
className: h(
|
|
65
|
+
"h-8 w-8 rounded-md bg-[#f5f6fa] text-[#60697d] hover:bg-[#eceefd] hover:text-[#4259ee]"
|
|
73
66
|
),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
67
|
+
onClick: r,
|
|
68
|
+
disabled: f,
|
|
69
|
+
"aria-label": S,
|
|
70
|
+
"data-component": e === "left" ? "horizontal-scroller-prev" : "horizontal-scroller-next",
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ t(
|
|
73
|
+
T,
|
|
74
|
+
{
|
|
75
|
+
className: h("h-4 w-4", e === "left" && "rotate-180")
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
/* @__PURE__ */ t("span", { className: "sr-only", children: S })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}, W = () => {
|
|
83
|
+
const e = v ? v({ onClick: b, disabled: !o }) : /* @__PURE__ */ t(
|
|
82
84
|
y,
|
|
83
85
|
{
|
|
84
86
|
direction: "left",
|
|
85
87
|
onClick: b,
|
|
86
|
-
disabled: !
|
|
88
|
+
disabled: !o
|
|
87
89
|
}
|
|
88
|
-
),
|
|
90
|
+
), r = x ? x({ onClick: w, disabled: !n }) : /* @__PURE__ */ t(
|
|
89
91
|
y,
|
|
90
92
|
{
|
|
91
93
|
direction: "right",
|
|
92
94
|
onClick: w,
|
|
93
|
-
disabled: !
|
|
95
|
+
disabled: !n
|
|
94
96
|
}
|
|
95
97
|
);
|
|
96
|
-
return
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
] }) :
|
|
98
|
+
return s === "split" ? /* @__PURE__ */ c(O, { children: [
|
|
99
|
+
/* @__PURE__ */ t("div", { className: "absolute left-0 top-1/2 z-20 -translate-y-1/2", children: e }),
|
|
100
|
+
/* @__PURE__ */ t("div", { className: "absolute right-0 top-1/2 z-20 -translate-y-1/2", children: r })
|
|
101
|
+
] }) : s === "left" ? /* @__PURE__ */ c("div", { className: "absolute left-0 top-1/2 z-20 flex -translate-y-1/2 items-center gap-1", children: [
|
|
100
102
|
e,
|
|
101
|
-
|
|
102
|
-
] }) : /* @__PURE__ */
|
|
103
|
+
r
|
|
104
|
+
] }) : /* @__PURE__ */ c("div", { className: "absolute right-0 top-1/2 z-20 flex -translate-y-1/2 items-center gap-1", children: [
|
|
103
105
|
e,
|
|
104
|
-
|
|
106
|
+
r
|
|
105
107
|
] });
|
|
106
|
-
},
|
|
107
|
-
return /* @__PURE__ */
|
|
108
|
+
}, j = () => s === "left" ? o && n ? "pl-20" : o || n ? "pl-12" : "" : s === "split" && o ? "pl-12" : "", I = () => s === "right" ? o && n ? "pr-20" : o || n ? "pr-12" : "" : s === "split" && n ? "pr-12" : "";
|
|
109
|
+
return /* @__PURE__ */ c(
|
|
108
110
|
"div",
|
|
109
111
|
{
|
|
110
112
|
className: h(
|
|
111
113
|
"relative group min-w-0 w-full overflow-hidden bg-transparent",
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
j(),
|
|
115
|
+
I(),
|
|
116
|
+
N
|
|
115
117
|
),
|
|
116
|
-
style: { maxWidth:
|
|
118
|
+
style: { maxWidth: L },
|
|
117
119
|
"data-component": "horizontal-scroller",
|
|
118
|
-
...
|
|
120
|
+
...C,
|
|
119
121
|
children: [
|
|
120
|
-
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
+
W(),
|
|
123
|
+
/* @__PURE__ */ t(
|
|
122
124
|
"div",
|
|
123
125
|
{
|
|
124
126
|
ref: l,
|
|
@@ -132,7 +134,7 @@ const A = s.forwardRef(
|
|
|
132
134
|
msOverflowStyle: p ? "none" : "auto"
|
|
133
135
|
},
|
|
134
136
|
"data-component": "horizontal-scroller-viewport",
|
|
135
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ c(
|
|
136
138
|
"div",
|
|
137
139
|
{
|
|
138
140
|
style: {
|
|
@@ -141,14 +143,14 @@ const A = s.forwardRef(
|
|
|
141
143
|
position: "relative"
|
|
142
144
|
},
|
|
143
145
|
children: [
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
i.getVirtualItems().map((e) => /* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ t("div", { style: { width: `${i.getVirtualItems()[0]?.start ?? 0}px`, flexShrink: 0 } }),
|
|
147
|
+
i.getVirtualItems().map((e) => /* @__PURE__ */ t(
|
|
146
148
|
"div",
|
|
147
149
|
{
|
|
148
150
|
ref: i.measureElement,
|
|
149
151
|
"data-index": e.index,
|
|
150
152
|
className: "flex-shrink-0",
|
|
151
|
-
children:
|
|
153
|
+
children: R(u[e.index], e.index)
|
|
152
154
|
},
|
|
153
155
|
e.key
|
|
154
156
|
))
|
|
@@ -162,7 +164,7 @@ const A = s.forwardRef(
|
|
|
162
164
|
);
|
|
163
165
|
}
|
|
164
166
|
);
|
|
165
|
-
|
|
167
|
+
F.displayName = "HorizontalScroller";
|
|
166
168
|
export {
|
|
167
|
-
|
|
169
|
+
F as default
|
|
168
170
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as f from "react";
|
|
3
3
|
import "@radix-ui/react-slot";
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
|
|
4
|
+
import { cva as u } from "class-variance-authority";
|
|
5
|
+
import { cn as p } from "../../lib/utils.js";
|
|
6
|
+
import { useImpactNovaI18n as h } from "../../i18n/ImpactNovaI18nContext.js";
|
|
7
|
+
const j = u(
|
|
7
8
|
"relative rounded-full flex items-center justify-center overflow-hidden",
|
|
8
9
|
{
|
|
9
10
|
variants: {
|
|
@@ -18,24 +19,24 @@ const y = f(
|
|
|
18
19
|
size: "md"
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
),
|
|
22
|
-
({ className: o, size: t = "md", progress:
|
|
23
|
-
const i = {
|
|
22
|
+
), g = f.forwardRef(
|
|
23
|
+
({ className: o, size: t = "md", progress: s, text: a, asChild: v = !1, ...d }, l) => {
|
|
24
|
+
const { t: m } = h(), i = {
|
|
24
25
|
sm: { outer: 24, inner: 20 },
|
|
25
26
|
md: { outer: 48, inner: 40 },
|
|
26
27
|
lg: { outer: 72, inner: 60 },
|
|
27
28
|
xl: { outer: 96, inner: 80 }
|
|
28
29
|
}, { outer: e, inner: r } = i[t] || i.md;
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ c(
|
|
30
31
|
"div",
|
|
31
32
|
{
|
|
32
33
|
ref: l,
|
|
33
|
-
className:
|
|
34
|
+
className: p("flex flex-col items-center justify-center", o),
|
|
34
35
|
role: "status",
|
|
35
|
-
"aria-label": a || "
|
|
36
|
+
"aria-label": a || m("aria.loading"),
|
|
36
37
|
"data-component": "loader",
|
|
37
38
|
"data-size": t ?? "md",
|
|
38
|
-
...
|
|
39
|
+
...d,
|
|
39
40
|
children: [
|
|
40
41
|
/* @__PURE__ */ n(
|
|
41
42
|
"div",
|
|
@@ -57,7 +58,7 @@ const y = f(
|
|
|
57
58
|
left: (e - r) / 2,
|
|
58
59
|
fontSize: e / 6
|
|
59
60
|
},
|
|
60
|
-
children: t !== "sm" &&
|
|
61
|
+
children: t !== "sm" && s
|
|
61
62
|
}
|
|
62
63
|
)
|
|
63
64
|
}
|
|
@@ -75,8 +76,8 @@ const y = f(
|
|
|
75
76
|
);
|
|
76
77
|
}
|
|
77
78
|
);
|
|
78
|
-
|
|
79
|
+
g.displayName = "Loader";
|
|
79
80
|
export {
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
g as Loader,
|
|
82
|
+
j as loaderVariants
|
|
82
83
|
};
|
|
@@ -12,6 +12,7 @@ interface NestedListHeaderProps {
|
|
|
12
12
|
searchText: string;
|
|
13
13
|
onSearchChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
14
14
|
searchPlaceholder: string;
|
|
15
|
+
selectAllLabel?: string;
|
|
15
16
|
enableCollapse?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare const NestedListHeader: React.FC<NestedListHeaderProps>;
|
|
@@ -1,86 +1,89 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import { Input as
|
|
5
|
-
import { ChevronRight as
|
|
6
|
-
import { cn as
|
|
7
|
-
|
|
3
|
+
import { Checkbox as N } from "../../checkbox.js";
|
|
4
|
+
import { Input as v } from "../../input.js";
|
|
5
|
+
import { ChevronRight as C, Search as g } from "../../../../icons/index.js";
|
|
6
|
+
import { cn as k } from "../../../../lib/utils.js";
|
|
7
|
+
import { useImpactNovaI18n as z } from "../../../../i18n/ImpactNovaI18nContext.js";
|
|
8
|
+
const E = ({
|
|
8
9
|
hasItemsWithChildren: o,
|
|
9
|
-
isListCollapsed:
|
|
10
|
-
onCollapseAll:
|
|
11
|
-
enableSearch:
|
|
12
|
-
enableSelectAll:
|
|
13
|
-
groupLabel:
|
|
14
|
-
allChecked:
|
|
10
|
+
isListCollapsed: m,
|
|
11
|
+
onCollapseAll: y,
|
|
12
|
+
enableSearch: s,
|
|
13
|
+
enableSelectAll: e,
|
|
14
|
+
groupLabel: i,
|
|
15
|
+
allChecked: a,
|
|
15
16
|
isIndeterminate: c = !1,
|
|
16
|
-
onSelectAll:
|
|
17
|
-
searchText:
|
|
18
|
-
onSearchChange:
|
|
17
|
+
onSelectAll: d,
|
|
18
|
+
searchText: x,
|
|
19
|
+
onSearchChange: l,
|
|
19
20
|
searchPlaceholder: p,
|
|
20
|
-
|
|
21
|
+
selectAllLabel: f = "Select All",
|
|
22
|
+
enableCollapse: n = !0
|
|
21
23
|
}) => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
const { t: u } = z();
|
|
25
|
+
if (!(s || e || i || n && o)) return null;
|
|
26
|
+
const h = /* @__PURE__ */ t(
|
|
24
27
|
"button",
|
|
25
28
|
{
|
|
26
29
|
type: "button",
|
|
27
|
-
onClick:
|
|
30
|
+
onClick: y,
|
|
28
31
|
className: "p-1 hover:bg-gray-200 rounded-full transition-colors flex items-center text-[#8C8C8C] hover:text-primary",
|
|
29
|
-
"aria-label":
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
-
|
|
32
|
+
"aria-label": u(m ? "nestedList.expandAll" : "nestedList.collapseAll"),
|
|
33
|
+
children: /* @__PURE__ */ t(
|
|
34
|
+
C,
|
|
32
35
|
{
|
|
33
36
|
size: "16px",
|
|
34
|
-
className:
|
|
37
|
+
className: k("transition-transform", !m && "rotate-90")
|
|
35
38
|
}
|
|
36
39
|
)
|
|
37
40
|
}
|
|
38
41
|
);
|
|
39
|
-
return
|
|
42
|
+
return i ? /* @__PURE__ */ r("div", { className: "mb-3", children: [
|
|
40
43
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1 mb-2", children: [
|
|
41
|
-
|
|
42
|
-
/* @__PURE__ */
|
|
44
|
+
n && o && h,
|
|
45
|
+
/* @__PURE__ */ t("span", { className: "text-[13px] font-semibold text-gray-700", children: i })
|
|
43
46
|
] }),
|
|
44
47
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
e && /* @__PURE__ */ t(
|
|
49
|
+
N,
|
|
47
50
|
{
|
|
48
|
-
checked: c ? "indeterminate" :
|
|
49
|
-
onCheckedChange:
|
|
51
|
+
checked: c ? "indeterminate" : a,
|
|
52
|
+
onCheckedChange: d
|
|
50
53
|
}
|
|
51
54
|
),
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
s ? /* @__PURE__ */ t("div", { className: "flex-1 ml-auto", children: /* @__PURE__ */ t(
|
|
56
|
+
v,
|
|
54
57
|
{
|
|
55
58
|
type: "text",
|
|
56
59
|
placeholder: p,
|
|
57
|
-
value:
|
|
58
|
-
onChange:
|
|
59
|
-
prefix: /* @__PURE__ */
|
|
60
|
+
value: x || "",
|
|
61
|
+
onChange: l,
|
|
62
|
+
prefix: /* @__PURE__ */ t(g, { size: "14px", color: "currentColor" })
|
|
60
63
|
}
|
|
61
|
-
) }) :
|
|
64
|
+
) }) : e && /* @__PURE__ */ t("span", { className: "flex-1 ml-auto text-[13px] font-semibold text-gray-700", children: f })
|
|
62
65
|
] })
|
|
63
66
|
] }) : /* @__PURE__ */ r("div", { className: "flex items-center gap-1 mb-3", children: [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
n && o && h,
|
|
68
|
+
e && /* @__PURE__ */ t(
|
|
69
|
+
N,
|
|
67
70
|
{
|
|
68
|
-
checked: c ? "indeterminate" :
|
|
69
|
-
onCheckedChange:
|
|
71
|
+
checked: c ? "indeterminate" : a,
|
|
72
|
+
onCheckedChange: d
|
|
70
73
|
}
|
|
71
74
|
),
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
s ? /* @__PURE__ */ t("div", { className: "flex-1 ml-auto", children: /* @__PURE__ */ t(
|
|
76
|
+
v,
|
|
74
77
|
{
|
|
75
78
|
type: "text",
|
|
76
79
|
placeholder: p,
|
|
77
|
-
value:
|
|
78
|
-
onChange:
|
|
79
|
-
prefix: /* @__PURE__ */
|
|
80
|
+
value: x || "",
|
|
81
|
+
onChange: l,
|
|
82
|
+
prefix: /* @__PURE__ */ t(g, { size: "14px", color: "currentColor" })
|
|
80
83
|
}
|
|
81
|
-
) }) :
|
|
84
|
+
) }) : e && /* @__PURE__ */ t("span", { className: "flex-1 ml-auto text-[13px] font-semibold text-gray-700", children: f })
|
|
82
85
|
] });
|
|
83
86
|
};
|
|
84
87
|
export {
|
|
85
|
-
|
|
88
|
+
E as NestedListHeader
|
|
86
89
|
};
|