@thebuoyant-tsdev/mui-ts-library 3.29.1 → 3.30.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.
Files changed (53) hide show
  1. package/README.de.md +59 -1
  2. package/README.md +59 -1
  3. package/dist/components/chord-chart/ChordChart.js +112 -112
  4. package/dist/components/circle-packing-chart/CirclePackingChart.js +135 -135
  5. package/dist/components/color-picker/ColorPicker.js +217 -217
  6. package/dist/components/color-picker/PopoverColorPicker.js +7 -7
  7. package/dist/components/date-range-picker/DateRangePicker.js +9 -9
  8. package/dist/components/gantt-chart/GanttChart.js +18 -18
  9. package/dist/components/gantt-chart/GanttTaskDialog.js +43 -43
  10. package/dist/components/gantt-chart/GanttTaskPanel.js +128 -128
  11. package/dist/components/gantt-chart/GanttTimeline.js +16 -16
  12. package/dist/components/gantt-chart/GanttToolbar.js +24 -24
  13. package/dist/components/horizontal-tree-chart/HorizontalTreeChart.js +244 -244
  14. package/dist/components/json-editor/JsonEditor.js +9 -9
  15. package/dist/components/json-editor/JsonEditorContent.js +54 -54
  16. package/dist/components/json-editor/JsonEditorToolbar.js +12 -12
  17. package/dist/components/kanban-board/KanbanBoard.d.ts +2 -0
  18. package/dist/components/kanban-board/KanbanBoard.js +129 -0
  19. package/dist/components/kanban-board/KanbanBoard.types.d.ts +84 -0
  20. package/dist/components/kanban-board/KanbanBoard.types.js +19 -0
  21. package/dist/components/kanban-board/KanbanBoardCard.d.ts +13 -0
  22. package/dist/components/kanban-board/KanbanBoardCard.js +104 -0
  23. package/dist/components/kanban-board/KanbanBoardCardDialog.d.ts +23 -0
  24. package/dist/components/kanban-board/KanbanBoardCardDialog.js +120 -0
  25. package/dist/components/kanban-board/KanbanBoardColumn.d.ts +14 -0
  26. package/dist/components/kanban-board/KanbanBoardColumn.js +129 -0
  27. package/dist/components/kanban-board/kanbanBoardClasses.d.ts +47 -0
  28. package/dist/components/kanban-board/kanbanBoardClasses.js +18 -0
  29. package/dist/components/password-strength-meter/PasswordStrengthMeter.js +27 -27
  30. package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.js +48 -48
  31. package/dist/components/radial-tree-chart/RadialTreeChart.js +173 -173
  32. package/dist/components/rich-text-editor/RichTextEditor.js +32 -32
  33. package/dist/components/rich-text-editor/RichTextEditorColorPicker.js +20 -20
  34. package/dist/components/rich-text-editor/RichTextEditorEmojiPicker.js +12 -12
  35. package/dist/components/rich-text-editor/RichTextEditorImageDialog.js +11 -11
  36. package/dist/components/rich-text-editor/RichTextEditorLinkDialog.js +11 -11
  37. package/dist/components/rich-text-editor/RichTextEditorMarkdownDialog.js +14 -14
  38. package/dist/components/rich-text-editor/RichTextEditorMentionList.js +14 -14
  39. package/dist/components/rich-text-editor/RichTextEditorTableMenu.js +28 -28
  40. package/dist/components/rich-text-editor/RichTextEditorToolbar.js +35 -35
  41. package/dist/components/sql-editor/SqlEditor.js +24 -24
  42. package/dist/components/sql-editor/SqlEditorContent.js +16 -16
  43. package/dist/components/sql-editor/SqlEditorHistoryMenu.js +15 -15
  44. package/dist/components/sql-editor/SqlEditorToolbar.js +21 -21
  45. package/dist/components/sunburst-chart/SunburstChart.js +126 -126
  46. package/dist/components/tag-selection/TagSelection.js +18 -18
  47. package/dist/components/tag-selection/TagSelectionAutocomplete.js +120 -120
  48. package/dist/components/tag-selection/TagSelectionSelectedTags.js +10 -10
  49. package/dist/index.cjs +2 -2
  50. package/dist/index.d.cts +3 -0
  51. package/dist/index.d.ts +3 -0
  52. package/dist/index.js +38 -35
  53. package/package.json +9 -2
