@thebuoyant-tsdev/mui-ts-library 3.21.0 → 3.24.1

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 (38) hide show
  1. package/README.de.md +17 -6
  2. package/README.md +17 -6
  3. package/dist/components/chord-chart/ChordChart.d.ts +1 -1
  4. package/dist/components/chord-chart/ChordChart.js +66 -65
  5. package/dist/components/chord-chart/ChordChart.types.d.ts +7 -0
  6. package/dist/components/circle-packing-chart/CirclePackingChart.d.ts +1 -1
  7. package/dist/components/circle-packing-chart/CirclePackingChart.js +128 -128
  8. package/dist/components/circle-packing-chart/CirclePackingChart.types.d.ts +7 -0
  9. package/dist/components/color-picker/ColorPicker.d.ts +1 -1
  10. package/dist/components/color-picker/ColorPicker.js +282 -266
  11. package/dist/components/color-picker/ColorPicker.types.d.ts +3 -1
  12. package/dist/components/color-picker/colorPickerClasses.d.ts +35 -0
  13. package/dist/components/color-picker/colorPickerClasses.js +15 -0
  14. package/dist/components/password-strength-meter/PasswordStrengthBar.d.ts +2 -1
  15. package/dist/components/password-strength-meter/PasswordStrengthBar.js +3 -1
  16. package/dist/components/password-strength-meter/PasswordStrengthMeter.js +258 -237
  17. package/dist/components/password-strength-meter/passwordStrengthMeterClasses.d.ts +40 -0
  18. package/dist/components/password-strength-meter/passwordStrengthMeterClasses.js +16 -0
  19. package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.d.ts +1 -1
  20. package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.js +85 -84
  21. package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.types.d.ts +8 -0
  22. package/dist/components/rich-text-editor/RichTextEditorToolbar.js +115 -111
  23. package/dist/components/sunburst-chart/SunburstChart.d.ts +1 -1
  24. package/dist/components/sunburst-chart/SunburstChart.js +41 -40
  25. package/dist/components/sunburst-chart/SunburstChart.types.d.ts +7 -0
  26. package/dist/components/tag-selection/TagSelection.js +82 -79
  27. package/dist/components/tag-selection/TagSelectionAutocomplete.js +102 -98
  28. package/dist/components/tag-selection/TagSelectionChip.js +24 -21
  29. package/dist/components/tag-selection/TagSelectionSelectedTags.js +44 -38
  30. package/dist/components/tag-selection/tagSelectionClasses.d.ts +34 -0
  31. package/dist/components/tag-selection/tagSelectionClasses.js +15 -0
  32. package/dist/index.cjs +2 -2
  33. package/dist/index.d.cts +4 -0
  34. package/dist/index.d.ts +4 -0
  35. package/dist/index.js +31 -27
  36. package/dist/utils/muiTsClasses.d.ts +7 -0
  37. package/dist/utils/muiTsClasses.js +9 -0
  38. package/package.json +1 -1
@@ -14,8 +14,8 @@ function te(e, t) {
14
14
  let n = Math.floor(t / h);
15
15
  return n <= 0 ? "" : e.length <= n ? e : n < g ? "" : e.slice(0, n - 1) + "…";
16
16
  }
