@kadoui/react 1.0.1 → 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/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 -3
- 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 -7
- 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.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 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -9
- package/dist/utils.d.ts +4 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +3 -0
- package/package.json +3 -2
- 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/dist/components/Sheet/{Sheet.jsx → Sheet.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { selectAccessibleChildren } from "../../utils
|
|
2
|
+
import { selectAccessibleChildren } from "../../utils";
|
|
3
3
|
export function AccessNavigation({ direction = "y", dir, onKeyDown, ...p }) {
|
|
4
4
|
const handleKeyDown = (ev) => {
|
|
5
5
|
const focusableChildren = selectAccessibleChildren(ev.currentTarget);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HTMLMotionProps } from "framer-motion";
|
|
2
2
|
export type AccordionBodyPropsT = HTMLMotionProps<"div">;
|
|
3
|
-
export declare function AccordionBody({ children,
|
|
3
|
+
export declare function AccordionBody({ children, ...props }: AccordionBodyPropsT): import("react").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=AccordionBody.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionBody.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionBody.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AccordionBody.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionBody.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAmB,eAAe,EAAU,MAAM,eAAe,CAAC;AAIzE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;AAEzD,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,+BAiBxE"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../utils/cn";
|
|
3
2
|
import { use } from "react";
|
|
4
3
|
import { AnimatePresence, motion } from "framer-motion";
|
|
5
4
|
import { AccordionContext } from "./AccordionContext";
|
|
6
|
-
export function AccordionBody({ children,
|
|
5
|
+
export function AccordionBody({ children, ...props }) {
|
|
7
6
|
const { isOpen } = use(AccordionContext);
|
|
8
7
|
return (<AnimatePresence>
|
|
9
8
|
{isOpen ?
|
|
10
|
-
<motion.div
|
|
11
|
-
|
|
12
|
-
{children}
|
|
13
|
-
</div>
|
|
9
|
+
<motion.div initial={{ height: 0, opacity: 0 }} animate={{ height: "auto", opacity: 1 }} exit={{ height: 0, opacity: 0 }} {...props}>
|
|
10
|
+
{children}
|
|
14
11
|
</motion.div>
|
|
15
12
|
: null}
|
|
16
13
|
</AnimatePresence>);
|
|
@@ -2,5 +2,5 @@ import { HTMLAttributes, ReactNode } from "react";
|
|
|
2
2
|
export type AccordionTogglePropsT = HTMLAttributes<HTMLButtonElement> & {
|
|
3
3
|
icon?: ReactNode;
|
|
4
4
|
};
|
|
5
|
-
export declare function AccordionToggle({
|
|
5
|
+
export declare function AccordionToggle({ className, onClick, ...props }: AccordionTogglePropsT): import("react").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=AccordionToggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionToggle.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionToggle.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AccordionToggle.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionToggle.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAO,MAAM,OAAO,CAAC;AAKvD,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,iBAAiB,CAAC,GAAG;IACtE,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,+BAgBtF"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ChevronRightIcon } from "lucide-react";
|
|
3
2
|
import { use } from "react";
|
|
3
|
+
import { cn } from "../../utils";
|
|
4
4
|
import { AccordionContext } from "./AccordionContext";
|
|
5
|
-
export function AccordionToggle({
|
|
5
|
+
export function AccordionToggle({ className, onClick, ...props }) {
|
|
6
6
|
const { isOpen, setOpen } = use(AccordionContext);
|
|
7
7
|
return (<button onClick={ev => {
|
|
8
8
|
onClick?.(ev);
|
|
9
9
|
setOpen(prev => !prev);
|
|
10
|
-
}} {...props}
|
|
11
|
-
<span className={`transition-transform ${isOpen ? "rotate-90" : ""}`}>
|
|
12
|
-
{icon || <ChevronRightIcon className="compatible-icon"/>}
|
|
13
|
-
</span>
|
|
14
|
-
{children}
|
|
15
|
-
</button>);
|
|
10
|
+
}} className={cn(isOpen ? "accordion-active" : null, className)} {...props}/>);
|
|
16
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
2
|
export type AffixPropsT = HTMLAttributes<HTMLButtonElement>;
|
|
3
|
-
export declare const Affix: ({ className, onClick,
|
|
3
|
+
export declare const Affix: ({ className, onClick, ...p }: AffixPropsT) => import("react").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=Affix.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Affix.d.ts","sourceRoot":"","sources":["../../../src/components/Affix/Affix.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Affix.d.ts","sourceRoot":"","sources":["../../../src/components/Affix/Affix.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuB,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5D,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,KAAK,GAAI,8BAA8B,WAAW,gCA8C9D,CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../utils/cn";
|
|
3
|
-
import { ChevronUpIcon } from "lucide-react";
|
|
4
2
|
import { useState, useEffect } from "react";
|
|
5
|
-
|
|
3
|
+
import { cn } from "../../utils";
|
|
4
|
+
export const Affix = ({ className, onClick, ...p }) => {
|
|
6
5
|
const [isVisible, setIsVisible] = useState(false);
|
|
7
6
|
const [lastScrollY, setLastScrollY] = useState(0);
|
|
8
7
|
useEffect(() => {
|
|
@@ -32,7 +31,5 @@ export const Affix = ({ className, onClick, "aria-label": ariaLabel, children, .
|
|
|
32
31
|
return (<button onClick={ev => {
|
|
33
32
|
onClick?.(ev);
|
|
34
33
|
scrollToTop();
|
|
35
|
-
}}
|
|
36
|
-
{children || <ChevronUpIcon className="compatible-icon"/>}
|
|
37
|
-
</button>);
|
|
34
|
+
}} className={cn(isVisible ? "affix-active" : null, className)} {...p}/>);
|
|
38
35
|
};
|
|
@@ -2,5 +2,5 @@ import { type HTMLAttributes } from "react";
|
|
|
2
2
|
export type BreadcrumbsItemPropsT = HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
isLast?: boolean;
|
|
4
4
|
};
|
|
5
|
-
export declare function BreadcrumbsItem({ isLast,
|
|
5
|
+
export declare function BreadcrumbsItem({ isLast, children, ...p }: BreadcrumbsItemPropsT): import("react").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=BreadcrumbsItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbsItem.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/BreadcrumbsItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BreadcrumbsItem.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/BreadcrumbsItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAO,MAAM,OAAO,CAAC;AAIjD,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACnE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAc,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,EAAE,qBAAqB,+BASxF"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../utils/cn";
|
|
3
2
|
import { use } from "react";
|
|
4
3
|
import { BreadcrumbsContext } from "./BreadcrumbsContext";
|
|
5
|
-
export function BreadcrumbsItem({ isLast = false,
|
|
4
|
+
export function BreadcrumbsItem({ isLast = false, children, ...p }) {
|
|
6
5
|
const { separator } = use(BreadcrumbsContext);
|
|
7
|
-
return (<div
|
|
6
|
+
return (<div {...p}>
|
|
8
7
|
{children}
|
|
9
8
|
{!isLast && separator}
|
|
10
9
|
</div>);
|
|
@@ -2,5 +2,5 @@ import type { HTMLAttributes, ReactNode } from "react";
|
|
|
2
2
|
export type BreadcrumbsRootPropsT = HTMLAttributes<HTMLElement> & {
|
|
3
3
|
separator?: ReactNode;
|
|
4
4
|
};
|
|
5
|
-
export declare function BreadcrumbsRoot({ separator,
|
|
5
|
+
export declare function BreadcrumbsRoot({ separator, ...p }: BreadcrumbsRootPropsT): import("react").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=BreadcrumbsRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbsRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/BreadcrumbsRoot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BreadcrumbsRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/BreadcrumbsRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvD,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IAChE,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAe,EAAE,GAAG,CAAC,EAAE,EAAE,qBAAqB,+BAM/E"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../utils/cn";
|
|
3
2
|
import { BreadcrumbsContext } from "./BreadcrumbsContext";
|
|
4
|
-
export function BreadcrumbsRoot({ separator = "/",
|
|
3
|
+
export function BreadcrumbsRoot({ separator = "/", ...p }) {
|
|
5
4
|
return (<BreadcrumbsContext value={{ separator }}>
|
|
6
|
-
<nav
|
|
5
|
+
<nav {...p}/>
|
|
7
6
|
</BreadcrumbsContext>);
|
|
8
7
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { CarouselRoot } from "./CarouselRoot";
|
|
2
|
+
import { CarouselLeftFade } from "./CarouselLeftFade";
|
|
2
3
|
import { CarouselContainer } from "./CarouselContainer";
|
|
4
|
+
import { CarouselRightFade } from "./CarouselRightFade";
|
|
3
5
|
export declare const Carousel: typeof CarouselRoot & {
|
|
4
6
|
Container: typeof CarouselContainer;
|
|
7
|
+
LeftFade: typeof CarouselLeftFade;
|
|
8
|
+
RightFade: typeof CarouselRightFade;
|
|
5
9
|
};
|
|
6
10
|
//# sourceMappingURL=Carousel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,eAAO,MAAM,QAAQ;;;;CAInB,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { CarouselRoot } from "./CarouselRoot";
|
|
2
|
+
import { CarouselLeftFade } from "./CarouselLeftFade";
|
|
2
3
|
import { CarouselContainer } from "./CarouselContainer";
|
|
4
|
+
import { CarouselRightFade } from "./CarouselRightFade";
|
|
3
5
|
export const Carousel = Object.assign(CarouselRoot, {
|
|
4
|
-
Container: CarouselContainer
|
|
6
|
+
Container: CarouselContainer,
|
|
7
|
+
LeftFade: CarouselLeftFade,
|
|
8
|
+
RightFade: CarouselRightFade
|
|
5
9
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
2
|
export type CarouselContainerPropsT = HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
export declare function CarouselContainer({ children,
|
|
3
|
+
export declare function CarouselContainer({ children, ...p }: CarouselContainerPropsT): import("react").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=CarouselContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselContainer.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/CarouselContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CarouselContainer.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/CarouselContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAO,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAErE,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,EAAE,uBAAuB,+BAQ5E"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../utils/cn";
|
|
3
2
|
import { use } from "react";
|
|
4
3
|
import { CarouselContext } from "./CarouselContext";
|
|
5
|
-
export function CarouselContainer({ children,
|
|
4
|
+
export function CarouselContainer({ children, ...p }) {
|
|
6
5
|
const { scrollRef } = use(CarouselContext);
|
|
7
|
-
return (<div ref={scrollRef}
|
|
6
|
+
return (<div ref={scrollRef} {...p}>
|
|
8
7
|
{children}
|
|
9
8
|
</div>);
|
|
10
9
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
2
|
export type CarouselContextPropsT = {
|
|
3
3
|
scrollRef: RefObject<HTMLDivElement | null>;
|
|
4
|
+
leftOpacity: number;
|
|
5
|
+
rightOpacity: number;
|
|
4
6
|
};
|
|
5
7
|
export declare const CarouselContext: import("react").Context<CarouselContextPropsT>;
|
|
6
8
|
//# sourceMappingURL=CarouselContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselContext.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/CarouselContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"CarouselContext.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/CarouselContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAA;AAED,eAAO,MAAM,eAAe,gDAAoE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
type CarouselLeftFadePropsT = HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
export declare function CarouselLeftFade({ style, ...p }: CarouselLeftFadePropsT): import("react").JSX.Element;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=CarouselLeftFade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CarouselLeftFade.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/CarouselLeftFade.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAO,MAAM,OAAO,CAAC;AAI5C,KAAK,sBAAsB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAE7D,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,sBAAsB,+BAYvE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { use } from "react";
|
|
3
|
+
import { CarouselContext } from "./CarouselContext";
|
|
4
|
+
export function CarouselLeftFade({ style, ...p }) {
|
|
5
|
+
const { leftOpacity } = use(CarouselContext);
|
|
6
|
+
return (<div style={{
|
|
7
|
+
opacity: leftOpacity,
|
|
8
|
+
...style
|
|
9
|
+
}} {...p}/>);
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
type CarouselRightFadePropsT = HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
export declare function CarouselRightFade({ style, ...p }: CarouselRightFadePropsT): import("react").JSX.Element;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=CarouselRightFade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CarouselRightFade.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/CarouselRightFade.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAO,MAAM,OAAO,CAAC;AAI5C,KAAK,uBAAuB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAE9D,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,uBAAuB,+BAYzE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { use } from "react";
|
|
3
|
+
import { CarouselContext } from "./CarouselContext";
|
|
4
|
+
export function CarouselRightFade({ style, ...p }) {
|
|
5
|
+
const { rightOpacity } = use(CarouselContext);
|
|
6
|
+
return (<div style={{
|
|
7
|
+
opacity: rightOpacity,
|
|
8
|
+
...style
|
|
9
|
+
}} {...p}/>);
|
|
10
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
2
|
export type CarouselRootPropsT = HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
export declare function CarouselRoot(
|
|
3
|
+
export declare function CarouselRoot(p: CarouselRootPropsT): import("react").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=CarouselRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/CarouselRoot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CarouselRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/CarouselRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAA+B,MAAM,OAAO,CAAC;AAIpE,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEhE,wBAAgB,YAAY,CAAC,CAAC,EAAE,kBAAkB,+BA+CjD"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../utils/cn";
|
|
3
2
|
import { useEffect, useRef, useState } from "react";
|
|
4
3
|
import { CarouselContext } from "./CarouselContext";
|
|
5
|
-
export function CarouselRoot(
|
|
4
|
+
export function CarouselRoot(p) {
|
|
6
5
|
const scrollRef = useRef(null);
|
|
7
6
|
const [leftOpacity, setLeftOpacity] = useState(0);
|
|
8
7
|
const [rightOpacity, setRightOpacity] = useState(1);
|
|
@@ -35,19 +34,7 @@ export function CarouselRoot({ children, className, ...props }) {
|
|
|
35
34
|
window.removeEventListener("resize", updateFade);
|
|
36
35
|
};
|
|
37
36
|
}, []);
|
|
38
|
-
return (<CarouselContext value={{ scrollRef }}>
|
|
39
|
-
<div
|
|
40
|
-
{/* Left Fade */}
|
|
41
|
-
<div className="pointer-events-none absolute right-0 top-0 h-full w-1/6 bg-gradient-to-l from-background from-5% to-transparent z-10 transition-opacity" style={{ opacity: leftOpacity }}/>
|
|
42
|
-
{/* --- */}
|
|
43
|
-
|
|
44
|
-
{/* Scrollable container */}
|
|
45
|
-
{children}
|
|
46
|
-
{/* --- */}
|
|
47
|
-
|
|
48
|
-
{/* Right Fade */}
|
|
49
|
-
<div className="pointer-events-none absolute left-0 top-0 h-full w-1/6 bg-gradient-to-r from-background from-5% to-transparent z-10 transition-opacity" style={{ opacity: rightOpacity }}/>
|
|
50
|
-
{/* --- */}
|
|
51
|
-
</div>
|
|
37
|
+
return (<CarouselContext value={{ scrollRef, leftOpacity, rightOpacity }}>
|
|
38
|
+
<div {...p}/>
|
|
52
39
|
</CarouselContext>);
|
|
53
40
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from "react";
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
2
|
export type ClipboardPropsT = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
3
3
|
text: string;
|
|
4
4
|
timeout?: number;
|
|
5
|
+
copiedChildren?: ReactNode;
|
|
5
6
|
};
|
|
6
|
-
export declare function Clipboard({ onClick, children, text, timeout, ...props }: ClipboardPropsT): import("react").JSX.Element;
|
|
7
|
+
export declare function Clipboard({ copiedChildren, onClick, children, text, timeout, ...props }: ClipboardPropsT): import("react").JSX.Element;
|
|
7
8
|
//# sourceMappingURL=Clipboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Clipboard.d.ts","sourceRoot":"","sources":["../../../src/components/Clipboard/Clipboard.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAc,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Clipboard.d.ts","sourceRoot":"","sources":["../../../src/components/Clipboard/Clipboard.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B,CAAA;AAED,wBAAgB,SAAS,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAe,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAiBhH"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { CopyCheckIcon, CopyIcon } from "lucide-react";
|
|
3
2
|
import { useClipboard } from "@mantine/hooks";
|
|
4
|
-
export function Clipboard({ onClick, children, text, timeout = 3_000, ...props }) {
|
|
3
|
+
export function Clipboard({ copiedChildren, onClick, children, text, timeout = 3_000, ...props }) {
|
|
5
4
|
const { copy, copied } = useClipboard({ timeout });
|
|
6
5
|
const handleClick = (ev) => {
|
|
7
6
|
onClick?.(ev);
|
|
8
7
|
copy(text.trim());
|
|
9
8
|
};
|
|
10
9
|
return (<button aria-label={text} onClick={handleClick} {...props}>
|
|
11
|
-
{copied ?
|
|
12
|
-
|
|
13
|
-
{children}
|
|
10
|
+
{copiedChildren && copied ? copiedChildren : children}
|
|
14
11
|
</button>);
|
|
15
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuContent.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenuContent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ContextMenuContent.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenuContent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAkB,MAAM,OAAO,CAAC;AAMvD,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEtE,wBAAgB,kBAAkB,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,CAAC,EAAE,EAAE,wBAAwB,+BAuC9F"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { use, useEffect } from "react";
|
|
3
|
-
import { cn } from "../../utils
|
|
4
|
-
import { selectAccessibleChildren } from "../../utils
|
|
3
|
+
import { cn } from "../../utils";
|
|
4
|
+
import { selectAccessibleChildren } from "../../utils";
|
|
5
5
|
import { ContextMenuContext } from "./ContextMenuContext";
|
|
6
6
|
export function ContextMenuContent({ onContextMenu, className, ...p }) {
|
|
7
7
|
const { contentRef, position, isOpen } = use(ContextMenuContext);
|
|
@@ -22,7 +22,7 @@ export function ContextMenuContent({ onContextMenu, className, ...p }) {
|
|
|
22
22
|
ev.stopPropagation();
|
|
23
23
|
ev.preventDefault();
|
|
24
24
|
onContextMenu?.(ev);
|
|
25
|
-
}} className={cn(
|
|
25
|
+
}} className={cn(isOpen ? "context-menu-active" : null, className)} style={{
|
|
26
26
|
top: position?.y,
|
|
27
27
|
left: position?.x,
|
|
28
28
|
}} {...p}/>);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
-
import { getBrowserScrollbarWith } from "../../utils
|
|
3
|
+
import { getBrowserScrollbarWith } from "../../utils";
|
|
4
4
|
import { ContextMenuContext } from "./ContextMenuContext";
|
|
5
5
|
export function ContextMenuRoot({ onContextMenu, ...p }) {
|
|
6
6
|
const [position, setPosition] = useState(undefined);
|
|
@@ -2,5 +2,5 @@ import { HTMLMotionProps } from "framer-motion";
|
|
|
2
2
|
export type DrawerBodyPropsT = HTMLMotionProps<"div"> & {
|
|
3
3
|
position?: "top" | "right" | "bottom" | "left";
|
|
4
4
|
};
|
|
5
|
-
export declare function DrawerBody({ position, dir, children,
|
|
5
|
+
export declare function DrawerBody({ position, dir, children, ...p }: DrawerBodyPropsT): import("react").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=DrawerBody.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerBody.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/DrawerBody.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawerBody.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/DrawerBody.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,eAAe,EAAE,MAAM,eAAe,CAAC;AAKxD,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG;IACtD,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAChD,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,EAAE,gBAAgB,+BAqD7E"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../utils/cn";
|
|
3
2
|
import { motion } from "framer-motion";
|
|
4
3
|
import { use, useEffect, useRef } from "react";
|
|
5
4
|
import { DrawerContext } from "./DrawerContext";
|
|
6
|
-
export function DrawerBody({ position, dir, children,
|
|
5
|
+
export function DrawerBody({ position, dir, children, ...p }) {
|
|
7
6
|
const { isOpen } = use(DrawerContext);
|
|
8
7
|
const bodyRef = useRef(null);
|
|
9
8
|
useEffect(() => {
|
|
@@ -18,7 +17,7 @@ export function DrawerBody({ position, dir, children, className, ...props }) {
|
|
|
18
17
|
const direction = ["right", "left"].includes(currentPosition) ? "y" : "x";
|
|
19
18
|
const width = direction === "y" ? "clamp(300px,30%,30%)" : undefined;
|
|
20
19
|
const height = direction === "y" ? undefined : "50%";
|
|
21
|
-
return (<motion.div ref={bodyRef} onClick={ev => ev.stopPropagation()}
|
|
20
|
+
return (<motion.div ref={bodyRef} onClick={ev => ev.stopPropagation()} initial={direction === "y"
|
|
22
21
|
? { x: currentPosition === "left" ? "-100%" : "100%" }
|
|
23
22
|
: { y: currentPosition === "top" ? "-100%" : "100%" }} animate={{ y: 0, x: 0 }} exit={direction === "y"
|
|
24
23
|
? { x: currentPosition === "left" ? "-100%" : "100%" }
|
|
@@ -32,7 +31,7 @@ export function DrawerBody({ position, dir, children, className, ...props }) {
|
|
|
32
31
|
: currentPosition === "bottom"
|
|
33
32
|
? { bottom: 0, left: 0, right: 0 }
|
|
34
33
|
: { top: 0, bottom: 0, left: 0 })
|
|
35
|
-
}} transition={{ ease: "easeInOut" }} {...
|
|
34
|
+
}} transition={{ ease: "easeInOut" }} {...p}>
|
|
36
35
|
{children}
|
|
37
36
|
</motion.div>);
|
|
38
37
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HTMLMotionProps } from "framer-motion";
|
|
2
2
|
export type DrawerPortalPropsT = HTMLMotionProps<"div">;
|
|
3
|
-
export declare function DrawerPortal({ onClick,
|
|
3
|
+
export declare function DrawerPortal({ onClick, ...p }: DrawerPortalPropsT): import("react").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=DrawerPortal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerPortal.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/DrawerPortal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawerPortal.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/DrawerPortal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA2B,eAAe,EAAE,MAAM,eAAe,CAAC;AAMzE,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;AAExD,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,kBAAkB,+BAuBjE"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { use } from "react";
|
|
3
|
-
import { cn } from "../../utils/cn";
|
|
4
3
|
import { motion, AnimatePresence } from "framer-motion";
|
|
5
4
|
import { Portal } from "../Portal/Portal";
|
|
6
5
|
import { DrawerContext } from "./DrawerContext";
|
|
7
6
|
import { ClientOnly } from "../ClientOnly/ClientOnly";
|
|
8
|
-
export function DrawerPortal({ onClick,
|
|
7
|
+
export function DrawerPortal({ onClick, ...p }) {
|
|
9
8
|
const { isOpen, setOpen } = use(DrawerContext);
|
|
10
9
|
return (<ClientOnly>
|
|
11
10
|
<Portal>
|
|
@@ -13,7 +12,7 @@ export function DrawerPortal({ onClick, className, ...props }) {
|
|
|
13
12
|
{isOpen ? (<motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} onClick={ev => {
|
|
14
13
|
onClick?.(ev);
|
|
15
14
|
setOpen(false);
|
|
16
|
-
}}
|
|
15
|
+
}} {...p}/>) : null}
|
|
17
16
|
</AnimatePresence>
|
|
18
17
|
</Portal>
|
|
19
18
|
</ClientOnly>);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getBrowserScrollbarWith } from "../../utils
|
|
2
|
+
import { getBrowserScrollbarWith } from "../../utils";
|
|
3
3
|
import { useState, useEffect } from "react";
|
|
4
4
|
import { DrawerContext } from "./DrawerContext";
|
|
5
5
|
export function DrawerRoot({ children }) {
|
|
@@ -2,5 +2,5 @@ import { HTMLAttributes } from "react";
|
|
|
2
2
|
export type DropdownMenuPropsT = HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
preventClose?: boolean;
|
|
4
4
|
};
|
|
5
|
-
export declare function DropdownMenu({ preventClose, onClick,
|
|
5
|
+
export declare function DropdownMenu({ preventClose, onClick, ...p }: DropdownMenuPropsT): import("react").JSX.Element | null;
|
|
6
6
|
//# sourceMappingURL=DropdownMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/DropdownMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAO,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/DropdownMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAO,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAChE,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAA;AAED,wBAAgB,YAAY,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,kBAAkB,sCAkB/E"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { use } from "react";
|
|
3
|
-
import { cn } from "../../utils/cn";
|
|
4
3
|
import { DropdownContext } from "./DropdownContext";
|
|
5
|
-
export function DropdownMenu({ preventClose, onClick,
|
|
4
|
+
export function DropdownMenu({ preventClose, onClick, ...p }) {
|
|
6
5
|
const { menuRef, isOpen } = use(DropdownContext);
|
|
7
6
|
return (isOpen ? (<div ref={menuRef} onClick={ev => {
|
|
8
7
|
if (preventClose) {
|
|
9
8
|
ev.stopPropagation();
|
|
10
9
|
}
|
|
11
10
|
onClick?.(ev);
|
|
12
|
-
}}
|
|
11
|
+
}} {...p}/>) : null);
|
|
13
12
|
}
|
|
@@ -2,5 +2,5 @@ import { HTMLAttributes } from "react";
|
|
|
2
2
|
export type DropdownRootPropsT = HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
accessHorizontalArrows?: "ArrowRight" | "ArrowLeft";
|
|
4
4
|
};
|
|
5
|
-
export declare function DropdownRoot({ accessHorizontalArrows, onKeyDown,
|
|
5
|
+
export declare function DropdownRoot({ accessHorizontalArrows, onKeyDown, ...p }: DropdownRootPropsT): import("react").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=DropdownRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/DropdownRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAA8C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/DropdownRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAA8C,MAAM,OAAO,CAAC;AAOnF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAChE,sBAAsB,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;CACrD,CAAA;AAED,wBAAgB,YAAY,CAAC,EAAE,sBAAsB,EAAE,SAAS,EAAE,GAAG,CAAC,EAAE,EAAE,kBAAkB,+BA0E3F"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useEffect, useRef, useState } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { selectAccessibleChildren } from "../../utils/browser";
|
|
3
|
+
import { selectAccessibleChildren } from "../../utils";
|
|
5
4
|
import { DropdownContext } from "./DropdownContext";
|
|
6
|
-
export function DropdownRoot({ accessHorizontalArrows, onKeyDown,
|
|
5
|
+
export function DropdownRoot({ accessHorizontalArrows, onKeyDown, ...p }) {
|
|
7
6
|
const [isOpen, setOpen] = useState(false);
|
|
8
7
|
const toggleRef = useRef(null);
|
|
9
8
|
const menuRef = useRef(null);
|
|
@@ -55,10 +54,8 @@ export function DropdownRoot({ accessHorizontalArrows, onKeyDown, className, ...
|
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
};
|
|
58
|
-
return (<DropdownContext value={{
|
|
59
|
-
|
|
60
|
-
}}>
|
|
61
|
-
<div className={cn("relative w-fit max-w-full", className)} onKeyDown={ev => {
|
|
57
|
+
return (<DropdownContext value={{ isOpen, setOpen, toggleRef, menuRef }}>
|
|
58
|
+
<div onKeyDown={ev => {
|
|
62
59
|
onKeyDown?.(ev);
|
|
63
60
|
handleKeyDown(ev);
|
|
64
61
|
}} {...p}/>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoaderLink.d.ts","sourceRoot":"","sources":["../../../src/components/LoaderLink/LoaderLink.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG;IACjD,MAAM,EAAE,SAAS,CAAC;CACnB,CAAA;AAED,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,gBAAgB,aAIhE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModalBody } from "./ModalBody";
|
|
2
1
|
import { ModalRoot } from "./ModalRoot";
|
|
2
|
+
import { ModalBody } from "./ModalBody";
|
|
3
3
|
import { ModalHeader } from "./ModalHeader";
|
|
4
4
|
import { ModalPortal } from "./ModalPortal";
|
|
5
5
|
import { ModalToggle } from "./ModalTrigger";
|
|
@@ -7,8 +7,8 @@ import { ModalContent } from "./ModalContent";
|
|
|
7
7
|
export declare const Modal: typeof ModalRoot & {
|
|
8
8
|
Toggle: typeof ModalToggle;
|
|
9
9
|
Portal: typeof ModalPortal;
|
|
10
|
-
Content: typeof ModalContent;
|
|
11
|
-
Header: typeof ModalHeader;
|
|
12
10
|
Body: typeof ModalBody;
|
|
11
|
+
Header: typeof ModalHeader;
|
|
12
|
+
Content: typeof ModalContent;
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=Modal.d.ts.map
|