@cerberus-design/react 0.12.0-next-c48abdf → 0.12.0-next-b214a9b

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.
@@ -2825,6 +2825,8 @@ declare interface UseModalReturnValue {
2825
2825
  */
2826
2826
  isOpen: boolean;
2827
2827
  }
2828
+ export { UseModalReturnValue }
2829
+ export { UseModalReturnValue as UseModalReturnValue_alias_1 }
2828
2830
 
2829
2831
  /**
2830
2832
  * Used to access the nav menu context.
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-VERRHMW4.js";
31
31
  import {
32
32
  useModal
33
- } from "./chunk-7T3JIGM7.js";
33
+ } from "./chunk-KGQG5JGW.js";
34
34
 
35
35
  // src/context/confirm-modal.tsx
36
36
  import {
@@ -176,4 +176,4 @@ export {
176
176
  ConfirmModal,
177
177
  useConfirmModal
178
178
  };
179
- //# sourceMappingURL=chunk-CSEHDNMJ.js.map
179
+ //# sourceMappingURL=chunk-CEC4EXVR.js.map
@@ -39,7 +39,7 @@ import {
39
39
  } from "./chunk-VERRHMW4.js";
40
40
  import {
41
41
  useModal
42
- } from "./chunk-7T3JIGM7.js";
42
+ } from "./chunk-KGQG5JGW.js";
43
43
 
44
44
  // src/context/prompt-modal.tsx
45
45
  import {
@@ -240,4 +240,4 @@ export {
240
240
  PromptModal,
241
241
  usePromptModal
242
242
  };
243
- //# sourceMappingURL=chunk-VP5ERLAY.js.map
243
+ //# sourceMappingURL=chunk-EZ56D7WO.js.map
@@ -24,4 +24,4 @@ function useModal() {
24
24
  export {
25
25
  useModal
26
26
  };
27
- //# sourceMappingURL=chunk-7T3JIGM7.js.map
27
+ //# sourceMappingURL=chunk-KGQG5JGW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useModal.ts"],"sourcesContent":["'use client'\n\nimport { useCallback, useMemo, useRef, useState, type RefObject } from 'react'\n\n/**\n * This module provides a hook for using a custom modal.\n * @module\n */\n\nexport interface UseModalReturnValue {\n /**\n * The ref for the modal.\n */\n modalRef: RefObject<HTMLDialogElement>\n /**\n * Shows the modal.\n */\n show: () => void\n /**\n * Closes the modal.\n */\n close: () => void\n /**\n * Whether the modal is open based on the show and close methods.\n */\n isOpen: boolean\n}\n\n/**\n * Provides a hook for using a custom modal via the native dialog element\n * methods.\n *\n * Cerberus modals use the native dialog element. This hook\n * does not control the modal via React state but rather by calling the\n * native dialog element's `showModal` and `close` methods.\n *\n * @memberof module:Modal\n * @see https://cerberus.digitalu.design/react/modal\n * @description [Moz Dev Dialog Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n */\nexport function useModal(): UseModalReturnValue {\n const modalRef = useRef<HTMLDialogElement | null>(null)\n const [isOpen, setIsOpen] = useState<boolean>(false)\n\n const show = useCallback(() => {\n modalRef.current?.showModal()\n setIsOpen(true)\n }, [])\n\n const close = useCallback(() => {\n modalRef.current?.close()\n setIsOpen(false)\n }, [])\n\n return useMemo(() => {\n return {\n modalRef,\n show,\n close,\n isOpen,\n }\n }, [modalRef, show, close, isOpen])\n}\n"],"mappings":";AAEA,SAAS,aAAa,SAAS,QAAQ,gBAAgC;AAsChE,SAAS,WAAgC;AAC9C,QAAM,WAAW,OAAiC,IAAI;AACtD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAkB,KAAK;AAEnD,QAAM,OAAO,YAAY,MAAM;AAC7B,aAAS,SAAS,UAAU;AAC5B,cAAU,IAAI;AAAA,EAChB,GAAG,CAAC,CAAC;AAEL,QAAM,QAAQ,YAAY,MAAM;AAC9B,aAAS,SAAS,MAAM;AACxB,cAAU,KAAK;AAAA,EACjB,GAAG,CAAC,CAAC;AAEL,SAAO,QAAQ,MAAM;AACnB,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,UAAU,MAAM,OAAO,MAAM,CAAC;AACpC;","names":[]}
@@ -33,7 +33,7 @@ import {
33
33
  } from "./chunk-VERRHMW4.js";
