@bigbinary/neeto-atoms 1.0.5 → 1.0.7

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 (503) hide show
  1. package/dist/DataTable-Y4POx0WN.js +3737 -0
  2. package/dist/DataTable-Y4POx0WN.js.map +1 -0
  3. package/dist/button-COIbN8dg.js +40 -0
  4. package/dist/button-COIbN8dg.js.map +1 -0
  5. package/dist/check-Cpkv29p1.js +15 -0
  6. package/dist/check-Cpkv29p1.js.map +1 -0
  7. package/dist/chevron-down-BNi0ntys.js +15 -0
  8. package/dist/chevron-down-BNi0ntys.js.map +1 -0
  9. package/dist/chevron-left-BDoT8E2-.js +15 -0
  10. package/dist/chevron-left-BDoT8E2-.js.map +1 -0
  11. package/dist/chevron-right-DQnrO-ek.js +15 -0
  12. package/dist/chevron-right-DQnrO-ek.js.map +1 -0
  13. package/dist/chevron-up-Bf2G3AAU.js +15 -0
  14. package/dist/chevron-up-Bf2G3AAU.js.map +1 -0
  15. package/dist/cjs/DataTable-DJw2SZ7b.js +3764 -0
  16. package/dist/cjs/DataTable-DJw2SZ7b.js.map +1 -0
  17. package/dist/cjs/button-B8XGl69v.js +63 -0
  18. package/dist/cjs/button-B8XGl69v.js.map +1 -0
  19. package/dist/cjs/check-BQgcDXys.js +17 -0
  20. package/dist/cjs/check-BQgcDXys.js.map +1 -0
  21. package/dist/cjs/chevron-down-CPsWSS51.js +17 -0
  22. package/dist/cjs/chevron-down-CPsWSS51.js.map +1 -0
  23. package/dist/cjs/chevron-left-BldoOh5p.js +17 -0
  24. package/dist/cjs/chevron-left-BldoOh5p.js.map +1 -0
  25. package/dist/cjs/chevron-right-0jNdwX2Q.js +17 -0
  26. package/dist/cjs/chevron-right-0jNdwX2Q.js.map +1 -0
  27. package/dist/cjs/chevron-up-BpwpBnZU.js +17 -0
  28. package/dist/cjs/chevron-up-BpwpBnZU.js.map +1 -0
  29. package/dist/cjs/components/DataTable.js +53 -0
  30. package/dist/cjs/components/DataTable.js.map +1 -0
  31. package/dist/cjs/createLucideIcon-D0tRgV6l.js +149 -0
  32. package/dist/cjs/createLucideIcon-D0tRgV6l.js.map +1 -0
  33. package/dist/cjs/dialog-DzNWLbJ6.js +50 -0
  34. package/dist/cjs/dialog-DzNWLbJ6.js.map +1 -0
  35. package/dist/cjs/ellipsis-4aubOI2n.js +21 -0
  36. package/dist/cjs/ellipsis-4aubOI2n.js.map +1 -0
  37. package/dist/cjs/floating-ui.react-dom-B4Aw6O7R.js +2293 -0
  38. package/dist/cjs/floating-ui.react-dom-B4Aw6O7R.js.map +1 -0
  39. package/dist/cjs/index-9jC1advf.js +34 -0
  40. package/dist/cjs/index-9jC1advf.js.map +1 -0
  41. package/dist/cjs/index-BZhTddX0.js +47 -0
  42. package/dist/cjs/index-BZhTddX0.js.map +1 -0
  43. package/dist/cjs/index-Bf0WsHta.js +63 -0
  44. package/dist/cjs/index-Bf0WsHta.js.map +1 -0
  45. package/dist/cjs/index-BqCr1H3u.js +173 -0
  46. package/dist/cjs/index-BqCr1H3u.js.map +1 -0
  47. package/dist/cjs/index-BrpkRQoS.js +99 -0
  48. package/dist/cjs/index-BrpkRQoS.js.map +1 -0
  49. package/dist/cjs/index-Bvu9MiFi.js +247 -0
  50. package/dist/cjs/index-Bvu9MiFi.js.map +1 -0
  51. package/dist/cjs/index-BwAq9ba8.js +38 -0
  52. package/dist/cjs/index-BwAq9ba8.js.map +1 -0
  53. package/dist/cjs/index-C9ICrOhM.js +328 -0
  54. package/dist/cjs/index-C9ICrOhM.js.map +1 -0
  55. package/dist/cjs/index-CB9xFokC.js +59 -0
  56. package/dist/cjs/index-CB9xFokC.js.map +1 -0
  57. package/dist/cjs/index-CCdG4z4E.js +30 -0
  58. package/dist/cjs/index-CCdG4z4E.js.map +1 -0
  59. package/dist/cjs/index-CF951Pw9.js +38 -0
  60. package/dist/cjs/index-CF951Pw9.js.map +1 -0
  61. package/dist/cjs/index-CGUGhyIp.js +103 -0
  62. package/dist/cjs/index-CGUGhyIp.js.map +1 -0
  63. package/dist/cjs/index-CGet1HH4.js +953 -0
  64. package/dist/cjs/index-CGet1HH4.js.map +1 -0
  65. package/dist/cjs/index-COPkC3I5.js +14 -0
  66. package/dist/cjs/index-COPkC3I5.js.map +1 -0
  67. package/dist/cjs/index-Ch55j1or.js +176 -0
  68. package/dist/cjs/index-Ch55j1or.js.map +1 -0
  69. package/dist/cjs/index-ChSOMM8b.js +1153 -0
  70. package/dist/cjs/index-ChSOMM8b.js.map +1 -0
  71. package/dist/cjs/index-CyrAgb4H.js +93 -0
  72. package/dist/cjs/index-CyrAgb4H.js.map +1 -0
  73. package/dist/cjs/index-D-iDn9RI.js +63 -0
  74. package/dist/cjs/index-D-iDn9RI.js.map +1 -0
  75. package/dist/cjs/index-DAds6mf_.js +433 -0
  76. package/dist/cjs/index-DAds6mf_.js.map +1 -0
  77. package/dist/cjs/index-DMbj7vXd.js +152 -0
  78. package/dist/cjs/index-DMbj7vXd.js.map +1 -0
  79. package/dist/cjs/index-DR7GJU4J.js +248 -0
  80. package/dist/cjs/index-DR7GJU4J.js.map +1 -0
  81. package/dist/cjs/index-DcCSSgb7.js +153 -0
  82. package/dist/cjs/index-DcCSSgb7.js.map +1 -0
  83. package/dist/cjs/index-Df-Ffa3s.js +43 -0
  84. package/dist/cjs/index-Df-Ffa3s.js.map +1 -0
  85. package/dist/cjs/index-DnKJmaCq.js +8 -0
  86. package/dist/cjs/index-DnKJmaCq.js.map +1 -0
  87. package/dist/cjs/index-DuNgWCXZ.js +113 -0
  88. package/dist/cjs/index-DuNgWCXZ.js.map +1 -0
  89. package/dist/cjs/index-EyWRfsCG.js +9 -0
  90. package/dist/cjs/index-EyWRfsCG.js.map +1 -0
  91. package/dist/cjs/index-lWVw05cs.js +35 -0
  92. package/dist/cjs/index-lWVw05cs.js.map +1 -0
  93. package/dist/cjs/index.js +53 -66849
  94. package/dist/cjs/index.js.map +1 -1
  95. package/dist/cjs/input-CgKPISj_.js +11 -0
  96. package/dist/cjs/input-CgKPISj_.js.map +1 -0
  97. package/dist/cjs/input-group-DoK0-4fL.js +66 -0
  98. package/dist/cjs/input-group-DoK0-4fL.js.map +1 -0
  99. package/dist/cjs/label-Bdc9ytTI.js +52 -0
  100. package/dist/cjs/label-Bdc9ytTI.js.map +1 -0
  101. package/dist/cjs/loader-circle-Bw7zP2Gn.js +17 -0
  102. package/dist/cjs/loader-circle-Bw7zP2Gn.js.map +1 -0
  103. package/dist/cjs/primitives/Accordion.js +340 -0
  104. package/dist/cjs/primitives/Accordion.js.map +1 -0
  105. package/dist/cjs/primitives/Alert.js +40 -0
  106. package/dist/cjs/primitives/Alert.js.map +1 -0
  107. package/dist/cjs/primitives/AlertDialog.js +256 -0
  108. package/dist/cjs/primitives/AlertDialog.js.map +1 -0
  109. package/dist/cjs/primitives/AspectRatio.js +75 -0
  110. package/dist/cjs/primitives/AspectRatio.js.map +1 -0
  111. package/dist/cjs/primitives/Avatar.js +189 -0
  112. package/dist/cjs/primitives/Avatar.js.map +1 -0
  113. package/dist/cjs/primitives/Badge.js +34 -0
  114. package/dist/cjs/primitives/Badge.js.map +1 -0
  115. package/dist/cjs/primitives/Breadcrumb.js +50 -0
  116. package/dist/cjs/primitives/Breadcrumb.js.map +1 -0
  117. package/dist/cjs/primitives/Button.js +16 -0
  118. package/dist/cjs/primitives/Button.js.map +1 -0
  119. package/dist/cjs/primitives/ButtonGroup.js +43 -0
  120. package/dist/cjs/primitives/ButtonGroup.js.map +1 -0
  121. package/dist/cjs/primitives/Calendar.js +8030 -0
  122. package/dist/cjs/primitives/Calendar.js.map +1 -0
  123. package/dist/cjs/primitives/Card.js +43 -0
  124. package/dist/cjs/primitives/Card.js.map +1 -0
  125. package/dist/cjs/primitives/Carousel.js +1867 -0
  126. package/dist/cjs/primitives/Carousel.js.map +1 -0
  127. package/dist/cjs/primitives/Chart.js +18787 -0
  128. package/dist/cjs/primitives/Chart.js.map +1 -0
  129. package/dist/cjs/primitives/Checkbox.js +304 -0
  130. package/dist/cjs/primitives/Checkbox.js.map +1 -0
  131. package/dist/cjs/primitives/Collapsible.js +33 -0
  132. package/dist/cjs/primitives/Collapsible.js.map +1 -0
  133. package/dist/cjs/primitives/Combobox.js +10288 -0
  134. package/dist/cjs/primitives/Combobox.js.map +1 -0
  135. package/dist/cjs/primitives/Command.js +248 -0
  136. package/dist/cjs/primitives/Command.js.map +1 -0
  137. package/dist/cjs/primitives/ContextMenu.js +404 -0
  138. package/dist/cjs/primitives/ContextMenu.js.map +1 -0
  139. package/dist/cjs/primitives/Dialog.js +48 -0
  140. package/dist/cjs/primitives/Dialog.js.map +1 -0
  141. package/dist/cjs/primitives/Drawer.js +1715 -0
  142. package/dist/cjs/primitives/Drawer.js.map +1 -0
  143. package/dist/cjs/primitives/DropdownMenu.js +383 -0
  144. package/dist/cjs/primitives/DropdownMenu.js.map +1 -0
  145. package/dist/cjs/primitives/Empty.js +50 -0
  146. package/dist/cjs/primitives/Empty.js.map +1 -0
  147. package/dist/cjs/primitives/Field.js +95 -0
  148. package/dist/cjs/primitives/Field.js.map +1 -0
  149. package/dist/cjs/primitives/HoverCard.js +291 -0
  150. package/dist/cjs/primitives/HoverCard.js.map +1 -0
  151. package/dist/cjs/primitives/Input.js +10 -0
  152. package/dist/cjs/primitives/Input.js.map +1 -0
  153. package/dist/cjs/primitives/InputGroup.js +27 -0
  154. package/dist/cjs/primitives/InputGroup.js.map +1 -0
  155. package/dist/cjs/primitives/InputOTP.js +84 -0
  156. package/dist/cjs/primitives/InputOTP.js.map +1 -0
  157. package/dist/cjs/primitives/Item.js +96 -0
  158. package/dist/cjs/primitives/Item.js.map +1 -0
  159. package/dist/cjs/primitives/Kbd.js +18 -0
  160. package/dist/cjs/primitives/Kbd.js.map +1 -0
  161. package/dist/cjs/primitives/Label.js +14 -0
  162. package/dist/cjs/primitives/Label.js.map +1 -0
  163. package/dist/cjs/primitives/Menubar.js +547 -0
  164. package/dist/cjs/primitives/Menubar.js.map +1 -0
  165. package/dist/cjs/primitives/NativeSelect.js +26 -0
  166. package/dist/cjs/primitives/NativeSelect.js.map +1 -0
  167. package/dist/cjs/primitives/NavigationMenu.js +856 -0
  168. package/dist/cjs/primitives/NavigationMenu.js.map +1 -0
  169. package/dist/cjs/primitives/Pagination.js +52 -0
  170. package/dist/cjs/primitives/Pagination.js.map +1 -0
  171. package/dist/cjs/primitives/Popover.js +444 -0
  172. package/dist/cjs/primitives/Popover.js.map +1 -0
  173. package/dist/cjs/primitives/Progress.js +125 -0
  174. package/dist/cjs/primitives/Progress.js.map +1 -0
  175. package/dist/cjs/primitives/RadioGroup.js +322 -0
  176. package/dist/cjs/primitives/RadioGroup.js.map +1 -0
  177. package/dist/cjs/primitives/Resizable.js +2051 -0
  178. package/dist/cjs/primitives/Resizable.js.map +1 -0
  179. package/dist/cjs/primitives/ScrollArea.js +754 -0
  180. package/dist/cjs/primitives/ScrollArea.js.map +1 -0
  181. package/dist/cjs/primitives/Select.js +1318 -0
  182. package/dist/cjs/primitives/Select.js.map +1 -0
  183. package/dist/cjs/primitives/Separator.js +14 -0
  184. package/dist/cjs/primitives/Separator.js.map +1 -0
  185. package/dist/cjs/primitives/Sheet.js +44 -0
  186. package/dist/cjs/primitives/Sheet.js.map +1 -0
  187. package/dist/cjs/primitives/Sidebar.js +310 -0
  188. package/dist/cjs/primitives/Sidebar.js.map +1 -0
  189. package/dist/cjs/primitives/Skeleton.js +10 -0
  190. package/dist/cjs/primitives/Skeleton.js.map +1 -0
  191. package/dist/cjs/primitives/Slider.js +591 -0
  192. package/dist/cjs/primitives/Slider.js.map +1 -0
  193. package/dist/cjs/primitives/Sonner.js +1260 -0
  194. package/dist/cjs/primitives/Sonner.js.map +1 -0
  195. package/dist/cjs/primitives/Spinner.js +16 -0
  196. package/dist/cjs/primitives/Spinner.js.map +1 -0
  197. package/dist/cjs/primitives/Switch.js +184 -0
  198. package/dist/cjs/primitives/Switch.js.map +1 -0
  199. package/dist/cjs/primitives/Table.js +45 -0
  200. package/dist/cjs/primitives/Table.js.map +1 -0
  201. package/dist/cjs/primitives/Tabs.js +250 -0
  202. package/dist/cjs/primitives/Tabs.js.map +1 -0
  203. package/dist/cjs/primitives/Textarea.js +10 -0
  204. package/dist/cjs/primitives/Textarea.js.map +1 -0
  205. package/dist/cjs/primitives/Toggle.js +19 -0
  206. package/dist/cjs/primitives/Toggle.js.map +1 -0
  207. package/dist/cjs/primitives/ToggleGroup.js +221 -0
  208. package/dist/cjs/primitives/ToggleGroup.js.map +1 -0
  209. package/dist/cjs/primitives/Tooltip.js +33 -0
  210. package/dist/cjs/primitives/Tooltip.js.map +1 -0
  211. package/dist/cjs/primitives/Typography.js +105 -0
  212. package/dist/cjs/primitives/Typography.js.map +1 -0
  213. package/dist/cjs/primitives/index.js +422 -0
  214. package/dist/cjs/primitives/index.js.map +1 -0
  215. package/dist/cjs/reselect-CeyIIDM-.js +457 -0
  216. package/dist/cjs/reselect-CeyIIDM-.js.map +1 -0
  217. package/dist/cjs/separator-CPy2gyg1.js +58 -0
  218. package/dist/cjs/separator-CPy2gyg1.js.map +1 -0
  219. package/dist/cjs/sheet-nHSYZxAA.js +48 -0
  220. package/dist/cjs/sheet-nHSYZxAA.js.map +1 -0
  221. package/dist/cjs/skeleton-DffZ8bV7.js +11 -0
  222. package/dist/cjs/skeleton-DffZ8bV7.js.map +1 -0
  223. package/dist/cjs/textarea-CZSSY75H.js +11 -0
  224. package/dist/cjs/textarea-CZSSY75H.js.map +1 -0
  225. package/dist/cjs/toggle-CaqzT8dI.js +84 -0
  226. package/dist/cjs/toggle-CaqzT8dI.js.map +1 -0
  227. package/dist/cjs/tooltip-CRkOMh1b.js +542 -0
  228. package/dist/cjs/tooltip-CRkOMh1b.js.map +1 -0
  229. package/dist/cjs/use-mobile-B-UYxtqX.js +41 -0
  230. package/dist/cjs/use-mobile-B-UYxtqX.js.map +1 -0
  231. package/dist/cjs/utils-CTr7wn5d.js +3210 -0
  232. package/dist/cjs/utils-CTr7wn5d.js.map +1 -0
  233. package/dist/cjs/x-Brw3FJst.js +20 -0
  234. package/dist/cjs/x-Brw3FJst.js.map +1 -0
  235. package/dist/components/DataTable/DataTable.d.ts +1 -1
  236. package/dist/components/DataTable/types.d.ts +0 -5
  237. package/dist/components/DataTable.js +41 -0
  238. package/dist/components/DataTable.js.map +1 -0
  239. package/dist/createLucideIcon-C8ycilSN.js +147 -0
  240. package/dist/createLucideIcon-C8ycilSN.js.map +1 -0
  241. package/dist/dialog-C97DOTvO.js +39 -0
  242. package/dist/dialog-C97DOTvO.js.map +1 -0
  243. package/dist/ellipsis-lb8Ws6br.js +19 -0
  244. package/dist/ellipsis-lb8Ws6br.js.map +1 -0
  245. package/dist/floating-ui.react-dom-CcGbtPEK.js +2243 -0
  246. package/dist/floating-ui.react-dom-CcGbtPEK.js.map +1 -0
  247. package/dist/index-0o2E3Cnw.js +146 -0
  248. package/dist/index-0o2E3Cnw.js.map +1 -0
  249. package/dist/index-30QpKM0j.js +16 -0
  250. package/dist/index-30QpKM0j.js.map +1 -0
  251. package/dist/index-B4_fVWDx.js +1129 -0
  252. package/dist/index-B4_fVWDx.js.map +1 -0
  253. package/dist/index-BA158WEj.js +12 -0
  254. package/dist/index-BA158WEj.js.map +1 -0
  255. package/dist/index-BNPynZWM.js +225 -0
  256. package/dist/index-BNPynZWM.js.map +1 -0
  257. package/dist/index-BYZaLNq1.js +41 -0
  258. package/dist/index-BYZaLNq1.js.map +1 -0
  259. package/dist/index-BfAAoDv6.js +7 -0
  260. package/dist/index-BfAAoDv6.js.map +1 -0
  261. package/dist/index-BtkPdosV.js +40 -0
  262. package/dist/index-BtkPdosV.js.map +1 -0
  263. package/dist/index-BwxI_qgh.js +915 -0
  264. package/dist/index-BwxI_qgh.js.map +1 -0
  265. package/dist/index-ByEpUy7w.js +302 -0
  266. package/dist/index-ByEpUy7w.js.map +1 -0
  267. package/dist/index-CSMSzzKM.js +93 -0
  268. package/dist/index-CSMSzzKM.js.map +1 -0
  269. package/dist/index-CSUSJzOJ.js +13 -0
  270. package/dist/index-CSUSJzOJ.js.map +1 -0
  271. package/dist/index-CSggBaQF.js +36 -0
  272. package/dist/index-CSggBaQF.js.map +1 -0
  273. package/dist/index-CfriMyrd.js +91 -0
  274. package/dist/index-CfriMyrd.js.map +1 -0
  275. package/dist/index-CiyxEyB0.js +80 -0
  276. package/dist/index-CiyxEyB0.js.map +1 -0
  277. package/dist/index-Cor698lu.js +71 -0
  278. package/dist/index-Cor698lu.js.map +1 -0
  279. package/dist/index-D7Zy7P05.js +45 -0
  280. package/dist/index-D7Zy7P05.js.map +1 -0
  281. package/dist/index-DNzunGHb.js +12 -0
  282. package/dist/index-DNzunGHb.js.map +1 -0
  283. package/dist/index-DOzu5J1s.js +8 -0
  284. package/dist/index-DOzu5J1s.js.map +1 -0
  285. package/dist/index-DZXbzIgC.js +6 -0
  286. package/dist/index-DZXbzIgC.js.map +1 -0
  287. package/dist/index-Dd1i1d2M.js +155 -0
  288. package/dist/index-Dd1i1d2M.js.map +1 -0
  289. package/dist/index-DhnfW8wQ.js +128 -0
  290. package/dist/index-DhnfW8wQ.js.map +1 -0
  291. package/dist/index-PF0ms7Xn.js +402 -0
  292. package/dist/index-PF0ms7Xn.js.map +1 -0
  293. package/dist/index-fV_U4ZJM.js +18 -0
  294. package/dist/index-fV_U4ZJM.js.map +1 -0
  295. package/dist/index-j_qxDBFl.js +224 -0
  296. package/dist/index-j_qxDBFl.js.map +1 -0
  297. package/dist/index-yFgkK_AM.js +131 -0
  298. package/dist/index-yFgkK_AM.js.map +1 -0
  299. package/dist/index-zW4GjM5L.js +16 -0
  300. package/dist/index-zW4GjM5L.js.map +1 -0
  301. package/dist/index.d.ts +0 -55
  302. package/dist/index.js +41 -66515
  303. package/dist/index.js.map +1 -1
  304. package/dist/input-GLCCE2kT.js +9 -0
  305. package/dist/input-GLCCE2kT.js.map +1 -0
  306. package/dist/input-group-CDBpz6Pb.js +59 -0
  307. package/dist/input-group-CDBpz6Pb.js.map +1 -0
  308. package/dist/label-B4qDF3W1.js +30 -0
  309. package/dist/label-B4qDF3W1.js.map +1 -0
  310. package/dist/loader-circle-DycHUAWN.js +15 -0
  311. package/dist/loader-circle-DycHUAWN.js.map +1 -0
  312. package/dist/primitives/Accordion.js +331 -0
  313. package/dist/primitives/Accordion.js.map +1 -0
  314. package/dist/primitives/Alert.js +35 -0
  315. package/dist/primitives/Alert.js.map +1 -0
  316. package/dist/primitives/AlertDialog.js +223 -0
  317. package/dist/primitives/AlertDialog.js.map +1 -0
  318. package/dist/primitives/AspectRatio.js +53 -0
  319. package/dist/primitives/AspectRatio.js.map +1 -0
  320. package/dist/primitives/Avatar.js +162 -0
  321. package/dist/primitives/Avatar.js.map +1 -0
  322. package/dist/primitives/Badge.js +31 -0
  323. package/dist/primitives/Badge.js.map +1 -0
  324. package/dist/primitives/Breadcrumb.js +42 -0
  325. package/dist/primitives/Breadcrumb.js.map +1 -0
  326. package/dist/{components → primitives}/Button.d.ts +1 -1
  327. package/dist/primitives/Button.js +14 -0
  328. package/dist/primitives/Button.js.map +1 -0
  329. package/dist/primitives/ButtonGroup.js +38 -0
  330. package/dist/primitives/ButtonGroup.js.map +1 -0
  331. package/dist/primitives/Calendar.js +8008 -0
  332. package/dist/primitives/Calendar.js.map +1 -0
  333. package/dist/primitives/Card.js +35 -0
  334. package/dist/primitives/Card.js.map +1 -0
  335. package/dist/{components → primitives}/Carousel.d.ts +1 -1
  336. package/dist/primitives/Carousel.js +1841 -0
  337. package/dist/primitives/Carousel.js.map +1 -0
  338. package/dist/primitives/Chart.js +18761 -0
  339. package/dist/primitives/Chart.js.map +1 -0
  340. package/dist/primitives/Checkbox.js +282 -0
  341. package/dist/primitives/Checkbox.js.map +1 -0
  342. package/dist/primitives/Collapsible.js +29 -0
  343. package/dist/primitives/Collapsible.js.map +1 -0
  344. package/dist/primitives/Combobox.js +10251 -0
  345. package/dist/primitives/Combobox.js.map +1 -0
  346. package/dist/primitives/Command.js +218 -0
  347. package/dist/primitives/Command.js.map +1 -0
  348. package/dist/primitives/ContextMenu.js +368 -0
  349. package/dist/primitives/ContextMenu.js.map +1 -0
  350. package/dist/primitives/Dialog.js +37 -0
  351. package/dist/primitives/Dialog.js.map +1 -0
  352. package/dist/primitives/Drawer.js +1685 -0
  353. package/dist/primitives/Drawer.js.map +1 -0
  354. package/dist/primitives/DropdownMenu.js +347 -0
  355. package/dist/primitives/DropdownMenu.js.map +1 -0
  356. package/dist/primitives/Empty.js +43 -0
  357. package/dist/primitives/Empty.js.map +1 -0
  358. package/dist/primitives/Field.js +84 -0
  359. package/dist/primitives/Field.js.map +1 -0
  360. package/dist/primitives/HoverCard.js +267 -0
  361. package/dist/primitives/HoverCard.js.map +1 -0
  362. package/dist/primitives/Input.js +8 -0
  363. package/dist/primitives/Input.js.map +1 -0
  364. package/dist/primitives/InputGroup.js +20 -0
  365. package/dist/primitives/InputGroup.js.map +1 -0
  366. package/dist/primitives/InputOTP.js +59 -0
  367. package/dist/primitives/InputOTP.js.map +1 -0
  368. package/dist/primitives/Item.js +85 -0
  369. package/dist/primitives/Item.js.map +1 -0
  370. package/dist/primitives/Kbd.js +15 -0
  371. package/dist/primitives/Kbd.js.map +1 -0
  372. package/dist/primitives/Label.js +12 -0
  373. package/dist/primitives/Label.js.map +1 -0
  374. package/dist/primitives/Menubar.js +510 -0
  375. package/dist/primitives/Menubar.js.map +1 -0
  376. package/dist/primitives/NativeSelect.js +22 -0
  377. package/dist/primitives/NativeSelect.js.map +1 -0
  378. package/dist/primitives/NavigationMenu.js +823 -0
  379. package/dist/primitives/NavigationMenu.js.map +1 -0
  380. package/dist/primitives/Pagination.js +44 -0
  381. package/dist/primitives/Pagination.js.map +1 -0
  382. package/dist/primitives/Popover.js +416 -0
  383. package/dist/primitives/Popover.js.map +1 -0
  384. package/dist/primitives/Progress.js +103 -0
  385. package/dist/primitives/Progress.js.map +1 -0
  386. package/dist/primitives/RadioGroup.js +299 -0
  387. package/dist/primitives/RadioGroup.js.map +1 -0
  388. package/dist/primitives/Resizable.js +2047 -0
  389. package/dist/primitives/Resizable.js.map +1 -0
  390. package/dist/primitives/ScrollArea.js +731 -0
  391. package/dist/primitives/ScrollArea.js.map +1 -0
  392. package/dist/primitives/Select.js +1286 -0
  393. package/dist/primitives/Select.js.map +1 -0
  394. package/dist/primitives/Separator.js +12 -0
  395. package/dist/primitives/Separator.js.map +1 -0
  396. package/dist/primitives/Sheet.js +35 -0
  397. package/dist/primitives/Sheet.js.map +1 -0
  398. package/dist/primitives/Sidebar.js +265 -0
  399. package/dist/primitives/Sidebar.js.map +1 -0
  400. package/dist/primitives/Skeleton.js +8 -0
  401. package/dist/primitives/Skeleton.js.map +1 -0
  402. package/dist/primitives/Slider.js +569 -0
  403. package/dist/primitives/Slider.js.map +1 -0
  404. package/dist/primitives/Sonner.js +1236 -0
  405. package/dist/primitives/Sonner.js.map +1 -0
  406. package/dist/primitives/Spinner.js +14 -0
  407. package/dist/primitives/Spinner.js.map +1 -0
  408. package/dist/primitives/Switch.js +162 -0
  409. package/dist/primitives/Switch.js.map +1 -0
  410. package/dist/{components → primitives}/Table.d.ts +2 -2
  411. package/dist/primitives/Table.js +36 -0
  412. package/dist/primitives/Table.js.map +1 -0
  413. package/dist/primitives/Tabs.js +224 -0
  414. package/dist/primitives/Tabs.js.map +1 -0
  415. package/dist/primitives/Textarea.js +8 -0
  416. package/dist/primitives/Textarea.js.map +1 -0
  417. package/dist/primitives/Toggle.js +17 -0
  418. package/dist/primitives/Toggle.js.map +1 -0
  419. package/dist/primitives/ToggleGroup.js +199 -0
  420. package/dist/primitives/ToggleGroup.js.map +1 -0
  421. package/dist/primitives/Tooltip.js +28 -0
  422. package/dist/primitives/Tooltip.js.map +1 -0
  423. package/dist/{components → primitives}/Typography.d.ts +1 -1
  424. package/dist/primitives/Typography.js +83 -0
  425. package/dist/primitives/Typography.js.map +1 -0
  426. package/dist/primitives/index.d.ts +55 -0
  427. package/dist/primitives/index.js +110 -0
  428. package/dist/primitives/index.js.map +1 -0
  429. package/dist/reselect-CABQm5hA.js +448 -0
  430. package/dist/reselect-CABQm5hA.js.map +1 -0
  431. package/dist/separator-BbhgePmX.js +36 -0
  432. package/dist/separator-BbhgePmX.js.map +1 -0
  433. package/dist/shadcn/components/badge.d.ts +1 -1
  434. package/dist/shadcn/components/button.d.ts +2 -2
  435. package/dist/shadcn/components/typography.d.ts +2 -2
  436. package/dist/sheet-D1ngftfX.js +39 -0
  437. package/dist/sheet-D1ngftfX.js.map +1 -0
  438. package/dist/skeleton-AR83txPr.js +9 -0
  439. package/dist/skeleton-AR83txPr.js.map +1 -0
  440. package/dist/textarea-BSZwxzjQ.js +9 -0
  441. package/dist/textarea-BSZwxzjQ.js.map +1 -0
  442. package/dist/toggle-2k9K8a5c.js +60 -0
  443. package/dist/toggle-2k9K8a5c.js.map +1 -0
  444. package/dist/tooltip-D5soNrAP.js +517 -0
  445. package/dist/tooltip-D5soNrAP.js.map +1 -0
  446. package/dist/use-mobile-IRjN_mlT.js +19 -0
  447. package/dist/use-mobile-IRjN_mlT.js.map +1 -0
  448. package/dist/utils-DdHUxIdC.js +3207 -0
  449. package/dist/utils-DdHUxIdC.js.map +1 -0
  450. package/dist/x-_o2T3n6D.js +18 -0
  451. package/dist/x-_o2T3n6D.js.map +1 -0
  452. package/package.json +53 -33
  453. /package/dist/{components → primitives}/Accordion.d.ts +0 -0
  454. /package/dist/{components → primitives}/Alert.d.ts +0 -0
  455. /package/dist/{components → primitives}/AlertDialog.d.ts +0 -0
  456. /package/dist/{components → primitives}/AspectRatio.d.ts +0 -0
  457. /package/dist/{components → primitives}/Avatar.d.ts +0 -0
  458. /package/dist/{components → primitives}/Badge.d.ts +0 -0
  459. /package/dist/{components → primitives}/Breadcrumb.d.ts +0 -0
  460. /package/dist/{components → primitives}/ButtonGroup.d.ts +0 -0
  461. /package/dist/{components → primitives}/Calendar.d.ts +0 -0
  462. /package/dist/{components → primitives}/Card.d.ts +0 -0
  463. /package/dist/{components → primitives}/Chart.d.ts +0 -0
  464. /package/dist/{components → primitives}/Checkbox.d.ts +0 -0
  465. /package/dist/{components → primitives}/Collapsible.d.ts +0 -0
  466. /package/dist/{components → primitives}/Combobox.d.ts +0 -0
  467. /package/dist/{components → primitives}/Command.d.ts +0 -0
  468. /package/dist/{components → primitives}/ContextMenu.d.ts +0 -0
  469. /package/dist/{components → primitives}/Dialog.d.ts +0 -0
  470. /package/dist/{components → primitives}/Drawer.d.ts +0 -0
  471. /package/dist/{components → primitives}/DropdownMenu.d.ts +0 -0
  472. /package/dist/{components → primitives}/Empty.d.ts +0 -0
  473. /package/dist/{components → primitives}/Field.d.ts +0 -0
  474. /package/dist/{components → primitives}/HoverCard.d.ts +0 -0
  475. /package/dist/{components → primitives}/Input.d.ts +0 -0
  476. /package/dist/{components → primitives}/InputGroup.d.ts +0 -0
  477. /package/dist/{components → primitives}/InputOTP.d.ts +0 -0
  478. /package/dist/{components → primitives}/Item.d.ts +0 -0
  479. /package/dist/{components → primitives}/Kbd.d.ts +0 -0
  480. /package/dist/{components → primitives}/Label.d.ts +0 -0
  481. /package/dist/{components → primitives}/Menubar.d.ts +0 -0
  482. /package/dist/{components → primitives}/NativeSelect.d.ts +0 -0
  483. /package/dist/{components → primitives}/NavigationMenu.d.ts +0 -0
  484. /package/dist/{components → primitives}/Pagination.d.ts +0 -0
  485. /package/dist/{components → primitives}/Popover.d.ts +0 -0
  486. /package/dist/{components → primitives}/Progress.d.ts +0 -0
  487. /package/dist/{components → primitives}/RadioGroup.d.ts +0 -0
  488. /package/dist/{components → primitives}/Resizable.d.ts +0 -0
  489. /package/dist/{components → primitives}/ScrollArea.d.ts +0 -0
  490. /package/dist/{components → primitives}/Select.d.ts +0 -0
  491. /package/dist/{components → primitives}/Separator.d.ts +0 -0
  492. /package/dist/{components → primitives}/Sheet.d.ts +0 -0
  493. /package/dist/{components → primitives}/Sidebar.d.ts +0 -0
  494. /package/dist/{components → primitives}/Skeleton.d.ts +0 -0
  495. /package/dist/{components → primitives}/Slider.d.ts +0 -0
  496. /package/dist/{components → primitives}/Sonner.d.ts +0 -0
  497. /package/dist/{components → primitives}/Spinner.d.ts +0 -0
  498. /package/dist/{components → primitives}/Switch.d.ts +0 -0
  499. /package/dist/{components → primitives}/Tabs.d.ts +0 -0
  500. /package/dist/{components → primitives}/Textarea.d.ts +0 -0
  501. /package/dist/{components → primitives}/Toggle.d.ts +0 -0
  502. /package/dist/{components → primitives}/ToggleGroup.d.ts +0 -0
  503. /package/dist/{components → primitives}/Tooltip.d.ts +0 -0
