asma-ui-core 3.92.3 → 3.93.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.
@@ -1,140 +1,140 @@
1
1
  import { cn as E } from "../../../helpers/cn.js";
2
- import { ChevronDownIcon as et } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
- import { CloseIcon as tt } from "../../icons/close-icon/CloseIcon.js";
4
- import { CheckIcon as lt } from "../../icons/check-icon/CheckIcon.js";
5
- import { PlusIconCircle as rt } from "../../icons/plus-icon-circle/PlusIconCircle.js";
6
- import { StyledChip as ot } from "../../data-display/chip/StyledChip.js";
7
- import { StyledCheckbox as ae } from "../checkbox/base-ui/StyledCheckbox.js";
8
- import { TOP_LAYER_PROPS as st, TOP_LAYER_RESET_STYLE as nt, getOpenModalDialogAncestor as at, shouldUsePopoverTopLayer as it, useTopLayerRef as ct } from "../../../hooks/useTopLayer.hook.js";
9
- import { LoadingIcon as dt } from "../../../table/shared-components/LoadingIcon.js";
10
- import z from "./StyledSelectAutocomplete.module.js";
11
- import { useEffect as ie, useMemo as W, useRef as ce, useState as v } from "react";
2
+ import { ChevronDownIcon as rt } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
+ import { CloseIcon as ot } from "../../icons/close-icon/CloseIcon.js";
4
+ import { CheckIcon as st } from "../../icons/check-icon/CheckIcon.js";
5
+ import { PlusIconCircle as nt } from "../../icons/plus-icon-circle/PlusIconCircle.js";
6
+ import { StyledChip as at } from "../../data-display/chip/StyledChip.js";
7
+ import { StyledCheckbox as ie } from "../checkbox/base-ui/StyledCheckbox.js";
8
+ import { TOP_LAYER_PROPS as it, TOP_LAYER_RESET_STYLE as ct, getOpenModalDialogAncestor as dt, shouldUsePopoverTopLayer as ut, useTopLayerRef as pt } from "../../../hooks/useTopLayer.hook.js";
9
+ import { LoadingIcon as ft } from "../../../table/shared-components/LoadingIcon.js";
10
+ import W from "./StyledSelectAutocomplete.module.js";
11
+ import { useEffect as ce, useMemo as U, useRef as de, useState as D } from "react";
12
12
  import { jsx as s, jsxs as I } from "react/jsx-runtime";
