@porsche-design-system/components-react 3.15.1 → 3.16.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/CHANGELOG.md +41 -0
- package/cjs/lib/components/flyout.wrapper.cjs +3 -3
- package/esm/lib/components/carousel.wrapper.d.ts +2 -2
- package/esm/lib/components/flyout.wrapper.d.ts +8 -0
- package/esm/lib/components/flyout.wrapper.mjs +3 -3
- package/esm/lib/components/modal.wrapper.d.ts +2 -2
- package/esm/lib/components/pagination.wrapper.d.ts +1 -1
- package/esm/lib/types.d.ts +4 -4
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +347 -320
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +13 -9
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-navigation-item.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-navigation.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +11 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +13 -7
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +347 -320
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +13 -9
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-navigation-item.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-navigation.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +11 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +13 -7
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +1 -1
- package/ssr/esm/lib/components/flyout.wrapper.d.ts +8 -0
- package/ssr/esm/lib/components/modal.wrapper.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/banner.d.ts +8 -0
- package/ssr/esm/lib/dsr-components/flyout.d.ts +1 -3
- package/ssr/esm/lib/types.d.ts +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,47 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
14
14
|
|
|
15
15
|
### [Unreleased]
|
|
16
16
|
|
|
17
|
+
### [3.16.0-rc.0] - 2024-06-05
|
|
18
|
+
|
|
19
|
+
#### Added
|
|
20
|
+
|
|
21
|
+
- `Flyout`:
|
|
22
|
+
- CSS variable `--p-flyout-sticky-top` (experimental)
|
|
23
|
+
([#3191](https://github.com/porsche-design-system/porsche-design-system/pull/3191))
|
|
24
|
+
- Prop `disableBackdropClick` ([#3191](https://github.com/porsche-design-system/porsche-design-system/pull/3191))
|
|
25
|
+
- `Modal`:
|
|
26
|
+
- CSS variable `--p-modal-width` (experimental)
|
|
27
|
+
([#3191](https://github.com/porsche-design-system/porsche-design-system/pull/3191))
|
|
28
|
+
- Named slot `header` ([#3191](https://github.com/porsche-design-system/porsche-design-system/pull/3191))
|
|
29
|
+
|
|
30
|
+
#### Changed
|
|
31
|
+
|
|
32
|
+
- `Modal`, `Flyout`:
|
|
33
|
+
- Sticky dismiss button ([#3191](https://github.com/porsche-design-system/porsche-design-system/pull/3191))
|
|
34
|
+
- Aligned layout, spacing and UX behaviour
|
|
35
|
+
([#3191](https://github.com/porsche-design-system/porsche-design-system/pull/3191))
|
|
36
|
+
- Renders fully on `#top-layer`, stacking behaviour has changed and follows W3C standards now, see
|
|
37
|
+
https://developer.mozilla.org/en-US/docs/Glossary/Top_layer and
|
|
38
|
+
https://developer.chrome.com/blog/what-is-the-top-layer
|
|
39
|
+
([#3191](https://github.com/porsche-design-system/porsche-design-system/pull/3191))
|
|
40
|
+
- `Modal`: `heading` prop and `slot="heading"` are deprecated. Use `slot="header"` instead.
|
|
41
|
+
|
|
42
|
+
#### Fixed
|
|
43
|
+
|
|
44
|
+
- Types: Fixed incorrectly allowed type `string` in types `BreakpointCustomizable`, `SelectedAriaAttributes`,
|
|
45
|
+
`CarouselInternationalization`, `PaginationInternationalization` and `ScrollToPosition`
|
|
46
|
+
- `Modal`, `Flyout`: Dynamically react to adding/removing named slots
|
|
47
|
+
([#3191](https://github.com/porsche-design-system/porsche-design-system/pull/3191))
|
|
48
|
+
- `Modal`: Uses native `<dialog />` element to resolve focus issues, focus trap
|
|
49
|
+
([#3191](https://github.com/porsche-design-system/porsche-design-system/pull/3191))
|
|
50
|
+
|
|
51
|
+
### [3.15.2] - 2024-05-29
|
|
52
|
+
|
|
53
|
+
#### Fixed
|
|
54
|
+
|
|
55
|
+
- `aria`: Refactor `parseJSONAttribute` to support Safari < 16.4
|
|
56
|
+
([#3314](https://github.com/porsche-design-system/porsche-design-system/pull/3314))
|
|
57
|
+
|
|
17
58
|
### [3.15.1] - 2024-05-23
|
|
18
59
|
|
|
19
60
|
#### Fixed
|
|
@@ -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 PFlyout = react.forwardRef(({ aria, onDismiss, open = false, position = 'end', theme, className, ...rest }, ref) => {
|
|
9
|
+
const PFlyout = react.forwardRef(({ aria, disableBackdropClick = false, onDismiss, open = false, position = 'end', theme, className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
hooks.useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
12
12
|
const WebComponentTag = hooks.usePrefix('p-flyout');
|
|
13
|
-
const propsToSync = [aria, open, position, theme || hooks.useTheme()];
|
|
13
|
+
const propsToSync = [aria, disableBackdropClick, open, position, theme || hooks.useTheme()];
|
|
14
14
|
hooks.useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['aria', 'open', 'position', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'disableBackdropClick', 'open', 'position', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -103,7 +103,7 @@ export declare const PCarousel: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
103
103
|
/**
|
|
104
104
|
* Override the default wordings that are used for aria-labels on the next/prev buttons and pagination.
|
|
105
105
|
*/
|
|
106
|
-
intl?:
|
|
106
|
+
intl?: Partial<Record<"prev" | "next" | "first" | "last" | "slideLabel" | "slide", string>> | undefined;
|
|
107
107
|
/**
|
|
108
108
|
* @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when carousel's content slides.
|
|
109
109
|
*/
|
|
@@ -127,7 +127,7 @@ export declare const PCarousel: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
127
127
|
/**
|
|
128
128
|
* Sets the amount of slides visible at the same time. Can be set to `auto` if you want to define different widths per slide via CSS.
|
|
129
129
|
*/
|
|
130
|
-
slidesPerPage?: BreakpointCustomizable<number> | undefined;
|
|
130
|
+
slidesPerPage?: "auto" | BreakpointCustomizable<number> | undefined;
|
|
131
131
|
/**
|
|
132
132
|
* Adapts the color when used on dark background.
|
|
133
133
|
*/
|
|
@@ -5,6 +5,10 @@ export type PFlyoutProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
5
5
|
* Add ARIA attributes.
|
|
6
6
|
*/
|
|
7
7
|
aria?: SelectedAriaAttributes<FlyoutAriaAttribute>;
|
|
8
|
+
/**
|
|
9
|
+
* If true, the flyout will not be closable via backdrop click.
|
|
10
|
+
*/
|
|
11
|
+
disableBackdropClick?: boolean;
|
|
8
12
|
/**
|
|
9
13
|
* Emitted when the component requests to be dismissed.
|
|
10
14
|
*/
|
|
@@ -27,6 +31,10 @@ export declare const PFlyout: import("react").ForwardRefExoticComponent<Omit<HTM
|
|
|
27
31
|
* Add ARIA attributes.
|
|
28
32
|
*/
|
|
29
33
|
aria?: SelectedAriaAttributes<"aria-label"> | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* If true, the flyout will not be closable via backdrop click.
|
|
36
|
+
*/
|
|
37
|
+
disableBackdropClick?: boolean | undefined;
|
|
30
38
|
/**
|
|
31
39
|
* Emitted when the component requests to be dismissed.
|
|
32
40
|
*/
|
|
@@ -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 PFlyout = forwardRef(({ aria, onDismiss, open = false, position = 'end', theme, className, ...rest }, ref) => {
|
|
7
|
+
const PFlyout = forwardRef(({ aria, disableBackdropClick = false, onDismiss, open = false, position = 'end', theme, className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
10
10
|
const WebComponentTag = usePrefix('p-flyout');
|
|
11
|
-
const propsToSync = [aria, open, position, theme || useTheme()];
|
|
11
|
+
const propsToSync = [aria, disableBackdropClick, open, position, theme || useTheme()];
|
|
12
12
|
useBrowserLayoutEffect(() => {
|
|
13
13
|
const { current } = elementRef;
|
|
14
|
-
['aria', 'open', 'position', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
|
+
['aria', 'disableBackdropClick', 'open', 'position', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
15
|
}, propsToSync);
|
|
16
16
|
const props = {
|
|
17
17
|
...rest,
|
|
@@ -27,7 +27,7 @@ export type PModalProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
27
27
|
*/
|
|
28
28
|
fullscreen?: BreakpointCustomizable<boolean>;
|
|
29
29
|
/**
|
|
30
|
-
* The title of the modal
|
|
30
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `header` slot instead The title of the modal
|
|
31
31
|
*/
|
|
32
32
|
heading?: string;
|
|
33
33
|
/**
|
|
@@ -74,7 +74,7 @@ export declare const PModal: import("react").ForwardRefExoticComponent<Omit<HTML
|
|
|
74
74
|
*/
|
|
75
75
|
fullscreen?: BreakpointCustomizable<boolean> | undefined;
|
|
76
76
|
/**
|
|
77
|
-
* The title of the modal
|
|
77
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `header` slot instead The title of the modal
|
|
78
78
|
*/
|
|
79
79
|
heading?: string | undefined;
|
|
80
80
|
/**
|
|
@@ -79,7 +79,7 @@ export declare const PPagination: import("react").ForwardRefExoticComponent<Omit
|
|
|
79
79
|
/**
|
|
80
80
|
* Override the default wordings that are used for aria-labels on the next/prev and page buttons.
|
|
81
81
|
*/
|
|
82
|
-
intl?:
|
|
82
|
+
intl?: Partial<Record<"page" | "prev" | "next" | "root", string>> | undefined;
|
|
83
83
|
/**
|
|
84
84
|
* The total count of items which should be shown per page.
|
|
85
85
|
*/
|
package/esm/lib/types.d.ts
CHANGED
|
@@ -451,7 +451,7 @@ export type BreakpointValues<T> = {
|
|
|
451
451
|
} & {
|
|
452
452
|
base: T;
|
|
453
453
|
};
|
|
454
|
-
export type BreakpointCustomizable<T> = T | BreakpointValues<T
|
|
454
|
+
export type BreakpointCustomizable<T> = T | BreakpointValues<T>;
|
|
455
455
|
declare const LINK_TARGETS: readonly [
|
|
456
456
|
"_self",
|
|
457
457
|
"_blank",
|
|
@@ -616,7 +616,7 @@ export type PorscheDesignSystem = {
|
|
|
616
616
|
prefixes: string[];
|
|
617
617
|
};
|
|
618
618
|
};
|
|
619
|
-
export type SelectedAriaAttributes<T extends keyof AriaAttributes> = Pick<AriaAttributes, T
|
|
619
|
+
export type SelectedAriaAttributes<T extends keyof AriaAttributes> = Pick<AriaAttributes, T>;
|
|
620
620
|
declare const ACCORDION_SIZES: readonly [
|
|
621
621
|
"small",
|
|
622
622
|
"medium"
|
|
@@ -692,7 +692,7 @@ declare const CAROUSEL_ARIA_ATTRIBUTES: readonly [
|
|
|
692
692
|
"aria-label"
|
|
693
693
|
];
|
|
694
694
|
export type CarouselAriaAttribute = (typeof CAROUSEL_ARIA_ATTRIBUTES)[number];
|
|
695
|
-
export type CarouselInternationalization = Partial<Record<"prev" | "next" | "first" | "last" | "slideLabel" | "slide", string
|
|
695
|
+
export type CarouselInternationalization = Partial<Record<"prev" | "next" | "first" | "last" | "slideLabel" | "slide", string>>;
|
|
696
696
|
/** @deprecated */
|
|
697
697
|
export type CarouselUpdateEvent = {
|
|
698
698
|
activeIndex: number;
|
|
@@ -1143,7 +1143,7 @@ export type PaginationUpdateEvent = {
|
|
|
1143
1143
|
previousPage: number;
|
|
1144
1144
|
};
|
|
1145
1145
|
export type PaginationUpdateEventDetail = PaginationUpdateEvent;
|
|
1146
|
-
export type PaginationInternationalization = Partial<Record<"root" | "prev" | "next" | "page", string
|
|
1146
|
+
export type PaginationInternationalization = Partial<Record<"root" | "prev" | "next" | "page", string>>;
|
|
1147
1147
|
declare const PIN_CODE_TYPES: readonly [
|
|
1148
1148
|
"number",
|
|
1149
1149
|
"password"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@porsche-design-system/components-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.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": "3.
|
|
20
|
+
"@porsche-design-system/components-js": "3.16.0-rc.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": ">=18.0.0 <19.0.0",
|