@thebuoyant-tsdev/mui-ts-library 3.20.0 → 3.21.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/README.de.md CHANGED
@@ -475,6 +475,13 @@ Dieses Projekt folgt [Semantic Versioning](https://semver.org/). In der Praxis b
475
475
 
476
476
  ## Changelog
477
477
 
478
+ ### [3.21.0] — 2026-07-09
479
+
480
+ **Hinzugefügt**
481
+ - `TagSelection`: neue Prop `chipVariant?: 'filled' | 'outlined'` (Standard: `'filled'`) — steuert die MUI-Chip-Variante für alle Tag-Chips im Auswahl-Bereich und im Autocomplete-Dropdown. Consumer mit eigenem Design-System, das `outlined`-Chips bevorzugt, müssen keine Styles mehr manuell überschreiben. Siehe [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.md) für Details.
482
+
483
+ ---
484
+
478
485
  ### [3.20.0] — 2026-07-09
479
486
 
480
487
  **Hinzugefügt**
package/README.md CHANGED
@@ -475,6 +475,13 @@ This project follows [Semantic Versioning](https://semver.org/). In practice:
475
475
 
476
476
  ## Changelog
477
477
 
478
+ ### [3.21.0] — 2026-07-09
479
+
480
+ **Added**
481
+ - `TagSelection`: new `chipVariant?: 'filled' | 'outlined'` prop (default: `'filled'`) — controls the MUI Chip variant for all tag chips in the selected-tags area and in the autocomplete dropdown. Consumers with a design system that prefers `outlined` chips no longer need to override styles manually. See [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.md) for details.
482
+
483
+ ---
484
+
478
485
  ### [3.20.0] — 2026-07-09
479
486
 
480
487
  **Added**
@@ -1,2 +1,2 @@
1
1
  import type { TagSelectionProps } from "./TagSelection.types";
2
- export declare function TagSelection({ tags, showSelectedTags, showSelectedTagsLabel, showAutoComplete, translation, inputSize, chipSize, disabled, loading, maxTags, allowCreate, maxVisibleChips, popoverPlacement, listboxMaxHeight, searchDebounceMs, serverSideFilter, onTagSelect, onTagDelete, onTagsChange, onSearchChange, onTagCreate, }: TagSelectionProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function TagSelection({ tags, showSelectedTags, showSelectedTagsLabel, showAutoComplete, translation, inputSize, chipSize, chipVariant, disabled, loading, maxTags, allowCreate, maxVisibleChips, popoverPlacement, listboxMaxHeight, searchDebounceMs, serverSideFilter, onTagSelect, onTagDelete, onTagsChange, onSearchChange, onTagCreate, }: TagSelectionProps): import("react/jsx-runtime").JSX.Element;
@@ -13,101 +13,104 @@ function g(e) {
13
13
  if (!t) throw Error("TagSelectionStoreContext is missing.");
14
14
  return m(t, e);
15
15
  }
16
- function _({ tags: e, showSelectedTags: r = !0, showSelectedTagsLabel: i = !0, showAutoComplete: a = !0, inputSize: l = "medium", chipSize: m = "small", disabled: h = !1, loading: _ = !1, maxTags: v, allowCreate: y = !1, maxVisibleChips: b, popoverPlacement: x = "bottom", listboxMaxHeight: S, searchDebounceMs: C, serverSideFilter: w = !1, translation: T, onTagSelect: E, onTagDelete: D, onTagsChange: O, onSearchChange: k, onTagCreate: A }) {
17
- let j = g((e) => e.tags), M = g((e) => e.searchValue), N = g((e) => e.setTags), P = g((e) => e.setSearchValue), F = g((e) => e.selectTag), I = g((e) => e.deleteTag), L = g((e) => e.addTag);
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
18
  o(() => {
19
- N(e);
20
- }, [e, N]);
21
- let R = s(() => j.filter((e) => e.selected).sort((e, t) => e.label.localeCompare(t.label)), [j]), z = s(() => j.filter((e) => !e.selected && !e.disabled).sort((e, t) => e.label.localeCompare(t.label)), [j]), B = v !== void 0 && R.length >= v, V = (e) => {
22
- O && O(e.filter((e) => e.selected), e);
23
- }, H = (e) => {
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) => {
24
24
  if (e.disabled || e.selected) return;
25
- F(e.id);
26
- let t = j.map((t) => t.id === e.id ? {
25
+ I(e.id);
26
+ let t = M.map((t) => t.id === e.id ? {
27
27
  ...t,
28
28
  selected: !0
29
29
  } : t), n = t.filter((e) => e.selected), r = t.find((t) => t.id === e.id);
30
- r && E && E(r, n, t), V(t);
31
- }, U = (e) => {
32
- I(e.id);
33
- let t = j.map((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 ? {
34
34
  ...t,
35
35
  selected: !1
36
36
  } : t), n = t.filter((e) => e.selected), r = t.find((t) => t.id === e.id);
37
- r && D && D(r, n, t), V(t);
38
- }, W = c(null);
37
+ r && O && O(r, n, t), H(t);
38
+ }, G = c(null);
39
39
  return o(() => () => {
40
- W.current && clearTimeout(W.current);
40
+ G.current && clearTimeout(G.current);
41
41
  }, []), /* @__PURE__ */ f(u, {
42
42
  sx: { width: "100%" },
43
43
  children: /* @__PURE__ */ p(d, { children: [r && /* @__PURE__ */ f(n, {
44
- selectedTags: R,
45
- translation: T,
46
- onTagDelete: U,
44
+ selectedTags: z,
45
+ translation: E,
46
+ onTagDelete: W,
47
47
  showSelectedTagsLabel: i,
48
48
  chipSize: m,
49
- disabled: h,
50
- maxVisibleChips: b,
51
- popoverPlacement: x
49
+ chipVariant: h,
50
+ disabled: _,
51
+ maxVisibleChips: x,
52
+ popoverPlacement: S
52
53
  }), a && /* @__PURE__ */ f(t, {
53
- availableTags: z,
54
- searchValue: M,
55
- translation: T,
54
+ availableTags: B,
55
+ searchValue: N,
56
+ translation: E,
56
57
  onSearchChange: (e) => {
57
- if (P(e), k) {
58
- if (W.current &&= (clearTimeout(W.current), null), !C) {
59
- k(e);
58
+ if (F(e), A) {
59
+ if (G.current &&= (clearTimeout(G.current), null), !w) {
60
+ A(e);
60
61
  return;
61
62
  }
62
- W.current = setTimeout(() => {
63
- k(e), W.current = null;
64
- }, C);
63
+ G.current = setTimeout(() => {
64
+ A(e), G.current = null;
65
+ }, w);
65
66
  }
66
67
  },
67
- onTagSelect: H,
68
+ onTagSelect: U,
68
69
  onTagCreate: (e) => {
69
- L(e), V([...j, e]), A && A(e);
70
+ R(e), H([...M, e]), j && j(e);
70
71
  },
71
72
  inputSize: l,
72
73
  chipSize: m,
73
- disabled: h,
74
- loading: _,
75
- isMaxReached: B,
76
- allowCreate: y,
77
- listboxMaxHeight: S,
78
- serverSideFilter: w
74
+ chipVariant: h,
75
+ disabled: _,
76
+ loading: v,
77
+ isMaxReached: V,
78
+ allowCreate: b,
79
+ listboxMaxHeight: C,
80
+ serverSideFilter: T
79
81
  })] })
80
82
  });
81
83
  }
82
- function v({ tags: t, showSelectedTags: n = !0, showSelectedTagsLabel: i = !0, showAutoComplete: a = !0, translation: o, inputSize: s = "medium", chipSize: c = "small", disabled: u = !1, loading: d = !1, maxTags: p, allowCreate: m = !1, maxVisibleChips: g, popoverPlacement: v = "bottom", listboxMaxHeight: y, searchDebounceMs: b, serverSideFilter: x = !1, onTagSelect: S, onTagDelete: C, onTagsChange: w, onSearchChange: T, onTagCreate: E }) {
83
- let D = {
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 }) {
85
+ let O = {
84
86
  ...r,
85
87
  ...o
86
- }, [O] = l(() => e(t));
88
+ }, [k] = l(() => e(t));
87
89
  return /* @__PURE__ */ f(h.Provider, {
88
- value: O,
90
+ value: k,
89
91
  children: /* @__PURE__ */ f(_, {
90
92
  tags: t,
91
93
  showSelectedTags: n,
92
94
  showSelectedTagsLabel: i,
93
95
  showAutoComplete: a,
94
- translation: D,
96
+ translation: O,
95
97
  inputSize: s,
96
98
  chipSize: c,
97
- disabled: u,
98
- loading: d,
99
- maxTags: p,
100
- allowCreate: m,
101
- maxVisibleChips: g,
102
- popoverPlacement: v,
103
- listboxMaxHeight: y,
104
- searchDebounceMs: b,
105
- serverSideFilter: x,
106
- onTagSelect: S,
107
- onTagDelete: C,
108
- onTagsChange: w,
109
- onSearchChange: T,
110
- onTagCreate: E
99
+ chipVariant: u,
100
+ disabled: d,
101
+ loading: p,
102
+ maxTags: m,
103
+ allowCreate: g,
104
+ maxVisibleChips: v,
105
+ popoverPlacement: y,
106
+ listboxMaxHeight: b,
107
+ searchDebounceMs: x,
108
+ serverSideFilter: S,
109
+ onTagSelect: C,
110
+ onTagDelete: w,
111
+ onTagsChange: T,
112
+ onSearchChange: E,
113
+ onTagCreate: D
111
114
  })
112
115
  });
113
116
  }
@@ -29,6 +29,12 @@ export declare const DEFAULT_TAG_SELECTION_TRANSLATION: Required<TagSelectionTra
29
29
  export type TagSelectionProps = {
30
30
  allowCreate?: boolean;
31
31
  chipSize?: "small" | "medium";
32
+ /** Controls the MUI Chip variant for selected tag chips and autocomplete option chips.
33
+ * Useful for consumers with a custom design system that prefer `outlined` chips.
34
+ * Default: `'filled'`.
35
+ * @since 3.21.0
36
+ */
37
+ chipVariant?: "filled" | "outlined";
32
38
  disabled?: boolean;
33
39
  inputSize?: "small" | "medium";
34
40
  listboxMaxHeight?: number;
@@ -2,6 +2,7 @@ import type { TagSelectionItem, TagSelectionTranslation } from "./TagSelection.t
2
2
  type TagSelectionAutocompleteProps = {
3
3
  inputSize: "medium" | "small";
4
4
  chipSize: "medium" | "small";
5
+ chipVariant: "filled" | "outlined";
5
6
  availableTags: TagSelectionItem[];
6
7
  searchValue: string;
7
8
  translation: Required<TagSelectionTranslation>;
@@ -15,5 +16,5 @@ type TagSelectionAutocompleteProps = {
15
16
  listboxMaxHeight?: number;
16
17
  serverSideFilter?: boolean;
17
18
  };
18
- export declare function TagSelectionAutocomplete({ availableTags, searchValue, translation, onSearchChange, onTagSelect, onTagCreate, inputSize, chipSize, disabled, loading, isMaxReached, allowCreate, listboxMaxHeight, serverSideFilter, }: TagSelectionAutocompleteProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function TagSelectionAutocomplete({ availableTags, searchValue, translation, onSearchChange, onTagSelect, onTagCreate, inputSize, chipSize, chipVariant, disabled, loading, isMaxReached, allowCreate, listboxMaxHeight, serverSideFilter, }: TagSelectionAutocompleteProps): import("react/jsx-runtime").JSX.Element;
19
20
  export {};
@@ -1,10 +1,10 @@
1
1
  import { useState as e } from "react";
2
- import { Autocomplete as t, Box as n, Chip as r, IconButton as i, Stack as a, Switch as ee, TextField as o, Tooltip as s, Typography as c } from "@mui/material";
3
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
4
- import f from "@mui/icons-material/Check";
5
- import te from "@mui/icons-material/Close";
2
+ import { Autocomplete as t, Box as n, Chip as r, IconButton as i, Stack as a, Switch as o, TextField as s, Tooltip as c, Typography as l } from "@mui/material";
3
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
4
+ import p from "@mui/icons-material/Check";
5
+ import ee from "@mui/icons-material/Close";
6
6
  //#region src/components/tag-selection/TagSelectionAutocomplete.tsx
7
- var p = [
7
+ var te = [
8
8
  "default",
9
9
  "primary",
10
10
  "secondary",
@@ -45,14 +45,14 @@ function _(e, t) {
45
45
  let n = t.trim();
46
46
  if (!n) return e;
47
47
  let r = e.toLowerCase().indexOf(n.toLowerCase());
48
- return r === -1 ? e : /* @__PURE__ */ d(l, { children: [
48
+ return r === -1 ? e : /* @__PURE__ */ f(u, { children: [
49
49
  e.slice(0, r),
50
- /* @__PURE__ */ u("strong", { children: e.slice(r, r + n.length) }),
50
+ /* @__PURE__ */ d("strong", { children: e.slice(r, r + n.length) }),
51
51
  e.slice(r + n.length)
52
52
  ] });
53
53
  }
54
54
  function v({ color: e, selected: t, onClick: r }) {
55
- return /* @__PURE__ */ u(n, {
55
+ return /* @__PURE__ */ d(n, {
56
56
  onClick: r,
57
57
  sx: {
58
58
  width: 24,
@@ -75,7 +75,7 @@ function v({ color: e, selected: t, onClick: r }) {
75
75
  });
76
76
  }
77
77
  function y({ value: e, onChange: t, disabled: r = !1 }) {
78
- return /* @__PURE__ */ u(o, {
78
+ return /* @__PURE__ */ d(s, {
79
79
  size: "small",
80
80
  fullWidth: !0,
81
81
  value: e,
@@ -92,7 +92,7 @@ function y({ value: e, onChange: t, disabled: r = !1 }) {
92
92
  fontFamily: "monospace"
93
93
  }
94
94
  },
95
- slotProps: { input: { startAdornment: /* @__PURE__ */ u(n, { sx: {
95
+ slotProps: { input: { startAdornment: /* @__PURE__ */ d(n, { sx: {
96
96
  width: 12,
97
97
  height: 12,
98
98
  borderRadius: .25,
@@ -104,54 +104,54 @@ function y({ value: e, onChange: t, disabled: r = !1 }) {
104
104
  } }) } }
105
105
  });
106
106
  }
107
- function b({ availableTags: b, searchValue: x, translation: S, onSearchChange: C, onTagSelect: w, onTagCreate: T, inputSize: ne = "medium", chipSize: E = "medium", disabled: D = !1, loading: re = !1, isMaxReached: O = !1, allowCreate: ie = !1, listboxMaxHeight: k, serverSideFilter: A = !1 }) {
108
- let [j, M] = e("default"), [N, P] = e(null), [F, I] = e(null), [L, R] = e(!0), [z, B] = e(!1), [V, H] = e(!1), [U, W] = e("#1976d2"), [G, K] = e("#ffffff"), q = D || O, J = N !== null, ae = A ? b : b.filter((e) => e.label.toLowerCase().includes(x.trim().toLowerCase())), Y = ie && x.trim() !== "" && ae.length === 0, oe = V && !Y, X = J ? L ? g(N) : F ?? "#000000" : void 0, Z = () => {
109
- if (q) return;
107
+ function b({ availableTags: b, searchValue: x, translation: S, onSearchChange: C, onTagSelect: w, onTagCreate: ne, inputSize: re = "medium", chipSize: T = "medium", chipVariant: ie = "filled", disabled: E = !1, loading: D = !1, isMaxReached: O = !1, allowCreate: k = !1, listboxMaxHeight: A, serverSideFilter: j = !1 }) {
108
+ let [M, N] = e("default"), [P, F] = e(null), [I, L] = e(null), [R, z] = e(!0), [B, V] = e(!1), [H, U] = e(!1), [W, G] = e("#1976d2"), [K, q] = e("#ffffff"), J = E || O, Y = P !== null, ae = j ? b : b.filter((e) => e.label.toLowerCase().includes(x.trim().toLowerCase())), X = k && x.trim() !== "" && ae.length === 0, oe = H && !X, Z = Y ? R ? g(P) : I ?? "#000000" : void 0, Q = () => {
109
+ if (J) return;
110
110
  let e = x.trim(), t = e.toLowerCase().replace(/\s+/g, "-");
111
- T?.(J && N ? {
111
+ ne?.(Y && P ? {
112
112
  id: t,
113
113
  label: e,
114
114
  selected: !0,
115
115
  color: "default",
116
- backgroundColor: N,
117
- foregroundColor: X
116
+ backgroundColor: P,
117
+ foregroundColor: Z
118
118
  } : {
119
119
  id: t,
120
120
  label: e,
121
121
  selected: !0,
122
- color: j
123
- }), M("default"), P(null), I(null), R(!0), B(!1), C("");
124
- }, Q = () => {
125
- C(""), M("default"), P(null), I(null), R(!0), B(!1);
126
- }, se = (e) => {
127
- P(e), W(e), M("default");
122
+ color: M
123
+ }), N("default"), F(null), L(null), z(!0), V(!1), C("");
124
+ }, se = () => {
125
+ C(""), N("default"), F(null), L(null), z(!0), V(!1);
128
126
  }, ce = (e) => {
129
- W(e), h(e) && (P(e), M("default"));
127
+ F(e), G(e), N("default");
130
128
  }, le = (e) => {
131
- I(e), K(e);
129
+ G(e), h(e) && (F(e), N("default"));
132
130
  }, ue = (e) => {
133
- K(e), h(e) && I(e);
131
+ L(e), q(e);
134
132
  }, de = (e) => {
135
- if (R(e), e) I(null);
136
- else if (N) {
137
- let e = g(N);
138
- I(e), K(e);
133
+ q(e), h(e) && L(e);
134
+ }, fe = (e) => {
135
+ if (z(e), e) L(null);
136
+ else if (P) {
137
+ let e = g(P);
138
+ L(e), q(e);
139
139
  }
140
140
  }, $ = (e) => e.preventDefault();
141
- return /* @__PURE__ */ d(n, {
141
+ return /* @__PURE__ */ f(n, {
142
142
  sx: { mb: 2 },
143
- children: [/* @__PURE__ */ u(t, {
143
+ children: [/* @__PURE__ */ d(t, {
144
144
  options: b,
145
- filterOptions: A ? (e) => e : void 0,
145
+ filterOptions: j ? (e) => e : void 0,
146
146
  value: null,
147
147
  open: oe,
148
148
  onOpen: () => {
149
- Y || H(!0);
149
+ X || U(!0);
150
150
  },
151
- onClose: () => H(!1),
152
- size: ne,
153
- disabled: q,
154
- loading: re,
151
+ onClose: () => U(!1),
152
+ size: re,
153
+ disabled: J,
154
+ loading: D,
155
155
  getOptionLabel: (e) => e.label,
156
156
  inputValue: x,
157
157
  onInputChange: (e, t, n) => {
@@ -165,52 +165,53 @@ function b({ availableTags: b, searchValue: x, translation: S, onSearchChange: C
165
165
  flexWrap: "wrap",
166
166
  gap: 1,
167
167
  padding: 1,
168
- ...k !== void 0 && {
169
- maxHeight: k,
168
+ ...A !== void 0 && {
169
+ maxHeight: A,
170
170
  overflowY: "auto"
171
171
  }
172
172
  } } },
173
- renderInput: (e) => /* @__PURE__ */ u(o, {
173
+ renderInput: (e) => /* @__PURE__ */ d(s, {
174
174
  ...e,
175
175
  label: S.autoCompleteLabel,
176
176
  placeholder: S.placeholder,
177
- helperText: O && !D ? S.maxTagsReachedText : void 0,
177
+ helperText: O && !E ? S.maxTagsReachedText : void 0,
178
178
  onKeyDown: (e) => {
179
- Y && !q && e.key === "Enter" && (e.preventDefault(), Z());
179
+ X && !J && e.key === "Enter" && (e.preventDefault(), Q());
180
180
  },
181
181
  slotProps: {
182
182
  ...e.slotProps,
183
183
  input: {
184
184
  ...e.slotProps?.input,
185
- endAdornment: /* @__PURE__ */ d(l, { children: [Y && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(i, {
185
+ endAdornment: /* @__PURE__ */ f(u, { children: [X && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(i, {
186
186
  size: "small",
187
187
  sx: { color: "success.main" },
188
188
  onMouseDown: $,
189
- onClick: Z,
190
- disabled: q,
189
+ onClick: Q,
190
+ disabled: J,
191
191
  "aria-label": S.confirmCreateLabel,
192
- children: /* @__PURE__ */ u(f, { fontSize: "small" })
193
- }), /* @__PURE__ */ u(i, {
192
+ children: /* @__PURE__ */ d(p, { fontSize: "small" })
193
+ }), /* @__PURE__ */ d(i, {
194
194
  size: "small",
195
195
  onMouseDown: $,
196
- onClick: Q,
196
+ onClick: se,
197
197
  "aria-label": S.cancelCreateLabel,
198
- children: /* @__PURE__ */ u(te, { fontSize: "small" })
198
+ children: /* @__PURE__ */ d(ee, { fontSize: "small" })
199
199
  })] }), e.slotProps?.input?.endAdornment] })
200
200
  }
201
201
  }
202
202
  }),
203
203
  renderOption: ({ key: e, ...t }, n) => {
204
204
  let i = !!(n.foregroundColor || n.backgroundColor);
205
- return /* @__PURE__ */ u("li", {
205
+ return /* @__PURE__ */ d("li", {
206
206
  ...t,
207
207
  style: {
208
208
  width: "auto",
209
209
  padding: 0,
210
210
  margin: 0
211
211
  },
212
- children: /* @__PURE__ */ u(r, {
213
- size: E,
212
+ children: /* @__PURE__ */ d(r, {
213
+ size: T,
214
+ variant: ie,
214
215
  label: _(n.label, x),
215
216
  color: i ? void 0 : n.color ?? "default",
216
217
  sx: i ? {
@@ -223,10 +224,10 @@ function b({ availableTags: b, searchValue: x, translation: S, onSearchChange: C
223
224
  isOptionEqualToValue: (e, t) => e.id === t.id,
224
225
  noOptionsText: S.noAvailableTagsText,
225
226
  loadingText: S.loadingText
226
- }), Y && /* @__PURE__ */ d(n, {
227
+ }), X && /* @__PURE__ */ f(n, {
227
228
  sx: { position: "relative" },
228
229
  onMouseDown: $,
229
- children: [/* @__PURE__ */ d(a, {
230
+ children: [/* @__PURE__ */ f(a, {
230
231
  direction: "row",
231
232
  sx: {
232
233
  mt: .5,
@@ -234,33 +235,33 @@ function b({ availableTags: b, searchValue: x, translation: S, onSearchChange: C
234
235
  gap: .5,
235
236
  alignItems: "center"
236
237
  },
237
- children: [p.map((e) => /* @__PURE__ */ u(r, {
238
- size: E,
238
+ children: [te.map((e) => /* @__PURE__ */ d(r, {
239
+ size: T,
239
240
  color: e,
240
241
  label: e,
241
- variant: !J && j === e ? "filled" : "outlined",
242
+ variant: !Y && M === e ? "filled" : "outlined",
242
243
  onClick: () => {
243
- M(e), P(null), I(null), B(!1);
244
+ N(e), F(null), L(null), V(!1);
244
245
  },
245
246
  clickable: !0
246
- }, e)), /* @__PURE__ */ u(s, {
247
+ }, e)), /* @__PURE__ */ d(c, {
247
248
  title: S.colorPickerLabel,
248
- children: /* @__PURE__ */ u(r, {
249
- size: E,
250
- label: J ? N : "···",
249
+ children: /* @__PURE__ */ d(r, {
250
+ size: T,
251
+ label: Y ? P : "···",
251
252
  variant: "outlined",
252
253
  onClick: () => {
253
- B((e) => !e), N && W(N), F && K(F);
254
+ V((e) => !e), P && G(P), I && q(I);
254
255
  },
255
256
  sx: (e) => ({
256
257
  cursor: "pointer",
257
258
  fontFamily: "monospace",
258
259
  fontSize: "0.7rem",
259
- ...J ? {
260
- backgroundColor: N,
261
- color: X,
260
+ ...Y ? {
261
+ backgroundColor: P,
262
+ color: Z,
262
263
  border: "1.5px solid transparent",
263
- backgroundImage: `linear-gradient(${N}, ${N}), linear-gradient(90deg, #f44336, #ff9800, #ffeb3b, #4caf50, #2196f3, #9c27b0)`,
264
+ backgroundImage: `linear-gradient(${P}, ${P}), linear-gradient(90deg, #f44336, #ff9800, #ffeb3b, #4caf50, #2196f3, #9c27b0)`,
264
265
  backgroundOrigin: "border-box",
265
266
  backgroundClip: "padding-box, border-box"
266
267
  } : {
@@ -273,7 +274,7 @@ function b({ availableTags: b, searchValue: x, translation: S, onSearchChange: C
273
274
  clickable: !0
274
275
  })
275
276
  })]
276
- }), z && /* @__PURE__ */ u(n, {
277
+ }), B && /* @__PURE__ */ d(n, {
277
278
  sx: {
278
279
  position: "absolute",
279
280
  top: "calc(100% + 4px)",
@@ -287,13 +288,13 @@ function b({ availableTags: b, searchValue: x, translation: S, onSearchChange: C
287
288
  p: 1.25,
288
289
  width: "max-content"
289
290
  },
290
- children: /* @__PURE__ */ d(n, {
291
+ children: /* @__PURE__ */ f(n, {
291
292
  sx: {
292
293
  display: "grid",
293
294
  gridTemplateColumns: "auto auto",
294
295
  gap: 2
295
296
  },
296
- children: [/* @__PURE__ */ d(n, { children: [/* @__PURE__ */ u(c, {
297
+ children: [/* @__PURE__ */ f(n, { children: [/* @__PURE__ */ d(l, {
297
298
  variant: "caption",
298
299
  sx: {
299
300
  fontWeight: 700,
@@ -302,28 +303,28 @@ function b({ availableTags: b, searchValue: x, translation: S, onSearchChange: C
302
303
  mb: .5
303
304
  },
304
305
  children: S.backgroundColorLabel
305
- }), /* @__PURE__ */ d(n, {
306
+ }), /* @__PURE__ */ f(n, {
306
307
  sx: {
307
308
  display: "grid",
308
309
  gridTemplateColumns: "repeat(5, 24px)",
309
310
  gap: .5
310
311
  },
311
- children: [m.map((e) => /* @__PURE__ */ u(v, {
312
+ children: [m.map((e) => /* @__PURE__ */ d(v, {
312
313
  color: e,
313
- selected: N === e,
314
- onClick: () => se(e)
315
- }, e)), /* @__PURE__ */ u(n, {
314
+ selected: P === e,
315
+ onClick: () => ce(e)
316
+ }, e)), /* @__PURE__ */ d(n, {
316
317
  sx: {
317
318
  gridColumn: "span 5",
318
319
  mt: .25
319
320
  },
320
- children: /* @__PURE__ */ u(y, {
321
- value: U,
322
- onChange: ce
321
+ children: /* @__PURE__ */ d(y, {
322
+ value: W,
323
+ onChange: le
323
324
  })
324
325
  })]
325
- })] }), /* @__PURE__ */ d(n, { children: [
326
- /* @__PURE__ */ u(c, {
326
+ })] }), /* @__PURE__ */ f(n, { children: [
327
+ /* @__PURE__ */ d(l, {
327
328
  variant: "caption",
328
329
  sx: {
329
330
  fontWeight: 700,
@@ -333,32 +334,32 @@ function b({ availableTags: b, searchValue: x, translation: S, onSearchChange: C
333
334
  },
334
335
  children: S.textColorLabel
335
336
  }),
336
- /* @__PURE__ */ d(n, {
337
+ /* @__PURE__ */ f(n, {
337
338
  sx: {
338
339
  display: "grid",
339
340
  gridTemplateColumns: "repeat(5, 24px)",
340
341
  gap: .5,
341
- opacity: L ? .3 : 1,
342
- pointerEvents: L ? "none" : "auto",
342
+ opacity: R ? .3 : 1,
343
+ pointerEvents: R ? "none" : "auto",
343
344
  transition: "opacity 0.15s"
344
345
  },
345
- children: [m.map((e) => /* @__PURE__ */ u(v, {
346
+ children: [m.map((e) => /* @__PURE__ */ d(v, {
346
347
  color: e,
347
- selected: F === e,
348
- onClick: () => le(e)
349
- }, e)), /* @__PURE__ */ u(n, {
348
+ selected: I === e,
349
+ onClick: () => ue(e)
350
+ }, e)), /* @__PURE__ */ d(n, {
350
351
  sx: {
351
352
  gridColumn: "span 5",
352
353
  mt: .25
353
354
  },
354
- children: /* @__PURE__ */ u(y, {
355
- value: L ? X ?? "#000000" : G,
356
- onChange: ue,
357
- disabled: L
355
+ children: /* @__PURE__ */ d(y, {
356
+ value: R ? Z ?? "#000000" : K,
357
+ onChange: de,
358
+ disabled: R
358
359
  })
359
360
  })]
360
361
  }),
361
- /* @__PURE__ */ d(a, {
362
+ /* @__PURE__ */ f(a, {
362
363
  direction: "row",
363
364
  sx: {
364
365
  width: "100%",
@@ -367,14 +368,14 @@ function b({ availableTags: b, searchValue: x, translation: S, onSearchChange: C
367
368
  gap: .5,
368
369
  mt: .25
369
370
  },
370
- children: [/* @__PURE__ */ u(c, {
371
+ children: [/* @__PURE__ */ d(l, {
371
372
  variant: "caption",
372
373
  color: "text.secondary",
373
374
  children: S.autoTextColorLabel
374
- }), /* @__PURE__ */ u(ee, {
375
+ }), /* @__PURE__ */ d(o, {
375
376
  size: "small",
376
- checked: L,
377
- onChange: (e) => de(e.target.checked)
377
+ checked: R,
378
+ onChange: (e) => fe(e.target.checked)
378
379
  })]
379
380
  })
380
381
  ] })]
@@ -4,7 +4,8 @@ type TagSelectionChipProps = {
4
4
  onDelete?: (tag: TagSelectionItem) => void;
5
5
  onClick?: (tag: TagSelectionItem) => void;
6
6
  chipSize: "small" | "medium";
7
+ chipVariant: "filled" | "outlined";
7
8
  disabled?: boolean;
8
9
  };
9
- export declare function TagSelectionChip({ tag, onDelete, onClick, chipSize, disabled, }: TagSelectionChipProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function TagSelectionChip({ tag, onDelete, onClick, chipSize, chipVariant, disabled, }: TagSelectionChipProps): import("react/jsx-runtime").JSX.Element;
10
11
  export {};