@porsche-design-system/components-react 4.5.0 → 4.6.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/bin/pds-skill.js +259 -0
  3. package/esm/lib/components/button.wrapper.d.ts +2 -2
  4. package/esm/lib/components/link.wrapper.d.ts +2 -2
  5. package/package.json +4 -3
  6. package/skill/SKILL.md +136 -0
  7. package/skill/references/components/p-accordion/examples/Default.tsx +24 -0
  8. package/skill/references/components/p-accordion/examples/InteractiveElementsInSummary.tsx +28 -0
  9. package/skill/references/components/p-accordion/examples/StickySummary.tsx +24 -0
  10. package/skill/references/components/p-accordion/p-accordion.md +95 -0
  11. package/skill/references/components/p-ai-tag/examples/Default.tsx +10 -0
  12. package/skill/references/components/p-ai-tag/examples/WithinCheckbox.tsx +30 -0
  13. package/skill/references/components/p-ai-tag/examples/WithinFormLabel.tsx +37 -0
  14. package/skill/references/components/p-ai-tag/examples/WithinImage.tsx +13 -0
  15. package/skill/references/components/p-ai-tag/examples/WithinInputSearch.tsx +12 -0
  16. package/skill/references/components/p-ai-tag/examples/WithinRadioGroup.tsx +29 -0
  17. package/skill/references/components/p-ai-tag/examples/WithinTable.tsx +91 -0
  18. package/skill/references/components/p-ai-tag/examples/WithinText.tsx +14 -0
  19. package/skill/references/components/p-ai-tag/p-ai-tag.md +47 -0
  20. package/skill/references/components/p-banner/examples/Customization.tsx +35 -0
  21. package/skill/references/components/p-banner/examples/Default.tsx +24 -0
  22. package/skill/references/components/p-banner/p-banner.md +92 -0
  23. package/skill/references/components/p-button/examples/Default.tsx +12 -0
  24. package/skill/references/components/p-button/examples/Form.tsx +28 -0
  25. package/skill/references/components/p-button/examples/FormAttribute.tsx +31 -0
  26. package/skill/references/components/p-button/p-button.md +118 -0
  27. package/skill/references/components/p-button-pure/examples/CustomClickableArea.tsx +12 -0
  28. package/skill/references/components/p-button-pure/examples/Default.tsx +12 -0
  29. package/skill/references/components/p-button-pure/examples/Form.tsx +28 -0
  30. package/skill/references/components/p-button-pure/examples/FormAttribute.tsx +32 -0
  31. package/skill/references/components/p-button-pure/p-button-pure.md +118 -0
  32. package/skill/references/components/p-button-tile/examples/ColorScheme.tsx +15 -0
  33. package/skill/references/components/p-button-tile/examples/Default.tsx +18 -0
  34. package/skill/references/components/p-button-tile/examples/FooterSlot.tsx +29 -0
  35. package/skill/references/components/p-button-tile/examples/Hyphens.tsx +33 -0
  36. package/skill/references/components/p-button-tile/examples/UiBehaviour.tsx +41 -0
  37. package/skill/references/components/p-button-tile/p-button-tile.md +115 -0
  38. package/skill/references/components/p-canvas/examples/Default.tsx +10 -0
  39. package/skill/references/components/p-canvas/p-canvas.md +91 -0
  40. package/skill/references/components/p-carousel/examples/Default.tsx +23 -0
  41. package/skill/references/components/p-carousel/examples/DynamicSlides.tsx +32 -0
  42. package/skill/references/components/p-carousel/examples/FlexibleWidths.tsx +29 -0
  43. package/skill/references/components/p-carousel/examples/FocusOnCenterSlide.tsx +56 -0
  44. package/skill/references/components/p-carousel/examples/Intl.tsx +20 -0
  45. package/skill/references/components/p-carousel/examples/JumpToSlide.tsx +42 -0
  46. package/skill/references/components/p-carousel/p-carousel.md +142 -0
  47. package/skill/references/components/p-checkbox/examples/Default.tsx +10 -0
  48. package/skill/references/components/p-checkbox/examples/Form.tsx +45 -0
  49. package/skill/references/components/p-checkbox/examples/Indeterminate.tsx +13 -0
  50. package/skill/references/components/p-checkbox/examples/Slots.tsx +54 -0
  51. package/skill/references/components/p-checkbox/examples/WrappedLabel.tsx +24 -0
  52. package/skill/references/components/p-checkbox/p-checkbox.md +122 -0
  53. package/skill/references/components/p-crest/examples/CustomClickableArea.tsx +10 -0
  54. package/skill/references/components/p-crest/examples/Default.tsx +10 -0
  55. package/skill/references/components/p-crest/examples/Link.tsx +10 -0
  56. package/skill/references/components/p-crest/p-crest.md +65 -0
  57. package/skill/references/components/p-display/examples/Color.tsx +12 -0
  58. package/skill/references/components/p-display/examples/Default.tsx +12 -0
  59. package/skill/references/components/p-display/examples/Semantics.tsx +18 -0
  60. package/skill/references/components/p-display/examples/Size.tsx +12 -0
  61. package/skill/references/components/p-display/examples/SizeResponsive.tsx +12 -0
  62. package/skill/references/components/p-display/p-display.md +78 -0
  63. package/skill/references/components/p-divider/examples/Default.tsx +10 -0
  64. package/skill/references/components/p-divider/examples/Responsive.tsx +12 -0
  65. package/skill/references/components/p-divider/examples/Vertical.tsx +12 -0
  66. package/skill/references/components/p-divider/p-divider.md +49 -0
  67. package/skill/references/components/p-drilldown/examples/CustomContent.tsx +164 -0
  68. package/skill/references/components/p-drilldown/examples/Default.tsx +117 -0
  69. package/skill/references/components/p-drilldown/p-drilldown.md +168 -0
  70. package/skill/references/components/p-fieldset/examples/Default.tsx +12 -0
  71. package/skill/references/components/p-fieldset/examples/Required.tsx +13 -0
  72. package/skill/references/components/p-fieldset/examples/SlottedLabel.tsx +15 -0
  73. package/skill/references/components/p-fieldset/examples/SlottedMessage.tsx +15 -0
  74. package/skill/references/components/p-fieldset/p-fieldset.md +88 -0
  75. package/skill/references/components/p-flag/examples/Default.tsx +10 -0
  76. package/skill/references/components/p-flag/examples/ResponsiveSize.tsx +10 -0
  77. package/skill/references/components/p-flag/examples/Size.tsx +13 -0
  78. package/skill/references/components/p-flag/examples/SizeCssVar.tsx +10 -0
  79. package/skill/references/components/p-flag/p-flag.md +68 -0
  80. package/skill/references/components/p-flyout/examples/CustomStyling.tsx +45 -0
  81. package/skill/references/components/p-flyout/examples/Default.tsx +42 -0
  82. package/skill/references/components/p-flyout/examples/Form.tsx +54 -0
  83. package/skill/references/components/p-flyout/examples/StickyTop.tsx +42 -0
  84. package/skill/references/components/p-flyout/p-flyout.md +128 -0
  85. package/skill/references/components/p-heading/examples/Color.tsx +12 -0
  86. package/skill/references/components/p-heading/examples/Default.tsx +12 -0
  87. package/skill/references/components/p-heading/examples/Semantics.tsx +18 -0
  88. package/skill/references/components/p-heading/p-heading.md +78 -0
  89. package/skill/references/components/p-icon/examples/Color.tsx +13 -0
  90. package/skill/references/components/p-icon/examples/ColorCssVar.tsx +10 -0
  91. package/skill/references/components/p-icon/examples/Custom.tsx +10 -0
  92. package/skill/references/components/p-icon/examples/Default.tsx +10 -0
  93. package/skill/references/components/p-icon/examples/Overview.tsx +588 -0
  94. package/skill/references/components/p-icon/examples/ResponsiveSize.tsx +10 -0
  95. package/skill/references/components/p-icon/examples/Size.tsx +13 -0
  96. package/skill/references/components/p-icon/examples/SizeCssVar.tsx +10 -0
  97. package/skill/references/components/p-icon/p-icon.md +88 -0
  98. package/skill/references/components/p-inline-notification/examples/ActionButton.tsx +25 -0
  99. package/skill/references/components/p-inline-notification/examples/Default.tsx +10 -0
  100. package/skill/references/components/p-inline-notification/examples/EventHandling.tsx +25 -0
  101. package/skill/references/components/p-inline-notification/p-inline-notification.md +74 -0
  102. package/skill/references/components/p-input-date/examples/Default.tsx +10 -0
  103. package/skill/references/components/p-input-date/examples/Form.tsx +45 -0
  104. package/skill/references/components/p-input-date/examples/Slots.tsx +41 -0
  105. package/skill/references/components/p-input-date/p-input-date.md +142 -0
  106. package/skill/references/components/p-input-email/examples/Default.tsx +10 -0
  107. package/skill/references/components/p-input-email/examples/Form.tsx +51 -0
  108. package/skill/references/components/p-input-email/examples/Slots.tsx +41 -0
  109. package/skill/references/components/p-input-email/p-input-email.md +146 -0
  110. package/skill/references/components/p-input-month/examples/Default.tsx +10 -0
  111. package/skill/references/components/p-input-month/examples/Form.tsx +45 -0
  112. package/skill/references/components/p-input-month/examples/Slots.tsx +41 -0
  113. package/skill/references/components/p-input-month/p-input-month.md +142 -0
  114. package/skill/references/components/p-input-number/examples/Default.tsx +10 -0
  115. package/skill/references/components/p-input-number/examples/Form.tsx +51 -0
  116. package/skill/references/components/p-input-number/examples/Slots.tsx +41 -0
  117. package/skill/references/components/p-input-number/p-input-number.md +150 -0
  118. package/skill/references/components/p-input-password/examples/Default.tsx +10 -0
  119. package/skill/references/components/p-input-password/examples/Form.tsx +51 -0
  120. package/skill/references/components/p-input-password/examples/Slots.tsx +39 -0
  121. package/skill/references/components/p-input-password/examples/Toggle.tsx +10 -0
  122. package/skill/references/components/p-input-password/p-input-password.md +145 -0
  123. package/skill/references/components/p-input-search/examples/AriaCombobox.tsx +35 -0
  124. package/skill/references/components/p-input-search/examples/Default.tsx +10 -0
  125. package/skill/references/components/p-input-search/examples/Form.tsx +52 -0
  126. package/skill/references/components/p-input-search/examples/Slots.tsx +41 -0
  127. package/skill/references/components/p-input-search/p-input-search.md +182 -0
  128. package/skill/references/components/p-input-tel/examples/Default.tsx +10 -0
  129. package/skill/references/components/p-input-tel/examples/Form.tsx +45 -0
  130. package/skill/references/components/p-input-tel/examples/Slots.tsx +41 -0
  131. package/skill/references/components/p-input-tel/p-input-tel.md +145 -0
  132. package/skill/references/components/p-input-text/examples/Controlled.tsx +36 -0
  133. package/skill/references/components/p-input-text/examples/Default.tsx +10 -0
  134. package/skill/references/components/p-input-text/examples/Form.tsx +45 -0
  135. package/skill/references/components/p-input-text/examples/Slots.tsx +41 -0
  136. package/skill/references/components/p-input-text/p-input-text.md +150 -0
  137. package/skill/references/components/p-input-time/examples/Default.tsx +10 -0
  138. package/skill/references/components/p-input-time/examples/Form.tsx +45 -0
  139. package/skill/references/components/p-input-time/examples/Slots.tsx +41 -0
  140. package/skill/references/components/p-input-time/p-input-time.md +144 -0
  141. package/skill/references/components/p-input-url/examples/Default.tsx +10 -0
  142. package/skill/references/components/p-input-url/examples/Form.tsx +45 -0
  143. package/skill/references/components/p-input-url/examples/Slots.tsx +41 -0
  144. package/skill/references/components/p-input-url/p-input-url.md +145 -0
  145. package/skill/references/components/p-input-week/examples/Default.tsx +10 -0
  146. package/skill/references/components/p-input-week/examples/Form.tsx +45 -0
  147. package/skill/references/components/p-input-week/examples/Slots.tsx +41 -0
  148. package/skill/references/components/p-input-week/p-input-week.md +142 -0
  149. package/skill/references/components/p-link/examples/Default.tsx +12 -0
  150. package/skill/references/components/p-link/examples/FrameworkRouting.tsx +14 -0
  151. package/skill/references/components/p-link/examples/Icon.tsx +17 -0
  152. package/skill/references/components/p-link/p-link.md +101 -0
  153. package/skill/references/components/p-link-pure/examples/CustomClickableArea.tsx +12 -0
  154. package/skill/references/components/p-link-pure/examples/Default.tsx +12 -0
  155. package/skill/references/components/p-link-pure/examples/FrameworkRouting.tsx +14 -0
  156. package/skill/references/components/p-link-pure/examples/Icon.tsx +17 -0
  157. package/skill/references/components/p-link-pure/p-link-pure.md +110 -0
  158. package/skill/references/components/p-link-tile/examples/ColorScheme.tsx +15 -0
  159. package/skill/references/components/p-link-tile/examples/Default.tsx +18 -0
  160. package/skill/references/components/p-link-tile/examples/FooterSlot.tsx +29 -0
  161. package/skill/references/components/p-link-tile/examples/Hyphens.tsx +34 -0
  162. package/skill/references/components/p-link-tile/examples/UiBehaviour.tsx +41 -0
  163. package/skill/references/components/p-link-tile/examples/WithVideo.tsx +15 -0
  164. package/skill/references/components/p-link-tile/p-link-tile.md +105 -0
  165. package/skill/references/components/p-link-tile-product/examples/Default.tsx +22 -0
  166. package/skill/references/components/p-link-tile-product/examples/FrameworkRouting.tsx +25 -0
  167. package/skill/references/components/p-link-tile-product/p-link-tile-product.md +93 -0
  168. package/skill/references/components/p-modal/examples/AlertDialog.tsx +39 -0
  169. package/skill/references/components/p-modal/examples/CustomStyling.tsx +26 -0
  170. package/skill/references/components/p-modal/examples/Default.tsx +39 -0
  171. package/skill/references/components/p-modal/examples/Scrollable.tsx +43 -0
  172. package/skill/references/components/p-modal/p-modal.md +135 -0
  173. package/skill/references/components/p-model-signature/examples/CustomStyling.tsx +14 -0
  174. package/skill/references/components/p-model-signature/examples/Default.tsx +10 -0
  175. package/skill/references/components/p-model-signature/examples/MaskBlendMode.tsx +32 -0
  176. package/skill/references/components/p-model-signature/examples/MaskImage.tsx +12 -0
  177. package/skill/references/components/p-model-signature/examples/MaskVideo.tsx +12 -0
  178. package/skill/references/components/p-model-signature/examples/SafeZone.tsx +60 -0
  179. package/skill/references/components/p-model-signature/p-model-signature.md +62 -0
  180. package/skill/references/components/p-multi-select/examples/AsyncFilter.tsx +136 -0
  181. package/skill/references/components/p-multi-select/examples/Default.tsx +29 -0
  182. package/skill/references/components/p-multi-select/examples/Form.tsx +53 -0
  183. package/skill/references/components/p-multi-select/examples/Optgroups.tsx +42 -0
  184. package/skill/references/components/p-multi-select/examples/SelectedSlot.tsx +94 -0
  185. package/skill/references/components/p-multi-select/examples/SetValue.tsx +80 -0
  186. package/skill/references/components/p-multi-select/examples/Slots.tsx +48 -0
  187. package/skill/references/components/p-multi-select/p-multi-select.md +197 -0
  188. package/skill/references/components/p-pagination/examples/Default.tsx +10 -0
  189. package/skill/references/components/p-pagination/p-pagination.md +83 -0
  190. package/skill/references/components/p-pin-code/examples/CopyPaste.tsx +10 -0
  191. package/skill/references/components/p-pin-code/examples/Default.tsx +10 -0
  192. package/skill/references/components/p-pin-code/examples/Form.tsx +45 -0
  193. package/skill/references/components/p-pin-code/examples/Slots.tsx +39 -0
  194. package/skill/references/components/p-pin-code/p-pin-code.md +109 -0
  195. package/skill/references/components/p-popover/examples/Default.tsx +14 -0
  196. package/skill/references/components/p-popover/examples/SlottedButton.tsx +15 -0
  197. package/skill/references/components/p-popover/p-popover.md +116 -0
  198. package/skill/references/components/p-radio-group/examples/Default.tsx +17 -0
  199. package/skill/references/components/p-radio-group/examples/Form.tsx +53 -0
  200. package/skill/references/components/p-radio-group/examples/Slots.tsx +69 -0
  201. package/skill/references/components/p-radio-group/p-radio-group.md +157 -0
  202. package/skill/references/components/p-scroller/examples/Default.tsx +51 -0
  203. package/skill/references/components/p-scroller/examples/Height.tsx +26 -0
  204. package/skill/references/components/p-scroller/examples/ScrollToPosition.tsx +58 -0
  205. package/skill/references/components/p-scroller/p-scroller.md +93 -0
  206. package/skill/references/components/p-segmented-control/examples/Default.tsx +26 -0
  207. package/skill/references/components/p-segmented-control/examples/Form.tsx +52 -0
  208. package/skill/references/components/p-segmented-control/examples/Slots.tsx +54 -0
  209. package/skill/references/components/p-segmented-control/examples/WithLabels.tsx +26 -0
  210. package/skill/references/components/p-segmented-control/p-segmented-control.md +162 -0
  211. package/skill/references/components/p-select/examples/AsyncFilter.tsx +136 -0
  212. package/skill/references/components/p-select/examples/Default.tsx +29 -0
  213. package/skill/references/components/p-select/examples/Form.tsx +53 -0
  214. package/skill/references/components/p-select/examples/Optgroups.tsx +42 -0
  215. package/skill/references/components/p-select/examples/Required.tsx +48 -0
  216. package/skill/references/components/p-select/examples/SelectedSlot.tsx +124 -0
  217. package/skill/references/components/p-select/examples/SetValue.tsx +80 -0
  218. package/skill/references/components/p-select/examples/Slots.tsx +48 -0
  219. package/skill/references/components/p-select/examples/SlottedImages.tsx +35 -0
  220. package/skill/references/components/p-select/p-select.md +194 -0
  221. package/skill/references/components/p-sheet/examples/Default.tsx +31 -0
  222. package/skill/references/components/p-sheet/p-sheet.md +121 -0
  223. package/skill/references/components/p-spinner/examples/Color.tsx +13 -0
  224. package/skill/references/components/p-spinner/examples/ColorCssVar.tsx +10 -0
  225. package/skill/references/components/p-spinner/examples/Default.tsx +10 -0
  226. package/skill/references/components/p-spinner/examples/ResponsiveSize.tsx +10 -0
  227. package/skill/references/components/p-spinner/examples/Size.tsx +13 -0
  228. package/skill/references/components/p-spinner/examples/SizeCssVar.tsx +10 -0
  229. package/skill/references/components/p-spinner/p-spinner.md +96 -0
  230. package/skill/references/components/p-stepper-horizontal/examples/Default.tsx +23 -0
  231. package/skill/references/components/p-stepper-horizontal/examples/FrameworkImplementation.tsx +100 -0
  232. package/skill/references/components/p-stepper-horizontal/p-stepper-horizontal.md +109 -0
  233. package/skill/references/components/p-switch/examples/Default.tsx +19 -0
  234. package/skill/references/components/p-switch/p-switch.md +103 -0
  235. package/skill/references/components/p-table/examples/Advanced.tsx +186 -0
  236. package/skill/references/components/p-table/examples/CaptionProperty.tsx +37 -0
  237. package/skill/references/components/p-table/examples/CaptionSlot.tsx +40 -0
  238. package/skill/references/components/p-table/examples/Default.tsx +117 -0
  239. package/skill/references/components/p-table/examples/HideLabel.tsx +37 -0
  240. package/skill/references/components/p-table/examples/LayoutFixed.tsx +50 -0
  241. package/skill/references/components/p-table/examples/Sorting.tsx +86 -0
  242. package/skill/references/components/p-table/p-table.md +189 -0
  243. package/skill/references/components/p-tabs/examples/ActiveTab.tsx +26 -0
  244. package/skill/references/components/p-tabs/examples/Default.tsx +26 -0
  245. package/skill/references/components/p-tabs/examples/Gradient.tsx +111 -0
  246. package/skill/references/components/p-tabs/examples/Labelling.tsx +26 -0
  247. package/skill/references/components/p-tabs/p-tabs.md +136 -0
  248. package/skill/references/components/p-tabs-bar/examples/Default.tsx +27 -0
  249. package/skill/references/components/p-tabs-bar/examples/Gradient.tsx +78 -0
  250. package/skill/references/components/p-tabs-bar/examples/Labelling.tsx +27 -0
  251. package/skill/references/components/p-tabs-bar/examples/Links.tsx +20 -0
  252. package/skill/references/components/p-tabs-bar/p-tabs-bar.md +181 -0
  253. package/skill/references/components/p-tag/examples/Default.tsx +12 -0
  254. package/skill/references/components/p-tag/examples/Multiline.tsx +14 -0
  255. package/skill/references/components/p-tag/examples/SlottedButton.tsx +41 -0
  256. package/skill/references/components/p-tag/examples/SlottedLink.tsx +41 -0
  257. package/skill/references/components/p-tag/p-tag.md +66 -0
  258. package/skill/references/components/p-tag-dismissible/examples/Default.tsx +12 -0
  259. package/skill/references/components/p-tag-dismissible/p-tag-dismissible.md +75 -0
  260. package/skill/references/components/p-text/examples/Default.tsx +12 -0
  261. package/skill/references/components/p-text/examples/Semantics.tsx +18 -0
  262. package/skill/references/components/p-text/examples/Size.tsx +12 -0
  263. package/skill/references/components/p-text/examples/SizeResponsive.tsx +12 -0
  264. package/skill/references/components/p-text/p-text.md +68 -0
  265. package/skill/references/components/p-text-list/examples/Default.tsx +28 -0
  266. package/skill/references/components/p-text-list/p-text-list.md +68 -0
  267. package/skill/references/components/p-textarea/examples/Default.tsx +10 -0
  268. package/skill/references/components/p-textarea/examples/Form.tsx +45 -0
  269. package/skill/references/components/p-textarea/examples/Slots.tsx +39 -0
  270. package/skill/references/components/p-textarea/p-textarea.md +122 -0
  271. package/skill/references/components/p-toast/examples/Default.tsx +22 -0
  272. package/skill/references/components/p-toast/p-toast.md +61 -0
  273. package/skill/references/components/p-wordmark/examples/CustomClickableArea.tsx +10 -0
  274. package/skill/references/components/p-wordmark/examples/Default.tsx +10 -0
  275. package/skill/references/components/p-wordmark/examples/Size.tsx +10 -0
  276. package/skill/references/components/p-wordmark/p-wordmark.md +66 -0
  277. package/skill/references/icons.md +5 -0
  278. package/skill/references/styles/emotion.md +439 -0
  279. package/skill/references/styles/scss.md +402 -0
  280. package/skill/references/styles/tailwindcss.md +356 -0
  281. package/skill/references/styles/vanilla-extract.md +444 -0
  282. package/skill/references/stylesheets.md +331 -0
  283. package/skill/references/tokens.md +323 -0
  284. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +1 -1
  285. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1 -1
  286. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +1 -1
  287. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -1
  288. package/ssr/esm/lib/components/button.wrapper.d.ts +2 -2
  289. package/ssr/esm/lib/components/link.wrapper.d.ts +2 -2
