@cfx-dev/ui-components 5.0.14 → 5.0.16

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,37 +1,37 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
3
  import gn from "react";
4
- import { c as me, P as N, a as g, b as U, u as ye, g as wn, f as Mn, h as Pe } from "./index-CfQtbUfi.js";
4
+ import { c as me, P as N, a as g, b as U, u as ye, g as wn, f as _n, h as Pe } from "./index-CfQtbUfi.js";
5
5
  import { c as xe, u as Te } from "./index-9LBuZ7x4.js";
6
- import { u as le, a as ve, c as Ae, h as _n, b as hn, R as Cn, F as Rn, D as In, C as bn, d as En, A as Sn, e as Dn } from "./Combination-CcTTSYNP.js";
6
+ import { u as le, a as ve, c as Ae, h as Mn, b as hn, R as Cn, F as Rn, D as In, C as bn, d as En, A as Sn, e as Dn } from "./Combination-CcTTSYNP.js";
7
7
  import { P as ge } from "./index-3ctv5u9o.js";
8
8
  import { clsx as Se } from "./utils/clsx.js";
9
9
  import { ui as yn } from "./utils/ui/ui.js";
10
- var de = "rovingFocusGroup.onEntryFocus", Pn = { bubbles: !1, cancelable: !0 }, z = "RovingFocusGroup", [fe, Ne, xn] = xe(z), [Tn, Oe] = me(
11
- z,
10
+ var de = "rovingFocusGroup.onEntryFocus", Pn = { bubbles: !1, cancelable: !0 }, Z = "RovingFocusGroup", [fe, Ne, xn] = xe(Z), [Tn, Oe] = me(
11
+ Z,
12
12
  [xn]
13
- ), [An, Nn] = Tn(z), Fe = a.forwardRef(
13
+ ), [An, Nn] = Tn(Z), Fe = a.forwardRef(
14
14
  (e, t) => /* @__PURE__ */ s(fe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ s(fe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ s(On, { ...e, ref: t }) }) })
15
15
  );
