ics-ui-kit 0.1.12 → 0.1.14

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 (295) hide show
  1. package/README.md +36 -36
  2. package/dist/AlertContext-CxjW1LVL.js.map +1 -1
  3. package/dist/{AlertIcon-5B6AgZpe.js → AlertIcon-BphnEYvV.js} +3 -3
  4. package/dist/AlertIcon-BphnEYvV.js.map +1 -0
  5. package/dist/Button-Dg89xRSi.js.map +1 -1
  6. package/dist/ButtonBase-e6qyv6mD.js.map +1 -1
  7. package/dist/{CheckboxField-cX09-eBX.js → CheckboxField-2zNFubvm.js} +2 -2
  8. package/dist/CheckboxField-2zNFubvm.js.map +1 -0
  9. package/dist/Combination-DeIugdgY.js +353 -0
  10. package/dist/Combination-DeIugdgY.js.map +1 -0
  11. package/dist/{Command-ClIm4U7r.js → Command-D5zgJ7-y.js} +3 -3
  12. package/dist/Command-D5zgJ7-y.js.map +1 -0
  13. package/dist/ComponentVariantProvider-brk0g-hm.js.map +1 -1
  14. package/dist/Description-BTPMlTT-.js.map +1 -1
  15. package/dist/{Dialog-Bs1B5Iu8.js → Dialog-CdnsGyJD.js} +3 -3
  16. package/dist/Dialog-CdnsGyJD.js.map +1 -0
  17. package/dist/Divider-DPW5ZhZ8.js.map +1 -1
  18. package/dist/EmptyState-DRKjscH-.js.map +1 -1
  19. package/dist/ErrorState-B26k67-z.js.map +1 -1
  20. package/dist/FeatureIcon-BGE0Orkc.js.map +1 -1
  21. package/dist/Field-CP_-li9L.js +90 -0
  22. package/dist/Field-CP_-li9L.js.map +1 -0
  23. package/dist/{FieldLabel-QJ4rJFOi.js → FieldLabel-eyKmeWRn.js} +2 -2
  24. package/dist/FieldLabel-eyKmeWRn.js.map +1 -0
  25. package/dist/FolderSvg-cw0DxNVy.js.map +1 -1
  26. package/dist/{FormFooterTemplate-DPB6Dkxn.js → FormFooterTemplate-Cfn5Nmge.js} +3 -3
  27. package/dist/FormFooterTemplate-Cfn5Nmge.js.map +1 -0
  28. package/dist/FormHeader--F6b2aRk.js.map +1 -1
  29. package/dist/{FormStack-DO15vBgd.js → FormStack-Cc_ELdWL.js} +3 -3
  30. package/dist/FormStack-Cc_ELdWL.js.map +1 -0
  31. package/dist/HintState-BxrCAWqq.js.map +1 -1
  32. package/dist/Icon-DH3ev9GK.js.map +1 -1
  33. package/dist/IconButton-DwkpNgn3.js.map +1 -1
  34. package/dist/{IconTooltip-CKJKGHbk.js → IconTooltip-RSxvnBgH.js} +2 -2
  35. package/dist/IconTooltip-RSxvnBgH.js.map +1 -0
  36. package/dist/Indicator-AqxHWPA9.js.map +1 -1
  37. package/dist/InputGroup-BvD9Igmt.js.map +1 -1
  38. package/dist/InputOTP-B2e1nfSO.js.map +1 -1
  39. package/dist/Loader-BpHiL6W-.js.map +1 -1
  40. package/dist/MenuItem-d19Ty84F.js.map +1 -1
  41. package/dist/MenuItemShortcut-D1faeIXp.js.map +1 -1
  42. package/dist/MenuItemText-CRpaPbvg.js.map +1 -1
  43. package/dist/Overlay-CVt011mY.js.map +1 -1
  44. package/dist/{Popover-CY_d3Ggn.js → Popover-CRVD7AtB.js} +20 -19
  45. package/dist/Popover-CRVD7AtB.js.map +1 -0
  46. package/dist/RichButton-DuPTenmS.js.map +1 -1
  47. package/dist/ScrollArea-CuuTeDn3.js.map +1 -1
  48. package/dist/ScrollShadowContainer-DdrnF8qU.js.map +1 -1
  49. package/dist/{SearchSelectTag-DFCX9zT1.js → SearchSelectTag-CA7Ie3Nx.js} +2 -2
  50. package/dist/SearchSelectTag-CA7Ie3Nx.js.map +1 -0
  51. package/dist/{Select-B2WcoFf5.js → Select-MLPTpIl5.js} +24 -23
  52. package/dist/Select-MLPTpIl5.js.map +1 -0
  53. package/dist/{Sheet-zTMuP7C8.js → Sheet-qTIXsqm0.js} +3 -3
  54. package/dist/Sheet-qTIXsqm0.js.map +1 -0
  55. package/dist/Shortcut-D8L15_ed.js.map +1 -1
  56. package/dist/Skeleton-y6I-i9q5.js.map +1 -1
  57. package/dist/TableFillHandle-C_yvCTSl.js +65 -0
  58. package/dist/TableFillHandle-C_yvCTSl.js.map +1 -0
  59. package/dist/Tag-DdHXTyKF.js.map +1 -1
  60. package/dist/Text-DeBE8AKl.js.map +1 -1
  61. package/dist/TextInput-Cj50ImXi.js.map +1 -1
  62. package/dist/{TextOverflowTooltip-DlUgic5y.js → TextOverflowTooltip-B1I5qwAT.js} +2 -2
  63. package/dist/TextOverflowTooltip-B1I5qwAT.js.map +1 -0
  64. package/dist/Toggle-v_HT3Gm2.js.map +1 -1
  65. package/dist/{Tooltip-C4rVuWr4.js → Tooltip-7Duaau0S.js} +3 -3
  66. package/dist/Tooltip-7Duaau0S.js.map +1 -0
  67. package/dist/TriggerButton-CfDObWP9.js.map +1 -1
  68. package/dist/blocks/auth/otp-form.js +1 -1
  69. package/dist/blocks/auth/otp-form.js.map +1 -1
  70. package/dist/circle-BbEzypQJ.js +14 -0
  71. package/dist/circle-BbEzypQJ.js.map +1 -0
  72. package/dist/cn-dsXlqdJg.js.map +1 -1
  73. package/dist/components/alert/Alert.d.ts +4 -0
  74. package/dist/components/alert/Alert.stories.d.ts +1 -0
  75. package/dist/components/alert-dialog.js +3 -3
  76. package/dist/components/alert-dialog.js.map +1 -1
  77. package/dist/components/alert.js +18 -18
  78. package/dist/components/alert.js.map +1 -1
  79. package/dist/components/avatar.js.map +1 -1
  80. package/dist/components/background-pattern.js.map +1 -1
  81. package/dist/components/badge.js.map +1 -1
  82. package/dist/components/banner.js.map +1 -1
  83. package/dist/components/breadcrumb.js.map +1 -1
  84. package/dist/components/button.js.map +1 -1
  85. package/dist/components/calendar.js.map +1 -1
  86. package/dist/components/card.js +1 -1
  87. package/dist/components/card.js.map +1 -1
  88. package/dist/components/carousel.js.map +1 -1
  89. package/dist/components/checkbox.js +1 -1
  90. package/dist/components/collapsible.js.map +1 -1
  91. package/dist/components/color-tile.js.map +1 -1
  92. package/dist/components/command/Command.stories.d.ts +1 -0
  93. package/dist/components/command.js +1 -1
  94. package/dist/components/container.js.map +1 -1
  95. package/dist/components/context-menu/ContextMenu.d.ts +27 -0
  96. package/dist/components/context-menu/ContextMenu.stories.d.ts +10 -0
  97. package/dist/components/context-menu/index.d.ts +1 -0
  98. package/dist/components/context-menu.d.ts +2 -0
  99. package/dist/components/context-menu.js +2675 -0
  100. package/dist/components/context-menu.js.map +1 -0
  101. package/dist/components/counter.js.map +1 -1
  102. package/dist/components/dialog.js +3 -3
  103. package/dist/components/dialog.js.map +1 -1
  104. package/dist/components/divider.js.map +1 -1
  105. package/dist/components/drawer.js +3 -3
  106. package/dist/components/drawer.js.map +1 -1
  107. package/dist/components/dropdown.js +26 -25
  108. package/dist/components/dropdown.js.map +1 -1
  109. package/dist/components/error-state.js.map +1 -1
  110. package/dist/components/field/Field.d.ts +4 -0
  111. package/dist/components/field/Field.stories.d.ts +1 -0
  112. package/dist/components/field.js +1 -1
  113. package/dist/components/file-upload.js +2 -2
  114. package/dist/components/file-upload.js.map +1 -1
  115. package/dist/components/form.js +3 -3
  116. package/dist/components/form.js.map +1 -1
  117. package/dist/components/glass-toolbar.js.map +1 -1
  118. package/dist/components/icon-tooltip.js +1 -1
  119. package/dist/components/image-placeholder.js.map +1 -1
  120. package/dist/components/image-preview.js.map +1 -1
  121. package/dist/components/image-uploader.js.map +1 -1
  122. package/dist/components/input.js.map +1 -1
  123. package/dist/components/label.js +1 -1
  124. package/dist/components/menu-item.js.map +1 -1
  125. package/dist/components/overflow-tooltip.js +1 -1
  126. package/dist/components/page-state.js.map +1 -1
  127. package/dist/components/popover.js +1 -1
  128. package/dist/components/portal-container.js +2 -2
  129. package/dist/components/portal-container.js.map +1 -1
  130. package/dist/components/progress-circle.js.map +1 -1
  131. package/dist/components/progress.js.map +1 -1
  132. package/dist/components/prose.js.map +1 -1
  133. package/dist/components/radio-group.js +63 -72
  134. package/dist/components/radio-group.js.map +1 -1
  135. package/dist/components/resizable.js.map +1 -1
  136. package/dist/components/scheduler.js +1 -1
  137. package/dist/components/scheduler.js.map +1 -1
  138. package/dist/components/search-select.js +4 -4
  139. package/dist/components/search-select.js.map +1 -1
  140. package/dist/components/select.js +1 -1
  141. package/dist/components/sheet.js +1 -1
  142. package/dist/components/sidebar.js +206 -212
  143. package/dist/components/sidebar.js.map +1 -1
  144. package/dist/components/slider.js.map +1 -1
  145. package/dist/components/stepper.js.map +1 -1
  146. package/dist/components/switch/Switch.d.ts +1 -1
  147. package/dist/components/switch.js +5 -2
  148. package/dist/components/switch.js.map +1 -1
  149. package/dist/components/system-state.js +1 -1
  150. package/dist/components/system-state.js.map +1 -1
  151. package/dist/components/table/Table.d.ts +109 -5
  152. package/dist/components/table/Table.stories.d.ts +285 -9
  153. package/dist/components/table/column-reorder/index.d.ts +1 -0
  154. package/dist/components/table/column-reorder/useColumnReorder.d.ts +82 -0
  155. package/dist/components/table/column-reorder.d.ts +2 -0
  156. package/dist/components/table/column-reorder.js +6 -0
  157. package/dist/components/table/column-reorder.js.map +1 -0
  158. package/dist/components/table/column-resize/columnAutoFit.d.ts +21 -0
  159. package/dist/components/table/column-resize/columnResizeSession.d.ts +9 -0
  160. package/dist/components/table/column-resize/index.d.ts +3 -0
  161. package/dist/components/table/column-resize/useColumnResize.d.ts +52 -0
  162. package/dist/components/table/column-resize.d.ts +2 -0
  163. package/dist/components/table/column-resize.js +7 -0
  164. package/dist/components/table/column-resize.js.map +1 -0
  165. package/dist/components/table/editable/TableFillHandle.d.ts +23 -0
  166. package/dist/components/table/editable/cellRange.d.ts +83 -0
  167. package/dist/components/table/editable/editableCell.d.ts +90 -0
  168. package/dist/components/table/editable/index.d.ts +3 -0
  169. package/dist/components/table/editable.d.ts +2 -0
  170. package/dist/components/table/editable.js +12 -0
  171. package/dist/components/table/editable.js.map +1 -0
  172. package/dist/components/table/index.d.ts +8 -1
  173. package/dist/components/table/opaqueCell.d.ts +47 -0
  174. package/dist/components/table/rowTint.d.ts +60 -0
  175. package/dist/components/table/sticky/index.d.ts +1 -0
  176. package/dist/components/table/sticky/stickyCell.d.ts +105 -0
  177. package/dist/components/table/sticky.d.ts +2 -0
  178. package/dist/components/table/sticky.js +22 -0
  179. package/dist/components/table/sticky.js.map +1 -0
  180. package/dist/components/table/tableStoryData.d.ts +84 -0
  181. package/dist/components/table/tableStoryParts.d.ts +72 -0
  182. package/dist/components/table/tree/TableTree.d.ts +106 -0
  183. package/dist/components/table/tree/index.d.ts +3 -0
  184. package/dist/components/table/tree/treeGeometry.d.ts +86 -0
  185. package/dist/components/table/tree/treeModel.d.ts +87 -0
  186. package/dist/components/table/tree.d.ts +2 -0
  187. package/dist/components/table/tree.js +19 -0
  188. package/dist/components/table/tree.js.map +1 -0
  189. package/dist/components/table.js +52 -79
  190. package/dist/components/table.js.map +1 -1
  191. package/dist/components/tabs.js.map +1 -1
  192. package/dist/components/tag-input.js +2 -2
  193. package/dist/components/tag-input.js.map +1 -1
  194. package/dist/components/textarea.js.map +1 -1
  195. package/dist/components/timer.js.map +1 -1
  196. package/dist/components/toast.js.map +1 -1
  197. package/dist/components/toggle-group.js.map +1 -1
  198. package/dist/components/toolbar.js +1 -2
  199. package/dist/components/toolbar.js.map +1 -1
  200. package/dist/components/tooltip.js +1 -1
  201. package/dist/floating-ui.react-dom-BwDfy92G.js +1309 -0
  202. package/dist/floating-ui.react-dom-BwDfy92G.js.map +1 -0
  203. package/dist/formatBytes-C4QXq5lC.js.map +1 -1
  204. package/dist/hooks.js +1 -1
  205. package/dist/index-0ioNhtNM.js.map +1 -1
  206. package/dist/index-1SnkxfPR.js +230 -0
  207. package/dist/index-1SnkxfPR.js.map +1 -0
  208. package/dist/index-437EL2iq.js.map +1 -1
  209. package/dist/index-BDrapWDv.js.map +1 -1
  210. package/dist/index-BGQepRFJ.js.map +1 -1
  211. package/dist/index-BVqs-uqP.js.map +1 -1
  212. package/dist/index-BZPx6jYI.js.map +1 -1
  213. package/dist/index-Bb23HztA.js.map +1 -1
  214. package/dist/index-BjtNfqNq.js +333 -0
  215. package/dist/index-BjtNfqNq.js.map +1 -0
  216. package/dist/index-BpWB3aFK.js.map +1 -1
  217. package/dist/index-ByaXH_ih.js.map +1 -1
  218. package/dist/index-CCKe-Mpx.js.map +1 -1
  219. package/dist/index-CFaU3UXv.js.map +1 -1
  220. package/dist/index-CLuiUUQ8.js.map +1 -1
  221. package/dist/{index-CQD-Njgt.js → index-CMxHunQ4.js} +26 -25
  222. package/dist/index-CMxHunQ4.js.map +1 -0
  223. package/dist/index-CmBeyp2d.js.map +1 -1
  224. package/dist/index-DFZozV_h.js.map +1 -1
  225. package/dist/index-DHsfW5Rj.js.map +1 -1
  226. package/dist/index-DHyZ_0Ut.js.map +1 -1
  227. package/dist/index-DLcqcWxM.js.map +1 -1
  228. package/dist/index-DnnQs07z.js.map +1 -1
  229. package/dist/index-Uiy0Xwy2.js.map +1 -1
  230. package/dist/index-_ITz1IyW.js.map +1 -1
  231. package/dist/index.js.map +1 -1
  232. package/dist/inputBaseStyles-DbzD_jvq.js.map +1 -1
  233. package/dist/lib/utils/dom.d.ts +72 -0
  234. package/dist/lib/utils/styles.d.ts +1 -0
  235. package/dist/lib/utils.js.map +1 -1
  236. package/dist/opaqueCell-SGaiyL54.js +31 -0
  237. package/dist/opaqueCell-SGaiyL54.js.map +1 -0
  238. package/dist/plus-BpxYPnAG.js +15 -0
  239. package/dist/plus-BpxYPnAG.js.map +1 -0
  240. package/dist/styles-scoped.css +6684 -6413
  241. package/dist/styles.css +6423 -6152
  242. package/dist/theme.css +364 -362
  243. package/dist/treeModel-BlPWVj4W.js +319 -0
  244. package/dist/treeModel-BlPWVj4W.js.map +1 -0
  245. package/dist/types/css.d.ts +4 -4
  246. package/dist/useBreakpoints-DHvp74UL.js +31 -0
  247. package/dist/useBreakpoints-DHvp74UL.js.map +1 -0
  248. package/dist/useColumnReorder-BxVZQ_Y5.js +119 -0
  249. package/dist/useColumnReorder-BxVZQ_Y5.js.map +1 -0
  250. package/dist/useColumnResize-wjfEyBBg.js +130 -0
  251. package/dist/useColumnResize-wjfEyBBg.js.map +1 -0
  252. package/dist/useDebounce-BRah78CF.js.map +1 -1
  253. package/dist/useFileUpload-Bnl3P8mP.js.map +1 -1
  254. package/dist/useItemsKeyboardNavigation-CmeOR30y.js.map +1 -1
  255. package/dist/useMergeRefs-qoKniYqT.js.map +1 -1
  256. package/dist/usePortalContainer-BAIp0kSF.js +44 -0
  257. package/dist/usePortalContainer-BAIp0kSF.js.map +1 -0
  258. package/dist/vendors/date-fns/index.d.ts +7 -14
  259. package/dist/vendors/date-fns/locale/en-US/index.d.ts +4 -0
  260. package/dist/vendors/date-fns/locale/ru/index.d.ts +4 -0
  261. package/dist/vendors/react-day-picker/index.d.ts +8 -17
  262. package/dist/vendors/react-hook-form/index.d.ts +8 -15
  263. package/dist/vendors/tanstack/react-table/index.d.ts +12 -0
  264. package/dist/vendors/tanstack/react-table.js.map +1 -1
  265. package/dist/vendors/zod/index.d.ts +8 -9
  266. package/dist/zod-BMNoK3aM.js.map +1 -1
  267. package/package.json +207 -205
  268. package/tailwind.preset.js +452 -448
  269. package/dist/AlertIcon-5B6AgZpe.js.map +0 -1
  270. package/dist/CheckboxField-cX09-eBX.js.map +0 -1
  271. package/dist/Command-ClIm4U7r.js.map +0 -1
  272. package/dist/Dialog-Bs1B5Iu8.js.map +0 -1
  273. package/dist/Field-BiIWtq9o.js +0 -86
  274. package/dist/Field-BiIWtq9o.js.map +0 -1
  275. package/dist/FieldLabel-QJ4rJFOi.js.map +0 -1
  276. package/dist/FormFooterTemplate-DPB6Dkxn.js.map +0 -1
  277. package/dist/FormStack-DO15vBgd.js.map +0 -1
  278. package/dist/IconTooltip-CKJKGHbk.js.map +0 -1
  279. package/dist/Popover-CY_d3Ggn.js.map +0 -1
  280. package/dist/SearchSelectTag-DFCX9zT1.js.map +0 -1
  281. package/dist/Select-B2WcoFf5.js.map +0 -1
  282. package/dist/Sheet-zTMuP7C8.js.map +0 -1
  283. package/dist/TextOverflowTooltip-DlUgic5y.js.map +0 -1
  284. package/dist/Tooltip-C4rVuWr4.js.map +0 -1
  285. package/dist/components/data-table/DataTable.stories.d.ts +0 -8
  286. package/dist/design-tokens.source.json +0 -1
  287. package/dist/index-BzCriPiK.js +0 -671
  288. package/dist/index-BzCriPiK.js.map +0 -1
  289. package/dist/index-CQD-Njgt.js.map +0 -1
  290. package/dist/index-DRo26PBK.js +0 -1525
  291. package/dist/index-DRo26PBK.js.map +0 -1
  292. package/dist/useBreakpoints-D8wKOvil.js +0 -103
  293. package/dist/useBreakpoints-D8wKOvil.js.map +0 -1
  294. package/dist/usePortalContainer-ae6EzS08.js +0 -39
  295. package/dist/usePortalContainer-ae6EzS08.js.map +0 -1
