@pega/cosmos-react-core 3.0.0-dev.21.2 → 3.0.0-dev.22.0

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 (69) hide show
  1. package/lib/components/Configuration/Configuration.d.ts.map +1 -1
  2. package/lib/components/Configuration/Configuration.js +4 -3
  3. package/lib/components/Configuration/Configuration.js.map +1 -1
  4. package/lib/components/Configuration/index.d.ts +0 -1
  5. package/lib/components/Configuration/index.d.ts.map +1 -1
  6. package/lib/components/Configuration/index.js +0 -1
  7. package/lib/components/Configuration/index.js.map +1 -1
  8. package/lib/components/Link/Link.d.ts.map +1 -1
  9. package/lib/components/Link/Link.js +2 -4
  10. package/lib/components/Link/Link.js.map +1 -1
  11. package/lib/components/Modal/MinimizedModal.d.ts.map +1 -1
  12. package/lib/components/Modal/MinimizedModal.js +2 -5
  13. package/lib/components/Modal/MinimizedModal.js.map +1 -1
  14. package/lib/components/Modal/Modal.d.ts.map +1 -1
  15. package/lib/components/Modal/Modal.js +3 -5
  16. package/lib/components/Modal/Modal.js.map +1 -1
  17. package/lib/components/Modal/ModalManager.d.ts.map +1 -1
  18. package/lib/components/Modal/ModalManager.js +2 -11
  19. package/lib/components/Modal/ModalManager.js.map +1 -1
  20. package/lib/components/Modal/index.d.ts +0 -1
  21. package/lib/components/Modal/index.d.ts.map +1 -1
  22. package/lib/components/Modal/index.js +0 -1
  23. package/lib/components/Modal/index.js.map +1 -1
  24. package/lib/components/RadioCheck/RadioCheck.js +1 -1
  25. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  26. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
  27. package/lib/components/RadioCheckGroup/RadioCheckGroup.js +0 -1
  28. package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
  29. package/lib/components/Toaster/Context.d.ts +7 -0
  30. package/lib/components/Toaster/Context.d.ts.map +1 -0
  31. package/lib/components/Toaster/Context.js +6 -0
  32. package/lib/components/Toaster/Context.js.map +1 -0
  33. package/lib/components/Toaster/Toaster.d.ts +3 -40
  34. package/lib/components/Toaster/Toaster.d.ts.map +1 -1
  35. package/lib/components/Toaster/Toaster.js +8 -8
  36. package/lib/components/Toaster/Toaster.js.map +1 -1
  37. package/lib/components/Toaster/Toaster.types.d.ts +31 -0
  38. package/lib/components/Toaster/Toaster.types.d.ts.map +1 -0
  39. package/lib/components/Toaster/Toaster.types.js +2 -0
  40. package/lib/components/Toaster/Toaster.types.js.map +1 -0
  41. package/lib/components/Toaster/index.d.ts +1 -2
  42. package/lib/components/Toaster/index.d.ts.map +1 -1
  43. package/lib/components/Toaster/index.js +0 -1
  44. package/lib/components/Toaster/index.js.map +1 -1
  45. package/lib/hooks/index.d.ts +3 -0
  46. package/lib/hooks/index.d.ts.map +1 -1
  47. package/lib/hooks/index.js +3 -0
  48. package/lib/hooks/index.js.map +1 -1
  49. package/lib/hooks/useConfiguration.d.ts +1 -0
  50. package/lib/hooks/useConfiguration.d.ts.map +1 -1
  51. package/lib/hooks/useConfiguration.js +9 -2
  52. package/lib/hooks/useConfiguration.js.map +1 -1
  53. package/lib/hooks/useModalContext.d.ts +7 -0
  54. package/lib/hooks/useModalContext.d.ts.map +1 -0
  55. package/lib/hooks/useModalContext.js +12 -0
  56. package/lib/hooks/useModalContext.js.map +1 -0
  57. package/lib/hooks/useModalManager.d.ts +8 -0
  58. package/lib/hooks/useModalManager.d.ts.map +1 -0
  59. package/lib/hooks/useModalManager.js +16 -0
  60. package/lib/hooks/useModalManager.js.map +1 -0
  61. package/lib/hooks/useToaster.d.ts +8 -0
  62. package/lib/hooks/useToaster.d.ts.map +1 -0
  63. package/lib/hooks/useToaster.js +16 -0
  64. package/lib/hooks/useToaster.js.map +1 -0
  65. package/lib/register-contexts.d.ts +2 -0
  66. package/lib/register-contexts.d.ts.map +1 -0
  67. package/lib/register-contexts.js +10 -0
  68. package/lib/register-contexts.js.map +1 -0
  69. package/package.json +4 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useModalManager.js","sourceRoot":"","sources":["../../src/hooks/useModalManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;;GAGG;AACH,MAAM,eAAe,GAAG,GAAG,EAAE;IAC3B,MAAM,OAAO,GAAG,iBAAiB;QAC/B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,mBAAmB,IAAI,mBAAmB;QAC1D,CAAC,CAAC,mBAAmB,CAAC;IAExB,OAAO,UAAU,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { useContext } from 'react';\n\nimport '../init';\nimport { windowIsAvailable } from '../utils';\nimport { ModalManagerContext } from '../components/Modal/Contexts';\n\n/**\n * @example const { create } = useModalManger();\n * @returns ...\n */\nconst useModalManager = () => {\n const context = windowIsAvailable\n ? window.cosmos.modalManagerContext ?? ModalManagerContext\n : ModalManagerContext;\n\n return useContext(context);\n};\n\nexport default useModalManager;\n"]}
