asma-ui-core 3.73.1 → 3.74.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,49 +1,43 @@
1
- import { ErrorOutlineIcon as H } from "../../../icons/error-outline-icon/ErrorOutlineIcon.js";
2
- import { RadioGroupContext as y } from "./RadioGroupContext.js";
3
- import { useHelperAlertRole as B } from "../../../../helpers/useHelperAlertRole.js";
4
- import { warnMissingErrorMessage as D } from "../../../../helpers/warnMissingErrorMessage.js";
5
- import u from "clsx";
6
- import { forwardRef as P, useId as f, useMemo as U, useState as V } from "react";
7
- import { jsx as x, jsxs as g } from "react/jsx-runtime";
8
- var W = P(({ value: i, defaultValue: h, onValueChange: v, disabled: r, readOnly: o, dataTest: N, error: e, errorText: R, helperText: n, reserveHelperText: w = !0, children: S, name: b, ...t }, G) => {
9
- const l = f(), I = f(), a = b ?? I, c = i !== void 0, [M, j] = V(h ?? null), m = c ? i : M, k = (p) => {
10
- o || (c || j(p), v?.(p));
11
- }, A = U(() => ({
1
+ import { cn as u } from "../../../../helpers/cn.js";
2
+ import { RadioGroupContext as D } from "./RadioGroupContext.js";
3
+ import { HelperRow as M } from "../../../../helpers/HelperRow.js";
4
+ import { useHelperSlot as P } from "../../../../helpers/useHelperSlot.js";
5
+ import { forwardRef as U, useId as f, useMemo as V, useState as k } from "react";
6
+ import { jsx as v, jsxs as q } from "react/jsx-runtime";
7
+ var Q = U(({ value: s, defaultValue: R, onValueChange: x, disabled: r, readOnly: e, dataTest: N, error: o, errorText: S, helperText: l, reserveHelperText: h, children: w, name: g, ...t }, b) => {
8
+ const i = f(), G = f(), a = g ?? G, n = s !== void 0, [H, j] = k(R ?? null), c = n ? s : H, C = (p) => {
9
+ e || (n || j(p), x?.(p));
10
+ }, I = V(() => ({
12
11
  name: a,
13
- value: m,
12
+ value: c,
14
13
  disabled: r,
15
- onSelect: k
14
+ onSelect: C
16
15
  }), [
17
16
  a,
18
- m,
17
+ c,
19
18
  r
20
- ]), s = e ? R ?? n : n, d = !o && (w || s != null || !!e);
21
- D("StyledRadioGroup", e, s);
22
- const C = B(e), E = /\bflex-(?:row|col)\b/.test(t.className ?? "");
23
- return /* @__PURE__ */ g("div", {
19
+ ]), m = o ? S ?? l : l, { show: d, role: y } = P("StyledRadioGroup", o, m, h, e), A = /\bflex-(?:row|col)\b/.test(t.className ?? "");
20
+ return /* @__PURE__ */ q("div", {
24
21
  ...t,
25
- ref: G,
22
+ ref: b,
26
23
  role: "radiogroup",
27
24
  "data-testid": N,
28
- "aria-describedby": d ? l : void 0,
29
- "aria-invalid": e,
30
- "aria-readonly": o ? !0 : void 0,
31
- className: u("flex items-start", !E && "flex-col", o && "pointer-events-none", t.className),
32
- children: [/* @__PURE__ */ x(y.Provider, {
33
- value: A,
34
- children: S
35
- }), d && /* @__PURE__ */ g("p", {
36
- id: l,
37
- role: C,
38
- className: u("m-0 flex min-h-[24px] items-center gap-1 pt-1 text-sm leading-5 tracking-[0.03333em]", e ? "font-medium text-error-500" : "text-delta-600"),
39
- children: [e && /* @__PURE__ */ x(H, {
40
- width: 20,
41
- height: 20,
42
- className: "min-w-5 shrink-0"
43
- }), s]
25
+ "aria-describedby": d ? i : void 0,
26
+ "aria-invalid": o,
27
+ "aria-readonly": e ? !0 : void 0,
28
+ className: u("flex items-start", !A && "flex-col", e && "pointer-events-none", t.className),
29
+ children: [/* @__PURE__ */ v(D.Provider, {
30
+ value: I,
31
+ children: w
32
+ }), d && /* @__PURE__ */ v(M, {
33
+ id: i,
34
+ role: y,
35
+ error: o,
36
+ message: m,
37
+ className: u("m-0 items-center", o && "font-medium")
44
38
  })]
45
39
  });
46
40
  });
47
41
  export {
48
- W as StyledRadioGroup
42
+ Q as StyledRadioGroup
49
43
  };
@@ -1,53 +1,50 @@
1
- import { cn as u } from "../../../helpers/cn.js";
2
- import { resolveSx as Ce } from "../../../helpers/sx.js";
1
+ import { cn as p } from "../../../helpers/cn.js";
2
+ import { resolveSx as Ee } from "../../../helpers/sx.js";
3
3
  import { ChevronDownIcon as Ne } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
4
4
  import { CloseIcon as Pe } from "../../icons/close-icon/CloseIcon.js";
5
- import { ErrorOutlineIcon as _e } from "../../icons/error-outline-icon/ErrorOutlineIcon.js";
6
- import { TOP_LAYER_PROPS as qe, TOP_LAYER_RESET_STYLE as Ie, getOpenModalDialogAncestor as Be, shouldUsePopoverTopLayer as Le, useTopLayerRef as Me } from "../../../hooks/useTopLayer.hook.js";
7
- import { useHelperAlertRole as Te } from "../../../helpers/useHelperAlertRole.js";
8
- import { useHelperRowBudget as Ue } from "../../../helpers/useHelperRowBudget.js";
9
- import { warnMissingErrorMessage as Ve } from "../../../helpers/warnMissingErrorMessage.js";
10
- import { outlineClass as je } from "../field-styles.js";
11
- import { useFormControlContext as He } from "../../miscellaneous/FormControlContext.js";
12
- import { Children as _, cloneElement as Ke, isValidElement as q, useEffect as I, useId as Oe, useMemo as Ye, useRef as $, useState as B } from "react";
13
- import { jsx as n, jsxs as w } from "react/jsx-runtime";
14
- import { FloatingPortal as ze, autoUpdate as We, flip as $e, offset as Ge, shift as Je, size as Qe, useClick as Xe, useDismiss as Ze, useFloating as et, useInteractions as tt, useMergeRefs as G, useRole as rt } from "@floating-ui/react";
15
- var ht = ({ dataTest: L, value: M, defaultValue: J, onChange: T, error: Q, errorText: X, helperText: U, reserveHelperText: Z = !0, expandHelperText: ee = !0, allowClear: V, disabled: te, readOnly: c, name: p, placeholder: A, displayEmpty: v, multiple: f, renderValue: j, fullWidth: re, className: oe, style: se, sx: ne, variant: le, children: R, MenuProps: ie, onFocus: ae, onBlur: ce, labelId: g }) => {
16
- const d = He(), H = `${L}-listbox`, K = Oe(), y = le === "standard", l = Q ?? d?.error ?? !1, s = te ?? d?.disabled ?? !1, k = l ? X ?? U : U, S = !c && (Z || k != null || l);
17
- Ve("StyledSelect", l, k);
18
- const de = Te(l), { fieldRef: ue, rowRef: fe, rowStyle: me } = Ue(ee && S), [o, h] = B(!1), [b, D] = B(!1), [pe, O] = B(J), F = M !== void 0, r = F ? M : pe, i = Array.isArray(r) ? r.length > 0 : r !== void 0 && r !== "" && r !== null, a = $(null), Y = $(null), ge = (e) => {
19
- if (h(e), e) return;
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: u, 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`, y = le === "standard", d = Q ?? c?.error ?? !1, s = te ?? c?.disabled ?? !1, K = d ? X ?? T : T, { show: R, role: ue } = Ue("StyledSelect", d, K, Z, i), M = Me(), { fieldRef: de, rowRef: fe, rowStyle: pe } = Te(ee && R), [o, b] = 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 (b(e), e) return;
20
17
  const t = document.activeElement;
21
- t && t !== document.body && !a.current?.contains(t) || Y.current?.focus();
22
- }, { refs: m, floatingStyles: ye, context: E } = et({
18
+ t && t !== document.body && !a.current?.contains(t) || z.current?.focus();
19
+ }, { refs: f, floatingStyles: ye, context: D } = Ze({
23
20
  open: o,
24
21
  onOpenChange: ge,
25
22
  placement: "bottom-start",
26
23
  strategy: "fixed",
27
- whileElementsMounted: We,
24
+ whileElementsMounted: Oe,
28
25
  middleware: [
29
- Ge(4),
30
- $e({ padding: 8 }),
31
- Je({ padding: 8 }),
32
- Qe({ apply({ rects: e, elements: t }) {
26
+ $e(4),
27
+ We({ padding: 8 }),
28
+ Ge({ padding: 8 }),
29
+ Je({ apply({ rects: e, elements: t }) {
33
30
  t.floating.style.minWidth = `${e.reference.width + 20}px`;
34
31
  } })
35
32
  ]
36
- }), { getReferenceProps: he, getFloatingProps: be } = tt([
37
- Xe(E, { enabled: !s && !c }),
38
- Ze(E),
39
- rt(E, { role: "listbox" })
40
- ]), xe = G([m.setReference, Y]), z = Ye(() => o ? Be(m.reference.current) : void 0, [o, m]), C = Le(z), we = G([Me(m.setFloating, C), a]);
41
- I(() => d?.setFocused(o || b), [
33
+ }), { getReferenceProps: be, 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), [
42
39
  o,
43
- b,
44
- d
45
- ]), I(() => d?.setFilled(i || !!A || !!v), [
46
- i,
40
+ h,
41
+ c
42
+ ]), _(() => c?.setFilled(l || !!w || !!A), [
43
+ l,
44
+ w,
47
45
  A,
48
- v,
49
- d
50
- ]), I(() => {
46
+ c
47
+ ]), _(() => {
51
48
  if (!o) return;
52
49
  const e = requestAnimationFrame(() => {
53
50
  const t = a.current?.querySelector('[role="option"][aria-selected="true"]');
@@ -56,33 +53,33 @@ var ht = ({ dataTest: L, value: M, defaultValue: J, onChange: T, error: Q, error
56
53
  return () => cancelAnimationFrame(e);
57
54
  }, [o]);
58
55
  const Ae = (e, t) => {
59
- const x = f ? Array.isArray(r) && r.includes(e) ? r.filter((P) => P !== e) : [...Array.isArray(r) ? r : [], e] : e;
60
- F || O(x), T?.({ target: {
56
+ const x = u ? Array.isArray(r) && r.includes(e) ? r.filter((E) => E !== e) : [...Array.isArray(r) ? r : [], e] : e;
57
+ k || Y(x), L?.({ target: {
61
58
  value: x,
62
- name: p
63
- } }, t), f || (h(!1), requestAnimationFrame(() => m.domReference.current?.focus()));
59
+ name: m
60
+ } }, t), u || (b(!1), requestAnimationFrame(() => f.domReference.current?.focus()));
64
61
  }, W = () => {
65
- const e = f ? [] : "";
66
- F || O(e), T?.({ target: {
62
+ const e = u ? [] : "";
63
+ k || Y(e), L?.({ target: {
67
64
  value: e,
68
- name: p
69
- } }, null), h(!1), D(!1);
70
- }, ve = _.map(R, (e) => {
71
- if (!q(e)) return e;
65
+ name: m
66
+ } }, null), b(!1), S(!1);
67
+ }, ve = N.map(v, (e) => {
68
+ if (!P(e)) return e;
72
69
  const t = e.props.value;
73
70
  return Ke(e, {
74
- selected: f ? Array.isArray(r) && r.includes(t) : t === r,
71
+ selected: u ? Array.isArray(r) && r.includes(t) : t === r,
75
72
  onClick: () => Ae(t, e.props.children)
76
73
  });
77
- }), Re = _.toArray(R).find((e) => q(e) && e.props.value === r), ke = j ? j(r) : f && Array.isArray(r) ? _.toArray(R).filter((e) => q(e) && r.includes(e.props.value)).map((e) => {
74
+ }), Re = N.toArray(v).find((e) => P(e) && e.props.value === r), Se = V ? V(r) : u && Array.isArray(r) ? N.toArray(v).filter((e) => P(e) && r.includes(e.props.value)).map((e) => {
78
75
  const t = e.props.children;
79
76
  return typeof t == "string" || typeof t == "number" ? String(t) : "";
80
- }).join(", ") : Re?.props.children, Se = (e) => {
81
- if ((e.key === "Backspace" || e.key === "Delete") && V && i && !s && !c) {
77
+ }).join(", ") : Re?.props.children, ke = (e) => {
78
+ if ((e.key === "Backspace" || e.key === "Delete") && U && l && !s && !i) {
82
79
  e.preventDefault(), W();
83
80
  return;
84
81
  }
85
- e.key !== "ArrowDown" && e.key !== "ArrowUp" || s || c || (e.preventDefault(), h(!0), requestAnimationFrame(() => {
82
+ e.key !== "ArrowDown" && e.key !== "ArrowUp" || s || i || (e.preventDefault(), b(!0), requestAnimationFrame(() => {
86
83
  if (a.current?.querySelector('[role="option"][aria-selected="true"]')) return;
87
84
  const t = a.current?.querySelectorAll('[role="option"]:not([aria-disabled="true"])');
88
85
  t?.length && t[e.key === "ArrowUp" ? t.length - 1 : 0]?.focus();
@@ -90,49 +87,49 @@ var ht = ({ dataTest: L, value: M, defaultValue: J, onChange: T, error: Q, error
90
87
  }, De = (e) => {
91
88
  const t = a.current ? Array.from(a.current.querySelectorAll('[role="option"]:not([aria-disabled="true"])')) : [];
92
89
  if (t.length === 0) return;
93
- const x = t.findIndex((P) => P === document.activeElement);
90
+ const x = t.findIndex((E) => E === document.activeElement);
94
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());
95
- }, N = y && (o || b), Fe = s ? "text-delta-300" : N ? "text-gama-500" : "text-delta-800", Ee = s ? "text-delta-300" : "text-delta-700";
96
- return /* @__PURE__ */ w("div", {
97
- ref: ue,
98
- className: u("group relative inline-flex flex-col", re && "w-full", oe),
92
+ }, C = y && (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: de,
95
+ className: p("group relative inline-flex flex-col", re && "w-full", oe),
99
96
  style: {
100
97
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
101
- ...Ce(ne),
98
+ ...Ee(ne),
102
99
  ...se
103
100
  },
104
101
  children: [
105
- /* @__PURE__ */ w("button", {
102
+ /* @__PURE__ */ B("button", {
106
103
  ref: xe,
107
104
  type: "button",
108
- "data-testid": L,
109
- ...he({ onKeyDown: Se }),
105
+ "data-testid": H,
106
+ ...be({ onKeyDown: ke }),
110
107
  role: "combobox",
111
108
  "aria-haspopup": "listbox",
112
109
  "aria-expanded": o,
113
- "aria-controls": H,
110
+ "aria-controls": j,
114
111
  "aria-labelledby": g,
115
- "aria-label": g ? void 0 : p,
116
- "aria-invalid": l ? !0 : void 0,
117
- "aria-describedby": S ? K : void 0,
112
+ "aria-label": g ? void 0 : m,
113
+ "aria-invalid": d ? !0 : void 0,
114
+ "aria-describedby": R ? M : void 0,
118
115
  "aria-disabled": s ? !0 : void 0,
119
116
  disabled: s,
120
117
  onFocus: (e) => {
121
- D(!0), ae?.(e);
118
+ S(!0), ie?.(e);
122
119
  },
123
120
  onBlur: (e) => {
124
- D(!1), ce?.(e);
121
+ S(!1), ce?.(e);
125
122
  },
126
- style: { minWidth: i && !y ? 105 : void 0 },
127
- className: u("relative flex w-full items-center justify-between text-left outline-none", "h-10 rounded-lg border-0 px-3 text-base transition-colors", N ? "bg-gama-50" : "bg-transparent", Fe, y && "min-w-0", s && "cursor-not-allowed", c && "pointer-events-none"),
123
+ style: { minWidth: l && !y ? 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, y && "min-w-0", s && "cursor-not-allowed", i && "pointer-events-none"),
128
125
  children: [
129
126
  /* @__PURE__ */ n("span", {
130
- className: u("min-w-0 flex-1 truncate", !i && "text-delta-500"),
131
- children: i || v ? ke : A
127
+ className: p("min-w-0 flex-1 truncate", !l && "text-delta-500"),
128
+ children: l || A ? Se : w
132
129
  }),
133
- /* @__PURE__ */ w("span", {
130
+ /* @__PURE__ */ B("span", {
134
131
  className: "flex items-center gap-1",
135
- children: [V && i && !s && /* @__PURE__ */ n("span", {
132
+ children: [U && l && !s && /* @__PURE__ */ n("span", {
136
133
  "aria-hidden": "true",
137
134
  "data-testid": "select-clear-button",
138
135
  className: "flex items-center justify-center rounded-full p-[2px] hover:bg-gama-100",
@@ -146,53 +143,50 @@ var ht = ({ dataTest: L, value: M, defaultValue: J, onChange: T, error: Q, error
146
143
  }), /* @__PURE__ */ n(Ne, {
147
144
  width: 24,
148
145
  height: 24,
149
- className: u("shrink-0 transition-transform", N ? "text-gama-500" : Ee, o && "rotate-180")
146
+ className: p("shrink-0 transition-transform", C ? "text-gama-500" : Ce, o && "rotate-180")
150
147
  })]
151
148
  }),
152
- /* @__PURE__ */ n("div", { className: je({
153
- focused: o || b,
154
- error: l,
149
+ /* @__PURE__ */ n("div", { className: Ve({
150
+ focused: o || h,
151
+ error: d,
155
152
  disabled: s,
156
- readOnly: c,
153
+ readOnly: i,
157
154
  borderless: y
158
155
  }) })
159
156
  ]
160
157
  }),
161
158
  o && /* @__PURE__ */ n(ze, {
162
- root: z,
159
+ root: O,
163
160
  children: /* @__PURE__ */ n("ul", {
164
161
  ref: we,
165
- id: H,
162
+ id: j,
166
163
  role: "listbox",
167
164
  "aria-labelledby": g,
168
- "aria-label": g ? void 0 : p,
169
- ...C ? qe : {},
165
+ "aria-label": g ? void 0 : m,
166
+ ...F ? _e : {},
170
167
  style: {
171
- ...C ? Ie : {},
168
+ ...F ? qe : {},
172
169
  ...ye,
173
170
  fontFamily: "Roboto, Helvetica, Arial, sans-serif"
174
171
  },
175
- ...be(),
172
+ ...he(),
176
173
  onKeyDown: De,
177
- className: u("z-[1300] m-0 max-h-72 list-none overflow-auto rounded-lg border border-solid border-delta-300 bg-white px-0 py-1 shadow-[0px_2px_4px_0px_rgba(34,33,51,0.15)]", ie?.className),
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)]", ae?.className),
178
175
  children: ve
179
176
  })
180
177
  }),
181
- S && /* @__PURE__ */ w("div", {
178
+ R && /* @__PURE__ */ n(Le, {
182
179
  ref: fe,
183
- id: K,
184
- role: de,
185
- className: u("m-0 mr-[14px] box-border flex min-h-[24px] items-center gap-1 pt-1 text-sm leading-5 tracking-[0.03333em]", l ? "text-error-500" : "text-delta-600"),
186
- style: me,
187
- children: [l && /* @__PURE__ */ n(_e, {
188
- width: 20,
189
- height: 20,
190
- className: "min-w-5 shrink-0"
191
- }), /* @__PURE__ */ n("span", { children: k })]
180
+ id: M,
181
+ role: ue,
182
+ error: d,
183
+ message: K,
184
+ className: "m-0 mr-[14px] box-border items-center",
185
+ style: pe
192
186
  })
193
187
  ]
194
188
  });
195
189
  };
196
190
  export {
197
- ht as StyledSelect
191
+ gt as StyledSelect
198
192
  };
@@ -1,23 +1,23 @@
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 p = ({ children: r, selected: e, disabled: t, className: o, onClick: i }) => /* @__PURE__ */ s("li", {
1
+ import { cn as i } from "../../../helpers/cn.js";
2
+ import { CheckIcon as s } from "../../icons/check-icon/CheckIcon.js";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ var p = ({ children: o, selected: e, disabled: r, className: a, onClick: l }) => /* @__PURE__ */ n("li", {
5
5
  role: "option",
6
6
  "aria-selected": e ? !0 : void 0,
7
- "aria-disabled": t ? !0 : void 0,
7
+ "aria-disabled": r ? !0 : void 0,
8
8
  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", {
9
+ onClick: r ? void 0 : l,
10
+ className: i("flex items-center gap-1 px-2 py-2.5 text-base outline-none", "border-0 border-b border-solid border-delta-200 last:border-b-0", r ? "cursor-not-allowed text-delta-300" : "cursor-pointer text-delta-800 hover:bg-delta-50", e && "bg-gama-50", a),
11
+ children: [/* @__PURE__ */ t("span", {
12
12
  className: "flex w-6 justify-center",
13
- children: e && /* @__PURE__ */ a(n, {
13
+ children: e && /* @__PURE__ */ t(s, {
14
14
  width: 22,
15
15
  height: 22,
16
16
  className: "text-gama-500"
17
17
  })
18
- }), /* @__PURE__ */ a("span", {
19
- className: "min-w-0 flex-1 truncate",
20
- children: r
18
+ }), /* @__PURE__ */ t("span", {
19
+ className: "line-clamp-2 min-w-0 flex-1 break-words",
20
+ children: o
21
21
  })]
22
22
  });
23
23
  export {