@kadoui/react 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AccessNavigation/AccessNavigation.d.ts +6 -0
- package/dist/components/AccessNavigation/AccessNavigation.d.ts.map +1 -0
- package/dist/components/AccessNavigation/AccessNavigation.jsx +26 -0
- package/dist/components/Accordion/Accordion.d.ts +8 -0
- package/dist/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Accordion/Accordion.js +7 -0
- package/dist/components/Accordion/AccordionBody.d.ts +4 -0
- package/dist/components/Accordion/AccordionBody.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionBody.jsx +17 -0
- package/dist/components/Accordion/AccordionContext.d.ts +7 -0
- package/dist/components/Accordion/AccordionContext.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionContext.js +2 -0
- package/dist/components/Accordion/AccordionRoot.d.ts +4 -0
- package/dist/components/Accordion/AccordionRoot.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionRoot.jsx +9 -0
- package/dist/components/Accordion/AccordionToggle.d.ts +6 -0
- package/dist/components/Accordion/AccordionToggle.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionToggle.jsx +16 -0
- package/dist/components/Affix/Affix.d.ts +4 -0
- package/dist/components/Affix/Affix.d.ts.map +1 -0
- package/dist/components/Affix/Affix.jsx +38 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +5 -0
- package/dist/components/Breadcrumbs/BreadcrumbsContext.d.ts +6 -0
- package/dist/components/Breadcrumbs/BreadcrumbsContext.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/BreadcrumbsContext.js +2 -0
- package/dist/components/Breadcrumbs/BreadcrumbsItem.d.ts +6 -0
- package/dist/components/Breadcrumbs/BreadcrumbsItem.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/BreadcrumbsItem.jsx +11 -0
- package/dist/components/Breadcrumbs/BreadcrumbsRoot.d.ts +6 -0
- package/dist/components/Breadcrumbs/BreadcrumbsRoot.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/BreadcrumbsRoot.jsx +8 -0
- package/dist/components/Carousel/Carousel.d.ts +6 -0
- package/dist/components/Carousel/Carousel.d.ts.map +1 -0
- package/dist/components/Carousel/Carousel.js +5 -0
- package/dist/components/Carousel/CarouselContainer.d.ts +4 -0
- package/dist/components/Carousel/CarouselContainer.d.ts.map +1 -0
- package/dist/components/Carousel/CarouselContainer.jsx +10 -0
- package/dist/components/Carousel/CarouselContext.d.ts +6 -0
- package/dist/components/Carousel/CarouselContext.d.ts.map +1 -0
- package/dist/components/Carousel/CarouselContext.js +2 -0
- package/dist/components/Carousel/CarouselRoot.d.ts +4 -0
- package/dist/components/Carousel/CarouselRoot.d.ts.map +1 -0
- package/dist/components/Carousel/CarouselRoot.jsx +53 -0
- package/dist/components/ClientOnly/ClientOnly.d.ts +4 -0
- package/dist/components/ClientOnly/ClientOnly.d.ts.map +1 -0
- package/dist/components/ClientOnly/ClientOnly.jsx +6 -0
- package/dist/components/Clipboard/Clipboard.d.ts +7 -0
- package/dist/components/Clipboard/Clipboard.d.ts.map +1 -0
- package/dist/components/Clipboard/Clipboard.jsx +15 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +6 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.js +5 -0
- package/dist/components/ContextMenu/ContextMenuContent.d.ts +4 -0
- package/dist/components/ContextMenu/ContextMenuContent.d.ts.map +1 -0
- package/dist/components/ContextMenu/ContextMenuContent.jsx +28 -0
- package/dist/components/ContextMenu/ContextMenuContext.d.ts +11 -0
- package/dist/components/ContextMenu/ContextMenuContext.d.ts.map +1 -0
- package/dist/components/ContextMenu/ContextMenuContext.js +2 -0
- package/dist/components/ContextMenu/ContextMenuRoot.d.ts +4 -0
- package/dist/components/ContextMenu/ContextMenuRoot.d.ts.map +1 -0
- package/dist/components/ContextMenu/ContextMenuRoot.jsx +56 -0
- package/dist/components/Drawer/Drawer.d.ts +10 -0
- package/dist/components/Drawer/Drawer.d.ts.map +1 -0
- package/dist/components/Drawer/Drawer.js +9 -0
- package/dist/components/Drawer/DrawerBody.d.ts +6 -0
- package/dist/components/Drawer/DrawerBody.d.ts.map +1 -0
- package/dist/components/Drawer/DrawerBody.jsx +39 -0
- package/dist/components/Drawer/DrawerContext.d.ts +7 -0
- package/dist/components/Drawer/DrawerContext.d.ts.map +1 -0
- package/dist/components/Drawer/DrawerContext.js +2 -0
- package/dist/components/Drawer/DrawerPortal.d.ts +4 -0
- package/dist/components/Drawer/DrawerPortal.d.ts.map +1 -0
- package/dist/components/Drawer/DrawerPortal.jsx +20 -0
- package/dist/components/Drawer/DrawerRoot.d.ts +4 -0
- package/dist/components/Drawer/DrawerRoot.d.ts.map +1 -0
- package/dist/components/Drawer/DrawerRoot.jsx +35 -0
- package/dist/components/Drawer/DrawerToggle.d.ts +4 -0
- package/dist/components/Drawer/DrawerToggle.d.ts.map +1 -0
- package/dist/components/Drawer/DrawerToggle.jsx +10 -0
- package/dist/components/Dropdown/Dropdown.d.ts +8 -0
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/Dropdown/Dropdown.js +7 -0
- package/dist/components/Dropdown/DropdownContext.d.ts +9 -0
- package/dist/components/Dropdown/DropdownContext.d.ts.map +1 -0
- package/dist/components/Dropdown/DropdownContext.js +2 -0
- package/dist/components/Dropdown/DropdownMenu.d.ts +6 -0
- package/dist/components/Dropdown/DropdownMenu.d.ts.map +1 -0
- package/dist/components/Dropdown/DropdownMenu.jsx +13 -0
- package/dist/components/Dropdown/DropdownRoot.d.ts +6 -0
- package/dist/components/Dropdown/DropdownRoot.d.ts.map +1 -0
- package/dist/components/Dropdown/DropdownRoot.jsx +65 -0
- package/dist/components/Dropdown/DropdownToggle.d.ts +4 -0
- package/dist/components/Dropdown/DropdownToggle.d.ts.map +1 -0
- package/dist/components/Dropdown/DropdownToggle.jsx +11 -0
- package/dist/components/LinkLoader/LinkLoader.d.ts +6 -0
- package/dist/components/LinkLoader/LinkLoader.d.ts.map +1 -0
- package/dist/components/LinkLoader/LinkLoader.jsx +8 -0
- package/dist/components/Modal/Modal.d.ts +14 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -0
- package/dist/components/Modal/Modal.js +13 -0
- package/dist/components/Modal/ModalBody.d.ts +4 -0
- package/dist/components/Modal/ModalBody.d.ts.map +1 -0
- package/dist/components/Modal/ModalBody.jsx +6 -0
- package/dist/components/Modal/ModalContent.d.ts +4 -0
- package/dist/components/Modal/ModalContent.d.ts.map +1 -0
- package/dist/components/Modal/ModalContent.jsx +22 -0
- package/dist/components/Modal/ModalContext.d.ts +7 -0
- package/dist/components/Modal/ModalContext.d.ts.map +1 -0
- package/dist/components/Modal/ModalContext.js +2 -0
- package/dist/components/Modal/ModalHeader.d.ts +4 -0
- package/dist/components/Modal/ModalHeader.d.ts.map +1 -0
- package/dist/components/Modal/ModalHeader.jsx +4 -0
- package/dist/components/Modal/ModalPortal.d.ts +4 -0
- package/dist/components/Modal/ModalPortal.d.ts.map +1 -0
- package/dist/components/Modal/ModalPortal.jsx +20 -0
- package/dist/components/Modal/ModalRoot.d.ts +6 -0
- package/dist/components/Modal/ModalRoot.d.ts.map +1 -0
- package/dist/components/Modal/ModalRoot.jsx +35 -0
- package/dist/components/Modal/ModalTrigger.d.ts +4 -0
- package/dist/components/Modal/ModalTrigger.d.ts.map +1 -0
- package/dist/components/Modal/ModalTrigger.jsx +10 -0
- package/dist/components/Otp/Otp.d.ts +8 -0
- package/dist/components/Otp/Otp.d.ts.map +1 -0
- package/dist/components/Otp/Otp.js +7 -0
- package/dist/components/Otp/OtpContext.d.ts +7 -0
- package/dist/components/Otp/OtpContext.d.ts.map +1 -0
- package/dist/components/Otp/OtpContext.js +4 -0
- package/dist/components/Otp/OtpHiddenInput.d.ts +4 -0
- package/dist/components/Otp/OtpHiddenInput.d.ts.map +1 -0
- package/dist/components/Otp/OtpHiddenInput.jsx +7 -0
- package/dist/components/Otp/OtpInputs.d.ts +7 -0
- package/dist/components/Otp/OtpInputs.d.ts.map +1 -0
- package/dist/components/Otp/OtpInputs.jsx +55 -0
- package/dist/components/Otp/OtpRoot.d.ts +4 -0
- package/dist/components/Otp/OtpRoot.d.ts.map +1 -0
- package/dist/components/Otp/OtpRoot.jsx +16 -0
- package/dist/components/Pagination/Pagination.d.ts +16 -0
- package/dist/components/Pagination/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.js +12 -0
- package/dist/components/Pagination/PaginationContext.d.ts +8 -0
- package/dist/components/Pagination/PaginationContext.d.ts.map +1 -0
- package/dist/components/Pagination/PaginationContext.jsx +2 -0
- package/dist/components/Pagination/PaginationCounts.d.ts +4 -0
- package/dist/components/Pagination/PaginationCounts.d.ts.map +1 -0
- package/dist/components/Pagination/PaginationCounts.jsx +9 -0
- package/dist/components/Pagination/PaginationNextBtn.d.ts +6 -0
- package/dist/components/Pagination/PaginationNextBtn.d.ts.map +1 -0
- package/dist/components/Pagination/PaginationNextBtn.jsx +13 -0
- package/dist/components/Pagination/PaginationPrevBtn.d.ts +6 -0
- package/dist/components/Pagination/PaginationPrevBtn.d.ts.map +1 -0
- package/dist/components/Pagination/PaginationPrevBtn.jsx +13 -0
- package/dist/components/Pagination/PaginationSearchParamsRoot.d.ts +7 -0
- package/dist/components/Pagination/PaginationSearchParamsRoot.d.ts.map +1 -0
- package/dist/components/Pagination/PaginationSearchParamsRoot.jsx +30 -0
- package/dist/components/Pagination/PaginationStateRoot.d.ts +6 -0
- package/dist/components/Pagination/PaginationStateRoot.d.ts.map +1 -0
- package/dist/components/Pagination/PaginationStateRoot.jsx +11 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +8 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -0
- package/dist/components/PasswordInput/PasswordInput.js +7 -0
- package/dist/components/PasswordInput/PasswordInputContext.d.ts +7 -0
- package/dist/components/PasswordInput/PasswordInputContext.d.ts.map +1 -0
- package/dist/components/PasswordInput/PasswordInputContext.jsx +2 -0
- package/dist/components/PasswordInput/PasswordInputField.d.ts +4 -0
- package/dist/components/PasswordInput/PasswordInputField.d.ts.map +1 -0
- package/dist/components/PasswordInput/PasswordInputField.jsx +7 -0
- package/dist/components/PasswordInput/PasswordInputRoot.d.ts +4 -0
- package/dist/components/PasswordInput/PasswordInputRoot.d.ts.map +1 -0
- package/dist/components/PasswordInput/PasswordInputRoot.jsx +9 -0
- package/dist/components/PasswordInput/PasswordInputToggle.d.ts +4 -0
- package/dist/components/PasswordInput/PasswordInputToggle.d.ts.map +1 -0
- package/dist/components/PasswordInput/PasswordInputToggle.jsx +20 -0
- package/dist/components/Portal/Portal.d.ts +6 -0
- package/dist/components/Portal/Portal.d.ts.map +1 -0
- package/dist/components/Portal/Portal.jsx +7 -0
- package/dist/components/Progress/Progress.d.ts +6 -0
- package/dist/components/Progress/Progress.d.ts.map +1 -0
- package/dist/components/Progress/Progress.js +5 -0
- package/dist/components/Progress/ProgressBar.d.ts +6 -0
- package/dist/components/Progress/ProgressBar.d.ts.map +1 -0
- package/dist/components/Progress/ProgressBar.jsx +12 -0
- package/dist/components/Progress/ProgressContext.d.ts +6 -0
- package/dist/components/Progress/ProgressContext.d.ts.map +1 -0
- package/dist/components/Progress/ProgressContext.js +2 -0
- package/dist/components/Progress/ProgressRoot.d.ts +7 -0
- package/dist/components/Progress/ProgressRoot.d.ts.map +1 -0
- package/dist/components/Progress/ProgressRoot.jsx +8 -0
- package/dist/components/QrCode/QrCode.d.ts +8 -0
- package/dist/components/QrCode/QrCode.d.ts.map +1 -0
- package/dist/components/QrCode/QrCode.jsx +14 -0
- package/dist/components/Rating/Rating.d.ts +5 -0
- package/dist/components/Rating/Rating.d.ts.map +1 -0
- package/dist/components/Rating/Rating.js +5 -0
- package/dist/components/Rating/RatingContext.d.ts +7 -0
- package/dist/components/Rating/RatingContext.d.ts.map +1 -0
- package/dist/components/Rating/RatingContext.js +2 -0
- package/dist/components/Rating/RatingItems.d.ts +10 -0
- package/dist/components/Rating/RatingItems.d.ts.map +1 -0
- package/dist/components/Rating/RatingItems.jsx +18 -0
- package/dist/components/Rating/RatingRoot.d.ts +4 -0
- package/dist/components/Rating/RatingRoot.d.ts.map +1 -0
- package/dist/components/Rating/RatingRoot.jsx +10 -0
- package/dist/components/Sheet/Sheet.d.ts +14 -0
- package/dist/components/Sheet/Sheet.d.ts.map +1 -0
- package/dist/components/Sheet/Sheet.jsx +13 -0
- package/dist/components/Sheet/SheetBody.d.ts +4 -0
- package/dist/components/Sheet/SheetBody.d.ts.map +1 -0
- package/dist/components/Sheet/SheetBody.jsx +21 -0
- package/dist/components/Sheet/SheetContent.d.ts +4 -0
- package/dist/components/Sheet/SheetContent.d.ts.map +1 -0
- package/dist/components/Sheet/SheetContent.jsx +4 -0
- package/dist/components/Sheet/SheetContext.d.ts +13 -0
- package/dist/components/Sheet/SheetContext.d.ts.map +1 -0
- package/dist/components/Sheet/SheetContext.js +2 -0
- package/dist/components/Sheet/SheetHeader.d.ts +4 -0
- package/dist/components/Sheet/SheetHeader.d.ts.map +1 -0
- package/dist/components/Sheet/SheetHeader.jsx +10 -0
- package/dist/components/Sheet/SheetPortal.d.ts +4 -0
- package/dist/components/Sheet/SheetPortal.d.ts.map +1 -0
- package/dist/components/Sheet/SheetPortal.jsx +17 -0
- package/dist/components/Sheet/SheetRoot.d.ts +4 -0
- package/dist/components/Sheet/SheetRoot.d.ts.map +1 -0
- package/dist/components/Sheet/SheetRoot.jsx +37 -0
- package/dist/components/Sheet/SheetToggle.d.ts +4 -0
- package/dist/components/Sheet/SheetToggle.d.ts.map +1 -0
- package/dist/components/Sheet/SheetToggle.jsx +10 -0
- package/dist/components/ShowMore/ShowMore.d.ts +10 -0
- package/dist/components/ShowMore/ShowMore.d.ts.map +1 -0
- package/dist/components/ShowMore/ShowMore.js +9 -0
- package/dist/components/ShowMore/ShowMoreContent.d.ts +4 -0
- package/dist/components/ShowMore/ShowMoreContent.d.ts.map +1 -0
- package/dist/components/ShowMore/ShowMoreContent.jsx +18 -0
- package/dist/components/ShowMore/ShowMoreContext.d.ts +10 -0
- package/dist/components/ShowMore/ShowMoreContext.d.ts.map +1 -0
- package/dist/components/ShowMore/ShowMoreContext.js +2 -0
- package/dist/components/ShowMore/ShowMoreFade.d.ts +4 -0
- package/dist/components/ShowMore/ShowMoreFade.d.ts.map +1 -0
- package/dist/components/ShowMore/ShowMoreFade.jsx +8 -0
- package/dist/components/ShowMore/ShowMoreRoot.d.ts +7 -0
- package/dist/components/ShowMore/ShowMoreRoot.d.ts.map +1 -0
- package/dist/components/ShowMore/ShowMoreRoot.jsx +23 -0
- package/dist/components/ShowMore/ShowMoreTrigger.d.ts +4 -0
- package/dist/components/ShowMore/ShowMoreTrigger.d.ts.map +1 -0
- package/dist/components/ShowMore/ShowMoreTrigger.jsx +11 -0
- package/dist/components/Slide/Slide.d.ts +12 -0
- package/dist/components/Slide/Slide.d.ts.map +1 -0
- package/dist/components/Slide/Slide.js +11 -0
- package/dist/components/Slide/SlideContent.d.ts +4 -0
- package/dist/components/Slide/SlideContent.d.ts.map +1 -0
- package/dist/components/Slide/SlideContent.jsx +4 -0
- package/dist/components/Slide/SlideContext.d.ts +7 -0
- package/dist/components/Slide/SlideContext.d.ts.map +1 -0
- package/dist/components/Slide/SlideContext.js +5 -0
- package/dist/components/Slide/SlideHeader.d.ts +4 -0
- package/dist/components/Slide/SlideHeader.d.ts.map +1 -0
- package/dist/components/Slide/SlideHeader.jsx +4 -0
- package/dist/components/Slide/SlidePortal.d.ts +4 -0
- package/dist/components/Slide/SlidePortal.d.ts.map +1 -0
- package/dist/components/Slide/SlidePortal.jsx +11 -0
- package/dist/components/Slide/SlideRoot.d.ts +4 -0
- package/dist/components/Slide/SlideRoot.d.ts.map +1 -0
- package/dist/components/Slide/SlideRoot.jsx +30 -0
- package/dist/components/Slide/SlideToggle.d.ts +4 -0
- package/dist/components/Slide/SlideToggle.d.ts.map +1 -0
- package/dist/components/Slide/SlideToggle.jsx +10 -0
- package/dist/components/Spoiler/Spoiler.d.ts +6 -0
- package/dist/components/Spoiler/Spoiler.d.ts.map +1 -0
- package/dist/components/Spoiler/Spoiler.jsx +11 -0
- package/dist/components/Steps/Steps.d.ts +16 -0
- package/dist/components/Steps/Steps.d.ts.map +1 -0
- package/dist/components/Steps/Steps.js +12 -0
- package/dist/components/Steps/StepsContext.d.ts +14 -0
- package/dist/components/Steps/StepsContext.d.ts.map +1 -0
- package/dist/components/Steps/StepsContext.jsx +2 -0
- package/dist/components/Steps/StepsControls.d.ts +4 -0
- package/dist/components/Steps/StepsControls.d.ts.map +1 -0
- package/dist/components/Steps/StepsControls.jsx +34 -0
- package/dist/components/Steps/StepsNextBtn.d.ts +6 -0
- package/dist/components/Steps/StepsNextBtn.d.ts.map +1 -0
- package/dist/components/Steps/StepsNextBtn.jsx +13 -0
- package/dist/components/Steps/StepsPrevBtn.d.ts +6 -0
- package/dist/components/Steps/StepsPrevBtn.d.ts.map +1 -0
- package/dist/components/Steps/StepsPrevBtn.jsx +13 -0
- package/dist/components/Steps/StepsSearchParamsRoot.d.ts +8 -0
- package/dist/components/Steps/StepsSearchParamsRoot.d.ts.map +1 -0
- package/dist/components/Steps/StepsSearchParamsRoot.jsx +30 -0
- package/dist/components/Steps/StepsStateRoot.d.ts +7 -0
- package/dist/components/Steps/StepsStateRoot.d.ts.map +1 -0
- package/dist/components/Steps/StepsStateRoot.jsx +11 -0
- package/dist/components/Swap/Swap.d.ts +8 -0
- package/dist/components/Swap/Swap.d.ts.map +1 -0
- package/dist/components/Swap/Swap.js +7 -0
- package/dist/components/Swap/SwapContext.d.ts +7 -0
- package/dist/components/Swap/SwapContext.d.ts.map +1 -0
- package/dist/components/Swap/SwapContext.js +2 -0
- package/dist/components/Swap/SwapItem.d.ts +4 -0
- package/dist/components/Swap/SwapItem.d.ts.map +1 -0
- package/dist/components/Swap/SwapItem.jsx +5 -0
- package/dist/components/Swap/SwapRoot.d.ts +8 -0
- package/dist/components/Swap/SwapRoot.d.ts.map +1 -0
- package/dist/components/Swap/SwapRoot.jsx +16 -0
- package/dist/components/Swap/SwapTrigger.d.ts +6 -0
- package/dist/components/Swap/SwapTrigger.d.ts.map +1 -0
- package/dist/components/Swap/SwapTrigger.jsx +16 -0
- package/dist/components/Tabs/Tabs.d.ts +10 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.js +9 -0
- package/dist/components/Tabs/TabsContext.d.ts +7 -0
- package/dist/components/Tabs/TabsContext.d.ts.map +1 -0
- package/dist/components/Tabs/TabsContext.js +5 -0
- package/dist/components/Tabs/TabsList.d.ts +4 -0
- package/dist/components/Tabs/TabsList.d.ts.map +1 -0
- package/dist/components/Tabs/TabsList.jsx +5 -0
- package/dist/components/Tabs/TabsPanel.d.ts +6 -0
- package/dist/components/Tabs/TabsPanel.d.ts.map +1 -0
- package/dist/components/Tabs/TabsPanel.jsx +9 -0
- package/dist/components/Tabs/TabsRoot.d.ts +7 -0
- package/dist/components/Tabs/TabsRoot.d.ts.map +1 -0
- package/dist/components/Tabs/TabsRoot.jsx +7 -0
- package/dist/components/Tabs/TabsTab.d.ts +6 -0
- package/dist/components/Tabs/TabsTab.d.ts.map +1 -0
- package/dist/components/Tabs/TabsTab.jsx +10 -0
- package/dist/components/Toast/Toast.d.ts +4 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -0
- package/dist/components/Toast/Toast.js +3 -0
- package/dist/components/Toast/ToastBox.d.ts +6 -0
- package/dist/components/Toast/ToastBox.d.ts.map +1 -0
- package/dist/components/Toast/ToastBox.jsx +32 -0
- package/dist/components/Toast/ToastRoot.d.ts +15 -0
- package/dist/components/Toast/ToastRoot.d.ts.map +1 -0
- package/dist/components/Toast/ToastRoot.jsx +38 -0
- package/dist/components/Toast/toastStore.d.ts +11 -0
- package/dist/components/Toast/toastStore.d.ts.map +1 -0
- package/dist/components/Toast/toastStore.js +10 -0
- package/dist/components/Toggle/Toggle.d.ts +6 -0
- package/dist/components/Toggle/Toggle.d.ts.map +1 -0
- package/dist/components/Toggle/Toggle.js +5 -0
- package/dist/components/Toggle/ToggleContext.d.ts +8 -0
- package/dist/components/Toggle/ToggleContext.d.ts.map +1 -0
- package/dist/components/Toggle/ToggleContext.js +2 -0
- package/dist/components/Toggle/ToggleRoot.d.ts +8 -0
- package/dist/components/Toggle/ToggleRoot.d.ts.map +1 -0
- package/dist/components/Toggle/ToggleRoot.jsx +13 -0
- package/dist/components/Toggle/ToggleSwitch.d.ts +4 -0
- package/dist/components/Toggle/ToggleSwitch.d.ts.map +1 -0
- package/dist/components/Toggle/ToggleSwitch.jsx +23 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/package.json +43 -0
- package/src/components/AccessNavigation/AccessNavigation.tsx +46 -0
- package/src/components/Accordion/Accordion.ts +8 -0
- package/src/components/Accordion/AccordionBody.tsx +31 -0
- package/src/components/Accordion/AccordionContext.ts +8 -0
- package/src/components/Accordion/AccordionRoot.tsx +17 -0
- package/src/components/Accordion/AccordionToggle.tsx +29 -0
- package/src/components/Affix/Affix.tsx +59 -0
- package/src/components/Breadcrumbs/Breadcrumbs.ts +6 -0
- package/src/components/Breadcrumbs/BreadcrumbsContext.ts +7 -0
- package/src/components/Breadcrumbs/BreadcrumbsItem.tsx +24 -0
- package/src/components/Breadcrumbs/BreadcrumbsRoot.tsx +21 -0
- package/src/components/Carousel/Carousel.ts +6 -0
- package/src/components/Carousel/CarouselContainer.tsx +18 -0
- package/src/components/Carousel/CarouselContext.ts +7 -0
- package/src/components/Carousel/CarouselRoot.tsx +75 -0
- package/src/components/ClientOnly/ClientOnly.tsx +12 -0
- package/src/components/Clipboard/Clipboard.tsx +36 -0
- package/src/components/ContextMenu/ContextMenu.ts +6 -0
- package/src/components/ContextMenu/ContextMenuContent.tsx +51 -0
- package/src/components/ContextMenu/ContextMenuContext.ts +9 -0
- package/src/components/ContextMenu/ContextMenuRoot.tsx +79 -0
- package/src/components/Drawer/Drawer.ts +10 -0
- package/src/components/Drawer/DrawerBody.tsx +67 -0
- package/src/components/Drawer/DrawerContext.ts +8 -0
- package/src/components/Drawer/DrawerPortal.tsx +40 -0
- package/src/components/Drawer/DrawerRoot.tsx +45 -0
- package/src/components/Drawer/DrawerToggle.tsx +21 -0
- package/src/components/Dropdown/Dropdown.ts +8 -0
- package/src/components/Dropdown/DropdownContext.ts +10 -0
- package/src/components/Dropdown/DropdownMenu.tsx +34 -0
- package/src/components/Dropdown/DropdownRoot.tsx +90 -0
- package/src/components/Dropdown/DropdownToggle.tsx +23 -0
- package/src/components/LinkLoader/LinkLoader.tsx +16 -0
- package/src/components/Modal/Modal.ts +14 -0
- package/src/components/Modal/ModalBody.tsx +12 -0
- package/src/components/Modal/ModalContent.tsx +44 -0
- package/src/components/Modal/ModalContext.ts +8 -0
- package/src/components/Modal/ModalHeader.tsx +10 -0
- package/src/components/Modal/ModalPortal.tsx +40 -0
- package/src/components/Modal/ModalRoot.tsx +47 -0
- package/src/components/Modal/ModalTrigger.tsx +21 -0
- package/src/components/Otp/Otp.ts +8 -0
- package/src/components/Otp/OtpContext.ts +10 -0
- package/src/components/Otp/OtpHiddenInput.tsx +15 -0
- package/src/components/Otp/OtpInputs.tsx +86 -0
- package/src/components/Otp/OtpRoot.tsx +26 -0
- package/src/components/Pagination/Pagination.ts +15 -0
- package/src/components/Pagination/PaginationContext.tsx +10 -0
- package/src/components/Pagination/PaginationCounts.tsx +17 -0
- package/src/components/Pagination/PaginationNextBtn.tsx +27 -0
- package/src/components/Pagination/PaginationPrevBtn.tsx +27 -0
- package/src/components/Pagination/PaginationSearchParamsRoot.tsx +45 -0
- package/src/components/Pagination/PaginationStateRoot.tsx +23 -0
- package/src/components/PasswordInput/PasswordInput.ts +8 -0
- package/src/components/PasswordInput/PasswordInputContext.tsx +8 -0
- package/src/components/PasswordInput/PasswordInputField.tsx +15 -0
- package/src/components/PasswordInput/PasswordInputRoot.tsx +17 -0
- package/src/components/PasswordInput/PasswordInputToggle.tsx +52 -0
- package/src/components/Portal/Portal.tsx +17 -0
- package/src/components/Progress/Progress.ts +6 -0
- package/src/components/Progress/ProgressBar.tsx +29 -0
- package/src/components/Progress/ProgressContext.ts +8 -0
- package/src/components/Progress/ProgressRoot.tsx +22 -0
- package/src/components/QrCode/QrCode.tsx +22 -0
- package/src/components/Rating/Rating.ts +6 -0
- package/src/components/Rating/RatingContext.ts +8 -0
- package/src/components/Rating/RatingItems.tsx +50 -0
- package/src/components/Rating/RatingRoot.tsx +22 -0
- package/src/components/Sheet/Sheet.tsx +14 -0
- package/src/components/Sheet/SheetBody.tsx +49 -0
- package/src/components/Sheet/SheetContent.tsx +8 -0
- package/src/components/Sheet/SheetContext.ts +14 -0
- package/src/components/Sheet/SheetHeader.tsx +24 -0
- package/src/components/Sheet/SheetPortal.tsx +35 -0
- package/src/components/Sheet/SheetRoot.tsx +56 -0
- package/src/components/Sheet/SheetToggle.tsx +21 -0
- package/src/components/ShowMore/ShowMore.ts +10 -0
- package/src/components/ShowMore/ShowMoreContent.tsx +31 -0
- package/src/components/ShowMore/ShowMoreContext.ts +11 -0
- package/src/components/ShowMore/ShowMoreFade.tsx +18 -0
- package/src/components/ShowMore/ShowMoreRoot.tsx +37 -0
- package/src/components/ShowMore/ShowMoreTrigger.tsx +23 -0
- package/src/components/Slide/Slide.ts +12 -0
- package/src/components/Slide/SlideContent.tsx +8 -0
- package/src/components/Slide/SlideContext.ts +11 -0
- package/src/components/Slide/SlideHeader.tsx +10 -0
- package/src/components/Slide/SlidePortal.tsx +26 -0
- package/src/components/Slide/SlideRoot.tsx +39 -0
- package/src/components/Slide/SlideToggle.tsx +21 -0
- package/src/components/Spoiler/Spoiler.tsx +28 -0
- package/src/components/Steps/Steps.ts +15 -0
- package/src/components/Steps/StepsContext.tsx +16 -0
- package/src/components/Steps/StepsControls.tsx +56 -0
- package/src/components/Steps/StepsNextBtn.tsx +27 -0
- package/src/components/Steps/StepsPrevBtn.tsx +27 -0
- package/src/components/Steps/StepsSearchParamsRoot.tsx +45 -0
- package/src/components/Steps/StepsStateRoot.tsx +23 -0
- package/src/components/Swap/Swap.ts +8 -0
- package/src/components/Swap/SwapContext.ts +9 -0
- package/src/components/Swap/SwapItem.tsx +16 -0
- package/src/components/Swap/SwapRoot.tsx +29 -0
- package/src/components/Swap/SwapTrigger.tsx +31 -0
- package/src/components/Tabs/Tabs.ts +10 -0
- package/src/components/Tabs/TabsContext.ts +11 -0
- package/src/components/Tabs/TabsList.tsx +12 -0
- package/src/components/Tabs/TabsPanel.tsx +23 -0
- package/src/components/Tabs/TabsRoot.tsx +18 -0
- package/src/components/Tabs/TabsTab.tsx +23 -0
- package/src/components/Toast/Toast.ts +3 -0
- package/src/components/Toast/ToastBox.tsx +50 -0
- package/src/components/Toast/ToastRoot.tsx +71 -0
- package/src/components/Toast/toastStore.ts +22 -0
- package/src/components/Toggle/Toggle.ts +6 -0
- package/src/components/Toggle/ToggleContext.ts +9 -0
- package/src/components/Toggle/ToggleRoot.tsx +26 -0
- package/src/components/Toggle/ToggleSwitch.tsx +41 -0
- package/src/index.ts +28 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
export type createContextT = {
|
|
3
|
+
inputs?: RefObject<(HTMLInputElement | null)[]>;
|
|
4
|
+
getInputsValue: () => string;
|
|
5
|
+
};
|
|
6
|
+
export declare const OtpContext: import("react").Context<createContextT>;
|
|
7
|
+
//# sourceMappingURL=OtpContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtpContext.d.ts","sourceRoot":"","sources":["../../../src/components/Otp/OtpContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC,gBAAgB,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;IAChD,cAAc,EAAE,MAAM,MAAM,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,UAAU,yCAErB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from "react";
|
|
2
|
+
export type OtpHiddenInputPropsT = InputHTMLAttributes<HTMLInputElement>;
|
|
3
|
+
export declare function OtpHiddenInput({ name, ...p }: OtpHiddenInputPropsT): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=OtpHiddenInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtpHiddenInput.d.ts","sourceRoot":"","sources":["../../../src/components/Otp/OtpHiddenInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAO,MAAM,OAAO,CAAC;AAIjD,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAEzE,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,oBAAoB,+BAMlE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { use } from "react";
|
|
3
|
+
import { OtpContext } from "./OtpContext";
|
|
4
|
+
export function OtpHiddenInput({ name, ...p }) {
|
|
5
|
+
const { getInputsValue } = use(OtpContext);
|
|
6
|
+
return (<input type="hidden" tabIndex={-1} name={name || "otp"} value={getInputsValue()} {...p}/>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from "react";
|
|
2
|
+
export type OtpInputsPropsT = InputHTMLAttributes<HTMLInputElement> & {
|
|
3
|
+
length: number;
|
|
4
|
+
onLastChange?: (otp: string) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function OtpInputs({ className, name, length, onLastChange, ...props }: OtpInputsPropsT): import("react").JSX.Element[];
|
|
7
|
+
//# sourceMappingURL=OtpInputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtpInputs.d.ts","sourceRoot":"","sources":["../../../src/components/Otp/OtpInputs.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAkB,mBAAmB,EAAsB,MAAM,OAAO,CAAC;AAIhF,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IACpE,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAA;AAED,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,iCAyE7F"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "kadoui-utils";
|
|
3
|
+
import { use } from "react";
|
|
4
|
+
import { OtpContext } from "./OtpContext";
|
|
5
|
+
export function OtpInputs({ className, name, length, onLastChange, ...props }) {
|
|
6
|
+
const { inputs, getInputsValue } = use(OtpContext);
|
|
7
|
+
const handlePaste = (ev, startIndex) => {
|
|
8
|
+
ev.preventDefault();
|
|
9
|
+
const pastedData = ev.clipboardData.getData("text").replace(/\s/g, ""); // Remove whitespace
|
|
10
|
+
if (!pastedData)
|
|
11
|
+
return;
|
|
12
|
+
for (let i = 0; i < pastedData.length; i++) {
|
|
13
|
+
const inputIndex = startIndex + i;
|
|
14
|
+
if (inputIndex >= length)
|
|
15
|
+
break; // Don't exceed OTP length
|
|
16
|
+
const input = inputs?.current[inputIndex];
|
|
17
|
+
const indexedPastedData = pastedData[i];
|
|
18
|
+
if (input && indexedPastedData) {
|
|
19
|
+
input.value = indexedPastedData;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const nextIndex = Math.min(startIndex + pastedData.length, length - 1);
|
|
23
|
+
inputs?.current[nextIndex]?.focus();
|
|
24
|
+
const otpValue = getInputsValue();
|
|
25
|
+
if (otpValue.length === length) {
|
|
26
|
+
onLastChange?.(otpValue);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const handleInputChange = (value, index) => {
|
|
30
|
+
if (value) {
|
|
31
|
+
const currentInput = inputs?.current[index];
|
|
32
|
+
const currentValue = currentInput?.value[currentInput.value.length - 1];
|
|
33
|
+
if (currentValue) {
|
|
34
|
+
currentInput.value = currentValue;
|
|
35
|
+
}
|
|
36
|
+
const nextInput = inputs?.current[index + 1];
|
|
37
|
+
if (nextInput) {
|
|
38
|
+
nextInput.value = "";
|
|
39
|
+
nextInput.focus();
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
onLastChange?.(getInputsValue());
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const handleBackspace = (e, index) => {
|
|
46
|
+
if (e.key === "Backspace" && !e.currentTarget.value && index > 0) {
|
|
47
|
+
inputs?.current[index - 1]?.focus();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return Array.from({ length }).map((_, index) => (<input key={index} autoComplete="off" name={`${name || "otp"}-${index}`} onPaste={ev => handlePaste(ev, index)} onKeyDown={ev => handleBackspace(ev, index)} onChange={ev => handleInputChange(ev.target.value, index)} className={cn("input-outline input-square text-center", className)} ref={el => {
|
|
51
|
+
if (inputs) {
|
|
52
|
+
inputs.current[index] = el;
|
|
53
|
+
}
|
|
54
|
+
}} {...props}/>));
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtpRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Otp/OtpRoot.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAqB,MAAM,OAAO,CAAC;AAI1D,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAE3D,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BAgB7D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "kadoui-utils";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
import { OtpContext } from "./OtpContext";
|
|
5
|
+
export function OtpRoot({ className, ...props }) {
|
|
6
|
+
const inputs = useRef([]);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
inputs.current[0]?.focus();
|
|
9
|
+
}, []);
|
|
10
|
+
const getInputsValue = () => {
|
|
11
|
+
return inputs?.current.map(input => input?.value || "").join("") || "";
|
|
12
|
+
};
|
|
13
|
+
return (<OtpContext value={{ inputs, getInputsValue }}>
|
|
14
|
+
<div className={cn("f-align gap-1.5", className)} {...props}/>
|
|
15
|
+
</OtpContext>);
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PaginationCounts } from "./PaginationCounts";
|
|
2
|
+
import { PaginationNextBtn } from "./PaginationNextBtn";
|
|
3
|
+
import { PaginationPrevBtn } from "./PaginationPrevBtn";
|
|
4
|
+
import { PaginationStateRoot } from "./PaginationStateRoot";
|
|
5
|
+
import { PaginationSearchParamsRoot } from "./PaginationSearchParamsRoot";
|
|
6
|
+
export declare const PaginationWithState: typeof PaginationStateRoot & {
|
|
7
|
+
Counts: typeof PaginationCounts;
|
|
8
|
+
NextBtn: typeof PaginationNextBtn;
|
|
9
|
+
PrevBtn: typeof PaginationPrevBtn;
|
|
10
|
+
};
|
|
11
|
+
export declare const PaginationWithSearchParams: typeof PaginationSearchParamsRoot & {
|
|
12
|
+
Counts: typeof PaginationCounts;
|
|
13
|
+
NextBtn: typeof PaginationNextBtn;
|
|
14
|
+
PrevBtn: typeof PaginationPrevBtn;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=Pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAQ1E,eAAO,MAAM,mBAAmB;;;;CAAqD,CAAC;AAEtF,eAAO,MAAM,0BAA0B;;;;CAA4D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PaginationCounts } from "./PaginationCounts";
|
|
2
|
+
import { PaginationNextBtn } from "./PaginationNextBtn";
|
|
3
|
+
import { PaginationPrevBtn } from "./PaginationPrevBtn";
|
|
4
|
+
import { PaginationStateRoot } from "./PaginationStateRoot";
|
|
5
|
+
import { PaginationSearchParamsRoot } from "./PaginationSearchParamsRoot";
|
|
6
|
+
const baseComponents = {
|
|
7
|
+
Counts: PaginationCounts,
|
|
8
|
+
NextBtn: PaginationNextBtn,
|
|
9
|
+
PrevBtn: PaginationPrevBtn
|
|
10
|
+
};
|
|
11
|
+
export const PaginationWithState = Object.assign(PaginationStateRoot, baseComponents);
|
|
12
|
+
export const PaginationWithSearchParams = Object.assign(PaginationSearchParamsRoot, baseComponents);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationContext.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationContext.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAA;AAED,eAAO,MAAM,iBAAiB,6CAA8D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationCounts.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationCounts.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAO,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAE1E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,sBAAsB,+BAQ7D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { use } from "react";
|
|
3
|
+
import { PaginationContext } from "./PaginationContext";
|
|
4
|
+
export function PaginationCounts(props) {
|
|
5
|
+
const { page, pageLength } = use(PaginationContext);
|
|
6
|
+
return (<p {...props}>
|
|
7
|
+
Page {page} / {pageLength}
|
|
8
|
+
</p>);
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
export type PaginationNextBtnPropsT = HTMLAttributes<HTMLButtonElement> & {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare function PaginationNextBtn({ onClick, disabled, children, ...props }: PaginationNextBtnPropsT): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=PaginationNextBtn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationNextBtn.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationNextBtn.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAO,MAAM,OAAO,CAAC;AAK5C,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,iBAAiB,CAAC,GAAG;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,+BAenG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { use } from "react";
|
|
3
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
4
|
+
import { PaginationContext } from "./PaginationContext";
|
|
5
|
+
export function PaginationNextBtn({ onClick, disabled, children, ...props }) {
|
|
6
|
+
const { page, pageLength, nextPage } = use(PaginationContext);
|
|
7
|
+
return (<button disabled={disabled || page === pageLength} onClick={ev => {
|
|
8
|
+
onClick?.(ev);
|
|
9
|
+
nextPage();
|
|
10
|
+
}} {...props}>
|
|
11
|
+
{children || <ChevronRightIcon className="compatible-icon"/>}
|
|
12
|
+
</button>);
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
export type PaginationPrevBtnPropsT = HTMLAttributes<HTMLButtonElement> & {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare function PaginationPrevBtn({ onClick, disabled, children, ...props }: PaginationPrevBtnPropsT): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=PaginationPrevBtn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationPrevBtn.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationPrevBtn.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAO,MAAM,OAAO,CAAC;AAK5C,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,iBAAiB,CAAC,GAAG;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAA;AAED,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,+BAenG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { use } from "react";
|
|
3
|
+
import { ChevronLeftIcon } from "lucide-react";
|
|
4
|
+
import { PaginationContext } from "./PaginationContext";
|
|
5
|
+
export function PaginationPrevBtn({ onClick, disabled, children, ...props }) {
|
|
6
|
+
const { page, prevPage } = use(PaginationContext);
|
|
7
|
+
return (<button disabled={disabled || page === 1} onClick={ev => {
|
|
8
|
+
onClick?.(ev);
|
|
9
|
+
prevPage();
|
|
10
|
+
}} {...props}>
|
|
11
|
+
{children || <ChevronLeftIcon className="compatible-icon"/>}
|
|
12
|
+
</button>);
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
export type PaginationSearchParamsRootPropsT = PropsWithChildren & {
|
|
3
|
+
pageKey?: string;
|
|
4
|
+
pageLength: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function PaginationSearchParamsRoot({ pageKey, pageLength, children }: PaginationSearchParamsRootPropsT): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=PaginationSearchParamsRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationSearchParamsRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationSearchParamsRoot.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAI/D,MAAM,MAAM,gCAAgC,GAAG,iBAAiB,GAAG;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAA;AAED,wBAAgB,0BAA0B,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,gCAAgC,+BAgC7G"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRouter, useSearchParams } from "next/navigation";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { PaginationContext } from "./PaginationContext";
|
|
5
|
+
export function PaginationSearchParamsRoot({ pageKey, pageLength, children }) {
|
|
6
|
+
const router = useRouter();
|
|
7
|
+
const searchParams = useSearchParams();
|
|
8
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
setCurrentPage(+(searchParams.get(pageKey || "page") || "1"));
|
|
11
|
+
}, [pageKey, searchParams]);
|
|
12
|
+
const pushRouter = (page) => {
|
|
13
|
+
const params = new URLSearchParams(searchParams.toString());
|
|
14
|
+
params.set(pageKey || "page", page.toString());
|
|
15
|
+
router.push("?" + params.toString());
|
|
16
|
+
};
|
|
17
|
+
const nextPage = () => {
|
|
18
|
+
if (currentPage < pageLength) {
|
|
19
|
+
pushRouter(currentPage + 1);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const prevPage = () => {
|
|
23
|
+
if (currentPage > 1) {
|
|
24
|
+
pushRouter(currentPage - 1);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return (<PaginationContext.Provider value={{ page: currentPage, pageLength, nextPage, prevPage }}>
|
|
28
|
+
{children}
|
|
29
|
+
</PaginationContext.Provider>);
|
|
30
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
export type PaginationStateRootPropsT = PropsWithChildren & {
|
|
3
|
+
pageLength: number;
|
|
4
|
+
};
|
|
5
|
+
export declare function PaginationStateRoot({ pageLength, children }: PaginationStateRootPropsT): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=PaginationStateRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationStateRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationStateRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAIpD,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,GAAG;IAC1D,UAAU,EAAE,MAAM,CAAC;CACpB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,yBAAyB,+BAYtF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { PaginationContext } from "./PaginationContext";
|
|
4
|
+
export function PaginationStateRoot({ pageLength, children }) {
|
|
5
|
+
const [page, setPage] = useState(1);
|
|
6
|
+
const nextPage = () => setPage(prev => prev < pageLength ? prev + 1 : prev);
|
|
7
|
+
const prevPage = () => setPage(prev => prev > 1 ? prev - 1 : prev);
|
|
8
|
+
return (<PaginationContext.Provider value={{ page, pageLength, nextPage, prevPage }}>
|
|
9
|
+
{children}
|
|
10
|
+
</PaginationContext.Provider>);
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PasswordInputRoot } from "./PasswordInputRoot";
|
|
2
|
+
import { PasswordInputField } from "./PasswordInputField";
|
|
3
|
+
import { PasswordInputToggle } from "./PasswordInputToggle";
|
|
4
|
+
export declare const PasswordInput: typeof PasswordInputRoot & {
|
|
5
|
+
Field: typeof PasswordInputField;
|
|
6
|
+
Toggle: typeof PasswordInputToggle;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=PasswordInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordInput/PasswordInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,eAAO,MAAM,aAAa;;;CAGxB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PasswordInputRoot } from "./PasswordInputRoot";
|
|
2
|
+
import { PasswordInputField } from "./PasswordInputField";
|
|
3
|
+
import { PasswordInputToggle } from "./PasswordInputToggle";
|
|
4
|
+
export const PasswordInput = Object.assign(PasswordInputRoot, {
|
|
5
|
+
Field: PasswordInputField,
|
|
6
|
+
Toggle: PasswordInputToggle
|
|
7
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from "react";
|
|
2
|
+
export type PasswordInputContextT = {
|
|
3
|
+
isVisible: boolean;
|
|
4
|
+
setIsVisible: Dispatch<SetStateAction<boolean>>;
|
|
5
|
+
};
|
|
6
|
+
export declare const PasswordInputContext: import("react").Context<PasswordInputContextT>;
|
|
7
|
+
//# sourceMappingURL=PasswordInputContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordInputContext.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordInput/PasswordInputContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEhE,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CACjD,CAAA;AAED,eAAO,MAAM,oBAAoB,gDAAoE,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from "react";
|
|
2
|
+
export type PasswordInputFieldPropsT = InputHTMLAttributes<HTMLInputElement>;
|
|
3
|
+
export declare function PasswordInputField(props: PasswordInputFieldPropsT): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=PasswordInputField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordInputField.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordInput/PasswordInputField.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAO,MAAM,OAAO,CAAC;AAIjD,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAE7E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,wBAAwB,+BAMjE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { use } from "react";
|
|
3
|
+
import { PasswordInputContext } from "./PasswordInputContext";
|
|
4
|
+
export function PasswordInputField(props) {
|
|
5
|
+
const { isVisible } = use(PasswordInputContext);
|
|
6
|
+
return (<input type={isVisible ? "text" : "password"} {...props}/>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LabelHTMLAttributes } from "react";
|
|
2
|
+
export type PasswordInputRootPropsT = LabelHTMLAttributes<HTMLLabelElement>;
|
|
3
|
+
export declare function PasswordInputRoot(props: PasswordInputRootPropsT): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=PasswordInputRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordInputRoot.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordInput/PasswordInputRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAY,MAAM,OAAO,CAAC;AAItD,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAE5E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,uBAAuB,+BAQ/D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { PasswordInputContext } from "./PasswordInputContext";
|
|
4
|
+
export function PasswordInputRoot(props) {
|
|
5
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
6
|
+
return (<PasswordInputContext value={{ isVisible, setIsVisible }}>
|
|
7
|
+
<label {...props}/>
|
|
8
|
+
</PasswordInputContext>);
|
|
9
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from "react";
|
|
2
|
+
export type PasswordInputTogglePropsT = ButtonHTMLAttributes<HTMLButtonElement>;
|
|
3
|
+
export declare function PasswordInputToggle({ onClick, children, ...props }: PasswordInputTogglePropsT): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=PasswordInputToggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordInputToggle.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordInput/PasswordInputToggle.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAO,MAAM,OAAO,CAAC;AAMlD,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEhF,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,yBAAyB,+BAyC7F"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { use } from "react";
|
|
3
|
+
import { EyeClosedIcon, EyeIcon } from "lucide-react";
|
|
4
|
+
import { AnimatePresence, motion } from "framer-motion";
|
|
5
|
+
import { PasswordInputContext } from "./PasswordInputContext";
|
|
6
|
+
export function PasswordInputToggle({ onClick, children, ...props }) {
|
|
7
|
+
const { isVisible, setIsVisible } = use(PasswordInputContext);
|
|
8
|
+
return (<button type="button" onClick={ev => {
|
|
9
|
+
setIsVisible(prev => !prev);
|
|
10
|
+
onClick?.(ev);
|
|
11
|
+
}} {...props}>
|
|
12
|
+
{children || (<AnimatePresence initial={false} mode="wait">
|
|
13
|
+
{isVisible ? (<motion.div key="visible" className="compatible-icon" initial={{ opacity: 0, y: "-25%" }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: "25%" }} transition={{ duration: 0.1 }}>
|
|
14
|
+
<EyeIcon className="size-full"/>
|
|
15
|
+
</motion.div>) : (<motion.div key="hidden" className="compatible-icon" initial={{ opacity: 0, y: "-25%" }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: "25%" }} transition={{ duration: 0.1 }}>
|
|
16
|
+
<EyeClosedIcon className="size-full"/>
|
|
17
|
+
</motion.div>)}
|
|
18
|
+
</AnimatePresence>)}
|
|
19
|
+
</button>);
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAA;AAED,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,YAAY,+BAO3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,eAAO,MAAM,QAAQ;;CAEnB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HTMLMotionProps } from "framer-motion";
|
|
2
|
+
export type ProgressBarPropsT = HTMLMotionProps<"div"> & {
|
|
3
|
+
duration?: number;
|
|
4
|
+
};
|
|
5
|
+
export declare function ProgressBar({ className, duration, children, ...p }: ProgressBarPropsT): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ProgressBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/ProgressBar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAU,MAAM,eAAe,CAAC;AAIxD,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAA;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,EAAE,iBAAiB,+BAgBrF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { use } from "react";
|
|
3
|
+
import { cn } from "kadoui-utils";
|
|
4
|
+
import { motion } from "framer-motion";
|
|
5
|
+
import { ProgressContext } from "./ProgressContext";
|
|
6
|
+
export function ProgressBar({ className, duration, children, ...p }) {
|
|
7
|
+
const { value, maxValue } = use(ProgressContext);
|
|
8
|
+
const percentage = Math.min(100, Math.max(0, (value / maxValue) * 100));
|
|
9
|
+
return (<motion.div className={cn("f-center h-full bg-palette text-brush max-w-full", className)} initial={{ width: 0 }} whileInView={{ width: `${percentage}%` }} transition={{ duration: duration || 3 }} {...p}>
|
|
10
|
+
{children || <span className="text-xs">{percentage}%</span>}
|
|
11
|
+
</motion.div>);
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressContext.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/ProgressContext.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAA;AAED,eAAO,MAAM,eAAe,2CAA0D,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export type ProgressRootPropsT = HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
value: number;
|
|
4
|
+
maxValue?: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function ProgressRoot({ value, maxValue, className, ...p }: ProgressRootPropsT): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ProgressRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/ProgressRoot.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAA;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAc,EAAE,SAAS,EAAE,GAAG,CAAC,EAAE,EAAE,kBAAkB,+BAS1F"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "kadoui-utils";
|
|
3
|
+
import { ProgressContext } from "./ProgressContext";
|
|
4
|
+
export function ProgressRoot({ value, maxValue = 100, className, ...p }) {
|
|
5
|
+
return (<ProgressContext value={{ value, maxValue }}>
|
|
6
|
+
<div className={cn("w-full rounded-kado overflow-hidden h-6 bg-palette/10", className)} {...p}/>
|
|
7
|
+
</ProgressContext>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QRCodeRenderersOptions } from "qrcode";
|
|
2
|
+
import React, { HTMLAttributes } from "react";
|
|
3
|
+
export type QrCodePropsT = HTMLAttributes<HTMLCanvasElement> & {
|
|
4
|
+
value: string;
|
|
5
|
+
options: QRCodeRenderersOptions;
|
|
6
|
+
};
|
|
7
|
+
export declare function QrCode({ value, options, ...props }: QrCodePropsT): React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=QrCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QrCode.d.ts","sourceRoot":"","sources":["../../../src/components/QrCode/QrCode.tsx"],"names":[],"mappings":"AAEA,OAAe,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,KAAK,EAAE,EAAE,cAAc,EAAqB,MAAM,OAAO,CAAC;AAEjE,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,iBAAiB,CAAC,GAAG;IAC7D,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,sBAAsB,CAAC;CACjC,CAAA;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,qBAWhE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import QRCode from "qrcode";
|
|
3
|
+
import React, { useEffect, useRef } from "react";
|
|
4
|
+
export function QrCode({ value, options, ...props }) {
|
|
5
|
+
const canvasRef = useRef(null);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
console.log(value);
|
|
8
|
+
QRCode.toCanvas(canvasRef.current, value, options, function (error) {
|
|
9
|
+
if (error)
|
|
10
|
+
console.error(error);
|
|
11
|
+
});
|
|
12
|
+
}, [value, options]);
|
|
13
|
+
return <canvas ref={canvasRef} {...props}/>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rating.d.ts","sourceRoot":"","sources":["../../../src/components/Rating/Rating.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,eAAO,MAAM,MAAM;;CAEjB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from "react";
|
|
2
|
+
export type RatingContextT = {
|
|
3
|
+
hoverValue: number | null;
|
|
4
|
+
setHoverValue: Dispatch<SetStateAction<number | null>>;
|
|
5
|
+
};
|
|
6
|
+
export declare const RatingContext: import("react").Context<RatingContextT>;
|
|
7
|
+
//# sourceMappingURL=RatingContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RatingContext.d.ts","sourceRoot":"","sources":["../../../src/components/Rating/RatingContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEhE,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;CACxD,CAAA;AAED,eAAO,MAAM,aAAa,yCAAsD,CAAC"}
|