@kadoui/react 2.0.1 → 2.1.2

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 (417) hide show
  1. package/README.md +1052 -376
  2. package/dist/react-components/Accordion/Accordion.d.ts +1 -0
  3. package/dist/react-components/Accordion/Accordion.d.ts.map +1 -1
  4. package/dist/react-components/Accordion/Accordion.js +1 -0
  5. package/dist/react-components/Accordion/AccordionBody.d.ts +1 -2
  6. package/dist/react-components/Accordion/AccordionBody.d.ts.map +1 -1
  7. package/dist/react-components/Accordion/AccordionContext.d.ts +1 -5
  8. package/dist/react-components/Accordion/AccordionContext.d.ts.map +1 -1
  9. package/dist/react-components/Accordion/AccordionRoot.d.ts +1 -2
  10. package/dist/react-components/Accordion/AccordionRoot.d.ts.map +1 -1
  11. package/dist/react-components/Accordion/AccordionToggle.d.ts +1 -4
  12. package/dist/react-components/Accordion/AccordionToggle.d.ts.map +1 -1
  13. package/dist/react-components/Accordion/accordionTypes.d.ts +12 -0
  14. package/dist/react-components/Accordion/accordionTypes.d.ts.map +1 -0
  15. package/dist/react-components/Accordion/accordionTypes.js +1 -0
  16. package/dist/react-components/Affix/Affix.d.ts +1 -2
  17. package/dist/react-components/Affix/Affix.d.ts.map +1 -1
  18. package/dist/react-components/Affix/affixTypes.d.ts +3 -0
  19. package/dist/react-components/Affix/affixTypes.d.ts.map +1 -0
  20. package/dist/react-components/Affix/affixTypes.js +1 -0
  21. package/dist/react-components/Breadcrumbs/Breadcrumbs.d.ts +1 -0
  22. package/dist/react-components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  23. package/dist/react-components/Breadcrumbs/Breadcrumbs.js +1 -0
  24. package/dist/react-components/Breadcrumbs/BreadcrumbsContext.d.ts +1 -4
  25. package/dist/react-components/Breadcrumbs/BreadcrumbsContext.d.ts.map +1 -1
  26. package/dist/react-components/Breadcrumbs/BreadcrumbsItem.d.ts +1 -4
  27. package/dist/react-components/Breadcrumbs/BreadcrumbsItem.d.ts.map +1 -1
  28. package/dist/react-components/Breadcrumbs/BreadcrumbsRoot.d.ts +1 -4
  29. package/dist/react-components/Breadcrumbs/BreadcrumbsRoot.d.ts.map +1 -1
  30. package/dist/react-components/Breadcrumbs/breadcrumbsTypes.d.ts +11 -0
  31. package/dist/react-components/Breadcrumbs/breadcrumbsTypes.d.ts.map +1 -0
  32. package/dist/react-components/Breadcrumbs/breadcrumbsTypes.js +1 -0
  33. package/dist/react-components/Carousel/Carousel.d.ts +1 -0
  34. package/dist/react-components/Carousel/Carousel.d.ts.map +1 -1
  35. package/dist/react-components/Carousel/Carousel.js +1 -0
  36. package/dist/react-components/Carousel/CarouselContainer.d.ts +1 -2
  37. package/dist/react-components/Carousel/CarouselContainer.d.ts.map +1 -1
  38. package/dist/react-components/Carousel/CarouselContext.d.ts +1 -8
  39. package/dist/react-components/Carousel/CarouselContext.d.ts.map +1 -1
  40. package/dist/react-components/Carousel/CarouselLeftFade.d.ts +1 -3
  41. package/dist/react-components/Carousel/CarouselLeftFade.d.ts.map +1 -1
  42. package/dist/react-components/Carousel/CarouselNextBtn.d.ts +1 -2
  43. package/dist/react-components/Carousel/CarouselNextBtn.d.ts.map +1 -1
  44. package/dist/react-components/Carousel/CarouselPrevBtn.d.ts +1 -2
  45. package/dist/react-components/Carousel/CarouselPrevBtn.d.ts.map +1 -1
  46. package/dist/react-components/Carousel/CarouselRightFade.d.ts +1 -3
  47. package/dist/react-components/Carousel/CarouselRightFade.d.ts.map +1 -1
  48. package/dist/react-components/Carousel/CarouselRoot.d.ts +1 -4
  49. package/dist/react-components/Carousel/CarouselRoot.d.ts.map +1 -1
  50. package/dist/react-components/Carousel/carouselTypes.d.ts +17 -0
  51. package/dist/react-components/Carousel/carouselTypes.d.ts.map +1 -0
  52. package/dist/react-components/Carousel/carouselTypes.js +1 -0
  53. package/dist/react-components/Choice/Choice.d.ts +1 -0
  54. package/dist/react-components/Choice/Choice.d.ts.map +1 -1
  55. package/dist/react-components/Choice/Choice.js +1 -0
  56. package/dist/react-components/Choice/ChoiceContext.d.ts +1 -16
  57. package/dist/react-components/Choice/ChoiceContext.d.ts.map +1 -1
  58. package/dist/react-components/Choice/ChoiceNavigation.d.ts +1 -3
  59. package/dist/react-components/Choice/ChoiceNavigation.d.ts.map +1 -1
  60. package/dist/react-components/Choice/ChoiceRoot.d.ts +1 -4
  61. package/dist/react-components/Choice/ChoiceRoot.d.ts.map +1 -1
  62. package/dist/react-components/Choice/ChoiceTrigger.d.ts +1 -5
  63. package/dist/react-components/Choice/ChoiceTrigger.d.ts.map +1 -1
  64. package/dist/react-components/Choice/choiceTypes.d.ts +23 -0
  65. package/dist/react-components/Choice/choiceTypes.d.ts.map +1 -0
  66. package/dist/react-components/Choice/choiceTypes.js +1 -0
  67. package/dist/react-components/ClientOnly/ClientOnly.d.ts +1 -2
  68. package/dist/react-components/ClientOnly/ClientOnly.d.ts.map +1 -1
  69. package/dist/react-components/ClientOnly/clientOnlyTypes.d.ts +3 -0
  70. package/dist/react-components/ClientOnly/clientOnlyTypes.d.ts.map +1 -0
  71. package/dist/react-components/ClientOnly/clientOnlyTypes.js +1 -0
  72. package/dist/react-components/Clipboard/Clipboard.d.ts +1 -6
  73. package/dist/react-components/Clipboard/Clipboard.d.ts.map +1 -1
  74. package/dist/react-components/Clipboard/clipboardTypes.d.ts +7 -0
  75. package/dist/react-components/Clipboard/clipboardTypes.d.ts.map +1 -0
  76. package/dist/react-components/Clipboard/clipboardTypes.js +1 -0
  77. package/dist/react-components/ContextMenu/ContextMenu.d.ts +1 -0
  78. package/dist/react-components/ContextMenu/ContextMenu.d.ts.map +1 -1
  79. package/dist/react-components/ContextMenu/ContextMenu.js +1 -0
  80. package/dist/react-components/ContextMenu/ContextMenuBody.d.ts +1 -2
  81. package/dist/react-components/ContextMenu/ContextMenuBody.d.ts.map +1 -1
  82. package/dist/react-components/ContextMenu/ContextMenuContext.d.ts +1 -10
  83. package/dist/react-components/ContextMenu/ContextMenuContext.d.ts.map +1 -1
  84. package/dist/react-components/ContextMenu/ContextMenuContext.js +1 -1
  85. package/dist/react-components/ContextMenu/ContextMenuItem.d.ts +1 -3
  86. package/dist/react-components/ContextMenu/ContextMenuItem.d.ts.map +1 -1
  87. package/dist/react-components/ContextMenu/ContextMenuNavigation.d.ts +1 -3
  88. package/dist/react-components/ContextMenu/ContextMenuNavigation.d.ts.map +1 -1
  89. package/dist/react-components/ContextMenu/ContextMenuNavigation.js +1 -1
  90. package/dist/react-components/ContextMenu/ContextMenuRoot.d.ts +1 -2
  91. package/dist/react-components/ContextMenu/ContextMenuRoot.d.ts.map +1 -1
  92. package/dist/react-components/ContextMenu/contextMenuTypes.d.ts +16 -0
  93. package/dist/react-components/ContextMenu/contextMenuTypes.d.ts.map +1 -0
  94. package/dist/react-components/ContextMenu/contextMenuTypes.js +1 -0
  95. package/dist/react-components/Drawer/Drawer.d.ts +1 -0
  96. package/dist/react-components/Drawer/Drawer.d.ts.map +1 -1
  97. package/dist/react-components/Drawer/Drawer.js +1 -0
  98. package/dist/react-components/Drawer/DrawerBody.d.ts +1 -4
  99. package/dist/react-components/Drawer/DrawerBody.d.ts.map +1 -1
  100. package/dist/react-components/Drawer/DrawerBody.js +1 -1
  101. package/dist/react-components/Drawer/DrawerContext.d.ts +1 -5
  102. package/dist/react-components/Drawer/DrawerContext.d.ts.map +1 -1
  103. package/dist/react-components/Drawer/DrawerPortal.d.ts +1 -2
  104. package/dist/react-components/Drawer/DrawerPortal.d.ts.map +1 -1
  105. package/dist/react-components/Drawer/DrawerPortal.js +1 -1
  106. package/dist/react-components/Drawer/DrawerRoot.d.ts +1 -2
  107. package/dist/react-components/Drawer/DrawerRoot.d.ts.map +1 -1
  108. package/dist/react-components/Drawer/DrawerRoot.js +1 -1
  109. package/dist/react-components/Drawer/DrawerToggle.d.ts +1 -2
  110. package/dist/react-components/Drawer/DrawerToggle.d.ts.map +1 -1
  111. package/dist/react-components/Drawer/drawerTypes.d.ts +13 -0
  112. package/dist/react-components/Drawer/drawerTypes.d.ts.map +1 -0
  113. package/dist/react-components/Drawer/drawerTypes.js +1 -0
  114. package/dist/react-components/DrawerSheet/DrawerSheet.d.ts +2 -0
  115. package/dist/react-components/DrawerSheet/DrawerSheet.d.ts.map +1 -0
  116. package/dist/react-components/DrawerSheet/DrawerSheet.js +1 -0
  117. package/dist/react-components/DrawerSheet/browser.d.ts +8 -0
  118. package/dist/react-components/DrawerSheet/browser.d.ts.map +1 -0
  119. package/dist/react-components/DrawerSheet/browser.js +27 -0
  120. package/dist/react-components/DrawerSheet/constants.d.ts +12 -0
  121. package/dist/react-components/DrawerSheet/constants.d.ts.map +1 -0
  122. package/dist/react-components/DrawerSheet/constants.js +11 -0
  123. package/dist/react-components/DrawerSheet/context.d.ts +38 -0
  124. package/dist/react-components/DrawerSheet/context.d.ts.map +1 -0
  125. package/dist/react-components/DrawerSheet/context.js +39 -0
  126. package/dist/react-components/DrawerSheet/helpers.d.ts +17 -0
  127. package/dist/react-components/DrawerSheet/helpers.d.ts.map +1 -0
  128. package/dist/react-components/DrawerSheet/helpers.js +97 -0
  129. package/dist/react-components/DrawerSheet/index.d.ts +147 -0
  130. package/dist/react-components/DrawerSheet/index.d.ts.map +1 -0
  131. package/dist/react-components/DrawerSheet/index.js +803 -0
  132. package/dist/react-components/DrawerSheet/types.d.ts +7 -0
  133. package/dist/react-components/DrawerSheet/types.d.ts.map +1 -0
  134. package/dist/react-components/DrawerSheet/types.js +1 -0
  135. package/dist/react-components/DrawerSheet/use-composed-refs.d.ts +14 -0
  136. package/dist/react-components/DrawerSheet/use-composed-refs.d.ts.map +1 -0
  137. package/dist/react-components/DrawerSheet/use-composed-refs.js +30 -0
  138. package/dist/react-components/DrawerSheet/use-controllable-state.d.ts +9 -0
  139. package/dist/react-components/DrawerSheet/use-controllable-state.d.ts.map +1 -0
  140. package/dist/react-components/DrawerSheet/use-controllable-state.js +41 -0
  141. package/dist/react-components/DrawerSheet/use-position-fixed.d.ts +19 -0
  142. package/dist/react-components/DrawerSheet/use-position-fixed.d.ts.map +1 -0
  143. package/dist/react-components/DrawerSheet/use-position-fixed.js +109 -0
  144. package/dist/react-components/DrawerSheet/use-prevent-scroll.d.ts +18 -0
  145. package/dist/react-components/DrawerSheet/use-prevent-scroll.d.ts.map +1 -0
  146. package/dist/react-components/DrawerSheet/use-prevent-scroll.js +237 -0
  147. package/dist/react-components/DrawerSheet/use-scale-background.d.ts +2 -0
  148. package/dist/react-components/DrawerSheet/use-scale-background.d.ts.map +1 -0
  149. package/dist/react-components/DrawerSheet/use-scale-background.js +50 -0
  150. package/dist/react-components/DrawerSheet/use-snap-points.d.ts +32 -0
  151. package/dist/react-components/DrawerSheet/use-snap-points.d.ts.map +1 -0
  152. package/dist/react-components/DrawerSheet/use-snap-points.js +200 -0
  153. package/dist/react-components/Modal/Modal.d.ts +1 -0
  154. package/dist/react-components/Modal/Modal.d.ts.map +1 -1
  155. package/dist/react-components/Modal/Modal.js +1 -0
  156. package/dist/react-components/Modal/ModalBody.d.ts +1 -2
  157. package/dist/react-components/Modal/ModalBody.d.ts.map +1 -1
  158. package/dist/react-components/Modal/ModalBody.js +1 -1
  159. package/dist/react-components/Modal/ModalContent.d.ts +1 -2
  160. package/dist/react-components/Modal/ModalContent.d.ts.map +1 -1
  161. package/dist/react-components/Modal/ModalContext.d.ts +1 -5
  162. package/dist/react-components/Modal/ModalContext.d.ts.map +1 -1
  163. package/dist/react-components/Modal/ModalHeader.d.ts +1 -2
  164. package/dist/react-components/Modal/ModalHeader.d.ts.map +1 -1
  165. package/dist/react-components/Modal/ModalPortal.d.ts +1 -2
  166. package/dist/react-components/Modal/ModalPortal.d.ts.map +1 -1
  167. package/dist/react-components/Modal/ModalPortal.js +1 -1
  168. package/dist/react-components/Modal/ModalRoot.d.ts +1 -4
  169. package/dist/react-components/Modal/ModalRoot.d.ts.map +1 -1
  170. package/dist/react-components/Modal/ModalRoot.js +1 -1
  171. package/dist/react-components/Modal/ModalTrigger.d.ts +1 -2
  172. package/dist/react-components/Modal/ModalTrigger.d.ts.map +1 -1
  173. package/dist/react-components/Modal/modalTypes.d.ts +15 -0
  174. package/dist/react-components/Modal/modalTypes.d.ts.map +1 -0
  175. package/dist/react-components/Modal/modalTypes.js +1 -0
  176. package/dist/react-components/Otp/Otp.d.ts +1 -0
  177. package/dist/react-components/Otp/Otp.d.ts.map +1 -1
  178. package/dist/react-components/Otp/Otp.js +1 -0
  179. package/dist/react-components/Otp/OtpContext.d.ts +2 -6
  180. package/dist/react-components/Otp/OtpContext.d.ts.map +1 -1
  181. package/dist/react-components/Otp/OtpHiddenInput.d.ts +1 -2
  182. package/dist/react-components/Otp/OtpHiddenInput.d.ts.map +1 -1
  183. package/dist/react-components/Otp/OtpInputs.d.ts +1 -5
  184. package/dist/react-components/Otp/OtpInputs.d.ts.map +1 -1
  185. package/dist/react-components/Otp/OtpRoot.d.ts +1 -4
  186. package/dist/react-components/Otp/OtpRoot.d.ts.map +1 -1
  187. package/dist/react-components/Otp/OtpRoot.js +1 -1
  188. package/dist/react-components/Otp/otpTypes.d.ts +15 -0
  189. package/dist/react-components/Otp/otpTypes.d.ts.map +1 -0
  190. package/dist/react-components/Otp/otpTypes.js +1 -0
  191. package/dist/react-components/Pagination/PaginationContext.d.ts +1 -10
  192. package/dist/react-components/Pagination/PaginationContext.d.ts.map +1 -1
  193. package/dist/react-components/Pagination/PaginationCounts.d.ts +1 -2
  194. package/dist/react-components/Pagination/PaginationCounts.d.ts.map +1 -1
  195. package/dist/react-components/Pagination/PaginationNextBtn.d.ts +1 -4
  196. package/dist/react-components/Pagination/PaginationNextBtn.d.ts.map +1 -1
  197. package/dist/react-components/Pagination/PaginationPrevBtn.d.ts +1 -4
  198. package/dist/react-components/Pagination/PaginationPrevBtn.d.ts.map +1 -1
  199. package/dist/react-components/Pagination/PaginationSearchParamsRoot.d.ts +1 -4
  200. package/dist/react-components/Pagination/PaginationSearchParamsRoot.d.ts.map +1 -1
  201. package/dist/react-components/Pagination/PaginationStateRoot.d.ts +1 -7
  202. package/dist/react-components/Pagination/PaginationStateRoot.d.ts.map +1 -1
  203. package/dist/react-components/Pagination/PaginationTypes.d.ts +23 -1
  204. package/dist/react-components/Pagination/PaginationTypes.d.ts.map +1 -1
  205. package/dist/react-components/PasswordInput/PasswordInput.d.ts +1 -0
  206. package/dist/react-components/PasswordInput/PasswordInput.d.ts.map +1 -1
  207. package/dist/react-components/PasswordInput/PasswordInput.js +1 -0
  208. package/dist/react-components/PasswordInput/PasswordInputContext.d.ts +1 -5
  209. package/dist/react-components/PasswordInput/PasswordInputContext.d.ts.map +1 -1
  210. package/dist/react-components/PasswordInput/PasswordInputField.d.ts +1 -2
  211. package/dist/react-components/PasswordInput/PasswordInputField.d.ts.map +1 -1
  212. package/dist/react-components/PasswordInput/PasswordInputRoot.d.ts +1 -2
  213. package/dist/react-components/PasswordInput/PasswordInputRoot.d.ts.map +1 -1
  214. package/dist/react-components/PasswordInput/PasswordInputToggle.d.ts +1 -4
  215. package/dist/react-components/PasswordInput/PasswordInputToggle.d.ts.map +1 -1
  216. package/dist/react-components/PasswordInput/passwordInputTypes.d.ts +11 -0
  217. package/dist/react-components/PasswordInput/passwordInputTypes.d.ts.map +1 -0
  218. package/dist/react-components/PasswordInput/passwordInputTypes.js +1 -0
  219. package/dist/react-components/Popover/Popover.d.ts +1 -0
  220. package/dist/react-components/Popover/Popover.d.ts.map +1 -1
  221. package/dist/react-components/Popover/Popover.js +1 -0
  222. package/dist/react-components/Popover/PopoverBody.d.ts +1 -4
  223. package/dist/react-components/Popover/PopoverBody.d.ts.map +1 -1
  224. package/dist/react-components/Popover/PopoverContext.d.ts +1 -8
  225. package/dist/react-components/Popover/PopoverContext.d.ts.map +1 -1
  226. package/dist/react-components/Popover/PopoverNavigation.d.ts +2 -2
  227. package/dist/react-components/Popover/PopoverNavigation.d.ts.map +1 -1
  228. package/dist/react-components/Popover/PopoverNavigation.js +1 -1
  229. package/dist/react-components/Popover/PopoverRoot.d.ts +1 -5
  230. package/dist/react-components/Popover/PopoverRoot.d.ts.map +1 -1
  231. package/dist/react-components/Popover/PopoverToggle.d.ts +1 -2
  232. package/dist/react-components/Popover/PopoverToggle.d.ts.map +1 -1
  233. package/dist/react-components/Popover/popoverTypes.d.ts +18 -0
  234. package/dist/react-components/Popover/popoverTypes.d.ts.map +1 -0
  235. package/dist/react-components/Popover/popoverTypes.js +1 -0
  236. package/dist/react-components/Portal/Portal.d.ts +1 -4
  237. package/dist/react-components/Portal/Portal.d.ts.map +1 -1
  238. package/dist/react-components/Portal/portalTypes.d.ts +5 -0
  239. package/dist/react-components/Portal/portalTypes.d.ts.map +1 -0
  240. package/dist/react-components/Portal/portalTypes.js +1 -0
  241. package/dist/react-components/Progress/Progress.d.ts +1 -0
  242. package/dist/react-components/Progress/Progress.d.ts.map +1 -1
  243. package/dist/react-components/Progress/Progress.js +1 -0
  244. package/dist/react-components/Progress/ProgressBar.d.ts +1 -4
  245. package/dist/react-components/Progress/ProgressBar.d.ts.map +1 -1
  246. package/dist/react-components/Progress/ProgressContext.d.ts +1 -4
  247. package/dist/react-components/Progress/ProgressContext.d.ts.map +1 -1
  248. package/dist/react-components/Progress/ProgressRoot.d.ts +1 -5
  249. package/dist/react-components/Progress/ProgressRoot.d.ts.map +1 -1
  250. package/dist/react-components/Progress/progressTypes.d.ts +14 -0
  251. package/dist/react-components/Progress/progressTypes.d.ts.map +1 -0
  252. package/dist/react-components/Progress/progressTypes.js +1 -0
  253. package/dist/react-components/QrCode/QrCode.d.ts +1 -6
  254. package/dist/react-components/QrCode/QrCode.d.ts.map +1 -1
  255. package/dist/react-components/QrCode/qrCodeTypes.d.ts +7 -0
  256. package/dist/react-components/QrCode/qrCodeTypes.d.ts.map +1 -0
  257. package/dist/react-components/QrCode/qrCodeTypes.js +1 -0
  258. package/dist/react-components/Rating/Rating.d.ts +2 -1
  259. package/dist/react-components/Rating/Rating.d.ts.map +1 -1
  260. package/dist/react-components/Rating/Rating.js +1 -0
  261. package/dist/react-components/Rating/RatingContext.d.ts +1 -5
  262. package/dist/react-components/Rating/RatingContext.d.ts.map +1 -1
  263. package/dist/react-components/Rating/RatingItems.d.ts +1 -8
  264. package/dist/react-components/Rating/RatingItems.d.ts.map +1 -1
  265. package/dist/react-components/Rating/RatingRoot.d.ts +1 -2
  266. package/dist/react-components/Rating/RatingRoot.d.ts.map +1 -1
  267. package/dist/react-components/Rating/ratingTypes.d.ts +14 -0
  268. package/dist/react-components/Rating/ratingTypes.d.ts.map +1 -0
  269. package/dist/react-components/Rating/ratingTypes.js +1 -0
  270. package/dist/react-components/Sheet/Sheet.d.ts +1 -0
  271. package/dist/react-components/Sheet/Sheet.d.ts.map +1 -1
  272. package/dist/react-components/Sheet/Sheet.js +1 -0
  273. package/dist/react-components/Sheet/SheetBody.d.ts +1 -2
  274. package/dist/react-components/Sheet/SheetBody.d.ts.map +1 -1
  275. package/dist/react-components/Sheet/SheetBody.js +1 -1
  276. package/dist/react-components/Sheet/SheetContent.d.ts +1 -2
  277. package/dist/react-components/Sheet/SheetContent.d.ts.map +1 -1
  278. package/dist/react-components/Sheet/SheetContext.d.ts +1 -9
  279. package/dist/react-components/Sheet/SheetContext.d.ts.map +1 -1
  280. package/dist/react-components/Sheet/SheetHandlebar.d.ts +1 -2
  281. package/dist/react-components/Sheet/SheetHandlebar.d.ts.map +1 -1
  282. package/dist/react-components/Sheet/SheetHeader.d.ts +1 -2
  283. package/dist/react-components/Sheet/SheetHeader.d.ts.map +1 -1
  284. package/dist/react-components/Sheet/SheetPortal.d.ts +1 -2
  285. package/dist/react-components/Sheet/SheetPortal.d.ts.map +1 -1
  286. package/dist/react-components/Sheet/SheetPortal.js +1 -1
  287. package/dist/react-components/Sheet/SheetRoot.d.ts +1 -2
  288. package/dist/react-components/Sheet/SheetRoot.d.ts.map +1 -1
  289. package/dist/react-components/Sheet/SheetRoot.js +1 -1
  290. package/dist/react-components/Sheet/SheetToggle.d.ts +1 -2
  291. package/dist/react-components/Sheet/SheetToggle.d.ts.map +1 -1
  292. package/dist/react-components/Sheet/sheetTypes.d.ts +17 -0
  293. package/dist/react-components/Sheet/sheetTypes.d.ts.map +1 -0
  294. package/dist/react-components/Sheet/sheetTypes.js +1 -0
  295. package/dist/react-components/ShowMore/ShowMore.d.ts +1 -0
  296. package/dist/react-components/ShowMore/ShowMore.d.ts.map +1 -1
  297. package/dist/react-components/ShowMore/ShowMore.js +1 -0
  298. package/dist/react-components/ShowMore/ShowMoreContent.d.ts +1 -2
  299. package/dist/react-components/ShowMore/ShowMoreContent.d.ts.map +1 -1
  300. package/dist/react-components/ShowMore/ShowMoreContext.d.ts +1 -8
  301. package/dist/react-components/ShowMore/ShowMoreContext.d.ts.map +1 -1
  302. package/dist/react-components/ShowMore/ShowMoreFade.d.ts +1 -2
  303. package/dist/react-components/ShowMore/ShowMoreFade.d.ts.map +1 -1
  304. package/dist/react-components/ShowMore/ShowMoreRoot.d.ts +1 -5
  305. package/dist/react-components/ShowMore/ShowMoreRoot.d.ts.map +1 -1
  306. package/dist/react-components/ShowMore/ShowMoreToggle.d.ts +1 -2
  307. package/dist/react-components/ShowMore/ShowMoreToggle.d.ts.map +1 -1
  308. package/dist/react-components/ShowMore/showMoreTypes.d.ts +16 -0
  309. package/dist/react-components/ShowMore/showMoreTypes.d.ts.map +1 -0
  310. package/dist/react-components/ShowMore/showMoreTypes.js +1 -0
  311. package/dist/react-components/Spoiler/Spoiler.d.ts +1 -0
  312. package/dist/react-components/Spoiler/Spoiler.d.ts.map +1 -1
  313. package/dist/react-components/Spoiler/Spoiler.js +1 -0
  314. package/dist/react-components/Spoiler/SpoilerBlur.d.ts +1 -2
  315. package/dist/react-components/Spoiler/SpoilerBlur.d.ts.map +1 -1
  316. package/dist/react-components/Spoiler/SpoilerContext.d.ts +1 -5
  317. package/dist/react-components/Spoiler/SpoilerContext.d.ts.map +1 -1
  318. package/dist/react-components/Spoiler/SpoilerRoot.d.ts +1 -2
  319. package/dist/react-components/Spoiler/SpoilerRoot.d.ts.map +1 -1
  320. package/dist/react-components/Spoiler/spoilerTypes.d.ts +8 -0
  321. package/dist/react-components/Spoiler/spoilerTypes.d.ts.map +1 -0
  322. package/dist/react-components/Spoiler/spoilerTypes.js +1 -0
  323. package/dist/react-components/Submit/Submit.d.ts +1 -0
  324. package/dist/react-components/Submit/Submit.d.ts.map +1 -1
  325. package/dist/react-components/Submit/Submit.js +1 -0
  326. package/dist/react-components/Submit/SubmitContext.d.ts +1 -3
  327. package/dist/react-components/Submit/SubmitContext.d.ts.map +1 -1
  328. package/dist/react-components/Submit/SubmitLoader.d.ts +2 -5
  329. package/dist/react-components/Submit/SubmitLoader.d.ts.map +1 -1
  330. package/dist/react-components/Submit/SubmitRoot.d.ts +1 -4
  331. package/dist/react-components/Submit/SubmitRoot.d.ts.map +1 -1
  332. package/dist/react-components/Submit/submitTypes.d.ts +11 -0
  333. package/dist/react-components/Submit/submitTypes.d.ts.map +1 -0
  334. package/dist/react-components/Submit/submitTypes.js +1 -0
  335. package/dist/react-components/Swap/Swap.d.ts +1 -0
  336. package/dist/react-components/Swap/Swap.d.ts.map +1 -1
  337. package/dist/react-components/Swap/Swap.js +1 -0
  338. package/dist/react-components/Swap/SwapBtn.d.ts +1 -4
  339. package/dist/react-components/Swap/SwapBtn.d.ts.map +1 -1
  340. package/dist/react-components/Swap/SwapContext.d.ts +1 -6
  341. package/dist/react-components/Swap/SwapContext.d.ts.map +1 -1
  342. package/dist/react-components/Swap/SwapRoot.d.ts +1 -6
  343. package/dist/react-components/Swap/SwapRoot.d.ts.map +1 -1
  344. package/dist/react-components/Swap/swapTypes.d.ts +15 -0
  345. package/dist/react-components/Swap/swapTypes.d.ts.map +1 -0
  346. package/dist/react-components/Swap/swapTypes.js +1 -0
  347. package/dist/react-components/Tabs/Tabs.d.ts +1 -0
  348. package/dist/react-components/Tabs/Tabs.d.ts.map +1 -1
  349. package/dist/react-components/Tabs/Tabs.js +1 -0
  350. package/dist/react-components/Tabs/TabsContext.d.ts +1 -5
  351. package/dist/react-components/Tabs/TabsContext.d.ts.map +1 -1
  352. package/dist/react-components/Tabs/TabsList.d.ts +1 -2
  353. package/dist/react-components/Tabs/TabsList.d.ts.map +1 -1
  354. package/dist/react-components/Tabs/TabsPanel.d.ts +1 -4
  355. package/dist/react-components/Tabs/TabsPanel.d.ts.map +1 -1
  356. package/dist/react-components/Tabs/TabsRoot.d.ts +1 -5
  357. package/dist/react-components/Tabs/TabsRoot.d.ts.map +1 -1
  358. package/dist/react-components/Tabs/TabsTab.d.ts +1 -4
  359. package/dist/react-components/Tabs/TabsTab.d.ts.map +1 -1
  360. package/dist/react-components/Tabs/tabsTypes.d.ts +18 -0
  361. package/dist/react-components/Tabs/tabsTypes.d.ts.map +1 -0
  362. package/dist/react-components/Tabs/tabsTypes.js +1 -0
  363. package/dist/react-components/Theme/Theme.d.ts +1 -0
  364. package/dist/react-components/Theme/Theme.d.ts.map +1 -1
  365. package/dist/react-components/Theme/Theme.js +1 -0
  366. package/dist/react-components/Theme/ThemeContext.d.ts +1 -5
  367. package/dist/react-components/Theme/ThemeContext.d.ts.map +1 -1
  368. package/dist/react-components/Theme/ThemeProvider.d.ts +1 -3
  369. package/dist/react-components/Theme/ThemeProvider.d.ts.map +1 -1
  370. package/dist/react-components/Theme/themeTypes.d.ts +8 -0
  371. package/dist/react-components/Theme/themeTypes.d.ts.map +1 -0
  372. package/dist/react-components/Theme/themeTypes.js +1 -0
  373. package/dist/react-components/Theme/useTheme.d.ts +2 -2
  374. package/dist/react-components/drawer-sheet/DrawerSheet.d.ts +23 -0
  375. package/dist/react-components/drawer-sheet/DrawerSheet.d.ts.map +1 -0
  376. package/dist/react-components/drawer-sheet/DrawerSheet.js +22 -0
  377. package/dist/react-components/drawer-sheet/DrawerSheetBackdrop.d.ts +3 -0
  378. package/dist/react-components/drawer-sheet/DrawerSheetBackdrop.d.ts.map +1 -0
  379. package/dist/react-components/drawer-sheet/DrawerSheetBackdrop.js +13 -0
  380. package/dist/react-components/drawer-sheet/DrawerSheetBody.d.ts +3 -0
  381. package/dist/react-components/drawer-sheet/DrawerSheetBody.d.ts.map +1 -0
  382. package/dist/react-components/drawer-sheet/DrawerSheetBody.js +165 -0
  383. package/dist/react-components/drawer-sheet/DrawerSheetContent.d.ts +3 -0
  384. package/dist/react-components/drawer-sheet/DrawerSheetContent.d.ts.map +1 -0
  385. package/dist/react-components/drawer-sheet/DrawerSheetContent.js +16 -0
  386. package/dist/react-components/drawer-sheet/DrawerSheetContext.d.ts +3 -0
  387. package/dist/react-components/drawer-sheet/DrawerSheetContext.d.ts.map +1 -0
  388. package/dist/react-components/drawer-sheet/DrawerSheetContext.js +2 -0
  389. package/dist/react-components/drawer-sheet/DrawerSheetHandlebar.d.ts +3 -0
  390. package/dist/react-components/drawer-sheet/DrawerSheetHandlebar.d.ts.map +1 -0
  391. package/dist/react-components/drawer-sheet/DrawerSheetHandlebar.js +5 -0
  392. package/dist/react-components/drawer-sheet/DrawerSheetHeader.d.ts +3 -0
  393. package/dist/react-components/drawer-sheet/DrawerSheetHeader.d.ts.map +1 -0
  394. package/dist/react-components/drawer-sheet/DrawerSheetHeader.js +5 -0
  395. package/dist/react-components/drawer-sheet/DrawerSheetPortal.d.ts +3 -0
  396. package/dist/react-components/drawer-sheet/DrawerSheetPortal.d.ts.map +1 -0
  397. package/dist/react-components/drawer-sheet/DrawerSheetPortal.js +13 -0
  398. package/dist/react-components/drawer-sheet/DrawerSheetProvider.d.ts +15 -0
  399. package/dist/react-components/drawer-sheet/DrawerSheetProvider.d.ts.map +1 -0
  400. package/dist/react-components/drawer-sheet/DrawerSheetProvider.js +75 -0
  401. package/dist/react-components/drawer-sheet/DrawerSheetRoot.d.ts +3 -0
  402. package/dist/react-components/drawer-sheet/DrawerSheetRoot.d.ts.map +1 -0
  403. package/dist/react-components/drawer-sheet/DrawerSheetRoot.js +130 -0
  404. package/dist/react-components/drawer-sheet/DrawerSheetToggle.d.ts +3 -0
  405. package/dist/react-components/drawer-sheet/DrawerSheetToggle.d.ts.map +1 -0
  406. package/dist/react-components/drawer-sheet/DrawerSheetToggle.js +11 -0
  407. package/dist/react-components/drawer-sheet/DrawerSheetViewport.d.ts +4 -0
  408. package/dist/react-components/drawer-sheet/DrawerSheetViewport.d.ts.map +1 -0
  409. package/dist/react-components/drawer-sheet/DrawerSheetViewport.js +5 -0
  410. package/dist/react-components/drawer-sheet/drawerSheetTypes.d.ts +30 -0
  411. package/dist/react-components/drawer-sheet/drawerSheetTypes.d.ts.map +1 -0
  412. package/dist/react-components/drawer-sheet/drawerSheetTypes.js +1 -0
  413. package/dist/react-exports.d.ts +1 -0
  414. package/dist/react-exports.d.ts.map +1 -1
  415. package/dist/react-exports.js +1 -0
  416. package/dist/tsconfig.tsbuildinfo +1 -1
  417. package/package.json +1 -1
