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