@porsche-design-system/components-react 4.7.0-rc.0 → 4.8.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 (210) hide show
  1. package/CHANGELOG.md +87 -1
  2. package/cjs/hooks.cjs +1 -5
  3. package/cjs/lib/components/checkbox.wrapper.cjs +3 -3
  4. package/cjs/lib/components/input-date.wrapper.cjs +3 -3
  5. package/cjs/lib/components/input-email.wrapper.cjs +3 -3
  6. package/cjs/lib/components/input-month.wrapper.cjs +3 -3
  7. package/cjs/lib/components/input-number.wrapper.cjs +3 -3
  8. package/cjs/lib/components/input-password.wrapper.cjs +3 -3
  9. package/cjs/lib/components/input-tel.wrapper.cjs +3 -3
  10. package/cjs/lib/components/input-text.wrapper.cjs +3 -3
  11. package/cjs/lib/components/input-time.wrapper.cjs +3 -3
  12. package/cjs/lib/components/input-url.wrapper.cjs +3 -3
  13. package/cjs/lib/components/input-week.wrapper.cjs +3 -3
  14. package/cjs/lib/components/multi-select.wrapper.cjs +3 -3
  15. package/cjs/lib/components/select.wrapper.cjs +3 -3
  16. package/cjs/lib/components/switch.wrapper.cjs +3 -3
  17. package/cjs/lib/components/textarea.wrapper.cjs +3 -3
  18. package/esm/hooks.d.ts +0 -3
  19. package/esm/hooks.mjs +2 -5
  20. package/esm/lib/components/checkbox.wrapper.d.ts +9 -1
  21. package/esm/lib/components/checkbox.wrapper.mjs +3 -3
  22. package/esm/lib/components/input-date.wrapper.d.ts +9 -1
  23. package/esm/lib/components/input-date.wrapper.mjs +3 -3
  24. package/esm/lib/components/input-email.wrapper.d.ts +9 -1
  25. package/esm/lib/components/input-email.wrapper.mjs +3 -3
  26. package/esm/lib/components/input-month.wrapper.d.ts +9 -1
  27. package/esm/lib/components/input-month.wrapper.mjs +3 -3
  28. package/esm/lib/components/input-number.wrapper.d.ts +9 -1
  29. package/esm/lib/components/input-number.wrapper.mjs +3 -3
  30. package/esm/lib/components/input-password.wrapper.d.ts +9 -1
  31. package/esm/lib/components/input-password.wrapper.mjs +3 -3
  32. package/esm/lib/components/input-search.wrapper.d.ts +2 -2
  33. package/esm/lib/components/input-tel.wrapper.d.ts +9 -1
  34. package/esm/lib/components/input-tel.wrapper.mjs +3 -3
  35. package/esm/lib/components/input-text.wrapper.d.ts +9 -1
  36. package/esm/lib/components/input-text.wrapper.mjs +3 -3
  37. package/esm/lib/components/input-time.wrapper.d.ts +9 -1
  38. package/esm/lib/components/input-time.wrapper.mjs +3 -3
  39. package/esm/lib/components/input-url.wrapper.d.ts +9 -1
  40. package/esm/lib/components/input-url.wrapper.mjs +3 -3
  41. package/esm/lib/components/input-week.wrapper.d.ts +9 -1
  42. package/esm/lib/components/input-week.wrapper.mjs +3 -3
  43. package/esm/lib/components/link-pure.wrapper.d.ts +2 -2
  44. package/esm/lib/components/link-tile-product.wrapper.d.ts +2 -2
  45. package/esm/lib/components/link.wrapper.d.ts +2 -2
  46. package/esm/lib/components/multi-select.wrapper.d.ts +9 -1
  47. package/esm/lib/components/multi-select.wrapper.mjs +3 -3
  48. package/esm/lib/components/select.wrapper.d.ts +9 -1
  49. package/esm/lib/components/select.wrapper.mjs +3 -3
  50. package/esm/lib/components/switch.wrapper.d.ts +9 -1
  51. package/esm/lib/components/switch.wrapper.mjs +3 -3
  52. package/esm/lib/components/textarea.wrapper.d.ts +9 -1
  53. package/esm/lib/components/textarea.wrapper.mjs +3 -3
  54. package/esm/lib/types.d.ts +22 -1
  55. package/package.json +2 -2
  56. package/skills/pds-audit-deprecations-react/SKILL.md +2 -2
  57. package/skills/pds-knowledge-react/SKILL.md +3 -3
  58. package/skills/pds-knowledge-react/references/components/p-carousel/examples/DynamicSlides.tsx +1 -0
  59. package/skills/pds-knowledge-react/references/components/p-carousel/examples/FocusOnCenterSlide.tsx +1 -0
  60. package/skills/pds-knowledge-react/references/components/p-carousel/examples/JumpToSlide.tsx +1 -0
  61. package/skills/pds-knowledge-react/references/components/p-checkbox/accessibility.md +14 -0
  62. package/skills/pds-knowledge-react/references/components/p-checkbox/p-checkbox.md +12 -0
  63. package/skills/pds-knowledge-react/references/components/p-input-date/accessibility.md +14 -0
  64. package/skills/pds-knowledge-react/references/components/p-input-date/p-input-date.md +12 -0
  65. package/skills/pds-knowledge-react/references/components/p-input-email/accessibility.md +14 -0
  66. package/skills/pds-knowledge-react/references/components/p-input-email/p-input-email.md +12 -0
  67. package/skills/pds-knowledge-react/references/components/p-input-month/accessibility.md +14 -0
  68. package/skills/pds-knowledge-react/references/components/p-input-month/p-input-month.md +12 -0
  69. package/skills/pds-knowledge-react/references/components/p-input-number/accessibility.md +14 -0
  70. package/skills/pds-knowledge-react/references/components/p-input-number/p-input-number.md +12 -0
  71. package/skills/pds-knowledge-react/references/components/p-input-password/accessibility.md +14 -0
  72. package/skills/pds-knowledge-react/references/components/p-input-password/p-input-password.md +12 -0
  73. package/skills/pds-knowledge-react/references/components/p-input-search/p-input-search.md +2 -1
  74. package/skills/pds-knowledge-react/references/components/p-input-tel/accessibility.md +14 -0
  75. package/skills/pds-knowledge-react/references/components/p-input-tel/p-input-tel.md +12 -0
  76. package/skills/pds-knowledge-react/references/components/p-input-text/accessibility.md +14 -0
  77. package/skills/pds-knowledge-react/references/components/p-input-text/p-input-text.md +12 -0
  78. package/skills/pds-knowledge-react/references/components/p-input-time/accessibility.md +14 -0
  79. package/skills/pds-knowledge-react/references/components/p-input-time/p-input-time.md +12 -0
  80. package/skills/pds-knowledge-react/references/components/p-input-url/accessibility.md +14 -0
  81. package/skills/pds-knowledge-react/references/components/p-input-url/p-input-url.md +12 -0
  82. package/skills/pds-knowledge-react/references/components/p-input-week/accessibility.md +14 -0
  83. package/skills/pds-knowledge-react/references/components/p-input-week/p-input-week.md +12 -0
  84. package/skills/pds-knowledge-react/references/components/p-link/p-link.md +2 -2
  85. package/skills/pds-knowledge-react/references/components/p-link-pure/p-link-pure.md +2 -2
  86. package/skills/pds-knowledge-react/references/components/p-link-tile-product/p-link-tile-product.md +2 -2
  87. package/skills/pds-knowledge-react/references/components/p-multi-select/accessibility.md +22 -0
  88. package/skills/pds-knowledge-react/references/components/p-multi-select/p-multi-select.md +14 -2
  89. package/skills/pds-knowledge-react/references/components/p-pin-code/p-pin-code.md +11 -3
  90. package/skills/pds-knowledge-react/references/components/p-select/accessibility.md +22 -0
  91. package/skills/pds-knowledge-react/references/components/p-select/p-select.md +14 -2
  92. package/skills/pds-knowledge-react/references/components/p-switch/accessibility.md +18 -0
  93. package/skills/pds-knowledge-react/references/components/p-switch/p-switch.md +12 -0
  94. package/skills/pds-knowledge-react/references/components/p-textarea/accessibility.md +14 -0
  95. package/skills/pds-knowledge-react/references/components/p-textarea/p-textarea.md +12 -0
  96. package/skills/pds-knowledge-react/references/deprecations.md +4 -4
  97. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +18 -105
  98. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +78 -156
  99. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/hooks.cjs +1 -5
  100. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.cjs +4 -4
  101. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-date.wrapper.cjs +4 -4
  102. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-email.wrapper.cjs +4 -4
  103. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-month.wrapper.cjs +4 -4
  104. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-number.wrapper.cjs +4 -4
  105. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-password.wrapper.cjs +4 -4
  106. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-tel.wrapper.cjs +4 -4
  107. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-text.wrapper.cjs +4 -4
  108. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-time.wrapper.cjs +4 -4
  109. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-url.wrapper.cjs +4 -4
  110. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-week.wrapper.cjs +4 -4
  111. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.cjs +4 -4
  112. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/select.wrapper.cjs +4 -4
  113. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.cjs +4 -4
  114. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/textarea.wrapper.cjs +4 -4
  115. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +1 -1
  116. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.cjs +2 -2
  117. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +1 -1
  118. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.cjs +1 -1
  119. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +1 -1
  120. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs +1 -1
  121. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +1 -1
  122. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.cjs +1 -1
  123. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs +1 -1
  124. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +1 -1
  125. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.cjs +1 -1
  126. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +1 -1
  127. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.cjs +1 -1
  128. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.cjs +1 -1
  129. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-product.cjs +1 -1
  130. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.cjs +1 -1
  131. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +1 -1
  132. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +2 -3
  133. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.cjs +0 -1
  134. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +1 -1
  135. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +0 -1
  136. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.cjs +1 -2
  137. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +0 -1
  138. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +0 -1
  139. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +1 -1
  140. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +18 -105
  141. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +78 -150
  142. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/hooks.mjs +2 -5
  143. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.mjs +4 -4
  144. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-date.wrapper.mjs +4 -4
  145. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-email.wrapper.mjs +4 -4
  146. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-month.wrapper.mjs +4 -4
  147. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-number.wrapper.mjs +4 -4
  148. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-password.wrapper.mjs +4 -4
  149. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-tel.wrapper.mjs +4 -4
  150. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-text.wrapper.mjs +4 -4
  151. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-time.wrapper.mjs +4 -4
  152. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-url.wrapper.mjs +4 -4
  153. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-week.wrapper.mjs +4 -4
  154. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.mjs +4 -4
  155. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select.wrapper.mjs +4 -4
  156. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.mjs +4 -4
  157. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/textarea.wrapper.mjs +4 -4
  158. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +2 -2
  159. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.mjs +3 -3
  160. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +1 -1
  161. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs +1 -1
  162. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +1 -1
  163. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +1 -1
  164. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +1 -1
  165. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.mjs +1 -1
  166. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +1 -1
  167. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +1 -1
  168. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.mjs +1 -1
  169. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +1 -1
  170. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.mjs +1 -1
  171. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.mjs +1 -1
  172. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-product.mjs +1 -1
  173. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.mjs +1 -1
  174. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +2 -2
  175. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +3 -4
  176. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +0 -1
  177. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +2 -2
  178. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +0 -1
  179. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.mjs +1 -2
  180. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +0 -1
  181. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +0 -1
  182. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +2 -2
  183. package/ssr/esm/hooks.d.ts +0 -3
  184. package/ssr/esm/lib/components/checkbox.wrapper.d.ts +9 -1
  185. package/ssr/esm/lib/components/input-date.wrapper.d.ts +9 -1
  186. package/ssr/esm/lib/components/input-email.wrapper.d.ts +9 -1
  187. package/ssr/esm/lib/components/input-month.wrapper.d.ts +9 -1
  188. package/ssr/esm/lib/components/input-number.wrapper.d.ts +9 -1
  189. package/ssr/esm/lib/components/input-password.wrapper.d.ts +9 -1
  190. package/ssr/esm/lib/components/input-search.wrapper.d.ts +2 -2
  191. package/ssr/esm/lib/components/input-tel.wrapper.d.ts +9 -1
  192. package/ssr/esm/lib/components/input-text.wrapper.d.ts +9 -1
  193. package/ssr/esm/lib/components/input-time.wrapper.d.ts +9 -1
  194. package/ssr/esm/lib/components/input-url.wrapper.d.ts +9 -1
  195. package/ssr/esm/lib/components/input-week.wrapper.d.ts +9 -1
  196. package/ssr/esm/lib/components/link-pure.wrapper.d.ts +2 -2
  197. package/ssr/esm/lib/components/link-tile-product.wrapper.d.ts +2 -2
  198. package/ssr/esm/lib/components/link.wrapper.d.ts +2 -2
  199. package/ssr/esm/lib/components/multi-select.wrapper.d.ts +9 -1
  200. package/ssr/esm/lib/components/select.wrapper.d.ts +9 -1
  201. package/ssr/esm/lib/components/switch.wrapper.d.ts +9 -1
  202. package/ssr/esm/lib/components/textarea.wrapper.d.ts +9 -1
  203. package/ssr/esm/lib/dsr-components/label.d.ts +1 -0
  204. package/ssr/esm/lib/dsr-components/link-pure.d.ts +1 -1
  205. package/ssr/esm/lib/dsr-components/link-tile-product.d.ts +1 -1
  206. package/ssr/esm/lib/dsr-components/link.d.ts +1 -1
  207. package/ssr/esm/lib/dsr-components/stepper-horizontal.d.ts +0 -1
  208. package/ssr/esm/lib/dsr-components/tabs-bar.d.ts +0 -1
  209. package/ssr/esm/lib/dsr-components/tabs.d.ts +0 -1
  210. package/ssr/esm/lib/types.d.ts +22 -1
