@porsche-design-system/components-react 4.7.0-beta.0 → 4.7.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 +35 -0
- package/bin/pds-skill.js +50 -41
- package/package.json +2 -2
- package/skills/pds-audit-deprecations-react/SKILL.md +247 -0
- package/skills/pds-audit-deprecations-react/references/report-template.md +128 -0
- package/skills/pds-audit-deprecations-react/references/report.schema.json +446 -0
- package/skills/pds-knowledge-react/SKILL.md +10 -4
- package/skills/pds-knowledge-react/references/components/p-button/examples/AiGradientGlow.tsx +1 -1
- package/skills/pds-knowledge-react/references/deprecations.md +686 -0
- package/skills/pds-knowledge-react/references/styles/scss.md +3 -2
- package/skills/pds-knowledge-react/references/styles/tailwindcss.md +0 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +66 -48
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +39 -10
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.cjs +1 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/dialog-base.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/splitChildren.cjs +3 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +66 -48
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +38 -11
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.mjs +2 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/dialog-base.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/splitChildren.mjs +3 -1
- package/tailwindcss/index.css +16 -16
|
@@ -3507,37 +3507,37 @@ const isDisabledOrLoading = (disabled, loading) => {
|
|
|
3507
3507
|
/** Holds the **Porsche Next** font family along with fallback fonts. */
|
|
3508
3508
|
const fontPorscheNext = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
|
|
3509
3509
|
|
|
3510
|
-
/** @deprecated
|
|
3510
|
+
/** @deprecated Use {@link fontPorscheNext} instead. This API will be removed with the next major release. */
|
|
3511
3511
|
const fontFamily = fontPorscheNext;
|
|
3512
3512
|
|
|
3513
3513
|
/** Holds a dynamic default line height specifically optimized for the Porsche Next typeface. */
|
|
3514
3514
|
const leadingNormal = 'calc(6px + 2.125ex)';
|
|
3515
3515
|
|
|
3516
|
-
/** @deprecated
|
|
3516
|
+
/** @deprecated Use {@link leadingNormal} instead. This API will be removed with the next major release. */
|
|
3517
3517
|
const fontLineHeight = leadingNormal;
|
|
3518
3518
|
|
|
3519
3519
|
/** Holds the **small** font size optimized for the Porsche Next typeface. */
|
|
3520
3520
|
const typescaleSm = '1rem';
|
|
3521
3521
|
|
|
3522
|
-
/** @deprecated
|
|
3522
|
+
/** @deprecated Use {@link typescaleSm} instead. This API will be removed with the next major release. */
|
|
3523
3523
|
const fontSizeTextSmall = typescaleSm;
|
|
3524
3524
|
|
|
3525
3525
|
/** Holds the **x-small** font size optimized for the Porsche Next typeface. */
|
|
3526
3526
|
const typescaleXs = '.875rem';
|
|
3527
3527
|
|
|
3528
|
-
/** @deprecated
|
|
3528
|
+
/** @deprecated Use {@link typescaleXs} instead. This API will be removed with the next major release. */
|
|
3529
3529
|
const fontSizeTextXSmall = typescaleXs;
|
|
3530
3530
|
|
|
3531
|
-
/** @deprecated
|
|
3531
|
+
/** @deprecated This API will be removed with the next major release. Use 'normal' instead. */
|
|
3532
3532
|
const fontStyleNormal = 'normal';
|
|
3533
3533
|
|
|
3534
|
-
/** @deprecated
|
|
3534
|
+
/** @deprecated This API will be removed with the next major release. Use 'normal' instead. */
|
|
3535
3535
|
const fontVariant = 'normal';
|
|
3536
3536
|
|
|
3537
3537
|
/** Holds the **normal** font weight optimized for the Porsche Next typeface. */
|
|
3538
3538
|
const fontWeightNormal = 400;
|
|
3539
3539
|
|
|
3540
|
-
/** @deprecated
|
|
3540
|
+
/** @deprecated Use {@link fontWeightNormal} instead. This API will be removed with the next major release. */
|
|
3541
3541
|
const fontWeightRegular = fontWeightNormal;
|
|
3542
3542
|
|
|
3543
3543
|
/** Holds a gradient fade. */
|
|
@@ -3558,12 +3558,12 @@ const gradientStopsFadeDark = 'hsla(0,0%,0%,.8) 0%,' +
|
|
|
3558
3558
|
'hsla(0,0%,0%,.011) 91.9%,' +
|
|
3559
3559
|
'hsla(0,0%,0%,0) 100%';
|
|
3560
3560
|
|
|
3561
|
-
/** @deprecated
|
|
3561
|
+
/** @deprecated This API will be removed with the next major release. Use background: `linear-gradient(to bottom, ${gradientStopsFadeDark});` instead. */
|
|
3562
3562
|
const gradientToBottomStyle = {
|
|
3563
3563
|
background: `linear-gradient(to bottom, ${gradientStopsFadeDark});`,
|
|
3564
3564
|
};
|
|
3565
3565
|
|
|
3566
|
-
/** @deprecated
|
|
3566
|
+
/** @deprecated This API will be removed with the next major release. background: `linear-gradient(to top, ${gradientStopsFadeDark});` instead. */
|
|
3567
3567
|
const gradientToTopStyle = {
|
|
3568
3568
|
background: `linear-gradient(to top, ${gradientStopsFadeDark});`,
|
|
3569
3569
|
};
|
|
@@ -3617,7 +3617,7 @@ function getMediaQueryMin(min) {
|
|
|
3617
3617
|
/** Holds the **medium fluid** spacing. */
|
|
3618
3618
|
const spacingFluidMd = 'clamp(16px, 1.25vw + 12px, 36px)';
|
|
3619
3619
|
|
|
3620
|
-
/** @deprecated
|
|
3620
|
+
/** @deprecated Use {@link spacingFluidMd} instead. This API will be removed with the next major release. */
|
|
3621
3621
|
const spacingFluidMedium = spacingFluidMd;
|
|
3622
3622
|
|
|
3623
3623
|
const gridGap = spacingFluidMedium;
|
|
@@ -3686,35 +3686,35 @@ function getMediaQueryMax(max) {
|
|
|
3686
3686
|
/** Holds a **moderate** motion/transition duration value. */
|
|
3687
3687
|
const durationMd = '.4s';
|
|
3688
3688
|
|
|
3689
|
-
/** @deprecated
|
|
3689
|
+
/** @deprecated Use {@link durationMd} instead. This API will be removed with the next major release. */
|
|
3690
3690
|
const motionDurationModerate = durationMd;
|
|
3691
3691
|
|
|
3692
3692
|
/** Holds an **in** `transition-timing-function`. */
|
|
3693
3693
|
const easeIn = 'cubic-bezier(0,0,.2,1)';
|
|
3694
3694
|
|
|
3695
|
-
/** @deprecated
|
|
3695
|
+
/** @deprecated Use {@link easeIn} instead. This API will be removed with the next major release. */
|
|
3696
3696
|
const motionEasingIn = easeIn;
|
|
3697
3697
|
|
|
3698
3698
|
/** Holds an **out** `transition-timing-function`. */
|
|
3699
3699
|
const easeOut = 'cubic-bezier(.4,0,.5,1)';
|
|
3700
3700
|
|
|
3701
|
-
/** @deprecated
|
|
3701
|
+
/** @deprecated Use {@link easeOut} instead. This API will be removed with the next major release. */
|
|
3702
3702
|
const motionEasingOut = easeOut;
|
|
3703
3703
|
|
|
3704
3704
|
const _textFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
3705
3705
|
const _textFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
3706
3706
|
|
|
3707
|
-
/** @deprecated
|
|
3707
|
+
/** @deprecated Use {@link proseTextXsStyle} instead. This API will be removed with the next major release. */
|
|
3708
3708
|
const textXSmallStyle = {
|
|
3709
3709
|
font: `${_textFontPartA}${fontSizeTextXSmall}${_textFontPartB}`,
|
|
3710
3710
|
};
|
|
3711
3711
|
|
|
3712
|
-
/** @deprecated
|
|
3712
|
+
/** @deprecated Use {@link proseTextSmStyle} instead. This API will be removed with the next major release. */
|
|
3713
3713
|
const textSmallStyle = {
|
|
3714
3714
|
font: `${_textFontPartA}${fontSizeTextSmall}${_textFontPartB}`,
|
|
3715
3715
|
};
|
|
3716
3716
|
|
|
3717
|
-
const
|
|
3717
|
+
const parse = (prop) => {
|
|
3718
3718
|
if (typeof prop === 'string') {
|
|
3719
3719
|
try {
|
|
3720
3720
|
// prop is potentially JSON parsable string, e.g. "{ base: 'block', l: 'inline' }" or "true" or "false"
|
|
@@ -3733,6 +3733,20 @@ const parseJSON = (prop) => {
|
|
|
3733
3733
|
return prop;
|
|
3734
3734
|
}
|
|
3735
3735
|
};
|
|
3736
|
+
// boolean props have to be parsed via parseJSONBoolean(), therefore the parameter type excludes them to make it
|
|
3737
|
+
// impossible to lose the HTML boolean attribute shorthand by accident
|
|
3738
|
+
const parseJSON = (prop) => parse(prop);
|
|
3739
|
+
const parseJSONBoolean = (prop) =>
|
|
3740
|
+
// prop is an HTML boolean attribute used without a value, e.g. <p-input-text hide-label>
|
|
3741
|
+
// Stencil resolves BreakpointCustomizable<T> to "any" and therefore skips its own boolean coercion
|
|
3742
|
+
// TODO: [v5] obsolete once objects can only be set via property, since Stencil coerces booleans itself then, see #4708
|
|
3743
|
+
(prop === '' ? true : parse(prop));
|
|
3744
|
+
// a BreakpointCustomizable value can be true for certain breakpoints only, e.g. { base: false, l: true },
|
|
3745
|
+
// therefore styles which are needed as soon as it is true anywhere have to be determined like this
|
|
3746
|
+
const isTruthyForAnyBreakpoint = (prop) => {
|
|
3747
|
+
const value = parseJSONBoolean(prop);
|
|
3748
|
+
return typeof value === 'object' ? Object.values(value).some(Boolean) : !!value;
|
|
3749
|
+
};
|
|
3736
3750
|
|
|
3737
3751
|
// NOTE: handpicked selection of plugins from jss-preset-default
|
|
3738
3752
|
const jss = createJss({
|
|
@@ -3758,8 +3772,7 @@ const supportsConstructableStylesheets = () => {
|
|
|
3758
3772
|
};
|
|
3759
3773
|
// determine it once
|
|
3760
3774
|
supportsConstructableStylesheets();
|
|
3761
|
-
const
|
|
3762
|
-
const value = parseJSON(rawValue);
|
|
3775
|
+
const buildStyles = (value, getJssStyle) => {
|
|
3763
3776
|
return typeof value === 'object'
|
|
3764
3777
|
? Object.keys(value)
|
|
3765
3778
|
// base styles are applied on root object, responsive styles are nested within
|
|
@@ -3771,6 +3784,11 @@ const buildResponsiveStyles = (rawValue, getJssStyle) => {
|
|
|
3771
3784
|
}), getJssStyle(value.base))
|
|
3772
3785
|
: getJssStyle(value);
|
|
3773
3786
|
};
|
|
3787
|
+
// boolean props have to use buildResponsiveBooleanStyles(), therefore the generic excludes them to make it impossible
|
|
3788
|
+
// to lose the HTML boolean attribute shorthand by accident
|
|
3789
|
+
const buildResponsiveStyles = (rawValue, getJssStyle) => buildStyles(parseJSON(rawValue), getJssStyle);
|
|
3790
|
+
// TODO: [v5] can be merged back into buildResponsiveStyles() once objects can only be set via property, see #4708
|
|
3791
|
+
const buildResponsiveBooleanStyles = (rawValue, getJssStyle) => buildStyles(parseJSONBoolean(rawValue), getJssStyle);
|
|
3774
3792
|
const isObject = (obj) => typeof obj === 'object' && !Array.isArray(obj);
|
|
3775
3793
|
// NOTE: taken from https://stackoverflow.com/a/48218209
|
|
3776
3794
|
const mergeDeep = (...objects) => {
|
|
@@ -3847,7 +3865,7 @@ const OPTION_LIST_SAFE_ZONE = 6;
|
|
|
3847
3865
|
|
|
3848
3866
|
const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
|
|
3849
3867
|
|
|
3850
|
-
const prefix = `[Porsche Design System v${"4.7.0
|
|
3868
|
+
const prefix = `[Porsche Design System v${"4.7.0"}]` // this part isn't covered by unit tests
|
|
3851
3869
|
;
|
|
3852
3870
|
const consoleError = (...messages) => {
|
|
3853
3871
|
console.error(prefix, ...messages);
|
|
@@ -4085,7 +4103,7 @@ const getComponentCss$1a = (alignMarker, background, isCompact, indent, isOpen,
|
|
|
4085
4103
|
}),
|
|
4086
4104
|
'& > div': {
|
|
4087
4105
|
gridArea: '2/1/auto/-1',
|
|
4088
|
-
...
|
|
4106
|
+
...buildResponsiveBooleanStyles(indent, (isIndented) => ({
|
|
4089
4107
|
gridColumnStart: isIndented ? summaryColumnStart : 1,
|
|
4090
4108
|
})),
|
|
4091
4109
|
zIndex: 0, // ensures stacking to be below the summary section
|
|
@@ -4739,7 +4757,7 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4739
4757
|
transform: 'translate3d(0,0,0)', // creates new stacking context
|
|
4740
4758
|
...hostHiddenStyles,
|
|
4741
4759
|
}),
|
|
4742
|
-
...
|
|
4760
|
+
...buildResponsiveBooleanStyles(stretch, (responsiveStretch) => ({
|
|
4743
4761
|
display: responsiveStretch ? 'block' : 'inline-block',
|
|
4744
4762
|
width: responsiveStretch ? '100%' : 'auto', // prevents adjusting its size when used as flex or grid child
|
|
4745
4763
|
...(!responsiveStretch && { verticalAlign: 'top' }),
|
|
@@ -4755,9 +4773,9 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4755
4773
|
color: colorMap$3[color],
|
|
4756
4774
|
textDecoration: underline ? 'underline' : 'none',
|
|
4757
4775
|
font: `${ref(fontWeightNormal$1)} ${ref(typescaleSm$1)}/${ref(leadingNormal$1)} ${ref(fontPorscheNext$1)}`,
|
|
4758
|
-
...mergeDeep(
|
|
4776
|
+
...mergeDeep(buildResponsiveBooleanStyles(hideLabel, (hidelabelValue) => ({
|
|
4759
4777
|
gap: hidelabelValue ? 0 : ref(spacingStaticXs$1),
|
|
4760
|
-
})),
|
|
4778
|
+
})), buildResponsiveBooleanStyles(stretch, (stretchValue) => ({
|
|
4761
4779
|
justifyContent: stretchValue ? 'space-between' : 'flex-start',
|
|
4762
4780
|
alignItems: stretchValue ? 'center' : 'flex-start',
|
|
4763
4781
|
})), buildResponsiveStyles(size, (v) => ({
|
|
@@ -4774,7 +4792,7 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4774
4792
|
position: 'absolute', // mobile Safari -> prevent lagging active state
|
|
4775
4793
|
top: offsetVertical,
|
|
4776
4794
|
bottom: offsetVertical,
|
|
4777
|
-
...
|
|
4795
|
+
...buildResponsiveBooleanStyles(hideLabel, (hideLabelValue) => ({
|
|
4778
4796
|
right: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
4779
4797
|
left: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
4780
4798
|
borderRadius: hideLabelValue ? ref(radiusFull) : ref(radiusLg),
|
|
@@ -4805,7 +4823,7 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4805
4823
|
flexShrink: '0',
|
|
4806
4824
|
},
|
|
4807
4825
|
label: mergeDeep({ zIndex: '1' }, // fix Firefox bug on :hover (#2583) & pure-link with nested anchor & hidden label (#3349)
|
|
4808
|
-
|
|
4826
|
+
buildResponsiveBooleanStyles(hideLabel, getVisibilityJssStyle), buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
4809
4827
|
order: alignLabelValue === 'start' ? -1 : 0,
|
|
4810
4828
|
}))),
|
|
4811
4829
|
}
|
|
@@ -4961,7 +4979,7 @@ const getComponentCss$16 = (isDisabledOrLoading, aspectRatio, size, weight, alig
|
|
|
4961
4979
|
},
|
|
4962
4980
|
footer: {
|
|
4963
4981
|
gridArea: `${isTopAligned ? 2 : 4}/2`,
|
|
4964
|
-
...
|
|
4982
|
+
...buildResponsiveBooleanStyles(compact, (compactValue) => compactValue
|
|
4965
4983
|
? {
|
|
4966
4984
|
display: 'grid',
|
|
4967
4985
|
gridTemplateColumns: 'minmax(0,1fr) auto',
|
|
@@ -4978,7 +4996,7 @@ const getComponentCss$16 = (isDisabledOrLoading, aspectRatio, size, weight, alig
|
|
|
4978
4996
|
gridColumn: 2,
|
|
4979
4997
|
gridRow: `1/${hasFooterSlot ? 3 : 2}`,
|
|
4980
4998
|
alignSelf: isTopAligned ? 'flex-start' : 'flex-end',
|
|
4981
|
-
...
|
|
4999
|
+
...buildResponsiveBooleanStyles(compact, (compactValue) => ({
|
|
4982
5000
|
display: compactValue ? 'inline-block' : 'none',
|
|
4983
5001
|
})),
|
|
4984
5002
|
},
|
|
@@ -4986,7 +5004,7 @@ const getComponentCss$16 = (isDisabledOrLoading, aspectRatio, size, weight, alig
|
|
|
4986
5004
|
minHeight: '54px', // prevent content shift
|
|
4987
5005
|
zIndex: 5,
|
|
4988
5006
|
marginTop: ref(spacingStaticMd),
|
|
4989
|
-
...
|
|
5007
|
+
...buildResponsiveBooleanStyles(compact, (compactValue) => ({
|
|
4990
5008
|
display: compactValue ? 'none' : 'inline-block',
|
|
4991
5009
|
})),
|
|
4992
5010
|
},
|
|
@@ -5018,7 +5036,7 @@ const getVariantColors = (variant, cssVariableBackground, cssVariableForeground)
|
|
|
5018
5036
|
};
|
|
5019
5037
|
const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrLoading, hasSlottedAnchor, isCompact, cssVariableInternalScaling, cssVariableBackground, cssVariableForeground, cssVarPaddingInline, cssVarPaddingBlock, cssVarGap, cssVarRadius) => {
|
|
5020
5038
|
const { textColor, textColorHover, backgroundColor, backgroundColorHover } = getVariantColors(variant, cssVariableBackground, cssVariableForeground);
|
|
5021
|
-
const hasIcon = hasVisibleIcon(icon, iconSource) || hideLabel;
|
|
5039
|
+
const hasIcon = hasVisibleIcon(icon, iconSource) || isTruthyForAnyBreakpoint(hideLabel);
|
|
5022
5040
|
const paddingBlock = `calc(28px * (${ref(cssVariableInternalScaling)} - 0.64285714) + 6px)`;
|
|
5023
5041
|
const paddingInline = `calc(33.6px * (${ref(cssVariableInternalScaling)} - 0.64285714) + 16px)`;
|
|
5024
5042
|
const gap = `calc(11.2px * (${ref(cssVariableInternalScaling)} - 0.64285714) + 4px)`;
|
|
@@ -5028,10 +5046,10 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
5028
5046
|
':host': {
|
|
5029
5047
|
display: 'inline-block',
|
|
5030
5048
|
verticalAlign: 'top',
|
|
5031
|
-
...mergeDeep(
|
|
5049
|
+
...mergeDeep(buildResponsiveBooleanStyles(isCompact, (compactValue) => ({
|
|
5032
5050
|
[`${cssVariableInternalScaling}`]: compactValue ? 0.64285714 : 1,
|
|
5033
5051
|
'--_p-link-button-a': compactValue ? ref(radiusLg) : ref(radiusXl),
|
|
5034
|
-
})),
|
|
5052
|
+
})), buildResponsiveBooleanStyles(hideLabel, (hideLabelValue) => ({
|
|
5035
5053
|
borderRadius: addImportantToRule(ref(cssVarRadius, hideLabelValue ? ref(radiusFull) : ref('--_p-link-button-a'))),
|
|
5036
5054
|
}))),
|
|
5037
5055
|
...addImportantToEachRule({
|
|
@@ -5056,7 +5074,7 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
5056
5074
|
color: textColor,
|
|
5057
5075
|
cursor: 'pointer',
|
|
5058
5076
|
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
5059
|
-
...
|
|
5077
|
+
...buildResponsiveBooleanStyles(hideLabel, (hideLabelValue) => ({
|
|
5060
5078
|
padding: `${ref(cssVarPaddingBlock, paddingBlock)} ${ref(cssVarPaddingInline, hideLabelValue ? paddingBlock : paddingInline)}`,
|
|
5061
5079
|
gap: ref(cssVarGap, hideLabelValue ? 0 : gap),
|
|
5062
5080
|
})),
|
|
@@ -5084,13 +5102,13 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
5084
5102
|
},
|
|
5085
5103
|
})),
|
|
5086
5104
|
},
|
|
5087
|
-
label:
|
|
5105
|
+
label: buildResponsiveBooleanStyles(hideLabel, getHiddenTextJssStyle),
|
|
5088
5106
|
...(hasIcon && {
|
|
5089
5107
|
icon: {
|
|
5090
5108
|
font: `${ref(typescaleSm$1)} ${ref(fontPorscheNext$1)}`, // needed for correct width/height definition based on ex-unit
|
|
5091
5109
|
width: ref(leadingNormal$1), // ensure space is already reserved until icon component is loaded (ssr)
|
|
5092
5110
|
height: ref(leadingNormal$1), // ensure space is already reserved until icon component is loaded (ssr)
|
|
5093
|
-
...
|
|
5111
|
+
...buildResponsiveBooleanStyles(hideLabel, (hideLabelValue) => ({
|
|
5094
5112
|
marginInlineStart: hideLabelValue ? 0 : iconMarginInlineStart, // compensate white space of svg icon and optimize visual alignment
|
|
5095
5113
|
})),
|
|
5096
5114
|
},
|
|
@@ -5715,7 +5733,7 @@ const getComponentCss$13 = (gradient, hasHeading, hasDescription, hasControlsSlo
|
|
|
5715
5733
|
},
|
|
5716
5734
|
...(hasPagination && {
|
|
5717
5735
|
'pagination-container': {
|
|
5718
|
-
...
|
|
5736
|
+
...buildResponsiveBooleanStyles(hasPagination, (hasPaginationValue) => ({
|
|
5719
5737
|
display: hasPaginationValue ? 'flex' : 'none',
|
|
5720
5738
|
})),
|
|
5721
5739
|
position: 'relative',
|
|
@@ -5988,7 +6006,7 @@ const getFunctionalComponentLabelStyles = (isDisabled, isLoading, hideLabel, add
|
|
|
5988
6006
|
const isDisabledOrLoading = isDisabled || isLoading;
|
|
5989
6007
|
return {
|
|
5990
6008
|
'label-wrapper': {
|
|
5991
|
-
...
|
|
6009
|
+
...buildResponsiveBooleanStyles(hideLabel, (isHidden) => ({
|
|
5992
6010
|
...(!isHidden && { minWidth: 'fit-content' }), // ensures label contents don't shrink to zero in grid containers
|
|
5993
6011
|
...getHiddenTextJssStyle(isHidden, additionalIsShownJssStyle),
|
|
5994
6012
|
})),
|
|
@@ -6014,7 +6032,7 @@ const getFunctionalComponentLabelStyles = (isDisabled, isLoading, hideLabel, add
|
|
|
6014
6032
|
cursor: 'unset',
|
|
6015
6033
|
fontSize: ref(typescaleXs$1),
|
|
6016
6034
|
color: ref(colorContrastHigh),
|
|
6017
|
-
...
|
|
6035
|
+
...buildResponsiveBooleanStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, { marginTop: `calc(-1 * ${ref(spacingStaticXs$1)})` })),
|
|
6018
6036
|
marginTop: `calc(-1 * ${ref(spacingStaticXs$1)})`,
|
|
6019
6037
|
},
|
|
6020
6038
|
'& > slot[name="label"]::slotted(*)': {
|
|
@@ -7430,7 +7448,7 @@ const getComponentCss$V = (isOpen, background, backdrop, position, hasHeader, ha
|
|
|
7430
7448
|
flyout: {
|
|
7431
7449
|
...dialogGridJssStyle(),
|
|
7432
7450
|
...getDialogColorJssStyle(),
|
|
7433
|
-
...
|
|
7451
|
+
...buildResponsiveBooleanStyles(fullscreen, (fullscreenValue) => fullscreenValue
|
|
7434
7452
|
? {
|
|
7435
7453
|
// fullscreen spans the whole viewport width, so corners are squared and corner clipping is disabled
|
|
7436
7454
|
width: '100dvw',
|
|
@@ -7886,7 +7904,7 @@ const getComponentCss$G = (icon, iconSource, active, stretch, size, color, hideL
|
|
|
7886
7904
|
content: '""',
|
|
7887
7905
|
position: 'fixed',
|
|
7888
7906
|
insetBlock: offsetVertical,
|
|
7889
|
-
...
|
|
7907
|
+
...buildResponsiveBooleanStyles(hideLabel, (hideLabelValue) => ({
|
|
7890
7908
|
insetInline: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
7891
7909
|
borderRadius: hideLabelValue ? ref(radiusFull) : ref(radiusLg),
|
|
7892
7910
|
})),
|
|
@@ -8150,7 +8168,7 @@ const getComponentCss$E = (aspectRatio, size, weight, align, compact, hasGradien
|
|
|
8150
8168
|
},
|
|
8151
8169
|
footer: {
|
|
8152
8170
|
gridArea: `${isTopAligned ? 2 : 4}/2`,
|
|
8153
|
-
...
|
|
8171
|
+
...buildResponsiveBooleanStyles(compact, (compactValue) => compactValue
|
|
8154
8172
|
? {
|
|
8155
8173
|
display: 'grid',
|
|
8156
8174
|
gridTemplateColumns: 'minmax(0,1fr) auto',
|
|
@@ -8167,7 +8185,7 @@ const getComponentCss$E = (aspectRatio, size, weight, align, compact, hasGradien
|
|
|
8167
8185
|
gridColumn: 2,
|
|
8168
8186
|
gridRow: `1/${hasFooterSlot ? 3 : 2}`,
|
|
8169
8187
|
alignSelf: isTopAligned ? 'flex-start' : 'flex-end',
|
|
8170
|
-
...
|
|
8188
|
+
...buildResponsiveBooleanStyles(compact, (compactValue) => ({
|
|
8171
8189
|
display: compactValue ? 'inline-block' : 'none',
|
|
8172
8190
|
})),
|
|
8173
8191
|
},
|
|
@@ -8175,7 +8193,7 @@ const getComponentCss$E = (aspectRatio, size, weight, align, compact, hasGradien
|
|
|
8175
8193
|
minHeight: '54px', // prevent content shift
|
|
8176
8194
|
zIndex: 5,
|
|
8177
8195
|
marginTop: ref(spacingStaticMd),
|
|
8178
|
-
...
|
|
8196
|
+
...buildResponsiveBooleanStyles(compact, (compactValue) => ({
|
|
8179
8197
|
display: compactValue ? 'none' : 'inline-block',
|
|
8180
8198
|
})),
|
|
8181
8199
|
},
|
|
@@ -8222,9 +8240,9 @@ const getComponentCss$D = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
8222
8240
|
content: '""',
|
|
8223
8241
|
position: 'fixed',
|
|
8224
8242
|
inset: 0,
|
|
8225
|
-
...mergeDeep(
|
|
8243
|
+
...mergeDeep(buildResponsiveBooleanStyles(isCompact, (compactValue) => ({
|
|
8226
8244
|
borderRadius: ref(cssVarRadius$1, compactValue ? ref(radiusLg) : ref(radiusXl)),
|
|
8227
|
-
})),
|
|
8245
|
+
})), buildResponsiveBooleanStyles(hideLabel, (hideLabelValue) => ({
|
|
8228
8246
|
...(hideLabelValue && {
|
|
8229
8247
|
borderRadius: ref(cssVarRadius$1, ref(radiusFull)),
|
|
8230
8248
|
}),
|
|
@@ -8289,7 +8307,7 @@ const getComponentCss$C = (isOpen, background, backdrop, fullscreen, hasDismissB
|
|
|
8289
8307
|
...dialogGridJssStyle(),
|
|
8290
8308
|
...getDialogColorJssStyle(),
|
|
8291
8309
|
...getDialogTransitionJssStyle(isOpen, '^'),
|
|
8292
|
-
...
|
|
8310
|
+
...buildResponsiveBooleanStyles(fullscreen, (fullscreenValue) => fullscreenValue
|
|
8293
8311
|
? {
|
|
8294
8312
|
width: 'auto',
|
|
8295
8313
|
minWidth: 'auto',
|
|
@@ -9765,7 +9783,7 @@ const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisa
|
|
|
9765
9783
|
'@global': {
|
|
9766
9784
|
':host': {
|
|
9767
9785
|
[`${cssVarInternalSwitchScaling}`]: isCompact ? 0.64285714 : 1,
|
|
9768
|
-
...
|
|
9786
|
+
...buildResponsiveBooleanStyles(isStretched, (stretchValue) => ({
|
|
9769
9787
|
display: stretchValue ? 'flex' : 'inline-flex',
|
|
9770
9788
|
})),
|
|
9771
9789
|
...addImportantToEachRule({
|
|
@@ -9774,7 +9792,7 @@ const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisa
|
|
|
9774
9792
|
font: `${ref(typescaleSm$1)} ${ref(fontPorscheNext$1)}`, // needed for correct gap definition based on ex-unit
|
|
9775
9793
|
gap,
|
|
9776
9794
|
...hostHiddenStyles,
|
|
9777
|
-
...
|
|
9795
|
+
...buildResponsiveBooleanStyles(isStretched, (stretchValue) => ({
|
|
9778
9796
|
justifyContent: stretchValue ? 'space-between' : 'flex-start',
|
|
9779
9797
|
width: stretchValue ? '100%' : 'auto', // prevents adjusting its size when used as flex or grid child
|
|
9780
9798
|
...(!stretchValue && { verticalAlign: 'top' }),
|
|
@@ -9829,7 +9847,7 @@ const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisa
|
|
|
9829
9847
|
})),
|
|
9830
9848
|
...mergeDeep(buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
9831
9849
|
order: alignLabelValue === 'start' ? -1 : 0,
|
|
9832
|
-
})),
|
|
9850
|
+
})), buildResponsiveBooleanStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, {
|
|
9833
9851
|
paddingTop: labelPaddingTop,
|
|
9834
9852
|
}))),
|
|
9835
9853
|
},
|
|
@@ -3293,37 +3293,37 @@ const getListboxAriaAttributes = (isRequired, labelId, messageId, descriptionId,
|
|
|
3293
3293
|
/** Holds the **Porsche Next** font family along with fallback fonts. */
|
|
3294
3294
|
const fontPorscheNext = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
|
|
3295
3295
|
|
|
3296
|
-
/** @deprecated
|
|
3296
|
+
/** @deprecated Use {@link fontPorscheNext} instead. This API will be removed with the next major release. */
|
|
3297
3297
|
const fontFamily = fontPorscheNext;
|
|
3298
3298
|
|
|
3299
3299
|
/** Holds a dynamic default line height specifically optimized for the Porsche Next typeface. */
|
|
3300
3300
|
const leadingNormal$1 = 'calc(6px + 2.125ex)';
|
|
3301
3301
|
|
|
3302
|
-
/** @deprecated
|
|
3302
|
+
/** @deprecated Use {@link leadingNormal} instead. This API will be removed with the next major release. */
|
|
3303
3303
|
const fontLineHeight = leadingNormal$1;
|
|
3304
3304
|
|
|
3305
3305
|
/** Holds the **small** font size optimized for the Porsche Next typeface. */
|
|
3306
3306
|
const typescaleSm = '1rem';
|
|
3307
3307
|
|
|
3308
|
-
/** @deprecated
|
|
3308
|
+
/** @deprecated Use {@link typescaleSm} instead. This API will be removed with the next major release. */
|
|
3309
3309
|
const fontSizeTextSmall = typescaleSm;
|
|
3310
3310
|
|
|
3311
3311
|
/** Holds the **x-small** font size optimized for the Porsche Next typeface. */
|
|
3312
3312
|
const typescaleXs = '.875rem';
|
|
3313
3313
|
|
|
3314
|
-
/** @deprecated
|
|
3314
|
+
/** @deprecated Use {@link typescaleXs} instead. This API will be removed with the next major release. */
|
|
3315
3315
|
const fontSizeTextXSmall = typescaleXs;
|
|
3316
3316
|
|
|
3317
|
-
/** @deprecated
|
|
3317
|
+
/** @deprecated This API will be removed with the next major release. Use 'normal' instead. */
|
|
3318
3318
|
const fontStyleNormal = 'normal';
|
|
3319
3319
|
|
|
3320
|
-
/** @deprecated
|
|
3320
|
+
/** @deprecated This API will be removed with the next major release. Use 'normal' instead. */
|
|
3321
3321
|
const fontVariant = 'normal';
|
|
3322
3322
|
|
|
3323
3323
|
/** Holds the **normal** font weight optimized for the Porsche Next typeface. */
|
|
3324
3324
|
const fontWeightNormal = 400;
|
|
3325
3325
|
|
|
3326
|
-
/** @deprecated
|
|
3326
|
+
/** @deprecated Use {@link fontWeightNormal} instead. This API will be removed with the next major release. */
|
|
3327
3327
|
const fontWeightRegular = fontWeightNormal;
|
|
3328
3328
|
|
|
3329
3329
|
const breakpointBase = 0;
|
|
@@ -3377,16 +3377,41 @@ const breakpoints = ['base', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
|
3377
3377
|
const _textFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
3378
3378
|
const _textFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
3379
3379
|
|
|
3380
|
-
/** @deprecated
|
|
3380
|
+
/** @deprecated Use {@link proseTextXsStyle} instead. This API will be removed with the next major release. */
|
|
3381
3381
|
const textXSmallStyle = {
|
|
3382
3382
|
font: `${_textFontPartA}${fontSizeTextXSmall}${_textFontPartB}`,
|
|
3383
3383
|
};
|
|
3384
3384
|
|
|
3385
|
-
/** @deprecated
|
|
3385
|
+
/** @deprecated Use {@link proseTextSmStyle} instead. This API will be removed with the next major release. */
|
|
3386
3386
|
const textSmallStyle = {
|
|
3387
3387
|
font: `${_textFontPartA}${fontSizeTextSmall}${_textFontPartB}`,
|
|
3388
3388
|
};
|
|
3389
3389
|
|
|
3390
|
+
const parse = (prop) => {
|
|
3391
|
+
if (typeof prop === 'string') {
|
|
3392
|
+
try {
|
|
3393
|
+
// prop is potentially JSON parsable string, e.g. "{ base: 'block', l: 'inline' }" or "true" or "false"
|
|
3394
|
+
return JSON.parse(prop
|
|
3395
|
+
.replace(/'/g, '"') // convert single quotes to double quotes
|
|
3396
|
+
.replace(/[\s"]?([a-z]+)[\s"]?:([^//])/g, '"$1":$2') // wrap keys in double quotes if they don't have them but ignore potential urls
|
|
3397
|
+
);
|
|
3398
|
+
}
|
|
3399
|
+
catch {
|
|
3400
|
+
// prop is string, e.g. "block" or "inline"
|
|
3401
|
+
return prop;
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3404
|
+
else {
|
|
3405
|
+
// prop is object, e.g. { base: 'block', l: 'inline' } or number, e.g. 123 or boolean, e.g. true
|
|
3406
|
+
return prop;
|
|
3407
|
+
}
|
|
3408
|
+
};
|
|
3409
|
+
const parseJSONBoolean = (prop) =>
|
|
3410
|
+
// prop is an HTML boolean attribute used without a value, e.g. <p-input-text hide-label>
|
|
3411
|
+
// Stencil resolves BreakpointCustomizable<T> to "any" and therefore skips its own boolean coercion
|
|
3412
|
+
// TODO: [v5] obsolete once objects can only be set via property, since Stencil coerces booleans itself then, see #4708
|
|
3413
|
+
(prop === '' ? true : parse(prop));
|
|
3414
|
+
|
|
3390
3415
|
// NOTE: handpicked selection of plugins from jss-preset-default
|
|
3391
3416
|
createJss({
|
|
3392
3417
|
plugins: [
|
|
@@ -3503,7 +3528,7 @@ const hasShowPickerSupport = () => (hasDocument &&
|
|
|
3503
3528
|
'showPicker' in HTMLInputElement.prototype &&
|
|
3504
3529
|
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3505
3530
|
|
|
3506
|
-
const prefix = `[Porsche Design System v${"4.7.0
|
|
3531
|
+
const prefix = `[Porsche Design System v${"4.7.0"}]` // this part isn't covered by unit tests
|
|
3507
3532
|
;
|
|
3508
3533
|
const consoleError$1 = (...messages) => {
|
|
3509
3534
|
console.error(prefix, ...messages);
|
|
@@ -4214,6 +4239,8 @@ const getInlineNotificationAriaAttributes = (state, heading) => {
|
|
|
4214
4239
|
'aria-label': heading || null,
|
|
4215
4240
|
};
|
|
4216
4241
|
};
|
|
4242
|
+
// both tiles need the parsed value to decide whether only one or both link/button variants have to be rendered
|
|
4243
|
+
const getParsedTileCompact = (compact) => parseJSONBoolean(compact);
|
|
4217
4244
|
const getSvgUrl = (model) => {
|
|
4218
4245
|
return `${getCDNBaseURL()}/model-signatures/${MODEL_SIGNATURES_MANIFEST[model].src}`;
|
|
4219
4246
|
};
|
|
@@ -4407,4 +4434,4 @@ const getTextTagType = (host, tag) => {
|
|
|
4407
4434
|
return tag;
|
|
4408
4435
|
};
|
|
4409
4436
|
|
|
4410
|
-
export { AI_TAG_LOCALES_DEPRECATED, AI_TAG_TRANSLATIONS, DISPLAY_TAGS, HEADING_TAGS, ItemType, MARKET_LOCALES, TEXT_TAGS, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildFlagUrl, buildIconUrl, consoleError$1 as consoleError, createPaginationItems, createRange, createTopLayerController, crestSize, descriptionId, displaySizeToTagMap, getAiTagLanguage, getAiTagTranslation, getBannerAriaAttributes, getButtonAriaAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getComboboxAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getFieldsetAriaAttributes, getHTMLElement, getHasNativePopoverSupport, getHeadingTagType, getInlineNotificationAriaAttributes, getListboxAriaAttributes, getMaxTransitionDurationMs, getSanitizedActiveTabIndex, getSegmentedControlItemAriaAttributes, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTagName, getTagNameWithoutPrefix, getTextTagType, getTotalPages, hasDocument, hasShowPickerSupport, hasSpecificDirectChildTag, hasVisibleIcon, hasWindow$1 as hasWindow, headerSlot, internalDrilldown, isCurrentInput, isDialogBackdropTarget, isDisabledOrLoading, isElementOfKind, isInfinitePagination, isListTypeOrdered, isSortable, isStateCompleteOrWarning, isUrl, labelId, mergeInputNativeAria, normalizeAiTagLocale, observedNodesMap, onCancelDialog, onClickDialog, parseAndGetAriaAttributes, parseJSONAttribute, resolveAiTagTranslationLanguage, setAriaIDREF, showDialog, supportsConstructableStylesheets, supportsNativePopover, supportsOverlayTransition, tempDiv, tempIcon, tempLabel, traverseTreeAndUpdateState, updateDrilldownItemState };
|
|
4437
|
+
export { AI_TAG_LOCALES_DEPRECATED, AI_TAG_TRANSLATIONS, DISPLAY_TAGS, HEADING_TAGS, ItemType, MARKET_LOCALES, TEXT_TAGS, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildFlagUrl, buildIconUrl, consoleError$1 as consoleError, createPaginationItems, createRange, createTopLayerController, crestSize, descriptionId, displaySizeToTagMap, getAiTagLanguage, getAiTagTranslation, getBannerAriaAttributes, getButtonAriaAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getComboboxAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getFieldsetAriaAttributes, getHTMLElement, getHasNativePopoverSupport, getHeadingTagType, getInlineNotificationAriaAttributes, getListboxAriaAttributes, getMaxTransitionDurationMs, getParsedTileCompact, getSanitizedActiveTabIndex, getSegmentedControlItemAriaAttributes, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTagName, getTagNameWithoutPrefix, getTextTagType, getTotalPages, hasDocument, hasShowPickerSupport, hasSpecificDirectChildTag, hasVisibleIcon, hasWindow$1 as hasWindow, headerSlot, internalDrilldown, isCurrentInput, isDialogBackdropTarget, isDisabledOrLoading, isElementOfKind, isInfinitePagination, isListTypeOrdered, isSortable, isStateCompleteOrWarning, isUrl, labelId, mergeInputNativeAria, normalizeAiTagLocale, observedNodesMap, onCancelDialog, onClickDialog, parseAndGetAriaAttributes, parseJSONAttribute, parseJSONBoolean, resolveAiTagTranslationLanguage, setAriaIDREF, showDialog, supportsConstructableStylesheets, supportsNativePopover, supportsOverlayTransition, tempDiv, tempIcon, tempLabel, traverseTreeAndUpdateState, updateDrilldownItemState };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import '../../provider.mjs';
|
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { getButtonTileCss as getComponentCss$16 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
|
-
import { isDisabledOrLoading } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
7
|
+
import { getParsedTileCompact, isDisabledOrLoading } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
8
|
import { PButton } from '../components/button.wrapper.mjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -17,8 +17,7 @@ class DSRButtonTile extends Component {
|
|
|
17
17
|
hasFooterSlot = false;
|
|
18
18
|
render() {
|
|
19
19
|
splitChildren(this.props.children);
|
|
20
|
-
|
|
21
|
-
const parsedCompact = this.props.compact === 'true' ? true : this.props.compact === 'false' ? false : this.props.compact;
|
|
20
|
+
const parsedCompact = getParsedTileCompact(this.props.compact);
|
|
22
21
|
const buttonProps = {
|
|
23
22
|
variant: 'secondary',
|
|
24
23
|
iconSource: this.props.iconSource,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/dialog-base.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { FCDismissButton } from './fc-dismiss-button.mjs';
|
|
3
3
|
|
|
4
|
-
const DialogBase = ({ children, inert, containerClass, ariaAttributes,
|
|
4
|
+
const DialogBase = ({ children, inert, containerClass, ariaAttributes, dismissable = false, header, footer, subFooter, }) => {
|
|
5
5
|
return (jsx("dialog", { inert: inert, tabIndex: -1, ...(ariaAttributes ?? {}), children: jsx("div", { className: "scroller", children: jsxs("div", { className: containerClass, children: [dismissable && jsx(FCDismissButton, { label: `Dismiss ${containerClass}` }), header, children, footer, subFooter] }) }) }));
|
|
6
6
|
};
|
|
7
7
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import '../../provider.mjs';
|
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { getLinkTileCss as getComponentCss$E } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
|
+
import { getParsedTileCompact } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
7
8
|
import { PLink } from '../components/link.wrapper.mjs';
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -16,8 +17,7 @@ class DSRLinkTile extends Component {
|
|
|
16
17
|
hasFooterSlot = false;
|
|
17
18
|
render() {
|
|
18
19
|
splitChildren(this.props.children);
|
|
19
|
-
|
|
20
|
-
const parsedCompact = this.props.compact === 'true' ? true : this.props.compact === 'false' ? false : this.props.compact;
|
|
20
|
+
const parsedCompact = getParsedTileCompact(this.props.compact);
|
|
21
21
|
const linkProps = {
|
|
22
22
|
variant: 'secondary',
|
|
23
23
|
aria: this.props.aria,
|
|
@@ -13,7 +13,9 @@ import { Fragment } from 'react';
|
|
|
13
13
|
*/
|
|
14
14
|
const splitChildren = (children) => {
|
|
15
15
|
children =
|
|
16
|
-
|
|
16
|
+
// `children !== null` is required because `typeof null === 'object'`, which would
|
|
17
|
+
// make the `in` check throw for a single `null` child (e.g. `{cond ? <X/> : null}`).
|
|
18
|
+
typeof children === 'object' && children !== null && 'type' in children && children.type === Fragment
|
|
17
19
|
? children.props.children // Unpack children of React.Fragment
|
|
18
20
|
: children;
|
|
19
21
|
const childrenArray = (Array.isArray(children) ? children : children ? [children] : []).filter((x) => x !== undefined && x !== null // children are filtered due to cases where conditionally rendered children can be undefined.
|
package/tailwindcss/index.css
CHANGED
|
@@ -193,38 +193,38 @@
|
|
|
193
193
|
--radius-4xl: 32px;
|
|
194
194
|
--radius-full: calc(infinity * 1px);
|
|
195
195
|
--default-border-width: 1px;
|
|
196
|
-
/*
|
|
196
|
+
/* @deprecated Use --default-border-width instead. This API will be removed with the next major release. The default border width is now 1px. */
|
|
197
197
|
--border-width-regular: 2px;
|
|
198
|
-
/*
|
|
198
|
+
/* @deprecated Use --default-border-width instead. This API will be removed with the next major release. */
|
|
199
199
|
--border-width-thin: 1px;
|
|
200
200
|
--blur-frosted: 32px;
|
|
201
201
|
--shadow-sm: 0px 3px 8px rgba(0, 0, 0, 0.16);
|
|
202
202
|
--shadow-md: 0px 4px 16px rgba(0, 0, 0, 0.16);
|
|
203
203
|
--shadow-lg: 0px 8px 40px rgba(0, 0, 0, 0.16);
|
|
204
|
+
/* @deprecated Use --shadow-sm instead. This API will be removed with the next major release. */
|
|
205
|
+
--shadow-low: --theme(--shadow-sm);
|
|
206
|
+
/* @deprecated Use --shadow-md instead. This API will be removed with the next major release. */
|
|
207
|
+
--shadow-medium: --theme(--shadow-md);
|
|
208
|
+
/* @deprecated Use --shadow-lg instead. This API will be removed with the next major release. */
|
|
209
|
+
--shadow-high: --theme(--shadow-lg);
|
|
204
210
|
--default-outline-width: 2px;
|
|
205
211
|
--transition-duration-sm: 0.25s;
|
|
206
212
|
--transition-duration-md: 0.4s;
|
|
207
213
|
--transition-duration-lg: 0.6s;
|
|
208
214
|
--transition-duration-xl: 1.2s;
|
|
215
|
+
/* @deprecated Use --transition-duration-sm instead. This API will be removed with the next major release. */
|
|
216
|
+
--transition-duration-short: --theme(--transition-duration-sm);
|
|
217
|
+
/* @deprecated Use --transition-duration-md instead. This API will be removed with the next major release. */
|
|
218
|
+
--transition-duration-moderate: --theme(--transition-duration-md);
|
|
219
|
+
/* @deprecated Use --transition-duration-lg instead. This API will be removed with the next major release. */
|
|
220
|
+
--transition-duration-long: --theme(--transition-duration-lg);
|
|
221
|
+
/* @deprecated Use --transition-duration-xl instead. This API will be removed with the next major release. */
|
|
222
|
+
--transition-duration-very-long: --theme(--transition-duration-xl);
|
|
209
223
|
--ease-in-out: cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
210
224
|
--ease-in: cubic-bezier(0, 0, 0.2, 1);
|
|
211
225
|
--ease-out: cubic-bezier(0.4, 0, 0.5, 1);
|
|
212
226
|
--default-transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
213
227
|
--default-transition-duration: 0.25s;
|
|
214
|
-
/* alias (deprecated) */
|
|
215
|
-
--shadow-low: --theme(--shadow-sm);
|
|
216
|
-
/* alias (deprecated) */
|
|
217
|
-
--shadow-medium: --theme(--shadow-md);
|
|
218
|
-
/* alias (deprecated) */
|
|
219
|
-
--shadow-high: --theme(--shadow-lg);
|
|
220
|
-
/* alias (deprecated) */
|
|
221
|
-
--transition-duration-short: --theme(--transition-duration-sm);
|
|
222
|
-
/* alias (deprecated) */
|
|
223
|
-
--transition-duration-moderate: --theme(--transition-duration-md);
|
|
224
|
-
/* alias (deprecated) */
|
|
225
|
-
--transition-duration-long: --theme(--transition-duration-lg);
|
|
226
|
-
/* alias (deprecated) */
|
|
227
|
-
--transition-duration-very-long: --theme(--transition-duration-xl);
|
|
228
228
|
--animate-skeleton: skeleton --theme(--transition-duration-xl)
|
|
229
229
|
--theme(--ease-in-out) infinite;
|
|
230
230
|
@keyframes skeleton {
|