@@ -2,8 +2,8 @@ import { muiTsStateClasses as e } from "../../utils/muiTsClasses.js";
2
2
  import { colorPickerClasses as t } from "./colorPickerClasses.js";
3
3
  import { clamp as n, hexToRgba as r, hslaToHsva as i, hsvaToHsla as a, hsvaToRgba as o, parseColorString as s, rgbaToHex as c, rgbaToHsva as l } from "./util/colorConversion.util.js";
4
4
  import { DEFAULT_COLOR_PICKER_TRANSLATION as u } from "./ColorPicker.types.js";
5
- import { useEffect as d, useRef as f, useState as p } from "react";
6
- import { Box as m, IconButton as ee, MenuItem as h, Select as te, TextField as g, Tooltip as ne, Typography as re, useTheme as ie } from "@mui/material";
5
+ import { Box as d, IconButton as ee, MenuItem as f, Select as te, TextField as p, Tooltip as ne, Typography as re, useTheme as ie } from "@mui/material";
6
+ import { useEffect as m, useRef as h, useState as g } from "react";
7
7
  import { jsx as _, jsxs as v } from "react/jsx-runtime";
8
8
  import ae from "@mui/icons-material/Colorize";
9
9
  //#region src/components/color-picker/ColorPicker.tsx
@@ -33,21 +33,21 @@ function b(e) {
33
33
  };
34
34
  }
