@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.
Files changed (166) hide show
  1. package/README.md +1 -1
  2. package/dist/react-components/AccessNavigation/AccessNavigation.d.ts +2 -2
  3. package/dist/react-components/AccessNavigation/AccessNavigation.d.ts.map +1 -1
  4. package/dist/react-components/AccessNavigation/AccessNavigation.js +8 -7
  5. package/dist/react-components/Accordion/Accordion.d.ts +4 -0
  6. package/dist/react-components/Accordion/Accordion.d.ts.map +1 -1
  7. package/dist/react-components/Accordion/Accordion.js +5 -1
  8. package/dist/react-components/Accordion/AccordionBody.d.ts +1 -1
  9. package/dist/react-components/Accordion/AccordionBody.d.ts.map +1 -1
  10. package/dist/react-components/Accordion/AccordionBody.js +6 -3
  11. package/dist/react-components/Accordion/AccordionContent.d.ts +3 -0
  12. package/dist/react-components/Accordion/AccordionContent.d.ts.map +1 -0
  13. package/dist/react-components/Accordion/AccordionContent.js +5 -0
  14. package/dist/react-components/Accordion/AccordionContext.d.ts +9 -2
  15. package/dist/react-components/Accordion/AccordionContext.d.ts.map +1 -1
  16. package/dist/react-components/Accordion/AccordionContext.js +1 -0
  17. package/dist/react-components/Accordion/AccordionItem.d.ts +3 -0
  18. package/dist/react-components/Accordion/AccordionItem.d.ts.map +1 -0
  19. package/dist/react-components/Accordion/AccordionItem.js +5 -0
  20. package/dist/react-components/Accordion/AccordionItemContext.d.ts +3 -0
  21. package/dist/react-components/Accordion/AccordionItemContext.d.ts.map +1 -0
  22. package/dist/react-components/Accordion/AccordionItemContext.js +3 -0
  23. package/dist/react-components/Accordion/AccordionRoot.d.ts +1 -1
  24. package/dist/react-components/Accordion/AccordionRoot.d.ts.map +1 -1
  25. package/dist/react-components/Accordion/AccordionRoot.js +3 -4
  26. package/dist/react-components/Accordion/AccordionToggle.d.ts +1 -1
  27. package/dist/react-components/Accordion/AccordionToggle.d.ts.map +1 -1
  28. package/dist/react-components/Accordion/AccordionToggle.js +23 -5
  29. package/dist/react-components/Accordion/accordionTypes.d.ts +21 -6
  30. package/dist/react-components/Accordion/accordionTypes.d.ts.map +1 -1
  31. package/dist/react-components/Affix/Affix.d.ts +1 -1
  32. package/dist/react-components/Affix/Affix.d.ts.map +1 -1
  33. package/dist/react-components/Affix/Affix.js +3 -2
  34. package/dist/react-components/Affix/affixTypes.d.ts +3 -1
  35. package/dist/react-components/Affix/affixTypes.d.ts.map +1 -1
  36. package/dist/react-components/Carousel/CarouselNextBtn.d.ts +1 -1
  37. package/dist/react-components/Carousel/CarouselNextBtn.d.ts.map +1 -1
  38. package/dist/react-components/Carousel/CarouselNextBtn.js +2 -2
  39. package/dist/react-components/Carousel/CarouselPrevBtn.d.ts +1 -1
  40. package/dist/react-components/Carousel/CarouselPrevBtn.d.ts.map +1 -1
  41. package/dist/react-components/Carousel/CarouselPrevBtn.js +2 -2
  42. package/dist/react-components/Choice/Choice.d.ts +0 -2
  43. package/dist/react-components/Choice/Choice.d.ts.map +1 -1
  44. package/dist/react-components/Choice/Choice.js +0 -2
  45. package/dist/react-components/Choice/ChoiceRoot.d.ts +1 -1
  46. package/dist/react-components/Choice/ChoiceRoot.d.ts.map +1 -1
  47. package/dist/react-components/Choice/ChoiceRoot.js +3 -2
  48. package/dist/react-components/Choice/ChoiceThumb.d.ts.map +1 -1
  49. package/dist/react-components/Choice/ChoiceThumb.js +1 -0
  50. package/dist/react-components/Choice/ChoiceToggle.d.ts.map +1 -1
  51. package/dist/react-components/Choice/ChoiceToggle.js +9 -9
  52. package/dist/react-components/Choice/choiceTypes.d.ts +9 -10
  53. package/dist/react-components/Choice/choiceTypes.d.ts.map +1 -1
  54. package/dist/react-components/Clipboard/Clipboard.d.ts +1 -1
  55. package/dist/react-components/Clipboard/Clipboard.d.ts.map +1 -1
  56. package/dist/react-components/Clipboard/Clipboard.js +2 -2
  57. package/dist/react-components/ContextMenu/ContextMenu.d.ts +0 -2
  58. package/dist/react-components/ContextMenu/ContextMenu.d.ts.map +1 -1
  59. package/dist/react-components/ContextMenu/ContextMenu.js +0 -2
  60. package/dist/react-components/ContextMenu/ContextMenuBody.d.ts.map +1 -1
  61. package/dist/react-components/ContextMenu/ContextMenuBody.js +5 -1
  62. package/dist/react-components/ContextMenu/ContextMenuContent.d.ts +3 -0
  63. package/dist/react-components/ContextMenu/ContextMenuContent.d.ts.map +1 -0
  64. package/dist/react-components/ContextMenu/ContextMenuContent.js +8 -0
  65. package/dist/react-components/ContextMenu/ContextMenuContext.d.ts.map +1 -1
  66. package/dist/react-components/ContextMenu/ContextMenuContext.js +1 -0
  67. package/dist/react-components/ContextMenu/ContextMenuRoot.d.ts.map +1 -1
  68. package/dist/react-components/ContextMenu/ContextMenuRoot.js +13 -2
  69. package/dist/react-components/ContextMenu/contextMenuTypes.d.ts +1 -2
  70. package/dist/react-components/ContextMenu/contextMenuTypes.d.ts.map +1 -1
  71. package/dist/react-components/Drawer/DrawerBody.js +1 -1
  72. package/dist/react-components/Drawer/DrawerContext.d.ts.map +1 -1
  73. package/dist/react-components/Drawer/DrawerContext.js +1 -0
  74. package/dist/react-components/Drawer/DrawerPortal.js +1 -1
  75. package/dist/react-components/Drawer/DrawerRoot.d.ts.map +1 -1
  76. package/dist/react-components/Drawer/DrawerRoot.js +1 -1
  77. package/dist/react-components/Drawer/DrawerToggle.d.ts +1 -1
  78. package/dist/react-components/Drawer/DrawerToggle.d.ts.map +1 -1
  79. package/dist/react-components/Drawer/DrawerToggle.js +5 -5
  80. package/dist/react-components/Drawer/drawerTypes.d.ts +3 -3
  81. package/dist/react-components/Drawer/drawerTypes.d.ts.map +1 -1
  82. package/dist/react-components/Modal/ModalPortal.d.ts.map +1 -1
  83. package/dist/react-components/Modal/ModalPortal.js +1 -1
  84. package/dist/react-components/Modal/ModalRoot.d.ts.map +1 -1
  85. package/dist/react-components/Modal/ModalRoot.js +2 -2
  86. package/dist/react-components/Modal/ModalToggle.d.ts +1 -1
  87. package/dist/react-components/Modal/ModalToggle.d.ts.map +1 -1
  88. package/dist/react-components/Modal/ModalToggle.js +5 -5
  89. package/dist/react-components/Modal/modalTypes.d.ts +3 -3
  90. package/dist/react-components/Modal/modalTypes.d.ts.map +1 -1
  91. package/dist/react-components/Otp/OtpInputs.d.ts +1 -1
  92. package/dist/react-components/Otp/OtpInputs.d.ts.map +1 -1
  93. package/dist/react-components/Otp/OtpInputs.js +2 -2
  94. package/dist/react-components/PasswordInput/PasswordInputContext.d.ts.map +1 -1
  95. package/dist/react-components/PasswordInput/PasswordInputContext.js +1 -0
  96. package/dist/react-components/PasswordInput/PasswordInputField.d.ts +1 -1
  97. package/dist/react-components/PasswordInput/PasswordInputField.d.ts.map +1 -1
  98. package/dist/react-components/PasswordInput/PasswordInputField.js +2 -2
  99. package/dist/react-components/PasswordInput/PasswordInputRoot.d.ts +1 -1
  100. package/dist/react-components/PasswordInput/PasswordInputRoot.d.ts.map +1 -1
  101. package/dist/react-components/PasswordInput/PasswordInputRoot.js +2 -2
  102. package/dist/react-components/PasswordInput/PasswordInputToggle.d.ts +1 -1
  103. package/dist/react-components/PasswordInput/PasswordInputToggle.d.ts.map +1 -1
  104. package/dist/react-components/PasswordInput/PasswordInputToggle.js +4 -4
  105. package/dist/react-components/PasswordInput/passwordInputTypes.d.ts +3 -3
  106. package/dist/react-components/PasswordInput/passwordInputTypes.d.ts.map +1 -1
  107. package/dist/react-components/Popover/Popover.d.ts +0 -2
  108. package/dist/react-components/Popover/Popover.d.ts.map +1 -1
  109. package/dist/react-components/Popover/Popover.js +0 -2
  110. package/dist/react-components/Popover/PopoverBody.d.ts +1 -1
  111. package/dist/react-components/Popover/PopoverBody.d.ts.map +1 -1
  112. package/dist/react-components/Popover/PopoverBody.js +2 -2
  113. package/dist/react-components/Popover/PopoverContext.d.ts.map +1 -1
  114. package/dist/react-components/Popover/PopoverContext.js +1 -0
  115. package/dist/react-components/Popover/PopoverRoot.d.ts.map +1 -1
  116. package/dist/react-components/Popover/PopoverRoot.js +3 -2
  117. package/dist/react-components/Popover/PopoverToggle.d.ts +1 -1
  118. package/dist/react-components/Popover/PopoverToggle.d.ts.map +1 -1
  119. package/dist/react-components/Popover/PopoverToggle.js +4 -4
  120. package/dist/react-components/Popover/popoverTypes.d.ts +4 -5
  121. package/dist/react-components/Popover/popoverTypes.d.ts.map +1 -1
  122. package/dist/react-components/SelectBox/SelectBoxInput.d.ts.map +1 -1
  123. package/dist/react-components/SelectBox/SelectBoxInput.js +1 -0
  124. package/dist/react-components/SelectBox/SelectBoxList.d.ts +1 -1
  125. package/dist/react-components/SelectBox/SelectBoxList.d.ts.map +1 -1
  126. package/dist/react-components/SelectBox/SelectBoxList.js +1 -2
  127. package/dist/react-components/SelectBox/SelectBoxRoot.d.ts.map +1 -1
  128. package/dist/react-components/SelectBox/SelectBoxRoot.js +12 -2
  129. package/dist/react-components/SelectBox/SelectBoxSearchInput.d.ts.map +1 -1
  130. package/dist/react-components/SelectBox/SelectBoxSearchInput.js +1 -0
  131. package/dist/react-components/SelectBox/selectBoxTypes.d.ts +7 -7
  132. package/dist/react-components/SelectBox/selectBoxTypes.d.ts.map +1 -1
  133. package/dist/react-components/Sheet/SheetBody.d.ts.map +1 -1
  134. package/dist/react-components/Sheet/SheetBody.js +1 -1
  135. package/dist/react-components/Sheet/SheetContext.d.ts.map +1 -1
  136. package/dist/react-components/Sheet/SheetContext.js +1 -0
  137. package/dist/react-components/Sheet/SheetPortal.js +1 -1
  138. package/dist/react-components/Sheet/SheetRoot.d.ts.map +1 -1
  139. package/dist/react-components/Sheet/SheetRoot.js +2 -2
  140. package/dist/react-components/Sheet/SheetToggle.d.ts +1 -1
  141. package/dist/react-components/Sheet/SheetToggle.d.ts.map +1 -1
  142. package/dist/react-components/Sheet/SheetToggle.js +5 -5
  143. package/dist/react-components/Sheet/sheetTypes.d.ts +3 -3
  144. package/dist/react-components/Sheet/sheetTypes.d.ts.map +1 -1
  145. package/dist/react-components/ShowMore/ShowMore.d.ts +1 -1
  146. package/dist/react-components/ShowMore/ShowMore.d.ts.map +1 -1
  147. package/dist/react-components/ShowMore/ShowMore.js +1 -1
  148. package/dist/react-components/ShowMore/ShowMoreContent.d.ts +1 -1
  149. package/dist/react-components/ShowMore/ShowMoreContent.d.ts.map +1 -1
  150. package/dist/react-components/ShowMore/ShowMoreContent.js +2 -2
  151. package/dist/react-components/ShowMore/ShowMoreContext.d.ts.map +1 -1
  152. package/dist/react-components/ShowMore/ShowMoreContext.js +1 -0
  153. package/dist/react-components/ShowMore/ShowMoreToggle.d.ts.map +1 -1
  154. package/dist/react-components/ShowMore/ShowMoreToggle.js +3 -3
  155. package/dist/react-components/ShowMore/showMoreTypes.d.ts +3 -3
  156. package/dist/react-components/ShowMore/showMoreTypes.d.ts.map +1 -1
  157. package/dist/react-components/Spoiler/SpoilerContext.d.ts.map +1 -1
  158. package/dist/react-components/Spoiler/SpoilerContext.js +1 -0
  159. package/dist/react-components/Spoiler/SpoilerRoot.js +1 -1
  160. package/dist/react-components/Spoiler/spoilerTypes.d.ts +2 -2
  161. package/dist/react-components/Spoiler/spoilerTypes.d.ts.map +1 -1
  162. package/dist/tsconfig.tsbuildinfo +1 -1
  163. package/dist/utils/browser.d.ts +1 -1
  164. package/dist/utils/browser.d.ts.map +1 -1
  165. package/dist/utils/browser.js +32 -9
  166. 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;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,eAAO,MAAM,WAAW;;;;CAItB,CAAC;AAEH,cAAc,oBAAoB,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;AAEhE,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,GAAG,CAAC,EAAE,EAAE,qBAAqB,2CAmB7E"}
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
- return (_jsx("div", { ref: contentRef, "data-state": isOpen, onContextMenu: (ev) => {
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,3 @@
1
+ import { ContextMenuContentPropsT } from "./contextMenuTypes";
2
+ export declare function ContextMenuContent({ focusOnMount, ...p }: ContextMenuContentPropsT): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=ContextMenuContent.d.ts.map
@@ -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":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,eAAO,MAAM,kBAAkB,8CAAgE,CAAC"}
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,2 +1,3 @@
1
+ "use client";
1
2
  import { createContext } from "react";
2
3
  export const ContextMenuContext = createContext({});
@@ -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,2CAyE7E"}
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
- setOpen(true);
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 = ComponentProps<"div">;
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,EAAY,SAAS,EAAkB,MAAM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,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":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,eAAO,MAAM,aAAa,yCAAsD,CAAC"}
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"}
@@ -1,2 +1,3 @@
1
+ "use client";
1
2
  import { createContext } from "react";
2
3
  export const DrawerContext = createContext({});
@@ -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":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,2CA2CxD"}
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, ...props }: DrawerTogglePropsT): import("react/jsx-runtime").JSX.Element;
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,KAAK,EAAE,EAAE,kBAAkB,2CAYrE"}
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, ...props }) {
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(prev => !prev);
10
- }, ...props }));
9
+ setOpen(isOpen);
10
+ }, ...p }));
11
11
  }
