@porsche-design-system/components-react 3.15.0-rc.1 → 3.15.0-rc.3

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 (38) hide show
  1. package/CHANGELOG.md +34 -3
  2. package/cjs/lib/components/accordion.wrapper.cjs +3 -3
  3. package/cjs/lib/components/banner.wrapper.cjs +3 -3
  4. package/cjs/lib/components/inline-notification.wrapper.cjs +3 -3
  5. package/esm/lib/components/accordion.wrapper.d.ts +19 -3
  6. package/esm/lib/components/accordion.wrapper.mjs +3 -3
  7. package/esm/lib/components/banner.wrapper.d.ts +9 -1
  8. package/esm/lib/components/banner.wrapper.mjs +3 -3
  9. package/esm/lib/components/display.wrapper.d.ts +2 -2
  10. package/esm/lib/components/heading.wrapper.d.ts +2 -2
  11. package/esm/lib/components/inline-notification.wrapper.d.ts +9 -1
  12. package/esm/lib/components/inline-notification.wrapper.mjs +3 -3
  13. package/esm/lib/components/link-tile-model-signature.wrapper.d.ts +2 -2
  14. package/esm/lib/types.d.ts +24 -20
  15. package/package.json +2 -2
  16. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +42 -38
  17. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +2 -2
  18. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.cjs +4 -4
  19. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.cjs +4 -4
  20. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.cjs +4 -4
  21. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs +2 -2
  22. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.cjs +1 -1
  23. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.cjs +3 -1
  24. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +42 -38
  25. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +2 -2
  26. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.mjs +4 -4
  27. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.mjs +4 -4
  28. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.mjs +4 -4
  29. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +2 -2
  30. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +1 -1
  31. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +3 -1
  32. package/ssr/esm/lib/components/accordion.wrapper.d.ts +19 -3
  33. package/ssr/esm/lib/components/banner.wrapper.d.ts +9 -1
  34. package/ssr/esm/lib/components/display.wrapper.d.ts +2 -2
  35. package/ssr/esm/lib/components/heading.wrapper.d.ts +2 -2
  36. package/ssr/esm/lib/components/inline-notification.wrapper.d.ts +9 -1
  37. package/ssr/esm/lib/components/link-tile-model-signature.wrapper.d.ts +2 -2
  38. package/ssr/esm/lib/types.d.ts +24 -20
package/CHANGELOG.md CHANGED
@@ -14,12 +14,43 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
14
14
 
15
15
  ### [Unreleased]
16
16
 
