@ariakit/react 0.4.25 → 0.4.27

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 (319) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/cjs/__chunks/2HXQHKBC.cjs +59 -0
  3. package/cjs/__chunks/2MDC3Z3V.cjs +43 -0
  4. package/cjs/__chunks/334WKW6I.cjs +19 -0
  5. package/cjs/__chunks/34UJGLOZ.cjs +236 -0
  6. package/cjs/__chunks/3FIXGHZ2.cjs +59 -0
  7. package/cjs/__chunks/4RKQMGBK.cjs +1179 -0
  8. package/cjs/__chunks/5NTEPQ2U.cjs +148 -0
  9. package/cjs/__chunks/66G6K4UR.cjs +1 -0
  10. package/cjs/__chunks/6GNM57O7.cjs +1 -0
  11. package/cjs/__chunks/7M4GY5DS.cjs +255 -0
  12. package/cjs/__chunks/7MXJT4IN.cjs +17 -0
  13. package/cjs/__chunks/7POA4244.cjs +184 -0
  14. package/cjs/__chunks/ASOIXRUN.cjs +305 -0
  15. package/cjs/__chunks/C4NVIV6V.cjs +455 -0
  16. package/cjs/__chunks/CR6AS7WL.cjs +1 -0
  17. package/cjs/__chunks/D4HCGWOU.cjs +464 -0
  18. package/cjs/__chunks/DVWS2XPY.cjs +107 -0
  19. package/cjs/__chunks/DWSXHZYM.cjs +20 -0
  20. package/cjs/__chunks/E6EV2Q5P.cjs +1 -0
  21. package/cjs/__chunks/FELYQPO5.cjs +1025 -0
  22. package/cjs/__chunks/FHQ5DVYQ.cjs +34 -0
  23. package/cjs/__chunks/FIPBE5IX.cjs +23 -0
  24. package/cjs/__chunks/FVIS5BFZ.cjs +41 -0
  25. package/cjs/__chunks/GUB6WHB6.cjs +51 -0
  26. package/cjs/__chunks/GUY4MKX2.cjs +56 -0
  27. package/cjs/__chunks/IF5DZKAR.cjs +1 -0
  28. package/cjs/__chunks/IFZV5LA3.cjs +94 -0
  29. package/cjs/__chunks/IHVFJGGN.cjs +32 -0
  30. package/cjs/__chunks/L2IFVMDU.cjs +96 -0
  31. package/cjs/__chunks/LCX235VJ.cjs +53 -0
  32. package/cjs/__chunks/LMCBLO3G.cjs +42 -0
  33. package/cjs/__chunks/LS5VO6AA.cjs +44 -0
  34. package/cjs/__chunks/LVHC4DSB.cjs +117 -0
  35. package/cjs/__chunks/MN5TONXW.cjs +123 -0
  36. package/cjs/__chunks/N3DLR7OL.cjs +34 -0
  37. package/cjs/__chunks/NFZWL7LE.cjs +24 -0
  38. package/cjs/__chunks/NG34QRI6.cjs +264 -0
  39. package/cjs/__chunks/NIOJG7C4.cjs +1 -0
  40. package/cjs/__chunks/NMUCJYMR.cjs +496 -0
  41. package/cjs/__chunks/OOFUBC32.cjs +109 -0
  42. package/cjs/__chunks/OQRQJNBU.cjs +1 -0
  43. package/cjs/__chunks/PDPE2VAZ.cjs +1035 -0
  44. package/cjs/__chunks/PTE2IJM5.cjs +143 -0
  45. package/cjs/__chunks/PU63IQFD.cjs +447 -0
  46. package/cjs/__chunks/PZXRBFZF.cjs +38 -0
  47. package/cjs/__chunks/QAUJZR6Y.cjs +996 -0
  48. package/cjs/__chunks/QYDAT3QF.cjs +1 -0
  49. package/cjs/__chunks/QYLMYWKV.cjs +1 -0
  50. package/cjs/__chunks/RGH2H3WL.cjs +34 -0
  51. package/cjs/__chunks/RLKC7JVT.cjs +19 -0
  52. package/cjs/__chunks/RR46KI45.cjs +17 -0
  53. package/cjs/__chunks/RVXPEX7O.cjs +150 -0
  54. package/cjs/__chunks/RXZPZPJX.cjs +95 -0
  55. package/cjs/__chunks/SIF7IN4L.cjs +62 -0
  56. package/cjs/__chunks/SQ72MZ63.cjs +294 -0
  57. package/cjs/__chunks/SXAPGTJ4.cjs +23 -0
  58. package/cjs/__chunks/TLUFYZC7.cjs +37 -0
  59. package/cjs/__chunks/TSBEWPNT.cjs +1922 -0
  60. package/cjs/__chunks/U2UYQT45.cjs +1 -0
  61. package/cjs/__chunks/UUEFM3TG.cjs +75 -0
  62. package/cjs/__chunks/UV7CXZEM.cjs +36 -0
  63. package/cjs/__chunks/VXDLN5CP.cjs +234 -0
  64. package/cjs/__chunks/VXUZM542.cjs +789 -0
  65. package/cjs/__chunks/W27WRDUB.cjs +1 -0
  66. package/cjs/__chunks/X4U3XKYQ.cjs +7 -0
  67. package/cjs/__chunks/XH4GE3VE.cjs +29 -0
  68. package/cjs/__chunks/XPQIHUQ7.cjs +172 -0
  69. package/cjs/__chunks/YEXJT4IL.cjs +55 -0
  70. package/cjs/__chunks/Z5PDS46M.cjs +975 -0
  71. package/cjs/__chunks/ZNW2LLWJ.cjs +108 -0
  72. package/cjs/__chunks/ZYPARRXG.cjs +19 -0
  73. package/cjs/button.cjs +7 -3
  74. package/cjs/button.d.cts +2 -2
  75. package/cjs/button.d.ts +2 -2
  76. package/cjs/checkbox.cjs +11 -2
  77. package/cjs/checkbox.d.cts +9 -9
  78. package/cjs/checkbox.d.ts +9 -9
  79. package/cjs/collection.cjs +8 -2
  80. package/cjs/collection.d.cts +9 -9
  81. package/cjs/collection.d.ts +9 -9
  82. package/cjs/combobox.cjs +33 -2
  83. package/cjs/combobox.d.cts +33 -33
  84. package/cjs/combobox.d.ts +33 -33
  85. package/cjs/command.cjs +6 -3
  86. package/cjs/command.d.cts +2 -2
  87. package/cjs/command.d.ts +2 -2
  88. package/cjs/composite.cjs +24 -2
  89. package/cjs/composite.d.cts +21 -21
  90. package/cjs/composite.d.ts +21 -21
  91. package/cjs/dialog.cjs +24 -2
  92. package/cjs/dialog.d.cts +15 -15
  93. package/cjs/dialog.d.ts +15 -15
  94. package/cjs/disclosure.cjs +11 -2
  95. package/cjs/disclosure.d.cts +9 -9
  96. package/cjs/disclosure.d.ts +9 -9
  97. package/cjs/focus-trap.cjs +6 -2
  98. package/cjs/focus-trap.d.cts +4 -4
  99. package/cjs/focus-trap.d.ts +4 -4
  100. package/cjs/focusable.cjs +5 -3
  101. package/cjs/focusable.d.cts +2 -2
  102. package/cjs/focusable.d.ts +2 -2
  103. package/cjs/form.cjs +15 -2
  104. package/cjs/form.d.cts +37 -37
  105. package/cjs/form.d.ts +37 -37
  106. package/cjs/group.cjs +5 -3
  107. package/cjs/group.d.cts +4 -4
  108. package/cjs/group.d.ts +4 -4
  109. package/cjs/heading.cjs +7 -3
  110. package/cjs/heading.d.cts +4 -4
  111. package/cjs/heading.d.ts +4 -4
  112. package/cjs/hovercard.cjs +28 -2
  113. package/cjs/hovercard.d.cts +19 -19
  114. package/cjs/hovercard.d.ts +19 -19
  115. package/cjs/index.cjs +103 -28
  116. package/cjs/menu.cjs +44 -2
  117. package/cjs/menu.d.cts +41 -41
  118. package/cjs/menu.d.ts +41 -41
  119. package/cjs/menubar.cjs +10 -3
  120. package/cjs/menubar.d.cts +7 -7
  121. package/cjs/menubar.d.ts +7 -7
  122. package/cjs/popover.cjs +33 -2
  123. package/cjs/popover.d.cts +21 -21
  124. package/cjs/popover.d.ts +21 -21
  125. package/cjs/portal.cjs +7 -3
  126. package/cjs/portal.d.cts +3 -3
  127. package/cjs/portal.d.ts +3 -3
  128. package/cjs/radio.cjs +13 -2
  129. package/cjs/radio.d.cts +9 -9
  130. package/cjs/radio.d.ts +9 -9
  131. package/cjs/role.cjs +5 -3
  132. package/cjs/role.d.cts +2 -2
  133. package/cjs/role.d.ts +2 -2
  134. package/cjs/select.cjs +39 -2
  135. package/cjs/select.d.cts +33 -33
  136. package/cjs/select.d.ts +33 -33
  137. package/cjs/separator.cjs +5 -3
  138. package/cjs/separator.d.cts +2 -2
  139. package/cjs/separator.d.ts +2 -2
  140. package/cjs/store.cjs +5 -3
  141. package/cjs/store.d.cts +1 -1
  142. package/cjs/store.d.ts +1 -1
  143. package/cjs/tab.cjs +15 -2
  144. package/cjs/tab.d.cts +11 -11
  145. package/cjs/tab.d.ts +11 -11
  146. package/cjs/toolbar.cjs +13 -2
  147. package/cjs/toolbar.d.cts +15 -15
  148. package/cjs/toolbar.d.ts +15 -15
  149. package/cjs/tooltip.cjs +16 -2
  150. package/cjs/tooltip.d.cts +11 -11
  151. package/cjs/tooltip.d.ts +11 -11
  152. package/cjs/visually-hidden.cjs +5 -3
  153. package/cjs/visually-hidden.d.cts +2 -2
  154. package/cjs/visually-hidden.d.ts +2 -2
  155. package/esm/__chunks/2RKMXQTW.js +10 -0
  156. package/esm/__chunks/3Y4V2DTP.js +8 -0
  157. package/esm/__chunks/5FGJT4YF.js +10 -0
  158. package/esm/__chunks/ASWYYI35.js +26 -0
  159. package/esm/__chunks/BCX2X2B5.js +40 -0
  160. package/esm/__chunks/BLUBZ7NO.js +28 -0
  161. package/esm/__chunks/CKEWLSMJ.js +8 -0
  162. package/esm/__chunks/CSCX5ZBZ.js +40 -0
  163. package/esm/__chunks/CTJDBGJU.js +18 -0
  164. package/esm/__chunks/DAO5N24L.js +16 -0
  165. package/esm/__chunks/E3G6CWS6.js +16 -0
  166. package/esm/__chunks/IVVNCX6W.js +16 -0
  167. package/esm/__chunks/LQB76ROL.js +16 -0
  168. package/esm/__chunks/MALDUIAO.js +28 -0
  169. package/esm/__chunks/MP5ILXF3.js +14 -0
  170. package/esm/__chunks/O3FPWSHV.js +10 -0
  171. package/esm/__chunks/OKEWM6H4.js +10 -0
  172. package/esm/__chunks/QL3WKMBE.js +8 -0
  173. package/esm/__chunks/RD2DI27Y.js +44 -0
  174. package/esm/__chunks/SB7MN4B3.js +22 -0
  175. package/esm/__chunks/UA4GRLAL.js +52 -0
  176. package/esm/__chunks/UBB5N3OM.js +22 -0
  177. package/esm/__chunks/WC6KFHZH.js +8 -0
  178. package/esm/__chunks/WFREFNZD.js +8 -0
  179. package/esm/__chunks/WH35KJXV.js +8 -0
  180. package/esm/__chunks/WQKZESWL.js +18 -0
  181. package/esm/__chunks/YAS6EMRP.js +8 -0
  182. package/esm/button.d.ts +2 -2
  183. package/esm/button.js +1 -1
  184. package/esm/checkbox.d.ts +9 -9
  185. package/esm/checkbox.js +1 -1
  186. package/esm/collection.d.ts +9 -9
  187. package/esm/collection.js +1 -1
  188. package/esm/combobox.d.ts +33 -33
  189. package/esm/combobox.js +1 -1
  190. package/esm/command.d.ts +2 -2
  191. package/esm/command.js +1 -1
  192. package/esm/composite.d.ts +21 -21
  193. package/esm/composite.js +1 -1
  194. package/esm/dialog.d.ts +15 -15
  195. package/esm/dialog.js +1 -1
  196. package/esm/disclosure.d.ts +9 -9
  197. package/esm/disclosure.js +1 -1
  198. package/esm/focus-trap.d.ts +4 -4
  199. package/esm/focus-trap.js +1 -1
  200. package/esm/focusable.d.ts +2 -2
  201. package/esm/focusable.js +1 -1
  202. package/esm/form.d.ts +37 -37
  203. package/esm/form.js +1 -1
  204. package/esm/group.d.ts +4 -4
  205. package/esm/group.js +1 -1
  206. package/esm/heading.d.ts +4 -4
  207. package/esm/heading.js +1 -1
  208. package/esm/hovercard.d.ts +19 -19
  209. package/esm/hovercard.js +1 -1
  210. package/esm/index.js +27 -27
  211. package/esm/menu.d.ts +41 -41
  212. package/esm/menu.js +1 -1
  213. package/esm/menubar.d.ts +7 -7
  214. package/esm/menubar.js +1 -1
  215. package/esm/popover.d.ts +21 -21
  216. package/esm/popover.js +1 -1
  217. package/esm/portal.d.ts +3 -3
  218. package/esm/portal.js +1 -1
  219. package/esm/radio.d.ts +9 -9
  220. package/esm/radio.js +1 -1
  221. package/esm/role.d.ts +2 -2
  222. package/esm/role.js +1 -1
  223. package/esm/select.d.ts +33 -33
  224. package/esm/select.js +1 -1
  225. package/esm/separator.d.ts +2 -2
  226. package/esm/separator.js +1 -1
  227. package/esm/store.d.ts +1 -1
  228. package/esm/store.js +1 -1
  229. package/esm/tab.d.ts +11 -11
  230. package/esm/tab.js +1 -1
  231. package/esm/toolbar.d.ts +15 -15
  232. package/esm/toolbar.js +1 -1
  233. package/esm/tooltip.d.ts +11 -11
  234. package/esm/tooltip.js +1 -1
  235. package/esm/visually-hidden.d.ts +2 -2
  236. package/esm/visually-hidden.js +1 -1
  237. package/package.json +2 -2
  238. package/src/button.ts +5 -0
  239. package/src/checkbox.ts +19 -0
  240. package/src/collection.ts +19 -0
  241. package/src/combobox.ts +76 -0
  242. package/src/command.ts +5 -0
  243. package/src/composite.ts +49 -0
  244. package/src/dialog.ts +34 -0
  245. package/src/disclosure.ts +19 -0
  246. package/src/focus-trap.ts +11 -0
  247. package/src/focusable.ts +5 -0
  248. package/src/form.ts +90 -0
  249. package/src/group.ts +10 -0
  250. package/src/heading.ts +7 -0
  251. package/src/hovercard.ts +44 -0
  252. package/src/index.ts +27 -0
  253. package/src/menu.ts +100 -0
  254. package/src/menubar.ts +14 -0
  255. package/src/popover.ts +49 -0
  256. package/src/portal.ts +6 -0
  257. package/src/radio.ts +19 -0
  258. package/src/role.ts +5 -0
  259. package/src/select.ts +76 -0
  260. package/src/separator.ts +5 -0
  261. package/src/store.ts +1 -0
  262. package/src/tab.ts +21 -0
  263. package/src/toolbar.ts +34 -0
  264. package/src/tooltip.ts +24 -0
  265. package/src/visually-hidden.ts +5 -0
  266. package/cjs/__chunks/24MX6KII.cjs +0 -14
  267. package/cjs/__chunks/2IFRJ7YS.cjs +0 -6
  268. package/cjs/__chunks/32YVOHOP.cjs +0 -50
  269. package/cjs/__chunks/4BAIAF3U.cjs +0 -14
  270. package/cjs/__chunks/4J2CIZDN.cjs +0 -14
  271. package/cjs/__chunks/4TTUYQMJ.cjs +0 -20
  272. package/cjs/__chunks/6QAXTQNM.cjs +0 -16
  273. package/cjs/__chunks/6WNPYLAU.cjs +0 -6
  274. package/cjs/__chunks/A2CP2RQF.cjs +0 -24
  275. package/cjs/__chunks/AEV4Y6LH.cjs +0 -8
  276. package/cjs/__chunks/APHGV4DJ.cjs +0 -6
  277. package/cjs/__chunks/B34XK6WF.cjs +0 -8
  278. package/cjs/__chunks/BFD7ZBIV.cjs +0 -26
  279. package/cjs/__chunks/CZIDOP5N.cjs +0 -38
  280. package/cjs/__chunks/ETUDK33Z.cjs +0 -26
  281. package/cjs/__chunks/GJC4LCYO.cjs +0 -16
  282. package/cjs/__chunks/KGVA5X7R.cjs +0 -38
  283. package/cjs/__chunks/LAX4QA6C.cjs +0 -42
  284. package/cjs/__chunks/MDOKA7B5.cjs +0 -6
  285. package/cjs/__chunks/Q2GGGIV7.cjs +0 -6
  286. package/cjs/__chunks/QKCQWENM.cjs +0 -6
  287. package/cjs/__chunks/QPSUJCLN.cjs +0 -12
  288. package/cjs/__chunks/TDX6HS73.cjs +0 -8
  289. package/cjs/__chunks/UPMOBIQ3.cjs +0 -20
  290. package/cjs/__chunks/W6XMZ4GT.cjs +0 -14
  291. package/cjs/__chunks/WXEUE6MJ.cjs +0 -6
  292. package/cjs/__chunks/XTZIX6PF.cjs +0 -8
  293. package/esm/__chunks/3IMSX6M3.js +0 -8
  294. package/esm/__chunks/4H6IIOQF.js +0 -22
  295. package/esm/__chunks/5OF2JM6T.js +0 -16
  296. package/esm/__chunks/6FL2IFMJ.js +0 -16
  297. package/esm/__chunks/6N4GEF7O.js +0 -18
  298. package/esm/__chunks/6OHDLPN7.js +0 -8
  299. package/esm/__chunks/7FQAKYJR.js +0 -26
  300. package/esm/__chunks/AJMZU3YP.js +0 -28
  301. package/esm/__chunks/DZPSY7QT.js +0 -22
  302. package/esm/__chunks/H2GJECQG.js +0 -8
  303. package/esm/__chunks/JBAWBCWC.js +0 -8
  304. package/esm/__chunks/LI3X5M2M.js +0 -8
  305. package/esm/__chunks/NV5BVS3O.js +0 -8
  306. package/esm/__chunks/PGIWSRTG.js +0 -28
  307. package/esm/__chunks/PRYHFEBA.js +0 -10
  308. package/esm/__chunks/UTW5KHW6.js +0 -16
  309. package/esm/__chunks/VGHCPDMA.js +0 -8
  310. package/esm/__chunks/VHD2YK6B.js +0 -18
  311. package/esm/__chunks/WA3BE3AY.js +0 -10
  312. package/esm/__chunks/XHSNLTYJ.js +0 -10
  313. package/esm/__chunks/XIMRDTWX.js +0 -14
  314. package/esm/__chunks/YQF2RGHD.js +0 -44
  315. package/esm/__chunks/ZDPYYVJP.js +0 -40
  316. package/esm/__chunks/ZFJPKQV6.js +0 -52
  317. package/esm/__chunks/ZL4AJIDL.js +0 -10
  318. package/esm/__chunks/ZQSDMYJA.js +0 -16
  319. package/esm/__chunks/ZVIXWGHS.js +0 -40
