@porsche-design-system/components-angular 4.5.0 β†’ 4.6.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/bin/pds-skill.js +259 -0
  3. package/fesm2022/porsche-design-system-components-angular.mjs.map +1 -1
  4. package/package.json +5 -2
  5. package/skill/SKILL.md +124 -0
  6. package/skill/references/components/p-accordion/examples/Default.ts +26 -0
  7. package/skill/references/components/p-accordion/examples/InteractiveElementsInSummary.ts +30 -0
  8. package/skill/references/components/p-accordion/examples/StickySummary.ts +26 -0
  9. package/skill/references/components/p-accordion/p-accordion.md +95 -0
  10. package/skill/references/components/p-ai-tag/examples/Default.ts +13 -0
  11. package/skill/references/components/p-ai-tag/examples/WithinCheckbox.ts +33 -0
  12. package/skill/references/components/p-ai-tag/examples/WithinFormLabel.ts +40 -0
  13. package/skill/references/components/p-ai-tag/examples/WithinImage.ts +16 -0
  14. package/skill/references/components/p-ai-tag/examples/WithinInputSearch.ts +15 -0
  15. package/skill/references/components/p-ai-tag/examples/WithinRadioGroup.ts +32 -0
  16. package/skill/references/components/p-ai-tag/examples/WithinTable.ts +94 -0
  17. package/skill/references/components/p-ai-tag/examples/WithinText.ts +17 -0
  18. package/skill/references/components/p-ai-tag/p-ai-tag.md +47 -0
  19. package/skill/references/components/p-banner/examples/Customization.ts +37 -0
  20. package/skill/references/components/p-banner/examples/Default.ts +26 -0
  21. package/skill/references/components/p-banner/p-banner.md +92 -0
  22. package/skill/references/components/p-button/examples/Default.ts +15 -0
  23. package/skill/references/components/p-button/examples/Form.ts +26 -0
  24. package/skill/references/components/p-button/examples/FormAttribute.ts +30 -0
  25. package/skill/references/components/p-button/p-button.md +118 -0
  26. package/skill/references/components/p-button-pure/examples/CustomClickableArea.ts +15 -0
  27. package/skill/references/components/p-button-pure/examples/Default.ts +15 -0
  28. package/skill/references/components/p-button-pure/examples/Form.ts +26 -0
  29. package/skill/references/components/p-button-pure/examples/FormAttribute.ts +30 -0
  30. package/skill/references/components/p-button-pure/p-button-pure.md +118 -0
  31. package/skill/references/components/p-button-tile/examples/ColorScheme.ts +18 -0
  32. package/skill/references/components/p-button-tile/examples/Default.ts +21 -0
  33. package/skill/references/components/p-button-tile/examples/FooterSlot.ts +32 -0
  34. package/skill/references/components/p-button-tile/examples/Hyphens.ts +38 -0
  35. package/skill/references/components/p-button-tile/examples/UiBehaviour.ts +44 -0
  36. package/skill/references/components/p-button-tile/p-button-tile.md +115 -0
  37. package/skill/references/components/p-canvas/examples/Default.ts +13 -0
  38. package/skill/references/components/p-canvas/p-canvas.md +91 -0
  39. package/skill/references/components/p-carousel/examples/Default.ts +26 -0
  40. package/skill/references/components/p-carousel/examples/DynamicSlides.ts +37 -0
  41. package/skill/references/components/p-carousel/examples/FlexibleWidths.ts +32 -0
  42. package/skill/references/components/p-carousel/examples/FocusOnCenterSlide.ts +65 -0
  43. package/skill/references/components/p-carousel/examples/Intl.ts +23 -0
  44. package/skill/references/components/p-carousel/examples/JumpToSlide.ts +50 -0
  45. package/skill/references/components/p-carousel/p-carousel.md +142 -0
  46. package/skill/references/components/p-checkbox/examples/Default.ts +13 -0
  47. package/skill/references/components/p-checkbox/examples/Form.ts +31 -0
  48. package/skill/references/components/p-checkbox/examples/Indeterminate.ts +16 -0
  49. package/skill/references/components/p-checkbox/examples/Slots.ts +57 -0
  50. package/skill/references/components/p-checkbox/examples/WrappedLabel.ts +27 -0
  51. package/skill/references/components/p-checkbox/p-checkbox.md +122 -0
  52. package/skill/references/components/p-crest/examples/CustomClickableArea.ts +13 -0
  53. package/skill/references/components/p-crest/examples/Default.ts +13 -0
  54. package/skill/references/components/p-crest/examples/Link.ts +13 -0
  55. package/skill/references/components/p-crest/p-crest.md +65 -0
  56. package/skill/references/components/p-display/examples/Color.ts +15 -0
  57. package/skill/references/components/p-display/examples/Default.ts +15 -0
  58. package/skill/references/components/p-display/examples/Semantics.ts +21 -0
  59. package/skill/references/components/p-display/examples/Size.ts +15 -0
  60. package/skill/references/components/p-display/examples/SizeResponsive.ts +15 -0
  61. package/skill/references/components/p-display/p-display.md +78 -0
  62. package/skill/references/components/p-divider/examples/Default.ts +13 -0
  63. package/skill/references/components/p-divider/examples/Responsive.ts +15 -0
  64. package/skill/references/components/p-divider/examples/Vertical.ts +15 -0
  65. package/skill/references/components/p-divider/p-divider.md +49 -0
  66. package/skill/references/components/p-drilldown/examples/CustomContent.ts +166 -0
  67. package/skill/references/components/p-drilldown/examples/Default.ts +119 -0
  68. package/skill/references/components/p-drilldown/p-drilldown.md +168 -0
  69. package/skill/references/components/p-fieldset/examples/Default.ts +15 -0
  70. package/skill/references/components/p-fieldset/examples/Required.ts +16 -0
  71. package/skill/references/components/p-fieldset/examples/SlottedLabel.ts +18 -0
  72. package/skill/references/components/p-fieldset/examples/SlottedMessage.ts +18 -0
  73. package/skill/references/components/p-fieldset/p-fieldset.md +88 -0
  74. package/skill/references/components/p-flag/examples/Default.ts +13 -0
  75. package/skill/references/components/p-flag/examples/ResponsiveSize.ts +13 -0
  76. package/skill/references/components/p-flag/examples/Size.ts +16 -0
  77. package/skill/references/components/p-flag/examples/SizeCssVar.ts +13 -0
  78. package/skill/references/components/p-flag/p-flag.md +68 -0
  79. package/skill/references/components/p-flyout/examples/CustomStyling.ts +47 -0
  80. package/skill/references/components/p-flyout/examples/Default.ts +44 -0
  81. package/skill/references/components/p-flyout/examples/Form.ts +47 -0
  82. package/skill/references/components/p-flyout/examples/StickyTop.ts +44 -0
  83. package/skill/references/components/p-flyout/p-flyout.md +128 -0
  84. package/skill/references/components/p-heading/examples/Color.ts +15 -0
  85. package/skill/references/components/p-heading/examples/Default.ts +15 -0
  86. package/skill/references/components/p-heading/examples/Semantics.ts +21 -0
  87. package/skill/references/components/p-heading/p-heading.md +78 -0
  88. package/skill/references/components/p-icon/examples/Color.ts +16 -0
  89. package/skill/references/components/p-icon/examples/ColorCssVar.ts +13 -0
  90. package/skill/references/components/p-icon/examples/Custom.ts +13 -0
  91. package/skill/references/components/p-icon/examples/Default.ts +13 -0
  92. package/skill/references/components/p-icon/examples/Overview.ts +591 -0
  93. package/skill/references/components/p-icon/examples/ResponsiveSize.ts +13 -0
  94. package/skill/references/components/p-icon/examples/Size.ts +16 -0
  95. package/skill/references/components/p-icon/examples/SizeCssVar.ts +13 -0
  96. package/skill/references/components/p-icon/p-icon.md +88 -0
  97. package/skill/references/components/p-inline-notification/examples/ActionButton.ts +29 -0
  98. package/skill/references/components/p-inline-notification/examples/Default.ts +13 -0
  99. package/skill/references/components/p-inline-notification/examples/EventHandling.ts +31 -0
  100. package/skill/references/components/p-inline-notification/p-inline-notification.md +74 -0
  101. package/skill/references/components/p-input-date/examples/Default.ts +13 -0
  102. package/skill/references/components/p-input-date/examples/Form.ts +31 -0
  103. package/skill/references/components/p-input-date/examples/Slots.ts +44 -0
  104. package/skill/references/components/p-input-date/p-input-date.md +138 -0
  105. package/skill/references/components/p-input-email/examples/Default.ts +13 -0
  106. package/skill/references/components/p-input-email/examples/Form.ts +31 -0
  107. package/skill/references/components/p-input-email/examples/Slots.ts +44 -0
  108. package/skill/references/components/p-input-email/p-input-email.md +142 -0
  109. package/skill/references/components/p-input-month/examples/Default.ts +13 -0
  110. package/skill/references/components/p-input-month/examples/Form.ts +31 -0
  111. package/skill/references/components/p-input-month/examples/Slots.ts +44 -0
  112. package/skill/references/components/p-input-month/p-input-month.md +138 -0
  113. package/skill/references/components/p-input-number/examples/Default.ts +13 -0
  114. package/skill/references/components/p-input-number/examples/Form.ts +31 -0
  115. package/skill/references/components/p-input-number/examples/Slots.ts +44 -0
  116. package/skill/references/components/p-input-number/p-input-number.md +146 -0
  117. package/skill/references/components/p-input-password/examples/Default.ts +13 -0
  118. package/skill/references/components/p-input-password/examples/Form.ts +31 -0
  119. package/skill/references/components/p-input-password/examples/Slots.ts +42 -0
  120. package/skill/references/components/p-input-password/examples/Toggle.ts +13 -0
  121. package/skill/references/components/p-input-password/p-input-password.md +141 -0
  122. package/skill/references/components/p-input-search/examples/AriaCombobox.ts +38 -0
  123. package/skill/references/components/p-input-search/examples/Default.ts +13 -0
  124. package/skill/references/components/p-input-search/examples/Form.ts +31 -0
  125. package/skill/references/components/p-input-search/examples/Slots.ts +44 -0
  126. package/skill/references/components/p-input-search/p-input-search.md +178 -0
  127. package/skill/references/components/p-input-tel/examples/Default.ts +13 -0
  128. package/skill/references/components/p-input-tel/examples/Form.ts +31 -0
  129. package/skill/references/components/p-input-tel/examples/Slots.ts +44 -0
  130. package/skill/references/components/p-input-tel/p-input-tel.md +141 -0
  131. package/skill/references/components/p-input-text/examples/Controlled.ts +36 -0
  132. package/skill/references/components/p-input-text/examples/Default.ts +13 -0
  133. package/skill/references/components/p-input-text/examples/Form.ts +31 -0
  134. package/skill/references/components/p-input-text/examples/Slots.ts +44 -0
  135. package/skill/references/components/p-input-text/p-input-text.md +146 -0
  136. package/skill/references/components/p-input-time/examples/Default.ts +13 -0
  137. package/skill/references/components/p-input-time/examples/Form.ts +31 -0
  138. package/skill/references/components/p-input-time/examples/Slots.ts +44 -0
  139. package/skill/references/components/p-input-time/p-input-time.md +140 -0
  140. package/skill/references/components/p-input-url/examples/Default.ts +13 -0
  141. package/skill/references/components/p-input-url/examples/Form.ts +31 -0
  142. package/skill/references/components/p-input-url/examples/Slots.ts +44 -0
  143. package/skill/references/components/p-input-url/p-input-url.md +141 -0
  144. package/skill/references/components/p-input-week/examples/Default.ts +13 -0
  145. package/skill/references/components/p-input-week/examples/Form.ts +31 -0
  146. package/skill/references/components/p-input-week/examples/Slots.ts +44 -0
  147. package/skill/references/components/p-input-week/p-input-week.md +138 -0
  148. package/skill/references/components/p-link/examples/Default.ts +15 -0
  149. package/skill/references/components/p-link/examples/FrameworkRouting.ts +17 -0
  150. package/skill/references/components/p-link/examples/Icon.ts +20 -0
  151. package/skill/references/components/p-link/p-link.md +101 -0
  152. package/skill/references/components/p-link-pure/examples/CustomClickableArea.ts +15 -0
  153. package/skill/references/components/p-link-pure/examples/Default.ts +15 -0
  154. package/skill/references/components/p-link-pure/examples/FrameworkRouting.ts +17 -0
  155. package/skill/references/components/p-link-pure/examples/Icon.ts +20 -0
  156. package/skill/references/components/p-link-pure/p-link-pure.md +110 -0
  157. package/skill/references/components/p-link-tile/examples/ColorScheme.ts +18 -0
  158. package/skill/references/components/p-link-tile/examples/Default.ts +21 -0
  159. package/skill/references/components/p-link-tile/examples/FooterSlot.ts +32 -0
  160. package/skill/references/components/p-link-tile/examples/Hyphens.ts +39 -0
  161. package/skill/references/components/p-link-tile/examples/UiBehaviour.ts +44 -0
  162. package/skill/references/components/p-link-tile/examples/WithVideo.ts +18 -0
  163. package/skill/references/components/p-link-tile/p-link-tile.md +105 -0
  164. package/skill/references/components/p-link-tile-product/examples/Default.ts +24 -0
  165. package/skill/references/components/p-link-tile-product/examples/FrameworkRouting.ts +27 -0
  166. package/skill/references/components/p-link-tile-product/p-link-tile-product.md +93 -0
  167. package/skill/references/components/p-modal/examples/AlertDialog.ts +41 -0
  168. package/skill/references/components/p-modal/examples/CustomStyling.ts +28 -0
  169. package/skill/references/components/p-modal/examples/Default.ts +41 -0
  170. package/skill/references/components/p-modal/examples/Scrollable.ts +45 -0
  171. package/skill/references/components/p-modal/p-modal.md +135 -0
  172. package/skill/references/components/p-model-signature/examples/CustomStyling.ts +17 -0
  173. package/skill/references/components/p-model-signature/examples/Default.ts +13 -0
  174. package/skill/references/components/p-model-signature/examples/MaskBlendMode.ts +35 -0
  175. package/skill/references/components/p-model-signature/examples/MaskImage.ts +15 -0
  176. package/skill/references/components/p-model-signature/examples/MaskVideo.ts +15 -0
  177. package/skill/references/components/p-model-signature/examples/SafeZone.ts +63 -0
  178. package/skill/references/components/p-model-signature/p-model-signature.md +62 -0
  179. package/skill/references/components/p-multi-select/examples/AsyncFilter.ts +149 -0
  180. package/skill/references/components/p-multi-select/examples/Default.ts +32 -0
  181. package/skill/references/components/p-multi-select/examples/Form.ts +38 -0
  182. package/skill/references/components/p-multi-select/examples/Optgroups.ts +45 -0
  183. package/skill/references/components/p-multi-select/examples/SelectedSlot.ts +103 -0
  184. package/skill/references/components/p-multi-select/examples/SetValue.ts +76 -0
  185. package/skill/references/components/p-multi-select/examples/Slots.ts +51 -0
  186. package/skill/references/components/p-multi-select/p-multi-select.md +197 -0
  187. package/skill/references/components/p-pagination/examples/Default.ts +13 -0
  188. package/skill/references/components/p-pagination/p-pagination.md +83 -0
  189. package/skill/references/components/p-pin-code/examples/CopyPaste.ts +13 -0
  190. package/skill/references/components/p-pin-code/examples/Default.ts +13 -0
  191. package/skill/references/components/p-pin-code/examples/Form.ts +31 -0
  192. package/skill/references/components/p-pin-code/examples/Slots.ts +42 -0
  193. package/skill/references/components/p-pin-code/p-pin-code.md +109 -0
  194. package/skill/references/components/p-popover/examples/Default.ts +17 -0
  195. package/skill/references/components/p-popover/examples/SlottedButton.ts +18 -0
  196. package/skill/references/components/p-popover/p-popover.md +116 -0
  197. package/skill/references/components/p-radio-group/examples/Default.ts +20 -0
  198. package/skill/references/components/p-radio-group/examples/Form.ts +38 -0
  199. package/skill/references/components/p-radio-group/examples/Slots.ts +72 -0
  200. package/skill/references/components/p-radio-group/p-radio-group.md +157 -0
  201. package/skill/references/components/p-scroller/examples/Default.ts +54 -0
  202. package/skill/references/components/p-scroller/examples/Height.ts +29 -0
  203. package/skill/references/components/p-scroller/examples/ScrollToPosition.ts +43 -0
  204. package/skill/references/components/p-scroller/p-scroller.md +93 -0
  205. package/skill/references/components/p-segmented-control/examples/Default.ts +29 -0
  206. package/skill/references/components/p-segmented-control/examples/Form.ts +37 -0
  207. package/skill/references/components/p-segmented-control/examples/Slots.ts +57 -0
  208. package/skill/references/components/p-segmented-control/examples/WithLabels.ts +29 -0
  209. package/skill/references/components/p-segmented-control/p-segmented-control.md +162 -0
  210. package/skill/references/components/p-select/examples/AsyncFilter.ts +149 -0
  211. package/skill/references/components/p-select/examples/Default.ts +32 -0
  212. package/skill/references/components/p-select/examples/Form.ts +38 -0
  213. package/skill/references/components/p-select/examples/Optgroups.ts +45 -0
  214. package/skill/references/components/p-select/examples/Required.ts +48 -0
  215. package/skill/references/components/p-select/examples/SelectedSlot.ts +130 -0
  216. package/skill/references/components/p-select/examples/SetValue.ts +71 -0
  217. package/skill/references/components/p-select/examples/Slots.ts +51 -0
  218. package/skill/references/components/p-select/examples/SlottedImages.ts +38 -0
  219. package/skill/references/components/p-select/p-select.md +194 -0
  220. package/skill/references/components/p-sheet/examples/Default.ts +33 -0
  221. package/skill/references/components/p-sheet/p-sheet.md +121 -0
  222. package/skill/references/components/p-spinner/examples/Color.ts +16 -0
  223. package/skill/references/components/p-spinner/examples/ColorCssVar.ts +13 -0
  224. package/skill/references/components/p-spinner/examples/Default.ts +13 -0
  225. package/skill/references/components/p-spinner/examples/ResponsiveSize.ts +13 -0
  226. package/skill/references/components/p-spinner/examples/Size.ts +16 -0
  227. package/skill/references/components/p-spinner/examples/SizeCssVar.ts +13 -0
  228. package/skill/references/components/p-spinner/p-spinner.md +96 -0
  229. package/skill/references/components/p-stepper-horizontal/examples/Default.ts +26 -0
  230. package/skill/references/components/p-stepper-horizontal/examples/FrameworkImplementation.ts +107 -0
  231. package/skill/references/components/p-stepper-horizontal/p-stepper-horizontal.md +109 -0
  232. package/skill/references/components/p-switch/examples/Default.ts +21 -0
  233. package/skill/references/components/p-switch/p-switch.md +103 -0
  234. package/skill/references/components/p-table/examples/Advanced.ts +162 -0
  235. package/skill/references/components/p-table/examples/CaptionProperty.ts +40 -0
  236. package/skill/references/components/p-table/examples/CaptionSlot.ts +43 -0
  237. package/skill/references/components/p-table/examples/Default.ts +120 -0
  238. package/skill/references/components/p-table/examples/HideLabel.ts +40 -0
  239. package/skill/references/components/p-table/examples/LayoutFixed.ts +53 -0
  240. package/skill/references/components/p-table/examples/Sorting.ts +79 -0
  241. package/skill/references/components/p-table/p-table.md +189 -0
  242. package/skill/references/components/p-tabs/examples/ActiveTab.ts +29 -0
  243. package/skill/references/components/p-tabs/examples/Default.ts +29 -0
  244. package/skill/references/components/p-tabs/examples/Gradient.ts +114 -0
  245. package/skill/references/components/p-tabs/examples/Labelling.ts +29 -0
  246. package/skill/references/components/p-tabs/p-tabs.md +136 -0
  247. package/skill/references/components/p-tabs-bar/examples/Default.ts +29 -0
  248. package/skill/references/components/p-tabs-bar/examples/Gradient.ts +80 -0
  249. package/skill/references/components/p-tabs-bar/examples/Labelling.ts +29 -0
  250. package/skill/references/components/p-tabs-bar/examples/Links.ts +23 -0
  251. package/skill/references/components/p-tabs-bar/p-tabs-bar.md +181 -0
  252. package/skill/references/components/p-tag/examples/Default.ts +15 -0
  253. package/skill/references/components/p-tag/examples/Multiline.ts +17 -0
  254. package/skill/references/components/p-tag/examples/SlottedButton.ts +44 -0
  255. package/skill/references/components/p-tag/examples/SlottedLink.ts +44 -0
  256. package/skill/references/components/p-tag/p-tag.md +66 -0
  257. package/skill/references/components/p-tag-dismissible/examples/Default.ts +15 -0
  258. package/skill/references/components/p-tag-dismissible/p-tag-dismissible.md +75 -0
  259. package/skill/references/components/p-text/examples/Default.ts +15 -0
  260. package/skill/references/components/p-text/examples/Semantics.ts +21 -0
  261. package/skill/references/components/p-text/examples/Size.ts +15 -0
  262. package/skill/references/components/p-text/examples/SizeResponsive.ts +15 -0
  263. package/skill/references/components/p-text/p-text.md +68 -0
  264. package/skill/references/components/p-text-list/examples/Default.ts +31 -0
  265. package/skill/references/components/p-text-list/p-text-list.md +68 -0
  266. package/skill/references/components/p-textarea/examples/Default.ts +13 -0
  267. package/skill/references/components/p-textarea/examples/Form.ts +31 -0
  268. package/skill/references/components/p-textarea/examples/Slots.ts +42 -0
  269. package/skill/references/components/p-textarea/p-textarea.md +122 -0
  270. package/skill/references/components/p-toast/examples/Default.ts +23 -0
  271. package/skill/references/components/p-toast/p-toast.md +61 -0
  272. package/skill/references/components/p-wordmark/examples/CustomClickableArea.ts +13 -0
  273. package/skill/references/components/p-wordmark/examples/Default.ts +13 -0
  274. package/skill/references/components/p-wordmark/examples/Size.ts +13 -0
  275. package/skill/references/components/p-wordmark/p-wordmark.md +66 -0
  276. package/skill/references/icons.md +5 -0
  277. package/skill/references/styles/emotion.md +439 -0
  278. package/skill/references/styles/scss.md +402 -0
  279. package/skill/references/styles/tailwindcss.md +356 -0
  280. package/skill/references/styles/vanilla-extract.md +444 -0
  281. package/skill/references/stylesheets.md +331 -0
  282. package/skill/references/tokens.md +323 -0
  283. package/types/porsche-design-system-components-angular.d.ts +2 -2
