@spark-ui/components 13.0.6 → 13.1.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 (827) hide show
  1. package/dist/Button-C3xHNaGl.js +2 -0
  2. package/dist/Button-C3xHNaGl.js.map +1 -0
  3. package/dist/{chunk-2YM6GKWW.mjs → Button-D32Avk2j.mjs} +130 -173
  4. package/dist/Button-D32Avk2j.mjs.map +1 -0
  5. package/dist/DialogContent.styles-BrhKaHc_.js +2 -0
  6. package/dist/DialogContent.styles-BrhKaHc_.js.map +1 -0
  7. package/dist/{chunk-XZ47F6TP.mjs → DialogContent.styles-WGWJS9dj.mjs} +6 -8
  8. package/dist/DialogContent.styles-WGWJS9dj.mjs.map +1 -0
  9. package/dist/Icon-Bf0XrmiR.js +2 -0
  10. package/dist/Icon-Bf0XrmiR.js.map +1 -0
  11. package/dist/Icon-D1RueiPY.mjs +58 -0
  12. package/dist/Icon-D1RueiPY.mjs.map +1 -0
  13. package/dist/IconButton-BY3gYXtU.mjs +43 -0
  14. package/dist/IconButton-BY3gYXtU.mjs.map +1 -0
  15. package/dist/IconButton-Bf-EDzpI.js +2 -0
  16. package/dist/IconButton-Bf-EDzpI.js.map +1 -0
  17. package/dist/Slot-C98rL4yy.mjs +14 -0
  18. package/dist/Slot-C98rL4yy.mjs.map +1 -0
  19. package/dist/Slot-ghrohQLA.js +2 -0
  20. package/dist/Slot-ghrohQLA.js.map +1 -0
  21. package/dist/{chunk-GAK4SC2F.mjs → Spinner-CYL5kyzM.mjs} +29 -40
  22. package/dist/Spinner-CYL5kyzM.mjs.map +1 -0
  23. package/dist/Spinner-DK8VEsaR.js +2 -0
  24. package/dist/Spinner-DK8VEsaR.js.map +1 -0
  25. package/dist/{chunk-RKPP7ZOK.mjs → TextLink-3MEVs3No.mjs} +27 -36
  26. package/dist/TextLink-3MEVs3No.mjs.map +1 -0
  27. package/dist/TextLink-DD0VO37q.js +2 -0
  28. package/dist/TextLink-DD0VO37q.js.map +1 -0
  29. package/dist/VisuallyHidden-AoRh4WRK.js +2 -0
  30. package/dist/VisuallyHidden-AoRh4WRK.js.map +1 -0
  31. package/dist/VisuallyHidden-ByNP7ZUI.mjs +28 -0
  32. package/dist/VisuallyHidden-ByNP7ZUI.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.ts +10 -68
  39. package/dist/accordion/index.js +2 -325
  40. package/dist/accordion/index.js.map +1 -1
  41. package/dist/accordion/index.mjs +632 -154
  42. package/dist/accordion/index.mjs.map +1 -1
  43. package/dist/accordion/useRenderSlot.d.ts +3 -0
  44. package/dist/alert-dialog/AlertDialog.d.ts +29 -0
  45. package/dist/alert-dialog/AlertDialogAction.d.ts +13 -0
  46. package/dist/alert-dialog/AlertDialogBody.d.ts +12 -0
  47. package/dist/alert-dialog/AlertDialogCancel.d.ts +13 -0
  48. package/dist/alert-dialog/AlertDialogContent.d.ts +9 -0
  49. package/dist/alert-dialog/AlertDialogContext.d.ts +12 -0
  50. package/dist/alert-dialog/AlertDialogDescription.d.ts +9 -0
  51. package/dist/alert-dialog/AlertDialogFooter.d.ts +10 -0
  52. package/dist/alert-dialog/AlertDialogHeader.d.ts +10 -0
  53. package/dist/alert-dialog/AlertDialogOverlay.d.ts +9 -0
  54. package/dist/alert-dialog/AlertDialogPortal.d.ts +7 -0
  55. package/dist/alert-dialog/AlertDialogTitle.d.ts +9 -0
  56. package/dist/alert-dialog/AlertDialogTrigger.d.ts +13 -0
  57. package/dist/alert-dialog/index.d.ts +26 -147
  58. package/dist/alert-dialog/index.js +35 -405
  59. package/dist/alert-dialog/index.js.map +1 -1
  60. package/dist/alert-dialog/index.mjs +2513 -258
  61. package/dist/alert-dialog/index.mjs.map +1 -1
  62. package/dist/alert-dialog/useRenderSlot.d.ts +3 -0
  63. package/dist/avatar/Avatar.d.ts +3 -0
  64. package/dist/avatar/AvatarAction.d.ts +9 -0
  65. package/dist/avatar/AvatarImage.d.ts +7 -0
  66. package/dist/avatar/AvatarOnlineBadge.d.ts +9 -0
  67. package/dist/avatar/AvatarPlaceholder.d.ts +8 -0
  68. package/dist/avatar/AvatarUser.d.ts +7 -0
  69. package/dist/avatar/context.d.ts +5 -0
  70. package/dist/avatar/index.d.ts +8 -59
  71. package/dist/avatar/index.js +2 -1323
  72. package/dist/avatar/index.js.map +1 -1
  73. package/dist/avatar/index.mjs +149 -207
  74. package/dist/avatar/index.mjs.map +1 -1
  75. package/dist/avatar/types.d.ts +24 -0
  76. package/dist/badge/Badge.d.ts +9 -0
  77. package/dist/badge/BadgeItem.d.ts +31 -0
  78. package/dist/badge/BadgeItem.styles.d.ts +7 -0
  79. package/dist/badge/index.d.ts +1 -47
  80. package/dist/badge/index.js +2 -122
  81. package/dist/badge/index.js.map +1 -1
  82. package/dist/badge/index.mjs +32 -44
  83. package/dist/badge/index.mjs.map +1 -1
  84. package/dist/breadcrumb/Breadcrumb.d.ts +10 -0
  85. package/dist/breadcrumb/Breadcrumb.styles.d.ts +0 -0
  86. package/dist/breadcrumb/BreadcrumbCurrentPage.d.ts +11 -0
  87. package/dist/breadcrumb/BreadcrumbItem.d.ts +9 -0
  88. package/dist/breadcrumb/BreadcrumbLink.d.ts +12 -0
  89. package/dist/breadcrumb/BreadcrumbSeparator.d.ts +10 -0
  90. package/dist/breadcrumb/index.d.ts +7 -59
  91. package/dist/breadcrumb/index.js +2 -327
  92. package/dist/breadcrumb/index.js.map +1 -1
  93. package/dist/breadcrumb/index.mjs +106 -146
  94. package/dist/breadcrumb/index.mjs.map +1 -1
  95. package/dist/button/Button.d.ts +26 -0
  96. package/dist/button/Button.styles.d.ts +10 -0
  97. package/dist/button/index.d.ts +1 -41
  98. package/dist/button/index.js +2 -935
  99. package/dist/button/index.js.map +1 -1
  100. package/dist/button/index.mjs +3 -8
  101. package/dist/button/index.mjs.map +1 -1
  102. package/dist/button/variants/contrast.d.ts +45 -0
  103. package/dist/button/variants/filled.d.ts +45 -0
  104. package/dist/button/variants/ghost.d.ts +45 -0
  105. package/dist/button/variants/index.d.ts +5 -0
  106. package/dist/button/variants/outlined.d.ts +45 -0
  107. package/dist/button/variants/tinted.d.ts +45 -0
  108. package/dist/card/Backdrop.d.ts +14 -0
  109. package/dist/card/Card.d.ts +16 -0
  110. package/dist/card/Card.styles.d.ts +7 -0
  111. package/dist/card/Content.d.ts +15 -0
  112. package/dist/card/Content.styles.d.ts +8 -0
  113. package/dist/card/context.d.ts +11 -0
  114. package/dist/card/index.d.ts +5 -58
  115. package/dist/card/index.js +2 -502
  116. package/dist/card/index.js.map +1 -1
  117. package/dist/card/index.mjs +125 -178
  118. package/dist/card/index.mjs.map +1 -1
  119. package/dist/card/utils.d.ts +3 -0
  120. package/dist/carousel/Carousel.d.ts +12 -0
  121. package/dist/carousel/CarouselControls.d.ts +9 -0
  122. package/dist/carousel/CarouselNextButton.d.ts +5 -0
  123. package/dist/carousel/CarouselPageIndicator.d.ts +14 -0
  124. package/dist/carousel/CarouselPagePicker.d.ts +14 -0
  125. package/dist/carousel/CarouselPrevButton.d.ts +5 -0
  126. package/dist/carousel/CarouselSlide.d.ts +12 -0
  127. package/dist/carousel/CarouselSlides.d.ts +10 -0
  128. package/dist/carousel/CarouselViewport.d.ts +9 -0
  129. package/dist/carousel/index.d.ts +18 -263
  130. package/dist/carousel/index.js +2 -1882
  131. package/dist/carousel/index.js.map +1 -1
  132. package/dist/carousel/index.mjs +428 -650
  133. package/dist/carousel/index.mjs.map +1 -1
  134. package/dist/carousel/{index.d.mts → types.d.ts} +13 -112
  135. package/dist/carousel/useCarousel.d.ts +2 -0
  136. package/dist/carousel/useCarouselVisibility.d.ts +13 -0
  137. package/dist/carousel/useEvent.d.ts +7 -0
  138. package/dist/carousel/useIsMounted.d.ts +1 -0
  139. package/dist/carousel/useIsVisible.d.ts +6 -0
  140. package/dist/carousel/useResizeObserver.d.ts +2 -0
  141. package/dist/carousel/useScrollEnd.d.ts +3 -0
  142. package/dist/carousel/useSnapPoints.d.ts +10 -0
  143. package/dist/carousel/utils.d.ts +24 -0
  144. package/dist/checkbox/Checkbox.d.ts +10 -0
  145. package/dist/checkbox/CheckboxGroup.d.ts +18 -0
  146. package/dist/checkbox/CheckboxGroup.styles.d.ts +5 -0
  147. package/dist/checkbox/CheckboxGroupContext.d.ts +41 -0
  148. package/dist/checkbox/CheckboxIndicator.d.ts +9 -0
  149. package/dist/checkbox/CheckboxInput.d.ts +47 -0
  150. package/dist/checkbox/CheckboxInput.styles.d.ts +5 -0
  151. package/dist/checkbox/CheckboxLabel.d.ts +12 -0
  152. package/dist/checkbox/CheckboxLabel.styles.d.ts +5 -0
  153. package/dist/checkbox/index.d.ts +2 -120
  154. package/dist/checkbox/index.js +2 -511
  155. package/dist/checkbox/index.js.map +1 -1
  156. package/dist/checkbox/index.mjs +371 -226
  157. package/dist/checkbox/index.mjs.map +1 -1
  158. package/dist/chip/Chip.d.ts +34 -0
  159. package/dist/chip/Chip.styles.d.ts +8 -0
  160. package/dist/chip/ChipClearButton.d.ts +10 -0
  161. package/dist/chip/ChipClearButton.styles.d.ts +10 -0
  162. package/dist/chip/ChipContent.d.ts +8 -0
  163. package/dist/chip/ChipIcon.d.ts +8 -0
  164. package/dist/chip/ChipLeadingIcon.d.ts +9 -0
  165. package/dist/chip/ChipTrailingIcon.d.ts +9 -0
  166. package/dist/chip/index.d.ts +10 -92
  167. package/dist/chip/index.js +2 -908
  168. package/dist/chip/index.js.map +1 -1
  169. package/dist/chip/index.mjs +390 -322
  170. package/dist/chip/index.mjs.map +1 -1
  171. package/dist/chip/useChipContext.d.ts +4 -0
  172. package/dist/chip/useChipElement.d.ts +41 -0
  173. package/dist/chip/variants/dashed.d.ts +49 -0
  174. package/dist/chip/variants/index.d.ts +3 -0
  175. package/dist/chip/variants/outlined.d.ts +49 -0
  176. package/dist/chip/variants/tinted.d.ts +49 -0
  177. package/dist/collapsible/Content.d.ts +12 -0
  178. package/dist/collapsible/Root.d.ts +12 -0
  179. package/dist/collapsible/Trigger.d.ts +11 -0
  180. package/dist/collapsible/index.d.ts +4 -40
  181. package/dist/collapsible/index.js +2 -109
  182. package/dist/collapsible/index.js.map +1 -1
  183. package/dist/collapsible/index.mjs +214 -58
  184. package/dist/collapsible/index.mjs.map +1 -1
  185. package/dist/collapsible/useRenderSlot.d.ts +3 -0
  186. package/dist/combobox/Combobox.d.ts +6 -0
  187. package/dist/combobox/ComboboxClearButton.d.ts +9 -0
  188. package/dist/combobox/ComboboxContext.d.ts +108 -0
  189. package/dist/combobox/ComboboxDisclosure.d.ts +13 -0
  190. package/dist/combobox/ComboboxEmpty.d.ts +11 -0
  191. package/dist/combobox/ComboboxGroup.d.ts +11 -0
  192. package/dist/combobox/ComboboxInput.d.ts +15 -0
  193. package/dist/combobox/ComboboxItem.d.ts +12 -0
  194. package/dist/combobox/ComboboxItemContext.d.ts +17 -0
  195. package/dist/combobox/ComboboxItemIndicator.d.ts +11 -0
  196. package/dist/combobox/ComboboxItemText.d.ts +10 -0
  197. package/dist/combobox/ComboboxItems.d.ts +11 -0
  198. package/dist/combobox/ComboboxItemsGroupContext.d.ts +8 -0
  199. package/dist/combobox/ComboboxLabel.d.ts +11 -0
  200. package/dist/combobox/ComboboxLeadingIcon.d.ts +7 -0
  201. package/dist/combobox/ComboboxPopover.d.ts +10 -0
  202. package/dist/combobox/ComboboxPortal.d.ts +2 -0
  203. package/dist/combobox/ComboboxSelectedItems.d.ts +4 -0
  204. package/dist/combobox/ComboboxTrigger.d.ts +11 -0
  205. package/dist/combobox/ComboboxTrigger.styles.d.ts +6 -0
  206. package/dist/combobox/index.d.ts +19 -271
  207. package/dist/combobox/index.js +2 -2588
  208. package/dist/combobox/index.js.map +1 -1
  209. package/dist/combobox/index.mjs +623 -1017
  210. package/dist/combobox/index.mjs.map +1 -1
  211. package/dist/combobox/tests/test-utils.d.ts +8 -0
  212. package/dist/combobox/types.d.ts +8 -0
  213. package/dist/combobox/useCombobox/multipleSelectionReducer.d.ts +13 -0
  214. package/dist/combobox/useCombobox/singleSelectionReducer.d.ts +8 -0
  215. package/dist/combobox/utils/index.d.ts +14 -0
  216. package/dist/combobox/utils/useWidthIncreaseCallback.d.ts +2 -0
  217. package/dist/composite-Br3kM5N9.mjs +40 -0
  218. package/dist/composite-Br3kM5N9.mjs.map +1 -0
  219. package/dist/composite-fJD9R7R0.js +2 -0
  220. package/dist/composite-fJD9R7R0.js.map +1 -0
  221. package/dist/detectBrowser-Bc7rk5fI.mjs +44 -0
  222. package/dist/detectBrowser-Bc7rk5fI.mjs.map +1 -0
  223. package/dist/detectBrowser-DTbs_30X.js +2 -0
  224. package/dist/detectBrowser-DTbs_30X.js.map +1 -0
  225. package/dist/dialog/Dialog.d.ts +32 -0
  226. package/dist/dialog/DialogBody.d.ts +12 -0
  227. package/dist/dialog/DialogClose.d.ts +9 -0
  228. package/dist/dialog/DialogCloseButton.d.ts +9 -0
  229. package/dist/dialog/DialogContent.d.ts +14 -0
  230. package/dist/dialog/DialogContent.styles.d.ts +6 -0
  231. package/dist/dialog/DialogContext.d.ts +11 -0
  232. package/dist/dialog/DialogDescription.d.ts +9 -0
  233. package/dist/dialog/DialogFooter.d.ts +10 -0
  234. package/dist/dialog/DialogHeader.d.ts +10 -0
  235. package/dist/dialog/DialogOverlay.d.ts +9 -0
  236. package/dist/dialog/DialogPortal.d.ts +7 -0
  237. package/dist/dialog/DialogTitle.d.ts +9 -0
  238. package/dist/dialog/DialogTrigger.d.ts +17 -0
  239. package/dist/dialog/index.d.ts +25 -154
  240. package/dist/dialog/index.js +2 -1389
  241. package/dist/dialog/index.js.map +1 -1
  242. package/dist/dialog/index.mjs +163 -258
  243. package/dist/dialog/index.mjs.map +1 -1
  244. package/dist/divider/Divider.d.ts +30 -0
  245. package/dist/divider/Divider.styles.d.ts +9 -0
  246. package/dist/divider/DividerContent.d.ts +13 -0
  247. package/dist/divider/index.d.ts +4 -59
  248. package/dist/divider/index.js +2 -224
  249. package/dist/divider/index.js.map +1 -1
  250. package/dist/divider/index.mjs +97 -100
  251. package/dist/divider/index.mjs.map +1 -1
  252. package/dist/divider/variants/intents.d.ts +17 -0
  253. package/dist/downshift.esm-Ncwetv0s.mjs +3038 -0
  254. package/dist/downshift.esm-Ncwetv0s.mjs.map +1 -0
  255. package/dist/downshift.esm-PfCOUbxq.js +37 -0
  256. package/dist/downshift.esm-PfCOUbxq.js.map +1 -0
  257. package/dist/drawer/Drawer.d.ts +39 -0
  258. package/dist/drawer/DrawerBody.d.ts +11 -0
  259. package/dist/drawer/DrawerBody.styles.d.ts +5 -0
  260. package/dist/drawer/DrawerClose.d.ts +9 -0
  261. package/dist/drawer/DrawerCloseButton.d.ts +7 -0
  262. package/dist/drawer/DrawerContent.d.ts +10 -0
  263. package/dist/drawer/DrawerContent.styles.d.ts +6 -0
  264. package/dist/drawer/DrawerContext.d.ts +9 -0
  265. package/dist/drawer/DrawerDescription.d.ts +9 -0
  266. package/dist/drawer/DrawerFooter.d.ts +8 -0
  267. package/dist/drawer/DrawerHeader.d.ts +10 -0
  268. package/dist/drawer/DrawerOverlay.d.ts +9 -0
  269. package/dist/drawer/DrawerPortal.d.ts +7 -0
  270. package/dist/drawer/DrawerTitle.d.ts +9 -0
  271. package/dist/drawer/DrawerTrigger.d.ts +13 -0
  272. package/dist/drawer/index.d.ts +24 -141
  273. package/dist/drawer/index.js +2 -1400
  274. package/dist/drawer/index.js.map +1 -1
  275. package/dist/drawer/index.mjs +141 -230
  276. package/dist/drawer/index.mjs.map +1 -1
  277. package/dist/dropdown/Dropdown.d.ts +6 -0
  278. package/dist/dropdown/DropdownContext.d.ts +81 -0
  279. package/dist/dropdown/DropdownDivider.d.ts +10 -0
  280. package/dist/dropdown/DropdownGroup.d.ts +11 -0
  281. package/dist/dropdown/DropdownItem.d.ts +12 -0
  282. package/dist/dropdown/DropdownItemContext.d.ts +17 -0
  283. package/dist/dropdown/DropdownItemIndicator.d.ts +11 -0
  284. package/dist/dropdown/DropdownItemText.d.ts +9 -0
  285. package/dist/dropdown/DropdownItems.d.ts +21 -0
  286. package/dist/dropdown/DropdownItemsGroupContext.d.ts +8 -0
  287. package/dist/dropdown/DropdownLabel.d.ts +11 -0
  288. package/dist/dropdown/DropdownLeadingIcon.d.ts +7 -0
  289. package/dist/dropdown/DropdownPopover.d.ts +6 -0
  290. package/dist/dropdown/DropdownPortal.d.ts +2 -0
  291. package/dist/dropdown/DropdownTrigger.d.ts +12 -0
  292. package/dist/dropdown/DropdownTrigger.styles.d.ts +5 -0
  293. package/dist/dropdown/DropdownValue.d.ts +11 -0
  294. package/dist/dropdown/index.d.ts +16 -220
  295. package/dist/dropdown/index.js +2 -2051
  296. package/dist/dropdown/index.js.map +1 -1
  297. package/dist/dropdown/index.mjs +352 -584
  298. package/dist/dropdown/index.mjs.map +1 -1
  299. package/dist/dropdown/types.d.ts +8 -0
  300. package/dist/dropdown/useDropdown.d.ts +41 -0
  301. package/dist/dropdown/utils.d.ts +13 -0
  302. package/dist/file-upload/FileUpload.d.ts +130 -0
  303. package/dist/file-upload/FileUploadAcceptedFile.d.ts +25 -0
  304. package/dist/file-upload/FileUploadContext.d.ts +17 -0
  305. package/dist/file-upload/FileUploadDropzone.d.ts +10 -0
  306. package/dist/file-upload/FileUploadItemDeleteTrigger.d.ts +11 -0
  307. package/dist/file-upload/FileUploadPreviewImage.d.ts +17 -0
  308. package/dist/file-upload/FileUploadRejectedFile.d.ts +24 -0
  309. package/dist/file-upload/FileUploadRejectedFileDeleteTrigger.d.ts +12 -0
  310. package/dist/file-upload/FileUploadTrigger.d.ts +12 -0
  311. package/dist/file-upload/constants.d.ts +29 -0
  312. package/dist/file-upload/index.d.ts +14 -262
  313. package/dist/file-upload/index.js +2 -2255
  314. package/dist/file-upload/index.js.map +1 -1
  315. package/dist/file-upload/index.mjs +506 -834
  316. package/dist/file-upload/index.mjs.map +1 -1
  317. package/dist/file-upload/test-utils.d.ts +9 -0
  318. package/dist/file-upload/useFileUploadState.d.ts +88 -0
  319. package/dist/file-upload/utils.d.ts +40 -0
  320. package/dist/floating-ui.utils.dom-CCN4I08l.js +2 -0
  321. package/dist/floating-ui.utils.dom-CCN4I08l.js.map +1 -0
  322. package/dist/floating-ui.utils.dom-uiDUZc_y.mjs +136 -0
  323. package/dist/floating-ui.utils.dom-uiDUZc_y.mjs.map +1 -0
  324. package/dist/form-field/FormField.d.ts +21 -0
  325. package/dist/form-field/FormFieldAlertMessage.d.ts +9 -0
  326. package/dist/form-field/FormFieldCharactersCount.d.ts +26 -0
  327. package/dist/form-field/FormFieldContext.d.ts +49 -0
  328. package/dist/form-field/FormFieldControl.d.ts +12 -0
  329. package/dist/form-field/FormFieldErrorMessage.d.ts +9 -0
  330. package/dist/form-field/FormFieldHelperMessage.d.ts +9 -0
  331. package/dist/form-field/FormFieldLabel.d.ts +13 -0
  332. package/dist/form-field/FormFieldMessage.d.ts +8 -0
  333. package/dist/form-field/FormFieldProvider.d.ts +9 -0
  334. package/dist/form-field/FormFieldRequiredIndicator.d.ts +9 -0
  335. package/dist/form-field/FormFieldStateMessage.d.ts +10 -0
  336. package/dist/form-field/FormFieldSuccessMessage.d.ts +9 -0
  337. package/dist/form-field/index.d.ts +21 -176
  338. package/dist/form-field/index.js +2 -553
  339. package/dist/form-field/index.js.map +1 -1
  340. package/dist/form-field/index.mjs +246 -349
  341. package/dist/form-field/index.mjs.map +1 -1
  342. package/dist/icon/Icon.d.ts +17 -0
  343. package/dist/icon/Icon.styles.d.ts +6 -0
  344. package/dist/icon/index.d.ts +1 -28
  345. package/dist/icon/index.js +2 -127
  346. package/dist/icon/index.js.map +1 -1
  347. package/dist/icon/index.mjs +3 -7
  348. package/dist/icon/index.mjs.map +1 -1
  349. package/dist/icon-button/IconButton.d.ts +10 -0
  350. package/dist/icon-button/IconButton.styles.d.ts +5 -0
  351. package/dist/icon-button/index.d.ts +1 -16
  352. package/dist/icon-button/index.js +2 -980
  353. package/dist/icon-button/index.js.map +1 -1
  354. package/dist/icon-button/index.mjs +3 -9
  355. package/dist/icon-button/index.mjs.map +1 -1
  356. package/dist/index-0KYGKeVg.js +2 -0
  357. package/dist/index-0KYGKeVg.js.map +1 -0
  358. package/dist/index-1WIgmEZh.js +2 -0
  359. package/dist/index-1WIgmEZh.js.map +1 -0
  360. package/dist/index-BRi38DTc.mjs +21 -0
  361. package/dist/index-BRi38DTc.mjs.map +1 -0
  362. package/dist/index-BZAtNKwE.mjs +71 -0
  363. package/dist/index-BZAtNKwE.mjs.map +1 -0
  364. package/dist/index-BZPx6jYI.mjs +9 -0
  365. package/dist/index-BZPx6jYI.mjs.map +1 -0
  366. package/dist/index-BlkdpEIe.mjs +55 -0
  367. package/dist/index-BlkdpEIe.mjs.map +1 -0
  368. package/dist/index-BmAFn37q.mjs +49 -0
  369. package/dist/index-BmAFn37q.mjs.map +1 -0
  370. package/dist/index-C-J_tHdS.js +6 -0
  371. package/dist/index-C-J_tHdS.js.map +1 -0
  372. package/dist/index-C1qb0595.mjs +28 -0
  373. package/dist/index-C1qb0595.mjs.map +1 -0
  374. package/dist/index-C34GgsKQ.mjs +54 -0
  375. package/dist/index-C34GgsKQ.mjs.map +1 -0
  376. package/dist/index-CCKe-Mpx.mjs +7 -0
  377. package/dist/index-CCKe-Mpx.mjs.map +1 -0
  378. package/dist/index-CDBBjNXc.js +2 -0
  379. package/dist/index-CDBBjNXc.js.map +1 -0
  380. package/dist/index-CYjGhVvU.mjs +243 -0
  381. package/dist/index-CYjGhVvU.mjs.map +1 -0
  382. package/dist/index-ChLwd62c.js +2 -0
  383. package/dist/index-ChLwd62c.js.map +1 -0
  384. package/dist/index-Cjj_rUPu.js +2 -0
  385. package/dist/index-Cjj_rUPu.js.map +1 -0
  386. package/dist/index-CyMbLkj0.js +2 -0
  387. package/dist/index-CyMbLkj0.js.map +1 -0
  388. package/dist/index-DFZozV_h.mjs +69 -0
  389. package/dist/index-DFZozV_h.mjs.map +1 -0
  390. package/dist/index-DKuHkHFX.js +2 -0
  391. package/dist/index-DKuHkHFX.js.map +1 -0
  392. package/dist/index-DLHLIYPI.mjs +16 -0
  393. package/dist/index-DLHLIYPI.mjs.map +1 -0
  394. package/dist/index-DO-atGp-.js +2 -0
  395. package/dist/index-DO-atGp-.js.map +1 -0
  396. package/dist/index-DWlg8lkk.mjs +179 -0
  397. package/dist/index-DWlg8lkk.mjs.map +1 -0
  398. package/dist/index-DYxWvftI.js +2 -0
  399. package/dist/index-DYxWvftI.js.map +1 -0
  400. package/dist/index-D_lWkK39.mjs +803 -0
  401. package/dist/index-D_lWkK39.mjs.map +1 -0
  402. package/dist/index-DdkVj7D0.js +18 -0
  403. package/dist/index-DdkVj7D0.js.map +1 -0
  404. package/dist/index-De-6atSi.js +2 -0
  405. package/dist/index-De-6atSi.js.map +1 -0
  406. package/dist/index-DhGWNzsz.mjs +83 -0
  407. package/dist/index-DhGWNzsz.mjs.map +1 -0
  408. package/dist/index-Dkj4QRX8.js +2 -0
  409. package/dist/index-Dkj4QRX8.js.map +1 -0
  410. package/dist/index-DlIFg0Eu.mjs +60 -0
  411. package/dist/index-DlIFg0Eu.mjs.map +1 -0
  412. package/dist/index-DnaHaH_0.js +2 -0
  413. package/dist/index-DnaHaH_0.js.map +1 -0
  414. package/dist/index-MHF2-CYX.js +2 -0
  415. package/dist/index-MHF2-CYX.js.map +1 -0
  416. package/dist/index-MQ0c3ZX_.js +2 -0
  417. package/dist/index-MQ0c3ZX_.js.map +1 -0
  418. package/dist/index-MSR-vgWR.mjs +37 -0
  419. package/dist/index-MSR-vgWR.mjs.map +1 -0
  420. package/dist/index-VL0YEmOW.mjs +125 -0
  421. package/dist/index-VL0YEmOW.mjs.map +1 -0
  422. package/dist/index-tXqxYME3.js +42 -0
  423. package/dist/index-tXqxYME3.js.map +1 -0
  424. package/dist/inertValue-Bif5Sqs6.mjs +522 -0
  425. package/dist/inertValue-Bif5Sqs6.mjs.map +1 -0
  426. package/dist/inertValue-ShwihJSN.js +5 -0
  427. package/dist/inertValue-ShwihJSN.js.map +1 -0
  428. package/dist/input/Input.d.ts +14 -0
  429. package/dist/input/Input.styles.d.ts +11 -0
  430. package/dist/input/InputAddon.d.ts +9 -0
  431. package/dist/input/InputAddon.styles.d.ts +9 -0
  432. package/dist/input/InputClearButton.d.ts +12 -0
  433. package/dist/input/InputGroup.d.ts +17 -0
  434. package/dist/input/InputGroup.styles.d.ts +6 -0
  435. package/dist/input/InputGroupContext.d.ts +14 -0
  436. package/dist/input/InputIcon.d.ts +6 -0
  437. package/dist/input/InputLeadingAddon.d.ts +11 -0
  438. package/dist/input/InputLeadingIcon.d.ts +7 -0
  439. package/dist/input/InputTrailingAddon.d.ts +11 -0
  440. package/dist/input/InputTrailingIcon.d.ts +7 -0
  441. package/dist/input/index.d.ts +15 -72
  442. package/dist/input/index.js +2 -724
  443. package/dist/input/index.js.map +1 -1
  444. package/dist/input/index.mjs +453 -12
  445. package/dist/input/index.mjs.map +1 -1
  446. package/dist/input-otp/InputOTP.d.ts +85 -0
  447. package/dist/input-otp/InputOTP.styles.d.ts +10 -0
  448. package/dist/input-otp/InputOTPContext.d.ts +16 -0
  449. package/dist/input-otp/InputOTPGroup.d.ts +7 -0
  450. package/dist/input-otp/InputOTPSeparator.d.ts +7 -0
  451. package/dist/input-otp/InputOTPSlot.d.ts +12 -0
  452. package/dist/input-otp/index.d.ts +14 -0
  453. package/dist/input-otp/index.js +2 -0
  454. package/dist/input-otp/index.js.map +1 -0
  455. package/dist/input-otp/index.mjs +390 -0
  456. package/dist/input-otp/index.mjs.map +1 -0
  457. package/dist/input-otp/useInputOTP.d.ts +45 -0
  458. package/dist/kbd/Kbd.d.ts +5 -0
  459. package/dist/kbd/index.d.ts +1 -9
  460. package/dist/kbd/index.js +2 -47
  461. package/dist/kbd/index.js.map +1 -1
  462. package/dist/kbd/index.mjs +15 -18
  463. package/dist/kbd/index.mjs.map +1 -1
  464. package/dist/label/Label.d.ts +9 -0
  465. package/dist/label/LabelRequiredIndicator.d.ts +6 -0
  466. package/dist/label/index.d.ts +5 -9
  467. package/dist/label/index.js +2 -78
  468. package/dist/label/index.js.map +1 -1
  469. package/dist/label/index.mjs +3 -5
  470. package/dist/label/index.mjs.map +1 -1
  471. package/dist/link-box/LinkBox.d.ts +8 -0
  472. package/dist/link-box/LinkBoxLink.d.ts +8 -0
  473. package/dist/link-box/LinkBoxRaised.d.ts +9 -0
  474. package/dist/link-box/index.d.ts +6 -31
  475. package/dist/link-box/index.js +2 -92
  476. package/dist/link-box/index.js.map +1 -1
  477. package/dist/link-box/index.mjs +34 -56
  478. package/dist/link-box/index.mjs.map +1 -1
  479. package/dist/pagination/Pagination.d.ts +8 -0
  480. package/dist/pagination/PaginationContext.d.ts +43 -0
  481. package/dist/pagination/PaginationEllipsis.d.ts +9 -0
  482. package/dist/pagination/PaginationFirstPageTrigger.d.ts +16 -0
  483. package/dist/pagination/PaginationItem.d.ts +17 -0
  484. package/dist/pagination/PaginationLastPageTrigger.d.ts +16 -0
  485. package/dist/pagination/PaginationNextTrigger.d.ts +16 -0
  486. package/dist/pagination/PaginationPages.d.ts +16 -0
  487. package/dist/pagination/PaginationPrevTrigger.d.ts +16 -0
  488. package/dist/pagination/index.d.ts +10 -135
  489. package/dist/pagination/index.js +2 -1353
  490. package/dist/pagination/index.js.map +1 -1
  491. package/dist/pagination/index.mjs +893 -268
  492. package/dist/pagination/index.mjs.map +1 -1
  493. package/dist/pagination/utils.d.ts +1 -0
  494. package/dist/popover/Popover.d.ts +9 -0
  495. package/dist/popover/PopoverAnchor.d.ts +9 -0
  496. package/dist/popover/PopoverArrow.d.ts +9 -0
  497. package/dist/popover/PopoverCloseButton.d.ts +10 -0
  498. package/dist/popover/PopoverContent.d.ts +10 -0
  499. package/dist/popover/PopoverContent.styles.d.ts +9 -0
  500. package/dist/popover/PopoverContext.d.ts +15 -0
  501. package/dist/popover/PopoverHeader.d.ts +10 -0
  502. package/dist/popover/PopoverPortal.d.ts +7 -0
  503. package/dist/popover/PopoverTrigger.d.ts +9 -0
  504. package/dist/popover/index.d.ts +17 -6
  505. package/dist/popover/index.js +2 -1339
  506. package/dist/popover/index.js.map +1 -1
  507. package/dist/popover/index.mjs +1868 -11
  508. package/dist/popover/index.mjs.map +1 -1
  509. package/dist/portal/{index.d.mts → Portal.d.ts} +2 -5
  510. package/dist/portal/index.d.ts +1 -13
  511. package/dist/portal/index.js +2 -37
  512. package/dist/portal/index.js.map +1 -1
  513. package/dist/portal/index.mjs +5 -8
  514. package/dist/portal/index.mjs.map +1 -1
  515. package/dist/progress/Progress.d.ts +16 -0
  516. package/dist/progress/ProgressBar.d.ts +6 -0
  517. package/dist/progress/ProgressBar.styles.d.ts +5 -0
  518. package/dist/progress/ProgressContext.d.ts +13 -0
  519. package/dist/progress/ProgressIndicator.d.ts +6 -0
  520. package/dist/progress/ProgressIndicator.styles.d.ts +7 -0
  521. package/dist/progress/ProgressLabel.d.ts +6 -0
  522. package/dist/progress/index.d.ts +9 -48
  523. package/dist/progress/index.js +6 -239
  524. package/dist/progress/index.js.map +1 -1
  525. package/dist/progress/index.mjs +241 -5
  526. package/dist/progress/index.mjs.map +1 -1
  527. package/dist/progress-tracker/ProgressTracker.d.ts +27 -0
  528. package/dist/progress-tracker/ProgressTracker.styles.d.ts +1 -0
  529. package/dist/progress-tracker/ProgressTrackerContext.d.ts +15 -0
  530. package/dist/progress-tracker/ProgressTrackerStep.d.ts +12 -0
  531. package/dist/progress-tracker/ProgressTrackerStep.styles.d.ts +10 -0
  532. package/dist/progress-tracker/ProgressTrackerStepIndicator.d.ts +15 -0
  533. package/dist/progress-tracker/ProgressTrackerStepIndicator.styles.d.ts +7 -0
  534. package/dist/progress-tracker/ProgressTrackerStepLabel.d.ts +9 -0
  535. package/dist/progress-tracker/index.d.ts +10 -80
  536. package/dist/progress-tracker/index.js +2 -571
  537. package/dist/progress-tracker/index.js.map +1 -1
  538. package/dist/progress-tracker/index.mjs +115 -183
  539. package/dist/progress-tracker/index.mjs.map +1 -1
  540. package/dist/radio-group/Radio.d.ts +9 -0
  541. package/dist/radio-group/RadioGroup.d.ts +54 -0
  542. package/dist/radio-group/RadioGroup.styles.d.ts +5 -0
  543. package/dist/radio-group/RadioGroupContext.d.ts +5 -0
  544. package/dist/radio-group/RadioGroupProvider.d.ts +7 -0
  545. package/dist/radio-group/RadioIndicator.d.ts +18 -0
  546. package/dist/radio-group/RadioIndicator.styles.d.ts +5 -0
  547. package/dist/radio-group/RadioInput.d.ts +25 -0
  548. package/dist/radio-group/RadioInput.styles.d.ts +5 -0
  549. package/dist/radio-group/RadioLabel.d.ts +20 -0
  550. package/dist/radio-group/RadioLabel.styles.d.ts +5 -0
  551. package/dist/radio-group/index.d.ts +5 -98
  552. package/dist/radio-group/index.js +2 -318
  553. package/dist/radio-group/index.js.map +1 -1
  554. package/dist/radio-group/index.mjs +332 -174
  555. package/dist/radio-group/index.mjs.map +1 -1
  556. package/dist/rating/Rating.d.ts +52 -0
  557. package/dist/rating/RatingStar.d.ts +10 -0
  558. package/dist/rating/RatingStar.styles.d.ts +14 -0
  559. package/dist/rating/index.d.ts +1 -78
  560. package/dist/rating/index.js +2 -363
  561. package/dist/rating/index.js.map +1 -1
  562. package/dist/rating/index.mjs +125 -170
  563. package/dist/rating/index.mjs.map +1 -1
  564. package/dist/rating/types.d.ts +1 -0
  565. package/dist/rating/utils.d.ts +8 -0
  566. package/dist/scrolling-list/ScrollingList.d.ts +57 -0
  567. package/dist/scrolling-list/ScrollingListControls.d.ts +18 -0
  568. package/dist/scrolling-list/ScrollingListItem.d.ts +17 -0
  569. package/dist/scrolling-list/ScrollingListItems.d.ts +11 -0
  570. package/dist/scrolling-list/ScrollingListNextButton.d.ts +5 -0
  571. package/dist/scrolling-list/ScrollingListPrevButton.d.ts +5 -0
  572. package/dist/scrolling-list/ScrollingListSkipButton.d.ts +9 -0
  573. package/dist/scrolling-list/index.d.ts +14 -117
  574. package/dist/scrolling-list/index.js +2 -1428
  575. package/dist/scrolling-list/index.js.map +1 -1
  576. package/dist/scrolling-list/index.mjs +358 -325
  577. package/dist/scrolling-list/index.mjs.map +1 -1
  578. package/dist/scrolling-list/useFocusWithinScroll.d.ts +3 -0
  579. package/dist/segmented-gauge/{index.d.mts → SegmentedGauge.d.ts} +4 -43
  580. package/dist/segmented-gauge/SegmentedGaugeContext.d.ts +14 -0
  581. package/dist/segmented-gauge/SegmentedGaugeLabel.d.ts +9 -0
  582. package/dist/segmented-gauge/SegmentedGaugeSegment.d.ts +12 -0
  583. package/dist/segmented-gauge/SegmentedGaugeTrack.d.ts +8 -0
  584. package/dist/segmented-gauge/index.d.ts +9 -101
  585. package/dist/segmented-gauge/index.js +2 -274
  586. package/dist/segmented-gauge/index.js.map +1 -1
  587. package/dist/segmented-gauge/index.mjs +132 -178
  588. package/dist/segmented-gauge/index.mjs.map +1 -1
  589. package/dist/select/Select.d.ts +6 -0
  590. package/dist/select/SelectContext.d.ts +59 -0
  591. package/dist/select/SelectGroup.d.ts +11 -0
  592. package/dist/select/SelectItem.d.ts +11 -0
  593. package/dist/select/SelectItems.d.ts +10 -0
  594. package/dist/select/SelectItemsGroupContext.d.ts +9 -0
  595. package/dist/select/SelectLabel.d.ts +8 -0
  596. package/dist/select/SelectLeadingIcon.d.ts +7 -0
  597. package/dist/select/SelectPlaceholder.d.ts +10 -0
  598. package/dist/select/SelectTrigger.d.ts +16 -0
  599. package/dist/select/SelectTrigger.styles.d.ts +5 -0
  600. package/dist/select/SelectValue.d.ts +15 -0
  601. package/dist/select/index.d.ts +12 -158
  602. package/dist/select/index.js +2 -581
  603. package/dist/select/index.js.map +1 -1
  604. package/dist/select/index.mjs +207 -339
  605. package/dist/select/index.mjs.map +1 -1
  606. package/dist/select/types.d.ts +6 -0
  607. package/dist/select/utils.d.ts +4 -0
  608. package/dist/skeleton/Skeleton.d.ts +17 -0
  609. package/dist/skeleton/Skeleton.styles.d.ts +5 -0
  610. package/dist/skeleton/SkeletonItem.d.ts +31 -0
  611. package/dist/skeleton/SkeletonItem.styles.d.ts +8 -0
  612. package/dist/skeleton/index.d.ts +8 -67
  613. package/dist/skeleton/index.js +2 -206
  614. package/dist/skeleton/index.js.map +1 -1
  615. package/dist/skeleton/index.mjs +64 -96
  616. package/dist/skeleton/index.mjs.map +1 -1
  617. package/dist/slider/Slider.d.ts +55 -0
  618. package/dist/slider/Slider.styles.d.ts +1 -0
  619. package/dist/slider/SliderContext.d.ts +4 -0
  620. package/dist/slider/SliderThumb.d.ts +14 -0
  621. package/dist/slider/SliderThumb.styles.d.ts +5 -0
  622. package/dist/slider/SliderTrack.d.ts +14 -0
  623. package/dist/slider/SliderTrack.styles.d.ts +9 -0
  624. package/dist/slider/index.d.ts +8 -97
  625. package/dist/slider/index.js +2 -220
  626. package/dist/slider/index.js.map +1 -1
  627. package/dist/slider/index.mjs +490 -107
  628. package/dist/slider/index.mjs.map +1 -1
  629. package/dist/slot/Slot.d.ts +12 -0
  630. package/dist/slot/index.d.ts +1 -16
  631. package/dist/slot/index.js +2 -51
  632. package/dist/slot/index.js.map +1 -1
  633. package/dist/slot/index.mjs +5 -9
  634. package/dist/slot/index.mjs.map +1 -1
  635. package/dist/snackbar/Snackbar.d.ts +29 -0
  636. package/dist/snackbar/SnackbarItem.d.ts +49 -0
  637. package/dist/snackbar/SnackbarItem.styles.d.ts +10 -0
  638. package/dist/snackbar/SnackbarItemAction.d.ts +10 -0
  639. package/dist/snackbar/SnackbarItemClose.d.ts +9 -0
  640. package/dist/snackbar/SnackbarItemContext.d.ts +8 -0
  641. package/dist/snackbar/SnackbarItemIcon.d.ts +7 -0
  642. package/dist/snackbar/SnackbarRegion.d.ts +30 -0
  643. package/dist/snackbar/SnackbarRegion.styles.d.ts +5 -0
  644. package/dist/snackbar/index.d.ts +13 -158
  645. package/dist/snackbar/index.js +2 -1756
  646. package/dist/snackbar/index.js.map +1 -1
  647. package/dist/snackbar/index.mjs +1153 -429
  648. package/dist/snackbar/index.mjs.map +1 -1
  649. package/dist/snackbar/snackbarVariants.d.ts +82 -0
  650. package/dist/snackbar/useSnackbarGlobalStore.d.ts +18 -0
  651. package/dist/snackbar/useSwipe.d.ts +15 -0
  652. package/dist/spinner/Spinner.d.ts +9 -0
  653. package/dist/spinner/Spinner.styles.d.ts +7 -0
  654. package/dist/spinner/index.d.ts +1 -21
  655. package/dist/spinner/index.js +2 -139
  656. package/dist/spinner/index.js.map +1 -1
  657. package/dist/spinner/index.mjs +3 -7
  658. package/dist/spinner/index.mjs.map +1 -1
  659. package/dist/stepper/Stepper.d.ts +9 -0
  660. package/dist/stepper/StepperButton.d.ts +14 -0
  661. package/dist/stepper/StepperInput.d.ts +7 -0
  662. package/dist/stepper/index.d.ts +9 -81
  663. package/dist/stepper/index.js +8 -1847
  664. package/dist/stepper/index.js.map +1 -1
  665. package/dist/stepper/index.mjs +2325 -197
  666. package/dist/stepper/index.mjs.map +1 -1
  667. package/dist/stepper/types.d.ts +46 -0
  668. package/dist/stepper/useStepper.d.ts +2 -0
  669. package/dist/switch/Switch.d.ts +6 -0
  670. package/dist/switch/{index.d.mts → SwitchInput.d.ts} +4 -17
  671. package/dist/switch/SwitchInput.styles.d.ts +16 -0
  672. package/dist/switch/SwitchLabel.d.ts +17 -0
  673. package/dist/switch/SwitchLabel.styles.d.ts +5 -0
  674. package/dist/switch/index.d.ts +1 -64
  675. package/dist/switch/index.js +2 -327
  676. package/dist/switch/index.js.map +1 -1
  677. package/dist/switch/index.mjs +213 -130
  678. package/dist/switch/index.mjs.map +1 -1
  679. package/dist/tabs/Tabs.d.ts +24 -0
  680. package/dist/tabs/TabsContent.d.ts +22 -0
  681. package/dist/tabs/TabsContent.styles.d.ts +3 -0
  682. package/dist/tabs/TabsContext.d.ts +7 -0
  683. package/dist/tabs/TabsList.d.ts +20 -0
  684. package/dist/tabs/TabsList.styles.d.ts +3 -0
  685. package/dist/tabs/TabsPopover.d.ts +29 -0
  686. package/dist/tabs/TabsPopoverAbstraction.d.ts +27 -0
  687. package/dist/tabs/TabsRoot.styles.d.ts +1 -0
  688. package/dist/tabs/TabsTrigger.d.ts +41 -0
  689. package/dist/tabs/TabsTrigger.styles.d.ts +8 -0
  690. package/dist/tabs/index.d.ts +13 -137
  691. package/dist/tabs/index.js +2 -1830
  692. package/dist/tabs/index.js.map +1 -1
  693. package/dist/tabs/index.mjs +374 -350
  694. package/dist/tabs/index.mjs.map +1 -1
  695. package/dist/tabs/useResizeObserver.d.ts +8 -0
  696. package/dist/tag/Tag.d.ts +17 -0
  697. package/dist/tag/Tag.styles.d.ts +8 -0
  698. package/dist/tag/index.d.ts +1 -29
  699. package/dist/tag/index.js +2 -283
  700. package/dist/tag/index.js.map +1 -1
  701. package/dist/tag/index.mjs +66 -90
  702. package/dist/tag/index.mjs.map +1 -1
  703. package/dist/tag/variants/filled.d.ts +41 -0
  704. package/dist/tag/variants/index.d.ts +3 -0
  705. package/dist/tag/variants/outlined.d.ts +37 -0
  706. package/dist/tag/variants/tinted.d.ts +37 -0
  707. package/dist/text-link/TextLink.d.ts +16 -0
  708. package/dist/text-link/index.d.ts +1 -20
  709. package/dist/text-link/index.js +2 -100
  710. package/dist/text-link/index.js.map +1 -1
  711. package/dist/text-link/index.mjs +3 -6
  712. package/dist/text-link/index.mjs.map +1 -1
  713. package/dist/textarea/Textarea.d.ts +14 -0
  714. package/dist/textarea/TextareaClearButton.d.ts +10 -0
  715. package/dist/textarea/TextareaGroup.d.ts +6 -0
  716. package/dist/textarea/TextareaLeadingIcon.d.ts +7 -0
  717. package/dist/textarea/TextareaTrailingIcon.d.ts +7 -0
  718. package/dist/textarea/index.d.ts +10 -53
  719. package/dist/textarea/index.js +2 -797
  720. package/dist/textarea/index.js.map +1 -1
  721. package/dist/textarea/index.mjs +50 -83
  722. package/dist/textarea/index.mjs.map +1 -1
  723. package/dist/toast/Toast.d.ts +4 -0
  724. package/dist/toast/Toast.styles.d.ts +10 -0
  725. package/dist/toast/index.d.ts +10 -53
  726. package/dist/toast/index.js +2 -1454
  727. package/dist/toast/index.js.map +1 -1
  728. package/dist/toast/index.mjs +1016 -208
  729. package/dist/toast/index.mjs.map +1 -1
  730. package/dist/toast/types.d.ts +41 -0
  731. package/dist/toast/useRenderSlot.d.ts +3 -0
  732. package/dist/toast/useToastManager.d.ts +2 -0
  733. package/dist/useCollapsiblePanel-D1dCo0lf.js +4 -0
  734. package/dist/useCollapsiblePanel-D1dCo0lf.js.map +1 -0
  735. package/dist/useCollapsiblePanel-kbMNl4Z4.mjs +287 -0
  736. package/dist/useCollapsiblePanel-kbMNl4Z4.mjs.map +1 -0
  737. package/dist/useFocusWithin-CFNEka2I.js +2 -0
  738. package/dist/useFocusWithin-CFNEka2I.js.map +1 -0
  739. package/dist/useFocusWithin-CoL4390f.mjs +796 -0
  740. package/dist/useFocusWithin-CoL4390f.mjs.map +1 -0
  741. package/dist/useOpenChangeComplete-Dk-u_f2y.js +2 -0
  742. package/dist/useOpenChangeComplete-Dk-u_f2y.js.map +1 -0
  743. package/dist/useOpenChangeComplete-RUbg6RBw.mjs +582 -0
  744. package/dist/useOpenChangeComplete-RUbg6RBw.mjs.map +1 -0
  745. package/dist/useTransitionStatus-CktVVKxz.mjs +46 -0
  746. package/dist/useTransitionStatus-CktVVKxz.mjs.map +1 -0
  747. package/dist/useTransitionStatus-CqbEyvIj.js +2 -0
  748. package/dist/useTransitionStatus-CqbEyvIj.js.map +1 -0
  749. package/dist/visually-hidden/VisuallyHidden.d.ts +12 -0
  750. package/dist/visually-hidden/index.d.ts +1 -16
  751. package/dist/visually-hidden/index.js +2 -67
  752. package/dist/visually-hidden/index.js.map +1 -1
  753. package/dist/visually-hidden/index.mjs +3 -6
  754. package/dist/visually-hidden/index.mjs.map +1 -1
  755. package/package.json +8 -8
  756. package/dist/Input-N8AWWSmt.d.mts +0 -41
  757. package/dist/Input-N8AWWSmt.d.ts +0 -41
  758. package/dist/InputTrailingIcon-BBp7sE6D.d.mts +0 -20
  759. package/dist/InputTrailingIcon-ZZx8PoJy.d.ts +0 -20
  760. package/dist/LabelRequiredIndicator-DRnCzHMU.d.mts +0 -19
  761. package/dist/LabelRequiredIndicator-DRnCzHMU.d.ts +0 -19
  762. package/dist/accordion/index.d.mts +0 -73
  763. package/dist/alert-dialog/index.d.mts +0 -159
  764. package/dist/avatar/index.d.mts +0 -66
  765. package/dist/badge/index.d.mts +0 -47
  766. package/dist/breadcrumb/index.d.mts +0 -64
  767. package/dist/button/index.d.mts +0 -41
  768. package/dist/card/index.d.mts +0 -61
  769. package/dist/checkbox/index.d.mts +0 -120
  770. package/dist/chip/index.d.mts +0 -97
  771. package/dist/chunk-2YM6GKWW.mjs.map +0 -1
  772. package/dist/chunk-6QCEPQ3U.mjs +0 -26
  773. package/dist/chunk-6QCEPQ3U.mjs.map +0 -1
  774. package/dist/chunk-7EWSMIZU.mjs +0 -214
  775. package/dist/chunk-7EWSMIZU.mjs.map +0 -1
  776. package/dist/chunk-DCXWGQVZ.mjs +0 -53
  777. package/dist/chunk-DCXWGQVZ.mjs.map +0 -1
  778. package/dist/chunk-GAK4SC2F.mjs.map +0 -1
  779. package/dist/chunk-GPJMLIHC.mjs +0 -308
  780. package/dist/chunk-GPJMLIHC.mjs.map +0 -1
  781. package/dist/chunk-HLXYG643.mjs +0 -52
  782. package/dist/chunk-HLXYG643.mjs.map +0 -1
  783. package/dist/chunk-KEGAAGJW.mjs +0 -36
  784. package/dist/chunk-KEGAAGJW.mjs.map +0 -1
  785. package/dist/chunk-RKPP7ZOK.mjs.map +0 -1
  786. package/dist/chunk-UMUMFMFB.mjs +0 -68
  787. package/dist/chunk-UMUMFMFB.mjs.map +0 -1
  788. package/dist/chunk-VBX7BTNU.mjs +0 -614
  789. package/dist/chunk-VBX7BTNU.mjs.map +0 -1
  790. package/dist/chunk-XZ47F6TP.mjs.map +0 -1
  791. package/dist/collapsible/index.d.mts +0 -43
  792. package/dist/combobox/index.d.mts +0 -287
  793. package/dist/dialog/index.d.mts +0 -166
  794. package/dist/divider/index.d.mts +0 -61
  795. package/dist/docgen.json +0 -47767
  796. package/dist/drawer/index.d.mts +0 -152
  797. package/dist/dropdown/index.d.mts +0 -233
  798. package/dist/file-upload/index.d.mts +0 -270
  799. package/dist/form-field/index.d.mts +0 -186
  800. package/dist/icon/index.d.mts +0 -28
  801. package/dist/icon-button/index.d.mts +0 -16
  802. package/dist/index-Cno_GFuW.d.mts +0 -93
  803. package/dist/index-Cno_GFuW.d.ts +0 -93
  804. package/dist/input/index.d.mts +0 -78
  805. package/dist/kbd/index.d.mts +0 -9
  806. package/dist/label/index.d.mts +0 -11
  807. package/dist/link-box/index.d.mts +0 -34
  808. package/dist/pagination/index.d.mts +0 -143
  809. package/dist/popover/index.d.mts +0 -6
  810. package/dist/progress/index.d.mts +0 -52
  811. package/dist/progress-tracker/index.d.mts +0 -80
  812. package/dist/radio-group/index.d.mts +0 -100
  813. package/dist/rating/index.d.mts +0 -78
  814. package/dist/scrolling-list/index.d.mts +0 -118
  815. package/dist/select/index.d.mts +0 -167
  816. package/dist/skeleton/index.d.mts +0 -67
  817. package/dist/slider/index.d.mts +0 -97
  818. package/dist/slot/index.d.mts +0 -16
  819. package/dist/snackbar/index.d.mts +0 -158
  820. package/dist/spinner/index.d.mts +0 -21
  821. package/dist/stepper/index.d.mts +0 -81
  822. package/dist/tabs/index.d.mts +0 -137
  823. package/dist/tag/index.d.mts +0 -29
  824. package/dist/text-link/index.d.mts +0 -20
  825. package/dist/textarea/index.d.mts +0 -57
  826. package/dist/toast/index.d.mts +0 -63
  827. package/dist/visually-hidden/index.d.mts +0 -16
