@porsche-design-system/components-react 4.0.0-beta.0 → 4.0.0-beta.1

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 (33) hide show
  1. package/CHANGELOG.md +158 -1
  2. package/cjs/lib/components/accordion.wrapper.cjs +3 -3
  3. package/esm/lib/components/accordion.wrapper.d.ts +29 -13
  4. package/esm/lib/components/accordion.wrapper.mjs +3 -3
  5. package/esm/lib/types.d.ts +116 -102
  6. package/package.json +13 -2
  7. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +407 -186
  8. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1 -1
  9. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.cjs +4 -4
  10. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs +15 -10
  11. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +2 -1
  12. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +1 -1
  13. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +1 -1
  14. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +1 -1
  15. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +1 -1
  16. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +1 -1
  17. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +1 -1
  18. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +2 -1
  19. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +407 -186
  20. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -1
  21. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.mjs +4 -4
  22. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +15 -10
  23. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +2 -1
  24. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +1 -1
  25. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +1 -1
  26. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +1 -1
  27. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +1 -1
  28. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +1 -1
  29. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +1 -1
  30. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +2 -1
  31. package/ssr/esm/lib/components/accordion.wrapper.d.ts +29 -13
  32. package/ssr/esm/lib/dsr-components/accordion.d.ts +8 -2
  33. package/ssr/esm/lib/types.d.ts +116 -102
@@ -12,15 +12,15 @@ const borderWidthBase = '2px';
12
12
  /** @deprecated since v4.0.0, will be removed with next major release. Use 1px instead. */
13
13
  const borderWidthThin = '1px';
14
14
 
15
- const fontPorscheNext = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
15
+ const fontPorscheNext$1 = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
16
16
 
17
17
  /** @deprecated since v4.0.0, will be removed with next major release. Use fontPorscheNext instead. */
18
- const fontFamily = fontPorscheNext;
18
+ const fontFamily = fontPorscheNext$1;
19
19
 
20
- const leadingNormal = 'calc(6px + 2.125ex)';
20
+ const leadingNormal$1 = 'calc(6px + 2.125ex)';
21
21
 
22
22
  /** @deprecated since v4.0.0, will be removed with next major release. Use leadingNormal instead */
23
- const fontLineHeight = leadingNormal;
23
+ const fontLineHeight = leadingNormal$1;
24
24
 
25
25
  const fontSizeDisplayLarge = 'clamp(2.28rem, 5.2vw + 1.24rem, 7.48rem)';
26
26
 
@@ -33,15 +33,15 @@ const typescaleLg = 'clamp(1.27rem, 0.51vw + 1.16rem, 1.78rem)';
33
33
  /** @deprecated since v4.0.0, will be removed with next major release. Use typescaleLg instead. */
34
34
  const fontSizeHeadingLarge = typescaleLg;
35
35
 
36
- const typescaleMd = 'clamp(1.13rem, 0.21vw + 1.08rem, 1.33rem)';
36
+ const typescaleMd$1 = 'clamp(1.13rem, 0.21vw + 1.08rem, 1.33rem)';
37
37
 
38
38
  /** @deprecated since v4.0.0, will be removed with next major release. Use typescaleMd instead. */
39
- const fontSizeHeadingMedium = typescaleMd;
39
+ const fontSizeHeadingMedium = typescaleMd$1;
40
40
 
41
- const typescaleSm = '1rem';
41
+ const typescaleSm$1 = '1rem';
42
42
 
43
43
  /** @deprecated since v4.0.0, will be removed with next major release. Use typescaleSm instead. */
44
- const fontSizeHeadingSmall = typescaleSm;
44
+ const fontSizeHeadingSmall = typescaleSm$1;
45
45
 
46
46
  const typescaleXl = 'clamp(1.42rem, 0.94vw + 1.23rem, 2.37rem)';
47
47
 
@@ -57,10 +57,10 @@ const fontSizeHeadingXXLarge = typescale2Xl;
57
57
  const fontSizeTextLarge = typescaleLg;
58
58
 
59
59
  /** @deprecated since v4.0.0, will be removed with next major release. Use typescaleMd instead. */
60
- const fontSizeTextMedium = typescaleMd;
60
+ const fontSizeTextMedium = typescaleMd$1;
61
61
 
62
62
  /** @deprecated since v4.0.0, will be removed with next major release. Use typescaleSm instead. */
63
- const fontSizeTextSmall = typescaleSm;
63
+ const fontSizeTextSmall = typescaleSm$1;
64
64
 
65
65
  /** @deprecated since v4.0.0, will be removed with next major release. Use typescaleXl instead. */
66
66
  const fontSizeTextXLarge = typescaleXl;
@@ -96,10 +96,10 @@ const fontWeightNormal = 400;
96
96
  /** @deprecated since v4.0.0, will be removed with next major release. Use fontWeightNormal instead. */
97
97
  const fontWeightRegular = fontWeightNormal;
98
98
 
99
- const fontWeightSemibold = 600;
99
+ const fontWeightSemibold$1 = 600;
100
100
 
101
101
  /** @deprecated since v4.0.0, will be removed with next major release. Use fontWeightSemibold instead. */
102
- const fontWeightSemiBold = fontWeightSemibold;
102
+ const fontWeightSemiBold = fontWeightSemibold$1;
103
103
 
104
104
  const fontWeightBold$1 = 700;
105
105
 
@@ -386,7 +386,7 @@ const textMediumStyle = {
386
386
  };
387
387
 
388
388
  const proseTextSmStyle = {
389
- font: `normal normal ${fontWeightNormal} ${typescaleSm} / ${leadingNormal} ${fontPorscheNext}`,
389
+ font: `normal normal ${fontWeightNormal} ${typescaleSm$1} / ${leadingNormal$1} ${fontPorscheNext$1}`,
390
390
  ...fontHyphenationStyle,
391
391
  };
392
392
 
@@ -464,6 +464,20 @@ const colorWarningFrosted = 'var(--p-color-warning-frosted)';
464
464
 
465
465
  const colorWarningFrostedSoft = 'var(--p-color-warning-frosted-soft)';
466
466
 