@@ -46,6 +46,15 @@ You can use native `click`, `focus`, `focusin`, `blur` and `focusout` events on
46
46
 
47
47
  ### ARIA enhancements
48
48
 
49
+ #### External **ARIA** provided by the `aria` property:
50
+
51
+ Use the `aria` property to pass supported attributes to the **native control inside the shadow DOM**. Prefer a visible slotted label for the accessible name. Use `aria-label` when the label is hidden or missing, and `aria-description` for extra context that should not replace the name. Do not use `aria-label` to replace a different visible label (WCAG 2.5.3).
52
+
53
+ | ARIA | Usage |
54
+ | --- | --- |
55
+ | `aria-label` | Defines an accessible name when the visible label is insufficient or hidden; prefer a visible `label` for most cases. |
56
+ | `aria-description` | Provides additional context for assistive technologies without replacing the accessible name. |
57
+
49
58
  #### Internal **ARIA** that is managed by the component:
50
59
 
51
60
  | ARIA | Usage |
@@ -62,9 +71,11 @@ The switch accessible name comes from the default slot. Provide concise, descrip
62
71
 
63
72
  ### Common do's and don'ts
64
73
 
74
+ - **Do** pass extra labelling through the `aria` prop (`aria-label`, `aria-description`).
65
75
  - **Do** provide a clear slotted label that describes what the switch controls.
