@alixpartners/ui-components 2.0.0-beta.18 → 2.0.0-beta.18.2

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.
@@ -45,10 +45,10 @@ function P({
45
45
  l == null || l(), o === void 0 && ((i = d.current) == null || i.close());
46
46
  }, E = () => {
47
47
  var i;
48
- e == null || e(), l == null || l(), o === void 0 && ((i = d.current) == null || i.close());
48
+ e == null || e(), o === void 0 && ((i = d.current) == null || i.close(), l == null || l());
49
49
  }, G = () => {
50
50
  var i;
51
- r == null || r(), l == null || l(), o === void 0 && ((i = d.current) == null || i.close());
51
+ r == null || r(), o === void 0 && ((i = d.current) == null || i.close(), l == null || l());
52
52
  };
53
53
  return /* @__PURE__ */ c("div", { className: M, ...R, children: [
54
54
  s && /* @__PURE__ */ a("div", { ref: w, onClick: A, children: s }),
@@ -36,6 +36,9 @@ type DropdownProps = {
36
36
  labelTooltip?: LabelTooltipProps;
37
37
  isTagsFields?: boolean;
38
38
  unselect?: boolean;
39
+ selectedOptionLabel?: string;
40
+ selectedOptionsLabel?: string;
41
+ allOptionsSelectedLabel?: string;
39
42
  } & DataAttributes & InteractiveEventHandlers;
40
43
  /**
41
44
  * A flexible dropdown component that supports single and multi-select functionality with search, categorization, and keyboard navigation.
@@ -68,5 +71,5 @@ type DropdownProps = {
68
71
  * @param {boolean} [props.unselect] - Whether single select dropdown allows deselection of selected items (defaults to false)
69
72
  * @returns {JSX.Element} The rendered Dropdown component
70
73
  */
71
- export default function Dropdown({ className, label, options, value, placeholder, disabled, required, searchable, searchPlaceholder, errorMessage, helpText, helpLink, helpLinkText, onChange, onSearch, multiSelect, grouped, align, onToggleChange, toggleLabel, isCreatable, dropdownTriggerClassName, dropdownMenuClassName, hideSelectedItems, labelTooltip, isTagsFields, unselect, ...props }: DropdownProps): import("react/jsx-runtime").JSX.Element;
74
+ export default function Dropdown({ className, label, options, value, placeholder, disabled, required, searchable, searchPlaceholder, errorMessage, helpText, helpLink, helpLinkText, onChange, onSearch, multiSelect, grouped, align, onToggleChange, toggleLabel, isCreatable, dropdownTriggerClassName, dropdownMenuClassName, hideSelectedItems, labelTooltip, isTagsFields, unselect, selectedOptionLabel, selectedOptionsLabel, allOptionsSelectedLabel, ...props }: DropdownProps): import("react/jsx-runtime").JSX.Element;
72
75
  export {};
@@ -1,110 +1,110 @@
1
- import { jsx as t, jsxs as w } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as v } from "react/jsx-runtime";
2
2
  import { c as A } from "../../clsx-OuTLNxxd.js";
3
3
  import * as m from "react";
4
- import { useState as V, useRef as j, useEffect as W, useCallback as re } from "react";
5
- import U from "../Icon/Icon.js";
6
- import Qe from "../Toggle/Toggle.js";
7
- import ne from "../Button/Button.js";
8
- import me from "../Ghost/Ghost.js";
9
- import eo from "../Search/Search.js";
10
- import oo from "../Tooltip/Tooltip.js";
11
- import { u as to, c as ro, d as fe, P as we, a as K, g as no } from "../../index-DWydnyjJ.js";
12
- import { c as ve, R as lo, A as he, P as so, D as ao, C as co, a as io } from "../../index-DieLVN0p.js";
13
- import { h as po, R as uo, u as _o, F as mo } from "../../index-BGZDIjm9.js";
14
- import { u as fo } from "../../index-2H7slGYV.js";
15
- import { P as be } from "../../index-DpfPnSMn.js";
16
- import '../../assets/Dropdown.css';var $ = "Popover", [De, Wt] = ro($, [
17
- ve
18
- ]), X = ve(), [wo, B] = De($), ge = (n) => {
4
+ import { useState as V, useRef as $, useEffect as W, useCallback as ne } from "react";
5
+ import j from "../Icon/Icon.js";
6
+ import no from "../Toggle/Toggle.js";
7
+ import de from "../Button/Button.js";
8
+ import ve from "../Ghost/Ghost.js";
9
+ import lo from "../Search/Search.js";
10
+ import so from "../Tooltip/Tooltip.js";
11
+ import { u as ao, c as co, d as he, P as be, a as U, g as io } from "../../index-DWydnyjJ.js";
12
+ import { c as De, R as po, A as ge, P as uo, D as _o, C as mo, a as fo } from "../../index-DieLVN0p.js";
13
+ import { h as wo, R as vo, u as ho, F as bo } from "../../index-BGZDIjm9.js";
14
+ import { u as Do } from "../../index-2H7slGYV.js";
15
+ import { P as Ce } from "../../index-DpfPnSMn.js";
16
+ import '../../assets/Dropdown.css';var Q = "Popover", [Ie, $t] = co(Q, [
17
+ De
18
+ ]), K = De(), [go, B] = Ie(Q), Ne = (n) => {
19
19
  const {
20
20
  __scopePopover: p,
21
- children: i,
21
+ children: c,
22
22
  open: s,
23
23
  defaultOpen: a,
24
24
  onOpenChange: d,
25
25
  modal: _ = !1
26
- } = n, u = X(p), R = m.useRef(null), [b, x] = m.useState(!1), [F, y] = to({
26
+ } = n, u = K(p), R = m.useRef(null), [b, x] = m.useState(!1), [F, y] = ao({
27
27
  prop: s,
28
28
  defaultProp: a ?? !1,
29
29
  onChange: d,
30
- caller: $
30
+ caller: Q
31
31
  });
32
- return /* @__PURE__ */ t(lo, { ...u, children: /* @__PURE__ */ t(
33
- wo,
32
+ return /* @__PURE__ */ t(po, { ...u, children: /* @__PURE__ */ t(
33
+ go,
34
34
  {
35
35
  scope: p,
36
- contentId: fo(),
36
+ contentId: Do(),
37
37
  triggerRef: R,
38
38
  open: F,
39
39
  onOpenChange: y,
40
- onOpenToggle: m.useCallback(() => y((c) => !c), [y]),
40
+ onOpenToggle: m.useCallback(() => y((i) => !i), [y]),
41
41
  hasCustomAnchor: b,
42
42
  onCustomAnchorAdd: m.useCallback(() => x(!0), []),
43
43
  onCustomAnchorRemove: m.useCallback(() => x(!1), []),
44
44
  modal: _,
45
- children: i
45
+ children: c
46
46
  }
47
47
  ) });
48
48
  };
49
- ge.displayName = $;
50
- var Ce = "PopoverAnchor", Ie = m.forwardRef(
49
+ Ne.displayName = Q;
50
+ var Oe = "PopoverAnchor", Pe = m.forwardRef(
51
51
  (n, p) => {
52
- const { __scopePopover: i, ...s } = n, a = B(Ce, i), d = X(i), { onCustomAnchorAdd: _, onCustomAnchorRemove: u } = a;
53
- return m.useEffect(() => (_(), () => u()), [_, u]), /* @__PURE__ */ t(he, { ...d, ...s, ref: p });
52
+ const { __scopePopover: c, ...s } = n, a = B(Oe, c), d = K(c), { onCustomAnchorAdd: _, onCustomAnchorRemove: u } = a;
53
+ return m.useEffect(() => (_(), () => u()), [_, u]), /* @__PURE__ */ t(ge, { ...d, ...s, ref: p });
54
54
  }
55
55
  );
56
- Ie.displayName = Ce;
57
- var Ne = "PopoverTrigger", Oe = m.forwardRef(
56
+ Pe.displayName = Oe;
57
+ var Ae = "PopoverTrigger", Re = m.forwardRef(
58
58
  (n, p) => {
59
- const { __scopePopover: i, ...s } = n, a = B(Ne, i), d = X(i), _ = fe(p, a.triggerRef), u = /* @__PURE__ */ t(
60
- we.button,
59
+ const { __scopePopover: c, ...s } = n, a = B(Ae, c), d = K(c), _ = he(p, a.triggerRef), u = /* @__PURE__ */ t(
60
+ be.button,
61
61
  {
62
62
  type: "button",
63
63
  "aria-haspopup": "dialog",
64
64
  "aria-expanded": a.open,
65
65
  "aria-controls": a.contentId,
66
- "data-state": Le(a.open),
66
+ "data-state": Ee(a.open),
67
67
  ...s,
68
68
  ref: _,
69
- onClick: K(n.onClick, a.onOpenToggle)
69
+ onClick: U(n.onClick, a.onOpenToggle)
70
70
  }
71
71
  );
72
- return a.hasCustomAnchor ? u : /* @__PURE__ */ t(he, { asChild: !0, ...d, children: u });
72
+ return a.hasCustomAnchor ? u : /* @__PURE__ */ t(ge, { asChild: !0, ...d, children: u });
73
73
  }
74
74
  );
75
- Oe.displayName = Ne;
76
- var de = "PopoverPortal", [vo, ho] = De(de, {
75
+ Re.displayName = Ae;
76
+ var le = "PopoverPortal", [Co, Io] = Ie(le, {
77
77
  forceMount: void 0
78
- }), Pe = (n) => {
79
- const { __scopePopover: p, forceMount: i, children: s, container: a } = n, d = B(de, p);
80
- return /* @__PURE__ */ t(vo, { scope: p, forceMount: i, children: /* @__PURE__ */ t(be, { present: i || d.open, children: /* @__PURE__ */ t(so, { asChild: !0, container: a, children: s }) }) });
78
+ }), ye = (n) => {
79
+ const { __scopePopover: p, forceMount: c, children: s, container: a } = n, d = B(le, p);
80
+ return /* @__PURE__ */ t(Co, { scope: p, forceMount: c, children: /* @__PURE__ */ t(Ce, { present: c || d.open, children: /* @__PURE__ */ t(uo, { asChild: !0, container: a, children: s }) }) });
81
81
  };
82
- Pe.displayName = de;
83
- var z = "PopoverContent", Ae = m.forwardRef(
82
+ ye.displayName = le;
83
+ var z = "PopoverContent", Le = m.forwardRef(
84
84
  (n, p) => {
85
- const i = ho(z, n.__scopePopover), { forceMount: s = i.forceMount, ...a } = n, d = B(z, n.__scopePopover);
86
- return /* @__PURE__ */ t(be, { present: s || d.open, children: d.modal ? /* @__PURE__ */ t(Do, { ...a, ref: p }) : /* @__PURE__ */ t(go, { ...a, ref: p }) });
85
+ const c = Io(z, n.__scopePopover), { forceMount: s = c.forceMount, ...a } = n, d = B(z, n.__scopePopover);
86
+ return /* @__PURE__ */ t(Ce, { present: s || d.open, children: d.modal ? /* @__PURE__ */ t(Oo, { ...a, ref: p }) : /* @__PURE__ */ t(Po, { ...a, ref: p }) });
87
87
  }
88
88
  );
89
- Ae.displayName = z;
90
- var bo = no("PopoverContent.RemoveScroll"), Do = m.forwardRef(
89
+ Le.displayName = z;
90
+ var No = io("PopoverContent.RemoveScroll"), Oo = m.forwardRef(
91
91
  (n, p) => {
92
- const i = B(z, n.__scopePopover), s = m.useRef(null), a = fe(p, s), d = m.useRef(!1);
92
+ const c = B(z, n.__scopePopover), s = m.useRef(null), a = he(p, s), d = m.useRef(!1);
93
93
  return m.useEffect(() => {
94
94
  const _ = s.current;
95
- if (_) return po(_);
96
- }, []), /* @__PURE__ */ t(uo, { as: bo, allowPinchZoom: !0, children: /* @__PURE__ */ t(
97
- Re,
95
+ if (_) return wo(_);
96
+ }, []), /* @__PURE__ */ t(vo, { as: No, allowPinchZoom: !0, children: /* @__PURE__ */ t(
97
+ ke,
98
98
  {
99
99
  ...n,
100
100
  ref: a,
101
- trapFocus: i.open,
101
+ trapFocus: c.open,
102
102
  disableOutsidePointerEvents: !0,
103
- onCloseAutoFocus: K(n.onCloseAutoFocus, (_) => {
103
+ onCloseAutoFocus: U(n.onCloseAutoFocus, (_) => {
104
104
  var u;
105
- _.preventDefault(), d.current || (u = i.triggerRef.current) == null || u.focus();
105
+ _.preventDefault(), d.current || (u = c.triggerRef.current) == null || u.focus();
106
106
  }),
107
- onPointerDownOutside: K(
107
+ onPointerDownOutside: U(
108
108
  n.onPointerDownOutside,
109
109
  (_) => {
110
110
  const u = _.detail.originalEvent, R = u.button === 0 && u.ctrlKey === !0, b = u.button === 2 || R;
@@ -112,7 +112,7 @@ var bo = no("PopoverContent.RemoveScroll"), Do = m.forwardRef(
112
112
  },
113
113
  { checkForDefaultPrevented: !1 }
114
114
  ),
115
- onFocusOutside: K(
115
+ onFocusOutside: U(
116
116
  n.onFocusOutside,
117
117
  (_) => _.preventDefault(),
118
118
  { checkForDefaultPrevented: !1 }
@@ -120,11 +120,11 @@ var bo = no("PopoverContent.RemoveScroll"), Do = m.forwardRef(
120
120
  }
121
121
  ) });
122
122
  }
123
- ), go = m.forwardRef(
123
+ ), Po = m.forwardRef(
124
124
  (n, p) => {
125
- const i = B(z, n.__scopePopover), s = m.useRef(!1), a = m.useRef(!1);
125
+ const c = B(z, n.__scopePopover), s = m.useRef(!1), a = m.useRef(!1);
126
126
  return /* @__PURE__ */ t(
127
- Re,
127
+ ke,
128
128
  {
129
129
  ...n,
130
130
  ref: p,
@@ -132,21 +132,21 @@ var bo = no("PopoverContent.RemoveScroll"), Do = m.forwardRef(
132
132
  disableOutsidePointerEvents: !1,
133
133
  onCloseAutoFocus: (d) => {
134
134
  var _, u;
135
- (_ = n.onCloseAutoFocus) == null || _.call(n, d), d.defaultPrevented || (s.current || (u = i.triggerRef.current) == null || u.focus(), d.preventDefault()), s.current = !1, a.current = !1;
135
+ (_ = n.onCloseAutoFocus) == null || _.call(n, d), d.defaultPrevented || (s.current || (u = c.triggerRef.current) == null || u.focus(), d.preventDefault()), s.current = !1, a.current = !1;
136
136
  },
137
137
  onInteractOutside: (d) => {
138
138
  var R, b;
139
139
  (R = n.onInteractOutside) == null || R.call(n, d), d.defaultPrevented || (s.current = !0, d.detail.originalEvent.type === "pointerdown" && (a.current = !0));
140
140
  const _ = d.target;
141
- ((b = i.triggerRef.current) == null ? void 0 : b.contains(_)) && d.preventDefault(), d.detail.originalEvent.type === "focusin" && a.current && d.preventDefault();
141
+ ((b = c.triggerRef.current) == null ? void 0 : b.contains(_)) && d.preventDefault(), d.detail.originalEvent.type === "focusin" && a.current && d.preventDefault();
142
142
  }
143
143
  }
144
144
  );
145
145
  }
146
- ), Re = m.forwardRef(
146
+ ), ke = m.forwardRef(
147
147
  (n, p) => {
148
148
  const {
149
- __scopePopover: i,
149
+ __scopePopover: c,
150
150
  trapFocus: s,
151
151
  onOpenAutoFocus: a,
152
152
  onCloseAutoFocus: d,
@@ -156,9 +156,9 @@ var bo = no("PopoverContent.RemoveScroll"), Do = m.forwardRef(
156
156
  onFocusOutside: b,
157
157
  onInteractOutside: x,
158
158
  ...F
159
- } = n, y = B(z, i), c = X(i);
160
- return _o(), /* @__PURE__ */ t(
161
- mo,
159
+ } = n, y = B(z, c), i = K(c);
160
+ return ho(), /* @__PURE__ */ t(
161
+ bo,
162
162
  {
163
163
  asChild: !0,
164
164
  loop: !0,
@@ -166,7 +166,7 @@ var bo = no("PopoverContent.RemoveScroll"), Do = m.forwardRef(
166
166
  onMountAutoFocus: a,
167
167
  onUnmountAutoFocus: d,
168
168
  children: /* @__PURE__ */ t(
169
- ao,
169
+ _o,
170
170
  {
171
171
  asChild: !0,
172
172
  disableOutsidePointerEvents: _,
@@ -176,12 +176,12 @@ var bo = no("PopoverContent.RemoveScroll"), Do = m.forwardRef(
176
176
  onFocusOutside: b,
177
177
  onDismiss: () => y.onOpenChange(!1),
178
178
  children: /* @__PURE__ */ t(
179
- co,
179
+ mo,
180
180
  {
181
- "data-state": Le(y.open),
181
+ "data-state": Ee(y.open),
182
182
  role: "dialog",
183
183
  id: y.contentId,
184
- ...c,
184
+ ...i,
185
185
  ...F,
186
186
  ref: p,
187
187
  style: {
@@ -199,93 +199,93 @@ var bo = no("PopoverContent.RemoveScroll"), Do = m.forwardRef(
199
199
  }
200
200
  );
201
201
  }
202
- ), ye = "PopoverClose", Co = m.forwardRef(
202
+ ), xe = "PopoverClose", Ao = m.forwardRef(
203
203
  (n, p) => {
204
- const { __scopePopover: i, ...s } = n, a = B(ye, i);
204
+ const { __scopePopover: c, ...s } = n, a = B(xe, c);
205
205
  return /* @__PURE__ */ t(
206
- we.button,
206
+ be.button,
207
207
  {
208
208
  type: "button",
209
209
  ...s,
210
210
  ref: p,
211
- onClick: K(n.onClick, () => a.onOpenChange(!1))
211
+ onClick: U(n.onClick, () => a.onOpenChange(!1))
212
212
  }
213
213
  );
214
214
  }
215
215
  );
216
- Co.displayName = ye;
217
- var Io = "PopoverArrow", No = m.forwardRef(
216
+ Ao.displayName = xe;
217
+ var Ro = "PopoverArrow", yo = m.forwardRef(
218
218
  (n, p) => {
219
- const { __scopePopover: i, ...s } = n, a = X(i);
220
- return /* @__PURE__ */ t(io, { ...a, ...s, ref: p });
219
+ const { __scopePopover: c, ...s } = n, a = K(c);
220
+ return /* @__PURE__ */ t(fo, { ...a, ...s, ref: p });
221
221
  }
222
222
  );
223
- No.displayName = Io;
224
- function Le(n) {
223
+ yo.displayName = Ro;
224
+ function Ee(n) {
225
225
  return n ? "open" : "closed";
226
226
  }
227
- var Oo = ge, Po = Ie, Ao = Oe, Ro = Pe, yo = Ae;
228
- const Lo = "Dropdown-module__dropdownContainer___beNhQ", ko = "Dropdown-module__dropdownLabel___T9FmB", xo = "Dropdown-module__dropdownLabelDisabled___SLRmM", Eo = "Dropdown-module__required___ChI1m", Mo = "Dropdown-module__dropdownWrapper___AUuWD", So = "Dropdown-module__dropdownTrigger___Rue93", Fo = "Dropdown-module__dropdownTriggerDisabled___63wkd", Vo = "Dropdown-module__dropdownTriggerOpen___cbm8V", Bo = "Dropdown-module__dropdownTriggerError___Uu02x", To = "Dropdown-module__dropdownContent___zLMhL", Wo = "Dropdown-module__dropdownSelectedItems___iXnpQ", Go = "Dropdown-module__selectedItemsCreatable___SCjLK", zo = "Dropdown-module__selectedItem___2jO4z", qo = "Dropdown-module__selectedItemLabel___efVI-", Jo = "Dropdown-module__removeButton___9r85B", jo = "Dropdown-module__removeIcon___st3b-", Uo = "Dropdown-module__singleSelectedCreatableItem___BKFLb", Ko = "Dropdown-module__singleSelectedCreatableItemRemoveButton___w3XXp", Xo = "Dropdown-module__selectedOptionLabel___7Zdh3", Yo = "Dropdown-module__placeholder___fWdch", Zo = "Dropdown-module__dropdownActions___d55Fa", $o = "Dropdown-module__dropdownArrow___dLbrb", Ho = "Dropdown-module__dropdownArrowOpen___Z4Nh1", Qo = "Dropdown-module__dropdownMenu___toYcy", et = "Dropdown-module__dropdownMenuToolbar___gFne0", ot = "Dropdown-module__searchContainer___4kUvD", tt = "Dropdown-module__search___JmgDx", rt = "Dropdown-module__dropdownCreatableSearchContainer___sbs0F", nt = "Dropdown-module__disabled___0FjAX", dt = "Dropdown-module__dropdownCreatableError___gwBGw", lt = "Dropdown-module__creatableInput___meKz6", st = "Dropdown-module__optionsList___rk2hi", at = "Dropdown-module__categoryGroup___Np2bP", ct = "Dropdown-module__categoryDivider___Gh6F0", it = "Dropdown-module__categoryLabel___B9IDR", pt = "Dropdown-module__optionItem___7pi10", ut = "Dropdown-module__optionItemDisabled___aepUD", _t = "Dropdown-module__optionItemFocused___u2781", mt = "Dropdown-module__optionContent___nf1VC", ft = "Dropdown-module__optionLabel___sJerM", wt = "Dropdown-module__tickIcon___hYdCr", vt = "Dropdown-module__noOptions___8vmhM", ht = "Dropdown-module__helpers___s4ulA", bt = "Dropdown-module__helpText___YooJE", Dt = "Dropdown-module__helpTextDisabled___Ct4qq", gt = "Dropdown-module__helpLink___-Zwpq", Ct = "Dropdown-module__helpLinkDisabled___r-opC", It = "Dropdown-module__errorMessage___3Mopi", Nt = "Dropdown-module__selectAllContainer___Dlk3J", Ot = "Dropdown-module__actionButtons___-2nvr", o = {
229
- dropdownContainer: Lo,
230
- dropdownLabel: ko,
227
+ var Lo = Ne, ko = Pe, xo = Re, Eo = ye, Mo = Le;
228
+ const So = "Dropdown-module__dropdownContainer___beNhQ", Fo = "Dropdown-module__dropdownLabel___T9FmB", Vo = "Dropdown-module__dropdownLabelDisabled___SLRmM", Bo = "Dropdown-module__required___ChI1m", To = "Dropdown-module__dropdownWrapper___AUuWD", Wo = "Dropdown-module__dropdownTrigger___Rue93", Go = "Dropdown-module__dropdownTriggerDisabled___63wkd", zo = "Dropdown-module__dropdownTriggerOpen___cbm8V", qo = "Dropdown-module__dropdownTriggerError___Uu02x", Jo = "Dropdown-module__dropdownContent___zLMhL", $o = "Dropdown-module__dropdownSelectedItems___iXnpQ", jo = "Dropdown-module__selectedItemsCreatable___SCjLK", Uo = "Dropdown-module__selectedItem___2jO4z", Ko = "Dropdown-module__selectedItemLabel___efVI-", Xo = "Dropdown-module__removeButton___9r85B", Yo = "Dropdown-module__removeIcon___st3b-", Zo = "Dropdown-module__singleSelectedCreatableItem___BKFLb", Ho = "Dropdown-module__singleSelectedCreatableItemRemoveButton___w3XXp", Qo = "Dropdown-module__selectedOptionLabel___7Zdh3", et = "Dropdown-module__placeholder___fWdch", ot = "Dropdown-module__dropdownActions___d55Fa", tt = "Dropdown-module__dropdownArrow___dLbrb", rt = "Dropdown-module__dropdownArrowOpen___Z4Nh1", nt = "Dropdown-module__dropdownMenu___toYcy", dt = "Dropdown-module__dropdownMenuToolbar___gFne0", lt = "Dropdown-module__searchContainer___4kUvD", st = "Dropdown-module__search___JmgDx", at = "Dropdown-module__dropdownCreatableSearchContainer___sbs0F", ct = "Dropdown-module__disabled___0FjAX", it = "Dropdown-module__dropdownCreatableError___gwBGw", pt = "Dropdown-module__creatableInput___meKz6", ut = "Dropdown-module__optionsList___rk2hi", _t = "Dropdown-module__categoryGroup___Np2bP", mt = "Dropdown-module__categoryDivider___Gh6F0", ft = "Dropdown-module__categoryLabel___B9IDR", wt = "Dropdown-module__optionItem___7pi10", vt = "Dropdown-module__optionItemDisabled___aepUD", ht = "Dropdown-module__optionItemFocused___u2781", bt = "Dropdown-module__optionContent___nf1VC", Dt = "Dropdown-module__optionLabel___sJerM", gt = "Dropdown-module__tickIcon___hYdCr", Ct = "Dropdown-module__noOptions___8vmhM", It = "Dropdown-module__helpers___s4ulA", Nt = "Dropdown-module__helpText___YooJE", Ot = "Dropdown-module__helpTextDisabled___Ct4qq", Pt = "Dropdown-module__helpLink___-Zwpq", At = "Dropdown-module__helpLinkDisabled___r-opC", Rt = "Dropdown-module__errorMessage___3Mopi", yt = "Dropdown-module__selectAllContainer___Dlk3J", Lt = "Dropdown-module__actionButtons___-2nvr", o = {
229
+ dropdownContainer: So,
230
+ dropdownLabel: Fo,
231
231
  "label-text": "Dropdown-module__label-text___VEqG-",
232
- dropdownLabelDisabled: xo,
232
+ dropdownLabelDisabled: Vo,
233
233
  "label-tooltip-icon": "Dropdown-module__label-tooltip-icon___JYVOm",
234
- required: Eo,
235
- dropdownWrapper: Mo,
234
+ required: Bo,
235
+ dropdownWrapper: To,
236
236
  "dropdown-menu-trigger": "Dropdown-module__dropdown-menu-trigger___fgqVT",
237
- dropdownTrigger: So,
238
- dropdownTriggerDisabled: Fo,
239
- dropdownTriggerOpen: Vo,
240
- dropdownTriggerError: Bo,
241
- dropdownContent: To,
242
- dropdownSelectedItems: Wo,
243
- selectedItemsCreatable: Go,
244
- selectedItem: zo,
245
- selectedItemLabel: qo,
246
- removeButton: Jo,
247
- removeIcon: jo,
248
- singleSelectedCreatableItem: Uo,
249
- singleSelectedCreatableItemRemoveButton: Ko,
250
- selectedOptionLabel: Xo,
251
- placeholder: Yo,
252
- dropdownActions: Zo,
253
- dropdownArrow: $o,
254
- dropdownArrowOpen: Ho,
255
- dropdownMenu: Qo,
237
+ dropdownTrigger: Wo,
238
+ dropdownTriggerDisabled: Go,
239
+ dropdownTriggerOpen: zo,
240
+ dropdownTriggerError: qo,
241
+ dropdownContent: Jo,
242
+ dropdownSelectedItems: $o,
243
+ selectedItemsCreatable: jo,
244
+ selectedItem: Uo,
245
+ selectedItemLabel: Ko,
246
+ removeButton: Xo,
247
+ removeIcon: Yo,
248
+ singleSelectedCreatableItem: Zo,
249
+ singleSelectedCreatableItemRemoveButton: Ho,
250
+ selectedOptionLabel: Qo,
251
+ placeholder: et,
252
+ dropdownActions: ot,
253
+ dropdownArrow: tt,
254
+ dropdownArrowOpen: rt,
255
+ dropdownMenu: nt,
256
256
  "dropdown-container-grouped": "Dropdown-module__dropdown-container-grouped___1twhU",
257
257
  "dropdown-container-multi-select": "Dropdown-module__dropdown-container-multi-select___zdaum",
258
- dropdownMenuToolbar: et,
259
- searchContainer: ot,
260
- search: tt,
261
- dropdownCreatableSearchContainer: rt,
262
- disabled: nt,
263
- dropdownCreatableError: dt,
264
- creatableInput: lt,
265
- optionsList: st,
266
- categoryGroup: at,
267
- categoryDivider: ct,
268
- categoryLabel: it,
269
- optionItem: pt,
270
- optionItemDisabled: ut,
271
- optionItemFocused: _t,
272
- optionContent: mt,
273
- optionLabel: ft,
274
- tickIcon: wt,
275
- noOptions: vt,
276
- helpers: ht,
277
- helpText: bt,
278
- helpTextDisabled: Dt,
279
- helpLink: gt,
280
- helpLinkDisabled: Ct,
281
- errorMessage: It,
282
- selectAllContainer: Nt,
283
- actionButtons: Ot
258
+ dropdownMenuToolbar: dt,
259
+ searchContainer: lt,
260
+ search: st,
261
+ dropdownCreatableSearchContainer: at,
262
+ disabled: ct,
263
+ dropdownCreatableError: it,
264
+ creatableInput: pt,
265
+ optionsList: ut,
266
+ categoryGroup: _t,
267
+ categoryDivider: mt,
268
+ categoryLabel: ft,
269
+ optionItem: wt,
270
+ optionItemDisabled: vt,
271
+ optionItemFocused: ht,
272
+ optionContent: bt,
273
+ optionLabel: Dt,
274
+ tickIcon: gt,
275
+ noOptions: Ct,
276
+ helpers: It,
277
+ helpText: Nt,
278
+ helpTextDisabled: Ot,
279
+ helpLink: Pt,
280
+ helpLinkDisabled: At,
281
+ errorMessage: Rt,
282
+ selectAllContainer: yt,
283
+ actionButtons: Lt
284
284
  };
285
- function Gt({
285
+ function jt({
286
286
  className: n,
287
287
  label: p,
288
- options: i,
288
+ options: c,
289
289
  value: s = [],
290
290
  placeholder: a = "Select options...",
291
291
  disabled: d = !1,
@@ -296,212 +296,212 @@ function Gt({
296
296
  helpText: x,
297
297
  helpLink: F,
298
298
  helpLinkText: y,
299
- onChange: c,
299
+ onChange: i,
300
300
  onSearch: E,
301
301
  multiSelect: D = !1,
302
- grouped: ke = !1,
303
- align: le = "left",
304
- onToggleChange: Y,
305
- toggleLabel: xe,
302
+ grouped: Me = !1,
303
+ align: se = "left",
304
+ onToggleChange: X,
305
+ toggleLabel: Se,
306
306
  isCreatable: g = !1,
307
- dropdownTriggerClassName: Ee,
308
- dropdownMenuClassName: Me,
309
- hideSelectedItems: Se = !1,
307
+ dropdownTriggerClassName: Fe,
308
+ dropdownMenuClassName: Ve,
309
+ hideSelectedItems: Be = !1,
310
310
  labelTooltip: T,
311
311
  isTagsFields: C = !1,
312
- unselect: Z = !1,
313
- ...H
312
+ unselect: Y = !1,
313
+ selectedOptionLabel: Te = " option selected",
314
+ selectedOptionsLabel: We = " options selected",
315
+ allOptionsSelectedLabel: Z,
316
+ ...ee
314
317
  }) {
315
- const [f, M] = V(s), [O, P] = V(!1), [L, I] = V(""), [q, v] = V(-1), [S, k] = V([]), Fe = j(null), se = j(null), ae = j(null), J = j(null), [ce, Ve] = V(0), [Be, Te] = V(0), [We, Ge] = V(s.length > 0 ? s.join(", ") : a ?? ""), ie = j(s);
318
+ const [f, M] = V(s), [O, P] = V(!1), [L, I] = V(""), [q, w] = V(-1), [S, k] = V([]), Ge = $(null), ae = $(null), ce = $(null), J = $(null), [ie, ze] = V(0), [qe, Je] = V(0), [$e, je] = V(s.length > 0 ? s.join(", ") : a ?? ""), pe = $(s);
316
319
  W(() => {
317
- JSON.stringify(ie.current) !== JSON.stringify(s) && (M(s), ie.current = s);
320
+ JSON.stringify(pe.current) !== JSON.stringify(s) && (M(s), pe.current = s);
318
321
  }, [s]), W(() => {
319
322
  var r;
320
- const e = (r = se.current) == null ? void 0 : r.getBoundingClientRect().width;
321
- e && Ve(e);
323
+ const e = (r = ae.current) == null ? void 0 : r.getBoundingClientRect().width;
324
+ e && ze(e);
322
325
  }, []), W(() => {
323
326
  var r;
324
- const e = (r = ae.current) == null ? void 0 : r.getBoundingClientRect().width;
325
- e && Te(e);
327
+ const e = (r = ce.current) == null ? void 0 : r.getBoundingClientRect().width;
328
+ e && Je(e);
326
329
  }, []), W(() => {
327
330
  O && k([...f]);
328
331
  }, [O, f]);
329
- const N = i.filter((e) => e.label.toLowerCase().includes(L.toLowerCase()));
332
+ const N = c.filter((e) => e.label.toLowerCase().includes(L.toLowerCase()));
330
333
  W(() => {
331
- Ge(s.length > 0 ? s.join(", ") : a ?? "");
334
+ je(s.length > 0 ? s.join(", ") : a ?? "");
332
335
  }, [s, a]), W(() => {
333
336
  O && (u || g || C) && J.current && J.current.focus();
334
337
  }, [O, u, g, C]);
335
- const ze = (e) => {
336
- P(e), e ? (k([...f]), I(""), v(-1)) : (I(""), v(-1), k([]));
337
- }, Q = re((e) => {
338
+ const Ue = (e) => {
339
+ P(e), e ? (k([...f]), I(""), w(-1)) : (I(""), w(-1), k([]));
340
+ }, oe = ne((e) => {
338
341
  if (e.disabled) return;
339
342
  let r = [];
340
343
  if (D)
341
344
  r = S.includes(e.value) ? S.filter((l) => l !== e.value) : [...S, e.value];
342
345
  else {
343
346
  if (f.includes(e.value))
344
- if (Z)
347
+ if (Y)
345
348
  r = [];
346
349
  else
347
350
  return;
348
351
  else
349
352
  r = [e.value];
350
- M(r), c == null || c(r), P(!1), I(""), v(-1), k([]);
353
+ M(r), i == null || i(r), P(!1), I(""), w(-1), k([]);
351
354
  return;
352
355
  }
353
356
  k(r);
354
- }, [D, c, S, f, Z]), qe = () => {
355
- M(S), c == null || c(S), P(!1), I(""), v(-1), k([]);
356
- }, Je = () => {
357
- P(!1), I(""), v(-1), k([]);
358
- }, je = (e) => {
359
- I(e), v(-1), E == null || E(e);
360
- }, Ue = re((e) => {
357
+ }, [D, i, S, f, Y]), Ke = () => {
358
+ M(S), i == null || i(S), P(!1), I(""), w(-1), k([]);
359
+ }, Xe = () => {
360
+ P(!1), I(""), w(-1), k([]);
361
+ }, Ye = (e) => {
362
+ I(e), w(-1), E == null || E(e);
363
+ }, Ze = ne((e) => {
361
364
  const r = {
362
365
  value: e,
363
366
  label: e,
364
367
  disabled: !1
365
368
  };
366
- if (i.push(r), D) {
369
+ if (c.push(r), D) {
367
370
  const G = f.includes(e) ? f : [...f, e];
368
- M(G), c == null || c(G), I(""), P(!0), v(-1);
371
+ M(G), i == null || i(G), I(""), P(!0), w(-1);
369
372
  } else {
370
373
  const l = [e];
371
- M(l), c == null || c(l), I(""), P(!1), v(-1);
374
+ M(l), i == null || i(l), I(""), P(!1), w(-1);
372
375
  }
373
- }, [D, c, i, f]), ee = re((e) => {
376
+ }, [D, i, c, f]), te = ne((e) => {
374
377
  if (!e.disabled)
375
378
  if (D) {
376
379
  const l = f.includes(e.value) ? f.filter((G) => G !== e.value) : [...f, e.value];
377
- M(l), c == null || c(l), P(!0), I(""), v(-1);
380
+ M(l), i == null || i(l), P(!0), I(""), w(-1);
378
381
  } else if (f.includes(e.value)) {
379
- if (Z) {
382
+ if (Y) {
380
383
  const r = [];
381
- M(r), c == null || c(r), P(!1), I(""), v(-1);
384
+ M(r), i == null || i(r), P(!1), I(""), w(-1);
382
385
  }
383
386
  } else {
384
387
  const r = [e.value];
385
- M(r), c == null || c(r), P(!1), I(""), v(-1);
388
+ M(r), i == null || i(r), P(!1), I(""), w(-1);
386
389
  }
387
- }, [D, c, f, Z]), Ke = (e) => {
388
- P(!0), I(e), v(-1), E == null || E(e);
389
- }, pe = (e) => {
390
- P(!0), I(e), v(-1), E == null || E(e);
391
- }, Xe = (e) => {
392
- Y == null || Y(e);
390
+ }, [D, i, f, Y]), He = (e) => {
391
+ P(!0), I(e), w(-1), E == null || E(e);
393
392
  }, ue = (e) => {
393
+ P(!0), I(e), w(-1), E == null || E(e);
394
+ }, Qe = (e) => {
395
+ X == null || X(e);
396
+ }, _e = (e) => {
394
397
  const r = f.filter((l) => l !== e);
395
- M(r), c == null || c(r);
398
+ M(r), i == null || i(r);
396
399
  };
397
400
  W(() => {
398
401
  const e = (r) => {
399
402
  if (O)
400
403
  switch (r.key) {
401
404
  case "ArrowDown":
402
- r.preventDefault(), v((l) => l < N.length - 1 ? l + 1 : 0);
405
+ r.preventDefault(), w((l) => l < N.length - 1 ? l + 1 : 0);
403
406
  break;
404
407
  case "ArrowUp":
405
- r.preventDefault(), v((l) => l > 0 ? l - 1 : N.length - 1);
408
+ r.preventDefault(), w((l) => l > 0 ? l - 1 : N.length - 1);
406
409
  break;
407
410
  case "Enter":
408
411
  if (r.preventDefault(), q >= 0 && q < N.length) {
409
412
  const l = N[q];
410
- g || C ? ee(l) : Q(l);
413
+ g || C ? te(l) : oe(l);
411
414
  }
412
415
  break;
413
416
  case "Escape":
414
- r.preventDefault(), P(!1), I(""), v(-1), k([]);
417
+ r.preventDefault(), P(!1), I(""), w(-1), k([]);
415
418
  break;
416
419
  }
417
420
  };
418
421
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
419
- }, [O, q, N, g, C, ee, Q]);
420
- const oe = g || C ? f : O ? S : f, h = i.filter((e) => oe.includes(e.value)), _e = !!b, Ye = JSON.stringify(S) !== JSON.stringify(f), Ze = N.reduce((e, r) => {
422
+ }, [O, q, N, g, C, te, oe]);
423
+ const H = g || C ? f : O ? S : f, h = c.filter((e) => H.includes(e.value)), me = !!b, eo = JSON.stringify(S) !== JSON.stringify(f), fe = c.filter((e) => !e.disabled), we = fe.length > 0 && fe.every((e) => H.includes(e.value)), oo = N.reduce((e, r) => {
421
424
  const l = r.category || "default";
422
425
  return e[l] || (e[l] = []), e[l].push(r), e;
423
- }, {}), $e = N;
424
- return /* @__PURE__ */ w("div", { ref: Fe, className: A(o.dropdownContainer, ke && o["dropdown-container-grouped"], D && o["dropdown-container-multi-select"], n), ...H, children: [
425
- p && /* @__PURE__ */ w("label", { className: A(o.dropdownLabel, d && o.dropdownLabelDisabled), children: [
426
+ }, {}), to = N;
427
+ return /* @__PURE__ */ v("div", { ref: Ge, className: A(o.dropdownContainer, Me && o["dropdown-container-grouped"], D && o["dropdown-container-multi-select"], n), ...ee, children: [
428
+ p && /* @__PURE__ */ v("label", { className: A(o.dropdownLabel, d && o.dropdownLabelDisabled), children: [
426
429
  /* @__PURE__ */ t("span", { title: p, className: o["label-text"], children: p }),
427
430
  _ && /* @__PURE__ */ t("span", { className: o.required, children: "*" }),
428
- T && /* @__PURE__ */ t(oo, { content: T.content, size: T.size, theme: T.theme, tipSide: T.tipSide, tipAlignment: T.tipAlignment, startVisible: T.startVisible, children: /* @__PURE__ */ t(U, { icon: "ap-icon-info", className: o["label-tooltip-icon"] }) })
431
+ T && /* @__PURE__ */ t(so, { content: T.content, size: T.size, theme: T.theme, tipSide: T.tipSide, tipAlignment: T.tipAlignment, startVisible: T.startVisible, children: /* @__PURE__ */ t(j, { icon: "ap-icon-info", className: o["label-tooltip-icon"] }) })
429
432
  ] }),
430
- /* @__PURE__ */ t(Oo, { open: O, onOpenChange: ze, children: /* @__PURE__ */ w("div", { className: o.dropdownWrapper, children: [
431
- !g && !C && /* @__PURE__ */ t(Ao, { disabled: d, className: A(o["dropdown-menu-trigger"], o.dropdownTrigger, Ee, O && o.dropdownTriggerOpen, d && o.dropdownTriggerDisabled, _e && o.dropdownTriggerError), ref: se, ...H, children: /* @__PURE__ */ w("div", { className: o.dropdownContent, children: [
432
- !Se && /* @__PURE__ */ t("div", { className: o.dropdownSelectedItems, children: h.length > 0 ? D ? h.length === 1 ? h.length + " option selected" : h.length + " options selected" : (
433
+ /* @__PURE__ */ t(Lo, { open: O, onOpenChange: Ue, children: /* @__PURE__ */ v("div", { className: o.dropdownWrapper, children: [
434
+ !g && !C && /* @__PURE__ */ t(xo, { disabled: d, className: A(o["dropdown-menu-trigger"], o.dropdownTrigger, Fe, O && o.dropdownTriggerOpen, d && o.dropdownTriggerDisabled, me && o.dropdownTriggerError), ref: ae, ...ee, children: /* @__PURE__ */ v("div", { className: o.dropdownContent, children: [
435
+ !Be && /* @__PURE__ */ t("div", { className: o.dropdownSelectedItems, children: h.length > 0 ? D ? we && Z ? Z : h.length === 1 ? `${h.length}${Te}` : `${h.length}${We}` : (
433
436
  // For single select, show the selected option label
434
437
  /* @__PURE__ */ t("span", { className: o.selectedOptionLabel, children: h[0].label })
435
- ) : /* @__PURE__ */ t("span", { title: We, className: o.placeholder, children: a }) }),
436
- /* @__PURE__ */ t("div", { className: o.dropdownActions, children: /* @__PURE__ */ t(U, { icon: "ap-icon-expand-more", className: A(o.dropdownArrow, O && o.dropdownArrowOpen) }) })
438
+ ) : /* @__PURE__ */ t("span", { title: $e, className: o.placeholder, children: a }) }),
439
+ /* @__PURE__ */ t("div", { className: o.dropdownActions, children: /* @__PURE__ */ t(j, { icon: "ap-icon-expand-more", className: A(o.dropdownArrow, O && o.dropdownArrowOpen) }) })
437
440
  ] }) }),
438
- (g || C) && /* @__PURE__ */ t(Po, { children: /* @__PURE__ */ w("div", { ref: ae, className: A(o.dropdownCreatableSearchContainer, d && o.disabled, _e && o.dropdownCreatableError), onClick: () => {
441
+ (g || C) && /* @__PURE__ */ t(ko, { children: /* @__PURE__ */ v("div", { ref: ce, className: A(o.dropdownCreatableSearchContainer, d && o.disabled, me && o.dropdownCreatableError), onClick: () => {
439
442
  var e;
440
443
  if (!D && h.length > 0)
441
- return pe("");
444
+ return ue("");
442
445
  (e = J.current) == null || e.focus();
443
- }, ...H, children: [
444
- h.length > 0 && /* @__PURE__ */ t("div", { className: A(o.selectedItemsCreatable), children: D ? h.length > 3 ? /* @__PURE__ */ t("div", { className: o.selectedItem, children: /* @__PURE__ */ w("span", { className: o.selectedItemLabel, children: [
445
- h.length,
446
- " options selected"
447
- ] }) }) : h.map((e) => /* @__PURE__ */ w("div", { className: o.selectedItem, children: [
446
+ }, ...ee, children: [
447
+ h.length > 0 && /* @__PURE__ */ t("div", { className: A(o.selectedItemsCreatable), children: D ? h.length > 3 ? /* @__PURE__ */ t("div", { className: o.selectedItem, children: /* @__PURE__ */ t("span", { className: o.selectedItemLabel, children: we && Z ? Z : `${h.length} options selected` }) }) : h.map((e) => /* @__PURE__ */ v("div", { className: o.selectedItem, children: [
448
448
  /* @__PURE__ */ t("span", { className: o.selectedItemLabel, children: e.label }),
449
- /* @__PURE__ */ t("button", { type: "button", className: o.removeButton, onClick: () => ue(e.value), disabled: d, children: /* @__PURE__ */ t(U, { icon: "ap-icon-close", className: o.removeIcon }) })
450
- ] }, e.value)) : h.length > 0 && /* @__PURE__ */ w("div", { className: o.singleSelectedCreatableItem, children: [
449
+ /* @__PURE__ */ t("button", { type: "button", className: o.removeButton, onClick: () => _e(e.value), disabled: d, children: /* @__PURE__ */ t(j, { icon: "ap-icon-close", className: o.removeIcon }) })
450
+ ] }, e.value)) : h.length > 0 && /* @__PURE__ */ v("div", { className: o.singleSelectedCreatableItem, children: [
451
451
  /* @__PURE__ */ t("span", { className: o.selectedItemLabel, children: h[0].label }),
452
- /* @__PURE__ */ t(ne, { type: "tertiary", variant: "default", size: "sm", onClick: () => ue(h[0].value), disabled: d, icon: "ap-icon-add-filled", className: o.singleSelectedCreatableItemRemoveButton })
452
+ /* @__PURE__ */ t(de, { type: "tertiary", variant: "default", size: "sm", onClick: () => _e(h[0].value), disabled: d, icon: "ap-icon-add-filled", className: o.singleSelectedCreatableItemRemoveButton })
453
453
  ] }) }),
454
- (D || !h.length) && /* @__PURE__ */ t("input", { ref: J, placeholder: h.length > 0 ? "" : R, value: L, onChange: (e) => Ke(e.target.value), onFocus: (e) => pe(e.target.value), disabled: d, className: o.creatableInput }),
455
- /* @__PURE__ */ t("div", { className: o.dropdownActions, children: /* @__PURE__ */ t(U, { icon: "ap-icon-expand-more", className: A(o.dropdownArrow, O && o.dropdownArrowOpen) }) })
454
+ (D || !h.length) && /* @__PURE__ */ t("input", { ref: J, placeholder: h.length > 0 ? "" : R, value: L, onChange: (e) => He(e.target.value), onFocus: (e) => ue(e.target.value), disabled: d, className: o.creatableInput }),
455
+ /* @__PURE__ */ t("div", { className: o.dropdownActions, children: /* @__PURE__ */ t(j, { icon: "ap-icon-expand-more", className: A(o.dropdownArrow, O && o.dropdownArrowOpen) }) })
456
456
  ] }) }),
457
- /* @__PURE__ */ t(Ro, { children: /* @__PURE__ */ t(yo, { align: le === "right" ? "end" : "start", side: "bottom", avoidCollisions: !0, sideOffset: 6, collisionPadding: 8, style: {
458
- minWidth: ce,
457
+ /* @__PURE__ */ t(Eo, { children: /* @__PURE__ */ t(Mo, { align: se === "right" ? "end" : "start", side: "bottom", avoidCollisions: !0, sideOffset: 6, collisionPadding: 8, style: {
458
+ minWidth: ie,
459
459
  zIndex: 9999
460
460
  }, onInteractOutside: (e) => {
461
461
  e.target === J.current && e.preventDefault();
462
- }, children: O && /* @__PURE__ */ w("div", { style: {
463
- minWidth: g || C ? Be : ce
464
- }, className: A(o.dropdownMenu, Me, le === "right" && o.dropdownMenuRight), children: [
465
- !g && !C && (u || D) && /* @__PURE__ */ w("div", { className: o.dropdownMenuToolbar, children: [
466
- u && /* @__PURE__ */ w("div", { className: o.searchContainer, children: [
467
- /* @__PURE__ */ t(eo, { placeholder: R, value: L, onChange: je, className: o.search }),
468
- Y && /* @__PURE__ */ t(Qe, { label: xe, onChange: Xe })
462
+ }, children: O && /* @__PURE__ */ v("div", { style: {
463
+ minWidth: g || C ? qe : ie
464
+ }, className: A(o.dropdownMenu, Ve, se === "right" && o.dropdownMenuRight), children: [
465
+ !g && !C && (u || D) && /* @__PURE__ */ v("div", { className: o.dropdownMenuToolbar, children: [
466
+ u && /* @__PURE__ */ v("div", { className: o.searchContainer, children: [
467
+ /* @__PURE__ */ t(lo, { placeholder: R, value: L, onChange: Ye, className: o.search }),
468
+ X && /* @__PURE__ */ t(no, { label: Se, onChange: Qe })
469
469
  ] }),
470
- D && !g && !C && /* @__PURE__ */ w("div", { className: o.selectAllContainer, children: [
471
- /* @__PURE__ */ t(me, { variant: "default", noIcon: !0, onClick: () => {
470
+ D && !g && !C && /* @__PURE__ */ v("div", { className: o.selectAllContainer, children: [
471
+ /* @__PURE__ */ t(ve, { variant: "default", noIcon: !0, onClick: () => {
472
472
  const e = N.filter((r) => !r.disabled).map((r) => r.value);
473
473
  k(e);
474
474
  }, disabled: N.filter((e) => !e.disabled).length === 0, children: "Select all" }),
475
- /* @__PURE__ */ t(me, { variant: "default", noIcon: !0, onClick: () => k([]), disabled: S.length === 0, children: "Deselect all" })
475
+ /* @__PURE__ */ t(ve, { variant: "default", noIcon: !0, onClick: () => k([]), disabled: S.length === 0, children: "Deselect all" })
476
476
  ] })
477
477
  ] }),
478
- /* @__PURE__ */ w("div", { className: o.optionsList, "data-dropdown-options-list": !0, children: [
479
- N.length > 0 ? Object.entries(Ze).map(([e, r]) => /* @__PURE__ */ w("div", { className: o.categoryGroup, children: [
478
+ /* @__PURE__ */ v("div", { className: o.optionsList, "data-dropdown-options-list": !0, children: [
479
+ N.length > 0 ? Object.entries(oo).map(([e, r]) => /* @__PURE__ */ v("div", { className: o.categoryGroup, children: [
480
480
  e !== "default" && /* @__PURE__ */ t("div", { className: o.categoryDivider, children: /* @__PURE__ */ t("span", { className: o.categoryLabel, children: e }) }),
481
481
  r.map((l) => {
482
- const G = $e.indexOf(l), te = N.find((He) => He.value === l.value);
483
- return /* @__PURE__ */ t("button", { title: (te == null ? void 0 : te.label) || l.label, type: "button", className: A(o.optionItem, oe.includes(l.value) && o.optionItemSelected, l.disabled && o.optionItemDisabled, G === q && o.optionItemFocused), onClick: () => g || C ? ee(l) : Q(l), disabled: l.disabled, "data-dropdown-option-item": !0, children: /* @__PURE__ */ w("div", { className: o.optionContent, children: [
482
+ const G = to.indexOf(l), re = N.find((ro) => ro.value === l.value);
483
+ return /* @__PURE__ */ t("button", { title: (re == null ? void 0 : re.label) || l.label, type: "button", className: A(o.optionItem, H.includes(l.value) && o.optionItemSelected, l.disabled && o.optionItemDisabled, G === q && o.optionItemFocused), onClick: () => g || C ? te(l) : oe(l), disabled: l.disabled, "data-dropdown-option-item": !0, children: /* @__PURE__ */ v("div", { className: o.optionContent, children: [
484
484
  /* @__PURE__ */ t("span", { className: o.optionLabel, children: l.label }),
485
- oe.includes(l.value) && /* @__PURE__ */ t(U, { icon: "ap-icon-check", className: o.tickIcon })
485
+ H.includes(l.value) && /* @__PURE__ */ t(j, { icon: "ap-icon-check", className: o.tickIcon })
486
486
  ] }) }, l.value);
487
487
  })
488
488
  ] }, e)) : null,
489
- g && L !== "" && !N.find((e) => e.label === L) && /* @__PURE__ */ t("button", { type: "button", className: A(o.optionItem, o.optionItemCreatable), title: L ? `Create "${L}"` : "Create new option", onClick: () => Ue(L), children: /* @__PURE__ */ t("div", { className: o.optionContent, children: /* @__PURE__ */ t("span", { className: o.optionLabel, children: L ? `Create "${L}"` : "Create new option" }) }) }),
489
+ g && L !== "" && !N.find((e) => e.label === L) && /* @__PURE__ */ t("button", { type: "button", className: A(o.optionItem, o.optionItemCreatable), title: L ? `Create "${L}"` : "Create new option", onClick: () => Ze(L), children: /* @__PURE__ */ t("div", { className: o.optionContent, children: /* @__PURE__ */ t("span", { className: o.optionLabel, children: L ? `Create "${L}"` : "Create new option" }) }) }),
490
490
  N.length === 0 && !g && !C && /* @__PURE__ */ t("div", { className: o.noOptions, children: "No options found" }),
491
491
  N.length === 0 && C && /* @__PURE__ */ t("div", { className: o.noOptions, children: "No options found" })
492
492
  ] }),
493
- D && !g && !C && /* @__PURE__ */ w("div", { className: o.actionButtons, children: [
494
- /* @__PURE__ */ t(ne, { type: "primary", variant: "cancel", size: "md", onClick: Je, children: "Cancel" }),
495
- /* @__PURE__ */ t(ne, { type: "primary", variant: "default", size: "md", onClick: qe, disabled: !Ye, children: "Apply" })
493
+ D && !g && !C && /* @__PURE__ */ v("div", { className: o.actionButtons, children: [
494
+ /* @__PURE__ */ t(de, { type: "primary", variant: "cancel", size: "md", onClick: Xe, children: "Cancel" }),
495
+ /* @__PURE__ */ t(de, { type: "primary", variant: "default", size: "md", onClick: Ke, disabled: !eo, children: "Apply" })
496
496
  ] })
497
497
  ] }) }) })
498
498
  ] }) }),
499
- (b || x || F && y) && /* @__PURE__ */ w("div", { className: o.helpers, children: [
499
+ (b || x || F && y) && /* @__PURE__ */ v("div", { className: o.helpers, children: [
500
500
  b ? /* @__PURE__ */ t("span", { title: b, className: o.errorMessage, children: b }) : x && /* @__PURE__ */ t("span", { title: x, className: A(o.helpText, d && o.helpTextDisabled), children: x }),
501
501
  F && y && /* @__PURE__ */ t("a", { href: F, className: A(o.helpLink, d && o.helpLinkDisabled), target: "_blank", rel: "noopener noreferrer", children: y })
502
502
  ] })
503
503
  ] });
504
504
  }
505
505
  export {
506
- Gt as default
506
+ jt as default
507
507
  };
@@ -31,4 +31,4 @@ export type TooltipProps = {
31
31
  * @param {() => void} [props.onClose] - Callback fired when the tooltip is closed (only available for 'md' size)
32
32
  * @returns {JSX.Element} The rendered Tooltip component
33
33
  */
34
- export default function Tooltip({ children, content, size, theme, tipSide, tipAlignment, keepVisible, startVisible, onClose, className }: TooltipProps): import("react/jsx-runtime").JSX.Element;
34
+ export default function Tooltip({ children, content, size, theme, tipSide, tipAlignment, keepVisible, startVisible, onClose, className, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx as u, jsxs as k } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import { useState as z } from "react";
3
+ import { useState as Z } from "react";
4
4
  import { c as j } from "../../clsx-OuTLNxxd.js";
5
5
  import ee from "../Icon/Icon.js";
6
6
  import { P as G, c as te, u as oe, d as F, a as C, h as re } from "../../index-DWydnyjJ.js";
@@ -157,7 +157,7 @@ q.displayName = M;
157
157
  var b = "TooltipContent", W = i.forwardRef(
158
158
  (t, o) => {
159
159
  const e = Te(b, t.__scopeTooltip), { forceMount: r = e.forceMount, side: n = "top", ...s } = t, a = O(b, t.__scopeTooltip);
160
- return /* @__PURE__ */ u(K, { present: r || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ u(J, { side: n, ...s, ref: o }) : /* @__PURE__ */ u(ye, { side: n, ...s, ref: o }) });
160
+ return /* @__PURE__ */ u(K, { present: r || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ u(z, { side: n, ...s, ref: o }) : /* @__PURE__ */ u(ye, { side: n, ...s, ref: o }) });
161
161
  }
162
162
  ), ye = i.forwardRef((t, o) => {
163
163
  const e = O(b, t.__scopeTooltip), r = I(b, t.__scopeTooltip), n = i.useRef(null), s = F(o, n), [a, h] = i.useState(null), { trigger: l, onClose: f } = e, c = n.current, { onPointerInTransitChange: d } = r, v = i.useCallback(() => {
@@ -184,8 +184,8 @@ var b = "TooltipContent", W = i.forwardRef(
184
184
  };
185
185
  return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
186
186
  }
187
- }, [l, c, a, f, v]), /* @__PURE__ */ u(J, { ...t, ref: s });
188
- }), [xe, ge] = D(R, { isInside: !1 }), Ce = re("TooltipContent"), J = i.forwardRef(
187
+ }, [l, c, a, f, v]), /* @__PURE__ */ u(z, { ...t, ref: s });
188
+ }), [xe, ge] = D(R, { isInside: !1 }), Ce = re("TooltipContent"), z = i.forwardRef(
189
189
  (t, o) => {
190
190
  const {
191
191
  __scopeTooltip: e,
@@ -238,16 +238,16 @@ var b = "TooltipContent", W = i.forwardRef(
238
238
  }
239
239
  );
240
240
  W.displayName = b;
241
- var Q = "TooltipArrow", Z = i.forwardRef(
241
+ var J = "TooltipArrow", Q = i.forwardRef(
242
242
  (t, o) => {
243
243
  const { __scopeTooltip: e, ...r } = t, n = L(e);
244
244
  return ge(
245
- Q,
245
+ J,
246
246
  e
247
247
  ).isInside ? null : /* @__PURE__ */ u(se, { ...n, ...r, ref: o });
248
248
  }
249
249
  );
250
- Z.displayName = Q;
250
+ Q.displayName = J;
251
251
  function be(t, o) {
252
252
  const e = Math.abs(o.top - t.y), r = Math.abs(o.bottom - t.y), n = Math.abs(o.right - t.x), s = Math.abs(o.left - t.x);
253
253
  switch (Math.min(e, r, n, s)) {
@@ -340,7 +340,7 @@ function Oe(t) {
340
340
  }
341
341
  return e.pop(), o.length === 1 && e.length === 1 && o[0].x === e[0].x && o[0].y === e[0].y ? o : o.concat(e);
342
342
  }
343
- var De = $, Le = Y, ke = X, Ae = q, Ne = W, Ie = Z;
343
+ var De = $, Le = Y, ke = X, Ae = q, Ne = W, Ie = Q;
344
344
  const Me = "Tooltip-module__tooltip___LjRUX", Se = "Tooltip-module__closable___MjoEb", y = {
345
345
  "tooltip-container": "Tooltip-module__tooltip-container___X4jVa",
346
346
  tooltip: Me,
@@ -370,7 +370,7 @@ function Ye({
370
370
  onClose: l,
371
371
  className: f
372
372
  }) {
373
- const [c, d] = z(h), v = () => {
373
+ const [c, d] = Z(h), v = () => {
374
374
  d(!1);
375
375
  }, p = (_) => {
376
376
  _.key === "Escape" && d(!1);
@@ -385,7 +385,9 @@ function Ye({
385
385
  alignItems: "center",
386
386
  justifyContent: "center"
387
387
  }, className: y["tooltip-trigger"], children: t }) }),
388
- /* @__PURE__ */ u(Ae, { children: /* @__PURE__ */ u(Ne, { align: s, side: n, sideOffset: 0, children: /* @__PURE__ */ k("div", { id: "tooltip", role: "tooltip", className: j(y.tooltip, y[`tooltip-${e}`], y[`tooltip-${r}`], y[`tooltip-${n}`], y[`tooltip-${s}`], l && y.closable), children: [
388
+ /* @__PURE__ */ u(Ae, { children: /* @__PURE__ */ u(Ne, { style: {
389
+ zIndex: 9999
390
+ }, align: s, side: n, sideOffset: 0, children: /* @__PURE__ */ k("div", { id: "tooltip", role: "tooltip", className: j(y.tooltip, y[`tooltip-${e}`], y[`tooltip-${r}`], y[`tooltip-${n}`], y[`tooltip-${s}`], l && y.closable), children: [
389
391
  /* @__PURE__ */ u("div", { className: y["tooltip-content"], children: o }),
390
392
  (l || a) && e === "md" && /* @__PURE__ */ u("button", { className: y["tooltip-close-button"], onClick: v, children: /* @__PURE__ */ u(ee, { icon: "ap-icon-close", className: y["tooltip-close-icon"] }) }),
391
393
  /* @__PURE__ */ u(Ie, { width: 12, height: 6, className: y["tooltip-arrow"] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alixpartners/ui-components",
3
- "version": "2.0.0-beta.18",
3
+ "version": "2.0.0-beta.18.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"