@kadoui/react 2.1.7 → 2.3.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.map +1 -1
- package/dist/react-components/Accordion/AccordionBody.js +4 -1
- 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.map +1 -1
- package/dist/react-components/Accordion/AccordionToggle.js +20 -2
- package/dist/react-components/Accordion/accordionTypes.d.ts +20 -5
- 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/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.js +8 -8
- package/dist/react-components/Choice/choiceTypes.d.ts +8 -9
- package/dist/react-components/Choice/choiceTypes.d.ts.map +1 -1
- 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.js +2 -2
- package/dist/react-components/Drawer/drawerTypes.d.ts +2 -2
- 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.js +2 -2
- package/dist/react-components/Modal/modalTypes.d.ts +2 -2
- package/dist/react-components/Modal/modalTypes.d.ts.map +1 -1
- package/dist/react-components/Pagination/PaginationCounts.d.ts +1 -1
- package/dist/react-components/Pagination/PaginationCounts.d.ts.map +1 -1
- package/dist/react-components/Pagination/PaginationCounts.js +10 -7
- package/dist/react-components/Pagination/PaginationTypes.d.ts +4 -2
- package/dist/react-components/Pagination/PaginationTypes.d.ts.map +1 -1
- 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/PasswordInputToggle.d.ts.map +1 -1
- package/dist/react-components/PasswordInput/PasswordInputToggle.js +2 -2
- package/dist/react-components/PasswordInput/passwordInputTypes.d.ts +2 -2
- 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.js +1 -1
- package/dist/react-components/Popover/popoverTypes.d.ts +3 -4
- 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.js +2 -2
- package/dist/react-components/Sheet/sheetTypes.d.ts +2 -2
- 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/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 +2 -2
- 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
|
@@ -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);
|
|
@@ -3,9 +3,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { use } from "react";
|
|
4
4
|
import { DrawerContext } from "./DrawerContext";
|
|
5
5
|
export function DrawerToggle({ onClick, ...p }) {
|
|
6
|
-
const { setOpen } = use(DrawerContext);
|
|
6
|
+
const { isOpen, setOpen } = use(DrawerContext);
|
|
7
7
|
return (_jsx("button", { type: "button", onClick: (ev) => {
|
|
8
8
|
onClick?.(ev);
|
|
9
|
-
setOpen(
|
|
9
|
+
setOpen(isOpen);
|
|
10
10
|
}, ...p }));
|
|
11
11
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
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"> & {
|
|
@@ -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);
|
|
@@ -3,9 +3,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { use } from "react";
|
|
4
4
|
import { ModalContext } from "./ModalContext";
|
|
5
5
|
export function ModalToggle({ onClick, ...p }) {
|
|
6
|
-
const { setOpen } = use(ModalContext);
|
|
6
|
+
const { isOpen, setOpen } = use(ModalContext);
|
|
7
7
|
return (_jsx("button", { type: "button", onClick: (ev) => {
|
|
8
8
|
onClick?.(ev);
|
|
9
|
-
setOpen(
|
|
9
|
+
setOpen(!isOpen);
|
|
10
10
|
}, ...p }));
|
|
11
11
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
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;
|
|
@@ -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 { PaginationCountsPropsT } from "./PaginationTypes";
|
|
2
|
-
export declare function PaginationCounts({ onClick, ...p }: PaginationCountsPropsT): import("react/jsx-runtime").JSX.Element[];
|
|
2
|
+
export declare function PaginationCounts({ ProgressElem, onClick, ...p }: PaginationCountsPropsT): import("react/jsx-runtime").JSX.Element[];
|
|
3
3
|
//# sourceMappingURL=PaginationCounts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationCounts.d.ts","sourceRoot":"","sources":["../../../src/react-components/Pagination/PaginationCounts.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"PaginationCounts.d.ts","sourceRoot":"","sources":["../../../src/react-components/Pagination/PaginationCounts.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,wBAAgB,gBAAgB,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,sBAAsB,6CA6BvF"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { use } from "react";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cloneElement, Fragment, use } from "react";
|
|
4
4
|
import { PaginationContext } from "./PaginationContext";
|
|
5
|
-
export function PaginationCounts({ onClick, ...p }) {
|
|
5
|
+
export function PaginationCounts({ ProgressElem, onClick, ...p }) {
|
|
6
6
|
const { pagesLength, page, setPage } = use(PaginationContext);
|
|
7
|
-
return Array.from({ length: pagesLength }).map((_, index) => (_jsx("button", { "data-state": index + 1 === page, onClick: (ev) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
return (Array.from({ length: pagesLength }).map((_, index) => (_jsxs(Fragment, { children: [_jsx("button", { "data-state": (index + 1) === page, "data-skipped": (index + 1) < page, onClick: (ev) => {
|
|
8
|
+
onClick?.(ev);
|
|
9
|
+
setPage(index + 1);
|
|
10
|
+
}, ...p, children: index + 1 }), ProgressElem && (index + 1) < pagesLength ? (cloneElement(ProgressElem, {
|
|
11
|
+
"data-state": (index + 1) === page,
|
|
12
|
+
"data-skipped": (index + 1) < page,
|
|
13
|
+
})) : null] }, index))));
|
|
11
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentProps, Dispatch, ReactNode, SetStateAction } from "react";
|
|
1
|
+
import type { ComponentProps, Dispatch, JSX, ReactNode, SetStateAction } from "react";
|
|
2
2
|
export type PaginationPagesT = {
|
|
3
3
|
name: string;
|
|
4
4
|
component: ReactNode;
|
|
@@ -28,7 +28,9 @@ export type PaginationStateRootPropsT = PaginationPropsT & {
|
|
|
28
28
|
export type PaginationSearchParamsRootPropsT = PaginationPropsT & {
|
|
29
29
|
pageKey?: string;
|
|
30
30
|
};
|
|
31
|
-
export type PaginationCountsPropsT = Omit<ComponentProps<"button">, "children"
|
|
31
|
+
export type PaginationCountsPropsT = Omit<ComponentProps<"button">, "children"> & {
|
|
32
|
+
ProgressElem?: JSX.Element;
|
|
33
|
+
};
|
|
32
34
|
export type PaginationNextBtnPropsT = ComponentProps<"button"> & {
|
|
33
35
|
disabled?: boolean;
|
|
34
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/Pagination/PaginationTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"PaginationTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/Pagination/PaginationTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,QAAQ,EAAE,GAAG,EAAgB,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEnH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC;AAEF,KAAK,iBAAiB,GAAG,qBAAqB,GAAG,oBAAoB,CAAC;AAEtE,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,GAAG;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,gBAAgB,GAAG;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG;IAChF,YAAY,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
@@ -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 +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,CAAC,EAAE,EAAE,yBAAyB,
|
|
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"}
|
|
@@ -4,8 +4,8 @@ import { use } from "react";
|
|
|
4
4
|
import { PasswordInputContext } from "./PasswordInputContext";
|
|
5
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,7 +1,7 @@
|
|
|
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">;
|
|
@@ -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,18 +1,17 @@
|
|
|
1
|
-
import type { ComponentProps,
|
|
1
|
+
import type { ComponentProps, RefObject } from "react";
|
|
2
2
|
import type { AccessNavigationPropsT } from "../AccessNavigation/AccessNavigation";
|
|
3
3
|
export type PopoverContextT = {
|
|
4
4
|
isOpen: boolean;
|
|
5
|
-
setOpen:
|
|
5
|
+
setOpen: (newState: boolean) => void;
|
|
6
6
|
toggleRef: RefObject<HTMLButtonElement | null>;
|
|
7
7
|
bodyRef: RefObject<HTMLDivElement | null>;
|
|
8
8
|
mode: "click" | "hover" | "both";
|
|
9
9
|
};
|
|
10
|
-
export type PopoverRootPropsT =
|
|
10
|
+
export type PopoverRootPropsT = AccessNavigationPropsT & {
|
|
11
11
|
mode?: PopoverContextT["mode"];
|
|
12
12
|
};
|
|
13
13
|
export type PopoverBodyPropsT = ComponentProps<"div"> & {
|
|
14
14
|
preventClose?: boolean;
|
|
15
15
|
};
|
|
16
16
|
export type PopoverTogglePropsT = Omit<ComponentProps<"button">, "type">;
|
|
17
|
-
export type PopoverNavigationPropsT = AccessNavigationPropsT;
|
|
18
17
|
//# sourceMappingURL=popoverTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popoverTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/popoverTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"popoverTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/popoverTypes.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,eAAe,GAAG;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC/C,OAAO,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC1C,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,GAAG;IACvD,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACtD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectBoxInput.d.ts","sourceRoot":"","sources":["../../../src/react-components/SelectBox/SelectBoxInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectBoxInput.d.ts","sourceRoot":"","sources":["../../../src/react-components/SelectBox/SelectBoxInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EAAE,oBAAoB,2CAE7D"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { SelectBoxListPropsT } from "./selectBoxTypes";
|
|
2
|
-
export default function SelectBoxList(p: SelectBoxListPropsT): import("react/jsx-runtime").JSX.Element
|
|
2
|
+
export default function SelectBoxList(p: SelectBoxListPropsT): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=SelectBoxList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectBoxList.d.ts","sourceRoot":"","sources":["../../../src/react-components/SelectBox/SelectBoxList.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectBoxList.d.ts","sourceRoot":"","sources":["../../../src/react-components/SelectBox/SelectBoxList.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,EAAE,mBAAmB,2CAU3D"}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { use } from "react";
|
|
4
4
|
import { SelectBoxContext } from "./SelectBoxContext";
|
|
5
|
-
import { AccessNavigation } from "../AccessNavigation/AccessNavigation";
|
|
6
5
|
export default function SelectBoxList(p) {
|
|
7
6
|
const { inputFocused } = use(SelectBoxContext);
|
|
8
|
-
return
|
|
7
|
+
return (_jsx("div", { "data-state": inputFocused, "data-access-navigation": inputFocused, ...p }));
|
|
9
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectBoxRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/SelectBox/SelectBoxRoot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectBoxRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/SelectBox/SelectBoxRoot.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAqB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE/E,wBAAgB,aAAa,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,mBAAmB,2CA2ClH"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useRef, useState, useEffect } from "react";
|
|
4
4
|
import { SelectBoxContext } from "./SelectBoxContext";
|
|
5
|
+
import { AccessNavigation } from "../AccessNavigation/AccessNavigation";
|
|
5
6
|
export function SelectBoxRoot({ multiSelect, optionValue, setOptionValue, options, ref, ...p }) {
|
|
6
7
|
const [inputFocused, setInputFocused] = useState(false);
|
|
7
8
|
const [inputSearch, setInputSearch] = useState("");
|
|
@@ -12,8 +13,17 @@ export function SelectBoxRoot({ multiSelect, optionValue, setOptionValue, option
|
|
|
12
13
|
setInputFocused(false);
|
|
13
14
|
}
|
|
14
15
|
};
|
|
16
|
+
const handleEscape = (e) => {
|
|
17
|
+
if (e.key === "Escape") {
|
|
18
|
+
setInputFocused(false);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
document.addEventListener("keydown", handleEscape);
|
|
15
22
|
document.addEventListener("click", handleClickOutside);
|
|
16
|
-
return () =>
|
|
23
|
+
return () => {
|
|
24
|
+
document.removeEventListener("keydown", handleEscape);
|
|
25
|
+
document.removeEventListener("click", handleClickOutside);
|
|
26
|
+
};
|
|
17
27
|
}, []);
|
|
18
28
|
const contextValue = {
|
|
19
29
|
multiSelect,
|
|
@@ -25,5 +35,5 @@ export function SelectBoxRoot({ multiSelect, optionValue, setOptionValue, option
|
|
|
25
35
|
inputSearch,
|
|
26
36
|
setInputSearch,
|
|
27
37
|
};
|
|
28
|
-
return (_jsx(SelectBoxContext, { value: contextValue, children: _jsx(
|
|
38
|
+
return (_jsx(SelectBoxContext, { value: contextValue, children: _jsx(AccessNavigation, { ref: selectBoxRootRef, ...p }) }));
|
|
29
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectBoxSearchInput.d.ts","sourceRoot":"","sources":["../../../src/react-components/SelectBox/SelectBoxSearchInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectBoxSearchInput.d.ts","sourceRoot":"","sources":["../../../src/react-components/SelectBox/SelectBoxSearchInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAEnE,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,CAAC,EAAE,0BAA0B,2CAIzE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentProps,
|
|
1
|
+
import type { ComponentProps, RefObject } from "react";
|
|
2
2
|
import type { AccessNavigationPropsT } from "../AccessNavigation/AccessNavigation";
|
|
3
3
|
export type SelectBoxOptionT = {
|
|
4
4
|
name: string;
|
|
@@ -7,22 +7,22 @@ export type SelectBoxOptionT = {
|
|
|
7
7
|
export type WithMultiSelect = {
|
|
8
8
|
multiSelect: true;
|
|
9
9
|
optionValue: SelectBoxOptionT[];
|
|
10
|
-
setOptionValue:
|
|
10
|
+
setOptionValue: (newOptionValue: SelectBoxOptionT[]) => void;
|
|
11
11
|
};
|
|
12
12
|
export type WithSingleSelect = {
|
|
13
13
|
multiSelect?: false;
|
|
14
14
|
optionValue: SelectBoxOptionT | null;
|
|
15
|
-
setOptionValue:
|
|
15
|
+
setOptionValue: (newOptionValue: SelectBoxOptionT | null) => void;
|
|
16
16
|
};
|
|
17
17
|
export type MergedSelectMode = WithMultiSelect | WithSingleSelect;
|
|
18
18
|
export type SelectBoxContextT = MergedSelectMode & {
|
|
19
19
|
inputFocused: boolean;
|
|
20
|
-
setInputFocused:
|
|
20
|
+
setInputFocused: (newState: boolean) => void;
|
|
21
21
|
inputSearch: string;
|
|
22
|
-
setInputSearch:
|
|
22
|
+
setInputSearch: (newInputSearch: string) => void;
|
|
23
23
|
options: SelectBoxOptionT[];
|
|
24
24
|
};
|
|
25
|
-
export type SelectBoxRootPropsT =
|
|
25
|
+
export type SelectBoxRootPropsT = AccessNavigationPropsT & MergedSelectMode & {
|
|
26
26
|
ref?: RefObject<HTMLDivElement | null>;
|
|
27
27
|
options: SelectBoxOptionT[];
|
|
28
28
|
};
|
|
@@ -30,6 +30,6 @@ export type SelectBoxFieldPropsT = ComponentProps<"input">;
|
|
|
30
30
|
export type SelectBoxSearchFieldPropsT = ComponentProps<"input">;
|
|
31
31
|
export type SelectBoxSearchInputPropsT = ComponentProps<"label">;
|
|
32
32
|
export type SelectBoxInputPropsT = ComponentProps<"label">;
|
|
33
|
-
export type SelectBoxListPropsT =
|
|
33
|
+
export type SelectBoxListPropsT = ComponentProps<"div">;
|
|
34
34
|
export type SelectBoxOptionsPropsT = ComponentProps<"button">;
|
|
35
35
|
//# sourceMappingURL=selectBoxTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectBoxTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/SelectBox/selectBoxTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"selectBoxTypes.d.ts","sourceRoot":"","sources":["../../../src/react-components/SelectBox/selectBoxTypes.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,gBAAgB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,IAAI,CAAC;IAClB,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,cAAc,EAAE,CAAC,cAAc,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACrC,cAAc,EAAE,CAAC,cAAc,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;CACnE,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG;IACjD,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,GACtD,gBAAgB,GAAG;IACjB,GAAG,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACtC,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC7B,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;AAE3D,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;AAEjE,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;AAEjE,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAExD,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetBody.d.ts","sourceRoot":"","sources":["../../../src/react-components/Sheet/SheetBody.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SheetBody.d.ts","sourceRoot":"","sources":["../../../src/react-components/Sheet/SheetBody.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,wBAAgB,SAAS,CAAC,EAAE,aAAa,EAAE,GAAG,CAAC,EAAE,EAAE,eAAe,2CAqDjE"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { use, useEffect, useRef } from "react";
|
|
4
4
|
import { motion, useDragControls } from "framer-motion";
|
|
5
|
-
import { FRAMER_MOTION_DURATION } from "../../configs";
|
|
6
5
|
import { SheetContext } from "./SheetContext";
|
|
6
|
+
import { FRAMER_MOTION_DURATION } from "../../configs";
|
|
7
7
|
export function SheetBody({ onPointerDown, ...p }) {
|
|
8
8
|
const controls = useDragControls();
|
|
9
9
|
const { isOpen, y, closeHandler: handleClose } = use(SheetContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/Sheet/SheetContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SheetContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/Sheet/SheetContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,eAAO,MAAM,YAAY,wCAAoD,CAAC"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { use } from "react";
|
|
4
4
|
import { AnimatePresence, motion } from "framer-motion";
|
|
5
|
-
import { ClientOnly } from "../ClientOnly/ClientOnly";
|
|
6
5
|
import { Portal } from "../Portal/Portal";
|
|
7
6
|
import { SheetContext } from "./SheetContext";
|
|
7
|
+
import { ClientOnly } from "../ClientOnly/ClientOnly";
|
|
8
8
|
export function SheetPortal(p) {
|
|
9
9
|
const { isOpen, closeHandler: handleClose, scope } = use(SheetContext);
|
|
10
10
|
return (_jsx(ClientOnly, { children: _jsx(Portal, { children: _jsx(AnimatePresence, { children: isOpen ? (_jsx(motion.div, { ref: scope, onClick: handleClose, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, ...p })) : null }) }) }));
|