asma-ui-core 3.78.12 → 3.79.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.
Files changed (44) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/data-display/chip/StyledChip.js +41 -41
  3. package/dist/components/inputs/button/StyledButton.module.js +8 -8
  4. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.js +45 -42
  5. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.module.js +8 -8
  6. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +25 -17
  7. package/dist/components/inputs/field-styles.js +3 -3
  8. package/dist/components/inputs/radio-button/base-ui/StyledRadio.js +34 -31
  9. package/dist/components/inputs/radio-button/base-ui/StyledRadio.module.js +10 -10
  10. package/dist/components/inputs/select/StyledSelect.js +147 -135
  11. package/dist/components/inputs/select/StyledSelectItem.js +29 -19
  12. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +195 -162
  13. package/dist/components/inputs/switch/base-ui/StyledSwitch.module.js +4 -4
  14. package/dist/components/inputs/textarea/StyledTextarea.module.js +4 -4
  15. package/dist/components/navigation/link/StyledLink.js +11 -10
  16. package/dist/components/navigation/link/StyledLink.module.js +5 -5
  17. package/dist/components/navigation/menu/StyledMenuList.js +27 -19
  18. package/dist/components/navigation/tabs/StyledTab.js +7 -7
  19. package/dist/components/utils/accordion/base-ui/StyledAccordion.module.js +3 -3
  20. package/dist/datetime/shared-components/button/StyledButton.module.js +12 -12
  21. package/dist/src/components/inputs/select/StyledSelectItem.d.ts +3 -1
  22. package/dist/src/components/navigation/menu/StyledMenuList.d.ts +3 -1
  23. package/dist/src/table/components/TableRow.d.ts +2 -1
  24. package/dist/src/table/custom-features/focus-rows/types.d.ts +2 -2
  25. package/dist/src/table/hooks/useToggleMenuVisibility.hook.d.ts +14 -1
  26. package/dist/table/components/StyledTable.module.js +52 -52
  27. package/dist/table/components/TableRow.js +92 -80
  28. package/dist/table/components/TableRows.js +10 -8
  29. package/dist/table/components/table-footer/TablePagination.js +77 -64
  30. package/dist/table/components/table-footer/TableRowCountSelect.js +63 -44
  31. package/dist/table/components/table-header/TableHeader.js +72 -64
  32. package/dist/table/custom-features/focus-rows/FocusRowsFeature.js +4 -4
  33. package/dist/table/hooks/useToggleMenuVisibility.hook.js +77 -11
  34. package/dist/table/shared-components/button/StyledButton.module.js +9 -9
  35. package/dist/tailwind.config.d.ts +1 -0
  36. package/package.json +1 -1
  37. package/src/styles/_focus.scss +23 -0
  38. package/src/styles/color-variables/defaultTokens.css +2 -4
  39. package/src/styles/color-variables/fretexTokens.css +6 -7
  40. package/src/styles/color-variables/jadeTokens.css +2 -4
  41. package/src/styles/components-colors/inputVariables.css +2 -2
  42. package/tw-configs/twConfigs.json +1 -0
  43. package/dist/table/shared-components/CheckIcon.js +0 -12
  44. package/dist/table/shared-components/menu-item/index.js +0 -22
