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.
Files changed (117) hide show
  1. package/README.md +49 -0
  2. package/dist/components/layout/dashboard-layout.d.ts +15 -1
  3. package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +65 -64
  4. package/dist/components/ui/accordion.js +38 -34
  5. package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +1 -1
  6. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.d.ts +58 -0
  7. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.js +104 -0
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +62 -54
  9. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +4 -6
  10. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +54 -68
  11. package/dist/components/ui/ag-grid-react/cell-renderers/index.d.ts +3 -1
  12. package/dist/components/ui/ag-grid-react/cell-renderers/index.js +33 -27
  13. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +3 -0
  14. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +28 -12
  15. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.d.ts +2 -0
  16. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +45 -44
  17. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.d.ts +4 -6
  18. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +23 -37
  19. package/dist/components/ui/ag-grid-react/cell-renderers/types.d.ts +33 -17
  20. package/dist/components/ui/ag-grid-react/editable-utils.d.ts +27 -0
  21. package/dist/components/ui/ag-grid-react/editable-utils.js +62 -0
  22. package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +99 -98
  23. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +110 -143
  24. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +72 -69
  25. package/dist/components/ui/ag-grid-react/headers/components/header-info.js +36 -35
  26. package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +14 -12
  27. package/dist/components/ui/ag-grid-react/headers/custom-header.js +111 -110
  28. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +204 -203
  29. package/dist/components/ui/alert.js +62 -58
  30. package/dist/components/ui/breadcrumb.js +81 -74
  31. package/dist/components/ui/calendar.js +354 -354
  32. package/dist/components/ui/chart/chart.js +63 -62
  33. package/dist/components/ui/chips.js +42 -38
  34. package/dist/components/ui/command-palette/command-palette-context.d.ts +52 -0
  35. package/dist/components/ui/command-palette/command-palette-context.js +110 -0
  36. package/dist/components/ui/command-palette/command-palette.d.ts +67 -0
  37. package/dist/components/ui/command-palette/command-palette.js +402 -0
  38. package/dist/components/ui/command-palette/index.d.ts +23 -0
  39. package/dist/components/ui/command-palette/index.js +44 -0
  40. package/dist/components/ui/command-palette/kbd.d.ts +28 -0
  41. package/dist/components/ui/command-palette/kbd.js +52 -0
  42. package/dist/components/ui/command-palette/shortcut-registry.d.ts +68 -0
  43. package/dist/components/ui/command-palette/shortcut-registry.js +183 -0
  44. package/dist/components/ui/command-palette/shortcut-scope-provider.d.ts +55 -0
  45. package/dist/components/ui/command-palette/shortcut-scope-provider.js +55 -0
  46. package/dist/components/ui/command-palette/shortcut-settings.d.ts +27 -0
  47. package/dist/components/ui/command-palette/shortcut-settings.js +266 -0
  48. package/dist/components/ui/command-palette/use-browser-shortcuts.d.ts +32 -0
  49. package/dist/components/ui/command-palette/use-browser-shortcuts.js +48 -0
  50. package/dist/components/ui/command-palette/use-global-shortcut.d.ts +3 -0
  51. package/dist/components/ui/command-palette/use-global-shortcut.js +7 -0
  52. package/dist/components/ui/command-palette/use-shortcut.d.ts +47 -0
  53. package/dist/components/ui/command-palette/use-shortcut.js +49 -0
  54. package/dist/components/ui/command-palette/utils.d.ts +119 -0
  55. package/dist/components/ui/command-palette/utils.js +248 -0
  56. package/dist/components/ui/data-table/data-table-column-list.js +87 -86
  57. package/dist/components/ui/data-table/data-table-format-options.js +45 -44
  58. package/dist/components/ui/data-table/data-table-view-options.js +39 -38
  59. package/dist/components/ui/date-picker/date-picker.js +89 -87
  60. package/dist/components/ui/date-picker/date-range-picker.js +140 -138
  61. package/dist/components/ui/date-picker/month-picker.js +82 -81
  62. package/dist/components/ui/date-picker/month-range-picker.js +108 -105
  63. package/dist/components/ui/date-picker/multi-date-picker.js +68 -66
  64. package/dist/components/ui/date-picker/multi-month-picker.js +59 -58
  65. package/dist/components/ui/date-picker/multi-week-picker.js +80 -78
  66. package/dist/components/ui/date-picker/week-picker.js +117 -115
  67. package/dist/components/ui/date-picker/week-range-picker.js +166 -164
  68. package/dist/components/ui/dialog.js +78 -73
  69. package/dist/components/ui/drawer.js +71 -66
  70. package/dist/components/ui/file-upload.js +131 -127
  71. package/dist/components/ui/filter-panel/filter-panel.js +98 -94
  72. package/dist/components/ui/filter-strip/filter-strip.js +95 -91
  73. package/dist/components/ui/filter-strip/filter-summary.js +91 -90
  74. package/dist/components/ui/header.js +57 -53
  75. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +78 -76
  76. package/dist/components/ui/loader.js +17 -16
  77. package/dist/components/ui/nested-list/components/NestedListHeader.d.ts +1 -0
  78. package/dist/components/ui/nested-list/components/NestedListHeader.js +51 -48
  79. package/dist/components/ui/nested-list/components/SortableItem.js +60 -59
  80. package/dist/components/ui/nested-list/nested-list.js +184 -182
  81. package/dist/components/ui/notification-panel/notification-panel.js +60 -53
  82. package/dist/components/ui/popover.js +45 -40
  83. package/dist/components/ui/prompt.js +90 -86
  84. package/dist/components/ui/select/select.js +206 -209
  85. package/dist/components/ui/sheet.d.ts +1 -0
  86. package/dist/components/ui/sheet.js +50 -48
  87. package/dist/components/ui/sidebar.js +273 -267
  88. package/dist/components/ui/stepper.js +75 -63
  89. package/dist/components/ui/tag.js +48 -44
  90. package/dist/components/ui/toast.js +46 -41
  91. package/dist/i18n/ImpactNovaI18nContext.d.ts +21 -0
  92. package/dist/i18n/ImpactNovaI18nContext.js +76 -0
  93. package/dist/i18n/defaultMessages.d.ts +231 -0
  94. package/dist/i18n/defaultMessages.js +206 -0
  95. package/dist/i18n/getDateFnsLocale.d.ts +11 -0
  96. package/dist/i18n/getDateFnsLocale.js +21 -0
  97. package/dist/i18n/index.d.ts +5 -0
  98. package/dist/i18n/locales/de.d.ts +2 -0
  99. package/dist/i18n/locales/de.js +206 -0
  100. package/dist/i18n/locales/es.d.ts +2 -0
  101. package/dist/i18n/locales/es.js +206 -0
  102. package/dist/i18n/locales/hi.d.ts +2 -0
  103. package/dist/i18n/locales/hi.js +206 -0
  104. package/dist/i18n/locales/index.d.ts +4 -0
  105. package/dist/i18n/locales/kn.d.ts +2 -0
  106. package/dist/i18n/locales/kn.js +206 -0
  107. package/dist/icons/assets/boxAdd.svg.js +5 -0
  108. package/dist/icons/assets/boxed.svg.js +5 -0
  109. package/dist/icons/assets/trolley.svg.js +5 -0
  110. package/dist/icons/assets/unlocked.svg.js +5 -0
  111. package/dist/icons/index.d.ts +4 -0
  112. package/dist/icons/index.js +179 -171
  113. package/dist/impact-nova.css +1 -1
  114. package/dist/index.d.ts +4 -0
  115. package/dist/index.js +232 -172
  116. package/package.json +36 -4
  117. package/dist/components/ui/ag-grid-react/cell-renderers/types.js +0 -74
