asma-ui-core 3.86.2 → 3.87.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/components/custom/pathfinder-card/PathfinderCard.js +28 -28
- package/dist/components/data-display/chip/StyledChip.js +9 -9
- package/dist/components/feedback/snack-bar/components/StyledInfoSnackbar.js +10 -10
- package/dist/components/inputs/input-field/StyledInputField.js +16 -16
- package/dist/components/inputs/search-field/StyledSearchField.js +10 -10
- package/dist/components/inputs/select/StyledSelect.js +1 -1
- package/dist/components/inputs/select/StyledSelectItem.js +7 -7
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +54 -54
- package/dist/components/inputs/switch/base-ui/StyledSwitch.js +22 -22
- package/dist/components/navigation/link/StyledLink.js +8 -8
- package/dist/components/navigation/listbox/Listbox.js +67 -66
- package/dist/components/navigation/title-chevron/StyledTitleChevron.js +7 -7
- package/dist/components/utils/accordion/base-ui/StyledAccordionSummary.js +14 -14
- package/package.json +1 -1
- package/src/styles/touchHardening.interaction.test.tsx +269 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn as
|
|
1
|
+
import { cn as b } from "../../../helpers/cn.js";
|
|
2
2
|
import { ChevronDownIcon as j } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
|
|
3
3
|
import { ChevronUpIcon as z } from "../../icons/chevron-up-icon/ChevronUpIcon.js";
|
|
4
4
|
import h from "./Pathfinder.module.js";
|
|
@@ -6,32 +6,32 @@ import { useCallback as R, useEffect as M, useLayoutEffect as O, useMemo as y, u
|
|
|
6
6
|
import { Fragment as D, jsx as e, jsxs as I } from "react/jsx-runtime";
|
|
7
7
|
var _ = typeof window < "u" ? O : M;
|
|
8
8
|
function q() {
|
|
9
|
-
const [i, n] = x(null),
|
|
9
|
+
const [i, n] = x(null), a = R((t) => {
|
|
10
10
|
n(t);
|
|
11
11
|
}, []), s = R(() => i ? Math.floor(i.getBoundingClientRect().width) : 0, [i]);
|
|
12
12
|
return {
|
|
13
|
-
ref:
|
|
13
|
+
ref: a,
|
|
14
14
|
width: P(R((t) => {
|
|
15
15
|
if (!i || typeof ResizeObserver > "u") return () => {
|
|
16
16
|
};
|
|
17
|
-
let
|
|
17
|
+
let d = 0;
|
|
18
18
|
const o = new ResizeObserver(() => {
|
|
19
|
-
cancelAnimationFrame(
|
|
19
|
+
cancelAnimationFrame(d), d = requestAnimationFrame(t);
|
|
20
20
|
});
|
|
21
21
|
return o.observe(i), () => {
|
|
22
|
-
cancelAnimationFrame(
|
|
22
|
+
cancelAnimationFrame(d), o.disconnect();
|
|
23
23
|
};
|
|
24
24
|
}, [i]), s, () => 0)
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
function A(i) {
|
|
28
|
-
return [...i].sort((n,
|
|
29
|
-
const s = n.order ?? 0, t =
|
|
30
|
-
return s !== t ? s - t : n.id.localeCompare(
|
|
28
|
+
return [...i].sort((n, a) => {
|
|
29
|
+
const s = n.order ?? 0, t = a.order ?? 0;
|
|
30
|
+
return s !== t ? s - t : n.id.localeCompare(a.id);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
function K(i) {
|
|
34
|
-
const { items: n, leadSlot:
|
|
34
|
+
const { items: n, leadSlot: a, actionSlot: s } = i, t = k({}), d = k(null), o = k(null), [l, v] = x({
|
|
35
35
|
itemWidths: {},
|
|
36
36
|
leadWidth: 0,
|
|
37
37
|
actionWidth: 0
|
|
@@ -48,7 +48,7 @@ function K(i) {
|
|
|
48
48
|
const w = t.current[u.id], N = Math.ceil(w?.getBoundingClientRect().width ?? u.estimatedWidth ?? 0);
|
|
49
49
|
r[u.id] = N;
|
|
50
50
|
}
|
|
51
|
-
const m =
|
|
51
|
+
const m = a ? Math.ceil(d.current?.getBoundingClientRect().width ?? 0) : 0, g = s ? Math.ceil(o.current?.getBoundingClientRect().width ?? 0) : 0, W = f.current;
|
|
52
52
|
(!(Object.keys(W.itemWidths).length === Object.keys(r).length && n.every((u) => W.itemWidths[u.id] === r[u.id])) || W.leadWidth !== m || W.actionWidth !== g) && v({
|
|
53
53
|
itemWidths: r,
|
|
54
54
|
leadWidth: m,
|
|
@@ -56,29 +56,29 @@ function K(i) {
|
|
|
56
56
|
});
|
|
57
57
|
}, [
|
|
58
58
|
n,
|
|
59
|
-
|
|
59
|
+
a,
|
|
60
60
|
s
|
|
61
61
|
]), {
|
|
62
62
|
measurements: l,
|
|
63
63
|
registerItemRef: p,
|
|
64
|
-
leadRef:
|
|
64
|
+
leadRef: d,
|
|
65
65
|
actionRef: o
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
function U(i) {
|
|
69
|
-
const { items: n, availableWidth:
|
|
69
|
+
const { items: n, availableWidth: a, gapPx: s, itemWidths: t } = i, d = [];
|
|
70
70
|
let o = 0;
|
|
71
71
|
for (const l of A(n)) {
|
|
72
|
-
const v = Math.max(0, t[l.id] ?? l.estimatedWidth ?? 0), f =
|
|
73
|
-
if (f >
|
|
74
|
-
|
|
72
|
+
const v = Math.max(0, t[l.id] ?? l.estimatedWidth ?? 0), f = d.length === 0 ? v : o + s + v;
|
|
73
|
+
if (f > a) break;
|
|
74
|
+
d.push(l), o = f;
|
|
75
75
|
}
|
|
76
|
-
return
|
|
76
|
+
return d;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function C({ item: i, compact: n }) {
|
|
79
79
|
return /* @__PURE__ */ e(D, { children: i.render({ compact: n }) });
|
|
80
80
|
}
|
|
81
|
-
function Y({ items: i, expanded: n, onToggleExpanded:
|
|
81
|
+
function Y({ items: i, expanded: n, onToggleExpanded: a, leadSlot: s, actionSlot: t, className: d, leadReservePx: o = 140, actionReservePx: l = 44 }) {
|
|
82
82
|
const { ref: v, width: f } = q(), p = !n, r = y(() => A(i), [i]), { measurements: m, registerItemRef: g, leadRef: W, actionRef: u } = K({
|
|
83
83
|
items: r,
|
|
84
84
|
leadSlot: s,
|
|
@@ -104,27 +104,27 @@ function Y({ items: i, expanded: n, onToggleExpanded: d, leadSlot: s, actionSlot
|
|
|
104
104
|
]), N = p && w.length < Math.min(2, r.length), E = N ? r.slice(0, 2) : w;
|
|
105
105
|
return /* @__PURE__ */ I("div", {
|
|
106
106
|
ref: v,
|
|
107
|
-
className:
|
|
107
|
+
className: b(h.root, "asma-pressable", p ? "overflow-hidden" : "overflow-visible", d),
|
|
108
108
|
"aria-expanded": n,
|
|
109
109
|
role: "button",
|
|
110
110
|
tabIndex: 0,
|
|
111
|
-
onClick:
|
|
111
|
+
onClick: a,
|
|
112
112
|
onKeyDown: (c) => {
|
|
113
|
-
(c.key === "Enter" || c.key === " ") && (c.preventDefault(),
|
|
113
|
+
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), a());
|
|
114
114
|
},
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ I("div", {
|
|
117
|
-
className:
|
|
117
|
+
className: b(h.shell, p ? h.shellCompact : h.shellExpanded),
|
|
118
118
|
children: [s ? /* @__PURE__ */ e("div", {
|
|
119
119
|
className: "shrink-0",
|
|
120
120
|
children: s
|
|
121
121
|
}) : null, /* @__PURE__ */ e("div", {
|
|
122
122
|
className: h.content,
|
|
123
123
|
children: p ? /* @__PURE__ */ e("div", {
|
|
124
|
-
className:
|
|
124
|
+
className: b(h.compactItems, N && h.compactItemsStacked),
|
|
125
125
|
children: E.map((c) => /* @__PURE__ */ e("div", {
|
|
126
126
|
className: "shrink-0 whitespace-nowrap",
|
|
127
|
-
children: /* @__PURE__ */ e(
|
|
127
|
+
children: /* @__PURE__ */ e(C, {
|
|
128
128
|
item: c,
|
|
129
129
|
compact: p
|
|
130
130
|
})
|
|
@@ -133,7 +133,7 @@ function Y({ items: i, expanded: n, onToggleExpanded: d, leadSlot: s, actionSlot
|
|
|
133
133
|
className: h.expandedItems,
|
|
134
134
|
children: [r.map((c) => /* @__PURE__ */ e("div", {
|
|
135
135
|
className: "shrink-0 whitespace-nowrap",
|
|
136
|
-
children: /* @__PURE__ */ e(
|
|
136
|
+
children: /* @__PURE__ */ e(C, {
|
|
137
137
|
item: c,
|
|
138
138
|
compact: p
|
|
139
139
|
})
|
|
@@ -168,7 +168,7 @@ function Y({ items: i, expanded: n, onToggleExpanded: d, leadSlot: s, actionSlot
|
|
|
168
168
|
r.map((c) => /* @__PURE__ */ e("div", {
|
|
169
169
|
ref: g(c.id),
|
|
170
170
|
className: "shrink-0 whitespace-nowrap",
|
|
171
|
-
children: /* @__PURE__ */ e(
|
|
171
|
+
children: /* @__PURE__ */ e(C, {
|
|
172
172
|
item: c,
|
|
173
173
|
compact: !0
|
|
174
174
|
})
|
|
@@ -6,8 +6,8 @@ import { getChipPadding as U } from "./chipPadding.js";
|
|
|
6
6
|
import q from "./StyledChip.module.js";
|
|
7
7
|
import { forwardRef as A } from "react";
|
|
8
8
|
import { jsx as m, jsxs as F } from "react/jsx-runtime";
|
|
9
|
-
var O = A(({ dataTest:
|
|
10
|
-
const n = !o && !t && (!!b || !!p), f =
|
|
9
|
+
var O = A(({ dataTest: u, label: c, size: r = "medium", disabled: t, readOnly: o, clickable: b, icon: w, avatar: g, deleteIcon: y, onDelete: l, onClick: p, onMouseDown: _, onMouseUp: k, className: h, classes: a, sx: S, tabIndex: v, deleteButtonTabIndex: j, "aria-label": C, role: s, "aria-checked": R, "aria-readonly": B, "data-hovered": D, "data-focus": I, variant: G, color: H }, M) => {
|
|
10
|
+
const n = !o && !t && (!!b || !!p), f = g ?? w, d = U(r, !!f, !!(l && !o)), N = {
|
|
11
11
|
paddingTop: d.top,
|
|
12
12
|
paddingRight: d.right,
|
|
13
13
|
paddingBottom: d.bottom,
|
|
@@ -19,7 +19,7 @@ var O = A(({ dataTest: g, label: c, size: r = "medium", disabled: t, readOnly: o
|
|
|
19
19
|
}, W = x(h, "width"), $ = x(h, "max-width");
|
|
20
20
|
return /* @__PURE__ */ F("div", {
|
|
21
21
|
ref: M,
|
|
22
|
-
"data-testid":
|
|
22
|
+
"data-testid": u,
|
|
23
23
|
"aria-label": C,
|
|
24
24
|
"data-hovered": D,
|
|
25
25
|
"data-focus": I,
|
|
@@ -29,16 +29,16 @@ var O = A(({ dataTest: g, label: c, size: r = "medium", disabled: t, readOnly: o
|
|
|
29
29
|
tabIndex: o || t ? void 0 : n ? v ?? 0 : v,
|
|
30
30
|
onClick: t || o ? void 0 : p,
|
|
31
31
|
onKeyDown: t || o ? void 0 : P,
|
|
32
|
-
onMouseDown: t || o ? void 0 :
|
|
33
|
-
onMouseUp: t || o ? void 0 :
|
|
34
|
-
className: i("box-border inline-flex items-center gap-1 rounded-[25px] border border-solid border-delta-300 bg-white text-base text-delta-700", !W && "w-fit", !$ && "max-w-full", r === "small" ? "h-6" : "h-8", o && "pointer-events-none", t && "pointer-events-none opacity-[0.38]", n && i("cursor-pointer outline-none", "data-[hovered]:border-gama-200 data-[hovered]:bg-gama-25 hover:border-gama-200 hover:bg-gama-25", "active:!border-gama-400 active:bg-gama-25 active:shadow-[0_0_0_2px_var(--colors-gama-400)]"), q["focus-ring"], a?.root, h),
|
|
32
|
+
onMouseDown: t || o ? void 0 : _,
|
|
33
|
+
onMouseUp: t || o ? void 0 : k,
|
|
34
|
+
className: i("box-border inline-flex items-center gap-1 rounded-[25px] border border-solid border-delta-300 bg-white text-base text-delta-700", !W && "w-fit", !$ && "max-w-full", r === "small" ? "h-6" : "h-8", o && "pointer-events-none", t && "pointer-events-none opacity-[0.38]", n && i("cursor-pointer outline-none", "asma-touch-ready", "data-[hovered]:border-gama-200 data-[hovered]:bg-gama-25 hover:border-gama-200 hover:bg-gama-25", "active:!border-gama-400 active:bg-gama-25 active:shadow-[0_0_0_2px_var(--colors-gama-400)]"), q["focus-ring"], a?.root, h),
|
|
35
35
|
style: {
|
|
36
36
|
...N,
|
|
37
37
|
...E(S)
|
|
38
38
|
},
|
|
39
39
|
children: [
|
|
40
40
|
f && /* @__PURE__ */ m("span", {
|
|
41
|
-
className: i("flex shrink-0 items-center justify-center", r === "small" ? "h-[18px] w-[18px]" : "h-6 w-6",
|
|
41
|
+
className: i("flex shrink-0 items-center justify-center", r === "small" ? "h-[18px] w-[18px]" : "h-6 w-6", g ? a?.avatar : a?.icon),
|
|
42
42
|
children: f
|
|
43
43
|
}),
|
|
44
44
|
/* @__PURE__ */ m("span", {
|
|
@@ -48,12 +48,12 @@ var O = A(({ dataTest: g, label: c, size: r = "medium", disabled: t, readOnly: o
|
|
|
48
48
|
l && !o && /* @__PURE__ */ m("button", {
|
|
49
49
|
type: "button",
|
|
50
50
|
tabIndex: j,
|
|
51
|
-
"data-testid": `${
|
|
51
|
+
"data-testid": `${u}-delete`,
|
|
52
52
|
"aria-label": typeof c == "string" ? `Remove ${c}` : "Remove",
|
|
53
53
|
onClick: K,
|
|
54
54
|
disabled: t,
|
|
55
55
|
className: i("flex shrink-0 items-center justify-center rounded-full border border-solid border-delta-100 bg-delta-50 p-0 text-delta-700 [outline:none]", r === "small" ? "h-[18px] w-[18px]" : "h-5 w-5", a?.deleteIcon),
|
|
56
|
-
children:
|
|
56
|
+
children: y ?? /* @__PURE__ */ m(L, {
|
|
57
57
|
height: r === "small" ? 14 : 16,
|
|
58
58
|
width: r === "small" ? 14 : 16,
|
|
59
59
|
className: "min-w-0 shrink-0"
|
|
@@ -2,22 +2,22 @@ import { omit as m } from "../../../../helpers/omit.js";
|
|
|
2
2
|
import { LoadingIcon as d } from "../../../icons/loading-icon/LoadingIcon.js";
|
|
3
3
|
import { CloseIcon as p } from "../../../icons/close-icon/CloseIcon.js";
|
|
4
4
|
import u from "clsx";
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
import { jsx as r, jsxs as
|
|
7
|
-
import { SnackbarContent as
|
|
8
|
-
var I =
|
|
9
|
-
const { id: i, message: o, closeButton:
|
|
5
|
+
import { forwardRef as h } from "react";
|
|
6
|
+
import { jsx as r, jsxs as f } from "react/jsx-runtime";
|
|
7
|
+
import { SnackbarContent as g, useSnackbar as b } from "notistack";
|
|
8
|
+
var I = h((t, e) => {
|
|
9
|
+
const { id: i, message: o, closeButton: a, type: n, ...s } = m(t, [
|
|
10
10
|
"anchorOrigin",
|
|
11
11
|
"autoHideDuration",
|
|
12
12
|
"hideIconVariant",
|
|
13
13
|
"iconVariant",
|
|
14
14
|
"persist"
|
|
15
|
-
]), { closeSnackbar: c } = b(), l =
|
|
16
|
-
return /* @__PURE__ */ r(
|
|
15
|
+
]), { closeSnackbar: c } = b(), l = n === "loading";
|
|
16
|
+
return /* @__PURE__ */ r(g, {
|
|
17
17
|
ref: e,
|
|
18
18
|
role: "alert",
|
|
19
19
|
...s,
|
|
20
|
-
children: /* @__PURE__ */
|
|
20
|
+
children: /* @__PURE__ */ f("div", {
|
|
21
21
|
className: u("flex w-full items-center justify-center gap-1"),
|
|
22
22
|
children: [
|
|
23
23
|
l ? /* @__PURE__ */ r(d, {
|
|
@@ -28,9 +28,9 @@ var I = f((t, e) => {
|
|
|
28
28
|
className: typeof o == "string" || typeof o == "number" ? "pl-1 pr-2" : void 0,
|
|
29
29
|
children: o
|
|
30
30
|
}),
|
|
31
|
-
|
|
31
|
+
a ? /* @__PURE__ */ r("button", {
|
|
32
32
|
"aria-label": "Close",
|
|
33
|
-
className: "grid size-8 cursor-pointer place-items-center rounded border-0 bg-transparent text-white transition-colors duration-300 ease-in-out hover:bg-gama-500 active:bg-gama-500",
|
|
33
|
+
className: "asma-touch-ready grid size-8 cursor-pointer place-items-center rounded border-0 bg-transparent text-white transition-colors duration-300 ease-in-out hover:bg-gama-500 active:bg-gama-500",
|
|
34
34
|
onClick: () => c(i),
|
|
35
35
|
type: "button",
|
|
36
36
|
children: /* @__PURE__ */ r(p, {
|
|
@@ -9,8 +9,8 @@ import S from "./StyledInputField.module.js";
|
|
|
9
9
|
import { Children as at, useCallback as st, useId as rt, useLayoutEffect as Z, useRef as q, useState as D } from "react";
|
|
10
10
|
import { jsx as o, jsxs as y } from "react/jsx-runtime";
|
|
11
11
|
import { useMergeRefs as O } from "@floating-ui/react";
|
|
12
|
-
var Mt = ({ dataTest:
|
|
13
|
-
const be = rt(), R = ce ?? be, $ = `${R}-helper-text`, j = q(null), z = q(null), [He, Ie] = D(void 0), [I, K] = D(!1), [Le, U] = D(b != null && b !== ""), A =
|
|
12
|
+
var Mt = ({ dataTest: m, label: l, value: u, defaultValue: b, onChange: ee, onBlur: te, onFocus: ne, error: c, helperText: E, reserveHelperText: oe, expandHelperText: ie = !0, disabled: s, readOnly: n, required: v, allowClear: le, onClear: ae, type: se = "text", placeholder: re, name: de, id: ce, autoComplete: pe, autoFocus: me, multiline: r, rows: N, minRows: H, maxRows: C, size: ue = "medium", fullWidth: he, className: ge, style: fe, sx: xe, inputRef: Se, slotProps: t, InputProps: P, onKeyDown: T, onClick: ye, variant: dt }) => {
|
|
13
|
+
const be = rt(), R = ce ?? be, $ = `${R}-helper-text`, j = q(null), z = q(null), [He, Ie] = D(void 0), [I, K] = D(!1), [Le, U] = D(b != null && b !== ""), A = u !== void 0, V = A ? u !== "" && u != null : Le, ve = !!s || !!n, w = t?.input?.startAdornment ?? P?.startAdornment, h = at.count(w) > 0, d = h && Array.isArray(w), g = t?.input?.endAdornment ?? P?.endAdornment, _ = !!(le && V && !ve), { ref: Ne, ...i } = t?.htmlInput ?? {}, Ce = Se ?? Ne, { className: Re, style: B, ref: Ae } = t?.input ?? {}, we = O([Ae]), _e = t?.input?.onMouseDown, W = t?.input?.onClick, Be = W ? { onClick: W } : {}, Fe = pe ?? i.autoComplete, Me = de ?? i.name, L = I || V || h, ke = (e) => {
|
|
14
14
|
n || (A || U(e.target.value !== ""), ee?.(e));
|
|
15
15
|
}, De = (e) => {
|
|
16
16
|
!s && !n && K(!0), ne?.(e);
|
|
@@ -29,11 +29,11 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
|
|
|
29
29
|
H,
|
|
30
30
|
r,
|
|
31
31
|
N,
|
|
32
|
-
|
|
32
|
+
u
|
|
33
33
|
]);
|
|
34
34
|
const Y = O([Ce, st((e) => {
|
|
35
35
|
j.current = e instanceof HTMLTextAreaElement ? e : null;
|
|
36
|
-
}, [])]), { style: F, ...Pe } = i, f = !r && !d, { height: ct, minHeight: pt, maxHeight:
|
|
36
|
+
}, [])]), { style: F, ...Pe } = i, f = !r && !d, { height: ct, minHeight: pt, maxHeight: mt, paddingTop: ut, paddingBottom: ht, ...Te } = B ?? {}, $e = f ? {
|
|
37
37
|
...Te,
|
|
38
38
|
...lt()
|
|
39
39
|
} : d ? {
|
|
@@ -43,7 +43,7 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
|
|
|
43
43
|
} : B, { height: gt, minHeight: ft, maxHeight: xt, paddingTop: St, paddingBottom: yt, paddingLeft: bt, paddingRight: je, ...ze } = F ?? {}, Ke = f ? {
|
|
44
44
|
...ze,
|
|
45
45
|
...it({
|
|
46
|
-
paddingLeft:
|
|
46
|
+
paddingLeft: h ? 40 : 14,
|
|
47
47
|
paddingRight: je ?? He ?? (_ || g ? 40 : 14)
|
|
48
48
|
})
|
|
49
49
|
} : F;
|
|
@@ -62,8 +62,8 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
|
|
|
62
62
|
readOnly: n,
|
|
63
63
|
required: v,
|
|
64
64
|
autoComplete: Fe,
|
|
65
|
-
autoFocus:
|
|
66
|
-
value:
|
|
65
|
+
autoFocus: me,
|
|
66
|
+
value: u,
|
|
67
67
|
defaultValue: b,
|
|
68
68
|
"aria-invalid": c ? !0 : void 0,
|
|
69
69
|
"aria-label": i["aria-label"] ?? (i["aria-labelledby"] ? void 0 : typeof l == "string" && l !== "" ? l : void 0),
|
|
@@ -75,7 +75,7 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
|
|
|
75
75
|
T?.(e), e.defaultPrevented || i.onKeyDown?.(e);
|
|
76
76
|
} : void 0
|
|
77
77
|
}, J = a(S.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", S["Input--singleLine"]), "disabled:text-delta-300", n && "text-delta-800", Re), Je = !r && !d ? {
|
|
78
|
-
"data-start-adornment":
|
|
78
|
+
"data-start-adornment": h ? "true" : void 0,
|
|
79
79
|
"data-end-adornment": _ || g ? "true" : void 0
|
|
80
80
|
} : {};
|
|
81
81
|
return /* @__PURE__ */ y("div", {
|
|
@@ -83,7 +83,7 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
|
|
|
83
83
|
className: a("group relative inline-flex flex-col", ge),
|
|
84
84
|
onClick: ye,
|
|
85
85
|
style: {
|
|
86
|
-
width:
|
|
86
|
+
width: he ? "100%" : 235,
|
|
87
87
|
fontFamily: "Roboto, Helvetica, Arial, sans-serif",
|
|
88
88
|
letterSpacing: "0.00938em",
|
|
89
89
|
...k(xe),
|
|
@@ -97,23 +97,23 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
|
|
|
97
97
|
onMouseDown: _e,
|
|
98
98
|
...Be,
|
|
99
99
|
style: $e,
|
|
100
|
-
"data-testid": d ? `${
|
|
100
|
+
"data-testid": d ? `${m}-adornment-list` : `${m}-shell`,
|
|
101
101
|
children: [
|
|
102
|
-
|
|
102
|
+
h && /* @__PURE__ */ o("span", {
|
|
103
103
|
className: a("items-center text-delta-500", d ? "contents" : "absolute left-3 flex"),
|
|
104
104
|
children: w
|
|
105
105
|
}),
|
|
106
106
|
r ? /* @__PURE__ */ o("textarea", {
|
|
107
107
|
...G,
|
|
108
108
|
ref: Y,
|
|
109
|
-
"data-testid":
|
|
109
|
+
"data-testid": m,
|
|
110
110
|
rows: N ?? H ?? 2,
|
|
111
111
|
className: J
|
|
112
112
|
}) : /* @__PURE__ */ o("input", {
|
|
113
113
|
...G,
|
|
114
114
|
...Je,
|
|
115
115
|
ref: Y,
|
|
116
|
-
"data-testid":
|
|
116
|
+
"data-testid": m,
|
|
117
117
|
type: se,
|
|
118
118
|
className: J
|
|
119
119
|
}),
|
|
@@ -121,8 +121,8 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
|
|
|
121
121
|
type: "button",
|
|
122
122
|
tabIndex: -1,
|
|
123
123
|
"aria-label": "Clear",
|
|
124
|
-
"data-testid": `${
|
|
125
|
-
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",
|
|
124
|
+
"data-testid": `${m}-clear`,
|
|
125
|
+
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
126
|
onClick: (e) => {
|
|
127
127
|
e.stopPropagation(), e.preventDefault(), A || U(!1), ae?.();
|
|
128
128
|
},
|
|
@@ -170,7 +170,7 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
|
|
|
170
170
|
error: c,
|
|
171
171
|
disabled: s,
|
|
172
172
|
readOnly: n,
|
|
173
|
-
size:
|
|
173
|
+
size: ue
|
|
174
174
|
}), t?.inputLabel?.className),
|
|
175
175
|
style: {
|
|
176
176
|
...k(t?.inputLabel?.sx),
|
|
@@ -4,8 +4,8 @@ import { CloseIcon as f } from "../../icons/close-icon/CloseIcon.js";
|
|
|
4
4
|
import { StyledInputField as v } from "../input-field/StyledInputField.js";
|
|
5
5
|
import { useState as y } from "react";
|
|
6
6
|
import { jsx as t } from "react/jsx-runtime";
|
|
7
|
-
var F = ({ value: r, onClear: d, label:
|
|
8
|
-
const [m, l] = y(!1),
|
|
7
|
+
var F = ({ value: r, onClear: d, label: i, onFocus: c, onBlur: h, slotProps: o, ...a }) => {
|
|
8
|
+
const [m, l] = y(!1), n = m || r, s = typeof i == "string" ? i : void 0;
|
|
9
9
|
return /* @__PURE__ */ t("div", {
|
|
10
10
|
className: "relative w-full",
|
|
11
11
|
children: /* @__PURE__ */ t(v, {
|
|
@@ -13,8 +13,8 @@ var F = ({ value: r, onClear: d, label: a, onFocus: c, onBlur: h, slotProps: o,
|
|
|
13
13
|
variant: "outlined",
|
|
14
14
|
value: r,
|
|
15
15
|
reserveHelperText: !1,
|
|
16
|
-
label:
|
|
17
|
-
placeholder:
|
|
16
|
+
label: n ? i : void 0,
|
|
17
|
+
placeholder: n ? void 0 : s,
|
|
18
18
|
onFocus: (e) => {
|
|
19
19
|
l(!0), c?.(e);
|
|
20
20
|
},
|
|
@@ -24,7 +24,7 @@ var F = ({ value: r, onClear: d, label: a, onFocus: c, onBlur: h, slotProps: o,
|
|
|
24
24
|
slotProps: {
|
|
25
25
|
...o,
|
|
26
26
|
htmlInput: {
|
|
27
|
-
"aria-label":
|
|
27
|
+
"aria-label": n ? void 0 : s,
|
|
28
28
|
...o?.htmlInput,
|
|
29
29
|
style: {
|
|
30
30
|
overflow: "hidden",
|
|
@@ -39,7 +39,7 @@ var F = ({ value: r, onClear: d, label: a, onFocus: c, onBlur: h, slotProps: o,
|
|
|
39
39
|
type: "button",
|
|
40
40
|
"aria-label": "Clear",
|
|
41
41
|
"data-testid": "styled-search-clear-icon",
|
|
42
|
-
className: p("cursor-pointer rounded-full border-0 bg-delta-50", "flex items-center justify-center", "transform-gpu transition-all duration-300 ease-in-out", r ? "scale-100 opacity-100" : "pointer-events-none scale-75 opacity-0",
|
|
42
|
+
className: p("asma-pressable", "cursor-pointer rounded-full border-0 bg-delta-50", "flex items-center justify-center", "transform-gpu transition-all duration-300 ease-in-out", r ? "scale-100 opacity-100" : "pointer-events-none scale-75 opacity-0", a.readOnly && "-translate-x-[6.5px]"),
|
|
43
43
|
style: {
|
|
44
44
|
width: 24,
|
|
45
45
|
height: 24,
|
|
@@ -55,7 +55,7 @@ var F = ({ value: r, onClear: d, label: a, onFocus: c, onBlur: h, slotProps: o,
|
|
|
55
55
|
className: "pointer-events-none"
|
|
56
56
|
})
|
|
57
57
|
}) : null,
|
|
58
|
-
startAdornment:
|
|
58
|
+
startAdornment: n ? void 0 : /* @__PURE__ */ t("span", {
|
|
59
59
|
"data-testid": "styled-search-icon",
|
|
60
60
|
className: "flex items-center",
|
|
61
61
|
children: /* @__PURE__ */ t(u, {
|
|
@@ -68,10 +68,10 @@ var F = ({ value: r, onClear: d, label: a, onFocus: c, onBlur: h, slotProps: o,
|
|
|
68
68
|
...o?.input
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
-
...
|
|
71
|
+
...a,
|
|
72
72
|
sx: {
|
|
73
|
-
width:
|
|
74
|
-
...
|
|
73
|
+
width: a.fullWidth ? "100%" : "var(--dynamic-toolbar-search-width, 160px)",
|
|
74
|
+
...a.sx
|
|
75
75
|
}
|
|
76
76
|
})
|
|
77
77
|
});
|
|
@@ -134,7 +134,7 @@ var Ct = ({ dataTest: T, value: M, defaultValue: ne, onChange: $, error: le, err
|
|
|
134
134
|
I(!1), ye?.(e);
|
|
135
135
|
},
|
|
136
136
|
style: { minWidth: i && !R ? 105 : void 0 },
|
|
137
|
-
className: y("relative flex w-full items-center justify-between text-left outline-none", "h-10 rounded-lg border-0 px-3 text-base transition-colors", H ? "bg-gama-50" : "bg-transparent", Te, R && "min-w-0", n && "cursor-not-allowed", c && "pointer-events-none"),
|
|
137
|
+
className: y("relative flex w-full items-center justify-between text-left outline-none", "h-10 rounded-lg border-0 px-3 text-base transition-colors", "asma-touch-ready", H ? "bg-gama-50" : "bg-transparent", Te, R && "min-w-0", n && "cursor-not-allowed", c && "pointer-events-none"),
|
|
138
138
|
children: [
|
|
139
139
|
/* @__PURE__ */ l("span", {
|
|
140
140
|
className: y("min-w-0 flex-1 truncate", !i && "text-delta-500"),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { cn as c } from "../../../helpers/cn.js";
|
|
2
|
-
import { CheckIcon as
|
|
3
|
-
import { jsx as e, jsxs as
|
|
4
|
-
var f = ({ id: r, children: o, selected: t, active: l, disabled: a, className:
|
|
2
|
+
import { CheckIcon as m } from "../../icons/check-icon/CheckIcon.js";
|
|
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", {
|
|
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
|
-
onMouseDown: (
|
|
11
|
-
onClick: a ? void 0 :
|
|
12
|
-
className: c("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",
|
|
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),
|
|
13
13
|
children: [
|
|
14
14
|
l && /* @__PURE__ */ e("span", {
|
|
15
15
|
"aria-hidden": "true",
|
|
@@ -18,7 +18,7 @@ var f = ({ id: r, children: o, selected: t, active: l, disabled: a, className: n
|
|
|
18
18
|
}),
|
|
19
19
|
/* @__PURE__ */ e("span", {
|
|
20
20
|
className: "flex w-6 justify-center",
|
|
21
|
-
children: t && /* @__PURE__ */ e(
|
|
21
|
+
children: t && /* @__PURE__ */ e(m, {
|
|
22
22
|
width: 22,
|
|
23
23
|
height: 22,
|
|
24
24
|
className: "text-gama-500"
|