@spark-ui/components 13.1.4 → 13.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (731) hide show
  1. package/dist/Button-B6rA3-e5.js +2 -0
  2. package/dist/Button-B6rA3-e5.js.map +1 -0
  3. package/dist/{chunk-2YM6GKWW.mjs → Button-C3C0aixy.mjs} +130 -173
  4. package/dist/Button-C3C0aixy.mjs.map +1 -0
  5. package/dist/DialogContent.styles-B5pR8ECK.js +2 -0
  6. package/dist/DialogContent.styles-B5pR8ECK.js.map +1 -0
  7. package/dist/{chunk-XZ47F6TP.mjs → DialogContent.styles-_lRDsl8c.mjs} +6 -8
  8. package/dist/DialogContent.styles-_lRDsl8c.mjs.map +1 -0
  9. package/dist/Icon-CF0W0LKr.js +2 -0
  10. package/dist/Icon-CF0W0LKr.js.map +1 -0
  11. package/dist/Icon-Ck-dhfLd.mjs +58 -0
  12. package/dist/Icon-Ck-dhfLd.mjs.map +1 -0
  13. package/dist/IconButton-C62-axzv.mjs +43 -0
  14. package/dist/IconButton-C62-axzv.mjs.map +1 -0
  15. package/dist/IconButton-D3g86WpZ.js +2 -0
  16. package/dist/IconButton-D3g86WpZ.js.map +1 -0
  17. package/dist/Slot-D2Bbf8Gw.mjs +14 -0
  18. package/dist/Slot-D2Bbf8Gw.mjs.map +1 -0
  19. package/dist/Slot-DQ8z2zsy.js +2 -0
  20. package/dist/Slot-DQ8z2zsy.js.map +1 -0
  21. package/dist/Spinner-_Kffli3B.js +2 -0
  22. package/dist/Spinner-_Kffli3B.js.map +1 -0
  23. package/dist/{chunk-GAK4SC2F.mjs → Spinner-jF3-zoh_.mjs} +29 -40
  24. package/dist/Spinner-jF3-zoh_.mjs.map +1 -0
  25. package/dist/{chunk-RKPP7ZOK.mjs → TextLink-BuzFRWO6.mjs} +27 -36
  26. package/dist/TextLink-BuzFRWO6.mjs.map +1 -0
  27. package/dist/TextLink-C3xDLsbC.js +2 -0
  28. package/dist/TextLink-C3xDLsbC.js.map +1 -0
  29. package/dist/VisuallyHidden-CB6Nx76j.js +2 -0
  30. package/dist/VisuallyHidden-CB6Nx76j.js.map +1 -0
  31. package/dist/VisuallyHidden-KH1biLx-.mjs +28 -0
  32. package/dist/VisuallyHidden-KH1biLx-.mjs.map +1 -0
  33. package/dist/accordion/Accordion.d.ts +27 -0
  34. package/dist/accordion/AccordionItem.d.ts +12 -0
  35. package/dist/accordion/AccordionItemContent.d.ts +12 -0
  36. package/dist/accordion/AccordionItemHeader.d.ts +9 -0
  37. package/dist/accordion/AccordionItemTrigger.d.ts +12 -0
  38. package/dist/accordion/index.d.mts +10 -68
  39. package/dist/accordion/index.d.ts +10 -68
  40. package/dist/accordion/index.js +2 -325
  41. package/dist/accordion/index.js.map +1 -1
  42. package/dist/accordion/index.mjs +114 -154
  43. package/dist/accordion/index.mjs.map +1 -1
  44. package/dist/accordion/useRenderSlot.d.ts +3 -0
  45. package/dist/alert-dialog/AlertDialog.d.ts +29 -0
  46. package/dist/alert-dialog/AlertDialogAction.d.ts +13 -0
  47. package/dist/alert-dialog/AlertDialogBody.d.ts +12 -0
  48. package/dist/alert-dialog/AlertDialogCancel.d.ts +13 -0
  49. package/dist/alert-dialog/AlertDialogContent.d.ts +9 -0
  50. package/dist/alert-dialog/AlertDialogContext.d.ts +12 -0
  51. package/dist/alert-dialog/AlertDialogDescription.d.ts +9 -0
  52. package/dist/alert-dialog/AlertDialogFooter.d.ts +10 -0
  53. package/dist/alert-dialog/AlertDialogHeader.d.ts +10 -0
  54. package/dist/alert-dialog/AlertDialogOverlay.d.ts +9 -0
  55. package/dist/alert-dialog/AlertDialogPortal.d.ts +7 -0
  56. package/dist/alert-dialog/AlertDialogTitle.d.ts +9 -0
  57. package/dist/alert-dialog/AlertDialogTrigger.d.ts +13 -0
  58. package/dist/alert-dialog/index.d.mts +26 -147
  59. package/dist/alert-dialog/index.d.ts +26 -147
  60. package/dist/alert-dialog/index.js +2 -405
  61. package/dist/alert-dialog/index.js.map +1 -1
  62. package/dist/alert-dialog/index.mjs +172 -260
  63. package/dist/alert-dialog/index.mjs.map +1 -1
  64. package/dist/alert-dialog/useRenderSlot.d.ts +3 -0
  65. package/dist/avatar/Avatar.d.ts +3 -0
  66. package/dist/avatar/AvatarAction.d.ts +9 -0
  67. package/dist/avatar/AvatarImage.d.ts +7 -0
  68. package/dist/avatar/AvatarOnlineBadge.d.ts +9 -0
  69. package/dist/avatar/AvatarPlaceholder.d.ts +8 -0
  70. package/dist/avatar/AvatarUser.d.ts +7 -0
  71. package/dist/avatar/context.d.ts +5 -0
  72. package/dist/avatar/index.d.mts +8 -59
  73. package/dist/avatar/index.d.ts +8 -59
  74. package/dist/avatar/index.js +2 -1323
  75. package/dist/avatar/index.js.map +1 -1
  76. package/dist/avatar/index.mjs +149 -207
  77. package/dist/avatar/index.mjs.map +1 -1
  78. package/dist/avatar/types.d.ts +24 -0
  79. package/dist/badge/Badge.d.ts +9 -0
  80. package/dist/badge/BadgeItem.d.ts +31 -0
  81. package/dist/badge/BadgeItem.styles.d.ts +7 -0
  82. package/dist/badge/index.d.mts +1 -47
  83. package/dist/badge/index.d.ts +1 -47
  84. package/dist/badge/index.js +2 -122
  85. package/dist/badge/index.js.map +1 -1
  86. package/dist/badge/index.mjs +32 -44
  87. package/dist/badge/index.mjs.map +1 -1
  88. package/dist/breadcrumb/Breadcrumb.d.ts +10 -0
  89. package/dist/breadcrumb/Breadcrumb.styles.d.ts +0 -0
  90. package/dist/breadcrumb/BreadcrumbCurrentPage.d.ts +11 -0
  91. package/dist/breadcrumb/BreadcrumbItem.d.ts +9 -0
  92. package/dist/breadcrumb/BreadcrumbLink.d.ts +12 -0
  93. package/dist/breadcrumb/BreadcrumbSeparator.d.ts +10 -0
  94. package/dist/breadcrumb/index.d.mts +7 -59
  95. package/dist/breadcrumb/index.d.ts +7 -59
  96. package/dist/breadcrumb/index.js +2 -327
  97. package/dist/breadcrumb/index.js.map +1 -1
  98. package/dist/breadcrumb/index.mjs +106 -146
  99. package/dist/breadcrumb/index.mjs.map +1 -1
  100. package/dist/button/Button.d.ts +26 -0
  101. package/dist/button/Button.styles.d.ts +10 -0
  102. package/dist/button/index.d.mts +1 -41
  103. package/dist/button/index.d.ts +1 -41
  104. package/dist/button/index.js +2 -935
  105. package/dist/button/index.js.map +1 -1
  106. package/dist/button/index.mjs +3 -8
  107. package/dist/button/index.mjs.map +1 -1
  108. package/dist/button/variants/contrast.d.ts +45 -0
  109. package/dist/button/variants/filled.d.ts +45 -0
  110. package/dist/button/variants/ghost.d.ts +45 -0
  111. package/dist/button/variants/index.d.mts +5 -0
  112. package/dist/button/variants/index.d.ts +5 -0
  113. package/dist/button/variants/outlined.d.ts +45 -0
  114. package/dist/button/variants/tinted.d.ts +45 -0
  115. package/dist/card/Backdrop.d.ts +14 -0
  116. package/dist/card/Card.d.ts +16 -0
  117. package/dist/card/Card.styles.d.ts +7 -0
  118. package/dist/card/Content.d.ts +15 -0
  119. package/dist/card/Content.styles.d.ts +8 -0
  120. package/dist/card/context.d.ts +11 -0
  121. package/dist/card/index.d.mts +5 -58
  122. package/dist/card/index.d.ts +5 -58
  123. package/dist/card/index.js +2 -502
  124. package/dist/card/index.js.map +1 -1
  125. package/dist/card/index.mjs +125 -178
  126. package/dist/card/index.mjs.map +1 -1
  127. package/dist/card/utils.d.ts +3 -0
  128. package/dist/carousel/Carousel.d.ts +12 -0
  129. package/dist/carousel/CarouselControls.d.ts +9 -0
  130. package/dist/carousel/CarouselNextButton.d.ts +5 -0
  131. package/dist/carousel/CarouselPageIndicator.d.ts +14 -0
  132. package/dist/carousel/CarouselPagePicker.d.ts +14 -0
  133. package/dist/carousel/CarouselPrevButton.d.ts +5 -0
  134. package/dist/carousel/CarouselSlide.d.ts +12 -0
  135. package/dist/carousel/CarouselSlides.d.ts +10 -0
  136. package/dist/carousel/CarouselViewport.d.ts +9 -0
  137. package/dist/carousel/index.d.mts +18 -263
  138. package/dist/carousel/index.d.ts +18 -263
  139. package/dist/carousel/index.js +2 -1882
  140. package/dist/carousel/index.js.map +1 -1
  141. package/dist/carousel/index.mjs +428 -650
  142. package/dist/carousel/index.mjs.map +1 -1
  143. package/dist/carousel/types.d.ts +165 -0
  144. package/dist/carousel/useCarousel.d.ts +2 -0
  145. package/dist/carousel/useCarouselVisibility.d.ts +13 -0
  146. package/dist/carousel/useEvent.d.ts +7 -0
  147. package/dist/carousel/useIsMounted.d.ts +1 -0
  148. package/dist/carousel/useIsVisible.d.ts +6 -0
  149. package/dist/carousel/useResizeObserver.d.ts +2 -0
  150. package/dist/carousel/useScrollEnd.d.ts +3 -0
  151. package/dist/carousel/useSnapPoints.d.ts +10 -0
  152. package/dist/carousel/utils.d.ts +24 -0
  153. package/dist/checkbox/Checkbox.d.ts +10 -0
  154. package/dist/checkbox/CheckboxGroup.d.ts +18 -0
  155. package/dist/checkbox/CheckboxGroup.styles.d.ts +5 -0
  156. package/dist/checkbox/CheckboxGroupContext.d.ts +41 -0
  157. package/dist/checkbox/CheckboxIndicator.d.ts +9 -0
  158. package/dist/checkbox/CheckboxInput.d.ts +47 -0
  159. package/dist/checkbox/CheckboxInput.styles.d.ts +5 -0
  160. package/dist/checkbox/CheckboxLabel.d.ts +12 -0
  161. package/dist/checkbox/CheckboxLabel.styles.d.ts +5 -0
  162. package/dist/checkbox/index.d.mts +2 -120
  163. package/dist/checkbox/index.d.ts +2 -120
  164. package/dist/checkbox/index.js +2 -511
  165. package/dist/checkbox/index.js.map +1 -1
  166. package/dist/checkbox/index.mjs +135 -226
  167. package/dist/checkbox/index.mjs.map +1 -1
  168. package/dist/chip/Chip.d.ts +34 -0
  169. package/dist/chip/Chip.styles.d.ts +8 -0
  170. package/dist/chip/ChipClearButton.d.ts +10 -0
  171. package/dist/chip/ChipClearButton.styles.d.ts +10 -0
  172. package/dist/chip/ChipContent.d.ts +8 -0
  173. package/dist/chip/ChipIcon.d.ts +8 -0
  174. package/dist/chip/ChipLeadingIcon.d.ts +9 -0
  175. package/dist/chip/ChipTrailingIcon.d.ts +9 -0
  176. package/dist/chip/index.d.mts +10 -92
  177. package/dist/chip/index.d.ts +10 -92
  178. package/dist/chip/index.js +2 -908
  179. package/dist/chip/index.js.map +1 -1
  180. package/dist/chip/index.mjs +218 -324
  181. package/dist/chip/index.mjs.map +1 -1
  182. package/dist/chip/useChipContext.d.ts +4 -0
  183. package/dist/chip/useChipElement.d.ts +41 -0
  184. package/dist/chip/variants/dashed.d.ts +49 -0
  185. package/dist/chip/variants/index.d.mts +3 -0
  186. package/dist/chip/variants/index.d.ts +3 -0
  187. package/dist/chip/variants/outlined.d.ts +49 -0
  188. package/dist/chip/variants/tinted.d.ts +49 -0
  189. package/dist/collapsible/Content.d.ts +12 -0
  190. package/dist/collapsible/Root.d.ts +12 -0
  191. package/dist/collapsible/Trigger.d.ts +11 -0
  192. package/dist/collapsible/index.d.mts +4 -40
  193. package/dist/collapsible/index.d.ts +4 -40
  194. package/dist/collapsible/index.js +2 -109
  195. package/dist/collapsible/index.js.map +1 -1
  196. package/dist/collapsible/index.mjs +39 -58
  197. package/dist/collapsible/index.mjs.map +1 -1
  198. package/dist/collapsible/useRenderSlot.d.ts +3 -0
  199. package/dist/combobox/Combobox.d.ts +6 -0
  200. package/dist/combobox/ComboboxClearButton.d.ts +9 -0
  201. package/dist/combobox/ComboboxContext.d.ts +108 -0
  202. package/dist/combobox/ComboboxDisclosure.d.ts +13 -0
  203. package/dist/combobox/ComboboxEmpty.d.ts +11 -0
  204. package/dist/combobox/ComboboxGroup.d.ts +11 -0
  205. package/dist/combobox/ComboboxInput.d.ts +15 -0
  206. package/dist/combobox/ComboboxItem.d.ts +12 -0
  207. package/dist/combobox/ComboboxItemContext.d.ts +17 -0
  208. package/dist/combobox/ComboboxItemIndicator.d.ts +11 -0
  209. package/dist/combobox/ComboboxItemText.d.ts +10 -0
  210. package/dist/combobox/ComboboxItems.d.ts +11 -0
  211. package/dist/combobox/ComboboxItemsGroupContext.d.ts +8 -0
  212. package/dist/combobox/ComboboxLabel.d.ts +11 -0
  213. package/dist/combobox/ComboboxLeadingIcon.d.ts +7 -0
  214. package/dist/combobox/ComboboxPopover.d.ts +10 -0
  215. package/dist/combobox/ComboboxPortal.d.ts +2 -0
  216. package/dist/combobox/ComboboxSelectedItems.d.ts +4 -0
  217. package/dist/combobox/ComboboxTrigger.d.ts +11 -0
  218. package/dist/combobox/ComboboxTrigger.styles.d.ts +6 -0
  219. package/dist/combobox/index.d.mts +19 -271
  220. package/dist/combobox/index.d.ts +19 -271
  221. package/dist/combobox/index.js +2 -2588
  222. package/dist/combobox/index.js.map +1 -1
  223. package/dist/combobox/index.mjs +623 -1017
  224. package/dist/combobox/index.mjs.map +1 -1
  225. package/dist/combobox/tests/test-utils.d.ts +8 -0
  226. package/dist/combobox/types.d.ts +8 -0
  227. package/dist/combobox/useCombobox/multipleSelectionReducer.d.ts +13 -0
  228. package/dist/combobox/useCombobox/singleSelectionReducer.d.ts +8 -0
  229. package/dist/combobox/utils/index.d.mts +14 -0
  230. package/dist/combobox/utils/index.d.ts +14 -0
  231. package/dist/combobox/utils/useWidthIncreaseCallback.d.ts +2 -0
  232. package/dist/dialog/Dialog.d.ts +32 -0
  233. package/dist/dialog/DialogBody.d.ts +12 -0
  234. package/dist/dialog/DialogClose.d.ts +9 -0
  235. package/dist/dialog/DialogCloseButton.d.ts +9 -0
  236. package/dist/dialog/DialogContent.d.ts +14 -0
  237. package/dist/dialog/DialogContent.styles.d.ts +6 -0
  238. package/dist/dialog/DialogContext.d.ts +11 -0
  239. package/dist/dialog/DialogDescription.d.ts +9 -0
  240. package/dist/dialog/DialogFooter.d.ts +10 -0
  241. package/dist/dialog/DialogHeader.d.ts +10 -0
  242. package/dist/dialog/DialogOverlay.d.ts +9 -0
  243. package/dist/dialog/DialogPortal.d.ts +7 -0
  244. package/dist/dialog/DialogTitle.d.ts +9 -0
  245. package/dist/dialog/DialogTrigger.d.ts +17 -0
  246. package/dist/dialog/index.d.mts +25 -154
  247. package/dist/dialog/index.d.ts +25 -154
  248. package/dist/dialog/index.js +2 -1389
  249. package/dist/dialog/index.js.map +1 -1
  250. package/dist/dialog/index.mjs +163 -258
  251. package/dist/dialog/index.mjs.map +1 -1
  252. package/dist/divider/Divider.d.ts +30 -0
  253. package/dist/divider/Divider.styles.d.ts +9 -0
  254. package/dist/divider/DividerContent.d.ts +13 -0
  255. package/dist/divider/index.d.mts +4 -59
  256. package/dist/divider/index.d.ts +4 -59
  257. package/dist/divider/index.js +2 -224
  258. package/dist/divider/index.js.map +1 -1
  259. package/dist/divider/index.mjs +79 -100
  260. package/dist/divider/index.mjs.map +1 -1
  261. package/dist/divider/variants/intents.d.ts +17 -0
  262. package/dist/drawer/Drawer.d.ts +39 -0
  263. package/dist/drawer/DrawerBody.d.ts +11 -0
  264. package/dist/drawer/DrawerBody.styles.d.ts +5 -0
  265. package/dist/drawer/DrawerClose.d.ts +9 -0
  266. package/dist/drawer/DrawerCloseButton.d.ts +7 -0
  267. package/dist/drawer/DrawerContent.d.ts +10 -0
  268. package/dist/drawer/DrawerContent.styles.d.ts +6 -0
  269. package/dist/drawer/DrawerContext.d.ts +9 -0
  270. package/dist/drawer/DrawerDescription.d.ts +9 -0
  271. package/dist/drawer/DrawerFooter.d.ts +8 -0
  272. package/dist/drawer/DrawerHeader.d.ts +10 -0
  273. package/dist/drawer/DrawerOverlay.d.ts +9 -0
  274. package/dist/drawer/DrawerPortal.d.ts +7 -0
  275. package/dist/drawer/DrawerTitle.d.ts +9 -0
  276. package/dist/drawer/DrawerTrigger.d.ts +13 -0
  277. package/dist/drawer/index.d.mts +24 -141
  278. package/dist/drawer/index.d.ts +24 -141
  279. package/dist/drawer/index.js +2 -1400
  280. package/dist/drawer/index.js.map +1 -1
  281. package/dist/drawer/index.mjs +141 -230
  282. package/dist/drawer/index.mjs.map +1 -1
  283. package/dist/dropdown/Dropdown.d.ts +6 -0
  284. package/dist/dropdown/DropdownContext.d.ts +81 -0
  285. package/dist/dropdown/DropdownDivider.d.ts +10 -0
  286. package/dist/dropdown/DropdownGroup.d.ts +11 -0
  287. package/dist/dropdown/DropdownItem.d.ts +12 -0
  288. package/dist/dropdown/DropdownItemContext.d.ts +17 -0
  289. package/dist/dropdown/DropdownItemIndicator.d.ts +11 -0
  290. package/dist/dropdown/DropdownItemText.d.ts +9 -0
  291. package/dist/dropdown/DropdownItems.d.ts +21 -0
  292. package/dist/dropdown/DropdownItemsGroupContext.d.ts +8 -0
  293. package/dist/dropdown/DropdownLabel.d.ts +11 -0
  294. package/dist/dropdown/DropdownLeadingIcon.d.ts +7 -0
  295. package/dist/dropdown/DropdownPopover.d.ts +6 -0
  296. package/dist/dropdown/DropdownPortal.d.ts +2 -0
  297. package/dist/dropdown/DropdownTrigger.d.ts +12 -0
  298. package/dist/dropdown/DropdownTrigger.styles.d.ts +5 -0
  299. package/dist/dropdown/DropdownValue.d.ts +11 -0
  300. package/dist/dropdown/index.d.mts +16 -220
  301. package/dist/dropdown/index.d.ts +16 -220
  302. package/dist/dropdown/index.js +2 -2051
  303. package/dist/dropdown/index.js.map +1 -1
  304. package/dist/dropdown/index.mjs +352 -584
  305. package/dist/dropdown/index.mjs.map +1 -1
  306. package/dist/dropdown/types.d.ts +8 -0
  307. package/dist/dropdown/useDropdown.d.ts +41 -0
  308. package/dist/dropdown/utils.d.ts +13 -0
  309. package/dist/file-upload/FileUpload.d.ts +130 -0
  310. package/dist/file-upload/FileUploadAcceptedFile.d.ts +25 -0
  311. package/dist/file-upload/FileUploadContext.d.ts +17 -0
  312. package/dist/file-upload/FileUploadDropzone.d.ts +10 -0
  313. package/dist/file-upload/FileUploadItemDeleteTrigger.d.ts +11 -0
  314. package/dist/file-upload/FileUploadPreviewImage.d.ts +17 -0
  315. package/dist/file-upload/FileUploadRejectedFile.d.ts +24 -0
  316. package/dist/file-upload/FileUploadRejectedFileDeleteTrigger.d.ts +12 -0
  317. package/dist/file-upload/FileUploadTrigger.d.ts +12 -0
  318. package/dist/file-upload/constants.d.ts +29 -0
  319. package/dist/file-upload/index.d.mts +14 -262
  320. package/dist/file-upload/index.d.ts +14 -262
  321. package/dist/file-upload/index.js +2 -2255
  322. package/dist/file-upload/index.js.map +1 -1
  323. package/dist/file-upload/index.mjs +506 -834
  324. package/dist/file-upload/index.mjs.map +1 -1
  325. package/dist/file-upload/test-utils.d.ts +9 -0
  326. package/dist/file-upload/useFileUploadState.d.ts +88 -0
  327. package/dist/file-upload/utils.d.ts +40 -0
  328. package/dist/form-field/FormField.d.ts +21 -0
  329. package/dist/form-field/FormFieldAlertMessage.d.ts +9 -0
  330. package/dist/form-field/FormFieldCharactersCount.d.ts +26 -0
  331. package/dist/form-field/FormFieldContext.d.ts +49 -0
  332. package/dist/form-field/FormFieldControl.d.ts +12 -0
  333. package/dist/form-field/FormFieldErrorMessage.d.ts +9 -0
  334. package/dist/form-field/FormFieldHelperMessage.d.ts +9 -0
  335. package/dist/form-field/FormFieldLabel.d.ts +13 -0
  336. package/dist/form-field/FormFieldMessage.d.ts +8 -0
  337. package/dist/form-field/FormFieldProvider.d.ts +9 -0
  338. package/dist/form-field/FormFieldRequiredIndicator.d.ts +9 -0
  339. package/dist/form-field/FormFieldStateMessage.d.ts +10 -0
  340. package/dist/form-field/FormFieldSuccessMessage.d.ts +9 -0
  341. package/dist/form-field/index.d.mts +21 -176
  342. package/dist/form-field/index.d.ts +21 -176
  343. package/dist/form-field/index.js +2 -553
  344. package/dist/form-field/index.js.map +1 -1
  345. package/dist/form-field/index.mjs +246 -349
  346. package/dist/form-field/index.mjs.map +1 -1
  347. package/dist/icon/Icon.d.ts +17 -0
  348. package/dist/icon/Icon.styles.d.ts +6 -0
  349. package/dist/icon/index.d.mts +1 -28
  350. package/dist/icon/index.d.ts +1 -28
  351. package/dist/icon/index.js +2 -127
  352. package/dist/icon/index.js.map +1 -1
  353. package/dist/icon/index.mjs +3 -7
  354. package/dist/icon/index.mjs.map +1 -1
  355. package/dist/icon-button/IconButton.d.ts +10 -0
  356. package/dist/icon-button/IconButton.styles.d.ts +5 -0
  357. package/dist/icon-button/index.d.mts +1 -16
  358. package/dist/icon-button/index.d.ts +1 -16
  359. package/dist/icon-button/index.js +2 -980
  360. package/dist/icon-button/index.js.map +1 -1
  361. package/dist/icon-button/index.mjs +3 -9
  362. package/dist/icon-button/index.mjs.map +1 -1
  363. package/dist/input/Input.d.ts +14 -0
  364. package/dist/input/Input.styles.d.ts +11 -0
  365. package/dist/input/InputAddon.d.ts +9 -0
  366. package/dist/input/InputAddon.styles.d.ts +9 -0
  367. package/dist/input/InputClearButton.d.ts +12 -0
  368. package/dist/input/InputGroup.d.ts +17 -0
  369. package/dist/input/InputGroup.styles.d.ts +6 -0
  370. package/dist/input/InputGroupContext.d.ts +14 -0
  371. package/dist/input/InputIcon.d.ts +6 -0
  372. package/dist/input/InputLeadingAddon.d.ts +11 -0
  373. package/dist/input/InputLeadingIcon.d.ts +7 -0
  374. package/dist/input/InputTrailingAddon.d.ts +11 -0
  375. package/dist/input/InputTrailingIcon.d.ts +7 -0
  376. package/dist/input/index.d.mts +15 -72
  377. package/dist/input/index.d.ts +15 -72
  378. package/dist/input/index.js +2 -724
  379. package/dist/input/index.js.map +1 -1
  380. package/dist/input/index.mjs +453 -12
  381. package/dist/input/index.mjs.map +1 -1
  382. package/dist/input-otp/InputOTP.d.ts +85 -0
  383. package/dist/input-otp/InputOTP.styles.d.ts +10 -0
  384. package/dist/input-otp/InputOTPContext.d.ts +16 -0
  385. package/dist/input-otp/InputOTPGroup.d.ts +7 -0
  386. package/dist/input-otp/InputOTPSeparator.d.ts +7 -0
  387. package/dist/input-otp/InputOTPSlot.d.ts +12 -0
  388. package/dist/input-otp/index.d.mts +10 -128
  389. package/dist/input-otp/index.d.ts +10 -128
  390. package/dist/input-otp/index.js +2 -668
  391. package/dist/input-otp/index.js.map +1 -1
  392. package/dist/input-otp/index.mjs +295 -462
  393. package/dist/input-otp/index.mjs.map +1 -1
  394. package/dist/input-otp/useInputOTP.d.ts +45 -0
  395. package/dist/kbd/Kbd.d.ts +5 -0
  396. package/dist/kbd/index.d.mts +1 -9
  397. package/dist/kbd/index.d.ts +1 -9
  398. package/dist/kbd/index.js +2 -47
  399. package/dist/kbd/index.js.map +1 -1
  400. package/dist/kbd/index.mjs +15 -18
  401. package/dist/kbd/index.mjs.map +1 -1
  402. package/dist/label/Label.d.ts +9 -0
  403. package/dist/label/LabelRequiredIndicator.d.ts +6 -0
  404. package/dist/label/index.d.mts +5 -9
  405. package/dist/label/index.d.ts +5 -9
  406. package/dist/label/index.js +2 -78
  407. package/dist/label/index.js.map +1 -1
  408. package/dist/label/index.mjs +38 -5
  409. package/dist/label/index.mjs.map +1 -1
  410. package/dist/link-box/LinkBox.d.ts +8 -0
  411. package/dist/link-box/LinkBoxLink.d.ts +8 -0
  412. package/dist/link-box/LinkBoxRaised.d.ts +9 -0
  413. package/dist/link-box/index.d.mts +6 -31
  414. package/dist/link-box/index.d.ts +6 -31
  415. package/dist/link-box/index.js +2 -92
  416. package/dist/link-box/index.js.map +1 -1
  417. package/dist/link-box/index.mjs +34 -56
  418. package/dist/link-box/index.mjs.map +1 -1
  419. package/dist/pagination/Pagination.d.ts +8 -0
  420. package/dist/pagination/PaginationContext.d.ts +43 -0
  421. package/dist/pagination/PaginationEllipsis.d.ts +9 -0
  422. package/dist/pagination/PaginationFirstPageTrigger.d.ts +16 -0
  423. package/dist/pagination/PaginationItem.d.ts +17 -0
  424. package/dist/pagination/PaginationLastPageTrigger.d.ts +16 -0
  425. package/dist/pagination/PaginationNextTrigger.d.ts +16 -0
  426. package/dist/pagination/PaginationPages.d.ts +16 -0
  427. package/dist/pagination/PaginationPrevTrigger.d.ts +16 -0
  428. package/dist/pagination/index.d.mts +10 -135
  429. package/dist/pagination/index.d.ts +10 -135
  430. package/dist/pagination/index.js +2 -1353
  431. package/dist/pagination/index.js.map +1 -1
  432. package/dist/pagination/index.mjs +176 -269
  433. package/dist/pagination/index.mjs.map +1 -1
  434. package/dist/pagination/utils.d.ts +1 -0
  435. package/dist/popover/Popover.d.ts +9 -0
  436. package/dist/popover/PopoverAnchor.d.ts +9 -0
  437. package/dist/popover/PopoverArrow.d.ts +9 -0
  438. package/dist/popover/PopoverCloseButton.d.ts +10 -0
  439. package/dist/popover/PopoverContent.d.ts +10 -0
  440. package/dist/popover/PopoverContent.styles.d.ts +9 -0
  441. package/dist/popover/PopoverContext.d.ts +15 -0
  442. package/dist/popover/PopoverHeader.d.ts +10 -0
  443. package/dist/popover/PopoverPortal.d.ts +7 -0
  444. package/dist/popover/PopoverTrigger.d.ts +9 -0
  445. package/dist/popover/index.d.mts +17 -6
  446. package/dist/popover/index.d.ts +17 -6
  447. package/dist/popover/index.js +2 -1339
  448. package/dist/popover/index.js.map +1 -1
  449. package/dist/popover/index.mjs +239 -11
  450. package/dist/popover/index.mjs.map +1 -1
  451. package/dist/portal/Portal.d.ts +10 -0
  452. package/dist/portal/index.d.mts +1 -13
  453. package/dist/portal/index.d.ts +1 -13
  454. package/dist/portal/index.js +2 -37
  455. package/dist/portal/index.js.map +1 -1
  456. package/dist/portal/index.mjs +5 -8
  457. package/dist/portal/index.mjs.map +1 -1
  458. package/dist/progress/Progress.d.ts +16 -0
  459. package/dist/progress/ProgressBar.d.ts +6 -0
  460. package/dist/progress/ProgressBar.styles.d.ts +5 -0
  461. package/dist/progress/ProgressContext.d.ts +13 -0
  462. package/dist/progress/ProgressIndicator.d.ts +6 -0
  463. package/dist/progress/ProgressIndicator.styles.d.ts +7 -0
  464. package/dist/progress/ProgressLabel.d.ts +6 -0
  465. package/dist/progress/index.d.mts +9 -48
  466. package/dist/progress/index.d.ts +9 -48
  467. package/dist/progress/index.js +2 -240
  468. package/dist/progress/index.js.map +1 -1
  469. package/dist/progress/index.mjs +166 -5
  470. package/dist/progress/index.mjs.map +1 -1
  471. package/dist/progress-tracker/ProgressTracker.d.ts +27 -0
  472. package/dist/progress-tracker/ProgressTracker.styles.d.ts +1 -0
  473. package/dist/progress-tracker/ProgressTrackerContext.d.ts +15 -0
  474. package/dist/progress-tracker/ProgressTrackerStep.d.ts +12 -0
  475. package/dist/progress-tracker/ProgressTrackerStep.styles.d.ts +10 -0
  476. package/dist/progress-tracker/ProgressTrackerStepIndicator.d.ts +15 -0
  477. package/dist/progress-tracker/ProgressTrackerStepIndicator.styles.d.ts +7 -0
  478. package/dist/progress-tracker/ProgressTrackerStepLabel.d.ts +9 -0
  479. package/dist/progress-tracker/index.d.mts +10 -80
  480. package/dist/progress-tracker/index.d.ts +10 -80
  481. package/dist/progress-tracker/index.js +2 -571
  482. package/dist/progress-tracker/index.js.map +1 -1
  483. package/dist/progress-tracker/index.mjs +115 -183
  484. package/dist/progress-tracker/index.mjs.map +1 -1
  485. package/dist/radio-group/Radio.d.ts +9 -0
  486. package/dist/radio-group/RadioGroup.d.ts +54 -0
  487. package/dist/radio-group/RadioGroup.styles.d.ts +5 -0
  488. package/dist/radio-group/RadioGroupContext.d.ts +5 -0
  489. package/dist/radio-group/RadioGroupProvider.d.ts +7 -0
  490. package/dist/radio-group/RadioIndicator.d.ts +18 -0
  491. package/dist/radio-group/RadioIndicator.styles.d.ts +5 -0
  492. package/dist/radio-group/RadioInput.d.ts +25 -0
  493. package/dist/radio-group/RadioInput.styles.d.ts +5 -0
  494. package/dist/radio-group/RadioLabel.d.ts +20 -0
  495. package/dist/radio-group/RadioLabel.styles.d.ts +5 -0
  496. package/dist/radio-group/index.d.mts +5 -98
  497. package/dist/radio-group/index.d.ts +5 -98
  498. package/dist/radio-group/index.js +2 -318
  499. package/dist/radio-group/index.js.map +1 -1
  500. package/dist/radio-group/index.mjs +105 -174
  501. package/dist/radio-group/index.mjs.map +1 -1
  502. package/dist/rating/Rating.d.ts +52 -0
  503. package/dist/rating/RatingStar.d.ts +10 -0
  504. package/dist/rating/RatingStar.styles.d.ts +14 -0
  505. package/dist/rating/index.d.mts +1 -78
  506. package/dist/rating/index.d.ts +1 -78
  507. package/dist/rating/index.js +2 -363
  508. package/dist/rating/index.js.map +1 -1
  509. package/dist/rating/index.mjs +125 -170
  510. package/dist/rating/index.mjs.map +1 -1
  511. package/dist/rating/types.d.ts +1 -0
  512. package/dist/rating/utils.d.ts +8 -0
  513. package/dist/scrolling-list/ScrollingList.d.ts +57 -0
  514. package/dist/scrolling-list/ScrollingListControls.d.ts +18 -0
  515. package/dist/scrolling-list/ScrollingListItem.d.ts +17 -0
  516. package/dist/scrolling-list/ScrollingListItems.d.ts +11 -0
  517. package/dist/scrolling-list/ScrollingListNextButton.d.ts +5 -0
  518. package/dist/scrolling-list/ScrollingListPrevButton.d.ts +5 -0
  519. package/dist/scrolling-list/ScrollingListSkipButton.d.ts +9 -0
  520. package/dist/scrolling-list/index.d.mts +14 -117
  521. package/dist/scrolling-list/index.d.ts +14 -117
  522. package/dist/scrolling-list/index.js +2 -1428
  523. package/dist/scrolling-list/index.js.map +1 -1
  524. package/dist/scrolling-list/index.mjs +193 -325
  525. package/dist/scrolling-list/index.mjs.map +1 -1
  526. package/dist/scrolling-list/useFocusWithinScroll.d.ts +3 -0
  527. package/dist/segmented-gauge/SegmentedGauge.d.ts +66 -0
  528. package/dist/segmented-gauge/SegmentedGaugeContext.d.ts +14 -0
  529. package/dist/segmented-gauge/SegmentedGaugeLabel.d.ts +9 -0
  530. package/dist/segmented-gauge/SegmentedGaugeSegment.d.ts +12 -0
  531. package/dist/segmented-gauge/SegmentedGaugeTrack.d.ts +8 -0
  532. package/dist/segmented-gauge/index.d.mts +9 -101
  533. package/dist/segmented-gauge/index.d.ts +9 -101
  534. package/dist/segmented-gauge/index.js +2 -274
  535. package/dist/segmented-gauge/index.js.map +1 -1
  536. package/dist/segmented-gauge/index.mjs +132 -178
  537. package/dist/segmented-gauge/index.mjs.map +1 -1
  538. package/dist/select/Select.d.ts +6 -0
  539. package/dist/select/SelectContext.d.ts +59 -0
  540. package/dist/select/SelectGroup.d.ts +11 -0
  541. package/dist/select/SelectItem.d.ts +11 -0
  542. package/dist/select/SelectItems.d.ts +10 -0
  543. package/dist/select/SelectItemsGroupContext.d.ts +9 -0
  544. package/dist/select/SelectLabel.d.ts +8 -0
  545. package/dist/select/SelectLeadingIcon.d.ts +7 -0
  546. package/dist/select/SelectPlaceholder.d.ts +10 -0
  547. package/dist/select/SelectTrigger.d.ts +16 -0
  548. package/dist/select/SelectTrigger.styles.d.ts +5 -0
  549. package/dist/select/SelectValue.d.ts +15 -0
  550. package/dist/select/index.d.mts +12 -158
  551. package/dist/select/index.d.ts +12 -158
  552. package/dist/select/index.js +2 -581
  553. package/dist/select/index.js.map +1 -1
  554. package/dist/select/index.mjs +207 -339
  555. package/dist/select/index.mjs.map +1 -1
  556. package/dist/select/types.d.ts +6 -0
  557. package/dist/select/utils.d.ts +4 -0
  558. package/dist/skeleton/Skeleton.d.ts +17 -0
  559. package/dist/skeleton/Skeleton.styles.d.ts +5 -0
  560. package/dist/skeleton/SkeletonItem.d.ts +31 -0
  561. package/dist/skeleton/SkeletonItem.styles.d.ts +8 -0
  562. package/dist/skeleton/index.d.mts +8 -67
  563. package/dist/skeleton/index.d.ts +8 -67
  564. package/dist/skeleton/index.js +2 -206
  565. package/dist/skeleton/index.js.map +1 -1
  566. package/dist/skeleton/index.mjs +64 -96
  567. package/dist/skeleton/index.mjs.map +1 -1
  568. package/dist/slider/Slider.d.ts +60 -0
  569. package/dist/slider/Slider.styles.d.ts +1 -0
  570. package/dist/slider/SliderContext.d.ts +7 -0
  571. package/dist/slider/SliderThumb.d.ts +14 -0
  572. package/dist/slider/SliderThumb.styles.d.ts +5 -0
  573. package/dist/slider/SliderTrack.d.ts +14 -0
  574. package/dist/slider/SliderTrack.styles.d.ts +9 -0
  575. package/dist/slider/index.d.mts +8 -97
  576. package/dist/slider/index.d.ts +8 -97
  577. package/dist/slider/index.js +2 -220
  578. package/dist/slider/index.js.map +1 -1
  579. package/dist/slider/index.mjs +94 -111
  580. package/dist/slider/index.mjs.map +1 -1
  581. package/dist/slot/Slot.d.ts +12 -0
  582. package/dist/slot/index.d.mts +1 -16
  583. package/dist/slot/index.d.ts +1 -16
  584. package/dist/slot/index.js +2 -51
  585. package/dist/slot/index.js.map +1 -1
  586. package/dist/slot/index.mjs +5 -9
  587. package/dist/slot/index.mjs.map +1 -1
  588. package/dist/snackbar/Snackbar.d.ts +29 -0
  589. package/dist/snackbar/SnackbarItem.d.ts +49 -0
  590. package/dist/snackbar/SnackbarItem.styles.d.ts +10 -0
  591. package/dist/snackbar/SnackbarItemAction.d.ts +10 -0
  592. package/dist/snackbar/SnackbarItemClose.d.ts +9 -0
  593. package/dist/snackbar/SnackbarItemContext.d.ts +8 -0
  594. package/dist/snackbar/SnackbarItemIcon.d.ts +7 -0
  595. package/dist/snackbar/SnackbarRegion.d.ts +30 -0
  596. package/dist/snackbar/SnackbarRegion.styles.d.ts +5 -0
  597. package/dist/snackbar/index.d.mts +13 -158
  598. package/dist/snackbar/index.d.ts +13 -158
  599. package/dist/snackbar/index.js +2 -1756
  600. package/dist/snackbar/index.js.map +1 -1
  601. package/dist/snackbar/index.mjs +237 -429
  602. package/dist/snackbar/index.mjs.map +1 -1
  603. package/dist/snackbar/snackbarVariants.d.ts +82 -0
  604. package/dist/snackbar/useSnackbarGlobalStore.d.ts +18 -0
  605. package/dist/snackbar/useSwipe.d.ts +15 -0
  606. package/dist/spinner/Spinner.d.ts +9 -0
  607. package/dist/spinner/Spinner.styles.d.ts +7 -0
  608. package/dist/spinner/index.d.mts +1 -21
  609. package/dist/spinner/index.d.ts +1 -21
  610. package/dist/spinner/index.js +2 -139
  611. package/dist/spinner/index.js.map +1 -1
  612. package/dist/spinner/index.mjs +3 -7
  613. package/dist/spinner/index.mjs.map +1 -1
  614. package/dist/stepper/Stepper.d.ts +9 -0
  615. package/dist/stepper/StepperButton.d.ts +14 -0
  616. package/dist/stepper/StepperInput.d.ts +7 -0
  617. package/dist/stepper/index.d.mts +9 -81
  618. package/dist/stepper/index.d.ts +9 -81
  619. package/dist/stepper/index.js +2 -1847
  620. package/dist/stepper/index.js.map +1 -1
  621. package/dist/stepper/index.mjs +143 -195
  622. package/dist/stepper/index.mjs.map +1 -1
  623. package/dist/stepper/types.d.ts +46 -0
  624. package/dist/stepper/useStepper.d.ts +2 -0
  625. package/dist/switch/Switch.d.ts +6 -0
  626. package/dist/switch/SwitchInput.d.ts +51 -0
  627. package/dist/switch/SwitchInput.styles.d.ts +16 -0
  628. package/dist/switch/SwitchLabel.d.ts +17 -0
  629. package/dist/switch/SwitchLabel.styles.d.ts +5 -0
  630. package/dist/switch/index.d.mts +1 -64
  631. package/dist/switch/index.d.ts +1 -64
  632. package/dist/switch/index.js +2 -327
  633. package/dist/switch/index.js.map +1 -1
  634. package/dist/switch/index.mjs +90 -130
  635. package/dist/switch/index.mjs.map +1 -1
  636. package/dist/tabs/Tabs.d.ts +24 -0
  637. package/dist/tabs/TabsContent.d.ts +22 -0
  638. package/dist/tabs/TabsContent.styles.d.ts +3 -0
  639. package/dist/tabs/TabsContext.d.ts +7 -0
  640. package/dist/tabs/TabsList.d.ts +20 -0
  641. package/dist/tabs/TabsList.styles.d.ts +3 -0
  642. package/dist/tabs/TabsPopover.d.ts +29 -0
  643. package/dist/tabs/TabsPopoverAbstraction.d.ts +27 -0
  644. package/dist/tabs/TabsRoot.styles.d.ts +1 -0
  645. package/dist/tabs/TabsTrigger.d.ts +41 -0
  646. package/dist/tabs/TabsTrigger.styles.d.ts +8 -0
  647. package/dist/tabs/index.d.mts +13 -137
  648. package/dist/tabs/index.d.ts +13 -137
  649. package/dist/tabs/index.js +2 -1830
  650. package/dist/tabs/index.js.map +1 -1
  651. package/dist/tabs/index.mjs +224 -350
  652. package/dist/tabs/index.mjs.map +1 -1
  653. package/dist/tabs/useResizeObserver.d.ts +8 -0
  654. package/dist/tag/Tag.d.ts +17 -0
  655. package/dist/tag/Tag.styles.d.ts +8 -0
  656. package/dist/tag/index.d.mts +1 -29
  657. package/dist/tag/index.d.ts +1 -29
  658. package/dist/tag/index.js +2 -283
  659. package/dist/tag/index.js.map +1 -1
  660. package/dist/tag/index.mjs +66 -90
  661. package/dist/tag/index.mjs.map +1 -1
  662. package/dist/tag/variants/filled.d.ts +41 -0
  663. package/dist/tag/variants/index.d.mts +3 -0
  664. package/dist/tag/variants/index.d.ts +3 -0
  665. package/dist/tag/variants/outlined.d.ts +37 -0
  666. package/dist/tag/variants/tinted.d.ts +37 -0
  667. package/dist/text-link/TextLink.d.ts +16 -0
  668. package/dist/text-link/index.d.mts +1 -20
  669. package/dist/text-link/index.d.ts +1 -20
  670. package/dist/text-link/index.js +2 -100
  671. package/dist/text-link/index.js.map +1 -1
  672. package/dist/text-link/index.mjs +3 -6
  673. package/dist/text-link/index.mjs.map +1 -1
  674. package/dist/textarea/Textarea.d.ts +14 -0
  675. package/dist/textarea/TextareaClearButton.d.ts +10 -0
  676. package/dist/textarea/TextareaGroup.d.ts +6 -0
  677. package/dist/textarea/TextareaLeadingIcon.d.ts +7 -0
  678. package/dist/textarea/TextareaTrailingIcon.d.ts +7 -0
  679. package/dist/textarea/index.d.mts +10 -53
  680. package/dist/textarea/index.d.ts +10 -53
  681. package/dist/textarea/index.js +2 -797
  682. package/dist/textarea/index.js.map +1 -1
  683. package/dist/textarea/index.mjs +50 -83
  684. package/dist/textarea/index.mjs.map +1 -1
  685. package/dist/toast/Toast.d.ts +4 -0
  686. package/dist/toast/Toast.styles.d.ts +10 -0
  687. package/dist/toast/index.d.mts +10 -53
  688. package/dist/toast/index.d.ts +10 -53
  689. package/dist/toast/index.js +2 -1454
  690. package/dist/toast/index.js.map +1 -1
  691. package/dist/toast/index.mjs +126 -180
  692. package/dist/toast/index.mjs.map +1 -1
  693. package/dist/toast/types.d.ts +41 -0
  694. package/dist/toast/useRenderSlot.d.ts +3 -0
  695. package/dist/toast/useToastManager.d.ts +2 -0
  696. package/dist/visually-hidden/VisuallyHidden.d.ts +12 -0
  697. package/dist/visually-hidden/index.d.mts +1 -16
  698. package/dist/visually-hidden/index.d.ts +1 -16
  699. package/dist/visually-hidden/index.js +2 -67
  700. package/dist/visually-hidden/index.js.map +1 -1
  701. package/dist/visually-hidden/index.mjs +3 -6
  702. package/dist/visually-hidden/index.mjs.map +1 -1
  703. package/package.json +6 -6
  704. package/dist/Input-N8AWWSmt.d.mts +0 -41
  705. package/dist/Input-N8AWWSmt.d.ts +0 -41
  706. package/dist/InputTrailingIcon-BBp7sE6D.d.mts +0 -20
  707. package/dist/InputTrailingIcon-ZZx8PoJy.d.ts +0 -20
  708. package/dist/LabelRequiredIndicator-DRnCzHMU.d.mts +0 -19
  709. package/dist/LabelRequiredIndicator-DRnCzHMU.d.ts +0 -19
  710. package/dist/chunk-2YM6GKWW.mjs.map +0 -1
  711. package/dist/chunk-6QCEPQ3U.mjs +0 -26
  712. package/dist/chunk-6QCEPQ3U.mjs.map +0 -1
  713. package/dist/chunk-7EWSMIZU.mjs +0 -214
  714. package/dist/chunk-7EWSMIZU.mjs.map +0 -1
  715. package/dist/chunk-DCXWGQVZ.mjs +0 -53
  716. package/dist/chunk-DCXWGQVZ.mjs.map +0 -1
  717. package/dist/chunk-GAK4SC2F.mjs.map +0 -1
  718. package/dist/chunk-GPJMLIHC.mjs +0 -308
  719. package/dist/chunk-GPJMLIHC.mjs.map +0 -1
  720. package/dist/chunk-HLXYG643.mjs +0 -52
  721. package/dist/chunk-HLXYG643.mjs.map +0 -1
  722. package/dist/chunk-KEGAAGJW.mjs +0 -36
  723. package/dist/chunk-KEGAAGJW.mjs.map +0 -1
  724. package/dist/chunk-RKPP7ZOK.mjs.map +0 -1
  725. package/dist/chunk-UMUMFMFB.mjs +0 -68
  726. package/dist/chunk-UMUMFMFB.mjs.map +0 -1
  727. package/dist/chunk-VBX7BTNU.mjs +0 -614
  728. package/dist/chunk-VBX7BTNU.mjs.map +0 -1
  729. package/dist/chunk-XZ47F6TP.mjs.map +0 -1
  730. package/dist/index-Cno_GFuW.d.mts +0 -93
  731. package/dist/index-Cno_GFuW.d.ts +0 -93
