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