@porsche-design-system/components-react 4.7.0 → 4.8.0-rc.1
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 +94 -1
- package/cjs/hooks.cjs +1 -5
- package/cjs/lib/components/checkbox.wrapper.cjs +3 -3
- package/cjs/lib/components/input-date.wrapper.cjs +3 -3
- package/cjs/lib/components/input-email.wrapper.cjs +3 -3
- package/cjs/lib/components/input-month.wrapper.cjs +3 -3
- package/cjs/lib/components/input-number.wrapper.cjs +3 -3
- package/cjs/lib/components/input-password.wrapper.cjs +3 -3
- package/cjs/lib/components/input-tel.wrapper.cjs +3 -3
- package/cjs/lib/components/input-text.wrapper.cjs +3 -3
- package/cjs/lib/components/input-time.wrapper.cjs +3 -3
- package/cjs/lib/components/input-url.wrapper.cjs +3 -3
- package/cjs/lib/components/input-week.wrapper.cjs +3 -3
- package/cjs/lib/components/multi-select.wrapper.cjs +3 -3
- package/cjs/lib/components/select.wrapper.cjs +3 -3
- package/cjs/lib/components/switch.wrapper.cjs +3 -3
- package/cjs/lib/components/textarea.wrapper.cjs +3 -3
- package/esm/hooks.d.ts +0 -3
- package/esm/hooks.mjs +2 -5
- package/esm/lib/components/checkbox.wrapper.d.ts +9 -1
- package/esm/lib/components/checkbox.wrapper.mjs +3 -3
- package/esm/lib/components/input-date.wrapper.d.ts +9 -1
- package/esm/lib/components/input-date.wrapper.mjs +3 -3
- package/esm/lib/components/input-email.wrapper.d.ts +9 -1
- package/esm/lib/components/input-email.wrapper.mjs +3 -3
- package/esm/lib/components/input-month.wrapper.d.ts +9 -1
- package/esm/lib/components/input-month.wrapper.mjs +3 -3
- package/esm/lib/components/input-number.wrapper.d.ts +9 -1
- package/esm/lib/components/input-number.wrapper.mjs +3 -3
- package/esm/lib/components/input-password.wrapper.d.ts +9 -1
- package/esm/lib/components/input-password.wrapper.mjs +3 -3
- package/esm/lib/components/input-search.wrapper.d.ts +2 -2
- package/esm/lib/components/input-tel.wrapper.d.ts +9 -1
- package/esm/lib/components/input-tel.wrapper.mjs +3 -3
- package/esm/lib/components/input-text.wrapper.d.ts +9 -1
- package/esm/lib/components/input-text.wrapper.mjs +3 -3
- package/esm/lib/components/input-time.wrapper.d.ts +9 -1
- package/esm/lib/components/input-time.wrapper.mjs +3 -3
- package/esm/lib/components/input-url.wrapper.d.ts +9 -1
- package/esm/lib/components/input-url.wrapper.mjs +3 -3
- package/esm/lib/components/input-week.wrapper.d.ts +9 -1
- package/esm/lib/components/input-week.wrapper.mjs +3 -3
- package/esm/lib/components/link-pure.wrapper.d.ts +2 -2
- package/esm/lib/components/link-tile-product.wrapper.d.ts +2 -2
- package/esm/lib/components/link.wrapper.d.ts +2 -2
- package/esm/lib/components/multi-select.wrapper.d.ts +9 -1
- package/esm/lib/components/multi-select.wrapper.mjs +3 -3
- package/esm/lib/components/select.wrapper.d.ts +9 -1
- package/esm/lib/components/select.wrapper.mjs +3 -3
- package/esm/lib/components/switch.wrapper.d.ts +9 -1
- package/esm/lib/components/switch.wrapper.mjs +3 -3
- package/esm/lib/components/textarea.wrapper.d.ts +9 -1
- package/esm/lib/components/textarea.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +22 -1
- package/package.json +2 -2
- package/skills/pds-audit-deprecations-react/SKILL.md +2 -2
- package/skills/pds-knowledge-react/SKILL.md +14 -5
- package/skills/pds-knowledge-react/references/components/p-carousel/examples/DynamicSlides.tsx +1 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/examples/FocusOnCenterSlide.tsx +1 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/examples/JumpToSlide.tsx +1 -0
- package/skills/pds-knowledge-react/references/components/p-checkbox/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-checkbox/p-checkbox.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-date/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-date/p-input-date.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-email/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-email/p-input-email.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-month/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-month/p-input-month.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-number/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-number/p-input-number.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-password/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-password/p-input-password.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-search/p-input-search.md +2 -1
- package/skills/pds-knowledge-react/references/components/p-input-tel/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-tel/p-input-tel.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-text/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-text/p-input-text.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-time/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-time/p-input-time.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-url/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-url/p-input-url.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-week/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-week/p-input-week.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-link/p-link.md +2 -2
- package/skills/pds-knowledge-react/references/components/p-link-pure/p-link-pure.md +2 -2
- package/skills/pds-knowledge-react/references/components/p-link-tile-product/p-link-tile-product.md +2 -2
- package/skills/pds-knowledge-react/references/components/p-multi-select/accessibility.md +22 -0
- package/skills/pds-knowledge-react/references/components/p-multi-select/p-multi-select.md +14 -2
- package/skills/pds-knowledge-react/references/components/p-pin-code/p-pin-code.md +11 -3
- package/skills/pds-knowledge-react/references/components/p-select/accessibility.md +22 -0
- package/skills/pds-knowledge-react/references/components/p-select/p-select.md +14 -2
- package/skills/pds-knowledge-react/references/components/p-switch/accessibility.md +18 -0
- package/skills/pds-knowledge-react/references/components/p-switch/p-switch.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-textarea/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-textarea/p-textarea.md +12 -0
- package/skills/pds-knowledge-react/references/deprecations.md +4 -4
- package/skills/pds-knowledge-react/references/examples/patterns/feedback/dialog.md +230 -0
- package/skills/pds-knowledge-react/references/examples/patterns/feedback/inline.md +193 -0
- package/skills/pds-knowledge-react/references/examples/patterns/footer.md +250 -0
- package/skills/pds-knowledge-react/references/examples/patterns/header/overlay.md +152 -0
- package/skills/pds-knowledge-react/references/examples/patterns/header/stacked.md +122 -0
- package/skills/pds-knowledge-react/references/examples/patterns/popover/feature-tour.md +243 -0
- package/skills/pds-knowledge-react/references/examples/patterns/popover/local-market-switch.md +323 -0
- package/skills/pds-knowledge-react/references/examples/patterns/popover/priority-navigation.md +191 -0
- package/skills/pds-knowledge-react/references/examples/templates/admin-panel.md +397 -0
- package/skills/pds-knowledge-react/references/examples/templates/landing-page.md +529 -0
- package/skills/pds-knowledge-react/references/examples.md +48 -0
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +18 -105
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +78 -156
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/hooks.cjs +1 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-date.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-email.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-month.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-number.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-password.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-tel.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-text.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-time.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-url.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-week.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/select.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/textarea.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-product.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +2 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.cjs +0 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +0 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.cjs +1 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +0 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +0 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +18 -105
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +78 -150
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/hooks.mjs +2 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-date.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-email.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-month.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-number.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-password.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-tel.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-text.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-time.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-url.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-week.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/textarea.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.mjs +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-product.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +3 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.mjs +1 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +2 -2
- package/ssr/esm/hooks.d.ts +0 -3
- package/ssr/esm/lib/components/checkbox.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-date.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-email.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-month.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-number.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-password.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-search.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/input-tel.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-text.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-time.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-url.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-week.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/link-pure.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/link-tile-product.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/link.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/multi-select.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/select.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/switch.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/textarea.wrapper.d.ts +9 -1
- package/ssr/esm/lib/dsr-components/label.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/link-pure.d.ts +1 -1
- package/ssr/esm/lib/dsr-components/link-tile-product.d.ts +1 -1
- package/ssr/esm/lib/dsr-components/link.d.ts +1 -1
- package/ssr/esm/lib/dsr-components/stepper-horizontal.d.ts +0 -1
- package/ssr/esm/lib/dsr-components/tabs-bar.d.ts +0 -1
- package/ssr/esm/lib/dsr-components/tabs.d.ts +0 -1
- package/ssr/esm/lib/types.d.ts +22 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,98 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [4.8.0-rc.1] - 2026-10-01
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- `Knowledge Skill`: patterns and templates – the header, footer, popover and feedback patterns, the landing page and
|
|
22
|
+
the admin panel – with their description, the components they use, and their complete markup and script, together with
|
|
23
|
+
the note that they are vanilla HTML and JavaScript to be converted to your framework
|
|
24
|
+
([#4761](https://github.com/porsche-design-system/porsche-design-system/pull/4761))
|
|
25
|
+
|
|
26
|
+
## [4.8.0-rc.0] - 2026-10-01
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- `Pin Code`: Support for `ArrowLeft`/`ArrowRight` keyboard navigation.
|
|
31
|
+
([#4690](https://github.com/porsche-design-system/porsche-design-system/pull/4690))
|
|
32
|
+
- `Ai Tag`: Arabic, Japanese and Korean translations, plus region-specific Chinese translations for `zh-CN`,
|
|
33
|
+
`zh-HK` and `zh-TW`, replacing the English fallback.
|
|
34
|
+
([#4678](https://github.com/porsche-design-system/porsche-design-system/pull/4678))
|
|
35
|
+
- `Checkbox`, `Input Date`, `Input Email`, `Input Month`, `Input Number`, `Input Password`, `Input Search`, `Input Tel`,
|
|
36
|
+
`Input Text`, `Input Time`, `Input Url`, `Input Week`, `Multi Select`, `Select`, `Switch`, `Textarea`: `aria` prop to
|
|
37
|
+
provide additional context for screen readers (`aria-label`, `aria-description`)
|
|
38
|
+
([#4740](https://github.com/porsche-design-system/porsche-design-system/pull/4740))
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- `Link`, `Link Pure`, `Link Tile Product`: no error is logged anymore when neither `href` nor a slotted anchor is
|
|
43
|
+
provided. `Link` and `Link Pure` then render their label as plain text, and `Link Tile Product` renders a
|
|
44
|
+
non-interactive tile. `Link` and `Link Pure` only log an error when `href` is combined with a slotted anchor (also a
|
|
45
|
+
nested one), which renders nested links.
|
|
46
|
+
([#4751](https://github.com/porsche-design-system/porsche-design-system/pull/4751))
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- `Select`, `Multi Select`, `Radio Group`: unmatched values triggered misleading console warnings, including empty
|
|
51
|
+
strings and values whose options had not loaded yet. Option matching remains strict by type and value.
|
|
52
|
+
([#4710](https://github.com/porsche-design-system/porsche-design-system/pull/4710))
|
|
53
|
+
- `Pin Code`: Focus management on label click and digit overwrite behavior of focused cell.
|
|
54
|
+
([#4690](https://github.com/porsche-design-system/porsche-design-system/pull/4690))
|
|
55
|
+
- `Ai Tag`: the `generated` variant displayed Czech text instead of Slovak for Slovak locales.
|
|
56
|
+
([#4678](https://github.com/porsche-design-system/porsche-design-system/pull/4678))
|
|
57
|
+
- `Tabs`, `Tabs Bar`, `Stepper Horizontal`: components permanently stopped reacting to slotted content changes after
|
|
58
|
+
being moved in the DOM (disconnected and reconnected)
|
|
59
|
+
([#4732](https://github.com/porsche-design-system/porsche-design-system/pull/4732))
|
|
60
|
+
- `Select`, `Multi Select`: an option added inside an `Optgroup` was not marked as selected when it matched the
|
|
61
|
+
currently set value
|
|
62
|
+
([#4732](https://github.com/porsche-design-system/porsche-design-system/pull/4732))
|
|
63
|
+
- `Stepper Horizontal`: the page scrolled vertically at initial render in Firefox and Safari when the stepper was
|
|
64
|
+
below the fold and the current step required a horizontal scroll
|
|
65
|
+
([#4732](https://github.com/porsche-design-system/porsche-design-system/pull/4732))
|
|
66
|
+
- `Radio Group Option`, `Multi Select Option`, `Segmented Control Item`: stayed empty when `value` was set only after
|
|
67
|
+
the component had rendered, e.g. by an Angular property binding after navigating back to a route. A missing `value` no
|
|
68
|
+
longer throws an error; it is still required by the types.
|
|
69
|
+
([#4744](https://github.com/porsche-design-system/porsche-design-system/pull/4744))
|
|
70
|
+
- `Radio Group`, `Select`, `Multi Select`, `Segmented Control`: an option or item was not selected when it received a
|
|
71
|
+
`value` matching the parent's `value` only after the parent had rendered.
|
|
72
|
+
([#4744](https://github.com/porsche-design-system/porsche-design-system/pull/4744))
|
|
73
|
+
- `Drilldown` (🧪Experimental): the active level was not shown and an error was logged when a `Drilldown Item` received
|
|
74
|
+
the `identifier` matching `activeIdentifier` only after the `Drilldown` had rendered. Without `activeIdentifier`, an
|
|
75
|
+
item without `identifier` was wrongly shown as active.
|
|
76
|
+
([#4744](https://github.com/porsche-design-system/porsche-design-system/pull/4744))
|
|
77
|
+
- `Drilldown` (🧪Experimental): setting `activeIdentifier` to a nested `Drilldown Item` while no item was active mixed
|
|
78
|
+
the root level into the active level on desktop, and an `activeIdentifier` matching no `Drilldown Item` showed an
|
|
79
|
+
empty level instead of the root level.
|
|
80
|
+
([#4744](https://github.com/porsche-design-system/porsche-design-system/pull/4744))
|
|
81
|
+
- `Stepper Horizontal`: stopped updating for good after its items were invalid for a moment, e.g. more than one item
|
|
82
|
+
with `state="current"` while the current step was changed in two steps, or more than 9 items. The error is still
|
|
83
|
+
logged while the items are invalid.
|
|
84
|
+
([#4751](https://github.com/porsche-design-system/porsche-design-system/pull/4751))
|
|
85
|
+
- `Stepper Horizontal Item`: stopped updating for good after it was `current` and `disabled` at the same time. The error
|
|
86
|
+
is still logged while the combination is set.
|
|
87
|
+
([#4751](https://github.com/porsche-design-system/porsche-design-system/pull/4751))
|
|
88
|
+
- `Link`, `Link Pure`, `Link Tile Product`: an invalid usage error was logged when `href` was set only after the
|
|
89
|
+
component had rendered, e.g. by an Angular property binding, and for `Link` and `Link Pure` also when `href` was
|
|
90
|
+
combined with an element as label, e.g. a `<span>`.
|
|
91
|
+
([#4751](https://github.com/porsche-design-system/porsche-design-system/pull/4751))
|
|
92
|
+
- `Table`: a missing caption warning was logged when `caption` was set only after the component had rendered. The
|
|
93
|
+
warning has been removed. ([#4751](https://github.com/porsche-design-system/porsche-design-system/pull/4751))
|
|
94
|
+
- `Drilldown` (🧪Experimental): on mobile viewports, an uncaught `TypeError` was thrown and the level matching
|
|
95
|
+
`activeIdentifier` could be missing when `activeIdentifier` was set right before the `Drilldown` had rendered for the
|
|
96
|
+
first time, e.g. by an Angular property binding after navigating back to a route.
|
|
97
|
+
([#4751](https://github.com/porsche-design-system/porsche-design-system/pull/4751))
|
|
98
|
+
- `Link`, `Link Pure`: no invalid usage error was logged when an empty `href` was combined with a slotted `<a>`, which
|
|
99
|
+
renders nested links. ([#4751](https://github.com/porsche-design-system/porsche-design-system/pull/4751))
|
|
100
|
+
- `Carousel`: a `TypeError` was logged when `activeSlideIndex` was set before the `Carousel` had finished loading, e.g.
|
|
101
|
+
by an Angular property binding after navigating back to a route.
|
|
102
|
+
([#4751](https://github.com/porsche-design-system/porsche-design-system/pull/4751))
|
|
103
|
+
- `Pin Code`: a `value` set after the `Pin Code` had loaded, e.g. by an Angular property binding, was displayed but not
|
|
104
|
+
submitted with the form. ([#4751](https://github.com/porsche-design-system/porsche-design-system/pull/4751))
|
|
105
|
+
- `Radio Group`: the `Radio Group` couldn't be reached with the Tab key when the first option was loading and no option
|
|
106
|
+
was selected, or when `disabled` or `loading` of an option changed after the `Radio Group` had loaded.
|
|
107
|
+
([#4751](https://github.com/porsche-design-system/porsche-design-system/pull/4751))
|
|
108
|
+
|
|
17
109
|
## [4.7.0] - 2026-09-09
|
|
18
110
|
|
|
19
111
|
## [4.7.0-rc.0] - 2026-09-09
|
|
@@ -79,7 +171,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
79
171
|
slide left an empty slot and a surplus pagination bullet behind.
|
|
80
172
|
([#4686](https://github.com/porsche-design-system/porsche-design-system/pull/4686))
|
|
81
173
|
- `Carousel`: changing `slides-per-page` at runtime had no effect. Slide widths and the pagination kept the value the
|
|
82
|
-
carousel was initialised with.
|
|
174
|
+
carousel was initialised with.
|
|
175
|
+
([#4686](https://github.com/porsche-design-system/porsche-design-system/pull/4686))
|
|
83
176
|
|
|
84
177
|
## [4.6.0] - 2026-08-20
|
|
85
178
|
|
package/cjs/hooks.cjs
CHANGED
|
@@ -54,7 +54,7 @@ const useMergedClass = (ref, className) => {
|
|
|
54
54
|
};
|
|
55
55
|
const useBrowserLayoutEffect = typeof window !== 'undefined' ? react.useLayoutEffect : react.useEffect;
|
|
56
56
|
const useToastManager = () => {
|
|
57
|
-
const tagName =
|
|
57
|
+
const tagName = usePrefix('p-toast');
|
|
58
58
|
return {
|
|
59
59
|
addMessage: (message) => {
|
|
60
60
|
const toast = document.body.querySelector(tagName);
|
|
@@ -62,11 +62,7 @@ const useToastManager = () => {
|
|
|
62
62
|
},
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
const internalHooks = {
|
|
66
|
-
usePrefix,
|
|
67
|
-
};
|
|
68
65
|
|
|
69
|
-
exports.internalHooks = internalHooks;
|
|
70
66
|
exports.skipCheckForPorscheDesignSystemProviderDuringTests = skipCheckForPorscheDesignSystemProviderDuringTests;
|
|
71
67
|
exports.useBrowserLayoutEffect = useBrowserLayoutEffect;
|
|
72
68
|
exports.useEventCallback = useEventCallback;
|
|
@@ -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 PCheckbox = /*#__PURE__*/ react.forwardRef(({ checked = false, compact = false, disabled = false, form, hideLabel = false, indeterminate = false, label = '', loading = false, message = '', name = '', onBlur, onChange, required = false, state = 'none', value = 'on', className, ...rest }, ref) => {
|
|
9
|
+
const PCheckbox = /*#__PURE__*/ react.forwardRef(({ aria, checked = false, compact = false, disabled = false, form, hideLabel = false, indeterminate = false, label = '', loading = false, message = '', name = '', onBlur, onChange, required = false, state = 'none', value = 'on', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
const WebComponentTag = hooks.usePrefix('p-checkbox');
|
|
14
|
-
const propsToSync = [checked, compact, disabled, form, hideLabel, indeterminate, label, loading, message, name, required, state, value];
|
|
14
|
+
const propsToSync = [aria, checked, compact, disabled, form, hideLabel, indeterminate, label, loading, message, name, required, state, value];
|
|
15
15
|
hooks.useBrowserLayoutEffect(() => {
|
|
16
16
|
const { current } = elementRef;
|
|
17
|
-
['checked', 'compact', 'disabled', 'form', 'hideLabel', 'indeterminate', 'label', 'loading', 'message', 'name', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
['aria', 'checked', 'compact', 'disabled', 'form', 'hideLabel', 'indeterminate', 'label', 'loading', 'message', 'name', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
18
|
}, propsToSync);
|
|
19
19
|
const props = {
|
|
20
20
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PInputDate = /*#__PURE__*/ react.forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
9
|
+
const PInputDate = /*#__PURE__*/ react.forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-input-date');
|
|
15
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
15
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PInputEmail = /*#__PURE__*/ react.forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, indicator = false, label = '', loading = false, maxLength, message = '', minLength, multiple = false, name, onBlur, onChange, onInput, pattern, placeholder = '', readOnly = false, required = false, state = 'none', value = '', className, ...rest }, ref) => {
|
|
9
|
+
const PInputEmail = /*#__PURE__*/ react.forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, indicator = false, label = '', loading = false, maxLength, message = '', minLength, multiple = false, name, onBlur, onChange, onInput, pattern, placeholder = '', readOnly = false, required = false, state = 'none', value = '', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-input-email');
|
|
15
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, multiple, name, pattern, placeholder, readOnly, required, state, value];
|
|
15
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, multiple, name, pattern, placeholder, readOnly, required, state, value];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'multiple', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'multiple', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PInputMonth = /*#__PURE__*/ react.forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
9
|
+
const PInputMonth = /*#__PURE__*/ react.forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-input-month');
|
|
15
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
15
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PInputNumber = /*#__PURE__*/ react.forwardRef(({ autoComplete, compact = false, controls = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
9
|
+
const PInputNumber = /*#__PURE__*/ react.forwardRef(({ aria, autoComplete, compact = false, controls = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-input-number');
|
|
15
|
-
const propsToSync = [autoComplete, compact, controls, description, disabled, form, hideLabel, label, loading, max, message, min, name, placeholder, readOnly, required, state, step, value];
|
|
15
|
+
const propsToSync = [aria, autoComplete, compact, controls, description, disabled, form, hideLabel, label, loading, max, message, min, name, placeholder, readOnly, required, state, step, value];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['autoComplete', 'compact', 'controls', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'placeholder', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'autoComplete', 'compact', 'controls', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'placeholder', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PInputPassword = /*#__PURE__*/ react.forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, state = 'none', toggle = false, value = '', className, ...rest }, ref) => {
|
|
9
|
+
const PInputPassword = /*#__PURE__*/ react.forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, state = 'none', toggle = false, value = '', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-input-password');
|
|
15
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, label, loading, maxLength, message, minLength, name, placeholder, readOnly, required, state, toggle, value];
|
|
15
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, label, loading, maxLength, message, minLength, name, placeholder, readOnly, required, state, toggle, value];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'state', 'toggle', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'state', 'toggle', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PInputTel = /*#__PURE__*/ react.forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, indicator = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, pattern, placeholder = '', readOnly = false, required = false, state = 'none', value = '', className, ...rest }, ref) => {
|
|
9
|
+
const PInputTel = /*#__PURE__*/ react.forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, indicator = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, pattern, placeholder = '', readOnly = false, required = false, state = 'none', value = '', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-input-tel');
|
|
15
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, name, pattern, placeholder, readOnly, required, state, value];
|
|
15
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, name, pattern, placeholder, readOnly, required, state, value];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PInputText = /*#__PURE__*/ react.forwardRef(({ autoComplete, compact = false, counter = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, spellCheck, state = 'none', value = '', className, ...rest }, ref) => {
|
|
9
|
+
const PInputText = /*#__PURE__*/ react.forwardRef(({ aria, autoComplete, compact = false, counter = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, spellCheck, state = 'none', value = '', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-input-text');
|
|
15
|
-
const propsToSync = [autoComplete, compact, counter, description, disabled, form, hideLabel, label, loading, maxLength, message, minLength, name, placeholder, readOnly, required, spellCheck, state, value];
|
|
15
|
+
const propsToSync = [aria, autoComplete, compact, counter, description, disabled, form, hideLabel, label, loading, maxLength, message, minLength, name, placeholder, readOnly, required, spellCheck, state, value];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['autoComplete', 'compact', 'counter', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'spellCheck', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'autoComplete', 'compact', 'counter', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'spellCheck', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PInputTime = /*#__PURE__*/ react.forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 60, value = '', className, ...rest }, ref) => {
|
|
9
|
+
const PInputTime = /*#__PURE__*/ react.forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 60, value = '', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-input-time');
|
|
15
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
15
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PInputUrl = /*#__PURE__*/ react.forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, indicator = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, pattern, placeholder = '', readOnly = false, required = false, state = 'none', value = '', className, ...rest }, ref) => {
|
|
9
|
+
const PInputUrl = /*#__PURE__*/ react.forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, indicator = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, pattern, placeholder = '', readOnly = false, required = false, state = 'none', value = '', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-input-url');
|
|
15
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, name, pattern, placeholder, readOnly, required, state, value];
|
|
15
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, name, pattern, placeholder, readOnly, required, state, value];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PInputWeek = /*#__PURE__*/ react.forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
9
|
+
const PInputWeek = /*#__PURE__*/ react.forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-input-week');
|
|
15
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
15
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PMultiSelect = /*#__PURE__*/ react.forwardRef(({ compact = false, description = '', disabled = false, dropdownDirection = 'auto', form, hideLabel = false, label = '', message = '', name, onBlur, onChange, onToggle, required = false, state = 'none', value = [], className, ...rest }, ref) => {
|
|
9
|
+
const PMultiSelect = /*#__PURE__*/ react.forwardRef(({ aria, compact = false, description = '', disabled = false, dropdownDirection = 'auto', form, hideLabel = false, label = '', message = '', name, onBlur, onChange, onToggle, required = false, state = 'none', value = [], className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'toggle', onToggle);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-multi-select');
|
|
15
|
-
const propsToSync = [compact, description, disabled, dropdownDirection, form, hideLabel, label, message, name, required, state, value];
|
|
15
|
+
const propsToSync = [aria, compact, description, disabled, dropdownDirection, form, hideLabel, label, message, name, required, state, value];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['compact', 'description', 'disabled', 'dropdownDirection', 'form', 'hideLabel', 'label', 'message', 'name', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'compact', 'description', 'disabled', 'dropdownDirection', 'form', 'hideLabel', 'label', 'message', 'name', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PSelect = /*#__PURE__*/ react.forwardRef(({ compact = false, description = '', disabled = false, dropdownDirection = 'auto', filter = false, form, hideLabel = false, label = '', message = '', name, onBlur, onChange, onToggle, required = false, state = 'none', value, className, ...rest }, ref) => {
|
|
9
|
+
const PSelect = /*#__PURE__*/ react.forwardRef(({ aria, compact = false, description = '', disabled = false, dropdownDirection = 'auto', filter = false, form, hideLabel = false, label = '', message = '', name, onBlur, onChange, onToggle, required = false, state = 'none', value, className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'toggle', onToggle);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-select');
|
|
15
|
-
const propsToSync = [compact, description, disabled, dropdownDirection, filter, form, hideLabel, label, message, name, required, state, value];
|
|
15
|
+
const propsToSync = [aria, compact, description, disabled, dropdownDirection, filter, form, hideLabel, label, message, name, required, state, value];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['compact', 'description', 'disabled', 'dropdownDirection', 'filter', 'form', 'hideLabel', 'label', 'message', 'name', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'compact', 'description', 'disabled', 'dropdownDirection', 'filter', 'form', 'hideLabel', 'label', 'message', 'name', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -6,14 +6,14 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PSwitch = /*#__PURE__*/ react.forwardRef(({ alignLabel = 'end', checked = false, compact = false, disabled = false, hideLabel = false, loading = false, onUpdate, stretch = false, className, ...rest }, ref) => {
|
|
9
|
+
const PSwitch = /*#__PURE__*/ react.forwardRef(({ alignLabel = 'end', aria, checked = false, compact = false, disabled = false, hideLabel = false, loading = false, onUpdate, stretch = false, className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
12
12
|
const WebComponentTag = hooks.usePrefix('p-switch');
|
|
13
|
-
const propsToSync = [alignLabel, checked, compact, disabled, hideLabel, loading, stretch];
|
|
13
|
+
const propsToSync = [alignLabel, aria, checked, compact, disabled, hideLabel, loading, stretch];
|
|
14
14
|
hooks.useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['alignLabel', 'checked', 'compact', 'disabled', 'hideLabel', 'loading', 'stretch'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['alignLabel', 'aria', 'checked', 'compact', 'disabled', 'hideLabel', 'loading', 'stretch'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PTextarea = /*#__PURE__*/ react.forwardRef(({ autoComplete, compact = false, counter = false, description = '', disabled = false, form, hideLabel = false, label = '', maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, resize = 'vertical', rows = 7, spellCheck, state = 'none', value = '', wrap = 'soft', className, ...rest }, ref) => {
|
|
9
|
+
const PTextarea = /*#__PURE__*/ react.forwardRef(({ aria, autoComplete, compact = false, counter = false, description = '', disabled = false, form, hideLabel = false, label = '', maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, resize = 'vertical', rows = 7, spellCheck, state = 'none', value = '', wrap = 'soft', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-textarea');
|
|
15
|
-
const propsToSync = [autoComplete, compact, counter, description, disabled, form, hideLabel, label, maxLength, message, minLength, name, placeholder, readOnly, required, resize, rows, spellCheck, state, value, wrap];
|
|
15
|
+
const propsToSync = [aria, autoComplete, compact, counter, description, disabled, form, hideLabel, label, maxLength, message, minLength, name, placeholder, readOnly, required, resize, rows, spellCheck, state, value, wrap];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['autoComplete', 'compact', 'counter', 'description', 'disabled', 'form', 'hideLabel', 'label', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'resize', 'rows', 'spellCheck', 'state', 'value', 'wrap'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'autoComplete', 'compact', 'counter', 'description', 'disabled', 'form', 'hideLabel', 'label', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'resize', 'rows', 'spellCheck', 'state', 'value', 'wrap'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
package/esm/hooks.d.ts
CHANGED
package/esm/hooks.mjs
CHANGED
|
@@ -52,7 +52,7 @@ const useMergedClass = (ref, className) => {
|
|
|
52
52
|
};
|
|
53
53
|
const useBrowserLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
|
|
54
54
|
const useToastManager = () => {
|
|
55
|
-
const tagName =
|
|
55
|
+
const tagName = usePrefix('p-toast');
|
|
56
56
|
return {
|
|
57
57
|
addMessage: (message) => {
|
|
58
58
|
const toast = document.body.querySelector(tagName);
|
|
@@ -60,8 +60,5 @@ const useToastManager = () => {
|
|
|
60
60
|
},
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
|
-
const internalHooks = {
|
|
64
|
-
usePrefix,
|
|
65
|
-
};
|
|
66
63
|
|
|
67
|
-
export {
|
|
64
|
+
export { skipCheckForPorscheDesignSystemProviderDuringTests, useBrowserLayoutEffect, useEventCallback, useMergedClass, usePrefix, useToastManager };
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { BreakpointCustomizable, CheckboxBlurEventDetail, CheckboxChangeEventDetail, CheckboxState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, CheckboxAriaAttribute, BreakpointCustomizable, CheckboxBlurEventDetail, CheckboxChangeEventDetail, CheckboxState } from '../types';
|
|
3
3
|
export type PCheckboxProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the native checkbox to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<CheckboxAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Reflects the checkbox's current checked state and allows setting the initial checked value on load.
|
|
6
10
|
* @default false
|
|
@@ -75,6 +79,10 @@ export type PCheckboxProps = BaseProps & {
|
|
|
75
79
|
value?: string;
|
|
76
80
|
};
|
|
77
81
|
export declare const PCheckbox: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
82
|
+
/**
|
|
83
|
+
* Sets additional ARIA attributes on the native checkbox to improve accessibility for screen readers.
|
|
84
|
+
*/
|
|
85
|
+
aria?: SelectedAriaAttributes<CheckboxAriaAttribute>;
|
|
78
86
|
/**
|
|
79
87
|
* Reflects the checkbox's current checked state and allows setting the initial checked value on load.
|
|
80
88
|
* @default false
|
|
@@ -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 PCheckbox = /*#__PURE__*/ forwardRef(({ checked = false, compact = false, disabled = false, form, hideLabel = false, indeterminate = false, label = '', loading = false, message = '', name = '', onBlur, onChange, required = false, state = 'none', value = 'on', className, ...rest }, ref) => {
|
|
7
|
+
const PCheckbox = /*#__PURE__*/ forwardRef(({ aria, checked = false, compact = false, disabled = false, form, hideLabel = false, indeterminate = false, label = '', loading = false, message = '', name = '', onBlur, onChange, required = false, state = 'none', value = 'on', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
const WebComponentTag = usePrefix('p-checkbox');
|
|
12
|
-
const propsToSync = [checked, compact, disabled, form, hideLabel, indeterminate, label, loading, message, name, required, state, value];
|
|
12
|
+
const propsToSync = [aria, checked, compact, disabled, form, hideLabel, indeterminate, label, loading, message, name, required, state, value];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
|
14
14
|
const { current } = elementRef;
|
|
15
|
-
['checked', 'compact', 'disabled', 'form', 'hideLabel', 'indeterminate', 'label', 'loading', 'message', 'name', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
|
+
['aria', 'checked', 'compact', 'disabled', 'form', 'hideLabel', 'indeterminate', 'label', 'loading', 'message', 'name', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
16
|
}, propsToSync);
|
|
17
17
|
const props = {
|
|
18
18
|
...rest,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { BreakpointCustomizable, InputDateBlurEventDetail, InputDateChangeEventDetail, InputDateInputEventDetail, InputDateState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, InputDateAriaAttribute, BreakpointCustomizable, InputDateBlurEventDetail, InputDateChangeEventDetail, InputDateInputEventDetail, InputDateState } from '../types';
|
|
3
3
|
export type PInputDateProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<InputDateAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Provides the browser with a date autofill hint (e.g. `autocomplete='bday'` for a birthday field).
|
|
6
10
|
*/
|
|
@@ -95,6 +99,10 @@ export type PInputDateProps = BaseProps & {
|
|
|
95
99
|
value?: string | null;
|
|
96
100
|
};
|
|
97
101
|
export declare const PInputDate: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
102
|
+
/**
|
|
103
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
104
|
+
*/
|
|
105
|
+
aria?: SelectedAriaAttributes<InputDateAriaAttribute>;
|
|
98
106
|
/**
|
|
99
107
|
* Provides the browser with a date autofill hint (e.g. `autocomplete='bday'` for a birthday field).
|
|
100
108
|
*/
|
|
@@ -4,16 +4,16 @@ 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 PInputDate = /*#__PURE__*/ forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
7
|
+
const PInputDate = /*#__PURE__*/ forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'input', onInput);
|
|
12
12
|
const WebComponentTag = usePrefix('p-input-date');
|
|
13
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
13
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|