@@ -1,12 +1,3 @@
1
- import { RefObject } from 'react';
2
- export type ContextMenuContextT = {
3
- isOpen: boolean;
4
- closeHandler: () => void;
5
- position: {
6
- x: number;
7
- y: number;
8
- } | undefined;
9
- contentRef: RefObject<HTMLDivElement | null>;
10
- };
1
+ import type { ContextMenuContextT } from "./contextMenuTypes";
11
2
  export declare const ContextMenuContext: import("react").Context<ContextMenuContextT>;
12
3
  //# sourceMappingURL=ContextMenuContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,SAAS,EAAkB,MAAM,OAAO,CAAA;AAE1E,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAC/C,UAAU,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAC9C,CAAA;AAED,eAAO,MAAM,kBAAkB,8CAAgE,CAAC"}
1
+ {"version":3,"file":"ContextMenuContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,eAAO,MAAM,kBAAkB,8CAAgE,CAAC"}
@@ -1,2 +1,2 @@
1
- import { createContext } from 'react';
1
+ import { createContext } from "react";
2
2
  export const ContextMenuContext = createContext({});
@@ -1,5 +1,3 @@
1
- import { ComponentProps } from "react";
2
- type ContextMenuItemPropsT = ComponentProps<"button">;
1
+ import type { ContextMenuItemPropsT } from "./contextMenuTypes";
3
2
  export declare function ContextMenuItem({ onClick, ...p }: ContextMenuItemPropsT): import("react/jsx-runtime").JSX.Element;