@@ -1,192 +1,204 @@
1
- import { cn as p } from "../../../helpers/cn.js";
2
- import { resolveSx as Ee } from "../../../helpers/sx.js";
3
- import { ChevronDownIcon as Ne } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
4
- import { CloseIcon as Pe } from "../../icons/close-icon/CloseIcon.js";
5
- import { TOP_LAYER_PROPS as _e, TOP_LAYER_RESET_STYLE as qe, getOpenModalDialogAncestor as Be, shouldUsePopoverTopLayer as He, useTopLayerRef as Ie } from "../../../hooks/useTopLayer.hook.js";
6
- import { HelperRow as Le } from "../../../helpers/HelperRow.js";
7
- import { useHelperRowBudget as Te } from "../../../helpers/useHelperRowBudget.js";
8
- import { useHelperSlot as Ue } from "../../../helpers/useHelperSlot.js";
9
- import { outlineClass as Ve } from "../field-styles.js";
10
- import { useFormControlContext as je } from "../../miscellaneous/FormControlContext.js";
11
- import { Children as N, cloneElement as Ke, isValidElement as P, useEffect as _, useId as Me, useMemo as Ye, useRef as $, useState as q } from "react";
12
- import { jsx as n, jsxs as B } from "react/jsx-runtime";
13
- import { FloatingPortal as ze, autoUpdate as Oe, flip as We, offset as $e, shift as Ge, size as Je, useClick as Qe, useDismiss as Xe, useFloating as Ze, useInteractions as et, useMergeRefs as G, useRole as tt } from "@floating-ui/react";
14
- var gt = ({ dataTest: H, value: I, defaultValue: J, onChange: L, error: Q, errorText: X, helperText: T, reserveHelperText: Z, expandHelperText: ee = !0, allowClear: U, disabled: te, readOnly: i, name: m, placeholder: w, displayEmpty: A, multiple: d, renderValue: V, fullWidth: re, className: oe, style: se, sx: ne, variant: le, children: v, MenuProps: ae, onFocus: ie, onBlur: ce, labelId: g }) => {
15
- const c = je(), j = `${H}-listbox`, b = le === "standard", u = Q ?? c?.error ?? !1, s = te ?? c?.disabled ?? !1, K = u ? X ?? T : T, { show: R, role: de } = Ue("StyledSelect", u, K, Z, i), M = Me(), { fieldRef: ue, rowRef: fe, rowStyle: pe } = Te(ee && R), [o, y] = q(!1), [h, S] = q(!1), [me, Y] = q(J), k = I !== void 0, r = k ? I : me, l = Array.isArray(r) ? r.length > 0 : r !== void 0 && r !== "" && r !== null, a = $(null), z = $(null), ge = (e) => {
16
- if (y(e), e) return;
17
- const t = document.activeElement;
18
- t && t !== document.body && !a.current?.contains(t) || z.current?.focus();
19
- }, { refs: f, floatingStyles: be, context: D } = Ze({
20
- open: o,
21
- onOpenChange: ge,
1
+ import { cn as h } from "../../../helpers/cn.js";
2
+ import { resolveSx as je } from "../../../helpers/sx.js";
3
+ import { ChevronDownIcon as Ue } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
4
+ import { CloseIcon as Ve } from "../../icons/close-icon/CloseIcon.js";
5
+ import { TOP_LAYER_PROPS as qe, TOP_LAYER_RESET_STYLE as Ye, getOpenModalDialogAncestor as re, shouldUsePopoverTopLayer as ze, useTopLayerRef as Ke } from "../../../hooks/useTopLayer.hook.js";
6
+ import { HelperRow as We } from "../../../helpers/HelperRow.js";
7
+ import { useHelperRowBudget as Ge } from "../../../helpers/useHelperRowBudget.js";
8
+ import { useHelperSlot as Je } from "../../../helpers/useHelperSlot.js";
9
+ import { outlineClass as Qe } from "../field-styles.js";
10
+ import { useFormControlContext as Xe } from "../../miscellaneous/FormControlContext.js";
11
+ import { Children as se, cloneElement as Ze, isValidElement as u, useEffect as B, useId as et, useRef as tt, useState as x } from "react";
12
+ import { jsx as l, jsxs as L } from "react/jsx-runtime";
13
+ import { FloatingPortal as ot, autoUpdate as rt, flip as st, offset as nt, shift as lt, size as it, useClick as at, useDismiss as ct, useFloating as dt, useInteractions as ut, useMergeRefs as ft, useRole as pt } from "@floating-ui/react";
14
+ var Ct = ({ dataTest: T, value: M, defaultValue: ne, onChange: $, error: le, errorText: ie, helperText: j, reserveHelperText: ae, expandHelperText: ce = !0, allowClear: U, disabled: de, readOnly: c, name: w, placeholder: S, displayEmpty: C, multiple: f, renderValue: V, fullWidth: ue, className: fe, style: pe, sx: me, variant: be, children: q, MenuProps: ge, onFocus: ye, onBlur: he, labelId: A }) => {
15
+ const d = Xe(), v = `${T}-listbox`, R = be === "standard", p = le ?? d?.error ?? !1, n = de ?? d?.disabled ?? !1, Y = p ? ie ?? j : j, { show: F, role: xe } = Je("StyledSelect", p, Y, ae, c), z = et(), { fieldRef: we, rowRef: Ae, rowStyle: ve } = Ge(ce && F), [r, K] = x(!1), [k, I] = x(!1), [m, b] = x(null), [Re, W] = x(ne), O = M !== void 0, o = O ? M : Re, i = Array.isArray(o) ? o.length > 0 : o !== void 0 && o !== "" && o !== null, g = se.toArray(q), G = (e) => f ? Array.isArray(o) && o.includes(e) : e === o, s = g.flatMap((e, t) => u(e) && !e.props.disabled ? [t] : []), E = g.findIndex((e) => u(e) && G(e.props.value)), ke = (e = 1) => s.includes(E) ? E : s[e === 1 ? 0 : s.length - 1] ?? null, D = m === null ? void 0 : `${v}-option-${m}`, P = tt(null), y = (e) => {
16
+ K(e), e || b(null);
17
+ }, { refs: { domReference: De, reference: J, setFloating: Se, setReference: Ce }, floatingStyles: Fe, context: N } = dt({
18
+ open: r,
19
+ onOpenChange: y,
22
20
  placement: "bottom-start",
23
21
  strategy: "fixed",
24
- whileElementsMounted: Oe,
22
+ whileElementsMounted: rt,
25
23
  middleware: [
26
- $e(0),
27
- We({ padding: 8 }),
28
- Ge({ padding: 8 }),
29
- Je({ apply({ rects: e, elements: t }) {
24
+ nt(0),
25
+ st({ padding: 8 }),
26
+ lt({ padding: 8 }),
27
+ it({ apply({ rects: e, elements: t }) {
30
28
  t.floating.style.minWidth = `${e.reference.width + 20}px`;
31
29
  } })
32
30
  ]
33
- }), { getReferenceProps: ye, getFloatingProps: he } = et([
34
- Qe(D, { enabled: !s && !i }),
35
- Xe(D),
36
- tt(D, { role: "listbox" })
37
- ]), xe = G([f.setReference, z]), O = Ye(() => o ? Be(f.reference.current) : void 0, [o, f]), F = He(O), we = G([Ie(f.setFloating, F), a]);
38
- _(() => c?.setFocused(o || h), [
39
- o,
40
- h,
41
- c
42
- ]), _(() => c?.setFilled(l || !!w || !!A), [
43
- l,
44
- w,
45
- A,
46
- c
47
- ]), _(() => {
48
- if (!o) return;
31
+ }), { getReferenceProps: Ie, getFloatingProps: Oe } = ut([
32
+ at(N, { enabled: !n && !c }),
33
+ ct(N),
34
+ pt(N, { role: "listbox" })
35
+ ]), [Q, X] = x(), _ = ze(Q), Ee = ft([Ke(Se, _), P]);
36
+ B(() => d?.setFocused(r || k), [
37
+ r,
38
+ k,
39
+ d
40
+ ]), B(() => d?.setFilled(i || !!S || !!C), [
41
+ i,
42
+ S,
43
+ C,
44
+ d
45
+ ]), B(() => {
46
+ if (!r) return;
49
47
  const e = requestAnimationFrame(() => {
50
- const t = a.current?.querySelector('[role="option"][aria-selected="true"]');
51
- t && (t.scrollIntoView({ block: "nearest" }), t.focus());
48
+ const t = D ? document.getElementById(D) : P.current?.querySelector('[role="option"][aria-selected="true"]');
49
+ t && P.current?.contains(t) && t.scrollIntoView({ block: "nearest" });
52
50
  });
53
51
  return () => cancelAnimationFrame(e);
54
- }, [o]);
55
- const Ae = (e, t) => {
56
- const x = d ? Array.isArray(r) && r.includes(e) ? r.filter((E) => E !== e) : [...Array.isArray(r) ? r : [], e] : e;
57
- k || Y(x), L?.({ target: {
58
- value: x,
59
- name: m
60
- } }, t), d || (y(!1), requestAnimationFrame(() => f.domReference.current?.focus()));
61
- }, W = () => {
62
- const e = d ? [] : "";
63
- k || Y(e), L?.({ target: {
52
+ }, [D, r]);
53
+ const Z = (e, t, a = !f) => {
54
+ const oe = f ? Array.isArray(o) && o.includes(e) ? o.filter(($e) => $e !== e) : [...Array.isArray(o) ? o : [], e] : e;
55
+ O || W(oe), $?.({ target: {
56
+ value: oe,
57
+ name: w
58
+ } }, t), a && (y(!1), requestAnimationFrame(() => De.current?.focus()));
59
+ }, ee = () => {
60
+ const e = f ? [] : "";
61
+ O || W(e), $?.({ target: {
64
62
  value: e,
65
- name: m
66
- } }, null), y(!1), S(!1);
67
- }, ve = N.map(v, (e) => {
68
- if (!P(e)) return e;
69
- const t = e.props.value;
70
- return Ke(e, {
71
- selected: d ? Array.isArray(r) && r.includes(t) : t === r,
72
- onClick: () => Ae(t, e.props.children)
63
+ name: w
64
+ } }, null), y(!1), I(!1);
65
+ }, Pe = se.map(q, (e, t) => {
66
+ if (!u(e)) return e;
67
+ const a = e.props.value;
68
+ return Ze(e, {
69
+ id: `${v}-option-${t}`,
70
+ active: t === m,
71
+ selected: G(a),
72
+ onClick: () => {
73
+ b(null), Z(a, e.props.children);
74
+ }
73
75
  });
74
- }), Re = N.toArray(v).find((e) => P(e) && e.props.value === r), Se = V ? V(r) : d && Array.isArray(r) ? N.toArray(v).filter((e) => P(e) && r.includes(e.props.value)).map((e) => {
76
+ }), Ne = g.find((e) => u(e) && e.props.value === o), _e = V ? V(o) : f && Array.isArray(o) ? g.filter((e) => u(e) && o.includes(e.props.value)).map((e) => {
75
77
  const t = e.props.children;
76
78
  return typeof t == "string" || typeof t == "number" ? String(t) : "";
77
- }).join(", ") : Re?.props.children, ke = (e) => {
78
- if ((e.key === "Backspace" || e.key === "Delete") && U && l && !s && !i) {
79
- e.preventDefault(), W();
79
+ }).join(", ") : Ne?.props.children, He = (e) => {
80
+ s.length !== 0 && b((t) => {
81
+ const a = s.indexOf(t ?? E ?? -1);
82
+ return a === -1 ? s[e === 1 ? 0 : s.length - 1] ?? null : s[Math.min(Math.max(a + e, 0), s.length - 1)] ?? null;
83
+ });
84
+ }, te = (e) => {
85
+ const t = m === null ? void 0 : g[m];
86
+ !u(t) || t.props.disabled || Z(t.props.value, t.props.children, e);
87
+ }, Be = (e = 1) => {
88
+ X(re(J.current)), b(ke(e)), K(!0);
89
+ }, Le = (e) => {
90
+ if ((e.key === "Backspace" || e.key === "Delete") && U && i && !n && !c) {
91
+ e.preventDefault(), ee();
80
92
  return;
81
93
  }
82
- e.key !== "ArrowDown" && e.key !== "ArrowUp" || s || i || (e.preventDefault(), y(!0), requestAnimationFrame(() => {
83
- if (a.current?.querySelector('[role="option"][aria-selected="true"]')) return;
84
- const t = a.current?.querySelectorAll('[role="option"]:not([aria-disabled="true"])');
85
- t?.length && t[e.key === "ArrowUp" ? t.length - 1 : 0]?.focus();
86
- }));
87
- }, De = (e) => {
88
- const t = a.current ? Array.from(a.current.querySelectorAll('[role="option"]:not([aria-disabled="true"])')) : [];
89
- if (t.length === 0) return;
90
- const x = t.findIndex((E) => E === document.activeElement);
91
- e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), t[(x + (e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus()) : (e.key === "Enter" || e.key === " ") && (e.preventDefault(), document.activeElement?.click());
92
- }, C = b && (o || h), Fe = s ? "text-delta-300" : C ? "text-gama-500" : "text-delta-800", Ce = s ? "text-delta-300" : "text-delta-700";
93
- return /* @__PURE__ */ B("div", {
94
- ref: ue,
95
- className: p("group relative inline-flex flex-col", re && "w-full", oe),
94
+ if (!(n || c)) {
95
+ if (!r && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
96
+ e.preventDefault(), Be(e.key === "ArrowDown" ? 1 : -1);
97
+ return;
98
+ }
99
+ r && (e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), He(e.key === "ArrowDown" ? 1 : -1)) : e.key === "Home" || e.key === "End" ? (e.preventDefault(), b(s[e.key === "Home" ? 0 : s.length - 1] ?? null)) : e.key === " " ? (e.preventDefault(), te(!1)) : e.key === "Enter" ? (e.preventDefault(), te(!0)) : e.key === "Escape" ? (e.preventDefault(), y(!1)) : e.key === "Tab" && y(!1));
100
+ }
101
+ }, H = R && (r || k), Te = n ? "text-delta-300" : H ? "text-gama-500" : "text-delta-800", Me = n ? "text-delta-300" : "text-delta-700";
102
+ return /* @__PURE__ */ L("div", {
103
+ ref: we,
104
+ className: h("group relative inline-flex flex-col", ue && "w-full", fe),
96
105
  style: {
97
106
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
98
- ...Ee(ne),
99
- ...se
107
+ ...je(me),
108
+ ...pe
100
109
  },
101
110
  children: [
102
- /* @__PURE__ */ B("button", {
103
- ref: xe,
111
+ /* @__PURE__ */ L("button", {
112
+ ref: Ce,
104
113
  type: "button",
105
- "data-testid": H,
106
- ...ye({ onKeyDown: ke }),
114
+ "data-testid": T,
115
+ ...Ie({
116
+ onClick: () => X(re(J.current)),
117
+ onKeyDown: Le
118
+ }),
107
119
  role: "combobox",
108
120
  "aria-haspopup": "listbox",
109
- "aria-expanded": o,
110
- "aria-controls": j,
111
- "aria-labelledby": g,
112
- "aria-label": g ? void 0 : m,
113
- "aria-invalid": u ? !0 : void 0,
114
- "aria-describedby": R ? M : void 0,
115
- "aria-disabled": s ? !0 : void 0,
116
- disabled: s,
121
+ "aria-expanded": r,
122
+ "aria-controls": v,
123
+ "aria-activedescendant": r ? D : void 0,
124
+ "aria-labelledby": A,
125
+ "aria-label": A ? void 0 : w,
126
+ "aria-invalid": p ? !0 : void 0,
127
+ "aria-describedby": F ? z : void 0,
128
+ "aria-disabled": n ? !0 : void 0,
129
+ disabled: n,
117
130
  onFocus: (e) => {
118
- S(!0), ie?.(e);
131
+ I(!0), ye?.(e);
119
132
  },
120
133
  onBlur: (e) => {
121
- S(!1), ce?.(e);
134
+ I(!1), he?.(e);
122
135
  },
123
- style: { minWidth: l && !b ? 105 : void 0 },
124
- className: p("relative flex w-full items-center justify-between text-left outline-none", "h-10 rounded-lg border-0 px-3 text-base transition-colors", C ? "bg-gama-50" : "bg-transparent", Fe, b && "min-w-0", s && "cursor-not-allowed", i && "pointer-events-none"),
136
+ style: { minWidth: i && !R ? 105 : void 0 },
137
+ className: h("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"),
125
138
  children: [
126
- /* @__PURE__ */ n("span", {
127
- className: p("min-w-0 flex-1 truncate", !l && "text-delta-500"),
128
- children: l || A ? Se : w
139
+ /* @__PURE__ */ l("span", {
140
+ className: h("min-w-0 flex-1 truncate", !i && "text-delta-500"),
141
+ children: i || C ? _e : S
129
142
  }),
130
- /* @__PURE__ */ B("span", {
143
+ /* @__PURE__ */ L("span", {
131
144
  className: "flex items-center gap-1",
132
- children: [U && l && !s && /* @__PURE__ */ n("span", {
145
+ children: [U && i && !n && /* @__PURE__ */ l("span", {
133
146
  "aria-hidden": "true",
134
147
  "data-testid": "select-clear-button",
135
148
  className: "flex items-center justify-center rounded-full p-[2px] hover:bg-gama-100",
136
149
  onClick: (e) => {
137
- e.stopPropagation(), W();
150
+ e.stopPropagation(), ee();
138
151
  },
139
- children: /* @__PURE__ */ n(Pe, {
152
+ children: /* @__PURE__ */ l(Ve, {
140
153
  width: 18,
141
154
  height: 18
142
155
  })
143
- }), /* @__PURE__ */ n(Ne, {
156
+ }), /* @__PURE__ */ l(Ue, {
144
157
  width: 24,
145
158
  height: 24,
146
- className: p("shrink-0 transition-transform", C ? "text-gama-500" : Ce, o && "rotate-180")
159
+ className: h("shrink-0 transition-transform", H ? "text-gama-500" : Me, r && "rotate-180")
147
160
  })]
148
161
  }),
149
- /* @__PURE__ */ n("div", { className: Ve({
150
- focused: o || h,
151
- error: u,
152
- disabled: s,
153
- readOnly: i,
154
- borderless: b
162
+ /* @__PURE__ */ l("div", { className: Qe({
163
+ focused: r || k,
164
+ error: p,
165
+ disabled: n,
166
+ readOnly: c,
167
+ borderless: R
155
168
  }) })
156
169
  ]
157
170
  }),
158
- o && /* @__PURE__ */ n(ze, {
159
- root: O,
160
- children: /* @__PURE__ */ n("ul", {
161
- ref: we,
162
- id: j,
171
+ r && /* @__PURE__ */ l(ot, {
172
+ root: Q,
173
+ children: /* @__PURE__ */ l("ul", {
174
+ ref: Ee,
175
+ ...Oe(),
176
+ id: v,
163
177
  role: "listbox",
164
- "aria-labelledby": g,
165
- "aria-label": g ? void 0 : m,
166
- ...F ? _e : {},
178
+ "aria-labelledby": A,
179
+ "aria-label": A ? void 0 : w,
180
+ ..._ ? qe : {},
167
181
  style: {
168
- ...F ? qe : {},
169
- ...be,
182
+ ..._ ? Ye : {},
183
+ ...Fe,
170
184
  fontFamily: "Roboto, Helvetica, Arial, sans-serif"
171
185
  },
172
- ...he(),
173
- onKeyDown: De,
174
- className: p("z-[1300] m-0 max-h-72 list-none overflow-auto rounded-lg border border-solid border-delta-300 bg-white px-0 py-2 shadow-[0px_2px_4px_0px_rgba(34,33,51,0.15)]", "[&>li:not(:last-child)]:border-0 [&>li:not(:last-child)]:border-b", "[&>li:not(:last-child)]:border-solid [&>li:not(:last-child)]:border-delta-200", ae?.className),
175
- children: ve
186
+ className: h("z-[1300] m-0 max-h-72 list-none overflow-auto rounded-lg border border-solid border-delta-300 bg-white px-0 py-2 shadow-[0px_2px_4px_0px_rgba(34,33,51,0.15)]", "[&>li:not(:last-child)]:border-0 [&>li:not(:last-child)]:border-b", "[&>li:not(:last-child)]:border-solid [&>li:not(:last-child)]:border-delta-200", ge?.className),
187
+ children: Pe
176
188
  })
177
189
  }),
178
- R && /* @__PURE__ */ n(Le, {
179
- ref: fe,
180
- id: M,
181
- role: de,
182
- error: u,
183
- message: K,
190
+ F && /* @__PURE__ */ l(We, {
191
+ ref: Ae,
192
+ id: z,
193
+ role: xe,
194
+ error: p,
195
+ message: Y,
184
196
  className: "m-0 mr-[14px] box-border items-center",
185
- style: pe
197
+ style: ve
186
198
  })
187
199
  ]
188
200
  });
189
201
  };
190
202
  export {
191
- gt as StyledSelect
203
+ Ct as StyledSelect
192
204
  };
@@ -1,25 +1,35 @@
1
- import { cn as l } from "../../../helpers/cn.js";
2
- import { CheckIcon as n } from "../../icons/check-icon/CheckIcon.js";
3
- import { jsx as a, jsxs as s } from "react/jsx-runtime";
4
- var x = ({ children: r, selected: e, disabled: t, className: o, onClick: i }) => /* @__PURE__ */ s("li", {
1
+ import { cn as c } from "../../../helpers/cn.js";
2
+ import { CheckIcon as d } from "../../icons/check-icon/CheckIcon.js";
3
+ import { jsx as e, jsxs as m } from "react/jsx-runtime";
4
+ var f = ({ id: r, children: o, selected: t, active: i, disabled: a, className: n, onClick: l }) => /* @__PURE__ */ m("li", {
5
+ id: r,
5
6
  role: "option",
6
- "aria-selected": e ? !0 : void 0,
7
- "aria-disabled": t ? !0 : void 0,
7
+ "aria-selected": t ? !0 : void 0,
8
+ "aria-disabled": a ? !0 : void 0,
8
9
  tabIndex: -1,
9
- onClick: t ? void 0 : i,
10
- className: l("flex items-center gap-1 px-2 py-2.5 text-base outline-none", t ? "cursor-not-allowed text-delta-300" : "cursor-pointer text-delta-800 hover:bg-delta-50", e && "bg-gama-50", o),
11
- children: [/* @__PURE__ */ a("span", {
12
- className: "flex w-6 justify-center",
13
- children: e && /* @__PURE__ */ a(n, {
14
- width: 22,
15
- height: 22,
16
- className: "text-gama-500"
10
+ onMouseDown: (s) => s.preventDefault(),
11
+ onClick: a ? void 0 : l,
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", n),
13
+ children: [
14
+ i && /* @__PURE__ */ e("span", {
15
+ "aria-hidden": "true",
16
+ "data-select-active-indicator": !0,
17
+ className: "pointer-events-none absolute inset-y-0 left-0 border-l border-solid border-focus-ring"
18
+ }),
19
+ /* @__PURE__ */ e("span", {
20
+ className: "flex w-6 justify-center",
21
+ children: t && /* @__PURE__ */ e(d, {
22
+ width: 22,
23
+ height: 22,
24
+ className: "text-gama-500"
25
+ })
26
+ }),
27
+ /* @__PURE__ */ e("span", {
28
+ className: "line-clamp-2 min-w-0 flex-1 break-words",
29
+ children: o
17
30
  })
18
- }), /* @__PURE__ */ a("span", {
19
- className: "line-clamp-2 min-w-0 flex-1 break-words",
20
- children: r
21
- })]
31
+ ]
22
32
  });
23
33
  export {
24
- x as StyledSelectItem
34
+ f as StyledSelectItem
25
35
  };