66
76
  - **Do** use `hide-label` only when the label text remains in the slot for screen readers.
67
77
  - **Don't** use an icon or visual state alone without descriptive label text.
78
+ - **Don't** add native `aria-*` attributes directly on the component host.
68
79
 
69
80
  ## Integration examples
70
81
 
@@ -77,6 +88,7 @@ See [accessibility integration examples](./accessibility.md) for paired anti-pat
77
88
  | Property | Type | Default | Description |
78
89
  | --- | --- | --- | --- |
79
90
  | `alignLabel` | `'start'` `'end'`<br>`BreakpointCustomizable<SwitchAlignLabel>` | `'end'` | Sets the position of the slotted label relative to the switch toggle, either before (`start`) or after (`end`) it. Supports responsive breakpoint values. |
91
+ | `aria` | `SwitchAriaAttribute` | `undefined` | Sets additional ARIA attributes on the switch to improve accessibility for screen readers. |
80
92
  | `checked` | `boolean` | `false` | Reflects the switch's current on/off state and allows setting the initial checked value when the component first renders. |
81
93
  | `compact` | `boolean` | `false` | Reduces the switch size and spacing for use in dense layouts where vertical space is limited. |
82
94
  | `disabled` | `boolean` | `false` | Prevents user interaction with the switch and blocks all click and keyboard events while it is disabled. |
@@ -2,6 +2,20 @@
2
2
 
3
3
  ## Integration examples
4
4
 
5
+ ### ARIA on component host vs aria prop
6
+
7
+ #### ❌ Anti-pattern
8
+
9
+ ```tsx
10
+ <PTextarea name="comment" label="Comment" aria-label="Accessible name" aria-description="Additional context"></PTextarea>
11
+ ```
12
+
13
+ #### ✅ Recommended
14
+
15
+ ```tsx
16
+ <PTextarea name="comment" label="Comment" aria={{'aria-label': 'Accessible name', 'aria-description': 'Additional context'}}></PTextarea>
17
+ ```
18
+
5
19
  ### Placeholder-only instructions for open text input
6
20
 
7
21
  #### ❌ Anti-pattern
@@ -34,6 +34,15 @@ Instead of relying on slotted content, the `p-textarea` component offers a `valu
34
34
 
35
35
  ### ARIA enhancements
36
36
 
37
+ #### External **ARIA** provided by the `aria` property:
38
+
39
+ Use the `aria` property to pass supported attributes to the **native control inside the shadow DOM**. Prefer a visible `label` for the accessible name. Use `aria-label` when the label is hidden or insufficient, and `aria-description` for extra context that should not replace the name.
40
+
41
+ | ARIA | Usage |
42
+ | --- | --- |
43
+ | `aria-label` | Defines an accessible name when the visible label is insufficient or hidden; prefer a visible `label` for most cases. |
44
+ | `aria-description` | Provides additional context for assistive technologies without replacing the accessible name. |
45
+
37
46
  #### Internal **ARIA** that is managed by the component:
38
47
 
39
48
  | ARIA | Usage |
@@ -52,11 +61,13 @@ In general, avoid using the `disabled` state. Disabled elements are no longer fo
52
61
 
53
62
  ### Common do's and don'ts
54
63
 
64
+ - **Do** pass extra labelling through the `aria` prop (`aria-label`, `aria-description`).
55
65
  - **Do** provide a descriptive label, especially for open text questions.
56
66
  - **Do** use helper text to describe expected format, length, or sensitive content rules.
57
67
  - **Do** surface validation with state/message so screen readers get updates.
58
68
  - **Don't** use placeholder-only instructions.
59
69
  - **Don't** use `hide-label` without an accessible name.
70
+ - **Don't** add native `aria-*` attributes directly on the component host.
60
71
 
61
72
  ## Integration examples
62
73
 
@@ -68,6 +79,7 @@ See [accessibility integration examples](./accessibility.md) for paired anti-pat
68
79
 
69
80
  | Property | Type | Default | Description |
70
81
  | --- | --- | --- | --- |
82
+ | `aria` | `TextareaAriaAttribute` | `undefined` | Sets additional ARIA attributes on the native textarea to improve accessibility for screen readers. |
71
83
  | `autoComplete` | `string` | `undefined` | Provides the browser with a hint to enable text autofill suggestions for the textarea (e.g. `autocomplete='on'`). |
72
84
  | `compact` | `boolean` | `false` | Reduces the textarea's initial height and padding for use in dense layouts where vertical space is limited. |
73
85
  | `counter` | `boolean` | `false` | Shows a live character counter below the textarea indicating how many characters the user has typed relative to `maxLength`. |
@@ -1,6 +1,6 @@
1
1
  # Deprecated API
2
2
 
3
- Every deprecated Porsche Design System API in `4.7.0-rc.0`, indexed by what is deprecated rather than by which component owns it. Use it to check an existing codebase; use the component and styling references to build with the current API.
3
+ Every deprecated Porsche Design System API in `4.8.0-rc.0`, indexed by what is deprecated rather than by which component owns it. Use it to check an existing codebase; use the component and styling references to build with the current API.
4
4
 
5
5
  Deprecated APIs still work in this version. Each will be removed in the next major release, so usage is a compatibility risk rather than a present-day defect — except where a message says an API has no effect anymore, which means the behavior is already gone and only the declaration remains.
6
6
 
@@ -675,12 +675,12 @@ Derived from the Tailwind theme exposed by `@porsche-design-system/components-re
675
675
 
