@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,144 @@
1
+ # p-input-time
2
+
3
+ The `p-input-time` component provides a versatile, user‑friendly interface for entering time values. It supports direct keyboard input, including arrow-key adjustments for precise changes. It has a start and end slot in order to support flexible slotted content.
4
+
5
+ A `label` is a caption which informs the user what information a particular form field is asking for. The `p-input-time` component can be used with or without a label, but it's recommended to keep the label visible for better accessibility whenever possible. When used without a label, it's mandatory to provide a descriptive label text for screen readers.
6
+
7
+ While a `placeholder` is optional but recommended to be set whenever bits of example content or hints shall be shown to give the user visual cues to fill out the form.
8
+
9
+ > **Input Event Handling**
10
+ >
11
+ > React's `onChange` behaves like the native `onInput` (fires on every keystroke). However, our web components follow standard browser behavior, where `onChange` only fires when the input loses focus. To get real-time updates on each keystroke, use `onInput` instead.
12
+
13
+ ## Usage
14
+
15
+ `p-input-time` is intended for time input scenarios. It should not be used for values that merely happen to consist of digits. For those cases, consider using another input with an appropriate input mode. For further guidance, see the [MDN documentation on time inputs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time#using_time_inputs).
16
+
17
+ ### Do:
18
+
19
+ - Use when a time value is required or optional.
20
+ - Use without a label only when the context is clear.
21
+ - Use for validation and error of input.
22
+ - Use asterisk for required fields.
23
+
24
+ ### Don't:
25
+
26
+ - Don't use labels with more than two words whenever possible (keep it short and descriptive).
27
+ - Don't use instructional or description text for the label.
28
+
29
+ ---
30
+
31
+ ## Related Components
32
+
33
+ - [Input Date](../p-input-date/p-input-date.md)
34
+ - [Input Email](../p-input-email/p-input-email.md)
35
+ - [Input Month](../p-input-month/p-input-month.md)
36
+ - [Input Number](../p-input-number/p-input-number.md)
37
+ - [Input Password](../p-input-password/p-input-password.md)
38
+ - [Input Search](../p-input-search/p-input-search.md)
39
+ - [Input Tel](../p-input-tel/p-input-tel.md)
40
+ - [Input Text](../p-input-text/p-input-text.md)
41
+ - [Input Url](../p-input-url/p-input-url.md)
42
+ - [Input Week](../p-input-week/p-input-week.md)
43
+
44
+ ## Accessibility support
45
+
46
+ ### Keyboard
47
+
48
+ | Key / state | Function |
49
+ | --- | --- |
50
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
51
+ | `Arrow Up/Down` | Sets increments/decrements in regards of the steps |
52
+
53
+ ### ARIA enhancements
54
+
55
+ #### Internal **ARIA** that is managed by the component:
56
+
57
+ | ARIA | Usage |
58
+ | --- | --- |
59
+ | `aria-describedby="IDREF"` | Defines the accessible description combined with the status message. |
60
+ | `role="status"`, `role="alert"` | When `message` and `state` or `loading` prop change, the status message is announced. |
61
+ | `aria-hidden="true"` | If `required` attribute is set, the visible asterisk indicator is hidden from assistive technologies. |
62
+ | `aria-invalid="true"` | If `error` state is set. |
63
+ | `aria-live="polite"` | If the `maxlength` attribute is present, the counter is announced via ARIA live region. |
64
+
65
+ ## Development considerations
66
+
67
+ ### Disabled state
68
+
69
+ In general, avoid using the `disabled` state. Disabled elements are no longer focusable and may be missed by screen reader users. They can also confuse sighted users if the reason they are disabled is not made clear.
70
+
71
+ ### Common do's and don'ts
72
+
73
+ - **Do** keep a persistent label and use helper/description text when additional context is required.
74
+ - **Do** use the component state/message API so validation and status changes are announced.
75
+ - **Do** use clear error wording that helps users recover.
76
+ - **Don't** rely on placeholder text as the only label.
77
+ - **Don't** use `hide-label` without an accessible name.
78
+
79
+ ## Limitations
80
+
81
+ Due to the nature of **Web Components** and **shadow DOM**, there are limitations when using some **ARIA** attributes to define relationships between elements across different shadow DOMs or shadow DOM/light DOM combinations.
82
+
83
+ | ARIA | Support |
84
+ | --- | --- |
85
+ | `aria-labelledby` | 🚫 |
86
+ | `aria-describedby` | 🚫 |
87
+
88
+ ## API
89
+
90
+ ### Properties
91
+
92
+ | Property | Type | Default | Description |
93
+ | --- | --- | --- | --- |
94
+ | `autoComplete` | `string` | `undefined` | Provides the browser with a time autofill hint. |
95
+ | `compact` | `boolean` | `false` | Reduces the input height and padding for a more compact layout. |
96
+ | `description` | `string` | `''` | Sets a supplementary description displayed below the label to provide additional context. |
97
+ | `disabled` | `boolean` | `false` | Disables the field, preventing time selection. The value is not submitted with the form. |
98
+ | `form` | `string` | `undefined` | Associates the field with a form element by its ID when the field is not nested directly inside it. |
99
+ | `hideLabel` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Hides the visible label while keeping it accessible to screen readers. Supports responsive breakpoint values. |
100
+ | `label` | `string` | `''` | Sets the visible label text displayed above the input field. |
101
+ | `loading` _(experimental)_ | `boolean` | `false` | @experimental Disables the field and displays a loading spinner to indicate an ongoing operation. |
102
+ | `max` | `string` | `undefined` | Sets the latest selectable time in `hh:mm` or `hh:mm:ss` format. Times after this are disabled in the picker. |
103
+ | `message` | `string` | `''` | Sets the validation feedback message displayed below the field when `state` is `success` or `error`. |
104
+ | `min` | `string` | `undefined` | Sets the earliest selectable time in `hh:mm` or `hh:mm:ss` format. Times before this are disabled in the picker. |
105
+ | `name` _(required)_ | `string` | `undefined` | Sets the name submitted with the form data to identify this field's value on the server. |
106
+ | `readOnly` | `boolean` | `false` | Makes the field read-only — the value is displayed but cannot be changed. The value is still submitted with the form. |
107
+ | `required` | `boolean` | `false` | Marks the field as required — form submission is blocked while no time is selected. |
108
+ | `state` | `'none'` `'error'` `'success'` | `'none'` | Sets the validation state, controlling the visual appearance and style of the feedback message (`none`, `success`, `error`). |
109
+ | `step` | `number` | `60` | Sets the stepping interval in seconds. Use `60` for minute-level selection, `1` to also expose seconds. |
110
+ | `value` | `string | null` | `''` | Sets the current time value in `hh:mm` or `hh:mm:ss` format (e.g. `14:00`). |
111
+
112
+ ### Events
113
+
114
+ | Event | Type | Description |
115
+ | --- | --- | --- |
116
+ | `blur` | `CustomEvent<InputTimeBlurEventDetail>`<br>`Event` | Emitted when the input loses focus, regardless of whether the value changed. |
117
+ | `change` | `CustomEvent<InputTimeChangeEventDetail>`<br>`Event` | Emitted when the input loses focus after its value was changed. |
118
+ | `input` | `CustomEvent<InputTimeInputEventDetail>`<br>`InputEvent` | Emitted on every value change as the user interacts with the time picker. |
119
+
120
+ ### Slots
121
+
122
+ | Slot | Required | Allowed tag names | Description |
123
+ | --- | --- | --- | --- |
124
+ | `label` | no | — | Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
125
+ | `label-after` | no | — | Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`). |
126
+ | `description` | no | — | Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
127
+ | `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. |
128
+ | `start` | no | — | Shows content at the start of the input (e.g. unit prefix). |
129
+ | `end` | no | — | Shows content at the end of the input (e.g. toggle button, unit suffix). |
130
+
131
+ ### CSS Variables
132
+
133
+ | CSS Variable | Default | Description |
134
+ | --- | --- | --- |
135
+ | `--ref-p-input-slotted-padding` | — | When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `padding` in oder to adjust the alignment correctly. |
136
+ | `--ref-p-input-slotted-margin` | — | When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly. |
137
+
138
+ ## Examples
139
+
140
+ | Example | When to use | File |
141
+ | --- | --- | --- |
142
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
143
+ | Form | The `p-input-time` can be integrated into a form in two ways: **controlled** or **uncontrolled**, depending on your needs. | [./examples/Form.tsx](./examples/Form.tsx) |
144
+ | Slots | Use named slots when `label`, `description` or `message` need markup such as a link. | [./examples/Slots.tsx](./examples/Slots.tsx) |
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { PInputUrl } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PInputUrl label="Some label" name="some-name" indicator={true}></PInputUrl>
8
+ </>
9
+ )
10
+ }
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import {
3
+ type InputUrlInputEventDetail,
4
+ PButton,
5
+ PInputUrl,
6
+ type PInputUrlProps,
7
+ PText,
8
+ } from '@porsche-design-system/components-react';
9
+ import { FormEvent, useState } from 'react';
10
+
11
+ export const Example = () => {
12
+ const [form, setForm] = useState({ myInputUrl: '' });
13
+ const [lastSubmittedData, setLastSubmittedData] = useState<any>();
14
+
15
+ const onInput = (e: CustomEvent<InputUrlInputEventDetail>) => {
16
+ const { name, value } = e.target as HTMLElement & PInputUrlProps;
17
+ setForm((prev) => ({
18
+ ...prev,
19
+ [name]: value,
20
+ }));
21
+ };
22
+
23
+ const onSubmit = (e: FormEvent<HTMLFormElement>) => {
24
+ e.preventDefault();
25
+ setLastSubmittedData(JSON.stringify(form));
26
+ };
27
+
28
+ const onReset = (e: FormEvent<HTMLFormElement>) => {
29
+ e.preventDefault();
30
+ setForm({ myInputUrl: '' });
31
+ };
32
+
33
+ return (
34
+ <>
35
+ <form onSubmit={onSubmit} onReset={onReset} className="flex flex-col gap-fluid-sm">
36
+ <PInputUrl name="myInputUrl" label="Some Label" indicator={true} value={form.myInputUrl} onInput={onInput} />
37
+ <div className="flex gap-fluid-sm">
38
+ <PButton type="submit">Submit</PButton>
39
+ <PButton type="reset">Reset</PButton>
40
+ </div>
41
+ <PText>Last submitted data: {lastSubmittedData}</PText>
42
+ </form>
43
+ </>
44
+ );
45
+ };
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { PButtonPure, PIcon, PInputUrl, PPopover } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PInputUrl state="error">
8
+ <span slot="label">
9
+ Some label with a
10
+ <a href="https://designsystem.porsche.com" className="underline">
11
+ link
12
+ </a>
13
+ and a "label-after" slot.
14
+ </span>
15
+ <PPopover slot="label-after">
16
+ Some Popover content with a
17
+ <a href="https://designsystem.porsche.com" className="underline">
18
+ link
19
+ </a>
20
+ .
21
+ </PPopover>
22
+ <span slot="description">
23
+ Some description with a
24
+ <a href="https://designsystem.porsche.com" className="underline">
25
+ link
26
+ </a>
27
+ .
28
+ </span>
29
+ <PIcon slot="start" name="home" color="contrast-medium" aria-hidden={true}></PIcon>
30
+ <PButtonPure slot="end" icon="delete" hideLabel={true} className="p-(--ref-p-input-slotted-padding) m-(--ref-p-input-slotted-margin)" aria={{'aria-label': 'Delete'}}></PButtonPure>
31
+ <span slot="message">
32
+ Some error message with a
33
+ <a href="https://designsystem.porsche.com" className="underline">
34
+ link
35
+ </a>
36
+ .
37
+ </span>
38
+ </PInputUrl>
39
+ </>
40
+ )
41
+ }
@@ -0,0 +1,145 @@
1
+ # p-input-url
2
+
3
+ The `p-input-url` component provides a user-friendly, accessible interface for entering valid website URLs. It leverages native HTML5 URL validation and ensures appropriate keyboard behavior on mobile devices. It includes `start` and `end` slots to flexibly incorporate icons, buttons, or other elements within the input field.
4
+
5
+ A `label` tells the user what information a form field is asking for. The `p-input-url` component can be used with or without a label, but it is recommended to keep the label visible whenever possible for better accessibility. When used without a label, a descriptive label text for screen readers is required.
6
+
7
+ A `placeholder` is optional, but recommended when example content or hints should be shown to give the user visual cues for completing the form.
8
+
9
+ > **Input Event Handling**
10
+ >
11
+ > React's `onChange` behaves like the native `onInput` (fires on every keystroke). However, our web components follow standard browser behavior, where `onChange` only fires when the input loses focus. To get real-time updates on each keystroke, use `onInput` instead.
12
+
13
+ ## Usage
14
+
15
+ The `p-input-url` component is specifically designed for collecting website URLs. It leverages built-in browser validation to ensure that the input follows the correct URL format. This makes it a better choice than a generic text input when URL validation, proper keyboard behavior on mobile devices, and accessibility are important. For further guidance, see the [MDN documentation on url inputs](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/url).
16
+
17
+ ### Do:
18
+
19
+ - Use when requesting a website URL from the user.
20
+ - Use without a label only when the context is clear.
21
+ - Use it when URL validation and clear input errors are needed.
22
+ - Use an asterisk for required fields.
23
+
24
+ ### Don't:
25
+
26
+ - Don't use labels with more than two words whenever possible (keep it short and descriptive).
27
+ - Don't use an instructional or description text for the label.
28
+
29
+ ---
30
+
31
+ ## Related Components
32
+
33
+ - [Input Date](../p-input-date/p-input-date.md)
34
+ - [Input Email](../p-input-email/p-input-email.md)
35
+ - [Input Month](../p-input-month/p-input-month.md)
36
+ - [Input Number](../p-input-number/p-input-number.md)
37
+ - [Input Password](../p-input-password/p-input-password.md)
38
+ - [Input Search](../p-input-search/p-input-search.md)
39
+ - [Input Tel](../p-input-tel/p-input-tel.md)
40
+ - [Input Text](../p-input-text/p-input-text.md)
41
+ - [Input Time](../p-input-time/p-input-time.md)
42
+ - [Input Week](../p-input-week/p-input-week.md)
43
+
44
+ ## Accessibility support
45
+
46
+ ### Keyboard
47
+
48
+ | Key / state | Function |
49
+ | --- | --- |
50
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
51
+
52
+ ### ARIA enhancements
53
+
54
+ #### Internal **ARIA** that is managed by the component:
55
+
56
+ | ARIA | Usage |
57
+ | --- | --- |
58
+ | `aria-describedby="IDREF"` | Defines the accessible description combined with the status message. |
59
+ | `role="status"`, `role="alert"` | When `message` and `state` or `loading` prop change, the status message is announced. |
60
+ | `aria-hidden="true"` | If `required` attribute is set, the visible asterisk indicator is hidden from assistive technologies. |
61
+ | `aria-invalid="true"` | If `error` state is set. |
62
+ | `aria-live="polite"` | If the `maxlength` attribute is present, the counter is announced via ARIA live region. |
63
+
64
+ ## Development considerations
65
+
66
+ ### Disabled state
67
+
68
+ In general, avoid using the `disabled` state. Disabled elements are no longer focusable and may be missed by screen reader users. They can also confuse sighted users if the reason they are disabled is not made clear.
69
+
70
+ ### Common do's and don'ts
71
+
72
+ - **Do** keep a persistent label and use helper/description text when additional context is required.
73
+ - **Do** use the component state/message API so validation and status changes are announced.
74
+ - **Do** use clear error wording that helps users recover.
75
+ - **Don't** rely on placeholder text as the only label.
76
+ - **Don't** use `hide-label` without an accessible name.
77
+
78
+ ## Limitations
79
+
80
+ Due to the nature of **Web Components** and **shadow DOM**, there are limitations when using some **ARIA** attributes to define relationships between elements across different shadow DOMs or shadow DOM/light DOM combinations.
81
+
82
+ | ARIA | Support |
83
+ | --- | --- |
84
+ | `aria-labelledby` | 🚫 |
85
+ | `aria-describedby` | 🚫 |
86
+
87
+ ## API
88
+
89
+ ### Properties
90
+
91
+ | Property | Type | Default | Description |
92
+ | --- | --- | --- | --- |
93
+ | `autoComplete` | `string` | `undefined` | Provides the browser with a URL autofill hint (e.g. `autocomplete='url'`). |
94
+ | `compact` | `boolean` | `false` | Reduces the input height and padding for a more compact layout. |
95
+ | `description` | `string` | `''` | Sets a supplementary description displayed below the label to provide additional context. |
96
+ | `disabled` | `boolean` | `false` | Disables the field, preventing all input. The value is not submitted with the form. |
97
+ | `form` | `string` | `undefined` | Associates the field with a form element by its ID when the field is not nested directly inside it. |
98
+ | `hideLabel` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Hides the visible label while keeping it accessible to screen readers. Supports responsive breakpoint values. |
99
+ | `indicator` | `boolean` | `false` | Shows a URL/link icon at the start of the field as a visual indicator. |
100
+ | `label` | `string` | `''` | Sets the visible label text displayed above the input field. |
101
+ | `loading` _(experimental)_ | `boolean` | `false` | @experimental Disables the field and displays a loading spinner to indicate an ongoing operation. |
102
+ | `maxLength` | `number` | `undefined` | Sets the maximum number of characters the user can enter. |
103
+ | `message` | `string` | `''` | Sets the validation feedback message displayed below the field when `state` is `success` or `error`. |
104
+ | `minLength` | `number` | `undefined` | Sets the minimum number of characters required for the field to be considered valid. |
105
+ | `name` _(required)_ | `string` | `undefined` | Sets the name submitted with the form data to identify this field's value on the server. |
106
+ | `pattern` | `string` | `undefined` | Sets a regular expression the entered value must match to be valid. Overrides the browser's default URL validation. |
107
+ | `placeholder` | `string` | `''` | Sets placeholder text shown inside the field when it is empty, such as an example URL. |
108
+ | `readOnly` | `boolean` | `false` | Makes the field read-only — the value is displayed but cannot be edited. The value is still submitted with the form. |
109
+ | `required` | `boolean` | `false` | Marks the field as required — form submission is blocked while this field is empty. |
110
+ | `state` | `'none'` `'error'` `'success'` | `'none'` | Sets the validation state, controlling the visual appearance and style of the feedback message (`none`, `success`, `error`). |
111
+ | `value` | `string | null` | `''` | Sets the current URL value. Must be an absolute URL (e.g. `https://porsche.com`) to pass browser validation. |
112
+
113
+ ### Events
114
+
115
+ | Event | Type | Description |
116
+ | --- | --- | --- |
117
+ | `blur` | `CustomEvent<InputUrlBlurEventDetail>`<br>`Event` | Emitted when the input loses focus, regardless of whether the value changed. |
118
+ | `change` | `CustomEvent<InputUrlChangeEventDetail>`<br>`Event` | Emitted when the input loses focus after its value was changed. |
119
+ | `input` | `CustomEvent<InputUrlInputEventDetail>`<br>`InputEvent` | Emitted on every value change as the user types. |
120
+
121
+ ### Slots
122
+
123
+ | Slot | Required | Allowed tag names | Description |
124
+ | --- | --- | --- | --- |
125
+ | `label` | no | — | Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
126
+ | `label-after` | no | — | Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`). |
127
+ | `description` | no | — | Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
128
+ | `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. |
129
+ | `start` | no | — | Shows content at the start of the input (e.g. unit prefix). |
130
+ | `end` | no | — | Shows content at the end of the input (e.g. toggle button, unit suffix). |
131
+
132
+ ### CSS Variables
133
+
134
+ | CSS Variable | Default | Description |
135
+ | --- | --- | --- |
136
+ | `--ref-p-input-slotted-padding` | — | When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `padding` in oder to adjust the alignment correctly. |
137
+ | `--ref-p-input-slotted-margin` | — | When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly. |
138
+
139
+ ## Examples
140
+
141
+ | Example | When to use | File |
142
+ | --- | --- | --- |
143
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
144
+ | Form | The `p-input-url` can be integrated into a form in two ways: **controlled** or **uncontrolled**, depending on your needs. | [./examples/Form.tsx](./examples/Form.tsx) |
145
+ | Slots | Use named slots when `label`, `description` or `message` need markup such as a link. | [./examples/Slots.tsx](./examples/Slots.tsx) |
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { PInputWeek } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PInputWeek label="Some label" name="some-name"></PInputWeek>
8
+ </>
9
+ )
10
+ }
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import {
3
+ type InputWeekInputEventDetail,
4
+ PButton,
5
+ PInputWeek,
6
+ type PInputWeekProps,
7
+ PText,
8
+ } from '@porsche-design-system/components-react';
9
+ import { FormEvent, useState } from 'react';
10
+
11
+ export const Example = () => {
12
+ const [form, setForm] = useState({ myInputWeek: '' });
13
+ const [lastSubmittedData, setLastSubmittedData] = useState<any>();
14
+
15
+ const onInput = (e: CustomEvent<InputWeekInputEventDetail>) => {
16
+ const { name, value } = e.target as HTMLElement & PInputWeekProps;
17
+ setForm((prev) => ({
18
+ ...prev,
19
+ [name]: value,
20
+ }));
21
+ };
22
+
23
+ const onSubmit = (e: FormEvent<HTMLFormElement>) => {
24
+ e.preventDefault();
25
+ setLastSubmittedData(JSON.stringify(form));
26
+ };
27
+
28
+ const onReset = (e: FormEvent<HTMLFormElement>) => {
29
+ e.preventDefault();
30
+ setForm({ myInputWeek: '' });
31
+ };
32
+
33
+ return (
34
+ <>
35
+ <form onSubmit={onSubmit} onReset={onReset} className="flex flex-col gap-fluid-sm">
36
+ <PInputWeek name="myInputWeek" label="Some Label" value={form.myInputWeek} onInput={onInput} />
37
+ <div className="flex gap-fluid-sm">
38
+ <PButton type="submit">Submit</PButton>
39
+ <PButton type="reset">Reset</PButton>
40
+ </div>
41
+ <PText>Last submitted data: {lastSubmittedData}</PText>
42
+ </form>
43
+ </>
44
+ );
45
+ };
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { PButtonPure, PIcon, PInputWeek, PPopover } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PInputWeek state="error">
8
+ <span slot="label" id="some-label-id">
9
+ Some label with a
10
+ <a href="https://designsystem.porsche.com" className="underline">
11
+ link
12
+ </a>
13
+ and a "label-after" slot.
14
+ </span>
15
+ <PPopover slot="label-after">
16
+ Some Popover content with a
17
+ <a href="https://designsystem.porsche.com" className="underline">
18
+ link
19
+ </a>
20
+ .
21
+ </PPopover>
22
+ <span slot="description" id="some-description-id">
23
+ Some description with a
24
+ <a href="https://designsystem.porsche.com" className="underline">
25
+ link
26
+ </a>
27
+ .
28
+ </span>
29
+ <PIcon slot="start" name="shopping-cart" color="contrast-medium" aria-hidden={true}></PIcon>
30
+ <PButtonPure slot="end" icon="delete" hideLabel={true} className="p-(--ref-p-input-slotted-padding) m-(--ref-p-input-slotted-margin)" aria={{'aria-label': 'Delete'}}></PButtonPure>
31
+ <span slot="message" id="some-message-id">
32
+ Some error message with a
33
+ <a href="https://designsystem.porsche.com" className="underline">
34
+ link
35
+ </a>
36
+ .
37
+ </span>
38
+ </PInputWeek>
39
+ </>
40
+ )
41
+ }
@@ -0,0 +1,142 @@
1
+ # p-input-week
2
+
3
+ The `p-input-week` component provides a versatile, user‑friendly interface for entering week values. It supports direct keyboard input, including arrow-key adjustments for precise changes. It has a start and end slot in order to support flexible slotted content.
4
+
5
+ A `label` is a caption which informs the user what information a particular form field is asking for. The `p-input-week` component can be used with or without a label, but it's recommended to keep the label visible for better accessibility whenever possible. When used without a label, it's mandatory to provide a descriptive label text for screen readers.
6
+
7
+ > **Input Event Handling**
8
+ >
9
+ > React's `onChange` behaves like the native `onInput` (fires on every keystroke). However, our web components follow standard browser behavior, where `onChange` only fires when the input loses focus. To get real-time updates on each keystroke, use `onInput` instead.
10
+
11
+ ## Usage
12
+
13
+ `p-input-week` is intended for week input scenarios. It should not be used for values that merely happen to consist of digits. For those cases, consider using another input with an appropriate input mode. For further guidance, see the [MDN documentation on week inputs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/week#using_date_inputs).
14
+
15
+ ### Do:
16
+
17
+ - Use when a week value is required or optional.
18
+ - Use without a label only when the context is clear.
19
+ - Use for validation and error of input.
20
+ - Use asterisk for required fields.
21
+
22
+ ### Don't:
23
+
24
+ - Don't use labels with more than two words whenever possible (keep it short and descriptive).
25
+ - Don't use instructional or description text for the label.
26
+
27
+ ---
28
+
29
+ ## Related Components
30
+
31
+ - [Input Date](../p-input-date/p-input-date.md)
32
+ - [Input Email](../p-input-email/p-input-email.md)
33
+ - [Input Month](../p-input-month/p-input-month.md)
34
+ - [Input Number](../p-input-number/p-input-number.md)
35
+ - [Input Password](../p-input-password/p-input-password.md)
36
+ - [Input Search](../p-input-search/p-input-search.md)
37
+ - [Input Tel](../p-input-tel/p-input-tel.md)
38
+ - [Input Text](../p-input-text/p-input-text.md)
39
+ - [Input Time](../p-input-time/p-input-time.md)
40
+ - [Input Url](../p-input-url/p-input-url.md)
41
+
42
+ ## Accessibility support
43
+
44
+ ### Keyboard
45
+
46
+ | Key / state | Function |
47
+ | --- | --- |
48
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
49
+ | `Arrow Up/Down` | Sets increments/decrements in regards of the steps |
50
+
51
+ ### ARIA enhancements
52
+
53
+ #### Internal **ARIA** that is managed by the component:
54
+
55
+ | ARIA | Usage |
56
+ | --- | --- |
57
+ | `aria-describedby="IDREF"` | Defines the accessible description combined with the status message. |
58
+ | `role="status"`, `role="alert"` | When `message` and `state` or `loading` prop change, the status message is announced. |
59
+ | `aria-hidden="true"` | If `required` attribute is set, the visible asterisk indicator is hidden from assistive technologies. |
60
+ | `aria-invalid="true"` | If `error` state is set. |
61
+ | `aria-live="polite"` | If the `maxlength` attribute is present, the counter is announced via ARIA live region. |
62
+
63
+ ## Development considerations
64
+
65
+ ### Disabled state
66
+
67
+ In general, avoid using the `disabled` state. Disabled elements are no longer focusable and may be missed by screen reader users. They can also confuse sighted users if the reason they are disabled is not made clear.
68
+
69
+ ### Common do's and don'ts
70
+
71
+ - **Do** keep a persistent label and use helper/description text when additional context is required.
72
+ - **Do** use the component state/message API so validation and status changes are announced.
73
+ - **Do** use clear error wording that helps users recover.
74
+ - **Don't** rely on placeholder text as the only label.
75
+ - **Don't** use `hide-label` without an accessible name.
76
+
77
+ ## Limitations
78
+
79
+ Due to the nature of **Web Components** and **shadow DOM**, there are limitations when using some **ARIA** attributes to define relationships between elements across different shadow DOMs or shadow DOM/light DOM combinations.
80
+
81
+ | ARIA | Support |
82
+ | --- | --- |
83
+ | `aria-labelledby` | 🚫 |
84
+ | `aria-describedby` | 🚫 |
85
+
86
+ ## API
87
+
88
+ ### Properties
89
+
90
+ | Property | Type | Default | Description |
91
+ | --- | --- | --- | --- |
92
+ | `autoComplete` | `string` | `undefined` | Provides the browser with a week/year autofill hint. |
93
+ | `compact` | `boolean` | `false` | Reduces the input height and padding for a more compact layout. |
94
+ | `description` | `string` | `''` | Sets a supplementary description displayed below the label to provide additional context. |
95
+ | `disabled` | `boolean` | `false` | Disables the field, preventing week selection. The value is not submitted with the form. |
96
+ | `form` | `string` | `undefined` | Associates the field with a form element by its ID when the field is not nested directly inside it. |
97
+ | `hideLabel` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Hides the visible label while keeping it accessible to screen readers. Supports responsive breakpoint values. |
98
+ | `label` | `string` | `''` | Sets the visible label text displayed above the input field. |
99
+ | `loading` _(experimental)_ | `boolean` | `false` | @experimental Disables the field and displays a loading spinner to indicate an ongoing operation. |
100
+ | `max` | `string` | `undefined` | Sets the latest selectable week in YYYY-Www format. Weeks after this are disabled in the picker. |
101
+ | `message` | `string` | `''` | Sets the validation feedback message displayed below the field when `state` is `success` or `error`. |
102
+ | `min` | `string` | `undefined` | Sets the earliest selectable week in YYYY-Www format. Weeks before this are disabled in the picker. |
103
+ | `name` _(required)_ | `string` | `undefined` | Sets the name submitted with the form data to identify this field's value on the server. |
104
+ | `readOnly` | `boolean` | `false` | Makes the field read-only — the value is displayed but cannot be changed. The value is still submitted with the form. |
105
+ | `required` | `boolean` | `false` | Marks the field as required — form submission is blocked while no week is selected. |
106
+ | `state` | `'none'` `'error'` `'success'` | `'none'` | Sets the validation state, controlling the visual appearance and style of the feedback message (`none`, `success`, `error`). |
107
+ | `step` | `number` | `1` | Sets the stepping interval in weeks. |
108
+ | `value` | `string | null` | `''` | Sets the current ISO week value in YYYY-Www format (e.g. `2025-W27`). |
109
+
110
+ ### Events
111
+
112
+ | Event | Type | Description |
113
+ | --- | --- | --- |
114
+ | `blur` | `CustomEvent<InputWeekBlurEventDetail>`<br>`Event` | Emitted when the input loses focus, regardless of whether the value changed. |
115
+ | `change` | `CustomEvent<InputWeekChangeEventDetail>`<br>`Event` | Emitted when the input loses focus after its value was changed. |
116
+ | `input` | `CustomEvent<InputWeekInputEventDetail>`<br>`InputEvent` | Emitted on every value change as the user interacts with the week picker. |
117
+
118
+ ### Slots
119
+
120
+ | Slot | Required | Allowed tag names | Description |
121
+ | --- | --- | --- | --- |
122
+ | `label` | no | — | Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
123
+ | `label-after` | no | — | Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`). |
124
+ | `description` | no | — | Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
125
+ | `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. |
126
+ | `start` | no | — | Shows content at the start of the input (e.g. unit prefix). |
127
+ | `end` | no | — | Shows content at the end of the input (e.g. toggle button, unit suffix). |
128
+
129
+ ### CSS Variables
130
+
131
+ | CSS Variable | Default | Description |
132
+ | --- | --- | --- |
133
+ | `--ref-p-input-slotted-padding` | — | When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `padding` in oder to adjust the alignment correctly. |
134
+ | `--ref-p-input-slotted-margin` | — | When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly. |
135
+
136
+ ## Examples
137
+
138
+ | Example | When to use | File |
139
+ | --- | --- | --- |
140
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
141
+ | Form | The `p-input-week` can be integrated into a form in two ways: **controlled** or **uncontrolled**, depending on your needs. | [./examples/Form.tsx](./examples/Form.tsx) |
142
+ | Slots | Use named slots when `label`, `description` or `message` need markup such as a link. | [./examples/Slots.tsx](./examples/Slots.tsx) |
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PLink } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PLink href="https://porsche.com">
8
+ Some label
9
+ </PLink>
10
+ </>
11
+ )
12
+ }