@porsche-design-system/components-react 4.0.0-alpha.0 → 4.0.0-beta.1

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 (135) hide show
  1. package/CHANGELOG.md +344 -1
  2. package/bin/patchRemixRunProcessBrowserGlobalIdentifier.js +0 -0
  3. package/cjs/lib/components/accordion.wrapper.cjs +3 -3
  4. package/cjs/lib/components/canvas.wrapper.cjs +3 -3
  5. package/{styles → emotion}/cjs/index.cjs +3 -3
  6. package/emotion/esm/index.d.ts +1 -0
  7. package/emotion/esm/index.mjs +1 -0
  8. package/{styles → emotion}/package.json +0 -5
  9. package/esm/lib/components/accordion.wrapper.d.ts +29 -13
  10. package/esm/lib/components/accordion.wrapper.mjs +3 -3
  11. package/esm/lib/components/canvas.wrapper.d.ts +9 -1
  12. package/esm/lib/components/canvas.wrapper.mjs +3 -3
  13. package/esm/lib/components/display.wrapper.d.ts +2 -2
  14. package/esm/lib/components/divider.wrapper.d.ts +2 -2
  15. package/esm/lib/components/heading.wrapper.d.ts +2 -2
  16. package/esm/lib/components/icon.wrapper.d.ts +2 -2
  17. package/esm/lib/components/radio-group-option.wrapper.d.ts +2 -0
  18. package/esm/lib/components/text.wrapper.d.ts +2 -2
  19. package/esm/lib/components/textarea.wrapper.d.ts +2 -2
  20. package/esm/lib/types.d.ts +124 -103
  21. package/global-styles/cn/font-face.css +1 -1
  22. package/global-styles/cn/index.css +264 -115
  23. package/global-styles/color-scheme.css +135 -0
  24. package/global-styles/font-face.css +1 -1
  25. package/global-styles/index.css +264 -115
  26. package/global-styles/variables.css +158 -144
  27. package/package.json +27 -14
  28. package/scss/_index.scss +1 -0
  29. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +1029 -737
  30. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +37 -29
  31. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.cjs +4 -4
  32. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/canvas.wrapper.cjs +4 -4
  33. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/radio-group-option.wrapper.cjs +3 -2
  34. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs +15 -10
  35. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.cjs +5 -4
  36. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.cjs +2 -13
  37. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +5 -3
  38. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +2 -1
  39. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +2 -1
  40. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.cjs +1 -0
  41. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +2 -1
  42. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs +1 -0
  43. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +2 -1
  44. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.cjs +1 -0
  45. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.cjs +1 -0
  46. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs +1 -0
  47. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +2 -1
  48. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.cjs +1 -0
  49. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +2 -1
  50. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.cjs +4 -2
  51. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.cjs +5 -4
  52. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +3 -2
  53. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +3 -2
  54. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.cjs +11 -3
  55. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.cjs +3 -4
  56. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +2 -1
  57. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.cjs +4 -2
  58. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +2 -1
  59. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.cjs +1 -1
  60. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +1 -0
  61. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +1029 -738
  62. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +37 -29
  63. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.mjs +4 -4
  64. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/canvas.wrapper.mjs +4 -4
  65. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/radio-group-option.wrapper.mjs +3 -2
  66. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +15 -10
  67. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.mjs +5 -4
  68. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +2 -13
  69. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +5 -3
  70. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +2 -1
  71. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +2 -1
  72. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs +1 -0
  73. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +2 -1
  74. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +1 -0
  75. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +2 -1
  76. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.mjs +1 -0
  77. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.mjs +1 -0
  78. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +1 -0
  79. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +2 -1
  80. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.mjs +1 -0
  81. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +2 -1
  82. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.mjs +4 -2
  83. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.mjs +5 -4
  84. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +3 -2
  85. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +5 -4
  86. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.mjs +12 -4
  87. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.mjs +4 -5
  88. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +2 -1
  89. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +4 -2
  90. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +2 -1
  91. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.mjs +1 -1
  92. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +1 -0
  93. package/ssr/esm/lib/components/accordion.wrapper.d.ts +29 -13
  94. package/ssr/esm/lib/components/canvas.wrapper.d.ts +9 -1
  95. package/ssr/esm/lib/components/display.wrapper.d.ts +2 -2
  96. package/ssr/esm/lib/components/divider.wrapper.d.ts +2 -2
  97. package/ssr/esm/lib/components/heading.wrapper.d.ts +2 -2
  98. package/ssr/esm/lib/components/icon.wrapper.d.ts +2 -2
  99. package/ssr/esm/lib/components/radio-group-option.wrapper.d.ts +2 -0
  100. package/ssr/esm/lib/components/text.wrapper.d.ts +2 -2
  101. package/ssr/esm/lib/components/textarea.wrapper.d.ts +2 -2
  102. package/ssr/esm/lib/dsr-components/accordion.d.ts +8 -2
  103. package/ssr/esm/lib/dsr-components/canvas.d.ts +0 -3
  104. package/ssr/esm/lib/dsr-components/checkbox.d.ts +4 -2
  105. package/ssr/esm/lib/dsr-components/input-date.d.ts +1 -0
  106. package/ssr/esm/lib/dsr-components/input-email.d.ts +1 -0
  107. package/ssr/esm/lib/dsr-components/input-month.d.ts +1 -0
  108. package/ssr/esm/lib/dsr-components/input-number.d.ts +1 -0
  109. package/ssr/esm/lib/dsr-components/input-password.d.ts +1 -0
  110. package/ssr/esm/lib/dsr-components/input-search.d.ts +1 -0
  111. package/ssr/esm/lib/dsr-components/input-tel.d.ts +1 -0
  112. package/ssr/esm/lib/dsr-components/input-text.d.ts +1 -0
  113. package/ssr/esm/lib/dsr-components/input-time.d.ts +1 -0
  114. package/ssr/esm/lib/dsr-components/input-url.d.ts +1 -0
  115. package/ssr/esm/lib/dsr-components/input-week.d.ts +1 -0
  116. package/ssr/esm/lib/dsr-components/label.d.ts +1 -0
  117. package/ssr/esm/lib/dsr-components/multi-select.d.ts +2 -1
  118. package/ssr/esm/lib/dsr-components/pin-code.d.ts +2 -1
  119. package/ssr/esm/lib/dsr-components/radio-group-option.d.ts +4 -0
  120. package/ssr/esm/lib/dsr-components/radio-group.d.ts +2 -1
  121. package/ssr/esm/lib/dsr-components/segmented-control.d.ts +2 -1
  122. package/ssr/esm/lib/dsr-components/select.d.ts +2 -1
  123. package/ssr/esm/lib/dsr-components/textarea.d.ts +1 -0
  124. package/ssr/esm/lib/types.d.ts +124 -103
  125. package/tailwindcss/index.css +223 -135
  126. package/{styles/vanilla-extract → vanilla-extract}/cjs/index.cjs +1 -1
  127. package/vanilla-extract/esm/index.d.ts +1 -0
  128. package/vanilla-extract/esm/index.mjs +1 -0
  129. package/vanilla-extract/package.json +13 -0
  130. package/ssr/esm/lib/dsr-components/legacy-label.d.ts +0 -14
  131. package/styles/_index.scss +0 -1
  132. package/styles/esm/index.d.ts +0 -1
  133. package/styles/esm/index.mjs +0 -1
  134. package/styles/vanilla-extract/esm/index.d.ts +0 -1
  135. package/styles/vanilla-extract/esm/index.mjs +0 -1
