@kadoui/react 1.0.0 → 1.1.2
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 +1 -0
- package/dist/components/AccessNavigation/AccessNavigation.d.ts.map +1 -1
- package/dist/components/AccessNavigation/AccessNavigation.jsx +1 -1
- package/dist/components/Accordion/AccordionBody.d.ts +1 -1
- package/dist/components/Accordion/AccordionBody.d.ts.map +1 -1
- package/dist/components/Accordion/AccordionBody.jsx +3 -6
- package/dist/components/Accordion/AccordionToggle.d.ts +1 -1
- package/dist/components/Accordion/AccordionToggle.d.ts.map +1 -1
- package/dist/components/Accordion/AccordionToggle.jsx +3 -8
- package/dist/components/Affix/Affix.d.ts +1 -1
- package/dist/components/Affix/Affix.d.ts.map +1 -1
- package/dist/components/Affix/Affix.jsx +3 -6
- package/dist/components/Breadcrumbs/BreadcrumbsItem.d.ts +1 -1
- package/dist/components/Breadcrumbs/BreadcrumbsItem.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/BreadcrumbsItem.jsx +2 -3
- package/dist/components/Breadcrumbs/BreadcrumbsRoot.d.ts +1 -1
- package/dist/components/Breadcrumbs/BreadcrumbsRoot.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/BreadcrumbsRoot.jsx +2 -3
- package/dist/components/Carousel/Carousel.d.ts +4 -0
- package/dist/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.js +5 -1
- package/dist/components/Carousel/CarouselContainer.d.ts +1 -1
- package/dist/components/Carousel/CarouselContainer.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselContainer.jsx +2 -3
- package/dist/components/Carousel/CarouselContext.d.ts +2 -0
- package/dist/components/Carousel/CarouselContext.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselLeftFade.d.ts +5 -0
- package/dist/components/Carousel/CarouselLeftFade.d.ts.map +1 -0
- package/dist/components/Carousel/CarouselLeftFade.jsx +10 -0
- package/dist/components/Carousel/CarouselRightFade.d.ts +5 -0
- package/dist/components/Carousel/CarouselRightFade.d.ts.map +1 -0
- package/dist/components/Carousel/CarouselRightFade.jsx +10 -0
- package/dist/components/Carousel/CarouselRoot.d.ts +1 -1
- package/dist/components/Carousel/CarouselRoot.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselRoot.jsx +3 -16
- package/dist/components/Clipboard/Clipboard.d.ts +3 -2
- package/dist/components/Clipboard/Clipboard.d.ts.map +1 -1
- package/dist/components/Clipboard/Clipboard.jsx +2 -5
- package/dist/components/ContextMenu/ContextMenuContent.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuContent.jsx +3 -2
- package/dist/components/ContextMenu/ContextMenuRoot.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuRoot.jsx +1 -1
- package/dist/components/Drawer/DrawerBody.d.ts +1 -1
- package/dist/components/Drawer/DrawerBody.d.ts.map +1 -1
- package/dist/components/Drawer/DrawerBody.jsx +3 -4
- package/dist/components/Drawer/DrawerPortal.d.ts +1 -1
- package/dist/components/Drawer/DrawerPortal.d.ts.map +1 -1
- package/dist/components/Drawer/DrawerPortal.jsx +2 -3
- package/dist/components/Drawer/DrawerRoot.jsx +1 -1
- package/dist/components/Dropdown/DropdownMenu.d.ts +1 -1
- package/dist/components/Dropdown/DropdownMenu.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownMenu.jsx +2 -3
- package/dist/components/Dropdown/DropdownRoot.d.ts +1 -1
- package/dist/components/Dropdown/DropdownRoot.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownRoot.jsx +4 -6
- package/dist/components/LoaderLink/LoaderLink.d.ts +6 -0
- package/dist/components/LoaderLink/LoaderLink.d.ts.map +1 -0
- package/dist/components/LoaderLink/LoaderLink.jsx +6 -0
- package/dist/components/Modal/Modal.d.ts +3 -3
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/Modal/ModalBody.d.ts +3 -3
- package/dist/components/Modal/ModalBody.d.ts.map +1 -1
- package/dist/components/Modal/ModalBody.jsx +20 -5
- package/dist/components/Modal/ModalContent.d.ts +3 -3
- package/dist/components/Modal/ModalContent.d.ts.map +1 -1
- package/dist/components/Modal/ModalContent.jsx +2 -21
- package/dist/components/Modal/ModalHeader.d.ts +1 -1
- package/dist/components/Modal/ModalHeader.d.ts.map +1 -1
- package/dist/components/Modal/ModalHeader.jsx +2 -3
- package/dist/components/Modal/ModalPortal.d.ts +1 -1
- package/dist/components/Modal/ModalPortal.d.ts.map +1 -1
- package/dist/components/Modal/ModalPortal.jsx +2 -3
- package/dist/components/Modal/ModalRoot.d.ts.map +1 -1
- package/dist/components/Modal/ModalRoot.jsx +1 -1
- package/dist/components/Otp/OtpInputs.d.ts +1 -1
- package/dist/components/Otp/OtpInputs.d.ts.map +1 -1
- package/dist/components/Otp/OtpInputs.jsx +2 -3
- package/dist/components/Otp/OtpRoot.d.ts +1 -1
- package/dist/components/Otp/OtpRoot.d.ts.map +1 -1
- package/dist/components/Otp/OtpRoot.jsx +2 -3
- package/dist/components/Pagination/PaginationNextBtn.d.ts +1 -1
- package/dist/components/Pagination/PaginationNextBtn.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationNextBtn.jsx +2 -5
- package/dist/components/Pagination/PaginationPrevBtn.d.ts +1 -1
- package/dist/components/Pagination/PaginationPrevBtn.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationPrevBtn.jsx +2 -5
- package/dist/components/PasswordInput/PasswordInputToggle.d.ts +5 -3
- package/dist/components/PasswordInput/PasswordInputToggle.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInputToggle.jsx +2 -10
- package/dist/components/Progress/ProgressBar.d.ts +1 -1
- package/dist/components/Progress/ProgressBar.d.ts.map +1 -1
- package/dist/components/Progress/ProgressBar.jsx +2 -3
- package/dist/components/Progress/ProgressRoot.d.ts +1 -1
- package/dist/components/Progress/ProgressRoot.d.ts.map +1 -1
- package/dist/components/Progress/ProgressRoot.jsx +2 -3
- package/dist/components/Rating/Rating.d.ts +1 -1
- package/dist/components/Rating/RatingItems.d.ts +3 -3
- package/dist/components/Rating/RatingItems.d.ts.map +1 -1
- package/dist/components/Rating/RatingItems.jsx +3 -7
- package/dist/components/Rating/RatingRoot.d.ts +1 -1
- package/dist/components/Rating/RatingRoot.d.ts.map +1 -1
- package/dist/components/Rating/RatingRoot.jsx +2 -3
- package/dist/components/Sheet/Sheet.d.ts.map +1 -1
- package/dist/components/Sheet/SheetBody.d.ts +1 -1
- package/dist/components/Sheet/SheetBody.d.ts.map +1 -1
- package/dist/components/Sheet/SheetBody.jsx +5 -6
- package/dist/components/Sheet/SheetContent.d.ts +1 -1
- package/dist/components/Sheet/SheetContent.d.ts.map +1 -1
- package/dist/components/Sheet/SheetContent.jsx +2 -3
- package/dist/components/Sheet/SheetContext.d.ts +1 -2
- package/dist/components/Sheet/SheetContext.d.ts.map +1 -1
- package/dist/components/Sheet/SheetHeader.d.ts +1 -1
- package/dist/components/Sheet/SheetHeader.d.ts.map +1 -1
- package/dist/components/Sheet/SheetHeader.jsx +5 -5
- package/dist/components/Sheet/SheetPortal.d.ts +1 -1
- package/dist/components/Sheet/SheetPortal.d.ts.map +1 -1
- package/dist/components/Sheet/SheetPortal.jsx +2 -3
- package/dist/components/Sheet/SheetRoot.d.ts.map +1 -1
- package/dist/components/Sheet/SheetRoot.jsx +6 -7
- package/dist/components/ShowMore/ShowMoreContent.d.ts +1 -1
- package/dist/components/ShowMore/ShowMoreContent.d.ts.map +1 -1
- package/dist/components/ShowMore/ShowMoreContent.jsx +6 -4
- package/dist/components/ShowMore/ShowMoreFade.d.ts +1 -1
- package/dist/components/ShowMore/ShowMoreFade.d.ts.map +1 -1
- package/dist/components/ShowMore/ShowMoreFade.jsx +2 -3
- package/dist/components/ShowMore/ShowMoreRoot.d.ts +1 -1
- package/dist/components/ShowMore/ShowMoreRoot.d.ts.map +1 -1
- package/dist/components/ShowMore/ShowMoreRoot.jsx +2 -3
- package/dist/components/ShowMore/ShowMoreTrigger.d.ts +1 -1
- package/dist/components/ShowMore/ShowMoreTrigger.d.ts.map +1 -1
- package/dist/components/ShowMore/ShowMoreTrigger.jsx +5 -3
- package/dist/components/Slide/Slide.d.ts +2 -2
- package/dist/components/Slide/Slide.d.ts.map +1 -1
- package/dist/components/Slide/Slide.js +2 -2
- package/dist/components/Slide/SlideBody.d.ts +4 -0
- package/dist/components/Slide/SlideBody.d.ts.map +1 -0
- package/dist/components/Slide/SlideBody.jsx +3 -0
- package/dist/components/Slide/SlideHeader.d.ts +1 -1
- package/dist/components/Slide/SlideHeader.d.ts.map +1 -1
- package/dist/components/Slide/SlideHeader.jsx +2 -3
- package/dist/components/Slide/SlidePortal.d.ts.map +1 -1
- package/dist/components/Slide/SlidePortal.jsx +2 -2
- package/dist/components/Slide/SlideRoot.d.ts +4 -2
- package/dist/components/Slide/SlideRoot.d.ts.map +1 -1
- package/dist/components/Slide/SlideRoot.jsx +12 -7
- package/dist/components/Spoiler/Spoiler.d.ts +4 -4
- package/dist/components/Spoiler/Spoiler.d.ts.map +1 -1
- package/dist/components/Spoiler/Spoiler.js +5 -0
- package/dist/components/Spoiler/SpoilerBlur.d.ts +4 -0
- package/dist/components/Spoiler/SpoilerBlur.d.ts.map +1 -0
- package/dist/components/Spoiler/SpoilerBlur.jsx +8 -0
- package/dist/components/Spoiler/SpoilerContext.d.ts +7 -0
- package/dist/components/Spoiler/SpoilerContext.d.ts.map +1 -0
- package/dist/components/Spoiler/SpoilerContext.js +2 -0
- package/dist/components/Spoiler/SpoilerRoot.d.ts +4 -0
- package/dist/components/Spoiler/SpoilerRoot.d.ts.map +1 -0
- package/dist/components/Spoiler/SpoilerRoot.jsx +10 -0
- package/dist/components/Steps/Steps.d.ts +6 -3
- package/dist/components/Steps/Steps.d.ts.map +1 -1
- package/dist/components/Steps/Steps.js +4 -2
- package/dist/components/Steps/StepsContext.d.ts.map +1 -1
- package/dist/components/Steps/StepsContext.js +2 -0
- package/dist/components/Steps/StepsControls.jsx +1 -1
- package/dist/components/Steps/StepsIndexBtn.d.ts +6 -0
- package/dist/components/Steps/StepsIndexBtn.d.ts.map +1 -0
- package/dist/components/Steps/StepsIndexBtn.jsx +10 -0
- package/dist/components/Steps/StepsNextBtn.d.ts +1 -1
- package/dist/components/Steps/StepsNextBtn.d.ts.map +1 -1
- package/dist/components/Steps/StepsNextBtn.jsx +2 -5
- package/dist/components/Steps/StepsPrevBtn.d.ts +1 -1
- package/dist/components/Steps/StepsPrevBtn.d.ts.map +1 -1
- package/dist/components/Steps/StepsPrevBtn.jsx +2 -5
- package/dist/components/Steps/StepsRender.d.ts +2 -0
- package/dist/components/Steps/StepsRender.d.ts.map +1 -0
- package/dist/components/Steps/StepsRender.jsx +7 -0
- package/dist/components/Tabs/TabsList.d.ts +1 -1
- package/dist/components/Tabs/TabsList.d.ts.map +1 -1
- package/dist/components/Tabs/TabsList.jsx +2 -3
- package/dist/components/Tabs/TabsPanel.d.ts +1 -1
- package/dist/components/Tabs/TabsPanel.d.ts.map +1 -1
- package/dist/components/Tabs/TabsPanel.jsx +2 -3
- package/dist/components/Toast/ToastBox.jsx +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/utils/browser.d.ts +3 -0
- package/dist/utils/browser.d.ts.map +1 -0
- package/dist/utils/browser.js +21 -0
- package/dist/utils/cn.d.ts +3 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +3 -0
- package/dist/utils/form.d.ts +2 -0
- package/dist/utils/form.d.ts.map +1 -0
- package/dist/utils/form.js +8 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +3 -0
- package/package.json +6 -4
- package/dist/components/LinkLoader/LinkLoader.d.ts +0 -6
- package/dist/components/LinkLoader/LinkLoader.d.ts.map +0 -1
- package/dist/components/LinkLoader/LinkLoader.jsx +0 -8
- package/dist/components/Slide/SlideContent.d.ts +0 -4
- package/dist/components/Slide/SlideContent.d.ts.map +0 -1
- package/dist/components/Slide/SlideContent.jsx +0 -4
- package/dist/components/Spoiler/Spoiler.jsx +0 -11
- package/src/components/AccessNavigation/AccessNavigation.tsx +0 -46
- package/src/components/Accordion/Accordion.ts +0 -8
- package/src/components/Accordion/AccordionBody.tsx +0 -31
- package/src/components/Accordion/AccordionContext.ts +0 -8
- package/src/components/Accordion/AccordionRoot.tsx +0 -17
- package/src/components/Accordion/AccordionToggle.tsx +0 -29
- package/src/components/Affix/Affix.tsx +0 -59
- package/src/components/Breadcrumbs/Breadcrumbs.ts +0 -6
- package/src/components/Breadcrumbs/BreadcrumbsContext.ts +0 -7
- package/src/components/Breadcrumbs/BreadcrumbsItem.tsx +0 -24
- package/src/components/Breadcrumbs/BreadcrumbsRoot.tsx +0 -21
- package/src/components/Carousel/Carousel.ts +0 -6
- package/src/components/Carousel/CarouselContainer.tsx +0 -18
- package/src/components/Carousel/CarouselContext.ts +0 -7
- package/src/components/Carousel/CarouselRoot.tsx +0 -75
- package/src/components/ClientOnly/ClientOnly.tsx +0 -12
- package/src/components/Clipboard/Clipboard.tsx +0 -36
- package/src/components/ContextMenu/ContextMenu.ts +0 -6
- package/src/components/ContextMenu/ContextMenuContent.tsx +0 -51
- package/src/components/ContextMenu/ContextMenuContext.ts +0 -9
- package/src/components/ContextMenu/ContextMenuRoot.tsx +0 -79
- package/src/components/Drawer/Drawer.ts +0 -10
- package/src/components/Drawer/DrawerBody.tsx +0 -67
- package/src/components/Drawer/DrawerContext.ts +0 -8
- package/src/components/Drawer/DrawerPortal.tsx +0 -40
- package/src/components/Drawer/DrawerRoot.tsx +0 -45
- package/src/components/Drawer/DrawerToggle.tsx +0 -21
- package/src/components/Dropdown/Dropdown.ts +0 -8
- package/src/components/Dropdown/DropdownContext.ts +0 -10
- package/src/components/Dropdown/DropdownMenu.tsx +0 -34
- package/src/components/Dropdown/DropdownRoot.tsx +0 -90
- package/src/components/Dropdown/DropdownToggle.tsx +0 -23
- package/src/components/LinkLoader/LinkLoader.tsx +0 -16
- package/src/components/Modal/Modal.ts +0 -14
- package/src/components/Modal/ModalBody.tsx +0 -12
- package/src/components/Modal/ModalContent.tsx +0 -44
- package/src/components/Modal/ModalContext.ts +0 -8
- package/src/components/Modal/ModalHeader.tsx +0 -10
- package/src/components/Modal/ModalPortal.tsx +0 -40
- package/src/components/Modal/ModalRoot.tsx +0 -47
- package/src/components/Modal/ModalTrigger.tsx +0 -21
- package/src/components/Otp/Otp.ts +0 -8
- package/src/components/Otp/OtpContext.ts +0 -10
- package/src/components/Otp/OtpHiddenInput.tsx +0 -15
- package/src/components/Otp/OtpInputs.tsx +0 -86
- package/src/components/Otp/OtpRoot.tsx +0 -26
- package/src/components/Pagination/Pagination.ts +0 -15
- package/src/components/Pagination/PaginationContext.tsx +0 -10
- package/src/components/Pagination/PaginationCounts.tsx +0 -17
- package/src/components/Pagination/PaginationNextBtn.tsx +0 -27
- package/src/components/Pagination/PaginationPrevBtn.tsx +0 -27
- package/src/components/Pagination/PaginationSearchParamsRoot.tsx +0 -45
- package/src/components/Pagination/PaginationStateRoot.tsx +0 -23
- package/src/components/PasswordInput/PasswordInput.ts +0 -8
- package/src/components/PasswordInput/PasswordInputContext.tsx +0 -8
- package/src/components/PasswordInput/PasswordInputField.tsx +0 -15
- package/src/components/PasswordInput/PasswordInputRoot.tsx +0 -17
- package/src/components/PasswordInput/PasswordInputToggle.tsx +0 -52
- package/src/components/Portal/Portal.tsx +0 -17
- package/src/components/Progress/Progress.ts +0 -6
- package/src/components/Progress/ProgressBar.tsx +0 -29
- package/src/components/Progress/ProgressContext.ts +0 -8
- package/src/components/Progress/ProgressRoot.tsx +0 -22
- package/src/components/QrCode/QrCode.tsx +0 -22
- package/src/components/Rating/Rating.ts +0 -6
- package/src/components/Rating/RatingContext.ts +0 -8
- package/src/components/Rating/RatingItems.tsx +0 -50
- package/src/components/Rating/RatingRoot.tsx +0 -22
- package/src/components/Sheet/Sheet.tsx +0 -14
- package/src/components/Sheet/SheetBody.tsx +0 -49
- package/src/components/Sheet/SheetContent.tsx +0 -8
- package/src/components/Sheet/SheetContext.ts +0 -14
- package/src/components/Sheet/SheetHeader.tsx +0 -24
- package/src/components/Sheet/SheetPortal.tsx +0 -35
- package/src/components/Sheet/SheetRoot.tsx +0 -56
- package/src/components/Sheet/SheetToggle.tsx +0 -21
- package/src/components/ShowMore/ShowMore.ts +0 -10
- package/src/components/ShowMore/ShowMoreContent.tsx +0 -31
- package/src/components/ShowMore/ShowMoreContext.ts +0 -11
- package/src/components/ShowMore/ShowMoreFade.tsx +0 -18
- package/src/components/ShowMore/ShowMoreRoot.tsx +0 -37
- package/src/components/ShowMore/ShowMoreTrigger.tsx +0 -23
- package/src/components/Slide/Slide.ts +0 -12
- package/src/components/Slide/SlideContent.tsx +0 -8
- package/src/components/Slide/SlideContext.ts +0 -11
- package/src/components/Slide/SlideHeader.tsx +0 -10
- package/src/components/Slide/SlidePortal.tsx +0 -26
- package/src/components/Slide/SlideRoot.tsx +0 -39
- package/src/components/Slide/SlideToggle.tsx +0 -21
- package/src/components/Spoiler/Spoiler.tsx +0 -28
- package/src/components/Steps/Steps.ts +0 -15
- package/src/components/Steps/StepsContext.tsx +0 -16
- package/src/components/Steps/StepsControls.tsx +0 -56
- package/src/components/Steps/StepsNextBtn.tsx +0 -27
- package/src/components/Steps/StepsPrevBtn.tsx +0 -27
- package/src/components/Steps/StepsSearchParamsRoot.tsx +0 -45
- package/src/components/Steps/StepsStateRoot.tsx +0 -23
- package/src/components/Swap/Swap.ts +0 -8
- package/src/components/Swap/SwapContext.ts +0 -9
- package/src/components/Swap/SwapItem.tsx +0 -16
- package/src/components/Swap/SwapRoot.tsx +0 -29
- package/src/components/Swap/SwapTrigger.tsx +0 -31
- package/src/components/Tabs/Tabs.ts +0 -10
- package/src/components/Tabs/TabsContext.ts +0 -11
- package/src/components/Tabs/TabsList.tsx +0 -12
- package/src/components/Tabs/TabsPanel.tsx +0 -23
- package/src/components/Tabs/TabsRoot.tsx +0 -18
- package/src/components/Tabs/TabsTab.tsx +0 -23
- package/src/components/Toast/Toast.ts +0 -3
- package/src/components/Toast/ToastBox.tsx +0 -50
- package/src/components/Toast/ToastRoot.tsx +0 -71
- package/src/components/Toast/toastStore.ts +0 -22
- package/src/components/Toggle/Toggle.ts +0 -6
- package/src/components/Toggle/ToggleContext.ts +0 -9
- package/src/components/Toggle/ToggleRoot.tsx +0 -26
- package/src/components/Toggle/ToggleSwitch.tsx +0 -41
- package/src/index.ts +0 -28
- /package/dist/components/Sheet/{Sheet.jsx → Sheet.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepsRender.d.ts","sourceRoot":"","sources":["../../../src/components/Steps/StepsRender.tsx"],"names":[],"mappings":"AAMA,wBAAgB,WAAW,8BAI1B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
2
|
export type TabsListPropsT = HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
export declare function TabsList(
|
|
3
|
+
export declare function TabsList(p: TabsListPropsT): import("react").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=TabsList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsList.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/TabsList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabsList.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/TabsList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAE5D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,cAAc,+BAEzC"}
|
|
@@ -2,5 +2,5 @@ import { HTMLAttributes } from "react";
|
|
|
2
2
|
export type TabsPanelPropsT = HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
value: string;
|
|
4
4
|
};
|
|
5
|
-
export declare function TabsPanel({ value,
|
|
5
|
+
export declare function TabsPanel({ value, ...p }: TabsPanelPropsT): import("react").JSX.Element | null;
|
|
6
6
|
//# sourceMappingURL=TabsPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/TabsPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/TabsPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAO,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC7D,KAAK,EAAE,MAAM,CAAC;CACf,CAAA;AAED,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,eAAe,sCAMzD"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "kadoui-utils";
|
|
3
2
|
import { use } from "react";
|
|
4
3
|
import { TabsContext } from "./TabsContext";
|
|
5
|
-
export function TabsPanel({ value,
|
|
4
|
+
export function TabsPanel({ value, ...p }) {
|
|
6
5
|
const { activeTab } = use(TabsContext);
|
|
7
6
|
const isActive = activeTab === value;
|
|
8
|
-
return isActive ?
|
|
7
|
+
return isActive ? <div {...p}/> : null;
|
|
9
8
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export * from "./components/Clipboard/Clipboard";
|
|
|
8
8
|
export * from "./components/ContextMenu/ContextMenu";
|
|
9
9
|
export * from "./components/Drawer/Drawer";
|
|
10
10
|
export * from "./components/Dropdown/Dropdown";
|
|
11
|
-
export * from "./components/
|
|
11
|
+
export * from "./components/LoaderLink/LoaderLink";
|
|
12
12
|
export * from "./components/Modal/Modal";
|
|
13
13
|
export * from "./components/Otp/Otp";
|
|
14
14
|
export * from "./components/Pagination/Pagination";
|
|
@@ -19,11 +19,8 @@ export * from "./components/QrCode/QrCode";
|
|
|
19
19
|
export * from "./components/Rating/Rating";
|
|
20
20
|
export * from "./components/Sheet/Sheet";
|
|
21
21
|
export * from "./components/ShowMore/ShowMore";
|
|
22
|
-
export * from "./components/Slide/Slide";
|
|
23
22
|
export * from "./components/Spoiler/Spoiler";
|
|
24
23
|
export * from "./components/Steps/Steps";
|
|
25
24
|
export * from "./components/Swap/Swap";
|
|
26
25
|
export * from "./components/Tabs/Tabs";
|
|
27
|
-
export * from "./components/Toast/Toast";
|
|
28
|
-
export * from "./components/Toggle/Toggle";
|
|
29
26
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export * from "./components/Clipboard/Clipboard";
|
|
|
8
8
|
export * from "./components/ContextMenu/ContextMenu";
|
|
9
9
|
export * from "./components/Drawer/Drawer";
|
|
10
10
|
export * from "./components/Dropdown/Dropdown";
|
|
11
|
-
export * from "./components/
|
|
11
|
+
export * from "./components/LoaderLink/LoaderLink";
|
|
12
12
|
export * from "./components/Modal/Modal";
|
|
13
13
|
export * from "./components/Otp/Otp";
|
|
14
14
|
export * from "./components/Pagination/Pagination";
|
|
@@ -19,10 +19,7 @@ export * from "./components/QrCode/QrCode";
|
|
|
19
19
|
export * from "./components/Rating/Rating";
|
|
20
20
|
export * from "./components/Sheet/Sheet";
|
|
21
21
|
export * from "./components/ShowMore/ShowMore";
|
|
22
|
-
export * from "./components/Slide/Slide";
|
|
23
22
|
export * from "./components/Spoiler/Spoiler";
|
|
24
23
|
export * from "./components/Steps/Steps";
|
|
25
24
|
export * from "./components/Swap/Swap";
|
|
26
25
|
export * from "./components/Tabs/Tabs";
|
|
27
|
-
export * from "./components/Toast/Toast";
|
|
28
|
-
export * from "./components/Toggle/Toggle";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/utils/browser.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,cAenC,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI,QAAQ,WAAW,kBAY3D,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const getBrowserScrollbarWith = () => {
|
|
2
|
+
const outer = document.createElement("div");
|
|
3
|
+
outer.style.visibility = "hidden";
|
|
4
|
+
outer.style.overflow = "scroll";
|
|
5
|
+
document.body.appendChild(outer);
|
|
6
|
+
const inner = document.createElement("div");
|
|
7
|
+
outer.appendChild(inner);
|
|
8
|
+
const scrollbarWidth = (outer.offsetWidth - inner.offsetWidth);
|
|
9
|
+
outer.parentNode?.removeChild(outer);
|
|
10
|
+
return scrollbarWidth;
|
|
11
|
+
};
|
|
12
|
+
export const selectAccessibleChildren = (parent) => {
|
|
13
|
+
const children = Array.from(parent.querySelectorAll(`
|
|
14
|
+
a:not([tabindex="-1"]),
|
|
15
|
+
input:not([disabled],[tabindex="-1"]),
|
|
16
|
+
select:not([disabled],[tabindex="-1"]),
|
|
17
|
+
textarea:not([disabled],[tabindex="-1"]),
|
|
18
|
+
button:not([disabled],[tabindex="-1"])
|
|
19
|
+
`));
|
|
20
|
+
return children;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAE7C,eAAO,MAAM,EAAE,GAAI,GAAG,QAAQ,UAAU,EAAE,WAA0B,CAAC"}
|
package/dist/utils/cn.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/utils/form.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,WAUvD,CAAA"}
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
|
package/dist/utils.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kadoui/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Kadoui primitive components for React",
|
|
5
5
|
"author": "Jstation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"build": "tsc"
|
|
10
10
|
},
|
|
11
11
|
"exports": {
|
|
12
|
-
".": "./dist/index.js"
|
|
12
|
+
".": "./dist/index.js",
|
|
13
|
+
"./utils": "./dist/utils.js"
|
|
13
14
|
},
|
|
14
15
|
"keywords": [
|
|
15
16
|
"@kadoui/react",
|
|
@@ -21,7 +22,6 @@
|
|
|
21
22
|
"component"
|
|
22
23
|
],
|
|
23
24
|
"dependencies": {
|
|
24
|
-
"@kadoui/utils": "workspace:*",
|
|
25
25
|
"react": "19.1.0",
|
|
26
26
|
"react-dom": "19.1.0",
|
|
27
27
|
"next": "15.4.5",
|
|
@@ -30,7 +30,9 @@
|
|
|
30
30
|
"lucide-react": "^0.525.0",
|
|
31
31
|
"qrcode": "^1.5.4",
|
|
32
32
|
"zustand": "^5.0.6",
|
|
33
|
-
"nanoid": "^5.1.5"
|
|
33
|
+
"nanoid": "^5.1.5",
|
|
34
|
+
"clsx": "^2.1.1",
|
|
35
|
+
"tailwind-merge": "^3.3.1"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
38
|
"@repo/tsconfig": "workspace:*",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from "react";
|
|
2
|
-
export type LinkLoaderPropsT = PropsWithChildren & {
|
|
3
|
-
className?: string;
|
|
4
|
-
};
|
|
5
|
-
export declare function LinkLoader({ children, className }: LinkLoaderPropsT): string | number | bigint | boolean | import("react").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | null | undefined;
|
|
6
|
-
//# sourceMappingURL=LinkLoader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkLoader.d.ts","sourceRoot":"","sources":["../../../src/components/LinkLoader/LinkLoader.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAA;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,gBAAgB,+VAInE"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { cn } from "kadoui-utils";
|
|
3
|
-
import { LoaderIcon } from "lucide-react";
|
|
4
|
-
import { useLinkStatus } from "next/link";
|
|
5
|
-
export function LinkLoader({ children, className }) {
|
|
6
|
-
const { pending } = useLinkStatus();
|
|
7
|
-
return pending ? <LoaderIcon className={cn("compatible-icon animate-spin", className)}/> : children;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SlideContent.d.ts","sourceRoot":"","sources":["../../../src/components/Slide/SlideContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEhE,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BAEvE"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { cn } from "kadoui-utils";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
export function Spoiler({ children, className }) {
|
|
5
|
-
const [revealed, setRevealed] = useState(false);
|
|
6
|
-
return (<span onClick={() => setRevealed(true)} className={cn("transition-all", revealed ? "" : "inline cursor-pointer rounded overflow-hidden px-1", className)}>
|
|
7
|
-
<span className={`transition-all ${revealed ? "" : "select-none blur-[3px]"}`}>
|
|
8
|
-
{children}
|
|
9
|
-
</span>
|
|
10
|
-
</span>);
|
|
11
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { HTMLAttributes, KeyboardEvent } from "react";
|
|
4
|
-
import { selectAccessibleChildren } from "@kadoui/utils";
|
|
5
|
-
|
|
6
|
-
export type AccessNavigationPropsT = HTMLAttributes<HTMLDivElement> & {
|
|
7
|
-
direction?: "y" | "x";
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export function AccessNavigation({ direction = "y", dir, onKeyDown, ...p }: AccessNavigationPropsT) {
|
|
11
|
-
const handleKeyDown = (ev: KeyboardEvent<HTMLDivElement>) => {
|
|
12
|
-
const focusableChildren = selectAccessibleChildren(ev.currentTarget);
|
|
13
|
-
|
|
14
|
-
if (!focusableChildren.length) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const currentDir: "ltr" | "rtl" = (dir || document.documentElement.getAttribute("dir") || "ltr") as ("ltr" | "rtl");
|
|
19
|
-
|
|
20
|
-
const currentIndex = focusableChildren.findIndex((item) => item === document.activeElement);
|
|
21
|
-
|
|
22
|
-
if (ev.key === (direction === "y" ? "ArrowDown" : (currentDir === "ltr" ? "ArrowRight" : "ArrowLeft"))) {
|
|
23
|
-
ev.preventDefault();
|
|
24
|
-
const nextIndex =
|
|
25
|
-
currentIndex === -1 || currentIndex === focusableChildren.length - 1 ? 0 : currentIndex + 1;
|
|
26
|
-
focusableChildren[nextIndex]?.focus();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (ev.key === (direction === "y" ? "ArrowUp" : (currentDir === "ltr" ? "ArrowLeft" : "ArrowRight"))) {
|
|
30
|
-
ev.preventDefault();
|
|
31
|
-
const prevIndex = currentIndex <= 0 ? focusableChildren.length - 1 : currentIndex - 1;
|
|
32
|
-
focusableChildren[prevIndex]?.focus();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<div
|
|
38
|
-
dir={dir}
|
|
39
|
-
onKeyDown={ev => {
|
|
40
|
-
onKeyDown?.(ev);
|
|
41
|
-
handleKeyDown(ev);
|
|
42
|
-
}}
|
|
43
|
-
{...p}
|
|
44
|
-
/>
|
|
45
|
-
)
|
|
46
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AccordionBody } from "./AccordionBody";
|
|
2
|
-
import { AccordionRoot } from "./AccordionRoot";
|
|
3
|
-
import { AccordionToggle } from "./AccordionToggle";
|
|
4
|
-
|
|
5
|
-
export const Accordion = Object.assign(AccordionRoot, {
|
|
6
|
-
Toggle: AccordionToggle,
|
|
7
|
-
Body: AccordionBody
|
|
8
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@kadoui/utils";
|
|
4
|
-
import { ReactNode, use } from "react";
|
|
5
|
-
import { AnimatePresence, HTMLMotionProps, motion } from "framer-motion";
|
|
6
|
-
|
|
7
|
-
import { AccordionContext } from "./AccordionContext";
|
|
8
|
-
|
|
9
|
-
export type AccordionBodyPropsT = HTMLMotionProps<"div">;
|
|
10
|
-
|
|
11
|
-
export function AccordionBody({ children, className, ...props }: AccordionBodyPropsT) {
|
|
12
|
-
const { isOpen } = use(AccordionContext);
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<AnimatePresence>
|
|
16
|
-
{isOpen ?
|
|
17
|
-
<motion.div
|
|
18
|
-
className={cn("overflow-hidden", className)}
|
|
19
|
-
initial={{ height: 0, opacity: 0 }}
|
|
20
|
-
animate={{ height: "auto", opacity: 1 }}
|
|
21
|
-
exit={{ height: 0, opacity: 0 }}
|
|
22
|
-
{...props}
|
|
23
|
-
>
|
|
24
|
-
<div className="m-3">
|
|
25
|
-
{children as ReactNode}
|
|
26
|
-
</div>
|
|
27
|
-
</motion.div>
|
|
28
|
-
: null}
|
|
29
|
-
</AnimatePresence>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { PropsWithChildren, useState } from "react";
|
|
4
|
-
|
|
5
|
-
import { AccordionContext } from "./AccordionContext";
|
|
6
|
-
|
|
7
|
-
export type AccordionRootPropsT = PropsWithChildren;
|
|
8
|
-
|
|
9
|
-
export function AccordionRoot({ children }: AccordionRootPropsT) {
|
|
10
|
-
const [isOpen, setOpen] = useState(false);
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<AccordionContext value={{ isOpen, setOpen }}>
|
|
14
|
-
{children}
|
|
15
|
-
</AccordionContext>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { ChevronRightIcon } from "lucide-react";
|
|
4
|
-
import { HTMLAttributes, ReactNode, use } from "react";
|
|
5
|
-
|
|
6
|
-
import { AccordionContext } from "./AccordionContext";
|
|
7
|
-
|
|
8
|
-
export type AccordionTogglePropsT = HTMLAttributes<HTMLButtonElement> & {
|
|
9
|
-
icon?: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function AccordionToggle({ icon, children, onClick, ...props }: AccordionTogglePropsT) {
|
|
13
|
-
const { isOpen, setOpen } = use(AccordionContext);
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<button
|
|
17
|
-
onClick={ev => {
|
|
18
|
-
onClick?.(ev)
|
|
19
|
-
setOpen(prev => !prev)
|
|
20
|
-
}}
|
|
21
|
-
{...props}
|
|
22
|
-
>
|
|
23
|
-
<span className={`transition-transform ${isOpen ? "rotate-90" : ""}`}>
|
|
24
|
-
{icon || <ChevronRightIcon className="compatible-icon" />}
|
|
25
|
-
</span>
|
|
26
|
-
{children}
|
|
27
|
-
</button>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@kadoui/utils";
|
|
4
|
-
import { ChevronUpIcon } from "lucide-react";
|
|
5
|
-
import { useState, useEffect, HTMLAttributes } from "react";
|
|
6
|
-
|
|
7
|
-
export type AffixPropsT = HTMLAttributes<HTMLButtonElement>
|
|
8
|
-
|
|
9
|
-
export const Affix = ({ className, onClick, "aria-label": ariaLabel, children, ...props }: AffixPropsT) => {
|
|
10
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
11
|
-
const [lastScrollY, setLastScrollY] = useState(0);
|
|
12
|
-
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
const handleScroll = () => {
|
|
15
|
-
const currentScrollY = window.scrollY;
|
|
16
|
-
const viewportHeight = window.innerHeight;
|
|
17
|
-
const scrollThreshold = viewportHeight * 0.5;
|
|
18
|
-
|
|
19
|
-
if (currentScrollY > scrollThreshold && currentScrollY > lastScrollY) {
|
|
20
|
-
setIsVisible(true);
|
|
21
|
-
} else if (currentScrollY < lastScrollY && currentScrollY < scrollThreshold) {
|
|
22
|
-
setIsVisible(false);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
setLastScrollY(currentScrollY);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
window.addEventListener("scroll", handleScroll, {
|
|
29
|
-
passive: true
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
return () => window.removeEventListener("scroll", handleScroll);
|
|
33
|
-
}, [lastScrollY]);
|
|
34
|
-
|
|
35
|
-
const scrollToTop = () => {
|
|
36
|
-
window.scrollTo({
|
|
37
|
-
top: 0,
|
|
38
|
-
behavior: "smooth"
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<button
|
|
44
|
-
onClick={ev => {
|
|
45
|
-
onClick?.(ev)
|
|
46
|
-
scrollToTop()
|
|
47
|
-
}}
|
|
48
|
-
aria-label={ariaLabel || "Scroll to top"}
|
|
49
|
-
className={cn(
|
|
50
|
-
"fixed bottom-3 right-4 transition-all z-50",
|
|
51
|
-
isVisible ? "" : "opacity-0 translate-y-3 pointer-events-none",
|
|
52
|
-
className
|
|
53
|
-
)}
|
|
54
|
-
{...props}
|
|
55
|
-
>
|
|
56
|
-
{children || <ChevronUpIcon className="compatible-icon" />}
|
|
57
|
-
</button>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import { cn } from "@kadoui/utils";
|
|
4
|
-
import { type HTMLAttributes, use } from "react";
|
|
5
|
-
|
|
6
|
-
import { BreadcrumbsContext } from "./BreadcrumbsContext";
|
|
7
|
-
|
|
8
|
-
export type BreadcrumbsItemPropsT = HTMLAttributes<HTMLDivElement> & {
|
|
9
|
-
isLast?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function BreadcrumbsItem({ isLast = false, className, children, ...p }: BreadcrumbsItemPropsT) {
|
|
13
|
-
const { separator } = use(BreadcrumbsContext);
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<div
|
|
17
|
-
className={cn("f-center gap-1.5", className)}
|
|
18
|
-
{...p}
|
|
19
|
-
>
|
|
20
|
-
{children}
|
|
21
|
-
{!isLast && separator}
|
|
22
|
-
</div>
|
|
23
|
-
)
|
|
24
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import { cn } from "@kadoui/utils";
|
|
4
|
-
import type { HTMLAttributes, ReactNode } from "react";
|
|
5
|
-
|
|
6
|
-
import { BreadcrumbsContext } from "./BreadcrumbsContext";
|
|
7
|
-
|
|
8
|
-
export type BreadcrumbsRootPropsT = HTMLAttributes<HTMLElement> & {
|
|
9
|
-
separator?: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function BreadcrumbsRoot({ separator = "/", className, ...p }: BreadcrumbsRootPropsT) {
|
|
13
|
-
return (
|
|
14
|
-
<BreadcrumbsContext value={{ separator }}>
|
|
15
|
-
<nav
|
|
16
|
-
className={cn("f-align gap-3", className)}
|
|
17
|
-
{...p}
|
|
18
|
-
/>
|
|
19
|
-
</BreadcrumbsContext>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@kadoui/utils";
|
|
4
|
-
import { HTMLAttributes, use } from "react";
|
|
5
|
-
|
|
6
|
-
import { CarouselContext } from "./CarouselContext";
|
|
7
|
-
|
|
8
|
-
export type CarouselContainerPropsT = HTMLAttributes<HTMLDivElement>;
|
|
9
|
-
|
|
10
|
-
export function CarouselContainer({ children, className, ...p }: CarouselContainerPropsT) {
|
|
11
|
-
const { scrollRef } = use(CarouselContext);
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<div ref={scrollRef} className={cn("f-align-scroll", className)} {...p}>
|
|
15
|
-
{children}
|
|
16
|
-
</div>
|
|
17
|
-
);
|
|
18
|
-
}
|