@spark-ui/components 17.2.2 → 17.2.3-beta.1

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 (528) hide show
  1. package/dist/carousel/index.js.map +1 -1
  2. package/dist/carousel/index.mjs.map +1 -1
  3. package/dist/checkbox/index.js.map +1 -1
  4. package/dist/checkbox/index.mjs.map +1 -1
  5. package/dist/src/accordion/Accordion.d.ts +27 -0
  6. package/dist/src/accordion/AccordionItem.d.ts +12 -0
  7. package/dist/src/accordion/AccordionItemContent.d.ts +12 -0
  8. package/dist/src/accordion/AccordionItemHeader.d.ts +9 -0
  9. package/dist/src/accordion/AccordionItemTrigger.d.ts +12 -0
  10. package/dist/src/accordion/index.d.mts +15 -0
  11. package/dist/src/accordion/index.d.ts +15 -0
  12. package/dist/src/accordion/useRenderSlot.d.ts +3 -0
  13. package/dist/src/alert-dialog/AlertDialog.d.ts +29 -0
  14. package/dist/src/alert-dialog/AlertDialogAction.d.ts +13 -0
  15. package/dist/src/alert-dialog/AlertDialogBody.d.ts +12 -0
  16. package/dist/src/alert-dialog/AlertDialogCancel.d.ts +13 -0
  17. package/dist/src/alert-dialog/AlertDialogContent.d.ts +9 -0
  18. package/dist/src/alert-dialog/AlertDialogContext.d.ts +12 -0
  19. package/dist/src/alert-dialog/AlertDialogDescription.d.ts +9 -0
  20. package/dist/src/alert-dialog/AlertDialogFooter.d.ts +10 -0
  21. package/dist/src/alert-dialog/AlertDialogHeader.d.ts +10 -0
  22. package/dist/src/alert-dialog/AlertDialogOverlay.d.ts +9 -0
  23. package/dist/src/alert-dialog/AlertDialogPortal.d.ts +7 -0
  24. package/dist/src/alert-dialog/AlertDialogTitle.d.ts +9 -0
  25. package/dist/src/alert-dialog/AlertDialogTrigger.d.ts +13 -0
  26. package/dist/src/alert-dialog/index.d.mts +38 -0
  27. package/dist/src/alert-dialog/index.d.ts +38 -0
  28. package/dist/src/alert-dialog/useRenderSlot.d.ts +3 -0
  29. package/dist/src/avatar/Avatar.d.ts +3 -0
  30. package/dist/src/avatar/AvatarAction.d.ts +9 -0
  31. package/dist/src/avatar/AvatarImage.d.ts +7 -0
  32. package/dist/src/avatar/AvatarOnlineBadge.d.ts +9 -0
  33. package/dist/src/avatar/AvatarPlaceholder.d.ts +8 -0
  34. package/dist/src/avatar/AvatarUser.d.ts +7 -0
  35. package/dist/src/avatar/context.d.ts +5 -0
  36. package/dist/src/avatar/index.d.mts +15 -0
  37. package/dist/src/avatar/index.d.ts +15 -0
  38. package/dist/src/avatar/types.d.ts +24 -0
  39. package/dist/src/badge/Badge.d.ts +9 -0
  40. package/dist/src/badge/BadgeItem.d.ts +31 -0
  41. package/dist/src/badge/BadgeItem.styles.d.ts +7 -0
  42. package/dist/src/badge/index.d.mts +1 -0
  43. package/dist/src/badge/index.d.ts +1 -0
  44. package/dist/src/breadcrumb/Breadcrumb.d.ts +10 -0
  45. package/dist/src/breadcrumb/Breadcrumb.styles.d.ts +0 -0
  46. package/dist/src/breadcrumb/BreadcrumbCurrentPage.d.ts +11 -0
  47. package/dist/src/breadcrumb/BreadcrumbItem.d.ts +9 -0
  48. package/dist/src/breadcrumb/BreadcrumbLink.d.ts +12 -0
  49. package/dist/src/breadcrumb/BreadcrumbSeparator.d.ts +10 -0
  50. package/dist/src/breadcrumb/index.d.mts +12 -0
  51. package/dist/src/breadcrumb/index.d.ts +12 -0
  52. package/dist/src/button/Button.d.ts +26 -0
  53. package/dist/src/button/Button.styles.d.ts +10 -0
  54. package/dist/src/button/index.d.mts +1 -0
  55. package/dist/src/button/index.d.ts +1 -0
  56. package/dist/src/button/variants/contrast.d.ts +41 -0
  57. package/dist/src/button/variants/filled.d.ts +41 -0
  58. package/dist/src/button/variants/ghost.d.ts +41 -0
  59. package/dist/src/button/variants/index.d.mts +5 -0
  60. package/dist/src/button/variants/index.d.ts +5 -0
  61. package/dist/src/button/variants/outlined.d.ts +41 -0
  62. package/dist/src/button/variants/tinted.d.ts +41 -0
  63. package/dist/src/card/Backdrop.d.ts +14 -0
  64. package/dist/src/card/Card.d.ts +16 -0
  65. package/dist/src/card/Card.styles.d.ts +7 -0
  66. package/dist/src/card/Content.d.ts +15 -0
  67. package/dist/src/card/Content.styles.d.ts +8 -0
  68. package/dist/src/card/context.d.ts +11 -0
  69. package/dist/src/card/index.d.mts +8 -0
  70. package/dist/src/card/index.d.ts +8 -0
  71. package/dist/src/card/utils.d.ts +3 -0
  72. package/dist/src/carousel/Carousel.d.ts +12 -0
  73. package/dist/src/carousel/CarouselControls.d.ts +9 -0
  74. package/dist/src/carousel/CarouselNextButton.d.ts +5 -0
  75. package/dist/src/carousel/CarouselPageIndicator.d.ts +14 -0
  76. package/dist/src/carousel/CarouselPagePicker.d.ts +14 -0
  77. package/dist/src/carousel/CarouselPrevButton.d.ts +5 -0
  78. package/dist/src/carousel/CarouselSlide.d.ts +12 -0
  79. package/dist/src/carousel/CarouselSlides.d.ts +10 -0
  80. package/dist/src/carousel/CarouselViewport.d.ts +9 -0
  81. package/dist/src/carousel/index.d.mts +19 -0
  82. package/dist/src/carousel/index.d.ts +19 -0
  83. package/dist/src/carousel/types.d.ts +165 -0
  84. package/dist/src/carousel/useCarousel.d.ts +2 -0
  85. package/dist/src/carousel/useCarouselVisibility.d.ts +13 -0
  86. package/dist/src/carousel/useEvent.d.ts +7 -0
  87. package/dist/src/carousel/useIsMounted.d.ts +1 -0
  88. package/dist/src/carousel/useIsVisible.d.ts +6 -0
  89. package/dist/src/carousel/useResizeObserver.d.ts +2 -0
  90. package/dist/src/carousel/useScrollEnd.d.ts +3 -0
  91. package/dist/src/carousel/useSnapPoints.d.ts +10 -0
  92. package/dist/src/carousel/utils.d.ts +24 -0
  93. package/dist/src/checkbox/Checkbox.d.ts +10 -0
  94. package/dist/src/checkbox/CheckboxGroup.d.ts +18 -0
  95. package/dist/src/checkbox/CheckboxGroup.styles.d.ts +5 -0
  96. package/dist/src/checkbox/CheckboxGroupContext.d.ts +41 -0
  97. package/dist/src/checkbox/CheckboxIndicator.d.ts +9 -0
  98. package/dist/src/checkbox/CheckboxInput.d.ts +47 -0
  99. package/dist/src/checkbox/CheckboxInput.styles.d.ts +5 -0
  100. package/dist/src/checkbox/CheckboxLabel.d.ts +12 -0
  101. package/dist/src/checkbox/CheckboxLabel.styles.d.ts +5 -0
  102. package/dist/src/checkbox/index.d.mts +2 -0
  103. package/dist/src/checkbox/index.d.ts +2 -0
  104. package/dist/src/chip/Chip.d.ts +34 -0
  105. package/dist/src/chip/Chip.styles.d.ts +8 -0
  106. package/dist/src/chip/ChipClearButton.d.ts +10 -0
  107. package/dist/src/chip/ChipClearButton.styles.d.ts +10 -0
  108. package/dist/src/chip/ChipContent.d.ts +8 -0
  109. package/dist/src/chip/ChipIcon.d.ts +8 -0
  110. package/dist/src/chip/ChipLeadingIcon.d.ts +9 -0
  111. package/dist/src/chip/ChipTrailingIcon.d.ts +9 -0
  112. package/dist/src/chip/index.d.mts +15 -0
  113. package/dist/src/chip/index.d.ts +15 -0
  114. package/dist/src/chip/useChipContext.d.ts +4 -0
  115. package/dist/src/chip/useChipElement.d.ts +41 -0
  116. package/dist/src/chip/variants/dashed.d.ts +45 -0
  117. package/dist/src/chip/variants/index.d.mts +3 -0
  118. package/dist/src/chip/variants/index.d.ts +3 -0
  119. package/dist/src/chip/variants/outlined.d.ts +45 -0
  120. package/dist/src/chip/variants/tinted.d.ts +45 -0
  121. package/dist/src/circular-meter/CircularMeter.d.ts +34 -0
  122. package/dist/src/circular-meter/CircularMeter.styles.d.ts +5 -0
  123. package/dist/src/circular-meter/CircularMeterContent.d.ts +6 -0
  124. package/dist/src/circular-meter/CircularMeterContext.d.ts +36 -0
  125. package/dist/src/circular-meter/CircularMeterLabel.d.ts +7 -0
  126. package/dist/src/circular-meter/CircularMeterTrack.d.ts +8 -0
  127. package/dist/src/circular-meter/CircularMeterValue.d.ts +7 -0
  128. package/dist/src/circular-meter/index.d.mts +16 -0
  129. package/dist/src/circular-meter/index.d.ts +16 -0
  130. package/dist/src/circular-meter/useIntersectionAnimation.d.ts +26 -0
  131. package/dist/src/collapsible/Content.d.ts +12 -0
  132. package/dist/src/collapsible/Root.d.ts +12 -0
  133. package/dist/src/collapsible/Trigger.d.ts +11 -0
  134. package/dist/src/collapsible/index.d.mts +7 -0
  135. package/dist/src/collapsible/index.d.ts +7 -0
  136. package/dist/src/collapsible/useRenderSlot.d.ts +3 -0
  137. package/dist/src/combobox/Combobox.d.ts +6 -0
  138. package/dist/src/combobox/ComboboxClearButton.d.ts +9 -0
  139. package/dist/src/combobox/ComboboxContext.d.ts +108 -0
  140. package/dist/src/combobox/ComboboxDisclosure.d.ts +13 -0
  141. package/dist/src/combobox/ComboboxEmpty.d.ts +11 -0
  142. package/dist/src/combobox/ComboboxGroup.d.ts +11 -0
  143. package/dist/src/combobox/ComboboxInput.d.ts +15 -0
  144. package/dist/src/combobox/ComboboxItem.d.ts +12 -0
  145. package/dist/src/combobox/ComboboxItemContext.d.ts +17 -0
  146. package/dist/src/combobox/ComboboxItemIndicator.d.ts +11 -0
  147. package/dist/src/combobox/ComboboxItemText.d.ts +10 -0
  148. package/dist/src/combobox/ComboboxItems.d.ts +11 -0
  149. package/dist/src/combobox/ComboboxItemsGroupContext.d.ts +8 -0
  150. package/dist/src/combobox/ComboboxLabel.d.ts +11 -0
  151. package/dist/src/combobox/ComboboxLeadingIcon.d.ts +7 -0
  152. package/dist/src/combobox/ComboboxPopover.d.ts +10 -0
  153. package/dist/src/combobox/ComboboxPortal.d.ts +2 -0
  154. package/dist/src/combobox/ComboboxSelectedItems.d.ts +4 -0
  155. package/dist/src/combobox/ComboboxTrigger.d.ts +11 -0
  156. package/dist/src/combobox/ComboboxTrigger.styles.d.ts +6 -0
  157. package/dist/src/combobox/index.d.mts +35 -0
  158. package/dist/src/combobox/index.d.ts +35 -0
  159. package/dist/src/combobox/tests/test-utils.d.ts +8 -0
  160. package/dist/src/combobox/types.d.ts +8 -0
  161. package/dist/src/combobox/useCombobox/multipleSelectionReducer.d.ts +13 -0
  162. package/dist/src/combobox/useCombobox/singleSelectionReducer.d.ts +8 -0
  163. package/dist/src/combobox/utils/index.d.mts +14 -0
  164. package/dist/src/combobox/utils/index.d.ts +14 -0
  165. package/dist/src/combobox/utils/useWidthIncreaseCallback.d.ts +2 -0
  166. package/dist/src/dialog/Dialog.d.ts +33 -0
  167. package/dist/src/dialog/DialogBody.d.ts +12 -0
  168. package/dist/src/dialog/DialogClose.d.ts +10 -0
  169. package/dist/src/dialog/DialogCloseButton.d.ts +9 -0
  170. package/dist/src/dialog/DialogContent.d.ts +14 -0
  171. package/dist/src/dialog/DialogContent.styles.d.ts +6 -0
  172. package/dist/src/dialog/DialogContext.d.ts +11 -0
  173. package/dist/src/dialog/DialogDescription.d.ts +9 -0
  174. package/dist/src/dialog/DialogFooter.d.ts +10 -0
  175. package/dist/src/dialog/DialogHeader.d.ts +10 -0
  176. package/dist/src/dialog/DialogOverlay.d.ts +9 -0
  177. package/dist/src/dialog/DialogPortal.d.ts +7 -0
  178. package/dist/src/dialog/DialogTitle.d.ts +9 -0
  179. package/dist/src/dialog/DialogTrigger.d.ts +13 -0
  180. package/dist/src/dialog/index.d.mts +37 -0
  181. package/dist/src/dialog/index.d.ts +37 -0
  182. package/dist/src/divider/Divider.d.ts +30 -0
  183. package/dist/src/divider/Divider.styles.d.ts +9 -0
  184. package/dist/src/divider/DividerContent.d.ts +13 -0
  185. package/dist/src/divider/index.d.mts +6 -0
  186. package/dist/src/divider/index.d.ts +6 -0
  187. package/dist/src/divider/variants/intents.d.ts +17 -0
  188. package/dist/src/drawer/Drawer.d.ts +32 -0
  189. package/dist/src/drawer/DrawerBody.d.ts +11 -0
  190. package/dist/src/drawer/DrawerBody.styles.d.ts +5 -0
  191. package/dist/src/drawer/DrawerClose.d.ts +13 -0
  192. package/dist/src/drawer/DrawerCloseButton.d.ts +7 -0
  193. package/dist/src/drawer/DrawerContent.d.ts +10 -0
  194. package/dist/src/drawer/DrawerContent.styles.d.ts +6 -0
  195. package/dist/src/drawer/DrawerContext.d.ts +9 -0
  196. package/dist/src/drawer/DrawerDescription.d.ts +9 -0
  197. package/dist/src/drawer/DrawerFooter.d.ts +8 -0
  198. package/dist/src/drawer/DrawerHeader.d.ts +10 -0
  199. package/dist/src/drawer/DrawerOverlay.d.ts +9 -0
  200. package/dist/src/drawer/DrawerPortal.d.ts +7 -0
  201. package/dist/src/drawer/DrawerTitle.d.ts +9 -0
  202. package/dist/src/drawer/DrawerTrigger.d.ts +13 -0
  203. package/dist/src/drawer/index.d.mts +37 -0
  204. package/dist/src/drawer/index.d.ts +37 -0
  205. package/dist/src/drawer/useRenderSlot.d.ts +3 -0
  206. package/dist/src/dropdown/Dropdown.d.ts +6 -0
  207. package/dist/src/dropdown/DropdownContext.d.ts +81 -0
  208. package/dist/src/dropdown/DropdownDivider.d.ts +10 -0
  209. package/dist/src/dropdown/DropdownGroup.d.ts +11 -0
  210. package/dist/src/dropdown/DropdownItem.d.ts +12 -0
  211. package/dist/src/dropdown/DropdownItemContext.d.ts +17 -0
  212. package/dist/src/dropdown/DropdownItemIndicator.d.ts +11 -0
  213. package/dist/src/dropdown/DropdownItemText.d.ts +9 -0
  214. package/dist/src/dropdown/DropdownItems.d.ts +21 -0
  215. package/dist/src/dropdown/DropdownItemsGroupContext.d.ts +8 -0
  216. package/dist/src/dropdown/DropdownLabel.d.ts +11 -0
  217. package/dist/src/dropdown/DropdownLeadingIcon.d.ts +7 -0
  218. package/dist/src/dropdown/DropdownPopover.d.ts +6 -0
  219. package/dist/src/dropdown/DropdownPortal.d.ts +2 -0
  220. package/dist/src/dropdown/DropdownTrigger.d.ts +12 -0
  221. package/dist/src/dropdown/DropdownTrigger.styles.d.ts +5 -0
  222. package/dist/src/dropdown/DropdownValue.d.ts +11 -0
  223. package/dist/src/dropdown/index.d.mts +29 -0
  224. package/dist/src/dropdown/index.d.ts +29 -0
  225. package/dist/src/dropdown/types.d.ts +8 -0
  226. package/dist/src/dropdown/useDropdown.d.ts +41 -0
  227. package/dist/src/dropdown/utils.d.ts +13 -0
  228. package/dist/src/file-upload/FileUpload.d.ts +130 -0
  229. package/dist/src/file-upload/FileUploadAcceptedFile.d.ts +25 -0
  230. package/dist/src/file-upload/FileUploadContext.d.ts +17 -0
  231. package/dist/src/file-upload/FileUploadDropzone.d.ts +10 -0
  232. package/dist/src/file-upload/FileUploadItemDeleteTrigger.d.ts +11 -0
  233. package/dist/src/file-upload/FileUploadPreviewImage.d.ts +17 -0
  234. package/dist/src/file-upload/FileUploadRejectedFile.d.ts +24 -0
  235. package/dist/src/file-upload/FileUploadRejectedFileDeleteTrigger.d.ts +12 -0
  236. package/dist/src/file-upload/FileUploadTrigger.d.ts +12 -0
  237. package/dist/src/file-upload/constants.d.ts +29 -0
  238. package/dist/src/file-upload/index.d.mts +22 -0
  239. package/dist/src/file-upload/index.d.ts +22 -0
  240. package/dist/src/file-upload/test-utils.d.ts +9 -0
  241. package/dist/src/file-upload/useFileUploadState.d.ts +88 -0
  242. package/dist/src/file-upload/utils.d.ts +40 -0
  243. package/dist/src/form-field/FormField.d.ts +21 -0
  244. package/dist/src/form-field/FormFieldAlertMessage.d.ts +9 -0
  245. package/dist/src/form-field/FormFieldCharactersCount.d.ts +26 -0
  246. package/dist/src/form-field/FormFieldContext.d.ts +49 -0
  247. package/dist/src/form-field/FormFieldControl.d.ts +12 -0
  248. package/dist/src/form-field/FormFieldErrorMessage.d.ts +9 -0
  249. package/dist/src/form-field/FormFieldHelperMessage.d.ts +9 -0
  250. package/dist/src/form-field/FormFieldLabel.d.ts +13 -0
  251. package/dist/src/form-field/FormFieldMessage.d.ts +8 -0
  252. package/dist/src/form-field/FormFieldProvider.d.ts +9 -0
  253. package/dist/src/form-field/FormFieldRequiredIndicator.d.ts +9 -0
  254. package/dist/src/form-field/FormFieldStateMessage.d.ts +10 -0
  255. package/dist/src/form-field/FormFieldSuccessMessage.d.ts +9 -0
  256. package/dist/src/form-field/index.d.mts +31 -0
  257. package/dist/src/form-field/index.d.ts +31 -0
  258. package/dist/src/icon/Icon.d.ts +17 -0
  259. package/dist/src/icon/Icon.styles.d.ts +6 -0
  260. package/dist/src/icon/index.d.mts +1 -0
  261. package/dist/src/icon/index.d.ts +1 -0
  262. package/dist/src/icon-button/IconButton.d.ts +10 -0
  263. package/dist/src/icon-button/IconButton.styles.d.ts +5 -0
  264. package/dist/src/icon-button/index.d.mts +1 -0
  265. package/dist/src/icon-button/index.d.ts +1 -0
  266. package/dist/src/input/Input.d.ts +14 -0
  267. package/dist/src/input/Input.styles.d.ts +11 -0
  268. package/dist/src/input/InputAddon.d.ts +9 -0
  269. package/dist/src/input/InputAddon.styles.d.ts +9 -0
  270. package/dist/src/input/InputClearButton.d.ts +12 -0
  271. package/dist/src/input/InputGroup.d.ts +17 -0
  272. package/dist/src/input/InputGroup.styles.d.ts +6 -0
  273. package/dist/src/input/InputGroupContext.d.ts +14 -0
  274. package/dist/src/input/InputIcon.d.ts +6 -0
  275. package/dist/src/input/InputLeadingAddon.d.ts +11 -0
  276. package/dist/src/input/InputLeadingIcon.d.ts +7 -0
  277. package/dist/src/input/InputTrailingAddon.d.ts +11 -0
  278. package/dist/src/input/InputTrailingIcon.d.ts +7 -0
  279. package/dist/src/input/index.d.mts +21 -0
  280. package/dist/src/input/index.d.ts +21 -0
  281. package/dist/src/input-otp/InputOTP.d.ts +90 -0
  282. package/dist/src/input-otp/InputOTP.styles.d.ts +10 -0
  283. package/dist/src/input-otp/InputOTPContext.d.ts +17 -0
  284. package/dist/src/input-otp/InputOTPGroup.d.ts +7 -0
  285. package/dist/src/input-otp/InputOTPSeparator.d.ts +7 -0
  286. package/dist/src/input-otp/InputOTPSlot.d.ts +12 -0
  287. package/dist/src/input-otp/index.d.mts +14 -0
  288. package/dist/src/input-otp/index.d.ts +14 -0
  289. package/dist/src/input-otp/useInputOTP.d.ts +48 -0
  290. package/dist/src/kbd/Kbd.d.ts +5 -0
  291. package/dist/src/kbd/index.d.mts +1 -0
  292. package/dist/src/kbd/index.d.ts +1 -0
  293. package/dist/src/label/Label.d.ts +9 -0
  294. package/dist/src/label/LabelRequiredIndicator.d.ts +6 -0
  295. package/dist/src/label/index.d.mts +7 -0
  296. package/dist/src/label/index.d.ts +7 -0
  297. package/dist/src/link-box/LinkBox.d.ts +8 -0
  298. package/dist/src/link-box/LinkBoxLink.d.ts +8 -0
  299. package/dist/src/link-box/LinkBoxRaised.d.ts +9 -0
  300. package/dist/src/link-box/index.d.mts +9 -0
  301. package/dist/src/link-box/index.d.ts +9 -0
  302. package/dist/src/meter/Meter.d.ts +18 -0
  303. package/dist/src/meter/MeterContext.d.ts +12 -0
  304. package/dist/src/meter/MeterLabel.d.ts +7 -0
  305. package/dist/src/meter/MeterTrack.d.ts +7 -0
  306. package/dist/src/meter/MeterTrack.styles.d.ts +8 -0
  307. package/dist/src/meter/MeterValue.d.ts +9 -0
  308. package/dist/src/meter/index.d.mts +13 -0
  309. package/dist/src/meter/index.d.ts +13 -0
  310. package/dist/src/meter/useIntersectionAnimation.d.ts +26 -0
  311. package/dist/src/pagination/Pagination.d.ts +8 -0
  312. package/dist/src/pagination/PaginationContext.d.ts +43 -0
  313. package/dist/src/pagination/PaginationEllipsis.d.ts +9 -0
  314. package/dist/src/pagination/PaginationFirstPageTrigger.d.ts +22 -0
  315. package/dist/src/pagination/PaginationItem.d.ts +31 -0
  316. package/dist/src/pagination/PaginationLastPageTrigger.d.ts +22 -0
  317. package/dist/src/pagination/PaginationNextTrigger.d.ts +22 -0
  318. package/dist/src/pagination/PaginationPages.d.ts +16 -0
  319. package/dist/src/pagination/PaginationPrevTrigger.d.ts +22 -0
  320. package/dist/src/pagination/index.d.mts +18 -0
  321. package/dist/src/pagination/index.d.ts +18 -0
  322. package/dist/src/pagination/utils.d.ts +1 -0
  323. package/dist/src/popover/Popover.d.ts +9 -0
  324. package/dist/src/popover/PopoverAnchor.d.ts +9 -0
  325. package/dist/src/popover/PopoverArrow.d.ts +9 -0
  326. package/dist/src/popover/PopoverCloseButton.d.ts +10 -0
  327. package/dist/src/popover/PopoverContent.d.ts +10 -0
  328. package/dist/src/popover/PopoverContent.styles.d.ts +9 -0
  329. package/dist/src/popover/PopoverContext.d.ts +15 -0
  330. package/dist/src/popover/PopoverHeader.d.ts +10 -0
  331. package/dist/src/popover/PopoverPortal.d.ts +7 -0
  332. package/dist/src/popover/PopoverTrigger.d.ts +9 -0
  333. package/dist/src/popover/index.d.mts +17 -0
  334. package/dist/src/popover/index.d.ts +17 -0
  335. package/dist/src/portal/Portal.d.ts +10 -0
  336. package/dist/src/portal/index.d.mts +1 -0
  337. package/dist/src/portal/index.d.ts +1 -0
  338. package/dist/src/progress/Progress.d.ts +24 -0
  339. package/dist/src/progress/ProgressContext.d.ts +13 -0
  340. package/dist/src/progress/ProgressIndicator.d.ts +13 -0
  341. package/dist/src/progress/ProgressLabel.d.ts +7 -0
  342. package/dist/src/progress/ProgressTrack.d.ts +7 -0
  343. package/dist/src/progress/ProgressValue.d.ts +7 -0
  344. package/dist/src/progress/index.d.mts +13 -0
  345. package/dist/src/progress/index.d.ts +13 -0
  346. package/dist/src/progress-tracker/ProgressTracker.d.ts +27 -0
  347. package/dist/src/progress-tracker/ProgressTracker.styles.d.ts +1 -0
  348. package/dist/src/progress-tracker/ProgressTrackerContext.d.ts +15 -0
  349. package/dist/src/progress-tracker/ProgressTrackerStep.d.ts +12 -0
  350. package/dist/src/progress-tracker/ProgressTrackerStep.styles.d.ts +10 -0
  351. package/dist/src/progress-tracker/ProgressTrackerStepIndicator.d.ts +15 -0
  352. package/dist/src/progress-tracker/ProgressTrackerStepIndicator.styles.d.ts +7 -0
  353. package/dist/src/progress-tracker/ProgressTrackerStepLabel.d.ts +9 -0
  354. package/dist/src/progress-tracker/index.d.mts +10 -0
  355. package/dist/src/progress-tracker/index.d.ts +10 -0
  356. package/dist/src/radio-group/Radio.d.ts +9 -0
  357. package/dist/src/radio-group/RadioGroup.d.ts +54 -0
  358. package/dist/src/radio-group/RadioGroup.styles.d.ts +5 -0
  359. package/dist/src/radio-group/RadioGroupContext.d.ts +5 -0
  360. package/dist/src/radio-group/RadioGroupProvider.d.ts +7 -0
  361. package/dist/src/radio-group/RadioIndicator.d.ts +18 -0
  362. package/dist/src/radio-group/RadioIndicator.styles.d.ts +5 -0
  363. package/dist/src/radio-group/RadioInput.d.ts +25 -0
  364. package/dist/src/radio-group/RadioInput.styles.d.ts +5 -0
  365. package/dist/src/radio-group/RadioLabel.d.ts +20 -0
  366. package/dist/src/radio-group/RadioLabel.styles.d.ts +5 -0
  367. package/dist/src/radio-group/index.d.mts +7 -0
  368. package/dist/src/radio-group/index.d.ts +7 -0
  369. package/dist/src/rating/Rating.d.ts +57 -0
  370. package/dist/src/rating/RatingStar.d.ts +19 -0
  371. package/dist/src/rating/RatingStar.styles.d.ts +14 -0
  372. package/dist/src/rating/index.d.mts +1 -0
  373. package/dist/src/rating/index.d.ts +1 -0
  374. package/dist/src/rating/types.d.ts +2 -0
  375. package/dist/src/rating/utils.d.ts +7 -0
  376. package/dist/src/rating-display/RatingDisplay.d.ts +31 -0
  377. package/dist/src/rating-display/RatingDisplayContext.d.ts +12 -0
  378. package/dist/src/rating-display/RatingDisplayCount.d.ts +12 -0
  379. package/dist/src/rating-display/RatingDisplayStar.d.ts +16 -0
  380. package/dist/src/rating-display/RatingDisplayStars.d.ts +22 -0
  381. package/dist/src/rating-display/RatingDisplayValue.d.ts +13 -0
  382. package/dist/src/rating-display/index.d.mts +14 -0
  383. package/dist/src/rating-display/index.d.ts +14 -0
  384. package/dist/src/rating-display/types.d.ts +1 -0
  385. package/dist/src/rating-display/utils.d.ts +10 -0
  386. package/dist/src/scrolling-list/ScrollingList.d.ts +57 -0
  387. package/dist/src/scrolling-list/ScrollingListControls.d.ts +18 -0
  388. package/dist/src/scrolling-list/ScrollingListItem.d.ts +17 -0
  389. package/dist/src/scrolling-list/ScrollingListItems.d.ts +11 -0
  390. package/dist/src/scrolling-list/ScrollingListNextButton.d.ts +5 -0
  391. package/dist/src/scrolling-list/ScrollingListPrevButton.d.ts +5 -0
  392. package/dist/src/scrolling-list/ScrollingListSkipButton.d.ts +9 -0
  393. package/dist/src/scrolling-list/index.d.mts +15 -0
  394. package/dist/src/scrolling-list/index.d.ts +15 -0
  395. package/dist/src/scrolling-list/useFocusWithinScroll.d.ts +3 -0
  396. package/dist/src/segmented-control/SegmentedControl.d.ts +22 -0
  397. package/dist/src/segmented-control/SegmentedControl.styles.d.ts +5 -0
  398. package/dist/src/segmented-control/SegmentedControlContext.d.ts +7 -0
  399. package/dist/src/segmented-control/SegmentedControlIndicator.d.ts +8 -0
  400. package/dist/src/segmented-control/SegmentedControlItem.d.ts +18 -0
  401. package/dist/src/segmented-control/index.d.mts +10 -0
  402. package/dist/src/segmented-control/index.d.ts +10 -0
  403. package/dist/src/segmented-gauge/SegmentedGauge.d.ts +66 -0
  404. package/dist/src/segmented-gauge/SegmentedGaugeContext.d.ts +14 -0
  405. package/dist/src/segmented-gauge/SegmentedGaugeLabel.d.ts +9 -0
  406. package/dist/src/segmented-gauge/SegmentedGaugeSegment.d.ts +12 -0
  407. package/dist/src/segmented-gauge/SegmentedGaugeTrack.d.ts +8 -0
  408. package/dist/src/segmented-gauge/index.d.mts +13 -0
  409. package/dist/src/segmented-gauge/index.d.ts +13 -0
  410. package/dist/src/select/Select.d.ts +6 -0
  411. package/dist/src/select/SelectContext.d.ts +59 -0
  412. package/dist/src/select/SelectGroup.d.ts +11 -0
  413. package/dist/src/select/SelectItem.d.ts +11 -0
  414. package/dist/src/select/SelectItems.d.ts +10 -0
  415. package/dist/src/select/SelectItemsGroupContext.d.ts +9 -0
  416. package/dist/src/select/SelectLabel.d.ts +8 -0
  417. package/dist/src/select/SelectLeadingIcon.d.ts +7 -0
  418. package/dist/src/select/SelectPlaceholder.d.ts +10 -0
  419. package/dist/src/select/SelectTrigger.d.ts +16 -0
  420. package/dist/src/select/SelectTrigger.styles.d.ts +5 -0
  421. package/dist/src/select/SelectValue.d.ts +15 -0
  422. package/dist/src/select/index.d.mts +21 -0
  423. package/dist/src/select/index.d.ts +21 -0
  424. package/dist/src/select/types.d.ts +6 -0
  425. package/dist/src/select/utils.d.ts +4 -0
  426. package/dist/src/skeleton/Skeleton.d.ts +17 -0
  427. package/dist/src/skeleton/Skeleton.styles.d.ts +5 -0
  428. package/dist/src/skeleton/SkeletonItem.d.ts +31 -0
  429. package/dist/src/skeleton/SkeletonItem.styles.d.ts +8 -0
  430. package/dist/src/skeleton/index.d.mts +8 -0
  431. package/dist/src/skeleton/index.d.ts +8 -0
  432. package/dist/src/slider/Slider.d.ts +55 -0
  433. package/dist/src/slider/Slider.styles.d.ts +1 -0
  434. package/dist/src/slider/SliderContext.d.ts +13 -0
  435. package/dist/src/slider/SliderControl.d.ts +7 -0
  436. package/dist/src/slider/SliderIndicator.d.ts +7 -0
  437. package/dist/src/slider/SliderLabel.d.ts +13 -0
  438. package/dist/src/slider/SliderMaxValue.d.ts +6 -0
  439. package/dist/src/slider/SliderMinValue.d.ts +6 -0
  440. package/dist/src/slider/SliderThumb.d.ts +7 -0
  441. package/dist/src/slider/SliderThumb.styles.d.ts +5 -0
  442. package/dist/src/slider/SliderThumbContext.d.ts +5 -0
  443. package/dist/src/slider/SliderTrack.d.ts +7 -0
  444. package/dist/src/slider/SliderTrack.styles.d.ts +6 -0
  445. package/dist/src/slider/SliderValue.d.ts +12 -0
  446. package/dist/src/slider/index.d.mts +20 -0
  447. package/dist/src/slider/index.d.ts +20 -0
  448. package/dist/src/slider/useSliderValueBoundaries.d.ts +12 -0
  449. package/dist/src/slot/Slot.d.ts +12 -0
  450. package/dist/src/slot/index.d.mts +1 -0
  451. package/dist/src/slot/index.d.ts +1 -0
  452. package/dist/src/snackbar/Snackbar.d.ts +29 -0
  453. package/dist/src/snackbar/SnackbarItem.d.ts +49 -0
  454. package/dist/src/snackbar/SnackbarItem.styles.d.ts +10 -0
  455. package/dist/src/snackbar/SnackbarItemAction.d.ts +10 -0
  456. package/dist/src/snackbar/SnackbarItemClose.d.ts +9 -0
  457. package/dist/src/snackbar/SnackbarItemContext.d.ts +8 -0
  458. package/dist/src/snackbar/SnackbarItemIcon.d.ts +7 -0
  459. package/dist/src/snackbar/SnackbarRegion.d.ts +30 -0
  460. package/dist/src/snackbar/SnackbarRegion.styles.d.ts +5 -0
  461. package/dist/src/snackbar/index.d.mts +13 -0
  462. package/dist/src/snackbar/index.d.ts +13 -0
  463. package/dist/src/snackbar/snackbarVariants.d.ts +74 -0
  464. package/dist/src/snackbar/useSnackbarGlobalStore.d.ts +18 -0
  465. package/dist/src/snackbar/useSwipe.d.ts +15 -0
  466. package/dist/src/spinner/Spinner.d.ts +9 -0
  467. package/dist/src/spinner/Spinner.styles.d.ts +7 -0
  468. package/dist/src/spinner/index.d.mts +1 -0
  469. package/dist/src/spinner/index.d.ts +1 -0
  470. package/dist/src/stepper/Stepper.d.ts +9 -0
  471. package/dist/src/stepper/StepperButton.d.ts +14 -0
  472. package/dist/src/stepper/StepperInput.d.ts +7 -0
  473. package/dist/src/stepper/index.d.mts +9 -0
  474. package/dist/src/stepper/index.d.ts +9 -0
  475. package/dist/src/stepper/types.d.ts +46 -0
  476. package/dist/src/stepper/useStepper.d.ts +2 -0
  477. package/dist/src/switch/Switch.d.ts +6 -0
  478. package/dist/src/switch/SwitchInput.d.ts +53 -0
  479. package/dist/src/switch/SwitchInput.styles.d.ts +16 -0
  480. package/dist/src/switch/SwitchLabel.d.ts +17 -0
  481. package/dist/src/switch/SwitchLabel.styles.d.ts +5 -0
  482. package/dist/src/switch/index.d.mts +1 -0
  483. package/dist/src/switch/index.d.ts +1 -0
  484. package/dist/src/tabs/Tabs.d.ts +24 -0
  485. package/dist/src/tabs/TabsContent.d.ts +22 -0
  486. package/dist/src/tabs/TabsContent.styles.d.ts +3 -0
  487. package/dist/src/tabs/TabsContext.d.ts +7 -0
  488. package/dist/src/tabs/TabsList.d.ts +20 -0
  489. package/dist/src/tabs/TabsList.styles.d.ts +3 -0
  490. package/dist/src/tabs/TabsPopover.d.ts +29 -0
  491. package/dist/src/tabs/TabsPopoverAbstraction.d.ts +27 -0
  492. package/dist/src/tabs/TabsRoot.styles.d.ts +1 -0
  493. package/dist/src/tabs/TabsTrigger.d.ts +41 -0
  494. package/dist/src/tabs/TabsTrigger.styles.d.ts +8 -0
  495. package/dist/src/tabs/index.d.mts +13 -0
  496. package/dist/src/tabs/index.d.ts +13 -0
  497. package/dist/src/tabs/useRenderSlot.d.ts +1 -0
  498. package/dist/src/tabs/useResizeObserver.d.ts +8 -0
  499. package/dist/src/tag/Tag.d.ts +17 -0
  500. package/dist/src/tag/Tag.styles.d.ts +8 -0
  501. package/dist/src/tag/index.d.mts +1 -0
  502. package/dist/src/tag/index.d.ts +1 -0
  503. package/dist/src/tag/variants/filled.d.ts +37 -0
  504. package/dist/src/tag/variants/index.d.mts +3 -0
  505. package/dist/src/tag/variants/index.d.ts +3 -0
  506. package/dist/src/tag/variants/outlined.d.ts +33 -0
  507. package/dist/src/tag/variants/tinted.d.ts +33 -0
  508. package/dist/src/text-link/TextLink.d.ts +16 -0
  509. package/dist/src/text-link/index.d.mts +1 -0
  510. package/dist/src/text-link/index.d.ts +1 -0
  511. package/dist/src/textarea/Textarea.d.ts +14 -0
  512. package/dist/src/textarea/TextareaClearButton.d.ts +10 -0
  513. package/dist/src/textarea/TextareaGroup.d.ts +6 -0
  514. package/dist/src/textarea/TextareaLeadingIcon.d.ts +7 -0
  515. package/dist/src/textarea/TextareaTrailingIcon.d.ts +7 -0
  516. package/dist/src/textarea/index.d.mts +14 -0
  517. package/dist/src/textarea/index.d.ts +14 -0
  518. package/dist/src/toast/Toast.d.ts +4 -0
  519. package/dist/src/toast/Toast.styles.d.ts +10 -0
  520. package/dist/src/toast/index.d.mts +20 -0
  521. package/dist/src/toast/index.d.ts +20 -0
  522. package/dist/src/toast/types.d.ts +44 -0
  523. package/dist/src/toast/useRenderSlot.d.ts +3 -0
  524. package/dist/src/toast/useToastManager.d.ts +2 -0
  525. package/dist/src/visually-hidden/VisuallyHidden.d.ts +12 -0
  526. package/dist/src/visually-hidden/index.d.mts +1 -0
  527. package/dist/src/visually-hidden/index.d.ts +1 -0
  528. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/checkbox/CheckboxGroupContext.tsx","../../src/checkbox/CheckboxIndicator.tsx","../../src/checkbox/CheckboxInput.styles.ts","../../src/checkbox/CheckboxInput.tsx","../../src/checkbox/CheckboxLabel.styles.ts","../../src/checkbox/CheckboxLabel.tsx","../../src/checkbox/Checkbox.tsx","../../src/checkbox/CheckboxGroup.styles.ts","../../src/checkbox/CheckboxGroup.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\n\nimport { CheckboxInputStylesProps } from './CheckboxInput.styles'\n\nexport interface CheckboxGroupContextState extends Pick<CheckboxInputStylesProps, 'intent'> {\n /**\n * The id of the checkbox group.\n */\n id: string\n /**\n * The name of the group. Submitted with its owning form as part of a name/value pair.\n */\n name?: string\n /**\n * The value of the checkbox group.\n */\n value?: string[]\n /**\n * A set of ids separated by a space used to describe the input component given by a set of messages.\n */\n description?: string\n /**\n * The validation state of the checkbox group.\n */\n state?: 'error' | 'success' | 'alert'\n /**\n * If true, the checkbox group will be invalid.\n */\n isInvalid?: boolean\n /**\n * If true, the checkbox group will be required.\n */\n isRequired?: boolean\n /**\n * Callback used to update or notify the value of the checkbox group.\n */\n onCheckedChange?: (checked: boolean, changed: string) => void\n /**\n * When true, the label will be placed on the left side of the Checkbox\n */\n reverse?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<Partial<CheckboxGroupContextState>>({})\n\nexport const useCheckboxGroup = () => {\n const context = useContext(CheckboxGroupContext)\n\n return context\n}\n","import { Checkbox } from 'radix-ui'\nimport { Ref } from 'react'\n\nconst CheckboxIndicatorPrimitive = Checkbox.CheckboxIndicator\n\nexport type CheckboxIndicatorProps = Checkbox.CheckboxIndicatorProps & {\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const CheckboxIndicator = (props: CheckboxIndicatorProps) => (\n <CheckboxIndicatorPrimitive className=\"flex size-full items-center justify-center\" {...props} />\n)\n\nCheckboxIndicator.displayName = 'CheckboxIndicator'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nexport const checkboxInputStyles = cva(\n [\n 'size-sz-24 shrink-0 items-center justify-center rounded-sm border-md bg-transparent',\n 'disabled:cursor-not-allowed disabled:opacity-dim-3 disabled:hover:ring-0',\n 'focus-visible:u-outline',\n 'hover:ring-4 hover:cursor-pointer',\n 'u-shadow-border-transition',\n ],\n {\n variants: {\n /**\n * Color scheme of the checkbox.\n */\n intent: makeVariants<\n 'intent',\n ['main', 'support', 'accent', 'success', 'alert', 'error', 'info', 'neutral']\n >({\n main: [\n 'text-on-main',\n 'hover:ring-main-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-main data-[state=indeterminate]:bg-main',\n 'data-[state=checked]:border-main data-[state=checked]:bg-main',\n ],\n support: [\n 'text-on-support',\n 'hover:ring-support-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-support data-[state=indeterminate]:bg-support',\n 'data-[state=checked]:border-support data-[state=checked]:bg-support',\n ],\n accent: [\n 'text-on-accent',\n 'hover:ring-accent-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-accent data-[state=indeterminate]:bg-accent',\n 'data-[state=checked]:border-accent data-[state=checked]:bg-accent',\n ],\n success: [\n 'text-on-success',\n 'hover:ring-success-container',\n 'data-[state=unchecked]:border-success',\n 'data-[state=indeterminate]:border-success data-[state=indeterminate]:bg-success',\n 'data-[state=checked]:border-success data-[state=checked]:bg-success',\n ],\n alert: [\n 'text-on-alert',\n 'hover:ring-alert-container',\n 'data-[state=unchecked]:border-alert',\n 'data-[state=indeterminate]:border-alert data-[state=indeterminate]:bg-alert',\n 'data-[state=checked]:border-alert data-[state=checked]:bg-alert',\n ],\n error: [\n 'text-on-error',\n 'hover:ring-error-container',\n 'data-[state=unchecked]:border-error',\n 'data-[state=indeterminate]:border-error data-[state=indeterminate]:bg-error',\n 'data-[state=checked]:border-error data-[state=checked]:bg-error',\n ],\n info: [\n 'text-on-info',\n 'hover:ring-info-container',\n 'data-[state=unchecked]:border-info',\n 'data-[state=indeterminate]:border-info data-[state=indeterminate]:bg-info',\n 'data-[state=checked]:border-info data-[state=checked]:bg-info',\n ],\n neutral: [\n 'text-on-neutral',\n 'hover:ring-neutral-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-neutral data-[state=indeterminate]:bg-neutral',\n 'data-[state=checked]:border-neutral data-[state=checked]:bg-neutral',\n ],\n }),\n },\n defaultVariants: {\n intent: 'support',\n },\n }\n)\n\nexport type CheckboxInputStylesProps = VariantProps<typeof checkboxInputStyles>\n","import { Check } from '@spark-ui/icons/Check'\nimport { Minus } from '@spark-ui/icons/Minus'\nimport { Checkbox } from 'radix-ui'\nimport { ComponentPropsWithoutRef, ReactNode, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { CheckboxIndicator } from './CheckboxIndicator'\nimport { checkboxInputStyles, type CheckboxInputStylesProps } from './CheckboxInput.styles'\n\ntype CheckedStatus = boolean | 'indeterminate'\n\nconst CheckboxPrimitive = Checkbox.Checkbox\n\nexport interface CheckboxInputProps\n extends CheckboxInputStylesProps,\n Omit<ComponentPropsWithoutRef<'button'>, 'onChange' | 'value' | 'checked' | 'defaultChecked'> {\n /**\n * The checked icon to use.\n */\n icon?: ReactNode\n /**\n * The indeterminate icon to use.\n */\n indeterminateIcon?: ReactNode\n /**\n * The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.\n */\n defaultChecked?: boolean\n /**\n * The controlled checked state of the checkbox. Must be used in conjunction with onCheckedChange.\n */\n checked?: CheckedStatus\n /**\n * When true, prevents the user from interacting with the checkbox.\n */\n disabled?: boolean\n /**\n * When true, indicates that the user must check the checkbox before the owning form can be submitted.\n */\n required?: boolean\n /**\n * The name of the checkbox. Submitted with its owning form as part of a name/value pair.\n */\n name?: string\n /**\n * The value given as data when submitted with a name.\n */\n value?: string\n /**\n * Event handler called when the checked state of the checkbox changes.\n */\n onCheckedChange?: (checked: boolean) => void\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const CheckboxInput = ({\n className,\n icon = <Check />,\n indeterminateIcon = <Minus />,\n intent,\n checked,\n ref,\n ...others\n}: CheckboxInputProps) => (\n <CheckboxPrimitive\n ref={ref}\n className={checkboxInputStyles({ intent, className })}\n checked={checked}\n {...others}\n >\n <CheckboxIndicator>\n <Icon size=\"sm\">{checked === 'indeterminate' ? indeterminateIcon : icon}</Icon>\n </CheckboxIndicator>\n </CheckboxPrimitive>\n)\n\nCheckboxInput.displayName = 'CheckboxInput'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const labelStyles = cva('grow', {\n variants: {\n disabled: {\n true: ['text-neutral/dim-2', 'cursor-not-allowed'],\n false: ['cursor-pointer'],\n },\n },\n defaultVariants: {\n disabled: false,\n },\n})\n\nexport type LabelStylesProps = VariantProps<typeof labelStyles>\n","import { Label, LabelProps } from '../label'\nimport { labelStyles, type LabelStylesProps } from './CheckboxLabel.styles'\n\nexport interface CheckboxLabelProps extends LabelProps, LabelStylesProps {\n /**\n * When true, prevents the user from interacting with the checkbox item.\n */\n disabled?: boolean\n}\n\nexport const CheckboxLabel = ({ disabled, ...others }: CheckboxLabelProps) => (\n <Label className={labelStyles({ disabled })} {...others} />\n)\n\nCheckboxLabel.displayName = 'CheckboxLabel'\n","import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { cx } from 'class-variance-authority'\nimport { Ref, useId, useMemo, useRef } from 'react'\n\nimport { CheckboxGroupContextState, useCheckboxGroup } from './CheckboxGroupContext'\nimport { CheckboxInput, CheckboxInputProps } from './CheckboxInput'\nimport { CheckboxLabel } from './CheckboxLabel'\n\nexport type CheckboxProps = CheckboxInputProps &\n Pick<CheckboxGroupContextState, 'reverse'> & {\n ref?: Ref<HTMLButtonElement>\n }\n\nconst ID_PREFIX = ':checkbox'\n\nexport const Checkbox = ({\n id: idProp,\n className,\n intent: intentProp,\n checked: checkedProp,\n value,\n disabled,\n reverse = false,\n onCheckedChange,\n children,\n ref: forwardedRef,\n ...others\n}: CheckboxProps) => {\n const checkboxId = `${ID_PREFIX}-${useId()}`\n const innerId = idProp || checkboxId\n\n const innerLabelId = `${ID_PREFIX}-${useId()}`\n\n const field = useFormFieldControl()\n const group = useCheckboxGroup()\n\n const rootRef = useRef<HTMLButtonElement | undefined>(null)\n const ref = useMergeRefs(forwardedRef, rootRef)\n\n const getCheckboxAttributes = ({\n fieldState,\n groupState,\n checkboxIntent,\n }: {\n fieldState: ReturnType<typeof useFormFieldControl>\n groupState: ReturnType<typeof useCheckboxGroup>\n checkboxIntent: CheckboxInputProps['intent']\n }) => {\n const name = fieldState.name ?? groupState.name\n const isRequired = fieldState.isRequired ?? groupState.isRequired\n const state = fieldState.state ?? groupState.state\n const isInvalid = fieldState.isInvalid ?? groupState.isInvalid\n\n const isFieldEnclosed = fieldState.id !== groupState.id\n const id = isFieldEnclosed ? fieldState.id : undefined\n const description = isFieldEnclosed ? fieldState.description : undefined\n\n const intent = state ?? checkboxIntent ?? groupState.intent\n\n return { name, isRequired, isInvalid, id, description, intent }\n }\n\n const checked = value ? group.value?.includes(value) : checkedProp\n\n const handleCheckedChange = (isChecked: boolean) => {\n onCheckedChange?.(isChecked)\n\n const rootRefValue = rootRef.current?.value\n if (rootRefValue && group.onCheckedChange) {\n group.onCheckedChange(isChecked, rootRefValue)\n }\n }\n\n const {\n id,\n name,\n isInvalid,\n description,\n intent,\n isRequired: isRequiredAttr,\n } = getCheckboxAttributes({\n fieldState: field,\n groupState: group,\n checkboxIntent: intentProp,\n })\n\n const isRequired = useMemo(() => {\n if (!group) return isRequiredAttr\n\n return isRequiredAttr ? !group.value?.length : false\n }, [group, isRequiredAttr])\n\n const checkboxLabel = children && (\n <CheckboxLabel disabled={disabled} htmlFor={id || innerId} id={innerLabelId}>\n {children}\n </CheckboxLabel>\n )\n\n const checkboxInput = (\n <CheckboxInput\n ref={ref}\n id={id || innerId}\n name={name}\n value={value}\n intent={intent}\n checked={checked}\n disabled={disabled}\n required={isRequired}\n aria-describedby={description}\n aria-invalid={isInvalid}\n onCheckedChange={handleCheckedChange}\n aria-labelledby={children ? innerLabelId : field.labelId}\n {...others}\n />\n )\n\n const content =\n group.reverse || reverse ? (\n <>\n {checkboxLabel}\n {checkboxInput}\n </>\n ) : (\n <>\n {checkboxInput}\n {checkboxLabel}\n </>\n )\n\n return (\n <span\n data-spark-component=\"checkbox\"\n className={cx('gap-md text-body-1 relative flex items-start', className)}\n >\n {content}\n </span>\n )\n}\n\nCheckbox.displayName = 'Checkbox'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const checkboxGroupStyles = cva(['flex'], {\n variants: {\n /**\n * Prop to set the orientation of the checkbox group which could be `vertical` or `horizontal`.\n */\n orientation: {\n vertical: ['flex-col', 'gap-lg'],\n horizontal: ['gap-xl'],\n },\n },\n})\n\nexport type CheckboxGroupStylesProps = VariantProps<typeof checkboxGroupStyles>\n","import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { useCombinedState } from '@spark-ui/hooks/use-combined-state'\nimport { ComponentPropsWithoutRef, Ref, useEffect, useMemo, useRef } from 'react'\n\nimport { checkboxGroupStyles, CheckboxGroupStylesProps } from './CheckboxGroup.styles'\nimport { CheckboxGroupContext, CheckboxGroupContextState } from './CheckboxGroupContext'\n\nexport interface CheckboxGroupProps\n extends Omit<ComponentPropsWithoutRef<'div'>, 'value' | 'defaultValue' | 'onChange'>,\n CheckboxGroupStylesProps,\n Pick<CheckboxGroupContextState, 'intent' | 'name' | 'value' | 'reverse'> {\n /**\n * The initial value of the checkbox group\n */\n defaultValue?: string[]\n /**\n * The callback fired when any children Checkbox is checked or unchecked\n */\n onCheckedChange?: (value: string[]) => void\n ref?: Ref<HTMLDivElement>\n}\n\nexport const CheckboxGroup = ({\n name: nameProp,\n value: valueProp,\n defaultValue,\n className,\n intent,\n orientation = 'vertical',\n onCheckedChange: onCheckedChangeProp,\n reverse = false,\n children,\n ref,\n ...others\n}: CheckboxGroupProps) => {\n const [value, setValue] = useCombinedState(valueProp, defaultValue)\n const field = useFormFieldControl()\n const onCheckedChangeRef = useRef(onCheckedChangeProp)\n\n const { id, labelId, description, state, isInvalid, isRequired } = field\n const name = nameProp ?? field.name\n\n const current = useMemo(() => {\n const handleCheckedChange = (checked: boolean, changed: string) => {\n const values = value || []\n const modified = checked ? [...values, changed] : values.filter(val => val !== changed)\n\n setValue(modified)\n\n if (onCheckedChangeRef.current) {\n onCheckedChangeRef.current(modified)\n }\n }\n\n return {\n id,\n name,\n value,\n intent,\n state,\n isInvalid,\n description,\n isRequired,\n reverse,\n onCheckedChange: handleCheckedChange,\n }\n }, [id, name, value, intent, state, isInvalid, description, isRequired, setValue, reverse])\n\n useEffect(() => {\n onCheckedChangeRef.current = onCheckedChangeProp\n }, [onCheckedChangeProp])\n\n return (\n <CheckboxGroupContext.Provider value={current}>\n <div\n ref={ref}\n className={checkboxGroupStyles({ className, orientation })}\n role=\"group\"\n aria-labelledby={labelId}\n aria-describedby={description}\n {...others}\n >\n {children}\n </div>\n </CheckboxGroupContext.Provider>\n )\n}\n\nCheckboxGroup.displayName = 'CheckboxGroup'\n"],"names":["CheckboxGroupContext","createContext","useCheckboxGroup","useContext","CheckboxIndicatorPrimitive","Checkbox","CheckboxIndicator","props","jsx","checkboxInputStyles","cva","makeVariants","CheckboxPrimitive","CheckboxInput","className","icon","Check","indeterminateIcon","Minus","intent","checked","ref","others","Icon","labelStyles","CheckboxLabel","disabled","Label","ID_PREFIX","idProp","intentProp","checkedProp","value","reverse","onCheckedChange","children","forwardedRef","checkboxId","useId","innerId","innerLabelId","field","useFormFieldControl","group","rootRef","useRef","useMergeRefs","getCheckboxAttributes","fieldState","groupState","checkboxIntent","name","isRequired","state","isInvalid","isFieldEnclosed","id","description","handleCheckedChange","isChecked","rootRefValue","isRequiredAttr","useMemo","checkboxLabel","checkboxInput","content","jsxs","Fragment","cx","checkboxGroupStyles","CheckboxGroup","nameProp","valueProp","defaultValue","orientation","onCheckedChangeProp","setValue","useCombinedState","onCheckedChangeRef","labelId","current","changed","values","modified","val","useEffect"],"mappings":"ggBA2CaA,EAAuBC,EAAAA,cAAkD,EAAE,EAE3EC,GAAmB,IACdC,EAAAA,WAAWH,CAAoB,EC3C3CI,GAA6BC,EAAAA,SAAS,kBAM/BC,EAAqBC,GAChCC,MAACJ,IAA2B,UAAU,6CAA8C,GAAGG,EAAO,EAGhGD,EAAkB,YAAc,oBCVzB,MAAMG,GAAsBC,EAAAA,IACjC,CACE,sFACA,2EACA,0BACA,oCACA,4BAAA,EAEF,CACE,SAAU,CAIR,OAAQC,GAAAA,aAGN,CACA,KAAM,CACJ,eACA,4BACA,wCACA,4EACA,+DAAA,EAEF,QAAS,CACP,kBACA,+BACA,wCACA,kFACA,qEAAA,EAEF,OAAQ,CACN,iBACA,8BACA,wCACA,gFACA,mEAAA,EAEF,QAAS,CACP,kBACA,+BACA,wCACA,kFACA,qEAAA,EAEF,MAAO,CACL,gBACA,6BACA,sCACA,8EACA,iEAAA,EAEF,MAAO,CACL,gBACA,6BACA,sCACA,8EACA,iEAAA,EAEF,KAAM,CACJ,eACA,4BACA,qCACA,4EACA,+DAAA,EAEF,QAAS,CACP,kBACA,+BACA,wCACA,kFACA,qEAAA,CACF,CACD,CAAA,EAEH,gBAAiB,CACf,OAAQ,SAAA,CACV,CAEJ,ECvEMC,GAAoBP,EAAAA,SAAS,SA4CtBQ,EAAgB,CAAC,CAC5B,UAAAC,EACA,KAAAC,QAAQC,GAAAA,MAAA,EAAM,EACd,kBAAAC,QAAqBC,GAAAA,MAAA,EAAM,EAC3B,OAAAC,EACA,QAAAC,EACA,IAAAC,EACA,GAAGC,CACL,IACEd,EAAAA,IAACI,GAAA,CACC,IAAAS,EACA,UA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AYmB,GAElB,CAAC3B,EAAIL,EAAMnB,EAAOb,EAAQkC,EAAOC,EAAWG,EAAaL,EAAYwB,EAAU3C,CAAO,CAAC,EAE1FoD,OAAAA,EAAAA,UAAU,IAAM,CACdP,EAAmB,QAAUH,CAC/B,EAAG,CAACA,CAAmB,CAAC,EAGtBnE,EAAAA,IAACR,EAAqB,SAArB,CAA8B,MAAOgF,EACpC,SAAAxE,EAAAA,IAAC,MAAA,CACC,IAAAa,EACA,UAAWgD,GAAoB,CAAE,UAAAvD,EAAW,YAAA4D,EAAa,EACzD,KAAK,QACL,kBAAiBK,EACjB,mBAAkBtB,EACjB,GAAGnC,EAEH,SAAAa,CAAA,CAAA,EAEL,CAEJ,EAEAmC,EAAc,YAAc"}
1
+ {"version":3,"file":"index.js","sources":["../../src/checkbox/CheckboxGroupContext.tsx","../../src/checkbox/CheckboxIndicator.tsx","../../src/checkbox/CheckboxInput.styles.ts","../../src/checkbox/CheckboxInput.tsx","../../src/checkbox/CheckboxLabel.styles.ts","../../src/checkbox/CheckboxLabel.tsx","../../src/checkbox/Checkbox.tsx","../../src/checkbox/CheckboxGroup.styles.ts","../../src/checkbox/CheckboxGroup.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\n\nimport { CheckboxInputStylesProps } from './CheckboxInput.styles'\n\nexport interface CheckboxGroupContextState extends Pick<CheckboxInputStylesProps, 'intent'> {\n /**\n * The id of the checkbox group.\n */\n id: string\n /**\n * The name of the group. Submitted with its owning form as part of a name/value pair.\n */\n name?: string\n /**\n * The value of the checkbox group.\n */\n value?: string[]\n /**\n * A set of ids separated by a space used to describe the input component given by a set of messages.\n */\n description?: string\n /**\n * The validation state of the checkbox group.\n */\n state?: 'error' | 'success' | 'alert'\n /**\n * If true, the checkbox group will be invalid.\n */\n isInvalid?: boolean\n /**\n * If true, the checkbox group will be required.\n */\n isRequired?: boolean\n /**\n * Callback used to update or notify the value of the checkbox group.\n */\n onCheckedChange?: (checked: boolean, changed: string) => void\n /**\n * When true, the label will be placed on the left side of the Checkbox\n */\n reverse?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<Partial<CheckboxGroupContextState>>({})\n\nexport const useCheckboxGroup = () => {\n const context = useContext(CheckboxGroupContext)\n\n return context\n}\n","import { Checkbox } from 'radix-ui'\nimport { Ref } from 'react'\n\nconst CheckboxIndicatorPrimitive = Checkbox.CheckboxIndicator\n\nexport type CheckboxIndicatorProps = Checkbox.CheckboxIndicatorProps & {\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const CheckboxIndicator = (props: CheckboxIndicatorProps) => (\n <CheckboxIndicatorPrimitive className=\"flex size-full items-center justify-center\" {...props} />\n)\n\nCheckboxIndicator.displayName = 'CheckboxIndicator'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nexport const checkboxInputStyles = cva(\n [\n 'size-sz-24 shrink-0 items-center justify-center rounded-sm border-md bg-transparent',\n 'disabled:cursor-not-allowed disabled:opacity-dim-3 disabled:hover:ring-0',\n 'focus-visible:u-outline',\n 'hover:ring-4 hover:cursor-pointer',\n 'u-shadow-border-transition',\n ],\n {\n variants: {\n /**\n * Color scheme of the checkbox.\n */\n intent: makeVariants<\n 'intent',\n ['main', 'support', 'accent', 'success', 'alert', 'error', 'info', 'neutral']\n >({\n main: [\n 'text-on-main',\n 'hover:ring-main-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-main data-[state=indeterminate]:bg-main',\n 'data-[state=checked]:border-main data-[state=checked]:bg-main',\n ],\n support: [\n 'text-on-support',\n 'hover:ring-support-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-support data-[state=indeterminate]:bg-support',\n 'data-[state=checked]:border-support data-[state=checked]:bg-support',\n ],\n accent: [\n 'text-on-accent',\n 'hover:ring-accent-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-accent data-[state=indeterminate]:bg-accent',\n 'data-[state=checked]:border-accent data-[state=checked]:bg-accent',\n ],\n success: [\n 'text-on-success',\n 'hover:ring-success-container',\n 'data-[state=unchecked]:border-success',\n 'data-[state=indeterminate]:border-success data-[state=indeterminate]:bg-success',\n 'data-[state=checked]:border-success data-[state=checked]:bg-success',\n ],\n alert: [\n 'text-on-alert',\n 'hover:ring-alert-container',\n 'data-[state=unchecked]:border-alert',\n 'data-[state=indeterminate]:border-alert data-[state=indeterminate]:bg-alert',\n 'data-[state=checked]:border-alert data-[state=checked]:bg-alert',\n ],\n error: [\n 'text-on-error',\n 'hover:ring-error-container',\n 'data-[state=unchecked]:border-error',\n 'data-[state=indeterminate]:border-error data-[state=indeterminate]:bg-error',\n 'data-[state=checked]:border-error data-[state=checked]:bg-error',\n ],\n info: [\n 'text-on-info',\n 'hover:ring-info-container',\n 'data-[state=unchecked]:border-info',\n 'data-[state=indeterminate]:border-info data-[state=indeterminate]:bg-info',\n 'data-[state=checked]:border-info data-[state=checked]:bg-info',\n ],\n neutral: [\n 'text-on-neutral',\n 'hover:ring-neutral-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-neutral data-[state=indeterminate]:bg-neutral',\n 'data-[state=checked]:border-neutral data-[state=checked]:bg-neutral',\n ],\n }),\n },\n defaultVariants: {\n intent: 'support',\n },\n }\n)\n\nexport type CheckboxInputStylesProps = VariantProps<typeof checkboxInputStyles>\n","import { Check } from '@spark-ui/icons/Check'\nimport { Minus } from '@spark-ui/icons/Minus'\nimport { Checkbox } from 'radix-ui'\nimport { ComponentPropsWithoutRef, ReactNode, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { CheckboxIndicator } from './CheckboxIndicator'\nimport { checkboxInputStyles, type CheckboxInputStylesProps } from './CheckboxInput.styles'\n\ntype CheckedStatus = boolean | 'indeterminate'\n\nconst CheckboxPrimitive = Checkbox.Checkbox\n\nexport interface CheckboxInputProps\n extends CheckboxInputStylesProps,\n Omit<ComponentPropsWithoutRef<'button'>, 'onChange' | 'value' | 'checked' | 'defaultChecked'> {\n /**\n * The checked icon to use.\n */\n icon?: ReactNode\n /**\n * The indeterminate icon to use.\n */\n indeterminateIcon?: ReactNode\n /**\n * The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.\n */\n defaultChecked?: boolean\n /**\n * The controlled checked state of the checkbox. Must be used in conjunction with onCheckedChange.\n */\n checked?: CheckedStatus\n /**\n * When true, prevents the user from interacting with the checkbox.\n */\n disabled?: boolean\n /**\n * When true, indicates that the user must check the checkbox before the owning form can be submitted.\n */\n required?: boolean\n /**\n * The name of the checkbox. Submitted with its owning form as part of a name/value pair.\n */\n name?: string\n /**\n * The value given as data when submitted with a name.\n */\n value?: string\n /**\n * Event handler called when the checked state of the checkbox changes.\n */\n onCheckedChange?: (checked: boolean) => void\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const CheckboxInput = ({\n className,\n icon = <Check />,\n indeterminateIcon = <Minus />,\n intent,\n checked,\n ref,\n ...others\n}: CheckboxInputProps) => (\n <CheckboxPrimitive\n ref={ref}\n className={checkboxInputStyles({ intent, className })}\n checked={checked}\n {...others}\n >\n <CheckboxIndicator>\n <Icon size=\"sm\">{checked === 'indeterminate' ? indeterminateIcon : icon}</Icon>\n </CheckboxIndicator>\n </CheckboxPrimitive>\n)\n\nCheckboxInput.displayName = 'CheckboxInput'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const labelStyles = cva('grow', {\n variants: {\n disabled: {\n true: ['text-neutral/dim-2', 'cursor-not-allowed'],\n false: ['cursor-pointer'],\n },\n },\n defaultVariants: {\n disabled: false,\n },\n})\n\nexport type LabelStylesProps = VariantProps<typeof labelStyles>\n","import { Label, LabelProps } from '../label'\nimport { labelStyles, type LabelStylesProps } from './CheckboxLabel.styles'\n\nexport interface CheckboxLabelProps extends LabelProps, LabelStylesProps {\n /**\n * When true, prevents the user from interacting with the checkbox item.\n */\n disabled?: boolean\n}\n\nexport const CheckboxLabel = ({ disabled, ...others }: CheckboxLabelProps) => (\n <Label className={labelStyles({ disabled })} {...others} />\n)\n\nCheckboxLabel.displayName = 'CheckboxLabel'\n","import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { cx } from 'class-variance-authority'\nimport { Ref, useId, useMemo, useRef } from 'react'\n\nimport { CheckboxGroupContextState, useCheckboxGroup } from './CheckboxGroupContext'\nimport { CheckboxInput, CheckboxInputProps } from './CheckboxInput'\nimport { CheckboxLabel } from './CheckboxLabel'\n\nexport type CheckboxProps = CheckboxInputProps &\n Pick<CheckboxGroupContextState, 'reverse'> & {\n ref?: Ref<HTMLButtonElement>\n }\n\nconst ID_PREFIX = ':checkbox'\n\nexport const Checkbox = ({\n id: idProp,\n className,\n intent: intentProp,\n checked: checkedProp,\n value,\n disabled,\n reverse = false,\n onCheckedChange,\n children,\n ref: forwardedRef,\n ...others\n}: CheckboxProps) => {\n const checkboxId = `${ID_PREFIX}-${useId()}`\n const innerId = idProp || checkboxId\n\n const innerLabelId = `${ID_PREFIX}-${useId()}`\n\n const field = useFormFieldControl()\n const group = useCheckboxGroup()\n\n const rootRef = useRef<HTMLButtonElement | undefined>(null)\n const ref = useMergeRefs(forwardedRef, rootRef)\n\n const getCheckboxAttributes = ({\n fieldState,\n groupState,\n checkboxIntent,\n }: {\n fieldState: ReturnType<typeof useFormFieldControl>\n groupState: ReturnType<typeof useCheckboxGroup>\n checkboxIntent: CheckboxInputProps['intent']\n }) => {\n const name = fieldState.name ?? groupState.name\n const isRequired = fieldState.isRequired ?? groupState.isRequired\n const state = fieldState.state ?? groupState.state\n const isInvalid = fieldState.isInvalid ?? groupState.isInvalid\n\n const isFieldEnclosed = fieldState.id !== groupState.id\n const id = isFieldEnclosed ? fieldState.id : undefined\n const description = isFieldEnclosed ? fieldState.description : undefined\n\n const intent = state ?? checkboxIntent ?? groupState.intent\n\n return { name, isRequired, isInvalid, id, description, intent }\n }\n\n const checked = value ? group.value?.includes(value) : checkedProp\n\n const handleCheckedChange = (isChecked: boolean) => {\n onCheckedChange?.(isChecked)\n\n const rootRefValue = rootRef.current?.value\n if (rootRefValue && group.onCheckedChange) {\n group.onCheckedChange(isChecked, rootRefValue)\n }\n }\n\n const {\n id,\n name,\n isInvalid,\n description,\n intent,\n isRequired: isRequiredAttr,\n } = getCheckboxAttributes({\n fieldState: field,\n groupState: group,\n checkboxIntent: intentProp,\n })\n\n const isRequired = useMemo(() => {\n if (!group) return isRequiredAttr\n\n return isRequiredAttr ? !group.value?.length : false\n }, [group, isRequiredAttr])\n\n const checkboxLabel = children && (\n <CheckboxLabel disabled={disabled} htmlFor={id || innerId} id={innerLabelId}>\n {children}\n </CheckboxLabel>\n )\n\n const checkboxInput = (\n <CheckboxInput\n ref={ref}\n id={id || innerId}\n name={name}\n value={value}\n intent={intent}\n checked={checked}\n disabled={disabled}\n required={isRequired}\n aria-describedby={description}\n aria-invalid={isInvalid}\n onCheckedChange={handleCheckedChange}\n aria-labelledby={children ? innerLabelId : field.labelId}\n {...others}\n />\n )\n\n const content =\n group.reverse || reverse ? (\n <>\n {checkboxLabel}\n {checkboxInput}\n </>\n ) : (\n <>\n {checkboxInput}\n {checkboxLabel}\n </>\n )\n\n return (\n <span\n data-spark-component=\"checkbox\"\n className={cx('gap-md text-body-1 relative flex items-start', className)}\n >\n {content}\n </span>\n )\n}\n\nCheckbox.displayName = 'Checkbox'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const checkboxGroupStyles = cva(['flex'], {\n variants: {\n /**\n * Prop to set the orientation of the checkbox group which could be `vertical` or `horizontal`.\n */\n orientation: {\n vertical: ['flex-col', 'gap-lg'],\n horizontal: ['gap-xl'],\n },\n },\n})\n\nexport type CheckboxGroupStylesProps = VariantProps<typeof checkboxGroupStyles>\n","import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { useCombinedState } from '@spark-ui/hooks/use-combined-state'\nimport { ComponentPropsWithoutRef, Ref, useEffect, useMemo, useRef } from 'react'\n\nimport { checkboxGroupStyles, CheckboxGroupStylesProps } from './CheckboxGroup.styles'\nimport { CheckboxGroupContext, CheckboxGroupContextState } from './CheckboxGroupContext'\n\nexport interface CheckboxGroupProps\n extends Omit<ComponentPropsWithoutRef<'div'>, 'value' | 'defaultValue' | 'onChange'>,\n CheckboxGroupStylesProps,\n Pick<CheckboxGroupContextState, 'intent' | 'name' | 'value' | 'reverse'> {\n /**\n * The initial value of the checkbox group\n */\n defaultValue?: string[]\n /**\n * The callback fired when any children Checkbox is checked or unchecked\n */\n onCheckedChange?: (value: string[]) => void\n ref?: Ref<HTMLDivElement>\n}\n\nexport const CheckboxGroup = ({\n name: nameProp,\n value: valueProp,\n defaultValue,\n className,\n intent,\n orientation = 'vertical',\n onCheckedChange: onCheckedChangeProp,\n reverse = false,\n children,\n ref,\n ...others\n}: CheckboxGroupProps) => {\n const [value, setValue] = useCombinedState(valueProp, defaultValue)\n const field = useFormFieldControl()\n const onCheckedChangeRef = useRef(onCheckedChangeProp)\n\n const { id, labelId, description, state, isInvalid, isRequired } = field\n const name = nameProp ?? field.name\n\n const current = useMemo(() => {\n const handleCheckedChange = (checked: boolean, changed: string) => {\n const values = value || []\n const modified = checked\n ? [...values, changed]\n : values.filter((val: string) => val !== changed)\n\n setValue(modified)\n\n if (onCheckedChangeRef.current) {\n onCheckedChangeRef.current(modified)\n }\n }\n\n return {\n id,\n name,\n value,\n intent,\n state,\n isInvalid,\n description,\n isRequired,\n reverse,\n onCheckedChange: handleCheckedChange,\n }\n }, [id, name, value, intent, state, isInvalid, description, isRequired, setValue, reverse])\n\n useEffect(() => {\n onCheckedChangeRef.current = onCheckedChangeProp\n }, [onCheckedChangeProp])\n\n return (\n <CheckboxGroupContext.Provider value={current}>\n <div\n ref={ref}\n className={checkboxGroupStyles({ className, orientation })}\n role=\"group\"\n aria-labelledby={labelId}\n aria-describedby={description}\n {...others}\n >\n {children}\n </div>\n </CheckboxGroupContext.Provider>\n )\n}\n\nCheckboxGroup.displayName = 'CheckboxGroup'\n"],"names":["CheckboxGroupContext","createContext","useCheckboxGroup","useContext","CheckboxIndicatorPrimitive","Checkbox","CheckboxIndicator","props","jsx","checkboxInputStyles","cva","makeVariants","CheckboxPrimitive","CheckboxInput","className","icon","Check","indeterminateIcon","Minus","intent","checked","ref","others","Icon","labelStyles","CheckboxLabel","disabled","Label","ID_PREFIX","idProp","intentProp","checkedProp","value","reverse","onCheckedChange","children","forwardedRef","checkboxId","useId","innerId","innerLabelId","field","useFormFieldControl","group","rootRef","useRef","useMergeRefs","getCheckboxAttributes","fieldState","groupState","checkboxIntent","name","isRequired","state","isInvalid","isFieldEnclosed","id","description","handleCheckedChange","isChecked","rootRefValue","isRequiredAttr","useMemo","checkboxLabel","checkboxInput","content","jsxs","Fragment","cx","checkboxGroupStyles","CheckboxGroup","nameProp","valueProp","defaultValue","orientation","onCheckedChangeProp","setValue","useCombinedState","onCheckedChangeRef","labelId","current","changed","values","modified","val","useEffect"],"mappings":"ggBA2CaA,EAAuBC,EAAAA,cAAkD,EAAE,EAE3EC,GAAmB,IACdC,EAAAA,WAAWH,CAAoB,EC3C3CI,GAA6BC,EAAAA,SAAS,kBAM/BC,EAAqBC,GAChCC,MAACJ,IAA2B,UAAU,6CAA8C,GAAGG,EAAO,EAGhGD,EAAkB,YAAc,oBCVzB,MAAMG,GAAsBC,EAAAA,IACjC,CACE,sFACA,2EACA,0BACA,oCACA,4BAAA,EAEF,CACE,SAAU,CAIR,OAAQC,GAAAA,aAGN,CACA,KAAM,CACJ,eACA,4BACA,wCACA,4EACA,+DAAA,EAEF,QAAS,CACP,kBACA,+BACA,wCACA,kFACA,qEAAA,EAEF,OAAQ,CACN,iBACA,8BACA,wCACA,gFACA,mEAAA,EAEF,QAAS,CACP,kBACA,+BACA,wCACA,kFACA,qEAAA,EAEF,MAAO,CACL,gBACA,6BACA,sCACA,8EACA,iEAAA,EAEF,MAAO,CACL,gBACA,6BACA,sCACA,8EACA,iEAAA,EAEF,KAAM,CACJ,eACA,4BACA,qCACA,4EACA,+DAAA,EAEF,QAA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,CACL,GAAAN,EACA,KAAAL,EACA,MAAAnB,EACA,OAAAb,EACA,MAAAkC,EACA,UAAAC,EACA,YAAAG,EACA,WAAAL,EACA,QAAAnB,EACA,gBAvB0B,CAACb,EAAkB6D,IAAoB,CACjE,MAAMC,EAASlD,GAAS,CAAA,EAClBmD,EAAW/D,EACb,CAAC,GAAG8D,EAAQD,CAAO,EACnBC,EAAO,OAAQE,GAAgBA,IAAQH,CAAO,EAElDL,EAASO,CAAQ,EAEbL,EAAmB,SACrBA,EAAmB,QAAQK,CAAQ,CAEvC,CAYmB,GAElB,CAAC3B,EAAIL,EAAMnB,EAAOb,EAAQkC,EAAOC,EAAWG,EAAaL,EAAYwB,EAAU3C,CAAO,CAAC,EAE1FoD,OAAAA,EAAAA,UAAU,IAAM,CACdP,EAAmB,QAAUH,CAC/B,EAAG,CAACA,CAAmB,CAAC,EAGtBnE,EAAAA,IAACR,EAAqB,SAArB,CAA8B,MAAOgF,EACpC,SAAAxE,EAAAA,IAAC,MAAA,CACC,IAAAa,EACA,UAAWgD,GAAoB,CAAE,UAAAvD,EAAW,YAAA4D,EAAa,EACzD,KAAK,QACL,kBAAiBK,EACjB,mBAAkBtB,EACjB,GAAGnC,EAEH,SAAAa,CAAA,CAAA,EAEL,CAEJ,EAEAmC,EAAc,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/checkbox/CheckboxGroupContext.tsx","../../src/checkbox/CheckboxIndicator.tsx","../../src/checkbox/CheckboxInput.styles.ts","../../src/checkbox/CheckboxInput.tsx","../../src/checkbox/CheckboxLabel.styles.ts","../../src/checkbox/CheckboxLabel.tsx","../../src/checkbox/Checkbox.tsx","../../src/checkbox/CheckboxGroup.styles.ts","../../src/checkbox/CheckboxGroup.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\n\nimport { CheckboxInputStylesProps } from './CheckboxInput.styles'\n\nexport interface CheckboxGroupContextState extends Pick<CheckboxInputStylesProps, 'intent'> {\n /**\n * The id of the checkbox group.\n */\n id: string\n /**\n * The name of the group. Submitted with its owning form as part of a name/value pair.\n */\n name?: string\n /**\n * The value of the checkbox group.\n */\n value?: string[]\n /**\n * A set of ids separated by a space used to describe the input component given by a set of messages.\n */\n description?: string\n /**\n * The validation state of the checkbox group.\n */\n state?: 'error' | 'success' | 'alert'\n /**\n * If true, the checkbox group will be invalid.\n */\n isInvalid?: boolean\n /**\n * If true, the checkbox group will be required.\n */\n isRequired?: boolean\n /**\n * Callback used to update or notify the value of the checkbox group.\n */\n onCheckedChange?: (checked: boolean, changed: string) => void\n /**\n * When true, the label will be placed on the left side of the Checkbox\n */\n reverse?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<Partial<CheckboxGroupContextState>>({})\n\nexport const useCheckboxGroup = () => {\n const context = useContext(CheckboxGroupContext)\n\n return context\n}\n","import { Checkbox } from 'radix-ui'\nimport { Ref } from 'react'\n\nconst CheckboxIndicatorPrimitive = Checkbox.CheckboxIndicator\n\nexport type CheckboxIndicatorProps = Checkbox.CheckboxIndicatorProps & {\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const CheckboxIndicator = (props: CheckboxIndicatorProps) => (\n <CheckboxIndicatorPrimitive className=\"flex size-full items-center justify-center\" {...props} />\n)\n\nCheckboxIndicator.displayName = 'CheckboxIndicator'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nexport const checkboxInputStyles = cva(\n [\n 'size-sz-24 shrink-0 items-center justify-center rounded-sm border-md bg-transparent',\n 'disabled:cursor-not-allowed disabled:opacity-dim-3 disabled:hover:ring-0',\n 'focus-visible:u-outline',\n 'hover:ring-4 hover:cursor-pointer',\n 'u-shadow-border-transition',\n ],\n {\n variants: {\n /**\n * Color scheme of the checkbox.\n */\n intent: makeVariants<\n 'intent',\n ['main', 'support', 'accent', 'success', 'alert', 'error', 'info', 'neutral']\n >({\n main: [\n 'text-on-main',\n 'hover:ring-main-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-main data-[state=indeterminate]:bg-main',\n 'data-[state=checked]:border-main data-[state=checked]:bg-main',\n ],\n support: [\n 'text-on-support',\n 'hover:ring-support-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-support data-[state=indeterminate]:bg-support',\n 'data-[state=checked]:border-support data-[state=checked]:bg-support',\n ],\n accent: [\n 'text-on-accent',\n 'hover:ring-accent-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-accent data-[state=indeterminate]:bg-accent',\n 'data-[state=checked]:border-accent data-[state=checked]:bg-accent',\n ],\n success: [\n 'text-on-success',\n 'hover:ring-success-container',\n 'data-[state=unchecked]:border-success',\n 'data-[state=indeterminate]:border-success data-[state=indeterminate]:bg-success',\n 'data-[state=checked]:border-success data-[state=checked]:bg-success',\n ],\n alert: [\n 'text-on-alert',\n 'hover:ring-alert-container',\n 'data-[state=unchecked]:border-alert',\n 'data-[state=indeterminate]:border-alert data-[state=indeterminate]:bg-alert',\n 'data-[state=checked]:border-alert data-[state=checked]:bg-alert',\n ],\n error: [\n 'text-on-error',\n 'hover:ring-error-container',\n 'data-[state=unchecked]:border-error',\n 'data-[state=indeterminate]:border-error data-[state=indeterminate]:bg-error',\n 'data-[state=checked]:border-error data-[state=checked]:bg-error',\n ],\n info: [\n 'text-on-info',\n 'hover:ring-info-container',\n 'data-[state=unchecked]:border-info',\n 'data-[state=indeterminate]:border-info data-[state=indeterminate]:bg-info',\n 'data-[state=checked]:border-info data-[state=checked]:bg-info',\n ],\n neutral: [\n 'text-on-neutral',\n 'hover:ring-neutral-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-neutral data-[state=indeterminate]:bg-neutral',\n 'data-[state=checked]:border-neutral data-[state=checked]:bg-neutral',\n ],\n }),\n },\n defaultVariants: {\n intent: 'support',\n },\n }\n)\n\nexport type CheckboxInputStylesProps = VariantProps<typeof checkboxInputStyles>\n","import { Check } from '@spark-ui/icons/Check'\nimport { Minus } from '@spark-ui/icons/Minus'\nimport { Checkbox } from 'radix-ui'\nimport { ComponentPropsWithoutRef, ReactNode, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { CheckboxIndicator } from './CheckboxIndicator'\nimport { checkboxInputStyles, type CheckboxInputStylesProps } from './CheckboxInput.styles'\n\ntype CheckedStatus = boolean | 'indeterminate'\n\nconst CheckboxPrimitive = Checkbox.Checkbox\n\nexport interface CheckboxInputProps\n extends CheckboxInputStylesProps,\n Omit<ComponentPropsWithoutRef<'button'>, 'onChange' | 'value' | 'checked' | 'defaultChecked'> {\n /**\n * The checked icon to use.\n */\n icon?: ReactNode\n /**\n * The indeterminate icon to use.\n */\n indeterminateIcon?: ReactNode\n /**\n * The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.\n */\n defaultChecked?: boolean\n /**\n * The controlled checked state of the checkbox. Must be used in conjunction with onCheckedChange.\n */\n checked?: CheckedStatus\n /**\n * When true, prevents the user from interacting with the checkbox.\n */\n disabled?: boolean\n /**\n * When true, indicates that the user must check the checkbox before the owning form can be submitted.\n */\n required?: boolean\n /**\n * The name of the checkbox. Submitted with its owning form as part of a name/value pair.\n */\n name?: string\n /**\n * The value given as data when submitted with a name.\n */\n value?: string\n /**\n * Event handler called when the checked state of the checkbox changes.\n */\n onCheckedChange?: (checked: boolean) => void\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const CheckboxInput = ({\n className,\n icon = <Check />,\n indeterminateIcon = <Minus />,\n intent,\n checked,\n ref,\n ...others\n}: CheckboxInputProps) => (\n <CheckboxPrimitive\n ref={ref}\n className={checkboxInputStyles({ intent, className })}\n checked={checked}\n {...others}\n >\n <CheckboxIndicator>\n <Icon size=\"sm\">{checked === 'indeterminate' ? indeterminateIcon : icon}</Icon>\n </CheckboxIndicator>\n </CheckboxPrimitive>\n)\n\nCheckboxInput.displayName = 'CheckboxInput'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const labelStyles = cva('grow', {\n variants: {\n disabled: {\n true: ['text-neutral/dim-2', 'cursor-not-allowed'],\n false: ['cursor-pointer'],\n },\n },\n defaultVariants: {\n disabled: false,\n },\n})\n\nexport type LabelStylesProps = VariantProps<typeof labelStyles>\n","import { Label, LabelProps } from '../label'\nimport { labelStyles, type LabelStylesProps } from './CheckboxLabel.styles'\n\nexport interface CheckboxLabelProps extends LabelProps, LabelStylesProps {\n /**\n * When true, prevents the user from interacting with the checkbox item.\n */\n disabled?: boolean\n}\n\nexport const CheckboxLabel = ({ disabled, ...others }: CheckboxLabelProps) => (\n <Label className={labelStyles({ disabled })} {...others} />\n)\n\nCheckboxLabel.displayName = 'CheckboxLabel'\n","import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { cx } from 'class-variance-authority'\nimport { Ref, useId, useMemo, useRef } from 'react'\n\nimport { CheckboxGroupContextState, useCheckboxGroup } from './CheckboxGroupContext'\nimport { CheckboxInput, CheckboxInputProps } from './CheckboxInput'\nimport { CheckboxLabel } from './CheckboxLabel'\n\nexport type CheckboxProps = CheckboxInputProps &\n Pick<CheckboxGroupContextState, 'reverse'> & {\n ref?: Ref<HTMLButtonElement>\n }\n\nconst ID_PREFIX = ':checkbox'\n\nexport const Checkbox = ({\n id: idProp,\n className,\n intent: intentProp,\n checked: checkedProp,\n value,\n disabled,\n reverse = false,\n onCheckedChange,\n children,\n ref: forwardedRef,\n ...others\n}: CheckboxProps) => {\n const checkboxId = `${ID_PREFIX}-${useId()}`\n const innerId = idProp || checkboxId\n\n const innerLabelId = `${ID_PREFIX}-${useId()}`\n\n const field = useFormFieldControl()\n const group = useCheckboxGroup()\n\n const rootRef = useRef<HTMLButtonElement | undefined>(null)\n const ref = useMergeRefs(forwardedRef, rootRef)\n\n const getCheckboxAttributes = ({\n fieldState,\n groupState,\n checkboxIntent,\n }: {\n fieldState: ReturnType<typeof useFormFieldControl>\n groupState: ReturnType<typeof useCheckboxGroup>\n checkboxIntent: CheckboxInputProps['intent']\n }) => {\n const name = fieldState.name ?? groupState.name\n const isRequired = fieldState.isRequired ?? groupState.isRequired\n const state = fieldState.state ?? groupState.state\n const isInvalid = fieldState.isInvalid ?? groupState.isInvalid\n\n const isFieldEnclosed = fieldState.id !== groupState.id\n const id = isFieldEnclosed ? fieldState.id : undefined\n const description = isFieldEnclosed ? fieldState.description : undefined\n\n const intent = state ?? checkboxIntent ?? groupState.intent\n\n return { name, isRequired, isInvalid, id, description, intent }\n }\n\n const checked = value ? group.value?.includes(value) : checkedProp\n\n const handleCheckedChange = (isChecked: boolean) => {\n onCheckedChange?.(isChecked)\n\n const rootRefValue = rootRef.current?.value\n if (rootRefValue && group.onCheckedChange) {\n group.onCheckedChange(isChecked, rootRefValue)\n }\n }\n\n const {\n id,\n name,\n isInvalid,\n description,\n intent,\n isRequired: isRequiredAttr,\n } = getCheckboxAttributes({\n fieldState: field,\n groupState: group,\n checkboxIntent: intentProp,\n })\n\n const isRequired = useMemo(() => {\n if (!group) return isRequiredAttr\n\n return isRequiredAttr ? !group.value?.length : false\n }, [group, isRequiredAttr])\n\n const checkboxLabel = children && (\n <CheckboxLabel disabled={disabled} htmlFor={id || innerId} id={innerLabelId}>\n {children}\n </CheckboxLabel>\n )\n\n const checkboxInput = (\n <CheckboxInput\n ref={ref}\n id={id || innerId}\n name={name}\n value={value}\n intent={intent}\n checked={checked}\n disabled={disabled}\n required={isRequired}\n aria-describedby={description}\n aria-invalid={isInvalid}\n onCheckedChange={handleCheckedChange}\n aria-labelledby={children ? innerLabelId : field.labelId}\n {...others}\n />\n )\n\n const content =\n group.reverse || reverse ? (\n <>\n {checkboxLabel}\n {checkboxInput}\n </>\n ) : (\n <>\n {checkboxInput}\n {checkboxLabel}\n </>\n )\n\n return (\n <span\n data-spark-component=\"checkbox\"\n className={cx('gap-md text-body-1 relative flex items-start', className)}\n >\n {content}\n </span>\n )\n}\n\nCheckbox.displayName = 'Checkbox'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const checkboxGroupStyles = cva(['flex'], {\n variants: {\n /**\n * Prop to set the orientation of the checkbox group which could be `vertical` or `horizontal`.\n */\n orientation: {\n vertical: ['flex-col', 'gap-lg'],\n horizontal: ['gap-xl'],\n },\n },\n})\n\nexport type CheckboxGroupStylesProps = VariantProps<typeof checkboxGroupStyles>\n","import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { useCombinedState } from '@spark-ui/hooks/use-combined-state'\nimport { ComponentPropsWithoutRef, Ref, useEffect, useMemo, useRef } from 'react'\n\nimport { checkboxGroupStyles, CheckboxGroupStylesProps } from './CheckboxGroup.styles'\nimport { CheckboxGroupContext, CheckboxGroupContextState } from './CheckboxGroupContext'\n\nexport interface CheckboxGroupProps\n extends Omit<ComponentPropsWithoutRef<'div'>, 'value' | 'defaultValue' | 'onChange'>,\n CheckboxGroupStylesProps,\n Pick<CheckboxGroupContextState, 'intent' | 'name' | 'value' | 'reverse'> {\n /**\n * The initial value of the checkbox group\n */\n defaultValue?: string[]\n /**\n * The callback fired when any children Checkbox is checked or unchecked\n */\n onCheckedChange?: (value: string[]) => void\n ref?: Ref<HTMLDivElement>\n}\n\nexport const CheckboxGroup = ({\n name: nameProp,\n value: valueProp,\n defaultValue,\n className,\n intent,\n orientation = 'vertical',\n onCheckedChange: onCheckedChangeProp,\n reverse = false,\n children,\n ref,\n ...others\n}: CheckboxGroupProps) => {\n const [value, setValue] = useCombinedState(valueProp, defaultValue)\n const field = useFormFieldControl()\n const onCheckedChangeRef = useRef(onCheckedChangeProp)\n\n const { id, labelId, description, state, isInvalid, isRequired } = field\n const name = nameProp ?? field.name\n\n const current = useMemo(() => {\n const handleCheckedChange = (checked: boolean, changed: string) => {\n const values = value || []\n const modified = checked ? [...values, changed] : values.filter(val => val !== changed)\n\n setValue(modified)\n\n if (onCheckedChangeRef.current) {\n onCheckedChangeRef.current(modified)\n }\n }\n\n return {\n id,\n name,\n value,\n intent,\n state,\n isInvalid,\n description,\n isRequired,\n reverse,\n onCheckedChange: handleCheckedChange,\n }\n }, [id, name, value, intent, state, isInvalid, description, isRequired, setValue, reverse])\n\n useEffect(() => {\n onCheckedChangeRef.current = onCheckedChangeProp\n }, [onCheckedChangeProp])\n\n return (\n <CheckboxGroupContext.Provider value={current}>\n <div\n ref={ref}\n className={checkboxGroupStyles({ className, orientation })}\n role=\"group\"\n aria-labelledby={labelId}\n aria-describedby={description}\n {...others}\n >\n {children}\n </div>\n </CheckboxGroupContext.Provider>\n )\n}\n\nCheckboxGroup.displayName = 'CheckboxGroup'\n"],"names":["CheckboxGroupContext","createContext","useCheckboxGroup","useContext","CheckboxIndicatorPrimitive","Checkbox","CheckboxIndicator","props","jsx","checkboxInputStyles","cva","makeVariants","CheckboxPrimitive","CheckboxInput","className","icon","Check","indeterminateIcon","Minus","intent","checked","ref","others","Icon","labelStyles","CheckboxLabel","disabled","Label","ID_PREFIX","idProp","intentProp","checkedProp","value","reverse","onCheckedChange","children","forwardedRef","checkboxId","useId","innerId","innerLabelId","field","useFormFieldControl","group","rootRef","useRef","useMergeRefs","getCheckboxAttributes","fieldState","groupState","checkboxIntent","name","isRequired","state","isInvalid","isFieldEnclosed","id","description","handleCheckedChange","isChecked","rootRefValue","isRequiredAttr","useMemo","checkboxLabel","checkboxInput","content","jsxs","Fragment","cx","checkboxGroupStyles","CheckboxGroup","nameProp","valueProp","defaultValue","orientation","onCheckedChangeProp","setValue","useCombinedState","onCheckedChangeRef","labelId","current","changed","values","modified","val","useEffect"],"mappings":";;;;;;;;;;;;AA2CO,MAAMA,IAAuBC,GAAkD,EAAE,GAE3EC,KAAmB,MACdC,GAAWH,CAAoB,GC3C3CI,KAA6BC,EAAS,mBAM/BC,IAAoB,CAACC,MAChC,gBAAAC,EAACJ,MAA2B,WAAU,8CAA8C,GAAGG,GAAO;AAGhGD,EAAkB,cAAc;ACVzB,MAAMG,KAAsBC;AAAA,EACjC;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;A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B,EAAQ,OAYf;AAAA,IACL,IAAAN;AAAA,IACA,MAAAL;AAAA,IACA,OAAAnB;AAAA,IACA,QAAAb;AAAA,IACA,OAAAkC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAG;AAAA,IACA,YAAAL;AAAA,IACA,SAAAnB;AAAA,IACA,iBArB0B,CAACb,GAAkB6D,MAAoB;AACjE,YAAMC,IAASlD,KAAS,CAAA,GAClBmD,IAAW/D,IAAU,CAAC,GAAG8D,GAAQD,CAAO,IAAIC,EAAO,OAAO,CAAAE,MAAOA,MAAQH,CAAO;AAEtF,MAAAL,EAASO,CAAQ,GAEbL,EAAmB,WACrBA,EAAmB,QAAQK,CAAQ;AAAA,IAEvC;AAAA,EAYmB,IAElB,CAAC3B,GAAIL,GAAMnB,GAAOb,GAAQkC,GAAOC,GAAWG,GAAaL,GAAYwB,GAAU3C,CAAO,CAAC;AAE1F,SAAAoD,GAAU,MAAM;AACd,IAAAP,EAAmB,UAAUH;AAAA,EAC/B,GAAG,CAACA,CAAmB,CAAC,GAGtB,gBAAAnE,EAACR,EAAqB,UAArB,EAA8B,OAAOgF,GACpC,UAAA,gBAAAxE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAa;AAAA,MACA,WAAWgD,GAAoB,EAAE,WAAAvD,GAAW,aAAA4D,GAAa;AAAA,MACzD,MAAK;AAAA,MACL,mBAAiBK;AAAA,MACjB,oBAAkBtB;AAAA,MACjB,GAAGnC;AAAA,MAEH,UAAAa;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ;AAEAmC,GAAc,cAAc;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/checkbox/CheckboxGroupContext.tsx","../../src/checkbox/CheckboxIndicator.tsx","../../src/checkbox/CheckboxInput.styles.ts","../../src/checkbox/CheckboxInput.tsx","../../src/checkbox/CheckboxLabel.styles.ts","../../src/checkbox/CheckboxLabel.tsx","../../src/checkbox/Checkbox.tsx","../../src/checkbox/CheckboxGroup.styles.ts","../../src/checkbox/CheckboxGroup.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\n\nimport { CheckboxInputStylesProps } from './CheckboxInput.styles'\n\nexport interface CheckboxGroupContextState extends Pick<CheckboxInputStylesProps, 'intent'> {\n /**\n * The id of the checkbox group.\n */\n id: string\n /**\n * The name of the group. Submitted with its owning form as part of a name/value pair.\n */\n name?: string\n /**\n * The value of the checkbox group.\n */\n value?: string[]\n /**\n * A set of ids separated by a space used to describe the input component given by a set of messages.\n */\n description?: string\n /**\n * The validation state of the checkbox group.\n */\n state?: 'error' | 'success' | 'alert'\n /**\n * If true, the checkbox group will be invalid.\n */\n isInvalid?: boolean\n /**\n * If true, the checkbox group will be required.\n */\n isRequired?: boolean\n /**\n * Callback used to update or notify the value of the checkbox group.\n */\n onCheckedChange?: (checked: boolean, changed: string) => void\n /**\n * When true, the label will be placed on the left side of the Checkbox\n */\n reverse?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<Partial<CheckboxGroupContextState>>({})\n\nexport const useCheckboxGroup = () => {\n const context = useContext(CheckboxGroupContext)\n\n return context\n}\n","import { Checkbox } from 'radix-ui'\nimport { Ref } from 'react'\n\nconst CheckboxIndicatorPrimitive = Checkbox.CheckboxIndicator\n\nexport type CheckboxIndicatorProps = Checkbox.CheckboxIndicatorProps & {\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const CheckboxIndicator = (props: CheckboxIndicatorProps) => (\n <CheckboxIndicatorPrimitive className=\"flex size-full items-center justify-center\" {...props} />\n)\n\nCheckboxIndicator.displayName = 'CheckboxIndicator'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nexport const checkboxInputStyles = cva(\n [\n 'size-sz-24 shrink-0 items-center justify-center rounded-sm border-md bg-transparent',\n 'disabled:cursor-not-allowed disabled:opacity-dim-3 disabled:hover:ring-0',\n 'focus-visible:u-outline',\n 'hover:ring-4 hover:cursor-pointer',\n 'u-shadow-border-transition',\n ],\n {\n variants: {\n /**\n * Color scheme of the checkbox.\n */\n intent: makeVariants<\n 'intent',\n ['main', 'support', 'accent', 'success', 'alert', 'error', 'info', 'neutral']\n >({\n main: [\n 'text-on-main',\n 'hover:ring-main-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-main data-[state=indeterminate]:bg-main',\n 'data-[state=checked]:border-main data-[state=checked]:bg-main',\n ],\n support: [\n 'text-on-support',\n 'hover:ring-support-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-support data-[state=indeterminate]:bg-support',\n 'data-[state=checked]:border-support data-[state=checked]:bg-support',\n ],\n accent: [\n 'text-on-accent',\n 'hover:ring-accent-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-accent data-[state=indeterminate]:bg-accent',\n 'data-[state=checked]:border-accent data-[state=checked]:bg-accent',\n ],\n success: [\n 'text-on-success',\n 'hover:ring-success-container',\n 'data-[state=unchecked]:border-success',\n 'data-[state=indeterminate]:border-success data-[state=indeterminate]:bg-success',\n 'data-[state=checked]:border-success data-[state=checked]:bg-success',\n ],\n alert: [\n 'text-on-alert',\n 'hover:ring-alert-container',\n 'data-[state=unchecked]:border-alert',\n 'data-[state=indeterminate]:border-alert data-[state=indeterminate]:bg-alert',\n 'data-[state=checked]:border-alert data-[state=checked]:bg-alert',\n ],\n error: [\n 'text-on-error',\n 'hover:ring-error-container',\n 'data-[state=unchecked]:border-error',\n 'data-[state=indeterminate]:border-error data-[state=indeterminate]:bg-error',\n 'data-[state=checked]:border-error data-[state=checked]:bg-error',\n ],\n info: [\n 'text-on-info',\n 'hover:ring-info-container',\n 'data-[state=unchecked]:border-info',\n 'data-[state=indeterminate]:border-info data-[state=indeterminate]:bg-info',\n 'data-[state=checked]:border-info data-[state=checked]:bg-info',\n ],\n neutral: [\n 'text-on-neutral',\n 'hover:ring-neutral-container',\n 'data-[state=unchecked]:border-outline',\n 'data-[state=indeterminate]:border-neutral data-[state=indeterminate]:bg-neutral',\n 'data-[state=checked]:border-neutral data-[state=checked]:bg-neutral',\n ],\n }),\n },\n defaultVariants: {\n intent: 'support',\n },\n }\n)\n\nexport type CheckboxInputStylesProps = VariantProps<typeof checkboxInputStyles>\n","import { Check } from '@spark-ui/icons/Check'\nimport { Minus } from '@spark-ui/icons/Minus'\nimport { Checkbox } from 'radix-ui'\nimport { ComponentPropsWithoutRef, ReactNode, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { CheckboxIndicator } from './CheckboxIndicator'\nimport { checkboxInputStyles, type CheckboxInputStylesProps } from './CheckboxInput.styles'\n\ntype CheckedStatus = boolean | 'indeterminate'\n\nconst CheckboxPrimitive = Checkbox.Checkbox\n\nexport interface CheckboxInputProps\n extends CheckboxInputStylesProps,\n Omit<ComponentPropsWithoutRef<'button'>, 'onChange' | 'value' | 'checked' | 'defaultChecked'> {\n /**\n * The checked icon to use.\n */\n icon?: ReactNode\n /**\n * The indeterminate icon to use.\n */\n indeterminateIcon?: ReactNode\n /**\n * The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.\n */\n defaultChecked?: boolean\n /**\n * The controlled checked state of the checkbox. Must be used in conjunction with onCheckedChange.\n */\n checked?: CheckedStatus\n /**\n * When true, prevents the user from interacting with the checkbox.\n */\n disabled?: boolean\n /**\n * When true, indicates that the user must check the checkbox before the owning form can be submitted.\n */\n required?: boolean\n /**\n * The name of the checkbox. Submitted with its owning form as part of a name/value pair.\n */\n name?: string\n /**\n * The value given as data when submitted with a name.\n */\n value?: string\n /**\n * Event handler called when the checked state of the checkbox changes.\n */\n onCheckedChange?: (checked: boolean) => void\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const CheckboxInput = ({\n className,\n icon = <Check />,\n indeterminateIcon = <Minus />,\n intent,\n checked,\n ref,\n ...others\n}: CheckboxInputProps) => (\n <CheckboxPrimitive\n ref={ref}\n className={checkboxInputStyles({ intent, className })}\n checked={checked}\n {...others}\n >\n <CheckboxIndicator>\n <Icon size=\"sm\">{checked === 'indeterminate' ? indeterminateIcon : icon}</Icon>\n </CheckboxIndicator>\n </CheckboxPrimitive>\n)\n\nCheckboxInput.displayName = 'CheckboxInput'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const labelStyles = cva('grow', {\n variants: {\n disabled: {\n true: ['text-neutral/dim-2', 'cursor-not-allowed'],\n false: ['cursor-pointer'],\n },\n },\n defaultVariants: {\n disabled: false,\n },\n})\n\nexport type LabelStylesProps = VariantProps<typeof labelStyles>\n","import { Label, LabelProps } from '../label'\nimport { labelStyles, type LabelStylesProps } from './CheckboxLabel.styles'\n\nexport interface CheckboxLabelProps extends LabelProps, LabelStylesProps {\n /**\n * When true, prevents the user from interacting with the checkbox item.\n */\n disabled?: boolean\n}\n\nexport const CheckboxLabel = ({ disabled, ...others }: CheckboxLabelProps) => (\n <Label className={labelStyles({ disabled })} {...others} />\n)\n\nCheckboxLabel.displayName = 'CheckboxLabel'\n","import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { cx } from 'class-variance-authority'\nimport { Ref, useId, useMemo, useRef } from 'react'\n\nimport { CheckboxGroupContextState, useCheckboxGroup } from './CheckboxGroupContext'\nimport { CheckboxInput, CheckboxInputProps } from './CheckboxInput'\nimport { CheckboxLabel } from './CheckboxLabel'\n\nexport type CheckboxProps = CheckboxInputProps &\n Pick<CheckboxGroupContextState, 'reverse'> & {\n ref?: Ref<HTMLButtonElement>\n }\n\nconst ID_PREFIX = ':checkbox'\n\nexport const Checkbox = ({\n id: idProp,\n className,\n intent: intentProp,\n checked: checkedProp,\n value,\n disabled,\n reverse = false,\n onCheckedChange,\n children,\n ref: forwardedRef,\n ...others\n}: CheckboxProps) => {\n const checkboxId = `${ID_PREFIX}-${useId()}`\n const innerId = idProp || checkboxId\n\n const innerLabelId = `${ID_PREFIX}-${useId()}`\n\n const field = useFormFieldControl()\n const group = useCheckboxGroup()\n\n const rootRef = useRef<HTMLButtonElement | undefined>(null)\n const ref = useMergeRefs(forwardedRef, rootRef)\n\n const getCheckboxAttributes = ({\n fieldState,\n groupState,\n checkboxIntent,\n }: {\n fieldState: ReturnType<typeof useFormFieldControl>\n groupState: ReturnType<typeof useCheckboxGroup>\n checkboxIntent: CheckboxInputProps['intent']\n }) => {\n const name = fieldState.name ?? groupState.name\n const isRequired = fieldState.isRequired ?? groupState.isRequired\n const state = fieldState.state ?? groupState.state\n const isInvalid = fieldState.isInvalid ?? groupState.isInvalid\n\n const isFieldEnclosed = fieldState.id !== groupState.id\n const id = isFieldEnclosed ? fieldState.id : undefined\n const description = isFieldEnclosed ? fieldState.description : undefined\n\n const intent = state ?? checkboxIntent ?? groupState.intent\n\n return { name, isRequired, isInvalid, id, description, intent }\n }\n\n const checked = value ? group.value?.includes(value) : checkedProp\n\n const handleCheckedChange = (isChecked: boolean) => {\n onCheckedChange?.(isChecked)\n\n const rootRefValue = rootRef.current?.value\n if (rootRefValue && group.onCheckedChange) {\n group.onCheckedChange(isChecked, rootRefValue)\n }\n }\n\n const {\n id,\n name,\n isInvalid,\n description,\n intent,\n isRequired: isRequiredAttr,\n } = getCheckboxAttributes({\n fieldState: field,\n groupState: group,\n checkboxIntent: intentProp,\n })\n\n const isRequired = useMemo(() => {\n if (!group) return isRequiredAttr\n\n return isRequiredAttr ? !group.value?.length : false\n }, [group, isRequiredAttr])\n\n const checkboxLabel = children && (\n <CheckboxLabel disabled={disabled} htmlFor={id || innerId} id={innerLabelId}>\n {children}\n </CheckboxLabel>\n )\n\n const checkboxInput = (\n <CheckboxInput\n ref={ref}\n id={id || innerId}\n name={name}\n value={value}\n intent={intent}\n checked={checked}\n disabled={disabled}\n required={isRequired}\n aria-describedby={description}\n aria-invalid={isInvalid}\n onCheckedChange={handleCheckedChange}\n aria-labelledby={children ? innerLabelId : field.labelId}\n {...others}\n />\n )\n\n const content =\n group.reverse || reverse ? (\n <>\n {checkboxLabel}\n {checkboxInput}\n </>\n ) : (\n <>\n {checkboxInput}\n {checkboxLabel}\n </>\n )\n\n return (\n <span\n data-spark-component=\"checkbox\"\n className={cx('gap-md text-body-1 relative flex items-start', className)}\n >\n {content}\n </span>\n )\n}\n\nCheckbox.displayName = 'Checkbox'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const checkboxGroupStyles = cva(['flex'], {\n variants: {\n /**\n * Prop to set the orientation of the checkbox group which could be `vertical` or `horizontal`.\n */\n orientation: {\n vertical: ['flex-col', 'gap-lg'],\n horizontal: ['gap-xl'],\n },\n },\n})\n\nexport type CheckboxGroupStylesProps = VariantProps<typeof checkboxGroupStyles>\n","import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { useCombinedState } from '@spark-ui/hooks/use-combined-state'\nimport { ComponentPropsWithoutRef, Ref, useEffect, useMemo, useRef } from 'react'\n\nimport { checkboxGroupStyles, CheckboxGroupStylesProps } from './CheckboxGroup.styles'\nimport { CheckboxGroupContext, CheckboxGroupContextState } from './CheckboxGroupContext'\n\nexport interface CheckboxGroupProps\n extends Omit<ComponentPropsWithoutRef<'div'>, 'value' | 'defaultValue' | 'onChange'>,\n CheckboxGroupStylesProps,\n Pick<CheckboxGroupContextState, 'intent' | 'name' | 'value' | 'reverse'> {\n /**\n * The initial value of the checkbox group\n */\n defaultValue?: string[]\n /**\n * The callback fired when any children Checkbox is checked or unchecked\n */\n onCheckedChange?: (value: string[]) => void\n ref?: Ref<HTMLDivElement>\n}\n\nexport const CheckboxGroup = ({\n name: nameProp,\n value: valueProp,\n defaultValue,\n className,\n intent,\n orientation = 'vertical',\n onCheckedChange: onCheckedChangeProp,\n reverse = false,\n children,\n ref,\n ...others\n}: CheckboxGroupProps) => {\n const [value, setValue] = useCombinedState(valueProp, defaultValue)\n const field = useFormFieldControl()\n const onCheckedChangeRef = useRef(onCheckedChangeProp)\n\n const { id, labelId, description, state, isInvalid, isRequired } = field\n const name = nameProp ?? field.name\n\n const current = useMemo(() => {\n const handleCheckedChange = (checked: boolean, changed: string) => {\n const values = value || []\n const modified = checked\n ? [...values, changed]\n : values.filter((val: string) => val !== changed)\n\n setValue(modified)\n\n if (onCheckedChangeRef.current) {\n onCheckedChangeRef.current(modified)\n }\n }\n\n return {\n id,\n name,\n value,\n intent,\n state,\n isInvalid,\n description,\n isRequired,\n reverse,\n onCheckedChange: handleCheckedChange,\n }\n }, [id, name, value, intent, state, isInvalid, description, isRequired, setValue, reverse])\n\n useEffect(() => {\n onCheckedChangeRef.current = onCheckedChangeProp\n }, [onCheckedChangeProp])\n\n return (\n <CheckboxGroupContext.Provider value={current}>\n <div\n ref={ref}\n className={checkboxGroupStyles({ className, orientation })}\n role=\"group\"\n aria-labelledby={labelId}\n aria-describedby={description}\n {...others}\n >\n {children}\n </div>\n </CheckboxGroupContext.Provider>\n )\n}\n\nCheckboxGroup.displayName = 'CheckboxGroup'\n"],"names":["CheckboxGroupContext","createContext","useCheckboxGroup","useContext","CheckboxIndicatorPrimitive","Checkbox","CheckboxIndicator","props","jsx","checkboxInputStyles","cva","makeVariants","CheckboxPrimitive","CheckboxInput","className","icon","Check","indeterminateIcon","Minus","intent","checked","ref","others","Icon","labelStyles","CheckboxLabel","disabled","Label","ID_PREFIX","idProp","intentProp","checkedProp","value","reverse","onCheckedChange","children","forwardedRef","checkboxId","useId","innerId","innerLabelId","field","useFormFieldControl","group","rootRef","useRef","useMergeRefs","getCheckboxAttributes","fieldState","groupState","checkboxIntent","name","isRequired","state","isInvalid","isFieldEnclosed","id","description","handleCheckedChange","isChecked","rootRefValue","isRequiredAttr","useMemo","checkboxLabel","checkboxInput","content","jsxs","Fragment","cx","checkboxGroupStyles","CheckboxGroup","nameProp","valueProp","defaultValue","orientation","onCheckedChangeProp","setValue","useCombinedState","onCheckedChangeRef","labelId","current","changed","values","modified","val","useEffect"],"mappings":";;;;;;;;;;;;AA2CO,MAAMA,IAAuBC,GAAkD,EAAE,GAE3EC,KAAmB,MACdC,GAAWH,CAAoB,GC3C3CI,KAA6BC,EAAS,mBAM/BC,IAAoB,CAACC,MAChC,gBAAAC,E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
+ type ExtentedZagInterface = Omit<ComponentProps<typeof BaseAccordion.Root>, 'multiple' | 'render'>;
4
+ export interface AccordionProps extends ExtentedZagInterface {
5
+ /**
6
+ * Change the default rendered element for the one passed as a child, merging their props and behavior.
7
+ */
8
+ asChild?: boolean;
9
+ /**
10
+ * Whether the accordion items are disabled
11
+ */
12
+ disabled?: boolean;
13
+ /**
14
+ * Whether multiple items can be open at the same time.
15
+ */
16
+ multiple?: boolean;
17
+ design?: 'filled' | 'outlined';
18
+ ref?: Ref<HTMLDivElement>;
19
+ }
20
+ export declare const Accordion: {
21
+ ({ asChild, children, design, hiddenUntilFound, multiple, className, ref, ...props }: AccordionProps): import("react/jsx-runtime").JSX.Element;
22
+ displayName: string;
23
+ };
24
+ export declare const useAccordionContext: () => {
25
+ design: "filled" | "outlined";
26
+ };
27
+ export {};
@@ -0,0 +1,12 @@
1
+ import { Accordion as BaseAccordion } from '@base-ui/react/accordion';
2
+ import { ComponentProps, Ref } from 'react';
3
+ type ExtentedZagInterface = Omit<ComponentProps<typeof BaseAccordion.Item>, 'render'>;
4
+ export interface AccordionItemProps extends ExtentedZagInterface {
5
+ asChild?: boolean;
6
+ ref?: Ref<HTMLDivElement>;
7
+ }
8
+ export declare const Item: {
9
+ ({ asChild, className, children, ref, ...props }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ export {};
@@ -0,0 +1,12 @@
1
+ import { Accordion as BaseAccordion } from '@base-ui/react/accordion';
2
+ import { ComponentProps, Ref } from 'react';
3
+ type ExtentedZagInterface = Omit<ComponentProps<typeof BaseAccordion.Panel>, 'render'>;
4
+ export interface AccordionItemContentProps extends ExtentedZagInterface {
5
+ asChild?: boolean;
6
+ ref?: Ref<HTMLDivElement>;
7
+ }
8
+ export declare const ItemContent: {
9
+ ({ asChild, className, children, ref, ...props }: AccordionItemContentProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ComponentProps, Ref } from 'react';
2
+ export interface AccordionItemHeaderProps extends ComponentProps<'h3'> {
3
+ asChild?: boolean;
4
+ ref?: Ref<HTMLHeadingElement>;
5
+ }
6
+ export declare const ItemHeader: {
7
+ ({ asChild, children, className, ref, }: AccordionItemHeaderProps): import("react/jsx-runtime").JSX.Element;
8
+ displayName: string;
9
+ };
@@ -0,0 +1,12 @@
1
+ import { Accordion as BaseAccordion } from '@base-ui/react/accordion';
2
+ import { ComponentProps, Ref } from 'react';
3
+ type ExtentedZagInterface = Omit<ComponentProps<typeof BaseAccordion.Trigger>, 'render'>;
4
+ export interface AccordionItemTriggerProps extends ExtentedZagInterface {
5
+ asChild?: boolean;
6
+ ref?: Ref<HTMLButtonElement>;
7
+ }
8
+ export declare const ItemTrigger: {
9
+ ({ asChild, children, className, ref, ...props }: AccordionItemTriggerProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ export {};
@@ -0,0 +1,15 @@
1
+ import { Accordion as Root } from './Accordion';
2
+ import { Item } from './AccordionItem';
3
+ import { ItemContent } from './AccordionItemContent';
4
+ import { ItemHeader } from './AccordionItemHeader';
5
+ import { ItemTrigger } from './AccordionItemTrigger';
6
+ export declare const Accordion: typeof Root & {
7
+ Item: typeof Item;
8
+ ItemHeader: typeof ItemHeader;
9
+ ItemTrigger: typeof ItemTrigger;
10
+ ItemContent: typeof ItemContent;
11
+ };
12
+ export { type AccordionProps } from './Accordion';
13
+ export { type AccordionItemHeaderProps } from './AccordionItemHeader';
14
+ export { type AccordionItemContentProps } from './AccordionItemContent';
15
+ export { type AccordionItemTriggerProps } from './AccordionItemTrigger';
@@ -0,0 +1,15 @@
1
+ import { Accordion as Root } from './Accordion';
2
+ import { Item } from './AccordionItem';
3
+ import { ItemContent } from './AccordionItemContent';
4
+ import { ItemHeader } from './AccordionItemHeader';
5
+ import { ItemTrigger } from './AccordionItemTrigger';
6
+ export declare const Accordion: typeof Root & {
7
+ Item: typeof Item;
8
+ ItemHeader: typeof ItemHeader;
9
+ ItemTrigger: typeof ItemTrigger;
10
+ ItemContent: typeof ItemContent;
11
+ };
12
+ export { type AccordionProps } from './Accordion';
13
+ export { type AccordionItemHeaderProps } from './AccordionItemHeader';
14
+ export { type AccordionItemContentProps } from './AccordionItemContent';
15
+ export { type AccordionItemTriggerProps } from './AccordionItemTrigger';
@@ -0,0 +1,3 @@
1
+ export declare function useRenderSlot(asChild: boolean, defaultTag: string): (({ ...props }: {
2
+ [x: string]: any;
3
+ }) => import("react/jsx-runtime").JSX.Element) | undefined;
@@ -0,0 +1,29 @@
1
+ import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
2
+ import { ComponentProps, Ref } from 'react';
3
+ export interface AlertDialogProps extends Omit<ComponentProps<typeof BaseAlertDialog.Root>, 'onOpenChange' | 'render'> {
4
+ /**
5
+ * Specifies if the dialog is open or not.
6
+ */
7
+ open?: boolean;
8
+ /**
9
+ * Default open state.
10
+ */
11
+ defaultOpen?: boolean;
12
+ /**
13
+ * Handler executed on every dialog open state change.
14
+ */
15
+ onOpenChange?: (open: boolean) => void;
16
+ /**
17
+ * Specifies if the dialog should have a fade animation on its body (in case it is scrollable).
18
+ */
19
+ withFade?: boolean;
20
+ /**
21
+ * Change the default rendered element for the one passed as a child, merging their props and behavior.
22
+ */
23
+ asChild?: boolean;
24
+ ref?: Ref<HTMLDivElement>;
25
+ }
26
+ export declare const AlertDialog: {
27
+ ({ onOpenChange, withFade, ...props }: AlertDialogProps): import("react/jsx-runtime").JSX.Element;
28
+ displayName: string;
29
+ };
@@ -0,0 +1,13 @@
1
+ import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
2
+ import { ComponentProps, Ref } from 'react';
3
+ export interface AlertDialogActionProps extends Omit<ComponentProps<typeof BaseAlertDialog.Close>, 'render'> {
4
+ /**
5
+ * Change the default rendered element for the one passed as a child, merging their props and behavior.
6
+ */
7
+ asChild?: boolean;
8
+ ref?: Ref<HTMLButtonElement>;
9
+ }
10
+ export declare const AlertDialogAction: {
11
+ ({ asChild, ...props }: AlertDialogActionProps): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ };
@@ -0,0 +1,12 @@
1
+ import { ReactElement, ReactNode, Ref } from 'react';
2
+ export interface AlertDialogBodyProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ tabIndex?: number;
6
+ ref?: Ref<HTMLDivElement>;
7
+ inset?: boolean;
8
+ }
9
+ export declare const AlertDialogBody: {
10
+ ({ children, className, inset, ref: forwardedRef, ...rest }: AlertDialogBodyProps): ReactElement;
11
+ displayName: string;
12
+ };
@@ -0,0 +1,13 @@
1
+ import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
2
+ import { ComponentProps, Ref } from 'react';
3
+ export interface AlertDialogCancelProps extends Omit<ComponentProps<typeof BaseAlertDialog.Close>, 'render'> {
4
+ /**
5
+ * Change the default rendered element for the one passed as a child, merging their props and behavior.
6
+ */
7
+ asChild?: boolean;
8
+ ref?: Ref<HTMLButtonElement>;
9
+ }
10
+ export declare const AlertDialogCancel: {
11
+ ({ asChild, ref: forwardedRef, ...props }: AlertDialogCancelProps): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ };
@@ -0,0 +1,9 @@
1
+ import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
2
+ import { ComponentProps, Ref } from 'react';
3
+ export interface AlertDialogContentProps extends Omit<ComponentProps<typeof BaseAlertDialog.Popup>, 'render'> {
4
+ ref?: Ref<HTMLDivElement>;
5
+ }
6
+ export declare const AlertDialogContent: {
7
+ ({ className, ref, initialFocus, ...others }: AlertDialogContentProps): import("react/jsx-runtime").JSX.Element;
8
+ displayName: string;
9
+ };
@@ -0,0 +1,12 @@
1
+ import { MutableRefObject, ReactNode } from 'react';
2
+ export interface AlertDialogContextValue {
3
+ cancelRef: MutableRefObject<HTMLButtonElement | null>;
4
+ withFade: boolean;
5
+ }
6
+ export declare const AlertDialogContext: import('react').Context<AlertDialogContextValue | null>;
7
+ export declare const AlertDialogProvider: ({ children, withFade, cancelRef, }: {
8
+ children: ReactNode;
9
+ withFade?: boolean;
10
+ cancelRef: MutableRefObject<HTMLButtonElement | null>;
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const useAlertDialog: () => AlertDialogContextValue;
@@ -0,0 +1,9 @@
1
+ import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
2
+ import { ComponentProps, Ref } from 'react';
3
+ export interface AlertDialogDescriptionProps extends Omit<ComponentProps<typeof BaseAlertDialog.Description>, 'render'> {
4
+ ref?: Ref<HTMLParagraphElement>;
5
+ }
6
+ export declare const AlertDialogDescription: {
7
+ (props: AlertDialogDescriptionProps): import("react/jsx-runtime").JSX.Element;
8
+ displayName: string;
9
+ };
@@ -0,0 +1,10 @@
1
+ import { ReactElement, ReactNode, Ref } from 'react';
2
+ export interface AlertDialogFooterProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ ref?: Ref<HTMLDivElement>;
6
+ }
7
+ export declare const AlertDialogFooter: {
8
+ ({ children, className, ref, ...rest }: AlertDialogFooterProps): ReactElement;
9
+ displayName: string;
10
+ };
@@ -0,0 +1,10 @@
1
+ import { ReactElement, ReactNode, Ref } from 'react';
2
+ export interface AlertDialogHeaderProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ ref?: Ref<HTMLDivElement>;
6
+ }
7
+ export declare const AlertDialogHeader: {
8
+ ({ children, className, ref, ...rest }: AlertDialogHeaderProps): ReactElement;
9
+ displayName: string;
10
+ };
@@ -0,0 +1,9 @@
1
+ import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
2
+ import { ComponentProps, Ref } from 'react';
3
+ export interface AlertDialogOverlayProps extends Omit<ComponentProps<typeof BaseAlertDialog.Backdrop>, 'render'> {
4
+ ref?: Ref<HTMLDivElement>;
5
+ }
6
+ export declare const AlertDialogOverlay: {
7
+ ({ className, ...props }: AlertDialogOverlayProps): import("react/jsx-runtime").JSX.Element;
8
+ displayName: string;
9
+ };
@@ -0,0 +1,7 @@
1
+ import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
2
+ import { ComponentProps } from 'react';
3
+ export type AlertDialogPortalProps = ComponentProps<typeof BaseAlertDialog.Portal>;
4
+ export declare const AlertDialogPortal: {
5
+ ({ className, ...props }: AlertDialogPortalProps): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
@@ -0,0 +1,9 @@
1
+ import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
2
+ import { ComponentProps, Ref } from 'react';
3
+ export interface AlertDialogTitleProps extends Omit<ComponentProps<typeof BaseAlertDialog.Title>, 'render'> {
4
+ ref?: Ref<HTMLHeadingElement>;
5
+ }
6
+ export declare const AlertDialogTitle: {
7
+ ({ className, ...props }: AlertDialogTitleProps): import("react/jsx-runtime").JSX.Element;
8
+ displayName: string;
9
+ };
@@ -0,0 +1,13 @@
1
+ import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
2
+ import { ComponentProps, Ref } from 'react';
3
+ export interface AlertDialogTriggerProps extends Omit<ComponentProps<typeof BaseAlertDialog.Trigger>, 'render'> {
4
+ /**
5
+ * Change the default rendered element for the one passed as a child, merging their props and behavior.
6
+ */
7
+ asChild?: boolean;
8
+ ref?: Ref<HTMLButtonElement>;
9
+ }
10
+ export declare const AlertDialogTrigger: {
11
+ ({ asChild, ...props }: AlertDialogTriggerProps): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ };
@@ -0,0 +1,38 @@
1
+ import { AlertDialog as Root } from './AlertDialog';
2
+ import { AlertDialogAction } from './AlertDialogAction';
3
+ import { AlertDialogBody } from './AlertDialogBody';
4
+ import { AlertDialogCancel } from './AlertDialogCancel';
5
+ import { AlertDialogContent } from './AlertDialogContent';
6
+ import { AlertDialogDescription } from './AlertDialogDescription';
7
+ import { AlertDialogFooter } from './AlertDialogFooter';
8
+ import { AlertDialogHeader } from './AlertDialogHeader';
9
+ import { AlertDialogOverlay } from './AlertDialogOverlay';
10
+ import { AlertDialogPortal } from './AlertDialogPortal';
11
+ import { AlertDialogTitle } from './AlertDialogTitle';
12
+ import { AlertDialogTrigger } from './AlertDialogTrigger';
13
+ export * from './AlertDialog';
14
+ export { useAlertDialog } from './AlertDialogContext';
15
+ export { type AlertDialogActionProps } from './AlertDialogAction';
16
+ export { type AlertDialogBodyProps } from './AlertDialogBody';
17
+ export { type AlertDialogCancelProps } from './AlertDialogCancel';
18
+ export { type AlertDialogContentProps } from './AlertDialogContent';
19
+ export { type AlertDialogDescriptionProps } from './AlertDialogDescription';
20
+ export { type AlertDialogFooterProps } from './AlertDialogFooter';
21
+ export { type AlertDialogHeaderProps } from './AlertDialogHeader';
22
+ export { type AlertDialogOverlayProps } from './AlertDialogOverlay';
23
+ export { type AlertDialogPortalProps } from './AlertDialogPortal';
24
+ export { type AlertDialogTitleProps } from './AlertDialogTitle';
25
+ export { type AlertDialogTriggerProps } from './AlertDialogTrigger';
26
+ export declare const AlertDialog: typeof Root & {
27
+ Action: typeof AlertDialogAction;
28
+ Body: typeof AlertDialogBody;
29
+ Cancel: typeof AlertDialogCancel;
30
+ Content: typeof AlertDialogContent;
31
+ Description: typeof AlertDialogDescription;
32
+ Footer: typeof AlertDialogFooter;
33
+ Header: typeof AlertDialogHeader;
34
+ Overlay: typeof AlertDialogOverlay;
35
+ Portal: typeof AlertDialogPortal;
36
+ Title: typeof AlertDialogTitle;
37
+ Trigger: typeof AlertDialogTrigger;
38
+ };
@@ -0,0 +1,38 @@
1
+ import { AlertDialog as Root } from './AlertDialog';
2
+ import { AlertDialogAction } from './AlertDialogAction';
3
+ import { AlertDialogBody } from './AlertDialogBody';
4
+ import { AlertDialogCancel } from './AlertDialogCancel';
5
+ import { AlertDialogContent } from './AlertDialogContent';
6
+ import { AlertDialogDescription } from './AlertDialogDescription';
7
+ import { AlertDialogFooter } from './AlertDialogFooter';
8
+ import { AlertDialogHeader } from './AlertDialogHeader';
9
+ import { AlertDialogOverlay } from './AlertDialogOverlay';
10
+ import { AlertDialogPortal } from './AlertDialogPortal';
11
+ import { AlertDialogTitle } from './AlertDialogTitle';
12
+ import { AlertDialogTrigger } from './AlertDialogTrigger';
13
+ export * from './AlertDialog';
14
+ export { useAlertDialog } from './AlertDialogContext';
15
+ export { type AlertDialogActionProps } from './AlertDialogAction';
16
+ export { type AlertDialogBodyProps } from './AlertDialogBody';
17
+ export { type AlertDialogCancelProps } from './AlertDialogCancel';
18
+ export { type AlertDialogContentProps } from './AlertDialogContent';
19
+ export { type AlertDialogDescriptionProps } from './AlertDialogDescription';
20
+ export { type AlertDialogFooterProps } from './AlertDialogFooter';
21
+ export { type AlertDialogHeaderProps } from './AlertDialogHeader';
22
+ export { type AlertDialogOverlayProps } from './AlertDialogOverlay';
23
+ export { type AlertDialogPortalProps } from './AlertDialogPortal';
24
+ export { type AlertDialogTitleProps } from './AlertDialogTitle';
25
+ export { type AlertDialogTriggerProps } from './AlertDialogTrigger';
26
+ export declare const AlertDialog: typeof Root & {
27
+ Action: typeof AlertDialogAction;
28
+ Body: typeof AlertDialogBody;
29
+ Cancel: typeof AlertDialogCancel;
30
+ Content: typeof AlertDialogContent;
31
+ Description: typeof AlertDialogDescription;
32
+ Footer: typeof AlertDialogFooter;
33
+ Header: typeof AlertDialogHeader;
34
+ Overlay: typeof AlertDialogOverlay;
35
+ Portal: typeof AlertDialogPortal;
36
+ Title: typeof AlertDialogTitle;
37
+ Trigger: typeof AlertDialogTrigger;
38
+ };
@@ -0,0 +1,3 @@
1
+ export declare function useRenderSlot(asChild: boolean, defaultTag: string): (({ ...props }: {
2
+ [x: string]: any;
3
+ }) => import("react/jsx-runtime").JSX.Element) | undefined;