@@ -0,0 +1,117 @@
1
+ import React from 'react';
2
+ import { useState } from 'react';
3
+ import { PButton, PDrilldown, PDrilldownItem, PDrilldownLink, type DrilldownUpdateEventDetail } from '@porsche-design-system/components-react';
4
+
5
+ export const Example = () => {
6
+ const [activeIdentifier, setActiveIdentifier] = useState(undefined);
7
+ const [open, setOpen] = useState(false);
8
+
9
+ const onClick = () => {
10
+ setOpen(true);
11
+ }
12
+ const onUpdate = (e: CustomEvent<DrilldownUpdateEventDetail>) => {
13
+ setActiveIdentifier(e.detail.activeIdentifier);
14
+ }
15
+ const onDismiss = () => {
16
+ setOpen(false);
17
+ }
18
+
19
+ return (
20
+ <>
21
+ <nav aria-label="Main">
22
+ <PButton type="button" aria={{'aria-haspopup': 'dialog'}} onClick={onClick}>
23
+ Open Drilldown
24
+ </PButton>
25
+ <PDrilldown open={open} activeIdentifier={activeIdentifier} onUpdate={onUpdate} onDismiss={onDismiss}>
26
+ <PDrilldownItem identifier="id-1" label="Some Label (1)">
27
+ <PDrilldownItem identifier="id-1-1" label="Some Label (1-1)">
28
+ <PDrilldownLink href="#">
29
+ Some anchor (1-1)
30
+ </PDrilldownLink>
31
+ <PDrilldownLink>
32
+ <a href="#">
33
+ Some anchor (1-1)
34
+ </a>
35
+ </PDrilldownLink>
36
+ </PDrilldownItem>
37
+ <PDrilldownItem identifier="id-1-2" label="Some Label (1-2)">
38
+ <PDrilldownLink href="#">
39
+ Some anchor (1-2)
40
+ </PDrilldownLink>
41
+ <PDrilldownLink href="#">
42
+ Some anchor (1-2)
43
+ </PDrilldownLink>
44
+ <PDrilldownLink href="#">
45
+ Some anchor (1-2)
46
+ </PDrilldownLink>
47
+ <PDrilldownItem identifier="id-1-2-1" label="Some Label (1-2-1)">
48
+ <PDrilldownLink href="#">
49
+ Some anchor (1-2-1)
50
+ </PDrilldownLink>
51
+ <PDrilldownLink href="#">
52
+ Some anchor (1-2-1)
53
+ </PDrilldownLink>
54
+ </PDrilldownItem>
55
+ <PDrilldownLink href="#">
56
+ Some anchor (1-2)
57
+ </PDrilldownLink>
58
+ </PDrilldownItem>
59
+ <PDrilldownLink href="#">
60
+ Some anchor (1-1)
61
+ </PDrilldownLink>
62
+ <PDrilldownLink href="#">
63
+ Some anchor (1-1)
64
+ </PDrilldownLink>
65
+ <PDrilldownLink href="#">
66
+ Some anchor (1-1)
67
+ </PDrilldownLink>
68
+ </PDrilldownItem>
69
+ <PDrilldownItem identifier="id-2" label="Some Label (2)">
70
+ <PDrilldownLink href="#">
71
+ Some anchor (2)
72
+ </PDrilldownLink>
73
+ <PDrilldownLink href="#">
74
+ Some anchor (2)
75
+ </PDrilldownLink>
76
+ <PDrilldownLink href="#">
77
+ Some anchor (2)
78
+ </PDrilldownLink>
79
+ <PDrilldownLink href="#">
80
+ Some anchor (2)
81
+ </PDrilldownLink>
82
+ </PDrilldownItem>
83
+ <PDrilldownItem identifier="id-3" label="Some Label (3)">
84
+ <PDrilldownLink href="#">
85
+ Some anchor (3)
86
+ </PDrilldownLink>
87
+ <PDrilldownLink href="#">
88
+ Some anchor (3)
89
+ </PDrilldownLink>
90
+ <PDrilldownLink href="#">
91
+ Some anchor (3)
92
+ </PDrilldownLink>
93
+ </PDrilldownItem>
94
+ <PDrilldownItem identifier="id-4" label="Some Label (4)">
95
+ <PDrilldownLink href="#">
96
+ Some anchor (4)
97
+ </PDrilldownLink>
98
+ <PDrilldownLink href="#">
99
+ Some anchor (4)
100
+ </PDrilldownLink>
101
+ <PDrilldownLink href="#">
102
+ Some anchor (4)
103
+ </PDrilldownLink>
104
+ </PDrilldownItem>
105
+ <PDrilldownItem identifier="id-5" label="Some Label (5)">
106
+ <PDrilldownLink href="#">
107
+ Some anchor (5)
108
+ </PDrilldownLink>
109
+ <PDrilldownLink href="#">
110
+ Some anchor (5)
111
+ </PDrilldownLink>
112
+ </PDrilldownItem>
113
+ </PDrilldown>
114
+ </nav>
115
+ </>
116
+ )
117
+ }
@@ -0,0 +1,168 @@
1
+ # p-drilldown
2
+
3
+ > **Experimental:** This component is experimental — its API may change in any release. Avoid relying on it in production.
4
+
5
+ > **Experimental Component**
6
+ >
7
+ > The `p-drilldown` component is experimental and might be changed or removed in a future release.
8
+
9
+ The `p-drilldown` component is meant for displaying an infinite multilevel structure in a drilldown menu that overlays the page content from the start side of the screen. It is a controlled component that gives you flexible control over its behavior.
10
+
11
+ The basic concept of the component is to have a button that opens the `p-drilldown` with an infinite multilevel structure. The levels are generated out of `p-drilldown-item` which generates a list of cascade buttons to navigate to a deeper level, back buttons and a header section on mobile view. These items can be filled with e.g. `p-drilldown-link`, another `p-drilldown-item` or any HTML element.
12
+
13
+ The visibility of `p-drilldown` can be controlled by its `open` property.
14
+
15
+ It's **obligatory** that each `p-drilldown-item` has a unique `identifier` and `label` defined.
16
+
17
+ Since it's a controlled component it's necessary to register an event listener for the `dismiss` and `update` event in order to get notified when `p-drilldown` needs to be closed or navigated to another hierarchy level.
18
+
19
+ ## Usage
20
+
21
+ ### Do:
22
+
23
+ - Use Drilldown for multilevel purposes.
24
+ - Use Drilldown for multilevel on desktop & mobile.
25
+ - Use a button-pure with a burger icon as the main trigger for the Drilldown component.
26
+ - Use additional interaction items to trigger component.
27
+ - Use a multilevel hierarchy that matches the two-layer capability of the component.
28
+ - Use the first layer for multilevel targets or categories for link lists.
29
+ - Use the second layer only if necessary.
30
+ - Use section headings on the second layer for a group of links.
31
+ - Use link-tile on the second layer for important links.
32
+
33
+ ### Don't:
34
+
35
+ - Don't put too much additional information into the component.
36
+ - Don't use other interaction components than mentioned.
37
+ - Don't manipulate the heading in the second layer.
38
+ - Don't implement external links without indicators.
39
+
40
+ ---
41
+
42
+ ## Related components
43
+
44
+ - [Flyout](../p-flyout/p-flyout.md)
45
+
46
+ ## Accessibility support
47
+
48
+ The `Drilldown` component uses the native `dialog` element to provide a modal dialog which comes with browser-specific behavior. As a result, accessibility features may vary across different browsers.
49
+
50
+ ### Keyboard
51
+
52
+ | Key / state | Function |
53
+ | --- | --- |
54
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element inside the dialog. Focus is trapped (browser behavior). |
55
+ | `ESC` | Closes the dialog. |
56
+ | `focus` on trigger element | The focus is returned to the trigger element after closing the dialog (browser behavior). |
57
+
58
+ ### ARIA enhancements
59
+
60
+ #### External **ARIA** provided by the `aria` property:
61
+
62
+ | ARIA | Usage |
63
+ | --- | --- |
64
+ | `aria-label` | Defines a string value that labels the dialog element. |
65
+
66
+ ## Development considerations
67
+
68
+ To inform users that the trigger button opens a `dialog`, the `aria-haspopup` attribute must be set using the `aria` property, e.g.: `aria="{ 'aria-haspopup': 'dialog' }"`.
69
+
70
+ ### Common do's and don'ts
71
+
72
+ - **Do** use a semantic trigger (usually a button) with a meaningful accessible name.
73
+ - **Do** set `aria-haspopup` through the trigger component `aria` prop.
74
+ - **Do** provide a meaningful dialog label through the drilldown `aria` prop when needed.
75
+ - **Don't** add native `aria-*` attributes directly on the component host.
76
+
77
+ ## API
78
+
79
+ ### Properties
80
+
81
+ | Property | Type | Default | Description |
82
+ | --- | --- | --- | --- |
83
+ | `activeIdentifier` | `string | undefined` | `undefined` | Sets which `p-drilldown-item` (by `identifier`) is currently expanded to show its sub-navigation level. |
84
+ | `aria` | `DrilldownAriaAttribute` | `undefined` | Sets ARIA attributes on the drilldown dialog element for improved screen reader accessibility. |
85
+ | `open` | `boolean` | `false` | Controls whether the drilldown navigation panel is visible. |
86
+
87
+ ### Events
88
+
89
+ | Event | Type | Description |
90
+ | --- | --- | --- |
91
+ | `dismiss` | `CustomEvent<void>` | Emitted when the user closes the drilldown via the close button or Escape key. |
92
+ | `update` | `CustomEvent<DrilldownUpdateEventDetail>`<br>`{ activeIdentifier: string | undefined }` | Emitted when the active navigation level changes, with the new `activeIdentifier` in the event detail. |
93
+
94
+ ### Controlled properties
95
+
96
+ - `open` — a controlled prop: the component does **not** update it itself. Handle the `dismiss` event and assign the new value to `open` yourself, or the change will not take effect.
97
+ - `activeIdentifier` — a controlled prop: the component does **not** update it itself. Handle the `update` event and assign the new value to `activeIdentifier` yourself, or the change will not take effect.
98
+
99
+ ### Slots
100
+
101
+ | Slot | Required | Allowed tag names | Description |
102
+ | --- | --- | --- | --- |
103
+ | _(default)_ | no | — | Default slot to render p-drilldown items. |
104
+
105
+ ### CSS Variables
106
+
107
+ | CSS Variable | Default | Description |
108
+ | --- | --- | --- |
109
+ | `--p-drilldown-grid-template` | `auto/auto` | Overrides the CSS `grid-template` of the default slot container, allowing custom grid layout for drilldown items. |
110
+ | `--p-drilldown-gap` | `8px` | Overrides the gap between drilldown items in the default slot container. |
111
+
112
+ ## Sub-components
113
+
114
+ 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.
115
+
116
+ ### `p-drilldown-item` _(experimental)_
117
+
118
+ > **Experimental:** This component is experimental — its API may change in any release. Avoid relying on it in production.
119
+
120
+ Allowed parents: `p-drilldown`, `p-drilldown-item`.
121
+
122
+ #### Properties
123
+
124
+ | Property | Type | Default | Description |
125
+ | --- | --- | --- | --- |
126
+ | `cascade` | `boolean` | `false` | Private property set by the component itself. |
127
+ | `identifier` _(required)_ | `string` | `undefined` | Sets the unique identifier matched against the drilldown's `activeIdentifier` to determine if this item is shown. |
128
+ | `label` | `string` | `undefined` | Sets the text used for the back button, sticky header, and cascade button that navigates into this navigation level. |
129
+ | `primary` | `boolean` | `false` | Private property set by the component itself. |
130
+ | `secondary` | `boolean` | `false` | Private property set by the component itself. |
131
+
132
+ #### Slots
133
+
134
+ | Slot | Required | Allowed tag names | Description |
135
+ | --- | --- | --- | --- |
136
+ | _(default)_ | no | — | Default slot for the main content. |
137
+ | `button` | no | — | Shows a custom button to reach a deeper level of the navigation structure. |
138
+ | `header` | no | — | Shows a custom header section on mobile view. |
139
+
140
+ ### `p-drilldown-link` _(experimental)_
141
+
142
+ > **Experimental:** This component is experimental — its API may change in any release. Avoid relying on it in production.
143
+
144
+ Allowed parents: `p-drilldown`, `p-drilldown-item`.
145
+
146
+ #### Properties
147
+
148
+ | Property | Type | Default | Description |
149
+ | --- | --- | --- | --- |
150
+ | `active` | `boolean` | `false` | Visually marks the link as the currently active navigation item, e.g. the current page. |
151
+ | `aria` | `DrilldownLinkAriaAttribute` | `undefined` | Sets ARIA attributes on the link for improved accessibility. Only applies when `href` is set. |
152
+ | `download` | `string` | `undefined` | Sets the native `download` attribute to trigger a file download. Only applies when `href` is set. |
153
+ | `href` | `string` | `undefined` | When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element. |
154
+ | `rel` | `string` | `undefined` | Sets the `rel` attribute on the link element (e.g. `noopener`). Only applies when `href` is set. |
155
+ | `target` | `'_self'` `'_blank'` `'_parent'` `'_top'` `'string'` | `'_self'` | Specifies where to open the linked URL (e.g. `_self`, `_blank`). Only applies when `href` is set. |
156
+
157
+ #### Slots
158
+
159
+ | Slot | Required | Allowed tag names | Description |
160
+ | --- | --- | --- | --- |
161
+ | _(default)_ | no | — | Default slot to render the link label. |
162
+
163
+ ## Examples
164
+
165
+ | Example | When to use | File |
166
+ | --- | --- | --- |
167
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
168
+ | Example with custom content | To give more flexibility, it's possible to use custom slots `slot="button"` (renders a custom cascade button) and/or `slot="header"` (renders a custom header on mobile view). | [./examples/CustomContent.tsx](./examples/CustomContent.tsx) |
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PFieldset, PInputText } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PFieldset label="Some legend label">
8
+ <PInputText label="Some label" name="some-name"></PInputText>
9
+ </PFieldset>
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { PFieldset, PInputText } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PFieldset label="Some legend label" required={true}>
8
+ <PInputText label="Some label" name="some-name-1" required={true}></PInputText>
9
+ <PInputText label="Some label" name="some-name-2" required={true} className="mt-fluid-sm"></PInputText>
10
+ </PFieldset>
11
+ </>
12
+ )
13
+ }
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { PFieldset, PInputText } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PFieldset>
8
+ <span slot="label">
9
+ Some legend label
10
+ </span>
11
+ <PInputText label="Some label" name="some-name"></PInputText>
12
+ </PFieldset>
13
+ </>
14
+ )
15
+ }
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { PFieldset, PInputText } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PFieldset label="Some legend label" state="error">
8
+ <PInputText label="Some label" name="some-name"></PInputText>
9
+ <span slot="message">
10
+ Some error message
11
+ </span>
12
+ </PFieldset>
13
+ </>
14
+ )
15
+ }
@@ -0,0 +1,88 @@
1
+ # p-fieldset
2
+
3
+ The `p-fieldset` is a grouping component for wrapping contextual associated form elements. Its visible part is an HTML *legend* element, which can be seen like a headline for describing the meaning of a form block. You can see some usage examples on our [form patterns section](https://designsystem.porsche.com/patterns/forms/resources/).
4
+
5
+ ## Usage
6
+
7
+ ### Do:
8
+
9
+ - Use to group related fields together to make them more organized and easier to understand for users.
10
+ - Use descriptive and clear labels for the field sets to help users quickly understand what information is being requested.
11
+ - Use for grouping several form controls as well as labels within a form.
12
+ - Use it for grouping several checkboxes.
13
+ - Use it for creating a date picker.
14
+ - Use consistent formatting and styling for field sets to maintain visual consistency and improve the overall user experience.
15
+ - Use field sets to control the visibility of groups of fields that are not always necessary, such as advanced options or additional information.
16
+ - Test your field sets with users to ensure they are effective in improving the usability of your forms or page layouts.
17
+
18
+ ### Don't:
19
+
20
+ - Don't use too many field sets on a single form or page layout.
21
+ - Don't use to hide important information or fields that users need to complete a form.
22
+ - Don't rely solely on field sets to improve the usability of your forms or page layouts.
23
+
24
+ ---
25
+
26
+ ## Behavior
27
+
28
+ ### Sections including form elements
29
+
30
+ [Form pattern guideline](https://designsystem.porsche.com/patterns/forms).
31
+
32
+ ## Accessibility support
33
+
34
+ ### ARIA enhancements
35
+
36
+ #### External **ARIA** provided by the `aria` property:
37
+
38
+ | ARIA | Usage |
39
+ | --- | --- |
40
+ | `role="radiogroup"` | Changes the default role of `group` to `radiogroup` |
41
+
42
+ #### Internal **ARIA** that is managed by the component:
43
+
44
+ | ARIA | Usage |
45
+ | --- | --- |
46
+ | `role="alert"` | When content is populated or changed in `state="error"`, the component announces it immediately. |
47
+ | `aria-required="true"` | Indicates if all children of the fieldset group are required. |
48
+ | `aria-invalid="true"` | If `error` state is set. |
49
+ | `aria-describedby="IDREF"` | References the accessible description when `state` message is provided. |
50
+
51
+ ## Development considerations
52
+
53
+ ### Common do's and don'ts
54
+
55
+ - **Do** provide a clear `label` that describes the grouped fields.
56
+ - **Do** use the component state/message API so group validation is announced.
57
+ - **Do** use `aria="{ 'role': 'radiogroup' }"` only when the fieldset contains custom radio controls.
58
+ - **Don't** set `state="error"` without a descriptive `message`.
59
+
60
+ ## API
61
+
62
+ ### Properties
63
+
64
+ | Property | Type | Default | Description |
65
+ | --- | --- | --- | --- |
66
+ | `aria` | `'radiogroup'` | `undefined` | Overrides the ARIA role on the fieldset — use `radiogroup` when grouping radio buttons. |
67
+ | `label` | `string` | `''` | Sets the visible legend text displayed above the grouped form controls. |
68
+ | `labelSize` | `'small'` `'medium'` | `'medium'` | Sets the font size of the fieldset label (`small`, `medium`, or `large`). |
69
+ | `message` | `string` | `''` | Sets the validation feedback message displayed below the fieldset when `state` is `success` or `error`. |
70
+ | `required` | `boolean` | `false` | Marks all controls within the fieldset as required and adds a required indicator to the label. |
71
+ | `state` | `'none'` `'error'` `'success'` | `'none'` | Sets the validation state of the fieldset, controlling the color and style of the feedback message. |
72
+
73
+ ### Slots
74
+
75
+ | Slot | Required | Allowed tag names | Description |
76
+ | --- | --- | --- | --- |
77
+ | `label` | no | — | Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
78
+ | _(default)_ | no | — | Default slot for the main content. |
79
+ | `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. |
80
+
81
+ ## Examples
82
+
83
+ | Example | When to use | File |
84
+ | --- | --- | --- |
85
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
86
+ | Slotted label | Slotted label | [./examples/SlottedLabel.tsx](./examples/SlottedLabel.tsx) |
87
+ | Slotted message | Slotted message | [./examples/SlottedMessage.tsx](./examples/SlottedMessage.tsx) |
88
+ | Required | Setting `required="true"` on `p-fieldset` only renders the asterisk on the legend and sets `aria-required` on the underlying `<fieldset>` element. | [./examples/Required.tsx](./examples/Required.tsx) |
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { PFlag } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PFlag aria={{'aria-label': 'Flag of Germany'}}></PFlag>
8
+ </>
9
+ )
10
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { PFlag } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PFlag name="de" size={{'base': 'sm', 'l': '2xl'}} aria={{'aria-label': 'Flag of Germany'}}></PFlag>
8
+ </>
9
+ )
10
+ }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { PFlag, PText } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PText className="text-[48px]" size="inherit">
8
+ <PFlag className="me-static-sm" size="inherit" name="de" aria={{'aria-label': 'Flag of Germany'}}></PFlag>
9
+ Some text
10
+ </PText>
11
+ </>
12
+ )
13
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { PFlag } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PFlag className="[--p-flag-size:48px]" name="de" aria={{'aria-label': 'Flag of Germany'}}></PFlag>
8
+ </>
9
+ )
10
+ }
@@ -0,0 +1,68 @@
1
+ # p-flag
2
+
3
+ The `p-flag` component displays a country or region flag and should be used to communicate geographic context visually.
4
+
5
+ Flags are universally recognized symbols that enable rapid visual communication. Alongside icons, colors, and typography, they are a fundamental part of the Porsche design language and help create a seamless user experience.
6
+
7
+ ## Usage
8
+
9
+ The following guidelines provide instructions for designers and developers on the appropriate use of the `flag` component for effective communication and user experience.
10
+
11
+ ### Do:
12
+
13
+ - **Use the `flag` component for country identification.** The primary purpose is to represent a nation, such as specifying a user's country of origin, shipping location, or detailing product availability.
14
+
15
+ - **Pair the flag with a label for clarity.** While flags are great for quick visual recognition, they can be ambiguous. Always accompany a flag with a country name or an appropriate label to avoid confusion.
16
+
17
+ - **Use the two-letter ISO 3166-1 alpha-2 code.** This standard ensures consistency, reduces errors, and makes it easier to integrate with other systems and APIs.
18
+
19
+ ### Don't:
20
+
21
+ - **Don't use flags to represent a language.** Many languages are spoken in multiple countries (e.g., Spanish). A flag represents a nation, not a language. Use language codes or names instead.
22
+
23
+ - **Don't use flags to represent an emotion or concept.** Flags are powerful symbols of national identity. Using them as generic icons can dilute their meaning and cause user confusion.
24
+
25
+ - **Don't rely solely on the flag icon.** Always provide an aria-label for accessibility. Screen readers cannot interpret flags, and without a descriptive label, you create an inaccessible user experience.
26
+
27
+ ## Accessibility support
28
+
29
+ ### ARIA enhancements
30
+
31
+ #### External **ARIA** provided by the `aria` property:
32
+
33
+ | ARIA | Usage |
34
+ | --- | --- |
35
+ | `aria-label` | Defines a string value that labels the element (through the `alt` attribute). |
36
+
37
+ ## Development considerations
38
+
39
+ ### Common do's and don'ts
40
+
41
+ - **Do** pass a country or region name through the `aria` prop when the flag conveys meaning.
42
+ - **Do** hide decorative flags from assistive technologies when adjacent text already names the country or region.
43
+ - **Don't** leave informative flags without an accessible name.
44
+
45
+ ## API
46
+
47
+ ### Properties
48
+
49
+ | Property | Type | Default | Description |
50
+ | --- | --- | --- | --- |
51
+ | `aria` | `FlagAriaAttribute` | `undefined` | A map of ARIA attributes to enhance the flag's accessibility. For example, use `{ 'aria-label': 'German flag' }` to provide a descriptive label for screen readers. |
52
+ | `name` | `'ad'` `'ae'` `'al'` `'am'` `'ar'` `'at'` `'au'` `'az'` `'ba'` `'bd'` `'be'` `'bg'` `'bh'` `'bn'` `'bo'` `'br'` `'by'` `'ca'` `'ch'` `'cl'` `'cn'` `'co'` `'cr'` `'cw'` `'cy'` `'cz'` `'de'` `'dk'` `'do'` `'dz'` `'ec'` `'ee'` `'eg'` `'es'` `'fi'` `'fr'` `'gb'` `'ge'` `'gh'` `'gi'` `'gr'` `'gt'` `'hk'` `'hn'` `'hr'` `'ht'` `'hu'` `'id'` `'ie'` `'il'` `'in'` `'is'` `'it'` `'jm'` `'jo'` `'jp'` `'ke'` `'kh'` `'kr'` `'kw'` `'kz'` `'lb'` `'li'` `'lk'` `'lt'` `'lu'` `'lv'` `'ma'` `'mc'` `'md'` `'me'` `'mk'` `'mn'` `'mo'` `'mq'` `'mt'` `'mu'` `'mx'` `'my'` `'ng'` `'nl'` `'no'` `'nz'` `'om'` `'pa'` `'pe'` `'pf'` `'ph'` `'pk'` `'pl'` `'pr'` `'pt'` `'py'` `'qa'` `'re'` `'ro'` `'rs'` `'ru'` `'sa'` `'se'` `'sg'` `'si'` `'sk'` `'sv'` `'th'` `'tn'` `'tr'` `'tt'` `'tw'` `'ua'` `'us'` `'uy'` `'uz'` `'ve'` `'vn'` `'xx'` `'za'` | `'de'` | Specifies the country flag to display. Use the two-letter ISO 3166-1 alpha-2 country code. For example, use `us` for the United States, `de` for Germany, `gb` for Great Britain. |
53
+ | `size` | `'2xs'` `'xs'` `'sm'` `'md'` `'lg'` `'xl'` `'2xl'` `'3xl'` `'4xl'` `'5xl'` `'inherit'`<br>_deprecated:_ `'xx-small'` `'x-small'` `'small'` `'medium'` `'large'` `'x-large'` `'xx-large'`<br>`BreakpointCustomizable<FlagSize>` | `'sm'` | Defines the size of the flag, aligned with the typographic scale used by components such as p-icon, p-spinner, p-text, and p-heading. When set to `inherit`, the size is derived from a custom font-size defined on a parent element, calculated against the global line-height (based on `ex`-unit) to remain visually consistent with other typographic-scale-based components. |
54
+
55
+ ### CSS Variables
56
+
57
+ | CSS Variable | Default | Description |
58
+ | --- | --- | --- |
59
+ | `--p-flag-size` | — | Defines the width and height of the flag. Overrides the `size` property when set. |
60
+
61
+ ## Examples
62
+
63
+ | Example | When to use | File |
64
+ | --- | --- | --- |
65
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
66
+ | Size via Prop | The `size` property offers a set of predefined sizes that cover most use cases. | [./examples/Size.tsx](./examples/Size.tsx) |
67
+ | Size via CSS Variable | For full control over the flag's dimensions, use the custom CSS variable `--p-flag-size`, which accepts any valid CSS length value. | [./examples/SizeCssVar.tsx](./examples/SizeCssVar.tsx) |
68
+ | Responsive Size | The `size` property supports `BreakpointCustomizable` values, allowing you to define different sizes for each major breakpoint (`xs`, `s`, `m`, `l`, `xl`). | [./examples/ResponsiveSize.tsx](./examples/ResponsiveSize.tsx) |
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { useState } from 'react';
3
+ import { PButton, PButtonPure, PDisplay, PFlyout, PText } from '@porsche-design-system/components-react';
4
+
5
+ export const Example = () => {
6
+ const [open, setOpen] = useState(false);
7
+
8
+ const onClick = () => {
9
+ setOpen(true);
10
+ }
11
+ const onDismiss = () => {
12
+ setOpen(false);
13
+ }
14
+
15
+ return (
16
+ <>
17
+ <PButton type="button" aria={{'aria-haspopup': 'dialog'}} onClick={onClick}>
18
+ Open Flyout
19
+ </PButton>
20
+
21
+ <PFlyout open={open} aria={{'aria-label': 'Some Heading'}} footerBehavior="fixed" className="[--p-flyout-width:90vw]" onDismiss={onDismiss}>
22
+ <div className="-mt-(--ref-p-flyout-pt) -mx-(--ref-p-flyout-px) h-[300px]">
23
+ <img className="w-full h-full object-cover" src="assets/lights.jpg" alt="Some image description" />
24
+ </div>
25
+ <PDisplay className="mt-fluid-md" size="small" tag="h2">
26
+ Some heading
27
+ </PDisplay>
28
+ <PText className="mt-fluid-sm">
29
+ Some paragraph.
30
+ </PText>
31
+ <div slot="footer" className="grid grid-cols-[auto_1fr_auto] gap-static-sm justify-items-center">
32
+ <PButtonPure icon="arrow-left" type="button" hideLabel={true}>
33
+ Prev
34
+ </PButtonPure>
35
+ <PText>
36
+ 1/4
37
+ </PText>
38
+ <PButtonPure icon="arrow-right" type="button" hideLabel={true}>
39
+ Next
40
+ </PButtonPure>
41
+ </div>
42
+ </PFlyout>
43
+ </>
44
+ )
45
+ }
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import { useState } from 'react';
3
+ import { PButton, PFlyout, PHeading, PText } from '@porsche-design-system/components-react';
4
+
5
+ export const Example = () => {
6
+ const [open, setOpen] = useState(false);
7
+
8
+ const onClick = () => {
9
+ setOpen(true);
10
+ }
11
+ const onDismiss = () => {
12
+ setOpen(false);
13
+ }
14
+
15
+ return (
16
+ <>
17
+ <PButton type="button" aria={{'aria-haspopup': 'dialog'}} onClick={onClick}>
18
+ Open Flyout
19
+ </PButton>
20
+
21
+ <PFlyout open={open} aria={{'aria-label': 'Some Heading'}} onDismiss={onDismiss}>
22
+ <PHeading slot="header" size="large" tag="h2">
23
+ Some Heading
24
+ </PHeading>
25
+ <PText>
26
+ Some Content
27
+ </PText>
28
+ <div slot="footer">
29
+ <PButton type="button">
30
+ Proceed
31
+ </PButton>
32
+ <PButton type="button" variant="secondary">
33
+ Cancel
34
+ </PButton>
35
+ </div>
36
+ <PText slot="sub-footer">
37
+ Some additional Sub-Footer
38
+ </PText>
39
+ </PFlyout>
40
+ </>
41
+ )
42
+ }