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.
- package/dist/asma-ui-core.css +1 -1
- package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +62 -61
- package/dist/components/inputs/input-field/StyledInputField.js +89 -84
- package/dist/components/inputs/input-field/StyledInputField.module.js +3 -3
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +63 -63
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.module.js +3 -3
- package/dist/components/utils/popover/PopoverSheet.js +40 -40
- package/dist/src/components/inputs/dynamic-select/types.d.ts +6 -0
- package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +8 -1
- package/package.json +1 -1
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { LoadingIcon as
|
|
3
|
-
import { CheckIcon as
|
|
4
|
-
import { PlusIconCircle as
|
|
5
|
-
import { StyledChip as
|
|
6
|
-
import { StyledCheckbox as
|
|
7
|
-
import { StyledTooltip as
|
|
8
|
-
import { StyledInputField as
|
|
9
|
-
import { StyledSelectAutocomplete as
|
|
10
|
-
import { DynamicInteractiveChipGroup as
|
|
11
|
-
import { createElement as
|
|
12
|
-
import { Fragment as
|
|
13
|
-
var
|
|
14
|
-
const [F,
|
|
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
|
-
},
|
|
18
|
-
|
|
19
|
-
}, [n]),
|
|
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(
|
|
23
|
-
const
|
|
24
|
-
return /* @__PURE__ */
|
|
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: [
|
|
27
|
-
id:
|
|
26
|
+
children: [y && /* @__PURE__ */ l("span", {
|
|
27
|
+
id: C,
|
|
28
28
|
className: "text-base font-semibold text-delta-800",
|
|
29
|
-
children:
|
|
30
|
-
}), /* @__PURE__ */ l(
|
|
29
|
+
children: y
|
|
30
|
+
}), /* @__PURE__ */ l(ae, {
|
|
31
31
|
open: F,
|
|
32
|
-
onOpen:
|
|
33
|
-
onClose:
|
|
32
|
+
onOpen: $,
|
|
33
|
+
onClose: X,
|
|
34
34
|
disableCloseOnSelect: o,
|
|
35
35
|
dataTest: h,
|
|
36
|
-
disabled: !!
|
|
37
|
-
noOptionsText:
|
|
36
|
+
disabled: !!I || !!m,
|
|
37
|
+
noOptionsText: _,
|
|
38
38
|
loading: m,
|
|
39
39
|
readOnly: u,
|
|
40
40
|
value: g,
|
|
41
|
-
size:
|
|
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 ??
|
|
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 =
|
|
57
|
-
return [...a.map((r) => /* @__PURE__ */ l(
|
|
58
|
-
dataTest: `${
|
|
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: !!
|
|
67
|
+
disabled: !!I || !!m,
|
|
67
68
|
deleteButtonTabIndex: -1,
|
|
68
69
|
onDelete: () => {
|
|
69
|
-
Array.isArray(g) && x(g.filter((b) => !
|
|
70
|
+
Array.isArray(g) && x(g.filter((b) => !B(b, r)));
|
|
70
71
|
}
|
|
71
|
-
},
|
|
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:
|
|
77
|
+
onClick: $
|
|
77
78
|
}, "remaining-count") : null];
|
|
78
79
|
} : void 0,
|
|
79
|
-
popupIcon: m ? /* @__PURE__ */ l(
|
|
80
|
+
popupIcon: m ? /* @__PURE__ */ l(Y, {
|
|
80
81
|
height: 24,
|
|
81
82
|
width: 24
|
|
82
|
-
}) : o ? /* @__PURE__ */ l(
|
|
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 =
|
|
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__ */
|
|
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:
|
|
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(
|
|
102
|
+
}), /* @__PURE__ */ l(L, {
|
|
102
103
|
arrow: !0,
|
|
103
104
|
title: c,
|
|
104
|
-
children: /* @__PURE__ */
|
|
105
|
+
children: /* @__PURE__ */ T(z, { children: [/* @__PURE__ */ l(te, {
|
|
105
106
|
disabled: a,
|
|
106
|
-
dataTest: `${
|
|
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__ */
|
|
119
|
+
return /* @__PURE__ */ q("li", {
|
|
119
120
|
...e,
|
|
120
121
|
role: "option",
|
|
121
122
|
"aria-selected": r,
|
|
122
123
|
key: e.id,
|
|
123
|
-
className:
|
|
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(
|
|
130
|
+
}), /* @__PURE__ */ l(L, {
|
|
130
131
|
arrow: !0,
|
|
131
132
|
title: c,
|
|
132
|
-
children: /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ T(z, { children: [/* @__PURE__ */ l("span", {
|
|
133
134
|
className: "w-5 min-w-5",
|
|
134
|
-
children: r && /* @__PURE__ */ l(
|
|
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(
|
|
146
|
+
renderInput: (e) => /* @__PURE__ */ l(le, {
|
|
146
147
|
dataTest: `${h}-input-field`,
|
|
147
148
|
...e,
|
|
148
149
|
inputRef: E,
|
|
149
|
-
error:
|
|
150
|
-
helperText:
|
|
151
|
-
reserveHelperText:
|
|
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:
|
|
157
|
-
onBlur:
|
|
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:
|
|
165
|
+
startAdornment: J ?? e.slotProps?.input?.startAdornment
|
|
165
166
|
},
|
|
166
167
|
htmlInput: {
|
|
167
168
|
...e.slotProps?.htmlInput ?? {},
|
|
168
|
-
...
|
|
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
|
-
|
|
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
|
|
8
|
-
import
|
|
9
|
-
import { Children as at, useCallback as st, useId as rt, useLayoutEffect as
|
|
10
|
-
import { jsx as o, jsxs as
|
|
11
|
-
import { useMergeRefs as
|
|
12
|
-
var Mt = ({ dataTest:
|
|
13
|
-
const be = rt(),
|
|
14
|
-
n || (
|
|
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 &&
|
|
16
|
+
!s && !n && U(!0), oe?.(e);
|
|
17
17
|
}, Ee = (e) => {
|
|
18
|
-
!s && !n &&
|
|
18
|
+
!s && !n && U(!1), ne?.(e);
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
const e =
|
|
22
|
-
if (!r ||
|
|
20
|
+
q(() => {
|
|
21
|
+
const e = z.current;
|
|
22
|
+
if (!r || C != null || !e) return;
|
|
23
23
|
e.style.height = "auto";
|
|
24
|
-
const
|
|
25
|
-
e.style.height = `${Math.min(Xe, Math.max(
|
|
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
|
-
|
|
28
|
+
R,
|
|
29
29
|
H,
|
|
30
30
|
r,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
C,
|
|
32
|
+
g
|
|
33
33
|
]);
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
}, [])]), { style: F, ...Pe } = i,
|
|
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:
|
|
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:
|
|
47
|
-
paddingRight: je ?? He ?? (
|
|
46
|
+
paddingLeft: f ? 40 : 14,
|
|
47
|
+
paddingRight: je ?? He ?? (L || p ? 40 : 14)
|
|
48
48
|
})
|
|
49
49
|
} : F;
|
|
50
|
-
|
|
51
|
-
if (!
|
|
52
|
-
const e =
|
|
53
|
-
Ie((x) => x ===
|
|
54
|
-
}
|
|
55
|
-
|
|
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:
|
|
58
|
-
id: i.id ??
|
|
61
|
+
style: m ? Ke : F,
|
|
62
|
+
id: i.id ?? A,
|
|
59
63
|
name: Me,
|
|
60
|
-
placeholder: Ue ?
|
|
64
|
+
placeholder: Ue ? de : void 0,
|
|
61
65
|
disabled: s,
|
|
62
66
|
readOnly: n,
|
|
63
|
-
required:
|
|
67
|
+
required: N,
|
|
64
68
|
autoComplete: Fe,
|
|
65
|
-
autoFocus:
|
|
66
|
-
value:
|
|
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 ?
|
|
74
|
+
"aria-describedby": M ? j : i["aria-describedby"],
|
|
71
75
|
onChange: ke,
|
|
72
76
|
onFocus: De,
|
|
73
77
|
onBlur: Ee,
|
|
74
|
-
onKeyDown: i.onKeyDown ||
|
|
75
|
-
|
|
78
|
+
onKeyDown: i.onKeyDown || $ ? (e) => {
|
|
79
|
+
$?.(e), e.defaultPrevented || i.onKeyDown?.(e);
|
|
76
80
|
} : void 0
|
|
77
|
-
},
|
|
78
|
-
"data-start-adornment":
|
|
79
|
-
"data-end-adornment":
|
|
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__ */
|
|
82
|
-
ref:
|
|
83
|
-
className: a("group relative
|
|
84
|
-
onClick:
|
|
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
|
-
|
|
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__ */
|
|
97
|
+
children: [/* @__PURE__ */ S("div", {
|
|
93
98
|
className: "relative overflow-visible",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
95
|
-
className: a("relative flex",
|
|
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 ? `${
|
|
105
|
+
"data-testid": d ? `${h}-adornment-list` : `${h}-shell`,
|
|
101
106
|
children: [
|
|
102
|
-
|
|
107
|
+
f && /* @__PURE__ */ o("span", {
|
|
103
108
|
className: a("items-center text-delta-500", d ? "contents" : "absolute left-3 flex"),
|
|
104
|
-
children:
|
|
109
|
+
children: _
|
|
105
110
|
}),
|
|
106
111
|
r ? /* @__PURE__ */ o("textarea", {
|
|
107
|
-
...
|
|
108
|
-
ref:
|
|
109
|
-
"data-testid":
|
|
110
|
-
rows:
|
|
111
|
-
className:
|
|
112
|
+
...Q,
|
|
113
|
+
ref: J,
|
|
114
|
+
"data-testid": h,
|
|
115
|
+
rows: C ?? H ?? 2,
|
|
116
|
+
className: W
|
|
112
117
|
}) : /* @__PURE__ */ o("input", {
|
|
113
|
-
...
|
|
114
|
-
...
|
|
115
|
-
ref:
|
|
116
|
-
"data-testid":
|
|
117
|
-
type:
|
|
118
|
-
className:
|
|
118
|
+
...Q,
|
|
119
|
+
...Qe,
|
|
120
|
+
ref: J,
|
|
121
|
+
"data-testid": h,
|
|
122
|
+
type: re,
|
|
123
|
+
className: W
|
|
119
124
|
}),
|
|
120
|
-
|
|
125
|
+
L ? /* @__PURE__ */ o("button", {
|
|
121
126
|
type: "button",
|
|
122
127
|
tabIndex: -1,
|
|
123
128
|
"aria-label": "Clear",
|
|
124
|
-
"data-testid": `${
|
|
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(),
|
|
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
|
-
}) :
|
|
134
|
-
ref:
|
|
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:
|
|
141
|
+
children: p
|
|
137
142
|
}),
|
|
138
143
|
l ? /* @__PURE__ */ o("fieldset", {
|
|
139
144
|
"aria-hidden": !0,
|
|
140
|
-
className:
|
|
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(
|
|
149
|
-
children: /* @__PURE__ */
|
|
153
|
+
className: ot(v),
|
|
154
|
+
children: /* @__PURE__ */ S("span", {
|
|
150
155
|
className: "inline-block px-[5px]",
|
|
151
|
-
children: [l,
|
|
156
|
+
children: [l, N && " *"]
|
|
152
157
|
})
|
|
153
158
|
})
|
|
154
159
|
}) : /* @__PURE__ */ o("div", {
|
|
155
160
|
"aria-hidden": !0,
|
|
156
|
-
className:
|
|
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__ */
|
|
166
|
-
htmlFor:
|
|
170
|
+
}), l && /* @__PURE__ */ S("label", {
|
|
171
|
+
htmlFor: A,
|
|
167
172
|
className: a(tt({
|
|
168
|
-
shrink:
|
|
173
|
+
shrink: v,
|
|
169
174
|
focused: I,
|
|
170
175
|
error: c,
|
|
171
176
|
disabled: s,
|
|
172
177
|
readOnly: n,
|
|
173
|
-
size:
|
|
178
|
+
size: he
|
|
174
179
|
}), t?.inputLabel?.className),
|
|
175
180
|
style: {
|
|
176
181
|
...k(t?.inputLabel?.sx),
|
|
177
182
|
...t?.inputLabel?.style,
|
|
178
|
-
...nt(
|
|
183
|
+
...nt(v)
|
|
179
184
|
},
|
|
180
|
-
children: [l,
|
|
185
|
+
children: [l, N && " *"]
|
|
181
186
|
})]
|
|
182
187
|
}), M && /* @__PURE__ */ o(qe, {
|
|
183
|
-
ref:
|
|
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
|
-
...
|
|
196
|
+
...Je,
|
|
192
197
|
...k(t?.formHelperText?.sx)
|
|
193
198
|
}
|
|
194
199
|
})]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var n = "
|
|
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--
|
|
4
|
+
"Input--singleLine": "_Input--singleLine_1focb_17",
|
|
5
5
|
AdornmentList: e,
|
|
6
|
-
"AdornmentList--endAdornment": "_AdornmentList--
|
|
6
|
+
"AdornmentList--endAdornment": "_AdornmentList--endAdornment_1focb_46"
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
9
|
_ as default
|