@@ -5,7 +5,6 @@ import { splitChildren } from '../../splitChildren.mjs';
5
5
  import { minifyCss } from '../../minifyCss.mjs';
6
6
  import { getLinkTileCss as getComponentCss$E } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
7
7
  import { PLink } from '../components/link.wrapper.mjs';
8
- import { PLinkPure } from '../components/link-pure.wrapper.mjs';
9
8
 
10
9
  /**
11
10
  * @slot {"name": "header", "description": "Renders a header section above the content area." }
@@ -17,6 +16,8 @@ class DSRLinkTile extends Component {
17
16
  hasFooterSlot = false;
18
17
  render() {
19
18
  splitChildren(this.props.children);
19
+ // TODO: BreakpointCustomizable breaks stencils boolean conversion from string to boolean
20
+ const parsedCompact = this.props.compact === 'true' ? true : this.props.compact === 'false' ? false : this.props.compact;
20
21
  const linkProps = {
21
22
  variant: 'secondary',
22
23
  aria: this.props.aria,
@@ -28,9 +29,9 @@ class DSRLinkTile extends Component {
28
29
  rel: this.props.rel,
29
30
  };
30
31
  const link = (createElement(PLink, { ...sharedLinkProps, ...linkProps, key: "link-or-button", className: "link-or-button" }, this.props.label));
31
- const linkPure = (createElement(PLinkPure, { ...sharedLinkProps, ...linkProps, key: "link-or-button-pure", className: "link-or-button-pure", hideLabel: true, icon: "arrow-right" }, this.props.label));
32
- const style = minifyCss(getComponentCss$E(this.props.aspectRatio, this.props.size, this.props.weight, this.props.align, this.props.compact, this.props.gradient, this.props.hasFooterSlot));
33
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("a", { ...sharedLinkProps, tabIndex: -1, "aria-hidden": "true" }), jsx("slot", { name: "header" }), jsx("div", { className: "media", children: jsx("slot", {}) }), jsxs("div", { className: "footer", children: [jsx("p", { children: this.props.description }), jsx("slot", { name: "footer" }), typeof this.props.compact === 'boolean' ? (this.props.compact ? linkPure : link) : [linkPure, link]] })] })] }), this.props.children] }));
32
+ const linkCompact = (createElement(PLink, { ...sharedLinkProps, ...linkProps, hideLabel: true, icon: "arrow-right", key: "link-or-button-pure", compact: true, className: "link-or-button-pure" }, this.props.label));
33
+ const style = minifyCss(getComponentCss$E(this.props.aspectRatio, this.props.size, this.props.weight, this.props.align, parsedCompact, this.props.gradient, this.props.hasFooterSlot));
34
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("a", { ...sharedLinkProps, tabIndex: -1, "aria-hidden": "true" }), jsx("slot", { name: "header" }), jsx("div", { className: "media", children: jsx("slot", {}) }), jsxs("div", { className: "footer", children: [jsx("p", { children: this.props.description }), jsx("slot", { name: "footer" }), typeof parsedCompact === 'boolean' ? (parsedCompact ? linkCompact : link) : [linkCompact, link]] })] })] }), this.props.children] }));
34
35
  }
35
36
  }
36
37
 
@@ -14,6 +14,7 @@ import { NoResultsOption } from './no-results-option.mjs';
14
14
 
15
15
  /**
16
16
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
17
+ * @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
17
18
  * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
18
19
  * @slot {"name": "selected", "description": "Use this slot to provide custom markup for the selected options display in the button area." }
19
20
  * @slot {"name": "", "description": "Default slot for the p-multi-select-option tags." }
@@ -21,7 +22,7 @@ import { NoResultsOption } from './no-results-option.mjs';
21
22
  * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
22
23
  * @slot {"name": "filter", "description": "Optional slot for providing a custom `p-input-search` input. When used, the default filter input is replaced and the built-in filter logic is disabled, giving full control over filtering behavior." }
23
24
  *
24
- * @controlled { "props": ["value"], "event": "update", "isInternallyMutated": true }
25
+ * @controlled { "props": ["value"], "event": "change", "isInternallyMutated": true }
25
26
  */
