@porsche-design-system/components-react 3.25.1 → 3.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/cjs/lib/components/select.wrapper.cjs +3 -3
- package/cjs/lib/components/switch.wrapper.cjs +3 -3
- package/esm/lib/components/select.wrapper.d.ts +8 -0
- package/esm/lib/components/select.wrapper.mjs +3 -3
- package/esm/lib/components/switch.wrapper.d.ts +8 -0
- package/esm/lib/components/switch.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +66 -0
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +111 -44
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/select.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.cjs +4 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +111 -44
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +4 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.mjs +1 -1
- package/ssr/esm/lib/components/select.wrapper.d.ts +8 -0
- package/ssr/esm/lib/components/switch.wrapper.d.ts +8 -0
- package/ssr/esm/lib/dsr-components/canvas.d.ts +2 -0
- package/ssr/esm/lib/types.d.ts +66 -0
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.cjs
CHANGED
|
@@ -21,7 +21,7 @@ class DSRSwitch extends react.Component {
|
|
|
21
21
|
initialLoading = false;
|
|
22
22
|
render() {
|
|
23
23
|
splitChildren.splitChildren(this.props.children);
|
|
24
|
-
const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getSwitchCss(this.props.alignLabel, this.props.hideLabel, this.props.stretch, this.props.checked, this.props.disabled, this.props.loading, this.props.theme)));
|
|
24
|
+
const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getSwitchCss(this.props.alignLabel, this.props.hideLabel, this.props.stretch, this.props.checked, this.props.disabled, this.props.loading, this.props.compact, this.props.theme)));
|
|
25
25
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { ...utilsEntry.getSwitchButtonAriaAttributes(this.props.disabled, this.props.loading, this.props.checked), id: "switch", type: "button", role: "switch", "aria-labelledby": "label" // only relevant for axe-core because of https://github.com/dequelabs/axe-core/issues/1393
|
|
26
26
|
, "aria-describedby": this.props.loading ? loadingMessage.loadingId : undefined, children: jsxRuntime.jsx("span", { className: "toggle", children: this.props.loading && (jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, "aria-hidden": "true" })) }) }), jsxRuntime.jsx("label", { id: "label", htmlFor: "switch", children: jsxRuntime.jsx("slot", {}) }), jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
27
27
|
}
|
|
@@ -4747,6 +4747,9 @@ const getComponentCss$14 = (theme, isSidebarStartOpen, isSidebarEndOpen) => {
|
|
|
4747
4747
|
},
|
|
4748
4748
|
...getFocusJssStyle(theme, { slotted: 'a' }),
|
|
4749
4749
|
},
|
|
4750
|
+
'&[name="sidebar-end-header"]': {
|
|
4751
|
+
display: 'block', // ensures header section of sidebar-end area is aligned correctly
|
|
4752
|
+
},
|
|
4750
4753
|
'&[name="background"]': {
|
|
4751
4754
|
zIndex: 3,
|
|
4752
4755
|
display: 'block',
|
|
@@ -5004,7 +5007,7 @@ const getComponentCss$14 = (theme, isSidebarStartOpen, isSidebarEndOpen) => {
|
|
|
5004
5007
|
},
|
|
5005
5008
|
},
|
|
5006
5009
|
'&--end': {
|
|
5007
|
-
justifyContent: '
|
|
5010
|
+
justifyContent: 'space-between',
|
|
5008
5011
|
'&::before': {
|
|
5009
5012
|
background: `linear-gradient(180deg,var(${cssVarColorBackgroundBase}) 0%,var(${cssVarColorBackgroundBase}) 65%,transparent 100%)`,
|
|
5010
5013
|
},
|
|
@@ -7187,7 +7190,9 @@ const keyFramesDark = 'rerender-dark';
|
|
|
7187
7190
|
const cssVariableFilter = '--p-internal-icon-filter';
|
|
7188
7191
|
const isFlippableIcon = (name, source) => {
|
|
7189
7192
|
return (!source &&
|
|
7190
|
-
(name === 'arrow-
|
|
7193
|
+
(name === 'arrow-compact-left' ||
|
|
7194
|
+
name === 'arrow-compact-right' ||
|
|
7195
|
+
name === 'arrow-double-left' ||
|
|
7191
7196
|
name === 'arrow-double-right' ||
|
|
7192
7197
|
name === 'arrow-first' ||
|
|
7193
7198
|
name === 'arrow-head-left' ||
|
|
@@ -7201,6 +7206,7 @@ const isFlippableIcon = (name, source) => {
|
|
|
7201
7206
|
name === 'increase' ||
|
|
7202
7207
|
name === 'list' ||
|
|
7203
7208
|
name === 'logout' ||
|
|
7209
|
+
name === 'return' ||
|
|
7204
7210
|
name === 'send'));
|
|
7205
7211
|
};
|
|
7206
7212
|
const getComponentCss$N = (name, source, color, size, theme) => {
|
|
@@ -8485,6 +8491,8 @@ const getListStyles$2 = (isOpen, direction, theme) => {
|
|
|
8485
8491
|
};
|
|
8486
8492
|
|
|
8487
8493
|
const cssVariableSelectPaddingInlineStart = '--p-internal-select-option-padding-left';
|
|
8494
|
+
const cssVarInternalSelectOptionScaling = '--p-internal-select-option-scaling';
|
|
8495
|
+
const scalingVar$1 = `var(${cssVarInternalSelectOptionScaling}, 1)`;
|
|
8488
8496
|
// TODO: Enforce order of slotted text, img
|
|
8489
8497
|
const getComponentCss$B = (theme) => {
|
|
8490
8498
|
return getCss({
|
|
@@ -8514,14 +8522,17 @@ const getOptionStyles = (theme) => {
|
|
|
8514
8522
|
const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
8515
8523
|
const { primaryColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor } = getThemedColors(theme);
|
|
8516
8524
|
const { highlightColor } = getHighContrastColors();
|
|
8525
|
+
const gap = `max(4px, ${scalingVar$1} * 12px)`;
|
|
8526
|
+
const paddingBlock = `max(2px, ${scalingVar$1} * ${spacingStaticSmall})`;
|
|
8527
|
+
const paddingInline = `max(4px, ${scalingVar$1} * var(${cssVariableSelectPaddingInlineStart}, 12px)) max(4px, ${scalingVar$1} * 12px)`;
|
|
8517
8528
|
return {
|
|
8518
8529
|
option: {
|
|
8519
8530
|
fontWeight: fontWeightRegular,
|
|
8520
8531
|
display: 'flex',
|
|
8521
|
-
gap
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
minHeight:
|
|
8532
|
+
gap,
|
|
8533
|
+
paddingBlock,
|
|
8534
|
+
paddingInline,
|
|
8535
|
+
minHeight: fontLineHeight, // preserves height for empty option
|
|
8525
8536
|
color: contrastHighColor,
|
|
8526
8537
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8527
8538
|
color: contrastHighColorDark,
|
|
@@ -8529,7 +8540,7 @@ const getOptionStyles = (theme) => {
|
|
|
8529
8540
|
cursor: 'pointer',
|
|
8530
8541
|
textAlign: 'start',
|
|
8531
8542
|
wordBreak: 'break-word',
|
|
8532
|
-
boxSizing: '
|
|
8543
|
+
boxSizing: 'content-box',
|
|
8533
8544
|
borderRadius: borderRadiusSmall,
|
|
8534
8545
|
transition: `${getTransition('background-color')}, ${getTransition('color')}`,
|
|
8535
8546
|
...getNoResultsOptionJssStyle(),
|
|
@@ -8577,6 +8588,8 @@ const getOptionStyles = (theme) => {
|
|
|
8577
8588
|
};
|
|
8578
8589
|
};
|
|
8579
8590
|
|
|
8591
|
+
const cssVarInternalOptgroupScaling = '--p-internal-optgroup-scaling';
|
|
8592
|
+
const scalingVar = `var(${cssVarInternalOptgroupScaling}, 1)`;
|
|
8580
8593
|
const getComponentCss$A = (isDisabled, theme) => getCss({
|
|
8581
8594
|
'@global': {
|
|
8582
8595
|
':host': addImportantToEachRule({
|
|
@@ -8593,11 +8606,13 @@ const getComponentCss$A = (isDisabled, theme) => getCss({
|
|
|
8593
8606
|
const getOptgroupStyles = (isDisabled, theme) => {
|
|
8594
8607
|
const { primaryColor, disabledColor } = getThemedColors(theme);
|
|
8595
8608
|
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark } = getThemedColors('dark');
|
|
8609
|
+
const gap = `max(2px, ${scalingVar} * ${spacingStaticSmall})`;
|
|
8610
|
+
const padding = `max(2px, ${scalingVar} * ${spacingStaticSmall}) max(4px, ${scalingVar} * 12px)`;
|
|
8596
8611
|
return {
|
|
8597
8612
|
optgroup: {
|
|
8598
8613
|
display: 'flex',
|
|
8599
8614
|
flexDirection: 'column',
|
|
8600
|
-
gap
|
|
8615
|
+
gap,
|
|
8601
8616
|
},
|
|
8602
8617
|
label: {
|
|
8603
8618
|
color: primaryColor,
|
|
@@ -8611,7 +8626,7 @@ const getOptgroupStyles = (isDisabled, theme) => {
|
|
|
8611
8626
|
}),
|
|
8612
8627
|
}),
|
|
8613
8628
|
display: 'block',
|
|
8614
|
-
padding
|
|
8629
|
+
padding,
|
|
8615
8630
|
fontSize: fontSizeTextXSmall,
|
|
8616
8631
|
fontWeight: fontWeightSemiBold,
|
|
8617
8632
|
},
|
|
@@ -9748,7 +9763,13 @@ const cssVarBorderColor = '--p-select-border-color';
|
|
|
9748
9763
|
const cssVarIconFilter = '--p-select-icon-filter';
|
|
9749
9764
|
const cssVarBackgroundColorFocus = '--p-select-focus-background-color';
|
|
9750
9765
|
const cssVarBorderColorFocus = '--p-select-focus-border-color';
|
|
9751
|
-
const
|
|
9766
|
+
const cssVarInternalSelectScaling = '--p-internal-select-scaling';
|
|
9767
|
+
const getComponentCss$q = (direction, isOpen, isDisabled, hideLabel, state, isNativePopoverCase, compact, theme, hasSlottedImage) => {
|
|
9768
|
+
// Determines the scaling factor for the select size. In "compact" mode, it uses 0.5 to achieve a 36px select (compact size).
|
|
9769
|
+
// Defaults to 1 for the standard size and can be overridden by the CSS variable `cssVarInternalSelectScaling`.
|
|
9770
|
+
const scalingVar = `var(${cssVarInternalSelectScaling}, ${compact ? 0.5 : 1})`;
|
|
9771
|
+
const gap = `max(2px, ${scalingVar} * ${spacingStaticXSmall})`;
|
|
9772
|
+
const gridTemplateColumns = `minmax(0, 1fr) auto auto calc(max(2px, ${scalingVar} * ${formElementLayeredGap}) + ${borderWidthBase})`;
|
|
9752
9773
|
return getCss({
|
|
9753
9774
|
'@global': {
|
|
9754
9775
|
':host': {
|
|
@@ -9758,20 +9779,23 @@ const getComponentCss$q = (direction, isOpen, isDisabled, hideLabel, state, isNa
|
|
|
9758
9779
|
...hostHiddenStyles,
|
|
9759
9780
|
}),
|
|
9760
9781
|
},
|
|
9782
|
+
'::slotted(*)': addImportantToEachRule({
|
|
9783
|
+
'--p-internal-select-option-scaling': scalingVar,
|
|
9784
|
+
'--p-internal-optgroup-scaling': scalingVar,
|
|
9785
|
+
}),
|
|
9761
9786
|
...preventFoucOfNestedElementsStyles,
|
|
9762
|
-
|
|
9763
|
-
button: getButtonStyles(isDisabled, direction, isOpen, state, theme, hasSlottedImage),
|
|
9787
|
+
button: getButtonStyles(isDisabled, direction, isOpen, state, compact, theme, hasSlottedImage),
|
|
9764
9788
|
},
|
|
9765
9789
|
root: {
|
|
9766
9790
|
display: 'grid',
|
|
9767
|
-
gap
|
|
9791
|
+
gap,
|
|
9768
9792
|
// min width is needed for showing at least 1 character in very narrow containers. The "1rem" value is the minimum safe zone to show at least 1 character plus the ellipsis dots.
|
|
9769
9793
|
minWidth: `calc(1rem + ${formElementPaddingHorizontal} + ${borderWidthBase} * 2 + ${getCalculatedFormElementPaddingHorizontal(1)})`,
|
|
9770
9794
|
},
|
|
9771
9795
|
wrapper: {
|
|
9772
9796
|
position: 'relative',
|
|
9773
9797
|
display: 'grid',
|
|
9774
|
-
gridTemplateColumns
|
|
9798
|
+
gridTemplateColumns,
|
|
9775
9799
|
},
|
|
9776
9800
|
icon: {
|
|
9777
9801
|
gridArea: '1/3',
|
|
@@ -9787,7 +9811,7 @@ const getComponentCss$q = (direction, isOpen, isDisabled, hideLabel, state, isNa
|
|
|
9787
9811
|
transform: 'rotate3d(0,0,1,180deg)',
|
|
9788
9812
|
},
|
|
9789
9813
|
},
|
|
9790
|
-
listbox: getListStyles(isOpen, direction, theme),
|
|
9814
|
+
listbox: getListStyles(isOpen, direction, compact, theme),
|
|
9791
9815
|
'sr-only': getHiddenTextJssStyle(),
|
|
9792
9816
|
// .label / .required
|
|
9793
9817
|
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
@@ -9802,11 +9826,16 @@ const getComponentCss$q = (direction, isOpen, isDisabled, hideLabel, state, isNa
|
|
|
9802
9826
|
};
|
|
9803
9827
|
// TODO: Rename to JSSStyles
|
|
9804
9828
|
// TODO: use getSlottedTextFieldTextareaSelectStyles() instead an manipulate selectors like done with PIN Code or even better make it configurable as parameter
|
|
9805
|
-
const getButtonStyles = (isDisabled, direction, isOpen, state, theme, hasSlottedImage) => {
|
|
9829
|
+
const getButtonStyles = (isDisabled, direction, isOpen, state, compact, theme, hasSlottedImage) => {
|
|
9806
9830
|
const { primaryColor, disabledColor, backgroundColor, contrastMediumColor } = getThemedColors(theme);
|
|
9807
9831
|
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, backgroundColor: backgroundColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
9808
9832
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
9809
9833
|
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
9834
|
+
const scalingVar = `var(${cssVarInternalSelectScaling}, ${compact ? 0.5 : 1})`;
|
|
9835
|
+
const height = `max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px))`;
|
|
9836
|
+
const paddingBlock = `max(2px, ${scalingVar} * ${formElementPaddingVertical})`;
|
|
9837
|
+
const paddingInline = `max(4px, ${scalingVar} * ${formElementPaddingHorizontal}) ${getCalculatedFormElementPaddingHorizontal(1)}`;
|
|
9838
|
+
const gap = `max(4px, ${scalingVar} * 12px)`;
|
|
9810
9839
|
return {
|
|
9811
9840
|
textAlign: 'start', // TODO: Newly added (rest is copied from select-wrapper-dropdown), share rest for both components
|
|
9812
9841
|
overflowX: 'hidden', // TODO: Newly added (rest is copied from select-wrapper-dropdown), share rest for both components
|
|
@@ -9814,12 +9843,12 @@ const getButtonStyles = (isDisabled, direction, isOpen, state, theme, hasSlotted
|
|
|
9814
9843
|
gridArea: '1/1/1/-1',
|
|
9815
9844
|
minWidth: 0,
|
|
9816
9845
|
// TODO: abstract and re-use for multi-select, select-wrapper and text-field-wrapper
|
|
9817
|
-
height
|
|
9846
|
+
height,
|
|
9818
9847
|
font: textSmallStyle.font.replace('ex', 'ex + 6px'), // a minimum line-height is needed for input, otherwise value is scrollable in Chrome, +6px is alig
|
|
9819
9848
|
margin: 0, // necessary reset for iOS Safari 15 (and maybe other browsers)
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
boxSizing: '
|
|
9849
|
+
paddingBlock,
|
|
9850
|
+
paddingInline,
|
|
9851
|
+
boxSizing: 'content-box',
|
|
9823
9852
|
outline: 0,
|
|
9824
9853
|
WebkitAppearance: 'none', // iOS safari
|
|
9825
9854
|
appearance: 'none',
|
|
@@ -9847,7 +9876,7 @@ const getButtonStyles = (isDisabled, direction, isOpen, state, theme, hasSlotted
|
|
|
9847
9876
|
...(hasSlottedImage && {
|
|
9848
9877
|
'& > span': {
|
|
9849
9878
|
display: 'flex',
|
|
9850
|
-
gap
|
|
9879
|
+
gap,
|
|
9851
9880
|
alignItems: 'center',
|
|
9852
9881
|
},
|
|
9853
9882
|
'& > span > span': {
|
|
@@ -9879,7 +9908,7 @@ const getButtonStyles = (isDisabled, direction, isOpen, state, theme, hasSlotted
|
|
|
9879
9908
|
},
|
|
9880
9909
|
}),
|
|
9881
9910
|
...(isOpen && {
|
|
9882
|
-
['paddingBottom' ]: `calc(${
|
|
9911
|
+
['paddingBottom' ]: `calc(${paddingBlock} + 1px)`, // Add padding to keep same height when border changes
|
|
9883
9912
|
['borderBottom' ]: addImportantToRule(`1px solid ${contrastMediumColor}`),
|
|
9884
9913
|
['borderBottomLeftRadius' ]: 0,
|
|
9885
9914
|
['borderBottomRightRadius' ]: 0,
|
|
@@ -9911,16 +9940,19 @@ const getButtonStyles = (isDisabled, direction, isOpen, state, theme, hasSlotted
|
|
|
9911
9940
|
};
|
|
9912
9941
|
// TODO: Rename to JSSStyles
|
|
9913
9942
|
// TODO: Copied from multi-select, extract and use in select and multi-select
|
|
9914
|
-
const getListStyles = (isOpen, direction, theme) => {
|
|
9943
|
+
const getListStyles = (isOpen, direction, compact, theme) => {
|
|
9915
9944
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
9916
9945
|
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
9946
|
+
const scalingVar = `var(${cssVarInternalSelectScaling}, ${compact ? 0.5 : 1})`;
|
|
9947
|
+
const gap = `max(2px, ${scalingVar} * ${spacingStaticSmall})`;
|
|
9948
|
+
const padding = `max(2px, ${scalingVar} * 6px)`;
|
|
9917
9949
|
return {
|
|
9918
9950
|
position: 'absolute',
|
|
9919
9951
|
margin: 0,
|
|
9920
9952
|
display: isOpen ? 'flex' : 'none',
|
|
9921
9953
|
flexDirection: 'column',
|
|
9922
|
-
gap
|
|
9923
|
-
padding
|
|
9954
|
+
gap,
|
|
9955
|
+
padding,
|
|
9924
9956
|
...textSmallStyle,
|
|
9925
9957
|
zIndex: 10,
|
|
9926
9958
|
// TODO: Inset inline 0
|
|
@@ -10212,6 +10244,7 @@ const getComponentCss$m = (size) => {
|
|
|
10212
10244
|
});
|
|
10213
10245
|
};
|
|
10214
10246
|
|
|
10247
|
+
const cssVarInternalSwitchScaling = '--p-internal-switch-scaling';
|
|
10215
10248
|
const getColors$1 = (checked, disabled, loading, theme) => {
|
|
10216
10249
|
const { primaryColor, contrastMediumColor, successColor, successColorDarken, disabledColor } = getThemedColors(theme);
|
|
10217
10250
|
const { backgroundColor: lightThemeBackgroundColor } = getThemedColors('light');
|
|
@@ -10240,11 +10273,24 @@ const getColors$1 = (checked, disabled, loading, theme) => {
|
|
|
10240
10273
|
textColor: disabledOrLoadingColor || primaryColor,
|
|
10241
10274
|
};
|
|
10242
10275
|
};
|
|
10243
|
-
const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, loading, theme) => {
|
|
10276
|
+
const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, loading, compact, theme) => {
|
|
10244
10277
|
const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, disabled, loading, theme);
|
|
10245
10278
|
const { buttonBorderColor: buttonBorderColorDark, buttonBorderColorHover: buttonBorderColorHoverDark, buttonBackgroundColor: buttonBackgroundColorDark, buttonBackgroundColorHover: buttonBackgroundColorHoverDark, toggleBackgroundColor: toggleBackgroundColorDark, toggleBackgroundColorHover: toggleBackgroundColorHoverDark, textColor: textColorDark, } = getColors$1(checked, disabled, loading, 'dark');
|
|
10246
|
-
const
|
|
10247
|
-
const
|
|
10279
|
+
const minimumTouchTargetSize = '24px'; // Minimum touch target size to comply with accessibility guidelines.
|
|
10280
|
+
const scalingVar = `var(${cssVarInternalSwitchScaling}, ${compact ? 0.6668 : 1})`;
|
|
10281
|
+
// Determines the scaling factor for the switch size. In "compact" mode, it uses 0.6668 to achieve a 20px switch (compact size).
|
|
10282
|
+
// Defaults to 1 for the standard size and can be overridden by the CSS variable `cssVarInternalSwitchScaling`.
|
|
10283
|
+
const dimension = `calc(max(${SCALING_BASE_VALUE} * 0.75, ${scalingVar} * ${fontLineHeight}))`;
|
|
10284
|
+
// Calculates the switch size and ensures a minimum size of 12px (0.75 * SCALING_BASE_VALUE).
|
|
10285
|
+
// Scales proportionally with the line height and the scaling factor.
|
|
10286
|
+
const dimensionFull = `calc(${dimension} + ${borderWidthBase} * 2)`; // Calculates the total size of the switch including its borders.
|
|
10287
|
+
const touchTargetSizeDiff = `calc(${minimumTouchTargetSize} - ${dimensionFull})`; // Difference between the minimum touch target size and the switch full size.
|
|
10288
|
+
const gap = `max(${spacingStaticXSmall}, calc(${spacingStaticSmall} - (max(0px, ${touchTargetSizeDiff}))))`;
|
|
10289
|
+
// Adjusts padding to maintain consistent spacing when the switch is smaller than the minimum touch target size.
|
|
10290
|
+
// Uses asymmetric padding instead of `gap` to ensure there is no non-clickable area between the label and the input.
|
|
10291
|
+
const marginTop = `max(0px, calc((${fontLineHeight} - ${dimensionFull}) / 2))`; // Vertically centers the switch label relative to the switch size (depending on which is smaller).
|
|
10292
|
+
const paddingTop = `max(0px, calc((${dimensionFull} - ${fontLineHeight}) / 2))`; // Vertically centers the switch label relative to the switch size (depending on which is smaller).
|
|
10293
|
+
const inset = `calc(-${borderWidthBase} - max(0px, ${touchTargetSizeDiff} / 2))`; // Positions the switch ::before pseudo-element with a negative offset to align it with the touch target.
|
|
10248
10294
|
return getCss({
|
|
10249
10295
|
'@global': {
|
|
10250
10296
|
':host': {
|
|
@@ -10253,7 +10299,8 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
10253
10299
|
})),
|
|
10254
10300
|
...addImportantToEachRule({
|
|
10255
10301
|
outline: 0, // custom element is able to delegate the focus
|
|
10256
|
-
|
|
10302
|
+
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct gap definition based on ex-unit
|
|
10303
|
+
gap,
|
|
10257
10304
|
...colorSchemeStyles,
|
|
10258
10305
|
...hostHiddenStyles,
|
|
10259
10306
|
...buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
@@ -10265,15 +10312,16 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
10265
10312
|
},
|
|
10266
10313
|
...preventFoucOfNestedElementsStyles,
|
|
10267
10314
|
button: {
|
|
10315
|
+
position: 'relative', // ensures relative positioning for ::before pseudo element
|
|
10268
10316
|
display: 'flex',
|
|
10269
10317
|
alignItems: 'center',
|
|
10270
10318
|
flexShrink: 0,
|
|
10271
|
-
width: `calc(${
|
|
10272
|
-
height:
|
|
10319
|
+
width: `calc(${dimension} * 2 - ${borderWidthBase} * 2)`,
|
|
10320
|
+
height: dimension,
|
|
10273
10321
|
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
10274
10322
|
boxSizing: 'content-box',
|
|
10275
10323
|
border: `${borderWidthBase} solid ${buttonBorderColor}`,
|
|
10276
|
-
borderRadius: `calc((${
|
|
10324
|
+
borderRadius: `calc((${dimension} + ${borderWidthBase} * 2) / 2)`,
|
|
10277
10325
|
backgroundColor: buttonBackgroundColor,
|
|
10278
10326
|
cursor: isDisabledOrLoading(disabled, loading) ? 'not-allowed' : 'pointer',
|
|
10279
10327
|
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
@@ -10283,6 +10331,7 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
10283
10331
|
}),
|
|
10284
10332
|
margin: 0, // Removes default button margin on safari 15
|
|
10285
10333
|
padding: 0,
|
|
10334
|
+
marginTop,
|
|
10286
10335
|
WebkitAppearance: 'none', // iOS safari
|
|
10287
10336
|
appearance: 'none',
|
|
10288
10337
|
...(!isDisabledOrLoading(disabled, loading) &&
|
|
@@ -10303,6 +10352,13 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
10303
10352
|
},
|
|
10304
10353
|
})),
|
|
10305
10354
|
...getFocusJssStyle(theme),
|
|
10355
|
+
'&::before': {
|
|
10356
|
+
// Ensures the touch target is at least 24px, even if the switch is smaller than the minimum touch target size.
|
|
10357
|
+
// This pseudo-element expands the clickable area without affecting the visual size of the switch itself.
|
|
10358
|
+
content: '""',
|
|
10359
|
+
position: 'absolute',
|
|
10360
|
+
inset,
|
|
10361
|
+
},
|
|
10306
10362
|
},
|
|
10307
10363
|
label: {
|
|
10308
10364
|
...textSmallStyle,
|
|
@@ -10317,22 +10373,22 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
10317
10373
|
// TODO: we should remove 'left' here and map the value in the component class already to 'start' but might be difficult due to breakpoint customizable prop value
|
|
10318
10374
|
order: alignLabelValue === 'left' || alignLabelValue === 'start' ? -1 : 0,
|
|
10319
10375
|
})), buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, {
|
|
10320
|
-
paddingTop
|
|
10376
|
+
paddingTop,
|
|
10321
10377
|
}))),
|
|
10322
10378
|
},
|
|
10323
10379
|
},
|
|
10324
10380
|
toggle: {
|
|
10325
10381
|
display: 'flex',
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
width: `calc(${
|
|
10329
|
-
height: `calc(${
|
|
10382
|
+
placeItems: 'center',
|
|
10383
|
+
placeContent: 'center',
|
|
10384
|
+
width: `calc(${dimension} - ${borderWidthBase} * 2)`,
|
|
10385
|
+
height: `calc(${dimension} - ${borderWidthBase} * 2)`,
|
|
10330
10386
|
borderRadius: '50%',
|
|
10331
10387
|
backgroundColor: toggleBackgroundColor,
|
|
10332
10388
|
transition: `${getTransition('background-color')}, ${getTransition('transform')}`,
|
|
10333
|
-
transform: `translate3d(${checked ?
|
|
10389
|
+
transform: `translate3d(${checked ? `calc(100% + ${borderWidthBase})` : borderWidthBase}, 0, 0)`,
|
|
10334
10390
|
'&:dir(rtl)': {
|
|
10335
|
-
transform: `translate3d(${checked ?
|
|
10391
|
+
transform: `translate3d(calc(${checked ? `calc(100% + ${borderWidthBase})` : borderWidthBase} * -1), 0, 0)`,
|
|
10336
10392
|
},
|
|
10337
10393
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
10338
10394
|
backgroundColor: toggleBackgroundColorDark,
|
|
@@ -10340,8 +10396,8 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
10340
10396
|
},
|
|
10341
10397
|
...(loading && {
|
|
10342
10398
|
spinner: {
|
|
10343
|
-
width:
|
|
10344
|
-
height:
|
|
10399
|
+
width: dimensionFull,
|
|
10400
|
+
height: dimensionFull,
|
|
10345
10401
|
},
|
|
10346
10402
|
}),
|
|
10347
10403
|
// .loading
|
|
@@ -10947,6 +11003,7 @@ const showCustomCalendarOrTimeIndicator = (isCalendar, isTime) => {
|
|
|
10947
11003
|
|
|
10948
11004
|
const cssVariableInputPaddingStart = '--p-internal-text-field-input-padding-start';
|
|
10949
11005
|
const cssVariableInputPaddingEnd = '--p-internal-text-field-input-padding-end';
|
|
11006
|
+
const cssVarInternalTextFieldScaling = '--p-internal-text-field-scaling';
|
|
10950
11007
|
const getComponentCss$8 = (isDisabled, isReadonly, hideLabel, state, hasUnitOrVisibleCounter, unitPosition, inputType, showPasswordToggle, isWithinForm, hasSubmitButton, theme, unitLength) => {
|
|
10951
11008
|
const isSearch = isType(inputType, 'search');
|
|
10952
11009
|
const isPassword = isType(inputType, 'password');
|
|
@@ -10960,6 +11017,12 @@ const getComponentCss$8 = (isDisabled, isReadonly, hideLabel, state, hasUnitOrVi
|
|
|
10960
11017
|
const counterCharacterLengthCssVar = 'var(--p-internal-counter-character-length)';
|
|
10961
11018
|
const paddingInlineIfUnitOrCounter = hasUnitOrVisibleCounter &&
|
|
10962
11019
|
`calc(${formElementLayeredGap} + ${formElementPaddingHorizontal} + ${borderWidthBase} + ${counterCharacterLengthCssVar} * 1ch * log(2.6))`;
|
|
11020
|
+
// Determines the scaling factor for the text field size. In "compact" mode, it uses 0.5 to achieve a 36px text field (compact size).
|
|
11021
|
+
// Defaults to 1 for the standard size and can be overridden by the CSS variable `cssVarInternalTextFieldScaling`.
|
|
11022
|
+
const scalingVar = `var(${cssVarInternalTextFieldScaling}, 1)`;
|
|
11023
|
+
const paddingBlock = `max(2px, ${formElementPaddingVertical} * ${scalingVar})`;
|
|
11024
|
+
const paddingInline = `max(4px, ${formElementPaddingHorizontal} * ${scalingVar})`;
|
|
11025
|
+
const height = `max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px))`;
|
|
10963
11026
|
return getCss({
|
|
10964
11027
|
'@global': {
|
|
10965
11028
|
':host': {
|
|
@@ -10974,7 +11037,11 @@ const getComponentCss$8 = (isDisabled, isReadonly, hideLabel, state, hasUnitOrVi
|
|
|
10974
11037
|
...addImportantToEachRule({
|
|
10975
11038
|
...getSlottedTextFieldTextareaSelectStyles('input', state, false, theme, {
|
|
10976
11039
|
gridArea: '1/1/1/-1',
|
|
10977
|
-
|
|
11040
|
+
paddingBlock,
|
|
11041
|
+
paddingInline,
|
|
11042
|
+
width: 'auto',
|
|
11043
|
+
height,
|
|
11044
|
+
boxSizing: 'content-box',
|
|
10978
11045
|
paddingInlineStart: hasUnitOrVisibleCounter && unitPosition === 'prefix'
|
|
10979
11046
|
? paddingInlineIfUnitOrCounter
|
|
10980
11047
|
: `var(${cssVariableInputPaddingStart})`, // iOS Safari 14.5 can't handle padding-inline shorthand with css variables
|
|
@@ -11010,10 +11077,10 @@ const getComponentCss$8 = (isDisabled, isReadonly, hideLabel, state, hasUnitOrVi
|
|
|
11010
11077
|
root: {
|
|
11011
11078
|
[cssVariableInputPaddingStart]: isSearchWithoutFormOrSubmitButton
|
|
11012
11079
|
? getCalculatedFormElementPaddingHorizontal(1)
|
|
11013
|
-
:
|
|
11080
|
+
: paddingInline,
|
|
11014
11081
|
[cssVariableInputPaddingEnd]: isSearchOrPassword || isCalendarOrTimeWithCustomIndicator
|
|
11015
11082
|
? getCalculatedFormElementPaddingHorizontal(isSearchWithForm && hasSubmitButton ? 2 : 1)
|
|
11016
|
-
:
|
|
11083
|
+
: paddingInline,
|
|
11017
11084
|
display: 'grid',
|
|
11018
11085
|
gap: spacingStaticXSmall,
|
|
11019
11086
|
// min width is needed for showing at least 1 character in very narrow containers. The "2rem" value is the minimum safe zone to show at least 1 character plus the ellipsis dots.
|
|
@@ -3458,7 +3458,7 @@ const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-des
|
|
|
3458
3458
|
var CRESTS_MANIFEST = { "porscheCrest": { "1x": { "png": "porsche-crest.d76137c@1x.png", "webp": "porsche-crest.0d0cc89@1x.webp" }, "2x": { "png": "porsche-crest.8a292fb@2x.png", "webp": "porsche-crest.2245c45@2x.webp" }, "3x": { "png": "porsche-crest.18d6f02@3x.png", "webp": "porsche-crest.19b4292@3x.webp" } } };
|
|
3459
3459
|
|
|
3460
3460
|
// index.ts
|
|
3461
|
-
var ICONS_MANIFEST = { "360": "360.0600731.svg", "accessibility": "accessibility.087d747.svg", "active-cabin-ventilation": "active-cabin-ventilation.b081399.svg", "add": "add.fac861a.svg", "adjust": "adjust.ca46bd4.svg", "arrow-double-down": "arrow-double-down.61ae4d7.svg", "arrow-double-left": "arrow-double-left.1b576eb.svg", "arrow-double-right": "arrow-double-right.dcfabff.svg", "arrow-double-up": "arrow-double-up.fb73db5.svg", "arrow-down": "arrow-down.49c6983.svg", "arrow-first": "arrow-first.beb7d9f.svg", "arrow-head-down": "arrow-head-down.1e3cbb8.svg", "arrow-head-left": "arrow-head-left.cf1395d.svg", "arrow-head-right": "arrow-head-right.304b330.svg", "arrow-head-up": "arrow-head-up.6d3fd23.svg", "arrow-last": "arrow-last.cc24903.svg", "arrow-left": "arrow-left.e03c25b.svg", "arrow-right": "arrow-right.872716b.svg", "arrow-up": "arrow-up.9d294d1.svg", "attachment": "attachment.8f3dd0a.svg", "augmented-reality": "augmented-reality.8b6ce95.svg", "battery-empty": "battery-empty.38b4b15.svg", "battery-empty-co2": "battery-empty-co2.c4cabef.svg", "battery-empty-fuel": "battery-empty-fuel.e833e13.svg", "battery-full": "battery-full.03de75d.svg", "bell": "bell.1eab3a2.svg", "bookmark": "bookmark.9d6982f.svg", "bookmark-filled": "bookmark-filled.327ac78.svg", "broadcast": "broadcast.0ad5a15.svg", "calculator": "calculator.a323a2d.svg", "calendar": "calendar.70a6a12.svg", "camera": "camera.e5e95b9.svg", "car": "car.35229c9.svg", "car-battery": "car-battery.895510f.svg", "card": "card.f284448.svg", "charging-active": "charging-active.c3aa214.svg", "charging-state": "charging-state.f56d8df.svg", "charging-station": "charging-station.5ff1ed4.svg", "chart": "chart.c8c32d2.svg", "chat": "chat.7945544.svg", "check": "check.8ba06be.svg", "city": "city.5ae672c.svg", "climate": "climate.a9d5818.svg", "climate-control": "climate-control.ce31939.svg", "clock": "clock.c88a1ef.svg", "close": "close.eec3c5d.svg", "closed-caption": "closed-caption.ceaf6cb.svg", "co2-class": "co2-class.fc49211.svg", "co2-emission": "co2-emission.c42e7f8.svg", "compare": "compare.6578829.svg", "configurate": "configurate.5311c8d.svg", "copy": "copy.0fcd086.svg", "country-road": "country-road.d2bbc5a.svg", "cubic-capacity": "cubic-capacity.7b0b8c8.svg", "delete": "delete.5a8c8ca.svg", "disable": "disable.5918c32.svg", "dislike": "dislike.51614b0.svg", "dislike-filled": "dislike-filled.e1a8c4d.svg", "document": "document.df36b6c.svg", "download": "download.c06f455.svg", "duration": "duration.94e5252.svg", "edit": "edit.330f321.svg", "email": "email.f2530de.svg", "error-filled": "error-filled.a4d06ed.svg", "exclamation": "exclamation.46cd17b.svg", "external": "external.fb677b9.svg", "filter": "filter.610f808.svg", "fingerprint": "fingerprint.6a85170.svg", "flash": "flash.88a2ada.svg", "fuel-station": "fuel-station.f7bdf51.svg", "garage": "garage.5014e8d.svg", "gift": "gift.7beb1eb.svg", "globe": "globe.56cc8fc.svg", "grid": "grid.06bc31a.svg", "heart": "heart.9a5962e.svg", "heart-filled": "heart-filled.dd7decf.svg", "highway": "highway.b7c0a70.svg", "home": "home.7b1d1da.svg", "horn": "horn.bf47b1a.svg", "image": "image.b2614f0.svg", "increase": "increase.700012f.svg", "information": "information.da41162.svg", "information-filled": "information-filled.8f08911.svg", "key": "key.ee5d89b.svg", "leaf": "leaf.92ca6a6.svg", "leather": "leather.1d2769a.svg", "light": "light.f0eb8e4.svg", "like": "like.a7468cd.svg", "like-filled": "like-filled.a0126c1.svg", "list": "list.411dd00.svg", "locate": "locate.6554f9e.svg", "lock": "lock.243281a.svg", "lock-open": "lock-open.95803d2.svg", "logo-apple-podcast": "logo-apple-podcast.09be038.svg", "logo-baidu": "logo-baidu.9e89c7d.svg", "logo-delicious": "logo-delicious.e83f574.svg", "logo-digg": "logo-digg.f096670.svg", "logo-facebook": "logo-facebook.74abe88.svg", "logo-foursquare": "logo-foursquare.d638fd8.svg", "logo-gmail": "logo-gmail.5f96ee2.svg", "logo-google": "logo-google.1dee423.svg", "logo-hatena": "logo-hatena.da509f0.svg", "logo-instagram": "logo-instagram.b916daa.svg", "logo-kaixin": "logo-kaixin.b1211a2.svg", "logo-kakaotalk": "logo-kakaotalk.38f5396.svg", "logo-linkedin": "logo-linkedin.b72559f.svg", "logo-naver": "logo-naver.75588fe.svg", "logo-pinterest": "logo-pinterest.e8f6963.svg", "logo-qq": "logo-qq.6d9b6d9.svg", "logo-qq-share": "logo-qq-share.ee864d9.svg", "logo-reddit": "logo-reddit.da13e44.svg", "logo-skyrock": "logo-skyrock.eb2f28d.svg", "logo-sohu": "logo-sohu.a30c66b.svg", "logo-spotify": "logo-spotify.2ec4b2d.svg", "logo-tecent": "logo-tecent.d119e85.svg", "logo-telegram": "logo-telegram.d151481.svg", "logo-tiktok": "logo-tiktok.2f3a465.svg", "logo-tumblr": "logo-tumblr.c689f44.svg", "logo-twitter": "logo-twitter.5f2490a.svg", "logo-viber": "logo-viber.198bd43.svg", "logo-vk": "logo-vk.37b94e0.svg", "logo-wechat": "logo-wechat.83b2b98.svg", "logo-weibo": "logo-weibo.c8dacee.svg", "logo-whatsapp": "logo-whatsapp.add9a6d.svg", "logo-x": "logo-x.5f2490a.svg", "logo-xing": "logo-xing.3a8df0f.svg", "logo-yahoo": "logo-yahoo.8cbd0ba.svg", "logo-youku": "logo-youku.fe988d0.svg", "logo-youtube": "logo-youtube.da3798f.svg", "logout": "logout.7ec7451.svg", "map": "map.c16f618.svg", "menu-dots-horizontal": "menu-dots-horizontal.788f7fa.svg", "menu-dots-vertical": "menu-dots-vertical.4970a65.svg", "menu-lines": "menu-lines.e332216.svg", "minus": "minus.f6d964c.svg", "mobile": "mobile.7f35446.svg", "moon": "moon.5b73246.svg", "new-chat": "new-chat.95ffd2e.svg", "oil-can": "oil-can.cb58fc7.svg", "parking-brake": "parking-brake.45704bd.svg", "parking-light": "parking-light.c49a231.svg", "pause": "pause.e41b935.svg", "phone": "phone.f4f774b.svg", "pin": "pin.3417cec.svg", "pin-filled": "pin-filled.7b8e9ba.svg", "play": "play.24226d4.svg", "plug": "plug.c159935.svg", "plus": "plus.319993e.svg", "preheating": "preheating.e2a796f.svg", "printer": "printer.f59b0ee.svg", "purchase": "purchase.9cd6d65.svg", "push-pin": "push-pin.89e4ead.svg", "push-pin-off": "push-pin-off.ba99213.svg", "qr": "qr.87a49a3.svg", "question": "question.3402a63.svg", "racing-flag": "racing-flag.b7ddcc8.svg", "refresh": "refresh.41fd868.svg", "replay": "replay.55a99f2.svg", "reset": "reset.e53d52f.svg", "roof-closed": "roof-closed.018d021.svg", "roof-open": "roof-open.51c8ee6.svg", "route": "route.f4fbbb4.svg", "rss": "rss.0e77baf.svg", "save": "save.6171ff5.svg", "screen": "screen.420be15.svg", "search": "search.3f0f1ce.svg", "send": "send.b32099c.svg", "share": "share.a0b30da.svg", "shopping-bag": "shopping-bag.3f91a9b.svg", "shopping-bag-filled": "shopping-bag-filled.abf6c98.svg", "shopping-cart": "shopping-cart.370e224.svg", "shopping-cart-filled": "shopping-cart-filled.e0c3a65.svg", "sidebar": "sidebar.8e43896.svg", "sidelights": "sidelights.65c9dd9.svg", "snowflake": "snowflake.83907b3.svg", "sort": "sort.92b50bd.svg", "stack": "stack.804af93.svg", "star": "star.4c5bb15.svg", "star-filled": "star-filled.84ef2f6.svg", "steering-wheel": "steering-wheel.4dea19e.svg", "stopwatch": "stopwatch.0e048a4.svg", "subtract": "subtract.57eed1d.svg", "success": "success.b16d4c1.svg", "success-filled": "success-filled.1832d98.svg", "sun": "sun.4301cbd.svg", "switch": "switch.66f74c4.svg", "tablet": "tablet.07341ac.svg", "tachometer": "tachometer.3a2fc3c.svg", "tire": "tire.e5c9372.svg", "truck": "truck.2c26c04.svg", "upload": "upload.d1f5a2a.svg", "user": "user.c18dabe.svg", "user-filled": "user-filled.2ea646d.svg", "user-group": "user-group.79cdf86.svg", "user-manual": "user-manual.470e243.svg", "video": "video.7590689.svg", "view": "view.5b4d7f6.svg", "view-off": "view-off.a4ede54.svg", "volume-off": "volume-off.bcd49e7.svg", "volume-up": "volume-up.2084f60.svg", "warning": "warning.59927e6.svg", "warning-filled": "warning-filled.1f6fe21.svg", "weight": "weight.b57a60d.svg", "wifi": "wifi.e2a8d9c.svg", "work": "work.9dd71a4.svg", "wrench": "wrench.09a2a67.svg", "wrenches": "wrenches.d2ed45d.svg", "zoom-in": "zoom-in.ff299b8.svg", "zoom-out": "zoom-out.ebb6246.svg" };
|
|
3461
|
+
var ICONS_MANIFEST = { "360": "360.0600731.svg", "4-wheel-drive": "4-wheel-drive.9c218bf.svg", "accessibility": "accessibility.087d747.svg", "active-cabin-ventilation": "active-cabin-ventilation.b081399.svg", "add": "add.fac861a.svg", "adjust": "adjust.ca46bd4.svg", "aggregation": "aggregation.96f06e5.svg", "arrow-compact-down": "arrow-compact-down.9b37afe.svg", "arrow-compact-left": "arrow-compact-left.7169de6.svg", "arrow-compact-right": "arrow-compact-right.cc2d1d2.svg", "arrow-compact-up": "arrow-compact-up.36724bb.svg", "arrow-double-down": "arrow-double-down.61ae4d7.svg", "arrow-double-left": "arrow-double-left.1b576eb.svg", "arrow-double-right": "arrow-double-right.dcfabff.svg", "arrow-double-up": "arrow-double-up.fb73db5.svg", "arrow-down": "arrow-down.49c6983.svg", "arrow-first": "arrow-first.beb7d9f.svg", "arrow-head-down": "arrow-head-down.1e3cbb8.svg", "arrow-head-left": "arrow-head-left.cf1395d.svg", "arrow-head-right": "arrow-head-right.304b330.svg", "arrow-head-up": "arrow-head-up.6d3fd23.svg", "arrow-last": "arrow-last.cc24903.svg", "arrow-left": "arrow-left.e03c25b.svg", "arrow-right": "arrow-right.872716b.svg", "arrow-up": "arrow-up.9d294d1.svg", "arrows": "arrows.de040f9.svg", "attachment": "attachment.8f3dd0a.svg", "augmented-reality": "augmented-reality.8b6ce95.svg", "battery-empty": "battery-empty.38b4b15.svg", "battery-empty-co2": "battery-empty-co2.c4cabef.svg", "battery-empty-fuel": "battery-empty-fuel.e833e13.svg", "battery-full": "battery-full.03de75d.svg", "battery-half": "battery-half.11f1ef8.svg", "battery-one-quarter": "battery-one-quarter.91235a0.svg", "battery-three-quarters": "battery-three-quarters.dcf768f.svg", "bell": "bell.1eab3a2.svg", "bookmark": "bookmark.9d6982f.svg", "bookmark-filled": "bookmark-filled.327ac78.svg", "brain": "brain.838387a.svg", "broadcast": "broadcast.0ad5a15.svg", "cabriolet": "cabriolet.ab33aab.svg", "calculator": "calculator.a323a2d.svg", "calendar": "calendar.70a6a12.svg", "camera": "camera.e5e95b9.svg", "car": "car.35229c9.svg", "car-battery": "car-battery.895510f.svg", "card": "card.f284448.svg", "charging-active": "charging-active.c3aa214.svg", "charging-network": "charging-network.a40072f.svg", "charging-state": "charging-state.f56d8df.svg", "charging-station": "charging-station.5ff1ed4.svg", "chart": "chart.c8c32d2.svg", "chat": "chat.7945544.svg", "check": "check.8ba06be.svg", "city": "city.5ae672c.svg", "climate": "climate.a9d5818.svg", "climate-control": "climate-control.ce31939.svg", "clock": "clock.c88a1ef.svg", "close": "close.eec3c5d.svg", "closed-caption": "closed-caption.ceaf6cb.svg", "cloud": "cloud.2c3959e.svg", "co2-class": "co2-class.fc49211.svg", "co2-emission": "co2-emission.c42e7f8.svg", "color-picker": "color-picker.598f402.svg", "compare": "compare.6578829.svg", "compass": "compass.f90f319.svg", "configurate": "configurate.5311c8d.svg", "copy": "copy.0fcd086.svg", "country-road": "country-road.d2bbc5a.svg", "coupe": "coupe.7549e3e.svg", "cubic-capacity": "cubic-capacity.7b0b8c8.svg", "cut": "cut.851e5c2.svg", "delete": "delete.5a8c8ca.svg", "disable": "disable.5918c32.svg", "dislike": "dislike.51614b0.svg", "dislike-filled": "dislike-filled.e1a8c4d.svg", "document": "document.df36b6c.svg", "door": "door.61c32d6.svg", "download": "download.c06f455.svg", "drag": "drag.9e893fd.svg", "duration": "duration.94e5252.svg", "ear": "ear.27a802f.svg", "edit": "edit.330f321.svg", "email": "email.f2530de.svg", "error": "error.b8ae9ad.svg", "error-filled": "error-filled.a4d06ed.svg", "exclamation": "exclamation.46cd17b.svg", "exclamation-filled": "exclamation-filled.9d09ed1.svg", "external": "external.fb677b9.svg", "fast-backward": "fast-backward.a71faae.svg", "fast-forward": "fast-forward.1e6fa9f.svg", "file-csv": "file-csv.4140e24.svg", "file-excel": "file-excel.56d577d.svg", "filter": "filter.610f808.svg", "fingerprint": "fingerprint.6a85170.svg", "flag": "flag.7af5baf.svg", "flash": "flash.88a2ada.svg", "fuel-station": "fuel-station.f7bdf51.svg", "garage": "garage.5014e8d.svg", "genuine-parts": "genuine-parts.6bfddde.svg", "geo-localization": "geo-localization.516d603.svg", "gift": "gift.7beb1eb.svg", "globe": "globe.56cc8fc.svg", "grid": "grid.06bc31a.svg", "grip": "grip.5ec4289.svg", "group": "group.051436a.svg", "hand": "hand.4e85714.svg", "heart": "heart.9a5962e.svg", "heart-filled": "heart-filled.dd7decf.svg", "highway": "highway.bf0eb24.svg", "highway-filled": "highway-filled.38e93fb.svg", "history": "history.f09645c.svg", "home": "home.7b1d1da.svg", "horn": "horn.bf47b1a.svg", "image": "image.b2614f0.svg", "increase": "increase.700012f.svg", "information": "information.da41162.svg", "information-filled": "information-filled.8f08911.svg", "key": "key.ee5d89b.svg", "laptop": "laptop.c422480.svg", "leaf": "leaf.92ca6a6.svg", "leather": "leather.1d2769a.svg", "light": "light.f0eb8e4.svg", "like": "like.a7468cd.svg", "like-filled": "like-filled.a0126c1.svg", "limousine": "limousine.87799d5.svg", "linked": "linked.8f30cb5.svg", "list": "list.411dd00.svg", "locate": "locate.6554f9e.svg", "lock": "lock.243281a.svg", "lock-open": "lock-open.95803d2.svg", "logo-apple-carplay": "logo-apple-carplay.c872af9.svg", "logo-apple-music": "logo-apple-music.1395f37.svg", "logo-apple-podcast": "logo-apple-podcast.09be038.svg", "logo-baidu": "logo-baidu.9e89c7d.svg", "logo-delicious": "logo-delicious.e83f574.svg", "logo-digg": "logo-digg.f096670.svg", "logo-facebook": "logo-facebook.74abe88.svg", "logo-foursquare": "logo-foursquare.d638fd8.svg", "logo-gmail": "logo-gmail.5f96ee2.svg", "logo-google": "logo-google.1dee423.svg", "logo-hatena": "logo-hatena.da509f0.svg", "logo-instagram": "logo-instagram.b916daa.svg", "logo-kaixin": "logo-kaixin.b1211a2.svg", "logo-kakaotalk": "logo-kakaotalk.38f5396.svg", "logo-kununu": "logo-kununu.79344ff.svg", "logo-linkedin": "logo-linkedin.b72559f.svg", "logo-naver": "logo-naver.75588fe.svg", "logo-pinterest": "logo-pinterest.e8f6963.svg", "logo-qq": "logo-qq.6d9b6d9.svg", "logo-qq-share": "logo-qq-share.ee864d9.svg", "logo-reddit": "logo-reddit.da13e44.svg", "logo-skyrock": "logo-skyrock.eb2f28d.svg", "logo-snapchat": "logo-snapchat.ef706a2.svg", "logo-sohu": "logo-sohu.a30c66b.svg", "logo-spotify": "logo-spotify.2ec4b2d.svg", "logo-tecent": "logo-tecent.d119e85.svg", "logo-telegram": "logo-telegram.d151481.svg", "logo-tiktok": "logo-tiktok.2f3a465.svg", "logo-tumblr": "logo-tumblr.c689f44.svg", "logo-twitter": "logo-twitter.5f2490a.svg", "logo-viber": "logo-viber.198bd43.svg", "logo-vk": "logo-vk.37b94e0.svg", "logo-wechat": "logo-wechat.83b2b98.svg", "logo-weibo": "logo-weibo.c8dacee.svg", "logo-whatsapp": "logo-whatsapp.add9a6d.svg", "logo-x": "logo-x.5f2490a.svg", "logo-xing": "logo-xing.3a8df0f.svg", "logo-yahoo": "logo-yahoo.8cbd0ba.svg", "logo-youku": "logo-youku.fe988d0.svg", "logo-youtube": "logo-youtube.da3798f.svg", "logout": "logout.7ec7451.svg", "map": "map.c16f618.svg", "menu-dots-horizontal": "menu-dots-horizontal.788f7fa.svg", "menu-dots-vertical": "menu-dots-vertical.4970a65.svg", "menu-lines": "menu-lines.e332216.svg", "microphone": "microphone.8ecdce6.svg", "minus": "minus.f6d964c.svg", "mobile": "mobile.7f35446.svg", "moon": "moon.5b73246.svg", "new-chat": "new-chat.95ffd2e.svg", "news": "news.5b604b0.svg", "north-arrow": "north-arrow.2da1dbe.svg", "oil-can": "oil-can.cb58fc7.svg", "online-search": "online-search.90e9ab1.svg", "parking-brake": "parking-brake.45704bd.svg", "parking-light": "parking-light.c49a231.svg", "paste": "paste.dd60261.svg", "pause": "pause.e41b935.svg", "phone": "phone.f4f774b.svg", "pin": "pin.3417cec.svg", "pin-filled": "pin-filled.7b8e9ba.svg", "pivot": "pivot.3ae18b8.svg", "play": "play.24226d4.svg", "plug": "plug.c159935.svg", "plus": "plus.319993e.svg", "preheating": "preheating.e2a796f.svg", "price-tag": "price-tag.f0d3917.svg", "printer": "printer.f59b0ee.svg", "purchase": "purchase.9cd6d65.svg", "push-pin": "push-pin.89e4ead.svg", "push-pin-off": "push-pin-off.ba99213.svg", "qr": "qr.87a49a3.svg", "qr-off": "qr-off.64e21b9.svg", "question": "question.3402a63.svg", "question-filled": "question-filled.cf25dd5.svg", "racing-flag": "racing-flag.b7ddcc8.svg", "radar": "radar.de5a6c1.svg", "radio": "radio.2b48e53.svg", "refresh": "refresh.41fd868.svg", "replay": "replay.55a99f2.svg", "reset": "reset.e53d52f.svg", "return": "return.46d30de.svg", "road": "road.bd3d4bc.svg", "roof-closed": "roof-closed.018d021.svg", "roof-open": "roof-open.51c8ee6.svg", "route": "route.f4fbbb4.svg", "rss": "rss.0e77baf.svg", "save": "save.6171ff5.svg", "screen": "screen.420be15.svg", "search": "search.3f0f1ce.svg", "seat": "seat.a3ebc40.svg", "send": "send.b32099c.svg", "service-technician": "service-technician.8749028.svg", "share": "share.a0b30da.svg", "shopping-bag": "shopping-bag.3f91a9b.svg", "shopping-bag-filled": "shopping-bag-filled.abf6c98.svg", "shopping-cart": "shopping-cart.370e224.svg", "shopping-cart-filled": "shopping-cart-filled.e0c3a65.svg", "sidebar": "sidebar.8e43896.svg", "sidelights": "sidelights.65c9dd9.svg", "skip-backward": "skip-backward.cd25ac5.svg", "skip-forward": "skip-forward.001e97f.svg", "snowflake": "snowflake.83907b3.svg", "sort": "sort.92b50bd.svg", "stack": "stack.804af93.svg", "star": "star.4c5bb15.svg", "star-filled": "star-filled.84ef2f6.svg", "steering-wheel": "steering-wheel.4dea19e.svg", "stop": "stop.173b6ac.svg", "stopwatch": "stopwatch.0e048a4.svg", "subtract": "subtract.57eed1d.svg", "success": "success.b16d4c1.svg", "success-filled": "success-filled.1832d98.svg", "sun": "sun.4301cbd.svg", "suv": "suv.33ac4aa.svg", "switch": "switch.66f74c4.svg", "tablet": "tablet.07341ac.svg", "tachometer": "tachometer.3a2fc3c.svg", "theme": "theme.08f6508.svg", "tire": "tire.e5c9372.svg", "trigger-finger": "trigger-finger.65aa6e2.svg", "truck": "truck.2c26c04.svg", "turismo": "turismo.a066b9f.svg", "unlinked": "unlinked.e9afe39.svg", "upload": "upload.d1f5a2a.svg", "user": "user.c18dabe.svg", "user-filled": "user-filled.2ea646d.svg", "user-group": "user-group.79cdf86.svg", "user-manual": "user-manual.470e243.svg", "video": "video.7590689.svg", "view": "view.5b4d7f6.svg", "view-off": "view-off.a4ede54.svg", "volume-off": "volume-off.bcd49e7.svg", "volume-up": "volume-up.2084f60.svg", "warning": "warning.59927e6.svg", "warning-filled": "warning-filled.1f6fe21.svg", "weather": "weather.9c96bd7.svg", "weight": "weight.b57a60d.svg", "wifi": "wifi.e2a8d9c.svg", "work": "work.9dd71a4.svg", "wrench": "wrench.09a2a67.svg", "wrenches": "wrenches.d2ed45d.svg", "zoom-in": "zoom-in.ff299b8.svg", "zoom-out": "zoom-out.ebb6246.svg" };
|
|
3462
3462
|
|
|
3463
3463
|
// index.ts
|
|
3464
3464
|
var MARQUES_MANIFEST = { "porscheMarqueTrademark": { "medium": { "1x": { "png": "porsche-marque-trademark.medium.da07531@1x.png", "webp": "porsche-marque-trademark.medium.5c6af9a@1x.webp" }, "2x": { "png": "porsche-marque-trademark.medium.aa801f4@2x.png", "webp": "porsche-marque-trademark.medium.fff6e9b@2x.webp" }, "3x": { "png": "porsche-marque-trademark.medium.824818d@3x.png", "webp": "porsche-marque-trademark.medium.f67092f@3x.webp" } }, "small": { "1x": { "png": "porsche-marque-trademark.small.020244b@1x.png", "webp": "porsche-marque-trademark.small.7836397@1x.webp" }, "2x": { "png": "porsche-marque-trademark.small.92184fa@2x.png", "webp": "porsche-marque-trademark.small.760a57e@2x.webp" }, "3x": { "png": "porsche-marque-trademark.small.fd545ce@3x.png", "webp": "porsche-marque-trademark.small.1726036@3x.webp" } } }, "porscheMarque": { "medium": { "1x": { "png": "porsche-marque.medium.a986274@1x.png", "webp": "porsche-marque.medium.fa908e4@1x.webp" }, "2x": { "png": "porsche-marque.medium.089d6dd@2x.png", "webp": "porsche-marque.medium.7f0893d@2x.webp" }, "3x": { "png": "porsche-marque.medium.2cb8743@3x.png", "webp": "porsche-marque.medium.3534cf0@3x.webp" } }, "small": { "1x": { "png": "porsche-marque.small.ac20427@1x.png", "webp": "porsche-marque.small.005debe@1x.webp" }, "2x": { "png": "porsche-marque.small.22f1e9d@2x.png", "webp": "porsche-marque.small.df43173@2x.webp" }, "3x": { "png": "porsche-marque.small.4920924@3x.png", "webp": "porsche-marque.small.cfd6149@3x.webp" } } }, "porscheMarque75": { "medium": { "1x": { "png": "porsche-marque75.medium.0a02e22@1x.png", "webp": "porsche-marque75.medium.99b2d65@1x.webp" }, "2x": { "png": "porsche-marque75.medium.1d41ecf@2x.png", "webp": "porsche-marque75.medium.e32580c@2x.webp" }, "3x": { "png": "porsche-marque75.medium.373bcb5@3x.png", "webp": "porsche-marque75.medium.4a003d1@3x.webp" } }, "small": { "1x": { "png": "porsche-marque75.small.f5b37fe@1x.png", "webp": "porsche-marque75.small.146b06c@1x.webp" }, "2x": { "png": "porsche-marque75.small.20d8690@2x.png", "webp": "porsche-marque75.small.025770f@2x.webp" }, "3x": { "png": "porsche-marque75.small.e89b13e@3x.png", "webp": "porsche-marque75.small.a725d2e@3x.webp" } } } };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select.wrapper.mjs
CHANGED
|
@@ -5,21 +5,21 @@ import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMerge
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRSelect } from '../dsr-components/select.mjs';
|
|
7
7
|
|
|
8
|
-
const PSelect = /*#__PURE__*/ forwardRef(({ description = '', disabled = false, dropdownDirection = 'auto', form, hideLabel = false, label = '', message = '', name, onUpdate, required = false, state = 'none', theme, value, className, children, ...rest }, ref) => {
|
|
8
|
+
const PSelect = /*#__PURE__*/ forwardRef(({ compact = false, description = '', disabled = false, dropdownDirection = 'auto', form, hideLabel = false, label = '', message = '', name, onUpdate, required = false, state = 'none', theme, value, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
11
11
|
const WebComponentTag = usePrefix('p-select');
|
|
12
|
-
const propsToSync = [description, disabled, dropdownDirection, form, hideLabel, label, message, name, required, state, theme || useTheme(), value];
|
|
12
|
+
const propsToSync = [compact, description, disabled, dropdownDirection, form, hideLabel, label, message, name, required, state, theme || useTheme(), value];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
|
14
14
|
const { current } = elementRef;
|
|
15
|
-
['description', 'disabled', 'dropdownDirection', 'form', 'hideLabel', 'label', 'message', 'name', 'required', 'state', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
|
+
['compact', 'description', 'disabled', 'dropdownDirection', 'form', 'hideLabel', 'label', 'message', 'name', 'required', 'state', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
16
|
}, propsToSync);
|
|
17
17
|
const props = {
|
|
18
18
|
...rest,
|
|
19
19
|
// @ts-ignore
|
|
20
20
|
...(!process.browser
|
|
21
21
|
? {
|
|
22
|
-
children: (jsx(DSRSelect, { description, disabled, dropdownDirection, form, hideLabel, label, message, name, required, state, theme: theme || useTheme(), value, children })),
|
|
22
|
+
children: (jsx(DSRSelect, { compact, description, disabled, dropdownDirection, form, hideLabel, label, message, name, required, state, theme: theme || useTheme(), value, children })),
|
|
23
23
|
}
|
|
24
24
|
: {
|
|
25
25
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.mjs
CHANGED
|
@@ -5,22 +5,22 @@ import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMerge
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRSwitch } from '../dsr-components/switch.mjs';
|
|
7
7
|
|
|
8
|
-
const PSwitch = /*#__PURE__*/ forwardRef(({ alignLabel = 'end', checked = false, disabled = false, hideLabel = false, loading = false, onSwitchChange, onUpdate, stretch = false, theme, className, children, ...rest }, ref) => {
|
|
8
|
+
const PSwitch = /*#__PURE__*/ forwardRef(({ alignLabel = 'end', checked = false, compact = false, disabled = false, hideLabel = false, loading = false, onSwitchChange, onUpdate, stretch = false, theme, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
useEventCallback(elementRef, 'switchChange', onSwitchChange);
|
|
11
11
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
12
12
|
const WebComponentTag = usePrefix('p-switch');
|
|
13
|
-
const propsToSync = [alignLabel, checked, disabled, hideLabel, loading, stretch, theme || useTheme()];
|
|
13
|
+
const propsToSync = [alignLabel, checked, compact, disabled, hideLabel, loading, stretch, theme || useTheme()];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['alignLabel', 'checked', 'disabled', 'hideLabel', 'loading', 'stretch', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['alignLabel', 'checked', 'compact', 'disabled', 'hideLabel', 'loading', 'stretch', 'theme'].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(DSRSwitch, { alignLabel, checked, disabled, hideLabel, loading, stretch, theme: theme || useTheme(), children })),
|
|
23
|
+
children: (jsx(DSRSwitch, { alignLabel, checked, compact, disabled, hideLabel, loading, stretch, theme: theme || useTheme(), children })),
|
|
24
24
|
}
|
|
25
25
|
: {
|
|
26
26
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs
CHANGED
|
@@ -18,6 +18,7 @@ import { PWordmark } from '../components/wordmark.wrapper.mjs';
|
|
|
18
18
|
* @slot {"name": "footer", "description": "Renders a **sticky** footer section underneath the main content." }
|
|
19
19
|
* @slot {"name": "sidebar-start", "description": "Renders a sidebar area on the **start** side (**left** in **LTR** mode / **right** in **RTL** mode). On mobile view it transforms into a flyout." }
|
|
20
20
|
* @slot {"name": "sidebar-end", "description": "Renders a sidebar area on the **end** side (**right** in **LTR** mode / **left** in **RTL** mode). On mobile view it transforms into a flyout." }
|
|
21
|
+
* @slot {"name": "sidebar-end-header", "description": "Renders in the header section of the sidebar end area." }
|
|
21
22
|
* @slot {"name": "background", "description": "Can be used to pass a sticky media element <img/> or <video/> placed underneath the main content." }
|
|
22
23
|
*
|
|
23
24
|
* @experimental
|
|
@@ -28,6 +29,7 @@ class DSRCanvas extends Component {
|
|
|
28
29
|
isMediaQueryM = false;
|
|
29
30
|
hasTitle;
|
|
30
31
|
hasSidebarEnd;
|
|
32
|
+
hasSidebarEndHeader;
|
|
31
33
|
hasFooter;
|
|
32
34
|
hasBackground;
|
|
33
35
|
sidebarStart;
|
|
@@ -38,10 +40,11 @@ class DSRCanvas extends Component {
|
|
|
38
40
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
39
41
|
const hasTitle = namedSlotChildren.filter(({ props: { slot } }) => slot === 'title').length > 0;
|
|
40
42
|
const hasSidebarEnd = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sidebar-end').length > 0;
|
|
43
|
+
const hasSidebarEndHeader = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sidebar-end-header').length > 0;
|
|
41
44
|
const hasFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'footer').length > 0;
|
|
42
45
|
const hasBackground = namedSlotChildren.filter(({ props: { slot } }) => slot === 'background').length > 0;
|
|
43
46
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$14(this.props.theme, this.props.sidebarStartOpen, this.props.sidebarEndOpen)));
|
|
44
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("div", { className: "root", children: [jsxs("header", { className: "header", tabIndex: -1, children: [jsxs("div", { className: "blur", children: [jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {})] }), jsxs("div", { className: "header__area header__area--start", children: [!this.props.sidebarStartOpen && (jsxs(PButton, { theme: this.props.theme, icon: "sidebar", variant: "ghost", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarStartOpen }, children: [this.props.sidebarStartOpen ? 'Close' : 'Open', " navigation sidebar"] })), jsx("slot", { name: "header-start" })] }), jsx(PCrest, { className: "header__crest" }), jsx(PWordmark, { className: "header__wordmark", size: "inherit", theme: this.props.theme }), jsx("div", { className: "header__area header__area--end", children: jsx("slot", { name: "header-end" }) })] }), this.props.isMediaQueryS && (jsx("aside", { className: "sidebar sidebar--start", inert: !this.props.sidebarStartOpen, "aria-label": `Navigation sidebar ${this.props.sidebarStartOpen ? 'open' : 'closed'}`, tabIndex: -1, children: jsxs("div", { className: "sidebar__scroller", children: [jsxs("div", { className: "sidebar__header sidebar__header--start", children: [jsxs(PButton, { theme: this.props.theme, icon: "sidebar", variant: "ghost", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarStartOpen }, children: [this.props.sidebarStartOpen ? 'Close' : 'Open', " navigation sidebar"] }), hasTitle && (jsx("h2", { children: jsx("slot", { name: "title" }) }))] }), jsx("div", { className: "sidebar__content", children: jsx("slot", { name: "sidebar-start" }) })] }) })), jsx("main", { className: "main", children: jsx("slot", {}) }), hasSidebarEnd && this.props.isMediaQueryM && (jsx("aside", { className: "sidebar sidebar--end", inert: !this.props.sidebarEndOpen, "aria-label": `Settings sidebar ${this.props.sidebarEndOpen ? 'open' : 'closed'}`, tabIndex: -1, children: jsxs("div", { className: "sidebar__scroller", children: [
|
|
47
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("div", { className: "root", children: [jsxs("header", { className: "header", tabIndex: -1, children: [jsxs("div", { className: "blur", children: [jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {})] }), jsxs("div", { className: "header__area header__area--start", children: [!this.props.sidebarStartOpen && (jsxs(PButton, { theme: this.props.theme, icon: "sidebar", variant: "ghost", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarStartOpen }, children: [this.props.sidebarStartOpen ? 'Close' : 'Open', " navigation sidebar"] })), jsx("slot", { name: "header-start" })] }), jsx(PCrest, { className: "header__crest" }), jsx(PWordmark, { className: "header__wordmark", size: "inherit", theme: this.props.theme }), jsx("div", { className: "header__area header__area--end", children: jsx("slot", { name: "header-end" }) })] }), this.props.isMediaQueryS && (jsx("aside", { className: "sidebar sidebar--start", inert: !this.props.sidebarStartOpen, "aria-label": `Navigation sidebar ${this.props.sidebarStartOpen ? 'open' : 'closed'}`, tabIndex: -1, children: jsxs("div", { className: "sidebar__scroller", children: [jsxs("div", { className: "sidebar__header sidebar__header--start", children: [jsxs(PButton, { theme: this.props.theme, icon: "sidebar", variant: "ghost", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarStartOpen }, children: [this.props.sidebarStartOpen ? 'Close' : 'Open', " navigation sidebar"] }), hasTitle && (jsx("h2", { children: jsx("slot", { name: "title" }) }))] }), jsx("div", { className: "sidebar__content", children: jsx("slot", { name: "sidebar-start" }) })] }) })), jsx("main", { className: "main", children: jsx("slot", {}) }), hasSidebarEnd && this.props.isMediaQueryM && (jsx("aside", { className: "sidebar sidebar--end", inert: !this.props.sidebarEndOpen, "aria-label": `Settings sidebar ${this.props.sidebarEndOpen ? 'open' : 'closed'}`, tabIndex: -1, children: jsxs("div", { className: "sidebar__scroller", children: [jsxs("div", { className: "sidebar__header sidebar__header--end", children: [jsx("slot", { name: "sidebar-end-header" }), jsxs(PButton, { theme: this.props.theme, icon: "close", variant: "ghost", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarEndOpen }, children: [this.props.sidebarEndOpen ? 'Close' : 'Open', " settings sidebar"] })] }), jsx("div", { className: "sidebar__content", children: jsx("slot", { name: "sidebar-end" }) })] }) })), hasFooter && (jsx("footer", { className: "footer", children: jsx("slot", { name: "footer" }) })), hasBackground && jsx("slot", { name: "background" })] }), !this.props.isMediaQueryS && (jsxs(PFlyout, { className: "flyout-start", theme: this.props.theme, open: this.props.sidebarStartOpen, position: "start", children: [hasTitle && (jsx("h2", { slot: "header", children: jsx("slot", { name: "title" }) })), jsx("slot", { name: "sidebar-start" })] })), hasSidebarEnd && !this.props.isMediaQueryM && (jsxs(PFlyout, { className: "flyout-end", theme: this.props.theme, open: this.props.sidebarEndOpen, position: "end", children: [hasSidebarEndHeader && jsx("slot", { slot: "header", name: "sidebar-end-header" }), jsx("slot", { name: "sidebar-end" })] }))] })] }), this.props.children] }));
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs
CHANGED
|
@@ -53,7 +53,7 @@ class DSRSelect extends Component {
|
|
|
53
53
|
const selectMessageId = (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) ? messageId : undefined;
|
|
54
54
|
const initialStatusId = 'initial-status';
|
|
55
55
|
const ariaDescribedBy = [descriptionId, selectMessageId, initialStatusId].filter(Boolean).join(' ');
|
|
56
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$q('down', this.props.isOpen, this.props.disabled, this.props.hideLabel, this.props.state, this.props.isNativePopoverCase, this.props.theme, !!this.props.slottedImagePath)));
|
|
56
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$q('down', this.props.isOpen, this.props.disabled, this.props.hideLabel, this.props.state, this.props.isNativePopoverCase, this.props.compact, this.props.theme, !!this.props.slottedImagePath)));
|
|
57
57
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, htmlFor: buttonId, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxs("div", { className: `wrapper${this.props.disabled ? ' disabled' : ''}`, children: [jsx("button", { "aria-invalid": this.props.state === 'error' ? 'true' : null, type: "button", role: "combobox", id: buttonId, ...getComboboxAriaAttributes(this.props.isOpen, this.props.required, labelId, ariaDescribedBy, dropdownId), disabled: this.props.disabled, children: this.props.slottedImagePath ? (jsxs("span", { children: [jsx("img", { src: this.props.slottedImagePath, alt: "" }), jsx("span", { children: getSelectedOptionString(otherChildren) })] })) : (getSelectedOptionString(otherChildren)) }), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: this.props.disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" }), jsx("div", { ...(this.props.isNativePopoverCase && {
|
|
58
58
|
popover: 'auto',
|
|
59
59
|
className: 'popover',
|