@porsche-design-system/components-react 3.7.0 → 3.8.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 +124 -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,121 @@ 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 - 2023-10-24
|
|
18
|
+
|
|
19
|
+
### 3.8.0-rc.0 - 2023-10-23
|
|
20
|
+
|
|
21
|
+
#### Added
|
|
22
|
+
|
|
23
|
+
- RTL (right-to-left) support for all components
|
|
24
|
+
([#2819](https://github.com/porsche-design-system/porsche-design-system/pull/2819))
|
|
25
|
+
- `Popover` and `Modal` support theme dark and auto
|
|
26
|
+
([#2789](https://github.com/porsche-design-system/porsche-design-system/pull/2789))
|
|
27
|
+
- Styles: `getSkeletonStyle()` and `pds-skeleton()`
|
|
28
|
+
([#2796](https://github.com/porsche-design-system/porsche-design-system/pull/2796))
|
|
29
|
+
- Styles: `motionDuration{Short|Moderate|Long|VeryLong}`, `motionEasing{Base|In|Out}`, and
|
|
30
|
+
`$pds-motion-duration-{short|moderate|long|very-long}`, `$pds-motion-easing-{base|in|out}`
|
|
31
|
+
([#2791](https://github.com/porsche-design-system/porsche-design-system/pull/2791))
|
|
32
|
+
|
|
33
|
+
#### Changed
|
|
34
|
+
|
|
35
|
+
- Styles: `themeDarkBackgroundShading` and `$pds-theme-dark-background-shading` color
|
|
36
|
+
([#2789](https://github.com/porsche-design-system/porsche-design-system/pull/2789))
|
|
37
|
+
- `Spinner` animation was optimized to consume less CPU
|
|
38
|
+
([#2825](https://github.com/porsche-design-system/porsche-design-system/pull/2825))
|
|
39
|
+
|
|
40
|
+
- `Text`, `Display`, `Heading`, `Headline`: Prop values `left | right` of `align` prop are deprecated and mapped to new
|
|
41
|
+
values `start | end` for correct RTL (right-to-left) support
|
|
42
|
+
([#2819](https://github.com/porsche-design-system/porsche-design-system/pull/2819))
|
|
43
|
+
|
|
44
|
+
```diff
|
|
45
|
+
- <p-text align="left"></p-text>
|
|
46
|
+
+ <p-text align="start"></p-text>
|
|
47
|
+
|
|
48
|
+
- <p-text align="right"></p-text>
|
|
49
|
+
+ <p-text align="end"></p-text>
|
|
50
|
+
|
|
51
|
+
- <p-display align="left"></p-display>
|
|
52
|
+
+ <p-display align="start"></p-display>
|
|
53
|
+
|
|
54
|
+
- <p-display align="right"></p-display>
|
|
55
|
+
+ <p-display align="end"></p-display>
|
|
56
|
+
|
|
57
|
+
- <p-heading align="left"></p-heading>
|
|
58
|
+
+ <p-heading align="start"></p-heading>
|
|
59
|
+
|
|
60
|
+
- <p-heading align="right"></p-heading>
|
|
61
|
+
+ <p-heading align="end"></p-heading>
|
|
62
|
+
|
|
63
|
+
- <p-headline align="left"></p-headline>
|
|
64
|
+
+ <p-headline align="start"></p-headline>
|
|
65
|
+
|
|
66
|
+
- <p-headline align="right"></p-headline>
|
|
67
|
+
+ <p-headline align="end"></p-headline>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
- `Button Pure`, `Link Pure`, `Switch`: Prop values `left | right` of `align-label` prop are deprecated and mapped to
|
|
71
|
+
new values `start | end` for correct RTL (right-to-left) support
|
|
72
|
+
([#2819](https://github.com/porsche-design-system/porsche-design-system/pull/2819))
|
|
73
|
+
|
|
74
|
+
```diff
|
|
75
|
+
- <p-button-pure align-label="left"></p-button-pure>
|
|
76
|
+
+ <p-button-pure align-label="start"></p-button-pure>
|
|
77
|
+
|
|
78
|
+
- <p-button-pure align-label="right"></p-button-pure>
|
|
79
|
+
+ <p-button-pure align-label="end"></p-button-pure>
|
|
80
|
+
|
|
81
|
+
- <p-link-pure align-label="left"></p-link-pure>
|
|
82
|
+
+ <p-link-pure align-label="start"></p-link-pure>
|
|
83
|
+
|
|
84
|
+
- <p-link-pure align-label="right"></p-link-pure>
|
|
85
|
+
+ <p-link-pure align-label="end"></p-link-pure>
|
|
86
|
+
|
|
87
|
+
- <p-switch align-label="left"></p-switch>
|
|
88
|
+
+ <p-switch align-label="start"></p-switch>
|
|
89
|
+
|
|
90
|
+
- <p-switch align-label="right"></p-switch>
|
|
91
|
+
+ <p-switch align-label="end"></p-switch>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- `Flyout`: Prop values `left | right` of `position` prop are deprecated and mapped to new values `start | end` for
|
|
95
|
+
correct RTL (right-to-left) support
|
|
96
|
+
([#2819](https://github.com/porsche-design-system/porsche-design-system/pull/2819))
|
|
97
|
+
|
|
98
|
+
```diff
|
|
99
|
+
- <p-flyout position="left"></p-flyout>
|
|
100
|
+
+ <p-flyout-pure position="start"></p-flyout>
|
|
101
|
+
|
|
102
|
+
- <p-flyout-pure position="right"></p-flyout>
|
|
103
|
+
+ <p-flyout-pure position="end"></p-flyout>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- `Carousel`: Prop value `left` of `align-header` prop is deprecated and mapped to new value `start` for correct RTL
|
|
107
|
+
(right-to-left) support ([#2819](https://github.com/porsche-design-system/porsche-design-system/pull/2819))
|
|
108
|
+
|
|
109
|
+
```diff
|
|
110
|
+
- <p-carousel align-header="left"></p-carousel>
|
|
111
|
+
+ <p-carousel-pure align-header="start"></p-carousel>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
#### Fixed
|
|
115
|
+
|
|
116
|
+
- `Popover` doesn't get cut off when used within the `Table` component
|
|
117
|
+
([#2814](https://github.com/porsche-design-system/porsche-design-system/pull/2814))
|
|
118
|
+
- `Flyout` and `Modal` with `open="false"` and nested `Accordion` with `open="true"` containing focusable elements like
|
|
119
|
+
links can't be focused anymore ([#2818](https://github.com/porsche-design-system/porsche-design-system/pull/2818))
|
|
120
|
+
- Background for open `Flyout` and `Modal` on iOS Mobile Safari with collapsed address bar is no longer scrollable
|
|
121
|
+
([#2822](https://github.com/porsche-design-system/porsche-design-system/pull/2822))
|
|
122
|
+
- `Tabs Bar` works with translated page content
|
|
123
|
+
([#2847](https://github.com/porsche-design-system/porsche-design-system/pull/2847))
|
|
124
|
+
|
|
17
125
|
### [3.7.0] - 2023-10-04
|
|
18
126
|
|
|
19
127
|
### [3.7.0-rc.2] - 2023-10-04
|
|
20
128
|
|
|
21
129
|
#### Added
|
|
22
130
|
|
|
23
|
-
- Styles: `gridStyles` and `pds-grid` support basic usage inside `Flyout` component
|
|
131
|
+
- Styles: `gridStyles` and `pds-grid()` support basic usage inside `Flyout` component
|
|
24
132
|
([#2756](https://github.com/porsche-design-system/porsche-design-system/pull/2756))
|
|
25
133
|
|
|
26
134
|
#### Fixed
|
|
@@ -348,7 +456,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
348
456
|
- `Wordmark`, `Crest` and `Model Signature` respect parent width/height
|
|
349
457
|
([#2479](https://github.com/porsche-design-system/porsche-design-system/pull/2479))
|
|
350
458
|
- `Button Tile`, `Link Tile` and `Link Tile Model Signature` are using correct border radius of
|
|
351
|
-
|
|
459
|
+
`$pds-border-radius-large` ([#2473](https://github.com/porsche-design-system/porsche-design-system/pull/2473))
|
|
352
460
|
- `Text Field Wrapper` with `input type="search"` has better accessibility for clear button
|
|
353
461
|
([#2476](https://github.com/porsche-design-system/porsche-design-system/pull/2476))
|
|
354
462
|
- `Accordion` layout shift with nested accordions
|
|
@@ -360,7 +468,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
360
468
|
|
|
361
469
|
#### Fixed
|
|
362
470
|
|
|
363
|
-
- Styles: `borderRadiusLarge` and
|
|
471
|
+
- Styles: `borderRadiusLarge` and `$pds-border-radius-large` are exposing correct value
|
|
364
472
|
([#2463](https://github.com/porsche-design-system/porsche-design-system/pull/2463))
|
|
365
473
|
|
|
366
474
|
### [3.0.0-alpha.6] - 2023-04-06
|
|
@@ -513,8 +621,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
513
621
|
|
|
514
622
|
- Styles: ([#2422](https://github.com/porsche-design-system/porsche-design-system/pull/2422))
|
|
515
623
|
- `gridWide`
|
|
516
|
-
- `gridWideColumnStart` and
|
|
517
|
-
- `gridWideColumnEnd` and
|
|
624
|
+
- `gridWideColumnStart` and `$pds-grid-wide-column-start`
|
|
625
|
+
- `gridWideColumnEnd` and `$pds-grid-wide-column-end`
|
|
518
626
|
- `gridNarrowOffset`, `gridNarrowOffsetBase`, `gridNarrowOffsetS`, `gridNarrowOffsetXXL` and
|
|
519
627
|
`$pds-grid-narrow-offset-base`, `$pds-grid-narrow-offset-s`, `$pds-grid-narrow-offset-xxl`
|
|
520
628
|
- `gridBasicOffset`, `gridBasicOffsetBase`, `gridBasicOffsetS`, `gridBasicOffsetXXL` and
|
|
@@ -540,7 +648,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
540
648
|
|
|
541
649
|
#### Changed
|
|
542
650
|
|
|
543
|
-
- Styles: `gridStyles` and `pds-grid` are supporting an additional column range called `wide`
|
|
651
|
+
- Styles: `gridStyles` and `pds-grid()` are supporting an additional column range called `wide`
|
|
544
652
|
([#2422](https://github.com/porsche-design-system/porsche-design-system/pull/2422))
|
|
545
653
|
- Styles: SCSS version needs to be imported by `@porsche-design-system/components-js/styles` instead of
|
|
546
654
|
`@porsche-design-system/components-js/styles/scss`
|
|
@@ -550,9 +658,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
550
658
|
|
|
551
659
|
- `Banner`: CSS variable `--p-banner-position-type`
|
|
552
660
|
([#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
|
|
661
|
+
- Styles: `gridSafeZone`, `gridSafeZoneBase`, `gridSafeZoneXXL` and `$pds-grid-safe-zone-base`,
|
|
662
|
+
`$pds-grid-safe-zone-xxl` ([#2422](https://github.com/porsche-design-system/porsche-design-system/pull/2422))
|
|
663
|
+
- Styles: `gridWidth`, `gridWidthMin`, `gridWidthMax` and `$pds-grid-width-min`, `$pds-grid-width-max`
|
|
556
664
|
([#2422](https://github.com/porsche-design-system/porsche-design-system/pull/2422))
|
|
557
665
|
|
|
558
666
|
#### 🤖 Property deprecations 🤖
|
|
@@ -822,11 +930,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
822
930
|
- `Display` supports value `small` for prop `size`
|
|
823
931
|
- Partials: `getInitialStyles` supports multi prefix, e.g.
|
|
824
932
|
`getInitialStyles({ prefix: ['', 'some-prefix', 'another-prefix'] });`
|
|
825
|
-
- Styles: `displaySmallStyle` and
|
|
826
|
-
- Styles: `textXXSmallStyle` and
|
|
933
|
+
- Styles: `displaySmallStyle` and `$pds-display-small`
|
|
934
|
+
- Styles: `textXXSmallStyle` and `$pds-text-xx-small`
|
|
827
935
|
- Styles: `fontSizeDisplaySmall` and `$pds-font-size-display-small`
|
|
828
936
|
- Styles: `fontSizeTextXXSmall` and `$pds-font-size-text-xx-small`
|
|
829
|
-
- Styles: `getHoverStyle` and `pds-hover`
|
|
937
|
+
- Styles: `getHoverStyle` and `pds-hover()`
|
|
830
938
|
- `Banner` has `heading` and `description` prop as well as `slot="heading"` and deprecated `slot="title"`
|
|
831
939
|
- Custom events have consistent names across components and deprecated old event names
|
|
832
940
|
- `Accordion` emits `change` and deprecated `accordionChange` event
|
|
@@ -863,7 +971,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
863
971
|
- `Display` uses font-weight regular and font-style normal
|
|
864
972
|
- Partials: `getInitialStyles` matches new design language
|
|
865
973
|
- 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
|
|
974
|
+
- Styles: `getFocusStyle` and `pds-focus()` doesn't need `theme` parameter anymore
|
|
867
975
|
- 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
976
|
unit (px)
|
|
869
977
|
- `Link Tile` matches new design language
|
|
@@ -882,7 +990,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
882
990
|
#### Removed
|
|
883
991
|
|
|
884
992
|
- `Heading`: value `xxx-large` for prop `size`
|
|
885
|
-
- Styles: `headingXXXLargeStyle` and
|
|
993
|
+
- Styles: `headingXXXLargeStyle` and `$pds-heading-xxx-large`
|
|
886
994
|
- Styles: `fontSizeHeadingXXLarge` and `$pds-font-size-heading-xx-large`
|
|
887
995
|
|
|
888
996
|
### [3.0.0-alpha.2] - 2023-02-27
|
|
@@ -944,8 +1052,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
944
1052
|
- `Stepper Horizontal` matches new design language
|
|
945
1053
|
- Styles: Optimize design tokens "spacing", "typography" and "theme" provided by styles sub-package
|
|
946
1054
|
`@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
|
|
1055
|
+
- Styles: Use calc() instead of max() to calculate padding for `gridStyle` (JS) and `pds-grid()` (SCSS)
|
|
1056
|
+
- Styles: `gridStyle` (JS) and `pds-grid()` (SCSS) uses optimized grid gap
|
|
949
1057
|
|
|
950
1058
|
### [3.0.0-alpha.0] - 2023-02-08
|
|
951
1059
|
|
|
@@ -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];
|