@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.
Files changed (283) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/bin/pds-skill.js +259 -0
  3. package/fesm2022/porsche-design-system-components-angular.mjs.map +1 -1
  4. package/package.json +5 -2
  5. package/skill/SKILL.md +124 -0
  6. package/skill/references/components/p-accordion/examples/Default.ts +26 -0
  7. package/skill/references/components/p-accordion/examples/InteractiveElementsInSummary.ts +30 -0
  8. package/skill/references/components/p-accordion/examples/StickySummary.ts +26 -0
  9. package/skill/references/components/p-accordion/p-accordion.md +95 -0
  10. package/skill/references/components/p-ai-tag/examples/Default.ts +13 -0
  11. package/skill/references/components/p-ai-tag/examples/WithinCheckbox.ts +33 -0
  12. package/skill/references/components/p-ai-tag/examples/WithinFormLabel.ts +40 -0
  13. package/skill/references/components/p-ai-tag/examples/WithinImage.ts +16 -0
  14. package/skill/references/components/p-ai-tag/examples/WithinInputSearch.ts +15 -0
  15. package/skill/references/components/p-ai-tag/examples/WithinRadioGroup.ts +32 -0
  16. package/skill/references/components/p-ai-tag/examples/WithinTable.ts +94 -0
  17. package/skill/references/components/p-ai-tag/examples/WithinText.ts +17 -0
  18. package/skill/references/components/p-ai-tag/p-ai-tag.md +47 -0
  19. package/skill/references/components/p-banner/examples/Customization.ts +37 -0
  20. package/skill/references/components/p-banner/examples/Default.ts +26 -0
  21. package/skill/references/components/p-banner/p-banner.md +92 -0
  22. package/skill/references/components/p-button/examples/Default.ts +15 -0
  23. package/skill/references/components/p-button/examples/Form.ts +26 -0
  24. package/skill/references/components/p-button/examples/FormAttribute.ts +30 -0
  25. package/skill/references/components/p-button/p-button.md +118 -0
  26. package/skill/references/components/p-button-pure/examples/CustomClickableArea.ts +15 -0
  27. package/skill/references/components/p-button-pure/examples/Default.ts +15 -0
  28. package/skill/references/components/p-button-pure/examples/Form.ts +26 -0
  29. package/skill/references/components/p-button-pure/examples/FormAttribute.ts +30 -0
  30. package/skill/references/components/p-button-pure/p-button-pure.md +118 -0
  31. package/skill/references/components/p-button-tile/examples/ColorScheme.ts +18 -0
  32. package/skill/references/components/p-button-tile/examples/Default.ts +21 -0
  33. package/skill/references/components/p-button-tile/examples/FooterSlot.ts +32 -0
  34. package/skill/references/components/p-button-tile/examples/Hyphens.ts +38 -0
  35. package/skill/references/components/p-button-tile/examples/UiBehaviour.ts +44 -0
  36. package/skill/references/components/p-button-tile/p-button-tile.md +115 -0
  37. package/skill/references/components/p-canvas/examples/Default.ts +13 -0
  38. package/skill/references/components/p-canvas/p-canvas.md +91 -0
  39. package/skill/references/components/p-carousel/examples/Default.ts +26 -0
  40. package/skill/references/components/p-carousel/examples/DynamicSlides.ts +37 -0
  41. package/skill/references/components/p-carousel/examples/FlexibleWidths.ts +32 -0
  42. package/skill/references/components/p-carousel/examples/FocusOnCenterSlide.ts +65 -0
  43. package/skill/references/components/p-carousel/examples/Intl.ts +23 -0
  44. package/skill/references/components/p-carousel/examples/JumpToSlide.ts +50 -0
  45. package/skill/references/components/p-carousel/p-carousel.md +142 -0
  46. package/skill/references/components/p-checkbox/examples/Default.ts +13 -0
  47. package/skill/references/components/p-checkbox/examples/Form.ts +31 -0
  48. package/skill/references/components/p-checkbox/examples/Indeterminate.ts +16 -0
  49. package/skill/references/components/p-checkbox/examples/Slots.ts +57 -0
  50. package/skill/references/components/p-checkbox/examples/WrappedLabel.ts +27 -0
  51. package/skill/references/components/p-checkbox/p-checkbox.md +122 -0
  52. package/skill/references/components/p-crest/examples/CustomClickableArea.ts +13 -0
  53. package/skill/references/components/p-crest/examples/Default.ts +13 -0
  54. package/skill/references/components/p-crest/examples/Link.ts +13 -0
  55. package/skill/references/components/p-crest/p-crest.md +65 -0
  56. package/skill/references/components/p-display/examples/Color.ts +15 -0
  57. package/skill/references/components/p-display/examples/Default.ts +15 -0
  58. package/skill/references/components/p-display/examples/Semantics.ts +21 -0
  59. package/skill/references/components/p-display/examples/Size.ts +15 -0
  60. package/skill/references/components/p-display/examples/SizeResponsive.ts +15 -0
  61. package/skill/references/components/p-display/p-display.md +78 -0
  62. package/skill/references/components/p-divider/examples/Default.ts +13 -0
  63. package/skill/references/components/p-divider/examples/Responsive.ts +15 -0
  64. package/skill/references/components/p-divider/examples/Vertical.ts +15 -0
  65. package/skill/references/components/p-divider/p-divider.md +49 -0
  66. package/skill/references/components/p-drilldown/examples/CustomContent.ts +166 -0
  67. package/skill/references/components/p-drilldown/examples/Default.ts +119 -0
  68. package/skill/references/components/p-drilldown/p-drilldown.md +168 -0
  69. package/skill/references/components/p-fieldset/examples/Default.ts +15 -0
  70. package/skill/references/components/p-fieldset/examples/Required.ts +16 -0
  71. package/skill/references/components/p-fieldset/examples/SlottedLabel.ts +18 -0
  72. package/skill/references/components/p-fieldset/examples/SlottedMessage.ts +18 -0
  73. package/skill/references/components/p-fieldset/p-fieldset.md +88 -0
  74. package/skill/references/components/p-flag/examples/Default.ts +13 -0
  75. package/skill/references/components/p-flag/examples/ResponsiveSize.ts +13 -0
  76. package/skill/references/components/p-flag/examples/Size.ts +16 -0
  77. package/skill/references/components/p-flag/examples/SizeCssVar.ts +13 -0
  78. package/skill/references/components/p-flag/p-flag.md +68 -0
  79. package/skill/references/components/p-flyout/examples/CustomStyling.ts +47 -0
  80. package/skill/references/components/p-flyout/examples/Default.ts +44 -0
  81. package/skill/references/components/p-flyout/examples/Form.ts +47 -0
  82. package/skill/references/components/p-flyout/examples/StickyTop.ts +44 -0
  83. package/skill/references/components/p-flyout/p-flyout.md +128 -0
  84. package/skill/references/components/p-heading/examples/Color.ts +15 -0
  85. package/skill/references/components/p-heading/examples/Default.ts +15 -0
  86. package/skill/references/components/p-heading/examples/Semantics.ts +21 -0
  87. package/skill/references/components/p-heading/p-heading.md +78 -0
  88. package/skill/references/components/p-icon/examples/Color.ts +16 -0
  89. package/skill/references/components/p-icon/examples/ColorCssVar.ts +13 -0
  90. package/skill/references/components/p-icon/examples/Custom.ts +13 -0
  91. package/skill/references/components/p-icon/examples/Default.ts +13 -0
  92. package/skill/references/components/p-icon/examples/Overview.ts +591 -0
  93. package/skill/references/components/p-icon/examples/ResponsiveSize.ts +13 -0
  94. package/skill/references/components/p-icon/examples/Size.ts +16 -0
  95. package/skill/references/components/p-icon/examples/SizeCssVar.ts +13 -0
  96. package/skill/references/components/p-icon/p-icon.md +88 -0
  97. package/skill/references/components/p-inline-notification/examples/ActionButton.ts +29 -0
  98. package/skill/references/components/p-inline-notification/examples/Default.ts +13 -0
  99. package/skill/references/components/p-inline-notification/examples/EventHandling.ts +31 -0
  100. package/skill/references/components/p-inline-notification/p-inline-notification.md +74 -0
  101. package/skill/references/components/p-input-date/examples/Default.ts +13 -0
  102. package/skill/references/components/p-input-date/examples/Form.ts +31 -0
  103. package/skill/references/components/p-input-date/examples/Slots.ts +44 -0
  104. package/skill/references/components/p-input-date/p-input-date.md +138 -0
  105. package/skill/references/components/p-input-email/examples/Default.ts +13 -0
  106. package/skill/references/components/p-input-email/examples/Form.ts +31 -0
  107. package/skill/references/components/p-input-email/examples/Slots.ts +44 -0
  108. package/skill/references/components/p-input-email/p-input-email.md +142 -0
  109. package/skill/references/components/p-input-month/examples/Default.ts +13 -0
  110. package/skill/references/components/p-input-month/examples/Form.ts +31 -0
  111. package/skill/references/components/p-input-month/examples/Slots.ts +44 -0
  112. package/skill/references/components/p-input-month/p-input-month.md +138 -0
  113. package/skill/references/components/p-input-number/examples/Default.ts +13 -0
  114. package/skill/references/components/p-input-number/examples/Form.ts +31 -0
  115. package/skill/references/components/p-input-number/examples/Slots.ts +44 -0
  116. package/skill/references/components/p-input-number/p-input-number.md +146 -0
  117. package/skill/references/components/p-input-password/examples/Default.ts +13 -0
  118. package/skill/references/components/p-input-password/examples/Form.ts +31 -0
  119. package/skill/references/components/p-input-password/examples/Slots.ts +42 -0
  120. package/skill/references/components/p-input-password/examples/Toggle.ts +13 -0
  121. package/skill/references/components/p-input-password/p-input-password.md +141 -0
  122. package/skill/references/components/p-input-search/examples/AriaCombobox.ts +38 -0
  123. package/skill/references/components/p-input-search/examples/Default.ts +13 -0
  124. package/skill/references/components/p-input-search/examples/Form.ts +31 -0
  125. package/skill/references/components/p-input-search/examples/Slots.ts +44 -0
  126. package/skill/references/components/p-input-search/p-input-search.md +178 -0
  127. package/skill/references/components/p-input-tel/examples/Default.ts +13 -0
  128. package/skill/references/components/p-input-tel/examples/Form.ts +31 -0
  129. package/skill/references/components/p-input-tel/examples/Slots.ts +44 -0
  130. package/skill/references/components/p-input-tel/p-input-tel.md +141 -0
  131. package/skill/references/components/p-input-text/examples/Controlled.ts +36 -0
  132. package/skill/references/components/p-input-text/examples/Default.ts +13 -0
  133. package/skill/references/components/p-input-text/examples/Form.ts +31 -0
  134. package/skill/references/components/p-input-text/examples/Slots.ts +44 -0
  135. package/skill/references/components/p-input-text/p-input-text.md +146 -0
  136. package/skill/references/components/p-input-time/examples/Default.ts +13 -0
  137. package/skill/references/components/p-input-time/examples/Form.ts +31 -0
  138. package/skill/references/components/p-input-time/examples/Slots.ts +44 -0
  139. package/skill/references/components/p-input-time/p-input-time.md +140 -0
  140. package/skill/references/components/p-input-url/examples/Default.ts +13 -0
  141. package/skill/references/components/p-input-url/examples/Form.ts +31 -0
  142. package/skill/references/components/p-input-url/examples/Slots.ts +44 -0
  143. package/skill/references/components/p-input-url/p-input-url.md +141 -0
  144. package/skill/references/components/p-input-week/examples/Default.ts +13 -0
  145. package/skill/references/components/p-input-week/examples/Form.ts +31 -0
  146. package/skill/references/components/p-input-week/examples/Slots.ts +44 -0
  147. package/skill/references/components/p-input-week/p-input-week.md +138 -0
  148. package/skill/references/components/p-link/examples/Default.ts +15 -0
  149. package/skill/references/components/p-link/examples/FrameworkRouting.ts +17 -0
  150. package/skill/references/components/p-link/examples/Icon.ts +20 -0
  151. package/skill/references/components/p-link/p-link.md +101 -0
  152. package/skill/references/components/p-link-pure/examples/CustomClickableArea.ts +15 -0
  153. package/skill/references/components/p-link-pure/examples/Default.ts +15 -0
  154. package/skill/references/components/p-link-pure/examples/FrameworkRouting.ts +17 -0
  155. package/skill/references/components/p-link-pure/examples/Icon.ts +20 -0
  156. package/skill/references/components/p-link-pure/p-link-pure.md +110 -0
  157. package/skill/references/components/p-link-tile/examples/ColorScheme.ts +18 -0
  158. package/skill/references/components/p-link-tile/examples/Default.ts +21 -0
  159. package/skill/references/components/p-link-tile/examples/FooterSlot.ts +32 -0
  160. package/skill/references/components/p-link-tile/examples/Hyphens.ts +39 -0
  161. package/skill/references/components/p-link-tile/examples/UiBehaviour.ts +44 -0
  162. package/skill/references/components/p-link-tile/examples/WithVideo.ts +18 -0
  163. package/skill/references/components/p-link-tile/p-link-tile.md +105 -0
  164. package/skill/references/components/p-link-tile-product/examples/Default.ts +24 -0
  165. package/skill/references/components/p-link-tile-product/examples/FrameworkRouting.ts +27 -0
  166. package/skill/references/components/p-link-tile-product/p-link-tile-product.md +93 -0
  167. package/skill/references/components/p-modal/examples/AlertDialog.ts +41 -0
  168. package/skill/references/components/p-modal/examples/CustomStyling.ts +28 -0
  169. package/skill/references/components/p-modal/examples/Default.ts +41 -0
  170. package/skill/references/components/p-modal/examples/Scrollable.ts +45 -0
  171. package/skill/references/components/p-modal/p-modal.md +135 -0
  172. package/skill/references/components/p-model-signature/examples/CustomStyling.ts +17 -0
  173. package/skill/references/components/p-model-signature/examples/Default.ts +13 -0
  174. package/skill/references/components/p-model-signature/examples/MaskBlendMode.ts +35 -0
  175. package/skill/references/components/p-model-signature/examples/MaskImage.ts +15 -0
  176. package/skill/references/components/p-model-signature/examples/MaskVideo.ts +15 -0
  177. package/skill/references/components/p-model-signature/examples/SafeZone.ts +63 -0
  178. package/skill/references/components/p-model-signature/p-model-signature.md +62 -0
  179. package/skill/references/components/p-multi-select/examples/AsyncFilter.ts +149 -0
  180. package/skill/references/components/p-multi-select/examples/Default.ts +32 -0
  181. package/skill/references/components/p-multi-select/examples/Form.ts +38 -0
  182. package/skill/references/components/p-multi-select/examples/Optgroups.ts +45 -0
  183. package/skill/references/components/p-multi-select/examples/SelectedSlot.ts +103 -0
  184. package/skill/references/components/p-multi-select/examples/SetValue.ts +76 -0
  185. package/skill/references/components/p-multi-select/examples/Slots.ts +51 -0
  186. package/skill/references/components/p-multi-select/p-multi-select.md +197 -0
  187. package/skill/references/components/p-pagination/examples/Default.ts +13 -0
  188. package/skill/references/components/p-pagination/p-pagination.md +83 -0
  189. package/skill/references/components/p-pin-code/examples/CopyPaste.ts +13 -0
  190. package/skill/references/components/p-pin-code/examples/Default.ts +13 -0
  191. package/skill/references/components/p-pin-code/examples/Form.ts +31 -0
  192. package/skill/references/components/p-pin-code/examples/Slots.ts +42 -0
  193. package/skill/references/components/p-pin-code/p-pin-code.md +109 -0
  194. package/skill/references/components/p-popover/examples/Default.ts +17 -0
  195. package/skill/references/components/p-popover/examples/SlottedButton.ts +18 -0
  196. package/skill/references/components/p-popover/p-popover.md +116 -0
  197. package/skill/references/components/p-radio-group/examples/Default.ts +20 -0
  198. package/skill/references/components/p-radio-group/examples/Form.ts +38 -0
  199. package/skill/references/components/p-radio-group/examples/Slots.ts +72 -0
  200. package/skill/references/components/p-radio-group/p-radio-group.md +157 -0
  201. package/skill/references/components/p-scroller/examples/Default.ts +54 -0
  202. package/skill/references/components/p-scroller/examples/Height.ts +29 -0
  203. package/skill/references/components/p-scroller/examples/ScrollToPosition.ts +43 -0
  204. package/skill/references/components/p-scroller/p-scroller.md +93 -0
  205. package/skill/references/components/p-segmented-control/examples/Default.ts +29 -0
  206. package/skill/references/components/p-segmented-control/examples/Form.ts +37 -0
  207. package/skill/references/components/p-segmented-control/examples/Slots.ts +57 -0
  208. package/skill/references/components/p-segmented-control/examples/WithLabels.ts +29 -0
  209. package/skill/references/components/p-segmented-control/p-segmented-control.md +162 -0
  210. package/skill/references/components/p-select/examples/AsyncFilter.ts +149 -0
  211. package/skill/references/components/p-select/examples/Default.ts +32 -0
  212. package/skill/references/components/p-select/examples/Form.ts +38 -0
  213. package/skill/references/components/p-select/examples/Optgroups.ts +45 -0
  214. package/skill/references/components/p-select/examples/Required.ts +48 -0
  215. package/skill/references/components/p-select/examples/SelectedSlot.ts +130 -0
  216. package/skill/references/components/p-select/examples/SetValue.ts +71 -0
  217. package/skill/references/components/p-select/examples/Slots.ts +51 -0
  218. package/skill/references/components/p-select/examples/SlottedImages.ts +38 -0
  219. package/skill/references/components/p-select/p-select.md +194 -0
  220. package/skill/references/components/p-sheet/examples/Default.ts +33 -0
  221. package/skill/references/components/p-sheet/p-sheet.md +121 -0
  222. package/skill/references/components/p-spinner/examples/Color.ts +16 -0
  223. package/skill/references/components/p-spinner/examples/ColorCssVar.ts +13 -0
  224. package/skill/references/components/p-spinner/examples/Default.ts +13 -0
  225. package/skill/references/components/p-spinner/examples/ResponsiveSize.ts +13 -0
  226. package/skill/references/components/p-spinner/examples/Size.ts +16 -0
  227. package/skill/references/components/p-spinner/examples/SizeCssVar.ts +13 -0
  228. package/skill/references/components/p-spinner/p-spinner.md +96 -0
  229. package/skill/references/components/p-stepper-horizontal/examples/Default.ts +26 -0
  230. package/skill/references/components/p-stepper-horizontal/examples/FrameworkImplementation.ts +107 -0
  231. package/skill/references/components/p-stepper-horizontal/p-stepper-horizontal.md +109 -0
  232. package/skill/references/components/p-switch/examples/Default.ts +21 -0
  233. package/skill/references/components/p-switch/p-switch.md +103 -0
  234. package/skill/references/components/p-table/examples/Advanced.ts +162 -0
  235. package/skill/references/components/p-table/examples/CaptionProperty.ts +40 -0
  236. package/skill/references/components/p-table/examples/CaptionSlot.ts +43 -0
  237. package/skill/references/components/p-table/examples/Default.ts +120 -0
  238. package/skill/references/components/p-table/examples/HideLabel.ts +40 -0
  239. package/skill/references/components/p-table/examples/LayoutFixed.ts +53 -0
  240. package/skill/references/components/p-table/examples/Sorting.ts +79 -0
  241. package/skill/references/components/p-table/p-table.md +189 -0
  242. package/skill/references/components/p-tabs/examples/ActiveTab.ts +29 -0
  243. package/skill/references/components/p-tabs/examples/Default.ts +29 -0
  244. package/skill/references/components/p-tabs/examples/Gradient.ts +114 -0
  245. package/skill/references/components/p-tabs/examples/Labelling.ts +29 -0
  246. package/skill/references/components/p-tabs/p-tabs.md +136 -0
  247. package/skill/references/components/p-tabs-bar/examples/Default.ts +29 -0
  248. package/skill/references/components/p-tabs-bar/examples/Gradient.ts +80 -0
  249. package/skill/references/components/p-tabs-bar/examples/Labelling.ts +29 -0
  250. package/skill/references/components/p-tabs-bar/examples/Links.ts +23 -0
  251. package/skill/references/components/p-tabs-bar/p-tabs-bar.md +181 -0
  252. package/skill/references/components/p-tag/examples/Default.ts +15 -0
  253. package/skill/references/components/p-tag/examples/Multiline.ts +17 -0
  254. package/skill/references/components/p-tag/examples/SlottedButton.ts +44 -0
  255. package/skill/references/components/p-tag/examples/SlottedLink.ts +44 -0
  256. package/skill/references/components/p-tag/p-tag.md +66 -0
  257. package/skill/references/components/p-tag-dismissible/examples/Default.ts +15 -0
  258. package/skill/references/components/p-tag-dismissible/p-tag-dismissible.md +75 -0
  259. package/skill/references/components/p-text/examples/Default.ts +15 -0
  260. package/skill/references/components/p-text/examples/Semantics.ts +21 -0
  261. package/skill/references/components/p-text/examples/Size.ts +15 -0
  262. package/skill/references/components/p-text/examples/SizeResponsive.ts +15 -0
  263. package/skill/references/components/p-text/p-text.md +68 -0
  264. package/skill/references/components/p-text-list/examples/Default.ts +31 -0
  265. package/skill/references/components/p-text-list/p-text-list.md +68 -0
  266. package/skill/references/components/p-textarea/examples/Default.ts +13 -0
  267. package/skill/references/components/p-textarea/examples/Form.ts +31 -0
  268. package/skill/references/components/p-textarea/examples/Slots.ts +42 -0
  269. package/skill/references/components/p-textarea/p-textarea.md +122 -0
  270. package/skill/references/components/p-toast/examples/Default.ts +23 -0
  271. package/skill/references/components/p-toast/p-toast.md +61 -0
  272. package/skill/references/components/p-wordmark/examples/CustomClickableArea.ts +13 -0
  273. package/skill/references/components/p-wordmark/examples/Default.ts +13 -0
  274. package/skill/references/components/p-wordmark/examples/Size.ts +13 -0
  275. package/skill/references/components/p-wordmark/p-wordmark.md +66 -0
  276. package/skill/references/icons.md +5 -0
  277. package/skill/references/styles/emotion.md +439 -0
  278. package/skill/references/styles/scss.md +402 -0
  279. package/skill/references/styles/tailwindcss.md +356 -0
  280. package/skill/references/styles/vanilla-extract.md +444 -0
  281. package/skill/references/stylesheets.md +331 -0
  282. package/skill/references/tokens.md +323 -0
  283. package/types/porsche-design-system-components-angular.d.ts +2 -2