26
27
  class DSRMultiSelect extends Component {
27
28
  host;
@@ -69,7 +70,7 @@ class DSRMultiSelect extends Component {
69
70
  const selectMessageId = (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) ? messageId : undefined;
70
71
  const ariaDescribedBy = [descriptionId, selectMessageId].filter(Boolean).join(' ');
71
72
  const style = minifyCss(getComponentCss$y(this.props.isOpen, this.props.disabled, this.props.hideLabel, this.props.state, this.props.compact));
72
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, htmlFor: buttonId, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxs("button", { "aria-invalid": this.props.state === 'error' ? 'true' : null, type: "button", role: "combobox", id: buttonId, ...getComboboxAriaAttributes(this.props.isOpen, this.props.required, labelId, ariaDescribedBy, popoverId), disabled: this.props.disabled, onBlur: this.props.onComboBlur, children: [hasCustomSelectedSlot ? (jsx("slot", { name: "selected" })) : (jsx("span", { children: this.selectedOptions.map((option) => option.textContent).join(', ') })), this.props.value.length > 0 && (jsx(PButtonPure, { type: "button", className: "button", icon: "close", hideLabel: true, disabled: this.props.disabled, children: "Reset selection" })), jsx(PIcon, { className: "icon", name: "arrow-head-down", color: "primary", "aria-hidden": "true" })] }), jsxs("div", { id: popoverId, popover: "manual", tabIndex: -1, onBlur: (e) => e.stopPropagation(), role: "dialog", "aria-label": this.props.label, "aria-hidden": this.props.isOpen ? null : 'true', children: [hasCustomFilterSlot ? (jsx("slot", { name: "filter" })) : (jsx(PInputSearch, { className: "filter", name: "filter", label: "Filter options", hideLabel: true, autoComplete: "off", clear: true, indicator: true, compact: true, onBlur: (e) => e.stopPropagation() })), jsxs("div", { className: "options", role: "listbox", "aria-label": this.props.label, "aria-multiselectable": "true", onPointerMove: this.props.onPointerMove, children: [!this.props.hasFilterResults && jsx(NoResultsOption, {}), jsx("slot", { name: "options-status" }), jsx("slot", {})] })] }), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, host: null })] })] }), this.props.children] }));
73
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, htmlFor: buttonId, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxs("button", { "aria-invalid": this.props.state === 'error' ? 'true' : null, type: "button", role: "combobox", id: buttonId, ...getComboboxAriaAttributes(this.props.isOpen, this.props.required, labelId, ariaDescribedBy, popoverId), disabled: this.props.disabled, onBlur: this.props.onComboBlur, children: [hasCustomSelectedSlot ? (jsx("slot", { name: "selected" })) : (jsx("span", { children: this.selectedOptions.map((option) => (option.textContent ?? '').toString().trim()).join(', ') })), this.props.value.length > 0 && (jsx(PButtonPure, { type: "button", className: "button", icon: "close", hideLabel: true, disabled: this.props.disabled, children: "Reset selection" })), jsx(PIcon, { className: "icon", name: "arrow-head-down", color: "primary", "aria-hidden": "true" })] }), jsxs("div", { id: popoverId, popover: "manual", tabIndex: -1, onBlur: (e) => e.stopPropagation(), role: "dialog", "aria-label": this.props.label, "aria-hidden": this.props.isOpen ? null : 'true', children: [hasCustomFilterSlot ? (jsx("slot", { name: "filter" })) : (jsx(PInputSearch, { className: "filter", name: "filter", label: "Filter options", hideLabel: true, autoComplete: "off", clear: true, indicator: true, compact: true, onBlur: (e) => e.stopPropagation() })), jsxs("div", { className: "options", role: "listbox", "aria-label": this.props.label, "aria-multiselectable": "true", onPointerMove: this.props.onPointerMove, children: [!this.props.hasFilterResults && jsx(NoResultsOption, {}), jsx("slot", { name: "options-status" }), jsx("slot", {})] })] }), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, host: null })] })] }), this.props.children] }));
73
74
  }
74
75
  }
75
76
 
@@ -4,18 +4,19 @@ import '../../provider.mjs';
4
4
  import { splitChildren } from '../../splitChildren.mjs';
5
5
  import { minifyCss } from '../../minifyCss.mjs';
6
6
  import { getPinCodeCss as getComponentCss$w } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
7
- import { labelId, descriptionId, isCurrentInput } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
8
- import { LoadingMessage } from './loading-message.mjs';
7
+ import { labelId, descriptionId, getFieldsetAriaAttributes, isCurrentInput } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
8
+ import { loadingId, LoadingMessage } from './loading-message.mjs';
9
9
  import { Label } from './label.mjs';