34
34
  import {
35
35
  useModal
36
- } from "./chunk-7T3JIGM7.js";
36
+ } from "./chunk-KGQG5JGW.js";
37
37
 
38
38
  // src/context/cta-modal.tsx
39
39
  import {
@@ -152,4 +152,4 @@ export {
152
152
  CTAModal,
153
153
  useCTAModal
154
154
  };
155
- //# sourceMappingURL=chunk-T6LS5P5W.js.map
155
+ //# sourceMappingURL=chunk-NJIX4CY2.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ConfirmModal,
4
4
  useConfirmModal
5
- } from "../chunk-CSEHDNMJ.js";
5
+ } from "../chunk-CEC4EXVR.js";
6
6
  import "../chunk-2UXE5PDG.js";
7
7
  import "../chunk-GLY7GU5S.js";
8
8
  import "../chunk-BE4EOU2P.js";
@@ -16,7 +16,7 @@ import "../chunk-VERRHMW4.js";
16
16
  import "../chunk-F27AAKQ3.js";
17
17
  import "../chunk-CP7OUC2Q.js";
18
18
  import "../chunk-HVKM54BA.js";
19
- import "../chunk-7T3JIGM7.js";
19
+ import "../chunk-KGQG5JGW.js";
20
20
  export {
21
21
  ConfirmModal,
22
22
  useConfirmModal
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CTAModal,
4
4
  useCTAModal
5
- } from "../chunk-T6LS5P5W.js";
5
+ } from "../chunk-NJIX4CY2.js";
6
6
  import "../chunk-2UXE5PDG.js";
7
7
  import "../chunk-GLY7GU5S.js";
8
8
  import "../chunk-BE4EOU2P.js";
@@ -17,7 +17,7 @@ import "../chunk-VERRHMW4.js";
17
17
  import "../chunk-F27AAKQ3.js";
18
18
  import "../chunk-CP7OUC2Q.js";
19
19
  import "../chunk-HVKM54BA.js";
20
- import "../chunk-7T3JIGM7.js";
20
+ import "../chunk-KGQG5JGW.js";
21
21
  export {
22
22
  CTAModal,
23
23
  useCTAModal
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  PromptModal,
4
4
  usePromptModal
5
- } from "../chunk-VP5ERLAY.js";
5
+ } from "../chunk-EZ56D7WO.js";
6
6
  import "../chunk-2UXE5PDG.js";
7
7
  import "../chunk-GLY7GU5S.js";
8
8
  import "../chunk-NKM6PISB.js";
@@ -19,7 +19,7 @@ import "../chunk-VERRHMW4.js";
19
19
  import "../chunk-F27AAKQ3.js";
20
20
  import "../chunk-CP7OUC2Q.js";
21
21
  import "../chunk-HVKM54BA.js";
22
- import "../chunk-7T3JIGM7.js";
22
+ import "../chunk-KGQG5JGW.js";
23
23
  export {
24
24
  PromptModal,
25
25
  usePromptModal
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  useModal
4
- } from "../chunk-7T3JIGM7.js";
4
+ } from "../chunk-KGQG5JGW.js";
5
5
  export {
6
6
  useModal
7
7
  };