676
676
  ## Tokens
677
677
 
678
- No deprecations in `4.7.0-rc.0`. Derived from the design-token API exposed by `@porsche-design-system/components-react/tokens`, which was checked and found to carry none — this is a verified result, not an omission.
678
+ No deprecations in `4.8.0-rc.0`. Derived from the design-token API exposed by `@porsche-design-system/components-react/tokens`, which was checked and found to carry none — this is a verified result, not an omission.
679
679
 
680
680
  ## Icons
681
681
 
682
- No deprecations in `4.7.0-rc.0`. Derived from the `p-icon` `name` values exposed by `@porsche-design-system/components-react`, which was checked and found to carry none — this is a verified result, not an omission.
682
+ No deprecations in `4.8.0-rc.0`. Derived from the `p-icon` `name` values exposed by `@porsche-design-system/components-react`, which was checked and found to carry none — this is a verified result, not an omission.
683
683
 
684
684
  ## Stylesheets
685
685
 
686
- No deprecations in `4.7.0-rc.0`. Derived from the global CSS exposed by `@porsche-design-system/components-react/index.css`, including `@porsche-design-system/components-react/variables.css` and `@porsche-design-system/components-react/color-scheme.css`, which was checked and found to carry none — this is a verified result, not an omission.
686
+ No deprecations in `4.8.0-rc.0`. Derived from the global CSS exposed by `@porsche-design-system/components-react/index.css`, including `@porsche-design-system/components-react/variables.css` and `@porsche-design-system/components-react/color-scheme.css`, which was checked and found to carry none — this is a verified result, not an omission.
@@ -3750,6 +3750,22 @@ const isTruthyForAnyBreakpoint = (prop) => {
3750
3750
  return typeof value === 'object' ? Object.values(value).some(Boolean) : !!value;
3751
3751
  };
3752
3752
 
3753
+ /**
3754
+ * Checks if the current environment supports the constructable stylesheets feature.
3755
+ *
3756
+ * @returns {boolean} `true` if constructable stylesheets are supported, `false` otherwise.
3757
+ */
3758
+ const supportsConstructableStylesheets = () => {
3759
+ try {
3760
+ return typeof new CSSStyleSheet().replaceSync === 'function';
3761
+ }
3762
+ catch {
3763
+ return false;
3764
+ }
3765
+ };
3766
+ // determine it once
3767
+ supportsConstructableStylesheets();
3768
+
3753
3769
  // NOTE: handpicked selection of plugins from jss-preset-default
3754
3770
  const jss = createJss({
3755
3771
  plugins: [
@@ -3764,16 +3780,6 @@ const getCss = (jssStyles) => jss
3764
3780
  generateId: (rule) => rule.key,
3765
3781
  })
3766
3782
  .toString();
3767
- const supportsConstructableStylesheets = () => {
3768
- try {
3769
- return typeof new CSSStyleSheet().replaceSync === 'function';
3770
- }
3771
- catch {
3772
- return false;
3773
- }
3774
- };
3775
- // determine it once
3776
- supportsConstructableStylesheets();
3777
3783
  const buildStyles = (value, getJssStyle) => {
3778
3784
  return typeof value === 'object'
3779
3785
  ? Object.keys(value)
@@ -3809,7 +3815,7 @@ const mergeDeep = (...objects) => {
3809
3815
  }, {});
3810
3816
  };
3811
3817
 
