@cfx-dev/ui-components 4.2.23 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/dist/Combination-CSgOhzm-.js +2198 -0
  2. package/dist/Combination-N-vN9BB-.js +823 -0
  3. package/dist/Table.module-DHI1mXN2.js +17 -0
  4. package/dist/assets/all_css.css +1 -0
  5. package/dist/assets/css/Checkbox.css +1 -1
  6. package/dist/assets/css/DataTable.css +1 -0
  7. package/dist/assets/css/Table.css +1 -1
  8. package/dist/assets/general/global.css +1 -1
  9. package/dist/cfxIcons-B9nzO6TW.js +98 -0
  10. package/dist/components/Accordion/Accordion.js +25 -26
  11. package/dist/components/Accordion/AccordionShowcase.js +1 -1
  12. package/dist/components/Avatar/Avatar.d.ts +2 -1
  13. package/dist/components/Avatar/Avatar.js +21 -20
  14. package/dist/components/Avatar/AvatarShowcase.js +1 -1
  15. package/dist/components/Badge/Badge.d.ts +2 -1
  16. package/dist/components/Badge/Badge.js +29 -29
  17. package/dist/components/Badge/BadgeShowcase.js +1 -1
  18. package/dist/components/BurgerMenu/BurgerMenu.js +2 -2
  19. package/dist/components/BurgerMenu/BurgerMenuButton.js +1 -1
  20. package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
  21. package/dist/components/Button/Button.d.ts +5 -2
  22. package/dist/components/Button/Button.js +83 -81
  23. package/dist/components/Button/ButtonShowcase.js +2 -2
  24. package/dist/components/Button/LinkButton.d.ts +1 -1
  25. package/dist/components/Button/LinkButton.js +18 -17
  26. package/dist/components/Button/index.d.ts +1 -1
  27. package/dist/components/Button/index.js +7 -7
  28. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  29. package/dist/components/Checkbox/Checkbox.js +154 -242
  30. package/dist/components/ClipboardButton/ClipboardButton.js +7 -7
  31. package/dist/components/ControlBox/ControlBox.d.ts +3 -2
  32. package/dist/components/ControlBox/ControlBox.js +13 -10
  33. package/dist/components/CountryFlag/CountryFlag.d.ts +3 -2
  34. package/dist/components/CountryFlag/CountryFlag.js +14 -11
  35. package/dist/components/DataTable/DataTable.d.ts +40 -0
  36. package/dist/components/DataTable/DataTable.js +163 -0
  37. package/dist/components/DataTable/DataTableShowcase.d.ts +5 -0
  38. package/dist/components/DataTable/DataTableShowcase.js +60 -0
  39. package/dist/components/DataTable/index.d.ts +2 -0
  40. package/dist/components/DataTable/index.js +6 -0
  41. package/dist/components/Decorate/Decorate.d.ts +3 -2
  42. package/dist/components/Decorate/Decorate.js +19 -15
  43. package/dist/components/Dot/Dot.d.ts +2 -1
  44. package/dist/components/Dot/Dot.js +15 -13
  45. package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
  46. package/dist/components/DropdownSelect/DropdownSelect.js +665 -1836
  47. package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
  48. package/dist/components/Flyout/Flyout.d.ts +2 -1
  49. package/dist/components/Flyout/Flyout.js +22 -20
  50. package/dist/components/Icon/Icon.d.ts +2 -1
  51. package/dist/components/Icon/Icon.js +19 -17
  52. package/dist/components/IconBig/IconBig.d.ts +2 -1
  53. package/dist/components/IconBig/IconBig.js +16 -14
  54. package/dist/components/Icons/IconsShowcase.js +1 -1
  55. package/dist/components/Icons/cfx-icons/Radio.d.ts +5 -0
  56. package/dist/components/Icons/cfx-icons/Radio.js +36 -0
  57. package/dist/components/Icons/cfx-icons/Square.js +15 -9
  58. package/dist/components/Icons/cfxIcons.d.ts +1 -0
  59. package/dist/components/Icons/cfxIcons.js +62 -60
  60. package/dist/components/Icons/index.js +1 -1
  61. package/dist/components/Indicator/Indicator.js +9 -10
  62. package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
  63. package/dist/components/Input/Input.d.ts +4 -1
  64. package/dist/components/Input/Input.js +101 -88
  65. package/dist/components/Input/InputShowcase.js +1 -1
  66. package/dist/components/Input/RichInput.d.ts +2 -1
  67. package/dist/components/Input/RichInput.js +37 -34
  68. package/dist/components/InputDropzone/InputDropzone.d.ts +1 -1
  69. package/dist/components/InputDropzone/InputDropzone.js +1723 -625
  70. package/dist/components/Interactive/Interactive.d.ts +2 -1
  71. package/dist/components/Interactive/Interactive.js +14 -12
  72. package/dist/components/Island/Island.d.ts +2 -1
  73. package/dist/components/Island/Island.js +24 -24
  74. package/dist/components/Layout/Box/Box.d.ts +8 -2
  75. package/dist/components/Layout/Box/Box.js +53 -51
  76. package/dist/components/Layout/Box/Box.types.d.ts +22 -0
  77. package/dist/components/Layout/Box/Box.types.js +4 -0
  78. package/dist/components/Layout/Box/index.d.ts +1 -1
  79. package/dist/components/Layout/Box/index.js +3 -3
  80. package/dist/components/Layout/Center/Center.d.ts +2 -1
  81. package/dist/components/Layout/Center/Center.js +19 -18
  82. package/dist/components/Layout/Flex/Flex.d.ts +6 -10
  83. package/dist/components/Layout/Flex/Flex.js +53 -64
  84. package/dist/components/Layout/Flex/FlexRestricter.d.ts +2 -1
  85. package/dist/components/Layout/Flex/FlexRestricter.js +13 -12
  86. package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
  87. package/dist/components/Layout/Flex/index.d.ts +2 -2
  88. package/dist/components/Layout/Flex/index.js +8 -8
  89. package/dist/components/Layout/Page/Page.js +11 -12
  90. package/dist/components/Layout/Scrollable/Rail.d.ts +1 -1
  91. package/dist/components/Layout/Scrollable/Scrollable.d.ts +2 -1
  92. package/dist/components/Layout/Scrollable/Scrollable.js +40 -38
  93. package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
  94. package/dist/components/Layout/Scrollable/VirtualScrollable.js +98 -98
  95. package/dist/components/Link/LinkShowcase.js +1 -1
  96. package/dist/components/Loaf/Loaf.d.ts +2 -1
  97. package/dist/components/Loaf/Loaf.js +17 -16
  98. package/dist/components/Logos/LogosShowcase.js +1 -1
  99. package/dist/components/Modal/Modal.js +16 -17
  100. package/dist/components/Modal/ModalShowcase.js +14 -11
  101. package/dist/components/NavList/NavList.d.ts +2 -1
  102. package/dist/components/NavList/NavList.js +19 -18
  103. package/dist/components/OnScreenSensor.js +1 -1
  104. package/dist/components/Overlay/Overlay.d.ts +4 -2
  105. package/dist/components/Overlay/Overlay.js +31 -23
  106. package/dist/components/Popover/Popover.d.ts +3 -2
  107. package/dist/components/Popover/Popover.js +31 -30
  108. package/dist/components/Popover/PopoverShowcase.js +4 -4
  109. package/dist/components/PremiumBadge/PremiumBadge.d.ts +2 -1
  110. package/dist/components/PremiumBadge/PremiumBadge.js +12 -11
  111. package/dist/components/Select/Select.d.ts +1 -1
  112. package/dist/components/Select/Select.js +666 -1617
  113. package/dist/components/Select/SelectShowcase.js +1 -1
  114. package/dist/components/Shroud/Shroud.d.ts +2 -1
  115. package/dist/components/Shroud/Shroud.js +16 -14
  116. package/dist/components/Skeleton/Skeleton.d.ts +1 -1
  117. package/dist/components/Skeleton/Skeleton.js +26 -27
  118. package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
  119. package/dist/components/Slider/Slider.d.ts +2 -1
  120. package/dist/components/Slider/Slider.js +326 -377
  121. package/dist/components/Slider/SliderShowcase.js +1 -1
  122. package/dist/components/Switch/Switch.js +109 -155
  123. package/dist/components/Table/TableBody.d.ts +8 -0
  124. package/dist/components/Table/TableBody.js +14 -0
  125. package/dist/components/Table/TableCell.d.ts +11 -0
  126. package/dist/components/Table/TableCell.js +54 -0
  127. package/dist/components/Table/TableCellCheckbox.d.ts +11 -0
  128. package/dist/components/Table/TableCellCheckbox.js +20 -0
  129. package/dist/components/Table/TableHeader.d.ts +9 -0
  130. package/dist/components/Table/TableHeader.js +24 -0
  131. package/dist/components/Table/TableIconButton.d.ts +6 -0
  132. package/dist/components/Table/TableIconButton.js +16 -0
  133. package/dist/components/Table/TableRoot.d.ts +8 -0
  134. package/dist/components/Table/TableRoot.js +23 -0
  135. package/dist/components/Table/TableRow.d.ts +13 -0
  136. package/dist/components/Table/TableRow.js +46 -0
  137. package/dist/components/Table/TableShowcase.js +56 -57
  138. package/dist/components/Table/index.d.ts +20 -2
  139. package/dist/components/Table/index.js +17 -5
  140. package/dist/components/Tabular/TabularShowcase.js +1 -1
  141. package/dist/components/Text/Text.d.ts +6 -3
  142. package/dist/components/Text/Text.js +67 -63
  143. package/dist/components/Text/TextShowcase.js +40 -33
  144. package/dist/components/Title/Title.d.ts +3 -1
  145. package/dist/components/Title/TitleShowcase.js +1 -1
  146. package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
  147. package/dist/index-BHuChyf5.js +238 -0
  148. package/dist/index-Cl_RnsqN.js +386 -0
  149. package/dist/index-DZEAOJqB.js +53 -0
  150. package/dist/index-HDl8nGsm.js +70 -0
  151. package/dist/main.d.ts +7 -5
  152. package/dist/main.js +181 -179
  153. package/dist/{medium-BA3EQDZW.js → medium-Bq5NvyU7.js} +1 -1
  154. package/dist/styles-scss/global.scss +1 -0
  155. package/dist/tslib.es6-CtHwNPxX.js +72 -0
  156. package/dist/utils/hooks/useClipboardComponent.d.ts +1 -1
  157. package/dist/utils/hooks/useOutlet.js +1 -1
  158. package/dist/utils/hooks/usePopoverController.d.ts +1 -1
  159. package/dist/utils/links.js +1 -1
  160. package/dist/utils/mergeRefs.d.ts +1 -1
  161. package/dist/utils/mergeRefs.js +1 -1
  162. package/dist/utils/ui/ui.d.ts +1 -0
  163. package/dist/utils/ui/ui.js +45 -36
  164. package/dist/utils/ui/ui.types.d.ts +4 -0
  165. package/package.json +6 -5
  166. package/dist/Combination-Cbiw1XRb.js +0 -792
  167. package/dist/cfxIcons-BNd1WgpX.js +0 -96
  168. package/dist/components/Table/Table.d.ts +0 -42
  169. package/dist/components/Table/Table.js +0 -170
  170. package/dist/index-2hJuj4UN.js +0 -19069
  171. package/dist/index-AweK2ufS.js +0 -171
  172. package/dist/index-BlbvKsmN.js +0 -82
  173. package/dist/index-ByaXH_ih.js +0 -10
  174. package/dist/index-Bz27DCHt.js +0 -1342
  175. package/dist/index-Cf5Yu9oD.js +0 -67
  176. package/dist/tslib.es6-CBKHJX9H.js +0 -151
@@ -1,886 +1,154 @@
1
- import { jsx as d, Fragment as He, jsxs as it } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as De } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
- import $n, { useState as Ct, useRef as Bn, useEffect as Kn } from "react";
4
- import { c as fe, u as k, d as S, b as Re, a as bt } from "../../index-AweK2ufS.js";
5
- import { c as Y, a as Gn, b as Ce, u as St } from "../../index-Cf5Yu9oD.js";
6
- import { r as zn } from "../../index-2hJuj4UN.js";
7
- import { u as Rt } from "../../index-ByaXH_ih.js";
8
- import { u as Vn, a as Hn, b as Yn, o as Xn, s as jn, l as Zn, f as Qn, c as qn, d as Jn, h as er, e as We, g as tr, i as nr } from "../../index-Bz27DCHt.js";
9
- import { _ as H, f as Mt, c as rr } from "../../tslib.es6-CBKHJX9H.js";
10
- import { Icon as or } from "../Icon/Icon.js";
11
- import { Flex as ar } from "../Layout/Flex/Flex.js";
12
- import { clsx as ct } from "../../utils/clsx.js";
13
- import { mergeRefs as ir } from "../../utils/mergeRefs.js";
14
- import { ui as st } from "../../utils/ui/ui.js";
15
- var Pt = a.forwardRef((e, t) => {
16
- const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(sr);
17
- if (i) {
18
- const s = i.props.children, c = o.map((f) => f === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : f);
19
- return /* @__PURE__ */ d(Ue, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
20
- }
21
- return /* @__PURE__ */ d(Ue, { ...r, ref: t, children: n });
22
- });
23
- Pt.displayName = "Slot";
24
- var Ue = a.forwardRef((e, t) => {
25
- const { children: n, ...r } = e;
26
- if (a.isValidElement(n)) {
27
- const o = lr(n);
28
- return a.cloneElement(n, {
29
- ...ur(r, n.props),
30
- // @ts-ignore
31
- ref: t ? fe(t, o) : o
32
- });
33
- }
34
- return a.Children.count(n) > 1 ? a.Children.only(null) : null;
35
- });
36
- Ue.displayName = "SlotClone";
37
- var cr = ({ children: e }) => /* @__PURE__ */ d(He, { children: e });
38
- function sr(e) {
39
- return a.isValidElement(e) && e.type === cr;
40
- }
41
- function ur(e, t) {
42
- const n = { ...t };
43
- for (const r in t) {
44
- const o = e[r], i = t[r];
45
- /^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
46
- i(...c), o(...c);
47
- } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
48
- }
49
- return { ...e, ...n };
50
- }
51
- function lr(e) {
52
- var r, o;
53
- let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
54
- return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
55
- }
56
- var dr = [
57
- "a",
58
- "button",
59
- "div",
60
- "form",
61
- "h2",
62
- "h3",
63
- "img",
64
- "input",
65
- "label",
66
- "li",
67
- "nav",
68
- "ol",
69
- "p",
70
- "span",
71
- "svg",
72
- "ul"
73
- ], fr = dr.reduce((e, t) => {
74
- const n = a.forwardRef((r, o) => {
75
- const { asChild: i, ...s } = r, c = i ? Pt : t;
76
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...s, ref: o });
77
- });
78
- return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
79
- }, {}), Ye = a.forwardRef((e, t) => {
80
- const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(mr);
81
- if (i) {
82
- const s = i.props.children, c = o.map((f) => f === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : f);
83
- return /* @__PURE__ */ d($e, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
84
- }
85
- return /* @__PURE__ */ d($e, { ...r, ref: t, children: n });
86
- });
87
- Ye.displayName = "Slot";
88
- var $e = a.forwardRef((e, t) => {
89
- const { children: n, ...r } = e;
90
- if (a.isValidElement(n)) {
91
- const o = hr(n);
92
- return a.cloneElement(n, {
93
- ...vr(r, n.props),
94
- // @ts-ignore
95
- ref: t ? fe(t, o) : o
96
- });
97
- }
98
- return a.Children.count(n) > 1 ? a.Children.only(null) : null;
99
- });
100
- $e.displayName = "SlotClone";
101
- var pr = ({ children: e }) => /* @__PURE__ */ d(He, { children: e });
102
- function mr(e) {
103
- return a.isValidElement(e) && e.type === pr;
104
- }
105
- function vr(e, t) {
106
- const n = { ...t };
107
- for (const r in t) {
108
- const o = e[r], i = t[r];
109
- /^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
110
- i(...c), o(...c);
111
- } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
112
- }
113
- return { ...e, ...n };
114
- }
115
- function hr(e) {
116
- var r, o;
117
- let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
118
- return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
119
- }
120
- var gr = [
121
- "a",
122
- "button",
123
- "div",
124
- "form",
125
- "h2",
126
- "h3",
127
- "img",
128
- "input",
129
- "label",
130
- "li",
131
- "nav",
132
- "ol",
133
- "p",
134
- "span",
135
- "svg",
136
- "ul"
137
- ], U = gr.reduce((e, t) => {
138
- const n = a.forwardRef((r, o) => {
139
- const { asChild: i, ...s } = r, c = i ? Ye : t;
140
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...s, ref: o });
141
- });
142
- return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
143
- }, {});
144
- function xt(e, t) {
145
- e && zn.flushSync(() => e.dispatchEvent(t));
146
- }
147
- var wr = "DismissableLayer", Be = "dismissableLayer.update", Er = "dismissableLayer.pointerDownOutside", yr = "dismissableLayer.focusOutside", ut, Nt = a.createContext({
148
- layers: /* @__PURE__ */ new Set(),
149
- layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
150
- branches: /* @__PURE__ */ new Set()
151
- }), It = a.forwardRef(
152
- (e, t) => {
153
- const {
154
- disableOutsidePointerEvents: n = !1,
155
- onEscapeKeyDown: r,
156
- onPointerDownOutside: o,
157
- onFocusOutside: i,
158
- onInteractOutside: s,
159
- onDismiss: c,
160
- ...f
161
- } = e, u = a.useContext(Nt), [p, m] = a.useState(null), v = (p == null ? void 0 : p.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, w] = a.useState({}), h = k(t, (b) => m(b)), l = Array.from(u.layers), [E] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), g = l.indexOf(E), _ = p ? l.indexOf(p) : -1, C = u.layersWithOutsidePointerEventsDisabled.size > 0, R = _ >= g, M = br((b) => {
162
- const P = b.target, I = [...u.branches].some((T) => T.contains(P));
163
- !R || I || (o == null || o(b), s == null || s(b), b.defaultPrevented || c == null || c());
164
- }, v), x = Sr((b) => {
165
- const P = b.target;
166
- [...u.branches].some((T) => T.contains(P)) || (i == null || i(b), s == null || s(b), b.defaultPrevented || c == null || c());
167
- }, v);
168
- return Vn((b) => {
169
- _ === u.layers.size - 1 && (r == null || r(b), !b.defaultPrevented && c && (b.preventDefault(), c()));
170
- }, v), a.useEffect(() => {
171
- if (p)
172
- return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (ut = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(p)), u.layers.add(p), lt(), () => {
173
- n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = ut);
174
- };
175
- }, [p, v, n, u]), a.useEffect(() => () => {
176
- p && (u.layers.delete(p), u.layersWithOutsidePointerEventsDisabled.delete(p), lt());
177
- }, [p, u]), a.useEffect(() => {
178
- const b = () => w({});
179
- return document.addEventListener(Be, b), () => document.removeEventListener(Be, b);
180
- }, []), /* @__PURE__ */ d(
181
- U.div,
182
- {
183
- ...f,
184
- ref: h,
185
- style: {
186
- pointerEvents: C ? R ? "auto" : "none" : void 0,
187
- ...e.style
188
- },
189
- onFocusCapture: S(e.onFocusCapture, x.onFocusCapture),
190
- onBlurCapture: S(e.onBlurCapture, x.onBlurCapture),
191
- onPointerDownCapture: S(
192
- e.onPointerDownCapture,
193
- M.onPointerDownCapture
194
- )
195
- }
196
- );
197
- }
3
+ import { useRef as vo, useState as ho, useEffect as Mo } from "react";
4
+ import { c as me, P as O, e as g, u as U, d as ye, g as Co, b as Ro, h as Te } from "../../index-BHuChyf5.js";
5
+ import { c as Ae, u as Ne } from "../../index-DZEAOJqB.js";
6
+ import { u as de, a as _e, c as Oe, R as So, A as Io, h as bo, b as Do, d as Eo, F as xo, D as Po, C as yo, e as To } from "../../Combination-CSgOhzm-.js";
7
+ import { P as ge } from "../../index-HDl8nGsm.js";
8
+ import { Icon as Ao } from "../Icon/Icon.js";
9
+ import No from "../Layout/Flex/Flex.js";
10
+ import { clsx as Ee } from "../../utils/clsx.js";
11
+ import { mergeRefs as Oo } from "../../utils/mergeRefs.js";
12
+ import { ui as xe } from "../../utils/ui/ui.js";
13
+ var le = "rovingFocusGroup.onEntryFocus", Fo = { bubbles: !1, cancelable: !0 }, Z = "RovingFocusGroup", [fe, Fe, ko] = Ae(Z), [Go, ke] = me(
14
+ Z,
15
+ [ko]
16
+ ), [Lo, Ko] = Go(Z), Ge = a.forwardRef(
17
+ (e, n) => /* @__PURE__ */ s(fe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ s(fe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ s(zo, { ...e, ref: n }) }) })
198
18
  );
