@porsche-design-system/components-react 2.18.0 → 2.19.0-rc.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@porsche-design-system/components-react",
3
- "version": "2.18.0",
3
+ "version": "2.19.0-rc.0",
4
4
  "description": "Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.",
5
5
  "keywords": [
6
6
  "porsche",
@@ -17,7 +17,7 @@
17
17
  "license": "SEE LICENSE IN LICENSE",
18
18
  "homepage": "https://designsystem.porsche.com",
19
19
  "dependencies": {
20
- "@porsche-design-system/components-js": "2.18.0"
20
+ "@porsche-design-system/components-js": "2.19.0-rc.0"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=17.0.0 <19.0.0",
package/partials/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var partials = require('@porsche-design-system/components-js/partials');
6
4
 
7
5
 
package/provider.js CHANGED
@@ -11,7 +11,7 @@ const PorscheDesignSystemContext = react.createContext({
11
11
  const PorscheDesignSystemProvider = ({ prefix = '', ...props }) => {
12
12
  react.useEffect(() => {
13
13
  componentsJs.load({ prefix });
14
- }, [prefix]);
14
+ }, []); // No runtime prefix change is supported
15
15
  return jsxRuntime.jsx(PorscheDesignSystemContext.Provider, { value: { prefix }, ...props });
16
16
  };
17
17
 
@@ -55,7 +55,7 @@ const useToastManager = () => {
55
55
  const tagName = usePrefix('p-toast');
56
56
  return {
57
57
  addMessage: (message) => {
58
- const toast = document.querySelector(tagName);
58
+ const toast = document.body.querySelector(tagName);
59
59
  customElements.whenDefined(tagName).then(() => toast.addMessage(message));
60
60
  },
61
61
  };
@@ -11,7 +11,7 @@ const PorscheDesignSystemContext = react.createContext({
11
11
  const PorscheDesignSystemProvider = ({ prefix = '', ...props }) => {
12
12
  react.useEffect(() => {
13
13
  componentsJs.load({ prefix });
14
- }, [prefix]);
14
+ }, []); // No runtime prefix change is supported
15
15
  return jsxRuntime.jsx(PorscheDesignSystemContext.Provider, { value: { prefix }, ...props });
16
16
  };
17
17
 
@@ -53,7 +53,7 @@ const useToastManager = () => {
53
53
  const tagName = usePrefix('p-toast');
54
54
  return {
55
55
  addMessage: (message) => {
56
- const toast = document.querySelector(tagName);
56
+ const toast = document.body.querySelector(tagName);
57
57
  customElements.whenDefined(tagName).then(() => toast.addMessage(message));
58
58
  },
59
59
  };
@@ -9,7 +9,7 @@ const PorscheDesignSystemContext = createContext({
9
9
  const PorscheDesignSystemProvider = ({ prefix = '', ...props }) => {
10
10
  useEffect(() => {
11
11
  load({ prefix });
12
- }, [prefix]);
12
+ }, []); // No runtime prefix change is supported
13
13
  return jsx(PorscheDesignSystemContext.Provider, { value: { prefix }, ...props });
14
14
  };
15
15