@kadoui/react 1.11.16 → 2.1.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.
- package/README.md +1053 -377
- package/dist/components/AccessNavigation/AccessNavigation.d.ts +2 -2
- package/dist/components/AccessNavigation/AccessNavigation.d.ts.map +1 -1
- package/dist/components/AccessNavigation/AccessNavigation.js +3 -1
- package/dist/components/Accordion/AccordionToggle.d.ts +2 -2
- package/dist/components/Accordion/AccordionToggle.d.ts.map +1 -1
- package/dist/components/Affix/Affix.d.ts +2 -2
- package/dist/components/Affix/Affix.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/BreadcrumbsItem.d.ts +2 -2
- package/dist/components/Breadcrumbs/BreadcrumbsItem.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/BreadcrumbsRoot.d.ts +3 -3
- package/dist/components/Breadcrumbs/BreadcrumbsRoot.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/BreadcrumbsRoot.js +1 -1
- package/dist/components/Carousel/CarouselContainer.d.ts +3 -3
- package/dist/components/Carousel/CarouselContainer.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselContainer.js +71 -4
- package/dist/components/Carousel/CarouselContext.d.ts +1 -0
- package/dist/components/Carousel/CarouselContext.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselLeftFade.d.ts +2 -2
- package/dist/components/Carousel/CarouselLeftFade.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselNextBtn.d.ts +2 -2
- package/dist/components/Carousel/CarouselNextBtn.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselPrevBtn.d.ts +2 -2
- package/dist/components/Carousel/CarouselPrevBtn.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselRightFade.d.ts +2 -2
- package/dist/components/Carousel/CarouselRightFade.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselRoot.d.ts +5 -3
- package/dist/components/Carousel/CarouselRoot.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselRoot.js +2 -2
- package/dist/components/Clipboard/Clipboard.d.ts +2 -2
- package/dist/components/Clipboard/Clipboard.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.d.ts +4 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +4 -0
- package/dist/components/ContextMenu/ContextMenuBody.d.ts +2 -2
- package/dist/components/ContextMenu/ContextMenuBody.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuBody.js +1 -15
- package/dist/components/ContextMenu/ContextMenuContext.d.ts +1 -0
- package/dist/components/ContextMenu/ContextMenuContext.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuItem.d.ts +5 -0
- package/dist/components/ContextMenu/ContextMenuItem.d.ts.map +1 -0
- package/dist/components/ContextMenu/ContextMenuItem.js +11 -0
- package/dist/components/ContextMenu/ContextMenuNavigation.d.ts +5 -0
- package/dist/components/ContextMenu/ContextMenuNavigation.d.ts.map +1 -0
- package/dist/components/ContextMenu/ContextMenuNavigation.js +9 -0
- package/dist/components/ContextMenu/ContextMenuRoot.d.ts +2 -2
- package/dist/components/ContextMenu/ContextMenuRoot.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuRoot.js +6 -3
- package/dist/components/Drawer/DrawerBody.d.ts.map +1 -1
- package/dist/components/Drawer/DrawerBody.js +6 -3
- package/dist/components/Drawer/DrawerRoot.d.ts.map +1 -1
- package/dist/components/Drawer/DrawerRoot.js +9 -5
- package/dist/components/Drawer/DrawerToggle.d.ts +2 -2
- package/dist/components/Drawer/DrawerToggle.d.ts.map +1 -1
- package/dist/components/Modal/ModalBody.d.ts.map +1 -1
- package/dist/components/Modal/ModalBody.js +7 -4
- package/dist/components/Modal/ModalContent.d.ts +2 -2
- package/dist/components/Modal/ModalContent.d.ts.map +1 -1
- package/dist/components/Modal/ModalHeader.d.ts +2 -2
- package/dist/components/Modal/ModalHeader.d.ts.map +1 -1
- package/dist/components/Modal/ModalRoot.d.ts.map +1 -1
- package/dist/components/Modal/ModalRoot.js +9 -5
- package/dist/components/Modal/ModalTrigger.d.ts +2 -2
- package/dist/components/Modal/ModalTrigger.d.ts.map +1 -1
- package/dist/components/Otp/OtpHiddenInput.d.ts +2 -2
- package/dist/components/Otp/OtpHiddenInput.d.ts.map +1 -1
- package/dist/components/Otp/OtpInputs.d.ts +2 -2
- package/dist/components/Otp/OtpInputs.d.ts.map +1 -1
- package/dist/components/Otp/OtpRoot.d.ts +4 -2
- package/dist/components/Otp/OtpRoot.d.ts.map +1 -1
- package/dist/components/Otp/OtpRoot.js +5 -3
- package/dist/components/Pagination/PaginationCounts.d.ts +2 -2
- package/dist/components/Pagination/PaginationCounts.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationNextBtn.d.ts +2 -2
- package/dist/components/Pagination/PaginationNextBtn.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationPrevBtn.d.ts +2 -2
- package/dist/components/Pagination/PaginationPrevBtn.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationStateRoot.d.ts +7 -1
- package/dist/components/Pagination/PaginationStateRoot.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationStateRoot.js +1 -3
- package/dist/components/Pagination/PaginationTypes.d.ts +2 -2
- package/dist/components/Pagination/PaginationTypes.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInputField.d.ts +2 -2
- package/dist/components/PasswordInput/PasswordInputField.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInputRoot.d.ts +2 -2
- package/dist/components/PasswordInput/PasswordInputRoot.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInputToggle.d.ts +2 -2
- package/dist/components/PasswordInput/PasswordInputToggle.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +2 -2
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/Popover/PopoverBody.d.ts +2 -2
- package/dist/components/Popover/PopoverBody.d.ts.map +1 -1
- package/dist/components/Popover/PopoverNavigation.d.ts +3 -0
- package/dist/components/Popover/PopoverNavigation.d.ts.map +1 -0
- package/dist/components/Popover/PopoverNavigation.js +5 -0
- package/dist/components/Popover/PopoverRoot.d.ts +2 -2
- package/dist/components/Popover/PopoverRoot.d.ts.map +1 -1
- package/dist/components/Popover/PopoverToggle.d.ts +2 -2
- package/dist/components/Popover/PopoverToggle.d.ts.map +1 -1
- package/dist/components/Progress/ProgressRoot.d.ts +2 -2
- package/dist/components/Progress/ProgressRoot.d.ts.map +1 -1
- package/dist/components/QrCode/QrCode.d.ts +2 -2
- package/dist/components/QrCode/QrCode.d.ts.map +1 -1
- package/dist/components/Rating/RatingItems.d.ts +2 -2
- package/dist/components/Rating/RatingItems.d.ts.map +1 -1
- package/dist/components/Rating/RatingRoot.d.ts +2 -2
- package/dist/components/Rating/RatingRoot.d.ts.map +1 -1
- package/dist/components/SelectBox/SelectBox.d.ts +5 -1
- package/dist/components/SelectBox/SelectBox.d.ts.map +1 -1
- package/dist/components/SelectBox/SelectBox.js +5 -1
- package/dist/components/SelectBox/SelectBoxContext.d.ts +1 -8
- package/dist/components/SelectBox/SelectBoxContext.d.ts.map +1 -1
- package/dist/components/SelectBox/SelectBoxField.d.ts +2 -6
- package/dist/components/SelectBox/SelectBoxField.d.ts.map +1 -1
- package/dist/components/SelectBox/SelectBoxField.js +3 -3
- package/dist/components/SelectBox/SelectBoxInput.d.ts +1 -3
- package/dist/components/SelectBox/SelectBoxInput.d.ts.map +1 -1
- package/dist/components/SelectBox/SelectBoxList.d.ts +1 -3
- package/dist/components/SelectBox/SelectBoxList.d.ts.map +1 -1
- package/dist/components/SelectBox/SelectBoxList.js +2 -1
- package/dist/components/SelectBox/SelectBoxOptions.d.ts +2 -18
- package/dist/components/SelectBox/SelectBoxOptions.d.ts.map +1 -1
- package/dist/components/SelectBox/SelectBoxOptions.js +23 -26
- package/dist/components/SelectBox/SelectBoxRoot.d.ts +2 -4
- package/dist/components/SelectBox/SelectBoxRoot.d.ts.map +1 -1
- package/dist/components/SelectBox/SelectBoxRoot.js +15 -10
- package/dist/components/SelectBox/SelectBoxSearchField.d.ts +3 -0
- package/dist/components/SelectBox/SelectBoxSearchField.d.ts.map +1 -0
- package/dist/components/SelectBox/SelectBoxSearchField.js +8 -0
- package/dist/components/SelectBox/SelectBoxSearchInput.d.ts +3 -0
- package/dist/components/SelectBox/SelectBoxSearchInput.d.ts.map +1 -0
- package/dist/components/SelectBox/SelectBoxSearchInput.js +4 -0
- package/dist/components/SelectBox/selectBoxTypes.d.ts +35 -0
- package/dist/components/SelectBox/selectBoxTypes.d.ts.map +1 -0
- package/dist/components/SelectBox/selectBoxTypes.js +1 -0
- package/dist/components/Sheet/SheetBody.d.ts.map +1 -1
- package/dist/components/Sheet/SheetBody.js +14 -3
- package/dist/components/Sheet/SheetContent.d.ts +2 -2
- package/dist/components/Sheet/SheetContent.d.ts.map +1 -1
- package/dist/components/Sheet/SheetContent.js +1 -0
- package/dist/components/Sheet/SheetHandlebar.d.ts +2 -2
- package/dist/components/Sheet/SheetHandlebar.d.ts.map +1 -1
- package/dist/components/Sheet/SheetHeader.d.ts +2 -2
- package/dist/components/Sheet/SheetHeader.d.ts.map +1 -1
- package/dist/components/Sheet/SheetRoot.d.ts.map +1 -1
- package/dist/components/Sheet/SheetRoot.js +21 -3
- package/dist/components/Sheet/SheetToggle.d.ts +2 -2
- package/dist/components/Sheet/SheetToggle.d.ts.map +1 -1
- package/dist/components/ShowMore/ShowMoreContent.d.ts +2 -2
- package/dist/components/ShowMore/ShowMoreContent.d.ts.map +1 -1
- package/dist/components/ShowMore/ShowMoreFade.d.ts +2 -2
- package/dist/components/ShowMore/ShowMoreFade.d.ts.map +1 -1
- package/dist/components/ShowMore/ShowMoreRoot.d.ts +2 -2
- package/dist/components/ShowMore/ShowMoreRoot.d.ts.map +1 -1
- package/dist/components/ShowMore/ShowMoreToggle.d.ts +2 -2
- package/dist/components/ShowMore/ShowMoreToggle.d.ts.map +1 -1
- package/dist/components/Spoiler/SpoilerBlur.d.ts +3 -3
- package/dist/components/Spoiler/SpoilerBlur.d.ts.map +1 -1
- package/dist/components/Spoiler/SpoilerBlur.js +2 -3
- package/dist/components/Spoiler/SpoilerRoot.d.ts +3 -3
- package/dist/components/Spoiler/SpoilerRoot.d.ts.map +1 -1
- package/dist/components/Spoiler/SpoilerRoot.js +2 -3
- package/dist/components/Submit/SubmitRoot.d.ts +2 -2
- package/dist/components/Submit/SubmitRoot.d.ts.map +1 -1
- package/dist/components/Swap/SwapBtn.d.ts +2 -2
- package/dist/components/Swap/SwapBtn.d.ts.map +1 -1
- package/dist/components/Tabs/TabsList.d.ts +2 -2
- package/dist/components/Tabs/TabsList.d.ts.map +1 -1
- package/dist/components/Tabs/TabsList.js +2 -1
- package/dist/components/Tabs/TabsPanel.d.ts +2 -2
- package/dist/components/Tabs/TabsPanel.d.ts.map +1 -1
- package/dist/components/Tabs/TabsTab.d.ts +2 -2
- package/dist/components/Tabs/TabsTab.d.ts.map +1 -1
- package/dist/components/Theme/Theme.d.ts +4 -0
- package/dist/components/Theme/Theme.d.ts.map +1 -0
- package/dist/components/Theme/Theme.js +3 -0
- package/dist/components/Theme/ThemeContext.d.ts +7 -0
- package/dist/components/Theme/ThemeContext.d.ts.map +1 -0
- package/dist/components/Theme/ThemeContext.js +3 -0
- package/dist/components/Theme/ThemeProvider.d.ts +5 -0
- package/dist/components/Theme/ThemeProvider.d.ts.map +1 -0
- package/dist/components/Theme/ThemeProvider.js +29 -0
- package/dist/components/Theme/ThemeScript.d.ts +2 -0
- package/dist/components/Theme/ThemeScript.d.ts.map +1 -0
- package/dist/components/Theme/ThemeScript.js +35 -0
- package/dist/components/Theme/useTheme.d.ts +5 -0
- package/dist/components/Theme/useTheme.d.ts.map +1 -0
- package/dist/components/Theme/useTheme.js +7 -0
- package/dist/configs.d.ts +2 -0
- package/dist/configs.d.ts.map +1 -0
- package/dist/configs.js +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/next-components/LinkLoader/LinkLoader.d.ts +6 -0
- package/dist/next-components/LinkLoader/LinkLoader.d.ts.map +1 -0
- package/dist/next-components/LinkLoader/LinkLoader.js +6 -0
- package/dist/next-exports.d.ts +2 -0
- package/dist/next-exports.d.ts.map +1 -0
- package/dist/next-exports.js +1 -0
- package/dist/react-components/AccessNavigation/AccessNavigation.d.ts +8 -0
- package/dist/react-components/AccessNavigation/AccessNavigation.d.ts.map +1 -0
- package/dist/react-components/AccessNavigation/AccessNavigation.js +51 -0
- package/dist/react-components/Accordion/Accordion.d.ts +9 -0
- package/dist/react-components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/react-components/Accordion/Accordion.js +8 -0
- package/dist/react-components/Accordion/AccordionBody.d.ts +3 -0
- package/dist/react-components/Accordion/AccordionBody.d.ts.map +1 -0
- package/dist/react-components/Accordion/AccordionBody.js +11 -0
- package/dist/react-components/Accordion/AccordionContext.d.ts +3 -0
- package/dist/react-components/Accordion/AccordionContext.d.ts.map +1 -0
- package/dist/react-components/Accordion/AccordionContext.js +2 -0
- package/dist/react-components/Accordion/AccordionRoot.d.ts +3 -0
- package/dist/react-components/Accordion/AccordionRoot.d.ts.map +1 -0
- package/dist/react-components/Accordion/AccordionRoot.js +8 -0
- package/dist/react-components/Accordion/AccordionToggle.d.ts +3 -0
- package/dist/react-components/Accordion/AccordionToggle.d.ts.map +1 -0
- package/dist/react-components/Accordion/AccordionToggle.js +11 -0
- package/dist/react-components/Accordion/accordionTypes.d.ts +12 -0
- package/dist/react-components/Accordion/accordionTypes.d.ts.map +1 -0
- package/dist/react-components/Accordion/accordionTypes.js +1 -0
- package/dist/react-components/Affix/Affix.d.ts +3 -0
- package/dist/react-components/Affix/Affix.d.ts.map +1 -0
- package/dist/react-components/Affix/Affix.js +35 -0
- package/dist/react-components/Affix/affixTypes.d.ts +3 -0
- package/dist/react-components/Affix/affixTypes.d.ts.map +1 -0
- package/dist/react-components/Affix/affixTypes.js +1 -0
- package/dist/react-components/Breadcrumbs/Breadcrumbs.d.ts +7 -0
- package/dist/react-components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/react-components/Breadcrumbs/Breadcrumbs.js +6 -0
- package/dist/react-components/Breadcrumbs/BreadcrumbsContext.d.ts +3 -0
- package/dist/react-components/Breadcrumbs/BreadcrumbsContext.d.ts.map +1 -0
- package/dist/react-components/Breadcrumbs/BreadcrumbsContext.js +2 -0
- package/dist/react-components/Breadcrumbs/BreadcrumbsItem.d.ts +3 -0
- package/dist/react-components/Breadcrumbs/BreadcrumbsItem.d.ts.map +1 -0
- package/dist/react-components/Breadcrumbs/BreadcrumbsItem.js +8 -0
- package/dist/react-components/Breadcrumbs/BreadcrumbsRoot.d.ts +3 -0
- package/dist/react-components/Breadcrumbs/BreadcrumbsRoot.d.ts.map +1 -0
- package/dist/react-components/Breadcrumbs/BreadcrumbsRoot.js +6 -0
- package/dist/react-components/Breadcrumbs/breadcrumbsTypes.d.ts +11 -0
- package/dist/react-components/Breadcrumbs/breadcrumbsTypes.d.ts.map +1 -0
- package/dist/react-components/Breadcrumbs/breadcrumbsTypes.js +1 -0
- package/dist/react-components/Carousel/Carousel.d.ts +15 -0
- package/dist/react-components/Carousel/Carousel.d.ts.map +1 -0
- package/dist/react-components/Carousel/Carousel.js +14 -0
- package/dist/react-components/Carousel/CarouselContainer.d.ts +3 -0
- package/dist/react-components/Carousel/CarouselContainer.d.ts.map +1 -0
- package/dist/react-components/Carousel/CarouselContainer.js +75 -0
- package/dist/react-components/Carousel/CarouselContext.d.ts +3 -0
- package/dist/react-components/Carousel/CarouselContext.d.ts.map +1 -0
- package/dist/react-components/Carousel/CarouselContext.js +2 -0
- package/dist/react-components/Carousel/CarouselLeftFade.d.ts +3 -0
- package/dist/react-components/Carousel/CarouselLeftFade.d.ts.map +1 -0
- package/dist/react-components/Carousel/CarouselLeftFade.js +11 -0
- package/dist/react-components/Carousel/CarouselNextBtn.d.ts +3 -0
- package/dist/react-components/Carousel/CarouselNextBtn.d.ts.map +1 -0
- package/dist/react-components/Carousel/CarouselNextBtn.js +11 -0
- package/dist/react-components/Carousel/CarouselPrevBtn.d.ts +3 -0
- package/dist/react-components/Carousel/CarouselPrevBtn.d.ts.map +1 -0
- package/dist/react-components/Carousel/CarouselPrevBtn.js +11 -0
- package/dist/react-components/Carousel/CarouselRightFade.d.ts +3 -0
- package/dist/react-components/Carousel/CarouselRightFade.d.ts.map +1 -0
- package/dist/react-components/Carousel/CarouselRightFade.js +11 -0
- package/dist/react-components/Carousel/CarouselRoot.d.ts +3 -0
- package/dist/react-components/Carousel/CarouselRoot.d.ts.map +1 -0
- package/dist/react-components/Carousel/CarouselRoot.js +52 -0
- package/dist/react-components/Carousel/carouselTypes.d.ts +17 -0
- package/dist/react-components/Carousel/carouselTypes.d.ts.map +1 -0
- package/dist/react-components/Carousel/carouselTypes.js +1 -0
- package/dist/react-components/Choice/Choice.d.ts +9 -0
- package/dist/react-components/Choice/Choice.d.ts.map +1 -0
- package/dist/react-components/Choice/Choice.js +8 -0
- package/dist/react-components/Choice/ChoiceContext.d.ts +3 -0
- package/dist/react-components/Choice/ChoiceContext.d.ts.map +1 -0
- package/dist/react-components/Choice/ChoiceContext.js +3 -0
- package/dist/react-components/Choice/ChoiceNavigation.d.ts +3 -0
- package/dist/react-components/Choice/ChoiceNavigation.d.ts.map +1 -0
- package/dist/react-components/Choice/ChoiceNavigation.js +5 -0
- package/dist/react-components/Choice/ChoiceRoot.d.ts +3 -0
- package/dist/react-components/Choice/ChoiceRoot.d.ts.map +1 -0
- package/dist/react-components/Choice/ChoiceRoot.js +6 -0
- package/dist/react-components/Choice/ChoiceTrigger.d.ts +3 -0
- package/dist/react-components/Choice/ChoiceTrigger.d.ts.map +1 -0
- package/dist/react-components/Choice/ChoiceTrigger.js +33 -0
- package/dist/react-components/Choice/choiceTypes.d.ts +23 -0
- package/dist/react-components/Choice/choiceTypes.d.ts.map +1 -0
- package/dist/react-components/Choice/choiceTypes.js +1 -0
- package/dist/react-components/ClientOnly/ClientOnly.d.ts +3 -0
- package/dist/react-components/ClientOnly/ClientOnly.d.ts.map +1 -0
- package/dist/react-components/ClientOnly/ClientOnly.js +6 -0
- package/dist/react-components/ClientOnly/clientOnlyTypes.d.ts +3 -0
- package/dist/react-components/ClientOnly/clientOnlyTypes.d.ts.map +1 -0
- package/dist/react-components/ClientOnly/clientOnlyTypes.js +1 -0
- package/dist/react-components/Clipboard/Clipboard.d.ts +3 -0
- package/dist/react-components/Clipboard/Clipboard.d.ts.map +1 -0
- package/dist/react-components/Clipboard/Clipboard.js +11 -0
- package/dist/react-components/Clipboard/clipboardTypes.d.ts +7 -0
- package/dist/react-components/Clipboard/clipboardTypes.d.ts.map +1 -0
- package/dist/react-components/Clipboard/clipboardTypes.js +1 -0
- package/dist/react-components/ContextMenu/ContextMenu.d.ts +11 -0
- package/dist/react-components/ContextMenu/ContextMenu.d.ts.map +1 -0
- package/dist/react-components/ContextMenu/ContextMenu.js +10 -0
- package/dist/react-components/ContextMenu/ContextMenuBody.d.ts +3 -0
- package/dist/react-components/ContextMenu/ContextMenuBody.d.ts.map +1 -0
- package/dist/react-components/ContextMenu/ContextMenuBody.js +15 -0
- package/dist/react-components/ContextMenu/ContextMenuContext.d.ts +3 -0
- package/dist/react-components/ContextMenu/ContextMenuContext.d.ts.map +1 -0
- package/dist/react-components/ContextMenu/ContextMenuContext.js +2 -0
- package/dist/react-components/ContextMenu/ContextMenuItem.d.ts +3 -0
- package/dist/react-components/ContextMenu/ContextMenuItem.d.ts.map +1 -0
- package/dist/react-components/ContextMenu/ContextMenuItem.js +11 -0
- package/dist/react-components/ContextMenu/ContextMenuNavigation.d.ts +3 -0
- package/dist/react-components/ContextMenu/ContextMenuNavigation.d.ts.map +1 -0
- package/dist/react-components/ContextMenu/ContextMenuNavigation.js +9 -0
- package/dist/react-components/ContextMenu/ContextMenuRoot.d.ts +3 -0
- package/dist/react-components/ContextMenu/ContextMenuRoot.d.ts.map +1 -0
- package/dist/react-components/ContextMenu/ContextMenuRoot.js +58 -0
- package/dist/react-components/ContextMenu/contextMenuTypes.d.ts +16 -0
- package/dist/react-components/ContextMenu/contextMenuTypes.d.ts.map +1 -0
- package/dist/react-components/ContextMenu/contextMenuTypes.js +1 -0
- package/dist/react-components/Drawer/Drawer.d.ts +11 -0
- package/dist/react-components/Drawer/Drawer.d.ts.map +1 -0
- package/dist/react-components/Drawer/Drawer.js +10 -0
- package/dist/react-components/Drawer/DrawerBody.d.ts +3 -0
- package/dist/react-components/Drawer/DrawerBody.d.ts.map +1 -0
- package/dist/react-components/Drawer/DrawerBody.js +40 -0
- package/dist/react-components/Drawer/DrawerContext.d.ts +3 -0
- package/dist/react-components/Drawer/DrawerContext.d.ts.map +1 -0
- package/dist/react-components/Drawer/DrawerContext.js +2 -0
- package/dist/react-components/Drawer/DrawerPortal.d.ts +3 -0
- package/dist/react-components/Drawer/DrawerPortal.d.ts.map +1 -0
- package/dist/react-components/Drawer/DrawerPortal.js +14 -0
- package/dist/react-components/Drawer/DrawerRoot.d.ts +3 -0
- package/dist/react-components/Drawer/DrawerRoot.d.ts.map +1 -0
- package/dist/react-components/Drawer/DrawerRoot.js +41 -0
- package/dist/react-components/Drawer/DrawerToggle.d.ts +3 -0
- package/dist/react-components/Drawer/DrawerToggle.d.ts.map +1 -0
- package/dist/react-components/Drawer/DrawerToggle.js +11 -0
- package/dist/react-components/Drawer/drawerTypes.d.ts +13 -0
- package/dist/react-components/Drawer/drawerTypes.d.ts.map +1 -0
- package/dist/react-components/Drawer/drawerTypes.js +1 -0
- package/dist/react-components/Modal/Modal.d.ts +15 -0
- package/dist/react-components/Modal/Modal.d.ts.map +1 -0
- package/dist/react-components/Modal/Modal.js +14 -0
- package/dist/react-components/Modal/ModalBody.d.ts +3 -0
- package/dist/react-components/Modal/ModalBody.d.ts.map +1 -0
- package/dist/react-components/Modal/ModalBody.js +19 -0
- package/dist/react-components/Modal/ModalContent.d.ts +3 -0
- package/dist/react-components/Modal/ModalContent.d.ts.map +1 -0
- package/dist/react-components/Modal/ModalContent.js +8 -0
- package/dist/react-components/Modal/ModalContext.d.ts +3 -0
- package/dist/react-components/Modal/ModalContext.d.ts.map +1 -0
- package/dist/react-components/Modal/ModalContext.js +2 -0
- package/dist/react-components/Modal/ModalHeader.d.ts +3 -0
- package/dist/react-components/Modal/ModalHeader.d.ts.map +1 -0
- package/dist/react-components/Modal/ModalHeader.js +8 -0
- package/dist/react-components/Modal/ModalPortal.d.ts +3 -0
- package/dist/react-components/Modal/ModalPortal.d.ts.map +1 -0
- package/dist/react-components/Modal/ModalPortal.js +14 -0
- package/dist/react-components/Modal/ModalRoot.d.ts +3 -0
- package/dist/react-components/Modal/ModalRoot.d.ts.map +1 -0
- package/dist/react-components/Modal/ModalRoot.js +41 -0
- package/dist/react-components/Modal/ModalTrigger.d.ts +3 -0
- package/dist/react-components/Modal/ModalTrigger.d.ts.map +1 -0
- package/dist/react-components/Modal/ModalTrigger.js +11 -0
- package/dist/react-components/Modal/modalTypes.d.ts +15 -0
- package/dist/react-components/Modal/modalTypes.d.ts.map +1 -0
- package/dist/react-components/Modal/modalTypes.js +1 -0
- package/dist/react-components/Otp/Otp.d.ts +9 -0
- package/dist/react-components/Otp/Otp.d.ts.map +1 -0
- package/dist/react-components/Otp/Otp.js +8 -0
- package/dist/react-components/Otp/OtpContext.d.ts +3 -0
- package/dist/react-components/Otp/OtpContext.d.ts.map +1 -0
- package/dist/react-components/Otp/OtpContext.js +4 -0
- package/dist/react-components/Otp/OtpHiddenInput.d.ts +3 -0
- package/dist/react-components/Otp/OtpHiddenInput.d.ts.map +1 -0
- package/dist/react-components/Otp/OtpHiddenInput.js +8 -0
- package/dist/react-components/Otp/OtpInputs.d.ts +3 -0
- package/dist/react-components/Otp/OtpInputs.d.ts.map +1 -0
- package/dist/react-components/Otp/OtpInputs.js +55 -0
- package/dist/react-components/Otp/OtpRoot.d.ts +3 -0
- package/dist/react-components/Otp/OtpRoot.d.ts.map +1 -0
- package/dist/react-components/Otp/OtpRoot.js +17 -0
- package/dist/react-components/Otp/otpTypes.d.ts +15 -0
- package/dist/react-components/Otp/otpTypes.d.ts.map +1 -0
- package/dist/react-components/Otp/otpTypes.js +1 -0
- package/dist/react-components/Pagination/Pagination.d.ts +19 -0
- package/dist/react-components/Pagination/Pagination.d.ts.map +1 -0
- package/dist/react-components/Pagination/Pagination.js +14 -0
- package/dist/react-components/Pagination/PaginationContext.d.ts +3 -0
- package/dist/react-components/Pagination/PaginationContext.d.ts.map +1 -0
- package/dist/react-components/Pagination/PaginationContext.js +2 -0
- package/dist/react-components/Pagination/PaginationCounts.d.ts +3 -0
- package/dist/react-components/Pagination/PaginationCounts.d.ts.map +1 -0
- package/dist/react-components/Pagination/PaginationCounts.js +11 -0
- package/dist/react-components/Pagination/PaginationNextBtn.d.ts +3 -0
- package/dist/react-components/Pagination/PaginationNextBtn.d.ts.map +1 -0
- package/dist/react-components/Pagination/PaginationNextBtn.js +11 -0
- package/dist/react-components/Pagination/PaginationPages.d.ts +2 -0
- package/dist/react-components/Pagination/PaginationPages.d.ts.map +1 -0
- package/dist/react-components/Pagination/PaginationPages.js +7 -0
- package/dist/react-components/Pagination/PaginationPrevBtn.d.ts +3 -0
- package/dist/react-components/Pagination/PaginationPrevBtn.d.ts.map +1 -0
- package/dist/react-components/Pagination/PaginationPrevBtn.js +11 -0
- package/dist/react-components/Pagination/PaginationSearchParamsRoot.d.ts +3 -0
- package/dist/react-components/Pagination/PaginationSearchParamsRoot.d.ts.map +1 -0
- package/dist/react-components/Pagination/PaginationSearchParamsRoot.js +42 -0
- package/dist/react-components/Pagination/PaginationStateRoot.d.ts +3 -0
- package/dist/react-components/Pagination/PaginationStateRoot.d.ts.map +1 -0
- package/dist/react-components/Pagination/PaginationStateRoot.js +16 -0
- package/dist/react-components/Pagination/PaginationTypes.d.ts +39 -0
- package/dist/react-components/Pagination/PaginationTypes.d.ts.map +1 -0
- package/dist/react-components/Pagination/PaginationTypes.js +1 -0
- package/dist/react-components/PasswordInput/PasswordInput.d.ts +9 -0
- package/dist/react-components/PasswordInput/PasswordInput.d.ts.map +1 -0
- package/dist/react-components/PasswordInput/PasswordInput.js +8 -0
- package/dist/react-components/PasswordInput/PasswordInputContext.d.ts +3 -0
- package/dist/react-components/PasswordInput/PasswordInputContext.d.ts.map +1 -0
- package/dist/react-components/PasswordInput/PasswordInputContext.js +2 -0
- package/dist/react-components/PasswordInput/PasswordInputField.d.ts +3 -0
- package/dist/react-components/PasswordInput/PasswordInputField.d.ts.map +1 -0
- package/dist/react-components/PasswordInput/PasswordInputField.js +8 -0
- package/dist/react-components/PasswordInput/PasswordInputRoot.d.ts +3 -0
- package/dist/react-components/PasswordInput/PasswordInputRoot.d.ts.map +1 -0
- package/dist/react-components/PasswordInput/PasswordInputRoot.js +8 -0
- package/dist/react-components/PasswordInput/PasswordInputToggle.d.ts +3 -0
- package/dist/react-components/PasswordInput/PasswordInputToggle.d.ts.map +1 -0
- package/dist/react-components/PasswordInput/PasswordInputToggle.js +11 -0
- package/dist/react-components/PasswordInput/passwordInputTypes.d.ts +11 -0
- package/dist/react-components/PasswordInput/passwordInputTypes.d.ts.map +1 -0
- package/dist/react-components/PasswordInput/passwordInputTypes.js +1 -0
- package/dist/react-components/Popover/Popover.d.ts +11 -0
- package/dist/react-components/Popover/Popover.d.ts.map +1 -0
- package/dist/react-components/Popover/Popover.js +10 -0
- package/dist/react-components/Popover/PopoverBody.d.ts +3 -0
- package/dist/react-components/Popover/PopoverBody.d.ts.map +1 -0
- package/dist/react-components/Popover/PopoverBody.js +13 -0
- package/dist/react-components/Popover/PopoverContext.d.ts +3 -0
- package/dist/react-components/Popover/PopoverContext.d.ts.map +1 -0
- package/dist/react-components/Popover/PopoverContext.js +2 -0
- package/dist/react-components/Popover/PopoverNavigation.d.ts +3 -0
- package/dist/react-components/Popover/PopoverNavigation.d.ts.map +1 -0
- package/dist/react-components/Popover/PopoverNavigation.js +5 -0
- package/dist/react-components/Popover/PopoverRoot.d.ts +3 -0
- package/dist/react-components/Popover/PopoverRoot.d.ts.map +1 -0
- package/dist/react-components/Popover/PopoverRoot.js +51 -0
- package/dist/react-components/Popover/PopoverToggle.d.ts +3 -0
- package/dist/react-components/Popover/PopoverToggle.d.ts.map +1 -0
- package/dist/react-components/Popover/PopoverToggle.js +14 -0
- package/dist/react-components/Popover/popoverTypes.d.ts +18 -0
- package/dist/react-components/Popover/popoverTypes.d.ts.map +1 -0
- package/dist/react-components/Popover/popoverTypes.js +1 -0
- package/dist/react-components/Portal/Portal.d.ts +3 -0
- package/dist/react-components/Portal/Portal.d.ts.map +1 -0
- package/dist/react-components/Portal/Portal.js +10 -0
- package/dist/react-components/Portal/portalTypes.d.ts +5 -0
- package/dist/react-components/Portal/portalTypes.d.ts.map +1 -0
- package/dist/react-components/Portal/portalTypes.js +1 -0
- package/dist/react-components/Progress/Progress.d.ts +7 -0
- package/dist/react-components/Progress/Progress.d.ts.map +1 -0
- package/dist/react-components/Progress/Progress.js +6 -0
- package/dist/react-components/Progress/ProgressBar.d.ts +3 -0
- package/dist/react-components/Progress/ProgressBar.d.ts.map +1 -0
- package/dist/react-components/Progress/ProgressBar.js +10 -0
- package/dist/react-components/Progress/ProgressContext.d.ts +3 -0
- package/dist/react-components/Progress/ProgressContext.d.ts.map +1 -0
- package/dist/react-components/Progress/ProgressContext.js +2 -0
- package/dist/react-components/Progress/ProgressRoot.d.ts +3 -0
- package/dist/react-components/Progress/ProgressRoot.d.ts.map +1 -0
- package/dist/react-components/Progress/ProgressRoot.js +6 -0
- package/dist/react-components/Progress/progressTypes.d.ts +14 -0
- package/dist/react-components/Progress/progressTypes.d.ts.map +1 -0
- package/dist/react-components/Progress/progressTypes.js +1 -0
- package/dist/react-components/QrCode/QrCode.d.ts +3 -0
- package/dist/react-components/QrCode/QrCode.d.ts.map +1 -0
- package/dist/react-components/QrCode/QrCode.js +15 -0
- package/dist/react-components/QrCode/qrCodeTypes.d.ts +7 -0
- package/dist/react-components/QrCode/qrCodeTypes.d.ts.map +1 -0
- package/dist/react-components/QrCode/qrCodeTypes.js +1 -0
- package/dist/react-components/Rating/Rating.d.ts +6 -0
- package/dist/react-components/Rating/Rating.d.ts.map +1 -0
- package/dist/react-components/Rating/Rating.js +6 -0
- package/dist/react-components/Rating/RatingContext.d.ts +3 -0
- package/dist/react-components/Rating/RatingContext.d.ts.map +1 -0
- package/dist/react-components/Rating/RatingContext.js +2 -0
- package/dist/react-components/Rating/RatingItems.d.ts +3 -0
- package/dist/react-components/Rating/RatingItems.d.ts.map +1 -0
- package/dist/react-components/Rating/RatingItems.js +13 -0
- package/dist/react-components/Rating/RatingRoot.d.ts +3 -0
- package/dist/react-components/Rating/RatingRoot.d.ts.map +1 -0
- package/dist/react-components/Rating/RatingRoot.js +8 -0
- package/dist/react-components/Rating/ratingTypes.d.ts +14 -0
- package/dist/react-components/Rating/ratingTypes.d.ts.map +1 -0
- package/dist/react-components/Rating/ratingTypes.js +1 -0
- package/dist/react-components/SelectBox/SelectBox.d.ts +17 -0
- package/dist/react-components/SelectBox/SelectBox.d.ts.map +1 -0
- package/dist/react-components/SelectBox/SelectBox.js +16 -0
- package/dist/react-components/SelectBox/SelectBoxContext.d.ts +3 -0
- package/dist/react-components/SelectBox/SelectBoxContext.d.ts.map +1 -0
- package/dist/react-components/SelectBox/SelectBoxContext.js +3 -0
- package/dist/react-components/SelectBox/SelectBoxField.d.ts +3 -0
- package/dist/react-components/SelectBox/SelectBoxField.d.ts.map +1 -0
- package/dist/react-components/SelectBox/SelectBoxField.js +8 -0
- package/dist/react-components/SelectBox/SelectBoxInput.d.ts +3 -0
- package/dist/react-components/SelectBox/SelectBoxInput.d.ts.map +1 -0
- package/dist/react-components/SelectBox/SelectBoxInput.js +4 -0
- package/dist/react-components/SelectBox/SelectBoxList.d.ts +3 -0
- package/dist/react-components/SelectBox/SelectBoxList.d.ts.map +1 -0
- package/dist/react-components/SelectBox/SelectBoxList.js +9 -0
- package/dist/react-components/SelectBox/SelectBoxOptions.d.ts +3 -0
- package/dist/react-components/SelectBox/SelectBoxOptions.d.ts.map +1 -0
- package/dist/react-components/SelectBox/SelectBoxOptions.js +42 -0
- package/dist/react-components/SelectBox/SelectBoxRoot.d.ts +3 -0
- package/dist/react-components/SelectBox/SelectBoxRoot.d.ts.map +1 -0
- package/dist/react-components/SelectBox/SelectBoxRoot.js +29 -0
- package/dist/react-components/SelectBox/SelectBoxSearchField.d.ts +3 -0
- package/dist/react-components/SelectBox/SelectBoxSearchField.d.ts.map +1 -0
- package/dist/react-components/SelectBox/SelectBoxSearchField.js +8 -0
- package/dist/react-components/SelectBox/SelectBoxSearchInput.d.ts +3 -0
- package/dist/react-components/SelectBox/SelectBoxSearchInput.d.ts.map +1 -0
- package/dist/react-components/SelectBox/SelectBoxSearchInput.js +4 -0
- package/dist/react-components/SelectBox/selectBoxTypes.d.ts +35 -0
- package/dist/react-components/SelectBox/selectBoxTypes.d.ts.map +1 -0
- package/dist/react-components/SelectBox/selectBoxTypes.js +1 -0
- package/dist/react-components/Sheet/Sheet.d.ts +17 -0
- package/dist/react-components/Sheet/Sheet.d.ts.map +1 -0
- package/dist/react-components/Sheet/Sheet.js +16 -0
- package/dist/react-components/Sheet/SheetBody.d.ts +3 -0
- package/dist/react-components/Sheet/SheetBody.d.ts.map +1 -0
- package/dist/react-components/Sheet/SheetBody.js +37 -0
- package/dist/react-components/Sheet/SheetContent.d.ts +3 -0
- package/dist/react-components/Sheet/SheetContent.d.ts.map +1 -0
- package/dist/react-components/Sheet/SheetContent.js +16 -0
- package/dist/react-components/Sheet/SheetContext.d.ts +3 -0
- package/dist/react-components/Sheet/SheetContext.d.ts.map +1 -0
- package/dist/react-components/Sheet/SheetContext.js +2 -0
- package/dist/react-components/Sheet/SheetHandlebar.d.ts +3 -0
- package/dist/react-components/Sheet/SheetHandlebar.d.ts.map +1 -0
- package/dist/react-components/Sheet/SheetHandlebar.js +5 -0
- package/dist/react-components/Sheet/SheetHeader.d.ts +3 -0
- package/dist/react-components/Sheet/SheetHeader.d.ts.map +1 -0
- package/dist/react-components/Sheet/SheetHeader.js +5 -0
- package/dist/react-components/Sheet/SheetPortal.d.ts +3 -0
- package/dist/react-components/Sheet/SheetPortal.d.ts.map +1 -0
- package/dist/react-components/Sheet/SheetPortal.js +11 -0
- package/dist/react-components/Sheet/SheetRoot.d.ts +3 -0
- package/dist/react-components/Sheet/SheetRoot.d.ts.map +1 -0
- package/dist/react-components/Sheet/SheetRoot.js +57 -0
- package/dist/react-components/Sheet/SheetToggle.d.ts +3 -0
- package/dist/react-components/Sheet/SheetToggle.d.ts.map +1 -0
- package/dist/react-components/Sheet/SheetToggle.js +11 -0
- package/dist/react-components/Sheet/sheetTypes.d.ts +17 -0
- package/dist/react-components/Sheet/sheetTypes.d.ts.map +1 -0
- package/dist/react-components/Sheet/sheetTypes.js +1 -0
- package/dist/react-components/ShowMore/ShowMore.d.ts +11 -0
- package/dist/react-components/ShowMore/ShowMore.d.ts.map +1 -0
- package/dist/react-components/ShowMore/ShowMore.js +10 -0
- package/dist/react-components/ShowMore/ShowMoreContent.d.ts +3 -0
- package/dist/react-components/ShowMore/ShowMoreContent.d.ts.map +1 -0
- package/dist/react-components/ShowMore/ShowMoreContent.js +19 -0
- package/dist/react-components/ShowMore/ShowMoreContext.d.ts +3 -0
- package/dist/react-components/ShowMore/ShowMoreContext.d.ts.map +1 -0
- package/dist/react-components/ShowMore/ShowMoreContext.js +2 -0
- package/dist/react-components/ShowMore/ShowMoreFade.d.ts +3 -0
- package/dist/react-components/ShowMore/ShowMoreFade.d.ts.map +1 -0
- package/dist/react-components/ShowMore/ShowMoreFade.js +8 -0
- package/dist/react-components/ShowMore/ShowMoreRoot.d.ts +3 -0
- package/dist/react-components/ShowMore/ShowMoreRoot.d.ts.map +1 -0
- package/dist/react-components/ShowMore/ShowMoreRoot.js +21 -0
- package/dist/react-components/ShowMore/ShowMoreToggle.d.ts +3 -0
- package/dist/react-components/ShowMore/ShowMoreToggle.d.ts.map +1 -0
- package/dist/react-components/ShowMore/ShowMoreToggle.js +14 -0
- package/dist/react-components/ShowMore/showMoreTypes.d.ts +16 -0
- package/dist/react-components/ShowMore/showMoreTypes.d.ts.map +1 -0
- package/dist/react-components/ShowMore/showMoreTypes.js +1 -0
- package/dist/react-components/Spoiler/Spoiler.d.ts +7 -0
- package/dist/react-components/Spoiler/Spoiler.d.ts.map +1 -0
- package/dist/react-components/Spoiler/Spoiler.js +6 -0
- package/dist/react-components/Spoiler/SpoilerBlur.d.ts +3 -0
- package/dist/react-components/Spoiler/SpoilerBlur.d.ts.map +1 -0
- package/dist/react-components/Spoiler/SpoilerBlur.js +8 -0
- package/dist/react-components/Spoiler/SpoilerContext.d.ts +3 -0
- package/dist/react-components/Spoiler/SpoilerContext.d.ts.map +1 -0
- package/dist/react-components/Spoiler/SpoilerContext.js +2 -0
- package/dist/react-components/Spoiler/SpoilerRoot.d.ts +3 -0
- package/dist/react-components/Spoiler/SpoilerRoot.d.ts.map +1 -0
- package/dist/react-components/Spoiler/SpoilerRoot.js +8 -0
- package/dist/react-components/Spoiler/spoilerTypes.d.ts +8 -0
- package/dist/react-components/Spoiler/spoilerTypes.d.ts.map +1 -0
- package/dist/react-components/Spoiler/spoilerTypes.js +1 -0
- package/dist/react-components/Submit/Submit.d.ts +7 -0
- package/dist/react-components/Submit/Submit.d.ts.map +1 -0
- package/dist/react-components/Submit/Submit.js +6 -0
- package/dist/react-components/Submit/SubmitContext.d.ts +3 -0
- package/dist/react-components/Submit/SubmitContext.d.ts.map +1 -0
- package/dist/react-components/Submit/SubmitContext.js +2 -0
- package/dist/react-components/Submit/SubmitLoader.d.ts +3 -0
- package/dist/react-components/Submit/SubmitLoader.d.ts.map +1 -0
- package/dist/react-components/Submit/SubmitLoader.js +7 -0
- package/dist/react-components/Submit/SubmitRoot.d.ts +3 -0
- package/dist/react-components/Submit/SubmitRoot.d.ts.map +1 -0
- package/dist/react-components/Submit/SubmitRoot.js +8 -0
- package/dist/react-components/Submit/submitTypes.d.ts +11 -0
- package/dist/react-components/Submit/submitTypes.d.ts.map +1 -0
- package/dist/react-components/Submit/submitTypes.js +1 -0
- package/dist/react-components/Swap/Swap.d.ts +7 -0
- package/dist/react-components/Swap/Swap.d.ts.map +1 -0
- package/dist/react-components/Swap/Swap.js +6 -0
- package/dist/react-components/Swap/SwapBtn.d.ts +3 -0
- package/dist/react-components/Swap/SwapBtn.d.ts.map +1 -0
- package/dist/react-components/Swap/SwapBtn.js +16 -0
- package/dist/react-components/Swap/SwapContext.d.ts +3 -0
- package/dist/react-components/Swap/SwapContext.d.ts.map +1 -0
- package/dist/react-components/Swap/SwapContext.js +2 -0
- package/dist/react-components/Swap/SwapRoot.d.ts +3 -0
- package/dist/react-components/Swap/SwapRoot.d.ts.map +1 -0
- package/dist/react-components/Swap/SwapRoot.js +6 -0
- package/dist/react-components/Swap/swapTypes.d.ts +15 -0
- package/dist/react-components/Swap/swapTypes.d.ts.map +1 -0
- package/dist/react-components/Swap/swapTypes.js +1 -0
- package/dist/react-components/Tabs/Tabs.d.ts +11 -0
- package/dist/react-components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/react-components/Tabs/Tabs.js +10 -0
- package/dist/react-components/Tabs/TabsContext.d.ts +3 -0
- package/dist/react-components/Tabs/TabsContext.d.ts.map +1 -0
- package/dist/react-components/Tabs/TabsContext.js +5 -0
- package/dist/react-components/Tabs/TabsList.d.ts +3 -0
- package/dist/react-components/Tabs/TabsList.d.ts.map +1 -0
- package/dist/react-components/Tabs/TabsList.js +6 -0
- package/dist/react-components/Tabs/TabsPanel.d.ts +3 -0
- package/dist/react-components/Tabs/TabsPanel.d.ts.map +1 -0
- package/dist/react-components/Tabs/TabsPanel.js +9 -0
- package/dist/react-components/Tabs/TabsRoot.d.ts +3 -0
- package/dist/react-components/Tabs/TabsRoot.d.ts.map +1 -0
- package/dist/react-components/Tabs/TabsRoot.js +6 -0
- package/dist/react-components/Tabs/TabsTab.d.ts +3 -0
- package/dist/react-components/Tabs/TabsTab.d.ts.map +1 -0
- package/dist/react-components/Tabs/TabsTab.js +11 -0
- package/dist/react-components/Tabs/tabsTypes.d.ts +18 -0
- package/dist/react-components/Tabs/tabsTypes.d.ts.map +1 -0
- package/dist/react-components/Tabs/tabsTypes.js +1 -0
- package/dist/react-components/Theme/Theme.d.ts +5 -0
- package/dist/react-components/Theme/Theme.d.ts.map +1 -0
- package/dist/react-components/Theme/Theme.js +4 -0
- package/dist/react-components/Theme/ThemeContext.d.ts +3 -0
- package/dist/react-components/Theme/ThemeContext.d.ts.map +1 -0
- package/dist/react-components/Theme/ThemeContext.js +3 -0
- package/dist/react-components/Theme/ThemeProvider.d.ts +3 -0
- package/dist/react-components/Theme/ThemeProvider.d.ts.map +1 -0
- package/dist/react-components/Theme/ThemeProvider.js +29 -0
- package/dist/react-components/Theme/ThemeScript.d.ts +2 -0
- package/dist/react-components/Theme/ThemeScript.d.ts.map +1 -0
- package/dist/react-components/Theme/ThemeScript.js +35 -0
- package/dist/react-components/Theme/themeTypes.d.ts +8 -0
- package/dist/react-components/Theme/themeTypes.d.ts.map +1 -0
- package/dist/react-components/Theme/themeTypes.js +1 -0
- package/dist/react-components/Theme/useTheme.d.ts +5 -0
- package/dist/react-components/Theme/useTheme.d.ts.map +1 -0
- package/dist/react-components/Theme/useTheme.js +7 -0
- package/dist/react-exports.d.ts +28 -0
- package/dist/react-exports.d.ts.map +1 -0
- package/dist/react-exports.js +27 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/utils-exports.d.ts +4 -0
- package/dist/utils-exports.d.ts.map +1 -0
- package/dist/utils-exports.js +3 -0
- package/package.json +19 -18
package/README.md
CHANGED
|
@@ -1,488 +1,855 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @kadoui/react
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
[Read about `Kadoui-css`](https://www.npmjs.com/package/@kadoui/css)
|
|
5
|
+
**Primitive, unstyled, and accessible React components built with modern patterns**
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
[
|
|
7
|
+
[](https://www.npmjs.com/package/@kadoui/react)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
[](https://www.typescriptlang.org/)
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Introduction
|
|
16
|
+
|
|
17
|
+
`@kadoui/react` is a collection of primitive, unstyled React components that provide accessible, composable building blocks for your UI. These components are designed to be styled with your own CSS framework (we recommend [@kadoui/css](https://www.npmjs.com/package/@kadoui/css)) and follow modern React patterns.
|
|
18
|
+
|
|
19
|
+
### Key Features
|
|
20
|
+
|
|
21
|
+
- 🎨 **Unstyled & Composable** - Style components however you want
|
|
22
|
+
- ♿ **Accessible** - Built with accessibility in mind
|
|
23
|
+
- 🎯 **TypeScript** - Full TypeScript support with exported types
|
|
24
|
+
- 🚀 **Modern Patterns** - Uses React 19 features and best practices
|
|
25
|
+
- 📦 **Tree-shakeable** - Import only what you need
|
|
26
|
+
- 🎭 **Flexible** - Works with any styling solution
|
|
10
27
|
|
|
11
28
|
---
|
|
12
29
|
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install @kadoui/react
|
|
34
|
+
# or
|
|
35
|
+
pnpm add @kadoui/react
|
|
36
|
+
# or
|
|
37
|
+
yarn add @kadoui/react
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Peer Dependencies
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install react react-dom
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Optional Dependencies
|
|
47
|
+
|
|
48
|
+
For animations, we use `framer-motion`:
|
|
49
|
+
```bash
|
|
50
|
+
npm install framer-motion
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
For icons, we recommend `lucide-react`:
|
|
54
|
+
```bash
|
|
55
|
+
npm install lucide-react
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
For styling, we recommend `@kadoui/css`:
|
|
59
|
+
```bash
|
|
60
|
+
npm install @kadoui/css
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Quick Start
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
import { Accordion } from "@kadoui/react";
|
|
69
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
70
|
+
|
|
71
|
+
function App() {
|
|
72
|
+
return (
|
|
73
|
+
<Accordion>
|
|
74
|
+
<Accordion.Toggle className="btn">
|
|
75
|
+
Toggle Accordion
|
|
76
|
+
<ChevronDownIcon />
|
|
77
|
+
</Accordion.Toggle>
|
|
78
|
+
<Accordion.Body>
|
|
79
|
+
<p>Accordion content goes here</p>
|
|
80
|
+
</Accordion.Body>
|
|
81
|
+
</Accordion>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Components
|
|
89
|
+
|
|
13
90
|
### AccessNavigation
|
|
14
91
|
|
|
15
|
-
|
|
92
|
+
Add keyboard navigation (arrow keys) to your UI elements.
|
|
93
|
+
|
|
94
|
+
**Props:**
|
|
95
|
+
- `direction: "x" | "y"` - Navigation direction
|
|
96
|
+
- `focusOnMount?: boolean` - Auto-focus first element on mount
|
|
97
|
+
- `dir?: "ltr" | "rtl"` - Text direction (defaults to document direction)
|
|
98
|
+
|
|
99
|
+
**Example:**
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
import { AccessNavigation } from "@kadoui/react";
|
|
103
|
+
|
|
104
|
+
<AccessNavigation direction="x" className="join">
|
|
105
|
+
<button className="btn">One</button>
|
|
106
|
+
<button className="btn">Two</button>
|
|
107
|
+
<button className="btn">Three</button>
|
|
108
|
+
</AccessNavigation>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Vertical Navigation:**
|
|
16
112
|
|
|
17
113
|
```tsx
|
|
18
|
-
<AccessNavigation
|
|
19
|
-
|
|
20
|
-
className="
|
|
21
|
-
<button className="btn
|
|
22
|
-
<button className="btn btn-soft">Two</button>
|
|
23
|
-
<button className="btn btn-soft">Three</button>
|
|
24
|
-
<button className="btn btn-soft">Four</button>
|
|
114
|
+
<AccessNavigation direction="y" className="flex flex-col gap-2">
|
|
115
|
+
<button className="btn">Item 1</button>
|
|
116
|
+
<button className="btn">Item 2</button>
|
|
117
|
+
<button className="btn">Item 3</button>
|
|
25
118
|
</AccessNavigation>
|
|
26
119
|
```
|
|
27
120
|
|
|
121
|
+
---
|
|
122
|
+
|
|
28
123
|
### Accordion
|
|
29
124
|
|
|
125
|
+
A collapsible content component.
|
|
126
|
+
|
|
127
|
+
**Components:**
|
|
128
|
+
- `Accordion` (Root) - Wrapper component
|
|
129
|
+
- `Accordion.Toggle` - Button to toggle accordion
|
|
130
|
+
- `Accordion.Body` - Collapsible content
|
|
131
|
+
|
|
132
|
+
**Example:**
|
|
133
|
+
|
|
30
134
|
```tsx
|
|
135
|
+
import { Accordion } from "@kadoui/react";
|
|
136
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
137
|
+
|
|
31
138
|
<Accordion>
|
|
32
|
-
<Accordion.Toggle className="btn
|
|
139
|
+
<Accordion.Toggle className="btn justify-between group">
|
|
33
140
|
<span>Open accordion</span>
|
|
34
|
-
<ChevronDownIcon className="transition-transform
|
|
141
|
+
<ChevronDownIcon className="transition-transform group-data-[state=true]:-scale-y-100" />
|
|
35
142
|
</Accordion.Toggle>
|
|
36
143
|
<Accordion.Body>
|
|
37
144
|
<p className="p-3">
|
|
38
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
|
39
|
-
repellendus dolores, fuga nam commodi sapiente omnis voluptatum error earum culpa
|
|
40
|
-
asperiores eaque ea enim possimus vero esse!
|
|
145
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
|
41
146
|
</p>
|
|
42
147
|
</Accordion.Body>
|
|
43
148
|
</Accordion>
|
|
44
149
|
```
|
|
45
150
|
|
|
46
|
-
|
|
151
|
+
**API:**
|
|
152
|
+
- `Accordion` - Accepts `PropsWithChildren`
|
|
153
|
+
- `Accordion.Toggle` - Accepts `ComponentProps<"button"> & { icon?: ReactNode }`
|
|
154
|
+
- `Accordion.Body` - Accepts `HTMLMotionProps<"div">`
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
### Affix
|
|
159
|
+
|
|
160
|
+
A button that appears when scrolling down, typically used for "scroll to top" functionality.
|
|
161
|
+
|
|
162
|
+
**Props:**
|
|
163
|
+
- `AffixPropsT` - Extends `ComponentProps<"button">`
|
|
164
|
+
|
|
165
|
+
**Example:**
|
|
47
166
|
|
|
48
167
|
```tsx
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
</Breadcrumbs.Item>
|
|
56
|
-
<Breadcrumbs.Item
|
|
57
|
-
className="breadcrumbs-item"
|
|
58
|
-
isLastItem>
|
|
59
|
-
<button className="btn btn-fill">How to gain money?</button>
|
|
60
|
-
</Breadcrumbs.Item>
|
|
61
|
-
</Breadcrumbs>
|
|
168
|
+
import { Affix } from "@kadoui/react";
|
|
169
|
+
import { ArrowUpIcon } from "lucide-react";
|
|
170
|
+
|
|
171
|
+
<Affix className="btn btn-fill fixed bottom-4 right-4">
|
|
172
|
+
<ArrowUpIcon />
|
|
173
|
+
</Affix>
|
|
62
174
|
```
|
|
63
175
|
|
|
64
|
-
|
|
176
|
+
The component automatically shows/hides based on scroll position and scrolls to top when clicked.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
### Breadcrumbs
|
|
181
|
+
|
|
182
|
+
Display navigation hierarchy.
|
|
183
|
+
|
|
184
|
+
**Components:**
|
|
185
|
+
- `Breadcrumbs` (Root) - Requires `separator: ReactNode` prop
|
|
186
|
+
- `Breadcrumbs.Item` - Individual breadcrumb item
|
|
187
|
+
|
|
188
|
+
**Props:**
|
|
189
|
+
- `Breadcrumbs` - `ComponentProps<"nav"> & { separator: ReactNode }`
|
|
190
|
+
- `Breadcrumbs.Item` - `ComponentProps<"div"> & { isLastItem?: boolean }`
|
|
191
|
+
|
|
192
|
+
**Example:**
|
|
65
193
|
|
|
66
194
|
```tsx
|
|
67
|
-
|
|
195
|
+
import { Breadcrumbs } from "@kadoui/react";
|
|
196
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
197
|
+
|
|
198
|
+
<Breadcrumbs separator={<ChevronRightIcon />} className="breadcrumbs">
|
|
68
199
|
<Breadcrumbs.Item className="breadcrumbs-item">
|
|
69
|
-
<button className="btn
|
|
200
|
+
<button className="btn">Home</button>
|
|
70
201
|
</Breadcrumbs.Item>
|
|
71
202
|
<Breadcrumbs.Item className="breadcrumbs-item">
|
|
72
|
-
<button className="btn
|
|
203
|
+
<button className="btn">Articles</button>
|
|
73
204
|
</Breadcrumbs.Item>
|
|
74
|
-
<Breadcrumbs.Item
|
|
75
|
-
className="
|
|
76
|
-
isLastItem>
|
|
77
|
-
<button className="btn btn-fill">How to gain money?</button>
|
|
205
|
+
<Breadcrumbs.Item isLastItem className="breadcrumbs-item">
|
|
206
|
+
<button className="btn btn-fill">Current Page</button>
|
|
78
207
|
</Breadcrumbs.Item>
|
|
79
208
|
</Breadcrumbs>
|
|
80
209
|
```
|
|
81
210
|
|
|
211
|
+
---
|
|
212
|
+
|
|
82
213
|
### Carousel
|
|
83
214
|
|
|
215
|
+
A horizontal scrolling carousel with fade effects and navigation buttons.
|
|
216
|
+
|
|
217
|
+
**Components:**
|
|
218
|
+
- `Carousel` (Root) - Accepts `mouseScroll?: "auto" | "swipe"`
|
|
219
|
+
- `Carousel.Container` - Scrollable container (children must have `carousel-children` class)
|
|
220
|
+
- `Carousel.LeftFade` - Left fade overlay
|
|
221
|
+
- `Carousel.RightFade` - Right fade overlay
|
|
222
|
+
- `Carousel.PrevBtn` - Previous button
|
|
223
|
+
- `Carousel.NextBtn` - Next button
|
|
224
|
+
|
|
225
|
+
**Props:**
|
|
226
|
+
- `Carousel` - `ComponentProps<"div"> & { mouseScroll?: "auto" | "swipe" }`
|
|
227
|
+
- `mouseScroll="auto"` - Smooth scrolling with mouse drag
|
|
228
|
+
- `mouseScroll="swipe"` - Snap to items on swipe
|
|
229
|
+
|
|
230
|
+
**Example:**
|
|
231
|
+
|
|
84
232
|
```tsx
|
|
85
|
-
|
|
233
|
+
import { Carousel } from "@kadoui/react";
|
|
234
|
+
import { ArrowLeftIcon, ArrowRightIcon } from "lucide-react";
|
|
235
|
+
|
|
236
|
+
<Carousel className="carousel" mouseScroll="auto">
|
|
86
237
|
<Carousel.LeftFade className="carousel-left-fade" />
|
|
87
238
|
<Carousel.RightFade className="carousel-right-fade" />
|
|
88
239
|
|
|
89
240
|
<Carousel.Container className="carousel-container gap-3 scroll-smooth">
|
|
90
241
|
{Array.from({ length: 12 }).map((_, index) => (
|
|
91
|
-
<article
|
|
92
|
-
|
|
93
|
-
className="carousel-children card slidable">
|
|
94
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Asperiores doloremque
|
|
95
|
-
error rem ex, necessitatibus dolore deleniti alias aperiam cum ipsum, suscipit
|
|
96
|
-
possimus porro provident totam mollitia? Voluptate, eaque quas. Culpa.
|
|
242
|
+
<article key={index} className="carousel-children card">
|
|
243
|
+
Card {index + 1}
|
|
97
244
|
</article>
|
|
98
245
|
))}
|
|
99
246
|
</Carousel.Container>
|
|
100
247
|
|
|
101
|
-
<div className="
|
|
248
|
+
<div className="flex items-center justify-center gap-3 mt-3">
|
|
102
249
|
<Carousel.PrevBtn className="btn btn-outline btn-square">
|
|
103
|
-
<ArrowLeftIcon
|
|
250
|
+
<ArrowLeftIcon />
|
|
104
251
|
</Carousel.PrevBtn>
|
|
105
252
|
<Carousel.NextBtn className="btn btn-outline btn-square">
|
|
106
|
-
<ArrowRightIcon
|
|
253
|
+
<ArrowRightIcon />
|
|
107
254
|
</Carousel.NextBtn>
|
|
108
255
|
</div>
|
|
109
256
|
</Carousel>
|
|
110
257
|
```
|
|
111
258
|
|
|
259
|
+
**Important:** Children inside `Carousel.Container` must have the `carousel-children` class for proper width calculation.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
### Choice
|
|
264
|
+
|
|
265
|
+
A flexible component for radio buttons, checkboxes, filters, and switches.
|
|
266
|
+
|
|
267
|
+
**Components:**
|
|
268
|
+
- `Choice` (Root) - Manages choice state
|
|
269
|
+
- `Choice.Trigger` - Individual choice trigger
|
|
270
|
+
- `Choice.Navigation` - Optional keyboard navigation wrapper
|
|
271
|
+
|
|
272
|
+
**Props:**
|
|
273
|
+
- `Choice` - `ComponentProps<"div"> & ChoiceContextT`
|
|
274
|
+
- `multiple?: boolean` - Enable multiple selection
|
|
275
|
+
- `activeChoice: string | string[] | null` - Current selection
|
|
276
|
+
- `setActiveChoice: Dispatch<SetStateAction<...>>` - State setter
|
|
277
|
+
- `requiredOne?: boolean` - Prevent deselecting last item when `multiple` is true
|
|
278
|
+
- `Choice.Trigger` - `ComponentProps<"button"> & { choiceName: string }`
|
|
279
|
+
|
|
280
|
+
**Single Selection (Radio):**
|
|
281
|
+
|
|
282
|
+
```tsx
|
|
283
|
+
import { Choice } from "@kadoui/react";
|
|
284
|
+
|
|
285
|
+
const [choice, setChoice] = useState<string | null>("1");
|
|
286
|
+
|
|
287
|
+
<Choice activeChoice={choice} setActiveChoice={setChoice}>
|
|
288
|
+
<Choice.Navigation direction="x" className="flex gap-3">
|
|
289
|
+
<Choice.Trigger choiceName="1" className="btn">
|
|
290
|
+
Option 1
|
|
291
|
+
</Choice.Trigger>
|
|
292
|
+
<Choice.Trigger choiceName="2" className="btn">
|
|
293
|
+
Option 2
|
|
294
|
+
</Choice.Trigger>
|
|
295
|
+
</Choice.Navigation>
|
|
296
|
+
</Choice>
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
**Multiple Selection (Checkbox/Filter):**
|
|
300
|
+
|
|
301
|
+
```tsx
|
|
302
|
+
const [filters, setFilters] = useState<string[]>([]);
|
|
303
|
+
|
|
304
|
+
<Choice multiple activeChoice={filters} setActiveChoice={setFilters}>
|
|
305
|
+
<Choice.Navigation direction="x" className="flex gap-3">
|
|
306
|
+
<Choice.Trigger choiceName="filter1" className="btn">
|
|
307
|
+
Filter 1
|
|
308
|
+
</Choice.Trigger>
|
|
309
|
+
<Choice.Trigger choiceName="filter2" className="btn">
|
|
310
|
+
Filter 2
|
|
311
|
+
</Choice.Trigger>
|
|
312
|
+
</Choice.Navigation>
|
|
313
|
+
</Choice>
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**Required One (Prevent Empty Selection):**
|
|
317
|
+
|
|
318
|
+
```tsx
|
|
319
|
+
<Choice
|
|
320
|
+
multiple
|
|
321
|
+
requiredOne
|
|
322
|
+
activeChoice={filters}
|
|
323
|
+
setActiveChoice={setFilters}
|
|
324
|
+
>
|
|
325
|
+
{/* At least one item must always be selected */}
|
|
326
|
+
</Choice>
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
112
331
|
### ClientOnly
|
|
113
332
|
|
|
333
|
+
Render children only on the client side (useful for SSR).
|
|
334
|
+
|
|
335
|
+
**Props:**
|
|
336
|
+
- `ClientOnlyPropsT` - `PropsWithChildren`
|
|
337
|
+
|
|
338
|
+
**Example:**
|
|
339
|
+
|
|
114
340
|
```tsx
|
|
115
|
-
|
|
341
|
+
import { ClientOnly } from "@kadoui/react";
|
|
342
|
+
|
|
343
|
+
<p>This renders on server and client</p>
|
|
116
344
|
<ClientOnly>
|
|
117
|
-
<p>
|
|
345
|
+
<p>This only renders on client</p>
|
|
118
346
|
</ClientOnly>
|
|
119
347
|
```
|
|
120
348
|
|
|
349
|
+
---
|
|
350
|
+
|
|
121
351
|
### Clipboard
|
|
122
352
|
|
|
353
|
+
Copy text to clipboard with visual feedback.
|
|
354
|
+
|
|
355
|
+
**Props:**
|
|
356
|
+
- `ClipboardPropsT` - `ComponentProps<"button"> & { text: string; timeout?: number; copiedChildren?: ReactNode }`
|
|
357
|
+
- `text: string` - Text to copy
|
|
358
|
+
- `timeout?: number` - Timeout for copied state (default: 3000ms)
|
|
359
|
+
- `copiedChildren?: ReactNode` - Content to show when copied
|
|
360
|
+
|
|
361
|
+
**Example:**
|
|
362
|
+
|
|
123
363
|
```tsx
|
|
364
|
+
import { Clipboard } from "@kadoui/react";
|
|
365
|
+
import { CopyIcon, CopyCheckIcon } from "lucide-react";
|
|
366
|
+
|
|
124
367
|
<Clipboard
|
|
125
|
-
text="
|
|
126
|
-
className="btn btn-soft
|
|
127
|
-
copiedChildren={<CopyCheckIcon
|
|
128
|
-
|
|
368
|
+
text="Hello World"
|
|
369
|
+
className="btn btn-soft"
|
|
370
|
+
copiedChildren={<CopyCheckIcon />}
|
|
371
|
+
timeout={2000}
|
|
372
|
+
>
|
|
373
|
+
<CopyIcon />
|
|
129
374
|
</Clipboard>
|
|
130
375
|
```
|
|
131
376
|
|
|
377
|
+
---
|
|
378
|
+
|
|
132
379
|
### ContextMenu
|
|
133
380
|
|
|
381
|
+
Right-click context menu.
|
|
382
|
+
|
|
383
|
+
**Components:**
|
|
384
|
+
- `ContextMenu` (Root) - Wrapper (responds to right-click)
|
|
385
|
+
- `ContextMenu.Body` - Menu content
|
|
386
|
+
- `ContextMenu.Item` - Menu item
|
|
387
|
+
- `ContextMenu.Navigation` - Optional keyboard navigation
|
|
388
|
+
|
|
389
|
+
**Example:**
|
|
390
|
+
|
|
134
391
|
```tsx
|
|
135
|
-
|
|
136
|
-
|
|
392
|
+
import { ContextMenu } from "@kadoui/react";
|
|
393
|
+
import { TrashIcon, RefreshCwIcon } from "lucide-react";
|
|
394
|
+
|
|
395
|
+
<ContextMenu className="border-4 border-dashed h-[33vh]">
|
|
396
|
+
<span>Right-click here!</span>
|
|
137
397
|
|
|
138
398
|
<ContextMenu.Body className="context-menu-body">
|
|
139
|
-
<
|
|
140
|
-
<
|
|
141
|
-
<TrashIcon
|
|
142
|
-
<span>
|
|
143
|
-
</
|
|
144
|
-
<
|
|
145
|
-
<RefreshCwIcon
|
|
146
|
-
<span>
|
|
147
|
-
</
|
|
148
|
-
|
|
149
|
-
<FlagIcon className="compatible-icon" />
|
|
150
|
-
<span>IGNORE IT</span>
|
|
151
|
-
</button>
|
|
152
|
-
</AccessNavigation>
|
|
399
|
+
<ContextMenu.Navigation direction="y" className="card card-menu">
|
|
400
|
+
<ContextMenu.Item className="btn btn-ghost">
|
|
401
|
+
<TrashIcon />
|
|
402
|
+
<span>Delete</span>
|
|
403
|
+
</ContextMenu.Item>
|
|
404
|
+
<ContextMenu.Item className="btn btn-ghost">
|
|
405
|
+
<RefreshCwIcon />
|
|
406
|
+
<span>Reload</span>
|
|
407
|
+
</ContextMenu.Item>
|
|
408
|
+
</ContextMenu.Navigation>
|
|
153
409
|
</ContextMenu.Body>
|
|
154
410
|
</ContextMenu>
|
|
155
411
|
```
|
|
156
412
|
|
|
157
|
-
|
|
413
|
+
**API:**
|
|
414
|
+
- `ContextMenu` - `ComponentProps<"div">`
|
|
415
|
+
- `ContextMenu.Body` - `ComponentProps<"div">`
|
|
416
|
+
- `ContextMenu.Item` - `ComponentProps<"button">`
|
|
417
|
+
- `ContextMenu.Navigation` - `AccessNavigationPropsT`
|
|
158
418
|
|
|
159
|
-
|
|
160
|
-
<Drawer>
|
|
161
|
-
<Drawer.Toggle className="btn btn-soft">Open left drawer</Drawer.Toggle>
|
|
419
|
+
---
|
|
162
420
|
|
|
163
|
-
|
|
164
|
-
<Drawer.Body className="drawer-body">
|
|
165
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorum porro vero delectus
|
|
166
|
-
eum qui laboriosam, dolore veritatis eligendi amet voluptatibus incidunt temporibus
|
|
167
|
-
dolores fuga adipisci eius saepe quod aspernatur iure.
|
|
168
|
-
</Drawer.Body>
|
|
169
|
-
</Drawer.Portal>
|
|
170
|
-
</Drawer>
|
|
171
|
-
```
|
|
421
|
+
### Drawer
|
|
172
422
|
|
|
173
|
-
|
|
423
|
+
Slide-out panel from any edge.
|
|
174
424
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
425
|
+
**Components:**
|
|
426
|
+
- `Drawer` (Root)
|
|
427
|
+
- `Drawer.Toggle` - Button to open drawer
|
|
428
|
+
- `Drawer.Portal` - Portal wrapper (required)
|
|
429
|
+
- `Drawer.Body` - Drawer content
|
|
178
430
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
position="top">
|
|
183
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorum porro vero delectus
|
|
184
|
-
eum qui laboriosam, dolore veritatis eligendi amet voluptatibus incidunt temporibus
|
|
185
|
-
dolores fuga adipisci eius saepe quod aspernatur iure.
|
|
186
|
-
</Drawer.Body>
|
|
187
|
-
</Drawer.Portal>
|
|
188
|
-
</Drawer>
|
|
189
|
-
```
|
|
431
|
+
**Props:**
|
|
432
|
+
- `Drawer` - `PropsWithChildren`
|
|
433
|
+
- `Drawer.Body` - `HTMLMotionProps<"div"> & { position?: "top" | "right" | "bottom" | "left" }`
|
|
190
434
|
|
|
191
|
-
|
|
435
|
+
**Example:**
|
|
192
436
|
|
|
193
437
|
```tsx
|
|
438
|
+
import { Drawer } from "@kadoui/react";
|
|
439
|
+
|
|
194
440
|
<Drawer>
|
|
195
|
-
<Drawer.Toggle className="btn
|
|
441
|
+
<Drawer.Toggle className="btn">Open Drawer</Drawer.Toggle>
|
|
196
442
|
|
|
197
443
|
<Drawer.Portal className="drawer-portal">
|
|
198
|
-
<Drawer.Body
|
|
199
|
-
|
|
200
|
-
position="right">
|
|
201
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorum porro vero delectus
|
|
202
|
-
eum qui laboriosam, dolore veritatis eligendi amet voluptatibus incidunt temporibus
|
|
203
|
-
dolores fuga adipisci eius saepe quod aspernatur iure.
|
|
444
|
+
<Drawer.Body className="drawer-body" position="left">
|
|
445
|
+
<p>Drawer content</p>
|
|
204
446
|
</Drawer.Body>
|
|
205
447
|
</Drawer.Portal>
|
|
206
448
|
</Drawer>
|
|
207
449
|
```
|
|
208
450
|
|
|
209
|
-
|
|
451
|
+
**Positions:**
|
|
452
|
+
- `position="left"` (default in LTR)
|
|
453
|
+
- `position="right"` (default in RTL)
|
|
454
|
+
- `position="top"`
|
|
455
|
+
- `position="bottom"`
|
|
210
456
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
<Drawer.Toggle className="btn btn-soft">Open bottom drawer</Drawer.Toggle>
|
|
457
|
+
**Focus Management:**
|
|
458
|
+
Add `data-drawer="focus"` to any focusable element to auto-focus when drawer opens:
|
|
214
459
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorum porro vero delectus
|
|
220
|
-
eum qui laboriosam, dolore veritatis eligendi amet voluptatibus incidunt temporibus
|
|
221
|
-
dolores fuga adipisci eius saepe quod aspernatur iure.
|
|
222
|
-
</Drawer.Body>
|
|
223
|
-
</Drawer.Portal>
|
|
224
|
-
</Drawer>
|
|
460
|
+
```tsx
|
|
461
|
+
<Drawer.Body>
|
|
462
|
+
<input type="text" data-drawer="focus" placeholder="Auto-focused input" />
|
|
463
|
+
</Drawer.Body>
|
|
225
464
|
```
|
|
226
465
|
|
|
466
|
+
---
|
|
467
|
+
|
|
227
468
|
### Modal
|
|
228
469
|
|
|
470
|
+
Centered modal dialog.
|
|
471
|
+
|
|
472
|
+
**Components:**
|
|
473
|
+
- `Modal` (Root) - Accepts `defaultOpen?: boolean`
|
|
474
|
+
- `Modal.Toggle` - Button to toggle modal
|
|
475
|
+
- `Modal.Portal` - Portal wrapper (required)
|
|
476
|
+
- `Modal.Body` - Modal container
|
|
477
|
+
- `Modal.Header` - Header section
|
|
478
|
+
- `Modal.Content` - Content section
|
|
479
|
+
|
|
480
|
+
**Example:**
|
|
481
|
+
|
|
229
482
|
```tsx
|
|
230
|
-
|
|
231
|
-
|
|
483
|
+
import { Modal } from "@kadoui/react";
|
|
484
|
+
|
|
485
|
+
<Modal defaultOpen={false}>
|
|
486
|
+
<Modal.Toggle className="btn">Open Modal</Modal.Toggle>
|
|
232
487
|
|
|
233
488
|
<Modal.Portal className="modal-portal">
|
|
234
489
|
<Modal.Body className="modal-body">
|
|
235
|
-
<Modal.Header className="modal-header
|
|
236
|
-
|
|
490
|
+
<Modal.Header className="modal-header">
|
|
491
|
+
Modal Title
|
|
237
492
|
</Modal.Header>
|
|
238
|
-
<Modal.Content className="modal-content
|
|
239
|
-
|
|
240
|
-
repudiandae eveniet quisquam, vitae, nobis iure voluptas harum est incidunt odio?
|
|
241
|
-
Dolorem quod numquam placeat sed beatae, natus cum porro!
|
|
493
|
+
<Modal.Content className="modal-content">
|
|
494
|
+
<p>Modal content goes here</p>
|
|
242
495
|
</Modal.Content>
|
|
243
496
|
</Modal.Body>
|
|
244
497
|
</Modal.Portal>
|
|
245
498
|
</Modal>
|
|
246
499
|
```
|
|
247
500
|
|
|
248
|
-
|
|
501
|
+
**Focus Management:**
|
|
502
|
+
Add `data-modal="focus"` to auto-focus when modal opens:
|
|
503
|
+
|
|
504
|
+
```tsx
|
|
505
|
+
<Modal.Content>
|
|
506
|
+
<input type="text" data-modal="focus" />
|
|
507
|
+
</Modal.Content>
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
**API:**
|
|
511
|
+
- `Modal` - `PropsWithChildren & { defaultOpen?: boolean }`
|
|
512
|
+
- `Modal.Toggle` - `ComponentProps<"button">`
|
|
513
|
+
- `Modal.Portal` - `HTMLMotionProps<"div">`
|
|
514
|
+
- `Modal.Body` - `HTMLMotionProps<"div">`
|
|
515
|
+
- `Modal.Header` - `ComponentProps<"div">`
|
|
516
|
+
- `Modal.Content` - `ComponentProps<"div">`
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
520
|
+
### OTP (One-Time Password)
|
|
521
|
+
|
|
522
|
+
Input component for OTP codes with auto-advance and paste support.
|
|
523
|
+
|
|
524
|
+
**Components:**
|
|
525
|
+
- `Otp` (Root) - Accepts `autoFocus?: boolean`
|
|
526
|
+
- `Otp.Inputs` - Renders multiple inputs
|
|
527
|
+
- `Otp.HiddenInput` - Hidden input for form submission
|
|
528
|
+
|
|
529
|
+
**Props:**
|
|
530
|
+
- `Otp` - `Omit<AccessNavigationPropsT, "direction"> & { autoFocus?: boolean }`
|
|
531
|
+
- `Otp.Inputs` - `ComponentProps<"input"> & { length: number; onLastChange?: (otp: string) => void }`
|
|
532
|
+
- `Otp.HiddenInput` - `ComponentProps<"input">`
|
|
533
|
+
|
|
534
|
+
**Example:**
|
|
249
535
|
|
|
250
536
|
```tsx
|
|
251
|
-
|
|
537
|
+
import { Otp } from "@kadoui/react";
|
|
538
|
+
|
|
539
|
+
<Otp className="otp" autoFocus>
|
|
252
540
|
<Otp.Inputs
|
|
253
541
|
length={6}
|
|
254
542
|
className="input input-outline input-square"
|
|
255
|
-
onLastChange={(otp) =>
|
|
543
|
+
onLastChange={(otp) => console.log("OTP:", otp)}
|
|
256
544
|
/>
|
|
257
|
-
|
|
258
|
-
<Otp.HiddenInput />
|
|
545
|
+
<Otp.HiddenInput name="otp" />
|
|
259
546
|
</Otp>
|
|
260
547
|
```
|
|
261
548
|
|
|
549
|
+
**Features:**
|
|
550
|
+
- Auto-advances to next input on typing
|
|
551
|
+
- Supports paste (pastes across all inputs)
|
|
552
|
+
- Backspace navigates to previous input
|
|
553
|
+
- `onLastChange` callback when all inputs are filled
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
262
557
|
### Pagination
|
|
263
558
|
|
|
264
|
-
|
|
559
|
+
Pagination component with two variants: state-based and URL search params-based.
|
|
560
|
+
|
|
561
|
+
**Variants:**
|
|
562
|
+
- `PaginationWithState` - Uses React state
|
|
563
|
+
- `PaginationWithSearchParams` - Uses URL search params (Next.js)
|
|
564
|
+
|
|
565
|
+
**Components:**
|
|
566
|
+
- `PaginationWithState` / `PaginationWithSearchParams` (Root)
|
|
567
|
+
- `.Pages` - Renders page content (when using `pages` prop)
|
|
568
|
+
- `.Counts` - Page number buttons
|
|
569
|
+
- `.PrevBtn` - Previous button
|
|
570
|
+
- `.NextBtn` - Next button
|
|
571
|
+
|
|
572
|
+
**Props:**
|
|
573
|
+
- Root: `PaginationPropsT` - `ComponentProps<"div"> & (PaginationWithLengthT | PaginationWithPagesT)`
|
|
574
|
+
- `pagesLength: number` OR `pages: PaginationPagesT[]`
|
|
575
|
+
- `PaginationWithState` also requires: `page: number; setPage: Dispatch<SetStateAction<number>>`
|
|
576
|
+
- `PaginationWithSearchParams` accepts: `pageKey?: string` (default: "page")
|
|
577
|
+
|
|
578
|
+
**With State (Simple):**
|
|
265
579
|
|
|
266
580
|
```tsx
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
<PaginationWithState.PrevBtn className="btn btn-soft btn-square">
|
|
270
|
-
<ChevronLeftIcon className="btn-icon-size" />
|
|
271
|
-
</PaginationWithState.PrevBtn>
|
|
581
|
+
import { PaginationWithState } from "@kadoui/react";
|
|
582
|
+
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
272
583
|
|
|
273
|
-
|
|
584
|
+
const [page, setPage] = useState(1);
|
|
274
585
|
|
|
275
|
-
|
|
276
|
-
|
|
586
|
+
<PaginationWithState pagesLength={10} page={page} setPage={setPage}>
|
|
587
|
+
<div className="pagination">
|
|
588
|
+
<PaginationWithState.PrevBtn className="btn btn-square">
|
|
589
|
+
<ChevronLeftIcon />
|
|
590
|
+
</PaginationWithState.PrevBtn>
|
|
591
|
+
<PaginationWithState.Counts className="btn" />
|
|
592
|
+
<PaginationWithState.NextBtn className="btn btn-square">
|
|
593
|
+
<ChevronRightIcon />
|
|
277
594
|
</PaginationWithState.NextBtn>
|
|
278
595
|
</div>
|
|
279
596
|
</PaginationWithState>
|
|
280
597
|
```
|
|
281
598
|
|
|
282
|
-
With
|
|
599
|
+
**With Search Params (Next.js):**
|
|
283
600
|
|
|
284
601
|
```tsx
|
|
602
|
+
import { PaginationWithSearchParams } from "@kadoui/react";
|
|
603
|
+
import { Suspense } from "react";
|
|
604
|
+
|
|
285
605
|
<Suspense>
|
|
286
|
-
<PaginationWithSearchParams pagesLength={
|
|
606
|
+
<PaginationWithSearchParams pagesLength={10} pageKey="p">
|
|
287
607
|
<div className="pagination">
|
|
288
|
-
<PaginationWithSearchParams.PrevBtn className="btn
|
|
289
|
-
|
|
608
|
+
<PaginationWithSearchParams.PrevBtn className="btn">
|
|
609
|
+
Previous
|
|
290
610
|
</PaginationWithSearchParams.PrevBtn>
|
|
291
|
-
|
|
292
|
-
<PaginationWithSearchParams.
|
|
293
|
-
|
|
294
|
-
<PaginationWithSearchParams.NextBtn className="btn btn-soft btn-square">
|
|
295
|
-
<ChevronRightIcon className="btn-icon-size" />
|
|
611
|
+
<PaginationWithSearchParams.Counts className="btn" />
|
|
612
|
+
<PaginationWithSearchParams.NextBtn className="btn">
|
|
613
|
+
Next
|
|
296
614
|
</PaginationWithSearchParams.NextBtn>
|
|
297
615
|
</div>
|
|
298
616
|
</PaginationWithSearchParams>
|
|
299
617
|
</Suspense>
|
|
300
618
|
```
|
|
301
619
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
With state:
|
|
620
|
+
**With Custom Pages:**
|
|
305
621
|
|
|
306
622
|
```tsx
|
|
307
|
-
const
|
|
623
|
+
const pages = [
|
|
308
624
|
{
|
|
309
|
-
name: "
|
|
310
|
-
component:
|
|
311
|
-
<p>
|
|
312
|
-
One: Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quis officiis quia,
|
|
313
|
-
dolores similique, cumque ut vel aspernatur non vitae voluptas reiciendis? Veniam,
|
|
314
|
-
voluptates impedit soluta blanditiis ad nam eligendi dignissimos.
|
|
315
|
-
</p>
|
|
316
|
-
),
|
|
625
|
+
name: "Page 1",
|
|
626
|
+
component: <div>Page 1 Content</div>
|
|
317
627
|
},
|
|
318
628
|
{
|
|
319
|
-
name: "
|
|
320
|
-
component:
|
|
321
|
-
|
|
322
|
-
Two: Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quis officiis quia,
|
|
323
|
-
dolores similique, cumque ut vel aspernatur non vitae voluptas reiciendis? Veniam,
|
|
324
|
-
voluptates impedit soluta blanditiis ad nam eligendi dignissimos.
|
|
325
|
-
</p>
|
|
326
|
-
),
|
|
327
|
-
},
|
|
629
|
+
name: "Page 2",
|
|
630
|
+
component: <div>Page 2 Content</div>
|
|
631
|
+
}
|
|
328
632
|
];
|
|
329
633
|
|
|
330
|
-
<PaginationWithState pages={
|
|
331
|
-
<
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
<div className="pagination">
|
|
335
|
-
<PaginationWithState.PrevBtn className="btn btn-soft btn-square">
|
|
336
|
-
<ChevronLeftIcon className="btn-icon-size" />
|
|
337
|
-
</PaginationWithState.PrevBtn>
|
|
338
|
-
|
|
339
|
-
<PaginationWithState.Counts className="btn data-[state=false]:btn-ghost data-[state=true]:btn-fill" />
|
|
340
|
-
|
|
341
|
-
<PaginationWithState.NextBtn className="btn btn-soft btn-square">
|
|
342
|
-
<ChevronRightIcon className="btn-icon-size" />
|
|
343
|
-
</PaginationWithState.NextBtn>
|
|
344
|
-
</div>
|
|
345
|
-
</div>
|
|
346
|
-
</PaginationWithState>;
|
|
634
|
+
<PaginationWithState pages={pages} page={page} setPage={setPage}>
|
|
635
|
+
<PaginationWithState.Pages />
|
|
636
|
+
{/* Navigation buttons */}
|
|
637
|
+
</PaginationWithState>
|
|
347
638
|
```
|
|
348
639
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
```tsx
|
|
352
|
-
const PAGES_WITH_SEARCHPARAMS = [
|
|
353
|
-
{
|
|
354
|
-
name: "Hello world",
|
|
355
|
-
component: (
|
|
356
|
-
<p>
|
|
357
|
-
One: Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quis officiis quia,
|
|
358
|
-
dolores similique, cumque ut vel aspernatur non vitae voluptas reiciendis? Veniam,
|
|
359
|
-
voluptates impedit soluta blanditiis ad nam eligendi dignissimos.
|
|
360
|
-
</p>
|
|
361
|
-
),
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
name: "Finish",
|
|
365
|
-
component: (
|
|
366
|
-
<p>
|
|
367
|
-
Two: Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quis officiis quia,
|
|
368
|
-
dolores similique, cumque ut vel aspernatur non vitae voluptas reiciendis? Veniam,
|
|
369
|
-
voluptates impedit soluta blanditiis ad nam eligendi dignissimos.
|
|
370
|
-
</p>
|
|
371
|
-
),
|
|
372
|
-
},
|
|
373
|
-
];
|
|
374
|
-
|
|
375
|
-
<Suspense>
|
|
376
|
-
<PaginationWithSearchParams pages={PAGES_WITH_SEARCHPARAMS}>
|
|
377
|
-
<div className="max-w-96">
|
|
378
|
-
<PaginationWithSearchParams.Pages />
|
|
640
|
+
---
|
|
379
641
|
|
|
380
|
-
|
|
381
|
-
<PaginationWithSearchParams.PrevBtn className="btn btn-soft btn-square">
|
|
382
|
-
<ChevronLeftIcon className="btn-icon-size" />
|
|
383
|
-
</PaginationWithSearchParams.PrevBtn>
|
|
642
|
+
### PasswordInput
|
|
384
643
|
|
|
385
|
-
|
|
644
|
+
Password input with visibility toggle.
|
|
386
645
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
</div>
|
|
392
|
-
</PaginationWithSearchParams>
|
|
393
|
-
</Suspense>;
|
|
394
|
-
```
|
|
646
|
+
**Components:**
|
|
647
|
+
- `PasswordInput` (Root)
|
|
648
|
+
- `PasswordInput.Field` - Input field
|
|
649
|
+
- `PasswordInput.Toggle` - Visibility toggle button
|
|
395
650
|
|
|
396
|
-
|
|
651
|
+
**Example:**
|
|
397
652
|
|
|
398
653
|
```tsx
|
|
654
|
+
import { PasswordInput } from "@kadoui/react";
|
|
655
|
+
import { EyeIcon, EyeClosedIcon } from "lucide-react";
|
|
656
|
+
|
|
399
657
|
<PasswordInput className="input input-outline">
|
|
400
|
-
<PasswordInput.Field className="input-field" />
|
|
658
|
+
<PasswordInput.Field className="input-field" placeholder="Password" />
|
|
401
659
|
<PasswordInput.Toggle
|
|
402
660
|
className="btn btn-ghost btn-sm"
|
|
403
|
-
visibleChildren={<EyeIcon
|
|
404
|
-
|
|
661
|
+
visibleChildren={<EyeIcon />}
|
|
662
|
+
>
|
|
663
|
+
<EyeClosedIcon />
|
|
405
664
|
</PasswordInput.Toggle>
|
|
406
665
|
</PasswordInput>
|
|
407
666
|
```
|
|
408
667
|
|
|
668
|
+
**API:**
|
|
669
|
+
- `PasswordInput` - `ComponentProps<"label">`
|
|
670
|
+
- `PasswordInput.Field` - `ComponentProps<"input">`
|
|
671
|
+
- `PasswordInput.Toggle` - `ComponentProps<"button"> & { visibleChildren: ReactNode }`
|
|
672
|
+
|
|
673
|
+
---
|
|
674
|
+
|
|
409
675
|
### Popover
|
|
410
676
|
|
|
677
|
+
Popover component with multiple trigger modes.
|
|
678
|
+
|
|
679
|
+
**Components:**
|
|
680
|
+
- `Popover` (Root) - Accepts `mode?: "click" | "hover" | "both"`
|
|
681
|
+
- `Popover.Toggle` - Trigger button
|
|
682
|
+
- `Popover.Body` - Popover content
|
|
683
|
+
- `Popover.Navigation` - Optional keyboard navigation
|
|
684
|
+
|
|
685
|
+
**Props:**
|
|
686
|
+
- `Popover` - `ComponentProps<"div"> & { mode?: "click" | "hover" | "both" }`
|
|
687
|
+
- `Popover.Body` - `ComponentProps<"div"> & { preventClose?: boolean }`
|
|
688
|
+
|
|
689
|
+
**Click Mode:**
|
|
690
|
+
|
|
411
691
|
```tsx
|
|
412
|
-
|
|
413
|
-
className="popover"
|
|
414
|
-
mode="hover">
|
|
415
|
-
<Popover.Toggle className="btn btn-soft">Hover me</Popover.Toggle>
|
|
692
|
+
import { Popover } from "@kadoui/react";
|
|
416
693
|
|
|
417
|
-
|
|
418
|
-
|
|
694
|
+
<Popover mode="click" className="popover">
|
|
695
|
+
<Popover.Toggle className="btn">Click me</Popover.Toggle>
|
|
696
|
+
<Popover.Body className="popover-body card">
|
|
697
|
+
Popover content
|
|
419
698
|
</Popover.Body>
|
|
420
699
|
</Popover>
|
|
421
700
|
```
|
|
422
701
|
|
|
423
|
-
|
|
702
|
+
**Hover Mode:**
|
|
424
703
|
|
|
425
704
|
```tsx
|
|
426
|
-
<Popover
|
|
427
|
-
className="
|
|
428
|
-
|
|
429
|
-
|
|
705
|
+
<Popover mode="hover" className="popover">
|
|
706
|
+
<Popover.Toggle className="btn">Hover me</Popover.Toggle>
|
|
707
|
+
<Popover.Body className="popover-body card">
|
|
708
|
+
Popover content
|
|
709
|
+
</Popover.Body>
|
|
710
|
+
</Popover>
|
|
711
|
+
```
|
|
430
712
|
|
|
431
|
-
|
|
432
|
-
|
|
713
|
+
**Both Mode:**
|
|
714
|
+
|
|
715
|
+
```tsx
|
|
716
|
+
<Popover mode="both" className="popover">
|
|
717
|
+
<Popover.Toggle className="btn">Hover or click</Popover.Toggle>
|
|
718
|
+
<Popover.Body className="popover-body card">
|
|
719
|
+
Popover content
|
|
433
720
|
</Popover.Body>
|
|
434
721
|
</Popover>
|
|
435
722
|
```
|
|
436
723
|
|
|
437
|
-
|
|
724
|
+
**With Navigation:**
|
|
438
725
|
|
|
439
726
|
```tsx
|
|
440
|
-
<Popover
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
727
|
+
<Popover mode="click">
|
|
728
|
+
<Popover.Navigation direction="y">
|
|
729
|
+
<Popover.Toggle className="btn">Menu</Popover.Toggle>
|
|
730
|
+
<Popover.Body className="card card-menu">
|
|
731
|
+
<button className="btn">Option 1</button>
|
|
732
|
+
<button className="btn">Option 2</button>
|
|
733
|
+
</Popover.Body>
|
|
734
|
+
</Popover.Navigation>
|
|
735
|
+
</Popover>
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
**Nested Popovers:**
|
|
444
739
|
|
|
445
|
-
|
|
446
|
-
|
|
740
|
+
```tsx
|
|
741
|
+
<Popover mode="click">
|
|
742
|
+
<Popover.Toggle>Parent</Popover.Toggle>
|
|
743
|
+
<Popover.Body>
|
|
744
|
+
<Popover mode="click">
|
|
745
|
+
<Popover.Toggle>Child</Popover.Toggle>
|
|
746
|
+
<Popover.Body>Nested content</Popover.Body>
|
|
747
|
+
</Popover>
|
|
447
748
|
</Popover.Body>
|
|
448
749
|
</Popover>
|
|
449
750
|
```
|
|
450
751
|
|
|
752
|
+
---
|
|
753
|
+
|
|
451
754
|
### Portal
|
|
452
755
|
|
|
756
|
+
Render children into a different DOM node.
|
|
757
|
+
|
|
758
|
+
**Props:**
|
|
759
|
+
- `PortalPropsT` - `PropsWithChildren & { container?: Element }`
|
|
760
|
+
|
|
761
|
+
**Example:**
|
|
762
|
+
|
|
453
763
|
```tsx
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
molestias, et nesciunt ut aut labore quod nihil magni?
|
|
459
|
-
</p>
|
|
764
|
+
import { Portal } from "@kadoui/react";
|
|
765
|
+
|
|
766
|
+
<Portal container={document.getElementById("portal-root")}>
|
|
767
|
+
<p>This renders in a different DOM node</p>
|
|
460
768
|
</Portal>
|
|
461
769
|
```
|
|
462
770
|
|
|
771
|
+
**Default Behavior:**
|
|
772
|
+
If no `container` is provided, children are rendered into `document.body`.
|
|
773
|
+
|
|
774
|
+
---
|
|
775
|
+
|
|
463
776
|
### Progress
|
|
464
777
|
|
|
778
|
+
Progress bar component.
|
|
779
|
+
|
|
780
|
+
**Components:**
|
|
781
|
+
- `Progress` (Root) - Requires `value: number; maxValue?: number`
|
|
782
|
+
- `Progress.Bar` - Progress bar element
|
|
783
|
+
|
|
784
|
+
**Props:**
|
|
785
|
+
- `Progress` - `ComponentProps<"div"> & { value: number; maxValue?: number }`
|
|
786
|
+
- `Progress.Bar` - `HTMLMotionProps<"div"> & { duration?: number }`
|
|
787
|
+
|
|
788
|
+
**Example:**
|
|
789
|
+
|
|
790
|
+
```tsx
|
|
791
|
+
import { Progress } from "@kadoui/react";
|
|
792
|
+
|
|
793
|
+
<Progress className="progress" value={45} maxValue={100}>
|
|
794
|
+
<Progress.Bar className="progress-bar" duration={2} />
|
|
795
|
+
</Progress>
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
**With Custom Content:**
|
|
799
|
+
|
|
465
800
|
```tsx
|
|
466
|
-
<Progress
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
801
|
+
<Progress value={75}>
|
|
802
|
+
<Progress.Bar>
|
|
803
|
+
<span>75%</span>
|
|
804
|
+
</Progress.Bar>
|
|
470
805
|
</Progress>
|
|
471
806
|
```
|
|
472
807
|
|
|
808
|
+
---
|
|
809
|
+
|
|
473
810
|
### QrCode
|
|
474
811
|
|
|
812
|
+
Generate QR codes from text/URLs.
|
|
813
|
+
|
|
814
|
+
**Props:**
|
|
815
|
+
- `QrCodePropsT` - `ComponentProps<"canvas"> & { value: string; options?: QRCodeRenderersOptions }`
|
|
816
|
+
|
|
817
|
+
**Example:**
|
|
818
|
+
|
|
475
819
|
```tsx
|
|
820
|
+
import { QrCode } from "@kadoui/react";
|
|
821
|
+
|
|
476
822
|
<QrCode
|
|
477
823
|
className="w-96 rounded-lg"
|
|
478
824
|
value="https://github.com/FarzadVav"
|
|
479
|
-
options={{ width: 384 }}
|
|
825
|
+
options={{ width: 384, margin: 2 }}
|
|
480
826
|
/>
|
|
481
827
|
```
|
|
482
828
|
|
|
829
|
+
**Options:**
|
|
830
|
+
See [qrcode library options](https://www.npmjs.com/package/qrcode#options) for available configuration.
|
|
831
|
+
|
|
832
|
+
---
|
|
833
|
+
|
|
483
834
|
### Rating
|
|
484
835
|
|
|
836
|
+
Star rating component with hover effects.
|
|
837
|
+
|
|
838
|
+
**Components:**
|
|
839
|
+
- `Rating` (Root)
|
|
840
|
+
- `Rating.Items` - Rating items
|
|
841
|
+
|
|
842
|
+
**Props:**
|
|
843
|
+
- `Rating` - `ComponentProps<"div">`
|
|
844
|
+
- `Rating.Items` - `ComponentProps<"button"> & { count: number; value: number; onValueChange: (value: number) => void; element: ReactNode; activeElement: ReactNode }`
|
|
845
|
+
|
|
846
|
+
**Example:**
|
|
847
|
+
|
|
485
848
|
```tsx
|
|
849
|
+
import { Rating } from "@kadoui/react";
|
|
850
|
+
import { StarIcon } from "lucide-react";
|
|
851
|
+
import { useState } from "react";
|
|
852
|
+
|
|
486
853
|
const [rating, setRating] = useState(3);
|
|
487
854
|
|
|
488
855
|
<Rating className="rating">
|
|
@@ -494,186 +861,495 @@ const [rating, setRating] = useState(3);
|
|
|
494
861
|
element={<StarIcon className="size-9" />}
|
|
495
862
|
activeElement={<StarIcon className="fill-foreground size-9" />}
|
|
496
863
|
/>
|
|
497
|
-
</Rating
|
|
864
|
+
</Rating>
|
|
865
|
+
```
|
|
866
|
+
|
|
867
|
+
---
|
|
868
|
+
|
|
869
|
+
### SelectBox
|
|
870
|
+
|
|
871
|
+
Advanced select component with search and multi-select support.
|
|
872
|
+
|
|
873
|
+
**Components:**
|
|
874
|
+
- `SelectBox` (Root) - Requires `options: SelectBoxOptionT[]` and selection state
|
|
875
|
+
- `SelectBox.Input` - Input wrapper
|
|
876
|
+
- `SelectBox.Field` - Display field
|
|
877
|
+
- `SelectBox.List` - Dropdown list
|
|
878
|
+
- `SelectBox.SearchInput` - Search input wrapper
|
|
879
|
+
- `SelectBox.SearchField` - Search input field
|
|
880
|
+
- `SelectBox.Options` - Option buttons
|
|
881
|
+
|
|
882
|
+
**Types:**
|
|
883
|
+
```tsx
|
|
884
|
+
type SelectBoxOptionT = { name: string; value: string };
|
|
498
885
|
```
|
|
499
886
|
|
|
887
|
+
**Single Select:**
|
|
888
|
+
|
|
889
|
+
```tsx
|
|
890
|
+
import { SelectBox, SelectBoxOptionT } from "@kadoui/react";
|
|
891
|
+
import { ChevronDownIcon, SearchIcon } from "lucide-react";
|
|
892
|
+
import { useState } from "react";
|
|
893
|
+
|
|
894
|
+
const options: SelectBoxOptionT[] = [
|
|
895
|
+
{ name: "one", value: "One" },
|
|
896
|
+
{ name: "two", value: "Two" },
|
|
897
|
+
{ name: "three", value: "Three" }
|
|
898
|
+
];
|
|
899
|
+
|
|
900
|
+
const [selected, setSelected] = useState<SelectBoxOptionT | null>(null);
|
|
901
|
+
|
|
902
|
+
<SelectBox
|
|
903
|
+
options={options}
|
|
904
|
+
optionValue={selected}
|
|
905
|
+
setOptionValue={setSelected}
|
|
906
|
+
>
|
|
907
|
+
<SelectBox.Input className="select-box-input input">
|
|
908
|
+
<ChevronDownIcon />
|
|
909
|
+
<SelectBox.Field className="input-field" placeholder="Select..." />
|
|
910
|
+
<SelectBox.List className="select-box-list">
|
|
911
|
+
<SelectBox.SearchInput className="input">
|
|
912
|
+
<SearchIcon />
|
|
913
|
+
<SelectBox.SearchField className="input-field" />
|
|
914
|
+
</SelectBox.SearchInput>
|
|
915
|
+
<SelectBox.Options className="select-box-option btn" />
|
|
916
|
+
</SelectBox.List>
|
|
917
|
+
</SelectBox.Input>
|
|
918
|
+
</SelectBox>
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
**Multi Select:**
|
|
922
|
+
|
|
923
|
+
```tsx
|
|
924
|
+
const [selected, setSelected] = useState<SelectBoxOptionT[]>([]);
|
|
925
|
+
|
|
926
|
+
<SelectBox
|
|
927
|
+
multiSelect
|
|
928
|
+
options={options}
|
|
929
|
+
optionValue={selected}
|
|
930
|
+
setOptionValue={setSelected}
|
|
931
|
+
>
|
|
932
|
+
{/* Same structure as single select */}
|
|
933
|
+
</SelectBox>
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
**API:**
|
|
937
|
+
- `SelectBox` - `ComponentPropsWithoutRef<"div"> & MergedSelectMode & { options: SelectBoxOptionT[] }`
|
|
938
|
+
- `SelectBox.Field` - `ComponentProps<"input">`
|
|
939
|
+
- `SelectBox.SearchField` - `ComponentProps<"input">`
|
|
940
|
+
- `SelectBox.Options` - `ComponentProps<"button">`
|
|
941
|
+
|
|
942
|
+
---
|
|
943
|
+
|
|
500
944
|
### Sheet
|
|
501
945
|
|
|
946
|
+
Bottom sheet component (mobile-friendly drawer from bottom).
|
|
947
|
+
|
|
948
|
+
**Components:**
|
|
949
|
+
- `Sheet` (Root)
|
|
950
|
+
- `Sheet.Toggle` - Toggle button
|
|
951
|
+
- `Sheet.Portal` - Portal wrapper
|
|
952
|
+
- `Sheet.Body` - Sheet container
|
|
953
|
+
- `Sheet.Header` - Header section
|
|
954
|
+
- `Sheet.Handlebar` - Drag handle
|
|
955
|
+
- `Sheet.Content` - Scrollable content
|
|
956
|
+
|
|
957
|
+
**Example:**
|
|
958
|
+
|
|
502
959
|
```tsx
|
|
960
|
+
import { Sheet } from "@kadoui/react";
|
|
961
|
+
|
|
503
962
|
<Sheet>
|
|
504
|
-
<Sheet.Toggle className="btn
|
|
963
|
+
<Sheet.Toggle className="btn">Open Sheet</Sheet.Toggle>
|
|
505
964
|
|
|
506
965
|
<Sheet.Portal className="sheet-portal">
|
|
507
966
|
<Sheet.Body className="sheet-body">
|
|
508
967
|
<Sheet.Header className="sheet-header">
|
|
509
968
|
<Sheet.Handlebar className="sheet-handlebar" />
|
|
510
969
|
</Sheet.Header>
|
|
511
|
-
|
|
512
970
|
<Sheet.Content className="sheet-content">
|
|
513
|
-
|
|
514
|
-
numquam sed dolorem nesciunt repellat deleniti quisquam laudantium? Quas ullam
|
|
515
|
-
magni voluptate esse animi vero dicta maxime mollitia amet dolor.
|
|
971
|
+
<p>Sheet content</p>
|
|
516
972
|
</Sheet.Content>
|
|
517
973
|
</Sheet.Body>
|
|
518
974
|
</Sheet.Portal>
|
|
519
975
|
</Sheet>
|
|
520
976
|
```
|
|
521
977
|
|
|
978
|
+
**Features:**
|
|
979
|
+
- Drag to close (drag down)
|
|
980
|
+
- Auto-focus support with `data-sheet="focus"`
|
|
981
|
+
- Smooth animations
|
|
982
|
+
|
|
983
|
+
---
|
|
984
|
+
|
|
522
985
|
### ShowMore
|
|
523
986
|
|
|
987
|
+
Truncate text with "show more" functionality.
|
|
988
|
+
|
|
989
|
+
**Components:**
|
|
990
|
+
- `ShowMore` (Root) - Requires `maxLines: number; defaultExpanded?: boolean`
|
|
991
|
+
- `ShowMore.Content` - Content to truncate
|
|
992
|
+
- `ShowMore.Fade` - Fade overlay (shown when collapsed)
|
|
993
|
+
- `ShowMore.Toggle` - Toggle button
|
|
994
|
+
|
|
995
|
+
**Example:**
|
|
996
|
+
|
|
524
997
|
```tsx
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
998
|
+
import { ShowMore } from "@kadoui/react";
|
|
999
|
+
|
|
1000
|
+
<ShowMore className="max-w-96" maxLines={3} defaultExpanded={false}>
|
|
528
1001
|
<ShowMore.Content>
|
|
529
|
-
Lorem ipsum dolor sit
|
|
530
|
-
repellendus debitis, dignissimos non quis! Fugit ducimus adipisci minus quas est
|
|
531
|
-
expedita, voluptatibus minima ad facere quis, dolor ipsum debitis!
|
|
1002
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit...
|
|
532
1003
|
</ShowMore.Content>
|
|
533
|
-
|
|
534
1004
|
<ShowMore.Fade className="show-more-fade" />
|
|
535
|
-
|
|
536
|
-
<ShowMore.Toggle className="btn btn-soft mt-1.5">Show more</ShowMore.Toggle>
|
|
1005
|
+
<ShowMore.Toggle className="btn">Show more</ShowMore.Toggle>
|
|
537
1006
|
</ShowMore>
|
|
538
1007
|
```
|
|
539
1008
|
|
|
1009
|
+
**API:**
|
|
1010
|
+
- `ShowMore` - `ComponentProps<"div"> & { maxLines: number; defaultExpanded?: boolean }`
|
|
1011
|
+
- `ShowMore.Content` - `ComponentProps<"div">`
|
|
1012
|
+
- `ShowMore.Fade` - `ComponentProps<"div">`
|
|
1013
|
+
- `ShowMore.Toggle` - `ComponentProps<"button">`
|
|
1014
|
+
|
|
1015
|
+
---
|
|
1016
|
+
|
|
540
1017
|
### Spoiler
|
|
541
1018
|
|
|
1019
|
+
Click to reveal hidden text (useful for spoiler warnings).
|
|
1020
|
+
|
|
1021
|
+
**Components:**
|
|
1022
|
+
- `Spoiler` (Root)
|
|
1023
|
+
- `Spoiler.Blur` - Blurred/hidden content
|
|
1024
|
+
|
|
1025
|
+
**Example:**
|
|
1026
|
+
|
|
542
1027
|
```tsx
|
|
1028
|
+
import { Spoiler } from "@kadoui/react";
|
|
1029
|
+
|
|
543
1030
|
<p>
|
|
544
1031
|
Lorem ipsum dolor sit{" "}
|
|
545
1032
|
<Spoiler className="spoiler">
|
|
546
|
-
<Spoiler.Blur className="spoiler-blur">
|
|
1033
|
+
<Spoiler.Blur className="spoiler-blur">
|
|
1034
|
+
amet consectetur adipisicing
|
|
1035
|
+
</Spoiler.Blur>
|
|
547
1036
|
</Spoiler>{" "}
|
|
548
|
-
elit.
|
|
549
|
-
labore! Ea quo dolore accusantium veniam illo vel quae nihil iure aliquid.
|
|
1037
|
+
elit.
|
|
550
1038
|
</p>
|
|
551
1039
|
```
|
|
552
1040
|
|
|
1041
|
+
**API:**
|
|
1042
|
+
- `Spoiler` - `ComponentProps<"span">`
|
|
1043
|
+
- `Spoiler.Blur` - `ComponentProps<"span">`
|
|
1044
|
+
|
|
1045
|
+
---
|
|
1046
|
+
|
|
553
1047
|
### Submit
|
|
554
1048
|
|
|
1049
|
+
Form submit button with loading state.
|
|
1050
|
+
|
|
1051
|
+
**Components:**
|
|
1052
|
+
- `Submit` (Root) - Must be inside a `<form>` with `action`
|
|
1053
|
+
- `Submit.Loader` - Loading indicator
|
|
1054
|
+
|
|
1055
|
+
**Example:**
|
|
1056
|
+
|
|
555
1057
|
```tsx
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
1058
|
+
import { Submit } from "@kadoui/react";
|
|
1059
|
+
import { SendHorizonalIcon, LoaderIcon } from "lucide-react";
|
|
1060
|
+
|
|
1061
|
+
<form action={async () => {
|
|
1062
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
1063
|
+
}}>
|
|
1064
|
+
<Submit className="btn">
|
|
1065
|
+
<span>Submit</span>
|
|
1066
|
+
<Submit.Loader loader={<LoaderIcon className="animate-spin" />}>
|
|
1067
|
+
<SendHorizonalIcon />
|
|
564
1068
|
</Submit.Loader>
|
|
565
1069
|
</Submit>
|
|
566
1070
|
</form>
|
|
567
1071
|
```
|
|
568
1072
|
|
|
1073
|
+
**Features:**
|
|
1074
|
+
- Automatically disabled during form submission
|
|
1075
|
+
- Uses React Server Actions (`useFormStatus`)
|
|
1076
|
+
- Shows loader during pending state
|
|
1077
|
+
|
|
1078
|
+
**API:**
|
|
1079
|
+
- `Submit` - `ComponentProps<"button"> & { loader?: ReactNode }`
|
|
1080
|
+
- `Submit.Loader` - `PropsWithChildren & { loader: ReactNode }`
|
|
1081
|
+
|
|
1082
|
+
---
|
|
1083
|
+
|
|
569
1084
|
### Swap
|
|
570
1085
|
|
|
571
|
-
|
|
572
|
-
const SWAP_KEYS = ["one", "two", "three"];
|
|
1086
|
+
Cycle through different states/content.
|
|
573
1087
|
|
|
574
|
-
|
|
1088
|
+
**Components:**
|
|
1089
|
+
- `Swap` (Root) - Requires `keys: string[]; activeKey: string; setActiveKey: Dispatch<SetStateAction<string>>`
|
|
1090
|
+
- `Swap.Btn` - Button that cycles through keys
|
|
575
1091
|
|
|
576
|
-
|
|
577
|
-
keys={SWAP_KEYS}
|
|
578
|
-
activeKey={swapKey}
|
|
579
|
-
setActiveKey={setSwapKey}>
|
|
580
|
-
<Swap.Btn
|
|
581
|
-
className="btn btn-soft"
|
|
582
|
-
btnKey={SWAP_KEYS[0] as string}
|
|
583
|
-
/>
|
|
1092
|
+
**Example:**
|
|
584
1093
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
/>
|
|
1094
|
+
```tsx
|
|
1095
|
+
import { Swap } from "@kadoui/react";
|
|
1096
|
+
import { useState } from "react";
|
|
589
1097
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
1098
|
+
const SWAP_KEYS = ["one", "two", "three"];
|
|
1099
|
+
const [swapKey, setSwapKey] = useState(SWAP_KEYS[0]);
|
|
1100
|
+
|
|
1101
|
+
<Swap keys={SWAP_KEYS} activeKey={swapKey} setActiveKey={setSwapKey}>
|
|
1102
|
+
<Swap.Btn className="btn" btnKey={SWAP_KEYS[0]}>
|
|
1103
|
+
{SWAP_KEYS[0]}
|
|
1104
|
+
</Swap.Btn>
|
|
1105
|
+
<Swap.Btn className="btn" btnKey={SWAP_KEYS[1]}>
|
|
1106
|
+
{SWAP_KEYS[1]}
|
|
1107
|
+
</Swap.Btn>
|
|
1108
|
+
<Swap.Btn className="btn" btnKey={SWAP_KEYS[2]}>
|
|
1109
|
+
{SWAP_KEYS[2]}
|
|
1110
|
+
</Swap.Btn>
|
|
1111
|
+
</Swap>
|
|
595
1112
|
```
|
|
596
1113
|
|
|
1114
|
+
**Behavior:**
|
|
1115
|
+
- Only the button matching `activeKey` is rendered
|
|
1116
|
+
- Clicking cycles to the next key in the array
|
|
1117
|
+
- Wraps around (last → first)
|
|
1118
|
+
|
|
1119
|
+
---
|
|
1120
|
+
|
|
597
1121
|
### Tabs
|
|
598
1122
|
|
|
1123
|
+
Tabbed interface component.
|
|
1124
|
+
|
|
1125
|
+
**Components:**
|
|
1126
|
+
- `Tabs` (Root) - Requires `activeTab: string; setActiveTab: Dispatch<SetStateAction<string>>`
|
|
1127
|
+
- `Tabs.List` - Tab list container
|
|
1128
|
+
- `Tabs.Tab` - Individual tab button
|
|
1129
|
+
- `Tabs.Panel` - Tab panel content
|
|
1130
|
+
|
|
1131
|
+
**Example:**
|
|
1132
|
+
|
|
599
1133
|
```tsx
|
|
1134
|
+
import { Tabs } from "@kadoui/react";
|
|
1135
|
+
import { useState } from "react";
|
|
1136
|
+
|
|
600
1137
|
const [activeTab, setActiveTab] = useState("1");
|
|
601
1138
|
|
|
602
|
-
<Tabs
|
|
603
|
-
|
|
604
|
-
|
|
1139
|
+
<Tabs activeTab={activeTab} setActiveTab={setActiveTab}>
|
|
1140
|
+
<Tabs.List className="tabs-list" direction="x">
|
|
1141
|
+
<Tabs.Tab value="1" className="btn">
|
|
1142
|
+
Tab 1
|
|
1143
|
+
</Tabs.Tab>
|
|
1144
|
+
<Tabs.Tab value="2" className="btn">
|
|
1145
|
+
Tab 2
|
|
1146
|
+
</Tabs.Tab>
|
|
1147
|
+
</Tabs.List>
|
|
1148
|
+
|
|
1149
|
+
<Tabs.Panel value="1" className="tabs-panel">
|
|
1150
|
+
Content for Tab 1
|
|
1151
|
+
</Tabs.Panel>
|
|
1152
|
+
<Tabs.Panel value="2" className="tabs-panel">
|
|
1153
|
+
Content for Tab 2
|
|
1154
|
+
</Tabs.Panel>
|
|
1155
|
+
</Tabs>
|
|
1156
|
+
```
|
|
1157
|
+
|
|
1158
|
+
**With AccessNavigation:**
|
|
1159
|
+
|
|
1160
|
+
```tsx
|
|
1161
|
+
import { AccessNavigation } from "@kadoui/react";
|
|
1162
|
+
|
|
1163
|
+
<Tabs activeTab={activeTab} setActiveTab={setActiveTab}>
|
|
605
1164
|
<AccessNavigation direction="x">
|
|
606
|
-
<Tabs.List className="
|
|
607
|
-
<Tabs.Tab
|
|
608
|
-
|
|
609
|
-
className="btn data-[state=false]:btn-soft data-[state=true]:btn-fill">
|
|
610
|
-
Tab 1
|
|
611
|
-
</Tabs.Tab>
|
|
612
|
-
<Tabs.Tab
|
|
613
|
-
value="2"
|
|
614
|
-
className="btn data-[state=false]:btn-soft data-[state=true]:btn-fill">
|
|
615
|
-
Tab 2
|
|
616
|
-
</Tabs.Tab>
|
|
617
|
-
<Tabs.Tab
|
|
618
|
-
value="3"
|
|
619
|
-
className="btn data-[state=false]:btn-soft data-[state=true]:btn-fill">
|
|
620
|
-
Tab 3
|
|
621
|
-
</Tabs.Tab>
|
|
1165
|
+
<Tabs.List className="join">
|
|
1166
|
+
<Tabs.Tab value="1" className="btn">Tab 1</Tabs.Tab>
|
|
1167
|
+
<Tabs.Tab value="2" className="btn">Tab 2</Tabs.Tab>
|
|
622
1168
|
</Tabs.List>
|
|
623
1169
|
</AccessNavigation>
|
|
1170
|
+
{/* Panels */}
|
|
1171
|
+
</Tabs>
|
|
1172
|
+
```
|
|
624
1173
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
nisi, magni quis dolore cum molestias ipsam accusantium sunt repudiandae repellendus
|
|
631
|
-
perspiciatis cumque unde commodi reprehenderit distinctio nostrum quisquam nihil?
|
|
632
|
-
</Tabs.Panel>
|
|
1174
|
+
**API:**
|
|
1175
|
+
- `Tabs` - `PropsWithChildren & { activeTab: string; setActiveTab: Dispatch<SetStateAction<string>> }`
|
|
1176
|
+
- `Tabs.List` - `AccessNavigationPropsT`
|
|
1177
|
+
- `Tabs.Tab` - `ComponentProps<"button"> & { value: string }`
|
|
1178
|
+
- `Tabs.Panel` - `ComponentProps<"div"> & { value: string }`
|
|
633
1179
|
|
|
634
|
-
|
|
635
|
-
className="tabs-panel card-lg"
|
|
636
|
-
key={"2"}
|
|
637
|
-
value="2">
|
|
638
|
-
Tab 2: Lorem, ipsum dolor sit amet consectetur adipisicing elit. Voluptates, animi
|
|
639
|
-
nisi, magni quis dolore cum molestias ipsam accusantium sunt repudiandae quisquam
|
|
640
|
-
nihil?
|
|
641
|
-
</Tabs.Panel>
|
|
1180
|
+
---
|
|
642
1181
|
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
</
|
|
1182
|
+
### Theme
|
|
1183
|
+
|
|
1184
|
+
Theme management with dark/light/system modes.
|
|
1185
|
+
|
|
1186
|
+
**Components & Hooks:**
|
|
1187
|
+
- `ThemeProvider` - Context provider (wrap your app)
|
|
1188
|
+
- `ThemeScript` - SSR script (add to `<head>`)
|
|
1189
|
+
- `useTheme` - Hook to access theme
|
|
1190
|
+
|
|
1191
|
+
**Setup:**
|
|
1192
|
+
|
|
1193
|
+
1. Add script to your HTML `<head>`:
|
|
1194
|
+
|
|
1195
|
+
```tsx
|
|
1196
|
+
import { ThemeScript } from "@kadoui/react";
|
|
1197
|
+
|
|
1198
|
+
<head>
|
|
1199
|
+
<ThemeScript />
|
|
1200
|
+
</head>
|
|
1201
|
+
```
|
|
1202
|
+
|
|
1203
|
+
2. Wrap your app with `ThemeProvider`:
|
|
1204
|
+
|
|
1205
|
+
```tsx
|
|
1206
|
+
import { ThemeProvider } from "@kadoui/react";
|
|
1207
|
+
|
|
1208
|
+
function App() {
|
|
1209
|
+
return (
|
|
1210
|
+
<ThemeProvider>
|
|
1211
|
+
{/* Your app */}
|
|
1212
|
+
</ThemeProvider>
|
|
1213
|
+
);
|
|
1214
|
+
}
|
|
662
1215
|
```
|
|
663
1216
|
|
|
1217
|
+
3. Use the hook:
|
|
1218
|
+
|
|
1219
|
+
```tsx
|
|
1220
|
+
import { useTheme } from "@kadoui/react";
|
|
1221
|
+
|
|
1222
|
+
function ThemeToggle() {
|
|
1223
|
+
const { theme, setTheme } = useTheme();
|
|
1224
|
+
|
|
1225
|
+
return (
|
|
1226
|
+
<div>
|
|
1227
|
+
<button onClick={() => setTheme("light")}>Light</button>
|
|
1228
|
+
<button onClick={() => setTheme("dark")}>Dark</button>
|
|
1229
|
+
<button onClick={() => setTheme("system")}>System</button>
|
|
1230
|
+
</div>
|
|
1231
|
+
);
|
|
1232
|
+
}
|
|
1233
|
+
```
|
|
1234
|
+
|
|
1235
|
+
**Types:**
|
|
1236
|
+
```tsx
|
|
1237
|
+
type ThemeT = "dark" | "light" | "system";
|
|
1238
|
+
```
|
|
1239
|
+
|
|
1240
|
+
---
|
|
1241
|
+
|
|
1242
|
+
## Next.js Integration
|
|
1243
|
+
|
|
664
1244
|
### LinkLoader
|
|
665
1245
|
|
|
1246
|
+
Show loading state during Next.js Link navigation.
|
|
1247
|
+
|
|
1248
|
+
**Import:**
|
|
666
1249
|
```tsx
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
1250
|
+
import { LinkLoader } from "@kadoui/react/next";
|
|
1251
|
+
```
|
|
1252
|
+
|
|
1253
|
+
**Example:**
|
|
1254
|
+
|
|
1255
|
+
```tsx
|
|
1256
|
+
import Link from "next/link";
|
|
1257
|
+
import { LinkLoader } from "@kadoui/react/next";
|
|
1258
|
+
import { ArrowRightIcon, LoaderIcon } from "lucide-react";
|
|
1259
|
+
|
|
1260
|
+
<Link href="/page" className="btn">
|
|
1261
|
+
<span>Go to Page</span>
|
|
1262
|
+
<LinkLoader loader={<LoaderIcon className="animate-spin" />}>
|
|
1263
|
+
<ArrowRightIcon />
|
|
673
1264
|
</LinkLoader>
|
|
674
1265
|
</Link>
|
|
675
1266
|
```
|
|
676
1267
|
|
|
677
1268
|
---
|
|
678
1269
|
|
|
679
|
-
|
|
1270
|
+
## Utilities
|
|
1271
|
+
|
|
1272
|
+
Import utilities from `@kadoui/react/utils`:
|
|
1273
|
+
|
|
1274
|
+
```tsx
|
|
1275
|
+
import { cn, getBrowserScrollbarWidth } from "@kadoui/react/utils";
|
|
1276
|
+
```
|
|
1277
|
+
|
|
1278
|
+
**Available Utilities:**
|
|
1279
|
+
- `cn` - Class name utility (clsx + tailwind-merge)
|
|
1280
|
+
- `getBrowserScrollbarWidth` - Get browser scrollbar width
|
|
1281
|
+
- Form utilities (see source for details)
|
|
1282
|
+
|
|
1283
|
+
---
|
|
1284
|
+
|
|
1285
|
+
## TypeScript
|
|
1286
|
+
|
|
1287
|
+
All components are fully typed. Import types as needed:
|
|
1288
|
+
|
|
1289
|
+
```tsx
|
|
1290
|
+
import type {
|
|
1291
|
+
SelectBoxOptionT,
|
|
1292
|
+
ModalRootPropsT,
|
|
1293
|
+
AccordionContextT
|
|
1294
|
+
} from "@kadoui/react";
|
|
1295
|
+
```
|
|
1296
|
+
|
|
1297
|
+
---
|
|
1298
|
+
|
|
1299
|
+
## Styling
|
|
1300
|
+
|
|
1301
|
+
Components are unstyled by default. We recommend using [@kadoui/css](https://www.npmjs.com/package/@kadoui/css) for styling, but you can use any CSS solution:
|
|
1302
|
+
|
|
1303
|
+
- Tailwind CSS
|
|
1304
|
+
- CSS Modules
|
|
1305
|
+
- Styled Components
|
|
1306
|
+
- Emotion
|
|
1307
|
+
- Plain CSS
|
|
1308
|
+
|
|
1309
|
+
**Example with Tailwind:**
|
|
1310
|
+
|
|
1311
|
+
```tsx
|
|
1312
|
+
<Accordion.Toggle className="flex items-center justify-between p-4 bg-gray-100 rounded-lg hover:bg-gray-200">
|
|
1313
|
+
Toggle
|
|
1314
|
+
</Accordion.Toggle>
|
|
1315
|
+
```
|
|
1316
|
+
|
|
1317
|
+
---
|
|
1318
|
+
|
|
1319
|
+
## Accessibility
|
|
1320
|
+
|
|
1321
|
+
All components follow accessibility best practices:
|
|
1322
|
+
|
|
1323
|
+
- Proper ARIA attributes
|
|
1324
|
+
- Keyboard navigation support
|
|
1325
|
+
- Focus management
|
|
1326
|
+
- Screen reader friendly
|
|
1327
|
+
|
|
1328
|
+
---
|
|
1329
|
+
|
|
1330
|
+
## Browser Support
|
|
1331
|
+
|
|
1332
|
+
- Chrome (latest)
|
|
1333
|
+
- Firefox (latest)
|
|
1334
|
+
- Safari (latest)
|
|
1335
|
+
- Edge (latest)
|
|
1336
|
+
|
|
1337
|
+
---
|
|
1338
|
+
|
|
1339
|
+
## Contributing
|
|
1340
|
+
|
|
1341
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
1342
|
+
|
|
1343
|
+
---
|
|
1344
|
+
|
|
1345
|
+
## License
|
|
1346
|
+
|
|
1347
|
+
MIT © [Farzad Vahdati](https://github.com/FarzadVav)
|
|
1348
|
+
|
|
1349
|
+
---
|
|
1350
|
+
|
|
1351
|
+
<div align="center">
|
|
1352
|
+
|
|
1353
|
+
Made with ❤️ by [Farzad Vahdati](https://github.com/FarzadVav)
|
|
1354
|
+
|
|
1355
|
+
</div>
|