199
- It.displayName = wr;
200
- var _r = "DismissableLayerBranch", Cr = a.forwardRef((e, t) => {
201
- const n = a.useContext(Nt), r = a.useRef(null), o = k(t, r);
202
- return a.useEffect(() => {
203
- const i = r.current;
204
- if (i)
205
- return n.branches.add(i), () => {
206
- n.branches.delete(i);
207
- };
208
- }, [n.branches]), /* @__PURE__ */ d(U.div, { ...e, ref: o });
209
- });
210
- Cr.displayName = _r;
211
- function br(e, t = globalThis == null ? void 0 : globalThis.document) {
212
- const n = Y(e), r = a.useRef(!1), o = a.useRef(() => {
213
- });
214
- return a.useEffect(() => {
215
- const i = (c) => {
216
- if (c.target && !r.current) {
217
- let f = function() {
218
- At(
219
- Er,
220
- n,
221
- u,
222
- { discrete: !0 }
223
- );
224
- };
225
- const u = { originalEvent: c };
226
- c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = f, t.addEventListener("click", o.current, { once: !0 })) : f();
227
- } else
228
- t.removeEventListener("click", o.current);
229
- r.current = !1;
230
- }, s = window.setTimeout(() => {
231
- t.addEventListener("pointerdown", i);
232
- }, 0);
233
- return () => {
234
- window.clearTimeout(s), t.removeEventListener("pointerdown", i), t.removeEventListener("click", o.current);
235
- };
236
- }, [t, n]), {
237
- // ensures we check React component tree (not just DOM tree)
238
- onPointerDownCapture: () => r.current = !0
239
- };
240
- }
241
- function Sr(e, t = globalThis == null ? void 0 : globalThis.document) {
242
- const n = Y(e), r = a.useRef(!1);
243
- return a.useEffect(() => {
244
- const o = (i) => {
245
- i.target && !r.current && At(yr, n, { originalEvent: i }, {
246
- discrete: !1
247
- });
248
- };
249
- return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
250
- }, [t, n]), {
251
- onFocusCapture: () => r.current = !0,
252
- onBlurCapture: () => r.current = !1
253
- };
254
- }
255
- function lt() {
256
- const e = new CustomEvent(Be);
257
- document.dispatchEvent(e);
258
- }
259
- function At(e, t, n, { discrete: r }) {
260
- const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
261
- t && o.addEventListener(e, t, { once: !0 }), r ? xt(o, i) : o.dispatchEvent(i);
262
- }
263
- var Ae = 0;
264
- function Rr() {
265
- a.useEffect(() => {
266
- const e = document.querySelectorAll("[data-radix-focus-guard]");
267
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? dt()), document.body.insertAdjacentElement("beforeend", e[1] ?? dt()), Ae++, () => {
268
- Ae === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Ae--;
269
- };
270
- }, []);
271
- }
272
- function dt() {
273
- const e = document.createElement("span");
274
- return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
275
- }
276
- var De = "focusScope.autoFocusOnMount", Te = "focusScope.autoFocusOnUnmount", ft = { bubbles: !1, cancelable: !0 }, Mr = "FocusScope", Dt = a.forwardRef((e, t) => {
19
+ Ge.displayName = Z;
20
+ var zo = a.forwardRef((e, n) => {
277
21
  const {
278
- loop: n = !1,
279
- trapped: r = !1,
280
- onMountAutoFocus: o,
281
- onUnmountAutoFocus: i,
282
- ...s
283
- } = e, [c, f] = a.useState(null), u = Y(o), p = Y(i), m = a.useRef(null), v = k(t, (l) => f(l)), w = a.useRef({
284
- paused: !1,
285
- pause() {
286
- this.paused = !0;
287
- },
288
- resume() {
289
- this.paused = !1;
290
- }
291
- }).current;
292
- a.useEffect(() => {
293
- if (r) {
294
- let l = function(C) {
295
- if (w.paused || !c) return;
296
- const R = C.target;
297
- c.contains(R) ? m.current = R : V(m.current, { select: !0 });
298
- }, E = function(C) {
299
- if (w.paused || !c) return;
300
- const R = C.relatedTarget;
301
- R !== null && (c.contains(R) || V(m.current, { select: !0 }));
302
- }, g = function(C) {
303
- if (document.activeElement === document.body)
304
- for (const M of C)
305
- M.removedNodes.length > 0 && V(c);
306
- };
307
- document.addEventListener("focusin", l), document.addEventListener("focusout", E);
308
- const _ = new MutationObserver(g);
309
- return c && _.observe(c, { childList: !0, subtree: !0 }), () => {
310
- document.removeEventListener("focusin", l), document.removeEventListener("focusout", E), _.disconnect();
311
- };
312
- }
313
- }, [r, c, w.paused]), a.useEffect(() => {
314
- if (c) {
315
- mt.add(w);
316
- const l = document.activeElement;
317
- if (!c.contains(l)) {
318
- const g = new CustomEvent(De, ft);
319
- c.addEventListener(De, u), c.dispatchEvent(g), g.defaultPrevented || (Pr(Dr(Tt(c)), { select: !0 }), document.activeElement === l && V(c));
320
- }
321
- return () => {
322
- c.removeEventListener(De, u), setTimeout(() => {
323
- const g = new CustomEvent(Te, ft);
324
- c.addEventListener(Te, p), c.dispatchEvent(g), g.defaultPrevented || V(l ?? document.body, { select: !0 }), c.removeEventListener(Te, p), mt.remove(w);
325
- }, 0);
326
- };
327
- }
328
- }, [c, u, p, w]);
329
- const h = a.useCallback(
330
- (l) => {
331
- if (!n && !r || w.paused) return;
332
- const E = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, g = document.activeElement;
333
- if (E && g) {
334
- const _ = l.currentTarget, [C, R] = xr(_);
335
- C && R ? !l.shiftKey && g === R ? (l.preventDefault(), n && V(C, { select: !0 })) : l.shiftKey && g === C && (l.preventDefault(), n && V(R, { select: !0 })) : g === _ && l.preventDefault();
336
- }
337
- },
338
- [n, r, w.paused]
339
- );
340
- return /* @__PURE__ */ d(U.div, { tabIndex: -1, ...s, ref: v, onKeyDown: h });
341
- });
342
- Dt.displayName = Mr;
343
- function Pr(e, { select: t = !1 } = {}) {
344
- const n = document.activeElement;
345
- for (const r of e)
346
- if (V(r, { select: t }), document.activeElement !== n) return;
347
- }
348
- function xr(e) {
349
- const t = Tt(e), n = pt(t, e), r = pt(t.reverse(), e);
350
- return [n, r];
351
- }
352
- function Tt(e) {
353
- const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
354
- acceptNode: (r) => {
355
- const o = r.tagName === "INPUT" && r.type === "hidden";
356
- return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
357
- }
358
- });
359
- for (; n.nextNode(); ) t.push(n.currentNode);
360
- return t;
361
- }
362
- function pt(e, t) {
363
- for (const n of e)
364
- if (!Nr(n, { upTo: t })) return n;
365
- }
366
- function Nr(e, { upTo: t }) {
367
- if (getComputedStyle(e).visibility === "hidden") return !0;
368
- for (; e; ) {
369
- if (t !== void 0 && e === t) return !1;
370
- if (getComputedStyle(e).display === "none") return !0;
371
- e = e.parentElement;
372
- }
373
- return !1;
374
- }
375
- function Ir(e) {
376
- return e instanceof HTMLInputElement && "select" in e;
377
- }
378
- function V(e, { select: t = !1 } = {}) {
379
- if (e && e.focus) {
380
- const n = document.activeElement;
381
- e.focus({ preventScroll: !0 }), e !== n && Ir(e) && t && e.select();
382
- }
383
- }
384
- var mt = Ar();
385
- function Ar() {
386
- let e = [];
387
- return {
388
- add(t) {
389
- const n = e[0];
390
- t !== n && (n == null || n.pause()), e = vt(e, t), e.unshift(t);
391
- },
392
- remove(t) {
393
- var n;
394
- e = vt(e, t), (n = e[0]) == null || n.resume();
395
- }
396
- };
397
- }
398
- function vt(e, t) {
399
- const n = [...e], r = n.indexOf(t);
400
- return r !== -1 && n.splice(r, 1), n;
401
- }
402
- function Dr(e) {
403
- return e.filter((t) => t.tagName !== "A");
404
- }
405
- var Tr = "Arrow", Ot = a.forwardRef((e, t) => {
406
- const { children: n, width: r = 10, height: o = 5, ...i } = e;
407
- return /* @__PURE__ */ d(
408
- U.svg,
409
- {
410
- ...i,
411
- ref: t,
412
- width: r,
413
- height: o,
414
- viewBox: "0 0 30 10",
415
- preserveAspectRatio: "none",
416
- children: e.asChild ? n : /* @__PURE__ */ d("polygon", { points: "0,0 30,0 15,10" })
417
- }
418
- );
419
- });
420
- Ot.displayName = Tr;
421
- var Or = Ot, Xe = "Popper", [Ft, Lt] = Re(Xe), [Fr, kt] = Ft(Xe), Wt = (e) => {
422
- const { __scopePopper: t, children: n } = e, [r, o] = a.useState(null);
423
- return /* @__PURE__ */ d(Fr, { scope: t, anchor: r, onAnchorChange: o, children: n });
424
- };
425
- Wt.displayName = Xe;
426
- var Ut = "PopperAnchor", $t = a.forwardRef(
427
- (e, t) => {
428
- const { __scopePopper: n, virtualRef: r, ...o } = e, i = kt(Ut, n), s = a.useRef(null), c = k(t, s);
429
- return a.useEffect(() => {
430
- i.onAnchorChange((r == null ? void 0 : r.current) || s.current);
431
- }), r ? null : /* @__PURE__ */ d(U.div, { ...o, ref: c });
432
- }
433
- );
434
- $t.displayName = Ut;
435
- var je = "PopperContent", [Lr, kr] = Ft(je), Bt = a.forwardRef(
436
- (e, t) => {
437
- var K, ie, F, ce, rt, ot;
438
- const {
439
- __scopePopper: n,
440
- side: r = "bottom",
441
- sideOffset: o = 0,
442
- align: i = "center",
443
- alignOffset: s = 0,
444
- arrowPadding: c = 0,
445
- avoidCollisions: f = !0,
446
- collisionBoundary: u = [],
447
- collisionPadding: p = 0,
448
- sticky: m = "partial",
449
- hideWhenDetached: v = !1,
450
- updatePositionStrategy: w = "optimized",
451
- onPlaced: h,
452
- ...l
453
- } = e, E = kt(je, n), [g, _] = a.useState(null), C = k(t, (se) => _(se)), [R, M] = a.useState(null), x = Gn(R), b = (x == null ? void 0 : x.width) ?? 0, P = (x == null ? void 0 : x.height) ?? 0, I = r + (i !== "center" ? "-" + i : ""), T = typeof p == "number" ? p : { top: 0, right: 0, bottom: 0, left: 0, ...p }, z = Array.isArray(u) ? u : [u], X = z.length > 0, B = {
454
- padding: T,
455
- boundary: z.filter(Ur),
456
- // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
457
- altBoundary: X
458
- }, { refs: Q, floatingStyles: q, placement: W, isPositioned: J, middlewareData: O } = Hn({
459
- // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
460
- strategy: "fixed",
461
- placement: I,
462
- whileElementsMounted: (...se) => Yn(...se, {
463
- animationFrame: w === "always"
464
- }),
465
- elements: {
466
- reference: E.anchor
467
- },
468
- middleware: [
469
- Xn({ mainAxis: o + P, alignmentAxis: s }),
470
- f && jn({
471
- mainAxis: !0,
472
- crossAxis: !1,
473
- limiter: m === "partial" ? Zn() : void 0,
474
- ...B
475
- }),
476
- f && Qn({ ...B }),
477
- qn({
478
- ...B,
479
- apply: ({ elements: se, rects: at, availableWidth: Ln, availableHeight: kn }) => {
480
- const { width: Wn, height: Un } = at.reference, he = se.floating.style;
481
- he.setProperty("--radix-popper-available-width", `${Ln}px`), he.setProperty("--radix-popper-available-height", `${kn}px`), he.setProperty("--radix-popper-anchor-width", `${Wn}px`), he.setProperty("--radix-popper-anchor-height", `${Un}px`);
482
- }
483
- }),
484
- R && Jn({ element: R, padding: c }),
485
- $r({ arrowWidth: b, arrowHeight: P }),
486
- v && er({ strategy: "referenceHidden", ...B })
487
- ]
488
- }), [y, A] = zt(W), N = Y(h);
489
- Ce(() => {
490
- J && (N == null || N());
491
- }, [J, N]);
492
- const $ = (K = O.arrow) == null ? void 0 : K.x, oe = (ie = O.arrow) == null ? void 0 : ie.y, ae = ((F = O.arrow) == null ? void 0 : F.centerOffset) !== 0, [ve, j] = a.useState();
493
- return Ce(() => {
494
- g && j(window.getComputedStyle(g).zIndex);
495
- }, [g]), /* @__PURE__ */ d(
496
- "div",
497
- {
498
- ref: Q.setFloating,
499
- "data-radix-popper-content-wrapper": "",
500
- style: {
501
- ...q,
502
- transform: J ? q.transform : "translate(0, -200%)",
503
- // keep off the page when measuring
504
- minWidth: "max-content",
505
- zIndex: ve,
506
- "--radix-popper-transform-origin": [
507
- (ce = O.transformOrigin) == null ? void 0 : ce.x,
508
- (rt = O.transformOrigin) == null ? void 0 : rt.y
509
- ].join(" "),
510
- // hide the content if using the hide middleware and should be hidden
511
- // set visibility to hidden and disable pointer events so the UI behaves
512
- // as if the PopperContent isn't there at all
513
- ...((ot = O.hide) == null ? void 0 : ot.referenceHidden) && {
514
- visibility: "hidden",
515
- pointerEvents: "none"
516
- }
517
- },
518
- dir: e.dir,
519
- children: /* @__PURE__ */ d(
520
- Lr,
521
- {
522
- scope: n,
523
- placedSide: y,
524
- onArrowChange: M,
525
- arrowX: $,
526
- arrowY: oe,
527
- shouldHideArrow: ae,
528
- children: /* @__PURE__ */ d(
529
- U.div,
530
- {
531
- "data-side": y,
532
- "data-align": A,
533
- ...l,
534
- ref: C,
535
- style: {
536
- ...l.style,
537
- // if the PopperContent hasn't been placed yet (not all measurements done)
538
- // we prevent animations so that users's animation don't kick in too early referring wrong sides
539
- animation: J ? void 0 : "none"
540
- }
541
- }
542
- )
543
- }
544
- )
545
- }
546
- );
547
- }
548
- );
549
- Bt.displayName = je;
550
- var Kt = "PopperArrow", Wr = {
551
- top: "bottom",
552
- right: "left",
553
- bottom: "top",
554
- left: "right"
555
- }, Gt = a.forwardRef(function(t, n) {
556
- const { __scopePopper: r, ...o } = t, i = kr(Kt, r), s = Wr[i.placedSide];
557
- return (
558
- // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
559
- // doesn't report size as we'd expect on SVG elements.
560
- // it reports their bounding box which is effectively the largest path inside the SVG.
561
- /* @__PURE__ */ d(
562
- "span",
563
- {
564
- ref: i.onArrowChange,
565
- style: {
566
- position: "absolute",
567
- left: i.arrowX,
568
- top: i.arrowY,
569
- [s]: 0,
570
- transformOrigin: {
571
- top: "",
572
- right: "0 0",
573
- bottom: "center 0",
574
- left: "100% 0"
575
- }[i.placedSide],
576
- transform: {
577
- top: "translateY(100%)",
578
- right: "translateY(50%) rotate(90deg) translateX(-50%)",
579
- bottom: "rotate(180deg)",
580
- left: "translateY(50%) rotate(-90deg) translateX(50%)"
581
- }[i.placedSide],
582
- visibility: i.shouldHideArrow ? "hidden" : void 0
583
- },
584
- children: /* @__PURE__ */ d(
585
- Or,
586
- {
587
- ...o,
588
- ref: n,
589
- style: {
590
- ...o.style,
591
- // ensures the element can be measured correctly (mostly for if SVG)
592
- display: "block"
593
- }
594
- }
595
- )
596
- }
597
- )
598
- );
599
- });
600
- Gt.displayName = Kt;
601
- function Ur(e) {
602
- return e !== null;
603
- }
604
- var $r = (e) => ({
605
- name: "transformOrigin",
606
- options: e,
607
- fn(t) {
608
- var E, g, _;
609
- const { placement: n, rects: r, middlewareData: o } = t, s = ((E = o.arrow) == null ? void 0 : E.centerOffset) !== 0, c = s ? 0 : e.arrowWidth, f = s ? 0 : e.arrowHeight, [u, p] = zt(n), m = { start: "0%", center: "50%", end: "100%" }[p], v = (((g = o.arrow) == null ? void 0 : g.x) ?? 0) + c / 2, w = (((_ = o.arrow) == null ? void 0 : _.y) ?? 0) + f / 2;
610
- let h = "", l = "";
611
- return u === "bottom" ? (h = s ? m : `${v}px`, l = `${-f}px`) : u === "top" ? (h = s ? m : `${v}px`, l = `${r.floating.height + f}px`) : u === "right" ? (h = `${-f}px`, l = s ? m : `${w}px`) : u === "left" && (h = `${r.floating.width + f}px`, l = s ? m : `${w}px`), { data: { x: h, y: l } };
612
- }
613
- });
614
- function zt(e) {
615
- const [t, n = "center"] = e.split("-");
616
- return [t, n];
617
- }
618
- var Br = Wt, Kr = $t, Gr = Bt, zr = Gt;
619
- function Vr(e, t) {
620
- return a.useReducer((n, r) => t[n][r] ?? n, e);
621
- }
622
- var Me = (e) => {
623
- const { present: t, children: n } = e, r = Hr(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), i = k(r.ref, Yr(o));
624
- return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: i }) : null;
625
- };
626
- Me.displayName = "Presence";
627
- function Hr(e) {
628
- const [t, n] = a.useState(), r = a.useRef({}), o = a.useRef(e), i = a.useRef("none"), s = e ? "mounted" : "unmounted", [c, f] = Vr(s, {
629
- mounted: {
630
- UNMOUNT: "unmounted",
631
- ANIMATION_OUT: "unmountSuspended"
632
- },
633
- unmountSuspended: {
634
- MOUNT: "mounted",
635
- ANIMATION_END: "unmounted"
636
- },
637
- unmounted: {
638
- MOUNT: "mounted"
639
- }
640
- });
22
+ __scopeRovingFocusGroup: o,
23
+ orientation: t,
24
+ loop: r = !1,
25
+ dir: c,
26
+ currentTabStopId: l,
27
+ defaultCurrentTabStopId: d,
28
+ onCurrentTabStopIdChange: m,
29
+ onEntryFocus: _,
30
+ preventScrollOnEntryFocus: u = !1,
31
+ ...i
32
+ } = e, f = a.useRef(null), h = U(n, f), v = Ne(c), [R, w] = ye({
33
+ prop: l,
34
+ defaultProp: d ?? null,
35
+ onChange: m,
36
+ caller: Z
37
+ }), [S, A] = a.useState(!1), M = _e(_), E = Fe(o), $ = a.useRef(!1), [Q, F] = a.useState(0);
641
38
  return a.useEffect(() => {
642
- const u = ge(r.current);
643
- i.current = c === "mounted" ? u : "none";
644
- }, [c]), Ce(() => {
645
- const u = r.current, p = o.current;
646
- if (p !== e) {
647
- const v = i.current, w = ge(u);
648
- e ? f("MOUNT") : w === "none" || (u == null ? void 0 : u.display) === "none" ? f("UNMOUNT") : f(p && v !== w ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
649
- }
650
- }, [e, f]), Ce(() => {
651
- if (t) {
652
- let u;
653
- const p = t.ownerDocument.defaultView ?? window, m = (w) => {
654
- const l = ge(r.current).includes(w.animationName);
655
- if (w.target === t && l && (f("ANIMATION_END"), !o.current)) {
656
- const E = t.style.animationFillMode;
657
- t.style.animationFillMode = "forwards", u = p.setTimeout(() => {
658
- t.style.animationFillMode === "forwards" && (t.style.animationFillMode = E);
659
- });
660
- }
661
- }, v = (w) => {
662
- w.target === t && (i.current = ge(r.current));
663
- };
664
- return t.addEventListener("animationstart", v), t.addEventListener("animationcancel", m), t.addEventListener("animationend", m), () => {
665
- p.clearTimeout(u), t.removeEventListener("animationstart", v), t.removeEventListener("animationcancel", m), t.removeEventListener("animationend", m);
666
- };
667
- } else
668
- f("ANIMATION_END");
669
- }, [t, f]), {
670
- isPresent: ["mounted", "unmountSuspended"].includes(c),
671
- ref: a.useCallback((u) => {
672
- u && (r.current = getComputedStyle(u)), n(u);
673
- }, [])
674
- };
675
- }
676
- function ge(e) {
677
- return (e == null ? void 0 : e.animationName) || "none";
678
- }
679
- function Yr(e) {
680
- var r, o;
681
- let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
682
- return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
683
- }
684
- var Vt = a.forwardRef((e, t) => {
685
- const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(jr);
686
- if (i) {
687
- const s = i.props.children, c = o.map((f) => f === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : f);
688
- return /* @__PURE__ */ d(Ke, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
689
- }
690
- return /* @__PURE__ */ d(Ke, { ...r, ref: t, children: n });
691
- });
692
- Vt.displayName = "Slot";
693
- var Ke = a.forwardRef((e, t) => {
694
- const { children: n, ...r } = e;
695
- if (a.isValidElement(n)) {
696
- const o = Qr(n);
697
- return a.cloneElement(n, {
698
- ...Zr(r, n.props),
699
- // @ts-ignore
700
- ref: t ? fe(t, o) : o
701
- });
702
- }
703
- return a.Children.count(n) > 1 ? a.Children.only(null) : null;
704
- });
705
- Ke.displayName = "SlotClone";
706
- var Xr = ({ children: e }) => /* @__PURE__ */ d(He, { children: e });
707
- function jr(e) {
708
- return a.isValidElement(e) && e.type === Xr;
709
- }
710
- function Zr(e, t) {
711
- const n = { ...t };
712
- for (const r in t) {
713
- const o = e[r], i = t[r];
714
- /^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
715
- i(...c), o(...c);
716
- } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
717
- }
718
- return { ...e, ...n };
719
- }
720
- function Qr(e) {
721
- var r, o;
722
- let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
723
- return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
724
- }
725
- var qr = [
726
- "a",
727
- "button",
728
- "div",
729
- "form",
730
- "h2",
731
- "h3",
732
- "img",
733
- "input",
734
- "label",
735
- "li",
736
- "nav",
737
- "ol",
738
- "p",
739
- "span",
740
- "svg",
741
- "ul"
742
- ], Ht = qr.reduce((e, t) => {
743
- const n = a.forwardRef((r, o) => {
744
- const { asChild: i, ...s } = r, c = i ? Vt : t;
745
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...s, ref: o });
746
- });
747
- return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
748
- }, {}), Oe = "rovingFocusGroup.onEntryFocus", Jr = { bubbles: !1, cancelable: !0 }, Pe = "RovingFocusGroup", [Ge, Yt, eo] = bt(Pe), [to, Xt] = Re(
749
- Pe,
750
- [eo]
751
- ), [no, ro] = to(Pe), jt = a.forwardRef(
752
- (e, t) => /* @__PURE__ */ d(Ge.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(Ge.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(oo, { ...e, ref: t }) }) })
753
- );
754
- jt.displayName = Pe;
755
- var oo = a.forwardRef((e, t) => {
756
- const {
757
- __scopeRovingFocusGroup: n,
758
- orientation: r,
759
- loop: o = !1,
760
- dir: i,
761
- currentTabStopId: s,
762
- defaultCurrentTabStopId: c,
763
- onCurrentTabStopIdChange: f,
764
- onEntryFocus: u,
765
- preventScrollOnEntryFocus: p = !1,
766
- ...m
767
- } = e, v = a.useRef(null), w = k(t, v), h = Rt(i), [l = null, E] = St({
768
- prop: s,
769
- defaultProp: c,
770
- onChange: f
771
- }), [g, _] = a.useState(!1), C = Y(u), R = Yt(n), M = a.useRef(!1), [x, b] = a.useState(0);
772
- return a.useEffect(() => {
773
- const P = v.current;
774
- if (P)
775
- return P.addEventListener(Oe, C), () => P.removeEventListener(Oe, C);
776
- }, [C]), /* @__PURE__ */ d(
777
- no,
39
+ const C = f.current;
40
+ if (C)
41
+ return C.addEventListener(le, M), () => C.removeEventListener(le, M);
42
+ }, [M]), /* @__PURE__ */ s(
43
+ Lo,
778
44
  {
779
- scope: n,
780
- orientation: r,
781
- dir: h,
782
- loop: o,
783
- currentTabStopId: l,
45
+ scope: o,
46
+ orientation: t,
47
+ dir: v,
48
+ loop: r,
49
+ currentTabStopId: R,
784
50
  onItemFocus: a.useCallback(
785
- (P) => E(P),
786
- [E]
51
+ (C) => w(C),
52
+ [w]
787
53
  ),
788
- onItemShiftTab: a.useCallback(() => _(!0), []),
54
+ onItemShiftTab: a.useCallback(() => A(!0), []),
789
55
  onFocusableItemAdd: a.useCallback(
790
- () => b((P) => P + 1),
56
+ () => F((C) => C + 1),
791
57
  []
792
58
  ),
793
59
  onFocusableItemRemove: a.useCallback(
794
- () => b((P) => P - 1),
60
+ () => F((C) => C - 1),
795
61
  []
796
62
  ),
797
- children: /* @__PURE__ */ d(
798
- Ht.div,
63
+ children: /* @__PURE__ */ s(
64
+ O.div,
799
65
  {
800
- tabIndex: g || x === 0 ? -1 : 0,
801
- "data-orientation": r,
802
- ...m,
803
- ref: w,
66
+ tabIndex: S || Q === 0 ? -1 : 0,
67
+ "data-orientation": t,
68
+ ...i,
69
+ ref: h,
804
70
  style: { outline: "none", ...e.style },
805
- onMouseDown: S(e.onMouseDown, () => {
806
- M.current = !0;
71
+ onMouseDown: g(e.onMouseDown, () => {
72
+ $.current = !0;
807
73
  }),
808
- onFocus: S(e.onFocus, (P) => {
809
- const I = !M.current;
810
- if (P.target === P.currentTarget && I && !g) {
811
- const T = new CustomEvent(Oe, Jr);
812
- if (P.currentTarget.dispatchEvent(T), !T.defaultPrevented) {
813
- const z = R().filter((W) => W.focusable), X = z.find((W) => W.active), B = z.find((W) => W.id === l), q = [X, B, ...z].filter(
74
+ onFocus: g(e.onFocus, (C) => {
75
+ const L = !$.current;
76
+ if (C.target === C.currentTarget && L && !S) {
77
+ const k = new CustomEvent(le, Fo);
78
+ if (C.currentTarget.dispatchEvent(k), !k.defaultPrevented) {
79
+ const W = E().filter((P) => P.focusable), V = W.find((P) => P.active), ee = W.find((P) => P.id === R), se = [V, ee, ...W].filter(
814
80
  Boolean
815
- ).map((W) => W.ref.current);
816
- qt(q, p);
81
+ ).map((P) => P.ref.current);
82
+ ze(se, u);
817
83
  }
818
84
  }
819
- M.current = !1;
85
+ $.current = !1;
820
86
  }),
821
- onBlur: S(e.onBlur, () => _(!1))
87
+ onBlur: g(e.onBlur, () => A(!1))
822
88
  }
823
89
  )
824
90
  }
825
91
  );
826
- }), Zt = "RovingFocusGroupItem", Qt = a.forwardRef(
827
- (e, t) => {
92
+ }), Le = "RovingFocusGroupItem", Ke = a.forwardRef(
93
+ (e, n) => {
828
94
  const {
829
- __scopeRovingFocusGroup: n,
830
- focusable: r = !0,
831
- active: o = !1,
832
- tabStopId: i,
833
- ...s
834
- } = e, c = We(), f = i || c, u = ro(Zt, n), p = u.currentTabStopId === f, m = Yt(n), { onFocusableItemAdd: v, onFocusableItemRemove: w } = u;
95
+ __scopeRovingFocusGroup: o,
96
+ focusable: t = !0,
97
+ active: r = !1,
98
+ tabStopId: c,
99
+ children: l,
100
+ ...d
101
+ } = e, m = de(), _ = c || m, u = Ko(Le, o), i = u.currentTabStopId === _, f = Fe(o), { onFocusableItemAdd: h, onFocusableItemRemove: v, currentTabStopId: R } = u;
835
102
  return a.useEffect(() => {
836
- if (r)
837
- return v(), () => w();
838
- }, [r, v, w]), /* @__PURE__ */ d(
839
- Ge.ItemSlot,
103
+ if (t)
104
+ return h(), () => v();
105
+ }, [t, h, v]), /* @__PURE__ */ s(
106
+ fe.ItemSlot,
840
107
  {
841
- scope: n,
842
- id: f,
843
- focusable: r,
844
- active: o,
845
- children: /* @__PURE__ */ d(
846
- Ht.span,
108
+ scope: o,
109
+ id: _,
110
+ focusable: t,
111
+ active: r,
112
+ children: /* @__PURE__ */ s(
113
+ O.span,
847
114
  {
848
- tabIndex: p ? 0 : -1,
115
+ tabIndex: i ? 0 : -1,
849
116
  "data-orientation": u.orientation,
850
- ...s,
851
- ref: t,
852
- onMouseDown: S(e.onMouseDown, (h) => {
853
- r ? u.onItemFocus(f) : h.preventDefault();
117
+ ...d,
118
+ ref: n,
119
+ onMouseDown: g(e.onMouseDown, (w) => {
120
+ t ? u.onItemFocus(_) : w.preventDefault();
854
121
  }),
855
- onFocus: S(e.onFocus, () => u.onItemFocus(f)),
856
- onKeyDown: S(e.onKeyDown, (h) => {
857
- if (h.key === "Tab" && h.shiftKey) {
122
+ onFocus: g(e.onFocus, () => u.onItemFocus(_)),
123
+ onKeyDown: g(e.onKeyDown, (w) => {
124
+ if (w.key === "Tab" && w.shiftKey) {
858
125
  u.onItemShiftTab();
859
126
  return;
860
127
  }
861
- if (h.target !== h.currentTarget) return;
862
- const l = co(h, u.orientation, u.dir);
863
- if (l !== void 0) {
864
- if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
865
- h.preventDefault();
866
- let g = m().filter((_) => _.focusable).map((_) => _.ref.current);
867
- if (l === "last") g.reverse();
868
- else if (l === "prev" || l === "next") {
869
- l === "prev" && g.reverse();
870
- const _ = g.indexOf(h.currentTarget);
871
- g = u.loop ? so(g, _ + 1) : g.slice(_ + 1);
128
+ if (w.target !== w.currentTarget) return;
129
+ const S = $o(w, u.orientation, u.dir);
130
+ if (S !== void 0) {
131
+ if (w.metaKey || w.ctrlKey || w.altKey || w.shiftKey) return;
132
+ w.preventDefault();
133
+ let M = f().filter((E) => E.focusable).map((E) => E.ref.current);
134
+ if (S === "last") M.reverse();
135
+ else if (S === "prev" || S === "next") {
136
+ S === "prev" && M.reverse();
137
+ const E = M.indexOf(w.currentTarget);
138
+ M = u.loop ? Wo(M, E + 1) : M.slice(E + 1);
872
139
  }
873
- setTimeout(() => qt(g));
140
+ setTimeout(() => ze(M));
874
141
  }
875
- })
142
+ }),
143
+ children: typeof l == "function" ? l({ isCurrentTabStop: i, hasTabStop: R != null }) : l
876
144
  }
877
145
  )
878
146
  }
879
147
  );
880
148
  }
881
149
  );
882
- Qt.displayName = Zt;
883
- var ao = {
150
+ Ke.displayName = Le;
151
+ var Uo = {
884
152
  ArrowLeft: "prev",
885
153
  ArrowUp: "prev",
886
154
  ArrowRight: "next",
@@ -890,678 +158,236 @@ var ao = {
890
158
  PageDown: "last",
891
159
  End: "last"
892
160
  };
893
- function io(e, t) {
894
- return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
895
- }
896
- function co(e, t, n) {
897
- const r = io(e.key, n);
898
- if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
899
- return ao[r];
900
- }
901
- function qt(e, t = !1) {
902
- const n = document.activeElement;
903
- for (const r of e)
904
- if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
905
- }
906
- function so(e, t) {
907
- return e.map((n, r) => e[(t + r) % e.length]);
908
- }
909
- var uo = jt, lo = Qt, ye = "right-scroll-bar-position", _e = "width-before-scroll-bar", fo = "with-scroll-bars-hidden", po = "--removed-body-scroll-bar-size";
910
- function Fe(e, t) {
911
- return typeof e == "function" ? e(t) : e && (e.current = t), e;
912
- }
913
- function mo(e, t) {
914
- var n = Ct(function() {
915
- return {
916
- // value
917
- value: e,
918
- // last callback
919
- callback: t,
920
- // "memoized" public interface
921
- facade: {
922
- get current() {
923
- return n.value;
924
- },
925
- set current(r) {
926
- var o = n.value;
927
- o !== r && (n.value = r, n.callback(r, o));
928
- }
929
- }
930
- };
931
- })[0];
932
- return n.callback = t, n.facade;
933
- }
934
- var vo = typeof window < "u" ? a.useLayoutEffect : a.useEffect, ht = /* @__PURE__ */ new WeakMap();
935
- function ho(e, t) {
936
- var n = mo(null, function(r) {
937
- return e.forEach(function(o) {
938
- return Fe(o, r);
939
- });
940
- });
941
- return vo(function() {
942
- var r = ht.get(n);
943
- if (r) {
944
- var o = new Set(r), i = new Set(e), s = n.current;
945
- o.forEach(function(c) {
946
- i.has(c) || Fe(c, null);
947
- }), i.forEach(function(c) {
948
- o.has(c) || Fe(c, s);
949
- });
950
- }
951
- ht.set(n, e);
952
- }, [e]), n;
953
- }
954
- function go(e) {
955
- return e;
956
- }
957
- function wo(e, t) {
958
- t === void 0 && (t = go);
959
- var n = [], r = !1, o = {
960
- read: function() {
961
- if (r)
962
- throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
963
- return n.length ? n[n.length - 1] : e;
964
- },
965
- useMedium: function(i) {
966
- var s = t(i, r);
967
- return n.push(s), function() {
968
- n = n.filter(function(c) {
969
- return c !== s;
970
- });
971
- };
972
- },
973
- assignSyncMedium: function(i) {
974
- for (r = !0; n.length; ) {
975
- var s = n;
976
- n = [], s.forEach(i);
977
- }
978
- n = {
979
- push: function(c) {
980
- return i(c);
981
- },
982
- filter: function() {
983
- return n;
984
- }
985
- };
986
- },
987
- assignMedium: function(i) {
988
- r = !0;
989
- var s = [];
990
- if (n.length) {
991
- var c = n;
992
- n = [], c.forEach(i), s = n;
993
- }
994
- var f = function() {
995
- var p = s;
996
- s = [], p.forEach(i);
997
- }, u = function() {
998
- return Promise.resolve().then(f);
999
- };
1000
- u(), n = {
1001
- push: function(p) {
1002
- s.push(p), u();
1003
- },
1004
- filter: function(p) {
1005
- return s = s.filter(p), n;
1006
- }
1007
- };
1008
- }
1009
- };
1010
- return o;
1011
- }
1012
- function Eo(e) {
1013
- e === void 0 && (e = {});
1014
- var t = wo(null);
1015
- return t.options = H({ async: !0, ssr: !1 }, e), t;
1016
- }
1017
- var Jt = function(e) {
1018
- var t = e.sideCar, n = Mt(e, ["sideCar"]);
1019
- if (!t)
1020
- throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1021
- var r = t.read();
1022
- if (!r)
1023
- throw new Error("Sidecar medium not found");
1024
- return a.createElement(r, H({}, n));
1025
- };
1026
- Jt.isSideCarExport = !0;
1027
- function yo(e, t) {
1028
- return e.useMedium(t), Jt;
1029
- }
1030
- var en = Eo(), Le = function() {
1031
- }, xe = a.forwardRef(function(e, t) {
1032
- var n = a.useRef(null), r = a.useState({
1033
- onScrollCapture: Le,
1034
- onWheelCapture: Le,
1035
- onTouchMoveCapture: Le
1036
- }), o = r[0], i = r[1], s = e.forwardProps, c = e.children, f = e.className, u = e.removeScrollBar, p = e.enabled, m = e.shards, v = e.sideCar, w = e.noIsolation, h = e.inert, l = e.allowPinchZoom, E = e.as, g = E === void 0 ? "div" : E, _ = e.gapMode, C = Mt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = v, M = ho([n, t]), x = H(H({}, C), o);
1037
- return a.createElement(
1038
- a.Fragment,
1039
- null,
1040
- p && a.createElement(R, { sideCar: en, removeScrollBar: u, shards: m, noIsolation: w, inert: h, setCallbacks: i, allowPinchZoom: !!l, lockRef: n, gapMode: _ }),
1041
- s ? a.cloneElement(a.Children.only(c), H(H({}, x), { ref: M })) : a.createElement(g, H({}, x, { className: f, ref: M }), c)
1042
- );
1043
- });
1044
- xe.defaultProps = {
1045
- enabled: !0,
1046
- removeScrollBar: !0,
1047
- inert: !1
1048
- };
1049
- xe.classNames = {
1050
- fullWidth: _e,
1051
- zeroRight: ye
1052
- };
1053
- function _o() {
1054
- if (!document)
1055
- return null;
1056
- var e = document.createElement("style");
1057
- e.type = "text/css";
1058
- var t = tr();
1059
- return t && e.setAttribute("nonce", t), e;
1060
- }
1061
- function Co(e, t) {
1062
- e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
1063
- }
1064
- function bo(e) {
1065
- var t = document.head || document.getElementsByTagName("head")[0];
1066
- t.appendChild(e);
1067
- }
1068
- var So = function() {
1069
- var e = 0, t = null;
1070
- return {
1071
- add: function(n) {
1072
- e == 0 && (t = _o()) && (Co(t, n), bo(t)), e++;
1073
- },
1074
- remove: function() {
1075
- e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
1076
- }
1077
- };
1078
- }, Ro = function() {
1079
- var e = So();
1080
- return function(t, n) {
1081
- a.useEffect(function() {
1082
- return e.add(t), function() {
1083
- e.remove();
1084
- };
1085
- }, [t && n]);
1086
- };
1087
- }, tn = function() {
1088
- var e = Ro(), t = function(n) {
1089
- var r = n.styles, o = n.dynamic;
1090
- return e(r, o), null;
1091
- };
1092
- return t;
1093
- }, Mo = {
1094
- left: 0,
1095
- top: 0,
1096
- right: 0,
1097
- gap: 0
1098
- }, ke = function(e) {
1099
- return parseInt(e || "", 10) || 0;
1100
- }, Po = function(e) {
1101
- var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
1102
- return [ke(n), ke(r), ke(o)];
1103
- }, xo = function(e) {
1104
- if (e === void 0 && (e = "margin"), typeof window > "u")
1105
- return Mo;
1106
- var t = Po(e), n = document.documentElement.clientWidth, r = window.innerWidth;
1107
- return {
1108
- left: t[0],
1109
- top: t[1],
1110
- right: t[2],
1111
- gap: Math.max(0, r - n + t[2] - t[0])
1112
- };
1113
- }, No = tn(), ne = "data-scroll-locked", Io = function(e, t, n, r) {
1114
- var o = e.left, i = e.top, s = e.right, c = e.gap;
1115
- return n === void 0 && (n = "margin"), `
1116
- .`.concat(fo, ` {
1117
- overflow: hidden `).concat(r, `;
1118
- padding-right: `).concat(c, "px ").concat(r, `;
1119
- }
1120
- body[`).concat(ne, `] {
1121
- overflow: hidden `).concat(r, `;
1122
- overscroll-behavior: contain;
1123
- `).concat([
1124
- t && "position: relative ".concat(r, ";"),
1125
- n === "margin" && `
1126
- padding-left: `.concat(o, `px;
1127
- padding-top: `).concat(i, `px;
1128
- padding-right: `).concat(s, `px;
1129
- margin-left:0;
1130
- margin-top:0;
1131
- margin-right: `).concat(c, "px ").concat(r, `;
1132
- `),
1133
- n === "padding" && "padding-right: ".concat(c, "px ").concat(r, ";")
1134
- ].filter(Boolean).join(""), `
1135
- }
1136
-
1137
- .`).concat(ye, ` {
1138
- right: `).concat(c, "px ").concat(r, `;
1139
- }
1140
-
1141
- .`).concat(_e, ` {
1142
- margin-right: `).concat(c, "px ").concat(r, `;
1143
- }
1144
-
1145
- .`).concat(ye, " .").concat(ye, ` {
1146
- right: 0 `).concat(r, `;
1147
- }
1148
-
1149
- .`).concat(_e, " .").concat(_e, ` {
1150
- margin-right: 0 `).concat(r, `;
1151
- }
1152
-
1153
- body[`).concat(ne, `] {
1154
- `).concat(po, ": ").concat(c, `px;
1155
- }
1156
- `);
1157
- }, gt = function() {
1158
- var e = parseInt(document.body.getAttribute(ne) || "0", 10);
1159
- return isFinite(e) ? e : 0;
1160
- }, Ao = function() {
1161
- a.useEffect(function() {
1162
- return document.body.setAttribute(ne, (gt() + 1).toString()), function() {
1163
- var e = gt() - 1;
1164
- e <= 0 ? document.body.removeAttribute(ne) : document.body.setAttribute(ne, e.toString());
1165
- };
1166
- }, []);
1167
- }, Do = function(e) {
1168
- var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
1169
- Ao();
1170
- var i = a.useMemo(function() {
1171
- return xo(o);
1172
- }, [o]);
1173
- return a.createElement(No, { styles: Io(i, !t, o, n ? "" : "!important") });
1174
- }, ze = !1;
1175
- if (typeof window < "u")
1176
- try {
1177
- var we = Object.defineProperty({}, "passive", {
1178
- get: function() {
1179
- return ze = !0, !0;
1180
- }
1181
- });
1182
- window.addEventListener("test", we, we), window.removeEventListener("test", we, we);
1183
- } catch {
1184
- ze = !1;
1185
- }
1186
- var ee = ze ? { passive: !1 } : !1, To = function(e) {
1187
- return e.tagName === "TEXTAREA";
1188
- }, nn = function(e, t) {
1189
- if (!(e instanceof Element))
1190
- return !1;
1191
- var n = window.getComputedStyle(e);
1192
- return (
1193
- // not-not-scrollable
1194
- n[t] !== "hidden" && // contains scroll inside self
1195
- !(n.overflowY === n.overflowX && !To(e) && n[t] === "visible")
1196
- );
1197
- }, Oo = function(e) {
1198
- return nn(e, "overflowY");
1199
- }, Fo = function(e) {
1200
- return nn(e, "overflowX");
1201
- }, wt = function(e, t) {
1202
- var n = t.ownerDocument, r = t;
1203
- do {
1204
- typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
1205
- var o = rn(e, r);
1206
- if (o) {
1207
- var i = on(e, r), s = i[1], c = i[2];
1208
- if (s > c)
1209
- return !0;
1210
- }
1211
- r = r.parentNode;
1212
- } while (r && r !== n.body);
1213
- return !1;
1214
- }, Lo = function(e) {
1215
- var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
1216
- return [
1217
- t,
1218
- n,
1219
- r
1220
- ];
1221
- }, ko = function(e) {
1222
- var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
1223
- return [
1224
- t,
1225
- n,
1226
- r
1227
- ];
1228
- }, rn = function(e, t) {
1229
- return e === "v" ? Oo(t) : Fo(t);
1230
- }, on = function(e, t) {
1231
- return e === "v" ? Lo(t) : ko(t);
1232
- }, Wo = function(e, t) {
1233
- return e === "h" && t === "rtl" ? -1 : 1;
1234
- }, Uo = function(e, t, n, r, o) {
1235
- var i = Wo(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, f = t.contains(c), u = !1, p = s > 0, m = 0, v = 0;
1236
- do {
1237
- var w = on(e, c), h = w[0], l = w[1], E = w[2], g = l - E - i * h;
1238
- (h || g) && rn(e, c) && (m += g, v += h), c instanceof ShadowRoot ? c = c.host : c = c.parentNode;
1239
- } while (
1240
- // portaled content
1241
- !f && c !== document.body || // self content
1242
- f && (t.contains(c) || t === c)
1243
- );
1244
- return (p && (Math.abs(m) < 1 || !o) || !p && (Math.abs(v) < 1 || !o)) && (u = !0), u;
1245
- }, Ee = function(e) {
1246
- return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1247
- }, Et = function(e) {
1248
- return [e.deltaX, e.deltaY];
1249
- }, yt = function(e) {
1250
- return e && "current" in e ? e.current : e;
1251
- }, $o = function(e, t) {
1252
- return e[0] === t[0] && e[1] === t[1];
1253
- }, Bo = function(e) {
1254
- return `
1255
- .block-interactivity-`.concat(e, ` {pointer-events: none;}
1256
- .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1257
- `);
1258
- }, Ko = 0, te = [];
1259
- function Go(e) {
1260
- var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(Ko++)[0], i = a.useState(tn)[0], s = a.useRef(e);
1261
- a.useEffect(function() {
1262
- s.current = e;
1263
- }, [e]), a.useEffect(function() {
1264
- if (e.inert) {
1265
- document.body.classList.add("block-interactivity-".concat(o));
1266
- var l = rr([e.lockRef.current], (e.shards || []).map(yt), !0).filter(Boolean);
1267
- return l.forEach(function(E) {
1268
- return E.classList.add("allow-interactivity-".concat(o));
1269
- }), function() {
1270
- document.body.classList.remove("block-interactivity-".concat(o)), l.forEach(function(E) {
1271
- return E.classList.remove("allow-interactivity-".concat(o));
1272
- });
1273
- };
1274
- }
1275
- }, [e.inert, e.lockRef.current, e.shards]);
1276
- var c = a.useCallback(function(l, E) {
1277
- if ("touches" in l && l.touches.length === 2 || l.type === "wheel" && l.ctrlKey)
1278
- return !s.current.allowPinchZoom;
1279
- var g = Ee(l), _ = n.current, C = "deltaX" in l ? l.deltaX : _[0] - g[0], R = "deltaY" in l ? l.deltaY : _[1] - g[1], M, x = l.target, b = Math.abs(C) > Math.abs(R) ? "h" : "v";
1280
- if ("touches" in l && b === "h" && x.type === "range")
1281
- return !1;
1282
- var P = wt(b, x);
1283
- if (!P)
1284
- return !0;
1285
- if (P ? M = b : (M = b === "v" ? "h" : "v", P = wt(b, x)), !P)
1286
- return !1;
1287
- if (!r.current && "changedTouches" in l && (C || R) && (r.current = M), !M)
1288
- return !0;
1289
- var I = r.current || M;
1290
- return Uo(I, E, l, I === "h" ? C : R, !0);
1291
- }, []), f = a.useCallback(function(l) {
1292
- var E = l;
1293
- if (!(!te.length || te[te.length - 1] !== i)) {
1294
- var g = "deltaY" in E ? Et(E) : Ee(E), _ = t.current.filter(function(M) {
1295
- return M.name === E.type && (M.target === E.target || E.target === M.shadowParent) && $o(M.delta, g);
1296
- })[0];
1297
- if (_ && _.should) {
1298
- E.cancelable && E.preventDefault();
1299
- return;
1300
- }
1301
- if (!_) {
1302
- var C = (s.current.shards || []).map(yt).filter(Boolean).filter(function(M) {
1303
- return M.contains(E.target);
1304
- }), R = C.length > 0 ? c(E, C[0]) : !s.current.noIsolation;
1305
- R && E.cancelable && E.preventDefault();
1306
- }
1307
- }
1308
- }, []), u = a.useCallback(function(l, E, g, _) {
1309
- var C = { name: l, delta: E, target: g, should: _, shadowParent: zo(g) };
1310
- t.current.push(C), setTimeout(function() {
1311
- t.current = t.current.filter(function(R) {
1312
- return R !== C;
1313
- });
1314
- }, 1);
1315
- }, []), p = a.useCallback(function(l) {
1316
- n.current = Ee(l), r.current = void 0;
1317
- }, []), m = a.useCallback(function(l) {
1318
- u(l.type, Et(l), l.target, c(l, e.lockRef.current));
1319
- }, []), v = a.useCallback(function(l) {
1320
- u(l.type, Ee(l), l.target, c(l, e.lockRef.current));
1321
- }, []);
1322
- a.useEffect(function() {
1323
- return te.push(i), e.setCallbacks({
1324
- onScrollCapture: m,
1325
- onWheelCapture: m,
1326
- onTouchMoveCapture: v
1327
- }), document.addEventListener("wheel", f, ee), document.addEventListener("touchmove", f, ee), document.addEventListener("touchstart", p, ee), function() {
1328
- te = te.filter(function(l) {
1329
- return l !== i;
1330
- }), document.removeEventListener("wheel", f, ee), document.removeEventListener("touchmove", f, ee), document.removeEventListener("touchstart", p, ee);
1331
- };
1332
- }, []);
1333
- var w = e.removeScrollBar, h = e.inert;
1334
- return a.createElement(
1335
- a.Fragment,
1336
- null,
1337
- h ? a.createElement(i, { styles: Bo(o) }) : null,
1338
- w ? a.createElement(Do, { gapMode: e.gapMode }) : null
1339
- );
1340
- }
1341
- function zo(e) {
1342
- for (var t = null; e !== null; )
1343
- e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1344
- return t;
1345
- }
1346
- const Vo = yo(en, Go);
1347
- var an = a.forwardRef(function(e, t) {
1348
- return a.createElement(xe, H({}, e, { ref: t, sideCar: Vo }));
1349
- });
1350
- an.classNames = xe.classNames;
1351
- var Ve = ["Enter", " "], Ho = ["ArrowDown", "PageUp", "Home"], cn = ["ArrowUp", "PageDown", "End"], Yo = [...Ho, ...cn], Xo = {
1352
- ltr: [...Ve, "ArrowRight"],
1353
- rtl: [...Ve, "ArrowLeft"]
1354
- }, jo = {
161
+ function Bo(e, n) {
162
+ return n !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
163
+ }
164
+ function $o(e, n, o) {
165
+ const t = Bo(e.key, o);
166
+ if (!(n === "vertical" && ["ArrowLeft", "ArrowRight"].includes(t)) && !(n === "horizontal" && ["ArrowUp", "ArrowDown"].includes(t)))
167
+ return Uo[t];
168
+ }
169
+ function ze(e, n = !1) {
170
+ const o = document.activeElement;
171
+ for (const t of e)
172
+ if (t === o || (t.focus({ preventScroll: n }), document.activeElement !== o)) return;
173
+ }
174
+ function Wo(e, n) {
175
+ return e.map((o, t) => e[(n + t) % e.length]);
176
+ }
177
+ var Vo = Ge, Yo = Ke, pe = ["Enter", " "], Xo = ["ArrowDown", "PageUp", "Home"], Ue = ["ArrowUp", "PageDown", "End"], jo = [...Xo, ...Ue], Ho = {
178
+ ltr: [...pe, "ArrowRight"],
179
+ rtl: [...pe, "ArrowLeft"]
180
+ }, Zo = {
1355
181
  ltr: ["ArrowLeft"],
1356
182
  rtl: ["ArrowRight"]
1357
- }, pe = "Menu", [le, Zo, Qo] = bt(pe), [Z, sn] = Re(pe, [
1358
- Qo,
1359
- Lt,
1360
- Xt
1361
- ]), Ne = Lt(), un = Xt(), [qo, re] = Z(pe), [Jo, me] = Z(pe), ln = (e) => {
1362
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: i, modal: s = !0 } = e, c = Ne(t), [f, u] = a.useState(null), p = a.useRef(!1), m = Y(i), v = Rt(o);
183
+ }, q = "Menu", [j, qo, Jo] = Ae(q), [G, Be] = me(q, [
184
+ Jo,
185
+ Oe,
186
+ ke
187
+ ]), re = Oe(), $e = ke(), [Qo, B] = G(q), [en, J] = G(q), We = (e) => {
188
+ const { __scopeMenu: n, open: o = !1, children: t, dir: r, onOpenChange: c, modal: l = !0 } = e, d = re(n), [m, _] = a.useState(null), u = a.useRef(!1), i = _e(c), f = Ne(r);
1363
189
  return a.useEffect(() => {
1364
- const w = () => {
1365
- p.current = !0, document.addEventListener("pointerdown", h, { capture: !0, once: !0 }), document.addEventListener("pointermove", h, { capture: !0, once: !0 });
1366
- }, h = () => p.current = !1;
1367
- return document.addEventListener("keydown", w, { capture: !0 }), () => {
1368
- document.removeEventListener("keydown", w, { capture: !0 }), document.removeEventListener("pointerdown", h, { capture: !0 }), document.removeEventListener("pointermove", h, { capture: !0 });
190
+ const h = () => {
191
+ u.current = !0, document.addEventListener("pointerdown", v, { capture: !0, once: !0 }), document.addEventListener("pointermove", v, { capture: !0, once: !0 });
192
+ }, v = () => u.current = !1;
193
+ return document.addEventListener("keydown", h, { capture: !0 }), () => {
194
+ document.removeEventListener("keydown", h, { capture: !0 }), document.removeEventListener("pointerdown", v, { capture: !0 }), document.removeEventListener("pointermove", v, { capture: !0 });
1369
195
  };
1370
- }, []), /* @__PURE__ */ d(Br, { ...c, children: /* @__PURE__ */ d(
1371
- qo,
196
+ }, []), /* @__PURE__ */ s(So, { ...d, children: /* @__PURE__ */ s(
197
+ Qo,
1372
198
  {
1373
- scope: t,
1374
- open: n,
1375
- onOpenChange: m,
1376
- content: f,
1377
- onContentChange: u,
1378
- children: /* @__PURE__ */ d(
1379
- Jo,
199
+ scope: n,
200
+ open: o,
201
+ onOpenChange: i,
202
+ content: m,
203
+ onContentChange: _,
204
+ children: /* @__PURE__ */ s(
205
+ en,
1380
206
  {
1381
- scope: t,
1382
- onClose: a.useCallback(() => m(!1), [m]),
1383
- isUsingKeyboardRef: p,
1384
- dir: v,
1385
- modal: s,
1386
- children: r
207
+ scope: n,
208
+ onClose: a.useCallback(() => i(!1), [i]),
209
+ isUsingKeyboardRef: u,
210
+ dir: f,
211
+ modal: l,
212
+ children: t
1387
213
  }
1388
214
  )
1389
215
  }
1390
216
  ) });
1391
217
  };
1392
- ln.displayName = pe;
1393
- var ea = "MenuAnchor", Ze = a.forwardRef(
1394
- (e, t) => {
1395
- const { __scopeMenu: n, ...r } = e, o = Ne(n);
1396
- return /* @__PURE__ */ d(Kr, { ...o, ...r, ref: t });
218
+ We.displayName = q;
219
+ var on = "MenuAnchor", we = a.forwardRef(
220
+ (e, n) => {
221
+ const { __scopeMenu: o, ...t } = e, r = re(o);
222
+ return /* @__PURE__ */ s(Io, { ...r, ...t, ref: n });
1397
223
  }
1398
224
  );
1399
- Ze.displayName = ea;
1400
- var ta = "MenuPortal", [Mi, dn] = Z(ta, {
225
+ we.displayName = on;
226
+ var nn = "MenuPortal", [Et, Ve] = G(nn, {
1401
227
  forceMount: void 0
1402
- }), L = "MenuContent", [na, Qe] = Z(L), fn = a.forwardRef(
1403
- (e, t) => {
1404
- const n = dn(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = re(L, e.__scopeMenu), s = me(L, e.__scopeMenu);
1405
- return /* @__PURE__ */ d(le.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(Me, { present: r || i.open, children: /* @__PURE__ */ d(le.Slot, { scope: e.__scopeMenu, children: s.modal ? /* @__PURE__ */ d(ra, { ...o, ref: t }) : /* @__PURE__ */ d(oa, { ...o, ref: t }) }) }) });
1406
- }
1407
- ), ra = a.forwardRef(
1408
- (e, t) => {
1409
- const n = re(L, e.__scopeMenu), r = a.useRef(null), o = k(t, r);
228
+ }), D = "MenuContent", [tn, ve] = G(D), Ye = a.forwardRef(
229
+ (e, n) => {
230
+ const o = Ve(D, e.__scopeMenu), { forceMount: t = o.forceMount, ...r } = e, c = B(D, e.__scopeMenu), l = J(D, e.__scopeMenu);
231
+ return /* @__PURE__ */ s(j.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(ge, { present: t || c.open, children: /* @__PURE__ */ s(j.Slot, { scope: e.__scopeMenu, children: l.modal ? /* @__PURE__ */ s(rn, { ...r, ref: n }) : /* @__PURE__ */ s(an, { ...r, ref: n }) }) }) });
232
+ }
233
+ ), rn = a.forwardRef(
234
+ (e, n) => {
235
+ const o = B(D, e.__scopeMenu), t = a.useRef(null), r = U(n, t);
1410
236
  return a.useEffect(() => {
1411
- const i = r.current;
1412
- if (i) return nr(i);
1413
- }, []), /* @__PURE__ */ d(
1414
- qe,
237
+ const c = t.current;
238
+ if (c) return bo(c);
239
+ }, []), /* @__PURE__ */ s(
240
+ he,
1415
241
  {
1416
242
  ...e,
1417
- ref: o,
1418
- trapFocus: n.open,
1419
- disableOutsidePointerEvents: n.open,
243
+ ref: r,
244
+ trapFocus: o.open,
245
+ disableOutsidePointerEvents: o.open,
1420
246
  disableOutsideScroll: !0,
1421
- onFocusOutside: S(
247
+ onFocusOutside: g(
1422
248
  e.onFocusOutside,
1423
- (i) => i.preventDefault(),
249
+ (c) => c.preventDefault(),
1424
250
  { checkForDefaultPrevented: !1 }
1425
251
  ),
1426
- onDismiss: () => n.onOpenChange(!1)
252
+ onDismiss: () => o.onOpenChange(!1)
1427
253
  }
1428
254
  );
1429
255
  }
1430
- ), oa = a.forwardRef((e, t) => {
1431
- const n = re(L, e.__scopeMenu);
1432
- return /* @__PURE__ */ d(
1433
- qe,
256
+ ), an = a.forwardRef((e, n) => {
257
+ const o = B(D, e.__scopeMenu);
258
+ return /* @__PURE__ */ s(
259
+ he,
1434
260
  {
1435
261
  ...e,
1436
- ref: t,
262
+ ref: n,
1437
263
  trapFocus: !1,
1438
264
  disableOutsidePointerEvents: !1,
1439
265
  disableOutsideScroll: !1,
1440
- onDismiss: () => n.onOpenChange(!1)
266
+ onDismiss: () => o.onOpenChange(!1)
1441
267
  }
1442
268
  );
1443
- }), qe = a.forwardRef(
1444
- (e, t) => {
269
+ }), cn = Ro("MenuContent.ScrollLock"), he = a.forwardRef(
270
+ (e, n) => {
1445
271
  const {
1446
- __scopeMenu: n,
1447
- loop: r = !1,
1448
- trapFocus: o,
1449
- onOpenAutoFocus: i,
1450
- onCloseAutoFocus: s,
1451
- disableOutsidePointerEvents: c,
1452
- onEntryFocus: f,
1453
- onEscapeKeyDown: u,
1454
- onPointerDownOutside: p,
1455
- onFocusOutside: m,
1456
- onInteractOutside: v,
1457
- onDismiss: w,
1458
- disableOutsideScroll: h,
1459
- ...l
1460
- } = e, E = re(L, n), g = me(L, n), _ = Ne(n), C = un(n), R = Zo(n), [M, x] = a.useState(null), b = a.useRef(null), P = k(t, b, E.onContentChange), I = a.useRef(0), T = a.useRef(""), z = a.useRef(0), X = a.useRef(null), B = a.useRef("right"), Q = a.useRef(0), q = h ? an : a.Fragment, W = h ? { as: Ye, allowPinchZoom: !0 } : void 0, J = (y) => {
1461
- var K, ie;
1462
- const A = T.current + y, N = R().filter((F) => !F.disabled), $ = document.activeElement, oe = (K = N.find((F) => F.ref.current === $)) == null ? void 0 : K.textValue, ae = N.map((F) => F.textValue), ve = ha(ae, A, oe), j = (ie = N.find((F) => F.textValue === ve)) == null ? void 0 : ie.ref.current;
1463
- (function F(ce) {
1464
- T.current = ce, window.clearTimeout(I.current), ce !== "" && (I.current = window.setTimeout(() => F(""), 1e3));
1465
- })(A), j && setTimeout(() => j.focus());
272
+ __scopeMenu: o,
273
+ loop: t = !1,
274
+ trapFocus: r,
275
+ onOpenAutoFocus: c,
276
+ onCloseAutoFocus: l,
277
+ disableOutsidePointerEvents: d,
278
+ onEntryFocus: m,
279
+ onEscapeKeyDown: _,
280
+ onPointerDownOutside: u,
281
+ onFocusOutside: i,
282
+ onInteractOutside: f,
283
+ onDismiss: h,
284
+ disableOutsideScroll: v,
285
+ ...R
286
+ } = e, w = B(D, o), S = J(D, o), A = re(o), M = $e(o), E = qo(o), [$, Q] = a.useState(null), F = a.useRef(null), C = U(n, F, w.onContentChange), L = a.useRef(0), k = a.useRef(""), W = a.useRef(0), V = a.useRef(null), ee = a.useRef("right"), oe = a.useRef(0), se = v ? Eo : a.Fragment, P = v ? { as: cn, allowPinchZoom: !0 } : void 0, wo = (p) => {
287
+ var z, Ie;
288
+ const b = k.current + p, x = E().filter((y) => !y.disabled), N = document.activeElement, ie = (z = x.find((y) => y.ref.current === N)) == null ? void 0 : z.textValue, ue = x.map((y) => y.textValue), Se = hn(ue, b, ie), Y = (Ie = x.find((y) => y.textValue === Se)) == null ? void 0 : Ie.ref.current;
289
+ (function y(be) {
290
+ k.current = be, window.clearTimeout(L.current), be !== "" && (L.current = window.setTimeout(() => y(""), 1e3));
291
+ })(b), Y && setTimeout(() => Y.focus());
1466
292
  };
1467
- a.useEffect(() => () => window.clearTimeout(I.current), []), Rr();
1468
- const O = a.useCallback((y) => {
1469
- var N, $;
1470
- return B.current === ((N = X.current) == null ? void 0 : N.side) && wa(y, ($ = X.current) == null ? void 0 : $.area);
293
+ a.useEffect(() => () => window.clearTimeout(L.current), []), Do();
294
+ const K = a.useCallback((p) => {
295
+ var x, N;
296
+ return ee.current === ((x = V.current) == null ? void 0 : x.side) && Cn(p, (N = V.current) == null ? void 0 : N.area);
1471
297
  }, []);
1472
- return /* @__PURE__ */ d(
1473
- na,
298
+ return /* @__PURE__ */ s(
299
+ tn,
1474
300
  {
1475
- scope: n,
1476
- searchRef: T,
301
+ scope: o,
302
+ searchRef: k,
1477
303
  onItemEnter: a.useCallback(
1478
- (y) => {
1479
- O(y) && y.preventDefault();
304
+ (p) => {
305
+ K(p) && p.preventDefault();
1480
306
  },
1481
- [O]
307
+ [K]
1482
308
  ),
1483
309
  onItemLeave: a.useCallback(
1484
- (y) => {
1485
- var A;
1486
- O(y) || ((A = b.current) == null || A.focus(), x(null));
310
+ (p) => {
311
+ var b;
312
+ K(p) || ((b = F.current) == null || b.focus(), Q(null));
1487
313
  },
1488
- [O]
314
+ [K]
1489
315
  ),
1490
316
  onTriggerLeave: a.useCallback(
1491
- (y) => {
1492
- O(y) && y.preventDefault();
317
+ (p) => {
318
+ K(p) && p.preventDefault();
1493
319
  },
1494
- [O]
320
+ [K]
1495
321
  ),
1496
- pointerGraceTimerRef: z,
1497
- onPointerGraceIntentChange: a.useCallback((y) => {
1498
- X.current = y;
322
+ pointerGraceTimerRef: W,
323
+ onPointerGraceIntentChange: a.useCallback((p) => {
324
+ V.current = p;
1499
325
  }, []),
1500
- children: /* @__PURE__ */ d(q, { ...W, children: /* @__PURE__ */ d(
1501
- Dt,
326
+ children: /* @__PURE__ */ s(se, { ...P, children: /* @__PURE__ */ s(
327
+ xo,
1502
328
  {
1503
329
  asChild: !0,
1504
- trapped: o,
1505
- onMountAutoFocus: S(i, (y) => {
1506
- var A;
1507
- y.preventDefault(), (A = b.current) == null || A.focus({ preventScroll: !0 });
330
+ trapped: r,
331
+ onMountAutoFocus: g(c, (p) => {
332
+ var b;
333
+ p.preventDefault(), (b = F.current) == null || b.focus({ preventScroll: !0 });
1508
334
  }),
1509
- onUnmountAutoFocus: s,
1510
- children: /* @__PURE__ */ d(
1511
- It,
335
+ onUnmountAutoFocus: l,
336
+ children: /* @__PURE__ */ s(
337
+ Po,
1512
338
  {
1513
339
  asChild: !0,
1514
- disableOutsidePointerEvents: c,
1515
- onEscapeKeyDown: u,
1516
- onPointerDownOutside: p,
1517
- onFocusOutside: m,
1518
- onInteractOutside: v,
1519
- onDismiss: w,
1520
- children: /* @__PURE__ */ d(
1521
- uo,
340
+ disableOutsidePointerEvents: d,
341
+ onEscapeKeyDown: _,
342
+ onPointerDownOutside: u,
343
+ onFocusOutside: i,
344
+ onInteractOutside: f,
345
+ onDismiss: h,
346
+ children: /* @__PURE__ */ s(
347
+ Vo,
1522
348
  {
1523
349
  asChild: !0,
1524
- ...C,
1525
- dir: g.dir,
350
+ ...M,
351
+ dir: S.dir,
1526
352
  orientation: "vertical",
1527
- loop: r,
1528
- currentTabStopId: M,
1529
- onCurrentTabStopIdChange: x,
1530
- onEntryFocus: S(f, (y) => {
1531
- g.isUsingKeyboardRef.current || y.preventDefault();
353
+ loop: t,
354
+ currentTabStopId: $,
355
+ onCurrentTabStopIdChange: Q,
356
+ onEntryFocus: g(m, (p) => {
357
+ S.isUsingKeyboardRef.current || p.preventDefault();
1532
358
  }),
1533
359
  preventScrollOnEntryFocus: !0,
1534
- children: /* @__PURE__ */ d(
1535
- Gr,
360
+ children: /* @__PURE__ */ s(
361
+ yo,
1536
362
  {
1537
363
  role: "menu",
1538
364
  "aria-orientation": "vertical",
1539
- "data-state": xn(E.open),
365
+ "data-state": io(w.open),
1540
366
  "data-radix-menu-content": "",
1541
- dir: g.dir,
1542
- ..._,
1543
- ...l,
1544
- ref: P,
1545
- style: { outline: "none", ...l.style },
1546
- onKeyDown: S(l.onKeyDown, (y) => {
1547
- const N = y.target.closest("[data-radix-menu-content]") === y.currentTarget, $ = y.ctrlKey || y.altKey || y.metaKey, oe = y.key.length === 1;
1548
- N && (y.key === "Tab" && y.preventDefault(), !$ && oe && J(y.key));
1549
- const ae = b.current;
1550
- if (y.target !== ae || !Yo.includes(y.key)) return;
1551
- y.preventDefault();
1552
- const j = R().filter((K) => !K.disabled).map((K) => K.ref.current);
1553
- cn.includes(y.key) && j.reverse(), ma(j);
367
+ dir: S.dir,
368
+ ...A,
369
+ ...R,
370
+ ref: C,
371
+ style: { outline: "none", ...R.style },
372
+ onKeyDown: g(R.onKeyDown, (p) => {
373
+ const x = p.target.closest("[data-radix-menu-content]") === p.currentTarget, N = p.ctrlKey || p.altKey || p.metaKey, ie = p.key.length === 1;
374
+ x && (p.key === "Tab" && p.preventDefault(), !N && ie && wo(p.key));
375
+ const ue = F.current;
376
+ if (p.target !== ue || !jo.includes(p.key)) return;
377
+ p.preventDefault();
378
+ const Y = E().filter((z) => !z.disabled).map((z) => z.ref.current);
379
+ Ue.includes(p.key) && Y.reverse(), wn(Y);
1554
380
  }),
1555
- onBlur: S(e.onBlur, (y) => {
1556
- y.currentTarget.contains(y.target) || (window.clearTimeout(I.current), T.current = "");
381
+ onBlur: g(e.onBlur, (p) => {
382
+ p.currentTarget.contains(p.target) || (window.clearTimeout(L.current), k.current = "");
1557
383
  }),
1558
- onPointerMove: S(
384
+ onPointerMove: g(
1559
385
  e.onPointerMove,
1560
- de((y) => {
1561
- const A = y.target, N = Q.current !== y.clientX;
1562
- if (y.currentTarget.contains(A) && N) {
1563
- const $ = y.clientX > Q.current ? "right" : "left";
1564
- B.current = $, Q.current = y.clientX;
386
+ H((p) => {
387
+ const b = p.target, x = oe.current !== p.clientX;
388
+ if (p.currentTarget.contains(b) && x) {
389
+ const N = p.clientX > oe.current ? "right" : "left";
390
+ ee.current = N, oe.current = p.clientX;
1565
391
  }
1566
392
  })
1567
393
  )
@@ -1577,140 +403,140 @@ var ta = "MenuPortal", [Mi, dn] = Z(ta, {
1577
403
  );
1578
404
  }
1579
405
  );
1580
- fn.displayName = L;
1581
- var aa = "MenuGroup", Je = a.forwardRef(
1582
- (e, t) => {
1583
- const { __scopeMenu: n, ...r } = e;
1584
- return /* @__PURE__ */ d(U.div, { role: "group", ...r, ref: t });
406
+ Ye.displayName = D;
407
+ var sn = "MenuGroup", Me = a.forwardRef(
408
+ (e, n) => {
409
+ const { __scopeMenu: o, ...t } = e;
410
+ return /* @__PURE__ */ s(O.div, { role: "group", ...t, ref: n });
1585
411
  }
1586
412
  );
1587
- Je.displayName = aa;
1588
- var ia = "MenuLabel", pn = a.forwardRef(
1589
- (e, t) => {
1590
- const { __scopeMenu: n, ...r } = e;
1591
- return /* @__PURE__ */ d(U.div, { ...r, ref: t });
413
+ Me.displayName = sn;
414
+ var un = "MenuLabel", Xe = a.forwardRef(
415
+ (e, n) => {
416
+ const { __scopeMenu: o, ...t } = e;
417
+ return /* @__PURE__ */ s(O.div, { ...t, ref: n });
1592
418
  }
1593
419
  );
1594
- pn.displayName = ia;
1595
- var be = "MenuItem", _t = "menu.itemSelect", Ie = a.forwardRef(
1596
- (e, t) => {
1597
- const { disabled: n = !1, onSelect: r, ...o } = e, i = a.useRef(null), s = me(be, e.__scopeMenu), c = Qe(be, e.__scopeMenu), f = k(t, i), u = a.useRef(!1), p = () => {
1598
- const m = i.current;
1599
- if (!n && m) {
1600
- const v = new CustomEvent(_t, { bubbles: !0, cancelable: !0 });
1601
- m.addEventListener(_t, (w) => r == null ? void 0 : r(w), { once: !0 }), xt(m, v), v.defaultPrevented ? u.current = !1 : s.onClose();
420
+ Xe.displayName = un;
421
+ var ne = "MenuItem", Pe = "menu.itemSelect", ae = a.forwardRef(
422
+ (e, n) => {
423
+ const { disabled: o = !1, onSelect: t, ...r } = e, c = a.useRef(null), l = J(ne, e.__scopeMenu), d = ve(ne, e.__scopeMenu), m = U(n, c), _ = a.useRef(!1), u = () => {
424
+ const i = c.current;
425
+ if (!o && i) {
426
+ const f = new CustomEvent(Pe, { bubbles: !0, cancelable: !0 });
427
+ i.addEventListener(Pe, (h) => t == null ? void 0 : t(h), { once: !0 }), Co(i, f), f.defaultPrevented ? _.current = !1 : l.onClose();
1602
428
  }
1603
429
  };
1604
- return /* @__PURE__ */ d(
1605
- mn,
430
+ return /* @__PURE__ */ s(
431
+ je,
1606
432
  {
1607
- ...o,
1608
- ref: f,
1609
- disabled: n,
1610
- onClick: S(e.onClick, p),
1611
- onPointerDown: (m) => {
1612
- var v;
1613
- (v = e.onPointerDown) == null || v.call(e, m), u.current = !0;
433
+ ...r,
434
+ ref: m,
435
+ disabled: o,
436
+ onClick: g(e.onClick, u),
437
+ onPointerDown: (i) => {
438
+ var f;
439
+ (f = e.onPointerDown) == null || f.call(e, i), _.current = !0;
1614
440
  },
1615
- onPointerUp: S(e.onPointerUp, (m) => {
1616
- var v;
1617
- u.current || (v = m.currentTarget) == null || v.click();
441
+ onPointerUp: g(e.onPointerUp, (i) => {
442
+ var f;
443
+ _.current || (f = i.currentTarget) == null || f.click();
1618
444
  }),
1619
- onKeyDown: S(e.onKeyDown, (m) => {
1620
- const v = c.searchRef.current !== "";
1621
- n || v && m.key === " " || Ve.includes(m.key) && (m.currentTarget.click(), m.preventDefault());
445
+ onKeyDown: g(e.onKeyDown, (i) => {
446
+ const f = d.searchRef.current !== "";
447
+ o || f && i.key === " " || pe.includes(i.key) && (i.currentTarget.click(), i.preventDefault());
1622
448
  })
1623
449
  }
1624
450
  );
1625
451
  }
1626
452
  );
1627
- Ie.displayName = be;
1628
- var mn = a.forwardRef(
1629
- (e, t) => {
1630
- const { __scopeMenu: n, disabled: r = !1, textValue: o, ...i } = e, s = Qe(be, n), c = un(n), f = a.useRef(null), u = k(t, f), [p, m] = a.useState(!1), [v, w] = a.useState("");
453
+ ae.displayName = ne;
454
+ var je = a.forwardRef(
455
+ (e, n) => {
456
+ const { __scopeMenu: o, disabled: t = !1, textValue: r, ...c } = e, l = ve(ne, o), d = $e(o), m = a.useRef(null), _ = U(n, m), [u, i] = a.useState(!1), [f, h] = a.useState("");
1631
457
  return a.useEffect(() => {
1632
- const h = f.current;
1633
- h && w((h.textContent ?? "").trim());
1634
- }, [i.children]), /* @__PURE__ */ d(
1635
- le.ItemSlot,
458
+ const v = m.current;
459
+ v && h((v.textContent ?? "").trim());
460
+ }, [c.children]), /* @__PURE__ */ s(
461
+ j.ItemSlot,
1636
462
  {
1637
- scope: n,
1638
- disabled: r,
1639
- textValue: o ?? v,
1640
- children: /* @__PURE__ */ d(lo, { asChild: !0, ...c, focusable: !r, children: /* @__PURE__ */ d(
1641
- U.div,
463
+ scope: o,
464
+ disabled: t,
465
+ textValue: r ?? f,
466
+ children: /* @__PURE__ */ s(Yo, { asChild: !0, ...d, focusable: !t, children: /* @__PURE__ */ s(
467
+ O.div,
1642
468
  {
1643
469
  role: "menuitem",
1644
- "data-highlighted": p ? "" : void 0,
1645
- "aria-disabled": r || void 0,
1646
- "data-disabled": r ? "" : void 0,
1647
- ...i,
1648
- ref: u,
1649
- onPointerMove: S(
470
+ "data-highlighted": u ? "" : void 0,
471
+ "aria-disabled": t || void 0,
472
+ "data-disabled": t ? "" : void 0,
473
+ ...c,
474
+ ref: _,
475
+ onPointerMove: g(
1650
476
  e.onPointerMove,
1651
- de((h) => {
1652
- r ? s.onItemLeave(h) : (s.onItemEnter(h), h.defaultPrevented || h.currentTarget.focus({ preventScroll: !0 }));
477
+ H((v) => {
478
+ t ? l.onItemLeave(v) : (l.onItemEnter(v), v.defaultPrevented || v.currentTarget.focus({ preventScroll: !0 }));
1653
479
  })
1654
480
  ),
1655
- onPointerLeave: S(
481
+ onPointerLeave: g(
1656
482
  e.onPointerLeave,
1657
- de((h) => s.onItemLeave(h))
483
+ H((v) => l.onItemLeave(v))
1658
484
  ),
1659
- onFocus: S(e.onFocus, () => m(!0)),
1660
- onBlur: S(e.onBlur, () => m(!1))
485
+ onFocus: g(e.onFocus, () => i(!0)),
486
+ onBlur: g(e.onBlur, () => i(!1))
1661
487
  }
1662
488
  ) })
1663
489
  }
1664
490
  );
1665
491
  }
1666
- ), ca = "MenuCheckboxItem", vn = a.forwardRef(
1667
- (e, t) => {
1668
- const { checked: n = !1, onCheckedChange: r, ...o } = e;
1669
- return /* @__PURE__ */ d(yn, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ d(
1670
- Ie,
492
+ ), ln = "MenuCheckboxItem", He = a.forwardRef(
493
+ (e, n) => {
494
+ const { checked: o = !1, onCheckedChange: t, ...r } = e;
495
+ return /* @__PURE__ */ s(eo, { scope: e.__scopeMenu, checked: o, children: /* @__PURE__ */ s(
496
+ ae,
1671
497
  {
1672
498
  role: "menuitemcheckbox",
1673
- "aria-checked": Se(n) ? "mixed" : n,
1674
- ...o,
1675
- ref: t,
1676
- "data-state": tt(n),
1677
- onSelect: S(
1678
- o.onSelect,
1679
- () => r == null ? void 0 : r(Se(n) ? !0 : !n),
499
+ "aria-checked": te(o) ? "mixed" : o,
500
+ ...r,
501
+ ref: n,
502
+ "data-state": Re(o),
503
+ onSelect: g(
504
+ r.onSelect,
505
+ () => t == null ? void 0 : t(te(o) ? !0 : !o),
1680
506
  { checkForDefaultPrevented: !1 }
1681
507
  )
1682
508
  }
1683
509
  ) });
1684
510
  }
1685
511
  );
1686
- vn.displayName = ca;
1687
- var hn = "MenuRadioGroup", [sa, ua] = Z(
1688
- hn,
512
+ He.displayName = ln;
513
+ var Ze = "MenuRadioGroup", [dn, fn] = G(
514
+ Ze,
1689
515
  { value: void 0, onValueChange: () => {
1690
516
  } }
1691
- ), gn = a.forwardRef(
1692
- (e, t) => {
1693
- const { value: n, onValueChange: r, ...o } = e, i = Y(r);
1694
- return /* @__PURE__ */ d(sa, { scope: e.__scopeMenu, value: n, onValueChange: i, children: /* @__PURE__ */ d(Je, { ...o, ref: t }) });
517
+ ), qe = a.forwardRef(
518
+ (e, n) => {
519
+ const { value: o, onValueChange: t, ...r } = e, c = _e(t);
520
+ return /* @__PURE__ */ s(dn, { scope: e.__scopeMenu, value: o, onValueChange: c, children: /* @__PURE__ */ s(Me, { ...r, ref: n }) });
1695
521
  }
1696
522
  );
1697
- gn.displayName = hn;
1698
- var wn = "MenuRadioItem", En = a.forwardRef(
1699
- (e, t) => {
1700
- const { value: n, ...r } = e, o = ua(wn, e.__scopeMenu), i = n === o.value;
1701
- return /* @__PURE__ */ d(yn, { scope: e.__scopeMenu, checked: i, children: /* @__PURE__ */ d(
1702
- Ie,
523
+ qe.displayName = Ze;
524
+ var Je = "MenuRadioItem", Qe = a.forwardRef(
525
+ (e, n) => {
526
+ const { value: o, ...t } = e, r = fn(Je, e.__scopeMenu), c = o === r.value;
527
+ return /* @__PURE__ */ s(eo, { scope: e.__scopeMenu, checked: c, children: /* @__PURE__ */ s(
528
+ ae,
1703
529
  {
1704
530
  role: "menuitemradio",
1705
- "aria-checked": i,
1706
- ...r,
1707
- ref: t,
1708
- "data-state": tt(i),
1709
- onSelect: S(
1710
- r.onSelect,
531
+ "aria-checked": c,
532
+ ...t,
533
+ ref: n,
534
+ "data-state": Re(c),
535
+ onSelect: g(
536
+ t.onSelect,
1711
537
  () => {
1712
- var s;
1713
- return (s = o.onValueChange) == null ? void 0 : s.call(o, n);
538
+ var l;
539
+ return (l = r.onValueChange) == null ? void 0 : l.call(r, o);
1714
540
  },
1715
541
  { checkForDefaultPrevented: !1 }
1716
542
  )
@@ -1718,280 +544,281 @@ var wn = "MenuRadioItem", En = a.forwardRef(
1718
544
  ) });
1719
545
  }
1720
546
  );
1721
- En.displayName = wn;
1722
- var et = "MenuItemIndicator", [yn, la] = Z(
1723
- et,
547
+ Qe.displayName = Je;
548
+ var Ce = "MenuItemIndicator", [eo, pn] = G(
549
+ Ce,
1724
550
  { checked: !1 }
1725
- ), _n = a.forwardRef(
1726
- (e, t) => {
1727
- const { __scopeMenu: n, forceMount: r, ...o } = e, i = la(et, n);
1728
- return /* @__PURE__ */ d(
1729
- Me,
551
+ ), oo = a.forwardRef(
552
+ (e, n) => {
553
+ const { __scopeMenu: o, forceMount: t, ...r } = e, c = pn(Ce, o);
554
+ return /* @__PURE__ */ s(
555
+ ge,
1730
556
  {
1731
- present: r || Se(i.checked) || i.checked === !0,
1732
- children: /* @__PURE__ */ d(
1733
- U.span,
557
+ present: t || te(c.checked) || c.checked === !0,
558
+ children: /* @__PURE__ */ s(
559
+ O.span,
1734
560
  {
1735
- ...o,
1736
- ref: t,
1737
- "data-state": tt(i.checked)
561
+ ...r,
562
+ ref: n,
563
+ "data-state": Re(c.checked)
1738
564
  }
1739
565
  )
1740
566
  }
1741
567
  );
1742
568
  }
1743
569
  );
1744
- _n.displayName = et;
1745
- var da = "MenuSeparator", Cn = a.forwardRef(
1746
- (e, t) => {
1747
- const { __scopeMenu: n, ...r } = e;
1748
- return /* @__PURE__ */ d(
1749
- U.div,
570
+ oo.displayName = Ce;
571
+ var mn = "MenuSeparator", no = a.forwardRef(
572
+ (e, n) => {
573
+ const { __scopeMenu: o, ...t } = e;
574
+ return /* @__PURE__ */ s(
575
+ O.div,
1750
576
  {
1751
577
  role: "separator",
1752
578
  "aria-orientation": "horizontal",
1753
- ...r,
1754
- ref: t
579
+ ...t,
580
+ ref: n
1755
581
  }
1756
582
  );
1757
583
  }
1758
584
  );
1759
- Cn.displayName = da;
1760
- var fa = "MenuArrow", bn = a.forwardRef(
1761
- (e, t) => {
1762
- const { __scopeMenu: n, ...r } = e, o = Ne(n);
1763
- return /* @__PURE__ */ d(zr, { ...o, ...r, ref: t });
585
+ no.displayName = mn;
586
+ var _n = "MenuArrow", to = a.forwardRef(
587
+ (e, n) => {
588
+ const { __scopeMenu: o, ...t } = e, r = re(o);
589
+ return /* @__PURE__ */ s(To, { ...r, ...t, ref: n });
1764
590
  }
1765
591
  );
1766
- bn.displayName = fa;
1767
- var pa = "MenuSub", [Pi, Sn] = Z(pa), ue = "MenuSubTrigger", Rn = a.forwardRef(
1768
- (e, t) => {
1769
- const n = re(ue, e.__scopeMenu), r = me(ue, e.__scopeMenu), o = Sn(ue, e.__scopeMenu), i = Qe(ue, e.__scopeMenu), s = a.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: f } = i, u = { __scopeMenu: e.__scopeMenu }, p = a.useCallback(() => {
1770
- s.current && window.clearTimeout(s.current), s.current = null;
592
+ to.displayName = _n;
593
+ var gn = "MenuSub", [xt, ro] = G(gn), X = "MenuSubTrigger", ao = a.forwardRef(
594
+ (e, n) => {
595
+ const o = B(X, e.__scopeMenu), t = J(X, e.__scopeMenu), r = ro(X, e.__scopeMenu), c = ve(X, e.__scopeMenu), l = a.useRef(null), { pointerGraceTimerRef: d, onPointerGraceIntentChange: m } = c, _ = { __scopeMenu: e.__scopeMenu }, u = a.useCallback(() => {
596
+ l.current && window.clearTimeout(l.current), l.current = null;
1771
597
  }, []);
1772
- return a.useEffect(() => p, [p]), a.useEffect(() => {
1773
- const m = c.current;
598
+ return a.useEffect(() => u, [u]), a.useEffect(() => {
599
+ const i = d.current;
1774
600
  return () => {
1775
- window.clearTimeout(m), f(null);
601
+ window.clearTimeout(i), m(null);
1776
602
  };
1777
- }, [c, f]), /* @__PURE__ */ d(Ze, { asChild: !0, ...u, children: /* @__PURE__ */ d(
1778
- mn,
603
+ }, [d, m]), /* @__PURE__ */ s(we, { asChild: !0, ..._, children: /* @__PURE__ */ s(
604
+ je,
1779
605
  {
1780
- id: o.triggerId,
606
+ id: r.triggerId,
1781
607
  "aria-haspopup": "menu",
1782
- "aria-expanded": n.open,
1783
- "aria-controls": o.contentId,
1784
- "data-state": xn(n.open),
608
+ "aria-expanded": o.open,
609
+ "aria-controls": r.contentId,
610
+ "data-state": io(o.open),
1785
611
  ...e,
1786
- ref: fe(t, o.onTriggerChange),
1787
- onClick: (m) => {
1788
- var v;
1789
- (v = e.onClick) == null || v.call(e, m), !(e.disabled || m.defaultPrevented) && (m.currentTarget.focus(), n.open || n.onOpenChange(!0));
612
+ ref: Te(n, r.onTriggerChange),
613
+ onClick: (i) => {
614
+ var f;
615
+ (f = e.onClick) == null || f.call(e, i), !(e.disabled || i.defaultPrevented) && (i.currentTarget.focus(), o.open || o.onOpenChange(!0));
1790
616
  },
1791
- onPointerMove: S(
617
+ onPointerMove: g(
1792
618
  e.onPointerMove,
1793
- de((m) => {
1794
- i.onItemEnter(m), !m.defaultPrevented && !e.disabled && !n.open && !s.current && (i.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
1795
- n.onOpenChange(!0), p();
619
+ H((i) => {
620
+ c.onItemEnter(i), !i.defaultPrevented && !e.disabled && !o.open && !l.current && (c.onPointerGraceIntentChange(null), l.current = window.setTimeout(() => {
621
+ o.onOpenChange(!0), u();
1796
622
  }, 100));
1797
623
  })
1798
624
  ),
1799
- onPointerLeave: S(
625
+ onPointerLeave: g(
1800
626
  e.onPointerLeave,
1801
- de((m) => {
1802
- var w, h;
1803
- p();
1804
- const v = (w = n.content) == null ? void 0 : w.getBoundingClientRect();
1805
- if (v) {
1806
- const l = (h = n.content) == null ? void 0 : h.dataset.side, E = l === "right", g = E ? -5 : 5, _ = v[E ? "left" : "right"], C = v[E ? "right" : "left"];
1807
- i.onPointerGraceIntentChange({
627
+ H((i) => {
628
+ var h, v;
629
+ u();
630
+ const f = (h = o.content) == null ? void 0 : h.getBoundingClientRect();
631
+ if (f) {
632
+ const R = (v = o.content) == null ? void 0 : v.dataset.side, w = R === "right", S = w ? -5 : 5, A = f[w ? "left" : "right"], M = f[w ? "right" : "left"];
633
+ c.onPointerGraceIntentChange({
1808
634
  area: [
1809
635
  // Apply a bleed on clientX to ensure that our exit point is
1810
636
  // consistently within polygon bounds
1811
- { x: m.clientX + g, y: m.clientY },
1812
- { x: _, y: v.top },
1813
- { x: C, y: v.top },
1814
- { x: C, y: v.bottom },
1815
- { x: _, y: v.bottom }
637
+ { x: i.clientX + S, y: i.clientY },
638
+ { x: A, y: f.top },
639
+ { x: M, y: f.top },
640
+ { x: M, y: f.bottom },
641
+ { x: A, y: f.bottom }
1816
642
  ],
1817
- side: l
1818
- }), window.clearTimeout(c.current), c.current = window.setTimeout(
1819
- () => i.onPointerGraceIntentChange(null),
643
+ side: R
644
+ }), window.clearTimeout(d.current), d.current = window.setTimeout(
645
+ () => c.onPointerGraceIntentChange(null),
1820
646
  300
1821
647
  );
1822
648
  } else {
1823
- if (i.onTriggerLeave(m), m.defaultPrevented) return;
1824
- i.onPointerGraceIntentChange(null);
649
+ if (c.onTriggerLeave(i), i.defaultPrevented) return;
650
+ c.onPointerGraceIntentChange(null);
1825
651
  }
1826
652
  })
1827
653
  ),
1828
- onKeyDown: S(e.onKeyDown, (m) => {
1829
- var w;
1830
- const v = i.searchRef.current !== "";
1831
- e.disabled || v && m.key === " " || Xo[r.dir].includes(m.key) && (n.onOpenChange(!0), (w = n.content) == null || w.focus(), m.preventDefault());
654
+ onKeyDown: g(e.onKeyDown, (i) => {
655
+ var h;
656
+ const f = c.searchRef.current !== "";
657
+ e.disabled || f && i.key === " " || Ho[t.dir].includes(i.key) && (o.onOpenChange(!0), (h = o.content) == null || h.focus(), i.preventDefault());
1832
658
  })
1833
659
  }
1834
660
  ) });
1835
661
  }
1836
662
  );
1837
- Rn.displayName = ue;
1838
- var Mn = "MenuSubContent", Pn = a.forwardRef(
1839
- (e, t) => {
1840
- const n = dn(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = re(L, e.__scopeMenu), s = me(L, e.__scopeMenu), c = Sn(Mn, e.__scopeMenu), f = a.useRef(null), u = k(t, f);
1841
- return /* @__PURE__ */ d(le.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(Me, { present: r || i.open, children: /* @__PURE__ */ d(le.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(
1842
- qe,
663
+ ao.displayName = X;
664
+ var co = "MenuSubContent", so = a.forwardRef(
665
+ (e, n) => {
666
+ const o = Ve(D, e.__scopeMenu), { forceMount: t = o.forceMount, ...r } = e, c = B(D, e.__scopeMenu), l = J(D, e.__scopeMenu), d = ro(co, e.__scopeMenu), m = a.useRef(null), _ = U(n, m);
667
+ return /* @__PURE__ */ s(j.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(ge, { present: t || c.open, children: /* @__PURE__ */ s(j.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(
668
+ he,
1843
669
  {
1844
- id: c.contentId,
1845
- "aria-labelledby": c.triggerId,
1846
- ...o,
1847
- ref: u,
670
+ id: d.contentId,
671
+ "aria-labelledby": d.triggerId,
672
+ ...r,
673
+ ref: _,
1848
674
  align: "start",
1849
- side: s.dir === "rtl" ? "left" : "right",
675
+ side: l.dir === "rtl" ? "left" : "right",
1850
676
  disableOutsidePointerEvents: !1,
1851
677
  disableOutsideScroll: !1,
1852
678
  trapFocus: !1,
1853
- onOpenAutoFocus: (p) => {
1854
- var m;
1855
- s.isUsingKeyboardRef.current && ((m = f.current) == null || m.focus()), p.preventDefault();
679
+ onOpenAutoFocus: (u) => {
680
+ var i;
681
+ l.isUsingKeyboardRef.current && ((i = m.current) == null || i.focus()), u.preventDefault();
1856
682
  },
1857
- onCloseAutoFocus: (p) => p.preventDefault(),
1858
- onFocusOutside: S(e.onFocusOutside, (p) => {
1859
- p.target !== c.trigger && i.onOpenChange(!1);
683
+ onCloseAutoFocus: (u) => u.preventDefault(),
684
+ onFocusOutside: g(e.onFocusOutside, (u) => {
685
+ u.target !== d.trigger && c.onOpenChange(!1);
1860
686
  }),
1861
- onEscapeKeyDown: S(e.onEscapeKeyDown, (p) => {
1862
- s.onClose(), p.preventDefault();
687
+ onEscapeKeyDown: g(e.onEscapeKeyDown, (u) => {
688
+ l.onClose(), u.preventDefault();
1863
689
  }),
1864
- onKeyDown: S(e.onKeyDown, (p) => {
1865
- var w;
1866
- const m = p.currentTarget.contains(p.target), v = jo[s.dir].includes(p.key);
1867
- m && v && (i.onOpenChange(!1), (w = c.trigger) == null || w.focus(), p.preventDefault());
690
+ onKeyDown: g(e.onKeyDown, (u) => {
691
+ var h;
692
+ const i = u.currentTarget.contains(u.target), f = Zo[l.dir].includes(u.key);
693
+ i && f && (c.onOpenChange(!1), (h = d.trigger) == null || h.focus(), u.preventDefault());
1868
694
  })
1869
695
  }
1870
696
  ) }) }) });
1871
697
  }
1872
698
  );
1873
- Pn.displayName = Mn;
1874
- function xn(e) {
699
+ so.displayName = co;
700
+ function io(e) {
1875
701
  return e ? "open" : "closed";
1876
702
  }
1877
- function Se(e) {
703
+ function te(e) {
1878
704
  return e === "indeterminate";
1879
705
  }
1880
- function tt(e) {
1881
- return Se(e) ? "indeterminate" : e ? "checked" : "unchecked";
1882
- }
1883
- function ma(e) {
1884
- const t = document.activeElement;
1885
- for (const n of e)
1886
- if (n === t || (n.focus(), document.activeElement !== t)) return;
1887
- }
1888
- function va(e, t) {
1889
- return e.map((n, r) => e[(t + r) % e.length]);
706
+ function Re(e) {
707
+ return te(e) ? "indeterminate" : e ? "checked" : "unchecked";
1890
708
  }
1891
- function ha(e, t, n) {
1892
- const o = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1;
1893
- let s = va(e, Math.max(i, 0));
1894
- o.length === 1 && (s = s.filter((u) => u !== n));
1895
- const f = s.find(
1896
- (u) => u.toLowerCase().startsWith(o.toLowerCase())
709
+ function wn(e) {
710
+ const n = document.activeElement;
711
+ for (const o of e)
712
+ if (o === n || (o.focus(), document.activeElement !== n)) return;
713
+ }
714
+ function vn(e, n) {
715
+ return e.map((o, t) => e[(n + t) % e.length]);
716
+ }
717
+ function hn(e, n, o) {
718
+ const r = n.length > 1 && Array.from(n).every((_) => _ === n[0]) ? n[0] : n, c = o ? e.indexOf(o) : -1;
719
+ let l = vn(e, Math.max(c, 0));
720
+ r.length === 1 && (l = l.filter((_) => _ !== o));
721
+ const m = l.find(
722
+ (_) => _.toLowerCase().startsWith(r.toLowerCase())
1897
723
  );
1898
- return f !== n ? f : void 0;
724
+ return m !== o ? m : void 0;
1899
725
  }
1900
- function ga(e, t) {
1901
- const { x: n, y: r } = e;
1902
- let o = !1;
1903
- for (let i = 0, s = t.length - 1; i < t.length; s = i++) {
1904
- const c = t[i].x, f = t[i].y, u = t[s].x, p = t[s].y;
1905
- f > r != p > r && n < (u - c) * (r - f) / (p - f) + c && (o = !o);
726
+ function Mn(e, n) {
727
+ const { x: o, y: t } = e;
728
+ let r = !1;
729
+ for (let c = 0, l = n.length - 1; c < n.length; l = c++) {
730
+ const d = n[c], m = n[l], _ = d.x, u = d.y, i = m.x, f = m.y;
731
+ u > t != f > t && o < (i - _) * (t - u) / (f - u) + _ && (r = !r);
1906
732
  }
1907
- return o;
733
+ return r;
1908
734
  }
1909
- function wa(e, t) {
1910
- if (!t) return !1;
1911
- const n = { x: e.clientX, y: e.clientY };
1912
- return ga(n, t);
735
+ function Cn(e, n) {
736
+ if (!n) return !1;
737
+ const o = { x: e.clientX, y: e.clientY };
738
+ return Mn(o, n);
1913
739
  }
1914
- function de(e) {
1915
- return (t) => t.pointerType === "mouse" ? e(t) : void 0;
740
+ function H(e) {
741
+ return (n) => n.pointerType === "mouse" ? e(n) : void 0;
1916
742
  }
1917
- var Ea = ln, ya = Ze, _a = fn, Ca = Je, ba = pn, Sa = Ie, Ra = vn, Ma = gn, Pa = En, xa = _n, Na = Cn, Ia = bn, Aa = Rn, Da = Pn, nt = "DropdownMenu", [Ta, xi] = Re(
1918
- nt,
1919
- [sn]
1920
- ), D = sn(), [Oa, Nn] = Ta(nt), In = (e) => {
743
+ var Rn = We, Sn = we, In = Ye, bn = Me, Dn = Xe, En = ae, xn = He, Pn = qe, yn = Qe, Tn = oo, An = no, Nn = to, On = ao, Fn = so, ce = "DropdownMenu", [kn, Pt] = me(
744
+ ce,
745
+ [Be]
746
+ ), I = Be(), [Gn, uo] = kn(ce), lo = (e) => {
1921
747
  const {
1922
- __scopeDropdownMenu: t,
1923
- children: n,
1924
- dir: r,
1925
- open: o,
1926
- defaultOpen: i,
1927
- onOpenChange: s,
1928
- modal: c = !0
1929
- } = e, f = D(t), u = a.useRef(null), [p = !1, m] = St({
1930
- prop: o,
1931
- defaultProp: i,
1932
- onChange: s
748
+ __scopeDropdownMenu: n,
749
+ children: o,
750
+ dir: t,
751
+ open: r,
752
+ defaultOpen: c,
753
+ onOpenChange: l,
754
+ modal: d = !0
755
+ } = e, m = I(n), _ = a.useRef(null), [u, i] = ye({
756
+ prop: r,
757
+ defaultProp: c ?? !1,
758
+ onChange: l,
759
+ caller: ce
1933
760
  });
1934
- return /* @__PURE__ */ d(
1935
- Oa,
761
+ return /* @__PURE__ */ s(
762
+ Gn,
1936
763
  {
1937
- scope: t,
1938
- triggerId: We(),
1939
- triggerRef: u,
1940
- contentId: We(),
1941
- open: p,
1942
- onOpenChange: m,
1943
- onOpenToggle: a.useCallback(() => m((v) => !v), [m]),
1944
- modal: c,
1945
- children: /* @__PURE__ */ d(Ea, { ...f, open: p, onOpenChange: m, dir: r, modal: c, children: n })
764
+ scope: n,
765
+ triggerId: de(),
766
+ triggerRef: _,
767
+ contentId: de(),
768
+ open: u,
769
+ onOpenChange: i,
770
+ onOpenToggle: a.useCallback(() => i((f) => !f), [i]),
771
+ modal: d,
772
+ children: /* @__PURE__ */ s(Rn, { ...m, open: u, onOpenChange: i, dir: t, modal: d, children: o })
1946
773
  }
1947
774
  );
1948
775
  };
1949
- In.displayName = nt;
1950
- var An = "DropdownMenuTrigger", Dn = a.forwardRef(
1951
- (e, t) => {
1952
- const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, i = Nn(An, n), s = D(n);
1953
- return /* @__PURE__ */ d(ya, { asChild: !0, ...s, children: /* @__PURE__ */ d(
1954
- fr.button,
776
+ lo.displayName = ce;
777
+ var fo = "DropdownMenuTrigger", po = a.forwardRef(
778
+ (e, n) => {
779
+ const { __scopeDropdownMenu: o, disabled: t = !1, ...r } = e, c = uo(fo, o), l = I(o);
780
+ return /* @__PURE__ */ s(Sn, { asChild: !0, ...l, children: /* @__PURE__ */ s(
781
+ O.button,
1955
782
  {
1956
783
  type: "button",
1957
- id: i.triggerId,
784
+ id: c.triggerId,
1958
785
  "aria-haspopup": "menu",
1959
- "aria-expanded": i.open,
1960
- "aria-controls": i.open ? i.contentId : void 0,
1961
- "data-state": i.open ? "open" : "closed",
1962
- "data-disabled": r ? "" : void 0,
1963
- disabled: r,
1964
- ...o,
1965
- ref: fe(t, i.triggerRef),
1966
- onPointerDown: S(e.onPointerDown, (c) => {
1967
- !r && c.button === 0 && c.ctrlKey === !1 && (i.onOpenToggle(), i.open || c.preventDefault());
786
+ "aria-expanded": c.open,
787
+ "aria-controls": c.open ? c.contentId : void 0,
788
+ "data-state": c.open ? "open" : "closed",
789
+ "data-disabled": t ? "" : void 0,
790
+ disabled: t,
791
+ ...r,
792
+ ref: Te(n, c.triggerRef),
793
+ onPointerDown: g(e.onPointerDown, (d) => {
794
+ !t && d.button === 0 && d.ctrlKey === !1 && (c.onOpenToggle(), c.open || d.preventDefault());
1968
795
  }),
1969
- onKeyDown: S(e.onKeyDown, (c) => {
1970
- r || (["Enter", " "].includes(c.key) && i.onOpenToggle(), c.key === "ArrowDown" && i.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(c.key) && c.preventDefault());
796
+ onKeyDown: g(e.onKeyDown, (d) => {
797
+ t || (["Enter", " "].includes(d.key) && c.onOpenToggle(), d.key === "ArrowDown" && c.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(d.key) && d.preventDefault());
1971
798
  })
1972
799
  }
1973
800
  ) });
1974
801
  }
1975
802
  );
1976
- Dn.displayName = An;
1977
- var Tn = "DropdownMenuContent", On = a.forwardRef(
1978
- (e, t) => {
1979
- const { __scopeDropdownMenu: n, ...r } = e, o = Nn(Tn, n), i = D(n), s = a.useRef(!1);
1980
- return /* @__PURE__ */ d(
1981
- _a,
803
+ po.displayName = fo;
804
+ var mo = "DropdownMenuContent", _o = a.forwardRef(
805
+ (e, n) => {
806
+ const { __scopeDropdownMenu: o, ...t } = e, r = uo(mo, o), c = I(o), l = a.useRef(!1);
807
+ return /* @__PURE__ */ s(
808
+ In,
1982
809
  {
1983
- id: o.contentId,
1984
- "aria-labelledby": o.triggerId,
1985
- ...i,
1986
- ...r,
1987
- ref: t,
1988
- onCloseAutoFocus: S(e.onCloseAutoFocus, (c) => {
1989
- var f;
1990
- s.current || (f = o.triggerRef.current) == null || f.focus(), s.current = !1, c.preventDefault();
810
+ id: r.contentId,
811
+ "aria-labelledby": r.triggerId,
812
+ ...c,
813
+ ...t,
814
+ ref: n,
815
+ onCloseAutoFocus: g(e.onCloseAutoFocus, (d) => {
816
+ var m;
817
+ l.current || (m = r.triggerRef.current) == null || m.focus(), l.current = !1, d.preventDefault();
1991
818
  }),
1992
- onInteractOutside: S(e.onInteractOutside, (c) => {
1993
- const f = c.detail.originalEvent, u = f.button === 0 && f.ctrlKey === !0, p = f.button === 2 || u;
1994
- (!o.modal || p) && (s.current = !0);
819
+ onInteractOutside: g(e.onInteractOutside, (d) => {
820
+ const m = d.detail.originalEvent, _ = m.button === 0 && m.ctrlKey === !0, u = m.button === 2 || _;
821
+ (!r.modal || u) && (l.current = !0);
1995
822
  }),
1996
823
  style: {
1997
824
  ...e.style,
@@ -2005,73 +832,73 @@ var Tn = "DropdownMenuContent", On = a.forwardRef(
2005
832
  );
2006
833
  }
2007
834
  );
2008
- On.displayName = Tn;
2009
- var Fa = "DropdownMenuGroup", La = a.forwardRef(
2010
- (e, t) => {
2011
- const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2012
- return /* @__PURE__ */ d(Ca, { ...o, ...r, ref: t });
835
+ _o.displayName = mo;
836
+ var Ln = "DropdownMenuGroup", Kn = a.forwardRef(
837
+ (e, n) => {
838
+ const { __scopeDropdownMenu: o, ...t } = e, r = I(o);
839
+ return /* @__PURE__ */ s(bn, { ...r, ...t, ref: n });
2013
840
  }
2014
841
  );
2015
- La.displayName = Fa;
2016
- var ka = "DropdownMenuLabel", Wa = a.forwardRef(
2017
- (e, t) => {
2018
- const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2019
- return /* @__PURE__ */ d(ba, { ...o, ...r, ref: t });
842
+ Kn.displayName = Ln;
843
+ var zn = "DropdownMenuLabel", Un = a.forwardRef(
844
+ (e, n) => {
845
+ const { __scopeDropdownMenu: o, ...t } = e, r = I(o);
846
+ return /* @__PURE__ */ s(Dn, { ...r, ...t, ref: n });
2020
847
  }
2021
848
  );
2022
- Wa.displayName = ka;
2023
- var Ua = "DropdownMenuItem", Fn = a.forwardRef(
2024
- (e, t) => {
2025
- const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2026
- return /* @__PURE__ */ d(Sa, { ...o, ...r, ref: t });
849
+ Un.displayName = zn;
850
+ var Bn = "DropdownMenuItem", go = a.forwardRef(
851
+ (e, n) => {
852
+ const { __scopeDropdownMenu: o, ...t } = e, r = I(o);
853
+ return /* @__PURE__ */ s(En, { ...r, ...t, ref: n });
2027
854
  }
2028
855
  );
2029
- Fn.displayName = Ua;
2030
- var $a = "DropdownMenuCheckboxItem", Ba = a.forwardRef((e, t) => {
2031
- const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2032
- return /* @__PURE__ */ d(Ra, { ...o, ...r, ref: t });
856
+ go.displayName = Bn;
857
+ var $n = "DropdownMenuCheckboxItem", Wn = a.forwardRef((e, n) => {
858
+ const { __scopeDropdownMenu: o, ...t } = e, r = I(o);
859
+ return /* @__PURE__ */ s(xn, { ...r, ...t, ref: n });
2033
860
  });
2034
- Ba.displayName = $a;
2035
- var Ka = "DropdownMenuRadioGroup", Ga = a.forwardRef((e, t) => {
2036
- const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2037
- return /* @__PURE__ */ d(Ma, { ...o, ...r, ref: t });
861
+ Wn.displayName = $n;
862
+ var Vn = "DropdownMenuRadioGroup", Yn = a.forwardRef((e, n) => {
863
+ const { __scopeDropdownMenu: o, ...t } = e, r = I(o);
864
+ return /* @__PURE__ */ s(Pn, { ...r, ...t, ref: n });
2038
865
  });
2039
- Ga.displayName = Ka;
2040
- var za = "DropdownMenuRadioItem", Va = a.forwardRef((e, t) => {
2041
- const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2042
- return /* @__PURE__ */ d(Pa, { ...o, ...r, ref: t });
866
+ Yn.displayName = Vn;
867
+ var Xn = "DropdownMenuRadioItem", jn = a.forwardRef((e, n) => {
868
+ const { __scopeDropdownMenu: o, ...t } = e, r = I(o);
869
+ return /* @__PURE__ */ s(yn, { ...r, ...t, ref: n });
2043
870
  });
2044
- Va.displayName = za;
2045
- var Ha = "DropdownMenuItemIndicator", Ya = a.forwardRef((e, t) => {
2046
- const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2047
- return /* @__PURE__ */ d(xa, { ...o, ...r, ref: t });
871
+ jn.displayName = Xn;
872
+ var Hn = "DropdownMenuItemIndicator", Zn = a.forwardRef((e, n) => {
873
+ const { __scopeDropdownMenu: o, ...t } = e, r = I(o);
874
+ return /* @__PURE__ */ s(Tn, { ...r, ...t, ref: n });
2048
875
  });
2049
- Ya.displayName = Ha;
2050
- var Xa = "DropdownMenuSeparator", ja = a.forwardRef((e, t) => {
2051
- const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2052
- return /* @__PURE__ */ d(Na, { ...o, ...r, ref: t });
876
+ Zn.displayName = Hn;
877
+ var qn = "DropdownMenuSeparator", Jn = a.forwardRef((e, n) => {
878
+ const { __scopeDropdownMenu: o, ...t } = e, r = I(o);
879
+ return /* @__PURE__ */ s(An, { ...r, ...t, ref: n });
2053
880
  });
2054
- ja.displayName = Xa;
2055
- var Za = "DropdownMenuArrow", Qa = a.forwardRef(
2056
- (e, t) => {
2057
- const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2058
- return /* @__PURE__ */ d(Ia, { ...o, ...r, ref: t });
881
+ Jn.displayName = qn;
882
+ var Qn = "DropdownMenuArrow", et = a.forwardRef(
883
+ (e, n) => {
884
+ const { __scopeDropdownMenu: o, ...t } = e, r = I(o);
885
+ return /* @__PURE__ */ s(Nn, { ...r, ...t, ref: n });
2059
886
  }
2060
887
  );
2061
- Qa.displayName = Za;
2062
- var qa = "DropdownMenuSubTrigger", Ja = a.forwardRef((e, t) => {
2063
- const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2064
- return /* @__PURE__ */ d(Aa, { ...o, ...r, ref: t });
888
+ et.displayName = Qn;
889
+ var ot = "DropdownMenuSubTrigger", nt = a.forwardRef((e, n) => {
890
+ const { __scopeDropdownMenu: o, ...t } = e, r = I(o);
891
+ return /* @__PURE__ */ s(On, { ...r, ...t, ref: n });
2065
892
  });
2066
- Ja.displayName = qa;
2067
- var ei = "DropdownMenuSubContent", ti = a.forwardRef((e, t) => {
2068
- const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2069
- return /* @__PURE__ */ d(
2070
- Da,
893
+ nt.displayName = ot;
894
+ var tt = "DropdownMenuSubContent", rt = a.forwardRef((e, n) => {
895
+ const { __scopeDropdownMenu: o, ...t } = e, r = I(o);
896
+ return /* @__PURE__ */ s(
897
+ Fn,
2071
898
  {
2072
- ...o,
2073
899
  ...r,
2074
- ref: t,
900
+ ...t,
901
+ ref: n,
2075
902
  style: {
2076
903
  ...e.style,
2077
904
  "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
@@ -2083,16 +910,16 @@ var ei = "DropdownMenuSubContent", ti = a.forwardRef((e, t) => {
2083
910
  }
2084
911
  );
2085
912
  });
2086
- ti.displayName = ei;
2087
- var ni = In, ri = Dn, oi = On, ai = Fn;
2088
- const ii = "cfxui__DropdownSelect__trigger__c03df", ci = "cfxui__DropdownSelect__onlight__f0191", si = "cfxui__DropdownSelect__fullWidth__dce56", ui = "cfxui__DropdownSelect__icon__d05b8", li = "cfxui__DropdownSelect__placeholder__e0d89", di = "cfxui__DropdownSelect__content__05ed8", fi = "cfxui__DropdownSelect__item__0e45f", G = {
2089
- trigger: ii,
2090
- onlight: ci,
2091
- fullWidth: si,
2092
- icon: ui,
2093
- placeholder: li,
2094
- content: di,
2095
- item: fi,
913
+ rt.displayName = tt;
914
+ var at = lo, ct = po, st = _o, it = go;
915
+ const ut = "cfxui__DropdownSelect__trigger__c03df", lt = "cfxui__DropdownSelect__onlight__f0191", dt = "cfxui__DropdownSelect__fullWidth__dce56", ft = "cfxui__DropdownSelect__icon__d05b8", pt = "cfxui__DropdownSelect__placeholder__e0d89", mt = "cfxui__DropdownSelect__content__05ed8", _t = "cfxui__DropdownSelect__item__0e45f", T = {
916
+ trigger: ut,
917
+ onlight: lt,
918
+ fullWidth: dt,
919
+ icon: ft,
920
+ placeholder: pt,
921
+ content: mt,
922
+ item: _t,
2096
923
  "dropdownselect-size-initial-large": "cfxui__DropdownSelect__dropdownselect-size-initial-large__d6bf3",
2097
924
  "dropdownselect-size-initial-small": "cfxui__DropdownSelect__dropdownselect-size-initial-small__56570",
2098
925
  "dropdownselect-size-small-large": "cfxui__DropdownSelect__dropdownselect-size-small-large__7f027",
@@ -2107,78 +934,80 @@ const ii = "cfxui__DropdownSelect__trigger__c03df", ci = "cfxui__DropdownSelect_
2107
934
  "dropdownselect-size-large-small": "cfxui__DropdownSelect__dropdownselect-size-large-small__5bca7",
2108
935
  "dropdownselect-size-xlarge-large": "cfxui__DropdownSelect__dropdownselect-size-xlarge-large__23eae",
2109
936
  "dropdownselect-size-xlarge-small": "cfxui__DropdownSelect__dropdownselect-size-xlarge-small__d232d"
2110
- }, Ni = {
937
+ }, yt = {
2111
938
  small: "xxsmall",
2112
939
  normal: "xsmall",
2113
940
  large: "normal"
2114
- }, Ii = $n.forwardRef(function(t, n) {
941
+ };
942
+ function Tt(e) {
2115
943
  const {
2116
- options: r,
944
+ options: n,
2117
945
  value: o,
2118
- onChange: i,
2119
- size: s = "normal",
946
+ onChange: t,
947
+ size: r = "normal",
2120
948
  fullWidth: c = !1,
2121
- onlight: f = !1,
2122
- disabled: u,
2123
- placeholder: p = "Select..."
2124
- } = t, m = Bn(null), [v, w] = Ct(void 0);
2125
- Kn(() => {
2126
- c && m.current && w(m.current.offsetWidth);
949
+ onlight: l = !1,
950
+ disabled: d,
951
+ placeholder: m = "Select...",
952
+ ref: _
953
+ } = e, u = vo(null), [i, f] = ho(void 0);
954
+ Mo(() => {
955
+ c && u.current && f(u.current.offsetWidth);
2127
956
  }, [c]);
2128
- const h = st.getResponsiveFlatClassnames("dropdownselect-size", s).map((g) => G[g]), l = ct(
2129
- G.trigger,
957
+ const h = xe.getResponsiveFlatClassnames("dropdownselect-size", r).map((w) => T[w]), v = Ee(
958
+ T.trigger,
2130
959
  h,
2131
960
  {
2132
- [G.placeholder]: !o,
2133
- [G.fullWidth]: c,
2134
- [G.onlight]: f
961
+ [T.placeholder]: !o,
962
+ [T.fullWidth]: c,
963
+ [T.onlight]: l
2135
964
  }
2136
- ), E = ct(
2137
- G.content,
965
+ ), R = Ee(
966
+ T.content,
2138
967
  h,
2139
968
  {
2140
- [G.fullWidth]: c
969
+ [T.fullWidth]: c
2141
970
  }
2142
971
  );
2143
- return /* @__PURE__ */ it(ni, { children: [
2144
- /* @__PURE__ */ d(
2145
- ri,
972
+ return /* @__PURE__ */ De(at, { children: [
973
+ /* @__PURE__ */ s(
974
+ ct,
2146
975
  {
2147
- ref: ir(n, m),
2148
- className: l,
2149
- disabled: u,
2150
- children: /* @__PURE__ */ it(ar, { gap: "small", centered: !0, spaceBetween: !0, children: [
2151
- o || p,
2152
- /* @__PURE__ */ d(or, { className: G.icon, name: "DownChevron" })
976
+ ref: Oo(_, u),
977
+ className: v,
978
+ disabled: d,
979
+ children: /* @__PURE__ */ De(No, { gap: "small", centered: !0, spaceBetween: !0, children: [
980
+ o || m,
981
+ /* @__PURE__ */ s(Ao, { className: T.icon, name: "DownChevron" })
2153
982
  ] })
2154
983
  }
2155
984
  ),
2156
- /* @__PURE__ */ d(
2157
- oi,
985
+ /* @__PURE__ */ s(
986
+ st,
2158
987
  {
2159
988
  align: "end",
2160
989
  side: "bottom",
2161
- className: E,
990
+ className: R,
2162
991
  style: {
2163
- width: v,
2164
- zIndex: st.zindex("max")
992
+ width: i,
993
+ zIndex: xe.zindex("max")
2165
994
  },
2166
- children: r.map((g) => /* @__PURE__ */ d(
2167
- ai,
995
+ children: n.map((w) => /* @__PURE__ */ s(
996
+ it,
2168
997
  {
2169
- className: G.item,
2170
- onSelect: () => i(g.value),
2171
- style: { width: v },
2172
- children: g.label
998
+ className: T.item,
999
+ onSelect: () => t(w.value),
1000
+ style: { width: i },
1001
+ children: w.label
2173
1002
  },
2174
- g.value
1003
+ w.value
2175
1004
  ))
2176
1005
  }
2177
1006
  )
2178
1007
  ] });
2179
- });
1008
+ }
2180
1009
  export {
2181
- Ii as DropdownSelect,
2182
- Ni as ICON_SIZE_MAP,
2183
- Ii as default
1010
+ Tt as DropdownSelect,
1011
+ yt as ICON_SIZE_MAP,
1012
+ Tt as default
2184
1013
  };