@porsche-design-system/components-react 3.1.0-rc.2 → 3.2.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.
Files changed (25) hide show
  1. package/CHANGELOG.md +45 -6
  2. package/esm/lib/components/carousel.wrapper.js +3 -3
  3. package/esm/lib/components/pagination.wrapper.js +3 -3
  4. package/lib/components/carousel.wrapper.d.ts +8 -0
  5. package/lib/components/carousel.wrapper.js +3 -3
  6. package/lib/components/pagination.wrapper.d.ts +10 -2
  7. package/lib/components/pagination.wrapper.js +3 -3
  8. package/lib/types.d.ts +199 -199
  9. package/package.json +2 -2
  10. package/ssr/components/dist/styles/esm/styles-entry.js +79 -37
  11. package/ssr/components/dist/utils/esm/utils-entry.js +55 -89
  12. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +4 -4
  13. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +4 -4
  14. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +5 -4
  15. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +7 -6
  16. package/ssr/esm/components/dist/styles/esm/styles-entry.js +79 -37
  17. package/ssr/esm/components/dist/utils/esm/utils-entry.js +55 -89
  18. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +4 -4
  19. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +4 -4
  20. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +5 -4
  21. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +8 -7
  22. package/ssr/lib/components/carousel.wrapper.d.ts +8 -0
  23. package/ssr/lib/components/pagination.wrapper.d.ts +10 -2
  24. package/ssr/lib/dsr-components/pagination.d.ts +0 -1
  25. package/ssr/lib/types.d.ts +199 -199
package/CHANGELOG.md CHANGED
@@ -1,19 +1,58 @@
1
1
  # Changelog
2
2
 
3
- ## Porsche Design System - Components
3
+ ## Porsche Design System
4
4
 
5
- All notable changes to this project will be documented in this file.
5
+ All notable changes to this project will be documented in this file and published as following npm packages:
6
+
7
+ - `@porsche-design-system/components-js`
8
+ - `@porsche-design-system/components-angular`
9
+ - `@porsche-design-system/components-react`
10
+ - `@porsche-design-system/components-vue`
6
11
 
7
12
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
8
13
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
14
 
10
15
  ### [Unreleased]
11
16
 
17
+ ### [3.2.0-rc.0] - 2023-06-19
18
+
19
+ #### Added
20
+
21
+ - `skipLinkTarget` property to `Carousel` component to enhance keyboard functionality
22
+ ([#2557](https://github.com/porsche-design-system/porsche-design-system/pull/2557))
23
+ - `showLastPage` property to `Pagination` component
24
+ ([#2606](https://github.com/porsche-design-system/porsche-design-system/pull/2606))
25
+
26
+ #### Fixed
27
+
28
+ - Partials: `getInitialStyles` supports `Flyout` component
29
+ ([#2598](https://github.com/porsche-design-system/porsche-design-system/pull/2598))
30
+ - `Popover` content can be selected/highlighted
31
+ ([#2599](https://github.com/porsche-design-system/porsche-design-system/pull/2599))
32
+
33
+ #### Changed
34
+
35
+ - `Carousel` pagination now shows 5 "infinite bullets" when using more than 5 slides
36
+ ([#2600](https://github.com/porsche-design-system/porsche-design-system/pull/2600))
37
+ - `Carousel` supports click events on non-active slides and changed keyboard navigation
38
+ ([#2557](https://github.com/porsche-design-system/porsche-design-system/pull/2557))
39
+ - Unified wordings of all console warnings, errors and exceptions
40
+ ([#2602](https://github.com/porsche-design-system/porsche-design-system/pull/2602))
41
+ - Angular: increased peer dependency to `>=15.0.0 <17.0.0`
42
+ ([#2602](https://github.com/porsche-design-system/porsche-design-system/pull/2602))
43
+ - `Toast` allows line break markups within toast message
44
+ ([#2584](https://github.com/porsche-design-system/porsche-design-system/pull/2584))
45
+ - `Toast` shows always the latest toast message and clears its queue immediately if a new message is added
46
+ ([#2584](https://github.com/porsche-design-system/porsche-design-system/pull/2584))
47
+
48
+ ### [3.1.0] - 2023-06-09
49
+
12
50
  ### [3.1.0-rc.2] - 2023-06-09
13
51
 
14
52
  #### Changed
15
53
 
16
- - `Crest` replaced final assets and meta icons
54
+ - `Crest` updated assets ([#2595](https://github.com/porsche-design-system/porsche-design-system/pull/2595))
55
+ - Partials: `getMetaTagsAndIconLinks` updated assets
17
56
  ([#2595](https://github.com/porsche-design-system/porsche-design-system/pull/2595))
18
57
 
19
58
  #### Added
@@ -1642,7 +1681,7 @@ accessible regarding its color contrast and might even be removed in an upcoming
1642
1681
 
1643
1682
  #### Changed
1644
1683
 
1645
- - Angular: Increased peer dependency to `>=12.0.0 <14.0.0`
1684
+ - Angular: increased peer dependency to `>=12.0.0 <14.0.0`
1646
1685
 
1647
1686
  ### [2.7.0] - 2021-12-14
1648
1687
 
@@ -1936,7 +1975,7 @@ color contrast and might even be removed in an upcoming major release again.
1936
1975
 
1937
1976
  #### Fixed
1938
1977
 
1939
- - Angular: Events firing twice in `Pagination`, `Modal`, `Tabs`, `Tabs Bar` and `Banner` component
1978
+ - Angular: events firing twice in `Pagination`, `Modal`, `Tabs`, `Tabs Bar` and `Banner` component
1940
1979
 
1941
1980
  ### [2.0.2] - 2021-04-21
1942
1981
 
@@ -1953,7 +1992,7 @@ color contrast and might even be removed in an upcoming major release again.
1953
1992
  - Visual appearance of `Checkbox Wrapper` in iOS Safari
1954
1993
  - A bug where `Text Field Wrapper` would throw an error when reattaching to DOM too quickly
1955
1994
  - Visual bug in Firefox when zooming out `Text Field Wrapper`, `Checkbox Wrapper` and `Textarea Wrapper`
1956
- - Angular: Streamline component styles in dark theme
1995
+ - Angular: streamline component styles in dark theme
1957
1996
 
1958
1997
  #### Changed
1959
1998
 
@@ -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,