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