17
+ ### [3.15.0-rc.3] - 2024-04-23
18
+
19
+ #### Fixed
20
+
21
+ - `Pin Code`: Fixed several problems with IME keyboards
22
+ ([#3197](https://github.com/porsche-design-system/porsche-design-system/pull/3197))
23
+
24
+ ### [3.15.0-rc.2] - 2024-04-22
25
+
26
+ #### Added
27
+
28
+ - `Accordion`: Add experimental property `sticky` for a fixed heading
29
+ ([#3181](https://github.com/porsche-design-system/porsche-design-system/pull/3181))
30
+ - `Inline Notification`, `Banner`: heading hierarchy can now be customized with `headingTag` prop
31
+ ([#3168](https://github.com/porsche-design-system/porsche-design-system/pull/3168))
32
+
33
+ #### Changed
34
+
35
+ - `Accordion`: `tag` property is deprecated. Use `headingTag` property instead to specify heading hierarchy level.
36
+ ([#3168](https://github.com/porsche-design-system/porsche-design-system/pull/3168))
37
+
38
+ ```diff
39
+ - <p-accordion tag="h3"></p-accordion>
40
+ + <p-accordion heading-tag="h3"></p-accordion>
41
+ ```
42
+
43
+ #### Fixed
44
+
45
+ - `Pin Code`: Input is entered twice in iOS
46
+ ([#3192](https://github.com/porsche-design-system/porsche-design-system/pull/3192))
47
+
17
48
  ### [3.15.0-rc.1] - 2024-04-17
18
49
 
19
- #### Added
50
+ #### Added
20
51
 
21
- - Partials: `getMetaTagsAndIconLinks`, `getComponentChunkLinks`, `getIconLinks` and `getFontLinks` support new format option `js`
22
- ([#3179](https://github.com/porsche-design-system/porsche-design-system/pull/3179))
52
+ - Partials: `getMetaTagsAndIconLinks`, `getComponentChunkLinks`, `getIconLinks` and `getFontLinks` support new format
53
+ option `js` ([#3179](https://github.com/porsche-design-system/porsche-design-system/pull/3179))
23
54
 
24
55
  ### [3.15.0-rc.0] - 2024-04-05
25
56
 
@@ -6,15 +6,15 @@ var react = require('react');
6
6
  var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
 
9
- const PAccordion = react.forwardRef(({ compact, heading, onAccordionChange, onUpdate, open, size = 'small', tag = 'h2', theme, className, ...rest }, ref) => {
9
+ const PAccordion = react.forwardRef(({ compact, heading, headingTag = 'h2', onAccordionChange, onUpdate, open, size = 'small', sticky, tag, theme, className, ...rest }, ref) => {
10
10
  const elementRef = react.useRef();
11
11
  hooks.useEventCallback(elementRef, 'accordionChange', onAccordionChange);
12
12
  hooks.useEventCallback(elementRef, 'update', onUpdate);
13
13
  const WebComponentTag = hooks.usePrefix('p-accordion');
14
- const propsToSync = [compact, heading, open, size, tag, theme || hooks.useTheme()];
14
+ const propsToSync = [compact, heading, headingTag, open, size, sticky, tag, theme || hooks.useTheme()];
15
15
  hooks.useBrowserLayoutEffect(() => {
16
16
  const { current } = elementRef;
17
- ['compact', 'heading', 'open', 'size', 'tag', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
17
+ ['compact', 'heading', 'headingTag', 'open', 'size', 'sticky', 'tag', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
18
18
  }, propsToSync);
19
19
  const props = {
20
20
  ...rest,
@@ -6,14 +6,14 @@ var react = require('react');
6
6
  var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
 
9
- const PBanner = react.forwardRef(({ description = '', dismissButton = true, heading = '', onDismiss, open = false, persistent, state = 'info', theme, width, className, ...rest }, ref) => {
9
+ const PBanner = react.forwardRef(({ description = '', dismissButton = true, heading = '', headingTag = 'h5', onDismiss, open = false, persistent, state = 'info', theme, width, className, ...rest }, ref) => {
10
10
  const elementRef = react.useRef();
11
11
  hooks.useEventCallback(elementRef, 'dismiss', onDismiss);
12
12
  const WebComponentTag = hooks.usePrefix('p-banner');
13
- const propsToSync = [description, dismissButton, heading, open, persistent, state, theme || hooks.useTheme(), width];
13
+ const propsToSync = [description, dismissButton, heading, headingTag, open, persistent, state, theme || hooks.useTheme(), width];
14
14
  hooks.useBrowserLayoutEffect(() => {
15
15
  const { current } = elementRef;
16
- ['description', 'dismissButton', 'heading', 'open', 'persistent', 'state', 'theme', 'width'].forEach((propName, i) => (current[propName] = propsToSync[i]));
16
+ ['description', 'dismissButton', 'heading', 'headingTag', 'open', 'persistent', 'state', 'theme', 'width'].forEach((propName, i) => (current[propName] = propsToSync[i]));
17
17
  }, propsToSync);
18
18
  const props = {
19
19
  ...rest,
@@ -6,15 +6,15 @@ var react = require('react');
6
6
  var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
 
9
- const PInlineNotification = react.forwardRef(({ actionIcon = 'arrow-right', actionLabel, actionLoading = false, description = '', dismissButton = true, heading = '', onAction, onDismiss, persistent, state = 'info', theme, className, ...rest }, ref) => {
9
+ const PInlineNotification = react.forwardRef(({ actionIcon = 'arrow-right', actionLabel, actionLoading = false, description = '', dismissButton = true, heading = '', headingTag = 'h5', onAction, onDismiss, persistent, state = 'info', theme, className, ...rest }, ref) => {
10
10
  const elementRef = react.useRef();
11
11
  hooks.useEventCallback(elementRef, 'action', onAction);
12
12
  hooks.useEventCallback(elementRef, 'dismiss', onDismiss);
13
13
  const WebComponentTag = hooks.usePrefix('p-inline-notification');
14
- const propsToSync = [actionIcon, actionLabel, actionLoading, description, dismissButton, heading, persistent, state, theme || hooks.useTheme()];
14
+ const propsToSync = [actionIcon, actionLabel, actionLoading, description, dismissButton, heading, headingTag, persistent, state, theme || hooks.useTheme()];
15
15
  hooks.useBrowserLayoutEffect(() => {
16
16
  const { current } = elementRef;
17
- ['actionIcon', 'actionLabel', 'actionLoading', 'description', 'dismissButton', 'heading', 'persistent', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
17
+ ['actionIcon', 'actionLabel', 'actionLoading', 'description', 'dismissButton', 'heading', 'headingTag', 'persistent', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
18
18
  }, propsToSync);
19
19
  const props = {
20
20
  ...rest,
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes } from 'react';
2
- import type { AccordionUpdateEventDetail, BreakpointCustomizable, AccordionSize, AccordionTag, Theme } from '../types';
2
+ import type { AccordionHeadingTag, AccordionUpdateEventDetail, BreakpointCustomizable, AccordionSize, AccordionTag, Theme } from '../types';
3
3
  export type PAccordionProps = Omit<HTMLAttributes<{}>, 'color'> & {
4
4
  /**
5
5
  * Displays the Accordion as compact version with thinner border and smaller paddings.
@@ -9,6 +9,10 @@ export type PAccordionProps = Omit<HTMLAttributes<{}>, 'color'> & {
9
9
  * Defines the heading used in accordion.
10
10
  */
11
11
  heading?: string;
12
+ /**
13
+ * Sets a heading tag, so it fits correctly within the outline of the page.
14
+ */
15
+ headingTag?: AccordionHeadingTag;
12
16
  /**
13
17
  * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when accordion state is changed.
14
18
  */
@@ -26,7 +30,11 @@ export type PAccordionProps = Omit<HTMLAttributes<{}>, 'color'> & {
26
30
  */
27
31
  size?: BreakpointCustomizable<AccordionSize>;
28
32
  /**
29
- * Sets a headline tag, so it fits correctly within the outline of the page.
33
+ * @experimental Sticks the Accordion heading at the top, fixed while scrolling
34
+ */
35
+ sticky?: boolean;
36
+ /**
37
+ * @deprecated , will be removed with next major release, use `heading-tag` instead. Sets a heading tag, so it fits correctly within the outline of the page.
30
38
  */
31
39
  tag?: AccordionTag;
32
40
  /**
@@ -43,6 +51,10 @@ export declare const PAccordion: import("react").ForwardRefExoticComponent<Omit<
43
51
  * Defines the heading used in accordion.
44
52
  */
45
53
  heading?: string | undefined;
54
+ /**
55
+ * Sets a heading tag, so it fits correctly within the outline of the page.
56
+ */
57
+ headingTag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
46
58
  /**
47
59
  * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when accordion state is changed.
48
60
  */
@@ -60,7 +72,11 @@ export declare const PAccordion: import("react").ForwardRefExoticComponent<Omit<
60
72
  */
61
73
  size?: BreakpointCustomizable<"small" | "medium"> | undefined;
62
74
  /**
63
- * Sets a headline tag, so it fits correctly within the outline of the page.
75
+ * @experimental Sticks the Accordion heading at the top, fixed while scrolling
76
+ */
77
+ sticky?: boolean | undefined;
78
+ /**
79
+ * @deprecated , will be removed with next major release, use `heading-tag` instead. Sets a heading tag, so it fits correctly within the outline of the page.
64
80
  */
65
81
  tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
66
82
  /**
@@ -4,15 +4,15 @@ import { forwardRef, useRef } from 'react';
4
4
  import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
5
5
  import { syncRef } from '../../utils.mjs';
6
6
 
7
- const PAccordion = forwardRef(({ compact, heading, onAccordionChange, onUpdate, open, size = 'small', tag = 'h2', theme, className, ...rest }, ref) => {
7
+ const PAccordion = forwardRef(({ compact, heading, headingTag = 'h2', onAccordionChange, onUpdate, open, size = 'small', sticky, tag, theme, className, ...rest }, ref) => {
8
8
  const elementRef = useRef();
9
9
  useEventCallback(elementRef, 'accordionChange', onAccordionChange);
10
10
  useEventCallback(elementRef, 'update', onUpdate);
11
11
  const WebComponentTag = usePrefix('p-accordion');
12
- const propsToSync = [compact, heading, open, size, tag, theme || useTheme()];
12
+ const propsToSync = [compact, heading, headingTag, open, size, sticky, tag, theme || useTheme()];
13
13
  useBrowserLayoutEffect(() => {
14
14
  const { current } = elementRef;
15
- ['compact', 'heading', 'open', 'size', 'tag', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
15
+ ['compact', 'heading', 'headingTag', 'open', 'size', 'sticky', 'tag', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
16
16
  }, propsToSync);
17
17
  const props = {
18
18
  ...rest,
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes } from 'react';
2
- import type { BannerState, Theme, BannerWidth } from '../types';
2
+ import type { BannerHeadingTag, BannerState, Theme, BannerWidth } from '../types';
3
3
  export type PBannerProps = Omit<HTMLAttributes<{}>, 'color'> & {
4
4
  /**
5
5
  * Description of the banner.
@@ -13,6 +13,10 @@ export type PBannerProps = Omit<HTMLAttributes<{}>, 'color'> & {
13
13
  * Heading of the banner.
14
14
  */
15
15
  heading?: string;
16
+ /**
17
+ * Sets a heading tag, so it fits correctly within the outline of the page.
18
+ */
19
+ headingTag?: BannerHeadingTag;
16
20
  /**
17
21
  * Emitted when the close button is clicked.
18
22
  */
@@ -52,6 +56,10 @@ export declare const PBanner: import("react").ForwardRefExoticComponent<Omit<HTM
52
56
  * Heading of the banner.
53
57
  */
54
58
  heading?: string | undefined;
59
+ /**
60
+ * Sets a heading tag, so it fits correctly within the outline of the page.
61
+ */
62
+ headingTag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
55
63
  /**
56
64
  * Emitted when the close button is clicked.
57
65
  */
@@ -4,14 +4,14 @@ import { forwardRef, useRef } from 'react';
4
4
  import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
5
5
  import { syncRef } from '../../utils.mjs';
6
6
 
7
- const PBanner = forwardRef(({ description = '', dismissButton = true, heading = '', onDismiss, open = false, persistent, state = 'info', theme, width, className, ...rest }, ref) => {
7
+ const PBanner = forwardRef(({ description = '', dismissButton = true, heading = '', headingTag = 'h5', onDismiss, open = false, persistent, state = 'info', theme, width, className, ...rest }, ref) => {
8
8
  const elementRef = useRef();
9
9
  useEventCallback(elementRef, 'dismiss', onDismiss);
10
10
  const WebComponentTag = usePrefix('p-banner');
11
- const propsToSync = [description, dismissButton, heading, open, persistent, state, theme || useTheme(), width];
11
+ const propsToSync = [description, dismissButton, heading, headingTag, open, persistent, state, theme || useTheme(), width];
12
12
  useBrowserLayoutEffect(() => {
13
13
  const { current } = elementRef;
14
- ['description', 'dismissButton', 'heading', 'open', 'persistent', 'state', 'theme', 'width'].forEach((propName, i) => (current[propName] = propsToSync[i]));
14
+ ['description', 'dismissButton', 'heading', 'headingTag', 'open', 'persistent', 'state', 'theme', 'width'].forEach((propName, i) => (current[propName] = propsToSync[i]));
15
15
  }, propsToSync);
16
16
  const props = {
17
17
  ...rest,
@@ -18,7 +18,7 @@ export type PDisplayProps = Omit<HTMLAttributes<{}>, 'color'> & {
18
18
  */
19
19
  size?: BreakpointCustomizable<DisplaySize>;
20
20
  /**
21
- * Sets a custom HTML tag depending on the usage of the display component.
21
+ * Sets a heading tag, so it fits correctly within the outline of the page.
22
22
  */
23
23
  tag?: DisplayTag;
24
24
  /**
@@ -44,7 +44,7 @@ export declare const PDisplay: import("react").ForwardRefExoticComponent<Omit<HT
44
44
  */
45
45
  size?: BreakpointCustomizable<"inherit" | "small" | "medium" | "large"> | undefined;
46
46
  /**
47
- * Sets a custom HTML tag depending on the usage of the display component.
47
+ * Sets a heading tag, so it fits correctly within the outline of the page.
48
48
  */
49
49
  tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
50
50
  /**
@@ -18,7 +18,7 @@ export type PHeadingProps = Omit<HTMLAttributes<{}>, 'color'> & {
18
18
  */
19
19
  size?: BreakpointCustomizable<HeadingSize>;
20
20
  /**
21
- * Sets a custom HTML tag depending on the usage of the heading component.
21
+ * Sets a heading tag, so it fits correctly within the outline of the page.
22
22
  */
23
23
  tag?: HeadingTag;
24
24
  /**
@@ -44,7 +44,7 @@ export declare const PHeading: import("react").ForwardRefExoticComponent<Omit<HT
44
44
  */
45
45
  size?: BreakpointCustomizable<"inherit" | "small" | "medium" | "large" | "x-large" | "xx-large"> | undefined;
46
46
  /**
47
- * Sets a custom HTML tag depending on the usage of the heading component.
47
+ * Sets a heading tag, so it fits correctly within the outline of the page.
48
48
  */
49
49
  tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
50
50
  /**
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes } from 'react';
2
- import type { InlineNotificationActionIcon, InlineNotificationState, Theme } from '../types';
2
+ import type { InlineNotificationActionIcon, InlineNotificationHeadingTag, InlineNotificationState, Theme } from '../types';
3
3
  export type PInlineNotificationProps = Omit<HTMLAttributes<{}>, 'color'> & {
4
4
  /**
5
5
  * Action icon of the inline-notification.
@@ -25,6 +25,10 @@ export type PInlineNotificationProps = Omit<HTMLAttributes<{}>, 'color'> & {
25
25
  * Heading of the inline-notification.
26
26
  */
27
27
  heading?: string;
28
+ /**
29
+ * Sets a heading tag, so it fits correctly within the outline of the page.
30
+ */
31
+ headingTag?: InlineNotificationHeadingTag;
28
32
  /**
29
33
  * Emitted when the action button is clicked.
30
34
  */
@@ -71,6 +75,10 @@ export declare const PInlineNotification: import("react").ForwardRefExoticCompon
71
75
  * Heading of the inline-notification.
72
76
  */
73
77
  heading?: string | undefined;
78
+ /**
79
+ * Sets a heading tag, so it fits correctly within the outline of the page.
80
+ */
81
+ headingTag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
74
82
  /**
75
83
  * Emitted when the action button is clicked.
76
84
  */
@@ -4,15 +4,15 @@ import { forwardRef, useRef } from 'react';
4
4
  import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
5
5
  import { syncRef } from '../../utils.mjs';
6
6
 
7
- const PInlineNotification = forwardRef(({ actionIcon = 'arrow-right', actionLabel, actionLoading = false, description = '', dismissButton = true, heading = '', onAction, onDismiss, persistent, state = 'info', theme, className, ...rest }, ref) => {
7
+ const PInlineNotification = forwardRef(({ actionIcon = 'arrow-right', actionLabel, actionLoading = false, description = '', dismissButton = true, heading = '', headingTag = 'h5', onAction, onDismiss, persistent, state = 'info', theme, className, ...rest }, ref) => {
8
8
  const elementRef = useRef();
9
9
  useEventCallback(elementRef, 'action', onAction);
10
10
  useEventCallback(elementRef, 'dismiss', onDismiss);
11
11
  const WebComponentTag = usePrefix('p-inline-notification');
12
- const propsToSync = [actionIcon, actionLabel, actionLoading, description, dismissButton, heading, persistent, state, theme || useTheme()];
12
+ const propsToSync = [actionIcon, actionLabel, actionLoading, description, dismissButton, heading, headingTag, persistent, state, theme || useTheme()];
13
13
  useBrowserLayoutEffect(() => {
14
14
  const { current } = elementRef;
15
- ['actionIcon', 'actionLabel', 'actionLoading', 'description', 'dismissButton', 'heading', 'persistent', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
15
+ ['actionIcon', 'actionLabel', 'actionLoading', 'description', 'dismissButton', 'heading', 'headingTag', 'persistent', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
16
16
  }, propsToSync);
17
17
  const props = {
18
18
  ...rest,
@@ -14,7 +14,7 @@ export type PLinkTileModelSignatureProps = Omit<HTMLAttributes<{}>, 'color'> & {
14
14
  */
15
15
  heading: string;
16
16
  /**
17
- * Sets a custom headline tag which wraps the heading to enhance semantics.
17
+ * Sets a heading tag, so it fits correctly within the outline of the page.
18
18
  */
19
19
  headingTag?: LinkTileModelSignatureHeadingTag;
20
20
  /**
@@ -44,7 +44,7 @@ export declare const PLinkTileModelSignature: import("react").ForwardRefExoticCo
44
44
  */
45
45
  heading: string;
46
46
  /**
47
- * Sets a custom headline tag which wraps the heading to enhance semantics.
47
+ * Sets a heading tag, so it fits correctly within the outline of the page.
48
48
  */
49
49
  headingTag?: "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
50
50
  /**
@@ -530,6 +530,15 @@ declare const HEADING_SIZES: readonly [
530
530
  "inherit"
531
531
  ];
532
532
  export type HeadingSize = (typeof HEADING_SIZES)[number];
533
+ declare const HEADING_TAGS: readonly [
534
+ "h1",
535
+ "h2",
536
+ "h3",
537
+ "h4",
538
+ "h5",
539
+ "h6"
540
+ ];
541
+ export type HeadingTag = typeof HEADING_TAGS[number];
533
542
  declare const TEXT_SIZES: readonly [
534
543
  "xx-small",
535
544
  "x-small",
@@ -587,15 +596,6 @@ declare const BUTTON_TYPES: readonly [
587
596
  "reset"
588
597
  ];
589
598
  export type ButtonType = typeof BUTTON_TYPES[number];
590
- declare const HEADING_TAGS: readonly [
591
- "h1",
592
- "h2",
593
- "h3",
594
- "h4",
595
- "h5",
596
- "h6"
597
- ];
598
- export type HeadingTag = typeof HEADING_TAGS[number];
599
599
  declare const LINK_BUTTON_VARIANTS: readonly [
600
600
  "primary",
601
601
  "secondary",
@@ -627,21 +627,34 @@ export type AccordionUpdateEvent = {
627
627
  open: boolean;
628
628
  };
629
629
  export type AccordionUpdateEventDetail = AccordionUpdateEvent;
630
+ /** @deprecated */
630
631
  export type AccordionTag = HeadingTag;
632
+ export type AccordionHeadingTag = HeadingTag;
633
+ declare const INLINE_NOTIFICATION_STATES: readonly [
634
+ "success",
635
+ "info",
636
+ "warning",
637
+ "error",
638
+ "neutral"
639
+ ];
640
+ export type InlineNotificationState = (typeof INLINE_NOTIFICATION_STATES)[number];
641
+ export type InlineNotificationActionIcon = IconName;
642
+ export type InlineNotificationHeadingTag = HeadingTag;
631
643
  declare const BANNER_STATES: readonly [
632
644
  "info",
633
645
  "warning",
634
646
  "error",
635
647
  "neutral"
636
648
  ];
637
- export type BannerState = typeof BANNER_STATES[number];
649
+ export type BannerState = (typeof BANNER_STATES)[number];
638
650
  declare const BANNER_WIDTHS: readonly [
639
651
  "extended",
640
652
  "basic",
641
653
  "fluid"
642
654
  ];
643
655
  /** @deprecated */
644
- export type BannerWidth = typeof BANNER_WIDTHS[number];
656
+ export type BannerWidth = (typeof BANNER_WIDTHS)[number];
657
+ export type BannerHeadingTag = InlineNotificationHeadingTag;
645
658
  export type ButtonIcon = LinkButtonIconName;
646
659
  declare const GROUP_DIRECTIONS: readonly [
647
660
  "row",
@@ -959,15 +972,6 @@ declare const ICON_COLORS: readonly [
959
972
  "state-disabled"
960
973
  ];
961
974
  export type IconColor = (typeof ICON_COLORS)[number];
962
- declare const INLINE_NOTIFICATION_STATES: readonly [
963
- "success",
964
- "info",
965
- "warning",
966
- "error",
967
- "neutral"
968
- ];
969
- export type InlineNotificationState = typeof INLINE_NOTIFICATION_STATES[number];
970
- export type InlineNotificationActionIcon = IconName;
971
975
  export type LinkIcon = LinkButtonIconName;
972
976
  export type LinkPureIcon = LinkButtonIconName;
973
977
  export type LinkPureAriaAttribute = LinkAriaAttribute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@porsche-design-system/components-react",
3
- "version": "3.15.0-rc.1",
3
+ "version": "3.15.0-rc.3",
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": "3.15.0-rc.1"
20
+ "@porsche-design-system/components-js": "3.15.0-rc.3"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=18.0.0 <19.0.0",
@@ -4066,6 +4066,8 @@ const isThemeDark = (theme) => {
4066
4066
  return theme === 'dark';
4067
4067
  };
4068
4068
 
4069
+ const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
4070
+
4069
4071
  const headerSlot = 'header';
4070
4072
  const anchorSlot = 'anchor';
4071
4073
 
@@ -4079,11 +4081,11 @@ const formatObjectOutput = (value) => {
4079
4081
  'value, ' +
4080
4082
  formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {})).replace(/"/g, '');
4081
4083
 
4082
- const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
4083
-
4084
- const getComponentCss$15 = (size, compact, open, theme) => {
4085
- const { primaryColor, hoverColor, contrastLowColor } = getThemedColors(theme);
4086
- const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
4084
+ const getComponentCss$15 = (size, compact, open, theme, sticky) => {
4085
+ const { primaryColor, hoverColor, contrastLowColor, backgroundColor } = getThemedColors(theme);
4086
+ const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastLowColor: contrastLowColorDark, backgroundColor: backgroundColorDark, } = getThemedColors('dark');
4087
+ const cssVariablePositionStickyTop = '--p-accordion-position-sticky-top';
4088
+ const positionStickyTopFallback = '0';
4087
4089
  return getCss({
4088
4090
  '@global': {
4089
4091
  ':host': {
@@ -4159,6 +4161,15 @@ const getComponentCss$15 = (size, compact, open, theme) => {
4159
4161
  },
4160
4162
  heading: {
4161
4163
  margin: 0,
4164
+ ...(sticky && {
4165
+ position: 'sticky',
4166
+ top: `var(${cssVariablePositionStickyTop}, ${positionStickyTopFallback})`,
4167
+ zIndex: 1, // to be on top of the collapsible
4168
+ backgroundColor,
4169
+ ...prefersColorSchemeDarkMediaQuery(theme, {
4170
+ backgroundColor: backgroundColorDark,
4171
+ }),
4172
+ }),
4162
4173
  },
4163
4174
  'icon-container': {
4164
4175
  height: fontLineHeight,
@@ -4180,6 +4191,10 @@ const getComponentCss$15 = (size, compact, open, theme) => {
4180
4191
  color: primaryColorDark,
4181
4192
  }),
4182
4193
  display: 'grid',
4194
+ ...(sticky && {
4195
+ position: 'relative',
4196
+ zIndex: 0, // to be below the heading
4197
+ }),
4183
4198
  ...(open
4184
4199
  ? {
4185
4200
  gridTemplateRows: '1fr',
@@ -5445,21 +5460,7 @@ ellipsis, theme) => {
5445
5460
  };
5446
5461
  const getTypographySlottedJssStyle = () => {
5447
5462
  return {
5448
- margin: 'inherit',
5449
- padding: 'inherit',
5450
- fontFamily: 'inherit',
5451
- fontWeight: 'inherit',
5452
- fontSize: 'inherit',
5453
- lineHeight: 'inherit',
5454
- fontStyle: 'inherit',
5455
- fontVariant: 'inherit',
5456
- color: 'inherit',
5457
- textAlign: 'inherit',
5458
- overflowWrap: 'inherit',
5459
- wordWrap: 'inherit',
5460
- hyphens: 'inherit',
5461
- whiteSpace: 'inherit',
5462
- letterSpacing: 'inherit',
5463
+ all: 'unset',
5463
5464
  };
5464
5465
  };
5465
5466
 
@@ -5478,9 +5479,7 @@ const getComponentCss$X = (size, align, color, ellipsis, theme) => {
5478
5479
  ...hostHiddenStyles,
5479
5480
  }),
5480
5481
  },
5481
- '::slotted': {
5482
- [DISPLAY_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
5483
- },
5482
+ [`::slotted(:is(${DISPLAY_TAGS.join()}))`]: addImportantToEachRule(getTypographySlottedJssStyle()),
5484
5483
  },
5485
5484
  root: getTypographyRootJssStyle(displayLargeStyle, buildResponsiveStyles(size, (sizeValue) => ({
5486
5485
  fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap$4[sizeValue],
@@ -6195,9 +6194,7 @@ const getComponentCss$M = (size, align, color, ellipsis, theme) => {
6195
6194
  ...hostHiddenStyles,
6196
6195
  }),
6197
6196
  },
6198
- '::slotted': {
6199
- [HEADING_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
6200
- },
6197
+ [`::slotted(:is(${HEADING_TAGS.join()}))`]: addImportantToEachRule(getTypographySlottedJssStyle()),
6201
6198
  },
6202
6199
  root: getTypographyRootJssStyle(headingXXLargeStyle, buildResponsiveStyles(size, (sizeValue) => ({
6203
6200
  fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap$3[sizeValue],
@@ -6461,6 +6458,17 @@ const getNotificationContentJssStyle = () => ({
6461
6458
  });
6462
6459
 
6463
6460
  const mediaQueryMaxS$1 = getMediaQueryMax('s');
6461
+ const getTextJssStyle = (theme) => ({
6462
+ margin: 0,
6463
+ color: getThemedColors(theme).primaryColor,
6464
+ ...prefersColorSchemeDarkMediaQuery(theme, {
6465
+ color: getThemedColors('dark').primaryColor,
6466
+ }),
6467
+ });
6468
+ const getHeadingJssStyle = (theme) => ({
6469
+ ...headingSmallStyle,
6470
+ ...getTextJssStyle(theme),
6471
+ });
6464
6472
  const getComponentCss$J = (state, hasAction, hasClose, theme) => {
6465
6473
  return getCss({
6466
6474
  '@global': {
@@ -6472,15 +6480,13 @@ const getComponentCss$J = (state, hasAction, hasClose, theme) => {
6472
6480
  ...hostHiddenStyles,
6473
6481
  }),
6474
6482
  },
6475
- h5: headingSmallStyle,
6476
- p: textSmallStyle,
6477
- 'h5,p': {
6478
- margin: 0,
6479
- color: getThemedColors(theme).primaryColor,
6480
- ...prefersColorSchemeDarkMediaQuery(theme, {
6481
- color: getThemedColors('dark').primaryColor,
6482
- }),
6483
- },
6483
+ [`::slotted(:is(${HEADING_TAGS.join()}))`]: addImportantToEachRule(getTypographySlottedJssStyle()),
6484
+ 'slot[name="heading"]': getHeadingJssStyle(theme),
6485
+ },
6486
+ heading: getHeadingJssStyle(theme),
6487
+ description: {
6488
+ ...textSmallStyle,
6489
+ ...getTextJssStyle(theme),
6484
6490
  },
6485
6491
  icon: getNotificationIconJssStyle(),
6486
6492
  content: getNotificationContentJssStyle(),
@@ -10078,9 +10084,7 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis, theme) => {
10078
10084
  ...hostHiddenStyles,
10079
10085
  }),
10080
10086
  },
10081
- '::slotted': {
10082
- [TEXT_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
10083
- },
10087
+ [`::slotted(:is(${TEXT_TAGS.join()}))`]: addImportantToEachRule(getTypographySlottedJssStyle()),
10084
10088
  },
10085
10089
  root: getTypographyRootJssStyle(textSmallStyle, buildResponsiveStyles(size, (sizeValue) => ({
10086
10090
  fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap[sizeValue],
@@ -3596,6 +3596,8 @@ const hasDocument = typeof document !== 'undefined';
3596
3596
  const isThemeDark = (theme) => {
3597
3597
  return theme === 'dark';
3598
3598
  };
3599
+
3600
+ const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
3599
3601
  const headerSlot = 'header';
3600
3602
  const anchorSlot = 'anchor';
3601
3603
 
@@ -3608,8 +3610,6 @@ const formatObjectOutput = (value) => {
3608
3610
  };
3609
3611
  'value, ' +
3610
3612
  formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {})).replace(/"/g, '');
3611
-
3612
- const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
3613
3613
  const getButtonPureAriaAttributes = (isDisabled, isLoading, aria) => {
3614
3614
  return {
3615
3615
  ...parseAndGetAriaAttributes(aria),
@@ -7,15 +7,15 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var accordion = require('../dsr-components/accordion.cjs');
9
9
 
10
- const PAccordion = react.forwardRef(({ compact, heading, onAccordionChange, onUpdate, open, size = 'small', tag = 'h2', theme, className, children, ...rest }, ref) => {
10
+ const PAccordion = react.forwardRef(({ compact, heading, headingTag = 'h2', onAccordionChange, onUpdate, open, size = 'small', sticky, tag, theme, className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef();
12
12
  hooks.useEventCallback(elementRef, 'accordionChange', onAccordionChange);
13
13
  hooks.useEventCallback(elementRef, 'update', onUpdate);
14
14
  const WebComponentTag = hooks.usePrefix('p-accordion');
15
- const propsToSync = [compact, heading, open, size, tag, theme || hooks.useTheme()];
15
+ const propsToSync = [compact, heading, headingTag, open, size, sticky, tag, theme || hooks.useTheme()];
16
16
  hooks.useBrowserLayoutEffect(() => {
17
17
  const { current } = elementRef;
18
- ['compact', 'heading', 'open', 'size', 'tag', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
18
+ ['compact', 'heading', 'headingTag', 'open', 'size', 'sticky', 'tag', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
19
19
  }, propsToSync);
20
20
  // @ts-ignore
21
21
  if (!process.browser) {
@@ -26,7 +26,7 @@ const PAccordion = react.forwardRef(({ compact, heading, onAccordionChange, onUp
26
26
  // @ts-ignore
27
27
  ...(!process.browser
28
28
  ? {
29
- children: (jsxRuntime.jsx(accordion.DSRAccordion, { compact, heading, open, size, tag, theme: theme || hooks.useTheme(), children })),
29
+ children: (jsxRuntime.jsx(accordion.DSRAccordion, { compact, heading, headingTag, open, size, sticky, tag, theme: theme || hooks.useTheme(), children })),
30
30
  }
31
31
  : {
32
32
  children,