16
- Fe.displayName = z;
16
+ Fe.displayName = Z;
17
17
  var On = a.forwardRef((e, t) => {
18
18
  const {
19
19
  __scopeRovingFocusGroup: n,
20
20
  orientation: o,
21
21
  loop: r = !1,
22
22
  dir: c,
23
- currentTabStopId: i,
23
+ currentTabStopId: d,
24
24
  defaultCurrentTabStopId: l,
25
25
  onCurrentTabStopIdChange: m,
26
26
  onEntryFocus: v,
27
- preventScrollOnEntryFocus: d = !1,
28
- ...u
29
- } = e, f = a.useRef(null), M = U(t, f), w = Te(c), [b, _] = ye({
30
- prop: i,
27
+ preventScrollOnEntryFocus: u = !1,
28
+ ...i
29
+ } = e, f = a.useRef(null), _ = U(t, f), w = Te(c), [b, M] = ye({
30
+ prop: d,
31
31
  defaultProp: l ?? null,
32
32
  onChange: m,
33
- caller: z
34
- }), [R, T] = a.useState(!1), h = ve(v), D = Ne(n), B = a.useRef(!1), [J, O] = a.useState(0);
33
+ caller: Z
34
+ }), [R, T] = a.useState(!1), h = ve(v), D = Ne(n), B = a.useRef(!1), [Q, O] = a.useState(0);
35
35
  return a.useEffect(() => {
36
36
  const C = f.current;
37
37
  if (C)
@@ -45,8 +45,8 @@ var On = a.forwardRef((e, t) => {
45
45
  loop: r,
46
46
  currentTabStopId: b,
47
47
  onItemFocus: a.useCallback(
48
- (C) => _(C),
49
- [_]
48
+ (C) => M(C),
49
+ [M]
50
50
  ),
51
51
  onItemShiftTab: a.useCallback(() => T(!0), []),
52
52
  onFocusableItemAdd: a.useCallback(
@@ -60,10 +60,10 @@ var On = a.forwardRef((e, t) => {
60
60
  children: /* @__PURE__ */ s(
61
61
  N.div,
62
62
  {
63
- tabIndex: R || J === 0 ? -1 : 0,
63
+ tabIndex: R || Q === 0 ? -1 : 0,
64
64
  "data-orientation": o,
65
- ...u,
66
- ref: M,
65
+ ...i,
66
+ ref: _,
67
67
  style: { outline: "none", ...e.style },
68
68
  onMouseDown: g(e.onMouseDown, () => {
69
69
  B.current = !0;
@@ -73,10 +73,10 @@ var On = a.forwardRef((e, t) => {
73
73
  if (C.target === C.currentTarget && G && !R) {
74
74
  const F = new CustomEvent(de, Pn);
75
75
  if (C.currentTarget.dispatchEvent(F), !F.defaultPrevented) {
76
- const V = D().filter((P) => P.focusable), W = V.find((P) => P.active), Q = V.find((P) => P.id === b), se = [W, Q, ...V].filter(
76
+ const V = D().filter((P) => P.focusable), W = V.find((P) => P.active), ee = V.find((P) => P.id === b), se = [W, ee, ...V].filter(
77
77
  Boolean
78
78
  ).map((P) => P.ref.current);
79
- Le(se, d);
79
+ Le(se, u);
80
80
  }
81
81
  }
82
82
  B.current = !1;
@@ -93,13 +93,13 @@ var On = a.forwardRef((e, t) => {
93
93
  focusable: o = !0,
94
94
  active: r = !1,
95
95
  tabStopId: c,
96
- children: i,
96
+ children: d,
97
97
  ...l
98
- } = e, m = le(), v = c || m, d = Nn(ke, n), u = d.currentTabStopId === v, f = Ne(n), { onFocusableItemAdd: M, onFocusableItemRemove: w, currentTabStopId: b } = d;
98
+ } = e, m = le(), v = c || m, u = Nn(ke, n), i = u.currentTabStopId === v, f = Ne(n), { onFocusableItemAdd: _, onFocusableItemRemove: w, currentTabStopId: b } = u;
99
99
  return a.useEffect(() => {
100
100
  if (o)
101
- return M(), () => w();
102
- }, [o, M, w]), /* @__PURE__ */ s(
101
+ return _(), () => w();
102
+ }, [o, _, w]), /* @__PURE__ */ s(
103
103
  fe.ItemSlot,
104
104
  {
105
105
  scope: n,
@@ -109,35 +109,35 @@ var On = a.forwardRef((e, t) => {
109
109
  children: /* @__PURE__ */ s(
110
110
  N.span,
111
111
  {
112
- tabIndex: u ? 0 : -1,
113
- "data-orientation": d.orientation,
112
+ tabIndex: i ? 0 : -1,
113
+ "data-orientation": u.orientation,
114
114
  ...l,
115
115
  ref: t,
116
- onMouseDown: g(e.onMouseDown, (_) => {
117
- o ? d.onItemFocus(v) : _.preventDefault();
116
+ onMouseDown: g(e.onMouseDown, (M) => {
117
+ o ? u.onItemFocus(v) : M.preventDefault();
118
118
  }),
119
- onFocus: g(e.onFocus, () => d.onItemFocus(v)),
120
- onKeyDown: g(e.onKeyDown, (_) => {
121
- if (_.key === "Tab" && _.shiftKey) {
122
- d.onItemShiftTab();
119
+ onFocus: g(e.onFocus, () => u.onItemFocus(v)),
120
+ onKeyDown: g(e.onKeyDown, (M) => {
121
+ if (M.key === "Tab" && M.shiftKey) {
122
+ u.onItemShiftTab();
123
123
  return;
124
124
  }
125
- if (_.target !== _.currentTarget) return;
126
- const R = Gn(_, d.orientation, d.dir);
125
+ if (M.target !== M.currentTarget) return;
126
+ const R = Gn(M, u.orientation, u.dir);
127
127
  if (R !== void 0) {
128
- if (_.metaKey || _.ctrlKey || _.altKey || _.shiftKey) return;
129
- _.preventDefault();
128
+ if (M.metaKey || M.ctrlKey || M.altKey || M.shiftKey) return;
129
+ M.preventDefault();
130
130
  let h = f().filter((D) => D.focusable).map((D) => D.ref.current);
131
131
  if (R === "last") h.reverse();
132
132
  else if (R === "prev" || R === "next") {
133
133
  R === "prev" && h.reverse();
134
- const D = h.indexOf(_.currentTarget);
135
- h = d.loop ? Ln(h, D + 1) : h.slice(D + 1);
134
+ const D = h.indexOf(M.currentTarget);
135
+ h = u.loop ? Ln(h, D + 1) : h.slice(D + 1);
136
136
  }
137
137
  setTimeout(() => Le(h));
138
138
  }
139
139
  }),
140
- children: typeof i == "function" ? i({ isCurrentTabStop: u, hasTabStop: b != null }) : i
140
+ children: typeof d == "function" ? d({ isCurrentTabStop: i, hasTabStop: b != null }) : d
141
141
  }
142
142
  )
143
143
  }
@@ -177,42 +177,42 @@ var Kn = Fe, Un = Ge, pe = ["Enter", " "], $n = ["ArrowDown", "PageUp", "Home"],
177
177
  }, Wn = {
178
178
  ltr: ["ArrowLeft"],
179
179
  rtl: ["ArrowRight"]
180
- }, Z = "Menu", [H, Yn, Xn] = xe(Z), [k, Ue] = me(Z, [
180
+ }, q = "Menu", [j, Yn, Xn] = xe(q), [k, Ue] = me(q, [
181
181
  Xn,
182
182
  Ae,
183
183
  Oe
184
- ]), re = Ae(), $e = Oe(), [Hn, $] = k(Z), [jn, q] = k(Z), Be = (e) => {
185
- const { __scopeMenu: t, open: n = !1, children: o, dir: r, onOpenChange: c, modal: i = !0 } = e, l = re(t), [m, v] = a.useState(null), d = a.useRef(!1), u = ve(c), f = Te(r);
184
+ ]), re = Ae(), $e = Oe(), [Hn, $] = k(q), [jn, J] = k(q), Be = (e) => {
185
+ const { __scopeMenu: t, open: n = !1, children: o, dir: r, onOpenChange: c, modal: d = !0 } = e, l = re(t), [m, v] = a.useState(null), u = a.useRef(!1), i = ve(c), f = Te(r);
186
186
  return a.useEffect(() => {
187
- const M = () => {
188
- d.current = !0, document.addEventListener("pointerdown", w, { capture: !0, once: !0 }), document.addEventListener("pointermove", w, { capture: !0, once: !0 });
189
- }, w = () => d.current = !1;
190
- return document.addEventListener("keydown", M, { capture: !0 }), () => {
191
- document.removeEventListener("keydown", M, { capture: !0 }), document.removeEventListener("pointerdown", w, { capture: !0 }), document.removeEventListener("pointermove", w, { capture: !0 });
187
+ const _ = () => {
188
+ u.current = !0, document.addEventListener("pointerdown", w, { capture: !0, once: !0 }), document.addEventListener("pointermove", w, { capture: !0, once: !0 });
189
+ }, w = () => u.current = !1;
190
+ return document.addEventListener("keydown", _, { capture: !0 }), () => {
191
+ document.removeEventListener("keydown", _, { capture: !0 }), document.removeEventListener("pointerdown", w, { capture: !0 }), document.removeEventListener("pointermove", w, { capture: !0 });
192
192
  };
193
193
  }, []), /* @__PURE__ */ s(En, { ...l, children: /* @__PURE__ */ s(
194
194
  Hn,
195
195
  {
196
196
  scope: t,
197
197
  open: n,
198
- onOpenChange: u,
198
+ onOpenChange: i,
199
199
  content: m,
200
200
  onContentChange: v,
201
201
  children: /* @__PURE__ */ s(
202
202
  jn,
203
203
  {
204
204
  scope: t,
205
- onClose: a.useCallback(() => u(!1), [u]),
206
- isUsingKeyboardRef: d,
205
+ onClose: a.useCallback(() => i(!1), [i]),
206
+ isUsingKeyboardRef: u,
207
207
  dir: f,
208
- modal: i,
208
+ modal: d,
209
209
  children: o
210
210
  }
211
211
  )
212
212
  }
213
213
  ) });
214
214
  };
215
- Be.displayName = Z;
215
+ Be.displayName = q;
216
216
  var zn = "MenuAnchor", we = a.forwardRef(
217
217
  (e, t) => {
218
218
  const { __scopeMenu: n, ...o } = e, r = re(n);
@@ -220,21 +220,21 @@ var zn = "MenuAnchor", we = a.forwardRef(
220
220
  }
221
221
  );
222
222
  we.displayName = zn;
223
- var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
223
+ var Zn = "MenuPortal", [vo, Ve] = k(Zn, {
224
224
  forceMount: void 0
225
- }), S = "MenuContent", [qn, Me] = k(S), We = a.forwardRef(
225
+ }), S = "MenuContent", [qn, _e] = k(S), We = a.forwardRef(
226
226
  (e, t) => {
227
- const n = Ve(S, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, c = $(S, e.__scopeMenu), i = q(S, e.__scopeMenu);
228
- return /* @__PURE__ */ s(H.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(ge, { present: o || c.open, children: /* @__PURE__ */ s(H.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ s(Jn, { ...r, ref: t }) : /* @__PURE__ */ s(Qn, { ...r, ref: t }) }) }) });
227
+ const n = Ve(S, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, c = $(S, e.__scopeMenu), d = J(S, e.__scopeMenu);
228
+ return /* @__PURE__ */ s(j.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(ge, { present: o || c.open, children: /* @__PURE__ */ s(j.Slot, { scope: e.__scopeMenu, children: d.modal ? /* @__PURE__ */ s(Jn, { ...r, ref: t }) : /* @__PURE__ */ s(Qn, { ...r, ref: t }) }) }) });
229
229
  }
230
230
  ), Jn = a.forwardRef(
231
231
  (e, t) => {
232
232
  const n = $(S, e.__scopeMenu), o = a.useRef(null), r = U(t, o);
233
233
  return a.useEffect(() => {
234
234
  const c = o.current;
235
- if (c) return _n(c);
235
+ if (c) return Mn(c);
236
236
  }, []), /* @__PURE__ */ s(
237
- _e,
237
+ Me,
238
238
  {
239
239
  ...e,
240
240
  ref: r,
@@ -253,7 +253,7 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
253
253
  ), Qn = a.forwardRef((e, t) => {
254
254
  const n = $(S, e.__scopeMenu);
255
255
  return /* @__PURE__ */ s(
256
- _e,
256
+ Me,
257
257
  {
258
258
  ...e,
259
259
  ref: t,
@@ -263,24 +263,24 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
263
263
  onDismiss: () => n.onOpenChange(!1)
264
264
  }
265
265
  );
266
- }), et = Mn("MenuContent.ScrollLock"), _e = a.forwardRef(
266
+ }), et = _n("MenuContent.ScrollLock"), Me = a.forwardRef(
267
267
  (e, t) => {
268
268
  const {
269
269
  __scopeMenu: n,
270
270
  loop: o = !1,
271
271
  trapFocus: r,
272
272
  onOpenAutoFocus: c,
273
- onCloseAutoFocus: i,
273
+ onCloseAutoFocus: d,
274
274
  disableOutsidePointerEvents: l,
275
275
  onEntryFocus: m,
276
276
  onEscapeKeyDown: v,
277
- onPointerDownOutside: d,
278
- onFocusOutside: u,
277
+ onPointerDownOutside: u,
278
+ onFocusOutside: i,
279
279
  onInteractOutside: f,
280
- onDismiss: M,
280
+ onDismiss: _,
281
281
  disableOutsideScroll: w,
282
282
  ...b
283
- } = e, _ = $(S, n), R = q(S, n), T = re(n), h = $e(n), D = Yn(n), [B, J] = a.useState(null), O = a.useRef(null), C = U(t, O, _.onContentChange), G = a.useRef(0), F = a.useRef(""), V = a.useRef(0), W = a.useRef(null), Q = a.useRef("right"), ee = a.useRef(0), se = w ? Cn : a.Fragment, P = w ? { as: et, allowPinchZoom: !0 } : void 0, vn = (p) => {
283
+ } = e, M = $(S, n), R = J(S, n), T = re(n), h = $e(n), D = Yn(n), [B, Q] = a.useState(null), O = a.useRef(null), C = U(t, O, M.onContentChange), G = a.useRef(0), F = a.useRef(""), V = a.useRef(0), W = a.useRef(null), ee = a.useRef("right"), ne = a.useRef(0), se = w ? Cn : a.Fragment, P = w ? { as: et, allowPinchZoom: !0 } : void 0, vn = (p) => {
284
284
  var K, be;
285
285
  const E = F.current + p, y = D().filter((x) => !x.disabled), A = document.activeElement, ue = (K = y.find((x) => x.ref.current === A)) == null ? void 0 : K.textValue, ie = y.map((x) => x.textValue), Ie = ft(ie, E, ue), Y = (be = y.find((x) => x.textValue === Ie)) == null ? void 0 : be.ref.current;
286
286
  (function x(Ee) {
@@ -290,7 +290,7 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
290
290
  a.useEffect(() => () => window.clearTimeout(G.current), []), hn();
291
291
  const L = a.useCallback((p) => {
292
292
  var y, A;
293
- return Q.current === ((y = W.current) == null ? void 0 : y.side) && mt(p, (A = W.current) == null ? void 0 : A.area);
293
+ return ee.current === ((y = W.current) == null ? void 0 : y.side) && mt(p, (A = W.current) == null ? void 0 : A.area);
294
294
  }, []);
295
295
  return /* @__PURE__ */ s(
296
296
  qn,
@@ -306,7 +306,7 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
306
306
  onItemLeave: a.useCallback(
307
307
  (p) => {
308
308
  var E;
309
- L(p) || ((E = O.current) == null || E.focus(), J(null));
309
+ L(p) || ((E = O.current) == null || E.focus(), Q(null));
310
310
  },
311
311
  [L]
312
312
  ),
@@ -329,17 +329,17 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
329
329
  var E;
330
330
  p.preventDefault(), (E = O.current) == null || E.focus({ preventScroll: !0 });
331
331
  }),
332
- onUnmountAutoFocus: i,
332
+ onUnmountAutoFocus: d,
333
333
  children: /* @__PURE__ */ s(
334
334
  In,
335
335
  {
336
336
  asChild: !0,
337
337
  disableOutsidePointerEvents: l,
338
338
  onEscapeKeyDown: v,
339
- onPointerDownOutside: d,
340
- onFocusOutside: u,
339
+ onPointerDownOutside: u,
340
+ onFocusOutside: i,
341
341
  onInteractOutside: f,
342
- onDismiss: M,
342
+ onDismiss: _,
343
343
  children: /* @__PURE__ */ s(
344
344
  Kn,
345
345
  {
@@ -349,7 +349,7 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
349
349
  orientation: "vertical",
350
350
  loop: o,
351
351
  currentTabStopId: B,
352
- onCurrentTabStopIdChange: J,
352
+ onCurrentTabStopIdChange: Q,
353
353
  onEntryFocus: g(m, (p) => {
354
354
  R.isUsingKeyboardRef.current || p.preventDefault();
355
355
  }),
@@ -359,7 +359,7 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
359
359
  {
360
360
  role: "menu",
361
361
  "aria-orientation": "vertical",
362
- "data-state": cn(_.open),
362
+ "data-state": cn(M.open),
363
363
  "data-radix-menu-content": "",
364
364
  dir: R.dir,
365
365
  ...T,
@@ -380,11 +380,11 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
380
380
  }),
381
381
  onPointerMove: g(
382
382
  e.onPointerMove,
383
- j((p) => {
384
- const E = p.target, y = ee.current !== p.clientX;
383
+ z((p) => {
384
+ const E = p.target, y = ne.current !== p.clientX;
385
385
  if (p.currentTarget.contains(E) && y) {
386
- const A = p.clientX > ee.current ? "right" : "left";
387
- Q.current = A, ee.current = p.clientX;
386
+ const A = p.clientX > ne.current ? "right" : "left";
387
+ ee.current = A, ne.current = p.clientX;
388
388
  }
389
389
  })
390
390
  )
@@ -417,11 +417,11 @@ var tt = "MenuLabel", Ye = a.forwardRef(
417
417
  Ye.displayName = tt;
418
418
  var te = "MenuItem", De = "menu.itemSelect", ae = a.forwardRef(
419
419
  (e, t) => {
420
- const { disabled: n = !1, onSelect: o, ...r } = e, c = a.useRef(null), i = q(te, e.__scopeMenu), l = Me(te, e.__scopeMenu), m = U(t, c), v = a.useRef(!1), d = () => {
421
- const u = c.current;
422
- if (!n && u) {
420
+ const { disabled: n = !1, onSelect: o, ...r } = e, c = a.useRef(null), d = J(te, e.__scopeMenu), l = _e(te, e.__scopeMenu), m = U(t, c), v = a.useRef(!1), u = () => {
421
+ const i = c.current;
422
+ if (!n && i) {
423
423
  const f = new CustomEvent(De, { bubbles: !0, cancelable: !0 });
424
- u.addEventListener(De, (M) => o == null ? void 0 : o(M), { once: !0 }), wn(u, f), f.defaultPrevented ? v.current = !1 : i.onClose();
424
+ i.addEventListener(De, (_) => o == null ? void 0 : o(_), { once: !0 }), wn(i, f), f.defaultPrevented ? v.current = !1 : d.onClose();
425
425
  }
426
426
  };
427
427
  return /* @__PURE__ */ s(
@@ -430,18 +430,18 @@ var te = "MenuItem", De = "menu.itemSelect", ae = a.forwardRef(
430
430
  ...r,
431
431
  ref: m,
432
432
  disabled: n,
433
- onClick: g(e.onClick, d),
434
- onPointerDown: (u) => {
433
+ onClick: g(e.onClick, u),
434
+ onPointerDown: (i) => {
435
435
  var f;
436
- (f = e.onPointerDown) == null || f.call(e, u), v.current = !0;
436
+ (f = e.onPointerDown) == null || f.call(e, i), v.current = !0;
437
437
  },
438
- onPointerUp: g(e.onPointerUp, (u) => {
438
+ onPointerUp: g(e.onPointerUp, (i) => {
439
439
  var f;
440
- v.current || (f = u.currentTarget) == null || f.click();
440
+ v.current || (f = i.currentTarget) == null || f.click();
441
441
  }),
442
- onKeyDown: g(e.onKeyDown, (u) => {
442
+ onKeyDown: g(e.onKeyDown, (i) => {
443
443
  const f = l.searchRef.current !== "";
444
- n || f && u.key === " " || pe.includes(u.key) && (u.currentTarget.click(), u.preventDefault());
444
+ n || f && i.key === " " || pe.includes(i.key) && (i.currentTarget.click(), i.preventDefault());
445
445
  })
446
446
  }
447
447
  );
@@ -450,12 +450,12 @@ var te = "MenuItem", De = "menu.itemSelect", ae = a.forwardRef(
450
450
  ae.displayName = te;
451
451
  var Xe = a.forwardRef(
452
452
  (e, t) => {
453
- const { __scopeMenu: n, disabled: o = !1, textValue: r, ...c } = e, i = Me(te, n), l = $e(n), m = a.useRef(null), v = U(t, m), [d, u] = a.useState(!1), [f, M] = a.useState("");
453
+ const { __scopeMenu: n, disabled: o = !1, textValue: r, ...c } = e, d = _e(te, n), l = $e(n), m = a.useRef(null), v = U(t, m), [u, i] = a.useState(!1), [f, _] = a.useState("");
454
454
  return a.useEffect(() => {
455
455
  const w = m.current;
456
- w && M((w.textContent ?? "").trim());
456
+ w && _((w.textContent ?? "").trim());
457
457
  }, [c.children]), /* @__PURE__ */ s(
458
- H.ItemSlot,
458
+ j.ItemSlot,
459
459
  {
460
460
  scope: n,
461
461
  disabled: o,
@@ -464,23 +464,23 @@ var Xe = a.forwardRef(
464
464
  N.div,
465
465
  {
466
466
  role: "menuitem",
467
- "data-highlighted": d ? "" : void 0,
467
+ "data-highlighted": u ? "" : void 0,
468
468
  "aria-disabled": o || void 0,
469
469
  "data-disabled": o ? "" : void 0,
470
470
  ...c,
471
471
  ref: v,
472
472
  onPointerMove: g(
473
473
  e.onPointerMove,
474
- j((w) => {
475
- o ? i.onItemLeave(w) : (i.onItemEnter(w), w.defaultPrevented || w.currentTarget.focus({ preventScroll: !0 }));
474
+ z((w) => {
475
+ o ? d.onItemLeave(w) : (d.onItemEnter(w), w.defaultPrevented || w.currentTarget.focus({ preventScroll: !0 }));
476
476
  })
477
477
  ),
478
478
  onPointerLeave: g(
479
479
  e.onPointerLeave,
480
- j((w) => i.onItemLeave(w))
480
+ z((w) => d.onItemLeave(w))
481
481
  ),
482
- onFocus: g(e.onFocus, () => u(!0)),
483
- onBlur: g(e.onBlur, () => u(!1))
482
+ onFocus: g(e.onFocus, () => i(!0)),
483
+ onBlur: g(e.onBlur, () => i(!1))
484
484
  }
485
485
  ) })
486
486
  }
@@ -532,8 +532,8 @@ var Ze = "MenuRadioItem", qe = a.forwardRef(
532
532
  onSelect: g(
533
533
  o.onSelect,
534
534
  () => {
535
- var i;
536
- return (i = r.onValueChange) == null ? void 0 : i.call(r, n);
535
+ var d;
536
+ return (d = r.onValueChange) == null ? void 0 : d.call(r, n);
537
537
  },
538
538
  { checkForDefaultPrevented: !1 }
539
539
  )
@@ -587,15 +587,15 @@ var ut = "MenuArrow", nn = a.forwardRef(
587
587
  }
588
588
  );
589
589
  nn.displayName = ut;
590
- var it = "MenuSub", [vo, tn] = k(it), X = "MenuSubTrigger", on = a.forwardRef(
590
+ var it = "MenuSub", [go, tn] = k(it), H = "MenuSubTrigger", on = a.forwardRef(
591
591
  (e, t) => {
592
- const n = $(X, e.__scopeMenu), o = q(X, e.__scopeMenu), r = tn(X, e.__scopeMenu), c = Me(X, e.__scopeMenu), i = a.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: m } = c, v = { __scopeMenu: e.__scopeMenu }, d = a.useCallback(() => {
593
- i.current && window.clearTimeout(i.current), i.current = null;
592
+ const n = $(H, e.__scopeMenu), o = J(H, e.__scopeMenu), r = tn(H, e.__scopeMenu), c = _e(H, e.__scopeMenu), d = a.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: m } = c, v = { __scopeMenu: e.__scopeMenu }, u = a.useCallback(() => {
593
+ d.current && window.clearTimeout(d.current), d.current = null;
594
594
  }, []);
595
- return a.useEffect(() => d, [d]), a.useEffect(() => {
596
- const u = l.current;
595
+ return a.useEffect(() => u, [u]), a.useEffect(() => {
596
+ const i = l.current;
597
597
  return () => {
598
- window.clearTimeout(u), m(null);
598
+ window.clearTimeout(i), m(null);
599
599
  };
600
600
  }, [l, m]), /* @__PURE__ */ s(we, { asChild: !0, ...v, children: /* @__PURE__ */ s(
601
601
  Xe,
@@ -607,31 +607,31 @@ var it = "MenuSub", [vo, tn] = k(it), X = "MenuSubTrigger", on = a.forwardRef(
607
607
  "data-state": cn(n.open),
608
608
  ...e,
609
609
  ref: Pe(t, r.onTriggerChange),
610
- onClick: (u) => {
610
+ onClick: (i) => {
611
611
  var f;
612
- (f = e.onClick) == null || f.call(e, u), !(e.disabled || u.defaultPrevented) && (u.currentTarget.focus(), n.open || n.onOpenChange(!0));
612
+ (f = e.onClick) == null || f.call(e, i), !(e.disabled || i.defaultPrevented) && (i.currentTarget.focus(), n.open || n.onOpenChange(!0));
613
613
  },
614
614
  onPointerMove: g(
615
615
  e.onPointerMove,
616
- j((u) => {
617
- c.onItemEnter(u), !u.defaultPrevented && !e.disabled && !n.open && !i.current && (c.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
618
- n.onOpenChange(!0), d();
616
+ z((i) => {
617
+ c.onItemEnter(i), !i.defaultPrevented && !e.disabled && !n.open && !d.current && (c.onPointerGraceIntentChange(null), d.current = window.setTimeout(() => {
618
+ n.onOpenChange(!0), u();
619
619
  }, 100));
620
620
  })
621
621
  ),
622
622
  onPointerLeave: g(
623
623
  e.onPointerLeave,
624
- j((u) => {
625
- var M, w;
626
- d();
627
- const f = (M = n.content) == null ? void 0 : M.getBoundingClientRect();
624
+ z((i) => {
625
+ var _, w;
626
+ u();
627
+ const f = (_ = n.content) == null ? void 0 : _.getBoundingClientRect();
628
628
  if (f) {
629
- const b = (w = n.content) == null ? void 0 : w.dataset.side, _ = b === "right", R = _ ? -5 : 5, T = f[_ ? "left" : "right"], h = f[_ ? "right" : "left"];
629
+ const b = (w = n.content) == null ? void 0 : w.dataset.side, M = b === "right", R = M ? -5 : 5, T = f[M ? "left" : "right"], h = f[M ? "right" : "left"];
630
630
  c.onPointerGraceIntentChange({
631
631
  area: [
632
632
  // Apply a bleed on clientX to ensure that our exit point is
633
633
  // consistently within polygon bounds
634
- { x: u.clientX + R, y: u.clientY },
634
+ { x: i.clientX + R, y: i.clientY },
635
635
  { x: T, y: f.top },
636
636
  { x: h, y: f.top },
637
637
  { x: h, y: f.bottom },
@@ -643,51 +643,51 @@ var it = "MenuSub", [vo, tn] = k(it), X = "MenuSubTrigger", on = a.forwardRef(
643
643
  300
644
644
  );
645
645
  } else {
646
- if (c.onTriggerLeave(u), u.defaultPrevented) return;
646
+ if (c.onTriggerLeave(i), i.defaultPrevented) return;
647
647
  c.onPointerGraceIntentChange(null);
648
648
  }
649
649
  })
650
650
  ),
651
- onKeyDown: g(e.onKeyDown, (u) => {
652
- var M;
651
+ onKeyDown: g(e.onKeyDown, (i) => {
652
+ var _;
653
653
  const f = c.searchRef.current !== "";
654
- e.disabled || f && u.key === " " || Vn[o.dir].includes(u.key) && (n.onOpenChange(!0), (M = n.content) == null || M.focus(), u.preventDefault());
654
+ e.disabled || f && i.key === " " || Vn[o.dir].includes(i.key) && (n.onOpenChange(!0), (_ = n.content) == null || _.focus(), i.preventDefault());
655
655
  })
656
656
  }
657
657
  ) });
658
658
  }
659
659
  );
660
- on.displayName = X;
660
+ on.displayName = H;
661
661
  var rn = "MenuSubContent", an = a.forwardRef(
662
662
  (e, t) => {
663
- const n = Ve(S, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, c = $(S, e.__scopeMenu), i = q(S, e.__scopeMenu), l = tn(rn, e.__scopeMenu), m = a.useRef(null), v = U(t, m);
664
- return /* @__PURE__ */ s(H.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(ge, { present: o || c.open, children: /* @__PURE__ */ s(H.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(
665
- _e,
663
+ const n = Ve(S, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, c = $(S, e.__scopeMenu), d = J(S, e.__scopeMenu), l = tn(rn, e.__scopeMenu), m = a.useRef(null), v = U(t, m);
664
+ return /* @__PURE__ */ s(j.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(ge, { present: o || c.open, children: /* @__PURE__ */ s(j.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(
665
+ Me,
666
666
  {
667
667
  id: l.contentId,
668
668
  "aria-labelledby": l.triggerId,
669
669
  ...r,
670
670
  ref: v,
671
671
  align: "start",
672
- side: i.dir === "rtl" ? "left" : "right",
672
+ side: d.dir === "rtl" ? "left" : "right",
673
673
  disableOutsidePointerEvents: !1,
674
674
  disableOutsideScroll: !1,
675
675
  trapFocus: !1,
676
- onOpenAutoFocus: (d) => {
677
- var u;
678
- i.isUsingKeyboardRef.current && ((u = m.current) == null || u.focus()), d.preventDefault();
676
+ onOpenAutoFocus: (u) => {
677
+ var i;
678
+ d.isUsingKeyboardRef.current && ((i = m.current) == null || i.focus()), u.preventDefault();
679
679
  },
680
- onCloseAutoFocus: (d) => d.preventDefault(),
681
- onFocusOutside: g(e.onFocusOutside, (d) => {
682
- d.target !== l.trigger && c.onOpenChange(!1);
680
+ onCloseAutoFocus: (u) => u.preventDefault(),
681
+ onFocusOutside: g(e.onFocusOutside, (u) => {
682
+ u.target !== l.trigger && c.onOpenChange(!1);
683
683
  }),
684
- onEscapeKeyDown: g(e.onEscapeKeyDown, (d) => {
685
- i.onClose(), d.preventDefault();
684
+ onEscapeKeyDown: g(e.onEscapeKeyDown, (u) => {
685
+ d.onClose(), u.preventDefault();
686
686
  }),
687
- onKeyDown: g(e.onKeyDown, (d) => {
688
- var M;
689
- const u = d.currentTarget.contains(d.target), f = Wn[i.dir].includes(d.key);
690
- u && f && (c.onOpenChange(!1), (M = l.trigger) == null || M.focus(), d.preventDefault());
687
+ onKeyDown: g(e.onKeyDown, (u) => {
688
+ var _;
689
+ const i = u.currentTarget.contains(u.target), f = Wn[d.dir].includes(u.key);
690
+ i && f && (c.onOpenChange(!1), (_ = l.trigger) == null || _.focus(), u.preventDefault());
691
691
  })
692
692
  }
693
693
  ) }) }) });
@@ -713,9 +713,9 @@ function lt(e, t) {
713
713
  }
714
714
  function ft(e, t, n) {
715
715
  const r = t.length > 1 && Array.from(t).every((v) => v === t[0]) ? t[0] : t, c = n ? e.indexOf(n) : -1;
716
- let i = lt(e, Math.max(c, 0));
717
- r.length === 1 && (i = i.filter((v) => v !== n));
718
- const m = i.find(
716
+ let d = lt(e, Math.max(c, 0));
717
+ r.length === 1 && (d = d.filter((v) => v !== n));
718
+ const m = d.find(
719
719
  (v) => v.toLowerCase().startsWith(r.toLowerCase())
720
720
  );
721
721
  return m !== n ? m : void 0;
@@ -723,9 +723,9 @@ function ft(e, t, n) {
723
723
  function pt(e, t) {
724
724
  const { x: n, y: o } = e;
725
725
  let r = !1;
726
- for (let c = 0, i = t.length - 1; c < t.length; i = c++) {
727
- const l = t[c], m = t[i], v = l.x, d = l.y, u = m.x, f = m.y;
728
- d > o != f > o && n < (u - v) * (o - d) / (f - d) + v && (r = !r);
726
+ for (let c = 0, d = t.length - 1; c < t.length; d = c++) {
727
+ const l = t[c], m = t[d], v = l.x, u = l.y, i = m.x, f = m.y;
728
+ u > o != f > o && n < (i - v) * (o - u) / (f - u) + v && (r = !r);
729
729
  }
730
730
  return r;
731
731
  }
@@ -734,10 +734,10 @@ function mt(e, t) {
734
734
  const n = { x: e.clientX, y: e.clientY };
735
735
  return pt(n, t);
736
736
  }
737
- function j(e) {
737
+ function z(e) {
738
738
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
739
739
  }
740
- var vt = Be, gt = we, wt = We, Mt = he, _t = Ye, ht = ae, Ct = He, Rt = ze, It = qe, bt = Qe, Et = en, St = nn, Dt = on, yt = an, ce = "DropdownMenu", [Pt, go] = me(
740
+ var vt = Be, gt = we, wt = We, _t = he, Mt = Ye, ht = ae, Ct = He, Rt = ze, It = qe, bt = Qe, Et = en, St = nn, Dt = on, yt = an, ce = "DropdownMenu", [Pt, wo] = me(
741
741
  ce,
742
742
  [Ue]
743
743
  ), I = Ue(), [xt, sn] = Pt(ce), un = (e) => {
@@ -747,12 +747,12 @@ var vt = Be, gt = we, wt = We, Mt = he, _t = Ye, ht = ae, Ct = He, Rt = ze, It =
747
747
  dir: o,
748
748
  open: r,
749
749
  defaultOpen: c,
750
- onOpenChange: i,
750
+ onOpenChange: d,
751
751
  modal: l = !0
752
- } = e, m = I(t), v = a.useRef(null), [d, u] = ye({
752
+ } = e, m = I(t), v = a.useRef(null), [u, i] = ye({
753
753
  prop: r,
754
754
  defaultProp: c ?? !1,
755
- onChange: i,
755
+ onChange: d,
756
756
  caller: ce
757
757
  });
758
758
  return /* @__PURE__ */ s(
@@ -762,19 +762,19 @@ var vt = Be, gt = we, wt = We, Mt = he, _t = Ye, ht = ae, Ct = He, Rt = ze, It =
762
762
  triggerId: le(),
763
763
  triggerRef: v,
764
764
  contentId: le(),
765
- open: d,
766
- onOpenChange: u,
767
- onOpenToggle: a.useCallback(() => u((f) => !f), [u]),
765
+ open: u,
766
+ onOpenChange: i,
767
+ onOpenToggle: a.useCallback(() => i((f) => !f), [i]),
768
768
  modal: l,
769
- children: /* @__PURE__ */ s(vt, { ...m, open: d, onOpenChange: u, dir: o, modal: l, children: n })
769
+ children: /* @__PURE__ */ s(vt, { ...m, open: u, onOpenChange: i, dir: o, modal: l, children: n })
770
770
  }
771
771
  );
772
772
  };
773
773
  un.displayName = ce;
774
774
  var dn = "DropdownMenuTrigger", ln = a.forwardRef(
775
775
  (e, t) => {
776
- const { __scopeDropdownMenu: n, disabled: o = !1, ...r } = e, c = sn(dn, n), i = I(n);
777
- return /* @__PURE__ */ s(gt, { asChild: !0, ...i, children: /* @__PURE__ */ s(
776
+ const { __scopeDropdownMenu: n, disabled: o = !1, ...r } = e, c = sn(dn, n), d = I(n);
777
+ return /* @__PURE__ */ s(gt, { asChild: !0, ...d, children: /* @__PURE__ */ s(
778
778
  N.button,
779
779
  {
780
780
  type: "button",
@@ -800,7 +800,7 @@ var dn = "DropdownMenuTrigger", ln = a.forwardRef(
800
800
  ln.displayName = dn;
801
801
  var fn = "DropdownMenuContent", pn = a.forwardRef(
802
802
  (e, t) => {
803
- const { __scopeDropdownMenu: n, ...o } = e, r = sn(fn, n), c = I(n), i = a.useRef(!1);
803
+ const { __scopeDropdownMenu: n, ...o } = e, r = sn(fn, n), c = I(n), d = a.useRef(!1);
804
804
  return /* @__PURE__ */ s(
805
805
  wt,
806
806
  {
@@ -811,11 +811,11 @@ var fn = "DropdownMenuContent", pn = a.forwardRef(
811
811
  ref: t,
812
812
  onCloseAutoFocus: g(e.onCloseAutoFocus, (l) => {
813
813
  var m;
814
- i.current || (m = r.triggerRef.current) == null || m.focus(), i.current = !1, l.preventDefault();
814
+ d.current || (m = r.triggerRef.current) == null || m.focus(), d.current = !1, l.preventDefault();
815
815
  }),
816
816
  onInteractOutside: g(e.onInteractOutside, (l) => {
817
- const m = l.detail.originalEvent, v = m.button === 0 && m.ctrlKey === !0, d = m.button === 2 || v;
818
- (!r.modal || d) && (i.current = !0);
817
+ const m = l.detail.originalEvent, v = m.button === 0 && m.ctrlKey === !0, u = m.button === 2 || v;
818
+ (!r.modal || u) && (d.current = !0);
819
819
  }),
820
820
  style: {
821
821
  ...e.style,
@@ -833,14 +833,14 @@ pn.displayName = fn;
833
833
  var Tt = "DropdownMenuGroup", At = a.forwardRef(
834
834
  (e, t) => {
835
835
  const { __scopeDropdownMenu: n, ...o } = e, r = I(n);
836
- return /* @__PURE__ */ s(Mt, { ...r, ...o, ref: t });
836
+ return /* @__PURE__ */ s(_t, { ...r, ...o, ref: t });
837
837
  }
838
838
  );
839
839
  At.displayName = Tt;
840
840
  var Nt = "DropdownMenuLabel", Ot = a.forwardRef(
841
841
  (e, t) => {
842
842
  const { __scopeDropdownMenu: n, ...o } = e, r = I(n);
843
- return /* @__PURE__ */ s(_t, { ...r, ...o, ref: t });
843
+ return /* @__PURE__ */ s(Mt, { ...r, ...o, ref: t });
844
844
  }
845
845
  );
846
846
  Ot.displayName = Nt;
@@ -908,26 +908,29 @@ var Zt = "DropdownMenuSubContent", qt = a.forwardRef((e, t) => {
908
908
  );
909
909
  });
910
910
  qt.displayName = Zt;
911
- var wo = un, Mo = ln, Jt = pn, Qt = mn;
912
- const eo = "cfxui__DropdownContent__fullWidth__c56c3", no = "cfxui__DropdownContent__item__8feac", to = "cfxui__DropdownContent__content__ea3aa", oo = "cfxui__DropdownContent__disabled__9002a", ne = {
911
+ var _o = un, Mo = ln, Jt = pn, Qt = mn;
912
+ const eo = "cfxui__DropdownContent__fullWidth__c56c3", no = "cfxui__DropdownContent__item__8feac", to = "cfxui__DropdownContent__content__ea3aa", oo = "cfxui__DropdownContent__disabled__9002a", ro = "cfxui__DropdownContent__selected__91015", X = {
913
913
  fullWidth: eo,
914
914
  item: no,
915
915
  content: to,
916
- disabled: oo
916
+ disabled: oo,
917
+ selected: ro
917
918
  };
918
- function ro(e) {
919
+ function ao(e) {
919
920
  const {
920
921
  triggerWidth: t,
921
922
  options: n,
922
- fullWidth: o = !1,
923
- className: r,
924
- itemClassName: c,
925
- onSelect: i
926
- } = e, l = Se(
927
- r,
928
- ne.content,
923
+ selectedValue: o,
924
+ selectedClassName: r,
925
+ fullWidth: c = !1,
926
+ className: d,
927
+ itemClassName: l,
928
+ onSelect: m
929
+ } = e, v = Se(
930
+ d,
931
+ X.content,
929
932
  {
930
- [ne.fullWidth]: o
933
+ [X.fullWidth]: c
931
934
  }
932
935
  );
933
936
  return /* @__PURE__ */ s(
@@ -935,30 +938,32 @@ function ro(e) {
935
938
  {
936
939
  align: "end",
937
940
  side: "bottom",
938
- className: l,
941
+ className: v,
939
942
  style: {
940
943
  width: t,
941
944
  zIndex: yn.zindex("max")
942
945
  },
943
- children: n.map((m) => /* @__PURE__ */ s(
946
+ children: n.map((u) => /* @__PURE__ */ s(
944
947
  Qt,
945
948
  {
946
- disabled: m.disabled,
947
- className: Se(ne.item, c, {
948
- [ne.disabled]: m.disabled
949
+ disabled: u.disabled,
950
+ className: Se(X.item, l, {
951
+ [X.disabled]: u.disabled,
952
+ [X.selected]: u.value === o,
953
+ [r || ""]: u.value === o && r
949
954
  }),
950
- onSelect: () => i(m.value),
955
+ onSelect: () => m(u.value),
951
956
  style: { width: t },
952
- children: m.label
957
+ children: u.label
953
958
  },
954
- m.value
959
+ u.value
955
960
  ))
956
961
  }
957
962
  );
958
963
  }
959
- const _o = gn.memo(ro);
964
+ const ho = gn.memo(ao);
960
965
  export {
961
- _o as D,
962
- wo as R,
966
+ ho as D,
967
+ _o as R,
963
968
  Mo as T
964
969
  };
@@ -1 +1 @@
1
- .cfxui__DropdownContent__fullWidth__c56c3{width:100%}.cfxui__DropdownContent__fullWidth__c56c3 .cfxui__DropdownContent__item__8feac{width:100%;padding-left:calc(var(--quant) * 2.5);padding-right:calc(var(--quant) * 2.5)}.cfxui__DropdownContent__content__ea3aa{--border-color: var(--color-input-border);border-radius:var(--border-radius-medium);box-shadow:0 0 0 var(--input-border-size, initial) var(--border-color) inset;background-color:rgba(var(--color-bg),1);overflow:hidden}.cfxui__DropdownContent__content__ea3aa.cfxui__DropdownContent__onlight__352dc{--border-color: var(--color-input-onlight-border)}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac{height:var(--button-height, initial);display:flex;align-items:center;padding:calc(var(--quant) * 2) var(--spacer-xsmall) calc(var(--quant) * 2) var(--spacer-xsmall);cursor:pointer}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac:not(:last-child){box-shadow:0 calc(-1 * var(--input-border-size, initial)) 0 0 var(--border-color) inset}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac:hover:not(.cfxui__DropdownContent__disabled__9002a){background-color:rgba(var(--color-bg-light),1)}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac.cfxui__DropdownContent__disabled__9002a{cursor:not-allowed;color:rgba(var(--color-secondary),1);background-color:rgba(var(--color-bg-dark),.5)}
1
+ .cfxui__DropdownContent__fullWidth__c56c3{width:100%}.cfxui__DropdownContent__fullWidth__c56c3 .cfxui__DropdownContent__item__8feac{width:100%;padding-left:calc(var(--quant) * 2.5);padding-right:calc(var(--quant) * 2.5)}.cfxui__DropdownContent__content__ea3aa{--border-color: var(--color-input-border);border-radius:var(--border-radius-medium);box-shadow:0 0 0 var(--input-border-size, initial) var(--border-color) inset;background-color:rgba(var(--color-bg),1);overflow:hidden}.cfxui__DropdownContent__content__ea3aa.cfxui__DropdownContent__onlight__352dc{--border-color: var(--color-input-onlight-border)}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac{height:var(--button-height, initial);display:flex;align-items:center;padding:calc(var(--quant) * 2) var(--spacer-xsmall) calc(var(--quant) * 2) var(--spacer-xsmall);cursor:pointer}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac:not(:last-child){box-shadow:0 calc(-1 * var(--input-border-size, initial)) 0 0 var(--border-color) inset}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac:hover:not(.cfxui__DropdownContent__disabled__9002a,.cfxui__DropdownContent__selected__91015){background-color:rgba(var(--color-bg-light),1)}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac.cfxui__DropdownContent__disabled__9002a{cursor:not-allowed;color:rgba(var(--color-secondary),1);background-color:rgba(var(--color-bg-dark),.5)}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac.cfxui__DropdownContent__selected__91015{background-color:rgba(var(--color-secondary),.5);font-weight:var(--font-weight-bold)}
@@ -6,11 +6,14 @@ export interface DropdownOption<T extends string> {
6
6
  disabled?: boolean;
7
7
  }
8
8
  export type ExtraClassNameType = 'content' | 'trigger';
9
- export type DropdownContentOption = DropdownOption<string>;
9
+ export type DropdownOptionValueType = string;
10
+ export type DropdownContentOption = DropdownOption<DropdownOptionValueType>;
10
11
  export interface DropdownContentProps {
11
12
  options: DropdownContentOption[];
13
+ selectedValue?: DropdownOptionValueType;
12
14
  className?: string;
13
15
  itemClassName?: string;
16
+ selectedClassName?: string;
14
17
  triggerWidth?: React.CSSProperties['width'];
15
18
  fullWidth?: boolean;
16
19
  onSelect: (value: string) => void;
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { D as a } from "../../DropdownContent-BMfQCuaP.js";
2
+ import { D as a } from "../../DropdownContent-BTzahw95.js";
3
3
  import "react";
4
4
  import "../../utils/clsx.js";
5
5
  import "../../utils/ui/ui.js";
@@ -1,2 +1,2 @@
1
1
  export { default as DropdownContent } from './DropdownContent';
2
- export type { DropdownContentProps, DropdownContentOption, } from './DropdownContent';
2
+ export type { DropdownContentProps, DropdownContentOption, DropdownOptionValueType, } from './DropdownContent';
@@ -1,4 +1,4 @@
1
- import { D as r } from "../../DropdownContent-BMfQCuaP.js";
1
+ import { D as r } from "../../DropdownContent-BTzahw95.js";
2
2
  export {
3
3
  r as DropdownContent
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
- import { R as m, T as c, D as p } from "../../DropdownContent-BMfQCuaP.js";
2
+ import { R as m, T as c, D as p } from "../../DropdownContent-BTzahw95.js";
3
3
  import f from "react";
4
4
  function u(t) {
5
5
  const {
@@ -1,5 +1,5 @@
1
1
  import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
- import { R as D, T as W, D as C } from "../../DropdownContent-BMfQCuaP.js";
2
+ import { R as D, T as W, D as C } from "../../DropdownContent-BTzahw95.js";
3
3
  import a, { useRef as R, useState as v, useEffect as b } from "react";
4
4
  import N from "../Flex/Flex.js";
5
5
  import { clsx as T } from "../../utils/clsx.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfx-dev/ui-components",
3
3
  "private": false,
4
- "version": "5.0.14",
4
+ "version": "5.0.16",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",