@@ -1,317 +1,224 @@
1
- import {
2
- IconButton
3
- } from "../chunk-DCXWGQVZ.mjs";
4
- import {
5
- Icon
6
- } from "../chunk-UMUMFMFB.mjs";
7
- import {
8
- Button
9
- } from "../chunk-2YM6GKWW.mjs";
10
- import "../chunk-GAK4SC2F.mjs";
11
- import "../chunk-KEGAAGJW.mjs";
12
- import "../chunk-6QCEPQ3U.mjs";
13
-
14
- // src/pagination/PaginationContext.tsx
15
- import * as pagination from "@zag-js/pagination";
16
- import { normalizeProps, useMachine } from "@zag-js/react";
17
- import { createContext, useContext, useId } from "react";
18
-
19
- // src/pagination/utils.ts
20
- function sliceArrayWithIndex(arr, index, length) {
21
- const relativeElements = (length - 1) / 2;
22
- let start = Math.max(0, index - relativeElements);
23
- let end = Math.min(arr.length, index + relativeElements + 1);
24
- if (end - start < length) {
25
- start = Math.max(0, Math.min(start, arr.length - length));
26
- end = Math.min(arr.length, start + length);
27
- }
28
- return arr.slice(start, end);
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import * as v from "@zag-js/pagination";
3
+ import { useMachine as w, normalizeProps as D, mergeProps as u } from "@zag-js/react";
4
+ import { createContext as F, useId as A, useContext as E } from "react";
5
+ import { cx as R } from "class-variance-authority";
6
+ import { ArrowDoubleLeft as j } from "@spark-ui/icons/ArrowDoubleLeft";
7
+ import { I as h } from "../Icon-Ck-dhfLd.mjs";
8
+ import { I as P } from "../IconButton-C62-axzv.mjs";
9
+ import { B as L } from "../Button-C3C0aixy.mjs";
10
+ import { ArrowDoubleRight as z } from "@spark-ui/icons/ArrowDoubleRight";
11
+ import { ArrowVerticalRight as B } from "@spark-ui/icons/ArrowVerticalRight";
12
+ import { ArrowVerticalLeft as $ } from "@spark-ui/icons/ArrowVerticalLeft";
13
+ function V(i, e, n) {
14
+ const a = (n - 1) / 2;
15
+ let r = Math.max(0, e - a), s = Math.min(i.length, e + a + 1);
16
+ return s - r < n && (r = Math.max(0, Math.min(r, i.length - n)), s = Math.min(i.length, r + n)), i.slice(r, s);
29
17
  }
30
-
31
- // src/pagination/PaginationContext.tsx
32
- import { jsx } from "react/jsx-runtime";
33
- var PaginationContext = createContext(null);
34
- var PaginationProvider = ({
35
- children,
36
- count,
37
- visiblePageItems = 7,
38
- pageSize,
39
- page,
40
- onPageChange,
41
- noEllipsis,
42
- type = "link"
18
+ const C = F(null), W = ({
19
+ children: i,
20
+ count: e,
21
+ visiblePageItems: n = 7,
22
+ pageSize: a,
23
+ page: r,
24
+ onPageChange: s,
25
+ noEllipsis: l,
26
+ type: g = "link"
43
27
  }) => {
44
- const siblingCount = noEllipsis ? Infinity : Math.max(0, Math.floor((visiblePageItems - 5) / 2));
45
- const id = useId();
46
- const service = useMachine(pagination.machine, {
47
- id,
48
- count,
49
- siblingCount,
50
- pageSize,
51
- page,
52
- onPageChange,
53
- type
54
- });
55
- const api = pagination.connect(service, normalizeProps);
56
- const pages = noEllipsis ? sliceArrayWithIndex(api.pages, api.page - 1, visiblePageItems) : api.pages;
57
- return /* @__PURE__ */ jsx(
58
- PaginationContext.Provider,
28
+ const p = l ? 1 / 0 : Math.max(0, Math.floor((n - 5) / 2)), d = A(), c = w(v.machine, {
29
+ id: d,
30
+ count: e,
31
+ siblingCount: p,
32
+ pageSize: a,
33
+ page: r,
34
+ onPageChange: s,
35
+ type: g
36
+ }), o = v.connect(c, D), M = l ? V(o.pages, o.page - 1, n) : o.pages;
37
+ return /* @__PURE__ */ t(
38
+ C.Provider,
59
39
  {
60
40
  value: {
61
- type,
41
+ type: g,
62
42
  pagination: {
63
- ...api,
64
- pages,
43
+ ...o,
44
+ pages: M,
65
45
  // Extending ZagJS anatomy
66
- getFirstPageTriggerProps: () => {
67
- return {
68
- ...api.getPrevTriggerProps(),
69
- id: `${api.getRootProps().id}:first`,
70
- "data-part": "first-page-trigger",
71
- onClick: api.goToFirstPage
72
- };
73
- },
74
- getLastPageTriggerProps: () => {
75
- return {
76
- ...api.getNextTriggerProps(),
77
- id: `${api.getRootProps().id}:last`,
78
- "data-part": "last-page-trigger",
79
- onClick: api.goToLastPage
80
- };
81
- }
46
+ getFirstPageTriggerProps: () => ({
47
+ ...o.getPrevTriggerProps(),
48
+ id: `${o.getRootProps().id}:first`,
49
+ "data-part": "first-page-trigger",
50
+ onClick: o.goToFirstPage
51
+ }),
52
+ getLastPageTriggerProps: () => ({
53
+ ...o.getNextTriggerProps(),
54
+ id: `${o.getRootProps().id}:last`,
55
+ "data-part": "last-page-trigger",
56
+ onClick: o.goToLastPage
57
+ })
82
58
  }
83
59
  },
84
- children
60
+ children: i
85
61
  }
86
62
  );
87
- };
88
- var usePagination = () => {
89
- const context = useContext(PaginationContext);
90
- if (!context) {
63
+ }, m = () => {
64
+ const i = E(C);
65
+ if (!i)
91
66
  throw Error("usePagination must be used within a Pagination provider");
67
+ return i;
68
+ }, I = ({
69
+ children: i,
70
+ visiblePageItems: e = 5,
71
+ type: n = "link",
72
+ noEllipsis: a = !1,
73
+ className: r,
74
+ ...s
75
+ }) => /* @__PURE__ */ t(
76
+ W,
77
+ {
78
+ visiblePageItems: e,
79
+ noEllipsis: a,
80
+ type: n,
81
+ ...s,
82
+ children: /* @__PURE__ */ t(O, { className: r, children: i })
92
83
  }
93
- return context;
94
- };
95
-
96
- // src/pagination/Pagination.tsx
97
- import { jsx as jsx2 } from "react/jsx-runtime";
98
- var Pagination = ({
99
- children,
100
- visiblePageItems = 5,
101
- type = "link",
102
- noEllipsis = false,
103
- className,
104
- ...rest
105
- }) => {
106
- return /* @__PURE__ */ jsx2(
107
- PaginationProvider,
108
- {
109
- visiblePageItems,
110
- noEllipsis,
111
- type,
112
- ...rest,
113
- children: /* @__PURE__ */ jsx2(PaginationWrapper, { className, children })
114
- }
115
- );
116
- };
117
- var PaginationWrapper = ({
118
- children,
119
- className
84
+ ), O = ({
85
+ children: i,
86
+ className: e
120
87
  }) => {
121
- const { pagination: pagination2 } = usePagination();
122
- const props = pagination2.getRootProps();
123
- return /* @__PURE__ */ jsx2("nav", { "data-spark-component": "pagination", ...props, className, children: /* @__PURE__ */ jsx2("ul", { className: "gap-md flex flex-wrap", children }) });
88
+ const { pagination: n } = m(), a = n.getRootProps();
89
+ return /* @__PURE__ */ t("nav", { "data-spark-component": "pagination", ...a, className: e, children: /* @__PURE__ */ t("ul", { className: "gap-md flex flex-wrap", children: i }) });
124
90
  };
125
- Pagination.displayName = "Pagination";
126
-
127
- // src/pagination/PaginationEllipsis.tsx
128
- import { mergeProps } from "@zag-js/react";
129
- import { cx } from "class-variance-authority";
130
- import { jsx as jsx3 } from "react/jsx-runtime";
131
- var Ellipsis = ({ children, index, className, ref, ...rest }) => {
132
- const { pagination: pagination2 } = usePagination();
133
- const apiProps = pagination2.getEllipsisProps({ index });
134
- const localProps = {
135
- className: cx("flex size-sz-44 items-center justify-center", className),
136
- ...rest
137
- };
138
- const mergedProps = mergeProps(apiProps, localProps);
139
- return /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3("span", { "data-spark-component": "pagination-ellipsis", ref, ...mergedProps, children: children || "\u2026" }) });
91
+ I.displayName = "Pagination";
92
+ const k = ({ children: i, index: e, className: n, ref: a, ...r }) => {
93
+ const { pagination: s } = m(), l = s.getEllipsisProps({ index: e }), g = {
94
+ className: R("flex size-sz-44 items-center justify-center", n),
95
+ ...r
96
+ }, p = u(l, g);
97
+ return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t("span", { "data-spark-component": "pagination-ellipsis", ref: a, ...p, children: i || "…" }) });
140
98
  };
141
- Ellipsis.displayName = "Pagination.Ellipsis";
142
-
143
- // src/pagination/PaginationFirstPageTrigger.tsx
144
- import { ArrowDoubleLeft } from "@spark-ui/icons/ArrowDoubleLeft";
145
- import { mergeProps as mergeProps2 } from "@zag-js/react";
146
- import { jsx as jsx4 } from "react/jsx-runtime";
147
- var FirstPageTrigger = ({
148
- children,
149
- className,
150
- href,
151
- ref,
152
- ...props
99
+ k.displayName = "Pagination.Ellipsis";
100
+ const y = ({
101
+ children: i,
102
+ className: e,
103
+ href: n,
104
+ ref: a,
105
+ ...r
153
106
  }) => {
154
- const { pagination: pagination2, type } = usePagination();
155
- const apiProps = pagination2.getFirstPageTriggerProps();
156
- const shouldDisableLink = type === "link" && apiProps["data-disabled"] === "";
157
- const localProps = {
107
+ const { pagination: s, type: l } = m(), g = s.getFirstPageTriggerProps(), p = l === "link" && g["data-disabled"] === "", d = {
158
108
  "data-spark-component": "pagination-first-page-trigger",
159
109
  intent: "support",
160
110
  design: "contrast",
161
- ...props,
162
- className,
163
- ...shouldDisableLink && {
164
- disabled: true,
111
+ ...r,
112
+ className: e,
113
+ ...p && {
114
+ disabled: !0,
165
115
  role: "link",
166
- "aria-disabled": true
116
+ "aria-disabled": !0
167
117
  }
168
- };
169
- const mergedProps = mergeProps2(
170
- apiProps,
171
- localProps
172
- );
173
- const content = children || /* @__PURE__ */ jsx4(Icon, { children: /* @__PURE__ */ jsx4(ArrowDoubleLeft, {}) });
174
- return /* @__PURE__ */ jsx4("li", { children: href ? /* @__PURE__ */ jsx4(IconButton, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ jsx4("a", { href: shouldDisableLink ? void 0 : href, children: content }) }) : /* @__PURE__ */ jsx4(IconButton, { ref, ...mergedProps, children: content }) });
118
+ }, c = u(
119
+ g,
120
+ d
121
+ ), o = i || /* @__PURE__ */ t(h, { children: /* @__PURE__ */ t(j, {}) });
122
+ return /* @__PURE__ */ t("li", { children: n ? /* @__PURE__ */ t(P, { ref: a, ...c, asChild: !0, children: /* @__PURE__ */ t("a", { href: p ? void 0 : n, children: o }) }) : /* @__PURE__ */ t(P, { ref: a, ...c, children: o }) });
175
123
  };
176
- FirstPageTrigger.displayName = "Pagination.FirstPageTrigger";
177
-
178
- // src/pagination/PaginationItem.tsx
179
- import { mergeProps as mergeProps3 } from "@zag-js/react";
180
- import { jsx as jsx5 } from "react/jsx-runtime";
181
- var Item = ({ children, value, className, href, ref, ...props }) => {
182
- const { pagination: pagination2 } = usePagination();
183
- const apiProps = pagination2.getItemProps({ type: "page", value });
184
- const localProps = {
124
+ y.displayName = "Pagination.FirstPageTrigger";
125
+ const N = ({ children: i, value: e, className: n, href: a, ref: r, ...s }) => {
126
+ const { pagination: l } = m(), g = l.getItemProps({ type: "page", value: e }), p = {
185
127
  "data-spark-component": "pagination-item",
186
128
  intent: "support",
187
- design: apiProps["aria-current"] === "page" ? "filled" : "contrast",
188
- className,
189
- ...props
190
- };
191
- const mergedProps = mergeProps3(apiProps, localProps);
192
- return /* @__PURE__ */ jsx5("li", { children: href ? /* @__PURE__ */ jsx5(Button, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ jsx5("a", { href, children: children || value }) }) : /* @__PURE__ */ jsx5(Button, { ref, ...mergedProps, children: children || value }) });
129
+ design: g["aria-current"] === "page" ? "filled" : "contrast",
130
+ className: n,
131
+ ...s
132
+ }, d = u(g, p);
133
+ return /* @__PURE__ */ t("li", { children: a ? /* @__PURE__ */ t(L, { ref: r, ...d, asChild: !0, children: /* @__PURE__ */ t("a", { href: a, children: i || e }) }) : /* @__PURE__ */ t(L, { ref: r, ...d, children: i || e }) });
193
134
  };
194
- Item.displayName = "Pagination.Item";
195
-
196
- // src/pagination/PaginationLastPageTrigger.tsx
197
- import { ArrowDoubleRight } from "@spark-ui/icons/ArrowDoubleRight";
198
- import { mergeProps as mergeProps4 } from "@zag-js/react";
199
- import { jsx as jsx6 } from "react/jsx-runtime";
200
- var LastPageTrigger = ({
201
- children,
202
- className,
203
- href,
204
- ref,
205
- ...props
135
+ N.displayName = "Pagination.Item";
136
+ const f = ({
137
+ children: i,
138
+ className: e,
139
+ href: n,
140
+ ref: a,
141
+ ...r
206
142
  }) => {
207
- const { pagination: pagination2, type } = usePagination();
208
- const apiProps = pagination2.getLastPageTriggerProps();
209
- const shouldDisableLink = type === "link" && apiProps["data-disabled"] === "";
210
- const localProps = {
143
+ const { pagination: s, type: l } = m(), g = s.getLastPageTriggerProps(), p = l === "link" && g["data-disabled"] === "", d = {
211
144
  "data-spark-component": "pagination-last-page-trigger",
212
145
  intent: "support",
213
146
  design: "contrast",
214
- ...props,
215
- className,
216
- ...shouldDisableLink && {
217
- disabled: true,
147
+ ...r,
148
+ className: e,
149
+ ...p && {
150
+ disabled: !0,
218
151
  role: "link",
219
- "aria-disabled": true
152
+ "aria-disabled": !0
220
153
  }
221
- };
222
- const mergedProps = mergeProps4(
223
- apiProps,
224
- localProps
225
- );
226
- const content = children || /* @__PURE__ */ jsx6(Icon, { children: /* @__PURE__ */ jsx6(ArrowDoubleRight, {}) });
227
- return /* @__PURE__ */ jsx6("li", { children: href ? /* @__PURE__ */ jsx6(IconButton, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ jsx6("a", { href: shouldDisableLink ? void 0 : href, children: content }) }) : /* @__PURE__ */ jsx6(IconButton, { ref, ...mergedProps, children: content }) });
154
+ }, c = u(
155
+ g,
156
+ d
157
+ ), o = i || /* @__PURE__ */ t(h, { children: /* @__PURE__ */ t(z, {}) });
158
+ return /* @__PURE__ */ t("li", { children: n ? /* @__PURE__ */ t(P, { ref: a, ...c, asChild: !0, children: /* @__PURE__ */ t("a", { href: p ? void 0 : n, children: o }) }) : /* @__PURE__ */ t(P, { ref: a, ...c, children: o }) });
228
159
  };
229
- LastPageTrigger.displayName = "Pagination.LastPageTrigger";
230
-
231
- // src/pagination/PaginationNextTrigger.tsx
232
- import { ArrowVerticalRight } from "@spark-ui/icons/ArrowVerticalRight";
233
- import { mergeProps as mergeProps5 } from "@zag-js/react";
234
- import { jsx as jsx7 } from "react/jsx-runtime";
235
- var NextTrigger = ({ children, className, href, ref, ...props }) => {
236
- const { pagination: pagination2, type } = usePagination();
237
- const apiProps = pagination2.getNextTriggerProps();
238
- const shouldDisableLink = type === "link" && apiProps["data-disabled"] === "";
239
- const localProps = {
160
+ f.displayName = "Pagination.LastPageTrigger";
161
+ const T = ({ children: i, className: e, href: n, ref: a, ...r }) => {
162
+ const { pagination: s, type: l } = m(), g = s.getNextTriggerProps(), p = l === "link" && g["data-disabled"] === "", d = {
240
163
  "data-spark-component": "pagination-next-trigger",
241
164
  intent: "support",
242
165
  design: "contrast",
243
- ...props,
244
- className,
245
- ...shouldDisableLink && {
246
- disabled: true,
166
+ ...r,
167
+ className: e,
168
+ ...p && {
169
+ disabled: !0,
247
170
  role: "link",
248
- "aria-disabled": true
171
+ "aria-disabled": !0
249
172
  }
250
- };
251
- const mergedProps = mergeProps5(
252
- apiProps,
253
- localProps
254
- );
255
- const content = children || /* @__PURE__ */ jsx7(Icon, { children: /* @__PURE__ */ jsx7(ArrowVerticalRight, {}) });
256
- return /* @__PURE__ */ jsx7("li", { children: href ? /* @__PURE__ */ jsx7(IconButton, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ jsx7("a", { href: shouldDisableLink ? void 0 : href, children: content }) }) : /* @__PURE__ */ jsx7(IconButton, { ref, ...mergedProps, children: content }) });
173
+ }, c = u(
174
+ g,
175
+ d
176
+ ), o = i || /* @__PURE__ */ t(h, { children: /* @__PURE__ */ t(B, {}) });
177
+ return /* @__PURE__ */ t("li", { children: n ? /* @__PURE__ */ t(P, { ref: a, ...c, asChild: !0, children: /* @__PURE__ */ t("a", { href: p ? void 0 : n, children: o }) }) : /* @__PURE__ */ t(P, { ref: a, ...c, children: o }) });
257
178
  };
258
- NextTrigger.displayName = "Pagination.NextTrigger";
259
-
260
- // src/pagination/PaginationPages.tsx
261
- var Pages = ({ children }) => {
262
- const { pagination: pagination2 } = usePagination();
263
- return children(pagination2);
179
+ T.displayName = "Pagination.NextTrigger";
180
+ const b = ({ children: i }) => {
181
+ const { pagination: e } = m();
182
+ return i(e);
264
183
  };
265
- Pages.displayName = "Pagination.Pages";
266
-
267
- // src/pagination/PaginationPrevTrigger.tsx
268
- import { ArrowVerticalLeft } from "@spark-ui/icons/ArrowVerticalLeft";
269
- import { mergeProps as mergeProps6 } from "@zag-js/react";
270
- import { jsx as jsx8 } from "react/jsx-runtime";
271
- var PrevTrigger = ({ children, className, href, ref, ...props }) => {
272
- const { pagination: pagination2, type } = usePagination();
273
- const apiProps = pagination2.getPrevTriggerProps();
274
- const shouldDisableLink = type === "link" && apiProps["data-disabled"] === "";
275
- const localProps = {
184
+ b.displayName = "Pagination.Pages";
185
+ const x = ({ children: i, className: e, href: n, ref: a, ...r }) => {
186
+ const { pagination: s, type: l } = m(), g = s.getPrevTriggerProps(), p = l === "link" && g["data-disabled"] === "", d = {
276
187
  "data-spark-component": "pagination-prev-trigger",
277
188
  intent: "support",
278
189
  design: "contrast",
279
- ...props,
280
- className,
281
- ...shouldDisableLink && {
282
- disabled: true,
190
+ ...r,
191
+ className: e,
192
+ ...p && {
193
+ disabled: !0,
283
194
  role: "link",
284
- "aria-disabled": true
195
+ "aria-disabled": !0
285
196
  }
286
- };
287
- const mergedProps = mergeProps6(
288
- apiProps,
289
- localProps
290
- );
291
- const content = children || /* @__PURE__ */ jsx8(Icon, { children: /* @__PURE__ */ jsx8(ArrowVerticalLeft, {}) });
292
- return /* @__PURE__ */ jsx8("li", { children: href ? /* @__PURE__ */ jsx8(IconButton, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ jsx8("a", { href: shouldDisableLink ? void 0 : href, children: content }) }) : /* @__PURE__ */ jsx8(IconButton, { ref, ...mergedProps, children: content }) });
197
+ }, c = u(
198
+ g,
199
+ d
200
+ ), o = i || /* @__PURE__ */ t(h, { children: /* @__PURE__ */ t($, {}) });
201
+ return /* @__PURE__ */ t("li", { children: n ? /* @__PURE__ */ t(P, { ref: a, ...c, asChild: !0, children: /* @__PURE__ */ t("a", { href: p ? void 0 : n, children: o }) }) : /* @__PURE__ */ t(P, { ref: a, ...c, children: o }) });
293
202
  };
294
- PrevTrigger.displayName = "Pagination.PrevTrigger";
295
-
296
- // src/pagination/index.ts
297
- var Pagination2 = Object.assign(Pagination, {
298
- PrevTrigger,
299
- NextTrigger,
300
- Pages,
301
- Item,
302
- Ellipsis,
303
- FirstPageTrigger,
304
- LastPageTrigger
203
+ x.displayName = "Pagination.PrevTrigger";
204
+ const q = Object.assign(I, {
205
+ PrevTrigger: x,
206
+ NextTrigger: T,
207
+ Pages: b,
208
+ Item: N,
209
+ Ellipsis: k,
210
+ FirstPageTrigger: y,
211
+ LastPageTrigger: f
305
212
  });
306
- Pagination2.displayName = "Pagination";
307
- PrevTrigger.displayName = "Pagination.PrevTrigger";
308
- NextTrigger.displayName = "Pagination.NextTrigger";
309
- Pages.displayName = "Pagination.Pages";
310
- Item.displayName = "Pagination.Item";
311
- Ellipsis.displayName = "Pagination.Ellipsis";
312
- FirstPageTrigger.displayName = "Pagination.FirstPageTrigger";
313
- LastPageTrigger.displayName = "Pagination.LastPageTrigger";
213
+ q.displayName = "Pagination";
214
+ x.displayName = "Pagination.PrevTrigger";
215
+ T.displayName = "Pagination.NextTrigger";
216
+ b.displayName = "Pagination.Pages";
217
+ N.displayName = "Pagination.Item";
218
+ k.displayName = "Pagination.Ellipsis";
219
+ y.displayName = "Pagination.FirstPageTrigger";
220
+ f.displayName = "Pagination.LastPageTrigger";
314
221
  export {
315
- Pagination2 as Pagination
222
+ q as Pagination
316
223
  };
317
- //# sourceMappingURL=index.mjs.map
224
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/pagination/PaginationContext.tsx","../../src/pagination/utils.ts","../../src/pagination/Pagination.tsx","../../src/pagination/PaginationEllipsis.tsx","../../src/pagination/PaginationFirstPageTrigger.tsx","../../src/pagination/PaginationItem.tsx","../../src/pagination/PaginationLastPageTrigger.tsx","../../src/pagination/PaginationNextTrigger.tsx","../../src/pagination/PaginationPages.tsx","../../src/pagination/PaginationPrevTrigger.tsx","../../src/pagination/index.ts"],"sourcesContent":["import * as pagination from '@zag-js/pagination'\nimport { normalizeProps, type PropTypes, useMachine } from '@zag-js/react'\nimport { createContext, type ReactNode, useContext, useId } from 'react'\n\nimport { sliceArrayWithIndex } from './utils'\n\nexport interface PaginationContextState<T extends PropTypes = PropTypes> {\n type: pagination.Props['type']\n pagination: pagination.Api<T> & {\n getFirstPageTriggerProps: () => ReturnType<pagination.Api<T>['getPrevTriggerProps']> & {\n 'data-part': string\n onClick: () => void\n }\n getLastPageTriggerProps: () => ReturnType<pagination.Api<T>['getNextTriggerProps']> & {\n 'data-part': string\n onClick: () => void\n }\n }\n}\n\nconst PaginationContext = createContext<PaginationContextState | null>(null)\n\nexport interface PaginationProviderProps {\n children: ReactNode\n /**\n * Total number of data items available across all pages.\n */\n count: number\n /**\n * Maximum amount of items displayed on a single page.\n */\n pageSize: number\n /**\n * Number of visible pages (or ellipsis) between previous and next page triggers.\n */\n visiblePageItems?: number\n /**\n * The current page (active page)\n */\n page?: pagination.Props['page']\n /**\n * If your pagination contains buttons instead of links, set `type` to `button`, extra attributes will be applied on page items for a11y.\n */\n type?: pagination.Props['type']\n onPageChange?: pagination.Props['onPageChange']\n noEllipsis?: boolean\n}\n\nexport const PaginationProvider = ({\n children,\n count,\n visiblePageItems = 7,\n pageSize,\n page,\n onPageChange,\n noEllipsis,\n type = 'link',\n}: PaginationProviderProps) => {\n /**\n * Here `Infinity` is used because we apply a custom slice ourselves to manage the \"no ellipsis\" version.\n * It means Zag won't filter out any page item, allowing us to apply our own slicing logic.\n */\n const siblingCount = noEllipsis ? Infinity : Math.max(0, Math.floor((visiblePageItems - 5) / 2))\n\n const id = useId()\n\n const service = useMachine(pagination.machine, {\n id,\n count,\n siblingCount,\n pageSize,\n page,\n onPageChange,\n type,\n })\n\n const api = pagination.connect(service, normalizeProps)\n const pages = noEllipsis\n ? sliceArrayWithIndex(api.pages, api.page - 1, visiblePageItems)\n : api.pages\n\n return (\n <PaginationContext.Provider\n value={{\n type,\n pagination: {\n ...api,\n pages,\n // Extending ZagJS anatomy\n getFirstPageTriggerProps: () => {\n return {\n ...api.getPrevTriggerProps(),\n id: `${api.getRootProps().id}:first`,\n 'data-part': 'first-page-trigger',\n onClick: api.goToFirstPage,\n }\n },\n getLastPageTriggerProps: () => {\n return {\n ...api.getNextTriggerProps(),\n id: `${api.getRootProps().id}:last`,\n 'data-part': 'last-page-trigger',\n onClick: api.goToLastPage,\n }\n },\n },\n }}\n >\n {children}\n </PaginationContext.Provider>\n )\n}\n\nexport const usePagination = () => {\n const context = useContext(PaginationContext)\n\n if (!context) {\n throw Error('usePagination must be used within a Pagination provider')\n }\n\n return context\n}\n","export function sliceArrayWithIndex(arr: any[], index: number, length: number) {\n const relativeElements = (length - 1) / 2\n\n let start = Math.max(0, index - relativeElements)\n let end = Math.min(arr.length, index + relativeElements + 1)\n\n if (end - start < length) {\n start = Math.max(0, Math.min(start, arr.length - length))\n end = Math.min(arr.length, start + length)\n }\n\n return arr.slice(start, end)\n}\n","import { ReactNode } from 'react'\n\nimport {\n PaginationProvider,\n type PaginationProviderProps,\n usePagination,\n} from './PaginationContext'\n\nexport type PaginationProps = PaginationProviderProps & { className?: string }\n\nexport const Pagination = ({\n children,\n visiblePageItems = 5,\n type = 'link',\n noEllipsis = false,\n className,\n ...rest\n}: PaginationProps) => {\n return (\n <PaginationProvider\n visiblePageItems={visiblePageItems}\n noEllipsis={noEllipsis}\n type={type}\n {...rest}\n >\n <PaginationWrapper className={className}>{children}</PaginationWrapper>\n </PaginationProvider>\n )\n}\n\nconst PaginationWrapper = ({\n children,\n className,\n}: {\n children: ReactNode\n className?: string\n}) => {\n const { pagination } = usePagination()\n\n const props = pagination.getRootProps()\n\n return (\n <nav data-spark-component=\"pagination\" {...props} className={className}>\n <ul className=\"gap-md flex flex-wrap\">{children}</ul>\n </nav>\n )\n}\n\nPagination.displayName = 'Pagination'\n","import { mergeProps } from '@zag-js/react'\nimport { cx } from 'class-variance-authority'\nimport { type ComponentPropsWithRef } from 'react'\n\nimport { usePagination } from './PaginationContext'\n\ninterface EllipsisProps extends ComponentPropsWithRef<'span'> {\n index: number\n}\n\nexport const Ellipsis = ({ children, index, className, ref, ...rest }: EllipsisProps) => {\n const { pagination } = usePagination()\n const apiProps = pagination.getEllipsisProps({ index })\n const localProps = {\n className: cx('flex size-sz-44 items-center justify-center', className),\n ...rest,\n }\n\n const mergedProps = mergeProps(apiProps, localProps)\n\n return (\n <li>\n <span data-spark-component=\"pagination-ellipsis\" ref={ref} {...mergedProps}>\n {children || '\\u2026'}\n </span>\n </li>\n )\n}\n\nEllipsis.displayName = 'Pagination.Ellipsis'\n","import { ArrowDoubleLeft } from '@spark-ui/icons/ArrowDoubleLeft'\nimport { mergeProps } from '@zag-js/react'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton } from '../icon-button'\nimport { usePagination } from './PaginationContext'\n\ninterface AnchorProps extends ComponentPropsWithoutRef<'a'> {\n href: string\n}\n\ninterface ButtonProps extends ComponentPropsWithoutRef<'button'> {\n href?: undefined\n}\nexport type FirstPageTriggerProps = Omit<AnchorProps | ButtonProps, 'aria-label'> & {\n 'aria-label': string\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const FirstPageTrigger = ({\n children,\n className,\n href,\n ref,\n ...props\n}: FirstPageTriggerProps) => {\n const { pagination, type } = usePagination()\n\n // ZagJS props\n const apiProps = pagination.getFirstPageTriggerProps()\n\n const shouldDisableLink =\n type === 'link' &&\n (apiProps as typeof apiProps & { 'data-disabled'?: string })['data-disabled'] === ''\n\n // Locally managed props\n const localProps = {\n 'data-spark-component': 'pagination-first-page-trigger',\n intent: 'support',\n design: 'contrast',\n ...props,\n className,\n ...(shouldDisableLink && {\n disabled: true,\n role: 'link',\n 'aria-disabled': true,\n }),\n }\n\n // We know 'aria-label' is included in props\n type WithAriaLabel = Omit<typeof apiProps, 'aria-label'> & { 'aria-label': string }\n\n const mergedProps = mergeProps(\n apiProps,\n localProps as unknown as typeof apiProps\n ) as WithAriaLabel\n\n const content = children || (\n <Icon>\n <ArrowDoubleLeft />\n </Icon>\n )\n\n return (\n <li>\n {href ? (\n <IconButton ref={ref} {...mergedProps} asChild>\n <a href={shouldDisableLink ? undefined : href}>{content}</a>\n </IconButton>\n ) : (\n <IconButton ref={ref} {...mergedProps}>\n {content}\n </IconButton>\n )}\n </li>\n )\n}\n\nFirstPageTrigger.displayName = 'Pagination.FirstPageTrigger'\n","import { mergeProps } from '@zag-js/react'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Button } from '../button'\nimport { usePagination } from './PaginationContext'\n\ninterface AnchorProps extends ComponentPropsWithoutRef<'a'> {\n href: string\n}\n\ninterface ButtonProps extends ComponentPropsWithoutRef<'button'> {\n href?: undefined\n}\nexport type ItemProps = Omit<AnchorProps | ButtonProps, 'aria-label'> & {\n 'aria-label': string\n value: number\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const Item = ({ children, value, className, href, ref, ...props }: ItemProps) => {\n const { pagination } = usePagination()\n\n // ZagJS props\n const apiProps = pagination.getItemProps({ type: 'page', value })\n\n // Locally managed props\n const localProps = {\n 'data-spark-component': 'pagination-item',\n intent: 'support',\n design: apiProps['aria-current'] === 'page' ? 'filled' : 'contrast',\n className,\n ...props,\n }\n\n const mergedProps = mergeProps(apiProps, localProps)\n\n return (\n <li>\n {href ? (\n <Button ref={ref} {...mergedProps} asChild>\n <a href={href}>{children || value}</a>\n </Button>\n ) : (\n <Button ref={ref} {...mergedProps}>\n {children || value}\n </Button>\n )}\n </li>\n )\n}\n\nItem.displayName = 'Pagination.Item'\n","import { ArrowDoubleRight } from '@spark-ui/icons/ArrowDoubleRight'\nimport { mergeProps } from '@zag-js/react'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton } from '../icon-button'\nimport { usePagination } from './PaginationContext'\n\ninterface AnchorProps extends ComponentPropsWithoutRef<'a'> {\n href: string\n}\n\ninterface ButtonProps extends ComponentPropsWithoutRef<'button'> {\n href?: undefined\n}\nexport type LastPageTriggerProps = Omit<AnchorProps | ButtonProps, 'aria-label'> & {\n 'aria-label': string\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const LastPageTrigger = ({\n children,\n className,\n href,\n ref,\n ...props\n}: LastPageTriggerProps) => {\n const { pagination, type } = usePagination()\n\n // ZagJS props\n const apiProps = pagination.getLastPageTriggerProps()\n\n const shouldDisableLink =\n type === 'link' &&\n (apiProps as typeof apiProps & { 'data-disabled'?: string })['data-disabled'] === ''\n\n // Locally managed props\n const localProps = {\n 'data-spark-component': 'pagination-last-page-trigger',\n intent: 'support',\n design: 'contrast',\n ...props,\n className,\n ...(shouldDisableLink && {\n disabled: true,\n role: 'link',\n 'aria-disabled': true,\n }),\n }\n\n // We know 'aria-label' is included in props\n type WithAriaLabel = Omit<typeof apiProps, 'aria-label'> & { 'aria-label': string }\n\n const mergedProps = mergeProps(\n apiProps,\n localProps as unknown as typeof apiProps\n ) as WithAriaLabel\n\n const content = children || (\n <Icon>\n <ArrowDoubleRight />\n </Icon>\n )\n\n return (\n <li>\n {href ? (\n <IconButton ref={ref} {...mergedProps} asChild>\n <a href={shouldDisableLink ? undefined : href}>{content}</a>\n </IconButton>\n ) : (\n <IconButton ref={ref} {...mergedProps}>\n {content}\n </IconButton>\n )}\n </li>\n )\n}\n\nLastPageTrigger.displayName = 'Pagination.LastPageTrigger'\n","import { ArrowVerticalRight } from '@spark-ui/icons/ArrowVerticalRight'\nimport { mergeProps } from '@zag-js/react'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton } from '../icon-button'\nimport { usePagination } from './PaginationContext'\n\ninterface AnchorProps extends ComponentPropsWithoutRef<'a'> {\n href: string\n}\n\ninterface ButtonProps extends ComponentPropsWithoutRef<'button'> {\n href?: undefined\n}\nexport type NextTriggerProps = Omit<AnchorProps | ButtonProps, 'aria-label'> & {\n 'aria-label': string\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const NextTrigger = ({ children, className, href, ref, ...props }: NextTriggerProps) => {\n const { pagination, type } = usePagination()\n\n // ZagJS props\n const apiProps = pagination.getNextTriggerProps()\n\n const shouldDisableLink =\n type === 'link' &&\n (apiProps as typeof apiProps & { 'data-disabled'?: string })['data-disabled'] === ''\n\n // Locally managed props\n const localProps = {\n 'data-spark-component': 'pagination-next-trigger',\n intent: 'support',\n design: 'contrast',\n ...props,\n className,\n ...(shouldDisableLink && {\n disabled: true,\n role: 'link',\n 'aria-disabled': true,\n }),\n }\n\n // We know 'aria-label' is included in props\n type WithAriaLabel = Omit<typeof apiProps, 'aria-label'> & { 'aria-label': string }\n\n const mergedProps = mergeProps(\n apiProps,\n localProps as unknown as typeof apiProps\n ) as WithAriaLabel\n\n const content = children || (\n <Icon>\n <ArrowVerticalRight />\n </Icon>\n )\n\n return (\n <li>\n {href ? (\n <IconButton ref={ref} {...mergedProps} asChild>\n <a href={shouldDisableLink ? undefined : href}>{content}</a>\n </IconButton>\n ) : (\n <IconButton ref={ref} {...mergedProps}>\n {content}\n </IconButton>\n )}\n </li>\n )\n}\n\nNextTrigger.displayName = 'Pagination.NextTrigger'\n","import * as pagination from '@zag-js/pagination'\nimport { ReactNode } from 'react'\n\nimport { usePagination } from './PaginationContext'\n\n// Extract the 'page' type element from the pagination API's 'pages' array.\ntype PageItem = Extract<pagination.Api['pages'][number], { type: 'page' }>\n\n// Define a type that conditionally tweaks the pagination API\n// based on the generic T parameter.\ntype TweakedPaginationApi<T extends 'noEllipsis' | ''> = Omit<pagination.Api, 'pages'> & {\n pages: T extends 'noEllipsis' ? PageItem[] : pagination.Api['pages']\n}\n\ninterface PagesProps<T extends 'noEllipsis' | ''> {\n children: (pagination: TweakedPaginationApi<T>) => ReactNode\n}\n\nexport const Pages = <T extends 'noEllipsis' | '' = ''>({ children }: PagesProps<T>) => {\n const { pagination } = usePagination()\n\n return children(pagination as TweakedPaginationApi<T>)\n}\n\nPages.displayName = 'Pagination.Pages'\n","import { ArrowVerticalLeft } from '@spark-ui/icons/ArrowVerticalLeft'\nimport { mergeProps } from '@zag-js/react'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton } from '../icon-button'\nimport { usePagination } from './PaginationContext'\n\ninterface AnchorProps extends ComponentPropsWithoutRef<'a'> {\n href: string\n}\n\ninterface ButtonProps extends ComponentPropsWithoutRef<'button'> {\n href?: undefined\n}\nexport type PrevTriggerProps = Omit<AnchorProps | ButtonProps, 'aria-label'> & {\n 'aria-label': string\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const PrevTrigger = ({ children, className, href, ref, ...props }: PrevTriggerProps) => {\n const { pagination, type } = usePagination()\n\n // ZagJS props\n const apiProps = pagination.getPrevTriggerProps()\n\n const shouldDisableLink =\n type === 'link' &&\n (apiProps as typeof apiProps & { 'data-disabled'?: string })['data-disabled'] === ''\n\n // Locally managed props\n const localProps = {\n 'data-spark-component': 'pagination-prev-trigger',\n intent: 'support',\n design: 'contrast',\n ...props,\n className,\n ...(shouldDisableLink && {\n disabled: true,\n role: 'link',\n 'aria-disabled': true,\n }),\n }\n\n // We know 'aria-label' is included in props\n type WithAriaLabel = Omit<typeof apiProps, 'aria-label'> & { 'aria-label': string }\n\n const mergedProps = mergeProps(\n apiProps,\n localProps as unknown as typeof apiProps\n ) as WithAriaLabel\n\n const content = children || (\n <Icon>\n <ArrowVerticalLeft />\n </Icon>\n )\n\n return (\n <li>\n {href ? (\n <IconButton ref={ref} {...mergedProps} asChild>\n <a href={shouldDisableLink ? undefined : href}>{content}</a>\n </IconButton>\n ) : (\n <IconButton ref={ref} {...mergedProps}>\n {content}\n </IconButton>\n )}\n </li>\n )\n}\n\nPrevTrigger.displayName = 'Pagination.PrevTrigger'\n","import type { FC } from 'react'\n\nimport { Pagination as Root, type PaginationProps } from './Pagination'\nimport { Ellipsis } from './PaginationEllipsis'\nimport { FirstPageTrigger } from './PaginationFirstPageTrigger'\nimport { Item } from './PaginationItem'\nimport { LastPageTrigger } from './PaginationLastPageTrigger'\nimport { NextTrigger } from './PaginationNextTrigger'\nimport { Pages } from './PaginationPages'\nimport { PrevTrigger } from './PaginationPrevTrigger'\n\nexport const Pagination: FC<PaginationProps> & {\n PrevTrigger: typeof PrevTrigger\n NextTrigger: typeof NextTrigger\n Pages: typeof Pages\n Item: typeof Item\n Ellipsis: typeof Ellipsis\n FirstPageTrigger: typeof FirstPageTrigger\n LastPageTrigger: typeof LastPageTrigger\n} = Object.assign(Root, {\n PrevTrigger,\n NextTrigger,\n Pages,\n Item,\n Ellipsis,\n FirstPageTrigger,\n LastPageTrigger,\n})\n\nPagination.displayName = 'Pagination'\n\nPrevTrigger.displayName = 'Pagination.PrevTrigger'\nNextTrigger.displayName = 'Pagination.NextTrigger'\nPages.displayName = 'Pagination.Pages'\nItem.displayName = 'Pagination.Item'\nEllipsis.displayName = 'Pagination.Ellipsis'\nFirstPageTrigger.displayName = 'Pagination.FirstPageTrigger'\nLastPageTrigger.displayName = 'Pagination.LastPageTrigger'\n"],"mappings":";;;;;;;;;;;;;;AAAA,YAAY,gBAAgB;AAC5B,SAAS,gBAAgC,kBAAkB;AAC3D,SAAS,eAA+B,YAAY,aAAa;;;ACF1D,SAAS,oBAAoB,KAAY,OAAe,QAAgB;AAC7E,QAAM,oBAAoB,SAAS,KAAK;AAExC,MAAI,QAAQ,KAAK,IAAI,GAAG,QAAQ,gBAAgB;AAChD,MAAI,MAAM,KAAK,IAAI,IAAI,QAAQ,QAAQ,mBAAmB,CAAC;AAE3D,MAAI,MAAM,QAAQ,QAAQ;AACxB,YAAQ,KAAK,IAAI,GAAG,KAAK,IAAI,OAAO,IAAI,SAAS,MAAM,CAAC;AACxD,UAAM,KAAK,IAAI,IAAI,QAAQ,QAAQ,MAAM;AAAA,EAC3C;AAEA,SAAO,IAAI,MAAM,OAAO,GAAG;AAC7B;;;ADsEI;AA9DJ,IAAM,oBAAoB,cAA6C,IAAI;AA4BpE,IAAM,qBAAqB,CAAC;AAAA,EACjC;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AACT,MAA+B;AAK7B,QAAM,eAAe,aAAa,WAAW,KAAK,IAAI,GAAG,KAAK,OAAO,mBAAmB,KAAK,CAAC,CAAC;AAE/F,QAAM,KAAK,MAAM;AAEjB,QAAM,UAAU,WAAsB,oBAAS;AAAA,IAC7C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W,KAAW,GAAG,aACvB,mBACH,GAEJ;AAEJ;AAEA,YAAY,cAAc;;;AC9DnB,IAAMG,cAQT,OAAO,OAAO,YAAM;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEDA,YAAW,cAAc;AAEzB,YAAY,cAAc;AAC1B,YAAY,cAAc;AAC1B,MAAM,cAAc;AACpB,KAAK,cAAc;AACnB,SAAS,cAAc;AACvB,iBAAiB,cAAc;AAC/B,gBAAgB,cAAc;","names":["jsx","pagination","jsx","pagination","mergeProps","jsx","pagination","mergeProps","mergeProps","jsx","pagination","mergeProps","mergeProps","jsx","pagination","mergeProps","mergeProps","jsx","pagination","mergeProps","pagination","mergeProps","jsx","pagination","mergeProps","Pagination"]}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/pagination/utils.ts","../../src/pagination/PaginationContext.tsx","../../src/pagination/Pagination.tsx","../../src/pagination/PaginationEllipsis.tsx","../../src/pagination/PaginationFirstPageTrigger.tsx","../../src/pagination/PaginationItem.tsx","../../src/pagination/PaginationLastPageTrigger.tsx","../../src/pagination/PaginationNextTrigger.tsx","../../src/pagination/PaginationPages.tsx","../../src/pagination/PaginationPrevTrigger.tsx","../../src/pagination/index.ts"],"sourcesContent":["export function sliceArrayWithIndex(arr: any[], index: number, length: number) {\n const relativeElements = (length - 1) / 2\n\n let start = Math.max(0, index - relativeElements)\n let end = Math.min(arr.length, index + relativeElements + 1)\n\n if (end - start < length) {\n start = Math.max(0, Math.min(start, arr.length - length))\n end = Math.min(arr.length, start + length)\n }\n\n return arr.slice(start, end)\n}\n","import * as pagination from '@zag-js/pagination'\nimport { normalizeProps, type PropTypes, useMachine } from '@zag-js/react'\nimport { createContext, type ReactNode, useContext, useId } from 'react'\n\nimport { sliceArrayWithIndex } from './utils'\n\nexport interface PaginationContextState<T extends PropTypes = PropTypes> {\n type: pagination.Props['type']\n pagination: pagination.Api<T> & {\n getFirstPageTriggerProps: () => ReturnType<pagination.Api<T>['getPrevTriggerProps']> & {\n 'data-part': string\n onClick: () => void\n }\n getLastPageTriggerProps: () => ReturnType<pagination.Api<T>['getNextTriggerProps']> & {\n 'data-part': string\n onClick: () => void\n }\n }\n}\n\nconst PaginationContext = createContext<PaginationContextState | null>(null)\n\nexport interface PaginationProviderProps {\n children: ReactNode\n /**\n * Total number of data items available across all pages.\n */\n count: number\n /**\n * Maximum amount of items displayed on a single page.\n */\n pageSize: number\n /**\n * Number of visible pages (or ellipsis) between previous and next page triggers.\n */\n visiblePageItems?: number\n /**\n * The current page (active page)\n */\n page?: pagination.Props['page']\n /**\n * If your pagination contains buttons instead of links, set `type` to `button`, extra attributes will be applied on page items for a11y.\n */\n type?: pagination.Props['type']\n onPageChange?: pagination.Props['onPageChange']\n noEllipsis?: boolean\n}\n\nexport const PaginationProvider = ({\n children,\n count,\n visiblePageItems = 7,\n pageSize,\n page,\n onPageChange,\n noEllipsis,\n type = 'link',\n}: PaginationProviderProps) => {\n /**\n * Here `Infinity` is used because we apply a custom slice ourselves to manage the \"no ellipsis\" version.\n * It means Zag won't filter out any page item, allowing us to apply our own slicing logic.\n */\n const siblingCount = noEllipsis ? Infinity : Math.max(0, Math.floor((visiblePageItems - 5) / 2))\n\n const id = useId()\n\n const service = useMachine(pagination.machine, {\n id,\n count,\n siblingCount,\n pageSize,\n page,\n onPageChange,\n type,\n })\n\n const api = pagination.connect(service, normalizeProps)\n const pages = noEllipsis\n ? sliceArrayWithIndex(api.pages, api.page - 1, visiblePageItems)\n : api.pages\n\n return (\n <PaginationContext.Provider\n value={{\n type,\n pagination: {\n ...api,\n pages,\n // Extending ZagJS anatomy\n getFirstPageTriggerProps: () => {\n return {\n ...api.getPrevTriggerProps(),\n id: `${api.getRootProps().id}:first`,\n 'data-part': 'first-page-trigger',\n onClick: api.goToFirstPage,\n }\n },\n getLastPageTriggerProps: () => {\n return {\n ...api.getNextTriggerProps(),\n id: `${api.getRootProps().id}:last`,\n 'data-part': 'last-page-trigger',\n onClick: api.goToLastPage,\n }\n },\n },\n }}\n >\n {children}\n </PaginationContext.Provider>\n )\n}\n\nexport const usePagination = () => {\n const context = useContext(PaginationContext)\n\n if (!context) {\n throw Error('usePagination must be used within a Pagination provider')\n }\n\n return context\n}\n","import { ReactNode } from 'react'\n\nimport {\n PaginationProvider,\n type PaginationProviderProps,\n usePagination,\n} from './PaginationContext'\n\nexport type PaginationProps = PaginationProviderProps & { className?: string }\n\nexport const Pagination = ({\n children,\n visiblePageItems = 5,\n type = 'link',\n noEllipsis = false,\n className,\n ...rest\n}: PaginationProps) => {\n return (\n <PaginationProvider\n visiblePageItems={visiblePageItems}\n noEllipsis={noEllipsis}\n type={type}\n {...rest}\n >\n <PaginationWrapper className={className}>{children}</PaginationWrapper>\n </PaginationProvider>\n )\n}\n\nconst PaginationWrapper = ({\n children,\n className,\n}: {\n children: ReactNode\n className?: string\n}) => {\n const { pagination } = usePagination()\n\n const props = pagination.getRootProps()\n\n return (\n <nav data-spark-component=\"pagination\" {...props} className={className}>\n <ul className=\"gap-md flex flex-wrap\">{children}</ul>\n </nav>\n )\n}\n\nPagination.displayName = 'Pagination'\n","import { mergeProps } from '@zag-js/react'\nimport { cx } from 'class-variance-authority'\nimport { type ComponentPropsWithRef } from 'react'\n\nimport { usePagination } from './PaginationContext'\n\ninterface EllipsisProps extends ComponentPropsWithRef<'span'> {\n index: number\n}\n\nexport const Ellipsis = ({ children, index, className, ref, ...rest }: EllipsisProps) => {\n const { pagination } = usePagination()\n const apiProps = pagination.getEllipsisProps({ index })\n const localProps = {\n className: cx('flex size-sz-44 items-center justify-center', className),\n ...rest,\n }\n\n const mergedProps = mergeProps(apiProps, localProps)\n\n return (\n <li>\n <span data-spark-component=\"pagination-ellipsis\" ref={ref} {...mergedProps}>\n {children || '\\u2026'}\n </span>\n </li>\n )\n}\n\nEllipsis.displayName = 'Pagination.Ellipsis'\n","import { ArrowDoubleLeft } from '@spark-ui/icons/ArrowDoubleLeft'\nimport { mergeProps } from '@zag-js/react'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton } from '../icon-button'\nimport { usePagination } from './PaginationContext'\n\ninterface AnchorProps extends ComponentPropsWithoutRef<'a'> {\n href: string\n}\n\ninterface ButtonProps extends ComponentPropsWithoutRef<'button'> {\n href?: undefined\n}\nexport type FirstPageTriggerProps = Omit<AnchorProps | ButtonProps, 'aria-label'> & {\n 'aria-label': string\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const FirstPageTrigger = ({\n children,\n className,\n href,\n ref,\n ...props\n}: FirstPageTriggerProps) => {\n const { pagination, type } = usePagination()\n\n // ZagJS props\n const apiProps = pagination.getFirstPageTriggerProps()\n\n const shouldDisableLink =\n type === 'link' &&\n (apiProps as typeof apiProps & { 'data-disabled'?: string })['data-disabled'] === ''\n\n // Locally managed props\n const localProps = {\n 'data-spark-component': 'pagination-first-page-trigger',\n intent: 'support',\n design: 'contrast',\n ...props,\n className,\n ...(shouldDisableLink && {\n disabled: true,\n role: 'link',\n 'aria-disabled': true,\n }),\n }\n\n // We know 'aria-label' is included in props\n type WithAriaLabel = Omit<typeof apiProps, 'aria-label'> & { 'aria-label': string }\n\n const mergedProps = mergeProps(\n apiProps,\n localProps as unknown as typeof apiProps\n ) as WithAriaLabel\n\n const content = children || (\n <Icon>\n <ArrowDoubleLeft />\n </Icon>\n )\n\n return (\n <li>\n {href ? (\n <IconButton ref={ref} {...mergedProps} asChild>\n <a href={shouldDisableLink ? undefined : href}>{content}</a>\n </IconButton>\n ) : (\n <IconButton ref={ref} {...mergedProps}>\n {content}\n </IconButton>\n )}\n </li>\n )\n}\n\nFirstPageTrigger.displayName = 'Pagination.FirstPageTrigger'\n","import { mergeProps } from '@zag-js/react'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Button } from '../button'\nimport { usePagination } from './PaginationContext'\n\ninterface AnchorProps extends ComponentPropsWithoutRef<'a'> {\n href: string\n}\n\ninterface ButtonProps extends ComponentPropsWithoutRef<'button'> {\n href?: undefined\n}\nexport type ItemProps = Omit<AnchorProps | ButtonProps, 'aria-label'> & {\n 'aria-label': string\n value: number\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const Item = ({ children, value, className, href, ref, ...props }: ItemProps) => {\n const { pagination } = usePagination()\n\n // ZagJS props\n const apiProps = pagination.getItemProps({ type: 'page', value })\n\n // Locally managed props\n const localProps = {\n 'data-spark-component': 'pagination-item',\n intent: 'support',\n design: apiProps['aria-current'] === 'page' ? 'filled' : 'contrast',\n className,\n ...props,\n }\n\n const mergedProps = mergeProps(apiProps, localProps)\n\n return (\n <li>\n {href ? (\n <Button ref={ref} {...mergedProps} asChild>\n <a href={href}>{children || value}</a>\n </Button>\n ) : (\n <Button ref={ref} {...mergedProps}>\n {children || value}\n </Button>\n )}\n </li>\n )\n}\n\nItem.displayName = 'Pagination.Item'\n","import { ArrowDoubleRight } from '@spark-ui/icons/ArrowDoubleRight'\nimport { mergeProps } from '@zag-js/react'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton } from '../icon-button'\nimport { usePagination } from './PaginationContext'\n\ninterface AnchorProps extends ComponentPropsWithoutRef<'a'> {\n href: string\n}\n\ninterface ButtonProps extends ComponentPropsWithoutRef<'button'> {\n href?: undefined\n}\nexport type LastPageTriggerProps = Omit<AnchorProps | ButtonProps, 'aria-label'> & {\n 'aria-label': string\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const LastPageTrigger = ({\n children,\n className,\n href,\n ref,\n ...props\n}: LastPageTriggerProps) => {\n const { pagination, type } = usePagination()\n\n // ZagJS props\n const apiProps = pagination.getLastPageTriggerProps()\n\n const shouldDisableLink =\n type === 'link' &&\n (apiProps as typeof apiProps & { 'data-disabled'?: string })['data-disabled'] === ''\n\n // Locally managed props\n const localProps = {\n 'data-spark-component': 'pagination-last-page-trigger',\n intent: 'support',\n design: 'contrast',\n ...props,\n className,\n ...(shouldDisableLink && {\n disabled: true,\n role: 'link',\n 'aria-disabled': true,\n }),\n }\n\n // We know 'aria-label' is included in props\n type WithAriaLabel = Omit<typeof apiProps, 'aria-label'> & { 'aria-label': string }\n\n const mergedProps = mergeProps(\n apiProps,\n localProps as unknown as typeof apiProps\n ) as WithAriaLabel\n\n const content = children || (\n <Icon>\n <ArrowDoubleRight />\n </Icon>\n )\n\n return (\n <li>\n {href ? (\n <IconButton ref={ref} {...mergedProps} asChild>\n <a href={shouldDisableLink ? undefined : href}>{content}</a>\n </IconButton>\n ) : (\n <IconButton ref={ref} {...mergedProps}>\n {content}\n </IconButton>\n )}\n </li>\n )\n}\n\nLastPageTrigger.displayName = 'Pagination.LastPageTrigger'\n","import { ArrowVerticalRight } from '@spark-ui/icons/ArrowVerticalRight'\nimport { mergeProps } from '@zag-js/react'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton } from '../icon-button'\nimport { usePagination } from './PaginationContext'\n\ninterface AnchorProps extends ComponentPropsWithoutRef<'a'> {\n href: string\n}\n\ninterface ButtonProps extends ComponentPropsWithoutRef<'button'> {\n href?: undefined\n}\nexport type NextTriggerProps = Omit<AnchorProps | ButtonProps, 'aria-label'> & {\n 'aria-label': string\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const NextTrigger = ({ children, className, href, ref, ...props }: NextTriggerProps) => {\n const { pagination, type } = usePagination()\n\n // ZagJS props\n const apiProps = pagination.getNextTriggerProps()\n\n const shouldDisableLink =\n type === 'link' &&\n (apiProps as typeof apiProps & { 'data-disabled'?: string })['data-disabled'] === ''\n\n // Locally managed props\n const localProps = {\n 'data-spark-component': 'pagination-next-trigger',\n intent: 'support',\n design: 'contrast',\n ...props,\n className,\n ...(shouldDisableLink && {\n disabled: true,\n role: 'link',\n 'aria-disabled': true,\n }),\n }\n\n // We know 'aria-label' is included in props\n type WithAriaLabel = Omit<typeof apiProps, 'aria-label'> & { 'aria-label': string }\n\n const mergedProps = mergeProps(\n apiProps,\n localProps as unknown as typeof apiProps\n ) as WithAriaLabel\n\n const content = children || (\n <Icon>\n <ArrowVerticalRight />\n </Icon>\n )\n\n return (\n <li>\n {href ? (\n <IconButton ref={ref} {...mergedProps} asChild>\n <a href={shouldDisableLink ? undefined : href}>{content}</a>\n </IconButton>\n ) : (\n <IconButton ref={ref} {...mergedProps}>\n {content}\n </IconButton>\n )}\n </li>\n )\n}\n\nNextTrigger.displayName = 'Pagination.NextTrigger'\n","import * as pagination from '@zag-js/pagination'\nimport { ReactNode } from 'react'\n\nimport { usePagination } from './PaginationContext'\n\n// Extract the 'page' type element from the pagination API's 'pages' array.\ntype PageItem = Extract<pagination.Api['pages'][number], { type: 'page' }>\n\n// Define a type that conditionally tweaks the pagination API\n// based on the generic T parameter.\ntype TweakedPaginationApi<T extends 'noEllipsis' | ''> = Omit<pagination.Api, 'pages'> & {\n pages: T extends 'noEllipsis' ? PageItem[] : pagination.Api['pages']\n}\n\ninterface PagesProps<T extends 'noEllipsis' | ''> {\n children: (pagination: TweakedPaginationApi<T>) => ReactNode\n}\n\nexport const Pages = <T extends 'noEllipsis' | '' = ''>({ children }: PagesProps<T>) => {\n const { pagination } = usePagination()\n\n return children(pagination as TweakedPaginationApi<T>)\n}\n\nPages.displayName = 'Pagination.Pages'\n","import { ArrowVerticalLeft } from '@spark-ui/icons/ArrowVerticalLeft'\nimport { mergeProps } from '@zag-js/react'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton } from '../icon-button'\nimport { usePagination } from './PaginationContext'\n\ninterface AnchorProps extends ComponentPropsWithoutRef<'a'> {\n href: string\n}\n\ninterface ButtonProps extends ComponentPropsWithoutRef<'button'> {\n href?: undefined\n}\nexport type PrevTriggerProps = Omit<AnchorProps | ButtonProps, 'aria-label'> & {\n 'aria-label': string\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const PrevTrigger = ({ children, className, href, ref, ...props }: PrevTriggerProps) => {\n const { pagination, type } = usePagination()\n\n // ZagJS props\n const apiProps = pagination.getPrevTriggerProps()\n\n const shouldDisableLink =\n type === 'link' &&\n (apiProps as typeof apiProps & { 'data-disabled'?: string })['data-disabled'] === ''\n\n // Locally managed props\n const localProps = {\n 'data-spark-component': 'pagination-prev-trigger',\n intent: 'support',\n design: 'contrast',\n ...props,\n className,\n ...(shouldDisableLink && {\n disabled: true,\n role: 'link',\n 'aria-disabled': true,\n }),\n }\n\n // We know 'aria-label' is included in props\n type WithAriaLabel = Omit<typeof apiProps, 'aria-label'> & { 'aria-label': string }\n\n const mergedProps = mergeProps(\n apiProps,\n localProps as unknown as typeof apiProps\n ) as WithAriaLabel\n\n const content = children || (\n <Icon>\n <ArrowVerticalLeft />\n </Icon>\n )\n\n return (\n <li>\n {href ? (\n <IconButton ref={ref} {...mergedProps} asChild>\n <a href={shouldDisableLink ? undefined : href}>{content}</a>\n </IconButton>\n ) : (\n <IconButton ref={ref} {...mergedProps}>\n {content}\n </IconButton>\n )}\n </li>\n )\n}\n\nPrevTrigger.displayName = 'Pagination.PrevTrigger'\n","import type { FC } from 'react'\n\nimport { Pagination as Root, type PaginationProps } from './Pagination'\nimport { Ellipsis } from './PaginationEllipsis'\nimport { FirstPageTrigger } from './PaginationFirstPageTrigger'\nimport { Item } from './PaginationItem'\nimport { LastPageTrigger } from './PaginationLastPageTrigger'\nimport { NextTrigger } from './PaginationNextTrigger'\nimport { Pages } from './PaginationPages'\nimport { PrevTrigger } from './PaginationPrevTrigger'\n\nexport const Pagination: FC<PaginationProps> & {\n PrevTrigger: typeof PrevTrigger\n NextTrigger: typeof NextTrigger\n Pages: typeof Pages\n Item: typeof Item\n Ellipsis: typeof Ellipsis\n FirstPageTrigger: typeof FirstPageTrigger\n LastPageTrigger: typeof LastPageTrigger\n} = Object.assign(Root, {\n PrevTrigger,\n NextTrigger,\n Pages,\n Item,\n Ellipsis,\n FirstPageTrigger,\n LastPageTrigger,\n})\n\nPagination.displayName = 'Pagination'\n\nPrevTrigger.displayName = 'Pagination.PrevTrigger'\nNextTrigger.displayName = 'Pagination.NextTrigger'\nPages.displayName = 'Pagination.Pages'\nItem.displayName = 'Pagination.Item'\nEllipsis.displayName = 'Pagination.Ellipsis'\nFirstPageTrigger.displayName = 'Pagination.FirstPageTrigger'\nLastPageTrigger.displayName = 'Pagination.LastPageTrigger'\n"],"names":["sliceArrayWithIndex","arr","index","length","relativeElements","start","end","PaginationContext","createContext","PaginationProvider","children","count","visiblePageItems","pageSize","page","onPageChange","noEllipsis","type","siblingCount","id","useId","service","useMachine","pagination","api","normalizeProps","pages","jsx","usePagination","context","useContext","Pagination","className","rest","PaginationWrapper","props","Ellipsis","ref","apiProps","localProps","cx","mergedProps","mergeProps","FirstPageTrigger","href","shouldDisableLink","content","Icon","ArrowDoubleLeft","IconButton","Item","value","Button","LastPageTrigger","ArrowDoubleRight","NextTrigger","ArrowVerticalRight","Pages","PrevTrigger","ArrowVerticalLeft","Root"],"mappings":";;;;;;;;;;;;AAAO,SAASA,EAAoBC,GAAYC,GAAeC,GAAgB;AAC7E,QAAMC,KAAoBD,IAAS,KAAK;AAExC,MAAIE,IAAQ,KAAK,IAAI,GAAGH,IAAQE,CAAgB,GAC5CE,IAAM,KAAK,IAAIL,EAAI,QAAQC,IAAQE,IAAmB,CAAC;AAE3D,SAAIE,IAAMD,IAAQF,MAChBE,IAAQ,KAAK,IAAI,GAAG,KAAK,IAAIA,GAAOJ,EAAI,SAASE,CAAM,CAAC,GACxDG,IAAM,KAAK,IAAIL,EAAI,QAAQI,IAAQF,CAAM,IAGpCF,EAAI,MAAMI,GAAOC,CAAG;AAC7B;ACQA,MAAMC,IAAoBC,EAA6C,IAAI,GA4B9DC,IAAqB,CAAC;AAAA,EACjC,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,kBAAAC,IAAmB;AAAA,EACnB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,MAAAC,IAAO;AACT,MA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