@@ -0,0 +1,117 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _NG34QRI6cjs = require('./NG34QRI6.cjs');
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+ var _QAUJZR6Ycjs = require('./QAUJZR6Y.cjs');
19
+
20
+ // ../ariakit-react-components/dist/command/command.js
21
+ var _react = require('react');
22
+ var TagName = "button";
23
+ function isNativeClick(event) {
24
+ if (!event.isTrusted) return false;
25
+ const element = event.currentTarget;
26
+ if (event.key === "Enter") return _QAUJZR6Ycjs.isButton.call(void 0, element) || element.tagName === "SUMMARY" || element.tagName === "A";
27
+ if (event.key === " ") return _QAUJZR6Ycjs.isButton.call(void 0, element) || element.tagName === "SUMMARY" || element.tagName === "INPUT" || element.tagName === "SELECT";
28
+ return false;
29
+ }
30
+ var symbol = /* @__PURE__ */ Symbol("command");
31
+ var useCommand = _QAUJZR6Ycjs.createHook.call(void 0, function useCommand2({ clickOnEnter = true, clickOnSpace = true, ...props }) {
32
+ const ref = _react.useRef.call(void 0, null);
33
+ const [isNativeButton, setIsNativeButton] = _react.useState.call(void 0, false);
34
+ _react.useEffect.call(void 0, () => {
35
+ if (!ref.current) return;
36
+ setIsNativeButton(_QAUJZR6Ycjs.isButton.call(void 0, ref.current));
37
+ }, []);
38
+ const [active, setActive] = _react.useState.call(void 0, false);
39
+ const activeRef = _react.useRef.call(void 0, false);
40
+ const disabled = _QAUJZR6Ycjs.disabledFromProps.call(void 0, props);
41
+ const [isDuplicate, metadataProps] = _QAUJZR6Ycjs.useMetadataProps.call(void 0, props, symbol, true);
42
+ const onKeyDownProp = props.onKeyDown;
43
+ const onKeyDown = _QAUJZR6Ycjs.useEvent.call(void 0, (event) => {
44
+ onKeyDownProp == null ? void 0 : onKeyDownProp(event);
45
+ const element = event.currentTarget;
46
+ if (event.defaultPrevented) return;
47
+ if (isDuplicate) return;
48
+ if (disabled) return;
49
+ if (!_QAUJZR6Ycjs.isSelfTarget.call(void 0, event)) return;
50
+ if (_QAUJZR6Ycjs.isTextField.call(void 0, element)) return;
51
+ if (element.isContentEditable) return;
52
+ const isEnter = clickOnEnter && event.key === "Enter";
53
+ const isSpace = clickOnSpace && event.key === " ";
54
+ const shouldPreventEnter = event.key === "Enter" && !clickOnEnter;
55
+ const shouldPreventSpace = event.key === " " && !clickOnSpace;
56
+ if (shouldPreventEnter || shouldPreventSpace) {
57
+ event.preventDefault();
58
+ return;
59
+ }
60
+ if (isEnter || isSpace) {
61
+ const nativeClick = isNativeClick(event);
62
+ if (isEnter) {
63
+ if (!nativeClick) {
64
+ event.preventDefault();
65
+ const { view, ...eventInit } = event;
66
+ const click = () => _QAUJZR6Ycjs.fireClickEvent.call(void 0, element, eventInit);
67
+ if (_QAUJZR6Ycjs.isFirefox.call(void 0, )) _QAUJZR6Ycjs.queueBeforeEvent.call(void 0, element, "keyup", click);
68
+ else queueMicrotask(click);
69
+ }
70
+ } else if (isSpace) {
71
+ activeRef.current = true;
72
+ if (!nativeClick) {
73
+ event.preventDefault();
74
+ setActive(true);
75
+ }
76
+ }
77
+ }
78
+ });
79
+ const onKeyUpProp = props.onKeyUp;
80
+ const onKeyUp = _QAUJZR6Ycjs.useEvent.call(void 0, (event) => {
81
+ onKeyUpProp == null ? void 0 : onKeyUpProp(event);
82
+ if (event.defaultPrevented) return;
83
+ if (isDuplicate) return;
84
+ if (disabled) return;
85
+ if (event.metaKey) return;
86
+ const isSpace = clickOnSpace && event.key === " ";
87
+ if (activeRef.current && isSpace) {
88
+ activeRef.current = false;
89
+ if (!isNativeClick(event)) {
90
+ event.preventDefault();
91
+ setActive(false);
92
+ const element = event.currentTarget;
93
+ const { view, ...eventInit } = event;
94
+ queueMicrotask(() => _QAUJZR6Ycjs.fireClickEvent.call(void 0, element, eventInit));
95
+ }
96
+ }
97
+ });
98
+ props = {
99
+ "data-active": active || void 0,
100
+ type: isNativeButton ? "button" : void 0,
101
+ ...metadataProps,
102
+ ...props,
103
+ ref: _QAUJZR6Ycjs.useMergeRefs.call(void 0, ref, props.ref),
104
+ onKeyDown,
105
+ onKeyUp
106
+ };
107
+ props = _NG34QRI6cjs.useFocusable.call(void 0, props);
108
+ return props;
109
+ });
110
+ var Command = _QAUJZR6Ycjs.forwardRef.call(void 0, function Command2(props) {
111
+ return _QAUJZR6Ycjs.createElement.call(void 0, TagName, useCommand(props));
112
+ });
113
+
114
+
115
+
116
+
117
+ exports.useCommand = useCommand; exports.Command = Command;
@@ -0,0 +1,123 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _L2IFVMDUcjs = require('./L2IFVMDU.cjs');
4
+
5
+
6
+
7
+ var _SIF7IN4Lcjs = require('./SIF7IN4L.cjs');
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+ var _QAUJZR6Ycjs = require('./QAUJZR6Y.cjs');
24
+
25
+ // ../ariakit-react-components/dist/composite/composite-group.js
26
+ var TagName = "div";
27
+ var useCompositeGroup = _QAUJZR6Ycjs.createHook.call(void 0, function useCompositeGroup2({ store, ...props }) {
28
+ props = _SIF7IN4Lcjs.useGroup.call(void 0, props);
29
+ return props;
30
+ });
31
+ var CompositeGroup = _QAUJZR6Ycjs.forwardRef.call(void 0, function CompositeGroup2(props) {
32
+ return _QAUJZR6Ycjs.createElement.call(void 0, TagName, useCompositeGroup(props));
33
+ });
34
+
35
+ // ../ariakit-react-components/dist/composite/composite-group-label.js
36
+ var TagName2 = "div";
37
+ var useCompositeGroupLabel = _QAUJZR6Ycjs.createHook.call(void 0, function useCompositeGroupLabel2({ store, ...props }) {
38
+ props = _SIF7IN4Lcjs.useGroupLabel.call(void 0, props);
39
+ return props;
40
+ });
41
+ var CompositeGroupLabel = _QAUJZR6Ycjs.forwardRef.call(void 0, function CompositeGroupLabel2(props) {
42
+ return _QAUJZR6Ycjs.createElement.call(void 0, TagName2, useCompositeGroupLabel(props));
43
+ });
44
+
45
+ // ../ariakit-react-components/dist/composite/composite-hover.js
46
+ var _react = require('react');
47
+ var TagName3 = "div";
48
+ function getMouseDestination(event) {
49
+ const relatedTarget = event.relatedTarget;
50
+ if ((relatedTarget == null ? void 0 : relatedTarget.nodeType) === Node.ELEMENT_NODE) return relatedTarget;
51
+ return null;
52
+ }
53
+ function hoveringInside(event) {
54
+ const nextElement = getMouseDestination(event);
55
+ if (!nextElement) return false;
56
+ return _QAUJZR6Ycjs.contains.call(void 0, event.currentTarget, nextElement);
57
+ }
58
+ var symbol = /* @__PURE__ */ Symbol("composite-hover");
59
+ function movingToAnotherItem(event) {
60
+ let dest = getMouseDestination(event);
61
+ if (!dest) return false;
62
+ do {
63
+ if (_QAUJZR6Ycjs.hasOwnProperty.call(void 0, dest, symbol) && dest[symbol]) return true;
64
+ dest = dest.parentElement;
65
+ } while (dest);
66
+ return false;
67
+ }
68
+ var useCompositeHover = _QAUJZR6Ycjs.createHook.call(void 0, function useCompositeHover2({ store, focusOnHover = true, blurOnHoverEnd = !!focusOnHover, ...props }) {
69
+ const context = _L2IFVMDUcjs.useCompositeContext.call(void 0, );
70
+ store = store || context;
71
+ _QAUJZR6Ycjs.invariant.call(void 0, store, "CompositeHover must be wrapped in a Composite component.");
72
+ const isMouseMoving = _QAUJZR6Ycjs.useIsMouseMoving.call(void 0, );
73
+ const onMouseMoveProp = props.onMouseMove;
74
+ const focusOnHoverProp = _QAUJZR6Ycjs.useBooleanEvent.call(void 0, focusOnHover);
75
+ const onMouseMove = _QAUJZR6Ycjs.useEvent.call(void 0, (event) => {
76
+ onMouseMoveProp == null ? void 0 : onMouseMoveProp(event);
77
+ if (event.defaultPrevented) return;
78
+ if (!isMouseMoving()) return;
79
+ if (!focusOnHoverProp(event)) return;
80
+ if (!_QAUJZR6Ycjs.hasFocusWithin.call(void 0, event.currentTarget)) {
81
+ const baseElement = store == null ? void 0 : store.getState().baseElement;
82
+ if (baseElement && !_QAUJZR6Ycjs.hasFocus.call(void 0, baseElement)) baseElement.focus();
83
+ }
84
+ store == null ? void 0 : store.setActiveId(event.currentTarget.id);
85
+ });
86
+ const onMouseLeaveProp = props.onMouseLeave;
87
+ const blurOnHoverEndProp = _QAUJZR6Ycjs.useBooleanEvent.call(void 0, blurOnHoverEnd);
88
+ const onMouseLeave = _QAUJZR6Ycjs.useEvent.call(void 0, (event) => {
89
+ var _a;
90
+ onMouseLeaveProp == null ? void 0 : onMouseLeaveProp(event);
91
+ if (event.defaultPrevented) return;
92
+ if (!isMouseMoving()) return;
93
+ if (hoveringInside(event)) return;
94
+ if (movingToAnotherItem(event)) return;
95
+ if (!focusOnHoverProp(event)) return;
96
+ if (!blurOnHoverEndProp(event)) return;
97
+ store == null ? void 0 : store.setActiveId(null);
98
+ (_a = store == null ? void 0 : store.getState().baseElement) == null ? void 0 : _a.focus();
99
+ });
100
+ const ref = _react.useCallback.call(void 0, (element) => {
101
+ if (!element) return;
102
+ element[symbol] = true;
103
+ }, []);
104
+ props = {
105
+ ...props,
106
+ ref: _QAUJZR6Ycjs.useMergeRefs.call(void 0, ref, props.ref),
107
+ onMouseMove,
108
+ onMouseLeave
109
+ };
110
+ return _QAUJZR6Ycjs.removeUndefinedValues.call(void 0, props);
111
+ });
112
+ var CompositeHover = _QAUJZR6Ycjs.memo.call(void 0, _QAUJZR6Ycjs.forwardRef.call(void 0, function CompositeHover2(props) {
113
+ return _QAUJZR6Ycjs.createElement.call(void 0, TagName3, useCompositeHover(props));
114
+ }));
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ exports.useCompositeGroup = useCompositeGroup; exports.CompositeGroup = CompositeGroup; exports.useCompositeGroupLabel = useCompositeGroupLabel; exports.CompositeGroupLabel = CompositeGroupLabel; exports.useCompositeHover = useCompositeHover; exports.CompositeHover = CompositeHover;
@@ -0,0 +1,34 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _RGH2H3WLcjs = require('./RGH2H3WL.cjs');
4
+
5
+
6
+
7
+
8
+ var _QAUJZR6Ycjs = require('./QAUJZR6Y.cjs');
9
+
10
+ // ../ariakit-react-components/dist/focus-trap/focus-trap.js
11
+ var TagName = "span";
12
+ var useFocusTrap = _QAUJZR6Ycjs.createHook.call(void 0, function useFocusTrap2(props) {
13
+ props = {
14
+ "data-focus-trap": "",
15
+ tabIndex: 0,
16
+ "aria-hidden": true,
17
+ ...props,
18
+ style: {
19
+ position: "fixed",
20
+ top: 0,
21
+ left: 0,
22
+ ...props.style
23
+ }
24
+ };
25
+ props = _RGH2H3WLcjs.useVisuallyHidden.call(void 0, props);
26
+ return props;
27
+ });
28
+ var FocusTrap = _QAUJZR6Ycjs.forwardRef.call(void 0, function FocusTrap2(props) {
29
+ return _QAUJZR6Ycjs.createElement.call(void 0, TagName, useFocusTrap(props));
30
+ });
31
+
32
+
33
+
34
+ exports.FocusTrap = FocusTrap;
@@ -0,0 +1,24 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+ var _QAUJZR6Ycjs = require('./QAUJZR6Y.cjs');
6
+
7
+ // ../ariakit-react-components/dist/separator/separator.js
8
+ var TagName = "hr";
9
+ var useSeparator = _QAUJZR6Ycjs.createHook.call(void 0, function useSeparator2({ orientation = "horizontal", ...props }) {
10
+ props = {
11
+ role: "separator",
12
+ "aria-orientation": orientation,
13
+ ...props
14
+ };
15
+ return props;
16
+ });
17
+ var Separator = _QAUJZR6Ycjs.forwardRef.call(void 0, function Separator2(props) {
18
+ return _QAUJZR6Ycjs.createElement.call(void 0, TagName, useSeparator(props));
19
+ });
20
+
21
+
22
+
23
+
24
+ exports.useSeparator = useSeparator; exports.Separator = Separator;
@@ -0,0 +1,264 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+ var _QAUJZR6Ycjs = require('./QAUJZR6Y.cjs');
19
+
20
+ // ../ariakit-react-components/dist/focusable/focusable-context.js
21
+ var _react = require('react');
22
+ var FocusableContext = _react.createContext.call(void 0, true);
23
+
24
+ // ../ariakit-react-components/dist/focusable/focusable.js
25
+
26
+ var TagName = "div";
27
+ var accessibleWhenDisabledSymbol = /* @__PURE__ */ Symbol("accessibleWhenDisabled");
28
+ var isSafariBrowser = _QAUJZR6Ycjs.isSafari.call(void 0, );
29
+ var alwaysFocusVisibleInputTypes = [
30
+ "text",
31
+ "search",
32
+ "url",
33
+ "tel",
34
+ "email",
35
+ "password",
36
+ "number",
37
+ "date",
38
+ "month",
39
+ "week",
40
+ "time",
41
+ "datetime",
42
+ "datetime-local"
43
+ ];
44
+ function isAlwaysFocusVisible(element) {
45
+ const { tagName, readOnly, type } = element;
46
+ if (tagName === "TEXTAREA" && !readOnly) return true;
47
+ if (tagName === "SELECT" && !readOnly) return true;
48
+ if (tagName === "INPUT" && !readOnly) return alwaysFocusVisibleInputTypes.includes(type);
49
+ if (element.isContentEditable) return true;
50
+ if (element.getAttribute("role") === "combobox" && element.dataset.name) return true;
51
+ return false;
52
+ }
53
+ function isNativeTabbable(tagName) {
54
+ if (!tagName) return true;
55
+ return tagName === "button" || tagName === "summary" || tagName === "input" || tagName === "select" || tagName === "textarea" || tagName === "a";
56
+ }
57
+ function supportsDisabledAttribute(tagName) {
58
+ if (!tagName) return true;
59
+ return tagName === "button" || tagName === "input" || tagName === "select" || tagName === "textarea";
60
+ }
61
+ var buttonInputTypes = [
62
+ "button",
63
+ "color",
64
+ "file",
65
+ "image",
66
+ "reset",
67
+ "submit"
68
+ ];
69
+ function needsSafariTabIndex(tagName, inputType) {
70
+ if (tagName === "button") return true;
71
+ if (tagName === "input" && inputType) {
72
+ if (inputType === "checkbox" || inputType === "radio") return true;
73
+ return buttonInputTypes.includes(inputType);
74
+ }
75
+ return false;
76
+ }
77
+ function getTabIndex({ focusable, trulyDisabled, nativeTabbable, supportsDisabled, safariTabIndex, tabIndexProp }) {
78
+ if (!focusable) return tabIndexProp;
79
+ if (trulyDisabled) {
80
+ if (nativeTabbable && !supportsDisabled) return -1;
81
+ return;
82
+ }
83
+ if (nativeTabbable) {
84
+ if (safariTabIndex && tabIndexProp == null) return 0;
85
+ return tabIndexProp;
86
+ }
87
+ return tabIndexProp != null ? tabIndexProp : 0;
88
+ }
89
+ function useDisableEvent(onEvent, disabled) {
90
+ return _QAUJZR6Ycjs.useEvent.call(void 0, (event) => {
91
+ onEvent == null ? void 0 : onEvent(event);
92
+ if (event.defaultPrevented) return;
93
+ if (disabled) {
94
+ event.stopPropagation();
95
+ event.preventDefault();
96
+ }
97
+ });
98
+ }
99
+ var hasInstalledGlobalEventListeners = false;
100
+ var isKeyboardModality = true;
101
+ function onGlobalMouseDown(event) {
102
+ const target = event.target;
103
+ if (target && "hasAttribute" in target) {
104
+ if (!target.hasAttribute("data-focus-visible")) isKeyboardModality = false;
105
+ }
106
+ }
107
+ function onGlobalKeyDown(event) {
108
+ if (event.metaKey) return;
109
+ if (event.ctrlKey) return;
110
+ if (event.altKey) return;
111
+ isKeyboardModality = true;
112
+ }
113
+ var useFocusable = _QAUJZR6Ycjs.createHook.call(void 0, function useFocusable2({ focusable = true, accessibleWhenDisabled, autoFocus, onFocusVisible, ...props }) {
114
+ const ref = _react.useRef.call(void 0, null);
115
+ const [parentAccessibleWhenDisabled, metadataProps] = _QAUJZR6Ycjs.useMetadataProps.call(void 0, props, accessibleWhenDisabledSymbol, accessibleWhenDisabled);
116
+ accessibleWhenDisabled != null ? accessibleWhenDisabled : accessibleWhenDisabled = parentAccessibleWhenDisabled;
117
+ _react.useEffect.call(void 0, () => {
118
+ if (!focusable) return;
119
+ if (hasInstalledGlobalEventListeners) return;
120
+ _QAUJZR6Ycjs.addGlobalEventListener.call(void 0, "mousedown", onGlobalMouseDown, true);
121
+ _QAUJZR6Ycjs.addGlobalEventListener.call(void 0, "keydown", onGlobalKeyDown, true);
122
+ hasInstalledGlobalEventListeners = true;
123
+ }, [focusable]);
124
+ const disabled = focusable && _QAUJZR6Ycjs.disabledFromProps.call(void 0, props);
125
+ const trulyDisabled = disabled && !accessibleWhenDisabled;
126
+ const [focusVisible, setFocusVisible] = _react.useState.call(void 0, false);
127
+ _react.useEffect.call(void 0, () => {
128
+ if (!focusable) return;
129
+ if (trulyDisabled && focusVisible) setFocusVisible(false);
130
+ }, [
131
+ focusable,
132
+ trulyDisabled,
133
+ focusVisible
134
+ ]);
135
+ _react.useEffect.call(void 0, () => {
136
+ if (!focusable) return;
137
+ if (!focusVisible) return;
138
+ const element = ref.current;
139
+ if (!element) return;
140
+ if (typeof IntersectionObserver === "undefined") return;
141
+ const observer = new IntersectionObserver(() => {
142
+ if (!_QAUJZR6Ycjs.isFocusable.call(void 0, element)) setFocusVisible(false);
143
+ });
144
+ observer.observe(element);
145
+ return () => observer.disconnect();
146
+ }, [focusable, focusVisible]);
147
+ const onKeyPressCapture = useDisableEvent(props.onKeyPressCapture, disabled);
148
+ const onMouseDownCapture = useDisableEvent(props.onMouseDownCapture, disabled);
149
+ const onClickCapture = useDisableEvent(props.onClickCapture, disabled);
150
+ const handleFocusVisible = (event, currentTarget) => {
151
+ if (currentTarget) event.currentTarget = currentTarget;
152
+ if (!focusable) return;
153
+ const element = event.currentTarget;
154
+ if (!element) return;
155
+ if (!_QAUJZR6Ycjs.hasFocus.call(void 0, element)) return;
156
+ onFocusVisible == null ? void 0 : onFocusVisible(event);
157
+ if (event.defaultPrevented) return;
158
+ element.dataset.focusVisible = "true";
159
+ setFocusVisible(true);
160
+ };
161
+ const onKeyDownCaptureProp = props.onKeyDownCapture;
162
+ const onKeyDownCapture = _QAUJZR6Ycjs.useEvent.call(void 0, (event) => {
163
+ onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event);
164
+ if (event.defaultPrevented) return;
165
+ if (!focusable) return;
166
+ if (focusVisible) return;
167
+ if (event.metaKey) return;
168
+ if (event.altKey) return;
169
+ if (event.ctrlKey) return;
170
+ if (!_QAUJZR6Ycjs.isSelfTarget.call(void 0, event)) return;
171
+ const element = event.currentTarget;
172
+ const applyFocusVisible = () => handleFocusVisible(event, element);
173
+ _QAUJZR6Ycjs.queueBeforeEvent.call(void 0, element, "focusout", applyFocusVisible);
174
+ });
175
+ const onFocusCaptureProp = props.onFocusCapture;
176
+ const onFocusCapture = _QAUJZR6Ycjs.useEvent.call(void 0, (event) => {
177
+ onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);
178
+ if (event.defaultPrevented) return;
179
+ if (!focusable) return;
180
+ if (!_QAUJZR6Ycjs.isSelfTarget.call(void 0, event)) {
181
+ setFocusVisible(false);
182
+ return;
183
+ }
184
+ const element = event.currentTarget;
185
+ const applyFocusVisible = () => handleFocusVisible(event, element);
186
+ if (isKeyboardModality || isAlwaysFocusVisible(event.target)) _QAUJZR6Ycjs.queueBeforeEvent.call(void 0, event.target, "focusout", applyFocusVisible);
187
+ else setFocusVisible(false);
188
+ });
189
+ const onBlurProp = props.onBlur;
190
+ const onBlur = _QAUJZR6Ycjs.useEvent.call(void 0, (event) => {
191
+ onBlurProp == null ? void 0 : onBlurProp(event);
192
+ if (!focusable) return;
193
+ if (!_QAUJZR6Ycjs.isFocusEventOutside.call(void 0, event)) return;
194
+ event.currentTarget.removeAttribute("data-focus-visible");
195
+ setFocusVisible(false);
196
+ });
197
+ const autoFocusOnShow = _react.useContext.call(void 0, FocusableContext);
198
+ const autoFocusRef = _QAUJZR6Ycjs.useEvent.call(void 0, (element) => {
199
+ if (!focusable) return;
200
+ if (!autoFocus) return;
201
+ if (!element) return;
202
+ if (!autoFocusOnShow) return;
203
+ queueMicrotask(() => {
204
+ if (_QAUJZR6Ycjs.hasFocus.call(void 0, element)) return;
205
+ if (!_QAUJZR6Ycjs.isFocusable.call(void 0, element)) return;
206
+ element.focus();
207
+ });
208
+ });
209
+ const tagName = _QAUJZR6Ycjs.useTagName.call(void 0, ref);
210
+ const nativeTabbable = focusable && isNativeTabbable(tagName);
211
+ const supportsDisabled = focusable && supportsDisabledAttribute(tagName);
212
+ const [safariTabIndex, setSafariTabIndex] = _react.useState.call(void 0, false);
213
+ if (isSafariBrowser) _react.useEffect.call(void 0, () => {
214
+ if (!focusable) return;
215
+ const element = ref.current;
216
+ if (!element) return;
217
+ const tag = element.tagName.toLowerCase();
218
+ const type = element.type;
219
+ setSafariTabIndex(needsSafariTabIndex(tag, type));
220
+ }, [focusable]);
221
+ const styleProp = props.style;
222
+ const style = _react.useMemo.call(void 0, () => {
223
+ if (trulyDisabled) return {
224
+ pointerEvents: "none",
225
+ ...styleProp
226
+ };
227
+ return styleProp;
228
+ }, [trulyDisabled, styleProp]);
229
+ props = {
230
+ "data-focus-visible": focusable && focusVisible || void 0,
231
+ "data-autofocus": autoFocus || void 0,
232
+ "aria-disabled": disabled || void 0,
233
+ ...props,
234
+ ...metadataProps,
235
+ ref: _QAUJZR6Ycjs.useMergeRefs.call(void 0, ref, autoFocusRef, props.ref),
236
+ style,
237
+ tabIndex: getTabIndex({
238
+ focusable,
239
+ trulyDisabled,
240
+ nativeTabbable,
241
+ supportsDisabled,
242
+ safariTabIndex,
243
+ tabIndexProp: props.tabIndex
244
+ }),
245
+ disabled: supportsDisabled && trulyDisabled ? true : void 0,
246
+ contentEditable: disabled ? void 0 : props.contentEditable,
247
+ onKeyPressCapture,
248
+ onClickCapture,
249
+ onMouseDownCapture,
250
+ onKeyDownCapture,
251
+ onFocusCapture,
252
+ onBlur
253
+ };
254
+ return _QAUJZR6Ycjs.removeUndefinedValues.call(void 0, props);
255
+ });
256
+ var Focusable = _QAUJZR6Ycjs.forwardRef.call(void 0, function Focusable2(props) {
257
+ return _QAUJZR6Ycjs.createElement.call(void 0, TagName, useFocusable(props));
258
+ });
259
+
260
+
261
+
262
+
263
+
264
+ exports.FocusableContext = FocusableContext; exports.useFocusable = useFocusable; exports.Focusable = Focusable;
@@ -0,0 +1 @@
1
+ "use strict";