3812
- // TODO: Use function from ./jss (Causes bundling issues)
3818
+ // TODO: Use function from ./supportsConstructableStylesheets (Causes bundling issues)
3813
3819
  (() => {
3814
3820
  try {
3815
3821
  return typeof new CSSStyleSheet().replaceSync === 'function';
@@ -3867,12 +3873,6 @@ const OPTION_LIST_SAFE_ZONE = 6;
3867
3873
 
3868
3874
  const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
3869
3875
 
3870
- const prefix = `[Porsche Design System v${"4.7.0-rc.0"}]` // this part isn't covered by unit tests
3871
- ;
3872
- const consoleError = (...messages) => {
3873
- console.error(prefix, ...messages);
3874
- };
3875
-
3876
3876
  // Single source of truth for the two CSS feature queries behind the "keep on #top-layer during fade-out" capability,
3877
3877
  // shared by the JS detection (`supportsOverlayTransition`) and the CSS `@supports` wrapper
3878
3878
  // (`overlayTransitionSupportsQuery`) so the two can never drift.
@@ -3901,94 +3901,7 @@ const formatObjectOutput = (value) => {
3901
3901
  .replace(/(})/g, ' $1') // add space before following: }
3902
3902
  .replace(/^"(.+)"$/, '$1'); // remove wrapping double quotes
3903
3903
  };
3904
- const formatArrayOutput = (value) => {
3905
- return JSON.stringify(value.map((x) => (x === undefined ? `${x}` : x))) // wrap undefined in quotes to not convert it to null
3906
- .replace(/'/g, '') // remove single quotes
3907
- .replace(/"/g, "'") // replace double quotes with single quotes
3908
- .replace(/'(undefined)'/, '$1') // remove quotes around undefined
3909
- .replace(/,/g, ', '); // add space after comma
3910
- };
3911
- const printErrorMessage = ({ propName, propValue, // TODO: might be nicer if this is always a string
3912
- propType, componentName, instance, }) => {
3913
- consoleError(`Invalid property '${propName}' with value '${internalValidateProps.formatObjectOutput(propValue)}' supplied to ${componentName}, expected one of: ${propType}.`, instance.host);
3914
- };
3915
- const isValueNotOfType = (propValue, propType) => {
3916
- return propValue !== undefined && typeof propValue !== propType;
3917
- };
3918
- const validateValueOfType = (propName, propValue, propType) => {
3919
- if (internalValidateProps.isValueNotOfType(propValue, propType)) {
3920
- return { propName, propValue, propType };
3921
- }
3922
- return undefined;
3923
- };
3924
- const getBreakpointCustomizableStructure = (allowedValues) => {
3925
- return breakpointCustomizableTemplate.replace(/value/g, allowedValues !== 'boolean' && allowedValues !== 'number'
3926
- ? internalValidateProps
3927
- .formatArrayOutput(allowedValues)
3928
- .replace(/\[/g, '(') // starting inline type literal array
3929
- .replace(/]/g, ')[]') // ending inline type literal array
3930
- .replace(/,/g, ' |') // replace commas with a pipe
3931
- : allowedValues);
3932
- };
3933
- const getAriaStructure = (allowedAriaAttributes) => {
3934
- return internalValidateProps
3935
- .formatObjectOutput(allowedAriaAttributes.reduce((prev, key) => ({
3936
- ...prev,
3937
- [key]: 'value',
3938
- }), {}))
3939
- .replace(/":/g, '"?:') // add optional modifier on keys before colon
3940
- .replace(/"/g, "'"); // replace double quotes with single quotes
3941
- };
3942
- const getShapeStructure = (shapeStructure) => {
3943
- return internalValidateProps
3944
- .formatObjectOutput(Object.keys(shapeStructure).reduce((prev, key) => ({ ...prev, [key]: shapeStructure[key].name }), {}))
3945
- .replace(/"/g, ''); // remove double quotes
3946
- };
3947
- const isBreakpointCustomizableValueInvalid = (value, allowedValues) => {
3948
- return allowedValues === 'boolean' || allowedValues === 'number'
3949
- ? internalValidateProps.isValueNotOfType(value, allowedValues)
3950
- : !allowedValues.includes(value);
3951
- };
3952
- /**
3953
- * Validates an array using a provided validator function and returns the first encountered validation error.
3954
- *
3955
- * @param {string} propName - The name of the property being validated.
3956
- * @param {any} arr - The input to be validated.
3957
- * @param {ValidatorFunction} validator - The validator function that checks each array item.
3958
- * @returns {ValidationError | undefined} The first encountered validation error object, or undefined if the array is valid.
3959
- */
3960
- const isValidArray = (propName, arr, validator) => {
3961
- const validationError = Array.isArray(arr)
3962
- ? validator(propName, arr.find((item) => validator(propName, item)))
3963
- : {
3964
- propName,
3965
- propValue: arr,
3966
- // Derive propType for the error message by invoking the validator with a value that is
3967
- // guaranteed to fail. `null` works for most built-in validators (string/number/boolean),
3968
- // but not for `AllowedTypes.null` itself, so fall back to a unique Symbol which fails
3969
- // every typeof-based validator.
3970
- propType: (validator(propName, null) ?? validator(propName, Symbol('invalid')))?.propType,
3971
- };
3972
- if (validationError) {
3973
- return { ...validationError, propType: `${validationError.propType}[]` };
3974
- }
3975
- return undefined;
3976
- };
3977
- const internalValidateProps = {
3978
- isValueNotOfType,
3979
- formatArrayOutput,
3980
- formatObjectOutput,
3981
- printErrorMessage,
3982
- validateValueOfType,
3983
- isValidArray,
3984
- isBreakpointCustomizableValueInvalid,
3985
- getBreakpointCustomizableStructure,
3986
- getAriaStructure,
3987
- getShapeStructure,
3988
- };
3989
- const breakpointCustomizableTemplate = `value, ${internalValidateProps
3990
- .formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {}))
3991
- .replace(/"/g, '')}`;
3904
+ `value, ${formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {})).replace(/"/g, '')}`;
3992
3905
 
3993
3906
  const getInlineSVGBackgroundImage = (path) => {
3994
3907
  return `url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${path}</svg>')`;
@@ -3183,15 +3183,6 @@ function requireDist () {
3183
3183
  var distExports = requireDist();
3184
3184
  var jssPluginSortMediaQueries = /*@__PURE__*/getDefaultExportFromCjs(distExports);
3185
3185
 
3186
- // NOTE: these utils are in the same file on purpose
3187
- // to force them being bundled into our core chunk
3188
- const getTagName = (el) => el.tagName.toLowerCase();
3189
- const getTagNameWithoutPrefix = (host) => {
3190
- const tagName = getTagName(host);
3191
- const [, tagNameWithoutPrefix = ''] = /^(?:[a-z0-9-]+-)?(p-[a-z-]+)$/.exec(tagName) || [];
3192
- return (tagNameWithoutPrefix || tagName); // return tagName as fallback for default tags
3193
- };
3194
-
3195
3186
  const parseCssTimeToMs = (value) => {
3196
3187
  const trimmed = value.trim();
3197
3188
  const num = Number.parseFloat(trimmed);
@@ -3226,8 +3217,6 @@ const isDisabledOrLoading = (disabled, loading) => {
3226
3217
  return disabled || loading;
3227
3218
  };
3228
3219
 
3229
- const isElementOfKind = (element, tagName) => getTagNameWithoutPrefix(element) === tagName;
3230
-
3231
3220
  const parseJSONAttribute = (attribute) => {
3232
3221
  // Input is object, e.g. { 'aria-label': 'Some label' }
3233
3222
  if (typeof attribute !== 'string') {
@@ -3272,9 +3261,8 @@ const getButtonBaseAriaAttributes = (isDisabled, isLoading) => {
3272
3261
  };
3273
3262
  };
3274
3263
 
3275
- const getComboboxAriaAttributes = (isOpen, isRequired, labelId, messageId, descriptionId, listboxId) => {
3264
+ const getComboboxAriaAttributes = (isOpen, isRequired, messageId, descriptionId, listboxId) => {
3276
3265
  return {
3277
- 'aria-labelledby': labelId || null,
3278
3266
  'aria-describedby': setAriaIDREF(messageId, descriptionId),
3279
3267
  'aria-haspopup': 'listbox',
3280
3268
  'aria-expanded': isOpen ? 'true' : 'false',
@@ -3414,15 +3402,11 @@ const parseJSONBoolean = (prop) =>
3414
3402
  // TODO: [v5] obsolete once objects can only be set via property, since Stencil coerces booleans itself then, see #4708
3415
3403
  (prop === '' ? true : parse(prop));
3416
3404
 
3417
- // NOTE: handpicked selection of plugins from jss-preset-default
3418
- createJss({
3419
- plugins: [
3420
- jssGlobal(),
3421
- jssNested(),
3422
- camelCase(),
3423
- jssPluginSortMediaQueries({ combineMediaQueries: true }),
3424
- ],
3425
- });
3405
+ /**
3406
+ * Checks if the current environment supports the constructable stylesheets feature.
3407
+ *
3408
+ * @returns {boolean} `true` if constructable stylesheets are supported, `false` otherwise.
3409
+ */
3426
3410
  const supportsConstructableStylesheets = () => {
3427
3411
  try {
3428
3412
  return typeof new CSSStyleSheet().replaceSync === 'function';
@@ -3433,7 +3417,17 @@ const supportsConstructableStylesheets = () => {
3433
3417
  };
3434
3418
  // determine it once
3435
3419
  supportsConstructableStylesheets();
3436
- // TODO: Use function from ./jss (Causes bundling issues)
3420
+
3421
+ // NOTE: handpicked selection of plugins from jss-preset-default
3422
+ createJss({
3423
+ plugins: [
3424
+ jssGlobal(),
3425
+ jssNested(),
3426
+ camelCase(),
3427
+ jssPluginSortMediaQueries({ combineMediaQueries: true }),
3428
+ ],
3429
+ });
3430
+ // TODO: Use function from ./supportsConstructableStylesheets (Causes bundling issues)
3437
3431
  (() => {
3438
3432
  try {
3439
3433
  return typeof new CSSStyleSheet().replaceSync === 'function';
@@ -3530,12 +3524,6 @@ const hasShowPickerSupport = () => (hasDocument &&
3530
3524
  'showPicker' in HTMLInputElement.prototype &&
3531
3525
  CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
3532
3526
 
3533
- const prefix = `[Porsche Design System v${"4.7.0-rc.0"}]` // this part isn't covered by unit tests
3534
- ;
3535
- const consoleError$1 = (...messages) => {
3536
- console.error(prefix, ...messages);
3537
- };
3538
-
3539
3527
  /**
3540
3528
  * Checks if the current environment supports the native Popover API.
3541
3529
  *
@@ -3638,94 +3626,7 @@ const formatObjectOutput = (value) => {
3638
3626
  .replace(/(})/g, ' $1') // add space before following: }
3639
3627
  .replace(/^"(.+)"$/, '$1'); // remove wrapping double quotes
3640
3628
  };
3641
- const formatArrayOutput = (value) => {
3642
- return JSON.stringify(value.map((x) => (x === undefined ? `${x}` : x))) // wrap undefined in quotes to not convert it to null
3643
- .replace(/'/g, '') // remove single quotes
3644
- .replace(/"/g, "'") // replace double quotes with single quotes
3645
- .replace(/'(undefined)'/, '$1') // remove quotes around undefined
3646
- .replace(/,/g, ', '); // add space after comma
3647
- };
3648
- const printErrorMessage = ({ propName, propValue, // TODO: might be nicer if this is always a string
3649
- propType, componentName, instance, }) => {
3650
- consoleError$1(`Invalid property '${propName}' with value '${internalValidateProps.formatObjectOutput(propValue)}' supplied to ${componentName}, expected one of: ${propType}.`, instance.host);
3651
- };
3652
- const isValueNotOfType = (propValue, propType) => {
3653
- return propValue !== undefined && typeof propValue !== propType;
3654
- };
3655
- const validateValueOfType = (propName, propValue, propType) => {
3656
- if (internalValidateProps.isValueNotOfType(propValue, propType)) {
3657
- return { propName, propValue, propType };
3658
- }
3659
- return undefined;
3660
- };
3661
- const getBreakpointCustomizableStructure = (allowedValues) => {
3662
- return breakpointCustomizableTemplate.replace(/value/g, allowedValues !== 'boolean' && allowedValues !== 'number'
3663
- ? internalValidateProps
3664
- .formatArrayOutput(allowedValues)
3665
- .replace(/\[/g, '(') // starting inline type literal array
3666
- .replace(/]/g, ')[]') // ending inline type literal array
3667
- .replace(/,/g, ' |') // replace commas with a pipe
3668
- : allowedValues);
3669
- };
3670
- const getAriaStructure = (allowedAriaAttributes) => {
3671
- return internalValidateProps
3672
- .formatObjectOutput(allowedAriaAttributes.reduce((prev, key) => ({
3673
- ...prev,
3674
- [key]: 'value',
3675
- }), {}))
3676
- .replace(/":/g, '"?:') // add optional modifier on keys before colon
3677
- .replace(/"/g, "'"); // replace double quotes with single quotes
3678
- };
3679
- const getShapeStructure = (shapeStructure) => {
3680
- return internalValidateProps
3681
- .formatObjectOutput(Object.keys(shapeStructure).reduce((prev, key) => ({ ...prev, [key]: shapeStructure[key].name }), {}))
3682
- .replace(/"/g, ''); // remove double quotes
3683
- };
3684
- const isBreakpointCustomizableValueInvalid = (value, allowedValues) => {
3685
- return allowedValues === 'boolean' || allowedValues === 'number'
3686
- ? internalValidateProps.isValueNotOfType(value, allowedValues)
3687
- : !allowedValues.includes(value);
3688
- };
3689
- /**
3690
- * Validates an array using a provided validator function and returns the first encountered validation error.
3691
- *
3692
- * @param {string} propName - The name of the property being validated.
3693
- * @param {any} arr - The input to be validated.
3694
- * @param {ValidatorFunction} validator - The validator function that checks each array item.
3695
- * @returns {ValidationError | undefined} The first encountered validation error object, or undefined if the array is valid.
3696
- */
3697
- const isValidArray = (propName, arr, validator) => {
3698
- const validationError = Array.isArray(arr)
3699
- ? validator(propName, arr.find((item) => validator(propName, item)))
3700
- : {
3701
- propName,
3702
- propValue: arr,
3703
- // Derive propType for the error message by invoking the validator with a value that is
3704
- // guaranteed to fail. `null` works for most built-in validators (string/number/boolean),
3705
- // but not for `AllowedTypes.null` itself, so fall back to a unique Symbol which fails
3706
- // every typeof-based validator.
3707
- propType: (validator(propName, null) ?? validator(propName, Symbol('invalid')))?.propType,
3708
- };
3709
- if (validationError) {
3710
- return { ...validationError, propType: `${validationError.propType}[]` };
3711
- }
3712
- return undefined;
3713
- };
3714
- const internalValidateProps = {
3715
- isValueNotOfType,
3716
- formatArrayOutput,
3717
- formatObjectOutput,
3718
- printErrorMessage,
3719
- validateValueOfType,
3720
- isValidArray,
3721
- isBreakpointCustomizableValueInvalid,
3722
- getBreakpointCustomizableStructure,
3723
- getAriaStructure,
3724
- getShapeStructure,
3725
- };
3726
- const breakpointCustomizableTemplate = `value, ${internalValidateProps
3727
- .formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {}))
3728
- .replace(/"/g, '')}`;
3629
+ `value, ${formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {})).replace(/"/g, '')}`;
3729
3630
 
3730
3631
  /** Supported market locales (BCP47). Source of truth for the `locale` prop API; list may evolve. */
3731
3632
  const MARKET_LOCALES = [
@@ -3916,12 +3817,34 @@ const AI_TAG_LOCALES_DEPRECATED = [
3916
3817
  ...new Set([...MARKET_LOCALES, ...AI_TAG_LOCALES_DEPRECATED]),
3917
3818
  ];
3918
3819
  const normalizeAiTagLocale = (locale) => locale.replace(/-/g, '_');
3919
- /** First language subtag; maps Norwegian Bokmål `nb` → `no` (translation key). */
3820
+ /**
3821
+ * Translation key for a locale.
3822
+ * Usually the first language subtag. Special cases:
3823
+ * - Norwegian Bokmål `nb` → `no`
3824
+ * - Chinese `zh-CN` / `zh-HK` / `zh-TW` → `zhCN` / `zhHK` / `zhTW` (distinct legal copy)
3825
+ */
3826
+ const ZH_REGION_TRANSLATION_KEYS = {
3827
+ CN: 'zhCN',
3828
+ HK: 'zhHK',
3829
+ TW: 'zhTW',
3830
+ };
3920
3831
  const getAiTagLanguage = (locale) => {
3921
- const language = normalizeAiTagLocale(locale).split('_')[0] ?? '';
3922
- return language === 'nb' ? 'no' : language;
3832
+ const [language, region] = normalizeAiTagLocale(locale).split('_');
3833
+ if (language === 'nb') {
3834
+ return 'no';
3835
+ }
3836
+ if (language === 'zh' && region && region in ZH_REGION_TRANSLATION_KEYS) {
3837
+ return ZH_REGION_TRANSLATION_KEYS[region];
3838
+ }
3839
+ return language ?? '';
3923
3840
  };
3924
3841
  const AI_TAG_TRANSLATIONS = {
3842
+ ar: {
3843
+ short: 'AI',
3844
+ long: 'الذكاء الاصطناعي',
3845
+ generated: 'مُنشأ بواسطة الذكاء الاصطناعي',
3846
+ modified: 'مُعدَّل بواسطة الذكاء الاصطناعي',
3847
+ },
3925
3848
  bg: {
3926
3849
  short: 'ИИ',
3927
3850
  long: 'изкуствен интелект',
@@ -3993,6 +3916,18 @@ const AI_TAG_TRANSLATIONS = {
3993
3916
  generated: "Generato dall'IA",
3994
3917
  modified: "Modificato dall'IA",
3995
3918
  },
3919
+ ja: {
3920
+ short: 'AI',
3921
+ long: '人工知能',
3922
+ generated: 'AIによる生成',
3923
+ modified: 'AIによる修正',
3924
+ },
3925
+ ko: {
3926
+ short: 'AI',
3927
+ long: '인공지능',
3928
+ generated: '인공지능 생성',
3929
+ modified: '인공지능 수정',
3930
+ },
3996
3931
  lt: {
3997
3932
  short: 'DI',
3998
3933
  long: 'dirbtinis intelektas',
@@ -4049,7 +3984,7 @@ const AI_TAG_TRANSLATIONS = {
4049
3984
  generated: 'Сгенерировано ИИ',
4050
3985
  modified: 'Изменено ИИ',
4051
3986
  },
4052
- sk: { short: 'AI', long: 'umelá inteligencia', generated: 'Vytvořeno AI', modified: 'Upravené AI' },
3987
+ sk: { short: 'AI', long: 'umelá inteligencia', generated: 'Vytvorené AI', modified: 'Upravené AI' },
4053
3988
  sl: { short: 'UI', long: 'umetna inteligenca', generated: 'Ustvarjeno z UI', modified: 'Spremenjeno z UI' },
4054
3989
  sr: { short: 'AI', long: 'veštačka inteligencija', generated: 'AI-generisano', modified: 'AI-modifikovano' },
4055
3990
  sv: {
@@ -4070,6 +4005,24 @@ const AI_TAG_TRANSLATIONS = {
4070
4005
  generated: 'Згенеровано ШІ',
4071
4006
  modified: 'Змінено ШІ',
4072
4007
  },
4008
+ zhCN: {
4009
+ short: 'AI',
4010
+ long: '人工智能',
4011
+ generated: 'AI生成',
4012
+ modified: 'AI润色',
4013
+ },
4014
+ zhHK: {
4015
+ short: 'AI',
4016
+ long: '人工智能',
4017
+ generated: '由 AI 生成的',
4018
+ modified: '經 AI 修改的',
4019
+ },
4020
+ zhTW: {
4021
+ short: 'AI',
4022
+ long: '人工智慧',
4023
+ generated: 'AI生成',
4024
+ modified: 'AI修改',
4025
+ },
4073
4026
  };
4074
4027
  const resolveAiTagTranslationLanguage = (locale) => {
4075
4028
  const language = getAiTagLanguage(locale);
@@ -4152,33 +4105,6 @@ const getDisplayTagType = (host, size, tag) => {
4152
4105
  }
4153
4106
  return displaySizeToTagMap[size] || 'h1';
4154
4107
  };
4155
- /**
4156
- * Recursively updates the state of a drilldown item's parent elements by traversing up the DOM tree.
4157
- *
4158
- * @param {HTMLPDrilldownItemElement} activeItem - The current drilldown item being updated.
4159
- * @param {'primary' | 'secondary' | 'cascade'} prop - The property of the drilldown item to update.
4160
- * @param {boolean} value - The new state value to apply.
4161
- */
4162
- const traverseTreeAndUpdateState = (activeItem, prop, value) => {
4163
- if (isElementOfKind(activeItem, 'p-drilldown-item')) {
4164
- activeItem[prop] = value;
4165
- internalDrilldown.traverseTreeAndUpdateState(activeItem.parentElement, 'cascade', value);
4166
- }
4167
- };
4168
- const internalDrilldown = {
4169
- traverseTreeAndUpdateState,
4170
- };
4171
- /**
4172
- * Updates the state of the drilldown and its children based on the provided activeItem and value.
4173
- *
4174
- * @param {string | undefined} activeItem - The drilldown-item element which is currently active (which has the activeIdentifier as identifier). If undefined, updates the root element.
4175
- * @param {boolean} value - The new state value to apply.
4176
- * @returns {void}
4177
- */
4178
- const updateDrilldownItemState = (activeItem, value) => {
4179
- activeItem.secondary = value;
4180
- internalDrilldown.traverseTreeAndUpdateState(activeItem.parentElement, 'primary', value);
4181
- };
4182
4108
  const getFieldsetAriaAttributes = (isRequired, isInvalid, aria) => {
4183
4109
  const ariaAttrs = parseAndGetAriaAttributes(aria);
4184
4110
  return {
@@ -4357,6 +4283,7 @@ const isCurrentInput = (index, value, length) => {
4357
4283
  }
4358
4284
  return index === firstWhitespaceIndex; // Some value is entered: set current-input id on the first input element which does not have a value
4359
4285
  };
4286
+ const getPinCodeInputAriaLabel = (index, length) => `${index + 1} of ${length}`;
4360
4287
  const getSegmentedControlItemAriaAttributes = (isSelected, isDisabled, state, message, ariaProp) => ({
4361
4288
  ...getButtonBaseAriaAttributes(isDisabled, false),
4362
4289
  ...(state !== 'none' && parseAndGetAriaAttributes({ 'aria-description': message })),
@@ -4398,8 +4325,9 @@ const getStepperHorizontalIconName = (state) => {
4398
4325
  return state === 'complete' ? 'success' : 'warning';
4399
4326
  };
4400
4327
 
4401
- const getSwitchButtonAriaAttributes = (isDisabled, isLoading, isChecked) => {
4328
+ const getSwitchButtonAriaAttributes = (isDisabled, isLoading, isChecked, aria) => {
4402
4329
  return {
4330
+ ...parseAndGetAriaAttributes(aria),
4403
4331
  ...getButtonBaseAriaAttributes(isDisabled, isLoading),
4404
4332
  'aria-checked': isChecked ? 'true' : 'false',
4405
4333
  };
@@ -4448,7 +4376,6 @@ exports.buildCrestImgSrc = buildCrestImgSrc;
4448
4376
  exports.buildCrestSrcSet = buildCrestSrcSet;
4449
4377
  exports.buildFlagUrl = buildFlagUrl;
4450
4378
  exports.buildIconUrl = buildIconUrl;
4451
- exports.consoleError = consoleError$1;
4452
4379
  exports.createPaginationItems = createPaginationItems;
4453
4380
  exports.createRange = createRange;
4454
4381
  exports.createTopLayerController = createTopLayerController;
@@ -4474,13 +4401,12 @@ exports.getInlineNotificationAriaAttributes = getInlineNotificationAriaAttribute
4474
4401
  exports.getListboxAriaAttributes = getListboxAriaAttributes;
4475
4402
  exports.getMaxTransitionDurationMs = getMaxTransitionDurationMs;
4476
4403
  exports.getParsedTileCompact = getParsedTileCompact;
4404
+ exports.getPinCodeInputAriaLabel = getPinCodeInputAriaLabel;
4477
4405
  exports.getSanitizedActiveTabIndex = getSanitizedActiveTabIndex;
4478
4406
  exports.getSegmentedControlItemAriaAttributes = getSegmentedControlItemAriaAttributes;
4479
4407
  exports.getStepperHorizontalIconName = getStepperHorizontalIconName;
4480
4408
  exports.getSvgUrl = getSvgUrl;
4481
4409
  exports.getSwitchButtonAriaAttributes = getSwitchButtonAriaAttributes;
4482
- exports.getTagName = getTagName;
4483
- exports.getTagNameWithoutPrefix = getTagNameWithoutPrefix;
4484
4410
  exports.getTextTagType = getTextTagType;
4485
4411
  exports.getTotalPages = getTotalPages;
4486
4412
  exports.hasDocument = hasDocument;
@@ -4489,11 +4415,9 @@ exports.hasSpecificDirectChildTag = hasSpecificDirectChildTag;
4489
4415
  exports.hasVisibleIcon = hasVisibleIcon;
4490
4416
  exports.hasWindow = hasWindow$1;
4491
4417
  exports.headerSlot = headerSlot;
4492
- exports.internalDrilldown = internalDrilldown;
4493
4418
  exports.isCurrentInput = isCurrentInput;
4494
4419
  exports.isDialogBackdropTarget = isDialogBackdropTarget;
4495
4420
  exports.isDisabledOrLoading = isDisabledOrLoading;
4496
- exports.isElementOfKind = isElementOfKind;
4497
4421
  exports.isInfinitePagination = isInfinitePagination;
4498
4422
  exports.isListTypeOrdered = isListTypeOrdered;
4499
4423
  exports.isSortable = isSortable;
@@ -4517,5 +4441,3 @@ exports.supportsOverlayTransition = supportsOverlayTransition;
4517
4441
  exports.tempDiv = tempDiv;
4518
4442
  exports.tempIcon = tempIcon;
4519
4443
  exports.tempLabel = tempLabel;
4520
- exports.traverseTreeAndUpdateState = traverseTreeAndUpdateState;
4521
- exports.updateDrilldownItemState = updateDrilldownItemState;
@@ -54,7 +54,7 @@ const useMergedClass = (ref, className) => {
54
54
  };
55
55
  const useBrowserLayoutEffect = typeof window !== 'undefined' ? react.useLayoutEffect : react.useEffect;
56
56
  const useToastManager = () => {
57
- const tagName = internalHooks.usePrefix('p-toast');
57
+ const tagName = usePrefix('p-toast');
58
58
  return {
59
59
  addMessage: (message) => {
60
60
  const toast = document.body.querySelector(tagName);
@@ -62,11 +62,7 @@ const useToastManager = () => {
62
62
  },
63
63
  };
64
64
  };
65
- const internalHooks = {
66
- usePrefix,
67
- };
68
65
 
69
- exports.internalHooks = internalHooks;
70
66
  exports.skipCheckForPorscheDesignSystemProviderDuringTests = skipCheckForPorscheDesignSystemProviderDuringTests;
71
67
  exports.useBrowserLayoutEffect = useBrowserLayoutEffect;
72
68
  exports.useEventCallback = useEventCallback;