@porsche-design-system/components-react 3.7.0 → 3.8.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 +122 -16
- package/cjs/lib/components/button-pure.wrapper.cjs +1 -1
- package/cjs/lib/components/carousel.wrapper.cjs +1 -1
- package/cjs/lib/components/display.wrapper.cjs +1 -1
- package/cjs/lib/components/flyout.wrapper.cjs +1 -1
- package/cjs/lib/components/heading.wrapper.cjs +1 -1
- package/cjs/lib/components/headline.wrapper.cjs +1 -1
- package/cjs/lib/components/link-pure.wrapper.cjs +1 -1
- package/cjs/lib/components/modal.wrapper.cjs +3 -3
- package/cjs/lib/components/switch.wrapper.cjs +1 -1
- package/cjs/lib/components/text.wrapper.cjs +1 -1
- package/esm/lib/components/button-pure.wrapper.d.ts +1 -1
- package/esm/lib/components/button-pure.wrapper.mjs +1 -1
- package/esm/lib/components/carousel.wrapper.d.ts +1 -1
- package/esm/lib/components/carousel.wrapper.mjs +1 -1
- package/esm/lib/components/display.wrapper.d.ts +1 -1
- package/esm/lib/components/display.wrapper.mjs +1 -1
- package/esm/lib/components/flyout.wrapper.d.ts +1 -1
- package/esm/lib/components/flyout.wrapper.mjs +1 -1
- package/esm/lib/components/heading.wrapper.d.ts +1 -1
- package/esm/lib/components/heading.wrapper.mjs +1 -1
- package/esm/lib/components/headline.wrapper.d.ts +1 -1
- package/esm/lib/components/headline.wrapper.mjs +1 -1
- package/esm/lib/components/link-pure.wrapper.d.ts +1 -1
- package/esm/lib/components/link-pure.wrapper.mjs +1 -1
- package/esm/lib/components/modal.wrapper.d.ts +9 -1
- package/esm/lib/components/modal.wrapper.mjs +3 -3
- package/esm/lib/components/switch.wrapper.d.ts +1 -1
- package/esm/lib/components/switch.wrapper.mjs +1 -1
- package/esm/lib/components/text.wrapper.d.ts +1 -1
- package/esm/lib/components/text.wrapper.mjs +1 -1
- package/esm/lib/types.d.ts +36 -28
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +3188 -3069
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1129 -1262
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +4 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +9 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +5 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +5 -6
- 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/text-list-item.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.cjs +5 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +3188 -3069
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1130 -1264
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +4 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +10 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +5 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +5 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-list-item.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.mjs +5 -1
- package/ssr/esm/lib/components/modal.wrapper.d.ts +9 -1
- package/ssr/esm/lib/dsr-components/popover.d.ts +2 -0
- package/ssr/esm/lib/types.d.ts +36 -28
package/CHANGELOG.md
CHANGED
|
@@ -14,13 +14,119 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
14
14
|
|
|
15
15
|
### [Unreleased]
|
|
16
16
|
|
|
17
|
+
### 3.8.0-rc.0 - 2023-10-23
|
|
18
|
+
|
|
19
|
+
#### Added
|
|
20
|
+
|
|
21
|
+
- RTL (right-to-left) support for all components
|
|
22
|
+
([#2819](https://github.com/porsche-design-system/porsche-design-system/pull/2819))
|
|
23
|
+
- `Popover` and `Modal` support theme dark and auto
|
|
24
|
+
([#2789](https://github.com/porsche-design-system/porsche-design-system/pull/2789))
|
|
25
|
+
- Styles: `getSkeletonStyle()` and `pds-skeleton()`
|
|
26
|
+
([#2796](https://github.com/porsche-design-system/porsche-design-system/pull/2796))
|
|
27
|
+
- Styles: `motionDuration{Short|Moderate|Long|VeryLong}`, `motionEasing{Base|In|Out}`, and
|
|
28
|
+
`$pds-motion-duration-{short|moderate|long|very-long}`, `$pds-motion-easing-{base|in|out}`
|
|
29
|
+
([#2791](https://github.com/porsche-design-system/porsche-design-system/pull/2791))
|
|
30
|
+
|
|
31
|
+
#### Changed
|
|
32
|
+
|
|
33
|
+
- Styles: `themeDarkBackgroundShading` and `$pds-theme-dark-background-shading` color
|
|
34
|
+
([#2789](https://github.com/porsche-design-system/porsche-design-system/pull/2789))
|
|
35
|
+
- `Spinner` animation was optimized to consume less CPU
|
|
36
|
+
([#2825](https://github.com/porsche-design-system/porsche-design-system/pull/2825))
|
|
37
|
+
|
|
38
|
+
- `Text`, `Display`, `Heading`, `Headline`: Prop values `left | right` of `align` prop are deprecated and mapped to new
|
|
39
|
+
values `start | end` for correct RTL (right-to-left) support
|
|
40
|
+
([#2819](https://github.com/porsche-design-system/porsche-design-system/pull/2819))
|
|
41
|
+
|
|
42
|
+
```diff
|
|
43
|
+
- <p-text align="left"></p-text>
|
|
44
|
+
+ <p-text align="start"></p-text>
|
|
45
|
+
|
|
46
|
+
- <p-text align="right"></p-text>
|
|
47
|
+
+ <p-text align="end"></p-text>
|
|
48
|
+
|
|
49
|
+
- <p-display align="left"></p-display>
|
|
50
|
+
+ <p-display align="start"></p-display>
|
|
51
|
+
|
|
52
|
+
- <p-display align="right"></p-display>
|
|
53
|
+
+ <p-display align="end"></p-display>
|
|
54
|
+
|
|
55
|
+
- <p-heading align="left"></p-heading>
|
|
56
|
+
+ <p-heading align="start"></p-heading>
|
|
57
|
+
|
|
58
|
+
- <p-heading align="right"></p-heading>
|
|
59
|
+
+ <p-heading align="end"></p-heading>
|
|
60
|
+
|
|
61
|
+
- <p-headline align="left"></p-headline>
|
|
62
|
+
+ <p-headline align="start"></p-headline>
|
|
63
|
+
|
|
64
|
+
- <p-headline align="right"></p-headline>
|
|
65
|
+
+ <p-headline align="end"></p-headline>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
- `Button Pure`, `Link Pure`, `Switch`: Prop values `left | right` of `align-label` prop are deprecated and mapped to
|
|
69
|
+
new values `start | end` for correct RTL (right-to-left) support
|
|
70
|
+
([#2819](https://github.com/porsche-design-system/porsche-design-system/pull/2819))
|
|
71
|
+
|
|
72
|
+
```diff
|
|
73
|
+
- <p-button-pure align-label="left"></p-button-pure>
|
|
74
|
+
+ <p-button-pure align-label="start"></p-button-pure>
|
|
75
|
+
|
|
76
|
+
- <p-button-pure align-label="right"></p-button-pure>
|
|
77
|
+
+ <p-button-pure align-label="end"></p-button-pure>
|
|
78
|
+
|
|
79
|
+
- <p-link-pure align-label="left"></p-link-pure>
|
|
80
|
+
+ <p-link-pure align-label="start"></p-link-pure>
|
|
81
|
+
|
|
82
|
+
- <p-link-pure align-label="right"></p-link-pure>
|
|
83
|
+
+ <p-link-pure align-label="end"></p-link-pure>
|
|
84
|
+
|
|
85
|
+
- <p-switch align-label="left"></p-switch>
|
|
86
|
+
+ <p-switch align-label="start"></p-switch>
|
|
87
|
+
|
|
88
|
+
- <p-switch align-label="right"></p-switch>
|
|
89
|
+
+ <p-switch align-label="end"></p-switch>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
- `Flyout`: Prop values `left | right` of `position` prop are deprecated and mapped to new values `start | end` for
|
|
93
|
+
correct RTL (right-to-left) support
|
|
94
|
+
([#2819](https://github.com/porsche-design-system/porsche-design-system/pull/2819))
|
|
95
|
+
|
|
96
|
+
```diff
|
|
97
|
+
- <p-flyout position="left"></p-flyout>
|
|
98
|
+
+ <p-flyout-pure position="start"></p-flyout>
|
|
99
|
+
|
|
100
|
+
- <p-flyout-pure position="right"></p-flyout>
|
|
101
|
+
+ <p-flyout-pure position="end"></p-flyout>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- `Carousel`: Prop value `left` of `align-header` prop is deprecated and mapped to new value `start` for correct RTL
|
|
105
|
+
(right-to-left) support ([#2819](https://github.com/porsche-design-system/porsche-design-system/pull/2819))
|
|
106
|
+
|
|
107
|
+
```diff
|
|
108
|
+
- <p-carousel align-header="left"></p-carousel>
|
|
109
|
+
+ <p-carousel-pure align-header="start"></p-carousel>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### Fixed
|
|
113
|
+
|
|
114
|
+
- `Popover` doesn't get cut off when used within the `Table` component
|
|
115
|
+
([#2814](https://github.com/porsche-design-system/porsche-design-system/pull/2814))
|
|
116
|
+
- `Flyout` and `Modal` with `open="false"` and nested `Accordion` with `open="true"` containing focusable elements like
|
|
117
|
+
links can't be focused anymore ([#2818](https://github.com/porsche-design-system/porsche-design-system/pull/2818))
|
|
118
|
+
- Background for open `Flyout` and `Modal` on iOS Mobile Safari with collapsed address bar is no longer scrollable
|
|
119
|
+
([#2822](https://github.com/porsche-design-system/porsche-design-system/pull/2822))
|
|
120
|
+
- `Tabs Bar` works with translated page content
|
|
121
|
+
([#2847](https://github.com/porsche-design-system/porsche-design-system/pull/2847))
|
|
122
|
+
|
|
17
123
|
### [3.7.0] - 2023-10-04
|
|
18
124
|
|
|
19
125
|
### [3.7.0-rc.2] - 2023-10-04
|
|
20
126
|
|
|
21
127
|
#### Added
|
|
22
128
|
|
|
23
|
-
- Styles: `gridStyles` and `pds-grid` support basic usage inside `Flyout` component
|
|
129
|
+
- Styles: `gridStyles` and `pds-grid()` support basic usage inside `Flyout` component
|
|
24
130
|
([#2756](https://github.com/porsche-design-system/porsche-design-system/pull/2756))
|
|
25
131
|
|
|
26
132
|
#### Fixed
|
|
@@ -348,7 +454,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
348
454
|
- `Wordmark`, `Crest` and `Model Signature` respect parent width/height
|
|
349
455
|
([#2479](https://github.com/porsche-design-system/porsche-design-system/pull/2479))
|
|
350
456
|
- `Button Tile`, `Link Tile` and `Link Tile Model Signature` are using correct border radius of
|
|
351
|
-
|
|
457
|
+
`$pds-border-radius-large` ([#2473](https://github.com/porsche-design-system/porsche-design-system/pull/2473))
|
|
352
458
|
- `Text Field Wrapper` with `input type="search"` has better accessibility for clear button
|
|
353
459
|
([#2476](https://github.com/porsche-design-system/porsche-design-system/pull/2476))
|
|
354
460
|
- `Accordion` layout shift with nested accordions
|
|
@@ -360,7 +466,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
360
466
|
|
|
361
467
|
#### Fixed
|
|
362
468
|
|
|
363
|
-
- Styles: `borderRadiusLarge` and
|
|
469
|
+
- Styles: `borderRadiusLarge` and `$pds-border-radius-large` are exposing correct value
|
|
364
470
|
([#2463](https://github.com/porsche-design-system/porsche-design-system/pull/2463))
|
|
365
471
|
|
|
366
472
|
### [3.0.0-alpha.6] - 2023-04-06
|
|
@@ -513,8 +619,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
513
619
|
|
|
514
620
|
- Styles: ([#2422](https://github.com/porsche-design-system/porsche-design-system/pull/2422))
|
|
515
621
|
- `gridWide`
|
|
516
|
-
- `gridWideColumnStart` and
|
|
517
|
-
- `gridWideColumnEnd` and
|
|
622
|
+
- `gridWideColumnStart` and `$pds-grid-wide-column-start`
|
|
623
|
+
- `gridWideColumnEnd` and `$pds-grid-wide-column-end`
|
|
518
624
|
- `gridNarrowOffset`, `gridNarrowOffsetBase`, `gridNarrowOffsetS`, `gridNarrowOffsetXXL` and
|
|
519
625
|
`$pds-grid-narrow-offset-base`, `$pds-grid-narrow-offset-s`, `$pds-grid-narrow-offset-xxl`
|
|
520
626
|
- `gridBasicOffset`, `gridBasicOffsetBase`, `gridBasicOffsetS`, `gridBasicOffsetXXL` and
|
|
@@ -540,7 +646,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
540
646
|
|
|
541
647
|
#### Changed
|
|
542
648
|
|
|
543
|
-
- Styles: `gridStyles` and `pds-grid` are supporting an additional column range called `wide`
|
|
649
|
+
- Styles: `gridStyles` and `pds-grid()` are supporting an additional column range called `wide`
|
|
544
650
|
([#2422](https://github.com/porsche-design-system/porsche-design-system/pull/2422))
|
|
545
651
|
- Styles: SCSS version needs to be imported by `@porsche-design-system/components-js/styles` instead of
|
|
546
652
|
`@porsche-design-system/components-js/styles/scss`
|
|
@@ -550,9 +656,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
550
656
|
|
|
551
657
|
- `Banner`: CSS variable `--p-banner-position-type`
|
|
552
658
|
([#2422](https://github.com/porsche-design-system/porsche-design-system/pull/2422))
|
|
553
|
-
- Styles: `gridSafeZone`, `gridSafeZoneBase`, `gridSafeZoneXXL` and
|
|
554
|
-
([#2422](https://github.com/porsche-design-system/porsche-design-system/pull/2422))
|
|
555
|
-
- Styles: `gridWidth`, `gridWidthMin`, `gridWidthMax` and
|
|
659
|
+
- Styles: `gridSafeZone`, `gridSafeZoneBase`, `gridSafeZoneXXL` and `$pds-grid-safe-zone-base`,
|
|
660
|
+
`$pds-grid-safe-zone-xxl` ([#2422](https://github.com/porsche-design-system/porsche-design-system/pull/2422))
|
|
661
|
+
- Styles: `gridWidth`, `gridWidthMin`, `gridWidthMax` and `$pds-grid-width-min`, `$pds-grid-width-max`
|
|
556
662
|
([#2422](https://github.com/porsche-design-system/porsche-design-system/pull/2422))
|
|
557
663
|
|
|
558
664
|
#### 🤖 Property deprecations 🤖
|
|
@@ -822,11 +928,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
822
928
|
- `Display` supports value `small` for prop `size`
|
|
823
929
|
- Partials: `getInitialStyles` supports multi prefix, e.g.
|
|
824
930
|
`getInitialStyles({ prefix: ['', 'some-prefix', 'another-prefix'] });`
|
|
825
|
-
- Styles: `displaySmallStyle` and
|
|
826
|
-
- Styles: `textXXSmallStyle` and
|
|
931
|
+
- Styles: `displaySmallStyle` and `$pds-display-small`
|
|
932
|
+
- Styles: `textXXSmallStyle` and `$pds-text-xx-small`
|
|
827
933
|
- Styles: `fontSizeDisplaySmall` and `$pds-font-size-display-small`
|
|
828
934
|
- Styles: `fontSizeTextXXSmall` and `$pds-font-size-text-xx-small`
|
|
829
|
-
- Styles: `getHoverStyle` and `pds-hover`
|
|
935
|
+
- Styles: `getHoverStyle` and `pds-hover()`
|
|
830
936
|
- `Banner` has `heading` and `description` prop as well as `slot="heading"` and deprecated `slot="title"`
|
|
831
937
|
- Custom events have consistent names across components and deprecated old event names
|
|
832
938
|
- `Accordion` emits `change` and deprecated `accordionChange` event
|
|
@@ -863,7 +969,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
863
969
|
- `Display` uses font-weight regular and font-style normal
|
|
864
970
|
- Partials: `getInitialStyles` matches new design language
|
|
865
971
|
- Partials: All component related, slotted Light DOM styles have been moved to `getInitialStyles`
|
|
866
|
-
- Styles: `getFocusStyle` and `pds-focus` doesn't need `theme` parameter anymore
|
|
972
|
+
- Styles: `getFocusStyle` and `pds-focus()` doesn't need `theme` parameter anymore
|
|
867
973
|
- Styles: `breakpoint{Base|XS|S|M|L|XL|XXL}` and `$pds-breakpoint-{base|xs|s|m|l|xl|xxl}` are provided as number without
|
|
868
974
|
unit (px)
|
|
869
975
|
- `Link Tile` matches new design language
|
|
@@ -882,7 +988,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
882
988
|
#### Removed
|
|
883
989
|
|
|
884
990
|
- `Heading`: value `xxx-large` for prop `size`
|
|
885
|
-
- Styles: `headingXXXLargeStyle` and
|
|
991
|
+
- Styles: `headingXXXLargeStyle` and `$pds-heading-xxx-large`
|
|
886
992
|
- Styles: `fontSizeHeadingXXLarge` and `$pds-font-size-heading-xx-large`
|
|
887
993
|
|
|
888
994
|
### [3.0.0-alpha.2] - 2023-02-27
|
|
@@ -944,8 +1050,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
944
1050
|
- `Stepper Horizontal` matches new design language
|
|
945
1051
|
- Styles: Optimize design tokens "spacing", "typography" and "theme" provided by styles sub-package
|
|
946
1052
|
`@porsche-design-system/components-{js|angular|react|vue}/styles`
|
|
947
|
-
- Styles: Use calc() instead of max() to calculate padding for `gridStyle` (JS) and `pds-grid` (SCSS)
|
|
948
|
-
- Styles: `gridStyle` (JS) and `pds-grid` (SCSS) uses optimized grid gap
|
|
1053
|
+
- Styles: Use calc() instead of max() to calculate padding for `gridStyle` (JS) and `pds-grid()` (SCSS)
|
|
1054
|
+
- Styles: `gridStyle` (JS) and `pds-grid()` (SCSS) uses optimized grid gap
|
|
949
1055
|
|
|
950
1056
|
### [3.0.0-alpha.0] - 2023-02-08
|
|
951
1057
|
|
|
@@ -6,7 +6,7 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PButtonPure = react.forwardRef(({ active = false, alignLabel = '
|
|
9
|
+
const PButtonPure = react.forwardRef(({ active = false, alignLabel = 'end', aria, disabled = false, hideLabel = false, icon = 'arrow-right', iconSource, loading = false, size = 'small', stretch = false, theme = 'light', type = 'submit', weight = 'regular', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
const WebComponentTag = hooks.usePrefix('p-button-pure');
|
|
12
12
|
const propsToSync = [active, alignLabel, aria, disabled, hideLabel, icon, iconSource, loading, size, stretch, theme, type, weight];
|
|
@@ -6,7 +6,7 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PCarousel = react.forwardRef(({ activeSlideIndex = 0, alignHeader = '
|
|
9
|
+
const PCarousel = react.forwardRef(({ activeSlideIndex = 0, alignHeader = 'start', description, disablePagination, heading, intl, onCarouselChange, onUpdate, pagination = true, rewind = true, skipLinkTarget, slidesPerPage = 1, theme = 'light', width = 'basic', wrapContent, className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
hooks.useEventCallback(elementRef, 'carouselChange', onCarouselChange);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
@@ -6,7 +6,7 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PDisplay = react.forwardRef(({ align = '
|
|
9
|
+
const PDisplay = react.forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = 'large', tag, theme = 'light', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
const WebComponentTag = hooks.usePrefix('p-display');
|
|
12
12
|
const propsToSync = [align, color, ellipsis, size, tag, theme];
|
|
@@ -6,7 +6,7 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PFlyout = react.forwardRef(({ aria, onDismiss, open = false, position = '
|
|
9
|
+
const PFlyout = react.forwardRef(({ aria, onDismiss, open = false, position = 'end', theme = 'light', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
hooks.useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
12
12
|
const WebComponentTag = hooks.usePrefix('p-flyout');
|
|
@@ -6,7 +6,7 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PHeading = react.forwardRef(({ align = '
|
|
9
|
+
const PHeading = react.forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = 'xx-large', tag, theme = 'light', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
const WebComponentTag = hooks.usePrefix('p-heading');
|
|
12
12
|
const propsToSync = [align, color, ellipsis, size, tag, theme];
|
|
@@ -7,7 +7,7 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
9
|
/** @deprecated since v3.0.0, will be removed with next major release. Please use "p-heading" instead. */
|
|
10
|
-
const PHeadline = react.forwardRef(({ align = '
|
|
10
|
+
const PHeadline = react.forwardRef(({ align = 'start', color = 'primary', ellipsis = false, tag, theme = 'light', variant = 'headline-1', className, ...rest }, ref) => {
|
|
11
11
|
const elementRef = react.useRef();
|
|
12
12
|
const WebComponentTag = hooks.usePrefix('p-headline');
|
|
13
13
|
const propsToSync = [align, color, ellipsis, tag, theme, variant];
|
|
@@ -6,7 +6,7 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PLinkPure = react.forwardRef(({ active = false, alignLabel = '
|
|
9
|
+
const PLinkPure = react.forwardRef(({ active = false, alignLabel = 'end', aria, download, hideLabel = false, href, icon = 'arrow-right', iconSource, rel, size = 'small', stretch = false, target = '_self', theme = 'light', underline = false, weight = 'regular', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
const WebComponentTag = hooks.usePrefix('p-link-pure');
|
|
12
12
|
const propsToSync = [active, alignLabel, aria, download, hideLabel, href, icon, iconSource, rel, size, stretch, target, theme, underline, weight];
|
|
@@ -6,15 +6,15 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PModal = react.forwardRef(({ aria, disableBackdropClick = false, disableCloseButton, dismissButton = true, fullscreen = false, heading, onClose, onDismiss, open = false, className, ...rest }, ref) => {
|
|
9
|
+
const PModal = react.forwardRef(({ aria, disableBackdropClick = false, disableCloseButton, dismissButton = true, fullscreen = false, heading, onClose, onDismiss, open = false, theme = 'light', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
hooks.useEventCallback(elementRef, 'close', onClose);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
13
13
|
const WebComponentTag = hooks.usePrefix('p-modal');
|
|
14
|
-
const propsToSync = [aria, disableBackdropClick, disableCloseButton, dismissButton, fullscreen, heading, open];
|
|
14
|
+
const propsToSync = [aria, disableBackdropClick, disableCloseButton, dismissButton, fullscreen, heading, open, theme];
|
|
15
15
|
hooks.useBrowserLayoutEffect(() => {
|
|
16
16
|
const { current } = elementRef;
|
|
17
|
-
['aria', 'disableBackdropClick', 'disableCloseButton', 'dismissButton', 'fullscreen', 'heading', 'open'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
['aria', 'disableBackdropClick', 'disableCloseButton', 'dismissButton', 'fullscreen', 'heading', 'open', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
18
|
}, propsToSync);
|
|
19
19
|
const props = {
|
|
20
20
|
...rest,
|
|
@@ -6,7 +6,7 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PSwitch = react.forwardRef(({ alignLabel = '
|
|
9
|
+
const PSwitch = react.forwardRef(({ alignLabel = 'end', checked = false, disabled = false, hideLabel = false, loading = false, onSwitchChange, onUpdate, stretch = false, theme = 'light', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
hooks.useEventCallback(elementRef, 'switchChange', onSwitchChange);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
@@ -6,7 +6,7 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PText = react.forwardRef(({ align = '
|
|
9
|
+
const PText = react.forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = 'small', tag = 'p', theme = 'light', weight = 'regular', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
const WebComponentTag = hooks.usePrefix('p-text');
|
|
12
12
|
const propsToSync = [align, color, ellipsis, size, tag, theme, weight];
|
|
@@ -63,7 +63,7 @@ export declare const PButtonPure: import("react").ForwardRefExoticComponent<Omit
|
|
|
63
63
|
/**
|
|
64
64
|
* Aligns the label.
|
|
65
65
|
*/
|
|
66
|
-
alignLabel?: BreakpointCustomizable<"left" | "right"> | undefined;
|
|
66
|
+
alignLabel?: BreakpointCustomizable<"start" | "end" | "left" | "right"> | undefined;
|
|
67
67
|
/**
|
|
68
68
|
* Add ARIA attributes.
|
|
69
69
|
*/
|
|
@@ -4,7 +4,7 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PButtonPure = forwardRef(({ active = false, alignLabel = '
|
|
7
|
+
const PButtonPure = forwardRef(({ active = false, alignLabel = 'end', aria, disabled = false, hideLabel = false, icon = 'arrow-right', iconSource, loading = false, size = 'small', stretch = false, theme = 'light', type = 'submit', weight = 'regular', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
const WebComponentTag = usePrefix('p-button-pure');
|
|
10
10
|
const propsToSync = [active, alignLabel, aria, disabled, hideLabel, icon, iconSource, loading, size, stretch, theme, type, weight];
|
|
@@ -71,7 +71,7 @@ export declare const PCarousel: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
71
71
|
/**
|
|
72
72
|
* Alignment of heading and description
|
|
73
73
|
*/
|
|
74
|
-
alignHeader?: "center" | "left" | undefined;
|
|
74
|
+
alignHeader?: "center" | "start" | "left" | undefined;
|
|
75
75
|
/**
|
|
76
76
|
* Defines the description used in the carousel.
|
|
77
77
|
*/
|
|
@@ -4,7 +4,7 @@ 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 PCarousel = forwardRef(({ activeSlideIndex = 0, alignHeader = '
|
|
7
|
+
const PCarousel = forwardRef(({ activeSlideIndex = 0, alignHeader = 'start', description, disablePagination, heading, intl, onCarouselChange, onUpdate, pagination = true, rewind = true, skipLinkTarget, slidesPerPage = 1, theme = 'light', width = 'basic', wrapContent, className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
useEventCallback(elementRef, 'carouselChange', onCarouselChange);
|
|
10
10
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
@@ -30,7 +30,7 @@ export declare const PDisplay: import("react").ForwardRefExoticComponent<Omit<HT
|
|
|
30
30
|
/**
|
|
31
31
|
* Text alignment of the component.
|
|
32
32
|
*/
|
|
33
|
-
align?: "center" | "left" | "right" | undefined;
|
|
33
|
+
align?: "center" | "start" | "end" | "left" | "right" | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* Basic text color variations depending on theme property.
|
|
36
36
|
*/
|
|
@@ -4,7 +4,7 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PDisplay = forwardRef(({ align = '
|
|
7
|
+
const PDisplay = forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = 'large', tag, theme = 'light', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
const WebComponentTag = usePrefix('p-display');
|
|
10
10
|
const propsToSync = [align, color, ellipsis, size, tag, theme];
|
|
@@ -38,7 +38,7 @@ export declare const PFlyout: import("react").ForwardRefExoticComponent<Omit<HTM
|
|
|
38
38
|
/**
|
|
39
39
|
* The position of the flyout
|
|
40
40
|
*/
|
|
41
|
-
position?: "left" | "right" | undefined;
|
|
41
|
+
position?: "start" | "end" | "left" | "right" | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* Adapts the flyout color depending on the theme.
|
|
44
44
|
*/
|
|
@@ -4,7 +4,7 @@ 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 PFlyout = forwardRef(({ aria, onDismiss, open = false, position = '
|
|
7
|
+
const PFlyout = forwardRef(({ aria, onDismiss, open = false, position = 'end', theme = 'light', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
10
10
|
const WebComponentTag = usePrefix('p-flyout');
|
|
@@ -30,7 +30,7 @@ export declare const PHeading: import("react").ForwardRefExoticComponent<Omit<HT
|
|
|
30
30
|
/**
|
|
31
31
|
* Text alignment of the component.
|
|
32
32
|
*/
|
|
33
|
-
align?: "center" | "left" | "right" | undefined;
|
|
33
|
+
align?: "center" | "start" | "end" | "left" | "right" | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* Basic text color variations depending on theme property.
|
|
36
36
|
*/
|
|
@@ -4,7 +4,7 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PHeading = forwardRef(({ align = '
|
|
7
|
+
const PHeading = forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = 'xx-large', tag, theme = 'light', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
const WebComponentTag = usePrefix('p-heading');
|
|
10
10
|
const propsToSync = [align, color, ellipsis, size, tag, theme];
|
|
@@ -31,7 +31,7 @@ export declare const PHeadline: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
31
31
|
/**
|
|
32
32
|
* Text alignment of the component.
|
|
33
33
|
*/
|
|
34
|
-
align?: "center" | "left" | "right" | undefined;
|
|
34
|
+
align?: "center" | "start" | "end" | "left" | "right" | undefined;
|
|
35
35
|
/**
|
|
36
36
|
* Basic text color variations depending on theme property.
|
|
37
37
|
*/
|
|
@@ -5,7 +5,7 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
7
|
/** @deprecated since v3.0.0, will be removed with next major release. Please use "p-heading" instead. */
|
|
8
|
-
const PHeadline = forwardRef(({ align = '
|
|
8
|
+
const PHeadline = forwardRef(({ align = 'start', color = 'primary', ellipsis = false, tag, theme = 'light', variant = 'headline-1', className, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef();
|
|
10
10
|
const WebComponentTag = usePrefix('p-headline');
|
|
11
11
|
const propsToSync = [align, color, ellipsis, tag, theme, variant];
|
|
@@ -71,7 +71,7 @@ export declare const PLinkPure: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
71
71
|
/**
|
|
72
72
|
* Aligns the label.
|
|
73
73
|
*/
|
|
74
|
-
alignLabel?: BreakpointCustomizable<"left" | "right"> | undefined;
|
|
74
|
+
alignLabel?: BreakpointCustomizable<"start" | "end" | "left" | "right"> | undefined;
|
|
75
75
|
/**
|
|
76
76
|
* Add ARIA attributes.
|
|
77
77
|
*/
|
|
@@ -4,7 +4,7 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PLinkPure = forwardRef(({ active = false, alignLabel = '
|
|
7
|
+
const PLinkPure = forwardRef(({ active = false, alignLabel = 'end', aria, download, hideLabel = false, href, icon = 'arrow-right', iconSource, rel, size = 'small', stretch = false, target = '_self', theme = 'light', underline = false, weight = 'regular', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
const WebComponentTag = usePrefix('p-link-pure');
|
|
10
10
|
const propsToSync = [active, alignLabel, aria, download, hideLabel, href, icon, iconSource, rel, size, stretch, target, theme, underline, weight];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
|
-
import type { SelectedAriaAttributes, ModalAriaAttribute, BreakpointCustomizable } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, ModalAriaAttribute, BreakpointCustomizable, Theme } from '../types';
|
|
3
3
|
export type PModalProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Add ARIA attributes.
|
|
@@ -38,6 +38,10 @@ export type PModalProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
38
38
|
* If true, the modal is open.
|
|
39
39
|
*/
|
|
40
40
|
open: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Adapts the modal color depending on the theme.
|
|
43
|
+
*/
|
|
44
|
+
theme?: Theme;
|
|
41
45
|
};
|
|
42
46
|
export declare const PModal: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
43
47
|
/**
|
|
@@ -77,6 +81,10 @@ export declare const PModal: import("react").ForwardRefExoticComponent<Omit<HTML
|
|
|
77
81
|
* If true, the modal is open.
|
|
78
82
|
*/
|
|
79
83
|
open: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Adapts the modal color depending on the theme.
|
|
86
|
+
*/
|
|
87
|
+
theme?: "auto" | "light" | "dark" | undefined;
|
|
80
88
|
} & {
|
|
81
89
|
children?: import("react").ReactNode;
|
|
82
90
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -4,15 +4,15 @@ 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 PModal = forwardRef(({ aria, disableBackdropClick = false, disableCloseButton, dismissButton = true, fullscreen = false, heading, onClose, onDismiss, open = false, className, ...rest }, ref) => {
|
|
7
|
+
const PModal = forwardRef(({ aria, disableBackdropClick = false, disableCloseButton, dismissButton = true, fullscreen = false, heading, onClose, onDismiss, open = false, theme = 'light', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
useEventCallback(elementRef, 'close', onClose);
|
|
10
10
|
useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
11
11
|
const WebComponentTag = usePrefix('p-modal');
|
|
12
|
-
const propsToSync = [aria, disableBackdropClick, disableCloseButton, dismissButton, fullscreen, heading, open];
|
|
12
|
+
const propsToSync = [aria, disableBackdropClick, disableCloseButton, dismissButton, fullscreen, heading, open, theme];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
|
14
14
|
const { current } = elementRef;
|
|
15
|
-
['aria', 'disableBackdropClick', 'disableCloseButton', 'dismissButton', 'fullscreen', 'heading', 'open'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
|
+
['aria', 'disableBackdropClick', 'disableCloseButton', 'dismissButton', 'fullscreen', 'heading', 'open', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
16
|
}, propsToSync);
|
|
17
17
|
const props = {
|
|
18
18
|
...rest,
|
|
@@ -42,7 +42,7 @@ export declare const PSwitch: import("react").ForwardRefExoticComponent<Omit<HTM
|
|
|
42
42
|
/**
|
|
43
43
|
* Aligns the label.
|
|
44
44
|
*/
|
|
45
|
-
alignLabel?: BreakpointCustomizable<"left" | "right"> | undefined;
|
|
45
|
+
alignLabel?: BreakpointCustomizable<"start" | "end" | "left" | "right"> | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* Visualize the switch with on/off status.
|
|
48
48
|
*/
|
|
@@ -4,7 +4,7 @@ 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 PSwitch = forwardRef(({ alignLabel = '
|
|
7
|
+
const PSwitch = forwardRef(({ alignLabel = 'end', checked = false, disabled = false, hideLabel = false, loading = false, onSwitchChange, onUpdate, stretch = false, theme = 'light', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
useEventCallback(elementRef, 'switchChange', onSwitchChange);
|
|
10
10
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
@@ -34,7 +34,7 @@ export declare const PText: import("react").ForwardRefExoticComponent<Omit<HTMLA
|
|
|
34
34
|
/**
|
|
35
35
|
* Text alignment of the component.
|
|
36
36
|
*/
|
|
37
|
-
align?: "center" | "left" | "right" | undefined;
|
|
37
|
+
align?: "center" | "start" | "end" | "left" | "right" | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* Basic text color variations depending on theme property.
|
|
40
40
|
*/
|
|
@@ -4,7 +4,7 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PText = forwardRef(({ align = '
|
|
7
|
+
const PText = forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = 'small', tag = 'p', theme = 'light', weight = 'regular', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
const WebComponentTag = usePrefix('p-text');
|
|
10
10
|
const propsToSync = [align, color, ellipsis, size, tag, theme, weight];
|