@porsche-design-system/components-react 3.10.0-rc.3 → 3.10.0-rc.4

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