@carto/meridian-ds 1.4.1 → 1.4.2-alpha-forwarding-props.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 (62) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/dist/{Alert-Cn0nq6aq.js → Alert-1b84B18a.js} +1 -1
  3. package/dist/{Alert-B2JgFj6Y.cjs → Alert-BbMbtaix.cjs} +1 -1
  4. package/dist/{MenuItem-vbfSlKyV.js → MenuItem-Cd34y6F3.js} +41 -15
  5. package/dist/MenuItem-Dbss-WG1.cjs +1 -0
  6. package/dist/{TablePaginationActions-EC4ynZRa.js → TablePaginationActions-EDxBCxpG.js} +1 -0
  7. package/dist/TablePaginationActions-V8ultBUz.cjs +9 -0
  8. package/dist/components/index.cjs +1 -1
  9. package/dist/components/index.js +1113 -1005
  10. package/dist/theme/index.cjs +1 -1
  11. package/dist/theme/index.js +42 -36
  12. package/dist/types/components/atoms/Button.d.ts.map +1 -1
  13. package/dist/types/components/atoms/IconButton.d.ts.map +1 -1
  14. package/dist/types/components/atoms/Typography.d.ts.map +1 -1
  15. package/dist/types/components/molecules/Autocomplete/Autocomplete.d.ts.map +1 -1
  16. package/dist/types/components/molecules/Autocomplete/CreatableAutocomplete.d.ts +1 -1
  17. package/dist/types/components/molecules/Autocomplete/CreatableAutocomplete.d.ts.map +1 -1
  18. package/dist/types/components/molecules/Autocomplete/ListBoxWithFilter.d.ts +2 -0
  19. package/dist/types/components/molecules/Autocomplete/ListBoxWithFilter.d.ts.map +1 -1
  20. package/dist/types/components/molecules/Autocomplete/MultipleAutocomplete.d.ts +1 -1
  21. package/dist/types/components/molecules/Autocomplete/MultipleAutocomplete.d.ts.map +1 -1
  22. package/dist/types/components/molecules/Autocomplete/useAutocompleteRenderOption.d.ts.map +1 -1
  23. package/dist/types/components/molecules/Autocomplete/useMultipleAutocomplete.d.ts +2 -2
  24. package/dist/types/components/molecules/Autocomplete/useMultipleAutocomplete.d.ts.map +1 -1
  25. package/dist/types/components/molecules/Autocomplete/utils.d.ts +1 -0
  26. package/dist/types/components/molecules/Autocomplete/utils.d.ts.map +1 -1
  27. package/dist/types/components/molecules/Menu/Menu.d.ts +2 -1
  28. package/dist/types/components/molecules/Menu/Menu.d.ts.map +1 -1
  29. package/dist/types/components/molecules/Menu/MenuItem.d.ts +2 -1
  30. package/dist/types/components/molecules/Menu/MenuItem.d.ts.map +1 -1
  31. package/dist/types/components/molecules/Menu/MenuItemFilter.d.ts +9 -0
  32. package/dist/types/components/molecules/Menu/MenuItemFilter.d.ts.map +1 -0
  33. package/dist/types/components/molecules/Menu/MenuList.d.ts +2 -1
  34. package/dist/types/components/molecules/Menu/MenuList.d.ts.map +1 -1
  35. package/dist/types/components/molecules/Menu/index.d.ts +2 -2
  36. package/dist/types/components/molecules/Menu/index.d.ts.map +1 -1
  37. package/dist/types/components/organisms/DatePickers/DatePicker.d.ts +1 -1
  38. package/dist/types/components/organisms/DatePickers/DatePicker.d.ts.map +1 -1
  39. package/dist/types/components/organisms/DatePickers/DateRangePicker.d.ts +1 -1
  40. package/dist/types/components/organisms/DatePickers/DateRangePicker.d.ts.map +1 -1
  41. package/dist/types/components/organisms/DatePickers/DateTimePicker.d.ts +1 -1
  42. package/dist/types/components/organisms/DatePickers/DateTimePicker.d.ts.map +1 -1
  43. package/dist/types/components/organisms/DatePickers/PickersDay.d.ts.map +1 -1
  44. package/dist/types/components/organisms/DatePickers/TimePicker.d.ts +1 -1
  45. package/dist/types/components/organisms/DatePickers/TimePicker.d.ts.map +1 -1
  46. package/dist/types/components/organisms/DatePickers/types.d.ts +2 -0
  47. package/dist/types/components/organisms/DatePickers/types.d.ts.map +1 -1
  48. package/dist/types/components/organisms/Dialog/Dialog.d.ts +1 -1
  49. package/dist/types/components/organisms/Dialog/Dialog.d.ts.map +1 -1
  50. package/dist/types/components/organisms/Dialog/DialogConfirmation.d.ts.map +1 -1
  51. package/dist/types/components/organisms/Dialog/DialogContent.d.ts.map +1 -1
  52. package/dist/types/components/organisms/Dialog/DialogFooter.d.ts.map +1 -1
  53. package/dist/types/components/organisms/Dialog/DialogHeader.d.ts.map +1 -1
  54. package/dist/types/theme/sections/components/data-display.d.ts.map +1 -1
  55. package/dist/types/theme/sections/components/forms.d.ts.map +1 -1
  56. package/dist/widgets/index.cjs +2 -2
  57. package/dist/widgets/index.js +3 -3
  58. package/package.json +1 -1
  59. package/dist/MenuItem-CuEx97RN.cjs +0 -1
  60. package/dist/TablePaginationActions-7wkkiCXh.cjs +0 -9
  61. package/dist/types/components/molecules/Menu/MenuFilter.d.ts +0 -8
  62. package/dist/types/components/molecules/Menu/MenuFilter.d.ts.map +0 -1
@@ -1,20 +1,20 @@
1
- import { jsx as i, jsxs as y, Fragment as j } from "react/jsx-runtime";
2
- import { forwardRef as O, useState as T, useEffect as E, useMemo as ut, useRef as U, Fragment as Rt, useImperativeHandle as Ft, useCallback as nt } from "react";
3
- import { styled as p, Box as v, Button as pt, CircularProgress as H, TextField as gt, InputAdornment as q, IconButton as F, Tooltip as W, Select as Ot, MenuItem as ft, FormControl as Lt, InputLabel as Wt, FormHelperText as ht, ToggleButtonGroup as Pt, Menu as Et, MenuList as Ht, Checkbox as z, Link as _t, ListItemText as mt, Autocomplete as Y, Divider as G, ListItemIcon as Gt, createFilterOptions as jt, Accordion as Nt, AccordionSummary as Vt, AccordionDetails as Ut, Avatar as qt, Snackbar as zt, Portal as Yt, Fade as Zt, Slide as bt, alpha as Jt, useTheme as N, Toolbar as Xt, AppBar as Kt, Paper as Qt, Dialog as te, DialogTitle as ee, Chip as ne, DialogContent as oe, DialogActions as ie } from "@mui/material";
4
- import { T as w, c as _, u as $, N as ot, A as re } from "../TablePaginationActions-EC4ynZRa.js";
5
- import { a as Po } from "../TablePaginationActions-EC4ynZRa.js";
6
- import { useIntl as R } from "react-intl";
7
- import { VisibilityOffOutlined as ae, VisibilityOutlined as le, Cancel as yt, AddCircleOutlineOutlined as ce, CloseOutlined as xt, MenuOutlined as se, HelpOutline as Z, TodayOutlined as de, Check as ue } from "@mui/icons-material";
8
- import { A as Mt } from "../Alert-Cn0nq6aq.js";
1
+ import { jsx as i, jsxs as y, Fragment as V } from "react/jsx-runtime";
2
+ import { forwardRef as T, useState as $, useEffect as _, useMemo as pt, useRef as Y, Fragment as Ot, useImperativeHandle as Lt, useCallback as nt } from "react";
3
+ import { styled as g, Box as v, Button as gt, CircularProgress as P, TextField as ft, InputAdornment as q, IconButton as W, Tooltip as H, Select as Wt, MenuItem as mt, FormControl as Et, InputLabel as Ht, FormHelperText as ht, ToggleButtonGroup as _t, Menu as Pt, MenuList as Gt, Link as jt, Checkbox as z, ListItemText as bt, Autocomplete as Z, Divider as j, ListItemIcon as Vt, createFilterOptions as Nt, Accordion as Ut, AccordionSummary as Yt, AccordionDetails as qt, Avatar as zt, Snackbar as Zt, Portal as Jt, Fade as Xt, Slide as xt, alpha as Kt, useTheme as N, Toolbar as Qt, AppBar as te, Paper as ee, Dialog as ne, DialogTitle as oe, Chip as ie, DialogContent as ae, DialogActions as re } from "@mui/material";
4
+ import { T as S, c as G, u as R, N as ot, A as le } from "../TablePaginationActions-EDxBCxpG.js";
5
+ import { a as Vo } from "../TablePaginationActions-EDxBCxpG.js";
6
+ import { useIntl as F } from "react-intl";
7
+ import { VisibilityOffOutlined as ce, VisibilityOutlined as se, Cancel as yt, AddCircleOutlineOutlined as de, CloseOutlined as Mt, MenuOutlined as ue, HelpOutline as J, TodayOutlined as pe, Check as ge } from "@mui/icons-material";
8
+ import { A as Ct } from "../Alert-1b84B18a.js";
9
9
  import "cartocolor";