@@ -1,124 +1,126 @@
1
- import { jsxs as a, jsx as r, Fragment as $ } from "react/jsx-runtime";
2
- import * as s from "react";
3
- import { ChevronRight as j } from "lucide-react";
4
- import { useVirtualizer as O } from "@tanstack/react-virtual";
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 T } from "../button.js";
7
- const A = s.forwardRef(
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: z,
10
+ className: N,
10
11
  items: u,
11
- renderItem: S,
12
+ renderItem: R,
12
13
  scrollStep: g = 200,
13
14
  hideScrollbar: p = !1,
14
- controlsPosition: c = "right",
15
+ controlsPosition: s = "right",
15
16
  renderPrevious: v,
16
17
  renderNext: x,
17
- maxWidth: N = "100%",
18
+ maxWidth: L = "100%",
18
19
  estimateSize: m = 200,
19
- overscan: R = 5,
20
- ...k
21
- }, C) => {
22
- const l = s.useRef(null), [n, L] = s.useState(!1), [o, B] = s.useState(!1);
23
- s.useImperativeHandle(C, () => l.current);
24
- const i = O({
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: R
30
- }), E = i.getTotalSize(), d = s.useCallback(() => {
30
+ overscan: k
31
+ }), V = i.getTotalSize(), d = a.useCallback(() => {
31
32
  const e = l.current;
32
- e && (L(e.scrollLeft > 0), B(Math.ceil(e.scrollLeft + e.clientWidth) < e.scrollWidth));
33
+ e && (E(e.scrollLeft > 0), H(Math.ceil(e.scrollLeft + e.clientWidth) < e.scrollWidth));
33
34
  }, []);
34
- s.useEffect(() => {
35
+ a.useEffect(() => {
35
36
  const e = l.current;
36
37
  if (!e) return;
37
38
  d();
38
- const t = () => d();
39
- e.addEventListener("scroll", t);
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", t), f.disconnect();
45
+ e.removeEventListener("scroll", r), f.disconnect();
45
46
  };
46
- }, [d, u, E]);
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: t,
54
+ onClick: r,
54
55
  disabled: f
55
- }) => f ? null : /* @__PURE__ */ a(
56
- T,
57
- {
58
- variant: "ghost",
59
- size: "icon",
60
- className: h(
61
- "h-8 w-8 rounded-md bg-[#f5f6fa] text-[#60697d] hover:bg-[#eceefd] hover:text-[#4259ee]"
62
- ),
63
- onClick: t,
64
- disabled: f,
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
- /* @__PURE__ */ a("span", { className: "sr-only", children: [
75
- "Scroll ",
76
- e
77
- ] })
78
- ]
79
- }
80
- ), H = () => {
81
- const e = v ? v({ onClick: b, disabled: !n }) : /* @__PURE__ */ r(
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: !n
88
+ disabled: !o
87
89
  }
88
- ), t = x ? x({ onClick: w, disabled: !o }) : /* @__PURE__ */ r(
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: !o
95
+ disabled: !n
94
96
  }