@@ -5,11 +5,11 @@ import {
5
5
  import {
6
6
  ConfirmModal,
7
7
  useConfirmModal
8
- } from "./chunk-CSEHDNMJ.js";
8
+ } from "./chunk-CEC4EXVR.js";
9
9
  import {
10
10
  CTAModal,
11
11
  useCTAModal
12
- } from "./chunk-T6LS5P5W.js";
12
+ } from "./chunk-NJIX4CY2.js";
13
13
  import {
14
14
  NotificationCenter,
15
15
  useNotificationCenter
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  PromptModal,
19
19
  usePromptModal
20
- } from "./chunk-VP5ERLAY.js";
20
+ } from "./chunk-EZ56D7WO.js";
21
21
  import {
22
22
  Table,
23
23
  Tr
@@ -209,7 +209,7 @@ import "./chunk-CP7OUC2Q.js";
209
209
  import "./chunk-HVKM54BA.js";
210
210
  import {
211
211
  useModal
212
- } from "./chunk-7T3JIGM7.js";
212
+ } from "./chunk-KGQG5JGW.js";
213
213
 
214
214
  // src/index.ts
215
215
  export * from "@dnd-kit/core";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cerberus-design/react",
3
- "version": "0.12.0-next-c48abdf",
3
+ "version": "0.12.0-next-b214a9b",
4
4
  "description": "The Cerberus Design React component library.",
5
5
  "browserslist": "> 0.25%, not dead",
6
6
  "sideEffects": false,
@@ -27,7 +27,7 @@
27
27
  "react-dom": "^18",
28
28
  "tsup": "^8.1.0",
29
29
  "@cerberus-design/configs": "0.0.0",
30
- "@cerberus-design/styled-system": "0.12.0-next-c48abdf"
30
+ "@cerberus-design/styled-system": "0.12.0-next-b214a9b"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
@@ -7,7 +7,7 @@ import { useCallback, useMemo, useRef, useState, type RefObject } from 'react'
7
7
  * @module
8
8
  */
9
9
 
10
- interface UseModalReturnValue {
10
+ export interface UseModalReturnValue {
11
11
  /**
12
12
  * The ref for the modal.
13
13
  */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/useModal.ts"],"sourcesContent":["'use client'\n\nimport { useCallback, useMemo, useRef, useState, type RefObject } from 'react'\n\n/**\n * This module provides a hook for using a custom modal.\n * @module\n */\n\ninterface UseModalReturnValue {\n /**\n * The ref for the modal.\n */\n modalRef: RefObject<HTMLDialogElement>\n /**\n * Shows the modal.\n */\n show: () => void\n /**\n * Closes the modal.\n */\n close: () => void\n /**\n * Whether the modal is open based on the show and close methods.\n */\n isOpen: boolean\n}\n\n/**\n * Provides a hook for using a custom modal via the native dialog element\n * methods.\n *\n * Cerberus modals use the native dialog element. This hook\n * does not control the modal via React state but rather by calling the\n * native dialog element's `showModal` and `close` methods.\n *\n * @memberof module:Modal\n * @see https://cerberus.digitalu.design/react/modal\n * @description [Moz Dev Dialog Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n */\nexport function useModal(): UseModalReturnValue {\n const modalRef = useRef<HTMLDialogElement | null>(null)\n const [isOpen, setIsOpen] = useState<boolean>(false)\n\n const show = useCallback(() => {\n modalRef.current?.showModal()\n setIsOpen(true)\n }, [])\n\n const close = useCallback(() => {\n modalRef.current?.close()\n setIsOpen(false)\n }, [])\n\n return useMemo(() => {\n return {\n modalRef,\n show,\n close,\n isOpen,\n }\n }, [modalRef, show, close, isOpen])\n}\n"],"mappings":";AAEA,SAAS,aAAa,SAAS,QAAQ,gBAAgC;AAsChE,SAAS,WAAgC;AAC9C,QAAM,WAAW,OAAiC,IAAI;AACtD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAkB,KAAK;AAEnD,QAAM,OAAO,YAAY,MAAM;AAC7B,aAAS,SAAS,UAAU;AAC5B,cAAU,IAAI;AAAA,EAChB,GAAG,CAAC,CAAC;AAEL,QAAM,QAAQ,YAAY,MAAM;AAC9B,aAAS,SAAS,MAAM;AACxB,cAAU,KAAK;AAAA,EACjB,GAAG,CAAC,CAAC;AAEL,SAAO,QAAQ,MAAM;AACnB,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,UAAU,MAAM,OAAO,MAAM,CAAC;AACpC;","names":[]}