@kadoui/react 2.1.6 → 2.2.7
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 -1
- package/dist/react-components/AccessNavigation/AccessNavigation.d.ts +2 -2
- package/dist/react-components/AccessNavigation/AccessNavigation.d.ts.map +1 -1
- package/dist/react-components/AccessNavigation/AccessNavigation.js +8 -7
- package/dist/react-components/Accordion/Accordion.d.ts +4 -0
- package/dist/react-components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/react-components/Accordion/Accordion.js +5 -1
- package/dist/react-components/Accordion/AccordionBody.d.ts +1 -1
- package/dist/react-components/Accordion/AccordionBody.d.ts.map +1 -1
- package/dist/react-components/Accordion/AccordionBody.js +6 -3
- package/dist/react-components/Accordion/AccordionContent.d.ts +3 -0
- package/dist/react-components/Accordion/AccordionContent.d.ts.map +1 -0
- package/dist/react-components/Accordion/AccordionContent.js +5 -0
- package/dist/react-components/Accordion/AccordionContext.d.ts +9 -2
- package/dist/react-components/Accordion/AccordionContext.d.ts.map +1 -1
- package/dist/react-components/Accordion/AccordionContext.js +1 -0
- package/dist/react-components/Accordion/AccordionItem.d.ts +3 -0
- package/dist/react-components/Accordion/AccordionItem.d.ts.map +1 -0
- package/dist/react-components/Accordion/AccordionItem.js +5 -0
- package/dist/react-components/Accordion/AccordionItemContext.d.ts +3 -0
- package/dist/react-components/Accordion/AccordionItemContext.d.ts.map +1 -0
- package/dist/react-components/Accordion/AccordionItemContext.js +3 -0
- package/dist/react-components/Accordion/AccordionRoot.d.ts +1 -1
- package/dist/react-components/Accordion/AccordionRoot.d.ts.map +1 -1
- package/dist/react-components/Accordion/AccordionRoot.js +3 -4
- package/dist/react-components/Accordion/AccordionToggle.d.ts +1 -1
- package/dist/react-components/Accordion/AccordionToggle.d.ts.map +1 -1
- package/dist/react-components/Accordion/AccordionToggle.js +23 -5
- package/dist/react-components/Accordion/accordionTypes.d.ts +21 -6
- package/dist/react-components/Accordion/accordionTypes.d.ts.map +1 -1
- package/dist/react-components/Affix/Affix.d.ts +1 -1
- package/dist/react-components/Affix/Affix.d.ts.map +1 -1
- package/dist/react-components/Affix/Affix.js +3 -2
- package/dist/react-components/Affix/affixTypes.d.ts +3 -1
- package/dist/react-components/Affix/affixTypes.d.ts.map +1 -1
- package/dist/react-components/Carousel/CarouselNextBtn.d.ts +1 -1
- package/dist/react-components/Carousel/CarouselNextBtn.d.ts.map +1 -1
- package/dist/react-components/Carousel/CarouselNextBtn.js +2 -2
- package/dist/react-components/Carousel/CarouselPrevBtn.d.ts +1 -1
- package/dist/react-components/Carousel/CarouselPrevBtn.d.ts.map +1 -1
- package/dist/react-components/Carousel/CarouselPrevBtn.js +2 -2
- package/dist/react-components/Choice/Choice.d.ts +0 -2
- package/dist/react-components/Choice/Choice.d.ts.map +1 -1
- package/dist/react-components/Choice/Choice.js +0 -2
- package/dist/react-components/Choice/ChoiceRoot.d.ts +1 -1
- package/dist/react-components/Choice/ChoiceRoot.d.ts.map +1 -1
- package/dist/react-components/Choice/ChoiceRoot.js +3 -2
- package/dist/react-components/Choice/ChoiceThumb.d.ts.map +1 -1
- package/dist/react-components/Choice/ChoiceThumb.js +1 -0
- package/dist/react-components/Choice/ChoiceToggle.d.ts.map +1 -1
- package/dist/react-components/Choice/ChoiceToggle.js +9 -9
- package/dist/react-components/Choice/choiceTypes.d.ts +9 -10
- package/dist/react-components/Choice/choiceTypes.d.ts.map +1 -1
- package/dist/react-components/Clipboard/Clipboard.d.ts +1 -1
- package/dist/react-components/Clipboard/Clipboard.d.ts.map +1 -1
- package/dist/react-components/Clipboard/Clipboard.js +2 -2
- package/dist/react-components/ContextMenu/ContextMenu.d.ts +0 -2
- package/dist/react-components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/react-components/ContextMenu/ContextMenu.js +0 -2
- package/dist/react-components/ContextMenu/ContextMenuBody.d.ts.map +1 -1
- package/dist/react-components/ContextMenu/ContextMenuBody.js +5 -1
- package/dist/react-components/ContextMenu/ContextMenuContent.d.ts +3 -0
- package/dist/react-components/ContextMenu/ContextMenuContent.d.ts.map +1 -0
- package/dist/react-components/ContextMenu/ContextMenuContent.js +8 -0
- package/dist/react-components/ContextMenu/ContextMenuContext.d.ts.map +1 -1
- package/dist/react-components/ContextMenu/ContextMenuContext.js +1 -0
- package/dist/react-components/ContextMenu/ContextMenuRoot.d.ts.map +1 -1
- package/dist/react-components/ContextMenu/ContextMenuRoot.js +13 -2
- package/dist/react-components/ContextMenu/contextMenuTypes.d.ts +1 -2
- package/dist/react-components/ContextMenu/contextMenuTypes.d.ts.map +1 -1
- package/dist/react-components/Drawer/DrawerBody.js +1 -1
- package/dist/react-components/Drawer/DrawerContext.d.ts.map +1 -1
- package/dist/react-components/Drawer/DrawerContext.js +1 -0
- package/dist/react-components/Drawer/DrawerPortal.js +1 -1
- package/dist/react-components/Drawer/DrawerRoot.d.ts.map +1 -1
- package/dist/react-components/Drawer/DrawerRoot.js +1 -1
- package/dist/react-components/Drawer/DrawerToggle.d.ts +1 -1
- package/dist/react-components/Drawer/DrawerToggle.d.ts.map +1 -1
- package/dist/react-components/Drawer/DrawerToggle.js +5 -5
- package/dist/react-components/Drawer/drawerTypes.d.ts +3 -3
- package/dist/react-components/Drawer/drawerTypes.d.ts.map +1 -1
- package/dist/react-components/Modal/ModalPortal.d.ts.map +1 -1
- package/dist/react-components/Modal/ModalPortal.js +1 -1
- package/dist/react-components/Modal/ModalRoot.d.ts.map +1 -1
- package/dist/react-components/Modal/ModalRoot.js +2 -2
- package/dist/react-components/Modal/ModalToggle.d.ts +1 -1
- package/dist/react-components/Modal/ModalToggle.d.ts.map +1 -1
- package/dist/react-components/Modal/ModalToggle.js +5 -5
- package/dist/react-components/Modal/modalTypes.d.ts +3 -3
- package/dist/react-components/Modal/modalTypes.d.ts.map +1 -1
- package/dist/react-components/Otp/OtpInputs.d.ts +1 -1
- package/dist/react-components/Otp/OtpInputs.d.ts.map +1 -1
- package/dist/react-components/Otp/OtpInputs.js +2 -2
- package/dist/react-components/PasswordInput/PasswordInputContext.d.ts.map +1 -1
- package/dist/react-components/PasswordInput/PasswordInputContext.js +1 -0
- package/dist/react-components/PasswordInput/PasswordInputField.d.ts +1 -1
- package/dist/react-components/PasswordInput/PasswordInputField.d.ts.map +1 -1
- package/dist/react-components/PasswordInput/PasswordInputField.js +2 -2
- package/dist/react-components/PasswordInput/PasswordInputRoot.d.ts +1 -1
- package/dist/react-components/PasswordInput/PasswordInputRoot.d.ts.map +1 -1
- package/dist/react-components/PasswordInput/PasswordInputRoot.js +2 -2
- package/dist/react-components/PasswordInput/PasswordInputToggle.d.ts +1 -1
- package/dist/react-components/PasswordInput/PasswordInputToggle.d.ts.map +1 -1
- package/dist/react-components/PasswordInput/PasswordInputToggle.js +4 -4
- package/dist/react-components/PasswordInput/passwordInputTypes.d.ts +3 -3
- package/dist/react-components/PasswordInput/passwordInputTypes.d.ts.map +1 -1
- package/dist/react-components/Popover/Popover.d.ts +0 -2
- package/dist/react-components/Popover/Popover.d.ts.map +1 -1
- package/dist/react-components/Popover/Popover.js +0 -2
- package/dist/react-components/Popover/PopoverBody.d.ts +1 -1
- package/dist/react-components/Popover/PopoverBody.d.ts.map +1 -1
- package/dist/react-components/Popover/PopoverBody.js +2 -2
- package/dist/react-components/Popover/PopoverContext.d.ts.map +1 -1
- package/dist/react-components/Popover/PopoverContext.js +1 -0
- package/dist/react-components/Popover/PopoverRoot.d.ts.map +1 -1
- package/dist/react-components/Popover/PopoverRoot.js +3 -2
- package/dist/react-components/Popover/PopoverToggle.d.ts +1 -1
- package/dist/react-components/Popover/PopoverToggle.d.ts.map +1 -1
- package/dist/react-components/Popover/PopoverToggle.js +4 -4
- package/dist/react-components/Popover/popoverTypes.d.ts +4 -5
- package/dist/react-components/Popover/popoverTypes.d.ts.map +1 -1
- package/dist/react-components/SelectBox/SelectBoxInput.d.ts.map +1 -1
- package/dist/react-components/SelectBox/SelectBoxInput.js +1 -0
- package/dist/react-components/SelectBox/SelectBoxList.d.ts +1 -1
- package/dist/react-components/SelectBox/SelectBoxList.d.ts.map +1 -1
- package/dist/react-components/SelectBox/SelectBoxList.js +1 -2
- package/dist/react-components/SelectBox/SelectBoxRoot.d.ts.map +1 -1
- package/dist/react-components/SelectBox/SelectBoxRoot.js +12 -2
- package/dist/react-components/SelectBox/SelectBoxSearchInput.d.ts.map +1 -1
- package/dist/react-components/SelectBox/SelectBoxSearchInput.js +1 -0
- package/dist/react-components/SelectBox/selectBoxTypes.d.ts +7 -7
- package/dist/react-components/SelectBox/selectBoxTypes.d.ts.map +1 -1
- package/dist/react-components/Sheet/SheetBody.d.ts.map +1 -1
- package/dist/react-components/Sheet/SheetBody.js +1 -1
- package/dist/react-components/Sheet/SheetContext.d.ts.map +1 -1
- package/dist/react-components/Sheet/SheetContext.js +1 -0
- package/dist/react-components/Sheet/SheetPortal.js +1 -1
- package/dist/react-components/Sheet/SheetRoot.d.ts.map +1 -1
- package/dist/react-components/Sheet/SheetRoot.js +2 -2
- package/dist/react-components/Sheet/SheetToggle.d.ts +1 -1
- package/dist/react-components/Sheet/SheetToggle.d.ts.map +1 -1
- package/dist/react-components/Sheet/SheetToggle.js +5 -5
- package/dist/react-components/Sheet/sheetTypes.d.ts +3 -3
- package/dist/react-components/Sheet/sheetTypes.d.ts.map +1 -1
- package/dist/react-components/ShowMore/ShowMore.d.ts +1 -1
- package/dist/react-components/ShowMore/ShowMore.d.ts.map +1 -1
- package/dist/react-components/ShowMore/ShowMore.js +1 -1
- package/dist/react-components/ShowMore/ShowMoreContent.d.ts +1 -1
- package/dist/react-components/ShowMore/ShowMoreContent.d.ts.map +1 -1
- package/dist/react-components/ShowMore/ShowMoreContent.js +2 -2
- package/dist/react-components/ShowMore/ShowMoreContext.d.ts.map +1 -1
- package/dist/react-components/ShowMore/ShowMoreContext.js +1 -0
- package/dist/react-components/ShowMore/ShowMoreToggle.d.ts.map +1 -1
- package/dist/react-components/ShowMore/ShowMoreToggle.js +3 -3
- package/dist/react-components/ShowMore/showMoreTypes.d.ts +3 -3
- package/dist/react-components/ShowMore/showMoreTypes.d.ts.map +1 -1
- package/dist/react-components/Spoiler/SpoilerContext.d.ts.map +1 -1
- package/dist/react-components/Spoiler/SpoilerContext.js +1 -0
- package/dist/react-components/Spoiler/SpoilerRoot.js +1 -1
- package/dist/react-components/Spoiler/spoilerTypes.d.ts +2 -2
- package/dist/react-components/Spoiler/spoilerTypes.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/browser.d.ts +1 -1
- package/dist/utils/browser.d.ts.map +1 -1
- package/dist/utils/browser.js +32 -9
- package/package.json +48 -49
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ContextMenuRoot } from "./ContextMenuRoot";
|
|
2
2
|
import { ContextMenuBody } from "./ContextMenuBody";
|
|
3
3
|
import { ContextMenuItem } from "./ContextMenuItem";
|
|
4
|
-
import { ContextMenuNavigation } from "./ContextMenuNavigation";
|
|
5
4
|
export declare const ContextMenu: typeof ContextMenuRoot & {
|
|
6
5
|
Body: typeof ContextMenuBody;
|
|
7
|
-
Navigation: typeof ContextMenuNavigation;
|
|
8
6
|
Item: typeof ContextMenuItem;
|
|
9
7
|
};
|
|
10
8
|
export * from "./contextMenuTypes";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,WAAW;;;CAGtB,CAAC;AAEH,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ContextMenuRoot } from "./ContextMenuRoot";
|
|
2
2
|
import { ContextMenuBody } from "./ContextMenuBody";
|
|
3
3
|
import { ContextMenuItem } from "./ContextMenuItem";
|
|
4
|
-
import { ContextMenuNavigation } from "./ContextMenuNavigation";
|
|
5
4
|
export const ContextMenu = Object.assign(ContextMenuRoot, {
|
|
6
5
|
Body: ContextMenuBody,
|
|
7
|
-
Navigation: ContextMenuNavigation,
|
|
8
6
|
Item: ContextMenuItem
|
|
9
7
|
});
|
|
10
8
|
export * from "./contextMenuTypes";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuBody.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuBody.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ContextMenuBody.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuBody.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAGhE,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,GAAG,CAAC,EAAE,EAAE,qBAAqB,2CAwB7E"}
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { use } from "react";
|
|
4
4
|
import { ContextMenuContext } from "./ContextMenuContext";
|
|
5
|
+
import { AccessNavigation } from "../AccessNavigation/AccessNavigation";
|
|
5
6
|
export function ContextMenuBody({ onContextMenu, ...p }) {
|
|
6
7
|
const { contentRef, position, isOpen } = use(ContextMenuContext);
|
|
7
|
-
|
|
8
|
+
// useEffect(() => {
|
|
9
|
+
// contentRef.current?.focus();
|
|
10
|
+
// }, [isOpen, position])
|
|
11
|
+
return (_jsx(AccessNavigation, { ref: contentRef, "data-state": isOpen, focusTrap: position, onContextMenu: (ev) => {
|
|
8
12
|
ev.stopPropagation();
|
|
9
13
|
ev.preventDefault();
|
|
10
14
|
onContextMenu?.(ev);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextMenuContent.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuContent.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,wBAAgB,kBAAkB,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,EAAE,EAAE,wBAAwB,kDAMlF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { use } from "react";
|
|
3
|
+
import { ContextMenuContext } from "./ContextMenuContext";
|
|
4
|
+
import { AccessNavigation } from "../AccessNavigation/AccessNavigation";
|
|
5
|
+
export function ContextMenuContent({ focusOnMount, ...p }) {
|
|
6
|
+
const { isOpen } = use(ContextMenuContext);
|
|
7
|
+
return isOpen ? (_jsx(AccessNavigation, { focusOnMount: focusOnMount || true, ...p })) : null;
|
|
8
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContextMenuContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,eAAO,MAAM,kBAAkB,8CAAgE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuRoot.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAuB,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAErF,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,GAAG,CAAC,EAAE,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ContextMenuRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/ContextMenuRoot.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAuB,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAErF,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,GAAG,CAAC,EAAE,EAAE,qBAAqB,2CAyF7E"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
-
import { getBrowserScrollbarWith } from "../../utils-exports";
|
|
5
4
|
import { ContextMenuContext } from "./ContextMenuContext";
|
|
5
|
+
import { getBrowserScrollbarWith } from "../../utils-exports";
|
|
6
6
|
export function ContextMenuRoot({ onContextMenu, ...p }) {
|
|
7
7
|
const [position, setPosition] = useState(undefined);
|
|
8
8
|
const [isOpen, setOpen] = useState(false);
|
|
@@ -31,6 +31,15 @@ export function ContextMenuRoot({ onContextMenu, ...p }) {
|
|
|
31
31
|
document.body.style.paddingRight = "0px";
|
|
32
32
|
}
|
|
33
33
|
;
|
|
34
|
+
const handleEscape = (e) => {
|
|
35
|
+
if (e.key === "Escape") {
|
|
36
|
+
setOpen(false);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
document.addEventListener("keydown", handleEscape);
|
|
40
|
+
return () => {
|
|
41
|
+
document.removeEventListener("keydown", handleEscape);
|
|
42
|
+
};
|
|
34
43
|
}, [isOpen]);
|
|
35
44
|
const handleContextMenu = (ev) => {
|
|
36
45
|
if (!contentRef.current)
|
|
@@ -49,7 +58,9 @@ export function ContextMenuRoot({ onContextMenu, ...p }) {
|
|
|
49
58
|
y = viewportHeight - menuHeight - 10;
|
|
50
59
|
}
|
|
51
60
|
setPosition({ x, y });
|
|
52
|
-
|
|
61
|
+
if (!isOpen) {
|
|
62
|
+
setOpen(true);
|
|
63
|
+
}
|
|
53
64
|
};
|
|
54
65
|
return (_jsx(ContextMenuContext, { value: { contentRef, isOpen, closeHandler, position }, children: _jsx("div", { onContextMenu: ev => {
|
|
55
66
|
onContextMenu?.(ev);
|
|
@@ -10,7 +10,6 @@ export type ContextMenuContextT = {
|
|
|
10
10
|
contentRef: RefObject<HTMLDivElement | null>;
|
|
11
11
|
};
|
|
12
12
|
export type ContextMenuRootPropsT = ComponentProps<"div">;
|
|
13
|
-
export type ContextMenuBodyPropsT =
|
|
13
|
+
export type ContextMenuBodyPropsT = AccessNavigationPropsT;
|
|
14
14
|
export type ContextMenuItemPropsT = ComponentProps<"button">;
|
|
15
|
-
export type ContextMenuNavigationPropsT = AccessNavigationPropsT;
|
|
16
15
|
//# sourceMappingURL=contextMenuTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextMenuTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/contextMenuTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"contextMenuTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/ContextMenu/contextMenuTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAEnF,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAC/C,UAAU,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAE3D,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { motion } from "framer-motion";
|
|
4
4
|
import { use, useEffect, useRef } from "react";
|
|
5
|
-
import { FRAMER_MOTION_DURATION } from "../../configs";
|
|
6
5
|
import { DrawerContext } from "./DrawerContext";
|
|
6
|
+
import { FRAMER_MOTION_DURATION } from "../../configs";
|
|
7
7
|
export function DrawerBody({ position, dir, children, ...p }) {
|
|
8
8
|
const { isOpen } = use(DrawerContext);
|
|
9
9
|
const bodyRef = useRef(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawerContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,eAAO,MAAM,aAAa,yCAAsD,CAAC"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { use } from "react";
|
|
4
4
|
import { motion, AnimatePresence } from "framer-motion";
|
|
5
|
-
import { ClientOnly } from "../ClientOnly/ClientOnly";
|
|
6
5
|
import { Portal } from "../Portal/Portal";
|
|
7
6
|
import { DrawerContext } from "./DrawerContext";
|
|
7
|
+
import { ClientOnly } from "../ClientOnly/ClientOnly";
|
|
8
8
|
export function DrawerPortal({ onClick, ...p }) {
|
|
9
9
|
const { isOpen, setOpen } = use(DrawerContext);
|
|
10
10
|
return (_jsx(ClientOnly, { children: _jsx(Portal, { children: _jsx(AnimatePresence, { children: isOpen ? (_jsx(motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: ev => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerRoot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawerRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerRoot.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,2CA2CxD"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { usePathname } from "next/navigation";
|
|
4
4
|
import { useState, useEffect } from "react";
|
|
5
|
-
import { getBrowserScrollbarWith } from "../../utils-exports";
|
|
6
5
|
import { DrawerContext } from "./DrawerContext";
|
|
6
|
+
import { getBrowserScrollbarWith } from "../../utils-exports";
|
|
7
7
|
export function DrawerRoot({ children }) {
|
|
8
8
|
const pathname = usePathname();
|
|
9
9
|
const [isOpen, setOpen] = useState(false);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { DrawerTogglePropsT } from "./drawerTypes";
|
|
2
|
-
export declare function DrawerToggle({ onClick, ...
|
|
2
|
+
export declare function DrawerToggle({ onClick, ...p }: DrawerTogglePropsT): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=DrawerToggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerToggle.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerToggle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"DrawerToggle.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/DrawerToggle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,kBAAkB,2CAajE"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { use } from "react";
|
|
4
4
|
import { DrawerContext } from "./DrawerContext";
|
|
5
|
-
export function DrawerToggle({ onClick, ...
|
|
6
|
-
const { setOpen } = use(DrawerContext);
|
|
7
|
-
return (_jsx("button", { onClick: (ev) => {
|
|
5
|
+
export function DrawerToggle({ onClick, ...p }) {
|
|
6
|
+
const { isOpen, setOpen } = use(DrawerContext);
|
|
7
|
+
return (_jsx("button", { type: "button", onClick: (ev) => {
|
|
8
8
|
onClick?.(ev);
|
|
9
|
-
setOpen(
|
|
10
|
-
}, ...
|
|
9
|
+
setOpen(isOpen);
|
|
10
|
+
}, ...p }));
|
|
11
11
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { HTMLMotionProps } from "framer-motion";
|
|
2
|
-
import type { ComponentProps,
|
|
2
|
+
import type { ComponentProps, PropsWithChildren } from "react";
|
|
3
3
|
export type DrawerContextT = {
|
|
4
4
|
isOpen: boolean;
|
|
5
|
-
setOpen:
|
|
5
|
+
setOpen: (newState: boolean) => void;
|
|
6
6
|
};
|
|
7
7
|
export type DrawerRootPropsT = PropsWithChildren;
|
|
8
8
|
export type DrawerBodyPropsT = HTMLMotionProps<"div"> & {
|
|
9
9
|
position?: "top" | "right" | "bottom" | "left";
|
|
10
10
|
};
|
|
11
|
-
export type DrawerTogglePropsT = ComponentProps<"button">;
|
|
11
|
+
export type DrawerTogglePropsT = Omit<ComponentProps<"button">, "type">;
|
|
12
12
|
export type DrawerPortalPropsT = HTMLMotionProps<"div">;
|
|
13
13
|
//# sourceMappingURL=drawerTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawerTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/drawerTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"drawerTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/Drawer/drawerTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/D,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAEjD,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG;IACtD,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;AAExE,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalPortal.d.ts","sourceRoot":"","sources":["../../../src/react-components/Modal/ModalPortal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModalPortal.d.ts","sourceRoot":"","sources":["../../../src/react-components/Modal/ModalPortal.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,iBAAiB,2CAuB/D"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { use } from "react";
|
|
4
4
|
import { motion, AnimatePresence } from "framer-motion";
|
|
5
|
-
import { ClientOnly } from "../ClientOnly/ClientOnly";
|
|
6
5
|
import { Portal } from "../Portal/Portal";
|
|
7
6
|
import { ModalContext } from "./ModalContext";
|
|
7
|
+
import { ClientOnly } from "../ClientOnly/ClientOnly";
|
|
8
8
|
export function ModalPortal({ onClick, ...p }) {
|
|
9
9
|
const { isOpen, setOpen } = use(ModalContext);
|
|
10
10
|
return (_jsx(ClientOnly, { children: _jsx(Portal, { children: _jsx(AnimatePresence, { children: isOpen ? (_jsx(motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: (ev) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/Modal/ModalRoot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModalRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/Modal/ModalRoot.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,WAAmB,EAAE,EAAE,eAAe,2CA0C3E"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { usePathname } from "next/navigation";
|
|
4
3
|
import { useState, useEffect } from "react";
|
|
5
|
-
import {
|
|
4
|
+
import { usePathname } from "next/navigation";
|
|
6
5
|
import { ModalContext } from "./ModalContext";
|
|
6
|
+
import { getBrowserScrollbarWith } from "../../utils-exports";
|
|
7
7
|
export function ModalRoot({ children, defaultOpen = false }) {
|
|
8
8
|
const pathname = usePathname();
|
|
9
9
|
const [isOpen, setOpen] = useState(defaultOpen);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ModalTogglePropsT } from "./modalTypes";
|
|
2
|
-
export declare function ModalToggle({ onClick, ...
|
|
2
|
+
export declare function ModalToggle({ onClick, ...p }: ModalTogglePropsT): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=ModalToggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalToggle.d.ts","sourceRoot":"","sources":["../../../src/react-components/Modal/ModalToggle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"ModalToggle.d.ts","sourceRoot":"","sources":["../../../src/react-components/Modal/ModalToggle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,iBAAiB,2CAa/D"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { use } from "react";
|
|
4
4
|
import { ModalContext } from "./ModalContext";
|
|
5
|
-
export function ModalToggle({ onClick, ...
|
|
6
|
-
const { setOpen } = use(ModalContext);
|
|
7
|
-
return (_jsx("button", { onClick: (ev) => {
|
|
5
|
+
export function ModalToggle({ onClick, ...p }) {
|
|
6
|
+
const { isOpen, setOpen } = use(ModalContext);
|
|
7
|
+
return (_jsx("button", { type: "button", onClick: (ev) => {
|
|
8
8
|
onClick?.(ev);
|
|
9
|
-
setOpen(
|
|
10
|
-
}, ...
|
|
9
|
+
setOpen(!isOpen);
|
|
10
|
+
}, ...p }));
|
|
11
11
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { HTMLMotionProps } from "framer-motion";
|
|
2
|
-
import type { ComponentProps,
|
|
2
|
+
import type { ComponentProps, PropsWithChildren } from "react";
|
|
3
3
|
export type ModalContextT = {
|
|
4
4
|
isOpen: boolean;
|
|
5
|
-
setOpen:
|
|
5
|
+
setOpen: (newState: boolean) => void;
|
|
6
6
|
};
|
|
7
7
|
export type ModalRootPropsT = PropsWithChildren & {
|
|
8
8
|
defaultOpen?: boolean;
|
|
9
9
|
};
|
|
10
10
|
export type ModalContentPropsT = ComponentProps<"div">;
|
|
11
11
|
export type ModalHeaderPropsT = ComponentProps<"div">;
|
|
12
|
-
export type ModalTogglePropsT = ComponentProps<"button">;
|
|
12
|
+
export type ModalTogglePropsT = Omit<ComponentProps<"button">, "type">;
|
|
13
13
|
export type ModalBodyPropsT = HTMLMotionProps<"div">;
|
|
14
14
|
export type ModalPortalPropsT = HTMLMotionProps<"div">;
|
|
15
15
|
//# sourceMappingURL=modalTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modalTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/Modal/modalTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"modalTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/Modal/modalTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/D,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEtD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;AAEvE,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { OtpInputsPropsT } from "./otpTypes";
|
|
2
|
-
export declare function OtpInputs({ name, length, onLastChange, ...
|
|
2
|
+
export declare function OtpInputs({ name, length, onLastChange, ...p }: OtpInputsPropsT): import("react/jsx-runtime").JSX.Element[];
|
|
3
3
|
//# sourceMappingURL=OtpInputs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtpInputs.d.ts","sourceRoot":"","sources":["../../../src/react-components/Otp/OtpInputs.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"OtpInputs.d.ts","sourceRoot":"","sources":["../../../src/react-components/Otp/OtpInputs.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,EAAE,EAAE,eAAe,6CAwE9E"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { use } from "react";
|
|
4
4
|
import { OtpContext } from "./OtpContext";
|
|
5
|
-
export function OtpInputs({ name, length, onLastChange, ...
|
|
5
|
+
export function OtpInputs({ name, length, onLastChange, ...p }) {
|
|
6
6
|
const { inputs, getInputsValue } = use(OtpContext);
|
|
7
7
|
const handlePaste = (ev, startIndex) => {
|
|
8
8
|
ev.preventDefault();
|
|
@@ -51,5 +51,5 @@ export function OtpInputs({ name, length, onLastChange, ...props }) {
|
|
|
51
51
|
if (inputs) {
|
|
52
52
|
inputs.current[index] = el;
|
|
53
53
|
}
|
|
54
|
-
}, ...
|
|
54
|
+
}, ...p }, index)));
|
|
55
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInputContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/PasswordInput/PasswordInputContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PasswordInputContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/PasswordInput/PasswordInputContext.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,eAAO,MAAM,oBAAoB,gDAAoE,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PasswordInputFieldPropsT } from "./passwordInputTypes";
|
|
2
|
-
export declare function PasswordInputField(
|
|
2
|
+
export declare function PasswordInputField(p: PasswordInputFieldPropsT): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PasswordInputField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInputField.d.ts","sourceRoot":"","sources":["../../../src/react-components/PasswordInput/PasswordInputField.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,wBAAgB,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"PasswordInputField.d.ts","sourceRoot":"","sources":["../../../src/react-components/PasswordInput/PasswordInputField.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,wBAAwB,2CAM7D"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { use } from "react";
|
|
4
4
|
import { PasswordInputContext } from "./PasswordInputContext";
|
|
5
|
-
export function PasswordInputField(
|
|
5
|
+
export function PasswordInputField(p) {
|
|
6
6
|
const { isVisible } = use(PasswordInputContext);
|
|
7
|
-
return (_jsx("input", { type: isVisible ? "text" : "password", ...
|
|
7
|
+
return (_jsx("input", { type: isVisible ? "text" : "password", ...p }));
|
|
8
8
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PasswordInputRootPropsT } from "./passwordInputTypes";
|
|
2
|
-
export declare function PasswordInputRoot(
|
|
2
|
+
export declare function PasswordInputRoot(p: PasswordInputRootPropsT): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PasswordInputRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInputRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/PasswordInput/PasswordInputRoot.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,wBAAgB,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"PasswordInputRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/PasswordInput/PasswordInputRoot.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,uBAAuB,2CAQ3D"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { PasswordInputContext } from "./PasswordInputContext";
|
|
5
|
-
export function PasswordInputRoot(
|
|
5
|
+
export function PasswordInputRoot(p) {
|
|
6
6
|
const [isVisible, setIsVisible] = useState(false);
|
|
7
|
-
return (_jsx(PasswordInputContext, { value: { isVisible, setIsVisible }, children: _jsx("label", { ...
|
|
7
|
+
return (_jsx(PasswordInputContext, { value: { isVisible, setIsVisible }, children: _jsx("label", { ...p }) }));
|
|
8
8
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PasswordInputTogglePropsT } from "./passwordInputTypes";
|
|
2
|
-
export declare function PasswordInputToggle({ visibleChildren, onClick, children, ...
|
|
2
|
+
export declare function PasswordInputToggle({ visibleChildren, onClick, children, ...p }: PasswordInputTogglePropsT): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PasswordInputToggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInputToggle.d.ts","sourceRoot":"","sources":["../../../src/react-components/PasswordInput/PasswordInputToggle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,wBAAgB,mBAAmB,CAAC,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"PasswordInputToggle.d.ts","sourceRoot":"","sources":["../../../src/react-components/PasswordInput/PasswordInputToggle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,wBAAgB,mBAAmB,CAAC,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,EAAE,yBAAyB,2CAgB1G"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { use } from "react";
|
|
4
4
|
import { PasswordInputContext } from "./PasswordInputContext";
|
|
5
|
-
export function PasswordInputToggle({ visibleChildren, onClick, children, ...
|
|
5
|
+
export function PasswordInputToggle({ visibleChildren, onClick, children, ...p }) {
|
|
6
6
|
const { isVisible, setIsVisible } = use(PasswordInputContext);
|
|
7
|
-
return (_jsx("button", { type: "button", onClick: ev => {
|
|
8
|
-
setIsVisible(
|
|
7
|
+
return (_jsx("button", { type: "button", "data-state": isVisible, onClick: ev => {
|
|
8
|
+
setIsVisible(isVisible);
|
|
9
9
|
onClick?.(ev);
|
|
10
|
-
}, ...
|
|
10
|
+
}, ...p, children: isVisible ? visibleChildren : children }));
|
|
11
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ComponentProps,
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
export type PasswordInputContextT = {
|
|
3
3
|
isVisible: boolean;
|
|
4
|
-
setIsVisible:
|
|
4
|
+
setIsVisible: (newState: boolean) => void;
|
|
5
5
|
};
|
|
6
6
|
export type PasswordInputRootPropsT = ComponentProps<"label">;
|
|
7
7
|
export type PasswordInputFieldPropsT = ComponentProps<"input">;
|
|
8
|
-
export type PasswordInputTogglePropsT = ComponentProps<"button"> & {
|
|
8
|
+
export type PasswordInputTogglePropsT = Omit<ComponentProps<"button">, "type"> & {
|
|
9
9
|
visibleChildren: ReactNode;
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=passwordInputTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passwordInputTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/PasswordInput/passwordInputTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"passwordInputTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/PasswordInput/passwordInputTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;AAE9D,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;AAE/D,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,GAAG;IAC/E,eAAe,EAAE,SAAS,CAAC;CAC5B,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { PopoverBody } from "./PopoverBody";
|
|
2
2
|
import { PopoverRoot } from "./PopoverRoot";
|
|
3
3
|
import { PopoverToggle } from "./PopoverToggle";
|
|
4
|
-
import { PopoverNavigation } from "./PopoverNavigation";
|
|
5
4
|
export declare const Popover: typeof PopoverRoot & {
|
|
6
|
-
Navigation: typeof PopoverNavigation;
|
|
7
5
|
Toggle: typeof PopoverToggle;
|
|
8
6
|
Body: typeof PopoverBody;
|
|
9
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/Popover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/Popover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,OAAO;;;CAGlB,CAAC;AAEH,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { PopoverBody } from "./PopoverBody";
|
|
2
2
|
import { PopoverRoot } from "./PopoverRoot";
|
|
3
3
|
import { PopoverToggle } from "./PopoverToggle";
|
|
4
|
-
import { PopoverNavigation } from "./PopoverNavigation";
|
|
5
4
|
export const Popover = Object.assign(PopoverRoot, {
|
|
6
|
-
Navigation: PopoverNavigation,
|
|
7
5
|
Toggle: PopoverToggle,
|
|
8
6
|
Body: PopoverBody,
|
|
9
7
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PopoverBodyPropsT } from "./popoverTypes";
|
|
2
|
-
export declare function PopoverBody({ preventClose, onClick, ...p }: PopoverBodyPropsT): import("react/jsx-runtime").JSX.Element
|
|
2
|
+
export declare function PopoverBody({ preventClose, onClick, ...p }: PopoverBodyPropsT): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PopoverBody.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverBody.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/PopoverBody.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,wBAAgB,WAAW,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"PopoverBody.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/PopoverBody.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,wBAAgB,WAAW,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,iBAAiB,2CAkB7E"}
|
|
@@ -4,10 +4,10 @@ import { use } from "react";
|
|
|
4
4
|
import { PopoverContext } from "./PopoverContext";
|
|
5
5
|
export function PopoverBody({ preventClose, onClick, ...p }) {
|
|
6
6
|
const { bodyRef, isOpen } = use(PopoverContext);
|
|
7
|
-
return
|
|
7
|
+
return (_jsx("div", { ref: bodyRef, "data-state": isOpen, "data-access-navigation": isOpen, onClick: (ev) => {
|
|
8
8
|
if (preventClose) {
|
|
9
9
|
ev.stopPropagation();
|
|
10
10
|
}
|
|
11
11
|
onClick?.(ev);
|
|
12
|
-
}, ...p }))
|
|
12
|
+
}, ...p }));
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/PopoverContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PopoverContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/PopoverContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,cAAc,0CAAwD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/PopoverRoot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PopoverRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/PopoverRoot.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD,wBAAgB,WAAW,CAAC,EAC1B,IAAc,EACd,YAAY,EACZ,YAAY,EACZ,GAAG,CAAC,EACL,EAAE,iBAAiB,2CAgEnB"}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { usePathname } from "next/navigation";
|
|
4
4
|
import { useEffect, useRef, useState } from "react";
|
|
5
|
-
import { selectAccessibleChildren } from "../../utils-exports";
|
|
6
5
|
import { PopoverContext } from "./PopoverContext";
|
|
6
|
+
import { selectAccessibleChildren } from "../../utils-exports";
|
|
7
|
+
import { AccessNavigation } from "../AccessNavigation/AccessNavigation";
|
|
7
8
|
export function PopoverRoot({ mode = "click", onMouseEnter, onMouseLeave, ...p }) {
|
|
8
9
|
const pathname = usePathname();
|
|
9
10
|
const [isOpen, setOpen] = useState(false);
|
|
@@ -35,7 +36,7 @@ export function PopoverRoot({ mode = "click", onMouseEnter, onMouseLeave, ...p }
|
|
|
35
36
|
}
|
|
36
37
|
firstChild.focus();
|
|
37
38
|
};
|
|
38
|
-
return (_jsx(PopoverContext, { value: { isOpen, setOpen, toggleRef, bodyRef, mode }, children: _jsx(
|
|
39
|
+
return (_jsx(PopoverContext, { value: { isOpen, setOpen, toggleRef, bodyRef, mode }, children: _jsx(AccessNavigation, { onMouseEnter: (ev) => {
|
|
39
40
|
onMouseEnter?.(ev);
|
|
40
41
|
if (["hover", "both"].includes(mode)) {
|
|
41
42
|
ev.stopPropagation();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PopoverTogglePropsT } from "./popoverTypes";
|
|
2
|
-
export declare function PopoverToggle({ onClick, ...
|
|
2
|
+
export declare function PopoverToggle({ onClick, ...p }: PopoverTogglePropsT): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PopoverToggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverToggle.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/PopoverToggle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"PopoverToggle.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/PopoverToggle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,mBAAmB,2CAkBnE"}
|