@porsche-design-system/components-react 3.10.0-rc.3 → 3.10.0-rc.5
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 +75 -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 +332 -338
- 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 +10 -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 +332 -338
- 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 +11 -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
|
}),
|
|
@@ -4198,7 +4202,7 @@ const getComponentCss$13 = (size, compact, open, theme) => {
|
|
|
4198
4202
|
...(open
|
|
4199
4203
|
? {
|
|
4200
4204
|
gridTemplateRows: '1fr',
|
|
4201
|
-
visibility: '
|
|
4205
|
+
visibility: 'inherit',
|
|
4202
4206
|
transition: getTransition('grid-template-rows'),
|
|
4203
4207
|
paddingBottom: compact ? spacingStaticSmall : '24px',
|
|
4204
4208
|
}
|
|
@@ -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,
|
|
@@ -4823,19 +4826,15 @@ const bulletInfiniteClass = 'bullet--infinite';
|
|
|
4823
4826
|
const paginationBulletSize = '8px';
|
|
4824
4827
|
const paginationInfiniteBulletSize = '4px';
|
|
4825
4828
|
const paginationActiveBulletSize = '20px';
|
|
4826
|
-
const selectorHeading = 'h2,::slotted([slot=heading])';
|
|
4827
|
-
const selectorDescription = 'p,::slotted([slot=description])';
|
|
4829
|
+
const selectorHeading = 'h2,::slotted([slot="heading"])';
|
|
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, hasControlsSlot, 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,21 @@ 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
|
+
...(hasControlsSlot && {
|
|
4855
|
+
['slot[name="controls"]']: {
|
|
4856
|
+
display: 'block',
|
|
4857
|
+
gridColumnStart: 1,
|
|
4858
|
+
gridRowStart: 3,
|
|
4859
|
+
alignSelf: 'center', // ensures vertical alignment to prev/next buttons
|
|
4860
|
+
},
|
|
4861
|
+
}),
|
|
4855
4862
|
...addImportantToEachRule({
|
|
4856
4863
|
'::slotted(*)': {
|
|
4857
4864
|
borderRadius: `var(--p-carousel-border-radius, ${borderRadiusLarge})`,
|
|
@@ -4863,45 +4870,45 @@ const getComponentCss$Z = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4863
4870
|
}),
|
|
4864
4871
|
outlineOffset: '2px',
|
|
4865
4872
|
},
|
|
4866
|
-
[
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
: {
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
},
|
|
4873
|
+
// TODO: maybe it's better to style with slot[name="heading"] and slot[name="description"] instead, then styles would be part of shadow dom
|
|
4874
|
+
// h2,::slotted([slot=heading]),p,::slotted([slot=description])
|
|
4875
|
+
...((hasHeading || hasDescription) && {
|
|
4876
|
+
[`${selectorHeading},${selectorDescription}`]: {
|
|
4877
|
+
gridColumn: '1/-1',
|
|
4878
|
+
color: primaryColor,
|
|
4879
|
+
...(isHeaderAlignCenter && {
|
|
4880
|
+
textAlign: 'center', // relevant in case heading or description becomes multiline
|
|
4881
|
+
justifySelf: 'center', // relevant for horizontal alignment of heading and description in case max-width applies
|
|
4882
|
+
}),
|
|
4883
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4884
|
+
color: primaryColorDark,
|
|
4885
|
+
}),
|
|
4886
|
+
},
|
|
4887
|
+
}),
|
|
4888
|
+
// h2,::slotted([slot=heading])
|
|
4889
|
+
...(hasHeading && {
|
|
4890
|
+
[selectorHeading]: {
|
|
4891
|
+
maxWidth: '56.25rem',
|
|
4892
|
+
margin: `0 0 ${!hasDescription ? spacingFluidMedium : 0}`,
|
|
4893
|
+
...(headingSize === 'xx-large' ? headingXXLargeStyle : headingXLargeStyle),
|
|
4894
|
+
},
|
|
4895
|
+
}),
|
|
4896
|
+
// p,::slotted([slot=description])
|
|
4897
|
+
...(hasDescription && {
|
|
4898
|
+
[selectorDescription]: {
|
|
4899
|
+
maxWidth: '34.375rem',
|
|
4900
|
+
margin: `${spacingFluidSmall} 0 ${spacingFluidMedium}`,
|
|
4901
|
+
...textSmallStyle,
|
|
4902
|
+
},
|
|
4903
|
+
}),
|
|
4889
4904
|
}),
|
|
4890
4905
|
},
|
|
4891
4906
|
header: {
|
|
4892
4907
|
display: 'grid',
|
|
4893
4908
|
padding: `0 ${spacingMap[width].base}`,
|
|
4894
|
-
...(isHeaderAlignCenter && {
|
|
4895
|
-
textAlign: 'center',
|
|
4896
|
-
}),
|
|
4897
4909
|
[mediaQueryS]: {
|
|
4898
|
-
|
|
4899
|
-
fontSize: fontSizeTextSmall,
|
|
4910
|
+
gridTemplateColumns: 'minmax(0px, 1fr) auto',
|
|
4900
4911
|
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
4912
|
padding: `0 ${spacingMap[width].s}`,
|
|
4906
4913
|
},
|
|
4907
4914
|
[mediaQueryXXL]: {
|
|
@@ -4911,12 +4918,11 @@ const getComponentCss$Z = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4911
4918
|
nav: {
|
|
4912
4919
|
display: 'none',
|
|
4913
4920
|
[mediaQueryS]: {
|
|
4921
|
+
gridRowStart: '3',
|
|
4922
|
+
gridColumnEnd: '-1',
|
|
4914
4923
|
display: 'flex',
|
|
4915
4924
|
gap: spacingStaticXSmall,
|
|
4916
|
-
|
|
4917
|
-
alignItems: 'end',
|
|
4918
|
-
justifyContent: 'end',
|
|
4919
|
-
justifySelf: 'end',
|
|
4925
|
+
alignSelf: 'flex-start', // relevant in case slot="header" becomes higher than nav group
|
|
4920
4926
|
},
|
|
4921
4927
|
},
|
|
4922
4928
|
btn: {
|
|
@@ -4932,8 +4938,8 @@ const getComponentCss$Z = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4932
4938
|
},
|
|
4933
4939
|
splide: {
|
|
4934
4940
|
overflow: 'hidden',
|
|
4935
|
-
padding: '4px 0',
|
|
4936
|
-
margin: '-4px 0',
|
|
4941
|
+
padding: '4px 0', // for slide focus outline
|
|
4942
|
+
margin: '-4px 0', // for slide focus outline
|
|
4937
4943
|
'&__track': {
|
|
4938
4944
|
// !important is necessary to override inline styles set by splide library
|
|
4939
4945
|
...addImportantToEachRule({
|
|
@@ -4973,7 +4979,7 @@ const getComponentCss$Z = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4973
4979
|
})),
|
|
4974
4980
|
position: 'relative',
|
|
4975
4981
|
justifyContent: isInfinitePagination ? 'flex-start' : 'center',
|
|
4976
|
-
width: `calc(${paginationActiveBulletSize} + ${paginationBulletSize} * 4 + ${spacingStaticSmall} * 4)`,
|
|
4982
|
+
width: `calc(${paginationActiveBulletSize} + ${paginationBulletSize} * 4 + ${spacingStaticSmall} * 4)`, // Width for five bullets (one active + spacing)
|
|
4977
4983
|
left: 'calc(50% - 42px)',
|
|
4978
4984
|
overflowX: 'hidden',
|
|
4979
4985
|
},
|
|
@@ -4981,7 +4987,7 @@ const getComponentCss$Z = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4981
4987
|
display: 'flex',
|
|
4982
4988
|
alignItems: 'center',
|
|
4983
4989
|
width: 'fit-content',
|
|
4984
|
-
height: paginationBulletSize,
|
|
4990
|
+
height: paginationBulletSize, // Needed to avoid jumping when rewinding dynamically added slides
|
|
4985
4991
|
gap: spacingStaticSmall,
|
|
4986
4992
|
transition: `transform ${carouselTransitionDuration}`,
|
|
4987
4993
|
},
|
|
@@ -5096,14 +5102,14 @@ const getSlottedCheckboxRadioButtonStyles = (state, isDisabled, isLoading, theme
|
|
|
5096
5102
|
return {
|
|
5097
5103
|
'::slotted': {
|
|
5098
5104
|
'&(input)': {
|
|
5099
|
-
position: 'relative',
|
|
5105
|
+
position: 'relative', // TODO: can be removed as soon as focus style was adjusted
|
|
5100
5106
|
width: fontLineHeight,
|
|
5101
5107
|
height: fontLineHeight,
|
|
5102
|
-
font: `${fontSizeTextSmall} ${fontFamily}`,
|
|
5108
|
+
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
5103
5109
|
display: 'block',
|
|
5104
5110
|
margin: 0,
|
|
5105
5111
|
padding: 0,
|
|
5106
|
-
WebkitAppearance: 'none',
|
|
5112
|
+
WebkitAppearance: 'none', // iOS safari
|
|
5107
5113
|
appearance: 'none',
|
|
5108
5114
|
boxSizing: 'content-box',
|
|
5109
5115
|
background: `transparent 0% 0% / ${fontLineHeight}`,
|
|
@@ -5193,9 +5199,9 @@ const getFunctionalComponentLabelStyles = (isDisabledOrLoading, hideLabel, theme
|
|
|
5193
5199
|
label: {
|
|
5194
5200
|
...textSmallStyle,
|
|
5195
5201
|
cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer',
|
|
5196
|
-
justifySelf: 'flex-start',
|
|
5202
|
+
justifySelf: 'flex-start', // ensures label is not getting stretched by flex or grid context of its parent
|
|
5197
5203
|
color: isDisabledOrLoading ? disabledColor : primaryColor,
|
|
5198
|
-
transition: getTransition('color'),
|
|
5204
|
+
transition: getTransition('color'), // for smooth transitions between e.g. disabled state
|
|
5199
5205
|
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, additionalIsShownJssStyle)),
|
|
5200
5206
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5201
5207
|
color: isDisabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
@@ -5304,7 +5310,7 @@ const getComponentCss$Y = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5304
5310
|
wrapper: {
|
|
5305
5311
|
display: 'grid',
|
|
5306
5312
|
gridArea: '1/1',
|
|
5307
|
-
alignSelf: 'flex-start',
|
|
5313
|
+
alignSelf: 'flex-start', // in case label becomes multiline
|
|
5308
5314
|
...(isDisabledOrLoading(isDisabled, isLoading) && {
|
|
5309
5315
|
// TODO: maybe .wrapper should handle it for all form components while pointer-events: none is set to input
|
|
5310
5316
|
cursor: 'not-allowed',
|
|
@@ -5313,12 +5319,12 @@ const getComponentCss$Y = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5313
5319
|
...(isLoading && {
|
|
5314
5320
|
// TODO: extract for checkbox-wrapper and radio-button-wrapper (not gridArea and placeSelf)
|
|
5315
5321
|
spinner: {
|
|
5316
|
-
position: 'relative',
|
|
5322
|
+
position: 'relative', // ensure correct stacking, can be removed as soon as focus for input is handled with outline
|
|
5317
5323
|
gridArea: '1/1',
|
|
5318
5324
|
placeSelf: 'center',
|
|
5319
5325
|
width: fontLineHeight,
|
|
5320
5326
|
height: fontLineHeight,
|
|
5321
|
-
font: `${fontSizeTextSmall} ${fontFamily}`,
|
|
5327
|
+
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
5322
5328
|
pointerEvents: 'none',
|
|
5323
5329
|
},
|
|
5324
5330
|
}),
|
|
@@ -5326,7 +5332,7 @@ const getComponentCss$Y = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5326
5332
|
...getFunctionalComponentLabelStyles(isDisabled || isLoading, hideLabel, theme, {
|
|
5327
5333
|
gridArea: '1/2',
|
|
5328
5334
|
}, {
|
|
5329
|
-
paddingTop: '2px',
|
|
5335
|
+
paddingTop: '2px', // compensate vertical alignment
|
|
5330
5336
|
paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent not clickable area between label and input
|
|
5331
5337
|
}),
|
|
5332
5338
|
// .message
|
|
@@ -5353,7 +5359,7 @@ const getComponentCss$X = (width) => {
|
|
|
5353
5359
|
},
|
|
5354
5360
|
},
|
|
5355
5361
|
root: {
|
|
5356
|
-
minWidth: 0,
|
|
5362
|
+
minWidth: 0, // needed for some flex context
|
|
5357
5363
|
...(['full', 'fluid'].includes(width)
|
|
5358
5364
|
? {
|
|
5359
5365
|
padding: `0 ${gridFullOffset}`,
|
|
@@ -5392,7 +5398,7 @@ const getComponentCss$W = () => {
|
|
|
5392
5398
|
verticalAlign: 'top',
|
|
5393
5399
|
...addImportantToEachRule({
|
|
5394
5400
|
outline: 0,
|
|
5395
|
-
boxSizing: 'content-box',
|
|
5401
|
+
boxSizing: 'content-box', // needed for correct height calculation when padding is set on host (e.g. custom click area)
|
|
5396
5402
|
...getDimensionStyle,
|
|
5397
5403
|
...colorSchemeStyles,
|
|
5398
5404
|
...hostHiddenStyles,
|
|
@@ -5681,7 +5687,7 @@ const getComponentCss$P = (isPrimaryScrollerVisible, isSecondaryScrollerVisible,
|
|
|
5681
5687
|
[cssVariableVisibility]: 'hidden',
|
|
5682
5688
|
[cssVariableVisibilityTransitionDuration]: motionDurationLong,
|
|
5683
5689
|
}),
|
|
5684
|
-
...getBackdropJssStyle(isPrimaryScrollerVisible,
|
|
5690
|
+
...getBackdropJssStyle(isPrimaryScrollerVisible, FLYOUT_Z_INDEX, theme),
|
|
5685
5691
|
...colorSchemeStyles,
|
|
5686
5692
|
...hostHiddenStyles,
|
|
5687
5693
|
}),
|
|
@@ -5689,17 +5695,17 @@ const getComponentCss$P = (isPrimaryScrollerVisible, isSecondaryScrollerVisible,
|
|
|
5689
5695
|
dialog: {
|
|
5690
5696
|
position: 'fixed',
|
|
5691
5697
|
...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',
|
|
5698
|
+
display: 'grid', // ua-style reset
|
|
5699
|
+
width: 'auto', // ua-style reset and to ensure transition duration works correctly
|
|
5700
|
+
height: '100vh', // ua-style reset
|
|
5701
|
+
maxWidth: '100vw', // ua-style reset
|
|
5702
|
+
maxHeight: '100vh', // ua-style reset
|
|
5703
|
+
margin: 0, // ua-style reset
|
|
5704
|
+
padding: 0, // ua-style reset
|
|
5705
|
+
border: 0, // ua-style reset
|
|
5706
|
+
visibility: 'inherit', // ua-style reset
|
|
5707
|
+
background: 'none', // ua-style reset
|
|
5708
|
+
overflow: 'hidden', // ua-style reset, dialog shall never become scrollable, it's handled by custom scroll areas
|
|
5703
5709
|
...(isPrimaryScrollerVisible
|
|
5704
5710
|
? {
|
|
5705
5711
|
transform: 'translate3d(0, 0, 0)',
|
|
@@ -5734,7 +5740,7 @@ const getComponentCss$P = (isPrimaryScrollerVisible, isSecondaryScrollerVisible,
|
|
|
5734
5740
|
overflow: 'auto',
|
|
5735
5741
|
// cssVariableVisibility ensures secondary scroller is not tabbable when whole flyout-navigation is closed
|
|
5736
5742
|
// on mobile we need to decide if secondary scroller needs to be visible or not, on desktop it's not necessary but also doesn't harm
|
|
5737
|
-
visibility: `var(${cssVariableVisibility},${isSecondaryScrollerVisible ? 'hidden' : '
|
|
5743
|
+
visibility: `var(${cssVariableVisibility},${isSecondaryScrollerVisible ? 'hidden' : 'inherit'})`,
|
|
5738
5744
|
transition: `${getTransition('left', 'long', isSecondaryScrollerVisible ? 'in' : 'out')}, visibility 0s linear var(${cssVariableTransitionDuration}, ${!isPrimaryScrollerVisible || isSecondaryScrollerVisible ? motionDurationLong : '0s'})`,
|
|
5739
5745
|
// it's important to define background-color for each scroller to have correct scrollbar coloring
|
|
5740
5746
|
backgroundColor,
|
|
@@ -5755,7 +5761,7 @@ const getComponentCss$P = (isPrimaryScrollerVisible, isSecondaryScrollerVisible,
|
|
|
5755
5761
|
height: frostedGlassHeaderHeight,
|
|
5756
5762
|
backgroundColor: frostedGlassBackgroundColor,
|
|
5757
5763
|
WebkitBackdropFilter: 'blur(8px)',
|
|
5758
|
-
backdropFilter: 'blur(8px)',
|
|
5764
|
+
backdropFilter: 'blur(8px)', // with current frostedGlassStyle of blur(32px) scrolling becomes visually distracting
|
|
5759
5765
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5760
5766
|
backgroundColor: frostedGlassBackgroundColorDark$1,
|
|
5761
5767
|
}),
|
|
@@ -5776,7 +5782,7 @@ const getComponentCss$P = (isPrimaryScrollerVisible, isSecondaryScrollerVisible,
|
|
|
5776
5782
|
// header is needed to keep position of dismiss button in sync with header of secondary scroller
|
|
5777
5783
|
header: {
|
|
5778
5784
|
position: 'relative',
|
|
5779
|
-
zIndex: 3,
|
|
5785
|
+
zIndex: 3, // ensures dismiss button is visible on secondary drawer in mobile view
|
|
5780
5786
|
gridArea: '1/1',
|
|
5781
5787
|
alignSelf: 'flex-start',
|
|
5782
5788
|
justifySelf: 'flex-end',
|
|
@@ -5800,40 +5806,6 @@ const getComponentCss$P = (isPrimaryScrollerVisible, isSecondaryScrollerVisible,
|
|
|
5800
5806
|
},
|
|
5801
5807
|
});
|
|
5802
5808
|
};
|
|
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
5809
|
const getContentJssStyle = () => {
|
|
5838
5810
|
return {
|
|
5839
5811
|
display: 'flex',
|
|
@@ -5952,6 +5924,7 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
|
|
|
5952
5924
|
? {
|
|
5953
5925
|
zIndex: 2,
|
|
5954
5926
|
transform: 'translate3d(0, 0, 0)',
|
|
5927
|
+
// TODO: Should be visibility: inherit to allow overwriting but currently not possible since it would inherit from the scroller of the p-flyout-navigation itself, which is hidden on mobile
|
|
5955
5928
|
visibility: `var(${cssVariableVisibility},visible)`,
|
|
5956
5929
|
transition: `${getTransition('transform', 'long', 'in')}, visibility 0s linear var(${cssVariableTransitionDuration},var(${cssVariableVisibilityTransitionDuration},0s))`,
|
|
5957
5930
|
}
|
|
@@ -5972,9 +5945,9 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
|
|
|
5972
5945
|
}),
|
|
5973
5946
|
[mediaQueryEnhancedView]: {
|
|
5974
5947
|
boxShadow: 'none',
|
|
5975
|
-
insetInlineStart: `calc(${scrollerWidthEnhancedView} - 1px)`,
|
|
5948
|
+
insetInlineStart: `calc(${scrollerWidthEnhancedView} - 1px)`, // -1px prevents possible visible background under certain circumstances between primary and secondary scroller
|
|
5976
5949
|
width: scrollerWidthEnhancedView,
|
|
5977
|
-
transform: addImportantToRule('initial'),
|
|
5950
|
+
transform: addImportantToRule('initial'), // to overrule :dir(rtl) selector
|
|
5978
5951
|
transition: `visibility 0s linear var(${cssVariableTransitionDuration},var(${cssVariableVisibilityTransitionDuration},0s))`,
|
|
5979
5952
|
},
|
|
5980
5953
|
'&:dir(rtl)': {
|
|
@@ -5995,7 +5968,7 @@ const getComponentCss$O = (isSecondaryScrollerVisible, theme) => {
|
|
|
5995
5968
|
alignItems: 'center',
|
|
5996
5969
|
gap: spacingFluidSmall,
|
|
5997
5970
|
WebkitBackdropFilter: 'blur(8px)',
|
|
5998
|
-
backdropFilter: 'blur(8px)',
|
|
5971
|
+
backdropFilter: 'blur(8px)', // with current frostedGlassStyle of blur(32px) scrolling becomes visually distracting
|
|
5999
5972
|
backgroundColor: frostedGlassBackgroundColor,
|
|
6000
5973
|
...fadeInOutTransition,
|
|
6001
5974
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -6046,19 +6019,9 @@ const getComponentCss$N = (isOpen, position, hasFooter, hasSubFooter, theme) =>
|
|
|
6046
6019
|
// needed for correct alignment of the Porsche Grid within the Flyout
|
|
6047
6020
|
'--pds-internal-grid-outer-column': `calc(${spacingFluidLarge} - ${gridGap})`,
|
|
6048
6021
|
'--pds-internal-grid-margin': `calc(${spacingFluidLarge} * -1)`,
|
|
6049
|
-
position: 'fixed',
|
|
6050
|
-
zIndex: FLYOUT_Z_INDEX,
|
|
6051
6022
|
justifyContent: isPositionStart ? 'flex-start' : 'flex-end',
|
|
6052
|
-
...(isOpen
|
|
6053
|
-
? {
|
|
6054
|
-
visibility: 'inherit',
|
|
6055
|
-
}
|
|
6056
|
-
: {
|
|
6057
|
-
visibility: 'hidden',
|
|
6058
|
-
transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationLong})`,
|
|
6059
|
-
}),
|
|
6060
6023
|
...getInsetJssStyle(),
|
|
6061
|
-
...
|
|
6024
|
+
...getBackdropJssStyle(isOpen, FLYOUT_Z_INDEX, theme),
|
|
6062
6025
|
...colorSchemeStyles,
|
|
6063
6026
|
...hostHiddenStyles,
|
|
6064
6027
|
}),
|
|
@@ -6077,7 +6040,7 @@ const getComponentCss$N = (isOpen, position, hasFooter, hasSubFooter, theme) =>
|
|
|
6077
6040
|
height: '100%',
|
|
6078
6041
|
minWidth: '320px',
|
|
6079
6042
|
maxWidth: 'var(--p-flyout-max-width, 1180px)',
|
|
6080
|
-
color: primaryColor,
|
|
6043
|
+
color: primaryColor, // enables color inheritance for slotted content
|
|
6081
6044
|
background: backgroundColor,
|
|
6082
6045
|
...(isOpen
|
|
6083
6046
|
? {
|
|
@@ -6124,7 +6087,7 @@ const getComponentCss$N = (isOpen, position, hasFooter, hasSubFooter, theme) =>
|
|
|
6124
6087
|
padding: contentPadding,
|
|
6125
6088
|
position: 'relative',
|
|
6126
6089
|
zIndex: 0,
|
|
6127
|
-
backgroundColor,
|
|
6090
|
+
backgroundColor, // to ensure scrollbar coloring is optimal for light theme
|
|
6128
6091
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6129
6092
|
backgroundColor: backgroundColorDark, // to ensure scrollbar coloring is optimal for dark theme
|
|
6130
6093
|
}),
|
|
@@ -6372,7 +6335,25 @@ const forceRerenderAnimationStyle = {
|
|
|
6372
6335
|
const keyFramesLight = 'rerender-light';
|
|
6373
6336
|
const keyFramesDark = 'rerender-dark';
|
|
6374
6337
|
const cssVariableFilter = '--p-internal-icon-filter';
|
|
6375
|
-
const
|
|
6338
|
+
const isFlippableIcon = (name, source) => {
|
|
6339
|
+
return (!source &&
|
|
6340
|
+
(name === 'arrow-double-left' ||
|
|
6341
|
+
name === 'arrow-double-right' ||
|
|
6342
|
+
name === 'arrow-first' ||
|
|
6343
|
+
name === 'arrow-head-left' ||
|
|
6344
|
+
name === 'arrow-head-right' ||
|
|
6345
|
+
name === 'arrow-last' ||
|
|
6346
|
+
name === 'arrow-left' ||
|
|
6347
|
+
name === 'arrow-right' ||
|
|
6348
|
+
name === 'chart' ||
|
|
6349
|
+
name === 'chat' ||
|
|
6350
|
+
name === 'external' ||
|
|
6351
|
+
name === 'increase' ||
|
|
6352
|
+
name === 'list' ||
|
|
6353
|
+
name === 'logout' ||
|
|
6354
|
+
name === 'send'));
|
|
6355
|
+
};
|
|
6356
|
+
const getComponentCss$I = (name, source, color, size, theme) => {
|
|
6376
6357
|
const isColorInherit = color === 'inherit';
|
|
6377
6358
|
const isSizeInherit = size === 'inherit';
|
|
6378
6359
|
const isDark = isThemeDark(theme);
|
|
@@ -6387,10 +6368,10 @@ const getComponentCss$I = (color, size, theme) => {
|
|
|
6387
6368
|
}),
|
|
6388
6369
|
},
|
|
6389
6370
|
img: {
|
|
6390
|
-
display: 'block',
|
|
6371
|
+
display: 'block', // without display, img tag gets some extra spacing
|
|
6391
6372
|
margin: 0,
|
|
6392
6373
|
padding: 0,
|
|
6393
|
-
pointerEvents: 'none',
|
|
6374
|
+
pointerEvents: 'none', // disable dragging/ghosting of images
|
|
6394
6375
|
...(!isColorInherit && {
|
|
6395
6376
|
filter: `var(${cssVariableFilter},${filterMap[theme][color]})`,
|
|
6396
6377
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -6414,6 +6395,11 @@ const getComponentCss$I = (color, size, theme) => {
|
|
|
6414
6395
|
height: fontLineHeight,
|
|
6415
6396
|
font: `${sizeMap$2[size]} ${fontFamily}`,
|
|
6416
6397
|
}),
|
|
6398
|
+
...(isFlippableIcon(name, source) && {
|
|
6399
|
+
'&:dir(rtl)': {
|
|
6400
|
+
transform: 'scaleX(-1)',
|
|
6401
|
+
},
|
|
6402
|
+
}),
|
|
6417
6403
|
},
|
|
6418
6404
|
...(!isColorInherit && {
|
|
6419
6405
|
[`@keyframes ${isDark ? keyFramesDark : keyFramesLight}-${color}`]: forceRerenderAnimationStyle,
|
|
@@ -6427,7 +6413,7 @@ const mediaQueryMaxS$2 = getMediaQueryMax('s');
|
|
|
6427
6413
|
const getBackgroundColor = (state, theme) => {
|
|
6428
6414
|
const { infoSoftColor, successSoftColor, errorSoftColor, warningSoftColor } = getThemedColors(theme);
|
|
6429
6415
|
const colorMap = {
|
|
6430
|
-
neutral: infoSoftColor,
|
|
6416
|
+
neutral: infoSoftColor, // deprecated
|
|
6431
6417
|
info: infoSoftColor,
|
|
6432
6418
|
warning: warningSoftColor,
|
|
6433
6419
|
success: successSoftColor,
|
|
@@ -6641,7 +6627,7 @@ const getComponentCss$E = (aspectRatio, weight, direction, hasDescription) => {
|
|
|
6641
6627
|
},
|
|
6642
6628
|
...(hasDescription && {
|
|
6643
6629
|
description: {
|
|
6644
|
-
margin: '-12px 0 0 ',
|
|
6630
|
+
margin: '-12px 0 0 ', // TODO: perhaps gap should be overridden instead
|
|
6645
6631
|
...textSmallStyle,
|
|
6646
6632
|
hyphens: 'inherit',
|
|
6647
6633
|
},
|
|
@@ -6664,7 +6650,7 @@ const slottedAnchorSelector = `a[slot='${anchorSlot}']`;
|
|
|
6664
6650
|
const anchorJssStyle = {
|
|
6665
6651
|
position: 'absolute',
|
|
6666
6652
|
...getInsetJssStyle(),
|
|
6667
|
-
zIndex: 1,
|
|
6653
|
+
zIndex: 1, // necessary to be on top of img
|
|
6668
6654
|
borderRadius: borderRadiusMedium,
|
|
6669
6655
|
};
|
|
6670
6656
|
const getMultilineEllipsis = (lineClamp) => {
|
|
@@ -6682,7 +6668,7 @@ const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme)
|
|
|
6682
6668
|
'@global': {
|
|
6683
6669
|
':host': {
|
|
6684
6670
|
display: 'block',
|
|
6685
|
-
position: 'relative',
|
|
6671
|
+
position: 'relative', // needed for ::slotted(a) to overlay correctly
|
|
6686
6672
|
...addImportantToEachRule({
|
|
6687
6673
|
...colorSchemeStyles,
|
|
6688
6674
|
...hostHiddenStyles,
|
|
@@ -6730,7 +6716,7 @@ const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme)
|
|
|
6730
6716
|
display: 'flex',
|
|
6731
6717
|
flexDirection: 'column',
|
|
6732
6718
|
aspectRatio: '3/4',
|
|
6733
|
-
overflow: 'hidden',
|
|
6719
|
+
overflow: 'hidden', // TODO: discussable if we should prevent text to overflow .root, – e.g. it also prevents a popover from being shown correctly
|
|
6734
6720
|
boxSizing: 'border-box',
|
|
6735
6721
|
borderRadius: borderRadiusMedium,
|
|
6736
6722
|
padding: spacingFluidSmall,
|
|
@@ -6796,7 +6782,7 @@ const getComponentCss$D = (hasLikeButton, hasSlottedAnchor, aspectRatio, theme)
|
|
|
6796
6782
|
description: {
|
|
6797
6783
|
...textXXSmallStyle,
|
|
6798
6784
|
...getMultilineEllipsis(2),
|
|
6799
|
-
margin: 0,
|
|
6785
|
+
margin: 0, // ua-style reset
|
|
6800
6786
|
color: contrastHighColor,
|
|
6801
6787
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6802
6788
|
color: contrastHighColorDark,
|
|
@@ -6877,8 +6863,8 @@ const getFullscreenJssStyles = (fullscreen) => {
|
|
|
6877
6863
|
borderRadius: 0,
|
|
6878
6864
|
}
|
|
6879
6865
|
: {
|
|
6880
|
-
minWidth: '276px',
|
|
6881
|
-
maxWidth: '1535.5px',
|
|
6866
|
+
minWidth: '276px', // on viewport 320px: calc(${gridColumnWidthBase} * 6 + ${gridGap} * 5)
|
|
6867
|
+
maxWidth: '1535.5px', // on viewport 1920px: `calc(${gridColumnWidthXXL} * 14 + ${gridGap} * 13)`
|
|
6882
6868
|
minHeight: 'auto',
|
|
6883
6869
|
margin: `${marginTopBottom} ${gridExtendedOffsetBase}`,
|
|
6884
6870
|
borderRadius: borderRadiusMedium,
|
|
@@ -6923,26 +6909,11 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6923
6909
|
return getCss({
|
|
6924
6910
|
'@global': {
|
|
6925
6911
|
':host': {
|
|
6926
|
-
|
|
6927
|
-
overflowY: 'auto',
|
|
6912
|
+
overflowY: 'auto', // overrideable
|
|
6928
6913
|
...addImportantToEachRule({
|
|
6929
|
-
position: 'fixed',
|
|
6930
|
-
...getInsetJssStyle(),
|
|
6931
|
-
zIndex: MODAL_Z_INDEX,
|
|
6932
|
-
alignItems: 'center',
|
|
6933
|
-
justifyContent: 'center',
|
|
6934
|
-
flexWrap: 'wrap',
|
|
6935
|
-
...(isOpen
|
|
6936
|
-
? {
|
|
6937
|
-
visibility: 'inherit',
|
|
6938
|
-
}
|
|
6939
|
-
: {
|
|
6940
|
-
visibility: 'hidden',
|
|
6941
|
-
transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationShort})`,
|
|
6942
|
-
}),
|
|
6943
6914
|
...colorSchemeStyles,
|
|
6944
6915
|
...hostHiddenStyles,
|
|
6945
|
-
...
|
|
6916
|
+
...getBackdropJssStyle(isOpen, MODAL_Z_INDEX, theme, duration),
|
|
6946
6917
|
}),
|
|
6947
6918
|
},
|
|
6948
6919
|
'::slotted': addImportantToEachRule(mergeDeep(getSlottedJssStyle(32, hasHeader, hasDismissButton), buildResponsiveStyles(isFullscreen, (fullscreenValue) => ({
|
|
@@ -6964,14 +6935,23 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6964
6935
|
}),
|
|
6965
6936
|
},
|
|
6966
6937
|
},
|
|
6938
|
+
'scroll-container': {
|
|
6939
|
+
display: 'flex',
|
|
6940
|
+
...getInsetJssStyle(),
|
|
6941
|
+
height: '100%',
|
|
6942
|
+
overflowY: 'inherit',
|
|
6943
|
+
alignItems: 'center',
|
|
6944
|
+
justifyContent: 'center',
|
|
6945
|
+
flexWrap: 'wrap',
|
|
6946
|
+
},
|
|
6967
6947
|
root: mergeDeep({
|
|
6968
|
-
color: primaryColor,
|
|
6948
|
+
color: primaryColor, // enables color inheritance for slotted content
|
|
6969
6949
|
position: 'relative',
|
|
6970
6950
|
boxSizing: 'border-box',
|
|
6971
6951
|
transform: isOpen ? 'translateY(0%)' : 'translateY(25%)',
|
|
6972
6952
|
opacity: isOpen ? 1 : 0,
|
|
6973
6953
|
transition: `${getTransition('opacity', duration, easing)}, ${getTransition('transform', duration, easing)}`,
|
|
6974
|
-
paddingTop: hasDismissButton ? pxToRemWithUnit(32) : contentPadding,
|
|
6954
|
+
paddingTop: hasDismissButton ? pxToRemWithUnit(32) : contentPadding, // rem value needed to prevent overlapping of close button and contents in scaling mode
|
|
6975
6955
|
...(!hasFooter && { paddingBottom: contentPadding }),
|
|
6976
6956
|
background: backgroundColor,
|
|
6977
6957
|
outline: isHighContrastMode ? '1px solid transparent' : 0,
|
|
@@ -6980,7 +6960,7 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6980
6960
|
content: '""',
|
|
6981
6961
|
position: 'fixed',
|
|
6982
6962
|
border: `${borderWidthBase} solid`,
|
|
6983
|
-
pointerEvents: 'none',
|
|
6963
|
+
pointerEvents: 'none', // fix text selection in focus state
|
|
6984
6964
|
...buildResponsiveStyles(isFullscreen, (fullscreenValue) => ({
|
|
6985
6965
|
borderRadius: fullscreenValue ? 0 : '12px',
|
|
6986
6966
|
borderColor: fullscreenValue ? primaryColor : darkThemePrimaryColor,
|
|
@@ -7009,7 +6989,7 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
7009
6989
|
}),
|
|
7010
6990
|
content: {
|
|
7011
6991
|
...(hasFooter && {
|
|
7012
|
-
position: 'relative',
|
|
6992
|
+
position: 'relative', // to make sure content isn't above sticky footer, but might affect consumer's absolute positioning
|
|
7013
6993
|
zIndex: 0,
|
|
7014
6994
|
}),
|
|
7015
6995
|
padding: `0 ${contentPadding}`,
|
|
@@ -7028,7 +7008,7 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
7028
7008
|
},
|
|
7029
7009
|
[footerShadowClass]: {
|
|
7030
7010
|
boxShadow: `${isThemeDark(theme) ? scrollShadowColorDark : scrollShadowColor} 0 -5px 10px`,
|
|
7031
|
-
clipPath: 'inset(-20px 0 0 0)',
|
|
7011
|
+
clipPath: 'inset(-20px 0 0 0)', // crop leaking box-shadow on left and right side
|
|
7032
7012
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7033
7013
|
boxShadow: `${scrollShadowColorDark} 0 -5px 10px`,
|
|
7034
7014
|
}),
|
|
@@ -7042,9 +7022,10 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
7042
7022
|
left: '8px',
|
|
7043
7023
|
display: 'flex',
|
|
7044
7024
|
justifyContent: 'flex-end',
|
|
7025
|
+
zIndex: 1, // To assure controls are on top when using stretchToFullModalWidthClassName and transformed slotted content
|
|
7045
7026
|
},
|
|
7046
7027
|
dismiss: {
|
|
7047
|
-
border: `2px solid ${backgroundColor}`,
|
|
7028
|
+
border: `2px solid ${backgroundColor}`, // needed to enlarge button slightly without affecting the hover area (are equal now).
|
|
7048
7029
|
borderRadius: '4px',
|
|
7049
7030
|
background: backgroundColor,
|
|
7050
7031
|
...hoverMediaQuery({
|
|
@@ -7106,7 +7087,7 @@ const getComponentCss$z = (size, color, theme) => {
|
|
|
7106
7087
|
display: 'block',
|
|
7107
7088
|
maxWidth: '100%',
|
|
7108
7089
|
maxHeight: '100%',
|
|
7109
|
-
pointerEvents: 'none',
|
|
7090
|
+
pointerEvents: 'none', // prevents image drag
|
|
7110
7091
|
...(!isColorInherit && {
|
|
7111
7092
|
filter: colorToFilterMap[theme][color],
|
|
7112
7093
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -7132,7 +7113,7 @@ const getComponentCss$y = (theme) => {
|
|
|
7132
7113
|
return getCss({
|
|
7133
7114
|
'@global': {
|
|
7134
7115
|
':host': addImportantToEachRule({
|
|
7135
|
-
scrollMarginTop: spacingStaticSmall,
|
|
7116
|
+
scrollMarginTop: spacingStaticSmall, // Creates top margin when navigating with keyboard and list is scrolled automatically
|
|
7136
7117
|
...hostHiddenStyles,
|
|
7137
7118
|
}),
|
|
7138
7119
|
},
|
|
@@ -7225,16 +7206,16 @@ const getSlottedTextFieldTextareaSelectStyles = (child, state, isLoading, theme,
|
|
|
7225
7206
|
: 'auto',
|
|
7226
7207
|
margin: 0,
|
|
7227
7208
|
outline: 0,
|
|
7228
|
-
WebkitAppearance: 'none',
|
|
7209
|
+
WebkitAppearance: 'none', // iOS safari
|
|
7229
7210
|
appearance: 'none',
|
|
7230
7211
|
boxSizing: 'border-box',
|
|
7231
7212
|
border: `${borderWidthBase} solid ${formStateColor || contrastMediumColor}`,
|
|
7232
7213
|
borderRadius: borderRadiusSmall,
|
|
7233
7214
|
background: 'transparent',
|
|
7234
|
-
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
7215
|
+
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
|
|
7235
7216
|
textIndent: 0,
|
|
7236
7217
|
color: primaryColor,
|
|
7237
|
-
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
7218
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transitions between e.g. disabled states
|
|
7238
7219
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7239
7220
|
borderColor: formStateColorDark || contrastMediumColorDark,
|
|
7240
7221
|
color: primaryColorDark,
|
|
@@ -7357,7 +7338,7 @@ const getComponentCss$x = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
7357
7338
|
placeSelf: 'center',
|
|
7358
7339
|
padding: formButtonOrIconPadding,
|
|
7359
7340
|
pointerEvents: 'none',
|
|
7360
|
-
transform: 'rotate3d(0,0,1,0.0001deg)',
|
|
7341
|
+
transform: 'rotate3d(0,0,1,0.0001deg)', // needs to be a little more than 0 for correct direction in safari
|
|
7361
7342
|
transition: getTransition('transform'),
|
|
7362
7343
|
'&--rotate': {
|
|
7363
7344
|
transform: 'rotate3d(0,0,1,180deg)',
|
|
@@ -7400,26 +7381,26 @@ const getInputStyles = (isDisabled, direction, isOpen, state, theme) => {
|
|
|
7400
7381
|
flex: 1,
|
|
7401
7382
|
minWidth: 0,
|
|
7402
7383
|
// TODO: abstract and re-use for multi-select, select-wrapper and text-field-wrapper
|
|
7403
|
-
height: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`,
|
|
7404
|
-
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
7405
|
-
margin: 0,
|
|
7384
|
+
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
|
|
7385
|
+
font: textSmallStyle.font.replace('ex', 'ex + 6px'), // a minimum line-height is needed for input, otherwise value is scrollable in Chrome, +6px is alig
|
|
7386
|
+
margin: 0, // necessary reset for iOS Safari 15 (and maybe other browsers)
|
|
7406
7387
|
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
7407
7388
|
paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(2),
|
|
7408
7389
|
boxSizing: 'border-box',
|
|
7409
7390
|
outline: 0,
|
|
7410
|
-
WebkitAppearance: 'none',
|
|
7391
|
+
WebkitAppearance: 'none', // iOS safari
|
|
7411
7392
|
appearance: 'none',
|
|
7412
7393
|
...textSmallStyle,
|
|
7413
7394
|
textOverflow: 'ellipsis',
|
|
7414
7395
|
'&:disabled': {
|
|
7415
7396
|
cursor: 'not-allowed',
|
|
7416
7397
|
},
|
|
7417
|
-
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
7398
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transitions between e.g. disabled states
|
|
7418
7399
|
color: primaryColor,
|
|
7419
7400
|
'&:not(:focus)': {
|
|
7420
7401
|
...getPlaceholderJssStyle({ color: primaryColor, opacity: 1 }),
|
|
7421
7402
|
...prefersColorSchemeDarkMediaQuery(theme, getPlaceholderJssStyle({ color: primaryColorDark, opacity: 1 })),
|
|
7422
|
-
},
|
|
7403
|
+
}, // Opacity fixes placeholder being shown lighter in firefox
|
|
7423
7404
|
...hoverMediaQuery({
|
|
7424
7405
|
'&:hover:not(:disabled):not(:focus),label:hover~.wrapper &:not(:disabled):not(:focus)': {
|
|
7425
7406
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
@@ -7440,7 +7421,7 @@ const getInputStyles = (isDisabled, direction, isOpen, state, theme) => {
|
|
|
7440
7421
|
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
7441
7422
|
borderRadius: borderRadiusSmall,
|
|
7442
7423
|
...(isOpen && {
|
|
7443
|
-
[isDirectionDown ? 'paddingBottom' : 'paddingTop']: `calc(${formElementPaddingVertical} + 1px)`,
|
|
7424
|
+
[isDirectionDown ? 'paddingBottom' : 'paddingTop']: `calc(${formElementPaddingVertical} + 1px)`, // Add padding to keep same height when border changes
|
|
7444
7425
|
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColor}`),
|
|
7445
7426
|
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
7446
7427
|
[isDirectionDown ? 'borderBottomRightRadius' : 'borderTopRightRadius']: 0,
|
|
@@ -7485,7 +7466,7 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
7485
7466
|
right: 0,
|
|
7486
7467
|
[isDirectionDown ? 'top' : 'bottom']: '100%',
|
|
7487
7468
|
boxSizing: 'border-box',
|
|
7488
|
-
maxHeight: `${8.5 * (MULTI_SELECT_OPTION_HEIGHT + 8) + 6 + 2}px`,
|
|
7469
|
+
maxHeight: `${8.5 * (MULTI_SELECT_OPTION_HEIGHT + 8) + 6 + 2}px`, // 8.5 options * option height + 8px gap + additional spacing (6px = padding, 2px = border)
|
|
7489
7470
|
overflowY: 'auto',
|
|
7490
7471
|
WebkitOverflowScrolling: 'touch',
|
|
7491
7472
|
background: backgroundColor,
|
|
@@ -7494,10 +7475,10 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
7494
7475
|
borderRadius: borderRadiusSmall,
|
|
7495
7476
|
[isDirectionDown ? 'borderTopLeftRadius' : 'borderBottomLeftRadius']: 0,
|
|
7496
7477
|
[isDirectionDown ? 'borderTopRightRadius' : 'borderBottomRightRadius']: 0,
|
|
7497
|
-
scrollbarWidth: 'thin',
|
|
7498
|
-
scrollbarColor: 'auto',
|
|
7478
|
+
scrollbarWidth: 'thin', // firefox
|
|
7479
|
+
scrollbarColor: 'auto', // firefox
|
|
7499
7480
|
transition: getTransition('border-color'),
|
|
7500
|
-
transform: 'translate3d(0,0,0)',
|
|
7481
|
+
transform: 'translate3d(0,0,0)', // fix iOS bug if less than 5 items are displayed
|
|
7501
7482
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7502
7483
|
background: backgroundColorDark,
|
|
7503
7484
|
borderColor: primaryColorDark,
|
|
@@ -7586,7 +7567,7 @@ const getComponentCss$w = (activePage, pageTotal, showLastPage, theme) => {
|
|
|
7586
7567
|
display: 'flex',
|
|
7587
7568
|
justifyContent: 'center',
|
|
7588
7569
|
alignItems: 'center',
|
|
7589
|
-
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
7570
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transition between states
|
|
7590
7571
|
position: 'relative',
|
|
7591
7572
|
width: buttonSize,
|
|
7592
7573
|
height: buttonSize,
|
|
@@ -7597,7 +7578,7 @@ const getComponentCss$w = (activePage, pageTotal, showLastPage, theme) => {
|
|
|
7597
7578
|
color: primaryColor,
|
|
7598
7579
|
outline: 0,
|
|
7599
7580
|
borderRadius: borderRadiusSmall,
|
|
7600
|
-
borderColor: 'transparent',
|
|
7581
|
+
borderColor: 'transparent', // default value is needed for smooth transition
|
|
7601
7582
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7602
7583
|
color: primaryColorDark,
|
|
7603
7584
|
}),
|
|
@@ -7676,12 +7657,21 @@ const getComponentCss$v = (hideLabel, state, isDisabled, isLoading, isWithinForm
|
|
|
7676
7657
|
}),
|
|
7677
7658
|
// TODO: move into getSlottedTextFieldTextareaSelectStyles() via parameter, e.g. isLoading
|
|
7678
7659
|
...(isLoading && {
|
|
7679
|
-
opacity: 0.2,
|
|
7660
|
+
opacity: 0.2, // TODO: not in sync with e.g. checkbox/radio-button loading style
|
|
7680
7661
|
cursor: 'not-allowed',
|
|
7681
7662
|
}),
|
|
7682
|
-
|
|
7663
|
+
// since @playwright/test@1.40.1 this does not work anymore in Webkit browser engine for unknown reasons
|
|
7664
|
+
/* ...Object.fromEntries(
|
|
7665
|
+
Array.from(Array(length)).map((_, i) => {
|
|
7683
7666
|
return [`&:nth-of-type(${i + 1})`, { gridArea: `1/${i + 1}` }];
|
|
7684
|
-
|
|
7667
|
+
})
|
|
7668
|
+
),*/
|
|
7669
|
+
'&:nth-of-type(1)': { gridArea: '1/1' },
|
|
7670
|
+
'&:nth-of-type(2)': { gridArea: '1/2' },
|
|
7671
|
+
'&:nth-of-type(3)': { gridArea: '1/3' },
|
|
7672
|
+
'&:nth-of-type(4)': { gridArea: '1/4' },
|
|
7673
|
+
'&:nth-of-type(5)': { gridArea: '1/5' },
|
|
7674
|
+
'&:nth-of-type(6)': { gridArea: '1/6' },
|
|
7685
7675
|
})));
|
|
7686
7676
|
return getCss({
|
|
7687
7677
|
'@global': {
|
|
@@ -7710,12 +7700,13 @@ const getComponentCss$v = (hideLabel, state, isDisabled, isLoading, isWithinForm
|
|
|
7710
7700
|
},
|
|
7711
7701
|
wrapper: {
|
|
7712
7702
|
display: 'grid',
|
|
7703
|
+
gridTemplateColumns: `repeat(${length}, minmax(0, 1fr))`,
|
|
7713
7704
|
justifySelf: 'flex-start',
|
|
7714
7705
|
gap: spacingStaticSmall,
|
|
7715
7706
|
},
|
|
7716
7707
|
...(isLoading && {
|
|
7717
7708
|
spinner: {
|
|
7718
|
-
gridArea:
|
|
7709
|
+
gridArea: '1/1/1/-1',
|
|
7719
7710
|
placeSelf: 'center',
|
|
7720
7711
|
width: inputSize,
|
|
7721
7712
|
height: inputSize,
|
|
@@ -7850,7 +7841,7 @@ const getComponentCss$u = (direction, isNative, theme) => {
|
|
|
7850
7841
|
button: {
|
|
7851
7842
|
display: 'block',
|
|
7852
7843
|
position: 'relative',
|
|
7853
|
-
WebkitAppearance: 'none',
|
|
7844
|
+
WebkitAppearance: 'none', // iOS safari
|
|
7854
7845
|
appearance: 'none',
|
|
7855
7846
|
background: 'transparent',
|
|
7856
7847
|
border: 0,
|
|
@@ -7858,8 +7849,8 @@ const getComponentCss$u = (direction, isNative, theme) => {
|
|
|
7858
7849
|
outline: 0,
|
|
7859
7850
|
cursor: 'pointer',
|
|
7860
7851
|
...textSmallStyle,
|
|
7861
|
-
width: fontLineHeight,
|
|
7862
|
-
height: fontLineHeight,
|
|
7852
|
+
width: fontLineHeight, // width needed to improve ssr support
|
|
7853
|
+
height: fontLineHeight, // height needed to improve ssr support
|
|
7863
7854
|
borderRadius: '50%',
|
|
7864
7855
|
...hoverMediaQuery({
|
|
7865
7856
|
transition: getTransition('background-color'),
|
|
@@ -7891,7 +7882,6 @@ const getComponentCss$u = (direction, isNative, theme) => {
|
|
|
7891
7882
|
},
|
|
7892
7883
|
label: getHiddenTextJssStyle(),
|
|
7893
7884
|
icon: {
|
|
7894
|
-
display: 'inline-block',
|
|
7895
7885
|
transform: 'translate3d(0,0,0)', // Fixes movement on hover in Safari
|
|
7896
7886
|
},
|
|
7897
7887
|
spacer: {
|
|
@@ -7907,7 +7897,7 @@ const getComponentCss$u = (direction, isNative, theme) => {
|
|
|
7907
7897
|
position: 'absolute',
|
|
7908
7898
|
zIndex: POPOVER_Z_INDEX,
|
|
7909
7899
|
filter: `drop-shadow(0 0 16px ${shadowColor})`,
|
|
7910
|
-
backdropFilter: 'drop-shadow(0px 0px 0px transparent)',
|
|
7900
|
+
backdropFilter: 'drop-shadow(0px 0px 0px transparent)', // fixes issues with Chrome >= 105 where filter: drop-shadow is not applied correctly after animation ends
|
|
7911
7901
|
pointerEvents: 'none',
|
|
7912
7902
|
animation: `${motionDurationShort} $fadeIn ${motionEasingBase} forwards`
|
|
7913
7903
|
,
|
|
@@ -8005,7 +7995,7 @@ const getComponentCss$t = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
8005
7995
|
wrapper: {
|
|
8006
7996
|
display: 'grid',
|
|
8007
7997
|
gridArea: '1/1',
|
|
8008
|
-
alignSelf: 'flex-start',
|
|
7998
|
+
alignSelf: 'flex-start', // in case label becomes multiline
|
|
8009
7999
|
...(isDisabledOrLoading(isDisabled, isLoading) && {
|
|
8010
8000
|
// TODO: maybe .wrapper should handle it for all form components while pointer-events: none is set to input
|
|
8011
8001
|
cursor: 'not-allowed',
|
|
@@ -8014,12 +8004,12 @@ const getComponentCss$t = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
8014
8004
|
...(isLoading && {
|
|
8015
8005
|
// TODO: extract for checkbox-wrapper and radio-button-wrapper (not gridArea and placeSelf)
|
|
8016
8006
|
spinner: {
|
|
8017
|
-
position: 'relative',
|
|
8007
|
+
position: 'relative', // ensure correct stacking, can be removed as soon as focus for input is handled with outline
|
|
8018
8008
|
gridArea: '1/1',
|
|
8019
8009
|
placeSelf: 'center',
|
|
8020
8010
|
width: fontLineHeight,
|
|
8021
8011
|
height: fontLineHeight,
|
|
8022
|
-
font: `${fontSizeTextSmall} ${fontFamily}`,
|
|
8012
|
+
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
8023
8013
|
pointerEvents: 'none',
|
|
8024
8014
|
},
|
|
8025
8015
|
}),
|
|
@@ -8027,7 +8017,7 @@ const getComponentCss$t = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
8027
8017
|
...getFunctionalComponentLabelStyles(isDisabled || isLoading, hideLabel, theme, {
|
|
8028
8018
|
gridArea: '1/2',
|
|
8029
8019
|
}, {
|
|
8030
|
-
paddingTop: '2px',
|
|
8020
|
+
paddingTop: '2px', // compensate vertical alignment
|
|
8031
8021
|
paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent not clickable area between label and input
|
|
8032
8022
|
}),
|
|
8033
8023
|
// .message
|
|
@@ -8187,38 +8177,43 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
8187
8177
|
},
|
|
8188
8178
|
'action-prev': {
|
|
8189
8179
|
...actionPrevNextStyles,
|
|
8190
|
-
left: '-1px',
|
|
8180
|
+
left: '-1px', // ensures that the gradient always overlays the content (e.g. when zoomed)
|
|
8191
8181
|
justifyContent: 'flex-start',
|
|
8192
8182
|
background: `linear-gradient(to right, ${getGradient(theme, gradientColor)} 100%)`,
|
|
8193
8183
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8194
8184
|
background: `linear-gradient(to right, ${getGradient('dark', gradientColor)} 100%)`,
|
|
8195
8185
|
}),
|
|
8196
|
-
visibility: isPrevHidden ? 'hidden' : '
|
|
8186
|
+
visibility: isPrevHidden ? 'hidden' : 'inherit',
|
|
8197
8187
|
'& button': {
|
|
8198
8188
|
marginLeft: '8px',
|
|
8199
8189
|
// hide buttons on mobile (actually devices not supporting hover)
|
|
8200
8190
|
...hoverMediaQuery({
|
|
8201
|
-
visibility: isPrevHidden ? 'hidden' : '
|
|
8191
|
+
visibility: isPrevHidden ? 'hidden' : 'inherit',
|
|
8202
8192
|
}),
|
|
8203
8193
|
},
|
|
8204
8194
|
},
|
|
8205
8195
|
'action-next': {
|
|
8206
8196
|
...actionPrevNextStyles,
|
|
8207
|
-
right: '-1px',
|
|
8197
|
+
right: '-1px', // ensures that the gradient always overlays the content (e.g. when zoomed)
|
|
8208
8198
|
justifyContent: 'flex-end',
|
|
8209
8199
|
background: `linear-gradient(to left, ${getGradient(theme, gradientColor)} 100%)`,
|
|
8210
8200
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8211
8201
|
background: `linear-gradient(to left, ${getGradient('dark', gradientColor)} 100%)`,
|
|
8212
8202
|
}),
|
|
8213
|
-
visibility: isNextHidden ? 'hidden' : '
|
|
8203
|
+
visibility: isNextHidden ? 'hidden' : 'inherit',
|
|
8214
8204
|
'& button': {
|
|
8215
8205
|
marginRight: '8px',
|
|
8216
8206
|
// hide buttons on mobile (actually devices not supporting hover)
|
|
8217
8207
|
...hoverMediaQuery({
|
|
8218
|
-
visibility: isNextHidden ? 'hidden' : '
|
|
8208
|
+
visibility: isNextHidden ? 'hidden' : 'inherit',
|
|
8219
8209
|
}),
|
|
8220
8210
|
},
|
|
8221
8211
|
},
|
|
8212
|
+
icon: {
|
|
8213
|
+
'&:dir(rtl)': {
|
|
8214
|
+
transform: 'scaleX(-1)',
|
|
8215
|
+
},
|
|
8216
|
+
},
|
|
8222
8217
|
});
|
|
8223
8218
|
};
|
|
8224
8219
|
|
|
@@ -8257,7 +8252,7 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
8257
8252
|
height: '100%',
|
|
8258
8253
|
width: '100%',
|
|
8259
8254
|
padding: getItemPadding(hasIcon && hasSlottedContent),
|
|
8260
|
-
margin: 0,
|
|
8255
|
+
margin: 0, // Removes default button margin on safari 15
|
|
8261
8256
|
border: `${borderWidthBase} solid ${borderColor}`,
|
|
8262
8257
|
borderRadius: borderRadiusSmall,
|
|
8263
8258
|
outline: 0,
|
|
@@ -8334,7 +8329,7 @@ const getComponentCss$q = (maxWidth, columns) => {
|
|
|
8334
8329
|
':host': {
|
|
8335
8330
|
display: 'grid',
|
|
8336
8331
|
...addImportantToEachRule({
|
|
8337
|
-
gridAutoRows: '1fr',
|
|
8332
|
+
gridAutoRows: '1fr', // for equal height
|
|
8338
8333
|
...buildResponsiveStyles(columns, (col) => ({
|
|
8339
8334
|
gridTemplateColumns: col === 'auto' ? `repeat(auto-fit, ${maxWidth}px)` : `repeat(${col}, minmax(0, 1fr))`,
|
|
8340
8335
|
})),
|
|
@@ -8360,16 +8355,16 @@ const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
|
8360
8355
|
button: {
|
|
8361
8356
|
position: 'absolute',
|
|
8362
8357
|
...getInsetJssStyle(),
|
|
8363
|
-
width: '100%',
|
|
8364
|
-
height: '100%',
|
|
8358
|
+
width: '100%', // fixes Firefox positioning issue
|
|
8359
|
+
height: '100%', // fixes Firefox positioning issue
|
|
8365
8360
|
margin: 0,
|
|
8366
8361
|
padding: 0,
|
|
8367
8362
|
background: 'transparent',
|
|
8368
|
-
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
8363
|
+
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`, // using border of styled select below for label:hover selector
|
|
8369
8364
|
borderRadius: borderRadiusSmall,
|
|
8370
8365
|
outline: '0',
|
|
8371
8366
|
cursor: 'pointer',
|
|
8372
|
-
transition: getTransition('border-color'),
|
|
8367
|
+
transition: getTransition('border-color'), // background and text color are handled on select
|
|
8373
8368
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8374
8369
|
borderColor: isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark,
|
|
8375
8370
|
}),
|
|
@@ -8421,23 +8416,23 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
8421
8416
|
input: {
|
|
8422
8417
|
display: 'block',
|
|
8423
8418
|
position: 'absolute',
|
|
8424
|
-
...getInsetJssStyle(2),
|
|
8425
|
-
width: 'calc(100% - 4px)',
|
|
8426
|
-
height: 'calc(100% - 4px)',
|
|
8419
|
+
...getInsetJssStyle(2), // 2 = borderWidthBase
|
|
8420
|
+
width: 'calc(100% - 4px)', // fixes Firefox positioning issue, 4px = 2 x borderWidthBase
|
|
8421
|
+
height: 'calc(100% - 4px)', // fixes Firefox positioning issue, 4px = 2 x borderWidthBase
|
|
8427
8422
|
zIndex: 1,
|
|
8428
|
-
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
8429
|
-
margin: 0,
|
|
8423
|
+
font: textSmallStyle.font.replace('ex', 'ex + 6px'), // a minimum line-height is needed for input, otherwise value is scrollable in Chrome, +6px is alig
|
|
8424
|
+
margin: 0, // necessary reset for iOS Safari 15 (and maybe other browsers)
|
|
8430
8425
|
// TODO: could be done with css subgrid much more elegant in the near future
|
|
8431
8426
|
// or move input into select-wrapper and handle it the same like multi-select
|
|
8432
8427
|
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
8433
8428
|
paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(1),
|
|
8434
8429
|
outline: '0',
|
|
8435
|
-
WebkitAppearance: 'none',
|
|
8430
|
+
WebkitAppearance: 'none', // iOS safari
|
|
8436
8431
|
appearance: 'none',
|
|
8437
8432
|
boxSizing: 'border-box',
|
|
8438
|
-
border: '0',
|
|
8439
|
-
borderRadius: borderRadiusSmall,
|
|
8440
|
-
opacity: 0,
|
|
8433
|
+
border: '0', // done via span
|
|
8434
|
+
borderRadius: borderRadiusSmall, // for white corners
|
|
8435
|
+
opacity: 0, // is used to overlay input on focus
|
|
8441
8436
|
...textSmallStyle,
|
|
8442
8437
|
textIndent: 0,
|
|
8443
8438
|
cursor: disabled ? 'not-allowed' : 'text',
|
|
@@ -8460,7 +8455,7 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
8460
8455
|
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
8461
8456
|
},
|
|
8462
8457
|
'&:not(:disabled):focus': {
|
|
8463
|
-
opacity: 1,
|
|
8458
|
+
opacity: 1, // to display value while typing
|
|
8464
8459
|
'&+span, &~ ul': {
|
|
8465
8460
|
borderColor: primaryColor,
|
|
8466
8461
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -8519,7 +8514,7 @@ const getListStyles = (direction, theme) => {
|
|
|
8519
8514
|
display: 'flex',
|
|
8520
8515
|
flexDirection: 'column',
|
|
8521
8516
|
gap: spacingStaticSmall,
|
|
8522
|
-
position: `var(${dropdownPositionVar}, absolute)`,
|
|
8517
|
+
position: `var(${dropdownPositionVar}, absolute)`, // for vrt tests
|
|
8523
8518
|
padding: '6px',
|
|
8524
8519
|
margin: 0,
|
|
8525
8520
|
background: backgroundColor,
|
|
@@ -8528,9 +8523,9 @@ const getListStyles = (direction, theme) => {
|
|
|
8528
8523
|
zIndex: 10,
|
|
8529
8524
|
left: 0,
|
|
8530
8525
|
right: 0,
|
|
8531
|
-
[isDirectionDown ? 'top' : 'bottom']: 'calc(100% - 2px)',
|
|
8526
|
+
[isDirectionDown ? 'top' : 'bottom']: 'calc(100% - 2px)', // 2px border + 2px safety for rounded corners
|
|
8532
8527
|
boxSizing: 'border-box',
|
|
8533
|
-
maxHeight: `${8.5 * (OPTION_HEIGHT + 8) + 6 + 2}px`,
|
|
8528
|
+
maxHeight: `${8.5 * (OPTION_HEIGHT + 8) + 6 + 2}px`, // 8px = gap, 6px = padding, 2px = border
|
|
8534
8529
|
overflowY: 'auto',
|
|
8535
8530
|
WebkitOverflowScrolling: 'touch',
|
|
8536
8531
|
scrollBehavior: 'smooth',
|
|
@@ -8539,10 +8534,10 @@ const getListStyles = (direction, theme) => {
|
|
|
8539
8534
|
...(isDirectionDown
|
|
8540
8535
|
? ['borderBottomLeftRadius', 'borderBottomRightRadius']
|
|
8541
8536
|
: ['borderTopLeftRadius', 'borderTopRightRadius']).reduce((result, curr) => ({ ...result, [curr]: borderRadiusSmall }), {}),
|
|
8542
|
-
scrollbarWidth: 'thin',
|
|
8543
|
-
scrollbarColor: 'auto',
|
|
8537
|
+
scrollbarWidth: 'thin', // firefox
|
|
8538
|
+
scrollbarColor: 'auto', // firefox
|
|
8544
8539
|
transition: getTransition('border-color'),
|
|
8545
|
-
transform: 'translate3d(0,0,0)',
|
|
8540
|
+
transform: 'translate3d(0,0,0)', // fix iOS bug if less than 5 items are displayed
|
|
8546
8541
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8547
8542
|
color: contrastHighColorDark,
|
|
8548
8543
|
background: backgroundColorDark,
|
|
@@ -8646,7 +8641,7 @@ const getComponentCss$p = (direction, isOpen, state, disabled, filter, isNativeP
|
|
|
8646
8641
|
margin: 0,
|
|
8647
8642
|
overflow: 'initial',
|
|
8648
8643
|
height: 'auto',
|
|
8649
|
-
maxHeight: `${8.5 * (OPTION_HEIGHT + 8) + 6 + 2}px`,
|
|
8644
|
+
maxHeight: `${8.5 * (OPTION_HEIGHT + 8) + 6 + 2}px`, // 8px = gap, 6px = padding, 2px = border
|
|
8650
8645
|
'&:-internal-popover-in-top-layer::backdrop': {
|
|
8651
8646
|
display: 'none',
|
|
8652
8647
|
},
|
|
@@ -8671,7 +8666,7 @@ const getComponentCss$o = (isDisabled, hasCustomDropdown, hideLabel, state, them
|
|
|
8671
8666
|
...addImportantToEachRule(getSlottedTextFieldTextareaSelectStyles('select', state, false, theme, {
|
|
8672
8667
|
gridArea: '1/1/1/-1',
|
|
8673
8668
|
position: 'static',
|
|
8674
|
-
zIndex: 0,
|
|
8669
|
+
zIndex: 0, // TODO: overrides global style.css in e2e and vrts
|
|
8675
8670
|
cursor: 'pointer',
|
|
8676
8671
|
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
8677
8672
|
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
@@ -8693,10 +8688,10 @@ const getComponentCss$o = (isDisabled, hasCustomDropdown, hideLabel, state, them
|
|
|
8693
8688
|
gridArea: '1/2',
|
|
8694
8689
|
placeSelf: 'center',
|
|
8695
8690
|
position: 'relative',
|
|
8696
|
-
zIndex: 2,
|
|
8691
|
+
zIndex: 2, // ensures icon is above input or button of select dropdown
|
|
8697
8692
|
pointerEvents: 'none',
|
|
8698
8693
|
padding: formButtonOrIconPadding,
|
|
8699
|
-
transform: 'rotate3d(0,0,1,0.0001deg)',
|
|
8694
|
+
transform: 'rotate3d(0,0,1,0.0001deg)', // needs to be a little more than 0 for correct direction in safari
|
|
8700
8695
|
transition: getTransition('transform'),
|
|
8701
8696
|
'&--open': {
|
|
8702
8697
|
transform: 'rotate3d(0,0,1,180deg)',
|
|
@@ -8740,7 +8735,7 @@ const getComponentCss$n = (size, theme) => {
|
|
|
8740
8735
|
}),
|
|
8741
8736
|
},
|
|
8742
8737
|
svg: {
|
|
8743
|
-
display: 'block',
|
|
8738
|
+
display: 'block', // for correct vertical alignment
|
|
8744
8739
|
fill: 'none',
|
|
8745
8740
|
animation: `$rotate ${animationDuration} steps(50) infinite`,
|
|
8746
8741
|
},
|
|
@@ -8859,7 +8854,7 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
8859
8854
|
gap: '3px',
|
|
8860
8855
|
color: isDisabled ? disabledColor : primaryColor,
|
|
8861
8856
|
padding: '4px 10px 4px 6px',
|
|
8862
|
-
margin: 0,
|
|
8857
|
+
margin: 0, // Removes default button margin on safari 15
|
|
8863
8858
|
background: 0,
|
|
8864
8859
|
border: 0,
|
|
8865
8860
|
outline: 0,
|
|
@@ -8982,11 +8977,11 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
8982
8977
|
display: stretchValue ? 'block' : 'inline-block',
|
|
8983
8978
|
})),
|
|
8984
8979
|
...addImportantToEachRule({
|
|
8985
|
-
outline: 0,
|
|
8980
|
+
outline: 0, // custom element is able to delegate the focus
|
|
8986
8981
|
...colorSchemeStyles,
|
|
8987
8982
|
...hostHiddenStyles,
|
|
8988
8983
|
...buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
8989
|
-
width: stretchValue ? '100%' : 'auto',
|
|
8984
|
+
width: stretchValue ? '100%' : 'auto', // prevents adjusting its size when used as flex or grid child
|
|
8990
8985
|
...(!stretchValue && { verticalAlign: 'top' }),
|
|
8991
8986
|
})),
|
|
8992
8987
|
}),
|
|
@@ -8998,12 +8993,12 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
8998
8993
|
gap: spacingStaticSmall,
|
|
8999
8994
|
width: '100%',
|
|
9000
8995
|
padding: 0,
|
|
9001
|
-
margin: 0,
|
|
8996
|
+
margin: 0, // Removes default button margin on safari 15
|
|
9002
8997
|
outline: 0,
|
|
9003
8998
|
border: 0,
|
|
9004
8999
|
textAlign: 'start',
|
|
9005
9000
|
background: 'transparent',
|
|
9006
|
-
WebkitAppearance: 'none',
|
|
9001
|
+
WebkitAppearance: 'none', // iOS safari
|
|
9007
9002
|
appearance: 'none',
|
|
9008
9003
|
cursor: isDisabledOrLoading(disabled, loading) ? 'auto' : 'pointer',
|
|
9009
9004
|
...buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
@@ -9082,8 +9077,8 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
9082
9077
|
}),
|
|
9083
9078
|
label: {
|
|
9084
9079
|
...textSmallStyle,
|
|
9085
|
-
minWidth: 0,
|
|
9086
|
-
minHeight: 0,
|
|
9080
|
+
minWidth: 0, // prevents flex child to overflow max available parent size
|
|
9081
|
+
minHeight: 0, // prevents flex child to overflow max available parent size
|
|
9087
9082
|
color: textColor,
|
|
9088
9083
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9089
9084
|
color: textColorDark,
|
|
@@ -9204,13 +9199,13 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
|
9204
9199
|
display: 'flex',
|
|
9205
9200
|
gap: spacingStaticXSmall,
|
|
9206
9201
|
width: 'auto',
|
|
9207
|
-
margin: 0,
|
|
9202
|
+
margin: 0, // Removes default button margin on safari 15
|
|
9208
9203
|
padding: 0,
|
|
9209
9204
|
font: 'inherit',
|
|
9210
9205
|
color: 'inherit',
|
|
9211
9206
|
outline: 0,
|
|
9212
9207
|
alignItems: 'flex-end',
|
|
9213
|
-
WebkitAppearance: 'none',
|
|
9208
|
+
WebkitAppearance: 'none', // iOS safari
|
|
9214
9209
|
appearance: 'none',
|
|
9215
9210
|
background: 'transparent',
|
|
9216
9211
|
textAlign: 'start',
|
|
@@ -9225,7 +9220,7 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
|
9225
9220
|
right: buttonBeforeOffsetHorizontal,
|
|
9226
9221
|
left: buttonBeforeOffsetHorizontal,
|
|
9227
9222
|
borderRadius: borderRadiusSmall,
|
|
9228
|
-
zIndex: -1,
|
|
9223
|
+
zIndex: -1, // needed so that text behind element is selectable and/or visible
|
|
9229
9224
|
transition: getTransition('background-color'),
|
|
9230
9225
|
},
|
|
9231
9226
|
...hoverMediaQuery({
|
|
@@ -9260,7 +9255,7 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
|
9260
9255
|
transition: getTransition('opacity'),
|
|
9261
9256
|
opacity: active ? 1 : 0,
|
|
9262
9257
|
transform: `rotate3d(0,0,1,${isDirectionAsc(direction) ? 0 : 180}deg)`,
|
|
9263
|
-
transformOrigin: '50% 50%',
|
|
9258
|
+
transformOrigin: '50% 50%', // for iOS
|
|
9264
9259
|
filter: `var(${cssVariableTableHeadCellIconFilter})`,
|
|
9265
9260
|
},
|
|
9266
9261
|
}),
|
|
@@ -9364,7 +9359,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
9364
9359
|
lineHeight: 'inherit',
|
|
9365
9360
|
whiteSpace: 'nowrap',
|
|
9366
9361
|
boxSizing: 'border-box',
|
|
9367
|
-
WebkitAppearance: 'none',
|
|
9362
|
+
WebkitAppearance: 'none', // iOS safari
|
|
9368
9363
|
appearance: 'none',
|
|
9369
9364
|
outlineOffset: '1px',
|
|
9370
9365
|
textDecoration: 'none',
|
|
@@ -9373,7 +9368,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
9373
9368
|
color: primaryColor,
|
|
9374
9369
|
cursor: 'pointer',
|
|
9375
9370
|
borderRadius: borderRadiusSmall,
|
|
9376
|
-
zIndex: 0,
|
|
9371
|
+
zIndex: 0, // needed for ::before pseudo element to be visible
|
|
9377
9372
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9378
9373
|
color: primaryColorDark,
|
|
9379
9374
|
}),
|
|
@@ -9383,7 +9378,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
9383
9378
|
position: 'absolute',
|
|
9384
9379
|
inset: '-2px -4px',
|
|
9385
9380
|
borderRadius: borderRadiusSmall,
|
|
9386
|
-
zIndex: -1,
|
|
9381
|
+
zIndex: -1, // Stack the pseudo-element behind the button to avoid overlay of frosted-glass effect with label text
|
|
9387
9382
|
transition: getTransition('background-color'),
|
|
9388
9383
|
},
|
|
9389
9384
|
}),
|
|
@@ -9407,7 +9402,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
9407
9402
|
...barJssStyle,
|
|
9408
9403
|
right: '0px',
|
|
9409
9404
|
bottom: isHighContrastMode ? '-4px' : '-6px',
|
|
9410
|
-
visibility: '
|
|
9405
|
+
visibility: 'inherit',
|
|
9411
9406
|
},
|
|
9412
9407
|
// TODO: combine link-social-styles with link-button-styles and tabs-bar-styles
|
|
9413
9408
|
[transformSelector('::slotted([role]:focus:focus-visible)::before')]: {
|
|
@@ -9436,9 +9431,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
9436
9431
|
// moving bar
|
|
9437
9432
|
bar: {
|
|
9438
9433
|
...barJssStyle,
|
|
9439
|
-
width: 0,
|
|
9434
|
+
width: 0, // actual width and transform is set via inline css
|
|
9440
9435
|
bottom: isHighContrastMode ? '0' : '-2px',
|
|
9441
|
-
visibility: '
|
|
9436
|
+
visibility: 'inherit',
|
|
9442
9437
|
transition: `${getTransition('transform', 'moderate')}, ${getTransition('width', 'moderate')}`,
|
|
9443
9438
|
animation: `$hide 0s var(${cssVariableAnimationDuration},0.5s) forwards`, // auto hide bar after transition, needs to be a little longer in Safari
|
|
9444
9439
|
},
|
|
@@ -9459,7 +9454,7 @@ const getComponentCss$b = (theme) => {
|
|
|
9459
9454
|
display: 'block',
|
|
9460
9455
|
...addImportantToEachRule({
|
|
9461
9456
|
position: 'relative',
|
|
9462
|
-
color: primaryColor,
|
|
9457
|
+
color: primaryColor, // enables color inheritance for e.g. slotted anchor
|
|
9463
9458
|
outline: 0,
|
|
9464
9459
|
...hostHiddenStyles,
|
|
9465
9460
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -9550,7 +9545,7 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
9550
9545
|
gap: '12px',
|
|
9551
9546
|
minHeight: '54px',
|
|
9552
9547
|
padding: '4px 12px',
|
|
9553
|
-
margin: 0,
|
|
9548
|
+
margin: 0, // Removes default button margin on safari 15
|
|
9554
9549
|
borderRadius: borderRadiusSmall,
|
|
9555
9550
|
border: 0,
|
|
9556
9551
|
cursor: 'pointer',
|
|
@@ -9587,7 +9582,7 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
9587
9582
|
}),
|
|
9588
9583
|
icon: {
|
|
9589
9584
|
padding: '4px',
|
|
9590
|
-
marginInlineEnd: '-2px',
|
|
9585
|
+
marginInlineEnd: '-2px', // compensate white space of svg icon and optimize visual alignment
|
|
9591
9586
|
transition: getTransition('background-color'),
|
|
9592
9587
|
borderRadius: borderRadiusSmall,
|
|
9593
9588
|
},
|
|
@@ -9672,7 +9667,7 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
9672
9667
|
cursor: 'pointer',
|
|
9673
9668
|
font: 'inherit',
|
|
9674
9669
|
color: 'inherit',
|
|
9675
|
-
WebkitAppearance: 'none',
|
|
9670
|
+
WebkitAppearance: 'none', // iOS safari
|
|
9676
9671
|
appearance: 'none',
|
|
9677
9672
|
border: 0,
|
|
9678
9673
|
textAlign: 'start',
|
|
@@ -9688,7 +9683,7 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
9688
9683
|
}),
|
|
9689
9684
|
},
|
|
9690
9685
|
icon: {
|
|
9691
|
-
marginInlineStart: '-2px',
|
|
9686
|
+
marginInlineStart: '-2px', // compensate white space of svg icon and optimize visual alignment
|
|
9692
9687
|
alignSelf: 'flex-start',
|
|
9693
9688
|
...(['neutral-contrast-high', 'primary'].includes(tagColor) && {
|
|
9694
9689
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -9738,8 +9733,8 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
9738
9733
|
...getSlottedTextFieldTextareaSelectStyles('input', state, false, theme, {
|
|
9739
9734
|
gridArea: '1/1/1/-1',
|
|
9740
9735
|
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
9741
|
-
paddingInlineStart: `var(${cssVariableInputPaddingStart})`,
|
|
9742
|
-
paddingInlineEnd: `var(${cssVariableInputPaddingEnd})`,
|
|
9736
|
+
paddingInlineStart: `var(${cssVariableInputPaddingStart})`, // iOS Safari 14.5 can't handle padding-inline shorthand with css variables
|
|
9737
|
+
paddingInlineEnd: `var(${cssVariableInputPaddingEnd})`, // iOS Safari 14.5 can't handle padding-inline shorthand with css variables
|
|
9743
9738
|
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9744
9739
|
...(isNumber && {
|
|
9745
9740
|
MozAppearance: 'textfield', // hides up/down spin button for Firefox
|
|
@@ -9789,8 +9784,7 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
9789
9784
|
},
|
|
9790
9785
|
}),
|
|
9791
9786
|
...(hasUnitOrVisibleCounter && {
|
|
9792
|
-
|
|
9793
|
-
unit: {
|
|
9787
|
+
'unit-counter': {
|
|
9794
9788
|
...getUnitCounterJssStyle(isDisabled, theme),
|
|
9795
9789
|
gridArea: `1/${unitPosition === 'suffix' ? 5 : 1}/1/${unitPosition === 'suffix' ? 7 : 3}`,
|
|
9796
9790
|
placeSelf: 'center',
|
|
@@ -9844,8 +9838,8 @@ const getComponentCss$6 = (type, theme) => {
|
|
|
9844
9838
|
},
|
|
9845
9839
|
// css selector for text-list-item
|
|
9846
9840
|
'::slotted(*)': addImportantToEachRule({
|
|
9847
|
-
[cssVariablePaddingTop]: spacingStaticXSmall,
|
|
9848
|
-
[cssVariablePaddingBottom]: spacingStaticMedium,
|
|
9841
|
+
[cssVariablePaddingTop]: spacingStaticXSmall, // padding top for nested list
|
|
9842
|
+
[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
|
|
9849
9843
|
[cssVariablePseudoSpace]: isOrderedList
|
|
9850
9844
|
? `var(${cssVariableOrderedGridColumn},1.5rem)`
|
|
9851
9845
|
: `var(${cssVariableUnorderedGridColumn},.375rem)`,
|
|
@@ -9872,16 +9866,16 @@ const getComponentCss$5 = () => {
|
|
|
9872
9866
|
...addImportantToEachRule({
|
|
9873
9867
|
gridTemplateColumns: `var(${cssVariablePseudoSpace}) 1fr`,
|
|
9874
9868
|
columnGap: spacingStaticMedium,
|
|
9875
|
-
font: 'inherit',
|
|
9876
|
-
color: 'inherit',
|
|
9869
|
+
font: 'inherit', // ensures style can't be overwritten from outside
|
|
9870
|
+
color: 'inherit', // ensures style can't be overwritten from outside
|
|
9877
9871
|
...hostHiddenStyles,
|
|
9878
9872
|
}),
|
|
9879
9873
|
},
|
|
9880
9874
|
...addImportantToEachRule({
|
|
9881
9875
|
'::slotted(*)': {
|
|
9882
|
-
[cssVariableUnorderedGridColumn]: '.625rem',
|
|
9883
|
-
[cssVariableUnorderedPseudoContent]: '"–"',
|
|
9884
|
-
[cssVariableOrderedGridColumn]: '2rem',
|
|
9876
|
+
[cssVariableUnorderedGridColumn]: '.625rem', // reserves space for ::before (nested unordered list)
|
|
9877
|
+
[cssVariableUnorderedPseudoContent]: '"–"', // custom ::before char "–" (nested unordered list)
|
|
9878
|
+
[cssVariableOrderedGridColumn]: '2rem', // reserves space for ::before (nested ordered list)
|
|
9885
9879
|
[cssVariableOrderedPseudoSuffix]: '""', // don't show ::before suffix "." (nested ordered list)
|
|
9886
9880
|
},
|
|
9887
9881
|
'::slotted(*:last-child)': {
|
|
@@ -9937,7 +9931,7 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
9937
9931
|
...mergeDeep(addImportantToEachRule(getSlottedTextFieldTextareaSelectStyles('textarea', state, false, theme, {
|
|
9938
9932
|
gridArea: '1/1',
|
|
9939
9933
|
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9940
|
-
font: textSmallStyle.font,
|
|
9934
|
+
font: textSmallStyle.font, // to override line-height
|
|
9941
9935
|
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9942
9936
|
padding: hasCounter
|
|
9943
9937
|
? `12px ${formElementPaddingHorizontal} ${spacingStaticLarge}`
|
|
@@ -9945,8 +9939,8 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
9945
9939
|
})), {
|
|
9946
9940
|
// TODO: is it possible to move into getSlottedTextFieldTextareaSelectStyles()?
|
|
9947
9941
|
'::slotted(textarea)': {
|
|
9948
|
-
height: 'auto',
|
|
9949
|
-
minHeight: '200px',
|
|
9942
|
+
height: 'auto', // removes !important from getBaseChildStyles
|
|
9943
|
+
minHeight: '200px', // min-height should be overridable
|
|
9950
9944
|
resize: 'vertical', // overridable, too
|
|
9951
9945
|
},
|
|
9952
9946
|
}),
|
|
@@ -10007,11 +10001,11 @@ const getComponentCss$1 = () => {
|
|
|
10007
10001
|
// In addition, a public css variable can be passed to overwrite the default position.
|
|
10008
10002
|
[cssVariablePositionBottomInternal]: `var(${cssVariablePositionBottom}, 56px)`,
|
|
10009
10003
|
bottom: `var(${cssVariablePositionBottomInternal})`,
|
|
10010
|
-
maxWidth: '42rem',
|
|
10011
10004
|
zIndex: TOAST_Z_INDEX,
|
|
10012
10005
|
[getMediaQueryMin('s')]: {
|
|
10013
10006
|
left: '64px',
|
|
10014
10007
|
right: 'auto',
|
|
10008
|
+
maxWidth: 'min(42rem, calc(100vw - 64px * 2))',
|
|
10015
10009
|
[cssVariablePositionBottomInternal]: `var(${cssVariablePositionBottom}, 64px)`,
|
|
10016
10010
|
bottom: `var(${cssVariablePositionBottomInternal})`,
|
|
10017
10011
|
},
|
|
@@ -10041,7 +10035,7 @@ const getComponentCss = (size, theme) => {
|
|
|
10041
10035
|
outline: 0,
|
|
10042
10036
|
maxWidth: '100%',
|
|
10043
10037
|
maxHeight: '100%',
|
|
10044
|
-
boxSizing: 'content-box',
|
|
10038
|
+
boxSizing: 'content-box', // needed for correct height calculation when padding is set on host (e.g. custom click area)
|
|
10045
10039
|
...(size !== 'inherit' && {
|
|
10046
10040
|
height: 'clamp(0.63rem, 0.42vw + 0.5rem, 1rem)',
|
|
10047
10041
|
// workaround for Safari to optimize image rendering
|