asma-ui-core 3.68.6 → 3.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +49 -43
  2. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +45 -44
  3. package/dist/components/inputs/input-field/StyledInputField.js +127 -116
  4. package/dist/components/inputs/radio-button/base-ui/StyledRadioGroup.js +37 -32
  5. package/dist/components/inputs/search-field/StyledSearchField.js +9 -8
  6. package/dist/components/inputs/select/StyledSelect.js +123 -111
  7. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +67 -65
  8. package/dist/components/inputs/slider/StyledSlider.js +69 -61
  9. package/dist/components/inputs/textarea/StyledTextarea.js +52 -47
  10. package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +12 -12
  11. package/dist/datetime/components/date-picker/hooks/useDatePickerValidation.js +32 -31
  12. package/dist/datetime/components/time-picker/TimePickerInput.js +19 -18
  13. package/dist/datetime/components/time-picker/components/HelperText.js +10 -9
  14. package/dist/helpers/helperTextRoom.js +34 -0
  15. package/dist/helpers/useHelperAlertRole.js +11 -0
  16. package/dist/helpers/useHelperRowBudget.js +24 -0
  17. package/dist/helpers/warnMissingErrorMessage.js +6 -0
  18. package/dist/index.js +170 -165
  19. package/dist/src/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.test.d.ts +1 -0
  20. package/dist/src/components/inputs/dynamic-select/types.d.ts +1 -1
  21. package/dist/src/components/inputs/input-field/StyledInputField.d.ts +3 -3
  22. package/dist/src/components/inputs/input-field/StyledInputField.helper-slot.test.d.ts +1 -0
  23. package/dist/src/components/inputs/radio-button/base-ui/StyledRadioGroup.d.ts +2 -0
  24. package/dist/src/components/inputs/select/StyledSelect.d.ts +4 -4
  25. package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +5 -4
  26. package/dist/src/components/inputs/slider/StyledSlider.d.ts +2 -2
  27. package/dist/src/components/inputs/textarea/StyledTextarea.d.ts +1 -0
  28. package/dist/src/datetime/components/date-picker/hooks/useDatePickerValidation.d.ts +18 -1
  29. package/dist/src/datetime/components/date-picker/index.d.ts +1 -0
  30. package/dist/src/datetime/components/time-picker/components/HelperText.d.ts +12 -0
  31. package/dist/src/datetime/components/time-picker/index.d.ts +1 -0
  32. package/dist/src/helpers/helperTextRoom.d.ts +9 -0
  33. package/dist/src/helpers/helperTextRoom.test.d.ts +1 -0
  34. package/dist/src/helpers/useHelperAlertRole.d.ts +2 -0
  35. package/dist/src/helpers/useHelperAlertRole.test.d.ts +1 -0
  36. package/dist/src/helpers/useHelperRowBudget.d.ts +7 -0
  37. package/dist/src/helpers/warnMissingErrorMessage.d.ts +2 -0
  38. package/package.json +1 -1
@@ -1,32 +1,36 @@
1
1
  import { cn as y } from "../../../../helpers/cn.js";
2
- import { CloseIcon as O } from "../../../icons/close-icon/CloseIcon.js";
3
- import { ErrorOutlineIcon as W } from "../../../icons/error-outline-icon/ErrorOutlineIcon.js";
4
- import { StyledChip as H } from "../../../data-display/chip/StyledChip.js";
5
- import { StyledInteractiveChip as S } from "../../../data-display/interactive-chip/StyledInteractiveChip.js";
6
- import { StyledTooltip as J } from "../../../data-display/tooltip/StyledTooltip.js";
7
- import { StyledButton as M } from "../../button/StyledButton.js";
8
- import { useWrap as P } from "../helpers/useWrap.js";
2
+ import { CloseIcon as j } from "../../../icons/close-icon/CloseIcon.js";
3
+ import { ErrorOutlineIcon as J } from "../../../icons/error-outline-icon/ErrorOutlineIcon.js";
4
+ import { StyledChip as P } from "../../../data-display/chip/StyledChip.js";
5
+ import { StyledInteractiveChip as O } from "../../../data-display/interactive-chip/StyledInteractiveChip.js";
6
+ import { StyledTooltip as Q } from "../../../data-display/tooltip/StyledTooltip.js";
7
+ import { StyledButton as U } from "../../button/StyledButton.js";
8
+ import { useHelperAlertRole as X } from "../../../../helpers/useHelperAlertRole.js";
9
+ import { warnMissingErrorMessage as Y } from "../../../../helpers/warnMissingErrorMessage.js";
10
+ import { useWrap as Z } from "../helpers/useWrap.js";
9
11
  import { Skeleton as v } from "../../../mui-compat/Skeleton.js";
