@tedi-design-system/react 19.1.0-rc.1 → 19.1.0-rc.10

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 (90) hide show
  1. package/DESIGN.md +308 -0
  2. package/README.md +28 -0
  3. package/bundle-stats.html +1 -1
  4. package/component.manifest.json +1191 -0
  5. package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.cjs.js +1 -1
  6. package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.es.js +1 -1
  7. package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
  8. package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.es.js +1 -1
  9. package/external/hoist-non-react-statics/external/react-is/index.cjs.js +1 -1
  10. package/external/hoist-non-react-statics/external/react-is/index.es.js +1 -1
  11. package/external/prop-types/external/react-is/cjs/react-is.development.cjs.js +1 -1
  12. package/external/prop-types/external/react-is/cjs/react-is.development.es.js +1 -1
  13. package/external/prop-types/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
  14. package/external/prop-types/external/react-is/cjs/react-is.production.min.es.js +1 -1
  15. package/external/prop-types/external/react-is/index.cjs.js +1 -1
  16. package/external/prop-types/external/react-is/index.es.js +1 -1
  17. package/index.css +1 -1
  18. package/package.json +2 -2
  19. package/src/community/components/layout/sidenav/sidenav.cjs.js +1 -1
  20. package/src/community/components/layout/sidenav/sidenav.es.js +38 -40
  21. package/src/community/components/map-components/base-map-selection/base-map-option.cjs.js +1 -1
  22. package/src/community/components/map-components/base-map-selection/base-map-option.d.ts +8 -5
  23. package/src/community/components/map-components/base-map-selection/base-map-option.es.js +63 -65
  24. package/src/community/components/map-components/base-map-selection/base-map-selection.cjs.js +1 -1
  25. package/src/community/components/map-components/base-map-selection/base-map-selection.d.ts +1 -4
  26. package/src/community/components/map-components/base-map-selection/base-map-selection.es.js +55 -55
  27. package/src/community/components/map-components/map-button/map-button.cjs.js +1 -1
  28. package/src/community/components/map-components/map-button/map-button.d.ts +2 -3
  29. package/src/community/components/map-components/map-button/map-button.es.js +37 -36
  30. package/src/community/components/map-components/map-dropdown/map-dropdown.cjs.js +1 -1
  31. package/src/community/components/map-components/map-dropdown/map-dropdown.es.js +51 -49
  32. package/src/tedi/components/content/card/card.module.scss.cjs.js +1 -1
  33. package/src/tedi/components/content/card/card.module.scss.es.js +3 -2
  34. package/src/tedi/components/content/collapse/collapse.cjs.js +1 -1
  35. package/src/tedi/components/content/collapse/collapse.d.ts +9 -0
  36. package/src/tedi/components/content/collapse/collapse.es.js +44 -35
  37. package/src/tedi/components/filter/filter/filter.cjs.js +1 -1
  38. package/src/tedi/components/filter/filter/filter.d.ts +5 -0
  39. package/src/tedi/components/filter/filter/filter.es.js +154 -144
  40. package/src/tedi/components/filter/filter/filter.module.scss.cjs.js +1 -1
  41. package/src/tedi/components/filter/filter/filter.module.scss.es.js +2 -1
  42. package/src/tedi/components/form/date-field/date-field-helpers.cjs.js +1 -1
  43. package/src/tedi/components/form/date-field/date-field-helpers.d.ts +12 -19
  44. package/src/tedi/components/form/date-field/date-field-helpers.es.js +27 -21
  45. package/src/tedi/components/form/date-field/date-field.cjs.js +1 -1
  46. package/src/tedi/components/form/date-field/date-field.d.ts +1 -1
  47. package/src/tedi/components/form/date-field/date-field.es.js +169 -164
  48. package/src/tedi/components/form/textfield/textfield.cjs.js +1 -1
  49. package/src/tedi/components/form/textfield/textfield.es.js +21 -21
  50. package/src/tedi/components/form/time-field/time-field.cjs.js +1 -1
  51. package/src/tedi/components/form/time-field/time-field.es.js +126 -124
  52. package/src/tedi/components/layout/sidenav/components/sidenav-item/sidenav-item.cjs.js +1 -1
  53. package/src/tedi/components/layout/sidenav/components/sidenav-item/sidenav-item.es.js +82 -85
  54. package/src/tedi/components/layout/sidenav/sidenav.cjs.js +1 -1
  55. package/src/tedi/components/layout/sidenav/sidenav.es.js +16 -16
  56. package/src/tedi/components/layout/top-nav/components/top-nav-item/top-nav-item.cjs.js +1 -1
  57. package/src/tedi/components/layout/top-nav/components/top-nav-item/top-nav-item.es.js +6 -7
  58. package/src/tedi/components/layout/top-nav/components/top-nav-separator/top-nav-separator.cjs.js +1 -1
  59. package/src/tedi/components/layout/top-nav/components/top-nav-separator/top-nav-separator.es.js +2 -2
  60. package/src/tedi/components/layout/top-nav/top-nav.cjs.js +1 -1
  61. package/src/tedi/components/layout/top-nav/top-nav.es.js +9 -8
  62. package/src/tedi/components/misc/affix/affix.cjs.js +1 -1
  63. package/src/tedi/components/misc/affix/affix.es.js +20 -8
  64. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.cjs.js +1 -1
  65. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.d.ts +9 -1
  66. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.es.js +78 -39
  67. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-item/table-of-contents-item.d.ts +6 -0
  68. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-row/table-of-contents-row.cjs.js +1 -1
  69. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-row/table-of-contents-row.es.js +23 -28
  70. package/src/tedi/components/navigation/table-of-contents/table-of-contents.cjs.js +1 -1
  71. package/src/tedi/components/navigation/table-of-contents/table-of-contents.d.ts +32 -21
  72. package/src/tedi/components/navigation/table-of-contents/table-of-contents.es.js +58 -55
  73. package/src/tedi/components/navigation/table-of-contents/table-of-contents.module.scss.cjs.js +1 -1
  74. package/src/tedi/components/navigation/table-of-contents/table-of-contents.module.scss.es.js +4 -1
  75. package/src/tedi/components/overlays/dropdown/dropdown.cjs.js +1 -1
  76. package/src/tedi/components/overlays/dropdown/dropdown.d.ts +8 -0
  77. package/src/tedi/components/overlays/dropdown/dropdown.es.js +82 -74
  78. package/src/tedi/components/overlays/dropdown/dropdown.module.scss.cjs.js +1 -1
  79. package/src/tedi/components/overlays/dropdown/dropdown.module.scss.es.js +1 -0
  80. package/src/tedi/components/overlays/overlay/overlay-trigger.cjs.js +1 -1
  81. package/src/tedi/components/overlays/overlay/overlay-trigger.es.js +22 -21
  82. package/src/tedi/helpers/hooks/use-safe-id.cjs.js +1 -0
  83. package/src/tedi/helpers/hooks/use-safe-id.d.ts +16 -0
  84. package/src/tedi/helpers/hooks/use-safe-id.es.js +5 -0
  85. package/src/tedi/helpers/index.d.ts +1 -0
  86. package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
  87. package/src/tedi/providers/label-provider/labels-map.d.ts +14 -0
  88. package/src/tedi/providers/label-provider/labels-map.es.js +14 -0
  89. package/tedi.cjs.js +1 -1
  90. package/tedi.es.js +10 -8
