@porsche-design-system/components-react 3.28.0-rc.1 → 3.28.0-rc.3
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 +684 -657
- package/LICENSE.md +1 -1
- package/package.json +5 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +155 -89
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +0 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.cjs +6 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.cjs +4 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.cjs +6 -2
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +155 -89
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +6 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.mjs +4 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.mjs +7 -3
- package/ssr/esm/lib/dsr-components/banner.d.ts +1 -1
- package/ssr/esm/lib/dsr-components/canvas.d.ts +0 -4
- package/ssr/esm/lib/dsr-components/link.d.ts +1 -1
- package/tailwind/index.css +348 -0
|
@@ -4096,6 +4096,10 @@ const getBannerPopoverResetStyles = () => {
|
|
|
4096
4096
|
};
|
|
4097
4097
|
};
|
|
4098
4098
|
|
|
4099
|
+
/**
|
|
4100
|
+
* @css-variable {"name": "--p-banner-position-top", "description": "Position top of banner", "defaultValue": "56px"}
|
|
4101
|
+
* @css-variable {"name": "--p-banner-position-bottom", "description": "Position bottom of banner. Only has an effect below breakpoint 's'.", "defaultValue": "56px"}
|
|
4102
|
+
*/
|
|
4099
4103
|
const cssVariableTop = '--p-banner-position-top';
|
|
4100
4104
|
const cssVariableBottom = '--p-banner-position-bottom';
|
|
4101
4105
|
const cssVariableZIndex = '--p-internal-banner-z-index';
|
|
@@ -5034,6 +5038,9 @@ const getComponentCss$16 = (theme, isSidebarStartOpen, isSidebarEndOpen) => {
|
|
|
5034
5038
|
});
|
|
5035
5039
|
};
|
|
5036
5040
|
|
|
5041
|
+
/**
|
|
5042
|
+
* @css-variable {"name": "--p-carousel-prev-next-filter", "description": "CSS Filter applied to the navigation (prev/next buttons)", "defaultValue": "none"}
|
|
5043
|
+
*/
|
|
5037
5044
|
const cssVariablePrevNextFilter = '--p-carousel-prev-next-filter';
|
|
5038
5045
|
const cssVariableGradientColorWidth = '--p-gradient-color-width';
|
|
5039
5046
|
const carouselTransitionDuration = motionDurationModerate;
|
|
@@ -5527,8 +5534,12 @@ const getFunctionalComponentStateMessageStyles = (theme, state, additionalDefaul
|
|
|
5527
5534
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5528
5535
|
color: getThemedFormStateColors('dark', state).formStateColor,
|
|
5529
5536
|
}),
|
|
5530
|
-
transition: getTransition('color'),
|
|
5537
|
+
transition: `${getTransition('color')}, ${getTransition('opacity')}`,
|
|
5531
5538
|
...additionalDefaultJssStyle,
|
|
5539
|
+
'&:empty': {
|
|
5540
|
+
opacity: '0',
|
|
5541
|
+
position: 'absolute',
|
|
5542
|
+
},
|
|
5532
5543
|
},
|
|
5533
5544
|
};
|
|
5534
5545
|
};
|
|
@@ -5635,13 +5646,112 @@ const getComponentCss$14 = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5635
5646
|
});
|
|
5636
5647
|
};
|
|
5637
5648
|
|
|
5649
|
+
const cssVarInternalCheckboxScaling = '--p-internal-checkbox-scaling';
|
|
5650
|
+
const getCheckboxBaseStyles = (theme, isDisabled, isLoading, state, compact) => {
|
|
5651
|
+
const { contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
5652
|
+
const { contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark } = getThemedColors('dark');
|
|
5653
|
+
const { formStateColor } = getThemedFormStateColors(theme, state);
|
|
5654
|
+
const { formStateColor: formStateColorDark } = getThemedFormStateColors('dark', state);
|
|
5655
|
+
const disabledOrLoading = isDisabledOrLoading(isDisabled, isLoading);
|
|
5656
|
+
// TODO: needs to be extracted into a color function
|
|
5657
|
+
const uncheckedColor = disabledOrLoading ? disabledColor : formStateColor || contrastMediumColor;
|
|
5658
|
+
const uncheckedColorDark = disabledOrLoading ? disabledColorDark : formStateColorDark || contrastMediumColorDark;
|
|
5659
|
+
const background = `transparent 0% 0% / ${fontLineHeight}`;
|
|
5660
|
+
const minimumTouchTargetSize = '24px'; // Minimum touch target size to comply with accessibility guidelines.
|
|
5661
|
+
const scalingVar = `var(${cssVarInternalCheckboxScaling}, ${compact ? 0.6668 : 1})`;
|
|
5662
|
+
// Determines the scaling factor for the checkbox size. In "compact" mode, it uses 0.6668 to achieve a 20px checkbox (compact size).
|
|
5663
|
+
// Defaults to 1 for the standard size and can be overridden by the CSS variable `cssVarInternalCheckboxScaling`.
|
|
5664
|
+
const dimension = `calc(max(${SCALING_BASE_VALUE} * 0.75, ${scalingVar} * ${fontLineHeight}))`;
|
|
5665
|
+
// Calculates the checkbox size and ensures a minimum size of 12px (0.75 * SCALING_BASE_VALUE).
|
|
5666
|
+
// Scales proportionally with the line height and the scaling factor.
|
|
5667
|
+
const dimensionFull = `calc(${dimension} + ${borderWidthBase} * 2)`; // Calculates the total size of the checkbox including its borders.
|
|
5668
|
+
const touchTargetSizeDiff = `calc(${minimumTouchTargetSize} - ${dimensionFull})`; // Difference between the minimum touch target size and the checkbox full size.
|
|
5669
|
+
const inset = `calc(-${borderWidthBase} - max(0px, ${touchTargetSizeDiff} / 2))`; // Positions the checkbox ::before pseudo-element with a negative offset to align it with the touch target.
|
|
5670
|
+
return {
|
|
5671
|
+
position: 'relative',
|
|
5672
|
+
'&::before': {
|
|
5673
|
+
// Ensures the touch target is at least 24px, even if the checkbox is smaller than the minimum touch target size.
|
|
5674
|
+
// This pseudo-element expands the clickable area without affecting the visual size of the checkbox itself.
|
|
5675
|
+
content: '""',
|
|
5676
|
+
position: 'absolute',
|
|
5677
|
+
inset,
|
|
5678
|
+
},
|
|
5679
|
+
width: dimension,
|
|
5680
|
+
height: dimension,
|
|
5681
|
+
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
5682
|
+
display: 'block',
|
|
5683
|
+
margin: 0,
|
|
5684
|
+
padding: 0,
|
|
5685
|
+
WebkitAppearance: 'none', // iOS safari
|
|
5686
|
+
appearance: 'none',
|
|
5687
|
+
boxSizing: 'content-box',
|
|
5688
|
+
background,
|
|
5689
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}`,
|
|
5690
|
+
border: `${borderWidthBase} solid ${uncheckedColor}`,
|
|
5691
|
+
outline: 0, // TODO: only relevant for VRT testing with forced states - prevents :focus style (in case getFocusJssStyle() condition is not matching)
|
|
5692
|
+
...(disabledOrLoading
|
|
5693
|
+
? {
|
|
5694
|
+
pointerEvents: 'none', // to prevent form element becomes clickable/toggleable
|
|
5695
|
+
}
|
|
5696
|
+
: {
|
|
5697
|
+
cursor: 'pointer',
|
|
5698
|
+
}),
|
|
5699
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5700
|
+
borderColor: uncheckedColorDark,
|
|
5701
|
+
}),
|
|
5702
|
+
gridArea: '1/1',
|
|
5703
|
+
borderRadius: borderRadiusSmall,
|
|
5704
|
+
...addImportantToEachRule({
|
|
5705
|
+
backgroundSize: 'cover',
|
|
5706
|
+
}),
|
|
5707
|
+
};
|
|
5708
|
+
};
|
|
5709
|
+
|
|
5638
5710
|
const getCheckedSVGBackgroundImage$1 = (fill) => {
|
|
5639
5711
|
return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20.22,7.47l-1.47-1.42-9.26,9.02-4.24-4.15-1.47,1.42,5.71,5.6,10.73-10.47Z"/>`);
|
|
5640
5712
|
};
|
|
5713
|
+
const getCheckboxCheckedBaseStyles = (theme, isDisabled, isLoading, state) => {
|
|
5714
|
+
const { primaryColor, disabledColor } = getThemedColors(theme);
|
|
5715
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark } = getThemedColors('dark');
|
|
5716
|
+
const { formStateColor } = getThemedFormStateColors(theme, state);
|
|
5717
|
+
const { formStateColor: formStateColorDark } = getThemedFormStateColors('dark', state);
|
|
5718
|
+
const { canvasTextColor } = getHighContrastColors();
|
|
5719
|
+
const disabledOrLoading = isDisabledOrLoading(isDisabled, isLoading);
|
|
5720
|
+
// TODO: needs to be extracted into a color function
|
|
5721
|
+
const checkedColor = isHighContrastMode
|
|
5722
|
+
? canvasTextColor
|
|
5723
|
+
: disabledOrLoading
|
|
5724
|
+
? disabledColor
|
|
5725
|
+
: formStateColor || primaryColor;
|
|
5726
|
+
const checkedColorDark = isHighContrastMode
|
|
5727
|
+
? canvasTextColor
|
|
5728
|
+
: disabledOrLoading
|
|
5729
|
+
? disabledColorDark
|
|
5730
|
+
: formStateColorDark || primaryColorDark;
|
|
5731
|
+
const checkedIconColor = escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
|
|
5732
|
+
const checkedIconColorDark = escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
5733
|
+
return {
|
|
5734
|
+
borderColor: checkedColor,
|
|
5735
|
+
backgroundColor: checkedColor,
|
|
5736
|
+
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColor),
|
|
5737
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5738
|
+
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColorDark),
|
|
5739
|
+
borderColor: checkedColorDark,
|
|
5740
|
+
backgroundColor: checkedColorDark,
|
|
5741
|
+
}),
|
|
5742
|
+
// This is a workaround for Blink based browsers, which do not reflect the high contrast system colors (e.g.: "Canvas" and "CanvasText") when added to background SVG's.
|
|
5743
|
+
...(isHighContrastMode &&
|
|
5744
|
+
getSchemedHighContrastMediaQuery({
|
|
5745
|
+
backgroundImage: getCheckedSVGBackgroundImage$1('white'),
|
|
5746
|
+
}, {
|
|
5747
|
+
backgroundImage: getCheckedSVGBackgroundImage$1('black'),
|
|
5748
|
+
})),
|
|
5749
|
+
};
|
|
5750
|
+
};
|
|
5751
|
+
|
|
5641
5752
|
const getIndeterminateSVGBackgroundImage = (fill) => {
|
|
5642
5753
|
return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20,11v2H4v-2h16Z"/>`);
|
|
5643
5754
|
};
|
|
5644
|
-
const cssVarInternalCheckboxScaling = '--p-internal-checkbox-scaling';
|
|
5645
5755
|
const getComponentCss$13 = (hideLabel, state, isDisabled, isLoading, compact, theme) => {
|
|
5646
5756
|
const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
5647
5757
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
@@ -5666,8 +5776,6 @@ const getComponentCss$13 = (hideLabel, state, isDisabled, isLoading, compact, th
|
|
|
5666
5776
|
: formStateColorDark || primaryColorDark;
|
|
5667
5777
|
const checkedHoverColor = formStateHoverColor || contrastHighColor;
|
|
5668
5778
|
const checkedHoverColorDark = formStateHoverColorDark || contrastHighColorDark;
|
|
5669
|
-
const checkedIconColor = escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
|
|
5670
|
-
const checkedIconColorDark = escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
5671
5779
|
const indeterminateIconColor = escapeHashCharacter(disabledOrLoading ? disabledColorDark : formStateColor || primaryColor);
|
|
5672
5780
|
const indeterminateIconColorDark = escapeHashCharacter(formStateColorDark || primaryColorDark);
|
|
5673
5781
|
const indeterminateIconHoverColor = escapeHashCharacter(formStateHoverColor || primaryColor);
|
|
@@ -5675,18 +5783,11 @@ const getComponentCss$13 = (hideLabel, state, isDisabled, isLoading, compact, th
|
|
|
5675
5783
|
const background = `transparent 0% 0% / ${fontLineHeight}`;
|
|
5676
5784
|
const minimumTouchTargetSize = '24px'; // Minimum touch target size to comply with accessibility guidelines.
|
|
5677
5785
|
const scalingVar = `var(${cssVarInternalCheckboxScaling}, ${compact ? 0.6668 : 1})`;
|
|
5678
|
-
// Determines the scaling factor for the checkbox size. In "compact" mode, it uses 0.6668 to achieve a 20px checkbox (compact size).
|
|
5679
|
-
// Defaults to 1 for the standard size and can be overridden by the CSS variable `cssVarInternalCheckboxScaling`.
|
|
5680
5786
|
const dimension = `calc(max(${SCALING_BASE_VALUE} * 0.75, ${scalingVar} * ${fontLineHeight}))`;
|
|
5681
|
-
// Calculates the checkbox size and ensures a minimum size of 12px (0.75 * SCALING_BASE_VALUE).
|
|
5682
|
-
// Scales proportionally with the line height and the scaling factor.
|
|
5683
5787
|
const dimensionFull = `calc(${dimension} + ${borderWidthBase} * 2)`; // Calculates the total size of the checkbox including its borders.
|
|
5684
5788
|
const touchTargetSizeDiff = `calc(${minimumTouchTargetSize} - ${dimensionFull})`; // Difference between the minimum touch target size and the checkbox full size.
|
|
5685
5789
|
const paddingInlineStart = `calc(${spacingStaticSmall} - (max(0px, ${touchTargetSizeDiff})))`;
|
|
5686
|
-
// Adjusts padding to maintain consistent spacing when the checkbox is smaller than the minimum touch target size.
|
|
5687
|
-
// Uses asymmetric padding instead of `gap` to ensure there is no non-clickable area between the label and the input.
|
|
5688
5790
|
const paddingTop = `calc((${dimensionFull} - ${fontLineHeight}) / 2)`; // Vertically centers the checkbox label relative to the checkbox size.
|
|
5689
|
-
const inset = `calc(-${borderWidthBase} - max(0px, ${touchTargetSizeDiff} / 2))`; // Positions the checkbox ::before pseudo-element with a negative offset to align it with the touch target.
|
|
5690
5791
|
const height = `calc(max(${fontLineHeight}, ${dimensionFull}))`; // Ensures the wrapper height matches either the font's line height or the full size of the checkbox, whichever is larger.
|
|
5691
5792
|
return getCss({
|
|
5692
5793
|
'@global': {
|
|
@@ -5698,44 +5799,7 @@ const getComponentCss$13 = (hideLabel, state, isDisabled, isLoading, compact, th
|
|
|
5698
5799
|
}),
|
|
5699
5800
|
},
|
|
5700
5801
|
...preventFoucOfNestedElementsStyles,
|
|
5701
|
-
input:
|
|
5702
|
-
position: 'relative',
|
|
5703
|
-
'&::before': {
|
|
5704
|
-
// Ensures the touch target is at least 24px, even if the checkbox is smaller than the minimum touch target size.
|
|
5705
|
-
// This pseudo-element expands the clickable area without affecting the visual size of the checkbox itself.
|
|
5706
|
-
content: '""',
|
|
5707
|
-
position: 'absolute',
|
|
5708
|
-
inset,
|
|
5709
|
-
},
|
|
5710
|
-
width: dimension,
|
|
5711
|
-
height: dimension,
|
|
5712
|
-
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
5713
|
-
display: 'block',
|
|
5714
|
-
margin: 0,
|
|
5715
|
-
padding: 0,
|
|
5716
|
-
WebkitAppearance: 'none', // iOS safari
|
|
5717
|
-
appearance: 'none',
|
|
5718
|
-
boxSizing: 'content-box',
|
|
5719
|
-
background,
|
|
5720
|
-
transition: `${getTransition('background-color')}, ${getTransition('border-color')}`,
|
|
5721
|
-
border: `${borderWidthBase} solid ${uncheckedColor}`,
|
|
5722
|
-
outline: 0, // TODO: only relevant for VRT testing with forced states - prevents :focus style (in case getFocusJssStyle() condition is not matching)
|
|
5723
|
-
...(disabledOrLoading
|
|
5724
|
-
? {
|
|
5725
|
-
pointerEvents: 'none', // to prevent form element becomes clickable/toggleable
|
|
5726
|
-
}
|
|
5727
|
-
: {
|
|
5728
|
-
cursor: 'pointer',
|
|
5729
|
-
}),
|
|
5730
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5731
|
-
borderColor: uncheckedColorDark,
|
|
5732
|
-
}),
|
|
5733
|
-
gridArea: '1/1',
|
|
5734
|
-
borderRadius: borderRadiusSmall,
|
|
5735
|
-
...addImportantToEachRule({
|
|
5736
|
-
backgroundSize: 'cover',
|
|
5737
|
-
}),
|
|
5738
|
-
},
|
|
5802
|
+
input: getCheckboxBaseStyles(theme, isDisabled, isLoading, state, compact),
|
|
5739
5803
|
...(isLoading
|
|
5740
5804
|
? {
|
|
5741
5805
|
'input:checked': {
|
|
@@ -5749,23 +5813,7 @@ const getComponentCss$13 = (hideLabel, state, isDisabled, isLoading, compact, th
|
|
|
5749
5813
|
},
|
|
5750
5814
|
}
|
|
5751
5815
|
: {
|
|
5752
|
-
'input:checked':
|
|
5753
|
-
borderColor: checkedColor,
|
|
5754
|
-
backgroundColor: checkedColor,
|
|
5755
|
-
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColor),
|
|
5756
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5757
|
-
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColorDark),
|
|
5758
|
-
borderColor: checkedColorDark,
|
|
5759
|
-
backgroundColor: checkedColorDark,
|
|
5760
|
-
}),
|
|
5761
|
-
// This is a workaround for Blink based browsers, which do not reflect the high contrast system colors (e.g.: "Canvas" and "CanvasText") when added to background SVG's.
|
|
5762
|
-
...(isHighContrastMode &&
|
|
5763
|
-
getSchemedHighContrastMediaQuery({
|
|
5764
|
-
backgroundImage: getCheckedSVGBackgroundImage$1('white'),
|
|
5765
|
-
}, {
|
|
5766
|
-
backgroundImage: getCheckedSVGBackgroundImage$1('black'),
|
|
5767
|
-
})),
|
|
5768
|
-
},
|
|
5816
|
+
'input:checked': getCheckboxCheckedBaseStyles(theme, isDisabled, isLoading, state),
|
|
5769
5817
|
'input:indeterminate': {
|
|
5770
5818
|
background, // Safari fix: ensures proper rendering of 'indeterminate' mode with 'checked' state.
|
|
5771
5819
|
borderColor: uncheckedColor, // Safari fix: ensures proper rendering of 'indeterminate' mode with 'checked' state.
|
|
@@ -6923,6 +6971,9 @@ const getDialogStickyAreaJssStyle = (area, theme) => {
|
|
|
6923
6971
|
};
|
|
6924
6972
|
};
|
|
6925
6973
|
|
|
6974
|
+
/**
|
|
6975
|
+
* @css-variable {"name": "--p-flyout-width", "description": "Width of the flyout.", "defaultValue": "auto"}
|
|
6976
|
+
*/
|
|
6926
6977
|
const cssVariableWidth$2 = '--p-flyout-width';
|
|
6927
6978
|
// TODO: we shouldn't expose --p-flyout-max-width
|
|
6928
6979
|
const cssVariableMaxWidth = '--p-flyout-max-width';
|
|
@@ -7523,7 +7574,7 @@ const getUnitCounterJssStyle = (isDisabled, isReadonly, theme) => {
|
|
|
7523
7574
|
}),
|
|
7524
7575
|
...(isReadonly && {
|
|
7525
7576
|
color: contrastHighColor,
|
|
7526
|
-
})
|
|
7577
|
+
}),
|
|
7527
7578
|
};
|
|
7528
7579
|
};
|
|
7529
7580
|
|
|
@@ -7597,12 +7648,11 @@ const getComponentCss$M = (disabled, hideLabel, state, toggle, compact, readOnly
|
|
|
7597
7648
|
borderColor: primaryColorDark,
|
|
7598
7649
|
}),
|
|
7599
7650
|
},
|
|
7600
|
-
...
|
|
7601
|
-
|
|
7602
|
-
|
|
7651
|
+
...(!disabled &&
|
|
7652
|
+
!readOnly &&
|
|
7653
|
+
hoverMediaQuery({
|
|
7603
7654
|
'&:hover:not(:has(.button:hover, input:focus ))': hoverStyles,
|
|
7604
|
-
}),
|
|
7605
|
-
}),
|
|
7655
|
+
})),
|
|
7606
7656
|
...(disabled && {
|
|
7607
7657
|
cursor: 'not-allowed',
|
|
7608
7658
|
color: disabledColor,
|
|
@@ -7631,14 +7681,11 @@ const getComponentCss$M = (disabled, hideLabel, state, toggle, compact, readOnly
|
|
|
7631
7681
|
},
|
|
7632
7682
|
}),
|
|
7633
7683
|
// .label / .required
|
|
7634
|
-
...getFunctionalComponentLabelStyles(disabled, hideLabel, theme,
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
}),
|
|
7640
|
-
}),
|
|
7641
|
-
}),
|
|
7684
|
+
...getFunctionalComponentLabelStyles(disabled, hideLabel, theme, !disabled &&
|
|
7685
|
+
!readOnly &&
|
|
7686
|
+
hoverMediaQuery({
|
|
7687
|
+
'&:hover~.wrapper': hoverStyles,
|
|
7688
|
+
})),
|
|
7642
7689
|
// .message
|
|
7643
7690
|
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
7644
7691
|
});
|
|
@@ -7680,12 +7727,12 @@ const getComponentCss$K = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
7680
7727
|
label: {
|
|
7681
7728
|
clip: addImportantToRule('unset'), // to overrule breakpoint customizable hide-label style
|
|
7682
7729
|
},
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
|
|
7730
|
+
...(isPrimary &&
|
|
7731
|
+
!isHighContrastMode && {
|
|
7732
|
+
icon: {
|
|
7686
7733
|
filter: 'invert(1)',
|
|
7687
|
-
}
|
|
7688
|
-
},
|
|
7734
|
+
},
|
|
7735
|
+
}),
|
|
7689
7736
|
}, hasSlottedAnchor && {
|
|
7690
7737
|
...(isHighContrastMode && {
|
|
7691
7738
|
root: {
|
|
@@ -8173,6 +8220,11 @@ const getComponentCss$G = (size) => {
|
|
|
8173
8220
|
});
|
|
8174
8221
|
};
|
|
8175
8222
|
|
|
8223
|
+
/**
|
|
8224
|
+
* @css-variable {"name": "--p-modal-width", "description": "Width of the modal.", "defaultValue": "auto"}
|
|
8225
|
+
* @css-variable {"name": "--p-modal-spacing-top", "description": "Spacing of the modal to the top.", "defaultValue": "clamp(16px, 10vh, 192px)"}
|
|
8226
|
+
* @css-variable {"name": "--p-modal-spacing-bottom", "description": "Spacing of the modal to the bottom.", "defaultValue": "clamp(16px, 10vh, 192px)"}
|
|
8227
|
+
*/
|
|
8176
8228
|
const cssVariableWidth$1 = '--p-modal-width';
|
|
8177
8229
|
const cssVariableSpacingTop = '--p-modal-spacing-top'; // TODO: maybe --p-modal-spacing-block-start would be more precise?
|
|
8178
8230
|
const cssVariableSpacingBottom = '--p-modal-spacing-bottom'; // TODO: maybe --p-modal-spacing-block-end would be more precise?
|
|
@@ -8563,7 +8615,10 @@ optionHeight, theme) => {
|
|
|
8563
8615
|
};
|
|
8564
8616
|
};
|
|
8565
8617
|
|
|
8566
|
-
const getComponentCss$D = (theme) => {
|
|
8618
|
+
const getComponentCss$D = (theme, isDisabled, selected) => {
|
|
8619
|
+
const dimension = `calc(max(${SCALING_BASE_VALUE} * 0.75, ${fontLineHeight}))`;
|
|
8620
|
+
const dimensionFull = `calc(${dimension} + ${borderWidthBase} * 2)`; // Calculates the total size of the checkbox including its borders.
|
|
8621
|
+
const paddingTop = `calc((${dimensionFull} - ${fontLineHeight}) / 2)`; // Vertically centers the checkbox label relative to the checkbox size.
|
|
8567
8622
|
return getCss({
|
|
8568
8623
|
'@global': {
|
|
8569
8624
|
':host': {
|
|
@@ -8573,11 +8628,19 @@ const getComponentCss$D = (theme) => {
|
|
|
8573
8628
|
...hostHiddenStyles,
|
|
8574
8629
|
}),
|
|
8575
8630
|
},
|
|
8576
|
-
|
|
8631
|
+
slot: {
|
|
8632
|
+
display: 'block',
|
|
8633
|
+
paddingTop,
|
|
8634
|
+
},
|
|
8635
|
+
},
|
|
8636
|
+
option: {
|
|
8637
|
+
...getOptionJssStyle('multi-select-option', 1, theme),
|
|
8638
|
+
columnGap: '8px',
|
|
8577
8639
|
},
|
|
8578
|
-
option: getOptionJssStyle('multi-select-option', 1, theme),
|
|
8579
8640
|
checkbox: {
|
|
8580
|
-
|
|
8641
|
+
flexShrink: 0,
|
|
8642
|
+
...getCheckboxBaseStyles(theme, isDisabled),
|
|
8643
|
+
...(selected && getCheckboxCheckedBaseStyles(theme, isDisabled)),
|
|
8581
8644
|
},
|
|
8582
8645
|
});
|
|
8583
8646
|
};
|
|
@@ -11173,6 +11236,9 @@ const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, hasCounter,
|
|
|
11173
11236
|
});
|
|
11174
11237
|
};
|
|
11175
11238
|
|
|
11239
|
+
/**
|
|
11240
|
+
* @css-variable {"name": "--p-toast-position-bottom", "description": "Defines the spacing between the toast and the bottom edge of its container.", "defaultValue": "56px"}
|
|
11241
|
+
*/
|
|
11176
11242
|
const cssVariablePositionBottom = '--p-toast-position-bottom'; // CSS custom property exposed as public interface
|
|
11177
11243
|
const cssVariablePositionBottomInternal = '--p-internal-toast-position-bottom';
|
|
11178
11244
|
const ANIMATION_DURATION = motionDurationModerate;
|
|
@@ -3447,10 +3447,6 @@ function debounce(fn, ms = 800) {
|
|
|
3447
3447
|
};
|
|
3448
3448
|
}
|
|
3449
3449
|
|
|
3450
|
-
const getRole = (state) => {
|
|
3451
|
-
return state === 'error' ? 'alert' : state === 'success' ? 'status' : null;
|
|
3452
|
-
};
|
|
3453
|
-
|
|
3454
3450
|
const isWithinForm = (host) => !!getClosestHTMLElement(host, 'form');
|
|
3455
3451
|
|
|
3456
3452
|
const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
|
|
@@ -3916,4 +3912,4 @@ const getTextTagType = (host, tag) => {
|
|
|
3916
3912
|
return tag;
|
|
3917
3913
|
};
|
|
3918
3914
|
|
|
3919
|
-
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, ItemType, TEXT_TAGS, _hasShowPickerSupport, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildIconUrl, buildImgSrc, buildSrcSet, createPaginationItems, createRange, crestSize, debounce, descriptionId, displaySizeToTagMap, getButtonAriaAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getClosestHTMLElement, getComboboxAriaAttributes, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getHTMLElement, getHasNativePopoverSupport, getHeadingTagType, getHeadlineTagType, getIconColor, getInlineNotificationIconName, getInnerManifest, getListAriaAttributes, getOptionAriaAttributes,
|
|
3915
|
+
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, ItemType, TEXT_TAGS, _hasShowPickerSupport, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildIconUrl, buildImgSrc, buildSrcSet, createPaginationItems, createRange, crestSize, debounce, descriptionId, displaySizeToTagMap, getButtonAriaAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getClosestHTMLElement, getComboboxAriaAttributes, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getHTMLElement, getHasNativePopoverSupport, getHeadingTagType, getHeadlineTagType, getIconColor, getInlineNotificationIconName, getInnerManifest, getListAriaAttributes, getOptionAriaAttributes, getSegmentedControlItemAriaAttributes, getSelectedOptionMap, getSelectedOptionString, getSelectedOptionValues, getSelectedOptions, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTagName, getTagNameWithoutPrefix, getTextTagType, getTotalPages, hasDocument, hasLocateAction, hasSpecificDirectChildTag, hasVisibleIcon, hasWindow$1 as hasWindow, headerSlot, isCurrentInput, isCustomDropdown, isDisabledOrLoading, isElementOfKind, isInfinitePagination, isListTypeOrdered, isScrollable, isSortable, isStateCompleteOrWarning, isTouchDevice, isType, isUrl, isWithinForm, labelId, observedNodesMap, parseAndGetAriaAttributes, parseJSONAttribute, scrollAreaClass, showCustomCalendarOrTimeIndicator, supportsConstructableStylesheets, supportsNativePopover, tempDiv, tempIcon, tempLabel, traverseTreeAndUpdateState, updateDrilldownItemState };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { PInlineNotification } from '../components/inline-notification.wrapper.m
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @slot {"name": "heading", "description": "Defines the heading used in the banner. Can be used alternatively to the heading prop. Can be used for rich content.", "hasAltProp": true }
|
|
11
|
-
* @slot {"name": "title", "description": "
|
|
11
|
+
* @slot {"name": "title", "description": "Please use the heading prop or slot=\"heading\" instead.", "hasAltProp": true, "isDeprecated": true }
|
|
12
12
|
* @slot {"name": "description", "description": "Defines the description used in the banner. Can be used alternatively to the description prop. Can be used for rich content.", "hasAltProp": true }
|
|
13
13
|
*
|
|
14
14
|
* @controlled {"props": ["open"], "event": "dismiss"}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs
CHANGED
|
@@ -31,10 +31,12 @@ class DSRCanvas extends Component {
|
|
|
31
31
|
hasSidebarEndHeader;
|
|
32
32
|
hasFooter;
|
|
33
33
|
hasBackground;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
// TODO: Produces bug when using text-field-wrapper which looses focus
|
|
35
|
+
// private sidebarStart: any;
|
|
36
|
+
// private sidebarEnd: any;
|
|
37
|
+
// private root: any;
|
|
38
|
+
// private header: any;
|
|
39
|
+
//
|
|
38
40
|
render() {
|
|
39
41
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
40
42
|
const hasTitle = namedSlotChildren.filter(({ props: { slot } }) => slot === 'title').length > 0;
|
|
@@ -8,7 +8,7 @@ import { parseAndGetAriaAttributes, hasVisibleIcon } from '../../../../../../com
|
|
|
8
8
|
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* @slot {"name": "", "description": "Default slot to render the link label." }
|
|
11
|
+
* @slot {"name": "", "description": "Default slot to render the link label. This slot can be used to slot an anchor tag instead of using the href prop." }
|
|
12
12
|
*/
|
|
13
13
|
class DSRLink extends Component {
|
|
14
14
|
host;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { Component } from 'react';
|
|
3
|
-
import '../../provider.mjs';
|
|
4
2
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
3
|
+
import { Component } from 'react';
|
|
5
4
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
5
|
import { getMultiSelectOptionCss as getComponentCss$D } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
6
|
|
|
@@ -12,9 +11,9 @@ class DSRMultiSelectOption extends Component {
|
|
|
12
11
|
host;
|
|
13
12
|
render() {
|
|
14
13
|
splitChildren(this.props.children);
|
|
15
|
-
const { theme = 'light', selected, highlighted } = this.props;
|
|
16
|
-
this.props.disabled || this.props.disabledParent;
|
|
17
|
-
minifyCss(getComponentCss$D(theme));
|
|
14
|
+
const { theme = 'light', selected: isSelected, highlighted } = this.props;
|
|
15
|
+
const isDisabled = this.props.disabled || this.props.disabledParent;
|
|
16
|
+
minifyCss(getComponentCss$D(theme, isDisabled, isSelected));
|
|
18
17
|
return (jsx(Fragment, {}));
|
|
19
18
|
}
|
|
20
19
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.mjs
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../../provider.mjs';
|
|
4
|
-
import { getRole } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
5
4
|
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
6
5
|
|
|
7
6
|
const messageId = 'message';
|
|
8
7
|
const StateMessage = ({ hasMessage, state, message, theme }) => {
|
|
9
8
|
const isErrorState = state === 'error';
|
|
10
|
-
return (
|
|
9
|
+
return (
|
|
10
|
+
// needs to be rendered always to have correct behaviour for screen readers
|
|
11
|
+
jsx("span", { id: messageId, className: "message", role: state === 'success' ? 'status' : 'alert', children: hasMessage && [
|
|
12
|
+
jsx(PIcon, { name: isErrorState ? 'exclamation' : 'check', color: isErrorState ? 'notification-error' : 'notification-success', theme: theme, "aria-hidden": "true" }),
|
|
13
|
+
message || jsx("slot", { name: "message" }),
|
|
14
|
+
] }));
|
|
11
15
|
};
|
|
12
16
|
|
|
13
17
|
export { StateMessage, messageId };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* @slot {"name": "heading", "description": "Defines the heading used in the banner. Can be used alternatively to the heading prop. Can be used for rich content.", "hasAltProp": true }
|
|
4
|
-
* @slot {"name": "title", "description": "
|
|
4
|
+
* @slot {"name": "title", "description": "Please use the heading prop or slot=\"heading\" instead.", "hasAltProp": true, "isDeprecated": true }
|
|
5
5
|
* @slot {"name": "description", "description": "Defines the description used in the banner. Can be used alternatively to the description prop. Can be used for rich content.", "hasAltProp": true }
|
|
6
6
|
*
|
|
7
7
|
* @controlled {"props": ["open"], "event": "dismiss"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* @slot {"name": "", "description": "Default slot to render the link label." }
|
|
3
|
+
* @slot {"name": "", "description": "Default slot to render the link label. This slot can be used to slot an anchor tag instead of using the href prop." }
|
|
4
4
|
*/
|
|
5
5
|
export declare class DSRLink extends Component<any> {
|
|
6
6
|
host: HTMLElement;
|