@porsche-design-system/components-react 4.10.0 → 4.11.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 +110 -9
- package/cjs/lib/components/link.wrapper.cjs +3 -3
- package/cjs/lib/components/popover.wrapper.cjs +3 -3
- package/cjs/lib/components/sheet.wrapper.cjs +3 -3
- package/esm/lib/components/input-search.wrapper.d.ts +2 -2
- package/esm/lib/components/link.wrapper.d.ts +10 -0
- package/esm/lib/components/link.wrapper.mjs +3 -3
- package/esm/lib/components/popover.wrapper.d.ts +10 -0
- package/esm/lib/components/popover.wrapper.mjs +3 -3
- package/esm/lib/components/sheet.wrapper.d.ts +12 -2
- package/esm/lib/components/sheet.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +7 -3
- package/package.json +2 -2
- package/skills/pds-audit-deprecations-react/SKILL.md +2 -2
- package/skills/pds-knowledge-react/SKILL.md +8 -7
- package/skills/pds-knowledge-react/references/components/p-accordion/examples/Default.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-accordion/examples/InteractiveElementsInSummary.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-accordion/examples/StickySummary.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-ai-tag/examples/WithinRadioGroup.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-ai-tag/examples/WithinTable.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-banner/examples/Customization.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-banner/p-banner.md +2 -2
- package/skills/pds-knowledge-react/references/components/p-button-pure/p-button-pure.md +9 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/p-carousel.md +1 -1
- package/skills/pds-knowledge-react/references/components/p-fieldset/p-fieldset.md +7 -9
- package/skills/pds-knowledge-react/references/components/p-flyout/examples/CustomStyling.tsx +3 -3
- package/skills/pds-knowledge-react/references/components/p-flyout/examples/Default.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-flyout/examples/StickyTop.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-inline-notification/p-inline-notification.md +1 -1
- package/skills/pds-knowledge-react/references/components/p-input-search/p-input-search.md +26 -8
- package/skills/pds-knowledge-react/references/components/p-link/examples/Cover.tsx +20 -0
- package/skills/pds-knowledge-react/references/components/p-link/p-link.md +3 -0
- package/skills/pds-knowledge-react/references/components/p-link-pure/p-link-pure.md +39 -1
- package/skills/pds-knowledge-react/references/components/p-modal/examples/AlertDialog.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-modal/examples/Default.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-modal/examples/Scrollable.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-popover/p-popover.md +4 -2
- package/skills/pds-knowledge-react/references/components/p-sheet/examples/Default.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-sheet/p-sheet.md +6 -3
- package/skills/pds-knowledge-react/references/components/p-table/examples/CaptionSlot.tsx +1 -1
- package/skills/pds-knowledge-react/references/components/p-toast/p-toast.md +2 -2
- package/skills/pds-knowledge-react/references/deprecations.md +4 -4
- package/skills/pds-knowledge-react/references/examples/patterns/feedback/dialog.md +2 -1
- package/skills/pds-knowledge-react/references/examples/patterns/feedback/inline.md +2 -1
- package/skills/pds-knowledge-react/references/examples/patterns/{footer.md → footer/extended.md} +9 -8
- package/skills/pds-knowledge-react/references/examples/patterns/footer/simple.md +75 -0
- package/skills/pds-knowledge-react/references/examples/patterns/forms/booking.md +479 -0
- package/skills/pds-knowledge-react/references/examples/patterns/forms/contact.md +211 -0
- package/skills/pds-knowledge-react/references/examples/patterns/forms/personal-details.md +253 -0
- package/skills/pds-knowledge-react/references/examples/patterns/forms/search-combobox-link-list.md +363 -0
- package/skills/pds-knowledge-react/references/examples/patterns/forms/search-combobox-option-list.md +499 -0
- package/skills/pds-knowledge-react/references/examples/patterns/header/overlay.md +2 -1
- package/skills/pds-knowledge-react/references/examples/patterns/header/stacked.md +2 -1
- package/skills/pds-knowledge-react/references/examples/patterns/popover/feature-tour.md +2 -1
- package/skills/pds-knowledge-react/references/examples/patterns/popover/local-market-switch.md +2 -1
- package/skills/pds-knowledge-react/references/examples/patterns/popover/priority-navigation.md +2 -1
- package/skills/pds-knowledge-react/references/examples/patterns/tile/call-to-action.md +71 -0
- package/skills/pds-knowledge-react/references/examples/patterns/tile/category.md +60 -0
- package/skills/pds-knowledge-react/references/examples/patterns/tile/disclosure.md +84 -0
- package/skills/pds-knowledge-react/references/examples/patterns/tile/equipment-stacked.md +54 -0
- package/skills/pds-knowledge-react/references/examples/patterns/tile/equipment.md +69 -0
- package/skills/pds-knowledge-react/references/examples/patterns/tile/image.md +64 -0
- package/skills/pds-knowledge-react/references/examples/patterns/tile/model-navigation.md +52 -0
- package/skills/pds-knowledge-react/references/examples/patterns/tile/model-selection.md +66 -0
- package/skills/pds-knowledge-react/references/examples/patterns/tile/model-teaser.md +78 -0
- package/skills/pds-knowledge-react/references/examples/patterns/tile/product.md +92 -0
- package/skills/pds-knowledge-react/references/examples/patterns/tile/vehicle-listing.md +107 -0
- package/skills/pds-knowledge-react/references/examples/patterns/tile/video.md +114 -0
- package/skills/pds-knowledge-react/references/examples/templates/admin-panel.md +1 -0
- package/skills/pds-knowledge-react/references/examples/templates/landing-page.md +4 -3
- package/skills/pds-knowledge-react/references/examples/templates/personalized-mailing/no-video.md +1166 -0
- package/skills/pds-knowledge-react/references/examples/templates/personalized-mailing/video.md +1252 -0
- package/skills/pds-knowledge-react/references/examples.md +50 -1
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +239 -70
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +424 -6
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/sheet.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/dialog-base.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.cjs +4 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/sheet.cjs +14 -3
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +239 -70
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +411 -7
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/sheet.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/dialog-base.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.mjs +5 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/sheet.mjs +15 -4
- package/ssr/esm/public-api.d.ts +8696 -5
- package/skills/pds-knowledge-react/references/components/p-input-search/examples/AriaCombobox.tsx +0 -35
- package/ssr/esm/BaseProps.d.ts +0 -2
- package/ssr/esm/getCachedMinifiedCss.d.ts +0 -23
- package/ssr/esm/hooks.d.ts +0 -15
- package/ssr/esm/lib/components/accordion.wrapper.d.ts +0 -98
- package/ssr/esm/lib/components/ai-tag.wrapper.d.ts +0 -26
- package/ssr/esm/lib/components/banner.wrapper.d.ts +0 -86
- package/ssr/esm/lib/components/button-pure.wrapper.d.ts +0 -158
- package/ssr/esm/lib/components/button-tile.wrapper.d.ts +0 -140
- package/ssr/esm/lib/components/button.wrapper.d.ts +0 -118
- package/ssr/esm/lib/components/canvas.wrapper.d.ts +0 -54
- package/ssr/esm/lib/components/carousel.wrapper.d.ts +0 -166
- package/ssr/esm/lib/components/checkbox.wrapper.d.ts +0 -160
- package/ssr/esm/lib/components/crest.wrapper.d.ts +0 -32
- package/ssr/esm/lib/components/display.wrapper.d.ts +0 -57
- package/ssr/esm/lib/components/divider.wrapper.d.ts +0 -26
- package/ssr/esm/lib/components/drilldown-item.wrapper.d.ts +0 -53
- package/ssr/esm/lib/components/drilldown-link.wrapper.d.ts +0 -60
- package/ssr/esm/lib/components/drilldown.wrapper.d.ts +0 -50
- package/ssr/esm/lib/components/fieldset.wrapper.d.ts +0 -66
- package/ssr/esm/lib/components/flag.wrapper.d.ts +0 -34
- package/ssr/esm/lib/components/flyout.wrapper.d.ts +0 -110
- package/ssr/esm/lib/components/heading.wrapper.d.ts +0 -76
- package/ssr/esm/lib/components/icon.wrapper.d.ts +0 -52
- package/ssr/esm/lib/components/index.d.ts +0 -74
- package/ssr/esm/lib/components/inline-notification.wrapper.d.ts +0 -102
- package/ssr/esm/lib/components/input-date.wrapper.d.ts +0 -200
- package/ssr/esm/lib/components/input-email.wrapper.d.ts +0 -228
- package/ssr/esm/lib/components/input-month.wrapper.d.ts +0 -200
- package/ssr/esm/lib/components/input-number.wrapper.d.ts +0 -220
- package/ssr/esm/lib/components/input-password.wrapper.d.ts +0 -210
- package/ssr/esm/lib/components/input-search.wrapper.d.ts +0 -220
- package/ssr/esm/lib/components/input-tel.wrapper.d.ts +0 -218
- package/ssr/esm/lib/components/input-text.wrapper.d.ts +0 -218
- package/ssr/esm/lib/components/input-time.wrapper.d.ts +0 -200
- package/ssr/esm/lib/components/input-url.wrapper.d.ts +0 -218
- package/ssr/esm/lib/components/input-week.wrapper.d.ts +0 -200
- package/ssr/esm/lib/components/link-pure.wrapper.d.ts +0 -138
- package/ssr/esm/lib/components/link-tile-product.wrapper.d.ts +0 -104
- package/ssr/esm/lib/components/link-tile.wrapper.d.ts +0 -126
- package/ssr/esm/lib/components/link.wrapper.d.ts +0 -98
- package/ssr/esm/lib/components/modal.wrapper.d.ts +0 -100
- package/ssr/esm/lib/components/model-signature.wrapper.d.ts +0 -68
- package/ssr/esm/lib/components/multi-select-option.wrapper.d.ts +0 -25
- package/ssr/esm/lib/components/multi-select.wrapper.d.ts +0 -156
- package/ssr/esm/lib/components/optgroup.wrapper.d.ts +0 -25
- package/ssr/esm/lib/components/pagination.wrapper.d.ts +0 -64
- package/ssr/esm/lib/components/pin-code.wrapper.d.ts +0 -160
- package/ssr/esm/lib/components/popover.wrapper.d.ts +0 -58
- package/ssr/esm/lib/components/radio-group-option.wrapper.d.ts +0 -43
- package/ssr/esm/lib/components/radio-group.wrapper.d.ts +0 -148
- package/ssr/esm/lib/components/scroller.wrapper.d.ts +0 -62
- package/ssr/esm/lib/components/segmented-control-item.wrapper.d.ts +0 -58
- package/ssr/esm/lib/components/segmented-control.wrapper.d.ts +0 -148
- package/ssr/esm/lib/components/select-option.wrapper.d.ts +0 -25
- package/ssr/esm/lib/components/select.wrapper.d.ts +0 -164
- package/ssr/esm/lib/components/sheet.wrapper.d.ts +0 -80
- package/ssr/esm/lib/components/spinner.wrapper.d.ts +0 -34
- package/ssr/esm/lib/components/stepper-horizontal-item.wrapper.d.ts +0 -26
- package/ssr/esm/lib/components/stepper-horizontal.wrapper.d.ts +0 -26
- package/ssr/esm/lib/components/switch.wrapper.d.ts +0 -94
- package/ssr/esm/lib/components/table-body.wrapper.d.ts +0 -5
- package/ssr/esm/lib/components/table-cell.wrapper.d.ts +0 -17
- package/ssr/esm/lib/components/table-head-cell.wrapper.d.ts +0 -36
- package/ssr/esm/lib/components/table-head-row.wrapper.d.ts +0 -5
- package/ssr/esm/lib/components/table-head.wrapper.d.ts +0 -5
- package/ssr/esm/lib/components/table-row.wrapper.d.ts +0 -5
- package/ssr/esm/lib/components/table.wrapper.d.ts +0 -54
- package/ssr/esm/lib/components/tabs-bar.wrapper.d.ts +0 -70
- package/ssr/esm/lib/components/tabs-item.wrapper.d.ts +0 -15
- package/ssr/esm/lib/components/tabs.wrapper.d.ts +0 -72
- package/ssr/esm/lib/components/tag-dismissible.wrapper.d.ts +0 -34
- package/ssr/esm/lib/components/tag.wrapper.d.ts +0 -46
- package/ssr/esm/lib/components/text-list-item.wrapper.d.ts +0 -5
- package/ssr/esm/lib/components/text-list.wrapper.d.ts +0 -18
- package/ssr/esm/lib/components/text.wrapper.d.ts +0 -78
- package/ssr/esm/lib/components/textarea.wrapper.d.ts +0 -238
- package/ssr/esm/lib/components/toast.wrapper.d.ts +0 -3
- package/ssr/esm/lib/components/wordmark.wrapper.d.ts +0 -42
- package/ssr/esm/lib/dsr-components/accordion.d.ts +0 -18
- package/ssr/esm/lib/dsr-components/ai-tag.d.ts +0 -6
- package/ssr/esm/lib/dsr-components/banner.d.ts +0 -20
- package/ssr/esm/lib/dsr-components/button-pure.d.ts +0 -12
- package/ssr/esm/lib/dsr-components/button-tile.d.ts +0 -12
- package/ssr/esm/lib/dsr-components/button.d.ts +0 -19
- package/ssr/esm/lib/dsr-components/canvas.d.ts +0 -23
- package/ssr/esm/lib/dsr-components/carousel.d.ts +0 -27
- package/ssr/esm/lib/dsr-components/checkbox.d.ts +0 -19
- package/ssr/esm/lib/dsr-components/crest.d.ts +0 -6
- package/ssr/esm/lib/dsr-components/dialog-base.d.ts +0 -22
- package/ssr/esm/lib/dsr-components/display.d.ts +0 -11
- package/ssr/esm/lib/dsr-components/divider.d.ts +0 -6
- package/ssr/esm/lib/dsr-components/drilldown-item.d.ts +0 -15
- package/ssr/esm/lib/dsr-components/drilldown-link.d.ts +0 -11
- package/ssr/esm/lib/dsr-components/drilldown.d.ts +0 -23
- package/ssr/esm/lib/dsr-components/fc-dismiss-button.d.ts +0 -16
- package/ssr/esm/lib/dsr-components/fieldset.d.ts +0 -11
- package/ssr/esm/lib/dsr-components/filter-status-announcer.d.ts +0 -6
- package/ssr/esm/lib/dsr-components/flag.d.ts +0 -6
- package/ssr/esm/lib/dsr-components/flyout.d.ts +0 -26
- package/ssr/esm/lib/dsr-components/heading.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/icon.d.ts +0 -6
- package/ssr/esm/lib/dsr-components/inline-notification.d.ts +0 -11
- package/ssr/esm/lib/dsr-components/input-base.d.ts +0 -38
- package/ssr/esm/lib/dsr-components/input-date.d.ts +0 -22
- package/ssr/esm/lib/dsr-components/input-email.d.ts +0 -22
- package/ssr/esm/lib/dsr-components/input-month.d.ts +0 -22
- package/ssr/esm/lib/dsr-components/input-number.d.ts +0 -22
- package/ssr/esm/lib/dsr-components/input-password.d.ts +0 -23
- package/ssr/esm/lib/dsr-components/input-search.d.ts +0 -23
- package/ssr/esm/lib/dsr-components/input-tel.d.ts +0 -22
- package/ssr/esm/lib/dsr-components/input-text.d.ts +0 -22
- package/ssr/esm/lib/dsr-components/input-time.d.ts +0 -22
- package/ssr/esm/lib/dsr-components/input-url.d.ts +0 -22
- package/ssr/esm/lib/dsr-components/input-week.d.ts +0 -22
- package/ssr/esm/lib/dsr-components/label.d.ts +0 -24
- package/ssr/esm/lib/dsr-components/link-pure.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/link-tile-product.d.ts +0 -15
- package/ssr/esm/lib/dsr-components/link-tile.d.ts +0 -12
- package/ssr/esm/lib/dsr-components/link.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/loading-message.d.ts +0 -8
- package/ssr/esm/lib/dsr-components/modal.d.ts +0 -23
- package/ssr/esm/lib/dsr-components/model-signature.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/multi-select-option.d.ts +0 -10
- package/ssr/esm/lib/dsr-components/multi-select.d.ts +0 -40
- package/ssr/esm/lib/dsr-components/no-results-option.d.ts +0 -2
- package/ssr/esm/lib/dsr-components/notification-base.d.ts +0 -14
- package/ssr/esm/lib/dsr-components/optgroup.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/pagination.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/pin-code.d.ts +0 -22
- package/ssr/esm/lib/dsr-components/popover.d.ts +0 -27
- package/ssr/esm/lib/dsr-components/radio-group-option.d.ts +0 -13
- package/ssr/esm/lib/dsr-components/radio-group.d.ts +0 -22
- package/ssr/esm/lib/dsr-components/required.d.ts +0 -2
- package/ssr/esm/lib/dsr-components/scroller.d.ts +0 -15
- package/ssr/esm/lib/dsr-components/segmented-control-item.d.ts +0 -10
- package/ssr/esm/lib/dsr-components/segmented-control.d.ts +0 -21
- package/ssr/esm/lib/dsr-components/select-option.d.ts +0 -10
- package/ssr/esm/lib/dsr-components/select.d.ts +0 -41
- package/ssr/esm/lib/dsr-components/sheet.d.ts +0 -20
- package/ssr/esm/lib/dsr-components/spinner.d.ts +0 -6
- package/ssr/esm/lib/dsr-components/state-message.d.ts +0 -10
- package/ssr/esm/lib/dsr-components/stepper-horizontal-item.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/stepper-horizontal.d.ts +0 -12
- package/ssr/esm/lib/dsr-components/switch.d.ts +0 -12
- package/ssr/esm/lib/dsr-components/table-body.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/table-cell.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/table-head-cell.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/table-head-row.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/table-head.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/table-row.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/table.d.ts +0 -10
- package/ssr/esm/lib/dsr-components/tabs-bar.d.ts +0 -17
- package/ssr/esm/lib/dsr-components/tabs-item.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/tabs.d.ts +0 -12
- package/ssr/esm/lib/dsr-components/tag-dismissible.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/tag.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/text-list-item.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/text-list.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/text.d.ts +0 -9
- package/ssr/esm/lib/dsr-components/textarea.d.ts +0 -19
- package/ssr/esm/lib/dsr-components/toast.d.ts +0 -7
- package/ssr/esm/lib/dsr-components/wordmark.d.ts +0 -6
- package/ssr/esm/lib/types.d.ts +0 -1862
- package/ssr/esm/minifyCss.d.ts +0 -1
- package/ssr/esm/provider.d.ts +0 -10
- package/ssr/esm/splitChildren.d.ts +0 -17
- package/ssr/esm/utils.d.ts +0 -4
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Tile: Category
|
|
2
|
+
|
|
3
|
+
A category tile links to a category of a shop, e.g. vehicle accessories of the Porsche Shop. The heading and an icon-only link sit at the top, the cut-out product image fills the rest of the tile up to its edges. The link stretches its clickable area over the tile, and on hover the image zooms in, unless the user prefers reduced motion.
|
|
4
|
+
|
|
5
|
+
- **Type:** Pattern
|
|
6
|
+
- **Components:** [`p-heading`](../../../components/p-heading/p-heading.md), [`p-link`](../../../components/p-link/p-link.md)
|
|
7
|
+
- **Color schemes:** light and dark – see Conventions
|
|
8
|
+
- **Conventions and stylesheet:** shared by all examples, see [examples.md](../../../examples.md)
|
|
9
|
+
|
|
10
|
+
## Markup
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<body class="bg-canvas grid content-center min-h-dvh">
|
|
15
|
+
<main id="main" class="grid-template py-fluid-lg">
|
|
16
|
+
<!--
|
|
17
|
+
- Positioned, so that its covering link spans it. The cover radius variable gives the focus indicator of that
|
|
18
|
+
link the corners of the tile.
|
|
19
|
+
- Not stretched to its row, so that content exceeding the aspect ratio extends the tile in Safari too.
|
|
20
|
+
-->
|
|
21
|
+
<div
|
|
22
|
+
class="col-basic justify-self-center w-full max-w-[400px] self-start @container group relative isolate flex flex-col aspect-3/4 rounded-3xl bg-surface pt-fluid-md [--p-link-cover-radius:var(--radius-3xl)]"
|
|
23
|
+
>
|
|
24
|
+
<div class="flex flex-wrap items-center gap-fluid-sm px-fluid-md">
|
|
25
|
+
<p-heading tag="h2" size="md">Vehicle Accessories</p-heading>
|
|
26
|
+
<!-- Covers the whole tile, so a single link names and opens it. -->
|
|
27
|
+
<p-link class="ms-auto" variant="secondary" icon="arrow-up-right" hide-label="true" compact="true" cover>
|
|
28
|
+
<a href="#">Vehicle Accessories</a>
|
|
29
|
+
</p-link>
|
|
30
|
+
</div>
|
|
31
|
+
<!--
|
|
32
|
+
- Takes the height left in the tile, but no less than a share of its width, so enlarged text extends the tile
|
|
33
|
+
rather than squeezing the image.
|
|
34
|
+
- Clips the zooming media to the corners, which the tile cannot do without cutting off the focus indicator of
|
|
35
|
+
its link.
|
|
36
|
+
- Its padding keeps the distance to the heading and is the room the image zooms into.
|
|
37
|
+
-->
|
|
38
|
+
<div class="flex-1 min-h-[80cqw] overflow-clip rounded-b-[inherit] pt-fluid-lg">
|
|
39
|
+
<!--
|
|
40
|
+
- The image is cropped at the bottom, so the lower edge of the tile cuts the product.
|
|
41
|
+
- Zooms in while the tile is hovered, unless the user prefers reduced motion.
|
|
42
|
+
-->
|
|
43
|
+
<img
|
|
44
|
+
class="size-full object-contain motion-safe:transition-[scale] duration-md ease-in-out motion-safe:group-hover:scale-105"
|
|
45
|
+
src="/examples/media/wall-charger.webp"
|
|
46
|
+
alt="A Porsche wall charger"
|
|
47
|
+
width="595"
|
|
48
|
+
height="800"
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</main>
|
|
53
|
+
<script type="module" src="main.js"></script>
|
|
54
|
+
</body>
|
|
55
|
+
</html>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Script
|
|
59
|
+
|
|
60
|
+
None – the components cover all of the behaviour.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Tile: Disclosure
|
|
2
|
+
|
|
3
|
+
A disclosure tile presents a subject with a mood image and reveals further details on demand, e.g. a feature within a model page of porsche.com. The image covers the whole tile, and a dark gradient at the bottom ensures the legibility of the heading, which is the accordion summary itself. The tile opens nothing – what it has to say stays in it, which is why it is no link, and the image dims while the details are read.
|
|
4
|
+
|
|
5
|
+
- **Type:** Pattern
|
|
6
|
+
- **Components:** [`p-accordion`](../../../components/p-accordion/p-accordion.md), [`p-heading`](../../../components/p-heading/p-heading.md), [`p-text`](../../../components/p-text/p-text.md)
|
|
7
|
+
- **Color schemes:** light and dark – see Conventions
|
|
8
|
+
- **Conventions and stylesheet:** shared by all examples, see [examples.md](../../../examples.md)
|
|
9
|
+
|
|
10
|
+
## Markup
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<body class="bg-canvas grid content-center min-h-dvh">
|
|
15
|
+
<main id="main" class="grid-template py-fluid-lg">
|
|
16
|
+
<!--
|
|
17
|
+
- The aspect ratio is a preferred size only: expanded details extend the tile beyond it.
|
|
18
|
+
- Light text on dark media, whatever the color scheme of the page.
|
|
19
|
+
- Not stretched to its row, so that content exceeding the aspect ratio extends the tile in Safari too.
|
|
20
|
+
-->
|
|
21
|
+
<div
|
|
22
|
+
id="disclosure-tile"
|
|
23
|
+
class="col-basic justify-self-center w-full max-w-[560px] self-start group relative isolate grid grid-rows-[minmax(0,1fr)_auto] aspect-4/3 rounded-3xl scheme-only-dark"
|
|
24
|
+
>
|
|
25
|
+
<!--
|
|
26
|
+
- Clips the image and its gradient, since a clipping tile could not be extended by its details.
|
|
27
|
+
- Adopts the two rows of the tile, the lower one as high as the text. Its gradient is twice as high as that
|
|
28
|
+
row, so the text lies in the dark half and stays legible on any image.
|
|
29
|
+
-->
|
|
30
|
+
<div
|
|
31
|
+
class="relative -z-1 col-start-1 row-start-1 row-span-2 grid grid-rows-subgrid overflow-clip rounded-[inherit] after:absolute after:row-start-2 after:inset-x-0 after:bottom-0 after:h-[200%] after:bg-fade-to-t"
|
|
32
|
+
>
|
|
33
|
+
<!--
|
|
34
|
+
- Decorative: it sets the mood and adds nothing to the text.
|
|
35
|
+
- Dimmed while the details are expanded, so the attention rests on them.
|
|
36
|
+
-->
|
|
37
|
+
<img
|
|
38
|
+
class="absolute inset-0 size-full object-cover motion-safe:transition-[filter] duration-md ease-in-out group-data-[open]:brightness-50"
|
|
39
|
+
src="/examples/media/lights.jpg"
|
|
40
|
+
alt
|
|
41
|
+
width="1366"
|
|
42
|
+
height="2048"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="col-start-1 row-start-2 p-fluid-md">
|
|
46
|
+
<!--
|
|
47
|
+
The heading is the summary, so subject and control are one element and the accordion carries a semantic
|
|
48
|
+
heading.
|
|
49
|
+
-->
|
|
50
|
+
<p-accordion id="disclosure-accordion" align-marker="start" compact>
|
|
51
|
+
<p-heading slot="summary" tag="h2" size="lg">Light design.¹</p-heading>
|
|
52
|
+
<div class="grid gap-static-sm">
|
|
53
|
+
<p-text>
|
|
54
|
+
Distinctive light signatures at the front and rear make the vehicle recognisable at first glance, even
|
|
55
|
+
in the dark.
|
|
56
|
+
</p-text>
|
|
57
|
+
<p-text size="2xs" color="contrast-medium">¹Optionally available.</p-text>
|
|
58
|
+
</div>
|
|
59
|
+
</p-accordion>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</main>
|
|
63
|
+
<script type="module" src="main.js"></script>
|
|
64
|
+
</body>
|
|
65
|
+
</html>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Script
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
// DO NOT USE IN PRODUCTION!
|
|
72
|
+
// EXAMPLE CODE FOR DEMONSTRATION PURPOSE ONLY.
|
|
73
|
+
|
|
74
|
+
// Behaviour of the disclosure tile: the accordion is controlled, so the page writes back the state it asks for.
|
|
75
|
+
|
|
76
|
+
const disclosureAccordion = document.getElementById('disclosure-accordion');
|
|
77
|
+
const disclosureTile = document.getElementById('disclosure-tile');
|
|
78
|
+
|
|
79
|
+
disclosureAccordion.addEventListener('update', (e) => {
|
|
80
|
+
disclosureAccordion.open = e.detail.open;
|
|
81
|
+
// The accordion keeps its state as a property rather than an attribute, so the tile carries one for the styles.
|
|
82
|
+
disclosureTile.toggleAttribute('data-open', e.detail.open);
|
|
83
|
+
});
|
|
84
|
+
```
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Tile: Equipment Stacked
|
|
2
|
+
|
|
3
|
+
The equipment tile with its two panels stacked rather than beside one another, e.g. within a column too narrow for the two halves. The photograph takes the upper panel and the text the lower one, and this version carries no action: it describes an equipment option a reader cannot act on here. Like the tile it varies, it frames both panels rather than letting the photograph reach the edges.
|
|
4
|
+
|
|
5
|
+
- **Type:** Pattern
|
|
6
|
+
- **Components:** [`p-heading`](../../../components/p-heading/p-heading.md), [`p-text`](../../../components/p-text/p-text.md)
|
|
7
|
+
- **Color schemes:** light and dark – see Conventions
|
|
8
|
+
- **Conventions and stylesheet:** shared by all examples, see [examples.md](../../../examples.md)
|
|
9
|
+
|
|
10
|
+
## Markup
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<body class="bg-canvas grid content-center min-h-dvh">
|
|
15
|
+
<main id="main" class="grid-template py-fluid-lg">
|
|
16
|
+
<!--
|
|
17
|
+
Panel radius plus padding equals the radius of the tile, so the two curves stay parallel. Nothing in the tile is
|
|
18
|
+
interactive, so no focus indicator has to stay outside the frame.
|
|
19
|
+
-->
|
|
20
|
+
<div
|
|
21
|
+
class="col-basic justify-self-center w-full max-w-[560px] flex flex-col gap-static-sm rounded-3xl bg-surface p-static-sm"
|
|
22
|
+
>
|
|
23
|
+
<!-- The photograph is cropped to the panel, so it follows its corners. -->
|
|
24
|
+
<div class="shrink-0 overflow-clip rounded-2xl">
|
|
25
|
+
<img
|
|
26
|
+
class="aspect-9/4 size-full object-cover"
|
|
27
|
+
src="/examples/media/burmester-speaker.webp"
|
|
28
|
+
alt="Perforated metal cover of a Burmester loudspeaker in a door panel trimmed in brown leather"
|
|
29
|
+
width="1696"
|
|
30
|
+
height="754"
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="flex grow flex-col gap-fluid-md p-fluid-md">
|
|
34
|
+
<div class="grid gap-static-md">
|
|
35
|
+
<p-heading tag="h2" size="lg">Burmester® High-End Surround Sound.¹</p-heading>
|
|
36
|
+
<p-text color="contrast-medium">
|
|
37
|
+
Twenty-one loudspeakers, each driven by its own amplifier channel, are placed and tuned to the acoustics
|
|
38
|
+
of this interior. The result is a sound image that stays precise at every speed, from the first row to the
|
|
39
|
+
last.
|
|
40
|
+
</p-text>
|
|
41
|
+
</div>
|
|
42
|
+
<!-- The marker ties the note to the claim it qualifies. -->
|
|
43
|
+
<p-text size="2xs" color="contrast-medium">¹Optionally available at extra cost.</p-text>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</main>
|
|
47
|
+
<script type="module" src="main.js"></script>
|
|
48
|
+
</body>
|
|
49
|
+
</html>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Script
|
|
53
|
+
|
|
54
|
+
None – the components cover all of the behaviour.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Tile: Equipment
|
|
2
|
+
|
|
3
|
+
An equipment tile describes a single option of a vehicle, e.g. within a configurator of porsche.com. A photograph of the option fills one half of the tile, its name and description the other, and a button at the bottom offers the one action the option has. The tile is not a link: unlike the other tiles of this collection it carries an action of its own rather than opening a page of its own.
|
|
4
|
+
|
|
5
|
+
- **Type:** Pattern
|
|
6
|
+
- **Components:** [`p-button`](../../../components/p-button/p-button.md), [`p-heading`](../../../components/p-heading/p-heading.md), [`p-text`](../../../components/p-text/p-text.md)
|
|
7
|
+
- **Color schemes:** light and dark – see Conventions
|
|
8
|
+
- **Conventions and stylesheet:** shared by all examples, see [examples.md](../../../examples.md)
|
|
9
|
+
|
|
10
|
+
## Markup
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<body class="bg-canvas grid content-center min-h-dvh">
|
|
15
|
+
<main id="main" class="grid-template py-fluid-lg">
|
|
16
|
+
<!-- The tile follows the width of this wrapper rather than of the window, so it fits any column. -->
|
|
17
|
+
<div class="col-basic @container">
|
|
18
|
+
<!--
|
|
19
|
+
- Panel radius plus padding equals the radius of the tile, so the two curves stay parallel.
|
|
20
|
+
- The photograph sets the height of the tile, a longer description extends it.
|
|
21
|
+
-->
|
|
22
|
+
<div class="flex flex-col gap-static-sm rounded-3xl bg-surface p-static-sm @lg:flex-row @lg:gap-0">
|
|
23
|
+
<!--
|
|
24
|
+
- The photograph is cropped to the panel, so it follows its corners.
|
|
25
|
+
- The ratio sits on the photograph rather than on the panel, where a longer description would leave empty
|
|
26
|
+
space under the photograph.
|
|
27
|
+
- Nothing separates the two panels but the padding of the text, as in the design.
|
|
28
|
+
-->
|
|
29
|
+
<div class="shrink-0 overflow-clip rounded-2xl @lg:w-1/2 @2xl:w-2/3">
|
|
30
|
+
<img
|
|
31
|
+
class="aspect-5/4 size-full object-cover"
|
|
32
|
+
src="/examples/media/anniversary-leather-seat.webp"
|
|
33
|
+
alt="Backrest of a seat in cream leather with brown bolsters and an embossed Porsche lettering"
|
|
34
|
+
width="800"
|
|
35
|
+
height="640"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
<!--
|
|
39
|
+
Beside the photograph in halves from a column of 32rem on. The third of the design only from 42rem on, since
|
|
40
|
+
it would leave a few words per line before.
|
|
41
|
+
-->
|
|
42
|
+
<div class="flex grow flex-col gap-fluid-md p-fluid-md">
|
|
43
|
+
<div class="grid gap-static-md">
|
|
44
|
+
<p-heading tag="h2" size="lg">Perforated Nappa Leather</p-heading>
|
|
45
|
+
<p-text color="contrast-medium">
|
|
46
|
+
The seats combine luxurious comfort with sporty precision. Designed for long-distance relaxation and
|
|
47
|
+
dynamic driving support, they feature ergonomic contours, premium materials, and meticulous
|
|
48
|
+
craftsmanship.
|
|
49
|
+
</p-text>
|
|
50
|
+
</div>
|
|
51
|
+
<!--
|
|
52
|
+
- The only interactive element of the tile, which is why no link covers the tile.
|
|
53
|
+
- Pushed to the lower edge of the panel, however short the description is.
|
|
54
|
+
-->
|
|
55
|
+
<p-button class="self-start mt-auto" type="button" variant="secondary" compact>
|
|
56
|
+
Available as Update
|
|
57
|
+
</p-button>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</main>
|
|
62
|
+
<script type="module" src="main.js"></script>
|
|
63
|
+
</body>
|
|
64
|
+
</html>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Script
|
|
68
|
+
|
|
69
|
+
None – the components cover all of the behaviour.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Tile: Image
|
|
2
|
+
|
|
3
|
+
An image tile links to a category with a mood image, e.g. a model range on porsche.com. The image covers the whole tile, an icon-only link sits in its upper corner, and a dark gradient at the bottom ensures the legibility of the heading. The link stretches its clickable area over the tile, and on hover the image zooms in, unless the user prefers reduced motion.
|
|
4
|
+
|
|
5
|
+
- **Type:** Pattern
|
|
6
|
+
- **Components:** [`p-heading`](../../../components/p-heading/p-heading.md), [`p-link`](../../../components/p-link/p-link.md)
|
|
7
|
+
- **Color schemes:** light and dark – see Conventions
|
|
8
|
+
- **Conventions and stylesheet:** shared by all examples, see [examples.md](../../../examples.md)
|
|
9
|
+
|
|
10
|
+
## Markup
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<body class="bg-canvas grid content-center min-h-dvh">
|
|
15
|
+
<main id="main" class="grid-template py-fluid-lg">
|
|
16
|
+
<!--
|
|
17
|
+
- Positioned, so that its covering link spans it. The cover radius variable gives the focus indicator of that
|
|
18
|
+
link the corners of the tile.
|
|
19
|
+
- Light text on dark media, whatever the color scheme of the page.
|
|
20
|
+
- Not stretched to its row, so that content exceeding the aspect ratio extends the tile in Safari too.
|
|
21
|
+
-->
|
|
22
|
+
<div
|
|
23
|
+
class="col-basic justify-self-center w-full max-w-[400px] self-start group relative isolate grid grid-rows-[minmax(0,1fr)_auto] aspect-square rounded-3xl scheme-only-dark [--p-link-cover-radius:var(--radius-3xl)]"
|
|
24
|
+
>
|
|
25
|
+
<!--
|
|
26
|
+
- Clips the zooming media to the corners, which the tile cannot do without cutting off the focus indicator of
|
|
27
|
+
its link.
|
|
28
|
+
- Adopts the two rows of the tile, the lower one as high as the text. Its gradient is twice as high as that
|
|
29
|
+
row, so the text lies in the dark half and stays legible on any image.
|
|
30
|
+
-->
|
|
31
|
+
<div
|
|
32
|
+
class="relative -z-1 col-start-1 row-start-1 row-span-2 grid grid-rows-subgrid overflow-clip rounded-[inherit] after:absolute after:row-start-2 after:inset-x-0 after:bottom-0 after:h-[200%] after:bg-fade-to-t"
|
|
33
|
+
>
|
|
34
|
+
<!-- Zooms in while the tile is hovered, unless the user prefers reduced motion. -->
|
|
35
|
+
<img
|
|
36
|
+
class="absolute inset-0 size-full object-cover motion-safe:transition-[scale] duration-md ease-in-out motion-safe:group-hover:scale-105"
|
|
37
|
+
src="/examples/media/porsche-992-carrera-s.jpg"
|
|
38
|
+
alt="Porsche 992 Carrera S"
|
|
39
|
+
width="1728"
|
|
40
|
+
height="664"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
<!-- Covers the whole tile, so a single link names and opens it. -->
|
|
44
|
+
<p-link
|
|
45
|
+
class="col-start-1 row-start-1 self-start justify-self-end mt-fluid-md me-fluid-md"
|
|
46
|
+
variant="secondary"
|
|
47
|
+
icon="arrow-up-right"
|
|
48
|
+
hide-label="true"
|
|
49
|
+
compact="true"
|
|
50
|
+
cover
|
|
51
|
+
>
|
|
52
|
+
<a href="#">911</a>
|
|
53
|
+
</p-link>
|
|
54
|
+
<div class="col-start-1 row-start-2 p-fluid-md"><p-heading tag="h2" size="xl">911</p-heading></div>
|
|
55
|
+
</div>
|
|
56
|
+
</main>
|
|
57
|
+
<script type="module" src="main.js"></script>
|
|
58
|
+
</body>
|
|
59
|
+
</html>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Script
|
|
63
|
+
|
|
64
|
+
None – the components cover all of the behaviour.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Tile: Model Navigation
|
|
2
|
+
|
|
3
|
+
A model navigation tile links to the vehicles of a model, e.g. within the navigation of the Porsche Finder. At rest, the tile is transparent and blends into the surface it is placed on. On hover, it reveals its background and moves the vehicle slightly towards the end, which follows the writing direction, unless the user prefers reduced motion.
|
|
4
|
+
|
|
5
|
+
- **Type:** Pattern
|
|
6
|
+
- **Components:** [`p-heading`](../../../components/p-heading/p-heading.md), [`p-tag`](../../../components/p-tag/p-tag.md)
|
|
7
|
+
- **Color schemes:** light and dark – see Conventions
|
|
8
|
+
- **Conventions and stylesheet:** shared by all examples, see [examples.md](../../../examples.md)
|
|
9
|
+
|
|
10
|
+
## Markup
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<body class="bg-surface grid content-center min-h-dvh">
|
|
15
|
+
<main id="main" class="grid-template py-fluid-lg">
|
|
16
|
+
<!--
|
|
17
|
+
- Positioned, so that its link can span the whole tile.
|
|
18
|
+
- No background at rest, so the tile blends into its surface until it is hovered.
|
|
19
|
+
- Not stretched to its row, so that content exceeding the aspect ratio extends the tile in Safari too.
|
|
20
|
+
-->
|
|
21
|
+
<div
|
|
22
|
+
class="col-basic justify-self-center w-full max-w-[560px] self-start group relative isolate flex flex-col justify-between gap-fluid-xs aspect-16/9 rounded-3xl p-fluid-md motion-safe:transition-colors duration-sm ease-in-out hover:bg-canvas"
|
|
23
|
+
>
|
|
24
|
+
<!-- Spans the tile above its content, so the whole tile is clickable. Its text is for screen readers only. -->
|
|
25
|
+
<a href="#" class="absolute inset-0 z-1 rounded-[inherit] focus-visible:outline outline-focus outline-offset-2">
|
|
26
|
+
<span class="sr-only">718</span>
|
|
27
|
+
</a>
|
|
28
|
+
<p-heading tag="h2" size="md">718</p-heading>
|
|
29
|
+
<!--
|
|
30
|
+
- Decorative, since the tile already names the model.
|
|
31
|
+
- Its width is a share of the tile, so the vehicle keeps its scale at every size.
|
|
32
|
+
- Moves into the room beside it while the tile is hovered, mirrored for right to left, unless the user prefers
|
|
33
|
+
reduced motion.
|
|
34
|
+
-->
|
|
35
|
+
<img
|
|
36
|
+
class="self-center w-4/5 motion-safe:transition-[translate] duration-md ease-in-out motion-safe:group-hover:translate-x-static-md motion-safe:rtl:group-hover:-translate-x-static-md"
|
|
37
|
+
src="/examples/media/718-gt4-rs-side-view.webp"
|
|
38
|
+
alt
|
|
39
|
+
width="1000"
|
|
40
|
+
height="313"
|
|
41
|
+
/>
|
|
42
|
+
<p-tag>Petrol</p-tag>
|
|
43
|
+
</div>
|
|
44
|
+
</main>
|
|
45
|
+
<script type="module" src="main.js"></script>
|
|
46
|
+
</body>
|
|
47
|
+
</html>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Script
|
|
51
|
+
|
|
52
|
+
None – the components cover all of the behaviour.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Tile: Model Selection
|
|
2
|
+
|
|
3
|
+
A model selection lets users pick a model range as entry point, e.g. to browse the available vehicles of the Porsche Finder. The tile shows the model signature and a side view of the vehicle, while a link stretched over the tile makes it clickable as a whole, with the model name as its label for screen readers. On hover, the vehicle zooms in, unless the user prefers reduced motion.
|
|
4
|
+
|
|
5
|
+
- **Type:** Pattern
|
|
6
|
+
- **Components:** [`p-model-signature`](../../../components/p-model-signature/p-model-signature.md)
|
|
7
|
+
- **Color schemes:** light and dark – see Conventions
|
|
8
|
+
- **Conventions and stylesheet:** shared by all examples, see [examples.md](../../../examples.md)
|
|
9
|
+
|
|
10
|
+
## Markup
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<body class="bg-surface grid content-center min-h-dvh">
|
|
15
|
+
<main id="main" class="grid-template py-fluid-lg">
|
|
16
|
+
<!--
|
|
17
|
+
- Positioned, so that its link can span the whole tile.
|
|
18
|
+
- Not stretched to its row, so that content exceeding the aspect ratio extends the tile in Safari too.
|
|
19
|
+
-->
|
|
20
|
+
<div
|
|
21
|
+
class="col-basic justify-self-center w-full max-w-[560px] self-start group relative isolate grid place-items-center aspect-16/9 rounded-3xl bg-canvas p-fluid-md"
|
|
22
|
+
>
|
|
23
|
+
<!--
|
|
24
|
+
- The vehicle covers the lower part of the signature, which takes the surface color to stand out subtly from
|
|
25
|
+
the canvas of the tile.
|
|
26
|
+
- Its width is a share of the tile, so the vehicle keeps its scale at every size.
|
|
27
|
+
-->
|
|
28
|
+
<div class="grid grid-cols-1 w-4/5">
|
|
29
|
+
<!--
|
|
30
|
+
Signatures differ in width, Panamera being almost three times as wide as 911. The share below suits the
|
|
31
|
+
narrow ones: set it anew for another model.
|
|
32
|
+
-->
|
|
33
|
+
<p-model-signature
|
|
34
|
+
class="[grid-area:1/1] justify-self-center [--p-model-signature-width:85%] [--p-model-signature-color:var(--color-surface)]"
|
|
35
|
+
model="911"
|
|
36
|
+
safe-zone="false"
|
|
37
|
+
></p-model-signature>
|
|
38
|
+
<!--
|
|
39
|
+
- Decorative, since the tile already names the model.
|
|
40
|
+
- Zooms in while the tile is hovered, unless the user prefers reduced motion.
|
|
41
|
+
-->
|
|
42
|
+
<img
|
|
43
|
+
class="[grid-area:1/1] z-1 w-full motion-safe:transition-[scale] duration-md ease-in-out motion-safe:group-hover:scale-105"
|
|
44
|
+
src="/examples/media/911-gts-side-view.webp"
|
|
45
|
+
alt
|
|
46
|
+
width="1280"
|
|
47
|
+
height="459"
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
<!--
|
|
51
|
+
- Spans the tile above its content, so the whole tile is clickable. Its text is for screen readers only.
|
|
52
|
+
- It follows the vehicle, which shares its stacking order, so that the link stays on top.
|
|
53
|
+
-->
|
|
54
|
+
<a href="#" class="absolute inset-0 z-1 rounded-[inherit] focus-visible:outline outline-focus outline-offset-2">
|
|
55
|
+
<span class="sr-only">Porsche 911</span>
|
|
56
|
+
</a>
|
|
57
|
+
</div>
|
|
58
|
+
</main>
|
|
59
|
+
<script type="module" src="main.js"></script>
|
|
60
|
+
</body>
|
|
61
|
+
</html>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Script
|
|
65
|
+
|
|
66
|
+
None – the components cover all of the behaviour.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Tile: Model Teaser
|
|
2
|
+
|
|
3
|
+
A model teaser introduces a model range with its starting price and links to discover and configure it, e.g. on the homepage of porsche.com. The side view of the vehicle overlaps the model signature behind it, followed by a heading, the price and the two links. The link to discover the model stretches its clickable area over the tile, while the link to configure it stays an independent action above it. On hover, the vehicle zooms in, unless the user prefers reduced motion.
|
|
4
|
+
|
|
5
|
+
- **Type:** Pattern
|
|
6
|
+
- **Components:** [`p-heading`](../../../components/p-heading/p-heading.md), [`p-link`](../../../components/p-link/p-link.md), [`p-model-signature`](../../../components/p-model-signature/p-model-signature.md), [`p-text`](../../../components/p-text/p-text.md)
|
|
7
|
+
- **Color schemes:** light and dark – see Conventions
|
|
8
|
+
- **Conventions and stylesheet:** shared by all examples, see [examples.md](../../../examples.md)
|
|
9
|
+
|
|
10
|
+
## Markup
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<body class="bg-canvas grid content-center min-h-dvh">
|
|
15
|
+
<main id="main" class="grid-template py-fluid-lg">
|
|
16
|
+
<!--
|
|
17
|
+
- Positioned, so that its covering link spans it. The cover radius variable gives the focus indicator of that
|
|
18
|
+
link the corners of the tile.
|
|
19
|
+
- Not stretched to its row, so that content exceeding the aspect ratio extends the tile in Safari too.
|
|
20
|
+
- Its content follows the width of the tile rather than of the window, so it fits any column.
|
|
21
|
+
-->
|
|
22
|
+
<div
|
|
23
|
+
class="col-basic self-start @container group relative isolate flex flex-col items-center justify-center gap-fluid-md aspect-16/9 rounded-3xl bg-surface p-fluid-lg [--p-link-cover-radius:var(--radius-3xl)]"
|
|
24
|
+
>
|
|
25
|
+
<!--
|
|
26
|
+
- The vehicle covers the lower part of the signature without being moved, since its image keeps free room
|
|
27
|
+
above the roof. The signature takes the canvas color to stand out subtly from the surface of the tile.
|
|
28
|
+
- As wide as a narrow tile allows. From 20rem inside the padding on, a share of the tile, so the vehicle keeps
|
|
29
|
+
its scale.
|
|
30
|
+
-->
|
|
31
|
+
<div class="grid grid-cols-1 w-full @xs:w-4/5">
|
|
32
|
+
<!--
|
|
33
|
+
Signatures differ in width, Panamera being almost three times as wide as 911. The share below suits the
|
|
34
|
+
narrow ones: set it anew for another model.
|
|
35
|
+
-->
|
|
36
|
+
<p-model-signature
|
|
37
|
+
class="[grid-area:1/1] justify-self-center [--p-model-signature-width:65%] [--p-model-signature-color:var(--color-canvas)]"
|
|
38
|
+
model="911"
|
|
39
|
+
safe-zone="false"
|
|
40
|
+
></p-model-signature>
|
|
41
|
+
<!--
|
|
42
|
+
- Decorative, since the tile already names the model.
|
|
43
|
+
- Zooms in while the tile is hovered, unless the user prefers reduced motion.
|
|
44
|
+
-->
|
|
45
|
+
<img
|
|
46
|
+
class="[grid-area:1/1] z-1 w-full motion-safe:transition-[scale] duration-md ease-in-out motion-safe:group-hover:scale-105"
|
|
47
|
+
src="/examples/media/911-gts-side-view.webp"
|
|
48
|
+
alt
|
|
49
|
+
width="1280"
|
|
50
|
+
height="459"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="grid gap-static-xs">
|
|
54
|
+
<p-heading tag="h2" size="md" align="center">The iconic sports car with rear engine</p-heading>
|
|
55
|
+
<p-text size="xs" color="contrast-medium" align="center">From €123,456.00* or €1,234.00/month*</p-text>
|
|
56
|
+
</div>
|
|
57
|
+
<!-- Stacked at full width in a narrow tile, where two buttons side by side would not fit. -->
|
|
58
|
+
<div class="flex flex-col w-full gap-static-md @xs:w-auto @xs:flex-row @xs:flex-wrap @xs:justify-center">
|
|
59
|
+
<!-- Covers the whole tile, so a single link names and opens it. -->
|
|
60
|
+
<p-link variant="primary" cover><a href="#">Discover 911</a></p-link>
|
|
61
|
+
<!--
|
|
62
|
+
- Placed above the link spanning the tile, so it stays clickable on its own.
|
|
63
|
+
- Its accessible name identifies the model and contains the label it shows.
|
|
64
|
+
-->
|
|
65
|
+
<p-link class="relative z-2" variant="secondary" href="#" aria="{ 'aria-label': 'Configure 911' }">
|
|
66
|
+
Configure
|
|
67
|
+
</p-link>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</main>
|
|
71
|
+
<script type="module" src="main.js"></script>
|
|
72
|
+
</body>
|
|
73
|
+
</html>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Script
|
|
77
|
+
|
|
78
|
+
None – the components cover all of the behaviour.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Tile: Product
|
|
2
|
+
|
|
3
|
+
A product tile links to the detail page of a product, e.g. within a product list of the Porsche Shop. It shows a tag and a button to add the product to the wishlist, the product image, the available colors, the name and the price. A link stretched over the tile, labelled with the product name for screen readers, makes it clickable as a whole, while the wishlist button and the color swatches stay independent actions above it. On hover, the image zooms in, unless the user prefers reduced motion.
|
|
4
|
+
|
|
5
|
+
- **Type:** Pattern
|
|
6
|
+
- **Components:** [`p-button-pure`](../../../components/p-button-pure/p-button-pure.md), [`p-tag`](../../../components/p-tag/p-tag.md), [`p-text`](../../../components/p-text/p-text.md)
|
|
7
|
+
- **Color schemes:** light and dark – see Conventions
|
|
8
|
+
- **Conventions and stylesheet:** shared by all examples, see [examples.md](../../../examples.md)
|
|
9
|
+
|
|
10
|
+
## Markup
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<body class="bg-canvas grid content-center min-h-dvh">
|
|
15
|
+
<main id="main" class="grid-template py-fluid-lg">
|
|
16
|
+
<!--
|
|
17
|
+
- Positioned, so that its link can span the whole tile.
|
|
18
|
+
- Not stretched to its row, so that content exceeding the aspect ratio extends the tile in Safari too.
|
|
19
|
+
-->
|
|
20
|
+
<div
|
|
21
|
+
class="col-basic justify-self-center w-full max-w-[400px] self-start @container group relative isolate flex flex-col gap-fluid-sm aspect-3/4 rounded-3xl bg-surface p-fluid-md"
|
|
22
|
+
>
|
|
23
|
+
<!-- Spans the tile above its content, so the whole tile is clickable. Its text is for screen readers only. -->
|
|
24
|
+
<a href="#" class="absolute inset-0 z-1 rounded-[inherit] focus-visible:outline outline-focus outline-offset-2">
|
|
25
|
+
<span class="sr-only">Weekender – Porsche Design Travel Collection</span>
|
|
26
|
+
</a>
|
|
27
|
+
<div class="flex flex-wrap items-center gap-fluid-sm">
|
|
28
|
+
<p-tag variant="secondary">New</p-tag>
|
|
29
|
+
<!--
|
|
30
|
+
- Placed above the link spanning the tile, so it stays clickable on its own.
|
|
31
|
+
- Its padding enlarges the target and makes it as tall as a tag, so it sits at the same height with or
|
|
32
|
+
without one. The negative margin keeps the icon on the edge of the content.
|
|
33
|
+
-->
|
|
34
|
+
<p-button-pure
|
|
35
|
+
class="ms-auto relative z-2 p-static-xs -me-static-xs"
|
|
36
|
+
type="button"
|
|
37
|
+
icon="heart"
|
|
38
|
+
hide-label="true"
|
|
39
|
+
>
|
|
40
|
+
Add to wishlist
|
|
41
|
+
</p-button-pure>
|
|
42
|
+
</div>
|
|
43
|
+
<!--
|
|
44
|
+
- Decorative, since the link and the text below already name the product.
|
|
45
|
+
- Takes the height left in the tile, but no less than a share of its width, so enlarged text extends the tile
|
|
46
|
+
rather than squeezing the image.
|
|
47
|
+
- Zooms in while the tile is hovered, unless the user prefers reduced motion.
|
|
48
|
+
-->
|
|
49
|
+
<img
|
|
50
|
+
class="flex-1 min-h-[50cqw] object-contain motion-safe:transition-[scale] duration-md ease-in-out motion-safe:group-hover:scale-105"
|
|
51
|
+
src="/examples/media/weekender.webp"
|
|
52
|
+
alt
|
|
53
|
+
width="960"
|
|
54
|
+
height="1080"
|
|
55
|
+
/>
|
|
56
|
+
<div class="grid justify-items-center gap-static-xs">
|
|
57
|
+
<!--
|
|
58
|
+
Native radio buttons above the link spanning the tile, so mouse and keyboard select a color without a
|
|
59
|
+
script. Each has a target of 24 pixels and a contour that sets a dark color apart from a dark surface. High
|
|
60
|
+
contrast mode would replace the colors, which are the content here, so the swatches keep theirs and take
|
|
61
|
+
system colors for contour, selection and focus.
|
|
62
|
+
-->
|
|
63
|
+
<div class="relative z-2 flex gap-static-2xs" role="radiogroup" aria-label="Color">
|
|
64
|
+
<input
|
|
65
|
+
class="bg-[#4b4b4d] appearance-none size-6 p-static-xs bg-clip-content rounded-full border border-transparent cursor-pointer motion-safe:transition-colors duration-sm ease-in-out hover:not-checked:border-contrast-medium checked:border-primary outline-1 outline-contrast-low -outline-offset-5 focus-visible:outline-2 focus-visible:outline-focus focus-visible:outline-offset-2 forced-color-adjust-none forced-colors:outline-[CanvasText] forced-colors:hover:not-checked:border-[Highlight] forced-colors:checked:border-[CanvasText] forced-colors:focus-visible:outline-[Highlight]"
|
|
66
|
+
type="radio"
|
|
67
|
+
name="product-color"
|
|
68
|
+
value="grey"
|
|
69
|
+
aria-label="Grey"
|
|
70
|
+
checked
|
|
71
|
+
/>
|
|
72
|
+
<input
|
|
73
|
+
class="bg-[#9a6a44] appearance-none size-6 p-static-xs bg-clip-content rounded-full border border-transparent cursor-pointer motion-safe:transition-colors duration-sm ease-in-out hover:not-checked:border-contrast-medium checked:border-primary outline-1 outline-contrast-low -outline-offset-5 focus-visible:outline-2 focus-visible:outline-focus focus-visible:outline-offset-2 forced-color-adjust-none forced-colors:outline-[CanvasText] forced-colors:hover:not-checked:border-[Highlight] forced-colors:checked:border-[CanvasText] forced-colors:focus-visible:outline-[Highlight]"
|
|
74
|
+
type="radio"
|
|
75
|
+
name="product-color"
|
|
76
|
+
value="cognac"
|
|
77
|
+
aria-label="Cognac"
|
|
78
|
+
/>
|
|
79
|
+
</div>
|
|
80
|
+
<p-text align="center">Weekender – Porsche Design Travel Collection</p-text>
|
|
81
|
+
<p-text color="contrast-medium" align="center">€1,100.00</p-text>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</main>
|
|
85
|
+
<script type="module" src="main.js"></script>
|
|
86
|
+
</body>
|
|
87
|
+
</html>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Script
|
|
91
|
+
|
|
92
|
+
None – the components cover all of the behaviour.
|