@porsche-design-system/components-react 3.19.0-rc.2 → 3.19.0-rc.4

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 (69) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/ag-grid/theme.css +8416 -0
  3. package/cjs/lib/components/checkbox.wrapper.cjs +3 -3
  4. package/cjs/lib/components/content-wrapper.wrapper.cjs +1 -0
  5. package/cjs/lib/components/fieldset-wrapper.wrapper.cjs +1 -0
  6. package/cjs/lib/components/flex-item.wrapper.cjs +1 -0
  7. package/cjs/lib/components/flex.wrapper.cjs +1 -0
  8. package/cjs/lib/components/grid-item.wrapper.cjs +1 -0
  9. package/cjs/lib/components/grid.wrapper.cjs +1 -0
  10. package/cjs/lib/components/headline.wrapper.cjs +1 -0
  11. package/cjs/lib/components/link-social.wrapper.cjs +1 -0
  12. package/esm/lib/components/checkbox.wrapper.d.ts +8 -0
  13. package/esm/lib/components/checkbox.wrapper.mjs +3 -3
  14. package/esm/lib/components/content-wrapper.wrapper.d.ts +1 -0
  15. package/esm/lib/components/content-wrapper.wrapper.mjs +1 -0
  16. package/esm/lib/components/fieldset-wrapper.wrapper.d.ts +1 -0
  17. package/esm/lib/components/fieldset-wrapper.wrapper.mjs +1 -0
  18. package/esm/lib/components/flex-item.wrapper.d.ts +1 -0
  19. package/esm/lib/components/flex-item.wrapper.mjs +1 -0
  20. package/esm/lib/components/flex.wrapper.d.ts +1 -0
  21. package/esm/lib/components/flex.wrapper.mjs +1 -0
  22. package/esm/lib/components/grid-item.wrapper.d.ts +1 -0
  23. package/esm/lib/components/grid-item.wrapper.mjs +1 -0
  24. package/esm/lib/components/grid.wrapper.d.ts +1 -0
  25. package/esm/lib/components/grid.wrapper.mjs +1 -0
  26. package/esm/lib/components/headline.wrapper.d.ts +1 -0
  27. package/esm/lib/components/headline.wrapper.mjs +1 -0
  28. package/esm/lib/components/link-social.wrapper.d.ts +1 -0
  29. package/esm/lib/components/link-social.wrapper.mjs +1 -0
  30. package/esm/lib/types.d.ts +1 -0
  31. package/package.json +5 -2
  32. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +66 -27
  33. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.cjs +4 -4
  34. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.cjs +1 -0
  35. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.cjs +1 -0
  36. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flex-item.wrapper.cjs +1 -0
  37. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flex.wrapper.cjs +1 -0
  38. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/grid-item.wrapper.cjs +1 -0
  39. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/grid.wrapper.cjs +1 -0
  40. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.cjs +1 -0
  41. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.cjs +1 -0
  42. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +1 -1
  43. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +1 -1
  44. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.cjs +1 -1
  45. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.cjs +1 -1
  46. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +66 -27
  47. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.mjs +4 -4
  48. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.mjs +1 -0
  49. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.mjs +1 -0
  50. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flex-item.wrapper.mjs +1 -0
  51. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flex.wrapper.mjs +1 -0
  52. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/grid-item.wrapper.mjs +1 -0
  53. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/grid.wrapper.mjs +1 -0
  54. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.mjs +1 -0
  55. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.mjs +1 -0
  56. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +1 -1
  57. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +1 -1
  58. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.mjs +1 -1
  59. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.mjs +1 -1
  60. package/ssr/esm/lib/components/checkbox.wrapper.d.ts +8 -0
  61. package/ssr/esm/lib/components/content-wrapper.wrapper.d.ts +1 -0
  62. package/ssr/esm/lib/components/fieldset-wrapper.wrapper.d.ts +1 -0
  63. package/ssr/esm/lib/components/flex-item.wrapper.d.ts +1 -0
  64. package/ssr/esm/lib/components/flex.wrapper.d.ts +1 -0
  65. package/ssr/esm/lib/components/grid-item.wrapper.d.ts +1 -0
  66. package/ssr/esm/lib/components/grid.wrapper.d.ts +1 -0
  67. package/ssr/esm/lib/components/headline.wrapper.d.ts +1 -0
  68. package/ssr/esm/lib/components/link-social.wrapper.d.ts +1 -0
  69. package/ssr/esm/lib/types.d.ts +1 -0