@@ -1,69 +1,69 @@
1
1
  import { jsxs as vt, Fragment as Ft, jsx as D } from "react/jsx-runtime";
2
- import { useFloating as wt, useClick as Nt, useInteractions as kt, useDismiss as Pt, useRole as Et, FloatingPortal as Ot, FloatingFocusManager as Rt } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
2
+ import { useFloating as wt, useClick as Nt, useInteractions as kt, useDismiss as Pt, useRole as Ot, FloatingPortal as Et, FloatingFocusManager as Rt } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
3
3
  import B from "../../../../../external/classnames/index.es.js";
4
- import F, { useState as _, useCallback as ue, useEffect as T, useMemo as me } from "react";
4
+ import F, { useState as _, useCallback as me, useEffect as T, useMemo as pe } from "react";
5
5
  import { Calendar as It } from "../../content/calendar/calendar.es.js";
6
6
  import { MultiValueField as Vt } from "../multi-value-field/multi-value-field.es.js";
7
7
  import { TextField as Bt } from "../textfield/textfield.es.js";
8
8
  import y from "./date-field.module.scss.es.js";
9
- import { getLocaleDateParts as Tt, buildDateRegexSource as $t, resolveRangeSelection as Lt, CALENDAR_POPOVER_OFFSET as Yt, CALENDAR_POPOVER_PADDING as He } from "./date-field-helpers.es.js";
9
+ import { getLocaleDateParts as Tt, buildDateRegexSource as $t, resolveRangeSelection as Lt, CALENDAR_POPOVER_OFFSET as Yt, CALENDAR_POPOVER_PADDING as We } from "./date-field-helpers.es.js";
10
10
  import { DatePickerModal as jt } from "./date-picker-modal/date-picker-modal.es.js";
11
11
  import { useBreakpointProps as Ht } from "../../../helpers/hooks/use-breakpoint-props.es.js";
12
12
  import { useLabels as Wt } from "../../../providers/label-provider/use-labels.es.js";
13
13
  import { et as St } from "../../../../../external/react-day-picker/dist/esm/locale/et.es.js";
14
- import Ut, { isBreakpointBelow as We } from "../../../helpers/hooks/use-breakpoint.es.js";
14
+ import Ut, { isBreakpointBelow as Se } from "../../../helpers/hooks/use-breakpoint.es.js";
15
15
  import { autoUpdate as qt } from "../../../../../external/@floating-ui/dom/dist/floating-ui.dom.es.js";
16
16
  import { offset as zt, flip as Gt, shift as Xt, size as Jt } from "../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js";
17
17
  import { dateMatchModifiers as Kt } from "../../../../../external/react-day-picker/dist/esm/utils/dateMatchModifiers.es.js";