@@ -0,0 +1,141 @@
1
+ # p-input-tel
2
+
3
+ The `p-input-tel` component provides a user-friendly, accessible interface for entering valid telephone numbers. It leverages native HTML5 telephone 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` is a caption which informs the user what information a particular form field is asking for. The `p-input-tel` 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
+ ## Usage
10
+
11
+ The `p-input-tel` component is specifically designed for collecting telephone numbers. It leverages built-in browser validation to ensure that input follows the correct phone number format. This makes it a better choice than a generic text input when phone number validation, proper keyboard behavior on mobile devices, and accessibility are important. For further guidance, see the [MDN documentation on tel inputs](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/tel#using_tel_inputs).
12
+
13
+ ### Do:
14
+
15
+ - Use when requesting a telephone number from the user.
16
+ - Use without a label only when the context is clear.
17
+ - Use for validation and error of input.
18
+ - Use asterisk for required fields.
19
+
20
+ ### Don't:
21
+
22
+ - Don't use labels with more than two words whenever possible (keep it short and descriptive).
23
+ - Don't use an instructional or description text for the label.
24
+
25
+ ---
26
+
27
+ ## Related Components
28
+
29
+ - [Input Date](../p-input-date/p-input-date.md)
30
+ - [Input Email](../p-input-email/p-input-email.md)
31
+ - [Input Month](../p-input-month/p-input-month.md)
32
+ - [Input Number](../p-input-number/p-input-number.md)
33
+ - [Input Password](../p-input-password/p-input-password.md)
34
+ - [Input Search](../p-input-search/p-input-search.md)
35
+ - [Input Text](../p-input-text/p-input-text.md)
36
+ - [Input Time](../p-input-time/p-input-time.md)
37
+ - [Input Url](../p-input-url/p-input-url.md)
38
+ - [Input Week](../p-input-week/p-input-week.md)
39
+
40
+ ## Accessibility support
41
+
42
+ ### Keyboard
43
+
44
+ | Key / state | Function |
45
+ | --- | --- |
46
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
47
+
48
+ ### ARIA enhancements
49
+
50
+ #### Internal **ARIA** that is managed by the component:
51
+
52
+ | ARIA | Usage |
53
+ | --- | --- |
54
+ | `aria-describedby="IDREF"` | Defines the accessible description combined with the status message. |
55
+ | `role="status"`, `role="alert"` | When `message` and `state` or `loading` prop change, the status message is announced. |
56
+ | `aria-hidden="true"` | If `required` attribute is set, the visible asterisk indicator is hidden from assistive technologies. |
57
+ | `aria-invalid="true"` | If `error` state is set. |
58
+ | `aria-live="polite"` | If the `maxlength` attribute is present, the counter is announced via ARIA live region. |
59
+
60
+ ## Development considerations
61
+
62
+ ### Disabled state
63
+
64
+ 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.
65
+
66
+ ### Common do's and don'ts
67
+
68
+ - **Do** keep a persistent label and use helper/description text when additional context is required.
69
+ - **Do** use the component state/message API so validation and status changes are announced.
70
+ - **Do** use clear error wording that helps users recover.
71
+ - **Don't** rely on placeholder text as the only label.
72
+ - **Don't** use `hide-label` without an accessible name.
73
+
74
+ ## Limitations
75
+
76
+ 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.
77
+
78
+ | ARIA | Support |
79
+ | --- | --- |
80
+ | `aria-labelledby` | 🚫 |
81
+ | `aria-describedby` | 🚫 |
82
+
83
+ ## API
84
+
85
+ ### Properties
86
+
87
+ | Property | Type | Default | Description |
88
+ | --- | --- | --- | --- |
89
+ | `autoComplete` | `string` | `undefined` | Provides the browser with a phone number autofill hint (e.g. `autocomplete='tel'`). |
90
+ | `compact` | `boolean` | `false` | Reduces the input height and padding for a more compact layout. |
91
+ | `description` | `string` | `''` | Sets a supplementary description displayed below the label to provide additional context. |
92
+ | `disabled` | `boolean` | `false` | Disables the field, preventing all input. The value is not submitted with the form. |
93
+ | `form` | `string` | `undefined` | Associates the field with a form element by its ID when the field is not nested directly inside it. |
94
+ | `hideLabel` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Hides the visible label while keeping it accessible to screen readers. Supports responsive breakpoint values. |
95
+ | `indicator` | `boolean` | `false` | Shows a phone icon at the start of the field as a visual indicator for telephone input. |
96
+ | `label` | `string` | `''` | Sets the visible label text displayed above the input field. |
97
+ | `loading` _(experimental)_ | `boolean` | `false` | @experimental Disables the field and displays a loading spinner to indicate an ongoing operation. |
98
+ | `maxLength` | `number` | `undefined` | Sets the maximum number of characters the user can enter. |
99
+ | `message` | `string` | `''` | Sets the validation feedback message displayed below the field when `state` is `success` or `error`. |
100
+ | `minLength` | `number` | `undefined` | Sets the minimum number of characters required for the field to be considered valid. |
101
+ | `name` _(required)_ | `string` | `undefined` | Sets the name submitted with the form data to identify this field's value on the server. |
102
+ | `pattern` | `string` | `undefined` | Sets a regular expression the entered value must match to be valid. Overrides the browser's default telephone validation. |
103
+ | `placeholder` | `string` | `''` | Sets placeholder text shown inside the field when it is empty, such as an example phone number format. |
104
+ | `readOnly` | `boolean` | `false` | Makes the field read-only β€” the value is displayed but cannot be edited. The value is still submitted with the form. |
105
+ | `required` | `boolean` | `false` | Marks the field as required β€” form submission is blocked while this field is empty. |
106
+ | `state` | `'none'` `'error'` `'success'` | `'none'` | Sets the validation state, controlling the visual appearance and style of the feedback message (`none`, `success`, `error`). |
107
+ | `value` | `string | null` | `''` | Sets the current telephone number value of the field. |
108
+
109
+ ### Events
110
+
111
+ | Event | Type | Description |
112
+ | --- | --- | --- |
113
+ | `blur` | `CustomEvent<InputTelBlurEventDetail>`<br>`Event` | Emitted when the input loses focus, regardless of whether the value changed. |
114
+ | `change` | `CustomEvent<InputTelChangeEventDetail>`<br>`Event` | Emitted when the input loses focus after its value was changed. |
115
+ | `input` | `CustomEvent<InputTelInputEventDetail>`<br>`InputEvent` | Emitted on every value change as the user types. |
116
+
117
+ ### Slots
118
+
119
+ | Slot | Required | Allowed tag names | Description |
120
+ | --- | --- | --- | --- |
121
+ | `label` | no | β€” | Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
122
+ | `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`). |
123
+ | `description` | no | β€” | Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
124
+ | `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. |
125
+ | `start` | no | β€” | Shows content at the start of the input (e.g. unit prefix). |
126
+ | `end` | no | β€” | Shows content at the end of the input (e.g. toggle button, unit suffix). |
127
+
128
+ ### CSS Variables
129
+
130
+ | CSS Variable | Default | Description |
131
+ | --- | --- | --- |
132
+ | `--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. |
133
+ | `--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. |
134
+
135
+ ## Examples
136
+
137
+ | Example | When to use | File |
138
+ | --- | --- | --- |
139
+ | Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
140
+ | Form | The `p-input-tel` can be integrated into a form in two ways: **controlled** or **uncontrolled**, depending on your needs. | [./examples/Form.ts](./examples/Form.ts) |
141
+ | Slots | Use named slots when `label`, `description` or `message` need markup such as a link. | [./examples/Slots.ts](./examples/Slots.ts) |
@@ -0,0 +1,36 @@
1
+ import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2
+ import {
3
+ type InputTextInputEventDetail,
4
+ type PInputTextProps,
5
+ PorscheDesignSystemModule,
6
+ } from '@porsche-design-system/components-angular';
7
+
8
+ @Component({
9
+ selector: 'porsche-design-system-app',
10
+ template: `
11
+ <p-input-text name="some-name" label="Some Label" [value]="value" (input)="onInput($event)" />
12
+ <p-text>{{ debugText }}</p-text>
13
+ `,
14
+ changeDetection: ChangeDetectionStrategy.OnPush,
15
+ standalone: true,
16
+ imports: [PorscheDesignSystemModule],
17
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
18
+ })
19
+ export class ExampleComponent {
20
+ value: PInputTextProps['value'] = '';
21
+ get debugText(): string {
22
+ return `Value: ${this.value}`;
23
+ }
24
+
25
+ onInput(e: CustomEvent<InputTextInputEventDetail>) {
26
+ const target = e.target as HTMLElement & { value: string };
27
+
28
+ if (target.value.length > 3) {
29
+ const newValue = target.value.slice(0, 3);
30
+ this.value = newValue;
31
+ // The web component doesn't prevent native input, so we must manually reset the input element's value.
32
+ // Angular won't re-render since setState with the truncated value doesn't trigger a change when it's already set.
33
+ target.value = newValue;
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,13 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-input-text label="Some label" name="some-name"></p-input-text>
8
+ `,
9
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
12
+ })
13
+ export class ExampleComponent {}
@@ -0,0 +1,31 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
3
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
4
+
5
+ @Component({
6
+ selector: 'porsche-design-system-app',
7
+ template: `
8
+ <form [formGroup]="form" (ngSubmit)="onSubmit()" class="flex flex-col gap-fluid-sm">
9
+ <p-input-text formControlName="myInputText" [label]="'Some Label'" />
10
+ <div class="flex gap-fluid-sm">
11
+ <p-button type="submit">Submit</p-button>
12
+ <p-button type="reset">Reset</p-button>
13
+ </div>
14
+ <p-text>Last submitted data: {{ submittedValue }}</p-text>
15
+ </form>
16
+ `,
17
+ changeDetection: ChangeDetectionStrategy.OnPush,
18
+ standalone: true,
19
+ imports: [PorscheDesignSystemModule, FormsModule, ReactiveFormsModule], // <-- PDS module is imported here
20
+ })
21
+ export class ExampleComponent {
22
+ form = new FormGroup({
23
+ myInputText: new FormControl<string>(''),
24
+ });
25
+
26
+ submittedValue: any = undefined;
27
+
28
+ onSubmit(): void {
29
+ this.submittedValue = JSON.stringify(this.form.value);
30
+ }
31
+ }
@@ -0,0 +1,44 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-input-text state="error">
8
+ <span slot="label">
9
+ Some label with a
10
+ <a href="https://designsystem.porsche.com" class="underline">
11
+ link
12
+ </a>
13
+ and a "label-after" slot.
14
+ </span>
15
+ <p-popover slot="label-after">
16
+ Some Popover content with a
17
+ <a href="https://designsystem.porsche.com" class="underline">
18
+ link
19
+ </a>
20
+ .
21
+ </p-popover>
22
+ <span slot="description">
23
+ Some description with a
24
+ <a href="https://designsystem.porsche.com" class="underline">
25
+ link
26
+ </a>
27
+ .
28
+ </span>
29
+ <p-icon slot="start" name="shopping-cart" color="contrast-medium" [aria-hidden]="true"></p-icon>
30
+ <p-button-pure slot="end" icon="delete" [hideLabel]="true" class="p-(--ref-p-input-slotted-padding) m-(--ref-p-input-slotted-margin)" [aria]="{'aria-label': 'Delete'}"></p-button-pure>
31
+ <span slot="message">
32
+ Some error message with a
33
+ <a href="https://designsystem.porsche.com" class="underline">
34
+ link
35
+ </a>
36
+ .
37
+ </span>
38
+ </p-input-text>
39
+ `,
40
+ changeDetection: ChangeDetectionStrategy.OnPush,
41
+ standalone: true,
42
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
43
+ })
44
+ export class ExampleComponent {}
@@ -0,0 +1,146 @@
1
+ # p-input-text
2
+
3
+ The `p-input-text` component provides a versatile, user‑friendly interface for entering freeform text. It supports direct keyboard input and includes `start` and `end` slots to allow flexible integration of icons, buttons, or other content within the input field.
4
+
5
+ A `label` is a caption which informs the user what information a particular form field is asking for. The `p-input-text` 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
+ ## Usage
10
+
11
+ `p-input-text` is intended for freeform text input scenarios. It is suitable for entering names, addresses, or any other non-restricted textual content. It should not be used where semantic or functional input types like numbers, emails, or dates are more appropriate. In such cases, consider using a more specific input type or component optimized for that data. For further guidance, see the [MDN documentation on text inputs](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/text#using_text_inputs).
12
+
13
+ ### Do:
14
+
15
+ - Use when freeform text input is required or optional.
16
+ - Use without a label only when the context is clear.
17
+ - Use for validation and error of input.
18
+ - Use asterisk for required fields.
19
+
20
+ ### Don't:
21
+
22
+ - Don't use labels with more than two words whenever possible (keep it short and descriptive).
23
+ - Don't use an instructional or description text for the label.
24
+
25
+ ---
26
+
27
+ ## Related Components
28
+
29
+ - [Input Date](../p-input-date/p-input-date.md)
30
+ - [Input Email](../p-input-email/p-input-email.md)
31
+ - [Input Month](../p-input-month/p-input-month.md)
32
+ - [Input Number](../p-input-number/p-input-number.md)
33
+ - [Input Password](../p-input-password/p-input-password.md)
34
+ - [Input Search](../p-input-search/p-input-search.md)
35
+ - [Input Tel](../p-input-tel/p-input-tel.md)
36
+ - [Input Time](../p-input-time/p-input-time.md)
37
+ - [Input Url](../p-input-url/p-input-url.md)
38
+ - [Input Week](../p-input-week/p-input-week.md)
39
+
40
+ ## Accessibility support
41
+
42
+ ### Keyboard
43
+
44
+ | Key / state | Function |
45
+ | --- | --- |
46
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
47
+
48
+ ### ARIA enhancements
49
+
50
+ #### Internal **ARIA** that is managed by the component:
51
+
52
+ | ARIA | Usage |
53
+ | --- | --- |
54
+ | `aria-describedby="IDREF"` | Defines the accessible description combined with the status message. |
55
+ | `role="status"`, `role="alert"` | When `message` and `state` or `loading` prop change, the status message is announced. |
56
+ | `aria-hidden="true"` | If `required` attribute is set, the visible asterisk indicator is hidden from assistive technologies. |
57
+ | `aria-invalid="true"` | If `error` state is set. |
58
+ | `aria-live="polite"` | If the `maxlength` attribute is present, the counter is announced via ARIA live region. |
59
+
60
+ ## Development considerations
61
+
62
+ ### Exposing the `unit` prop
63
+
64
+ The `unit` prop is not exposed to assistive technologies by default. If you provide a `unit` abbreviation, you need to dissolve it in real text through the `description` prop. For example, if you use `kmh`, you can set the `description` prop to `kilometers per hour`. This way, the screen reader will read out the full text.
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 data type hint to enable relevant autofill suggestions (e.g. `autocomplete='name'`). |
94
+ | `compact` | `boolean` | `false` | Reduces the input height and padding for a more compact layout. |
95
+ | `counter` | `boolean` | `false` | Shows a live character counter below the field indicating how many characters have been entered relative to `maxLength`. |
96
+ | `description` | `string` | `''` | Sets a supplementary description displayed below the label to provide additional context. |
97
+ | `disabled` | `boolean` | `false` | Disables the field, preventing all input. 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
+ | `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
+ | `placeholder` | `string` | `''` | Sets placeholder text shown inside the field when it is empty, to hint at the expected format. |
107
+ | `readOnly` | `boolean` | `false` | Makes the field read-only β€” the value is displayed but cannot be edited by the user. The value is still submitted with the form. |
108
+ | `required` | `boolean` | `false` | Marks the field as required β€” form submission is blocked while this field is empty. |
109
+ | `spellCheck` | `boolean` | `undefined` | Controls whether the browser's built-in spell-checking is enabled for this field. |
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 | number | null` | `''` | Sets the current text value of the input field. |
112
+
113
+ ### Events
114
+
115
+ | Event | Type | Description |
116
+ | --- | --- | --- |
117
+ | `blur` | `CustomEvent<InputTextBlurEventDetail>`<br>`Event` | Emitted when the input loses focus, regardless of whether the value changed. |
118
+ | `change` | `CustomEvent<InputTextChangeEventDetail>`<br>`Event` | Emitted when the input loses focus after its value was changed. |
119
+ | `input` | `CustomEvent<InputTextInputEventDetail>`<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.ts](./examples/Default.ts) |
144
+ | Form | The `p-input-text` can be integrated into a form in two ways: **controlled** or **uncontrolled**, depending on your needs. | [./examples/Form.ts](./examples/Form.ts) |
145
+ | Controlled Input (Preventing User Input) | In some cases you may want to fully control the input value (for example to limit or validate user input). | [./examples/Controlled.ts](./examples/Controlled.ts) |
146
+ | Slots | Use named slots when `label`, `description` or `message` need markup such as a link. | [./examples/Slots.ts](./examples/Slots.ts) |
@@ -0,0 +1,13 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-input-time label="Some label" name="some-name"></p-input-time>
8
+ `,
9
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
12
+ })
13
+ export class ExampleComponent {}
@@ -0,0 +1,31 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
3
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
4
+
5
+ @Component({
6
+ selector: 'porsche-design-system-app',
7
+ template: `
8
+ <form [formGroup]="form" (ngSubmit)="onSubmit()" class="flex flex-col gap-fluid-sm">
9
+ <p-input-time formControlName="myInputTime" [label]="'Some Label'" />
10
+ <div class="flex gap-fluid-sm">
11
+ <p-button type="submit">Submit</p-button>
12
+ <p-button type="reset">Reset</p-button>
13
+ </div>
14
+ <p-text>Last submitted data: {{ submittedValue }}</p-text>
15
+ </form>
16
+ `,
17
+ changeDetection: ChangeDetectionStrategy.OnPush,
18
+ standalone: true,
19
+ imports: [PorscheDesignSystemModule, FormsModule, ReactiveFormsModule], // <-- PDS module is imported here
20
+ })
21
+ export class ExampleComponent {
22
+ form = new FormGroup({
23
+ myInputTime: new FormControl<string>(''),
24
+ });
25
+
26
+ submittedValue: any = undefined;
27
+
28
+ onSubmit(): void {
29
+ this.submittedValue = JSON.stringify(this.form.value);
30
+ }
31
+ }
@@ -0,0 +1,44 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-input-time state="error">
8
+ <span slot="label">
9
+ Some label with a
10
+ <a href="https://designsystem.porsche.com" class="underline">
11
+ link
12
+ </a>
13
+ and a "label-after" slot.
14
+ </span>
15
+ <p-popover slot="label-after">
16
+ Some Popover content with a
17
+ <a href="https://designsystem.porsche.com" class="underline">
18
+ link
19
+ </a>
20
+ .
21
+ </p-popover>
22
+ <span slot="description">
23
+ Some description with a
24
+ <a href="https://designsystem.porsche.com" class="underline">
25
+ link
26
+ </a>
27
+ .
28
+ </span>
29
+ <p-icon slot="start" name="shopping-cart" color="contrast-medium" [aria-hidden]="true"></p-icon>
30
+ <p-button-pure slot="end" icon="delete" [hideLabel]="true" class="p-(--ref-p-input-slotted-padding) m-(--ref-p-input-slotted-margin)" [aria]="{'aria-label': 'Delete'}"></p-button-pure>
31
+ <span slot="message">
32
+ Some error message with a
33
+ <a href="https://designsystem.porsche.com" class="underline">
34
+ link
35
+ </a>
36
+ .
37
+ </span>
38
+ </p-input-time>
39
+ `,
40
+ changeDetection: ChangeDetectionStrategy.OnPush,
41
+ standalone: true,
42
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
43
+ })
44
+ export class ExampleComponent {}
@@ -0,0 +1,140 @@
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
+ ## Usage
10
+
11
+ `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).
12
+
13
+ ### Do:
14
+
15
+ - Use when a time value is required or optional.
16
+ - Use without a label only when the context is clear.
17
+ - Use for validation and error of input.
18
+ - Use asterisk for required fields.
19
+
20
+ ### Don't:
21
+
22
+ - Don't use labels with more than two words whenever possible (keep it short and descriptive).
23
+ - Don't use instructional or description text for the label.
24
+
25
+ ---
26
+
27
+ ## Related Components
28
+
29
+ - [Input Date](../p-input-date/p-input-date.md)
30
+ - [Input Email](../p-input-email/p-input-email.md)
31
+ - [Input Month](../p-input-month/p-input-month.md)
32
+ - [Input Number](../p-input-number/p-input-number.md)
33
+ - [Input Password](../p-input-password/p-input-password.md)
34
+ - [Input Search](../p-input-search/p-input-search.md)
35
+ - [Input Tel](../p-input-tel/p-input-tel.md)
36
+ - [Input Text](../p-input-text/p-input-text.md)
37
+ - [Input Url](../p-input-url/p-input-url.md)
38
+ - [Input Week](../p-input-week/p-input-week.md)
39
+
40
+ ## Accessibility support
41
+
42
+ ### Keyboard
43
+
44
+ | Key / state | Function |
45
+ | --- | --- |
46
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
47
+ | `Arrow Up/Down` | Sets increments/decrements in regards of the steps |
48
+
49
+ ### ARIA enhancements
50
+
51
+ #### Internal **ARIA** that is managed by the component:
52
+
53
+ | ARIA | Usage |
54
+ | --- | --- |
55
+ | `aria-describedby="IDREF"` | Defines the accessible description combined with the status message. |
56
+ | `role="status"`, `role="alert"` | When `message` and `state` or `loading` prop change, the status message is announced. |
57
+ | `aria-hidden="true"` | If `required` attribute is set, the visible asterisk indicator is hidden from assistive technologies. |
58
+ | `aria-invalid="true"` | If `error` state is set. |
59
+ | `aria-live="polite"` | If the `maxlength` attribute is present, the counter is announced via ARIA live region. |
60
+
61
+ ## Development considerations
62
+
63
+ ### Disabled state
64
+
65
+ 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.
66
+
67
+ ### Common do's and don'ts
68
+
69
+ - **Do** keep a persistent label and use helper/description text when additional context is required.
70
+ - **Do** use the component state/message API so validation and status changes are announced.
71
+ - **Do** use clear error wording that helps users recover.
72
+ - **Don't** rely on placeholder text as the only label.
73
+ - **Don't** use `hide-label` without an accessible name.
74
+
75
+ ## Limitations
76
+
77
+ 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.
78
+
79
+ | ARIA | Support |
80
+ | --- | --- |
81
+ | `aria-labelledby` | 🚫 |
82
+ | `aria-describedby` | 🚫 |
83
+
84
+ ## API
85
+
86
+ ### Properties
87
+
88
+ | Property | Type | Default | Description |
89
+ | --- | --- | --- | --- |
90
+ | `autoComplete` | `string` | `undefined` | Provides the browser with a time autofill hint. |
91
+ | `compact` | `boolean` | `false` | Reduces the input height and padding for a more compact layout. |
92
+ | `description` | `string` | `''` | Sets a supplementary description displayed below the label to provide additional context. |
93
+ | `disabled` | `boolean` | `false` | Disables the field, preventing time selection. The value is not submitted with the form. |
94
+ | `form` | `string` | `undefined` | Associates the field with a form element by its ID when the field is not nested directly inside it. |
95
+ | `hideLabel` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Hides the visible label while keeping it accessible to screen readers. Supports responsive breakpoint values. |
96
+ | `label` | `string` | `''` | Sets the visible label text displayed above the input field. |
97
+ | `loading` _(experimental)_ | `boolean` | `false` | @experimental Disables the field and displays a loading spinner to indicate an ongoing operation. |
98
+ | `max` | `string` | `undefined` | Sets the latest selectable time in `hh:mm` or `hh:mm:ss` format. Times after this are disabled in the picker. |
99
+ | `message` | `string` | `''` | Sets the validation feedback message displayed below the field when `state` is `success` or `error`. |
100
+ | `min` | `string` | `undefined` | Sets the earliest selectable time in `hh:mm` or `hh:mm:ss` format. Times before this are disabled in the picker. |
101
+ | `name` _(required)_ | `string` | `undefined` | Sets the name submitted with the form data to identify this field's value on the server. |
102
+ | `readOnly` | `boolean` | `false` | Makes the field read-only β€” the value is displayed but cannot be changed. The value is still submitted with the form. |
103
+ | `required` | `boolean` | `false` | Marks the field as required β€” form submission is blocked while no time is selected. |
104
+ | `state` | `'none'` `'error'` `'success'` | `'none'` | Sets the validation state, controlling the visual appearance and style of the feedback message (`none`, `success`, `error`). |
105
+ | `step` | `number` | `60` | Sets the stepping interval in seconds. Use `60` for minute-level selection, `1` to also expose seconds. |
106
+ | `value` | `string | null` | `''` | Sets the current time value in `hh:mm` or `hh:mm:ss` format (e.g. `14:00`). |
107
+
108
+ ### Events
109
+
110
+ | Event | Type | Description |
111
+ | --- | --- | --- |
112
+ | `blur` | `CustomEvent<InputTimeBlurEventDetail>`<br>`Event` | Emitted when the input loses focus, regardless of whether the value changed. |
113
+ | `change` | `CustomEvent<InputTimeChangeEventDetail>`<br>`Event` | Emitted when the input loses focus after its value was changed. |
114
+ | `input` | `CustomEvent<InputTimeInputEventDetail>`<br>`InputEvent` | Emitted on every value change as the user interacts with the time picker. |
115
+
116
+ ### Slots
117
+
118
+ | Slot | Required | Allowed tag names | Description |
119
+ | --- | --- | --- | --- |
120
+ | `label` | no | β€” | Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
121
+ | `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`). |
122
+ | `description` | no | β€” | Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
123
+ | `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. |
124
+ | `start` | no | β€” | Shows content at the start of the input (e.g. unit prefix). |
125
+ | `end` | no | β€” | Shows content at the end of the input (e.g. toggle button, unit suffix). |
126
+
127
+ ### CSS Variables
128
+
129
+ | CSS Variable | Default | Description |
130
+ | --- | --- | --- |
131
+ | `--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. |
132
+ | `--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. |
133
+
134
+ ## Examples
135
+
136
+ | Example | When to use | File |
137
+ | --- | --- | --- |
138
+ | Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
139
+ | Form | The `p-input-time` can be integrated into a form in two ways: **controlled** or **uncontrolled**, depending on your needs. | [./examples/Form.ts](./examples/Form.ts) |
140
+ | Slots | Use named slots when `label`, `description` or `message` need markup such as a link. | [./examples/Slots.ts](./examples/Slots.ts) |