4
- export {};
5
3
  //# sourceMappingURL=ContextMenuItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuItem.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAO,MAAM,OAAO,CAAA;AAG3C,KAAK,qBAAqB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAEtD,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,qBAAqB,2CASvE"}
1
+ {"version":3,"file":"ContextMenuItem.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuItem.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,qBAAqB,2CASvE"}
@@ -1,5 +1,3 @@
1
- import { AccessNavigationPropsT } from "../AccessNavigation/AccessNavigation";
2
- type ContextMenuNavigationPropsT = AccessNavigationPropsT;
1
+ import type { ContextMenuNavigationPropsT } from "./contextMenuTypes";
3
2
  export declare function ContextMenuNavigation(p: ContextMenuNavigationPropsT): import("react/jsx-runtime").JSX.Element | null;
4
- export {};
5
3
  //# sourceMappingURL=ContextMenuNavigation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuNavigation.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuNavigation.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAoB,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAE/F,KAAK,2BAA2B,GAAG,sBAAsB,CAAC;AAE1D,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,2BAA2B,kDAInE"}
1
+ {"version":3,"file":"ContextMenuNavigation.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuNavigation.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEtE,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,2BAA2B,kDAInE"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { use } from "react";
4
- import { ContextMenuContext } from "./ContextMenuContext";
5
4
  import { AccessNavigation } from "../AccessNavigation/AccessNavigation";
5
+ import { ContextMenuContext } from "./ContextMenuContext";
6
6
  export function ContextMenuNavigation(p) {
7
7
  const { isOpen } = use(ContextMenuContext);
8
8
  return isOpen ? _jsx(AccessNavigation, { focusOnMount: true, ...p }) : null;
@@ -1,4 +1,3 @@
1
- import { type ComponentProps } from "react";
2
- export type ContextMenuRootPropsT = ComponentProps<"div">;
1
+ import type { ContextMenuRootPropsT } from "./contextMenuTypes";
3
2
  export declare function ContextMenuRoot({ onContextMenu, ...p }: ContextMenuRootPropsT): import("react/jsx-runtime").JSX.Element;
4
3
  //# sourceMappingURL=ContextMenuRoot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAwD,MAAM,OAAO,CAAC;AAKlG,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE1D,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,GAAG,CAAC,EAAE,EAAE,qBAAqB,2CAyE7E"}
1
+ {"version":3,"file":"ContextMenuRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuRoot.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAuB,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAErF,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,GAAG,CAAC,EAAE,EAAE,qBAAqB,2CAyE7E"}
@@ -0,0 +1,16 @@
1
+ import type { ComponentProps, RefObject } from "react";
2
+ import type { AccessNavigationPropsT } from "../AccessNavigation/AccessNavigation";
3
+ export type ContextMenuContextT = {
4
+ isOpen: boolean;
5
+ closeHandler: () => void;
6
+ position: {
7
+ x: number;
8
+ y: number;
9
+ } | undefined;
10
+ contentRef: RefObject<HTMLDivElement | null>;
11
+ };
12
+ export type ContextMenuRootPropsT = ComponentProps<"div">;
13
+ export type ContextMenuBodyPropsT = ComponentProps<"div">;
14
+ export type ContextMenuItemPropsT = ComponentProps<"button">;
15
+ export type ContextMenuNavigationPropsT = AccessNavigationPropsT;
16
+ //# sourceMappingURL=contextMenuTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextMenuTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/contextMenuTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAY,SAAS,EAAkB,MAAM,OAAO,CAAC;AAEjF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAEnF,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAC/C,UAAU,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAE7D,MAAM,MAAM,2BAA2B,GAAG,sBAAsB,CAAC"}
@@ -7,4 +7,5 @@ export declare const Drawer: typeof DrawerRoot & {
7
7
  Portal: typeof DrawerPortal;
8
8
  Body: typeof DrawerBody;
9
9
  };
10
+ export * from "./drawerTypes";
10
11
  //# sourceMappingURL=Drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/Drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,eAAO,MAAM,MAAM;;;;CAIjB,CAAC"}
1
+ {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/Drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,eAAO,MAAM,MAAM;;;;CAIjB,CAAC;AAEH,cAAc,eAAe,CAAC"}
@@ -7,3 +7,4 @@ export const Drawer = Object.assign(DrawerRoot, {
7
7
  Portal: DrawerPortal,
8
8
  Body: DrawerBody
9
9
  });
10
+ export * from "./drawerTypes";
@@ -1,6 +1,3 @@
1
- import { HTMLMotionProps } from "framer-motion";
2
- export type DrawerBodyPropsT = HTMLMotionProps<"div"> & {
3
- position?: "top" | "right" | "bottom" | "left";
4
- };
1
+ import type { DrawerBodyPropsT } from "./drawerTypes";
5
2
  export declare function DrawerBody({ position, dir, children, ...p }: DrawerBodyPropsT): import("react/jsx-runtime").JSX.Element;
6
3
  //# sourceMappingURL=DrawerBody.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerBody.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerBody.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,eAAe,EAAE,MAAM,eAAe,CAAC;AAMxD,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG;IACtD,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAChD,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,EAAE,gBAAgB,2CAwD7E"}
1
+ {"version":3,"file":"DrawerBody.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerBody.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,EAAE,gBAAgB,2CAwD7E"}
@@ -2,8 +2,8 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { motion } from "framer-motion";
4
4
  import { use, useEffect, useRef } from "react";
5
- import { DrawerContext } from "./DrawerContext";
6
5
  import { FRAMER_MOTION_DURATION } from "../../configs";
6
+ import { DrawerContext } from "./DrawerContext";
7
7
  export function DrawerBody({ position, dir, children, ...p }) {
8
8
  const { isOpen } = use(DrawerContext);
9
9
  const bodyRef = useRef(null);
@@ -1,7 +1,3 @@
1
- import { Dispatch, SetStateAction } from "react";
2
- export type DrawerContextT = {
3
- isOpen: boolean;
4
- setOpen: Dispatch<SetStateAction<boolean>>;
5
- };
1
+ import type { DrawerContextT } from "./drawerTypes";
6
2
  export declare const DrawerContext: import("react").Context<DrawerContextT>;
7
3
  //# sourceMappingURL=DrawerContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEhE,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,aAAa,yCAAsD,CAAC"}
1
+ {"version":3,"file":"DrawerContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,eAAO,MAAM,aAAa,yCAAsD,CAAC"}
@@ -1,4 +1,3 @@
1
- import { HTMLMotionProps } from "framer-motion";
2
- export type DrawerPortalPropsT = HTMLMotionProps<"div">;
1
+ import type { DrawerPortalPropsT } from "./drawerTypes";
3
2
  export declare function DrawerPortal({ onClick, ...p }: DrawerPortalPropsT): import("react/jsx-runtime").JSX.Element;
4
3
  //# sourceMappingURL=DrawerPortal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerPortal.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerPortal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA2B,eAAe,EAAE,MAAM,eAAe,CAAC;AAMzE,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;AAExD,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,kBAAkB,2CAuBjE"}
1
+ {"version":3,"file":"DrawerPortal.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerPortal.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,kBAAkB,2CAuBjE"}
@@ -2,9 +2,9 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { use } from "react";
4
4
  import { motion, AnimatePresence } from "framer-motion";
5
+ import { ClientOnly } from "../ClientOnly/ClientOnly";
5
6
  import { Portal } from "../Portal/Portal";
6
7
  import { DrawerContext } from "./DrawerContext";
7
- import { ClientOnly } from "../ClientOnly/ClientOnly";
8
8
  export function DrawerPortal({ onClick, ...p }) {
9
9
  const { isOpen, setOpen } = use(DrawerContext);
10
10
  return (_jsx(ClientOnly, { children: _jsx(Portal, { children: _jsx(AnimatePresence, { children: isOpen ? (_jsx(motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: ev => {
@@ -1,4 +1,3 @@
1
- import { PropsWithChildren } from "react";
2
- export type DrawerRootPropsT = PropsWithChildren;
1
+ import type { DrawerRootPropsT } from "./drawerTypes";
3
2
  export declare function DrawerRoot({ children }: DrawerRootPropsT): import("react/jsx-runtime").JSX.Element;
4
3
  //# sourceMappingURL=DrawerRoot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerRoot.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK/D,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAEjD,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,2CA2CxD"}
1
+ {"version":3,"file":"DrawerRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerRoot.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,2CA2CxD"}
@@ -2,8 +2,8 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { usePathname } from "next/navigation";
4
4
  import { useState, useEffect } from "react";
5
- import { DrawerContext } from "./DrawerContext";
6
5
  import { getBrowserScrollbarWith } from "../../utils-exports";
6
+ import { DrawerContext } from "./DrawerContext";
7
7
  export function DrawerRoot({ children }) {
8
8
  const pathname = usePathname();
9
9
  const [isOpen, setOpen] = useState(false);
@@ -1,4 +1,3 @@
1
- import { type ComponentProps } from "react";
2
- export type DrawerTogglePropsT = ComponentProps<"button">;
1
+ import type { DrawerTogglePropsT } from "./drawerTypes";
3
2
  export declare function DrawerToggle({ onClick, ...props }: DrawerTogglePropsT): import("react/jsx-runtime").JSX.Element;
4
3
  //# sourceMappingURL=DrawerToggle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerToggle.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerToggle.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAO,MAAM,OAAO,CAAC;AAIjD,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAE1D,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAYrE"}
1
+ {"version":3,"file":"DrawerToggle.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerToggle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAYrE"}
@@ -0,0 +1,13 @@
1
+ import type { HTMLMotionProps } from "framer-motion";
2
+ import type { ComponentProps, Dispatch, PropsWithChildren, SetStateAction } from "react";
3
+ export type DrawerContextT = {
4
+ isOpen: boolean;
5
+ setOpen: Dispatch<SetStateAction<boolean>>;
6
+ };
7
+ export type DrawerRootPropsT = PropsWithChildren;
8
+ export type DrawerBodyPropsT = HTMLMotionProps<"div"> & {
9
+ position?: "top" | "right" | "bottom" | "left";
10
+ };
11
+ export type DrawerTogglePropsT = ComponentProps<"button">;
12
+ export type DrawerPortalPropsT = HTMLMotionProps<"div">;
13
+ //# sourceMappingURL=drawerTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawerTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/drawerTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEzF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAEjD,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG;IACtD,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAE1D,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { DrawerSheet } from "./index";
2
+ //# sourceMappingURL=DrawerSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DrawerSheet.d.ts","sourceRoot":"","sources":["../../../src/react-components/DrawerSheet/DrawerSheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ export { DrawerSheet } from "./index";
@@ -0,0 +1,8 @@
1
+ export declare function isMobileFirefox(): boolean | undefined;
2
+ export declare function isMac(): boolean | undefined;
3
+ export declare function isIPhone(): boolean | undefined;
4
+ export declare function isSafari(): boolean | undefined;
5
+ export declare function isIPad(): boolean | undefined;
6
+ export declare function isIOS(): boolean | undefined;
7
+ export declare function testPlatform(re: RegExp): boolean | undefined;
8
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/react-components/DrawerSheet/browser.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,IAAI,OAAO,GAAG,SAAS,CAOrD;AAED,wBAAgB,KAAK,IAAI,OAAO,GAAG,SAAS,CAE3C;AAED,wBAAgB,QAAQ,IAAI,OAAO,GAAG,SAAS,CAE9C;AAED,wBAAgB,QAAQ,IAAI,OAAO,GAAG,SAAS,CAE9C;AAED,wBAAgB,MAAM,IAAI,OAAO,GAAG,SAAS,CAM5C;AAED,wBAAgB,KAAK,IAAI,OAAO,GAAG,SAAS,CAE3C;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAE5D"}
@@ -0,0 +1,27 @@
1
+ export function isMobileFirefox() {
2
+ const userAgent = navigator.userAgent;
3
+ return (typeof window !== 'undefined' &&
4
+ ((/Firefox/.test(userAgent) && /Mobile/.test(userAgent)) || // Android Firefox
5
+ /FxiOS/.test(userAgent)) // iOS Firefox
6
+ );
7
+ }
8
+ export function isMac() {
9
+ return testPlatform(/^Mac/);
10
+ }
11
+ export function isIPhone() {
12
+ return testPlatform(/^iPhone/);
13
+ }
14
+ export function isSafari() {
15
+ return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
16
+ }
17
+ export function isIPad() {
18
+ return (testPlatform(/^iPad/) ||
19
+ // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
20
+ (isMac() && navigator.maxTouchPoints > 1));
21
+ }
22
+ export function isIOS() {
23
+ return isIPhone() || isIPad();
24
+ }
25
+ export function testPlatform(re) {
26
+ return typeof window !== 'undefined' && window.navigator != null ? re.test(window.navigator.platform) : undefined;
27
+ }
@@ -0,0 +1,12 @@
1
+ export declare const TRANSITIONS: {
2
+ DURATION: number;
3
+ EASE: number[];
4
+ };
5
+ export declare const VELOCITY_THRESHOLD = 0.4;
6
+ export declare const CLOSE_THRESHOLD = 0.25;
7
+ export declare const SCROLL_LOCK_TIMEOUT = 100;
8
+ export declare const BORDER_RADIUS = 8;
9
+ export declare const NESTED_DISPLACEMENT = 16;
10
+ export declare const WINDOW_TOP_OFFSET = 26;
11
+ export declare const DRAG_CLASS = "drawer-sheet-dragging";
12
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/react-components/DrawerSheet/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;CAGvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,UAAU,0BAA0B,CAAC"}
@@ -0,0 +1,11 @@
1
+ export const TRANSITIONS = {
2
+ DURATION: 0.5,
3
+ EASE: [0.32, 0.72, 0, 1],
4
+ };
5
+ export const VELOCITY_THRESHOLD = 0.4;
6
+ export const CLOSE_THRESHOLD = 0.25;
7
+ export const SCROLL_LOCK_TIMEOUT = 100;
8
+ export const BORDER_RADIUS = 8;
9
+ export const NESTED_DISPLACEMENT = 16;
10
+ export const WINDOW_TOP_OFFSET = 26;
11
+ export const DRAG_CLASS = 'drawer-sheet-dragging';
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import { DrawerDirection } from './types';
3
+ interface DrawerContextValue {
4
+ drawerRef: React.RefObject<HTMLDivElement | null>;
5
+ overlayRef: React.RefObject<HTMLDivElement | null>;
6
+ onPress: (event: React.PointerEvent<HTMLDivElement>) => void;
7
+ onRelease: (event: React.PointerEvent<HTMLDivElement> | null) => void;
8
+ onDrag: (event: React.PointerEvent<HTMLDivElement>) => void;
9
+ onNestedDrag: (event: React.PointerEvent<HTMLDivElement>, percentageDragged: number) => void;
10
+ onNestedOpenChange: (o: boolean) => void;
11
+ onNestedRelease: (event: React.PointerEvent<HTMLDivElement>, open: boolean) => void;
12
+ dismissible: boolean;
13
+ isOpen: boolean;
14
+ isDragging: boolean;
15
+ keyboardIsOpen: React.MutableRefObject<boolean>;
16
+ snapPointsOffset: number[] | null;
17
+ snapPoints?: (number | string)[] | null;
18
+ activeSnapPointIndex?: number | null;
19
+ modal: boolean;
20
+ shouldFade: boolean;
21
+ activeSnapPoint?: number | string | null;
22
+ setActiveSnapPoint: (o: number | string | null) => void;
23
+ closeDrawer: (fromWithin?: boolean) => void;
24
+ openProp?: boolean;
25
+ onOpenChange?: (o: boolean) => void;
26
+ direction: DrawerDirection;
27
+ shouldScaleBackground: boolean;
28
+ setBackgroundColorOnScale: boolean;
29
+ noBodyStyles: boolean;
30
+ handleOnly?: boolean;
31
+ container?: HTMLElement | null;
32
+ autoFocus?: boolean;
33
+ shouldAnimate?: React.RefObject<boolean>;
34
+ }
35
+ export declare const DrawerContext: React.Context<DrawerContextValue>;
36
+ export declare const useDrawerContext: () => DrawerContextValue;
37
+ export {};
38
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/react-components/DrawerSheet/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,UAAU,kBAAkB;IAC1B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAClD,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACnD,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC7D,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACtE,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC5D,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE,iBAAiB,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7F,kBAAkB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACpF,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChD,gBAAgB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;IACxC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACzC,kBAAkB,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,WAAW,EAAE,CAAC,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,SAAS,EAAE,eAAe,CAAC;IAC3B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,OAAO,CAAC;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,aAAa,mCA8BxB,CAAC;AAEH,eAAO,MAAM,gBAAgB,0BAM5B,CAAC"}
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ export const DrawerContext = React.createContext({
3
+ drawerRef: { current: null },
4
+ overlayRef: { current: null },
5
+ onPress: () => { },
6
+ onRelease: () => { },
7
+ onDrag: () => { },
8
+ onNestedDrag: () => { },
9
+ onNestedOpenChange: () => { },
10
+ onNestedRelease: () => { },
11
+ openProp: undefined,
12
+ dismissible: false,
13
+ isOpen: false,
14
+ isDragging: false,
15
+ keyboardIsOpen: { current: false },
16
+ snapPointsOffset: null,
17
+ snapPoints: null,
18
+ handleOnly: false,
19
+ modal: false,
20
+ shouldFade: false,
21
+ activeSnapPoint: null,
22
+ onOpenChange: () => { },
23
+ setActiveSnapPoint: () => { },
24
+ closeDrawer: () => { },
25
+ direction: 'bottom',
26
+ shouldAnimate: { current: true },
27
+ shouldScaleBackground: false,
28
+ setBackgroundColorOnScale: true,
29
+ noBodyStyles: false,
30
+ container: null,
31
+ autoFocus: false,
32
+ });
33
+ export const useDrawerContext = () => {
34
+ const context = React.useContext(DrawerContext);
35
+ if (!context) {
36
+ throw new Error('useDrawerContext must be used within a Drawer.Root');
37
+ }
38
+ return context;
39
+ };
@@ -0,0 +1,17 @@
1
+ import { AnyFunction, DrawerDirection } from './types';
2
+ interface Style {
3
+ [key: string]: string;
4
+ }
5
+ export declare function isInView(el: HTMLElement): boolean;
6
+ export declare function set(el: Element | HTMLElement | null | undefined, styles: Style, ignoreCache?: boolean): void;
7
+ export declare function reset(el: Element | HTMLElement | null, prop?: string): void;
8
+ export declare const isVertical: (direction: DrawerDirection) => boolean;
9
+ export declare function getTranslate(element: HTMLElement, direction: DrawerDirection): number | null;
10
+ export declare function dampenValue(v: number): number;
11
+ export declare function assignStyle(element: HTMLElement | null | undefined, style: Partial<CSSStyleDeclaration>): () => void;
12
+ /**
13
+ * Receives functions as arguments and returns a new function that calls all.
14
+ */
15
+ export declare function chain<T>(...fns: T[]): (...args: T extends AnyFunction ? Parameters<T> : never) => void;
16
+ export {};
17
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/react-components/DrawerSheet/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEvD,UAAU,KAAK;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAID,wBAAgB,QAAQ,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAYjD;AAED,wBAAgB,GAAG,CAAC,EAAE,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,UAAQ,QAiBnG;AAED,wBAAgB,KAAK,CAAC,EAAE,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,QAepE;AAED,eAAO,MAAM,UAAU,GAAI,WAAW,eAAe,YAWpD,CAAC;AAEF,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAgB5F;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,UAEpC;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,cASvG;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,EAAE,IAC1B,GAAG,MAAM,CAAC,SAAS,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,UAQ/D"}
@@ -0,0 +1,97 @@
1
+ const cache = new WeakMap();
2
+ export function isInView(el) {
3
+ const rect = el.getBoundingClientRect();
4
+ if (!window.visualViewport)
5
+ return false;
6
+ return (rect.top >= 0 &&
7
+ rect.left >= 0 &&
8
+ // Need + 40 for safari detection
9
+ rect.bottom <= window.visualViewport.height - 40 &&
10
+ rect.right <= window.visualViewport.width);
11
+ }
12
+ export function set(el, styles, ignoreCache = false) {
13
+ if (!el || !(el instanceof HTMLElement))
14
+ return;
15
+ let originalStyles = {};
16
+ Object.entries(styles).forEach(([key, value]) => {
17
+ if (key.startsWith('--')) {
18
+ el.style.setProperty(key, value);
19
+ return;
20
+ }
21
+ originalStyles[key] = el.style[key];
22
+ el.style[key] = value;
23
+ });
24
+ if (ignoreCache)
25
+ return;
26
+ cache.set(el, originalStyles);
27
+ }
28
+ export function reset(el, prop) {
29
+ if (!el || !(el instanceof HTMLElement))
30
+ return;
31
+ let originalStyles = cache.get(el);
32
+ if (!originalStyles) {
33
+ return;
34
+ }
35
+ if (prop) {
36
+ el.style[prop] = originalStyles[prop];
37
+ }
38
+ else {
39
+ Object.entries(originalStyles).forEach(([key, value]) => {
40
+ el.style[key] = value;
41
+ });
42
+ }
43
+ }
44
+ export const isVertical = (direction) => {
45
+ switch (direction) {
46
+ case 'top':
47
+ case 'bottom':
48
+ return true;
49
+ case 'left':
50
+ case 'right':
51
+ return false;
52
+ default:
53
+ return direction;
54
+ }
55
+ };
56
+ export function getTranslate(element, direction) {
57
+ if (!element) {
58
+ return null;
59
+ }
60
+ const style = window.getComputedStyle(element);
61
+ const transform =
62
+ // @ts-ignore
63
+ style.transform || style.webkitTransform || style.mozTransform;
64
+ let mat = transform.match(/^matrix3d\((.+)\)$/);
65
+ if (mat) {
66
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d
67
+ return parseFloat(mat[1].split(', ')[isVertical(direction) ? 13 : 12]);
68
+ }
69
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix
70
+ mat = transform.match(/^matrix\((.+)\)$/);
71
+ return mat ? parseFloat(mat[1].split(', ')[isVertical(direction) ? 5 : 4]) : null;
72
+ }
73
+ export function dampenValue(v) {
74
+ return 8 * (Math.log(v + 1) - 2);
75
+ }
76
+ export function assignStyle(element, style) {
77
+ if (!element)
78
+ return () => { };
79
+ const prevStyle = element.style.cssText;
80
+ Object.assign(element.style, style);
81
+ return () => {
82
+ element.style.cssText = prevStyle;
83
+ };
84
+ }
85
+ /**
86
+ * Receives functions as arguments and returns a new function that calls all.
87
+ */
88
+ export function chain(...fns) {
89
+ return (...args) => {
90
+ for (const fn of fns) {
91
+ if (typeof fn === 'function') {
92
+ // @ts-ignore
93
+ fn(...args);
94
+ }
95
+ }
96
+ };
97
+ }