467
+ const fontPorscheNext = 'var(--p-font-porsche-next)';
468
+
469
+ const leadingNormal = 'var(--p-leading-normal)';
470
+
471
+ const typescaleMd = 'var(--p-typescale-md)';
472
+
473
+ const typescaleSm = 'var(--p-typescale-sm)';
474
+
475
+ const fontWeightSemibold = 'var(--p-font-weight-semibold)';
476
+
477
+ const forcedColorsMediaQuery = (style) => {
478
+ return { '@media (forced-colors: active)': style };
479
+ };
480
+
467
481
  const motionDurationMap = {
468
482
  short: motionDurationShort,
469
483
  moderate: motionDurationModerate,
@@ -501,11 +515,18 @@ const getFocusBaseStyles = () => {
501
515
  return {
502
516
  outline: `${borderWidthBase} solid ${colorFocus}`,
503
517
  outlineOffset: '2px',
518
+ ...forcedColorsMediaQuery({
519
+ outlineColor: 'Highlight',
520
+ }),
504
521
  };
505
522
  };
506
523
  const getDisabledBaseStyles = () => {
507
524
  return {
508
525
  opacity: alphaDisabled,
526
+ ...forcedColorsMediaQuery({
527
+ opacity: 1,
528
+ color: 'GrayText',
529
+ }),
509
530
  };
510
531
  };
511
532
  /**
@@ -3880,7 +3901,7 @@ const OPTION_LIST_SAFE_ZONE = 6;
3880
3901
 
3881
3902
  const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
3882
3903
 
3883
- const prefix = `[Porsche Design System v${"4.0.0-beta.0"}]` // this part isn't covered by unit tests
3904
+ const prefix = `[Porsche Design System v${"4.0.0-beta.1"}]` // this part isn't covered by unit tests
3884
3905
  ;
3885
3906
  const consoleError = (...messages) => {
3886
3907
  console.error(prefix, ...messages);
@@ -3989,130 +4010,195 @@ const breakpointCustomizableTemplate = `value, ${internalValidateProps
3989
4010
  .formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {}))
3990
4011
  .replace(/"/g, '')}`;
3991
4012
 
3992
- const cssVariablePositionStickyTop = '--p-accordion-position-sticky-top';
3993
- const positionStickyTopFallback = '0';
4013
+ const getInlineSVGBackgroundImage = (path) => {
4014
+ return `url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${path}</svg>')`;
4015
+ };
4016
+
4017
+ /**
4018
+ * @css-variable {"name": "--p-accordion-summary-top", "description": "Controls the sticky top position when `sticky` is enabled.", "defaultValue": "0px"}
4019
+ */
4020
+ const cssVarSummaryTop = '--p-accordion-summary-top';
4021
+ const cssVarSummaryTopDeprecated = '--p-accordion-position-sticky-top'; // deprecated
4022
+ /**
4023
+ * @css-variable {"name": "--p-accordion-px", "description": "Horizontal padding of the accordion.", "defaultValue": "16px"}
4024
+ */
4025
+ const cssVarPaddingInline$1 = '--p-accordion-px';
4026
+ /**
4027
+ * @css-variable {"name": "--p-accordion-py", "description": "Vertical padding of the accordion.", "defaultValue": "16px"}
4028
+ */
4029
+ const cssVarPaddingBlock = '--p-accordion-py';
3994
4030
  // CSS Variable defined in fontHyphenationStyle
3995
4031
  /**
3996
4032
  * @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
3997
4033
  */
3998
- const getComponentCss$19 = (size, compact, open, sticky) => {
4034
+ const icon = getInlineSVGBackgroundImage(`<path d="m12 15.125h-.001l-.005-.006-6.494-5.476.642-.768 5.858 4.94 5.858-4.94.642.769-6.497 5.477z"/>`);
4035
+ const backgroundMap = {
4036
+ canvas: colorCanvas,
4037
+ surface: colorSurface,
4038
+ frosted: colorFrosted,
4039
+ none: 'transparent',
4040
+ };
4041
+ // as soon as CSS selector `:has-slotted` works cross-browser we can simplify the styles a lot and remove all the complexity regarding the summary-before and summary-after slots
4042
+ const getComponentCss$19 = (alignMarker, background, isCompact, isOpen, isSticky, hasSummaryBefore, hasSummaryAfter, size) => {
4043
+ const duration = isOpen ? 'moderate' : 'short';
4044
+ const easing = isOpen ? 'in' : 'out';
4045
+ const compactFactor = isCompact ? 0.64285714 : 1;
4046
+ const paddingBlock = `calc(28px * (${compactFactor} - 0.64285714) + 6px)`;
4047
+ const paddingInline = `calc(11.2px * (${compactFactor} - 0.64285714) + 12px)`;
4048
+ const gap = `calc(11.2px * (${compactFactor} - 0.64285714) + 4px)`;
4049
+ const marginTop = `calc(28px * (${compactFactor} - 0.64285714) + 6px)`;
4050
+ const isIconAlignedStart = alignMarker === 'start';
3999
4051
  return getCss({
4000
4052
  '@global': {
4053
+ '@keyframes overflow-hidden': {
4054
+ from: { overflow: 'hidden' },
4055
+ to: { overflow: 'hidden' },
4056
+ },
4001
4057
  ':host': {
4002
4058
  display: 'block',
4003
4059
  ...addImportantToEachRule({
4004
- ...(compact
4005
- ? { transform: 'translate3d(0,0,0)' } // relevant for custom click-area in compact variant
4006
- : {
4007
- borderBottom: `1px solid ${colorContrastLower}`,
4008
- }),
4009
- '&(:only-of-type)': { borderBottom: 0 },
4010
4060
  ...hostHiddenStyles,
4011
4061
  }),
4012
4062
  },
4013
- ...preventFoucOfNestedElementsStyles,
4014
- button: {
4063
+ slot: {
4064
+ '&[name="summary-before"], &[name="summary"], &[name="summary-after"]': {
4065
+ display: 'flex',
4066
+ flexWrap: 'wrap',
4067
+ alignItems: 'center',
4068
+ gap,
4069
+ },
4070
+ '&[name="summary-before"]': {
4071
+ gridArea: `1/${isIconAlignedStart ? '2' : '1'}`,
4072
+ zIndex: 2, // ensures stacking to be above the summary section
4073
+ },
4074
+ '&[name="summary"]': {
4075
+ gridArea: `1/${hasSummaryBefore && isIconAlignedStart ? '3' : hasSummaryBefore || isIconAlignedStart ? '2' : '1'}`,
4076
+ },
4077
+ '&[name="summary-after"]': {
4078
+ gridArea: `1/${hasSummaryBefore && isIconAlignedStart ? '4' : hasSummaryBefore || isIconAlignedStart ? '3' : '2'}`,
4079
+ zIndex: 2, // ensures stacking to be above the summary section
4080
+ },
4081
+ '&:not([name])': {
4082
+ display: 'block',
4083
+ // as soon as all browsers support calc-size(auto) to be transitionable, we can remove the overflow rule and animation
4084
+ overflow: 'hidden',
4085
+ 'details[open] &': {
4086
+ overflow: 'visible',
4087
+ // fix potential overflow issues
4088
+ animation: `overflow-hidden var(${cssVariableTransitionDuration},${motionDurationMap[duration]})`,
4089
+ },
4090
+ },
4091
+ },
4092
+ 'h1,h2,h3,h4,h5,h6': {
4015
4093
  all: 'unset',
4016
- display: 'flex',
4017
- position: 'relative',
4018
- justifyContent: 'space-between',
4019
- alignItems: 'center',
4020
- width: '100%',
4021
- gap: '24px',
4022
- cursor: 'pointer',
4023
- zIndex: 0,
4024
- color: colorPrimary,
4025
- ...textSmallStyle,
4026
- fontWeight: fontWeightSemiBold,
4027
- ...buildResponsiveStyles(size, (s) => ({
4028
- fontSize: s === 'medium' ? fontSizeTextMedium : fontSizeTextSmall,
4029
- padding: `${compact ? '4px' : s === 'medium' ? '20px' : '15px'} 0`,
4094
+ gridArea: `1/${hasSummaryBefore && isIconAlignedStart ? '3' : hasSummaryBefore || isIconAlignedStart ? '2' : '1'}`,
4095
+ font: 'inherit',
4096
+ fontWeight: fontWeightSemibold,
4097
+ ...buildResponsiveStyles(size, (sizeValue) => ({
4098
+ fontSize: sizeValue === 'medium' ? typescaleMd : typescaleSm,
4030
4099
  })),
4031
- // mergeDeep needed because of hoverMediaQuery in certain modes not wrapping keys and therefore overriding "&::before" key
4032
- ...mergeDeep({
4033
- '&::before': {
4034
- content: '""',
4035
- zIndex: -1,
4036
- position: 'absolute',
4037
- borderRadius: `var(${legacyRadiusSmall}, ${radiusSm})`,
4038
- insetInline: '-4px',
4039
- ...(compact
4040
- ? {
4041
- top: '2px',
4042
- bottom: '2px',
4043
- }
4044
- : {
4045
- top: '6px',
4046
- bottom: '6px',
4047
- }),
4048
- },
4049
- }, hoverMediaQuery({
4050
- '&::before': {
4051
- transition: getTransition('background-color'),
4100
+ },
4101
+ details: {
4102
+ all: 'unset',
4103
+ font: `${typescaleSm} / ${leadingNormal} ${fontPorscheNext}`, // enables font inheritance for slotted content
4104
+ color: colorPrimary, // enables color inheritance for slotted content
4105
+ display: 'grid',
4106
+ gridTemplate: `repeat(2, auto) / ${hasSummaryBefore ? 'auto ' : ''}${isIconAlignedStart ? 'auto minmax(0, 1fr)' : 'minmax(0, 1fr) auto'}${hasSummaryAfter ? ' auto ' : ''}`,
4107
+ columnGap: gap,
4108
+ alignItems: 'center',
4109
+ padding: `var(${cssVarPaddingBlock}, ${background === 'none' ? '0' : paddingBlock}) var(${cssVarPaddingInline$1}, ${background === 'none' ? '0' : paddingInline})`,
4110
+ background: backgroundMap[background],
4111
+ ...(background === 'frosted' && frostedGlassStyle),
4112
+ borderRadius: `var(${legacyRadiusSmall}, ${radiusXl})`,
4113
+ ...forcedColorsMediaQuery({
4114
+ outline: '1px solid CanvasText',
4115
+ outlineOffset: background === 'none' ? '0' : '-1px',
4116
+ padding: `var(${cssVarPaddingBlock}, ${paddingBlock}) var(${cssVarPaddingInline$1}, ${paddingInline})`,
4117
+ }),
4118
+ '&::details-content': addImportantToEachRule({
4119
+ display: 'contents', // allows <details> to be used as grid layout
4120
+ contentVisibility: 'visible', // we need to overwrite it to support cross-browser animation, we take care of content-visibility on our own to be a11y compliant
4121
+ }),
4122
+ '& > div': {
4123
+ gridArea: '2/1/auto/-1',
4124
+ zIndex: 0, // ensures stacking to be below the summary section
4125
+ display: 'grid',
4126
+ opacity: 0,
4127
+ marginTop: '0px',
4128
+ gridTemplateRows: '0fr',
4129
+ visibility: 'hidden', // since `::details-content` and `allow-discrete` transition doesn't work in Safari we need to take care ourselves for visibility state to be a11y compliant
4130
+ // as soon as all browsers are supporting `allow-discrete` reliable, visibility transition shouldn't be necessary anymore
4131
+ transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationMap[duration]}), ${getTransition('grid-template-rows', duration, easing)}, ${getTransition('margin-top', duration, easing)}, ${getTransition('opacity', duration, easing)}`,
4132
+ },
4133
+ '&[open]': {
4134
+ '& > div': {
4135
+ opacity: 1,
4136
+ marginTop,
4137
+ // as soon as all browsers support calc-size(auto) to be transitionable, we can remove the grid-template-rows rule and animation
4138
+ gridTemplateRows: '1fr',
4139
+ visibility: 'inherit', // since `::details-content` and `allow-discrete` transition doesn't work in Safari we need to take care ourselves for visibility state to be a11y compliant
4140
+ // as soon as all browsers are supporting `allow-discrete` reliable, visibility transition shouldn't be necessary anymore
4141
+ transition: `visibility 0s linear 0s, ${getTransition('grid-template-rows', duration, easing)}, ${getTransition('margin-top', duration, easing)}, ${getTransition('opacity', duration, easing)}`,
4052
4142
  },
4143
+ },
4144
+ },
4145
+ summary: {
4146
+ all: 'unset',
4147
+ gridArea: '1/1/auto/-1',
4148
+ zIndex: 1, // ensures stacking to be above the details content
4149
+ display: 'grid',
4150
+ gridTemplateColumns: 'subgrid',
4151
+ alignItems: 'center',
4152
+ cursor: 'pointer',
4153
+ padding: `var(${cssVarPaddingBlock}, ${background === 'none' ? '0' : paddingBlock}) var(${cssVarPaddingInline$1}, ${background === 'none' ? '0' : paddingInline})`,
4154
+ margin: `calc(-1 * var(${cssVarPaddingBlock}, ${background === 'none' ? '0' : paddingBlock})) calc(-1 * var(${cssVarPaddingInline$1}, ${background === 'none' ? '0' : paddingInline}))`,
4155
+ ...(isSticky &&
4156
+ (background === 'canvas' || background === 'surface') && {
4157
+ position: 'sticky',
4158
+ top: `var(${cssVarSummaryTop}, var(${cssVarSummaryTopDeprecated}, 0px))`,
4159
+ background: `linear-gradient(180deg,${backgroundMap[background]} 0%,${backgroundMap[background]} 90%,transparent 100%)`,
4160
+ borderRadius: `var(${legacyRadiusSmall}, ${radiusXl})`,
4161
+ }),
4162
+ '&:focus-visible::before': getFocusBaseStyles(),
4163
+ ...hoverMediaQuery({
4053
4164
  '&:hover::before': {
4054
- ...frostedGlassStyle,
4055
- background: colorFrostedSoft,
4165
+ background: colorFrosted,
4056
4166
  },
4057
- })),
4058
- '&:focus-visible::before': getFocusBaseStyles(),
4059
- },
4060
- },
4061
- heading: {
4062
- margin: 0,
4063
- ...(sticky && {
4064
- position: 'sticky',
4065
- top: `var(${cssVariablePositionStickyTop}, ${positionStickyTopFallback})`,
4066
- zIndex: 1, // to be on top of the collapsible
4067
- background: colorCanvas,
4068
- }),
4069
- },
4070
- 'icon-container': {
4071
- height: fontLineHeight,
4072
- width: fontLineHeight,
4073
- font: `inherit ${fontFamily}`, // needed for correct calculations based on ex-unit
4074
- display: 'flex',
4075
- alignItems: 'center',
4076
- justifyContent: 'center',
4077
- },
4078
- icon: {
4079
- transform: open ? 'rotate3d(0)' : 'rotate3d(0,0,1,90deg)',
4080
- transition: getTransition('transform'),
4081
- },
4082
- collapsible: {
4083
- color: colorPrimary, // enables color inheritance for slotted content
4084
- display: 'grid',
4085
- ...(sticky && {
4086
- position: 'relative',
4087
- zIndex: 0, // to be below the heading
4088
- }),
4089
- ...(open
4090
- ? {
4091
- gridTemplateRows: '1fr',
4092
- visibility: 'inherit',
4093
- transition: getTransition('grid-template-rows'),
4094
- paddingBottom: compact ? spacingStaticSmall : '24px',
4095
- }
4096
- : {
4097
- gridTemplateRows: '0fr',
4098
- visibility: 'hidden',
4099
- transition: `${getTransition('grid-template-rows')}, visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationShort})`,
4100
4167
  }),
4101
- '& div': {
4102
- overflow: open ? 'visible' : 'hidden',
4103
- // Fix overflow issues for overlapping content (e.g. select dropdown)
4104
- animation: open ? `$overflow var(${cssVariableTransitionDuration},${motionDurationShort})` : 'none',
4105
- // Necessary to make focus outlines fully visible
4106
- padding: '4px',
4107
- margin: '-4px',
4108
- // Fix scrollbar issues when slotted content includes .sr-only styles (see issue #3042)
4109
- transform: 'translate3d(0,0,0)',
4110
- zIndex: 1,
4111
- },
4112
- },
4113
- '@keyframes overflow': {
4114
- from: { overflow: 'hidden' },
4115
- to: { overflow: 'hidden' },
4168
+ '&::before': {
4169
+ gridArea: `1/${isIconAlignedStart ? '1' : hasSummaryBefore && hasSummaryAfter ? '4' : hasSummaryBefore || hasSummaryAfter ? '3' : '2'}`,
4170
+ placeSelf: 'center',
4171
+ content: '""',
4172
+ width: '1.5rem',
4173
+ height: '1.5rem',
4174
+ pointerEvents: 'none',
4175
+ borderRadius: radiusFull,
4176
+ background: 'transparent',
4177
+ transition: getTransition('background-color'),
4178
+ ...forcedColorsMediaQuery({
4179
+ backgroundColor: 'LinkText',
4180
+ }),
4181
+ },
4182
+ '&::after': {
4183
+ gridArea: `1/${isIconAlignedStart ? '1' : hasSummaryBefore && hasSummaryAfter ? '4' : hasSummaryBefore || hasSummaryAfter ? '3' : '2'}`,
4184
+ placeSelf: 'center',
4185
+ content: '""',
4186
+ width: '1rem',
4187
+ height: '1rem',
4188
+ pointerEvents: 'none',
4189
+ WebkitMask: `${icon} center/contain no-repeat`, // necessary for Sogou browser support :-)
4190
+ mask: `${icon} center/contain no-repeat`,
4191
+ background: colorPrimary,
4192
+ transform: 'rotate3d(0)',
4193
+ transition: getTransition('transform', duration, easing),
4194
+ ...forcedColorsMediaQuery({
4195
+ backgroundColor: 'LinkText',
4196
+ }),
4197
+ 'details[open] &': {
4198
+ transform: 'rotate3d(0,0,1,180deg)',
4199
+ },
4200
+ },
4201
+ },
4116
4202
  },
4117
4203
  });
4118
4204
  };
@@ -4264,8 +4350,8 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
4264
4350
  ...buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
4265
4351
  right: hideLabelValue ? offsetVertical : offsetHorizontal,
4266
4352
  left: hideLabelValue ? offsetVertical : offsetHorizontal,
4353
+ borderRadius: `var(${legacyRadiusSmall}, ${hideLabelValue ? radiusFull : radiusLg})`,
4267
4354
  })),
4268
- borderRadius: `var(${legacyRadiusSmall}, ${radiusLg})`,
4269
4355
  transition: getTransition('background-color'),
4270
4356
  ...(active && {
4271
4357
  ...frostedGlassStyle,
@@ -4535,11 +4621,9 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
4535
4621
  verticalAlign: 'top',
4536
4622
  ...mergeDeep(buildResponsiveStyles(isCompact, (compactValue) => ({
4537
4623
  [`${cssVariableInternalScaling}`]: compactValue ? 0.64285714 : 1,
4538
- borderRadius: addImportantToRule(`var(${legacyRadiusSmall}, ${compactValue ? radiusLg : radiusXl})`),
4624
+ '--p-internal-border-radius': compactValue ? radiusLg : radiusXl,
4539
4625
  })), buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
4540
- ...(hideLabelValue && {
4541
- borderRadius: addImportantToRule(`var(${legacyRadiusSmall}, ${radiusFull})`),
4542
- }),
4626
+ borderRadius: addImportantToRule(`var(${legacyRadiusSmall}, ${hideLabelValue ? radiusFull : 'var(--p-internal-border-radius)'})`),
4543
4627
  }))),
4544
4628
  ...addImportantToEachRule({
4545
4629
  ...hostHiddenStyles,
@@ -4566,6 +4650,16 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
4566
4650
  padding: hideLabelValue ? paddingBlock : `${paddingBlock} ${paddingInline}`,
4567
4651
  gap: hideLabelValue ? 0 : gap,
4568
4652
  })),
4653
+ ...forcedColorsMediaQuery({
4654
+ forcedColorAdjust: 'none',
4655
+ background: 'Canvas',
4656
+ color: 'LinkText',
4657
+ boxShadow: 'inset 0 0 0 2px LinkText',
4658
+ '&:is(button)': {
4659
+ boxShadow: 'inset 0 0 0 2px ButtonBorder',
4660
+ color: 'ButtonText',
4661
+ },
4662
+ }),
4569
4663
  ...(!hasSlottedAnchor && {
4570
4664
  '&:focus-visible': getFocusBaseStyles(),
4571
4665
  }),
@@ -4573,6 +4667,9 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
4573
4667
  hoverMediaQuery({
4574
4668
  '&:hover': {
4575
4669
  backgroundColor: backgroundColorHover,
4670
+ ...forcedColorsMediaQuery({
4671
+ background: 'Canvas',
4672
+ }),
4576
4673
  },
4577
4674
  })),
4578
4675
  },
@@ -4600,9 +4697,9 @@ const getComponentCss$15 = (icon, iconSource, variant, hideLabel, isDisabled, is
4600
4697
  root: {
4601
4698
  ...(disabledOrLoading && {
4602
4699
  cursor: 'not-allowed',
4603
- backgroundColor: colorFrostedSoft,
4604
- borderColor: colorFrostedSoft,
4605
- color: colorContrastLow,
4700
+ }),
4701
+ ...(isDisabled && {
4702
+ ...getDisabledBaseStyles(),
4606
4703
  }),
4607
4704
  },
4608
4705
  ...(isLoading && {
@@ -4614,6 +4711,7 @@ const getComponentCss$15 = (icon, iconSource, variant, hideLabel, isDisabled, is
4614
4711
  top: '50%',
4615
4712
  left: '50%',
4616
4713
  transform: 'translate(-50%, -50%)',
4714
+ color: 'inherit',
4617
4715
  },
4618
4716
  }),
4619
4717
  label: {
@@ -4621,12 +4719,18 @@ const getComponentCss$15 = (icon, iconSource, variant, hideLabel, isDisabled, is
4621
4719
  ...(isLoading && {
4622
4720
  opacity: 0, // use opacity for smooth transition between states
4623
4721
  }),
4722
+ ...(isDisabled && {
4723
+ ...getDisabledBaseStyles(),
4724
+ }),
4624
4725
  },
4625
4726
  icon: {
4626
4727
  transition: getTransition('opacity'),
4627
4728
  ...(isLoading && {
4628
4729
  opacity: 0, // use opacity for smooth transition between states
4629
4730
  }),
4731
+ ...(isDisabled && {
4732
+ ...getDisabledBaseStyles(),
4733
+ }),
4630
4734
  },
4631
4735
  // .loading
4632
4736
  ...getFunctionalComponentLoadingMessageStyles(),
@@ -5322,6 +5426,10 @@ const getCheckboxBaseStyles = (isDisabled, isLoading, isCompact, state) => {
5322
5426
  background: `var(${cssVarCheckboxBackgroundColor},${formStateBackgroundColor})`,
5323
5427
  transition: `${getTransition('background-color')}, ${getTransition('border-color')}`,
5324
5428
  border: `${checkboxBorderWidth} solid var(${cssVarCheckboxBorderColor},${formStateBorderColor})`,
5429
+ ...(disabledOrLoading &&
5430
+ forcedColorsMediaQuery({
5431
+ borderColor: 'GrayText',
5432
+ })),
5325
5433
  borderRadius: `var(${legacyRadiusSmall}, ${isCompact ? radiusMd : radiusLg})`,
5326
5434
  ...(disabledOrLoading && {
5327
5435
  pointerEvents: 'none', // to prevent form element becomes clickable/toggleable
@@ -5341,10 +5449,6 @@ const getCheckboxBaseStyles = (isDisabled, isLoading, isCompact, state) => {
5341
5449
  };
5342
5450
  };
5343
5451
 
5344
- const getInlineSVGBackgroundImage = (path) => {
5345
- return `url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${path}</svg>')`;
5346
- };
5347
-
5348
5452
  const checkedIcon$1 = getInlineSVGBackgroundImage(`<path d="m20.22,7.47l-1.47-1.42-9.26,9.02-4.24-4.15-1.47,1.42,5.71,5.6,10.73-10.47Z"/>`);
5349
5453
  const getCheckboxCheckedBaseStyles = (isLoading, state) => {
5350
5454
  const { formStateBorderColor } = getThemedFormStateColors(state);
@@ -5353,6 +5457,7 @@ const getCheckboxCheckedBaseStyles = (isLoading, state) => {
5353
5457
  }
5354
5458
  return {
5355
5459
  '&::before': {
5460
+ forcedColorAdjust: 'none',
5356
5461
  WebkitMask: `${checkedIcon$1} center/contain no-repeat`, // necessary for Sogou browser support :-)
5357
5462
  mask: `${checkedIcon$1} center/contain no-repeat`,
5358
5463
  backgroundColor: `var(${cssVarCheckboxIconColor}, ${state === 'none' ? colorPrimary : formStateBorderColor})`,
@@ -5368,6 +5473,7 @@ const getCheckboxIndeterminateBaseStyles = (isLoading, state) => {
5368
5473
  }
5369
5474
  return {
5370
5475
  '&::before': {
5476
+ forcedColorAdjust: 'none',
5371
5477
  WebkitMask: `${indeterminateIcon} center/contain no-repeat`,
5372
5478
  mask: `${indeterminateIcon} center/contain no-repeat`,
5373
5479
  backgroundColor: state === 'none' ? colorPrimary : formStateBorderColor,
@@ -5383,19 +5489,21 @@ const getFunctionalComponentRequiredStyles = () => {
5383
5489
  };
5384
5490
  };
5385
5491
 
5386
- const getFunctionalComponentLabelAfterStyles = (isDisabledOrLoading, additionalIsDisabledJssStyle) => {
5492
+ const getFunctionalComponentLabelAfterStyles = () => {
5387
5493
  return {
5388
5494
  'slot[name="label-after"]': {
5389
5495
  display: 'inline-block',
5390
5496
  verticalAlign: 'top',
5391
- ...(isDisabledOrLoading && {
5392
- pointerEvents: 'none',
5393
- ...additionalIsDisabledJssStyle,
5394
- }),
5497
+ '&::slotted(*)': {
5498
+ ...addImportantToEachRule({
5499
+ marginInlineStart: spacingStaticXs$1,
5500
+ })
5501
+ },
5395
5502
  },
5396
5503
  };
5397
5504
  };
5398
- const getFunctionalComponentLabelStyles = (isDisabledOrLoading, hideLabel, additionalDefaultJssStyle, additionalLabelWrapperJssStyle, additionalIsShownJssStyle) => {
5505
+ const getFunctionalComponentLabelStyles = (isDisabled, isLoading, hideLabel, additionalDefaultJssStyle, additionalLabelWrapperJssStyle, additionalIsShownJssStyle) => {
5506
+ const isDisabledOrLoading = isDisabled || isLoading;
5399
5507
  return {
5400
5508
  'label-wrapper': {
5401
5509
  ...buildResponsiveStyles(hideLabel, (isHidden) => ({
@@ -5407,10 +5515,13 @@ const getFunctionalComponentLabelStyles = (isDisabledOrLoading, hideLabel, addit
5407
5515
  label: {
5408
5516
  ...proseTextSmStyle,
5409
5517
  cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer',
5518
+ color: colorPrimary,
5410
5519
  ...(isDisabledOrLoading && {
5411
5520
  pointerEvents: 'none', // prevents label interaction when disabled or loading
5412
5521
  }),
5413
- color: colorPrimary,
5522
+ ...(isDisabled && {
5523
+ ...getDisabledBaseStyles(),
5524
+ }),
5414
5525
  transition: getTransition('color'), // for smooth transitions between e.g. disabled state
5415
5526
  display: 'inline',
5416
5527
  '&:empty': {
@@ -5470,11 +5581,10 @@ const getComponentCss$12 = (hideLabel, state, isDisabled, isLoading, isCompact)
5470
5581
  display: 'block',
5471
5582
  ...addImportantToEachRule({
5472
5583
  ...hostHiddenStyles,
5473
- ...(isDisabled && getDisabledBaseStyles()),
5474
5584
  }),
5475
5585
  [`${cssVarInternalCheckboxScaling}`]: isCompact ? 0.64285714 : 1,
5476
5586
  },
5477
- ...getFunctionalComponentLabelAfterStyles(disabledOrLoading),
5587
+ ...getFunctionalComponentLabelAfterStyles(),
5478
5588
  ...preventFoucOfNestedElementsStyles,
5479
5589
  input: {
5480
5590
  ...getCheckboxBaseStyles(isDisabled, isLoading, isCompact, state),
@@ -5505,6 +5615,7 @@ const getComponentCss$12 = (hideLabel, state, isDisabled, isLoading, isCompact)
5505
5615
  alignSelf: 'flex-start',
5506
5616
  minHeight: fontLineHeight, // necessary for compact mode
5507
5617
  cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
5618
+ ...(isDisabled && getDisabledBaseStyles()),
5508
5619
  },
5509
5620
  ...(isLoading && {
5510
5621
  spinner: {
@@ -5518,7 +5629,7 @@ const getComponentCss$12 = (hideLabel, state, isDisabled, isLoading, isCompact)
5518
5629
  },
5519
5630
  }),
5520
5631
  // .label / .required
5521
- ...getFunctionalComponentLabelStyles(isDisabled || isLoading, hideLabel, {
5632
+ ...getFunctionalComponentLabelStyles(isDisabled, isLoading, hideLabel, {
5522
5633
  cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
5523
5634
  }, null, {
5524
5635
  paddingTop: labelPaddingTop,
@@ -5540,7 +5651,7 @@ const cssVarButtonPurePadding = '--ref-p-input-slotted-padding';
5540
5651
  */
5541
5652
  const cssVarButtonPureMargin = '--ref-p-input-slotted-margin';
5542
5653
  const cssVarInternalInputBaseScaling = '--p-internal-input-base-scaling';
5543
- const getFunctionalComponentInputBaseStyles = (isDisabled, isLoading, hideLabel, state, isCompact, readOnly, additionalInputJssStyle) => {
5654
+ const getFunctionalComponentInputBaseStyles = (isDisabled, isLoading, hideLabel, state, isCompact, readOnly, additionalInputJssStyle, additionalHostJssStyle) => {
5544
5655
  const wrapperBorderWidth = borderWidthThin;
5545
5656
  const wrapperHeight = `calc(var(${cssVarInternalInputBaseScaling}) * 3.5rem)`;
5546
5657
  const wrapperPaddingInline = `calc(22.4px * (var(${cssVarInternalInputBaseScaling}) - 0.64285714) + 8px)`;
@@ -5557,14 +5668,21 @@ const getFunctionalComponentInputBaseStyles = (isDisabled, isLoading, hideLabel,
5557
5668
  [`${cssVarButtonPurePadding}`]: buttonPadding,
5558
5669
  [`${cssVarButtonPureMargin}`]: buttonMargin,
5559
5670
  ...hostHiddenStyles,
5560
- ...(isDisabled && getDisabledBaseStyles()),
5561
5671
  }),
5672
+ // Alignment and direction of placeholder is set always to the right in RTL mode, because it is expected to have rtl language as placeholder value
5673
+ '&(:dir(rtl)) input::placeholder': {
5674
+ direction: 'rtl',
5675
+ textAlign: 'end',
5676
+ },
5677
+ ...additionalHostJssStyle,
5562
5678
  },
5563
- ...getFunctionalComponentLabelAfterStyles(isDisabled),
5679
+ ...getFunctionalComponentLabelAfterStyles(),
5564
5680
  ...preventFoucOfNestedElementsStyles,
5565
5681
  input: {
5566
5682
  all: 'unset',
5683
+ display: 'flex',
5567
5684
  flex: 1,
5685
+ alignItems: 'center',
5568
5686
  width: 'max(100%, 2ch)', // show at least 2 characters in very narrow containers
5569
5687
  height: '100%',
5570
5688
  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
@@ -5594,9 +5712,23 @@ const getFunctionalComponentInputBaseStyles = (isDisabled, isLoading, hideLabel,
5594
5712
  background: colorFrosted,
5595
5713
  color: colorContrastMedium,
5596
5714
  }),
5597
- '&:focus-within': {
5715
+ '&:not(:has(input:disabled)):focus-within': {
5598
5716
  borderColor: formStateBorderHoverColor,
5717
+ ...forcedColorsMediaQuery({
5718
+ outline: '2px solid Highlight',
5719
+ outlineOffset: '2px',
5720
+ }),
5599
5721
  },
5722
+ ...(isDisabled && {
5723
+ ...mergeDeep({ ...getDisabledBaseStyles() }, {
5724
+ ...forcedColorsMediaQuery({
5725
+ borderColor: 'GrayText',
5726
+ }),
5727
+ }),
5728
+ '& > *': {
5729
+ ...getDisabledBaseStyles(),
5730
+ },
5731
+ }),
5600
5732
  ...(!isDisabled &&
5601
5733
  !readOnly &&
5602
5734
  !isLoading &&
@@ -5614,7 +5746,7 @@ const getFunctionalComponentInputBaseStyles = (isDisabled, isLoading, hideLabel,
5614
5746
  },
5615
5747
  }),
5616
5748
  // .label / .required
5617
- ...getFunctionalComponentLabelStyles(isDisabled, hideLabel),
5749
+ ...getFunctionalComponentLabelStyles(isDisabled, isLoading, hideLabel),
5618
5750
  // .message
5619
5751
  ...getFunctionalComponentStateMessageStyles(state),
5620
5752
  // .loading
@@ -5646,6 +5778,7 @@ const getButtonJssStyle = (componentName, isOpen, isDisabled, state, isCompact,
5646
5778
  font: textSmallStyle.font,
5647
5779
  color: `var(${cssVarTextColor}, ${colorPrimary})`,
5648
5780
  cursor: isDisabled ? 'not-allowed' : 'pointer',
5781
+ ...(isDisabled && getDisabledBaseStyles()),
5649
5782
  transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transitions between e.g. disabled states
5650
5783
  ...(!isDisabled && {
5651
5784
  ...hoverMediaQuery({
@@ -5715,12 +5848,20 @@ const getOptionJssStyle = (componentName, cssVarScalingName) => {
5715
5848
  transition: `${getTransition('background-color')}, ${getTransition('color')}`,
5716
5849
  '&--highlighted': {
5717
5850
  background: colorFrosted,
5851
+ ...forcedColorsMediaQuery({
5852
+ forcedColorAdjust: 'none',
5853
+ outline: '2px solid Highlight',
5854
+ outlineOffset: '-2px',
5855
+ }),
5718
5856
  },
5719
5857
  '&--highlighted, &--selected': {
5720
5858
  color: colorPrimary,
5721
5859
  },
5722
5860
  '&--disabled': {
5723
5861
  cursor: 'not-allowed',
5862
+ ...forcedColorsMediaQuery({
5863
+ color: 'GrayText',
5864
+ }),
5724
5865
  },
5725
5866
  '&--hidden': {
5726
5867
  display: 'none',
@@ -6834,10 +6975,17 @@ const getComponentCss$V = (isOpen, background, backdrop, position, hasHeader, ha
6834
6975
  ? {
6835
6976
  borderStartEndRadius: dialogBorderRadius,
6836
6977
  borderEndEndRadius: dialogBorderRadius,
6978
+ ...forcedColorsMediaQuery({
6979
+ borderInlineEnd: '2px solid CanvasText',
6980
+ }),
6837
6981
  }
6838
6982
  : {
6839
6983
  borderStartStartRadius: dialogBorderRadius,
6840
6984
  borderEndStartRadius: dialogBorderRadius,
6985
+ // TODO: Fix needs to be implemented for Fullscreen (which is not available as prop for Flyout yet)
6986
+ ...forcedColorsMediaQuery({
6987
+ borderInlineStart: '2px solid CanvasText',
6988
+ }),
6841
6989
  }),
6842
6990
  ...(isFooterFixed && {
6843
6991
  gridTemplateRows: hasHeader ? 'auto 1fr auto' : '1fr',
@@ -6948,6 +7096,9 @@ const getComponentCss$T = (name, source, color, size) => {
6948
7096
  mask: `url("${buildIconUrl(source || name)}") center/contain no-repeat`,
6949
7097
  aspectRatio: '1/1',
6950
7098
  background: 'currentcolor', // necessary for proper color inheritance
7099
+ ...forcedColorsMediaQuery({
7100
+ background: 'CanvasText',
7101
+ }),
6951
7102
  ...(isFlippableIcon(name, source) && {
6952
7103
  '&(:dir(rtl))': {
6953
7104
  transform: 'scaleX(-1)',
@@ -6995,6 +7146,10 @@ const getNotificationRootJssStyle = (state, hasAction, hasClose) => {
6995
7146
  // 4 columns are for icon, content, optional action button and optional close button
6996
7147
  gridTemplateColumns: `auto minmax(auto, 1fr)${hasAction ? ' auto' : ''}${hasClose ? ' auto' : ''}`,
6997
7148
  },
7149
+ ...forcedColorsMediaQuery({
7150
+ outline: '2px solid CanvasText',
7151
+ outlineOffset: '-2px',
7152
+ }),
6998
7153
  };
6999
7154
  };
7000
7155
  const getNotificationIconJssStyle = () => ({
@@ -7095,7 +7250,15 @@ const getComponentCss$R = (disabled, loading, hideLabel, state, compact, readOnl
7095
7250
  * @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
7096
7251
  */
7097
7252
  const getComponentCss$Q = (disabled, loading, hideLabel, state, compact, readOnly) => {
7098
- return getCss(getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly));
7253
+ return getCss(getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, null,
7254
+ // Overwrites direction to ltr for rtl languages to prevent issues with the email input, e.g. cursor jumping to the
7255
+ // end of the input when typing in the middle of the text. This is necessary because email addresses are assumed
7256
+ // to be always written in ltr direction and the input needs to accommodate that, even in rtl contexts.
7257
+ {
7258
+ '&(:dir(rtl)) .wrapper, &(:dir(rtl)) input:placeholder-shown': {
7259
+ direction: 'ltr',
7260
+ },
7261
+ }));
7099
7262
  };
7100
7263
 
7101
7264
  // CSS Variables defined in base input
@@ -7215,7 +7378,15 @@ const getComponentCss$M = (disabled, loading, hideLabel, state, compact, readOnl
7215
7378
  * @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
7216
7379
  */
7217
7380
  const getComponentCss$L = (disabled, loading, hideLabel, state, compact, readOnly) => {
7218
- return getCss(getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly));
7381
+ return getCss(getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, null,
7382
+ // Overwrites direction to ltr for rtl languages to prevent issues with the tel input, e.g. cursor jumping to the
7383
+ // end of the input when typing in the middle of the text. This is necessary because tel values are assumed
7384
+ // to be always written in ltr direction and the input needs to accommodate that, even in rtl contexts.
7385
+ {
7386
+ '&(:dir(rtl)) .wrapper, &(:dir(rtl)) input:placeholder-shown': {
7387
+ direction: 'ltr',
7388
+ },
7389
+ }));
7219
7390
  };
7220
7391
 
7221
7392
  const formElementLayeredGap = '9px'; // to have same distance vertically and horizontally for e.g. button/icon within form element
@@ -7302,7 +7473,15 @@ const getComponentCss$J = (disabled, loading, hideLabel, state, compact, readOnl
7302
7473
  * @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
7303
7474
  */
7304
7475
  const getComponentCss$I = (disabled, loading, hideLabel, state, compact, readOnly) => {
7305
- return getCss(getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly));
7476
+ return getCss(getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, null,
7477
+ // Overwrites direction to ltr for rtl languages to prevent issues with the url input, e.g. cursor jumping to the
7478
+ // end of the input when typing in the middle of the text. This is necessary because url addresses are assumed
7479
+ // to be always written in ltr direction and the input needs to accommodate that, even in rtl contexts.
7480
+ {
7481
+ '&(:dir(rtl)) .wrapper, &(:dir(rtl)) input:placeholder-shown': {
7482
+ direction: 'ltr',
7483
+ },
7484
+ }));
7306
7485
  };
7307
7486
 
7308
7487
  // CSS Variables defined in base input
@@ -7752,6 +7931,10 @@ const getComponentCss$C = (isOpen, background, backdrop, fullscreen, hasDismissB
7752
7931
  placeSelf: 'center',
7753
7932
  margin: `var(${cssVariableSpacingTop},clamp(16px, 10vh, 192px)) ${gridExtendedOffsetBase} var(${cssVariableSpacingBottom},clamp(16px, 10vh, 192px))`, // horizontal margin is needed to ensure modal is placed on "Porsche Grid" when slotted content is wider than the viewport width
7754
7933
  borderRadius: dialogBorderRadius,
7934
+ ...forcedColorsMediaQuery({
7935
+ outline: '2px solid CanvasText',
7936
+ outlineOffset: '-2px',
7937
+ }),
7755
7938
  }),
7756
7939
  },
7757
7940
  ...(hasDismissButton && {
@@ -7792,6 +7975,9 @@ const getComponentCss$B = (model, safeZone, size, color) => {
7792
7975
  mask: `url(${getSvgUrl(model)}) no-repeat left top / contain`,
7793
7976
  aspectRatio: `${width} / ${safeZone ? 36 : height}`, // 36px is the max-height for SVG model signature creation
7794
7977
  background: 'currentcolor', // necessary for proper color inheritance
7978
+ ...forcedColorsMediaQuery({
7979
+ background: 'CanvasText',
7980
+ }),
7795
7981
  ...hostHiddenStyles,
7796
7982
  }),
7797
7983
  },
@@ -7838,7 +8024,9 @@ const getComponentCss$A = (isDisabled, selected) => {
7838
8024
  },
7839
8025
  },
7840
8026
  option: getOptionJssStyle('multi-select-option', cssVarInternalMultiSelectOptionScaling),
7841
- checkbox: mergeDeep(getCheckboxBaseStyles(isDisabled, false, true, 'none'), selected ? getCheckboxCheckedBaseStyles(false, 'none') : {}),
8027
+ checkbox: mergeDeep(getCheckboxBaseStyles(isDisabled, false, true, 'none'), selected ? getCheckboxCheckedBaseStyles(false, 'none') : {}, {
8028
+ flexShrink: 0,
8029
+ }),
7842
8030
  });
7843
8031
  };
7844
8032
 
@@ -7852,7 +8040,6 @@ const getComponentCss$z = (isDisabled) => {
7852
8040
  '@global': {
7853
8041
  ':host': addImportantToEachRule({
7854
8042
  ...hostHiddenStyles,
7855
- ...(isDisabled && getDisabledBaseStyles()),
7856
8043
  }),
7857
8044
  '::slotted(*)': {
7858
8045
  '--p-internal-select-option-padding-left': paddingSlottedInlineStart,
@@ -7868,6 +8055,7 @@ const getComponentCss$z = (isDisabled) => {
7868
8055
  paddingInline,
7869
8056
  font: textXSmallStyle.font.replace(' 400 ', ` ${fontWeightSemiBold} `),
7870
8057
  color: colorPrimary,
8058
+ ...(isDisabled && getDisabledBaseStyles()),
7871
8059
  },
7872
8060
  },
7873
8061
  });
@@ -7890,10 +8078,9 @@ const getComponentCss$y = (isOpen, isDisabled, hideLabel, state, isCompact) => {
7890
8078
  [`${cssVarInternalMultiSelectOptionScaling}`]: isCompact ? 0.64285714 : 1,
7891
8079
  [`${cssVarInternalOptgroupScaling}`]: isCompact ? 0.64285714 : 1,
7892
8080
  ...hostHiddenStyles,
7893
- ...(isDisabled && getDisabledBaseStyles()),
7894
8081
  }),
7895
8082
  },
7896
- ...getFunctionalComponentLabelAfterStyles(isDisabled),
8083
+ ...getFunctionalComponentLabelAfterStyles(),
7897
8084
  ...preventFoucOfNestedElementsStyles,
7898
8085
  button: {
7899
8086
  ...getButtonJssStyle('multi-select', isOpen, isDisabled, state, isCompact, cssVarInternalMultiSelectScaling),
@@ -7915,7 +8102,7 @@ const getComponentCss$y = (isOpen, isDisabled, hideLabel, state, isCompact) => {
7915
8102
  // .no-results / .sr-only
7916
8103
  ...getFunctionalComponentNoResultsOptionStyles('multi-select-option', cssVarInternalMultiSelectScaling),
7917
8104
  // .label / .required
7918
- ...getFunctionalComponentLabelStyles(isDisabled, hideLabel),
8105
+ ...getFunctionalComponentLabelStyles(isDisabled, false, hideLabel),
7919
8106
  // .message
7920
8107
  ...getFunctionalComponentStateMessageStyles(state),
7921
8108
  });
@@ -8059,10 +8246,9 @@ const getComponentCss$w = (hideLabel, state, isDisabled, isLoading, length, isCo
8059
8246
  [`${cssVarInternalPinCodeScaling}`]: isCompact ? 0.64285714 : 1,
8060
8247
  ...addImportantToEachRule({
8061
8248
  ...hostHiddenStyles,
8062
- ...(isDisabled && getDisabledBaseStyles()),
8063
8249
  }),
8064
8250
  },
8065
- ...getFunctionalComponentLabelAfterStyles(isDisabled),
8251
+ ...getFunctionalComponentLabelAfterStyles(),
8066
8252
  ...preventFoucOfNestedElementsStyles,
8067
8253
  input: {
8068
8254
  all: 'unset',
@@ -8082,7 +8268,7 @@ const getComponentCss$w = (hideLabel, state, isDisabled, isLoading, length, isCo
8082
8268
  textOverflow: 'ellipsis',
8083
8269
  cursor: isDisabled || isLoading ? 'not-allowed' : 'text',
8084
8270
  textAlign: 'center',
8085
- ...(isLoading && getDisabledBaseStyles()),
8271
+ ...((isDisabled || isLoading) && getDisabledBaseStyles()),
8086
8272
  '&:focus-visible': {
8087
8273
  borderColor: formStateBorderHoverColor,
8088
8274
  },
@@ -8119,7 +8305,7 @@ const getComponentCss$w = (hideLabel, state, isDisabled, isLoading, length, isCo
8119
8305
  },
8120
8306
  }),
8121
8307
  // .label / .required
8122
- ...getFunctionalComponentLabelStyles(isDisabled, hideLabel),
8308
+ ...getFunctionalComponentLabelStyles(isDisabled, isLoading, hideLabel),
8123
8309
  // .message
8124
8310
  ...getFunctionalComponentStateMessageStyles(state),
8125
8311
  // .loading
@@ -8201,6 +8387,9 @@ const getComponentCss$v = () => {
8201
8387
  height: '12px',
8202
8388
  clipPath: 'polygon(50% 0, 100% 110%, 0 110%)',
8203
8389
  background: colorCanvas,
8390
+ ...forcedColorsMediaQuery({
8391
+ background: 'CanvasText',
8392
+ }),
8204
8393
  },
8205
8394
  content: {
8206
8395
  maxWidth: `min(calc(100dvw - ${POPOVER_SAFE_ZONE * 2}px), 48ch)`,
@@ -8212,6 +8401,10 @@ const getComponentCss$v = () => {
8212
8401
  ...textSmallStyle,
8213
8402
  background: colorCanvas,
8214
8403
  color: colorPrimary,
8404
+ ...forcedColorsMediaQuery({
8405
+ outline: '2px solid CanvasText',
8406
+ outlineOffset: '-2px',
8407
+ }),
8215
8408
  },
8216
8409
  });
8217
8410
  };
@@ -8237,10 +8430,9 @@ const getComponentCss$u = (disabled, loading, state) => {
8237
8430
  display: 'block',
8238
8431
  ...addImportantToEachRule({
8239
8432
  ...hostHiddenStyles,
8240
- ...(disabledOrLoading && getDisabledBaseStyles()),
8241
8433
  }),
8242
8434
  },
8243
- ...getFunctionalComponentLabelAfterStyles(disabledOrLoading),
8435
+ ...getFunctionalComponentLabelAfterStyles(),
8244
8436
  ...preventFoucOfNestedElementsStyles,
8245
8437
  input: {
8246
8438
  all: 'unset',
@@ -8256,6 +8448,9 @@ const getComponentCss$u = (disabled, loading, state) => {
8256
8448
  borderRadius: radiusFull,
8257
8449
  ...(disabledOrLoading && {
8258
8450
  pointerEvents: 'none', // to prevent form element becomes clickable/toggleable
8451
+ ...forcedColorsMediaQuery({
8452
+ borderColor: 'GrayText',
8453
+ }),
8259
8454
  }),
8260
8455
  '&:focus-visible': getFocusBaseStyles(),
8261
8456
  ...(!disabledOrLoading &&
@@ -8270,6 +8465,7 @@ const getComponentCss$u = (disabled, loading, state) => {
8270
8465
  gridArea: '1/1',
8271
8466
  },
8272
8467
  '&:checked::before': {
8468
+ forcedColorAdjust: 'none',
8273
8469
  WebkitMask: `${checkedIcon} center/contain no-repeat`, // necessary for Sogou browser support :-)
8274
8470
  mask: `${checkedIcon} center/contain no-repeat`,
8275
8471
  backgroundColor: state === 'none' ? colorPrimary : formStateBorderColor,
@@ -8295,6 +8491,7 @@ const getComponentCss$u = (disabled, loading, state) => {
8295
8491
  alignSelf: 'flex-start',
8296
8492
  minHeight: fontLineHeight, // necessary for compact mode
8297
8493
  cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
8494
+ ...(disabled && getDisabledBaseStyles()),
8298
8495
  },
8299
8496
  ...(loading && {
8300
8497
  spinner: {
@@ -8308,7 +8505,7 @@ const getComponentCss$u = (disabled, loading, state) => {
8308
8505
  },
8309
8506
  }),
8310
8507
  // .label / .required
8311
- ...getFunctionalComponentLabelStyles(disabled || loading, false, null, {
8508
+ ...getFunctionalComponentLabelStyles(disabled, loading, false, null, {
8312
8509
  paddingTop: labelPaddingTop,
8313
8510
  paddingInlineStart: labelPaddingInlineStart,
8314
8511
  }),
@@ -8348,7 +8545,7 @@ const getComponentCss$t = (isDisabled, isLoading, hideLabel, state, isCompact, d
8348
8545
  [`${cssVarInternalRadioGroupScaling}`]: isCompact ? 0.64285714 : 1,
8349
8546
  [`${cssVarInternalRadioGroupOptionScaling}`]: isCompact ? 0.64285714 : 1,
8350
8547
  },
8351
- ...getFunctionalComponentLabelAfterStyles(isDisabled, getDisabledBaseStyles()),
8548
+ ...getFunctionalComponentLabelAfterStyles(),
8352
8549
  ...(isLoading && {
8353
8550
  '::slotted(*:not([slot]))': {
8354
8551
  ...addImportantToEachRule(getDisabledBaseStyles()),
@@ -8382,7 +8579,7 @@ const getComponentCss$t = (isDisabled, isLoading, hideLabel, state, isCompact, d
8382
8579
  },
8383
8580
  }),
8384
8581
  // .label / .required
8385
- ...getFunctionalComponentLabelStyles(isDisabled, hideLabel, {
8582
+ ...getFunctionalComponentLabelStyles(isDisabled, isLoading, hideLabel, {
8386
8583
  ...(isDisabled ? getDisabledBaseStyles() : { cursor: 'inherit' }), // the label is not clickable
8387
8584
  }),
8388
8585
  // .message
@@ -8496,11 +8693,6 @@ const getComponentCss$s = (isNextHidden, isPrevHidden, alignScrollIndicator, has
8496
8693
  ...dismissButtonJssStyle,
8497
8694
  ...dropShadowLowStyle,
8498
8695
  },
8499
- icon: {
8500
- '&:dir(rtl)': {
8501
- transform: 'scaleX(-1)',
8502
- },
8503
- },
8504
8696
  });
8505
8697
  };
8506
8698
 
@@ -8554,6 +8746,10 @@ const getComponentCss$r = (isCompact, isDisabled, isSelected, state, hasIcon, ha
8554
8746
  ...(isDisabled
8555
8747
  ? {
8556
8748
  cursor: 'not-allowed',
8749
+ ...forcedColorsMediaQuery({
8750
+ color: 'GrayText',
8751
+ borderColor: 'GrayText',
8752
+ }),
8557
8753
  }
8558
8754
  : {
8559
8755
  cursor: 'pointer',
@@ -8573,6 +8769,10 @@ const getComponentCss$r = (isCompact, isDisabled, isSelected, state, hasIcon, ha
8573
8769
  ...textXSmallStyle,
8574
8770
  overflowWrap: 'normal',
8575
8771
  color: colorContrastMedium,
8772
+ ...(isDisabled &&
8773
+ forcedColorsMediaQuery({
8774
+ color: 'GrayText',
8775
+ })),
8576
8776
  },
8577
8777
  },
8578
8778
  ...(hasIcon && {
@@ -8594,12 +8794,8 @@ const getComponentCss$q = (minWidth, maxWidth, columns, disabled, hideLabel, sta
8594
8794
  ...hostHiddenStyles,
8595
8795
  }),
8596
8796
  },
8597
- ...getFunctionalComponentLabelAfterStyles(disabled),
8797
+ ...getFunctionalComponentLabelAfterStyles(),
8598
8798
  ...preventFoucOfNestedElementsStyles,
8599
- ...getFunctionalComponentLabelAfterStyles(disabled, getDisabledBaseStyles()),
8600
- ...(disabled && {
8601
- '::slotted(*:not([slot]))': addImportantToEachRule(getDisabledBaseStyles()),
8602
- }),
8603
8799
  'slot:not([name])': {
8604
8800
  display: 'grid',
8605
8801
  gridAutoRows: '1fr', // for equal height
@@ -8617,7 +8813,7 @@ const getComponentCss$q = (minWidth, maxWidth, columns, disabled, hideLabel, sta
8617
8813
  gap: spacingStaticXSmall,
8618
8814
  },
8619
8815
  // .label / .required
8620
- ...getFunctionalComponentLabelStyles(disabled, hideLabel, {
8816
+ ...getFunctionalComponentLabelStyles(disabled, false, hideLabel, {
8621
8817
  ...(disabled ? getDisabledBaseStyles() : { cursor: 'inherit' }), // the label is not clickable
8622
8818
  }),
8623
8819
  // .message
@@ -8672,9 +8868,8 @@ const getComponentCss$o = (isOpen, isDisabled, hideLabel, state, isCompact) => {
8672
8868
  [`${cssVarInternalOptgroupScaling}`]: isCompact ? 0.64285714 : 1,
8673
8869
  ...hostHiddenStyles,
8674
8870
  }),
8675
- ...(isDisabled && getDisabledBaseStyles()),
8676
8871
  },
8677
- ...getFunctionalComponentLabelAfterStyles(isDisabled),
8872
+ ...getFunctionalComponentLabelAfterStyles(),
8678
8873
  ...preventFoucOfNestedElementsStyles,
8679
8874
  button: {
8680
8875
  ...getButtonJssStyle('select', isOpen, isDisabled, state, isCompact, cssVarInternalSelectScaling),
@@ -8697,7 +8892,7 @@ const getComponentCss$o = (isOpen, isDisabled, hideLabel, state, isCompact) => {
8697
8892
  // .no-results / .sr-only
8698
8893
  ...getFunctionalComponentNoResultsOptionStyles('select-option', cssVarInternalSelectScaling),
8699
8894
  // .label / .required
8700
- ...getFunctionalComponentLabelStyles(isDisabled, hideLabel),
8895
+ ...getFunctionalComponentLabelStyles(isDisabled, false, hideLabel),
8701
8896
  // .message
8702
8897
  ...getFunctionalComponentStateMessageStyles(state),
8703
8898
  });
@@ -8749,6 +8944,9 @@ const getComponentCss$n = (isOpen, background, hasDismissButton) => {
8749
8944
  marginBlockStart: spacingFluidLarge, // ensures minimal space at the top to visualize paper sheet like border top radius in case sheet becomes scrollable
8750
8945
  borderTopLeftRadius: dialogBorderRadius,
8751
8946
  borderTopRightRadius: dialogBorderRadius,
8947
+ ...forcedColorsMediaQuery({
8948
+ borderTop: '2px solid CanvasText',
8949
+ }),
8752
8950
  },
8753
8951
  ...(hasDismissButton && {
8754
8952
  dismiss: getDialogDismissButtonJssStyle(),
@@ -8794,6 +8992,7 @@ const getComponentCss$m = (size) => {
8794
8992
  },
8795
8993
  ':host': {
8796
8994
  display: 'inline-flex',
8995
+ color: colorPrimary,
8797
8996
  ...addImportantToEachRule({
8798
8997
  verticalAlign: 'top',
8799
8998
  ...hostHiddenStyles,
@@ -8810,7 +9009,7 @@ const getComponentCss$m = (size) => {
8810
9009
  },
8811
9010
  '&:last-child': {
8812
9011
  animation: `$dash ${animationDuration} steps(50) infinite`,
8813
- stroke: colorPrimary,
9012
+ stroke: 'currentcolor', // necessary for proper color inheritance
8814
9013
  strokeDasharray: strokeDasharray
8815
9014
  ,
8816
9015
  strokeLinecap: 'round',
@@ -8945,6 +9144,7 @@ const getColors$1 = (checked, loading) => {
8945
9144
  */
8946
9145
  const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisabled, isLoading, isCompact) => {
8947
9146
  const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, toggleBackgroundColor, textColor } = getColors$1(isChecked, isLoading);
9147
+ const disabledOrLoading = isDisabledOrLoading(isDisabled, isLoading);
8948
9148
  const gap = `calc(11.2px * (var(${cssVarInternalSwitchScaling}) - 0.64285714) + 4px)`;
8949
9149
  const buttonBorderWidth = borderWidthThin;
8950
9150
  const buttonWidth = `calc(var(${cssVarInternalSwitchScaling}) * 3rem)`;
@@ -8990,9 +9190,13 @@ const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisa
8990
9190
  border: `${buttonBorderWidth} solid ${buttonBorderColor}`,
8991
9191
  borderRadius: radiusFull,
8992
9192
  background: buttonBackgroundColor,
8993
- cursor: isDisabledOrLoading(isDisabled, isLoading) ? 'not-allowed' : 'pointer',
9193
+ cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
8994
9194
  transition: `${getTransition('background-color')}, ${getTransition('border-color')}`,
8995
- ...(!isDisabledOrLoading(isDisabled, isLoading) &&
9195
+ ...(disabledOrLoading &&
9196
+ forcedColorsMediaQuery({
9197
+ borderColor: 'GrayText',
9198
+ })),
9199
+ ...(!disabledOrLoading &&
8996
9200
  hoverMediaQuery({
8997
9201
  '&:hover': {
8998
9202
  borderColor: buttonBorderColorHover,
@@ -9011,8 +9215,12 @@ const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisa
9011
9215
  ...textSmallStyle,
9012
9216
  minWidth: 0, // prevents flex child to overflow max available parent size
9013
9217
  minHeight: 0, // prevents flex child to overflow max available parent size
9014
- cursor: isDisabledOrLoading(isDisabled, isLoading) ? 'not-allowed' : 'pointer',
9218
+ cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
9015
9219
  color: textColor,
9220
+ ...(disabledOrLoading &&
9221
+ forcedColorsMediaQuery({
9222
+ color: 'GrayText',
9223
+ })),
9016
9224
  ...mergeDeep(buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
9017
9225
  order: alignLabelValue === 'start' ? -1 : 0,
9018
9226
  })), buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, {
@@ -9021,6 +9229,7 @@ const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisa
9021
9229
  },
9022
9230
  },
9023
9231
  toggle: {
9232
+ forcedColorAdjust: 'none',
9024
9233
  display: 'flex',
9025
9234
  placeItems: 'center',
9026
9235
  placeContent: 'center',
@@ -9256,6 +9465,9 @@ const barJssStyle = {
9256
9465
  height: '2px',
9257
9466
  left: 0,
9258
9467
  background: colorPrimary,
9468
+ ...forcedColorsMediaQuery({
9469
+ background: 'ActiveBorder',
9470
+ }),
9259
9471
  };
9260
9472
  const getComponentCss$b = (size, weight) => {
9261
9473
  return getCss({
@@ -9423,6 +9635,10 @@ const getComponentCss$8 = (hasLabel, isCompact) => {
9423
9635
  backgroundColor: colorFrosted,
9424
9636
  },
9425
9637
  }),
9638
+ ...forcedColorsMediaQuery({
9639
+ outline: '2px solid CanvasText',
9640
+ outlineOffset: '-2px',
9641
+ }),
9426
9642
  '&:focus-visible': getFocusBaseStyles(),
9427
9643
  },
9428
9644
  },
@@ -9493,7 +9709,7 @@ const getComponentCss$7 = (variant, compact, isFocusable, hasIcon) => {
9493
9709
  display: 'flex',
9494
9710
  gap: '2px',
9495
9711
  padding: compact ? '1px 6px' : `${spacingStaticXSmall} 9px`,
9496
- borderRadius: `var(${legacyRadiusSmall}, ${radiusFull})`,
9712
+ borderRadius: `var(${legacyRadiusSmall}, calc(${compact ? '1px' : spacingStaticXSmall} + (${fontLineHeight} / 2)))`, // ensures pill shape has a maximum border radius to support multiline.
9497
9713
  font: textXSmallStyle.font,
9498
9714
  ...frostedGlassStyle,
9499
9715
  color: textColor,
@@ -9505,6 +9721,11 @@ const getComponentCss$7 = (variant, compact, isFocusable, hasIcon) => {
9505
9721
  background: backgroundHoverColor,
9506
9722
  },
9507
9723
  })),
9724
+ ...forcedColorsMediaQuery({
9725
+ outline: '2px solid CanvasText',
9726
+ outlineOffset: '-2px',
9727
+ backgroundColor: 'Canvas',
9728
+ }),
9508
9729
  },
9509
9730
  '::slotted': addImportantToEachRule({
9510
9731
  '&(a),&(button)': {
@@ -9676,10 +9897,9 @@ const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, isCompact,
9676
9897
  [`${cssVarInternalTextareaScaling}`]: isCompact ? 0.64285714 : 1,
9677
9898
  ...addImportantToEachRule({
9678
9899
  ...hostHiddenStyles,
9679
- ...(isDisabled && getDisabledBaseStyles()),
9680
9900
  }),
9681
9901
  },
9682
- ...getFunctionalComponentLabelAfterStyles(isDisabled),
9902
+ ...getFunctionalComponentLabelAfterStyles(),
9683
9903
  ...preventFoucOfNestedElementsStyles,
9684
9904
  textarea: {
9685
9905
  all: 'unset',
@@ -9726,6 +9946,7 @@ const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, isCompact,
9726
9946
  },
9727
9947
  wrapper: {
9728
9948
  display: 'grid',
9949
+ ...(isDisabled && getDisabledBaseStyles()),
9729
9950
  },
9730
9951
  ...(hasCounter && {
9731
9952
  counter: {
@@ -9738,7 +9959,7 @@ const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, isCompact,
9738
9959
  'sr-only': getHiddenTextJssStyle(),
9739
9960
  }),
9740
9961
  // .label / .required
9741
- ...getFunctionalComponentLabelStyles(isDisabled, hideLabel),
9962
+ ...getFunctionalComponentLabelStyles(isDisabled, false, hideLabel),
9742
9963
  // .message
9743
9964
  ...getFunctionalComponentStateMessageStyles(state),
9744
9965
  });