@porsche-design-system/components-react 3.10.0-rc.2 → 3.10.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/cjs/lib/components/carousel.wrapper.cjs +3 -3
- package/cjs/public-api.cjs +1 -1
- package/esm/lib/components/accordion.wrapper.d.ts +5 -5
- package/esm/lib/components/button-pure.wrapper.d.ts +1 -1
- package/esm/lib/components/carousel.wrapper.d.ts +21 -5
- package/esm/lib/components/carousel.wrapper.mjs +3 -3
- package/esm/lib/components/checkbox-wrapper.wrapper.d.ts +2 -2
- package/esm/lib/components/flyout-navigation-item.wrapper.d.ts +12 -0
- package/esm/lib/components/flyout-navigation.wrapper.d.ts +3 -3
- package/esm/lib/components/icon.wrapper.d.ts +1 -1
- package/esm/lib/components/link-pure.wrapper.d.ts +1 -1
- package/esm/lib/components/link-tile-product.wrapper.d.ts +3 -3
- package/esm/lib/components/multi-select.wrapper.d.ts +3 -3
- package/esm/lib/components/pagination.wrapper.d.ts +5 -5
- package/esm/lib/components/pin-code.wrapper.d.ts +3 -3
- package/esm/lib/components/radio-button-wrapper.wrapper.d.ts +2 -2
- package/esm/lib/components/segmented-control.wrapper.d.ts +5 -5
- package/esm/lib/components/stepper-horizontal.wrapper.d.ts +5 -5
- package/esm/lib/components/switch.wrapper.d.ts +5 -5
- package/esm/lib/components/table.wrapper.d.ts +5 -5
- package/esm/lib/components/tabs-bar.wrapper.d.ts +5 -5
- package/esm/lib/components/tabs.wrapper.d.ts +5 -5
- package/esm/lib/components/text-field-wrapper.wrapper.d.ts +2 -2
- package/esm/lib/components/text.wrapper.d.ts +1 -1
- package/esm/lib/types.d.ts +88 -55
- package/jsdom-polyfill/index.d.ts +1 -0
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +328 -329
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +41 -24
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +9 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-navigation-item.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-navigation.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-product.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +12 -11
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/minifyCss.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/public-api.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +328 -329
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +40 -24
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +10 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-navigation-item.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-navigation.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-product.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +12 -11
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/minifyCss.mjs +4 -4
- package/ssr/esm/lib/components/accordion.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/carousel.wrapper.d.ts +21 -5
- package/ssr/esm/lib/components/checkbox-wrapper.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/flyout-navigation-item.wrapper.d.ts +12 -0
- package/ssr/esm/lib/components/flyout-navigation.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/link-tile-product.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/multi-select.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/pagination.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/pin-code.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/radio-button-wrapper.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/segmented-control.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/stepper-horizontal.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/switch.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/table.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/tabs-bar.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/tabs.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/text-field-wrapper.wrapper.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/flyout-navigation-item.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/flyout-navigation.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/link-tile-product.d.ts +1 -1
- package/ssr/esm/lib/dsr-components/modal.d.ts +1 -0
- package/ssr/esm/lib/types.d.ts +88 -55
|
@@ -29,20 +29,20 @@ function _typeof(o) {
|
|
|
29
29
|
}, _typeof(o);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
function
|
|
33
|
-
if (
|
|
34
|
-
var
|
|
35
|
-
if (
|
|
36
|
-
var
|
|
37
|
-
if (
|
|
32
|
+
function toPrimitive(t, r) {
|
|
33
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
34
|
+
var e = t[Symbol.toPrimitive];
|
|
35
|
+
if (void 0 !== e) {
|
|
36
|
+
var i = e.call(t, r || "default");
|
|
37
|
+
if ("object" != _typeof(i)) return i;
|
|
38
38
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
39
39
|
}
|
|
40
|
-
return (
|
|
40
|
+
return ("string" === r ? String : Number)(t);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
function
|
|
44
|
-
var
|
|
45
|
-
return _typeof(
|
|
43
|
+
function toPropertyKey(t) {
|
|
44
|
+
var i = toPrimitive(t, "string");
|
|
45
|
+
return "symbol" == _typeof(i) ? i : String(i);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
function _defineProperties(target, props) {
|
|
@@ -51,7 +51,7 @@ function _defineProperties(target, props) {
|
|
|
51
51
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
52
52
|
descriptor.configurable = true;
|
|
53
53
|
if ("value" in descriptor) descriptor.writable = true;
|
|
54
|
-
Object.defineProperty(target,
|
|
54
|
+
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -3221,7 +3221,7 @@ const getFocusStyle = (opts) => {
|
|
|
3221
3221
|
? borderRadiusMedium
|
|
3222
3222
|
: borderRadius || borderRadiusSmall;
|
|
3223
3223
|
return {
|
|
3224
|
-
borderRadius: borderRadiusValue,
|
|
3224
|
+
borderRadius: borderRadiusValue, // it's visually being reflected on both (when placed here), element and focus outline
|
|
3225
3225
|
'&:focus': {
|
|
3226
3226
|
outline: `${borderWidthBase} solid ${themeLightStateFocus}`,
|
|
3227
3227
|
outlineOffset,
|
|
@@ -3855,7 +3855,7 @@ const getInsetJssStyle = (value = 0) => {
|
|
|
3855
3855
|
const getResetInitialStylesForSlottedAnchor = {
|
|
3856
3856
|
margin: 0,
|
|
3857
3857
|
padding: 0,
|
|
3858
|
-
outline: 0,
|
|
3858
|
+
outline: 0, // reset native blue outline
|
|
3859
3859
|
borderRadius: 0,
|
|
3860
3860
|
background: 'transparent',
|
|
3861
3861
|
};
|
|
@@ -3868,7 +3868,7 @@ const focusPseudoJssStyle = {
|
|
|
3868
3868
|
...getInsetJssStyle(),
|
|
3869
3869
|
},
|
|
3870
3870
|
'&:focus::before': {
|
|
3871
|
-
borderRadius: '1px',
|
|
3871
|
+
borderRadius: '1px', // TODO: why just 1px border-radius?
|
|
3872
3872
|
outline: `${borderWidthBase} solid ${themeLightStateFocus}`,
|
|
3873
3873
|
outlineOffset: '2px',
|
|
3874
3874
|
},
|
|
@@ -3911,35 +3911,36 @@ const getBackfaceVisibilityJssStyle = () => ({
|
|
|
3911
3911
|
/**
|
|
3912
3912
|
* Generates JSS styles for a frosted glass background.
|
|
3913
3913
|
* @param {boolean} isVisible - Determines if the frosted glass effect is visible.
|
|
3914
|
+
* @param {number} zIndex - The z-index to be used.
|
|
3915
|
+
* @param {Theme} theme - The theme to be used.
|
|
3914
3916
|
* @param {string} duration - The duration of the transition animation.
|
|
3915
|
-
* @
|
|
3916
|
-
* @param {string} timingFn - The timing function of the transition animation. (default: 'cubic-bezier(.16,1,.3,1)')
|
|
3917
|
-
* @returns {JssStyle} - The JSS styles for the frosted glass background.
|
|
3917
|
+
* @returns {JssStyle} - The JSS styles for the frosted glass backdrop.
|
|
3918
3918
|
*/
|
|
3919
|
-
const
|
|
3919
|
+
const getBackdropJssStyle = (isVisible, zIndex, theme, duration = 'long') => {
|
|
3920
3920
|
return {
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3921
|
+
position: 'fixed',
|
|
3922
|
+
...getInsetJssStyle(),
|
|
3923
|
+
zIndex,
|
|
3924
|
+
// TODO: background shading is missing in getThemedColors(theme).backgroundShading
|
|
3925
|
+
background: isThemeDark(theme) ? themeDarkBackgroundShading : themeLightBackgroundShading,
|
|
3926
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
3927
|
+
background: themeDarkBackgroundShading,
|
|
3928
|
+
}),
|
|
3929
|
+
...(isVisible
|
|
3930
|
+
? {
|
|
3931
|
+
visibility: 'inherit',
|
|
3932
|
+
pointerEvents: 'auto',
|
|
3933
|
+
...frostedGlassStyle,
|
|
3934
|
+
opacity: 1,
|
|
3935
|
+
}
|
|
3936
|
+
: {
|
|
3937
|
+
visibility: 'hidden', // element shall not be tabbable after fade out transition has finished
|
|
3938
|
+
pointerEvents: 'none',
|
|
3939
|
+
WebkitBackdropFilter: 'blur(0px)',
|
|
3940
|
+
backdropFilter: 'blur(0px)',
|
|
3941
|
+
opacity: 0,
|
|
3941
3942
|
}),
|
|
3942
|
-
},
|
|
3943
|
+
transition: `${getTransition('opacity', duration)}, ${getTransition('backdrop-filter', duration)}, ${getTransition('-webkit-backdrop-filter', duration)}, visibility 0s linear var(${cssVariableTransitionDuration}, ${isVisible ? '0s' : motionDurationMap[duration]})`,
|
|
3943
3944
|
};
|
|
3944
3945
|
};
|
|
3945
3946
|
|
|
@@ -4098,12 +4099,14 @@ const getComponentCss$13 = (size, compact, open, theme) => {
|
|
|
4098
4099
|
':host': {
|
|
4099
4100
|
display: 'block',
|
|
4100
4101
|
...addImportantToEachRule({
|
|
4101
|
-
...(
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4102
|
+
...(compact
|
|
4103
|
+
? { transform: 'translate3d(0,0,0)' } // relevant for custom click-area in compact variant
|
|
4104
|
+
: {
|
|
4105
|
+
borderBottom: `1px solid ${contrastLowColor}`,
|
|
4106
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4107
|
+
borderColor: contrastLowColorDark,
|
|
4108
|
+
}),
|
|
4105
4109
|
}),
|
|
4106
|
-
}),
|
|
4107
4110
|
'&(:only-of-type)': { borderBottom: 0 },
|
|
4108
4111
|
...colorSchemeStyles,
|
|
4109
4112
|
...hostHiddenStyles,
|
|
@@ -4113,11 +4116,12 @@ const getComponentCss$13 = (size, compact, open, theme) => {
|
|
|
4113
4116
|
display: 'flex',
|
|
4114
4117
|
position: 'relative',
|
|
4115
4118
|
justifyContent: 'space-between',
|
|
4119
|
+
alignItems: 'center',
|
|
4116
4120
|
width: '100%',
|
|
4117
4121
|
textDecoration: 'none',
|
|
4118
4122
|
border: 0,
|
|
4119
4123
|
outline: 0,
|
|
4120
|
-
margin: 0,
|
|
4124
|
+
margin: 0, // Removes default button margin on safari 15
|
|
4121
4125
|
gap: '24px',
|
|
4122
4126
|
background: 'transparent',
|
|
4123
4127
|
cursor: 'pointer',
|
|
@@ -4190,7 +4194,7 @@ const getComponentCss$13 = (size, compact, open, theme) => {
|
|
|
4190
4194
|
transition: getTransition('transform'),
|
|
4191
4195
|
},
|
|
4192
4196
|
collapsible: {
|
|
4193
|
-
color: primaryColor,
|
|
4197
|
+
color: primaryColor, // enables color inheritance for slotted content
|
|
4194
4198
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4195
4199
|
color: primaryColorDark,
|
|
4196
4200
|
}),
|
|
@@ -4244,10 +4248,10 @@ const getComponentCss$12 = (isOpen) => {
|
|
|
4244
4248
|
margin: 0,
|
|
4245
4249
|
padding: 0,
|
|
4246
4250
|
width: 'auto',
|
|
4247
|
-
maxWidth: '100%',
|
|
4251
|
+
maxWidth: '100%', // If component is wrapped in container with maxWidth
|
|
4248
4252
|
zIndex: `var(${cssVariableZIndex},${BANNER_Z_INDEX})`,
|
|
4249
4253
|
...dropShadowHighStyle,
|
|
4250
|
-
borderRadius: borderRadiusSmall,
|
|
4254
|
+
borderRadius: borderRadiusSmall, // needed for rounded box-shadow
|
|
4251
4255
|
...(isOpen
|
|
4252
4256
|
? {
|
|
4253
4257
|
opacity: 1,
|
|
@@ -4355,14 +4359,14 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4355
4359
|
'@global': {
|
|
4356
4360
|
':host': {
|
|
4357
4361
|
...addImportantToEachRule({
|
|
4358
|
-
transform: 'translate3d(0,0,0)',
|
|
4359
|
-
outline: 0,
|
|
4362
|
+
transform: 'translate3d(0,0,0)', // creates new stacking context
|
|
4363
|
+
outline: 0, // custom element is able to delegate the focus
|
|
4360
4364
|
...colorSchemeStyles,
|
|
4361
4365
|
...hostHiddenStyles,
|
|
4362
4366
|
}),
|
|
4363
4367
|
...buildResponsiveStyles(stretch, (responsiveStretch) => ({
|
|
4364
4368
|
display: responsiveStretch ? 'block' : 'inline-block',
|
|
4365
|
-
width: responsiveStretch ? '100%' : 'auto',
|
|
4369
|
+
width: responsiveStretch ? '100%' : 'auto', // prevents adjusting its size when used as flex or grid child
|
|
4366
4370
|
...(!responsiveStretch && { verticalAlign: 'top' }),
|
|
4367
4371
|
})),
|
|
4368
4372
|
},
|
|
@@ -4372,7 +4376,7 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4372
4376
|
gap: spacingStaticXSmall,
|
|
4373
4377
|
width: '100%',
|
|
4374
4378
|
padding: 0,
|
|
4375
|
-
margin: 0,
|
|
4379
|
+
margin: 0, // Removes default button margin on safari 15
|
|
4376
4380
|
color: isDisabledOrLoading ? disabledColor : primaryColor,
|
|
4377
4381
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4378
4382
|
color: isDisabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
@@ -4387,7 +4391,7 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4387
4391
|
}))),
|
|
4388
4392
|
'&::before': {
|
|
4389
4393
|
content: '""',
|
|
4390
|
-
position: 'absolute',
|
|
4394
|
+
position: 'absolute', // mobile Safari -> prevent lagging active state
|
|
4391
4395
|
top: offsetVertical,
|
|
4392
4396
|
bottom: offsetVertical,
|
|
4393
4397
|
...buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
@@ -4454,7 +4458,7 @@ const getComponentCss$10 = (icon, iconSource, active, isLoading, isDisabledOrLoa
|
|
|
4454
4458
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4455
4459
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, false, theme), {
|
|
4456
4460
|
root: {
|
|
4457
|
-
WebkitAppearance: 'none',
|
|
4461
|
+
WebkitAppearance: 'none', // iOS safari
|
|
4458
4462
|
appearance: 'none',
|
|
4459
4463
|
background: 'transparent',
|
|
4460
4464
|
textAlign: 'start',
|
|
@@ -4488,18 +4492,17 @@ const getFontWeight = (weight) => {
|
|
|
4488
4492
|
|
|
4489
4493
|
const getThemedTypographyColor = (theme, textColor // eslint-disable-line @typescript-eslint/no-duplicate-type-constituents
|
|
4490
4494
|
) => {
|
|
4491
|
-
|
|
4492
|
-
const { primaryColor, contrastHighColor, contrastMediumColor, contrastLowColor, successColor, errorColor, warningColor, infoColor, } = getThemedColors(theme);
|
|
4495
|
+
const themedColors = getThemedColors(theme);
|
|
4493
4496
|
const colorMap = {
|
|
4494
|
-
primary: primaryColor,
|
|
4495
|
-
default: primaryColor,
|
|
4496
|
-
'contrast-low': contrastLowColor,
|
|
4497
|
-
'contrast-medium': contrastMediumColor,
|
|
4498
|
-
'contrast-high': contrastHighColor,
|
|
4499
|
-
'notification-success': successColor,
|
|
4500
|
-
'notification-warning': warningColor,
|
|
4501
|
-
'notification-error': errorColor,
|
|
4502
|
-
'notification-info': infoColor,
|
|
4497
|
+
primary: themedColors.primaryColor,
|
|
4498
|
+
default: themedColors.primaryColor, // deprecated but part of HeadlineColor
|
|
4499
|
+
'contrast-low': themedColors.contrastLowColor,
|
|
4500
|
+
'contrast-medium': themedColors.contrastMediumColor,
|
|
4501
|
+
'contrast-high': themedColors.contrastHighColor,
|
|
4502
|
+
'notification-success': themedColors.successColor,
|
|
4503
|
+
'notification-warning': themedColors.warningColor,
|
|
4504
|
+
'notification-error': themedColors.errorColor,
|
|
4505
|
+
'notification-info': themedColors.infoColor,
|
|
4503
4506
|
inherit: 'currentColor',
|
|
4504
4507
|
};
|
|
4505
4508
|
return colorMap[textColor];
|
|
@@ -4540,7 +4543,7 @@ const getTileBaseStyles = (aspectRatio, isDisabled) => {
|
|
|
4540
4543
|
root: {
|
|
4541
4544
|
position: 'relative',
|
|
4542
4545
|
overflow: 'hidden',
|
|
4543
|
-
transform: 'translate3d(0,0,0)',
|
|
4546
|
+
transform: 'translate3d(0,0,0)', // change stacking context for position fixed
|
|
4544
4547
|
borderRadius: borderRadiusLarge,
|
|
4545
4548
|
color: getThemedTypographyColor('dark', 'primary'),
|
|
4546
4549
|
...buildResponsiveStyles(aspectRatio, (ratio) => ({
|
|
@@ -4565,7 +4568,7 @@ const getTileBaseStyles = (aspectRatio, isDisabled) => {
|
|
|
4565
4568
|
display: 'flex',
|
|
4566
4569
|
justifyItems: 'start',
|
|
4567
4570
|
gap: spacingStaticMedium,
|
|
4568
|
-
borderRadius: borderRadiusLarge,
|
|
4571
|
+
borderRadius: borderRadiusLarge, // for gradient
|
|
4569
4572
|
'@media (forced-colors: active)': {
|
|
4570
4573
|
background: 'rgba(0,0,0,0.7)',
|
|
4571
4574
|
},
|
|
@@ -4583,7 +4586,7 @@ background, align, compact, hasGradient, isDisabled) => {
|
|
|
4583
4586
|
return mergeDeep(getTileBaseStyles(aspectRatio, isDisabled), {
|
|
4584
4587
|
'@global': {
|
|
4585
4588
|
p: {
|
|
4586
|
-
maxWidth: pxToRemWithUnit(550),
|
|
4589
|
+
maxWidth: pxToRemWithUnit(550), // in this case rem unit makes sense to scale up available space
|
|
4587
4590
|
margin: 0,
|
|
4588
4591
|
...textLargeStyle,
|
|
4589
4592
|
hyphens: 'inherit',
|
|
@@ -4596,7 +4599,7 @@ background, align, compact, hasGradient, isDisabled) => {
|
|
|
4596
4599
|
},
|
|
4597
4600
|
},
|
|
4598
4601
|
content: {
|
|
4599
|
-
display: 'grid',
|
|
4602
|
+
display: 'grid', // TODO: flex via getTileBaseStyles
|
|
4600
4603
|
...(isTopAligned ? { top: 0 } : { bottom: 0 }),
|
|
4601
4604
|
padding: isTopAligned
|
|
4602
4605
|
? `${spacingFluidMedium} ${spacingFluidMedium} ${spacingFluidLarge}`
|
|
@@ -4619,7 +4622,7 @@ background, align, compact, hasGradient, isDisabled) => {
|
|
|
4619
4622
|
display: isCompact ? 'inline-block' : 'none',
|
|
4620
4623
|
})),
|
|
4621
4624
|
'link-or-button': {
|
|
4622
|
-
minHeight: '54px',
|
|
4625
|
+
minHeight: '54px', // prevent content shift
|
|
4623
4626
|
...buildResponsiveStyles(compact, (isCompact) => ({
|
|
4624
4627
|
display: isCompact ? 'none' : 'inline-block',
|
|
4625
4628
|
})),
|
|
@@ -4673,7 +4676,7 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4673
4676
|
display: 'inline-block',
|
|
4674
4677
|
...addImportantToEachRule({
|
|
4675
4678
|
verticalAlign: 'top',
|
|
4676
|
-
outline: 0,
|
|
4679
|
+
outline: 0, // custom element is able to delegate the focus
|
|
4677
4680
|
...colorSchemeStyles,
|
|
4678
4681
|
...hostHiddenStyles,
|
|
4679
4682
|
}),
|
|
@@ -4684,17 +4687,17 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4684
4687
|
alignItems: 'flex-start',
|
|
4685
4688
|
justifyContent: 'center',
|
|
4686
4689
|
width: '100%',
|
|
4687
|
-
minWidth: '54px',
|
|
4688
|
-
minHeight: '54px',
|
|
4690
|
+
minWidth: '54px', // ensure space is already reserved until icon component is loaded (ssr)
|
|
4691
|
+
minHeight: '54px', // ensure space is already reserved until icon component is loaded (ssr)
|
|
4689
4692
|
boxSizing: 'border-box',
|
|
4690
4693
|
outline: 0,
|
|
4691
4694
|
textAlign: 'start',
|
|
4692
|
-
WebkitAppearance: 'none',
|
|
4695
|
+
WebkitAppearance: 'none', // iOS safari
|
|
4693
4696
|
appearance: 'none',
|
|
4694
4697
|
textDecoration: 'none',
|
|
4695
4698
|
border: `2px solid ${borderColor}`,
|
|
4696
4699
|
borderRadius: borderRadiusSmall,
|
|
4697
|
-
transform: 'translate3d(0,0,0)',
|
|
4700
|
+
transform: 'translate3d(0,0,0)', // creates new stacking context (for slotted anchor + focus)
|
|
4698
4701
|
backgroundColor,
|
|
4699
4702
|
color: textColor,
|
|
4700
4703
|
...textSmallStyle,
|
|
@@ -4827,15 +4830,11 @@ const selectorHeading = 'h2,::slotted([slot=heading])';
|
|
|
4827
4830
|
const selectorDescription = 'p,::slotted([slot=description])';
|
|
4828
4831
|
const mediaQueryS = getMediaQueryMin('s');
|
|
4829
4832
|
const mediaQueryXXL = getMediaQueryMin('xxl');
|
|
4830
|
-
// we need an explicit grid template, therefor we need to calculate the button group width
|
|
4831
|
-
const buttonSize$1 = `calc(${spacingStaticSmall} * 2 + ${fontLineHeight})`;
|
|
4832
|
-
// + 2px, compensates hover offset of button-pure
|
|
4833
|
-
const buttonGroupWidth = `calc(${buttonSize$1} * 3 + ${spacingStaticXSmall} + 2px)`;
|
|
4834
4833
|
const spacingMap = {
|
|
4835
4834
|
basic: gridBasicOffset,
|
|
4836
4835
|
extended: gridExtendedOffset,
|
|
4837
4836
|
};
|
|
4838
|
-
const getComponentCss$Z = (width, hasPagination, isInfinitePagination, alignHeader, theme) => {
|
|
4837
|
+
const getComponentCss$Z = (hasHeading, hasDescription, hasHeaderSlot, headingSize, width, hasPagination, isInfinitePagination, alignHeader, theme) => {
|
|
4839
4838
|
const { primaryColor, contrastMediumColor, focusColor } = getThemedColors(theme);
|
|
4840
4839
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
4841
4840
|
const { canvasTextColor } = getHighContrastColors();
|
|
@@ -4845,13 +4844,26 @@ const getComponentCss$Z = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4845
4844
|
':host': {
|
|
4846
4845
|
display: 'flex',
|
|
4847
4846
|
...addImportantToEachRule({
|
|
4848
|
-
gap: spacingFluidMedium,
|
|
4847
|
+
gap: spacingFluidMedium, // TODO: maybe it's better to style by margin on .splide, then styles would be part of shadow dom
|
|
4849
4848
|
flexDirection: 'column',
|
|
4850
|
-
boxSizing: 'content-box',
|
|
4849
|
+
boxSizing: 'content-box', // ensures padding is added to host instead of subtracted
|
|
4851
4850
|
...colorSchemeStyles,
|
|
4852
4851
|
...hostHiddenStyles,
|
|
4853
4852
|
}),
|
|
4854
4853
|
},
|
|
4854
|
+
...(hasHeaderSlot && {
|
|
4855
|
+
['slot[name="header"]']: {
|
|
4856
|
+
display: 'block',
|
|
4857
|
+
gridColumnStart: 1,
|
|
4858
|
+
gridRowStart: 3,
|
|
4859
|
+
alignSelf: 'center', // ensures vertical alignment to prev/next buttons
|
|
4860
|
+
...(isHeaderAlignCenter && {
|
|
4861
|
+
[getMediaQueryMax('s')]: {
|
|
4862
|
+
justifySelf: 'center', // relevant for horizontal alignment of header on mobile view only
|
|
4863
|
+
},
|
|
4864
|
+
}),
|
|
4865
|
+
},
|
|
4866
|
+
}),
|
|
4855
4867
|
...addImportantToEachRule({
|
|
4856
4868
|
'::slotted(*)': {
|
|
4857
4869
|
borderRadius: `var(--p-carousel-border-radius, ${borderRadiusLarge})`,
|
|
@@ -4863,45 +4875,45 @@ const getComponentCss$Z = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4863
4875
|
}),
|
|
4864
4876
|
outlineOffset: '2px',
|
|
4865
4877
|
},
|
|
4866
|
-
[
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
: {
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
},
|
|
4878
|
+
// TODO: maybe it's better to style with slot[name="heading"] and slot[name="description"] instead, then styles would be part of shadow dom
|
|
4879
|
+
// h2,::slotted([slot=heading]),p,::slotted([slot=description])
|
|
4880
|
+
...((hasHeading || hasDescription) && {
|
|
4881
|
+
[`${selectorHeading},${selectorDescription}`]: {
|
|
4882
|
+
gridColumn: '1/-1',
|
|
4883
|
+
color: primaryColor,
|
|
4884
|
+
...(isHeaderAlignCenter && {
|
|
4885
|
+
textAlign: 'center', // relevant in case heading or description becomes multiline
|
|
4886
|
+
justifySelf: 'center', // relevant for horizontal alignment of heading and description in case max-width applies
|
|
4887
|
+
}),
|
|
4888
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4889
|
+
color: primaryColorDark,
|
|
4890
|
+
}),
|
|
4891
|
+
},
|
|
4892
|
+
}),
|
|
4893
|
+
// h2,::slotted([slot=heading])
|
|
4894
|
+
...(hasHeading && {
|
|
4895
|
+
[selectorHeading]: {
|
|
4896
|
+
maxWidth: '56.25rem',
|
|
4897
|
+
margin: `0 0 ${!hasDescription ? spacingFluidMedium : 0}`,
|
|
4898
|
+
...(headingSize === 'xx-large' ? headingXXLargeStyle : headingXLargeStyle),
|
|
4899
|
+
},
|
|
4900
|
+
}),
|
|
4901
|
+
// p,::slotted([slot=description])
|
|
4902
|
+
...(hasDescription && {
|
|
4903
|
+
[selectorDescription]: {
|
|
4904
|
+
maxWidth: '34.375rem',
|
|
4905
|
+
margin: `${spacingFluidSmall} 0 ${spacingFluidMedium}`,
|
|
4906
|
+
...textSmallStyle,
|
|
4907
|
+
},
|
|
4908
|
+
}),
|
|
4889
4909
|
}),
|
|
4890
4910
|
},
|
|
4891
4911
|
header: {
|
|
4892
4912
|
display: 'grid',
|
|
4893
4913
|
padding: `0 ${spacingMap[width].base}`,
|
|
4894
|
-
...(isHeaderAlignCenter && {
|
|
4895
|
-
textAlign: 'center',
|
|
4896
|
-
}),
|
|
4897
4914
|
[mediaQueryS]: {
|
|
4898
|
-
|
|
4899
|
-
fontSize: fontSizeTextSmall,
|
|
4915
|
+
gridTemplateColumns: 'minmax(0px, 1fr) auto',
|
|
4900
4916
|
columnGap: spacingStaticMedium,
|
|
4901
|
-
gridTemplateColumns: `${buttonGroupWidth} minmax(0px, 1fr) ${buttonGroupWidth}`,
|
|
4902
|
-
...(isHeaderAlignCenter && {
|
|
4903
|
-
justifyItems: 'center', // relevant when max-width of heading or description is reached
|
|
4904
|
-
}),
|
|
4905
4917
|
padding: `0 ${spacingMap[width].s}`,
|
|
4906
4918
|
},
|
|
4907
4919
|
[mediaQueryXXL]: {
|
|
@@ -4911,12 +4923,11 @@ const getComponentCss$Z = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4911
4923
|
nav: {
|
|
4912
4924
|
display: 'none',
|
|
4913
4925
|
[mediaQueryS]: {
|
|
4926
|
+
gridRowStart: '3',
|
|
4927
|
+
gridColumnEnd: '-1',
|
|
4914
4928
|
display: 'flex',
|
|
4915
4929
|
gap: spacingStaticXSmall,
|
|
4916
|
-
|
|
4917
|
-
alignItems: 'end',
|
|
4918
|
-
justifyContent: 'end',
|
|
4919
|
-
justifySelf: 'end',
|
|
4930
|
+
alignSelf: 'flex-start', // relevant in case slot="header" becomes higher than nav group
|
|
4920
4931
|
},
|
|
4921
4932
|
},
|
|
4922
4933
|
btn: {
|
|
@@ -4932,8 +4943,8 @@ const getComponentCss$Z = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4932
4943
|
},
|
|
4933
4944
|
splide: {
|
|
4934
4945
|
overflow: 'hidden',
|
|
4935
|
-
padding: '4px 0',
|
|
4936
|
-
margin: '-4px 0',
|
|
4946
|
+
padding: '4px 0', // for slide focus outline
|
|
4947
|
+
margin: '-4px 0', // for slide focus outline
|
|
4937
4948
|
'&__track': {
|
|
4938
4949
|
// !important is necessary to override inline styles set by splide library
|
|
4939
4950
|
...addImportantToEachRule({
|
|
@@ -4973,7 +4984,7 @@ const getComponentCss$Z = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4973
4984
|
})),
|
|
4974
4985
|
position: 'relative',
|
|
4975
4986
|
justifyContent: isInfinitePagination ? 'flex-start' : 'center',
|
|
4976
|
-
width: `calc(${paginationActiveBulletSize} + ${paginationBulletSize} * 4 + ${spacingStaticSmall} * 4)`,
|
|
4987
|
+
width: `calc(${paginationActiveBulletSize} + ${paginationBulletSize} * 4 + ${spacingStaticSmall} * 4)`, // Width for five bullets (one active + spacing)
|
|
4977
4988
|
left: 'calc(50% - 42px)',
|
|
4978
4989
|
overflowX: 'hidden',
|
|
4979
4990
|
},
|
|
@@ -4981,7 +4992,7 @@ const getComponentCss$Z = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4981
4992
|
display: 'flex',
|
|
4982
4993
|
alignItems: 'center',
|
|
4983
4994
|
width: 'fit-content',
|
|
4984
|
-
height: paginationBulletSize,
|
|
4995
|
+
height: paginationBulletSize, // Needed to avoid jumping when rewinding dynamically added slides
|
|
4985
4996
|
gap: spacingStaticSmall,
|
|
4986
4997
|
transition: `transform ${carouselTransitionDuration}`,
|
|
4987
4998
|
},
|
|
@@ -5096,14 +5107,14 @@ const getSlottedCheckboxRadioButtonStyles = (state, isDisabled, isLoading, theme
|
|
|
5096
5107
|
return {
|
|
5097
5108
|
'::slotted': {
|
|
5098
5109
|
'&(input)': {
|
|
5099
|
-
position: 'relative',
|
|
5110
|
+
position: 'relative', // TODO: can be removed as soon as focus style was adjusted
|
|
5100
5111
|
width: fontLineHeight,
|
|
5101
5112
|
height: fontLineHeight,
|
|
5102
|
-
font: `${fontSizeTextSmall} ${fontFamily}`,
|
|
5113
|
+
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
5103
5114
|
display: 'block',
|
|
5104
5115
|
margin: 0,
|
|
5105
5116
|
padding: 0,
|
|
5106
|
-
WebkitAppearance: 'none',
|
|
5117
|
+
WebkitAppearance: 'none', // iOS safari
|
|
5107
5118
|
appearance: 'none',
|
|
5108
5119
|
boxSizing: 'content-box',
|
|
5109
5120
|
background: `transparent 0% 0% / ${fontLineHeight}`,
|
|
@@ -5193,9 +5204,9 @@ const getFunctionalComponentLabelStyles = (isDisabledOrLoading, hideLabel, theme
|
|
|
5193
5204
|
label: {
|
|
5194
5205
|
...textSmallStyle,
|
|
5195
5206
|
cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer',
|
|
5196
|
-
justifySelf: 'flex-start',
|
|
5207
|
+
justifySelf: 'flex-start', // ensures label is not getting stretched by flex or grid context of its parent
|
|
5197
5208
|
color: isDisabledOrLoading ? disabledColor : primaryColor,
|
|
5198
|
-
transition: getTransition('color'),
|
|
5209
|
+
transition: getTransition('color'), // for smooth transitions between e.g. disabled state
|
|
5199
5210
|
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, additionalIsShownJssStyle)),
|
|
5200
5211
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5201
5212
|
color: isDisabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
@@ -5304,7 +5315,7 @@ const getComponentCss$Y = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5304
5315
|
wrapper: {
|
|
5305
5316
|
display: 'grid',
|
|
5306
5317
|
gridArea: '1/1',
|
|
5307
|
-
alignSelf: 'flex-start',
|
|
5318
|
+
alignSelf: 'flex-start', // in case label becomes multiline
|
|
5308
5319
|
...(isDisabledOrLoading(isDisabled, isLoading) && {
|
|
5309
5320
|
// TODO: maybe .wrapper should handle it for all form components while pointer-events: none is set to input
|
|
5310
5321
|
cursor: 'not-allowed',
|
|
@@ -5313,12 +5324,12 @@ const getComponentCss$Y = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5313
5324
|
...(isLoading && {
|
|
5314
5325
|
// TODO: extract for checkbox-wrapper and radio-button-wrapper (not gridArea and placeSelf)
|
|
5315
5326
|
spinner: {
|
|
5316
|
-
position: 'relative',
|
|
5327
|
+
position: 'relative', // ensure correct stacking, can be removed as soon as focus for input is handled with outline
|
|
5317
5328
|
gridArea: '1/1',
|
|
5318
5329
|
placeSelf: 'center',
|
|
5319
5330
|
width: fontLineHeight,
|
|
5320
5331
|
height: fontLineHeight,
|
|
5321
|
-
font: `${fontSizeTextSmall} ${fontFamily}`,
|
|
5332
|
+
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
5322
5333
|
pointerEvents: 'none',
|
|
5323
5334
|
},
|
|
5324
5335
|
}),
|
|
@@ -5326,7 +5337,7 @@ const getComponentCss$Y = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5326
5337
|
...getFunctionalComponentLabelStyles(isDisabled || isLoading, hideLabel, theme, {
|
|
5327
5338
|
gridArea: '1/2',
|
|
5328
5339
|
}, {
|
|
5329
|
-
paddingTop: '2px',
|
|
5340
|
+
paddingTop: '2px', // compensate vertical alignment
|
|
5330
5341
|
paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent not clickable area between label and input
|
|
5331
5342
|
}),
|
|
5332
5343
|
// .message
|
|
@@ -5353,7 +5364,7 @@ const getComponentCss$X = (width) => {
|
|
|
5353
5364
|
},
|
|
5354
5365
|
},
|
|
5355
5366
|
root: {
|
|
5356
|
-
minWidth: 0,
|
|
5367
|
+
minWidth: 0, // needed for some flex context
|
|
5357
5368
|
...(['full', 'fluid'].includes(width)
|
|
5358
5369
|
? {
|
|
5359
5370
|
padding: `0 ${gridFullOffset}`,
|
|
@@ -5392,7 +5403,7 @@ const getComponentCss$W = () => {
|
|
|
5392
5403
|
verticalAlign: 'top',
|
|
5393
5404
|
...addImportantToEachRule({
|
|
5394
5405
|
outline: 0,
|
|
5395
|
-
boxSizing: 'content-box',
|
|
5406
|
+
boxSizing: 'content-box', // needed for correct height calculation when padding is set on host (e.g. custom click area)
|
|
5396
5407
|
...getDimensionStyle,
|
|
5397
5408
|
...colorSchemeStyles,
|
|
5398
5409
|
...hostHiddenStyles,
|
|
@@ -5681,7 +5692,7 @@ const getComponentCss$P = (isPrimaryScrollerVisible, isSecondaryScrollerVisible,
|
|
|
5681
5692
|
[cssVariableVisibility]: 'hidden',
|
|
5682
5693
|
[cssVariableVisibilityTransitionDuration]: motionDurationLong,
|
|
5683
5694
|
}),
|
|
5684
|
-
...getBackdropJssStyle(isPrimaryScrollerVisible,
|
|
5695
|
+
...getBackdropJssStyle(isPrimaryScrollerVisible, FLYOUT_Z_INDEX, theme),
|
|
5685
5696
|
...colorSchemeStyles,
|
|
5686
5697
|
...hostHiddenStyles,
|
|
5687
5698
|
}),
|
|
@@ -5689,17 +5700,17 @@ const getComponentCss$P = (isPrimaryScrollerVisible, isSecondaryScrollerVisible,
|
|
|
5689
5700
|
dialog: {
|
|
5690
5701
|
position: 'fixed',
|
|
5691
5702
|
...getInsetJssStyle(),
|
|
5692
|
-
display: 'grid',
|
|
5693
|
-
width: 'auto',
|
|
5694
|
-
height: '100vh',
|
|
5695
|
-
maxWidth: '100vw',
|
|
5696
|
-
maxHeight: '100vh',
|
|
5697
|
-
margin: 0,
|
|
5698
|
-
padding: 0,
|
|
5699
|
-
border: 0,
|
|
5700
|
-
visibility: 'inherit',
|
|
5701
|
-
background: 'none',
|
|
5702
|
-
overflow: 'hidden',
|
|
5703
|
+
display: 'grid', // ua-style reset
|
|
5704
|
+
width: 'auto', // ua-style reset and to ensure transition duration works correctly
|
|
5705
|
+
height: '100vh', // ua-style reset
|
|
5706
|
+
maxWidth: '100vw', // ua-style reset
|
|
5707
|
+
maxHeight: '100vh', // ua-style reset
|
|
5708
|
+
margin: 0, // ua-style reset
|
|
5709
|
+
padding: 0, // ua-style reset
|
|
5710
|
+
border: 0, // ua-style reset
|
|
5711
|
+
visibility: 'inherit', // ua-style reset
|
|
5712
|
+
background: 'none', // ua-style reset
|
|
5713
|
+
overflow: 'hidden', // ua-style reset, dialog shall never become scrollable, it's handled by custom scroll areas
|
|
5703
5714
|
...(isPrimaryScrollerVisible
|
|
5704
5715
|
? {
|
|
5705
5716
|
transform: 'translate3d(0, 0, 0)',
|
|
@@ -5755,7 +5766,7 @@ const getComponentCss$P = (isPrimaryScrollerVisible, isSecondaryScrollerVisible,
|
|
|
5755
5766
|
height: frostedGlassHeaderHeight,
|
|
5756
5767
|
backgroundColor: frostedGlassBackgroundColor,
|
|
5757
5768
|
WebkitBackdropFilter: 'blur(8px)',
|
|
5758
|
-
backdropFilter: 'blur(8px)',
|
|
5769
|
+
backdropFilter: 'blur(8px)', // with current frostedGlassStyle of blur(32px) scrolling becomes visually distracting
|
|
5759
5770
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5760
5771
|
backgroundColor: frostedGlassBackgroundColorDark$1,
|
|
5761
5772
|
}),
|
|
@@ -5776,7 +5787,7 @@ const getComponentCss$P = (isPrimaryScrollerVisible, isSecondaryScrollerVisible,
|
|
|
5776
5787
|
// header is needed to keep position of dismiss button in sync with header of secondary scroller
|
|
5777
5788
|
header: {
|
|
5778
5789
|
position: 'relative',
|
|
5779
|
-
zIndex: 3,
|
|
5790
|
+
zIndex: 3, // ensures dismiss button is visible on secondary drawer in mobile view
|
|
5780
5791
|
gridArea: '1/1',
|
|
5781
5792
|
alignSelf: 'flex-start',
|
|
5782
5793
|
justifySelf: 'flex-end',
|
|
@@ -5800,40 +5811,6 @@ const getComponentCss$P = (isPrimaryScrollerVisible, isSecondaryScrollerVisible,
|
|
|
5800
5811
|
},
|
|
5801
5812
|
});
|
|
5802
5813
|
};
|
|
5803
|
-
// TODO: getBackdropJssStyle can be shared with flyout and modal
|
|
5804
|
-
/**
|
|
5805
|
-
* Generates JSS styles for a frosted glass background.
|
|
5806
|
-
* @param {boolean} isVisible - Determines if the frosted glass effect is visible.
|
|
5807
|
-
* @param {string} duration - The duration of the transition animation.
|
|
5808
|
-
* @param {Theme} theme - The theme to be used
|
|
5809
|
-
* @returns {JssStyle} - The JSS styles for the frosted glass backdrop.
|
|
5810
|
-
*/
|
|
5811
|
-
const getBackdropJssStyle = (isVisible, duration, theme) => {
|
|
5812
|
-
return {
|
|
5813
|
-
position: 'fixed',
|
|
5814
|
-
...getInsetJssStyle(),
|
|
5815
|
-
zIndex: FLYOUT_Z_INDEX,
|
|
5816
|
-
...(isVisible
|
|
5817
|
-
? {
|
|
5818
|
-
visibility: 'visible',
|
|
5819
|
-
pointerEvents: 'auto',
|
|
5820
|
-
...frostedGlassStyle,
|
|
5821
|
-
// TODO: background shading is missing in getThemedColors(theme).backgroundShading
|
|
5822
|
-
background: isThemeDark(theme) ? themeDarkBackgroundShading : themeLightBackgroundShading,
|
|
5823
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5824
|
-
background: themeDarkBackgroundShading,
|
|
5825
|
-
}),
|
|
5826
|
-
}
|
|
5827
|
-
: {
|
|
5828
|
-
visibility: 'hidden',
|
|
5829
|
-
pointerEvents: 'none',
|
|
5830
|
-
WebkitBackdropFilter: 'blur(0px)',
|
|
5831
|
-
backdropFilter: 'blur(0px)',
|
|
5832
|
-
background: 'none',
|
|
5833
|
-
}),
|
|
5834
|
-
transition: `${getTransition('background', duration, 'base')}, ${getTransition('backdrop-filter', duration, 'base')}, ${getTransition('-webkit-backdrop-filter', duration, 'base')}, visibility 0s linear var(${cssVariableTransitionDuration}, ${isVisible ? '0s' : motionDurationLong})`,
|
|
5835
|
-
};
|
|
5836
|
-
};
|
|
5837
5814
|
const getContentJssStyle = () => {
|
|
5838
5815
|
return {
|
|
5839
5816
|
display: 'flex',
|
|
@@ -5898,6 +5875,7 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
|
|
|
5898
5875
|
'::slotted(a)': {
|
|
5899
5876
|
...addImportantToEachRule({
|
|
5900
5877
|
...textSmallStyle,
|
|
5878
|
+
alignSelf: 'flex-start',
|
|
5901
5879
|
display: 'block',
|
|
5902
5880
|
textDecoration: 'none',
|
|
5903
5881
|
cursor: 'pointer',
|
|
@@ -5971,9 +5949,9 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
|
|
|
5971
5949
|
}),
|
|
5972
5950
|
[mediaQueryEnhancedView]: {
|
|
5973
5951
|
boxShadow: 'none',
|
|
5974
|
-
insetInlineStart: `calc(${scrollerWidthEnhancedView} - 1px)`,
|
|
5952
|
+
insetInlineStart: `calc(${scrollerWidthEnhancedView} - 1px)`, // -1px prevents possible visible background under certain circumstances between primary and secondary scroller
|
|
5975
5953
|
width: scrollerWidthEnhancedView,
|
|
5976
|
-
transform: addImportantToRule('initial'),
|
|
5954
|
+
transform: addImportantToRule('initial'), // to overrule :dir(rtl) selector
|
|
5977
5955
|
transition: `visibility 0s linear var(${cssVariableTransitionDuration},var(${cssVariableVisibilityTransitionDuration},0s))`,
|
|
5978
5956
|
},
|
|
5979
5957
|
'&:dir(rtl)': {
|
|
@@ -5994,7 +5972,7 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
|
|
|
5994
5972
|
alignItems: 'center',
|
|
5995
5973
|
gap: spacingFluidSmall,
|
|
5996
5974
|
WebkitBackdropFilter: 'blur(8px)',
|
|
5997
|
-
backdropFilter: 'blur(8px)',
|
|
5975
|
+
backdropFilter: 'blur(8px)', // with current frostedGlassStyle of blur(32px) scrolling becomes visually distracting
|
|
5998
5976
|
backgroundColor: frostedGlassBackgroundColor,
|
|
5999
5977
|
...fadeInOutTransition,
|
|
6000
5978
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -6022,7 +6000,7 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
|
|
|
6022
6000
|
color: primaryColorDark,
|
|
6023
6001
|
}),
|
|
6024
6002
|
},
|
|
6025
|
-
content: mergeDeep(getContentJssStyle(), fadeInOutTransition
|
|
6003
|
+
content: mergeDeep(getContentJssStyle(), fadeInOutTransition),
|
|
6026
6004
|
});
|
|
6027
6005
|
};
|
|
6028
6006
|
|
|
@@ -6045,19 +6023,9 @@ const getComponentCss$N = (isOpen, position, hasFooter, hasSubFooter, theme) =>
|
|
|
6045
6023
|
// needed for correct alignment of the Porsche Grid within the Flyout
|
|
6046
6024
|
'--pds-internal-grid-outer-column': `calc(${spacingFluidLarge} - ${gridGap})`,
|
|
6047
6025
|
'--pds-internal-grid-margin': `calc(${spacingFluidLarge} * -1)`,
|
|
6048
|
-
position: 'fixed',
|
|
6049
|
-
zIndex: FLYOUT_Z_INDEX,
|
|
6050
6026
|
justifyContent: isPositionStart ? 'flex-start' : 'flex-end',
|
|
6051
|
-
...(isOpen
|
|
6052
|
-
? {
|
|
6053
|
-
visibility: 'inherit',
|
|
6054
|
-
}
|
|
6055
|
-
: {
|
|
6056
|
-
visibility: 'hidden',
|
|
6057
|
-
transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationLong})`,
|
|
6058
|
-
}),
|
|
6059
6027
|
...getInsetJssStyle(),
|
|
6060
|
-
...
|
|
6028
|
+
...getBackdropJssStyle(isOpen, FLYOUT_Z_INDEX, theme),
|
|
6061
6029
|
...colorSchemeStyles,
|
|
6062
6030
|
...hostHiddenStyles,
|
|
6063
6031
|
}),
|
|
@@ -6076,7 +6044,7 @@ const getComponentCss$N = (isOpen, position, hasFooter, hasSubFooter, theme) =>
|
|
|
6076
6044
|
height: '100%',
|
|
6077
6045
|
minWidth: '320px',
|
|
6078
6046
|
maxWidth: 'var(--p-flyout-max-width, 1180px)',
|
|
6079
|
-
color: primaryColor,
|
|
6047
|
+
color: primaryColor, // enables color inheritance for slotted content
|
|
6080
6048
|
background: backgroundColor,
|
|
6081
6049
|
...(isOpen
|
|
6082
6050
|
? {
|
|
@@ -6123,7 +6091,7 @@ const getComponentCss$N = (isOpen, position, hasFooter, hasSubFooter, theme) =>
|
|
|
6123
6091
|
padding: contentPadding,
|
|
6124
6092
|
position: 'relative',
|
|
6125
6093
|
zIndex: 0,
|
|
6126
|
-
backgroundColor,
|
|
6094
|
+
backgroundColor, // to ensure scrollbar coloring is optimal for light theme
|
|
6127
6095
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6128
6096
|
backgroundColor: backgroundColorDark, // to ensure scrollbar coloring is optimal for dark theme
|
|
6129
6097
|
}),
|
|
@@ -6371,7 +6339,25 @@ const forceRerenderAnimationStyle = {
|
|
|
6371
6339
|
const keyFramesLight = 'rerender-light';
|
|
6372
6340
|
const keyFramesDark = 'rerender-dark';
|
|
6373
6341
|
const cssVariableFilter = '--p-internal-icon-filter';
|
|
6374
|
-
const
|
|
6342
|
+
const isFlippableIcon = (name, source) => {
|
|
6343
|
+
return (!source &&
|
|
6344
|
+
(name === 'arrow-double-left' ||
|
|
6345
|
+
name === 'arrow-double-right' ||
|
|
6346
|
+
name === 'arrow-first' ||
|
|
6347
|
+
name === 'arrow-head-left' ||
|
|
6348
|
+
name === 'arrow-head-right' ||
|
|
6349
|
+
name === 'arrow-last' ||
|
|
6350
|
+
name === 'arrow-left' ||
|
|
6351
|
+
name === 'arrow-right' ||
|
|
6352
|
+
name === 'chart' ||
|
|
6353
|
+
name === 'chat' ||
|
|
6354
|
+
name === 'external' ||
|
|
6355
|
+
name === 'increase' ||
|
|
6356
|
+
name === 'list' ||
|
|
6357
|
+
name === 'logout' ||
|
|
6358
|
+
name === 'send'));
|
|
6359
|
+
};
|
|
6360
|
+
const getComponentCss$I = (name, source, color, size, theme) => {
|
|
6375
6361
|
const isColorInherit = color === 'inherit';
|
|
6376
6362
|
const isSizeInherit = size === 'inherit';
|
|
6377
6363
|
const isDark = isThemeDark(theme);
|
|
@@ -6386,10 +6372,10 @@ const getComponentCss$I = (color, size, theme) => {
|
|
|
6386
6372
|
}),
|
|
6387
6373
|
},
|
|
6388
6374
|
img: {
|
|
6389
|
-
display: 'block',
|
|
6375
|
+
display: 'block', // without display, img tag gets some extra spacing
|
|
6390
6376
|
margin: 0,
|
|
6391
6377
|
padding: 0,
|
|
6392
|
-
pointerEvents: 'none',
|
|
6378
|
+
pointerEvents: 'none', // disable dragging/ghosting of images
|
|
6393
6379
|
...(!isColorInherit && {
|
|
6394
6380
|
filter: `var(${cssVariableFilter},${filterMap[theme][color]})`,
|
|
6395
6381
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -6413,6 +6399,11 @@ const getComponentCss$I = (color, size, theme) => {
|
|
|
6413
6399
|
height: fontLineHeight,
|
|
6414
6400
|
font: `${sizeMap$2[size]} ${fontFamily}`,
|
|
6415
6401
|
}),
|
|
6402
|
+
...(isFlippableIcon(name, source) && {
|
|
6403
|
+
'&:dir(rtl)': {
|
|
6404
|
+
transform: 'scaleX(-1)',
|
|
6405
|
+
},
|
|
6406
|
+
}),
|
|
6416
6407
|
},
|
|
6417
6408
|
...(!isColorInherit && {
|
|
6418
6409
|
[`@keyframes ${isDark ? keyFramesDark : keyFramesLight}-${color}`]: forceRerenderAnimationStyle,
|
|
@@ -6426,7 +6417,7 @@ const mediaQueryMaxS$2 = getMediaQueryMax('s');
|
|
|
6426
6417
|
const getBackgroundColor = (state, theme) => {
|
|
6427
6418
|
const { infoSoftColor, successSoftColor, errorSoftColor, warningSoftColor } = getThemedColors(theme);
|
|
6428
6419
|
const colorMap = {
|
|
6429
|
-
neutral: infoSoftColor,
|
|
6420
|
+
neutral: infoSoftColor, // deprecated
|
|
6430
6421
|
info: infoSoftColor,
|
|
6431
6422
|
warning: warningSoftColor,
|
|
6432
6423
|
success: successSoftColor,
|
|
@@ -6640,7 +6631,7 @@ const getComponentCss$E = (aspectRatio, weight, direction, hasDescription) => {
|
|
|
6640
6631
|
},
|
|
6641
6632
|
...(hasDescription && {
|
|
6642
6633
|
description: {
|
|
6643
|
-
margin: '-12px 0 0 ',
|
|
6634
|
+
margin: '-12px 0 0 ', // TODO: perhaps gap should be overridden instead
|
|
6644
6635
|
...textSmallStyle,
|
|
6645
6636
|
hyphens: 'inherit',
|
|
6646
6637
|
},
|
|
@@ -6663,7 +6654,7 @@ const slottedAnchorSelector = `a[slot='${anchorSlot}']`;
|
|
|
6663
6654
|
const anchorJssStyle = {
|
|
6664
6655
|
position: 'absolute',
|
|
6665
6656
|
...getInsetJssStyle(),
|
|
6666
|
-
zIndex: 1,
|
|
6657
|
+
zIndex: 1, // necessary to be on top of img
|
|
6667
6658
|
borderRadius: borderRadiusMedium,
|
|
6668
6659
|
};
|
|
6669
6660
|
const getMultilineEllipsis = (lineClamp) => {
|
|
@@ -6681,7 +6672,7 @@ const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme)
|
|
|
6681
6672
|
'@global': {
|
|
6682
6673
|
':host': {
|
|
6683
6674
|
display: 'block',
|
|
6684
|
-
position: 'relative',
|
|
6675
|
+
position: 'relative', // needed for ::slotted(a) to overlay correctly
|
|
6685
6676
|
...addImportantToEachRule({
|
|
6686
6677
|
...colorSchemeStyles,
|
|
6687
6678
|
...hostHiddenStyles,
|
|
@@ -6729,7 +6720,7 @@ const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme)
|
|
|
6729
6720
|
display: 'flex',
|
|
6730
6721
|
flexDirection: 'column',
|
|
6731
6722
|
aspectRatio: '3/4',
|
|
6732
|
-
overflow: 'hidden',
|
|
6723
|
+
overflow: 'hidden', // TODO: discussable if we should prevent text to overflow .root, – e.g. it also prevents a popover from being shown correctly
|
|
6733
6724
|
boxSizing: 'border-box',
|
|
6734
6725
|
borderRadius: borderRadiusMedium,
|
|
6735
6726
|
padding: spacingFluidSmall,
|
|
@@ -6795,7 +6786,7 @@ const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme)
|
|
|
6795
6786
|
description: {
|
|
6796
6787
|
...textXXSmallStyle,
|
|
6797
6788
|
...getMultilineEllipsis(2),
|
|
6798
|
-
margin: 0,
|
|
6789
|
+
margin: 0, // ua-style reset
|
|
6799
6790
|
color: contrastHighColor,
|
|
6800
6791
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6801
6792
|
color: contrastHighColorDark,
|
|
@@ -6876,8 +6867,8 @@ const getFullscreenJssStyles = (fullscreen) => {
|
|
|
6876
6867
|
borderRadius: 0,
|
|
6877
6868
|
}
|
|
6878
6869
|
: {
|
|
6879
|
-
minWidth: '276px',
|
|
6880
|
-
maxWidth: '1535.5px',
|
|
6870
|
+
minWidth: '276px', // on viewport 320px: calc(${gridColumnWidthBase} * 6 + ${gridGap} * 5)
|
|
6871
|
+
maxWidth: '1535.5px', // on viewport 1920px: `calc(${gridColumnWidthXXL} * 14 + ${gridGap} * 13)`
|
|
6881
6872
|
minHeight: 'auto',
|
|
6882
6873
|
margin: `${marginTopBottom} ${gridExtendedOffsetBase}`,
|
|
6883
6874
|
borderRadius: borderRadiusMedium,
|
|
@@ -6922,26 +6913,11 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6922
6913
|
return getCss({
|
|
6923
6914
|
'@global': {
|
|
6924
6915
|
':host': {
|
|
6925
|
-
|
|
6926
|
-
overflowY: 'auto',
|
|
6916
|
+
overflowY: 'auto', // overrideable
|
|
6927
6917
|
...addImportantToEachRule({
|
|
6928
|
-
position: 'fixed',
|
|
6929
|
-
...getInsetJssStyle(),
|
|
6930
|
-
zIndex: MODAL_Z_INDEX,
|
|
6931
|
-
alignItems: 'center',
|
|
6932
|
-
justifyContent: 'center',
|
|
6933
|
-
flexWrap: 'wrap',
|
|
6934
|
-
...(isOpen
|
|
6935
|
-
? {
|
|
6936
|
-
visibility: 'inherit',
|
|
6937
|
-
}
|
|
6938
|
-
: {
|
|
6939
|
-
visibility: 'hidden',
|
|
6940
|
-
transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationShort})`,
|
|
6941
|
-
}),
|
|
6942
6918
|
...colorSchemeStyles,
|
|
6943
6919
|
...hostHiddenStyles,
|
|
6944
|
-
...
|
|
6920
|
+
...getBackdropJssStyle(isOpen, MODAL_Z_INDEX, theme, duration),
|
|
6945
6921
|
}),
|
|
6946
6922
|
},
|
|
6947
6923
|
'::slotted': addImportantToEachRule(mergeDeep(getSlottedJssStyle(32, hasHeader, hasDismissButton), buildResponsiveStyles(isFullscreen, (fullscreenValue) => ({
|
|
@@ -6963,14 +6939,23 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6963
6939
|
}),
|
|
6964
6940
|
},
|
|
6965
6941
|
},
|
|
6942
|
+
'scroll-container': {
|
|
6943
|
+
display: 'flex',
|
|
6944
|
+
...getInsetJssStyle(),
|
|
6945
|
+
height: '100%',
|
|
6946
|
+
overflowY: 'inherit',
|
|
6947
|
+
alignItems: 'center',
|
|
6948
|
+
justifyContent: 'center',
|
|
6949
|
+
flexWrap: 'wrap',
|
|
6950
|
+
},
|
|
6966
6951
|
root: mergeDeep({
|
|
6967
|
-
color: primaryColor,
|
|
6952
|
+
color: primaryColor, // enables color inheritance for slotted content
|
|
6968
6953
|
position: 'relative',
|
|
6969
6954
|
boxSizing: 'border-box',
|
|
6970
6955
|
transform: isOpen ? 'translateY(0%)' : 'translateY(25%)',
|
|
6971
6956
|
opacity: isOpen ? 1 : 0,
|
|
6972
6957
|
transition: `${getTransition('opacity', duration, easing)}, ${getTransition('transform', duration, easing)}`,
|
|
6973
|
-
paddingTop: hasDismissButton ? pxToRemWithUnit(32) : contentPadding,
|
|
6958
|
+
paddingTop: hasDismissButton ? pxToRemWithUnit(32) : contentPadding, // rem value needed to prevent overlapping of close button and contents in scaling mode
|
|
6974
6959
|
...(!hasFooter && { paddingBottom: contentPadding }),
|
|
6975
6960
|
background: backgroundColor,
|
|
6976
6961
|
outline: isHighContrastMode ? '1px solid transparent' : 0,
|
|
@@ -6979,7 +6964,7 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6979
6964
|
content: '""',
|
|
6980
6965
|
position: 'fixed',
|
|
6981
6966
|
border: `${borderWidthBase} solid`,
|
|
6982
|
-
pointerEvents: 'none',
|
|
6967
|
+
pointerEvents: 'none', // fix text selection in focus state
|
|
6983
6968
|
...buildResponsiveStyles(isFullscreen, (fullscreenValue) => ({
|
|
6984
6969
|
borderRadius: fullscreenValue ? 0 : '12px',
|
|
6985
6970
|
borderColor: fullscreenValue ? primaryColor : darkThemePrimaryColor,
|
|
@@ -7008,7 +6993,7 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
7008
6993
|
}),
|
|
7009
6994
|
content: {
|
|
7010
6995
|
...(hasFooter && {
|
|
7011
|
-
position: 'relative',
|
|
6996
|
+
position: 'relative', // to make sure content isn't above sticky footer, but might affect consumer's absolute positioning
|
|
7012
6997
|
zIndex: 0,
|
|
7013
6998
|
}),
|
|
7014
6999
|
padding: `0 ${contentPadding}`,
|
|
@@ -7027,7 +7012,7 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
7027
7012
|
},
|
|
7028
7013
|
[footerShadowClass]: {
|
|
7029
7014
|
boxShadow: `${isThemeDark(theme) ? scrollShadowColorDark : scrollShadowColor} 0 -5px 10px`,
|
|
7030
|
-
clipPath: 'inset(-20px 0 0 0)',
|
|
7015
|
+
clipPath: 'inset(-20px 0 0 0)', // crop leaking box-shadow on left and right side
|
|
7031
7016
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7032
7017
|
boxShadow: `${scrollShadowColorDark} 0 -5px 10px`,
|
|
7033
7018
|
}),
|
|
@@ -7041,9 +7026,10 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
7041
7026
|
left: '8px',
|
|
7042
7027
|
display: 'flex',
|
|
7043
7028
|
justifyContent: 'flex-end',
|
|
7029
|
+
zIndex: 1, // To assure controls are on top when using stretchToFullModalWidthClassName and transformed slotted content
|
|
7044
7030
|
},
|
|
7045
7031
|
dismiss: {
|
|
7046
|
-
border: `2px solid ${backgroundColor}`,
|
|
7032
|
+
border: `2px solid ${backgroundColor}`, // needed to enlarge button slightly without affecting the hover area (are equal now).
|
|
7047
7033
|
borderRadius: '4px',
|
|
7048
7034
|
background: backgroundColor,
|
|
7049
7035
|
...hoverMediaQuery({
|
|
@@ -7105,7 +7091,7 @@ const getComponentCss$z = (size, color, theme) => {
|
|
|
7105
7091
|
display: 'block',
|
|
7106
7092
|
maxWidth: '100%',
|
|
7107
7093
|
maxHeight: '100%',
|
|
7108
|
-
pointerEvents: 'none',
|
|
7094
|
+
pointerEvents: 'none', // prevents image drag
|
|
7109
7095
|
...(!isColorInherit && {
|
|
7110
7096
|
filter: colorToFilterMap[theme][color],
|
|
7111
7097
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -7131,7 +7117,7 @@ const getComponentCss$y = (theme) => {
|
|
|
7131
7117
|
return getCss({
|
|
7132
7118
|
'@global': {
|
|
7133
7119
|
':host': addImportantToEachRule({
|
|
7134
|
-
scrollMarginTop: spacingStaticSmall,
|
|
7120
|
+
scrollMarginTop: spacingStaticSmall, // Creates top margin when navigating with keyboard and list is scrolled automatically
|
|
7135
7121
|
...hostHiddenStyles,
|
|
7136
7122
|
}),
|
|
7137
7123
|
},
|
|
@@ -7224,16 +7210,16 @@ const getSlottedTextFieldTextareaSelectStyles = (child, state, isLoading, theme,
|
|
|
7224
7210
|
: 'auto',
|
|
7225
7211
|
margin: 0,
|
|
7226
7212
|
outline: 0,
|
|
7227
|
-
WebkitAppearance: 'none',
|
|
7213
|
+
WebkitAppearance: 'none', // iOS safari
|
|
7228
7214
|
appearance: 'none',
|
|
7229
7215
|
boxSizing: 'border-box',
|
|
7230
7216
|
border: `${borderWidthBase} solid ${formStateColor || contrastMediumColor}`,
|
|
7231
7217
|
borderRadius: borderRadiusSmall,
|
|
7232
7218
|
background: 'transparent',
|
|
7233
|
-
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
7219
|
+
font: textSmallStyle.font.replace('ex', 'ex + 6px'), // a minimum line-height is needed for input, otherwise value is scrollable in Chrome, +6px is aligned with how Safari visualize date/time input highlighting
|
|
7234
7220
|
textIndent: 0,
|
|
7235
7221
|
color: primaryColor,
|
|
7236
|
-
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
7222
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transitions between e.g. disabled states
|
|
7237
7223
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7238
7224
|
borderColor: formStateColorDark || contrastMediumColorDark,
|
|
7239
7225
|
color: primaryColorDark,
|
|
@@ -7356,7 +7342,7 @@ const getComponentCss$x = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
7356
7342
|
placeSelf: 'center',
|
|
7357
7343
|
padding: formButtonOrIconPadding,
|
|
7358
7344
|
pointerEvents: 'none',
|
|
7359
|
-
transform: 'rotate3d(0,0,1,0.0001deg)',
|
|
7345
|
+
transform: 'rotate3d(0,0,1,0.0001deg)', // needs to be a little more than 0 for correct direction in safari
|
|
7360
7346
|
transition: getTransition('transform'),
|
|
7361
7347
|
'&--rotate': {
|
|
7362
7348
|
transform: 'rotate3d(0,0,1,180deg)',
|
|
@@ -7399,26 +7385,26 @@ const getInputStyles = (isDisabled, direction, isOpen, state, theme) => {
|
|
|
7399
7385
|
flex: 1,
|
|
7400
7386
|
minWidth: 0,
|
|
7401
7387
|
// TODO: abstract and re-use for multi-select, select-wrapper and text-field-wrapper
|
|
7402
|
-
height: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`,
|
|
7403
|
-
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
7404
|
-
margin: 0,
|
|
7388
|
+
height: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`, // we need 10px additionally so input height becomes 54px, // we need 6px additionally so input height becomes 50px
|
|
7389
|
+
font: textSmallStyle.font.replace('ex', 'ex + 6px'), // a minimum line-height is needed for input, otherwise value is scrollable in Chrome, +6px is alig
|
|
7390
|
+
margin: 0, // necessary reset for iOS Safari 15 (and maybe other browsers)
|
|
7405
7391
|
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
7406
7392
|
paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(2),
|
|
7407
7393
|
boxSizing: 'border-box',
|
|
7408
7394
|
outline: 0,
|
|
7409
|
-
WebkitAppearance: 'none',
|
|
7395
|
+
WebkitAppearance: 'none', // iOS safari
|
|
7410
7396
|
appearance: 'none',
|
|
7411
7397
|
...textSmallStyle,
|
|
7412
7398
|
textOverflow: 'ellipsis',
|
|
7413
7399
|
'&:disabled': {
|
|
7414
7400
|
cursor: 'not-allowed',
|
|
7415
7401
|
},
|
|
7416
|
-
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
7402
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transitions between e.g. disabled states
|
|
7417
7403
|
color: primaryColor,
|
|
7418
7404
|
'&:not(:focus)': {
|
|
7419
7405
|
...getPlaceholderJssStyle({ color: primaryColor, opacity: 1 }),
|
|
7420
7406
|
...prefersColorSchemeDarkMediaQuery(theme, getPlaceholderJssStyle({ color: primaryColorDark, opacity: 1 })),
|
|
7421
|
-
},
|
|
7407
|
+
}, // Opacity fixes placeholder being shown lighter in firefox
|
|
7422
7408
|
...hoverMediaQuery({
|
|
7423
7409
|
'&:hover:not(:disabled):not(:focus),label:hover~.wrapper &:not(:disabled):not(:focus)': {
|
|
7424
7410
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
@@ -7439,7 +7425,7 @@ const getInputStyles = (isDisabled, direction, isOpen, state, theme) => {
|
|
|
7439
7425
|
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
7440
7426
|
borderRadius: borderRadiusSmall,
|
|
7441
7427
|
...(isOpen && {
|
|
7442
|
-
[isDirectionDown ? 'paddingBottom' : 'paddingTop']: `calc(${formElementPaddingVertical} + 1px)`,
|
|
7428
|
+
[isDirectionDown ? 'paddingBottom' : 'paddingTop']: `calc(${formElementPaddingVertical} + 1px)`, // Add padding to keep same height when border changes
|
|
7443
7429
|
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColor}`),
|
|
7444
7430
|
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
7445
7431
|
[isDirectionDown ? 'borderBottomRightRadius' : 'borderTopRightRadius']: 0,
|
|
@@ -7484,7 +7470,7 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
7484
7470
|
right: 0,
|
|
7485
7471
|
[isDirectionDown ? 'top' : 'bottom']: '100%',
|
|
7486
7472
|
boxSizing: 'border-box',
|
|
7487
|
-
maxHeight: `${8.5 * (MULTI_SELECT_OPTION_HEIGHT + 8) + 6 + 2}px`,
|
|
7473
|
+
maxHeight: `${8.5 * (MULTI_SELECT_OPTION_HEIGHT + 8) + 6 + 2}px`, // 8.5 options * option height + 8px gap + additional spacing (6px = padding, 2px = border)
|
|
7488
7474
|
overflowY: 'auto',
|
|
7489
7475
|
WebkitOverflowScrolling: 'touch',
|
|
7490
7476
|
background: backgroundColor,
|
|
@@ -7493,10 +7479,10 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
7493
7479
|
borderRadius: borderRadiusSmall,
|
|
7494
7480
|
[isDirectionDown ? 'borderTopLeftRadius' : 'borderBottomLeftRadius']: 0,
|
|
7495
7481
|
[isDirectionDown ? 'borderTopRightRadius' : 'borderBottomRightRadius']: 0,
|
|
7496
|
-
scrollbarWidth: 'thin',
|
|
7497
|
-
scrollbarColor: 'auto',
|
|
7482
|
+
scrollbarWidth: 'thin', // firefox
|
|
7483
|
+
scrollbarColor: 'auto', // firefox
|
|
7498
7484
|
transition: getTransition('border-color'),
|
|
7499
|
-
transform: 'translate3d(0,0,0)',
|
|
7485
|
+
transform: 'translate3d(0,0,0)', // fix iOS bug if less than 5 items are displayed
|
|
7500
7486
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7501
7487
|
background: backgroundColorDark,
|
|
7502
7488
|
borderColor: primaryColorDark,
|
|
@@ -7585,7 +7571,7 @@ const getComponentCss$w = (activePage, pageTotal, showLastPage, theme) => {
|
|
|
7585
7571
|
display: 'flex',
|
|
7586
7572
|
justifyContent: 'center',
|
|
7587
7573
|
alignItems: 'center',
|
|
7588
|
-
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
7574
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transition between states
|
|
7589
7575
|
position: 'relative',
|
|
7590
7576
|
width: buttonSize,
|
|
7591
7577
|
height: buttonSize,
|
|
@@ -7596,7 +7582,7 @@ const getComponentCss$w = (activePage, pageTotal, showLastPage, theme) => {
|
|
|
7596
7582
|
color: primaryColor,
|
|
7597
7583
|
outline: 0,
|
|
7598
7584
|
borderRadius: borderRadiusSmall,
|
|
7599
|
-
borderColor: 'transparent',
|
|
7585
|
+
borderColor: 'transparent', // default value is needed for smooth transition
|
|
7600
7586
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7601
7587
|
color: primaryColorDark,
|
|
7602
7588
|
}),
|
|
@@ -7675,12 +7661,21 @@ const getComponentCss$v = (hideLabel, state, isDisabled, isLoading, isWithinForm
|
|
|
7675
7661
|
}),
|
|
7676
7662
|
// TODO: move into getSlottedTextFieldTextareaSelectStyles() via parameter, e.g. isLoading
|
|
7677
7663
|
...(isLoading && {
|
|
7678
|
-
opacity: 0.2,
|
|
7664
|
+
opacity: 0.2, // TODO: not in sync with e.g. checkbox/radio-button loading style
|
|
7679
7665
|
cursor: 'not-allowed',
|
|
7680
7666
|
}),
|
|
7681
|
-
|
|
7667
|
+
// since @playwright/test@1.40.1 this does not work anymore in Webkit browser engine for unknown reasons
|
|
7668
|
+
/* ...Object.fromEntries(
|
|
7669
|
+
Array.from(Array(length)).map((_, i) => {
|
|
7682
7670
|
return [`&:nth-of-type(${i + 1})`, { gridArea: `1/${i + 1}` }];
|
|
7683
|
-
|
|
7671
|
+
})
|
|
7672
|
+
),*/
|
|
7673
|
+
'&:nth-of-type(1)': { gridArea: '1/1' },
|
|
7674
|
+
'&:nth-of-type(2)': { gridArea: '1/2' },
|
|
7675
|
+
'&:nth-of-type(3)': { gridArea: '1/3' },
|
|
7676
|
+
'&:nth-of-type(4)': { gridArea: '1/4' },
|
|
7677
|
+
'&:nth-of-type(5)': { gridArea: '1/5' },
|
|
7678
|
+
'&:nth-of-type(6)': { gridArea: '1/6' },
|
|
7684
7679
|
})));
|
|
7685
7680
|
return getCss({
|
|
7686
7681
|
'@global': {
|
|
@@ -7709,12 +7704,13 @@ const getComponentCss$v = (hideLabel, state, isDisabled, isLoading, isWithinForm
|
|
|
7709
7704
|
},
|
|
7710
7705
|
wrapper: {
|
|
7711
7706
|
display: 'grid',
|
|
7707
|
+
gridTemplateColumns: `repeat(${length}, minmax(0, 1fr))`,
|
|
7712
7708
|
justifySelf: 'flex-start',
|
|
7713
7709
|
gap: spacingStaticSmall,
|
|
7714
7710
|
},
|
|
7715
7711
|
...(isLoading && {
|
|
7716
7712
|
spinner: {
|
|
7717
|
-
gridArea:
|
|
7713
|
+
gridArea: '1/1/1/-1',
|
|
7718
7714
|
placeSelf: 'center',
|
|
7719
7715
|
width: inputSize,
|
|
7720
7716
|
height: inputSize,
|
|
@@ -7849,7 +7845,7 @@ const getComponentCss$u = (direction, isNative, theme) => {
|
|
|
7849
7845
|
button: {
|
|
7850
7846
|
display: 'block',
|
|
7851
7847
|
position: 'relative',
|
|
7852
|
-
WebkitAppearance: 'none',
|
|
7848
|
+
WebkitAppearance: 'none', // iOS safari
|
|
7853
7849
|
appearance: 'none',
|
|
7854
7850
|
background: 'transparent',
|
|
7855
7851
|
border: 0,
|
|
@@ -7857,8 +7853,8 @@ const getComponentCss$u = (direction, isNative, theme) => {
|
|
|
7857
7853
|
outline: 0,
|
|
7858
7854
|
cursor: 'pointer',
|
|
7859
7855
|
...textSmallStyle,
|
|
7860
|
-
width: fontLineHeight,
|
|
7861
|
-
height: fontLineHeight,
|
|
7856
|
+
width: fontLineHeight, // width needed to improve ssr support
|
|
7857
|
+
height: fontLineHeight, // height needed to improve ssr support
|
|
7862
7858
|
borderRadius: '50%',
|
|
7863
7859
|
...hoverMediaQuery({
|
|
7864
7860
|
transition: getTransition('background-color'),
|
|
@@ -7890,7 +7886,6 @@ const getComponentCss$u = (direction, isNative, theme) => {
|
|
|
7890
7886
|
},
|
|
7891
7887
|
label: getHiddenTextJssStyle(),
|
|
7892
7888
|
icon: {
|
|
7893
|
-
display: 'inline-block',
|
|
7894
7889
|
transform: 'translate3d(0,0,0)', // Fixes movement on hover in Safari
|
|
7895
7890
|
},
|
|
7896
7891
|
spacer: {
|
|
@@ -7906,7 +7901,7 @@ const getComponentCss$u = (direction, isNative, theme) => {
|
|
|
7906
7901
|
position: 'absolute',
|
|
7907
7902
|
zIndex: POPOVER_Z_INDEX,
|
|
7908
7903
|
filter: `drop-shadow(0 0 16px ${shadowColor})`,
|
|
7909
|
-
backdropFilter: 'drop-shadow(0px 0px 0px transparent)',
|
|
7904
|
+
backdropFilter: 'drop-shadow(0px 0px 0px transparent)', // fixes issues with Chrome >= 105 where filter: drop-shadow is not applied correctly after animation ends
|
|
7910
7905
|
pointerEvents: 'none',
|
|
7911
7906
|
animation: `${motionDurationShort} $fadeIn ${motionEasingBase} forwards`
|
|
7912
7907
|
,
|
|
@@ -8004,7 +7999,7 @@ const getComponentCss$t = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
8004
7999
|
wrapper: {
|
|
8005
8000
|
display: 'grid',
|
|
8006
8001
|
gridArea: '1/1',
|
|
8007
|
-
alignSelf: 'flex-start',
|
|
8002
|
+
alignSelf: 'flex-start', // in case label becomes multiline
|
|
8008
8003
|
...(isDisabledOrLoading(isDisabled, isLoading) && {
|
|
8009
8004
|
// TODO: maybe .wrapper should handle it for all form components while pointer-events: none is set to input
|
|
8010
8005
|
cursor: 'not-allowed',
|
|
@@ -8013,12 +8008,12 @@ const getComponentCss$t = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
8013
8008
|
...(isLoading && {
|
|
8014
8009
|
// TODO: extract for checkbox-wrapper and radio-button-wrapper (not gridArea and placeSelf)
|
|
8015
8010
|
spinner: {
|
|
8016
|
-
position: 'relative',
|
|
8011
|
+
position: 'relative', // ensure correct stacking, can be removed as soon as focus for input is handled with outline
|
|
8017
8012
|
gridArea: '1/1',
|
|
8018
8013
|
placeSelf: 'center',
|
|
8019
8014
|
width: fontLineHeight,
|
|
8020
8015
|
height: fontLineHeight,
|
|
8021
|
-
font: `${fontSizeTextSmall} ${fontFamily}`,
|
|
8016
|
+
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
8022
8017
|
pointerEvents: 'none',
|
|
8023
8018
|
},
|
|
8024
8019
|
}),
|
|
@@ -8026,7 +8021,7 @@ const getComponentCss$t = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
8026
8021
|
...getFunctionalComponentLabelStyles(isDisabled || isLoading, hideLabel, theme, {
|
|
8027
8022
|
gridArea: '1/2',
|
|
8028
8023
|
}, {
|
|
8029
|
-
paddingTop: '2px',
|
|
8024
|
+
paddingTop: '2px', // compensate vertical alignment
|
|
8030
8025
|
paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent not clickable area between label and input
|
|
8031
8026
|
}),
|
|
8032
8027
|
// .message
|
|
@@ -8186,7 +8181,7 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
8186
8181
|
},
|
|
8187
8182
|
'action-prev': {
|
|
8188
8183
|
...actionPrevNextStyles,
|
|
8189
|
-
left: '-1px',
|
|
8184
|
+
left: '-1px', // ensures that the gradient always overlays the content (e.g. when zoomed)
|
|
8190
8185
|
justifyContent: 'flex-start',
|
|
8191
8186
|
background: `linear-gradient(to right, ${getGradient(theme, gradientColor)} 100%)`,
|
|
8192
8187
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -8203,7 +8198,7 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
8203
8198
|
},
|
|
8204
8199
|
'action-next': {
|
|
8205
8200
|
...actionPrevNextStyles,
|
|
8206
|
-
right: '-1px',
|
|
8201
|
+
right: '-1px', // ensures that the gradient always overlays the content (e.g. when zoomed)
|
|
8207
8202
|
justifyContent: 'flex-end',
|
|
8208
8203
|
background: `linear-gradient(to left, ${getGradient(theme, gradientColor)} 100%)`,
|
|
8209
8204
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -8218,6 +8213,11 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
8218
8213
|
}),
|
|
8219
8214
|
},
|
|
8220
8215
|
},
|
|
8216
|
+
icon: {
|
|
8217
|
+
'&:dir(rtl)': {
|
|
8218
|
+
transform: 'scaleX(-1)',
|
|
8219
|
+
},
|
|
8220
|
+
},
|
|
8221
8221
|
});
|
|
8222
8222
|
};
|
|
8223
8223
|
|
|
@@ -8256,7 +8256,7 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
8256
8256
|
height: '100%',
|
|
8257
8257
|
width: '100%',
|
|
8258
8258
|
padding: getItemPadding(hasIcon && hasSlottedContent),
|
|
8259
|
-
margin: 0,
|
|
8259
|
+
margin: 0, // Removes default button margin on safari 15
|
|
8260
8260
|
border: `${borderWidthBase} solid ${borderColor}`,
|
|
8261
8261
|
borderRadius: borderRadiusSmall,
|
|
8262
8262
|
outline: 0,
|
|
@@ -8333,7 +8333,7 @@ const getComponentCss$q = (maxWidth, columns) => {
|
|
|
8333
8333
|
':host': {
|
|
8334
8334
|
display: 'grid',
|
|
8335
8335
|
...addImportantToEachRule({
|
|
8336
|
-
gridAutoRows: '1fr',
|
|
8336
|
+
gridAutoRows: '1fr', // for equal height
|
|
8337
8337
|
...buildResponsiveStyles(columns, (col) => ({
|
|
8338
8338
|
gridTemplateColumns: col === 'auto' ? `repeat(auto-fit, ${maxWidth}px)` : `repeat(${col}, minmax(0, 1fr))`,
|
|
8339
8339
|
})),
|
|
@@ -8359,16 +8359,16 @@ const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
|
8359
8359
|
button: {
|
|
8360
8360
|
position: 'absolute',
|
|
8361
8361
|
...getInsetJssStyle(),
|
|
8362
|
-
width: '100%',
|
|
8363
|
-
height: '100%',
|
|
8362
|
+
width: '100%', // fixes Firefox positioning issue
|
|
8363
|
+
height: '100%', // fixes Firefox positioning issue
|
|
8364
8364
|
margin: 0,
|
|
8365
8365
|
padding: 0,
|
|
8366
8366
|
background: 'transparent',
|
|
8367
|
-
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
8367
|
+
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`, // using border of styled select below for label:hover selector
|
|
8368
8368
|
borderRadius: borderRadiusSmall,
|
|
8369
8369
|
outline: '0',
|
|
8370
8370
|
cursor: 'pointer',
|
|
8371
|
-
transition: getTransition('border-color'),
|
|
8371
|
+
transition: getTransition('border-color'), // background and text color are handled on select
|
|
8372
8372
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8373
8373
|
borderColor: isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark,
|
|
8374
8374
|
}),
|
|
@@ -8420,23 +8420,23 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
8420
8420
|
input: {
|
|
8421
8421
|
display: 'block',
|
|
8422
8422
|
position: 'absolute',
|
|
8423
|
-
...getInsetJssStyle(2),
|
|
8424
|
-
width: 'calc(100% - 4px)',
|
|
8425
|
-
height: 'calc(100% - 4px)',
|
|
8423
|
+
...getInsetJssStyle(2), // 2 = borderWidthBase
|
|
8424
|
+
width: 'calc(100% - 4px)', // fixes Firefox positioning issue, 4px = 2 x borderWidthBase
|
|
8425
|
+
height: 'calc(100% - 4px)', // fixes Firefox positioning issue, 4px = 2 x borderWidthBase
|
|
8426
8426
|
zIndex: 1,
|
|
8427
|
-
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
8428
|
-
margin: 0,
|
|
8427
|
+
font: textSmallStyle.font.replace('ex', 'ex + 6px'), // a minimum line-height is needed for input, otherwise value is scrollable in Chrome, +6px is alig
|
|
8428
|
+
margin: 0, // necessary reset for iOS Safari 15 (and maybe other browsers)
|
|
8429
8429
|
// TODO: could be done with css subgrid much more elegant in the near future
|
|
8430
8430
|
// or move input into select-wrapper and handle it the same like multi-select
|
|
8431
8431
|
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
8432
8432
|
paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(1),
|
|
8433
8433
|
outline: '0',
|
|
8434
|
-
WebkitAppearance: 'none',
|
|
8434
|
+
WebkitAppearance: 'none', // iOS safari
|
|
8435
8435
|
appearance: 'none',
|
|
8436
8436
|
boxSizing: 'border-box',
|
|
8437
|
-
border: '0',
|
|
8438
|
-
borderRadius: borderRadiusSmall,
|
|
8439
|
-
opacity: 0,
|
|
8437
|
+
border: '0', // done via span
|
|
8438
|
+
borderRadius: borderRadiusSmall, // for white corners
|
|
8439
|
+
opacity: 0, // is used to overlay input on focus
|
|
8440
8440
|
...textSmallStyle,
|
|
8441
8441
|
textIndent: 0,
|
|
8442
8442
|
cursor: disabled ? 'not-allowed' : 'text',
|
|
@@ -8459,7 +8459,7 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
8459
8459
|
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
8460
8460
|
},
|
|
8461
8461
|
'&:not(:disabled):focus': {
|
|
8462
|
-
opacity: 1,
|
|
8462
|
+
opacity: 1, // to display value while typing
|
|
8463
8463
|
'&+span, &~ ul': {
|
|
8464
8464
|
borderColor: primaryColor,
|
|
8465
8465
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -8518,7 +8518,7 @@ const getListStyles = (direction, theme) => {
|
|
|
8518
8518
|
display: 'flex',
|
|
8519
8519
|
flexDirection: 'column',
|
|
8520
8520
|
gap: spacingStaticSmall,
|
|
8521
|
-
position: `var(${dropdownPositionVar}, absolute)`,
|
|
8521
|
+
position: `var(${dropdownPositionVar}, absolute)`, // for vrt tests
|
|
8522
8522
|
padding: '6px',
|
|
8523
8523
|
margin: 0,
|
|
8524
8524
|
background: backgroundColor,
|
|
@@ -8527,9 +8527,9 @@ const getListStyles = (direction, theme) => {
|
|
|
8527
8527
|
zIndex: 10,
|
|
8528
8528
|
left: 0,
|
|
8529
8529
|
right: 0,
|
|
8530
|
-
[isDirectionDown ? 'top' : 'bottom']: 'calc(100% - 2px)',
|
|
8530
|
+
[isDirectionDown ? 'top' : 'bottom']: 'calc(100% - 2px)', // 2px border + 2px safety for rounded corners
|
|
8531
8531
|
boxSizing: 'border-box',
|
|
8532
|
-
maxHeight: `${8.5 * (OPTION_HEIGHT + 8) + 6 + 2}px`,
|
|
8532
|
+
maxHeight: `${8.5 * (OPTION_HEIGHT + 8) + 6 + 2}px`, // 8px = gap, 6px = padding, 2px = border
|
|
8533
8533
|
overflowY: 'auto',
|
|
8534
8534
|
WebkitOverflowScrolling: 'touch',
|
|
8535
8535
|
scrollBehavior: 'smooth',
|
|
@@ -8538,10 +8538,10 @@ const getListStyles = (direction, theme) => {
|
|
|
8538
8538
|
...(isDirectionDown
|
|
8539
8539
|
? ['borderBottomLeftRadius', 'borderBottomRightRadius']
|
|
8540
8540
|
: ['borderTopLeftRadius', 'borderTopRightRadius']).reduce((result, curr) => ({ ...result, [curr]: borderRadiusSmall }), {}),
|
|
8541
|
-
scrollbarWidth: 'thin',
|
|
8542
|
-
scrollbarColor: 'auto',
|
|
8541
|
+
scrollbarWidth: 'thin', // firefox
|
|
8542
|
+
scrollbarColor: 'auto', // firefox
|
|
8543
8543
|
transition: getTransition('border-color'),
|
|
8544
|
-
transform: 'translate3d(0,0,0)',
|
|
8544
|
+
transform: 'translate3d(0,0,0)', // fix iOS bug if less than 5 items are displayed
|
|
8545
8545
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8546
8546
|
color: contrastHighColorDark,
|
|
8547
8547
|
background: backgroundColorDark,
|
|
@@ -8645,7 +8645,7 @@ const getComponentCss$p = (direction, isOpen, state, disabled, filter, isNativeP
|
|
|
8645
8645
|
margin: 0,
|
|
8646
8646
|
overflow: 'initial',
|
|
8647
8647
|
height: 'auto',
|
|
8648
|
-
maxHeight: `${8.5 * (OPTION_HEIGHT + 8) + 6 + 2}px`,
|
|
8648
|
+
maxHeight: `${8.5 * (OPTION_HEIGHT + 8) + 6 + 2}px`, // 8px = gap, 6px = padding, 2px = border
|
|
8649
8649
|
'&:-internal-popover-in-top-layer::backdrop': {
|
|
8650
8650
|
display: 'none',
|
|
8651
8651
|
},
|
|
@@ -8670,7 +8670,7 @@ const getComponentCss$o = (isDisabled, hasCustomDropdown, hideLabel, state, them
|
|
|
8670
8670
|
...addImportantToEachRule(getSlottedTextFieldTextareaSelectStyles('select', state, false, theme, {
|
|
8671
8671
|
gridArea: '1/1/1/-1',
|
|
8672
8672
|
position: 'static',
|
|
8673
|
-
zIndex: 0,
|
|
8673
|
+
zIndex: 0, // TODO: overrides global style.css in e2e and vrts
|
|
8674
8674
|
cursor: 'pointer',
|
|
8675
8675
|
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
8676
8676
|
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
@@ -8692,10 +8692,10 @@ const getComponentCss$o = (isDisabled, hasCustomDropdown, hideLabel, state, them
|
|
|
8692
8692
|
gridArea: '1/2',
|
|
8693
8693
|
placeSelf: 'center',
|
|
8694
8694
|
position: 'relative',
|
|
8695
|
-
zIndex: 2,
|
|
8695
|
+
zIndex: 2, // ensures icon is above input or button of select dropdown
|
|
8696
8696
|
pointerEvents: 'none',
|
|
8697
8697
|
padding: formButtonOrIconPadding,
|
|
8698
|
-
transform: 'rotate3d(0,0,1,0.0001deg)',
|
|
8698
|
+
transform: 'rotate3d(0,0,1,0.0001deg)', // needs to be a little more than 0 for correct direction in safari
|
|
8699
8699
|
transition: getTransition('transform'),
|
|
8700
8700
|
'&--open': {
|
|
8701
8701
|
transform: 'rotate3d(0,0,1,180deg)',
|
|
@@ -8739,7 +8739,7 @@ const getComponentCss$n = (size, theme) => {
|
|
|
8739
8739
|
}),
|
|
8740
8740
|
},
|
|
8741
8741
|
svg: {
|
|
8742
|
-
display: 'block',
|
|
8742
|
+
display: 'block', // for correct vertical alignment
|
|
8743
8743
|
fill: 'none',
|
|
8744
8744
|
animation: `$rotate ${animationDuration} steps(50) infinite`,
|
|
8745
8745
|
},
|
|
@@ -8858,7 +8858,7 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
8858
8858
|
gap: '3px',
|
|
8859
8859
|
color: isDisabled ? disabledColor : primaryColor,
|
|
8860
8860
|
padding: '4px 10px 4px 6px',
|
|
8861
|
-
margin: 0,
|
|
8861
|
+
margin: 0, // Removes default button margin on safari 15
|
|
8862
8862
|
background: 0,
|
|
8863
8863
|
border: 0,
|
|
8864
8864
|
outline: 0,
|
|
@@ -8981,11 +8981,11 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
8981
8981
|
display: stretchValue ? 'block' : 'inline-block',
|
|
8982
8982
|
})),
|
|
8983
8983
|
...addImportantToEachRule({
|
|
8984
|
-
outline: 0,
|
|
8984
|
+
outline: 0, // custom element is able to delegate the focus
|
|
8985
8985
|
...colorSchemeStyles,
|
|
8986
8986
|
...hostHiddenStyles,
|
|
8987
8987
|
...buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
8988
|
-
width: stretchValue ? '100%' : 'auto',
|
|
8988
|
+
width: stretchValue ? '100%' : 'auto', // prevents adjusting its size when used as flex or grid child
|
|
8989
8989
|
...(!stretchValue && { verticalAlign: 'top' }),
|
|
8990
8990
|
})),
|
|
8991
8991
|
}),
|
|
@@ -8997,12 +8997,12 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
8997
8997
|
gap: spacingStaticSmall,
|
|
8998
8998
|
width: '100%',
|
|
8999
8999
|
padding: 0,
|
|
9000
|
-
margin: 0,
|
|
9000
|
+
margin: 0, // Removes default button margin on safari 15
|
|
9001
9001
|
outline: 0,
|
|
9002
9002
|
border: 0,
|
|
9003
9003
|
textAlign: 'start',
|
|
9004
9004
|
background: 'transparent',
|
|
9005
|
-
WebkitAppearance: 'none',
|
|
9005
|
+
WebkitAppearance: 'none', // iOS safari
|
|
9006
9006
|
appearance: 'none',
|
|
9007
9007
|
cursor: isDisabledOrLoading(disabled, loading) ? 'auto' : 'pointer',
|
|
9008
9008
|
...buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
@@ -9081,8 +9081,8 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
9081
9081
|
}),
|
|
9082
9082
|
label: {
|
|
9083
9083
|
...textSmallStyle,
|
|
9084
|
-
minWidth: 0,
|
|
9085
|
-
minHeight: 0,
|
|
9084
|
+
minWidth: 0, // prevents flex child to overflow max available parent size
|
|
9085
|
+
minHeight: 0, // prevents flex child to overflow max available parent size
|
|
9086
9086
|
color: textColor,
|
|
9087
9087
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9088
9088
|
color: textColorDark,
|
|
@@ -9203,13 +9203,13 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
|
9203
9203
|
display: 'flex',
|
|
9204
9204
|
gap: spacingStaticXSmall,
|
|
9205
9205
|
width: 'auto',
|
|
9206
|
-
margin: 0,
|
|
9206
|
+
margin: 0, // Removes default button margin on safari 15
|
|
9207
9207
|
padding: 0,
|
|
9208
9208
|
font: 'inherit',
|
|
9209
9209
|
color: 'inherit',
|
|
9210
9210
|
outline: 0,
|
|
9211
9211
|
alignItems: 'flex-end',
|
|
9212
|
-
WebkitAppearance: 'none',
|
|
9212
|
+
WebkitAppearance: 'none', // iOS safari
|
|
9213
9213
|
appearance: 'none',
|
|
9214
9214
|
background: 'transparent',
|
|
9215
9215
|
textAlign: 'start',
|
|
@@ -9224,7 +9224,7 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
|
9224
9224
|
right: buttonBeforeOffsetHorizontal,
|
|
9225
9225
|
left: buttonBeforeOffsetHorizontal,
|
|
9226
9226
|
borderRadius: borderRadiusSmall,
|
|
9227
|
-
zIndex: -1,
|
|
9227
|
+
zIndex: -1, // needed so that text behind element is selectable and/or visible
|
|
9228
9228
|
transition: getTransition('background-color'),
|
|
9229
9229
|
},
|
|
9230
9230
|
...hoverMediaQuery({
|
|
@@ -9259,7 +9259,7 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
|
9259
9259
|
transition: getTransition('opacity'),
|
|
9260
9260
|
opacity: active ? 1 : 0,
|
|
9261
9261
|
transform: `rotate3d(0,0,1,${isDirectionAsc(direction) ? 0 : 180}deg)`,
|
|
9262
|
-
transformOrigin: '50% 50%',
|
|
9262
|
+
transformOrigin: '50% 50%', // for iOS
|
|
9263
9263
|
filter: `var(${cssVariableTableHeadCellIconFilter})`,
|
|
9264
9264
|
},
|
|
9265
9265
|
}),
|
|
@@ -9363,7 +9363,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
9363
9363
|
lineHeight: 'inherit',
|
|
9364
9364
|
whiteSpace: 'nowrap',
|
|
9365
9365
|
boxSizing: 'border-box',
|
|
9366
|
-
WebkitAppearance: 'none',
|
|
9366
|
+
WebkitAppearance: 'none', // iOS safari
|
|
9367
9367
|
appearance: 'none',
|
|
9368
9368
|
outlineOffset: '1px',
|
|
9369
9369
|
textDecoration: 'none',
|
|
@@ -9372,7 +9372,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
9372
9372
|
color: primaryColor,
|
|
9373
9373
|
cursor: 'pointer',
|
|
9374
9374
|
borderRadius: borderRadiusSmall,
|
|
9375
|
-
zIndex: 0,
|
|
9375
|
+
zIndex: 0, // needed for ::before pseudo element to be visible
|
|
9376
9376
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9377
9377
|
color: primaryColorDark,
|
|
9378
9378
|
}),
|
|
@@ -9382,7 +9382,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
9382
9382
|
position: 'absolute',
|
|
9383
9383
|
inset: '-2px -4px',
|
|
9384
9384
|
borderRadius: borderRadiusSmall,
|
|
9385
|
-
zIndex: -1,
|
|
9385
|
+
zIndex: -1, // Stack the pseudo-element behind the button to avoid overlay of frosted-glass effect with label text
|
|
9386
9386
|
transition: getTransition('background-color'),
|
|
9387
9387
|
},
|
|
9388
9388
|
}),
|
|
@@ -9435,7 +9435,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
9435
9435
|
// moving bar
|
|
9436
9436
|
bar: {
|
|
9437
9437
|
...barJssStyle,
|
|
9438
|
-
width: 0,
|
|
9438
|
+
width: 0, // actual width and transform is set via inline css
|
|
9439
9439
|
bottom: isHighContrastMode ? '0' : '-2px',
|
|
9440
9440
|
visibility: 'visible',
|
|
9441
9441
|
transition: `${getTransition('transform', 'moderate')}, ${getTransition('width', 'moderate')}`,
|
|
@@ -9458,7 +9458,7 @@ const getComponentCss$b = (theme) => {
|
|
|
9458
9458
|
display: 'block',
|
|
9459
9459
|
...addImportantToEachRule({
|
|
9460
9460
|
position: 'relative',
|
|
9461
|
-
color: primaryColor,
|
|
9461
|
+
color: primaryColor, // enables color inheritance for e.g. slotted anchor
|
|
9462
9462
|
outline: 0,
|
|
9463
9463
|
...hostHiddenStyles,
|
|
9464
9464
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -9549,7 +9549,7 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
9549
9549
|
gap: '12px',
|
|
9550
9550
|
minHeight: '54px',
|
|
9551
9551
|
padding: '4px 12px',
|
|
9552
|
-
margin: 0,
|
|
9552
|
+
margin: 0, // Removes default button margin on safari 15
|
|
9553
9553
|
borderRadius: borderRadiusSmall,
|
|
9554
9554
|
border: 0,
|
|
9555
9555
|
cursor: 'pointer',
|
|
@@ -9586,7 +9586,7 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
9586
9586
|
}),
|
|
9587
9587
|
icon: {
|
|
9588
9588
|
padding: '4px',
|
|
9589
|
-
marginInlineEnd: '-2px',
|
|
9589
|
+
marginInlineEnd: '-2px', // compensate white space of svg icon and optimize visual alignment
|
|
9590
9590
|
transition: getTransition('background-color'),
|
|
9591
9591
|
borderRadius: borderRadiusSmall,
|
|
9592
9592
|
},
|
|
@@ -9671,7 +9671,7 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
9671
9671
|
cursor: 'pointer',
|
|
9672
9672
|
font: 'inherit',
|
|
9673
9673
|
color: 'inherit',
|
|
9674
|
-
WebkitAppearance: 'none',
|
|
9674
|
+
WebkitAppearance: 'none', // iOS safari
|
|
9675
9675
|
appearance: 'none',
|
|
9676
9676
|
border: 0,
|
|
9677
9677
|
textAlign: 'start',
|
|
@@ -9687,7 +9687,7 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
9687
9687
|
}),
|
|
9688
9688
|
},
|
|
9689
9689
|
icon: {
|
|
9690
|
-
marginInlineStart: '-2px',
|
|
9690
|
+
marginInlineStart: '-2px', // compensate white space of svg icon and optimize visual alignment
|
|
9691
9691
|
alignSelf: 'flex-start',
|
|
9692
9692
|
...(['neutral-contrast-high', 'primary'].includes(tagColor) && {
|
|
9693
9693
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -9737,8 +9737,8 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
9737
9737
|
...getSlottedTextFieldTextareaSelectStyles('input', state, false, theme, {
|
|
9738
9738
|
gridArea: '1/1/1/-1',
|
|
9739
9739
|
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
9740
|
-
paddingInlineStart: `var(${cssVariableInputPaddingStart})`,
|
|
9741
|
-
paddingInlineEnd: `var(${cssVariableInputPaddingEnd})`,
|
|
9740
|
+
paddingInlineStart: `var(${cssVariableInputPaddingStart})`, // iOS Safari 14.5 can't handle padding-inline shorthand with css variables
|
|
9741
|
+
paddingInlineEnd: `var(${cssVariableInputPaddingEnd})`, // iOS Safari 14.5 can't handle padding-inline shorthand with css variables
|
|
9742
9742
|
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9743
9743
|
...(isNumber && {
|
|
9744
9744
|
MozAppearance: 'textfield', // hides up/down spin button for Firefox
|
|
@@ -9788,8 +9788,7 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
9788
9788
|
},
|
|
9789
9789
|
}),
|
|
9790
9790
|
...(hasUnitOrVisibleCounter && {
|
|
9791
|
-
|
|
9792
|
-
unit: {
|
|
9791
|
+
'unit-counter': {
|
|
9793
9792
|
...getUnitCounterJssStyle(isDisabled, theme),
|
|
9794
9793
|
gridArea: `1/${unitPosition === 'suffix' ? 5 : 1}/1/${unitPosition === 'suffix' ? 7 : 3}`,
|
|
9795
9794
|
placeSelf: 'center',
|
|
@@ -9843,8 +9842,8 @@ const getComponentCss$6 = (type, theme) => {
|
|
|
9843
9842
|
},
|
|
9844
9843
|
// css selector for text-list-item
|
|
9845
9844
|
'::slotted(*)': addImportantToEachRule({
|
|
9846
|
-
[cssVariablePaddingTop]: spacingStaticXSmall,
|
|
9847
|
-
[cssVariablePaddingBottom]: spacingStaticMedium,
|
|
9845
|
+
[cssVariablePaddingTop]: spacingStaticXSmall, // padding top for nested list
|
|
9846
|
+
[cssVariablePaddingBottom]: spacingStaticMedium, // padding bottom for nested list, TODO: in case it's last root list item with a nested list it would result in outer spacing which is not desired
|
|
9848
9847
|
[cssVariablePseudoSpace]: isOrderedList
|
|
9849
9848
|
? `var(${cssVariableOrderedGridColumn},1.5rem)`
|
|
9850
9849
|
: `var(${cssVariableUnorderedGridColumn},.375rem)`,
|
|
@@ -9871,16 +9870,16 @@ const getComponentCss$5 = () => {
|
|
|
9871
9870
|
...addImportantToEachRule({
|
|
9872
9871
|
gridTemplateColumns: `var(${cssVariablePseudoSpace}) 1fr`,
|
|
9873
9872
|
columnGap: spacingStaticMedium,
|
|
9874
|
-
font: 'inherit',
|
|
9875
|
-
color: 'inherit',
|
|
9873
|
+
font: 'inherit', // ensures style can't be overwritten from outside
|
|
9874
|
+
color: 'inherit', // ensures style can't be overwritten from outside
|
|
9876
9875
|
...hostHiddenStyles,
|
|
9877
9876
|
}),
|
|
9878
9877
|
},
|
|
9879
9878
|
...addImportantToEachRule({
|
|
9880
9879
|
'::slotted(*)': {
|
|
9881
|
-
[cssVariableUnorderedGridColumn]: '.625rem',
|
|
9882
|
-
[cssVariableUnorderedPseudoContent]: '"–"',
|
|
9883
|
-
[cssVariableOrderedGridColumn]: '2rem',
|
|
9880
|
+
[cssVariableUnorderedGridColumn]: '.625rem', // reserves space for ::before (nested unordered list)
|
|
9881
|
+
[cssVariableUnorderedPseudoContent]: '"–"', // custom ::before char "–" (nested unordered list)
|
|
9882
|
+
[cssVariableOrderedGridColumn]: '2rem', // reserves space for ::before (nested ordered list)
|
|
9884
9883
|
[cssVariableOrderedPseudoSuffix]: '""', // don't show ::before suffix "." (nested ordered list)
|
|
9885
9884
|
},
|
|
9886
9885
|
'::slotted(*:last-child)': {
|
|
@@ -9936,7 +9935,7 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
9936
9935
|
...mergeDeep(addImportantToEachRule(getSlottedTextFieldTextareaSelectStyles('textarea', state, false, theme, {
|
|
9937
9936
|
gridArea: '1/1',
|
|
9938
9937
|
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9939
|
-
font: textSmallStyle.font,
|
|
9938
|
+
font: textSmallStyle.font, // to override line-height
|
|
9940
9939
|
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9941
9940
|
padding: hasCounter
|
|
9942
9941
|
? `12px ${formElementPaddingHorizontal} ${spacingStaticLarge}`
|
|
@@ -9944,8 +9943,8 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
9944
9943
|
})), {
|
|
9945
9944
|
// TODO: is it possible to move into getSlottedTextFieldTextareaSelectStyles()?
|
|
9946
9945
|
'::slotted(textarea)': {
|
|
9947
|
-
height: 'auto',
|
|
9948
|
-
minHeight: '200px',
|
|
9946
|
+
height: 'auto', // removes !important from getBaseChildStyles
|
|
9947
|
+
minHeight: '200px', // min-height should be overridable
|
|
9949
9948
|
resize: 'vertical', // overridable, too
|
|
9950
9949
|
},
|
|
9951
9950
|
}),
|
|
@@ -10006,11 +10005,11 @@ const getComponentCss$1 = () => {
|
|
|
10006
10005
|
// In addition, a public css variable can be passed to overwrite the default position.
|
|
10007
10006
|
[cssVariablePositionBottomInternal]: `var(${cssVariablePositionBottom}, 56px)`,
|
|
10008
10007
|
bottom: `var(${cssVariablePositionBottomInternal})`,
|
|
10009
|
-
maxWidth: '42rem',
|
|
10010
10008
|
zIndex: TOAST_Z_INDEX,
|
|
10011
10009
|
[getMediaQueryMin('s')]: {
|
|
10012
10010
|
left: '64px',
|
|
10013
10011
|
right: 'auto',
|
|
10012
|
+
maxWidth: 'min(42rem, calc(100vw - 64px * 2))',
|
|
10014
10013
|
[cssVariablePositionBottomInternal]: `var(${cssVariablePositionBottom}, 64px)`,
|
|
10015
10014
|
bottom: `var(${cssVariablePositionBottomInternal})`,
|
|
10016
10015
|
},
|
|
@@ -10040,7 +10039,7 @@ const getComponentCss = (size, theme) => {
|
|
|
10040
10039
|
outline: 0,
|
|
10041
10040
|
maxWidth: '100%',
|
|
10042
10041
|
maxHeight: '100%',
|
|
10043
|
-
boxSizing: 'content-box',
|
|
10042
|
+
boxSizing: 'content-box', // needed for correct height calculation when padding is set on host (e.g. custom click area)
|
|
10044
10043
|
...(size !== 'inherit' && {
|
|
10045
10044
|
height: 'clamp(0.63rem, 0.42vw + 0.5rem, 1rem)',
|
|
10046
10045
|
// workaround for Safari to optimize image rendering
|