asma-ui-core 3.54.0 → 3.54.2
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,63 +1,63 @@
|
|
|
1
|
-
import { cn as
|
|
1
|
+
import { cn as y } from "../../../helpers/cn.js";
|
|
2
2
|
import { ChevronDownIcon as B } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
|
|
3
3
|
import { ChevronUpIcon as E } from "../../icons/chevron-up-icon/ChevronUpIcon.js";
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { Fragment as O, jsx as e, jsxs as
|
|
4
|
+
import { useCallback as W, useEffect as k, useLayoutEffect as F, useMemo as R, useRef as g, useState as C, useSyncExternalStore as L } from "react";
|
|
5
|
+
import { Fragment as O, jsx as e, jsxs as x } from "react/jsx-runtime";
|
|
6
6
|
var j = typeof window < "u" ? F : k;
|
|
7
7
|
function D() {
|
|
8
|
-
const [
|
|
9
|
-
t
|
|
10
|
-
}, []),
|
|
8
|
+
const [i, n] = C(null), o = W((t) => {
|
|
9
|
+
n(t);
|
|
10
|
+
}, []), r = W(() => i ? Math.floor(i.getBoundingClientRect().width) : 0, [i]);
|
|
11
11
|
return {
|
|
12
12
|
ref: o,
|
|
13
|
-
width: L(
|
|
14
|
-
if (!
|
|
13
|
+
width: L(W((t) => {
|
|
14
|
+
if (!i || typeof ResizeObserver > "u") return () => {
|
|
15
15
|
console.log("Node is missing or ResizeObserver is undefined");
|
|
16
16
|
};
|
|
17
17
|
let c = 0;
|
|
18
18
|
const d = new ResizeObserver(() => {
|
|
19
|
-
cancelAnimationFrame(c), c = requestAnimationFrame(
|
|
19
|
+
cancelAnimationFrame(c), c = requestAnimationFrame(t);
|
|
20
20
|
});
|
|
21
|
-
return d.observe(
|
|
21
|
+
return d.observe(i), () => {
|
|
22
22
|
cancelAnimationFrame(c), d.disconnect();
|
|
23
23
|
};
|
|
24
|
-
}, [
|
|
24
|
+
}, [i]), r, () => 0)
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function I(
|
|
28
|
-
return [...
|
|
29
|
-
const
|
|
30
|
-
return
|
|
27
|
+
function I(i) {
|
|
28
|
+
return [...i].sort((n, o) => {
|
|
29
|
+
const r = n.order ?? 0, t = o.order ?? 0;
|
|
30
|
+
return r !== t ? r - t : n.id.localeCompare(o.id);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
function P(
|
|
34
|
-
const { items:
|
|
33
|
+
function P(i) {
|
|
34
|
+
const { items: n, leadSlot: o, actionSlot: r } = i, t = g({}), c = g(null), d = g(null), [l, p] = C({
|
|
35
35
|
itemWidths: {},
|
|
36
36
|
leadWidth: 0,
|
|
37
37
|
actionWidth: 0
|
|
38
|
-
}),
|
|
38
|
+
}), u = g(l);
|
|
39
39
|
k(() => {
|
|
40
|
-
|
|
40
|
+
u.current = l;
|
|
41
41
|
}, [l]);
|
|
42
|
-
const f =
|
|
43
|
-
|
|
42
|
+
const f = W((a) => (h) => {
|
|
43
|
+
t.current[a] = h;
|
|
44
44
|
}, []);
|
|
45
45
|
return j(() => {
|
|
46
46
|
const a = {};
|
|
47
|
-
for (const
|
|
48
|
-
const
|
|
49
|
-
a[
|
|
47
|
+
for (const m of n) {
|
|
48
|
+
const b = t.current[m.id], s = Math.ceil(b?.getBoundingClientRect().width ?? m.estimatedWidth ?? 0);
|
|
49
|
+
a[m.id] = s;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
(!(Object.keys(v.itemWidths).length === Object.keys(a).length &&
|
|
51
|
+
const h = o ? Math.ceil(c.current?.getBoundingClientRect().width ?? 0) : 0, w = r ? Math.ceil(d.current?.getBoundingClientRect().width ?? 0) : 0, v = u.current;
|
|
52
|
+
(!(Object.keys(v.itemWidths).length === Object.keys(a).length && n.every((m) => v.itemWidths[m.id] === a[m.id])) || v.leadWidth !== h || v.actionWidth !== w) && p({
|
|
53
53
|
itemWidths: a,
|
|
54
|
-
leadWidth:
|
|
54
|
+
leadWidth: h,
|
|
55
55
|
actionWidth: w
|
|
56
56
|
});
|
|
57
57
|
}, [
|
|
58
|
-
|
|
58
|
+
n,
|
|
59
59
|
o,
|
|
60
|
-
|
|
60
|
+
r
|
|
61
61
|
]), {
|
|
62
62
|
measurements: l,
|
|
63
63
|
registerItemRef: f,
|
|
@@ -65,47 +65,47 @@ function P(n) {
|
|
|
65
65
|
actionRef: d
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function q(
|
|
69
|
-
const { items:
|
|
68
|
+
function q(i) {
|
|
69
|
+
const { items: n, availableWidth: o, gapPx: r, itemWidths: t } = i, c = [];
|
|
70
70
|
let d = 0;
|
|
71
|
-
for (const l of I(
|
|
72
|
-
const p = Math.max(0,
|
|
73
|
-
if (
|
|
74
|
-
c.push(l), d =
|
|
71
|
+
for (const l of I(n)) {
|
|
72
|
+
const p = Math.max(0, t[l.id] ?? l.estimatedWidth ?? 0), u = c.length === 0 ? p : d + r + p;
|
|
73
|
+
if (u > o) break;
|
|
74
|
+
c.push(l), d = u;
|
|
75
75
|
}
|
|
76
76
|
return c;
|
|
77
77
|
}
|
|
78
|
-
function N({ item:
|
|
79
|
-
return /* @__PURE__ */ e(O, { children:
|
|
78
|
+
function N({ item: i, compact: n }) {
|
|
79
|
+
return /* @__PURE__ */ e(O, { children: i.render({ compact: n }) });
|
|
80
80
|
}
|
|
81
|
-
function J({ items:
|
|
82
|
-
const { ref: p, width:
|
|
81
|
+
function J({ items: i, expanded: n, onToggleExpanded: o, leadSlot: r, actionSlot: t, className: c, leadReservePx: d = 140, actionReservePx: l = 44 }) {
|
|
82
|
+
const { ref: p, width: u } = D(), f = !n, a = R(() => I(i), [i]), { measurements: h, registerItemRef: w, leadRef: v, actionRef: m } = P({
|
|
83
83
|
items: a,
|
|
84
|
-
leadSlot:
|
|
85
|
-
actionSlot:
|
|
86
|
-
}),
|
|
87
|
-
if (
|
|
88
|
-
const s = 24, M = 40, z =
|
|
84
|
+
leadSlot: r,
|
|
85
|
+
actionSlot: t
|
|
86
|
+
}), b = R(() => {
|
|
87
|
+
if (n) return a;
|
|
88
|
+
const s = 24, M = 40, z = r ? Math.max(d, h.leadWidth + 12) : 0, A = t ? Math.max(l, h.actionWidth) : 0;
|
|
89
89
|
return q({
|
|
90
90
|
items: a,
|
|
91
|
-
availableWidth: Math.max(0,
|
|
91
|
+
availableWidth: Math.max(0, u - s - M - z - A - 24),
|
|
92
92
|
gapPx: 12,
|
|
93
|
-
itemWidths:
|
|
93
|
+
itemWidths: h.itemWidths
|
|
94
94
|
});
|
|
95
95
|
}, [
|
|
96
|
-
|
|
96
|
+
n,
|
|
97
97
|
a,
|
|
98
|
-
|
|
99
|
-
i,
|
|
98
|
+
u,
|
|
100
99
|
r,
|
|
100
|
+
t,
|
|
101
101
|
d,
|
|
102
102
|
l,
|
|
103
|
-
|
|
103
|
+
h
|
|
104
104
|
]);
|
|
105
|
-
return /* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ x("div", {
|
|
106
106
|
ref: p,
|
|
107
|
-
className:
|
|
108
|
-
"aria-expanded":
|
|
107
|
+
className: y("relative border-2 border-solid border-gama-300 bg-gama-25 transition-all duration-300 ease-in-out", "rounded-lg min-[744px]:rounded-[100px]", f ? "overflow-hidden" : "overflow-visible", c),
|
|
108
|
+
"aria-expanded": n,
|
|
109
109
|
role: "button",
|
|
110
110
|
tabIndex: 0,
|
|
111
111
|
onClick: o,
|
|
@@ -113,49 +113,55 @@ function J({ items: n, expanded: t, onToggleExpanded: o, leadSlot: i, actionSlot
|
|
|
113
113
|
(s.key === "Enter" || s.key === " ") && (s.preventDefault(), o());
|
|
114
114
|
},
|
|
115
115
|
children: [
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
className:
|
|
118
|
-
children: [
|
|
116
|
+
/* @__PURE__ */ x("div", {
|
|
117
|
+
className: y("flex min-w-0 items-center p-2", f ? "gap-y-0" : "gap-y-1"),
|
|
118
|
+
children: [r ? /* @__PURE__ */ e("div", {
|
|
119
119
|
className: "shrink-0",
|
|
120
|
-
children:
|
|
120
|
+
children: r
|
|
121
121
|
}) : null, /* @__PURE__ */ e("div", {
|
|
122
122
|
className: "min-w-0 flex-1 px-4",
|
|
123
123
|
children: f ? /* @__PURE__ */ e("div", {
|
|
124
124
|
className: "flex min-w-0 flex-nowrap items-center gap-x-4 overflow-hidden whitespace-nowrap",
|
|
125
|
-
children:
|
|
125
|
+
children: b.map((s) => /* @__PURE__ */ e("div", {
|
|
126
126
|
className: "shrink-0 whitespace-nowrap",
|
|
127
127
|
children: /* @__PURE__ */ e(N, {
|
|
128
128
|
item: s,
|
|
129
129
|
compact: f
|
|
130
130
|
})
|
|
131
131
|
}, s.id))
|
|
132
|
-
}) : /* @__PURE__ */
|
|
133
|
-
className: "flex min-w-0 flex-wrap items-center gap-x-
|
|
134
|
-
children: a.map((s) => /* @__PURE__ */ e("div", {
|
|
132
|
+
}) : /* @__PURE__ */ x("div", {
|
|
133
|
+
className: "flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1 overflow-visible",
|
|
134
|
+
children: [a.map((s) => /* @__PURE__ */ e("div", {
|
|
135
135
|
className: "shrink-0 whitespace-nowrap",
|
|
136
136
|
children: /* @__PURE__ */ e(N, {
|
|
137
137
|
item: s,
|
|
138
138
|
compact: f
|
|
139
139
|
})
|
|
140
|
-
}, s.id))
|
|
140
|
+
}, s.id)), t ? /* @__PURE__ */ e("div", {
|
|
141
|
+
className: "shrink-0",
|
|
142
|
+
children: /* @__PURE__ */ e("div", {
|
|
143
|
+
ref: m,
|
|
144
|
+
children: t
|
|
145
|
+
})
|
|
146
|
+
}) : null]
|
|
141
147
|
})
|
|
142
148
|
})]
|
|
143
149
|
}),
|
|
144
150
|
/* @__PURE__ */ e("div", {
|
|
145
151
|
className: "absolute right-4 top-1/2 z-20 flex-shrink-0 -translate-y-1/2 text-delta-700",
|
|
146
|
-
children:
|
|
152
|
+
children: n ? /* @__PURE__ */ e(E, { className: "size-6" }) : /* @__PURE__ */ e(B, { className: "size-6" })
|
|
147
153
|
}),
|
|
148
154
|
/* @__PURE__ */ e("div", {
|
|
149
155
|
"aria-hidden": !0,
|
|
150
156
|
className: "pointer-events-none absolute left-0 top-0 -z-10 opacity-0",
|
|
151
|
-
children: /* @__PURE__ */
|
|
152
|
-
className: "flex min-w-0 flex-nowrap items-center gap-x-
|
|
157
|
+
children: /* @__PURE__ */ x("div", {
|
|
158
|
+
className: "flex min-w-0 flex-nowrap items-center gap-x-4 gap-y-1 whitespace-nowrap",
|
|
153
159
|
children: [
|
|
154
|
-
|
|
155
|
-
className: "
|
|
160
|
+
r ? /* @__PURE__ */ e("div", {
|
|
161
|
+
className: "shrink-0",
|
|
156
162
|
children: /* @__PURE__ */ e("div", {
|
|
157
163
|
ref: v,
|
|
158
|
-
children:
|
|
164
|
+
children: r
|
|
159
165
|
})
|
|
160
166
|
}) : null,
|
|
161
167
|
a.map((s) => /* @__PURE__ */ e("div", {
|
|
@@ -166,11 +172,11 @@ function J({ items: n, expanded: t, onToggleExpanded: o, leadSlot: i, actionSlot
|
|
|
166
172
|
compact: !0
|
|
167
173
|
})
|
|
168
174
|
}, s.id)),
|
|
169
|
-
|
|
175
|
+
t ? /* @__PURE__ */ e("div", {
|
|
170
176
|
className: "shrink-0",
|
|
171
177
|
children: /* @__PURE__ */ e("div", {
|
|
172
|
-
ref:
|
|
173
|
-
children:
|
|
178
|
+
ref: m,
|
|
179
|
+
children: t
|
|
174
180
|
})
|
|
175
181
|
}) : null
|
|
176
182
|
]
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { cn as l } from "../../../helpers/cn.js";
|
|
2
|
-
import { resolveSx as
|
|
3
|
-
import { CloseIcon as
|
|
4
|
-
import { ErrorOutlineIcon as
|
|
5
|
-
import { floatingLabelClass as
|
|
2
|
+
import { resolveSx as E } from "../../../helpers/sx.js";
|
|
3
|
+
import { CloseIcon as je } from "../../icons/close-icon/CloseIcon.js";
|
|
4
|
+
import { ErrorOutlineIcon as ze } from "../../icons/error-outline-icon/ErrorOutlineIcon.js";
|
|
5
|
+
import { floatingLabelClass as Ke, floatingLabelLayoutStyle as Ue, notchedLegendClass as Ve, notchedOutlineClass as J, singleLineInputLayoutStyle as We, singleLineShellLayoutStyle as Ye } from "../field-styles.js";
|
|
6
6
|
import y from "./StyledInputField.module.js";
|
|
7
|
-
import { Children as
|
|
7
|
+
import { Children as Ge, useCallback as Je, useId as Qe, useLayoutEffect as Q, useRef as X, useState as k } from "react";
|
|
8
8
|
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
9
9
|
import { useMergeRefs as Z } from "@floating-ui/react";
|
|
10
|
-
var bt = ({ dataTest: p, label: a, value: u, defaultValue: S, onChange: q, onBlur: O, onFocus: ee, error: o, helperText: L, disabled: s, readOnly: n, required: v, allowClear: te, onClear: ne, type: ie = "text", placeholder: oe, name: ae, id: le, autoComplete: se, autoFocus: de, multiline: d, rows: A, minRows: I, maxRows: C, size: re = "medium", fullWidth: ce, className: he, style: me, sx: pe, inputRef: ue, slotProps: t, InputProps:
|
|
11
|
-
const fe =
|
|
12
|
-
n || (
|
|
10
|
+
var bt = ({ dataTest: p, label: a, value: u, defaultValue: S, onChange: q, onBlur: O, onFocus: ee, error: o, helperText: L, disabled: s, readOnly: n, required: v, allowClear: te, onClear: ne, type: ie = "text", placeholder: oe, name: ae, id: le, autoComplete: se, autoFocus: de, multiline: d, rows: A, minRows: I, maxRows: C, size: re = "medium", fullWidth: ce, className: he, style: me, sx: pe, inputRef: ue, slotProps: t, InputProps: D, onKeyDown: T, onClick: ge, variant: Xe }) => {
|
|
11
|
+
const fe = Qe(), _ = le ?? fe, P = `${_}-helper-text`, $ = X(null), j = X(null), [xe, be] = k(void 0), [H, z] = k(!1), [ye, K] = k(S != null && S !== ""), R = u !== void 0, U = R ? u !== "" && u != null : ye, Se = !!s || !!n, w = t?.input?.startAdornment ?? D?.startAdornment, g = Ge.count(w) > 0, r = g && Array.isArray(w), f = t?.input?.endAdornment ?? D?.endAdornment, M = !!(te && U && !Se), { ref: Le, ...c } = t?.htmlInput ?? {}, Ie = ue ?? Le, { className: He, style: B, ref: Ne } = t?.input ?? {}, ve = Z([Ne]), Ae = t?.input?.onMouseDown, N = H || U || g, Ce = (e) => {
|
|
12
|
+
n || (R || K(e.target.value !== ""), q?.(e));
|
|
13
13
|
}, _e = (e) => {
|
|
14
14
|
!s && !n && z(!0), ee?.(e);
|
|
15
15
|
}, Re = (e) => {
|
|
@@ -19,8 +19,8 @@ var bt = ({ dataTest: p, label: a, value: u, defaultValue: S, onChange: q, onBlu
|
|
|
19
19
|
const e = $.current;
|
|
20
20
|
if (!d || A != null || !e) return;
|
|
21
21
|
e.style.height = "auto";
|
|
22
|
-
const h = getComputedStyle(e), b = Number.parseFloat(h.lineHeight) || 24, G = Number.parseFloat(h.paddingTop) + Number.parseFloat(h.paddingBottom),
|
|
23
|
-
e.style.height = `${Math.min(
|
|
22
|
+
const h = getComputedStyle(e), b = Number.parseFloat(h.lineHeight) || 24, G = Number.parseFloat(h.paddingTop) + Number.parseFloat(h.paddingBottom), Pe = I ? I * b + G : 0, $e = C ? C * b + G : Number.POSITIVE_INFINITY;
|
|
23
|
+
e.style.height = `${Math.min($e, Math.max(Pe, e.scrollHeight))}px`;
|
|
24
24
|
}, [
|
|
25
25
|
S,
|
|
26
26
|
C,
|
|
@@ -29,32 +29,33 @@ var bt = ({ dataTest: p, label: a, value: u, defaultValue: S, onChange: q, onBlu
|
|
|
29
29
|
A,
|
|
30
30
|
u
|
|
31
31
|
]);
|
|
32
|
-
const V = Z([Ie,
|
|
32
|
+
const V = Z([Ie, Je((e) => {
|
|
33
33
|
$.current = e instanceof HTMLTextAreaElement ? e : null;
|
|
34
|
-
}, [])]), { style:
|
|
34
|
+
}, [])]), { style: F, ...we } = c, x = !d && !r, { height: Ze, minHeight: qe, maxHeight: Oe, paddingTop: et, paddingBottom: tt, ...Me } = B ?? {}, Be = x ? {
|
|
35
35
|
...Me,
|
|
36
|
-
...
|
|
36
|
+
...Ye()
|
|
37
37
|
} : r ? {
|
|
38
38
|
boxSizing: "border-box",
|
|
39
39
|
minHeight: 40,
|
|
40
|
-
...
|
|
41
|
-
} :
|
|
40
|
+
...B
|
|
41
|
+
} : B, { height: nt, minHeight: it, maxHeight: ot, paddingTop: at, paddingBottom: lt, paddingLeft: st, paddingRight: Fe, ...Ee } = F ?? {}, ke = x ? {
|
|
42
42
|
...Ee,
|
|
43
|
-
...
|
|
43
|
+
...We({
|
|
44
44
|
paddingLeft: g ? 40 : 14,
|
|
45
|
-
paddingRight: Fe ?? xe ?? (
|
|
45
|
+
paddingRight: Fe ?? xe ?? (M || f ? 40 : 14)
|
|
46
46
|
})
|
|
47
|
-
} :
|
|
47
|
+
} : F;
|
|
48
48
|
Q(() => {
|
|
49
49
|
if (!x) return;
|
|
50
50
|
const e = j.current, h = e ? Math.ceil(e.getBoundingClientRect().width) + 20 : void 0;
|
|
51
51
|
be((b) => b === h ? b : h);
|
|
52
52
|
});
|
|
53
|
-
const W = {
|
|
53
|
+
const De = N || !a, W = {
|
|
54
54
|
...we,
|
|
55
|
-
style: x ? ke :
|
|
55
|
+
style: x ? ke : F,
|
|
56
|
+
id: c.id ?? _,
|
|
56
57
|
name: ae,
|
|
57
|
-
placeholder:
|
|
58
|
+
placeholder: De ? oe : void 0,
|
|
58
59
|
disabled: s,
|
|
59
60
|
readOnly: n,
|
|
60
61
|
required: v,
|
|
@@ -68,12 +69,12 @@ var bt = ({ dataTest: p, label: a, value: u, defaultValue: S, onChange: q, onBlu
|
|
|
68
69
|
onChange: Ce,
|
|
69
70
|
onFocus: _e,
|
|
70
71
|
onBlur: Re,
|
|
71
|
-
onKeyDown: c.onKeyDown ||
|
|
72
|
-
|
|
72
|
+
onKeyDown: c.onKeyDown || T ? (e) => {
|
|
73
|
+
T?.(e), e.defaultPrevented || c.onKeyDown?.(e);
|
|
73
74
|
} : void 0
|
|
74
|
-
}, Y = l(y.Input, "peer border-0 bg-transparent text-base tracking-[0.00938em] text-delta-800 outline-none placeholder:text-delta-500", r ? "box-border h-8 min-w-[60px] flex-1 py-0 pl-0 pr-0 leading-[23px]" : d ? "w-full resize-none overflow-hidden p-0 pl-0 pr-0 leading-[23px]" : l("w-full", y["Input--singleLine"]), "disabled:text-delta-300", n && "text-delta-800", He),
|
|
75
|
+
}, Y = l(y.Input, "peer border-0 bg-transparent text-base tracking-[0.00938em] text-delta-800 outline-none placeholder:text-delta-500", r ? "box-border h-8 min-w-[60px] flex-1 py-0 pl-0 pr-0 leading-[23px]" : d ? "w-full resize-none overflow-hidden p-0 pl-0 pr-0 leading-[23px]" : l("w-full", y["Input--singleLine"]), "disabled:text-delta-300", n && "text-delta-800", He), Te = !d && !r ? {
|
|
75
76
|
"data-start-adornment": g ? "true" : void 0,
|
|
76
|
-
"data-end-adornment":
|
|
77
|
+
"data-end-adornment": M || f ? "true" : void 0
|
|
77
78
|
} : {};
|
|
78
79
|
return /* @__PURE__ */ m("div", {
|
|
79
80
|
className: l("group relative inline-flex flex-col", he),
|
|
@@ -82,7 +83,7 @@ var bt = ({ dataTest: p, label: a, value: u, defaultValue: S, onChange: q, onBlu
|
|
|
82
83
|
width: ce ? "100%" : 235,
|
|
83
84
|
fontFamily: "Roboto, Helvetica, Arial, sans-serif",
|
|
84
85
|
letterSpacing: "0.00938em",
|
|
85
|
-
...
|
|
86
|
+
...E(pe),
|
|
86
87
|
...me
|
|
87
88
|
},
|
|
88
89
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -96,7 +97,7 @@ var bt = ({ dataTest: p, label: a, value: u, defaultValue: S, onChange: q, onBlu
|
|
|
96
97
|
children: [
|
|
97
98
|
g && /* @__PURE__ */ i("span", {
|
|
98
99
|
className: l("items-center text-delta-500", r ? "contents" : "absolute left-3 flex"),
|
|
99
|
-
children:
|
|
100
|
+
children: w
|
|
100
101
|
}),
|
|
101
102
|
d ? /* @__PURE__ */ i("textarea", {
|
|
102
103
|
...W,
|
|
@@ -106,21 +107,21 @@ var bt = ({ dataTest: p, label: a, value: u, defaultValue: S, onChange: q, onBlu
|
|
|
106
107
|
className: Y
|
|
107
108
|
}) : /* @__PURE__ */ i("input", {
|
|
108
109
|
...W,
|
|
109
|
-
...
|
|
110
|
+
...Te,
|
|
110
111
|
ref: V,
|
|
111
112
|
"data-testid": p,
|
|
112
113
|
type: ie,
|
|
113
114
|
className: Y
|
|
114
115
|
}),
|
|
115
|
-
|
|
116
|
+
M ? /* @__PURE__ */ i("button", {
|
|
116
117
|
type: "button",
|
|
117
118
|
"aria-label": "Clear",
|
|
118
119
|
"data-testid": `${p}-clear`,
|
|
119
120
|
className: "absolute right-4 z-40 flex items-center justify-center rounded-full border-0 bg-transparent p-[2px] duration-300 hover:bg-gama-100",
|
|
120
121
|
onClick: (e) => {
|
|
121
|
-
e.stopPropagation(), e.preventDefault(),
|
|
122
|
+
e.stopPropagation(), e.preventDefault(), R || K(!1), ne?.();
|
|
122
123
|
},
|
|
123
|
-
children: /* @__PURE__ */ i(
|
|
124
|
+
children: /* @__PURE__ */ i(je, {
|
|
124
125
|
width: 18,
|
|
125
126
|
height: 18
|
|
126
127
|
})
|
|
@@ -139,7 +140,7 @@ var bt = ({ dataTest: p, label: a, value: u, defaultValue: S, onChange: q, onBlu
|
|
|
139
140
|
notched: !0
|
|
140
141
|
}),
|
|
141
142
|
children: /* @__PURE__ */ i("legend", {
|
|
142
|
-
className:
|
|
143
|
+
className: Ve(N),
|
|
143
144
|
children: /* @__PURE__ */ m("span", {
|
|
144
145
|
className: "inline-block px-[5px]",
|
|
145
146
|
children: [a, v && " *"]
|
|
@@ -157,8 +158,8 @@ var bt = ({ dataTest: p, label: a, value: u, defaultValue: S, onChange: q, onBlu
|
|
|
157
158
|
})
|
|
158
159
|
]
|
|
159
160
|
}), a && /* @__PURE__ */ m("label", {
|
|
160
|
-
htmlFor:
|
|
161
|
-
className: l(
|
|
161
|
+
htmlFor: _,
|
|
162
|
+
className: l(Ke({
|
|
162
163
|
shrink: N,
|
|
163
164
|
focused: H,
|
|
164
165
|
error: o,
|
|
@@ -167,17 +168,17 @@ var bt = ({ dataTest: p, label: a, value: u, defaultValue: S, onChange: q, onBlu
|
|
|
167
168
|
size: re
|
|
168
169
|
}), t?.inputLabel?.className),
|
|
169
170
|
style: {
|
|
170
|
-
...
|
|
171
|
+
...E(t?.inputLabel?.sx),
|
|
171
172
|
...t?.inputLabel?.style,
|
|
172
|
-
...
|
|
173
|
+
...Ue(N)
|
|
173
174
|
},
|
|
174
175
|
children: [a, v && " *"]
|
|
175
176
|
})]
|
|
176
177
|
}), !n && (L != null || o) && /* @__PURE__ */ m("div", {
|
|
177
178
|
id: P,
|
|
178
179
|
className: l(!t?.formHelperText && "mr-[14px] box-border min-h-[24px] pt-1", o && !t?.formHelperText?.hideErrorIcon && "flex items-start gap-1 text-error-500", !o && "text-delta-600", t?.formHelperText?.className),
|
|
179
|
-
style:
|
|
180
|
-
children: [o && !t?.formHelperText?.hideErrorIcon && /* @__PURE__ */ i(
|
|
180
|
+
style: E(t?.formHelperText?.sx),
|
|
181
|
+
children: [o && !t?.formHelperText?.hideErrorIcon && /* @__PURE__ */ i(ze, {
|
|
181
182
|
width: 20,
|
|
182
183
|
height: 20,
|
|
183
184
|
className: "min-w-5 shrink-0"
|