@porsche-design-system/components-angular 4.5.0 → 4.6.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/bin/pds-skill.js +259 -0
- package/fesm2022/porsche-design-system-components-angular.mjs.map +1 -1
- package/package.json +5 -2
- package/skill/SKILL.md +124 -0
- package/skill/references/components/p-accordion/examples/Default.ts +26 -0
- package/skill/references/components/p-accordion/examples/InteractiveElementsInSummary.ts +30 -0
- package/skill/references/components/p-accordion/examples/StickySummary.ts +26 -0
- package/skill/references/components/p-accordion/p-accordion.md +95 -0
- package/skill/references/components/p-ai-tag/examples/Default.ts +13 -0
- package/skill/references/components/p-ai-tag/examples/WithinCheckbox.ts +33 -0
- package/skill/references/components/p-ai-tag/examples/WithinFormLabel.ts +40 -0
- package/skill/references/components/p-ai-tag/examples/WithinImage.ts +16 -0
- package/skill/references/components/p-ai-tag/examples/WithinInputSearch.ts +15 -0
- package/skill/references/components/p-ai-tag/examples/WithinRadioGroup.ts +32 -0
- package/skill/references/components/p-ai-tag/examples/WithinTable.ts +94 -0
- package/skill/references/components/p-ai-tag/examples/WithinText.ts +17 -0
- package/skill/references/components/p-ai-tag/p-ai-tag.md +47 -0
- package/skill/references/components/p-banner/examples/Customization.ts +37 -0
- package/skill/references/components/p-banner/examples/Default.ts +26 -0
- package/skill/references/components/p-banner/p-banner.md +92 -0
- package/skill/references/components/p-button/examples/Default.ts +15 -0
- package/skill/references/components/p-button/examples/Form.ts +26 -0
- package/skill/references/components/p-button/examples/FormAttribute.ts +30 -0
- package/skill/references/components/p-button/p-button.md +118 -0
- package/skill/references/components/p-button-pure/examples/CustomClickableArea.ts +15 -0
- package/skill/references/components/p-button-pure/examples/Default.ts +15 -0
- package/skill/references/components/p-button-pure/examples/Form.ts +26 -0
- package/skill/references/components/p-button-pure/examples/FormAttribute.ts +30 -0
- package/skill/references/components/p-button-pure/p-button-pure.md +118 -0
- package/skill/references/components/p-button-tile/examples/ColorScheme.ts +18 -0
- package/skill/references/components/p-button-tile/examples/Default.ts +21 -0
- package/skill/references/components/p-button-tile/examples/FooterSlot.ts +32 -0
- package/skill/references/components/p-button-tile/examples/Hyphens.ts +38 -0
- package/skill/references/components/p-button-tile/examples/UiBehaviour.ts +44 -0
- package/skill/references/components/p-button-tile/p-button-tile.md +115 -0
- package/skill/references/components/p-canvas/examples/Default.ts +13 -0
- package/skill/references/components/p-canvas/p-canvas.md +91 -0
- package/skill/references/components/p-carousel/examples/Default.ts +26 -0
- package/skill/references/components/p-carousel/examples/DynamicSlides.ts +37 -0
- package/skill/references/components/p-carousel/examples/FlexibleWidths.ts +32 -0
- package/skill/references/components/p-carousel/examples/FocusOnCenterSlide.ts +65 -0
- package/skill/references/components/p-carousel/examples/Intl.ts +23 -0
- package/skill/references/components/p-carousel/examples/JumpToSlide.ts +50 -0
- package/skill/references/components/p-carousel/p-carousel.md +142 -0
- package/skill/references/components/p-checkbox/examples/Default.ts +13 -0
- package/skill/references/components/p-checkbox/examples/Form.ts +31 -0
- package/skill/references/components/p-checkbox/examples/Indeterminate.ts +16 -0
- package/skill/references/components/p-checkbox/examples/Slots.ts +57 -0
- package/skill/references/components/p-checkbox/examples/WrappedLabel.ts +27 -0
- package/skill/references/components/p-checkbox/p-checkbox.md +122 -0
- package/skill/references/components/p-crest/examples/CustomClickableArea.ts +13 -0
- package/skill/references/components/p-crest/examples/Default.ts +13 -0
- package/skill/references/components/p-crest/examples/Link.ts +13 -0
- package/skill/references/components/p-crest/p-crest.md +65 -0
- package/skill/references/components/p-display/examples/Color.ts +15 -0
- package/skill/references/components/p-display/examples/Default.ts +15 -0
- package/skill/references/components/p-display/examples/Semantics.ts +21 -0
- package/skill/references/components/p-display/examples/Size.ts +15 -0
- package/skill/references/components/p-display/examples/SizeResponsive.ts +15 -0
- package/skill/references/components/p-display/p-display.md +78 -0
- package/skill/references/components/p-divider/examples/Default.ts +13 -0
- package/skill/references/components/p-divider/examples/Responsive.ts +15 -0
- package/skill/references/components/p-divider/examples/Vertical.ts +15 -0
- package/skill/references/components/p-divider/p-divider.md +49 -0
- package/skill/references/components/p-drilldown/examples/CustomContent.ts +166 -0
- package/skill/references/components/p-drilldown/examples/Default.ts +119 -0
- package/skill/references/components/p-drilldown/p-drilldown.md +168 -0
- package/skill/references/components/p-fieldset/examples/Default.ts +15 -0
- package/skill/references/components/p-fieldset/examples/Required.ts +16 -0
- package/skill/references/components/p-fieldset/examples/SlottedLabel.ts +18 -0
- package/skill/references/components/p-fieldset/examples/SlottedMessage.ts +18 -0
- package/skill/references/components/p-fieldset/p-fieldset.md +88 -0
- package/skill/references/components/p-flag/examples/Default.ts +13 -0
- package/skill/references/components/p-flag/examples/ResponsiveSize.ts +13 -0
- package/skill/references/components/p-flag/examples/Size.ts +16 -0
- package/skill/references/components/p-flag/examples/SizeCssVar.ts +13 -0
- package/skill/references/components/p-flag/p-flag.md +68 -0
- package/skill/references/components/p-flyout/examples/CustomStyling.ts +47 -0
- package/skill/references/components/p-flyout/examples/Default.ts +44 -0
- package/skill/references/components/p-flyout/examples/Form.ts +47 -0
- package/skill/references/components/p-flyout/examples/StickyTop.ts +44 -0
- package/skill/references/components/p-flyout/p-flyout.md +128 -0
- package/skill/references/components/p-heading/examples/Color.ts +15 -0
- package/skill/references/components/p-heading/examples/Default.ts +15 -0
- package/skill/references/components/p-heading/examples/Semantics.ts +21 -0
- package/skill/references/components/p-heading/p-heading.md +78 -0
- package/skill/references/components/p-icon/examples/Color.ts +16 -0
- package/skill/references/components/p-icon/examples/ColorCssVar.ts +13 -0
- package/skill/references/components/p-icon/examples/Custom.ts +13 -0
- package/skill/references/components/p-icon/examples/Default.ts +13 -0
- package/skill/references/components/p-icon/examples/Overview.ts +591 -0
- package/skill/references/components/p-icon/examples/ResponsiveSize.ts +13 -0
- package/skill/references/components/p-icon/examples/Size.ts +16 -0
- package/skill/references/components/p-icon/examples/SizeCssVar.ts +13 -0
- package/skill/references/components/p-icon/p-icon.md +88 -0
- package/skill/references/components/p-inline-notification/examples/ActionButton.ts +29 -0
- package/skill/references/components/p-inline-notification/examples/Default.ts +13 -0
- package/skill/references/components/p-inline-notification/examples/EventHandling.ts +31 -0
- package/skill/references/components/p-inline-notification/p-inline-notification.md +74 -0
- package/skill/references/components/p-input-date/examples/Default.ts +13 -0
- package/skill/references/components/p-input-date/examples/Form.ts +31 -0
- package/skill/references/components/p-input-date/examples/Slots.ts +44 -0
- package/skill/references/components/p-input-date/p-input-date.md +138 -0
- package/skill/references/components/p-input-email/examples/Default.ts +13 -0
- package/skill/references/components/p-input-email/examples/Form.ts +31 -0
- package/skill/references/components/p-input-email/examples/Slots.ts +44 -0
- package/skill/references/components/p-input-email/p-input-email.md +142 -0
- package/skill/references/components/p-input-month/examples/Default.ts +13 -0
- package/skill/references/components/p-input-month/examples/Form.ts +31 -0
- package/skill/references/components/p-input-month/examples/Slots.ts +44 -0
- package/skill/references/components/p-input-month/p-input-month.md +138 -0
- package/skill/references/components/p-input-number/examples/Default.ts +13 -0
- package/skill/references/components/p-input-number/examples/Form.ts +31 -0
- package/skill/references/components/p-input-number/examples/Slots.ts +44 -0
- package/skill/references/components/p-input-number/p-input-number.md +146 -0
- package/skill/references/components/p-input-password/examples/Default.ts +13 -0
- package/skill/references/components/p-input-password/examples/Form.ts +31 -0
- package/skill/references/components/p-input-password/examples/Slots.ts +42 -0
- package/skill/references/components/p-input-password/examples/Toggle.ts +13 -0
- package/skill/references/components/p-input-password/p-input-password.md +141 -0
- package/skill/references/components/p-input-search/examples/AriaCombobox.ts +38 -0
- package/skill/references/components/p-input-search/examples/Default.ts +13 -0
- package/skill/references/components/p-input-search/examples/Form.ts +31 -0
- package/skill/references/components/p-input-search/examples/Slots.ts +44 -0
- package/skill/references/components/p-input-search/p-input-search.md +178 -0
- package/skill/references/components/p-input-tel/examples/Default.ts +13 -0
- package/skill/references/components/p-input-tel/examples/Form.ts +31 -0
- package/skill/references/components/p-input-tel/examples/Slots.ts +44 -0
- package/skill/references/components/p-input-tel/p-input-tel.md +141 -0
- package/skill/references/components/p-input-text/examples/Controlled.ts +36 -0
- package/skill/references/components/p-input-text/examples/Default.ts +13 -0
- package/skill/references/components/p-input-text/examples/Form.ts +31 -0
- package/skill/references/components/p-input-text/examples/Slots.ts +44 -0
- package/skill/references/components/p-input-text/p-input-text.md +146 -0
- package/skill/references/components/p-input-time/examples/Default.ts +13 -0
- package/skill/references/components/p-input-time/examples/Form.ts +31 -0
- package/skill/references/components/p-input-time/examples/Slots.ts +44 -0
- package/skill/references/components/p-input-time/p-input-time.md +140 -0
- package/skill/references/components/p-input-url/examples/Default.ts +13 -0
- package/skill/references/components/p-input-url/examples/Form.ts +31 -0
- package/skill/references/components/p-input-url/examples/Slots.ts +44 -0
- package/skill/references/components/p-input-url/p-input-url.md +141 -0
- package/skill/references/components/p-input-week/examples/Default.ts +13 -0
- package/skill/references/components/p-input-week/examples/Form.ts +31 -0
- package/skill/references/components/p-input-week/examples/Slots.ts +44 -0
- package/skill/references/components/p-input-week/p-input-week.md +138 -0
- package/skill/references/components/p-link/examples/Default.ts +15 -0
- package/skill/references/components/p-link/examples/FrameworkRouting.ts +17 -0
- package/skill/references/components/p-link/examples/Icon.ts +20 -0
- package/skill/references/components/p-link/p-link.md +101 -0
- package/skill/references/components/p-link-pure/examples/CustomClickableArea.ts +15 -0
- package/skill/references/components/p-link-pure/examples/Default.ts +15 -0
- package/skill/references/components/p-link-pure/examples/FrameworkRouting.ts +17 -0
- package/skill/references/components/p-link-pure/examples/Icon.ts +20 -0
- package/skill/references/components/p-link-pure/p-link-pure.md +110 -0
- package/skill/references/components/p-link-tile/examples/ColorScheme.ts +18 -0
- package/skill/references/components/p-link-tile/examples/Default.ts +21 -0
- package/skill/references/components/p-link-tile/examples/FooterSlot.ts +32 -0
- package/skill/references/components/p-link-tile/examples/Hyphens.ts +39 -0
- package/skill/references/components/p-link-tile/examples/UiBehaviour.ts +44 -0
- package/skill/references/components/p-link-tile/examples/WithVideo.ts +18 -0
- package/skill/references/components/p-link-tile/p-link-tile.md +105 -0
- package/skill/references/components/p-link-tile-product/examples/Default.ts +24 -0
- package/skill/references/components/p-link-tile-product/examples/FrameworkRouting.ts +27 -0
- package/skill/references/components/p-link-tile-product/p-link-tile-product.md +93 -0
- package/skill/references/components/p-modal/examples/AlertDialog.ts +41 -0
- package/skill/references/components/p-modal/examples/CustomStyling.ts +28 -0
- package/skill/references/components/p-modal/examples/Default.ts +41 -0
- package/skill/references/components/p-modal/examples/Scrollable.ts +45 -0
- package/skill/references/components/p-modal/p-modal.md +135 -0
- package/skill/references/components/p-model-signature/examples/CustomStyling.ts +17 -0
- package/skill/references/components/p-model-signature/examples/Default.ts +13 -0
- package/skill/references/components/p-model-signature/examples/MaskBlendMode.ts +35 -0
- package/skill/references/components/p-model-signature/examples/MaskImage.ts +15 -0
- package/skill/references/components/p-model-signature/examples/MaskVideo.ts +15 -0
- package/skill/references/components/p-model-signature/examples/SafeZone.ts +63 -0
- package/skill/references/components/p-model-signature/p-model-signature.md +62 -0
- package/skill/references/components/p-multi-select/examples/AsyncFilter.ts +149 -0
- package/skill/references/components/p-multi-select/examples/Default.ts +32 -0
- package/skill/references/components/p-multi-select/examples/Form.ts +38 -0
- package/skill/references/components/p-multi-select/examples/Optgroups.ts +45 -0
- package/skill/references/components/p-multi-select/examples/SelectedSlot.ts +103 -0
- package/skill/references/components/p-multi-select/examples/SetValue.ts +76 -0
- package/skill/references/components/p-multi-select/examples/Slots.ts +51 -0
- package/skill/references/components/p-multi-select/p-multi-select.md +197 -0
- package/skill/references/components/p-pagination/examples/Default.ts +13 -0
- package/skill/references/components/p-pagination/p-pagination.md +83 -0
- package/skill/references/components/p-pin-code/examples/CopyPaste.ts +13 -0
- package/skill/references/components/p-pin-code/examples/Default.ts +13 -0
- package/skill/references/components/p-pin-code/examples/Form.ts +31 -0
- package/skill/references/components/p-pin-code/examples/Slots.ts +42 -0
- package/skill/references/components/p-pin-code/p-pin-code.md +109 -0
- package/skill/references/components/p-popover/examples/Default.ts +17 -0
- package/skill/references/components/p-popover/examples/SlottedButton.ts +18 -0
- package/skill/references/components/p-popover/p-popover.md +116 -0
- package/skill/references/components/p-radio-group/examples/Default.ts +20 -0
- package/skill/references/components/p-radio-group/examples/Form.ts +38 -0
- package/skill/references/components/p-radio-group/examples/Slots.ts +72 -0
- package/skill/references/components/p-radio-group/p-radio-group.md +157 -0
- package/skill/references/components/p-scroller/examples/Default.ts +54 -0
- package/skill/references/components/p-scroller/examples/Height.ts +29 -0
- package/skill/references/components/p-scroller/examples/ScrollToPosition.ts +43 -0
- package/skill/references/components/p-scroller/p-scroller.md +93 -0
- package/skill/references/components/p-segmented-control/examples/Default.ts +29 -0
- package/skill/references/components/p-segmented-control/examples/Form.ts +37 -0
- package/skill/references/components/p-segmented-control/examples/Slots.ts +57 -0
- package/skill/references/components/p-segmented-control/examples/WithLabels.ts +29 -0
- package/skill/references/components/p-segmented-control/p-segmented-control.md +162 -0
- package/skill/references/components/p-select/examples/AsyncFilter.ts +149 -0
- package/skill/references/components/p-select/examples/Default.ts +32 -0
- package/skill/references/components/p-select/examples/Form.ts +38 -0
- package/skill/references/components/p-select/examples/Optgroups.ts +45 -0
- package/skill/references/components/p-select/examples/Required.ts +48 -0
- package/skill/references/components/p-select/examples/SelectedSlot.ts +130 -0
- package/skill/references/components/p-select/examples/SetValue.ts +71 -0
- package/skill/references/components/p-select/examples/Slots.ts +51 -0
- package/skill/references/components/p-select/examples/SlottedImages.ts +38 -0
- package/skill/references/components/p-select/p-select.md +194 -0
- package/skill/references/components/p-sheet/examples/Default.ts +33 -0
- package/skill/references/components/p-sheet/p-sheet.md +121 -0
- package/skill/references/components/p-spinner/examples/Color.ts +16 -0
- package/skill/references/components/p-spinner/examples/ColorCssVar.ts +13 -0
- package/skill/references/components/p-spinner/examples/Default.ts +13 -0
- package/skill/references/components/p-spinner/examples/ResponsiveSize.ts +13 -0
- package/skill/references/components/p-spinner/examples/Size.ts +16 -0
- package/skill/references/components/p-spinner/examples/SizeCssVar.ts +13 -0
- package/skill/references/components/p-spinner/p-spinner.md +96 -0
- package/skill/references/components/p-stepper-horizontal/examples/Default.ts +26 -0
- package/skill/references/components/p-stepper-horizontal/examples/FrameworkImplementation.ts +107 -0
- package/skill/references/components/p-stepper-horizontal/p-stepper-horizontal.md +109 -0
- package/skill/references/components/p-switch/examples/Default.ts +21 -0
- package/skill/references/components/p-switch/p-switch.md +103 -0
- package/skill/references/components/p-table/examples/Advanced.ts +162 -0
- package/skill/references/components/p-table/examples/CaptionProperty.ts +40 -0
- package/skill/references/components/p-table/examples/CaptionSlot.ts +43 -0
- package/skill/references/components/p-table/examples/Default.ts +120 -0
- package/skill/references/components/p-table/examples/HideLabel.ts +40 -0
- package/skill/references/components/p-table/examples/LayoutFixed.ts +53 -0
- package/skill/references/components/p-table/examples/Sorting.ts +79 -0
- package/skill/references/components/p-table/p-table.md +189 -0
- package/skill/references/components/p-tabs/examples/ActiveTab.ts +29 -0
- package/skill/references/components/p-tabs/examples/Default.ts +29 -0
- package/skill/references/components/p-tabs/examples/Gradient.ts +114 -0
- package/skill/references/components/p-tabs/examples/Labelling.ts +29 -0
- package/skill/references/components/p-tabs/p-tabs.md +136 -0
- package/skill/references/components/p-tabs-bar/examples/Default.ts +29 -0
- package/skill/references/components/p-tabs-bar/examples/Gradient.ts +80 -0
- package/skill/references/components/p-tabs-bar/examples/Labelling.ts +29 -0
- package/skill/references/components/p-tabs-bar/examples/Links.ts +23 -0
- package/skill/references/components/p-tabs-bar/p-tabs-bar.md +181 -0
- package/skill/references/components/p-tag/examples/Default.ts +15 -0
- package/skill/references/components/p-tag/examples/Multiline.ts +17 -0
- package/skill/references/components/p-tag/examples/SlottedButton.ts +44 -0
- package/skill/references/components/p-tag/examples/SlottedLink.ts +44 -0
- package/skill/references/components/p-tag/p-tag.md +66 -0
- package/skill/references/components/p-tag-dismissible/examples/Default.ts +15 -0
- package/skill/references/components/p-tag-dismissible/p-tag-dismissible.md +75 -0
- package/skill/references/components/p-text/examples/Default.ts +15 -0
- package/skill/references/components/p-text/examples/Semantics.ts +21 -0
- package/skill/references/components/p-text/examples/Size.ts +15 -0
- package/skill/references/components/p-text/examples/SizeResponsive.ts +15 -0
- package/skill/references/components/p-text/p-text.md +68 -0
- package/skill/references/components/p-text-list/examples/Default.ts +31 -0
- package/skill/references/components/p-text-list/p-text-list.md +68 -0
- package/skill/references/components/p-textarea/examples/Default.ts +13 -0
- package/skill/references/components/p-textarea/examples/Form.ts +31 -0
- package/skill/references/components/p-textarea/examples/Slots.ts +42 -0
- package/skill/references/components/p-textarea/p-textarea.md +122 -0
- package/skill/references/components/p-toast/examples/Default.ts +23 -0
- package/skill/references/components/p-toast/p-toast.md +61 -0
- package/skill/references/components/p-wordmark/examples/CustomClickableArea.ts +13 -0
- package/skill/references/components/p-wordmark/examples/Default.ts +13 -0
- package/skill/references/components/p-wordmark/examples/Size.ts +13 -0
- package/skill/references/components/p-wordmark/p-wordmark.md +66 -0
- package/skill/references/icons.md +5 -0
- package/skill/references/styles/emotion.md +439 -0
- package/skill/references/styles/scss.md +402 -0
- package/skill/references/styles/tailwindcss.md +356 -0
- package/skill/references/styles/vanilla-extract.md +444 -0
- package/skill/references/stylesheets.md +331 -0
- package/skill/references/tokens.md +323 -0
- package/types/porsche-design-system-components-angular.d.ts +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'porsche-design-system-app',
|
|
6
|
+
template: `
|
|
7
|
+
<p-link-pure>
|
|
8
|
+
<a href="https://porsche.com">
|
|
9
|
+
Some label
|
|
10
|
+
</a>
|
|
11
|
+
</p-link-pure>
|
|
12
|
+
`,
|
|
13
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14
|
+
standalone: true,
|
|
15
|
+
imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
|
|
16
|
+
})
|
|
17
|
+
export class ExampleComponent {}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'porsche-design-system-app',
|
|
6
|
+
template: `
|
|
7
|
+
<div class="flex gap-static-sm">
|
|
8
|
+
<p-link-pure href="https://porsche.com" icon="phone">
|
|
9
|
+
Some label
|
|
10
|
+
</p-link-pure>
|
|
11
|
+
<p-link-pure href="https://porsche.com" iconSource="assets/icon-custom-kaixin.svg" [hideLabel]="true">
|
|
12
|
+
Some label
|
|
13
|
+
</p-link-pure>
|
|
14
|
+
</div>
|
|
15
|
+
`,
|
|
16
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
17
|
+
standalone: true,
|
|
18
|
+
imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
|
|
19
|
+
})
|
|
20
|
+
export class ExampleComponent {}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# p-link-pure
|
|
2
|
+
|
|
3
|
+
The `p-link-pure` component is essential for performing changes in **page routes**. A Link Pure can be used with or without a label, but it's recommended to keep the **label visible** for better **usability** whenever possible. When used without a label, it is mandatory for **accessibility** to provide a descriptive label text for screen readers.
|
|
4
|
+
|
|
5
|
+
In case you want the user to execute an action, you should select the [Button](../p-button/p-button.md) or [Button Pure](../p-button-pure/p-button-pure.md) component instead.
|
|
6
|
+
|
|
7
|
+
You can use native `click`, `focus`, `focusin`, `blur` and `focusout` events on the `p-link-pure`.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
### Do:
|
|
12
|
+
|
|
13
|
+
- Use a Link Pure as a more subtle call to action compared to the normal Link.
|
|
14
|
+
- Use a [Button Pure](../p-button-pure/p-button-pure.md) instead of a Link Pure if you want to change a state (e.g. send form)
|
|
15
|
+
- Use a Link Pure to navigate the user to another page.
|
|
16
|
+
- Use the Icon and Text variant of Link Pure whenever possible as icons should preferably always be paired with text for better comprehensibility and accessibility.
|
|
17
|
+
- Use the Text only variant when the use of icons causes interference (e.g. in-text placement, no matching icon, complex lists or tables, alignment to elements, navigation).
|
|
18
|
+
- Use the Text only variant with an underline to ensure intuitive clickability.
|
|
19
|
+
- Use the Icon only variant only when an icon alone is sufficient to indicate the action and the user is fully aware of the function due to an expressive and internationally comprehensible icon.
|
|
20
|
+
- Use the stretch variant only on small viewports or areas (e.g. mobile views or sidebars).
|
|
21
|
+
- Use the default arrow-right-icon in most cases but replace it with another symbol if it is more appropriate.
|
|
22
|
+
- Use short and descriptive text labels within a link.
|
|
23
|
+
|
|
24
|
+
### Don't:
|
|
25
|
+
|
|
26
|
+
- Don't use Link Pure as the main call to action if you need to draw more attention to the link.
|
|
27
|
+
- Don't use Link Pure on images unless it is necessary, e.g. when using it as an additional link on image sliders or teaser images that are clickable themselves.
|
|
28
|
+
- Don't group more than two Links Pure in a row to ensure scannability and legibility.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Related components
|
|
33
|
+
|
|
34
|
+
- [Button Pure](../p-button-pure/p-button-pure.md)
|
|
35
|
+
|
|
36
|
+
## Accessibility support
|
|
37
|
+
|
|
38
|
+
### Keyboard
|
|
39
|
+
|
|
40
|
+
| Key / state | Function |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
|
|
43
|
+
| `Enter` | Activates the link. |
|
|
44
|
+
|
|
45
|
+
### ARIA enhancements
|
|
46
|
+
|
|
47
|
+
#### External **ARIA** provided by the `aria` property:
|
|
48
|
+
|
|
49
|
+
| ARIA | Usage |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `aria-label` | Defines a string value that labels the interactive element. |
|
|
52
|
+
| `aria-description` | Defines a string value that adds a more detailed description of the interactive element. |
|
|
53
|
+
| `aria-current` | Exposes the current state of the link. |
|
|
54
|
+
| `aria-haspopup` | Defines that the link opens a popup (e.g. `dialog`). |
|
|
55
|
+
|
|
56
|
+
#### Internal **ARIA** that is managed by the component:
|
|
57
|
+
|
|
58
|
+
| ARIA | Usage |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| `aria-hidden="true"` | When the `icon` prop is set, the icon is hidden from the screen reader. |
|
|
61
|
+
|
|
62
|
+
## Development considerations
|
|
63
|
+
|
|
64
|
+
### Labelling
|
|
65
|
+
|
|
66
|
+
If the text of a link does not clearly indicate what the link's target is, add a brief, descriptive label using the `aria` property with the `aria-label` value to provide more context for screen reader users. Phrases like "Detail" or "Click" can be unclear when read out of context by a screen reader. In such instances, provide an alternative text that offers more detailed information, such as "Details of product XYZ."
|
|
67
|
+
|
|
68
|
+
### Common do's and don'ts
|
|
69
|
+
|
|
70
|
+
- **Do** pass ARIA attributes via the `aria` prop, for example `aria="{ 'aria-current': 'page' }"` when indicating the current page.
|
|
71
|
+
- **Do** provide a clear accessible name for icon-only actions via slotted label or `aria` property.
|
|
72
|
+
- **Don't** add native `aria-*` attributes directly on the component host.
|
|
73
|
+
- **Don't** rely on short generic link labels like "Show" or "Add" without context.
|
|
74
|
+
|
|
75
|
+
## API
|
|
76
|
+
|
|
77
|
+
### Properties
|
|
78
|
+
|
|
79
|
+
| Property | Type | Default | Description |
|
|
80
|
+
| --- | --- | --- | --- |
|
|
81
|
+
| `active` | `boolean` | `false` | Visually marks the link as the currently active navigation item, e.g. the current page. |
|
|
82
|
+
| `alignLabel` | `'start'` `'end'`<br>`BreakpointCustomizable<LinkPureAlignLabel>` | `'end'` | Sets the label position relative to the icon — `start` places it before, `end` places it after. Supports responsive breakpoint values. |
|
|
83
|
+
| `aria` | `LinkPureAriaAttribute` | `undefined` | Sets ARIA attributes on the link element to improve accessibility for screen readers. |
|
|
84
|
+
| `color` | `'primary'` `'contrast-higher'` `'contrast-high'` `'contrast-medium'` `'inherit'` | `'primary'` | Sets the foreground color of the link's icon and label text. |
|
|
85
|
+
| `download` | `string` | `undefined` | Sets the native `download` attribute to trigger a file download. Only applies when `href` is set. |
|
|
86
|
+
| `hideLabel` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Hides the visible label while keeping it accessible to screen readers. Supports responsive breakpoint values. |
|
|
87
|
+
| `href` | `string` | `undefined` | When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element. |
|
|
88
|
+
| `icon` | `''`<br>one of 290 icon names — see [icon names](references/icons.md) | `'arrow-right'` | Sets the icon displayed next to the label. |
|
|
89
|
+
| `iconSource` | `string` | `undefined` | Sets a path to a custom SVG icon, used instead of the built-in icon set. |
|
|
90
|
+
| `rel` | `string` | `undefined` | Sets the `rel` attribute on the link (e.g. `noopener`). Only applies when `href` is set. |
|
|
91
|
+
| `size` | `'2xs'` `'xs'` `'sm'` `'md'` `'lg'` `'xl'` `'2xl'` `'3xl'` `'4xl'` `'5xl'` `'inherit'`<br>_deprecated:_ `'xx-small'` `'x-small'` `'small'` `'medium'` `'large'` `'x-large'`<br>`BreakpointCustomizable<LinkPureSize>` | `'sm'` | Sets the font size of the link label. Supports responsive breakpoint values. |
|
|
92
|
+
| `stretch` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Expands the space between icon and label to fill the full container width. Supports responsive breakpoint values. |
|
|
93
|
+
| `target` | `'_self'` `'_blank'` `'_parent'` `'_top'` `'string'` | `'_self'` | Specifies where to open the linked URL (e.g. `_self`, `_blank`). Only applies when `href` is set. |
|
|
94
|
+
| `underline` | `boolean` | `false` | Adds a text underline to the label to reinforce its link-like appearance. |
|
|
95
|
+
|
|
96
|
+
### Slots
|
|
97
|
+
|
|
98
|
+
| Slot | Required | Allowed tag names | Description |
|
|
99
|
+
| --- | --- | --- | --- |
|
|
100
|
+
| _(default)_ | no | — | Default slot to render the link label. |
|
|
101
|
+
|
|
102
|
+
## Examples
|
|
103
|
+
|
|
104
|
+
| Example | When to use | File |
|
|
105
|
+
| --- | --- | --- |
|
|
106
|
+
| Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
|
|
107
|
+
| Link with specific icon | If another icon needs to be implemented, just replace the default icon with another predefined icon. | [./examples/Icon.ts](./examples/Icon.ts) |
|
|
108
|
+
| Framework routing (anchor nesting) | To support custom anchor tags (e.g. framework specific routing) you can provide them as a **slotted element** (recommended) of the component. | [./examples/FrameworkRouting.ts](./examples/FrameworkRouting.ts) |
|
|
109
|
+
| Framework specific router with "active state" support | Examples how to use the component together with a framework specific router with "active state" support. | — |
|
|
110
|
+
| Link Pure with custom clickable/focusable area | Sometimes it might be useful to enlarge the clickable/focusable area of a link to fulfill accessibility guidelines. | [./examples/CustomClickableArea.ts](./examples/CustomClickableArea.ts) |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'porsche-design-system-app',
|
|
6
|
+
template: `
|
|
7
|
+
<p-link-tile href="https://porsche.com" label="Some label" description="Some Description" [gradient]="true">
|
|
8
|
+
<p-tag slot="header" color="background-frosted" [compact]="true" [style]="{'colorScheme': 'only light'}">
|
|
9
|
+
Some tag
|
|
10
|
+
</p-tag>
|
|
11
|
+
<img src="assets/lights.jpg" alt="Some image description" />
|
|
12
|
+
</p-link-tile>
|
|
13
|
+
`,
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
standalone: true,
|
|
16
|
+
imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
|
|
17
|
+
})
|
|
18
|
+
export class ExampleComponent {}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'porsche-design-system-app',
|
|
6
|
+
template: `
|
|
7
|
+
<p-link-tile href="https://porsche.com" label="Some label" description="Some Description" [gradient]="true">
|
|
8
|
+
<p-tag slot="header" color="background-frosted" [compact]="true">
|
|
9
|
+
Some tag
|
|
10
|
+
</p-tag>
|
|
11
|
+
<img src="assets/lights.jpg" alt="Some image description" />
|
|
12
|
+
<p-text slot="footer">
|
|
13
|
+
Some footer text
|
|
14
|
+
</p-text>
|
|
15
|
+
</p-link-tile>
|
|
16
|
+
`,
|
|
17
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
+
standalone: true,
|
|
19
|
+
imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
|
|
20
|
+
})
|
|
21
|
+
export class ExampleComponent {}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'porsche-design-system-app',
|
|
6
|
+
template: `
|
|
7
|
+
<div class="grid grid-cols-2 gap-static-md">
|
|
8
|
+
<p-link-tile href="https://porsche.com" label="Some label" description="Some Description">
|
|
9
|
+
<p-tag slot="header" color="background-frosted" [compact]="true">
|
|
10
|
+
Some tag
|
|
11
|
+
</p-tag>
|
|
12
|
+
<img src="assets/lights.jpg" alt="Some image description" />
|
|
13
|
+
<p-text slot="footer">
|
|
14
|
+
Some footer text
|
|
15
|
+
</p-text>
|
|
16
|
+
</p-link-tile>
|
|
17
|
+
<p-link-tile href="https://porsche.com" label="Some label" description="Some Description" [compact]="true">
|
|
18
|
+
<p-tag slot="header" color="background-frosted" [compact]="true">
|
|
19
|
+
Some tag
|
|
20
|
+
</p-tag>
|
|
21
|
+
<img src="assets/lights.jpg" alt="Some image description" />
|
|
22
|
+
<p-text slot="footer">
|
|
23
|
+
Some footer text
|
|
24
|
+
</p-text>
|
|
25
|
+
</p-link-tile>
|
|
26
|
+
</div>
|
|
27
|
+
`,
|
|
28
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
29
|
+
standalone: true,
|
|
30
|
+
imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
|
|
31
|
+
})
|
|
32
|
+
export class ExampleComponent {}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import {
|
|
3
|
+
PorscheDesignSystemModule,
|
|
4
|
+
PSelect,
|
|
5
|
+
type SelectChangeEventDetail,
|
|
6
|
+
} from '@porsche-design-system/components-angular';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'porsche-design-system-app',
|
|
10
|
+
template: `
|
|
11
|
+
<p-select name="hyphens" label="Select hyphens" [value]="selectedValue" (change)="onChange($event)">
|
|
12
|
+
<p-select-option value="auto">style="hyphens: auto;"</p-select-option>
|
|
13
|
+
<p-select-option value="manual">style="hyphens: manual;"</p-select-option>
|
|
14
|
+
<p-select-option value="none">style="hyphens: none;"</p-select-option>
|
|
15
|
+
</p-select>
|
|
16
|
+
|
|
17
|
+
<p-link-tile
|
|
18
|
+
href="https://porsche.com"
|
|
19
|
+
label="Some label"
|
|
20
|
+
description="An extra­ordinarily Porsche"
|
|
21
|
+
[compact]="true"
|
|
22
|
+
size="inherit"
|
|
23
|
+
[style]="{ maxWidth: '400px', fontSize: '45px', hyphens: selectedValue }"
|
|
24
|
+
class="mt-fluid-sm"
|
|
25
|
+
>
|
|
26
|
+
<img src="assets/lights.jpg" alt="Some image description" />
|
|
27
|
+
</p-link-tile>
|
|
28
|
+
`,
|
|
29
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
30
|
+
standalone: true,
|
|
31
|
+
imports: [PorscheDesignSystemModule],
|
|
32
|
+
})
|
|
33
|
+
export class ExampleComponent {
|
|
34
|
+
selectedValue: PSelect['value'] = 'auto';
|
|
35
|
+
|
|
36
|
+
onChange(e: CustomEvent<SelectChangeEventDetail>) {
|
|
37
|
+
this.selectedValue = e.detail.value;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'porsche-design-system-app',
|
|
6
|
+
template: `
|
|
7
|
+
<div class="grid grid-cols-2 gap-static-md">
|
|
8
|
+
<p-link-tile aspectRatio="4/3" href="#" label="Some Label" size="large" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.">
|
|
9
|
+
<p-tag slot="header" color="background-frosted" [compact]="true">
|
|
10
|
+
4/3
|
|
11
|
+
</p-tag>
|
|
12
|
+
<img src="assets/lights.jpg" alt="Some image description" />
|
|
13
|
+
</p-link-tile>
|
|
14
|
+
<p-link-tile aspectRatio="4/3" href="#" label="Some Label" description="Some description">
|
|
15
|
+
<p-tag slot="header" color="background-frosted" compact="true">
|
|
16
|
+
4/3
|
|
17
|
+
</p-tag>
|
|
18
|
+
<img src="assets/lights.jpg" alt="Some image description" />
|
|
19
|
+
</p-link-tile>
|
|
20
|
+
<p-link-tile aspectRatio="1/1" href="#" label="Some Label" description="Some description">
|
|
21
|
+
<p-tag slot="header" color="background-frosted" compact="true">
|
|
22
|
+
1/1
|
|
23
|
+
</p-tag>
|
|
24
|
+
<img src="assets/lights.jpg" alt="Some image description" />
|
|
25
|
+
</p-link-tile>
|
|
26
|
+
<p-link-tile aspectRatio="9/16" href="#" label="Some Label" description="Some description">
|
|
27
|
+
<p-tag slot="header" color="background-frosted" compact="true">
|
|
28
|
+
9/16
|
|
29
|
+
</p-tag>
|
|
30
|
+
<img src="assets/lights.jpg" alt="Some image description" />
|
|
31
|
+
</p-link-tile>
|
|
32
|
+
<p-link-tile aspectRatio="1/1" href="#" label="Some Label" description="Some description">
|
|
33
|
+
<p-tag slot="header" color="background-frosted" compact="true">
|
|
34
|
+
1/1
|
|
35
|
+
</p-tag>
|
|
36
|
+
<img src="assets/lights.jpg" alt="Some image description" />
|
|
37
|
+
</p-link-tile>
|
|
38
|
+
</div>
|
|
39
|
+
`,
|
|
40
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
41
|
+
standalone: true,
|
|
42
|
+
imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
|
|
43
|
+
})
|
|
44
|
+
export class ExampleComponent {}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'porsche-design-system-app',
|
|
6
|
+
template: `
|
|
7
|
+
<p-link-tile href="https://porsche.com" label="Some label" description="Some Description">
|
|
8
|
+
<p-tag slot="header" color="background-frosted" [compact]="true">
|
|
9
|
+
Some tag
|
|
10
|
+
</p-tag>
|
|
11
|
+
<video poster="assets/ocean.jpg" src="assets/ocean.mp4" loop muted autoplay aria-label="Some video description"></video>
|
|
12
|
+
</p-link-tile>
|
|
13
|
+
`,
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
standalone: true,
|
|
16
|
+
imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
|
|
17
|
+
})
|
|
18
|
+
export class ExampleComponent {}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# p-link-tile
|
|
2
|
+
|
|
3
|
+
The `p-link-tile` is a navigational component that displays a provided image to tease content and navigate to further information within one container. In case you want the user to execute an action, you should select the [Button Tile](../p-button-tile/p-button-tile.md) component instead.
|
|
4
|
+
|
|
5
|
+
**Note:** The component does not take care of processing and aligning the image.
|
|
6
|
+
|
|
7
|
+
An `<img/>`, `<picture/>` or `<video/>` tag has to be provided as default slot.
|
|
8
|
+
|
|
9
|
+
Additionally, the properties `href`, `description` and `label` are required. The `description` property is used as a teaser with a more detailed description of the link and where it leads to.
|
|
10
|
+
|
|
11
|
+
The `label` property is used to describe the anchor.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Do:
|
|
16
|
+
|
|
17
|
+
- Use Link-Tile for prominent links with appropriate aspect ratios and short descriptions (80 characters or fewer).
|
|
18
|
+
- Use [Button-Tile](../p-button-tile/p-button-tile.md) instead if you want on-page interactivity.
|
|
19
|
+
- Use basic Link-Tile for better perception tests and compact Link-Tile for improved spacing (especially on mobile).
|
|
20
|
+
- Use gradient Link-Tile when image contrast is insufficient and select images with natural contrast.
|
|
21
|
+
- Use font size for visual hierarchy and customize image type and font size for responsiveness.
|
|
22
|
+
- Use engaging verbs and product names in compact Link Tile. Create assets upfront for image processing.
|
|
23
|
+
|
|
24
|
+
### Don't:
|
|
25
|
+
|
|
26
|
+
- Don't manipulate images. Keep them natural and ensure sufficient contrast.
|
|
27
|
+
- Don't write long descriptions that overflow content (especially on mobile).
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Related components
|
|
32
|
+
|
|
33
|
+
- [Button Tile](../p-button-tile/p-button-tile.md)
|
|
34
|
+
|
|
35
|
+
## Accessibility support
|
|
36
|
+
|
|
37
|
+
### Keyboard
|
|
38
|
+
|
|
39
|
+
| Key / state | Function |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
|
|
42
|
+
| `Enter` | Activates the link. |
|
|
43
|
+
|
|
44
|
+
### ARIA enhancements
|
|
45
|
+
|
|
46
|
+
#### External **ARIA** provided by the `aria` property:
|
|
47
|
+
|
|
48
|
+
| ARIA | Usage |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| `aria-label` | Defines a string value that labels the interactive element. |
|
|
51
|
+
| `aria-description` | Defines a string value that adds a more detailed description of the interactive element. |
|
|
52
|
+
| `aria-current` | Exposes the current state of the link. |
|
|
53
|
+
| `aria-haspopup` | Defines that the link opens a popup (e.g. `dialog`). |
|
|
54
|
+
|
|
55
|
+
## Development considerations
|
|
56
|
+
|
|
57
|
+
### Labelling
|
|
58
|
+
|
|
59
|
+
If the text of a link does not clearly indicate what the link's target is, add a brief, descriptive label using the `aria` property with the `aria-label` value to provide more context for screen reader users. Phrases like "Detail" or "Click" can be unclear when read out of context by a screen reader. In such instances, provide an alternative text that offers more detailed information, such as "Details of product XYZ."
|
|
60
|
+
|
|
61
|
+
### Common do's and don'ts
|
|
62
|
+
|
|
63
|
+
- **Do** pass ARIA attributes via the `aria` prop when the visible label needs more context.
|
|
64
|
+
- **Do** provide a descriptive `label` that explains the link destination.
|
|
65
|
+
- **Do** add `aria-label` on slotted `<video>` elements used as backgrounds.
|
|
66
|
+
- **Don't** add native `aria-*` attributes directly on the component host.
|
|
67
|
+
|
|
68
|
+
## API
|
|
69
|
+
|
|
70
|
+
### Properties
|
|
71
|
+
|
|
72
|
+
| Property | Type | Default | Description |
|
|
73
|
+
| --- | --- | --- | --- |
|
|
74
|
+
| `align` | `'top'` `'bottom'` | `'bottom'` | Controls the vertical placement of the description and link — `top` or `bottom`. |
|
|
75
|
+
| `aria` | `LinkTileAriaAttribute` | `undefined` | Sets ARIA attributes on the tile's anchor element to improve accessibility for screen readers. |
|
|
76
|
+
| `aspectRatio` | `'1/1'` `'4/3'` `'3/4'` `'16/9'` `'9/16'` `'auto'`<br>`BreakpointCustomizable<LinkTileAspectRatio>` | `'4/3'` | Sets the width-to-height ratio of the tile media area. Supports responsive breakpoint values. |
|
|
77
|
+
| `compact` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Renders only the icon link without the full label. Supports responsive breakpoint values. |
|
|
78
|
+
| `description` _(required)_ | `string` | `undefined` | Sets the description text displayed in the tile's content area. |
|
|
79
|
+
| `download` | `string` | `undefined` | Sets the native `download` attribute to trigger a file download. |
|
|
80
|
+
| `gradient` | `boolean` | `false` | Shows a gradient overlay over the media slot to improve text legibility on bright images or videos. |
|
|
81
|
+
| `href` _(required)_ | `string` | `undefined` | Sets the URL the tile's anchor element navigates to when clicked. |
|
|
82
|
+
| `label` _(required)_ | `string` | `undefined` | Sets the accessible label text of the link rendered inside the tile. |
|
|
83
|
+
| `rel` | `string` | `undefined` | Sets the `rel` attribute on the link (e.g. `noopener`). |
|
|
84
|
+
| `size` | `'medium'` `'large'` `'inherit'`<br>`BreakpointCustomizable<LinkTileSize>` | `'medium'` | Sets the font size of the description text in the tile content area. Supports responsive breakpoint values. |
|
|
85
|
+
| `target` | `'_self'` `'_blank'` `'_parent'` `'_top'` `'string'` | `'_self'` | Specifies where to open the linked URL (e.g. `_self`, `_blank`). |
|
|
86
|
+
| `weight` | `'regular'` `'semi-bold'`<br>`BreakpointCustomizable<LinkTileWeight>` | `'semi-bold'` | Sets the font weight of the description text in the tile content area. Supports responsive breakpoint values. |
|
|
87
|
+
|
|
88
|
+
### Slots
|
|
89
|
+
|
|
90
|
+
| Slot | Required | Allowed tag names | Description |
|
|
91
|
+
| --- | --- | --- | --- |
|
|
92
|
+
| `header` | no | — | Renders a header section above the content area. |
|
|
93
|
+
| _(default)_ | no | — | Default slot for the img or picture tag. |
|
|
94
|
+
| `footer` | no | — | Renders a footer section below the description. |
|
|
95
|
+
|
|
96
|
+
## Examples
|
|
97
|
+
|
|
98
|
+
| Example | When to use | File |
|
|
99
|
+
| --- | --- | --- |
|
|
100
|
+
| Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
|
|
101
|
+
| With video | With video | [./examples/WithVideo.ts](./examples/WithVideo.ts) |
|
|
102
|
+
| UI behaviour | The component is able to break out of its aspect ratio in case content overflows to be accessibility compliant (see first row in example). | [./examples/UiBehaviour.ts](./examples/UiBehaviour.ts) |
|
|
103
|
+
| Hyphens | It is possible to overwrite the hyphens style on the host element and use 'soft' hyphens. | [./examples/Hyphens.ts](./examples/Hyphens.ts) |
|
|
104
|
+
| Footer slot | You can also use a `footer` slot to display additional text below the description, providing more flexibility for custom content. | [./examples/FooterSlot.ts](./examples/FooterSlot.ts) |
|
|
105
|
+
| Color scheme | The component defines `color-scheme: dark` internally, independently of the scheme defined globally or on an ancestor outside the Link Tile. | [./examples/ColorScheme.ts](./examples/ColorScheme.ts) |
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { PorscheDesignSystemModule, type LinkTileProductLikeEvent } from '@porsche-design-system/components-angular';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'porsche-design-system-app',
|
|
6
|
+
template: `
|
|
7
|
+
<p-link-tile-product [liked]="liked" heading="Some product" price="718,00 €" priceOriginal="911,00 €" description="Some description" href="https://porsche.com" (like)="onLike($event)">
|
|
8
|
+
<p-tag slot="header" color="background-base">
|
|
9
|
+
New
|
|
10
|
+
</p-tag>
|
|
11
|
+
<img src="assets/placeholder_800x900.svg" [width]="800" [height]="900" alt="Some alt text" />
|
|
12
|
+
</p-link-tile-product>
|
|
13
|
+
`,
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
standalone: true,
|
|
16
|
+
imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
|
|
17
|
+
})
|
|
18
|
+
export class ExampleComponent {
|
|
19
|
+
liked = false;
|
|
20
|
+
|
|
21
|
+
onLike(e: CustomEvent<LinkTileProductLikeEvent>) {
|
|
22
|
+
this.liked = !e.detail.liked;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { PorscheDesignSystemModule, type LinkTileProductLikeEvent } from '@porsche-design-system/components-angular';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'porsche-design-system-app',
|
|
6
|
+
template: `
|
|
7
|
+
<p-link-tile-product [liked]="liked" heading="Some product" price="718,00 €" priceOriginal="911,00 €" description="Some description" (like)="onLike($event)">
|
|
8
|
+
<a slot="anchor" href="https://porsche.com">
|
|
9
|
+
Weekender, sale price 718,00 €, original price
|
|
10
|
+
<s>
|
|
11
|
+
911,00 €
|
|
12
|
+
</s>
|
|
13
|
+
</a>
|
|
14
|
+
<img src="assets/placeholder_800x900.svg" [width]="800" [height]="900" alt="Some alt text" />
|
|
15
|
+
</p-link-tile-product>
|
|
16
|
+
`,
|
|
17
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
+
standalone: true,
|
|
19
|
+
imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
|
|
20
|
+
})
|
|
21
|
+
export class ExampleComponent {
|
|
22
|
+
liked = false;
|
|
23
|
+
|
|
24
|
+
onLike(e: CustomEvent<LinkTileProductLikeEvent>) {
|
|
25
|
+
this.liked = !e.detail.liked;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# p-link-tile-product
|
|
2
|
+
|
|
3
|
+
> **Experimental:** This component is experimental — its API may change in any release. Avoid relying on it in production.
|
|
4
|
+
|
|
5
|
+
> **Experimental Component**
|
|
6
|
+
>
|
|
7
|
+
> The `p-link-tile-product` component is experimental and might be changed or removed in a future release.
|
|
8
|
+
|
|
9
|
+
The `p-link-tile-product` is a navigational component designed to showcase a featured product within a store. it offers the option to "like" the product, allowing you to easily add it to the users wishlist. Additionally, you can place a chip at the top to signal special features about the product, such as its novelty or exclusivity.
|
|
10
|
+
|
|
11
|
+
> **Image Aspect Ratio**
|
|
12
|
+
>
|
|
13
|
+
> The image within the component has a fixed aspect ratio of 8:9. For optimal presentation, it is recommended that the supplied image adheres to the same aspect ratio of 8:9 and includes a transparent background.
|
|
14
|
+
|
|
15
|
+
An `img` or `picture` element has to be available as a child of the `p-link-tile-product` component.
|
|
16
|
+
|
|
17
|
+
The `heading` and `price` properties are required and a link must be provided, using either the `href` property or a [slotted link](./p-link-tile-product.md).
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
### Do:
|
|
22
|
+
|
|
23
|
+
- Use Link-Tile-Product to display a single product or within other products.
|
|
24
|
+
- Use the heading prop only for the product name.
|
|
25
|
+
- Use the price prop only for price and price reduction.
|
|
26
|
+
- Use description prop only for VAT or other disclaimers according to the product.
|
|
27
|
+
- Use only transparent images for the Link Tile Product.
|
|
28
|
+
- Use product images with an aspect ratio of 8:9.
|
|
29
|
+
- Use only product images with the same aspect ratio.
|
|
30
|
+
- Use Link-Tile-Products with identical sizes in one view.
|
|
31
|
+
- Use the header slot only for appropriate information such as "new" or "limited", and keep it short.
|
|
32
|
+
- Use Link-Tile-Product in a grid with other products.
|
|
33
|
+
- Use the likeButton prop to hide the likeButton when no wishlist is available.
|
|
34
|
+
|
|
35
|
+
### Don't:
|
|
36
|
+
|
|
37
|
+
- Do not manipulate product images. Keep them natural, with transparent backgrounds and sufficient contrast.
|
|
38
|
+
- Don't integrate environment into the product image, no reflection, drop shadow, or other styling effects.
|
|
39
|
+
- Don't alter the display of VAT when the display is requested, either show it for all products or don't.
|
|
40
|
+
- Don't manipulate the likeButton, this position is only reserved for this function.
|
|
41
|
+
- Don't have long product names.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Related components
|
|
46
|
+
|
|
47
|
+
- [Link Tile](../p-link-tile/p-link-tile.md)
|
|
48
|
+
|
|
49
|
+
## Accessibility support
|
|
50
|
+
|
|
51
|
+
Not yet considered due to experimental state.
|
|
52
|
+
|
|
53
|
+
## API
|
|
54
|
+
|
|
55
|
+
### Properties
|
|
56
|
+
|
|
57
|
+
| Property | Type | Default | Description |
|
|
58
|
+
| --- | --- | --- | --- |
|
|
59
|
+
| `aspectRatio` | `'3/4'` `'9/16'`<br>`BreakpointCustomizable<LinkTileProductAspectRatio>` | `'3/4'` | Sets the width-to-height ratio of the tile media area. Supports responsive breakpoint values. |
|
|
60
|
+
| `description` | `string` | `undefined` | Sets an optional short description providing additional product details below the price. |
|
|
61
|
+
| `heading` _(required)_ | `string` | `undefined` | Sets the product name displayed prominently at the top of the tile. |
|
|
62
|
+
| `href` | `string` | `undefined` | Sets the URL the tile navigates to when clicked. Alternatively, provide a slotted anchor element. |
|
|
63
|
+
| `likeButton` | `boolean` | `true` | Shows a like/bookmark button so users can save the product. |
|
|
64
|
+
| `liked` | `boolean` | `false` | Reflects whether the product is currently liked — controls the filled state of the like button. |
|
|
65
|
+
| `price` _(required)_ | `string` | `undefined` | Sets the current retail price of the product, displayed with or without a discount. |
|
|
66
|
+
| `priceOriginal` | `string` | `undefined` | Sets the original recommended retail price shown with a strikethrough to indicate a discount. Requires `price` to be set. |
|
|
67
|
+
| `rel` | `string` | `undefined` | Sets the `rel` attribute on the link (e.g. `noopener`). |
|
|
68
|
+
| `target` | `'_self'` `'_blank'` `'_parent'` `'_top'` `'string'` | `'_self'` | Specifies where to open the linked URL (e.g. `_self`, `_blank`). |
|
|
69
|
+
|
|
70
|
+
### Events
|
|
71
|
+
|
|
72
|
+
| Event | Type | Description |
|
|
73
|
+
| --- | --- | --- |
|
|
74
|
+
| `like` | `CustomEvent<LinkTileProductLikeEventDetail>`<br>`{ liked: boolean }` | Emitted when the user clicks the like button, with the new liked state in the event detail. |
|
|
75
|
+
|
|
76
|
+
### Controlled properties
|
|
77
|
+
|
|
78
|
+
- `liked` — a controlled prop: the component does **not** update it itself. Handle the `like` event and assign the new value to `liked` yourself, or the change will not take effect.
|
|
79
|
+
|
|
80
|
+
### Slots
|
|
81
|
+
|
|
82
|
+
| Slot | Required | Allowed tag names | Description |
|
|
83
|
+
| --- | --- | --- | --- |
|
|
84
|
+
| `anchor` | no | — | Slotted anchor link which can be used instead of the `href` prop. Ensure the named slot is directly on the anchor element, without nesting. |
|
|
85
|
+
| `header` | no | — | Shows special features about the product like novelty or exclusivity. Although you can pass in anything, it is recommended to use the `p-tag` component. |
|
|
86
|
+
| _(default)_ | no | — | Default slot for the img or picture tag. |
|
|
87
|
+
|
|
88
|
+
## Examples
|
|
89
|
+
|
|
90
|
+
| Example | When to use | File |
|
|
91
|
+
| --- | --- | --- |
|
|
92
|
+
| Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
|
|
93
|
+
| Framework routing (anchor nesting) | To support framework routing you can provide the link as a slotted element by using the `anchor` slot instead of using the `href` property. | [./examples/FrameworkRouting.ts](./examples/FrameworkRouting.ts) |
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'porsche-design-system-app',
|
|
6
|
+
template: `
|
|
7
|
+
<p-button type="button" [aria]="{'aria-haspopup': 'dialog'}" (click)="onClick()">
|
|
8
|
+
Open Modal
|
|
9
|
+
</p-button>
|
|
10
|
+
|
|
11
|
+
<p-modal [open]="open" [aria]="{'role': 'alertdialog'}" [disableBackdropClick]="true" (dismiss)="onDismiss()">
|
|
12
|
+
<p-heading slot="header" size="large" tag="h2">
|
|
13
|
+
Some important Heading
|
|
14
|
+
</p-heading>
|
|
15
|
+
<p-text>
|
|
16
|
+
Some important Content
|
|
17
|
+
</p-text>
|
|
18
|
+
<div slot="footer" role="group" class="flex flex-wrap gap-fluid-sm max-xs:flex-col">
|
|
19
|
+
<p-button type="button">
|
|
20
|
+
Accept
|
|
21
|
+
</p-button>
|
|
22
|
+
<p-button type="button" variant="secondary">
|
|
23
|
+
Deny
|
|
24
|
+
</p-button>
|
|
25
|
+
</div>
|
|
26
|
+
</p-modal>
|
|
27
|
+
`,
|
|
28
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
29
|
+
standalone: true,
|
|
30
|
+
imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
|
|
31
|
+
})
|
|
32
|
+
export class ExampleComponent {
|
|
33
|
+
open = false;
|
|
34
|
+
|
|
35
|
+
onClick() {
|
|
36
|
+
this.open = true;
|
|
37
|
+
}
|
|
38
|
+
onDismiss() {
|
|
39
|
+
this.open = false;
|
|
40
|
+
}
|
|
41
|
+
}
|