@porsche-design-system/components-react 3.29.0-rc.0 → 3.29.0-rc.2

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 (99) hide show
  1. package/CHANGELOG.md +51 -3
  2. package/cjs/lib/components/input-search.wrapper.cjs +1 -1
  3. package/cjs/lib/components/popover.wrapper.cjs +4 -3
  4. package/cjs/lib/components/textarea.wrapper.cjs +3 -3
  5. package/esm/hooks.mjs +1 -1
  6. package/esm/lib/components/input-search.wrapper.mjs +1 -1
  7. package/esm/lib/components/popover.wrapper.d.ts +16 -0
  8. package/esm/lib/components/popover.wrapper.mjs +5 -4
  9. package/esm/lib/components/textarea.wrapper.d.ts +8 -8
  10. package/esm/lib/components/textarea.wrapper.mjs +3 -3
  11. package/esm/lib/types.d.ts +2 -0
  12. package/package.json +8 -8
  13. package/partials/esm/index.mjs +1 -0
  14. package/partials/package.json +3 -3
  15. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +12 -21
  16. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +8 -15
  17. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-search.wrapper.cjs +1 -1
  18. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.cjs +5 -4
  19. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/textarea.wrapper.cjs +4 -4
  20. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.cjs +1 -1
  21. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.cjs +1 -1
  22. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +1 -1
  23. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.cjs +1 -1
  24. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +1 -1
  25. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.cjs +1 -1
  26. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.cjs +1 -1
  27. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.cjs +1 -1
  28. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +1 -1
  29. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.cjs +1 -1
  30. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.cjs +1 -1
  31. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs +4 -3
  32. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.cjs +1 -1
  33. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +1 -1
  34. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +1 -1
  35. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +1 -1
  36. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +10 -5
  37. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.cjs +1 -1
  38. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.cjs +1 -1
  39. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.cjs +1 -1
  40. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.cjs +1 -0
  41. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.cjs +1 -1
  42. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +2 -2
  43. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/sheet.cjs +1 -1
  44. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +1 -1
  45. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.cjs +1 -1
  46. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +1 -1
  47. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +1 -1
  48. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.cjs +1 -1
  49. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.cjs +1 -1
  50. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +5 -6
  51. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +12 -21
  52. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +9 -15
  53. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/hooks.mjs +1 -1
  54. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-search.wrapper.mjs +1 -1
  55. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.mjs +6 -5
  56. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/textarea.wrapper.mjs +4 -4
  57. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +1 -1
  58. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs +1 -1
  59. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +1 -1
  60. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +1 -1
  61. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.mjs +1 -1
  62. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +1 -1
  63. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.mjs +1 -1
  64. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.mjs +1 -1
  65. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.mjs +1 -1
  66. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.mjs +1 -1
  67. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +1 -1
  68. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.mjs +1 -1
  69. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.mjs +1 -1
  70. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +1 -1
  71. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +4 -3
  72. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.mjs +1 -1
  73. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.mjs +1 -1
  74. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +1 -1
  75. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +1 -1
  76. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +2 -2
  77. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +10 -5
  78. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.mjs +1 -1
  79. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +1 -1
  80. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +1 -1
  81. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.mjs +1 -0
  82. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.mjs +1 -1
  83. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +2 -2
  84. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/sheet.mjs +1 -1
  85. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +1 -1
  86. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.mjs +1 -1
  87. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +1 -1
  88. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +1 -1
  89. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.mjs +2 -2
  90. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.mjs +1 -1
  91. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +6 -7
  92. package/ssr/esm/lib/components/popover.wrapper.d.ts +16 -0
  93. package/ssr/esm/lib/components/textarea.wrapper.d.ts +8 -8
  94. package/ssr/esm/lib/dsr-components/popover.d.ts +3 -1
  95. package/ssr/esm/lib/dsr-components/textarea.d.ts +0 -3
  96. package/ssr/esm/lib/types.d.ts +2 -0
  97. package/partials/index.js +0 -12
  98. /package/partials/{index.cjs → cjs/index.cjs} +0 -0
  99. /package/partials/{index.d.ts → esm/index.d.ts} +0 -0
@@ -7,23 +7,23 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var textarea = require('../dsr-components/textarea.cjs');
9
9
 