95
97
  );
96
- return c === "split" ? /* @__PURE__ */ a($, { children: [
97
- /* @__PURE__ */ r("div", { className: "absolute left-0 top-1/2 z-20 -translate-y-1/2", children: e }),
98
- /* @__PURE__ */ r("div", { className: "absolute right-0 top-1/2 z-20 -translate-y-1/2", children: t })
99
- ] }) : c === "left" ? /* @__PURE__ */ a("div", { className: "absolute left-0 top-1/2 z-20 flex -translate-y-1/2 items-center gap-1", children: [
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
- t
102
- ] }) : /* @__PURE__ */ a("div", { className: "absolute right-0 top-1/2 z-20 flex -translate-y-1/2 items-center gap-1", children: [
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
- t
106
+ r
105
107
  ] });
106
- }, V = () => c === "left" ? n && o ? "pl-20" : n || o ? "pl-12" : "" : c === "split" && n ? "pl-12" : "", W = () => c === "right" ? n && o ? "pr-20" : n || o ? "pr-12" : "" : c === "split" && o ? "pr-12" : "";
107
- return /* @__PURE__ */ a(
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
- V(),
113
- W(),
114
- z
114
+ j(),
115
+ I(),
116
+ N
115
117
  ),
116
- style: { maxWidth: N },
118
+ style: { maxWidth: L },
117
119
  "data-component": "horizontal-scroller",
