asma-ui-core 3.134.5 → 3.134.7
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.
- package/dist/asma-ui-core.css +1 -1
- package/dist/components/inputs/input-field/StyledInputField.js +139 -139
- package/dist/components/inputs/input-field/StyledInputField.module.js +7 -6
- package/dist/components/utils/bottom-sheet/formatResultsLabel.js +5 -5
- package/dist/components/utils/bottom-sheet/sheetCopy.js +4 -4
- package/dist/src/components/utils/bottom-sheet/formatResultsLabel.d.ts +1 -1
- package/dist/src/components/utils/bottom-sheet/sheetCopy.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,282 +1,282 @@
|
|
|
1
1
|
import { cn as r } from "../../../helpers/cn.js";
|
|
2
|
-
import { resolveSx as
|
|
3
|
-
import { StyledTooltip as
|
|
4
|
-
import { CloseIcon as
|
|
5
|
-
import { LockIcon as
|
|
6
|
-
import { CharacterCounter as
|
|
7
|
-
import { HelperRow as
|
|
8
|
-
import { useHelperRowBudget as
|
|
9
|
-
import { useHelperSlot as
|
|
10
|
-
import { fieldLabelAboveClass as
|
|
11
|
-
import
|
|
12
|
-
import { Children as
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { useMergeRefs as
|
|
15
|
-
var
|
|
2
|
+
import { resolveSx as E } from "../../../helpers/sx.js";
|
|
3
|
+
import { StyledTooltip as Ht } from "../../data-display/tooltip/StyledTooltip.js";
|
|
4
|
+
import { CloseIcon as It } from "../../icons/close-icon/CloseIcon.js";
|
|
5
|
+
import { LockIcon as Nt } from "../../icons/lock-icon/LockIcon.js";
|
|
6
|
+
import { CharacterCounter as _t } from "../../../helpers/CharacterCounter.js";
|
|
7
|
+
import { HelperRow as Ct } from "../../../helpers/HelperRow.js";
|
|
8
|
+
import { useHelperRowBudget as Rt } from "../../../helpers/useHelperRowBudget.js";
|
|
9
|
+
import { useHelperSlot as wt } from "../../../helpers/useHelperSlot.js";
|
|
10
|
+
import { fieldLabelAboveClass as Ft, fieldWidthStyle as Bt, floatingLabelClass as Mt, floatingLabelLayoutStyle as Et, notchedLegendClass as Ot, notchedOutlineClass as ge, singleLineInputLayoutStyle as Tt, singleLineShellLayoutStyle as Dt } from "../field-styles.js";
|
|
11
|
+
import f from "./StyledInputField.module.js";
|
|
12
|
+
import { Children as fe, useCallback as xe, useId as kt, useLayoutEffect as O, useRef as X, useState as T } from "react";
|
|
13
|
+
import { Fragment as $t, jsx as t, jsxs as x } from "react/jsx-runtime";
|
|
14
|
+
import { useMergeRefs as ye } from "@floating-ui/react";
|
|
15
|
+
var be = "peer-focus-visible:border-focus-ring peer-focus-visible:shadow-[inset_0_0_0_2px_var(--colors-focus-ring)]", Wt = "pointer-events-none absolute -inset-1 rounded peer-focus-visible:shadow-[inset_0_0_0_2px_var(--colors-focus-ring)]", zt = ({ reason: u, children: a }) => u === void 0 ? a : /* @__PURE__ */ t(Ht, {
|
|
16
16
|
title: u,
|
|
17
17
|
openOnTap: !0,
|
|
18
18
|
persistentDescription: !0,
|
|
19
19
|
children: a
|
|
20
|
-
}),
|
|
21
|
-
const
|
|
20
|
+
}), xn = ({ dataTest: u, label: a, labelPlacement: ve = "above", value: y, defaultValue: S, onChange: Le, onBlur: Se, onFocus: Ae, error: b, helperText: Z, reserveHelperText: He, expandHelperText: Ie = !0, maxLength: Ne, counter: _e, locale: Ce, disabled: h, readOnly: Re, lockedReason: D, readOnlyReason: k, required: I, allowClear: we, onClear: Fe, type: Be = "text", placeholder: Me, name: Ee, id: Oe, autoComplete: Te, autoFocus: De, multiline: i, rows: N, minRows: $, maxRows: W, size: ke = "medium", width: q = "full", fullWidth: Ut, className: $e, style: We, sx: ze, inputRef: Ue, slotProps: n, InputProps: ee, onKeyDown: te, onClick: je, variant: jt }) => {
|
|
21
|
+
const Pe = kt(), z = Oe ?? Pe, ne = `${z}-helper-text`, U = X(null), j = X(0), oe = X(null), [Ke, Ge] = T(void 0), [_, le] = T(!1), [Ve, ie] = T(S != null && S !== ""), [Ye, Je] = T(String(S ?? "").length), c = !!D || D === 0, o = !c && (!!k || k === 0), l = !!Re || c || o, C = y !== void 0, re = C ? y !== "" && y != null : Ve, Qe = !!h || !!l, R = n?.input?.startAdornment ?? ee?.startAdornment, A = fe.count(R) > 0, p = A && Array.isArray(R), Xe = p && fe.toArray(R).length === 0, P = n?.input?.endAdornment ?? ee?.endAdornment, v = c ? /* @__PURE__ */ x($t, { children: [P, /* @__PURE__ */ t(Nt, {
|
|
22
22
|
width: 24,
|
|
23
23
|
height: 24,
|
|
24
24
|
className: "text-delta-700"
|
|
25
|
-
})] }) : P,
|
|
26
|
-
const e =
|
|
27
|
-
if (!(!i || !e) && (
|
|
28
|
-
if (e.removeAttribute("data-scrollable"),
|
|
25
|
+
})] }) : P, H = !!(we && re && !Qe), { ref: Ze, ...s } = n?.htmlInput ?? {}, qe = Ue ?? Ze, { className: et, style: K, ref: tt } = n?.input ?? {}, nt = ye([tt]), ot = n?.input?.onMouseDown, ae = n?.input?.onClick, lt = ae ? { onClick: ae } : {}, it = Te ?? s.autoComplete, rt = Ee ?? s.name, G = s.id ?? z, w = Ne ?? s.maxLength, se = `${z}-counter`, V = _e !== !1 && !!w && !o, at = C ? String(y ?? "").length : Ye, F = ve === "floating" && !!a && !o, B = _ || re || A, g = xe(() => {
|
|
26
|
+
const e = U.current;
|
|
27
|
+
if (!(!i || !e) && (j.current = e.offsetWidth, j.current !== 0)) {
|
|
28
|
+
if (e.removeAttribute("data-scrollable"), N != null && !l) e.style.height = "";
|
|
29
29
|
else {
|
|
30
30
|
if (e.style.height = "auto", e.scrollHeight === 0) {
|
|
31
31
|
e.style.height = "";
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
const d = getComputedStyle(e),
|
|
35
|
-
let
|
|
36
|
-
e.style.height = `${
|
|
37
|
-
for (let me = 0; me < 2 &&
|
|
38
|
-
|
|
34
|
+
const d = getComputedStyle(e), m = Number.parseFloat(d.lineHeight) || 24, he = Number.parseFloat(d.paddingTop) + Number.parseFloat(d.paddingBottom), pe = N ?? $, At = pe ? pe * m + he : 0, Q = l || !W ? Number.POSITIVE_INFINITY : W * m + he;
|
|
35
|
+
let M = Math.min(Q, Math.max(At, e.scrollHeight));
|
|
36
|
+
e.style.height = `${M}px`;
|
|
37
|
+
for (let me = 0; me < 2 && M < Q && e.scrollHeight > e.clientHeight + 1; me++)
|
|
38
|
+
M = Math.min(Q, e.scrollHeight), e.style.height = `${M}px`;
|
|
39
39
|
}
|
|
40
40
|
e.scrollHeight > e.clientHeight + 1 && e.setAttribute("data-scrollable", "true");
|
|
41
41
|
}
|
|
42
42
|
}, [
|
|
43
|
+
W,
|
|
43
44
|
$,
|
|
44
|
-
k,
|
|
45
45
|
i,
|
|
46
46
|
l,
|
|
47
|
-
|
|
48
|
-
]),
|
|
49
|
-
l || (C || (ie(e.target.value !== ""),
|
|
50
|
-
},
|
|
51
|
-
!h && !l && le(!0),
|
|
52
|
-
},
|
|
53
|
-
!h && !l && le(!1),
|
|
47
|
+
N
|
|
48
|
+
]), st = (e) => {
|
|
49
|
+
l || (C || (ie(e.target.value !== ""), Je(e.target.value.length), g()), Le?.(e));
|
|
50
|
+
}, dt = (e) => {
|
|
51
|
+
!h && !l && le(!0), Ae?.(e);
|
|
52
|
+
}, ct = (e) => {
|
|
53
|
+
!h && !l && le(!1), Se?.(e);
|
|
54
54
|
};
|
|
55
|
-
|
|
55
|
+
O(() => {
|
|
56
56
|
g();
|
|
57
57
|
}, [
|
|
58
58
|
g,
|
|
59
59
|
S,
|
|
60
|
-
|
|
61
|
-
]),
|
|
60
|
+
y
|
|
61
|
+
]), O(() => {
|
|
62
62
|
if (!i || !document.fonts) return;
|
|
63
63
|
const e = () => g();
|
|
64
64
|
return document.fonts.addEventListener("loadingdone", e), () => document.fonts.removeEventListener("loadingdone", e);
|
|
65
|
-
}, [i, g]),
|
|
66
|
-
const e =
|
|
65
|
+
}, [i, g]), O(() => {
|
|
66
|
+
const e = U.current;
|
|
67
67
|
if (!i || !e || typeof ResizeObserver > "u") return;
|
|
68
68
|
let d = 0;
|
|
69
|
-
const
|
|
70
|
-
e.offsetWidth !==
|
|
69
|
+
const m = new ResizeObserver(() => {
|
|
70
|
+
e.offsetWidth !== j.current && (cancelAnimationFrame(d), d = requestAnimationFrame(g));
|
|
71
71
|
});
|
|
72
|
-
return
|
|
73
|
-
cancelAnimationFrame(d),
|
|
72
|
+
return m.observe(e), () => {
|
|
73
|
+
cancelAnimationFrame(d), m.disconnect();
|
|
74
74
|
};
|
|
75
75
|
}, [i, g]);
|
|
76
|
-
const de =
|
|
77
|
-
|
|
78
|
-
}, [])]), { style: Y, ...
|
|
79
|
-
...
|
|
80
|
-
...
|
|
81
|
-
} :
|
|
76
|
+
const de = ye([qe, xe((e) => {
|
|
77
|
+
U.current = e instanceof HTMLTextAreaElement ? e : null;
|
|
78
|
+
}, [])]), { style: Y, ...ut } = s, L = !i && !p && !o, { height: Pt, minHeight: Kt, maxHeight: Gt, paddingTop: Vt, paddingBottom: Yt, ...ht } = K ?? {}, pt = L ? {
|
|
79
|
+
...ht,
|
|
80
|
+
...Dt()
|
|
81
|
+
} : p ? {
|
|
82
82
|
boxSizing: "border-box",
|
|
83
83
|
minHeight: 40,
|
|
84
84
|
...K
|
|
85
|
-
} : K, { height:
|
|
86
|
-
...
|
|
87
|
-
...
|
|
88
|
-
paddingLeft:
|
|
89
|
-
paddingRight:
|
|
85
|
+
} : K, { height: Jt, minHeight: Qt, maxHeight: Xt, paddingTop: Zt, paddingBottom: qt, paddingLeft: en, paddingRight: mt, ...gt } = Y ?? {}, ft = L ? {
|
|
86
|
+
...gt,
|
|
87
|
+
...Tt({
|
|
88
|
+
paddingLeft: A ? 40 : 14,
|
|
89
|
+
paddingRight: mt ?? Ke ?? (H || v ? 40 : 14)
|
|
90
90
|
})
|
|
91
91
|
} : Y;
|
|
92
|
-
|
|
93
|
-
if (!
|
|
92
|
+
O(() => {
|
|
93
|
+
if (!L) return;
|
|
94
94
|
const e = oe.current, d = e ? Math.ceil(e.getBoundingClientRect().width) + 20 : void 0;
|
|
95
|
-
|
|
95
|
+
Ge((m) => m === d ? m : d);
|
|
96
96
|
}, [
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
L,
|
|
98
|
+
H,
|
|
99
99
|
P,
|
|
100
100
|
c
|
|
101
101
|
]);
|
|
102
|
-
const
|
|
103
|
-
...
|
|
104
|
-
style:
|
|
102
|
+
const xt = B || !F, { show: J, role: yt } = wt("StyledInputField", b, Z, He, l, V), { fieldRef: bt, rowRef: vt, rowStyle: Lt } = Rt(Ie && J), ce = {
|
|
103
|
+
...ut,
|
|
104
|
+
style: L ? ft : Y,
|
|
105
105
|
id: G,
|
|
106
|
-
name:
|
|
107
|
-
maxLength:
|
|
108
|
-
placeholder:
|
|
106
|
+
name: rt,
|
|
107
|
+
maxLength: w,
|
|
108
|
+
placeholder: xt ? Me : void 0,
|
|
109
109
|
disabled: h,
|
|
110
110
|
readOnly: l,
|
|
111
|
-
required:
|
|
112
|
-
autoComplete:
|
|
113
|
-
autoFocus:
|
|
114
|
-
value:
|
|
111
|
+
required: I,
|
|
112
|
+
autoComplete: it,
|
|
113
|
+
autoFocus: De,
|
|
114
|
+
value: y,
|
|
115
115
|
defaultValue: S,
|
|
116
|
-
"aria-invalid":
|
|
116
|
+
"aria-invalid": b ? !0 : void 0,
|
|
117
117
|
"aria-label": s["aria-label"] ?? (s["aria-labelledby"] ? void 0 : typeof a == "string" && a !== "" ? a : void 0),
|
|
118
118
|
"aria-describedby": [J ? ne : s["aria-describedby"], V ? se : void 0].filter(Boolean).join(" ") || void 0,
|
|
119
|
-
onChange:
|
|
120
|
-
onFocus:
|
|
121
|
-
onBlur:
|
|
119
|
+
onChange: st,
|
|
120
|
+
onFocus: dt,
|
|
121
|
+
onBlur: ct,
|
|
122
122
|
onKeyDown: s.onKeyDown || te ? (e) => {
|
|
123
123
|
te?.(e), e.defaultPrevented || s.onKeyDown?.(e);
|
|
124
124
|
} : void 0
|
|
125
|
-
}, ue = r(
|
|
126
|
-
"data-start-adornment":
|
|
127
|
-
"data-end-adornment":
|
|
125
|
+
}, ue = r(f.Input, "peer border-0 bg-transparent text-base tracking-[0.00938em] outline-none placeholder:text-delta-500", o ? "text-delta-700" : "text-delta-800", p ? "box-border h-8 min-w-[60px] flex-1 py-0 pl-0 pr-0 leading-[23px]" : i ? r("w-full resize-none p-0 pl-0 pr-0", o ? "leading-6" : "leading-[23px]", f["Input--multiline"]) : o ? "m-0 w-full p-0 text-base leading-6" : r("w-full", f["Input--singleLine"], !H && !v && "max-xs:pr-1.5"), "disabled:text-delta-300", l && !o && "text-delta-800", (c || o) && "cursor-default", et), St = !i && !p ? {
|
|
126
|
+
"data-start-adornment": A ? "true" : void 0,
|
|
127
|
+
"data-end-adornment": H || v ? "true" : void 0
|
|
128
128
|
} : {};
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
ref:
|
|
131
|
-
className: r("group relative min-w-0 flex-col",
|
|
132
|
-
onClick:
|
|
129
|
+
return /* @__PURE__ */ x("div", {
|
|
130
|
+
ref: bt,
|
|
131
|
+
className: r("group relative min-w-0 flex-col", $e),
|
|
132
|
+
onClick: je,
|
|
133
133
|
"data-field-width": q,
|
|
134
134
|
style: {
|
|
135
135
|
display: "flex",
|
|
136
|
-
...
|
|
136
|
+
...Bt(q),
|
|
137
137
|
fontFamily: "Roboto, Helvetica, Arial, sans-serif",
|
|
138
138
|
letterSpacing: "0.00938em",
|
|
139
|
-
...
|
|
140
|
-
|
|
139
|
+
...E(ze),
|
|
140
|
+
...We
|
|
141
141
|
},
|
|
142
142
|
children: [
|
|
143
|
-
a && !
|
|
144
|
-
className: r(
|
|
143
|
+
a && !F && /* @__PURE__ */ t("div", {
|
|
144
|
+
className: r(Ft({
|
|
145
145
|
disabled: h,
|
|
146
146
|
flush: o
|
|
147
147
|
}), n?.inputLabel?.className),
|
|
148
148
|
style: {
|
|
149
|
-
...
|
|
149
|
+
...E(n?.inputLabel?.sx),
|
|
150
150
|
...n?.inputLabel?.style
|
|
151
151
|
},
|
|
152
|
-
children: /* @__PURE__ */
|
|
152
|
+
children: /* @__PURE__ */ x("label", {
|
|
153
153
|
htmlFor: G,
|
|
154
|
-
children: [a,
|
|
154
|
+
children: [a, I && /* @__PURE__ */ t("span", {
|
|
155
155
|
"aria-hidden": "true",
|
|
156
156
|
children: " *"
|
|
157
157
|
})]
|
|
158
158
|
})
|
|
159
159
|
}),
|
|
160
|
-
/* @__PURE__ */ t(
|
|
161
|
-
reason: c ?
|
|
162
|
-
children: /* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ t(zt, {
|
|
161
|
+
reason: c ? D : o ? k : void 0,
|
|
162
|
+
children: /* @__PURE__ */ x("div", {
|
|
163
163
|
className: "relative overflow-visible",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
165
|
-
className: r("relative flex",
|
|
166
|
-
ref:
|
|
167
|
-
onMouseDown:
|
|
168
|
-
...
|
|
169
|
-
style:
|
|
170
|
-
"data-testid":
|
|
164
|
+
children: [/* @__PURE__ */ x("div", {
|
|
165
|
+
className: r("relative flex", L && f.InputShell, i && !o && "box-border items-center px-[14px] py-[16.5px]", p && r(f.AdornmentList, v && f["AdornmentList--endAdornment"], Xe && f["AdornmentList--empty"]), l && !o && "rounded bg-delta-50", c && i && "pr-[44px]"),
|
|
166
|
+
ref: nt,
|
|
167
|
+
onMouseDown: ot,
|
|
168
|
+
...lt,
|
|
169
|
+
style: pt,
|
|
170
|
+
"data-testid": p ? `${u}-adornment-list` : `${u}-shell`,
|
|
171
171
|
children: [
|
|
172
|
-
|
|
173
|
-
className: r("items-center text-delta-500",
|
|
174
|
-
children:
|
|
172
|
+
A && /* @__PURE__ */ t("span", {
|
|
173
|
+
className: r("items-center text-delta-500", p ? "contents" : "absolute left-3 flex"),
|
|
174
|
+
children: R
|
|
175
175
|
}),
|
|
176
176
|
i ? /* @__PURE__ */ t("textarea", {
|
|
177
177
|
...ce,
|
|
178
178
|
ref: de,
|
|
179
179
|
"data-testid": u,
|
|
180
|
-
rows:
|
|
180
|
+
rows: N ?? $ ?? 2,
|
|
181
181
|
className: ue
|
|
182
182
|
}) : /* @__PURE__ */ t("input", {
|
|
183
183
|
...ce,
|
|
184
|
-
...
|
|
184
|
+
...St,
|
|
185
185
|
ref: de,
|
|
186
186
|
"data-testid": u,
|
|
187
|
-
type:
|
|
187
|
+
type: Be,
|
|
188
188
|
className: ue
|
|
189
189
|
}),
|
|
190
|
-
|
|
190
|
+
H ? /* @__PURE__ */ t("button", {
|
|
191
191
|
type: "button",
|
|
192
192
|
tabIndex: -1,
|
|
193
193
|
"aria-label": "Clear",
|
|
194
194
|
"data-testid": `${u}-clear`,
|
|
195
195
|
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",
|
|
196
196
|
onClick: (e) => {
|
|
197
|
-
e.stopPropagation(), e.preventDefault(), C || ie(!1),
|
|
197
|
+
e.stopPropagation(), e.preventDefault(), C || ie(!1), Fe?.();
|
|
198
198
|
},
|
|
199
|
-
children: /* @__PURE__ */ t(
|
|
199
|
+
children: /* @__PURE__ */ t(It, {
|
|
200
200
|
width: 18,
|
|
201
201
|
height: 18
|
|
202
202
|
})
|
|
203
|
-
}) :
|
|
203
|
+
}) : v && /* @__PURE__ */ t("span", {
|
|
204
204
|
ref: oe,
|
|
205
205
|
className: "absolute inset-y-0 right-[14px] flex max-w-[calc(100%-28px)] items-center gap-1",
|
|
206
|
-
children:
|
|
206
|
+
children: v
|
|
207
207
|
}),
|
|
208
208
|
o ? /* @__PURE__ */ t("div", {
|
|
209
209
|
"aria-hidden": !0,
|
|
210
|
-
className:
|
|
211
|
-
}) :
|
|
210
|
+
className: Wt
|
|
211
|
+
}) : F ? /* @__PURE__ */ t("fieldset", {
|
|
212
212
|
"aria-hidden": !0,
|
|
213
213
|
className: r(ge({
|
|
214
|
-
focused:
|
|
215
|
-
error:
|
|
214
|
+
focused: _,
|
|
215
|
+
error: b,
|
|
216
216
|
disabled: h,
|
|
217
217
|
readOnly: l,
|
|
218
218
|
notched: !0
|
|
219
|
-
}), c &&
|
|
219
|
+
}), c && be),
|
|
220
220
|
children: /* @__PURE__ */ t("legend", {
|
|
221
|
-
className:
|
|
222
|
-
children: /* @__PURE__ */
|
|
221
|
+
className: Ot(B),
|
|
222
|
+
children: /* @__PURE__ */ x("span", {
|
|
223
223
|
className: "inline-block px-[5px]",
|
|
224
|
-
children: [a,
|
|
224
|
+
children: [a, I && " *"]
|
|
225
225
|
})
|
|
226
226
|
})
|
|
227
227
|
}) : /* @__PURE__ */ t("div", {
|
|
228
228
|
"aria-hidden": !0,
|
|
229
229
|
className: r(ge({
|
|
230
|
-
focused:
|
|
231
|
-
error:
|
|
230
|
+
focused: _,
|
|
231
|
+
error: b,
|
|
232
232
|
disabled: h,
|
|
233
233
|
readOnly: l,
|
|
234
234
|
notched: !1
|
|
235
|
-
}), c &&
|
|
235
|
+
}), c && be)
|
|
236
236
|
})
|
|
237
237
|
]
|
|
238
|
-
}),
|
|
238
|
+
}), F && /* @__PURE__ */ x("label", {
|
|
239
239
|
htmlFor: G,
|
|
240
|
-
className: r(
|
|
241
|
-
shrink:
|
|
242
|
-
focused:
|
|
243
|
-
error:
|
|
240
|
+
className: r(Mt({
|
|
241
|
+
shrink: B,
|
|
242
|
+
focused: _,
|
|
243
|
+
error: b,
|
|
244
244
|
disabled: h,
|
|
245
245
|
readOnly: l,
|
|
246
|
-
size:
|
|
246
|
+
size: ke
|
|
247
247
|
}), n?.inputLabel?.className),
|
|
248
248
|
style: {
|
|
249
|
-
...
|
|
249
|
+
...E(n?.inputLabel?.sx),
|
|
250
250
|
...n?.inputLabel?.style,
|
|
251
|
-
...
|
|
251
|
+
...Et(B)
|
|
252
252
|
},
|
|
253
|
-
children: [a,
|
|
253
|
+
children: [a, I && " *"]
|
|
254
254
|
})]
|
|
255
255
|
})
|
|
256
256
|
}),
|
|
257
|
-
J && /* @__PURE__ */ t(
|
|
258
|
-
ref:
|
|
257
|
+
J && /* @__PURE__ */ t(Ct, {
|
|
258
|
+
ref: vt,
|
|
259
259
|
id: ne,
|
|
260
|
-
role:
|
|
261
|
-
error:
|
|
260
|
+
role: yt,
|
|
261
|
+
error: b,
|
|
262
262
|
message: Z,
|
|
263
263
|
hideErrorIcon: n?.formHelperText?.hideErrorIcon,
|
|
264
264
|
className: r("mr-[14px] box-border items-start", n?.formHelperText?.className),
|
|
265
265
|
style: {
|
|
266
|
-
...
|
|
267
|
-
...
|
|
266
|
+
...Lt,
|
|
267
|
+
...E(n?.formHelperText?.sx)
|
|
268
268
|
}
|
|
269
269
|
}),
|
|
270
|
-
V &&
|
|
270
|
+
V && w ? /* @__PURE__ */ t(_t, {
|
|
271
271
|
id: se,
|
|
272
|
-
length:
|
|
273
|
-
limit:
|
|
274
|
-
locale:
|
|
272
|
+
length: at,
|
|
273
|
+
limit: w,
|
|
274
|
+
locale: Ce,
|
|
275
275
|
className: "pt-1"
|
|
276
276
|
}) : null
|
|
277
277
|
]
|
|
278
278
|
});
|
|
279
279
|
};
|
|
280
280
|
export {
|
|
281
|
-
|
|
281
|
+
xn as StyledInputField
|
|
282
282
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
Input:
|
|
3
|
-
InputShell:
|
|
4
|
-
"Input--singleLine": "_Input--
|
|
5
|
-
"Input--multiline": "_Input--
|
|
1
|
+
var n = "_Input_1jhon_1", t = "_InputShell_1jhon_8", e = "_AdornmentList_1jhon_64", _ = {
|
|
2
|
+
Input: n,
|
|
3
|
+
InputShell: t,
|
|
4
|
+
"Input--singleLine": "_Input--singleLine_1jhon_17",
|
|
5
|
+
"Input--multiline": "_Input--multiline_1jhon_36",
|
|
6
6
|
AdornmentList: e,
|
|
7
|
-
"AdornmentList--endAdornment": "_AdornmentList--
|
|
7
|
+
"AdornmentList--endAdornment": "_AdornmentList--endAdornment_1jhon_74",
|
|
8
|
+
"AdornmentList--empty": "_AdornmentList--empty_1jhon_77"
|
|
8
9
|
};
|
|
9
10
|
export {
|
|
10
11
|
_ as default
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SHEET_TEXT as
|
|
2
|
-
var
|
|
3
|
-
const
|
|
4
|
-
return
|
|
1
|
+
import { SHEET_TEXT as i } from "./sheetCopy.js";
|
|
2
|
+
var t = 9999, v = (e, s = "en") => {
|
|
3
|
+
const r = i[s];
|
|
4
|
+
return e == null ? r.viewResults : e === 0 ? r.noMatches : e > t ? `${r.viewResults} (${t}+)` : `${r.viewResults} (${e})`;
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
v as formatResultsLabel
|
|
8
8
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e = {
|
|
2
2
|
no: {
|
|
3
3
|
close: "Lukk",
|
|
4
|
-
|
|
4
|
+
viewResults: "Vis resultater",
|
|
5
5
|
noMatches: "Ingen treff"
|
|
6
6
|
},
|
|
7
7
|
en: {
|
|
8
8
|
close: "Close",
|
|
9
|
-
|
|
9
|
+
viewResults: "View results",
|
|
10
10
|
noMatches: "No matches"
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
e as SHEET_TEXT
|
|
15
15
|
};
|
|
@@ -7,6 +7,6 @@ import { UiCoreLocale } from '../../../helpers/uiCoreLocale';
|
|
|
7
7
|
* - above 9999 → `Vis resultater (9999+)`, so the label keeps a fixed shape and never wraps
|
|
8
8
|
* - otherwise → `Vis resultater (N)`, parenthesised even for 1 to sidestep resultat/resultater
|
|
9
9
|
*
|
|
10
|
-
* English (`locale='en'`) reads `
|
|
10
|
+
* English (`locale='en'`) reads `View results (N)` and `No matches`.
|
|
11
11
|
*/
|
|
12
12
|
export declare const formatResultsLabel: (count: number | null | undefined, locale?: UiCoreLocale) => string;
|