18
18
  const Qt = F.forwardRef((w, N) => {
19
- const { getCurrentBreakpointProps: Se } = Ht(w.defaultServerBreakpoint), { getLabel: z } = Wt(), {
20
- useNativePicker: Ue = !1,
19
+ const { getCurrentBreakpointProps: Ue } = Ht(w.defaultServerBreakpoint), { getLabel: G } = Wt(), {
20
+ useNativePicker: qe = !1,
21
21
  enableCalendar: m = !0,
22
22
  calendarTrigger: $ = "button",
23
- numberOfMonths: G,
24
- clearable: pe = !0
25
- } = Se(w), {
26
- id: he,
27
- mode: s = "single",
28
- label: ge,
23
+ numberOfMonths: X,
24
+ clearable: he = !0
25
+ } = Ue(w), {
26
+ id: ge,
27
+ mode: o = "single",
28
+ label: ye,
29
29
  selected: L,
30
30
  onSelect: a,
31
31
  disabled: k,
32
32
  disabledMatchers: P,
33
- placeholder: qe,
34
- className: ze,
33
+ placeholder: ze,
34
+ className: Ge,
35
35
  formatDate: d,
36
36
  required: Y,
37
- showOutsideDays: ye = !0,
38
- parseDate: Ge,
39
- monthYearSelectType: be,
40
- minYear: De,
41
- maxYear: _e,
42
- dayStatus: Ce,
37
+ showOutsideDays: be = !0,
38
+ parseDate: J,
39
+ monthYearSelectType: De,
40
+ minYear: _e,
41
+ maxYear: Ce,
42
+ dayStatus: Me,
43
43
  tagsDirection: Xe,
44
- showNavigation: Me = !0,
45
- selectionLevel: E = "days",
44
+ showNavigation: xe = !0,
45
+ selectionLevel: O = "days",
46
46
  initialView: j,
47
- locale: xe = St,
47
+ locale: Ae = St,
48
48
  localeCode: H = "et-EE",
49
49
  initialMonth: W,
50
50
  closeOnSelect: Je,
51
- footer: Ae,
51
+ footer: ve,
52
52
  defaultValue: S,
53
- minDate: X,
54
- maxDate: J,
55
- disablePast: ve,
56
- disableFuture: Fe,
57
- shouldDisableMonth: K,
58
- shouldDisableYear: Q,
59
- readOnly: O,
60
- availableDays: we,
53
+ minDate: K,
54
+ maxDate: Q,
55
+ disablePast: Fe,
56
+ disableFuture: we,
57
+ shouldDisableMonth: Z,
58
+ shouldDisableYear: ee,
59
+ readOnly: E,
60
+ availableDays: Ne,
61
61
  inputProps: i,
62
- modal: Z = !1,
62
+ modal: te = !1,
63
63
  modalProps: Ke,
64
64
  modalTitle: Qe,
65
- disabledDateErrorMessage: Ze = z("dateField.disabledDateError"),
66
- invalidDateErrorMessage: et = z("dateField.invalidDateError"),
65
+ disabledDateErrorMessage: Ze = G("dateField.disabledDateError"),
66
+ invalidDateErrorMessage: et = G("dateField.invalidDateError"),
67
67
  useNativePicker: Zt,
68
68
  enableCalendar: er,
69
69
  calendarTrigger: tr,
@@ -74,32 +74,32 @@ const Qt = F.forwardRef((w, N) => {
74
74
  lg: nr,
75
75
  xl: sr,
76
76
  xxl: lr,
77
- ...Ne
78
- } = w, c = Ue && s === "single", ke = Ut(w.defaultServerBreakpoint), A = We(ke, "md"), [tt, p] = _(L ?? S), [h, R] = _(!1), [ee, Pe] = _(!1), [rt, Ee] = _(j ?? E), [te, b] = _(""), [Oe, u] = _(!1), [Re, re] = _(!1), g = m && !c && !O && (Z === !0 || typeof Z == "string" && We(ke, Z)), Ie = A && !g && typeof G == "number" && G > 1 ? 1 : G, { current: f } = F.useRef("selected" in w), o = f ? L : tt, ae = F.useRef(null), Ve = F.useRef(null), at = F.useCallback(
77
+ ...ke
78
+ } = w, c = qe && o === "single", Pe = Ut(w.defaultServerBreakpoint), A = Se(Pe, "md"), [tt, p] = _(L ?? S), [h, R] = _(!1), [re, Oe] = _(!1), [rt, Ee] = _(j ?? O), [ae, b] = _(""), [Re, u] = _(!1), [Ie, U] = _(!1), g = m && !c && !E && (te === !0 || typeof te == "string" && Se(Pe, te)), Ve = A && !g && typeof X == "number" && X > 1 ? 1 : X, { current: f } = F.useRef("selected" in w), n = f ? L : tt, ie = F.useRef(null), Be = F.useRef(null), at = F.useCallback(
79
79
  (e) => {
80
- ae.current = e, typeof N == "function" ? N(e) : N && (N.current = e);
80
+ ie.current = e, typeof N == "function" ? N(e) : N && (N.current = e);
81
81
  },
82
82
  [N]
83
83
  ), it = (e) => {
84
84
  if (!e) return "";
85
- const t = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
86
- return `${t}-${r}-${n}`;
87
- }, ot = c && o instanceof Date ? it(o) : "", ie = ue((e, t) => e instanceof Date ? e : Array.isArray(e) && e.length > 0 ? [...e].sort((r, n) => r.getTime() - n.getTime())[0] : e && typeof e == "object" && "from" in e && e.from instanceof Date ? e.from : e && typeof e == "object" && "to" in e && e.to instanceof Date ? e.to : t ?? /* @__PURE__ */ new Date(), []), [nt, oe] = _(() => ie(o, W));
85
+ const t = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), s = String(e.getDate()).padStart(2, "0");
86
+ return `${t}-${r}-${s}`;
87
+ }, ot = c && n instanceof Date ? it(n) : "", oe = me((e, t) => e instanceof Date ? e : Array.isArray(e) && e.length > 0 ? [...e].sort((r, s) => r.getTime() - s.getTime())[0] : e && typeof e == "object" && "from" in e && e.from instanceof Date ? e.from : e && typeof e == "object" && "to" in e && e.to instanceof Date ? e.to : t ?? /* @__PURE__ */ new Date(), []), [nt, ne] = _(() => oe(n, W));
88
88
  T(() => {
89
- h || oe(ie(o, W));
90
- }, [o, W, h, ie]), T(() => {
91
- h && Ee(j ?? E);
92
- }, [h, E, j]), T(() => {
89
+ h || ne(oe(n, W));
90
+ }, [n, W, h, oe]), T(() => {
91
+ h && Ee(j ?? O);
92
+ }, [h, O, j]), T(() => {
93
93
  f && p(L);
94
94
  }, [L, f]);
95
- const C = me(
95
+ const C = pe(
96
96
  () => new Intl.DateTimeFormat(H, {
97
97
  day: "2-digit",
98
98
  month: "2-digit",
99
99
  year: "numeric"
100
100
  }),
101
101
  [H]
102
- ), M = ue(
102
+ ), M = me(
103
103
  (e) => {
104
104
  if (!e) return "";
105
105
  if (e instanceof Date) return C.format(e);
@@ -111,84 +111,88 @@ const Qt = F.forwardRef((w, N) => {
111
111
  return "";
112
112
  },
113
113
  [C]
114
- ), ne = Je ?? s === "single", Be = s === "multiple" && Array.isArray(o) ? o.map((e, t) => ({
114
+ ), se = Je ?? o === "single", Te = o === "multiple" && Array.isArray(n) ? n.map((e, t) => ({
115
115
  id: t,
116
116
  label: d ? d(e) : M(e),
117
117
  date: e
118
- })) : [], U = me(() => {
118
+ })) : [], q = pe(() => {
119
119
  const e = [];
120
- return k && (Array.isArray(k) ? e.push(...k) : e.push(k)), P && (Array.isArray(P) ? e.push(...P) : e.push(P)), X && e.push({ before: X }), J && e.push({ after: J }), ve && e.push({ before: /* @__PURE__ */ new Date() }), Fe && e.push({ after: /* @__PURE__ */ new Date() }), K && e.push((t) => K(t)), Q && e.push((t) => Q(t)), e;
120
+ return k && (Array.isArray(k) ? e.push(...k) : e.push(k)), P && (Array.isArray(P) ? e.push(...P) : e.push(P)), K && e.push({ before: K }), Q && e.push({ after: Q }), Fe && e.push({ before: /* @__PURE__ */ new Date() }), we && e.push({ after: /* @__PURE__ */ new Date() }), Z && e.push((t) => Z(t)), ee && e.push((t) => ee(t)), e;
121
121
  }, [
122
122
  k,
123
123
  P,
124
- X,
125
- J,
126
- ve,
127
- Fe,
128
124
  K,
129
- Q
130
- ]), v = ue(
131
- (e) => Kt(e, U),
132
- [U]
133
- ), st = (e, t, r, n) => {
134
- const l = s === "range" ? Lt(e, o, t) : e;
135
- if (u(!1), f || p(l), a == null || a(l, t, r, n), l) {
125
+ Q,
126
+ Fe,
127
+ we,
128
+ Z,
129
+ ee
130
+ ]), v = me(
131
+ (e) => Kt(e, q),
132
+ [q]
133
+ ), st = (e, t, r, s) => {
134
+ const l = o === "range" ? Lt(e, n, t) : e;
135
+ if (u(!1), f || p(l), a == null || a(l, t, r, s), l) {
136
136
  const x = d ? d(l) : M(l);
137
137
  b(x);
138
138
  } else
139
139
  b("");
140
- ne && R(!1);
140
+ se && R(!1);
141
141
  }, lt = (e) => {
142
142
  if (v(e)) return;
143
- const t = s === "range" ? { from: e, to: void 0 } : s === "multiple" ? [...Array.isArray(o) ? o : [], e] : e;
143
+ const t = o === "range" ? { from: e, to: void 0 } : o === "multiple" ? [...Array.isArray(n) ? n : [], e] : e;
144
144
  u(!1), f || p(t), a == null || a(t, e, {}, {});
145
145
  const r = d ? d(t) : M(t);
146
- b(r), ne && R(!1);
147
- }, ft = me(() => {
146
+ b(r), se && R(!1);
147
+ }, ft = pe(() => {
148
148
  const e = Tt(C), t = new RegExp(`^${$t(e)}$`), { fieldOrder: r } = e;
149
- return (n) => {
150
- const l = n.match(t);
149
+ return (s) => {
150
+ const l = s.match(t);
151
151
  if (!l) return;
152
152
  const x = {};
153
153
  r.forEach((xt, At) => {
154
154
  x[xt] = Number(l[At + 1]);
155
155
  });
156
- const { day: fe, month: de, year: ce } = x;
157
- if (fe === void 0 || de === void 0 || ce === void 0) return;
158
- const V = new Date(ce, de - 1, fe);
159
- if (!(isNaN(V.getTime()) || V.getFullYear() !== ce || V.getMonth() !== de - 1 || V.getDate() !== fe))
156
+ const { day: de, month: ce, year: ue } = x;
157
+ if (de === void 0 || ce === void 0 || ue === void 0) return;
158
+ const V = new Date(ue, ce - 1, de);
159
+ if (!(isNaN(V.getTime()) || V.getFullYear() !== ue || V.getMonth() !== ce - 1 || V.getDate() !== de))
160
160
  return V;
161
161
  };
162
- }, [C]), Te = (e) => (Ge ?? (s === "single" ? ft : () => {
163
- }))(e), $e = (e) => s === "single" && e instanceof Date || s === "multiple" && Array.isArray(e) || s === "range" && !!e && !Array.isArray(e) && "from" in e, dt = (e) => {
164
- if (b(e), re(!1), e.trim() === "") {
165
- u(!1), o !== void 0 && (f || p(void 0), a == null || a(void 0, void 0, {}, {}));
162
+ }, [C]), $e = (e) => (J ?? (o === "single" ? ft : () => {
163
+ }))(e), Le = (e) => o === "single" && e instanceof Date || o === "multiple" && Array.isArray(e) || o === "range" && !!e && !Array.isArray(e) && "from" in e, dt = (e) => {
164
+ if (b(e), U(!1), e.trim() === "") {
165
+ u(!1), n !== void 0 && (f || p(void 0), a == null || a(void 0, void 0, {}, {}));
166
166
  return;
167
167
  }
168
- const t = Te(e);
169
- if (!$e(t)) {
168
+ const t = $e(e);
169
+ if (!Le(t)) {
170
170
  u(!1);
171
171
  return;
172
172
  }
173
- const n = t && !Array.isArray(t) && "from" in t ? t : null;
174
- if (t instanceof Date && v(t) || Array.isArray(t) && t.some((x) => x instanceof Date && v(x)) || !!n && (n.from && v(n.from) || n.to && v(n.to))) {
173
+ const s = t && !Array.isArray(t) && "from" in t ? t : null;
174
+ if (t instanceof Date && v(t) || Array.isArray(t) && t.some((x) => x instanceof Date && v(x)) || !!s && (s.from && v(s.from) || s.to && v(s.to))) {
175
175
  u(!0);
176
176
  return;
177
177
  }
178
- u(!1), f || p(t), a == null || a(t, t, {}, {}), t instanceof Date && oe(t), ne && R(!1);
178
+ u(!1), f || p(t), a == null || a(t, t, {}, {}), t instanceof Date && ne(t), se && R(!1);
179
179
  }, ct = () => {
180
- if (te.trim() === "") {
181
- re(!1);
180
+ if (ae.trim() === "") {
181
+ U(!1);
182
+ return;
183
+ }
184
+ if (!J && o !== "single") {
185
+ U(!1);
182
186
  return;
183
187
  }
184
- re(!$e(Te(te)));
188
+ U(!Le($e(ae)));
185
189
  };
186
190
  T(() => {
187
191
  if (f) {
188
- const e = d ? d(o) : M(o);
192
+ const e = d ? d(n) : M(n);
189
193
  b(e);
190
194
  }
191
- }, [o, f, d, M]), T(() => {
195
+ }, [n, f, d, M]), T(() => {
192
196
  if (!f && S) {
193
197
  const e = d ? d(S) : M(S);
194
198
  b(e);
@@ -201,9 +205,9 @@ const Qt = F.forwardRef((w, N) => {
201
205
  middleware: [
202
206
  zt(Yt),
203
207
  Gt(),
204
- Xt({ padding: He }),
208
+ Xt({ padding: We }),
205
209
  Jt({
206
- padding: He,
210
+ padding: We,
207
211
  apply({ availableWidth: e, elements: t }) {
208
212
  const r = t.floating;
209
213
  if (r.style.width = "", r.style.maxWidth = "", r.style.overflowX = "", A) return;
@@ -212,24 +216,24 @@ const Qt = F.forwardRef((w, N) => {
212
216
  })
213
217
  ],
214
218
  whileElementsMounted: qt
215
- }), { refs: I, context: q, x: mt, y: pt, strategy: ht } = ut, gt = Nt(q), Le = kt([
219
+ }), { refs: I, context: z, x: mt, y: pt, strategy: ht } = ut, gt = Nt(z), Ye = kt([
216
220
  ...m && !c && $ === "input" && !g ? [gt] : [],
217
- Pt(q, {
221
+ Pt(z, {
218
222
  outsidePress: (e) => {
219
223
  const t = e.target;
220
224
  return !(t != null && t.closest('[role="menu"], [role="listbox"]'));
221
225
  }
222
226
  }),
223
- Et(q, { role: "dialog" })
227
+ Ot(z, { role: "dialog" })
224
228
  ]);
225
229
  F.useEffect(() => {
226
230
  var t, r;
227
- const e = s === "multiple" ? ((t = Ve.current) == null ? void 0 : t.wrapper) ?? null : ((r = ae.current) == null ? void 0 : r.input) ?? null;
231
+ const e = o === "multiple" ? ((t = Be.current) == null ? void 0 : t.wrapper) ?? null : ((r = ie.current) == null ? void 0 : r.input) ?? null;
228
232
  I.setPositionReference(e ?? I.reference.current);
229
- }, [s, h, I]);
233
+ }, [o, h, I]);
230
234
  const yt = () => {
231
235
  var t;
232
- const e = (t = ae.current) == null ? void 0 : t.input;
236
+ const e = (t = ie.current) == null ? void 0 : t.input;
233
237
  if (e) {
234
238
  if (typeof e.showPicker == "function")
235
239
  try {
@@ -239,8 +243,8 @@ const Qt = F.forwardRef((w, N) => {
239
243
  }
240
244
  e.focus();
241
245
  }
242
- }, se = () => {
243
- !m || O || (c ? yt() : g ? Pe(!0) : R((e) => !e));
246
+ }, le = () => {
247
+ !m || E || (c ? yt() : g ? Oe(!0) : R((e) => !e));
244
248
  }, bt = (e) => {
245
249
  if (u(!1), f || p(e), a == null || a(e, e, {}, {}), e) {
246
250
  const t = d ? d(e) : M(e);
@@ -252,9 +256,9 @@ const Qt = F.forwardRef((w, N) => {
252
256
  u(!1), f || p(void 0), a == null || a(void 0, void 0, {}, {});
253
257
  return;
254
258
  }
255
- const [t, r, n] = e.split("-").map(Number);
256
- if (!t || !r || !n) return;
257
- const l = new Date(t, r - 1, n);
259
+ const [t, r, s] = e.split("-").map(Number);
260
+ if (!t || !r || !s) return;
261
+ const l = new Date(t, r - 1, s);
258
262
  if (!Number.isNaN(l.getTime())) {
259
263
  if (v(l)) {
260
264
  u(!0);
@@ -262,48 +266,48 @@ const Qt = F.forwardRef((w, N) => {
262
266
  }
263
267
  u(!1), f || p(l), a == null || a(l, l, {}, {});
264
268
  }
265
- }, _t = Le.getReferenceProps(
266
- g && $ === "input" ? { onClick: () => se() } : void 0
269
+ }, _t = Ye.getReferenceProps(
270
+ g && $ === "input" ? { onClick: () => le() } : void 0
267
271
  ), {
268
272
  role: fr,
269
273
  "aria-expanded": dr,
270
274
  "aria-haspopup": cr,
271
275
  "aria-controls": Ct,
272
276
  ...Mt
273
- } = _t, Ye = g ? void 0 : Ct, le = z("dateField.openCalendar"), je = {
274
- "aria-label": le,
275
- "aria-expanded": g ? ee : h,
277
+ } = _t, je = g ? void 0 : Ct, fe = G("dateField.openCalendar"), He = {
278
+ "aria-label": fe,
279
+ "aria-expanded": g ? re : h,
276
280
  "aria-haspopup": "dialog",
277
- "aria-controls": Ye
281
+ "aria-controls": je
278
282
  };
279
283
  return /* @__PURE__ */ vt(Ft, { children: [
280
284
  /* @__PURE__ */ D(
281
285
  "div",
282
286
  {
283
- className: B(y["tedi-date-field__container"], ze),
287
+ className: B(y["tedi-date-field__container"], Ge),
284
288
  ...Mt,
285
289
  ref: I.setReference,
286
- children: s === "multiple" ? /* @__PURE__ */ D(
290
+ children: o === "multiple" ? /* @__PURE__ */ D(
287
291
  Vt,
288
292
  {
289
293
  ...i,
290
- ref: Ve,
291
- id: he,
292
- label: ge,
294
+ ref: Be,
295
+ id: ge,
296
+ label: ye,
293
297
  tagsDirection: Xe,
294
- values: Be.map((e) => e.label),
298
+ values: Te.map((e) => e.label),
295
299
  icon: "calendar_today",
296
- onIconClick: se,
297
- iconButtonProps: m ? je : { "aria-label": le },
298
- isClearable: pe,
300
+ onIconClick: le,
301
+ iconButtonProps: m ? He : { "aria-label": fe },
302
+ isClearable: he,
299
303
  required: Y,
300
304
  onChange: (e) => {
301
- if (!Array.isArray(o)) return;
302
- const t = Be.filter((r) => e.includes(r.label)).map((r) => r.date);
305
+ if (!Array.isArray(n)) return;
306
+ const t = Te.filter((r) => e.includes(r.label)).map((r) => r.date);
303
307
  f || p(t), a == null || a(t, {}, {}, {});
304
308
  },
305
309
  className: B(y["tedi-date-field__textfield"], {
306
- [y["tedi-date-field__icon--disabled"]]: !m || O
310
+ [y["tedi-date-field__icon--disabled"]]: !m || E
307
311
  })
308
312
  }
309
313
  ) : /* @__PURE__ */ D(
@@ -311,38 +315,39 @@ const Qt = F.forwardRef((w, N) => {
311
315
  {
312
316
  ...i,
313
317
  ref: at,
314
- id: he,
315
- label: ge,
316
- readOnly: O,
317
- value: c ? ot : te,
318
- placeholder: qe,
318
+ id: ge,
319
+ label: ye,
320
+ readOnly: E,
321
+ value: c ? ot : ae,
322
+ placeholder: ze,
319
323
  icon: "calendar_today",
320
- isClearable: pe,
321
- onIconClick: se,
322
- iconButtonProps: m && !c ? je : { "aria-label": le },
324
+ isClearable: he,
325
+ onIconClick: le,
326
+ iconButtonProps: m && !c ? He : { "aria-label": fe },
323
327
  onChange: (e) => c ? Dt(e) : dt(e),
324
328
  onBlur: (e) => {
325
329
  var t;
326
330
  c || ct(), (t = i == null ? void 0 : i.onBlur) == null || t.call(i, e);
327
331
  },
328
332
  required: Y,
329
- invalid: Oe || Re || (i == null ? void 0 : i.invalid),
333
+ invalid: Re || Ie || (i == null ? void 0 : i.invalid),
330
334
  helper: (() => {
331
- const e = i == null ? void 0 : i.helper, t = Oe ? Ze : Re ? et : null, r = t ? { text: t, type: "error" } : null;
335
+ const e = i == null ? void 0 : i.helper, t = Re ? Ze : Ie ? et : null, r = t ? { text: t, type: "error" } : null;
332
336
  return r ? e ? Array.isArray(e) ? [...e, r] : [e, r] : r : e;
333
337
  })(),
334
338
  className: B(y["tedi-date-field__textfield"], {
335
339
  [y["tedi-date-field__textfield--disabled"]]: i == null ? void 0 : i.disabled,
336
- [y["tedi-date-field__icon--disabled"]]: !m || O
340
+ [y["tedi-date-field__icon--disabled"]]: !m || E
337
341
  }),
338
342
  input: {
339
343
  ...i == null ? void 0 : i.input,
344
+ ...!J && o !== "single" && { readOnly: !0 },
340
345
  ...c && { type: "date" },
341
346
  ...m && !c && $ === "input" ? {
342
347
  role: "combobox",
343
348
  "aria-haspopup": "dialog",
344
- "aria-expanded": g ? ee : h,
345
- "aria-controls": Ye
349
+ "aria-expanded": g ? re : h,
350
+ "aria-controls": je
346
351
  } : {}
347
352
  }
348
353
  }
@@ -352,40 +357,40 @@ const Qt = F.forwardRef((w, N) => {
352
357
  g && /* @__PURE__ */ D(
353
358
  jt,
354
359
  {
355
- open: ee,
356
- onOpenChange: Pe,
357
- value: o,
360
+ open: re,
361
+ onOpenChange: Oe,
362
+ value: n,
358
363
  onConfirm: bt,
359
- mode: s,
360
- numberOfMonths: Ie,
361
- locale: xe,
364
+ mode: o,
365
+ numberOfMonths: Ve,
366
+ locale: Ae,
362
367
  localeCode: H,
363
- showOutsideDays: ye,
364
- disabledMatchers: U,
368
+ showOutsideDays: be,
369
+ disabledMatchers: q,
365
370
  required: Y,
366
- availableDays: we,
367
- footer: Ae,
368
- monthYearSelectType: be,
369
- minYear: De,
370
- maxYear: _e,
371
- dayStatus: Ce,
372
- showNavigation: Me,
373
- selectionLevel: E,
371
+ availableDays: Ne,
372
+ footer: ve,
373
+ monthYearSelectType: De,
374
+ minYear: _e,
375
+ maxYear: Ce,
376
+ dayStatus: Me,
377
+ showNavigation: xe,
378
+ selectionLevel: O,
374
379
  initialView: j,
375
380
  initialMonth: W,
376
381
  modalProps: Ke,
377
- ...Ne,
382
+ ...ke,
378
383
  title: Qe
379
384
  }
380
385
  ),
381
- m && !c && !g && /* @__PURE__ */ D(Ot, { children: h && /* @__PURE__ */ D(Rt, { context: q, modal: !1, initialFocus: -1, children: /* @__PURE__ */ D(
386
+ m && !c && !g && /* @__PURE__ */ D(Et, { children: h && /* @__PURE__ */ D(Rt, { context: z, modal: !1, initialFocus: -1, children: /* @__PURE__ */ D(
382
387
  "div",
383
388
  {
384
389
  ref: I.setFloating,
385
390
  className: B({
386
391
  [y["tedi-date-field__calendar-popover--fullwidth"]]: A
387
392
  }),
388
- ...Le.getFloatingProps({
393
+ ...Ye.getFloatingProps({
389
394
  style: {
390
395
  position: ht,
391
396
  top: pt ?? 0,
@@ -396,27 +401,27 @@ const Qt = F.forwardRef((w, N) => {
396
401
  children: /* @__PURE__ */ D(
397
402
  It,
398
403
  {
399
- ...Ne,
400
- numberOfMonths: Ie,
404
+ ...ke,
405
+ numberOfMonths: Ve,
401
406
  view: rt,
402
- selectionLevel: E,
407
+ selectionLevel: O,
403
408
  currentMonth: nt,
404
- setCurrentMonth: oe,
409
+ setCurrentMonth: ne,
405
410
  setView: Ee,
406
- mode: s,
407
- value: o,
408
- locale: xe,
411
+ mode: o,
412
+ value: n,
413
+ locale: Ae,
409
414
  localeCode: H,
410
- showOutsideDays: ye,
411
- disabledMatchers: U,
415
+ showOutsideDays: be,
416
+ disabledMatchers: q,
412
417
  required: Y,
413
- availableDays: we,
414
- footer: Ae,
415
- monthYearSelectType: be,
416
- minYear: De,
417
- maxYear: _e,
418
- dayStatus: Ce,
419
- showNavigation: Me,
418
+ availableDays: Ne,
419
+ footer: ve,
420
+ monthYearSelectType: De,
421
+ minYear: _e,
422
+ maxYear: Ce,
423
+ dayStatus: Me,
424
+ showNavigation: xe,
420
425
  handleSelect: st,
421
426
  applyValue: lt,
422
427
  className: B(y["tedi-date-field__calendar"], {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),_=require("../../../../../external/classnames/index.cjs.js"),l=require("react"),O=require("../../base/icon/icon.cjs.js"),pe=require("../../buttons/closing-button/closing-button.cjs.js"),_e=require("../../misc/separator/separator.cjs.js"),D=require("../feedback-text/feedback-text.cjs.js"),he=require("../field/field.cjs.js"),ge=require("../form-label/form-label.cjs.js"),k=require("../input-group/input-group.cjs.js"),r=require("./textfield.module.scss.cjs.js"),Ie=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),je=require("../../../providers/label-provider/use-labels.cjs.js"),Ae={large:24,default:18},q=l.forwardRef((h,U)=>{var H;const{getCurrentBreakpointProps:J}=Ie.useBreakpointProps(h.defaultServerBreakpoint),{id:Ne,label:g,className:Q,inputClassName:W,disabled:c,required:C,hideLabel:S,invalid:u,readOnly:B,icon:i,onIconClick:b,iconButtonProps:y,size:d="default",placeholder:X,isArrowsHidden:Y=!0,isClearable:F,onClear:v,onChange:o,onChangeEvent:Z,onKeyUp:G,onKeyDown:ee,onKeyPress:te,defaultValue:T,value:I,onFocus:j,onBlur:A,onClick:re,helper:e,input:s,name:ae,isTextArea:le,startSlot:ie,endSlot:se,...ne}=J(h)||{},{getLabel:w}=je.useLabels(),z=l.useRef(null),L=l.useRef(null),[de,R]=l.useState(I??T??""),M=I??de,f=!!(F&&M&&!B),x=(H=k.useOptionalInputGroup)==null?void 0:H.call(k),oe=l.useId(),ce=x==null?void 0:x.hasExternalLabel,m=h.id??(x==null?void 0:x.inputId)??oe;l.useImperativeHandle(U,()=>({get input(){return L.current},get inner(){return z.current}}));const P=l.useMemo(()=>Array.isArray(e)?u||e.some(t=>t.type==="error"):u||(e==null?void 0:e.type)==="error",[u,e]),ue=l.useMemo(()=>!e||Array.isArray(e)&&e.length===0?!1:Array.isArray(e)?!u&&e.every(t=>t.type==="valid"):!u&&e.type==="valid",[u,e]),fe=d==="large"?"default":d,p=I!==void 0,xe=l.useCallback(t=>{p||R(t),o==null||o(t)},[p,o]),$=l.useCallback(()=>{p||R(""),o==null||o(""),v==null||v()},[p,o,v]),E=l.useCallback(()=>{if(!i)return null;const N={size:d==="large"?24:d==="small"?!!b?18:16:18,className:r.default["tedi-textfield__icon"]},K=typeof i=="string"?{...N,name:i}:{...N,...i,className:_.default(N.className,i.className)};return b?a.jsx("button",{type:"button",...y,className:_.default(r.default["tedi-textfield__icon-wrapper"],y==null?void 0:y.className),onClick:c?void 0:b,disabled:c,children:a.jsx(O.Icon,{...K})}):a.jsx("div",{className:r.default["tedi-textfield__icon-wrapper"],"aria-hidden":"true",children:a.jsx(O.Icon,{...K})})},[i,d,b,y,c]),V=l.useMemo(()=>f?a.jsx(pe.ClosingButton,{iconSize:Ae[d==="large"?"large":"default"],onClick:c?void 0:$,disabled:c,title:w("clear"),className:r.default["tedi-textfield__clear-button"]}):null,[f,d,c,$,w]),me=l.useMemo(()=>!f&&!i?null:a.jsxs("div",{className:r.default["tedi-textfield__right-area"],children:[V,f&&i&&a.jsx(_e.Separator,{color:"primary",axis:"vertical",className:r.default["tedi-textfield__separator"]}),i&&E()]}),[f,i,V,E]),ye=a.jsx(he.Field,{...s,id:m,name:ae,value:M,defaultValue:T,onChange:xe,onChangeEvent:Z,disabled:c,readOnly:B,required:C,invalid:P,placeholder:X,className:_.default(r.default["tedi-textfield__input"],W,{[r.default["tedi-textfield__input--hidden-arrows"]]:Y}),onFocus:t=>{var n;(n=s==null?void 0:s.onFocus)==null||n.call(s,t),j==null||j(t)},onBlur:t=>{var n;(n=s==null?void 0:s.onBlur)==null||n.call(s,t),A==null||A(t)},isTextArea:le,"aria-describedby":!e||Array.isArray(e)&&e.length===0?void 0:Array.isArray(e)?e.map((t,n)=>`${m}-helper-${n}`).join(" "):`${m}-helper`,"aria-label":S&&typeof g=="string"?g:void 0,ref:L}),be=_.default(r.default["tedi-textfield"],{[r.default[`tedi-textfield--${d}`]]:d},{[r.default["tedi-textfield--with-icon"]]:i},{[r.default["tedi-textfield--invalid"]]:P},{[r.default["tedi-textfield--valid"]]:ue},{[r.default["tedi-textfield--clearable"]]:f},Q),ve=()=>!e||Array.isArray(e)&&e.length===0?null:a.jsx("div",{className:r.default["tedi-textfield__feedback-wrapper"],children:Array.isArray(e)?e.map((t,n)=>a.jsx(D.FeedbackText,{...t,id:`${m}-helper-${n}`},n)):a.jsx(D.FeedbackText,{...e,id:`${m}-helper`})});return a.jsxs("div",{"data-name":"textfield",...ne,className:be,children:[!ce&&a.jsx(ge.FormLabel,{id:m,label:g,required:C,hideLabel:S,size:fe}),a.jsxs("div",{className:r.default["tedi-textfield__inner"],onKeyDown:ee,onKeyUp:G,onKeyPress:te,onClick:re,ref:z,children:[ie,ye,se,(F||i)&&me]}),ve()]})});q.displayName="TextField";exports.TextField=q;exports.default=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),_=require("../../../../../external/classnames/index.cjs.js"),i=require("react"),K=require("../../base/icon/icon.cjs.js"),pe=require("../../buttons/closing-button/closing-button.cjs.js"),_e=require("../../misc/separator/separator.cjs.js"),D=require("../feedback-text/feedback-text.cjs.js"),he=require("../field/field.cjs.js"),ge=require("../form-label/form-label.cjs.js"),k=require("../input-group/input-group.cjs.js"),r=require("./textfield.module.scss.cjs.js"),Ie=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),je=require("../../../providers/label-provider/use-labels.cjs.js"),Ae={large:24,default:18},q=i.forwardRef((h,U)=>{var V;const{getCurrentBreakpointProps:J}=Ie.useBreakpointProps(h.defaultServerBreakpoint),{id:Ne,label:g,className:Q,inputClassName:W,disabled:c,required:C,hideLabel:S,invalid:u,readOnly:B,icon:s,onIconClick:b,iconButtonProps:y,size:d="default",placeholder:X,isArrowsHidden:Y=!0,isClearable:F,onClear:v,onChange:o,onChangeEvent:Z,onKeyUp:G,onKeyDown:ee,onKeyPress:te,defaultValue:T,value:I,onFocus:j,onBlur:A,onClick:re,helper:e,input:a,name:ae,isTextArea:le,startSlot:ie,endSlot:se,...ne}=J(h)||{},{getLabel:w}=je.useLabels(),z=i.useRef(null),L=i.useRef(null),[de,R]=i.useState(I??T??""),M=I??de,f=!!(F&&M&&!B),x=(V=k.useOptionalInputGroup)==null?void 0:V.call(k),oe=i.useId(),ce=x==null?void 0:x.hasExternalLabel,m=h.id??(x==null?void 0:x.inputId)??oe;i.useImperativeHandle(U,()=>({get input(){return L.current},get inner(){return z.current}}));const P=i.useMemo(()=>Array.isArray(e)?u||e.some(t=>t.type==="error"):u||(e==null?void 0:e.type)==="error",[u,e]),ue=i.useMemo(()=>!e||Array.isArray(e)&&e.length===0?!1:Array.isArray(e)?!u&&e.every(t=>t.type==="valid"):!u&&e.type==="valid",[u,e]),fe=d==="large"?"default":d,p=I!==void 0,xe=i.useCallback(t=>{p||R(t),o==null||o(t)},[p,o]),O=i.useCallback(()=>{p||R(""),o==null||o(""),v==null||v()},[p,o,v]),$=i.useCallback(()=>{if(!s)return null;const N={size:d==="large"?24:d==="small"?!!b?18:16:18,className:r.default["tedi-textfield__icon"]},H=typeof s=="string"?{...N,name:s}:{...N,...s,className:_.default(N.className,s.className)};return b?l.jsx("button",{type:"button",...y,className:_.default(r.default["tedi-textfield__icon-wrapper"],y==null?void 0:y.className),onClick:c?void 0:b,disabled:c,children:l.jsx(K.Icon,{...H})}):l.jsx("div",{className:r.default["tedi-textfield__icon-wrapper"],"aria-hidden":"true",children:l.jsx(K.Icon,{...H})})},[s,d,b,y,c]),E=i.useMemo(()=>f?l.jsx(pe.ClosingButton,{iconSize:Ae[d==="large"?"large":"default"],onClick:c?void 0:O,disabled:c,title:w("clear"),className:r.default["tedi-textfield__clear-button"]}):null,[f,d,c,O,w]),me=i.useMemo(()=>!f&&!s?null:l.jsxs("div",{className:r.default["tedi-textfield__right-area"],children:[E,f&&s&&l.jsx(_e.Separator,{color:"primary",axis:"vertical",className:r.default["tedi-textfield__separator"]}),s&&$()]}),[f,s,E,$]),ye=l.jsx(he.Field,{...a,id:m,name:ae,value:M,defaultValue:T,onChange:xe,onChangeEvent:Z,disabled:c,readOnly:B||(a==null?void 0:a.readOnly),required:C,invalid:P,placeholder:X,className:_.default(r.default["tedi-textfield__input"],W,{[r.default["tedi-textfield__input--hidden-arrows"]]:Y}),onFocus:t=>{var n;(n=a==null?void 0:a.onFocus)==null||n.call(a,t),j==null||j(t)},onBlur:t=>{var n;(n=a==null?void 0:a.onBlur)==null||n.call(a,t),A==null||A(t)},isTextArea:le,"aria-describedby":!e||Array.isArray(e)&&e.length===0?void 0:Array.isArray(e)?e.map((t,n)=>`${m}-helper-${n}`).join(" "):`${m}-helper`,"aria-label":S&&typeof g=="string"?g:void 0,ref:L}),be=_.default(r.default["tedi-textfield"],{[r.default[`tedi-textfield--${d}`]]:d},{[r.default["tedi-textfield--with-icon"]]:s},{[r.default["tedi-textfield--invalid"]]:P},{[r.default["tedi-textfield--valid"]]:ue},{[r.default["tedi-textfield--clearable"]]:f},Q),ve=()=>!e||Array.isArray(e)&&e.length===0?null:l.jsx("div",{className:r.default["tedi-textfield__feedback-wrapper"],children:Array.isArray(e)?e.map((t,n)=>l.jsx(D.FeedbackText,{...t,id:`${m}-helper-${n}`},n)):l.jsx(D.FeedbackText,{...e,id:`${m}-helper`})});return l.jsxs("div",{"data-name":"textfield",...ne,className:be,children:[!ce&&l.jsx(ge.FormLabel,{id:m,label:g,required:C,hideLabel:S,size:fe}),l.jsxs("div",{className:r.default["tedi-textfield__inner"],onKeyDown:ee,onKeyUp:G,onKeyPress:te,onClick:re,ref:z,children:[ie,ye,se,(F||s)&&me]}),ve()]})});q.displayName="TextField";exports.TextField=q;exports.default=q;