@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
|
@@ -4749,6 +4749,9 @@ const getComponentCss$14 = (theme, isSidebarStartOpen, isSidebarEndOpen) => {
|
|
|
4749
4749
|
},
|
|
4750
4750
|
...getFocusJssStyle(theme, { slotted: 'a' }),
|
|
4751
4751
|
},
|
|
4752
|
+
'&[name="sidebar-end-header"]': {
|
|
4753
|
+
display: 'block', // ensures header section of sidebar-end area is aligned correctly
|
|
4754
|
+
},
|
|
4752
4755
|
'&[name="background"]': {
|
|
4753
4756
|
zIndex: 3,
|
|
4754
4757
|
display: 'block',
|
|
@@ -5006,7 +5009,7 @@ const getComponentCss$14 = (theme, isSidebarStartOpen, isSidebarEndOpen) => {
|
|
|
5006
5009
|
},
|
|
5007
5010
|
},
|
|
5008
5011
|
'&--end': {
|
|
5009
|
-
justifyContent: '
|
|
5012
|
+
justifyContent: 'space-between',
|
|
5010
5013
|
'&::before': {
|
|
5011
5014
|
background: `linear-gradient(180deg,var(${cssVarColorBackgroundBase}) 0%,var(${cssVarColorBackgroundBase}) 65%,transparent 100%)`,
|
|
5012
5015
|
},
|
|
@@ -7189,7 +7192,9 @@ const keyFramesDark = 'rerender-dark';
|
|
|
7189
7192
|
const cssVariableFilter = '--p-internal-icon-filter';
|
|
7190
7193
|
const isFlippableIcon = (name, source) => {
|
|
7191
7194
|
return (!source &&
|
|
7192
|
-
(name === 'arrow-
|
|
7195
|
+
(name === 'arrow-compact-left' ||
|
|
7196
|
+
name === 'arrow-compact-right' ||
|
|
7197
|
+
name === 'arrow-double-left' ||
|
|
7193
7198
|
name === 'arrow-double-right' ||
|
|
7194
7199
|
name === 'arrow-first' ||
|
|
7195
7200
|
name === 'arrow-head-left' ||
|
|
@@ -7203,6 +7208,7 @@ const isFlippableIcon = (name, source) => {
|
|
|
7203
7208
|
name === 'increase' ||
|
|
7204
7209
|
name === 'list' ||
|
|
7205
7210
|
name === 'logout' ||
|
|
7211
|
+
name === 'return' ||
|
|
7206
7212
|
name === 'send'));
|
|
7207
7213
|
};
|
|
7208
7214
|
const getComponentCss$N = (name, source, color, size, theme) => {
|
|
@@ -8487,6 +8493,8 @@ const getListStyles$2 = (isOpen, direction, theme) => {
|
|
|
8487
8493
|
};
|
|
8488
8494
|
|
|
8489
8495
|
const cssVariableSelectPaddingInlineStart = '--p-internal-select-option-padding-left';
|
|
8496
|
+
const cssVarInternalSelectOptionScaling = '--p-internal-select-option-scaling';
|
|
8497
|
+
const scalingVar$1 = `var(${cssVarInternalSelectOptionScaling}, 1)`;
|
|
8490
8498
|
// TODO: Enforce order of slotted text, img
|
|
8491
8499
|
const getComponentCss$B = (theme) => {
|
|
8492
8500
|
return getCss({
|
|
@@ -8516,14 +8524,17 @@ const getOptionStyles = (theme) => {
|
|
|
8516
8524
|
const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
8517
8525
|
const { primaryColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor } = getThemedColors(theme);
|
|
8518
8526
|
const { highlightColor } = getHighContrastColors();
|
|
8527
|
+
const gap = `max(4px, ${scalingVar$1} * 12px)`;
|
|
8528
|
+
const paddingBlock = `max(2px, ${scalingVar$1} * ${spacingStaticSmall})`;
|
|
8529
|
+
const paddingInline = `max(4px, ${scalingVar$1} * var(${cssVariableSelectPaddingInlineStart}, 12px)) max(4px, ${scalingVar$1} * 12px)`;
|
|
8519
8530
|
return {
|
|
8520
8531
|
option: {
|
|
8521
8532
|
fontWeight: fontWeightRegular,
|
|
8522
8533
|
display: 'flex',
|
|
8523
|
-
gap
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
minHeight:
|
|
8534
|
+
gap,
|
|
8535
|
+
paddingBlock,
|
|
8536
|
+
paddingInline,
|
|
8537
|
+
minHeight: fontLineHeight, // preserves height for empty option
|
|
8527
8538
|
color: contrastHighColor,
|
|
8528
8539
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8529
8540
|
color: contrastHighColorDark,
|
|
@@ -8531,7 +8542,7 @@ const getOptionStyles = (theme) => {
|
|
|
8531
8542
|
cursor: 'pointer',
|
|
8532
8543
|
textAlign: 'start',
|
|
8533
8544
|
wordBreak: 'break-word',
|
|
8534
|
-
boxSizing: '
|
|
8545
|
+
boxSizing: 'content-box',
|
|
8535
8546
|
borderRadius: borderRadiusSmall,
|
|
8536
8547
|
transition: `${getTransition('background-color')}, ${getTransition('color')}`,
|
|
8537
8548
|
...getNoResultsOptionJssStyle(),
|
|
@@ -8579,6 +8590,8 @@ const getOptionStyles = (theme) => {
|
|
|
8579
8590
|
};
|
|
8580
8591
|
};
|
|
8581
8592
|
|
|
8593
|
+
const cssVarInternalOptgroupScaling = '--p-internal-optgroup-scaling';
|
|
8594
|
+
const scalingVar = `var(${cssVarInternalOptgroupScaling}, 1)`;
|
|
8582
8595
|
const getComponentCss$A = (isDisabled, theme) => getCss({
|
|
8583
8596
|
'@global': {
|
|
8584
8597
|
':host': addImportantToEachRule({
|
|
@@ -8595,11 +8608,13 @@ const getComponentCss$A = (isDisabled, theme) => getCss({
|
|
|
8595
8608
|
const getOptgroupStyles = (isDisabled, theme) => {
|
|
8596
8609
|
const { primaryColor, disabledColor } = getThemedColors(theme);
|
|
8597
8610
|
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark } = getThemedColors('dark');
|
|
8611
|
+
const gap = `max(2px, ${scalingVar} * ${spacingStaticSmall})`;
|
|
8612
|
+
const padding = `max(2px, ${scalingVar} * ${spacingStaticSmall}) max(4px, ${scalingVar} * 12px)`;
|
|
8598
8613
|
return {
|
|
8599
8614
|
optgroup: {
|
|
8600
8615
|
display: 'flex',
|
|
8601
8616
|
flexDirection: 'column',
|
|
8602
|
-
gap
|
|
8617
|
+
gap,
|
|
8603
8618
|
},
|
|
8604
8619
|
label: {
|
|
8605
8620
|
color: primaryColor,
|
|
@@ -8613,7 +8628,7 @@ const getOptgroupStyles = (isDisabled, theme) => {
|
|
|
8613
8628
|
}),
|
|
8614
8629
|
}),
|
|
8615
8630
|
display: 'block',
|
|
8616
|
-
padding
|
|
8631
|
+
padding,
|
|
8617
8632
|
fontSize: fontSizeTextXSmall,
|
|
8618
8633
|
fontWeight: fontWeightSemiBold,
|
|
8619
8634
|
},
|
|
@@ -9750,7 +9765,13 @@ const cssVarBorderColor = '--p-select-border-color';
|
|
|
9750
9765
|
const cssVarIconFilter = '--p-select-icon-filter';
|
|
9751
9766
|
const cssVarBackgroundColorFocus = '--p-select-focus-background-color';
|
|
9752
9767
|
const cssVarBorderColorFocus = '--p-select-focus-border-color';
|
|
9753
|
-
const
|
|
9768
|
+
const cssVarInternalSelectScaling = '--p-internal-select-scaling';
|
|
9769
|
+
const getComponentCss$q = (direction, isOpen, isDisabled, hideLabel, state, isNativePopoverCase, compact, theme, hasSlottedImage) => {
|
|
9770
|
+
// Determines the scaling factor for the select size. In "compact" mode, it uses 0.5 to achieve a 36px select (compact size).
|
|
9771
|
+
// Defaults to 1 for the standard size and can be overridden by the CSS variable `cssVarInternalSelectScaling`.
|
|
9772
|
+
const scalingVar = `var(${cssVarInternalSelectScaling}, ${compact ? 0.5 : 1})`;
|
|
9773
|
+
const gap = `max(2px, ${scalingVar} * ${spacingStaticXSmall})`;
|
|
9774
|
+
const gridTemplateColumns = `minmax(0, 1fr) auto auto calc(max(2px, ${scalingVar} * ${formElementLayeredGap}) + ${borderWidthBase})`;
|
|
9754
9775
|
return getCss({
|
|
9755
9776
|
'@global': {
|
|
9756
9777
|
':host': {
|
|
@@ -9760,20 +9781,23 @@ const getComponentCss$q = (direction, isOpen, isDisabled, hideLabel, state, isNa
|
|
|
9760
9781
|
...hostHiddenStyles,
|
|
9761
9782
|
}),
|
|
9762
9783
|
},
|
|
9784
|
+
'::slotted(*)': addImportantToEachRule({
|
|
9785
|
+
'--p-internal-select-option-scaling': scalingVar,
|
|
9786
|
+
'--p-internal-optgroup-scaling': scalingVar,
|
|
9787
|
+
}),
|
|
9763
9788
|
...preventFoucOfNestedElementsStyles,
|
|
9764
|
-
|
|
9765
|
-
button: getButtonStyles(isDisabled, direction, isOpen, state, theme, hasSlottedImage),
|
|
9789
|
+
button: getButtonStyles(isDisabled, direction, isOpen, state, compact, theme, hasSlottedImage),
|
|
9766
9790
|
},
|
|
9767
9791
|
root: {
|
|
9768
9792
|
display: 'grid',
|
|
9769
|
-
gap
|
|
9793
|
+
gap,
|
|
9770
9794
|
// 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.
|
|
9771
9795
|
minWidth: `calc(1rem + ${formElementPaddingHorizontal} + ${borderWidthBase} * 2 + ${getCalculatedFormElementPaddingHorizontal(1)})`,
|
|
9772
9796
|
},
|
|
9773
9797
|
wrapper: {
|
|
9774
9798
|
position: 'relative',
|
|
9775
9799
|
display: 'grid',
|
|
9776
|
-
gridTemplateColumns
|
|
9800
|
+
gridTemplateColumns,
|
|
9777
9801
|
},
|
|
9778
9802
|
icon: {
|
|
9779
9803
|
gridArea: '1/3',
|
|
@@ -9789,7 +9813,7 @@ const getComponentCss$q = (direction, isOpen, isDisabled, hideLabel, state, isNa
|
|
|
9789
9813
|
transform: 'rotate3d(0,0,1,180deg)',
|
|
9790
9814
|
},
|
|
9791
9815
|
},
|
|
9792
|
-
listbox: getListStyles(isOpen, direction, theme),
|
|
9816
|
+
listbox: getListStyles(isOpen, direction, compact, theme),
|
|
9793
9817
|
'sr-only': getHiddenTextJssStyle(),
|
|
9794
9818
|
// .label / .required
|
|
9795
9819
|
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
@@ -9804,11 +9828,16 @@ const getComponentCss$q = (direction, isOpen, isDisabled, hideLabel, state, isNa
|
|
|
9804
9828
|
};
|
|
9805
9829
|
// TODO: Rename to JSSStyles
|
|
9806
9830
|
// TODO: use getSlottedTextFieldTextareaSelectStyles() instead an manipulate selectors like done with PIN Code or even better make it configurable as parameter
|
|
9807
|
-
const getButtonStyles = (isDisabled, direction, isOpen, state, theme, hasSlottedImage) => {
|
|
9831
|
+
const getButtonStyles = (isDisabled, direction, isOpen, state, compact, theme, hasSlottedImage) => {
|
|
9808
9832
|
const { primaryColor, disabledColor, backgroundColor, contrastMediumColor } = getThemedColors(theme);
|
|
9809
9833
|
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, backgroundColor: backgroundColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
9810
9834
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
9811
9835
|
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
9836
|
+
const scalingVar = `var(${cssVarInternalSelectScaling}, ${compact ? 0.5 : 1})`;
|
|
9837
|
+
const height = `max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px))`;
|
|
9838
|
+
const paddingBlock = `max(2px, ${scalingVar} * ${formElementPaddingVertical})`;
|
|
9839
|
+
const paddingInline = `max(4px, ${scalingVar} * ${formElementPaddingHorizontal}) ${getCalculatedFormElementPaddingHorizontal(1)}`;
|
|
9840
|
+
const gap = `max(4px, ${scalingVar} * 12px)`;
|
|
9812
9841
|
return {
|
|
9813
9842
|
textAlign: 'start', // TODO: Newly added (rest is copied from select-wrapper-dropdown), share rest for both components
|
|
9814
9843
|
overflowX: 'hidden', // TODO: Newly added (rest is copied from select-wrapper-dropdown), share rest for both components
|
|
@@ -9816,12 +9845,12 @@ const getButtonStyles = (isDisabled, direction, isOpen, state, theme, hasSlotted
|
|
|
9816
9845
|
gridArea: '1/1/1/-1',
|
|
9817
9846
|
minWidth: 0,
|
|
9818
9847
|
// TODO: abstract and re-use for multi-select, select-wrapper and text-field-wrapper
|
|
9819
|
-
height
|
|
9848
|
+
height,
|
|
9820
9849
|
font: textSmallStyle.font.replace('ex', 'ex + 6px'), // a minimum line-height is needed for input, otherwise value is scrollable in Chrome, +6px is alig
|
|
9821
9850
|
margin: 0, // necessary reset for iOS Safari 15 (and maybe other browsers)
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
boxSizing: '
|
|
9851
|
+
paddingBlock,
|
|
9852
|
+
paddingInline,
|
|
9853
|
+
boxSizing: 'content-box',
|
|
9825
9854
|
outline: 0,
|
|
9826
9855
|
WebkitAppearance: 'none', // iOS safari
|
|
9827
9856
|
appearance: 'none',
|
|
@@ -9849,7 +9878,7 @@ const getButtonStyles = (isDisabled, direction, isOpen, state, theme, hasSlotted
|
|
|
9849
9878
|
...(hasSlottedImage && {
|
|
9850
9879
|
'& > span': {
|
|
9851
9880
|
display: 'flex',
|
|
9852
|
-
gap
|
|
9881
|
+
gap,
|
|
9853
9882
|
alignItems: 'center',
|
|
9854
9883
|
},
|
|
9855
9884
|
'& > span > span': {
|
|
@@ -9881,7 +9910,7 @@ const getButtonStyles = (isDisabled, direction, isOpen, state, theme, hasSlotted
|
|
|
9881
9910
|
},
|
|
9882
9911
|
}),
|
|
9883
9912
|
...(isOpen && {
|
|
9884
|
-
['paddingBottom' ]: `calc(${
|
|
9913
|
+
['paddingBottom' ]: `calc(${paddingBlock} + 1px)`, // Add padding to keep same height when border changes
|
|
9885
9914
|
['borderBottom' ]: addImportantToRule(`1px solid ${contrastMediumColor}`),
|
|
9886
9915
|
['borderBottomLeftRadius' ]: 0,
|
|
9887
9916
|
['borderBottomRightRadius' ]: 0,
|
|
@@ -9913,16 +9942,19 @@ const getButtonStyles = (isDisabled, direction, isOpen, state, theme, hasSlotted
|
|
|
9913
9942
|
};
|
|
9914
9943
|
// TODO: Rename to JSSStyles
|
|
9915
9944
|
// TODO: Copied from multi-select, extract and use in select and multi-select
|
|
9916
|
-
const getListStyles = (isOpen, direction, theme) => {
|
|
9945
|
+
const getListStyles = (isOpen, direction, compact, theme) => {
|
|
9917
9946
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
9918
9947
|
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
9948
|
+
const scalingVar = `var(${cssVarInternalSelectScaling}, ${compact ? 0.5 : 1})`;
|
|
9949
|
+
const gap = `max(2px, ${scalingVar} * ${spacingStaticSmall})`;
|
|
9950
|
+
const padding = `max(2px, ${scalingVar} * 6px)`;
|
|
9919
9951
|
return {
|
|
9920
9952
|
position: 'absolute',
|
|
9921
9953
|
margin: 0,
|
|
9922
9954
|
display: isOpen ? 'flex' : 'none',
|
|
9923
9955
|
flexDirection: 'column',
|
|
9924
|
-
gap
|
|
9925
|
-
padding
|
|
9956
|
+
gap,
|
|
9957
|
+
padding,
|
|
9926
9958
|
...textSmallStyle,
|
|
9927
9959
|
zIndex: 10,
|
|
9928
9960
|
// TODO: Inset inline 0
|
|
@@ -10214,6 +10246,7 @@ const getComponentCss$m = (size) => {
|
|
|
10214
10246
|
});
|
|
10215
10247
|
};
|
|
10216
10248
|
|
|
10249
|
+
const cssVarInternalSwitchScaling = '--p-internal-switch-scaling';
|
|
10217
10250
|
const getColors$1 = (checked, disabled, loading, theme) => {
|
|
10218
10251
|
const { primaryColor, contrastMediumColor, successColor, successColorDarken, disabledColor } = getThemedColors(theme);
|
|
10219
10252
|
const { backgroundColor: lightThemeBackgroundColor } = getThemedColors('light');
|
|
@@ -10242,11 +10275,24 @@ const getColors$1 = (checked, disabled, loading, theme) => {
|
|
|
10242
10275
|
textColor: disabledOrLoadingColor || primaryColor,
|
|
10243
10276
|
};
|
|
10244
10277
|
};
|
|
10245
|
-
const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, loading, theme) => {
|
|
10278
|
+
const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, loading, compact, theme) => {
|
|
10246
10279
|
const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, disabled, loading, theme);
|
|
10247
10280
|
const { buttonBorderColor: buttonBorderColorDark, buttonBorderColorHover: buttonBorderColorHoverDark, buttonBackgroundColor: buttonBackgroundColorDark, buttonBackgroundColorHover: buttonBackgroundColorHoverDark, toggleBackgroundColor: toggleBackgroundColorDark, toggleBackgroundColorHover: toggleBackgroundColorHoverDark, textColor: textColorDark, } = getColors$1(checked, disabled, loading, 'dark');
|
|
10248
|
-
const
|
|
10249
|
-
const
|
|
10281
|
+
const minimumTouchTargetSize = '24px'; // Minimum touch target size to comply with accessibility guidelines.
|
|
10282
|
+
const scalingVar = `var(${cssVarInternalSwitchScaling}, ${compact ? 0.6668 : 1})`;
|
|
10283
|
+
// Determines the scaling factor for the switch size. In "compact" mode, it uses 0.6668 to achieve a 20px switch (compact size).
|
|
10284
|
+
// Defaults to 1 for the standard size and can be overridden by the CSS variable `cssVarInternalSwitchScaling`.
|
|
10285
|
+
const dimension = `calc(max(${SCALING_BASE_VALUE} * 0.75, ${scalingVar} * ${fontLineHeight}))`;
|
|
10286
|
+
// Calculates the switch size and ensures a minimum size of 12px (0.75 * SCALING_BASE_VALUE).
|
|
10287
|
+
// Scales proportionally with the line height and the scaling factor.
|
|
10288
|
+
const dimensionFull = `calc(${dimension} + ${borderWidthBase} * 2)`; // Calculates the total size of the switch including its borders.
|
|
10289
|
+
const touchTargetSizeDiff = `calc(${minimumTouchTargetSize} - ${dimensionFull})`; // Difference between the minimum touch target size and the switch full size.
|
|
10290
|
+
const gap = `max(${spacingStaticXSmall}, calc(${spacingStaticSmall} - (max(0px, ${touchTargetSizeDiff}))))`;
|
|
10291
|
+
// Adjusts padding to maintain consistent spacing when the switch is smaller than the minimum touch target size.
|
|
10292
|
+
// Uses asymmetric padding instead of `gap` to ensure there is no non-clickable area between the label and the input.
|
|
10293
|
+
const marginTop = `max(0px, calc((${fontLineHeight} - ${dimensionFull}) / 2))`; // Vertically centers the switch label relative to the switch size (depending on which is smaller).
|
|
10294
|
+
const paddingTop = `max(0px, calc((${dimensionFull} - ${fontLineHeight}) / 2))`; // Vertically centers the switch label relative to the switch size (depending on which is smaller).
|
|
10295
|
+
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.
|
|
10250
10296
|
return getCss({
|
|
10251
10297
|
'@global': {
|
|
10252
10298
|
':host': {
|
|
@@ -10255,7 +10301,8 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
10255
10301
|
})),
|
|
10256
10302
|
...addImportantToEachRule({
|
|
10257
10303
|
outline: 0, // custom element is able to delegate the focus
|
|
10258
|
-
|
|
10304
|
+
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct gap definition based on ex-unit
|
|
10305
|
+
gap,
|
|
10259
10306
|
...colorSchemeStyles,
|
|
10260
10307
|
...hostHiddenStyles,
|
|
10261
10308
|
...buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
@@ -10267,15 +10314,16 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
10267
10314
|
},
|
|
10268
10315
|
...preventFoucOfNestedElementsStyles,
|
|
10269
10316
|
button: {
|
|
10317
|
+
position: 'relative', // ensures relative positioning for ::before pseudo element
|
|
10270
10318
|
display: 'flex',
|
|
10271
10319
|
alignItems: 'center',
|
|
10272
10320
|
flexShrink: 0,
|
|
10273
|
-
width: `calc(${
|
|
10274
|
-
height:
|
|
10321
|
+
width: `calc(${dimension} * 2 - ${borderWidthBase} * 2)`,
|
|
10322
|
+
height: dimension,
|
|
10275
10323
|
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
10276
10324
|
boxSizing: 'content-box',
|
|
10277
10325
|
border: `${borderWidthBase} solid ${buttonBorderColor}`,
|
|
10278
|
-
borderRadius: `calc((${
|
|
10326
|
+
borderRadius: `calc((${dimension} + ${borderWidthBase} * 2) / 2)`,
|
|
10279
10327
|
backgroundColor: buttonBackgroundColor,
|
|
10280
10328
|
cursor: isDisabledOrLoading(disabled, loading) ? 'not-allowed' : 'pointer',
|
|
10281
10329
|
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
@@ -10285,6 +10333,7 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
10285
10333
|
}),
|
|
10286
10334
|
margin: 0, // Removes default button margin on safari 15
|
|
10287
10335
|
padding: 0,
|
|
10336
|
+
marginTop,
|
|
10288
10337
|
WebkitAppearance: 'none', // iOS safari
|
|
10289
10338
|
appearance: 'none',
|
|
10290
10339
|
...(!isDisabledOrLoading(disabled, loading) &&
|
|
@@ -10305,6 +10354,13 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
10305
10354
|
},
|
|
10306
10355
|
})),
|
|
10307
10356
|
...getFocusJssStyle(theme),
|
|
10357
|
+
'&::before': {
|
|
10358
|
+
// Ensures the touch target is at least 24px, even if the switch is smaller than the minimum touch target size.
|
|
10359
|
+
// This pseudo-element expands the clickable area without affecting the visual size of the switch itself.
|
|
10360
|
+
content: '""',
|
|
10361
|
+
position: 'absolute',
|
|
10362
|
+
inset,
|
|
10363
|
+
},
|
|
10308
10364
|
},
|
|
10309
10365
|
label: {
|
|
10310
10366
|
...textSmallStyle,
|
|
@@ -10319,22 +10375,22 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
10319
10375
|
// 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
|
|
10320
10376
|
order: alignLabelValue === 'left' || alignLabelValue === 'start' ? -1 : 0,
|
|
10321
10377
|
})), buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, {
|
|
10322
|
-
paddingTop
|
|
10378
|
+
paddingTop,
|
|
10323
10379
|
}))),
|
|
10324
10380
|
},
|
|
10325
10381
|
},
|
|
10326
10382
|
toggle: {
|
|
10327
10383
|
display: 'flex',
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
width: `calc(${
|
|
10331
|
-
height: `calc(${
|
|
10384
|
+
placeItems: 'center',
|
|
10385
|
+
placeContent: 'center',
|
|
10386
|
+
width: `calc(${dimension} - ${borderWidthBase} * 2)`,
|
|
10387
|
+
height: `calc(${dimension} - ${borderWidthBase} * 2)`,
|
|
10332
10388
|
borderRadius: '50%',
|
|
10333
10389
|
backgroundColor: toggleBackgroundColor,
|
|
10334
10390
|
transition: `${getTransition('background-color')}, ${getTransition('transform')}`,
|
|
10335
|
-
transform: `translate3d(${checked ?
|
|
10391
|
+
transform: `translate3d(${checked ? `calc(100% + ${borderWidthBase})` : borderWidthBase}, 0, 0)`,
|
|
10336
10392
|
'&:dir(rtl)': {
|
|
10337
|
-
transform: `translate3d(${checked ?
|
|
10393
|
+
transform: `translate3d(calc(${checked ? `calc(100% + ${borderWidthBase})` : borderWidthBase} * -1), 0, 0)`,
|
|
10338
10394
|
},
|
|
10339
10395
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
10340
10396
|
backgroundColor: toggleBackgroundColorDark,
|
|
@@ -10342,8 +10398,8 @@ const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
10342
10398
|
},
|
|
10343
10399
|
...(loading && {
|
|
10344
10400
|
spinner: {
|
|
10345
|
-
width:
|
|
10346
|
-
height:
|
|
10401
|
+
width: dimensionFull,
|
|
10402
|
+
height: dimensionFull,
|
|
10347
10403
|
},
|
|
10348
10404
|
}),
|
|
10349
10405
|
// .loading
|
|
@@ -10949,6 +11005,7 @@ const showCustomCalendarOrTimeIndicator = (isCalendar, isTime) => {
|
|
|
10949
11005
|
|
|
10950
11006
|
const cssVariableInputPaddingStart = '--p-internal-text-field-input-padding-start';
|
|
10951
11007
|
const cssVariableInputPaddingEnd = '--p-internal-text-field-input-padding-end';
|
|
11008
|
+
const cssVarInternalTextFieldScaling = '--p-internal-text-field-scaling';
|
|
10952
11009
|
const getComponentCss$8 = (isDisabled, isReadonly, hideLabel, state, hasUnitOrVisibleCounter, unitPosition, inputType, showPasswordToggle, isWithinForm, hasSubmitButton, theme, unitLength) => {
|
|
10953
11010
|
const isSearch = isType(inputType, 'search');
|
|
10954
11011
|
const isPassword = isType(inputType, 'password');
|
|
@@ -10962,6 +11019,12 @@ const getComponentCss$8 = (isDisabled, isReadonly, hideLabel, state, hasUnitOrVi
|
|
|
10962
11019
|
const counterCharacterLengthCssVar = 'var(--p-internal-counter-character-length)';
|
|
10963
11020
|
const paddingInlineIfUnitOrCounter = hasUnitOrVisibleCounter &&
|
|
10964
11021
|
`calc(${formElementLayeredGap} + ${formElementPaddingHorizontal} + ${borderWidthBase} + ${counterCharacterLengthCssVar} * 1ch * log(2.6))`;
|
|
11022
|
+
// Determines the scaling factor for the text field size. In "compact" mode, it uses 0.5 to achieve a 36px text field (compact size).
|
|
11023
|
+
// Defaults to 1 for the standard size and can be overridden by the CSS variable `cssVarInternalTextFieldScaling`.
|
|
11024
|
+
const scalingVar = `var(${cssVarInternalTextFieldScaling}, 1)`;
|
|
11025
|
+
const paddingBlock = `max(2px, ${formElementPaddingVertical} * ${scalingVar})`;
|
|
11026
|
+
const paddingInline = `max(4px, ${formElementPaddingHorizontal} * ${scalingVar})`;
|
|
11027
|
+
const height = `max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px))`;
|
|
10965
11028
|
return getCss({
|
|
10966
11029
|
'@global': {
|
|
10967
11030
|
':host': {
|
|
@@ -10976,7 +11039,11 @@ const getComponentCss$8 = (isDisabled, isReadonly, hideLabel, state, hasUnitOrVi
|
|
|
10976
11039
|
...addImportantToEachRule({
|
|
10977
11040
|
...getSlottedTextFieldTextareaSelectStyles('input', state, false, theme, {
|
|
10978
11041
|
gridArea: '1/1/1/-1',
|
|
10979
|
-
|
|
11042
|
+
paddingBlock,
|
|
11043
|
+
paddingInline,
|
|
11044
|
+
width: 'auto',
|
|
11045
|
+
height,
|
|
11046
|
+
boxSizing: 'content-box',
|
|
10980
11047
|
paddingInlineStart: hasUnitOrVisibleCounter && unitPosition === 'prefix'
|
|
10981
11048
|
? paddingInlineIfUnitOrCounter
|
|
10982
11049
|
: `var(${cssVariableInputPaddingStart})`, // iOS Safari 14.5 can't handle padding-inline shorthand with css variables
|
|
@@ -11012,10 +11079,10 @@ const getComponentCss$8 = (isDisabled, isReadonly, hideLabel, state, hasUnitOrVi
|
|
|
11012
11079
|
root: {
|
|
11013
11080
|
[cssVariableInputPaddingStart]: isSearchWithoutFormOrSubmitButton
|
|
11014
11081
|
? getCalculatedFormElementPaddingHorizontal(1)
|
|
11015
|
-
:
|
|
11082
|
+
: paddingInline,
|
|
11016
11083
|
[cssVariableInputPaddingEnd]: isSearchOrPassword || isCalendarOrTimeWithCustomIndicator
|
|
11017
11084
|
? getCalculatedFormElementPaddingHorizontal(isSearchWithForm && hasSubmitButton ? 2 : 1)
|
|
11018
|
-
:
|
|
11085
|
+
: paddingInline,
|
|
11019
11086
|
display: 'grid',
|
|
11020
11087
|
gap: spacingStaticXSmall,
|
|
11021
11088
|
// 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.
|
|
@@ -3460,7 +3460,7 @@ const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-des
|
|
|
3460
3460
|
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" } } };
|
|
3461
3461
|
|
|
3462
3462
|
// index.ts
|
|
3463
|
-
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" };
|
|
3463
|
+
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" };
|
|
3464
3464
|
|
|
3465
3465
|
// index.ts
|
|
3466
3466
|
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/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/select.wrapper.cjs
CHANGED
|
@@ -7,21 +7,21 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var select = require('../dsr-components/select.cjs');
|
|
9
9
|
|
|
10
|
-
const PSelect = /*#__PURE__*/ react.forwardRef(({ description = '', disabled = false, dropdownDirection = 'auto', form, hideLabel = false, label = '', message = '', name, onUpdate, required = false, state = 'none', theme, value, className, children, ...rest }, ref) => {
|
|
10
|
+
const PSelect = /*#__PURE__*/ react.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) => {
|
|
11
11
|
const elementRef = react.useRef(undefined);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
13
13
|
const WebComponentTag = hooks.usePrefix('p-select');
|
|
14
|
-
const propsToSync = [description, disabled, dropdownDirection, form, hideLabel, label, message, name, required, state, theme || hooks.useTheme(), value];
|
|
14
|
+
const propsToSync = [compact, description, disabled, dropdownDirection, form, hideLabel, label, message, name, required, state, theme || hooks.useTheme(), value];
|
|
15
15
|
hooks.useBrowserLayoutEffect(() => {
|
|
16
16
|
const { current } = elementRef;
|
|
17
|
-
['description', 'disabled', 'dropdownDirection', 'form', 'hideLabel', 'label', 'message', 'name', 'required', 'state', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
['compact', 'description', 'disabled', 'dropdownDirection', 'form', 'hideLabel', 'label', 'message', 'name', 'required', 'state', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
18
|
}, propsToSync);
|
|
19
19
|
const props = {
|
|
20
20
|
...rest,
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
...(!process.browser
|
|
23
23
|
? {
|
|
24
|
-
children: (jsxRuntime.jsx(select.DSRSelect, { description, disabled, dropdownDirection, form, hideLabel, label, message, name, required, state, theme: theme || hooks.useTheme(), value, children })),
|
|
24
|
+
children: (jsxRuntime.jsx(select.DSRSelect, { compact, description, disabled, dropdownDirection, form, hideLabel, label, message, name, required, state, theme: theme || hooks.useTheme(), value, children })),
|
|
25
25
|
}
|
|
26
26
|
: {
|
|
27
27
|
children,
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.cjs
CHANGED
|
@@ -7,22 +7,22 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var _switch = require('../dsr-components/switch.cjs');
|
|
9
9
|
|
|
10
|
-
const PSwitch = /*#__PURE__*/ react.forwardRef(({ alignLabel = 'end', checked = false, disabled = false, hideLabel = false, loading = false, onSwitchChange, onUpdate, stretch = false, theme, className, children, ...rest }, ref) => {
|
|
10
|
+
const PSwitch = /*#__PURE__*/ react.forwardRef(({ alignLabel = 'end', checked = false, compact = false, disabled = false, hideLabel = false, loading = false, onSwitchChange, onUpdate, stretch = false, theme, className, children, ...rest }, ref) => {
|
|
11
11
|
const elementRef = react.useRef(undefined);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'switchChange', onSwitchChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-switch');
|
|
15
|
-
const propsToSync = [alignLabel, checked, disabled, hideLabel, loading, stretch, theme || hooks.useTheme()];
|
|
15
|
+
const propsToSync = [alignLabel, checked, compact, disabled, hideLabel, loading, stretch, theme || hooks.useTheme()];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['alignLabel', 'checked', 'disabled', 'hideLabel', 'loading', 'stretch', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['alignLabel', 'checked', 'compact', 'disabled', 'hideLabel', 'loading', 'stretch', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
22
22
|
// @ts-ignore
|
|
23
23
|
...(!process.browser
|
|
24
24
|
? {
|
|
25
|
-
children: (jsxRuntime.jsx(_switch.DSRSwitch, { alignLabel, checked, disabled, hideLabel, loading, stretch, theme: theme || hooks.useTheme(), children })),
|
|
25
|
+
children: (jsxRuntime.jsx(_switch.DSRSwitch, { alignLabel, checked, compact, disabled, hideLabel, loading, stretch, theme: theme || hooks.useTheme(), children })),
|
|
26
26
|
}
|
|
27
27
|
: {
|
|
28
28
|
children,
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var wordmark_wrapper = require('../components/wordmark.wrapper.cjs');
|
|
|
20
20
|
* @slot {"name": "footer", "description": "Renders a **sticky** footer section underneath the main content." }
|
|
21
21
|
* @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." }
|
|
22
22
|
* @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." }
|
|
23
|
+
* @slot {"name": "sidebar-end-header", "description": "Renders in the header section of the sidebar end area." }
|
|
23
24
|
* @slot {"name": "background", "description": "Can be used to pass a sticky media element <img/> or <video/> placed underneath the main content." }
|
|
24
25
|
*
|
|
25
26
|
* @experimental
|
|
@@ -30,6 +31,7 @@ class DSRCanvas extends react.Component {
|
|
|
30
31
|
isMediaQueryM = false;
|
|
31
32
|
hasTitle;
|
|
32
33
|
hasSidebarEnd;
|
|
34
|
+
hasSidebarEndHeader;
|
|
33
35
|
hasFooter;
|
|
34
36
|
hasBackground;
|
|
35
37
|
sidebarStart;
|
|
@@ -40,10 +42,11 @@ class DSRCanvas extends react.Component {
|
|
|
40
42
|
const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
|
|
41
43
|
const hasTitle = namedSlotChildren.filter(({ props: { slot } }) => slot === 'title').length > 0;
|
|
42
44
|
const hasSidebarEnd = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sidebar-end').length > 0;
|
|
45
|
+
const hasSidebarEndHeader = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sidebar-end-header').length > 0;
|
|
43
46
|
const hasFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'footer').length > 0;
|
|
44
47
|
const hasBackground = namedSlotChildren.filter(({ props: { slot } }) => slot === 'background').length > 0;
|
|
45
48
|
const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getCanvasCss(this.props.theme, this.props.sidebarStartOpen, this.props.sidebarEndOpen)));
|
|
46
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsxs("header", { className: "header", tabIndex: -1, children: [jsxRuntime.jsxs("div", { className: "blur", children: [jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {})] }), jsxRuntime.jsxs("div", { className: "header__area header__area--start", children: [!this.props.sidebarStartOpen && (jsxRuntime.jsxs(button_wrapper.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"] })), jsxRuntime.jsx("slot", { name: "header-start" })] }), jsxRuntime.jsx(crest_wrapper.PCrest, { className: "header__crest" }), jsxRuntime.jsx(wordmark_wrapper.PWordmark, { className: "header__wordmark", size: "inherit", theme: this.props.theme }), jsxRuntime.jsx("div", { className: "header__area header__area--end", children: jsxRuntime.jsx("slot", { name: "header-end" }) })] }), this.props.isMediaQueryS && (jsxRuntime.jsx("aside", { className: "sidebar sidebar--start", inert: !this.props.sidebarStartOpen, "aria-label": `Navigation sidebar ${this.props.sidebarStartOpen ? 'open' : 'closed'}`, tabIndex: -1, children: jsxRuntime.jsxs("div", { className: "sidebar__scroller", children: [jsxRuntime.jsxs("div", { className: "sidebar__header sidebar__header--start", children: [jsxRuntime.jsxs(button_wrapper.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 && (jsxRuntime.jsx("h2", { children: jsxRuntime.jsx("slot", { name: "title" }) }))] }), jsxRuntime.jsx("div", { className: "sidebar__content", children: jsxRuntime.jsx("slot", { name: "sidebar-start" }) })] }) })), jsxRuntime.jsx("main", { className: "main", children: jsxRuntime.jsx("slot", {}) }), hasSidebarEnd && this.props.isMediaQueryM && (jsxRuntime.jsx("aside", { className: "sidebar sidebar--end", inert: !this.props.sidebarEndOpen, "aria-label": `Settings sidebar ${this.props.sidebarEndOpen ? 'open' : 'closed'}`, tabIndex: -1, children: jsxRuntime.jsxs("div", { className: "sidebar__scroller", children: [jsxRuntime.
|
|
49
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsxs("header", { className: "header", tabIndex: -1, children: [jsxRuntime.jsxs("div", { className: "blur", children: [jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {})] }), jsxRuntime.jsxs("div", { className: "header__area header__area--start", children: [!this.props.sidebarStartOpen && (jsxRuntime.jsxs(button_wrapper.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"] })), jsxRuntime.jsx("slot", { name: "header-start" })] }), jsxRuntime.jsx(crest_wrapper.PCrest, { className: "header__crest" }), jsxRuntime.jsx(wordmark_wrapper.PWordmark, { className: "header__wordmark", size: "inherit", theme: this.props.theme }), jsxRuntime.jsx("div", { className: "header__area header__area--end", children: jsxRuntime.jsx("slot", { name: "header-end" }) })] }), this.props.isMediaQueryS && (jsxRuntime.jsx("aside", { className: "sidebar sidebar--start", inert: !this.props.sidebarStartOpen, "aria-label": `Navigation sidebar ${this.props.sidebarStartOpen ? 'open' : 'closed'}`, tabIndex: -1, children: jsxRuntime.jsxs("div", { className: "sidebar__scroller", children: [jsxRuntime.jsxs("div", { className: "sidebar__header sidebar__header--start", children: [jsxRuntime.jsxs(button_wrapper.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 && (jsxRuntime.jsx("h2", { children: jsxRuntime.jsx("slot", { name: "title" }) }))] }), jsxRuntime.jsx("div", { className: "sidebar__content", children: jsxRuntime.jsx("slot", { name: "sidebar-start" }) })] }) })), jsxRuntime.jsx("main", { className: "main", children: jsxRuntime.jsx("slot", {}) }), hasSidebarEnd && this.props.isMediaQueryM && (jsxRuntime.jsx("aside", { className: "sidebar sidebar--end", inert: !this.props.sidebarEndOpen, "aria-label": `Settings sidebar ${this.props.sidebarEndOpen ? 'open' : 'closed'}`, tabIndex: -1, children: jsxRuntime.jsxs("div", { className: "sidebar__scroller", children: [jsxRuntime.jsxs("div", { className: "sidebar__header sidebar__header--end", children: [jsxRuntime.jsx("slot", { name: "sidebar-end-header" }), jsxRuntime.jsxs(button_wrapper.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"] })] }), jsxRuntime.jsx("div", { className: "sidebar__content", children: jsxRuntime.jsx("slot", { name: "sidebar-end" }) })] }) })), hasFooter && (jsxRuntime.jsx("footer", { className: "footer", children: jsxRuntime.jsx("slot", { name: "footer" }) })), hasBackground && jsxRuntime.jsx("slot", { name: "background" })] }), !this.props.isMediaQueryS && (jsxRuntime.jsxs(flyout_wrapper.PFlyout, { className: "flyout-start", theme: this.props.theme, open: this.props.sidebarStartOpen, position: "start", children: [hasTitle && (jsxRuntime.jsx("h2", { slot: "header", children: jsxRuntime.jsx("slot", { name: "title" }) })), jsxRuntime.jsx("slot", { name: "sidebar-start" })] })), hasSidebarEnd && !this.props.isMediaQueryM && (jsxRuntime.jsxs(flyout_wrapper.PFlyout, { className: "flyout-end", theme: this.props.theme, open: this.props.sidebarEndOpen, position: "end", children: [hasSidebarEndHeader && jsxRuntime.jsx("slot", { slot: "header", name: "sidebar-end-header" }), jsxRuntime.jsx("slot", { name: "sidebar-end" })] }))] })] }), this.props.children] }));
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs
CHANGED
|
@@ -55,7 +55,7 @@ class DSRSelect extends react.Component {
|
|
|
55
55
|
const selectMessageId = (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) ? stateMessage.messageId : undefined;
|
|
56
56
|
const initialStatusId = 'initial-status';
|
|
57
57
|
const ariaDescribedBy = [descriptionId, selectMessageId, initialStatusId].filter(Boolean).join(' ');
|
|
58
|
-
const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getSelectCss('down', this.props.isOpen, this.props.disabled, this.props.hideLabel, this.props.state, this.props.isNativePopoverCase, this.props.theme, !!this.props.slottedImagePath)));
|
|
58
|
+
const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getSelectCss('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)));
|
|
59
59
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, htmlFor: buttonId, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxRuntime.jsxs("div", { className: `wrapper${this.props.disabled ? ' disabled' : ''}`, children: [jsxRuntime.jsx("button", { "aria-invalid": this.props.state === 'error' ? 'true' : null, type: "button", role: "combobox", id: buttonId, ...utilsEntry.getComboboxAriaAttributes(this.props.isOpen, this.props.required, label.labelId, ariaDescribedBy, dropdownId), disabled: this.props.disabled, children: this.props.slottedImagePath ? (jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("img", { src: this.props.slottedImagePath, alt: "" }), jsxRuntime.jsx("span", { children: utilsEntry.getSelectedOptionString(otherChildren) })] })) : (utilsEntry.getSelectedOptionString(otherChildren)) }), jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: this.props.disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" }), jsxRuntime.jsx("div", { ...(this.props.isNativePopoverCase && {
|
|
60
60
|
popover: 'auto',
|
|
61
61
|
className: 'popover',
|