10
10
  import { messageId, StateMessage } from './state-message.mjs';
11
11
  import { PSpinner } from '../components/spinner.wrapper.mjs';
12
12
 
13
13
  /**
14
14
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
15
+ * @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
15
16
  * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
16
17
  * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
17
18
  *
18
- * @controlled { "props": ["value"], "event": "update", "isInternallyMutated": true }
19
+ * @controlled { "props": ["value"], "event": "change", "isInternallyMutated": true }
19
20
  */
20
21
  class DSRPinCode extends Component {
21
22
  host;
@@ -39,7 +40,7 @@ class DSRPinCode extends Component {
39
40
  this.inputElements = [];
40
41
  const currentInputId = 'current-input';
41
42
  const style = minifyCss(getComponentCss$w(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.length, this.props.compact));
42
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, htmlFor: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", children: [Array.from(new Array(this.props.length), (_, index) => (jsx("input", { name: this.props.name, form: this.props.form, ...(isCurrentInput(index, this.props.value, this.props.length) && { id: currentInputId }), type: this.props.type === 'number' ? 'text' : this.props.type, "aria-label": `${index + 1}-${this.props.length}`, "aria-describedby": `${labelId} ${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading ? 'true' : null, autoComplete: "one-time-code", pattern: "\\d*", inputMode: "numeric" // get numeric keyboard on mobile
43
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("fieldset", { className: "root", disabled: this.props.disabled, ...getFieldsetAriaAttributes(this.props.required, this.props.state === 'error'), "aria-describedby": this.props.loading ? loadingId : `${descriptionId} ${messageId}`, "aria-labelledby": labelId, children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, htmlFor: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", dir: "ltr", children: [Array.from(new Array(this.props.length), (_, index) => (jsx("input", { name: this.props.name, form: this.props.form, ...(isCurrentInput(index, this.props.value, this.props.length) && { id: currentInputId }), type: this.props.type === 'number' ? 'text' : this.props.type, "aria-label": `${index + 1}-${this.props.length}`, "aria-describedby": `${labelId} ${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading ? 'true' : null, autoComplete: "one-time-code", pattern: "\\d*", inputMode: "numeric" // get numeric keyboard on mobile
43
44
  , defaultValue: this.props.value[index] === ' ' ? null : this.props.value[index], disabled: this.props.disabled, required: this.props.required, onBlur: this.props.onInputBlur }, index))), this.props.loading && jsx(PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" })] }), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, host: null }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
44
45
  }
45
46
  }
@@ -1,6 +1,7 @@
1
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { Component } from 'react';
3
3
  import '../../provider.mjs';
4
+ import { splitChildren } from '../../splitChildren.mjs';
4
5
  import { minifyCss } from '../../minifyCss.mjs';
5
6
  import { getRadioGroupOptionCss as getComponentCss$u } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
6
7
  import { loadingId, LoadingMessage } from './loading-message.mjs';
@@ -8,20 +9,27 @@ import { Label } from './label.mjs';
8
9
  import { messageId } from './state-message.mjs';
9
10
  import { PSpinner } from '../components/spinner.wrapper.mjs';
10
11
 
12
+ // Though "description" and "message" slots are technically available (provided by the "label" component),
13
+ // they are not documented here to avoid confusion since they are not intended for use within radio group options.
14
+ /**
15
+ * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
16
+ * @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)." }
17
+ */
11
18
  class DSRRadioGroupOption extends Component {
12
19
  host;
13
20
  initialLoading = false;
14
21
  inputElement;
15
22
  render() {
23
+ splitChildren(this.props.children);
16
24
  const { selected: isSelected, name, state } = this.props;
17
25
  const isDisabled = this.props.disabled || this.props.disabledParent;
18
26
  const isOptionLoading = this.props.loading && !isSelected;
19
27
  const isLoading = isOptionLoading || this.props.loadingParent;
20
28
  const id = 'radio-group-option';
21
29
  const style = minifyCss(getComponentCss$u(isDisabled, isLoading, state));
22
- return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label, hasDescription: false, host: null, label: this.props.label, htmlFor: id, isDisabled: isDisabled, isLoading: isLoading, stopClickPropagation: true }), jsxs("div", { className: "wrapper", children: [jsx("input", { id: id, type: "radio", name: name, checked: isSelected, disabled: isDisabled || isLoading, value: this.props.value, onClick: (e) => {
23
- e.stopPropagation();
24
- }, onBlur: this.props.onBlur, "aria-describedby": isLoading ? loadingId : `${messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": isDisabled || isLoading ? 'true' : null }), isOptionLoading && !this.props.loadingParent && (jsx(PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" }))] }), !this.props.loadingParent && (jsx(LoadingMessage, { loading: isOptionLoading, initialLoading: this.props.initialLoading }))] }) })] }) }));
30
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsxs("div", { className: "root", children: [jsxs("div", { className: "wrapper", children: [jsx("input", { id: id, type: "radio", name: name, checked: isSelected, disabled: isDisabled || isLoading, value: this.props.value, onClick: (e) => {
31
+ e.stopPropagation();
32
+ }, onBlur: this.props.onBlur, "aria-describedby": isLoading ? loadingId : `${messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": isDisabled || isLoading ? 'true' : null }), isOptionLoading && !this.props.loadingParent && (jsx(PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" }))] }), jsx(Label, { hasLabel: this.props.label, hasDescription: false, host: null, label: this.props.label, htmlFor: id, isDisabled: isDisabled, isLoading: isLoading, stopClickPropagation: true }), !this.props.loadingParent && (jsx(LoadingMessage, { loading: isOptionLoading, initialLoading: this.props.initialLoading }))] }) })] }), this.props.children] }));
25
33
  }
