asma-ui-core 3.101.6 → 3.102.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,204 +1,231 @@
1
- import { cn as a } from "../../../helpers/cn.js";
2
- import { resolveSx as k } from "../../../helpers/sx.js";
3
- import { CloseIcon as Ze } from "../../icons/close-icon/CloseIcon.js";
4
- import { HelperRow as qe } from "../../../helpers/HelperRow.js";
5
- import { useHelperRowBudget as Oe } from "../../../helpers/useHelperRowBudget.js";
6
- import { useHelperSlot as et } from "../../../helpers/useHelperSlot.js";
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
- }, De = (e) => {
16
- !s && !n && U(!0), oe?.(e);
17
- }, Ee = (e) => {
18
- !s && !n && U(!1), ne?.(e);
19
- };
20
- q(() => {
21
- const e = z.current;
22
- if (!r || C != null || !e) return;
23
- e.style.height = "auto";
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`;
1
+ import { cn as r } from "../../../helpers/cn.js";
2
+ import { resolveSx as P } from "../../../helpers/sx.js";
3
+ import { CloseIcon as tt } from "../../icons/close-icon/CloseIcon.js";
4
+ import { HelperRow as nt } from "../../../helpers/HelperRow.js";
5
+ import { useHelperRowBudget as ot } from "../../../helpers/useHelperRowBudget.js";
6
+ import { useHelperSlot as it } from "../../../helpers/useHelperSlot.js";
7
+ import { floatingLabelClass as st, floatingLabelLayoutStyle as lt, notchedLegendClass as rt, notchedOutlineClass as ne, singleLineInputLayoutStyle as at, singleLineShellLayoutStyle as dt } from "../field-styles.js";
8
+ import g from "./StyledInputField.module.js";
9
+ import { Children as ct, useCallback as oe, useId as ut, useLayoutEffect as A, useRef as z, useState as $ } from "react";
10
+ import { jsx as s, jsxs as S } from "react/jsx-runtime";
11
+ import { useMergeRefs as ie } from "@floating-ui/react";
12
+ var Tt = ({ dataTest: x, label: a, value: b, defaultValue: v, onChange: se, onBlur: le, onFocus: re, error: m, helperText: j, reserveHelperText: ae, expandHelperText: de = !0, disabled: c, readOnly: t, required: N, allowClear: ce, onClear: ue, type: pe = "text", placeholder: me, name: he, id: fe, autoComplete: ge, autoFocus: xe, multiline: o, rows: L, minRows: C, maxRows: w, size: be = "medium", fullWidth: W, className: ye, style: Se, sx: ve, inputRef: Le, slotProps: n, InputProps: K, onKeyDown: U, onClick: He, variant: pt }) => {
13
+ const Ie = ut(), F = fe ?? Ie, V = `${F}-helper-text`, _ = z(null), M = z(0), Y = z(null), [Re, Ae] = $(void 0), [H, G] = $(!1), [Ne, J] = $(v != null && v !== ""), B = b !== void 0, Q = B ? b !== "" && b != null : Ne, Ce = !!c || !!t, k = n?.input?.startAdornment ?? K?.startAdornment, y = ct.count(k) > 0, u = y && Array.isArray(k), h = n?.input?.endAdornment ?? K?.endAdornment, I = !!(ce && Q && !Ce), { ref: we, ...l } = n?.htmlInput ?? {}, Fe = Le ?? we, { className: _e, style: E, ref: Me } = n?.input ?? {}, Be = ie([Me]), ke = n?.input?.onMouseDown, X = n?.input?.onClick, Ee = X ? { onClick: X } : {}, Te = ge ?? l.autoComplete, De = he ?? l.name, R = H || Q || y, p = oe(() => {
14
+ const e = _.current;
15
+ if (!(!o || !e) && (M.current = e.offsetWidth, M.current !== 0)) {
16
+ if (e.removeAttribute("data-scrollable"), L != null && !t) e.style.height = "";
17
+ else {
18
+ if (e.style.height = "auto", e.scrollHeight === 0) {
19
+ e.style.height = "";
20
+ return;
21
+ }
22
+ const i = getComputedStyle(e), d = Number.parseFloat(i.lineHeight) || 24, ee = Number.parseFloat(i.paddingTop) + Number.parseFloat(i.paddingBottom), te = L ?? C, Oe = te ? te * d + ee : 0, et = t || !w ? Number.POSITIVE_INFINITY : w * d + ee;
23
+ e.style.height = `${Math.min(et, Math.max(Oe, e.scrollHeight))}px`;
24
+ }
25
+ e.scrollHeight > e.clientHeight + 1 && e.setAttribute("data-scrollable", "true");
26
+ }
26
27
  }, [
27
- b,
28
- R,
29
- H,
30
- r,
28
+ w,
31
29
  C,
32
- g
33
- ]);
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
- ...Te,
38
- ...lt()
39
- } : d ? {
30
+ o,
31
+ t,
32
+ L
33
+ ]), Pe = (e) => {
34
+ t || (B || (J(e.target.value !== ""), p()), se?.(e));
35
+ }, ze = (e) => {
36
+ !c && !t && G(!0), re?.(e);
37
+ }, $e = (e) => {
38
+ !c && !t && G(!1), le?.(e);
39
+ };
40
+ A(() => {
41
+ p();
42
+ }, [
43
+ p,
44
+ v,
45
+ b
46
+ ]), A(() => {
47
+ if (!o || !document.fonts) return;
48
+ const e = () => p();
49
+ return document.fonts.addEventListener("loadingdone", e), () => document.fonts.removeEventListener("loadingdone", e);
50
+ }, [o, p]), A(() => {
51
+ const e = _.current;
52
+ if (!o || !e || typeof ResizeObserver > "u") return;
53
+ let i = 0;
54
+ const d = new ResizeObserver(() => {
55
+ e.offsetWidth !== M.current && (cancelAnimationFrame(i), i = requestAnimationFrame(p));
56
+ });
57
+ return d.observe(e), () => {
58
+ cancelAnimationFrame(i), d.disconnect();
59
+ };
60
+ }, [o, p]);
61
+ const Z = ie([Fe, oe((e) => {
62
+ _.current = e instanceof HTMLTextAreaElement ? e : null;
63
+ }, [])]), { style: T, ...je } = l, f = !o && !u, { height: mt, minHeight: ht, maxHeight: ft, paddingTop: gt, paddingBottom: xt, ...We } = E ?? {}, Ke = f ? {
64
+ ...We,
65
+ ...dt()
66
+ } : u ? {
40
67
  boxSizing: "border-box",
41
68
  minHeight: 40,
42
- ...B
43
- } : B, { height: gt, minHeight: ft, maxHeight: xt, paddingTop: yt, paddingBottom: St, paddingLeft: bt, paddingRight: je, ...ze } = F ?? {}, Ke = m ? {
44
- ...ze,
45
- ...it({
46
- paddingLeft: f ? 40 : 14,
47
- paddingRight: je ?? He ?? (L || p ? 40 : 14)
69
+ ...E
70
+ } : E, { height: bt, minHeight: yt, maxHeight: St, paddingTop: vt, paddingBottom: Lt, paddingLeft: Ht, paddingRight: Ue, ...Ve } = T ?? {}, Ye = f ? {
71
+ ...Ve,
72
+ ...at({
73
+ paddingLeft: y ? 40 : 14,
74
+ paddingRight: Ue ?? Re ?? (I || h ? 40 : 14)
48
75
  })
49
- } : F;
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);
76
+ } : T;
77
+ A(() => {
78
+ if (!f) return;
79
+ const e = Y.current, i = e ? Math.ceil(e.getBoundingClientRect().width) + 20 : void 0;
80
+ Ae((d) => d === i ? d : i);
54
81
  }, [
55
- m,
56
- L,
57
- p
82
+ f,
83
+ I,
84
+ h
58
85
  ]);
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 = {
60
- ...Pe,
61
- style: m ? Ke : F,
62
- id: i.id ?? A,
63
- name: Me,
64
- placeholder: Ue ? de : void 0,
65
- disabled: s,
66
- readOnly: n,
86
+ const Ge = R || !a, { show: D, role: Je } = it("StyledInputField", m, j, ae, t), { fieldRef: Qe, rowRef: Xe, rowStyle: Ze } = ot(de && D), q = {
87
+ ...je,
88
+ style: f ? Ye : T,
89
+ id: l.id ?? F,
90
+ name: De,
91
+ placeholder: Ge ? me : void 0,
92
+ disabled: c,
93
+ readOnly: t,
67
94
  required: N,
68
- autoComplete: Fe,
69
- autoFocus: ue,
70
- value: g,
71
- defaultValue: b,
72
- "aria-invalid": c ? !0 : void 0,
73
- "aria-label": i["aria-label"] ?? (i["aria-labelledby"] ? void 0 : typeof l == "string" && l !== "" ? l : void 0),
74
- "aria-describedby": M ? j : i["aria-describedby"],
75
- onChange: ke,
76
- onFocus: De,
77
- onBlur: Ee,
78
- onKeyDown: i.onKeyDown || $ ? (e) => {
79
- $?.(e), e.defaultPrevented || i.onKeyDown?.(e);
95
+ autoComplete: Te,
96
+ autoFocus: xe,
97
+ value: b,
98
+ defaultValue: v,
99
+ "aria-invalid": m ? !0 : void 0,
100
+ "aria-label": l["aria-label"] ?? (l["aria-labelledby"] ? void 0 : typeof a == "string" && a !== "" ? a : void 0),
101
+ "aria-describedby": D ? V : l["aria-describedby"],
102
+ onChange: Pe,
103
+ onFocus: ze,
104
+ onBlur: $e,
105
+ onKeyDown: l.onKeyDown || U ? (e) => {
106
+ U?.(e), e.defaultPrevented || l.onKeyDown?.(e);
80
107
  } : 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
108
+ }, O = r(g.Input, "peer border-0 bg-transparent text-base tracking-[0.00938em] text-delta-800 outline-none placeholder:text-delta-500", u ? "box-border h-8 min-w-[60px] flex-1 py-0 pl-0 pr-0 leading-[23px]" : o ? r("w-full resize-none p-0 pl-0 pr-0 leading-[23px]", g["Input--multiline"]) : r("w-full", g["Input--singleLine"]), "disabled:text-delta-300", t && "text-delta-800", _e), qe = !o && !u ? {
109
+ "data-start-adornment": y ? "true" : void 0,
110
+ "data-end-adornment": I || h ? "true" : void 0
84
111
  } : {};
85
112
  return /* @__PURE__ */ S("div", {
86
- ref: Ye,
87
- className: a("group relative min-w-0 flex-col", ge),
88
- onClick: Se,
113
+ ref: Qe,
114
+ className: r("group relative min-w-0 flex-col", ye),
115
+ onClick: He,
89
116
  style: {
90
- display: P ? "flex" : "inline-flex",
91
- width: P ? "100%" : 235,
117
+ display: W ? "flex" : "inline-flex",
118
+ width: W ? "100%" : 235,
92
119
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
93
120
  letterSpacing: "0.00938em",
94
- ...k(xe),
95
- ...fe
121
+ ...P(ve),
122
+ ...Se
96
123
  },
97
124
  children: [/* @__PURE__ */ S("div", {
98
125
  className: "relative overflow-visible",
99
126
  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"),
101
- ref: we,
102
- onMouseDown: _e,
103
- ...Be,
104
- style: $e,
105
- "data-testid": d ? `${h}-adornment-list` : `${h}-shell`,
127
+ className: r("relative flex", f && g.InputShell, o && "box-border items-center px-[14px] py-[16.5px]", u && r(g.AdornmentList, h && g["AdornmentList--endAdornment"]), t && "rounded bg-delta-50"),
128
+ ref: Be,
129
+ onMouseDown: ke,
130
+ ...Ee,
131
+ style: Ke,
132
+ "data-testid": u ? `${x}-adornment-list` : `${x}-shell`,
106
133
  children: [
107
- f && /* @__PURE__ */ o("span", {
108
- className: a("items-center text-delta-500", d ? "contents" : "absolute left-3 flex"),
109
- children: _
134
+ y && /* @__PURE__ */ s("span", {
135
+ className: r("items-center text-delta-500", u ? "contents" : "absolute left-3 flex"),
136
+ children: k
110
137
  }),
111
- r ? /* @__PURE__ */ o("textarea", {
112
- ...Q,
113
- ref: J,
114
- "data-testid": h,
115
- rows: C ?? H ?? 2,
116
- className: W
117
- }) : /* @__PURE__ */ o("input", {
118
- ...Q,
119
- ...Qe,
120
- ref: J,
121
- "data-testid": h,
122
- type: re,
123
- className: W
138
+ o ? /* @__PURE__ */ s("textarea", {
139
+ ...q,
140
+ ref: Z,
141
+ "data-testid": x,
142
+ rows: L ?? C ?? 2,
143
+ className: O
144
+ }) : /* @__PURE__ */ s("input", {
145
+ ...q,
146
+ ...qe,
147
+ ref: Z,
148
+ "data-testid": x,
149
+ type: pe,
150
+ className: O
124
151
  }),
125
- L ? /* @__PURE__ */ o("button", {
152
+ I ? /* @__PURE__ */ s("button", {
126
153
  type: "button",
127
154
  tabIndex: -1,
128
155
  "aria-label": "Clear",
129
- "data-testid": `${h}-clear`,
156
+ "data-testid": `${x}-clear`,
130
157
  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",
131
158
  onClick: (e) => {
132
- e.stopPropagation(), e.preventDefault(), w || V(!1), se?.();
159
+ e.stopPropagation(), e.preventDefault(), B || J(!1), ue?.();
133
160
  },
134
- children: /* @__PURE__ */ o(Ze, {
161
+ children: /* @__PURE__ */ s(tt, {
135
162
  width: 18,
136
163
  height: 18
137
164
  })
138
- }) : p && /* @__PURE__ */ o("span", {
139
- ref: K,
165
+ }) : h && /* @__PURE__ */ s("span", {
166
+ ref: Y,
140
167
  className: "absolute inset-y-0 right-[14px] flex max-w-[calc(100%-28px)] items-center gap-1",
141
- children: p
168
+ children: h
142
169
  }),
143
- l ? /* @__PURE__ */ o("fieldset", {
170
+ a ? /* @__PURE__ */ s("fieldset", {
144
171
  "aria-hidden": !0,
145
- className: Z({
146
- focused: I,
147
- error: c,
148
- disabled: s,
149
- readOnly: n,
172
+ className: ne({
173
+ focused: H,
174
+ error: m,
175
+ disabled: c,
176
+ readOnly: t,
150
177
  notched: !0
151
178
  }),
152
- children: /* @__PURE__ */ o("legend", {
153
- className: ot(v),
179
+ children: /* @__PURE__ */ s("legend", {
180
+ className: rt(R),
154
181
  children: /* @__PURE__ */ S("span", {
155
182
  className: "inline-block px-[5px]",
156
- children: [l, N && " *"]
183
+ children: [a, N && " *"]
157
184
  })
158
185
  })
159
- }) : /* @__PURE__ */ o("div", {
186
+ }) : /* @__PURE__ */ s("div", {
160
187
  "aria-hidden": !0,
161
- className: Z({
162
- focused: I,
163
- error: c,
164
- disabled: s,
165
- readOnly: n,
188
+ className: ne({
189
+ focused: H,
190
+ error: m,
191
+ disabled: c,
192
+ readOnly: t,
166
193
  notched: !1
167
194
  })
168
195
  })
169
196
  ]
170
- }), l && /* @__PURE__ */ S("label", {
171
- htmlFor: A,
172
- className: a(tt({
173
- shrink: v,
174
- focused: I,
175
- error: c,
176
- disabled: s,
177
- readOnly: n,
178
- size: he
179
- }), t?.inputLabel?.className),
197
+ }), a && /* @__PURE__ */ S("label", {
198
+ htmlFor: F,
199
+ className: r(st({
200
+ shrink: R,
201
+ focused: H,
202
+ error: m,
203
+ disabled: c,
204
+ readOnly: t,
205
+ size: be
206
+ }), n?.inputLabel?.className),
180
207
  style: {
181
- ...k(t?.inputLabel?.sx),
182
- ...t?.inputLabel?.style,
183
- ...nt(v)
208
+ ...P(n?.inputLabel?.sx),
209
+ ...n?.inputLabel?.style,
210
+ ...lt(R)
184
211
  },
185
- children: [l, N && " *"]
212
+ children: [a, N && " *"]
186
213
  })]
187
- }), M && /* @__PURE__ */ o(qe, {
188
- ref: Ge,
189
- id: j,
190
- role: Ve,
191
- error: c,
192
- message: E,
193
- hideErrorIcon: t?.formHelperText?.hideErrorIcon,
194
- className: a("mr-[14px] box-border items-start", t?.formHelperText?.className),
214
+ }), D && /* @__PURE__ */ s(nt, {
215
+ ref: Xe,
216
+ id: V,
217
+ role: Je,
218
+ error: m,
219
+ message: j,
220
+ hideErrorIcon: n?.formHelperText?.hideErrorIcon,
221
+ className: r("mr-[14px] box-border items-start", n?.formHelperText?.className),
195
222
  style: {
196
- ...Je,
197
- ...k(t?.formHelperText?.sx)
223
+ ...Ze,
224
+ ...P(n?.formHelperText?.sx)
198
225
  }
199
226
  })]
200
227
  });
201
228
  };
202
229
  export {
203
- Mt as StyledInputField
230
+ Tt as StyledInputField
204
231
  };
@@ -1,9 +1,10 @@
1
- var n = "_Input_1focb_1", t = "_InputShell_1focb_8", e = "_AdornmentList_1focb_36", _ = {
2
- Input: n,
3
- InputShell: t,
4
- "Input--singleLine": "_Input--singleLine_1focb_17",
1
+ var t = "_Input_17evt_1", n = "_InputShell_17evt_8", e = "_AdornmentList_17evt_64", _ = {
2
+ Input: t,
3
+ InputShell: n,
4
+ "Input--singleLine": "_Input--singleLine_17evt_17",
5
+ "Input--multiline": "_Input--multiline_17evt_36",
5
6
  AdornmentList: e,
6
- "AdornmentList--endAdornment": "_AdornmentList--endAdornment_1focb_46"
7
+ "AdornmentList--endAdornment": "_AdornmentList--endAdornment_17evt_74"
7
8
  };
8
9
  export {
9
10
  _ as default
@@ -1,15 +1,15 @@
1
1
  import { cn as c } from "../../../helpers/cn.js";
2
2
  import { CheckIcon as m } from "../../icons/check-icon/CheckIcon.js";
3
3
  import { jsx as e, jsxs as d } from "react/jsx-runtime";
4
- var f = ({ id: r, children: o, selected: t, active: l, disabled: a, className: s, onClick: n }) => /* @__PURE__ */ d("li", {
4
+ var b = ({ id: r, children: o, selected: t, active: l, disabled: a, className: n, onClick: s }) => /* @__PURE__ */ d("li", {
5
5
  id: r,
6
6
  role: "option",
7
7
  "aria-selected": !!t,
8
8
  "aria-disabled": a ? !0 : void 0,
9
9
  tabIndex: -1,
10
10
  onMouseDown: (i) => i.preventDefault(),
11
- onClick: a ? void 0 : n,
12
- className: c("asma-pressable", "relative flex items-center gap-1 px-2 py-2.5 text-base outline-none", a ? "cursor-not-allowed text-delta-300" : "cursor-pointer text-delta-800 hover:bg-delta-50", t && "bg-gama-50", s),
11
+ onClick: a ? void 0 : s,
12
+ className: c("asma-pressable", "relative box-border flex min-h-10 items-center gap-1 px-2 py-2 text-base outline-none", a ? "cursor-not-allowed text-delta-300" : "cursor-pointer text-delta-800 hover:bg-delta-50", t && "bg-gama-50", n),
13
13
  children: [
14
14
  l && /* @__PURE__ */ e("span", {
15
15
  "aria-hidden": "true",
@@ -31,5 +31,5 @@ var f = ({ id: r, children: o, selected: t, active: l, disabled: a, className: s
31
31
  ]
32
32
  });
33
33
  export {
34
- f as StyledSelectItem
34
+ b as StyledSelectItem
35
35
  };
@@ -87,8 +87,9 @@ export interface StyledInputFieldProps {
87
87
  * own focus/value state to drive the shared field styling ([[field-styles]]); supports multiline,
88
88
  * start/end adornments, an optional clear button, and error/helper text. Public props preserved
89
89
  *
90
- * ponytail: `variant` is accepted but always renders outlined, and multiline uses fixed `rows`
91
- * (no auto-grow to `maxRows`) — known ceilings; Chromatic in CI is the visual gate.
90
+ * ponytail: `variant` is accepted but always renders outlined — a known ceiling; Chromatic in CI is
91
+ * the visual gate. Multiline auto-grows between `minRows` and `maxRows` (a fixed `rows` pins the height)
92
+ * and scrolls once the content exceeds the cap; `readOnly` ignores the cap and shows the whole value.
92
93
  */
93
94
  export declare const StyledInputField: ({ dataTest, label, value, defaultValue, onChange, onBlur, onFocus, error, helperText, reserveHelperText, expandHelperText, disabled, readOnly, required, allowClear, onClear, type, placeholder, name, id, autoComplete, autoFocus, multiline, rows, minRows, maxRows, size, fullWidth, className, style, sx, inputRef, slotProps, InputProps, onKeyDown, onClick, variant: _variant, }: StyledInputFieldProps) => JSX.Element;
94
95
  export {};
@@ -1,18 +1,18 @@
1
1
  import { cn as u } from "../../helpers/cn.js";
2
2
  import { jsx as x } from "react/jsx-runtime";
3
- var d = ({ children: o, disabled: e, selected: n, className: a, classes: l, onClick: r, onMouseDown: i, onMouseUp: m }) => /* @__PURE__ */ x("li", {
3
+ var c = ({ children: o, disabled: e, selected: n, className: a, classes: i, onClick: t, onMouseDown: l, onMouseUp: m }) => /* @__PURE__ */ x("li", {
4
4
  role: "menuitem",
5
5
  "aria-disabled": e ? !0 : void 0,
6
6
  tabIndex: -1,
7
- onClick: e ? void 0 : r,
8
- onKeyDown: (t) => {
9
- e || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), r?.(t));
7
+ onClick: e ? void 0 : t,
8
+ onKeyDown: (r) => {
9
+ e || (r.key === "Enter" || r.key === " ") && (r.preventDefault(), t?.(r));
10
10
  },
11
- onMouseDown: i,
11
+ onMouseDown: l,
12
12
  onMouseUp: m,
13
- className: u("flex items-center px-3 py-2.5 text-base text-delta-700 outline-none", e ? "cursor-not-allowed" : "cursor-pointer hover:bg-delta-50", n && "bg-gama-50", l?.root, a, e && "aria-disabled:text-delta-300"),
13
+ className: u("box-border flex min-h-10 items-center px-3 py-2 text-base text-delta-700 outline-none", e ? "cursor-not-allowed" : "cursor-pointer hover:bg-delta-50", n && "bg-gama-50", i?.root, a, e && "aria-disabled:text-delta-300"),
14
14
  children: o
15
15
  });
16
16
  export {
17
- d as StyledMenuItem
17
+ c as StyledMenuItem
18
18
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.101.6",
6
+ "version": "3.102.0",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",
@@ -244,17 +244,16 @@ describe('ASMA-8220 touch hardening', () => {
244
244
  }
245
245
 
246
246
  // Designed heights survive: the chip's Figma 32px, the select trigger's 40px (kept in
247
- // step with StyledInputField), and the accordion trigger's 72px.
247
+ // step with StyledInputField), the Figma Menus item 40px option row (same as the
248
+ // StyledSelectAutocomplete compact row), and the accordion trigger's 72px.
248
249
  await expect(container.querySelector('[data-testid="chip"]')!.getBoundingClientRect().height).toBe(32)
249
250
  await expect(container.querySelector('[data-testid="select"]')!.getBoundingClientRect().height).toBe(40)
251
+ await expect(container.querySelector('[role="option"]')!.getBoundingClientRect().height).toBe(40)
250
252
  await expect(container.querySelector('[data-testid="accordion"]')!.getBoundingClientRect().height).toBe(72)
251
- // The chevron and the option row already clear 44px without any override.
253
+ // The chevron already clears 44px without any override.
252
254
  await expect(
253
255
  container.querySelector('[data-testid="chevron"]')!.getBoundingClientRect().height,
254
256
  ).toBeGreaterThanOrEqual(44)
255
- await expect(
256
- container.querySelector('[role="option"]')!.getBoundingClientRect().height,
257
- ).toBeGreaterThanOrEqual(44)
258
257
  // And the clear button stays the 18px icon in 2px padding it has always been — the one
259
258
  // opt-in here that does NOT reach 44px, deliberately: a hit area that big would sit over
260
259
  // the field's own text (see the comment at its call site).