35
35
  function x({ value: e, onCommit: t, min: r, max: i, label: a, disabled: o, size: s, onBlurExtra: c, fullWidth: l }) {
36
- let [u, f] = p(String(Math.round(e)));
37
- return d(() => {
38
- f(String(Math.round(e)));
39
- }, [e]), /* @__PURE__ */ _(g, {
36
+ let [u, d] = g(String(Math.round(e)));
37
+ return m(() => {
38
+ d(String(Math.round(e)));
39
+ }, [e]), /* @__PURE__ */ _(p, {
40
40
  size: s,
41
41
  value: u,
42
42
  disabled: o,
43
43
  onChange: (e) => {
44
44
  let a = e.target.value;
45
- f(a);
45
+ d(a);
46
46
  let o = Number(a);
47
47
  a.trim() !== "" && !Number.isNaN(o) && t(n(o, r, i));
48
48
  },
49
49
  onBlur: () => {
50
- f(String(Math.round(e))), c?.();
50
+ d(String(Math.round(e))), c?.();
51
51
  },
52
52
  slotProps: { htmlInput: {
53
53
  "aria-label": a,
@@ -62,11 +62,11 @@ function x({ value: e, onCommit: t, min: r, max: i, label: a, disabled: o, size:
62
62
  }
63
63
  });
64
64
  }
65
- function oe({ value: c, onChange: oe, onChangeCommitted: S, defaultFormat: se = "hex", format: C, onFormatChange: ce, showAlpha: w = !0, showEyeDropper: le = !0, showSliderSection: ue = !0, showInputSection: de = !0, savedColors: T, disabled: E = !1, colorGradientSize: D = "medium", inputSize: O = "medium", width: fe = 280, name: k, translation: pe }) {
66
- let A = ie(), j = {
65
+ function S({ value: c, onChange: S, onChangeCommitted: C, defaultFormat: oe = "hex", format: w, onFormatChange: se, showAlpha: T = !0, showEyeDropper: ce = !0, showSliderSection: le = !0, showInputSection: ue = !0, savedColors: E, disabled: D = !1, colorGradientSize: O = "medium", inputSize: k = "medium", width: de = 280, name: A, translation: fe }) {
66
+ let j = ie(), M = {
67
67
  ...u,
68
- ...pe
69
- }, [M, N] = p(() => {
68
+ ...fe
69
+ }, [N, P] = g(() => {
70
70
  let e = s(c);
71
71
  return e ? l(e) : {
72
72
  h: 0,
@@ -74,225 +74,225 @@ function oe({ value: c, onChange: oe, onChangeCommitted: S, defaultFormat: se =
74
74
  v: 0,
75
75
  a: 1
76
76
  };
77
- }), [me, he] = p(se), P = C ?? me, [ge, F] = p(c);
78
- if (ge !== c) {
79
- F(c);
77
+ }), [pe, me] = g(oe), F = w ?? pe, [he, I] = g(c);
78
+ if (he !== c) {
79
+ I(c);
80
80
  let e = s(c);
81
- e && N(l(e));
81
+ e && P(l(e));
82
82
  }
83
- let { hex: _e, info: ve } = b(M), I = _e.slice(0, 7), [ye, L] = p(I);
84
- d(() => {
85
- L(I);
86
- }, [I]);
87
- let R = f(null), z = f(null), B = f(null), V = (e) => {
88
- N(e);
83
+ let { hex: ge, info: _e } = b(N), L = ge.slice(0, 7), [ve, R] = g(L);
84
+ m(() => {
85
+ R(L);
86
+ }, [L]);
87
+ let z = h(null), B = h(null), V = h(null), H = (e) => {
88
+ P(e);
89
89
  let t = b(e);
90
- F(t.hex), oe(t.hex, t.info);
91
- }, H = (e) => {
92
- if (V(e), S) {
90
+ I(t.hex), S(t.hex, t.info);
91
+ }, U = (e) => {
92
+ if (H(e), C) {
93
93
  let t = b(e);
94
- S(t.hex, t.info);
94
+ C(t.hex, t.info);
95
95
  }
96
- }, U = () => {
97
- if (!S) return;
98
- let e = b(M);
99
- S(e.hex, e.info);
100
- }, be = D === "small" ? 130 : 160, W = D === "small" ? 20 : 24, G = D === "small" ? 10 : 12, K = D === "small" ? 13 : 16, q = (e) => {
101
- if (E || !R.current) return;
102
- let t = R.current.getBoundingClientRect(), r = n(e.clientX - t.left, 0, t.width), i = n(e.clientY - t.top, 0, t.height);
103
- V({
104
- ...M,
96
+ }, W = () => {
97
+ if (!C) return;
98
+ let e = b(N);
99
+ C(e.hex, e.info);
100
+ }, ye = O === "small" ? 130 : 160, G = O === "small" ? 20 : 24, K = O === "small" ? 10 : 12, q = O === "small" ? 13 : 16, J = (e) => {
101
+ if (D || !z.current) return;
102
+ let t = z.current.getBoundingClientRect(), r = n(e.clientX - t.left, 0, t.width), i = n(e.clientY - t.top, 0, t.height);
103
+ H({
104
+ ...N,
105
105
  s: r / t.width * 100,
106
106
  v: 100 - i / t.height * 100
107
107
  });
108
- }, J = (e) => {
109
- if (E || !z.current) return;
110
- let t = z.current.getBoundingClientRect(), r = n(e.clientX - t.left, 0, t.width);
111
- V({
112
- ...M,
113
- h: r / t.width * 360
114
- });
115
108
  }, Y = (e) => {
116
- if (E || !B.current) return;
109
+ if (D || !B.current) return;
117
110
  let t = B.current.getBoundingClientRect(), r = n(e.clientX - t.left, 0, t.width);
118
- V({
119
- ...M,
111
+ H({
112
+ ...N,
113
+ h: r / t.width * 360
114
+ });
115
+ }, X = (e) => {
116
+ if (D || !V.current) return;
117
+ let t = V.current.getBoundingClientRect(), r = n(e.clientX - t.left, 0, t.width);
118
+ H({
119
+ ...N,
120
120
  a: r / t.width
121
121
  });
122
- }, xe = typeof window < "u" && !!window.EyeDropper, Se = async () => {
123
- if (!(E || !window.EyeDropper)) try {
122
+ }, be = typeof window < "u" && !!window.EyeDropper, xe = async () => {
123
+ if (!(D || !window.EyeDropper)) try {
124
124
  let e = r((await new window.EyeDropper().open()).sRGBHex);
125
- e && H(l({
125
+ e && U(l({
126
126
  ...e,
127
- a: M.a
127
+ a: N.a
128
128
  }));
129
129
  } catch {}
130
- }, Ce = (e) => {
131
- C === void 0 && he(e), ce?.(e);
132
- }, X = o(M), Z = a(M), Q = I, $ = {
130
+ }, Se = (e) => {
131
+ w === void 0 && me(e), se?.(e);
132
+ }, Z = o(N), Q = a(N), $ = L, Ce = {
133
133
  backgroundImage: "linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%)",
134
134
  backgroundSize: "8px 8px",
135
135
  backgroundPosition: "0 0, 0 4px, 4px -4px, -4px 0px"
136
136
  };
137
- return /* @__PURE__ */ v(m, {
137
+ return /* @__PURE__ */ v(d, {
138
138
  sx: {
139
- width: fe,
140
- opacity: E ? .6 : 1,
139
+ width: de,
140
+ opacity: D ? .6 : 1,
141
141
  display: "flex",
142
142
  flexDirection: "column",
143
143
  gap: 1
144
144
  },
145
- className: [t.root, E && e.disabled].filter(Boolean).join(" "),
145
+ className: [t.root, D && e.disabled].filter(Boolean).join(" "),
146
146
  children: [
147
- /* @__PURE__ */ _(m, {
148
- ref: R,
147
+ /* @__PURE__ */ _(d, {
148
+ ref: z,
149
149
  role: "slider",
150
- tabIndex: E ? -1 : 0,
151
- "aria-label": j.gradientAreaLabel,
152
- "aria-valuetext": `${Math.round(M.s)}, ${Math.round(M.v)}`,
150
+ tabIndex: D ? -1 : 0,
151
+ "aria-label": M.gradientAreaLabel,
152
+ "aria-valuetext": `${Math.round(N.s)}, ${Math.round(N.v)}`,
153
153
  onPointerDown: (e) => {
154
- e.currentTarget.setPointerCapture?.(e.pointerId), q(e);
154
+ e.currentTarget.setPointerCapture?.(e.pointerId), J(e);
155
155
  },
156
156
  onPointerMove: (e) => {
157
- e.buttons === 1 && q(e);
157
+ e.buttons === 1 && J(e);
158
158
  },
159
- onPointerUp: U,
159
+ onPointerUp: W,
160
160
  className: t.gradientArea,
161
161
  sx: {
162
162
  position: "relative",
163
163
  width: "100%",
164
- height: be,
165
- borderRadius: `${A.shape.borderRadius}px`,
166
- border: `1px solid ${A.palette.divider}`,
167
- cursor: E ? "default" : "crosshair",
164
+ height: ye,
165
+ borderRadius: `${j.shape.borderRadius}px`,
166
+ border: `1px solid ${j.palette.divider}`,
167
+ cursor: D ? "default" : "crosshair",
168
168
  touchAction: "none",
169
- background: `linear-gradient(to top, #000, rgba(0,0,0,0)), linear-gradient(to right, #fff, hsl(${M.h}, 100%, 50%))`
169
+ background: `linear-gradient(to top, #000, rgba(0,0,0,0)), linear-gradient(to right, #fff, hsl(${N.h}, 100%, 50%))`
170
170
  },
171
- children: /* @__PURE__ */ _(m, {
171
+ children: /* @__PURE__ */ _(d, {
172
172
  className: t.gradientThumb,
173
173
  sx: {
174
174
  position: "absolute",
175
- left: y(M.s, K),
176
- top: y(100 - M.v, K),
177
- width: K,
178
- height: K,
175
+ left: y(N.s, q),
176
+ top: y(100 - N.v, q),
177
+ width: q,
178
+ height: q,
179
179
  borderRadius: "50%",
180
180
  border: "2px solid #fff",
181
181
  boxShadow: "0 0 0 1px rgba(0,0,0,0.3)",
182
182
  transform: "translate(-50%, -50%)",
183
183
  pointerEvents: "none",
184
- backgroundColor: Q
184
+ backgroundColor: $
185
185
  }
186
186
  })
187
187
  }),
188
- ue && /* @__PURE__ */ v(m, {
188
+ le && /* @__PURE__ */ v(d, {
189
189
  sx: {
190
190
  display: "flex",
191
191
  gap: 1,
192
192
  alignItems: "center"
193
193
  },
194
194
  className: t.sliderSection,
195
- children: [le && xe && /* @__PURE__ */ _(ne, {
196
- title: j.eyeDropperLabel,
195
+ children: [ce && be && /* @__PURE__ */ _(ne, {
196
+ title: M.eyeDropperLabel,
197
197
  children: /* @__PURE__ */ _("span", { children: /* @__PURE__ */ _(ee, {
198
198
  size: "small",
199
- onClick: Se,
200
- disabled: E,
201
- "aria-label": j.eyeDropperLabel,
199
+ onClick: xe,
200
+ disabled: D,
201
+ "aria-label": M.eyeDropperLabel,
202
202
  children: /* @__PURE__ */ _(ae, { fontSize: "small" })
203
203
  }) })
204
- }), /* @__PURE__ */ v(m, {
204
+ }), /* @__PURE__ */ v(d, {
205
205
  sx: {
206
206
  flex: 1,
207
207
  display: "flex",
208
208
  flexDirection: "column",
209
209
  gap: .75
210
210
  },
211
- children: [/* @__PURE__ */ _(m, {
212
- ref: z,
211
+ children: [/* @__PURE__ */ _(d, {
212
+ ref: B,
213
213
  role: "slider",
214
- tabIndex: E ? -1 : 0,
215
- "aria-label": j.hueSliderLabel,
214
+ tabIndex: D ? -1 : 0,
215
+ "aria-label": M.hueSliderLabel,
216
216
  "aria-valuemin": 0,
217
217
  "aria-valuemax": 360,
218
- "aria-valuenow": Math.round(M.h),
218
+ "aria-valuenow": Math.round(N.h),
219
219
  onPointerDown: (e) => {
220
- e.currentTarget.setPointerCapture?.(e.pointerId), J(e);
220
+ e.currentTarget.setPointerCapture?.(e.pointerId), Y(e);
221
221
  },
222
222
  onPointerMove: (e) => {
223
- e.buttons === 1 && J(e);
223
+ e.buttons === 1 && Y(e);
224
224
  },
225
- onPointerUp: U,
225
+ onPointerUp: W,
226
226
  className: t.hueSlider,
227
227
  sx: {
228
228
  position: "relative",
229
229
  width: "100%",
230
- height: G,
231
- borderRadius: G,
232
- cursor: E ? "default" : "pointer",
230
+ height: K,
231
+ borderRadius: K,
232
+ cursor: D ? "default" : "pointer",
233
233
  touchAction: "none",
234
234
  background: "linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red)"
235
235
  },
236
- children: /* @__PURE__ */ _(m, { sx: {
236
+ children: /* @__PURE__ */ _(d, { sx: {
237
237
  position: "absolute",
238
- left: y(M.h / 360 * 100, K),
238
+ left: y(N.h / 360 * 100, q),
239
239
  top: "50%",
240
- width: K,
241
- height: K,
240
+ width: q,
241
+ height: q,
242
242
  borderRadius: "50%",
243
243
  border: "2px solid #fff",
244
244
  boxShadow: "0 0 0 1px rgba(0,0,0,0.3)",
245
245
  transform: "translate(-50%, -50%)",
246
246
  pointerEvents: "none",
247
- backgroundColor: `hsl(${M.h}, 100%, 50%)`
247
+ backgroundColor: `hsl(${N.h}, 100%, 50%)`
248
248
  } })
249
- }), w && /* @__PURE__ */ v(m, {
250
- ref: B,
249
+ }), T && /* @__PURE__ */ v(d, {
250
+ ref: V,
251
251
  role: "slider",
252
- tabIndex: E ? -1 : 0,
253
- "aria-label": j.alphaFieldLabel,
252
+ tabIndex: D ? -1 : 0,
253
+ "aria-label": M.alphaFieldLabel,
254
254
  "aria-valuemin": 0,
255
255
  "aria-valuemax": 100,
256
- "aria-valuenow": Math.round(M.a * 100),
256
+ "aria-valuenow": Math.round(N.a * 100),
257
257
  onPointerDown: (e) => {
258
- e.currentTarget.setPointerCapture?.(e.pointerId), Y(e);
258
+ e.currentTarget.setPointerCapture?.(e.pointerId), X(e);
259
259
  },
260
260
  onPointerMove: (e) => {
261
- e.buttons === 1 && Y(e);
261
+ e.buttons === 1 && X(e);
262
262
  },
263
- onPointerUp: U,
263
+ onPointerUp: W,
264
264
  className: t.alphaSlider,
265
265
  sx: {
266
266
  position: "relative",
267
267
  width: "100%",
268
- height: G,
269
- borderRadius: G,
270
- cursor: E ? "default" : "pointer",
268
+ height: K,
269
+ borderRadius: K,
270
+ cursor: D ? "default" : "pointer",
271
271
  touchAction: "none",
272
- ...$
272
+ ...Ce
273
273
  },
274
- children: [/* @__PURE__ */ _(m, { sx: {
274
+ children: [/* @__PURE__ */ _(d, { sx: {
275
275
  position: "absolute",
276
276
  inset: 0,
277
- borderRadius: G,
278
- background: `linear-gradient(to right, transparent, ${Q})`
279
- } }), /* @__PURE__ */ _(m, { sx: {
277
+ borderRadius: K,
278
+ background: `linear-gradient(to right, transparent, ${$})`
279
+ } }), /* @__PURE__ */ _(d, { sx: {
280
280
  position: "absolute",
281
- left: y(M.a * 100, K),
281
+ left: y(N.a * 100, q),
282
282
  top: "50%",
283
- width: K,
284
- height: K,
283
+ width: q,
284
+ height: q,
285
285
  borderRadius: "50%",
286
286
  border: "2px solid #fff",
287
287
  boxShadow: "0 0 0 1px rgba(0,0,0,0.3)",
288
288
  transform: "translate(-50%, -50%)",
289
289
  pointerEvents: "none",
290
- backgroundColor: Q
290
+ backgroundColor: $
291
291
  } })]
292
292
  })]
293
293
  })]
294
294
  }),
295
- de && /* @__PURE__ */ v(m, {
295
+ ue && /* @__PURE__ */ v(d, {
296
296
  sx: {
297
297
  display: "flex",
298
298
  flexDirection: "column",
@@ -300,7 +300,7 @@ function oe({ value: c, onChange: oe, onChangeCommitted: S, defaultFormat: se =
300
300
  },
301
301
  className: t.inputSection,
302
302
  children: [
303
- /* @__PURE__ */ v(m, {
303
+ /* @__PURE__ */ v(d, {
304
304
  sx: {
305
305
  display: "flex",
306
306
  gap: .75,
@@ -308,181 +308,181 @@ function oe({ value: c, onChange: oe, onChangeCommitted: S, defaultFormat: se =
308
308
  },
309
309
  children: [
310
310
  /* @__PURE__ */ v(te, {
311
- size: O,
312
- value: P,
313
- "aria-label": j.formatLabel,
314
- disabled: E,
315
- onChange: (e) => Ce(e.target.value),
311
+ size: k,
312
+ value: F,
313
+ "aria-label": M.formatLabel,
314
+ disabled: D,
315
+ onChange: (e) => Se(e.target.value),
316
316
  sx: {
317
317
  minWidth: 80,
318
318
  flexShrink: 0
319
319
  },
320
320
  children: [
321
- /* @__PURE__ */ _(h, {
321
+ /* @__PURE__ */ _(f, {
322
322
  value: "hex",
323
323
  children: "HEX"
324
324
  }),
325
- /* @__PURE__ */ _(h, {
325
+ /* @__PURE__ */ _(f, {
326
326
  value: "rgb",
327
327
  children: "RGB"
328
328
  }),
329
- /* @__PURE__ */ _(h, {
329
+ /* @__PURE__ */ _(f, {
330
330
  value: "hsl",
331
331
  children: "HSL"
332
332
  })
333
333
  ]
334
334
  }),
335
- P === "hex" && /* @__PURE__ */ _(g, {
336
- size: O,
337
- value: ye,
338
- disabled: E,
335
+ F === "hex" && /* @__PURE__ */ _(p, {
336
+ size: k,
337
+ value: ve,
338
+ disabled: D,
339
339
  onChange: (e) => {
340
340
  let t = e.target.value;
341
- L(t);
341
+ R(t);
342
342
  let n = r(t);
343
- n && V(l({
343
+ n && H(l({
344
344
  ...n,
345
- a: M.a
345
+ a: N.a
346
346
  }));
347
347
  },
348
348
  onBlur: () => {
349
- L(I), U();
349
+ R(L), W();
350
350
  },
351
- slotProps: { htmlInput: { "aria-label": j.hexFieldLabel } },
351
+ slotProps: { htmlInput: { "aria-label": M.hexFieldLabel } },
352
352
  sx: {
353
353
  flex: 1,
354
354
  minWidth: 0
355
355
  }
356
356
  }),
357
- P !== "hex" && /* @__PURE__ */ _(m, { sx: { flex: 1 } }),
358
- w && /* @__PURE__ */ _(x, {
359
- label: j.alphaFieldLabel,
360
- value: Math.round(M.a * 100),
357
+ F !== "hex" && /* @__PURE__ */ _(d, { sx: { flex: 1 } }),
358
+ T && /* @__PURE__ */ _(x, {
359
+ label: M.alphaFieldLabel,
360
+ value: Math.round(N.a * 100),
361
361
  min: 0,
362
362
  max: 100,
363
- disabled: E,
364
- size: O,
365
- onBlurExtra: U,
366
- onCommit: (e) => V({
367
- ...M,
363
+ disabled: D,
364
+ size: k,
365
+ onBlurExtra: W,
366
+ onCommit: (e) => H({
367
+ ...N,
368
368
  a: e / 100
369
369
  })
370
370
  })
371
371
  ]
372
372
  }),
373
- P === "rgb" && /* @__PURE__ */ v(m, {
373
+ F === "rgb" && /* @__PURE__ */ v(d, {
374
374
  sx: {
375
375
  display: "flex",
376
376
  gap: .75
377
377
  },
378
378
  children: [
379
379
  /* @__PURE__ */ _(x, {
380
- label: j.redLabel,
381
- value: X.r,
380
+ label: M.redLabel,
381
+ value: Z.r,
382
382
  min: 0,
383
383
  max: 255,
384
- disabled: E,
385
- size: O,
386
- onBlurExtra: U,
384
+ disabled: D,
385
+ size: k,
386
+ onBlurExtra: W,
387
387
  fullWidth: !0,
388
- onCommit: (e) => V(l({
388
+ onCommit: (e) => H(l({
389
389
  r: e,
390
- g: X.g,
391
- b: X.b,
392
- a: M.a
390
+ g: Z.g,
391
+ b: Z.b,
392
+ a: N.a
393
393
  }))
394
394
  }),
395
395
  /* @__PURE__ */ _(x, {
396
- label: j.greenLabel,
397
- value: X.g,
396
+ label: M.greenLabel,
397
+ value: Z.g,
398
398
  min: 0,
399
399
  max: 255,
400
- disabled: E,
401
- size: O,
402
- onBlurExtra: U,
400
+ disabled: D,
401
+ size: k,
402
+ onBlurExtra: W,
403
403
  fullWidth: !0,
404
- onCommit: (e) => V(l({
405
- r: X.r,
404
+ onCommit: (e) => H(l({
405
+ r: Z.r,
406
406
  g: e,
407
- b: X.b,
408
- a: M.a
407
+ b: Z.b,
408
+ a: N.a
409
409
  }))
410
410
  }),
411
411
  /* @__PURE__ */ _(x, {
412
- label: j.blueLabel,
413
- value: X.b,
412
+ label: M.blueLabel,
413
+ value: Z.b,
414
414
  min: 0,
415
415
  max: 255,
416
- disabled: E,
417
- size: O,
418
- onBlurExtra: U,
416
+ disabled: D,
417
+ size: k,
418
+ onBlurExtra: W,
419
419
  fullWidth: !0,
420
- onCommit: (e) => V(l({
421
- r: X.r,
422
- g: X.g,
420
+ onCommit: (e) => H(l({
421
+ r: Z.r,
422
+ g: Z.g,
423
423
  b: e,
424
- a: M.a
424
+ a: N.a
425
425
  }))
426
426
  })
427
427
  ]
428
428
  }),
429
- P === "hsl" && /* @__PURE__ */ v(m, {
429
+ F === "hsl" && /* @__PURE__ */ v(d, {
430
430
  sx: {
431
431
  display: "flex",
432
432
  gap: .75
433
433
  },
434
434
  children: [
435
435
  /* @__PURE__ */ _(x, {
436
- label: j.hueFieldLabel,
437
- value: Z.h,
436
+ label: M.hueFieldLabel,
437
+ value: Q.h,
438
438
  min: 0,
439
439
  max: 360,
440
- disabled: E,
441
- size: O,
442
- onBlurExtra: U,
440
+ disabled: D,
441
+ size: k,
442
+ onBlurExtra: W,
443
443
  fullWidth: !0,
444
- onCommit: (e) => V({
445
- ...M,
444
+ onCommit: (e) => H({
445
+ ...N,
446
446
  h: e
447
447
  })
448
448
  }),
449
449
  /* @__PURE__ */ _(x, {
450
- label: j.saturationFieldLabel,
451
- value: Z.s,
450
+ label: M.saturationFieldLabel,
451
+ value: Q.s,
452
452
  min: 0,
453
453
  max: 100,
454
- disabled: E,
455
- size: O,
456
- onBlurExtra: U,
454
+ disabled: D,
455
+ size: k,
456
+ onBlurExtra: W,
457
457
  fullWidth: !0,
458
- onCommit: (e) => V(i({
459
- h: Z.h,
458
+ onCommit: (e) => H(i({
459
+ h: Q.h,
460
460
  s: e,
461
- l: Z.l,
462
- a: Z.a
461
+ l: Q.l,
462
+ a: Q.a
463
463
  }))
464
464
  }),
465
465
  /* @__PURE__ */ _(x, {
466
- label: j.lightnessFieldLabel,
467
- value: Z.l,
466
+ label: M.lightnessFieldLabel,
467
+ value: Q.l,
468
468
  min: 0,
469
469
  max: 100,
470
- disabled: E,
471
- size: O,
472
- onBlurExtra: U,
470
+ disabled: D,
471
+ size: k,
472
+ onBlurExtra: W,
473
473
  fullWidth: !0,
474
- onCommit: (e) => V(i({
475
- h: Z.h,
476
- s: Z.s,
474
+ onCommit: (e) => H(i({
475
+ h: Q.h,
476
+ s: Q.s,
477
477
  l: e,
478
- a: Z.a
478
+ a: Q.a
479
479
  }))
480
480
  })
481
481
  ]
482
482
  })
483
483
  ]
484
484
  }),
485
- T && T.length > 0 && /* @__PURE__ */ v(m, {
485
+ E && E.length > 0 && /* @__PURE__ */ v(d, {
486
486
  className: t.savedColors,
487
487
  children: [/* @__PURE__ */ _(re, {
488
488
  variant: "caption",
@@ -491,37 +491,37 @@ function oe({ value: c, onChange: oe, onChangeCommitted: S, defaultFormat: se =
491
491
  display: "block",
492
492
  mb: .5
493
493
  },
494
- children: j.savedColorsLabel
495
- }), /* @__PURE__ */ _(m, {
494
+ children: M.savedColorsLabel
495
+ }), /* @__PURE__ */ _(d, {
496
496
  sx: {
497
497
  display: "flex",
498
498
  flexWrap: "wrap",
499
499
  gap: .75
500
500
  },
501
501
  className: t.swatchList,
502
- children: T.map((e, n) => /* @__PURE__ */ _(m, {
502
+ children: E.map((e, n) => /* @__PURE__ */ _(d, {
503
503
  component: "button",
504
504
  type: "button",
505
- disabled: E,
505
+ disabled: D,
506
506
  "aria-label": e,
507
507
  onClick: () => {
508
508
  let t = s(e);
509
- t && H(l(t));
509
+ t && U(l(t));
510
510
  },
511
511
  className: t.swatch,
512
512
  sx: {
513
- width: W,
514
- height: W,
513
+ width: G,
514
+ height: G,
515
515
  p: 0,
516
516
  borderRadius: .5,
517
- border: `1px solid ${A.palette.divider}`,
518
- cursor: E ? "default" : "pointer",
517
+ border: `1px solid ${j.palette.divider}`,
518
+ cursor: D ? "default" : "pointer",
519
519
  flexShrink: 0,
520
- ...$,
520
+ ...Ce,
521
521
  backgroundSize: "6px 6px",
522
- "&:hover": E ? void 0 : { borderColor: A.palette.primary.main }
522
+ "&:hover": D ? void 0 : { borderColor: j.palette.primary.main }
523
523
  },
524
- children: /* @__PURE__ */ _(m, { sx: {
524
+ children: /* @__PURE__ */ _(d, { sx: {
525
525
  width: "100%",
526
526
  height: "100%",
527
527
  borderRadius: .5,
@@ -530,13 +530,13 @@ function oe({ value: c, onChange: oe, onChangeCommitted: S, defaultFormat: se =
530
530
  }, `${e}-${n}`))
531
531
  })]
532
532
  }),
533
- k && /* @__PURE__ */ _("input", {
533
+ A && /* @__PURE__ */ _("input", {
534
534
  type: "hidden",
535
- name: k,
536
- value: ve.hex
535
+ name: A,
536
+ value: _e.hex
537
537
  })
538
538
  ]
539
539
  });
540
540
  }
541
541
  //#endregion
542
- export { oe as ColorPicker };
542
+ export { S as ColorPicker };