@@ -1,13 +1,13 @@
1
1
  import type { HTMLMotionProps } from "framer-motion";
2
- import type { ComponentProps, Dispatch, PropsWithChildren, SetStateAction } from "react";
2
+ import type { ComponentProps, PropsWithChildren } from "react";
3
3
  export type DrawerContextT = {
4
4
  isOpen: boolean;
5
- setOpen: Dispatch<SetStateAction<boolean>>;
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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AM,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":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,iBAAiB,2CAuB/D"}
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":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,WAAmB,EAAE,EAAE,eAAe,2CA0C3E"}
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 { getBrowserScrollbarWith } from "../../utils-exports";
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, ...props }: ModalTogglePropsT): import("react/jsx-runtime").JSX.Element;
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,KAAK,EAAE,EAAE,iBAAiB,2CAYnE"}
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, ...props }) {
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((prev) => !prev);
10
- }, ...props }));
9
+ setOpen(!isOpen);
10
+ }, ...p }));
11
11
  }
@@ -1,15 +1,15 @@
1
1
  import type { HTMLMotionProps } from "framer-motion";
2
- import type { ComponentProps, Dispatch, PropsWithChildren, SetStateAction } from "react";
2
+ import type { ComponentProps, PropsWithChildren } from "react";
3
3
  export type ModalContextT = {
4
4
  isOpen: boolean;
5
- setOpen: Dispatch<SetStateAction<boolean>>;
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,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;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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, ...props }: OtpInputsPropsT): import("react/jsx-runtime").JSX.Element[];
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,KAAK,EAAE,EAAE,eAAe,6CAwElF"}
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, ...props }) {
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
- }, ...props }, index)));
54
+ }, ...p }, index)));
55
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordInputContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/PasswordInput/PasswordInputContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,eAAO,MAAM,oBAAoB,gDAAoE,CAAC"}
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,2 +1,3 @@
1
+ "use client";
1
2
  import { createContext } from "react";
