@porsche-design-system/components-react 4.0.0-beta.1 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +84 -6
- package/cjs/lib/components/scroller.wrapper.cjs +3 -3
- package/cjs/lib/components/table.wrapper.cjs +3 -3
- package/cjs/lib/components/tabs-bar.wrapper.cjs +3 -3
- package/cjs/lib/components/tabs.wrapper.cjs +3 -3
- package/esm/lib/components/scroller.wrapper.d.ts +20 -4
- package/esm/lib/components/scroller.wrapper.mjs +3 -3
- package/esm/lib/components/table.wrapper.d.ts +10 -2
- package/esm/lib/components/table.wrapper.mjs +3 -3
- package/esm/lib/components/tabs-bar.wrapper.d.ts +19 -3
- package/esm/lib/components/tabs-bar.wrapper.mjs +3 -3
- package/esm/lib/components/tabs.wrapper.d.ts +19 -3
- package/esm/lib/components/tabs.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +34 -16
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +302 -216
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +3 -12
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +8 -12
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +8 -8
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +3 -2
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +302 -216
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +4 -11
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +9 -13
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +8 -8
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +3 -2
- package/ssr/esm/lib/components/scroller.wrapper.d.ts +20 -4
- package/ssr/esm/lib/components/table.wrapper.d.ts +10 -2
- package/ssr/esm/lib/components/tabs-bar.wrapper.d.ts +19 -3
- package/ssr/esm/lib/components/tabs.wrapper.d.ts +19 -3
- package/ssr/esm/lib/dsr-components/scroller.d.ts +5 -3
- package/ssr/esm/lib/dsr-components/stepper-horizontal.d.ts +3 -2
- package/ssr/esm/lib/dsr-components/tabs-bar.d.ts +6 -6
- package/ssr/esm/lib/dsr-components/tabs.d.ts +2 -1
- package/ssr/esm/lib/types.d.ts +34 -16
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const blurFrosted = 'blur(32px)';
|
|
1
|
+
const blurFrosted$1 = 'blur(32px)';
|
|
2
2
|
|
|
3
3
|
/** @deprecated since v4.0.0, will be removed with next major release. Use backdropFilter: blurFrosted instead */
|
|
4
4
|
const frostedGlassStyle = {
|
|
5
|
-
WebkitBackdropFilter: blurFrosted,
|
|
6
|
-
backdropFilter: blurFrosted,
|
|
5
|
+
WebkitBackdropFilter: blurFrosted$1,
|
|
6
|
+
backdropFilter: blurFrosted$1,
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
/** @deprecated since v4.0.0, will be removed with next major release. Use 2px instead. */
|
|
@@ -76,7 +76,7 @@ const typescale2Xs = '.75rem';
|
|
|
76
76
|
const fontSizeTextXXSmall = typescale2Xs;
|
|
77
77
|
|
|
78
78
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescale variables instead. */
|
|
79
|
-
const fontSizeText = {
|
|
79
|
+
const fontSizeText$1 = {
|
|
80
80
|
xxSmall: fontSizeTextXXSmall,
|
|
81
81
|
xSmall: fontSizeTextXSmall,
|
|
82
82
|
small: fontSizeTextSmall,
|
|
@@ -251,15 +251,15 @@ const durationLg = '.6s';
|
|
|
251
251
|
/** @deprecated since v4.0.0, will be removed with next major release. Use durationLg instead. */
|
|
252
252
|
const motionDurationLong = durationLg;
|
|
253
253
|
|
|
254
|
-
const durationMd = '.4s';
|
|
254
|
+
const durationMd$1 = '.4s';
|
|
255
255
|
|
|
256
256
|
/** @deprecated since v4.0.0, will be removed with next major release. Use durationMd instead. */
|
|
257
|
-
const motionDurationModerate = durationMd;
|
|
257
|
+
const motionDurationModerate = durationMd$1;
|
|
258
258
|
|
|
259
|
-
const durationSm = '.25s';
|
|
259
|
+
const durationSm$1 = '.25s';
|
|
260
260
|
|
|
261
261
|
/** @deprecated since v4.0.0, will be removed with next major release. Use durationSm instead. */
|
|
262
|
-
const motionDurationShort = durationSm;
|
|
262
|
+
const motionDurationShort = durationSm$1;
|
|
263
263
|
|
|
264
264
|
const durationXl = '1.2s';
|
|
265
265
|
|
|
@@ -288,13 +288,6 @@ const dropShadowHighStyle = {
|
|
|
288
288
|
boxShadow: shadowLg,
|
|
289
289
|
};
|
|
290
290
|
|
|
291
|
-
const shadowSm = '0px 3px 8px rgba(0,0,0,.16)';
|
|
292
|
-
|
|
293
|
-
/** @deprecated since v4.0.0, will be removed with next major release. Use boxShadow: shadowSm instead. */
|
|
294
|
-
const dropShadowLowStyle = {
|
|
295
|
-
boxShadow: shadowSm,
|
|
296
|
-
};
|
|
297
|
-
|
|
298
291
|
const spacingFluidLg = 'clamp(32px, 2.75vw + 23px, 76px)';
|
|
299
292
|
|
|
300
293
|
/** @deprecated since v4.0.0, will be removed with next major release. Use spacingFluidLg instead. */
|
|
@@ -310,22 +303,22 @@ const spacingFluidXs = 'clamp(4px, 0.25vw + 3px, 8px)';
|
|
|
310
303
|
/** @deprecated since v4.0.0, will be removed with next major release. Use spacingFluidXs instead. */
|
|
311
304
|
const spacingFluidXSmall = spacingFluidXs;
|
|
312
305
|
|
|
313
|
-
const spacingStaticMd = '16px';
|
|
306
|
+
const spacingStaticMd$1 = '16px';
|
|
314
307
|
|
|
315
308
|
/** @deprecated since v4.0.0, will be removed with next major release. Use spacingStaticMd instead. */
|
|
316
|
-
const spacingStaticMedium = spacingStaticMd;
|
|
309
|
+
const spacingStaticMedium = spacingStaticMd$1;
|
|
317
310
|
|
|
318
|
-
const spacingStaticSm$
|
|
311
|
+
const spacingStaticSm$2 = '8px';
|
|
319
312
|
|
|
320
313
|
/** @deprecated since v4.0.0, will be removed with next major release. Use spacingStaticSm instead. */
|
|
321
|
-
const spacingStaticSmall = spacingStaticSm$
|
|
314
|
+
const spacingStaticSmall = spacingStaticSm$2;
|
|
322
315
|
|
|
323
|
-
const spacingStaticXs$
|
|
316
|
+
const spacingStaticXs$3 = '4px';
|
|
324
317
|
|
|
325
318
|
/** @deprecated since v4.0.0, will be removed with next major release. Use spacingStaticXs instead. */
|
|
326
|
-
const spacingStaticXSmall = spacingStaticXs$
|
|
319
|
+
const spacingStaticXSmall = spacingStaticXs$3;
|
|
327
320
|
|
|
328
|
-
const spacingStaticXs$
|
|
321
|
+
const spacingStaticXs$2 = spacingStaticXs$3;
|
|
329
322
|
|
|
330
323
|
const _displayFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
331
324
|
const _displayFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
@@ -392,6 +385,8 @@ const proseTextSmStyle = {
|
|
|
392
385
|
|
|
393
386
|
const alphaDisabled = 0.4;
|
|
394
387
|
|
|
388
|
+
const blurFrosted = 'var(--p-blur-frosted)';
|
|
389
|
+
|
|
395
390
|
const legacyRadiusLarge = '--_p-legacy-radius-large';
|
|
396
391
|
|
|
397
392
|
const legacyRadiusMedium = '--_p-legacy-radius-medium';
|
|
@@ -474,6 +469,16 @@ const typescaleSm = 'var(--p-typescale-sm)';
|
|
|
474
469
|
|
|
475
470
|
const fontWeightSemibold = 'var(--p-font-weight-semibold)';
|
|
476
471
|
|
|
472
|
+
const durationMd = 'var(--p-duration-md)';
|
|
473
|
+
|
|
474
|
+
const durationSm = 'var(--p-duration-sm)';
|
|
475
|
+
|
|
476
|
+
const spacingStaticMd = 'var(--p-spacing-static-md)';
|
|
477
|
+
|
|
478
|
+
const spacingStaticSm$1 = 'var(--p-spacing-static-sm)';
|
|
479
|
+
|
|
480
|
+
const spacingStaticXs$1 = 'var(--p-spacing-static-xs)';
|
|
481
|
+
|
|
477
482
|
const forcedColorsMediaQuery = (style) => {
|
|
478
483
|
return { '@media (forced-colors: active)': style };
|
|
479
484
|
};
|
|
@@ -511,21 +516,22 @@ const addImportantToEachRule = (input) => {
|
|
|
511
516
|
typeof value === 'object' ? addImportantToEachRule(value) : addImportantToRule(value)),
|
|
512
517
|
result), {});
|
|
513
518
|
};
|
|
514
|
-
const getFocusBaseStyles = () => {
|
|
519
|
+
const getFocusBaseStyles = (offset = 2) => {
|
|
515
520
|
return {
|
|
516
521
|
outline: `${borderWidthBase} solid ${colorFocus}`,
|
|
517
|
-
outlineOffset:
|
|
522
|
+
outlineOffset: `${offset}px`,
|
|
518
523
|
...forcedColorsMediaQuery({
|
|
519
524
|
outlineColor: 'Highlight',
|
|
520
525
|
}),
|
|
521
526
|
};
|
|
522
527
|
};
|
|
523
|
-
const getDisabledBaseStyles = () => {
|
|
528
|
+
const getDisabledBaseStyles = (addForcedColorsDisabledStyles) => {
|
|
524
529
|
return {
|
|
525
530
|
opacity: alphaDisabled,
|
|
526
531
|
...forcedColorsMediaQuery({
|
|
527
532
|
opacity: 1,
|
|
528
533
|
color: 'GrayText',
|
|
534
|
+
...addForcedColorsDisabledStyles,
|
|
529
535
|
}),
|
|
530
536
|
};
|
|
531
537
|
};
|
|
@@ -3764,10 +3770,6 @@ const isDisabledOrLoading = (disabled, loading) => {
|
|
|
3764
3770
|
return disabled || loading;
|
|
3765
3771
|
};
|
|
3766
3772
|
|
|
3767
|
-
const hasWindow = typeof window !== 'undefined';
|
|
3768
|
-
|
|
3769
|
-
const isHighContrastMode = hasWindow && window.matchMedia?.('(forced-colors: active)').matches;
|
|
3770
|
-
|
|
3771
3773
|
const parseJSON = (prop) => {
|
|
3772
3774
|
if (typeof prop === 'string') {
|
|
3773
3775
|
try {
|
|
@@ -3855,6 +3857,8 @@ const mergeDeep = (...objects) => {
|
|
|
3855
3857
|
}
|
|
3856
3858
|
})(); // determine it once
|
|
3857
3859
|
|
|
3860
|
+
const hasWindow = typeof window !== 'undefined';
|
|
3861
|
+
|
|
3858
3862
|
const attributeMutationMap = new Map();
|
|
3859
3863
|
hasWindow &&
|
|
3860
3864
|
new MutationObserver((mutations) => {
|
|
@@ -3901,7 +3905,7 @@ const OPTION_LIST_SAFE_ZONE = 6;
|
|
|
3901
3905
|
|
|
3902
3906
|
const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
|
|
3903
3907
|
|
|
3904
|
-
const prefix = `[Porsche Design System v${"4.0.0-beta.
|
|
3908
|
+
const prefix = `[Porsche Design System v${"4.0.0-beta.2"}]` // this part isn't covered by unit tests
|
|
3905
3909
|
;
|
|
3906
3910
|
const consoleError = (...messages) => {
|
|
3907
3911
|
console.error(prefix, ...messages);
|
|
@@ -4031,8 +4035,8 @@ const cssVarPaddingBlock = '--p-accordion-py';
|
|
|
4031
4035
|
/**
|
|
4032
4036
|
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
4033
4037
|
*/
|
|
4034
|
-
const
|
|
4035
|
-
const backgroundMap = {
|
|
4038
|
+
const iconMarker = 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"/>`);
|
|
4039
|
+
const backgroundMap$1 = {
|
|
4036
4040
|
canvas: colorCanvas,
|
|
4037
4041
|
surface: colorSurface,
|
|
4038
4042
|
frosted: colorFrosted,
|
|
@@ -4107,7 +4111,7 @@ const getComponentCss$19 = (alignMarker, background, isCompact, isOpen, isSticky
|
|
|
4107
4111
|
columnGap: gap,
|
|
4108
4112
|
alignItems: 'center',
|
|
4109
4113
|
padding: `var(${cssVarPaddingBlock}, ${background === 'none' ? '0' : paddingBlock}) var(${cssVarPaddingInline$1}, ${background === 'none' ? '0' : paddingInline})`,
|
|
4110
|
-
background: backgroundMap[background],
|
|
4114
|
+
background: backgroundMap$1[background],
|
|
4111
4115
|
...(background === 'frosted' && frostedGlassStyle),
|
|
4112
4116
|
borderRadius: `var(${legacyRadiusSmall}, ${radiusXl})`,
|
|
4113
4117
|
...forcedColorsMediaQuery({
|
|
@@ -4156,7 +4160,7 @@ const getComponentCss$19 = (alignMarker, background, isCompact, isOpen, isSticky
|
|
|
4156
4160
|
(background === 'canvas' || background === 'surface') && {
|
|
4157
4161
|
position: 'sticky',
|
|
4158
4162
|
top: `var(${cssVarSummaryTop}, var(${cssVarSummaryTopDeprecated}, 0px))`,
|
|
4159
|
-
background: `linear-gradient(180deg,${backgroundMap[background]} 0%,${backgroundMap[background]} 90%,transparent 100%)`,
|
|
4163
|
+
background: `linear-gradient(180deg,${backgroundMap$1[background]} 0%,${backgroundMap$1[background]} 90%,transparent 100%)`,
|
|
4160
4164
|
borderRadius: `var(${legacyRadiusSmall}, ${radiusXl})`,
|
|
4161
4165
|
}),
|
|
4162
4166
|
'&:focus-visible::before': getFocusBaseStyles(),
|
|
@@ -4175,9 +4179,6 @@ const getComponentCss$19 = (alignMarker, background, isCompact, isOpen, isSticky
|
|
|
4175
4179
|
borderRadius: radiusFull,
|
|
4176
4180
|
background: 'transparent',
|
|
4177
4181
|
transition: getTransition('background-color'),
|
|
4178
|
-
...forcedColorsMediaQuery({
|
|
4179
|
-
backgroundColor: 'LinkText',
|
|
4180
|
-
}),
|
|
4181
4182
|
},
|
|
4182
4183
|
'&::after': {
|
|
4183
4184
|
gridArea: `1/${isIconAlignedStart ? '1' : hasSummaryBefore && hasSummaryAfter ? '4' : hasSummaryBefore || hasSummaryAfter ? '3' : '2'}`,
|
|
@@ -4186,8 +4187,8 @@ const getComponentCss$19 = (alignMarker, background, isCompact, isOpen, isSticky
|
|
|
4186
4187
|
width: '1rem',
|
|
4187
4188
|
height: '1rem',
|
|
4188
4189
|
pointerEvents: 'none',
|
|
4189
|
-
WebkitMask: `${
|
|
4190
|
-
mask: `${
|
|
4190
|
+
WebkitMask: `${iconMarker} center/contain no-repeat`, // necessary for Sogou browser support :-)
|
|
4191
|
+
mask: `${iconMarker} center/contain no-repeat`,
|
|
4191
4192
|
background: colorPrimary,
|
|
4192
4193
|
transform: 'rotate3d(0)',
|
|
4193
4194
|
transition: getTransition('transform', duration, easing),
|
|
@@ -4342,6 +4343,12 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4342
4343
|
})), buildResponsiveStyles(size, (sizeValue) => ({
|
|
4343
4344
|
fontSize: getFontSizeText(sizeValue),
|
|
4344
4345
|
}))),
|
|
4346
|
+
...forcedColorsMediaQuery({
|
|
4347
|
+
color: 'LinkText',
|
|
4348
|
+
'&:is(button)': {
|
|
4349
|
+
color: 'ButtonText',
|
|
4350
|
+
},
|
|
4351
|
+
}),
|
|
4345
4352
|
'&::before': {
|
|
4346
4353
|
content: '""',
|
|
4347
4354
|
position: 'absolute', // mobile Safari -> prevent lagging active state
|
|
@@ -4699,7 +4706,11 @@ const getComponentCss$15 = (icon, iconSource, variant, hideLabel, isDisabled, is
|
|
|
4699
4706
|
cursor: 'not-allowed',
|
|
4700
4707
|
}),
|
|
4701
4708
|
...(isDisabled && {
|
|
4702
|
-
...getDisabledBaseStyles(
|
|
4709
|
+
...getDisabledBaseStyles({
|
|
4710
|
+
'&': {
|
|
4711
|
+
boxShadow: 'inset 0 0 0 2px GrayText !important',
|
|
4712
|
+
},
|
|
4713
|
+
}),
|
|
4703
4714
|
}),
|
|
4704
4715
|
},
|
|
4705
4716
|
...(isLoading && {
|
|
@@ -5496,7 +5507,7 @@ const getFunctionalComponentLabelAfterStyles = () => {
|
|
|
5496
5507
|
verticalAlign: 'top',
|
|
5497
5508
|
'&::slotted(*)': {
|
|
5498
5509
|
...addImportantToEachRule({
|
|
5499
|
-
marginInlineStart: spacingStaticXs$
|
|
5510
|
+
marginInlineStart: spacingStaticXs$2,
|
|
5500
5511
|
})
|
|
5501
5512
|
},
|
|
5502
5513
|
},
|
|
@@ -5532,8 +5543,8 @@ const getFunctionalComponentLabelStyles = (isDisabled, isLoading, hideLabel, add
|
|
|
5532
5543
|
cursor: 'unset',
|
|
5533
5544
|
fontSize: typescaleXs,
|
|
5534
5545
|
color: colorContrastHigh,
|
|
5535
|
-
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, { marginTop: `-${spacingStaticXs$
|
|
5536
|
-
marginTop: `-${spacingStaticXs$
|
|
5546
|
+
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, { marginTop: `-${spacingStaticXs$2}` })),
|
|
5547
|
+
marginTop: `-${spacingStaticXs$2}`,
|
|
5537
5548
|
},
|
|
5538
5549
|
...additionalDefaultJssStyle,
|
|
5539
5550
|
},
|
|
@@ -7096,9 +7107,7 @@ const getComponentCss$T = (name, source, color, size) => {
|
|
|
7096
7107
|
mask: `url("${buildIconUrl(source || name)}") center/contain no-repeat`,
|
|
7097
7108
|
aspectRatio: '1/1',
|
|
7098
7109
|
background: 'currentcolor', // necessary for proper color inheritance
|
|
7099
|
-
|
|
7100
|
-
background: 'CanvasText',
|
|
7101
|
-
}),
|
|
7110
|
+
forcedColorAdjust: 'none',
|
|
7102
7111
|
...(isFlippableIcon(name, source) && {
|
|
7103
7112
|
'&(:dir(rtl))': {
|
|
7104
7113
|
transform: 'scaleX(-1)',
|
|
@@ -7543,6 +7552,10 @@ const anchorJssStyle = {
|
|
|
7543
7552
|
inset: 0,
|
|
7544
7553
|
zIndex: 1, // necessary to be on top of img
|
|
7545
7554
|
borderRadius: `var(${legacyRadiusLarge}, ${radius4Xl})`,
|
|
7555
|
+
...forcedColorsMediaQuery({
|
|
7556
|
+
forcedColorAdjust: 'none',
|
|
7557
|
+
boxShadow: 'inset 0 0 0 2px LinkText',
|
|
7558
|
+
}),
|
|
7546
7559
|
};
|
|
7547
7560
|
const getMultilineEllipsis = (lineClamp) => {
|
|
7548
7561
|
return {
|
|
@@ -8590,109 +8603,161 @@ const getComponentCss$t = (isDisabled, isLoading, hideLabel, state, isCompact, d
|
|
|
8590
8603
|
});
|
|
8591
8604
|
};
|
|
8592
8605
|
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
|
|
8599
|
-
|
|
8600
|
-
|
|
8601
|
-
|
|
8602
|
-
|
|
8603
|
-
|
|
8606
|
+
/**
|
|
8607
|
+
* Generates a CSS linear-gradient mask string for smooth edge fading
|
|
8608
|
+
* using smoothstep easing.
|
|
8609
|
+
*
|
|
8610
|
+
* @param fadeEdges - Which edges to fade.
|
|
8611
|
+
* @param edgeLength - Size of the fully transparent area at the edge (px).
|
|
8612
|
+
* @param fadeLength - Size of the transition area (px).
|
|
8613
|
+
* @param steps - Number of gradient stops (more = smoother, 8–12 is plenty).
|
|
8614
|
+
* @returns CSS linear-gradient string.
|
|
8615
|
+
*/
|
|
8616
|
+
const getSmoothMask = (fadeEdges, edgeLength = 24, fadeLength = 96, steps = 20) => {
|
|
8617
|
+
if (fadeEdges === 'none') {
|
|
8618
|
+
return 'linear-gradient(black,black)';
|
|
8619
|
+
}
|
|
8620
|
+
const fullLength = edgeLength + fadeLength;
|
|
8621
|
+
const leftStops = [];
|
|
8622
|
+
const rightStops = [];
|
|
8623
|
+
for (let i = 1; i < steps; i++) {
|
|
8624
|
+
const t = i / steps;
|
|
8625
|
+
const alpha = t * t * t * (t * (t * 6 - 15) + 10);
|
|
8626
|
+
leftStops.push(`rgb(0 0 0/${alpha.toFixed(3)}) ${(edgeLength + fadeLength * t).toFixed(0)}px`);
|
|
8627
|
+
rightStops.push(`rgb(0 0 0/${(1 - alpha).toFixed(3)}) calc(100% - ${(fullLength - fadeLength * t).toFixed(0)}px)`);
|
|
8628
|
+
}
|
|
8629
|
+
const left = `transparent 0px,transparent ${edgeLength}px,${leftStops.join(',')},black ${fullLength}px`;
|
|
8630
|
+
const right = `black calc(100% - ${fullLength}px),${rightStops.join(',')},transparent calc(100% - ${edgeLength}px),transparent 100%`;
|
|
8631
|
+
const gradients = {
|
|
8632
|
+
left: `linear-gradient(to right,${left},black 100%)`,
|
|
8633
|
+
right: `linear-gradient(to right,black 0%,${right})`,
|
|
8634
|
+
both: `linear-gradient(to right,${left},${right})`,
|
|
8635
|
+
};
|
|
8636
|
+
return gradients[fadeEdges];
|
|
8637
|
+
};
|
|
8638
|
+
|
|
8639
|
+
/**
|
|
8640
|
+
* @css-variable {"name": "--p-scroller-gap", "description": "Defines the gap between slotted nodes.", "defaultValue": "8px"}
|
|
8641
|
+
*/
|
|
8642
|
+
const cssVarGap = '--p-scroller-gap';
|
|
8643
|
+
/**
|
|
8644
|
+
* @css-variable {"name": "--p-scroller-indicator-top", "description": "Defines the distance from the top of the viewport at which the indicator sticks when scrolling down and `sticky` is enabled.", "defaultValue": "0px"}
|
|
8645
|
+
*/
|
|
8646
|
+
const cssVarIndicatorTop = '--p-scroller-indicator-top';
|
|
8647
|
+
/**
|
|
8648
|
+
* @css-variable {"name": "--p-scroller-indicator-bottom", "description": "Defines the distance from the bottom of the viewport at which the indicator sticks when scrolling up and `sticky` is enabled.", "defaultValue": "0px"}
|
|
8649
|
+
*/
|
|
8650
|
+
const cssVarIndicatorBottom = '--p-scroller-indicator-bottom';
|
|
8651
|
+
const iconPrev = getInlineSVGBackgroundImage(`<path d="m8.875 12v-.001l.006-.005 5.476-6.494.768.642-4.94 5.858 4.939 5.858-.768.642-5.477-6.497z"/>`);
|
|
8652
|
+
const iconNext = getInlineSVGBackgroundImage(`<path d="m15.121 11.997-5.477-6.497-.769.642 4.94 5.858-4.94 5.858.768.642 5.476-6.494.006-.005v-.001z"/>`);
|
|
8653
|
+
const scrollbarWidth = '12px';
|
|
8654
|
+
const safeZone = '4px';
|
|
8655
|
+
const getScrollIndicatorStyles = (direction, isVisible, isSticky, hasScrollbar, isCompact) => {
|
|
8656
|
+
const isPrev = direction === 'prev';
|
|
8657
|
+
const iconMask = `${isPrev ? iconPrev : iconNext} center/contain no-repeat`;
|
|
8658
|
+
return {
|
|
8659
|
+
gridArea: isPrev ? '1/1' : '1/3',
|
|
8660
|
+
zIndex: 1, // ensure that indicators are above the scroll area
|
|
8661
|
+
...(isSticky && {
|
|
8662
|
+
position: 'sticky',
|
|
8663
|
+
top: `var(${cssVarIndicatorTop},0px)`,
|
|
8664
|
+
bottom: `var(${cssVarIndicatorBottom},0px)`,
|
|
8665
|
+
}),
|
|
8666
|
+
...(hasScrollbar && {
|
|
8667
|
+
marginTop: `calc(-1 * ${scrollbarWidth})`,
|
|
8668
|
+
}),
|
|
8669
|
+
display: 'grid',
|
|
8670
|
+
alignSelf: 'center',
|
|
8671
|
+
width: '1.5rem',
|
|
8672
|
+
height: '1.5rem',
|
|
8673
|
+
...(!isCompact && {
|
|
8674
|
+
padding: spacingStaticXs$1,
|
|
8675
|
+
}),
|
|
8676
|
+
cursor: 'pointer',
|
|
8677
|
+
opacity: isVisible ? 1 : 0,
|
|
8678
|
+
visibility: isVisible ? 'inherit' : 'hidden',
|
|
8679
|
+
transform: `translate3d(${isVisible ? '0' : `${isPrev ? `calc(-1 * ${spacingStaticSm$1})` : spacingStaticSm$1}`},0,0)`,
|
|
8680
|
+
transition: `${getTransition('transform')},${getTransition('opacity')},visibility 0s linear ${isVisible ? '0s' : `var(${cssVariableTransitionDuration},${durationSm})`}`,
|
|
8681
|
+
'&:dir(rtl)': {
|
|
8682
|
+
gridArea: isPrev ? '1/3' : '1/1',
|
|
8683
|
+
},
|
|
8684
|
+
...hoverMediaQuery({
|
|
8685
|
+
'&:hover::after': {
|
|
8686
|
+
// do the transform on the pseudo-element to prevent the click area from moving when hovered
|
|
8687
|
+
transform: `translate3d(${isPrev ? `calc(-1 * ${spacingStaticXs$1})` : spacingStaticXs$1},0,0)`,
|
|
8688
|
+
},
|
|
8689
|
+
}),
|
|
8690
|
+
'&::after': {
|
|
8691
|
+
content: '""',
|
|
8692
|
+
WebkitMask: iconMask, // necessary for Sogou browser support :-)
|
|
8693
|
+
mask: iconMask,
|
|
8694
|
+
background: colorPrimary,
|
|
8695
|
+
transition: getTransition('transform'),
|
|
8696
|
+
},
|
|
8604
8697
|
};
|
|
8698
|
+
};
|
|
8699
|
+
const getComponentCss$s = (isIndicatorPrevVisible, // can be undefined in ssr context
|
|
8700
|
+
isIndicatorNextVisible, // can be undefined in ssr context
|
|
8701
|
+
isSticky, hasScrollbar, isCompact) => {
|
|
8702
|
+
const fadeEdges = !isIndicatorPrevVisible && !isIndicatorNextVisible
|
|
8703
|
+
? 'none'
|
|
8704
|
+
: !isIndicatorPrevVisible
|
|
8705
|
+
? 'right'
|
|
8706
|
+
: !isIndicatorNextVisible
|
|
8707
|
+
? 'left'
|
|
8708
|
+
: 'both';
|
|
8709
|
+
const mask = `${getSmoothMask(fadeEdges)} 0 0/auto no-repeat${hasScrollbar ? `,linear-gradient(black,black) 0 bottom/auto ${scrollbarWidth} no-repeat` : ''}`;
|
|
8605
8710
|
return getCss({
|
|
8606
8711
|
'@global': {
|
|
8607
8712
|
':host': {
|
|
8608
8713
|
display: 'block',
|
|
8714
|
+
borderRadius: `var(${legacyRadiusSmall},${radiusLg})`, // needs to be overwritable by tabs-bar to improve focus appearance
|
|
8609
8715
|
...addImportantToEachRule({
|
|
8610
|
-
height: 'inherit',
|
|
8611
8716
|
...hostHiddenStyles,
|
|
8612
8717
|
}),
|
|
8613
8718
|
},
|
|
8614
|
-
|
|
8719
|
+
slot: {
|
|
8720
|
+
gridArea: '1/2',
|
|
8721
|
+
position: 'relative', // necessary for tabs bar animation
|
|
8722
|
+
display: 'inline-flex',
|
|
8723
|
+
gap: `var(${cssVarGap},${isCompact ? spacingStaticXs$1 : spacingStaticSm$1})`,
|
|
8724
|
+
},
|
|
8615
8725
|
},
|
|
8616
8726
|
root: {
|
|
8617
|
-
position: 'relative',
|
|
8618
8727
|
display: 'grid',
|
|
8619
|
-
gridTemplateColumns:
|
|
8620
|
-
|
|
8621
|
-
|
|
8728
|
+
gridTemplateColumns: `auto minmax(0,1fr) auto`,
|
|
8729
|
+
alignItems: 'center',
|
|
8730
|
+
borderRadius: 'inherit',
|
|
8731
|
+
'&:has(.scroll:focus-visible)': getFocusBaseStyles(), // delegating the focus ensures mask does not cut off the focus ring
|
|
8622
8732
|
},
|
|
8623
|
-
|
|
8624
|
-
gridArea: '1
|
|
8625
|
-
|
|
8733
|
+
scroll: {
|
|
8734
|
+
gridArea: '1/1/1/-1',
|
|
8735
|
+
zIndex: 0, // ensure that scroll area is behind the indicators
|
|
8736
|
+
display: 'grid',
|
|
8737
|
+
gridTemplateColumns: `${safeZone} minmax(auto,1fr) ${safeZone}`,
|
|
8738
|
+
margin: `calc(-1 * ${safeZone})`, // compensate padding to ensure that `:host` is aligned with other elements
|
|
8739
|
+
padding: `${safeZone} 0px${hasScrollbar ? ` calc(${safeZone} + ${scrollbarWidth})` : ''}`, // ensure enough space is available for focus ring of slotted elements (horizontal space is given by `.sentinel`)
|
|
8740
|
+
outline: 'none', // focus ring is applied to `.root`, it would be cut off by the mask if applied to `.scroll`
|
|
8626
8741
|
overflow: 'auto hidden',
|
|
8627
|
-
...(
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
: isPrevHidden
|
|
8631
|
-
? 'linear-gradient(90deg,#000 calc(100% - 40px), #0000 calc(100% - 8px)) alpha'
|
|
8632
|
-
: 'linear-gradient(90deg,#0000 8px,#000 40px calc(100% - 40px),#0000 calc(100% - 8px)) alpha',
|
|
8742
|
+
...(fadeEdges !== 'none' && {
|
|
8743
|
+
WebkitMask: mask, // necessary for Sogou browser support :-)
|
|
8744
|
+
mask,
|
|
8633
8745
|
}),
|
|
8634
|
-
|
|
8635
|
-
// If scrollbar is disabled - hide scrollbar
|
|
8636
|
-
msOverflowStyle: 'none' /* IE and Edge */,
|
|
8637
|
-
scrollbarWidth: 'none' /* Firefox */,
|
|
8638
|
-
'&::-webkit-scrollbar': {
|
|
8639
|
-
display: 'none',
|
|
8640
|
-
},
|
|
8641
|
-
}),
|
|
8642
|
-
},
|
|
8643
|
-
// Extra wrapper needed to compensate different offset parent calculation depending on browser.
|
|
8644
|
-
// Needed for position of status bar.
|
|
8645
|
-
'scroll-wrapper': {
|
|
8646
|
-
position: 'relative',
|
|
8647
|
-
display: 'inline-flex',
|
|
8648
|
-
minHeight: '28px',
|
|
8649
|
-
minWidth: '100%',
|
|
8650
|
-
verticalAlign: 'top',
|
|
8651
|
-
borderRadius: `var(${legacyRadiusSmall}, ${radiusSm})`,
|
|
8652
|
-
'&:focus-visible': getFocusBaseStyles(),
|
|
8746
|
+
scrollbarWidth: hasScrollbar ? 'thin' : 'none',
|
|
8653
8747
|
},
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
width: '1px',
|
|
8748
|
+
// as soon as `@container scroll-state(scrollable: left)` has better browser support we can get rid of sentinel and IntersectionObserver
|
|
8749
|
+
sentinel: {
|
|
8750
|
+
width: safeZone,
|
|
8658
8751
|
visibility: 'hidden',
|
|
8659
|
-
'&:first-of-type': {
|
|
8660
|
-
|
|
8661
|
-
},
|
|
8662
|
-
'&:last-of-type': {
|
|
8663
|
-
right: 0,
|
|
8752
|
+
'&:first-of-type:dir(rtl)': {
|
|
8753
|
+
gridArea: '1/3',
|
|
8664
8754
|
},
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
...actionPrevNextStyles,
|
|
8668
|
-
left: '-1px', // ensures that the gradient always overlays the content (e.g. when zoomed)
|
|
8669
|
-
justifyContent: 'flex-start',
|
|
8670
|
-
visibility: isPrevHidden ? 'hidden' : 'inherit',
|
|
8671
|
-
'& .action-button': {
|
|
8672
|
-
marginLeft: '8px',
|
|
8673
|
-
// hide buttons on mobile (actually devices not supporting hover)
|
|
8674
|
-
...hoverMediaQuery({
|
|
8675
|
-
visibility: isPrevHidden ? 'hidden' : 'inherit',
|
|
8676
|
-
}),
|
|
8677
|
-
},
|
|
8678
|
-
},
|
|
8679
|
-
'action-next': {
|
|
8680
|
-
...actionPrevNextStyles,
|
|
8681
|
-
right: '-1px', // ensures that the gradient always overlays the content (e.g. when zoomed)
|
|
8682
|
-
justifyContent: 'flex-end',
|
|
8683
|
-
visibility: isNextHidden ? 'hidden' : 'inherit',
|
|
8684
|
-
'& .action-button': {
|
|
8685
|
-
marginRight: '8px',
|
|
8686
|
-
// hide buttons on mobile (actually devices not supporting hover)
|
|
8687
|
-
...hoverMediaQuery({
|
|
8688
|
-
visibility: isNextHidden ? 'hidden' : 'inherit',
|
|
8689
|
-
}),
|
|
8755
|
+
'&:last-of-type:dir(rtl)': {
|
|
8756
|
+
gridArea: '1/1',
|
|
8690
8757
|
},
|
|
8691
8758
|
},
|
|
8692
|
-
'
|
|
8693
|
-
|
|
8694
|
-
...dropShadowLowStyle,
|
|
8695
|
-
},
|
|
8759
|
+
prev: getScrollIndicatorStyles('prev', !!isIndicatorPrevVisible, isSticky, hasScrollbar, isCompact),
|
|
8760
|
+
next: getScrollIndicatorStyles('next', !!isIndicatorNextVisible, isSticky, hasScrollbar, isCompact),
|
|
8696
8761
|
});
|
|
8697
8762
|
};
|
|
8698
8763
|
|
|
@@ -9051,9 +9116,6 @@ const getComponentCss$l = (state, disabled) => {
|
|
|
9051
9116
|
fontSize: 'inherit',
|
|
9052
9117
|
...hostHiddenStyles,
|
|
9053
9118
|
...(isDisabled && getDisabledBaseStyles()),
|
|
9054
|
-
'&(:not(:last-of-type))': {
|
|
9055
|
-
marginInlineEnd: spacingFluidXSmall,
|
|
9056
|
-
},
|
|
9057
9119
|
}),
|
|
9058
9120
|
},
|
|
9059
9121
|
...preventFoucOfNestedElementsStyles,
|
|
@@ -9083,6 +9145,15 @@ const getComponentCss$l = (state, disabled) => {
|
|
|
9083
9145
|
},
|
|
9084
9146
|
})),
|
|
9085
9147
|
'&:focus-visible': getFocusBaseStyles(),
|
|
9148
|
+
...forcedColorsMediaQuery({
|
|
9149
|
+
...(isStateCurrent && {
|
|
9150
|
+
outline: '1px solid CanvasText',
|
|
9151
|
+
}),
|
|
9152
|
+
...(isDisabled && {
|
|
9153
|
+
color: 'GrayText',
|
|
9154
|
+
borderColor: 'GrayText',
|
|
9155
|
+
}),
|
|
9156
|
+
}),
|
|
9086
9157
|
},
|
|
9087
9158
|
},
|
|
9088
9159
|
icon: {
|
|
@@ -9090,9 +9161,15 @@ const getComponentCss$l = (state, disabled) => {
|
|
|
9090
9161
|
fontSize: 'inherit', // necessary because of all: unset
|
|
9091
9162
|
width: fontLineHeight,
|
|
9092
9163
|
height: fontLineHeight,
|
|
9164
|
+
forcedColorAdjust: 'none',
|
|
9093
9165
|
...(isStateCurrentOrUndefined && {
|
|
9094
9166
|
display: 'grid',
|
|
9095
9167
|
backgroundImage: `radial-gradient(circle, ${colorPrimary} 60%, transparent 62%)`,
|
|
9168
|
+
...(isDisabled && {
|
|
9169
|
+
...forcedColorsMediaQuery({
|
|
9170
|
+
backgroundImage: 'radial-gradient(circle, GrayText 60%, transparent 62%)',
|
|
9171
|
+
}),
|
|
9172
|
+
}),
|
|
9096
9173
|
'&::before': {
|
|
9097
9174
|
content: '""',
|
|
9098
9175
|
...Array.from(new Array(9)).reduce((result, _, i) => ({
|
|
@@ -9114,7 +9191,7 @@ const getComponentCss$k = (size) => {
|
|
|
9114
9191
|
return getCss({
|
|
9115
9192
|
'@global': {
|
|
9116
9193
|
':host': {
|
|
9117
|
-
display: '
|
|
9194
|
+
display: 'grid',
|
|
9118
9195
|
...addImportantToEachRule({
|
|
9119
9196
|
...hostHiddenStyles,
|
|
9120
9197
|
}),
|
|
@@ -9122,8 +9199,9 @@ const getComponentCss$k = (size) => {
|
|
|
9122
9199
|
...preventFoucOfNestedElementsStyles,
|
|
9123
9200
|
},
|
|
9124
9201
|
scroller: {
|
|
9202
|
+
placeSelf: 'flex-start', // ensures scroller doesn't get stretched in x- or y-axis in case the stepper-horizontal is taller than the scroller (e.g. when placed in flex or grid context)
|
|
9125
9203
|
...textSmallStyle,
|
|
9126
|
-
...buildResponsiveStyles(size, (s) => ({ fontSize: fontSizeText[s] })),
|
|
9204
|
+
...buildResponsiveStyles(size, (s) => ({ fontSize: fontSizeText$1[s] })),
|
|
9127
9205
|
},
|
|
9128
9206
|
});
|
|
9129
9207
|
};
|
|
@@ -9265,19 +9343,31 @@ const getComponentCss$i = () => {
|
|
|
9265
9343
|
});
|
|
9266
9344
|
};
|
|
9267
9345
|
|
|
9346
|
+
/**
|
|
9347
|
+
* @css-variable {"name": "--p-table-scroll-indicator-top", "description": "Defines the distance from the top of the viewport at which the scroll indicator sticks when scrolling down and `sticky` is enabled.", "defaultValue": "0px"}
|
|
9348
|
+
*/
|
|
9349
|
+
const cssVarScrollIndicatorTop = '--p-table-scroll-indicator-top';
|
|
9350
|
+
/**
|
|
9351
|
+
* @css-variable {"name": "--p-table-scroll-indicator-bottom", "description": "Defines the distance from the bottom of the viewport at which the scroll indicator sticks when scrolling up and `sticky` is enabled.", "defaultValue": "0px"}
|
|
9352
|
+
*/
|
|
9353
|
+
const cssVarScrollIndicatorBottom = '--p-table-scroll-indicator-bottom';
|
|
9268
9354
|
const cssVariableTablePadding = '--_a';
|
|
9269
9355
|
const cssVariableTableHoverColor = '--_b';
|
|
9270
9356
|
const cssVariableTableBorderColor = '--_c';
|
|
9271
9357
|
const cssVariableTableBorderWidth = '--_d';
|
|
9272
|
-
const getComponentCss$h = (
|
|
9358
|
+
const getComponentCss$h = (isCompact, layout) => {
|
|
9273
9359
|
return getCss({
|
|
9274
9360
|
'@global': {
|
|
9275
9361
|
':host': {
|
|
9276
9362
|
display: 'block',
|
|
9277
9363
|
...addImportantToEachRule({
|
|
9364
|
+
'--p-scroller-indicator-top': `var(${cssVarScrollIndicatorTop},0px)`,
|
|
9365
|
+
'--p-scroller-indicator-bottom': `var(${cssVarScrollIndicatorBottom},0px)`,
|
|
9278
9366
|
[cssVariableTableHoverColor]: colorFrosted,
|
|
9279
9367
|
[cssVariableTableBorderColor]: colorContrastLow,
|
|
9280
|
-
...(
|
|
9368
|
+
...(isCompact && {
|
|
9369
|
+
[cssVariableTablePadding]: spacingStaticSmall,
|
|
9370
|
+
}),
|
|
9281
9371
|
...hostHiddenStyles,
|
|
9282
9372
|
...textSmallStyle,
|
|
9283
9373
|
color: colorPrimary,
|
|
@@ -9457,105 +9547,100 @@ const getComponentCss$c = () => {
|
|
|
9457
9547
|
});
|
|
9458
9548
|
};
|
|
9459
9549
|
|
|
9460
|
-
const
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
...forcedColorsMediaQuery({
|
|
9469
|
-
background: 'ActiveBorder',
|
|
9470
|
-
}),
|
|
9550
|
+
const backgroundMap = {
|
|
9551
|
+
canvas: colorCanvas,
|
|
9552
|
+
surface: colorSurface,
|
|
9553
|
+
frosted: colorFrosted,
|
|
9554
|
+
};
|
|
9555
|
+
const fontSizeText = {
|
|
9556
|
+
small: typescaleSm,
|
|
9557
|
+
medium: typescaleMd,
|
|
9471
9558
|
};
|
|
9472
|
-
const getComponentCss$b = (size,
|
|
9559
|
+
const getComponentCss$b = (background, size, isCompact) => {
|
|
9473
9560
|
return getCss({
|
|
9474
9561
|
'@global': {
|
|
9475
9562
|
':host': {
|
|
9476
|
-
display: '
|
|
9563
|
+
display: 'grid',
|
|
9477
9564
|
...addImportantToEachRule({
|
|
9478
|
-
position: 'relative',
|
|
9565
|
+
position: 'relative', // necessary for the bar animation to calculate the tab items position correctly
|
|
9479
9566
|
...hostHiddenStyles,
|
|
9480
9567
|
}),
|
|
9481
9568
|
},
|
|
9482
9569
|
...preventFoucOfNestedElementsStyles,
|
|
9483
9570
|
...addImportantToEachRule({
|
|
9484
|
-
'::slotted
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9494
|
-
|
|
9495
|
-
|
|
9496
|
-
|
|
9497
|
-
|
|
9498
|
-
|
|
9499
|
-
|
|
9500
|
-
|
|
9571
|
+
'::slotted': {
|
|
9572
|
+
'&(a),&(button)': {
|
|
9573
|
+
all: 'unset',
|
|
9574
|
+
padding: isCompact ? `2px ${spacingStaticSm$1}` : `12px ${spacingStaticMd}`,
|
|
9575
|
+
whiteSpace: 'nowrap',
|
|
9576
|
+
cursor: 'pointer',
|
|
9577
|
+
borderRadius: `var(${legacyRadiusSmall}, ${radiusFull})`,
|
|
9578
|
+
...(background === 'none' && {
|
|
9579
|
+
background: colorFrosted,
|
|
9580
|
+
}),
|
|
9581
|
+
font: `${typescaleSm} / ${leadingNormal} ${fontPorscheNext}`,
|
|
9582
|
+
...buildResponsiveStyles(size, (sizeValue) => ({
|
|
9583
|
+
fontSize: fontSizeText[sizeValue],
|
|
9584
|
+
})),
|
|
9585
|
+
color: colorPrimary,
|
|
9586
|
+
transition: `${getTransition('color', 'moderate')}, ${getTransition('background-color')}`,
|
|
9587
|
+
},
|
|
9588
|
+
'&(a:focus-visible),&(button:focus-visible)': getFocusBaseStyles(),
|
|
9501
9589
|
...hoverMediaQuery({
|
|
9502
|
-
'
|
|
9503
|
-
|
|
9504
|
-
position: 'absolute',
|
|
9505
|
-
inset: '-2px -4px',
|
|
9506
|
-
borderRadius: `var(${legacyRadiusSmall}, ${radiusSm})`,
|
|
9507
|
-
zIndex: -1, // Stack the pseudo-element behind the button to avoid overlay of frosted-glass effect with label text
|
|
9508
|
-
transition: getTransition('background-color'),
|
|
9590
|
+
'&(a:not([aria-current="true"]):hover),&(button:not([aria-selected="true"]):hover)': {
|
|
9591
|
+
background: colorFrostedStrong,
|
|
9509
9592
|
},
|
|
9510
9593
|
}),
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
background: colorFrosted,
|
|
9594
|
+
'&(a[aria-current="true"]),&(button[aria-selected="true"])': {
|
|
9595
|
+
color: colorCanvas,
|
|
9596
|
+
background: colorPrimary,
|
|
9597
|
+
transition: `${getTransition('color', 'moderate')}, background-color 0s linear ${durationMd}`, // the background shall be changed immediately after the bar transition has finished
|
|
9516
9598
|
},
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9599
|
+
...forcedColorsMediaQuery({
|
|
9600
|
+
'&(a),&(button)': {
|
|
9601
|
+
forcedColorAdjust: 'none',
|
|
9602
|
+
background: 'Canvas',
|
|
9603
|
+
},
|
|
9604
|
+
'&(a)': {
|
|
9605
|
+
color: 'LinkText',
|
|
9606
|
+
boxShadow: 'inset 0 0 0 2px LinkText',
|
|
9607
|
+
},
|
|
9608
|
+
'&(button)': {
|
|
9609
|
+
color: 'ButtonText',
|
|
9610
|
+
boxShadow: 'inset 0 0 0 2px ButtonBorder',
|
|
9611
|
+
},
|
|
9612
|
+
'&(a[aria-current="true"]),&(button[aria-selected="true"])': {
|
|
9613
|
+
transition: 'unset',
|
|
9614
|
+
},
|
|
9615
|
+
}),
|
|
9532
9616
|
},
|
|
9533
9617
|
}),
|
|
9534
9618
|
},
|
|
9535
9619
|
scroller: {
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
...
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9620
|
+
placeSelf: 'flex-start', // ensures scroller doesn't get stretched in x- or y-axis in case the tabs-bar is taller than the scroller (e.g. when placed in flex or grid context)
|
|
9621
|
+
borderRadius: `var(${legacyRadiusSmall}, ${radiusFull})`,
|
|
9622
|
+
...(background !== 'none' && {
|
|
9623
|
+
background: backgroundMap[background],
|
|
9624
|
+
padding: spacingStaticXs$1,
|
|
9625
|
+
...forcedColorsMediaQuery({
|
|
9626
|
+
forcedColorAdjust: 'none',
|
|
9627
|
+
outline: '1px solid CanvasText',
|
|
9628
|
+
}),
|
|
9629
|
+
}),
|
|
9630
|
+
...(background === 'frosted' && {
|
|
9631
|
+
WebkitBackdropFilter: blurFrosted,
|
|
9632
|
+
backdropFilter: blurFrosted,
|
|
9633
|
+
}),
|
|
9545
9634
|
},
|
|
9546
|
-
// moving bar
|
|
9547
9635
|
bar: {
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
to: {
|
|
9557
|
-
visibility: 'hidden',
|
|
9558
|
-
},
|
|
9636
|
+
position: 'absolute',
|
|
9637
|
+
insetInlineStart: 0, // necessary for the bar animation to calculate the tab items position correctly in rtl mode
|
|
9638
|
+
width: '0px', // ensures element is not visible after `.animate()` has finished
|
|
9639
|
+
height: '100%',
|
|
9640
|
+
zIndex: -1,
|
|
9641
|
+
pointerEvents: 'none',
|
|
9642
|
+
borderRadius: `var(${legacyRadiusSmall}, ${radiusFull})`,
|
|
9643
|
+
background: colorPrimary,
|
|
9559
9644
|
},
|
|
9560
9645
|
});
|
|
9561
9646
|
};
|
|
@@ -9588,7 +9673,7 @@ const getComponentCss$9 = () => {
|
|
|
9588
9673
|
...preventFoucOfNestedElementsStyles,
|
|
9589
9674
|
},
|
|
9590
9675
|
root: {
|
|
9591
|
-
marginBottom:
|
|
9676
|
+
marginBottom: spacingStaticSm$1,
|
|
9592
9677
|
},
|
|
9593
9678
|
});
|
|
9594
9679
|
};
|
|
@@ -9725,6 +9810,7 @@ const getComponentCss$7 = (variant, compact, isFocusable, hasIcon) => {
|
|
|
9725
9810
|
outline: '2px solid CanvasText',
|
|
9726
9811
|
outlineOffset: '-2px',
|
|
9727
9812
|
backgroundColor: 'Canvas',
|
|
9813
|
+
color: 'CanvasText',
|
|
9728
9814
|
}),
|
|
9729
9815
|
},
|
|
9730
9816
|
'::slotted': addImportantToEachRule({
|