@cerberus-design/react 0.12.0 → 0.13.1-next-e3e9e48

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 (61) hide show
  1. package/build/legacy/_tsup-dts-rollup.d.cts +128 -1
  2. package/build/legacy/components/Portal.cjs +3 -5
  3. package/build/legacy/components/Portal.cjs.map +1 -1
  4. package/build/legacy/components/Tooltip.cjs +55 -0
  5. package/build/legacy/components/Tooltip.cjs.map +1 -0
  6. package/build/legacy/context/confirm-modal.cjs +2 -5
  7. package/build/legacy/context/confirm-modal.cjs.map +1 -1
  8. package/build/legacy/context/cta-modal.cjs +2 -5
  9. package/build/legacy/context/cta-modal.cjs.map +1 -1
  10. package/build/legacy/context/notification-center.cjs +3 -6
  11. package/build/legacy/context/notification-center.cjs.map +1 -1
  12. package/build/legacy/context/prompt-modal.cjs +2 -5
  13. package/build/legacy/context/prompt-modal.cjs.map +1 -1
  14. package/build/legacy/hooks/useDate.cjs +122 -0
  15. package/build/legacy/hooks/useDate.cjs.map +1 -0
  16. package/build/legacy/hooks/useModal.cjs.map +1 -1
  17. package/build/legacy/index.cjs +214 -93
  18. package/build/legacy/index.cjs.map +1 -1
  19. package/build/modern/_tsup-dts-rollup.d.ts +128 -1
  20. package/build/modern/{chunk-ZBMA5G54.js → chunk-7MM5KYEX.js} +4 -4
  21. package/build/modern/chunk-CZND26FC.js +98 -0
  22. package/build/modern/chunk-CZND26FC.js.map +1 -0
  23. package/build/modern/{chunk-T6LS5P5W.js → chunk-J4LOSTEP.js} +13 -13
  24. package/build/modern/chunk-K2PSHGS7.js +11 -0
  25. package/build/modern/chunk-K2PSHGS7.js.map +1 -0
  26. package/build/modern/{chunk-CSEHDNMJ.js → chunk-KFGI37CO.js} +12 -12
  27. package/build/modern/{chunk-7T3JIGM7.js → chunk-KGQG5JGW.js} +1 -1
  28. package/build/modern/chunk-KGQG5JGW.js.map +1 -0
  29. package/build/modern/chunk-KML4CTMK.js +33 -0
  30. package/build/modern/chunk-KML4CTMK.js.map +1 -0
  31. package/build/modern/{chunk-5OSUZUR4.js → chunk-KUT2YEEQ.js} +7 -7
  32. package/build/modern/chunk-KUT2YEEQ.js.map +1 -0
  33. package/build/modern/{chunk-VP5ERLAY.js → chunk-NCUHRVW2.js} +15 -15
  34. package/build/modern/components/FileStatus.js +2 -2
  35. package/build/modern/components/Portal.js +2 -1
  36. package/build/modern/components/Tooltip.js +7 -0
  37. package/build/modern/components/Tooltip.js.map +1 -0
  38. package/build/modern/context/confirm-modal.js +5 -5
  39. package/build/modern/context/cta-modal.js +5 -5
  40. package/build/modern/context/notification-center.js +3 -3
  41. package/build/modern/context/prompt-modal.js +6 -6
  42. package/build/modern/hooks/useDate.js +14 -0
  43. package/build/modern/hooks/useDate.js.map +1 -0
  44. package/build/modern/hooks/useModal.js +1 -1
  45. package/build/modern/index.js +43 -29
  46. package/build/modern/index.js.map +1 -1
  47. package/package.json +2 -2
  48. package/src/components/Portal.tsx +17 -6
  49. package/src/components/Tooltip.tsx +61 -0
  50. package/src/context/notification-center.tsx +1 -1
  51. package/src/hooks/useDate.ts +164 -0
  52. package/src/hooks/useModal.ts +1 -1
  53. package/src/index.ts +2 -0
  54. package/build/modern/chunk-5OSUZUR4.js.map +0 -1
  55. package/build/modern/chunk-7T3JIGM7.js.map +0 -1
  56. package/build/modern/chunk-GLY7GU5S.js +0 -14
  57. package/build/modern/chunk-GLY7GU5S.js.map +0 -1
  58. /package/build/modern/{chunk-ZBMA5G54.js.map → chunk-7MM5KYEX.js.map} +0 -0
  59. /package/build/modern/{chunk-T6LS5P5W.js.map → chunk-J4LOSTEP.js.map} +0 -0
  60. /package/build/modern/{chunk-CSEHDNMJ.js.map → chunk-KFGI37CO.js.map} +0 -0
  61. /package/build/modern/{chunk-VP5ERLAY.js.map → chunk-NCUHRVW2.js.map} +0 -0
@@ -1,14 +0,0 @@
1
- // src/components/Portal.tsx
2
- import { createPortal } from "react-dom";
3
- function Portal(props) {
4
- if (typeof window !== "undefined") {
5
- const container = props.container || document.body;
6
- return createPortal(props.children, container, props.key);
7
- }
8
- return null;
9
- }
10
-
11
- export {
12
- Portal
13
- };
14
- //# sourceMappingURL=chunk-GLY7GU5S.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Portal.tsx"],"sourcesContent":["import type { PropsWithChildren } from 'react'\nimport { createPortal } from 'react-dom'\n\n/**\n * This module is the Portal component.\n * @module\n */\n\nexport interface PortalProps {\n /**\n * The root container to render the children into.\n * @default document.body\n */\n container?: Element | DocumentFragment\n /**\n * An optional key to use for the Portal component.\n */\n key?: null | string\n}\n\n/**\n * The Portal component is used to render children into a DOM node that exists outside the DOM hierarchy of the parent component.\n * @see https://cerberus.digitalu.design/react/portal\n * @definition [React Portal Docs](https://react.dev/reference/react-dom/createPortal)\n */\nexport function Portal(props: PropsWithChildren<PortalProps>) {\n if (typeof window !== 'undefined') {\n const container = props.container || document.body\n return createPortal(props.children, container, props.key)\n }\n\n return null\n}\n"],"mappings":";AACA,SAAS,oBAAoB;AAwBtB,SAAS,OAAO,OAAuC;AAC5D,MAAI,OAAO,WAAW,aAAa;AACjC,UAAM,YAAY,MAAM,aAAa,SAAS;AAC9C,WAAO,aAAa,MAAM,UAAU,WAAW,MAAM,GAAG;AAAA,EAC1D;AAEA,SAAO;AACT;","names":[]}