@@ -0,0 +1,1153 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var index$1 = require('./index-D-iDn9RI.js');
5
+ var index$2 = require('./index-DMbj7vXd.js');
6
+ var index = require('./index-lWVw05cs.js');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n.default = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
+
29
+ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
30
+ var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
31
+ var EVENT_OPTIONS = { bubbles: false, cancelable: true };
32
+ var FOCUS_SCOPE_NAME = "FocusScope";
33
+ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
34
+ const {
35
+ loop = false,
36
+ trapped = false,
37
+ onMountAutoFocus: onMountAutoFocusProp,
38
+ onUnmountAutoFocus: onUnmountAutoFocusProp,
39
+ ...scopeProps
40
+ } = props;
41
+ const [container, setContainer] = React__namespace.useState(null);
42
+ const onMountAutoFocus = index.useCallbackRef(onMountAutoFocusProp);
43
+ const onUnmountAutoFocus = index.useCallbackRef(onUnmountAutoFocusProp);
44
+ const lastFocusedElementRef = React__namespace.useRef(null);
45
+ const composedRefs = index$1.useComposedRefs(forwardedRef, (node) => setContainer(node));
46
+ const focusScope = React__namespace.useRef({
47
+ paused: false,
48
+ pause() {
49
+ this.paused = true;
50
+ },
51
+ resume() {
52
+ this.paused = false;
53
+ }
54
+ }).current;
55
+ React__namespace.useEffect(() => {
56
+ if (trapped) {
57
+ let handleFocusIn2 = function(event) {
58
+ if (focusScope.paused || !container) return;
59
+ const target = event.target;
60
+ if (container.contains(target)) {
61
+ lastFocusedElementRef.current = target;
62
+ } else {
63
+ focus(lastFocusedElementRef.current, { select: true });
64
+ }
65
+ }, handleFocusOut2 = function(event) {
66
+ if (focusScope.paused || !container) return;
67
+ const relatedTarget = event.relatedTarget;
68
+ if (relatedTarget === null) return;
69
+ if (!container.contains(relatedTarget)) {
70
+ focus(lastFocusedElementRef.current, { select: true });
71
+ }
72
+ }, handleMutations2 = function(mutations) {
73
+ const focusedElement = document.activeElement;
74
+ if (focusedElement !== document.body) return;
75
+ for (const mutation of mutations) {
76
+ if (mutation.removedNodes.length > 0) focus(container);
77
+ }
78
+ };
79
+ document.addEventListener("focusin", handleFocusIn2);
80
+ document.addEventListener("focusout", handleFocusOut2);
81
+ const mutationObserver = new MutationObserver(handleMutations2);
82
+ if (container) mutationObserver.observe(container, { childList: true, subtree: true });
83
+ return () => {
84
+ document.removeEventListener("focusin", handleFocusIn2);
85
+ document.removeEventListener("focusout", handleFocusOut2);
86
+ mutationObserver.disconnect();
87
+ };
88
+ }
89
+ }, [trapped, container, focusScope.paused]);
90
+ React__namespace.useEffect(() => {
91
+ if (container) {
92
+ focusScopesStack.add(focusScope);
93
+ const previouslyFocusedElement = document.activeElement;
94
+ const hasFocusedCandidate = container.contains(previouslyFocusedElement);
95
+ if (!hasFocusedCandidate) {
96
+ const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
97
+ container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
98
+ container.dispatchEvent(mountEvent);
99
+ if (!mountEvent.defaultPrevented) {
100
+ focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
101
+ if (document.activeElement === previouslyFocusedElement) {
102
+ focus(container);
103
+ }
104
+ }
105
+ }
106
+ return () => {
107
+ container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
108
+ setTimeout(() => {
109
+ const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
110
+ container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
111
+ container.dispatchEvent(unmountEvent);
112
+ if (!unmountEvent.defaultPrevented) {
113
+ focus(previouslyFocusedElement ?? document.body, { select: true });
114
+ }
115
+ container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
116
+ focusScopesStack.remove(focusScope);
117
+ }, 0);
118
+ };
119
+ }
120
+ }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
121
+ const handleKeyDown = React__namespace.useCallback(
122
+ (event) => {
123
+ if (!loop && !trapped) return;
124
+ if (focusScope.paused) return;
125
+ const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
126
+ const focusedElement = document.activeElement;
127
+ if (isTabKey && focusedElement) {
128
+ const container2 = event.currentTarget;
129
+ const [first, last] = getTabbableEdges(container2);
130
+ const hasTabbableElementsInside = first && last;
131
+ if (!hasTabbableElementsInside) {
132
+ if (focusedElement === container2) event.preventDefault();
133
+ } else {
134
+ if (!event.shiftKey && focusedElement === last) {
135
+ event.preventDefault();
136
+ if (loop) focus(first, { select: true });
137
+ } else if (event.shiftKey && focusedElement === first) {
138
+ event.preventDefault();
139
+ if (loop) focus(last, { select: true });
140
+ }
141
+ }
142
+ }
143
+ },
144
+ [loop, trapped, focusScope.paused]
145
+ );
146
+ return /* @__PURE__ */ jsxRuntime.jsx(index$2.Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
147
+ });
148
+ FocusScope.displayName = FOCUS_SCOPE_NAME;
149
+ function focusFirst(candidates, { select = false } = {}) {
150
+ const previouslyFocusedElement = document.activeElement;
151
+ for (const candidate of candidates) {
152
+ focus(candidate, { select });
153
+ if (document.activeElement !== previouslyFocusedElement) return;
154
+ }
155
+ }
156
+ function getTabbableEdges(container) {
157
+ const candidates = getTabbableCandidates(container);
158
+ const first = findVisible(candidates, container);
159
+ const last = findVisible(candidates.reverse(), container);
160
+ return [first, last];
161
+ }
162
+ function getTabbableCandidates(container) {
163
+ const nodes = [];
164
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
165
+ acceptNode: (node) => {
166
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
167
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
168
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
169
+ }
170
+ });
171
+ while (walker.nextNode()) nodes.push(walker.currentNode);
172
+ return nodes;
173
+ }
174
+ function findVisible(elements, container) {
175
+ for (const element of elements) {
176
+ if (!isHidden(element, { upTo: container })) return element;
177
+ }
178
+ }
179
+ function isHidden(node, { upTo }) {
180
+ if (getComputedStyle(node).visibility === "hidden") return true;
181
+ while (node) {
182
+ if (upTo !== void 0 && node === upTo) return false;
183
+ if (getComputedStyle(node).display === "none") return true;
184
+ node = node.parentElement;
185
+ }
186
+ return false;
187
+ }
188
+ function isSelectableInput(element) {
189
+ return element instanceof HTMLInputElement && "select" in element;
190
+ }
191
+ function focus(element, { select = false } = {}) {
192
+ if (element && element.focus) {
193
+ const previouslyFocusedElement = document.activeElement;
194
+ element.focus({ preventScroll: true });
195
+ if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
196
+ element.select();
197
+ }
198
+ }
199
+ var focusScopesStack = createFocusScopesStack();
200
+ function createFocusScopesStack() {
201
+ let stack = [];
202
+ return {
203
+ add(focusScope) {
204
+ const activeFocusScope = stack[0];
205
+ if (focusScope !== activeFocusScope) {
206
+ activeFocusScope?.pause();
207
+ }
208
+ stack = arrayRemove(stack, focusScope);
209
+ stack.unshift(focusScope);
210
+ },
211
+ remove(focusScope) {
212
+ stack = arrayRemove(stack, focusScope);
213
+ stack[0]?.resume();
214
+ }
215
+ };
216
+ }
217
+ function arrayRemove(array, item) {
218
+ const updatedArray = [...array];
219
+ const index = updatedArray.indexOf(item);
220
+ if (index !== -1) {
221
+ updatedArray.splice(index, 1);
222
+ }
223
+ return updatedArray;
224
+ }
225
+ function removeLinks(items) {
226
+ return items.filter((item) => item.tagName !== "A");
227
+ }
228
+
229
+ var count = 0;
230
+ function useFocusGuards() {
231
+ React__namespace.useEffect(() => {
232
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
233
+ document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
234
+ document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
235
+ count++;
236
+ return () => {
237
+ if (count === 1) {
238
+ document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
239
+ }
240
+ count--;
241
+ };
242
+ }, []);
243
+ }
244
+ function createFocusGuard() {
245
+ const element = document.createElement("span");
246
+ element.setAttribute("data-radix-focus-guard", "");
247
+ element.tabIndex = 0;
248
+ element.style.outline = "none";
249
+ element.style.opacity = "0";
250
+ element.style.position = "fixed";
251
+ element.style.pointerEvents = "none";
252
+ return element;
253
+ }
254
+
255
+ /******************************************************************************
256
+ Copyright (c) Microsoft Corporation.
257
+
258
+ Permission to use, copy, modify, and/or distribute this software for any
259
+ purpose with or without fee is hereby granted.
260
+
261
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
262
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
263
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
264
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
265
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
266
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
267
+ PERFORMANCE OF THIS SOFTWARE.
268
+ ***************************************************************************** */
269
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
270
+
271
+
272
+ var __assign = function() {
273
+ __assign = Object.assign || function __assign(t) {
274
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
275
+ s = arguments[i];
276
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
277
+ }
278
+ return t;
279
+ };
280
+ return __assign.apply(this, arguments);
281
+ };
282
+
283
+ function __rest(s, e) {
284
+ var t = {};
285
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
286
+ t[p] = s[p];
287
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
288
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
289
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
290
+ t[p[i]] = s[p[i]];
291
+ }
292
+ return t;
293
+ }
294
+
295
+ function __spreadArray(to, from, pack) {
296
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
297
+ if (ar || !(i in from)) {
298
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
299
+ ar[i] = from[i];
300
+ }
301
+ }
302
+ return to.concat(ar || Array.prototype.slice.call(from));
303
+ }
304
+
305
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
306
+ var e = new Error(message);
307
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
308
+ };
309
+
310
+ var zeroRightClassName = 'right-scroll-bar-position';
311
+ var fullWidthClassName = 'width-before-scroll-bar';
312
+ var noScrollbarsClassName = 'with-scroll-bars-hidden';
313
+ /**
314
+ * Name of a CSS variable containing the amount of "hidden" scrollbar
315
+ * ! might be undefined ! use will fallback!
316
+ */
317
+ var removedBarSizeVariable = '--removed-body-scroll-bar-size';
318
+
319
+ /**
320
+ * Assigns a value for a given ref, no matter of the ref format
321
+ * @param {RefObject} ref - a callback function or ref object
322
+ * @param value - a new value
323
+ *
324
+ * @see https://github.com/theKashey/use-callback-ref#assignref
325
+ * @example
326
+ * const refObject = useRef();
327
+ * const refFn = (ref) => {....}
328
+ *
329
+ * assignRef(refObject, "refValue");
330
+ * assignRef(refFn, "refValue");
331
+ */
332
+ function assignRef(ref, value) {
333
+ if (typeof ref === 'function') {
334
+ ref(value);
335
+ }
336
+ else if (ref) {
337
+ ref.current = value;
338
+ }
339
+ return ref;
340
+ }
341
+
342
+ /**
343
+ * creates a MutableRef with ref change callback
344
+ * @param initialValue - initial ref value
345
+ * @param {Function} callback - a callback to run when value changes
346
+ *
347
+ * @example
348
+ * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
349
+ * ref.current = 1;
350
+ * // prints 0 -> 1
351
+ *
352
+ * @see https://reactjs.org/docs/hooks-reference.html#useref
353
+ * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
354
+ * @returns {MutableRefObject}
355
+ */
356
+ function useCallbackRef(initialValue, callback) {
357
+ var ref = React.useState(function () { return ({
358
+ // value
359
+ value: initialValue,
360
+ // last callback
361
+ callback: callback,
362
+ // "memoized" public interface
363
+ facade: {
364
+ get current() {
365
+ return ref.value;
366
+ },
367
+ set current(value) {
368
+ var last = ref.value;
369
+ if (last !== value) {
370
+ ref.value = value;
371
+ ref.callback(value, last);
372
+ }
373
+ },
374
+ },
375
+ }); })[0];
376
+ // update callback
377
+ ref.callback = callback;
378
+ return ref.facade;
379
+ }
380
+
381
+ var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React__namespace.useLayoutEffect : React__namespace.useEffect;
382
+ var currentValues = new WeakMap();
383
+ /**
384
+ * Merges two or more refs together providing a single interface to set their value
385
+ * @param {RefObject|Ref} refs
386
+ * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
387
+ *
388
+ * @see {@link mergeRefs} a version without buit-in memoization
389
+ * @see https://github.com/theKashey/use-callback-ref#usemergerefs
390
+ * @example
391
+ * const Component = React.forwardRef((props, ref) => {
392
+ * const ownRef = useRef();
393
+ * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
394
+ * return <div ref={domRef}>...</div>
395
+ * }
396
+ */
397
+ function useMergeRefs(refs, defaultValue) {
398
+ var callbackRef = useCallbackRef(null, function (newValue) {
399
+ return refs.forEach(function (ref) { return assignRef(ref, newValue); });
400
+ });
401
+ // handle refs changes - added or removed
402
+ useIsomorphicLayoutEffect(function () {
403
+ var oldValue = currentValues.get(callbackRef);
404
+ if (oldValue) {
405
+ var prevRefs_1 = new Set(oldValue);
406
+ var nextRefs_1 = new Set(refs);
407
+ var current_1 = callbackRef.current;
408
+ prevRefs_1.forEach(function (ref) {
409
+ if (!nextRefs_1.has(ref)) {
410
+ assignRef(ref, null);
411
+ }
412
+ });
413
+ nextRefs_1.forEach(function (ref) {
414
+ if (!prevRefs_1.has(ref)) {
415
+ assignRef(ref, current_1);
416
+ }
417
+ });
418
+ }
419
+ currentValues.set(callbackRef, refs);
420
+ }, [refs]);
421
+ return callbackRef;
422
+ }
423
+
424
+ function ItoI(a) {
425
+ return a;
426
+ }
427
+ function innerCreateMedium(defaults, middleware) {
428
+ if (middleware === void 0) { middleware = ItoI; }
429
+ var buffer = [];
430
+ var assigned = false;
431
+ var medium = {
432
+ read: function () {
433
+ if (assigned) {
434
+ throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');
435
+ }
436
+ if (buffer.length) {
437
+ return buffer[buffer.length - 1];
438
+ }
439
+ return defaults;
440
+ },
441
+ useMedium: function (data) {
442
+ var item = middleware(data, assigned);
443
+ buffer.push(item);
444
+ return function () {
445
+ buffer = buffer.filter(function (x) { return x !== item; });
446
+ };
447
+ },
448
+ assignSyncMedium: function (cb) {
449
+ assigned = true;
450
+ while (buffer.length) {
451
+ var cbs = buffer;
452
+ buffer = [];
453
+ cbs.forEach(cb);
454
+ }
455
+ buffer = {
456
+ push: function (x) { return cb(x); },
457
+ filter: function () { return buffer; },
458
+ };
459
+ },
460
+ assignMedium: function (cb) {
461
+ assigned = true;
462
+ var pendingQueue = [];
463
+ if (buffer.length) {
464
+ var cbs = buffer;
465
+ buffer = [];
466
+ cbs.forEach(cb);
467
+ pendingQueue = buffer;
468
+ }
469
+ var executeQueue = function () {
470
+ var cbs = pendingQueue;
471
+ pendingQueue = [];
472
+ cbs.forEach(cb);
473
+ };
474
+ var cycle = function () { return Promise.resolve().then(executeQueue); };
475
+ cycle();
476
+ buffer = {
477
+ push: function (x) {
478
+ pendingQueue.push(x);
479
+ cycle();
480
+ },
481
+ filter: function (filter) {
482
+ pendingQueue = pendingQueue.filter(filter);
483
+ return buffer;
484
+ },
485
+ };
486
+ },
487
+ };
488
+ return medium;
489
+ }
490
+ // eslint-disable-next-line @typescript-eslint/ban-types
491
+ function createSidecarMedium(options) {
492
+ if (options === void 0) { options = {}; }
493
+ var medium = innerCreateMedium(null);
494
+ medium.options = __assign({ async: true, ssr: false }, options);
495
+ return medium;
496
+ }
497
+
498
+ var SideCar$1 = function (_a) {
499
+ var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
500
+ if (!sideCar) {
501
+ throw new Error('Sidecar: please provide `sideCar` property to import the right car');
502
+ }
503
+ var Target = sideCar.read();
504
+ if (!Target) {
505
+ throw new Error('Sidecar medium not found');
506
+ }
507
+ return React__namespace.createElement(Target, __assign({}, rest));
508
+ };
509
+ SideCar$1.isSideCarExport = true;
510
+ function exportSidecar(medium, exported) {
511
+ medium.useMedium(exported);
512
+ return SideCar$1;
513
+ }
514
+
515
+ var effectCar = createSidecarMedium();
516
+
517
+ var nothing = function () {
518
+ return;
519
+ };
520
+ /**
521
+ * Removes scrollbar from the page and contain the scroll within the Lock
522
+ */
523
+ var RemoveScroll = React__namespace.forwardRef(function (props, parentRef) {
524
+ var ref = React__namespace.useRef(null);
525
+ var _a = React__namespace.useState({
526
+ onScrollCapture: nothing,
527
+ onWheelCapture: nothing,
528
+ onTouchMoveCapture: nothing,
529
+ }), callbacks = _a[0], setCallbacks = _a[1];
530
+ var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
531
+ var SideCar = sideCar;
532
+ var containerRef = useMergeRefs([ref, parentRef]);
533
+ var containerProps = __assign(__assign({}, rest), callbacks);
534
+ return (React__namespace.createElement(React__namespace.Fragment, null,
535
+ enabled && (React__namespace.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noRelative: noRelative, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),
536
+ forwardProps ? (React__namespace.cloneElement(React__namespace.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React__namespace.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));
537
+ });
538
+ RemoveScroll.defaultProps = {
539
+ enabled: true,
540
+ removeScrollBar: true,
541
+ inert: false,
542
+ };
543
+ RemoveScroll.classNames = {
544
+ fullWidth: fullWidthClassName,
545
+ zeroRight: zeroRightClassName,
546
+ };
547
+
548
+ var getNonce = function () {
549
+ if (typeof __webpack_nonce__ !== 'undefined') {
550
+ return __webpack_nonce__;
551
+ }
552
+ return undefined;
553
+ };
554
+
555
+ function makeStyleTag() {
556
+ if (!document)
557
+ return null;
558
+ var tag = document.createElement('style');
559
+ tag.type = 'text/css';
560
+ var nonce = getNonce();
561
+ if (nonce) {
562
+ tag.setAttribute('nonce', nonce);
563
+ }
564
+ return tag;
565
+ }
566
+ function injectStyles(tag, css) {
567
+ // @ts-ignore
568
+ if (tag.styleSheet) {
569
+ // @ts-ignore
570
+ tag.styleSheet.cssText = css;
571
+ }
572
+ else {
573
+ tag.appendChild(document.createTextNode(css));
574
+ }
575
+ }
576
+ function insertStyleTag(tag) {
577
+ var head = document.head || document.getElementsByTagName('head')[0];
578
+ head.appendChild(tag);
579
+ }
580
+ var stylesheetSingleton = function () {
581
+ var counter = 0;
582
+ var stylesheet = null;
583
+ return {
584
+ add: function (style) {
585
+ if (counter == 0) {
586
+ if ((stylesheet = makeStyleTag())) {
587
+ injectStyles(stylesheet, style);
588
+ insertStyleTag(stylesheet);
589
+ }
590
+ }
591
+ counter++;
592
+ },
593
+ remove: function () {
594
+ counter--;
595
+ if (!counter && stylesheet) {
596
+ stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
597
+ stylesheet = null;
598
+ }
599
+ },
600
+ };
601
+ };
602
+
603
+ /**
604
+ * creates a hook to control style singleton
605
+ * @see {@link styleSingleton} for a safer component version
606
+ * @example
607
+ * ```tsx
608
+ * const useStyle = styleHookSingleton();
609
+ * ///
610
+ * useStyle('body { overflow: hidden}');
611
+ */
612
+ var styleHookSingleton = function () {
613
+ var sheet = stylesheetSingleton();
614
+ return function (styles, isDynamic) {
615
+ React__namespace.useEffect(function () {
616
+ sheet.add(styles);
617
+ return function () {
618
+ sheet.remove();
619
+ };
620
+ }, [styles && isDynamic]);
621
+ };
622
+ };
623
+
624
+ /**
625
+ * create a Component to add styles on demand
626
+ * - styles are added when first instance is mounted
627
+ * - styles are removed when the last instance is unmounted
628
+ * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
629
+ */
630
+ var styleSingleton = function () {
631
+ var useStyle = styleHookSingleton();
632
+ var Sheet = function (_a) {
633
+ var styles = _a.styles, dynamic = _a.dynamic;
634
+ useStyle(styles, dynamic);
635
+ return null;
636
+ };
637
+ return Sheet;
638
+ };
639
+
640
+ var zeroGap = {
641
+ left: 0,
642
+ top: 0,
643
+ right: 0,
644
+ gap: 0,
645
+ };
646
+ var parse = function (x) { return parseInt(x || '', 10) || 0; };
647
+ var getOffset = function (gapMode) {
648
+ var cs = window.getComputedStyle(document.body);
649
+ var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
650
+ var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
651
+ var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
652
+ return [parse(left), parse(top), parse(right)];
653
+ };
654
+ var getGapWidth = function (gapMode) {
655
+ if (gapMode === void 0) { gapMode = 'margin'; }
656
+ if (typeof window === 'undefined') {
657
+ return zeroGap;
658
+ }
659
+ var offsets = getOffset(gapMode);
660
+ var documentWidth = document.documentElement.clientWidth;
661
+ var windowWidth = window.innerWidth;
662
+ return {
663
+ left: offsets[0],
664
+ top: offsets[1],
665
+ right: offsets[2],
666
+ gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),
667
+ };
668
+ };
669
+
670
+ var Style = styleSingleton();
671
+ var lockAttribute = 'data-scroll-locked';
672
+ // important tip - once we measure scrollBar width and remove them
673
+ // we could not repeat this operation
674
+ // thus we are using style-singleton - only the first "yet correct" style will be applied.
675
+ var getStyles = function (_a, allowRelative, gapMode, important) {
676
+ var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
677
+ if (gapMode === void 0) { gapMode = 'margin'; }
678
+ return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
679
+ allowRelative && "position: relative ".concat(important, ";"),
680
+ gapMode === 'margin' &&
681
+ "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
682
+ gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";"),
683
+ ]
684
+ .filter(Boolean)
685
+ .join(''), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
686
+ };
687
+ var getCurrentUseCounter = function () {
688
+ var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);
689
+ return isFinite(counter) ? counter : 0;
690
+ };
691
+ var useLockAttribute = function () {
692
+ React__namespace.useEffect(function () {
693
+ document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
694
+ return function () {
695
+ var newCounter = getCurrentUseCounter() - 1;
696
+ if (newCounter <= 0) {
697
+ document.body.removeAttribute(lockAttribute);
698
+ }
699
+ else {
700
+ document.body.setAttribute(lockAttribute, newCounter.toString());
701
+ }
702
+ };
703
+ }, []);
704
+ };
705
+ /**
706
+ * Removes page scrollbar and blocks page scroll when mounted
707
+ */
708
+ var RemoveScrollBar = function (_a) {
709
+ var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;
710
+ useLockAttribute();
711
+ /*
712
+ gap will be measured on every component mount
713
+ however it will be used only by the "first" invocation
714
+ due to singleton nature of <Style
715
+ */
716
+ var gap = React__namespace.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);
717
+ return React__namespace.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });
718
+ };
719
+
720
+ var passiveSupported = false;
721
+ if (typeof window !== 'undefined') {
722
+ try {
723
+ var options = Object.defineProperty({}, 'passive', {
724
+ get: function () {
725
+ passiveSupported = true;
726
+ return true;
727
+ },
728
+ });
729
+ // @ts-ignore
730
+ window.addEventListener('test', options, options);
731
+ // @ts-ignore
732
+ window.removeEventListener('test', options, options);
733
+ }
734
+ catch (err) {
735
+ passiveSupported = false;
736
+ }
737
+ }
738
+ var nonPassive = passiveSupported ? { passive: false } : false;
739
+
740
+ var alwaysContainsScroll = function (node) {
741
+ // textarea will always _contain_ scroll inside self. It only can be hidden
742
+ return node.tagName === 'TEXTAREA';
743
+ };
744
+ var elementCanBeScrolled = function (node, overflow) {
745
+ if (!(node instanceof Element)) {
746
+ return false;
747
+ }
748
+ var styles = window.getComputedStyle(node);
749
+ return (
750
+ // not-not-scrollable
751
+ styles[overflow] !== 'hidden' &&
752
+ // contains scroll inside self
753
+ !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));
754
+ };
755
+ var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };
756
+ var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };
757
+ var locationCouldBeScrolled = function (axis, node) {
758
+ var ownerDocument = node.ownerDocument;
759
+ var current = node;
760
+ do {
761
+ // Skip over shadow root
762
+ if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {
763
+ current = current.host;
764
+ }
765
+ var isScrollable = elementCouldBeScrolled(axis, current);
766
+ if (isScrollable) {
767
+ var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
768
+ if (scrollHeight > clientHeight) {
769
+ return true;
770
+ }
771
+ }
772
+ current = current.parentNode;
773
+ } while (current && current !== ownerDocument.body);
774
+ return false;
775
+ };
776
+ var getVScrollVariables = function (_a) {
777
+ var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
778
+ return [
779
+ scrollTop,
780
+ scrollHeight,
781
+ clientHeight,
782
+ ];
783
+ };
784
+ var getHScrollVariables = function (_a) {
785
+ var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
786
+ return [
787
+ scrollLeft,
788
+ scrollWidth,
789
+ clientWidth,
790
+ ];
791
+ };
792
+ var elementCouldBeScrolled = function (axis, node) {
793
+ return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
794
+ };
795
+ var getScrollVariables = function (axis, node) {
796
+ return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);
797
+ };
798
+ var getDirectionFactor = function (axis, direction) {
799
+ /**
800
+ * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
801
+ * and then increasingly negative as you scroll towards the end of the content.
802
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
803
+ */
804
+ return axis === 'h' && direction === 'rtl' ? -1 : 1;
805
+ };
806
+ var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {
807
+ var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
808
+ var delta = directionFactor * sourceDelta;
809
+ // find scrollable target
810
+ var target = event.target;
811
+ var targetInLock = endTarget.contains(target);
812
+ var shouldCancelScroll = false;
813
+ var isDeltaPositive = delta > 0;
814
+ var availableScroll = 0;
815
+ var availableScrollTop = 0;
816
+ do {
817
+ if (!target) {
818
+ break;
819
+ }
820
+ var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
821
+ var elementScroll = scroll_1 - capacity - directionFactor * position;
822
+ if (position || elementScroll) {
823
+ if (elementCouldBeScrolled(axis, target)) {
824
+ availableScroll += elementScroll;
825
+ availableScrollTop += position;
826
+ }
827
+ }
828
+ var parent_1 = target.parentNode;
829
+ // we will "bubble" from ShadowDom in case we are, or just to the parent in normal case
830
+ // this is the same logic used in focus-lock
831
+ target = (parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1);
832
+ } while (
833
+ // portaled content
834
+ (!targetInLock && target !== document.body) ||
835
+ // self content
836
+ (targetInLock && (endTarget.contains(target) || endTarget === target)));
837
+ // handle epsilon around 0 (non standard zoom levels)
838
+ if (isDeltaPositive &&
839
+ ((Math.abs(availableScroll) < 1) || (false))) {
840
+ shouldCancelScroll = true;
841
+ }
842
+ else if (!isDeltaPositive &&
843
+ ((Math.abs(availableScrollTop) < 1) || (false))) {
844
+ shouldCancelScroll = true;
845
+ }
846
+ return shouldCancelScroll;
847
+ };
848
+
849
+ var getTouchXY = function (event) {
850
+ return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
851
+ };
852
+ var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };
853
+ var extractRef = function (ref) {
854
+ return ref && 'current' in ref ? ref.current : ref;
855
+ };
856
+ var deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };
857
+ var generateStyle = function (id) { return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); };
858
+ var idCounter = 0;
859
+ var lockStack = [];
860
+ function RemoveScrollSideCar(props) {
861
+ var shouldPreventQueue = React__namespace.useRef([]);
862
+ var touchStartRef = React__namespace.useRef([0, 0]);
863
+ var activeAxis = React__namespace.useRef();
864
+ var id = React__namespace.useState(idCounter++)[0];
865
+ var Style = React__namespace.useState(styleSingleton)[0];
866
+ var lastProps = React__namespace.useRef(props);
867
+ React__namespace.useEffect(function () {
868
+ lastProps.current = props;
869
+ }, [props]);
870
+ React__namespace.useEffect(function () {
871
+ if (props.inert) {
872
+ document.body.classList.add("block-interactivity-".concat(id));
873
+ var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
874
+ allow_1.forEach(function (el) { return el.classList.add("allow-interactivity-".concat(id)); });
875
+ return function () {
876
+ document.body.classList.remove("block-interactivity-".concat(id));
877
+ allow_1.forEach(function (el) { return el.classList.remove("allow-interactivity-".concat(id)); });
878
+ };
879
+ }
880
+ return;
881
+ }, [props.inert, props.lockRef.current, props.shards]);
882
+ var shouldCancelEvent = React__namespace.useCallback(function (event, parent) {
883
+ if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {
884
+ return !lastProps.current.allowPinchZoom;
885
+ }
886
+ var touch = getTouchXY(event);
887
+ var touchStart = touchStartRef.current;
888
+ var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];
889
+ var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];
890
+ var currentAxis;
891
+ var target = event.target;
892
+ var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';
893
+ // allow horizontal touch move on Range inputs. They will not cause any scroll
894
+ if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
895
+ return false;
896
+ }
897
+ // allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target
898
+ var selection = window.getSelection();
899
+ var anchorNode = selection && selection.anchorNode;
900
+ var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
901
+ if (isTouchingSelection) {
902
+ return false;
903
+ }
904
+ var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
905
+ if (!canBeScrolledInMainDirection) {
906
+ return true;
907
+ }
908
+ if (canBeScrolledInMainDirection) {
909
+ currentAxis = moveDirection;
910
+ }
911
+ else {
912
+ currentAxis = moveDirection === 'v' ? 'h' : 'v';
913
+ canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
914
+ // other axis might be not scrollable
915
+ }
916
+ if (!canBeScrolledInMainDirection) {
917
+ return false;
918
+ }
919
+ if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {
920
+ activeAxis.current = currentAxis;
921
+ }
922
+ if (!currentAxis) {
923
+ return true;
924
+ }
925
+ var cancelingAxis = activeAxis.current || currentAxis;
926
+ return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY);
927
+ }, []);
928
+ var shouldPrevent = React__namespace.useCallback(function (_event) {
929
+ var event = _event;
930
+ if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
931
+ // not the last active
932
+ return;
933
+ }
934
+ var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
935
+ var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];
936
+ // self event, and should be canceled
937
+ if (sourceEvent && sourceEvent.should) {
938
+ if (event.cancelable) {
939
+ event.preventDefault();
940
+ }
941
+ return;
942
+ }
943
+ // outside or shard event
944
+ if (!sourceEvent) {
945
+ var shardNodes = (lastProps.current.shards || [])
946
+ .map(extractRef)
947
+ .filter(Boolean)
948
+ .filter(function (node) { return node.contains(event.target); });
949
+ var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
950
+ if (shouldStop) {
951
+ if (event.cancelable) {
952
+ event.preventDefault();
953
+ }
954
+ }
955
+ }
956
+ }, []);
957
+ var shouldCancel = React__namespace.useCallback(function (name, delta, target, should) {
958
+ var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };
959
+ shouldPreventQueue.current.push(event);
960
+ setTimeout(function () {
961
+ shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });
962
+ }, 1);
963
+ }, []);
964
+ var scrollTouchStart = React__namespace.useCallback(function (event) {
965
+ touchStartRef.current = getTouchXY(event);
966
+ activeAxis.current = undefined;
967
+ }, []);
968
+ var scrollWheel = React__namespace.useCallback(function (event) {
969
+ shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
970
+ }, []);
971
+ var scrollTouchMove = React__namespace.useCallback(function (event) {
972
+ shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
973
+ }, []);
974
+ React__namespace.useEffect(function () {
975
+ lockStack.push(Style);
976
+ props.setCallbacks({
977
+ onScrollCapture: scrollWheel,
978
+ onWheelCapture: scrollWheel,
979
+ onTouchMoveCapture: scrollTouchMove,
980
+ });
981
+ document.addEventListener('wheel', shouldPrevent, nonPassive);
982
+ document.addEventListener('touchmove', shouldPrevent, nonPassive);
983
+ document.addEventListener('touchstart', scrollTouchStart, nonPassive);
984
+ return function () {
985
+ lockStack = lockStack.filter(function (inst) { return inst !== Style; });
986
+ document.removeEventListener('wheel', shouldPrevent, nonPassive);
987
+ document.removeEventListener('touchmove', shouldPrevent, nonPassive);
988
+ document.removeEventListener('touchstart', scrollTouchStart, nonPassive);
989
+ };
990
+ }, []);
991
+ var removeScrollBar = props.removeScrollBar, inert = props.inert;
992
+ return (React__namespace.createElement(React__namespace.Fragment, null,
993
+ inert ? React__namespace.createElement(Style, { styles: generateStyle(id) }) : null,
994
+ removeScrollBar ? React__namespace.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null));
995
+ }
996
+ function getOutermostShadowParent(node) {
997
+ var shadowParent = null;
998
+ while (node !== null) {
999
+ if (node instanceof ShadowRoot) {
1000
+ shadowParent = node.host;
1001
+ node = node.host;
1002
+ }
1003
+ node = node.parentNode;
1004
+ }
1005
+ return shadowParent;
1006
+ }
1007
+
1008
+ var SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
1009
+
1010
+ var ReactRemoveScroll = React__namespace.forwardRef(function (props, ref) { return (React__namespace.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });
1011
+ ReactRemoveScroll.classNames = RemoveScroll.classNames;
1012
+
1013
+ var getDefaultParent = function (originalTarget) {
1014
+ if (typeof document === 'undefined') {
1015
+ return null;
1016
+ }
1017
+ var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
1018
+ return sampleTarget.ownerDocument.body;
1019
+ };
1020
+ var counterMap = new WeakMap();
1021
+ var uncontrolledNodes = new WeakMap();
1022
+ var markerMap = {};
1023
+ var lockCount = 0;
1024
+ var unwrapHost = function (node) {
1025
+ return node && (node.host || unwrapHost(node.parentNode));
1026
+ };
1027
+ var correctTargets = function (parent, targets) {
1028
+ return targets
1029
+ .map(function (target) {
1030
+ if (parent.contains(target)) {
1031
+ return target;
1032
+ }
1033
+ var correctedTarget = unwrapHost(target);
1034
+ if (correctedTarget && parent.contains(correctedTarget)) {
1035
+ return correctedTarget;
1036
+ }
1037
+ console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');
1038
+ return null;
1039
+ })
1040
+ .filter(function (x) { return Boolean(x); });
1041
+ };
1042
+ /**
1043
+ * Marks everything except given node(or nodes) as aria-hidden
1044
+ * @param {Element | Element[]} originalTarget - elements to keep on the page
1045
+ * @param [parentNode] - top element, defaults to document.body
1046
+ * @param {String} [markerName] - a special attribute to mark every node
1047
+ * @param {String} [controlAttribute] - html Attribute to control
1048
+ * @return {Undo} undo command
1049
+ */
1050
+ var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {
1051
+ var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1052
+ if (!markerMap[markerName]) {
1053
+ markerMap[markerName] = new WeakMap();
1054
+ }
1055
+ var markerCounter = markerMap[markerName];
1056
+ var hiddenNodes = [];
1057
+ var elementsToKeep = new Set();
1058
+ var elementsToStop = new Set(targets);
1059
+ var keep = function (el) {
1060
+ if (!el || elementsToKeep.has(el)) {
1061
+ return;
1062
+ }
1063
+ elementsToKeep.add(el);
1064
+ keep(el.parentNode);
1065
+ };
1066
+ targets.forEach(keep);
1067
+ var deep = function (parent) {
1068
+ if (!parent || elementsToStop.has(parent)) {
1069
+ return;
1070
+ }
1071
+ Array.prototype.forEach.call(parent.children, function (node) {
1072
+ if (elementsToKeep.has(node)) {
1073
+ deep(node);
1074
+ }
1075
+ else {
1076
+ try {
1077
+ var attr = node.getAttribute(controlAttribute);
1078
+ var alreadyHidden = attr !== null && attr !== 'false';
1079
+ var counterValue = (counterMap.get(node) || 0) + 1;
1080
+ var markerValue = (markerCounter.get(node) || 0) + 1;
1081
+ counterMap.set(node, counterValue);
1082
+ markerCounter.set(node, markerValue);
1083
+ hiddenNodes.push(node);
1084
+ if (counterValue === 1 && alreadyHidden) {
1085
+ uncontrolledNodes.set(node, true);
1086
+ }
1087
+ if (markerValue === 1) {
1088
+ node.setAttribute(markerName, 'true');
1089
+ }
1090
+ if (!alreadyHidden) {
1091
+ node.setAttribute(controlAttribute, 'true');
1092
+ }
1093
+ }
1094
+ catch (e) {
1095
+ console.error('aria-hidden: cannot operate on ', node, e);
1096
+ }
1097
+ }
1098
+ });
1099
+ };
1100
+ deep(parentNode);
1101
+ elementsToKeep.clear();
1102
+ lockCount++;
1103
+ return function () {
1104
+ hiddenNodes.forEach(function (node) {
1105
+ var counterValue = counterMap.get(node) - 1;
1106
+ var markerValue = markerCounter.get(node) - 1;
1107
+ counterMap.set(node, counterValue);
1108
+ markerCounter.set(node, markerValue);
1109
+ if (!counterValue) {
1110
+ if (!uncontrolledNodes.has(node)) {
1111
+ node.removeAttribute(controlAttribute);
1112
+ }
1113
+ uncontrolledNodes.delete(node);
1114
+ }
1115
+ if (!markerValue) {
1116
+ node.removeAttribute(markerName);
1117
+ }
1118
+ });
1119
+ lockCount--;
1120
+ if (!lockCount) {
1121
+ // clear
1122
+ counterMap = new WeakMap();
1123
+ counterMap = new WeakMap();
1124
+ uncontrolledNodes = new WeakMap();
1125
+ markerMap = {};
1126
+ }
1127
+ };
1128
+ };
1129
+ /**
1130
+ * Marks everything except given node(or nodes) as aria-hidden
1131
+ * @param {Element | Element[]} originalTarget - elements to keep on the page
1132
+ * @param [parentNode] - top element, defaults to document.body
1133
+ * @param {String} [markerName] - a special attribute to mark every node
1134
+ * @return {Undo} undo command
1135
+ */
1136
+ var hideOthers = function (originalTarget, parentNode, markerName) {
1137
+ if (markerName === void 0) { markerName = 'data-aria-hidden'; }
1138
+ var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1139
+ var activeParentNode = getDefaultParent(originalTarget);
1140
+ if (!activeParentNode) {
1141
+ return function () { return null; };
1142
+ }
1143
+ // we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10
1144
+ // and script elements, as they have no impact on accessibility.
1145
+ targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));
1146
+ return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
1147
+ };
1148
+
1149
+ exports.FocusScope = FocusScope;
1150
+ exports.ReactRemoveScroll = ReactRemoveScroll;
1151
+ exports.hideOthers = hideOthers;
1152
+ exports.useFocusGuards = useFocusGuards;
1153
+ //# sourceMappingURL=index-ChSOMM8b.js.map