@@ -0,0 +1,8 @@
1
+ import '../init';
2
+ /**
3
+ * @example const { push } = useToaster();
4
+ * @returns ...
5
+ */
6
+ declare const useToaster: () => import("../components/Toaster/Context").ToasterContextValue;
7
+ export default useToaster;
8
+ //# sourceMappingURL=useToaster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useToaster.d.ts","sourceRoot":"","sources":["../../src/hooks/useToaster.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,CAAC;AAIjB;;;GAGG;AACH,QAAA,MAAM,UAAU,mEAMf,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { useContext } from 'react';
2
+ import '../init';
3
+ import { windowIsAvailable } from '../utils';
4
+ import { ToasterContext } from '../components/Toaster/Context';
5
+ /**
6
+ * @example const { push } = useToaster();
7
+ * @returns ...
8
+ */
9
+ const useToaster = () => {
10
+ const context = windowIsAvailable
11
+ ? window.cosmos.toasterContext ?? ToasterContext
12
+ : ToasterContext;
13
+ return useContext(context);
14
+ };
15
+ export default useToaster;
16
+ //# sourceMappingURL=useToaster.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useToaster.js","sourceRoot":"","sources":["../../src/hooks/useToaster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D;;;GAGG;AACH,MAAM,UAAU,GAAG,GAAG,EAAE;IACtB,MAAM,OAAO,GAAG,iBAAiB;QAC/B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,IAAI,cAAc;QAChD,CAAC,CAAC,cAAc,CAAC;IAEnB,OAAO,UAAU,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { useContext } from 'react';\n\nimport '../init';\nimport { windowIsAvailable } from '../utils';\nimport { ToasterContext } from '../components/Toaster/Context';\n\n/**\n * @example const { push } = useToaster();\n * @returns ...\n */\nconst useToaster = () => {\n const context = windowIsAvailable\n ? window.cosmos.toasterContext ?? ToasterContext\n : ToasterContext;\n\n return useContext(context);\n};\n\nexport default useToaster;\n"]}
@@ -0,0 +1,2 @@
1
+ import './init';
2
+ //# sourceMappingURL=register-contexts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-contexts.d.ts","sourceRoot":"","sources":["../src/register-contexts.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import './init';
2
+ import { ConfigurationContext } from './components/Configuration/Configuration';
3
+ import { ModalManagerContext } from './components/Modal/Contexts';
4
+ import { ToasterContext } from './components/Toaster/Context';
5
+ if (window) {
6
+ window.cosmos.configurationContext = ConfigurationContext;
7
+ window.cosmos.modalManagerContext = ModalManagerContext;
8
+ window.cosmos.toasterContext = ToasterContext;
9
+ }
10
+ //# sourceMappingURL=register-contexts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-contexts.js","sourceRoot":"","sources":["../src/register-contexts.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,CAAC;AAChB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,IAAI,MAAM,EAAE;IACV,MAAM,CAAC,MAAM,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IAC1D,MAAM,CAAC,MAAM,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IACxD,MAAM,CAAC,MAAM,CAAC,cAAc,GAAG,cAAc,CAAC;CAC/C","sourcesContent":["import './init';\nimport { ConfigurationContext } from './components/Configuration/Configuration';\nimport { ModalManagerContext } from './components/Modal/Contexts';\nimport { ToasterContext } from './components/Toaster/Context';\n\nif (window) {\n window.cosmos.configurationContext = ConfigurationContext;\n window.cosmos.modalManagerContext = ModalManagerContext;\n window.cosmos.toasterContext = ToasterContext;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-core",
3
- "version": "3.0.0-dev.21.2",
3
+ "version": "3.0.0-dev.22.0",
4
4
  "description": "Cosmos is a visual design system and UI component collection. Its goal is to empower application developers in their pursuit to create engaging and rewarding user experiences.",
5
5
  "author": "Pegasystems",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -17,7 +17,9 @@
17
17
  ],
18
18
  "sideEffects": [
19
19
  "./src/init.ts",
20
- "./lib/init.js"
20
+ "./lib/init.js",
21
+ "./src/register-contexts.ts",
22
+ "./lib/register-contexts.js"
21
23
  ],
22
24
  "scripts": {
23
25
  "build": "tsc -b"