@porsche-design-system/components-react 2.18.0 → 2.19.0-rc.1

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.1",
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.1"
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
 
@@ -7930,9 +7930,10 @@ const transformSelector = (selector) => ['a', 'button'].map((tag) => selector.re
7930
7930
  const getComponentCss$b = (size, weight, theme) => {
7931
7931
  const { baseColor, hoverColor, activeColor, focusColor } = getThemedColors(theme);
7932
7932
  return getCss({
7933
- '@global': Object.assign({ ':host': Object.assign({ display: 'block' }, addImportantToEachRule({
7934
- position: 'relative',
7935
- })) }, addImportantToEachRule(Object.assign(Object.assign({
7933
+ '@global': Object.assign({ ':host': {
7934
+ display: 'block',
7935
+ position: addImportantToRule('relative'),
7936
+ } }, addImportantToEachRule(Object.assign(Object.assign({
7936
7937
  // would be nice to use shared selector like '::slotted([role])'
7937
7938
  // but this doesn't work reliably when rendering in browser
7938
7939
  [transformSelector('::slotted([role])')]: {
@@ -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
 
@@ -7928,9 +7928,10 @@ const transformSelector = (selector) => ['a', 'button'].map((tag) => selector.re
7928
7928
  const getComponentCss$b = (size, weight, theme) => {
7929
7929
  const { baseColor, hoverColor, activeColor, focusColor } = getThemedColors(theme);
7930
7930
  return getCss({
7931
- '@global': Object.assign({ ':host': Object.assign({ display: 'block' }, addImportantToEachRule({
7932
- position: 'relative',
7933
- })) }, addImportantToEachRule(Object.assign(Object.assign({
7931
+ '@global': Object.assign({ ':host': {
7932
+ display: 'block',
7933
+ position: addImportantToRule('relative'),
7934
+ } }, addImportantToEachRule(Object.assign(Object.assign({
7934
7935
  // would be nice to use shared selector like '::slotted([role])'
7935
7936
  // but this doesn't work reliably when rendering in browser
7936
7937
  [transformSelector('::slotted([role])')]: {
@@ -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