2
3
  export const PasswordInputContext = createContext({});
@@ -1,3 +1,3 @@
1
1
  import type { PasswordInputFieldPropsT } from "./passwordInputTypes";
2
- export declare function PasswordInputField(props: PasswordInputFieldPropsT): import("react/jsx-runtime").JSX.Element;
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,KAAK,EAAE,wBAAwB,2CAMjE"}
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(props) {
5
+ export function PasswordInputField(p) {
6
6
  const { isVisible } = use(PasswordInputContext);
7
- return (_jsx("input", { type: isVisible ? "text" : "password", ...props }));
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(props: PasswordInputRootPropsT): import("react/jsx-runtime").JSX.Element;
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,KAAK,EAAE,uBAAuB,2CAQ/D"}
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(props) {
5
+ export function PasswordInputRoot(p) {
6
6
  const [isVisible, setIsVisible] = useState(false);
7
- return (_jsx(PasswordInputContext, { value: { isVisible, setIsVisible }, children: _jsx("label", { ...props }) }));
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, ...props }: PasswordInputTogglePropsT): import("react/jsx-runtime").JSX.Element;
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,KAAK,EAAE,EAAE,yBAAyB,2CAe9G"}
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, ...props }) {
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(prev => !prev);
7
+ return (_jsx("button", { type: "button", "data-state": isVisible, onClick: ev => {
8
+ setIsVisible(isVisible);
9
9
  onClick?.(ev);
10
- }, ...props, children: isVisible ? visibleChildren : children }));
10
+ }, ...p, children: isVisible ? visibleChildren : children }));
11
11
  }
