asma-ui-core 3.95.1 → 3.97.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.
@@ -1,44 +1,45 @@
1
- import { cn as $ } from "../../../../helpers/cn.js";
2
- import { LoadingIcon as X } from "../../../icons/loading-icon/LoadingIcon.js";
3
- import { CheckIcon as Y } from "../../../icons/check-icon/CheckIcon.js";
4
- import { PlusIconCircle as Z } from "../../../icons/plus-icon-circle/PlusIconCircle.js";
5
- import { StyledChip as j } from "../../../data-display/chip/StyledChip.js";
6
- import { StyledCheckbox as ee } from "../../checkbox/base-ui/StyledCheckbox.js";
7
- import { StyledTooltip as D } from "../../../data-display/tooltip/StyledTooltip.js";
8
- import { StyledInputField as te } from "../../input-field/StyledInputField.js";
9
- import { StyledSelectAutocomplete as le } from "../../select-autocomplete/StyledSelectAutocomplete.js";
10
- import { DynamicInteractiveChipGroup as ae } from "./DynamicInteractiveChipGroup.js";
11
- import { createElement as L, forwardRef as re, useCallback as f, useState as oe } from "react";
12
- import { Fragment as q, jsx as l, jsxs as C } from "react/jsx-runtime";
13
- var xe = re((T, E) => {
14
- const [F, O] = oe(!1), { options: k, dataTest: h, value: g, readOnly: u, multiple: o, required: K, onChange: x, size: z, title: v, noOptionsText: H, placeholder: _, disabled: S, helperText: R, disableHelperText: I, error: N, valueKey: A = "value", labelKey: G = "label", renderLabel: i, getOptionTooltip: P, startAdornment: W, autocompleteProps: n, loading: m, maxTags: J, onFocus: M, onBlur: Q } = T, s = (e) => typeof e == "object" ? e?.[G]?.toString() ?? "" : e?.toString() ?? "", p = f((e) => typeof e == "object" ? e?.[A] : e, [A]), V = f((e, t) => p(e) === p(t), [p]), y = (e) => {
1
+ import { cn as j } from "../../../../helpers/cn.js";
2
+ import { LoadingIcon as Y } from "../../../icons/loading-icon/LoadingIcon.js";
3
+ import { CheckIcon as Z } from "../../../icons/check-icon/CheckIcon.js";
4
+ import { PlusIconCircle as ee } from "../../../icons/plus-icon-circle/PlusIconCircle.js";
5
+ import { StyledChip as D } from "../../../data-display/chip/StyledChip.js";
6
+ import { StyledCheckbox as te } from "../../checkbox/base-ui/StyledCheckbox.js";
7
+ import { StyledTooltip as L } from "../../../data-display/tooltip/StyledTooltip.js";
8
+ import { StyledInputField as le } from "../../input-field/StyledInputField.js";
9
+ import { StyledSelectAutocomplete as ae } from "../../select-autocomplete/StyledSelectAutocomplete.js";
10
+ import { DynamicInteractiveChipGroup as re } from "./DynamicInteractiveChipGroup.js";
11
+ import { createElement as q, forwardRef as oe, useCallback as f, useState as ne } from "react";
12
+ import { Fragment as z, jsx as l, jsxs as T } from "react/jsx-runtime";
13
+ var ve = oe((O, E) => {
14
+ const [F, S] = ne(!1), { options: k, dataTest: h, value: g, readOnly: u, multiple: o, required: K, onChange: x, size: H, rowSize: v = "compact", title: y, noOptionsText: _, placeholder: R, disabled: I, helperText: G, disableHelperText: N, error: A, valueKey: P = "value", labelKey: W = "label", renderLabel: i, getOptionTooltip: V, startAdornment: J, autocompleteProps: n, loading: m, maxTags: M, onFocus: Q, onBlur: U } = O, s = (e) => typeof e == "object" ? e?.[W]?.toString() ?? "" : e?.toString() ?? "", p = f((e) => typeof e == "object" ? e?.[P] : e, [P]), B = f((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
- }, B = f((e) => {
18
- O(!0), n?.onOpen?.(e);
19
- }, [n]), U = f((e, t) => {
20
- O(!1), n?.onClose?.(e, t);
17
+ }, $ = f((e) => {
18
+ S(!0), n?.onOpen?.(e);
19
+ }, [n]), X = f((e, t) => {
20
+ S(!1), n?.onClose?.(e, t);
21
21
  }, [n]);
22
- if (o && u) return /* @__PURE__ */ l(ae, { ...T });
23
- const w = v ? `${h}-title` : void 0;
24
- return /* @__PURE__ */ C("div", {
22
+ if (o && u) return /* @__PURE__ */ l(re, { ...O });
23
+ const C = y ? `${h}-title` : void 0;
24
+ return /* @__PURE__ */ T("div", {
25
25
  className: "flex w-full flex-col gap-y-1",
26
- children: [v && /* @__PURE__ */ l("span", {
27
- id: w,
26
+ children: [y && /* @__PURE__ */ l("span", {
27
+ id: C,
28
28
  className: "text-base font-semibold text-delta-800",
29
- children: v
30
- }), /* @__PURE__ */ l(le, {
29
+ children: y
30
+ }), /* @__PURE__ */ l(ae, {
31
31
  open: F,
32
- onOpen: B,
33
- onClose: U,
32
+ onOpen: $,
33
+ onClose: X,
34
34
  disableCloseOnSelect: o,
35
35
  dataTest: h,
36
- disabled: !!S || !!m,
37
- noOptionsText: H,
36
+ disabled: !!I || !!m,
37
+ noOptionsText: _,
38
38
  loading: m,
39
39
  readOnly: u,
40
40
  value: g,
41
- size: z,
41
+ size: H,
42
+ rowSize: v,
42
43
  disableClearable: K,
43
44
  options: k,
44
45
  fullWidth: !0,
@@ -48,14 +49,14 @@ var xe = re((T, E) => {
48
49
  x(t);
49
50
  },
50
51
  filterSelectedOptions: !1,
51
- isOptionEqualToValue: n?.isOptionEqualToValue ?? V,
52
+ isOptionEqualToValue: n?.isOptionEqualToValue ?? B,
52
53
  autoHeight: !0,
53
54
  multiple: o,
54
55
  renderValue: o ? (e) => {
55
56
  if (!Array.isArray(e)) return null;
56
- const t = e, d = J ?? k.length, a = t.slice(0, d), c = t.length - d;
57
- return [...a.map((r) => /* @__PURE__ */ l(j, {
58
- dataTest: `${y(r)}-chip`,
57
+ const t = e, d = M ?? k.length, a = t.slice(0, d), c = t.length - d;
58
+ return [...a.map((r) => /* @__PURE__ */ l(D, {
59
+ dataTest: `${w(r)}-chip`,
59
60
  readOnly: u,
60
61
  variant: "outlined",
61
62
  label: i ? i(r) : s(r),
@@ -63,47 +64,47 @@ var xe = re((T, E) => {
63
64
  root: "h-fit w-fit min-h-[32px]",
64
65
  label: "block whitespace-normal"
65
66
  },
66
- disabled: !!S || !!m,
67
+ disabled: !!I || !!m,
67
68
  deleteButtonTabIndex: -1,
68
69
  onDelete: () => {
69
- Array.isArray(g) && x(g.filter((b) => !V(b, r)));
70
+ Array.isArray(g) && x(g.filter((b) => !B(b, r)));
70
71
  }
71
- }, y(r))), c > 0 ? /* @__PURE__ */ l(j, {
72
+ }, w(r))), c > 0 ? /* @__PURE__ */ l(D, {
72
73
  dataTest: "remaining-count-tag-chip",
73
74
  label: `+${c}`,
74
75
  variant: "outlined",
75
76
  tabIndex: -1,
76
- onClick: B
77
+ onClick: $
77
78
  }, "remaining-count") : null];
78
79
  } : void 0,
79
- popupIcon: m ? /* @__PURE__ */ l(X, {
80
+ popupIcon: m ? /* @__PURE__ */ l(Y, {
80
81
  height: 24,
81
82
  width: 24
82
- }) : o ? /* @__PURE__ */ l(Z, {
83
+ }) : o ? /* @__PURE__ */ l(ee, {
83
84
  height: 24,
84
85
  width: 24
85
86
  }) : void 0,
86
87
  renderOption: (e, t, d) => {
87
- const a = typeof t == "object" ? !!t?.disabled : !1, c = P ? P(t) : null;
88
+ const a = typeof t == "object" ? !!t?.disabled : !1, c = V ? V(t) : null;
88
89
  if (o) {
89
90
  const b = d.selected;
90
- return /* @__PURE__ */ L("li", {
91
+ return /* @__PURE__ */ q("li", {
91
92
  ...e,
92
93
  role: "option",
93
94
  "aria-selected": b,
94
95
  key: e.id,
95
96
  onClick: a ? void 0 : e.onClick,
96
- className: $("relative flex min-h-10 cursor-pointer items-center gap-x-1 bg-white px-2 text-base aria-selected:bg-gama-50 hover:bg-delta-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
97
+ className: j("relative flex cursor-pointer items-center gap-x-1 bg-white px-2 text-base aria-selected:bg-gama-50 hover:bg-delta-50", v === "regular" ? "min-h-12" : "min-h-10", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
97
98
  "aria-disabled": a
98
99
  }, e["data-active"] !== void 0 && /* @__PURE__ */ l("span", {
99
100
  "aria-hidden": "true",
100
101
  className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
101
- }), /* @__PURE__ */ l(D, {
102
+ }), /* @__PURE__ */ l(L, {
102
103
  arrow: !0,
103
104
  title: c,
104
- children: /* @__PURE__ */ C(q, { children: [/* @__PURE__ */ l(ee, {
105
+ children: /* @__PURE__ */ T(z, { children: [/* @__PURE__ */ l(te, {
105
106
  disabled: a,
106
- dataTest: `${y(t)}-checkbox`,
107
+ dataTest: `${w(t)}-checkbox`,
107
108
  size: "small",
108
109
  decorative: !0,
109
110
  className: "min-w-[36px]",
@@ -115,23 +116,23 @@ var xe = re((T, E) => {
115
116
  }));
116
117
  }
117
118
  const r = d.selected;
118
- return /* @__PURE__ */ L("li", {
119
+ return /* @__PURE__ */ q("li", {
119
120
  ...e,
120
121
  role: "option",
121
122
  "aria-selected": r,
122
123
  key: e.id,
123
- className: $("relative flex min-h-10 cursor-pointer items-center gap-x-1 px-2 text-base aria-selected:bg-gama-50 hover:bg-delta-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
124
+ className: j("relative flex cursor-pointer items-center gap-x-1 px-2 text-base aria-selected:bg-gama-50 hover:bg-delta-50", v === "regular" ? "min-h-12" : "min-h-10", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
124
125
  onClick: a ? void 0 : e.onClick,
125
126
  "aria-disabled": a
126
127
  }, e["data-active"] !== void 0 && /* @__PURE__ */ l("span", {
127
128
  "aria-hidden": "true",
128
129
  className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
129
- }), /* @__PURE__ */ l(D, {
130
+ }), /* @__PURE__ */ l(L, {
130
131
  arrow: !0,
131
132
  title: c,
132
- children: /* @__PURE__ */ C(q, { children: [/* @__PURE__ */ l("span", {
133
+ children: /* @__PURE__ */ T(z, { children: [/* @__PURE__ */ l("span", {
133
134
  className: "w-5 min-w-5",
134
- children: r && /* @__PURE__ */ l(Y, {
135
+ children: r && /* @__PURE__ */ l(Z, {
135
136
  className: "size-5 min-h-5 min-w-5 text-gama-500",
136
137
  height: 20,
137
138
  width: 20
@@ -142,30 +143,30 @@ var xe = re((T, E) => {
142
143
  })] })
143
144
  }));
144
145
  },
145
- renderInput: (e) => /* @__PURE__ */ l(te, {
146
+ renderInput: (e) => /* @__PURE__ */ l(le, {
146
147
  dataTest: `${h}-input-field`,
147
148
  ...e,
148
149
  inputRef: E,
149
- error: N,
150
- helperText: I ? void 0 : R,
151
- reserveHelperText: I ? !1 : N !== void 0,
150
+ error: A,
151
+ helperText: N ? void 0 : G,
152
+ reserveHelperText: N ? !1 : A !== void 0,
152
153
  variant: "outlined",
153
154
  label: "",
154
- placeholder: _,
155
+ placeholder: R,
155
156
  readOnly: u,
156
- onFocus: M,
157
- onBlur: Q,
157
+ onFocus: Q,
158
+ onBlur: U,
158
159
  onKeyDown: e.onKeyDown,
159
160
  autoComplete: "off",
160
161
  slotProps: {
161
162
  ...e.slotProps,
162
163
  input: {
163
164
  ...e.slotProps?.input ?? {},
164
- startAdornment: W ?? e.slotProps?.input?.startAdornment
165
+ startAdornment: J ?? e.slotProps?.input?.startAdornment
165
166
  },
166
167
  htmlInput: {
167
168
  ...e.slotProps?.htmlInput ?? {},
168
- ...w ? { "aria-labelledby": w } : {}
169
+ ...C ? { "aria-labelledby": C } : {}
169
170
  }
170
171
  }
171
172
  }),
@@ -174,5 +175,5 @@ var xe = re((T, E) => {
174
175
  });
175
176
  });
176
177
  export {
177
- xe as DynamicSelectAutocomplete
178
+ ve as DynamicSelectAutocomplete
178
179
  };
@@ -4,140 +4,145 @@ import { CloseIcon as Ze } from "../../icons/close-icon/CloseIcon.js";
4
4
  import { HelperRow as qe } from "../../../helpers/HelperRow.js";
5
5
  import { useHelperRowBudget as Oe } from "../../../helpers/useHelperRowBudget.js";
6
6
  import { useHelperSlot as et } from "../../../helpers/useHelperSlot.js";
7
- import { floatingLabelClass as tt, floatingLabelLayoutStyle as nt, notchedLegendClass as ot, notchedOutlineClass as X, singleLineInputLayoutStyle as it, singleLineShellLayoutStyle as lt } from "../field-styles.js";
8
- import S from "./StyledInputField.module.js";
9
- import { Children as at, useCallback as st, useId as rt, useLayoutEffect as Z, useRef as q, useState as D } from "react";
10
- import { jsx as o, jsxs as y } from "react/jsx-runtime";
11
- import { useMergeRefs as O } from "@floating-ui/react";
12
- var Mt = ({ dataTest: m, label: l, value: u, defaultValue: b, onChange: ee, onBlur: te, onFocus: ne, error: c, helperText: E, reserveHelperText: oe, expandHelperText: ie = !0, disabled: s, readOnly: n, required: v, allowClear: le, onClear: ae, type: se = "text", placeholder: re, name: de, id: ce, autoComplete: pe, autoFocus: me, multiline: r, rows: N, minRows: H, maxRows: C, size: ue = "medium", fullWidth: he, className: ge, style: fe, sx: xe, inputRef: Se, slotProps: t, InputProps: P, onKeyDown: T, onClick: ye, variant: dt }) => {
13
- const be = rt(), R = ce ?? be, $ = `${R}-helper-text`, j = q(null), z = q(null), [He, Ie] = D(void 0), [I, K] = D(!1), [Le, U] = D(b != null && b !== ""), A = u !== void 0, V = A ? u !== "" && u != null : Le, ve = !!s || !!n, w = t?.input?.startAdornment ?? P?.startAdornment, h = at.count(w) > 0, d = h && Array.isArray(w), g = t?.input?.endAdornment ?? P?.endAdornment, _ = !!(le && V && !ve), { ref: Ne, ...i } = t?.htmlInput ?? {}, Ce = Se ?? Ne, { className: Re, style: B, ref: Ae } = t?.input ?? {}, we = O([Ae]), _e = t?.input?.onMouseDown, W = t?.input?.onClick, Be = W ? { onClick: W } : {}, Fe = pe ?? i.autoComplete, Me = de ?? i.name, L = I || V || h, ke = (e) => {
14
- n || (A || U(e.target.value !== ""), ee?.(e));
7
+ import { floatingLabelClass as tt, floatingLabelLayoutStyle as nt, notchedLegendClass as ot, notchedOutlineClass as Z, singleLineInputLayoutStyle as it, singleLineShellLayoutStyle as lt } from "../field-styles.js";
8
+ import y from "./StyledInputField.module.js";
9
+ import { Children as at, useCallback as st, useId as rt, useLayoutEffect as q, useRef as O, useState as D } from "react";
10
+ import { jsx as o, jsxs as S } from "react/jsx-runtime";
11
+ import { useMergeRefs as ee } from "@floating-ui/react";
12
+ var Mt = ({ dataTest: h, label: l, value: g, defaultValue: b, onChange: te, onBlur: ne, onFocus: oe, error: c, helperText: E, reserveHelperText: ie, expandHelperText: le = !0, disabled: s, readOnly: n, required: N, allowClear: ae, onClear: se, type: re = "text", placeholder: de, name: ce, id: pe, autoComplete: me, autoFocus: ue, multiline: r, rows: C, minRows: H, maxRows: R, size: he = "medium", fullWidth: P, className: ge, style: fe, sx: xe, inputRef: ye, slotProps: t, InputProps: T, onKeyDown: $, onClick: Se, variant: dt }) => {
13
+ const be = rt(), A = pe ?? be, j = `${A}-helper-text`, z = O(null), K = O(null), [He, Ie] = D(void 0), [I, U] = D(!1), [Le, V] = D(b != null && b !== ""), w = g !== void 0, Y = w ? g !== "" && g != null : Le, ve = !!s || !!n, _ = t?.input?.startAdornment ?? T?.startAdornment, f = at.count(_) > 0, d = f && Array.isArray(_), p = t?.input?.endAdornment ?? T?.endAdornment, L = !!(ae && Y && !ve), { ref: Ne, ...i } = t?.htmlInput ?? {}, Ce = ye ?? Ne, { className: Re, style: B, ref: Ae } = t?.input ?? {}, we = ee([Ae]), _e = t?.input?.onMouseDown, G = t?.input?.onClick, Be = G ? { onClick: G } : {}, Fe = me ?? i.autoComplete, Me = ce ?? i.name, v = I || Y || f, ke = (e) => {
14
+ n || (w || V(e.target.value !== ""), te?.(e));
15
15
  }, De = (e) => {
16
- !s && !n && K(!0), ne?.(e);
16
+ !s && !n && U(!0), oe?.(e);
17
17
  }, Ee = (e) => {
18
- !s && !n && K(!1), te?.(e);
18
+ !s && !n && U(!1), ne?.(e);
19
19
  };
20
- Z(() => {
21
- const e = j.current;
22
- if (!r || N != null || !e) return;
20
+ q(() => {
21
+ const e = z.current;
22
+ if (!r || C != null || !e) return;
23
23
  e.style.height = "auto";
24
- const p = getComputedStyle(e), x = Number.parseFloat(p.lineHeight) || 24, Q = Number.parseFloat(p.paddingTop) + Number.parseFloat(p.paddingBottom), Qe = H ? H * x + Q : 0, Xe = C ? C * x + Q : Number.POSITIVE_INFINITY;
25
- e.style.height = `${Math.min(Xe, Math.max(Qe, e.scrollHeight))}px`;
24
+ const u = getComputedStyle(e), x = Number.parseFloat(u.lineHeight) || 24, X = Number.parseFloat(u.paddingTop) + Number.parseFloat(u.paddingBottom), We = H ? H * x + X : 0, Xe = R ? R * x + X : Number.POSITIVE_INFINITY;
25
+ e.style.height = `${Math.min(Xe, Math.max(We, e.scrollHeight))}px`;
26
26
  }, [
27
27
  b,
28
- C,
28
+ R,
29
29
  H,
30
30
  r,
31
- N,
32
- u
31
+ C,
32
+ g
33
33
  ]);
34
- const Y = O([Ce, st((e) => {
35
- j.current = e instanceof HTMLTextAreaElement ? e : null;
36
- }, [])]), { style: F, ...Pe } = i, f = !r && !d, { height: ct, minHeight: pt, maxHeight: mt, paddingTop: ut, paddingBottom: ht, ...Te } = B ?? {}, $e = f ? {
34
+ const J = ee([Ce, st((e) => {
35
+ z.current = e instanceof HTMLTextAreaElement ? e : null;
36
+ }, [])]), { style: F, ...Pe } = i, m = !r && !d, { height: ct, minHeight: pt, maxHeight: mt, paddingTop: ut, paddingBottom: ht, ...Te } = B ?? {}, $e = m ? {
37
37
  ...Te,
38
38
  ...lt()
39
39
  } : d ? {
40
40
  boxSizing: "border-box",
41
41
  minHeight: 40,
42
42
  ...B
43
- } : B, { height: gt, minHeight: ft, maxHeight: xt, paddingTop: St, paddingBottom: yt, paddingLeft: bt, paddingRight: je, ...ze } = F ?? {}, Ke = f ? {
43
+ } : B, { height: gt, minHeight: ft, maxHeight: xt, paddingTop: yt, paddingBottom: St, paddingLeft: bt, paddingRight: je, ...ze } = F ?? {}, Ke = m ? {
44
44
  ...ze,
45
45
  ...it({
46
- paddingLeft: h ? 40 : 14,
47
- paddingRight: je ?? He ?? (_ || g ? 40 : 14)
46
+ paddingLeft: f ? 40 : 14,
47
+ paddingRight: je ?? He ?? (L || p ? 40 : 14)
48
48
  })
49
49
  } : F;
50
- Z(() => {
51
- if (!f) return;
52
- const e = z.current, p = e ? Math.ceil(e.getBoundingClientRect().width) + 20 : void 0;
53
- Ie((x) => x === p ? x : p);
54
- });
55
- const Ue = L || !l, { show: M, role: Ve } = et("StyledInputField", c, E, oe, n), { fieldRef: We, rowRef: Ye, rowStyle: Ge } = Oe(ie && M), G = {
50
+ q(() => {
51
+ if (!m) return;
52
+ const e = K.current, u = e ? Math.ceil(e.getBoundingClientRect().width) + 20 : void 0;
53
+ Ie((x) => x === u ? x : u);
54
+ }, [
55
+ m,
56
+ L,
57
+ p
58
+ ]);
59
+ const Ue = v || !l, { show: M, role: Ve } = et("StyledInputField", c, E, ie, n), { fieldRef: Ye, rowRef: Ge, rowStyle: Je } = Oe(le && M), Q = {
56
60
  ...Pe,
57
- style: f ? Ke : F,
58
- id: i.id ?? R,
61
+ style: m ? Ke : F,
62
+ id: i.id ?? A,
59
63
  name: Me,
60
- placeholder: Ue ? re : void 0,
64
+ placeholder: Ue ? de : void 0,
61
65
  disabled: s,
62
66
  readOnly: n,
63
- required: v,
67
+ required: N,
64
68
  autoComplete: Fe,
65
- autoFocus: me,
66
- value: u,
69
+ autoFocus: ue,
70
+ value: g,
67
71
  defaultValue: b,
68
72
  "aria-invalid": c ? !0 : void 0,
69
73
  "aria-label": i["aria-label"] ?? (i["aria-labelledby"] ? void 0 : typeof l == "string" && l !== "" ? l : void 0),
70
- "aria-describedby": M ? $ : i["aria-describedby"],
74
+ "aria-describedby": M ? j : i["aria-describedby"],
71
75
  onChange: ke,
72
76
  onFocus: De,
73
77
  onBlur: Ee,
74
- onKeyDown: i.onKeyDown || T ? (e) => {
75
- T?.(e), e.defaultPrevented || i.onKeyDown?.(e);
78
+ onKeyDown: i.onKeyDown || $ ? (e) => {
79
+ $?.(e), e.defaultPrevented || i.onKeyDown?.(e);
76
80
  } : void 0
77
- }, J = a(S.Input, "peer border-0 bg-transparent text-base tracking-[0.00938em] text-delta-800 outline-none placeholder:text-delta-500", d ? "box-border h-8 min-w-[60px] flex-1 py-0 pl-0 pr-0 leading-[23px]" : r ? "w-full resize-none overflow-hidden p-0 pl-0 pr-0 leading-[23px]" : a("w-full", S["Input--singleLine"]), "disabled:text-delta-300", n && "text-delta-800", Re), Je = !r && !d ? {
78
- "data-start-adornment": h ? "true" : void 0,
79
- "data-end-adornment": _ || g ? "true" : void 0
81
+ }, W = a(y.Input, "peer border-0 bg-transparent text-base tracking-[0.00938em] text-delta-800 outline-none placeholder:text-delta-500", d ? "box-border h-8 min-w-[60px] flex-1 py-0 pl-0 pr-0 leading-[23px]" : r ? "w-full resize-none overflow-hidden p-0 pl-0 pr-0 leading-[23px]" : a("w-full", y["Input--singleLine"]), "disabled:text-delta-300", n && "text-delta-800", Re), Qe = !r && !d ? {
82
+ "data-start-adornment": f ? "true" : void 0,
83
+ "data-end-adornment": L || p ? "true" : void 0
80
84
  } : {};
81
- return /* @__PURE__ */ y("div", {
82
- ref: We,
83
- className: a("group relative inline-flex flex-col", ge),
84
- onClick: ye,
85
+ return /* @__PURE__ */ S("div", {
86
+ ref: Ye,
87
+ className: a("group relative min-w-0 flex-col", ge),
88
+ onClick: Se,
85
89
  style: {
86
- width: he ? "100%" : 235,
90
+ display: P ? "flex" : "inline-flex",
91
+ width: P ? "100%" : 235,
87
92
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
88
93
  letterSpacing: "0.00938em",
89
94
  ...k(xe),
90
95
  ...fe
91
96
  },
92
- children: [/* @__PURE__ */ y("div", {
97
+ children: [/* @__PURE__ */ S("div", {
93
98
  className: "relative overflow-visible",
94
- children: [/* @__PURE__ */ y("div", {
95
- className: a("relative flex", f && S.InputShell, r && "box-border items-center px-[14px] py-[16.5px]", d && a(S.AdornmentList, g && S["AdornmentList--endAdornment"]), n && "rounded bg-delta-50"),
99
+ children: [/* @__PURE__ */ S("div", {
100
+ className: a("relative flex", m && y.InputShell, r && "box-border items-center px-[14px] py-[16.5px]", d && a(y.AdornmentList, p && y["AdornmentList--endAdornment"]), n && "rounded bg-delta-50"),
96
101
  ref: we,
97
102
  onMouseDown: _e,
98
103
  ...Be,
99
104
  style: $e,
100
- "data-testid": d ? `${m}-adornment-list` : `${m}-shell`,
105
+ "data-testid": d ? `${h}-adornment-list` : `${h}-shell`,
101
106
  children: [
102
- h && /* @__PURE__ */ o("span", {
107
+ f && /* @__PURE__ */ o("span", {
103
108
  className: a("items-center text-delta-500", d ? "contents" : "absolute left-3 flex"),
104
- children: w
109
+ children: _
105
110
  }),
106
111
  r ? /* @__PURE__ */ o("textarea", {
107
- ...G,
108
- ref: Y,
109
- "data-testid": m,
110
- rows: N ?? H ?? 2,
111
- className: J
112
+ ...Q,
113
+ ref: J,
114
+ "data-testid": h,
115
+ rows: C ?? H ?? 2,
116
+ className: W
112
117
  }) : /* @__PURE__ */ o("input", {
113
- ...G,
114
- ...Je,
115
- ref: Y,
116
- "data-testid": m,
117
- type: se,
118
- className: J
118
+ ...Q,
119
+ ...Qe,
120
+ ref: J,
121
+ "data-testid": h,
122
+ type: re,
123
+ className: W
119
124
  }),
120
- _ ? /* @__PURE__ */ o("button", {
125
+ L ? /* @__PURE__ */ o("button", {
121
126
  type: "button",
122
127
  tabIndex: -1,
123
128
  "aria-label": "Clear",
124
- "data-testid": `${m}-clear`,
129
+ "data-testid": `${h}-clear`,
125
130
  className: "asma-pressable absolute right-4 z-40 flex items-center justify-center rounded-full border-0 bg-transparent p-[2px] duration-300 hover:bg-gama-100",
126
131
  onClick: (e) => {
127
- e.stopPropagation(), e.preventDefault(), A || U(!1), ae?.();
132
+ e.stopPropagation(), e.preventDefault(), w || V(!1), se?.();
128
133
  },
129
134
  children: /* @__PURE__ */ o(Ze, {
130
135
  width: 18,
131
136
  height: 18
132
137
  })
133
- }) : g && /* @__PURE__ */ o("span", {
134
- ref: z,
138
+ }) : p && /* @__PURE__ */ o("span", {
139
+ ref: K,
135
140
  className: "absolute inset-y-0 right-[14px] flex max-w-[calc(100%-28px)] items-center gap-1",
136
- children: g
141
+ children: p
137
142
  }),
138
143
  l ? /* @__PURE__ */ o("fieldset", {
139
144
  "aria-hidden": !0,
140
- className: X({
145
+ className: Z({
141
146
  focused: I,
142
147
  error: c,
143
148
  disabled: s,
@@ -145,15 +150,15 @@ var Mt = ({ dataTest: m, label: l, value: u, defaultValue: b, onChange: ee, onBl
145
150
  notched: !0
146
151
  }),
147
152
  children: /* @__PURE__ */ o("legend", {
148
- className: ot(L),
149
- children: /* @__PURE__ */ y("span", {
153
+ className: ot(v),
154
+ children: /* @__PURE__ */ S("span", {
150
155
  className: "inline-block px-[5px]",
151
- children: [l, v && " *"]
156
+ children: [l, N && " *"]
152
157
  })
153
158
  })
154
159
  }) : /* @__PURE__ */ o("div", {
155
160
  "aria-hidden": !0,
156
- className: X({
161
+ className: Z({
157
162
  focused: I,
158
163
  error: c,
159
164
  disabled: s,
@@ -162,33 +167,33 @@ var Mt = ({ dataTest: m, label: l, value: u, defaultValue: b, onChange: ee, onBl
162
167
  })
163
168
  })
164
169
  ]
165
- }), l && /* @__PURE__ */ y("label", {
166
- htmlFor: R,
170
+ }), l && /* @__PURE__ */ S("label", {
171
+ htmlFor: A,
167
172
  className: a(tt({
168
- shrink: L,
173
+ shrink: v,
169
174
  focused: I,
170
175
  error: c,
171
176
  disabled: s,
172
177
  readOnly: n,
173
- size: ue
178
+ size: he
174
179
  }), t?.inputLabel?.className),
175
180
  style: {
176
181
  ...k(t?.inputLabel?.sx),
177
182
  ...t?.inputLabel?.style,
178
- ...nt(L)
183
+ ...nt(v)
179
184
  },
180
- children: [l, v && " *"]
185
+ children: [l, N && " *"]
181
186
  })]
182
187
  }), M && /* @__PURE__ */ o(qe, {
183
- ref: Ye,
184
- id: $,
188
+ ref: Ge,
189
+ id: j,
185
190
  role: Ve,
186
191
  error: c,
187
192
  message: E,
188
193
  hideErrorIcon: t?.formHelperText?.hideErrorIcon,
189
194
  className: a("mr-[14px] box-border items-start", t?.formHelperText?.className),
190
195
  style: {
191
- ...Ge,
196
+ ...Je,
192
197
  ...k(t?.formHelperText?.sx)
193
198
  }
194
199
  })]
@@ -1,9 +1,9 @@
1
- var n = "_Input_1sz1p_1", t = "_InputShell_1sz1p_8", e = "_AdornmentList_1sz1p_36", _ = {
1
+ var n = "_Input_1focb_1", t = "_InputShell_1focb_8", e = "_AdornmentList_1focb_36", _ = {
2
2
  Input: n,
3
3
  InputShell: t,
4
- "Input--singleLine": "_Input--singleLine_1sz1p_17",
4
+ "Input--singleLine": "_Input--singleLine_1focb_17",
5
5
  AdornmentList: e,
6
- "AdornmentList--endAdornment": "_AdornmentList--endAdornment_1sz1p_45"
6
+ "AdornmentList--endAdornment": "_AdornmentList--endAdornment_1focb_46"
7
7
  };
8
8
  export {
9
9
  _ as default