@spark-ui/components 13.1.4 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button-B6rA3-e5.js +2 -0
- package/dist/Button-B6rA3-e5.js.map +1 -0
- package/dist/{chunk-2YM6GKWW.mjs → Button-C3C0aixy.mjs} +130 -173
- package/dist/Button-C3C0aixy.mjs.map +1 -0
- package/dist/DialogContent.styles-B5pR8ECK.js +2 -0
- package/dist/DialogContent.styles-B5pR8ECK.js.map +1 -0
- package/dist/{chunk-XZ47F6TP.mjs → DialogContent.styles-_lRDsl8c.mjs} +6 -8
- package/dist/DialogContent.styles-_lRDsl8c.mjs.map +1 -0
- package/dist/Icon-CF0W0LKr.js +2 -0
- package/dist/Icon-CF0W0LKr.js.map +1 -0
- package/dist/Icon-Ck-dhfLd.mjs +58 -0
- package/dist/Icon-Ck-dhfLd.mjs.map +1 -0
- package/dist/IconButton-C62-axzv.mjs +43 -0
- package/dist/IconButton-C62-axzv.mjs.map +1 -0
- package/dist/IconButton-D3g86WpZ.js +2 -0
- package/dist/IconButton-D3g86WpZ.js.map +1 -0
- package/dist/Slot-D2Bbf8Gw.mjs +14 -0
- package/dist/Slot-D2Bbf8Gw.mjs.map +1 -0
- package/dist/Slot-DQ8z2zsy.js +2 -0
- package/dist/Slot-DQ8z2zsy.js.map +1 -0
- package/dist/Spinner-_Kffli3B.js +2 -0
- package/dist/Spinner-_Kffli3B.js.map +1 -0
- package/dist/{chunk-GAK4SC2F.mjs → Spinner-jF3-zoh_.mjs} +29 -40
- package/dist/Spinner-jF3-zoh_.mjs.map +1 -0
- package/dist/{chunk-RKPP7ZOK.mjs → TextLink-BuzFRWO6.mjs} +27 -36
- package/dist/TextLink-BuzFRWO6.mjs.map +1 -0
- package/dist/TextLink-C3xDLsbC.js +2 -0
- package/dist/TextLink-C3xDLsbC.js.map +1 -0
- package/dist/VisuallyHidden-CB6Nx76j.js +2 -0
- package/dist/VisuallyHidden-CB6Nx76j.js.map +1 -0
- package/dist/VisuallyHidden-KH1biLx-.mjs +28 -0
- package/dist/VisuallyHidden-KH1biLx-.mjs.map +1 -0
- package/dist/accordion/Accordion.d.ts +27 -0
- package/dist/accordion/AccordionItem.d.ts +12 -0
- package/dist/accordion/AccordionItemContent.d.ts +12 -0
- package/dist/accordion/AccordionItemHeader.d.ts +9 -0
- package/dist/accordion/AccordionItemTrigger.d.ts +12 -0
- package/dist/accordion/index.d.mts +10 -68
- package/dist/accordion/index.d.ts +10 -68
- package/dist/accordion/index.js +2 -325
- package/dist/accordion/index.js.map +1 -1
- package/dist/accordion/index.mjs +114 -154
- package/dist/accordion/index.mjs.map +1 -1
- package/dist/accordion/useRenderSlot.d.ts +3 -0
- package/dist/alert-dialog/AlertDialog.d.ts +29 -0
- package/dist/alert-dialog/AlertDialogAction.d.ts +13 -0
- package/dist/alert-dialog/AlertDialogBody.d.ts +12 -0
- package/dist/alert-dialog/AlertDialogCancel.d.ts +13 -0
- package/dist/alert-dialog/AlertDialogContent.d.ts +9 -0
- package/dist/alert-dialog/AlertDialogContext.d.ts +12 -0
- package/dist/alert-dialog/AlertDialogDescription.d.ts +9 -0
- package/dist/alert-dialog/AlertDialogFooter.d.ts +10 -0
- package/dist/alert-dialog/AlertDialogHeader.d.ts +10 -0
- package/dist/alert-dialog/AlertDialogOverlay.d.ts +9 -0
- package/dist/alert-dialog/AlertDialogPortal.d.ts +7 -0
- package/dist/alert-dialog/AlertDialogTitle.d.ts +9 -0
- package/dist/alert-dialog/AlertDialogTrigger.d.ts +13 -0
- package/dist/alert-dialog/index.d.mts +26 -147
- package/dist/alert-dialog/index.d.ts +26 -147
- package/dist/alert-dialog/index.js +2 -405
- package/dist/alert-dialog/index.js.map +1 -1
- package/dist/alert-dialog/index.mjs +172 -260
- package/dist/alert-dialog/index.mjs.map +1 -1
- package/dist/alert-dialog/useRenderSlot.d.ts +3 -0
- package/dist/avatar/Avatar.d.ts +3 -0
- package/dist/avatar/AvatarAction.d.ts +9 -0
- package/dist/avatar/AvatarImage.d.ts +7 -0
- package/dist/avatar/AvatarOnlineBadge.d.ts +9 -0
- package/dist/avatar/AvatarPlaceholder.d.ts +8 -0
- package/dist/avatar/AvatarUser.d.ts +7 -0
- package/dist/avatar/context.d.ts +5 -0
- package/dist/avatar/index.d.mts +8 -59
- package/dist/avatar/index.d.ts +8 -59
- package/dist/avatar/index.js +2 -1323
- package/dist/avatar/index.js.map +1 -1
- package/dist/avatar/index.mjs +149 -207
- package/dist/avatar/index.mjs.map +1 -1
- package/dist/avatar/types.d.ts +24 -0
- package/dist/badge/Badge.d.ts +9 -0
- package/dist/badge/BadgeItem.d.ts +31 -0
- package/dist/badge/BadgeItem.styles.d.ts +7 -0
- package/dist/badge/index.d.mts +1 -47
- package/dist/badge/index.d.ts +1 -47
- package/dist/badge/index.js +2 -122
- package/dist/badge/index.js.map +1 -1
- package/dist/badge/index.mjs +32 -44
- package/dist/badge/index.mjs.map +1 -1
- package/dist/breadcrumb/Breadcrumb.d.ts +10 -0
- package/dist/breadcrumb/Breadcrumb.styles.d.ts +0 -0
- package/dist/breadcrumb/BreadcrumbCurrentPage.d.ts +11 -0
- package/dist/breadcrumb/BreadcrumbItem.d.ts +9 -0
- package/dist/breadcrumb/BreadcrumbLink.d.ts +12 -0
- package/dist/breadcrumb/BreadcrumbSeparator.d.ts +10 -0
- package/dist/breadcrumb/index.d.mts +7 -59
- package/dist/breadcrumb/index.d.ts +7 -59
- package/dist/breadcrumb/index.js +2 -327
- package/dist/breadcrumb/index.js.map +1 -1
- package/dist/breadcrumb/index.mjs +106 -146
- package/dist/breadcrumb/index.mjs.map +1 -1
- package/dist/button/Button.d.ts +26 -0
- package/dist/button/Button.styles.d.ts +10 -0
- package/dist/button/index.d.mts +1 -41
- package/dist/button/index.d.ts +1 -41
- package/dist/button/index.js +2 -935
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +3 -8
- package/dist/button/index.mjs.map +1 -1
- package/dist/button/variants/contrast.d.ts +45 -0
- package/dist/button/variants/filled.d.ts +45 -0
- package/dist/button/variants/ghost.d.ts +45 -0
- package/dist/button/variants/index.d.mts +5 -0
- package/dist/button/variants/index.d.ts +5 -0
- package/dist/button/variants/outlined.d.ts +45 -0
- package/dist/button/variants/tinted.d.ts +45 -0
- package/dist/card/Backdrop.d.ts +14 -0
- package/dist/card/Card.d.ts +16 -0
- package/dist/card/Card.styles.d.ts +7 -0
- package/dist/card/Content.d.ts +15 -0
- package/dist/card/Content.styles.d.ts +8 -0
- package/dist/card/context.d.ts +11 -0
- package/dist/card/index.d.mts +5 -58
- package/dist/card/index.d.ts +5 -58
- package/dist/card/index.js +2 -502
- package/dist/card/index.js.map +1 -1
- package/dist/card/index.mjs +125 -178
- package/dist/card/index.mjs.map +1 -1
- package/dist/card/utils.d.ts +3 -0
- package/dist/carousel/Carousel.d.ts +12 -0
- package/dist/carousel/CarouselControls.d.ts +9 -0
- package/dist/carousel/CarouselNextButton.d.ts +5 -0
- package/dist/carousel/CarouselPageIndicator.d.ts +14 -0
- package/dist/carousel/CarouselPagePicker.d.ts +14 -0
- package/dist/carousel/CarouselPrevButton.d.ts +5 -0
- package/dist/carousel/CarouselSlide.d.ts +12 -0
- package/dist/carousel/CarouselSlides.d.ts +10 -0
- package/dist/carousel/CarouselViewport.d.ts +9 -0
- package/dist/carousel/index.d.mts +18 -263
- package/dist/carousel/index.d.ts +18 -263
- package/dist/carousel/index.js +2 -1882
- package/dist/carousel/index.js.map +1 -1
- package/dist/carousel/index.mjs +428 -650
- package/dist/carousel/index.mjs.map +1 -1
- package/dist/carousel/types.d.ts +165 -0
- package/dist/carousel/useCarousel.d.ts +2 -0
- package/dist/carousel/useCarouselVisibility.d.ts +13 -0
- package/dist/carousel/useEvent.d.ts +7 -0
- package/dist/carousel/useIsMounted.d.ts +1 -0
- package/dist/carousel/useIsVisible.d.ts +6 -0
- package/dist/carousel/useResizeObserver.d.ts +2 -0
- package/dist/carousel/useScrollEnd.d.ts +3 -0
- package/dist/carousel/useSnapPoints.d.ts +10 -0
- package/dist/carousel/utils.d.ts +24 -0
- package/dist/checkbox/Checkbox.d.ts +10 -0
- package/dist/checkbox/CheckboxGroup.d.ts +18 -0
- package/dist/checkbox/CheckboxGroup.styles.d.ts +5 -0
- package/dist/checkbox/CheckboxGroupContext.d.ts +41 -0
- package/dist/checkbox/CheckboxIndicator.d.ts +9 -0
- package/dist/checkbox/CheckboxInput.d.ts +47 -0
- package/dist/checkbox/CheckboxInput.styles.d.ts +5 -0
- package/dist/checkbox/CheckboxLabel.d.ts +12 -0
- package/dist/checkbox/CheckboxLabel.styles.d.ts +5 -0
- package/dist/checkbox/index.d.mts +2 -120
- package/dist/checkbox/index.d.ts +2 -120
- package/dist/checkbox/index.js +2 -511
- package/dist/checkbox/index.js.map +1 -1
- package/dist/checkbox/index.mjs +135 -226
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chip/Chip.d.ts +34 -0
- package/dist/chip/Chip.styles.d.ts +8 -0
- package/dist/chip/ChipClearButton.d.ts +10 -0
- package/dist/chip/ChipClearButton.styles.d.ts +10 -0
- package/dist/chip/ChipContent.d.ts +8 -0
- package/dist/chip/ChipIcon.d.ts +8 -0
- package/dist/chip/ChipLeadingIcon.d.ts +9 -0
- package/dist/chip/ChipTrailingIcon.d.ts +9 -0
- package/dist/chip/index.d.mts +10 -92
- package/dist/chip/index.d.ts +10 -92
- package/dist/chip/index.js +2 -908
- package/dist/chip/index.js.map +1 -1
- package/dist/chip/index.mjs +218 -324
- package/dist/chip/index.mjs.map +1 -1
- package/dist/chip/useChipContext.d.ts +4 -0
- package/dist/chip/useChipElement.d.ts +41 -0
- package/dist/chip/variants/dashed.d.ts +49 -0
- package/dist/chip/variants/index.d.mts +3 -0
- package/dist/chip/variants/index.d.ts +3 -0
- package/dist/chip/variants/outlined.d.ts +49 -0
- package/dist/chip/variants/tinted.d.ts +49 -0
- package/dist/collapsible/Content.d.ts +12 -0
- package/dist/collapsible/Root.d.ts +12 -0
- package/dist/collapsible/Trigger.d.ts +11 -0
- package/dist/collapsible/index.d.mts +4 -40
- package/dist/collapsible/index.d.ts +4 -40
- package/dist/collapsible/index.js +2 -109
- package/dist/collapsible/index.js.map +1 -1
- package/dist/collapsible/index.mjs +39 -58
- package/dist/collapsible/index.mjs.map +1 -1
- package/dist/collapsible/useRenderSlot.d.ts +3 -0
- package/dist/combobox/Combobox.d.ts +6 -0
- package/dist/combobox/ComboboxClearButton.d.ts +9 -0
- package/dist/combobox/ComboboxContext.d.ts +108 -0
- package/dist/combobox/ComboboxDisclosure.d.ts +13 -0
- package/dist/combobox/ComboboxEmpty.d.ts +11 -0
- package/dist/combobox/ComboboxGroup.d.ts +11 -0
- package/dist/combobox/ComboboxInput.d.ts +15 -0
- package/dist/combobox/ComboboxItem.d.ts +12 -0
- package/dist/combobox/ComboboxItemContext.d.ts +17 -0
- package/dist/combobox/ComboboxItemIndicator.d.ts +11 -0
- package/dist/combobox/ComboboxItemText.d.ts +10 -0
- package/dist/combobox/ComboboxItems.d.ts +11 -0
- package/dist/combobox/ComboboxItemsGroupContext.d.ts +8 -0
- package/dist/combobox/ComboboxLabel.d.ts +11 -0
- package/dist/combobox/ComboboxLeadingIcon.d.ts +7 -0
- package/dist/combobox/ComboboxPopover.d.ts +10 -0
- package/dist/combobox/ComboboxPortal.d.ts +2 -0
- package/dist/combobox/ComboboxSelectedItems.d.ts +4 -0
- package/dist/combobox/ComboboxTrigger.d.ts +11 -0
- package/dist/combobox/ComboboxTrigger.styles.d.ts +6 -0
- package/dist/combobox/index.d.mts +19 -271
- package/dist/combobox/index.d.ts +19 -271
- package/dist/combobox/index.js +2 -2588
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +623 -1017
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/combobox/tests/test-utils.d.ts +8 -0
- package/dist/combobox/types.d.ts +8 -0
- package/dist/combobox/useCombobox/multipleSelectionReducer.d.ts +13 -0
- package/dist/combobox/useCombobox/singleSelectionReducer.d.ts +8 -0
- package/dist/combobox/utils/index.d.mts +14 -0
- package/dist/combobox/utils/index.d.ts +14 -0
- package/dist/combobox/utils/useWidthIncreaseCallback.d.ts +2 -0
- package/dist/dialog/Dialog.d.ts +32 -0
- package/dist/dialog/DialogBody.d.ts +12 -0
- package/dist/dialog/DialogClose.d.ts +9 -0
- package/dist/dialog/DialogCloseButton.d.ts +9 -0
- package/dist/dialog/DialogContent.d.ts +14 -0
- package/dist/dialog/DialogContent.styles.d.ts +6 -0
- package/dist/dialog/DialogContext.d.ts +11 -0
- package/dist/dialog/DialogDescription.d.ts +9 -0
- package/dist/dialog/DialogFooter.d.ts +10 -0
- package/dist/dialog/DialogHeader.d.ts +10 -0
- package/dist/dialog/DialogOverlay.d.ts +9 -0
- package/dist/dialog/DialogPortal.d.ts +7 -0
- package/dist/dialog/DialogTitle.d.ts +9 -0
- package/dist/dialog/DialogTrigger.d.ts +17 -0
- package/dist/dialog/index.d.mts +25 -154
- package/dist/dialog/index.d.ts +25 -154
- package/dist/dialog/index.js +2 -1389
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +163 -258
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/divider/Divider.d.ts +30 -0
- package/dist/divider/Divider.styles.d.ts +9 -0
- package/dist/divider/DividerContent.d.ts +13 -0
- package/dist/divider/index.d.mts +4 -59
- package/dist/divider/index.d.ts +4 -59
- package/dist/divider/index.js +2 -224
- package/dist/divider/index.js.map +1 -1
- package/dist/divider/index.mjs +79 -100
- package/dist/divider/index.mjs.map +1 -1
- package/dist/divider/variants/intents.d.ts +17 -0
- package/dist/drawer/Drawer.d.ts +39 -0
- package/dist/drawer/DrawerBody.d.ts +11 -0
- package/dist/drawer/DrawerBody.styles.d.ts +5 -0
- package/dist/drawer/DrawerClose.d.ts +9 -0
- package/dist/drawer/DrawerCloseButton.d.ts +7 -0
- package/dist/drawer/DrawerContent.d.ts +10 -0
- package/dist/drawer/DrawerContent.styles.d.ts +6 -0
- package/dist/drawer/DrawerContext.d.ts +9 -0
- package/dist/drawer/DrawerDescription.d.ts +9 -0
- package/dist/drawer/DrawerFooter.d.ts +8 -0
- package/dist/drawer/DrawerHeader.d.ts +10 -0
- package/dist/drawer/DrawerOverlay.d.ts +9 -0
- package/dist/drawer/DrawerPortal.d.ts +7 -0
- package/dist/drawer/DrawerTitle.d.ts +9 -0
- package/dist/drawer/DrawerTrigger.d.ts +13 -0
- package/dist/drawer/index.d.mts +24 -141
- package/dist/drawer/index.d.ts +24 -141
- package/dist/drawer/index.js +2 -1400
- package/dist/drawer/index.js.map +1 -1
- package/dist/drawer/index.mjs +141 -230
- package/dist/drawer/index.mjs.map +1 -1
- package/dist/dropdown/Dropdown.d.ts +6 -0
- package/dist/dropdown/DropdownContext.d.ts +81 -0
- package/dist/dropdown/DropdownDivider.d.ts +10 -0
- package/dist/dropdown/DropdownGroup.d.ts +11 -0
- package/dist/dropdown/DropdownItem.d.ts +12 -0
- package/dist/dropdown/DropdownItemContext.d.ts +17 -0
- package/dist/dropdown/DropdownItemIndicator.d.ts +11 -0
- package/dist/dropdown/DropdownItemText.d.ts +9 -0
- package/dist/dropdown/DropdownItems.d.ts +21 -0
- package/dist/dropdown/DropdownItemsGroupContext.d.ts +8 -0
- package/dist/dropdown/DropdownLabel.d.ts +11 -0
- package/dist/dropdown/DropdownLeadingIcon.d.ts +7 -0
- package/dist/dropdown/DropdownPopover.d.ts +6 -0
- package/dist/dropdown/DropdownPortal.d.ts +2 -0
- package/dist/dropdown/DropdownTrigger.d.ts +12 -0
- package/dist/dropdown/DropdownTrigger.styles.d.ts +5 -0
- package/dist/dropdown/DropdownValue.d.ts +11 -0
- package/dist/dropdown/index.d.mts +16 -220
- package/dist/dropdown/index.d.ts +16 -220
- package/dist/dropdown/index.js +2 -2051
- package/dist/dropdown/index.js.map +1 -1
- package/dist/dropdown/index.mjs +352 -584
- package/dist/dropdown/index.mjs.map +1 -1
- package/dist/dropdown/types.d.ts +8 -0
- package/dist/dropdown/useDropdown.d.ts +41 -0
- package/dist/dropdown/utils.d.ts +13 -0
- package/dist/file-upload/FileUpload.d.ts +130 -0
- package/dist/file-upload/FileUploadAcceptedFile.d.ts +25 -0
- package/dist/file-upload/FileUploadContext.d.ts +17 -0
- package/dist/file-upload/FileUploadDropzone.d.ts +10 -0
- package/dist/file-upload/FileUploadItemDeleteTrigger.d.ts +11 -0
- package/dist/file-upload/FileUploadPreviewImage.d.ts +17 -0
- package/dist/file-upload/FileUploadRejectedFile.d.ts +24 -0
- package/dist/file-upload/FileUploadRejectedFileDeleteTrigger.d.ts +12 -0
- package/dist/file-upload/FileUploadTrigger.d.ts +12 -0
- package/dist/file-upload/constants.d.ts +29 -0
- package/dist/file-upload/index.d.mts +14 -262
- package/dist/file-upload/index.d.ts +14 -262
- package/dist/file-upload/index.js +2 -2255
- package/dist/file-upload/index.js.map +1 -1
- package/dist/file-upload/index.mjs +506 -834
- package/dist/file-upload/index.mjs.map +1 -1
- package/dist/file-upload/test-utils.d.ts +9 -0
- package/dist/file-upload/useFileUploadState.d.ts +88 -0
- package/dist/file-upload/utils.d.ts +40 -0
- package/dist/form-field/FormField.d.ts +21 -0
- package/dist/form-field/FormFieldAlertMessage.d.ts +9 -0
- package/dist/form-field/FormFieldCharactersCount.d.ts +26 -0
- package/dist/form-field/FormFieldContext.d.ts +49 -0
- package/dist/form-field/FormFieldControl.d.ts +12 -0
- package/dist/form-field/FormFieldErrorMessage.d.ts +9 -0
- package/dist/form-field/FormFieldHelperMessage.d.ts +9 -0
- package/dist/form-field/FormFieldLabel.d.ts +13 -0
- package/dist/form-field/FormFieldMessage.d.ts +8 -0
- package/dist/form-field/FormFieldProvider.d.ts +9 -0
- package/dist/form-field/FormFieldRequiredIndicator.d.ts +9 -0
- package/dist/form-field/FormFieldStateMessage.d.ts +10 -0
- package/dist/form-field/FormFieldSuccessMessage.d.ts +9 -0
- package/dist/form-field/index.d.mts +21 -176
- package/dist/form-field/index.d.ts +21 -176
- package/dist/form-field/index.js +2 -553
- package/dist/form-field/index.js.map +1 -1
- package/dist/form-field/index.mjs +246 -349
- package/dist/form-field/index.mjs.map +1 -1
- package/dist/icon/Icon.d.ts +17 -0
- package/dist/icon/Icon.styles.d.ts +6 -0
- package/dist/icon/index.d.mts +1 -28
- package/dist/icon/index.d.ts +1 -28
- package/dist/icon/index.js +2 -127
- package/dist/icon/index.js.map +1 -1
- package/dist/icon/index.mjs +3 -7
- package/dist/icon/index.mjs.map +1 -1
- package/dist/icon-button/IconButton.d.ts +10 -0
- package/dist/icon-button/IconButton.styles.d.ts +5 -0
- package/dist/icon-button/index.d.mts +1 -16
- package/dist/icon-button/index.d.ts +1 -16
- package/dist/icon-button/index.js +2 -980
- package/dist/icon-button/index.js.map +1 -1
- package/dist/icon-button/index.mjs +3 -9
- package/dist/icon-button/index.mjs.map +1 -1
- package/dist/input/Input.d.ts +14 -0
- package/dist/input/Input.styles.d.ts +11 -0
- package/dist/input/InputAddon.d.ts +9 -0
- package/dist/input/InputAddon.styles.d.ts +9 -0
- package/dist/input/InputClearButton.d.ts +12 -0
- package/dist/input/InputGroup.d.ts +17 -0
- package/dist/input/InputGroup.styles.d.ts +6 -0
- package/dist/input/InputGroupContext.d.ts +14 -0
- package/dist/input/InputIcon.d.ts +6 -0
- package/dist/input/InputLeadingAddon.d.ts +11 -0
- package/dist/input/InputLeadingIcon.d.ts +7 -0
- package/dist/input/InputTrailingAddon.d.ts +11 -0
- package/dist/input/InputTrailingIcon.d.ts +7 -0
- package/dist/input/index.d.mts +15 -72
- package/dist/input/index.d.ts +15 -72
- package/dist/input/index.js +2 -724
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +453 -12
- package/dist/input/index.mjs.map +1 -1
- package/dist/input-otp/InputOTP.d.ts +85 -0
- package/dist/input-otp/InputOTP.styles.d.ts +10 -0
- package/dist/input-otp/InputOTPContext.d.ts +16 -0
- package/dist/input-otp/InputOTPGroup.d.ts +7 -0
- package/dist/input-otp/InputOTPSeparator.d.ts +7 -0
- package/dist/input-otp/InputOTPSlot.d.ts +12 -0
- package/dist/input-otp/index.d.mts +10 -128
- package/dist/input-otp/index.d.ts +10 -128
- package/dist/input-otp/index.js +2 -668
- package/dist/input-otp/index.js.map +1 -1
- package/dist/input-otp/index.mjs +295 -462
- package/dist/input-otp/index.mjs.map +1 -1
- package/dist/input-otp/useInputOTP.d.ts +45 -0
- package/dist/kbd/Kbd.d.ts +5 -0
- package/dist/kbd/index.d.mts +1 -9
- package/dist/kbd/index.d.ts +1 -9
- package/dist/kbd/index.js +2 -47
- package/dist/kbd/index.js.map +1 -1
- package/dist/kbd/index.mjs +15 -18
- package/dist/kbd/index.mjs.map +1 -1
- package/dist/label/Label.d.ts +9 -0
- package/dist/label/LabelRequiredIndicator.d.ts +6 -0
- package/dist/label/index.d.mts +5 -9
- package/dist/label/index.d.ts +5 -9
- package/dist/label/index.js +2 -78
- package/dist/label/index.js.map +1 -1
- package/dist/label/index.mjs +38 -5
- package/dist/label/index.mjs.map +1 -1
- package/dist/link-box/LinkBox.d.ts +8 -0
- package/dist/link-box/LinkBoxLink.d.ts +8 -0
- package/dist/link-box/LinkBoxRaised.d.ts +9 -0
- package/dist/link-box/index.d.mts +6 -31
- package/dist/link-box/index.d.ts +6 -31
- package/dist/link-box/index.js +2 -92
- package/dist/link-box/index.js.map +1 -1
- package/dist/link-box/index.mjs +34 -56
- package/dist/link-box/index.mjs.map +1 -1
- package/dist/pagination/Pagination.d.ts +8 -0
- package/dist/pagination/PaginationContext.d.ts +43 -0
- package/dist/pagination/PaginationEllipsis.d.ts +9 -0
- package/dist/pagination/PaginationFirstPageTrigger.d.ts +16 -0
- package/dist/pagination/PaginationItem.d.ts +17 -0
- package/dist/pagination/PaginationLastPageTrigger.d.ts +16 -0
- package/dist/pagination/PaginationNextTrigger.d.ts +16 -0
- package/dist/pagination/PaginationPages.d.ts +16 -0
- package/dist/pagination/PaginationPrevTrigger.d.ts +16 -0
- package/dist/pagination/index.d.mts +10 -135
- package/dist/pagination/index.d.ts +10 -135
- package/dist/pagination/index.js +2 -1353
- package/dist/pagination/index.js.map +1 -1
- package/dist/pagination/index.mjs +176 -269
- package/dist/pagination/index.mjs.map +1 -1
- package/dist/pagination/utils.d.ts +1 -0
- package/dist/popover/Popover.d.ts +9 -0
- package/dist/popover/PopoverAnchor.d.ts +9 -0
- package/dist/popover/PopoverArrow.d.ts +9 -0
- package/dist/popover/PopoverCloseButton.d.ts +10 -0
- package/dist/popover/PopoverContent.d.ts +10 -0
- package/dist/popover/PopoverContent.styles.d.ts +9 -0
- package/dist/popover/PopoverContext.d.ts +15 -0
- package/dist/popover/PopoverHeader.d.ts +10 -0
- package/dist/popover/PopoverPortal.d.ts +7 -0
- package/dist/popover/PopoverTrigger.d.ts +9 -0
- package/dist/popover/index.d.mts +17 -6
- package/dist/popover/index.d.ts +17 -6
- package/dist/popover/index.js +2 -1339
- package/dist/popover/index.js.map +1 -1
- package/dist/popover/index.mjs +239 -11
- package/dist/popover/index.mjs.map +1 -1
- package/dist/portal/Portal.d.ts +10 -0
- package/dist/portal/index.d.mts +1 -13
- package/dist/portal/index.d.ts +1 -13
- package/dist/portal/index.js +2 -37
- package/dist/portal/index.js.map +1 -1
- package/dist/portal/index.mjs +5 -8
- package/dist/portal/index.mjs.map +1 -1
- package/dist/progress/Progress.d.ts +16 -0
- package/dist/progress/ProgressBar.d.ts +6 -0
- package/dist/progress/ProgressBar.styles.d.ts +5 -0
- package/dist/progress/ProgressContext.d.ts +13 -0
- package/dist/progress/ProgressIndicator.d.ts +6 -0
- package/dist/progress/ProgressIndicator.styles.d.ts +7 -0
- package/dist/progress/ProgressLabel.d.ts +6 -0
- package/dist/progress/index.d.mts +9 -48
- package/dist/progress/index.d.ts +9 -48
- package/dist/progress/index.js +2 -240
- package/dist/progress/index.js.map +1 -1
- package/dist/progress/index.mjs +166 -5
- package/dist/progress/index.mjs.map +1 -1
- package/dist/progress-tracker/ProgressTracker.d.ts +27 -0
- package/dist/progress-tracker/ProgressTracker.styles.d.ts +1 -0
- package/dist/progress-tracker/ProgressTrackerContext.d.ts +15 -0
- package/dist/progress-tracker/ProgressTrackerStep.d.ts +12 -0
- package/dist/progress-tracker/ProgressTrackerStep.styles.d.ts +10 -0
- package/dist/progress-tracker/ProgressTrackerStepIndicator.d.ts +15 -0
- package/dist/progress-tracker/ProgressTrackerStepIndicator.styles.d.ts +7 -0
- package/dist/progress-tracker/ProgressTrackerStepLabel.d.ts +9 -0
- package/dist/progress-tracker/index.d.mts +10 -80
- package/dist/progress-tracker/index.d.ts +10 -80
- package/dist/progress-tracker/index.js +2 -571
- package/dist/progress-tracker/index.js.map +1 -1
- package/dist/progress-tracker/index.mjs +115 -183
- package/dist/progress-tracker/index.mjs.map +1 -1
- package/dist/radio-group/Radio.d.ts +9 -0
- package/dist/radio-group/RadioGroup.d.ts +54 -0
- package/dist/radio-group/RadioGroup.styles.d.ts +5 -0
- package/dist/radio-group/RadioGroupContext.d.ts +5 -0
- package/dist/radio-group/RadioGroupProvider.d.ts +7 -0
- package/dist/radio-group/RadioIndicator.d.ts +18 -0
- package/dist/radio-group/RadioIndicator.styles.d.ts +5 -0
- package/dist/radio-group/RadioInput.d.ts +25 -0
- package/dist/radio-group/RadioInput.styles.d.ts +5 -0
- package/dist/radio-group/RadioLabel.d.ts +20 -0
- package/dist/radio-group/RadioLabel.styles.d.ts +5 -0
- package/dist/radio-group/index.d.mts +5 -98
- package/dist/radio-group/index.d.ts +5 -98
- package/dist/radio-group/index.js +2 -318
- package/dist/radio-group/index.js.map +1 -1
- package/dist/radio-group/index.mjs +105 -174
- package/dist/radio-group/index.mjs.map +1 -1
- package/dist/rating/Rating.d.ts +52 -0
- package/dist/rating/RatingStar.d.ts +10 -0
- package/dist/rating/RatingStar.styles.d.ts +14 -0
- package/dist/rating/index.d.mts +1 -78
- package/dist/rating/index.d.ts +1 -78
- package/dist/rating/index.js +2 -363
- package/dist/rating/index.js.map +1 -1
- package/dist/rating/index.mjs +125 -170
- package/dist/rating/index.mjs.map +1 -1
- package/dist/rating/types.d.ts +1 -0
- package/dist/rating/utils.d.ts +8 -0
- package/dist/scrolling-list/ScrollingList.d.ts +57 -0
- package/dist/scrolling-list/ScrollingListControls.d.ts +18 -0
- package/dist/scrolling-list/ScrollingListItem.d.ts +17 -0
- package/dist/scrolling-list/ScrollingListItems.d.ts +11 -0
- package/dist/scrolling-list/ScrollingListNextButton.d.ts +5 -0
- package/dist/scrolling-list/ScrollingListPrevButton.d.ts +5 -0
- package/dist/scrolling-list/ScrollingListSkipButton.d.ts +9 -0
- package/dist/scrolling-list/index.d.mts +14 -117
- package/dist/scrolling-list/index.d.ts +14 -117
- package/dist/scrolling-list/index.js +2 -1428
- package/dist/scrolling-list/index.js.map +1 -1
- package/dist/scrolling-list/index.mjs +193 -325
- package/dist/scrolling-list/index.mjs.map +1 -1
- package/dist/scrolling-list/useFocusWithinScroll.d.ts +3 -0
- package/dist/segmented-gauge/SegmentedGauge.d.ts +66 -0
- package/dist/segmented-gauge/SegmentedGaugeContext.d.ts +14 -0
- package/dist/segmented-gauge/SegmentedGaugeLabel.d.ts +9 -0
- package/dist/segmented-gauge/SegmentedGaugeSegment.d.ts +12 -0
- package/dist/segmented-gauge/SegmentedGaugeTrack.d.ts +8 -0
- package/dist/segmented-gauge/index.d.mts +9 -101
- package/dist/segmented-gauge/index.d.ts +9 -101
- package/dist/segmented-gauge/index.js +2 -274
- package/dist/segmented-gauge/index.js.map +1 -1
- package/dist/segmented-gauge/index.mjs +132 -178
- package/dist/segmented-gauge/index.mjs.map +1 -1
- package/dist/select/Select.d.ts +6 -0
- package/dist/select/SelectContext.d.ts +59 -0
- package/dist/select/SelectGroup.d.ts +11 -0
- package/dist/select/SelectItem.d.ts +11 -0
- package/dist/select/SelectItems.d.ts +10 -0
- package/dist/select/SelectItemsGroupContext.d.ts +9 -0
- package/dist/select/SelectLabel.d.ts +8 -0
- package/dist/select/SelectLeadingIcon.d.ts +7 -0
- package/dist/select/SelectPlaceholder.d.ts +10 -0
- package/dist/select/SelectTrigger.d.ts +16 -0
- package/dist/select/SelectTrigger.styles.d.ts +5 -0
- package/dist/select/SelectValue.d.ts +15 -0
- package/dist/select/index.d.mts +12 -158
- package/dist/select/index.d.ts +12 -158
- package/dist/select/index.js +2 -581
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +207 -339
- package/dist/select/index.mjs.map +1 -1
- package/dist/select/types.d.ts +6 -0
- package/dist/select/utils.d.ts +4 -0
- package/dist/skeleton/Skeleton.d.ts +17 -0
- package/dist/skeleton/Skeleton.styles.d.ts +5 -0
- package/dist/skeleton/SkeletonItem.d.ts +31 -0
- package/dist/skeleton/SkeletonItem.styles.d.ts +8 -0
- package/dist/skeleton/index.d.mts +8 -67
- package/dist/skeleton/index.d.ts +8 -67
- package/dist/skeleton/index.js +2 -206
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/index.mjs +64 -96
- package/dist/skeleton/index.mjs.map +1 -1
- package/dist/slider/Slider.d.ts +60 -0
- package/dist/slider/Slider.styles.d.ts +1 -0
- package/dist/slider/SliderContext.d.ts +7 -0
- package/dist/slider/SliderThumb.d.ts +14 -0
- package/dist/slider/SliderThumb.styles.d.ts +5 -0
- package/dist/slider/SliderTrack.d.ts +14 -0
- package/dist/slider/SliderTrack.styles.d.ts +9 -0
- package/dist/slider/index.d.mts +8 -97
- package/dist/slider/index.d.ts +8 -97
- package/dist/slider/index.js +2 -220
- package/dist/slider/index.js.map +1 -1
- package/dist/slider/index.mjs +94 -111
- package/dist/slider/index.mjs.map +1 -1
- package/dist/slot/Slot.d.ts +12 -0
- package/dist/slot/index.d.mts +1 -16
- package/dist/slot/index.d.ts +1 -16
- package/dist/slot/index.js +2 -51
- package/dist/slot/index.js.map +1 -1
- package/dist/slot/index.mjs +5 -9
- package/dist/slot/index.mjs.map +1 -1
- package/dist/snackbar/Snackbar.d.ts +29 -0
- package/dist/snackbar/SnackbarItem.d.ts +49 -0
- package/dist/snackbar/SnackbarItem.styles.d.ts +10 -0
- package/dist/snackbar/SnackbarItemAction.d.ts +10 -0
- package/dist/snackbar/SnackbarItemClose.d.ts +9 -0
- package/dist/snackbar/SnackbarItemContext.d.ts +8 -0
- package/dist/snackbar/SnackbarItemIcon.d.ts +7 -0
- package/dist/snackbar/SnackbarRegion.d.ts +30 -0
- package/dist/snackbar/SnackbarRegion.styles.d.ts +5 -0
- package/dist/snackbar/index.d.mts +13 -158
- package/dist/snackbar/index.d.ts +13 -158
- package/dist/snackbar/index.js +2 -1756
- package/dist/snackbar/index.js.map +1 -1
- package/dist/snackbar/index.mjs +237 -429
- package/dist/snackbar/index.mjs.map +1 -1
- package/dist/snackbar/snackbarVariants.d.ts +82 -0
- package/dist/snackbar/useSnackbarGlobalStore.d.ts +18 -0
- package/dist/snackbar/useSwipe.d.ts +15 -0
- package/dist/spinner/Spinner.d.ts +9 -0
- package/dist/spinner/Spinner.styles.d.ts +7 -0
- package/dist/spinner/index.d.mts +1 -21
- package/dist/spinner/index.d.ts +1 -21
- package/dist/spinner/index.js +2 -139
- package/dist/spinner/index.js.map +1 -1
- package/dist/spinner/index.mjs +3 -7
- package/dist/spinner/index.mjs.map +1 -1
- package/dist/stepper/Stepper.d.ts +9 -0
- package/dist/stepper/StepperButton.d.ts +14 -0
- package/dist/stepper/StepperInput.d.ts +7 -0
- package/dist/stepper/index.d.mts +9 -81
- package/dist/stepper/index.d.ts +9 -81
- package/dist/stepper/index.js +2 -1847
- package/dist/stepper/index.js.map +1 -1
- package/dist/stepper/index.mjs +143 -195
- package/dist/stepper/index.mjs.map +1 -1
- package/dist/stepper/types.d.ts +46 -0
- package/dist/stepper/useStepper.d.ts +2 -0
- package/dist/switch/Switch.d.ts +6 -0
- package/dist/switch/SwitchInput.d.ts +51 -0
- package/dist/switch/SwitchInput.styles.d.ts +16 -0
- package/dist/switch/SwitchLabel.d.ts +17 -0
- package/dist/switch/SwitchLabel.styles.d.ts +5 -0
- package/dist/switch/index.d.mts +1 -64
- package/dist/switch/index.d.ts +1 -64
- package/dist/switch/index.js +2 -327
- package/dist/switch/index.js.map +1 -1
- package/dist/switch/index.mjs +90 -130
- package/dist/switch/index.mjs.map +1 -1
- package/dist/tabs/Tabs.d.ts +24 -0
- package/dist/tabs/TabsContent.d.ts +22 -0
- package/dist/tabs/TabsContent.styles.d.ts +3 -0
- package/dist/tabs/TabsContext.d.ts +7 -0
- package/dist/tabs/TabsList.d.ts +20 -0
- package/dist/tabs/TabsList.styles.d.ts +3 -0
- package/dist/tabs/TabsPopover.d.ts +29 -0
- package/dist/tabs/TabsPopoverAbstraction.d.ts +27 -0
- package/dist/tabs/TabsRoot.styles.d.ts +1 -0
- package/dist/tabs/TabsTrigger.d.ts +41 -0
- package/dist/tabs/TabsTrigger.styles.d.ts +8 -0
- package/dist/tabs/index.d.mts +13 -137
- package/dist/tabs/index.d.ts +13 -137
- package/dist/tabs/index.js +2 -1830
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +224 -350
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/tabs/useResizeObserver.d.ts +8 -0
- package/dist/tag/Tag.d.ts +17 -0
- package/dist/tag/Tag.styles.d.ts +8 -0
- package/dist/tag/index.d.mts +1 -29
- package/dist/tag/index.d.ts +1 -29
- package/dist/tag/index.js +2 -283
- package/dist/tag/index.js.map +1 -1
- package/dist/tag/index.mjs +66 -90
- package/dist/tag/index.mjs.map +1 -1
- package/dist/tag/variants/filled.d.ts +41 -0
- package/dist/tag/variants/index.d.mts +3 -0
- package/dist/tag/variants/index.d.ts +3 -0
- package/dist/tag/variants/outlined.d.ts +37 -0
- package/dist/tag/variants/tinted.d.ts +37 -0
- package/dist/text-link/TextLink.d.ts +16 -0
- package/dist/text-link/index.d.mts +1 -20
- package/dist/text-link/index.d.ts +1 -20
- package/dist/text-link/index.js +2 -100
- package/dist/text-link/index.js.map +1 -1
- package/dist/text-link/index.mjs +3 -6
- package/dist/text-link/index.mjs.map +1 -1
- package/dist/textarea/Textarea.d.ts +14 -0
- package/dist/textarea/TextareaClearButton.d.ts +10 -0
- package/dist/textarea/TextareaGroup.d.ts +6 -0
- package/dist/textarea/TextareaLeadingIcon.d.ts +7 -0
- package/dist/textarea/TextareaTrailingIcon.d.ts +7 -0
- package/dist/textarea/index.d.mts +10 -53
- package/dist/textarea/index.d.ts +10 -53
- package/dist/textarea/index.js +2 -797
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs +50 -83
- package/dist/textarea/index.mjs.map +1 -1
- package/dist/toast/Toast.d.ts +4 -0
- package/dist/toast/Toast.styles.d.ts +10 -0
- package/dist/toast/index.d.mts +10 -53
- package/dist/toast/index.d.ts +10 -53
- package/dist/toast/index.js +2 -1454
- package/dist/toast/index.js.map +1 -1
- package/dist/toast/index.mjs +126 -180
- package/dist/toast/index.mjs.map +1 -1
- package/dist/toast/types.d.ts +41 -0
- package/dist/toast/useRenderSlot.d.ts +3 -0
- package/dist/toast/useToastManager.d.ts +2 -0
- package/dist/visually-hidden/VisuallyHidden.d.ts +12 -0
- package/dist/visually-hidden/index.d.mts +1 -16
- package/dist/visually-hidden/index.d.ts +1 -16
- package/dist/visually-hidden/index.js +2 -67
- package/dist/visually-hidden/index.js.map +1 -1
- package/dist/visually-hidden/index.mjs +3 -6
- package/dist/visually-hidden/index.mjs.map +1 -1
- package/package.json +6 -6
- package/dist/Input-N8AWWSmt.d.mts +0 -41
- package/dist/Input-N8AWWSmt.d.ts +0 -41
- package/dist/InputTrailingIcon-BBp7sE6D.d.mts +0 -20
- package/dist/InputTrailingIcon-ZZx8PoJy.d.ts +0 -20
- package/dist/LabelRequiredIndicator-DRnCzHMU.d.mts +0 -19
- package/dist/LabelRequiredIndicator-DRnCzHMU.d.ts +0 -19
- package/dist/chunk-2YM6GKWW.mjs.map +0 -1
- package/dist/chunk-6QCEPQ3U.mjs +0 -26
- package/dist/chunk-6QCEPQ3U.mjs.map +0 -1
- package/dist/chunk-7EWSMIZU.mjs +0 -214
- package/dist/chunk-7EWSMIZU.mjs.map +0 -1
- package/dist/chunk-DCXWGQVZ.mjs +0 -53
- package/dist/chunk-DCXWGQVZ.mjs.map +0 -1
- package/dist/chunk-GAK4SC2F.mjs.map +0 -1
- package/dist/chunk-GPJMLIHC.mjs +0 -308
- package/dist/chunk-GPJMLIHC.mjs.map +0 -1
- package/dist/chunk-HLXYG643.mjs +0 -52
- package/dist/chunk-HLXYG643.mjs.map +0 -1
- package/dist/chunk-KEGAAGJW.mjs +0 -36
- package/dist/chunk-KEGAAGJW.mjs.map +0 -1
- package/dist/chunk-RKPP7ZOK.mjs.map +0 -1
- package/dist/chunk-UMUMFMFB.mjs +0 -68
- package/dist/chunk-UMUMFMFB.mjs.map +0 -1
- package/dist/chunk-VBX7BTNU.mjs +0 -614
- package/dist/chunk-VBX7BTNU.mjs.map +0 -1
- package/dist/chunk-XZ47F6TP.mjs.map +0 -1
- package/dist/index-Cno_GFuW.d.mts +0 -93
- package/dist/index-Cno_GFuW.d.ts +0 -93
package/dist/textarea/index.js
CHANGED
|
@@ -1,797 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/textarea/index.ts
|
|
21
|
-
var textarea_exports = {};
|
|
22
|
-
__export(textarea_exports, {
|
|
23
|
-
Textarea: () => Textarea,
|
|
24
|
-
TextareaGroup: () => TextareaGroup2
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(textarea_exports);
|
|
27
|
-
|
|
28
|
-
// src/input/InputClearButton.tsx
|
|
29
|
-
var import_DeleteOutline = require("@spark-ui/icons/DeleteOutline");
|
|
30
|
-
var import_class_variance_authority2 = require("class-variance-authority");
|
|
31
|
-
|
|
32
|
-
// src/icon/Icon.tsx
|
|
33
|
-
var import_react2 = require("react");
|
|
34
|
-
|
|
35
|
-
// src/slot/Slot.tsx
|
|
36
|
-
var import_radix_ui = require("radix-ui");
|
|
37
|
-
var import_react = require("react");
|
|
38
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
-
var Slottable = import_radix_ui.Slot.Slottable;
|
|
40
|
-
var Slot = ({ ref, ...props }) => {
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radix_ui.Slot.Root, { ref, ...props });
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
// src/visually-hidden/VisuallyHidden.tsx
|
|
45
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
46
|
-
var VisuallyHidden = ({ asChild = false, ref, ...props }) => {
|
|
47
|
-
const Component = asChild ? Slot : "span";
|
|
48
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
49
|
-
Component,
|
|
50
|
-
{
|
|
51
|
-
...props,
|
|
52
|
-
ref,
|
|
53
|
-
style: {
|
|
54
|
-
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
55
|
-
position: "absolute",
|
|
56
|
-
border: 0,
|
|
57
|
-
width: 1,
|
|
58
|
-
height: 1,
|
|
59
|
-
padding: 0,
|
|
60
|
-
margin: -1,
|
|
61
|
-
overflow: "hidden",
|
|
62
|
-
clip: "rect(0, 0, 0, 0)",
|
|
63
|
-
whiteSpace: "nowrap",
|
|
64
|
-
wordWrap: "normal",
|
|
65
|
-
...props.style
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
};
|
|
70
|
-
VisuallyHidden.displayName = "VisuallyHidden";
|
|
71
|
-
|
|
72
|
-
// src/icon/Icon.styles.tsx
|
|
73
|
-
var import_internal_utils = require("@spark-ui/internal-utils");
|
|
74
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
75
|
-
var iconStyles = (0, import_class_variance_authority.cva)(["fill-current shrink-0"], {
|
|
76
|
-
variants: {
|
|
77
|
-
/**
|
|
78
|
-
* Color scheme of the icon.
|
|
79
|
-
*/
|
|
80
|
-
intent: (0, import_internal_utils.makeVariants)({
|
|
81
|
-
current: ["text-current"],
|
|
82
|
-
main: ["text-main"],
|
|
83
|
-
support: ["text-support"],
|
|
84
|
-
accent: ["text-accent"],
|
|
85
|
-
basic: ["text-basic"],
|
|
86
|
-
success: ["text-success"],
|
|
87
|
-
alert: ["text-alert"],
|
|
88
|
-
error: ["text-error"],
|
|
89
|
-
info: ["text-info"],
|
|
90
|
-
neutral: ["text-neutral"]
|
|
91
|
-
}),
|
|
92
|
-
/**
|
|
93
|
-
* Sets the size of the icon.
|
|
94
|
-
*/
|
|
95
|
-
size: (0, import_internal_utils.makeVariants)({
|
|
96
|
-
current: ["u-current-font-size"],
|
|
97
|
-
sm: ["w-sz-16", "h-sz-16"],
|
|
98
|
-
md: ["w-sz-24", "h-sz-24"],
|
|
99
|
-
lg: ["w-sz-32", "h-sz-32"],
|
|
100
|
-
xl: ["w-sz-40", "h-sz-40"]
|
|
101
|
-
})
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
// src/icon/Icon.tsx
|
|
106
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
107
|
-
var Icon = ({
|
|
108
|
-
label,
|
|
109
|
-
className,
|
|
110
|
-
size = "current",
|
|
111
|
-
intent = "current",
|
|
112
|
-
children,
|
|
113
|
-
...others
|
|
114
|
-
}) => {
|
|
115
|
-
const child = import_react2.Children.only(children);
|
|
116
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
117
|
-
(0, import_react2.cloneElement)(child, {
|
|
118
|
-
className: iconStyles({ className, size, intent }),
|
|
119
|
-
"data-spark-component": "icon",
|
|
120
|
-
"aria-hidden": "true",
|
|
121
|
-
focusable: "false",
|
|
122
|
-
...others
|
|
123
|
-
}),
|
|
124
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(VisuallyHidden, { children: label })
|
|
125
|
-
] });
|
|
126
|
-
};
|
|
127
|
-
Icon.displayName = "Icon";
|
|
128
|
-
|
|
129
|
-
// src/input/InputGroupContext.ts
|
|
130
|
-
var import_react3 = require("react");
|
|
131
|
-
var InputGroupContext = (0, import_react3.createContext)(null);
|
|
132
|
-
var useInputGroup = () => {
|
|
133
|
-
const context = (0, import_react3.useContext)(InputGroupContext);
|
|
134
|
-
return context || { isStandalone: true };
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
// src/input/InputClearButton.tsx
|
|
138
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
139
|
-
var Root = ({
|
|
140
|
-
className,
|
|
141
|
-
tabIndex = -1,
|
|
142
|
-
onClick,
|
|
143
|
-
inline = false,
|
|
144
|
-
ref,
|
|
145
|
-
...others
|
|
146
|
-
}) => {
|
|
147
|
-
const { onClear, hasTrailingIcon } = useInputGroup();
|
|
148
|
-
const handleClick = (event) => {
|
|
149
|
-
if (onClick) {
|
|
150
|
-
onClick(event);
|
|
151
|
-
}
|
|
152
|
-
if (onClear) {
|
|
153
|
-
onClear();
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
157
|
-
"button",
|
|
158
|
-
{
|
|
159
|
-
ref,
|
|
160
|
-
"data-spark-component": "input-clear-button",
|
|
161
|
-
className: (0, import_class_variance_authority2.cx)(
|
|
162
|
-
className,
|
|
163
|
-
"pointer-events-auto absolute",
|
|
164
|
-
inline ? "h-sz-44 top-0 -translate-y-0" : "top-1/2 -translate-y-1/2",
|
|
165
|
-
"inline-flex h-full items-center justify-center outline-hidden",
|
|
166
|
-
"text-neutral hover:text-neutral-hovered",
|
|
167
|
-
hasTrailingIcon ? "right-3xl px-sz-12" : "pl-md pr-lg right-0"
|
|
168
|
-
),
|
|
169
|
-
tabIndex,
|
|
170
|
-
onClick: handleClick,
|
|
171
|
-
type: "button",
|
|
172
|
-
...others,
|
|
173
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_DeleteOutline.DeleteOutline, {}) })
|
|
174
|
-
}
|
|
175
|
-
);
|
|
176
|
-
};
|
|
177
|
-
var InputClearButton = Object.assign(Root, {
|
|
178
|
-
id: "ClearButton"
|
|
179
|
-
});
|
|
180
|
-
Root.displayName = "InputGroup.ClearButton";
|
|
181
|
-
|
|
182
|
-
// src/input/InputGroup.tsx
|
|
183
|
-
var import_form_field = require("@spark-ui/components/form-field");
|
|
184
|
-
var import_use_combined_state = require("@spark-ui/hooks/use-combined-state");
|
|
185
|
-
var import_use_merge_refs = require("@spark-ui/hooks/use-merge-refs");
|
|
186
|
-
var import_react4 = require("react");
|
|
187
|
-
|
|
188
|
-
// src/input/InputGroup.styles.ts
|
|
189
|
-
var import_class_variance_authority3 = require("class-variance-authority");
|
|
190
|
-
var inputGroupStyles = (0, import_class_variance_authority3.cva)(["relative inline-flex w-full"], {
|
|
191
|
-
variants: {
|
|
192
|
-
/**
|
|
193
|
-
* When `true`, prevents the user from interacting.
|
|
194
|
-
*/
|
|
195
|
-
disabled: {
|
|
196
|
-
true: [
|
|
197
|
-
"cursor-not-allowed",
|
|
198
|
-
"relative",
|
|
199
|
-
"after:absolute",
|
|
200
|
-
"after:top-0",
|
|
201
|
-
"after:h-full",
|
|
202
|
-
"after:w-full",
|
|
203
|
-
"after:border-sm after:border-outline",
|
|
204
|
-
"after:rounded-lg"
|
|
205
|
-
],
|
|
206
|
-
false: "after:hidden"
|
|
207
|
-
},
|
|
208
|
-
/**
|
|
209
|
-
* Sets the component as interactive or not.
|
|
210
|
-
*/
|
|
211
|
-
readOnly: {
|
|
212
|
-
true: [
|
|
213
|
-
"relative",
|
|
214
|
-
"after:absolute",
|
|
215
|
-
"after:top-0",
|
|
216
|
-
"after:h-full",
|
|
217
|
-
"after:w-full",
|
|
218
|
-
"after:border-sm after:border-outline",
|
|
219
|
-
"after:rounded-lg"
|
|
220
|
-
],
|
|
221
|
-
false: "after:hidden"
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
// src/input/InputGroup.tsx
|
|
227
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
228
|
-
var InputGroup = ({
|
|
229
|
-
className,
|
|
230
|
-
children: childrenProp,
|
|
231
|
-
state: stateProp,
|
|
232
|
-
disabled: disabledProp,
|
|
233
|
-
readOnly: readOnlyProp,
|
|
234
|
-
onClear,
|
|
235
|
-
ref: forwardedRef,
|
|
236
|
-
...others
|
|
237
|
-
}) => {
|
|
238
|
-
const getElementId = (element) => {
|
|
239
|
-
return element ? element.type.id : "";
|
|
240
|
-
};
|
|
241
|
-
const findElement = (...values) => {
|
|
242
|
-
return children.find((child) => values.includes(getElementId(child) || ""));
|
|
243
|
-
};
|
|
244
|
-
const children = import_react4.Children.toArray(childrenProp).filter(import_react4.isValidElement);
|
|
245
|
-
const input = findElement("Input");
|
|
246
|
-
const props = input?.props || {};
|
|
247
|
-
const inputRef = (0, import_react4.useRef)(null);
|
|
248
|
-
const onClearRef = (0, import_react4.useRef)(onClear);
|
|
249
|
-
const ref = (0, import_use_merge_refs.useMergeRefs)(input?.ref, inputRef);
|
|
250
|
-
const [value, onChange] = (0, import_use_combined_state.useCombinedState)(
|
|
251
|
-
props.value,
|
|
252
|
-
props.defaultValue,
|
|
253
|
-
props.onValueChange
|
|
254
|
-
);
|
|
255
|
-
const field = (0, import_form_field.useFormFieldControl)();
|
|
256
|
-
const state = field.state ?? stateProp;
|
|
257
|
-
const disabled = field.disabled || !!disabledProp;
|
|
258
|
-
const readOnly = field.readOnly || !!readOnlyProp;
|
|
259
|
-
const leadingAddon = findElement("LeadingAddon");
|
|
260
|
-
const leadingIcon = findElement("LeadingIcon");
|
|
261
|
-
const clearButton = findElement("ClearButton");
|
|
262
|
-
const trailingIcon = findElement("TrailingIcon");
|
|
263
|
-
const trailingAddon = findElement("TrailingAddon");
|
|
264
|
-
const hasLeadingAddon = !!leadingAddon;
|
|
265
|
-
const hasTrailingAddon = !!trailingAddon;
|
|
266
|
-
const hasLeadingIcon = !!leadingIcon;
|
|
267
|
-
const hasTrailingIcon = !!trailingIcon;
|
|
268
|
-
const hasClearButton = !!value && !!clearButton && !disabled && !readOnly;
|
|
269
|
-
const handleChange = (event) => {
|
|
270
|
-
if (props.onChange) {
|
|
271
|
-
props.onChange(event);
|
|
272
|
-
}
|
|
273
|
-
onChange(event.target.value);
|
|
274
|
-
};
|
|
275
|
-
const handleClear = (0, import_react4.useCallback)(() => {
|
|
276
|
-
if (onClearRef.current) {
|
|
277
|
-
onClearRef.current();
|
|
278
|
-
}
|
|
279
|
-
onChange("");
|
|
280
|
-
inputRef.current.focus();
|
|
281
|
-
}, [onChange]);
|
|
282
|
-
const current = (0, import_react4.useMemo)(() => {
|
|
283
|
-
return {
|
|
284
|
-
state,
|
|
285
|
-
disabled,
|
|
286
|
-
readOnly,
|
|
287
|
-
hasLeadingIcon,
|
|
288
|
-
hasTrailingIcon,
|
|
289
|
-
hasLeadingAddon,
|
|
290
|
-
hasTrailingAddon,
|
|
291
|
-
hasClearButton,
|
|
292
|
-
onClear: handleClear
|
|
293
|
-
};
|
|
294
|
-
}, [
|
|
295
|
-
state,
|
|
296
|
-
disabled,
|
|
297
|
-
readOnly,
|
|
298
|
-
hasLeadingIcon,
|
|
299
|
-
hasTrailingIcon,
|
|
300
|
-
hasLeadingAddon,
|
|
301
|
-
hasTrailingAddon,
|
|
302
|
-
hasClearButton,
|
|
303
|
-
handleClear
|
|
304
|
-
]);
|
|
305
|
-
(0, import_react4.useEffect)(() => {
|
|
306
|
-
onClearRef.current = onClear;
|
|
307
|
-
}, [onClear]);
|
|
308
|
-
const inputRefValue = inputRef.current?.value;
|
|
309
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(InputGroupContext.Provider, { value: current, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
310
|
-
"div",
|
|
311
|
-
{
|
|
312
|
-
"data-spark-component": "input-group",
|
|
313
|
-
ref: forwardedRef,
|
|
314
|
-
className: inputGroupStyles({ disabled, readOnly, className }),
|
|
315
|
-
...others,
|
|
316
|
-
children: [
|
|
317
|
-
hasLeadingAddon && leadingAddon,
|
|
318
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "relative inline-flex w-full", children: [
|
|
319
|
-
input && (0, import_react4.cloneElement)(input, {
|
|
320
|
-
value: value ?? inputRefValue ?? "",
|
|
321
|
-
ref,
|
|
322
|
-
defaultValue: void 0,
|
|
323
|
-
onChange: handleChange
|
|
324
|
-
}),
|
|
325
|
-
leadingIcon,
|
|
326
|
-
hasClearButton && clearButton,
|
|
327
|
-
trailingIcon
|
|
328
|
-
] }),
|
|
329
|
-
hasTrailingAddon && trailingAddon
|
|
330
|
-
]
|
|
331
|
-
}
|
|
332
|
-
) });
|
|
333
|
-
};
|
|
334
|
-
InputGroup.displayName = "InputGroup";
|
|
335
|
-
|
|
336
|
-
// src/input/InputLeadingAddon.tsx
|
|
337
|
-
var import_class_variance_authority5 = require("class-variance-authority");
|
|
338
|
-
|
|
339
|
-
// src/input/InputAddon.tsx
|
|
340
|
-
var import_react5 = require("react");
|
|
341
|
-
|
|
342
|
-
// src/input/InputAddon.styles.ts
|
|
343
|
-
var import_class_variance_authority4 = require("class-variance-authority");
|
|
344
|
-
var inputAddonStyles = (0, import_class_variance_authority4.cva)(
|
|
345
|
-
[
|
|
346
|
-
"overflow-hidden",
|
|
347
|
-
"border-sm",
|
|
348
|
-
"shrink-0",
|
|
349
|
-
"h-full",
|
|
350
|
-
"focus-visible:relative focus-visible:z-raised",
|
|
351
|
-
"mx-0"
|
|
352
|
-
],
|
|
353
|
-
{
|
|
354
|
-
variants: {
|
|
355
|
-
/**
|
|
356
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
357
|
-
*/
|
|
358
|
-
asChild: { false: ["flex", "items-center", "px-lg"] },
|
|
359
|
-
intent: {
|
|
360
|
-
neutral: "border-outline",
|
|
361
|
-
error: "border-error",
|
|
362
|
-
alert: "border-alert",
|
|
363
|
-
success: "border-success"
|
|
364
|
-
},
|
|
365
|
-
/**
|
|
366
|
-
* Disable the input addon, preventing user interaction and adding opacity.
|
|
367
|
-
*/
|
|
368
|
-
disabled: {
|
|
369
|
-
true: ["pointer-events-none border-outline!"]
|
|
370
|
-
},
|
|
371
|
-
/**
|
|
372
|
-
* Changes input addon styles based on the read only status from the input.
|
|
373
|
-
*/
|
|
374
|
-
readOnly: {
|
|
375
|
-
true: ["pointer-events-none"]
|
|
376
|
-
},
|
|
377
|
-
/**
|
|
378
|
-
* Main style of the input addon.
|
|
379
|
-
*/
|
|
380
|
-
design: {
|
|
381
|
-
text: "",
|
|
382
|
-
solid: "",
|
|
383
|
-
inline: ""
|
|
384
|
-
}
|
|
385
|
-
},
|
|
386
|
-
compoundVariants: [
|
|
387
|
-
{
|
|
388
|
-
disabled: false,
|
|
389
|
-
readOnly: false,
|
|
390
|
-
design: "text",
|
|
391
|
-
class: ["bg-surface", "text-on-surface"]
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
disabled: true,
|
|
395
|
-
design: "text",
|
|
396
|
-
class: ["text-on-surface/dim-3"]
|
|
397
|
-
},
|
|
398
|
-
{
|
|
399
|
-
disabled: true,
|
|
400
|
-
design: ["solid", "inline"],
|
|
401
|
-
class: ["opacity-dim-3"]
|
|
402
|
-
}
|
|
403
|
-
],
|
|
404
|
-
defaultVariants: {
|
|
405
|
-
intent: "neutral"
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
);
|
|
409
|
-
|
|
410
|
-
// src/input/InputAddon.tsx
|
|
411
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
412
|
-
var InputAddon = ({
|
|
413
|
-
asChild: asChildProp,
|
|
414
|
-
className,
|
|
415
|
-
children,
|
|
416
|
-
ref,
|
|
417
|
-
...others
|
|
418
|
-
}) => {
|
|
419
|
-
const { state, disabled, readOnly } = useInputGroup();
|
|
420
|
-
const isRawText = typeof children === "string";
|
|
421
|
-
const asChild = !!(isRawText ? false : asChildProp);
|
|
422
|
-
const child = isRawText ? children : import_react5.Children.only(children);
|
|
423
|
-
const Component = asChild && !isRawText ? Slot : "div";
|
|
424
|
-
const getDesign = () => {
|
|
425
|
-
if (isRawText) return "text";
|
|
426
|
-
return asChild ? "solid" : "inline";
|
|
427
|
-
};
|
|
428
|
-
const design = getDesign();
|
|
429
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
430
|
-
Component,
|
|
431
|
-
{
|
|
432
|
-
ref,
|
|
433
|
-
"data-spark-component": "input-addon",
|
|
434
|
-
className: inputAddonStyles({
|
|
435
|
-
className,
|
|
436
|
-
intent: state,
|
|
437
|
-
disabled,
|
|
438
|
-
readOnly,
|
|
439
|
-
asChild,
|
|
440
|
-
design
|
|
441
|
-
}),
|
|
442
|
-
...disabled && { tabIndex: -1 },
|
|
443
|
-
...others,
|
|
444
|
-
children: child
|
|
445
|
-
}
|
|
446
|
-
);
|
|
447
|
-
};
|
|
448
|
-
InputAddon.displayName = "InputGroup.Addon";
|
|
449
|
-
|
|
450
|
-
// src/input/InputLeadingAddon.tsx
|
|
451
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
452
|
-
var Root2 = ({ className, ref, ...others }) => {
|
|
453
|
-
const { disabled, readOnly } = useInputGroup();
|
|
454
|
-
const isInactive = disabled || readOnly;
|
|
455
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: (0, import_class_variance_authority5.cx)("rounded-l-lg", isInactive ? "bg-on-surface/dim-5" : null), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
456
|
-
InputAddon,
|
|
457
|
-
{
|
|
458
|
-
ref,
|
|
459
|
-
className: (0, import_class_variance_authority5.cx)(className, "rounded-r-0! mr-[-1px] rounded-l-lg"),
|
|
460
|
-
...others
|
|
461
|
-
}
|
|
462
|
-
) });
|
|
463
|
-
};
|
|
464
|
-
var InputLeadingAddon = Object.assign(Root2, {
|
|
465
|
-
id: "LeadingAddon"
|
|
466
|
-
});
|
|
467
|
-
Root2.displayName = "InputGroup.LeadingAddon";
|
|
468
|
-
|
|
469
|
-
// src/input/InputLeadingIcon.tsx
|
|
470
|
-
var import_class_variance_authority7 = require("class-variance-authority");
|
|
471
|
-
|
|
472
|
-
// src/input/InputIcon.tsx
|
|
473
|
-
var import_class_variance_authority6 = require("class-variance-authority");
|
|
474
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
475
|
-
var InputIcon = ({ className, intent, children, ...others }) => {
|
|
476
|
-
const { disabled, readOnly } = useInputGroup();
|
|
477
|
-
const isInactive = disabled || readOnly;
|
|
478
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
479
|
-
Icon,
|
|
480
|
-
{
|
|
481
|
-
"data-spark-component": "input-icon",
|
|
482
|
-
intent,
|
|
483
|
-
className: (0, import_class_variance_authority6.cx)(
|
|
484
|
-
className,
|
|
485
|
-
"pointer-events-none absolute top-[calc(var(--spacing-sz-44)/2)] -translate-y-1/2",
|
|
486
|
-
intent ? void 0 : "text-neutral peer-focus:text-outline-high",
|
|
487
|
-
isInactive ? "opacity-dim-3" : void 0
|
|
488
|
-
),
|
|
489
|
-
...others,
|
|
490
|
-
children
|
|
491
|
-
}
|
|
492
|
-
);
|
|
493
|
-
};
|
|
494
|
-
InputIcon.displayName = "InputGroup.Icon";
|
|
495
|
-
|
|
496
|
-
// src/input/InputLeadingIcon.tsx
|
|
497
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
498
|
-
var InputLeadingIcon = ({ className, ...others }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(InputIcon, { className: (0, import_class_variance_authority7.cx)(className, "left-lg text-body-1"), ...others });
|
|
499
|
-
InputLeadingIcon.id = "LeadingIcon";
|
|
500
|
-
InputLeadingIcon.displayName = "InputGroup.LeadingIcon";
|
|
501
|
-
|
|
502
|
-
// src/input/InputTrailingAddon.tsx
|
|
503
|
-
var import_class_variance_authority8 = require("class-variance-authority");
|
|
504
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
505
|
-
var Root3 = ({ className, ref, ...others }) => {
|
|
506
|
-
const { disabled, readOnly } = useInputGroup();
|
|
507
|
-
const isInactive = disabled || readOnly;
|
|
508
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: (0, import_class_variance_authority8.cx)("rounded-r-lg", isInactive ? "bg-on-surface/dim-5" : null), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
509
|
-
InputAddon,
|
|
510
|
-
{
|
|
511
|
-
ref,
|
|
512
|
-
className: (0, import_class_variance_authority8.cx)(className, "rounded-l-0! ml-[-1px] rounded-r-lg"),
|
|
513
|
-
...others
|
|
514
|
-
}
|
|
515
|
-
) });
|
|
516
|
-
};
|
|
517
|
-
var InputTrailingAddon = Object.assign(Root3, {
|
|
518
|
-
id: "TrailingAddon"
|
|
519
|
-
});
|
|
520
|
-
Root3.displayName = "InputGroup.TrailingAddon";
|
|
521
|
-
|
|
522
|
-
// src/input/InputTrailingIcon.tsx
|
|
523
|
-
var import_class_variance_authority9 = require("class-variance-authority");
|
|
524
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
525
|
-
var InputTrailingIcon = ({ className, ...others }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(InputIcon, { className: (0, import_class_variance_authority9.cx)(className, "right-lg text-body-1"), ...others });
|
|
526
|
-
InputTrailingIcon.id = "TrailingIcon";
|
|
527
|
-
InputTrailingIcon.displayName = "InputGroup.TrailingIcon";
|
|
528
|
-
|
|
529
|
-
// src/input/Input.tsx
|
|
530
|
-
var import_form_field2 = require("@spark-ui/components/form-field");
|
|
531
|
-
|
|
532
|
-
// src/input/Input.styles.ts
|
|
533
|
-
var import_class_variance_authority10 = require("class-variance-authority");
|
|
534
|
-
var inputStyles = (0, import_class_variance_authority10.cva)(
|
|
535
|
-
[
|
|
536
|
-
"relative",
|
|
537
|
-
"border-sm",
|
|
538
|
-
"peer",
|
|
539
|
-
"w-full",
|
|
540
|
-
"appearance-none outline-hidden",
|
|
541
|
-
"bg-surface",
|
|
542
|
-
"text-ellipsis text-body-1 text-on-surface",
|
|
543
|
-
"caret-neutral",
|
|
544
|
-
"[&:-webkit-autofill]:[-webkit-text-fill-color:var(--color-on-surface)]",
|
|
545
|
-
"autofill:shadow-surface autofill:shadow-[inset_0_0_0px_1000px]",
|
|
546
|
-
"disabled:cursor-not-allowed disabled:border-outline disabled:bg-on-surface/dim-5 disabled:text-on-surface/dim-3",
|
|
547
|
-
"read-only:cursor-default read-only:pointer-events-none read-only:bg-on-surface/dim-5",
|
|
548
|
-
"focus:ring-1 focus:ring-inset focus:ring-focus focus:border-focus"
|
|
549
|
-
],
|
|
550
|
-
{
|
|
551
|
-
variants: {
|
|
552
|
-
/**
|
|
553
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
554
|
-
*/
|
|
555
|
-
asChild: {
|
|
556
|
-
true: ["min-h-sz-44"],
|
|
557
|
-
false: ["h-sz-44"]
|
|
558
|
-
},
|
|
559
|
-
/**
|
|
560
|
-
* Color scheme of the button.
|
|
561
|
-
*/
|
|
562
|
-
intent: {
|
|
563
|
-
neutral: ["border-outline", "default:hover:border-outline-high"],
|
|
564
|
-
success: ["default:border-success"],
|
|
565
|
-
alert: ["default:border-alert"],
|
|
566
|
-
error: ["default:border-error"]
|
|
567
|
-
},
|
|
568
|
-
/**
|
|
569
|
-
* Sets if there is an addon before the input text.
|
|
570
|
-
*/
|
|
571
|
-
hasLeadingAddon: {
|
|
572
|
-
true: ["rounded-l-0"],
|
|
573
|
-
false: ["rounded-l-lg"]
|
|
574
|
-
},
|
|
575
|
-
/**
|
|
576
|
-
* Sets if there is an addon after the input text.
|
|
577
|
-
*/
|
|
578
|
-
hasTrailingAddon: {
|
|
579
|
-
true: ["rounded-r-0"],
|
|
580
|
-
false: ["rounded-r-lg"]
|
|
581
|
-
},
|
|
582
|
-
/**
|
|
583
|
-
* Sets if there is an icon before the input text.
|
|
584
|
-
*/
|
|
585
|
-
hasLeadingIcon: {
|
|
586
|
-
true: ["pl-3xl"],
|
|
587
|
-
false: ["pl-lg"]
|
|
588
|
-
},
|
|
589
|
-
/**
|
|
590
|
-
* Sets if there is an icon after the input text.
|
|
591
|
-
*/
|
|
592
|
-
hasTrailingIcon: { true: "" },
|
|
593
|
-
/**
|
|
594
|
-
* Sets if there is a button to clear the input text.
|
|
595
|
-
*/
|
|
596
|
-
hasClearButton: { true: "" }
|
|
597
|
-
},
|
|
598
|
-
compoundVariants: [
|
|
599
|
-
{
|
|
600
|
-
hasTrailingIcon: false,
|
|
601
|
-
hasClearButton: false,
|
|
602
|
-
class: "pr-lg"
|
|
603
|
-
},
|
|
604
|
-
{
|
|
605
|
-
hasTrailingIcon: true,
|
|
606
|
-
hasClearButton: false,
|
|
607
|
-
class: "pr-3xl"
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
hasTrailingIcon: false,
|
|
611
|
-
hasClearButton: true,
|
|
612
|
-
class: "pr-3xl"
|
|
613
|
-
},
|
|
614
|
-
{
|
|
615
|
-
hasTrailingIcon: true,
|
|
616
|
-
hasClearButton: true,
|
|
617
|
-
class: "pr-[calc(var(--spacing-3xl)*2)]"
|
|
618
|
-
}
|
|
619
|
-
],
|
|
620
|
-
defaultVariants: {
|
|
621
|
-
intent: "neutral"
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
);
|
|
625
|
-
|
|
626
|
-
// src/input/Input.tsx
|
|
627
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
628
|
-
var Root4 = ({
|
|
629
|
-
className,
|
|
630
|
-
asChild = false,
|
|
631
|
-
onValueChange,
|
|
632
|
-
onChange,
|
|
633
|
-
onKeyDown,
|
|
634
|
-
disabled: disabledProp,
|
|
635
|
-
readOnly: readOnlyProp,
|
|
636
|
-
ref,
|
|
637
|
-
...others
|
|
638
|
-
}) => {
|
|
639
|
-
const field = (0, import_form_field2.useFormFieldControl)();
|
|
640
|
-
const group = useInputGroup();
|
|
641
|
-
const { id, name, isInvalid, isRequired, description } = field;
|
|
642
|
-
const {
|
|
643
|
-
hasLeadingAddon,
|
|
644
|
-
hasTrailingAddon,
|
|
645
|
-
hasLeadingIcon,
|
|
646
|
-
hasTrailingIcon,
|
|
647
|
-
hasClearButton,
|
|
648
|
-
onClear
|
|
649
|
-
} = group;
|
|
650
|
-
const Component = asChild ? Slot : "input";
|
|
651
|
-
const state = field.state || group.state;
|
|
652
|
-
const disabled = field.disabled || group.disabled || disabledProp;
|
|
653
|
-
const readOnly = field.readOnly || group.readOnly || readOnlyProp;
|
|
654
|
-
const handleChange = (event) => {
|
|
655
|
-
if (onChange) {
|
|
656
|
-
onChange(event);
|
|
657
|
-
}
|
|
658
|
-
if (onValueChange) {
|
|
659
|
-
onValueChange(event.target.value);
|
|
660
|
-
}
|
|
661
|
-
};
|
|
662
|
-
const handleKeyDown = (event) => {
|
|
663
|
-
if (onKeyDown) {
|
|
664
|
-
onKeyDown(event);
|
|
665
|
-
}
|
|
666
|
-
if (hasClearButton && onClear && event.key === "Escape") {
|
|
667
|
-
onClear();
|
|
668
|
-
}
|
|
669
|
-
};
|
|
670
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
671
|
-
Component,
|
|
672
|
-
{
|
|
673
|
-
"data-spark-component": "input",
|
|
674
|
-
ref,
|
|
675
|
-
id,
|
|
676
|
-
name,
|
|
677
|
-
className: inputStyles({
|
|
678
|
-
asChild,
|
|
679
|
-
className,
|
|
680
|
-
intent: state,
|
|
681
|
-
hasLeadingAddon: !!hasLeadingAddon,
|
|
682
|
-
hasTrailingAddon: !!hasTrailingAddon,
|
|
683
|
-
hasLeadingIcon: !!hasLeadingIcon,
|
|
684
|
-
hasTrailingIcon: !!hasTrailingIcon,
|
|
685
|
-
hasClearButton: !!hasClearButton
|
|
686
|
-
}),
|
|
687
|
-
disabled,
|
|
688
|
-
readOnly,
|
|
689
|
-
required: isRequired,
|
|
690
|
-
"aria-describedby": description,
|
|
691
|
-
"aria-invalid": isInvalid,
|
|
692
|
-
onChange: handleChange,
|
|
693
|
-
onKeyDown: handleKeyDown,
|
|
694
|
-
...others
|
|
695
|
-
}
|
|
696
|
-
);
|
|
697
|
-
};
|
|
698
|
-
var Input = Object.assign(Root4, {
|
|
699
|
-
id: "Input"
|
|
700
|
-
});
|
|
701
|
-
Root4.displayName = "Input";
|
|
702
|
-
|
|
703
|
-
// src/input/index.ts
|
|
704
|
-
var InputGroup2 = Object.assign(InputGroup, {
|
|
705
|
-
LeadingAddon: InputLeadingAddon,
|
|
706
|
-
TrailingAddon: InputTrailingAddon,
|
|
707
|
-
LeadingIcon: InputLeadingIcon,
|
|
708
|
-
TrailingIcon: InputTrailingIcon,
|
|
709
|
-
ClearButton: InputClearButton
|
|
710
|
-
});
|
|
711
|
-
InputGroup2.displayName = "InputGroup";
|
|
712
|
-
InputLeadingAddon.displayName = "InputGroup.LeadingAddon";
|
|
713
|
-
InputTrailingAddon.displayName = "InputGroup.TrailingAddon";
|
|
714
|
-
InputLeadingIcon.displayName = "InputGroup.LeadingIcon";
|
|
715
|
-
InputTrailingIcon.displayName = "InputGroup.TrailingIcon";
|
|
716
|
-
InputClearButton.displayName = "InputGroup.ClearButton";
|
|
717
|
-
|
|
718
|
-
// src/textarea/TextareaClearButton.tsx
|
|
719
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
720
|
-
var TextareaClearButton = (props) => {
|
|
721
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(InputGroup2.ClearButton, { inline: true, "data-spark-component": "textarea-group-trailing-icon", ...props });
|
|
722
|
-
};
|
|
723
|
-
TextareaClearButton.id = InputGroup2.ClearButton.id;
|
|
724
|
-
TextareaClearButton.displayName = "TextareaGroup.ClearButton";
|
|
725
|
-
|
|
726
|
-
// src/textarea/TextareaGroup.tsx
|
|
727
|
-
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
728
|
-
var TextareaGroup = (props) => {
|
|
729
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(InputGroup2, { ...props });
|
|
730
|
-
};
|
|
731
|
-
TextareaGroup.displayName = "TextareaGroup";
|
|
732
|
-
|
|
733
|
-
// src/textarea/TextareaLeadingIcon.tsx
|
|
734
|
-
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
735
|
-
var TextareaLeadingIcon = (props) => {
|
|
736
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InputGroup2.LeadingIcon, { "data-spark-component": "textarea-group-leading-icon", ...props });
|
|
737
|
-
};
|
|
738
|
-
TextareaLeadingIcon.id = InputGroup2.LeadingIcon.id;
|
|
739
|
-
TextareaLeadingIcon.displayName = "TextareaGroup.LeadingIcon";
|
|
740
|
-
|
|
741
|
-
// src/textarea/TextareaTrailingIcon.tsx
|
|
742
|
-
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
743
|
-
var TextareaTrailingIcon = (props) => {
|
|
744
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(InputGroup2.TrailingIcon, { "data-spark-component": "textarea-group-trailing-icon", ...props });
|
|
745
|
-
};
|
|
746
|
-
TextareaTrailingIcon.id = InputGroup2.TrailingIcon.id;
|
|
747
|
-
TextareaTrailingIcon.displayName = "TextareaGroup.TrailingIcon";
|
|
748
|
-
|
|
749
|
-
// src/textarea/Textarea.tsx
|
|
750
|
-
var import_class_variance_authority11 = require("class-variance-authority");
|
|
751
|
-
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
752
|
-
var Root5 = ({
|
|
753
|
-
className,
|
|
754
|
-
disabled,
|
|
755
|
-
rows = 1,
|
|
756
|
-
isResizable = true,
|
|
757
|
-
ref,
|
|
758
|
-
onValueChange,
|
|
759
|
-
...others
|
|
760
|
-
}) => {
|
|
761
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
762
|
-
Input,
|
|
763
|
-
{
|
|
764
|
-
className: (0, import_class_variance_authority11.cx)(
|
|
765
|
-
className,
|
|
766
|
-
"py-[var(--spacing-sz-10)]",
|
|
767
|
-
isResizable ? "resize-y" : "resize-none"
|
|
768
|
-
),
|
|
769
|
-
"data-spark-component": "textarea",
|
|
770
|
-
disabled,
|
|
771
|
-
asChild: true,
|
|
772
|
-
onValueChange,
|
|
773
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("textarea", { ref, rows, ...others })
|
|
774
|
-
}
|
|
775
|
-
);
|
|
776
|
-
};
|
|
777
|
-
var Textarea = Object.assign(Root5, {
|
|
778
|
-
id: Input.id
|
|
779
|
-
});
|
|
780
|
-
Root5.displayName = "Textarea";
|
|
781
|
-
|
|
782
|
-
// src/textarea/index.ts
|
|
783
|
-
var TextareaGroup2 = Object.assign(TextareaGroup, {
|
|
784
|
-
LeadingIcon: TextareaLeadingIcon,
|
|
785
|
-
TrailingIcon: TextareaTrailingIcon,
|
|
786
|
-
ClearButton: TextareaClearButton
|
|
787
|
-
});
|
|
788
|
-
TextareaGroup2.displayName = "TextareaGroup";
|
|
789
|
-
TextareaLeadingIcon.displayName = "TextareaGroup.LeadingIcon";
|
|
790
|
-
TextareaTrailingIcon.displayName = "TextareaGroup.TrailingIcon";
|
|
791
|
-
TextareaClearButton.displayName = "TextareaGroup.ClearButton";
|
|
792
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
793
|
-
0 && (module.exports = {
|
|
794
|
-
Textarea,
|
|
795
|
-
TextareaGroup
|
|
796
|
-
});
|
|
797
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),e=require("../input/index.js"),g=require("class-variance-authority"),t=a=>r.jsx(e.InputGroup.ClearButton,{inline:!0,"data-spark-component":"textarea-group-trailing-icon",...a});t.id=e.InputGroup.ClearButton.id;t.displayName="TextareaGroup.ClearButton";const i=a=>r.jsx(e.InputGroup,{...a});i.displayName="TextareaGroup";const n=a=>r.jsx(e.InputGroup.LeadingIcon,{"data-spark-component":"textarea-group-leading-icon",...a});n.id=e.InputGroup.LeadingIcon.id;n.displayName="TextareaGroup.LeadingIcon";const o=a=>r.jsx(e.InputGroup.TrailingIcon,{"data-spark-component":"textarea-group-trailing-icon",...a});o.id=e.InputGroup.TrailingIcon.id;o.displayName="TextareaGroup.TrailingIcon";const u=({className:a,disabled:s,rows:c=1,isResizable:d=!0,ref:l,onValueChange:x,...T})=>r.jsx(e.Input,{className:g.cx(a,"py-[var(--spacing-sz-10)]",d?"resize-y":"resize-none"),"data-spark-component":"textarea",disabled:s,asChild:!0,onValueChange:x,children:r.jsx("textarea",{ref:l,rows:c,...T})}),I=Object.assign(u,{id:e.Input.id});u.displayName="Textarea";const p=Object.assign(i,{LeadingIcon:n,TrailingIcon:o,ClearButton:t});p.displayName="TextareaGroup";n.displayName="TextareaGroup.LeadingIcon";o.displayName="TextareaGroup.TrailingIcon";t.displayName="TextareaGroup.ClearButton";exports.Textarea=I;exports.TextareaGroup=p;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|