10
- const PTextarea = /*#__PURE__*/ react.forwardRef(({ autoComplete, description = '', disabled = false, form, hideLabel = false, label = '', maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, resize = 'vertical', rows = 7, showCounter = true, spellCheck, state = 'none', theme, value = '', wrap = 'soft', className, children, ...rest }, ref) => {
10
+ const PTextarea = /*#__PURE__*/ react.forwardRef(({ autoComplete, counter = false, description = '', disabled = false, form, hideLabel = false, label = '', maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, resize = 'vertical', rows = 7, spellCheck, state = 'none', theme, value = '', wrap = 'soft', className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef(undefined);
12
12
  hooks.useEventCallback(elementRef, 'blur', onBlur);
13
13
  hooks.useEventCallback(elementRef, 'change', onChange);
14
14
  hooks.useEventCallback(elementRef, 'input', onInput);
15
15
  const WebComponentTag = hooks.usePrefix('p-textarea');
16
- const propsToSync = [autoComplete, description, disabled, form, hideLabel, label, maxLength, message, minLength, name, placeholder, readOnly, required, resize, rows, showCounter, spellCheck, state, theme || hooks.useTheme(), value, wrap];
16
+ const propsToSync = [autoComplete, counter, description, disabled, form, hideLabel, label, maxLength, message, minLength, name, placeholder, readOnly, required, resize, rows, spellCheck, state, theme || hooks.useTheme(), value, wrap];
17
17
  hooks.useBrowserLayoutEffect(() => {
18
18
  const { current } = elementRef;
19
- ['autoComplete', 'description', 'disabled', 'form', 'hideLabel', 'label', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'resize', 'rows', 'showCounter', 'spellCheck', 'state', 'theme', 'value', 'wrap'].forEach((propName, i) => (current[propName] = propsToSync[i]));
19
+ ['autoComplete', 'counter', 'description', 'disabled', 'form', 'hideLabel', 'label', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'resize', 'rows', 'spellCheck', 'state', 'theme', 'value', 'wrap'].forEach((propName, i) => (current[propName] = propsToSync[i]));
20
20
  }, propsToSync);
21
21
  const props = {
22
22
  ...rest,
23
23
  // @ts-ignore
24
24
  ...(!process.browser
25
25
  ? {
26
- children: (jsxRuntime.jsx(textarea.DSRTextarea, { autoComplete, description, disabled, form, hideLabel, label, maxLength, message, minLength, name, placeholder, readOnly, required, resize, rows, showCounter, spellCheck, state, theme: theme || hooks.useTheme(), value, wrap, children })),
26
+ children: (jsxRuntime.jsx(textarea.DSRTextarea, { autoComplete, counter, description, disabled, form, hideLabel, label, maxLength, message, minLength, name, placeholder, readOnly, required, resize, rows, spellCheck, state, theme: theme || hooks.useTheme(), value, wrap, children })),
27
27
  }
28
28
  : {
29
29
  children,
@@ -23,7 +23,7 @@ class DSRBanner extends react.Component {
23
23
  return this.props.persistent ? false : this.props.dismissButton;
24
24
  }
25
25
  render() {
26
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
26
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
27
27
  const hasTitleSlot = namedSlotChildren.filter(({ props: { slot } }) => slot === 'title').length > 0;
28
28
  const style = minifyCss.minifyCss(stylesEntry.getBannerCss(this.props.open));
29
29
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(inlineNotification_wrapper.PInlineNotification, { heading: this.props.heading, headingTag: this.props.headingTag, description: this.props.description, state: this.props.state, dismissButton: this.hasDismissButton, theme: this.props.theme, "aria-hidden": this.props.open ? 'false' : 'true', children: [namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0 ? (jsxRuntime.jsx("slot", { name: "heading", slot: "heading" })) : (hasTitleSlot && jsxRuntime.jsx("slot", { name: "title", slot: "heading" })), namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0 && jsxRuntime.jsx("slot", { name: "description" })] }) })] }), this.props.children] }));
@@ -40,7 +40,7 @@ class DSRCanvas extends react.Component {
40
40
  // private header: any;
41
41
  //
42
42
  render() {
43
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
43
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
44
44
  const hasTitle = namedSlotChildren.filter(({ props: { slot } }) => slot === 'title').length > 0;
45
45
  const hasSidebarEnd = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sidebar-end').length > 0;
46
46
  const hasSidebarEndHeader = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sidebar-end-header').length > 0;
@@ -34,7 +34,7 @@ class DSRCarousel extends react.Component {
34
34
  return this.props.slidesPerPage === 'auto' || this.props.amountOfPages > 1;
35
35
  }
36
36
  render() {
37
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
37
+ const { namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
38
38
  const alignHeaderDeprecationMap = {
39
39
  left: 'start',
40
40
  };
@@ -21,7 +21,7 @@ class DSRCheckboxWrapper extends react.Component {
21
21
  initialLoading = false;
22
22
  input;
23
23
  render() {
24
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
24
+ const { namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
25
25
  const { disabled } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
26
26
  const style = minifyCss.minifyCss(stylesEntry.getCheckboxWrapperCss(this.props.hideLabel, this.props.state, disabled, this.props.loading, this.props.theme));
27
27
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(legacyLabel.LegacyLabel, { 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, isLoading: this.props.loading, isDisabled: disabled, formElement: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("slot", {}), this.props.loading && (jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, "aria-hidden": "true" }))] }), jsxRuntime.jsx(stateMessage.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, theme: this.props.theme, host: null }), jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
@@ -32,7 +32,7 @@ class DSRCheckbox extends react.Component {
32
32
  formStateRestoreCallback() {
33
33
  }
34
34
  render() {
35
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
35
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
36
36
  const id = 'checkbox';
37
37
  const style = minifyCss.minifyCss(stylesEntry.getCheckboxCss(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.compact, this.props.theme));
38
38
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.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, htmlFor: id, label: this.props.label, isLoading: this.props.loading, isDisabled: this.props.disabled, isRequired: this.props.required }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("input", { type: "checkbox", id: id, "aria-describedby": `${utilsEntry.descriptionId} ${stateMessage.messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading || this.props.disabled ? 'true' : null, checked: this.props.checked, form: this.props.form, value: this.props.value, name: this.props.name, onBlur: this.props.onBlur, required: this.props.required, disabled: this.props.disabled }), this.props.loading && (jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, "aria-hidden": "true" }))] }), jsxRuntime.jsx(stateMessage.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, theme: this.props.theme, host: null }), jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
@@ -23,7 +23,7 @@ class DSRDrilldownItem extends react.Component {
23
23
  return this.props.theme || 'light'; // default as fallback (internal private prop is controlled by drilldown)
24
24
  }
25
25
  render() {
26
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
26
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
27
27
  const hasSlottedHeader = namedSlotChildren.filter(({ props: { slot } }) => slot === 'header').length > 0;
28
28
  const hasSlottedButton = namedSlotChildren.filter(({ props: { slot } }) => slot === 'button').length > 0;
29
29
  const style = minifyCss.minifyCss(stylesEntry.getDrilldownItemCss(this.props.primary, this.props.secondary, this.props.cascade));
@@ -18,7 +18,7 @@ var required = require('./required.cjs');
18
18
  class DSRFieldsetWrapper extends react.Component {
19
19
  host;
20
20
  render() {
21
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
21
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
22
22
  const hasMessageValue = (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state);
23
23
  const style = minifyCss.minifyCss(stylesEntry.getFieldsetWrapperCss(this.props.state, this.props.labelSize, (this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0), this.props.theme));
24
24
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("fieldset", { "aria-describedby": hasMessageValue ? stateMessage.messageId : null, children: [(this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && (jsxRuntime.jsxs("legend", { children: [this.props.label || jsxRuntime.jsx("slot", { name: "label" }), this.props.required && jsxRuntime.jsx(required.Required, {})] })), jsxRuntime.jsx("slot", {}), jsxRuntime.jsx(stateMessage.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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
@@ -16,7 +16,7 @@ var required = require('./required.cjs');
16
16
  class DSRFieldset extends react.Component {
17
17
  host;
18
18
  render() {
19
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
19
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
20
20
  const hasMessageValue = (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state);
21
21
  const style = minifyCss.minifyCss(stylesEntry.getFieldsetCss(this.props.state, this.props.labelSize, (this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0), this.props.theme));
22
22
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("fieldset", { "aria-describedby": hasMessageValue ? stateMessage.messageId : null, children: [(this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && (jsxRuntime.jsxs("legend", { children: [this.props.label || jsxRuntime.jsx("slot", { name: "label" }), this.props.required && jsxRuntime.jsx(required.Required, {})] })), jsxRuntime.jsx("slot", {}), jsxRuntime.jsx(stateMessage.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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
@@ -27,7 +27,7 @@ class DSRFlyout extends react.Component {
27
27
  hasFooter;
28
28
  hasSubFooter;
29
29
  render() {
30
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
30
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
31
31
  const positionDeprecationMap = {
32
32
  left: 'start',
33
33
  right: 'end',
@@ -14,7 +14,7 @@ var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-e
14
14
  class DSRGrid extends react.Component {
15
15
  host;
16
16
  render() {
17
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
17
+ const { children, otherChildren } = splitChildren.splitChildren(this.props.children);
18
18
  const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
19
19
  ? { ...child, props: { ...child.props, gutter: this.props.gutter } }
20
20
  : child);
@@ -21,7 +21,7 @@ class DSRInlineNotification extends react.Component {
21
21
  return this.props.persistent ? false : this.props.dismissButton;
22
22
  }
23
23
  render() {
24
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
24
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
25
25
  const bannerId = 'banner';
26
26
  const labelId = 'label';
27
27
  const descriptionId = 'description';
@@ -33,9 +33,10 @@ class DSRInputText extends react.Component {
33
33
  splitChildren.splitChildren(this.props.children);
34
34
  const style = minifyCss.minifyCss(stylesEntry.getInputTextCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.theme, this.props.counter));
35
35
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-text" // prevent React default scroll-to-[increment|decrement] on text inputs
36
- , name: this.props.name, form: this.props.form, type: "text", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, theme: this.props.theme, spellCheck: this.props.spellCheck, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(this.props.counter &&
37
- this.props.maxLength && {
38
- end: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: "sr-only", "aria-live": "polite", children: `You have ${this.props.maxLength - this.props.value.length} out of ${this.props.maxLength} characters left` }), jsxRuntime.jsxs("span", { className: "counter", "aria-hidden": "true", children: [this.props.value.length, "/", this.props.maxLength] })] })),
36
+ , name: this.props.name, form: this.props.form, type: "text", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, theme: this.props.theme, spellCheck: this.props.spellCheck, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(this.props.counter && {
37
+ end: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: "sr-only", "aria-live": "polite", children: this.props.maxLength
38
+ ? `You have ${this.props.maxLength - this.props.value.length} out of ${this.props.maxLength} characters left`
39
+ : `${this.props.value.length} characters entered` }), jsxRuntime.jsx("span", { className: "counter", "aria-hidden": "true", children: this.props.maxLength ? `${this.props.value.length}/${this.props.maxLength}` : `${this.props.value.length}` })] })),
39
40
  }) })] }), this.props.children] }));
40
41
  }
41
42
  }
@@ -17,7 +17,7 @@ var modelSignature_wrapper = require('../components/model-signature.wrapper.cjs'
17
17
  class DSRLinkTileModelSignature extends react.Component {
18
18
  host;
19
19
  render() {
20
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
20
+ const { children, namedSlotChildren} = splitChildren.splitChildren(this.props.children);
21
21
  // If we do this earlier than render, there are cases where primaryLink.href is undefined
22
22
  // TODO: Here and in other components, validation happens only on initial render. We could extend this to watch props of the required slots.
23
23
  const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && namedSlotChildren.includes(child)
@@ -28,7 +28,7 @@ class DSRModal extends react.Component {
28
28
  return this.props.disableCloseButton ? false : this.props.dismissButton;
29
29
  }
30
30
  render() {
31
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
31
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
32
32
  const hasHeader = (this.props.heading || namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0) || namedSlotChildren.filter(({ props: { slot } }) => slot === 'header').length > 0;
33
33
  const hasFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'footer').length > 0;
34
34
  const hasDismissButton = this.props.disableCloseButton ? false : this.props.dismissButton;
@@ -54,7 +54,7 @@ class DSRMultiSelect extends react.Component {
54
54
  this.props.setFormValue(this.props.defaultValue);
55
55
  }
56
56
  render() {
57
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
57
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
58
58
  const inputId = 'filter';
59
59
  const popoverId = 'list';
60
60
  const style = minifyCss.minifyCss(stylesEntry.getMultiSelectCss(this.props.isOpen, this.props.disabled, this.props.hideLabel, this.props.state, this.props.theme));
@@ -35,7 +35,7 @@ class DSRPinCode extends react.Component {
35
35
  formStateRestoreCallback() {
36
36
  }
37
37
  render() {
38
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
38
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
39
39
  // reset array of input elements
40
40
  this.inputElements = [];
41
41
  const currentInputId = 'current-input';
@@ -11,22 +11,27 @@ var icon_wrapper = require('../components/icon.wrapper.cjs');
11
11
 
12
12
  /**
13
13
  * @slot {"name": "", "description": "Default slot for the popover content." }
14
+ * @slot {"name": "button", "description": "Slot for custom button." }
14
15
  */
15
16
  class DSRPopover extends react.Component {
16
17
  host;
17
- isOpen = false;
18
18
  popover;
19
19
  button;
20
+ slottedButton;
20
21
  arrow;
21
22
  cleanUpAutoUpdate;
22
23
  hasNativePopoverSupport = utilsEntry.getHasNativePopoverSupport();
24
+ hasSlottedButton;
23
25
  render() {
24
- splitChildren.splitChildren(this.props.children);
26
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
27
+ const hasSlottedButton = namedSlotChildren.filter(({ props: { slot } }) => slot === 'button').length > 0;
25
28
  const style = minifyCss.minifyCss(stylesEntry.getPopoverCss(this.props.theme).replace(/(:host {[\S\s]+?})[\S\s]+(button {[\S\s]+?})[\S\s]+(.icon {[\S\s]+?})[\S\s]+(.label {[\S\s]+?})[\S\s]+/, '$1\n$2\n$3\n$4'));
26
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("button", { type: "button", ...utilsEntry.parseAndGetAriaAttributes({
29
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasSlottedButton ? (jsxRuntime.jsx("div", { children: jsxRuntime.jsx("slot", { name: "button" }) })) : (jsxRuntime.jsxs("button", { type: "button", ...utilsEntry.parseAndGetAriaAttributes({
27
30
  ...utilsEntry.parseAndGetAriaAttributes(this.props.aria),
28
- ...{ 'aria-expanded': this.props.isOpen },
29
- }), children: [jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: "information", theme: this.props.theme }), jsxRuntime.jsx("span", { className: "label", children: "More information" })] }), this.props.isOpen && (jsxRuntime.jsxs("div", { popover: "auto", children: [jsxRuntime.jsx("div", { className: "arrow" }), jsxRuntime.jsx("div", { className: "content", children: this.props.description ? jsxRuntime.jsx("p", { children: this.props.description }) : jsxRuntime.jsx("slot", {}) })] }))] })] }), this.props.children] }));
31
+ ...{ 'aria-expanded': this.props.open },
32
+ }), children: [jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: "information", theme: this.props.theme }), jsxRuntime.jsx("span", { className: "label", children: "More information" })] })), this.props.open && (jsxRuntime.jsxs("div", { popover: "auto", onToggle: (e) => {
33
+ this.props.onTogglePopover(e);
34
+ }, children: [jsxRuntime.jsx("div", { className: "arrow" }), jsxRuntime.jsx("div", { className: "content", children: this.props.description ? jsxRuntime.jsx("p", { children: this.props.description }) : jsxRuntime.jsx("slot", {}) })] }))] })] }), this.props.children] }));
30
35
  }
31
36
  }
32
37
 
@@ -21,7 +21,7 @@ class DSRRadioButtonWrapper extends react.Component {
21
21
  initialLoading = false;
22
22
  input;
23
23
  render() {
24
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
24
+ const { namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
25
25
  const { disabled } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
26
26
  const isLoading = this.props.loading && !(typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && (otherChildren[0]?.props.checked || otherChildren[0]?.props.defaultChecked)); // spinner is only displayed when radio is not checked already
27
27
  const style = minifyCss.minifyCss(stylesEntry.getRadioButtonWrapperCss(this.props.hideLabel, this.props.state, disabled, isLoading, this.props.theme));
@@ -15,7 +15,7 @@ var icon_wrapper = require('../components/icon.wrapper.cjs');
15
15
  class DSRSegmentedControlItem extends react.Component {
16
16
  host;
17
17
  render() {
18
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
18
+ const { children} = splitChildren.splitChildren(this.props.children);
19
19
  // this additional validation is still needed because undefined is allowed with current propTypes
20
20
  const hasIcon = !!this.props.icon || !!this.props.iconSource;
21
21
  const hasSlottedContent = !!children.length;
@@ -23,7 +23,7 @@ class DSRSegmentedControl extends react.Component {
23
23
  formStateRestoreCallback() {
24
24
  }
25
25
  render() {
26
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
26
+ const { children, otherChildren } = splitChildren.splitChildren(this.props.children);
27
27
  const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
28
28
  ? { ...child, props: { ...child.props, selected: child.props?.value === this.props.value, backgroundColor: this.props.backgroundColor, theme: this.props.theme } }
29
29
  : child);
@@ -28,6 +28,7 @@ class DSRSelectWrapperDropdown extends react.Component {
28
28
  const style = minifyCss.minifyCss(stylesEntry.getSelectWrapperDropdownCss(this.isOpen, this.props.state, this.props.disabled, this.props.filter, this.props.theme));
29
29
  return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: this.props.filter ? ([
30
30
  jsxRuntime.jsx("input", { id: inputId, type: "text", role: "combobox", disabled: this.props.disabled, placeholder: utilsEntry.getSelectedOptionMap(this.optionMaps)?.value || null, autoComplete: "off", defaultValue: this.searchString }, "input"),
31
+ /* biome-ignore lint/a11y/noStaticElementInteractions: ok */
31
32
  jsxRuntime.jsx("span", {
32
33
  /* @ts-ignore */
33
34
  part: part }, "span"),
@@ -24,7 +24,7 @@ class DSRSelectWrapper extends react.Component {
24
24
  iconElement;
25
25
  render() {
26
26
  const hasCustomDropdown = utilsEntry.isCustomDropdown(this.props.filter, this.props.native);
27
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
27
+ const { namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
28
28
  const { disabled } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
29
29
  const style = minifyCss.minifyCss(stylesEntry.getSelectWrapperCss(disabled, hasCustomDropdown, this.props.hideLabel, this.props.state, this.props.theme));
30
30
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(legacyLabel.LegacyLabel, { 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, isDisabled: disabled, formElement: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("slot", {}), jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" }), hasCustomDropdown && !disabled && (jsxRuntime.jsx(selectWrapperDropdown_wrapper.PSelectWrapperDropdown, { className: "dropdown", selectRef: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props, label: this.props.label || namedSlotChildren.find(({ props: { slot } }) => slot === 'label')?.props.children, message: this.props.message || namedSlotChildren.find(({ props: { slot } }) => slot === 'message')?.props.children, description: this.props.description || namedSlotChildren.find(({ props: { slot } }) => slot === 'description')?.props.children, state: this.props.state, direction: this.props.dropdownDirection, filter: this.props.filter, theme: this.props.theme, required: false, disabled: disabled, onOpenChange: (isOpen) => this.props.iconElement.classList.toggle('icon--open', isOpen) }))] }), jsxRuntime.jsx(stateMessage.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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
@@ -47,7 +47,7 @@ class DSRSelect extends react.Component {
47
47
  this.props.internals?.setFormValue(this.props.defaultValue);
48
48
  }
49
49
  render() {
50
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
50
+ const { namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
51
51
  const buttonId = 'value';
52
52
  const popoverId = 'list';
53
53
  const descriptionId = this.props.description ? 'description' : undefined;
@@ -55,7 +55,7 @@ class DSRSelect extends react.Component {
55
55
  const ariaDescribedBy = [descriptionId, selectMessageId].filter(Boolean).join(' ');
56
56
  const selectedOption = utilsEntry.getSelectedOptionString(otherChildren);
57
57
  const style = minifyCss.minifyCss(stylesEntry.getSelectCss(this.props.isOpen, this.props.disabled, this.props.hideLabel, this.props.state, this.props.compact, this.props.theme, !!this.props.slottedImagePath));
58
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.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 }), jsxRuntime.jsxs("button", { "aria-invalid": this.props.state === 'error' ? 'true' : null, type: "button", role: "combobox", id: buttonId, ...utilsEntry.getComboboxAriaAttributes(this.props.isOpen, this.props.required, utilsEntry.labelId, ariaDescribedBy, popoverId), disabled: this.props.disabled, children: [this.props.slottedImagePath && jsxRuntime.jsx("img", { src: this.props.slottedImagePath, alt: "" }), jsxRuntime.jsx("span", { children: selectedOption }), jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: this.props.disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" })] }), jsxRuntime.jsxs("div", { id: popoverId, popover: "manual", tabIndex: -1, role: "dialog", "aria-label": this.props.label, "aria-hidden": this.props.isOpen ? null : 'true', children: [this.props.filter && (jsxRuntime.jsx(inputSearch_wrapper.PInputSearch, { className: "filter", name: "filter", label: "Filter options", hideLabel: true, autoComplete: "off", clear: true, compact: true, theme: this.props.theme, ...utilsEntry.getComboboxFilterAriaAttributes() })), jsxRuntime.jsxs("div", { className: "options", role: "listbox", "aria-label": this.props.label, children: [this.props.filter && !this.props.hasFilterResults && (jsxRuntime.jsx("div", { className: "no-results", "aria-live": "polite", role: "option", children: jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\u2013" }) })), jsxRuntime.jsx("slot", {})] })] }), jsxRuntime.jsx(stateMessage.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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
58
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.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 }), jsxRuntime.jsxs("button", { "aria-invalid": this.props.state === 'error' ? 'true' : null, type: "button", role: "combobox", id: buttonId, ...utilsEntry.getComboboxAriaAttributes(this.props.isOpen, this.props.required, utilsEntry.labelId, ariaDescribedBy, popoverId), disabled: this.props.disabled, children: [this.props.slottedImagePath && jsxRuntime.jsx("img", { src: this.props.slottedImagePath, alt: "" }), jsxRuntime.jsx("span", { children: selectedOption }), jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: this.props.disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" })] }), jsxRuntime.jsxs("div", { id: popoverId, popover: "manual", tabIndex: -1, role: "dialog", "aria-label": this.props.label, "aria-hidden": this.props.isOpen ? null : 'true', children: [this.props.filter && (jsxRuntime.jsx(inputSearch_wrapper.PInputSearch, { className: "filter", name: "filter", label: "Filter options", hideLabel: true, autoComplete: "off", clear: true, indicator: true, compact: true, theme: this.props.theme, ...utilsEntry.getComboboxFilterAriaAttributes() })), jsxRuntime.jsxs("div", { className: "options", role: "listbox", "aria-label": this.props.label, children: [this.props.filter && !this.props.hasFilterResults && (jsxRuntime.jsx("div", { className: "no-results", "aria-live": "polite", role: "option", children: jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\u2013" }) })), jsxRuntime.jsx("slot", {})] })] }), jsxRuntime.jsx(stateMessage.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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
59
59
  }
60
60
  getSelectedOptionImagePath = (options) => {
61
61
  return (options
@@ -21,7 +21,7 @@ class DSRSheet extends react.Component {
21
21
  scroller;
22
22
  hasHeader;
23
23
  render() {
24
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
24
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
25
25
  const hasHeader = namedSlotChildren.filter(({ props: { slot } }) => slot === 'header').length > 0;
26
26
  if (this.props.open) ;
27
27
  const style = minifyCss.minifyCss(stylesEntry.getSheetCss(this.props.open, this.props.dismissButton, this.props.theme));
@@ -17,7 +17,7 @@ class DSRStepperHorizontal extends react.Component {
17
17
  scrollerElement;
18
18
  currentStepIndex;
19
19
  render() {
20
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
20
+ const { children, otherChildren } = splitChildren.splitChildren(this.props.children);
21
21
  const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
22
22
  ? { ...child, props: { ...child.props, theme: this.props.theme } }
23
23
  : child);
@@ -15,7 +15,7 @@ var scroller_wrapper = require('../components/scroller.wrapper.cjs');
15
15
  class DSRTable extends react.Component {
16
16
  host;
17
17
  render() {
18
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
18
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
19
19
  const hasSlottedCaption = namedSlotChildren.filter(({ props: { slot } }) => slot === 'caption').length > 0;
20
20
  const captionId = 'caption';
21
21
  const tableAttr = this.props.caption
@@ -23,7 +23,7 @@ class DSRTabsBar extends react.Component {
23
23
  hasPTabsParent;
24
24
  areTabsButtons;
25
25
  render() {
26
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
26
+ const { children, otherChildren } = splitChildren.splitChildren(this.props.children);
27
27
  const manipulatedChildren = children.map((child, i) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
28
28
  ? child.type === 'button'
29
29
  ? {
@@ -17,7 +17,7 @@ class DSRTabs extends react.Component {
17
17
  host;
18
18
  tabsItemElements = [];
19
19
  render() {
20
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
20
+ const { children, otherChildren } = splitChildren.splitChildren(this.props.children);
21
21
  const manipulatedChildren = children.map((child, i) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
22
22
  ? { ...child, props: { ...child.props, theme: this.props.theme, hidden: this.props.activeTabIndex !== i ? true : null } }
23
23
  : child);
@@ -36,7 +36,7 @@ class DSRTextFieldWrapper extends react.Component {
36
36
  hasUnit;
37
37
  eventListener;
38
38
  render() {
39
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
39
+ const { namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
40
40
  const { readOnly, disabled, type } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
41
41
  const disabledOrReadOnly = disabled || readOnly;
42
42
  const buttonProps = {
@@ -22,7 +22,7 @@ class DSRTextareaWrapper extends react.Component {
22
22
  hasCounter;
23
23
  eventListener;
24
24
  render() {
25
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
25
+ const { namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
26
26
  const { disabled, readOnly } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
27
27
  const style = minifyCss.minifyCss(stylesEntry.getTextareaWrapperCss(disabled, readOnly, this.props.hideLabel, this.props.state, this.props.hasCounter, this.props.theme));
28
28
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(legacyLabel.LegacyLabel, { 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, isDisabled: disabled, formElement: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("slot", {}), this.props.hasCounter && jsxRuntime.jsx("span", { className: "counter", "aria-hidden": "true" }), this.props.hasCounter && jsxRuntime.jsx("span", { className: "sr-only", "aria-live": "polite" })] }), jsxRuntime.jsx(stateMessage.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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
@@ -21,9 +21,6 @@ class DSRTextarea extends react.Component {
21
21
  internals;
22
22
  defaultValue;
23
23
  textAreaElement;
24
- counterElement;
25
- hasCounter;
26
- setCounterAriaTextDebounced = utilsEntry.debounce(() => this.props.setCounterAriaText());
27
24
  formResetCallback() {
28
25
  this.props.internals?.setFormValue(this.props.defaultValue);
29
26
  }
@@ -32,10 +29,12 @@ class DSRTextarea extends react.Component {
32
29
  formStateRestoreCallback() {
33
30
  }
34
31
  render() {
35
- const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
32
+ const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
36
33
  const id = 'textarea';
37
- const style = minifyCss.minifyCss(stylesEntry.getTextareaCss(this.props.disabled, this.props.readOnly, this.props.hideLabel, this.props.state, this.props.hasCounter, this.props.resize, this.props.theme));
38
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.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, htmlFor: id, label: this.props.label, description: this.props.description, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("textarea", { "aria-describedby": `${utilsEntry.descriptionId} ${stateMessage.messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, id: id, onBlur: this.props.onBlur, name: this.props.name, value: this.props.value, form: this.props.form, disabled: this.props.disabled, required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, rows: this.props.rows, readOnly: this.props.readOnly, spellCheck: this.props.spellCheck, autoComplete: this.props.autoComplete, wrap: this.props.wrap }), this.props.hasCounter && (jsxRuntime.jsx("span", { className: "counter", "aria-hidden": "true", children: `${this.props.value.length}/${this.props.maxLength}` })), this.props.hasCounter && jsxRuntime.jsx("span", { className: "sr-only", "aria-live": "polite" })] }), jsxRuntime.jsx(stateMessage.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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
34
+ const style = minifyCss.minifyCss(stylesEntry.getTextareaCss(this.props.disabled, this.props.readOnly, this.props.hideLabel, this.props.state, this.props.counter, this.props.resize, this.props.theme));
35
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.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, htmlFor: id, label: this.props.label, description: this.props.description, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("textarea", { "aria-describedby": `${utilsEntry.descriptionId} ${stateMessage.messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, id: id, onBlur: this.props.onBlur, name: this.props.name, value: this.props.value, form: this.props.form, disabled: this.props.disabled, required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, rows: this.props.rows, readOnly: this.props.readOnly, spellCheck: this.props.spellCheck, autoComplete: this.props.autoComplete, wrap: this.props.wrap }), this.props.counter && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: "sr-only", "aria-live": "polite", children: this.props.maxLength
36
+ ? `You have ${this.props.maxLength - this.props.value.length} out of ${this.props.maxLength} characters left`
37
+ : `${this.props.value.length} characters entered` }), jsxRuntime.jsx("span", { className: "counter", "aria-hidden": "true", children: this.props.maxLength ? `${this.props.value.length}/${this.props.maxLength}` : `${this.props.value.length}` })] }))] }), jsxRuntime.jsx(stateMessage.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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
39
38
  }
40
39
  }
41
40
 
@@ -2731,11 +2731,15 @@ function getDefaultExportFromCjs (x) {
2731
2731
  }
2732
2732
 
2733
2733
  function getAugmentedNamespace(n) {
2734
- if (n.__esModule) return n;
2734
+ if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
2735
2735
  var f = n.default;
2736
2736
  if (typeof f == "function") {
2737
2737
  var a = function a () {
2738
- if (this instanceof a) {
2738
+ var isInstance = false;
2739
+ try {
2740
+ isInstance = this instanceof a;
2741
+ } catch {}
2742
+ if (isInstance) {
2739
2743
  return Reflect.construct(f, arguments, this.constructor);
2740
2744
  }
2741
2745
  return f.apply(this, arguments);
@@ -3635,7 +3639,7 @@ const addImportantToEachRule = (input) => {
3635
3639
  ? result
3636
3640
  : // @ts-expect-error: Type string can't be used to index type JssStyle
3637
3641
  ((result[key] =
3638
- // biome-ignore lint/style/noCommaOperator: to be refactored
3642
+ // biome-ignore lint/complexity/noCommaOperator: to be refactored
3639
3643
  typeof value === 'object' ? addImportantToEachRule(value) : addImportantToRule(value)),
3640
3644
  result), {});
3641
3645
  };
@@ -3809,7 +3813,6 @@ const isObject = (obj) => typeof obj === 'object' && !Array.isArray(obj);
3809
3813
  // NOTE: taken from https://stackoverflow.com/a/48218209
3810
3814
  const mergeDeep = (...objects) => {
3811
3815
  return objects.reduce((prev, obj) => {
3812
- // biome-ignore lint/complexity/noForEach: to be refactored
3813
3816
  Object.keys(obj).forEach((key) => {
3814
3817
  const pVal = prev[key];
3815
3818
  const oVal = obj[key];
@@ -3892,20 +3895,6 @@ const supportsChromiumMediaQuery = (style) => ({
3892
3895
  '@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm)': style,
3893
3896
  });
3894
3897
 
3895
- /**
3896
- * Checks if the current environment supports the native Popover API.
3897
- *
3898
- * @returns {boolean} `true` if the native Popover API is supported, `false` otherwise.
3899
- */
3900
- const supportsNativePopover = () => {
3901
- if (!hasWindow) {
3902
- return false;
3903
- }
3904
- return Object.prototype.hasOwnProperty.call(HTMLElement.prototype, 'popover');
3905
- };
3906
- // determine it once
3907
- supportsNativePopover();
3908
-
3909
3898
  const hasDocument = typeof document !== 'undefined';
3910
3899
 
3911
3900
  const isThemeAuto = (theme) => {
@@ -9230,6 +9219,7 @@ const getComponentCss$y = (theme) => {
9230
9219
  position: 'absolute',
9231
9220
  pointerEvents: 'none',
9232
9221
  filter: `drop-shadow(0 0 16px ${shadowColor})`,
9222
+ backdropFilter: 'drop-shadow(0 0 transparent)', // workaround for Firefox bug not rendering PDS frosted glass correctly when nested inside CSS filter: https://bugzilla.mozilla.org/show_bug.cgi?id=1797051
9233
9223
  animation: `var(${cssVariableAnimationDuration}, ${motionDurationShort}) fade-in ${motionEasingBase} forwards`,
9234
9224
  '&:not(:popover-open)': {
9235
9225
  display: 'none', // ensures popover is not flickering when closed in some situations
@@ -9496,6 +9486,7 @@ const getComponentCss$w = (gradientColor, isNextHidden, isPrevHidden, alignScrol
9496
9486
  };
9497
9487
 
9498
9488
  const ITEM_PADDING = '17px';
9489
+ const { font: BUTTON_FONT } = textSmallStyle;
9499
9490
  const ICON_SIZE = '1.5rem';
9500
9491
  const ICON_MARGIN = '.25rem';
9501
9492
  const getColors$2 = (isDisabled, isSelected, theme) => {
@@ -11283,7 +11274,7 @@ const getComponentCss$4 = (isDisabled, isReadonly, hideLabel, state, hasCounter,
11283
11274
  });
11284
11275
  };
11285
11276
 
11286
- const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, hasCounter, resize, theme) => {
11277
+ const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, counter, resize, theme) => {
11287
11278
  const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
11288
11279
  const { primaryColor: primaryColorDark, contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
11289
11280
  const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
@@ -11322,7 +11313,7 @@ const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, hasCounter,
11322
11313
  }),
11323
11314
  gridArea: '1/1',
11324
11315
  font: textSmallStyle.font, // to override line-height
11325
- padding: hasCounter
11316
+ padding: counter
11326
11317
  ? `12px ${formElementPaddingHorizontal} ${spacingStaticLarge}`
11327
11318
  : `12px ${formElementPaddingHorizontal}`,
11328
11319
  // TODO: getFocusJssStyle() can't be re-used because focus style differs for form elements
@@ -11369,7 +11360,7 @@ const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, hasCounter,
11369
11360
  wrapper: {
11370
11361
  display: 'grid',
11371
11362
  },
11372
- ...(hasCounter && {
11363
+ ...(counter && {
11373
11364
  counter: {
11374
11365
  ...getUnitCounterJssStyle(isDisabled, isReadonly, theme),
11375
11366
  gridArea: '1/1',