@porsche-design-system/components-react 3.22.0-rc.0 → 3.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.
- package/CHANGELOG.md +31 -0
- package/cjs/lib/components/flyout-multilevel-item.wrapper.cjs +3 -3
- package/cjs/lib/components/segmented-control.wrapper.cjs +3 -3
- package/esm/lib/components/flyout-multilevel-item.wrapper.d.ts +24 -0
- package/esm/lib/components/flyout-multilevel-item.wrapper.mjs +3 -3
- package/esm/lib/components/segmented-control.wrapper.d.ts +24 -0
- package/esm/lib/components/segmented-control.wrapper.mjs +3 -3
- package/esm/lib/components/select.wrapper.d.ts +2 -2
- package/esm/lib/types.d.ts +3 -2
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +432 -301
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +41 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flyout-multilevel-item.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.cjs +7 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-multilevel-item.cjs +9 -6
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-multilevel.cjs +13 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +1 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.cjs +9 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.cjs +3 -2
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +432 -301
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +37 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flyout-multilevel-item.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +7 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-multilevel-item.mjs +9 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-multilevel.mjs +14 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +1 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +9 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs +3 -2
- package/ssr/esm/lib/components/flyout-multilevel-item.wrapper.d.ts +24 -0
- package/ssr/esm/lib/components/segmented-control.wrapper.d.ts +24 -0
- package/ssr/esm/lib/components/select.wrapper.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/canvas.d.ts +4 -0
- package/ssr/esm/lib/dsr-components/flyout-multilevel-item.d.ts +2 -1
- package/ssr/esm/lib/dsr-components/flyout-multilevel.d.ts +5 -0
- package/ssr/esm/lib/dsr-components/segmented-control.d.ts +5 -0
- package/ssr/esm/lib/types.d.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -14,12 +14,40 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
14
14
|
|
|
15
15
|
### [Unreleased]
|
|
16
16
|
|
|
17
|
+
### [3.22.0] - 2024-12-06
|
|
18
|
+
|
|
19
|
+
### [3.22.0-rc.1] - 2024-12-06
|
|
20
|
+
|
|
21
|
+
#### Added
|
|
22
|
+
|
|
23
|
+
- `Flyout Multilevel`: Supports infinite layers
|
|
24
|
+
([3647](https://github.com/porsche-design-system/porsche-design-system/pull/3647))
|
|
25
|
+
|
|
26
|
+
#### Fixed
|
|
27
|
+
|
|
28
|
+
- Partials: error when using in projects without `react/jsx-runtime` as dependency
|
|
29
|
+
([#3660](https://github.com/porsche-design-system/porsche-design-system/pull/3660))
|
|
30
|
+
- `Textfield Wrapper`: text alignment of type `email` and `tel` values in RTL mode
|
|
31
|
+
([3655](https://github.com/porsche-design-system/porsche-design-system/pull/3655))
|
|
32
|
+
- `Popover`:
|
|
33
|
+
- Rendering bug of drop-shadow in Safari 18.x
|
|
34
|
+
([3622](https://github.com/porsche-design-system/porsche-design-system/pull/3622))
|
|
35
|
+
- Positioning in RTL mode if rendered inside a table (in #top-layer)
|
|
36
|
+
([3658](https://github.com/porsche-design-system/porsche-design-system/pull/3658))
|
|
37
|
+
|
|
17
38
|
### [3.22.0-rc.0] - 2024-11-19
|
|
18
39
|
|
|
19
40
|
#### Added
|
|
20
41
|
|
|
42
|
+
- `Modal`, `Flyout`:
|
|
43
|
+
- `aria-label` is generated from slotted header contents if `aria` prop is not provided
|
|
44
|
+
- ARIA `role` to `aria` prop of `Modal` component to support setting `alertdialog` role
|
|
45
|
+
([3618](https://github.com/porsche-design-system/porsche-design-system/pull/3618))
|
|
21
46
|
- `Pin-Code`: Add `form` prop to explicitly associate the component with a form, even when it's not directly nested
|
|
22
47
|
within it. ([#3588](https://github.com/porsche-design-system/porsche-design-system/pull/3588))
|
|
48
|
+
- `Segmented-Control`: Use ElementInternals API and add `form` prop to explicitly associate the component with a form,
|
|
49
|
+
even when it's not directly nested within it.
|
|
50
|
+
([#3614](https://github.com/porsche-design-system/porsche-design-system/pull/3614))
|
|
23
51
|
|
|
24
52
|
#### Changed
|
|
25
53
|
|
|
@@ -36,6 +64,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
36
64
|
- Partials: removed bundled `react/jsx-runtime` due to React 18/19 incompatibilities. When using `jsx` in the `format`
|
|
37
65
|
option, it is necessary to have `react/jsx-runtime` as a dependency in the project included.
|
|
38
66
|
([#3613](https://github.com/porsche-design-system/porsche-design-system/pull/3613))
|
|
67
|
+
- `Select`, `Multi-Select`: Ensure that dynamically changing the `disabled` property via `optgroups` persists the
|
|
68
|
+
`disabled` state for individual options within the group.
|
|
69
|
+
([#3614](https://github.com/porsche-design-system/porsche-design-system/pull/3614))
|
|
39
70
|
|
|
40
71
|
### [3.21.0] - 2024-11-12
|
|
41
72
|
|
|
@@ -6,13 +6,13 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PFlyoutMultilevelItem = /*#__PURE__*/ react.forwardRef(({ identifier, label, className, ...rest }, ref) => {
|
|
9
|
+
const PFlyoutMultilevelItem = /*#__PURE__*/ react.forwardRef(({ cascade = false, identifier, label, primary = false, secondary = false, className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
const WebComponentTag = hooks.usePrefix('p-flyout-multilevel-item');
|
|
12
|
-
const propsToSync = [identifier, label];
|
|
12
|
+
const propsToSync = [cascade, identifier, label, primary, secondary];
|
|
13
13
|
hooks.useBrowserLayoutEffect(() => {
|
|
14
14
|
const { current } = elementRef;
|
|
15
|
-
['identifier', 'label'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
|
+
['cascade', 'identifier', 'label', 'primary', 'secondary'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
16
|
}, propsToSync);
|
|
17
17
|
const props = {
|
|
18
18
|
...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 PSegmentedControl = /*#__PURE__*/ react.forwardRef(({ backgroundColor, columns = 'auto', onSegmentedControlChange, onUpdate, theme, value, className, ...rest }, ref) => {
|
|
9
|
+
const PSegmentedControl = /*#__PURE__*/ react.forwardRef(({ backgroundColor, columns = 'auto', disabled = false, form, name, onSegmentedControlChange, onUpdate, theme, value, className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
hooks.useEventCallback(elementRef, 'segmentedControlChange', onSegmentedControlChange);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
13
13
|
const WebComponentTag = hooks.usePrefix('p-segmented-control');
|
|
14
|
-
const propsToSync = [backgroundColor, columns, theme || hooks.useTheme(), value];
|
|
14
|
+
const propsToSync = [backgroundColor, columns, disabled, form, name, theme || hooks.useTheme(), value];
|
|
15
15
|
hooks.useBrowserLayoutEffect(() => {
|
|
16
16
|
const { current } = elementRef;
|
|
17
|
-
['backgroundColor', 'columns', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
['backgroundColor', 'columns', 'disabled', 'form', 'name', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
18
|
}, propsToSync);
|
|
19
19
|
const props = {
|
|
20
20
|
...rest,
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
2
|
export type PFlyoutMultilevelItemProps = BaseProps & {
|
|
3
|
+
/**
|
|
4
|
+
* Private property set by the component itself.
|
|
5
|
+
*/
|
|
6
|
+
cascade?: boolean;
|
|
3
7
|
/**
|
|
4
8
|
* Unique identifier which controls if this item should be shown when the active-identifier on the flyout-multilevel is set to this value.
|
|
5
9
|
*/
|
|
@@ -8,8 +12,20 @@ export type PFlyoutMultilevelItemProps = BaseProps & {
|
|
|
8
12
|
* Label of the item.
|
|
9
13
|
*/
|
|
10
14
|
label?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Private property set by the component itself.
|
|
17
|
+
*/
|
|
18
|
+
primary?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Private property set by the component itself.
|
|
21
|
+
*/
|
|
22
|
+
secondary?: boolean;
|
|
11
23
|
};
|
|
12
24
|
export declare const PFlyoutMultilevelItem: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
25
|
+
/**
|
|
26
|
+
* Private property set by the component itself.
|
|
27
|
+
*/
|
|
28
|
+
cascade?: boolean;
|
|
13
29
|
/**
|
|
14
30
|
* Unique identifier which controls if this item should be shown when the active-identifier on the flyout-multilevel is set to this value.
|
|
15
31
|
*/
|
|
@@ -18,6 +34,14 @@ export declare const PFlyoutMultilevelItem: import("react").ForwardRefExoticComp
|
|
|
18
34
|
* Label of the item.
|
|
19
35
|
*/
|
|
20
36
|
label?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Private property set by the component itself.
|
|
39
|
+
*/
|
|
40
|
+
primary?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Private property set by the component itself.
|
|
43
|
+
*/
|
|
44
|
+
secondary?: boolean;
|
|
21
45
|
} & {
|
|
22
46
|
children?: import("react").ReactNode | undefined;
|
|
23
47
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -4,13 +4,13 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PFlyoutMultilevelItem = /*#__PURE__*/ forwardRef(({ identifier, label, className, ...rest }, ref) => {
|
|
7
|
+
const PFlyoutMultilevelItem = /*#__PURE__*/ forwardRef(({ cascade = false, identifier, label, primary = false, secondary = false, className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
const WebComponentTag = usePrefix('p-flyout-multilevel-item');
|
|
10
|
-
const propsToSync = [identifier, label];
|
|
10
|
+
const propsToSync = [cascade, identifier, label, primary, secondary];
|
|
11
11
|
useBrowserLayoutEffect(() => {
|
|
12
12
|
const { current } = elementRef;
|
|
13
|
-
['identifier', 'label'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
13
|
+
['cascade', 'identifier', 'label', 'primary', 'secondary'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
14
|
}, propsToSync);
|
|
15
15
|
const props = {
|
|
16
16
|
...rest,
|
|
@@ -9,6 +9,18 @@ export type PSegmentedControlProps = BaseProps & {
|
|
|
9
9
|
* Sets the amount of columns.
|
|
10
10
|
*/
|
|
11
11
|
columns?: BreakpointCustomizable<SegmentedControlColumns>;
|
|
12
|
+
/**
|
|
13
|
+
* Disables the segmented-control.
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The id of a form element the segmented-control should be associated with.
|
|
18
|
+
*/
|
|
19
|
+
form?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The name of the segmented-control.
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
12
24
|
/**
|
|
13
25
|
* @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when selected element changes.
|
|
14
26
|
*/
|
|
@@ -35,6 +47,18 @@ export declare const PSegmentedControl: import("react").ForwardRefExoticComponen
|
|
|
35
47
|
* Sets the amount of columns.
|
|
36
48
|
*/
|
|
37
49
|
columns?: BreakpointCustomizable<SegmentedControlColumns>;
|
|
50
|
+
/**
|
|
51
|
+
* Disables the segmented-control.
|
|
52
|
+
*/
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* The id of a form element the segmented-control should be associated with.
|
|
56
|
+
*/
|
|
57
|
+
form?: string;
|
|
58
|
+
/**
|
|
59
|
+
* The name of the segmented-control.
|
|
60
|
+
*/
|
|
61
|
+
name?: string;
|
|
38
62
|
/**
|
|
39
63
|
* @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when selected element changes.
|
|
40
64
|
*/
|
|
@@ -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 PSegmentedControl = /*#__PURE__*/ forwardRef(({ backgroundColor, columns = 'auto', onSegmentedControlChange, onUpdate, theme, value, className, ...rest }, ref) => {
|
|
7
|
+
const PSegmentedControl = /*#__PURE__*/ forwardRef(({ backgroundColor, columns = 'auto', disabled = false, form, name, onSegmentedControlChange, onUpdate, theme, value, className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
useEventCallback(elementRef, 'segmentedControlChange', onSegmentedControlChange);
|
|
10
10
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
11
11
|
const WebComponentTag = usePrefix('p-segmented-control');
|
|
12
|
-
const propsToSync = [backgroundColor, columns, theme || useTheme(), value];
|
|
12
|
+
const propsToSync = [backgroundColor, columns, disabled, form, name, theme || useTheme(), value];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
|
14
14
|
const { current } = elementRef;
|
|
15
|
-
['backgroundColor', 'columns', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
|
+
['backgroundColor', 'columns', 'disabled', 'form', 'name', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
16
|
}, propsToSync);
|
|
17
17
|
const props = {
|
|
18
18
|
...rest,
|
|
@@ -6,7 +6,7 @@ export type PSelectProps = BaseProps & {
|
|
|
6
6
|
*/
|
|
7
7
|
description?: string;
|
|
8
8
|
/**
|
|
9
|
-
* Disables the select
|
|
9
|
+
* Disables the select.
|
|
10
10
|
*/
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
/**
|
|
@@ -60,7 +60,7 @@ export declare const PSelect: import("react").ForwardRefExoticComponent<import("
|
|
|
60
60
|
*/
|
|
61
61
|
description?: string;
|
|
62
62
|
/**
|
|
63
|
-
* Disables the select
|
|
63
|
+
* Disables the select.
|
|
64
64
|
*/
|
|
65
65
|
disabled?: boolean;
|
|
66
66
|
/**
|
package/esm/lib/types.d.ts
CHANGED
|
@@ -902,7 +902,7 @@ declare const FLYOUT_MULTILEVEL_ARIA_ATTRIBUTES: readonly [
|
|
|
902
902
|
];
|
|
903
903
|
export type FlyoutMultilevelAriaAttribute = (typeof FLYOUT_MULTILEVEL_ARIA_ATTRIBUTES)[number];
|
|
904
904
|
export type FlyoutMultilevelUpdate = {
|
|
905
|
-
activeIdentifier: string;
|
|
905
|
+
activeIdentifier: string | undefined;
|
|
906
906
|
};
|
|
907
907
|
/** @deprecated */
|
|
908
908
|
export type FlyoutMultilevelUpdateEvent = FlyoutMultilevelUpdate;
|
|
@@ -1139,7 +1139,8 @@ declare const BACKDROPS: readonly [
|
|
|
1139
1139
|
];
|
|
1140
1140
|
export type Backdrop = (typeof BACKDROPS)[number];
|
|
1141
1141
|
declare const MODAL_ARIA_ATTRIBUTES: readonly [
|
|
1142
|
-
"aria-label"
|
|
1142
|
+
"aria-label",
|
|
1143
|
+
"role"
|
|
1143
1144
|
];
|
|
1144
1145
|
export type ModalAriaAttribute = (typeof MODAL_ARIA_ATTRIBUTES)[number];
|
|
1145
1146
|
export type ModalBackdrop = Backdrop;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@porsche-design-system/components-react",
|
|
3
|
-
"version": "3.22.0
|
|
3
|
+
"version": "3.22.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.22.0
|
|
20
|
+
"@porsche-design-system/components-js": "3.22.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"ag-grid-community": ">= 32.0.0 <33.0.0",
|