@porsche-design-system/components-react 2.15.0 → 2.16.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 +22 -0
- package/esm/public-api.js +39 -4
- package/jsdom-polyfill/index.js +1 -1
- package/lib/components/carousel.wrapper.d.ts +72 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/scroller.wrapper.d.ts +40 -0
- package/lib/components/stepper-horizontal.wrapper.d.ts +9 -1
- package/lib/types.d.ts +17 -2
- package/package.json +2 -2
- package/public-api.js +40 -3
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
9
9
|
|
|
10
10
|
### [Unreleased]
|
|
11
11
|
|
|
12
|
+
### [2.16.0] - 2022-09-08
|
|
13
|
+
|
|
14
|
+
### [2.15.1-rc.1] - 2022-09-08
|
|
15
|
+
|
|
16
|
+
#### Added
|
|
17
|
+
|
|
18
|
+
- `Carousel`
|
|
19
|
+
- `Scroller`
|
|
20
|
+
|
|
21
|
+
#### Changed
|
|
22
|
+
|
|
23
|
+
- `Stepper Horizontal` now has `size` property
|
|
24
|
+
- `Stepper Horizontal` uses improved focus behavior in case it becomes scrollable and scroll indicators are centered
|
|
25
|
+
correctly.
|
|
26
|
+
- `Tabs Bar` uses improved focus behavior in case it becomes scrollable and scroll indicators are centered correctly.
|
|
27
|
+
|
|
28
|
+
### [2.15.1-rc.0] - 2022-08-24
|
|
29
|
+
|
|
30
|
+
#### Fixed
|
|
31
|
+
|
|
32
|
+
- `Radio Button Wrapper` visual selection change bug in Safari >= 15.5
|
|
33
|
+
|
|
12
34
|
### [2.15.0] - 2022-08-22
|
|
13
35
|
|
|
14
36
|
### [2.15.0-rc.1] - 2022-08-18
|
package/esm/public-api.js
CHANGED
|
@@ -180,6 +180,23 @@ const PButtonPure = /*#__PURE__*/ forwardRef(({ active = false, alignLabel = 'ri
|
|
|
180
180
|
return jsx(Tag, { ...props });
|
|
181
181
|
});
|
|
182
182
|
|
|
183
|
+
const PCarousel = /*#__PURE__*/ forwardRef(({ description, disablePagination = false, heading, intl = {}, onCarouselChange, slidesPerPage = 1, theme = 'light', wrapContent, className, ...rest }, ref) => {
|
|
184
|
+
const elementRef = useRef();
|
|
185
|
+
useEventCallback(elementRef, 'carouselChange', onCarouselChange);
|
|
186
|
+
const Tag = usePrefix('p-carousel');
|
|
187
|
+
const propsToSync = [description, disablePagination, heading, intl, slidesPerPage, theme, wrapContent];
|
|
188
|
+
useBrowserLayoutEffect(() => {
|
|
189
|
+
const { current } = elementRef;
|
|
190
|
+
['description', 'disablePagination', 'heading', 'intl', 'slidesPerPage', 'theme', 'wrapContent'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
191
|
+
}, propsToSync);
|
|
192
|
+
const props = {
|
|
193
|
+
...rest,
|
|
194
|
+
class: useMergedClass(elementRef, className),
|
|
195
|
+
ref: syncRef(elementRef, ref)
|
|
196
|
+
};
|
|
197
|
+
return jsx(Tag, { ...props });
|
|
198
|
+
});
|
|
199
|
+
|
|
183
200
|
const PCheckboxWrapper = /*#__PURE__*/ forwardRef(({ hideLabel = false, label = '', message = '', state = 'none', className, ...rest }, ref) => {
|
|
184
201
|
const elementRef = useRef();
|
|
185
202
|
const Tag = usePrefix('p-checkbox-wrapper');
|
|
@@ -488,6 +505,22 @@ const PRadioButtonWrapper = /*#__PURE__*/ forwardRef(({ hideLabel = false, label
|
|
|
488
505
|
return jsx(Tag, { ...props });
|
|
489
506
|
});
|
|
490
507
|
|
|
508
|
+
const PScroller = /*#__PURE__*/ forwardRef(({ gradientColorScheme = 'default', scrollIndicatorPosition = 'center', scrollToPosition, theme = 'light', className, ...rest }, ref) => {
|
|
509
|
+
const elementRef = useRef();
|
|
510
|
+
const Tag = usePrefix('p-scroller');
|
|
511
|
+
const propsToSync = [gradientColorScheme, scrollIndicatorPosition, scrollToPosition, theme];
|
|
512
|
+
useBrowserLayoutEffect(() => {
|
|
513
|
+
const { current } = elementRef;
|
|
514
|
+
['gradientColorScheme', 'scrollIndicatorPosition', 'scrollToPosition', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
515
|
+
}, propsToSync);
|
|
516
|
+
const props = {
|
|
517
|
+
...rest,
|
|
518
|
+
class: useMergedClass(elementRef, className),
|
|
519
|
+
ref: syncRef(elementRef, ref)
|
|
520
|
+
};
|
|
521
|
+
return jsx(Tag, { ...props });
|
|
522
|
+
});
|
|
523
|
+
|
|
491
524
|
const PSegmentedControl = /*#__PURE__*/ forwardRef(({ backgroundColor = 'background-default', onSegmentedControlChange, theme = 'light', value, className, ...rest }, ref) => {
|
|
492
525
|
const elementRef = useRef();
|
|
493
526
|
useEventCallback(elementRef, 'segmentedControlChange', onSegmentedControlChange);
|
|
@@ -553,13 +586,15 @@ const PSpinner = /*#__PURE__*/ forwardRef(({ aria, size = 'small', theme = 'ligh
|
|
|
553
586
|
return jsx(Tag, { ...props });
|
|
554
587
|
});
|
|
555
588
|
|
|
556
|
-
const PStepperHorizontal = /*#__PURE__*/ forwardRef(({ onStepChange, theme = 'light', className, ...rest }, ref) => {
|
|
589
|
+
const PStepperHorizontal = /*#__PURE__*/ forwardRef(({ onStepChange, size = 'small', theme = 'light', className, ...rest }, ref) => {
|
|
557
590
|
const elementRef = useRef();
|
|
558
591
|
useEventCallback(elementRef, 'stepChange', onStepChange);
|
|
559
592
|
const Tag = usePrefix('p-stepper-horizontal');
|
|
593
|
+
const propsToSync = [size, theme];
|
|
560
594
|
useBrowserLayoutEffect(() => {
|
|
561
|
-
|
|
562
|
-
|
|
595
|
+
const { current } = elementRef;
|
|
596
|
+
['size', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
597
|
+
}, propsToSync);
|
|
563
598
|
const props = {
|
|
564
599
|
...rest,
|
|
565
600
|
class: useMergedClass(elementRef, className),
|
|
@@ -860,4 +895,4 @@ const PToast = /*#__PURE__*/ forwardRef(({ theme = 'light', className, ...rest }
|
|
|
860
895
|
return jsx(Tag, { ...props });
|
|
861
896
|
});
|
|
862
897
|
|
|
863
|
-
export { PAccordion, PBanner, PButton, PButtonGroup, PButtonPure, PCheckboxWrapper, PContentWrapper, PDivider, PFieldsetWrapper, PFlex, PFlexItem, PGrid, PGridItem, PHeadline, PIcon, PInlineNotification, PLink, PLinkPure, PLinkSocial, PMarque, PModal, PPagination, PPopover, PRadioButtonWrapper, PSegmentedControl, PSegmentedControlItem, PSelectWrapper, PSpinner, PStepperHorizontal, PStepperHorizontalItem, PSwitch, PTable, PTableBody, PTableCell, PTableHead, PTableHeadCell, PTableHeadRow, PTableRow, PTabs, PTabsBar, PTabsItem, PTag, PTagDismissible, PText, PTextFieldWrapper, PTextList, PTextListItem, PTextareaWrapper, PToast, PorscheDesignSystemProvider, skipCheckForPorscheDesignSystemProviderDuringTests, skipPorscheDesignSystemCDNRequestsDuringTests, useToastManager };
|
|
898
|
+
export { PAccordion, PBanner, PButton, PButtonGroup, PButtonPure, PCarousel, PCheckboxWrapper, PContentWrapper, PDivider, PFieldsetWrapper, PFlex, PFlexItem, PGrid, PGridItem, PHeadline, PIcon, PInlineNotification, PLink, PLinkPure, PLinkSocial, PMarque, PModal, PPagination, PPopover, PRadioButtonWrapper, PScroller, PSegmentedControl, PSegmentedControlItem, PSelectWrapper, PSpinner, PStepperHorizontal, PStepperHorizontalItem, PSwitch, PTable, PTableBody, PTableCell, PTableHead, PTableHeadCell, PTableHeadRow, PTableRow, PTabs, PTabsBar, PTabsItem, PTag, PTagDismissible, PText, PTextFieldWrapper, PTextList, PTextListItem, PTextareaWrapper, PToast, PorscheDesignSystemProvider, skipCheckForPorscheDesignSystemProviderDuringTests, skipPorscheDesignSystemCDNRequestsDuringTests, useToastManager };
|