@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,107 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import {
3
+ type PStepperHorizontalItemProps,
4
+ PorscheDesignSystemModule,
5
+ StepperHorizontalUpdateEventDetail,
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-stepper-horizontal (update)="onUpdate($event)">
13
+ @for (step of steps; track step) {
14
+ <p-stepper-horizontal-item [state]="step.state">
15
+ {{ step.name }}
16
+ </p-stepper-horizontal-item>
17
+ }
18
+ </p-stepper-horizontal>
19
+
20
+ @for (content of stepContent; track content; let i = $index) {
21
+ @if (getActiveStepIndex(steps) === i) {
22
+ <p-text>{{ content }}</p-text>
23
+ }
24
+ }
25
+
26
+ <div class="flex gap-fluid-sm">
27
+ <p-button
28
+ type="button"
29
+ [icon]="'arrow-head-left'"
30
+ [variant]="'secondary'"
31
+ [disabled]="getActiveStepIndex(steps) === 0"
32
+ (click)="onNextPrevStep('prev')"
33
+ >
34
+ Previous Step
35
+ </p-button>
36
+
37
+ <p-button
38
+ type="button"
39
+ [variant]="'primary'"
40
+ [disabled]="getActiveStepIndex(steps) === steps.length - 1"
41
+ (click)="onNextPrevStep('next')"
42
+ >
43
+ Next Step
44
+ </p-button>
45
+ </div>
46
+ </div>
47
+ `,
48
+ changeDetection: ChangeDetectionStrategy.OnPush,
49
+ standalone: true,
50
+ imports: [PorscheDesignSystemModule],
51
+ })
52
+ export class ExampleComponent {
53
+ steps: StepperHorizontalItemProps[] = [
54
+ {
55
+ state: 'current',
56
+ name: 'Enter personal details',
57
+ },
58
+ {
59
+ name: 'Confirm e-mail',
60
+ },
61
+ {
62
+ name: 'Set password',
63
+ },
64
+ ];
65
+
66
+ stepContent: string[] = [
67
+ 'A form with personal details could be displayed here.',
68
+ 'A form with a verification code input field could be displayed here.',
69
+ 'A form with a password input field could be displayed here.',
70
+ ];
71
+
72
+ getActiveStepIndex(steps: StepperHorizontalItemProps[]): number {
73
+ return steps.findIndex((step) => step.state === 'current');
74
+ }
75
+
76
+ onNextPrevStep(direction: 'next' | 'prev'): void {
77
+ const newState = [...this.steps];
78
+ const activeStepIndex = this.getActiveStepIndex(newState);
79
+
80
+ if (direction === 'next') {
81
+ newState[activeStepIndex].state = 'complete';
82
+ newState[activeStepIndex + 1].state = 'current';
83
+ } else {
84
+ delete newState[activeStepIndex].state;
85
+ newState[activeStepIndex - 1].state = 'current';
86
+ }
87
+
88
+ this.steps = newState;
89
+ }
90
+
91
+ onUpdate(e: CustomEvent<StepperHorizontalUpdateEventDetail>): void {
92
+ const { activeStepIndex } = e.detail;
93
+
94
+ const newState = [...this.steps];
95
+ for (let i = activeStepIndex + 1; i < newState.length; i++) {
96
+ // reset step state when going back via stepper horizontal item click
97
+ delete newState[i].state;
98
+ }
99
+ newState[activeStepIndex].state = 'current';
100
+
101
+ this.steps = newState;
102
+ }
103
+ }
104
+
105
+ type StepperHorizontalItemProps = PStepperHorizontalItemProps & {
106
+ name: string;
107
+ };
@@ -0,0 +1,109 @@
1
+ # p-stepper-horizontal
2
+
3
+ The `p-stepper-horizontal` component displays progress through a sequence of logical and numbered steps. It is ideal when the contents of one step depends on an earlier step. Avoid using long step names.
4
+
5
+ The component does not handle the display of your content. When using the component you have to manually take care of the content to be rendered beneath. To help with this task, if a step is clicked, the component triggers an event called `change` with the index of the clicked step.
6
+
7
+ **Note**: Maximum of 9 steps are supported.
8
+
9
+ It is a controlled component. This means it does not contain any internal state and you got full control over its behavior.
10
+
11
+ Use `p-stepper-horizontal-item`s inside the `p-stepper-horizontal` component. Each item will be rendered as a step. You have to manually manage the state of the items by setting the `state` property.
12
+
13
+ The `state` property can be set to `complete` when a step is complete, `warning` when a user has to revisit the step, `current` for the step that is in progress and `undefined`.
14
+
15
+ If the `state` property is `undefined` the step renders as stateless and disabled. This can be used to prevent the user from navigating to a step which is not yet reachable. This is to be used for future steps which cannot yet be processed at the time.
16
+
17
+ By clicking on a previous step, the `p-stepper-horizontal` emits the `update` event, which contains the index of the clicked step.
18
+
19
+ ## Usage
20
+
21
+ ### Do:
22
+
23
+ - Use to display progress through a sequence of logical and numbered steps.
24
+ - Use when the content of one step depends on an earlier step.
25
+ - Use short and descriptive labels for each step.
26
+ - Make completed steps clickable so that the user can jump back to previous steps.
27
+ - Be aware that the component does not handle the display of your content and you will need to manually take care of the content to be rendered beneath.
28
+ - Consider how you can simplify the component and use between 3-5 steps for the best user experience.
29
+
30
+ ### Don't:
31
+
32
+ - Don't use long step names as it can make the component difficult to use.
33
+ - Don't use more than 9 steps (component has a maximum of 9)
34
+ - Don't forget that if a set of steps can not fit on the screen the stepper becomes horizontally scrollable and navigable with arrows.
35
+
36
+ ## Accessibility support
37
+
38
+ ### Keyboard
39
+
40
+ | Key / state | Function |
41
+ | --- | --- |
42
+ | `Tab`, `Shift-Tab` | Moves focus to the scroll container or to next (or previous) focusable element. |
43
+ | `Enter`, `Space` | Activates the completed and current step-item. |
44
+ | `disabled` | Step-item still focusable. |
45
+
46
+ ### ARIA enhancements
47
+
48
+ #### Internal **ARIA** that is managed by the component:
49
+
50
+ | ARIA | Usage |
51
+ | --- | --- |
52
+ | `role="list"` | Indicates the stepper as list element. |
53
+ | `role="listitem"` | Indicates the step-item as list-item element. |
54
+
55
+ ## Development considerations
56
+
57
+ ### Common do's and don'ts
58
+
59
+ - **Do** provide descriptive text in each step item so progress is understandable out of context.
60
+ - **Do** reflect the current step with the item `state` prop (`current`, `complete`, `warning`).
61
+ - **Don't** use generic labels like "Step 1" without describing the step purpose.
62
+
63
+ ## API
64
+
65
+ ### Properties
66
+
67
+ | Property | Type | Default | Description |
68
+ | --- | --- | --- | --- |
69
+ | `size` | `'small'` `'medium'`<br>`BreakpointCustomizable<StepperHorizontalSize>` | `'small'` | The font size of the step labels. |
70
+
71
+ ### Events
72
+
73
+ | Event | Type | Description |
74
+ | --- | --- | --- |
75
+ | `update` | `CustomEvent<StepperHorizontalUpdateEventDetail>`<br>`{ activeStepIndex: number }` | Emitted when active step is changed. |
76
+
77
+ ### Slots
78
+
79
+ | Slot | Required | Allowed tag names | Description |
80
+ | --- | --- | --- | --- |
81
+ | _(default)_ | no | — | Default slot for the `p-stepper-horizontal-item` tags. |
82
+
83
+ ## Sub-components
84
+
85
+ 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.
86
+
87
+ ### `p-stepper-horizontal-item`
88
+
89
+ Allowed parent: `p-stepper-horizontal`.
90
+
91
+ #### Properties
92
+
93
+ | Property | Type | Default | Description |
94
+ | --- | --- | --- | --- |
95
+ | `disabled` | `boolean` | `false` | Disables the stepper-horizontal-item. No events will be triggered while disabled state is active. |
96
+ | `state` | `undefined` `'current'` `'complete'` `'warning'` | `undefined` | The current progression state of the step. Use `current` for the active step, `complete` for finished steps, `warning` for steps with issues. Leave unset for future steps. |
97
+
98
+ #### Slots
99
+
100
+ | Slot | Required | Allowed tag names | Description |
101
+ | --- | --- | --- | --- |
102
+ | _(default)_ | no | — | Default slot for the content. |
103
+
104
+ ## Examples
105
+
106
+ | Example | When to use | File |
107
+ | --- | --- | --- |
108
+ | Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
109
+ | Framework Implementation | Below you can find an interactive example of an outlined registration process. | [./examples/FrameworkImplementation.ts](./examples/FrameworkImplementation.ts) |
@@ -0,0 +1,21 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule, type SwitchUpdateEventDetail } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-switch [checked]="checked" (update)="onUpdate($event)">
8
+ Some label
9
+ </p-switch>
10
+ `,
11
+ changeDetection: ChangeDetectionStrategy.OnPush,
12
+ standalone: true,
13
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
14
+ })
15
+ export class ExampleComponent {
16
+ checked = false;
17
+
18
+ onUpdate(e: CustomEvent<SwitchUpdateEventDetail>) {
19
+ this.checked = e.detail.checked;
20
+ }
21
+ }
@@ -0,0 +1,103 @@
1
+ # p-switch
2
+
3
+ The `p-switch` component is a control that is used to quickly switch between two possible states. A switch is only used for these binary actions that occur immediately after the user “flips the switch”. Commonly it is used for “on/off” state.
4
+
5
+ It is a controlled component. This means it does not contain any internal state, and you got full control over its behavior.
6
+
7
+ The `p-switch` component can be used with a visible or hidden label, but it's recommended to keep the label visible for better accessibility whenever possible. A `label` is a caption which informs the user which action is followed by interaction. When used with hidden label, it's best practice to provide a descriptive label text for screen readers.
8
+
9
+ You can use native `click`, `focus`, `focusin`, `blur` and `focusout` events on the `p-switch`.
10
+
11
+ ## Usage
12
+
13
+ ### Do:
14
+
15
+ - Use it when an instant response to applied settings is required without explicit action.
16
+ - Use to enable or disable a mode, feature, or function.
17
+ - Use when the user is toggling independent features or behaviors.
18
+ - Use the label to describe the affected property.
19
+ - Use the right-aligned version for lists (especially for handling on mobile devices).
20
+ - Use the stretched version for lists on mobile or smaller containers.
21
+
22
+ ### Don't:
23
+
24
+ - Don't use it if a setting requires a button press before it can take effect (use a [Checkbox](../p-checkbox/p-checkbox.md) instead).
25
+ - Don't use anything longer than two words in the label whenever possible.
26
+ - Don't use the switch for multiple-choice questions.
27
+ - Don't use slide Switch when an intermediate state is required (Use [Checkbox](../p-checkbox/p-checkbox.md) instead).
28
+ - Don't use the label to describe the state of the component.
29
+
30
+ ---
31
+
32
+ ## Related Components
33
+
34
+ - [Checkbox](../p-checkbox/p-checkbox.md)
35
+ - [Button](../p-button/p-button.md)
36
+
37
+ ## Accessibility support
38
+
39
+ ### Keyboard
40
+
41
+ | Key / state | Function |
42
+ | --- | --- |
43
+ | `Tab`, `Shift-Tab` | Moves focus to the scroll container or to next (or previous) focusable element. |
44
+ | `Enter`, `Space` | Activates the completed and current step-item. |
45
+ | `disabled` | Step-item still focusable. |
46
+
47
+ ### ARIA enhancements
48
+
49
+ #### Internal **ARIA** that is managed by the component:
50
+
51
+ | ARIA | Usage |
52
+ | --- | --- |
53
+ | `role="switch"` | Indicates the element as switch element. |
54
+ | `aria-checked="BOOLEAN"` | Indicates the status of the switch element. |
55
+ | `role="status"` | When `loading` prop is set, the component announces the loading state (start and finish). |
56
+
57
+ ## Development considerations
58
+
59
+ ### Labelling
60
+
61
+ The switch accessible name comes from the default slot. Provide concise, descriptive text that states what the switch controls and its on/off meaning.
62
+
63
+ ### Common do's and don'ts
64
+
65
+ - **Do** provide a clear slotted label that describes what the switch controls.
66
+ - **Do** use `hide-label` only when the label text remains in the slot for screen readers.
67
+ - **Don't** use an icon or visual state alone without descriptive label text.
68
+
69
+ ## API
70
+
71
+ ### Properties
72
+
73
+ | Property | Type | Default | Description |
74
+ | --- | --- | --- | --- |
75
+ | `alignLabel` | `'start'` `'end'`<br>`BreakpointCustomizable<SwitchAlignLabel>` | `'end'` | Sets the position of the slotted label relative to the switch toggle, either before (`start`) or after (`end`) it. Supports responsive breakpoint values. |
76
+ | `checked` | `boolean` | `false` | Reflects the switch's current on/off state and allows setting the initial checked value when the component first renders. |
77
+ | `compact` | `boolean` | `false` | Reduces the switch size and spacing for use in dense layouts where vertical space is limited. |
78
+ | `disabled` | `boolean` | `false` | Prevents user interaction with the switch and blocks all click and keyboard events while it is disabled. |
79
+ | `hideLabel` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Hides the visible label while keeping it accessible to screen readers. Supports responsive breakpoint values. |
80
+ | `loading` | `boolean` | `false` | Disables the switch and shows a loading spinner to indicate an ongoing asynchronous toggle operation. |
81
+ | `stretch` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Expands the space between the switch toggle and its label to fill the full available width of the container. Supports responsive breakpoint values. |
82
+
83
+ ### Events
84
+
85
+ | Event | Type | Description |
86
+ | --- | --- | --- |
87
+ | `update` | `CustomEvent<SwitchUpdateEventDetail>`<br>`{ checked: boolean }` | Emitted when the user toggles the switch, carrying the new `checked` state in the event detail. |
88
+
89
+ ### Controlled properties
90
+
91
+ - `checked` — a controlled prop: the component does **not** update it itself. Handle the `update` event and assign the new value to `checked` yourself, or the change will not take effect.
92
+
93
+ ### Slots
94
+
95
+ | Slot | Required | Allowed tag names | Description |
96
+ | --- | --- | --- | --- |
97
+ | _(default)_ | no | — | Default slot for the label. |
98
+
99
+ ## Examples
100
+
101
+ | Example | When to use | File |
102
+ | --- | --- | --- |
103
+ | Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
@@ -0,0 +1,162 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule, TableUpdateEventDetail } from '@porsche-design-system/components-angular';
3
+
4
+ type HeadAdvanced = {
5
+ id: string;
6
+ name: string;
7
+ hideLabel: boolean;
8
+ active?: boolean;
9
+ direction?: 'asc' | 'desc';
10
+ };
11
+
12
+ const headAdvanced: HeadAdvanced[] = [
13
+ { name: 'Model', id: 'model' } as HeadAdvanced,
14
+ { name: 'Interest', id: 'interest' } as HeadAdvanced,
15
+ { name: 'VIN', id: 'vin' } as HeadAdvanced,
16
+ { name: 'Purchase Intention', id: 'purchaseIntention' } as HeadAdvanced,
17
+ { name: 'Status', id: 'status' } as HeadAdvanced,
18
+ { name: 'Comment', id: 'comment' } as HeadAdvanced,
19
+ { name: 'Lead ID', id: 'leadId' } as HeadAdvanced,
20
+ { name: 'Select Wrapper', id: 'selectWrapper' } as HeadAdvanced,
21
+ { name: 'Select', id: 'select' } as HeadAdvanced,
22
+ { name: 'Multi-Select', id: 'multiSelect' } as HeadAdvanced,
23
+ { name: 'Action', id: 'action', hideLabel: true } as HeadAdvanced,
24
+ ].map((item, i) => ({
25
+ ...item,
26
+ ...(i > 0 &&
27
+ i < 7 &&
28
+ i !== 5 && {
29
+ active: i === 1,
30
+ direction: 'asc',
31
+ }),
32
+ }));
33
+
34
+ type DataAdvanced = {
35
+ imageUrl: string;
36
+ model: string;
37
+ date: string;
38
+ interest: string;
39
+ vin: string;
40
+ purchaseIntention: string;
41
+ status: string;
42
+ comment: string;
43
+ leadId: string;
44
+ };
45
+
46
+ const dataAdvanced: DataAdvanced[] = [
47
+ {
48
+ imageUrl: 'assets/718.png',
49
+ model: '718',
50
+ date: '23.06.2021',
51
+ interest: 'New Car',
52
+ vin: '1FM5K7F84FGB16304',
53
+ purchaseIntention: '08/2021',
54
+ status: 'Won',
55
+ comment: '-',
56
+ leadId: '0000824402',
57
+ },
58
+ {
59
+ imageUrl: 'assets/panamera.png',
60
+ model: 'Panamera',
61
+ date: '19.06.2021',
62
+ interest: 'New Car',
63
+ vin: '2GCEC13T141374801',
64
+ purchaseIntention: '11/2021',
65
+ status: 'Lost',
66
+ comment: 'Some multiline text and a column with a min width.',
67
+ leadId: '0000824409',
68
+ },
69
+ {
70
+ imageUrl: 'assets/911.png',
71
+ model: '911',
72
+ date: '19.05.2021',
73
+ interest: 'Used Car',
74
+ vin: '5GAKVCKD8EJ335750',
75
+ purchaseIntention: '09/2021',
76
+ status: 'Won',
77
+ comment: '-',
78
+ leadId: '0000824408',
79
+ },
80
+ {
81
+ imageUrl: 'assets/macan.png',
82
+ model: 'Macan',
83
+ date: '10.05.2021',
84
+ interest: 'Used Car',
85
+ vin: '1FMPU17L83LC09302',
86
+ purchaseIntention: '07/2021',
87
+ status: 'Lost',
88
+ comment: '-',
89
+ leadId: '0000824407',
90
+ },
91
+ {
92
+ imageUrl: 'assets/taycan.png',
93
+ model: 'Taycan',
94
+ date: '03.05.2021',
95
+ interest: 'New Car',
96
+ vin: 'JN1BY1AR3BM375187',
97
+ purchaseIntention: '05/2021',
98
+ status: 'Won',
99
+ comment: '-',
100
+ leadId: '0000824406',
101
+ },
102
+ ];
103
+
104
+ @Component({
105
+ selector: 'porsche-design-system-app',
106
+ template: `
107
+ <p-table (update)="onUpdate($event)">
108
+ <p-heading slot="caption" size="large" tag="h3">Some visual caption</p-heading>
109
+ <p-table-head>
110
+ <p-table-head-row>
111
+ @for (item of head; track item) {
112
+ <p-table-head-cell [sort]="item" [hideLabel]="item.hideLabel">
113
+ {{ item.name }}
114
+ </p-table-head-cell>
115
+ }
116
+ </p-table-head-row>
117
+ </p-table-head>
118
+ <p-table-body>
119
+ @for (item of data; track item) {
120
+ <p-table-row>
121
+ <p-table-cell>
122
+ <div style="display: flex;">
123
+ <img src="{{ item.imageUrl }}" width="80" height="45" style="margin-right: .5rem; object-fit: contain; max-width: none;" alt="" />
124
+ <div>
125
+ <p-text weight="semi-bold">{{ item.model }}</p-text>
126
+ <p-text size="x-small">{{ item.date }}</p-text>
127
+ </div>
128
+ </div>
129
+ </p-table-cell>
130
+ <p-table-cell>{{ item.interest }}</p-table-cell>
131
+ <p-table-cell>
132
+ <a href="https://porsche.com">{{ item.vin }}</a>
133
+ </p-table-cell>
134
+ <p-table-cell>{{ item.purchaseIntention }}</p-table-cell>
135
+ <p-table-cell>{{ item.status }}</p-table-cell>
136
+ <p-table-cell [multiline]="true" style="min-width: 10rem;">{{ item.comment }}</p-table-cell>
137
+ <p-table-cell>{{ item.leadId }}</p-table-cell>
138
+ <p-table-cell>
139
+ <p-button-pure icon="edit" style="padding: .5rem">Edit</p-button-pure>
140
+ <p-button-pure icon="delete" style="padding: .5rem">Delete</p-button-pure>
141
+ </p-table-cell>
142
+ </p-table-row>
143
+ }
144
+ </p-table-body>
145
+ </p-table>
146
+ `,
147
+ changeDetection: ChangeDetectionStrategy.OnPush,
148
+ standalone: true,
149
+ imports: [PorscheDesignSystemModule],
150
+ })
151
+ export class ExampleComponent {
152
+ public head = headAdvanced;
153
+ public data = dataAdvanced;
154
+
155
+ onUpdate(e: CustomEvent<TableUpdateEventDetail>): void {
156
+ const { id, direction } = e.detail as TableUpdateEventDetail & { id: keyof DataAdvanced };
157
+ this.head = this.head.map((item) => ({ ...item, active: false, ...(item.id === id && e.detail) }));
158
+ this.data = [...this.data].sort((a, b) =>
159
+ direction === 'asc' ? a[id].localeCompare(b[id]) : b[id].localeCompare(a[id])
160
+ );
161
+ }
162
+ }
@@ -0,0 +1,40 @@
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-table caption="Some caption">
8
+ <p-table-head>
9
+ <p-table-head-row>
10
+ <p-table-head-cell>
11
+ Column 1
12
+ </p-table-head-cell>
13
+ <p-table-head-cell>
14
+ Column 2
15
+ </p-table-head-cell>
16
+ <p-table-head-cell>
17
+ Column 3
18
+ </p-table-head-cell>
19
+ </p-table-head-row>
20
+ </p-table-head>
21
+ <p-table-body>
22
+ <p-table-row>
23
+ <p-table-cell>
24
+ Cell 1
25
+ </p-table-cell>
26
+ <p-table-cell>
27
+ Cell 2
28
+ </p-table-cell>
29
+ <p-table-cell>
30
+ Cell 3
31
+ </p-table-cell>
32
+ </p-table-row>
33
+ </p-table-body>
34
+ </p-table>
35
+ `,
36
+ changeDetection: ChangeDetectionStrategy.OnPush,
37
+ standalone: true,
38
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
39
+ })
40
+ export class ExampleComponent {}
@@ -0,0 +1,43 @@
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-table>
8
+ <p-heading slot="caption" size="large" tag="h3">
9
+ Some slotted caption
10
+ </p-heading>
11
+ <p-table-head>
12
+ <p-table-head-row>
13
+ <p-table-head-cell>
14
+ Column 1
15
+ </p-table-head-cell>
16
+ <p-table-head-cell>
17
+ Column 2
18
+ </p-table-head-cell>
19
+ <p-table-head-cell>
20
+ Column 3
21
+ </p-table-head-cell>
22
+ </p-table-head-row>
23
+ </p-table-head>
24
+ <p-table-body>
25
+ <p-table-row>
26
+ <p-table-cell>
27
+ Cell 1
28
+ </p-table-cell>
29
+ <p-table-cell>
30
+ Cell 2
31
+ </p-table-cell>
32
+ <p-table-cell>
33
+ Cell 3
34
+ </p-table-cell>
35
+ </p-table-row>
36
+ </p-table-body>
37
+ </p-table>
38
+ `,
39
+ changeDetection: ChangeDetectionStrategy.OnPush,
40
+ standalone: true,
41
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
42
+ })
43
+ export class ExampleComponent {}