@@ -7,6 +7,7 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var linkSocial = require('../dsr-components/link-social.cjs');
9
9
 
10
+ /** @deprecated since v3.0.0, will be removed with next major release. Use `p-link` with corresponding social icon instead. */
10
11
  const PLinkSocial = react.forwardRef(({ compact = false, hideLabel = false, href, icon, iconSource, rel, target = '_self', theme, className, children, ...rest }, ref) => {
11
12
  const elementRef = react.useRef();
12
13
  const WebComponentTag = hooks.usePrefix('p-link-social');
@@ -100,7 +100,7 @@ class DSRCheckbox extends react.Component {
100
100
  render() {
101
101
  const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
102
102
  const id = 'checkbox';
103
- const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getCheckboxCss(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.theme)));
103
+ const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getCheckboxCss(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.compact, this.props.theme)));
104
104
  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": `${label.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: false })] })] }), this.props.children] }));
105
105
  }
106
106
  }
@@ -103,7 +103,7 @@ class DSRPinCode extends react.Component {
103
103
  this.inputElements = [];
104
104
  const currentInputId = 'current-input';
105
105
  const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getPinCodeCss(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.isWithinForm, this.props.length, this.props.theme)));
106
- 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(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: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [Array.from(Array(this.props.length), (_, index) => (jsxRuntime.jsx("input", { ...(utilsEntry.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": `${label.labelId} ${label.descriptionId} ${stateMessage.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
106
+ 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: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [Array.from(Array(this.props.length), (_, index) => (jsxRuntime.jsx("input", { ...(utilsEntry.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": `${label.labelId} ${label.descriptionId} ${stateMessage.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
107
107
  , defaultValue: this.props.value[index] === ' ' ? null : this.props.value[index], disabled: this.props.disabled, required: this.props.required }, index))), 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 }), this.props.isWithinForm && jsxRuntime.jsx("slot", { name: "internal-input" }), jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: this.props.loading, initialLoading: false })] })] }), this.props.children] }));
108
108
  }
109
109
  }
@@ -101,7 +101,7 @@ class DSRSelectWrapperDropdown extends react.Component {
101
101
  const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getSelectWrapperDropdownCss(this.props.direction === 'auto'
102
102
  ? 'down'
103
103
  : this.props.direction, this.isOpen, this.props.state, this.props.disabled, this.props.filter, this.props.isNativePopoverCase, this.props.theme)));
104
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: this.props.filter ? ([
104
+ 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 ? ([
105
105
  jsxRuntime.jsx("input", { type: "text", role: "combobox", disabled: this.props.disabled, placeholder: utilsEntry.getSelectedOptionMap(this.optionMaps)?.value || null, autoComplete: "off", defaultValue: this.searchString }, "input"),
106
106
  jsxRuntime.jsx("span", {
107
107
  /* @ts-ignore */
@@ -99,7 +99,7 @@ class DSRSelectWrapper extends react.Component {
99
99
  const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
100
100
  const { disabled } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
101
101
  const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getSelectWrapperCss(disabled, hasCustomDropdown, this.props.hideLabel, this.props.state, this.props.theme)));
102
- 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(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, 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] }));
102
+ 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, 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] }));
103
103
  }
104
104
  }
105
105
 
@@ -5093,16 +5093,19 @@ const getComponentCss$12 = (gradientColor, hasHeading, hasDescription, hasContro
5093
5093
  WebkitUserSelect: 'none',
5094
5094
  WebkitTouchCallout: 'none',
5095
5095
  },