13
- import { FloatingPortal as ut, autoUpdate as pt, flip as ft, offset as mt, shift as ht, size as bt, useDismiss as gt, useFloating as xt, useInteractions as wt, useMergeRefs as de, useRole as yt } from "@floating-ui/react";
14
- var kt = (l) => typeof l == "object" && l !== null && "label" in l ? String(l.label) : String(l), Dt = (l) => typeof l == "object" && l !== null && "disabled" in l && !!l.disabled;
15
- function Ft({ dataTest: l, options: p, renderInput: ue, value: A, onChange: N, getOptionLabel: pe, getOptionKey: C, isOptionEqualToValue: H, renderOption: U, renderValue: V, filterOptions: _, loading: B, loadingText: fe = "Loading…", noOptionsText: me = "No options", disabled: M, readOnly: g, error: he, helperText: be, size: ge = "small", disableClearable: xe, disableCloseOnSelect: we, popupIcon: ye, autoHeight: ke, multiple: De, allowSelectAll: T, selectAllLabel: ve = "Select all", fullWidth: Ie, classes: Ae, inputValue: R, onInputChange: Ne, open: Y, onOpen: Ce, onClose: Me, className: Re, wrapperClassName: Se, getOptionDisabled: Pe, slotProps: q }) {
16
- const r = De === !0, d = pe ?? kt, S = (e, t) => H ? H(e, t) : e === t, [$e, Le] = v(!1), a = Y ?? $e, u = (e) => {
17
- e && (g || M) || (Y === void 0 && Le(e), e ? Ce?.() : (x(null), Me?.()));
18
- }, [Ee, G] = v(""), b = R ?? Ee, P = (e, t, n) => {
19
- R === void 0 && G(t), Ne?.(e, t, n);
20
- }, [o, x] = v(null), J = `${l}-listbox`, Q = ce([]), X = ce(null), [_e, Fe] = v(null), [Z, Oe] = v(null), i = r ? Array.isArray(A) ? A : [] : [], w = r ? null : A ?? null, K = !r && w !== null ? d(w) : "";
21
- ie(() => {
22
- R !== void 0 || r || G(K);
13
+ import { FloatingPortal as mt, autoUpdate as ht, flip as bt, offset as gt, shift as xt, size as yt, useDismiss as wt, useFloating as kt, useInteractions as vt, useMergeRefs as ue, useRole as Dt } from "@floating-ui/react";
14
+ var It = (l) => typeof l == "object" && l !== null && "label" in l ? String(l.label) : String(l), At = (l) => typeof l == "object" && l !== null && "disabled" in l && !!l.disabled;
15
+ function zt({ dataTest: l, options: b, renderInput: pe, value: A, onChange: N, getOptionLabel: fe, getOptionKey: S, isOptionEqualToValue: V, renderOption: B, renderValue: T, filterOptions: _, loading: Y, loadingText: me = "Loading…", noOptionsText: he = "No options", disabled: C, readOnly: g, error: be, helperText: ge, size: xe = "small", disableClearable: ye, disableCloseOnSelect: we, popupIcon: ke, autoHeight: ve, multiple: De, allowSelectAll: F, selectAllLabel: Ie = "Select all", fullWidth: Ae, classes: Ne, inputValue: M, onInputChange: Se, open: q, onOpen: Ce, onClose: Me, className: Re, wrapperClassName: Pe, getOptionDisabled: $e, slotProps: G }) {
16
+ const r = De === !0, d = fe ?? It, R = (e, t) => V ? V(e, t) : e === t, [Le, Ee] = D(!1), a = q ?? Le, u = (e) => {
17
+ e && (g || C) || (q === void 0 && Ee(e), e ? Ce?.() : (x(null), Me?.()));
18
+ }, [_e, J] = D(""), h = M ?? _e, P = (e, t, n) => {
19
+ M === void 0 && J(t), Se?.(e, t, n);
20
+ }, [o, x] = D(null), Q = `${l}-listbox`, X = de([]), Z = de(null), [Fe, Oe] = D(null), [K, je] = D(null), i = r ? Array.isArray(A) ? A : [] : [], y = r ? null : A ?? null, ee = !r && y !== null ? d(y) : "";
21
+ ce(() => {
22
+ M !== void 0 || r || J(ee);
23
23
  }, [
24
- R,
24
+ M,
25
25
  r,
26
- K
26
+ ee
27
27
  ]);
28
- const F = (e) => r ? i.some((t) => S(e, t)) : w !== null && S(e, w), $ = (e) => Pe?.(e) ?? Dt(e), ee = W(() => {
29
- const e = [...p];
30
- if (_) return _(e, { inputValue: b });
31
- const t = !r && w !== null ? d(w).toLowerCase() : null;
32
- if (!b || b.toLowerCase() === t) return e;
33
- const n = b.toLowerCase();
34
- return e.filter((m) => d(m).toLowerCase().includes(n));
28
+ const O = (e) => r ? i.some((t) => R(e, t)) : y !== null && R(e, y), $ = (e) => $e?.(e) ?? At(e), te = U(() => {
29
+ const e = [...b];
30
+ if (_) return _(e, { inputValue: h });
31
+ const t = !r && y !== null ? d(y).toLowerCase() : null;
32
+ if (!h || h.toLowerCase() === t) return e;
33
+ const n = h.toLowerCase();
34
+ return e.filter((f) => d(f).toLowerCase().includes(n));
35
35
  }, [
36
- p,
37
36
  b,
37
+ h,
38
38
  _,
39
39
  A
40
- ]), f = W(() => ee.slice(0, 100), [ee]), te = f.flatMap((e, t) => $(e) ? [] : [t]), c = T && r ? [-1, ...te] : te, k = f.findIndex(F);
41
- ie(() => {
40
+ ]), p = U(() => te.slice(0, 100), [te]), le = p.flatMap((e, t) => $(e) ? [] : [t]), c = F && r ? [-1, ...le] : le, k = p.findIndex(O);
41
+ ce(() => {
42
42
  if (!a) return;
43
43
  const e = o ?? k;
44
44
  if (e < 0) return;
45
- const t = requestAnimationFrame(() => Q.current[e]?.scrollIntoView({ block: "nearest" }));
45
+ const t = requestAnimationFrame(() => X.current[e]?.scrollIntoView({ block: "nearest" }));
46
46
  return () => cancelAnimationFrame(t);
47
47
  }, [
48
48
  o,
49
49
  a,
50
- Z,
50
+ K,
51
51
  k
52
52
  ]);
53
- const { refs: L, floatingStyles: je, context: le } = xt({
53
+ const { refs: L, floatingStyles: ze, context: re } = kt({
54
54
  open: a,
55
55
  onOpenChange: u,
56
56
  placement: "bottom-start",
57
57
  strategy: "fixed",
58
- whileElementsMounted: pt,
58
+ whileElementsMounted: ht,
59
59
  middleware: [
60
- mt(0),
61
- ft({ padding: 8 }),
62
- ht({ padding: 8 }),
63
- bt({ apply({ rects: e, availableHeight: t }) {
64
- Fe(e.reference.width), Oe(ke ? t - 8 : Math.min(t - 8, 320));
60
+ gt(0),
61
+ bt({ padding: 8 }),
62
+ xt({ padding: 8 }),
63
+ yt({ apply({ rects: e, availableHeight: t }) {
64
+ Oe(e.reference.width), je(ve ? t - 8 : Math.min(t - 8, 320));
65
65
  } })
66
66
  ]
67
- }), { getReferenceProps: ze, getFloatingProps: We, getItemProps: He } = wt([gt(le), yt(le, { role: "listbox" })]), Ue = de([L.setReference]), re = W(() => a ? at(L.reference.current) : void 0, [a, L]), O = it(re), Ve = de([ct(L.setFloating, O)]), Be = (e) => c.includes(k) ? k : c[e === 1 ? 0 : c.length - 1] ?? null, Te = (e) => {
67
+ }), { getReferenceProps: He, getFloatingProps: We, getItemProps: Ue } = vt([wt(re), Dt(re, { role: "listbox" })]), Ve = ue([L.setReference]), oe = U(() => a ? dt(L.reference.current) : void 0, [a, L]), j = ut(oe), Be = ue([pt(L.setFloating, j)]), Te = (e) => c.includes(k) ? k : c[e === 1 ? 0 : c.length - 1] ?? null, Ye = (e) => {
68
68
  c.length !== 0 && x((t) => {
69
69
  const n = c.indexOf(t ?? k);
70
70
  return n === -1 ? c[e === 1 ? 0 : c.length - 1] ?? null : c[Math.min(Math.max(n + e, 0), c.length - 1)] ?? null;
71
71
  });
72
- }, D = (e, t, n = !r || !we) => {
72
+ }, v = (e, t, n = !r || !we) => {
73
73
  if (r) {
74
- const m = i.some((h) => S(t, h)), y = m ? i.filter((h) => !S(t, h)) : [...i, t];
75
- N?.(e, y, m ? "removeOption" : "selectOption", { option: t }), P(e, "", "reset"), n && u(!1);
74
+ const f = i.some((m) => R(t, m)), w = f ? i.filter((m) => !R(t, m)) : [...i, t];
75
+ N?.(e, w, f ? "removeOption" : "selectOption", { option: t }), P(e, "", "reset"), n && u(!1);
76
76
  } else
77
77
  N?.(e, t, "selectOption", { option: t }), P(e, d(t), "reset"), n && u(!1);
78
- }, oe = (e) => {
78
+ }, se = (e) => {
79
79
  N?.(e, r ? [] : null, "clear", void 0), P(e, "", "clear");
80
- }, j = (e) => {
81
- const t = p.length > 0 && i.length === p.length;
82
- N?.(e, t ? [] : p, t ? "clear" : "selectOption", void 0);
83
- }, Ye = (e) => {
84
- if (e.key === "Backspace" && b === "" && se) {
80
+ }, z = (e) => {
81
+ const t = b.length > 0 && i.length === b.length;
82
+ N?.(e, t ? [] : b, t ? "clear" : "selectOption", void 0);
83
+ }, qe = (e) => {
84
+ if (e.key === "Backspace" && h === "" && ne) {
85
85
  const t = i[i.length - 1];
86
- r ? t !== void 0 && D(e, t, !1) : oe(e);
86
+ r ? t !== void 0 && v(e, t, !1) : se(e);
87
87
  } else if (e.key === "Enter" && !a)
88
88
  e.preventDefault(), u(!0);
89
89
  else if (e.key === "Enter" && o === -1)
90
- e.preventDefault(), j(e);
91
- else if (e.key === "Enter" && o != null && f[o] != null) {
90
+ e.preventDefault(), z(e);
91
+ else if (e.key === "Enter" && o != null && p[o] != null) {
92
92
  e.preventDefault();
93
- const t = f[o];
94
- $(t) || D(e, t, !0);
93
+ const t = p[o];
94
+ $(t) || v(e, t, !0);
95
95
  } else if (e.key === "ArrowDown" || e.key === "ArrowUp") {
96
96
  if (e.preventDefault(), !a) {
97
- x(Be(e.key === "ArrowDown" ? 1 : -1)), u(!0);
97
+ x(Te(e.key === "ArrowDown" ? 1 : -1)), u(!0);
98
98
  return;
99
99
  }
100
- Te(e.key === "ArrowDown" ? 1 : -1);
100
+ Ye(e.key === "ArrowDown" ? 1 : -1);
101
101
  } else if (e.key === "Home" || e.key === "End")
102
102
  e.preventDefault(), x(c[e.key === "Home" ? 0 : c.length - 1] ?? null);
103
103
  else if (e.key === " " && o === -1)
104
- e.preventDefault(), j(e);
105
- else if (e.key === " " && o != null && f[o] != null) {
104
+ e.preventDefault(), z(e);
105
+ else if (e.key === " " && o != null && p[o] != null) {
106
106
  e.preventDefault();
107
- const t = f[o];
108
- $(t) || D(e, t, !1);
107
+ const t = p[o];
108
+ $(t) || v(e, t, !1);
109
109
  } else e.key === "Escape" && a ? (e.preventDefault(), e.stopPropagation(), u(!1)) : e.key === "Tab" && u(!1);
110
- }, se = !xe && !g && !M && (r ? i.length > 0 : w !== null);
111
- let ne;
112
- a && o != null && (o === -1 || f[o] !== void 0) && (ne = o === -1 ? `${l}-select-all` : `${l}-option-${o}`);
113
- const qe = (e) => {
114
- e.preventDefault(), !(M || g) && (X.current?.focus(), u(!a));
115
- }, Ge = r ? V ? V(i, ({ index: e }) => ({ "data-index": e })) : i.map((e, t) => /* @__PURE__ */ s(ot, {
110
+ }, ne = !ye && !g && !C && (r ? i.length > 0 : y !== null);
111
+ let ae;
112
+ a && o != null && (o === -1 || p[o] !== void 0) && (ae = o === -1 ? `${l}-select-all` : `${l}-option-${o}`);
113
+ const Ge = (e) => {
114
+ e.preventDefault(), !(C || g) && (Z.current?.focus(), u(!a));
115
+ }, Je = r ? T ? T(i, ({ index: e }) => ({ "data-index": e })) : i.map((e, t) => /* @__PURE__ */ s(at, {
116
116
  dataTest: `selected-chip-${d(e)}`,
117
117
  label: d(e),
118
118
  readOnly: g,
119
119
  deleteButtonTabIndex: -1,
120
- onDelete: g ? void 0 : (n) => D(n, e)
121
- }, C ? C(e) : `${d(e)}-${t}`)) : void 0, Je = /* @__PURE__ */ I("span", {
120
+ onDelete: g ? void 0 : (n) => v(n, e)
121
+ }, S ? S(e) : `${d(e)}-${t}`)) : void 0, Qe = /* @__PURE__ */ I("span", {
122
122
  className: "flex items-center gap-1",
123
123
  children: [
124
- B && /* @__PURE__ */ s(dt, {
124
+ Y && /* @__PURE__ */ s(ft, {
125
125
  width: 20,
126
126
  height: 20,
127
127
  className: "animate-spin"
128
128
  }),
129
- se && /* @__PURE__ */ s("button", {
129
+ ne && /* @__PURE__ */ s("button", {
130
130
  type: "button",
131
131
  tabIndex: -1,
132
132
  "aria-label": "Clear",
133
133
  "data-testid": `${l}-clear`,
134
134
  className: "invisible flex min-h-6 min-w-6 cursor-pointer items-center justify-center rounded-full border-0 bg-delta-50 group-focus-within:visible",
135
135
  onMouseDown: (e) => e.preventDefault(),
136
- onClick: oe,
137
- children: /* @__PURE__ */ s(tt, {
136
+ onClick: se,
137
+ children: /* @__PURE__ */ s(ot, {
138
138
  width: 20,
139
139
  height: 20,
140
140
  className: "text-delta-700"
@@ -148,58 +148,58 @@ function Ft({ dataTest: l, options: p, renderInput: ue, value: A, onChange: N, g
148
148
  "data-testid": `${l}-popup-indicator`,
149
149
  className: "flex cursor-pointer items-center border-0 bg-transparent",
150
150
  onMouseDown: (e) => e.preventDefault(),
151
- onClick: qe,
152
- children: ye ?? (r ? /* @__PURE__ */ s(rt, {
151
+ onClick: Ge,
152
+ children: ke ?? (r ? /* @__PURE__ */ s(nt, {
153
153
  width: 24,
154
154
  height: 24,
155
155
  className: "text-delta-700"
156
- }) : /* @__PURE__ */ s(et, {
156
+ }) : /* @__PURE__ */ s(rt, {
157
157
  width: 24,
158
158
  height: 24,
159
- className: E(z["select-custom-icon"], a && z["select-custom-icon-open"], "text-delta-700")
159
+ className: E(W["select-custom-icon"], a && W["select-custom-icon-open"], "text-delta-700")
160
160
  }))
161
161
  })
162
162
  ]
163
- }), Qe = {
164
- disabled: M,
165
- size: ge,
163
+ }), Xe = {
164
+ disabled: C,
165
+ size: xe,
166
166
  fullWidth: !0,
167
- error: he,
168
- helperText: be,
169
- value: b,
167
+ error: be,
168
+ helperText: ge,
169
+ value: h,
170
170
  onChange: (e) => {
171
171
  x(null), P(e, e.target.value, "input"), a || u(!0);
172
172
  },
173
- onKeyDown: Ye,
173
+ onKeyDown: qe,
174
174
  slotProps: {
175
175
  htmlInput: {
176
- ...ze(),
177
- ref: X,
176
+ ...He(),
177
+ ref: Z,
178
178
  onClick: () => u(!0),
179
179
  role: "combobox",
180
180
  "aria-autocomplete": "list",
181
181
  "aria-expanded": a,
182
- "aria-controls": a ? J : void 0,
183
- "aria-activedescendant": ne,
182
+ "aria-controls": a ? Q : void 0,
183
+ "aria-activedescendant": ae,
184
184
  autoComplete: "off",
185
185
  readOnly: g
186
186
  },
187
187
  input: {
188
- ref: Ue,
189
- startAdornment: Ge,
190
- endAdornment: Je
188
+ ref: Ve,
189
+ startAdornment: Je,
190
+ endAdornment: Qe
191
191
  }
192
192
  }
193
- }, Xe = E("asma-pressable", "relative box-border flex min-h-10 cursor-pointer items-center gap-x-3 px-3 py-1.5 text-base text-delta-800", "aria-selected:bg-gama-50 hover:bg-delta-50", "aria-disabled:cursor-default aria-disabled:!bg-transparent aria-disabled:text-delta-300"), Ze = (e, t, n) => {
194
- const { key: m, ...y } = e;
193
+ }, Ze = E("asma-pressable", "relative box-border flex min-h-10 cursor-pointer items-center gap-x-3 px-3 py-1.5 text-base text-delta-800", "aria-selected:bg-gama-50 hover:bg-delta-50", "aria-disabled:cursor-default aria-disabled:!bg-transparent aria-disabled:text-delta-300"), Ke = (e, t, n) => {
194
+ const { key: f, ...w } = e;
195
195
  return /* @__PURE__ */ I("li", {
196
- ...y,
196
+ ...w,
197
197
  children: [
198
198
  e["data-active"] !== void 0 && /* @__PURE__ */ s("span", {
199
199
  "aria-hidden": "true",
200
200
  className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
201
201
  }),
202
- r ? /* @__PURE__ */ s(ae, {
202
+ r ? /* @__PURE__ */ s(ie, {
203
203
  dataTest: `${l}-${d(t)}-checkbox`,
204
204
  checked: n.selected,
205
205
  size: "small",
@@ -207,7 +207,7 @@ function Ft({ dataTest: l, options: p, renderInput: ue, value: A, onChange: N, g
207
207
  decorative: !0
208
208
  }) : /* @__PURE__ */ s("span", {
209
209
  className: "w-5",
210
- children: n.selected && /* @__PURE__ */ s(lt, {
210
+ children: n.selected && /* @__PURE__ */ s(st, {
211
211
  width: 20,
212
212
  height: 20,
213
213
  className: "text-gama-500"
@@ -218,93 +218,94 @@ function Ft({ dataTest: l, options: p, renderInput: ue, value: A, onChange: N, g
218
218
  children: d(t)
219
219
  })
220
220
  ]
221
- }, m);
222
- }, Ke = (e, t) => {
223
- const n = $(e), m = {
224
- ...He({
225
- onMouseDown: (h) => h.preventDefault(),
226
- onClick: (h) => {
227
- n || D(h, e);
221
+ }, f);
222
+ }, et = (e, t) => {
223
+ const n = $(e), f = {
224
+ ...Ue({
225
+ onMouseDown: (m) => m.preventDefault(),
226
+ onClick: (m) => {
227
+ n || v(m, e);
228
228
  },
229
229
  onMouseMove: () => x(null)
230
230
  }),
231
- key: C ? String(C(e)) : `${d(e)}-${t}`,
232
- ref: (h) => {
233
- Q.current[t] = h;
231
+ key: S ? String(S(e)) : `${d(e)}-${t}`,
232
+ ref: (m) => {
233
+ X.current[t] = m;
234
234
  },
235
235
  role: "option",
236
236
  id: `${l}-option-${t}`,
237
- "aria-selected": F(e),
237
+ "aria-selected": O(e),
238
238
  "aria-disabled": n || void 0,
239
239
  "data-active": o === t ? "" : void 0,
240
- className: Xe
241
- }, y = {
242
- selected: F(e),
240
+ className: Ze
241
+ }, w = {
242
+ selected: O(e),
243
243
  index: t,
244
- inputValue: b
244
+ inputValue: h
245
245
  };
246
- return U ? U(m, e, y) : Ze(m, e, y);
247
- };
246
+ return B ? B(f, e, w) : Ke(f, e, w);
247
+ }, tt = !!(F && r), H = b.length > 0 && i.length === b.length, lt = i.length > 0 && !H;
248
248
  return /* @__PURE__ */ I("div", {
249
- className: E(z.styledSelectAutocompleteWrapper, !Ie && "w-auto", Se, Re),
250
- children: [ue(Qe), a && /* @__PURE__ */ s(ut, {
251
- root: re,
249
+ className: E(W.styledSelectAutocompleteWrapper, !Ae && "w-auto", Pe, Re),
250
+ children: [pe(Xe), a && /* @__PURE__ */ s(mt, {
251
+ root: oe,
252
252
  children: /* @__PURE__ */ I("ul", {
253
- ref: Ve,
254
- ...O ? st : {},
253
+ ref: Be,
254
+ ...j ? it : {},
255
255
  style: {
256
- ...O ? nt : {},
257
- ...je,
258
- width: _e ?? void 0,
259
- maxHeight: Z ?? void 0,
256
+ ...j ? ct : {},
257
+ ...ze,
258
+ width: Fe ?? void 0,
259
+ maxHeight: K ?? void 0,
260
260
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
261
- ...q?.popper?.style
261
+ ...G?.popper?.style
262
262
  },
263
263
  ...We(),
264
- id: J,
264
+ id: Q,
265
265
  role: "listbox",
266
266
  "aria-multiselectable": r ? !0 : void 0,
267
- className: E("z-[1300] m-0 list-none overflow-auto rounded 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?.listbox, q?.popper?.className),
268
- children: [T && r && /* @__PURE__ */ I("li", {
267
+ className: E("z-[1300] m-0 list-none overflow-auto rounded border border-solid border-delta-300 bg-white px-0 py-2 shadow-[0px_2px_4px_0px_rgba(34,33,51,0.15)]", tt && "py-0", "[&>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", Ne?.listbox, G?.popper?.className),
268
+ children: [F && r && /* @__PURE__ */ I("li", {
269
269
  id: `${l}-select-all`,
270
270
  role: "option",
271
- "aria-selected": p.length > 0 && i.length === p.length,
271
+ "aria-selected": H,
272
272
  "data-active": o === -1 ? "" : void 0,
273
273
  tabIndex: -1,
274
274
  onMouseDown: (e) => e.preventDefault(),
275
- onClick: j,
275
+ onClick: z,
276
276
  onMouseMove: () => x(null),
277
- className: "relative flex min-h-10 cursor-pointer items-center gap-x-3 border-0 border-b border-solid border-delta-200 bg-delta-50 px-3 text-xs font-medium uppercase tracking-wide text-delta-600 hover:bg-delta-100",
277
+ className: "relative flex h-8 cursor-pointer items-center gap-x-4 border-0 border-b border-solid border-delta-200 bg-[var(--colors-gray-10)] px-2 text-[10px] font-semibold uppercase leading-3 tracking-[0.2px] text-delta-600 hover:bg-delta-50",
278
278
  children: [
279
279
  o === -1 && /* @__PURE__ */ s("span", {
280
280
  "aria-hidden": "true",
281
281
  className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
282
282
  }),
283
- /* @__PURE__ */ s(ae, {
283
+ /* @__PURE__ */ s(ie, {
284
284
  dataTest: `${l}-select-all`,
285
- checked: p.length > 0 && i.length === p.length,
285
+ checked: H,
286
+ indeterminate: lt,
286
287
  size: "small",
287
288
  hideWrapper: !0,
288
289
  decorative: !0
289
290
  }),
290
291
  /* @__PURE__ */ s("span", {
291
292
  className: "flex-1 truncate",
292
- children: ve
293
+ children: Ie
293
294
  })
294
295
  ]
295
- }), B ? /* @__PURE__ */ s("li", {
296
+ }), Y ? /* @__PURE__ */ s("li", {
296
297
  role: "presentation",
297
298
  className: "px-3 py-2 text-sm text-delta-600",
298
- children: fe
299
- }) : f.length === 0 ? /* @__PURE__ */ s("li", {
299
+ children: me
300
+ }) : p.length === 0 ? /* @__PURE__ */ s("li", {
300
301
  role: "presentation",
301
302
  className: "px-3 py-2 text-sm text-delta-600",
302
- children: me
303
- }) : f.map(Ke)]
303
+ children: he
304
+ }) : p.map(et)]
304
305
  })
305
306
  })]
306
307
  });
307
308
  }
308
309
  export {
309
- Ft as StyledSelectAutocomplete
310
+ zt as StyledSelectAutocomplete
310
311
  };
@@ -12,8 +12,8 @@ import { useCallback as m, useEffect as y, useId as ve, useRef as R, useState as
12
12
  import { Fragment as N, jsx as c, jsxs as W } from "react/jsx-runtime";
13
13
  import { FloatingPortal as he, autoUpdate as xe, flip as be, offset as Pe, shift as ye, size as Re, useDismiss as _e, useFloating as Ee, useInteractions as Se, useMergeRefs as Te } from "@floating-ui/react";
14
14
  var Ae = 240, Me = {
15
- info: 360,
16
- action: 400
15
+ info: 472,
16
+ action: 472
17
17
  }, we = 0.6, B = "calc(100vw - 32px)", je = ({ dataTest: s, renderTrigger: _, variant: E = "info", title: l, children: S, viewResultsAction: T, resetAction: A, footerActions: M, resultCount: v, closeLabel: w = "Lukk", ariaLabel: F, onOpenChange: I, className: O }) => {
18
18
  const a = ve(), L = `${a}-title`, [o, X] = g(!1), [H, U] = g(), [Y, $] = g(), d = de(), t = E === "action", j = d && !t, k = d && t, u = m((e) => {
19
19
  X(e), I?.(e);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.92.3",
6
+ "version": "3.93.0",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",