10
- import { M as Ct } from "../MenuItem-vbfSlKyV.js";
11
- import { A as J } from "../ArrowDown-B1AG0MlL.js";
12
- import { DatePicker as pe } from "@mui/x-date-pickers/DatePicker";
13
- import { PickersDay as ge } from "@mui/x-date-pickers";
14
- import { TimePicker as fe } from "@mui/x-date-pickers/TimePicker";
15
- import { DateTimePicker as he } from "@mui/x-date-pickers/DateTimePicker";
16
- import me from "@mui/material/ClickAwayListener";
17
- const be = p(v)({
10
+ import { M as vt } from "../MenuItem-Cd34y6F3.js";
11
+ import { A as X } from "../ArrowDown-B1AG0MlL.js";
12
+ import { DatePicker as fe } from "@mui/x-date-pickers/DatePicker";
13
+ import { PickersDay as me } from "@mui/x-date-pickers";
14
+ import { TimePicker as he } from "@mui/x-date-pickers/TimePicker";
15
+ import { DateTimePicker as be } from "@mui/x-date-pickers/DateTimePicker";
16
+ import xe from "@mui/material/ClickAwayListener";
17
+ const ye = g(v)({
18
18
  position: "absolute",
19
19
  top: 0,
20
20
  left: 0,
@@ -23,52 +23,53 @@ const be = p(v)({
23
23
  display: "flex",
24
24
  alignItems: "center",
25
25
  justifyContent: "center"
26
- }), ye = p(v)({
26
+ }), Me = g(v)({
27
27
  visibility: "hidden",
28
28
  pointerEvents: "none"
29
29
  });
30
- function xe({
30
+ function Ce({
31
31
  children: t,
32
32
  loading: e,
33
33
  disabled: n,
34
34
  startIcon: o,
35
- endIcon: r,
36
- loadingPosition: a,
35
+ endIcon: a,
36
+ loadingPosition: r,
37
37
  ...l
38
- }, s) {
39
- const c = /* @__PURE__ */ i(H, { size: 18, color: "inherit" }), d = e && a === void 0, h = () => d ? /* @__PURE__ */ y(v, { sx: { position: "relative" }, children: [
40
- /* @__PURE__ */ i(be, { children: c }),
41
- /* @__PURE__ */ i(ye, { children: t })
42
- ] }) : t, u = (g) => {
43
- if (!d)
44
- return e && a !== void 0 ? a === g ? c : void 0 : g === "start" ? o : r;
38
+ }, c) {
39
+ const s = /* @__PURE__ */ i(P, { size: 18, color: "inherit" }), p = e && r === void 0, h = () => p ? /* @__PURE__ */ y(v, { sx: { position: "relative" }, children: [
40
+ /* @__PURE__ */ i(ye, { children: s }),
41
+ /* @__PURE__ */ i(Me, { children: t })
42
+ ] }) : t, d = (m) => {
43
+ if (!p)
44
+ return e && r !== void 0 ? r === m ? s : void 0 : m === "start" ? o : a;
45
45
  };
46
46
  return /* @__PURE__ */ i(
47
- pt,
47
+ gt,
48
48
  {
49
49
  disabled: e || n,
50
- startIcon: u("start"),
51
- endIcon: u("end"),
50
+ startIcon: d("start"),
51
+ endIcon: d("end"),
52
52
  ...l,
53
- ref: s,
54
- children: /* @__PURE__ */ i(w, { variant: "inherit", color: "inherit", noWrap: !0, component: "span", children: h() })
53
+ role: "button",
54
+ ref: c,
55
+ children: /* @__PURE__ */ i(S, { variant: "inherit", color: "inherit", noWrap: !0, component: "span", children: h() })
55
56
  }
56
57
  );
57
58
  }
58
- const uo = O(xe), Me = p(v)(({ theme: t }) => ({
59
+ const bo = T(Ce), ve = g(v)(({ theme: t }) => ({
59
60
  display: "flex",
60
61
  alignItems: "center",
61
62
  gap: t.spacing(0.5)
62
- })), Ce = p(w)(({ theme: t }) => ({
63
+ })), ke = g(S)(({ theme: t }) => ({
63
64
  ".Mui-disabled &": {
64
65
  color: t.palette.text.disabled
65
66
  }
66
- })), ve = p(v)(({ theme: t }) => ({
67
+ })), De = g(v)(({ theme: t }) => ({
67
68
  display: "flex",
68
69
  svg: {
69
- width: _,
70
- height: _,
71
- fontSize: _,
70
+ width: G,
71
+ height: G,
72
+ fontSize: G,
72
73
  path: {
73
74
  fill: t.palette.text.secondary,
74
75
  ".Mui-disabled &": {
@@ -77,16 +78,16 @@ const uo = O(xe), Me = p(v)(({ theme: t }) => ({
77
78
  }
78
79
  }
79
80
  }));
80
- function X({
81
+ function K({
81
82
  label: t,
82
83
  type: e,
83
84
  icon: n,
84
85
  inheritSize: o
85
86
  }) {
86
- return /* @__PURE__ */ y(Me, { children: [
87
+ return /* @__PURE__ */ y(ve, { children: [
87
88
  t,
88
89
  e && /* @__PURE__ */ i(
89
- Ce,
90
+ ke,
90
91
  {
91
92
  component: "span",
92
93
  variant: o ? "inherit" : "caption",
@@ -95,13 +96,13 @@ function X({
95
96
  children: e === "required" ? "(required)" : "(optional)"
96
97
  }
97
98
  ),
98
- n && /* @__PURE__ */ i(ve, { children: n })
99
+ n && /* @__PURE__ */ i(De, { children: n })
99
100
  ] });
100
101
  }
101
102
  function Ae({ InputProps: t, size: e = "small", ...n }, o) {
102
- const r = R(), a = $(r), [l, s] = T(!1);
103
+ const a = F(), r = R(a), [l, c] = $(!1);
103
104
  return /* @__PURE__ */ i(
104
- gt,
105
+ ft,
105
106
  {
106
107
  ...n,
107
108
  ref: o,
@@ -109,26 +110,26 @@ function Ae({ InputProps: t, size: e = "small", ...n }, o) {
109
110
  size: e,
110
111
  InputProps: {
111
112
  ...t,
112
- endAdornment: /* @__PURE__ */ i(q, { position: "end", children: /* @__PURE__ */ i(F, { size: e, onClick: () => s(!l), children: /* @__PURE__ */ i(
113
- W,
113
+ endAdornment: /* @__PURE__ */ i(q, { position: "end", children: /* @__PURE__ */ i(W, { size: e, onClick: () => c(!l), children: /* @__PURE__ */ i(
114
+ H,
114
115
  {
115
- title: a.formatMessage({
116
+ title: r.formatMessage({
116
117
  id: `c4r.form.${l ? "hidePassword" : "showPassword"}`
117
118
  }),
118
- children: l ? /* @__PURE__ */ i(ae, {}) : /* @__PURE__ */ i(le, {})
119
+ children: l ? /* @__PURE__ */ i(ce, {}) : /* @__PURE__ */ i(se, {})
119
120
  }
120
121
  ) }) })
121
122
  }
122
123
  }
123
124
  );
124
125
  }
125
- const po = O(Ae), V = {};
126
- function ke(t = "$lodash$") {
127
- V[t] || (V[t] = 0);
128
- const e = ++V[t];
126
+ const xo = T(Ae), U = {};
127
+ function Ie(t = "$lodash$") {
128
+ U[t] || (U[t] = 0);
129
+ const e = ++U[t];
129
130
  return t === "$lodash$" ? `${e}` : `${t}${e}`;
130
131
  }
131
- const De = p(Ot)(({ theme: t }) => ({
132
+ const we = g(Wt)(({ theme: t }) => ({
132
133
  "& .MuiInputAdornment-positionStart": {
133
134
  paddingLeft: t.spacing(2),
134
135
  "&.MuiInputAdornment-sizeSmall": {
@@ -144,62 +145,62 @@ const De = p(Ot)(({ theme: t }) => ({
144
145
  "&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple": {
145
146
  paddingRight: t.spacing(7)
146
147
  }
147
- })), Ie = p(ft)(() => ({
148
+ })), Be = g(mt)(() => ({
148
149
  display: "none"
149
150
  }));
150
- function Be({
151
+ function Se({
151
152
  children: t,
152
153
  placeholder: e,
153
154
  size: n = "small",
154
155
  displayEmpty: o,
155
- menuProps: r,
156
- inputProps: a,
156
+ menuProps: a,
157
+ inputProps: r,
157
158
  labelId: l,
158
- label: s,
159
- labelSecondary: c,
160
- helperText: d,
159
+ label: c,
160
+ labelSecondary: s,
161
+ helperText: p,
161
162
  name: h,
162
- error: u,
163
- focused: g,
164
- disabled: f,
165
- fullWidth: m,
166
- required: x,
163
+ error: d,
164
+ focused: m,
165
+ disabled: u,
166
+ fullWidth: f,
167
+ required: M,
167
168
  "aria-label": b,
168
169
  ...I
169
- }, B) {
170
- const A = n === "small", [M] = T(() => ke("select-label-")), k = s ? l ?? M : void 0;
170
+ }, k) {
171
+ const D = n === "small", [x] = $(() => Ie("select-label-")), C = c ? l ?? x : void 0;
171
172
  return /* @__PURE__ */ y(
172
- Lt,
173
+ Et,
173
174
  {
174
175
  size: n,
175
- error: u,
176
- focused: g,
177
- disabled: f,
178
- fullWidth: m,
179
- required: x,
176
+ error: d,
177
+ focused: m,
178
+ disabled: u,
179
+ fullWidth: f,
180
+ required: M,
180
181
  children: [
181
182
  /* @__PURE__ */ y(v, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
182
- s && /* @__PURE__ */ i(Wt, { shrink: !0, id: k, children: s }),
183
- c && /* @__PURE__ */ i(v, { display: "flex", alignItems: "center", ml: 2, mb: 0.5, children: c })
183
+ c && /* @__PURE__ */ i(Ht, { shrink: !0, id: C, children: c }),
184
+ s && /* @__PURE__ */ i(v, { display: "flex", alignItems: "center", ml: 2, mb: 0.5, children: s })
184
185
  ] }),
185
186
  /* @__PURE__ */ y(
186
- De,
187
+ we,
187
188
  {
188
189
  ...I,
189
- labelId: k,
190
+ labelId: C,
190
191
  name: h,
191
- ref: B,
192
+ ref: k,
192
193
  size: n,
193
- fullWidth: m,
194
+ fullWidth: f,
194
195
  displayEmpty: o ?? !!e,
195
196
  inputProps: {
196
- ...a,
197
+ ...r,
197
198
  "aria-label": b
198
199
  },
199
200
  MenuProps: {
200
- ...r,
201
+ ...a,
201
202
  PopoverClasses: {
202
- paper: A ? "MuiMenu-paper-sizeSmall" : void 0
203
+ paper: D ? "MuiMenu-paper-sizeSmall" : void 0
203
204
  },
204
205
  anchorOrigin: {
205
206
  vertical: "bottom",
@@ -211,10 +212,10 @@ function Be({
211
212
  }
212
213
  },
213
214
  children: [
214
- e && /* @__PURE__ */ i(Ie, { disabled: !0, value: "", children: /* @__PURE__ */ i(
215
- w,
215
+ e && /* @__PURE__ */ i(Be, { disabled: !0, value: "", children: /* @__PURE__ */ i(
216
+ S,
216
217
  {
217
- variant: A ? "body2" : "body1",
218
+ variant: D ? "body2" : "body1",
218
219
  color: "text.hint",
219
220
  component: "span",
220
221
  children: e
@@ -224,12 +225,12 @@ function Be({
224
225
  ]
225
226
  }
226
227
  ),
227
- d && /* @__PURE__ */ i(ht, { "aria-label": `${h}-helper`, children: d })
228
+ p && /* @__PURE__ */ i(ht, { "aria-label": `${h}-helper`, children: p })
228
229
  ]
229
230
  }
230
231
  );
231
232
  }
232
- const we = O(Be), Se = p(Pt, {
233
+ const Te = T(Se), $e = g(_t, {
233
234
  shouldForwardProp: (t) => t !== "variant" && t !== "backgroundColor"
234
235
  })(({ variant: t, backgroundColor: e, theme: n }) => ({
235
236
  // Variants
@@ -301,14 +302,14 @@ const we = O(Be), Se = p(Pt, {
301
302
  backgroundColor: "transparent"
302
303
  }
303
304
  }));
304
- function go({
305
+ function yo({
305
306
  children: t,
306
307
  variant: e = "floating",
307
308
  backgroundColor: n,
308
309
  ...o
309
310
  }) {
310
311
  return /* @__PURE__ */ i(
311
- Se,
312
+ $e,
312
313
  {
313
314
  ...o,
314
315
  variant: e,
@@ -317,7 +318,7 @@ function go({
317
318
  }
318
319
  );
319
320
  }
320
- const Te = p("div")(({ theme: t }) => ({
321
+ const Re = g("div")(({ theme: t }) => ({
321
322
  position: "relative",
322
323
  display: "inline-flex",
323
324
  // TODO: Remove this once we have a better way to handle the spacing between icon buttons:
@@ -325,7 +326,7 @@ const Te = p("div")(({ theme: t }) => ({
325
326
  "& + &, & + .optionIconButton": {
326
327
  marginLeft: t.spacing(0.5)
327
328
  }
328
- })), $e = p(F, {
329
+ })), Fe = g(W, {
329
330
  shouldForwardProp: (t) => !["active"].includes(t)
330
331
  })(({ active: t, theme: e }) => ({
331
332
  ...t && {
@@ -336,43 +337,44 @@ const Te = p("div")(({ theme: t }) => ({
336
337
  }
337
338
  }
338
339
  }));
339
- function Re({
340
+ function Oe({
340
341
  tooltip: t,
341
342
  tooltipPlacement: e = "top",
342
343
  icon: n,
343
344
  size: o = "medium",
344
- variant: r = "icon",
345
- color: a = "default",
345
+ variant: a = "icon",
346
+ color: r = "default",
346
347
  sx: l,
347
- className: s,
348
- loading: c,
349
- disabled: d,
348
+ className: c,
349
+ loading: s,
350
+ disabled: p,
350
351
  active: h,
351
- ...u
352
- }, g) {
353
- return /* @__PURE__ */ i(W, { placement: e, title: t ?? "", children: /* @__PURE__ */ i(
354
- Te,
352
+ ...d
353
+ }, m) {
354
+ return /* @__PURE__ */ i(H, { placement: e, title: t ?? "", children: /* @__PURE__ */ i(
355
+ Re,
355
356
  {
356
- className: `optionIconButton ${s ?? ""}`,
357
+ className: `optionIconButton ${c ?? ""}`,
357
358
  sx: l,
358
359
  "data-testid": "icon-button",
359
360
  children: /* @__PURE__ */ i(
360
- $e,
361
+ Fe,
361
362
  {
362
- ...u,
363
- ref: g,
363
+ ...d,
364
+ ref: m,
364
365
  size: o,
365
- variant: r,
366
- color: a,
366
+ variant: a,
367
+ color: r,
367
368
  active: h,
368
- disabled: d || c,
369
- children: c ? /* @__PURE__ */ i(H, { size: 18, color: "inherit" }) : n
369
+ disabled: p || s,
370
+ role: "button",
371
+ children: s ? /* @__PURE__ */ i(P, { size: 18, color: "inherit" }) : n
370
372
  }
371
373
  )
372
374
  }
373
375
  ) });
374
376
  }
375
- const Fe = O(Re), Oe = p(Et, {
377
+ const Le = T(Oe), We = g(Pt, {
376
378
  shouldForwardProp: (t) => !["extended", "width", "height"].includes(t)
377
379
  })(({ theme: t, extended: e, width: n, height: o }) => ({
378
380
  ...e && {
@@ -395,10 +397,26 @@ const Fe = O(Re), Oe = p(Et, {
395
397
  }
396
398
  }
397
399
  }));
398
- function fo(t) {
399
- return /* @__PURE__ */ i(Oe, { ...t });
400
+ function Ee({ extended: t, width: e, height: n, MenuListProps: o, ...a }, r) {
401
+ return /* @__PURE__ */ i(
402
+ We,
403
+ {
404
+ ...a,
405
+ ref: r,
406
+ "data-name": "menu",
407
+ width: e,
408
+ height: n,
409
+ extended: t,
410
+ MenuListProps: {
411
+ ...o,
412
+ "data-width": e,
413
+ "data-height": n,
414
+ "data-extended": t
415
+ }
416
+ }
417
+ );
400
418
  }
401
- const Le = p(Ht, {
419
+ const Mo = T(Ee), He = g(Gt, {
402
420
  shouldForwardProp: (t) => !["extended", "width", "height"].includes(t)
403
421
  })(({ theme: t, extended: e, width: n, height: o }) => ({
404
422
  ...e && {
@@ -416,12 +434,25 @@ const Le = p(Ht, {
416
434
  }
417
435
  }
418
436
  }));
419
- function ho(t) {
420
- return /* @__PURE__ */ i(Le, { ...t });
437
+ function _e({ extended: t, width: e, height: n, ...o }, a) {
438
+ return /* @__PURE__ */ i(
439
+ He,
440
+ {
441
+ ...o,
442
+ ref: a,
443
+ width: e,
444
+ height: n,
445
+ extended: t,
446
+ "data-name": "menu-list",
447
+ "data-width": e,
448
+ "data-height": n,
449
+ "data-extended": t
450
+ }
451
+ );
421
452
  }
422
- const We = p(Ct)(() => ({
453
+ const Co = T(_e), Pe = g(vt)(() => ({
423
454
  marginTop: "0 !important"
424
- })), Pe = p(_t)(
455
+ })), Ge = g(jt)(
425
456
  ({ disabled: t, theme: e }) => ({
426
457
  display: "flex",
427
458
  alignItems: "center",
@@ -434,15 +465,16 @@ const We = p(Ct)(() => ({
434
465
  }
435
466
  })
436
467
  );
437
- function vt({
468
+ function je({
438
469
  areAllSelected: t,
439
470
  areAnySelected: e,
440
471
  selectAll: n,
441
- selectAllDisabled: o
442
- }) {
443
- const r = R(), a = $(r);
444
- return /* @__PURE__ */ i(We, { fixed: !0, children: /* @__PURE__ */ y(
445
- Pe,
472
+ selectAllDisabled: o,
473
+ ...a
474
+ }, r) {
475
+ const l = F(), c = R(l);
476
+ return /* @__PURE__ */ i(Pe, { ...a, ref: r, fixed: !0, "data-name": "menu-filter", children: /* @__PURE__ */ y(
477
+ Ge,
446
478
  {
447
479
  variant: "body2",
448
480
  color: "textPrimary",
@@ -460,48 +492,49 @@ function vt({
460
492
  disabled: o
461
493
  }
462
494
  ),
463
- a.formatMessage({ id: "c4r.form.selectAll" })
495
+ c.formatMessage({ id: "c4r.form.selectAll" })
464
496
  ]
465
497
  }
466
498
  ) });
467
499
  }
468
- function Ee({
500
+ const kt = T(je);
501
+ function Ve({
469
502
  selectedOptions: t,
470
503
  options: e,
471
504
  onChange: n
472
505
  }) {
473
- const [o, r] = T(t ?? []), a = e.length === o.length, l = o.length > 0;
474
- return E(() => {
475
- o !== t && r(o);
506
+ const [o, a] = $(t ?? []), r = e.length === o.length, l = o.length > 0;
507
+ return _(() => {
508
+ o !== t && a(o);
476
509
  }, [t]), {
477
- areAllSelected: a,
510
+ areAllSelected: r,
478
511
  areAnySelected: l,
479
512
  currentOptions: o,
480
513
  handleChange: (h) => {
481
514
  const {
482
- target: { value: u }
483
- } = h, g = typeof u == "string" ? u.split(",") : u.filter((f) => f !== void 0);
484
- r(g), n(g);
515
+ target: { value: d }
516
+ } = h, m = typeof d == "string" ? d.split(",") : d.filter((u) => u !== void 0);
517
+ a(m), n(m);
485
518
  },
486
519
  selectAll: () => {
487
- const h = e == null ? void 0 : e.filter(({ disabled: u }) => !u).map(({ value: u }) => u);
520
+ const h = e == null ? void 0 : e.filter(({ disabled: d }) => !d).map(({ value: d }) => d);
488
521
  h && (h.every(
489
- (g) => o.includes(g)
490
- ) ? (r([]), n([])) : (r(h), n(h)));
522
+ (m) => o.includes(m)
523
+ ) ? (a([]), n([])) : (a(h), n(h)));
491
524
  },
492
525
  unselectAll: () => {
493
- r([]), n([]);
526
+ a([]), n([]);
494
527
  }
495
528
  };
496
529
  }
497
- const He = p(ft)(({ theme: t }) => ({
530
+ const Ne = g(mt)(({ theme: t }) => ({
498
531
  "&.Mui-disabled": {
499
532
  pointerEvents: "auto",
500
533
  "&:hover": {
501
534
  backgroundColor: `${t.palette.background.default} !important`
502
535
  }
503
536
  }
504
- })), _e = p(q, {
537
+ })), Ue = g(q, {
505
538
  shouldForwardProp: (t) => t !== "size"
506
539
  })(({ theme: t, size: e }) => ({
507
540
  display: "none",
@@ -518,86 +551,86 @@ const He = p(ft)(({ theme: t }) => ({
518
551
  top: t.spacing(3),
519
552
  right: t.spacing(5)
520
553
  }
521
- })), Ge = [], je = () => {
554
+ })), Ye = [], qe = () => {
522
555
  };
523
- function Ne({
524
- options: t = Ge,
556
+ function ze({
557
+ options: t = Ye,
525
558
  selectedOptions: e,
526
559
  size: n = "small",
527
560
  placeholder: o,
528
- showCounter: r,
529
- showFilters: a = !0,
530
- onChange: l = je,
531
- selectAllDisabled: s,
532
- tooltipPlacement: c,
533
- variant: d,
561
+ showCounter: a,
562
+ showFilters: r = !0,
563
+ onChange: l = qe,
564
+ selectAllDisabled: c,
565
+ tooltipPlacement: s,
566
+ variant: p,
534
567
  ...h
535
- }, u) {
568
+ }, d) {
536
569
  const {
537
- areAllSelected: g,
538
- areAnySelected: f,
539
- currentOptions: m,
540
- handleChange: x,
570
+ areAllSelected: m,
571
+ areAnySelected: u,
572
+ currentOptions: f,
573
+ handleChange: M,
541
574
  selectAll: b,
542
575
  unselectAll: I
543
- } = Ee({
576
+ } = Ve({
544
577
  options: t,
545
578
  selectedOptions: e,
546
579
  onChange: l
547
- }), B = n === "small", A = B || d === "standard" ? 0 : 2, M = R(), k = $(M), D = `${m.length} ${k.formatMessage({
580
+ }), k = n === "small", D = k || p === "standard" ? 0 : 2, x = F(), C = R(x), B = `${f.length} ${C.formatMessage({
548
581
  id: "c4r.form.selected"
549
- })}`, L = ut(() => g ? /* @__PURE__ */ i(
550
- w,
582
+ })}`, O = pt(() => m ? /* @__PURE__ */ i(
583
+ S,
551
584
  {
552
585
  component: "span",
553
- variant: B ? "body2" : "body1",
586
+ variant: k ? "body2" : "body1",
554
587
  color: "textPrimary",
555
- ml: A,
556
- children: k.formatMessage({ id: "c4r.form.allSelected" })
588
+ ml: D,
589
+ children: C.formatMessage({ id: "c4r.form.allSelected" })
557
590
  }
558
- ) : f ? /* @__PURE__ */ i(
559
- w,
591
+ ) : u ? /* @__PURE__ */ i(
592
+ S,
560
593
  {
561
594
  component: "span",
562
- variant: B ? "body2" : "body1",
595
+ variant: k ? "body2" : "body1",
563
596
  color: "textPrimary",
564
- ml: A,
565
- children: r && m.length > 1 ? D : m.join(", ")
597
+ ml: D,
598
+ children: a && f.length > 1 ? B : f.join(", ")
566
599
  }
567
600
  ) : /* @__PURE__ */ i(
568
- w,
601
+ S,
569
602
  {
570
603
  component: "span",
571
- variant: B ? "body2" : "body1",
604
+ variant: k ? "body2" : "body1",
572
605
  color: "text.hint",
573
- ml: A,
574
- children: o ?? k.formatMessage({ id: "c4r.form.noneSelected" })
606
+ ml: D,
607
+ children: o ?? C.formatMessage({ id: "c4r.form.noneSelected" })
575
608
  }
576
609
  ), [
577
- g,
578
- f,
579
- D,
580
610
  m,
581
- k,
611
+ u,
582
612
  B,
583
- A,
613
+ f,
614
+ C,
615
+ k,
616
+ D,
584
617
  o,
585
- r
618
+ a
586
619
  ]);
587
620
  return /* @__PURE__ */ y(
588
- we,
621
+ Te,
589
622
  {
590
623
  ...h,
591
- ref: u,
624
+ ref: d,
592
625
  multiple: !0,
593
626
  displayEmpty: !0,
594
627
  placeholder: o,
595
- value: m,
596
- renderValue: () => L,
597
- onChange: x,
628
+ value: f,
629
+ renderValue: () => O,
630
+ onChange: M,
598
631
  size: n,
599
- variant: d,
600
- endAdornment: a && f && /* @__PURE__ */ i(_e, { position: "end", size: n, children: /* @__PURE__ */ i(F, { onClick: I, size: n, children: /* @__PURE__ */ i(yt, {}) }) }),
632
+ variant: p,
633
+ endAdornment: r && u && /* @__PURE__ */ i(Ue, { position: "end", size: n, children: /* @__PURE__ */ i(W, { onClick: I, size: n, children: /* @__PURE__ */ i(yt, {}) }) }),
601
634
  menuProps: {
602
635
  PaperProps: {
603
636
  sx: {
@@ -608,50 +641,50 @@ function Ne({
608
641
  }
609
642
  },
610
643
  children: [
611
- a && /* @__PURE__ */ i(
612
- vt,
644
+ r && /* @__PURE__ */ i(
645
+ kt,
613
646
  {
614
- areAllSelected: g,
615
- areAnySelected: f,
647
+ areAllSelected: m,
648
+ areAnySelected: u,
616
649
  selectAll: b,
617
- selectAllDisabled: s
650
+ selectAllDisabled: c
618
651
  }
619
652
  ),
620
- t == null ? void 0 : t.map((C) => {
621
- const S = /* @__PURE__ */ y(
622
- He,
653
+ t == null ? void 0 : t.map((w) => {
654
+ const E = /* @__PURE__ */ y(
655
+ Ne,
623
656
  {
624
- value: C.value,
625
- disabled: C.disabled,
657
+ value: w.value,
658
+ disabled: w.disabled,
626
659
  tabIndex: 0,
627
660
  children: [
628
661
  /* @__PURE__ */ i(
629
662
  z,
630
663
  {
631
- disabled: C.disabled,
632
- checked: m.includes(C.value)
664
+ disabled: w.disabled,
665
+ checked: f.includes(w.value)
633
666
  }
634
667
  ),
635
- /* @__PURE__ */ i(mt, { primary: C.label })
668
+ /* @__PURE__ */ i(bt, { primary: w.label })
636
669
  ]
637
670
  },
638
- C.value
671
+ w.value
639
672
  );
640
- return C.tooltip ? /* @__PURE__ */ i(
641
- W,
673
+ return w.tooltip ? /* @__PURE__ */ i(
674
+ H,
642
675
  {
643
- title: C.tooltip,
644
- placement: c,
645
- children: S
676
+ title: w.tooltip,
677
+ placement: s,
678
+ children: E
646
679
  },
647
- C.value
648
- ) : S;
680
+ w.value
681
+ ) : E;
649
682
  })
650
683
  ]
651
684
  }
652
685
  );
653
686
  }
654
- const mo = O(Ne), Ve = p(gt, {
687
+ const vo = T(ze), Ze = g(ft, {
655
688
  shouldForwardProp: (t) => t !== "cursor"
656
689
  })(
657
690
  ({ cursor: t, theme: e }) => ({
@@ -679,65 +712,65 @@ const mo = O(Ne), Ve = p(gt, {
679
712
  }
680
713
  })
681
714
  );
682
- function Ue({
715
+ function Je({
683
716
  buttonText: t,
684
717
  hasFiles: e,
685
718
  size: n,
686
719
  error: o,
687
- disabled: r,
688
- handleReset: a,
720
+ disabled: a,
721
+ handleReset: r,
689
722
  handleOpen: l,
690
- inProgress: s
723
+ inProgress: c
691
724
  }) {
692
- return /* @__PURE__ */ i(q, { position: "end", children: s ? /* @__PURE__ */ i(F, { "aria-label": "loading", disabled: !0, size: n, children: /* @__PURE__ */ i(H, { size: 18 }) }) : e ? /* @__PURE__ */ i(
693
- F,
725
+ return /* @__PURE__ */ i(q, { position: "end", children: c ? /* @__PURE__ */ i(W, { "aria-label": "loading", disabled: !0, size: n, children: /* @__PURE__ */ i(P, { size: 18 }) }) : e ? /* @__PURE__ */ i(
726
+ W,
694
727
  {
695
- onClick: a,
728
+ onClick: r,
696
729
  size: n,
697
730
  "aria-label": "delete",
698
- disabled: r,
731
+ disabled: a,
699
732
  children: /* @__PURE__ */ i(yt, {})
700
733
  }
701
734
  ) : /* @__PURE__ */ i(
702
- pt,
735
+ gt,
703
736
  {
704
737
  onClick: l,
705
738
  size: n,
706
739
  variant: "text",
707
740
  color: o ? "default" : "primary",
708
- disabled: r,
741
+ disabled: a,
709
742
  children: t
710
743
  }
711
744
  ) });
712
745
  }
713
- function qe({
746
+ function Xe({
714
747
  name: t,
715
748
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
716
749
  multiple: e,
717
750
  // multiple prop defined here for compatibility with cloud-native but not used in the component
718
751
  handleReset: n,
719
752
  handleOpen: o,
720
- dragOver: r,
721
- error: a,
753
+ dragOver: a,
754
+ error: r,
722
755
  placeholder: l,
723
- focused: s,
724
- buttonText: c = "Browse",
725
- inProgress: d,
756
+ focused: c,
757
+ buttonText: s = "Browse",
758
+ inProgress: p,
726
759
  InputProps: h,
727
- size: u = "small",
728
- hasFiles: g,
729
- cursor: f = "pointer",
730
- ...m
760
+ size: d = "small",
761
+ hasFiles: m,
762
+ cursor: u = "pointer",
763
+ ...f
731
764
  }) {
732
765
  return /* @__PURE__ */ i(
733
- Ve,
766
+ Ze,
734
767
  {
735
- ...m,
736
- size: u,
737
- error: a,
768
+ ...f,
769
+ size: d,
770
+ error: r,
738
771
  placeholder: l,
739
- focused: s ?? r,
740
- cursor: f,
772
+ focused: c ?? a,
773
+ cursor: u,
741
774
  InputProps: {
742
775
  ...h,
743
776
  name: t,
@@ -745,129 +778,129 @@ function qe({
745
778
  // not used for any UI logic
746
779
  readOnly: !0,
747
780
  endAdornment: /* @__PURE__ */ i(
748
- Ue,
781
+ Je,
749
782
  {
750
- buttonText: c,
751
- hasFiles: g,
752
- size: u,
753
- error: a,
754
- disabled: !!r,
783
+ buttonText: s,
784
+ hasFiles: m,
785
+ size: d,
786
+ error: r,
787
+ disabled: !!a,
755
788
  handleReset: n,
756
789
  handleOpen: o,
757
- inProgress: d
790
+ inProgress: p
758
791
  }
759
792
  )
760
793
  }
761
794
  }
762
795
  );
763
796
  }
764
- function ze({
797
+ function Ke({
765
798
  onChange: t,
766
799
  files: e,
767
800
  multiple: n,
768
801
  placeholder: o,
769
- uploadInputRef: r
802
+ uploadInputRef: a
770
803
  }) {
771
- const a = R(), l = $(a), [s, c] = T(""), [d, h] = T(!1);
772
- E(() => {
773
- !e || e.length === 0 ? c("") : e.length === 1 ? c(e[0].name) : c(
804
+ const r = F(), l = R(r), [c, s] = $(""), [p, h] = $(!1);
805
+ _(() => {
806
+ !e || e.length === 0 ? s("") : e.length === 1 ? s(e[0].name) : s(
774
807
  l.formatMessage(
775
808
  { id: "c4r.form.filesSelected" },
776
809
  { count: e.length }
777
810
  )
778
811
  );
779
812
  }, [e, l]);
780
- const u = () => {
781
- var M;
782
- (M = r.current) == null || M.click();
783
- }, g = (M) => {
784
- M.preventDefault(), h(!0);
785
- }, f = (M) => {
786
- M.preventDefault(), h(!1);
787
- }, m = (M) => {
788
- M.preventDefault(), h(!1);
789
- const k = M.dataTransfer.items, D = x(k);
790
- t == null || t(D);
791
- }, x = (M) => {
792
- const k = [];
793
- for (const D of Array.from(M))
794
- if (D.kind === "file") {
795
- const L = D.getAsFile();
796
- k.push(L);
813
+ const d = () => {
814
+ var x;
815
+ (x = a.current) == null || x.click();
816
+ }, m = (x) => {
817
+ x.preventDefault(), h(!0);
818
+ }, u = (x) => {
819
+ x.preventDefault(), h(!1);
820
+ }, f = (x) => {
821
+ x.preventDefault(), h(!1);
822
+ const C = x.dataTransfer.items, B = M(C);
823
+ t == null || t(B);
824
+ }, M = (x) => {
825
+ const C = [];
826
+ for (const B of Array.from(x))
827
+ if (B.kind === "file") {
828
+ const O = B.getAsFile();
829
+ C.push(O);
797
830
  }
798
- return k;
799
- }, b = (M) => {
800
- const k = Array.from(M.target.files);
801
- t == null || t(k);
802
- }, I = (M) => {
803
- M.stopPropagation(), c("");
804
- }, B = ut(() => {
805
- const M = l.formatMessage(
831
+ return C;
832
+ }, b = (x) => {
833
+ const C = Array.from(x.target.files);
834
+ t == null || t(C);
835
+ }, I = (x) => {
836
+ x.stopPropagation(), s("");
837
+ }, k = pt(() => {
838
+ const x = l.formatMessage(
806
839
  { id: "c4r.form.dragPlaceholder" },
807
840
  { count: n ? 0 : 1 }
808
- ), k = l.formatMessage(
841
+ ), C = l.formatMessage(
809
842
  { id: "c4r.form.dragActivePlaceholder" },
810
843
  { count: n ? 0 : 1 }
811
844
  );
812
- let D = "";
813
- return d ? D = k : D = o ?? M, D;
814
- }, [d, n, o, l]);
845
+ let B = "";
846
+ return p ? B = C : B = o ?? x, B;
847
+ }, [p, n, o, l]);
815
848
  return {
816
- filesText: s,
817
- getPlaceholder: B,
818
- dragOver: d,
849
+ filesText: c,
850
+ getPlaceholder: k,
851
+ dragOver: p,
819
852
  inputEvents: {
820
- onDragOver: g,
821
- onDragLeave: f,
822
- onDrop: m,
823
- onClick: u
853
+ onDragOver: m,
854
+ onDragLeave: u,
855
+ onDrop: f,
856
+ onClick: d
824
857
  },
825
858
  handleFiles: b,
826
859
  handleReset: I
827
860
  };
828
861
  }
829
- const Ye = ["application/JSON"];
830
- function bo({
862
+ const Qe = ["application/JSON"];
863
+ function ko({
831
864
  name: t,
832
865
  buttonText: e,
833
866
  accept: n,
834
867
  files: o,
835
- inProgress: r,
836
- onChange: a,
868
+ inProgress: a,
869
+ onChange: r,
837
870
  multiple: l,
838
- placeholder: s,
839
- error: c,
840
- focused: d,
871
+ placeholder: c,
872
+ error: s,
873
+ focused: p,
841
874
  nativeInputProps: h,
842
- ...u
875
+ ...d
843
876
  }) {
844
- const g = n ?? Ye, f = U(null), {
845
- filesText: m,
846
- getPlaceholder: x,
877
+ const m = n ?? Qe, u = Y(null), {
878
+ filesText: f,
879
+ getPlaceholder: M,
847
880
  dragOver: b,
848
881
  inputEvents: I,
849
- handleFiles: B,
850
- handleReset: A
851
- } = ze({
852
- uploadInputRef: f,
882
+ handleFiles: k,
883
+ handleReset: D
884
+ } = Ke({
885
+ uploadInputRef: u,
853
886
  files: o,
854
- onChange: a,
887
+ onChange: r,
855
888
  multiple: l,
856
- placeholder: s
889
+ placeholder: c
857
890
  });
858
- return /* @__PURE__ */ y(j, { children: [
891
+ return /* @__PURE__ */ y(V, { children: [
859
892
  /* @__PURE__ */ i(
860
- qe,
893
+ Xe,
861
894
  {
862
- ...u,
863
- placeholder: x,
864
- value: m,
865
- error: c,
866
- focused: d ?? b,
867
- handleReset: A,
895
+ ...d,
896
+ placeholder: M,
897
+ value: f,
898
+ error: s,
899
+ focused: p ?? b,
900
+ handleReset: D,
868
901
  dragOver: b,
869
- inProgress: r,
870
- hasFiles: !!m,
902
+ inProgress: a,
903
+ hasFiles: !!f,
871
904
  InputProps: I,
872
905
  buttonText: e
873
906
  }
@@ -876,303 +909,333 @@ function bo({
876
909
  "input",
877
910
  {
878
911
  ...h,
879
- ref: f,
912
+ ref: u,
880
913
  style: { display: "none" },
881
914
  type: "file",
882
915
  "aria-label": t,
883
916
  name: t,
884
- accept: String(g),
917
+ accept: String(m),
885
918
  multiple: l,
886
- onChange: B
919
+ onChange: k
887
920
  }
888
921
  )
889
922
  ] });
890
923
  }
891
- function Ze({
924
+ function tn({
892
925
  disabled: t,
893
926
  loading: e,
894
927
  ...n
895
928
  }, o) {
896
929
  return /* @__PURE__ */ i(
897
- Y,
930
+ Z,
898
931
  {
899
932
  ...n,
900
933
  ref: o,
901
934
  disabled: t || e,
902
- popupIcon: e ? /* @__PURE__ */ i(H, { size: 18, color: "inherit" }) : /* @__PURE__ */ i(J, {})
935
+ popupIcon: e ? /* @__PURE__ */ i(P, { size: 18, color: "inherit" }) : /* @__PURE__ */ i(X, {}),
936
+ "data-name": "autocomplete",
937
+ ListboxProps: {
938
+ "aria-multiselectable": !1,
939
+ ...n.ListboxProps
940
+ }
903
941
  }
904
942
  );
905
943
  }
906
- const yo = O(Ze), At = (t) => t && typeof t == "object" ? t.title ?? String(t) : String(t), kt = (t, e) => typeof t != "object" || t === null ? { value: t, multiple: e } : { ...t, multiple: e };
907
- function Dt() {
908
- return { renderOption: (e, n, o, r, a) => {
944
+ const Do = T(tn), Dt = (t) => t && typeof t == "object" ? t.title ?? String(t) : String(t), At = (t, e) => typeof t != "object" || t === null ? { value: t, multiple: e } : { ...t, multiple: e }, It = (t) => /* @__PURE__ */ i("span", { "data-testid": "more-options-tag", children: `+${t}` });
945
+ function wt() {
946
+ return { renderOption: (e, n, o, a, r) => {
909
947
  const {
910
948
  title: l,
911
- inputValue: s,
912
- divider: c,
913
- fixed: d,
949
+ inputValue: c,
950
+ divider: s,
951
+ fixed: p,
914
952
  extended: h,
915
- dense: u,
916
- destructive: g,
917
- disabled: f,
918
- subtitle: m,
919
- iconColor: x,
953
+ dense: d,
954
+ destructive: m,
955
+ disabled: u,
956
+ subtitle: f,
957
+ iconColor: M,
920
958
  startAdornment: b,
921
959
  endAdornment: I,
922
- alternativeTitle: B,
923
- secondaryText: A,
924
- multiple: M
925
- } = n, { key: k, ...D } = e, L = typeof n == "string" || typeof n == "number", C = (S, P, tt, et) => tt || et || (P && typeof P == "object" && "value" in P ? String(P.value) : S(P));
926
- return /* @__PURE__ */ i(Rt, { children: c ? /* @__PURE__ */ i(G, {}) : /* @__PURE__ */ y(j, { children: [
927
- s && /* @__PURE__ */ i(G, {}),
960
+ alternativeTitle: k,
961
+ secondaryText: D,
962
+ multiple: x
963
+ } = n, { key: C, ...B } = e, O = typeof n == "string" || typeof n == "number", w = (E, A, L, et) => L || et || (A && typeof A == "object" && "value" in A ? String(A.value) : E(A));
964
+ return /* @__PURE__ */ i(Ot, { children: s ? /* @__PURE__ */ i(j, {}) : /* @__PURE__ */ y(V, { children: [
965
+ c && /* @__PURE__ */ i(j, {}),
928
966
  /* @__PURE__ */ y(
929
- Ct,
967
+ vt,
930
968
  {
931
- ...D,
932
- ...!L && {
933
- fixed: d,
969
+ ...B,
970
+ ...!O && {
971
+ fixed: p,
934
972
  extended: h,
935
- dense: u,
936
- destructive: g,
937
- disabled: f,
938
- subtitle: m,
939
- iconColor: x
973
+ dense: d,
974
+ destructive: m,
975
+ disabled: u,
976
+ subtitle: f,
977
+ iconColor: M
940
978
  },
979
+ "aria-disabled": f || u,
980
+ "aria-selected": o.selected,
941
981
  children: [
942
- !m && (b || M || a) && /* @__PURE__ */ y(Gt, { children: [
943
- a || M && /* @__PURE__ */ i(z, { checked: o.selected }),
982
+ !f && (b || x || r) && /* @__PURE__ */ y(Vt, { children: [
983
+ r || x && /* @__PURE__ */ i(z, { checked: o.selected }),
944
984
  b
945
985
  ] }),
946
- /* @__PURE__ */ y(mt, { children: [
947
- C(
948
- r ?? At,
986
+ /* @__PURE__ */ y(bt, { children: [
987
+ w(
988
+ a ?? Dt,
949
989
  n,
950
- B,
990
+ k,
951
991
  l
952
992
  ),
953
- A && /* @__PURE__ */ i(
954
- w,
993
+ D && /* @__PURE__ */ i(
994
+ S,
955
995
  {
956
996
  component: "p",
957
997
  variant: "caption",
958
998
  color: "text.secondary",
959
- children: A
999
+ children: D
960
1000
  }
961
1001
  )
962
1002
  ] }),
963
- I
1003
+ !f && I
964
1004
  ]
965
1005
  }
966
1006
  )
967
- ] }) }, k);
1007
+ ] }) }, C);
968
1008
  } };
969
1009
  }
970
- function Je({
1010
+ function en({
971
1011
  getOptionLabel: t,
972
1012
  newItemLabel: e,
973
1013
  newItemIcon: n,
974
1014
  multiple: o
975
1015
  }) {
976
- const r = R(), a = $(r), l = jt(), { renderOption: s } = Dt();
1016
+ const a = F(), r = R(a), l = Nt(), { renderOption: c } = wt();
977
1017
  return {
978
- creatableFilterOptions: (u, g) => {
979
- const f = l(
980
- u,
981
- g
982
- ), { inputValue: m } = g, x = u.some(
983
- (b) => m === t(b)
1018
+ creatableFilterOptions: (d, m) => {
1019
+ const u = l(
1020
+ d,
1021
+ m
1022
+ ), { inputValue: f } = m, M = d.some(
1023
+ (b) => f === t(b)
984
1024
  );
985
- if (m.length > 1 && m !== "" && !x) {
1025
+ if (f.length > 1 && f !== "" && !M) {
986
1026
  let b;
987
- typeof e == "function" ? b = e(m) : e ? b = `${e} "${m}"` : b = `${a.formatMessage({ id: "c4r.form.add" })} "${m}"`, f.push({
988
- inputValue: m,
1027
+ typeof e == "function" ? b = e(f) : e ? b = `${e} "${f}"` : b = `${r.formatMessage({ id: "c4r.form.add" })} "${f}"`, u.push({
1028
+ inputValue: f,
989
1029
  title: b
990
1030
  });
991
1031
  }
992
- return f;
1032
+ return u;
993
1033
  },
994
- creatableOptionLabel: (u) => typeof u == "string" ? u : u.inputValue ? u.inputValue : t(u),
995
- creatableRenderOption: (u, g, f) => {
996
- const m = g.inputValue ? n ?? /* @__PURE__ */ i(ce, {}) : void 0, x = kt(g, !!o);
997
- return s(
1034
+ creatableOptionLabel: (d) => typeof d == "string" ? d : d.inputValue ? d.inputValue : t(d),
1035
+ creatableRenderOption: (d, m, u) => {
1036
+ const f = m.inputValue ? n ?? /* @__PURE__ */ i(de, {}) : void 0, M = At(m, !!o);
1037
+ return c(
1038
+ d,
1039
+ M,
998
1040
  u,
999
- x,
1000
- f,
1001
1041
  t,
1002
- m
1042
+ f
1003
1043
  );
1004
1044
  }
1005
1045
  };
1006
1046
  }
1007
- function It({
1047
+ function Bt({
1008
1048
  options: t,
1009
1049
  value: e,
1010
1050
  onChange: n,
1011
1051
  getOptionLabel: o
1012
1052
  }) {
1013
- const [r, a] = T(
1053
+ const [a, r] = $(
1014
1054
  Array.isArray(e) ? e : e ? [e] : []
1015
- ), { renderOption: l } = Dt();
1016
- E(() => {
1017
- const g = Array.isArray(e) ? e : e ? [e] : [];
1018
- a(g);
1055
+ ), { renderOption: l } = wt();
1056
+ _(() => {
1057
+ const m = Array.isArray(e) ? e : e ? [e] : [];
1058
+ r(m);
1019
1059
  }, [e]);
1020
- const s = r.length === t.length, c = r.length > 0 && r.length < t.length;
1060
+ const c = a.length === t.length, s = a.length > 0 && a.length < t.length;
1021
1061
  return {
1022
- multipleValue: r,
1023
- allSelected: s,
1024
- someSelected: c,
1025
- handleSelectAll: () => {
1026
- a(s ? [] : [...t]);
1062
+ multipleValue: a,
1063
+ allSelected: c,
1064
+ someSelected: s,
1065
+ handleSelectAll: (m) => {
1066
+ const u = c ? [] : [...t];
1067
+ r(u), n == null || n(
1068
+ m,
1069
+ u,
1070
+ "selectOption"
1071
+ );
1027
1072
  },
1028
- handleChange: (g, f) => {
1029
- a(f === null ? [] : f), n == null || n(g, f, "selectOption");
1073
+ handleChange: (m, u, f) => {
1074
+ r(u === null ? [] : u), n == null || n(m, u, f);
1030
1075
  },
1031
- multipleRenderOption: (g, f, m) => {
1032
- const x = kt(f, !0);
1076
+ multipleRenderOption: (m, u, f) => {
1077
+ const M = At(u, !0);
1033
1078
  return l(
1034
- g,
1035
- x,
1036
1079
  m,
1080
+ M,
1081
+ f,
1037
1082
  o
1038
1083
  );
1039
1084
  }
1040
1085
  };
1041
1086
  }
1042
- function Xe({
1087
+ function nn({
1043
1088
  children: t,
1044
1089
  showFilters: e,
1045
1090
  allSelected: n,
1046
1091
  someSelected: o,
1047
- handleSelectAll: r = () => {
1092
+ handleSelectAll: a = () => {
1048
1093
  },
1049
- ...a
1050
- }, l) {
1051
- return /* @__PURE__ */ y("ul", { ref: l, ...a, children: [
1052
- e && /* @__PURE__ */ i(
1053
- vt,
1054
- {
1055
- areAllSelected: !!n,
1056
- areAnySelected: !!o,
1057
- selectAll: r
1058
- }
1059
- ),
1060
- t
1061
- ] });
1094
+ multiple: r,
1095
+ ...l
1096
+ }, c) {
1097
+ return /* @__PURE__ */ y(
1098
+ "ul",
1099
+ {
1100
+ ref: c,
1101
+ ...l,
1102
+ role: "listbox",
1103
+ "aria-multiselectable": r,
1104
+ children: [
1105
+ e && r && /* @__PURE__ */ i(
1106
+ kt,
1107
+ {
1108
+ areAllSelected: !!n,
1109
+ areAnySelected: !!o,
1110
+ selectAll: a
1111
+ }
1112
+ ),
1113
+ t
1114
+ ]
1115
+ }
1116
+ );
1062
1117
  }
1063
- const Bt = O(Xe);
1064
- function Ke({
1118
+ const St = T(nn);
1119
+ function on({
1065
1120
  newItemLabel: t,
1066
1121
  newItemIcon: e,
1067
- getOptionLabel: n = At,
1122
+ getOptionLabel: n = Dt,
1068
1123
  multiple: o,
1069
- disableCloseOnSelect: r,
1070
- disabled: a,
1124
+ disableCloseOnSelect: a,
1125
+ disabled: r,
1071
1126
  loading: l,
1072
- showFilters: s,
1073
- options: c = [],
1074
- value: d,
1127
+ showFilters: c,
1128
+ options: s = [],
1129
+ value: p,
1075
1130
  onChange: h,
1076
- ...u
1077
- }, g) {
1078
- const { freeSolo: f = !0, ...m } = u, {
1079
- multipleValue: x,
1080
- allSelected: b,
1081
- someSelected: I,
1082
- handleSelectAll: B,
1083
- handleChange: A
1084
- } = It({
1085
- options: c,
1086
- value: d,
1131
+ getLimitTagsText: d,
1132
+ ...m
1133
+ }, u) {
1134
+ const { freeSolo: f = !0, ...M } = m, {
1135
+ multipleValue: b,
1136
+ allSelected: I,
1137
+ someSelected: k,
1138
+ handleSelectAll: D,
1139
+ handleChange: x
1140
+ } = Bt({
1141
+ options: s,
1142
+ value: p,
1087
1143
  onChange: h
1088
1144
  }), {
1089
- creatableFilterOptions: M,
1090
- creatableOptionLabel: k,
1091
- creatableRenderOption: D
1092
- } = Je({
1145
+ creatableFilterOptions: C,
1146
+ creatableOptionLabel: B,
1147
+ creatableRenderOption: O
1148
+ } = en({
1093
1149
  getOptionLabel: n,
1094
1150
  newItemLabel: t,
1095
1151
  newItemIcon: e,
1096
1152
  multiple: o
1097
1153
  });
1098
1154
  return /* @__PURE__ */ i(
1099
- Y,
1155
+ Z,
1100
1156
  {
1101
- ...m,
1102
- ref: g,
1103
- options: c,
1104
- value: o ? x : d,
1105
- onChange: A,
1106
- filterOptions: M,
1107
- getOptionLabel: k,
1108
- renderOption: D,
1157
+ ...M,
1158
+ ref: u,
1159
+ options: s,
1160
+ value: o ? b : p,
1161
+ onChange: x,
1162
+ filterOptions: C,
1163
+ getOptionLabel: B,
1164
+ renderOption: O,
1109
1165
  freeSolo: f,
1110
1166
  forcePopupIcon: !0,
1111
1167
  multiple: o,
1112
- disableCloseOnSelect: r || o,
1113
- ListboxComponent: o ? Bt : void 0,
1114
- ListboxProps: o ? {
1115
- showFilters: s,
1116
- allSelected: b,
1117
- someSelected: I,
1118
- handleSelectAll: B
1119
- } : void 0,
1120
- disabled: a || l,
1121
- popupIcon: l ? /* @__PURE__ */ i(H, { size: 18, color: "inherit" }) : /* @__PURE__ */ i(J, {})
1168
+ disableCloseOnSelect: a ?? o,
1169
+ ListboxComponent: St,
1170
+ ListboxProps: {
1171
+ showFilters: c,
1172
+ allSelected: I,
1173
+ someSelected: k,
1174
+ handleSelectAll: D,
1175
+ multiple: o
1176
+ },
1177
+ getLimitTagsText: d ?? It,
1178
+ disabled: r || l,
1179
+ popupIcon: l ? /* @__PURE__ */ i(P, { size: 18, color: "inherit" }) : /* @__PURE__ */ i(X, {}),
1180
+ "data-name": "creatable-autocomplete"
1122
1181
  }
1123
1182
  );
1124
1183
  }
1125
- const xo = O(Ke);
1126
- function Qe({
1184
+ const Ao = T(on);
1185
+ function an({
1127
1186
  renderOption: t,
1128
1187
  disableCloseOnSelect: e = !0,
1129
1188
  disabled: n,
1130
1189
  loading: o,
1131
- showFilters: r,
1132
- options: a,
1190
+ showFilters: a,
1191
+ options: r,
1133
1192
  value: l,
1134
- onChange: s,
1135
- getOptionLabel: c,
1136
- ...d
1137
- }, h) {
1193
+ onChange: c,
1194
+ getOptionLabel: s,
1195
+ getLimitTagsText: p,
1196
+ ...h
1197
+ }, d) {
1138
1198
  const {
1139
- multipleValue: u,
1140
- allSelected: g,
1199
+ multipleValue: m,
1200
+ allSelected: u,
1141
1201
  someSelected: f,
1142
- handleSelectAll: m,
1143
- handleChange: x,
1144
- multipleRenderOption: b
1145
- } = It({
1146
- options: a,
1202
+ handleSelectAll: M,
1203
+ handleChange: b,
1204
+ multipleRenderOption: I
1205
+ } = Bt({
1206
+ options: r,
1147
1207
  value: l,
1148
- onChange: s,
1149
- getOptionLabel: c
1208
+ onChange: c,
1209
+ getOptionLabel: s
1150
1210
  });
1151
1211
  return /* @__PURE__ */ i(
1152
- Y,
1212
+ Z,
1153
1213
  {
1154
- ...d,
1155
- ref: h,
1156
- options: a,
1157
- value: u,
1158
- onChange: x,
1159
- getOptionLabel: c,
1160
- renderOption: t ?? b,
1161
- ListboxComponent: Bt,
1214
+ ...h,
1215
+ ref: d,
1216
+ options: r,
1217
+ value: m,
1218
+ onChange: b,
1219
+ getOptionLabel: s,
1220
+ renderOption: t ?? I,
1221
+ ListboxComponent: St,
1162
1222
  ListboxProps: {
1163
- showFilters: r,
1164
- allSelected: g,
1223
+ showFilters: a,
1224
+ allSelected: u,
1165
1225
  someSelected: f,
1166
- handleSelectAll: m
1226
+ handleSelectAll: M,
1227
+ multiple: !0
1167
1228
  },
1168
1229
  multiple: !0,
1230
+ getLimitTagsText: p ?? It,
1169
1231
  disableCloseOnSelect: e,
1170
1232
  disabled: n || o,
1171
- popupIcon: o ? /* @__PURE__ */ i(H, { size: 18, color: "inherit" }) : /* @__PURE__ */ i(J, {})
1233
+ popupIcon: o ? /* @__PURE__ */ i(P, { size: 18, color: "inherit" }) : /* @__PURE__ */ i(X, {}),
1234
+ "data-name": "multiple-autocomplete"
1172
1235
  }
1173
1236
  );
1174
1237
  }
1175
- const Mo = O(Qe), tn = p("div", {
1238
+ const Io = T(an), rn = g("div", {
1176
1239
  shouldForwardProp: (t) => t !== "variant"
1177
1240
  })(({ variant: t, theme: e }) => ({
1178
1241
  width: "100%",
@@ -1182,30 +1245,30 @@ const Mo = O(Qe), tn = p("div", {
1182
1245
  boxShadow: `inset 0 0 0 1px ${e.palette.divider}`
1183
1246
  }
1184
1247
  }));
1185
- function Co({
1248
+ function wo({
1186
1249
  variant: t = "standard",
1187
1250
  items: e,
1188
1251
  ...n
1189
1252
  }) {
1190
- return /* @__PURE__ */ i(tn, { ...n, variant: t, children: e.map((o, r) => /* @__PURE__ */ y(
1191
- Nt,
1253
+ return /* @__PURE__ */ i(rn, { ...n, variant: t, children: e.map((o, a) => /* @__PURE__ */ y(
1254
+ Ut,
1192
1255
  {
1193
1256
  disabled: o.disabled,
1194
1257
  defaultExpanded: o.defaultExpanded,
1195
1258
  onChange: o.onChange,
1196
1259
  children: [
1197
1260
  /* @__PURE__ */ i(
1198
- Vt,
1261
+ Yt,
1199
1262
  {
1200
- "aria-controls": `${r}-content`,
1201
- id: `${r}-header`,
1263
+ "aria-controls": `${a}-content`,
1264
+ id: `${a}-header`,
1202
1265
  children: o.summary
1203
1266
  }
1204
1267
  ),
1205
- /* @__PURE__ */ i(Ut, { children: o.content })
1268
+ /* @__PURE__ */ i(qt, { children: o.content })
1206
1269
  ]
1207
1270
  },
1208
- r
1271
+ a
1209
1272
  )) });
1210
1273
  }
1211
1274
  const it = {
@@ -1213,7 +1276,7 @@ const it = {
1213
1276
  medium: 4,
1214
1277
  small: 3,
1215
1278
  xsmall: 2.25
1216
- }, en = p(qt, {
1279
+ }, ln = g(zt, {
1217
1280
  shouldForwardProp: (t) => t !== "size" && t !== "disabled"
1218
1281
  })(({ theme: t, size: e = "medium", disabled: n = !1 }) => ({
1219
1282
  width: t.spacing(it[e]),
@@ -1230,18 +1293,18 @@ const it = {
1230
1293
  ...t.typography.caption,
1231
1294
  fontWeight: 500,
1232
1295
  svg: {
1233
- width: _,
1234
- height: _
1296
+ width: G,
1297
+ height: G
1235
1298
  }
1236
1299
  },
1237
1300
  ...n && {
1238
1301
  opacity: 0.6
1239
1302
  }
1240
1303
  }));
1241
- function vo(t) {
1242
- return /* @__PURE__ */ i(en, { ...t });
1304
+ function Bo(t) {
1305
+ return /* @__PURE__ */ i(ln, { ...t });
1243
1306
  }
1244
- const wt = 480, nn = p(zt)(({ theme: t }) => ({
1307
+ const Tt = 480, cn = g(Zt)(({ theme: t }) => ({
1245
1308
  bottom: t.spacing(2),
1246
1309
  right: t.spacing(2),
1247
1310
  left: t.spacing(2),
@@ -1250,13 +1313,13 @@ const wt = 480, nn = p(zt)(({ theme: t }) => ({
1250
1313
  right: "auto",
1251
1314
  left: "50%",
1252
1315
  width: "100%",
1253
- maxWidth: `${wt}px`
1316
+ maxWidth: `${Tt}px`
1254
1317
  }
1255
- })), on = p(v, {
1318
+ })), sn = g(v, {
1256
1319
  shouldForwardProp: (t) => t !== "autoWidth"
1257
1320
  })(({ autoWidth: t, theme: e }) => ({
1258
1321
  minWidth: "100%",
1259
- maxWidth: `${wt}px`,
1322
+ maxWidth: `${Tt}px`,
1260
1323
  margin: e.spacing(0, 1),
1261
1324
  ...t && {
1262
1325
  minWidth: "auto"
@@ -1267,7 +1330,7 @@ const wt = 480, nn = p(zt)(({ theme: t }) => ({
1267
1330
  minWidth: "auto"
1268
1331
  }
1269
1332
  }
1270
- })), rn = p(Mt, {
1333
+ })), dn = g(Ct, {
1271
1334
  shouldForwardProp: (t) => !["hasActions", "closeable"].includes(t)
1272
1335
  })(({ hasActions: t, closeable: e, icon: n, theme: o }) => ({
1273
1336
  position: "relative",
@@ -1319,7 +1382,7 @@ const wt = 480, nn = p(zt)(({ theme: t }) => ({
1319
1382
  padding: o.spacing(0.75, 0)
1320
1383
  }
1321
1384
  }
1322
- })), an = p(v)(({ theme: t }) => ({
1385
+ })), un = g(v)(({ theme: t }) => ({
1323
1386
  position: "absolute",
1324
1387
  top: t.spacing(1),
1325
1388
  right: t.spacing(1),
@@ -1330,58 +1393,58 @@ const wt = 480, nn = p(zt)(({ theme: t }) => ({
1330
1393
  color: t.palette.white[60]
1331
1394
  }
1332
1395
  }));
1333
- function Ao({
1396
+ function So({
1334
1397
  severity: t = "neutral",
1335
1398
  autoHideDuration: e = ot,
1336
1399
  closeable: n = !0,
1337
1400
  children: o,
1338
- title: r,
1339
- action: a,
1401
+ title: a,
1402
+ action: r,
1340
1403
  open: l,
1341
- onClose: s = () => {
1404
+ onClose: c = () => {
1342
1405
  },
1343
- autoWidth: c,
1344
- icon: d,
1406
+ autoWidth: s,
1407
+ icon: p,
1345
1408
  ...h
1346
1409
  }) {
1347
- const u = R(), g = $(u);
1348
- return /* @__PURE__ */ i(Yt, { children: /* @__PURE__ */ i(
1349
- nn,
1410
+ const d = F(), m = R(d);
1411
+ return /* @__PURE__ */ i(Jt, { children: /* @__PURE__ */ i(
1412
+ cn,
1350
1413
  {
1351
1414
  ...h,
1352
1415
  open: l,
1353
1416
  autoHideDuration: e === null ? null : e || ot,
1354
- onClose: s,
1355
- TransitionComponent: c ? Zt : bt,
1356
- "data-auto-width": c,
1417
+ onClose: c,
1418
+ TransitionComponent: s ? Xt : xt,
1419
+ "data-auto-width": s,
1357
1420
  children: /* @__PURE__ */ y(
1358
- on,
1421
+ sn,
1359
1422
  {
1360
1423
  sx: {
1361
1424
  position: "relative"
1362
1425
  },
1363
- autoWidth: c,
1426
+ autoWidth: s,
1364
1427
  children: [
1365
1428
  /* @__PURE__ */ i(
1366
- rn,
1429
+ dn,
1367
1430
  {
1368
1431
  severity: t,
1369
- action: a,
1370
- icon: d === !1 || t === "neutral" && !d ? !1 : d,
1432
+ action: r,
1433
+ icon: p === !1 || t === "neutral" && !p ? !1 : p,
1371
1434
  elevation: 6,
1372
- hasActions: !!a,
1435
+ hasActions: !!r,
1373
1436
  closeable: n,
1374
- title: r,
1437
+ title: a,
1375
1438
  children: o
1376
1439
  }
1377
1440
  ),
1378
- n && /* @__PURE__ */ i(an, { children: /* @__PURE__ */ i(
1379
- Fe,
1441
+ n && /* @__PURE__ */ i(un, { children: /* @__PURE__ */ i(
1442
+ Le,
1380
1443
  {
1381
1444
  color: "default",
1382
- onClick: (I) => s(I, "timeout"),
1383
- icon: /* @__PURE__ */ i(xt, {}),
1384
- tooltip: g.formatMessage({
1445
+ onClick: (I) => c(I, "timeout"),
1446
+ icon: /* @__PURE__ */ i(Mt, {}),
1447
+ tooltip: m.formatMessage({
1385
1448
  id: "c4r.button.close"
1386
1449
  })
1387
1450
  }
@@ -1392,20 +1455,20 @@ function Ao({
1392
1455
  }
1393
1456
  ) });
1394
1457
  }
1395
- const ln = p("div")(({ theme: t }) => ({
1458
+ const pn = g("div")(({ theme: t }) => ({
1396
1459
  display: "flex",
1397
1460
  alignItems: "center",
1398
- height: re,
1461
+ height: le,
1399
1462
  marginRight: t.spacing(1.5)
1400
- })), cn = p(F)(({ theme: t }) => ({
1463
+ })), gn = g(W)(({ theme: t }) => ({
1401
1464
  marginRight: t.spacing(1),
1402
1465
  "&.MuiButtonBase-root svg path": {
1403
1466
  fill: t.palette.brand.appBarContrastText
1404
1467
  }
1405
- })), sn = p(G)(({ theme: t }) => ({
1406
- borderColor: Jt(t.palette.brand.appBarContrastText, 0.12)
1468
+ })), fn = g(j)(({ theme: t }) => ({
1469
+ borderColor: Kt(t.palette.brand.appBarContrastText, 0.12)
1407
1470
  }));
1408
- function dn({
1471
+ function mn({
1409
1472
  onClickMenu: t
1410
1473
  }) {
1411
1474
  return (
@@ -1417,15 +1480,15 @@ function dn({
1417
1480
  sx: {
1418
1481
  display: { md: "none", xs: "block" }
1419
1482
  },
1420
- children: /* @__PURE__ */ y(ln, { children: [
1421
- /* @__PURE__ */ i(cn, { onClick: t, children: /* @__PURE__ */ i(se, {}) }),
1422
- /* @__PURE__ */ i(sn, { orientation: "vertical", flexItem: !0 })
1483
+ children: /* @__PURE__ */ y(pn, { children: [
1484
+ /* @__PURE__ */ i(gn, { onClick: t, children: /* @__PURE__ */ i(ue, {}) }),
1485
+ /* @__PURE__ */ i(fn, { orientation: "vertical", flexItem: !0 })
1423
1486
  ] })
1424
1487
  }
1425
1488
  )
1426
1489
  );
1427
1490
  }
1428
- const un = p("div")(({ theme: t }) => ({
1491
+ const hn = g("div")(({ theme: t }) => ({
1429
1492
  display: "flex",
1430
1493
  marginRight: t.spacing(1.5),
1431
1494
  "& a": {
@@ -1436,18 +1499,18 @@ const un = p("div")(({ theme: t }) => ({
1436
1499
  height: t.spacing(4)
1437
1500
  }
1438
1501
  }));
1439
- function pn({ logo: t }) {
1440
- return /* @__PURE__ */ i(un, { children: t });
1502
+ function bn({ logo: t }) {
1503
+ return /* @__PURE__ */ i(hn, { children: t });
1441
1504
  }
1442
- const gn = p(w)({
1505
+ const xn = g(S)({
1443
1506
  display: "flex",
1444
1507
  alignItems: "center",
1445
1508
  whiteSpace: "nowrap"
1446
1509
  });
1447
- function fn({ text: t }) {
1510
+ function yn({ text: t }) {
1448
1511
  const e = N();
1449
1512
  return /* @__PURE__ */ i(
1450
- gn,
1513
+ xn,
1451
1514
  {
1452
1515
  component: "span",
1453
1516
  variant: "subtitle1",
@@ -1456,7 +1519,7 @@ function fn({ text: t }) {
1456
1519
  }
1457
1520
  );
1458
1521
  }
1459
- const hn = p(w)(({ theme: t }) => ({
1522
+ const Mn = g(S)(({ theme: t }) => ({
1460
1523
  display: "flex",
1461
1524
  alignItems: "center",
1462
1525
  "&::before": {
@@ -1466,10 +1529,10 @@ const hn = p(w)(({ theme: t }) => ({
1466
1529
  color: t.palette.brand.appBarContrastText
1467
1530
  }
1468
1531
  }));
1469
- function mn({ text: t }) {
1532
+ function Cn({ text: t }) {
1470
1533
  const e = N();
1471
1534
  return /* @__PURE__ */ i(
1472
- hn,
1535
+ Mn,
1473
1536
  {
1474
1537
  component: "span",
1475
1538
  variant: "body2",
@@ -1479,7 +1542,7 @@ function mn({ text: t }) {
1479
1542
  }
1480
1543
  );
1481
1544
  }
1482
- const bn = p(Kt)(({ theme: t }) => ({
1545
+ const vn = g(te)(({ theme: t }) => ({
1483
1546
  backgroundColor: t.palette.brand.appBarMain,
1484
1547
  "& .MuiTypography-root": {
1485
1548
  color: t.palette.brand.appBarContrastText
@@ -1487,7 +1550,7 @@ const bn = p(Kt)(({ theme: t }) => ({
1487
1550
  "& .MuiIconButton-root path": {
1488
1551
  fill: t.palette.brand.appBarContrastText
1489
1552
  }
1490
- })), yn = p("div")(({ theme: t }) => ({
1553
+ })), kn = g("div")(({ theme: t }) => ({
1491
1554
  display: "flex",
1492
1555
  alignItems: "center",
1493
1556
  maxWidth: "calc(100% - 300px)",
@@ -1495,33 +1558,33 @@ const bn = p(Kt)(({ theme: t }) => ({
1495
1558
  [t.breakpoints.down("sm")]: {
1496
1559
  minWidth: "192px"
1497
1560
  }
1498
- })), xn = p("div")(({ theme: t }) => ({
1561
+ })), Dn = g("div")(({ theme: t }) => ({
1499
1562
  display: "flex",
1500
1563
  alignItems: "center",
1501
1564
  justifyContent: "space-between",
1502
1565
  flex: 1,
1503
1566
  marginLeft: t.spacing(1)
1504
1567
  }));
1505
- function ko({
1568
+ function To({
1506
1569
  children: t,
1507
1570
  brandLogo: e,
1508
1571
  brandText: n,
1509
1572
  secondaryText: o,
1510
- showBurgerMenu: r = !1,
1511
- onClickMenu: a,
1573
+ showBurgerMenu: a = !1,
1574
+ onClickMenu: r,
1512
1575
  ...l
1513
1576
  }) {
1514
- return /* @__PURE__ */ i(bn, { ...l, children: /* @__PURE__ */ y(Xt, { children: [
1515
- /* @__PURE__ */ y(yn, { children: [
1516
- r && /* @__PURE__ */ i(dn, { onClickMenu: a }),
1517
- e && /* @__PURE__ */ i(pn, { logo: e }),
1518
- n && /* @__PURE__ */ i(fn, { text: n }),
1519
- o && /* @__PURE__ */ i(mn, { text: o })
1577
+ return /* @__PURE__ */ i(vn, { ...l, children: /* @__PURE__ */ y(Qt, { children: [
1578
+ /* @__PURE__ */ y(kn, { children: [
1579
+ a && /* @__PURE__ */ i(mn, { onClickMenu: r }),
1580
+ e && /* @__PURE__ */ i(bn, { logo: e }),
1581
+ n && /* @__PURE__ */ i(yn, { text: n }),
1582
+ o && /* @__PURE__ */ i(Cn, { text: o })
1520
1583
  ] }),
1521
- /* @__PURE__ */ i(xn, { children: t })
1584
+ /* @__PURE__ */ i(Dn, { children: t })
1522
1585
  ] }) });
1523
1586
  }
1524
- const Mn = p(v, {
1587
+ const An = g(v, {
1525
1588
  shouldForwardProp: (t) => !["size", "variant"].includes(t)
1526
1589
  })(({ size: t, variant: e, theme: n }) => ({
1527
1590
  position: "absolute",
@@ -1538,24 +1601,24 @@ const Mn = p(v, {
1538
1601
  }
1539
1602
  }
1540
1603
  }));
1541
- function K({
1604
+ function Q({
1542
1605
  size: t,
1543
1606
  variant: e,
1544
1607
  ...n
1545
1608
  }) {
1546
- const o = R(), r = $(o);
1547
- return /* @__PURE__ */ i(Mn, { size: t, variant: e, children: /* @__PURE__ */ i(
1548
- F,
1609
+ const o = F(), a = R(o);
1610
+ return /* @__PURE__ */ i(An, { size: t, variant: e, children: /* @__PURE__ */ i(
1611
+ W,
1549
1612
  {
1550
1613
  ...n,
1551
1614
  size: t,
1552
- "aria-label": r.formatMessage({
1615
+ "aria-label": a.formatMessage({
1553
1616
  id: "c4r.form.clearSelection"
1554
1617
  })
1555
1618
  }
1556
1619
  ) });
1557
1620
  }
1558
- const Cn = p(v, {
1621
+ const In = g(v, {
1559
1622
  shouldForwardProp: (t) => !["size", "variant", "readOnly"].includes(t)
1560
1623
  })(({ size: t, variant: e, readOnly: n, theme: o }) => ({
1561
1624
  // There is no specific slot to change TextField styles at DatePicker level, so we need to wrap our component to isolate this override. https://mui.com/x/react-date-pickers/date-picker/#customization
@@ -1588,86 +1651,99 @@ const Cn = p(v, {
1588
1651
  }
1589
1652
  }
1590
1653
  }));
1591
- function Q({
1654
+ function tt({
1592
1655
  children: t,
1593
1656
  size: e,
1594
1657
  variant: n,
1595
1658
  readOnly: o,
1596
- ...r
1659
+ ...a
1597
1660
  }) {
1598
- return /* @__PURE__ */ i(Cn, { ...r, size: e, variant: n, readOnly: o, children: t });
1661
+ return /* @__PURE__ */ i(In, { ...a, size: e, variant: n, readOnly: o, children: t });
1599
1662
  }
1600
- function rt({
1663
+ function at({
1601
1664
  handleClear: t,
1602
1665
  variant: e = "outlined",
1603
1666
  size: n = "small",
1604
1667
  label: o,
1605
- labelHelpTooltip: r,
1606
- type: a,
1668
+ labelHelpTooltip: a,
1669
+ type: r,
1607
1670
  helperText: l,
1608
- placeholder: s,
1609
- slotProps: c,
1610
- slots: d,
1671
+ placeholder: c,
1672
+ slotProps: s,
1673
+ slots: p,
1611
1674
  error: h,
1612
- showCalendar: u = !0,
1613
- readOnly: g,
1614
- ...f
1675
+ showCalendar: d = !0,
1676
+ readOnly: m,
1677
+ "aria-label": u,
1678
+ "data-testid": f,
1679
+ ...M
1615
1680
  }) {
1616
- const m = R(), x = $(m);
1681
+ const b = F(), I = R(b);
1617
1682
  return (
1618
1683
  // Don't remove className, it's used for styling
1619
- /* @__PURE__ */ i(v, { className: "CartoDatePicker-root", "data-testid": "date-picker", children: /* @__PURE__ */ i(Q, { size: n, variant: e, readOnly: g, children: /* @__PURE__ */ i(
1620
- pe,
1684
+ /* @__PURE__ */ i(v, { className: "CartoDatePicker-root", "data-testid": "date-picker", children: /* @__PURE__ */ i(
1685
+ tt,
1621
1686
  {
1622
- ...f,
1623
- label: o && /* @__PURE__ */ i(
1624
- X,
1687
+ size: n,
1688
+ variant: e,
1689
+ readOnly: m,
1690
+ "data-name": "date-picker",
1691
+ "aria-label": u,
1692
+ "data-testid": f,
1693
+ children: /* @__PURE__ */ i(
1694
+ fe,
1625
1695
  {
1626
- label: o,
1627
- type: a,
1628
- icon: r && /* @__PURE__ */ i(W, { title: r, children: /* @__PURE__ */ i(Z, { htmlColor: "text.secondary" }) })
1696
+ ...M,
1697
+ label: o && /* @__PURE__ */ i(
1698
+ K,
1699
+ {
1700
+ label: o,
1701
+ type: r,
1702
+ icon: a && /* @__PURE__ */ i(H, { title: a, children: /* @__PURE__ */ i(J, { htmlColor: "text.secondary" }) })
1703
+ }
1704
+ ),
1705
+ slotProps: {
1706
+ // https://mui.com/x/api/date-pickers/date-picker/#slots
1707
+ textField: {
1708
+ variant: e,
1709
+ helperText: l,
1710
+ placeholder: c,
1711
+ size: n,
1712
+ error: h ?? void 0,
1713
+ // undefined is needed to allow the component to control the error state for the default validation
1714
+ inputProps: {
1715
+ "data-testid": "date-picker-input"
1716
+ }
1717
+ },
1718
+ field: {
1719
+ clearable: !!t,
1720
+ onClear: t
1721
+ },
1722
+ ...s
1723
+ },
1724
+ slots: {
1725
+ clearButton: (k) => /* @__PURE__ */ i(Q, { ...k, size: n, variant: e }),
1726
+ openPickerButton: (k) => /* @__PURE__ */ i(
1727
+ W,
1728
+ {
1729
+ ...k,
1730
+ size: n,
1731
+ "aria-label": I.formatMessage({
1732
+ id: "c4r.form.chooseDate"
1733
+ })
1734
+ }
1735
+ ),
1736
+ ...p
1737
+ },
1738
+ disableOpenPicker: !d,
1739
+ readOnly: m
1629
1740
  }
1630
- ),
1631
- slotProps: {
1632
- // https://mui.com/x/api/date-pickers/date-picker/#slots
1633
- textField: {
1634
- variant: e,
1635
- helperText: l,
1636
- placeholder: s,
1637
- size: n,
1638
- error: h ?? void 0,
1639
- // undefined is needed to allow the component to control the error state for the default validation
1640
- inputProps: {
1641
- "data-testid": "date-picker-input"
1642
- }
1643
- },
1644
- field: {
1645
- clearable: !!t,
1646
- onClear: t
1647
- },
1648
- ...c
1649
- },
1650
- slots: {
1651
- clearButton: (b) => /* @__PURE__ */ i(K, { ...b, size: n, variant: e }),
1652
- openPickerButton: (b) => /* @__PURE__ */ i(
1653
- F,
1654
- {
1655
- ...b,
1656
- size: n,
1657
- "aria-label": x.formatMessage({
1658
- id: "c4r.form.chooseDate"
1659
- })
1660
- }
1661
- ),
1662
- ...d
1663
- },
1664
- disableOpenPicker: !u,
1665
- readOnly: g
1741
+ )
1666
1742
  }
1667
- ) }) })
1743
+ ) })
1668
1744
  );
1669
1745
  }
1670
- const vn = p(v, {
1746
+ const wn = g(v, {
1671
1747
  shouldForwardProp: (t) => ![
1672
1748
  "isSelected",
1673
1749
  "isStartDate",
@@ -1682,8 +1758,8 @@ const vn = p(v, {
1682
1758
  isSelected: e,
1683
1759
  isStartDate: n,
1684
1760
  isEndDate: o,
1685
- isSelectedMonth: r,
1686
- isLastDay: a,
1761
+ isSelectedMonth: a,
1762
+ isLastDay: r,
1687
1763
  isFirstDay: l
1688
1764
  }) => ({
1689
1765
  position: "relative",
@@ -1692,7 +1768,7 @@ const vn = p(v, {
1692
1768
  margin: 0
1693
1769
  },
1694
1770
  // Highlight the selected date range
1695
- ...e && r && {
1771
+ ...e && a && {
1696
1772
  // Creates a continuous background color between start and end date
1697
1773
  "&::before": {
1698
1774
  content: '""',
@@ -1708,7 +1784,7 @@ const vn = p(v, {
1708
1784
  borderRadius: `${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`
1709
1785
  },
1710
1786
  // Selected end date OR last day of the month
1711
- ...(o || a) && {
1787
+ ...(o || r) && {
1712
1788
  right: 0,
1713
1789
  borderRadius: `0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`
1714
1790
  }
@@ -1732,7 +1808,7 @@ const vn = p(v, {
1732
1808
  }
1733
1809
  },
1734
1810
  // Last day of month and first selected day in a week
1735
- ...a && {
1811
+ ...r && {
1736
1812
  "&:first-of-type::before": {
1737
1813
  left: 0,
1738
1814
  right: 0,
@@ -1762,7 +1838,7 @@ const vn = p(v, {
1762
1838
  }
1763
1839
  }
1764
1840
  })
1765
- ), An = p(ge, {
1841
+ ), Bn = g(me, {
1766
1842
  shouldForwardProp: (t) => t !== "isDateRangeLimit"
1767
1843
  })(({ theme: t, isDateRangeLimit: e }) => ({
1768
1844
  "&.MuiPickersDay-root": {
@@ -1782,37 +1858,38 @@ const vn = p(v, {
1782
1858
  }
1783
1859
  }
1784
1860
  }
1785
- }));
1786
- function at({
1861
+ })), rt = (t, e) => !t || !e ? !1 : t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
1862
+ function lt({
1787
1863
  day: t,
1788
1864
  startDate: e,
1789
1865
  endDate: n,
1790
1866
  selectedMonth: o,
1791
- ...r
1867
+ ...a
1792
1868
  }) {
1793
- const a = !!(e && t.getTime() === e.getTime()), l = !!(n && t.getTime() === n.getTime()), s = !!(e && n && t >= e && t <= n), c = t.getDate() === 1, d = t.getDate() === new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate(), h = !!(o && t.getMonth() == o.getMonth());
1869
+ const r = !!(e && rt(e, t)), l = !!(n && rt(n, t)), c = !!(e && n && t.getTime() >= e.getTime() && t.getTime() <= n.getTime()), s = t.getDate() === 1, p = t.getDate() === new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate(), h = !!(o && t.getMonth() === o.getMonth());
1794
1870
  return /* @__PURE__ */ i(
1795
- vn,
1871
+ wn,
1796
1872
  {
1797
- isSelected: s,
1798
- isStartDate: a,
1873
+ isSelected: c,
1874
+ isStartDate: r,
1799
1875
  isEndDate: l,
1800
1876
  isSelectedMonth: h,
1801
- isLastDay: d,
1802
- isFirstDay: c,
1877
+ isLastDay: p,
1878
+ isFirstDay: s,
1803
1879
  children: /* @__PURE__ */ i(
1804
- An,
1880
+ Bn,
1805
1881
  {
1806
- ...r,
1882
+ ...a,
1807
1883
  day: t,
1808
- selected: s || a || l,
1809
- isDateRangeLimit: a || l
1884
+ selected: c || r || l,
1885
+ isDateRangeLimit: r || l,
1886
+ "data-name": "pickers-day"
1810
1887
  }
1811
1888
  )
1812
1889
  }
1813
1890
  );
1814
1891
  }
1815
- const kn = p(v, {
1892
+ const Sn = g(v, {
1816
1893
  shouldForwardProp: (t) => !["variant"].includes(t)
1817
1894
  })(({ variant: t, theme: e }) => ({
1818
1895
  display: "flex",
@@ -1862,178 +1939,197 @@ const kn = p(v, {
1862
1939
  }
1863
1940
  }
1864
1941
  }));
1865
- function Do({
1942
+ function $o({
1866
1943
  globalHelperText: t,
1867
1944
  error: e,
1868
1945
  variant: n = "outlined",
1869
1946
  startProps: o,
1870
- endProps: r,
1871
- ...a
1947
+ endProps: a,
1948
+ "aria-label": r,
1949
+ "data-testid": l,
1950
+ ...c
1872
1951
  }) {
1873
- const l = R(), s = $(l), [c, d] = T(!1), [h, u] = T(!1), [g, f] = T(null), [m, x] = T(null), [b, I] = T(/* @__PURE__ */ new Date()), B = e ?? (o == null ? void 0 : o.error) ?? (r == null ? void 0 : r.error), A = (C, S) => {
1874
- f(C), o != null && o.onChange && o.onChange(C, S), C && S.validationError === null && !h && S.trigger === null && (u(!1), d(!0));
1875
- }, M = (C, S) => {
1876
- x(C), r != null && r.onChange && r.onChange(C, S);
1877
- }, k = () => {
1952
+ const s = F(), p = R(s), [h, d] = $(!1), [m, u] = $(!1), [f, M] = $(
1953
+ (o == null ? void 0 : o.value) || null
1954
+ ), [b, I] = $((a == null ? void 0 : a.value) || null), [k, D] = $(
1955
+ (a == null ? void 0 : a.value) ?? (o == null ? void 0 : o.value) ?? /* @__PURE__ */ new Date()
1956
+ ), x = e ?? (o == null ? void 0 : o.error) ?? (a == null ? void 0 : a.error), C = (A, L) => {
1957
+ M(A), o != null && o.onChange && o.onChange(A, L), A && L.validationError === null && !m && L.trigger === null && (u(!1), d(!0));
1958
+ }, B = (A, L) => {
1959
+ I(A), a != null && a.onChange && a.onChange(A, L);
1960
+ }, O = () => {
1878
1961
  u(!0), d(!1), setTimeout(() => {
1879
- I(g ?? /* @__PURE__ */ new Date());
1962
+ D(f ?? /* @__PURE__ */ new Date());
1880
1963
  }, 120);
1881
- }, D = () => {
1964
+ }, w = () => {
1882
1965
  u(!1), d(!0), setTimeout(() => {
1883
- I(m ?? g ?? /* @__PURE__ */ new Date());
1966
+ D(b ?? f ?? /* @__PURE__ */ new Date());
1884
1967
  }, 120);
1885
- }, L = () => {
1968
+ }, E = () => {
1886
1969
  u(!1), d(!0), setTimeout(() => {
1887
- I(m ?? g ?? /* @__PURE__ */ new Date());
1970
+ D(b ?? f ?? /* @__PURE__ */ new Date());
1888
1971
  }, 120);
1889
1972
  };
1890
1973
  return /* @__PURE__ */ y(v, { children: [
1891
- /* @__PURE__ */ y(kn, { variant: n, children: [
1892
- /* @__PURE__ */ i(
1893
- rt,
1894
- {
1895
- ...a,
1896
- ...o,
1897
- value: (o == null ? void 0 : o.value) ?? g,
1898
- maxDate: m ?? void 0,
1899
- label: (o == null ? void 0 : o.label) ?? s.formatMessage({ id: "c4r.form.startDate" }),
1900
- slotProps: {
1901
- popper: {
1902
- placement: "bottom-start",
1903
- "aria-label": s.formatMessage({
1904
- id: "c4r.form.startDateCalendar"
1905
- })
1906
- },
1907
- ...o == null ? void 0 : o.slotProps
1908
- },
1909
- slots: {
1910
- openPickerIcon: de,
1911
- day: (C) => /* @__PURE__ */ i(
1912
- at,
1913
- {
1914
- ...C,
1915
- startDate: g,
1916
- endDate: m,
1917
- selectedMonth: b
1918
- }
1919
- ),
1920
- ...o == null ? void 0 : o.slots
1921
- },
1922
- error: (o == null ? void 0 : o.error) ?? e,
1923
- open: h,
1924
- onChange: A,
1925
- onOpen: k,
1926
- onClose: D,
1927
- onMonthChange: (C) => I(C),
1928
- variant: n
1929
- }
1930
- ),
1931
- /* @__PURE__ */ i(
1932
- rt,
1933
- {
1934
- ...a,
1935
- ...r,
1936
- value: (r == null ? void 0 : r.value) ?? m,
1937
- minDate: g ?? void 0,
1938
- slotProps: {
1939
- popper: {
1940
- "aria-label": s.formatMessage({
1941
- id: "c4r.form.endDateCalendar"
1942
- })
1943
- },
1944
- ...r == null ? void 0 : r.slotProps
1945
- },
1946
- slots: {
1947
- day: (C) => /* @__PURE__ */ i(
1948
- at,
1949
- {
1950
- ...C,
1951
- startDate: g,
1952
- endDate: m,
1953
- selectedMonth: b
1954
- }
1955
- ),
1956
- ...r == null ? void 0 : r.slots
1957
- },
1958
- label: (r == null ? void 0 : r.label) ?? s.formatMessage({ id: "c4r.form.endDate" }),
1959
- error: (r == null ? void 0 : r.error) ?? e,
1960
- open: c,
1961
- onOpen: L,
1962
- onClose: () => d(!1),
1963
- onChange: M,
1964
- onMonthChange: (C) => I(C),
1965
- variant: n
1966
- }
1967
- )
1968
- ] }),
1969
- t && /* @__PURE__ */ i(ht, { error: B, children: t })
1974
+ /* @__PURE__ */ y(
1975
+ Sn,
1976
+ {
1977
+ variant: n,
1978
+ "data-name": "date-range-picker",
1979
+ "aria-label": r,
1980
+ "data-testid": l,
1981
+ children: [
1982
+ /* @__PURE__ */ i(
1983
+ at,
1984
+ {
1985
+ ...c,
1986
+ ...o,
1987
+ value: (o == null ? void 0 : o.value) ?? f,
1988
+ maxDate: b ?? void 0,
1989
+ label: (o == null ? void 0 : o.label) ?? p.formatMessage({ id: "c4r.form.startDate" }),
1990
+ slotProps: {
1991
+ popper: {
1992
+ placement: "bottom-start",
1993
+ "aria-label": p.formatMessage({
1994
+ id: "c4r.form.startDateCalendar"
1995
+ })
1996
+ },
1997
+ ...o == null ? void 0 : o.slotProps
1998
+ },
1999
+ slots: {
2000
+ openPickerIcon: pe,
2001
+ day: (A) => /* @__PURE__ */ i(
2002
+ lt,
2003
+ {
2004
+ ...A,
2005
+ startDate: f,
2006
+ endDate: b,
2007
+ selectedMonth: k
2008
+ }
2009
+ ),
2010
+ ...o == null ? void 0 : o.slots
2011
+ },
2012
+ error: (o == null ? void 0 : o.error) ?? e,
2013
+ open: m,
2014
+ onChange: C,
2015
+ onOpen: O,
2016
+ onClose: w,
2017
+ onMonthChange: (A) => D(A),
2018
+ variant: n
2019
+ }
2020
+ ),
2021
+ /* @__PURE__ */ i(
2022
+ at,
2023
+ {
2024
+ ...c,
2025
+ ...a,
2026
+ value: (a == null ? void 0 : a.value) ?? b,
2027
+ minDate: f ?? void 0,
2028
+ slotProps: {
2029
+ popper: {
2030
+ "aria-label": p.formatMessage({
2031
+ id: "c4r.form.endDateCalendar"
2032
+ })
2033
+ },
2034
+ ...a == null ? void 0 : a.slotProps
2035
+ },
2036
+ slots: {
2037
+ day: (A) => /* @__PURE__ */ i(
2038
+ lt,
2039
+ {
2040
+ ...A,
2041
+ startDate: f,
2042
+ endDate: b,
2043
+ selectedMonth: k
2044
+ }
2045
+ ),
2046
+ ...a == null ? void 0 : a.slots
2047
+ },
2048
+ label: (a == null ? void 0 : a.label) ?? p.formatMessage({ id: "c4r.form.endDate" }),
2049
+ error: (a == null ? void 0 : a.error) ?? e,
2050
+ open: h,
2051
+ onOpen: E,
2052
+ onClose: () => d(!1),
2053
+ onChange: B,
2054
+ onMonthChange: (A) => D(A),
2055
+ variant: n
2056
+ }
2057
+ )
2058
+ ]
2059
+ }
2060
+ ),
2061
+ t && /* @__PURE__ */ i(ht, { error: x, children: t })
1970
2062
  ] });
1971
2063
  }
1972
- const St = (t, e, n, o) => {
1973
- const r = t == null ? void 0 : t.includes("hours"), a = t == null ? void 0 : t.includes("seconds"), l = t == null ? void 0 : t.includes("minutes"), s = (t == null ? void 0 : t.length) === 1 && t[0] === "hours";
2064
+ const $t = (t, e, n, o) => {
2065
+ const a = t == null ? void 0 : t.includes("hours"), r = t == null ? void 0 : t.includes("seconds"), l = t == null ? void 0 : t.includes("minutes"), c = (t == null ? void 0 : t.length) === 1 && t[0] === "hours";
1974
2066
  if (o) return o;
1975
- const c = [];
1976
- return e && c.push("MM/dd/yyyy "), r && c.push(n ? "hh" : "HH"), s || c.push(":"), l && c.push("mm"), a && c.push(":ss"), n && c.push(" a"), c.join("");
2067
+ const s = [];
2068
+ return e && s.push("MM/dd/yyyy "), a && s.push(n ? "hh" : "HH"), c || s.push(":"), l && s.push("mm"), r && s.push(":ss"), n && s.push(" a"), s.join("");
1977
2069
  };
1978
- function Io({
2070
+ function Ro({
1979
2071
  handleClear: t,
1980
2072
  variant: e = "outlined",
1981
2073
  size: n = "small",
1982
2074
  label: o,
1983
- labelHelpTooltip: r,
1984
- type: a,
2075
+ labelHelpTooltip: a,
2076
+ type: r,
1985
2077
  helperText: l,
1986
- placeholder: s,
1987
- error: c,
1988
- showClock: d = !0,
2078
+ placeholder: c,
2079
+ error: s,
2080
+ showClock: p = !0,
1989
2081
  readOnly: h,
1990
- slotProps: u,
1991
- slots: g,
1992
- ampm: f = !0,
1993
- views: m = ["hours", "minutes"],
1994
- format: x,
1995
- ...b
2082
+ slotProps: d,
2083
+ slots: m,
2084
+ ampm: u = !0,
2085
+ views: f = ["hours", "minutes"],
2086
+ format: M,
2087
+ "data-testid": b,
2088
+ "aria-label": I,
2089
+ ...k
1996
2090
  }) {
1997
- const I = R(), B = $(I), A = U(null), [M, k] = T(0);
1998
- return E(() => {
1999
- if (!A.current) return;
2000
- const D = new ResizeObserver((L) => {
2001
- var S;
2002
- const C = (S = L[0]) == null ? void 0 : S.contentRect.width;
2003
- C && k(C);
2091
+ const D = F(), x = R(D), C = Y(null), [B, O] = $(0);
2092
+ return _(() => {
2093
+ if (!C.current) return;
2094
+ const w = new ResizeObserver((E) => {
2095
+ var L;
2096
+ const A = (L = E[0]) == null ? void 0 : L.contentRect.width;
2097
+ A && O(A);
2004
2098
  });
2005
- return D.observe(A.current), () => {
2006
- D.disconnect();
2099
+ return w.observe(C.current), () => {
2100
+ w.disconnect();
2007
2101
  };
2008
2102
  }, []), /* @__PURE__ */ i(
2009
- Q,
2103
+ tt,
2010
2104
  {
2011
2105
  size: n,
2012
2106
  variant: e,
2013
2107
  readOnly: h,
2014
- "data-testid": "time-picker",
2108
+ "data-name": "time-picker",
2109
+ "data-testid": b ?? "time-picker",
2110
+ "aria-label": I,
2015
2111
  children: /* @__PURE__ */ i(
2016
- fe,
2112
+ he,
2017
2113
  {
2018
- ...b,
2019
- ref: A,
2114
+ ...k,
2115
+ ref: C,
2020
2116
  label: /* @__PURE__ */ i(
2021
- X,
2117
+ K,
2022
2118
  {
2023
- label: o ?? B.formatMessage({ id: "c4r.form.time" }),
2024
- type: a,
2025
- icon: r && /* @__PURE__ */ i(W, { title: r, children: /* @__PURE__ */ i(Z, { htmlColor: "text.secondary" }) })
2119
+ label: o ?? x.formatMessage({ id: "c4r.form.time" }),
2120
+ type: r,
2121
+ icon: a && /* @__PURE__ */ i(H, { title: a, children: /* @__PURE__ */ i(J, { htmlColor: "text.secondary" }) })
2026
2122
  }
2027
2123
  ),
2028
2124
  views: ["hours"],
2029
- format: St(m, !1, f, x),
2125
+ format: $t(f, !1, u, M),
2030
2126
  slotProps: {
2031
2127
  textField: {
2032
2128
  variant: e,
2033
2129
  helperText: l,
2034
- placeholder: s,
2130
+ placeholder: c,
2035
2131
  size: n,
2036
- error: c ?? void 0,
2132
+ error: s ?? void 0,
2037
2133
  // undefined is needed to allow the component to control the error state for the default validation
2038
2134
  inputProps: {
2039
2135
  "data-testid": "time-picker-input"
@@ -2048,81 +2144,85 @@ function Io({
2048
2144
  },
2049
2145
  layout: {
2050
2146
  sx: {
2051
- width: M
2147
+ width: B
2052
2148
  }
2053
2149
  },
2054
- ...u
2150
+ ...d
2055
2151
  },
2056
2152
  slots: {
2057
- clearButton: (D) => /* @__PURE__ */ i(K, { ...D, size: n, variant: e }),
2058
- openPickerButton: (D) => /* @__PURE__ */ i(
2059
- F,
2153
+ clearButton: (w) => /* @__PURE__ */ i(Q, { ...w, size: n, variant: e }),
2154
+ openPickerButton: (w) => /* @__PURE__ */ i(
2155
+ W,
2060
2156
  {
2061
- ...D,
2157
+ ...w,
2062
2158
  size: n,
2063
- "aria-label": B.formatMessage({
2159
+ "aria-label": x.formatMessage({
2064
2160
  id: "c4r.form.chooseDate"
2065
2161
  })
2066
2162
  }
2067
2163
  ),
2068
- ...g
2164
+ ...m
2069
2165
  },
2070
- disableOpenPicker: !d,
2166
+ disableOpenPicker: !p,
2071
2167
  readOnly: h,
2072
- ampm: f
2168
+ ampm: u
2073
2169
  }
2074
2170
  )
2075
2171
  }
2076
2172
  );
2077
2173
  }
2078
- function Bo({
2174
+ function Fo({
2079
2175
  handleClear: t,
2080
2176
  variant: e = "outlined",
2081
2177
  size: n = "small",
2082
2178
  label: o,
2083
- labelHelpTooltip: r,
2084
- type: a,
2179
+ labelHelpTooltip: a,
2180
+ type: r,
2085
2181
  helperText: l,
2086
- placeholder: s,
2087
- error: c,
2088
- showCalendar: d = !0,
2182
+ placeholder: c,
2183
+ error: s,
2184
+ showCalendar: p = !0,
2089
2185
  readOnly: h,
2090
- slotProps: u,
2091
- slots: g,
2092
- ampm: f = !0,
2093
- views: m = ["hours", "minutes"],
2094
- format: x,
2095
- ...b
2186
+ slotProps: d,
2187
+ slots: m,
2188
+ ampm: u = !0,
2189
+ views: f = ["hours", "minutes"],
2190
+ format: M,
2191
+ "data-testid": b,
2192
+ "aria-label": I,
2193
+ ...k
2096
2194
  }) {
2097
- const I = R(), B = $(I);
2195
+ const D = F(), x = R(D);
2098
2196
  return /* @__PURE__ */ i(
2099
- Q,
2197
+ tt,
2100
2198
  {
2101
2199
  size: n,
2102
2200
  variant: e,
2103
2201
  readOnly: h,
2104
- "data-testid": "date-time-picker",
2202
+ "data-name": "date-time-picker",
2203
+ "data-testid": b ?? "date-time-picker",
2204
+ "aria-label": I,
2105
2205
  children: /* @__PURE__ */ i(
2106
- he,
2206
+ be,
2107
2207
  {
2108
- ...b,
2208
+ ...k,
2109
2209
  label: /* @__PURE__ */ i(
2110
- X,
2210
+ K,
2111
2211
  {
2112
- label: o ?? B.formatMessage({ id: "c4r.form.time" }),
2113
- type: a,
2114
- icon: r && /* @__PURE__ */ i(W, { title: r, children: /* @__PURE__ */ i(Z, { htmlColor: "text.secondary" }) })
2212
+ label: o ?? x.formatMessage({ id: "c4r.form.time" }),
2213
+ type: r,
2214
+ icon: a && /* @__PURE__ */ i(H, { title: a, children: /* @__PURE__ */ i(J, { htmlColor: "text.secondary" }) })
2115
2215
  }
2116
2216
  ),
2117
2217
  views: ["year", "month", "day", "hours"],
2118
- format: St(m, !0, f, x),
2218
+ format: $t(f, !0, u, M),
2119
2219
  slotProps: {
2120
2220
  textField: {
2121
2221
  variant: e,
2122
2222
  helperText: l,
2123
- placeholder: s,
2223
+ placeholder: c,
2124
2224
  size: n,
2125
- error: c ?? void 0,
2225
+ error: s ?? void 0,
2126
2226
  // undefined is needed to allow the component to control the error state for the default validation
2127
2227
  inputProps: {
2128
2228
  "data-testid": "date-time-picker-input"
@@ -2132,61 +2232,61 @@ function Bo({
2132
2232
  clearable: !!t,
2133
2233
  onClear: t
2134
2234
  },
2135
- ...u
2235
+ ...d
2136
2236
  },
2137
2237
  slots: {
2138
- clearButton: (A) => /* @__PURE__ */ i(K, { ...A, size: n, variant: e }),
2139
- openPickerButton: (A) => /* @__PURE__ */ i(
2140
- F,
2238
+ clearButton: (C) => /* @__PURE__ */ i(Q, { ...C, size: n, variant: e }),
2239
+ openPickerButton: (C) => /* @__PURE__ */ i(
2240
+ W,
2141
2241
  {
2142
- ...A,
2242
+ ...C,
2143
2243
  size: n,
2144
- "aria-label": B.formatMessage({
2244
+ "aria-label": x.formatMessage({
2145
2245
  id: "c4r.form.chooseDate"
2146
2246
  })
2147
2247
  }
2148
2248
  ),
2149
- ...g
2249
+ ...m
2150
2250
  },
2151
- disableOpenPicker: !d,
2251
+ disableOpenPicker: !p,
2152
2252
  readOnly: h,
2153
- ampm: f
2253
+ ampm: u
2154
2254
  }
2155
2255
  )
2156
2256
  }
2157
2257
  );
2158
2258
  }
2159
- const Dn = [{ outlinedBullet: !1, value: "" }], In = p("ul")(({ theme: t }) => ({
2259
+ const Tn = [{ outlinedBullet: !1, value: "" }], $n = g("ul")(({ theme: t }) => ({
2160
2260
  listStyle: "none",
2161
2261
  paddingLeft: 0,
2162
2262
  margin: t.spacing(0.5, 0, 0, 0)
2163
- })), Bn = p("li")(({ theme: t }) => ({
2263
+ })), Rn = g("li")(({ theme: t }) => ({
2164
2264
  display: "flex",
2165
2265
  alignItems: "center",
2166
2266
  justifyContent: "space-between",
2167
2267
  "&:not(:last-child)": {
2168
2268
  marginBottom: t.spacing(0.5)
2169
2269
  }
2170
- })), wn = p("span")(({ theme: t }) => ({
2270
+ })), Fn = g("span")(({ theme: t }) => ({
2171
2271
  width: t.spacing(1),
2172
2272
  height: t.spacing(1),
2173
2273
  marginRight: t.spacing(0.5),
2174
2274
  border: `2px solid ${t.palette.qualitative.bold[1]}`,
2175
2275
  borderRadius: "50%",
2176
2276
  backgroundColor: t.palette.qualitative.bold[1]
2177
- })), Sn = p(w)(({ theme: t }) => ({
2277
+ })), On = g(S)(({ theme: t }) => ({
2178
2278
  minWidth: t.spacing(10),
2179
2279
  marginRight: t.spacing(1.5)
2180
2280
  }));
2181
- function wo({
2182
- items: t = Dn,
2281
+ function Oo({
2282
+ items: t = Tn,
2183
2283
  title: e
2184
2284
  }) {
2185
- return /* @__PURE__ */ y(j, { children: [
2186
- e && /* @__PURE__ */ i(w, { color: "inherit", variant: "caption", weight: "medium", children: e }),
2187
- /* @__PURE__ */ i(In, { children: t.map((n, o) => /* @__PURE__ */ y(Bn, { children: [
2285
+ return /* @__PURE__ */ y(V, { children: [
2286
+ e && /* @__PURE__ */ i(S, { color: "inherit", variant: "caption", weight: "medium", children: e }),
2287
+ /* @__PURE__ */ i($n, { children: t.map((n, o) => /* @__PURE__ */ y(Rn, { children: [
2188
2288
  /* @__PURE__ */ i(
2189
- wn,
2289
+ Fn,
2190
2290
  {
2191
2291
  style: {
2192
2292
  backgroundColor: `${n.outlinedBullet ? "transparent" : n.color}`,
@@ -2194,17 +2294,17 @@ function wo({
2194
2294
  }
2195
2295
  }
2196
2296
  ),
2197
- n.category && /* @__PURE__ */ i(Sn, { color: "inherit", variant: "caption", children: n.category }),
2198
- /* @__PURE__ */ i(w, { color: "inherit", variant: "caption", weight: "medium", children: n.value })
2297
+ n.category && /* @__PURE__ */ i(On, { color: "inherit", variant: "caption", children: n.category }),
2298
+ /* @__PURE__ */ i(S, { color: "inherit", variant: "caption", weight: "medium", children: n.value })
2199
2299
  ] }, o)) })
2200
2300
  ] });
2201
2301
  }
2202
- const lt = {
2302
+ const ct = {
2203
2303
  small: "480px",
2204
2304
  medium: "640px",
2205
2305
  large: "640px",
2206
2306
  xlarge: "720px"
2207
- }, ct = {
2307
+ }, st = {
2208
2308
  small: {
2209
2309
  width: "432px",
2210
2310
  maxWidth: "432px"
@@ -2223,7 +2323,7 @@ const lt = {
2223
2323
  height: "calc(100vh - 80px)",
2224
2324
  maxWidth: "960px"
2225
2325
  }
2226
- }, st = p(Qt, {
2326
+ }, dt = g(ee, {
2227
2327
  shouldForwardProp: (t) => !["fullScreen", "height", "width", "hasForm"].includes(t)
2228
2328
  })(
2229
2329
  ({
@@ -2231,30 +2331,30 @@ const lt = {
2231
2331
  height: e,
2232
2332
  width: n,
2233
2333
  hasForm: o,
2234
- size: r = "small",
2235
- theme: a
2334
+ size: a = "small",
2335
+ theme: r
2236
2336
  }) => ({
2237
2337
  "&.MuiPaper-root": {
2238
2338
  position: "relative",
2239
2339
  display: "flex",
2240
2340
  flexDirection: "column",
2241
- margin: a.spacing(5),
2242
- borderRadius: a.spacing(1),
2243
- ...ct[r],
2244
- maxHeight: lt[r],
2245
- [`@media (max-height:${lt[r]})`]: {
2341
+ margin: r.spacing(5),
2342
+ borderRadius: r.spacing(1),
2343
+ ...st[a],
2344
+ maxHeight: ct[a],
2345
+ [`@media (max-height:${ct[a]})`]: {
2246
2346
  maxHeight: "calc(100vh - 80px)",
2247
- ...r === "large" && {
2347
+ ...a === "large" && {
2248
2348
  minHeight: e !== "auto" ? "calc(100vh - 80px)" : "auto"
2249
2349
  }
2250
2350
  },
2251
2351
  ...t && {
2252
2352
  width: "100vw",
2253
- maxWidth: `calc(100vw - ${a.spacing(10)})`,
2353
+ maxWidth: `calc(100vw - ${r.spacing(10)})`,
2254
2354
  height: "100vh",
2255
- maxHeight: `calc(100vh - ${a.spacing(10)})`,
2256
- margin: a.spacing(5),
2257
- borderRadius: a.spacing(1)
2355
+ maxHeight: `calc(100vh - ${r.spacing(10)})`,
2356
+ margin: r.spacing(5),
2357
+ borderRadius: r.spacing(1)
2258
2358
  },
2259
2359
  ...e && {
2260
2360
  height: e,
@@ -2263,7 +2363,7 @@ const lt = {
2263
2363
  ...n && {
2264
2364
  width: n
2265
2365
  },
2266
- [a.breakpoints.down("sm")]: {
2366
+ [r.breakpoints.down("sm")]: {
2267
2367
  position: "absolute",
2268
2368
  width: "100%",
2269
2369
  maxWidth: "100%",
@@ -2277,21 +2377,21 @@ const lt = {
2277
2377
  borderRadius: 0,
2278
2378
  ...e && {
2279
2379
  top: "auto",
2280
- borderRadius: a.spacing(1, 1, 0, 0),
2380
+ borderRadius: r.spacing(1, 1, 0, 0),
2281
2381
  height: e,
2282
2382
  minHeight: e
2283
2383
  }
2284
2384
  },
2285
2385
  // Special case for Dialogs wrapped in Form
2286
2386
  ...o && {
2287
- maxHeight: `calc(100vh - ${a.spacing(10)})`,
2387
+ maxHeight: `calc(100vh - ${r.spacing(10)})`,
2288
2388
  form: {
2289
2389
  flex: 1,
2290
2390
  display: "flex",
2291
2391
  flexDirection: "column",
2292
2392
  justifyContent: "space-between",
2293
2393
  overflow: "hidden",
2294
- ...ct[r],
2394
+ ...st[a],
2295
2395
  maxWidth: "100%",
2296
2396
  ...t && {
2297
2397
  width: "100%",
@@ -2306,14 +2406,14 @@ const lt = {
2306
2406
  ...n && {
2307
2407
  width: n
2308
2408
  },
2309
- [a.breakpoints.down("sm")]: {
2409
+ [r.breakpoints.down("sm")]: {
2310
2410
  width: "100%",
2311
2411
  maxWidth: "100%",
2312
2412
  height: "100vh",
2313
2413
  maxHeight: "100vh",
2314
2414
  ...e && {
2315
2415
  top: "auto",
2316
- borderRadius: a.spacing(1, 1, 0, 0),
2416
+ borderRadius: r.spacing(1, 1, 0, 0),
2317
2417
  height: e,
2318
2418
  minHeight: e
2319
2419
  }
@@ -2323,123 +2423,128 @@ const lt = {
2323
2423
  }
2324
2424
  })
2325
2425
  );
2326
- function So({
2426
+ function Ln({
2327
2427
  nonModal: t,
2328
2428
  children: e,
2329
2429
  size: n = "small",
2330
2430
  PaperProps: o,
2331
- fullScreen: r,
2332
- height: a,
2431
+ fullScreen: a,
2432
+ height: r,
2333
2433
  width: l,
2334
- hasForm: s,
2335
- "aria-label": c,
2336
- "data-testid": d,
2434
+ hasForm: c,
2435
+ "aria-label": s,
2436
+ "data-testid": p,
2337
2437
  ...h
2338
- }) {
2438
+ }, d) {
2339
2439
  return t ? /* @__PURE__ */ i(
2340
- st,
2440
+ dt,
2341
2441
  {
2342
2442
  size: n,
2343
- fullScreen: r,
2344
- height: a,
2443
+ fullScreen: a,
2444
+ height: r,
2345
2445
  width: l,
2346
- hasForm: s,
2347
- "aria-label": c,
2348
- "data-testid": d,
2446
+ hasForm: c,
2447
+ "aria-label": s,
2448
+ "data-testid": p,
2449
+ "data-name": "dialog",
2349
2450
  ...h,
2451
+ ref: d,
2350
2452
  children: e
2351
2453
  }
2352
2454
  ) : /* @__PURE__ */ i(
2353
- te,
2455
+ ne,
2354
2456
  {
2355
- PaperComponent: st,
2457
+ PaperComponent: dt,
2356
2458
  PaperProps: {
2357
2459
  ...o,
2358
2460
  size: n,
2359
- fullScreen: r,
2360
- height: a,
2461
+ fullScreen: a,
2462
+ height: r,
2361
2463
  width: l,
2362
- hasForm: s
2464
+ hasForm: c
2363
2465
  },
2364
- fullScreen: r,
2466
+ fullScreen: a,
2365
2467
  role: "section",
2366
- "aria-label": c,
2367
- "data-testid": d,
2468
+ "aria-label": s,
2469
+ "data-testid": p,
2368
2470
  "data-size": n,
2369
2471
  "data-width": l,
2370
- "data-height": a,
2472
+ "data-height": r,
2473
+ "data-name": "dialog",
2371
2474
  ...h,
2475
+ ref: d,
2372
2476
  children: e
2373
2477
  }
2374
2478
  );
2375
2479
  }
2376
- const Tn = p(ee)(() => ({
2480
+ const Lo = T(Ln), Wn = g(oe)(() => ({
2377
2481
  padding: 0,
2378
2482
  zIndex: 10
2379
- })), $n = p(v)(({ theme: t }) => ({
2483
+ })), En = g(v)(({ theme: t }) => ({
2380
2484
  display: "flex",
2381
2485
  alignItems: "center",
2382
2486
  justifyContent: "space-between",
2383
2487
  padding: t.spacing(2),
2384
2488
  minHeight: t.spacing(8)
2385
- })), dt = p(v)(({ theme: t }) => ({
2489
+ })), ut = g(v)(({ theme: t }) => ({
2386
2490
  display: "flex",
2387
2491
  alignItems: "center",
2388
2492
  gap: t.spacing(1),
2389
2493
  overflow: "hidden"
2390
- })), Rn = p(xt)(({ theme: t }) => ({
2494
+ })), Hn = g(Mt)(({ theme: t }) => ({
2391
2495
  color: t.palette.text.secondary
2392
- })), Fn = p(G)(() => ({
2496
+ })), _n = g(j)(() => ({
2393
2497
  "+ .MuiDialogContent-root": {
2394
2498
  borderTop: "none !important"
2395
2499
  }
2396
2500
  }));
2397
- function To({
2501
+ function Wo({
2398
2502
  title: t,
2399
2503
  chipLabel: e,
2400
2504
  chipProps: n,
2401
2505
  children: o,
2402
- onClose: r,
2403
- secondaryActions: a,
2506
+ onClose: a,
2507
+ secondaryActions: r,
2404
2508
  "aria-label": l,
2405
- closeIcon: s,
2406
- ...c
2509
+ closeIcon: c,
2510
+ ...s
2407
2511
  }) {
2408
- const d = R(), h = $(d);
2409
- return /* @__PURE__ */ y(j, { children: [
2410
- /* @__PURE__ */ y(Tn, { component: "div", ...c, children: [
2411
- /* @__PURE__ */ y($n, { children: [
2412
- /* @__PURE__ */ y(dt, { flex: 1, maxWidth: 0.8, children: [
2512
+ const p = F(), h = R(p);
2513
+ return /* @__PURE__ */ y(V, { children: [
2514
+ /* @__PURE__ */ y(Wn, { component: "div", "data-name": "dialog-header", ...s, children: [
2515
+ /* @__PURE__ */ y(En, { children: [
2516
+ /* @__PURE__ */ y(ut, { flex: 1, maxWidth: 0.8, children: [
2413
2517
  /* @__PURE__ */ i(
2414
- w,
2518
+ S,
2415
2519
  {
2416
2520
  component: "h2",
2417
2521
  variant: "inherit",
2418
2522
  noWrap: !0,
2419
2523
  "aria-label": l,
2524
+ role: "heading",
2420
2525
  children: t
2421
2526
  }
2422
2527
  ),
2423
- e && /* @__PURE__ */ i(ne, { color: "default", label: e, ...n })
2528
+ e && /* @__PURE__ */ i(ie, { color: "default", label: e, ...n })
2424
2529
  ] }),
2425
- /* @__PURE__ */ y(dt, { children: [
2426
- a,
2427
- r && /* @__PURE__ */ i(
2428
- W,
2530
+ /* @__PURE__ */ y(ut, { children: [
2531
+ r,
2532
+ a && /* @__PURE__ */ i(
2533
+ H,
2429
2534
  {
2430
2535
  title: h.formatMessage({ id: "c4r.button.close" }),
2431
2536
  placement: "left",
2432
- children: /* @__PURE__ */ i(F, { onClick: r, children: s || /* @__PURE__ */ i(Rn, { "data-testid": "CloseIcon" }) })
2537
+ children: /* @__PURE__ */ i(W, { onClick: a, children: c || /* @__PURE__ */ i(Hn, { "data-testid": "CloseIcon" }) })
2433
2538
  }
2434
2539
  )
2435
2540
  ] })
2436
2541
  ] }),
2437
2542
  o
2438
2543
  ] }),
2439
- o && /* @__PURE__ */ i(Fn, {})
2544
+ o && /* @__PURE__ */ i(_n, {})
2440
2545
  ] });
2441
2546
  }
2442
- const On = p(oe, {
2547
+ const Pn = g(ae, {
2443
2548
  shouldForwardProp: (t) => !["scrollableContent", "withGutter", "withBottomGutter"].includes(t)
2444
2549
  })(({ theme: t, scrollableContent: e, withGutter: n, withBottomGutter: o }) => ({
2445
2550
  display: "flex",
@@ -2470,62 +2575,63 @@ const On = p(oe, {
2470
2575
  }
2471
2576
  }
2472
2577
  }));
2473
- function Ln({
2578
+ function Gn({
2474
2579
  children: t,
2475
2580
  scrollableContent: e,
2476
2581
  hasFooterAlert: n,
2477
2582
  withGutter: o = !0,
2478
- withBottomGutter: r = !0,
2479
- onScroll: a,
2583
+ withBottomGutter: a = !0,
2584
+ onScroll: r,
2480
2585
  ...l
2481
- }, s) {
2482
- const c = N(), [d, h] = T(null);
2483
- Ft(
2484
- s,
2485
- () => d,
2486
- [d]
2586
+ }, c) {
2587
+ const s = N(), [p, h] = $(null);
2588
+ Lt(
2589
+ c,
2590
+ () => p,
2591
+ [p]
2487
2592
  );
2488
- const u = nt(
2489
- (f) => {
2490
- const m = Math.abs(f.scrollHeight - f.clientHeight - f.scrollTop) < 1, x = f.scrollTop === 0, b = `1px solid ${c.palette.divider}`;
2491
- f.style.borderTop = x ? "none" : b, f.style.borderBottom = m && !n ? "none" : b;
2593
+ const d = nt(
2594
+ (u) => {
2595
+ const f = Math.abs(u.scrollHeight - u.clientHeight - u.scrollTop) < 1, M = u.scrollTop === 0, b = `1px solid ${s.palette.divider}`;
2596
+ u.style.borderTop = M ? "none" : b, u.style.borderBottom = f && !n ? "none" : b;
2492
2597
  },
2493
- [c.palette.divider, n]
2494
- ), g = nt(
2495
- (f) => {
2496
- u(f.target), a == null || a(f);
2598
+ [s.palette.divider, n]
2599
+ ), m = nt(
2600
+ (u) => {
2601
+ d(u.target), r == null || r(u);
2497
2602
  },
2498
- [u, a]
2603
+ [d, r]
2499
2604
  );
2500
- return E(() => {
2501
- d && u(d);
2502
- }, [d, u]), E(() => {
2503
- if (!d || typeof ResizeObserver > "u") return;
2504
- const f = new ResizeObserver(() => {
2505
- u(d);
2605
+ return _(() => {
2606
+ p && d(p);
2607
+ }, [p, d]), _(() => {
2608
+ if (!p || typeof ResizeObserver > "u") return;
2609
+ const u = new ResizeObserver(() => {
2610
+ d(p);
2506
2611
  });
2507
- return f.observe(d), () => f.disconnect();
2508
- }, [d, u]), /* @__PURE__ */ i(
2509
- On,
2612
+ return u.observe(p), () => u.disconnect();
2613
+ }, [p, d]), /* @__PURE__ */ i(
2614
+ Pn,
2510
2615
  {
2511
2616
  ref: h,
2512
- onScroll: g,
2617
+ onScroll: m,
2513
2618
  scrollableContent: e,
2514
2619
  withGutter: o,
2515
- withBottomGutter: r && o,
2620
+ withBottomGutter: a && o,
2621
+ "data-name": "dialog-content",
2516
2622
  ...l,
2517
2623
  children: t
2518
2624
  }
2519
2625
  );
2520
2626
  }
2521
- const Wn = O(Ln), $o = p(Wn, {
2627
+ const jn = T(Gn), Eo = g(jn, {
2522
2628
  shouldForwardProp: (t) => t !== "withAlert"
2523
2629
  })(({ withAlert: t, theme: e }) => ({
2524
2630
  padding: `${e.spacing(0, 2)} !important`,
2525
2631
  ...t && {
2526
2632
  paddingBottom: `${e.spacing(3)} !important`
2527
2633
  }
2528
- })), Pn = p(Mt)(({ theme: t }) => ({
2634
+ })), Vn = g(Ct)(({ theme: t }) => ({
2529
2635
  minHeight: "auto",
2530
2636
  padding: 0,
2531
2637
  backgroundColor: "transparent",
@@ -2539,14 +2645,14 @@ const Wn = O(Ln), $o = p(Wn, {
2539
2645
  color: t.palette.text.primary
2540
2646
  }
2541
2647
  }));
2542
- function Tt({
2648
+ function Rt({
2543
2649
  children: t,
2544
2650
  severity: e = "neutral",
2545
2651
  ...n
2546
2652
  }) {
2547
- return /* @__PURE__ */ i(Pn, { severity: e, ...n, children: t });
2653
+ return /* @__PURE__ */ i(Vn, { severity: e, ...n, "data-name": "dialog-alert", children: t });
2548
2654
  }
2549
- const En = p(v, {
2655
+ const Nn = g(v, {
2550
2656
  shouldForwardProp: (t) => !["dark", "hasChildren"].includes(t)
2551
2657
  })(({ dark: t, hasChildren: e, theme: n }) => ({
2552
2658
  flex: "0 0 auto",
@@ -2568,14 +2674,14 @@ const En = p(v, {
2568
2674
  }
2569
2675
  }
2570
2676
  }
2571
- })), Hn = p(v)(() => ({
2677
+ })), Un = g(v)(() => ({
2572
2678
  display: "flex",
2573
2679
  alignItems: "center",
2574
2680
  justifyContent: "space-between",
2575
2681
  "& > div:empty": {
2576
2682
  padding: 0
2577
2683
  }
2578
- })), _n = p(v, {
2684
+ })), Yn = g(v, {
2579
2685
  shouldForwardProp: (t) => t !== "hasAlert"
2580
2686
  })(({ hasAlert: t, theme: e }) => ({
2581
2687
  display: "flex",
@@ -2583,7 +2689,7 @@ const En = p(v, {
2583
2689
  gap: e.spacing(1),
2584
2690
  padding: e.spacing(2),
2585
2691
  paddingTop: t ? 0 : e.spacing(2)
2586
- })), $t = p(ie, {
2692
+ })), Ft = g(re, {
2587
2693
  shouldForwardProp: (t) => t !== "hasAlert"
2588
2694
  })(({ hasAlert: t, theme: e }) => ({
2589
2695
  gap: e.spacing(1),
@@ -2593,41 +2699,42 @@ const En = p(v, {
2593
2699
  ".MuiButton-root + .MuiButton-root": {
2594
2700
  marginLeft: 0
2595
2701
  }
2596
- })), Gn = p(G)(() => ({
2702
+ })), qn = g(j)(() => ({
2597
2703
  // To prevent double border in the top when content is scrollable
2598
2704
  marginTop: "-1px"
2599
2705
  }));
2600
- function Ro({
2706
+ function Ho({
2601
2707
  children: t,
2602
2708
  secondaryActions: e,
2603
2709
  alertContent: n,
2604
2710
  alertProps: o,
2605
- dark: r,
2606
- topContent: a,
2711
+ dark: a,
2712
+ topContent: r,
2607
2713
  ...l
2608
2714
  }) {
2609
- return /* @__PURE__ */ y(j, { children: [
2610
- a,
2611
- !!n && /* @__PURE__ */ i(Gn, {}),
2715
+ return /* @__PURE__ */ y(V, { children: [
2716
+ r,
2717
+ !!n && /* @__PURE__ */ i(qn, {}),
2612
2718
  /* @__PURE__ */ y(
2613
- En,
2719
+ Nn,
2614
2720
  {
2615
2721
  ...l,
2616
- dark: r,
2617
- "data-theme": r ? "dark" : "light",
2722
+ dark: a,
2723
+ "data-theme": a ? "dark" : "light",
2724
+ "data-name": "dialog-footer",
2618
2725
  hasChildren: !!t,
2619
2726
  children: [
2620
- !!n && /* @__PURE__ */ i(v, { sx: { p: 2, pt: 1.5, pb: 1 }, children: /* @__PURE__ */ i(Tt, { ...o, children: n }) }),
2621
- /* @__PURE__ */ y(Hn, { children: [
2622
- /* @__PURE__ */ i(_n, { hasAlert: !!n, children: e }),
2623
- /* @__PURE__ */ i($t, { hasAlert: !!n, children: t })
2727
+ !!n && /* @__PURE__ */ i(v, { sx: { p: 2, pt: 1.5, pb: 1 }, children: /* @__PURE__ */ i(Rt, { ...o, children: n }) }),
2728
+ /* @__PURE__ */ y(Un, { children: [
2729
+ /* @__PURE__ */ i(Yn, { hasAlert: !!n, children: e }),
2730
+ /* @__PURE__ */ i(Ft, { hasAlert: !!n, children: t })
2624
2731
  ] })
2625
2732
  ]
2626
2733
  }
2627
2734
  )
2628
2735
  ] });
2629
2736
  }
2630
- const jn = p(v)(({ theme: t }) => ({
2737
+ const zn = g(v)(({ theme: t }) => ({
2631
2738
  position: "absolute",
2632
2739
  width: "100%",
2633
2740
  zIndex: 100,
@@ -2640,9 +2747,9 @@ const jn = p(v)(({ theme: t }) => ({
2640
2747
  boxSizing: "border-box",
2641
2748
  alignItems: "flex-end",
2642
2749
  background: t.palette.white[60]
2643
- })), Nn = p("div")(() => ({
2750
+ })), Zn = g("div")(() => ({
2644
2751
  width: "100%"
2645
- })), Vn = p(v)(({ theme: t }) => ({
2752
+ })), Jn = g(v)(({ theme: t }) => ({
2646
2753
  width: "100%",
2647
2754
  padding: t.spacing(1.5, 2, 2),
2648
2755
  backgroundColor: t.palette.background.paper,
@@ -2652,46 +2759,47 @@ const jn = p(v)(({ theme: t }) => ({
2652
2759
  marginTop: t.spacing(1)
2653
2760
  }
2654
2761
  }));
2655
- function Fo({
2762
+ function _o({
2656
2763
  children: t,
2657
2764
  onClickAway: e,
2658
2765
  actions: n,
2659
2766
  severity: o = "warning",
2660
- opened: r,
2661
- "data-testid": a,
2767
+ opened: a,
2768
+ "data-testid": r,
2662
2769
  "aria-label": l,
2663
- ...s
2770
+ ...c
2664
2771
  }) {
2665
- const c = U(null), d = N();
2772
+ const s = Y(null), p = N();
2666
2773
  return /* @__PURE__ */ i(
2667
- jn,
2774
+ zn,
2668
2775
  {
2669
- ref: c,
2670
- "data-testid": a,
2776
+ ref: s,
2777
+ "data-testid": r,
2671
2778
  "aria-label": l,
2672
2779
  role: "presentation",
2673
- children: /* @__PURE__ */ i(me, { onClickAway: () => {
2780
+ "data-name": "dialog-confirmation",
2781
+ children: /* @__PURE__ */ i(xe, { onClickAway: () => {
2674
2782
  e && e();
2675
2783
  }, children: /* @__PURE__ */ i(
2676
- bt,
2784
+ xt,
2677
2785
  {
2678
2786
  direction: "up",
2679
- in: r,
2680
- container: c.current,
2787
+ in: a,
2788
+ container: s.current,
2681
2789
  mountOnEnter: !0,
2682
2790
  unmountOnExit: !0,
2683
- easing: d.transitions.easing.easeOut,
2791
+ easing: p.transitions.easing.easeOut,
2684
2792
  timeout: 350,
2685
- children: /* @__PURE__ */ i(Nn, { children: /* @__PURE__ */ y(Vn, { children: [
2686
- /* @__PURE__ */ i(Tt, { severity: o, ...s, children: t }),
2687
- /* @__PURE__ */ i($t, { children: n })
2793
+ children: /* @__PURE__ */ i(Zn, { children: /* @__PURE__ */ y(Jn, { children: [
2794
+ /* @__PURE__ */ i(Rt, { severity: o, ...c, children: t }),
2795
+ /* @__PURE__ */ i(Ft, { children: n })
2688
2796
  ] }) })
2689
2797
  }
2690
2798
  ) })
2691
2799
  }
2692
2800
  );
2693
2801
  }
2694
- const Un = p(v)(({ theme: t }) => ({
2802
+ const Xn = g(v)(({ theme: t }) => ({
2695
2803
  display: "flex",
2696
2804
  alignItems: "center",
2697
2805
  justifyContent: "center",
@@ -2700,7 +2808,7 @@ const Un = p(v)(({ theme: t }) => ({
2700
2808
  "& > div": {
2701
2809
  flex: 1
2702
2810
  }
2703
- })), qn = p(v)(({ theme: t }) => ({
2811
+ })), Kn = g(v)(({ theme: t }) => ({
2704
2812
  display: "flex",
2705
2813
  flex: 1,
2706
2814
  flexDirection: "column",
@@ -2728,7 +2836,7 @@ const Un = p(v)(({ theme: t }) => ({
2728
2836
  content: "none"
2729
2837
  }
2730
2838
  }));
2731
- function zn({
2839
+ function Qn({
2732
2840
  theme: t,
2733
2841
  completed: e,
2734
2842
  current: n
@@ -2746,7 +2854,7 @@ function zn({
2746
2854
  color: t.palette.text.secondary
2747
2855
  };
2748
2856
  }
2749
- const Yn = p("span", {
2857
+ const to = g("span", {
2750
2858
  shouldForwardProp: (t) => t !== "completed" && t !== "current"
2751
2859
  })(({ theme: t, completed: e, current: n }) => ({
2752
2860
  display: "flex",
@@ -2758,66 +2866,66 @@ const Yn = p("span", {
2758
2866
  borderRadius: "50%",
2759
2867
  border: `${t.spacing(0.25)} solid currentColor`,
2760
2868
  ...t.typography.caption,
2761
- ...zn({ theme: t, completed: e, current: n })
2869
+ ...Qn({ theme: t, completed: e, current: n })
2762
2870
  }));
2763
- function Oo({
2871
+ function Po({
2764
2872
  currentStep: t,
2765
2873
  stepsLabels: e,
2766
2874
  ...n
2767
2875
  }) {
2768
- return /* @__PURE__ */ i(Un, { ...n, children: /* @__PURE__ */ i(v, { sx: { display: "flex" }, children: e.map((o, r) => {
2769
- const a = r + 1, l = a === t, s = a < t;
2876
+ return /* @__PURE__ */ i(Xn, { ...n, "data-name": "dialog-stepper", children: /* @__PURE__ */ i(v, { sx: { display: "flex" }, children: e.map((o, a) => {
2877
+ const r = a + 1, l = r === t, c = r < t;
2770
2878
  return /* @__PURE__ */ y(
2771
- qn,
2879
+ Kn,
2772
2880
  {
2773
- "data-state": s ? "completed" : l ? "current" : "uncompleted",
2881
+ "data-state": c ? "completed" : l ? "current" : "uncompleted",
2774
2882
  children: [
2775
- /* @__PURE__ */ i(Yn, { completed: s, current: l, children: s ? /* @__PURE__ */ i(ue, { fontSize: "small", "aria-label": "Completed step" }) : a }),
2776
- /* @__PURE__ */ i(w, { variant: "caption", component: "div", color: s ? "success.main" : l ? "textPrimary" : "textSecondary", children: o })
2883
+ /* @__PURE__ */ i(to, { completed: c, current: l, children: c ? /* @__PURE__ */ i(ge, { fontSize: "small", "aria-label": "Completed step" }) : r }),
2884
+ /* @__PURE__ */ i(S, { variant: "caption", component: "div", color: c ? "success.main" : l ? "textPrimary" : "textSecondary", children: o })
2777
2885
  ]
2778
2886
  },
2779
- r
2887
+ a
2780
2888
  );
2781
2889
  }) }) });
2782
2890
  }
2783
2891
  export {
2784
- Co as AccordionGroup,
2785
- Mt as Alert,
2786
- ko as AppBar,
2787
- yo as Autocomplete,
2788
- vo as Avatar,
2789
- uo as Button,
2790
- xo as CreatableAutocomplete,
2791
- rt as DatePicker,
2792
- Do as DateRangePicker,
2793
- Bo as DateTimePicker,
2794
- So as Dialog,
2795
- $t as DialogActions,
2796
- Tt as DialogAlert,
2797
- Fo as DialogConfirmation,
2798
- Wn as DialogContent,
2799
- $o as DialogContentPadded,
2800
- Ro as DialogFooter,
2801
- To as DialogHeader,
2802
- st as DialogPaper,
2803
- Oo as DialogStepper,
2804
- Fe as IconButton,
2805
- X as LabelWithIndicator,
2806
- fo as Menu,
2807
- vt as MenuFilter,
2808
- Ct as MenuItem,
2809
- ho as MenuList,
2810
- Mo as MultipleAutocomplete,
2811
- mo as MultipleSelectField,
2812
- po as PasswordField,
2813
- we as SelectField,
2814
- Ao as Snackbar,
2815
- Po as TablePaginationActions,
2816
- Io as TimePicker,
2817
- go as ToggleButtonGroup,
2818
- wo as TooltipData,
2819
- w as Typography,
2820
- bo as UploadField,
2821
- qe as UploadFieldBase,
2822
- ct as dialogDimensionsBySize
2892
+ wo as AccordionGroup,
2893
+ Ct as Alert,
2894
+ To as AppBar,
2895
+ Do as Autocomplete,
2896
+ Bo as Avatar,
2897
+ bo as Button,
2898
+ Ao as CreatableAutocomplete,
2899
+ at as DatePicker,
2900
+ $o as DateRangePicker,
2901
+ Fo as DateTimePicker,
2902
+ Lo as Dialog,
2903
+ Ft as DialogActions,
2904
+ Rt as DialogAlert,
2905
+ _o as DialogConfirmation,
2906
+ jn as DialogContent,
2907
+ Eo as DialogContentPadded,
2908
+ Ho as DialogFooter,
2909
+ Wo as DialogHeader,
2910
+ dt as DialogPaper,
2911
+ Po as DialogStepper,
2912
+ Le as IconButton,
2913
+ K as LabelWithIndicator,
2914
+ Mo as Menu,
2915
+ vt as MenuItem,
2916
+ kt as MenuItemFilter,
2917
+ Co as MenuList,
2918
+ Io as MultipleAutocomplete,
2919
+ vo as MultipleSelectField,
2920
+ xo as PasswordField,
2921
+ Te as SelectField,
2922
+ So as Snackbar,
2923
+ Vo as TablePaginationActions,
2924
+ Ro as TimePicker,
2925
+ yo as ToggleButtonGroup,
2926
+ Oo as TooltipData,
2927
+ S as Typography,
2928
+ ko as UploadField,
2929
+ Xe as UploadFieldBase,
2930
+ st as dialogDimensionsBySize
2823
2931
  };