@@ -0,0 +1,28 @@
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" backdrop="shading" [aria]="{'aria-label': 'Some Label'}" class="[--p-modal-width:clamp(276px,45.25vw+131px,1000px)] [--p-modal-spacing-top:200px] [--p-modal-spacing-bottom:50px]" (dismiss)="onDismiss()">
12
+ <img src="assets/porsche-992-carrera-s.jpg" class="-mt-(--ref-p-modal-pt) -mx-(--ref-p-modal-px) -mb-(--ref-p-modal-pb) max-w-(--p-modal-width) rounded-xl" />
13
+ </p-modal>
14
+ `,
15
+ changeDetection: ChangeDetectionStrategy.OnPush,
16
+ standalone: true,
17
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
18
+ })
19
+ export class ExampleComponent {
20
+ open = false;
21
+
22
+ onClick() {
23
+ this.open = true;
24
+ }
25
+ onDismiss() {
26
+ this.open = false;
27
+ }
28
+ }
@@ -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]="{'aria-label': 'Some Heading'}" (dismiss)="onDismiss()">
12
+ <p-heading slot="header" size="large" tag="h2">
13
+ Some Heading
14
+ </p-heading>
15
+ <p-text>
16
+ Some 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
+ Proceed
21
+ </p-button>
22
+ <p-button type="button" variant="secondary">
23
+ Cancel
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
+ }
@@ -0,0 +1,45 @@
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]="{'aria-label': 'Some Heading'}" (dismiss)="onDismiss()">
12
+ <p-heading slot="header" size="large" tag="h2">
13
+ Some Heading
14
+ </p-heading>
15
+ <p-text>
16
+ Some Content Begin
17
+ </p-text>
18
+ <div class="w-[10px] h-[120vh] bg-[deeppink]"></div>
19
+ <p-text>
20
+ Some Content End
21
+ </p-text>
22
+ <div slot="footer" role="group" class="flex flex-wrap gap-fluid-sm max-xs:flex-col">
23
+ <p-button type="button">
24
+ Proceed
25
+ </p-button>
26
+ <p-button type="button" variant="secondary">
27
+ Cancel
28
+ </p-button>
29
+ </div>
30
+ </p-modal>
31
+ `,
32
+ changeDetection: ChangeDetectionStrategy.OnPush,
33
+ standalone: true,
34
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
35
+ })
36
+ export class ExampleComponent {
37
+ open = false;
38
+
39
+ onClick() {
40
+ this.open = true;
41
+ }
42
+ onDismiss() {
43
+ this.open = false;
44
+ }
45
+ }
@@ -0,0 +1,135 @@
1
+ # p-modal
2
+
3
+ The `p-modal` is a temporary overlay to focus the user's attention on one task while interactions with the underlying page are blocked. It is only used as highly disruptive modal notification to present important information until dismissed. Or as overlay to confirm critical user actions, such as confirming an irreversible choice. It should be used thoughtfully and sparingly.
4
+
5
+ It is a controlled component. This grants flexible control over the modal's behavior especially whether it should stay open after user interaction like submission of a form.
6
+
7
+ > **Scroll-lock**
8
+ >
9
+ > This component sets `overflow: hidden` on the body when opened in order to prevent background scrolling.
10
+ >
11
+ > This doesn't work completely reliable under iOS but is the most stable solution.
12
+ >
13
+ > Feel free to address this issue in an Open Source PR, if you can provide a better solution.
14
+ >
15
+ > **[Current implementation](https://github.com/porsche-design-system/porsche-design-system/blob/main/packages/components/src/utils/setScrollLock.ts)**
16
+
17
+ Following **web standards**, the component uses the native `<dialog />` element internally which ensures proper focus handling including a **focus trap**. In addition, it's rendered on the `#top-layer` which ensures the element to be on top of the page independent of where `p-modal` is placed in the DOM hierarchy (`z-index` is not relevant anymore and won't have any effect).
18
+
19
+ The most important property of `p-modal` is its `open` property. When it's set to `true` the modal will be visible. In order to get notified when the modal gets closed by clicking the `x` button, the backdrop or by pressing the `Escape` key you need to register an event listener for the `dismiss` event which is emitted by `p-modal`.
20
+
21
+ The size of `p-modal` adjusts itself to the content with a predefined **min/max width** which aligns to the **[Porsche Grid](../../styles/tailwindcss.md)**.
22
+
23
+ ## Usage
24
+
25
+ ### Do:
26
+
27
+ - Use Modals to display additional information or required steps without losing context.
28
+ - Use Modals for confirmation before performing lengthy or dangerous actions.
29
+ - Use default Modal for simple content.
30
+ - Use full-width content and background overlay animation to draw user attention.
31
+ - Provide multiple ways to dismiss the Modal but require an intentional choice.
32
+ - Use scrolling only when necessary and try to keep content in a single view.
33
+ - Adjust Modal size and alignment with the grid.
34
+ - Use up to three actions in the action bar at the bottom of the Modal.
35
+ - Follow button order and positioning guidelines.
36
+ - Use feedback banner for any feedback related to the request.
37
+
38
+ ### Don't:
39
+
40
+ - Don't use fullscreen Modals on desktop.
41
+ - Don't use the Modal with more than three buttons.
42
+ - Don't launch a Modal within a Modal.
43
+
44
+ ## Accessibility support
45
+
46
+ The `Modal` component uses the native `dialog` element to provide a modal dialog which comes with browser-specific behavior. As a result, accessibility features may vary across different browsers.
47
+
48
+ ### Keyboard
49
+
50
+ | Key / state | Function |
51
+ | --- | --- |
52
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element inside the dialog. Focus is trapped (browser behavior). |
53
+ | `ESC` | Closes the dialog. |
54
+ | `focus` on trigger element | The focus is returned to the trigger element after closing the dialog (browser behavior). |
55
+
56
+ ### ARIA enhancements
57
+
58
+ #### External **ARIA** provided by the `aria` property:
59
+
60
+ | ARIA | Usage |
61
+ | --- | --- |
62
+ | `aria-label` | Defines a string value that labels the dialog element. |
63
+ | `role` | Defines the semantic of the dialog element (`dialog` or `alertdialog`). |
64
+
65
+ #### Internal **ARIA** that is managed by the component:
66
+
67
+ | ARIA | Usage |
68
+ | --- | --- |
69
+ | `aria-label="STRING"` | Defines the accessible name if no `aria` property is provided, uses the contents of the header slot and falls back to a fixed name. |
70
+
71
+ ## Development considerations
72
+
73
+ To inform users that the trigger button opens a `dialog`, the `aria-haspopup` attribute must be set using the `aria` property.
74
+
75
+ ### Common do's and don'ts
76
+
77
+ - **Do** use a semantic trigger (usually a button) with a meaningful accessible name.
78
+ - **Do** set `aria-haspopup` through the trigger component `aria` prop when opening the modal.
79
+ - **Do** ensure a meaningful title is available via the `header` slot or `aria` property.
80
+ - **Don't** add raw host-level ARIA attributes as a workaround.
81
+ - **Don't** use unclear trigger copy like "Open" when the destination is not obvious.
82
+
83
+ ## API
84
+
85
+ ### Properties
86
+
87
+ | Property | Type | Default | Description |
88
+ | --- | --- | --- | --- |
89
+ | `aria` | `ModalAriaAttribute` | `undefined` | Sets ARIA attributes on the dialog element for improved accessibility when no visible heading is present. |
90
+ | `backdrop` | `'blur'` `'shading'` | `'blur'` | Sets the backdrop style. Use `blur` when the modal is opened by user interaction; use `shading` when opened automatically (e.g. Cookie Consent). |
91
+ | `background` | `'canvas'` `'surface'` | `'canvas'` | Sets the background color of the modal panel (`canvas` or `surface`). |
92
+ | `disableBackdropClick` | `boolean` | `false` | When enabled, clicking the backdrop will not close the modal. |
93
+ | `dismissButton` | `boolean` | `true` | Shows a dismiss button in the modal header so the user can manually close it. |
94
+ | `fullscreen` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Expands the modal to the full viewport size, intended for mobile use cases. Supports responsive breakpoint values. |
95
+ | `open` _(required)_ | `boolean` | `false` | Controls whether the modal dialog is visible. |
96
+
97
+ ### Events
98
+
99
+ | Event | Type | Description |
100
+ | --- | --- | --- |
101
+ | `dismiss` | `CustomEvent<void>` | Emitted when the user closes the modal via the dismiss button, backdrop click, or Escape key. |
102
+ | `motionHiddenEnd` | `CustomEvent<ModalMotionHiddenEndEventDetail>`<br>`TransitionEvent` | Emitted after the modal's close transition completes and the dialog is fully hidden. |
103
+ | `motionVisibleEnd` | `CustomEvent<ModalMotionVisibleEndEventDetail>`<br>`TransitionEvent` | Emitted after the modal's open transition completes and the dialog is fully visible. |
104
+
105
+ ### Controlled properties
106
+
107
+ - `open` — a controlled prop: the component does **not** update it itself. Handle the `dismiss` event and assign the new value to `open` yourself, or the change will not take effect.
108
+
109
+ ### Slots
110
+
111
+ | Slot | Required | Allowed tag names | Description |
112
+ | --- | --- | --- | --- |
113
+ | `header` | no | — | Renders a header section above the content area. |
114
+ | _(default)_ | no | — | Default slot for the main content. |
115
+ | `footer` | no | — | Shows a sticky footer section, flowing under the content area when scrollable. |
116
+
117
+ ### CSS Variables
118
+
119
+ | CSS Variable | Default | Description |
120
+ | --- | --- | --- |
121
+ | `--p-modal-width` | `auto` | Width of the modal. |
122
+ | `--p-modal-spacing-top` | `clamp(16px, 10vh, 192px)` | Spacing of the modal to the top. |
123
+ | `--p-modal-spacing-bottom` | `clamp(16px, 10vh, 192px)` | Spacing of the modal to the bottom. |
124
+ | `--ref-p-modal-pt` | — | Exposes the internally used padding-top of the Modal as read only CSS variable. When slotting e.g. a media container, this variable can be used to stretch the element to the top of the Modal. |
125
+ | `--ref-p-modal-pb` | — | Exposes the internally used padding-bottom of the Modal as read only CSS variable. When slotting e.g. a media container, this variable can be used to stretch the element to the bottom of the Modal. |
126
+ | `--ref-p-modal-px` | — | Exposes the internally used padding-inline of the Modal as read only CSS variable. When slotting e.g. a media container, this variable can be used to stretch the element to the full horizontal size of the Modal. |
127
+
128
+ ## Examples
129
+
130
+ | Example | When to use | File |
131
+ | --- | --- | --- |
132
+ | Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
133
+ | Scrollable modal with sticky footer | If the modal's content does not fit within the available space, the content becomes scrollable and the footer area remains sticky. | [./examples/Scrollable.ts](./examples/Scrollable.ts) |
134
+ | Modal as alert dialog | The `p-modal` component can be used as an alert dialog. | [./examples/AlertDialog.ts](./examples/AlertDialog.ts) |
135
+ | Custom styling | The modal component has some values that can be overridden via CSS custom properties (aka CSS variables). | [./examples/CustomStyling.ts](./examples/CustomStyling.ts) |
@@ -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-model-signature color="inherit" class="text-info"></p-model-signature>
8
+
9
+ <p-model-signature class="[--p-model-signature-width:auto] [--p-model-signature-height:50px] block"></p-model-signature>
10
+
11
+ <p-model-signature class="[--p-model-signature-width:50px] [--p-model-signature-height:auto] block"></p-model-signature>
12
+ `,
13
+ changeDetection: ChangeDetectionStrategy.OnPush,
14
+ standalone: true,
15
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
16
+ })
17
+ export class ExampleComponent {}
@@ -0,0 +1,13 @@
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-model-signature></p-model-signature>
8
+ `,
9
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
12
+ })
13
+ export class ExampleComponent {}
@@ -0,0 +1,35 @@
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="isolate bg-[#00aa3680] inline-block p-static-lg">
8
+ <p-model-signature color="contrast-medium" [safeZone]="false" class="mix-blend-overlay"></p-model-signature>
9
+ </div>
10
+
11
+ <div class="isolate bg-[#f2f2f280] inline-block p-static-lg">
12
+ <p-model-signature color="contrast-medium" [safeZone]="false" class="mix-blend-overlay"></p-model-signature>
13
+ </div>
14
+
15
+ <div class="isolate bg-[#1f1f1f80] inline-block p-static-lg">
16
+ <p-model-signature color="contrast-medium" [safeZone]="false" class="mix-blend-overlay"></p-model-signature>
17
+ </div>
18
+
19
+ <div class="isolate bg-[#c5004280] inline-block p-static-lg">
20
+ <p-model-signature color="contrast-medium" [safeZone]="false" class="mix-blend-overlay"></p-model-signature>
21
+ </div>
22
+
23
+ <div class="isolate bg-[#e1d4a480] inline-block p-static-lg">
24
+ <p-model-signature color="contrast-medium" [safeZone]="false" class="mix-blend-overlay"></p-model-signature>
25
+ </div>
26
+
27
+ <div class="isolate bg-[#0099e080] inline-block p-static-lg">
28
+ <p-model-signature color="contrast-medium" [safeZone]="false" class="mix-blend-overlay"></p-model-signature>
29
+ </div>
30
+ `,
31
+ changeDetection: ChangeDetectionStrategy.OnPush,
32
+ standalone: true,
33
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
34
+ })
35
+ export class ExampleComponent {}
@@ -0,0 +1,15 @@
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-model-signature [safeZone]="false" class="[--p-model-signature-width:auto]">
8
+ <img src="assets/dessert.jpg" alt="Dessert" />
9
+ </p-model-signature>
10
+ `,
11
+ changeDetection: ChangeDetectionStrategy.OnPush,
12
+ standalone: true,
13
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
14
+ })
15
+ export class ExampleComponent {}
@@ -0,0 +1,15 @@
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-model-signature [safeZone]="false" class="[--p-model-signature-width:auto]">
8
+ <video poster="assets/ocean.jpg" src="assets/ocean.mp4" autoplay playsinline loop muted></video>
9
+ </p-model-signature>
10
+ `,
11
+ changeDetection: ChangeDetectionStrategy.OnPush,
12
+ standalone: true,
13
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
14
+ })
15
+ export class ExampleComponent {}
@@ -0,0 +1,63 @@
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="bg-[#ff000033] inline-block me-static-md mt-static-md">
8
+ <p-model-signature [safeZone]="false" model="718"></p-model-signature>
9
+ </div>
10
+
11
+ <div class="bg-[#ff000033] inline-block me-static-md mt-static-md">
12
+ <p-model-signature [safeZone]="false" model="911"></p-model-signature>
13
+ </div>
14
+
15
+ <div class="bg-[#ff000033] inline-block me-static-md mt-static-md">
16
+ <p-model-signature [safeZone]="false" model="boxster"></p-model-signature>
17
+ </div>
18
+
19
+ <div class="bg-[#ff000033] inline-block me-static-md mt-static-md">
20
+ <p-model-signature [safeZone]="false" model="cayenne"></p-model-signature>
21
+ </div>
22
+
23
+ <div class="bg-[#ff000033] inline-block me-static-md mt-static-md">
24
+ <p-model-signature [safeZone]="false" model="cayman"></p-model-signature>
25
+ </div>
26
+
27
+ <div class="bg-[#ff000033] inline-block me-static-md mt-static-md">
28
+ <p-model-signature [safeZone]="false" model="gt3-rs"></p-model-signature>
29
+ </div>
30
+
31
+ <div class="bg-[#ff000033] inline-block me-static-md mt-static-md">
32
+ <p-model-signature [safeZone]="false" model="gt3"></p-model-signature>
33
+ </div>
34
+
35
+ <div class="bg-[#ff000033] inline-block me-static-md mt-static-md">
36
+ <p-model-signature [safeZone]="false" model="gts"></p-model-signature>
37
+ </div>
38
+
39
+ <div class="bg-[#ff000033] inline-block me-static-md mt-static-md">
40
+ <p-model-signature [safeZone]="false" model="macan"></p-model-signature>
41
+ </div>
42
+
43
+ <div class="bg-[#ff000033] inline-block me-static-md mt-static-md">
44
+ <p-model-signature [safeZone]="false" model="panamera"></p-model-signature>
45
+ </div>
46
+
47
+ <div class="bg-[#ff000033] inline-block me-static-md mt-static-md">
48
+ <p-model-signature [safeZone]="false" model="taycan"></p-model-signature>
49
+ </div>
50
+
51
+ <div class="bg-[#ff000033] inline-block me-static-md mt-static-md">
52
+ <p-model-signature [safeZone]="false" model="turbo-s"></p-model-signature>
53
+ </div>
54
+
55
+ <div class="bg-[#ff000033] inline-block me-static-md mt-static-md">
56
+ <p-model-signature [safeZone]="false" model="turbo"></p-model-signature>
57
+ </div>
58
+ `,
59
+ changeDetection: ChangeDetectionStrategy.OnPush,
60
+ standalone: true,
61
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
62
+ })
63
+ export class ExampleComponent {}
@@ -0,0 +1,62 @@
1
+ # p-model-signature
2
+
3
+ The `p-model-signature` component is purely visual and renders the different signatures of Porsche car models. It can be used to overlay background images or enhance cards and teasers to be more dynamic and recognizable.
4
+
5
+ ## Usage
6
+
7
+ ### Do:
8
+
9
+ - Use signatures for emotional introduction and communication of model series.
10
+ - Consider using model signatures only occasionally, for example, within the Link Tile component for a specific model line.
11
+ - Use model signatures as a subtle, larger background watermark, paired with appropriate visualization of vehicle detail pages.
12
+ - Use as a headline-like element on model series overview pages.
13
+
14
+ ### Don't:
15
+
16
+ - Avoid including signatures for specific derivatives such as a Panamera 4 Sport Turismo
17
+ - Platinum Edition or a 911 Targa 4S or in line with the text.
18
+ - The model signature should have sufficient spacing from the text.
19
+ - Avoid repeating the same model series signature within the interface.
20
+ - For example, do not display the 911 signatures twice or more in a viewport.
21
+
22
+ ## Accessibility support
23
+
24
+ This component does not include any special accessibility features.
25
+
26
+ ## API
27
+
28
+ ### Properties
29
+
30
+ | Property | Type | Default | Description |
31
+ | --- | --- | --- | --- |
32
+ | `color` | `'primary'` `'contrast-low'` `'contrast-medium'` `'contrast-high'` `'inherit'` | `'primary'` | Sets the fill color of the signature using PDS color tokens. |
33
+ | `fetchPriority` | `'low'` `'high'` `'auto'` | `'auto'` | Sets the browser's fetch priority hint for the signature asset (`auto`, `high`, `low`). |
34
+ | `lazy` | `boolean` | `false` | Defers loading the signature until it enters the viewport to improve initial page performance. |
35
+ | `model` | `'718'` `'911'` `'boxster'` `'cayenne'` `'cayman'` `'gt3-rs'` `'gt3'` `'gts'` `'macan'` `'panamera'` `'taycan'` `'turbo-s'` `'turbo'` | `'911'` | Selects the Porsche model whose typographic signature SVG is displayed. |
36
+ | `safeZone` | `boolean` | `true` | When enabled, adds invisible padding so all model signatures visually align to a consistent baseline. |
37
+ | `size` | `'small'` `'inherit'` | `'small'` | Sets the display size of the signature using predefined PDS sizes. Use `inherit` with a CSS `width` or `height` on the host for custom sizing. |
38
+
39
+ ### Slots
40
+
41
+ | Slot | Required | Allowed tag names | Description |
42
+ | --- | --- | --- | --- |
43
+ | _(default)_ | no | — | Default slot for an img or video tag when using the model-signature as a mask. |
44
+
45
+ ### CSS Variables
46
+
47
+ | CSS Variable | Default | Description |
48
+ | --- | --- | --- |
49
+ | `--p-model-signature-width` | — | Overrides the width of the model signature. |
50
+ | `--p-model-signature-height` | `auto` | Overrides the height of the model signature. |
51
+ | `--p-model-signature-color` | — | Overrides the fill color of the model signature. Overrides the `color` property when set. |
52
+
53
+ ## Examples
54
+
55
+ | Example | When to use | File |
56
+ | --- | --- | --- |
57
+ | Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
58
+ | Safe Zone | The `safe-zone` prop's default is `modelSignatureSafeZoneDefault`, which ensures a visual balance across all model signatures. | [./examples/SafeZone.ts](./examples/SafeZone.ts) |
59
+ | Mask: Blend Mode | If `p-model-signature` should be blended with its background, the CSS property [mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) can be used (`{{ blendMode }}` will produce the best results). | [./examples/MaskBlendMode.ts](./examples/MaskBlendMode.ts) |
60
+ | Mask: Image | > **Experimental** > > The following example shows what is technically possible but has not yet been approved by the Porsche Brand Guide. | [./examples/MaskImage.ts](./examples/MaskImage.ts) |
61
+ | Mask: Video | > **Experimental** > > The following example shows what is technically possible but has not yet been approved by the Porsche Brand Guide. | [./examples/MaskVideo.ts](./examples/MaskVideo.ts) |
62
+ | Custom styling | The `p-model-signature` color can be changed by setting the `color` prop to `inherit` and applying some CSS `color`. | [./examples/CustomStyling.ts](./examples/CustomStyling.ts) |
@@ -0,0 +1,149 @@
1
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core';
2
+ import {
3
+ type InputSearchInputEventDetail,
4
+ type MultiSelectChangeEventDetail,
5
+ type MultiSelectToggleEventDetail,
6
+ PMultiSelect,
7
+ PorscheDesignSystemModule,
8
+ } from '@porsche-design-system/components-angular';
9
+
10
+ @Component({
11
+ selector: 'porsche-design-system-app',
12
+ template: `
13
+ <p-multi-select
14
+ name="async-search-select"
15
+ label="Async Search"
16
+ [value]="value"
17
+ (change)="onChange($event)"
18
+ (toggle)="onToggle($event)"
19
+ >
20
+ <p-input-search
21
+ slot="filter"
22
+ name="search"
23
+ [value]="searchValue"
24
+ [loading]="loading"
25
+ [clear]="true"
26
+ [indicator]="true"
27
+ [compact]="true"
28
+ [autoComplete]="'off'"
29
+ (input)="onInput($event)"
30
+ (blur)="$event.stopPropagation()"
31
+ (change)="$event.stopPropagation()"
32
+ ></p-input-search>
33
+
34
+ <!-- Initial skeleton loading -->
35
+ @if (initialLoading && !error) {
36
+ @for (_ of [1,2,3,4,5,6,7,8,9]; track $index) {
37
+ <div slot="options-status" class="skeleton h-[40px]"></div>
38
+ }
39
+ }
40
+
41
+ <!-- Options -->
42
+ @for (option of options; track option.value) {
43
+ <p-multi-select-option [value]="option.value">
44
+ {{ option.label }}
45
+ </p-multi-select-option>
46
+ }
47
+
48
+ <!-- No filter results -->
49
+ @if (!initialLoading && options.length === 0 && !error) {
50
+ <div
51
+ slot="options-status"
52
+ class="text-contrast-medium cursor-not-allowed py-static-sm px-[12px]"
53
+ role="alert"
54
+ >
55
+ <span aria-hidden="true">–</span>
56
+ <span class="sr-only">No results found</span>
57
+ </div>
58
+ }
59
+
60
+ <!-- Error state -->
61
+ @if (error) {
62
+ <div
63
+ slot="options-status"
64
+ class="flex gap-static-sm py-static-sm px-[12px]"
65
+ role="alert"
66
+ >
67
+ <p-icon name="information" color="error"></p-icon>
68
+ <span class="text-error">{{ error }}</span>
69
+ </div>
70
+ }
71
+ </p-multi-select>
72
+
73
+ `,
74
+ changeDetection: ChangeDetectionStrategy.OnPush,
75
+ standalone: true,
76
+ imports: [PorscheDesignSystemModule],
77
+ })
78
+ export class ExampleComponent {
79
+ value?: PMultiSelect['value'] = [];
80
+ options: { value: string; label: string }[] = [];
81
+
82
+ searchValue = '';
83
+ initialLoading = false;
84
+ loading = false;
85
+ error: string | null = null;
86
+
87
+ private hasLoadedOnce = false;
88
+ private currentFetchId = 0;
89
+ private debounceTimer?: number;
90
+
91
+ constructor(private cdr: ChangeDetectorRef) {}
92
+
93
+ async fetchOptions(term?: string, isInitial = false) {
94
+ const fetchId = ++this.currentFetchId;
95
+ if (isInitial) this.initialLoading = true;
96
+ else this.loading = true;
97
+
98
+ this.cdr.markForCheck();
99
+
100
+ try {
101
+ const url = term
102
+ ? `https://jsonplaceholder.typicode.com/users?username_like=${term}`
103
+ : `https://jsonplaceholder.typicode.com/users`;
104
+
105
+ const res = await fetch(url);
106
+ const data: { id: number; name: string; username: string }[] = await res.json();
107
+
108
+ // Ignore stale results
109
+ if (fetchId !== this.currentFetchId) return;
110
+
111
+ this.options = data.map((user) => ({
112
+ value: user.id.toString(),
113
+ label: `${user.name} (${user.username})`,
114
+ }));
115
+
116
+ this.error = null;
117
+ this.hasLoadedOnce = true;
118
+ } catch (err) {
119
+ console.error('Failed to fetch options', err);
120
+ this.options = [];
121
+ this.error = 'Failed to load options';
122
+ } finally {
123
+ if (isInitial) this.initialLoading = false;
124
+ else this.loading = false;
125
+
126
+ this.cdr.markForCheck();
127
+ }
128
+ }
129
+
130
+ onInput(event: CustomEvent<InputSearchInputEventDetail>) {
131
+ const term = (event.target as HTMLInputElement).value;
132
+ this.searchValue = term;
133
+
134
+ if (this.debounceTimer) clearTimeout(this.debounceTimer);
135
+ this.debounceTimer = window.setTimeout(() => {
136
+ this.fetchOptions(term.trim() || undefined);
137
+ }, 400);
138
+ }
139
+
140
+ onChange(event: CustomEvent<MultiSelectChangeEventDetail>) {
141
+ this.value = (event.target as HTMLElement & { value: string[] }).value;
142
+ }
143
+
144
+ onToggle(event: CustomEvent<MultiSelectToggleEventDetail>) {
145
+ if (event.detail.open && !this.hasLoadedOnce) {
146
+ this.fetchOptions(undefined, true);
147
+ }
148
+ }
149
+ }
@@ -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
+ <p-multi-select name="name" label="Some Label" description="Some description">
8
+ <p-multi-select-option value="a">
9
+ Option A
10
+ </p-multi-select-option>
11
+ <p-multi-select-option value="b">
12
+ Option B
13
+ </p-multi-select-option>
14
+ <p-multi-select-option value="c">
15
+ Option C
16
+ </p-multi-select-option>
17
+ <p-multi-select-option value="d">
18
+ Option D
19
+ </p-multi-select-option>
20
+ <p-multi-select-option value="e">
21
+ Option E
22
+ </p-multi-select-option>
23
+ <p-multi-select-option value="f">
24
+ Option F
25
+ </p-multi-select-option>
26
+ </p-multi-select>
27
+ `,
28
+ changeDetection: ChangeDetectionStrategy.OnPush,
29
+ standalone: true,
30
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
31
+ })
32
+ export class ExampleComponent {}