@porsche-design-system/components-react 3.19.0-rc.3 → 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.
- package/CHANGELOG.md +18 -0
- package/ag-grid/theme.css +8416 -0
- package/cjs/lib/components/checkbox.wrapper.cjs +3 -3
- package/cjs/lib/components/content-wrapper.wrapper.cjs +1 -0
- package/cjs/lib/components/fieldset-wrapper.wrapper.cjs +1 -0
- package/cjs/lib/components/flex-item.wrapper.cjs +1 -0
- package/cjs/lib/components/flex.wrapper.cjs +1 -0
- package/cjs/lib/components/grid-item.wrapper.cjs +1 -0
- package/cjs/lib/components/grid.wrapper.cjs +1 -0
- package/cjs/lib/components/headline.wrapper.cjs +1 -0
- package/cjs/lib/components/link-social.wrapper.cjs +1 -0
- package/esm/lib/components/checkbox.wrapper.d.ts +8 -0
- package/esm/lib/components/checkbox.wrapper.mjs +3 -3
- package/esm/lib/components/content-wrapper.wrapper.d.ts +1 -0
- package/esm/lib/components/content-wrapper.wrapper.mjs +1 -0
- package/esm/lib/components/fieldset-wrapper.wrapper.d.ts +1 -0
- package/esm/lib/components/fieldset-wrapper.wrapper.mjs +1 -0
- package/esm/lib/components/flex-item.wrapper.d.ts +1 -0
- package/esm/lib/components/flex-item.wrapper.mjs +1 -0
- package/esm/lib/components/flex.wrapper.d.ts +1 -0
- package/esm/lib/components/flex.wrapper.mjs +1 -0
- package/esm/lib/components/grid-item.wrapper.d.ts +1 -0
- package/esm/lib/components/grid-item.wrapper.mjs +1 -0
- package/esm/lib/components/grid.wrapper.d.ts +1 -0
- package/esm/lib/components/grid.wrapper.mjs +1 -0
- package/esm/lib/components/headline.wrapper.d.ts +1 -0
- package/esm/lib/components/headline.wrapper.mjs +1 -0
- package/esm/lib/components/link-social.wrapper.d.ts +1 -0
- package/esm/lib/components/link-social.wrapper.mjs +1 -0
- package/esm/lib/types.d.ts +1 -0
- package/package.json +5 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +53 -17
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flex-item.wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flex.wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/grid-item.wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/grid.wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +53 -17
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flex-item.wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flex.wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/grid-item.wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/grid.wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.mjs +1 -1
- package/ssr/esm/lib/components/checkbox.wrapper.d.ts +8 -0
- package/ssr/esm/lib/components/content-wrapper.wrapper.d.ts +1 -0
- package/ssr/esm/lib/components/fieldset-wrapper.wrapper.d.ts +1 -0
- package/ssr/esm/lib/components/flex-item.wrapper.d.ts +1 -0
- package/ssr/esm/lib/components/flex.wrapper.d.ts +1 -0
- package/ssr/esm/lib/components/grid-item.wrapper.d.ts +1 -0
- package/ssr/esm/lib/components/grid.wrapper.d.ts +1 -0
- package/ssr/esm/lib/components/headline.wrapper.d.ts +1 -0
- package/ssr/esm/lib/components/link-social.wrapper.d.ts +1 -0
- package/ssr/esm/lib/types.d.ts +1 -0
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs
CHANGED
|
@@ -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
|
|
|
@@ -5510,7 +5510,8 @@ const getCheckedSVGBackgroundImage$1 = (fill) => {
|
|
|
5510
5510
|
const getIndeterminateSVGBackgroundImage = (fill) => {
|
|
5511
5511
|
return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20,11v2H4v-2h16Z"/>`);
|
|
5512
5512
|
};
|
|
5513
|
-
const
|
|
5513
|
+
const cssVarInternalCheckboxScaling = '--p-internal-checkbox-scaling';
|
|
5514
|
+
const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, compact, theme) => {
|
|
5514
5515
|
const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
5515
5516
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
5516
5517
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
@@ -5541,6 +5542,21 @@ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5541
5542
|
const indeterminateIconHoverColor = escapeHashCharacter(formStateHoverColor || primaryColor);
|
|
5542
5543
|
const indeterminateIconHoverColorDark = escapeHashCharacter(formStateHoverColorDark || primaryColorDark);
|
|
5543
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.
|
|
5544
5560
|
return getCss({
|
|
5545
5561
|
'@global': {
|
|
5546
5562
|
':host': {
|
|
@@ -5552,8 +5568,16 @@ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5552
5568
|
},
|
|
5553
5569
|
...preventFoucOfNestedElementsStyles,
|
|
5554
5570
|
input: {
|
|
5555
|
-
|
|
5556
|
-
|
|
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,
|
|
5557
5581
|
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
5558
5582
|
display: 'block',
|
|
5559
5583
|
margin: 0,
|
|
@@ -5577,6 +5601,9 @@ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5577
5601
|
}),
|
|
5578
5602
|
gridArea: '1/1',
|
|
5579
5603
|
borderRadius: borderRadiusSmall,
|
|
5604
|
+
...addImportantToEachRule({
|
|
5605
|
+
backgroundSize: 'cover',
|
|
5606
|
+
}),
|
|
5580
5607
|
},
|
|
5581
5608
|
...(!isLoading
|
|
5582
5609
|
? {
|
|
@@ -5682,17 +5709,23 @@ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5682
5709
|
}),
|
|
5683
5710
|
},
|
|
5684
5711
|
wrapper: {
|
|
5712
|
+
...textSmallStyle,
|
|
5713
|
+
minWidth: minimumTouchTargetSize,
|
|
5714
|
+
minHeight: minimumTouchTargetSize,
|
|
5715
|
+
justifyContent: 'center',
|
|
5716
|
+
alignItems: 'center',
|
|
5685
5717
|
display: 'grid',
|
|
5686
5718
|
gridArea: '1/1',
|
|
5687
5719
|
alignSelf: 'flex-start', // in case label becomes multiline
|
|
5720
|
+
height,
|
|
5688
5721
|
},
|
|
5689
5722
|
...(isLoading && {
|
|
5690
5723
|
spinner: {
|
|
5691
5724
|
position: 'relative', // ensure correct stacking, can be removed as soon as focus for input is handled with outline
|
|
5692
5725
|
gridArea: '1/1',
|
|
5693
5726
|
placeSelf: 'center',
|
|
5694
|
-
width:
|
|
5695
|
-
height:
|
|
5727
|
+
width: dimension,
|
|
5728
|
+
height: dimension,
|
|
5696
5729
|
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
5697
5730
|
pointerEvents: 'none',
|
|
5698
5731
|
},
|
|
@@ -5702,8 +5735,8 @@ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5702
5735
|
gridArea: '1/2',
|
|
5703
5736
|
...(isLoading && { pointerEvents: 'none' }), // prevent default htmlFor behavior. TODO: Remove as soon as label component for custom form components exists.
|
|
5704
5737
|
}, {
|
|
5705
|
-
paddingTop
|
|
5706
|
-
paddingInlineStart
|
|
5738
|
+
paddingTop,
|
|
5739
|
+
paddingInlineStart,
|
|
5707
5740
|
}),
|
|
5708
5741
|
// .message
|
|
5709
5742
|
...getFunctionalComponentStateMessageStyles(theme, state, {
|
|
@@ -9860,6 +9893,8 @@ const getColors$1 = (checked, disabled, loading, theme) => {
|
|
|
9860
9893
|
const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, loading, theme) => {
|
|
9861
9894
|
const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, disabled, loading, theme);
|
|
9862
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)`;
|
|
9863
9898
|
return getCss({
|
|
9864
9899
|
'@global': {
|
|
9865
9900
|
':host': {
|
|
@@ -9883,11 +9918,12 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
9883
9918
|
display: 'flex',
|
|
9884
9919
|
alignItems: 'center',
|
|
9885
9920
|
flexShrink: 0,
|
|
9886
|
-
width:
|
|
9887
|
-
height:
|
|
9888
|
-
|
|
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',
|
|
9889
9925
|
border: `${borderWidthBase} solid ${buttonBorderColor}`,
|
|
9890
|
-
borderRadius:
|
|
9926
|
+
borderRadius: `calc((${fontLineHeight} + ${borderWidthBase}*2) / 2)`,
|
|
9891
9927
|
backgroundColor: buttonBackgroundColor,
|
|
9892
9928
|
cursor: isDisabledOrLoading(disabled, loading) ? 'not-allowed' : 'pointer',
|
|
9893
9929
|
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
@@ -9939,14 +9975,14 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
9939
9975
|
display: 'flex',
|
|
9940
9976
|
alignItems: 'center',
|
|
9941
9977
|
justifyContent: 'center',
|
|
9942
|
-
width:
|
|
9943
|
-
height:
|
|
9978
|
+
width: `calc(${fontLineHeight} - ${borderWidthBase}*2)`,
|
|
9979
|
+
height: `calc(${fontLineHeight} - ${borderWidthBase}*2)`,
|
|
9944
9980
|
borderRadius: '50%',
|
|
9945
9981
|
backgroundColor: toggleBackgroundColor,
|
|
9946
9982
|
transition: `${getTransition('background-color')}, ${getTransition('transform')}`,
|
|
9947
|
-
transform: `translate3d(${checked ?
|
|
9983
|
+
transform: `translate3d(${checked ? toggleTransitionOffsetLtr : '2px'}, 0, 0)`,
|
|
9948
9984
|
'&:dir(rtl)': {
|
|
9949
|
-
transform: `translate3d(${checked ?
|
|
9985
|
+
transform: `translate3d(${checked ? toggleTransitionOffsetRtl : '-2px'}, 0, 0)`,
|
|
9950
9986
|
},
|
|
9951
9987
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9952
9988
|
backgroundColor: toggleBackgroundColorDark,
|
|
@@ -9954,8 +9990,8 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
9954
9990
|
},
|
|
9955
9991
|
...(loading && {
|
|
9956
9992
|
spinner: {
|
|
9957
|
-
width:
|
|
9958
|
-
height:
|
|
9993
|
+
width: `calc(${fontLineHeight} + ${borderWidthBase}*2)`,
|
|
9994
|
+
height: `calc(${fontLineHeight} + ${borderWidthBase}*2)`,
|
|
9959
9995
|
},
|
|
9960
9996
|
}),
|
|
9961
9997
|
// .loading
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.mjs
CHANGED
|
@@ -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');
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flex-item.wrapper.mjs
CHANGED
|
@@ -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');
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flex.wrapper.mjs
CHANGED
|
@@ -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');
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/grid-item.wrapper.mjs
CHANGED
|
@@ -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');
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/grid.wrapper.mjs
CHANGED
|
@@ -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');
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.mjs
CHANGED
|
@@ -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');
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs
CHANGED
|
@@ -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
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs
CHANGED
|
@@ -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.
|