10
- import { forwardRef as Q, useEffect as U } from "react";
12
+ import { forwardRef as _, useEffect as ee, useId as te } from "react";
11
13
  import { jsx as t, jsxs as N } from "react/jsx-runtime";
12
- var se = Q((I, V) => {
13
- const { options: d, dataTest: R, value: r, readOnly: n, multiple: i, title: T, disabled: k, onChange: f, required: $, error: x, helperText: q, valueKey: z = "value", labelKey: A = "label", renderLabel: o, getOptionTooltip: C, loading: B, size: b, locale: D = "en" } = I, { containerRef: p, wrapDisabled: g } = P({ dependencyList: [d, d.length] });
14
- U(() => {
15
- p.current && (p.current.inert = !0);
16
- }, [p]);
17
- const u = (e) => typeof e == "object" ? e?.[A]?.toString() ?? "" : e?.toString() ?? "", w = (e) => typeof e == "object" ? e?.[z] : e, c = (e) => {
14
+ var he = _((V, A) => {
15
+ const { options: d, dataTest: R, value: r, readOnly: n, multiple: i, title: T, disabled: C, onChange: p, required: D, error: f, helperText: I, valueKey: E = "value", labelKey: L = "label", renderLabel: o, getOptionTooltip: k, loading: $, size: b, locale: z = "en", clearSelectionLabel: B } = V, q = te();
16
+ Y("DynamicInteractiveChipGroup", f, I);
17
+ const G = X(f), { containerRef: m, wrapDisabled: g } = Z({ dependencyList: [d, d.length] });
18
+ ee(() => {
19
+ m.current && (m.current.inert = !0);
20
+ }, [m]);
21
+ const u = (e) => typeof e == "object" ? e?.[L]?.toString() ?? "" : e?.toString() ?? "", w = (e) => typeof e == "object" ? e?.[E] : e, c = (e) => {
18
22
  const l = w(e);
19
23
  return l == null ? "" : typeof l == "string" || typeof l == "number" || typeof l == "boolean" ? String(l) : e == null ? "" : u(e);
20
- }, s = (e, l) => w(e) === w(l), E = i ? Array.isArray(r) && r.length > 0 : r != null, L = (e) => {
24
+ }, s = (e, l) => w(e) === w(l), K = i ? Array.isArray(r) && r.length > 0 : r != null, M = (e) => {
21
25
  if (!i) {
22
26
  const a = s(e, r) ? null : e;
23
27
  if (a === null) return;
24
- f(a);
28
+ p(a);
25
29
  return;
26
30
  }
27
31
  const l = r ?? [];
28
- f(l.find((a) => s(a, e)) ? l.filter((a) => !s(a, e)) : [...l, e]);
29
- }, m = n ? d.filter((e) => !!(i ? r?.find((l) => s(l, e)) : s(r, e))) : d, K = m.findIndex((e) => !(typeof e == "object" && e?.disabled) && !n);
32
+ p(l.find((a) => s(a, e)) ? l.filter((a) => !s(a, e)) : [...l, e]);
33
+ }, h = n ? d.filter((e) => !!(i ? r?.find((l) => s(l, e)) : s(r, e))) : d, F = h.findIndex((e) => !(typeof e == "object" && e?.disabled) && !n);
30
34
  return /* @__PURE__ */ N("div", {
31
35
  "data-testid": `${R}-dynamic-radio-group`,
32
36
  className: "relative flex flex-col gap-y-1",
@@ -37,10 +41,10 @@ var se = Q((I, V) => {
37
41
  }),
38
42
  /* @__PURE__ */ t("div", {
39
43
  "aria-hidden": !0,
40
- ref: p,
44
+ ref: m,
41
45
  className: "pointer-events-none absolute left-0 top-0 flex flex-wrap gap-2 opacity-0",
42
46
  style: { width: "100%" },
43
- children: m.map((e) => /* @__PURE__ */ t(S, {
47
+ children: h.map((e) => /* @__PURE__ */ t(O, {
44
48
  className: "w-fit",
45
49
  readOnly: n,
46
50
  type: i ? "checkbox" : "radio",
@@ -50,32 +54,32 @@ var se = Q((I, V) => {
50
54
  }),
51
55
  /* @__PURE__ */ t("div", {
52
56
  className: y("flex flex-wrap gap-2", g && "flex-col gap-1"),
53
- children: B ? /* @__PURE__ */ N("div", {
57
+ children: $ ? /* @__PURE__ */ N("div", {
54
58
  className: "flex flex-wrap gap-2",
55
59
  children: [
56
60
  /* @__PURE__ */ t(v, { className: "h-[32px] w-[60px]" }),
57
61
  /* @__PURE__ */ t(v, { className: "h-[32px] w-[60px]" }),
58
62
  /* @__PURE__ */ t(v, { className: "h-[32px] w-[60px]" })
59
63
  ]
60
- }) : m?.length ? m.map((e, l) => {
61
- const a = !!(i ? r?.find((G) => s(G, e)) : s(r, e)), F = C ? C(e) : null;
64
+ }) : h?.length ? h.map((e, l) => {
65
+ const a = !!(i ? r?.find((W) => s(W, e)) : s(r, e)), H = k ? k(e) : null;
62
66
  if (n && !a) return null;
63
- const h = typeof e == "object" ? !!e?.disabled : !1, j = !h && !n && l === K ? V : void 0;
64
- return /* @__PURE__ */ t(J, {
65
- title: F,
67
+ const x = typeof e == "object" ? !!e?.disabled : !1, S = !x && !n && l === F ? A : void 0;
68
+ return /* @__PURE__ */ t(Q, {
69
+ title: H,
66
70
  arrow: !0,
67
71
  children: /* @__PURE__ */ t("span", {
68
- className: y(h && "cursor-not-allowed"),
69
- children: n && !g ? /* @__PURE__ */ t(H, {
70
- ref: j,
71
- disabled: !!k || h,
72
+ className: y(x && "cursor-not-allowed"),
73
+ children: n && !g ? /* @__PURE__ */ t(P, {
74
+ ref: S,
75
+ disabled: !!C || x,
72
76
  classes: { root: "min-h-[32px] h-full" },
73
77
  className: "w-fit",
74
78
  dataTest: `ic-${c(e)}`,
75
79
  label: o ? o(e) : u(e)
76
- }) : /* @__PURE__ */ t(S, {
77
- ref: j,
78
- disabled: !!k || h,
80
+ }) : /* @__PURE__ */ t(O, {
81
+ ref: S,
82
+ disabled: !!C || x,
79
83
  classes: g ? {
80
84
  root: "border-none outline-none bg-transparent w-full flex justify-start h-full min-h-[40px] shadow-none",
81
85
  label: "block whitespace-normal break-words overflow-visible"
@@ -86,44 +90,46 @@ var se = Q((I, V) => {
86
90
  dataTest: `ic-${c(e)}`,
87
91
  checked: a,
88
92
  size: b,
89
- onClick: () => L(e),
93
+ onClick: () => M(e),
90
94
  label: o ? o(e) : u(e)
91
95
  })
92
96
  })
93
97
  }, c(e));
94
98
  }) : /* @__PURE__ */ t("span", { children: "-" })
95
99
  }),
96
- !$ && E && !n && /* @__PURE__ */ t(M, {
100
+ !D && K && !n && /* @__PURE__ */ t(U, {
97
101
  dataTest: "clear-selection-btn",
98
102
  variant: "text",
99
- startIcon: b === "medium" ? /* @__PURE__ */ t(O, {
103
+ startIcon: b === "medium" ? /* @__PURE__ */ t(j, {
100
104
  height: 24,
101
105
  width: 24,
102
106
  className: "size-6"
103
- }) : /* @__PURE__ */ t(O, {
107
+ }) : /* @__PURE__ */ t(j, {
104
108
  height: 20,
105
109
  width: 20,
106
110
  className: "size-5"
107
111
  }),
108
112
  className: "w-fit",
109
113
  size: b,
110
- onClick: () => f(i ? [] : null),
111
- children: D === "en" ? "Clear selection" : "Fjern valget"
114
+ onClick: () => p(i ? [] : null),
115
+ children: B ?? (z === "en" ? "Clear selection" : "Fjern valget")
112
116
  }),
113
117
  /* @__PURE__ */ N("div", {
114
- className: y("flex items-center gap-1 text-sm/5 text-delta-600", x && "text-error-500"),
115
- children: [x && /* @__PURE__ */ t(W, {
118
+ id: q,
119
+ role: G,
120
+ className: y("flex min-h-[24px] items-center gap-1 pt-1 text-sm/5 text-delta-600", f && "text-error-500"),
121
+ children: [f && /* @__PURE__ */ t(J, {
116
122
  width: 20,
117
123
  height: 20,
118
124
  className: "min-w-5"
119
125
  }), /* @__PURE__ */ t("span", {
120
126
  className: "line-clamp-1",
121
- children: q ?? (x ? "Required" : void 0)
127
+ children: I
122
128
  })]
123
129
  })
124
130
  ]
125
131
  });
126
132
  });
127
133
  export {
128
- se as DynamicInteractiveChipGroup
134
+ he as DynamicInteractiveChipGroup
129
135
  };
@@ -1,35 +1,35 @@
1
- import { cn as D } from "../../../../helpers/cn.js";
1
+ import { cn as $ } from "../../../../helpers/cn.js";
2
2
  import { LoadingIcon as Y } from "../../../icons/loading-icon/LoadingIcon.js";
3
3
  import { CheckIcon as Z } from "../../../icons/check-icon/CheckIcon.js";
4
4
  import { PlusIconCircle as ee } from "../../../icons/plus-icon-circle/PlusIconCircle.js";
5
- import { StyledChip as $ } from "../../../data-display/chip/StyledChip.js";
5
+ import { StyledChip as j } from "../../../data-display/chip/StyledChip.js";
6
6
  import { StyledCheckbox as te } from "../../checkbox/base-ui/StyledCheckbox.js";
7
- import { StyledTooltip as j } from "../../../data-display/tooltip/StyledTooltip.js";
7
+ import { StyledTooltip as B } from "../../../data-display/tooltip/StyledTooltip.js";
8
8
  import { StyledInputField as le } from "../../input-field/StyledInputField.js";
9
9
  import { StyledSelectAutocomplete as ae } from "../../select-autocomplete/StyledSelectAutocomplete.js";
10
10
  import { DynamicInteractiveChipGroup as re } from "./DynamicInteractiveChipGroup.js";
11
- import { createElement as B, forwardRef as oe, useCallback as b, useState as ne } from "react";
12
- import { Fragment as L, jsx as l, jsxs as T } from "react/jsx-runtime";
13
- var ye = oe((S, q) => {
14
- const [E, k] = ne(!1), { options: f, dataTest: g, value: x, readOnly: u, multiple: o, required: F, onChange: y, size: z, title: C, noOptionsText: K, placeholder: _, disabled: I, helperText: H, disableHelperText: R, error: G, valueKey: A = "value", labelKey: W = "label", renderLabel: i, getOptionTooltip: N, startAdornment: J, autocompleteProps: n, loading: m, maxTags: M, onFocus: Q, onBlur: U } = S, v = f.length < 11, s = (e) => typeof e == "object" ? e?.[W]?.toString() ?? "" : e?.toString() ?? "", p = b((e) => typeof e == "object" ? e?.[A] : e, [A]), P = b((e, t) => p(e) === p(t), [p]), w = (e) => {
11
+ import { createElement as L, forwardRef as oe, useCallback as b, useState as ne } from "react";
12
+ import { Fragment as q, jsx as l, jsxs as O } from "react/jsx-runtime";
13
+ var ye = oe((S, E) => {
14
+ const [F, k] = ne(!1), { options: f, dataTest: g, value: x, readOnly: u, multiple: o, required: z, onChange: y, size: H, title: v, noOptionsText: K, placeholder: _, disabled: I, helperText: R, disableHelperText: A, error: G, valueKey: N = "value", labelKey: W = "label", renderLabel: i, getOptionTooltip: P, startAdornment: J, autocompleteProps: n, loading: m, maxTags: M, onFocus: Q, onBlur: U } = S, C = f.length < 11, s = (e) => typeof e == "object" ? e?.[W]?.toString() ?? "" : e?.toString() ?? "", p = b((e) => typeof e == "object" ? e?.[N] : e, [N]), V = b((e, t) => p(e) === p(t), [p]), w = (e) => {
15
15
  const t = p(e);
16
16
  return t == null ? "" : typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? String(t) : e == null ? "" : s(e);
17
- }, V = b((e) => {
17
+ }, D = b((e) => {
18
18
  k(!0), n?.onOpen?.(e);
19
19
  }, [n]), X = b((e, t) => {
20
20
  k(!1), n?.onClose?.(e, t);
21
21
  }, [n]);
22
22
  if (o && u) return /* @__PURE__ */ l(re, { ...S });
23
- const O = C ? `${g}-title` : void 0;
24
- return /* @__PURE__ */ T("div", {
23
+ const T = v ? `${g}-title` : void 0;
24
+ return /* @__PURE__ */ O("div", {
25
25
  className: "flex w-full flex-col gap-y-1",
26
- children: [C && /* @__PURE__ */ l("span", {
27
- id: O,
26
+ children: [v && /* @__PURE__ */ l("span", {
27
+ id: T,
28
28
  className: "text-base font-semibold text-delta-800",
29
- children: C
29
+ children: v
30
30
  }), /* @__PURE__ */ l(ae, {
31
- open: E,
32
- onOpen: V,
31
+ open: F,
32
+ onOpen: D,
33
33
  onClose: X,
34
34
  disableCloseOnSelect: o,
35
35
  dataTest: g,
@@ -38,8 +38,8 @@ var ye = oe((S, q) => {
38
38
  loading: m,
39
39
  readOnly: u,
40
40
  value: x,
41
- size: z,
42
- disableClearable: F,
41
+ size: H,
42
+ disableClearable: z,
43
43
  options: f,
44
44
  fullWidth: !0,
45
45
  classes: { listbox: "max-h-[300px]" },
@@ -48,13 +48,13 @@ var ye = oe((S, q) => {
48
48
  y(t);
49
49
  },
50
50
  filterSelectedOptions: !1,
51
- isOptionEqualToValue: n?.isOptionEqualToValue ?? P,
51
+ isOptionEqualToValue: n?.isOptionEqualToValue ?? V,
52
52
  autoHeight: !0,
53
53
  multiple: o,
54
54
  renderValue: o ? (e) => {
55
55
  if (!Array.isArray(e)) return null;
56
- const t = e, c = M ?? f.length, a = t.slice(0, c), d = t.length - c;
57
- return [...a.map((r) => /* @__PURE__ */ l($, {
56
+ const t = e, d = M ?? f.length, a = t.slice(0, d), c = t.length - d;
57
+ return [...a.map((r) => /* @__PURE__ */ l(j, {
58
58
  dataTest: `${w(r)}-chip`,
59
59
  readOnly: u,
60
60
  variant: "outlined",
@@ -65,13 +65,13 @@ var ye = oe((S, q) => {
65
65
  },
66
66
  disabled: !!I || !!m,
67
67
  onDelete: () => {
68
- Array.isArray(x) && y(x.filter((h) => !P(h, r)));
68
+ Array.isArray(x) && y(x.filter((h) => !V(h, r)));
69
69
  }
70
- }, w(r))), d > 0 ? /* @__PURE__ */ l($, {
70
+ }, w(r))), c > 0 ? /* @__PURE__ */ l(j, {
71
71
  dataTest: "remaining-count-tag-chip",
72
- label: `+${d}`,
72
+ label: `+${c}`,
73
73
  variant: "outlined",
74
- onClick: V
74
+ onClick: D
75
75
  }, "remaining-count") : null];
76
76
  } : void 0,
77
77
  popupIcon: m ? /* @__PURE__ */ l(Y, {
@@ -81,22 +81,22 @@ var ye = oe((S, q) => {
81
81
  height: 24,
82
82
  width: 24
83
83
  }) : void 0,
84
- renderOption: (e, t, c) => {
85
- const a = typeof t == "object" ? !!t?.disabled : !1, d = N ? N(t) : null;
84
+ renderOption: (e, t, d) => {
85
+ const a = typeof t == "object" ? !!t?.disabled : !1, c = P ? P(t) : null;
86
86
  if (o) {
87
- const h = c.selected;
88
- return /* @__PURE__ */ B("li", {
87
+ const h = d.selected;
88
+ return /* @__PURE__ */ L("li", {
89
89
  ...e,
90
90
  role: "option",
91
91
  "aria-selected": h,
92
92
  key: e.id,
93
93
  onClick: a ? void 0 : e.onClick,
94
- className: D("flex min-h-10 cursor-pointer items-center gap-x-1 bg-white px-2 text-base aria-selected:bg-gama-50 hover:bg-gama-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
94
+ className: $("flex min-h-10 cursor-pointer items-center gap-x-1 bg-white px-2 text-base aria-selected:bg-gama-50 hover:bg-gama-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
95
95
  "aria-disabled": a
96
- }, /* @__PURE__ */ l(j, {
96
+ }, /* @__PURE__ */ l(B, {
97
97
  arrow: !0,
98
- title: d,
99
- children: /* @__PURE__ */ T(L, { children: [/* @__PURE__ */ l(te, {
98
+ title: c,
99
+ children: /* @__PURE__ */ O(q, { children: [/* @__PURE__ */ l(te, {
100
100
  disabled: a,
101
101
  dataTest: `${w(t)}-checkbox`,
102
102
  size: "small",
@@ -109,19 +109,19 @@ var ye = oe((S, q) => {
109
109
  })] })
110
110
  }));
111
111
  }
112
- const r = c.selected;
113
- return /* @__PURE__ */ B("li", {
112
+ const r = d.selected;
113
+ return /* @__PURE__ */ L("li", {
114
114
  ...e,
115
115
  role: "option",
116
116
  "aria-selected": r,
117
117
  key: e.id,
118
- className: D("flex min-h-10 cursor-pointer items-center gap-x-1 px-2 text-base aria-selected:bg-gama-50 hover:bg-gama-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
118
+ className: $("flex min-h-10 cursor-pointer items-center gap-x-1 px-2 text-base aria-selected:bg-gama-50 hover:bg-gama-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
119
119
  onClick: a ? void 0 : e.onClick,
120
120
  "aria-disabled": a
121
- }, /* @__PURE__ */ l(j, {
121
+ }, /* @__PURE__ */ l(B, {
122
122
  arrow: !0,
123
- title: d,
124
- children: /* @__PURE__ */ T(L, { children: [/* @__PURE__ */ l("span", {
123
+ title: c,
124
+ children: /* @__PURE__ */ O(q, { children: [/* @__PURE__ */ l("span", {
125
125
  className: "w-5 min-w-5",
126
126
  children: r && /* @__PURE__ */ l(Z, {
127
127
  className: "size-5 min-h-5 min-w-5 text-gama-500",
@@ -137,28 +137,29 @@ var ye = oe((S, q) => {
137
137
  renderInput: (e) => /* @__PURE__ */ l(le, {
138
138
  dataTest: `${g}-input-field`,
139
139
  ...e,
140
- inputRef: q,
140
+ inputRef: E,
141
141
  error: G,
142
- helperText: R ? "" : H ?? " ",
142
+ helperText: A ? void 0 : R,
143
+ reserveHelperText: !A,
143
144
  variant: "outlined",
144
145
  label: "",
145
146
  placeholder: _,
146
147
  readOnly: u,
147
148
  onFocus: Q,
148
149
  onBlur: U,
149
- onKeyDown: v ? (t) => t.preventDefault() : void 0,
150
+ onKeyDown: C ? (t) => t.preventDefault() : void 0,
150
151
  autoComplete: "off",
151
152
  slotProps: {
152
153
  ...e.slotProps,
153
154
  input: {
154
155
  ...e.slotProps?.input ?? {},
155
156
  startAdornment: J ?? e.slotProps?.input?.startAdornment,
156
- style: v ? { caretColor: "transparent" } : {}
157
+ style: C ? { caretColor: "transparent" } : {}
157
158
  },
158
159
  htmlInput: {
159
160
  ...e.slotProps?.htmlInput ?? {},
160
- ...O ? { "aria-labelledby": O } : {},
161
- style: v ? { caretColor: "transparent" } : {}
161
+ ...T ? { "aria-labelledby": T } : {},
162
+ style: C ? { caretColor: "transparent" } : {}
162
163
  }
163
164
  }
164
165
  }),