@porsche-design-system/components-react 4.0.0-beta.2 → 4.0.0-beta.3
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 +293 -1
- package/cjs/lib/components/button-pure.wrapper.cjs +3 -3
- package/cjs/lib/components/display.wrapper.cjs +1 -0
- package/cjs/lib/components/flag.wrapper.cjs +1 -1
- package/cjs/lib/components/heading.wrapper.cjs +3 -3
- package/cjs/lib/components/icon.wrapper.cjs +1 -1
- package/cjs/lib/components/link-pure.wrapper.cjs +3 -3
- package/cjs/lib/components/spinner.wrapper.cjs +3 -3
- package/cjs/lib/components/text.wrapper.cjs +1 -1
- package/esm/lib/components/accordion.wrapper.d.ts +8 -8
- package/esm/lib/components/button-pure.wrapper.d.ts +15 -7
- package/esm/lib/components/button-pure.wrapper.mjs +3 -3
- package/esm/lib/components/button-tile.wrapper.d.ts +2 -2
- package/esm/lib/components/button.wrapper.d.ts +6 -6
- package/esm/lib/components/carousel.wrapper.d.ts +10 -10
- package/esm/lib/components/checkbox.wrapper.d.ts +6 -6
- package/esm/lib/components/crest.wrapper.d.ts +6 -6
- package/esm/lib/components/display.wrapper.d.ts +1 -0
- package/esm/lib/components/display.wrapper.mjs +1 -0
- package/esm/lib/components/drilldown-link.wrapper.d.ts +8 -8
- package/esm/lib/components/drilldown.wrapper.d.ts +8 -8
- package/esm/lib/components/fieldset.wrapper.d.ts +6 -6
- package/esm/lib/components/flag.wrapper.d.ts +5 -5
- package/esm/lib/components/flag.wrapper.mjs +1 -1
- package/esm/lib/components/flyout.wrapper.d.ts +2 -2
- package/esm/lib/components/heading.wrapper.d.ts +19 -11
- package/esm/lib/components/heading.wrapper.mjs +3 -3
- package/esm/lib/components/icon.wrapper.d.ts +7 -7
- package/esm/lib/components/icon.wrapper.mjs +1 -1
- package/esm/lib/components/input-date.wrapper.d.ts +12 -12
- package/esm/lib/components/input-email.wrapper.d.ts +8 -8
- package/esm/lib/components/input-month.wrapper.d.ts +12 -12
- package/esm/lib/components/input-number.wrapper.d.ts +8 -8
- package/esm/lib/components/input-password.wrapper.d.ts +6 -6
- package/esm/lib/components/input-search.wrapper.d.ts +6 -6
- package/esm/lib/components/input-tel.wrapper.d.ts +6 -6
- package/esm/lib/components/input-text.wrapper.d.ts +6 -6
- package/esm/lib/components/input-time.wrapper.d.ts +14 -14
- package/esm/lib/components/input-url.wrapper.d.ts +16 -16
- package/esm/lib/components/input-week.wrapper.d.ts +14 -14
- package/esm/lib/components/link-pure.wrapper.d.ts +23 -15
- package/esm/lib/components/link-pure.wrapper.mjs +3 -3
- package/esm/lib/components/link-tile-product.wrapper.d.ts +8 -8
- package/esm/lib/components/link-tile.wrapper.d.ts +8 -8
- package/esm/lib/components/link.wrapper.d.ts +14 -14
- package/esm/lib/components/modal.wrapper.d.ts +2 -2
- package/esm/lib/components/model-signature.wrapper.d.ts +2 -2
- package/esm/lib/components/multi-select.wrapper.d.ts +10 -10
- package/esm/lib/components/pin-code.wrapper.d.ts +8 -8
- package/esm/lib/components/popover.wrapper.d.ts +6 -6
- package/esm/lib/components/radio-group-option.wrapper.d.ts +2 -2
- package/esm/lib/components/radio-group.wrapper.d.ts +8 -8
- package/esm/lib/components/segmented-control-item.wrapper.d.ts +4 -4
- package/esm/lib/components/segmented-control.wrapper.d.ts +4 -4
- package/esm/lib/components/select.wrapper.d.ts +10 -10
- package/esm/lib/components/sheet.wrapper.d.ts +2 -2
- package/esm/lib/components/spinner.wrapper.d.ts +13 -5
- package/esm/lib/components/spinner.wrapper.mjs +3 -3
- package/esm/lib/components/switch.wrapper.d.ts +6 -6
- package/esm/lib/components/table-cell.wrapper.d.ts +2 -2
- package/esm/lib/components/table-head-cell.wrapper.d.ts +4 -4
- package/esm/lib/components/tabs-bar.wrapper.d.ts +2 -2
- package/esm/lib/components/tabs.wrapper.d.ts +2 -2
- package/esm/lib/components/tag-dismissible.wrapper.d.ts +6 -6
- package/esm/lib/components/tag.wrapper.d.ts +2 -2
- package/esm/lib/components/text.wrapper.d.ts +12 -12
- package/esm/lib/components/text.wrapper.mjs +1 -1
- package/esm/lib/components/textarea.wrapper.d.ts +6 -6
- package/esm/lib/components/wordmark.wrapper.d.ts +8 -8
- package/esm/lib/types.d.ts +322 -141
- package/global-styles/cn/index.css +3 -7
- package/global-styles/index.css +3 -7
- package/global-styles/variables.css +3 -7
- package/package.json +6 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +341 -319
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +18 -8
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flag.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.cjs +2 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/spinner.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +341 -319
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +18 -8
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flag.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs +2 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/spinner.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.mjs +1 -1
- package/ssr/esm/lib/components/accordion.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/button-pure.wrapper.d.ts +15 -7
- package/ssr/esm/lib/components/button-tile.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/button.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/carousel.wrapper.d.ts +10 -10
- package/ssr/esm/lib/components/checkbox.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/crest.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/display.wrapper.d.ts +1 -0
- package/ssr/esm/lib/components/drilldown-link.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/drilldown.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/fieldset.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/flag.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/flyout.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/heading.wrapper.d.ts +19 -11
- package/ssr/esm/lib/components/icon.wrapper.d.ts +7 -7
- package/ssr/esm/lib/components/input-date.wrapper.d.ts +12 -12
- package/ssr/esm/lib/components/input-email.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/input-month.wrapper.d.ts +12 -12
- package/ssr/esm/lib/components/input-number.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/input-password.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/input-search.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/input-tel.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/input-text.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/input-time.wrapper.d.ts +14 -14
- package/ssr/esm/lib/components/input-url.wrapper.d.ts +16 -16
- package/ssr/esm/lib/components/input-week.wrapper.d.ts +14 -14
- package/ssr/esm/lib/components/link-pure.wrapper.d.ts +23 -15
- package/ssr/esm/lib/components/link-tile-product.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/link-tile.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/link.wrapper.d.ts +14 -14
- package/ssr/esm/lib/components/modal.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/model-signature.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/multi-select.wrapper.d.ts +10 -10
- package/ssr/esm/lib/components/pin-code.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/popover.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/radio-group-option.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/radio-group.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/segmented-control-item.wrapper.d.ts +4 -4
- package/ssr/esm/lib/components/segmented-control.wrapper.d.ts +4 -4
- package/ssr/esm/lib/components/select.wrapper.d.ts +10 -10
- package/ssr/esm/lib/components/sheet.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/spinner.wrapper.d.ts +13 -5
- package/ssr/esm/lib/components/switch.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/table-cell.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/table-head-cell.wrapper.d.ts +4 -4
- package/ssr/esm/lib/components/tabs-bar.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/tabs.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/tag-dismissible.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/tag.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/text.wrapper.d.ts +12 -12
- package/ssr/esm/lib/components/textarea.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/wordmark.wrapper.d.ts +8 -8
- package/ssr/esm/lib/dsr-components/carousel.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/display.d.ts +2 -0
- package/ssr/esm/lib/dsr-components/drilldown-item.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/flyout.d.ts +1 -1
- package/ssr/esm/lib/types.d.ts +322 -141
- package/tailwindcss/index.css +19 -4
|
@@ -22,16 +22,7 @@ const leadingNormal$1 = 'calc(6px + 2.125ex)';
|
|
|
22
22
|
/** @deprecated since v4.0.0, will be removed with next major release. Use leadingNormal instead */
|
|
23
23
|
const fontLineHeight = leadingNormal$1;
|
|
24
24
|
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
const fontSizeDisplayMedium = 'clamp(2.03rem, 3.58vw + 1.31rem, 5.61rem)';
|
|
28
|
-
|
|
29
|
-
const fontSizeDisplaySmall = 'clamp(1.8rem, 2.41vw + 1.32rem, 4.21rem)';
|
|
30
|
-
|
|
31
|
-
const typescaleLg = 'clamp(1.27rem, 0.51vw + 1.16rem, 1.78rem)';
|
|
32
|
-
|
|
33
|
-
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleLg instead. */
|
|
34
|
-
const fontSizeHeadingLarge = typescaleLg;
|
|
25
|
+
const typescaleLg$1 = 'clamp(1.27rem, 0.51vw + 1.16rem, 1.78rem)';
|
|
35
26
|
|
|
36
27
|
const typescaleMd$1 = 'clamp(1.13rem, 0.21vw + 1.08rem, 1.33rem)';
|
|
37
28
|
|
|
@@ -43,18 +34,18 @@ const typescaleSm$1 = '1rem';
|
|
|
43
34
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleSm instead. */
|
|
44
35
|
const fontSizeHeadingSmall = typescaleSm$1;
|
|
45
36
|
|
|
46
|
-
const typescaleXl = 'clamp(1.42rem, 0.94vw + 1.23rem, 2.37rem)';
|
|
37
|
+
const typescaleXl$1 = 'clamp(1.42rem, 0.94vw + 1.23rem, 2.37rem)';
|
|
47
38
|
|
|
48
39
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleXl instead. */
|
|
49
|
-
const fontSizeHeadingXLarge = typescaleXl;
|
|
40
|
+
const fontSizeHeadingXLarge = typescaleXl$1;
|
|
50
41
|
|
|
51
|
-
const typescale2Xl = 'clamp(1.6rem, 1.56vw + 1.29rem, 3.16rem)';
|
|
42
|
+
const typescale2Xl$1 = 'clamp(1.6rem, 1.56vw + 1.29rem, 3.16rem)';
|
|
52
43
|
|
|
53
44
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescale2Xl instead. */
|
|
54
|
-
const fontSizeHeadingXXLarge = typescale2Xl;
|
|
45
|
+
const fontSizeHeadingXXLarge = typescale2Xl$1;
|
|
55
46
|
|
|
56
47
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleLg instead. */
|
|
57
|
-
const fontSizeTextLarge = typescaleLg;
|
|
48
|
+
const fontSizeTextLarge = typescaleLg$1;
|
|
58
49
|
|
|
59
50
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleMd instead. */
|
|
60
51
|
const fontSizeTextMedium = typescaleMd$1;
|
|
@@ -63,17 +54,17 @@ const fontSizeTextMedium = typescaleMd$1;
|
|
|
63
54
|
const fontSizeTextSmall = typescaleSm$1;
|
|
64
55
|
|
|
65
56
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleXl instead. */
|
|
66
|
-
const fontSizeTextXLarge = typescaleXl;
|
|
57
|
+
const fontSizeTextXLarge = typescaleXl$1;
|
|
67
58
|
|
|
68
|
-
const typescaleXs$
|
|
59
|
+
const typescaleXs$2 = 'clamp(0.81rem, 0.23vw + 0.77rem, 0.88rem)';
|
|
69
60
|
|
|
70
61
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleXs instead. */
|
|
71
|
-
const fontSizeTextXSmall = typescaleXs$
|
|
62
|
+
const fontSizeTextXSmall = typescaleXs$2;
|
|
72
63
|
|
|
73
|
-
const typescale2Xs = '.75rem';
|
|
64
|
+
const typescale2Xs$1 = '.75rem';
|
|
74
65
|
|
|
75
66
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescale2Xs instead. */
|
|
76
|
-
const fontSizeTextXXSmall = typescale2Xs;
|
|
67
|
+
const fontSizeTextXXSmall = typescale2Xs$1;
|
|
77
68
|
|
|
78
69
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescale variables instead. */
|
|
79
70
|
const fontSizeText$1 = {
|
|
@@ -91,20 +82,16 @@ const fontStyleNormal = 'normal';
|
|
|
91
82
|
/** @deprecated since v4.0.0, will be removed with next major release. Use 'normal' instead. */
|
|
92
83
|
const fontVariant = 'normal';
|
|
93
84
|
|
|
94
|
-
const fontWeightNormal = 400;
|
|
85
|
+
const fontWeightNormal$1 = 400;
|
|
95
86
|
|
|
96
87
|
/** @deprecated since v4.0.0, will be removed with next major release. Use fontWeightNormal instead. */
|
|
97
|
-
const fontWeightRegular = fontWeightNormal;
|
|
88
|
+
const fontWeightRegular = fontWeightNormal$1;
|
|
98
89
|
|
|
99
90
|
const fontWeightSemibold$1 = 600;
|
|
100
91
|
|
|
101
92
|
/** @deprecated since v4.0.0, will be removed with next major release. Use fontWeightSemibold instead. */
|
|
102
93
|
const fontWeightSemiBold = fontWeightSemibold$1;
|
|
103
94
|
|
|
104
|
-
const fontWeightBold$1 = 700;
|
|
105
|
-
|
|
106
|
-
const fontWeightBold = fontWeightBold$1;
|
|
107
|
-
|
|
108
95
|
const fontHyphenationStyle = {
|
|
109
96
|
overflowWrap: 'break-word',
|
|
110
97
|
// @ts-ignore
|
|
@@ -261,10 +248,10 @@ const durationSm$1 = '.25s';
|
|
|
261
248
|
/** @deprecated since v4.0.0, will be removed with next major release. Use durationSm instead. */
|
|
262
249
|
const motionDurationShort = durationSm$1;
|
|
263
250
|
|
|
264
|
-
const durationXl = '1.2s';
|
|
251
|
+
const durationXl$1 = '1.2s';
|
|
265
252
|
|
|
266
253
|
/** @deprecated since v4.0.0, will be removed with next major release. Use durationXl instead. */
|
|
267
|
-
const motionDurationVeryLong = durationXl;
|
|
254
|
+
const motionDurationVeryLong = durationXl$1;
|
|
268
255
|
|
|
269
256
|
const easeInOut = 'cubic-bezier(.25,.1,.25,1)';
|
|
270
257
|
|
|
@@ -320,14 +307,6 @@ const spacingStaticXSmall = spacingStaticXs$3;
|
|
|
320
307
|
|
|
321
308
|
const spacingStaticXs$2 = spacingStaticXs$3;
|
|
322
309
|
|
|
323
|
-
const _displayFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
324
|
-
const _displayFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
325
|
-
|
|
326
|
-
/** @deprecated since v4.0.0, will be removed with next major release. Use proseDisplayLg instead. */
|
|
327
|
-
const displayLargeStyle = {
|
|
328
|
-
font: `${_displayFontPartA}${fontSizeDisplayLarge}${_displayFontPartB}`,
|
|
329
|
-
};
|
|
330
|
-
|
|
331
310
|
const _headingFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
332
311
|
const _headingFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
333
312
|
|
|
@@ -379,7 +358,7 @@ const textMediumStyle = {
|
|
|
379
358
|
};
|
|
380
359
|
|
|
381
360
|
const proseTextSmStyle = {
|
|
382
|
-
font: `normal normal ${fontWeightNormal} ${typescaleSm$1} / ${leadingNormal$1} ${fontPorscheNext$1}`,
|
|
361
|
+
font: `normal normal ${fontWeightNormal$1} ${typescaleSm$1} / ${leadingNormal$1} ${fontPorscheNext$1}`,
|
|
383
362
|
...fontHyphenationStyle,
|
|
384
363
|
};
|
|
385
364
|
|
|
@@ -425,6 +404,8 @@ const colorSurface = 'var(--p-color-surface)';
|
|
|
425
404
|
|
|
426
405
|
const colorContrastHigh = 'var(--p-color-contrast-high)';
|
|
427
406
|
|
|
407
|
+
const colorContrastHigher = 'var(--p-color-contrast-higher)';
|
|
408
|
+
|
|
428
409
|
const colorContrastLow = 'var(--p-color-contrast-low)';
|
|
429
410
|
|
|
430
411
|
const colorContrastLower = 'var(--p-color-contrast-lower)';
|
|
@@ -463,16 +444,38 @@ const fontPorscheNext = 'var(--p-font-porsche-next)';
|
|
|
463
444
|
|
|
464
445
|
const leadingNormal = 'var(--p-leading-normal)';
|
|
465
446
|
|
|
447
|
+
const typescale2Xl = 'var(--p-typescale-2xl)';
|
|
448
|
+
|
|
449
|
+
const typescale2Xs = 'var(--p-typescale-2xs)';
|
|
450
|
+
|
|
451
|
+
const typescale3Xl = 'var(--p-typescale-3xl)';
|
|
452
|
+
|
|
453
|
+
const typescale4Xl = 'var(--p-typescale-4xl)';
|
|
454
|
+
|
|
455
|
+
const typescale5Xl = 'var(--p-typescale-5xl)';
|
|
456
|
+
|
|
457
|
+
const typescaleLg = 'var(--p-typescale-lg)';
|
|
458
|
+
|
|
466
459
|
const typescaleMd = 'var(--p-typescale-md)';
|
|
467
460
|
|
|
468
461
|
const typescaleSm = 'var(--p-typescale-sm)';
|
|
469
462
|
|
|
463
|
+
const typescaleXl = 'var(--p-typescale-xl)';
|
|
464
|
+
|
|
465
|
+
const typescaleXs$1 = 'var(--p-typescale-xs)';
|
|
466
|
+
|
|
467
|
+
const fontWeightBold = 'var(--p-font-weight-bold)';
|
|
468
|
+
|
|
469
|
+
const fontWeightNormal = 'var(--p-font-weight-normal)';
|
|
470
|
+
|
|
470
471
|
const fontWeightSemibold = 'var(--p-font-weight-semibold)';
|
|
471
472
|
|
|
472
473
|
const durationMd = 'var(--p-duration-md)';
|
|
473
474
|
|
|
474
475
|
const durationSm = 'var(--p-duration-sm)';
|
|
475
476
|
|
|
477
|
+
const durationXl = 'var(--p-duration-xl)';
|
|
478
|
+
|
|
476
479
|
const spacingStaticMd = 'var(--p-spacing-static-md)';
|
|
477
480
|
|
|
478
481
|
const spacingStaticSm$1 = 'var(--p-spacing-static-sm)';
|
|
@@ -480,7 +483,7 @@ const spacingStaticSm$1 = 'var(--p-spacing-static-sm)';
|
|
|
480
483
|
const spacingStaticXs$1 = 'var(--p-spacing-static-xs)';
|
|
481
484
|
|
|
482
485
|
const forcedColorsMediaQuery = (style) => {
|
|
483
|
-
return { '@media
|
|
486
|
+
return { '@media(forced-colors:active)': style };
|
|
484
487
|
};
|
|
485
488
|
|
|
486
489
|
const motionDurationMap = {
|
|
@@ -582,7 +585,9 @@ const preventFoucOfNestedElementsStyles = {
|
|
|
582
585
|
* utility to wrap jss styles parameter in `@media (hover: hover)`
|
|
583
586
|
* which is used to not have hover styles on touch devices
|
|
584
587
|
*/
|
|
585
|
-
const hoverMediaQuery = (style) =>
|
|
588
|
+
const hoverMediaQuery = (style) => {
|
|
589
|
+
return { '@media(hover:hover)': style };
|
|
590
|
+
};
|
|
586
591
|
|
|
587
592
|
function _extends() {
|
|
588
593
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -3905,14 +3910,12 @@ const OPTION_LIST_SAFE_ZONE = 6;
|
|
|
3905
3910
|
|
|
3906
3911
|
const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
|
|
3907
3912
|
|
|
3908
|
-
const prefix = `[Porsche Design System v${"4.0.0-beta.
|
|
3913
|
+
const prefix = `[Porsche Design System v${"4.0.0-beta.3"}]` // this part isn't covered by unit tests
|
|
3909
3914
|
;
|
|
3910
3915
|
const consoleError = (...messages) => {
|
|
3911
3916
|
console.error(prefix, ...messages);
|
|
3912
3917
|
};
|
|
3913
3918
|
|
|
3914
|
-
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
3915
|
-
|
|
3916
3919
|
const headerSlot = 'header';
|
|
3917
3920
|
const anchorSlot = 'anchor';
|
|
3918
3921
|
|
|
@@ -4231,6 +4234,9 @@ const cssVariableBottom = '--p-banner-position-bottom';
|
|
|
4231
4234
|
const cssVariableZIndex = '--p-internal-banner-z-index';
|
|
4232
4235
|
const topBottomFallback = '56px';
|
|
4233
4236
|
const getComponentCss$18 = (isOpen) => {
|
|
4237
|
+
const easing = isOpen ? 'in' : 'out';
|
|
4238
|
+
const transition = `visibility 0s linear var(${cssVariableTransitionDuration}, ${isOpen ? '0s' : motionDurationLong}), ${getTransition('transform', 'moderate', easing)}`;
|
|
4239
|
+
const transitionChild = `${getTransition('opacity', 'moderate', easing)}`;
|
|
4234
4240
|
return getCss({
|
|
4235
4241
|
'@global': {
|
|
4236
4242
|
':host': {
|
|
@@ -4240,32 +4246,42 @@ const getComponentCss$18 = (isOpen) => {
|
|
|
4240
4246
|
...getBannerPopoverResetStyles(),
|
|
4241
4247
|
inset: `auto ${gridExtendedOffsetBase} var(${cssVariableBottom},${topBottomFallback})`,
|
|
4242
4248
|
zIndex: `var(${cssVariableZIndex},${BANNER_Z_INDEX})`,
|
|
4243
|
-
...dropShadowHighStyle,
|
|
4244
4249
|
borderRadius: `var(${legacyRadiusMedium}, ${radiusXl})`, // needed for rounded box-shadow
|
|
4245
4250
|
'&::backdrop': {
|
|
4246
4251
|
display: 'none',
|
|
4247
4252
|
},
|
|
4253
|
+
'& > :first-child': {
|
|
4254
|
+
opacity: 0,
|
|
4255
|
+
...dropShadowHighStyle,
|
|
4256
|
+
...(isOpen
|
|
4257
|
+
? {
|
|
4258
|
+
opacity: 1,
|
|
4259
|
+
}
|
|
4260
|
+
: {
|
|
4261
|
+
opacity: 0,
|
|
4262
|
+
}),
|
|
4263
|
+
transition: transitionChild,
|
|
4264
|
+
// // during transition the element will be removed from top-layer immediately, resulting in other elements laying over (as of Mai 2024 only Chrome is fixed by this)
|
|
4265
|
+
'@supports (transition-behavior: allow-discrete)': {
|
|
4266
|
+
transition: `${transitionChild}, overlay var(${cssVariableTransitionDuration}, ${motionDurationModerate}) ${motionEasingOut} allow-discrete`,
|
|
4267
|
+
},
|
|
4268
|
+
},
|
|
4248
4269
|
...(isOpen
|
|
4249
4270
|
? {
|
|
4250
|
-
opacity: 1,
|
|
4251
4271
|
visibility: 'inherit',
|
|
4252
4272
|
pointerEvents: 'inherit',
|
|
4253
4273
|
transform: 'translate3d(0,0,0)',
|
|
4254
|
-
transition: `${getTransition('transform', 'moderate', 'in')}, ${getTransition('opacity', 'moderate', 'in')}`,
|
|
4255
4274
|
}
|
|
4256
4275
|
: {
|
|
4257
|
-
opacity: 0,
|
|
4258
4276
|
visibility: 'hidden',
|
|
4259
4277
|
pointerEvents: 'none',
|
|
4260
4278
|
transform: `translate3d(0,calc(var(${cssVariableBottom},${topBottomFallback}) + 100%),0)`,
|
|
4261
|
-
'&(.hydrated),&(.ssr)': {
|
|
4262
|
-
transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationLong}), ${getTransition('transform', 'moderate', 'out')}, ${getTransition('opacity', 'moderate', 'out')}`,
|
|
4263
|
-
// during transition the element will be removed from top-layer immediately, resulting in other elements laying over (as of Mai 2024 only Chrome is fixed by this)
|
|
4264
|
-
'@supports (transition-behavior: allow-discrete)': {
|
|
4265
|
-
transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationLong}), ${getTransition('transform', 'moderate', 'out')}, ${getTransition('opacity', 'moderate', 'out')}, overlay var(${cssVariableTransitionDuration}, ${motionDurationModerate}) ${motionEasingOut} allow-discrete`,
|
|
4266
|
-
},
|
|
4267
|
-
},
|
|
4268
4279
|
}),
|
|
4280
|
+
transition,
|
|
4281
|
+
// during transition the element will be removed from top-layer immediately, resulting in other elements laying over (as of Mai 2024 only Chrome is fixed by this)
|
|
4282
|
+
'@supports (transition-behavior: allow-discrete)': {
|
|
4283
|
+
transition: `${transition}, overlay var(${cssVariableTransitionDuration}, ${motionDurationModerate}) ${motionEasingOut} allow-discrete`,
|
|
4284
|
+
},
|
|
4269
4285
|
[getMediaQueryMin('s')]: {
|
|
4270
4286
|
inset: `var(${cssVariableTop},${topBottomFallback}) ${gridExtendedOffsetS} auto`,
|
|
4271
4287
|
...(!isOpen && { transform: `translate3d(0,calc(-100% - var(${cssVariableTop},${topBottomFallback})),0)` }),
|
|
@@ -4281,17 +4297,47 @@ const getComponentCss$18 = (isOpen) => {
|
|
|
4281
4297
|
});
|
|
4282
4298
|
};
|
|
4283
4299
|
|
|
4284
|
-
const
|
|
4285
|
-
|
|
4286
|
-
'
|
|
4287
|
-
|
|
4288
|
-
medium:
|
|
4289
|
-
|
|
4290
|
-
'
|
|
4300
|
+
const colorMap$3 = {
|
|
4301
|
+
primary: colorPrimary,
|
|
4302
|
+
'contrast-higher': colorContrastHigher,
|
|
4303
|
+
'contrast-high': colorContrastHigh,
|
|
4304
|
+
'contrast-medium': colorContrastMedium,
|
|
4305
|
+
'contrast-low': colorContrastLow,
|
|
4306
|
+
'contrast-lower': colorContrastLower,
|
|
4307
|
+
success: colorSuccess,
|
|
4308
|
+
warning: colorWarning,
|
|
4309
|
+
error: colorError,
|
|
4310
|
+
info: colorInfo,
|
|
4311
|
+
inherit: 'currentcolor',
|
|
4312
|
+
};
|
|
4313
|
+
|
|
4314
|
+
const sizeMap$1 = {
|
|
4315
|
+
'xx-small': typescale2Xs, // deprecated (alias)
|
|
4316
|
+
'x-small': typescaleXs$1, // deprecated (alias)
|
|
4317
|
+
small: typescaleSm, // deprecated (alias)
|
|
4318
|
+
medium: typescaleMd, // deprecated (alias)
|
|
4319
|
+
large: typescaleLg, // deprecated (alias)
|
|
4320
|
+
'x-large': typescaleXl, // deprecated (alias)
|
|
4321
|
+
'xx-large': typescale2Xl, // deprecated (alias)
|
|
4322
|
+
'2xs': typescale2Xs,
|
|
4323
|
+
xs: typescaleXs$1,
|
|
4324
|
+
sm: typescaleSm,
|
|
4325
|
+
md: typescaleMd,
|
|
4326
|
+
lg: typescaleLg,
|
|
4327
|
+
xl: typescaleXl,
|
|
4328
|
+
'2xl': typescale2Xl,
|
|
4329
|
+
'3xl': typescale3Xl,
|
|
4330
|
+
'4xl': typescale4Xl,
|
|
4331
|
+
'5xl': typescale5Xl,
|
|
4291
4332
|
inherit: 'inherit',
|
|
4292
4333
|
};
|
|
4293
|
-
|
|
4294
|
-
|
|
4334
|
+
|
|
4335
|
+
const weightMap = {
|
|
4336
|
+
regular: fontWeightNormal, // deprecated
|
|
4337
|
+
'semi-bold': fontWeightSemibold, // deprecated
|
|
4338
|
+
normal: fontWeightNormal,
|
|
4339
|
+
semibold: fontWeightSemibold,
|
|
4340
|
+
bold: fontWeightBold,
|
|
4295
4341
|
};
|
|
4296
4342
|
|
|
4297
4343
|
// Needed for slotted anchor and hidden label, which then enlarges the hidden label to equal host size and indents the text to be visually hidden.
|
|
@@ -4310,7 +4356,7 @@ const getVisibilityJssStyle = (hideLabel) => {
|
|
|
4310
4356
|
};
|
|
4311
4357
|
const offsetVertical = '-2px';
|
|
4312
4358
|
const offsetHorizontal = '-4px';
|
|
4313
|
-
const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor) => {
|
|
4359
|
+
const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading, stretch, size, color, hideLabel, alignLabel, underline, hasSlottedAnchor) => {
|
|
4314
4360
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4315
4361
|
return {
|
|
4316
4362
|
'@global': {
|
|
@@ -4332,16 +4378,16 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4332
4378
|
display: 'flex',
|
|
4333
4379
|
width: '100%',
|
|
4334
4380
|
cursor: 'pointer',
|
|
4335
|
-
color:
|
|
4381
|
+
color: colorMap$3[color],
|
|
4336
4382
|
textDecoration: underline ? 'underline' : 'none',
|
|
4337
|
-
|
|
4383
|
+
font: `${fontWeightNormal} ${typescaleSm}/${leadingNormal} ${fontPorscheNext}`,
|
|
4338
4384
|
...mergeDeep(buildResponsiveStyles(hideLabel, (hidelabelValue) => ({
|
|
4339
|
-
gap: hidelabelValue ? 0 :
|
|
4385
|
+
gap: hidelabelValue ? 0 : spacingStaticXs$1,
|
|
4340
4386
|
})), buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
4341
4387
|
justifyContent: stretchValue ? 'space-between' : 'flex-start',
|
|
4342
4388
|
alignItems: stretchValue ? 'center' : 'flex-start',
|
|
4343
|
-
})), buildResponsiveStyles(size, (
|
|
4344
|
-
fontSize:
|
|
4389
|
+
})), buildResponsiveStyles(size, (v) => ({
|
|
4390
|
+
fontSize: sizeMap$1[v],
|
|
4345
4391
|
}))),
|
|
4346
4392
|
...forcedColorsMediaQuery({
|
|
4347
4393
|
color: 'LinkText',
|
|
@@ -4361,14 +4407,16 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4361
4407
|
})),
|
|
4362
4408
|
transition: getTransition('background-color'),
|
|
4363
4409
|
...(active && {
|
|
4364
|
-
|
|
4410
|
+
WebkitBackdropFilter: blurFrosted,
|
|
4411
|
+
backdropFilter: blurFrosted,
|
|
4365
4412
|
backgroundColor: colorFrosted,
|
|
4366
4413
|
}),
|
|
4367
4414
|
},
|
|
4368
4415
|
...(!isDisabledOrLoading &&
|
|
4369
4416
|
hoverMediaQuery({
|
|
4370
4417
|
'&:hover::before': {
|
|
4371
|
-
|
|
4418
|
+
WebkitBackdropFilter: blurFrosted,
|
|
4419
|
+
backdropFilter: blurFrosted,
|
|
4372
4420
|
backgroundColor: colorFrostedStrong,
|
|
4373
4421
|
},
|
|
4374
4422
|
})),
|
|
@@ -4381,15 +4429,6 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4381
4429
|
icon: {
|
|
4382
4430
|
position: 'relative',
|
|
4383
4431
|
flexShrink: '0',
|
|
4384
|
-
fontSize: 'inherit', // inherit font size from root
|
|
4385
|
-
width: fontLineHeight,
|
|
4386
|
-
height: fontLineHeight,
|
|
4387
|
-
// workaround for Safari to optimize vertical alignment of icons
|
|
4388
|
-
// TODO: check if this is still needed after optimized icons are included
|
|
4389
|
-
'@supports (width: round(down, 1px, 1px))': {
|
|
4390
|
-
width: `round(down, ${fontLineHeight}, 1px)`,
|
|
4391
|
-
height: `round(down, ${fontLineHeight}, 1px)`,
|
|
4392
|
-
},
|
|
4393
4432
|
},
|
|
4394
4433
|
label: mergeDeep({ zIndex: '1' }, // fix Firefox bug on :hover (#2583) & pure-link with nested anchor & hidden label (#3349)
|
|
4395
4434
|
buildResponsiveStyles(hideLabel, getVisibilityJssStyle), buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
@@ -4414,9 +4453,9 @@ const getFunctionalComponentLoadingMessageStyles = () => {
|
|
|
4414
4453
|
/**
|
|
4415
4454
|
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
4416
4455
|
*/
|
|
4417
|
-
const getComponentCss$17 = (icon, iconSource, active, isDisabled, isLoading, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, underline) => {
|
|
4456
|
+
const getComponentCss$17 = (icon, iconSource, active, isDisabled, isLoading, isDisabledOrLoading, stretch, size, color, hideLabel, alignLabel, underline) => {
|
|
4418
4457
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4419
|
-
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, underline, false), {
|
|
4458
|
+
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, isDisabledOrLoading, stretch, size, color, hideLabel, alignLabel, underline, false), {
|
|
4420
4459
|
root: {
|
|
4421
4460
|
...(isDisabled && {
|
|
4422
4461
|
color: colorContrastLow,
|
|
@@ -4433,9 +4472,7 @@ const getComponentCss$17 = (icon, iconSource, active, isDisabled, isLoading, isD
|
|
|
4433
4472
|
icon: {
|
|
4434
4473
|
position: 'absolute',
|
|
4435
4474
|
top: 0,
|
|
4436
|
-
left: `calc(50% - ${
|
|
4437
|
-
width: fontLineHeight,
|
|
4438
|
-
height: fontLineHeight,
|
|
4475
|
+
left: `calc(50% - ${leadingNormal} / 2)`,
|
|
4439
4476
|
},
|
|
4440
4477
|
}),
|
|
4441
4478
|
// .loading
|
|
@@ -4443,15 +4480,6 @@ const getComponentCss$17 = (icon, iconSource, active, isDisabled, isLoading, isD
|
|
|
4443
4480
|
}));
|
|
4444
4481
|
};
|
|
4445
4482
|
|
|
4446
|
-
const fontWeightMap = {
|
|
4447
|
-
regular: fontWeightRegular,
|
|
4448
|
-
'semi-bold': fontWeightSemiBold,
|
|
4449
|
-
bold: fontWeightBold,
|
|
4450
|
-
};
|
|
4451
|
-
const getFontWeight = (weight) => {
|
|
4452
|
-
return fontWeightMap[weight];
|
|
4453
|
-
};
|
|
4454
|
-
|
|
4455
4483
|
// CSS Variable defined in fontHyphenationStyle
|
|
4456
4484
|
/**
|
|
4457
4485
|
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
@@ -4510,10 +4538,10 @@ const getComponentCss$16 = (isDisabledOrLoading, aspectRatio, size, weight, alig
|
|
|
4510
4538
|
...textMediumStyle,
|
|
4511
4539
|
color: colorPrimary,
|
|
4512
4540
|
hyphens: 'inherit',
|
|
4513
|
-
...mergeDeep(buildResponsiveStyles(size, (
|
|
4514
|
-
fontSize:
|
|
4515
|
-
})), buildResponsiveStyles(weight, (
|
|
4516
|
-
fontWeight:
|
|
4541
|
+
...mergeDeep(buildResponsiveStyles(size, (v) => ({
|
|
4542
|
+
fontSize: sizeMap$1[v],
|
|
4543
|
+
})), buildResponsiveStyles(weight, (v) => ({
|
|
4544
|
+
fontWeight: weightMap[v],
|
|
4517
4545
|
}))),
|
|
4518
4546
|
},
|
|
4519
4547
|
},
|
|
@@ -4722,7 +4750,9 @@ const getComponentCss$15 = (icon, iconSource, variant, hideLabel, isDisabled, is
|
|
|
4722
4750
|
top: '50%',
|
|
4723
4751
|
left: '50%',
|
|
4724
4752
|
transform: 'translate(-50%, -50%)',
|
|
4725
|
-
|
|
4753
|
+
...(variant === 'primary' && {
|
|
4754
|
+
'--p-spinner-color': 'currentcolor',
|
|
4755
|
+
}),
|
|
4726
4756
|
},
|
|
4727
4757
|
}),
|
|
4728
4758
|
label: {
|
|
@@ -5394,7 +5424,7 @@ const colorBorderHoverMap = {
|
|
|
5394
5424
|
error: colorError,
|
|
5395
5425
|
none: colorPrimary,
|
|
5396
5426
|
};
|
|
5397
|
-
const colorMap$
|
|
5427
|
+
const colorMap$2 = {
|
|
5398
5428
|
success: colorSuccess,
|
|
5399
5429
|
error: colorError,
|
|
5400
5430
|
none: undefined,
|
|
@@ -5404,7 +5434,7 @@ const getThemedFormStateColors = (state) => {
|
|
|
5404
5434
|
formStateBackgroundColor: colorBackgroundMap$1[state],
|
|
5405
5435
|
formStateBorderColor: colorBorderMap[state],
|
|
5406
5436
|
formStateBorderHoverColor: colorBorderHoverMap[state],
|
|
5407
|
-
formStateColor: colorMap$
|
|
5437
|
+
formStateColor: colorMap$2[state],
|
|
5408
5438
|
};
|
|
5409
5439
|
};
|
|
5410
5440
|
|
|
@@ -5468,10 +5498,12 @@ const getCheckboxCheckedBaseStyles = (isLoading, state) => {
|
|
|
5468
5498
|
}
|
|
5469
5499
|
return {
|
|
5470
5500
|
'&::before': {
|
|
5471
|
-
forcedColorAdjust: 'none',
|
|
5472
5501
|
WebkitMask: `${checkedIcon$1} center/contain no-repeat`, // necessary for Sogou browser support :-)
|
|
5473
5502
|
mask: `${checkedIcon$1} center/contain no-repeat`,
|
|
5474
5503
|
backgroundColor: `var(${cssVarCheckboxIconColor}, ${state === 'none' ? colorPrimary : formStateBorderColor})`,
|
|
5504
|
+
...forcedColorsMediaQuery({
|
|
5505
|
+
background: 'CanvasText',
|
|
5506
|
+
}),
|
|
5475
5507
|
},
|
|
5476
5508
|
};
|
|
5477
5509
|
};
|
|
@@ -5484,10 +5516,12 @@ const getCheckboxIndeterminateBaseStyles = (isLoading, state) => {
|
|
|
5484
5516
|
}
|
|
5485
5517
|
return {
|
|
5486
5518
|
'&::before': {
|
|
5487
|
-
forcedColorAdjust: 'none',
|
|
5488
5519
|
WebkitMask: `${indeterminateIcon} center/contain no-repeat`,
|
|
5489
5520
|
mask: `${indeterminateIcon} center/contain no-repeat`,
|
|
5490
5521
|
backgroundColor: state === 'none' ? colorPrimary : formStateBorderColor,
|
|
5522
|
+
...forcedColorsMediaQuery({
|
|
5523
|
+
background: 'CanvasText',
|
|
5524
|
+
}),
|
|
5491
5525
|
},
|
|
5492
5526
|
};
|
|
5493
5527
|
};
|
|
@@ -5630,13 +5664,11 @@ const getComponentCss$12 = (hideLabel, state, isDisabled, isLoading, isCompact)
|
|
|
5630
5664
|
},
|
|
5631
5665
|
...(isLoading && {
|
|
5632
5666
|
spinner: {
|
|
5667
|
+
'--p-spinner-size': `calc(${checkboxDimension} - 2px)`, // compensates the 1px border of the checkbox
|
|
5633
5668
|
position: 'absolute',
|
|
5634
5669
|
top: '50%',
|
|
5635
5670
|
left: '50%',
|
|
5636
5671
|
transform: 'translate(-50%,-50%)',
|
|
5637
|
-
width: checkboxDimension,
|
|
5638
|
-
height: checkboxDimension,
|
|
5639
|
-
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
5640
5672
|
},
|
|
5641
5673
|
}),
|
|
5642
5674
|
// .label / .required
|
|
@@ -5749,13 +5781,6 @@ const getFunctionalComponentInputBaseStyles = (isDisabled, isLoading, hideLabel,
|
|
|
5749
5781
|
},
|
|
5750
5782
|
})),
|
|
5751
5783
|
},
|
|
5752
|
-
...(isLoading && {
|
|
5753
|
-
spinner: {
|
|
5754
|
-
font: textSmallStyle.font,
|
|
5755
|
-
width: fontLineHeight,
|
|
5756
|
-
height: fontLineHeight,
|
|
5757
|
-
},
|
|
5758
|
-
}),
|
|
5759
5784
|
// .label / .required
|
|
5760
5785
|
...getFunctionalComponentLabelStyles(isDisabled, isLoading, hideLabel),
|
|
5761
5786
|
// .message
|
|
@@ -6007,54 +6032,13 @@ const getComponentCss$11 = () => {
|
|
|
6007
6032
|
});
|
|
6008
6033
|
};
|
|
6009
6034
|
|
|
6010
|
-
const colorMap$3 = {
|
|
6011
|
-
primary: colorPrimary,
|
|
6012
|
-
'contrast-high': colorContrastHigh,
|
|
6013
|
-
'contrast-medium': colorContrastMedium,
|
|
6014
|
-
'contrast-low': colorContrastLow,
|
|
6015
|
-
success: colorSuccess,
|
|
6016
|
-
warning: colorWarning,
|
|
6017
|
-
error: colorError,
|
|
6018
|
-
info: colorInfo,
|
|
6019
|
-
inherit: 'currentColor',
|
|
6020
|
-
};
|
|
6021
|
-
const getThemedTypographyColor = (textColor) => {
|
|
6022
|
-
return colorMap$3[textColor];
|
|
6023
|
-
};
|
|
6024
|
-
|
|
6025
|
-
const getTypographyRootJssStyle = (baseTextStyle, responsiveStyle, align, // eslint-disable-line @typescript-eslint/no-duplicate-type-constituents
|
|
6026
|
-
color, // eslint-disable-line @typescript-eslint/no-duplicate-type-constituents
|
|
6027
|
-
ellipsis) => {
|
|
6028
|
-
return {
|
|
6029
|
-
all: 'unset',
|
|
6030
|
-
display: 'block',
|
|
6031
|
-
...baseTextStyle,
|
|
6032
|
-
color: getThemedTypographyColor(color),
|
|
6033
|
-
textAlign: align,
|
|
6034
|
-
letterSpacing: 'normal',
|
|
6035
|
-
listStyleType: 'none',
|
|
6036
|
-
whiteSpace: 'inherit',
|
|
6037
|
-
...(ellipsis && {
|
|
6038
|
-
maxWidth: '100%',
|
|
6039
|
-
overflow: 'hidden',
|
|
6040
|
-
textOverflow: 'ellipsis',
|
|
6041
|
-
whiteSpace: 'nowrap',
|
|
6042
|
-
}),
|
|
6043
|
-
...responsiveStyle,
|
|
6044
|
-
};
|
|
6045
|
-
};
|
|
6046
|
-
const getTypographySlottedJssStyle = () => {
|
|
6047
|
-
return {
|
|
6048
|
-
all: 'unset',
|
|
6049
|
-
};
|
|
6050
|
-
};
|
|
6051
|
-
|
|
6052
6035
|
const DISPLAY_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
6053
6036
|
|
|
6054
|
-
const sizeMap
|
|
6055
|
-
small:
|
|
6056
|
-
medium:
|
|
6057
|
-
large:
|
|
6037
|
+
const sizeMap = {
|
|
6038
|
+
small: typescale3Xl,
|
|
6039
|
+
medium: typescale4Xl,
|
|
6040
|
+
large: typescale5Xl,
|
|
6041
|
+
inherit: 'inherit',
|
|
6058
6042
|
};
|
|
6059
6043
|
const getComponentCss$10 = (size, align, color, ellipsis) => {
|
|
6060
6044
|
return getCss({
|
|
@@ -6065,15 +6049,30 @@ const getComponentCss$10 = (size, align, color, ellipsis) => {
|
|
|
6065
6049
|
...hostHiddenStyles,
|
|
6066
6050
|
}),
|
|
6067
6051
|
},
|
|
6068
|
-
[`::slotted(:is(${DISPLAY_TAGS.join()}))`]: addImportantToEachRule(
|
|
6052
|
+
[`::slotted(:is(${DISPLAY_TAGS.join()}))`]: addImportantToEachRule({
|
|
6053
|
+
all: 'unset',
|
|
6054
|
+
}),
|
|
6055
|
+
},
|
|
6056
|
+
root: {
|
|
6057
|
+
all: 'unset',
|
|
6058
|
+
display: 'block',
|
|
6059
|
+
font: `${fontWeightNormal} ${typescale5Xl}/${leadingNormal} ${fontPorscheNext}`,
|
|
6060
|
+
...buildResponsiveStyles(size, (v) => ({
|
|
6061
|
+
fontSize: sizeMap[v],
|
|
6062
|
+
})),
|
|
6063
|
+
color: colorMap$3[color],
|
|
6064
|
+
textAlign: align,
|
|
6065
|
+
...(ellipsis && {
|
|
6066
|
+
maxWidth: '100%',
|
|
6067
|
+
overflow: 'hidden',
|
|
6068
|
+
textOverflow: 'ellipsis',
|
|
6069
|
+
whiteSpace: 'nowrap',
|
|
6070
|
+
}),
|
|
6069
6071
|
},
|
|
6070
|
-
root: getTypographyRootJssStyle(displayLargeStyle, buildResponsiveStyles(size, (sizeValue) => ({
|
|
6071
|
-
fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap$5[sizeValue],
|
|
6072
|
-
})), align, color, ellipsis),
|
|
6073
6072
|
});
|
|
6074
6073
|
};
|
|
6075
6074
|
|
|
6076
|
-
const colorMap$
|
|
6075
|
+
const colorMap$1 = {
|
|
6077
6076
|
'contrast-lower': colorContrastLower,
|
|
6078
6077
|
'contrast-low': colorContrastLow,
|
|
6079
6078
|
'contrast-medium': colorContrastMedium,
|
|
@@ -6091,7 +6090,10 @@ const getComponentCss$$ = (color, orientation) => {
|
|
|
6091
6090
|
hr: {
|
|
6092
6091
|
all: 'unset',
|
|
6093
6092
|
display: 'block',
|
|
6094
|
-
background: colorMap$
|
|
6093
|
+
background: colorMap$1[color],
|
|
6094
|
+
...forcedColorsMediaQuery({
|
|
6095
|
+
background: 'CanvasText',
|
|
6096
|
+
}),
|
|
6095
6097
|
...buildResponsiveStyles(orientation, (o) => o === 'horizontal' ? { height: '1px', width: '100%' } : { height: '100%', width: '1px' }),
|
|
6096
6098
|
},
|
|
6097
6099
|
},
|
|
@@ -6666,40 +6668,36 @@ const getComponentCss$X = (state, labelSize, hasLabel) => {
|
|
|
6666
6668
|
});
|
|
6667
6669
|
};
|
|
6668
6670
|
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
medium: fontSizeTextMedium,
|
|
6674
|
-
large: fontSizeTextLarge,
|
|
6675
|
-
'x-large': fontSizeTextXLarge,
|
|
6676
|
-
};
|
|
6671
|
+
/**
|
|
6672
|
+
* @css-variable {"name": "--p-flag-size", "description": "Defines the width and height of the flag. Overrides the `size` property when set.", "defaultValue": ""}
|
|
6673
|
+
*/
|
|
6674
|
+
const cssVarSize$2 = '--p-flag-size';
|
|
6677
6675
|
const getComponentCss$W = (size) => {
|
|
6676
|
+
const dimension = `var(${cssVarSize$2},${leadingNormal})`;
|
|
6678
6677
|
return getCss({
|
|
6679
6678
|
'@global': {
|
|
6680
6679
|
':host': {
|
|
6681
|
-
display: 'inline-
|
|
6680
|
+
display: 'inline-flex',
|
|
6682
6681
|
verticalAlign: 'top',
|
|
6683
6682
|
...addImportantToEachRule({
|
|
6684
6683
|
...hostHiddenStyles,
|
|
6685
6684
|
}),
|
|
6686
6685
|
},
|
|
6687
6686
|
img: {
|
|
6688
|
-
all: 'unset',
|
|
6689
6687
|
display: 'block', // without display, img tag gets some extra spacing
|
|
6688
|
+
margin: 0,
|
|
6690
6689
|
padding: '1px', // add safe-zone to be visually in sync with <p-icon />
|
|
6690
|
+
border: 0,
|
|
6691
|
+
outline: 0,
|
|
6692
|
+
overflow: 'hidden', // clip the image
|
|
6691
6693
|
boxSizing: 'border-box',
|
|
6692
6694
|
pointerEvents: 'none', // disable dragging/ghosting of images
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
width: fontLineHeight,
|
|
6700
|
-
height: fontLineHeight,
|
|
6701
|
-
font: `${sizeMap$4[size]} ${fontFamily}`,
|
|
6702
|
-
}),
|
|
6695
|
+
width: dimension,
|
|
6696
|
+
height: dimension,
|
|
6697
|
+
fontFamily: fontPorscheNext, // needed for correct width/height definition based on ex-unit
|
|
6698
|
+
...buildResponsiveStyles(size, (s) => ({
|
|
6699
|
+
fontSize: sizeMap$1[s], // needed for correct width/height definition based on ex-unit
|
|
6700
|
+
})),
|
|
6703
6701
|
},
|
|
6704
6702
|
},
|
|
6705
6703
|
});
|
|
@@ -7006,14 +7004,9 @@ const getComponentCss$V = (isOpen, background, backdrop, position, hasHeader, ha
|
|
|
7006
7004
|
});
|
|
7007
7005
|
};
|
|
7008
7006
|
|
|
7009
|
-
const
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
large: fontSizeHeadingLarge,
|
|
7013
|
-
'x-large': fontSizeHeadingXLarge,
|
|
7014
|
-
'xx-large': fontSizeHeadingXXLarge,
|
|
7015
|
-
};
|
|
7016
|
-
const getComponentCss$U = (size, align, color, ellipsis) => {
|
|
7007
|
+
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
7008
|
+
|
|
7009
|
+
const getComponentCss$U = (size, weight, align, color, ellipsis) => {
|
|
7017
7010
|
return getCss({
|
|
7018
7011
|
'@global': {
|
|
7019
7012
|
':host': {
|
|
@@ -7022,12 +7015,26 @@ const getComponentCss$U = (size, align, color, ellipsis) => {
|
|
|
7022
7015
|
...hostHiddenStyles,
|
|
7023
7016
|
}),
|
|
7024
7017
|
},
|
|
7025
|
-
[`::slotted(:is(${HEADING_TAGS.join()}))`]: addImportantToEachRule(
|
|
7018
|
+
[`::slotted(:is(${HEADING_TAGS.join()}))`]: addImportantToEachRule({
|
|
7019
|
+
all: 'unset',
|
|
7020
|
+
}),
|
|
7021
|
+
},
|
|
7022
|
+
root: {
|
|
7023
|
+
all: 'unset',
|
|
7024
|
+
display: 'block',
|
|
7025
|
+
font: `${weightMap[weight]} ${typescale2Xl}/${leadingNormal} ${fontPorscheNext}`,
|
|
7026
|
+
...buildResponsiveStyles(size, (v) => ({
|
|
7027
|
+
fontSize: sizeMap$1[v],
|
|
7028
|
+
})),
|
|
7029
|
+
color: colorMap$3[color],
|
|
7030
|
+
textAlign: align,
|
|
7031
|
+
...(ellipsis && {
|
|
7032
|
+
maxWidth: '100%',
|
|
7033
|
+
overflow: 'hidden',
|
|
7034
|
+
textOverflow: 'ellipsis',
|
|
7035
|
+
whiteSpace: 'nowrap',
|
|
7036
|
+
}),
|
|
7026
7037
|
},
|
|
7027
|
-
root: getTypographyRootJssStyle(headingXXLargeStyle, buildResponsiveStyles(size, (sizeValue) => ({
|
|
7028
|
-
fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap$3[sizeValue],
|
|
7029
|
-
fontWeight: sizeValue === 'small' ? fontWeightSemiBold : fontWeightRegular,
|
|
7030
|
-
})), align, color, ellipsis),
|
|
7031
7038
|
});
|
|
7032
7039
|
};
|
|
7033
7040
|
|
|
@@ -7047,25 +7054,14 @@ const buildIconUrl = (iconNameOrSource = DEFAULT_ICON_NAME) => {
|
|
|
7047
7054
|
return buildIconUrl(DEFAULT_ICON_NAME);
|
|
7048
7055
|
};
|
|
7049
7056
|
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
info: colorInfo,
|
|
7059
|
-
inherit: 'inherit',
|
|
7060
|
-
};
|
|
7061
|
-
const sizeMap$2 = {
|
|
7062
|
-
'xx-small': fontSizeTextXXSmall,
|
|
7063
|
-
'x-small': fontSizeTextXSmall,
|
|
7064
|
-
small: fontSizeTextSmall,
|
|
7065
|
-
medium: fontSizeTextMedium,
|
|
7066
|
-
large: fontSizeTextLarge,
|
|
7067
|
-
'x-large': fontSizeTextXLarge,
|
|
7068
|
-
};
|
|
7057
|
+
/**
|
|
7058
|
+
* @css-variable {"name": "--p-icon-size", "description": "Defines the width and height of the icon. Overrides the `size` property when set.", "defaultValue": ""}
|
|
7059
|
+
*/
|
|
7060
|
+
const cssVarSize$1 = '--p-icon-size';
|
|
7061
|
+
/**
|
|
7062
|
+
* @css-variable {"name": "--p-icon-color", "description": "Defines the icon color. Overrides the `color` property when set.", "defaultValue": ""}
|
|
7063
|
+
*/
|
|
7064
|
+
const cssVarColor$1 = '--p-icon-color';
|
|
7069
7065
|
const isFlippableIcon = (name, source) => {
|
|
7070
7066
|
return (!source &&
|
|
7071
7067
|
(name === 'arrow-compact-left' ||
|
|
@@ -7089,41 +7085,44 @@ const isFlippableIcon = (name, source) => {
|
|
|
7089
7085
|
name === 'send'));
|
|
7090
7086
|
};
|
|
7091
7087
|
const getComponentCss$T = (name, source, color, size) => {
|
|
7092
|
-
const
|
|
7093
|
-
const
|
|
7088
|
+
const dimension = `var(${cssVarSize$1},${leadingNormal})`;
|
|
7089
|
+
const mask = `url("${buildIconUrl(source || name)}") center/contain no-repeat`;
|
|
7094
7090
|
return getCss({
|
|
7095
7091
|
'@global': {
|
|
7096
7092
|
':host': {
|
|
7097
|
-
display: 'inline-
|
|
7093
|
+
display: 'inline-flex',
|
|
7098
7094
|
verticalAlign: 'top',
|
|
7099
|
-
maxWidth: '100%',
|
|
7100
|
-
maxHeight: '100%',
|
|
7101
|
-
width: dimension,
|
|
7102
|
-
height: dimension,
|
|
7103
|
-
font: `${isSizeInherit ? sizeMap$2.small : sizeMap$2[size]} ${fontFamily}`,
|
|
7104
|
-
color: colorMap$1[color],
|
|
7105
7095
|
...addImportantToEachRule({
|
|
7106
|
-
WebkitMask: `url("${buildIconUrl(source || name)}") center/contain no-repeat`, // necessary for Sogou browser support :-)
|
|
7107
|
-
mask: `url("${buildIconUrl(source || name)}") center/contain no-repeat`,
|
|
7108
|
-
aspectRatio: '1/1',
|
|
7109
|
-
background: 'currentcolor', // necessary for proper color inheritance
|
|
7110
|
-
forcedColorAdjust: 'none',
|
|
7111
|
-
...(isFlippableIcon(name, source) && {
|
|
7112
|
-
'&(:dir(rtl))': {
|
|
7113
|
-
transform: 'scaleX(-1)',
|
|
7114
|
-
},
|
|
7115
|
-
}),
|
|
7116
7096
|
...hostHiddenStyles,
|
|
7117
7097
|
}),
|
|
7118
7098
|
},
|
|
7119
|
-
// the <img /> is
|
|
7099
|
+
// the <img /> is needed for a11y compliance because of alt text and to handle the fetch priority
|
|
7120
7100
|
img: {
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7101
|
+
display: 'block', // without display, img tag gets some extra spacing
|
|
7102
|
+
margin: 0,
|
|
7103
|
+
padding: 0,
|
|
7104
|
+
border: 0,
|
|
7105
|
+
outline: 0,
|
|
7106
|
+
overflow: 'hidden', // clip the image
|
|
7107
|
+
objectPosition: '-9999px -9999px', // hide the actual image content, the mask + background still renders the icon
|
|
7126
7108
|
pointerEvents: 'none', // disable dragging/ghosting of images
|
|
7109
|
+
width: dimension,
|
|
7110
|
+
height: dimension,
|
|
7111
|
+
fontFamily: fontPorscheNext, // needed for correct width/height definition based on ex-unit
|
|
7112
|
+
...buildResponsiveStyles(size, (s) => ({
|
|
7113
|
+
fontSize: sizeMap$1[s], // needed for correct width/height definition based on ex-unit
|
|
7114
|
+
})),
|
|
7115
|
+
WebkitMask: mask, // necessary for Sogou browser support :-)
|
|
7116
|
+
mask,
|
|
7117
|
+
background: `var(${cssVarColor$1},${colorMap$3[color]})`,
|
|
7118
|
+
...forcedColorsMediaQuery({
|
|
7119
|
+
background: 'CanvasText',
|
|
7120
|
+
}),
|
|
7121
|
+
...(isFlippableIcon(name, source) && {
|
|
7122
|
+
'&:dir(rtl)': {
|
|
7123
|
+
transform: 'scaleX(-1)',
|
|
7124
|
+
},
|
|
7125
|
+
}),
|
|
7127
7126
|
},
|
|
7128
7127
|
},
|
|
7129
7128
|
});
|
|
@@ -7176,6 +7175,8 @@ const getNotificationContentJssStyle = () => ({
|
|
|
7176
7175
|
},
|
|
7177
7176
|
});
|
|
7178
7177
|
|
|
7178
|
+
const INLINE_NOTIFICATION_HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
7179
|
+
|
|
7179
7180
|
const mediaQueryMaxS$1 = getMediaQueryMax('s');
|
|
7180
7181
|
const getTextJssStyle = {
|
|
7181
7182
|
margin: 0,
|
|
@@ -7200,7 +7201,9 @@ const getComponentCss$S = (state, hasAction, hasClose) => {
|
|
|
7200
7201
|
}),
|
|
7201
7202
|
},
|
|
7202
7203
|
...preventFoucOfNestedElementsStyles,
|
|
7203
|
-
[`::slotted(:is(${
|
|
7204
|
+
[`::slotted(:is(${INLINE_NOTIFICATION_HEADING_TAGS.join()}))`]: addImportantToEachRule({
|
|
7205
|
+
all: 'unset',
|
|
7206
|
+
}),
|
|
7204
7207
|
'slot[name="heading"]': getHeadingJssStyle,
|
|
7205
7208
|
},
|
|
7206
7209
|
heading: getHeadingJssStyle,
|
|
@@ -7524,8 +7527,8 @@ const getComponentCss$H = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
7524
7527
|
/**
|
|
7525
7528
|
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
7526
7529
|
*/
|
|
7527
|
-
const getComponentCss$G = (icon, iconSource, active, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor) => {
|
|
7528
|
-
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor), hasSlottedAnchor && {
|
|
7530
|
+
const getComponentCss$G = (icon, iconSource, active, stretch, size, color, hideLabel, alignLabel, underline, hasSlottedAnchor) => {
|
|
7531
|
+
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, color, hideLabel, alignLabel, underline, hasSlottedAnchor), hasSlottedAnchor && {
|
|
7529
7532
|
'@global': addImportantToEachRule({
|
|
7530
7533
|
'::slotted': {
|
|
7531
7534
|
'&(a)': {
|
|
@@ -7753,10 +7756,10 @@ const getComponentCss$E = (aspectRatio, size, weight, align, compact, hasGradien
|
|
|
7753
7756
|
...textMediumStyle,
|
|
7754
7757
|
color: colorPrimary,
|
|
7755
7758
|
hyphens: 'inherit',
|
|
7756
|
-
...mergeDeep(buildResponsiveStyles(size, (
|
|
7757
|
-
fontSize:
|
|
7758
|
-
})), buildResponsiveStyles(weight, (
|
|
7759
|
-
fontWeight:
|
|
7759
|
+
...mergeDeep(buildResponsiveStyles(size, (v) => ({
|
|
7760
|
+
fontSize: sizeMap$1[v],
|
|
7761
|
+
})), buildResponsiveStyles(weight, (v) => ({
|
|
7762
|
+
fontWeight: weightMap[v],
|
|
7760
7763
|
}))),
|
|
7761
7764
|
},
|
|
7762
7765
|
},
|
|
@@ -8123,9 +8126,6 @@ const getComponentCss$y = (isOpen, isDisabled, hideLabel, state, isCompact) => {
|
|
|
8123
8126
|
|
|
8124
8127
|
const mediaQueryMinS = getMediaQueryMin('s');
|
|
8125
8128
|
const mediaQueryMaxS = getMediaQueryMax('s');
|
|
8126
|
-
// button size needs to be fluid between 320px and 360px viewport width, so that the pagination fits into 320px viewport
|
|
8127
|
-
// and text scale 200% works (almost) on mobile viewports too
|
|
8128
|
-
const buttonSize = `clamp(36px, calc(${fontLineHeight} + 10vw - 20px), 40px)`;
|
|
8129
8129
|
const disabledCursorStyle = {
|
|
8130
8130
|
cursor: 'default',
|
|
8131
8131
|
pointerEvents: 'none', // prevents :hover (has no effect when forced), maybe we can remove it since CSS selectors already cover desired behavior
|
|
@@ -8179,10 +8179,6 @@ const getComponentCss$x = (activePage, pageTotal, showLastPage) => {
|
|
|
8179
8179
|
},
|
|
8180
8180
|
}),
|
|
8181
8181
|
[mediaQueryMinS]: {
|
|
8182
|
-
// prev
|
|
8183
|
-
'&:first-child': { marginInlineEnd: spacingStaticSmall },
|
|
8184
|
-
// next
|
|
8185
|
-
'&:last-child': { marginInlineStart: spacingStaticSmall },
|
|
8186
8182
|
...(pageTotal < 8
|
|
8187
8183
|
? { '&.ellip': hiddenStyle }
|
|
8188
8184
|
: // max 7 items including ellipsis at the same time on tablet
|
|
@@ -8200,32 +8196,40 @@ const getComponentCss$x = (activePage, pageTotal, showLastPage) => {
|
|
|
8200
8196
|
display: 'flex',
|
|
8201
8197
|
justifyContent: 'center',
|
|
8202
8198
|
alignItems: 'center',
|
|
8203
|
-
transition: `${getTransition('background-color')}, ${getTransition('
|
|
8199
|
+
transition: `${getTransition('background-color')}, ${getTransition('color')}`, // for smooth transition between states
|
|
8204
8200
|
position: 'relative',
|
|
8205
|
-
|
|
8206
|
-
|
|
8201
|
+
padding: '0 6px',
|
|
8202
|
+
minWidth: '2.25rem',
|
|
8203
|
+
height: '2.25rem',
|
|
8207
8204
|
boxSizing: 'border-box',
|
|
8208
8205
|
...textSmallStyle,
|
|
8209
8206
|
whiteSpace: 'nowrap',
|
|
8210
8207
|
cursor: 'pointer',
|
|
8208
|
+
backgroundColor: 'transparent',
|
|
8211
8209
|
color: colorPrimary,
|
|
8212
|
-
borderRadius: `var(${legacyRadiusSmall}, ${
|
|
8210
|
+
borderRadius: `var(${legacyRadiusSmall}, ${radiusFull})`,
|
|
8213
8211
|
borderColor: 'transparent', // default value is needed for smooth transition
|
|
8214
8212
|
outline: 0, // TODO: only relevant for VRT testing with forced states - prevents :focus style
|
|
8215
8213
|
...hoverMediaQuery({
|
|
8216
8214
|
'&:not([aria-disabled]):not(.ellipsis):hover': {
|
|
8217
8215
|
...frostedGlassStyle,
|
|
8218
8216
|
background: colorFrosted,
|
|
8217
|
+
...forcedColorsMediaQuery({
|
|
8218
|
+
outline: '2px solid CanvasText',
|
|
8219
|
+
outlineOffset: '-2px',
|
|
8220
|
+
}),
|
|
8219
8221
|
},
|
|
8220
8222
|
}),
|
|
8221
8223
|
'&[aria-current]': {
|
|
8222
8224
|
...disabledCursorStyle,
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
+
backgroundColor: colorFrostedStrong,
|
|
8226
|
+
...forcedColorsMediaQuery({
|
|
8227
|
+
border: '2px solid CanvasText',
|
|
8228
|
+
}),
|
|
8225
8229
|
},
|
|
8226
8230
|
'&[aria-disabled]': {
|
|
8227
|
-
...getDisabledBaseStyles(),
|
|
8228
8231
|
...disabledCursorStyle,
|
|
8232
|
+
...getDisabledBaseStyles(),
|
|
8229
8233
|
},
|
|
8230
8234
|
// TODO :not(.ellipsis) is only needed for VRT states tests to work properly
|
|
8231
8235
|
'&:not(.ellipsis):focus-visible': getFocusBaseStyles(),
|
|
@@ -8312,8 +8316,6 @@ const getComponentCss$w = (hideLabel, state, isDisabled, isLoading, length, isCo
|
|
|
8312
8316
|
top: '50%',
|
|
8313
8317
|
left: '50%',
|
|
8314
8318
|
transform: 'translate(-50%, -50%)',
|
|
8315
|
-
width: inputDimension,
|
|
8316
|
-
height: inputDimension,
|
|
8317
8319
|
pointerEvents: 'none',
|
|
8318
8320
|
},
|
|
8319
8321
|
}),
|
|
@@ -8478,10 +8480,12 @@ const getComponentCss$u = (disabled, loading, state) => {
|
|
|
8478
8480
|
gridArea: '1/1',
|
|
8479
8481
|
},
|
|
8480
8482
|
'&:checked::before': {
|
|
8481
|
-
forcedColorAdjust: 'none',
|
|
8482
8483
|
WebkitMask: `${checkedIcon} center/contain no-repeat`, // necessary for Sogou browser support :-)
|
|
8483
8484
|
mask: `${checkedIcon} center/contain no-repeat`,
|
|
8484
8485
|
backgroundColor: state === 'none' ? colorPrimary : formStateBorderColor,
|
|
8486
|
+
...forcedColorsMediaQuery({
|
|
8487
|
+
background: 'CanvasText',
|
|
8488
|
+
}),
|
|
8485
8489
|
},
|
|
8486
8490
|
'&::after': {
|
|
8487
8491
|
// Ensures the touch target is at least 24px, even if the checkbox is smaller than the minimum touch target size.
|
|
@@ -8508,13 +8512,11 @@ const getComponentCss$u = (disabled, loading, state) => {
|
|
|
8508
8512
|
},
|
|
8509
8513
|
...(loading && {
|
|
8510
8514
|
spinner: {
|
|
8515
|
+
'--p-spinner-size': `calc(${radioDimension} - 2px)`, // compensates the 1px border of the radio button
|
|
8511
8516
|
position: 'absolute',
|
|
8512
8517
|
top: '50%',
|
|
8513
8518
|
left: '50%',
|
|
8514
8519
|
transform: 'translate(-50%,-50%)',
|
|
8515
|
-
width: radioDimension,
|
|
8516
|
-
height: radioDimension,
|
|
8517
|
-
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width and height definition based on ex-unit
|
|
8518
8520
|
},
|
|
8519
8521
|
}),
|
|
8520
8522
|
// .label / .required
|
|
@@ -8546,7 +8548,6 @@ const getRadioGroupDirectionJssStyles = (direction) => {
|
|
|
8546
8548
|
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8547
8549
|
*/
|
|
8548
8550
|
const getComponentCss$t = (isDisabled, isLoading, hideLabel, state, isCompact, direction) => {
|
|
8549
|
-
const radioDimension = `calc(var(${cssVarInternalRadioGroupScaling}) * 1.75rem)`;
|
|
8550
8551
|
const columnGap = `calc(22.4px * (var(${cssVarInternalRadioGroupScaling}) - 0.64285714) + 8px)`;
|
|
8551
8552
|
const rowGap = `calc(11.2px * (var(${cssVarInternalRadioGroupScaling}) - 0.64285714) + 4px)`;
|
|
8552
8553
|
return getCss({
|
|
@@ -8586,8 +8587,6 @@ const getComponentCss$t = (isDisabled, isLoading, hideLabel, state, isCompact, d
|
|
|
8586
8587
|
top: '50%',
|
|
8587
8588
|
left: '50%',
|
|
8588
8589
|
transform: 'translate(-50%, -50%)',
|
|
8589
|
-
width: radioDimension,
|
|
8590
|
-
height: radioDimension,
|
|
8591
8590
|
pointerEvents: 'none',
|
|
8592
8591
|
},
|
|
8593
8592
|
}),
|
|
@@ -8693,6 +8692,9 @@ const getScrollIndicatorStyles = (direction, isVisible, isSticky, hasScrollbar,
|
|
|
8693
8692
|
mask: iconMask,
|
|
8694
8693
|
background: colorPrimary,
|
|
8695
8694
|
transition: getTransition('transform'),
|
|
8695
|
+
...forcedColorsMediaQuery({
|
|
8696
|
+
background: 'CanvasText',
|
|
8697
|
+
}),
|
|
8696
8698
|
},
|
|
8697
8699
|
};
|
|
8698
8700
|
};
|
|
@@ -8764,7 +8766,6 @@ isSticky, hasScrollbar, isCompact) => {
|
|
|
8764
8766
|
const cssVarInternalSegmentedControlScaling = '--p-internal-segmented-control-scaling';
|
|
8765
8767
|
const getScalingVar = (compact) => `var(${cssVarInternalSegmentedControlScaling}, ${compact ? 0.5 : 1})`;
|
|
8766
8768
|
const ICON_OFFSET = '4px';
|
|
8767
|
-
const { font: BUTTON_FONT } = textSmallStyle;
|
|
8768
8769
|
const ICON_SIZE = '1.5rem';
|
|
8769
8770
|
const ICON_MARGIN = '.25rem';
|
|
8770
8771
|
const getScalableItemStyles = (hasIconAndSlottedContent, compact) => {
|
|
@@ -9019,18 +9020,22 @@ const getComponentCss$n = (isOpen, background, hasDismissButton) => {
|
|
|
9019
9020
|
});
|
|
9020
9021
|
};
|
|
9021
9022
|
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
const
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9023
|
+
/**
|
|
9024
|
+
* @css-variable {"name": "--p-spinner-size", "description": "Defines the width and height of the spinner. Overrides the `size` property when set.", "defaultValue": ""}
|
|
9025
|
+
*/
|
|
9026
|
+
const cssVarSize = '--p-spinner-size';
|
|
9027
|
+
/**
|
|
9028
|
+
* @css-variable {"name": "--p-spinner-color", "description": "Defines the foreground color. Overrides the `color` property when set.", "defaultValue": ""}
|
|
9029
|
+
*/
|
|
9030
|
+
const cssVarColor = '--p-spinner-color';
|
|
9031
|
+
/**
|
|
9032
|
+
* @css-variable {"name": "--p-spinner-track-color", "description": "Defines the track/background color. Overrides the `color` property when set.", "defaultValue": ""}
|
|
9033
|
+
*/
|
|
9034
|
+
const cssVarTrackColor = '--p-spinner-track-color';
|
|
9035
|
+
const getComponentCss$m = (color, size) => {
|
|
9036
|
+
const dimension = `var(${cssVarSize},${leadingNormal})`;
|
|
9037
|
+
const strokeDasharray = '69'; // C = 2πR
|
|
9038
|
+
const animationDuration = `var(${cssVariableAnimationDuration}, ${durationXl})`;
|
|
9034
9039
|
return getCss({
|
|
9035
9040
|
'@global': {
|
|
9036
9041
|
'@keyframes rotate': {
|
|
@@ -9043,49 +9048,61 @@ const getComponentCss$m = (size) => {
|
|
|
9043
9048
|
},
|
|
9044
9049
|
'@keyframes dash': {
|
|
9045
9050
|
'0%': {
|
|
9046
|
-
strokeDashoffset:
|
|
9051
|
+
strokeDashoffset: 69,
|
|
9047
9052
|
transform: 'rotateZ(0)',
|
|
9048
9053
|
},
|
|
9049
9054
|
'50%, 75%': {
|
|
9050
|
-
strokeDashoffset:
|
|
9055
|
+
strokeDashoffset: 24,
|
|
9051
9056
|
transform: 'rotateZ(80deg)',
|
|
9052
9057
|
},
|
|
9053
9058
|
'100%': {
|
|
9054
|
-
strokeDashoffset:
|
|
9059
|
+
strokeDashoffset: 69,
|
|
9055
9060
|
transform: 'rotateZ(360deg)',
|
|
9056
9061
|
},
|
|
9057
9062
|
},
|
|
9058
9063
|
':host': {
|
|
9059
9064
|
display: 'inline-flex',
|
|
9060
|
-
|
|
9065
|
+
verticalAlign: 'top',
|
|
9061
9066
|
...addImportantToEachRule({
|
|
9062
|
-
verticalAlign: 'top',
|
|
9063
9067
|
...hostHiddenStyles,
|
|
9064
9068
|
}),
|
|
9065
9069
|
},
|
|
9070
|
+
div: {
|
|
9071
|
+
width: dimension,
|
|
9072
|
+
height: dimension,
|
|
9073
|
+
fontFamily: fontPorscheNext, // needed for correct width/height definition based on ex-unit
|
|
9074
|
+
...buildResponsiveStyles(size, (s) => ({
|
|
9075
|
+
fontSize: sizeMap$1[s], // needed for correct width/height definition based on ex-unit
|
|
9076
|
+
})),
|
|
9077
|
+
},
|
|
9066
9078
|
svg: {
|
|
9067
9079
|
display: 'block', // for correct vertical alignment
|
|
9068
9080
|
fill: 'none',
|
|
9069
|
-
|
|
9081
|
+
strokeWidth: 1.5,
|
|
9082
|
+
animation: `rotate ${animationDuration} steps(50) infinite`,
|
|
9070
9083
|
},
|
|
9071
9084
|
circle: {
|
|
9072
9085
|
'&:first-child': {
|
|
9073
|
-
stroke: colorContrastLower
|
|
9086
|
+
stroke: `var(${cssVarTrackColor},${colorContrastLower})`,
|
|
9087
|
+
'@supports (color: oklch(from red l c h))': {
|
|
9088
|
+
stroke: `var(${cssVarTrackColor},oklch(from var(${cssVarColor},${colorMap$3[color]}) l c h/.2))`,
|
|
9089
|
+
},
|
|
9090
|
+
...forcedColorsMediaQuery({
|
|
9091
|
+
stroke: addImportantToRule('none'),
|
|
9092
|
+
}),
|
|
9074
9093
|
},
|
|
9075
9094
|
'&:last-child': {
|
|
9076
|
-
|
|
9077
|
-
|
|
9095
|
+
stroke: `var(${cssVarColor},${colorMap$3[color]})`,
|
|
9096
|
+
...forcedColorsMediaQuery({
|
|
9097
|
+
stroke: 'CanvasText',
|
|
9098
|
+
}),
|
|
9078
9099
|
strokeDasharray: strokeDasharray
|
|
9079
9100
|
,
|
|
9080
9101
|
strokeLinecap: 'round',
|
|
9102
|
+
animation: `dash ${animationDuration} steps(50) infinite`,
|
|
9081
9103
|
},
|
|
9082
9104
|
},
|
|
9083
9105
|
},
|
|
9084
|
-
root: {
|
|
9085
|
-
display: 'block',
|
|
9086
|
-
...buildResponsiveStyles(size, (s) => sizeMap$1[s]),
|
|
9087
|
-
strokeWidth: 1.5,
|
|
9088
|
-
},
|
|
9089
9106
|
'sr-only': getHiddenTextJssStyle(),
|
|
9090
9107
|
});
|
|
9091
9108
|
};
|
|
@@ -9232,7 +9249,6 @@ const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisa
|
|
|
9232
9249
|
const labelPaddingTop = `max(0px, calc((${buttonHeight} - ${fontLineHeight}) / 2))`; // Vertically centers the switch label relative to the switch size (depending on which is smaller).
|
|
9233
9250
|
const toggleDimension = `calc(var(${cssVarInternalSwitchScaling}) * 1.25rem)`;
|
|
9234
9251
|
const toggleTranslateX = `calc(var(${cssVarInternalSwitchScaling}) * .1875rem)`;
|
|
9235
|
-
const spinnerDimension = buttonHeight;
|
|
9236
9252
|
return getCss({
|
|
9237
9253
|
'@global': {
|
|
9238
9254
|
':host': {
|
|
@@ -9307,7 +9323,6 @@ const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisa
|
|
|
9307
9323
|
},
|
|
9308
9324
|
},
|
|
9309
9325
|
toggle: {
|
|
9310
|
-
forcedColorAdjust: 'none',
|
|
9311
9326
|
display: 'flex',
|
|
9312
9327
|
placeItems: 'center',
|
|
9313
9328
|
placeContent: 'center',
|
|
@@ -9317,14 +9332,16 @@ const getComponentCss$j = (alignLabel, hideLabel, isStretched, isChecked, isDisa
|
|
|
9317
9332
|
background: toggleBackgroundColor,
|
|
9318
9333
|
transition: getTransition('transform'),
|
|
9319
9334
|
transform: `translate3d(${isChecked ? `calc(${buttonWidth} - ${buttonBorderWidth} * 2 - 100% - ${toggleTranslateX})` : toggleTranslateX}, 0, 0)`,
|
|
9335
|
+
...forcedColorsMediaQuery({
|
|
9336
|
+
background: 'CanvasText',
|
|
9337
|
+
}),
|
|
9320
9338
|
'&:dir(rtl)': {
|
|
9321
9339
|
transform: `translate3d(calc(${isChecked ? `calc(${buttonWidth} - ${buttonBorderWidth} * 2 - 100% - ${toggleTranslateX})` : toggleTranslateX} * -1), 0, 0)`,
|
|
9322
9340
|
},
|
|
9323
9341
|
},
|
|
9324
9342
|
...(isLoading && {
|
|
9325
9343
|
spinner: {
|
|
9326
|
-
|
|
9327
|
-
height: spinnerDimension,
|
|
9344
|
+
'--p-spinner-size': buttonHeight,
|
|
9328
9345
|
},
|
|
9329
9346
|
}),
|
|
9330
9347
|
// .loading
|
|
@@ -9929,18 +9946,6 @@ const getComponentCss$5 = () => {
|
|
|
9929
9946
|
|
|
9930
9947
|
const TEXT_TAGS = ['p', 'span', 'div', 'address', 'blockquote', 'figcaption', 'cite', 'time', 'legend'];
|
|
9931
9948
|
|
|
9932
|
-
const sizeMap = {
|
|
9933
|
-
'xx-small': fontSizeTextXXSmall,
|
|
9934
|
-
'x-small': fontSizeTextXSmall,
|
|
9935
|
-
small: fontSizeTextSmall,
|
|
9936
|
-
medium: fontSizeTextMedium,
|
|
9937
|
-
large: fontSizeTextLarge,
|
|
9938
|
-
'x-large': fontSizeTextXLarge,
|
|
9939
|
-
};
|
|
9940
|
-
// CSS Variable defined in fontHyphenationStyle
|
|
9941
|
-
/**
|
|
9942
|
-
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
9943
|
-
*/
|
|
9944
9949
|
const getComponentCss$4 = (size, weight, align, color, ellipsis) => {
|
|
9945
9950
|
return getCss({
|
|
9946
9951
|
'@global': {
|
|
@@ -9950,12 +9955,26 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis) => {
|
|
|
9950
9955
|
...hostHiddenStyles,
|
|
9951
9956
|
}),
|
|
9952
9957
|
},
|
|
9953
|
-
[`::slotted(:is(${TEXT_TAGS.join()}))`]: addImportantToEachRule(
|
|
9958
|
+
[`::slotted(:is(${TEXT_TAGS.join()}))`]: addImportantToEachRule({
|
|
9959
|
+
all: 'unset',
|
|
9960
|
+
}),
|
|
9961
|
+
},
|
|
9962
|
+
root: {
|
|
9963
|
+
all: 'unset',
|
|
9964
|
+
display: 'block',
|
|
9965
|
+
font: `${weightMap[weight]} ${typescaleSm}/${leadingNormal} ${fontPorscheNext}`,
|
|
9966
|
+
...buildResponsiveStyles(size, (v) => ({
|
|
9967
|
+
fontSize: sizeMap$1[v],
|
|
9968
|
+
})),
|
|
9969
|
+
color: colorMap$3[color],
|
|
9970
|
+
textAlign: align,
|
|
9971
|
+
...(ellipsis && {
|
|
9972
|
+
maxWidth: '100%',
|
|
9973
|
+
overflow: 'hidden',
|
|
9974
|
+
textOverflow: 'ellipsis',
|
|
9975
|
+
whiteSpace: 'nowrap',
|
|
9976
|
+
}),
|
|
9954
9977
|
},
|
|
9955
|
-
root: getTypographyRootJssStyle(textSmallStyle, buildResponsiveStyles(size, (sizeValue) => ({
|
|
9956
|
-
fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap[sizeValue],
|
|
9957
|
-
fontWeight: getFontWeight(weight),
|
|
9958
|
-
})), align, color, ellipsis),
|
|
9959
9978
|
});
|
|
9960
9979
|
};
|
|
9961
9980
|
|
|
@@ -10152,6 +10171,9 @@ const getComponentCss = (size) => {
|
|
|
10152
10171
|
svg: {
|
|
10153
10172
|
...sizingStyles,
|
|
10154
10173
|
fill: colorPrimary,
|
|
10174
|
+
...forcedColorsMediaQuery({
|
|
10175
|
+
fill: 'CanvasText',
|
|
10176
|
+
}),
|
|
10155
10177
|
},
|
|
10156
10178
|
},
|
|
10157
10179
|
});
|