@@ -1,1353 +1,2 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/pagination/index.ts
31
- var pagination_exports = {};
32
- __export(pagination_exports, {
33
- Pagination: () => Pagination2
34
- });
35
- module.exports = __toCommonJS(pagination_exports);
36
-
37
- // src/pagination/PaginationContext.tsx
38
- var pagination = __toESM(require("@zag-js/pagination"));
39
- var import_react = require("@zag-js/react");
40
- var import_react2 = require("react");
41
-
42
- // src/pagination/utils.ts
43
- function sliceArrayWithIndex(arr, index, length) {
44
- const relativeElements = (length - 1) / 2;
45
- let start = Math.max(0, index - relativeElements);
46
- let end = Math.min(arr.length, index + relativeElements + 1);
47
- if (end - start < length) {
48
- start = Math.max(0, Math.min(start, arr.length - length));
49
- end = Math.min(arr.length, start + length);
50
- }
51
- return arr.slice(start, end);
52
- }
53
-
54
- // src/pagination/PaginationContext.tsx
55
- var import_jsx_runtime = require("react/jsx-runtime");
56
- var PaginationContext = (0, import_react2.createContext)(null);
57
- var PaginationProvider = ({
58
- children,
59
- count,
60
- visiblePageItems = 7,
61
- pageSize,
62
- page,
63
- onPageChange,
64
- noEllipsis,
65
- type = "link"
66
- }) => {
67
- const siblingCount = noEllipsis ? Infinity : Math.max(0, Math.floor((visiblePageItems - 5) / 2));
68
- const id = (0, import_react2.useId)();
69
- const service = (0, import_react.useMachine)(pagination.machine, {
70
- id,
71
- count,
72
- siblingCount,
73
- pageSize,
74
- page,
75
- onPageChange,
76
- type
77
- });
78
- const api = pagination.connect(service, import_react.normalizeProps);
79
- const pages = noEllipsis ? sliceArrayWithIndex(api.pages, api.page - 1, visiblePageItems) : api.pages;
80
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
- PaginationContext.Provider,
82
- {
83
- value: {
84
- type,
85
- pagination: {
86
- ...api,
87
- pages,
88
- // Extending ZagJS anatomy
89
- getFirstPageTriggerProps: () => {
90
- return {
91
- ...api.getPrevTriggerProps(),
92
- id: `${api.getRootProps().id}:first`,
93
- "data-part": "first-page-trigger",
94
- onClick: api.goToFirstPage
95
- };
96
- },
97
- getLastPageTriggerProps: () => {
98
- return {
99
- ...api.getNextTriggerProps(),
100
- id: `${api.getRootProps().id}:last`,
101
- "data-part": "last-page-trigger",
102
- onClick: api.goToLastPage
103
- };
104
- }
105
- }
106
- },
107
- children
108
- }
109
- );
110
- };
111
- var usePagination = () => {
112
- const context = (0, import_react2.useContext)(PaginationContext);
113
- if (!context) {
114
- throw Error("usePagination must be used within a Pagination provider");
115
- }
116
- return context;
117
- };
118
-
119
- // src/pagination/Pagination.tsx
120
- var import_jsx_runtime2 = require("react/jsx-runtime");
121
- var Pagination = ({
122
- children,
123
- visiblePageItems = 5,
124
- type = "link",
125
- noEllipsis = false,
126
- className,
127
- ...rest
128
- }) => {
129
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
130
- PaginationProvider,
131
- {
132
- visiblePageItems,
133
- noEllipsis,
134
- type,
135
- ...rest,
136
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationWrapper, { className, children })
137
- }
138
- );
139
- };
140
- var PaginationWrapper = ({
141
- children,
142
- className
143
- }) => {
144
- const { pagination: pagination2 } = usePagination();
145
- const props = pagination2.getRootProps();
146
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("nav", { "data-spark-component": "pagination", ...props, className, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { className: "gap-md flex flex-wrap", children }) });
147
- };
148
- Pagination.displayName = "Pagination";
149
-
150
- // src/pagination/PaginationEllipsis.tsx
151
- var import_react3 = require("@zag-js/react");
152
- var import_class_variance_authority = require("class-variance-authority");
153
- var import_jsx_runtime3 = require("react/jsx-runtime");
154
- var Ellipsis = ({ children, index, className, ref, ...rest }) => {
155
- const { pagination: pagination2 } = usePagination();
156
- const apiProps = pagination2.getEllipsisProps({ index });
157
- const localProps = {
158
- className: (0, import_class_variance_authority.cx)("flex size-sz-44 items-center justify-center", className),
159
- ...rest
160
- };
161
- const mergedProps = (0, import_react3.mergeProps)(apiProps, localProps);
162
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "data-spark-component": "pagination-ellipsis", ref, ...mergedProps, children: children || "\u2026" }) });
163
- };
164
- Ellipsis.displayName = "Pagination.Ellipsis";
165
-
166
- // src/pagination/PaginationFirstPageTrigger.tsx
167
- var import_ArrowDoubleLeft = require("@spark-ui/icons/ArrowDoubleLeft");
168
- var import_react7 = require("@zag-js/react");
169
-
170
- // src/icon/Icon.tsx
171
- var import_react5 = require("react");
172
-
173
- // src/slot/Slot.tsx
174
- var import_radix_ui = require("radix-ui");
175
- var import_react4 = require("react");
176
- var import_jsx_runtime4 = require("react/jsx-runtime");
177
- var Slottable = import_radix_ui.Slot.Slottable;
178
- var Slot = ({ ref, ...props }) => {
179
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_radix_ui.Slot.Root, { ref, ...props });
180
- };
181
- var wrapPolymorphicSlot = (asChild, children, callback) => {
182
- if (!asChild) return callback(children);
183
- return (0, import_react4.isValidElement)(children) ? (0, import_react4.cloneElement)(
184
- children,
185
- void 0,
186
- callback(children.props.children)
187
- ) : null;
188
- };
189
-
190
- // src/visually-hidden/VisuallyHidden.tsx
191
- var import_jsx_runtime5 = require("react/jsx-runtime");
192
- var VisuallyHidden = ({ asChild = false, ref, ...props }) => {
193
- const Component = asChild ? Slot : "span";
194
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
195
- Component,
196
- {
197
- ...props,
198
- ref,
199
- style: {
200
- // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
201
- position: "absolute",
202
- border: 0,
203
- width: 1,
204
- height: 1,
205
- padding: 0,
206
- margin: -1,
207
- overflow: "hidden",
208
- clip: "rect(0, 0, 0, 0)",
209
- whiteSpace: "nowrap",
210
- wordWrap: "normal",
211
- ...props.style
212
- }
213
- }
214
- );
215
- };
216
- VisuallyHidden.displayName = "VisuallyHidden";
217
-
218
- // src/icon/Icon.styles.tsx
219
- var import_internal_utils = require("@spark-ui/internal-utils");
220
- var import_class_variance_authority2 = require("class-variance-authority");
221
- var iconStyles = (0, import_class_variance_authority2.cva)(["fill-current shrink-0"], {
222
- variants: {
223
- /**
224
- * Color scheme of the icon.
225
- */
226
- intent: (0, import_internal_utils.makeVariants)({
227
- current: ["text-current"],
228
- main: ["text-main"],
229
- support: ["text-support"],
230
- accent: ["text-accent"],
231
- basic: ["text-basic"],
232
- success: ["text-success"],
233
- alert: ["text-alert"],
234
- error: ["text-error"],
235
- info: ["text-info"],
236
- neutral: ["text-neutral"]
237
- }),
238
- /**
239
- * Sets the size of the icon.
240
- */
241
- size: (0, import_internal_utils.makeVariants)({
242
- current: ["u-current-font-size"],
243
- sm: ["w-sz-16", "h-sz-16"],
244
- md: ["w-sz-24", "h-sz-24"],
245
- lg: ["w-sz-32", "h-sz-32"],
246
- xl: ["w-sz-40", "h-sz-40"]
247
- })
248
- }
249
- });
250
-
251
- // src/icon/Icon.tsx
252
- var import_jsx_runtime6 = require("react/jsx-runtime");
253
- var Icon = ({
254
- label,
255
- className,
256
- size = "current",
257
- intent = "current",
258
- children,
259
- ...others
260
- }) => {
261
- const child = import_react5.Children.only(children);
262
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
263
- (0, import_react5.cloneElement)(child, {
264
- className: iconStyles({ className, size, intent }),
265
- "data-spark-component": "icon",
266
- "aria-hidden": "true",
267
- focusable: "false",
268
- ...others
269
- }),
270
- label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(VisuallyHidden, { children: label })
271
- ] });
272
- };
273
- Icon.displayName = "Icon";
274
-
275
- // src/button/Button.tsx
276
- var import_class_variance_authority5 = require("class-variance-authority");
277
- var import_react6 = require("react");
278
-
279
- // src/spinner/Spinner.styles.tsx
280
- var import_internal_utils2 = require("@spark-ui/internal-utils");
281
- var import_class_variance_authority3 = require("class-variance-authority");
282
- var defaultVariants = {
283
- intent: "current",
284
- size: "current",
285
- isBackgroundVisible: false
286
- };
287
- var spinnerStyles = (0, import_class_variance_authority3.cva)(
288
- ["inline-block", "border-solid", "rounded-full", "border-md", "animate-spin"],
289
- {
290
- variants: {
291
- /**
292
- * Use `size` prop to set the size of the spinner. If you want to set the full size for the spinner, don't forget to add a wrapping container with its own size.
293
- */
294
- size: {
295
- current: ["u-current-font-size"],
296
- sm: ["w-sz-20", "h-sz-20"],
297
- md: ["w-sz-28", "h-sz-28"],
298
- full: ["w-full", "h-full"]
299
- },
300
- /**
301
- * Color scheme of the spinner.
302
- */
303
- intent: (0, import_internal_utils2.makeVariants)({
304
- current: ["border-current"],
305
- main: ["border-main"],
306
- support: ["border-support"],
307
- accent: ["border-accent"],
308
- basic: ["border-basic"],
309
- success: ["border-success"],
310
- alert: ["border-alert"],
311
- error: ["border-error"],
312
- info: ["border-info"],
313
- neutral: ["border-neutral"]
314
- }),
315
- /**
316
- * Size of the button.
317
- */
318
- isBackgroundVisible: {
319
- true: ["border-b-neutral-container", "border-l-neutral-container"],
320
- false: ["border-b-transparent", "border-l-transparent"]
321
- }
322
- },
323
- defaultVariants
324
- }
325
- );
326
-
327
- // src/spinner/Spinner.tsx
328
- var import_jsx_runtime7 = require("react/jsx-runtime");
329
- var Spinner = ({
330
- className,
331
- size = "current",
332
- intent = "current",
333
- label,
334
- isBackgroundVisible,
335
- ref,
336
- ...others
337
- }) => {
338
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
339
- "span",
340
- {
341
- role: "status",
342
- "data-spark-component": "spinner",
343
- ref,
344
- className: spinnerStyles({ className, size, intent, isBackgroundVisible }),
345
- ...others,
346
- children: label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(VisuallyHidden, { children: label })
347
- }
348
- );
349
- };
350
-
351
- // src/button/Button.styles.tsx
352
- var import_internal_utils8 = require("@spark-ui/internal-utils");
353
- var import_class_variance_authority4 = require("class-variance-authority");
354
-
355
- // src/button/variants/filled.ts
356
- var import_internal_utils3 = require("@spark-ui/internal-utils");
357
- var filledVariants = [
358
- // Main
359
- {
360
- intent: "main",
361
- design: "filled",
362
- class: (0, import_internal_utils3.tw)([
363
- "bg-main",
364
- "text-on-main",
365
- "hover:bg-main-hovered",
366
- "enabled:active:bg-main-hovered",
367
- "focus-visible:bg-main-hovered"
368
- ])
369
- },
370
- // Support
371
- {
372
- intent: "support",
373
- design: "filled",
374
- class: (0, import_internal_utils3.tw)([
375
- "bg-support",
376
- "text-on-support",
377
- "hover:bg-support-hovered",
378
- "enabled:active:bg-support-hovered",
379
- "focus-visible:bg-support-hovered"
380
- ])
381
- },
382
- // Accent
383
- {
384
- intent: "accent",
385
- design: "filled",
386
- class: (0, import_internal_utils3.tw)([
387
- "bg-accent",
388
- "text-on-accent",
389
- "hover:bg-accent-hovered",
390
- "enabled:active:bg-accent-hovered",
391
- "focus-visible:bg-accent-hovered"
392
- ])
393
- },
394
- // Basic
395
- {
396
- intent: "basic",
397
- design: "filled",
398
- class: (0, import_internal_utils3.tw)([
399
- "bg-basic",
400
- "text-on-basic",
401
- "hover:bg-basic-hovered",
402
- "enabled:active:bg-basic-hovered",
403
- "focus-visible:bg-basic-hovered"
404
- ])
405
- },
406
- // Success
407
- {
408
- intent: "success",
409
- design: "filled",
410
- class: (0, import_internal_utils3.tw)([
411
- "bg-success",
412
- "text-on-success",
413
- "hover:bg-success-hovered",
414
- "enabled:active:bg-success-hovered",
415
- "focus-visible:bg-success-hovered"
416
- ])
417
- },
418
- // Alert
419
- {
420
- intent: "alert",
421
- design: "filled",
422
- class: (0, import_internal_utils3.tw)([
423
- "bg-alert",
424
- "text-on-alert",
425
- "hover:bg-alert-hovered",
426
- "enabled:active:bg-alert-hovered",
427
- "focus-visible:bg-alert-hovered"
428
- ])
429
- },
430
- // Danger
431
- {
432
- intent: "danger",
433
- design: "filled",
434
- class: (0, import_internal_utils3.tw)([
435
- "text-on-error bg-error",
436
- "hover:bg-error-hovered enabled:active:bg-error-hovered",
437
- "focus-visible:bg-error-hovered"
438
- ])
439
- },
440
- // Info
441
- {
442
- intent: "info",
443
- design: "filled",
444
- class: (0, import_internal_utils3.tw)([
445
- "text-on-error bg-info",
446
- "hover:bg-info-hovered enabled:active:bg-info-hovered",
447
- "focus-visible:bg-info-hovered"
448
- ])
449
- },
450
- // Neutral
451
- {
452
- intent: "neutral",
453
- design: "filled",
454
- class: (0, import_internal_utils3.tw)([
455
- "bg-neutral",
456
- "text-on-neutral",
457
- "hover:bg-neutral-hovered",
458
- "enabled:active:bg-neutral-hovered",
459
- "focus-visible:bg-neutral-hovered"
460
- ])
461
- },
462
- // Surface
463
- {
464
- intent: "surface",
465
- design: "filled",
466
- class: (0, import_internal_utils3.tw)([
467
- "bg-surface",
468
- "text-on-surface",
469
- "hover:bg-surface-hovered",
470
- "enabled:active:bg-surface-hovered",
471
- "focus-visible:bg-surface-hovered"
472
- ])
473
- },
474
- {
475
- intent: "surfaceInverse",
476
- design: "filled",
477
- class: (0, import_internal_utils3.tw)([
478
- "bg-surface-inverse",
479
- "text-on-surface-inverse",
480
- "hover:bg-surface-inverse-hovered",
481
- "enabled:active:bg-surface-inverse-hovered",
482
- "focus-visible:bg-surface-inverse-hovered"
483
- ])
484
- }
485
- ];
486
-
487
- // src/button/variants/ghost.ts
488
- var import_internal_utils4 = require("@spark-ui/internal-utils");
489
- var ghostVariants = [
490
- {
491
- intent: "main",
492
- design: "ghost",
493
- class: (0, import_internal_utils4.tw)([
494
- "text-on-main-container",
495
- "hover:bg-main/dim-5",
496
- "enabled:active:bg-main/dim-5",
497
- "focus-visible:bg-main/dim-5"
498
- ])
499
- },
500
- {
501
- intent: "support",
502
- design: "ghost",
503
- class: (0, import_internal_utils4.tw)([
504
- "text-on-support-container",
505
- "hover:bg-support/dim-5",
506
- "enabled:active:bg-support/dim-5",
507
- "focus-visible:bg-support/dim-5"
508
- ])
509
- },
510
- {
511
- intent: "accent",
512
- design: "ghost",
513
- class: (0, import_internal_utils4.tw)([
514
- "text-on-accent-container",
515
- "hover:bg-accent/dim-5",
516
- "enabled:active:bg-accent/dim-5",
517
- "focus-visible:bg-accent/dim-5"
518
- ])
519
- },
520
- {
521
- intent: "basic",
522
- design: "ghost",
523
- class: (0, import_internal_utils4.tw)([
524
- "text-on-basic-container",
525
- "hover:bg-basic/dim-5",
526
- "enabled:active:bg-basic/dim-5",
527
- "focus-visible:bg-basic/dim-5"
528
- ])
529
- },
530
- {
531
- intent: "success",
532
- design: "ghost",
533
- class: (0, import_internal_utils4.tw)([
534
- "text-on-success-container",
535
- "hover:bg-success/dim-5",
536
- "enabled:active:bg-success/dim-5",
537
- "focus-visible:bg-success/dim-5"
538
- ])
539
- },
540
- {
541
- intent: "alert",
542
- design: "ghost",
543
- class: (0, import_internal_utils4.tw)([
544
- "text-on-alert-container",
545
- "hover:bg-alert/dim-5",
546
- "enabled:active:bg-alert/dim-5",
547
- "focus-visible:bg-alert/dim-5"
548
- ])
549
- },
550
- {
551
- intent: "danger",
552
- design: "ghost",
553
- class: (0, import_internal_utils4.tw)([
554
- "text-on-error-container",
555
- "hover:bg-error/dim-5",
556
- "enabled:active:bg-error/dim-5",
557
- "focus-visible:bg-error/dim-5"
558
- ])
559
- },
560
- {
561
- intent: "info",
562
- design: "ghost",
563
- class: (0, import_internal_utils4.tw)([
564
- "text-on-info-container",
565
- "hover:bg-info/dim-5",
566
- "enabled:active:bg-info/dim-5",
567
- "focus-visible:bg-info/dim-5"
568
- ])
569
- },
570
- {
571
- intent: "neutral",
572
- design: "ghost",
573
- class: (0, import_internal_utils4.tw)([
574
- "text-on-neutral-container",
575
- "hover:bg-neutral/dim-5",
576
- "enabled:active:bg-neutral/dim-5",
577
- "focus-visible:bg-neutral/dim-5"
578
- ])
579
- },
580
- {
581
- intent: "surface",
582
- design: "ghost",
583
- class: (0, import_internal_utils4.tw)([
584
- "text-surface",
585
- "hover:bg-surface/dim-5",
586
- "enabled:active:bg-surface/dim-5",
587
- "focus-visible:bg-surface/dim-5"
588
- ])
589
- },
590
- {
591
- intent: "surfaceInverse",
592
- design: "ghost",
593
- class: (0, import_internal_utils4.tw)([
594
- "text-surface-inverse",
595
- "hover:bg-surface-inverse/dim-5",
596
- "enabled:active:bg-surface-inverse/dim-5",
597
- "focus-visible:bg-surface-inverse/dim-5"
598
- ])
599
- }
600
- ];
601
-
602
- // src/button/variants/outlined.ts
603
- var import_internal_utils5 = require("@spark-ui/internal-utils");
604
- var outlinedVariants = [
605
- {
606
- intent: "main",
607
- design: "outlined",
608
- class: (0, import_internal_utils5.tw)([
609
- "hover:bg-main/dim-5",
610
- "enabled:active:bg-main/dim-5",
611
- "focus-visible:bg-main/dim-5",
612
- "text-main"
613
- ])
614
- },
615
- {
616
- intent: "support",
617
- design: "outlined",
618
- class: (0, import_internal_utils5.tw)([
619
- "hover:bg-support/dim-5",
620
- "enabled:active:bg-support/dim-5",
621
- "focus-visible:bg-support/dim-5",
622
- "text-support"
623
- ])
624
- },
625
- {
626
- intent: "accent",
627
- design: "outlined",
628
- class: (0, import_internal_utils5.tw)([
629
- "hover:bg-accent/dim-5",
630
- "enabled:active:bg-accent/dim-5",
631
- "focus-visible:bg-accent/dim-5",
632
- "text-accent"
633
- ])
634
- },
635
- {
636
- intent: "basic",
637
- design: "outlined",
638
- class: (0, import_internal_utils5.tw)([
639
- "hover:bg-basic/dim-5",
640
- "enabled:active:bg-basic/dim-5",
641
- "focus-visible:bg-basic/dim-5",
642
- "text-basic"
643
- ])
644
- },
645
- {
646
- intent: "success",
647
- design: "outlined",
648
- class: (0, import_internal_utils5.tw)([
649
- "hover:bg-success/dim-5",
650
- "enabled:active:bg-success/dim-5",
651
- "focus-visible:bg-success/dim-5",
652
- "text-success"
653
- ])
654
- },
655
- {
656
- intent: "alert",
657
- design: "outlined",
658
- class: (0, import_internal_utils5.tw)([
659
- "hover:bg-alert/dim-5",
660
- "enabled:active:bg-alert/dim-5",
661
- "focus-visible:bg-alert/dim-5",
662
- "text-alert"
663
- ])
664
- },
665
- {
666
- intent: "danger",
667
- design: "outlined",
668
- class: (0, import_internal_utils5.tw)([
669
- "hover:bg-error/dim-5",
670
- "enabled:active:bg-error/dim-5",
671
- "focus-visible:bg-error/dim-5",
672
- "text-error"
673
- ])
674
- },
675
- {
676
- intent: "info",
677
- design: "outlined",
678
- class: (0, import_internal_utils5.tw)([
679
- "hover:bg-info/dim-5",
680
- "enabled:active:bg-info/dim-5",
681
- "focus-visible:bg-info/dim-5",
682
- "text-info"
683
- ])
684
- },
685
- {
686
- intent: "neutral",
687
- design: "outlined",
688
- class: (0, import_internal_utils5.tw)([
689
- "hover:bg-neutral/dim-5",
690
- "enabled:active:bg-neutral/dim-5",
691
- "focus-visible:bg-neutral/dim-5",
692
- "text-neutral"
693
- ])
694
- },
695
- {
696
- intent: "surface",
697
- design: "outlined",
698
- class: (0, import_internal_utils5.tw)([
699
- "hover:bg-surface/dim-5",
700
- "enabled:active:bg-surface/dim-5",
701
- "focus-visible:bg-surface/dim-5",
702
- "text-surface"
703
- ])
704
- },
705
- {
706
- intent: "surfaceInverse",
707
- design: "outlined",
708
- class: (0, import_internal_utils5.tw)([
709
- "hover:bg-surface-inverse/dim-5",
710
- "enabled:active:bg-surface-inverse/dim-5",
711
- "focus-visible:bg-surface-inverse/dim-5",
712
- "text-surface-inverse"
713
- ])
714
- }
715
- ];
716
-
717
- // src/button/variants/tinted.ts
718
- var import_internal_utils6 = require("@spark-ui/internal-utils");
719
- var tintedVariants = [
720
- {
721
- intent: "main",
722
- design: "tinted",
723
- class: (0, import_internal_utils6.tw)([
724
- "bg-main-container",
725
- "text-on-main-container",
726
- "hover:bg-main-container-hovered",
727
- "enabled:active:bg-main-container-hovered",
728
- "focus-visible:bg-main-container-hovered"
729
- ])
730
- },
731
- {
732
- intent: "support",
733
- design: "tinted",
734
- class: (0, import_internal_utils6.tw)([
735
- "bg-support-container",
736
- "text-on-support-container",
737
- "hover:bg-support-container-hovered",
738
- "enabled:active:bg-support-container-hovered",
739
- "focus-visible:bg-support-container-hovered"
740
- ])
741
- },
742
- {
743
- intent: "accent",
744
- design: "tinted",
745
- class: (0, import_internal_utils6.tw)([
746
- "bg-accent-container",
747
- "text-on-accent-container",
748
- "hover:bg-accent-container-hovered",
749
- "enabled:active:bg-accent-container-hovered",
750
- "focus-visible:bg-accent-container-hovered"
751
- ])
752
- },
753
- {
754
- intent: "basic",
755
- design: "tinted",
756
- class: (0, import_internal_utils6.tw)([
757
- "bg-basic-container",
758
- "text-on-basic-container",
759
- "hover:bg-basic-container-hovered",
760
- "enabled:active:bg-basic-container-hovered",
761
- "focus-visible:bg-basic-container-hovered"
762
- ])
763
- },
764
- {
765
- intent: "success",
766
- design: "tinted",
767
- class: (0, import_internal_utils6.tw)([
768
- "bg-success-container",
769
- "text-on-success-container",
770
- "hover:bg-success-container-hovered",
771
- "enabled:active:bg-success-container-hovered",
772
- "focus-visible:bg-success-container-hovered"
773
- ])
774
- },
775
- {
776
- intent: "alert",
777
- design: "tinted",
778
- class: (0, import_internal_utils6.tw)([
779
- "bg-alert-container",
780
- "text-on-alert-container",
781
- "hover:bg-alert-container-hovered",
782
- "enabled:active:bg-alert-container-hovered",
783
- "focus-visible:bg-alert-container-hovered"
784
- ])
785
- },
786
- {
787
- intent: "danger",
788
- design: "tinted",
789
- class: (0, import_internal_utils6.tw)([
790
- "bg-error-container",
791
- "text-on-error-container",
792
- "hover:bg-error-container-hovered",
793
- "enabled:active:bg-error-container-hovered",
794
- "focus-visible:bg-error-container-hovered"
795
- ])
796
- },
797
- {
798
- intent: "info",
799
- design: "tinted",
800
- class: (0, import_internal_utils6.tw)([
801
- "bg-info-container",
802
- "text-on-info-container",
803
- "hover:bg-info-container-hovered",
804
- "enabled:active:bg-info-container-hovered",
805
- "focus-visible:bg-info-container-hovered"
806
- ])
807
- },
808
- {
809
- intent: "neutral",
810
- design: "tinted",
811
- class: (0, import_internal_utils6.tw)([
812
- "bg-neutral-container",
813
- "text-on-neutral-container",
814
- "hover:bg-neutral-container-hovered",
815
- "enabled:active:bg-neutral-container-hovered",
816
- "focus-visible:bg-neutral-container-hovered"
817
- ])
818
- },
819
- {
820
- intent: "surface",
821
- design: "tinted",
822
- class: (0, import_internal_utils6.tw)([
823
- "bg-surface",
824
- "text-on-surface",
825
- "hover:bg-surface-hovered",
826
- "enabled:active:bg-surface-hovered",
827
- "focus-visible:bg-surface-hovered"
828
- ])
829
- },
830
- {
831
- intent: "surfaceInverse",
832
- design: "tinted",
833
- class: (0, import_internal_utils6.tw)([
834
- "bg-surface-inverse",
835
- "text-on-surface-inverse",
836
- "hover:bg-surface-inverse-hovered",
837
- "enabled:active:bg-surface-inverse-hovered",
838
- "focus-visible:bg-surface-inverse-hovered"
839
- ])
840
- }
841
- ];
842
-
843
- // src/button/variants/contrast.ts
844
- var import_internal_utils7 = require("@spark-ui/internal-utils");
845
- var contrastVariants = [
846
- {
847
- intent: "main",
848
- design: "contrast",
849
- class: (0, import_internal_utils7.tw)([
850
- "text-on-main-contaier bg-surface",
851
- "hover:bg-main-container-hovered",
852
- "enabled:active:bg-main-container-hovered",
853
- "focus-visible:bg-main-container-hovered"
854
- ])
855
- },
856
- {
857
- intent: "support",
858
- design: "contrast",
859
- class: (0, import_internal_utils7.tw)([
860
- "text-on-support-container bg-surface",
861
- "hover:bg-support-container-hovered",
862
- "enabled:active:bg-support-container-hovered",
863
- "focus-visible:bg-support-container-hovered"
864
- ])
865
- },
866
- {
867
- intent: "accent",
868
- design: "contrast",
869
- class: (0, import_internal_utils7.tw)([
870
- "text-on-accent-container bg-surface",
871
- "hover:bg-accent-container-hovered",
872
- "enabled:active:bg-accent-container-hovered",
873
- "focus-visible:bg-accent-container-hovered"
874
- ])
875
- },
876
- {
877
- intent: "basic",
878
- design: "contrast",
879
- class: (0, import_internal_utils7.tw)([
880
- "text-on-basic-container bg-surface",
881
- "hover:bg-basic-container-hovered",
882
- "enabled:active:bg-basic-container-hovered",
883
- "focus-visible:bg-basic-container-hovered"
884
- ])
885
- },
886
- {
887
- intent: "success",
888
- design: "contrast",
889
- class: (0, import_internal_utils7.tw)([
890
- "text-on-success-container bg-surface",
891
- "hover:bg-success-container-hovered",
892
- "enabled:active:bg-success-container-hovered",
893
- "focus-visible:bg-success-container-hovered"
894
- ])
895
- },
896
- {
897
- intent: "alert",
898
- design: "contrast",
899
- class: (0, import_internal_utils7.tw)([
900
- "text-on-alert-container bg-surface",
901
- "hover:bg-alert-container-hovered",
902
- "enabled:active:bg-alert-container-hovered",
903
- "focus-visible:bg-alert-container-hovered"
904
- ])
905
- },
906
- {
907
- intent: "danger",
908
- design: "contrast",
909
- class: (0, import_internal_utils7.tw)([
910
- "text-on-error-container bg-surface",
911
- "hover:bg-error-container-hovered",
912
- "enabled:active:bg-error-container-hovered",
913
- "focus-visible:bg-error-container-hovered"
914
- ])
915
- },
916
- {
917
- intent: "info",
918
- design: "contrast",
919
- class: (0, import_internal_utils7.tw)([
920
- "text-on-info-container bg-surface",
921
- "hover:bg-info-container-hovered",
922
- "enabled:active:bg-info-container-hovered",
923
- "focus-visible:bg-info-container-hovered"
924
- ])
925
- },
926
- {
927
- intent: "neutral",
928
- design: "contrast",
929
- class: (0, import_internal_utils7.tw)([
930
- "text-on-neutral-container bg-surface",
931
- "hover:bg-neutral-container-hovered",
932
- "enabled:active:bg-neutral-container-hovered",
933
- "focus-visible:bg-neutral-container-hovered"
934
- ])
935
- },
936
- {
937
- intent: "surface",
938
- design: "contrast",
939
- class: (0, import_internal_utils7.tw)([
940
- "text-on-surface bg-surface",
941
- "hover:bg-surface-hovered",
942
- "enabled:active:bg-surface-hovered",
943
- "focus-visible:bg-surface-hovered"
944
- ])
945
- },
946
- {
947
- intent: "surfaceInverse",
948
- design: "contrast",
949
- class: (0, import_internal_utils7.tw)([
950
- "text-on-surface-inverse bg-surface-inverse",
951
- "hover:bg-surface-inverse-hovered",
952
- "enabled:active:bg-surface-inverse-hovered",
953
- "focus-visible:bg-surface-inverse-hovered"
954
- ])
955
- }
956
- ];
957
-
958
- // src/button/Button.styles.tsx
959
- var buttonStyles = (0, import_class_variance_authority4.cva)(
960
- [
961
- "u-shadow-border-transition",
962
- "box-border inline-flex items-center justify-center gap-md whitespace-nowrap",
963
- "default:px-lg",
964
- "text-body-1 font-bold",
965
- "focus-visible:u-outline"
966
- ],
967
- {
968
- variants: {
969
- /**
970
- * Main style of the button.
971
- *
972
- * - `filled`: Button will be plain.
973
- *
974
- * - `outlined`: Button will be transparent with an outline.
975
- *
976
- * - `tinted`: Button will be filled but using a lighter color scheme.
977
- *
978
- * - `ghost`: Button will look like a link. No borders, plain text.
979
- *
980
- * - `contrast`: Button will be surface filled. No borders, plain text.
981
- *
982
- */
983
- design: (0, import_internal_utils8.makeVariants)({
984
- filled: [],
985
- outlined: ["bg-transparent", "border-sm", "border-current"],
986
- tinted: [],
987
- ghost: ["default:-mx-md px-md hover:bg-main/dim-5"],
988
- contrast: []
989
- }),
990
- underline: {
991
- true: ["underline"]
992
- },
993
- /**
994
- * Color scheme of the button.
995
- */
996
- intent: (0, import_internal_utils8.makeVariants)({
997
- main: [],
998
- support: [],
999
- accent: [],
1000
- basic: [],
1001
- success: [],
1002
- alert: [],
1003
- danger: [],
1004
- info: [],
1005
- neutral: [],
1006
- surface: [],
1007
- surfaceInverse: []
1008
- }),
1009
- /**
1010
- * Size of the button.
1011
- */
1012
- size: (0, import_internal_utils8.makeVariants)({
1013
- sm: ["min-w-sz-32", "h-sz-32"],
1014
- md: ["min-w-sz-44", "h-sz-44"],
1015
- lg: ["min-w-sz-56", "h-sz-56"]
1016
- }),
1017
- /**
1018
- * Shape of the button.
1019
- */
1020
- shape: (0, import_internal_utils8.makeVariants)({
1021
- rounded: ["rounded-lg"],
1022
- square: ["rounded-0"],
1023
- pill: ["rounded-full"]
1024
- }),
1025
- /**
1026
- * Disable the button, preventing user interaction and adding opacity.
1027
- */
1028
- disabled: {
1029
- true: ["cursor-not-allowed", "opacity-dim-3"],
1030
- false: ["cursor-pointer"]
1031
- }
1032
- },
1033
- compoundVariants: [
1034
- ...filledVariants,
1035
- ...outlinedVariants,
1036
- ...tintedVariants,
1037
- ...ghostVariants,
1038
- ...contrastVariants
1039
- ],
1040
- defaultVariants: {
1041
- design: "filled",
1042
- intent: "main",
1043
- size: "md",
1044
- shape: "rounded"
1045
- }
1046
- }
1047
- );
1048
-
1049
- // src/button/Button.tsx
1050
- var import_jsx_runtime8 = require("react/jsx-runtime");
1051
- var blockedEventHandlers = [
1052
- "onClick",
1053
- "onMouseDown",
1054
- "onMouseUp",
1055
- "onMouseEnter",
1056
- "onMouseLeave",
1057
- "onMouseOver",
1058
- "onMouseOut",
1059
- "onKeyDown",
1060
- "onKeyPress",
1061
- "onKeyUp",
1062
- "onSubmit"
1063
- ];
1064
- var Button = ({
1065
- children,
1066
- design = "filled",
1067
- disabled = false,
1068
- intent = "main",
1069
- isLoading = false,
1070
- loadingLabel,
1071
- loadingText,
1072
- shape = "rounded",
1073
- size = "md",
1074
- asChild,
1075
- className,
1076
- underline = false,
1077
- ref,
1078
- ...others
1079
- }) => {
1080
- const Component = asChild ? Slot : "button";
1081
- const shouldNotInteract = !!disabled || isLoading;
1082
- const disabledEventHandlers = (0, import_react6.useMemo)(() => {
1083
- const result = {};
1084
- if (shouldNotInteract) {
1085
- blockedEventHandlers.forEach((eventHandler) => result[eventHandler] = void 0);
1086
- }
1087
- return result;
1088
- }, [shouldNotInteract]);
1089
- const spinnerProps = {
1090
- size: "current",
1091
- className: loadingText ? "inline-block" : "absolute",
1092
- ...loadingLabel && { "aria-label": loadingLabel }
1093
- };
1094
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1095
- Component,
1096
- {
1097
- "data-spark-component": "button",
1098
- ...Component === "button" && { type: "button" },
1099
- ref,
1100
- className: buttonStyles({
1101
- className,
1102
- design,
1103
- disabled: shouldNotInteract,
1104
- intent,
1105
- shape,
1106
- size,
1107
- underline
1108
- }),
1109
- disabled: !!disabled,
1110
- "aria-busy": isLoading,
1111
- "aria-live": isLoading ? "assertive" : "off",
1112
- ...others,
1113
- ...disabledEventHandlers,
1114
- children: wrapPolymorphicSlot(
1115
- asChild,
1116
- children,
1117
- (slotted) => isLoading ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1118
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Spinner, { ...spinnerProps }),
1119
- loadingText && loadingText,
1120
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1121
- "div",
1122
- {
1123
- "aria-hidden": true,
1124
- className: (0, import_class_variance_authority5.cx)("gap-md", loadingText ? "hidden" : "inline-flex opacity-0"),
1125
- children: slotted
1126
- }
1127
- )
1128
- ] }) : slotted
1129
- )
1130
- }
1131
- );
1132
- };
1133
- Button.displayName = "Button";
1134
-
1135
- // src/icon-button/IconButton.styles.tsx
1136
- var import_internal_utils9 = require("@spark-ui/internal-utils");
1137
- var import_class_variance_authority6 = require("class-variance-authority");
1138
- var iconButtonStyles = (0, import_class_variance_authority6.cva)(["pl-0 pr-0"], {
1139
- variants: {
1140
- /**
1141
- * Sets the size of the icon.
1142
- */
1143
- size: (0, import_internal_utils9.makeVariants)({
1144
- sm: ["text-body-1"],
1145
- md: ["text-body-1"],
1146
- lg: ["text-display-3"]
1147
- })
1148
- }
1149
- });
1150
-
1151
- // src/icon-button/IconButton.tsx
1152
- var import_jsx_runtime9 = require("react/jsx-runtime");
1153
- var IconButton = ({
1154
- design = "filled",
1155
- disabled = false,
1156
- intent = "main",
1157
- shape = "rounded",
1158
- size = "md",
1159
- className,
1160
- ref,
1161
- ...others
1162
- }) => {
1163
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1164
- Button,
1165
- {
1166
- "data-spark-component": "icon-button",
1167
- ref,
1168
- className: iconButtonStyles({ size, className }),
1169
- design,
1170
- disabled,
1171
- intent,
1172
- shape,
1173
- size,
1174
- ...others
1175
- }
1176
- );
1177
- };
1178
- IconButton.displayName = "IconButton";
1179
-
1180
- // src/pagination/PaginationFirstPageTrigger.tsx
1181
- var import_jsx_runtime10 = require("react/jsx-runtime");
1182
- var FirstPageTrigger = ({
1183
- children,
1184
- className,
1185
- href,
1186
- ref,
1187
- ...props
1188
- }) => {
1189
- const { pagination: pagination2, type } = usePagination();
1190
- const apiProps = pagination2.getFirstPageTriggerProps();
1191
- const shouldDisableLink = type === "link" && apiProps["data-disabled"] === "";
1192
- const localProps = {
1193
- "data-spark-component": "pagination-first-page-trigger",
1194
- intent: "support",
1195
- design: "contrast",
1196
- ...props,
1197
- className,
1198
- ...shouldDisableLink && {
1199
- disabled: true,
1200
- role: "link",
1201
- "aria-disabled": true
1202
- }
1203
- };
1204
- const mergedProps = (0, import_react7.mergeProps)(
1205
- apiProps,
1206
- localProps
1207
- );
1208
- const content = children || /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ArrowDoubleLeft.ArrowDoubleLeft, {}) });
1209
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(IconButton, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("a", { href: shouldDisableLink ? void 0 : href, children: content }) }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(IconButton, { ref, ...mergedProps, children: content }) });
1210
- };
1211
- FirstPageTrigger.displayName = "Pagination.FirstPageTrigger";
1212
-
1213
- // src/pagination/PaginationItem.tsx
1214
- var import_react8 = require("@zag-js/react");
1215
- var import_jsx_runtime11 = require("react/jsx-runtime");
1216
- var Item = ({ children, value, className, href, ref, ...props }) => {
1217
- const { pagination: pagination2 } = usePagination();
1218
- const apiProps = pagination2.getItemProps({ type: "page", value });
1219
- const localProps = {
1220
- "data-spark-component": "pagination-item",
1221
- intent: "support",
1222
- design: apiProps["aria-current"] === "page" ? "filled" : "contrast",
1223
- className,
1224
- ...props
1225
- };
1226
- const mergedProps = (0, import_react8.mergeProps)(apiProps, localProps);
1227
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("a", { href, children: children || value }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { ref, ...mergedProps, children: children || value }) });
1228
- };
1229
- Item.displayName = "Pagination.Item";
1230
-
1231
- // src/pagination/PaginationLastPageTrigger.tsx
1232
- var import_ArrowDoubleRight = require("@spark-ui/icons/ArrowDoubleRight");
1233
- var import_react9 = require("@zag-js/react");
1234
- var import_jsx_runtime12 = require("react/jsx-runtime");
1235
- var LastPageTrigger = ({
1236
- children,
1237
- className,
1238
- href,
1239
- ref,
1240
- ...props
1241
- }) => {
1242
- const { pagination: pagination2, type } = usePagination();
1243
- const apiProps = pagination2.getLastPageTriggerProps();
1244
- const shouldDisableLink = type === "link" && apiProps["data-disabled"] === "";
1245
- const localProps = {
1246
- "data-spark-component": "pagination-last-page-trigger",
1247
- intent: "support",
1248
- design: "contrast",
1249
- ...props,
1250
- className,
1251
- ...shouldDisableLink && {
1252
- disabled: true,
1253
- role: "link",
1254
- "aria-disabled": true
1255
- }
1256
- };
1257
- const mergedProps = (0, import_react9.mergeProps)(
1258
- apiProps,
1259
- localProps
1260
- );
1261
- const content = children || /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_ArrowDoubleRight.ArrowDoubleRight, {}) });
1262
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("a", { href: shouldDisableLink ? void 0 : href, children: content }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { ref, ...mergedProps, children: content }) });
1263
- };
1264
- LastPageTrigger.displayName = "Pagination.LastPageTrigger";
1265
-
1266
- // src/pagination/PaginationNextTrigger.tsx
1267
- var import_ArrowVerticalRight = require("@spark-ui/icons/ArrowVerticalRight");
1268
- var import_react10 = require("@zag-js/react");
1269
- var import_jsx_runtime13 = require("react/jsx-runtime");
1270
- var NextTrigger = ({ children, className, href, ref, ...props }) => {
1271
- const { pagination: pagination2, type } = usePagination();
1272
- const apiProps = pagination2.getNextTriggerProps();
1273
- const shouldDisableLink = type === "link" && apiProps["data-disabled"] === "";
1274
- const localProps = {
1275
- "data-spark-component": "pagination-next-trigger",
1276
- intent: "support",
1277
- design: "contrast",
1278
- ...props,
1279
- className,
1280
- ...shouldDisableLink && {
1281
- disabled: true,
1282
- role: "link",
1283
- "aria-disabled": true
1284
- }
1285
- };
1286
- const mergedProps = (0, import_react10.mergeProps)(
1287
- apiProps,
1288
- localProps
1289
- );
1290
- const content = children || /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ArrowVerticalRight.ArrowVerticalRight, {}) });
1291
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("a", { href: shouldDisableLink ? void 0 : href, children: content }) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { ref, ...mergedProps, children: content }) });
1292
- };
1293
- NextTrigger.displayName = "Pagination.NextTrigger";
1294
-
1295
- // src/pagination/PaginationPages.tsx
1296
- var Pages = ({ children }) => {
1297
- const { pagination: pagination2 } = usePagination();
1298
- return children(pagination2);
1299
- };
1300
- Pages.displayName = "Pagination.Pages";
1301
-
1302
- // src/pagination/PaginationPrevTrigger.tsx
1303
- var import_ArrowVerticalLeft = require("@spark-ui/icons/ArrowVerticalLeft");
1304
- var import_react11 = require("@zag-js/react");
1305
- var import_jsx_runtime14 = require("react/jsx-runtime");
1306
- var PrevTrigger = ({ children, className, href, ref, ...props }) => {
1307
- const { pagination: pagination2, type } = usePagination();
1308
- const apiProps = pagination2.getPrevTriggerProps();
1309
- const shouldDisableLink = type === "link" && apiProps["data-disabled"] === "";
1310
- const localProps = {
1311
- "data-spark-component": "pagination-prev-trigger",
1312
- intent: "support",
1313
- design: "contrast",
1314
- ...props,
1315
- className,
1316
- ...shouldDisableLink && {
1317
- disabled: true,
1318
- role: "link",
1319
- "aria-disabled": true
1320
- }
1321
- };
1322
- const mergedProps = (0, import_react11.mergeProps)(
1323
- apiProps,
1324
- localProps
1325
- );
1326
- const content = children || /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ArrowVerticalLeft.ArrowVerticalLeft, {}) });
1327
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconButton, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("a", { href: shouldDisableLink ? void 0 : href, children: content }) }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconButton, { ref, ...mergedProps, children: content }) });
1328
- };
1329
- PrevTrigger.displayName = "Pagination.PrevTrigger";
1330
-
1331
- // src/pagination/index.ts
1332
- var Pagination2 = Object.assign(Pagination, {
1333
- PrevTrigger,
1334
- NextTrigger,
1335
- Pages,
1336
- Item,
1337
- Ellipsis,
1338
- FirstPageTrigger,
1339
- LastPageTrigger
1340
- });
1341
- Pagination2.displayName = "Pagination";
1342
- PrevTrigger.displayName = "Pagination.PrevTrigger";
1343
- NextTrigger.displayName = "Pagination.NextTrigger";
1344
- Pages.displayName = "Pagination.Pages";
1345
- Item.displayName = "Pagination.Item";
1346
- Ellipsis.displayName = "Pagination.Ellipsis";
1347
- FirstPageTrigger.displayName = "Pagination.FirstPageTrigger";
1348
- LastPageTrigger.displayName = "Pagination.LastPageTrigger";
1349
- // Annotate the CommonJS export names for ESM import in node:
1350
- 0 && (module.exports = {
1351
- Pagination
1352
- });
1353
- //# sourceMappingURL=index.js.map
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),h=require("react"),X=require("react-dom"),Ee=require("../index-DnaHaH_0.js"),Se=require("@spark-ui/icons/ArrowDoubleLeft"),W=require("../Icon-Bf0XrmiR.js"),k=require("../IconButton-Bf-EDzpI.js"),se=require("../Button-C3xHNaGl.js"),je=require("@spark-ui/icons/ArrowDoubleRight"),Ne=require("@spark-ui/icons/ArrowVerticalRight"),Re=require("@spark-ui/icons/ArrowVerticalLeft");var G=(e,t=[])=>({parts:(...n)=>{if(Ae(t))return G(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>G(e,[...t,...n]),omit:(...n)=>G(e,t.filter(a=>!n.includes(a))),rename:n=>G(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,a)=>Object.assign(n,{[a]:{selector:[`&[data-scope="${_(e)}"][data-part="${_(a)}"]`,`& [data-scope="${_(e)}"][data-part="${_(a)}"]`].join(", "),attrs:{"data-scope":_(e),"data-part":_(a)}}}),{})}),_=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Ae=e=>e.length===0,pe=e=>typeof e=="object"&&e!==null,z=e=>e?"":void 0,Ie=9,ke=e=>pe(e)&&e.nodeType===Ie,Ce=e=>pe(e)&&e===e.window;function Le(e){if(!e)return!1;const t=e.getRootNode();return fe(t)===e}function we(e){return ke(e)?e:Ce(e)?e.document:e?.ownerDocument??document}function fe(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function _e(e){return e==null?[]:Array.isArray(e)?e:[e]}var ce=e=>e?.constructor.name==="Array",$e=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!J(e[n],t[n]))return!1;return!0},J=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(ce(e)&&ce(t))return $e(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(t??Object.create(null)),a=n.length;for(let r=0;r<a;r++)if(!Reflect.has(e,n[r]))return!1;for(let r=0;r<a;r++){const i=n[r];if(!J(e[i],t[i]))return!1}return!0},Oe=e=>e!=null&&typeof e=="object",K=e=>typeof e=="number"&&!Number.isNaN(e),D=e=>typeof e=="string",q=e=>typeof e=="function",Me=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ze=e=>Object.prototype.toString.call(e),Pe=Function.prototype.toString,Ve=Pe.call(Object),Ge=e=>{if(!Oe(e)||ze(e)!="[object Object]"||De(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Me(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Pe.call(n)==Ve},qe=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Fe=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,De=e=>qe(e)||Fe(e),Be=e=>e(),We=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})};function ye(e){if(!Ge(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(a=>typeof a=="string"),n={};for(const a of t){const r=e[a];r!==void 0&&(n[a]=ye(r))}return n}function ge(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function Ue(e,t){if(e==null)throw new Error(t())}var Ze=(...e)=>e.map(t=>t?.trim?.()).filter(Boolean).join(" "),Ke=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,ue=e=>{const t={};let n;for(;n=Ke.exec(e);)t[n[1]]=n[2];return t},Xe=(e,t)=>{if(D(e)){if(D(t))return`${e};${t}`;e=ue(e)}else D(t)&&(t=ue(t));return Object.assign({},e??{},t??{})};function O(...e){let t={};for(let n of e){if(!n)continue;for(let r in t){if(r.startsWith("on")&&typeof t[r]=="function"&&typeof n[r]=="function"){t[r]=We(n[r],t[r]);continue}if(r==="className"||r==="class"){t[r]=Ze(t[r],n[r]);continue}if(r==="style"){t[r]=Xe(t[r],n[r]);continue}t[r]=n[r]!==void 0?n[r]:t[r]}for(let r in n)t[r]===void 0&&(t[r]=n[r]);const a=Object.getOwnPropertySymbols(n);for(let r of a)t[r]=n[r]}return t}function le(e,t,n){let a=[],r;return i=>{const s=e(i);return(s.length!==a.length||s.some((l,f)=>!J(a[f],l)))&&(a=s,r=t(s,i)),r}}var $=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))($||{}),U="__init__";function Je(e){const t=()=>e.getRootNode?.()??document,n=()=>we(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>fe(t()),isActiveElement:Le,getById:s=>t().getElementById(s)}}function He(e){return new Proxy({},{get(t,n){return n==="style"?a=>e({style:a}).style:e}})}var H=()=>e=>Array.from(new Set(e)),Qe=G("pagination").parts("root","item","ellipsis","firstTrigger","prevTrigger","nextTrigger","lastTrigger"),w=Qe.build(),Ye=e=>e.ids?.root??`pagination:${e.id}`,et=e=>e.ids?.firstTrigger??`pagination:${e.id}:first`,tt=e=>e.ids?.prevTrigger??`pagination:${e.id}:prev`,nt=e=>e.ids?.nextTrigger??`pagination:${e.id}:next`,rt=e=>e.ids?.lastTrigger??`pagination:${e.id}:last`,at=(e,t)=>e.ids?.ellipsis?.(t)??`pagination:${e.id}:ellipsis:${t}`,it=(e,t)=>e.ids?.item?.(t)??`pagination:${e.id}:item:${t}`,A=(e,t)=>{let n=t-e+1;return Array.from({length:n},(a,r)=>r+e)},ot=e=>e.map(t=>K(t)?{type:"page",value:t}:{type:"ellipsis"}),V="ellipsis",st=e=>{const{page:t,totalPages:n,siblingCount:a,boundaryCount:r=1}=e;if(n<=0)return[];if(n===1)return[1];const i=1,s=n,g=Math.max(t-a,i),l=Math.min(t+a,s),f=Math.min(a*2+3+r*2,n);if(n<=f)return A(i,s);const P=f-1-r,c=g>i+r+1&&Math.abs(g-i)>r+1,y=l<s-r-1&&Math.abs(s-l)>r+1;let u=[];if(!c&&y){const m=A(1,P);u.push(...m,V),u.push(...A(s-r+1,s))}else if(c&&!y){u.push(...A(i,i+r-1)),u.push(V);const m=A(s-P+1,s);u.push(...m)}else if(c&&y){u.push(...A(i,i+r-1)),u.push(V);const m=A(g,l);u.push(...m),u.push(V),u.push(...A(s-r+1,s))}else u.push(...A(i,s));for(let m=0;m<u.length;m++)if(u[m]===V){const N=K(u[m-1])?u[m-1]:0;(K(u[m+1])?u[m+1]:n+1)-N===2&&(u[m]=N+1)}return u},ct=e=>ot(st(e));function gt(e,t){const{send:n,scope:a,prop:r,computed:i,context:s}=e,g=i("totalPages"),l=s.get("page"),f=s.get("pageSize"),P=r("translations"),c=r("count"),y=r("getPageUrl"),u=r("type"),m=i("previousPage"),N=i("nextPage"),x=i("pageRange"),E=l===1,L=l===g,F=ct({page:l,totalPages:g,siblingCount:r("siblingCount"),boundaryCount:r("boundaryCount")});return{count:c,page:l,pageSize:f,totalPages:g,pages:F,previousPage:m,nextPage:N,pageRange:x,slice(S){return S.slice(x.start,x.end)},setPageSize(S){n({type:"SET_PAGE_SIZE",size:S})},setPage(S){n({type:"SET_PAGE",page:S})},goToNextPage(){n({type:"NEXT_PAGE"})},goToPrevPage(){n({type:"PREVIOUS_PAGE"})},goToFirstPage(){n({type:"FIRST_PAGE"})},goToLastPage(){n({type:"LAST_PAGE"})},getRootProps(){return t.element({id:Ye(a),...w.root.attrs,dir:r("dir"),"aria-label":P.rootLabel})},getEllipsisProps(S){return t.element({id:at(a,S.index),...w.ellipsis.attrs,dir:r("dir")})},getItemProps(S){const R=S.value,T=R===l;return t.element({id:it(a,R),...w.item.attrs,dir:r("dir"),"data-index":R,"data-selected":z(T),"aria-current":T?"page":void 0,"aria-label":P.itemLabel?.({page:R,totalPages:g}),onClick(){n({type:"SET_PAGE",page:R})},...u==="button"&&{type:"button"},...u==="link"&&y&&{href:y({page:R,pageSize:f})}})},getPrevTriggerProps(){return t.element({id:tt(a),...w.prevTrigger.attrs,dir:r("dir"),"data-disabled":z(E),"aria-label":P.prevTriggerLabel,onClick(){n({type:"PREVIOUS_PAGE"})},...u==="button"&&{disabled:E,type:"button"},...u==="link"&&y&&m&&{href:y({page:m,pageSize:f})}})},getFirstTriggerProps(){return t.element({id:et(a),...w.firstTrigger.attrs,dir:r("dir"),"data-disabled":z(E),"aria-label":P.firstTriggerLabel,onClick(){n({type:"FIRST_PAGE"})},...u==="button"&&{disabled:E,type:"button"},...u==="link"&&y&&{href:y({page:1,pageSize:f})}})},getNextTriggerProps(){return t.element({id:nt(a),...w.nextTrigger.attrs,dir:r("dir"),"data-disabled":z(L),"aria-label":P.nextTriggerLabel,onClick(){n({type:"NEXT_PAGE"})},...u==="button"&&{disabled:L,type:"button"},...u==="link"&&y&&N&&{href:y({page:N,pageSize:f})}})},getLastTriggerProps(){return t.element({id:rt(a),...w.lastTrigger.attrs,dir:r("dir"),"data-disabled":z(L),"aria-label":P.lastTriggerLabel,onClick(){n({type:"LAST_PAGE"})},...u==="button"&&{disabled:L,type:"button"},...u==="link"&&y&&{href:y({page:g,pageSize:f})}})}}}var ut={props({props:e}){return{defaultPageSize:10,siblingCount:1,boundaryCount:1,defaultPage:1,type:"button",count:1,...e,translations:{rootLabel:"pagination",firstTriggerLabel:"first page",prevTriggerLabel:"previous page",nextTriggerLabel:"next page",lastTriggerLabel:"last page",itemLabel({page:t,totalPages:n}){return`${n>1&&t===n?"last page, ":""}page ${t}`},...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({value:e("page"),defaultValue:e("defaultPage"),onChange(a){const r=n();e("onPageChange")?.({page:a,pageSize:r.get("pageSize")})}})),pageSize:t(()=>({value:e("pageSize"),defaultValue:e("defaultPageSize"),onChange(a){e("onPageSizeChange")?.({pageSize:a})}}))}},watch({track:e,context:t,action:n}){e([()=>t.get("pageSize")],()=>{n(["setPageIfNeeded"])})},computed:{totalPages:le(({prop:e,context:t})=>[t.get("pageSize"),e("count")],([e,t])=>Math.ceil(t/e)),pageRange:le(({context:e,prop:t})=>[e.get("page"),e.get("pageSize"),t("count")],([e,t,n])=>{const a=(e-1)*t;return{start:a,end:Math.min(a+t,n)}}),previousPage:({context:e})=>e.get("page")===1?null:e.get("page")-1,nextPage:({context:e,computed:t})=>e.get("page")===t("totalPages")?null:e.get("page")+1,isValidPage:({context:e,computed:t})=>e.get("page")>=1&&e.get("page")<=t("totalPages")},on:{SET_PAGE:{guard:"isValidPage",actions:["setPage"]},SET_PAGE_SIZE:{actions:["setPageSize"]},FIRST_PAGE:{actions:["goToFirstPage"]},LAST_PAGE:{actions:["goToLastPage"]},PREVIOUS_PAGE:{guard:"canGoToPrevPage",actions:["goToPrevPage"]},NEXT_PAGE:{guard:"canGoToNextPage",actions:["goToNextPage"]}},states:{idle:{}},implementations:{guards:{isValidPage:({event:e,computed:t})=>e.page>=1&&e.page<=t("totalPages"),isValidCount:({context:e,event:t})=>e.get("page")>t.count,canGoToNextPage:({context:e,computed:t})=>e.get("page")<t("totalPages"),canGoToPrevPage:({context:e})=>e.get("page")>1},actions:{setPage({context:e,event:t,computed:n}){const a=Z(t.page,n("totalPages"));e.set("page",a)},setPageSize({context:e,event:t}){e.set("pageSize",t.size)},goToFirstPage({context:e}){e.set("page",1)},goToLastPage({context:e,computed:t}){e.set("page",t("totalPages"))},goToPrevPage({context:e,computed:t}){e.set("page",n=>Z(n-1,t("totalPages")))},goToNextPage({context:e,computed:t}){e.set("page",n=>Z(n+1,t("totalPages")))},setPageIfNeeded({context:e,computed:t}){t("isValidPage")||e.set("page",1)}}}},Z=(e,t)=>Math.min(Math.max(e,1),t);H()(["boundaryCount","count","dir","getRootNode","id","ids","onPageChange","onPageSizeChange","page","defaultPage","pageSize","defaultPageSize","siblingCount","translations","type","getPageUrl"]);H()(["value","type"]);H()(["index"]);var he=typeof globalThis.document<"u"?h.useLayoutEffect:h.useEffect;function B(e){const t=e().value??e().defaultValue,n=e().isEqual??Object.is,[a]=h.useState(t),[r,i]=h.useState(a),s=e().value!==void 0,g=h.useRef(r);g.current=s?e().value:r;const l=h.useRef(g.current);he(()=>{l.current=g.current},[r,e().value]);const f=c=>{const y=l.current,u=q(c)?c(y):c;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:u,prev:y}),s||i(u),n(u,y)||e().onChange?.(u,y)};function P(){return s?e().value:r}return{initial:a,ref:g,get:P,set(c){(e().sync?X.flushSync:Be)(()=>f(c))},invoke(c,y){e().onChange?.(c,y)},hash(c){return e().hash?.(c)??String(c)}}}B.cleanup=e=>{h.useEffect(()=>e,[])};B.ref=e=>{const t=h.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function lt(e){const t=h.useRef(e);return{get(n){return t.current[n]},set(n,a){t.current[n]=a}}}var dt=(e,t)=>{const n=h.useRef(!1),a=h.useRef(!1);h.useEffect(()=>{if(n.current&&a.current)return t();a.current=!0},[...(e??[]).map(r=>typeof r=="function"?r():r)]),h.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function pt(e,t={}){const n=h.useMemo(()=>{const{id:o,ids:d,getRootNode:b}=t;return Je({id:o,ids:d,getRootNode:b})},[t]),a=(...o)=>{e.debug&&console.log(...o)},r=e.props?.({props:ye(t),scope:n})??t,i=ft(r),s=e.context?.({prop:i,bindable:B,scope:n,flush:de,getContext(){return l},getComputed(){return R},getRefs(){return N},getEvent(){return u()}}),g=me(s),l={get(o){return g.current?.[o].ref.current},set(o,d){g.current?.[o].set(d)},initial(o){return g.current?.[o].initial},hash(o){const d=g.current?.[o].get();return g.current?.[o].hash(d)}},f=h.useRef(new Map),P=h.useRef(null),c=h.useRef(null),y=h.useRef({type:""}),u=()=>({...y.current,current(){return y.current},previous(){return c.current}}),m=()=>({...T,matches(...o){return o.includes(T.ref.current)},hasTag(o){return!!e.states[T.ref.current]?.tags?.includes(o)}}),N=lt(e.refs?.({prop:i,context:l})??{}),x=()=>({state:m(),context:l,event:u(),prop:i,send:oe,action:E,guard:L,track:dt,refs:N,computed:R,flush:de,scope:n,choose:S}),E=o=>{const d=q(o)?o(x()):o;if(!d)return;const b=d.map(v=>{const j=e.implementations?.actions?.[v];return j||ge(`[zag-js] No implementation found for action "${JSON.stringify(v)}"`),j});for(const v of b)v?.(x())},L=o=>q(o)?o(x()):e.implementations?.guards?.[o](x()),F=o=>{const d=q(o)?o(x()):o;if(!d)return;const b=d.map(j=>{const I=e.implementations?.effects?.[j];return I||ge(`[zag-js] No implementation found for effect "${JSON.stringify(j)}"`),I}),v=[];for(const j of b){const I=j?.(x());I&&v.push(I)}return()=>v.forEach(j=>j?.())},S=o=>_e(o).find(d=>{let b=!d.guard;return D(d.guard)?b=!!L(d.guard):q(d.guard)&&(b=d.guard(x())),b}),R=o=>{Ue(e.computed,()=>"[zag-js] No computed object found on machine");const d=e.computed[o];return d({context:l,event:u(),prop:i,refs:N,scope:n,computed:R})},T=B(()=>({defaultValue:e.initialState({prop:i}),onChange(o,d){d&&(f.current.get(d)?.(),f.current.delete(d)),d&&E(e.states[d]?.exit),E(P.current?.actions);const b=F(e.states[o]?.effects);if(b&&f.current.set(o,b),d===U){E(e.entry);const v=F(e.effects);v&&f.current.set(U,v)}E(e.states[o]?.entry)}})),ie=h.useRef(void 0),M=h.useRef($.NotStarted);he(()=>{queueMicrotask(()=>{const b=M.current===$.Started;M.current=$.Started,a(b?"rehydrating...":"initializing...");const v=ie.current??T.initial;T.invoke(v,b?T.get():U)});const o=f.current,d=T.ref.current;return()=>{a("unmounting..."),ie.current=d,M.current=$.Stopped,o.forEach(b=>b?.()),f.current=new Map,P.current=null,queueMicrotask(()=>{E(e.exit)})}},[]);const xe=()=>"ref"in T?T.ref.current:T.get(),oe=o=>{queueMicrotask(()=>{if(M.current!==$.Started)return;c.current=y.current,y.current=o;let d=xe();const b=e.states[d].on?.[o.type]??e.on?.[o.type],v=S(b);if(!v)return;P.current=v;const j=v.target??d;a("transition",o.type,v.target||d,`(${v.actions})`);const I=j!==d;I?X.flushSync(()=>T.set(j)):v.reenter&&!I?T.invoke(d,d):E(v.actions??[])})};return e.watch?.(x()),{state:m(),send:oe,context:l,prop:i,scope:n,refs:N,computed:R,event:u(),getStatus:()=>M.current}}function me(e){const t=h.useRef(e);return t.current=e,t}function ft(e){const t=me(e);return function(a){return t.current[a]}}function de(e){queueMicrotask(()=>{X.flushSync(()=>e())})}var Pt=He(e=>e);function yt(e,t,n){const a=(n-1)/2;let r=Math.max(0,t-a),i=Math.min(e.length,t+a+1);return i-r<n&&(r=Math.max(0,Math.min(r,e.length-n)),i=Math.min(e.length,r+n)),e.slice(r,i)}const ve=h.createContext(null),ht=({children:e,count:t,visiblePageItems:n=7,pageSize:a,page:r,onPageChange:i,noEllipsis:s,type:g="link"})=>{const l=s?1/0:Math.max(0,Math.floor((n-5)/2)),f=h.useId(),P=pt(ut,{id:f,count:t,siblingCount:l,pageSize:a,page:r,onPageChange:i,type:g}),c=gt(P,Pt),y=s?yt(c.pages,c.page-1,n):c.pages;return p.jsx(ve.Provider,{value:{type:g,pagination:{...c,pages:y,getFirstPageTriggerProps:()=>({...c.getPrevTriggerProps(),id:`${c.getRootProps().id}:first`,"data-part":"first-page-trigger",onClick:c.goToFirstPage}),getLastPageTriggerProps:()=>({...c.getNextTriggerProps(),id:`${c.getRootProps().id}:last`,"data-part":"last-page-trigger",onClick:c.goToLastPage})}},children:e})},C=()=>{const e=h.useContext(ve);if(!e)throw Error("usePagination must be used within a Pagination provider");return e},be=({children:e,visiblePageItems:t=5,type:n="link",noEllipsis:a=!1,className:r,...i})=>p.jsx(ht,{visiblePageItems:t,noEllipsis:a,type:n,...i,children:p.jsx(mt,{className:r,children:e})}),mt=({children:e,className:t})=>{const{pagination:n}=C(),a=n.getRootProps();return p.jsx("nav",{"data-spark-component":"pagination",...a,className:t,children:p.jsx("ul",{className:"gap-md flex flex-wrap",children:e})})};be.displayName="Pagination";const Q=({children:e,index:t,className:n,ref:a,...r})=>{const{pagination:i}=C(),s=i.getEllipsisProps({index:t}),g={className:Ee.cx("flex size-sz-44 items-center justify-center",n),...r},l=O(s,g);return p.jsx("li",{children:p.jsx("span",{"data-spark-component":"pagination-ellipsis",ref:a,...l,children:e||"…"})})};Q.displayName="Pagination.Ellipsis";const Y=({children:e,className:t,href:n,ref:a,...r})=>{const{pagination:i,type:s}=C(),g=i.getFirstPageTriggerProps(),l=s==="link"&&g["data-disabled"]==="",f={"data-spark-component":"pagination-first-page-trigger",intent:"support",design:"contrast",...r,className:t,...l&&{disabled:!0,role:"link","aria-disabled":!0}},P=O(g,f),c=e||p.jsx(W.Icon,{children:p.jsx(Se.ArrowDoubleLeft,{})});return p.jsx("li",{children:n?p.jsx(k.IconButton,{ref:a,...P,asChild:!0,children:p.jsx("a",{href:l?void 0:n,children:c})}):p.jsx(k.IconButton,{ref:a,...P,children:c})})};Y.displayName="Pagination.FirstPageTrigger";const ee=({children:e,value:t,className:n,href:a,ref:r,...i})=>{const{pagination:s}=C(),g=s.getItemProps({type:"page",value:t}),l={"data-spark-component":"pagination-item",intent:"support",design:g["aria-current"]==="page"?"filled":"contrast",className:n,...i},f=O(g,l);return p.jsx("li",{children:a?p.jsx(se.Button,{ref:r,...f,asChild:!0,children:p.jsx("a",{href:a,children:e||t})}):p.jsx(se.Button,{ref:r,...f,children:e||t})})};ee.displayName="Pagination.Item";const te=({children:e,className:t,href:n,ref:a,...r})=>{const{pagination:i,type:s}=C(),g=i.getLastPageTriggerProps(),l=s==="link"&&g["data-disabled"]==="",f={"data-spark-component":"pagination-last-page-trigger",intent:"support",design:"contrast",...r,className:t,...l&&{disabled:!0,role:"link","aria-disabled":!0}},P=O(g,f),c=e||p.jsx(W.Icon,{children:p.jsx(je.ArrowDoubleRight,{})});return p.jsx("li",{children:n?p.jsx(k.IconButton,{ref:a,...P,asChild:!0,children:p.jsx("a",{href:l?void 0:n,children:c})}):p.jsx(k.IconButton,{ref:a,...P,children:c})})};te.displayName="Pagination.LastPageTrigger";const ne=({children:e,className:t,href:n,ref:a,...r})=>{const{pagination:i,type:s}=C(),g=i.getNextTriggerProps(),l=s==="link"&&g["data-disabled"]==="",f={"data-spark-component":"pagination-next-trigger",intent:"support",design:"contrast",...r,className:t,...l&&{disabled:!0,role:"link","aria-disabled":!0}},P=O(g,f),c=e||p.jsx(W.Icon,{children:p.jsx(Ne.ArrowVerticalRight,{})});return p.jsx("li",{children:n?p.jsx(k.IconButton,{ref:a,...P,asChild:!0,children:p.jsx("a",{href:l?void 0:n,children:c})}):p.jsx(k.IconButton,{ref:a,...P,children:c})})};ne.displayName="Pagination.NextTrigger";const re=({children:e})=>{const{pagination:t}=C();return e(t)};re.displayName="Pagination.Pages";const ae=({children:e,className:t,href:n,ref:a,...r})=>{const{pagination:i,type:s}=C(),g=i.getPrevTriggerProps(),l=s==="link"&&g["data-disabled"]==="",f={"data-spark-component":"pagination-prev-trigger",intent:"support",design:"contrast",...r,className:t,...l&&{disabled:!0,role:"link","aria-disabled":!0}},P=O(g,f),c=e||p.jsx(W.Icon,{children:p.jsx(Re.ArrowVerticalLeft,{})});return p.jsx("li",{children:n?p.jsx(k.IconButton,{ref:a,...P,asChild:!0,children:p.jsx("a",{href:l?void 0:n,children:c})}):p.jsx(k.IconButton,{ref:a,...P,children:c})})};ae.displayName="Pagination.PrevTrigger";const Te=Object.assign(be,{PrevTrigger:ae,NextTrigger:ne,Pages:re,Item:ee,Ellipsis:Q,FirstPageTrigger:Y,LastPageTrigger:te});Te.displayName="Pagination";ae.displayName="Pagination.PrevTrigger";ne.displayName="Pagination.NextTrigger";re.displayName="Pagination.Pages";ee.displayName="Pagination.Item";Q.displayName="Pagination.Ellipsis";Y.displayName="Pagination.FirstPageTrigger";te.displayName="Pagination.LastPageTrigger";exports.Pagination=Te;
2
+ //# sourceMappingURL=index.js.map