26
34
  }
27
35
 
@@ -4,7 +4,7 @@ import '../../provider.mjs';
4
4
  import { splitChildren } from '../../splitChildren.mjs';
5
5
  import { minifyCss } from '../../minifyCss.mjs';
6
6
  import { getRadioGroupCss as getComponentCss$t } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
7
- import { descriptionId } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
7
+ import { labelId, descriptionId, getFieldsetAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
8
8
  import { loadingId, LoadingMessage } from './loading-message.mjs';
9
9
  import { Label } from './label.mjs';
10
10
  import { messageId, StateMessage } from './state-message.mjs';
@@ -12,8 +12,9 @@ import { PSpinner } from '../components/spinner.wrapper.mjs';
12
12
 
13
13
  /**
14
14
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
15
+ * @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
15
16
  * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
16
- * @slot {"name": "", "description": "Default slot for the p-radio-group-option tags." }
17
+ * @slot {"name": "", "description": "Default slot for the p-radio-group-option tags."}
17
18
  * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
18
19
  */
19
20
  class DSRRadioGroup extends Component {
@@ -36,9 +37,7 @@ class DSRRadioGroup extends Component {
36
37
  render() {
37
38
  const { namedSlotChildren} = splitChildren(this.props.children);
38
39
  const style = minifyCss(getComponentCss$t(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.direction));
39
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("fieldset", { className: "root",
40
- // biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: radiogroup is the correct role for a fieldset containing radio buttons
41
- role: "radiogroup", "aria-required": this.props.required ? 'true' : null, "aria-describedby": this.props.loading ? loadingId : `${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, tag: "legend", label: this.props.label, description: this.props.description, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", children: [jsx("slot", {}), this.props.loading && jsx(PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" })] }), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, host: null }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
40
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("fieldset", { className: "root", disabled: this.props.disabled, ...getFieldsetAriaAttributes(this.props.required, this.props.state === 'error', { role: 'radiogroup' }), "aria-describedby": this.props.loading ? loadingId : `${descriptionId} ${messageId}`, "aria-labelledby": labelId, children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, tag: "div", label: this.props.label, description: this.props.description, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", children: [jsx("slot", {}), this.props.loading && jsx(PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" })] }), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, host: null }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
42
41
  }
43
42
  }
44
43
 
@@ -19,7 +19,8 @@ class DSRScroller extends Component {
19
19
  render() {
20
20
  splitChildren(this.props.children);
21
21
  const renderPrevNextButton = (direction) => {
22
- return (jsx("div", { className: direction === 'next' ? 'action-next' : 'action-prev', children: jsx(PButton, { className: "action-button", variant: "secondary", "hide-label": "true", icon: direction === 'next' ? 'arrow-head-right' : 'arrow-head-left', type: "button", tabIndex: -1, children: direction }) }, direction));
22
+ return (jsx("div", { className: direction === 'next' ? 'action-next' : 'action-prev', children: jsx(PButton, { className: "action-button", variant: "secondary", "hide-label": "true", icon: direction === 'next' ? 'arrow-head-right' : 'arrow-head-left', type: "button", tabIndex: -1, dir: "ltr" // Otherwise icon will be flipped which doesn't make sense in this use case
23
+ , children: direction }) }, direction));
23
24
  };
24
25
  const style = minifyCss(getComponentCss$s(this.isNextHidden, this.isPrevHidden, this.props.alignScrollIndicator, this.props.scrollbar));
25
26
  return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("div", { className: scrollAreaClass, children: jsxs("div", { className: "scroll-wrapper", role: parseAndGetAriaAttributes(this.props.aria)?.role || null, tabIndex: isScrollable(this.isPrevHidden, this.isNextHidden) ? 0 : null, children: [jsx("slot", {}), jsx("div", { className: "trigger" }), jsx("div", { className: "trigger" })] }) }), ['prev', 'next'].map(renderPrevNextButton)] })] }), this.props.children] }));
@@ -3,16 +3,18 @@ import { splitChildren } from '../../splitChildren.mjs';
3
3
  import { Component } from 'react';
4
4
  import { minifyCss } from '../../minifyCss.mjs';
5
5
  import { getSegmentedControlCss as getComponentCss$q } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
6
+ import { descriptionId, labelId, getFieldsetAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
6
7
  import { Label } from './label.mjs';
7
8
  import { StateMessage } from './state-message.mjs';
8
9
 
9
10
  /**
10
11
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
12
+ * @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
11
13
  * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
12
14
  * @slot {"name": "", "description": "Default slot for the `p-segmented-control-item` tags." }
13
15
  * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
14
16
  *
15
- * @controlled { "props": ["value"], "event": "update", "isInternallyMutated": true }
17
+ * @controlled { "props": ["value"], "event": "change", "isInternallyMutated": true }
16
18
  */
17
19
  class DSRSegmentedControl extends Component {
18
20
  host;
@@ -33,7 +35,7 @@ class DSRSegmentedControl extends Component {
33
35
  : child);
34
36
  const { minWidth, maxWidth } = { minWidth: 100, maxWidth: 100 };
35
37
  const style = minifyCss(getComponentCss$q(minWidth, maxWidth, this.props.columns, this.props.disabled, this.props.hideLabel, this.props.state));
36
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("fieldset", { inert: this.props.disabled, "aria-invalid": this.props.state === 'error' ? 'true' : null, className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, tag: "legend", label: this.props.label, description: this.props.description, isRequired: this.props.required, isDisabled: this.props.disabled }), jsx("slot", {}), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, host: null })] })] }), manipulatedChildren] }));
38
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("fieldset", { className: "root", disabled: this.props.disabled, ...getFieldsetAriaAttributes(this.props.required, this.props.state === 'error'), "aria-labelledby": labelId, "aria-describedby": descriptionId, children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, tag: "div", label: this.props.label, description: this.props.description, isRequired: this.props.required, isDisabled: this.props.disabled }), jsx("slot", {}), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, host: null })] })] }), manipulatedChildren] }));
37
39
  }
38
40
  }
39
41
 
@@ -13,6 +13,7 @@ import { NoResultsOption } from './no-results-option.mjs';
13
13
 
14
14
  /**
15
15
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
16
+ * @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
16
17
  * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
17
18
  * @slot {"name": "selected", "description": "Use this slot to provide custom markup for the selected option display in the button area." }
18
19
  * @slot {"name": "", "description": "Default slot for the `p-select-option` tags." }
@@ -20,7 +21,7 @@ import { NoResultsOption } from './no-results-option.mjs';
20
21
  * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
21
22
  * @slot {"name": "filter", "description": "Optional slot for providing a custom `p-input-search` input. When used, the default filter input is replaced and the built-in filter logic is disabled, giving full control over filtering behavior." }
22
23
  *
23
- * @controlled { "props": ["value"], "event": "update", "isInternallyMutated": true }
24
+ * @controlled { "props": ["value"], "event": "change", "isInternallyMutated": true }
24
25
  */
25
26
  class DSRSelect extends Component {
26
27
  host;
@@ -16,7 +16,7 @@ class DSRTag extends Component {
16
16
  splitChildren(this.props.children);
17
17
  const hasIcon = this.props.icon !== 'none' || !!this.props.iconSource;
18
18
  const style = minifyCss(getComponentCss$7(this.props.variant, this.props.compact, !!getDirectChildHTMLElement(null, 'a,button'), hasIcon));
19
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("span", { children: [hasIcon && (jsx(PIcon, { className: "icon", name: this.props.icon, source: this.props.iconSource, color: "inherit", size: "x-small", "aria-hidden": "true" })), jsx("slot", {})] })] }), this.props.children] }));
19
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("span", { children: [hasIcon && (jsx(PIcon, { className: "icon", ...(this.props.icon !== 'none' && { name: this.props.icon }), source: this.props.iconSource, color: "inherit", size: "x-small", "aria-hidden": "true" })), jsx("slot", {})] })] }), this.props.children] }));
20
20
  }
21
21
  }
22
22
 
@@ -9,6 +9,7 @@ import { messageId, StateMessage } from './state-message.mjs';
9
9
 
10
10
  /**
11
11
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
12
+ * @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
12
13
  * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
13
14
  * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
14
15
  */
@@ -1,16 +1,24 @@
1
1
  import type { BaseProps } from '../../BaseProps';
2
- import type { AccordionHeadingTag, AccordionUpdateEventDetail, BreakpointCustomizable, AccordionSize } from '../types';
2
+ import type { AccordionAlignMarker, AccordionBackground, AccordionHeadingTag, AccordionUpdateEventDetail, BreakpointCustomizable, AccordionSize } from '../types';
3
3
  export type PAccordionProps = BaseProps & {
4
4
  /**
5
- * Displays the Accordion as compact version with thinner border and smaller paddings.
5
+ * Aligns the marker within the summary section.
6
+ */
7
+ alignMarker?: AccordionAlignMarker;
8
+ /**
9
+ * Defines the background color. Use `frosted` only on images, videos or gradients.
10
+ */
11
+ background?: AccordionBackground;
12
+ /**
13
+ * Displays the accordion in compact mode.
6
14
  */
7
15
  compact?: boolean;
8
16
  /**
9
- * Defines the heading used in accordion.
17
+ * @deprecated , will be removed in the next major release. Use the `summary` slot instead. Sets the heading text within the summary section.
10
18
  */
11
19
  heading?: string;
12
20
  /**
13
- * Sets a heading tag, so it fits correctly within the outline of the page.
21
+ * @deprecated , will be removed in the next major release. Use the `summary` slot instead. Sets the heading tag for proper semantic structure within the page.
14
22
  */
15
23
  headingTag?: AccordionHeadingTag;
16
24
  /**
@@ -18,29 +26,37 @@ export type PAccordionProps = BaseProps & {
18
26
  */
19
27
  onUpdate?: (event: CustomEvent<AccordionUpdateEventDetail>) => void;
20
28
  /**
21
- * Defines if accordion is open.
29
+ * Controls whether the accordion is open or closed.
22
30
  */
23
31
  open?: boolean;
24
32
  /**
25
- * The text size.
33
+ * @deprecated , will be removed in the next major release. Use the `summary` slot instead. Controls the heading size in the summary section (only applies when using the `heading` prop or `heading` slot).
26
34
  */
27
35
  size?: BreakpointCustomizable<AccordionSize>;
28
36
  /**
29
- * @experimental Sticks the Accordion heading at the top, fixed while scrolling
37
+ * @experimental Makes the summary section sticky at the top while scrolling. Only works with `background="canvas"` or `background="surface"`. Not compatible with `summary-before` or `summary-after` slots.
30
38
  */
31
39
  sticky?: boolean;
32
40
  };
33
41
  export declare const PAccordion: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
34
42
  /**
35
- * Displays the Accordion as compact version with thinner border and smaller paddings.
43
+ * Aligns the marker within the summary section.
44
+ */
45
+ alignMarker?: AccordionAlignMarker;
46
+ /**
47
+ * Defines the background color. Use `frosted` only on images, videos or gradients.
48
+ */
49
+ background?: AccordionBackground;
50
+ /**
51
+ * Displays the accordion in compact mode.
36
52
  */
37
53
  compact?: boolean;
38
54
  /**
39
- * Defines the heading used in accordion.
55
+ * @deprecated , will be removed in the next major release. Use the `summary` slot instead. Sets the heading text within the summary section.
40
56
  */
41
57
  heading?: string;
42
58
  /**
43
- * Sets a heading tag, so it fits correctly within the outline of the page.
59
+ * @deprecated , will be removed in the next major release. Use the `summary` slot instead. Sets the heading tag for proper semantic structure within the page.
44
60
  */
45
61
  headingTag?: AccordionHeadingTag;
46
62
  /**
@@ -48,15 +64,15 @@ export declare const PAccordion: import("react").ForwardRefExoticComponent<Omit<
48
64
  */
49
65
  onUpdate?: (event: CustomEvent<AccordionUpdateEventDetail>) => void;
50
66
  /**
51
- * Defines if accordion is open.
67
+ * Controls whether the accordion is open or closed.
52
68
  */
53
69
  open?: boolean;
54
70
  /**
55
- * The text size.
71
+ * @deprecated , will be removed in the next major release. Use the `summary` slot instead. Controls the heading size in the summary section (only applies when using the `heading` prop or `heading` slot).
56
72
  */
57
73
  size?: BreakpointCustomizable<AccordionSize>;
58
74
  /**
59
- * @experimental Sticks the Accordion heading at the top, fixed while scrolling
75
+ * @experimental Makes the summary section sticky at the top while scrolling. Only works with `background="canvas"` or `background="surface"`. Not compatible with `summary-before` or `summary-after` slots.
60
76
  */
61
77
  sticky?: boolean;
62
78
  } & {
@@ -1,6 +1,10 @@
1
1
  import type { BaseProps } from '../../BaseProps';
2
- import type { CanvasSidebarStartUpdateEventDetail } from '../types';
2
+ import type { CanvasBackground, CanvasSidebarStartUpdateEventDetail } from '../types';
3
3
  export type PCanvasProps = BaseProps & {
4
+ /**
5
+ * Defines the background color of the main section and auto adjust it for the sidebar
6
+ */
7
+ background?: CanvasBackground;
4
8
  /**
5
9
  * Emitted when the sidebar end requests to be dismissed.
6
10
  */
@@ -19,6 +23,10 @@ export type PCanvasProps = BaseProps & {
19
23
  sidebarStartOpen?: boolean;
20
24
  };
21
25
  export declare const PCanvas: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
26
+ /**
27
+ * Defines the background color of the main section and auto adjust it for the sidebar
28
+ */
29
+ background?: CanvasBackground;
22
30
  /**
23
31
  * Emitted when the sidebar end requests to be dismissed.
24
32
  */
@@ -6,7 +6,7 @@ export type PDisplayProps = BaseProps & {
6
6
  */
7
7
  align?: DisplayAlign;
8
8
  /**
9
- * Basic text color variations depending on theme property.
9
+ * Basic text color variations.
10
10
  */
11
11
  color?: DisplayColor;
12
12
  /**
@@ -28,7 +28,7 @@ export declare const PDisplay: import("react").ForwardRefExoticComponent<Omit<im
28
28
  */
29
29
  align?: DisplayAlign;
30
30
  /**
31
- * Basic text color variations depending on theme property.
31
+ * Basic text color variations.
32
32
  */
33
33
  color?: DisplayColor;
34
34
  /**
@@ -2,7 +2,7 @@ import type { BaseProps } from '../../BaseProps';
2
2
  import type { DividerColor, BreakpointCustomizable, DividerDirection } from '../types';
3
3
  export type PDividerProps = BaseProps & {
4
4
  /**
5
- * Defines color depending on theme.
5
+ * Defines color.
6
6
  */
7
7
  color?: DividerColor;
8
8
  /**
@@ -12,7 +12,7 @@ export type PDividerProps = BaseProps & {
12
12
  };
13
13
  export declare const PDivider: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
14
14
  /**
15
- * Defines color depending on theme.
15
+ * Defines color.
16
16
  */
17
17
  color?: DividerColor;
18
18
  /**
@@ -6,7 +6,7 @@ export type PHeadingProps = BaseProps & {
6
6
  */
7
7
  align?: HeadingAlign;
8
8
  /**
9
- * Basic text color variations depending on theme property.
9
+ * Basic text color variations.
10
10
  */
11
11
  color?: HeadingColor;
12
12
  /**
@@ -28,7 +28,7 @@ export declare const PHeading: import("react").ForwardRefExoticComponent<Omit<im
28
28
  */
29
29
  align?: HeadingAlign;
30
30
  /**
31
- * Basic text color variations depending on theme property.
31
+ * Basic text color variations.
32
32
  */
33
33
  color?: HeadingColor;
34
34
  /**
@@ -6,7 +6,7 @@ export type PIconProps = BaseProps & {
6
6
  */
7
7
  aria?: SelectedAriaAttributes<IconAriaAttribute>;
8
8
  /**
9
- * Basic color variations depending on theme property.
9
+ * Basic color variations.
10
10
  */
11
11
  color?: IconColor;
12
12
  /**
@@ -28,7 +28,7 @@ export declare const PIcon: import("react").ForwardRefExoticComponent<Omit<impor
28
28
  */
29
29
  aria?: SelectedAriaAttributes<IconAriaAttribute>;
30
30
  /**
31
- * Basic color variations depending on theme property.
31
+ * Basic color variations.
32
32
  */
33
33
  color?: IconColor;
34
34
  /**
@@ -34,4 +34,6 @@ export declare const PRadioGroupOption: import("react").ForwardRefExoticComponen
34
34
  * The value for the input.
35
35
  */
36
36
  value?: string;
37
+ } & {
38
+ children?: import("react").ReactNode | undefined;
37
39
  } & import("react").RefAttributes<HTMLElement>>;
@@ -6,7 +6,7 @@ export type PTextProps = BaseProps & {
6
6
  */
7
7
  align?: TextAlign;
8
8
  /**
9
- * Basic text color variations depending on theme property.
9
+ * Basic text color variations.
10
10
  */
11
11
  color?: TextColor;
12
12
  /**
@@ -32,7 +32,7 @@ export declare const PText: import("react").ForwardRefExoticComponent<Omit<impor
32
32
  */
33
33
  align?: TextAlign;
34
34
  /**
35
- * Basic text color variations depending on theme property.
35
+ * Basic text color variations.
36
36
  */
37
37
  color?: TextColor;
38
38
  /**
@@ -78,7 +78,7 @@ export type PTextareaProps = BaseProps & {
78
78
  */
79
79
  resize?: TextareaResize;
80
80
  /**
81
- * The number of rows of the textarea.
81
+ * The number of rows. Has no effect when field-sizing CSS Variable '--p-textarea-field-sizing' is set to 'content'.
82
82
  */
83
83
  rows?: number;
84
84
  /**
@@ -176,7 +176,7 @@ export declare const PTextarea: import("react").ForwardRefExoticComponent<Omit<i
176
176
  */
177
177
  resize?: TextareaResize;
178
178
  /**
179
- * The number of rows of the textarea.
179
+ * The number of rows. Has no effect when field-sizing CSS Variable '--p-textarea-field-sizing' is set to 'content'.
180
180
  */
181
181
  rows?: number;
182
182
  /**
@@ -1,11 +1,17 @@
1
1
  import { Component } from 'react';
2
2
  /**
3
- * @slot {"name": "heading", "description": "Defines the heading used in the accordion. Can be used alternatively to the heading prop. Please **refrain** from using any other than text content as slotted markup." }
4
- * @slot {"name": "", "description": "Default slot for the main content" }
3
+ * @slot {"name": "summary", "description": "Content for the accordion's summary section. Clicking toggles the accordion open and closed." }
4
+ * @slot {"name": "summary-before", "description": "Content or interactive elements placed before the accordion's summary section." }
5
+ * @slot {"name": "summary-after", "description": "Content or interactive elements placed after the accordion's summary section." }
6
+ * @slot {"name": "heading", "description": "Content for the accordion's heading section. Clicking toggles the accordion open and closed.", "isDeprecated": true }
7
+ * @slot {"name": "", "description": "Main content displayed when the accordion is expanded." }
5
8
  *
6
9
  * @controlled {"props": ["open"], "event": "update"}
7
10
  */
8
11
  export declare class DSRAccordion extends Component<any> {
9
12
  host: HTMLElement;
13
+ private hasSummary;
14
+ private hasSummaryBefore;
15
+ private hasSummaryAfter;
10
16
  render(): JSX.Element;
11
17
  }
@@ -14,11 +14,8 @@ import { Component } from 'react';
14
14
  */
15
15
  export declare class DSRCanvas extends Component<any> {
16
16
  host: HTMLElement;
17
- private isMediaQueryS;
18
- private isMediaQueryM;
19
17
  private hasTitle;
20
18
  private hasSidebarEnd;
21
- private hasSidebarEndHeader;
22
19
  private hasFooter;
23
20
  private hasBackground;
24
21
  render(): JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import { Component } from 'react';
2
2
  /**
3
- * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
4
- * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
3
+ * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
4
+ * @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
5
+ * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
5
6
  */
6
7
  export declare class DSRCheckbox extends Component<any> {
7
8
  host: HTMLElement;
@@ -9,6 +10,7 @@ export declare class DSRCheckbox extends Component<any> {
9
10
  private initialLoading;
10
11
  private defaultChecked;
11
12
  private checkboxInputElement;
13
+ private externalLabel;
12
14
  formResetCallback(): void;
13
15
  formDisabledCallback(): void;
14
16
  formStateRestoreCallback(): void;
@@ -1,6 +1,7 @@
1
1
  import { Component } from 'react';
2
2
  /**
3
3
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
4
+ * @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
4
5
  * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
5
6
  * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
6
7
  * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
@@ -1,6 +1,7 @@
1
1
  import { Component } from 'react';
2
2
  /**
3
3
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
4
+ * @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
4
5
  * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
5
6
  * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
6
7
  * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}