@porsche-design-system/components-react 3.0.0-alpha.5 → 3.0.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 (85) hide show
  1. package/CHANGELOG.md +156 -20
  2. package/esm/lib/components/accordion.wrapper.js +2 -2
  3. package/esm/lib/components/banner.wrapper.js +3 -3
  4. package/esm/lib/components/carousel.wrapper.js +2 -2
  5. package/esm/lib/components/inline-notification.wrapper.js +3 -3
  6. package/esm/lib/components/pagination.wrapper.js +2 -2
  7. package/esm/lib/components/segmented-control.wrapper.js +2 -2
  8. package/esm/lib/components/stepper-horizontal.wrapper.js +2 -2
  9. package/esm/lib/components/switch.wrapper.js +2 -2
  10. package/esm/lib/components/table.wrapper.js +2 -2
  11. package/esm/lib/components/tabs-bar.wrapper.js +2 -2
  12. package/esm/lib/components/tabs.wrapper.js +2 -2
  13. package/lib/components/accordion.wrapper.d.ts +7 -7
  14. package/lib/components/accordion.wrapper.js +2 -2
  15. package/lib/components/banner.wrapper.d.ts +18 -2
  16. package/lib/components/banner.wrapper.js +3 -3
  17. package/lib/components/carousel.wrapper.d.ts +7 -7
  18. package/lib/components/carousel.wrapper.js +2 -2
  19. package/lib/components/inline-notification.wrapper.d.ts +10 -2
  20. package/lib/components/inline-notification.wrapper.js +3 -3
  21. package/lib/components/pagination.wrapper.d.ts +9 -9
  22. package/lib/components/pagination.wrapper.js +2 -2
  23. package/lib/components/segmented-control.wrapper.d.ts +9 -9
  24. package/lib/components/segmented-control.wrapper.js +2 -2
  25. package/lib/components/stepper-horizontal.wrapper.d.ts +9 -9
  26. package/lib/components/stepper-horizontal.wrapper.js +2 -2
  27. package/lib/components/switch.wrapper.d.ts +9 -9
  28. package/lib/components/switch.wrapper.js +2 -2
  29. package/lib/components/table.wrapper.d.ts +9 -9
  30. package/lib/components/table.wrapper.js +2 -2
  31. package/lib/components/tabs-bar.wrapper.d.ts +9 -9
  32. package/lib/components/tabs-bar.wrapper.js +2 -2
  33. package/lib/components/tabs.wrapper.d.ts +9 -9
  34. package/lib/components/tabs.wrapper.js +2 -2
  35. package/lib/types.d.ts +20 -19
  36. package/package.json +2 -2
  37. package/ssr/components/dist/styles/esm/styles-entry.js +76 -84
  38. package/ssr/components/dist/utils/esm/utils-entry.js +4 -9
  39. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +2 -2
  40. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +4 -4
  41. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +2 -2
  42. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.js +4 -4
  43. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +2 -2
  44. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +2 -2
  45. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +2 -2
  46. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +2 -2
  47. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +2 -2
  48. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +2 -2
  49. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +2 -2
  50. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +5 -2
  51. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +1 -1
  52. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.js +5 -2
  53. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +1 -1
  54. package/ssr/esm/components/dist/styles/esm/styles-entry.js +76 -84
  55. package/ssr/esm/components/dist/utils/esm/utils-entry.js +5 -9
  56. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +2 -2
  57. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +4 -4
  58. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +2 -2
  59. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.js +4 -4
  60. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +2 -2
  61. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +2 -2
  62. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +2 -2
  63. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +2 -2
  64. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +2 -2
  65. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +2 -2
  66. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +2 -2
  67. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +5 -2
  68. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +2 -2
  69. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.js +5 -2
  70. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +1 -1
  71. package/ssr/lib/components/accordion.wrapper.d.ts +7 -7
  72. package/ssr/lib/components/banner.wrapper.d.ts +18 -2
  73. package/ssr/lib/components/carousel.wrapper.d.ts +7 -7
  74. package/ssr/lib/components/inline-notification.wrapper.d.ts +10 -2
  75. package/ssr/lib/components/pagination.wrapper.d.ts +9 -9
  76. package/ssr/lib/components/segmented-control.wrapper.d.ts +9 -9
  77. package/ssr/lib/components/stepper-horizontal.wrapper.d.ts +9 -9
  78. package/ssr/lib/components/switch.wrapper.d.ts +9 -9
  79. package/ssr/lib/components/table.wrapper.d.ts +9 -9
  80. package/ssr/lib/components/tabs-bar.wrapper.d.ts +9 -9
  81. package/ssr/lib/components/tabs.wrapper.d.ts +9 -9
  82. package/ssr/lib/dsr-components/banner.d.ts +2 -0
  83. package/ssr/lib/dsr-components/inline-notification.d.ts +1 -0
  84. package/ssr/lib/dsr-components/switch.d.ts +0 -3
  85. package/ssr/lib/types.d.ts +20 -19