@@ -1,671 +0,0 @@
1
- import * as u from "react";
2
- import { useState as he } from "react";
3
- import { u as me } from "./index-DLcqcWxM.js";
4
- import { P as pe } from "./index-CFaU3UXv.js";
5
- import { u as G } from "./index-0ioNhtNM.js";
6
- import { jsx as ge } from "react/jsx-runtime";
7
- var _ = "focusScope.autoFocusOnMount", U = "focusScope.autoFocusOnUnmount", Z = { bubbles: !1, cancelable: !0 }, ye = "FocusScope", be = u.forwardRef((e, t) => {
8
- const {
9
- loop: r = !1,
10
- trapped: n = !1,
11
- onMountAutoFocus: c,
12
- onUnmountAutoFocus: i,
13
- ...s
14
- } = e, [a, S] = u.useState(null), y = G(c), p = G(i), f = u.useRef(null), v = me(t, (o) => S(o)), h = u.useRef({
15
- paused: !1,
16
- pause() {
17
- this.paused = !0;
18
- },
19
- resume() {
20
- this.paused = !1;
21
- }
22
- }).current;
23
- u.useEffect(() => {
24
- if (n) {
25
- let o = function(m) {
26
- if (h.paused || !a) return;
27
- const g = m.target;
28
- a.contains(g) ? f.current = g : k(f.current, { select: !0 });
29
- }, l = function(m) {
30
- if (h.paused || !a) return;
31
- const g = m.relatedTarget;
32
- g !== null && (a.contains(g) || k(f.current, { select: !0 }));
33
- }, d = function(m) {
34
- if (document.activeElement === document.body)
35
- for (const b of m)
36
- b.removedNodes.length > 0 && k(a);
37
- };
38
- document.addEventListener("focusin", o), document.addEventListener("focusout", l);
39
- const E = new MutationObserver(d);
40
- return a && E.observe(a, { childList: !0, subtree: !0 }), () => {
41
- document.removeEventListener("focusin", o), document.removeEventListener("focusout", l), E.disconnect();
42
- };
43
- }
44
- }, [n, a, h.paused]), u.useEffect(() => {
45
- if (a) {
46
- Q.add(h);
47
- const o = document.activeElement;
48
- if (!a.contains(o)) {
49
- const d = new CustomEvent(_, Z);
50
- a.addEventListener(_, y), a.dispatchEvent(d), d.defaultPrevented || (Ee(Ae(oe(a)), { select: !0 }), document.activeElement === o && k(a));
51
- }
52
- return () => {
53
- a.removeEventListener(_, y), setTimeout(() => {
54
- const d = new CustomEvent(U, Z);
55
- a.addEventListener(U, p), a.dispatchEvent(d), d.defaultPrevented || k(o ?? document.body, { select: !0 }), a.removeEventListener(U, p), Q.remove(h);
56
- }, 0);
57
- };
58
- }
59
- }, [a, y, p, h]);
60
- const w = u.useCallback(
61
- (o) => {
62
- if (!r && !n || h.paused) return;
63
- const l = o.key === "Tab" && !o.altKey && !o.ctrlKey && !o.metaKey, d = document.activeElement;
64
- if (l && d) {
65
- const E = o.currentTarget, [m, g] = Se(E);
66
- m && g ? !o.shiftKey && d === g ? (o.preventDefault(), r && k(m, { select: !0 })) : o.shiftKey && d === m && (o.preventDefault(), r && k(g, { select: !0 })) : d === E && o.preventDefault();
67
- }
68
- },
69
- [r, n, h.paused]
70
- );
71
- return /* @__PURE__ */ ge(pe.div, { tabIndex: -1, ...s, ref: v, onKeyDown: w });
72
- });
73
- be.displayName = ye;
74
- function Ee(e, { select: t = !1 } = {}) {
75
- const r = document.activeElement;
76
- for (const n of e)
77
- if (k(n, { select: t }), document.activeElement !== r) return;
78
- }
79
- function Se(e) {
80
- const t = oe(e), r = q(t, e), n = q(t.reverse(), e);
81
- return [r, n];
82
- }
83
- function oe(e) {
84
- const t = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
85
- acceptNode: (n) => {
86
- const c = n.tagName === "INPUT" && n.type === "hidden";
87
- return n.disabled || n.hidden || c ? NodeFilter.FILTER_SKIP : n.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
88
- }
89
- });
90
- for (; r.nextNode(); ) t.push(r.currentNode);
91
- return t;
92
- }
93
- function q(e, t) {
94
- for (const r of e)
95
- if (!we(r, { upTo: t })) return r;
96
- }
97
- function we(e, { upTo: t }) {
98
- if (getComputedStyle(e).visibility === "hidden") return !0;
99
- for (; e; ) {
100
- if (t !== void 0 && e === t) return !1;
101
- if (getComputedStyle(e).display === "none") return !0;
102
- e = e.parentElement;
103
- }
104
- return !1;
105
- }
106
- function Ce(e) {
107
- return e instanceof HTMLInputElement && "select" in e;
108
- }
109
- function k(e, { select: t = !1 } = {}) {
110
- if (e && e.focus) {
111
- const r = document.activeElement;
112
- e.focus({ preventScroll: !0 }), e !== r && Ce(e) && t && e.select();
113
- }
114
- }
115
- var Q = ke();
116
- function ke() {
117
- let e = [];
118
- return {
119
- add(t) {
120
- const r = e[0];
121
- t !== r && r?.pause(), e = $(e, t), e.unshift(t);
122
- },
123
- remove(t) {
124
- e = $(e, t), e[0]?.resume();
125
- }
126
- };
127
- }
128
- function $(e, t) {
129
- const r = [...e], n = r.indexOf(t);
130
- return n !== -1 && r.splice(n, 1), r;
131
- }
132
- function Ae(e) {
133
- return e.filter((t) => t.tagName !== "A");
134
- }
135
- var j = 0;
136
- function gt() {
137
- u.useEffect(() => {
138
- const e = document.querySelectorAll("[data-radix-focus-guard]");
139
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? J()), document.body.insertAdjacentElement("beforeend", e[1] ?? J()), j++, () => {
140
- j === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), j--;
141
- };
142
- }, []);
143
- }
144
- function J() {
145
- const e = document.createElement("span");
146
- 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;
147
- }
148
- var C = function() {
149
- return C = Object.assign || function(t) {
150
- for (var r, n = 1, c = arguments.length; n < c; n++) {
151
- r = arguments[n];
152
- for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (t[i] = r[i]);
153
- }
154
- return t;
155
- }, C.apply(this, arguments);
156
- };
157
- function ce(e, t) {
158
- var r = {};
159
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
160
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
161
- for (var c = 0, n = Object.getOwnPropertySymbols(e); c < n.length; c++)
162
- t.indexOf(n[c]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[c]) && (r[n[c]] = e[n[c]]);
163
- return r;
164
- }
165
- function Re(e, t, r) {
166
- if (r || arguments.length === 2) for (var n = 0, c = t.length, i; n < c; n++)
167
- (i || !(n in t)) && (i || (i = Array.prototype.slice.call(t, 0, n)), i[n] = t[n]);
168
- return e.concat(i || Array.prototype.slice.call(t));
169
- }
170
- var W = "right-scroll-bar-position", B = "width-before-scroll-bar", Te = "with-scroll-bars-hidden", Pe = "--removed-body-scroll-bar-size";
171
- function K(e, t) {
172
- return typeof e == "function" ? e(t) : e && (e.current = t), e;
173
- }
174
- function Fe(e, t) {
175
- var r = he(function() {
176
- return {
177
- // value
178
- value: e,
179
- // last callback
180
- callback: t,
181
- // "memoized" public interface
182
- facade: {
183
- get current() {
184
- return r.value;
185
- },
186
- set current(n) {
187
- var c = r.value;
188
- c !== n && (r.value = n, r.callback(n, c));
189
- }
190
- }
191
- };
192
- })[0];
193
- return r.callback = t, r.facade;
194
- }
195
- var Me = typeof window < "u" ? u.useLayoutEffect : u.useEffect, ee = /* @__PURE__ */ new WeakMap();
196
- function Ne(e, t) {
197
- var r = Fe(null, function(n) {
198
- return e.forEach(function(c) {
199
- return K(c, n);
200
- });
201
- });
202
- return Me(function() {
203
- var n = ee.get(r);
204
- if (n) {
205
- var c = new Set(n), i = new Set(e), s = r.current;
206
- c.forEach(function(a) {
207
- i.has(a) || K(a, null);
208
- }), i.forEach(function(a) {
209
- c.has(a) || K(a, s);
210
- });
211
- }
212
- ee.set(r, e);
213
- }, [e]), r;
214
- }
215
- function Oe(e) {
216
- return e;
217
- }
218
- function Le(e, t) {
219
- t === void 0 && (t = Oe);
220
- var r = [], n = !1, c = {
221
- read: function() {
222
- if (n)
223
- throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
224
- return r.length ? r[r.length - 1] : e;
225
- },
226
- useMedium: function(i) {
227
- var s = t(i, n);
228
- return r.push(s), function() {
229
- r = r.filter(function(a) {
230
- return a !== s;
231
- });
232
- };
233
- },
234
- assignSyncMedium: function(i) {
235
- for (n = !0; r.length; ) {
236
- var s = r;
237
- r = [], s.forEach(i);
238
- }
239
- r = {
240
- push: function(a) {
241
- return i(a);
242
- },
243
- filter: function() {
244
- return r;
245
- }
246
- };
247
- },
248
- assignMedium: function(i) {
249
- n = !0;
250
- var s = [];
251
- if (r.length) {
252
- var a = r;
253
- r = [], a.forEach(i), s = r;
254
- }
255
- var S = function() {
256
- var p = s;
257
- s = [], p.forEach(i);
258
- }, y = function() {
259
- return Promise.resolve().then(S);
260
- };
261
- y(), r = {
262
- push: function(p) {
263
- s.push(p), y();
264
- },
265
- filter: function(p) {
266
- return s = s.filter(p), r;
267
- }
268
- };
269
- }
270
- };
271
- return c;
272
- }
273
- function Ie(e) {
274
- e === void 0 && (e = {});
275
- var t = Le(null);
276
- return t.options = C({ async: !0, ssr: !1 }, e), t;
277
- }
278
- var ue = function(e) {
279
- var t = e.sideCar, r = ce(e, ["sideCar"]);
280
- if (!t)
281
- throw new Error("Sidecar: please provide `sideCar` property to import the right car");
282
- var n = t.read();
283
- if (!n)
284
- throw new Error("Sidecar medium not found");
285
- return u.createElement(n, C({}, r));
286
- };
287
- ue.isSideCarExport = !0;
288
- function xe(e, t) {
289
- return e.useMedium(t), ue;
290
- }
291
- var ie = Ie(), H = function() {
292
- }, D = u.forwardRef(function(e, t) {
293
- var r = u.useRef(null), n = u.useState({
294
- onScrollCapture: H,
295
- onWheelCapture: H,
296
- onTouchMoveCapture: H
297
- }), c = n[0], i = n[1], s = e.forwardProps, a = e.children, S = e.className, y = e.removeScrollBar, p = e.enabled, f = e.shards, v = e.sideCar, h = e.noIsolation, w = e.inert, o = e.allowPinchZoom, l = e.as, d = l === void 0 ? "div" : l, E = e.gapMode, m = ce(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), g = v, b = Ne([r, t]), A = C(C({}, m), c);
298
- return u.createElement(
299
- u.Fragment,
300
- null,
301
- p && u.createElement(g, { sideCar: ie, removeScrollBar: y, shards: f, noIsolation: h, inert: w, setCallbacks: i, allowPinchZoom: !!o, lockRef: r, gapMode: E }),
302
- s ? u.cloneElement(u.Children.only(a), C(C({}, A), { ref: b })) : u.createElement(d, C({}, A, { className: S, ref: b }), a)
303
- );
304
- });
305
- D.defaultProps = {
306
- enabled: !0,
307
- removeScrollBar: !0,
308
- inert: !1
309
- };
310
- D.classNames = {
311
- fullWidth: B,
312
- zeroRight: W
313
- };
314
- var We = function() {
315
- if (typeof __webpack_nonce__ < "u")
316
- return __webpack_nonce__;
317
- };
318
- function Be() {
319
- if (!document)
320
- return null;
321
- var e = document.createElement("style");
322
- e.type = "text/css";
323
- var t = We();
324
- return t && e.setAttribute("nonce", t), e;
325
- }
326
- function De(e, t) {
327
- e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
328
- }
329
- function _e(e) {
330
- var t = document.head || document.getElementsByTagName("head")[0];
331
- t.appendChild(e);
332
- }
333
- var Ue = function() {
334
- var e = 0, t = null;
335
- return {
336
- add: function(r) {
337
- e == 0 && (t = Be()) && (De(t, r), _e(t)), e++;
338
- },
339
- remove: function() {
340
- e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
341
- }
342
- };
343
- }, je = function() {
344
- var e = Ue();
345
- return function(t, r) {
346
- u.useEffect(function() {
347
- return e.add(t), function() {
348
- e.remove();
349
- };
350
- }, [t && r]);
351
- };
352
- }, le = function() {
353
- var e = je(), t = function(r) {
354
- var n = r.styles, c = r.dynamic;
355
- return e(n, c), null;
356
- };
357
- return t;
358
- }, Ke = {
359
- left: 0,
360
- top: 0,
361
- right: 0,
362
- gap: 0
363
- }, V = function(e) {
364
- return parseInt(e || "", 10) || 0;
365
- }, He = function(e) {
366
- var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], n = t[e === "padding" ? "paddingTop" : "marginTop"], c = t[e === "padding" ? "paddingRight" : "marginRight"];
367
- return [V(r), V(n), V(c)];
368
- }, Ve = function(e) {
369
- if (e === void 0 && (e = "margin"), typeof window > "u")
370
- return Ke;
371
- var t = He(e), r = document.documentElement.clientWidth, n = window.innerWidth;
372
- return {
373
- left: t[0],
374
- top: t[1],
375
- right: t[2],
376
- gap: Math.max(0, n - r + t[2] - t[0])
377
- };
378
- }, Xe = le(), F = "data-scroll-locked", Ye = function(e, t, r, n) {
379
- var c = e.left, i = e.top, s = e.right, a = e.gap;
380
- return r === void 0 && (r = "margin"), `
381
- .`.concat(Te, ` {
382
- overflow: hidden `).concat(n, `;
383
- padding-right: `).concat(a, "px ").concat(n, `;
384
- }
385
- body[`).concat(F, `] {
386
- overflow: hidden `).concat(n, `;
387
- overscroll-behavior: contain;
388
- `).concat([
389
- t && "position: relative ".concat(n, ";"),
390
- r === "margin" && `
391
- padding-left: `.concat(c, `px;
392
- padding-top: `).concat(i, `px;
393
- padding-right: `).concat(s, `px;
394
- margin-left:0;
395
- margin-top:0;
396
- margin-right: `).concat(a, "px ").concat(n, `;
397
- `),
398
- r === "padding" && "padding-right: ".concat(a, "px ").concat(n, ";")
399
- ].filter(Boolean).join(""), `
400
- }
401
-
402
- .`).concat(W, ` {
403
- right: `).concat(a, "px ").concat(n, `;
404
- }
405
-
406
- .`).concat(B, ` {
407
- margin-right: `).concat(a, "px ").concat(n, `;
408
- }
409
-
410
- .`).concat(W, " .").concat(W, ` {
411
- right: 0 `).concat(n, `;
412
- }
413
-
414
- .`).concat(B, " .").concat(B, ` {
415
- margin-right: 0 `).concat(n, `;
416
- }
417
-
418
- body[`).concat(F, `] {
419
- `).concat(Pe, ": ").concat(a, `px;
420
- }
421
- `);
422
- }, te = function() {
423
- var e = parseInt(document.body.getAttribute(F) || "0", 10);
424
- return isFinite(e) ? e : 0;
425
- }, ze = function() {
426
- u.useEffect(function() {
427
- return document.body.setAttribute(F, (te() + 1).toString()), function() {
428
- var e = te() - 1;
429
- e <= 0 ? document.body.removeAttribute(F) : document.body.setAttribute(F, e.toString());
430
- };
431
- }, []);
432
- }, Ge = function(e) {
433
- var t = e.noRelative, r = e.noImportant, n = e.gapMode, c = n === void 0 ? "margin" : n;
434
- ze();
435
- var i = u.useMemo(function() {
436
- return Ve(c);
437
- }, [c]);
438
- return u.createElement(Xe, { styles: Ye(i, !t, c, r ? "" : "!important") });
439
- }, Y = !1;
440
- if (typeof window < "u")
441
- try {
442
- var O = Object.defineProperty({}, "passive", {
443
- get: function() {
444
- return Y = !0, !0;
445
- }
446
- });
447
- window.addEventListener("test", O, O), window.removeEventListener("test", O, O);
448
- } catch {
449
- Y = !1;
450
- }
451
- var R = Y ? { passive: !1 } : !1, Ze = function(e) {
452
- return e.tagName === "TEXTAREA";
453
- }, se = function(e, t) {
454
- if (!(e instanceof Element))
455
- return !1;
456
- var r = window.getComputedStyle(e);
457
- return (
458
- // not-not-scrollable
459
- r[t] !== "hidden" && // contains scroll inside self
460
- !(r.overflowY === r.overflowX && !Ze(e) && r[t] === "visible")
461
- );
462
- }, qe = function(e) {
463
- return se(e, "overflowY");
464
- }, Qe = function(e) {
465
- return se(e, "overflowX");
466
- }, re = function(e, t) {
467
- var r = t.ownerDocument, n = t;
468
- do {
469
- typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host);
470
- var c = fe(e, n);
471
- if (c) {
472
- var i = de(e, n), s = i[1], a = i[2];
473
- if (s > a)
474
- return !0;
475
- }
476
- n = n.parentNode;
477
- } while (n && n !== r.body);
478
- return !1;
479
- }, $e = function(e) {
480
- var t = e.scrollTop, r = e.scrollHeight, n = e.clientHeight;
481
- return [
482
- t,
483
- r,
484
- n
485
- ];
486
- }, Je = function(e) {
487
- var t = e.scrollLeft, r = e.scrollWidth, n = e.clientWidth;
488
- return [
489
- t,
490
- r,
491
- n
492
- ];
493
- }, fe = function(e, t) {
494
- return e === "v" ? qe(t) : Qe(t);
495
- }, de = function(e, t) {
496
- return e === "v" ? $e(t) : Je(t);
497
- }, et = function(e, t) {
498
- return e === "h" && t === "rtl" ? -1 : 1;
499
- }, tt = function(e, t, r, n, c) {
500
- var i = et(e, window.getComputedStyle(t).direction), s = i * n, a = r.target, S = t.contains(a), y = !1, p = s > 0, f = 0, v = 0;
501
- do {
502
- var h = de(e, a), w = h[0], o = h[1], l = h[2], d = o - l - i * w;
503
- (w || d) && fe(e, a) && (f += d, v += w), a instanceof ShadowRoot ? a = a.host : a = a.parentNode;
504
- } while (
505
- // portaled content
506
- !S && a !== document.body || // self content
507
- S && (t.contains(a) || t === a)
508
- );
509
- return (p && Math.abs(f) < 1 || !p && Math.abs(v) < 1) && (y = !0), y;
510
- }, L = function(e) {
511
- return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
512
- }, ne = function(e) {
513
- return [e.deltaX, e.deltaY];
514
- }, ae = function(e) {
515
- return e && "current" in e ? e.current : e;
516
- }, rt = function(e, t) {
517
- return e[0] === t[0] && e[1] === t[1];
518
- }, nt = function(e) {
519
- return `
520
- .block-interactivity-`.concat(e, ` {pointer-events: none;}
521
- .allow-interactivity-`).concat(e, ` {pointer-events: all;}
522
- `);
523
- }, at = 0, T = [];
524
- function ot(e) {
525
- var t = u.useRef([]), r = u.useRef([0, 0]), n = u.useRef(), c = u.useState(at++)[0], i = u.useState(le)[0], s = u.useRef(e);
526
- u.useEffect(function() {
527
- s.current = e;
528
- }, [e]), u.useEffect(function() {
529
- if (e.inert) {
530
- document.body.classList.add("block-interactivity-".concat(c));
531
- var o = Re([e.lockRef.current], (e.shards || []).map(ae), !0).filter(Boolean);
532
- return o.forEach(function(l) {
533
- return l.classList.add("allow-interactivity-".concat(c));
534
- }), function() {
535
- document.body.classList.remove("block-interactivity-".concat(c)), o.forEach(function(l) {
536
- return l.classList.remove("allow-interactivity-".concat(c));
537
- });
538
- };
539
- }
540
- }, [e.inert, e.lockRef.current, e.shards]);
541
- var a = u.useCallback(function(o, l) {
542
- if ("touches" in o && o.touches.length === 2 || o.type === "wheel" && o.ctrlKey)
543
- return !s.current.allowPinchZoom;
544
- var d = L(o), E = r.current, m = "deltaX" in o ? o.deltaX : E[0] - d[0], g = "deltaY" in o ? o.deltaY : E[1] - d[1], b, A = o.target, M = Math.abs(m) > Math.abs(g) ? "h" : "v";
545
- if ("touches" in o && M === "h" && A.type === "range")
546
- return !1;
547
- var N = re(M, A);
548
- if (!N)
549
- return !0;
550
- if (N ? b = M : (b = M === "v" ? "h" : "v", N = re(M, A)), !N)
551
- return !1;
552
- if (!n.current && "changedTouches" in o && (m || g) && (n.current = b), !b)
553
- return !0;
554
- var z = n.current || b;
555
- return tt(z, l, o, z === "h" ? m : g);
556
- }, []), S = u.useCallback(function(o) {
557
- var l = o;
558
- if (!(!T.length || T[T.length - 1] !== i)) {
559
- var d = "deltaY" in l ? ne(l) : L(l), E = t.current.filter(function(b) {
560
- return b.name === l.type && (b.target === l.target || l.target === b.shadowParent) && rt(b.delta, d);
561
- })[0];
562
- if (E && E.should) {
563
- l.cancelable && l.preventDefault();
564
- return;
565
- }
566
- if (!E) {
567
- var m = (s.current.shards || []).map(ae).filter(Boolean).filter(function(b) {
568
- return b.contains(l.target);
569
- }), g = m.length > 0 ? a(l, m[0]) : !s.current.noIsolation;
570
- g && l.cancelable && l.preventDefault();
571
- }
572
- }
573
- }, []), y = u.useCallback(function(o, l, d, E) {
574
- var m = { name: o, delta: l, target: d, should: E, shadowParent: ct(d) };
575
- t.current.push(m), setTimeout(function() {
576
- t.current = t.current.filter(function(g) {
577
- return g !== m;
578
- });
579
- }, 1);
580
- }, []), p = u.useCallback(function(o) {
581
- r.current = L(o), n.current = void 0;
582
- }, []), f = u.useCallback(function(o) {
583
- y(o.type, ne(o), o.target, a(o, e.lockRef.current));
584
- }, []), v = u.useCallback(function(o) {
585
- y(o.type, L(o), o.target, a(o, e.lockRef.current));
586
- }, []);
587
- u.useEffect(function() {
588
- return T.push(i), e.setCallbacks({
589
- onScrollCapture: f,
590
- onWheelCapture: f,
591
- onTouchMoveCapture: v
592
- }), document.addEventListener("wheel", S, R), document.addEventListener("touchmove", S, R), document.addEventListener("touchstart", p, R), function() {
593
- T = T.filter(function(o) {
594
- return o !== i;
595
- }), document.removeEventListener("wheel", S, R), document.removeEventListener("touchmove", S, R), document.removeEventListener("touchstart", p, R);
596
- };
597
- }, []);
598
- var h = e.removeScrollBar, w = e.inert;
599
- return u.createElement(
600
- u.Fragment,
601
- null,
602
- w ? u.createElement(i, { styles: nt(c) }) : null,
603
- h ? u.createElement(Ge, { gapMode: e.gapMode }) : null
604
- );
605
- }
606
- function ct(e) {
607
- for (var t = null; e !== null; )
608
- e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
609
- return t;
610
- }
611
- const ut = xe(ie, ot);
612
- var it = u.forwardRef(function(e, t) {
613
- return u.createElement(D, C({}, e, { ref: t, sideCar: ut }));
614
- });
615
- it.classNames = D.classNames;
616
- var lt = function(e) {
617
- if (typeof document > "u")
618
- return null;
619
- var t = Array.isArray(e) ? e[0] : e;
620
- return t.ownerDocument.body;
621
- }, P = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), x = {}, X = 0, ve = function(e) {
622
- return e && (e.host || ve(e.parentNode));
623
- }, st = function(e, t) {
624
- return t.map(function(r) {
625
- if (e.contains(r))
626
- return r;
627
- var n = ve(r);
628
- return n && e.contains(n) ? n : (console.error("aria-hidden", r, "in not contained inside", e, ". Doing nothing"), null);
629
- }).filter(function(r) {
630
- return !!r;
631
- });
632
- }, ft = function(e, t, r, n) {
633
- var c = st(t, Array.isArray(e) ? e : [e]);
634
- x[r] || (x[r] = /* @__PURE__ */ new WeakMap());
635
- var i = x[r], s = [], a = /* @__PURE__ */ new Set(), S = new Set(c), y = function(f) {
636
- !f || a.has(f) || (a.add(f), y(f.parentNode));
637
- };
638
- c.forEach(y);
639
- var p = function(f) {
640
- !f || S.has(f) || Array.prototype.forEach.call(f.children, function(v) {
641
- if (a.has(v))
642
- p(v);
643
- else
644
- try {
645
- var h = v.getAttribute(n), w = h !== null && h !== "false", o = (P.get(v) || 0) + 1, l = (i.get(v) || 0) + 1;
646
- P.set(v, o), i.set(v, l), s.push(v), o === 1 && w && I.set(v, !0), l === 1 && v.setAttribute(r, "true"), w || v.setAttribute(n, "true");
647
- } catch (d) {
648
- console.error("aria-hidden: cannot operate on ", v, d);
649
- }
650
- });
651
- };
652
- return p(t), a.clear(), X++, function() {
653
- s.forEach(function(f) {
654
- var v = P.get(f) - 1, h = i.get(f) - 1;
655
- P.set(f, v), i.set(f, h), v || (I.has(f) || f.removeAttribute(n), I.delete(f)), h || f.removeAttribute(r);
656
- }), X--, X || (P = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), x = {});
657
- };
658
- }, yt = function(e, t, r) {
659
- r === void 0 && (r = "data-aria-hidden");
660
- var n = Array.from(Array.isArray(e) ? e : [e]), c = lt(e);
661
- return c ? (n.push.apply(n, Array.from(c.querySelectorAll("[aria-live]"))), ft(n, c, r, "aria-hidden")) : function() {
662
- return null;
663
- };
664
- };
665
- export {
666
- be as F,
667
- it as R,
668
- yt as h,
669
- gt as u
670
- };
671
- //# sourceMappingURL=index-BzCriPiK.js.map