118
- ...k,
120
+ ...C,
119
121
  children: [
120
- H(),
121
- /* @__PURE__ */ r(
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__ */ a(
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__ */ r("div", { style: { width: `${i.getVirtualItems()[0]?.start ?? 0}px`, flexShrink: 0 } }),
145
- i.getVirtualItems().map((e) => /* @__PURE__ */ r(
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: S(u[e.index], e.index)
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
- A.displayName = "HorizontalScroller";
167
+ F.displayName = "HorizontalScroller";
166
168
  export {
167
- A as default
169
+ F as default
168
170
  };
@@ -1,9 +1,10 @@
1
- import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
- import * as c from "react";
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 f } from "class-variance-authority";
5
- import { cn as u } from "../../lib/utils.js";
6
- const y = f(
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
- ), h = c.forwardRef(
22
- ({ className: o, size: t = "md", progress: d, text: a, asChild: p = !1, ...s }, l) => {
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__ */ m(
30
+ return /* @__PURE__ */ c(
30
31
  "div",
31
32
  {
32
33
  ref: l,
33
- className: u("flex flex-col items-center justify-center", o),
34
+ className: p("flex flex-col items-center justify-center", o),
34
35
  role: "status",
35
- "aria-label": a || "Loading",
36
+ "aria-label": a || m("aria.loading"),
36
37
  "data-component": "loader",
37
38
  "data-size": t ?? "md",
38
- ...s,
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" && d
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
- h.displayName = "Loader";
79
+ g.displayName = "Loader";
79
80
  export {
80
- h as Loader,
81
- y as loaderVariants
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 e, jsxs as r } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
2
2
  import "react";
3
- import { Checkbox as u } from "../../checkbox.js";
4
- import { Input as h } from "../../input.js";
5
- import { ChevronRight as g, Search as N } from "../../../../icons/index.js";
6
- import { cn as y } from "../../../../lib/utils.js";
7
- const B = ({
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: a,
10
- onCollapseAll: v,
11
- enableSearch: i,
12
- enableSelectAll: t,
13
- groupLabel: n,
14
- allChecked: m,
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: l,
17
- searchText: d,
18
- onSearchChange: x,
17
+ onSelectAll: d,
18
+ searchText: x,
19
+ onSearchChange: l,
19
20
  searchPlaceholder: p,
20
- enableCollapse: s = !0
21
+ selectAllLabel: f = "Select All",
22
+ enableCollapse: n = !0
21
23
  }) => {
22
- if (!(i || t || n || s && o)) return null;
23
- const f = /* @__PURE__ */ e(
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: v,
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": a ? "Expand All" : "Collapse All",
30
- children: /* @__PURE__ */ e(
31
- g,
32
+ "aria-label": u(m ? "nestedList.expandAll" : "nestedList.collapseAll"),
33
+ children: /* @__PURE__ */ t(
34
+ C,
32
35
  {
33
36
  size: "16px",
34
- className: y("transition-transform", !a && "rotate-90")
37
+ className: k("transition-transform", !m && "rotate-90")
35
38
  }
36
39
  )
37
40
  }
38
41
  );
39
- return n ? /* @__PURE__ */ r("div", { className: "mb-3", children: [
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
- s && o && f,
42
- /* @__PURE__ */ e("span", { className: "text-[13px] font-semibold text-gray-700", children: n })
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
- t && /* @__PURE__ */ e(
46
- u,
48
+ e && /* @__PURE__ */ t(
49
+ N,
47
50
  {
48
- checked: c ? "indeterminate" : m,
49
- onCheckedChange: l
51
+ checked: c ? "indeterminate" : a,
52
+ onCheckedChange: d
50
53
  }
51
54
  ),
52
- i ? /* @__PURE__ */ e("div", { className: "flex-1 ml-auto", children: /* @__PURE__ */ e(
53
- h,
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: d || "",
58
- onChange: x,
59
- prefix: /* @__PURE__ */ e(N, { size: "14px", color: "currentColor" })
60
+ value: x || "",
61
+ onChange: l,
62
+ prefix: /* @__PURE__ */ t(g, { size: "14px", color: "currentColor" })
60
63
  }
61
- ) }) : t && /* @__PURE__ */ e("span", { className: "flex-1 ml-auto text-[13px] font-semibold text-gray-700", children: "Select All" })
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
- s && o && f,
65
- t && /* @__PURE__ */ e(
66
- u,
67
+ n && o && h,
68
+ e && /* @__PURE__ */ t(
69
+ N,
67
70
  {
68
- checked: c ? "indeterminate" : m,
69
- onCheckedChange: l
71
+ checked: c ? "indeterminate" : a,
72
+ onCheckedChange: d
70
73
  }
71
74
  ),
72
- i ? /* @__PURE__ */ e("div", { className: "flex-1 ml-auto", children: /* @__PURE__ */ e(
73
- h,
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: d || "",
78
- onChange: x,
79
- prefix: /* @__PURE__ */ e(N, { size: "14px", color: "currentColor" })
80
+ value: x || "",
81
+ onChange: l,
82
+ prefix: /* @__PURE__ */ t(g, { size: "14px", color: "currentColor" })
80
83
  }
81
- ) }) : t && /* @__PURE__ */ e("span", { className: "flex-1 ml-auto text-[13px] font-semibold text-gray-700", children: "Select All" })
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
- B as NestedListHeader
88
+ E as NestedListHeader
86
89
  };