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