@porsche-design-system/components-react 4.5.0 → 4.6.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 +32 -0
- package/bin/pds-skill.js +346 -0
- package/esm/lib/components/button.wrapper.d.ts +2 -2
- package/esm/lib/components/link.wrapper.d.ts +2 -2
- package/package.json +4 -3
- package/skills/pds-knowledge-react/SKILL.md +136 -0
- package/skills/pds-knowledge-react/references/components/p-accordion/accessibility.md +63 -0
- package/skills/pds-knowledge-react/references/components/p-accordion/examples/Default.tsx +24 -0
- package/skills/pds-knowledge-react/references/components/p-accordion/examples/InteractiveElementsInSummary.tsx +28 -0
- package/skills/pds-knowledge-react/references/components/p-accordion/examples/StickySummary.tsx +24 -0
- package/skills/pds-knowledge-react/references/components/p-accordion/p-accordion.md +99 -0
- package/skills/pds-knowledge-react/references/components/p-ai-tag/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-ai-tag/examples/WithinCheckbox.tsx +30 -0
- package/skills/pds-knowledge-react/references/components/p-ai-tag/examples/WithinFormLabel.tsx +37 -0
- package/skills/pds-knowledge-react/references/components/p-ai-tag/examples/WithinImage.tsx +13 -0
- package/skills/pds-knowledge-react/references/components/p-ai-tag/examples/WithinInputSearch.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-ai-tag/examples/WithinRadioGroup.tsx +29 -0
- package/skills/pds-knowledge-react/references/components/p-ai-tag/examples/WithinTable.tsx +91 -0
- package/skills/pds-knowledge-react/references/components/p-ai-tag/examples/WithinText.tsx +14 -0
- package/skills/pds-knowledge-react/references/components/p-ai-tag/p-ai-tag.md +47 -0
- package/skills/pds-knowledge-react/references/components/p-banner/accessibility.md +37 -0
- package/skills/pds-knowledge-react/references/components/p-banner/examples/Customization.tsx +35 -0
- package/skills/pds-knowledge-react/references/components/p-banner/examples/Default.tsx +24 -0
- package/skills/pds-knowledge-react/references/components/p-banner/p-banner.md +96 -0
- package/skills/pds-knowledge-react/references/components/p-button/accessibility.md +61 -0
- package/skills/pds-knowledge-react/references/components/p-button/examples/Default.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-button/examples/Form.tsx +28 -0
- package/skills/pds-knowledge-react/references/components/p-button/examples/FormAttribute.tsx +31 -0
- package/skills/pds-knowledge-react/references/components/p-button/p-button.md +122 -0
- package/skills/pds-knowledge-react/references/components/p-button-pure/accessibility.md +61 -0
- package/skills/pds-knowledge-react/references/components/p-button-pure/examples/CustomClickableArea.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-button-pure/examples/Default.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-button-pure/examples/Form.tsx +28 -0
- package/skills/pds-knowledge-react/references/components/p-button-pure/examples/FormAttribute.tsx +32 -0
- package/skills/pds-knowledge-react/references/components/p-button-pure/p-button-pure.md +122 -0
- package/skills/pds-knowledge-react/references/components/p-button-tile/accessibility.md +31 -0
- package/skills/pds-knowledge-react/references/components/p-button-tile/examples/ColorScheme.tsx +15 -0
- package/skills/pds-knowledge-react/references/components/p-button-tile/examples/Default.tsx +18 -0
- package/skills/pds-knowledge-react/references/components/p-button-tile/examples/FooterSlot.tsx +29 -0
- package/skills/pds-knowledge-react/references/components/p-button-tile/examples/Hyphens.tsx +33 -0
- package/skills/pds-knowledge-react/references/components/p-button-tile/examples/UiBehaviour.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-button-tile/p-button-tile.md +119 -0
- package/skills/pds-knowledge-react/references/components/p-canvas/examples/Default.tsx +111 -0
- package/skills/pds-knowledge-react/references/components/p-canvas/p-canvas.md +95 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/accessibility.md +61 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/examples/Default.tsx +23 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/examples/DynamicSlides.tsx +32 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/examples/FlexibleWidths.tsx +29 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/examples/FocusOnCenterSlide.tsx +56 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/examples/Intl.tsx +20 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/examples/JumpToSlide.tsx +42 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/p-carousel.md +146 -0
- package/skills/pds-knowledge-react/references/components/p-checkbox/accessibility.md +31 -0
- package/skills/pds-knowledge-react/references/components/p-checkbox/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-checkbox/examples/Form.tsx +45 -0
- package/skills/pds-knowledge-react/references/components/p-checkbox/examples/Indeterminate.tsx +13 -0
- package/skills/pds-knowledge-react/references/components/p-checkbox/examples/Slots.tsx +54 -0
- package/skills/pds-knowledge-react/references/components/p-checkbox/examples/WrappedLabel.tsx +24 -0
- package/skills/pds-knowledge-react/references/components/p-checkbox/p-checkbox.md +126 -0
- package/skills/pds-knowledge-react/references/components/p-crest/accessibility.md +17 -0
- package/skills/pds-knowledge-react/references/components/p-crest/examples/CustomClickableArea.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-crest/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-crest/examples/Link.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-crest/p-crest.md +69 -0
- package/skills/pds-knowledge-react/references/components/p-display/examples/Color.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-display/examples/Default.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-display/examples/Semantics.tsx +18 -0
- package/skills/pds-knowledge-react/references/components/p-display/examples/Size.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-display/examples/SizeResponsive.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-display/p-display.md +78 -0
- package/skills/pds-knowledge-react/references/components/p-divider/accessibility.md +41 -0
- package/skills/pds-knowledge-react/references/components/p-divider/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-divider/examples/Responsive.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-divider/examples/Vertical.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-divider/p-divider.md +53 -0
- package/skills/pds-knowledge-react/references/components/p-drilldown/accessibility.md +65 -0
- package/skills/pds-knowledge-react/references/components/p-drilldown/examples/CustomContent.tsx +164 -0
- package/skills/pds-knowledge-react/references/components/p-drilldown/examples/Default.tsx +117 -0
- package/skills/pds-knowledge-react/references/components/p-drilldown/p-drilldown.md +172 -0
- package/skills/pds-knowledge-react/references/components/p-fieldset/accessibility.md +37 -0
- package/skills/pds-knowledge-react/references/components/p-fieldset/examples/Default.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-fieldset/examples/Required.tsx +13 -0
- package/skills/pds-knowledge-react/references/components/p-fieldset/examples/SlottedLabel.tsx +15 -0
- package/skills/pds-knowledge-react/references/components/p-fieldset/examples/SlottedMessage.tsx +15 -0
- package/skills/pds-knowledge-react/references/components/p-fieldset/p-fieldset.md +92 -0
- package/skills/pds-knowledge-react/references/components/p-flag/accessibility.md +39 -0
- package/skills/pds-knowledge-react/references/components/p-flag/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-flag/examples/ResponsiveSize.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-flag/examples/Size.tsx +13 -0
- package/skills/pds-knowledge-react/references/components/p-flag/examples/SizeCssVar.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-flag/p-flag.md +72 -0
- package/skills/pds-knowledge-react/references/components/p-flyout/accessibility.md +80 -0
- package/skills/pds-knowledge-react/references/components/p-flyout/examples/CustomStyling.tsx +45 -0
- package/skills/pds-knowledge-react/references/components/p-flyout/examples/Default.tsx +42 -0
- package/skills/pds-knowledge-react/references/components/p-flyout/examples/Form.tsx +54 -0
- package/skills/pds-knowledge-react/references/components/p-flyout/examples/StickyTop.tsx +42 -0
- package/skills/pds-knowledge-react/references/components/p-flyout/p-flyout.md +132 -0
- package/skills/pds-knowledge-react/references/components/p-heading/accessibility.md +29 -0
- package/skills/pds-knowledge-react/references/components/p-heading/examples/Color.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-heading/examples/Default.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-heading/examples/Semantics.tsx +18 -0
- package/skills/pds-knowledge-react/references/components/p-heading/p-heading.md +82 -0
- package/skills/pds-knowledge-react/references/components/p-icon/accessibility.md +39 -0
- package/skills/pds-knowledge-react/references/components/p-icon/examples/Color.tsx +13 -0
- package/skills/pds-knowledge-react/references/components/p-icon/examples/ColorCssVar.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-icon/examples/Custom.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-icon/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-icon/examples/Overview.tsx +588 -0
- package/skills/pds-knowledge-react/references/components/p-icon/examples/ResponsiveSize.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-icon/examples/Size.tsx +13 -0
- package/skills/pds-knowledge-react/references/components/p-icon/examples/SizeCssVar.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-icon/p-icon.md +92 -0
- package/skills/pds-knowledge-react/references/components/p-inline-notification/accessibility.md +36 -0
- package/skills/pds-knowledge-react/references/components/p-inline-notification/examples/ActionButton.tsx +25 -0
- package/skills/pds-knowledge-react/references/components/p-inline-notification/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-inline-notification/examples/EventHandling.tsx +25 -0
- package/skills/pds-knowledge-react/references/components/p-inline-notification/p-inline-notification.md +78 -0
- package/skills/pds-knowledge-react/references/components/p-input-date/accessibility.md +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-date/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-input-date/examples/Form.tsx +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-date/examples/Slots.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-input-date/p-input-date.md +146 -0
- package/skills/pds-knowledge-react/references/components/p-input-email/accessibility.md +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-email/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-input-email/examples/Form.tsx +51 -0
- package/skills/pds-knowledge-react/references/components/p-input-email/examples/Slots.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-input-email/p-input-email.md +150 -0
- package/skills/pds-knowledge-react/references/components/p-input-month/accessibility.md +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-month/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-input-month/examples/Form.tsx +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-month/examples/Slots.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-input-month/p-input-month.md +146 -0
- package/skills/pds-knowledge-react/references/components/p-input-number/accessibility.md +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-number/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-input-number/examples/Form.tsx +51 -0
- package/skills/pds-knowledge-react/references/components/p-input-number/examples/Slots.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-input-number/p-input-number.md +154 -0
- package/skills/pds-knowledge-react/references/components/p-input-password/accessibility.md +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-password/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-input-password/examples/Form.tsx +51 -0
- package/skills/pds-knowledge-react/references/components/p-input-password/examples/Slots.tsx +39 -0
- package/skills/pds-knowledge-react/references/components/p-input-password/examples/Toggle.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-input-password/p-input-password.md +149 -0
- package/skills/pds-knowledge-react/references/components/p-input-search/accessibility.md +59 -0
- package/skills/pds-knowledge-react/references/components/p-input-search/examples/AriaCombobox.tsx +35 -0
- package/skills/pds-knowledge-react/references/components/p-input-search/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-input-search/examples/Form.tsx +52 -0
- package/skills/pds-knowledge-react/references/components/p-input-search/examples/Slots.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-input-search/p-input-search.md +186 -0
- package/skills/pds-knowledge-react/references/components/p-input-tel/accessibility.md +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-tel/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-input-tel/examples/Form.tsx +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-tel/examples/Slots.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-input-tel/p-input-tel.md +149 -0
- package/skills/pds-knowledge-react/references/components/p-input-text/accessibility.md +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-text/examples/Controlled.tsx +36 -0
- package/skills/pds-knowledge-react/references/components/p-input-text/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-input-text/examples/Form.tsx +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-text/examples/Slots.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-input-text/p-input-text.md +154 -0
- package/skills/pds-knowledge-react/references/components/p-input-time/accessibility.md +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-time/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-input-time/examples/Form.tsx +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-time/examples/Slots.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-input-time/p-input-time.md +148 -0
- package/skills/pds-knowledge-react/references/components/p-input-url/accessibility.md +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-url/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-input-url/examples/Form.tsx +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-url/examples/Slots.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-input-url/p-input-url.md +149 -0
- package/skills/pds-knowledge-react/references/components/p-input-week/accessibility.md +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-week/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-input-week/examples/Form.tsx +45 -0
- package/skills/pds-knowledge-react/references/components/p-input-week/examples/Slots.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-input-week/p-input-week.md +146 -0
- package/skills/pds-knowledge-react/references/components/p-link/accessibility.md +73 -0
- package/skills/pds-knowledge-react/references/components/p-link/examples/Default.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-link/examples/FrameworkRouting.tsx +14 -0
- package/skills/pds-knowledge-react/references/components/p-link/examples/Icon.tsx +17 -0
- package/skills/pds-knowledge-react/references/components/p-link/p-link.md +105 -0
- package/skills/pds-knowledge-react/references/components/p-link-pure/accessibility.md +73 -0
- package/skills/pds-knowledge-react/references/components/p-link-pure/examples/CustomClickableArea.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-link-pure/examples/Default.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-link-pure/examples/FrameworkRouting.tsx +14 -0
- package/skills/pds-knowledge-react/references/components/p-link-pure/examples/Icon.tsx +17 -0
- package/skills/pds-knowledge-react/references/components/p-link-pure/p-link-pure.md +114 -0
- package/skills/pds-knowledge-react/references/components/p-link-tile/accessibility.md +31 -0
- package/skills/pds-knowledge-react/references/components/p-link-tile/examples/ColorScheme.tsx +15 -0
- package/skills/pds-knowledge-react/references/components/p-link-tile/examples/Default.tsx +18 -0
- package/skills/pds-knowledge-react/references/components/p-link-tile/examples/FooterSlot.tsx +29 -0
- package/skills/pds-knowledge-react/references/components/p-link-tile/examples/Hyphens.tsx +34 -0
- package/skills/pds-knowledge-react/references/components/p-link-tile/examples/UiBehaviour.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-link-tile/examples/WithVideo.tsx +15 -0
- package/skills/pds-knowledge-react/references/components/p-link-tile/p-link-tile.md +109 -0
- package/skills/pds-knowledge-react/references/components/p-link-tile-product/examples/Default.tsx +22 -0
- package/skills/pds-knowledge-react/references/components/p-link-tile-product/examples/FrameworkRouting.tsx +25 -0
- package/skills/pds-knowledge-react/references/components/p-link-tile-product/p-link-tile-product.md +93 -0
- package/skills/pds-knowledge-react/references/components/p-modal/accessibility.md +80 -0
- package/skills/pds-knowledge-react/references/components/p-modal/examples/AlertDialog.tsx +39 -0
- package/skills/pds-knowledge-react/references/components/p-modal/examples/CustomStyling.tsx +26 -0
- package/skills/pds-knowledge-react/references/components/p-modal/examples/Default.tsx +39 -0
- package/skills/pds-knowledge-react/references/components/p-modal/examples/Scrollable.tsx +43 -0
- package/skills/pds-knowledge-react/references/components/p-modal/p-modal.md +139 -0
- package/skills/pds-knowledge-react/references/components/p-model-signature/examples/CustomStyling.tsx +14 -0
- package/skills/pds-knowledge-react/references/components/p-model-signature/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-model-signature/examples/MaskBlendMode.tsx +32 -0
- package/skills/pds-knowledge-react/references/components/p-model-signature/examples/MaskImage.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-model-signature/examples/MaskVideo.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-model-signature/examples/SafeZone.tsx +60 -0
- package/skills/pds-knowledge-react/references/components/p-model-signature/p-model-signature.md +62 -0
- package/skills/pds-knowledge-react/references/components/p-multi-select/accessibility.md +78 -0
- package/skills/pds-knowledge-react/references/components/p-multi-select/examples/AsyncFilter.tsx +136 -0
- package/skills/pds-knowledge-react/references/components/p-multi-select/examples/Default.tsx +29 -0
- package/skills/pds-knowledge-react/references/components/p-multi-select/examples/Form.tsx +53 -0
- package/skills/pds-knowledge-react/references/components/p-multi-select/examples/Optgroups.tsx +42 -0
- package/skills/pds-knowledge-react/references/components/p-multi-select/examples/SelectedSlot.tsx +94 -0
- package/skills/pds-knowledge-react/references/components/p-multi-select/examples/SetValue.tsx +80 -0
- package/skills/pds-knowledge-react/references/components/p-multi-select/examples/Slots.tsx +48 -0
- package/skills/pds-knowledge-react/references/components/p-multi-select/p-multi-select.md +201 -0
- package/skills/pds-knowledge-react/references/components/p-pagination/accessibility.md +23 -0
- package/skills/pds-knowledge-react/references/components/p-pagination/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-pagination/p-pagination.md +87 -0
- package/skills/pds-knowledge-react/references/components/p-pin-code/accessibility.md +45 -0
- package/skills/pds-knowledge-react/references/components/p-pin-code/examples/CopyPaste.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-pin-code/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-pin-code/examples/Form.tsx +45 -0
- package/skills/pds-knowledge-react/references/components/p-pin-code/examples/Slots.tsx +39 -0
- package/skills/pds-knowledge-react/references/components/p-pin-code/p-pin-code.md +113 -0
- package/skills/pds-knowledge-react/references/components/p-popover/accessibility.md +61 -0
- package/skills/pds-knowledge-react/references/components/p-popover/examples/Default.tsx +14 -0
- package/skills/pds-knowledge-react/references/components/p-popover/examples/SlottedButton.tsx +15 -0
- package/skills/pds-knowledge-react/references/components/p-popover/p-popover.md +120 -0
- package/skills/pds-knowledge-react/references/components/p-radio-group/accessibility.md +63 -0
- package/skills/pds-knowledge-react/references/components/p-radio-group/examples/Default.tsx +17 -0
- package/skills/pds-knowledge-react/references/components/p-radio-group/examples/Form.tsx +53 -0
- package/skills/pds-knowledge-react/references/components/p-radio-group/examples/Slots.tsx +69 -0
- package/skills/pds-knowledge-react/references/components/p-radio-group/p-radio-group.md +161 -0
- package/skills/pds-knowledge-react/references/components/p-scroller/accessibility.md +31 -0
- package/skills/pds-knowledge-react/references/components/p-scroller/examples/Default.tsx +51 -0
- package/skills/pds-knowledge-react/references/components/p-scroller/examples/Height.tsx +26 -0
- package/skills/pds-knowledge-react/references/components/p-scroller/examples/ScrollToPosition.tsx +58 -0
- package/skills/pds-knowledge-react/references/components/p-scroller/p-scroller.md +97 -0
- package/skills/pds-knowledge-react/references/components/p-segmented-control/accessibility.md +67 -0
- package/skills/pds-knowledge-react/references/components/p-segmented-control/examples/Default.tsx +26 -0
- package/skills/pds-knowledge-react/references/components/p-segmented-control/examples/Form.tsx +52 -0
- package/skills/pds-knowledge-react/references/components/p-segmented-control/examples/Slots.tsx +54 -0
- package/skills/pds-knowledge-react/references/components/p-segmented-control/examples/WithLabels.tsx +26 -0
- package/skills/pds-knowledge-react/references/components/p-segmented-control/p-segmented-control.md +166 -0
- package/skills/pds-knowledge-react/references/components/p-select/accessibility.md +140 -0
- package/skills/pds-knowledge-react/references/components/p-select/examples/AsyncFilter.tsx +136 -0
- package/skills/pds-knowledge-react/references/components/p-select/examples/Default.tsx +29 -0
- package/skills/pds-knowledge-react/references/components/p-select/examples/Form.tsx +53 -0
- package/skills/pds-knowledge-react/references/components/p-select/examples/Optgroups.tsx +42 -0
- package/skills/pds-knowledge-react/references/components/p-select/examples/Required.tsx +48 -0
- package/skills/pds-knowledge-react/references/components/p-select/examples/SelectedSlot.tsx +124 -0
- package/skills/pds-knowledge-react/references/components/p-select/examples/SetValue.tsx +80 -0
- package/skills/pds-knowledge-react/references/components/p-select/examples/Slots.tsx +48 -0
- package/skills/pds-knowledge-react/references/components/p-select/examples/SlottedImages.tsx +35 -0
- package/skills/pds-knowledge-react/references/components/p-select/p-select.md +198 -0
- package/skills/pds-knowledge-react/references/components/p-sheet/accessibility.md +80 -0
- package/skills/pds-knowledge-react/references/components/p-sheet/examples/Default.tsx +31 -0
- package/skills/pds-knowledge-react/references/components/p-sheet/p-sheet.md +125 -0
- package/skills/pds-knowledge-react/references/components/p-spinner/accessibility.md +31 -0
- package/skills/pds-knowledge-react/references/components/p-spinner/examples/Color.tsx +13 -0
- package/skills/pds-knowledge-react/references/components/p-spinner/examples/ColorCssVar.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-spinner/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-spinner/examples/ResponsiveSize.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-spinner/examples/Size.tsx +13 -0
- package/skills/pds-knowledge-react/references/components/p-spinner/examples/SizeCssVar.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-spinner/p-spinner.md +100 -0
- package/skills/pds-knowledge-react/references/components/p-stepper-horizontal/accessibility.md +34 -0
- package/skills/pds-knowledge-react/references/components/p-stepper-horizontal/examples/Default.tsx +23 -0
- package/skills/pds-knowledge-react/references/components/p-stepper-horizontal/examples/FrameworkImplementation.tsx +100 -0
- package/skills/pds-knowledge-react/references/components/p-stepper-horizontal/p-stepper-horizontal.md +113 -0
- package/skills/pds-knowledge-react/references/components/p-switch/accessibility.md +35 -0
- package/skills/pds-knowledge-react/references/components/p-switch/examples/Default.tsx +19 -0
- package/skills/pds-knowledge-react/references/components/p-switch/p-switch.md +107 -0
- package/skills/pds-knowledge-react/references/components/p-table/accessibility.md +47 -0
- package/skills/pds-knowledge-react/references/components/p-table/examples/Advanced.tsx +186 -0
- package/skills/pds-knowledge-react/references/components/p-table/examples/CaptionProperty.tsx +37 -0
- package/skills/pds-knowledge-react/references/components/p-table/examples/CaptionSlot.tsx +40 -0
- package/skills/pds-knowledge-react/references/components/p-table/examples/Default.tsx +117 -0
- package/skills/pds-knowledge-react/references/components/p-table/examples/HideLabel.tsx +37 -0
- package/skills/pds-knowledge-react/references/components/p-table/examples/LayoutFixed.tsx +50 -0
- package/skills/pds-knowledge-react/references/components/p-table/examples/Sorting.tsx +87 -0
- package/skills/pds-knowledge-react/references/components/p-table/p-table.md +193 -0
- package/skills/pds-knowledge-react/references/components/p-tabs/accessibility.md +56 -0
- package/skills/pds-knowledge-react/references/components/p-tabs/examples/ActiveTab.tsx +26 -0
- package/skills/pds-knowledge-react/references/components/p-tabs/examples/Default.tsx +26 -0
- package/skills/pds-knowledge-react/references/components/p-tabs/examples/Gradient.tsx +111 -0
- package/skills/pds-knowledge-react/references/components/p-tabs/examples/Labelling.tsx +26 -0
- package/skills/pds-knowledge-react/references/components/p-tabs/p-tabs.md +140 -0
- package/skills/pds-knowledge-react/references/components/p-tabs-bar/accessibility.md +61 -0
- package/skills/pds-knowledge-react/references/components/p-tabs-bar/examples/Default.tsx +27 -0
- package/skills/pds-knowledge-react/references/components/p-tabs-bar/examples/Gradient.tsx +78 -0
- package/skills/pds-knowledge-react/references/components/p-tabs-bar/examples/Labelling.tsx +27 -0
- package/skills/pds-knowledge-react/references/components/p-tabs-bar/examples/Links.tsx +20 -0
- package/skills/pds-knowledge-react/references/components/p-tabs-bar/p-tabs-bar.md +185 -0
- package/skills/pds-knowledge-react/references/components/p-tag/accessibility.md +19 -0
- package/skills/pds-knowledge-react/references/components/p-tag/examples/Default.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-tag/examples/Multiline.tsx +14 -0
- package/skills/pds-knowledge-react/references/components/p-tag/examples/SlottedButton.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-tag/examples/SlottedLink.tsx +41 -0
- package/skills/pds-knowledge-react/references/components/p-tag/p-tag.md +70 -0
- package/skills/pds-knowledge-react/references/components/p-tag-dismissible/accessibility.md +35 -0
- package/skills/pds-knowledge-react/references/components/p-tag-dismissible/examples/Default.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-tag-dismissible/p-tag-dismissible.md +79 -0
- package/skills/pds-knowledge-react/references/components/p-text/accessibility.md +21 -0
- package/skills/pds-knowledge-react/references/components/p-text/examples/Default.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-text/examples/Semantics.tsx +18 -0
- package/skills/pds-knowledge-react/references/components/p-text/examples/Size.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-text/examples/SizeResponsive.tsx +12 -0
- package/skills/pds-knowledge-react/references/components/p-text/p-text.md +72 -0
- package/skills/pds-knowledge-react/references/components/p-text-list/accessibility.md +31 -0
- package/skills/pds-knowledge-react/references/components/p-text-list/examples/Default.tsx +28 -0
- package/skills/pds-knowledge-react/references/components/p-text-list/p-text-list.md +72 -0
- package/skills/pds-knowledge-react/references/components/p-textarea/accessibility.md +45 -0
- package/skills/pds-knowledge-react/references/components/p-textarea/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-textarea/examples/Form.tsx +45 -0
- package/skills/pds-knowledge-react/references/components/p-textarea/examples/Slots.tsx +39 -0
- package/skills/pds-knowledge-react/references/components/p-textarea/p-textarea.md +126 -0
- package/skills/pds-knowledge-react/references/components/p-toast/examples/Default.tsx +22 -0
- package/skills/pds-knowledge-react/references/components/p-toast/p-toast.md +61 -0
- package/skills/pds-knowledge-react/references/components/p-wordmark/accessibility.md +31 -0
- package/skills/pds-knowledge-react/references/components/p-wordmark/examples/CustomClickableArea.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-wordmark/examples/Default.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-wordmark/examples/Size.tsx +10 -0
- package/skills/pds-knowledge-react/references/components/p-wordmark/p-wordmark.md +70 -0
- package/skills/pds-knowledge-react/references/icons.md +5 -0
- package/skills/pds-knowledge-react/references/styles/emotion.md +439 -0
- package/skills/pds-knowledge-react/references/styles/scss.md +402 -0
- package/skills/pds-knowledge-react/references/styles/tailwindcss.md +356 -0
- package/skills/pds-knowledge-react/references/styles/vanilla-extract.md +444 -0
- package/skills/pds-knowledge-react/references/stylesheets.md +331 -0
- package/skills/pds-knowledge-react/references/tokens.md +323 -0
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +5 -5
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +5 -5
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -1
- package/ssr/esm/lib/components/button.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/link.wrapper.d.ts +2 -2
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { PTabsBar, type TabsBarUpdateEventDetail } from '@porsche-design-system/components-react';
|
|
4
|
+
|
|
5
|
+
export const Example = () => {
|
|
6
|
+
const [activeTabIndex, setActiveTabIndex] = useState(0);
|
|
7
|
+
|
|
8
|
+
const onUpdate = (e: CustomEvent<TabsBarUpdateEventDetail>) => {
|
|
9
|
+
setActiveTabIndex(e.detail.activeTabIndex);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<PTabsBar activeTabIndex={activeTabIndex} aria={{'aria-label': 'Some label for the tablist', 'aria-description': 'Some description for the tablist'}} onUpdate={onUpdate}>
|
|
15
|
+
<button type="button">
|
|
16
|
+
Tab 0
|
|
17
|
+
</button>
|
|
18
|
+
<button type="button">
|
|
19
|
+
Tab 1
|
|
20
|
+
</button>
|
|
21
|
+
<button type="button">
|
|
22
|
+
Tab 2
|
|
23
|
+
</button>
|
|
24
|
+
<button type="button">
|
|
25
|
+
Tab 3
|
|
26
|
+
</button>
|
|
27
|
+
<button type="button">
|
|
28
|
+
Tab 4
|
|
29
|
+
</button>
|
|
30
|
+
<button type="button">
|
|
31
|
+
Tab 5
|
|
32
|
+
</button>
|
|
33
|
+
<button type="button">
|
|
34
|
+
Tab 6
|
|
35
|
+
</button>
|
|
36
|
+
<button type="button">
|
|
37
|
+
Tab 7
|
|
38
|
+
</button>
|
|
39
|
+
<button type="button">
|
|
40
|
+
Tab 8
|
|
41
|
+
</button>
|
|
42
|
+
<button type="button">
|
|
43
|
+
Tab 9
|
|
44
|
+
</button>
|
|
45
|
+
<button type="button">
|
|
46
|
+
Tab 10
|
|
47
|
+
</button>
|
|
48
|
+
<button type="button">
|
|
49
|
+
Tab 11
|
|
50
|
+
</button>
|
|
51
|
+
<button type="button">
|
|
52
|
+
Tab 12
|
|
53
|
+
</button>
|
|
54
|
+
<button type="button">
|
|
55
|
+
Tab 13
|
|
56
|
+
</button>
|
|
57
|
+
<button type="button">
|
|
58
|
+
Tab 14
|
|
59
|
+
</button>
|
|
60
|
+
<button type="button">
|
|
61
|
+
Tab 15
|
|
62
|
+
</button>
|
|
63
|
+
<button type="button">
|
|
64
|
+
Tab 16
|
|
65
|
+
</button>
|
|
66
|
+
<button type="button">
|
|
67
|
+
Tab 17
|
|
68
|
+
</button>
|
|
69
|
+
<button type="button">
|
|
70
|
+
Tab 18
|
|
71
|
+
</button>
|
|
72
|
+
<button type="button">
|
|
73
|
+
Tab 19
|
|
74
|
+
</button>
|
|
75
|
+
</PTabsBar>
|
|
76
|
+
</>
|
|
77
|
+
)
|
|
78
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { PTabsBar, type TabsBarUpdateEventDetail } from '@porsche-design-system/components-react';
|
|
4
|
+
|
|
5
|
+
export const Example = () => {
|
|
6
|
+
const [activeTabIndex, setActiveTabIndex] = useState(0);
|
|
7
|
+
|
|
8
|
+
const onUpdate = (e: CustomEvent<TabsBarUpdateEventDetail>) => {
|
|
9
|
+
setActiveTabIndex(e.detail.activeTabIndex);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<PTabsBar activeTabIndex={activeTabIndex} aria={{'aria-label': 'Some label for the tablist', 'aria-description': 'Some description for the tablist'}} onUpdate={onUpdate}>
|
|
15
|
+
<button type="button">
|
|
16
|
+
Tab One
|
|
17
|
+
</button>
|
|
18
|
+
<button type="button">
|
|
19
|
+
Tab Two
|
|
20
|
+
</button>
|
|
21
|
+
<button type="button">
|
|
22
|
+
Tab Three
|
|
23
|
+
</button>
|
|
24
|
+
</PTabsBar>
|
|
25
|
+
</>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PTabsBar } from '@porsche-design-system/components-react';
|
|
3
|
+
|
|
4
|
+
export const Example = () => {
|
|
5
|
+
return (
|
|
6
|
+
<>
|
|
7
|
+
<PTabsBar>
|
|
8
|
+
<a href="https://porsche.com/page-1">
|
|
9
|
+
Page One
|
|
10
|
+
</a>
|
|
11
|
+
<a href="https://porsche.com/page-2">
|
|
12
|
+
Page Two
|
|
13
|
+
</a>
|
|
14
|
+
<a href="https://porsche.com/page-3">
|
|
15
|
+
Page Three
|
|
16
|
+
</a>
|
|
17
|
+
</PTabsBar>
|
|
18
|
+
</>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# p-tabs-bar
|
|
2
|
+
|
|
3
|
+
The `p-tabs-bar` component is a styled button/link list for multiple purposes. You can use it with your framework router to ensure your **window location** updates on tab click, use it for **hash routing** and displaying content accordingly to the hash, as **skip navigation** to move on a longer page or to **change the state** of another element and therefore change the appearance of your content.
|
|
4
|
+
|
|
5
|
+
The component does not handle the display of your content. If you use the component you have to manually care for the content to be rendered beneath. To help with this task the component triggers an event called `update` with the index of the active tab.
|
|
6
|
+
|
|
7
|
+
If you intend to only change content on tab-click without location changes and you are fine that the content needs to be pre-rendered then we prepared a component which also handles the correct display of content according to the active tab. Have a look at the [Tabs](../p-tabs/p-tabs.md) component.
|
|
8
|
+
|
|
9
|
+
It is a controlled component. This means it does not contain any internal state, and you are in full control over its behavior.
|
|
10
|
+
|
|
11
|
+
> **Important note**
|
|
12
|
+
>
|
|
13
|
+
> For documentation purpose we use `<button>` tags in the examples below to make them clickable without changing the route. For route changes it is mandatory to use `<a>` tags with `href` in your application. And be aware of that it's not allowed to mix and match `<button>` with `<a>` tags as direct children in the component!
|
|
14
|
+
|
|
15
|
+
Basic implementation is a tab bar with tabs to switch between the content. Just put `<button>` tags if you need to change e.g. the state on tab-click or `<a>` tags, if you also have to manipulate the window location, inside the `<p-tabs-bar>` component and it will handle all styling behaviors.
|
|
16
|
+
|
|
17
|
+
In order to get notified when the active tabs change, you need to register an event listener for the `update` event which is emitted by `p-tabs-bar`.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
### Do:
|
|
22
|
+
|
|
23
|
+
- Use as an anchor navigation to jump to a section on a longer page.
|
|
24
|
+
- Use it to switch between different stages of content.
|
|
25
|
+
- Use it to show different types of elements.
|
|
26
|
+
|
|
27
|
+
### Don't:
|
|
28
|
+
|
|
29
|
+
- Don't place more than six tabs within a group.
|
|
30
|
+
- Don't use more than two words for a tab label whenever possible.
|
|
31
|
+
- Don't use it for primary navigation.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Related Component
|
|
36
|
+
|
|
37
|
+
- [Tabs](../p-tabs/p-tabs.md)
|
|
38
|
+
- [Pagination](../p-pagination/p-pagination.md)
|
|
39
|
+
|
|
40
|
+
## Accessibility support
|
|
41
|
+
|
|
42
|
+
### Keyboard
|
|
43
|
+
|
|
44
|
+
#### Tabs Bar as a tabbed interface
|
|
45
|
+
|
|
46
|
+
| Key / state | Function |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| `Tab` | - Moves focus to the active tab. - When the tab list contains the focus, moves focus to the next element in the tab sequence, which is the `tabpanel` element. |
|
|
49
|
+
| `Right Arrow`, `Left Arrow` | - Moves focus to the next tab. - Activates the newly focused tab. - If focus is on the last tab, moves focus to the first tab. |
|
|
50
|
+
| `Home`, `End` | - Moves focus to the first/last tab and activates it. |
|
|
51
|
+
|
|
52
|
+
#### Tabs Bar as link list
|
|
53
|
+
|
|
54
|
+
| Key / state | Function |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `Tab`, `Shift-Tab` | Moves focus to next (or previous) focusable element. |
|
|
57
|
+
| `Enter` | Activates the link. |
|
|
58
|
+
|
|
59
|
+
### ARIA enhancements
|
|
60
|
+
|
|
61
|
+
#### External **ARIA** provided by the `aria` property:
|
|
62
|
+
|
|
63
|
+
| ARIA | Usage |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| `aria-label="STRING"` | Defines a string value that labels the tablist when used as a tabbed interface. |
|
|
66
|
+
| `aria-description="STRING"` | Defines a string value that adds a more detailed description of the tablist. |
|
|
67
|
+
|
|
68
|
+
The `aria` property applies only when the component is used as a **tabbed interface** with `<button>` children. It is not applied when the component is used as a **link list** with `<a>` children.
|
|
69
|
+
|
|
70
|
+
#### Internal **ARIA** that is managed by the component:
|
|
71
|
+
|
|
72
|
+
| ARIA | Usage |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `role="tablist"` | Indicates that the element serves as a container for a set of tabs. |
|
|
75
|
+
| `role="tab"` | Indicates the button serves as a tab control. |
|
|
76
|
+
| `aria-selected="BOOLEAN"` | Indicates whether the tab is selected and whether its associated tabpanel is visible. |
|
|
77
|
+
|
|
78
|
+
## Development considerations
|
|
79
|
+
|
|
80
|
+
### Labelling
|
|
81
|
+
|
|
82
|
+
When multiple tab bars appear on the same page, or when the purpose of the tabs is not clear from the visible tab labels alone, provide a descriptive accessible name for the tablist using the `aria` property, e.g.: `<p-tabs-bar aria="{ 'aria-label': 'Some label for the tablist', 'aria-description': 'Some description for the tablist' }">`.
|
|
83
|
+
|
|
84
|
+
### ARIA enhancements if used as a tabbed interface
|
|
85
|
+
|
|
86
|
+
The `p-tabs-bar` component is detached from the content (`tabpanel`) which belongs to the active tab. To be truly accessible you need to provide additional ARIA attributes, because every tab (`button`) needs an `aria-controls` attribute which points to the corresponding `id` of the `tabpanel`. The content placeholder needs the `role="tabpanel"` and the attribute `aria-labelledby` which points to the unique `id` of the corresponding tab (`button`).
|
|
87
|
+
|
|
88
|
+
You must also take care of the **focus handling** of the `tabpanel`. Therefore, the active tab panel must have a `tabindex="0"` to receive keyboard focus and the focus indicator must be styled accordingly. Use the provided focus style like this:
|
|
89
|
+
|
|
90
|
+
```html
|
|
91
|
+
<p-tabs-bar
|
|
92
|
+
aria="{ 'aria-label': 'Some label for the tablist', 'aria-description': 'Some description for the tablist' }"
|
|
93
|
+
active-tab-index="0"
|
|
94
|
+
>
|
|
95
|
+
<button type="button" id="tab-item-0" aria-controls="tab-panel-0">Tab One</button>
|
|
96
|
+
<button type="button" id="tab-item-1" aria-controls="tab-panel-1">Tab Two</button>
|
|
97
|
+
<button type="button" id="tab-item-2" aria-controls="tab-panel-2">Tab Three</button>
|
|
98
|
+
</p-tabs-bar>
|
|
99
|
+
<div id="tab-panel-0" role="tabpanel" tabindex="0" aria-labelledby="tab-item-0">
|
|
100
|
+
<p-text>Your content of Tab 1</p-text>
|
|
101
|
+
</div>
|
|
102
|
+
<div id="tab-panel-1" role="tabpanel" hidden tabindex="-1" aria-labelledby="tab-item-1">
|
|
103
|
+
<p-text>Your content of Tab 2</p-text>
|
|
104
|
+
</div>
|
|
105
|
+
<div id="tab-panel-2" role="tabpanel" hidden tabindex="-1" aria-labelledby="tab-item-2">
|
|
106
|
+
<p-text>Your content of Tab 3</p-text>
|
|
107
|
+
</div>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```scss
|
|
111
|
+
p-tabs-bar ~ [tabindex='0'][role='tabpanel'] {
|
|
112
|
+
@include pds-focus;
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### ARIA enhancements if used as a link list
|
|
117
|
+
|
|
118
|
+
#### Route based navigation
|
|
119
|
+
|
|
120
|
+
If the `p-tabs-bar` is used as a link list (navigation context), the semantics of that UI component changes completely - from a **tabbed interface** where content changes happen **on-site** to a **list of links** where content changes are **route-based**. Therefore, additional ARIA attributes **must not** be provided for tab identification. The `p-tabs-bar` component manages this also internally.
|
|
121
|
+
|
|
122
|
+
To enhance accessibility even further, wrap the `p-tabs-bar` in a `<nav>` element with an `aria-label` attribute. Additionally, an `aria-current="page"` attribute should be provided to the active link.
|
|
123
|
+
|
|
124
|
+
```html
|
|
125
|
+
<nav aria-label="Label for the navigation">
|
|
126
|
+
<p-tabs-bar>
|
|
127
|
+
<a href="https://porsche.com/page-1" aria-current="page">Page One</a>
|
|
128
|
+
<a href="https://porsche.com/page-2">Page Two</a>
|
|
129
|
+
<a href="https://porsche.com/page-3">Page Three</a>
|
|
130
|
+
</p-tabs-bar>
|
|
131
|
+
</nav>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
#### In-page jump navigation
|
|
135
|
+
|
|
136
|
+
If the `p-tabs-bar` is used as an in-page jump navigation, you should follow the same rules as for the route-based variant except that `aria-current="page"` should not be used.
|
|
137
|
+
|
|
138
|
+
### Common do's and don'ts
|
|
139
|
+
|
|
140
|
+
- **Do** pass tablist ARIA through the `aria` prop when using a tabbed interface.
|
|
141
|
+
- **Do** wrap route-based navigation in `<nav>` with a descriptive `aria-label`.
|
|
142
|
+
- **Do** wire `aria-controls`, `role="tabpanel"`, and `aria-labelledby` in the host application for tab interfaces.
|
|
143
|
+
- **Don't** add tab semantics when the component is used as a link list for route-based navigation.
|
|
144
|
+
|
|
145
|
+
## Integration examples
|
|
146
|
+
|
|
147
|
+
See [accessibility integration examples](./accessibility.md) for paired anti-pattern and recommended implementations.
|
|
148
|
+
|
|
149
|
+
## API
|
|
150
|
+
|
|
151
|
+
### Properties
|
|
152
|
+
|
|
153
|
+
| Property | Type | Default | Description |
|
|
154
|
+
| --- | --- | --- | --- |
|
|
155
|
+
| `activeTabIndex` | `number | undefined` | `undefined` | Sets the zero-based index of the currently active tab. Pass `undefined` to render all tabs in an unselected state. |
|
|
156
|
+
| `aria` | `TabsBarAriaAttribute` | `undefined` | Sets ARIA attributes on the tablist, such as `aria-label` and `aria-description`. |
|
|
157
|
+
| `background` | `'canvas'` `'surface'` `'frosted'` `'none'` | `'none'` | Sets the background color of the tabs bar. Use `frosted` only when placed on top of images, videos, or gradients. |
|
|
158
|
+
| `compact` | `boolean` | `undefined` | Reduces the tab height and padding for use in dense layouts where vertical space is limited. |
|
|
159
|
+
| `size` | `'small'` `'medium'`<br>`BreakpointCustomizable<TabsBarSize>` | `'small'` | Sets the font size of the tab labels using the PDS typographic scale. Supports responsive breakpoint values. |
|
|
160
|
+
| `weight` _(deprecated)_ | `'regular'` `'semi-bold'` | `'regular'` | @deprecated Will be removed in the next major release. Has no effect anymore. |
|
|
161
|
+
|
|
162
|
+
### Events
|
|
163
|
+
|
|
164
|
+
| Event | Type | Description |
|
|
165
|
+
| --- | --- | --- |
|
|
166
|
+
| `update` | `CustomEvent<TabsBarUpdateEventDetail>`<br>`{ activeTabIndex: number }` | Emitted when the user clicks a different tab, carrying the new `activeTabIndex` in the event detail. |
|
|
167
|
+
|
|
168
|
+
### Controlled properties
|
|
169
|
+
|
|
170
|
+
- `activeTabIndex` — a controlled prop: the component does **not** update it itself. Handle the `update` event and assign the new value to `activeTabIndex` yourself, or the change will not take effect.
|
|
171
|
+
|
|
172
|
+
### Slots
|
|
173
|
+
|
|
174
|
+
| Slot | Required | Allowed tag names | Description |
|
|
175
|
+
| --- | --- | --- | --- |
|
|
176
|
+
| _(default)_ | no | — | Default slot for the `button` or `a` tags which will be rendered as tabs. |
|
|
177
|
+
|
|
178
|
+
## Examples
|
|
179
|
+
|
|
180
|
+
| Example | When to use | File |
|
|
181
|
+
| --- | --- | --- |
|
|
182
|
+
| Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
|
|
183
|
+
| Links | If the `p-tabs-bar` is used as a link list (navigation context), the semantics of that UI component changes completely - from a **tabbed interface** where content changes happen **on-site** to a **list of links** where content changes are **route-based**. | [./examples/Links.tsx](./examples/Links.tsx) |
|
|
184
|
+
| Gradient color | If the amount of tabs exceeds the viewport, the component renders arrow-buttons to help with horizontal scrolling. | [./examples/Gradient.tsx](./examples/Gradient.tsx) |
|
|
185
|
+
| Labelling | Use the `aria` property to provide an accessible name and optional description for the tablist when the component is used as a tabbed interface with `<button>` children. | [./examples/Labelling.tsx](./examples/Labelling.tsx) |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# p-tag accessibility integration examples
|
|
2
|
+
|
|
3
|
+
## Integration examples
|
|
4
|
+
|
|
5
|
+
### Status conveyed by color and icon only
|
|
6
|
+
|
|
7
|
+
#### ❌ Anti-pattern
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
<PTag variant="success" icon="check"></PTag>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
#### ✅ Recommended
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
<PTag variant="success" icon="check">
|
|
17
|
+
Configuration saved
|
|
18
|
+
</PTag>
|
|
19
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PTag } from '@porsche-design-system/components-react';
|
|
3
|
+
|
|
4
|
+
export const Example = () => {
|
|
5
|
+
return (
|
|
6
|
+
<>
|
|
7
|
+
<div className="w-[100px]">
|
|
8
|
+
<PTag variant="success" className="whitespace-normal">
|
|
9
|
+
Some label with longer text wrapped in a narrow container
|
|
10
|
+
</PTag>
|
|
11
|
+
</div>
|
|
12
|
+
</>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PTag } from '@porsche-design-system/components-react';
|
|
3
|
+
|
|
4
|
+
export const Example = () => {
|
|
5
|
+
return (
|
|
6
|
+
<>
|
|
7
|
+
<div className="flex flex-wrap gap-static-md">
|
|
8
|
+
<PTag icon="car" variant="primary">
|
|
9
|
+
<button type="button">
|
|
10
|
+
Variant primary
|
|
11
|
+
</button>
|
|
12
|
+
</PTag>
|
|
13
|
+
<PTag variant="secondary">
|
|
14
|
+
<button type="button">
|
|
15
|
+
Variant secondary
|
|
16
|
+
</button>
|
|
17
|
+
</PTag>
|
|
18
|
+
<PTag variant="info">
|
|
19
|
+
<button type="button">
|
|
20
|
+
Variant info
|
|
21
|
+
</button>
|
|
22
|
+
</PTag>
|
|
23
|
+
<PTag variant="warning">
|
|
24
|
+
<button type="button">
|
|
25
|
+
Variant warning
|
|
26
|
+
</button>
|
|
27
|
+
</PTag>
|
|
28
|
+
<PTag variant="success">
|
|
29
|
+
<button type="button">
|
|
30
|
+
Variant success
|
|
31
|
+
</button>
|
|
32
|
+
</PTag>
|
|
33
|
+
<PTag variant="error">
|
|
34
|
+
<button type="button">
|
|
35
|
+
Variant error
|
|
36
|
+
</button>
|
|
37
|
+
</PTag>
|
|
38
|
+
</div>
|
|
39
|
+
</>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PTag } from '@porsche-design-system/components-react';
|
|
3
|
+
|
|
4
|
+
export const Example = () => {
|
|
5
|
+
return (
|
|
6
|
+
<>
|
|
7
|
+
<div className="flex flex-wrap gap-static-md">
|
|
8
|
+
<PTag icon="car" variant="primary">
|
|
9
|
+
<a href="https://porsche.com">
|
|
10
|
+
Variant primary
|
|
11
|
+
</a>
|
|
12
|
+
</PTag>
|
|
13
|
+
<PTag variant="secondary">
|
|
14
|
+
<a href="https://porsche.com">
|
|
15
|
+
Variant secondary
|
|
16
|
+
</a>
|
|
17
|
+
</PTag>
|
|
18
|
+
<PTag variant="info">
|
|
19
|
+
<a href="https://porsche.com">
|
|
20
|
+
Variant info
|
|
21
|
+
</a>
|
|
22
|
+
</PTag>
|
|
23
|
+
<PTag variant="warning">
|
|
24
|
+
<a href="https://porsche.com">
|
|
25
|
+
Variant warning
|
|
26
|
+
</a>
|
|
27
|
+
</PTag>
|
|
28
|
+
<PTag variant="success">
|
|
29
|
+
<a href="https://porsche.com">
|
|
30
|
+
Variant success
|
|
31
|
+
</a>
|
|
32
|
+
</PTag>
|
|
33
|
+
<PTag variant="error">
|
|
34
|
+
<a href="https://porsche.com">
|
|
35
|
+
Variant error
|
|
36
|
+
</a>
|
|
37
|
+
</PTag>
|
|
38
|
+
</div>
|
|
39
|
+
</>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# p-tag
|
|
2
|
+
|
|
3
|
+
`p-tag` is used to label, categorize, or organize items by using keywords that describe them.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Use tags to label, categorize, or organize items using keywords that describe them.
|
|
8
|
+
|
|
9
|
+
### Do:
|
|
10
|
+
|
|
11
|
+
- Use to indicate or highlight a certain attribute of an item.
|
|
12
|
+
- Use to show that content is mapped to one or multiple categories.
|
|
13
|
+
- Use to indicate that a certain filter is active.
|
|
14
|
+
- Use short labeling for easy scanning.
|
|
15
|
+
- Have a large number of tags horizontally scrollable, swipeable, or navigable with arrows.
|
|
16
|
+
- Have tags in a predefined space and move to the next line once they meet the boundary.
|
|
17
|
+
- Use color themes such as success, neutral, warning, and error for better visual perception
|
|
18
|
+
- Include icons to improve the faster perception.
|
|
19
|
+
- Add a link for further explanation about the tag for better understandability (With modal).
|
|
20
|
+
- Add a link for additional information that is not necessary for the task completion (With modal).
|
|
21
|
+
|
|
22
|
+
### Don't:
|
|
23
|
+
|
|
24
|
+
- Don't use more than two words (only if necessary).
|
|
25
|
+
- Don't implement something else than a link or button.
|
|
26
|
+
- Don't use Tags for navigation.
|
|
27
|
+
|
|
28
|
+
## Accessibility support
|
|
29
|
+
|
|
30
|
+
This component does not include any special accessibility features.
|
|
31
|
+
|
|
32
|
+
## Development considerations
|
|
33
|
+
|
|
34
|
+
Tags should communicate status or category in visible text. Do not rely on color or icon alone.
|
|
35
|
+
|
|
36
|
+
### Common do's and don'ts
|
|
37
|
+
|
|
38
|
+
- **Do** include descriptive text in the default slot.
|
|
39
|
+
- **Do** use color and icon as supporting cues, not the only indicator.
|
|
40
|
+
- **Don't** use an icon-only tag without visible text.
|
|
41
|
+
|
|
42
|
+
## Integration examples
|
|
43
|
+
|
|
44
|
+
See [accessibility integration examples](./accessibility.md) for paired anti-pattern and recommended implementations.
|
|
45
|
+
|
|
46
|
+
## API
|
|
47
|
+
|
|
48
|
+
### Properties
|
|
49
|
+
|
|
50
|
+
| Property | Type | Default | Description |
|
|
51
|
+
| --- | --- | --- | --- |
|
|
52
|
+
| `compact` | `boolean` | `false` | Reduces the tag's padding and height for use in dense layouts where vertical space is limited. |
|
|
53
|
+
| `icon` | `'none'`<br>one of 290 icon names — see [icon names](references/icons.md) | `'none'` | Sets the icon displayed inside the tag alongside the label. Use `none` to render the tag without an icon. |
|
|
54
|
+
| `iconSource` | `string` | `undefined` | Sets a URL to a custom SVG icon, overriding the built-in icon set when a brand-specific icon is needed. |
|
|
55
|
+
| `variant` | `'primary'` `'secondary'` `'info'` `'info-frosted'` `'warning'` `'warning-frosted'` `'success'` `'success-frosted'` `'error'` `'error-frosted'` | `'secondary'` | Sets the visual style of the tag, which controls its background and text colors (e.g. `primary`, `secondary`, `notification-info`). |
|
|
56
|
+
|
|
57
|
+
### Slots
|
|
58
|
+
|
|
59
|
+
| Slot | Required | Allowed tag names | Description |
|
|
60
|
+
| --- | --- | --- | --- |
|
|
61
|
+
| _(default)_ | no | — | Default slot for the tag content. |
|
|
62
|
+
|
|
63
|
+
## Examples
|
|
64
|
+
|
|
65
|
+
| Example | When to use | File |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
|
|
68
|
+
| With slotted button | It is possible to add a `<button>` tag into the `p-tag` component. | [./examples/SlottedButton.tsx](./examples/SlottedButton.tsx) |
|
|
69
|
+
| With slotted link | It is possible to add an `<a>` tag to the `p-tag` component. | [./examples/SlottedLink.tsx](./examples/SlottedLink.tsx) |
|
|
70
|
+
| Multiline | The contents of the `p-tag` component are rendered with `white-space: nowrap` by default. | [./examples/Multiline.tsx](./examples/Multiline.tsx) |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# p-tag-dismissible accessibility integration examples
|
|
2
|
+
|
|
3
|
+
## Integration examples
|
|
4
|
+
|
|
5
|
+
### Dismiss button ARIA on host vs aria prop
|
|
6
|
+
|
|
7
|
+
#### ❌ Anti-pattern
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
<PTagDismissible label="Sport Chrono" aria-label="Remove Sport Chrono filter"></PTagDismissible>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
#### ✅ Recommended
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
<PTagDismissible label="Sport Chrono" aria={{'aria-label': 'Remove Sport Chrono filter'}}></PTagDismissible>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Tag without descriptive label
|
|
20
|
+
|
|
21
|
+
#### ❌ Anti-pattern
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
<PTagDismissible>
|
|
25
|
+
<PIcon name="watch-sport-chrono"></PIcon>
|
|
26
|
+
</PTagDismissible>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
#### ✅ Recommended
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
<PTagDismissible label="Sport Chrono Package">
|
|
33
|
+
<PIcon name="watch-sport-chrono"></PIcon>
|
|
34
|
+
</PTagDismissible>
|
|
35
|
+
```
|
package/skills/pds-knowledge-react/references/components/p-tag-dismissible/p-tag-dismissible.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# p-tag-dismissible
|
|
2
|
+
|
|
3
|
+
`p-tag-dismissible` is used in contexts where the user can actively remove a tag. It is often seen in filtering.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Allows users to quickly refine the result of data they want to be presented on the page.
|
|
8
|
+
|
|
9
|
+
### Do:
|
|
10
|
+
|
|
11
|
+
- Use to show that a certain filter is active.
|
|
12
|
+
- Use this component with a label if additional information is needed (e.g. category an attribute/filter refers to).
|
|
13
|
+
|
|
14
|
+
### Don't:
|
|
15
|
+
|
|
16
|
+
- Don't use it for other interactions than dismissing a selection.
|
|
17
|
+
- Don't have long content that causes multiline.
|
|
18
|
+
|
|
19
|
+
## Accessibility support
|
|
20
|
+
|
|
21
|
+
### Keyboard
|
|
22
|
+
|
|
23
|
+
| Key / state | Function |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
|
|
26
|
+
| `Enter`, `Space` | Removes the element. |
|
|
27
|
+
|
|
28
|
+
### ARIA enhancements
|
|
29
|
+
|
|
30
|
+
#### External **ARIA** provided by the `aria` property:
|
|
31
|
+
|
|
32
|
+
| ARIA | Usage |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| `aria-label` | Defines a string value that labels the interactive element. |
|
|
35
|
+
|
|
36
|
+
#### Internal **ARIA** that is managed by the component:
|
|
37
|
+
|
|
38
|
+
| ARIA | Usage |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| `aria-hidden="true"` | The "close" icon is hidden from assistive technologies. |
|
|
41
|
+
|
|
42
|
+
## Development considerations
|
|
43
|
+
|
|
44
|
+
### Focus handling
|
|
45
|
+
|
|
46
|
+
Ensure that when a `p-tag-dismissible` is removed, the focus is set to the previous or next `p-tag-dismissible` or to another focusable element. This prevents losing the focus order.
|
|
47
|
+
|
|
48
|
+
### Common do's and don'ts
|
|
49
|
+
|
|
50
|
+
- **Do** provide a visible `label` that describes the tag content.
|
|
51
|
+
- **Do** pass dismiss-button ARIA through the `aria` prop when the default action text is insufficient.
|
|
52
|
+
- **Do** move focus to a sensible target after removing a tag.
|
|
53
|
+
- **Don't** add native `aria-*` attributes directly on the component host.
|
|
54
|
+
|
|
55
|
+
## Integration examples
|
|
56
|
+
|
|
57
|
+
See [accessibility integration examples](./accessibility.md) for paired anti-pattern and recommended implementations.
|
|
58
|
+
|
|
59
|
+
## API
|
|
60
|
+
|
|
61
|
+
### Properties
|
|
62
|
+
|
|
63
|
+
| Property | Type | Default | Description |
|
|
64
|
+
| --- | --- | --- | --- |
|
|
65
|
+
| `aria` | `TagDismissibleAriaAttribute` | `undefined` | Sets ARIA attributes on the dismiss button element, for example use `aria-label` to provide a descriptive close action for screen readers. |
|
|
66
|
+
| `compact` | `boolean` | `false` | Reduces the tag's padding and height for use in dense layouts where vertical space is limited. |
|
|
67
|
+
| `label` | `string` | `undefined` | Sets the visible label text displayed inside the tag alongside the dismiss button. |
|
|
68
|
+
|
|
69
|
+
### Slots
|
|
70
|
+
|
|
71
|
+
| Slot | Required | Allowed tag names | Description |
|
|
72
|
+
| --- | --- | --- | --- |
|
|
73
|
+
| _(default)_ | no | — | Default slot for the tag content. |
|
|
74
|
+
|
|
75
|
+
## Examples
|
|
76
|
+
|
|
77
|
+
| Example | When to use | File |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# p-text accessibility integration examples
|
|
2
|
+
|
|
3
|
+
## Integration examples
|
|
4
|
+
|
|
5
|
+
### Heading tag used for styling only
|
|
6
|
+
|
|
7
|
+
#### ❌ Anti-pattern
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
<PText tag="p" size="lg" weight="bold">
|
|
11
|
+
Delivery options
|
|
12
|
+
</PText>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
#### ✅ Recommended
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<PHeading tag="h2" size="lg">
|
|
19
|
+
Delivery options
|
|
20
|
+
</PHeading>
|
|
21
|
+
```
|