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

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