17
- function ne({ node: e, valueDecimalCount: t, valueDecimalSep: n, valueThousandsSep: r }) {
18
- let i = (e.value ?? 0) > 0, a = e.ancestors().map((e) => e.data.name).reverse().join(" › ");
17
+ function ne({ node: e, valueDecimalCount: t, valueDecimalSep: n, valueThousandsSep: r, valueFormatter: i }) {
18
+ let a = (e.value ?? 0) > 0, o = e.ancestors().map((e) => e.data.name).reverse().join(" › ");
19
19
  return /* @__PURE__ */ d(s, {
20
20
  sx: { py: .25 },
21
21
  children: [
@@ -27,13 +27,13 @@ function ne({ node: e, valueDecimalCount: t, valueDecimalSep: n, valueThousandsS
27
27
  },
28
28
  children: e.data.name
29
29
  }),
30
- i && /* @__PURE__ */ u(l, {
30
+ a && /* @__PURE__ */ u(l, {
31
31
  variant: "caption",
32
32
  sx: {
33
33
  display: "block",
34
34
  opacity: .85
35
35
  },
36
- children: _(e.value ?? 0, t, n, r)
36
+ children: ((e) => i ? i(e) : _(e, t, n, r))(e.value ?? 0)
37
37
  }),
38
38
  e.depth > 0 && /* @__PURE__ */ u(l, {
39
39
  variant: "caption",
@@ -42,27 +42,27 @@ function ne({ node: e, valueDecimalCount: t, valueDecimalSep: n, valueThousandsS
42
42
  opacity: .65,
43
43
  mt: .25
44
44
  },
45
- children: a
45
+ children: o
46
46
  })
47
47
  ]
48
48
  });
49
49
  }
50
- function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ = 0, sortBy: v = "value", chartColors: y, showRootLabel: b = !0, onSegmentClick: x, onZoomChange: S, valueDecimalCount: re = 0, valueDecimalSeparator: ie = ".", valueThousandsSeparator: ae = ",", zoomable: C = !1, duration: w = 750, disabled: T = !1, translation: oe }) {
51
- let E = ee(), se = {
50
+ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ = 0, sortBy: v = "value", chartColors: y, showRootLabel: b = !0, onSegmentClick: x, onZoomChange: S, valueDecimalCount: re = 0, valueDecimalSeparator: ie = ".", valueThousandsSeparator: ae = ",", valueFormatter: oe, zoomable: C = !1, duration: w = 750, disabled: T = !1, translation: se }) {
51
+ let E = ee(), ce = {
52
52
  ...e,
53
- ...oe
54
- }, D = !l.children?.length && !l.value, O = a(null), [k, A] = o(`-${h / 2} -${h / 2} ${h} ${h}`), [j, M] = o(1), ce = i(() => {
53
+ ...se
54
+ }, D = !l.children?.length && !l.value, O = a(null), [k, A] = o(`-${h / 2} -${h / 2} ${h} ${h}`), [j, M] = o(1), le = i(() => {
55
55
  if (j === 1) return k;
56
56
  let [e, t, n, r] = k.split(" ").map(Number), i = n / j, a = r / j;
57
57
  return `${e + (n - i) / 2} ${t + (r - a) / 2} ${i} ${a}`;
58
- }, [k, j]), N = h / 2, P = Math.max(0, Math.min(_, Math.max(0, N - 1))), F = Math.max(1, N - P), le = [
58
+ }, [k, j]), N = h / 2, P = Math.max(0, Math.min(_, Math.max(0, N - 1))), F = Math.max(1, N - P), ue = [
59
59
  E.palette.primary.main,
60
60
  E.palette.secondary.main,
61
61
  E.palette.error.main,
62
62
  E.palette.warning.main,
63
63
  E.palette.success.main,
64
64
  E.palette.info.main
65
- ], I = y && y.length > 0 ? y : le, { root: L, ringThickness: R } = i(() => {
65
+ ], I = y && y.length > 0 ? y : ue, { root: L, ringThickness: R } = i(() => {
66
66
  let e = f.hierarchy(l).sum((e) => e.value ?? 0);
67
67
  v === "value" ? e.sort((e, t) => (t.value ?? 0) - (e.value ?? 0)) : e.sort((e, t) => String(e.data.name).localeCompare(String(t.data.name), void 0, {
68
68
  numeric: !0,
@@ -79,22 +79,22 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
79
79
  l,
80
80
  F,
81
81
  v
82
- ]), [z, B] = o(L), [ue, de] = o(L), V = (e) => ({
82
+ ]), [z, B] = o(L), [de, fe] = o(L), V = (e) => ({
83
83
  x0: e.x0,
84
84
  x1: e.x1,
85
85
  yShift: e.depth === 0 ? 0 : (e.depth - 1) * R
86
86
  }), [H, U] = o(() => V(L)), W = a(H);
87
- if (ue !== L) {
88
- de(L), B(L);
87
+ if (de !== L) {
88
+ fe(L), B(L);
89
89
  let e = V(L);
90
90
  W.current = e, U(e);
91
91
  }
92
- let G = i(() => L.children?.map((e) => e.data.name) ?? [L.data.name], [L]), fe = i(() => f.scaleOrdinal().domain(G).range(I), [I, G]), pe = (e) => {
92
+ let G = i(() => L.children?.map((e) => e.data.name) ?? [L.data.name], [L]), pe = i(() => f.scaleOrdinal().domain(G).range(I), [I, G]), me = (e) => {
93
93
  if (e.data.colorConfig?.fill) return e.data.colorConfig.fill;
94
94
  let t = e;
95
95
  for (; t.depth > 1;) t = t.parent;
96
- return fe(t.data.name);
97
- }, me = i(() => f.arc().startAngle((e) => e.x0).endAngle((e) => e.x1).padAngle((e) => Math.min((e.x1 - e.x0) / 2, .005)).padRadius(N / 2).innerRadius((e) => P + e.y0).outerRadius((e) => P + e.y1 - 1), [N, P]), K = t((e) => {
96
+ return pe(t.data.name);
97
+ }, he = i(() => f.arc().startAngle((e) => e.x0).endAngle((e) => e.x1).padAngle((e) => Math.min((e.x1 - e.x0) / 2, .005)).padRadius(N / 2).innerRadius((e) => P + e.y0).outerRadius((e) => P + e.y1 - 1), [N, P]), K = t((e) => {
98
98
  let t = p / (H.x1 - H.x0);
99
99
  return {
100
100
  x0: Math.max(0, Math.min(p, (e.x0 - H.x0) * t)),
@@ -126,10 +126,10 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
126
126
  R,
127
127
  w
128
128
  ]);
129
- let he = (e) => e.x1 > e.x0 && e.y1 > e.y0, ge = (e) => (P + (e.y0 + e.y1) / 2) * (e.x1 - e.x0) > 12, _e = (e) => {
129
+ let ge = (e) => e.x1 > e.x0 && e.y1 > e.y0, _e = (e) => (P + (e.y0 + e.y1) / 2) * (e.x1 - e.x0) > 12, ve = (e) => {
130
130
  let t = (e.x0 + e.x1) / 2 * 180 / Math.PI, n = P + (e.y0 + e.y1) / 2, r = t < 180 ? 0 : 180;
131
131
  return `rotate(${t - 90}) translate(${n},0) rotate(${r})`;
132
- }, ve = t((e) => e.ancestors().includes(z), [z]), q = t((e) => {
132
+ }, ye = t((e) => e.ancestors().includes(z), [z]), q = t((e) => {
133
133
  let t = e.ancestors().reverse(), n = e.value ?? 0, r = L.value ?? 0;
134
134
  return {
135
135
  id: e.data.id,
@@ -172,7 +172,7 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
172
172
  R,
173
173
  b
174
174
  ]);
175
- let Y = a(null), ye = (e) => {
175
+ let Y = a(null), be = (e) => {
176
176
  Y.current &&= (clearTimeout(Y.current), null), Y.current = setTimeout(() => {
177
177
  e(), Y.current = null;
178
178
  }, 250);
@@ -190,22 +190,22 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
190
190
  L,
191
191
  J
192
192
  ]);
193
- let be = t((e) => {
193
+ let xe = t((e) => {
194
194
  if (!C || T || !e.ctrlKey) return;
195
195
  e.preventDefault();
196
196
  let t = e.deltaY < 0 ? 1.15 : 1 / 1.15;
197
197
  M((e) => Math.max(.25, Math.min(8, e * t)));
198
- }, [C, T]), Z = L.descendants().filter((e) => e.depth > 0), xe = (e) => {
198
+ }, [C, T]), Z = L.descendants().filter((e) => e.depth > 0), Se = (e) => {
199
199
  if (T) return;
200
200
  let t = Z[Number(e.currentTarget.getAttribute("data-idx"))];
201
201
  if (t) {
202
202
  if (e.ctrlKey || e.metaKey) {
203
- t.children && ye(() => J(t));
203
+ t.children && be(() => J(t));
204
204
  return;
205
205
  }
206
206
  x?.(q(t), e);
207
207
  }
208
- }, Se = (e) => {
208
+ }, Ce = (e) => {
209
209
  T || (e.ctrlKey || e.metaKey) && (X(), J(z.parent ?? L));
210
210
  }, Q = (e) => {
211
211
  if (!T) {
@@ -221,7 +221,7 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
221
221
  enterNextDelay: 0,
222
222
  disableHoverListener: T,
223
223
  slotProps: { tooltip: { sx: { maxWidth: 260 } } }
224
- }, Ce = E.palette.text.primary, we = E.typography.fontFamily;
224
+ }, we = E.palette.text.primary, Te = E.typography.fontFamily;
225
225
  return /* @__PURE__ */ u(s, {
226
226
  sx: {
227
227
  display: "inline-flex",
@@ -232,10 +232,10 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
232
232
  children: /* @__PURE__ */ u("svg", {
233
233
  width: h,
234
234
  height: h,
235
- viewBox: ce,
236
- onWheel: be,
235
+ viewBox: le,
236
+ onWheel: xe,
237
237
  style: {
238
- fontFamily: we ?? "sans-serif",
238
+ fontFamily: Te ?? "sans-serif",
239
239
  overflow: C && j > 1 ? "hidden" : "visible"
240
240
  },
241
241
  role: "img",
@@ -248,7 +248,7 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
248
248
  dy: "0.35em",
249
249
  fontSize: 13,
250
250
  fill: E.palette.text.secondary,
251
- children: se.noData
251
+ children: ce.noData
252
252
  }),
253
253
  P > 0 && /* @__PURE__ */ u(c, {
254
254
  ...$,
@@ -265,7 +265,7 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
265
265
  })
266
266
  }),
267
267
  /* @__PURE__ */ u("g", { children: Z.map((e, t) => {
268
- let n = K(e), r = he(n), i = !!e.children;
268
+ let n = K(e), r = ge(n), i = !!e.children;
269
269
  return /* @__PURE__ */ u(c, {
270
270
  ...$,
271
271
  placement: "top",
@@ -273,34 +273,35 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
273
273
  node: e,
274
274
  valueDecimalCount: re,
275
275
  valueDecimalSep: ie,
276
- valueThousandsSep: ae
276
+ valueThousandsSep: ae,
277
+ valueFormatter: oe
277
278
  }) : "",
278
279
  children: /* @__PURE__ */ u("path", {
279
280
  "data-idx": t,
280
- d: me(n) || "",
281
- fill: pe(e),
281
+ d: he(n) || "",
282
+ fill: me(e),
282
283
  fillOpacity: r ? i ? .75 : .5 : 0,
283
284
  style: {
284
285
  pointerEvents: r && !T ? "auto" : "none",
285
286
  cursor: i && !T ? "pointer" : "default",
286
287
  transition: "fill-opacity 0.15s"
287
288
  },
288
- onClick: xe,
289
- onDoubleClick: Se
289
+ onClick: Se,
290
+ onDoubleClick: Ce
290
291
  })
291
292
  }, `tt-${e.data.id}-${t}`);
292
293
  }) }),
293
294
  g && /* @__PURE__ */ u("g", {
294
295
  pointerEvents: "none",
295
296
  textAnchor: "middle",
296
- fill: Ce,
297
+ fill: we,
297
298
  children: Z.map((e, t) => {
298
- if (!ve(e)) return null;
299
+ if (!ye(e)) return null;
299
300
  let n = K(e);
300
- if (!ge(n)) return null;
301
+ if (!_e(n)) return null;
301
302
  let r = (P + (n.y0 + n.y1) / 2) * (n.x1 - n.x0) * .88, i = te(e.data.name, r);
302
303
  return i ? /* @__PURE__ */ u("text", {
303
- transform: _e(n),
304
+ transform: ve(n),
304
305
  dy: "0.35em",
305
306
  fontSize: m,
306
307
  children: i
@@ -313,7 +314,7 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
313
314
  title: "",
314
315
  children: /* @__PURE__ */ u("g", {
315
316
  textAnchor: "middle",
316
- fill: Ce,
317
+ fill: we,
317
318
  pointerEvents: T ? "none" : "auto",
318
319
  onClick: Q,
319
320
  style: { cursor: z !== L && !T ? "pointer" : "default" },
@@ -64,6 +64,13 @@ export type SunburstChartProps = {
64
64
  valueDecimalSeparator?: string;
65
65
  /** Thousands separator for values (default: ',') */
66
66
  valueThousandsSeparator?: string;
67
+ /**
68
+ * Custom formatter for numeric values in tooltips. Overrides `valueDecimalCount`,
69
+ * `valueDecimalSeparator`, and `valueThousandsSeparator`.
70
+ * Example: `(v) => \`${v.toLocaleString('de-DE')} MB\``
71
+ * @since 3.22.0
72
+ */
73
+ valueFormatter?: (value: number) => string;
67
74
  /** Enable Ctrl+Scroll zoom — content outside `size` is clipped (default: false) */
68
75
  zoomable?: boolean;
69
76
  /** Drill-down/out transition duration in ms — set to 0 to disable animation (default: 750) */
@@ -1,108 +1,111 @@
1
- import { createTagSelectionStore as e } from "./TagSelection.store.js";
2
- import { TagSelectionAutocomplete as t } from "./TagSelectionAutocomplete.js";
3
- import { TagSelectionSelectedTags as n } from "./TagSelectionSelectedTags.js";
4
- import { DEFAULT_TAG_SELECTION_TRANSLATION as r } from "./TagSelection.types.js";
5
- import { createContext as i, useContext as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
6
- import { Box as u, Stack as d } from "@mui/material";
7
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
8
- import { useStore as m } from "zustand";
1
+ import { muiTsStateClasses as e } from "../../utils/muiTsClasses.js";
2
+ import { tagSelectionClasses as t } from "./tagSelectionClasses.js";
3
+ import { createTagSelectionStore as n } from "./TagSelection.store.js";
4
+ import { TagSelectionAutocomplete as r } from "./TagSelectionAutocomplete.js";
5
+ import { TagSelectionSelectedTags as i } from "./TagSelectionSelectedTags.js";
6
+ import { DEFAULT_TAG_SELECTION_TRANSLATION as a } from "./TagSelection.types.js";
7
+ import { createContext as o, useContext as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
8
+ import { Box as f, Stack as p } from "@mui/material";
9
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
10
+ import { useStore as g } from "zustand";
9
11
  //#region src/components/tag-selection/TagSelection.tsx
10
- var h = i(null);
11
- function g(e) {
12
- let t = a(h);
12
+ var _ = o(null);
13
+ function v(e) {
14
+ let t = s(_);
13
15
  if (!t) throw Error("TagSelectionStoreContext is missing.");
14
- return m(t, e);
16
+ return g(t, e);
15
17
  }
16
- function _({ tags: e, showSelectedTags: r = !0, showSelectedTagsLabel: i = !0, showAutoComplete: a = !0, inputSize: l = "medium", chipSize: m = "small", chipVariant: h = "filled", disabled: _ = !1, loading: v = !1, maxTags: y, allowCreate: b = !1, maxVisibleChips: x, popoverPlacement: S = "bottom", listboxMaxHeight: C, searchDebounceMs: w, serverSideFilter: T = !1, translation: E, onTagSelect: D, onTagDelete: O, onTagsChange: k, onSearchChange: A, onTagCreate: j }) {
17
- let M = g((e) => e.tags), N = g((e) => e.searchValue), P = g((e) => e.setTags), F = g((e) => e.setSearchValue), I = g((e) => e.selectTag), L = g((e) => e.deleteTag), R = g((e) => e.addTag);
18
- o(() => {
19
- P(e);
20
- }, [e, P]);
21
- let z = s(() => M.filter((e) => e.selected).sort((e, t) => e.label.localeCompare(t.label)), [M]), B = s(() => M.filter((e) => !e.selected && !e.disabled).sort((e, t) => e.label.localeCompare(t.label)), [M]), V = y !== void 0 && z.length >= y, H = (e) => {
22
- k && k(e.filter((e) => e.selected), e);
23
- }, U = (e) => {
18
+ function y({ tags: n, showSelectedTags: a = !0, showSelectedTagsLabel: o = !0, showAutoComplete: s = !0, inputSize: d = "medium", chipSize: g = "small", chipVariant: _ = "filled", disabled: y = !1, loading: b = !1, maxTags: x, allowCreate: S = !1, maxVisibleChips: C, popoverPlacement: w = "bottom", listboxMaxHeight: T, searchDebounceMs: E, serverSideFilter: D = !1, translation: O, onTagSelect: k, onTagDelete: A, onTagsChange: j, onSearchChange: M, onTagCreate: N }) {
19
+ let P = v((e) => e.tags), F = v((e) => e.searchValue), I = v((e) => e.setTags), L = v((e) => e.setSearchValue), R = v((e) => e.selectTag), z = v((e) => e.deleteTag), B = v((e) => e.addTag);
20
+ c(() => {
21
+ I(n);
22
+ }, [n, I]);
23
+ let V = l(() => P.filter((e) => e.selected).sort((e, t) => e.label.localeCompare(t.label)), [P]), H = l(() => P.filter((e) => !e.selected && !e.disabled).sort((e, t) => e.label.localeCompare(t.label)), [P]), U = x !== void 0 && V.length >= x, W = (e) => {
24
+ j && j(e.filter((e) => e.selected), e);
25
+ }, G = (e) => {
24
26
  if (e.disabled || e.selected) return;
25
- I(e.id);
26
- let t = M.map((t) => t.id === e.id ? {
27
+ R(e.id);
28
+ let t = P.map((t) => t.id === e.id ? {
27
29
  ...t,
28
30
  selected: !0
29
31
  } : t), n = t.filter((e) => e.selected), r = t.find((t) => t.id === e.id);
30
- r && D && D(r, n, t), H(t);
31
- }, W = (e) => {
32
- L(e.id);
33
- let t = M.map((t) => t.id === e.id ? {
32
+ r && k && k(r, n, t), W(t);
33
+ }, K = (e) => {
34
+ z(e.id);
35
+ let t = P.map((t) => t.id === e.id ? {
34
36
  ...t,
35
37
  selected: !1
36
38
  } : t), n = t.filter((e) => e.selected), r = t.find((t) => t.id === e.id);
37
- r && O && O(r, n, t), H(t);
38
- }, G = c(null);
39
- return o(() => () => {
40
- G.current && clearTimeout(G.current);
41
- }, []), /* @__PURE__ */ f(u, {
39
+ r && A && A(r, n, t), W(t);
40
+ }, q = u(null);
41
+ return c(() => () => {
42
+ q.current && clearTimeout(q.current);
43
+ }, []), /* @__PURE__ */ m(f, {
42
44
  sx: { width: "100%" },
43
- children: /* @__PURE__ */ p(d, { children: [r && /* @__PURE__ */ f(n, {
44
- selectedTags: z,
45
- translation: E,
46
- onTagDelete: W,
47
- showSelectedTagsLabel: i,
48
- chipSize: m,
49
- chipVariant: h,
50
- disabled: _,
51
- maxVisibleChips: x,
52
- popoverPlacement: S
53
- }), a && /* @__PURE__ */ f(t, {
54
- availableTags: B,
55
- searchValue: N,
56
- translation: E,
45
+ className: [t.root, y && e.disabled].filter(Boolean).join(" "),
46
+ children: /* @__PURE__ */ h(p, { children: [a && /* @__PURE__ */ m(i, {
47
+ selectedTags: V,
48
+ translation: O,
49
+ onTagDelete: K,
50
+ showSelectedTagsLabel: o,
51
+ chipSize: g,
52
+ chipVariant: _,
53
+ disabled: y,
54
+ maxVisibleChips: C,
55
+ popoverPlacement: w
56
+ }), s && /* @__PURE__ */ m(r, {
57
+ availableTags: H,
58
+ searchValue: F,
59
+ translation: O,
57
60
  onSearchChange: (e) => {
58
- if (F(e), A) {
59
- if (G.current &&= (clearTimeout(G.current), null), !w) {
60
- A(e);
61
+ if (L(e), M) {
62
+ if (q.current &&= (clearTimeout(q.current), null), !E) {
63
+ M(e);
61
64
  return;
62
65
  }
63
- G.current = setTimeout(() => {
64
- A(e), G.current = null;
65
- }, w);
66
+ q.current = setTimeout(() => {
67
+ M(e), q.current = null;
68
+ }, E);
66
69
  }
67
70
  },
68
- onTagSelect: U,
71
+ onTagSelect: G,
69
72
  onTagCreate: (e) => {
70
- R(e), H([...M, e]), j && j(e);
73
+ B(e), W([...P, e]), N && N(e);
71
74
  },
72
- inputSize: l,
73
- chipSize: m,
74
- chipVariant: h,
75
- disabled: _,
76
- loading: v,
77
- isMaxReached: V,
78
- allowCreate: b,
79
- listboxMaxHeight: C,
80
- serverSideFilter: T
75
+ inputSize: d,
76
+ chipSize: g,
77
+ chipVariant: _,
78
+ disabled: y,
79
+ loading: b,
80
+ isMaxReached: U,
81
+ allowCreate: S,
82
+ listboxMaxHeight: T,
83
+ serverSideFilter: D
81
84
  })] })
82
85
  });
83
86
  }
84
- function v({ tags: t, showSelectedTags: n = !0, showSelectedTagsLabel: i = !0, showAutoComplete: a = !0, translation: o, inputSize: s = "medium", chipSize: c = "small", chipVariant: u = "filled", disabled: d = !1, loading: p = !1, maxTags: m, allowCreate: g = !1, maxVisibleChips: v, popoverPlacement: y = "bottom", listboxMaxHeight: b, searchDebounceMs: x, serverSideFilter: S = !1, onTagSelect: C, onTagDelete: w, onTagsChange: T, onSearchChange: E, onTagCreate: D }) {
87
+ function b({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: r = !0, showAutoComplete: i = !0, translation: o, inputSize: s = "medium", chipSize: c = "small", chipVariant: l = "filled", disabled: u = !1, loading: f = !1, maxTags: p, allowCreate: h = !1, maxVisibleChips: g, popoverPlacement: v = "bottom", listboxMaxHeight: b, searchDebounceMs: x, serverSideFilter: S = !1, onTagSelect: C, onTagDelete: w, onTagsChange: T, onSearchChange: E, onTagCreate: D }) {
85
88
  let O = {
86
- ...r,
89
+ ...a,
87
90
  ...o
88
- }, [k] = l(() => e(t));
89
- return /* @__PURE__ */ f(h.Provider, {
91
+ }, [k] = d(() => n(e));
92
+ return /* @__PURE__ */ m(_.Provider, {
90
93
  value: k,
91
- children: /* @__PURE__ */ f(_, {
92
- tags: t,
93
- showSelectedTags: n,
94
- showSelectedTagsLabel: i,
95
- showAutoComplete: a,
94
+ children: /* @__PURE__ */ m(y, {
95
+ tags: e,
96
+ showSelectedTags: t,
97
+ showSelectedTagsLabel: r,
98
+ showAutoComplete: i,
96
99
  translation: O,
97
100
  inputSize: s,
98
101
  chipSize: c,
99
- chipVariant: u,
100
- disabled: d,
101
- loading: p,
102
- maxTags: m,
103
- allowCreate: g,
104
- maxVisibleChips: v,
105
- popoverPlacement: y,
102
+ chipVariant: l,
103
+ disabled: u,
104
+ loading: f,
105
+ maxTags: p,
106
+ allowCreate: h,
107
+ maxVisibleChips: g,
108
+ popoverPlacement: v,
106
109
  listboxMaxHeight: b,
107
110
  searchDebounceMs: x,
108
111
  serverSideFilter: S,
@@ -115,4 +118,4 @@ function v({ tags: t, showSelectedTags: n = !0, showSelectedTagsLabel: i = !0, s
115
118
  });
116
119
  }
117
120
  //#endregion
118
- export { v as TagSelection };
121
+ export { b as TagSelection };