asma-ui-core 3.103.1 → 3.105.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/custom/module/header-layout/ToolbarActionGroup.js +6 -6
- package/dist/components/data-display/chip/StyledChip.js +48 -47
- package/dist/components/data-display/tooltip/StyledTooltip.js +62 -60
- package/dist/components/feedback/dialog/StyledDialog.js +94 -79
- package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +51 -51
- package/dist/components/inputs/button/StyledButton.module.js +13 -13
- package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +91 -82
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +152 -152
- package/dist/components/navigation/menu/StyledMenu.js +17 -16
- package/dist/components/navigation/menu/StyledMenu.module.js +5 -2
- package/dist/components/navigation/menu/StyledMenuList.js +50 -36
- package/dist/components/navigation/tabs/StyledTab.js +28 -19
- package/dist/components/navigation/tabs/StyledTabs.js +33 -33
- package/dist/helpers/focusable.js +3 -2
- package/dist/helpers/warnUnnamedDialog.js +6 -0
- package/dist/src/components/feedback/dialog/StyledDialog.d.ts +10 -2
- package/dist/src/components/feedback/dialog/dialog-footer/StyledDialogFooter.d.ts +5 -3
- package/dist/src/components/navigation/menu/StyledMenuList.d.ts +2 -1
- package/dist/src/components/navigation/tabs/StyledTab.d.ts +11 -1
- package/dist/src/helpers/focusable.d.ts +1 -0
- package/dist/src/helpers/warnUnnamedDialog.d.ts +5 -0
- package/dist/table/components/columns/action-column/components/RowActionMenu.js +60 -47
- package/dist/table/shared-components/button/StyledButton.module.js +11 -11
- package/package.json +1 -1
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { DotsVerticalIcon as
|
|
3
|
-
import { LoadingIcon as
|
|
4
|
-
import { StyledTooltip as
|
|
5
|
-
import { StyledButton as
|
|
6
|
-
import { StyledMenu as
|
|
7
|
-
import { StyledMenuItem as
|
|
8
|
-
import { useElementWidthPx as
|
|
9
|
-
import { useWidthRegistry as
|
|
10
|
-
import { planToolbarActions as
|
|
11
|
-
import { ToolbarActionButton as
|
|
12
|
-
import { useToolbarTranslations as
|
|
13
|
-
import { useMemo as
|
|
14
|
-
import { Fragment as
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
const
|
|
1
|
+
import { cn as $ } from "../../../../helpers/cn.js";
|
|
2
|
+
import { DotsVerticalIcon as z } from "../../../icons/dots-vertical-icon/DotsVerticalIcon.js";
|
|
3
|
+
import { LoadingIcon as F } from "../../../icons/loading-icon/LoadingIcon.js";
|
|
4
|
+
import { StyledTooltip as j } from "../../../data-display/tooltip/StyledTooltip.js";
|
|
5
|
+
import { StyledButton as y } from "../../../inputs/button/StyledButton.js";
|
|
6
|
+
import { StyledMenu as K } from "../../../navigation/menu/StyledMenu.js";
|
|
7
|
+
import { StyledMenuItem as D } from "../../../navigation/menu/StyledMenuItem.js";
|
|
8
|
+
import { useElementWidthPx as H } from "../../../../hooks/useElementWidthPx.js";
|
|
9
|
+
import { useWidthRegistry as U } from "../../../../hooks/useWidthRegistry.js";
|
|
10
|
+
import { planToolbarActions as G } from "../../../custom/module/header-layout/planToolbarActions.js";
|
|
11
|
+
import { ToolbarActionButton as V } from "../../../custom/module/header-layout/ToolbarActionGroup.js";
|
|
12
|
+
import { useToolbarTranslations as X } from "../../../custom/module/header-layout/useTranslations.js";
|
|
13
|
+
import { useMemo as C, useState as Y } from "react";
|
|
14
|
+
import { Fragment as N, jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
15
|
+
var q = 2, J = 470, Q = 8, k = "dialog-footer-right", M = "dialog-footer-more", O = (l, a) => `dialog-footer-action:${l}:${a ? "label" : "icon"}`;
|
|
16
|
+
function pe({ leftActions: l = [], leadingSlot: a, secondaryAction: s, primaryAction: d, fixed: I = !1, rounded: _ = !0, locale: A = "en", className: E, dataTest: c = "styled-dialog-footer" }) {
|
|
17
|
+
const P = X(A), { ref: R, widthPx: m } = H(), { register: f, widths: t } = U(), [p, h] = Y(null), g = m > 0 && m < J, W = g ? 8 : 16, o = C(() => l.filter((e) => !e.hidden).map((e) => e.icon == null && e.canHideLabel == null ? {
|
|
18
18
|
...e,
|
|
19
19
|
canHideLabel: !1
|
|
20
|
-
} : e), [l]),
|
|
20
|
+
} : e), [l]), B = t[k] ?? 0, x = s != null || d != null, v = Math.max(0, m - W * 2 - B - (x ? Q : 0)), u = C(() => o.length >= q ? {
|
|
21
21
|
inlineActions: [],
|
|
22
|
-
overflowActions:
|
|
22
|
+
overflowActions: o,
|
|
23
23
|
showMoreMenu: !0
|
|
24
|
-
} :
|
|
25
|
-
actions:
|
|
24
|
+
} : G({
|
|
25
|
+
actions: o,
|
|
26
26
|
availableWidth: v,
|
|
27
27
|
collapseLabels: !0,
|
|
28
28
|
resolveActionWidth: (e, i) => t[O(e.id, i)],
|
|
29
29
|
moreButtonWidthPx: t[M]
|
|
30
30
|
}), [
|
|
31
|
-
|
|
31
|
+
o,
|
|
32
32
|
v,
|
|
33
33
|
t
|
|
34
|
-
]), b = (e, i,
|
|
35
|
-
const T = /* @__PURE__ */ r(
|
|
36
|
-
dataTest: e.dataTest ?? `${c}-${
|
|
34
|
+
]), b = (e, i, L) => {
|
|
35
|
+
const T = !!e.disabled || !!e.loading, w = /* @__PURE__ */ r(y, {
|
|
36
|
+
dataTest: e.dataTest ?? `${c}-${L}`,
|
|
37
37
|
variant: e.variant ?? i,
|
|
38
38
|
error: e.tone === "danger",
|
|
39
39
|
size: "medium",
|
|
40
40
|
type: e.type ?? "button",
|
|
41
|
-
disabled:
|
|
41
|
+
"aria-disabled": T || void 0,
|
|
42
42
|
startIcon: e.icon,
|
|
43
|
-
endIcon: e.loading ? /* @__PURE__ */ r(
|
|
43
|
+
endIcon: e.loading ? /* @__PURE__ */ r(F, {
|
|
44
44
|
width: 20,
|
|
45
45
|
height: 20
|
|
46
46
|
}) : e.endIcon,
|
|
47
|
-
onClick: e.onClick,
|
|
47
|
+
onClick: T ? (S) => S.preventDefault() : e.onClick,
|
|
48
48
|
"aria-label": e.ariaLabel,
|
|
49
49
|
"aria-busy": e.loading,
|
|
50
50
|
children: e.label
|
|
51
51
|
});
|
|
52
|
-
return e.tooltip ? /* @__PURE__ */ r(
|
|
52
|
+
return e.tooltip ? /* @__PURE__ */ r(j, {
|
|
53
53
|
arrow: !0,
|
|
54
54
|
title: e.tooltip,
|
|
55
55
|
children: /* @__PURE__ */ r("span", {
|
|
56
56
|
className: "inline-flex",
|
|
57
|
-
children:
|
|
57
|
+
children: w
|
|
58
58
|
})
|
|
59
|
-
}) :
|
|
59
|
+
}) : w;
|
|
60
60
|
};
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
ref:
|
|
61
|
+
return /* @__PURE__ */ n("div", {
|
|
62
|
+
ref: R,
|
|
63
63
|
"data-testid": c,
|
|
64
|
-
className:
|
|
64
|
+
className: $("flex items-center justify-end self-stretch border-0 border-t border-solid border-delta-200 bg-white", g ? "gap-2 p-2" : "gap-4 p-4", _ && "rounded-b-lg", I && "sticky bottom-0 z-[1]", E),
|
|
65
65
|
children: [/* @__PURE__ */ r("div", {
|
|
66
66
|
className: "flex shrink-0 flex-nowrap items-center gap-2",
|
|
67
|
-
children: a ?? /* @__PURE__ */
|
|
67
|
+
children: a ?? /* @__PURE__ */ n(N, { children: [u.inlineActions.map(({ action: e, showLabel: i }) => /* @__PURE__ */ r("span", {
|
|
68
68
|
ref: f(O(e.id, i)),
|
|
69
69
|
className: "inline-flex shrink-0",
|
|
70
|
-
children: /* @__PURE__ */ r(
|
|
70
|
+
children: /* @__PURE__ */ r(V, {
|
|
71
71
|
action: e,
|
|
72
72
|
showLabel: i
|
|
73
73
|
})
|
|
74
|
-
}, e.id)), u.showMoreMenu && /* @__PURE__ */
|
|
74
|
+
}, e.id)), u.showMoreMenu && /* @__PURE__ */ n(N, { children: [/* @__PURE__ */ r("span", {
|
|
75
75
|
ref: f(M),
|
|
76
76
|
className: "inline-flex shrink-0",
|
|
77
|
-
children: /* @__PURE__ */ r(
|
|
77
|
+
children: /* @__PURE__ */ r(y, {
|
|
78
78
|
dataTest: `${c}-more`,
|
|
79
79
|
variant: "outlined",
|
|
80
80
|
size: "medium",
|
|
81
81
|
type: "button",
|
|
82
|
-
onClick: (e) =>
|
|
83
|
-
"aria-label":
|
|
82
|
+
onClick: (e) => h(e.currentTarget),
|
|
83
|
+
"aria-label": P.more,
|
|
84
84
|
"aria-haspopup": "menu",
|
|
85
|
-
"aria-expanded":
|
|
86
|
-
startIcon: /* @__PURE__ */ r(
|
|
85
|
+
"aria-expanded": p != null,
|
|
86
|
+
startIcon: /* @__PURE__ */ r(z, {
|
|
87
87
|
width: 24,
|
|
88
88
|
height: 24
|
|
89
89
|
})
|
|
90
90
|
})
|
|
91
|
-
}), /* @__PURE__ */ r(
|
|
92
|
-
anchorEl:
|
|
93
|
-
open:
|
|
94
|
-
onClose: () =>
|
|
91
|
+
}), /* @__PURE__ */ r(K, {
|
|
92
|
+
anchorEl: p,
|
|
93
|
+
open: p != null,
|
|
94
|
+
onClose: () => h(null),
|
|
95
95
|
anchorOrigin: {
|
|
96
96
|
vertical: "top",
|
|
97
97
|
horizontal: "left"
|
|
@@ -100,10 +100,10 @@ function me({ leftActions: l = [], leadingSlot: a, secondaryAction: s, primaryAc
|
|
|
100
100
|
vertical: "bottom",
|
|
101
101
|
horizontal: "left"
|
|
102
102
|
},
|
|
103
|
-
children: u.overflowActions.map((e) => /* @__PURE__ */ r(
|
|
103
|
+
children: u.overflowActions.map((e) => /* @__PURE__ */ r(D, {
|
|
104
104
|
disabled: e.disabled,
|
|
105
105
|
onClick: () => {
|
|
106
|
-
|
|
106
|
+
h(null), e.onClick();
|
|
107
107
|
},
|
|
108
108
|
children: /* @__PURE__ */ r("span", {
|
|
109
109
|
className: e.tone === "danger" ? "text-beta-500" : "text-delta-700",
|
|
@@ -113,8 +113,8 @@ function me({ leftActions: l = [], leadingSlot: a, secondaryAction: s, primaryAc
|
|
|
113
113
|
})] })] })
|
|
114
114
|
}), x && /* @__PURE__ */ r("span", {
|
|
115
115
|
className: "flex min-w-px flex-1 flex-nowrap items-center justify-end",
|
|
116
|
-
children: /* @__PURE__ */
|
|
117
|
-
ref: f(
|
|
116
|
+
children: /* @__PURE__ */ n("span", {
|
|
117
|
+
ref: f(k),
|
|
118
118
|
className: "flex shrink-0 flex-nowrap items-center gap-2",
|
|
119
119
|
children: [s && b(s, "outlined", "secondary"), d && b(d, "contained", "primary")]
|
|
120
120
|
})
|
|
@@ -122,5 +122,5 @@ function me({ leftActions: l = [], leadingSlot: a, secondaryAction: s, primaryAc
|
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
export {
|
|
125
|
-
|
|
125
|
+
pe as StyledDialogFooter
|
|
126
126
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
"asma-ui-core-button": "_asma-ui-core-
|
|
3
|
-
contained:
|
|
4
|
-
common:
|
|
5
|
-
medium:
|
|
6
|
-
small:
|
|
7
|
-
large:
|
|
8
|
-
error:
|
|
9
|
-
outlined:
|
|
10
|
-
text:
|
|
11
|
-
textGray:
|
|
12
|
-
textWhite:
|
|
1
|
+
var a = "_contained_1fdad_6", _ = "_common_1fdad_6", d = "_medium_1fdad_55", t = "_small_1fdad_62", e = "_large_1fdad_69", r = "_error_1fdad_81", o = "_outlined_1fdad_156", f = "_text_1fdad_306", m = "_textGray_1fdad_456", l = "_textWhite_1fdad_531", u = {
|
|
2
|
+
"asma-ui-core-button": "_asma-ui-core-button_1fdad_1",
|
|
3
|
+
contained: a,
|
|
4
|
+
common: _,
|
|
5
|
+
medium: d,
|
|
6
|
+
small: t,
|
|
7
|
+
large: e,
|
|
8
|
+
error: r,
|
|
9
|
+
outlined: o,
|
|
10
|
+
text: f,
|
|
11
|
+
textGray: m,
|
|
12
|
+
textWhite: l
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
u as default
|
|
16
16
|
};
|
|
@@ -1,65 +1,65 @@
|
|
|
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 [
|
|
15
|
-
const t =
|
|
16
|
-
return t == null ? "" : typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? String(t) : e == null ? "" :
|
|
17
|
-
},
|
|
18
|
-
S(!0),
|
|
19
|
-
}, [
|
|
20
|
-
S(!1),
|
|
21
|
-
}, [
|
|
22
|
-
if (o && u) return /* @__PURE__ */ l(
|
|
23
|
-
const C = y ? `${
|
|
1
|
+
import { cn as q } from "../../../../helpers/cn.js";
|
|
2
|
+
import { LoadingIcon as te } from "../../../icons/loading-icon/LoadingIcon.js";
|
|
3
|
+
import { CheckIcon as le } from "../../../icons/check-icon/CheckIcon.js";
|
|
4
|
+
import { PlusIconCircle as ae } from "../../../icons/plus-icon-circle/PlusIconCircle.js";
|
|
5
|
+
import { StyledChip as z } from "../../../data-display/chip/StyledChip.js";
|
|
6
|
+
import { StyledCheckbox as re } from "../../checkbox/base-ui/StyledCheckbox.js";
|
|
7
|
+
import { StyledTooltip as E } from "../../../data-display/tooltip/StyledTooltip.js";
|
|
8
|
+
import { StyledInputField as oe } from "../../input-field/StyledInputField.js";
|
|
9
|
+
import { StyledSelectAutocomplete as ie } from "../../select-autocomplete/StyledSelectAutocomplete.js";
|
|
10
|
+
import { DynamicInteractiveChipGroup as ne } from "./DynamicInteractiveChipGroup.js";
|
|
11
|
+
import { createElement as F, forwardRef as se, useCallback as h, useState as de } from "react";
|
|
12
|
+
import { Fragment as K, jsx as l, jsxs as T } from "react/jsx-runtime";
|
|
13
|
+
var Ce = se((O, H) => {
|
|
14
|
+
const [_, S] = de(!1), { options: k, dataTest: f, value: g, readOnly: u, multiple: o, required: R, onChange: x, size: G, rowSize: v = "compact", title: y, noOptionsText: W, placeholder: J, disabled: I, helperText: M, disableHelperText: N, error: A, valueKey: P = "value", labelKey: Q = "label", renderLabel: s, getOptionTooltip: V, startAdornment: U, autocompleteProps: i, loading: m, maxTags: X, onFocus: Y, onBlur: Z } = O, d = (e) => typeof e == "object" ? e?.[Q]?.toString() ?? "" : e?.toString() ?? "", b = h((e) => typeof e == "object" ? e?.[P] : e, [P]), $ = h((e, t) => b(e) === b(t), [b]), w = (e) => {
|
|
15
|
+
const t = b(e);
|
|
16
|
+
return t == null ? "" : typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? String(t) : e == null ? "" : d(e);
|
|
17
|
+
}, B = h((e) => {
|
|
18
|
+
S(!0), i?.onOpen?.(e);
|
|
19
|
+
}, [i]), ee = h((e, t) => {
|
|
20
|
+
S(!1), i?.onClose?.(e, t);
|
|
21
|
+
}, [i]);
|
|
22
|
+
if (o && u) return /* @__PURE__ */ l(ne, { ...O });
|
|
23
|
+
const C = y ? `${f}-title` : void 0;
|
|
24
24
|
return /* @__PURE__ */ T("div", {
|
|
25
25
|
className: "flex w-full flex-col gap-y-1",
|
|
26
26
|
children: [y && /* @__PURE__ */ l("span", {
|
|
27
27
|
id: C,
|
|
28
28
|
className: "text-base font-semibold text-delta-800",
|
|
29
29
|
children: y
|
|
30
|
-
}), /* @__PURE__ */ l(
|
|
31
|
-
open:
|
|
32
|
-
onOpen:
|
|
33
|
-
onClose:
|
|
30
|
+
}), /* @__PURE__ */ l(ie, {
|
|
31
|
+
open: _,
|
|
32
|
+
onOpen: B,
|
|
33
|
+
onClose: ee,
|
|
34
34
|
disableCloseOnSelect: o,
|
|
35
|
-
dataTest:
|
|
35
|
+
dataTest: f,
|
|
36
36
|
disabled: !!I || !!m,
|
|
37
|
-
noOptionsText:
|
|
37
|
+
noOptionsText: W,
|
|
38
38
|
loading: m,
|
|
39
39
|
readOnly: u,
|
|
40
40
|
value: g,
|
|
41
|
-
size:
|
|
41
|
+
size: G,
|
|
42
42
|
rowSize: v,
|
|
43
|
-
disableClearable:
|
|
43
|
+
disableClearable: R,
|
|
44
44
|
options: k,
|
|
45
45
|
fullWidth: !0,
|
|
46
46
|
classes: { listbox: "max-h-[300px]" },
|
|
47
|
-
getOptionLabel:
|
|
47
|
+
getOptionLabel: i?.getOptionLabel ?? d,
|
|
48
48
|
onChange: (e, t) => {
|
|
49
49
|
x(t);
|
|
50
50
|
},
|
|
51
51
|
filterSelectedOptions: !1,
|
|
52
|
-
isOptionEqualToValue:
|
|
52
|
+
isOptionEqualToValue: i?.isOptionEqualToValue ?? $,
|
|
53
53
|
autoHeight: !0,
|
|
54
54
|
multiple: o,
|
|
55
55
|
renderValue: o ? (e) => {
|
|
56
56
|
if (!Array.isArray(e)) return null;
|
|
57
|
-
const t = e,
|
|
58
|
-
return [...
|
|
59
|
-
dataTest: `${w(
|
|
57
|
+
const t = e, c = X ?? k.length, r = t.slice(0, c), n = t.length - c;
|
|
58
|
+
return [...r.map((a) => /* @__PURE__ */ l(z, {
|
|
59
|
+
dataTest: `${w(a)}-chip`,
|
|
60
60
|
readOnly: u,
|
|
61
61
|
variant: "outlined",
|
|
62
|
-
label:
|
|
62
|
+
label: s ? s(a) : d(a),
|
|
63
63
|
classes: {
|
|
64
64
|
root: "h-fit w-fit min-h-[32px]",
|
|
65
65
|
label: "block whitespace-normal"
|
|
@@ -67,102 +67,111 @@ var ve = oe((O, E) => {
|
|
|
67
67
|
disabled: !!I || !!m,
|
|
68
68
|
deleteButtonTabIndex: -1,
|
|
69
69
|
onDelete: () => {
|
|
70
|
-
Array.isArray(g) && x(g.filter((
|
|
70
|
+
Array.isArray(g) && x(g.filter((p) => !$(p, a)));
|
|
71
71
|
}
|
|
72
|
-
}, w(
|
|
72
|
+
}, w(a))), n > 0 ? /* @__PURE__ */ l(z, {
|
|
73
73
|
dataTest: "remaining-count-tag-chip",
|
|
74
|
-
label: `+${
|
|
74
|
+
label: `+${n}`,
|
|
75
75
|
variant: "outlined",
|
|
76
76
|
tabIndex: -1,
|
|
77
|
-
onClick:
|
|
77
|
+
onClick: B
|
|
78
78
|
}, "remaining-count") : null];
|
|
79
79
|
} : void 0,
|
|
80
|
-
popupIcon: m ? /* @__PURE__ */ l(
|
|
80
|
+
popupIcon: m ? /* @__PURE__ */ l(te, {
|
|
81
81
|
height: 24,
|
|
82
82
|
width: 24
|
|
83
|
-
}) : o ? /* @__PURE__ */ l(
|
|
83
|
+
}) : o ? /* @__PURE__ */ l(ae, {
|
|
84
84
|
height: 24,
|
|
85
85
|
width: 24
|
|
86
86
|
}) : void 0,
|
|
87
|
-
renderOption: (e, t,
|
|
88
|
-
const
|
|
87
|
+
renderOption: (e, t, c) => {
|
|
88
|
+
const r = typeof t == "object" ? !!t?.disabled : !1, n = V ? V(t) : null, a = r && n ? `${e.id}-reason` : void 0, p = a && e["data-active"] !== void 0 ? !0 : void 0, j = a && /* @__PURE__ */ l("span", {
|
|
89
|
+
id: a,
|
|
90
|
+
className: "sr-only",
|
|
91
|
+
"aria-hidden": "true",
|
|
92
|
+
children: n
|
|
93
|
+
});
|
|
89
94
|
if (o) {
|
|
90
|
-
const
|
|
91
|
-
return /* @__PURE__ */
|
|
95
|
+
const L = c.selected;
|
|
96
|
+
return /* @__PURE__ */ F("li", {
|
|
92
97
|
...e,
|
|
93
98
|
role: "option",
|
|
94
|
-
"aria-selected":
|
|
99
|
+
"aria-selected": L,
|
|
95
100
|
key: e.id,
|
|
96
|
-
onClick:
|
|
97
|
-
className:
|
|
98
|
-
"aria-disabled":
|
|
99
|
-
|
|
101
|
+
onClick: r ? void 0 : e.onClick,
|
|
102
|
+
className: q("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", r && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
|
|
103
|
+
"aria-disabled": r,
|
|
104
|
+
"aria-describedby": a
|
|
105
|
+
}, j, e["data-active"] !== void 0 && /* @__PURE__ */ l("span", {
|
|
100
106
|
"aria-hidden": "true",
|
|
101
107
|
className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
|
|
102
|
-
}), /* @__PURE__ */ l(
|
|
108
|
+
}), /* @__PURE__ */ l(E, {
|
|
103
109
|
arrow: !0,
|
|
104
|
-
title:
|
|
105
|
-
|
|
106
|
-
|
|
110
|
+
title: n,
|
|
111
|
+
open: p,
|
|
112
|
+
children: /* @__PURE__ */ T(K, { children: [/* @__PURE__ */ l(re, {
|
|
113
|
+
disabled: r,
|
|
107
114
|
dataTest: `${w(t)}-checkbox`,
|
|
108
115
|
size: "small",
|
|
109
116
|
decorative: !0,
|
|
110
117
|
className: "min-w-[36px]",
|
|
111
|
-
checked:
|
|
112
|
-
}),
|
|
118
|
+
checked: L
|
|
119
|
+
}), s ? s(t) : /* @__PURE__ */ l("span", {
|
|
113
120
|
className: "line-clamp-2 h-fit min-w-0 flex-1 break-words text-base text-delta-800",
|
|
114
|
-
children:
|
|
121
|
+
children: d(t)
|
|
115
122
|
})] })
|
|
116
123
|
}));
|
|
117
124
|
}
|
|
118
|
-
const
|
|
119
|
-
return /* @__PURE__ */
|
|
125
|
+
const D = c.selected;
|
|
126
|
+
return /* @__PURE__ */ F("li", {
|
|
120
127
|
...e,
|
|
121
128
|
role: "option",
|
|
122
|
-
"aria-selected":
|
|
129
|
+
"aria-selected": D,
|
|
123
130
|
key: e.id,
|
|
124
|
-
className:
|
|
125
|
-
onClick:
|
|
126
|
-
"aria-disabled":
|
|
127
|
-
|
|
131
|
+
className: q("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", r && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
|
|
132
|
+
onClick: r ? void 0 : e.onClick,
|
|
133
|
+
"aria-disabled": r,
|
|
134
|
+
"aria-describedby": a
|
|
135
|
+
}, j, e["data-active"] !== void 0 && /* @__PURE__ */ l("span", {
|
|
128
136
|
"aria-hidden": "true",
|
|
129
137
|
className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
|
|
130
|
-
}), /* @__PURE__ */ l(
|
|
138
|
+
}), /* @__PURE__ */ l(E, {
|
|
131
139
|
arrow: !0,
|
|
132
|
-
title:
|
|
133
|
-
|
|
140
|
+
title: n,
|
|
141
|
+
open: p,
|
|
142
|
+
children: /* @__PURE__ */ T(K, { children: [/* @__PURE__ */ l("span", {
|
|
134
143
|
className: "w-5 min-w-5",
|
|
135
|
-
children:
|
|
144
|
+
children: D && /* @__PURE__ */ l(le, {
|
|
136
145
|
className: "size-5 min-h-5 min-w-5 text-gama-500",
|
|
137
146
|
height: 20,
|
|
138
147
|
width: 20
|
|
139
148
|
})
|
|
140
|
-
}),
|
|
149
|
+
}), s ? s(t) : /* @__PURE__ */ l("span", {
|
|
141
150
|
className: "line-clamp-2 min-w-0 flex-1 break-words text-base text-delta-800",
|
|
142
|
-
children:
|
|
151
|
+
children: d(t)
|
|
143
152
|
})] })
|
|
144
153
|
}));
|
|
145
154
|
},
|
|
146
|
-
renderInput: (e) => /* @__PURE__ */ l(
|
|
147
|
-
dataTest: `${
|
|
155
|
+
renderInput: (e) => /* @__PURE__ */ l(oe, {
|
|
156
|
+
dataTest: `${f}-input-field`,
|
|
148
157
|
...e,
|
|
149
|
-
inputRef:
|
|
158
|
+
inputRef: H,
|
|
150
159
|
error: A,
|
|
151
|
-
helperText: N ? void 0 :
|
|
160
|
+
helperText: N ? void 0 : M,
|
|
152
161
|
reserveHelperText: N ? !1 : A !== void 0,
|
|
153
162
|
variant: "outlined",
|
|
154
163
|
label: "",
|
|
155
|
-
placeholder:
|
|
164
|
+
placeholder: J,
|
|
156
165
|
readOnly: u,
|
|
157
|
-
onFocus:
|
|
158
|
-
onBlur:
|
|
166
|
+
onFocus: Y,
|
|
167
|
+
onBlur: Z,
|
|
159
168
|
onKeyDown: e.onKeyDown,
|
|
160
169
|
autoComplete: "off",
|
|
161
170
|
slotProps: {
|
|
162
171
|
...e.slotProps,
|
|
163
172
|
input: {
|
|
164
173
|
...e.slotProps?.input ?? {},
|
|
165
|
-
startAdornment:
|
|
174
|
+
startAdornment: U ?? e.slotProps?.input?.startAdornment
|
|
166
175
|
},
|
|
167
176
|
htmlInput: {
|
|
168
177
|
...e.slotProps?.htmlInput ?? {},
|
|
@@ -170,10 +179,10 @@ var ve = oe((O, E) => {
|
|
|
170
179
|
}
|
|
171
180
|
}
|
|
172
181
|
}),
|
|
173
|
-
...
|
|
182
|
+
...i
|
|
174
183
|
})]
|
|
175
184
|
});
|
|
176
185
|
});
|
|
177
186
|
export {
|
|
178
|
-
|
|
187
|
+
Ce as DynamicSelectAutocomplete
|
|
179
188
|
};
|