@porsche-design-system/components-react 4.0.0-beta.0 → 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 +242 -7
- package/cjs/lib/components/accordion.wrapper.cjs +3 -3
- 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/accordion.wrapper.d.ts +29 -13
- package/esm/lib/components/accordion.wrapper.mjs +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 +137 -105
- package/package.json +13 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +691 -384
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +3 -12
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.cjs +4 -4
- 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/accordion.cjs +15 -10
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +8 -11
- 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 +691 -384
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +4 -11
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.mjs +4 -4
- 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/accordion.mjs +15 -10
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +9 -12
- 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/accordion.wrapper.d.ts +29 -13
- 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/accordion.d.ts +8 -2
- 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 +137 -105
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const blurFrosted = 'blur(32px)';
|
|
3
|
+
const blurFrosted$1 = 'blur(32px)';
|
|
4
4
|
|
|
5
5
|
/** @deprecated since v4.0.0, will be removed with next major release. Use backdropFilter: blurFrosted instead */
|
|
6
6
|
const frostedGlassStyle = {
|
|
7
|
-
WebkitBackdropFilter: blurFrosted,
|
|
8
|
-
backdropFilter: blurFrosted,
|
|
7
|
+
WebkitBackdropFilter: blurFrosted$1,
|
|
8
|
+
backdropFilter: blurFrosted$1,
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
/** @deprecated since v4.0.0, will be removed with next major release. Use 2px instead. */
|
|
@@ -14,15 +14,15 @@ const borderWidthBase = '2px';
|
|
|
14
14
|
/** @deprecated since v4.0.0, will be removed with next major release. Use 1px instead. */
|
|
15
15
|
const borderWidthThin = '1px';
|
|
16
16
|
|
|
17
|
-
const fontPorscheNext = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
|
|
17
|
+
const fontPorscheNext$1 = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
|
|
18
18
|
|
|
19
19
|
/** @deprecated since v4.0.0, will be removed with next major release. Use fontPorscheNext instead. */
|
|
20
|
-
const fontFamily = fontPorscheNext;
|
|
20
|
+
const fontFamily = fontPorscheNext$1;
|
|
21
21
|
|
|
22
|
-
const leadingNormal = 'calc(6px + 2.125ex)';
|
|
22
|
+
const leadingNormal$1 = 'calc(6px + 2.125ex)';
|
|
23
23
|
|
|
24
24
|
/** @deprecated since v4.0.0, will be removed with next major release. Use leadingNormal instead */
|
|
25
|
-
const fontLineHeight = leadingNormal;
|
|
25
|
+
const fontLineHeight = leadingNormal$1;
|
|
26
26
|
|
|
27
27
|
const fontSizeDisplayLarge = 'clamp(2.28rem, 5.2vw + 1.24rem, 7.48rem)';
|
|
28
28
|
|
|
@@ -35,15 +35,15 @@ const typescaleLg = 'clamp(1.27rem, 0.51vw + 1.16rem, 1.78rem)';
|
|
|
35
35
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleLg instead. */
|
|
36
36
|
const fontSizeHeadingLarge = typescaleLg;
|
|
37
37
|
|
|
38
|
-
const typescaleMd = 'clamp(1.13rem, 0.21vw + 1.08rem, 1.33rem)';
|
|
38
|
+
const typescaleMd$1 = 'clamp(1.13rem, 0.21vw + 1.08rem, 1.33rem)';
|
|
39
39
|
|
|
40
40
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleMd instead. */
|
|
41
|
-
const fontSizeHeadingMedium = typescaleMd;
|
|
41
|
+
const fontSizeHeadingMedium = typescaleMd$1;
|
|
42
42
|
|
|
43
|
-
const typescaleSm = '1rem';
|
|
43
|
+
const typescaleSm$1 = '1rem';
|
|
44
44
|
|
|
45
45
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleSm instead. */
|
|
46
|
-
const fontSizeHeadingSmall = typescaleSm;
|
|
46
|
+
const fontSizeHeadingSmall = typescaleSm$1;
|
|
47
47
|
|
|
48
48
|
const typescaleXl = 'clamp(1.42rem, 0.94vw + 1.23rem, 2.37rem)';
|
|
49
49
|
|
|
@@ -59,10 +59,10 @@ const fontSizeHeadingXXLarge = typescale2Xl;
|
|
|
59
59
|
const fontSizeTextLarge = typescaleLg;
|
|
60
60
|
|
|
61
61
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleMd instead. */
|
|
62
|
-
const fontSizeTextMedium = typescaleMd;
|
|
62
|
+
const fontSizeTextMedium = typescaleMd$1;
|
|
63
63
|
|
|
64
64
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleSm instead. */
|
|
65
|
-
const fontSizeTextSmall = typescaleSm;
|
|
65
|
+
const fontSizeTextSmall = typescaleSm$1;
|
|
66
66
|
|
|
67
67
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleXl instead. */
|
|
68
68
|
const fontSizeTextXLarge = typescaleXl;
|
|
@@ -78,7 +78,7 @@ const typescale2Xs = '.75rem';
|
|
|
78
78
|
const fontSizeTextXXSmall = typescale2Xs;
|
|
79
79
|
|
|
80
80
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescale variables instead. */
|
|
81
|
-
const fontSizeText = {
|
|
81
|
+
const fontSizeText$1 = {
|
|
82
82
|
xxSmall: fontSizeTextXXSmall,
|
|
83
83
|
xSmall: fontSizeTextXSmall,
|
|
84
84
|
small: fontSizeTextSmall,
|
|
@@ -98,10 +98,10 @@ const fontWeightNormal = 400;
|
|
|
98
98
|
/** @deprecated since v4.0.0, will be removed with next major release. Use fontWeightNormal instead. */
|
|
99
99
|
const fontWeightRegular = fontWeightNormal;
|
|
100
100
|
|
|
101
|
-
const fontWeightSemibold = 600;
|
|
101
|
+
const fontWeightSemibold$1 = 600;
|
|
102
102
|
|
|
103
103
|
/** @deprecated since v4.0.0, will be removed with next major release. Use fontWeightSemibold instead. */
|
|
104
|
-
const fontWeightSemiBold = fontWeightSemibold;
|
|
104
|
+
const fontWeightSemiBold = fontWeightSemibold$1;
|
|
105
105
|
|
|
106
106
|
const fontWeightBold$1 = 700;
|
|
107
107
|
|
|
@@ -253,15 +253,15 @@ const durationLg = '.6s';
|
|
|
253
253
|
/** @deprecated since v4.0.0, will be removed with next major release. Use durationLg instead. */
|
|
254
254
|
const motionDurationLong = durationLg;
|
|
255
255
|
|
|
256
|
-
const durationMd = '.4s';
|
|
256
|
+
const durationMd$1 = '.4s';
|
|
257
257
|
|
|
258
258
|
/** @deprecated since v4.0.0, will be removed with next major release. Use durationMd instead. */
|
|
259
|
-
const motionDurationModerate = durationMd;
|
|
259
|
+
const motionDurationModerate = durationMd$1;
|
|
260
260
|
|
|
261
|
-
const durationSm = '.25s';
|
|
261
|
+
const durationSm$1 = '.25s';
|
|
262
262
|
|
|
263
263
|
/** @deprecated since v4.0.0, will be removed with next major release. Use durationSm instead. */
|
|
264
|
-
const motionDurationShort = durationSm;
|
|
264
|
+
const motionDurationShort = durationSm$1;
|
|
265
265
|
|
|
266
266
|
const durationXl = '1.2s';
|
|
267
267
|
|
|
@@ -290,13 +290,6 @@ const dropShadowHighStyle = {
|
|
|
290
290
|
boxShadow: shadowLg,
|
|
291
291
|
};
|
|
292
292
|
|
|
293
|
-
const shadowSm = '0px 3px 8px rgba(0,0,0,.16)';
|
|
294
|
-
|
|
295
|
-
/** @deprecated since v4.0.0, will be removed with next major release. Use boxShadow: shadowSm instead. */
|
|
296
|
-
const dropShadowLowStyle = {
|
|
297
|
-
boxShadow: shadowSm,
|
|
298
|
-
};
|
|
299
|
-
|
|
300
293
|
const spacingFluidLg = 'clamp(32px, 2.75vw + 23px, 76px)';
|
|
301
294
|
|
|
302
295
|
/** @deprecated since v4.0.0, will be removed with next major release. Use spacingFluidLg instead. */
|
|
@@ -312,22 +305,22 @@ const spacingFluidXs = 'clamp(4px, 0.25vw + 3px, 8px)';
|
|
|
312
305
|
/** @deprecated since v4.0.0, will be removed with next major release. Use spacingFluidXs instead. */
|
|
313
306
|
const spacingFluidXSmall = spacingFluidXs;
|
|
314
307
|
|
|
315
|
-
const spacingStaticMd = '16px';
|
|
308
|
+
const spacingStaticMd$1 = '16px';
|
|
316
309
|
|
|
317
310
|
/** @deprecated since v4.0.0, will be removed with next major release. Use spacingStaticMd instead. */
|
|
318
|
-
const spacingStaticMedium = spacingStaticMd;
|
|
311
|
+
const spacingStaticMedium = spacingStaticMd$1;
|
|
319
312
|
|
|
320
|
-
const spacingStaticSm$
|
|
313
|
+
const spacingStaticSm$2 = '8px';
|
|
321
314
|
|
|
322
315
|
/** @deprecated since v4.0.0, will be removed with next major release. Use spacingStaticSm instead. */
|
|
323
|
-
const spacingStaticSmall = spacingStaticSm$
|
|
316
|
+
const spacingStaticSmall = spacingStaticSm$2;
|
|
324
317
|
|
|
325
|
-
const spacingStaticXs$
|
|
318
|
+
const spacingStaticXs$3 = '4px';
|
|
326
319
|
|
|
327
320
|
/** @deprecated since v4.0.0, will be removed with next major release. Use spacingStaticXs instead. */
|
|
328
|
-
const spacingStaticXSmall = spacingStaticXs$
|
|
321
|
+
const spacingStaticXSmall = spacingStaticXs$3;
|
|
329
322
|
|
|
330
|
-
const spacingStaticXs$
|
|
323
|
+
const spacingStaticXs$2 = spacingStaticXs$3;
|
|
331
324
|
|
|
332
325
|
const _displayFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
333
326
|
const _displayFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
@@ -388,12 +381,14 @@ const textMediumStyle = {
|
|
|
388
381
|
};
|
|
389
382
|
|
|
390
383
|
const proseTextSmStyle = {
|
|
391
|
-
font: `normal normal ${fontWeightNormal} ${typescaleSm} / ${leadingNormal} ${fontPorscheNext}`,
|
|
384
|
+
font: `normal normal ${fontWeightNormal} ${typescaleSm$1} / ${leadingNormal$1} ${fontPorscheNext$1}`,
|
|
392
385
|
...fontHyphenationStyle,
|
|
393
386
|
};
|
|
394
387
|
|
|
395
388
|
const alphaDisabled = 0.4;
|
|
396
389
|
|
|
390
|
+
const blurFrosted = 'var(--p-blur-frosted)';
|
|
391
|
+
|
|
397
392
|
const legacyRadiusLarge = '--_p-legacy-radius-large';
|
|
398
393
|
|
|
399
394
|
const legacyRadiusMedium = '--_p-legacy-radius-medium';
|
|
@@ -466,6 +461,30 @@ const colorWarningFrosted = 'var(--p-color-warning-frosted)';
|
|
|
466
461
|
|
|
467
462
|
const colorWarningFrostedSoft = 'var(--p-color-warning-frosted-soft)';
|
|
468
463
|
|
|
464
|
+
const fontPorscheNext = 'var(--p-font-porsche-next)';
|
|
465
|
+
|
|
466
|
+
const leadingNormal = 'var(--p-leading-normal)';
|
|
467
|
+
|
|
468
|
+
const typescaleMd = 'var(--p-typescale-md)';
|
|
469
|
+
|
|
470
|
+
const typescaleSm = 'var(--p-typescale-sm)';
|
|
471
|
+
|
|
472
|
+
const fontWeightSemibold = 'var(--p-font-weight-semibold)';
|
|
473
|
+
|
|
474
|
+
const durationMd = 'var(--p-duration-md)';
|
|
475
|
+
|
|
476
|
+
const durationSm = 'var(--p-duration-sm)';
|
|
477
|
+
|
|
478
|
+
const spacingStaticMd = 'var(--p-spacing-static-md)';
|
|
479
|
+
|
|
480
|
+
const spacingStaticSm$1 = 'var(--p-spacing-static-sm)';
|
|
481
|
+
|
|
482
|
+
const spacingStaticXs$1 = 'var(--p-spacing-static-xs)';
|
|
483
|
+
|
|
484
|
+
const forcedColorsMediaQuery = (style) => {
|
|
485
|
+
return { '@media (forced-colors: active)': style };
|
|
486
|
+
};
|
|
487
|
+
|
|
469
488
|
const motionDurationMap = {
|
|
470
489
|
short: motionDurationShort,
|
|
471
490
|
moderate: motionDurationModerate,
|
|
@@ -499,15 +518,23 @@ const addImportantToEachRule = (input) => {
|
|
|
499
518
|
typeof value === 'object' ? addImportantToEachRule(value) : addImportantToRule(value)),
|
|
500
519
|
result), {});
|
|
501
520
|
};
|
|
502
|
-
const getFocusBaseStyles = () => {
|
|
521
|
+
const getFocusBaseStyles = (offset = 2) => {
|
|
503
522
|
return {
|
|
504
523
|
outline: `${borderWidthBase} solid ${colorFocus}`,
|
|
505
|
-
outlineOffset:
|
|
524
|
+
outlineOffset: `${offset}px`,
|
|
525
|
+
...forcedColorsMediaQuery({
|
|
526
|
+
outlineColor: 'Highlight',
|
|
527
|
+
}),
|
|
506
528
|
};
|
|
507
529
|
};
|
|
508
|
-
const getDisabledBaseStyles = () => {
|
|
530
|
+
const getDisabledBaseStyles = (addForcedColorsDisabledStyles) => {
|
|
509
531
|
return {
|
|
510
532
|
opacity: alphaDisabled,
|
|
533
|
+
...forcedColorsMediaQuery({
|
|
534
|
+
opacity: 1,
|
|
535
|
+
color: 'GrayText',
|
|
536
|
+
...addForcedColorsDisabledStyles,
|
|
537
|
+
}),
|
|
511
538
|
};
|
|
512
539
|
};
|
|
513
540
|
/**
|
|
@@ -3745,10 +3772,6 @@ const isDisabledOrLoading = (disabled, loading) => {
|
|
|
3745
3772
|
return disabled || loading;
|
|
3746
3773
|
};
|
|
3747
3774
|
|
|
3748
|
-
const hasWindow = typeof window !== 'undefined';
|
|
3749
|
-
|
|
3750
|
-
const isHighContrastMode = hasWindow && window.matchMedia?.('(forced-colors: active)').matches;
|
|
3751
|
-
|
|
3752
3775
|
const parseJSON = (prop) => {
|
|
3753
3776
|
if (typeof prop === 'string') {
|
|
3754
3777
|
try {
|
|
@@ -3836,6 +3859,8 @@ const mergeDeep = (...objects) => {
|
|
|
3836
3859
|
}
|
|
3837
3860
|
})(); // determine it once
|
|
3838
3861
|
|
|
3862
|
+
const hasWindow = typeof window !== 'undefined';
|
|
3863
|
+
|
|
3839
3864
|
const attributeMutationMap = new Map();
|
|
3840
3865
|
hasWindow &&
|
|
3841
3866
|
new MutationObserver((mutations) => {
|
|
@@ -3882,7 +3907,7 @@ const OPTION_LIST_SAFE_ZONE = 6;
|
|
|
3882
3907
|
|
|
3883
3908
|
const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
|
|
3884
3909
|
|
|
3885
|
-
const prefix = `[Porsche Design System v${"4.0.0-beta.
|
|
3910
|
+
const prefix = `[Porsche Design System v${"4.0.0-beta.2"}]` // this part isn't covered by unit tests
|
|
3886
3911
|
;
|
|
3887
3912
|
const consoleError = (...messages) => {
|
|
3888
3913
|
console.error(prefix, ...messages);
|
|
@@ -3991,130 +4016,192 @@ const breakpointCustomizableTemplate = `value, ${internalValidateProps
|
|
|
3991
4016
|
.formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {}))
|
|
3992
4017
|
.replace(/"/g, '')}`;
|
|
3993
4018
|
|
|
3994
|
-
const
|
|
3995
|
-
|
|
4019
|
+
const getInlineSVGBackgroundImage = (path) => {
|
|
4020
|
+
return `url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${path}</svg>')`;
|
|
4021
|
+
};
|
|
4022
|
+
|
|
4023
|
+
/**
|
|
4024
|
+
* @css-variable {"name": "--p-accordion-summary-top", "description": "Controls the sticky top position when `sticky` is enabled.", "defaultValue": "0px"}
|
|
4025
|
+
*/
|
|
4026
|
+
const cssVarSummaryTop = '--p-accordion-summary-top';
|
|
4027
|
+
const cssVarSummaryTopDeprecated = '--p-accordion-position-sticky-top'; // deprecated
|
|
4028
|
+
/**
|
|
4029
|
+
* @css-variable {"name": "--p-accordion-px", "description": "Horizontal padding of the accordion.", "defaultValue": "16px"}
|
|
4030
|
+
*/
|
|
4031
|
+
const cssVarPaddingInline$1 = '--p-accordion-px';
|
|
4032
|
+
/**
|
|
4033
|
+
* @css-variable {"name": "--p-accordion-py", "description": "Vertical padding of the accordion.", "defaultValue": "16px"}
|
|
4034
|
+
*/
|
|
4035
|
+
const cssVarPaddingBlock = '--p-accordion-py';
|
|
3996
4036
|
// CSS Variable defined in fontHyphenationStyle
|
|
3997
4037
|
/**
|
|
3998
4038
|
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
3999
4039
|
*/
|
|
4000
|
-
const
|
|
4040
|
+
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"/>`);
|
|
4041
|
+
const backgroundMap$1 = {
|
|
4042
|
+
canvas: colorCanvas,
|
|
4043
|
+
surface: colorSurface,
|
|
4044
|
+
frosted: colorFrosted,
|
|
4045
|
+
none: 'transparent',
|
|
4046
|
+
};
|
|
4047
|
+
// 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
|
|
4048
|
+
const getComponentCss$19 = (alignMarker, background, isCompact, isOpen, isSticky, hasSummaryBefore, hasSummaryAfter, size) => {
|
|
4049
|
+
const duration = isOpen ? 'moderate' : 'short';
|
|
4050
|
+
const easing = isOpen ? 'in' : 'out';
|
|
4051
|
+
const compactFactor = isCompact ? 0.64285714 : 1;
|
|
4052
|
+
const paddingBlock = `calc(28px * (${compactFactor} - 0.64285714) + 6px)`;
|
|
4053
|
+
const paddingInline = `calc(11.2px * (${compactFactor} - 0.64285714) + 12px)`;
|
|
4054
|
+
const gap = `calc(11.2px * (${compactFactor} - 0.64285714) + 4px)`;
|
|
4055
|
+
const marginTop = `calc(28px * (${compactFactor} - 0.64285714) + 6px)`;
|
|
4056
|
+
const isIconAlignedStart = alignMarker === 'start';
|
|
4001
4057
|
return getCss({
|
|
4002
4058
|
'@global': {
|
|
4059
|
+
'@keyframes overflow-hidden': {
|
|
4060
|
+
from: { overflow: 'hidden' },
|
|
4061
|
+
to: { overflow: 'hidden' },
|
|
4062
|
+
},
|
|
4003
4063
|
':host': {
|
|
4004
4064
|
display: 'block',
|
|
4005
4065
|
...addImportantToEachRule({
|
|
4006
|
-
...(compact
|
|
4007
|
-
? { transform: 'translate3d(0,0,0)' } // relevant for custom click-area in compact variant
|
|
4008
|
-
: {
|
|
4009
|
-
borderBottom: `1px solid ${colorContrastLower}`,
|
|
4010
|
-
}),
|
|
4011
|
-
'&(:only-of-type)': { borderBottom: 0 },
|
|
4012
4066
|
...hostHiddenStyles,
|
|
4013
4067
|
}),
|
|
4014
4068
|
},
|
|
4015
|
-
|
|
4016
|
-
|
|
4069
|
+
slot: {
|
|
4070
|
+
'&[name="summary-before"], &[name="summary"], &[name="summary-after"]': {
|
|
4071
|
+
display: 'flex',
|
|
4072
|
+
flexWrap: 'wrap',
|
|
4073
|
+
alignItems: 'center',
|
|
4074
|
+
gap,
|
|
4075
|
+
},
|
|
4076
|
+
'&[name="summary-before"]': {
|
|
4077
|
+
gridArea: `1/${isIconAlignedStart ? '2' : '1'}`,
|
|
4078
|
+
zIndex: 2, // ensures stacking to be above the summary section
|
|
4079
|
+
},
|
|
4080
|
+
'&[name="summary"]': {
|
|
4081
|
+
gridArea: `1/${hasSummaryBefore && isIconAlignedStart ? '3' : hasSummaryBefore || isIconAlignedStart ? '2' : '1'}`,
|
|
4082
|
+
},
|
|
4083
|
+
'&[name="summary-after"]': {
|
|
4084
|
+
gridArea: `1/${hasSummaryBefore && isIconAlignedStart ? '4' : hasSummaryBefore || isIconAlignedStart ? '3' : '2'}`,
|
|
4085
|
+
zIndex: 2, // ensures stacking to be above the summary section
|
|
4086
|
+
},
|
|
4087
|
+
'&:not([name])': {
|
|
4088
|
+
display: 'block',
|
|
4089
|
+
// as soon as all browsers support calc-size(auto) to be transitionable, we can remove the overflow rule and animation
|
|
4090
|
+
overflow: 'hidden',
|
|
4091
|
+
'details[open] &': {
|
|
4092
|
+
overflow: 'visible',
|
|
4093
|
+
// fix potential overflow issues
|
|
4094
|
+
animation: `overflow-hidden var(${cssVariableTransitionDuration},${motionDurationMap[duration]})`,
|
|
4095
|
+
},
|
|
4096
|
+
},
|
|
4097
|
+
},
|
|
4098
|
+
'h1,h2,h3,h4,h5,h6': {
|
|
4017
4099
|
all: 'unset',
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
gap: '24px',
|
|
4024
|
-
cursor: 'pointer',
|
|
4025
|
-
zIndex: 0,
|
|
4026
|
-
color: colorPrimary,
|
|
4027
|
-
...textSmallStyle,
|
|
4028
|
-
fontWeight: fontWeightSemiBold,
|
|
4029
|
-
...buildResponsiveStyles(size, (s) => ({
|
|
4030
|
-
fontSize: s === 'medium' ? fontSizeTextMedium : fontSizeTextSmall,
|
|
4031
|
-
padding: `${compact ? '4px' : s === 'medium' ? '20px' : '15px'} 0`,
|
|
4100
|
+
gridArea: `1/${hasSummaryBefore && isIconAlignedStart ? '3' : hasSummaryBefore || isIconAlignedStart ? '2' : '1'}`,
|
|
4101
|
+
font: 'inherit',
|
|
4102
|
+
fontWeight: fontWeightSemibold,
|
|
4103
|
+
...buildResponsiveStyles(size, (sizeValue) => ({
|
|
4104
|
+
fontSize: sizeValue === 'medium' ? typescaleMd : typescaleSm,
|
|
4032
4105
|
})),
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
'
|
|
4053
|
-
|
|
4106
|
+
},
|
|
4107
|
+
details: {
|
|
4108
|
+
all: 'unset',
|
|
4109
|
+
font: `${typescaleSm} / ${leadingNormal} ${fontPorscheNext}`, // enables font inheritance for slotted content
|
|
4110
|
+
color: colorPrimary, // enables color inheritance for slotted content
|
|
4111
|
+
display: 'grid',
|
|
4112
|
+
gridTemplate: `repeat(2, auto) / ${hasSummaryBefore ? 'auto ' : ''}${isIconAlignedStart ? 'auto minmax(0, 1fr)' : 'minmax(0, 1fr) auto'}${hasSummaryAfter ? ' auto ' : ''}`,
|
|
4113
|
+
columnGap: gap,
|
|
4114
|
+
alignItems: 'center',
|
|
4115
|
+
padding: `var(${cssVarPaddingBlock}, ${background === 'none' ? '0' : paddingBlock}) var(${cssVarPaddingInline$1}, ${background === 'none' ? '0' : paddingInline})`,
|
|
4116
|
+
background: backgroundMap$1[background],
|
|
4117
|
+
...(background === 'frosted' && frostedGlassStyle),
|
|
4118
|
+
borderRadius: `var(${legacyRadiusSmall}, ${radiusXl})`,
|
|
4119
|
+
...forcedColorsMediaQuery({
|
|
4120
|
+
outline: '1px solid CanvasText',
|
|
4121
|
+
outlineOffset: background === 'none' ? '0' : '-1px',
|
|
4122
|
+
padding: `var(${cssVarPaddingBlock}, ${paddingBlock}) var(${cssVarPaddingInline$1}, ${paddingInline})`,
|
|
4123
|
+
}),
|
|
4124
|
+
'&::details-content': addImportantToEachRule({
|
|
4125
|
+
display: 'contents', // allows <details> to be used as grid layout
|
|
4126
|
+
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
|
|
4127
|
+
}),
|
|
4128
|
+
'& > div': {
|
|
4129
|
+
gridArea: '2/1/auto/-1',
|
|
4130
|
+
zIndex: 0, // ensures stacking to be below the summary section
|
|
4131
|
+
display: 'grid',
|
|
4132
|
+
opacity: 0,
|
|
4133
|
+
marginTop: '0px',
|
|
4134
|
+
gridTemplateRows: '0fr',
|
|
4135
|
+
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
|
|
4136
|
+
// as soon as all browsers are supporting `allow-discrete` reliable, visibility transition shouldn't be necessary anymore
|
|
4137
|
+
transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationMap[duration]}), ${getTransition('grid-template-rows', duration, easing)}, ${getTransition('margin-top', duration, easing)}, ${getTransition('opacity', duration, easing)}`,
|
|
4138
|
+
},
|
|
4139
|
+
'&[open]': {
|
|
4140
|
+
'& > div': {
|
|
4141
|
+
opacity: 1,
|
|
4142
|
+
marginTop,
|
|
4143
|
+
// as soon as all browsers support calc-size(auto) to be transitionable, we can remove the grid-template-rows rule and animation
|
|
4144
|
+
gridTemplateRows: '1fr',
|
|
4145
|
+
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
|
|
4146
|
+
// as soon as all browsers are supporting `allow-discrete` reliable, visibility transition shouldn't be necessary anymore
|
|
4147
|
+
transition: `visibility 0s linear 0s, ${getTransition('grid-template-rows', duration, easing)}, ${getTransition('margin-top', duration, easing)}, ${getTransition('opacity', duration, easing)}`,
|
|
4054
4148
|
},
|
|
4149
|
+
},
|
|
4150
|
+
},
|
|
4151
|
+
summary: {
|
|
4152
|
+
all: 'unset',
|
|
4153
|
+
gridArea: '1/1/auto/-1',
|
|
4154
|
+
zIndex: 1, // ensures stacking to be above the details content
|
|
4155
|
+
display: 'grid',
|
|
4156
|
+
gridTemplateColumns: 'subgrid',
|
|
4157
|
+
alignItems: 'center',
|
|
4158
|
+
cursor: 'pointer',
|
|
4159
|
+
padding: `var(${cssVarPaddingBlock}, ${background === 'none' ? '0' : paddingBlock}) var(${cssVarPaddingInline$1}, ${background === 'none' ? '0' : paddingInline})`,
|
|
4160
|
+
margin: `calc(-1 * var(${cssVarPaddingBlock}, ${background === 'none' ? '0' : paddingBlock})) calc(-1 * var(${cssVarPaddingInline$1}, ${background === 'none' ? '0' : paddingInline}))`,
|
|
4161
|
+
...(isSticky &&
|
|
4162
|
+
(background === 'canvas' || background === 'surface') && {
|
|
4163
|
+
position: 'sticky',
|
|
4164
|
+
top: `var(${cssVarSummaryTop}, var(${cssVarSummaryTopDeprecated}, 0px))`,
|
|
4165
|
+
background: `linear-gradient(180deg,${backgroundMap$1[background]} 0%,${backgroundMap$1[background]} 90%,transparent 100%)`,
|
|
4166
|
+
borderRadius: `var(${legacyRadiusSmall}, ${radiusXl})`,
|
|
4167
|
+
}),
|
|
4168
|
+
'&:focus-visible::before': getFocusBaseStyles(),
|
|
4169
|
+
...hoverMediaQuery({
|
|
4055
4170
|
'&:hover::before': {
|
|
4056
|
-
|
|
4057
|
-
background: colorFrostedSoft,
|
|
4171
|
+
background: colorFrosted,
|
|
4058
4172
|
},
|
|
4059
|
-
})),
|
|
4060
|
-
'&:focus-visible::before': getFocusBaseStyles(),
|
|
4061
|
-
},
|
|
4062
|
-
},
|
|
4063
|
-
heading: {
|
|
4064
|
-
margin: 0,
|
|
4065
|
-
...(sticky && {
|
|
4066
|
-
position: 'sticky',
|
|
4067
|
-
top: `var(${cssVariablePositionStickyTop}, ${positionStickyTopFallback})`,
|
|
4068
|
-
zIndex: 1, // to be on top of the collapsible
|
|
4069
|
-
background: colorCanvas,
|
|
4070
|
-
}),
|
|
4071
|
-
},
|
|
4072
|
-
'icon-container': {
|
|
4073
|
-
height: fontLineHeight,
|
|
4074
|
-
width: fontLineHeight,
|
|
4075
|
-
font: `inherit ${fontFamily}`, // needed for correct calculations based on ex-unit
|
|
4076
|
-
display: 'flex',
|
|
4077
|
-
alignItems: 'center',
|
|
4078
|
-
justifyContent: 'center',
|
|
4079
|
-
},
|
|
4080
|
-
icon: {
|
|
4081
|
-
transform: open ? 'rotate3d(0)' : 'rotate3d(0,0,1,90deg)',
|
|
4082
|
-
transition: getTransition('transform'),
|
|
4083
|
-
},
|
|
4084
|
-
collapsible: {
|
|
4085
|
-
color: colorPrimary, // enables color inheritance for slotted content
|
|
4086
|
-
display: 'grid',
|
|
4087
|
-
...(sticky && {
|
|
4088
|
-
position: 'relative',
|
|
4089
|
-
zIndex: 0, // to be below the heading
|
|
4090
|
-
}),
|
|
4091
|
-
...(open
|
|
4092
|
-
? {
|
|
4093
|
-
gridTemplateRows: '1fr',
|
|
4094
|
-
visibility: 'inherit',
|
|
4095
|
-
transition: getTransition('grid-template-rows'),
|
|
4096
|
-
paddingBottom: compact ? spacingStaticSmall : '24px',
|
|
4097
|
-
}
|
|
4098
|
-
: {
|
|
4099
|
-
gridTemplateRows: '0fr',
|
|
4100
|
-
visibility: 'hidden',
|
|
4101
|
-
transition: `${getTransition('grid-template-rows')}, visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationShort})`,
|
|
4102
4173
|
}),
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4174
|
+
'&::before': {
|
|
4175
|
+
gridArea: `1/${isIconAlignedStart ? '1' : hasSummaryBefore && hasSummaryAfter ? '4' : hasSummaryBefore || hasSummaryAfter ? '3' : '2'}`,
|
|
4176
|
+
placeSelf: 'center',
|
|
4177
|
+
content: '""',
|
|
4178
|
+
width: '1.5rem',
|
|
4179
|
+
height: '1.5rem',
|
|
4180
|
+
pointerEvents: 'none',
|
|
4181
|
+
borderRadius: radiusFull,
|
|
4182
|
+
background: 'transparent',
|
|
4183
|
+
transition: getTransition('background-color'),
|
|
4184
|
+
},
|
|
4185
|
+
'&::after': {
|
|
4186
|
+
gridArea: `1/${isIconAlignedStart ? '1' : hasSummaryBefore && hasSummaryAfter ? '4' : hasSummaryBefore || hasSummaryAfter ? '3' : '2'}`,
|
|
4187
|
+
placeSelf: 'center',
|
|
4188
|
+
content: '""',
|
|
4189
|
+
width: '1rem',
|
|
4190
|
+
height: '1rem',
|
|
4191
|
+
pointerEvents: 'none',
|
|
4192
|
+
WebkitMask: `${iconMarker} center/contain no-repeat`, // necessary for Sogou browser support :-)
|
|
4193
|
+
mask: `${iconMarker} center/contain no-repeat`,
|
|
4194
|
+
background: colorPrimary,
|
|
4195
|
+
transform: 'rotate3d(0)',
|
|
4196
|
+
transition: getTransition('transform', duration, easing),
|
|
4197
|
+
...forcedColorsMediaQuery({
|
|
4198
|
+
backgroundColor: 'LinkText',
|
|
4199
|
+
}),
|
|
4200
|
+
'details[open] &': {
|
|
4201
|
+
transform: 'rotate3d(0,0,1,180deg)',
|
|
4202
|
+
},
|
|
4203
|
+
},
|
|
4204
|
+
},
|
|
4118
4205
|
},
|
|
4119
4206
|
});
|
|
4120
4207
|
};
|
|
@@ -4258,6 +4345,12 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4258
4345
|
})), buildResponsiveStyles(size, (sizeValue) => ({
|
|
4259
4346
|
fontSize: getFontSizeText(sizeValue),
|
|
4260
4347
|
}))),
|
|
4348
|
+
...forcedColorsMediaQuery({
|
|
4349
|
+
color: 'LinkText',
|
|
4350
|
+
'&:is(button)': {
|
|
4351
|
+
color: 'ButtonText',
|
|
4352
|
+
},
|
|
4353
|
+
}),
|
|
4261
4354
|
'&::before': {
|
|
4262
4355
|
content: '""',
|
|
4263
4356
|
position: 'absolute', // mobile Safari -> prevent lagging active state
|
|
@@ -4266,8 +4359,8 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4266
4359
|
...buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
4267
4360
|
right: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
4268
4361
|
left: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
4362
|
+
borderRadius: `var(${legacyRadiusSmall}, ${hideLabelValue ? radiusFull : radiusLg})`,
|
|
4269
4363
|
})),
|
|
4270
|
-
borderRadius: `var(${legacyRadiusSmall}, ${radiusLg})`,
|
|
4271
4364
|
transition: getTransition('background-color'),
|
|
4272
4365
|
...(active && {
|
|
4273
4366
|
...frostedGlassStyle,
|
|
@@ -4537,11 +4630,9 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4537
4630
|
verticalAlign: 'top',
|
|
4538
4631
|
...mergeDeep(buildResponsiveStyles(isCompact, (compactValue) => ({
|
|
4539
4632
|
[`${cssVariableInternalScaling}`]: compactValue ? 0.64285714 : 1,
|
|
4540
|
-
|
|
4633
|
+
'--p-internal-border-radius': compactValue ? radiusLg : radiusXl,
|
|
4541
4634
|
})), buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
4542
|
-
|
|
4543
|
-
borderRadius: addImportantToRule(`var(${legacyRadiusSmall}, ${radiusFull})`),
|
|
4544
|
-
}),
|
|
4635
|
+
borderRadius: addImportantToRule(`var(${legacyRadiusSmall}, ${hideLabelValue ? radiusFull : 'var(--p-internal-border-radius)'})`),
|
|
4545
4636
|
}))),
|
|
4546
4637
|
...addImportantToEachRule({
|
|
4547
4638
|
...hostHiddenStyles,
|
|
@@ -4568,6 +4659,16 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4568
4659
|
padding: hideLabelValue ? paddingBlock : `${paddingBlock} ${paddingInline}`,
|
|
4569
4660
|
gap: hideLabelValue ? 0 : gap,
|
|
4570
4661
|
})),
|
|
4662
|
+
...forcedColorsMediaQuery({
|
|
4663
|
+
forcedColorAdjust: 'none',
|
|
4664
|
+
background: 'Canvas',
|
|
4665
|
+
color: 'LinkText',
|
|
4666
|
+
boxShadow: 'inset 0 0 0 2px LinkText',
|
|
4667
|
+
'&:is(button)': {
|
|
4668
|
+
boxShadow: 'inset 0 0 0 2px ButtonBorder',
|
|
4669
|
+
color: 'ButtonText',
|
|
4670
|
+
},
|
|
4671
|
+
}),
|
|
4571
4672
|
...(!hasSlottedAnchor && {
|
|
4572
4673
|
'&:focus-visible': getFocusBaseStyles(),
|
|
4573
4674
|
}),
|
|
@@ -4575,6 +4676,9 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4575
4676
|
hoverMediaQuery({
|
|
4576
4677
|
'&:hover': {
|
|
4577
4678
|
backgroundColor: backgroundColorHover,
|
|
4679
|
+
...forcedColorsMediaQuery({
|
|
4680
|
+
background: 'Canvas',
|
|
4681
|
+
}),
|
|
4578
4682
|
},
|
|
4579
4683
|
})),
|
|
4580
4684
|
},
|
|
@@ -4602,9 +4706,13 @@ const getComponentCss$15 = (icon, iconSource, variant, hideLabel, isDisabled, is
|
|
|
4602
4706
|
root: {
|
|
4603
4707
|
...(disabledOrLoading && {
|
|
4604
4708
|
cursor: 'not-allowed',
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4709
|
+
}),
|
|
4710
|
+
...(isDisabled && {
|
|
4711
|
+
...getDisabledBaseStyles({
|
|
4712
|
+
'&': {
|
|
4713
|
+
boxShadow: 'inset 0 0 0 2px GrayText !important',
|
|
4714
|
+
},
|
|
4715
|
+
}),
|
|
4608
4716
|
}),
|
|
4609
4717
|
},
|
|
4610
4718
|
...(isLoading && {
|
|
@@ -4616,6 +4724,7 @@ const getComponentCss$15 = (icon, iconSource, variant, hideLabel, isDisabled, is
|
|
|
4616
4724
|
top: '50%',
|
|
4617
4725
|
left: '50%',
|
|
4618
4726
|
transform: 'translate(-50%, -50%)',
|
|
4727
|
+
color: 'inherit',
|
|
4619
4728
|
},
|
|
4620
4729
|
}),
|
|
4621
4730
|
label: {
|
|
@@ -4623,12 +4732,18 @@ const getComponentCss$15 = (icon, iconSource, variant, hideLabel, isDisabled, is
|
|
|
4623
4732
|
...(isLoading && {
|
|
4624
4733
|
opacity: 0, // use opacity for smooth transition between states
|
|
4625
4734
|
}),
|
|
4735
|
+
...(isDisabled && {
|
|
4736
|
+
...getDisabledBaseStyles(),
|
|
4737
|
+
}),
|
|
4626
4738
|
},
|
|
4627
4739
|
icon: {
|
|
4628
4740
|
transition: getTransition('opacity'),
|
|
4629
4741
|
...(isLoading && {
|
|
4630
4742
|
opacity: 0, // use opacity for smooth transition between states
|
|
4631
4743
|
}),
|
|
4744
|
+
...(isDisabled && {
|
|
4745
|
+
...getDisabledBaseStyles(),
|
|
4746
|
+
}),
|
|
4632
4747
|
},
|
|
4633
4748
|
// .loading
|
|
4634
4749
|
...getFunctionalComponentLoadingMessageStyles(),
|
|
@@ -5324,6 +5439,10 @@ const getCheckboxBaseStyles = (isDisabled, isLoading, isCompact, state) => {
|
|
|
5324
5439
|
background: `var(${cssVarCheckboxBackgroundColor},${formStateBackgroundColor})`,
|
|
5325
5440
|
transition: `${getTransition('background-color')}, ${getTransition('border-color')}`,
|
|
5326
5441
|
border: `${checkboxBorderWidth} solid var(${cssVarCheckboxBorderColor},${formStateBorderColor})`,
|
|
5442
|
+
...(disabledOrLoading &&
|
|
5443
|
+
forcedColorsMediaQuery({
|
|
5444
|
+
borderColor: 'GrayText',
|
|
5445
|
+
})),
|
|
5327
5446
|
borderRadius: `var(${legacyRadiusSmall}, ${isCompact ? radiusMd : radiusLg})`,
|
|
5328
5447
|
...(disabledOrLoading && {
|
|
5329
5448
|
pointerEvents: 'none', // to prevent form element becomes clickable/toggleable
|
|
@@ -5343,10 +5462,6 @@ const getCheckboxBaseStyles = (isDisabled, isLoading, isCompact, state) => {
|
|
|
5343
5462
|
};
|
|
5344
5463
|
};
|
|
5345
5464
|
|
|
5346
|
-
const getInlineSVGBackgroundImage = (path) => {
|
|
5347
|
-
return `url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${path}</svg>')`;
|
|
5348
|
-
};
|
|
5349
|
-
|
|
5350
5465
|
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"/>`);
|
|
5351
5466
|
const getCheckboxCheckedBaseStyles = (isLoading, state) => {
|
|
5352
5467
|
const { formStateBorderColor } = getThemedFormStateColors(state);
|
|
@@ -5355,6 +5470,7 @@ const getCheckboxCheckedBaseStyles = (isLoading, state) => {
|
|
|
5355
5470
|
}
|
|
5356
5471
|
return {
|
|
5357
5472
|
'&::before': {
|
|
5473
|
+
forcedColorAdjust: 'none',
|
|
5358
5474
|
WebkitMask: `${checkedIcon$1} center/contain no-repeat`, // necessary for Sogou browser support :-)
|
|
5359
5475
|
mask: `${checkedIcon$1} center/contain no-repeat`,
|
|
5360
5476
|
backgroundColor: `var(${cssVarCheckboxIconColor}, ${state === 'none' ? colorPrimary : formStateBorderColor})`,
|
|
@@ -5370,6 +5486,7 @@ const getCheckboxIndeterminateBaseStyles = (isLoading, state) => {
|
|
|
5370
5486
|
}
|
|
5371
5487
|
return {
|
|
5372
5488
|
'&::before': {
|
|
5489
|
+
forcedColorAdjust: 'none',
|
|
5373
5490
|
WebkitMask: `${indeterminateIcon} center/contain no-repeat`,
|
|
5374
5491
|
mask: `${indeterminateIcon} center/contain no-repeat`,
|
|
5375
5492
|
backgroundColor: state === 'none' ? colorPrimary : formStateBorderColor,
|
|
@@ -5385,19 +5502,21 @@ const getFunctionalComponentRequiredStyles = () => {
|
|
|
5385
5502
|
};
|
|
5386
5503
|
};
|
|
5387
5504
|
|
|
5388
|
-
const getFunctionalComponentLabelAfterStyles = (
|
|
5505
|
+
const getFunctionalComponentLabelAfterStyles = () => {
|
|
5389
5506
|
return {
|
|
5390
5507
|
'slot[name="label-after"]': {
|
|
5391
5508
|
display: 'inline-block',
|
|
5392
5509
|
verticalAlign: 'top',
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5510
|
+
'&::slotted(*)': {
|
|
5511
|
+
...addImportantToEachRule({
|
|
5512
|
+
marginInlineStart: spacingStaticXs$2,
|
|
5513
|
+
})
|
|
5514
|
+
},
|
|
5397
5515
|
},
|
|
5398
5516
|
};
|
|
5399
5517
|
};
|
|
5400
|
-
const getFunctionalComponentLabelStyles = (
|
|
5518
|
+
const getFunctionalComponentLabelStyles = (isDisabled, isLoading, hideLabel, additionalDefaultJssStyle, additionalLabelWrapperJssStyle, additionalIsShownJssStyle) => {
|
|
5519
|
+
const isDisabledOrLoading = isDisabled || isLoading;
|
|
5401
5520
|
return {
|
|
5402
5521
|
'label-wrapper': {
|
|
5403
5522
|
...buildResponsiveStyles(hideLabel, (isHidden) => ({
|
|
@@ -5409,10 +5528,13 @@ const getFunctionalComponentLabelStyles = (isDisabledOrLoading, hideLabel, addit
|
|
|
5409
5528
|
label: {
|
|
5410
5529
|
...proseTextSmStyle,
|
|
5411
5530
|
cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer',
|
|
5531
|
+
color: colorPrimary,
|
|
5412
5532
|
...(isDisabledOrLoading && {
|
|
5413
5533
|
pointerEvents: 'none', // prevents label interaction when disabled or loading
|
|
5414
5534
|
}),
|
|
5415
|
-
|
|
5535
|
+
...(isDisabled && {
|
|
5536
|
+
...getDisabledBaseStyles(),
|
|
5537
|
+
}),
|
|
5416
5538
|
transition: getTransition('color'), // for smooth transitions between e.g. disabled state
|
|
5417
5539
|
display: 'inline',
|
|
5418
5540
|
'&:empty': {
|
|
@@ -5423,8 +5545,8 @@ const getFunctionalComponentLabelStyles = (isDisabledOrLoading, hideLabel, addit
|
|
|
5423
5545
|
cursor: 'unset',
|
|
5424
5546
|
fontSize: typescaleXs,
|
|
5425
5547
|
color: colorContrastHigh,
|
|
5426
|
-
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, { marginTop: `-${spacingStaticXs$
|
|
5427
|
-
marginTop: `-${spacingStaticXs$
|
|
5548
|
+
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, { marginTop: `-${spacingStaticXs$2}` })),
|
|
5549
|
+
marginTop: `-${spacingStaticXs$2}`,
|
|
5428
5550
|
},
|
|
5429
5551
|
...additionalDefaultJssStyle,
|
|
5430
5552
|
},
|
|
@@ -5472,11 +5594,10 @@ const getComponentCss$12 = (hideLabel, state, isDisabled, isLoading, isCompact)
|
|
|
5472
5594
|
display: 'block',
|
|
5473
5595
|
...addImportantToEachRule({
|
|
5474
5596
|
...hostHiddenStyles,
|
|
5475
|
-
...(isDisabled && getDisabledBaseStyles()),
|
|
5476
5597
|
}),
|
|
5477
5598
|
[`${cssVarInternalCheckboxScaling}`]: isCompact ? 0.64285714 : 1,
|
|
5478
5599
|
},
|
|
5479
|
-
...getFunctionalComponentLabelAfterStyles(
|
|
5600
|
+
...getFunctionalComponentLabelAfterStyles(),
|
|
5480
5601
|
...preventFoucOfNestedElementsStyles,
|
|
5481
5602
|
input: {
|
|
5482
5603
|
...getCheckboxBaseStyles(isDisabled, isLoading, isCompact, state),
|
|
@@ -5507,6 +5628,7 @@ const getComponentCss$12 = (hideLabel, state, isDisabled, isLoading, isCompact)
|
|
|
5507
5628
|
alignSelf: 'flex-start',
|
|
5508
5629
|
minHeight: fontLineHeight, // necessary for compact mode
|
|
5509
5630
|
cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
|
|
5631
|
+
...(isDisabled && getDisabledBaseStyles()),
|
|
5510
5632
|
},
|
|
5511
5633
|
...(isLoading && {
|
|
5512
5634
|
spinner: {
|
|
@@ -5520,7 +5642,7 @@ const getComponentCss$12 = (hideLabel, state, isDisabled, isLoading, isCompact)
|
|
|
5520
5642
|
},
|
|
5521
5643
|
}),
|
|
5522
5644
|
// .label / .required
|
|
5523
|
-
...getFunctionalComponentLabelStyles(isDisabled
|
|
5645
|
+
...getFunctionalComponentLabelStyles(isDisabled, isLoading, hideLabel, {
|
|
5524
5646
|
cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
|
|
5525
5647
|
}, null, {
|
|
5526
5648
|
paddingTop: labelPaddingTop,
|
|
@@ -5542,7 +5664,7 @@ const cssVarButtonPurePadding = '--ref-p-input-slotted-padding';
|
|
|
5542
5664
|
*/
|
|
5543
5665
|
const cssVarButtonPureMargin = '--ref-p-input-slotted-margin';
|
|
5544
5666
|
const cssVarInternalInputBaseScaling = '--p-internal-input-base-scaling';
|
|
5545
|
-
const getFunctionalComponentInputBaseStyles = (isDisabled, isLoading, hideLabel, state, isCompact, readOnly, additionalInputJssStyle) => {
|
|
5667
|
+
const getFunctionalComponentInputBaseStyles = (isDisabled, isLoading, hideLabel, state, isCompact, readOnly, additionalInputJssStyle, additionalHostJssStyle) => {
|
|
5546
5668
|
const wrapperBorderWidth = borderWidthThin;
|
|
5547
5669
|
const wrapperHeight = `calc(var(${cssVarInternalInputBaseScaling}) * 3.5rem)`;
|
|
5548
5670
|
const wrapperPaddingInline = `calc(22.4px * (var(${cssVarInternalInputBaseScaling}) - 0.64285714) + 8px)`;
|
|
@@ -5559,14 +5681,21 @@ const getFunctionalComponentInputBaseStyles = (isDisabled, isLoading, hideLabel,
|
|
|
5559
5681
|
[`${cssVarButtonPurePadding}`]: buttonPadding,
|
|
5560
5682
|
[`${cssVarButtonPureMargin}`]: buttonMargin,
|
|
5561
5683
|
...hostHiddenStyles,
|
|
5562
|
-
...(isDisabled && getDisabledBaseStyles()),
|
|
5563
5684
|
}),
|
|
5685
|
+
// 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
|
|
5686
|
+
'&(:dir(rtl)) input::placeholder': {
|
|
5687
|
+
direction: 'rtl',
|
|
5688
|
+
textAlign: 'end',
|
|
5689
|
+
},
|
|
5690
|
+
...additionalHostJssStyle,
|
|
5564
5691
|
},
|
|
5565
|
-
...getFunctionalComponentLabelAfterStyles(
|
|
5692
|
+
...getFunctionalComponentLabelAfterStyles(),
|
|
5566
5693
|
...preventFoucOfNestedElementsStyles,
|
|
5567
5694
|
input: {
|
|
5568
5695
|
all: 'unset',
|
|
5696
|
+
display: 'flex',
|
|
5569
5697
|
flex: 1,
|
|
5698
|
+
alignItems: 'center',
|
|
5570
5699
|
width: 'max(100%, 2ch)', // show at least 2 characters in very narrow containers
|
|
5571
5700
|
height: '100%',
|
|
5572
5701
|
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
|
|
@@ -5596,9 +5725,23 @@ const getFunctionalComponentInputBaseStyles = (isDisabled, isLoading, hideLabel,
|
|
|
5596
5725
|
background: colorFrosted,
|
|
5597
5726
|
color: colorContrastMedium,
|
|
5598
5727
|
}),
|
|
5599
|
-
'&:focus-within': {
|
|
5728
|
+
'&:not(:has(input:disabled)):focus-within': {
|
|
5600
5729
|
borderColor: formStateBorderHoverColor,
|
|
5730
|
+
...forcedColorsMediaQuery({
|
|
5731
|
+
outline: '2px solid Highlight',
|
|
5732
|
+
outlineOffset: '2px',
|
|
5733
|
+
}),
|
|
5601
5734
|
},
|
|
5735
|
+
...(isDisabled && {
|
|
5736
|
+
...mergeDeep({ ...getDisabledBaseStyles() }, {
|
|
5737
|
+
...forcedColorsMediaQuery({
|
|
5738
|
+
borderColor: 'GrayText',
|
|
5739
|
+
}),
|
|
5740
|
+
}),
|
|
5741
|
+
'& > *': {
|
|
5742
|
+
...getDisabledBaseStyles(),
|
|
5743
|
+
},
|
|
5744
|
+
}),
|
|
5602
5745
|
...(!isDisabled &&
|
|
5603
5746
|
!readOnly &&
|
|
5604
5747
|
!isLoading &&
|
|
@@ -5616,7 +5759,7 @@ const getFunctionalComponentInputBaseStyles = (isDisabled, isLoading, hideLabel,
|
|
|
5616
5759
|
},
|
|
5617
5760
|
}),
|
|
5618
5761
|
// .label / .required
|
|
5619
|
-
...getFunctionalComponentLabelStyles(isDisabled, hideLabel),
|
|
5762
|
+
...getFunctionalComponentLabelStyles(isDisabled, isLoading, hideLabel),
|
|
5620
5763
|
// .message
|
|
5621
5764
|
...getFunctionalComponentStateMessageStyles(state),
|
|
5622
5765
|
// .loading
|
|
@@ -5648,6 +5791,7 @@ const getButtonJssStyle = (componentName, isOpen, isDisabled, state, isCompact,
|
|
|
5648
5791
|
font: textSmallStyle.font,
|
|
5649
5792
|
color: `var(${cssVarTextColor}, ${colorPrimary})`,
|
|
5650
5793
|
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
5794
|
+
...(isDisabled && getDisabledBaseStyles()),
|
|
5651
5795
|
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transitions between e.g. disabled states
|
|
5652
5796
|
...(!isDisabled && {
|
|
5653
5797
|
...hoverMediaQuery({
|
|
@@ -5717,12 +5861,20 @@ const getOptionJssStyle = (componentName, cssVarScalingName) => {
|
|
|
5717
5861
|
transition: `${getTransition('background-color')}, ${getTransition('color')}`,
|
|
5718
5862
|
'&--highlighted': {
|
|
5719
5863
|
background: colorFrosted,
|
|
5864
|
+
...forcedColorsMediaQuery({
|
|
5865
|
+
forcedColorAdjust: 'none',
|
|
5866
|
+
outline: '2px solid Highlight',
|
|
5867
|
+
outlineOffset: '-2px',
|
|
5868
|
+
}),
|
|
5720
5869
|
},
|
|
5721
5870
|
'&--highlighted, &--selected': {
|
|
5722
5871
|
color: colorPrimary,
|
|
5723
5872
|
},
|
|
5724
5873
|
'&--disabled': {
|
|
5725
5874
|
cursor: 'not-allowed',
|
|
5875
|
+
...forcedColorsMediaQuery({
|
|
5876
|
+
color: 'GrayText',
|
|
5877
|
+
}),
|
|
5726
5878
|
},
|
|
5727
5879
|
'&--hidden': {
|
|
5728
5880
|
display: 'none',
|
|
@@ -6836,10 +6988,17 @@ const getComponentCss$V = (isOpen, background, backdrop, position, hasHeader, ha
|
|
|
6836
6988
|
? {
|
|
6837
6989
|
borderStartEndRadius: dialogBorderRadius,
|
|
6838
6990
|
borderEndEndRadius: dialogBorderRadius,
|
|
6991
|
+
...forcedColorsMediaQuery({
|
|
6992
|
+
borderInlineEnd: '2px solid CanvasText',
|
|
6993
|
+
}),
|
|
6839
6994
|
}
|
|
6840
6995
|
: {
|
|
6841
6996
|
borderStartStartRadius: dialogBorderRadius,
|
|
6842
6997
|
borderEndStartRadius: dialogBorderRadius,
|
|
6998
|
+
// TODO: Fix needs to be implemented for Fullscreen (which is not available as prop for Flyout yet)
|
|
6999
|
+
...forcedColorsMediaQuery({
|
|
7000
|
+
borderInlineStart: '2px solid CanvasText',
|
|
7001
|
+
}),
|
|
6843
7002
|
}),
|
|
6844
7003
|
...(isFooterFixed && {
|
|
6845
7004
|
gridTemplateRows: hasHeader ? 'auto 1fr auto' : '1fr',
|
|
@@ -6950,6 +7109,7 @@ const getComponentCss$T = (name, source, color, size) => {
|
|
|
6950
7109
|
mask: `url("${buildIconUrl(source || name)}") center/contain no-repeat`,
|
|
6951
7110
|
aspectRatio: '1/1',
|
|
6952
7111
|
background: 'currentcolor', // necessary for proper color inheritance
|
|
7112
|
+
forcedColorAdjust: 'none',
|
|
6953
7113
|
...(isFlippableIcon(name, source) && {
|
|
6954
7114
|
'&(:dir(rtl))': {
|
|
6955
7115
|
transform: 'scaleX(-1)',
|
|
@@ -6997,6 +7157,10 @@ const getNotificationRootJssStyle = (state, hasAction, hasClose) => {
|
|
|
6997
7157
|
// 4 columns are for icon, content, optional action button and optional close button
|
|
6998
7158
|
gridTemplateColumns: `auto minmax(auto, 1fr)${hasAction ? ' auto' : ''}${hasClose ? ' auto' : ''}`,
|
|
6999
7159
|
},
|
|
7160
|
+
...forcedColorsMediaQuery({
|
|
7161
|
+
outline: '2px solid CanvasText',
|
|
7162
|
+
outlineOffset: '-2px',
|
|
7163
|
+
}),
|
|
7000
7164
|
};
|
|
7001
7165
|
};
|
|
7002
7166
|
const getNotificationIconJssStyle = () => ({
|
|
@@ -7097,7 +7261,15 @@ const getComponentCss$R = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
7097
7261
|
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
7098
7262
|
*/
|
|
7099
7263
|
const getComponentCss$Q = (disabled, loading, hideLabel, state, compact, readOnly) => {
|
|
7100
|
-
return getCss(getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly
|
|
7264
|
+
return getCss(getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, null,
|
|
7265
|
+
// Overwrites direction to ltr for rtl languages to prevent issues with the email input, e.g. cursor jumping to the
|
|
7266
|
+
// end of the input when typing in the middle of the text. This is necessary because email addresses are assumed
|
|
7267
|
+
// to be always written in ltr direction and the input needs to accommodate that, even in rtl contexts.
|
|
7268
|
+
{
|
|
7269
|
+
'&(:dir(rtl)) .wrapper, &(:dir(rtl)) input:placeholder-shown': {
|
|
7270
|
+
direction: 'ltr',
|
|
7271
|
+
},
|
|
7272
|
+
}));
|
|
7101
7273
|
};
|
|
7102
7274
|
|
|
7103
7275
|
// CSS Variables defined in base input
|
|
@@ -7217,7 +7389,15 @@ const getComponentCss$M = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
7217
7389
|
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
7218
7390
|
*/
|
|
7219
7391
|
const getComponentCss$L = (disabled, loading, hideLabel, state, compact, readOnly) => {
|
|
7220
|
-
return getCss(getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly
|
|
7392
|
+
return getCss(getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, null,
|
|
7393
|
+
// Overwrites direction to ltr for rtl languages to prevent issues with the tel input, e.g. cursor jumping to the
|
|
7394
|
+
// end of the input when typing in the middle of the text. This is necessary because tel values are assumed
|
|
7395
|
+
// to be always written in ltr direction and the input needs to accommodate that, even in rtl contexts.
|
|
7396
|
+
{
|
|
7397
|
+
'&(:dir(rtl)) .wrapper, &(:dir(rtl)) input:placeholder-shown': {
|
|
7398
|
+
direction: 'ltr',
|
|
7399
|
+
},
|
|
7400
|
+
}));
|
|
7221
7401
|
};
|
|
7222
7402
|
|
|
7223
7403
|
const formElementLayeredGap = '9px'; // to have same distance vertically and horizontally for e.g. button/icon within form element
|
|
@@ -7304,7 +7484,15 @@ const getComponentCss$J = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
7304
7484
|
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
7305
7485
|
*/
|
|
7306
7486
|
const getComponentCss$I = (disabled, loading, hideLabel, state, compact, readOnly) => {
|
|
7307
|
-
return getCss(getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly
|
|
7487
|
+
return getCss(getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, null,
|
|
7488
|
+
// Overwrites direction to ltr for rtl languages to prevent issues with the url input, e.g. cursor jumping to the
|
|
7489
|
+
// end of the input when typing in the middle of the text. This is necessary because url addresses are assumed
|
|
7490
|
+
// to be always written in ltr direction and the input needs to accommodate that, even in rtl contexts.
|
|
7491
|
+
{
|
|
7492
|
+
'&(:dir(rtl)) .wrapper, &(:dir(rtl)) input:placeholder-shown': {
|
|
7493
|
+
direction: 'ltr',
|
|
7494
|
+
},
|
|
7495
|
+
}));
|
|
7308
7496
|
};
|
|
7309
7497
|
|
|
7310
7498
|
// CSS Variables defined in base input
|
|
@@ -7366,6 +7554,10 @@ const anchorJssStyle = {
|
|
|
7366
7554
|
inset: 0,
|
|
7367
7555
|
zIndex: 1, // necessary to be on top of img
|
|
7368
7556
|
borderRadius: `var(${legacyRadiusLarge}, ${radius4Xl})`,
|
|
7557
|
+
...forcedColorsMediaQuery({
|
|
7558
|
+
forcedColorAdjust: 'none',
|
|
7559
|
+
boxShadow: 'inset 0 0 0 2px LinkText',
|
|
7560
|
+
}),
|
|
7369
7561
|
};
|
|
7370
7562
|
const getMultilineEllipsis = (lineClamp) => {
|
|
7371
7563
|
return {
|
|
@@ -7754,6 +7946,10 @@ const getComponentCss$C = (isOpen, background, backdrop, fullscreen, hasDismissB
|
|
|
7754
7946
|
placeSelf: 'center',
|
|
7755
7947
|
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
|
|
7756
7948
|
borderRadius: dialogBorderRadius,
|
|
7949
|
+
...forcedColorsMediaQuery({
|
|
7950
|
+
outline: '2px solid CanvasText',
|
|
7951
|
+
outlineOffset: '-2px',
|
|
7952
|
+
}),
|
|
7757
7953
|
}),
|
|
7758
7954
|
},
|
|
7759
7955
|
...(hasDismissButton && {
|
|
@@ -7794,6 +7990,9 @@ const getComponentCss$B = (model, safeZone, size, color) => {
|
|
|
7794
7990
|
mask: `url(${getSvgUrl(model)}) no-repeat left top / contain`,
|
|
7795
7991
|
aspectRatio: `${width} / ${safeZone ? 36 : height}`, // 36px is the max-height for SVG model signature creation
|
|
7796
7992
|
background: 'currentcolor', // necessary for proper color inheritance
|
|
7993
|
+
...forcedColorsMediaQuery({
|
|
7994
|
+
background: 'CanvasText',
|
|
7995
|
+
}),
|
|
7797
7996
|
...hostHiddenStyles,
|
|
7798
7997
|
}),
|
|
7799
7998
|
},
|
|
@@ -7840,7 +8039,9 @@ const getComponentCss$A = (isDisabled, selected) => {
|
|
|
7840
8039
|
},
|
|
7841
8040
|
},
|
|
7842
8041
|
option: getOptionJssStyle('multi-select-option', cssVarInternalMultiSelectOptionScaling),
|
|
7843
|
-
checkbox: mergeDeep(getCheckboxBaseStyles(isDisabled, false, true, 'none'), selected ? getCheckboxCheckedBaseStyles(false, 'none') : {}
|
|
8042
|
+
checkbox: mergeDeep(getCheckboxBaseStyles(isDisabled, false, true, 'none'), selected ? getCheckboxCheckedBaseStyles(false, 'none') : {}, {
|
|
8043
|
+
flexShrink: 0,
|
|
8044
|
+
}),
|
|
7844
8045
|
});
|
|
7845
8046
|
};
|
|
7846
8047
|
|
|
@@ -7854,7 +8055,6 @@ const getComponentCss$z = (isDisabled) => {
|
|
|
7854
8055
|
'@global': {
|
|
7855
8056
|
':host': addImportantToEachRule({
|
|
7856
8057
|
...hostHiddenStyles,
|
|
7857
|
-
...(isDisabled && getDisabledBaseStyles()),
|
|
7858
8058
|
}),
|
|
7859
8059
|
'::slotted(*)': {
|
|
7860
8060
|
'--p-internal-select-option-padding-left': paddingSlottedInlineStart,
|
|
@@ -7870,6 +8070,7 @@ const getComponentCss$z = (isDisabled) => {
|
|
|
7870
8070
|
paddingInline,
|
|
7871
8071
|
font: textXSmallStyle.font.replace(' 400 ', ` ${fontWeightSemiBold} `),
|
|
7872
8072
|
color: colorPrimary,
|
|
8073
|
+
...(isDisabled && getDisabledBaseStyles()),
|
|
7873
8074
|
},
|
|
7874
8075
|
},
|
|
7875
8076
|
});
|
|
@@ -7892,10 +8093,9 @@ const getComponentCss$y = (isOpen, isDisabled, hideLabel, state, isCompact) => {
|
|
|
7892
8093
|
[`${cssVarInternalMultiSelectOptionScaling}`]: isCompact ? 0.64285714 : 1,
|
|
7893
8094
|
[`${cssVarInternalOptgroupScaling}`]: isCompact ? 0.64285714 : 1,
|
|
7894
8095
|
...hostHiddenStyles,
|
|
7895
|
-
...(isDisabled && getDisabledBaseStyles()),
|
|
7896
8096
|
}),
|
|
7897
8097
|
},
|
|
7898
|
-
...getFunctionalComponentLabelAfterStyles(
|
|
8098
|
+
...getFunctionalComponentLabelAfterStyles(),
|
|
7899
8099
|
...preventFoucOfNestedElementsStyles,
|
|
7900
8100
|
button: {
|
|
7901
8101
|
...getButtonJssStyle('multi-select', isOpen, isDisabled, state, isCompact, cssVarInternalMultiSelectScaling),
|
|
@@ -7917,7 +8117,7 @@ const getComponentCss$y = (isOpen, isDisabled, hideLabel, state, isCompact) => {
|
|
|
7917
8117
|
// .no-results / .sr-only
|
|
7918
8118
|
...getFunctionalComponentNoResultsOptionStyles('multi-select-option', cssVarInternalMultiSelectScaling),
|
|
7919
8119
|
// .label / .required
|
|
7920
|
-
...getFunctionalComponentLabelStyles(isDisabled, hideLabel),
|
|
8120
|
+
...getFunctionalComponentLabelStyles(isDisabled, false, hideLabel),
|
|
7921
8121
|
// .message
|
|
7922
8122
|
...getFunctionalComponentStateMessageStyles(state),
|
|
7923
8123
|
});
|
|
@@ -8061,10 +8261,9 @@ const getComponentCss$w = (hideLabel, state, isDisabled, isLoading, length, isCo
|
|
|
8061
8261
|
[`${cssVarInternalPinCodeScaling}`]: isCompact ? 0.64285714 : 1,
|
|
8062
8262
|
...addImportantToEachRule({
|
|
8063
8263
|
...hostHiddenStyles,
|
|
8064
|
-
...(isDisabled && getDisabledBaseStyles()),
|
|
8065
8264
|
}),
|
|
8066
8265
|
},
|
|
8067
|
-
...getFunctionalComponentLabelAfterStyles(
|
|
8266
|
+
...getFunctionalComponentLabelAfterStyles(),
|
|
8068
8267
|
...preventFoucOfNestedElementsStyles,
|
|
8069
8268
|
input: {
|
|
8070
8269
|
all: 'unset',
|
|
@@ -8084,7 +8283,7 @@ const getComponentCss$w = (hideLabel, state, isDisabled, isLoading, length, isCo
|
|
|
8084
8283
|
textOverflow: 'ellipsis',
|
|
8085
8284
|
cursor: isDisabled || isLoading ? 'not-allowed' : 'text',
|
|
8086
8285
|
textAlign: 'center',
|
|
8087
|
-
...(isLoading && getDisabledBaseStyles()),
|
|
8286
|
+
...((isDisabled || isLoading) && getDisabledBaseStyles()),
|
|
8088
8287
|
'&:focus-visible': {
|
|
8089
8288
|
borderColor: formStateBorderHoverColor,
|
|
8090
8289
|
},
|
|
@@ -8121,7 +8320,7 @@ const getComponentCss$w = (hideLabel, state, isDisabled, isLoading, length, isCo
|
|
|
8121
8320
|
},
|
|
8122
8321
|
}),
|
|
8123
8322
|
// .label / .required
|
|
8124
|
-
...getFunctionalComponentLabelStyles(isDisabled, hideLabel),
|
|
8323
|
+
...getFunctionalComponentLabelStyles(isDisabled, isLoading, hideLabel),
|
|
8125
8324
|
// .message
|
|
8126
8325
|
...getFunctionalComponentStateMessageStyles(state),
|
|
8127
8326
|
// .loading
|
|
@@ -8203,6 +8402,9 @@ const getComponentCss$v = () => {
|
|
|
8203
8402
|
height: '12px',
|
|
8204
8403
|
clipPath: 'polygon(50% 0, 100% 110%, 0 110%)',
|
|
8205
8404
|
background: colorCanvas,
|
|
8405
|
+
...forcedColorsMediaQuery({
|
|
8406
|
+
background: 'CanvasText',
|
|
8407
|
+
}),
|
|
8206
8408
|
},
|
|
8207
8409
|
content: {
|
|
8208
8410
|
maxWidth: `min(calc(100dvw - ${POPOVER_SAFE_ZONE * 2}px), 48ch)`,
|
|
@@ -8214,6 +8416,10 @@ const getComponentCss$v = () => {
|
|
|
8214
8416
|
...textSmallStyle,
|
|
8215
8417
|
background: colorCanvas,
|
|
8216
8418
|
color: colorPrimary,
|
|
8419
|
+
...forcedColorsMediaQuery({
|
|
8420
|
+
outline: '2px solid CanvasText',
|
|
8421
|
+
outlineOffset: '-2px',
|
|
8422
|
+
}),
|
|
8217
8423
|
},
|
|
8218
8424
|
});
|
|
8219
8425
|
};
|
|
@@ -8239,10 +8445,9 @@ const getComponentCss$u = (disabled, loading, state) => {
|
|
|
8239
8445
|
display: 'block',
|
|
8240
8446
|
...addImportantToEachRule({
|
|
8241
8447
|
...hostHiddenStyles,
|
|
8242
|
-
...(disabledOrLoading && getDisabledBaseStyles()),
|
|
8243
8448
|
}),
|
|
8244
8449
|
},
|
|
8245
|
-
...getFunctionalComponentLabelAfterStyles(
|
|
8450
|
+
...getFunctionalComponentLabelAfterStyles(),
|
|
8246
8451
|
...preventFoucOfNestedElementsStyles,
|
|
8247
8452
|
input: {
|
|
8248
8453
|
all: 'unset',
|
|
@@ -8258,6 +8463,9 @@ const getComponentCss$u = (disabled, loading, state) => {
|
|
|
8258
8463
|
borderRadius: radiusFull,
|
|
8259
8464
|
...(disabledOrLoading && {
|
|
8260
8465
|
pointerEvents: 'none', // to prevent form element becomes clickable/toggleable
|
|
8466
|
+
...forcedColorsMediaQuery({
|
|
8467
|
+
borderColor: 'GrayText',
|
|
8468
|
+
}),
|
|
8261
8469
|
}),
|
|
8262
8470
|
'&:focus-visible': getFocusBaseStyles(),
|
|
8263
8471
|
...(!disabledOrLoading &&
|
|
@@ -8272,6 +8480,7 @@ const getComponentCss$u = (disabled, loading, state) => {
|
|
|
8272
8480
|
gridArea: '1/1',
|
|
8273
8481
|
},
|
|
8274
8482
|
'&:checked::before': {
|
|
8483
|
+
forcedColorAdjust: 'none',
|
|
8275
8484
|
WebkitMask: `${checkedIcon} center/contain no-repeat`, // necessary for Sogou browser support :-)
|
|
8276
8485
|
mask: `${checkedIcon} center/contain no-repeat`,
|
|
8277
8486
|
backgroundColor: state === 'none' ? colorPrimary : formStateBorderColor,
|
|
@@ -8297,6 +8506,7 @@ const getComponentCss$u = (disabled, loading, state) => {
|
|
|
8297
8506
|
alignSelf: 'flex-start',
|
|
8298
8507
|
minHeight: fontLineHeight, // necessary for compact mode
|
|
8299
8508
|
cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
|
|
8509
|
+
...(disabled && getDisabledBaseStyles()),
|
|
8300
8510
|
},
|
|
8301
8511
|
...(loading && {
|
|
8302
8512
|
spinner: {
|
|
@@ -8310,7 +8520,7 @@ const getComponentCss$u = (disabled, loading, state) => {
|
|
|
8310
8520
|
},
|
|
8311
8521
|
}),
|
|
8312
8522
|
// .label / .required
|
|
8313
|
-
...getFunctionalComponentLabelStyles(disabled
|
|
8523
|
+
...getFunctionalComponentLabelStyles(disabled, loading, false, null, {
|
|
8314
8524
|
paddingTop: labelPaddingTop,
|
|
8315
8525
|
paddingInlineStart: labelPaddingInlineStart,
|
|
8316
8526
|
}),
|
|
@@ -8350,7 +8560,7 @@ const getComponentCss$t = (isDisabled, isLoading, hideLabel, state, isCompact, d
|
|
|
8350
8560
|
[`${cssVarInternalRadioGroupScaling}`]: isCompact ? 0.64285714 : 1,
|
|
8351
8561
|
[`${cssVarInternalRadioGroupOptionScaling}`]: isCompact ? 0.64285714 : 1,
|
|
8352
8562
|
},
|
|
8353
|
-
...getFunctionalComponentLabelAfterStyles(
|
|
8563
|
+
...getFunctionalComponentLabelAfterStyles(),
|
|
8354
8564
|
...(isLoading && {
|
|
8355
8565
|
'::slotted(*:not([slot]))': {
|
|
8356
8566
|
...addImportantToEachRule(getDisabledBaseStyles()),
|
|
@@ -8384,7 +8594,7 @@ const getComponentCss$t = (isDisabled, isLoading, hideLabel, state, isCompact, d
|
|
|
8384
8594
|
},
|
|
8385
8595
|
}),
|
|
8386
8596
|
// .label / .required
|
|
8387
|
-
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, {
|
|
8597
|
+
...getFunctionalComponentLabelStyles(isDisabled, isLoading, hideLabel, {
|
|
8388
8598
|
...(isDisabled ? getDisabledBaseStyles() : { cursor: 'inherit' }), // the label is not clickable
|
|
8389
8599
|
}),
|
|
8390
8600
|
// .message
|
|
@@ -8395,114 +8605,161 @@ const getComponentCss$t = (isDisabled, isLoading, hideLabel, state, isCompact, d
|
|
|
8395
8605
|
});
|
|
8396
8606
|
};
|
|
8397
8607
|
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8608
|
+
/**
|
|
8609
|
+
* Generates a CSS linear-gradient mask string for smooth edge fading
|
|
8610
|
+
* using smoothstep easing.
|
|
8611
|
+
*
|
|
8612
|
+
* @param fadeEdges - Which edges to fade.
|
|
8613
|
+
* @param edgeLength - Size of the fully transparent area at the edge (px).
|
|
8614
|
+
* @param fadeLength - Size of the transition area (px).
|
|
8615
|
+
* @param steps - Number of gradient stops (more = smoother, 8–12 is plenty).
|
|
8616
|
+
* @returns CSS linear-gradient string.
|
|
8617
|
+
*/
|
|
8618
|
+
const getSmoothMask = (fadeEdges, edgeLength = 24, fadeLength = 96, steps = 20) => {
|
|
8619
|
+
if (fadeEdges === 'none') {
|
|
8620
|
+
return 'linear-gradient(black,black)';
|
|
8621
|
+
}
|
|
8622
|
+
const fullLength = edgeLength + fadeLength;
|
|
8623
|
+
const leftStops = [];
|
|
8624
|
+
const rightStops = [];
|
|
8625
|
+
for (let i = 1; i < steps; i++) {
|
|
8626
|
+
const t = i / steps;
|
|
8627
|
+
const alpha = t * t * t * (t * (t * 6 - 15) + 10);
|
|
8628
|
+
leftStops.push(`rgb(0 0 0/${alpha.toFixed(3)}) ${(edgeLength + fadeLength * t).toFixed(0)}px`);
|
|
8629
|
+
rightStops.push(`rgb(0 0 0/${(1 - alpha).toFixed(3)}) calc(100% - ${(fullLength - fadeLength * t).toFixed(0)}px)`);
|
|
8630
|
+
}
|
|
8631
|
+
const left = `transparent 0px,transparent ${edgeLength}px,${leftStops.join(',')},black ${fullLength}px`;
|
|
8632
|
+
const right = `black calc(100% - ${fullLength}px),${rightStops.join(',')},transparent calc(100% - ${edgeLength}px),transparent 100%`;
|
|
8633
|
+
const gradients = {
|
|
8634
|
+
left: `linear-gradient(to right,${left},black 100%)`,
|
|
8635
|
+
right: `linear-gradient(to right,black 0%,${right})`,
|
|
8636
|
+
both: `linear-gradient(to right,${left},${right})`,
|
|
8637
|
+
};
|
|
8638
|
+
return gradients[fadeEdges];
|
|
8639
|
+
};
|
|
8640
|
+
|
|
8641
|
+
/**
|
|
8642
|
+
* @css-variable {"name": "--p-scroller-gap", "description": "Defines the gap between slotted nodes.", "defaultValue": "8px"}
|
|
8643
|
+
*/
|
|
8644
|
+
const cssVarGap = '--p-scroller-gap';
|
|
8645
|
+
/**
|
|
8646
|
+
* @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"}
|
|
8647
|
+
*/
|
|
8648
|
+
const cssVarIndicatorTop = '--p-scroller-indicator-top';
|
|
8649
|
+
/**
|
|
8650
|
+
* @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"}
|
|
8651
|
+
*/
|
|
8652
|
+
const cssVarIndicatorBottom = '--p-scroller-indicator-bottom';
|
|
8653
|
+
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"/>`);
|
|
8654
|
+
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"/>`);
|
|
8655
|
+
const scrollbarWidth = '12px';
|
|
8656
|
+
const safeZone = '4px';
|
|
8657
|
+
const getScrollIndicatorStyles = (direction, isVisible, isSticky, hasScrollbar, isCompact) => {
|
|
8658
|
+
const isPrev = direction === 'prev';
|
|
8659
|
+
const iconMask = `${isPrev ? iconPrev : iconNext} center/contain no-repeat`;
|
|
8660
|
+
return {
|
|
8661
|
+
gridArea: isPrev ? '1/1' : '1/3',
|
|
8662
|
+
zIndex: 1, // ensure that indicators are above the scroll area
|
|
8663
|
+
...(isSticky && {
|
|
8664
|
+
position: 'sticky',
|
|
8665
|
+
top: `var(${cssVarIndicatorTop},0px)`,
|
|
8666
|
+
bottom: `var(${cssVarIndicatorBottom},0px)`,
|
|
8667
|
+
}),
|
|
8668
|
+
...(hasScrollbar && {
|
|
8669
|
+
marginTop: `calc(-1 * ${scrollbarWidth})`,
|
|
8670
|
+
}),
|
|
8671
|
+
display: 'grid',
|
|
8672
|
+
alignSelf: 'center',
|
|
8673
|
+
width: '1.5rem',
|
|
8674
|
+
height: '1.5rem',
|
|
8675
|
+
...(!isCompact && {
|
|
8676
|
+
padding: spacingStaticXs$1,
|
|
8677
|
+
}),
|
|
8678
|
+
cursor: 'pointer',
|
|
8679
|
+
opacity: isVisible ? 1 : 0,
|
|
8680
|
+
visibility: isVisible ? 'inherit' : 'hidden',
|
|
8681
|
+
transform: `translate3d(${isVisible ? '0' : `${isPrev ? `calc(-1 * ${spacingStaticSm$1})` : spacingStaticSm$1}`},0,0)`,
|
|
8682
|
+
transition: `${getTransition('transform')},${getTransition('opacity')},visibility 0s linear ${isVisible ? '0s' : `var(${cssVariableTransitionDuration},${durationSm})`}`,
|
|
8683
|
+
'&:dir(rtl)': {
|
|
8684
|
+
gridArea: isPrev ? '1/3' : '1/1',
|
|
8685
|
+
},
|
|
8686
|
+
...hoverMediaQuery({
|
|
8687
|
+
'&:hover::after': {
|
|
8688
|
+
// do the transform on the pseudo-element to prevent the click area from moving when hovered
|
|
8689
|
+
transform: `translate3d(${isPrev ? `calc(-1 * ${spacingStaticXs$1})` : spacingStaticXs$1},0,0)`,
|
|
8690
|
+
},
|
|
8691
|
+
}),
|
|
8692
|
+
'&::after': {
|
|
8693
|
+
content: '""',
|
|
8694
|
+
WebkitMask: iconMask, // necessary for Sogou browser support :-)
|
|
8695
|
+
mask: iconMask,
|
|
8696
|
+
background: colorPrimary,
|
|
8697
|
+
transition: getTransition('transform'),
|
|
8698
|
+
},
|
|
8409
8699
|
};
|
|
8700
|
+
};
|
|
8701
|
+
const getComponentCss$s = (isIndicatorPrevVisible, // can be undefined in ssr context
|
|
8702
|
+
isIndicatorNextVisible, // can be undefined in ssr context
|
|
8703
|
+
isSticky, hasScrollbar, isCompact) => {
|
|
8704
|
+
const fadeEdges = !isIndicatorPrevVisible && !isIndicatorNextVisible
|
|
8705
|
+
? 'none'
|
|
8706
|
+
: !isIndicatorPrevVisible
|
|
8707
|
+
? 'right'
|
|
8708
|
+
: !isIndicatorNextVisible
|
|
8709
|
+
? 'left'
|
|
8710
|
+
: 'both';
|
|
8711
|
+
const mask = `${getSmoothMask(fadeEdges)} 0 0/auto no-repeat${hasScrollbar ? `,linear-gradient(black,black) 0 bottom/auto ${scrollbarWidth} no-repeat` : ''}`;
|
|
8410
8712
|
return getCss({
|
|
8411
8713
|
'@global': {
|
|
8412
8714
|
':host': {
|
|
8413
8715
|
display: 'block',
|
|
8716
|
+
borderRadius: `var(${legacyRadiusSmall},${radiusLg})`, // needs to be overwritable by tabs-bar to improve focus appearance
|
|
8414
8717
|
...addImportantToEachRule({
|
|
8415
|
-
height: 'inherit',
|
|
8416
8718
|
...hostHiddenStyles,
|
|
8417
8719
|
}),
|
|
8418
8720
|
},
|
|
8419
|
-
|
|
8721
|
+
slot: {
|
|
8722
|
+
gridArea: '1/2',
|
|
8723
|
+
position: 'relative', // necessary for tabs bar animation
|
|
8724
|
+
display: 'inline-flex',
|
|
8725
|
+
gap: `var(${cssVarGap},${isCompact ? spacingStaticXs$1 : spacingStaticSm$1})`,
|
|
8726
|
+
},
|
|
8420
8727
|
},
|
|
8421
8728
|
root: {
|
|
8422
|
-
position: 'relative',
|
|
8423
8729
|
display: 'grid',
|
|
8424
|
-
gridTemplateColumns:
|
|
8425
|
-
|
|
8426
|
-
|
|
8730
|
+
gridTemplateColumns: `auto minmax(0,1fr) auto`,
|
|
8731
|
+
alignItems: 'center',
|
|
8732
|
+
borderRadius: 'inherit',
|
|
8733
|
+
'&:has(.scroll:focus-visible)': getFocusBaseStyles(), // delegating the focus ensures mask does not cut off the focus ring
|
|
8427
8734
|
},
|
|
8428
|
-
|
|
8429
|
-
gridArea: '1
|
|
8430
|
-
|
|
8735
|
+
scroll: {
|
|
8736
|
+
gridArea: '1/1/1/-1',
|
|
8737
|
+
zIndex: 0, // ensure that scroll area is behind the indicators
|
|
8738
|
+
display: 'grid',
|
|
8739
|
+
gridTemplateColumns: `${safeZone} minmax(auto,1fr) ${safeZone}`,
|
|
8740
|
+
margin: `calc(-1 * ${safeZone})`, // compensate padding to ensure that `:host` is aligned with other elements
|
|
8741
|
+
padding: `${safeZone} 0px${hasScrollbar ? ` calc(${safeZone} + ${scrollbarWidth})` : ''}`, // ensure enough space is available for focus ring of slotted elements (horizontal space is given by `.sentinel`)
|
|
8742
|
+
outline: 'none', // focus ring is applied to `.root`, it would be cut off by the mask if applied to `.scroll`
|
|
8431
8743
|
overflow: 'auto hidden',
|
|
8432
|
-
...(
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
: isPrevHidden
|
|
8436
|
-
? 'linear-gradient(90deg,#000 calc(100% - 40px), #0000 calc(100% - 8px)) alpha'
|
|
8437
|
-
: 'linear-gradient(90deg,#0000 8px,#000 40px calc(100% - 40px),#0000 calc(100% - 8px)) alpha',
|
|
8438
|
-
}),
|
|
8439
|
-
...(!hasScrollbar && {
|
|
8440
|
-
// If scrollbar is disabled - hide scrollbar
|
|
8441
|
-
msOverflowStyle: 'none' /* IE and Edge */,
|
|
8442
|
-
scrollbarWidth: 'none' /* Firefox */,
|
|
8443
|
-
'&::-webkit-scrollbar': {
|
|
8444
|
-
display: 'none',
|
|
8445
|
-
},
|
|
8744
|
+
...(fadeEdges !== 'none' && {
|
|
8745
|
+
WebkitMask: mask, // necessary for Sogou browser support :-)
|
|
8746
|
+
mask,
|
|
8446
8747
|
}),
|
|
8748
|
+
scrollbarWidth: hasScrollbar ? 'thin' : 'none',
|
|
8447
8749
|
},
|
|
8448
|
-
//
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
position: 'relative',
|
|
8452
|
-
display: 'inline-flex',
|
|
8453
|
-
minHeight: '28px',
|
|
8454
|
-
minWidth: '100%',
|
|
8455
|
-
verticalAlign: 'top',
|
|
8456
|
-
borderRadius: `var(${legacyRadiusSmall}, ${radiusSm})`,
|
|
8457
|
-
'&:focus-visible': getFocusBaseStyles(),
|
|
8458
|
-
},
|
|
8459
|
-
trigger: {
|
|
8460
|
-
position: 'absolute',
|
|
8461
|
-
inset: '0 auto',
|
|
8462
|
-
width: '1px',
|
|
8750
|
+
// as soon as `@container scroll-state(scrollable: left)` has better browser support we can get rid of sentinel and IntersectionObserver
|
|
8751
|
+
sentinel: {
|
|
8752
|
+
width: safeZone,
|
|
8463
8753
|
visibility: 'hidden',
|
|
8464
|
-
'&:first-of-type': {
|
|
8465
|
-
|
|
8754
|
+
'&:first-of-type:dir(rtl)': {
|
|
8755
|
+
gridArea: '1/3',
|
|
8466
8756
|
},
|
|
8467
|
-
'&:last-of-type': {
|
|
8468
|
-
|
|
8469
|
-
},
|
|
8470
|
-
},
|
|
8471
|
-
'action-prev': {
|
|
8472
|
-
...actionPrevNextStyles,
|
|
8473
|
-
left: '-1px', // ensures that the gradient always overlays the content (e.g. when zoomed)
|
|
8474
|
-
justifyContent: 'flex-start',
|
|
8475
|
-
visibility: isPrevHidden ? 'hidden' : 'inherit',
|
|
8476
|
-
'& .action-button': {
|
|
8477
|
-
marginLeft: '8px',
|
|
8478
|
-
// hide buttons on mobile (actually devices not supporting hover)
|
|
8479
|
-
...hoverMediaQuery({
|
|
8480
|
-
visibility: isPrevHidden ? 'hidden' : 'inherit',
|
|
8481
|
-
}),
|
|
8482
|
-
},
|
|
8483
|
-
},
|
|
8484
|
-
'action-next': {
|
|
8485
|
-
...actionPrevNextStyles,
|
|
8486
|
-
right: '-1px', // ensures that the gradient always overlays the content (e.g. when zoomed)
|
|
8487
|
-
justifyContent: 'flex-end',
|
|
8488
|
-
visibility: isNextHidden ? 'hidden' : 'inherit',
|
|
8489
|
-
'& .action-button': {
|
|
8490
|
-
marginRight: '8px',
|
|
8491
|
-
// hide buttons on mobile (actually devices not supporting hover)
|
|
8492
|
-
...hoverMediaQuery({
|
|
8493
|
-
visibility: isNextHidden ? 'hidden' : 'inherit',
|
|
8494
|
-
}),
|
|
8495
|
-
},
|
|
8496
|
-
},
|
|
8497
|
-
'action-button': {
|
|
8498
|
-
...dismissButtonJssStyle,
|
|
8499
|
-
...dropShadowLowStyle,
|
|
8500
|
-
},
|
|
8501
|
-
icon: {
|
|
8502
|
-
'&:dir(rtl)': {
|
|
8503
|
-
transform: 'scaleX(-1)',
|
|
8757
|
+
'&:last-of-type:dir(rtl)': {
|
|
8758
|
+
gridArea: '1/1',
|
|
8504
8759
|
},
|
|
8505
8760
|
},
|
|
8761
|
+
prev: getScrollIndicatorStyles('prev', !!isIndicatorPrevVisible, isSticky, hasScrollbar, isCompact),
|
|
8762
|
+
next: getScrollIndicatorStyles('next', !!isIndicatorNextVisible, isSticky, hasScrollbar, isCompact),
|
|
8506
8763
|
});
|
|
8507
8764
|
};
|
|
8508
8765
|
|
|
@@ -8556,6 +8813,10 @@ const getComponentCss$r = (isCompact, isDisabled, isSelected, state, hasIcon, ha
|
|
|
8556
8813
|
...(isDisabled
|
|
8557
8814
|
? {
|
|
8558
8815
|
cursor: 'not-allowed',
|
|
8816
|
+
...forcedColorsMediaQuery({
|
|
8817
|
+
color: 'GrayText',
|
|
8818
|
+
borderColor: 'GrayText',
|
|
8819
|
+
}),
|
|
8559
8820
|
}
|
|
8560
8821
|
: {
|
|
8561
8822
|
cursor: 'pointer',
|
|
@@ -8575,6 +8836,10 @@ const getComponentCss$r = (isCompact, isDisabled, isSelected, state, hasIcon, ha
|
|
|
8575
8836
|
...textXSmallStyle,
|
|
8576
8837
|
overflowWrap: 'normal',
|
|
8577
8838
|
color: colorContrastMedium,
|
|
8839
|
+
...(isDisabled &&
|
|
8840
|
+
forcedColorsMediaQuery({
|
|
8841
|
+
color: 'GrayText',
|
|
8842
|
+
})),
|
|
8578
8843
|
},
|
|
8579
8844
|
},
|
|
8580
8845
|
...(hasIcon && {
|
|
@@ -8596,12 +8861,8 @@ const getComponentCss$q = (minWidth, maxWidth, columns, disabled, hideLabel, sta
|
|
|
8596
8861
|
...hostHiddenStyles,
|
|
8597
8862
|
}),
|
|
8598
8863
|
},
|
|
8599
|
-
...getFunctionalComponentLabelAfterStyles(
|
|
8864
|
+
...getFunctionalComponentLabelAfterStyles(),
|
|
8600
8865
|
...preventFoucOfNestedElementsStyles,
|
|
8601
|
-
...getFunctionalComponentLabelAfterStyles(disabled, getDisabledBaseStyles()),
|
|
8602
|
-
...(disabled && {
|
|
8603
|
-
'::slotted(*:not([slot]))': addImportantToEachRule(getDisabledBaseStyles()),
|
|
8604
|
-
}),
|
|
8605
8866
|
'slot:not([name])': {
|
|
8606
8867
|
display: 'grid',
|
|
8607
8868
|
gridAutoRows: '1fr', // for equal height
|
|
@@ -8619,7 +8880,7 @@ const getComponentCss$q = (minWidth, maxWidth, columns, disabled, hideLabel, sta
|
|
|
8619
8880
|
gap: spacingStaticXSmall,
|
|
8620
8881
|
},
|
|
8621
8882
|
// .label / .required
|
|
8622
|
-
...getFunctionalComponentLabelStyles(disabled, hideLabel, {
|
|
8883
|
+
...getFunctionalComponentLabelStyles(disabled, false, hideLabel, {
|
|
8623
8884
|
...(disabled ? getDisabledBaseStyles() : { cursor: 'inherit' }), // the label is not clickable
|
|
8624
8885
|
}),
|
|
8625
8886
|
// .message
|
|
@@ -8674,9 +8935,8 @@ const getComponentCss$o = (isOpen, isDisabled, hideLabel, state, isCompact) => {
|
|
|
8674
8935
|
[`${cssVarInternalOptgroupScaling}`]: isCompact ? 0.64285714 : 1,
|
|
8675
8936
|
...hostHiddenStyles,
|
|
8676
8937
|
}),
|
|
8677
|
-
...(isDisabled && getDisabledBaseStyles()),
|
|
8678
8938
|
},
|
|
8679
|
-
...getFunctionalComponentLabelAfterStyles(
|
|
8939
|
+
...getFunctionalComponentLabelAfterStyles(),
|
|
8680
8940
|
...preventFoucOfNestedElementsStyles,
|
|
8681
8941
|
button: {
|
|
8682
8942
|
...getButtonJssStyle('select', isOpen, isDisabled, state, isCompact, cssVarInternalSelectScaling),
|
|
@@ -8699,7 +8959,7 @@ const getComponentCss$o = (isOpen, isDisabled, hideLabel, state, isCompact) => {
|
|
|
8699
8959
|
// .no-results / .sr-only
|
|
8700
8960
|
...getFunctionalComponentNoResultsOptionStyles('select-option', cssVarInternalSelectScaling),
|
|
8701
8961
|
// .label / .required
|
|
8702
|
-
...getFunctionalComponentLabelStyles(isDisabled, hideLabel),
|
|
8962
|
+
...getFunctionalComponentLabelStyles(isDisabled, false, hideLabel),
|
|
8703
8963
|
// .message
|
|
8704
8964
|
...getFunctionalComponentStateMessageStyles(state),
|
|
8705
8965
|
});
|
|
@@ -8751,6 +9011,9 @@ const getComponentCss$n = (isOpen, background, hasDismissButton) => {
|
|
|
8751
9011
|
marginBlockStart: spacingFluidLarge, // ensures minimal space at the top to visualize paper sheet like border top radius in case sheet becomes scrollable
|
|
8752
9012
|
borderTopLeftRadius: dialogBorderRadius,
|
|
8753
9013
|
borderTopRightRadius: dialogBorderRadius,
|
|
9014
|
+
...forcedColorsMediaQuery({
|
|
9015
|
+
borderTop: '2px solid CanvasText',
|
|
9016
|
+
}),
|
|
8754
9017
|
},
|
|
8755
9018
|
...(hasDismissButton && {
|
|
8756
9019
|
dismiss: getDialogDismissButtonJssStyle(),
|
|
@@ -8796,6 +9059,7 @@ const getComponentCss$m = (size) => {
|
|
|
8796
9059
|
},
|
|
8797
9060
|
':host': {
|
|
8798
9061
|
display: 'inline-flex',
|
|
9062
|
+
color: colorPrimary,
|
|
8799
9063
|
...addImportantToEachRule({
|
|
8800
9064
|
verticalAlign: 'top',
|
|
8801
9065
|
...hostHiddenStyles,
|
|
@@ -8812,7 +9076,7 @@ const getComponentCss$m = (size) => {
|
|
|
8812
9076
|
},
|
|
8813
9077
|
'&:last-child': {
|
|
8814
9078
|
animation: `$dash ${animationDuration} steps(50) infinite`,
|
|
8815
|
-
stroke:
|
|
9079
|
+
stroke: 'currentcolor', // necessary for proper color inheritance
|
|
8816
9080
|
strokeDasharray: strokeDasharray
|
|
8817
9081
|
,
|
|
8818
9082
|
strokeLinecap: 'round',
|
|
@@ -8854,9 +9118,6 @@ const getComponentCss$l = (state, disabled) => {
|
|
|
8854
9118
|
fontSize: 'inherit',
|
|
8855
9119
|
...hostHiddenStyles,
|
|
8856
9120
|
...(isDisabled && getDisabledBaseStyles()),
|
|
8857
|
-
'&(:not(:last-of-type))': {
|
|
8858
|
-
marginInlineEnd: spacingFluidXSmall,
|
|
8859
|
-
},
|
|
8860
9121
|
}),
|
|
8861
9122
|
},
|
|
8862
9123
|
...preventFoucOfNestedElementsStyles,
|
|
@@ -8886,6 +9147,15 @@ const getComponentCss$l = (state, disabled) => {
|
|
|
8886
9147
|
},
|
|
8887
9148
|
})),
|
|
8888
9149
|
'&:focus-visible': getFocusBaseStyles(),
|
|
9150
|
+
...forcedColorsMediaQuery({
|
|
9151
|
+
...(isStateCurrent && {
|
|
9152
|
+
outline: '1px solid CanvasText',
|
|
9153
|
+
}),
|
|
9154
|
+
...(isDisabled && {
|
|
9155
|
+
color: 'GrayText',
|
|
9156
|
+
borderColor: 'GrayText',
|
|
9157
|
+
}),
|
|
9158
|
+
}),
|
|
8889
9159
|
},
|
|
8890
9160
|
},
|
|
8891
9161
|
icon: {
|
|
@@ -8893,9 +9163,15 @@ const getComponentCss$l = (state, disabled) => {
|
|
|
8893
9163
|
fontSize: 'inherit', // necessary because of all: unset
|
|
8894
9164
|
width: fontLineHeight,
|
|
8895
9165
|
height: fontLineHeight,
|
|
9166
|
+
forcedColorAdjust: 'none',
|
|
8896
9167
|
...(isStateCurrentOrUndefined && {
|
|
8897
9168
|
display: 'grid',
|
|
8898
9169
|
backgroundImage: `radial-gradient(circle, ${colorPrimary} 60%, transparent 62%)`,
|
|
9170
|
+
...(isDisabled && {
|
|
9171
|
+
...forcedColorsMediaQuery({
|
|
9172
|
+
backgroundImage: 'radial-gradient(circle, GrayText 60%, transparent 62%)',
|
|
9173
|
+
}),
|
|
9174
|
+
}),
|
|
8899
9175
|
'&::before': {
|
|
8900
9176
|
content: '""',
|
|
8901
9177
|
...Array.from(new Array(9)).reduce((result, _, i) => ({
|
|
@@ -8917,7 +9193,7 @@ const getComponentCss$k = (size) => {
|
|
|
8917
9193
|
return getCss({
|
|
8918
9194
|
'@global': {
|
|
8919
9195
|
':host': {
|
|
8920
|
-
display: '
|
|
9196
|
+
display: 'grid',
|
|
8921
9197
|
...addImportantToEachRule({
|
|
8922
9198
|
...hostHiddenStyles,
|
|
8923
9199
|
}),
|
|
@@ -8925,8 +9201,9 @@ const getComponentCss$k = (size) => {
|
|
|
8925
9201
|
...preventFoucOfNestedElementsStyles,
|
|
8926
9202
|
},
|
|
8927
9203
|
scroller: {
|
|
9204
|
+
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)
|
|
8928
9205
|
...textSmallStyle,
|
|
8929
|
-
...buildResponsiveStyles(size, (s) => ({ fontSize: fontSizeText[s] })),
|
|
9206
|
+
...buildResponsiveStyles(size, (s) => ({ fontSize: fontSizeText$1[s] })),
|
|
8930
9207
|
},
|
|
8931
9208
|
});
|
|
8932
9209
|
};
|
|
@@ -8947,6 +9224,7 @@ const getColors$1 = (checked, loading) => {
|
|
|
8947
9224
|
*/
|
|
8948
9225
|
const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisabled, isLoading, isCompact) => {
|
|
8949
9226
|
const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, toggleBackgroundColor, textColor } = getColors$1(isChecked, isLoading);
|
|
9227
|
+
const disabledOrLoading = isDisabledOrLoading(isDisabled, isLoading);
|
|
8950
9228
|
const gap = `calc(11.2px * (var(${cssVarInternalSwitchScaling}) - 0.64285714) + 4px)`;
|
|
8951
9229
|
const buttonBorderWidth = borderWidthThin;
|
|
8952
9230
|
const buttonWidth = `calc(var(${cssVarInternalSwitchScaling}) * 3rem)`;
|
|
@@ -8992,9 +9270,13 @@ const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisa
|
|
|
8992
9270
|
border: `${buttonBorderWidth} solid ${buttonBorderColor}`,
|
|
8993
9271
|
borderRadius: radiusFull,
|
|
8994
9272
|
background: buttonBackgroundColor,
|
|
8995
|
-
cursor:
|
|
9273
|
+
cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
|
|
8996
9274
|
transition: `${getTransition('background-color')}, ${getTransition('border-color')}`,
|
|
8997
|
-
...(
|
|
9275
|
+
...(disabledOrLoading &&
|
|
9276
|
+
forcedColorsMediaQuery({
|
|
9277
|
+
borderColor: 'GrayText',
|
|
9278
|
+
})),
|
|
9279
|
+
...(!disabledOrLoading &&
|
|
8998
9280
|
hoverMediaQuery({
|
|
8999
9281
|
'&:hover': {
|
|
9000
9282
|
borderColor: buttonBorderColorHover,
|
|
@@ -9013,8 +9295,12 @@ const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisa
|
|
|
9013
9295
|
...textSmallStyle,
|
|
9014
9296
|
minWidth: 0, // prevents flex child to overflow max available parent size
|
|
9015
9297
|
minHeight: 0, // prevents flex child to overflow max available parent size
|
|
9016
|
-
cursor:
|
|
9298
|
+
cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
|
|
9017
9299
|
color: textColor,
|
|
9300
|
+
...(disabledOrLoading &&
|
|
9301
|
+
forcedColorsMediaQuery({
|
|
9302
|
+
color: 'GrayText',
|
|
9303
|
+
})),
|
|
9018
9304
|
...mergeDeep(buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
9019
9305
|
order: alignLabelValue === 'start' ? -1 : 0,
|
|
9020
9306
|
})), buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, {
|
|
@@ -9023,6 +9309,7 @@ const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisa
|
|
|
9023
9309
|
},
|
|
9024
9310
|
},
|
|
9025
9311
|
toggle: {
|
|
9312
|
+
forcedColorAdjust: 'none',
|
|
9026
9313
|
display: 'flex',
|
|
9027
9314
|
placeItems: 'center',
|
|
9028
9315
|
placeContent: 'center',
|
|
@@ -9058,19 +9345,31 @@ const getComponentCss$i = () => {
|
|
|
9058
9345
|
});
|
|
9059
9346
|
};
|
|
9060
9347
|
|
|
9348
|
+
/**
|
|
9349
|
+
* @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"}
|
|
9350
|
+
*/
|
|
9351
|
+
const cssVarScrollIndicatorTop = '--p-table-scroll-indicator-top';
|
|
9352
|
+
/**
|
|
9353
|
+
* @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"}
|
|
9354
|
+
*/
|
|
9355
|
+
const cssVarScrollIndicatorBottom = '--p-table-scroll-indicator-bottom';
|
|
9061
9356
|
const cssVariableTablePadding = '--_a';
|
|
9062
9357
|
const cssVariableTableHoverColor = '--_b';
|
|
9063
9358
|
const cssVariableTableBorderColor = '--_c';
|
|
9064
9359
|
const cssVariableTableBorderWidth = '--_d';
|
|
9065
|
-
const getComponentCss$h = (
|
|
9360
|
+
const getComponentCss$h = (isCompact, layout) => {
|
|
9066
9361
|
return getCss({
|
|
9067
9362
|
'@global': {
|
|
9068
9363
|
':host': {
|
|
9069
9364
|
display: 'block',
|
|
9070
9365
|
...addImportantToEachRule({
|
|
9366
|
+
'--p-scroller-indicator-top': `var(${cssVarScrollIndicatorTop},0px)`,
|
|
9367
|
+
'--p-scroller-indicator-bottom': `var(${cssVarScrollIndicatorBottom},0px)`,
|
|
9071
9368
|
[cssVariableTableHoverColor]: colorFrosted,
|
|
9072
9369
|
[cssVariableTableBorderColor]: colorContrastLow,
|
|
9073
|
-
...(
|
|
9370
|
+
...(isCompact && {
|
|
9371
|
+
[cssVariableTablePadding]: spacingStaticSmall,
|
|
9372
|
+
}),
|
|
9074
9373
|
...hostHiddenStyles,
|
|
9075
9374
|
...textSmallStyle,
|
|
9076
9375
|
color: colorPrimary,
|
|
@@ -9250,102 +9549,100 @@ const getComponentCss$c = () => {
|
|
|
9250
9549
|
});
|
|
9251
9550
|
};
|
|
9252
9551
|
|
|
9253
|
-
const
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9552
|
+
const backgroundMap = {
|
|
9553
|
+
canvas: colorCanvas,
|
|
9554
|
+
surface: colorSurface,
|
|
9555
|
+
frosted: colorFrosted,
|
|
9556
|
+
};
|
|
9557
|
+
const fontSizeText = {
|
|
9558
|
+
small: typescaleSm,
|
|
9559
|
+
medium: typescaleMd,
|
|
9261
9560
|
};
|
|
9262
|
-
const getComponentCss$b = (size,
|
|
9561
|
+
const getComponentCss$b = (background, size, isCompact) => {
|
|
9263
9562
|
return getCss({
|
|
9264
9563
|
'@global': {
|
|
9265
9564
|
':host': {
|
|
9266
|
-
display: '
|
|
9565
|
+
display: 'grid',
|
|
9267
9566
|
...addImportantToEachRule({
|
|
9268
|
-
position: 'relative',
|
|
9567
|
+
position: 'relative', // necessary for the bar animation to calculate the tab items position correctly
|
|
9269
9568
|
...hostHiddenStyles,
|
|
9270
9569
|
}),
|
|
9271
9570
|
},
|
|
9272
9571
|
...preventFoucOfNestedElementsStyles,
|
|
9273
9572
|
...addImportantToEachRule({
|
|
9274
|
-
'::slotted
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9573
|
+
'::slotted': {
|
|
9574
|
+
'&(a),&(button)': {
|
|
9575
|
+
all: 'unset',
|
|
9576
|
+
padding: isCompact ? `2px ${spacingStaticSm$1}` : `12px ${spacingStaticMd}`,
|
|
9577
|
+
whiteSpace: 'nowrap',
|
|
9578
|
+
cursor: 'pointer',
|
|
9579
|
+
borderRadius: `var(${legacyRadiusSmall}, ${radiusFull})`,
|
|
9580
|
+
...(background === 'none' && {
|
|
9581
|
+
background: colorFrosted,
|
|
9582
|
+
}),
|
|
9583
|
+
font: `${typescaleSm} / ${leadingNormal} ${fontPorscheNext}`,
|
|
9584
|
+
...buildResponsiveStyles(size, (sizeValue) => ({
|
|
9585
|
+
fontSize: fontSizeText[sizeValue],
|
|
9586
|
+
})),
|
|
9587
|
+
color: colorPrimary,
|
|
9588
|
+
transition: `${getTransition('color', 'moderate')}, ${getTransition('background-color')}`,
|
|
9589
|
+
},
|
|
9590
|
+
'&(a:focus-visible),&(button:focus-visible)': getFocusBaseStyles(),
|
|
9291
9591
|
...hoverMediaQuery({
|
|
9292
|
-
'
|
|
9293
|
-
|
|
9294
|
-
position: 'absolute',
|
|
9295
|
-
inset: '-2px -4px',
|
|
9296
|
-
borderRadius: `var(${legacyRadiusSmall}, ${radiusSm})`,
|
|
9297
|
-
zIndex: -1, // Stack the pseudo-element behind the button to avoid overlay of frosted-glass effect with label text
|
|
9298
|
-
transition: getTransition('background-color'),
|
|
9592
|
+
'&(a:not([aria-current="true"]):hover),&(button:not([aria-selected="true"]):hover)': {
|
|
9593
|
+
background: colorFrostedStrong,
|
|
9299
9594
|
},
|
|
9300
9595
|
}),
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
background: colorFrosted,
|
|
9596
|
+
'&(a[aria-current="true"]),&(button[aria-selected="true"])': {
|
|
9597
|
+
color: colorCanvas,
|
|
9598
|
+
background: colorPrimary,
|
|
9599
|
+
transition: `${getTransition('color', 'moderate')}, background-color 0s linear ${durationMd}`, // the background shall be changed immediately after the bar transition has finished
|
|
9306
9600
|
},
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
|
|
9601
|
+
...forcedColorsMediaQuery({
|
|
9602
|
+
'&(a),&(button)': {
|
|
9603
|
+
forcedColorAdjust: 'none',
|
|
9604
|
+
background: 'Canvas',
|
|
9605
|
+
},
|
|
9606
|
+
'&(a)': {
|
|
9607
|
+
color: 'LinkText',
|
|
9608
|
+
boxShadow: 'inset 0 0 0 2px LinkText',
|
|
9609
|
+
},
|
|
9610
|
+
'&(button)': {
|
|
9611
|
+
color: 'ButtonText',
|
|
9612
|
+
boxShadow: 'inset 0 0 0 2px ButtonBorder',
|
|
9613
|
+
},
|
|
9614
|
+
'&(a[aria-current="true"]),&(button[aria-selected="true"])': {
|
|
9615
|
+
transition: 'unset',
|
|
9616
|
+
},
|
|
9617
|
+
}),
|
|
9322
9618
|
},
|
|
9323
9619
|
}),
|
|
9324
9620
|
},
|
|
9325
9621
|
scroller: {
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
...
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9622
|
+
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)
|
|
9623
|
+
borderRadius: `var(${legacyRadiusSmall}, ${radiusFull})`,
|
|
9624
|
+
...(background !== 'none' && {
|
|
9625
|
+
background: backgroundMap[background],
|
|
9626
|
+
padding: spacingStaticXs$1,
|
|
9627
|
+
...forcedColorsMediaQuery({
|
|
9628
|
+
forcedColorAdjust: 'none',
|
|
9629
|
+
outline: '1px solid CanvasText',
|
|
9630
|
+
}),
|
|
9631
|
+
}),
|
|
9632
|
+
...(background === 'frosted' && {
|
|
9633
|
+
WebkitBackdropFilter: blurFrosted,
|
|
9634
|
+
backdropFilter: blurFrosted,
|
|
9635
|
+
}),
|
|
9335
9636
|
},
|
|
9336
|
-
// moving bar
|
|
9337
9637
|
bar: {
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
to: {
|
|
9347
|
-
visibility: 'hidden',
|
|
9348
|
-
},
|
|
9638
|
+
position: 'absolute',
|
|
9639
|
+
insetInlineStart: 0, // necessary for the bar animation to calculate the tab items position correctly in rtl mode
|
|
9640
|
+
width: '0px', // ensures element is not visible after `.animate()` has finished
|
|
9641
|
+
height: '100%',
|
|
9642
|
+
zIndex: -1,
|
|
9643
|
+
pointerEvents: 'none',
|
|
9644
|
+
borderRadius: `var(${legacyRadiusSmall}, ${radiusFull})`,
|
|
9645
|
+
background: colorPrimary,
|
|
9349
9646
|
},
|
|
9350
9647
|
});
|
|
9351
9648
|
};
|
|
@@ -9378,7 +9675,7 @@ const getComponentCss$9 = () => {
|
|
|
9378
9675
|
...preventFoucOfNestedElementsStyles,
|
|
9379
9676
|
},
|
|
9380
9677
|
root: {
|
|
9381
|
-
marginBottom:
|
|
9678
|
+
marginBottom: spacingStaticSm$1,
|
|
9382
9679
|
},
|
|
9383
9680
|
});
|
|
9384
9681
|
};
|
|
@@ -9425,6 +9722,10 @@ const getComponentCss$8 = (hasLabel, isCompact) => {
|
|
|
9425
9722
|
backgroundColor: colorFrosted,
|
|
9426
9723
|
},
|
|
9427
9724
|
}),
|
|
9725
|
+
...forcedColorsMediaQuery({
|
|
9726
|
+
outline: '2px solid CanvasText',
|
|
9727
|
+
outlineOffset: '-2px',
|
|
9728
|
+
}),
|
|
9428
9729
|
'&:focus-visible': getFocusBaseStyles(),
|
|
9429
9730
|
},
|
|
9430
9731
|
},
|
|
@@ -9495,7 +9796,7 @@ const getComponentCss$7 = (variant, compact, isFocusable, hasIcon) => {
|
|
|
9495
9796
|
display: 'flex',
|
|
9496
9797
|
gap: '2px',
|
|
9497
9798
|
padding: compact ? '1px 6px' : `${spacingStaticXSmall} 9px`,
|
|
9498
|
-
borderRadius: `var(${legacyRadiusSmall}, ${
|
|
9799
|
+
borderRadius: `var(${legacyRadiusSmall}, calc(${compact ? '1px' : spacingStaticXSmall} + (${fontLineHeight} / 2)))`, // ensures pill shape has a maximum border radius to support multiline.
|
|
9499
9800
|
font: textXSmallStyle.font,
|
|
9500
9801
|
...frostedGlassStyle,
|
|
9501
9802
|
color: textColor,
|
|
@@ -9507,6 +9808,12 @@ const getComponentCss$7 = (variant, compact, isFocusable, hasIcon) => {
|
|
|
9507
9808
|
background: backgroundHoverColor,
|
|
9508
9809
|
},
|
|
9509
9810
|
})),
|
|
9811
|
+
...forcedColorsMediaQuery({
|
|
9812
|
+
outline: '2px solid CanvasText',
|
|
9813
|
+
outlineOffset: '-2px',
|
|
9814
|
+
backgroundColor: 'Canvas',
|
|
9815
|
+
color: 'CanvasText',
|
|
9816
|
+
}),
|
|
9510
9817
|
},
|
|
9511
9818
|
'::slotted': addImportantToEachRule({
|
|
9512
9819
|
'&(a),&(button)': {
|
|
@@ -9678,10 +9985,9 @@ const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, isCompact,
|
|
|
9678
9985
|
[`${cssVarInternalTextareaScaling}`]: isCompact ? 0.64285714 : 1,
|
|
9679
9986
|
...addImportantToEachRule({
|
|
9680
9987
|
...hostHiddenStyles,
|
|
9681
|
-
...(isDisabled && getDisabledBaseStyles()),
|
|
9682
9988
|
}),
|
|
9683
9989
|
},
|
|
9684
|
-
...getFunctionalComponentLabelAfterStyles(
|
|
9990
|
+
...getFunctionalComponentLabelAfterStyles(),
|
|
9685
9991
|
...preventFoucOfNestedElementsStyles,
|
|
9686
9992
|
textarea: {
|
|
9687
9993
|
all: 'unset',
|
|
@@ -9728,6 +10034,7 @@ const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, isCompact,
|
|
|
9728
10034
|
},
|
|
9729
10035
|
wrapper: {
|
|
9730
10036
|
display: 'grid',
|
|
10037
|
+
...(isDisabled && getDisabledBaseStyles()),
|
|
9731
10038
|
},
|
|
9732
10039
|
...(hasCounter && {
|
|
9733
10040
|
counter: {
|
|
@@ -9740,7 +10047,7 @@ const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, isCompact,
|
|
|
9740
10047
|
'sr-only': getHiddenTextJssStyle(),
|
|
9741
10048
|
}),
|
|
9742
10049
|
// .label / .required
|
|
9743
|
-
...getFunctionalComponentLabelStyles(isDisabled, hideLabel),
|
|
10050
|
+
...getFunctionalComponentLabelStyles(isDisabled, false, hideLabel),
|
|
9744
10051
|
// .message
|
|
9745
10052
|
...getFunctionalComponentStateMessageStyles(state),
|
|
9746
10053
|
});
|