@@ -1,11 +1,11 @@
1
- import type { ComponentProps, Dispatch, ReactNode, SetStateAction } from "react";
1
+ import type { ComponentProps, ReactNode } from "react";
2
2
  export type PasswordInputContextT = {
3
3
  isVisible: boolean;
4
- setIsVisible: Dispatch<SetStateAction<boolean>>;
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,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEjF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CACjD,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,cAAc,CAAC,QAAQ,CAAC,GAAG;IACjE,eAAe,EAAE,SAAS,CAAC;CAC5B,CAAC"}
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;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,eAAO,MAAM,OAAO;;;;CAIlB,CAAC;AAEH,cAAc,gBAAgB,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 | null;
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,kDAiB7E"}
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 isOpen ? (_jsx("div", { ref: bodyRef, "data-state": isOpen, onClick: (ev) => {
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 })) : null;
12
+ }, ...p }));
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverContext.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/PopoverContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,cAAc,0CAAwD,CAAC"}
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,2 +1,3 @@
1
+ "use client";
1
2
  import { createContext } from "react";
2
3
  export const PopoverContext = createContext({});
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverRoot.d.ts","sourceRoot":"","sources":["../../../src/react-components/Popover/PopoverRoot.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,wBAAgB,WAAW,CAAC,EAC1B,IAAc,EACd,YAAY,EACZ,YAAY,EACZ,GAAG,CAAC,EACL,EAAE,iBAAiB,2CAiEnB"}
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("div", { "data-state": isOpen, onMouseEnter: (ev) => {
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, ...props }: PopoverTogglePropsT): import("react/jsx-runtime").JSX.Element;
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,KAAK,EAAE,EAAE,mBAAmB,2CAiBvE"}
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"}