@porsche-design-system/components-react 4.2.0 → 4.3.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 +12 -0
- package/cjs/lib/components/tabs-bar.wrapper.cjs +3 -3
- package/cjs/lib/components/tabs.wrapper.cjs +3 -3
- package/esm/lib/components/scroller.wrapper.d.ts +2 -2
- package/esm/lib/components/tabs-bar.wrapper.d.ts +9 -1
- package/esm/lib/components/tabs-bar.wrapper.mjs +3 -3
- package/esm/lib/components/tabs.wrapper.d.ts +9 -1
- package/esm/lib/components/tabs.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +13 -1
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +121 -121
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +6 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +121 -121
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +7 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +1 -1
- package/ssr/esm/lib/components/scroller.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/tabs-bar.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/tabs.wrapper.d.ts +9 -1
- package/ssr/esm/lib/types.d.ts +13 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [4.3.0-rc.0] - 2026-06-24
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- `Tabs`, `Tabs Bar`: `aria` prop to provide additional context for screen readers
|
|
22
|
+
([#4538](https://github.com/porsche-design-system/porsche-design-system/pull/4538))
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- `Angular`: Widen peer dependency to support Angular version 21 + 22
|
|
27
|
+
([#4546](https://github.com/porsche-design-system/porsche-design-system/pull/4546))
|
|
28
|
+
|
|
17
29
|
## [4.2.0] - 2026-06-22
|
|
18
30
|
|
|
19
31
|
## [4.2.0-rc.5] - 2026-06-12
|
|
@@ -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 PTabsBar = /*#__PURE__*/ react.forwardRef(({ activeTabIndex, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, ...rest }, ref) => {
|
|
9
|
+
const PTabsBar = /*#__PURE__*/ react.forwardRef(({ activeTabIndex, aria, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
12
12
|
const WebComponentTag = hooks.usePrefix('p-tabs-bar');
|
|
13
|
-
const propsToSync = [activeTabIndex, background, compact, size, weight];
|
|
13
|
+
const propsToSync = [activeTabIndex, aria, background, compact, size, weight];
|
|
14
14
|
hooks.useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['activeTabIndex', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['activeTabIndex', 'aria', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...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 PTabs = /*#__PURE__*/ react.forwardRef(({ activeTabIndex = 0, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, ...rest }, ref) => {
|
|
9
|
+
const PTabs = /*#__PURE__*/ react.forwardRef(({ activeTabIndex = 0, aria, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
12
12
|
const WebComponentTag = hooks.usePrefix('p-tabs');
|
|
13
|
-
const propsToSync = [activeTabIndex, background, compact, size, weight];
|
|
13
|
+
const propsToSync = [activeTabIndex, aria, background, compact, size, weight];
|
|
14
14
|
hooks.useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['activeTabIndex', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['activeTabIndex', 'aria', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -7,7 +7,7 @@ export type PScrollerProps = BaseProps & {
|
|
|
7
7
|
*/
|
|
8
8
|
alignScrollIndicator?: ScrollerAlignScrollIndicator;
|
|
9
9
|
/**
|
|
10
|
-
* Sets
|
|
10
|
+
* Sets ARIA role and attributes on the scroller's scroll container, useful for tablist navigation patterns and additional accessibility context.
|
|
11
11
|
*/
|
|
12
12
|
aria?: SelectedAriaAttributes<ScrollerAriaAttribute>;
|
|
13
13
|
/**
|
|
@@ -36,7 +36,7 @@ export declare const PScroller: import("react").ForwardRefExoticComponent<Omit<i
|
|
|
36
36
|
*/
|
|
37
37
|
alignScrollIndicator?: ScrollerAlignScrollIndicator;
|
|
38
38
|
/**
|
|
39
|
-
* Sets
|
|
39
|
+
* Sets ARIA role and attributes on the scroller's scroll container, useful for tablist navigation patterns and additional accessibility context.
|
|
40
40
|
*/
|
|
41
41
|
aria?: SelectedAriaAttributes<ScrollerAriaAttribute>;
|
|
42
42
|
/**
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { TabsBarBackground, TabsBarUpdateEventDetail, BreakpointCustomizable, TabsBarSize, TabsBarWeight } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, TabsBarAriaAttribute, TabsBarBackground, TabsBarUpdateEventDetail, BreakpointCustomizable, TabsBarSize, TabsBarWeight } from '../types';
|
|
3
3
|
export type PTabsBarProps = BaseProps & {
|
|
4
4
|
/**
|
|
5
5
|
* Sets the zero-based index of the currently active tab. Pass `undefined` to render all tabs in an unselected state.
|
|
6
6
|
*/
|
|
7
7
|
activeTabIndex?: number | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Sets ARIA attributes on the tablist, such as `aria-label` and `aria-description`.
|
|
10
|
+
*/
|
|
11
|
+
aria?: SelectedAriaAttributes<TabsBarAriaAttribute>;
|
|
8
12
|
/**
|
|
9
13
|
* Sets the background color of the tabs bar. Use `frosted` only when placed on top of images, videos, or gradients.
|
|
10
14
|
* @default 'none'
|
|
@@ -34,6 +38,10 @@ export declare const PTabsBar: import("react").ForwardRefExoticComponent<Omit<im
|
|
|
34
38
|
* Sets the zero-based index of the currently active tab. Pass `undefined` to render all tabs in an unselected state.
|
|
35
39
|
*/
|
|
36
40
|
activeTabIndex?: number | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Sets ARIA attributes on the tablist, such as `aria-label` and `aria-description`.
|
|
43
|
+
*/
|
|
44
|
+
aria?: SelectedAriaAttributes<TabsBarAriaAttribute>;
|
|
37
45
|
/**
|
|
38
46
|
* Sets the background color of the tabs bar. Use `frosted` only when placed on top of images, videos, or gradients.
|
|
39
47
|
* @default 'none'
|
|
@@ -4,14 +4,14 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PTabsBar = /*#__PURE__*/ forwardRef(({ activeTabIndex, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, ...rest }, ref) => {
|
|
7
|
+
const PTabsBar = /*#__PURE__*/ forwardRef(({ activeTabIndex, aria, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
10
10
|
const WebComponentTag = usePrefix('p-tabs-bar');
|
|
11
|
-
const propsToSync = [activeTabIndex, background, compact, size, weight];
|
|
11
|
+
const propsToSync = [activeTabIndex, aria, background, compact, size, weight];
|
|
12
12
|
useBrowserLayoutEffect(() => {
|
|
13
13
|
const { current } = elementRef;
|
|
14
|
-
['activeTabIndex', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
|
+
['activeTabIndex', 'aria', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
15
|
}, propsToSync);
|
|
16
16
|
const props = {
|
|
17
17
|
...rest,
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { TabsBackground, TabsUpdateEventDetail, BreakpointCustomizable, TabsSize, TabsWeight } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, TabsAriaAttribute, TabsBackground, TabsUpdateEventDetail, BreakpointCustomizable, TabsSize, TabsWeight } from '../types';
|
|
3
3
|
export type PTabsProps = BaseProps & {
|
|
4
4
|
/**
|
|
5
5
|
* Sets the zero-based index of the currently active tab; update this prop to switch tabs programmatically.
|
|
6
6
|
* @default 0
|
|
7
7
|
*/
|
|
8
8
|
activeTabIndex?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Sets ARIA attributes on the tablist, such as `aria-label` and `aria-description`.
|
|
11
|
+
*/
|
|
12
|
+
aria?: SelectedAriaAttributes<TabsAriaAttribute>;
|
|
9
13
|
/**
|
|
10
14
|
* Sets the background color of the tabs bar. Use `frosted` only when placed on top of images, videos, or gradients.
|
|
11
15
|
* @default 'none'
|
|
@@ -36,6 +40,10 @@ export declare const PTabs: import("react").ForwardRefExoticComponent<Omit<impor
|
|
|
36
40
|
* @default 0
|
|
37
41
|
*/
|
|
38
42
|
activeTabIndex?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Sets ARIA attributes on the tablist, such as `aria-label` and `aria-description`.
|
|
45
|
+
*/
|
|
46
|
+
aria?: SelectedAriaAttributes<TabsAriaAttribute>;
|
|
39
47
|
/**
|
|
40
48
|
* Sets the background color of the tabs bar. Use `frosted` only when placed on top of images, videos, or gradients.
|
|
41
49
|
* @default 'none'
|
|
@@ -4,14 +4,14 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PTabs = /*#__PURE__*/ forwardRef(({ activeTabIndex = 0, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, ...rest }, ref) => {
|
|
7
|
+
const PTabs = /*#__PURE__*/ forwardRef(({ activeTabIndex = 0, aria, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
10
10
|
const WebComponentTag = usePrefix('p-tabs');
|
|
11
|
-
const propsToSync = [activeTabIndex, background, compact, size, weight];
|
|
11
|
+
const propsToSync = [activeTabIndex, aria, background, compact, size, weight];
|
|
12
12
|
useBrowserLayoutEffect(() => {
|
|
13
13
|
const { current } = elementRef;
|
|
14
|
-
['activeTabIndex', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
|
+
['activeTabIndex', 'aria', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
15
|
}, propsToSync);
|
|
16
16
|
const props = {
|
|
17
17
|
...rest,
|
package/esm/lib/types.d.ts
CHANGED
|
@@ -1583,7 +1583,9 @@ declare const SCROLLER_ALIGN_SCROLL_INDICATORS: readonly [
|
|
|
1583
1583
|
/** @deprecated */
|
|
1584
1584
|
export type ScrollerAlignScrollIndicator = (typeof SCROLLER_ALIGN_SCROLL_INDICATORS)[number];
|
|
1585
1585
|
declare const SCROLLER_ARIA_ATTRIBUTES: readonly [
|
|
1586
|
-
"role"
|
|
1586
|
+
"role",
|
|
1587
|
+
"aria-label",
|
|
1588
|
+
"aria-description"
|
|
1587
1589
|
];
|
|
1588
1590
|
export type ScrollerAriaAttribute = (typeof SCROLLER_ARIA_ATTRIBUTES)[number];
|
|
1589
1591
|
/** @deprecated */
|
|
@@ -1670,6 +1672,11 @@ export type TableHeadCellSort = {
|
|
|
1670
1672
|
direction?: Direction;
|
|
1671
1673
|
};
|
|
1672
1674
|
export type TableUpdateEventDetail = TableHeadCellSort;
|
|
1675
|
+
declare const TABS_ARIA_ATTRIBUTES: readonly [
|
|
1676
|
+
"aria-label",
|
|
1677
|
+
"aria-description"
|
|
1678
|
+
];
|
|
1679
|
+
export type TabsAriaAttribute = (typeof TABS_ARIA_ATTRIBUTES)[number];
|
|
1673
1680
|
declare const TABS_SIZES: readonly [
|
|
1674
1681
|
"small",
|
|
1675
1682
|
"medium"
|
|
@@ -1691,6 +1698,11 @@ export type TabsWeight = (typeof TABS_WEIGHTS)[number];
|
|
|
1691
1698
|
export type TabsUpdateEventDetail = {
|
|
1692
1699
|
activeTabIndex: number;
|
|
1693
1700
|
};
|
|
1701
|
+
declare const TABS_BAR_ARIA_ATTRIBUTES: readonly [
|
|
1702
|
+
"aria-label",
|
|
1703
|
+
"aria-description"
|
|
1704
|
+
];
|
|
1705
|
+
export type TabsBarAriaAttribute = (typeof TABS_BAR_ARIA_ATTRIBUTES)[number];
|
|
1694
1706
|
declare const TABS_BAR_BACKGROUNDS: readonly [
|
|
1695
1707
|
"canvas",
|
|
1696
1708
|
"surface",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@porsche-design-system/components-react",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.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",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"url": "https://github.com/porsche-design-system/porsche-design-system"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@porsche-design-system/components-js": "4.
|
|
24
|
+
"@porsche-design-system/components-js": "4.3.0-rc.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"ag-grid-community": ">= 35.0.0 <36.0.0",
|