@porsche-design-system/components-react 3.1.0 → 3.2.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 +42 -9
- package/esm/lib/components/carousel.wrapper.js +3 -3
- package/esm/lib/components/pagination.wrapper.js +3 -3
- package/lib/components/carousel.wrapper.d.ts +8 -0
- package/lib/components/carousel.wrapper.js +3 -3
- package/lib/components/pagination.wrapper.d.ts +10 -2
- package/lib/components/pagination.wrapper.js +3 -3
- package/lib/types.d.ts +199 -199
- package/package.json +2 -2
- package/ssr/components/dist/styles/esm/styles-entry.js +80 -37
- package/ssr/components/dist/utils/esm/utils-entry.js +55 -89
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +5 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +7 -6
- package/ssr/esm/components/dist/styles/esm/styles-entry.js +80 -37
- package/ssr/esm/components/dist/utils/esm/utils-entry.js +55 -89
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +8 -7
- package/ssr/lib/components/carousel.wrapper.d.ts +8 -0
- package/ssr/lib/components/pagination.wrapper.d.ts +10 -2
- package/ssr/lib/dsr-components/pagination.d.ts +0 -1
- package/ssr/lib/types.d.ts +199 -199
package/CHANGELOG.md
CHANGED
|
@@ -2,26 +2,59 @@
|
|
|
2
2
|
|
|
3
3
|
## Porsche Design System
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
All notable changes to this project will be documented in this file and published as following npm packages:
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
- `@porsche-design-system/components-js`
|
|
8
|
+
- `@porsche-design-system/components-angular`
|
|
9
|
+
- `@porsche-design-system/components-react`
|
|
10
|
+
- `@porsche-design-system/components-vue`
|
|
12
11
|
|
|
13
12
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
|
|
14
13
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
15
14
|
|
|
16
15
|
### [Unreleased]
|
|
17
16
|
|
|
17
|
+
### [3.2.0] - 2023-06-19
|
|
18
|
+
|
|
19
|
+
### [3.2.0-rc.0] - 2023-06-19
|
|
20
|
+
|
|
21
|
+
#### Added
|
|
22
|
+
|
|
23
|
+
- `skipLinkTarget` property to `Carousel` component to enhance keyboard functionality
|
|
24
|
+
([#2557](https://github.com/porsche-design-system/porsche-design-system/pull/2557))
|
|
25
|
+
- `showLastPage` property to `Pagination` component
|
|
26
|
+
([#2606](https://github.com/porsche-design-system/porsche-design-system/pull/2606))
|
|
27
|
+
|
|
28
|
+
#### Fixed
|
|
29
|
+
|
|
30
|
+
- Partials: `getInitialStyles` supports `Flyout` component
|
|
31
|
+
([#2598](https://github.com/porsche-design-system/porsche-design-system/pull/2598))
|
|
32
|
+
- `Popover` content can be selected/highlighted
|
|
33
|
+
([#2599](https://github.com/porsche-design-system/porsche-design-system/pull/2599))
|
|
34
|
+
|
|
35
|
+
#### Changed
|
|
36
|
+
|
|
37
|
+
- `Carousel` pagination now shows 5 "infinite bullets" when using more than 5 slides
|
|
38
|
+
([#2600](https://github.com/porsche-design-system/porsche-design-system/pull/2600))
|
|
39
|
+
- `Carousel` supports click events on non-active slides and changed keyboard navigation
|
|
40
|
+
([#2557](https://github.com/porsche-design-system/porsche-design-system/pull/2557))
|
|
41
|
+
- Unified wordings of all console warnings, errors and exceptions
|
|
42
|
+
([#2602](https://github.com/porsche-design-system/porsche-design-system/pull/2602))
|
|
43
|
+
- Angular: increased peer dependency to `>=15.0.0 <17.0.0`
|
|
44
|
+
([#2602](https://github.com/porsche-design-system/porsche-design-system/pull/2602))
|
|
45
|
+
- `Toast` allows line break markups within toast message
|
|
46
|
+
([#2584](https://github.com/porsche-design-system/porsche-design-system/pull/2584))
|
|
47
|
+
- `Toast` shows always the latest toast message and clears its queue immediately if a new message is added
|
|
48
|
+
([#2584](https://github.com/porsche-design-system/porsche-design-system/pull/2584))
|
|
49
|
+
|
|
18
50
|
### [3.1.0] - 2023-06-09
|
|
19
51
|
|
|
20
52
|
### [3.1.0-rc.2] - 2023-06-09
|
|
21
53
|
|
|
22
54
|
#### Changed
|
|
23
55
|
|
|
24
|
-
- `Crest`
|
|
56
|
+
- `Crest` updated assets ([#2595](https://github.com/porsche-design-system/porsche-design-system/pull/2595))
|
|
57
|
+
- Partials: `getMetaTagsAndIconLinks` updated assets
|
|
25
58
|
([#2595](https://github.com/porsche-design-system/porsche-design-system/pull/2595))
|
|
26
59
|
|
|
27
60
|
#### Added
|
|
@@ -1650,7 +1683,7 @@ accessible regarding its color contrast and might even be removed in an upcoming
|
|
|
1650
1683
|
|
|
1651
1684
|
#### Changed
|
|
1652
1685
|
|
|
1653
|
-
- Angular:
|
|
1686
|
+
- Angular: increased peer dependency to `>=12.0.0 <14.0.0`
|
|
1654
1687
|
|
|
1655
1688
|
### [2.7.0] - 2021-12-14
|
|
1656
1689
|
|
|
@@ -1944,7 +1977,7 @@ color contrast and might even be removed in an upcoming major release again.
|
|
|
1944
1977
|
|
|
1945
1978
|
#### Fixed
|
|
1946
1979
|
|
|
1947
|
-
- Angular:
|
|
1980
|
+
- Angular: events firing twice in `Pagination`, `Modal`, `Tabs`, `Tabs Bar` and `Banner` component
|
|
1948
1981
|
|
|
1949
1982
|
### [2.0.2] - 2021-04-21
|
|
1950
1983
|
|
|
@@ -1961,7 +1994,7 @@ color contrast and might even be removed in an upcoming major release again.
|
|
|
1961
1994
|
- Visual appearance of `Checkbox Wrapper` in iOS Safari
|
|
1962
1995
|
- A bug where `Text Field Wrapper` would throw an error when reattaching to DOM too quickly
|
|
1963
1996
|
- Visual bug in Firefox when zooming out `Text Field Wrapper`, `Checkbox Wrapper` and `Textarea Wrapper`
|
|
1964
|
-
- Angular:
|
|
1997
|
+
- Angular: streamline component styles in dark theme
|
|
1965
1998
|
|
|
1966
1999
|
#### Changed
|
|
1967
2000
|
|
|
@@ -3,15 +3,15 @@ import { forwardRef, useRef } from 'react';
|
|
|
3
3
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.js';
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
|
|
6
|
-
const PCarousel = forwardRef(({ activeSlideIndex = 0, alignHeader = 'left', description, disablePagination, heading, intl, onCarouselChange, onUpdate, pagination = true, rewind = true, slidesPerPage = 1, theme = 'light', width = 'basic', wrapContent, className, ...rest }, ref) => {
|
|
6
|
+
const PCarousel = forwardRef(({ activeSlideIndex = 0, alignHeader = 'left', description, disablePagination, heading, intl, onCarouselChange, onUpdate, pagination = true, rewind = true, skipLinkTarget, slidesPerPage = 1, theme = 'light', width = 'basic', wrapContent, className, ...rest }, ref) => {
|
|
7
7
|
const elementRef = useRef();
|
|
8
8
|
useEventCallback(elementRef, 'carouselChange', onCarouselChange);
|
|
9
9
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
10
10
|
const WebComponentTag = usePrefix('p-carousel');
|
|
11
|
-
const propsToSync = [activeSlideIndex, alignHeader, description, disablePagination, heading, intl, pagination, rewind, slidesPerPage, theme, width, wrapContent];
|
|
11
|
+
const propsToSync = [activeSlideIndex, alignHeader, description, disablePagination, heading, intl, pagination, rewind, skipLinkTarget, slidesPerPage, theme, width, wrapContent];
|
|
12
12
|
useBrowserLayoutEffect(() => {
|
|
13
13
|
const { current } = elementRef;
|
|
14
|
-
['activeSlideIndex', 'alignHeader', 'description', 'disablePagination', 'heading', 'intl', 'pagination', 'rewind', 'slidesPerPage', 'theme', 'width', 'wrapContent'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
|
+
['activeSlideIndex', 'alignHeader', 'description', 'disablePagination', 'heading', 'intl', 'pagination', 'rewind', 'skipLinkTarget', 'slidesPerPage', 'theme', 'width', 'wrapContent'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
15
|
}, propsToSync);
|
|
16
16
|
const props = {
|
|
17
17
|
...rest,
|
|
@@ -3,15 +3,15 @@ import { forwardRef, useRef } from 'react';
|
|
|
3
3
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.js';
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
|
|
6
|
-
const PPagination = forwardRef(({ activePage = 1, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl = { root: 'Pagination', prev: 'Previous page', next: 'Next page', page: 'Page', }, itemsPerPage = 1, maxNumberOfPageLinks = { base: 5, xs: 7, }, onPageChange, onUpdate, theme = 'light', totalItemsCount = 1, className, ...rest }, ref) => {
|
|
6
|
+
const PPagination = forwardRef(({ activePage = 1, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl = { root: 'Pagination', prev: 'Previous page', next: 'Next page', page: 'Page', }, itemsPerPage = 1, maxNumberOfPageLinks = { base: 5, xs: 7, }, onPageChange, onUpdate, showLastPage = true, theme = 'light', totalItemsCount = 1, className, ...rest }, ref) => {
|
|
7
7
|
const elementRef = useRef();
|
|
8
8
|
useEventCallback(elementRef, 'pageChange', onPageChange);
|
|
9
9
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
10
10
|
const WebComponentTag = usePrefix('p-pagination');
|
|
11
|
-
const propsToSync = [activePage, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl, itemsPerPage, maxNumberOfPageLinks, theme, totalItemsCount];
|
|
11
|
+
const propsToSync = [activePage, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl, itemsPerPage, maxNumberOfPageLinks, showLastPage, theme, totalItemsCount];
|
|
12
12
|
useBrowserLayoutEffect(() => {
|
|
13
13
|
const { current } = elementRef;
|
|
14
|
-
['activePage', 'allyLabel', 'allyLabelNext', 'allyLabelPage', 'allyLabelPrev', 'intl', 'itemsPerPage', 'maxNumberOfPageLinks', 'theme', 'totalItemsCount'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
|
+
['activePage', 'allyLabel', 'allyLabelNext', 'allyLabelPage', 'allyLabelPrev', 'intl', 'itemsPerPage', 'maxNumberOfPageLinks', 'showLastPage', 'theme', 'totalItemsCount'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
15
|
}, propsToSync);
|
|
16
16
|
const props = {
|
|
17
17
|
...rest,
|
|
@@ -41,6 +41,10 @@ export type PCarouselProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
41
41
|
* Whether the slides should rewind from last to first slide and vice versa.
|
|
42
42
|
*/
|
|
43
43
|
rewind?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Defines target of skip link (to skip carousel entries).
|
|
46
|
+
*/
|
|
47
|
+
skipLinkTarget?: string;
|
|
44
48
|
/**
|
|
45
49
|
* 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.
|
|
46
50
|
*/
|
|
@@ -100,6 +104,10 @@ export declare const PCarousel: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
100
104
|
* Whether the slides should rewind from last to first slide and vice versa.
|
|
101
105
|
*/
|
|
102
106
|
rewind?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Defines target of skip link (to skip carousel entries).
|
|
109
|
+
*/
|
|
110
|
+
skipLinkTarget?: string;
|
|
103
111
|
/**
|
|
104
112
|
* 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.
|
|
105
113
|
*/
|
|
@@ -5,15 +5,15 @@ var react = require('react');
|
|
|
5
5
|
var hooks = require('../../hooks.js');
|
|
6
6
|
var utils = require('../../utils.js');
|
|
7
7
|
|
|
8
|
-
const PCarousel = react.forwardRef(({ activeSlideIndex = 0, alignHeader = 'left', description, disablePagination, heading, intl, onCarouselChange, onUpdate, pagination = true, rewind = true, slidesPerPage = 1, theme = 'light', width = 'basic', wrapContent, className, ...rest }, ref) => {
|
|
8
|
+
const PCarousel = react.forwardRef(({ activeSlideIndex = 0, alignHeader = 'left', description, disablePagination, heading, intl, onCarouselChange, onUpdate, pagination = true, rewind = true, skipLinkTarget, slidesPerPage = 1, theme = 'light', width = 'basic', wrapContent, className, ...rest }, ref) => {
|
|
9
9
|
const elementRef = react.useRef();
|
|
10
10
|
hooks.useEventCallback(elementRef, 'carouselChange', onCarouselChange);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
12
12
|
const WebComponentTag = hooks.usePrefix('p-carousel');
|
|
13
|
-
const propsToSync = [activeSlideIndex, alignHeader, description, disablePagination, heading, intl, pagination, rewind, slidesPerPage, theme, width, wrapContent];
|
|
13
|
+
const propsToSync = [activeSlideIndex, alignHeader, description, disablePagination, heading, intl, pagination, rewind, skipLinkTarget, slidesPerPage, theme, width, wrapContent];
|
|
14
14
|
hooks.useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['activeSlideIndex', 'alignHeader', 'description', 'disablePagination', 'heading', 'intl', 'pagination', 'rewind', 'slidesPerPage', 'theme', 'width', 'wrapContent'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['activeSlideIndex', 'alignHeader', 'description', 'disablePagination', 'heading', 'intl', 'pagination', 'rewind', 'skipLinkTarget', 'slidesPerPage', 'theme', 'width', 'wrapContent'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -30,7 +30,7 @@ export type PPaginationProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
30
30
|
*/
|
|
31
31
|
itemsPerPage?: number;
|
|
32
32
|
/**
|
|
33
|
-
* The maximum number of page links rendered
|
|
33
|
+
* The maximum number of page links rendered.
|
|
34
34
|
*/
|
|
35
35
|
maxNumberOfPageLinks?: BreakpointCustomizable<PaginationMaxNumberOfPageLinks>;
|
|
36
36
|
/**
|
|
@@ -41,6 +41,10 @@ export type PPaginationProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
41
41
|
* Emitted when the page changes.
|
|
42
42
|
*/
|
|
43
43
|
onUpdate?: (event: CustomEvent<PaginationUpdateEvent>) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Show or hide the button to jump to the last page.
|
|
46
|
+
*/
|
|
47
|
+
showLastPage?: boolean;
|
|
44
48
|
/**
|
|
45
49
|
* Adapts the color when used on dark background.
|
|
46
50
|
*/
|
|
@@ -80,7 +84,7 @@ export declare const PPagination: import("react").ForwardRefExoticComponent<Omit
|
|
|
80
84
|
*/
|
|
81
85
|
itemsPerPage?: number;
|
|
82
86
|
/**
|
|
83
|
-
* The maximum number of page links rendered
|
|
87
|
+
* The maximum number of page links rendered.
|
|
84
88
|
*/
|
|
85
89
|
maxNumberOfPageLinks?: BreakpointCustomizable<PaginationMaxNumberOfPageLinks>;
|
|
86
90
|
/**
|
|
@@ -91,6 +95,10 @@ export declare const PPagination: import("react").ForwardRefExoticComponent<Omit
|
|
|
91
95
|
* Emitted when the page changes.
|
|
92
96
|
*/
|
|
93
97
|
onUpdate?: (event: CustomEvent<PaginationUpdateEvent>) => void;
|
|
98
|
+
/**
|
|
99
|
+
* Show or hide the button to jump to the last page.
|
|
100
|
+
*/
|
|
101
|
+
showLastPage?: boolean;
|
|
94
102
|
/**
|
|
95
103
|
* Adapts the color when used on dark background.
|
|
96
104
|
*/
|
|
@@ -5,15 +5,15 @@ var react = require('react');
|
|
|
5
5
|
var hooks = require('../../hooks.js');
|
|
6
6
|
var utils = require('../../utils.js');
|
|
7
7
|
|
|
8
|
-
const PPagination = react.forwardRef(({ activePage = 1, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl = { root: 'Pagination', prev: 'Previous page', next: 'Next page', page: 'Page', }, itemsPerPage = 1, maxNumberOfPageLinks = { base: 5, xs: 7, }, onPageChange, onUpdate, theme = 'light', totalItemsCount = 1, className, ...rest }, ref) => {
|
|
8
|
+
const PPagination = react.forwardRef(({ activePage = 1, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl = { root: 'Pagination', prev: 'Previous page', next: 'Next page', page: 'Page', }, itemsPerPage = 1, maxNumberOfPageLinks = { base: 5, xs: 7, }, onPageChange, onUpdate, showLastPage = true, theme = 'light', totalItemsCount = 1, className, ...rest }, ref) => {
|
|
9
9
|
const elementRef = react.useRef();
|
|
10
10
|
hooks.useEventCallback(elementRef, 'pageChange', onPageChange);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
12
12
|
const WebComponentTag = hooks.usePrefix('p-pagination');
|
|
13
|
-
const propsToSync = [activePage, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl, itemsPerPage, maxNumberOfPageLinks, theme, totalItemsCount];
|
|
13
|
+
const propsToSync = [activePage, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl, itemsPerPage, maxNumberOfPageLinks, showLastPage, theme, totalItemsCount];
|
|
14
14
|
hooks.useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['activePage', 'allyLabel', 'allyLabelNext', 'allyLabelPage', 'allyLabelPrev', 'intl', 'itemsPerPage', 'maxNumberOfPageLinks', 'theme', 'totalItemsCount'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['activePage', 'allyLabel', 'allyLabelNext', 'allyLabelPage', 'allyLabelPrev', 'intl', 'itemsPerPage', 'maxNumberOfPageLinks', 'showLastPage', 'theme', 'totalItemsCount'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|