5096
- '&::before, &::after': {
5097
- content: '""',
5098
- position: 'absolute',
5099
- zIndex: 1,
5100
- top: 0,
5101
- height: '100%',
5102
- width: `var(${cssVariableGradientColorWidth}, 33%)`,
5103
- },
5104
- '&::before': getGradientStyles('right'),
5105
- '&::after': getGradientStyles('left'),
5096
+ ...(gradientColor &&
5097
+ gradientColor !== 'none' && {
5098
+ '&::before, &::after': {
5099
+ content: '""',
5100
+ position: 'absolute',
5101
+ zIndex: 1,
5102
+ top: 0,
5103
+ height: '100%',
5104
+ width: `var(${cssVariableGradientColorWidth}, 33%)`,
5105
+ },
5106
+ '&::before': getGradientStyles('right'),
5107
+ '&::after': getGradientStyles('left'),
5108
+ }),
5106
5109
  },
5107
5110
  '&__list': {
5108
5111
  ...backfaceVisibilityJssStyle,
@@ -5507,7 +5510,8 @@ const getCheckedSVGBackgroundImage$1 = (fill) => {
5507
5510
  const getIndeterminateSVGBackgroundImage = (fill) => {
5508
5511
  return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20,11v2H4v-2h16Z"/>`);
5509
5512
  };
5510
- const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, theme) => {
5513
+ const cssVarInternalCheckboxScaling = '--p-internal-checkbox-scaling';
5514
+ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, compact, theme) => {
5511
5515
  const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
5512
5516
  const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
5513
5517
  const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
@@ -5538,6 +5542,21 @@ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, theme) => {
5538
5542
  const indeterminateIconHoverColor = escapeHashCharacter(formStateHoverColor || primaryColor);
5539
5543
  const indeterminateIconHoverColorDark = escapeHashCharacter(formStateHoverColorDark || primaryColorDark);
5540
5544
  const background = `transparent 0% 0% / ${fontLineHeight}`;
5545
+ const minimumTouchTargetSize = '24px'; // Minimum touch target size to comply with accessibility guidelines.
5546
+ const scalingVar = `var(${cssVarInternalCheckboxScaling}, ${compact ? 0.6668 : 1})`;
5547
+ // Determines the scaling factor for the checkbox size. In "compact" mode, it uses 0.6668 to achieve a 20px checkbox (compact size).
5548
+ // Defaults to 1 for the standard size and can be overridden by the CSS variable `cssVarInternalCheckboxScaling`.
5549
+ const dimension = `calc(max(${SCALING_BASE_VALUE} * 0.75, ${scalingVar} * ${fontLineHeight}))`;
5550
+ // Calculates the checkbox size and ensures a minimum size of 12px (0.75 * SCALING_BASE_VALUE).
5551
+ // Scales proportionally with the line height and the scaling factor.
5552
+ const dimensionFull = `calc(${dimension} + ${borderWidthBase} * 2)`; // Calculates the total size of the checkbox including its borders.
5553
+ const touchTargetSizeDiff = `calc(${minimumTouchTargetSize} - ${dimensionFull})`; // Difference between the minimum touch target size and the checkbox full size.
5554
+ const paddingInlineStart = `calc(${spacingStaticSmall} - (max(0px, ${touchTargetSizeDiff})))`;
5555
+ // Adjusts padding to maintain consistent spacing when the checkbox is smaller than the minimum touch target size.
5556
+ // Uses asymmetric padding instead of `gap` to ensure there is no non-clickable area between the label and the input.
5557
+ const paddingTop = `calc((${dimensionFull} - ${fontLineHeight}) / 2)`; // Vertically centers the checkbox label relative to the checkbox size.
5558
+ const inset = `calc(-${borderWidthBase} - max(0px, ${touchTargetSizeDiff} / 2))`; // Positions the checkbox ::before pseudo-element with a negative offset to align it with the touch target.
5559
+ const height = `calc(max(${fontLineHeight}, ${dimensionFull}))`; // Ensures the wrapper height matches either the font's line height or the full size of the checkbox, whichever is larger.
5541
5560
  return getCss({
5542
5561
  '@global': {
5543
5562
  ':host': {
@@ -5549,8 +5568,16 @@ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, theme) => {
5549
5568
  },
5550
5569
  ...preventFoucOfNestedElementsStyles,
5551
5570
  input: {
5552
- width: fontLineHeight,
5553
- height: fontLineHeight,
5571
+ position: 'relative',
5572
+ '&::before': {
5573
+ // Ensures the touch target is at least 24px, even if the checkbox is smaller than the minimum touch target size.
5574
+ // This pseudo-element expands the clickable area without affecting the visual size of the checkbox itself.
5575
+ content: '""',
5576
+ position: 'absolute',
5577
+ inset,
5578
+ },
5579
+ width: dimension,
5580
+ height: dimension,
5554
5581
  font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
5555
5582
  display: 'block',
5556
5583
  margin: 0,
@@ -5574,6 +5601,9 @@ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, theme) => {
5574
5601
  }),
5575
5602
  gridArea: '1/1',
5576
5603
  borderRadius: borderRadiusSmall,
5604
+ ...addImportantToEachRule({
5605
+ backgroundSize: 'cover',
5606
+ }),
5577
5607
  },
5578
5608
  ...(!isLoading
5579
5609
  ? {
@@ -5679,17 +5709,23 @@ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, theme) => {
5679
5709
  }),
5680
5710
  },
5681
5711
  wrapper: {
5712
+ ...textSmallStyle,
5713
+ minWidth: minimumTouchTargetSize,
5714
+ minHeight: minimumTouchTargetSize,
5715
+ justifyContent: 'center',
5716
+ alignItems: 'center',
5682
5717
  display: 'grid',
5683
5718
  gridArea: '1/1',
5684
5719
  alignSelf: 'flex-start', // in case label becomes multiline
5720
+ height,
5685
5721
  },
5686
5722
  ...(isLoading && {
5687
5723
  spinner: {
5688
5724
  position: 'relative', // ensure correct stacking, can be removed as soon as focus for input is handled with outline
5689
5725
  gridArea: '1/1',
5690
5726
  placeSelf: 'center',
5691
- width: fontLineHeight,
5692
- height: fontLineHeight,
5727
+ width: dimension,
5728
+ height: dimension,
5693
5729
  font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
5694
5730
  pointerEvents: 'none',
5695
5731
  },
@@ -5699,8 +5735,8 @@ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, theme) => {
5699
5735
  gridArea: '1/2',
5700
5736
  ...(isLoading && { pointerEvents: 'none' }), // prevent default htmlFor behavior. TODO: Remove as soon as label component for custom form components exists.
5701
5737
  }, {
5702
- paddingTop: '2px', // compensate vertical alignment
5703
- paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent not clickable area between label and input
5738
+ paddingTop,
5739
+ paddingInlineStart,
5704
5740
  }),
5705
5741
  // .message
5706
5742
  ...getFunctionalComponentStateMessageStyles(theme, state, {
@@ -9857,6 +9893,8 @@ const getColors$1 = (checked, disabled, loading, theme) => {
9857
9893
  const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, loading, theme) => {
9858
9894
  const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, disabled, loading, theme);
9859
9895
  const { buttonBorderColor: buttonBorderColorDark, buttonBorderColorHover: buttonBorderColorHoverDark, buttonBackgroundColor: buttonBackgroundColorDark, buttonBackgroundColorHover: buttonBackgroundColorHoverDark, toggleBackgroundColor: toggleBackgroundColorDark, toggleBackgroundColorHover: toggleBackgroundColorHoverDark, textColor: textColorDark, } = getColors$1(checked, disabled, loading, 'dark');
9896
+ const toggleTransitionOffsetLtr = `calc(${fontLineHeight} - 2px)`;
9897
+ const toggleTransitionOffsetRtl = `calc((${fontLineHeight} - 2px) * -1)`;
9860
9898
  return getCss({
9861
9899
  '@global': {
9862
9900
  ':host': {
@@ -9880,11 +9918,12 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
9880
9918
  display: 'flex',
9881
9919
  alignItems: 'center',
9882
9920
  flexShrink: 0,
9883
- width: '48px',
9884
- height: '28px',
9885
- boxSizing: 'border-box',
9921
+ width: `calc(${fontLineHeight} * 2 - ${borderWidthBase}*2)`,
9922
+ height: fontLineHeight,
9923
+ font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
9924
+ boxSizing: 'content-box',
9886
9925
  border: `${borderWidthBase} solid ${buttonBorderColor}`,
9887
- borderRadius: '14px',
9926
+ borderRadius: `calc((${fontLineHeight} + ${borderWidthBase}*2) / 2)`,
9888
9927
  backgroundColor: buttonBackgroundColor,
9889
9928
  cursor: isDisabledOrLoading(disabled, loading) ? 'not-allowed' : 'pointer',
9890
9929
  transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
@@ -9936,14 +9975,14 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
9936
9975
  display: 'flex',
9937
9976
  alignItems: 'center',
9938
9977
  justifyContent: 'center',
9939
- width: '20px',
9940
- height: '20px',
9978
+ width: `calc(${fontLineHeight} - ${borderWidthBase}*2)`,
9979
+ height: `calc(${fontLineHeight} - ${borderWidthBase}*2)`,
9941
9980
  borderRadius: '50%',
9942
9981
  backgroundColor: toggleBackgroundColor,
9943
9982
  transition: `${getTransition('background-color')}, ${getTransition('transform')}`,
9944
- transform: `translate3d(${checked ? '22px' : '2px'}, 0, 0)`,
9983
+ transform: `translate3d(${checked ? toggleTransitionOffsetLtr : '2px'}, 0, 0)`,
9945
9984
  '&:dir(rtl)': {
9946
- transform: `translate3d(${checked ? '-22px' : '-2px'}, 0, 0)`,
9985
+ transform: `translate3d(${checked ? toggleTransitionOffsetRtl : '-2px'}, 0, 0)`,
9947
9986
  },
9948
9987
  ...prefersColorSchemeDarkMediaQuery(theme, {
9949
9988
  backgroundColor: toggleBackgroundColorDark,
@@ -9951,8 +9990,8 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
9951
9990
  },
9952
9991
  ...(loading && {
9953
9992
  spinner: {
9954
- width: '28px',
9955
- height: '28px',
9993
+ width: `calc(${fontLineHeight} + ${borderWidthBase}*2)`,
9994
+ height: `calc(${fontLineHeight} + ${borderWidthBase}*2)`,
9956
9995
  },
9957
9996
  }),
9958
9997
  // .loading
@@ -5,22 +5,22 @@ import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMerge
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRCheckbox } from '../dsr-components/checkbox.mjs';
7
7
 
8
- const PCheckbox = forwardRef(({ checked = false, disabled = false, form, hideLabel = false, indeterminate = false, label = '', loading = false, message = '', name = '', onBlur, onUpdate, required = false, state = 'none', theme, value = 'on', className, children, ...rest }, ref) => {
8
+ const PCheckbox = forwardRef(({ checked = false, compact = false, disabled = false, form, hideLabel = false, indeterminate = false, label = '', loading = false, message = '', name = '', onBlur, onUpdate, required = false, state = 'none', theme, value = 'on', className, children, ...rest }, ref) => {
9
9
  const elementRef = useRef();
10
10
  useEventCallback(elementRef, 'blur', onBlur);
11
11
  useEventCallback(elementRef, 'update', onUpdate);
12
12
  const WebComponentTag = usePrefix('p-checkbox');
13
- const propsToSync = [checked, disabled, form, hideLabel, indeterminate, label, loading, message, name, required, state, theme || useTheme(), value];
13
+ const propsToSync = [checked, compact, disabled, form, hideLabel, indeterminate, label, loading, message, name, required, state, theme || useTheme(), value];
14
14
  useBrowserLayoutEffect(() => {
15
15
  const { current } = elementRef;
16
- ['checked', 'disabled', 'form', 'hideLabel', 'indeterminate', 'label', 'loading', 'message', 'name', 'required', 'state', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
16
+ ['checked', 'compact', 'disabled', 'form', 'hideLabel', 'indeterminate', 'label', 'loading', 'message', 'name', 'required', 'state', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
17
17
  }, propsToSync);
18
18
  const props = {
19
19
  ...rest,
20
20
  // @ts-ignore
21
21
  ...(!process.browser
22
22
  ? {
23
- children: (jsx(DSRCheckbox, { checked, disabled, form, hideLabel, indeterminate, label, loading, message, name, required, state, theme: theme || useTheme(), value, children })),
23
+ children: (jsx(DSRCheckbox, { checked, compact, disabled, form, hideLabel, indeterminate, label, loading, message, name, required, state, theme: theme || useTheme(), value, children })),
24
24
  }
25
25
  : {
26
26
  children,
@@ -5,6 +5,7 @@ import { usePrefix, useTheme, useBrowserLayoutEffect, useMergedClass } from '../
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRContentWrapper } from '../dsr-components/content-wrapper.mjs';
7
7
 
8
+ /** @deprecated since v3.0.0, will be removed with next major release. Use native CSS Grid instead. */
8
9
  const PContentWrapper = forwardRef(({ backgroundColor = 'transparent', theme, width = 'extended', className, children, ...rest }, ref) => {
9
10
  const elementRef = useRef();
10
11
  const WebComponentTag = usePrefix('p-content-wrapper');
@@ -5,6 +5,7 @@ import { usePrefix, useTheme, useBrowserLayoutEffect, useMergedClass } from '../
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRFieldsetWrapper } from '../dsr-components/fieldset-wrapper.mjs';
7
7
 
8
+ /** @deprecated since v3.0.0, will be removed with next major release. Please use "p-fieldset" instead. */
8
9
  const PFieldsetWrapper = forwardRef(({ label = '', labelSize = 'medium', message = '', required = false, state = 'none', theme, className, children, ...rest }, ref) => {
9
10
  const elementRef = useRef();
10
11
  const WebComponentTag = usePrefix('p-fieldset-wrapper');
@@ -5,6 +5,7 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRFlexItem } from '../dsr-components/flex-item.mjs';
7
7
 
8
+ /** @deprecated since v3.0.0, will be removed with next major release. Use native CSS Flex instead. */
8
9
  const PFlexItem = forwardRef(({ alignSelf = 'auto', flex = 'initial', grow = 0, offset = 'none', shrink = 1, width = 'auto', className, children, ...rest }, ref) => {
9
10
  const elementRef = useRef();
10
11
  const WebComponentTag = usePrefix('p-flex-item');
@@ -5,6 +5,7 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRFlex } from '../dsr-components/flex.mjs';
7
7
 
8
+ /** @deprecated since v3.0.0, will be removed with next major release. Use native CSS Flex instead. */
8
9
  const PFlex = forwardRef(({ alignContent = 'stretch', alignItems = 'stretch', direction = 'row', inline = false, justifyContent = 'flex-start', wrap = 'nowrap', className, children, ...rest }, ref) => {
9
10
  const elementRef = useRef();
10
11
  const WebComponentTag = usePrefix('p-flex');
@@ -5,6 +5,7 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRGridItem } from '../dsr-components/grid-item.mjs';
7
7
 
8
+ /** @deprecated since v3.0.0, will be removed with next major release. Use native CSS Grid instead. */
8
9
  const PGridItem = forwardRef(({ offset = 0, size = 1, className, children, ...rest }, ref) => {
9
10
  const elementRef = useRef();
10
11
  const WebComponentTag = usePrefix('p-grid-item');
@@ -5,6 +5,7 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRGrid } from '../dsr-components/grid.mjs';
7
7
 
8
+ /** @deprecated since v3.0.0, will be removed with next major release. Use native CSS Grid instead. */
8
9
  const PGrid = forwardRef(({ direction = 'row', gutter = { base: 16, s: 24, m: 36 }, wrap = 'wrap', className, children, ...rest }, ref) => {
9
10
  const elementRef = useRef();
10
11
  const WebComponentTag = usePrefix('p-grid');
@@ -5,6 +5,7 @@ import { usePrefix, useTheme, useBrowserLayoutEffect, useMergedClass } from '../
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRHeadline } from '../dsr-components/headline.mjs';
7
7
 
8
+ /** @deprecated since v3.0.0, will be removed with next major release. Please use "p-heading" instead. */
8
9
  const PHeadline = forwardRef(({ align = 'start', color = 'primary', ellipsis = false, tag, theme, variant = 'headline-1', className, children, ...rest }, ref) => {
9
10
  const elementRef = useRef();
10
11
  const WebComponentTag = usePrefix('p-headline');
@@ -5,6 +5,7 @@ import { usePrefix, useTheme, useBrowserLayoutEffect, useMergedClass } from '../
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRLinkSocial } from '../dsr-components/link-social.mjs';
7
7
 
8
+ /** @deprecated since v3.0.0, will be removed with next major release. Use `p-link` with corresponding social icon instead. */
8
9
  const PLinkSocial = forwardRef(({ compact = false, hideLabel = false, href, icon, iconSource, rel, target = '_self', theme, className, children, ...rest }, ref) => {
9
10
  const elementRef = useRef();
10
11
  const WebComponentTag = usePrefix('p-link-social');
@@ -98,7 +98,7 @@ class DSRCheckbox extends Component {
98
98
  render() {
99
99
  const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
100
100
  const id = 'checkbox';
101
- const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$10(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.theme)));
101
+ const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$10(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.compact, this.props.theme)));
102
102
  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, htmlFor: id, label: this.props.label, isLoading: this.props.loading, isDisabled: this.props.disabled, isRequired: this.props.required }), jsxs("div", { className: "wrapper", children: [jsx("input", { type: "checkbox", id: id, "aria-describedby": `${descriptionId} ${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 && (jsx(PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, "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, theme: this.props.theme, host: null }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: false })] })] }), this.props.children] }));
103
103
  }
104
104
  }
@@ -101,7 +101,7 @@ class DSRPinCode extends Component {
101
101
  this.inputElements = [];
102
102
  const currentInputId = 'current-input';
103
103
  const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$x(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.isWithinForm, this.props.length, this.props.theme)));
104
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", 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(Array(this.props.length), (_, index) => (jsx("input", { ...(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
104
+ 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(Array(this.props.length), (_, index) => (jsx("input", { ...(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
105
105
  , defaultValue: this.props.value[index] === ' ' ? null : this.props.value[index], disabled: this.props.disabled, required: this.props.required }, index))), this.props.loading && (jsx(PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, "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, theme: this.props.theme, host: null }), this.props.isWithinForm && jsx("slot", { name: "internal-input" }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: false })] })] }), this.props.children] }));
106
106
  }
107
107
  }
@@ -99,7 +99,7 @@ class DSRSelectWrapperDropdown extends Component {
99
99
  const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$r(this.props.direction === 'auto'
100
100
  ? 'down'
101
101
  : this.props.direction, this.isOpen, this.props.state, this.props.disabled, this.props.filter, this.props.isNativePopoverCase, this.props.theme)));
102
- return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: this.props.filter ? ([
102
+ return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: this.props.filter ? ([
103
103
  jsx("input", { type: "text", role: "combobox", disabled: this.props.disabled, placeholder: getSelectedOptionMap(this.optionMaps)?.value || null, autoComplete: "off", defaultValue: this.searchString }, "input"),
104
104
  jsx("span", {
105
105
  /* @ts-ignore */
@@ -97,7 +97,7 @@ class DSRSelectWrapper extends Component {
97
97
  const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
98
98
  const { disabled } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
99
99
  const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$q(disabled, hasCustomDropdown, this.props.hideLabel, this.props.state, this.props.theme)));
100
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", 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, isDisabled: disabled, formElement: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props }), jsxs("div", { className: "wrapper", children: [jsx("slot", {}), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" }), hasCustomDropdown && !disabled && (jsx(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) }))] }), 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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
100
+ 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, isDisabled: disabled, formElement: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props }), jsxs("div", { className: "wrapper", children: [jsx("slot", {}), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" }), hasCustomDropdown && !disabled && (jsx(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) }))] }), 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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
101
101
  }
102
102
  }
103
103
 
@@ -5,6 +5,10 @@ export type PCheckboxProps = BaseProps & {
5
5
  * Reflects the checkbox current checked state and allows setting the initial checked state.
6
6
  */
7
7
  checked?: boolean;
8
+ /**
9
+ * Displays as compact version.
10
+ */
11
+ compact?: boolean;
8
12
  /**
9
13
  * Marks the checkbox as disabled.
10
14
  */
@@ -67,6 +71,10 @@ export declare const PCheckbox: import("react").ForwardRefExoticComponent<import
67
71
  * Reflects the checkbox current checked state and allows setting the initial checked state.
68
72
  */
69
73
  checked?: boolean;
74
+ /**
75
+ * Displays as compact version.
76
+ */
77
+ compact?: boolean;
70
78
  /**
71
79
  * Marks the checkbox as disabled.
72
80
  */
@@ -16,6 +16,7 @@ export type PContentWrapperProps = BaseProps & {
16
16
  */
17
17
  width?: ContentWrapperWidth;
18
18
  };
19
+ /** @deprecated since v3.0.0, will be removed with next major release. Use native CSS Grid instead. */
19
20
  export declare const PContentWrapper: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
20
21
  /**
21
22
  * Has no effect anymore
@@ -26,6 +26,7 @@ export type PFieldsetWrapperProps = BaseProps & {
26
26
  */
27
27
  theme?: Theme;
28
28
  };
29
+ /** @deprecated since v3.0.0, will be removed with next major release. Please use "p-fieldset" instead. */
29
30
  export declare const PFieldsetWrapper: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
30
31
  /**
31
32
  * The label text.
@@ -26,6 +26,7 @@ export type PFlexItemProps = BaseProps & {
26
26
  */
27
27
  width?: BreakpointCustomizable<FlexItemWidth>;
28
28
  };
29
+ /** @deprecated since v3.0.0, will be removed with next major release. Use native CSS Flex instead. */
29
30
  export declare const PFlexItem: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
30
31
  /**
31
32
  * Defines how this flex item is aligned along the cross axis. This overwrites the cross axis alignment set by the container. Corresponds to the "alignSelf" css property.
@@ -26,6 +26,7 @@ export type PFlexProps = BaseProps & {
26
26
  */
27
27
  wrap?: BreakpointCustomizable<FlexWrap>;
28
28
  };
29
+ /** @deprecated since v3.0.0, will be removed with next major release. Use native CSS Flex instead. */
29
30
  export declare const PFlex: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
30
31
  /**
31
32
  * This aligns a flex container's individual lines when there is extra space in the cross-axis, similar to how "justifyContent" aligns individual items along the main axis.
@@ -10,6 +10,7 @@ export type PGridItemProps = BaseProps & {
10
10
  */
11
11
  size?: BreakpointCustomizable<GridItemSize>;
12
12
  };
13
+ /** @deprecated since v3.0.0, will be removed with next major release. Use native CSS Grid instead. */
13
14
  export declare const PGridItem: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
14
15
  /**
15
16
  * The offset of the column. Can be between 0 and 11. Also defines the offset of the column for specific breakpoints, like {base: 6, l: 3}. You always need to provide a base value when doing this.
@@ -15,6 +15,7 @@ export type PGridProps = BaseProps & {
15
15
  */
16
16
  wrap?: BreakpointCustomizable<GridWrap>;
17
17
  };
18
+ /** @deprecated since v3.0.0, will be removed with next major release. Use native CSS Grid instead. */
18
19
  export declare const PGrid: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
19
20
  /**
20
21
  * Defines the direction of the main and cross axis. The default "row" defines the main axis as horizontal left to right. Also defines the direction for specific breakpoints, like {base: "column", l: "row"}. You always need to provide a base value when doing this.
@@ -26,6 +26,7 @@ export type PHeadlineProps = BaseProps & {
26
26
  */
27
27
  variant?: HeadlineVariant;
28
28
  };
29
+ /** @deprecated since v3.0.0, will be removed with next major release. Please use "p-heading" instead. */
29
30
  export declare const PHeadline: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
30
31
  /**
31
32
  * Text alignment of the component.
@@ -34,6 +34,7 @@ export type PLinkSocialProps = BaseProps & {
34
34
  */
35
35
  theme?: Theme;
36
36
  };
37
+ /** @deprecated since v3.0.0, will be removed with next major release. Use `p-link` with corresponding social icon instead. */
37
38
  export declare const PLinkSocial: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
38
39
  /**
39
40
  * Displays as compact version.
@@ -560,6 +560,7 @@ declare const TYPOGRAPHY_ALIGNS: readonly [
560
560
  "start",
561
561
  "center",
562
562
  "end",
563
+ "inherit",
563
564
  "left",
564
565
  "right"
565
566
  ];