@@ -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 PInlineNotification = react.forwardRef(({ actionIcon = 'arrow-right', actionLabel, actionLoading = false, description = '', heading = '', onAction, onDismiss, persistent = false, state = 'info', theme = 'light', className, ...rest }, ref) => {
8
+ const PInlineNotification = react.forwardRef(({ actionIcon = 'arrow-right', actionLabel, actionLoading = false, description = '', dismissButton = true, heading = '', onAction, onDismiss, persistent, state = 'info', theme = 'light', className, ...rest }, ref) => {
9
9
  const elementRef = react.useRef();
10
10
  hooks.useEventCallback(elementRef, 'action', onAction);
11
11
  hooks.useEventCallback(elementRef, 'dismiss', onDismiss);
12
12
  const WebComponentTag = hooks.usePrefix('p-inline-notification');
13
- const propsToSync = [actionIcon, actionLabel, actionLoading, description, heading, persistent, state, theme];
13
+ const propsToSync = [actionIcon, actionLabel, actionLoading, description, dismissButton, heading, persistent, state, theme];
14
14
  hooks.useBrowserLayoutEffect(() => {
15
15
  const { current } = elementRef;
16
- ['actionIcon', 'actionLabel', 'actionLoading', 'description', 'heading', 'persistent', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
16
+ ['actionIcon', 'actionLabel', 'actionLoading', 'description', 'dismissButton', 'heading', 'persistent', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
17
17
  }, propsToSync);
18
18
  const props = {
19
19
  ...rest,
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import type { PaginationInternationalization, BreakpointCustomizable, PaginationMaxNumberOfPageLinks, PaginationChangeEvent, Theme } from '../types';
2
+ import type { PaginationInternationalization, BreakpointCustomizable, PaginationMaxNumberOfPageLinks, PaginationUpdateEvent, Theme } from '../types';
3
3
  export type PPaginationProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
4
4
  /**
5
5
  * Index of the currently active page.
@@ -34,13 +34,13 @@ export type PPaginationProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> &
34
34
  */
35
35
  maxNumberOfPageLinks?: BreakpointCustomizable<PaginationMaxNumberOfPageLinks>;
36
36
  /**
37
- * Emitted when the page changes.
37
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when the page changes.
38
38
  */
39
- onChange?: (event: CustomEvent<PaginationChangeEvent>) => void;
39
+ onPageChange?: (event: CustomEvent<PaginationUpdateEvent>) => void;
40
40
  /**
41
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when the page changes.
41
+ * Emitted when the page changes.
42
42
  */
43
- onPageChange?: (event: CustomEvent<PaginationChangeEvent>) => void;
43
+ onUpdate?: (event: CustomEvent<PaginationUpdateEvent>) => void;
44
44
  /**
45
45
  * Adapts the color when used on dark background.
46
46
  */
@@ -84,13 +84,13 @@ export declare const PPagination: import("react").ForwardRefExoticComponent<Omit
84
84
  */
85
85
  maxNumberOfPageLinks?: BreakpointCustomizable<PaginationMaxNumberOfPageLinks>;
86
86
  /**
87
- * Emitted when the page changes.
87
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when the page changes.
88
88
  */
89
- onChange?: (event: CustomEvent<PaginationChangeEvent>) => void;
89
+ onPageChange?: (event: CustomEvent<PaginationUpdateEvent>) => void;
90
90
  /**
91
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when the page changes.
91
+ * Emitted when the page changes.
92
92
  */
93
- onPageChange?: (event: CustomEvent<PaginationChangeEvent>) => void;
93
+ onUpdate?: (event: CustomEvent<PaginationUpdateEvent>) => void;
94
94
  /**
95
95
  * Adapts the color when used on dark background.
96
96
  */
@@ -5,10 +5,10 @@ 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, }, onChange, onPageChange, 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, theme = 'light', totalItemsCount = 1, className, ...rest }, ref) => {
9
9
  const elementRef = react.useRef();
10
- hooks.useEventCallback(elementRef, 'change', onChange);
11
10
  hooks.useEventCallback(elementRef, 'pageChange', onPageChange);
11
+ hooks.useEventCallback(elementRef, 'update', onUpdate);
12
12
  const WebComponentTag = hooks.usePrefix('p-pagination');
13
13
  const propsToSync = [activePage, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl, itemsPerPage, maxNumberOfPageLinks, theme, totalItemsCount];
14
14
  hooks.useBrowserLayoutEffect(() => {
@@ -1,18 +1,18 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import type { SegmentedControlBackgroundColor, SegmentedControlChangeEvent, Theme } from '../types';
2
+ import type { SegmentedControlBackgroundColor, SegmentedControlUpdateEvent, Theme } from '../types';
3
3
  export type PSegmentedControlProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
4
4
  /**
5
5
  * @deprecated since v3.0.0, will be removed with next major release. Background color variations
6
6
  */
7
7
  backgroundColor?: SegmentedControlBackgroundColor;
8
8
  /**
9
- * Emitted when selected element changes.
9
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when selected element changes.
10
10
  */
11
- onChange?: (event: CustomEvent<SegmentedControlChangeEvent>) => void;
11
+ onSegmentedControlChange?: (event: CustomEvent<SegmentedControlUpdateEvent>) => void;
12
12
  /**
13
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when selected element changes.
13
+ * Emitted when selected element changes.
14
14
  */
15
- onSegmentedControlChange?: (event: CustomEvent<SegmentedControlChangeEvent>) => void;
15
+ onUpdate?: (event: CustomEvent<SegmentedControlUpdateEvent>) => void;
16
16
  /**
17
17
  * Adapts the segmented-control color depending on the theme.
18
18
  */
@@ -28,13 +28,13 @@ export declare const PSegmentedControl: import("react").ForwardRefExoticComponen
28
28
  */
29
29
  backgroundColor?: SegmentedControlBackgroundColor;
30
30
  /**
31
- * Emitted when selected element changes.
31
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when selected element changes.
32
32
  */
33
- onChange?: (event: CustomEvent<SegmentedControlChangeEvent>) => void;
33
+ onSegmentedControlChange?: (event: CustomEvent<SegmentedControlUpdateEvent>) => void;
34
34
  /**
35
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when selected element changes.
35
+ * Emitted when selected element changes.
36
36
  */
37
- onSegmentedControlChange?: (event: CustomEvent<SegmentedControlChangeEvent>) => void;
37
+ onUpdate?: (event: CustomEvent<SegmentedControlUpdateEvent>) => void;
38
38
  /**
39
39
  * Adapts the segmented-control color depending on the theme.
40
40
  */
@@ -5,10 +5,10 @@ var react = require('react');
5
5
  var hooks = require('../../hooks.js');
6
6
  var utils = require('../../utils.js');
7
7
 
8
- const PSegmentedControl = react.forwardRef(({ backgroundColor, onChange, onSegmentedControlChange, theme = 'light', value, className, ...rest }, ref) => {
8
+ const PSegmentedControl = react.forwardRef(({ backgroundColor, onSegmentedControlChange, onUpdate, theme = 'light', value, className, ...rest }, ref) => {
9
9
  const elementRef = react.useRef();
10
- hooks.useEventCallback(elementRef, 'change', onChange);
11
10
  hooks.useEventCallback(elementRef, 'segmentedControlChange', onSegmentedControlChange);
11
+ hooks.useEventCallback(elementRef, 'update', onUpdate);
12
12
  const WebComponentTag = hooks.usePrefix('p-segmented-control');
13
13
  const propsToSync = [backgroundColor, theme, value];
14
14
  hooks.useBrowserLayoutEffect(() => {
@@ -1,14 +1,14 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import type { StepperHorizontalChangeEvent, BreakpointCustomizable, StepperHorizontalSize, Theme } from '../types';
2
+ import type { StepperHorizontalUpdateEvent, BreakpointCustomizable, StepperHorizontalSize, Theme } from '../types';
3
3
  export type PStepperHorizontalProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
4
4
  /**
5
- * Emitted when active step is changed.
5
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when active step is changed.
6
6
  */
7
- onChange?: (event: CustomEvent<StepperHorizontalChangeEvent>) => void;
7
+ onStepChange?: (event: CustomEvent<StepperHorizontalUpdateEvent>) => void;
8
8
  /**
9
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when active step is changed.
9
+ * Emitted when active step is changed.
10
10
  */
11
- onStepChange?: (event: CustomEvent<StepperHorizontalChangeEvent>) => void;
11
+ onUpdate?: (event: CustomEvent<StepperHorizontalUpdateEvent>) => void;
12
12
  /**
13
13
  * The text size.
14
14
  */
@@ -20,13 +20,13 @@ export type PStepperHorizontalProps = Omit<HTMLAttributes<{}>, 'color' | 'onChan
20
20
  };
21
21
  export declare const PStepperHorizontal: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
22
22
  /**
23
- * Emitted when active step is changed.
23
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when active step is changed.
24
24
  */
25
- onChange?: (event: CustomEvent<StepperHorizontalChangeEvent>) => void;
25
+ onStepChange?: (event: CustomEvent<StepperHorizontalUpdateEvent>) => void;
26
26
  /**
27
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when active step is changed.
27
+ * Emitted when active step is changed.
28
28
  */
29
- onStepChange?: (event: CustomEvent<StepperHorizontalChangeEvent>) => void;
29
+ onUpdate?: (event: CustomEvent<StepperHorizontalUpdateEvent>) => void;
30
30
  /**
31
31
  * The text size.
32
32
  */
@@ -5,10 +5,10 @@ var react = require('react');
5
5
  var hooks = require('../../hooks.js');
6
6
  var utils = require('../../utils.js');
7
7
 
8
- const PStepperHorizontal = react.forwardRef(({ onChange, onStepChange, size = 'small', theme = 'light', className, ...rest }, ref) => {
8
+ const PStepperHorizontal = react.forwardRef(({ onStepChange, onUpdate, size = 'small', theme = 'light', className, ...rest }, ref) => {
9
9
  const elementRef = react.useRef();
10
- hooks.useEventCallback(elementRef, 'change', onChange);
11
10
  hooks.useEventCallback(elementRef, 'stepChange', onStepChange);
11
+ hooks.useEventCallback(elementRef, 'update', onUpdate);
12
12
  const WebComponentTag = hooks.usePrefix('p-stepper-horizontal');
13
13
  const propsToSync = [size, theme];
14
14
  hooks.useBrowserLayoutEffect(() => {
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import type { BreakpointCustomizable, SwitchAlignLabel, SwitchChangeEvent, Theme } from '../types';
2
+ import type { BreakpointCustomizable, SwitchAlignLabel, SwitchUpdateEvent, Theme } from '../types';
3
3
  export type PSwitchProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
4
4
  /**
5
5
  * Aligns the label.
@@ -22,13 +22,13 @@ export type PSwitchProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
22
22
  */
23
23
  loading?: boolean;
24
24
  /**
25
- * Emitted when checked status is changed.
25
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when checked status is changed.
26
26
  */
27
- onChange?: (event: CustomEvent<SwitchChangeEvent>) => void;
27
+ onSwitchChange?: (event: CustomEvent<SwitchUpdateEvent>) => void;
28
28
  /**
29
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when checked status is changed.
29
+ * Emitted when checked status is changed.
30
30
  */
31
- onSwitchChange?: (event: CustomEvent<SwitchChangeEvent>) => void;
31
+ onUpdate?: (event: CustomEvent<SwitchUpdateEvent>) => void;
32
32
  /**
33
33
  * Stretches the contents to max available space.
34
34
  */
@@ -60,13 +60,13 @@ export declare const PSwitch: import("react").ForwardRefExoticComponent<Omit<HTM
60
60
  */
61
61
  loading?: boolean;
62
62
  /**
63
- * Emitted when checked status is changed.
63
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when checked status is changed.
64
64
  */
65
- onChange?: (event: CustomEvent<SwitchChangeEvent>) => void;
65
+ onSwitchChange?: (event: CustomEvent<SwitchUpdateEvent>) => void;
66
66
  /**
67
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when checked status is changed.
67
+ * Emitted when checked status is changed.
68
68
  */
69
- onSwitchChange?: (event: CustomEvent<SwitchChangeEvent>) => void;
69
+ onUpdate?: (event: CustomEvent<SwitchUpdateEvent>) => void;
70
70
  /**
71
71
  * Stretches the contents to max available space.
72
72
  */
@@ -5,10 +5,10 @@ var react = require('react');
5
5
  var hooks = require('../../hooks.js');
6
6
  var utils = require('../../utils.js');
7
7
 
8
- const PSwitch = react.forwardRef(({ alignLabel = 'right', checked = false, disabled = false, hideLabel = false, loading = false, onChange, onSwitchChange, stretch = false, theme = 'light', className, ...rest }, ref) => {
8
+ const PSwitch = react.forwardRef(({ alignLabel = 'right', checked = false, disabled = false, hideLabel = false, loading = false, onSwitchChange, onUpdate, stretch = false, theme = 'light', className, ...rest }, ref) => {
9
9
  const elementRef = react.useRef();
10
- hooks.useEventCallback(elementRef, 'change', onChange);
11
10
  hooks.useEventCallback(elementRef, 'switchChange', onSwitchChange);
11
+ hooks.useEventCallback(elementRef, 'update', onUpdate);
12
12
  const WebComponentTag = hooks.usePrefix('p-switch');
13
13
  const propsToSync = [alignLabel, checked, disabled, hideLabel, loading, stretch, theme];
14
14
  hooks.useBrowserLayoutEffect(() => {
@@ -1,18 +1,18 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import type { TableChangeEvent, Theme } from '../types';
2
+ import type { TableUpdateEvent, Theme } from '../types';
3
3
  export type PTableProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
4
4
  /**
5
5
  * A caption describing the contents of the table for accessibility only. This won't be visible in the browser. Use an element with an attribute of `slot="caption"` for a visible caption.
6
6
  */
7
7
  caption?: string;
8
8
  /**
9
- * Emitted when sorting is changed.
9
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when sorting is changed.
10
10
  */
11
- onChange?: (event: CustomEvent<TableChangeEvent>) => void;
11
+ onSortingChange?: (event: CustomEvent<TableUpdateEvent>) => void;
12
12
  /**
13
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when sorting is changed.
13
+ * Emitted when sorting is changed.
14
14
  */
15
- onSortingChange?: (event: CustomEvent<TableChangeEvent>) => void;
15
+ onUpdate?: (event: CustomEvent<TableUpdateEvent>) => void;
16
16
  /**
17
17
  * Adapts the color when used on dark background.
18
18
  */
@@ -24,13 +24,13 @@ export declare const PTable: import("react").ForwardRefExoticComponent<Omit<HTML
24
24
  */
25
25
  caption?: string;
26
26
  /**
27
- * Emitted when sorting is changed.
27
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when sorting is changed.
28
28
  */
29
- onChange?: (event: CustomEvent<TableChangeEvent>) => void;
29
+ onSortingChange?: (event: CustomEvent<TableUpdateEvent>) => void;
30
30
  /**
31
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when sorting is changed.
31
+ * Emitted when sorting is changed.
32
32
  */
33
- onSortingChange?: (event: CustomEvent<TableChangeEvent>) => void;
33
+ onUpdate?: (event: CustomEvent<TableUpdateEvent>) => void;
34
34
  /**
35
35
  * Adapts the color when used on dark background.
36
36
  */
@@ -5,10 +5,10 @@ var react = require('react');
5
5
  var hooks = require('../../hooks.js');
6
6
  var utils = require('../../utils.js');
7
7
 
8
- const PTable = react.forwardRef(({ caption, onChange, onSortingChange, theme = 'light', className, ...rest }, ref) => {
8
+ const PTable = react.forwardRef(({ caption, onSortingChange, onUpdate, theme = 'light', className, ...rest }, ref) => {
9
9
  const elementRef = react.useRef();
10
- hooks.useEventCallback(elementRef, 'change', onChange);
11
10
  hooks.useEventCallback(elementRef, 'sortingChange', onSortingChange);
11
+ hooks.useEventCallback(elementRef, 'update', onUpdate);
12
12
  const WebComponentTag = hooks.usePrefix('p-table');
13
13
  const propsToSync = [caption, theme];
14
14
  hooks.useBrowserLayoutEffect(() => {
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import type { TabsBarGradientColor, TabsBarGradientColorScheme, TabsBarChangeEvent, BreakpointCustomizable, TabsBarSize, Theme, TabsBarWeight } from '../types';
2
+ import type { TabsBarGradientColor, TabsBarGradientColorScheme, TabsBarUpdateEvent, BreakpointCustomizable, TabsBarSize, Theme, TabsBarWeight } from '../types';
3
3
  export type PTabsBarProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
4
4
  /**
5
5
  * Defines which tab to be visualized as selected (zero-based numbering), undefined if none should be selected.
@@ -14,13 +14,13 @@ export type PTabsBarProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
14
14
  */
15
15
  gradientColorScheme?: TabsBarGradientColorScheme;
16
16
  /**
17
- * Emitted when active tab is changed.
17
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when active tab is changed.
18
18
  */
19
- onChange?: (event: CustomEvent<TabsBarChangeEvent>) => void;
19
+ onTabChange?: (event: CustomEvent<TabsBarUpdateEvent>) => void;
20
20
  /**
21
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when active tab is changed.
21
+ * Emitted when active tab is changed.
22
22
  */
23
- onTabChange?: (event: CustomEvent<TabsBarChangeEvent>) => void;
23
+ onUpdate?: (event: CustomEvent<TabsBarUpdateEvent>) => void;
24
24
  /**
25
25
  * The text size.
26
26
  */
@@ -48,13 +48,13 @@ export declare const PTabsBar: import("react").ForwardRefExoticComponent<Omit<HT
48
48
  */
49
49
  gradientColorScheme?: TabsBarGradientColorScheme;
50
50
  /**
51
- * Emitted when active tab is changed.
51
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when active tab is changed.
52
52
  */
53
- onChange?: (event: CustomEvent<TabsBarChangeEvent>) => void;
53
+ onTabChange?: (event: CustomEvent<TabsBarUpdateEvent>) => void;
54
54
  /**
55
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when active tab is changed.
55
+ * Emitted when active tab is changed.
56
56
  */
57
- onTabChange?: (event: CustomEvent<TabsBarChangeEvent>) => void;
57
+ onUpdate?: (event: CustomEvent<TabsBarUpdateEvent>) => void;
58
58
  /**
59
59
  * The text size.
60
60
  */
@@ -5,10 +5,10 @@ var react = require('react');
5
5
  var hooks = require('../../hooks.js');
6
6
  var utils = require('../../utils.js');
7
7
 
8
- const PTabsBar = react.forwardRef(({ activeTabIndex, gradientColor = 'background-base', gradientColorScheme, onChange, onTabChange, size = 'small', theme = 'light', weight = 'regular', className, ...rest }, ref) => {
8
+ const PTabsBar = react.forwardRef(({ activeTabIndex, gradientColor = 'background-base', gradientColorScheme, onTabChange, onUpdate, size = 'small', theme = 'light', weight = 'regular', className, ...rest }, ref) => {
9
9
  const elementRef = react.useRef();
10
- hooks.useEventCallback(elementRef, 'change', onChange);
11
10
  hooks.useEventCallback(elementRef, 'tabChange', onTabChange);
11
+ hooks.useEventCallback(elementRef, 'update', onUpdate);
12
12
  const WebComponentTag = hooks.usePrefix('p-tabs-bar');
13
13
  const propsToSync = [activeTabIndex, gradientColor, gradientColorScheme, size, theme, weight];
14
14
  hooks.useBrowserLayoutEffect(() => {
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import type { TabsGradientColor, TabsGradientColorScheme, TabsChangeEvent, BreakpointCustomizable, TabsSize, Theme, TabsWeight } from '../types';
2
+ import type { TabsGradientColor, TabsGradientColorScheme, TabsUpdateEvent, BreakpointCustomizable, TabsSize, Theme, TabsWeight } from '../types';
3
3
  export type PTabsProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
4
4
  /**
5
5
  * Defines which tab to be visualized as selected (zero-based numbering).
@@ -14,13 +14,13 @@ export type PTabsProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
14
14
  */
15
15
  gradientColorScheme?: TabsGradientColorScheme;
16
16
  /**
17
- * Emitted when active tab is changed.
17
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when active tab is changed.
18
18
  */
19
- onChange?: (event: CustomEvent<TabsChangeEvent>) => void;
19
+ onTabChange?: (event: CustomEvent<TabsUpdateEvent>) => void;
20
20
  /**
21
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when active tab is changed.
21
+ * Emitted when active tab is changed.
22
22
  */
23
- onTabChange?: (event: CustomEvent<TabsChangeEvent>) => void;
23
+ onUpdate?: (event: CustomEvent<TabsUpdateEvent>) => void;
24
24
  /**
25
25
  * The text size.
26
26
  */
@@ -48,13 +48,13 @@ export declare const PTabs: import("react").ForwardRefExoticComponent<Omit<HTMLA
48
48
  */
49
49
  gradientColorScheme?: TabsGradientColorScheme;
50
50
  /**
51
- * Emitted when active tab is changed.
51
+ * @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when active tab is changed.
52
52
  */
53
- onChange?: (event: CustomEvent<TabsChangeEvent>) => void;
53
+ onTabChange?: (event: CustomEvent<TabsUpdateEvent>) => void;
54
54
  /**
55
- * @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when active tab is changed.
55
+ * Emitted when active tab is changed.
56
56
  */
57
- onTabChange?: (event: CustomEvent<TabsChangeEvent>) => void;
57
+ onUpdate?: (event: CustomEvent<TabsUpdateEvent>) => void;
58
58
  /**
59
59
  * The text size.
60
60
  */
@@ -5,10 +5,10 @@ var react = require('react');
5
5
  var hooks = require('../../hooks.js');
6
6
  var utils = require('../../utils.js');
7
7
 
8
- const PTabs = react.forwardRef(({ activeTabIndex = 0, gradientColor = 'background-base', gradientColorScheme, onChange, onTabChange, size = 'small', theme = 'light', weight = 'regular', className, ...rest }, ref) => {
8
+ const PTabs = react.forwardRef(({ activeTabIndex = 0, gradientColor = 'background-base', gradientColorScheme, onTabChange, onUpdate, size = 'small', theme = 'light', weight = 'regular', className, ...rest }, ref) => {
9
9
  const elementRef = react.useRef();
10
- hooks.useEventCallback(elementRef, 'change', onChange);
11
10
  hooks.useEventCallback(elementRef, 'tabChange', onTabChange);
11
+ hooks.useEventCallback(elementRef, 'update', onUpdate);
12
12
  const WebComponentTag = hooks.usePrefix('p-tabs');
13
13
  const propsToSync = [activeTabIndex, gradientColor, gradientColorScheme, size, theme, weight];
14
14
  hooks.useBrowserLayoutEffect(() => {
package/lib/types.d.ts CHANGED
@@ -194,17 +194,18 @@ declare const BUTTON_ARIA_ATTRIBUTES: readonly [
194
194
  "aria-haspopup"
195
195
  ];
196
196
  export declare type ButtonAriaAttribute = typeof BUTTON_ARIA_ATTRIBUTES[number];
197
- declare const BREAKPOINTS: readonly [
197
+ declare const breakpoints: readonly [
198
198
  "base",
199
199
  "xs",
200
200
  "s",
201
201
  "m",
202
202
  "l",
203
- "xl"
203
+ "xl",
204
+ "xxl"
204
205
  ];
205
- export declare type BreakpointKey = typeof BREAKPOINTS[number];
206
+ export type Breakpoint = (typeof breakpoints)[number];
206
207
  export declare type BreakpointValues<T> = {
207
- [key in BreakpointKey]?: T;
208
+ [key in Breakpoint]?: T;
208
209
  } & {
209
210
  base: T;
210
211
  };
@@ -529,8 +530,8 @@ declare const ACCORDION_SIZES: readonly [
529
530
  "small",
530
531
  "medium"
531
532
  ];
532
- export declare type AccordionSize = typeof ACCORDION_SIZES[number];
533
- export declare type AccordionChangeEvent = {
533
+ export declare type AccordionSize = (typeof ACCORDION_SIZES)[number];
534
+ export declare type AccordionUpdateEvent = {
534
535
  open: boolean;
535
536
  };
536
537
  export declare type AccordionTag = HeadingTag;
@@ -579,7 +580,7 @@ declare const CAROUSEL_ALIGN_HEADERS: readonly [
579
580
  ];
580
581
  export declare type CarouselAlignHeader = (typeof CAROUSEL_ALIGN_HEADERS)[number];
581
582
  export declare type CarouselInternationalization = Partial<Record<"prev" | "next" | "first" | "last" | "slideLabel" | "slide", string>>;
582
- export declare type CarouselChangeEvent = {
583
+ export declare type CarouselUpdateEvent = {
583
584
  activeIndex: number;
584
585
  previousIndex: number;
585
586
  };
@@ -937,8 +938,8 @@ declare const PAGINATION_NUMBER_OF_PAGE_LINKS: readonly [
937
938
  5,
938
939
  7
939
940
  ];
940
- export declare type PaginationMaxNumberOfPageLinks = typeof PAGINATION_NUMBER_OF_PAGE_LINKS[number];
941
- export declare type PaginationChangeEvent = {
941
+ export declare type PaginationMaxNumberOfPageLinks = (typeof PAGINATION_NUMBER_OF_PAGE_LINKS)[number];
942
+ export declare type PaginationUpdateEvent = {
942
943
  page: number;
943
944
  previousPage: number;
944
945
  };
@@ -959,8 +960,8 @@ declare const SEGMENTED_CONTROL_BACKGROUND_COLORS: readonly [
959
960
  "background-surface",
960
961
  "background-default"
961
962
  ];
962
- export declare type SegmentedControlBackgroundColor = typeof SEGMENTED_CONTROL_BACKGROUND_COLORS[number];
963
- export declare type SegmentedControlChangeEvent = {
963
+ export declare type SegmentedControlBackgroundColor = (typeof SEGMENTED_CONTROL_BACKGROUND_COLORS)[number];
964
+ export declare type SegmentedControlUpdateEvent = {
964
965
  value: string | number;
965
966
  };
966
967
  export declare type SegmentedControlItemIcon = LinkButtonIconName;
@@ -986,8 +987,8 @@ declare const STEPPER_HORIZONTAL_SIZES: readonly [
986
987
  "small",
987
988
  "medium"
988
989
  ];
989
- export declare type StepperHorizontalSize = typeof STEPPER_HORIZONTAL_SIZES[number];
990
- export declare type StepperHorizontalChangeEvent = {
990
+ export declare type StepperHorizontalSize = (typeof STEPPER_HORIZONTAL_SIZES)[number];
991
+ export declare type StepperHorizontalUpdateEvent = {
991
992
  activeStepIndex: number;
992
993
  };
993
994
  declare const STEPPER_ITEM_STATES: readonly [
@@ -997,7 +998,7 @@ declare const STEPPER_ITEM_STATES: readonly [
997
998
  ];
998
999
  export declare type StepperHorizontalItemState = typeof STEPPER_ITEM_STATES[number];
999
1000
  export declare type SwitchAlignLabel = AlignLabel;
1000
- export declare type SwitchChangeEvent = {
1001
+ export declare type SwitchUpdateEvent = {
1001
1002
  checked: boolean;
1002
1003
  };
1003
1004
  export declare type Direction = "asc" | "desc";
@@ -1006,19 +1007,19 @@ export declare type TableHeadCellSort = {
1006
1007
  active?: boolean;
1007
1008
  direction?: Direction;
1008
1009
  };
1009
- export declare type TableChangeEvent = TableHeadCellSort;
1010
+ export declare type TableUpdateEvent = TableHeadCellSort;
1010
1011
  declare const TABS_BAR_SIZES: readonly [
1011
1012
  "small",
1012
1013
  "medium"
1013
1014
  ];
1014
- export declare type TabsBarSize = typeof TABS_BAR_SIZES[number];
1015
+ export declare type TabsBarSize = (typeof TABS_BAR_SIZES)[number];
1015
1016
  declare const TABS_BAR_WEIGHTS: readonly [
1016
1017
  "regular",
1017
1018
  "semi-bold",
1018
1019
  "semibold"
1019
1020
  ];
1020
- export declare type TabsBarWeight = typeof TABS_BAR_WEIGHTS[number];
1021
- export declare type TabsBarChangeEvent = {
1021
+ export declare type TabsBarWeight = (typeof TABS_BAR_WEIGHTS)[number];
1022
+ export declare type TabsBarUpdateEvent = {
1022
1023
  activeTabIndex: number;
1023
1024
  };
1024
1025
  /** @deprecated */
@@ -1029,7 +1030,7 @@ export declare type TabsWeight = TabsBarWeight;
1029
1030
  /** @deprecated */
1030
1031
  export declare type TabsGradientColorScheme = TabsBarGradientColorScheme;
1031
1032
  export declare type TabsGradientColor = TabsBarGradientColor;
1032
- export declare type TabsChangeEvent = TabsBarChangeEvent;
1033
+ export declare type TabsUpdateEvent = TabsBarUpdateEvent;
1033
1034
  declare const TAG_DISMISSIBLE_COLORS: readonly [
1034
1035
  "background-base",
1035
1036
  "background-surface",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@porsche-design-system/components-react",
3
- "version": "3.0.0-alpha.5",
3
+ "version": "3.0.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.0.0-alpha.5"
20
+ "@porsche-design-system/components-js": "3.0.0-rc.0"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=17.0.0 <19.0.0",