@porsche-design-system/components-angular 4.5.0-rc.1 → 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 +10 -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,38 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
3
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
4
+
5
+ @Component({
6
+ selector: 'porsche-design-system-app',
7
+ template: `
8
+ <form [formGroup]="form" (ngSubmit)="onSubmit()" class="flex flex-col gap-fluid-sm">
9
+ <p-multi-select formControlName="myMultiSelect" [label]="'Some Label'" >
10
+ <p-multi-select-option value="a">Option A</p-multi-select-option>
11
+ <p-multi-select-option value="b">Option B</p-multi-select-option>
12
+ <p-multi-select-option value="c">Option C</p-multi-select-option>
13
+ <p-multi-select-option value="d">Option D</p-multi-select-option>
14
+ <p-multi-select-option value="e">Option E</p-multi-select-option>
15
+ <p-multi-select-option value="f">Option F</p-multi-select-option>
16
+ </p-multi-select>
17
+ <div class="flex gap-fluid-sm">
18
+ <p-button type="submit">Submit</p-button>
19
+ <p-button type="reset">Reset</p-button>
20
+ </div>
21
+ <p-text>Last submitted data: {{ submittedValue }}</p-text>
22
+ </form>
23
+ `,
24
+ changeDetection: ChangeDetectionStrategy.OnPush,
25
+ standalone: true,
26
+ imports: [PorscheDesignSystemModule, FormsModule, ReactiveFormsModule], // <-- PDS module is imported here
27
+ })
28
+ export class ExampleComponent {
29
+ form = new FormGroup({
30
+ myMultiSelect: new FormControl<string[]>([]),
31
+ });
32
+
33
+ submittedValue: any = undefined;
34
+
35
+ onSubmit(): void {
36
+ this.submittedValue = JSON.stringify(this.form.value);
37
+ }
38
+ }
@@ -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-multi-select name="options" label="Some Label">
8
+ <p-optgroup label="Some optgroup label 1">
9
+ <p-multi-select-option value="a">
10
+ Option A
11
+ </p-multi-select-option>
12
+ <p-multi-select-option value="b">
13
+ Option B
14
+ </p-multi-select-option>
15
+ <p-multi-select-option value="c">
16
+ Option C
17
+ </p-multi-select-option>
18
+ <p-multi-select-option value="d">
19
+ Option D
20
+ </p-multi-select-option>
21
+ <p-multi-select-option value="e">
22
+ Option E
23
+ </p-multi-select-option>
24
+ <p-multi-select-option value="f">
25
+ Option F
26
+ </p-multi-select-option>
27
+ </p-optgroup>
28
+ <p-optgroup label="Some optgroup label 2">
29
+ <p-multi-select-option value="g">
30
+ Option G
31
+ </p-multi-select-option>
32
+ <p-multi-select-option value="h">
33
+ Option H
34
+ </p-multi-select-option>
35
+ <p-multi-select-option value="i">
36
+ Option I
37
+ </p-multi-select-option>
38
+ </p-optgroup>
39
+ </p-multi-select>
40
+ `,
41
+ changeDetection: ChangeDetectionStrategy.OnPush,
42
+ standalone: true,
43
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
44
+ })
45
+ export class ExampleComponent {}
@@ -0,0 +1,103 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import {
3
+ type MultiSelectChangeEventDetail,
4
+ PMultiSelect,
5
+ PorscheDesignSystemModule,
6
+ } from '@porsche-design-system/components-angular';
7
+
8
+ type Option = { value: string; label: string; description: string; tags: string[]; imgSrc: string };
9
+
10
+ const optionsData: Option[] = [
11
+ {
12
+ value: '718',
13
+ label: '718',
14
+ description: 'Präziser Sportwagen mit Mittelmotor',
15
+ tags: ['Benzin'],
16
+ imgSrc: 'assets/718.png',
17
+ },
18
+ {
19
+ value: '911',
20
+ label: '911',
21
+ description: 'Ikonischer Sportwagen mit Heckmotor',
22
+ tags: ['Benzin'],
23
+ imgSrc: 'assets/911.png',
24
+ },
25
+ {
26
+ value: 'taycan',
27
+ label: 'Taycan',
28
+ description: 'Elektrischer Sportwagen',
29
+ tags: ['Elektro'],
30
+ imgSrc: 'assets/taycan.png',
31
+ },
32
+ {
33
+ value: 'macan',
34
+ label: 'Macan',
35
+ tags: ['Elektro'],
36
+ description: 'Sportlicher Kompakt-SUV',
37
+ imgSrc: 'assets/macan.png',
38
+ },
39
+ {
40
+ value: 'cayenne',
41
+ label: 'Cayenne',
42
+ tags: ['Hybrid', 'Benzin'],
43
+ description: 'Vielseitiger SUV',
44
+ imgSrc: 'assets/cayenne.png',
45
+ },
46
+ {
47
+ value: 'panamera',
48
+ label: 'Panamera',
49
+ tags: ['Hybrid', 'Benzin'],
50
+ description: 'Luxuslimousine mit hohem Komfort',
51
+ imgSrc: 'assets/panamera.png',
52
+ },
53
+ ];
54
+
55
+ @Component({
56
+ selector: 'porsche-design-system-app',
57
+ template: `
58
+ <p-multi-select
59
+ name="selected-slot-select"
60
+ label="Selected Slot"
61
+ [value]="value"
62
+ (change)="onChange($event)"
63
+ >
64
+ <span slot="selected" class="h-full flex items-center">
65
+ <span class="truncate">{{ selectedLabels }}</span>
66
+ </span>
67
+ @for (option of options; track option.value) {
68
+ <p-multi-select-option [value]="option.value">
69
+ <div class="w-full flex gap-fluid-sm">
70
+ <img [src]="option.imgSrc" alt="" class="h-[34px] w-auto self-center" />
71
+ <div class="flex flex-col justify-center flex-1 min-w-0">
72
+ <p class="prose-text-sm m-0">{{ option.label }}</p>
73
+ <p class="prose-text-2xs m-0">{{ option.description }}</p>
74
+ </div>
75
+ <div class="self-center flex gap-fluid-sm">
76
+ @for (tag of option.tags; track tag) {
77
+ <p-tag color="info-soft" [compact]="true">{{ tag }}</p-tag>
78
+ }
79
+ </div>
80
+ </div>
81
+ </p-multi-select-option>
82
+ }
83
+ </p-multi-select>
84
+ `,
85
+ changeDetection: ChangeDetectionStrategy.OnPush,
86
+ standalone: true,
87
+ imports: [PorscheDesignSystemModule],
88
+ })
89
+ export class ExampleComponent {
90
+ value: PMultiSelect['value'] = [];
91
+ options: Option[] = optionsData;
92
+ selectedOptions: Option[] = [];
93
+
94
+ get selectedLabels(): string {
95
+ return this.selectedOptions.map((option) => option.label).join(', ');
96
+ }
97
+
98
+ onChange(event: CustomEvent<MultiSelectChangeEventDetail>) {
99
+ const { value } = event.detail;
100
+ this.value = value;
101
+ this.selectedOptions = this.options.filter((option) => (value as string[]).includes(option.value));
102
+ }
103
+ }
@@ -0,0 +1,76 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import {
3
+ MultiSelectChangeEventDetail,
4
+ type PMultiSelectProps,
5
+ PorscheDesignSystemModule,
6
+ } from '@porsche-design-system/components-angular';
7
+
8
+ @Component({
9
+ selector: 'porsche-design-system-app',
10
+ template: `
11
+ <div class="flex flex-col gap-fluid-sm">
12
+ <p-input-text
13
+ label="Value:"
14
+ name="input-value"
15
+ [value]="inputValue"
16
+ (input)="onChangeInput($event)"
17
+ placeholder="e.g. 1,2"
18
+ ></p-input-text>
19
+ <div class="flex gap-fluid-sm">
20
+ <p-button type="button" (click)="onSetValue()" [compact]="true">Set Value</p-button>
21
+ <p-button type="button" (click)="onResetValue()" [compact]="true">Reset value</p-button>
22
+ </div>
23
+ <p-multi-select name="options" label="Some Label" [value]="selectedValues" (change)="onChange($event)">
24
+ @for (idx of optionIndices; track idx) {
25
+ <p-multi-select-option [value]="(idx + 1).toString()"
26
+ >Option {{ idx + 1 }}</p-multi-select-option
27
+ >
28
+ }
29
+ </p-multi-select>
30
+ <div class="flex gap-fluid-sm">
31
+ <p-button type="button" (click)="onAddOption()" [compact]="true">Add option</p-button>
32
+ <p-button type="button" (click)="onRemoveOption()" [compact]="true">Remove last option</p-button>
33
+ </div>
34
+ </div>
35
+ `,
36
+ changeDetection: ChangeDetectionStrategy.OnPush,
37
+ standalone: true,
38
+ imports: [PorscheDesignSystemModule],
39
+ })
40
+ export class ExampleComponent {
41
+ selectedValues: PMultiSelectProps['value'] = [];
42
+ inputValue: string = '';
43
+ optionCount: number = 3;
44
+
45
+ get optionIndices(): number[] {
46
+ return [...Array(this.optionCount).keys()];
47
+ }
48
+
49
+ onChangeInput(e: Event) {
50
+ this.inputValue = (e.target as HTMLInputElement).value;
51
+ }
52
+
53
+ onSetValue() {
54
+ this.selectedValues = this.inputValue.split(',');
55
+ }
56
+
57
+ onResetValue() {
58
+ this.selectedValues = [];
59
+ this.inputValue = '';
60
+ }
61
+
62
+ onChange(e: CustomEvent<MultiSelectChangeEventDetail>) {
63
+ this.selectedValues = e.detail.value;
64
+ this.inputValue = e.detail.value.join(',');
65
+ }
66
+
67
+ onAddOption() {
68
+ this.optionCount += 1;
69
+ }
70
+
71
+ onRemoveOption() {
72
+ if (this.optionCount > 0) {
73
+ this.optionCount -= 1;
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,51 @@
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="options" state="error">
8
+ <span slot="label" id="some-label-id">
9
+ Some label with a
10
+ <a href="https://designsystem.porsche.com" class="underline">
11
+ link
12
+ </a>
13
+ and a "label-after" slot.
14
+ </span>
15
+ <p-popover slot="label-after">
16
+ Some Popover content with a
17
+ <a href="https://designsystem.porsche.com" class="underline">
18
+ link
19
+ </a>
20
+ .
21
+ </p-popover>
22
+ <span slot="description" id="some-description-id">
23
+ Some description with a
24
+ <a href="https://designsystem.porsche.com" class="underline">
25
+ link
26
+ </a>
27
+ .
28
+ </span>
29
+ <span slot="message" id="some-message-id">
30
+ Some error message with a
31
+ <a href="https://designsystem.porsche.com" class="underline">
32
+ link
33
+ </a>
34
+ .
35
+ </span>
36
+ <p-multi-select-option value="a">
37
+ Option A
38
+ </p-multi-select-option>
39
+ <p-multi-select-option value="b">
40
+ Option B
41
+ </p-multi-select-option>
42
+ <p-multi-select-option value="c">
43
+ Option C
44
+ </p-multi-select-option>
45
+ </p-multi-select>
46
+ `,
47
+ changeDetection: ChangeDetectionStrategy.OnPush,
48
+ standalone: true,
49
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
50
+ })
51
+ export class ExampleComponent {}
@@ -0,0 +1,197 @@
1
+ # p-multi-select
2
+
3
+ The `p-multi-select` component is a versatile custom form element that facilitates the selection of multiple options.
4
+
5
+ Many of the properties closely resemble those found in the [select](../p-select/p-select.md) and other form components (e.g. `label`, `description`, `state`, `message`, `hideLabel`, `disabled`, `required` & `dropdownDirection`). The `p-multi-select` offers a search field by default. When the user types in a search string, the options are reduced by matching the options text.
6
+
7
+ Options are slotted using the `p-multi-select-option` component. Each option needs to have an assigned value, which can be passed via an attribute or property and needs to be of type string. Initial selection states can only be achieved using the value property on the `p-multi-select` component ([More Info](./p-multi-select.md)). Options don't have a selected attribute or property. If an option should be visible but not selectable, it can be disabled by using the `disabled` attribute.
8
+
9
+ **Hint:** The `p-multi-select` utilizes the [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) to render its dropdown on the `#top-layer` which enables it to be shown correctly even when used e.g. within a scroll container.
10
+
11
+ ## Usage
12
+
13
+ ### Do:
14
+
15
+ - Use to search and select one or more options from a list.
16
+ - Use to trigger an action based on a selected option or options.
17
+ - Use with label for better accessibility whenever possible.
18
+ - Use descriptive label text for screen readers when label hidden.
19
+ - Use without label only if the context clearly describes what the component is to be used for and no further explanation is required.
20
+ - Use description text to provide further information that is helpful for the user.
21
+ - Use without a preselection (mandatory field) by default when no other data is available.
22
+ - Use without a preselection (optional field) to make it possible to go back to an empty default.
23
+ - Use with a preselection (mandatory field) if you know a specific selection is desired by the user or a previous step requires a selection or in case of a predictive journey.
24
+ - Use as a mandatory field when a selection of one or more options is necessary to proceed.
25
+ - Use 'dropdown direction' to adjust the flyout's direction to improve the experience.
26
+ - Use 'validation states' error or success to give feedback on the selection.
27
+ - Use common sort order for menu items (frequency of use, alpha or numeric).
28
+
29
+ ### Don't:
30
+
31
+ - Don't use very long option texts.
32
+ - Don’t use it for less than 6 options (otherwise use Checkboxes).
33
+ - Don’t exceed maximum width so the option labels turn multiline.
34
+ - Don't use the same option value twice.
35
+ - Don't use the same option text twice.
36
+
37
+ ## Accessibility support
38
+
39
+ ### Keyboard
40
+
41
+ #### Combobox
42
+
43
+ | Key / state | Function |
44
+ | --- | --- |
45
+ | `Down Arrow` `Up Arrow` `Space` | - Opens the listbox if it is not already displayed without moving focus or changing selection. - DOM focus remains on the combobox. |
46
+
47
+ #### Listbox
48
+
49
+ | Key / state | Function |
50
+ | --- | --- |
51
+ | `Down Arrow` `Up Arrow` | Moves visual focus to the next/previous option. |
52
+ | `Home` `End` | Moves visual focus to the first/last option. |
53
+ | `ESC` | Closes listbox |
54
+ | `Enter` | Selects an option |
55
+
56
+ ### ARIA enhancements
57
+
58
+ #### Internal **ARIA** that is managed by the component:
59
+
60
+ | ARIA | Usage |
61
+ | --- | --- |
62
+ | `aria-labelledby="IDREF"` | References the accessible name of the combobox. |
63
+ | `aria-describedby="IDREF"` | References the accessible description and status messages of the combobox. |
64
+ | `aria-label="STRING"` | References the accessible name of the listbox. |
65
+ | `role="status"`, `role="alert"` | When `message` and `state` prop change, the status message is announced. |
66
+ | `aria-expanded="BOOLEAN"` | Indicates that the listbox element is displayed/hidden. |
67
+ | `aria-controls="IDREF"` | Identifies the element that serves as the listbox. |
68
+ | `aria-hidden="true"` | If `required` attribute is set, the visible indicator is hidden from assistive technologies. |
69
+ | `aria-multiselectable="true"` | Indicates that more than one item from the current selectable descendants can be selected. |
70
+ | `aria-autocomplete="list"` | Indicates that user input effects results of listbox. |
71
+ | `aria-haspopup="listbox"` | Indicates that the combobox will open a listbox. |
72
+ | `aria-required="true"` | Indicates if the element is required. |
73
+
74
+ ## Development considerations
75
+
76
+ ### Disabled state
77
+
78
+ In general, avoid using the `disabled` state. Disabled elements are no longer focusable and may be missed by screen reader users. They can also confuse sighted users if the reason they are disabled is not made clear.
79
+
80
+ ### Common do's and don'ts
81
+
82
+ - **Do** provide a clear, persistent label for what the selection controls.
83
+ - **Do** use meaningful option text so choices are understandable out of context.
84
+ - **Do** use the component state/message API so validation and status changes are announced.
85
+ - **Don't** use a prompt option or adjacent text as a substitute for a field label.
86
+ - **Don't** use `hide-label` without an accessible name.
87
+
88
+ ## API
89
+
90
+ ### Properties
91
+
92
+ | Property | Type | Default | Description |
93
+ | --- | --- | --- | --- |
94
+ | `compact` | `boolean` | `false` | Reduces the control height and padding for a more compact layout. |
95
+ | `description` | `string` | `''` | Sets a supplementary description displayed below the label to provide additional context. |
96
+ | `disabled` | `boolean` | `false` | Disables the multi-select, preventing all interaction. Selected values are not submitted with the form. |
97
+ | `dropdownDirection` | `'down'` `'up'` `'auto'` | `'auto'` | Controls whether the dropdown opens upward (`up`) or downward (`down`), or decides automatically (`auto`). |
98
+ | `form` | `string` | `undefined` | Associates the multi-select with a form element by its ID when not directly nested inside it. |
99
+ | `hideLabel` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Hides the visible label while keeping it accessible to screen readers. Supports responsive breakpoint values. |
100
+ | `label` | `string` | `''` | Sets the visible label text displayed above the multi-select control. |
101
+ | `message` | `string` | `''` | Sets the validation feedback message displayed below the control when `state` is `success` or `error`. |
102
+ | `name` _(required)_ | `string` | `undefined` | Sets the name submitted with the form data to identify the selected values on the server. |
103
+ | `required` | `boolean` | `false` | Marks the multi-select as required — form submission is blocked unless at least one option is selected. |
104
+ | `state` | `'none'` `'error'` `'success'` | `'none'` | Sets the validation state, controlling the visual appearance and style of the feedback message (`none`, `success`, `error`). |
105
+ | `value` | `'array(AllowedTypes.string)'` `'array(AllowedTypes.number)'` `'null'` | `[]` | The selected values. Matches options strictly by type and value, meaning a string value only matches options whose value is the same string, a number value only matches options whose value is the same number. Pass null or [] to clear the selection. Please note that FormData always serializes values as strings, so when participating in a native (uncontrolled) form a number[] value is restored as string[] via formStateRestoreCallback and will no longer strictly match number-typed options. This limitation only applies to native form state restoration; in controlled forms (where the consumer manages value directly via the change event), number[] types are preserved end-to-end. |
106
+
107
+ ### Events
108
+
109
+ | Event | Type | Description |
110
+ | --- | --- | --- |
111
+ | `blur` | `CustomEvent<void>` | Emitted when the multi-select loses focus. |
112
+ | `change` | `CustomEvent<MultiSelectChangeEventDetail>`<br>`{ name: string; value: string[] | number[] }` | Emitted when the user selects or deselects an option, with the updated array of values in the event detail. |
113
+ | `toggle` | `CustomEvent<MultiSelectToggleEventDetail>`<br>`{ open: boolean }` | Emitted when the dropdown opens or closes, with the new open state in the event detail. |
114
+
115
+ ### Controlled properties
116
+
117
+ - `value` — a controlled prop, but the component also updates it internally. Listen for the `change` event to observe changes; you do not have to write the value back.
118
+
119
+ ### Slots
120
+
121
+ | Slot | Required | Allowed tag names | Description |
122
+ | --- | --- | --- | --- |
123
+ | `label` | no | — | Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
124
+ | `label-after` | no | — | Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`). |
125
+ | `description` | no | — | Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
126
+ | `selected` | no | — | Use this slot to provide custom markup for the selected options display in the button area. |
127
+ | _(default)_ | no | — | Default slot for the p-multi-select-option tags. |
128
+ | `options-status` | no | — | When implementing a custom filter with the `filter` slot, use this slot for loading, error and no results status. |
129
+ | `message` | no | — | Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
130
+ | `filter` | no | — | Optional slot for providing a custom `p-input-search` input. When used, the default filter input is replaced and the built-in filter logic is disabled, giving full control over filtering behavior. |
131
+
132
+ ## Sub-components
133
+
134
+ These tags are only valid inside the parent(s) listed under each one — often this component, but some are shared and list a different parent (e.g. a tag documented here via a common ancestor). Their APIs come from the same authoritative `component-meta` as the parent above.
135
+
136
+ ### `p-multi-select-option`
137
+
138
+ Allowed parents: `p-multi-select`, `p-optgroup`.
139
+
140
+ #### Properties
141
+
142
+ | Property | Type | Default | Description |
143
+ | --- | --- | --- | --- |
144
+ | `disabled` | `boolean` | `false` | Disables the option, preventing it from being selected. |
145
+ | `value` _(required)_ | `string | number` | `undefined` | Sets the value submitted with the form data when this option is selected in the parent multi-select. |
146
+
147
+ #### Slots
148
+
149
+ | Slot | Required | Allowed tag names | Description |
150
+ | --- | --- | --- | --- |
151
+ | _(default)_ | no | — | Default slot for the option text. |
152
+
153
+ ### `p-optgroup`
154
+
155
+ Allowed parents: `p-select`, `p-multi-select`.
156
+
157
+ #### Properties
158
+
159
+ | Property | Type | Default | Description |
160
+ | --- | --- | --- | --- |
161
+ | `disabled` | `boolean` | `false` | Disables all options in the group, preventing any of them from being selected. |
162
+ | `label` | `string` | `undefined` | Sets the visible group heading displayed above the grouped options. |
163
+
164
+ #### Slots
165
+
166
+ | Slot | Required | Allowed tag names | Description |
167
+ | --- | --- | --- | --- |
168
+ | _(default)_ | no | — | Default slot for the optgroup content. |
169
+
170
+ ### `p-select-option`
171
+
172
+ Allowed parents: `p-select`, `p-optgroup`.
173
+
174
+ #### Properties
175
+
176
+ | Property | Type | Default | Description |
177
+ | --- | --- | --- | --- |
178
+ | `disabled` | `boolean` | `false` | Prevents the option from being selected and visually dims it to indicate it is unavailable. |
179
+ | `value` | `string | number | null` | `undefined` | Sets the value submitted with the form data when this option is selected in the parent select control. |
180
+
181
+ #### Slots
182
+
183
+ | Slot | Required | Allowed tag names | Description |
184
+ | --- | --- | --- | --- |
185
+ | _(default)_ | no | — | Default slot for the option content. |
186
+
187
+ ## Examples
188
+
189
+ | Example | When to use | File |
190
+ | --- | --- | --- |
191
+ | Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
192
+ | Form | The `p-multi-select` can be integrated into a form in two ways: **controlled** or **uncontrolled**, depending on your needs. | [./examples/Form.ts](./examples/Form.ts) |
193
+ | Slots | Use named slots when `label`, `description` or `message` need markup such as a link. | [./examples/Slots.ts](./examples/Slots.ts) |
194
+ | Set Value | The `p-multi-select` component behaves like regular form elements. | [./examples/SetValue.ts](./examples/SetValue.ts) |
195
+ | With optgroups | With optgroups | [./examples/Optgroups.ts](./examples/Optgroups.ts) |
196
+ | Custom asynchronous filtering | The `p-multi-select` component automatically filters options based on user input. | [./examples/AsyncFilter.ts](./examples/AsyncFilter.ts) |
197
+ | Custom option rendering | By default, `p-multi-select-option` only allows `#text` nodes. | [./examples/SelectedSlot.ts](./examples/SelectedSlot.ts) |
@@ -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-pagination [totalItemsCount]="500" [itemsPerPage]="25" [activePage]="1"></p-pagination>
8
+ `,
9
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
12
+ })
13
+ export class ExampleComponent {}
@@ -0,0 +1,83 @@
1
+ # p-pagination
2
+
3
+ The `p-pagination` component divides large content sets into pages and should be used when all items cannot be displayed at once.
4
+
5
+ To adapt the pagination to the specific viewport context, the amount of displayed page items varies between either `7` (desktop/tablet) or `5` (mobile). The components handles responsive viewport sizing by default.
6
+
7
+ ## Usage
8
+
9
+ ### Do:
10
+
11
+ - Use when splitting large content into multiple pages.
12
+ - Use to provide information on the number of pages available.
13
+ - Use to show the current page position.
14
+ - Use pagination to allow the user to navigate between the pages.
15
+ - Display an ellipsis ("...") for a range of pages if there are at least 6 or 8 pages.
16
+ - Place the pagination centered beneath the related content.
17
+
18
+ ### Don't:
19
+
20
+ - Don't use unnecessarily for small amounts of content.
21
+ - Don't use without providing information on the total number of pages available.
22
+ - Don't use without showing the current page position.
23
+ - Don't use without the option for the user to navigate between pages.
24
+ - Don't place the pagination in an unrelated or confusing position.
25
+
26
+ ## Accessibility support
27
+
28
+ ### Keyboard
29
+
30
+ | Key / state | Function |
31
+ | --- | --- |
32
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
33
+ | `Enter`, `Space` | Activates the item. |
34
+
35
+ ### ARIA enhancements
36
+
37
+ #### Internal **ARIA** that is managed by the component:
38
+
39
+ | ARIA | Usage |
40
+ | --- | --- |
41
+ | `aria-current` | Exposes the current state of the item. |
42
+
43
+ #### External **ARIA** provided by the `intl` property:
44
+
45
+ | ARIA | Usage |
46
+ | --- | --- |
47
+ | `aria-label` | Defines a string value that labels the navigation and interactive elements. |
48
+
49
+ ## Development considerations
50
+
51
+ ### Common do's and don'ts
52
+
53
+ - **Do** localize `intl` strings so navigation labels match the page language.
54
+ - **Do** keep prev/next and page button labels specific enough to identify the pagination control.
55
+ - **Don't** rely on default English `intl` strings on localized pages.
56
+
57
+ ## API
58
+
59
+ ### Properties
60
+
61
+ | Property | Type | Default | Description |
62
+ | --- | --- | --- | --- |
63
+ | `activePage` | `number` | `1` | Sets the one-based index of the currently active page; update this prop to navigate programmatically. |
64
+ | `intl` | `PaginationInternationalization` | `{"root":"Pagination","prev":"Previous page","next":"Next page","page":"Page"}` | Overrides the default ARIA label strings used for the previous, next, and page number buttons to support localisation. |
65
+ | `itemsPerPage` _(required)_ | `number` | `1` | Sets the number of items displayed per page, used together with `totalItemsCount` to compute the page count. |
66
+ | `showLastPage` | `boolean` | `true` | Shows or hides the button that jumps directly to the last page of the pagination. |
67
+ | `totalItemsCount` _(required)_ | `number` | `1` | Sets the total number of items in the dataset, used to calculate the number of pages. |
68
+
69
+ ### Events
70
+
71
+ | Event | Type | Description |
72
+ | --- | --- | --- |
73
+ | `update` | `CustomEvent<PaginationUpdateEventDetail>`<br>`{ page: number; previousPage: number }` | Emitted when the user navigates to a different page, carrying the new `activePage` index in the event detail. |
74
+
75
+ ### Controlled properties
76
+
77
+ - `activePage` — a controlled prop, but the component also updates it internally. Listen for the `update` event to observe changes; you do not have to write the value back.
78
+
79
+ ## Examples
80
+
81
+ | Example | When to use | File |
82
+ | --- | --- | --- |
83
+ | Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
@@ -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-pin-code label="Some label"></p-pin-code>
8
+ `,
9
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
12
+ })
13
+ 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-pin-code label="Some label"></p-pin-code>
8
+ `,
9
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
12
+ })
13
+ export class ExampleComponent {}