@porsche-design-system/components-react 3.30.0 → 3.31.0-rc.0
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 +12 -0
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +1106 -845
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +115 -14
- 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/radio-group-option.cjs +0 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.cjs +2 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +1106 -845
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +114 -15
- 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/radio-group-option.mjs +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +2 -1
- package/ssr/esm/lib/dsr-components/input-base.d.ts +0 -1
|
@@ -1,436 +1,725 @@
|
|
|
1
|
-
|
|
2
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
3
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
4
|
-
var source = arguments[i];
|
|
5
|
-
for (var key in source) {
|
|
6
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7
|
-
target[key] = source[key];
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return target;
|
|
12
|
-
};
|
|
13
|
-
return _extends.apply(this, arguments);
|
|
14
|
-
}
|
|
1
|
+
const borderRadiusSmall = '4px';
|
|
15
2
|
|
|
16
|
-
|
|
3
|
+
const borderRadiusMedium = '8px';
|
|
17
4
|
|
|
18
|
-
|
|
5
|
+
const borderRadiusLarge = '12px';
|
|
19
6
|
|
|
20
|
-
|
|
21
|
-
"@babel/helpers - typeof";
|
|
7
|
+
const borderWidthBase = '2px';
|
|
22
8
|
|
|
23
|
-
|
|
24
|
-
return typeof o;
|
|
25
|
-
} : function (o) {
|
|
26
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
27
|
-
}, _typeof(o);
|
|
28
|
-
}
|
|
9
|
+
const _dropShadowBackgroundColor = 'rgba(0, 0, 0, 0.16)';
|
|
29
10
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (void 0 !== e) {
|
|
34
|
-
var i = e.call(t, r);
|
|
35
|
-
if ("object" != _typeof(i)) return i;
|
|
36
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
37
|
-
}
|
|
38
|
-
return (String )(t);
|
|
39
|
-
}
|
|
11
|
+
const dropShadowLowStyle = {
|
|
12
|
+
boxShadow: `0px 3px 8px ${_dropShadowBackgroundColor}`, // filter: drop-shadow() causes visual glitches in Firefox in combination with frostedGlassStyle
|
|
13
|
+
};
|
|
40
14
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
15
|
+
const dropShadowHighStyle = {
|
|
16
|
+
boxShadow: `0px 8px 40px ${_dropShadowBackgroundColor}`, // filter: drop-shadow() causes visual glitches in Firefox in combination with frostedGlassStyle
|
|
17
|
+
};
|
|
45
18
|
|
|
46
|
-
|
|
47
|
-
for (var i = 0; i < props.length; i++) {
|
|
48
|
-
var descriptor = props[i];
|
|
49
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
50
|
-
descriptor.configurable = true;
|
|
51
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
52
|
-
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
56
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
57
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
58
|
-
writable: false
|
|
59
|
-
});
|
|
60
|
-
return Constructor;
|
|
61
|
-
}
|
|
19
|
+
const fontFamily = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
|
|
62
20
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return _setPrototypeOf(o, p);
|
|
69
|
-
}
|
|
21
|
+
const fontHyphenationStyle = {
|
|
22
|
+
overflowWrap: 'break-word',
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
hyphens: 'var(--p-hyphens, auto)',
|
|
25
|
+
};
|
|
70
26
|
|
|
71
|
-
|
|
72
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
73
|
-
subClass.prototype.constructor = subClass;
|
|
74
|
-
_setPrototypeOf(subClass, superClass);
|
|
75
|
-
}
|
|
27
|
+
const fontLineHeight = 'calc(6px + 2.125ex)';
|
|
76
28
|
|
|
77
|
-
|
|
78
|
-
if (self === void 0) {
|
|
79
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
80
|
-
}
|
|
81
|
-
return self;
|
|
82
|
-
}
|
|
29
|
+
const fontSizeTextXXSmall = '.75rem';
|
|
83
30
|
|
|
84
|
-
|
|
85
|
-
if (source == null) return {};
|
|
86
|
-
var target = {};
|
|
87
|
-
var sourceKeys = Object.keys(source);
|
|
88
|
-
var key, i;
|
|
89
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
90
|
-
key = sourceKeys[i];
|
|
91
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
92
|
-
target[key] = source[key];
|
|
93
|
-
}
|
|
94
|
-
return target;
|
|
95
|
-
}
|
|
31
|
+
const fontSizeTextXSmall = 'clamp(0.81rem, 0.23vw + 0.77rem, 0.88rem)';
|
|
96
32
|
|
|
97
|
-
|
|
98
|
-
function cloneStyle(style) {
|
|
99
|
-
if (style == null || typeof style !== 'object') return style;
|
|
100
|
-
if (Array.isArray(style)) return style.map(cloneStyle);
|
|
101
|
-
if (style.constructor !== plainObjectConstrurctor) return style;
|
|
102
|
-
var newStyle = {};
|
|
33
|
+
const fontSizeTextSmall = '1rem';
|
|
103
34
|
|
|
104
|
-
|
|
105
|
-
newStyle[name] = cloneStyle(style[name]);
|
|
106
|
-
}
|
|
35
|
+
const fontSizeTextMedium = 'clamp(1.13rem, 0.21vw + 1.08rem, 1.33rem)';
|
|
107
36
|
|
|
108
|
-
|
|
109
|
-
}
|
|
37
|
+
const fontSizeTextLarge = 'clamp(1.27rem, 0.51vw + 1.16rem, 1.78rem)';
|
|
110
38
|
|
|
111
|
-
|
|
112
|
-
* Create a rule instance.
|
|
113
|
-
*/
|
|
39
|
+
const fontSizeTextXLarge = 'clamp(1.42rem, 0.94vw + 1.23rem, 2.37rem)';
|
|
114
40
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
41
|
+
const fontSizeText = {
|
|
42
|
+
xxSmall: fontSizeTextXXSmall,
|
|
43
|
+
xSmall: fontSizeTextXSmall,
|
|
44
|
+
small: fontSizeTextSmall,
|
|
45
|
+
medium: fontSizeTextMedium,
|
|
46
|
+
large: fontSizeTextLarge,
|
|
47
|
+
xLarge: fontSizeTextXLarge,
|
|
48
|
+
};
|
|
119
49
|
|
|
120
|
-
|
|
121
|
-
var declCopy = cloneStyle(decl);
|
|
122
|
-
var rule = jss.plugins.onCreateRule(name, declCopy, options);
|
|
123
|
-
if (rule) return rule; // It is an at-rule and it has no instance.
|
|
50
|
+
const fontSizeHeadingSmall = fontSizeTextSmall;
|
|
124
51
|
|
|
125
|
-
|
|
52
|
+
const fontSizeHeadingMedium = fontSizeTextMedium;
|
|
126
53
|
|
|
127
|
-
|
|
128
|
-
}
|
|
54
|
+
const fontSizeHeadingLarge = fontSizeTextLarge;
|
|
129
55
|
|
|
130
|
-
|
|
131
|
-
var result = '';
|
|
56
|
+
const fontSizeHeadingXLarge = fontSizeTextXLarge;
|
|
132
57
|
|
|
133
|
-
|
|
134
|
-
// Remove !important from the value, it will be readded later.
|
|
135
|
-
if (value[i] === '!important') break;
|
|
136
|
-
if (result) result += by;
|
|
137
|
-
result += value[i];
|
|
138
|
-
}
|
|
58
|
+
const fontSizeHeadingXXLarge = 'clamp(1.6rem, 1.56vw + 1.29rem, 3.16rem)';
|
|
139
59
|
|
|
140
|
-
|
|
141
|
-
};
|
|
142
|
-
/**
|
|
143
|
-
* Converts JSS array value to a CSS string.
|
|
144
|
-
*
|
|
145
|
-
* `margin: [['5px', '10px']]` > `margin: 5px 10px;`
|
|
146
|
-
* `border: ['1px', '2px']` > `border: 1px, 2px;`
|
|
147
|
-
* `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;`
|
|
148
|
-
* `color: ['red', !important]` > `color: red !important;`
|
|
149
|
-
*/
|
|
60
|
+
const fontSizeDisplaySmall = 'clamp(1.8rem, 2.41vw + 1.32rem, 4.21rem)';
|
|
150
61
|
|
|
62
|
+
const fontSizeDisplayMedium = 'clamp(2.03rem, 3.58vw + 1.31rem, 5.61rem)';
|
|
151
63
|
|
|
152
|
-
|
|
153
|
-
if (!Array.isArray(value)) return value;
|
|
154
|
-
var cssValue = ''; // Support space separated values via `[['5px', '10px']]`.
|
|
64
|
+
const fontSizeDisplayLarge = 'clamp(2.28rem, 5.2vw + 1.24rem, 7.48rem)';
|
|
155
65
|
|
|
156
|
-
|
|
157
|
-
for (var i = 0; i < value.length; i++) {
|
|
158
|
-
if (value[i] === '!important') break;
|
|
159
|
-
if (cssValue) cssValue += ', ';
|
|
160
|
-
cssValue += join(value[i], ' ');
|
|
161
|
-
}
|
|
162
|
-
} else cssValue = join(value, ', '); // Add !important, because it was ignored.
|
|
66
|
+
const fontWeightRegular = 400;
|
|
163
67
|
|
|
68
|
+
const fontWeightSemiBold = 600;
|
|
164
69
|
|
|
165
|
-
|
|
166
|
-
cssValue += ' !important';
|
|
167
|
-
}
|
|
70
|
+
const fontWeightBold = 700;
|
|
168
71
|
|
|
169
|
-
|
|
170
|
-
};
|
|
72
|
+
const fontStyleNormal = 'normal';
|
|
171
73
|
|
|
172
|
-
|
|
173
|
-
if (options && options.format === false) {
|
|
174
|
-
return {
|
|
175
|
-
linebreak: '',
|
|
176
|
-
space: ''
|
|
177
|
-
};
|
|
178
|
-
}
|
|
74
|
+
const fontVariant = 'normal';
|
|
179
75
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
76
|
+
const backdropFilter = 'blur(32px)';
|
|
77
|
+
const frostedGlassStyle = {
|
|
78
|
+
WebkitBackdropFilter: backdropFilter,
|
|
79
|
+
backdropFilter,
|
|
80
|
+
};
|
|
185
81
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
82
|
+
const _gradient = 'hsla(0, 0%, 0%, 0.80) 0%,' +
|
|
83
|
+
'hsla(0, 0%, 0%, 0.80) 8.1%,' +
|
|
84
|
+
'hsla(0, 0%, 0%, 0.80) 15.5%,' +
|
|
85
|
+
'hsla(0, 0%, 0%, 0.80) 22.5%,' +
|
|
86
|
+
'hsla(0, 0%, 0%, 0.78) 29%,' +
|
|
87
|
+
'hsla(0, 0%, 0%, 0.73) 35.3%,' +
|
|
88
|
+
'hsla(0, 0%, 0%, 0.67) 41.2%,' +
|
|
89
|
+
'hsla(0, 0%, 0%, 0.60) 47.1%,' +
|
|
90
|
+
'hsla(0, 0%, 0%, 0.52) 52.9%,' +
|
|
91
|
+
'hsla(0, 0%, 0%, 0.44) 58.8%,' +
|
|
92
|
+
'hsla(0, 0%, 0%, 0.33) 64.7%,' +
|
|
93
|
+
'hsla(0, 0%, 0%, 0.22) 71%,' +
|
|
94
|
+
'hsla(0, 0%, 0%, 0.12) 77.5%,' +
|
|
95
|
+
'hsla(0, 0%, 0%, 0.05) 84.5%,' +
|
|
96
|
+
'hsla(0, 0%, 0%, 0.011) 91.9%,' +
|
|
97
|
+
'hsla(0, 0%, 0%, 0)';
|
|
190
98
|
|
|
191
|
-
|
|
192
|
-
|
|
99
|
+
const gradientToBottomStyle = {
|
|
100
|
+
background: `linear-gradient(to bottom, ${_gradient} 100%);`,
|
|
101
|
+
};
|
|
193
102
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
103
|
+
const gradientToTopStyle = {
|
|
104
|
+
background: `linear-gradient(to top, ${_gradient} 100%);`,
|
|
105
|
+
};
|
|
197
106
|
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Converts a Rule to CSS string.
|
|
202
|
-
*/
|
|
107
|
+
const breakpointBase = 0;
|
|
203
108
|
|
|
109
|
+
const breakpointXS = 480;
|
|
204
110
|
|
|
205
|
-
|
|
206
|
-
if (options === void 0) {
|
|
207
|
-
options = {};
|
|
208
|
-
}
|
|
111
|
+
const breakpointS = 760;
|
|
209
112
|
|
|
210
|
-
|
|
211
|
-
if (!style) return result;
|
|
212
|
-
var _options = options,
|
|
213
|
-
_options$indent = _options.indent,
|
|
214
|
-
indent = _options$indent === void 0 ? 0 : _options$indent;
|
|
215
|
-
var fallbacks = style.fallbacks;
|
|
113
|
+
const breakpointM = 1000;
|
|
216
114
|
|
|
217
|
-
|
|
218
|
-
indent = -Infinity;
|
|
219
|
-
}
|
|
115
|
+
const breakpointL = 1300;
|
|
220
116
|
|
|
221
|
-
|
|
222
|
-
linebreak = _getWhitespaceSymbols.linebreak,
|
|
223
|
-
space = _getWhitespaceSymbols.space;
|
|
117
|
+
const breakpointXL = 1760;
|
|
224
118
|
|
|
225
|
-
|
|
119
|
+
const breakpointXXL = 1920;
|
|
226
120
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
121
|
+
const breakpoint = {
|
|
122
|
+
base: breakpointBase,
|
|
123
|
+
xs: breakpointXS,
|
|
124
|
+
s: breakpointS,
|
|
125
|
+
m: breakpointM,
|
|
126
|
+
l: breakpointL,
|
|
127
|
+
xl: breakpointXL,
|
|
128
|
+
xxl: breakpointXXL,
|
|
129
|
+
};
|
|
232
130
|
|
|
233
|
-
|
|
234
|
-
|
|
131
|
+
function getMediaQueryMin(min) {
|
|
132
|
+
return `@media(min-width:${breakpoint[min]}px)`;
|
|
133
|
+
}
|
|
235
134
|
|
|
236
|
-
|
|
237
|
-
if (result) result += linebreak;
|
|
238
|
-
result += indentStr(prop + ":" + space + toCssValue(value) + ";", indent);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
} else {
|
|
243
|
-
// Object syntax {fallbacks: {prop: value}}
|
|
244
|
-
for (var _prop in fallbacks) {
|
|
245
|
-
var _value = fallbacks[_prop];
|
|
135
|
+
const spacingFluidMedium = 'clamp(16px, 1.25vw + 12px, 36px)';
|
|
246
136
|
|
|
247
|
-
|
|
248
|
-
if (result) result += linebreak;
|
|
249
|
-
result += indentStr(_prop + ":" + space + toCssValue(_value) + ";", indent);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
137
|
+
const gridGap = spacingFluidMedium;
|
|
254
138
|
|
|
255
|
-
|
|
256
|
-
|
|
139
|
+
const _gridWidthMax = '2560px';
|
|
140
|
+
// fluid sizing calculated by https://fluidtypography.com/#app-get-started
|
|
141
|
+
const _gridSafeZoneBase = 'max(22px, 10.625vw - 12px)'; // viewport-width range = 320 - 760px / size range = 22 - 68.75px
|
|
142
|
+
const _gridSafeZoneS = 'calc(5vw - 16px)'; // viewport-width range = 760 - 1920px / size range = 22(22.75) - 80(79.71)px
|
|
143
|
+
const _gridSafeZoneXXL = 'min(50vw - 880px, 400px)'; // viewport-width range = 1920 - 2560px / size range = 80(79.71)px - 400(399.71)px
|
|
257
144
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
145
|
+
const columnMap = {
|
|
146
|
+
narrow: 4,
|
|
147
|
+
basic: 2,
|
|
148
|
+
extended: 1,
|
|
149
|
+
};
|
|
150
|
+
const gridColumnWidthS = `calc((100vw - ${_gridSafeZoneS} * 2 - ${gridGap} * 15) / 16)`;
|
|
151
|
+
const gridColumnWidthXXL = `calc((min(100vw, ${_gridWidthMax}) - ${_gridSafeZoneXXL} * 2 - ${gridGap} * 15) / 16)`;
|
|
152
|
+
const _gridPadding = `max(0px, 50vw - ${_gridWidthMax} / 2)`;
|
|
153
|
+
const _getGridOffsetS = (width) => `calc(${_gridSafeZoneS} + (${gridGap} + ${gridColumnWidthS}) * ${columnMap[width]})`;
|
|
154
|
+
const _getGridOffsetXXL = (width) => `calc(${_gridPadding} + ${_gridSafeZoneXXL} + (${gridGap} + ${gridColumnWidthXXL}) * ${columnMap[width]})`;
|
|
263
155
|
|
|
156
|
+
const gridFullOffset = _gridPadding;
|
|
264
157
|
|
|
265
|
-
|
|
158
|
+
const gridExtendedOffsetBase = _gridSafeZoneBase;
|
|
266
159
|
|
|
267
|
-
|
|
268
|
-
indent--;
|
|
269
|
-
if (result) result = "" + linebreak + result + linebreak;
|
|
270
|
-
return indentStr("" + selector + space + "{" + result, indent) + indentStr('}', indent);
|
|
271
|
-
}
|
|
160
|
+
const gridExtendedOffsetS = _getGridOffsetS('extended');
|
|
272
161
|
|
|
273
|
-
|
|
274
|
-
var nativeEscape = typeof CSS !== 'undefined' && CSS.escape;
|
|
275
|
-
var escape = (function (str) {
|
|
276
|
-
return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\$1');
|
|
277
|
-
});
|
|
162
|
+
const gridExtendedOffsetXXL = _getGridOffsetXXL('extended');
|
|
278
163
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
this.isProcessed = false;
|
|
285
|
-
var sheet = options.sheet,
|
|
286
|
-
Renderer = options.Renderer;
|
|
287
|
-
this.key = key;
|
|
288
|
-
this.options = options;
|
|
289
|
-
this.style = style;
|
|
290
|
-
if (sheet) this.renderer = sheet.renderer;else if (Renderer) this.renderer = new Renderer();
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Get or set a style property.
|
|
294
|
-
*/
|
|
164
|
+
const gridExtendedOffset = {
|
|
165
|
+
base: gridExtendedOffsetBase,
|
|
166
|
+
s: gridExtendedOffsetS,
|
|
167
|
+
xxl: gridExtendedOffsetXXL,
|
|
168
|
+
};
|
|
295
169
|
|
|
170
|
+
const gridBasicOffsetBase = _gridSafeZoneBase;
|
|
296
171
|
|
|
297
|
-
|
|
172
|
+
const gridBasicOffsetS = _getGridOffsetS('basic');
|
|
298
173
|
|
|
299
|
-
|
|
300
|
-
// It's a getter.
|
|
301
|
-
if (value === undefined) return this.style[name]; // Don't do anything if the value has not changed.
|
|
174
|
+
const gridBasicOffsetXXL = _getGridOffsetXXL('basic');
|
|
302
175
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
176
|
+
const gridBasicOffset = {
|
|
177
|
+
base: gridBasicOffsetBase,
|
|
178
|
+
s: gridBasicOffsetS,
|
|
179
|
+
xxl: gridBasicOffsetXXL,
|
|
180
|
+
};
|
|
306
181
|
|
|
307
|
-
|
|
308
|
-
newValue = this.options.jss.plugins.onChangeValue(value, name, this);
|
|
309
|
-
}
|
|
182
|
+
const gridNarrowOffsetBase = _gridSafeZoneBase;
|
|
310
183
|
|
|
311
|
-
|
|
312
|
-
var isDefined = name in this.style; // Value is empty and wasn't defined before.
|
|
184
|
+
const gridNarrowOffsetS = _getGridOffsetS('narrow');
|
|
313
185
|
|
|
314
|
-
|
|
186
|
+
const gridNarrowOffsetXXL = _getGridOffsetXXL('narrow');
|
|
315
187
|
|
|
316
|
-
|
|
317
|
-
|
|
188
|
+
const gridNarrowOffset = {
|
|
189
|
+
base: gridNarrowOffsetBase,
|
|
190
|
+
s: gridNarrowOffsetS,
|
|
191
|
+
xxl: gridNarrowOffsetXXL,
|
|
192
|
+
};
|
|
318
193
|
|
|
319
|
-
|
|
320
|
-
if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, newValue);
|
|
321
|
-
return this;
|
|
322
|
-
}
|
|
194
|
+
const motionDurationShort = '0.25s';
|
|
323
195
|
|
|
324
|
-
|
|
196
|
+
const motionEasingBase = 'cubic-bezier(0.25,0.1,0.25,1)';
|
|
325
197
|
|
|
326
|
-
|
|
198
|
+
const breakpoints = ['base', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
327
199
|
|
|
328
|
-
|
|
329
|
-
|
|
200
|
+
function getMediaQueryMax(max) {
|
|
201
|
+
return `@media(max-width:${breakpoint[max] - 1}px)`;
|
|
202
|
+
}
|
|
330
203
|
|
|
331
|
-
|
|
332
|
-
}();
|
|
333
|
-
var StyleRule =
|
|
334
|
-
/*#__PURE__*/
|
|
335
|
-
function (_BaseStyleRule) {
|
|
336
|
-
_inheritsLoose(StyleRule, _BaseStyleRule);
|
|
204
|
+
const motionDurationLong = '0.6s';
|
|
337
205
|
|
|
338
|
-
|
|
339
|
-
var _this;
|
|
206
|
+
const motionDurationModerate = '0.4s';
|
|
340
207
|
|
|
341
|
-
|
|
342
|
-
var selector = options.selector,
|
|
343
|
-
scoped = options.scoped,
|
|
344
|
-
sheet = options.sheet,
|
|
345
|
-
generateId = options.generateId;
|
|
208
|
+
const motionDurationVeryLong = '1.2s';
|
|
346
209
|
|
|
347
|
-
|
|
348
|
-
_this.selectorText = selector;
|
|
349
|
-
} else if (scoped !== false) {
|
|
350
|
-
_this.id = generateId(_assertThisInitialized(_assertThisInitialized(_this)), sheet);
|
|
351
|
-
_this.selectorText = "." + escape(_this.id);
|
|
352
|
-
}
|
|
210
|
+
const motionEasingIn = 'cubic-bezier(0,0,0.2,1)';
|
|
353
211
|
|
|
354
|
-
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* Set selector string.
|
|
358
|
-
* Attention: use this with caution. Most browsers didn't implement
|
|
359
|
-
* selectorText setter, so this may result in rerendering of entire Style Sheet.
|
|
360
|
-
*/
|
|
212
|
+
const motionEasingOut = 'cubic-bezier(0.4,0,0.5,1)';
|
|
361
213
|
|
|
214
|
+
const spacingStaticXSmall = '4px';
|
|
362
215
|
|
|
363
|
-
|
|
216
|
+
const spacingStaticSmall = '8px';
|
|
364
217
|
|
|
365
|
-
|
|
366
|
-
* Apply rule to an element inline.
|
|
367
|
-
*/
|
|
368
|
-
_proto2.applyTo = function applyTo(renderable) {
|
|
369
|
-
var renderer = this.renderer;
|
|
218
|
+
const spacingStaticMedium = '16px';
|
|
370
219
|
|
|
371
|
-
|
|
372
|
-
var json = this.toJSON();
|
|
220
|
+
const spacingStaticLarge = '32px';
|
|
373
221
|
|
|
374
|
-
|
|
375
|
-
renderer.setProperty(renderable, prop, json[prop]);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
222
|
+
const spacingFluidXSmall = 'clamp(4px, 0.25vw + 3px, 8px)';
|
|
378
223
|
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
/**
|
|
382
|
-
* Returns JSON representation of the rule.
|
|
383
|
-
* Fallbacks are not supported.
|
|
384
|
-
* Useful for inline styles.
|
|
385
|
-
*/
|
|
386
|
-
;
|
|
224
|
+
const spacingFluidSmall = 'clamp(8px, 0.5vw + 6px, 16px)';
|
|
387
225
|
|
|
388
|
-
|
|
389
|
-
var json = {};
|
|
226
|
+
const spacingFluidLarge = 'clamp(32px, 2.75vw + 23px, 76px)';
|
|
390
227
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
if (typeof value !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = toCssValue(value);
|
|
394
|
-
}
|
|
228
|
+
const _displayFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
229
|
+
const _displayFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
395
230
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
* Generates a CSS string.
|
|
400
|
-
*/
|
|
401
|
-
;
|
|
231
|
+
const displayMediumStyle = {
|
|
232
|
+
font: `${_displayFontPartA}${fontSizeDisplayMedium}${_displayFontPartB}`,
|
|
233
|
+
};
|
|
402
234
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
var opts = link ? _extends({}, options, {
|
|
407
|
-
allowEmpty: true
|
|
408
|
-
}) : options;
|
|
409
|
-
return toCss(this.selectorText, this.style, opts);
|
|
410
|
-
};
|
|
235
|
+
const displayLargeStyle = {
|
|
236
|
+
font: `${_displayFontPartA}${fontSizeDisplayLarge}${_displayFontPartB}`,
|
|
237
|
+
};
|
|
411
238
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
set: function set(selector) {
|
|
415
|
-
if (selector === this.selectorText) return;
|
|
416
|
-
this.selectorText = selector;
|
|
417
|
-
var renderer = this.renderer,
|
|
418
|
-
renderable = this.renderable;
|
|
419
|
-
if (!renderable || !renderer) return;
|
|
420
|
-
var hasChanged = renderer.setSelector(renderable, selector); // If selector setter is not implemented, rerender the rule.
|
|
239
|
+
const _headingFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightSemiBold} `;
|
|
240
|
+
const _headingFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
421
241
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
242
|
+
const headingSmallStyle = {
|
|
243
|
+
font: `${_headingFontPartA}${fontSizeHeadingSmall}${_headingFontPartB}`,
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
const headingMediumStyle = {
|
|
247
|
+
font: `${_headingFontPartA}${fontSizeHeadingMedium}${_headingFontPartB}`,
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
const headingLargeStyle = {
|
|
251
|
+
font: `${_headingFontPartA}${fontSizeHeadingLarge}${_headingFontPartB}`,
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
const headingXLargeStyle = {
|
|
255
|
+
font: `${_headingFontPartA}${fontSizeHeadingXLarge}${_headingFontPartB}`,
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
const headingXXLargeStyle = {
|
|
259
|
+
font: `${_headingFontPartA}${fontSizeHeadingXXLarge}${_headingFontPartB}`,
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
const _textFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
263
|
+
const _textFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
264
|
+
|
|
265
|
+
const textXXSmallStyle = {
|
|
266
|
+
font: `${_textFontPartA}${fontSizeTextXXSmall}${_textFontPartB}`,
|
|
267
|
+
...fontHyphenationStyle,
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
const textXSmallStyle = {
|
|
271
|
+
font: `${_textFontPartA}${fontSizeTextXSmall}${_textFontPartB}`,
|
|
272
|
+
...fontHyphenationStyle,
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
const textSmallStyle = {
|
|
276
|
+
font: `${_textFontPartA}${fontSizeTextSmall}${_textFontPartB}`,
|
|
277
|
+
...fontHyphenationStyle,
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
const textMediumStyle = {
|
|
281
|
+
font: `${_textFontPartA}${fontSizeTextMedium}${_textFontPartB}`,
|
|
282
|
+
...fontHyphenationStyle,
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
const textLargeStyle = {
|
|
286
|
+
font: `${_textFontPartA}${fontSizeTextLarge}${_textFontPartB}`,
|
|
287
|
+
...fontHyphenationStyle,
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
function _extends() {
|
|
291
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
292
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
293
|
+
var source = arguments[i];
|
|
294
|
+
for (var key in source) {
|
|
295
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
296
|
+
target[key] = source[key];
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
return target;
|
|
301
|
+
};
|
|
302
|
+
return _extends.apply(this, arguments);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
306
|
+
|
|
307
|
+
var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof$1(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof$1(document)) === 'object' && document.nodeType === 9;
|
|
308
|
+
|
|
309
|
+
function _typeof(o) {
|
|
310
|
+
"@babel/helpers - typeof";
|
|
311
|
+
|
|
312
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
313
|
+
return typeof o;
|
|
314
|
+
} : function (o) {
|
|
315
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
316
|
+
}, _typeof(o);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
function toPrimitive(t, r) {
|
|
320
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
321
|
+
var e = t[Symbol.toPrimitive];
|
|
322
|
+
if (void 0 !== e) {
|
|
323
|
+
var i = e.call(t, r);
|
|
324
|
+
if ("object" != _typeof(i)) return i;
|
|
325
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
326
|
+
}
|
|
327
|
+
return (String )(t);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
function toPropertyKey(t) {
|
|
331
|
+
var i = toPrimitive(t, "string");
|
|
332
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
function _defineProperties(target, props) {
|
|
336
|
+
for (var i = 0; i < props.length; i++) {
|
|
337
|
+
var descriptor = props[i];
|
|
338
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
339
|
+
descriptor.configurable = true;
|
|
340
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
341
|
+
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
345
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
346
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
347
|
+
writable: false
|
|
348
|
+
});
|
|
349
|
+
return Constructor;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
function _setPrototypeOf(o, p) {
|
|
353
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
354
|
+
o.__proto__ = p;
|
|
355
|
+
return o;
|
|
356
|
+
};
|
|
357
|
+
return _setPrototypeOf(o, p);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
function _inheritsLoose(subClass, superClass) {
|
|
361
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
362
|
+
subClass.prototype.constructor = subClass;
|
|
363
|
+
_setPrototypeOf(subClass, superClass);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
function _assertThisInitialized(self) {
|
|
367
|
+
if (self === void 0) {
|
|
368
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
369
|
+
}
|
|
370
|
+
return self;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
374
|
+
if (source == null) return {};
|
|
375
|
+
var target = {};
|
|
376
|
+
var sourceKeys = Object.keys(source);
|
|
377
|
+
var key, i;
|
|
378
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
379
|
+
key = sourceKeys[i];
|
|
380
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
381
|
+
target[key] = source[key];
|
|
382
|
+
}
|
|
383
|
+
return target;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
var plainObjectConstrurctor = {}.constructor;
|
|
387
|
+
function cloneStyle(style) {
|
|
388
|
+
if (style == null || typeof style !== 'object') return style;
|
|
389
|
+
if (Array.isArray(style)) return style.map(cloneStyle);
|
|
390
|
+
if (style.constructor !== plainObjectConstrurctor) return style;
|
|
391
|
+
var newStyle = {};
|
|
392
|
+
|
|
393
|
+
for (var name in style) {
|
|
394
|
+
newStyle[name] = cloneStyle(style[name]);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
return newStyle;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Create a rule instance.
|
|
402
|
+
*/
|
|
403
|
+
|
|
404
|
+
function createRule(name, decl, options) {
|
|
405
|
+
if (name === void 0) {
|
|
406
|
+
name = 'unnamed';
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
var jss = options.jss;
|
|
410
|
+
var declCopy = cloneStyle(decl);
|
|
411
|
+
var rule = jss.plugins.onCreateRule(name, declCopy, options);
|
|
412
|
+
if (rule) return rule; // It is an at-rule and it has no instance.
|
|
413
|
+
|
|
414
|
+
if (name[0] === '@') ;
|
|
415
|
+
|
|
416
|
+
return null;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
var join = function join(value, by) {
|
|
420
|
+
var result = '';
|
|
421
|
+
|
|
422
|
+
for (var i = 0; i < value.length; i++) {
|
|
423
|
+
// Remove !important from the value, it will be readded later.
|
|
424
|
+
if (value[i] === '!important') break;
|
|
425
|
+
if (result) result += by;
|
|
426
|
+
result += value[i];
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
return result;
|
|
430
|
+
};
|
|
431
|
+
/**
|
|
432
|
+
* Converts JSS array value to a CSS string.
|
|
433
|
+
*
|
|
434
|
+
* `margin: [['5px', '10px']]` > `margin: 5px 10px;`
|
|
435
|
+
* `border: ['1px', '2px']` > `border: 1px, 2px;`
|
|
436
|
+
* `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;`
|
|
437
|
+
* `color: ['red', !important]` > `color: red !important;`
|
|
438
|
+
*/
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
var toCssValue = function toCssValue(value) {
|
|
442
|
+
if (!Array.isArray(value)) return value;
|
|
443
|
+
var cssValue = ''; // Support space separated values via `[['5px', '10px']]`.
|
|
444
|
+
|
|
445
|
+
if (Array.isArray(value[0])) {
|
|
446
|
+
for (var i = 0; i < value.length; i++) {
|
|
447
|
+
if (value[i] === '!important') break;
|
|
448
|
+
if (cssValue) cssValue += ', ';
|
|
449
|
+
cssValue += join(value[i], ' ');
|
|
450
|
+
}
|
|
451
|
+
} else cssValue = join(value, ', '); // Add !important, because it was ignored.
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
if (value[value.length - 1] === '!important') {
|
|
455
|
+
cssValue += ' !important';
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
return cssValue;
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
function getWhitespaceSymbols(options) {
|
|
462
|
+
if (options && options.format === false) {
|
|
463
|
+
return {
|
|
464
|
+
linebreak: '',
|
|
465
|
+
space: ''
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
return {
|
|
470
|
+
linebreak: '\n',
|
|
471
|
+
space: ' '
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Indent a string.
|
|
477
|
+
* http://jsperf.com/array-join-vs-for
|
|
478
|
+
*/
|
|
479
|
+
|
|
480
|
+
function indentStr(str, indent) {
|
|
481
|
+
var result = '';
|
|
482
|
+
|
|
483
|
+
for (var index = 0; index < indent; index++) {
|
|
484
|
+
result += ' ';
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
return result + str;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Converts a Rule to CSS string.
|
|
491
|
+
*/
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
function toCss(selector, style, options) {
|
|
495
|
+
if (options === void 0) {
|
|
496
|
+
options = {};
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
var result = '';
|
|
500
|
+
if (!style) return result;
|
|
501
|
+
var _options = options,
|
|
502
|
+
_options$indent = _options.indent,
|
|
503
|
+
indent = _options$indent === void 0 ? 0 : _options$indent;
|
|
504
|
+
var fallbacks = style.fallbacks;
|
|
505
|
+
|
|
506
|
+
if (options.format === false) {
|
|
507
|
+
indent = -Infinity;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
var _getWhitespaceSymbols = getWhitespaceSymbols(options),
|
|
511
|
+
linebreak = _getWhitespaceSymbols.linebreak,
|
|
512
|
+
space = _getWhitespaceSymbols.space;
|
|
513
|
+
|
|
514
|
+
if (selector) indent++; // Apply fallbacks first.
|
|
515
|
+
|
|
516
|
+
if (fallbacks) {
|
|
517
|
+
// Array syntax {fallbacks: [{prop: value}]}
|
|
518
|
+
if (Array.isArray(fallbacks)) {
|
|
519
|
+
for (var index = 0; index < fallbacks.length; index++) {
|
|
520
|
+
var fallback = fallbacks[index];
|
|
521
|
+
|
|
522
|
+
for (var prop in fallback) {
|
|
523
|
+
var value = fallback[prop];
|
|
524
|
+
|
|
525
|
+
if (value != null) {
|
|
526
|
+
if (result) result += linebreak;
|
|
527
|
+
result += indentStr(prop + ":" + space + toCssValue(value) + ";", indent);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
} else {
|
|
532
|
+
// Object syntax {fallbacks: {prop: value}}
|
|
533
|
+
for (var _prop in fallbacks) {
|
|
534
|
+
var _value = fallbacks[_prop];
|
|
535
|
+
|
|
536
|
+
if (_value != null) {
|
|
537
|
+
if (result) result += linebreak;
|
|
538
|
+
result += indentStr(_prop + ":" + space + toCssValue(_value) + ";", indent);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
for (var _prop2 in style) {
|
|
545
|
+
var _value2 = style[_prop2];
|
|
546
|
+
|
|
547
|
+
if (_value2 != null && _prop2 !== 'fallbacks') {
|
|
548
|
+
if (result) result += linebreak;
|
|
549
|
+
result += indentStr(_prop2 + ":" + space + toCssValue(_value2) + ";", indent);
|
|
550
|
+
}
|
|
551
|
+
} // Allow empty style in this case, because properties will be added dynamically.
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
if (!result && !options.allowEmpty) return result; // When rule is being stringified before selector was defined.
|
|
555
|
+
|
|
556
|
+
if (!selector) return result;
|
|
557
|
+
indent--;
|
|
558
|
+
if (result) result = "" + linebreak + result + linebreak;
|
|
559
|
+
return indentStr("" + selector + space + "{" + result, indent) + indentStr('}', indent);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
var escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g;
|
|
563
|
+
var nativeEscape = typeof CSS !== 'undefined' && CSS.escape;
|
|
564
|
+
var escape = (function (str) {
|
|
565
|
+
return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\$1');
|
|
566
|
+
});
|
|
567
|
+
|
|
568
|
+
var BaseStyleRule =
|
|
569
|
+
/*#__PURE__*/
|
|
570
|
+
function () {
|
|
571
|
+
function BaseStyleRule(key, style, options) {
|
|
572
|
+
this.type = 'style';
|
|
573
|
+
this.isProcessed = false;
|
|
574
|
+
var sheet = options.sheet,
|
|
575
|
+
Renderer = options.Renderer;
|
|
576
|
+
this.key = key;
|
|
577
|
+
this.options = options;
|
|
578
|
+
this.style = style;
|
|
579
|
+
if (sheet) this.renderer = sheet.renderer;else if (Renderer) this.renderer = new Renderer();
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Get or set a style property.
|
|
583
|
+
*/
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
var _proto = BaseStyleRule.prototype;
|
|
587
|
+
|
|
588
|
+
_proto.prop = function prop(name, value, options) {
|
|
589
|
+
// It's a getter.
|
|
590
|
+
if (value === undefined) return this.style[name]; // Don't do anything if the value has not changed.
|
|
591
|
+
|
|
592
|
+
var force = options ? options.force : false;
|
|
593
|
+
if (!force && this.style[name] === value) return this;
|
|
594
|
+
var newValue = value;
|
|
595
|
+
|
|
596
|
+
if (!options || options.process !== false) {
|
|
597
|
+
newValue = this.options.jss.plugins.onChangeValue(value, name, this);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
var isEmpty = newValue == null || newValue === false;
|
|
601
|
+
var isDefined = name in this.style; // Value is empty and wasn't defined before.
|
|
602
|
+
|
|
603
|
+
if (isEmpty && !isDefined && !force) return this; // We are going to remove this value.
|
|
604
|
+
|
|
605
|
+
var remove = isEmpty && isDefined;
|
|
606
|
+
if (remove) delete this.style[name];else this.style[name] = newValue; // Renderable is defined if StyleSheet option `link` is true.
|
|
607
|
+
|
|
608
|
+
if (this.renderable && this.renderer) {
|
|
609
|
+
if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, newValue);
|
|
610
|
+
return this;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
var sheet = this.options.sheet;
|
|
614
|
+
|
|
615
|
+
if (sheet && sheet.attached) ;
|
|
616
|
+
|
|
617
|
+
return this;
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
return BaseStyleRule;
|
|
621
|
+
}();
|
|
622
|
+
var StyleRule =
|
|
623
|
+
/*#__PURE__*/
|
|
624
|
+
function (_BaseStyleRule) {
|
|
625
|
+
_inheritsLoose(StyleRule, _BaseStyleRule);
|
|
626
|
+
|
|
627
|
+
function StyleRule(key, style, options) {
|
|
628
|
+
var _this;
|
|
629
|
+
|
|
630
|
+
_this = _BaseStyleRule.call(this, key, style, options) || this;
|
|
631
|
+
var selector = options.selector,
|
|
632
|
+
scoped = options.scoped,
|
|
633
|
+
sheet = options.sheet,
|
|
634
|
+
generateId = options.generateId;
|
|
635
|
+
|
|
636
|
+
if (selector) {
|
|
637
|
+
_this.selectorText = selector;
|
|
638
|
+
} else if (scoped !== false) {
|
|
639
|
+
_this.id = generateId(_assertThisInitialized(_assertThisInitialized(_this)), sheet);
|
|
640
|
+
_this.selectorText = "." + escape(_this.id);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
return _this;
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Set selector string.
|
|
647
|
+
* Attention: use this with caution. Most browsers didn't implement
|
|
648
|
+
* selectorText setter, so this may result in rerendering of entire Style Sheet.
|
|
649
|
+
*/
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
var _proto2 = StyleRule.prototype;
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Apply rule to an element inline.
|
|
656
|
+
*/
|
|
657
|
+
_proto2.applyTo = function applyTo(renderable) {
|
|
658
|
+
var renderer = this.renderer;
|
|
659
|
+
|
|
660
|
+
if (renderer) {
|
|
661
|
+
var json = this.toJSON();
|
|
662
|
+
|
|
663
|
+
for (var prop in json) {
|
|
664
|
+
renderer.setProperty(renderable, prop, json[prop]);
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
return this;
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* Returns JSON representation of the rule.
|
|
672
|
+
* Fallbacks are not supported.
|
|
673
|
+
* Useful for inline styles.
|
|
674
|
+
*/
|
|
675
|
+
;
|
|
676
|
+
|
|
677
|
+
_proto2.toJSON = function toJSON() {
|
|
678
|
+
var json = {};
|
|
679
|
+
|
|
680
|
+
for (var prop in this.style) {
|
|
681
|
+
var value = this.style[prop];
|
|
682
|
+
if (typeof value !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = toCssValue(value);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
return json;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Generates a CSS string.
|
|
689
|
+
*/
|
|
690
|
+
;
|
|
691
|
+
|
|
692
|
+
_proto2.toString = function toString(options) {
|
|
693
|
+
var sheet = this.options.sheet;
|
|
694
|
+
var link = sheet ? sheet.options.link : false;
|
|
695
|
+
var opts = link ? _extends({}, options, {
|
|
696
|
+
allowEmpty: true
|
|
697
|
+
}) : options;
|
|
698
|
+
return toCss(this.selectorText, this.style, opts);
|
|
699
|
+
};
|
|
700
|
+
|
|
701
|
+
_createClass(StyleRule, [{
|
|
702
|
+
key: "selector",
|
|
703
|
+
set: function set(selector) {
|
|
704
|
+
if (selector === this.selectorText) return;
|
|
705
|
+
this.selectorText = selector;
|
|
706
|
+
var renderer = this.renderer,
|
|
707
|
+
renderable = this.renderable;
|
|
708
|
+
if (!renderable || !renderer) return;
|
|
709
|
+
var hasChanged = renderer.setSelector(renderable, selector); // If selector setter is not implemented, rerender the rule.
|
|
710
|
+
|
|
711
|
+
if (!hasChanged) {
|
|
712
|
+
renderer.replaceRule(renderable, this);
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Get selector string.
|
|
717
|
+
*/
|
|
718
|
+
,
|
|
719
|
+
get: function get() {
|
|
720
|
+
return this.selectorText;
|
|
721
|
+
}
|
|
722
|
+
}]);
|
|
434
723
|
|
|
435
724
|
return StyleRule;
|
|
436
725
|
}(BaseStyleRule);
|
|
@@ -2349,18 +2638,18 @@ function getDynamicStyles(styles) {
|
|
|
2349
2638
|
var index = createJss();
|
|
2350
2639
|
|
|
2351
2640
|
var jss_esm = /*#__PURE__*/Object.freeze({
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2641
|
+
__proto__: null,
|
|
2642
|
+
RuleList: RuleList,
|
|
2643
|
+
SheetsManager: SheetsManager,
|
|
2644
|
+
SheetsRegistry: SheetsRegistry,
|
|
2645
|
+
create: createJss,
|
|
2646
|
+
createGenerateId: createGenerateId,
|
|
2647
|
+
createRule: createRule,
|
|
2648
|
+
default: index,
|
|
2649
|
+
getDynamicStyles: getDynamicStyles,
|
|
2650
|
+
hasCSSTOMSupport: hasCSSTOMSupport,
|
|
2651
|
+
sheets: sheets,
|
|
2652
|
+
toCssValue: toCssValue
|
|
2364
2653
|
});
|
|
2365
2654
|
|
|
2366
2655
|
var at = '@global';
|
|
@@ -3151,342 +3440,324 @@ function requireDist () {
|
|
|
3151
3440
|
} else {
|
|
3152
3441
|
for (var i_2 = 0; i_2 < group.length; i_2++) {
|
|
3153
3442
|
var rule = this.index[group[i_2]];
|
|
3154
|
-
var css = rule.toString(options);
|
|
3155
|
-
if (!css && !link) continue;
|
|
3156
|
-
if (str) str += '\n';
|
|
3157
|
-
str += css;
|
|
3158
|
-
}
|
|
3159
|
-
}
|
|
3160
|
-
}
|
|
3161
|
-
return str;
|
|
3162
|
-
};
|
|
3163
|
-
}
|
|
3164
|
-
}
|
|
3165
|
-
function jssCombineAndSortMQ(options) {
|
|
3166
|
-
if (options === void 0) {
|
|
3167
|
-
options = {};
|
|
3168
|
-
}
|
|
3169
|
-
return {
|
|
3170
|
-
onProcessSheet: function (sheet) {
|
|
3171
|
-
recursive(options, sheet);
|
|
3172
|
-
}
|
|
3173
|
-
};
|
|
3174
|
-
}
|
|
3175
|
-
|
|
3176
|
-
dist = jssCombineAndSortMQ;
|
|
3177
|
-
return dist;
|
|
3178
|
-
}
|
|
3179
|
-
|
|
3180
|
-
var distExports = requireDist();
|
|
3181
|
-
var jssPluginSortMediaQueries = /*@__PURE__*/getDefaultExportFromCjs(distExports);
|
|
3182
|
-
|
|
3183
|
-
const isDisabledOrLoading = (disabled, loading) => {
|
|
3184
|
-
return disabled || loading;
|
|
3185
|
-
};
|
|
3186
|
-
|
|
3187
|
-
const hasWindow = typeof window !== 'undefined';
|
|
3188
|
-
|
|
3189
|
-
const isHighContrastMode = hasWindow && window.matchMedia?.('(forced-colors: active)').matches;
|
|
3190
|
-
|
|
3191
|
-
const lighten = (hsl) => {
|
|
3192
|
-
return changeColor(hsl, 15);
|
|
3193
|
-
};
|
|
3194
|
-
const darken = (hsl) => {
|
|
3195
|
-
return changeColor(hsl, -15);
|
|
3196
|
-
};
|
|
3197
|
-
const changeColor = (hsl, lightness) => {
|
|
3198
|
-
return hsl.replace(/\s(\d+)(%?)\//, (_, p1, p2) => {
|
|
3199
|
-
return ` ${Math.min(Math.max(Number.parseInt(p1, 10) + lightness, 0), 100)}${p2}/`;
|
|
3200
|
-
});
|
|
3201
|
-
};
|
|
3202
|
-
|
|
3203
|
-
const borderRadiusSmall = '4px';
|
|
3204
|
-
|
|
3205
|
-
const borderRadiusMedium = '8px';
|
|
3206
|
-
|
|
3207
|
-
const borderRadiusLarge = '12px';
|
|
3208
|
-
|
|
3209
|
-
const borderWidthBase = '2px';
|
|
3210
|
-
|
|
3211
|
-
const _dropShadowBackgroundColor = 'rgba(0, 0, 0, 0.16)';
|
|
3212
|
-
|
|
3213
|
-
const dropShadowLowStyle = {
|
|
3214
|
-
boxShadow: `0px 3px 8px ${_dropShadowBackgroundColor}`, // filter: drop-shadow() causes visual glitches in Firefox in combination with frostedGlassStyle
|
|
3215
|
-
};
|
|
3216
|
-
|
|
3217
|
-
const dropShadowHighStyle = {
|
|
3218
|
-
boxShadow: `0px 8px 40px ${_dropShadowBackgroundColor}`, // filter: drop-shadow() causes visual glitches in Firefox in combination with frostedGlassStyle
|
|
3219
|
-
};
|
|
3220
|
-
|
|
3221
|
-
const fontFamily = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
|
|
3222
|
-
|
|
3223
|
-
const fontHyphenationStyle = {
|
|
3224
|
-
overflowWrap: 'break-word',
|
|
3225
|
-
hyphens: 'auto',
|
|
3226
|
-
};
|
|
3227
|
-
|
|
3228
|
-
const fontLineHeight = 'calc(6px + 2.125ex)';
|
|
3229
|
-
|
|
3230
|
-
const fontSizeTextXXSmall = '.75rem';
|
|
3231
|
-
|
|
3232
|
-
const fontSizeTextXSmall = 'clamp(0.81rem, 0.23vw + 0.77rem, 0.88rem)';
|
|
3233
|
-
|
|
3234
|
-
const fontSizeTextSmall = '1rem';
|
|
3235
|
-
|
|
3236
|
-
const fontSizeTextMedium = 'clamp(1.13rem, 0.21vw + 1.08rem, 1.33rem)';
|
|
3237
|
-
|
|
3238
|
-
const fontSizeTextLarge = 'clamp(1.27rem, 0.51vw + 1.16rem, 1.78rem)';
|
|
3239
|
-
|
|
3240
|
-
const fontSizeTextXLarge = 'clamp(1.42rem, 0.94vw + 1.23rem, 2.37rem)';
|
|
3241
|
-
|
|
3242
|
-
const fontSizeText = {
|
|
3243
|
-
xxSmall: fontSizeTextXXSmall,
|
|
3244
|
-
xSmall: fontSizeTextXSmall,
|
|
3245
|
-
small: fontSizeTextSmall,
|
|
3246
|
-
medium: fontSizeTextMedium,
|
|
3247
|
-
large: fontSizeTextLarge,
|
|
3248
|
-
xLarge: fontSizeTextXLarge,
|
|
3249
|
-
};
|
|
3250
|
-
|
|
3251
|
-
const fontSizeHeadingSmall = fontSizeTextSmall;
|
|
3252
|
-
|
|
3253
|
-
const fontSizeHeadingMedium = fontSizeTextMedium;
|
|
3254
|
-
|
|
3255
|
-
const fontSizeHeadingLarge = fontSizeTextLarge;
|
|
3256
|
-
|
|
3257
|
-
const fontSizeHeadingXLarge = fontSizeTextXLarge;
|
|
3258
|
-
|
|
3259
|
-
const fontSizeHeadingXXLarge = 'clamp(1.6rem, 1.56vw + 1.29rem, 3.16rem)';
|
|
3260
|
-
|
|
3261
|
-
const fontSizeDisplaySmall = 'clamp(1.8rem, 2.41vw + 1.32rem, 4.21rem)';
|
|
3262
|
-
|
|
3263
|
-
const fontSizeDisplayMedium = 'clamp(2.03rem, 3.58vw + 1.31rem, 5.61rem)';
|
|
3264
|
-
|
|
3265
|
-
const fontSizeDisplayLarge = 'clamp(2.28rem, 5.2vw + 1.24rem, 7.48rem)';
|
|
3266
|
-
|
|
3267
|
-
const fontWeightRegular = 400;
|
|
3268
|
-
|
|
3269
|
-
const fontWeightSemiBold = 600;
|
|
3270
|
-
|
|
3271
|
-
const fontWeightBold = 700;
|
|
3272
|
-
|
|
3273
|
-
const fontStyleNormal = 'normal';
|
|
3274
|
-
|
|
3275
|
-
const fontVariant = 'normal';
|
|
3276
|
-
|
|
3277
|
-
const backdropFilter = 'blur(32px)';
|
|
3278
|
-
const frostedGlassStyle = {
|
|
3279
|
-
WebkitBackdropFilter: backdropFilter,
|
|
3280
|
-
backdropFilter,
|
|
3281
|
-
};
|
|
3282
|
-
|
|
3283
|
-
const _gradient = 'hsla(0, 0%, 0%, 0.80) 0%,' +
|
|
3284
|
-
'hsla(0, 0%, 0%, 0.80) 8.1%,' +
|
|
3285
|
-
'hsla(0, 0%, 0%, 0.80) 15.5%,' +
|
|
3286
|
-
'hsla(0, 0%, 0%, 0.80) 22.5%,' +
|
|
3287
|
-
'hsla(0, 0%, 0%, 0.78) 29%,' +
|
|
3288
|
-
'hsla(0, 0%, 0%, 0.73) 35.3%,' +
|
|
3289
|
-
'hsla(0, 0%, 0%, 0.67) 41.2%,' +
|
|
3290
|
-
'hsla(0, 0%, 0%, 0.60) 47.1%,' +
|
|
3291
|
-
'hsla(0, 0%, 0%, 0.52) 52.9%,' +
|
|
3292
|
-
'hsla(0, 0%, 0%, 0.44) 58.8%,' +
|
|
3293
|
-
'hsla(0, 0%, 0%, 0.33) 64.7%,' +
|
|
3294
|
-
'hsla(0, 0%, 0%, 0.22) 71%,' +
|
|
3295
|
-
'hsla(0, 0%, 0%, 0.12) 77.5%,' +
|
|
3296
|
-
'hsla(0, 0%, 0%, 0.05) 84.5%,' +
|
|
3297
|
-
'hsla(0, 0%, 0%, 0.011) 91.9%,' +
|
|
3298
|
-
'hsla(0, 0%, 0%, 0)';
|
|
3299
|
-
|
|
3300
|
-
const gradientToBottomStyle = {
|
|
3301
|
-
background: `linear-gradient(to bottom, ${_gradient} 100%);`,
|
|
3302
|
-
};
|
|
3303
|
-
|
|
3304
|
-
const gradientToTopStyle = {
|
|
3305
|
-
background: `linear-gradient(to top, ${_gradient} 100%);`,
|
|
3306
|
-
};
|
|
3307
|
-
|
|
3308
|
-
const breakpointBase = 0;
|
|
3309
|
-
|
|
3310
|
-
const breakpointXS = 480;
|
|
3311
|
-
|
|
3312
|
-
const breakpointS = 760;
|
|
3313
|
-
|
|
3314
|
-
const breakpointM = 1000;
|
|
3315
|
-
|
|
3316
|
-
const breakpointL = 1300;
|
|
3317
|
-
|
|
3318
|
-
const breakpointXL = 1760;
|
|
3319
|
-
|
|
3320
|
-
const breakpointXXL = 1920;
|
|
3321
|
-
|
|
3322
|
-
const breakpoint = {
|
|
3323
|
-
base: breakpointBase,
|
|
3324
|
-
xs: breakpointXS,
|
|
3325
|
-
s: breakpointS,
|
|
3326
|
-
m: breakpointM,
|
|
3327
|
-
l: breakpointL,
|
|
3328
|
-
xl: breakpointXL,
|
|
3329
|
-
xxl: breakpointXXL,
|
|
3330
|
-
};
|
|
3331
|
-
|
|
3332
|
-
function getMediaQueryMin(min) {
|
|
3333
|
-
return `@media(min-width:${breakpoint[min]}px)`;
|
|
3334
|
-
}
|
|
3335
|
-
|
|
3336
|
-
const spacingFluidMedium = 'clamp(16px, 1.25vw + 12px, 36px)';
|
|
3337
|
-
|
|
3338
|
-
const gridGap = spacingFluidMedium;
|
|
3339
|
-
|
|
3340
|
-
const _gridWidthMax = '2560px';
|
|
3341
|
-
// fluid sizing calculated by https://fluidtypography.com/#app-get-started
|
|
3342
|
-
const _gridSafeZoneBase = 'max(22px, 10.625vw - 12px)'; // viewport-width range = 320 - 760px / size range = 22 - 68.75px
|
|
3343
|
-
const _gridSafeZoneS = 'calc(5vw - 16px)'; // viewport-width range = 760 - 1920px / size range = 22(22.75) - 80(79.71)px
|
|
3344
|
-
const _gridSafeZoneXXL = 'min(50vw - 880px, 400px)'; // viewport-width range = 1920 - 2560px / size range = 80(79.71)px - 400(399.71)px
|
|
3345
|
-
|
|
3346
|
-
const columnMap = {
|
|
3347
|
-
narrow: 4,
|
|
3348
|
-
basic: 2,
|
|
3349
|
-
extended: 1,
|
|
3350
|
-
};
|
|
3351
|
-
const gridColumnWidthS = `calc((100vw - ${_gridSafeZoneS} * 2 - ${gridGap} * 15) / 16)`;
|
|
3352
|
-
const gridColumnWidthXXL = `calc((min(100vw, ${_gridWidthMax}) - ${_gridSafeZoneXXL} * 2 - ${gridGap} * 15) / 16)`;
|
|
3353
|
-
const _gridPadding = `max(0px, 50vw - ${_gridWidthMax} / 2)`;
|
|
3354
|
-
const _getGridOffsetS = (width) => `calc(${_gridSafeZoneS} + (${gridGap} + ${gridColumnWidthS}) * ${columnMap[width]})`;
|
|
3355
|
-
const _getGridOffsetXXL = (width) => `calc(${_gridPadding} + ${_gridSafeZoneXXL} + (${gridGap} + ${gridColumnWidthXXL}) * ${columnMap[width]})`;
|
|
3356
|
-
|
|
3357
|
-
const gridFullOffset = _gridPadding;
|
|
3358
|
-
|
|
3359
|
-
const gridExtendedOffsetBase = _gridSafeZoneBase;
|
|
3360
|
-
|
|
3361
|
-
const gridExtendedOffsetS = _getGridOffsetS('extended');
|
|
3362
|
-
|
|
3363
|
-
const gridExtendedOffsetXXL = _getGridOffsetXXL('extended');
|
|
3364
|
-
|
|
3365
|
-
const gridExtendedOffset = {
|
|
3366
|
-
base: gridExtendedOffsetBase,
|
|
3367
|
-
s: gridExtendedOffsetS,
|
|
3368
|
-
xxl: gridExtendedOffsetXXL,
|
|
3369
|
-
};
|
|
3370
|
-
|
|
3371
|
-
const gridBasicOffsetBase = _gridSafeZoneBase;
|
|
3372
|
-
|
|
3373
|
-
const gridBasicOffsetS = _getGridOffsetS('basic');
|
|
3374
|
-
|
|
3375
|
-
const gridBasicOffsetXXL = _getGridOffsetXXL('basic');
|
|
3376
|
-
|
|
3377
|
-
const gridBasicOffset = {
|
|
3378
|
-
base: gridBasicOffsetBase,
|
|
3379
|
-
s: gridBasicOffsetS,
|
|
3380
|
-
xxl: gridBasicOffsetXXL,
|
|
3381
|
-
};
|
|
3382
|
-
|
|
3383
|
-
const gridNarrowOffsetBase = _gridSafeZoneBase;
|
|
3384
|
-
|
|
3385
|
-
const gridNarrowOffsetS = _getGridOffsetS('narrow');
|
|
3386
|
-
|
|
3387
|
-
const gridNarrowOffsetXXL = _getGridOffsetXXL('narrow');
|
|
3388
|
-
|
|
3389
|
-
const gridNarrowOffset = {
|
|
3390
|
-
base: gridNarrowOffsetBase,
|
|
3391
|
-
s: gridNarrowOffsetS,
|
|
3392
|
-
xxl: gridNarrowOffsetXXL,
|
|
3393
|
-
};
|
|
3394
|
-
|
|
3395
|
-
const motionDurationShort = '0.25s';
|
|
3396
|
-
|
|
3397
|
-
const motionEasingBase = 'cubic-bezier(0.25,0.1,0.25,1)';
|
|
3398
|
-
|
|
3399
|
-
const breakpoints = ['base', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
3443
|
+
var css = rule.toString(options);
|
|
3444
|
+
if (!css && !link) continue;
|
|
3445
|
+
if (str) str += '\n';
|
|
3446
|
+
str += css;
|
|
3447
|
+
}
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
return str;
|
|
3451
|
+
};
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
function jssCombineAndSortMQ(options) {
|
|
3455
|
+
if (options === void 0) {
|
|
3456
|
+
options = {};
|
|
3457
|
+
}
|
|
3458
|
+
return {
|
|
3459
|
+
onProcessSheet: function (sheet) {
|
|
3460
|
+
recursive(options, sheet);
|
|
3461
|
+
}
|
|
3462
|
+
};
|
|
3463
|
+
}
|
|
3400
3464
|
|
|
3401
|
-
|
|
3402
|
-
|
|
3465
|
+
dist = jssCombineAndSortMQ;
|
|
3466
|
+
return dist;
|
|
3403
3467
|
}
|
|
3404
3468
|
|
|
3405
|
-
|
|
3469
|
+
var distExports = requireDist();
|
|
3470
|
+
var jssPluginSortMediaQueries = /*@__PURE__*/getDefaultExportFromCjs(distExports);
|
|
3406
3471
|
|
|
3407
|
-
const
|
|
3472
|
+
const isDisabledOrLoading = (disabled, loading) => {
|
|
3473
|
+
return disabled || loading;
|
|
3474
|
+
};
|
|
3408
3475
|
|
|
3409
|
-
const
|
|
3476
|
+
const hasWindow = typeof window !== 'undefined';
|
|
3410
3477
|
|
|
3411
|
-
const
|
|
3478
|
+
const isHighContrastMode = hasWindow && window.matchMedia?.('(forced-colors: active)').matches;
|
|
3412
3479
|
|
|
3413
|
-
const
|
|
3480
|
+
const lighten = (hsl) => {
|
|
3481
|
+
return changeColor(hsl, 15);
|
|
3482
|
+
};
|
|
3483
|
+
const darken = (hsl) => {
|
|
3484
|
+
return changeColor(hsl, -15);
|
|
3485
|
+
};
|
|
3486
|
+
const changeColor = (hsl, lightness) => {
|
|
3487
|
+
return hsl.replace(/\s(\d+)(%?)\//, (_, p1, p2) => {
|
|
3488
|
+
return ` ${Math.min(Math.max(Number.parseInt(p1, 10) + lightness, 0), 100)}${p2}/`;
|
|
3489
|
+
});
|
|
3490
|
+
};
|
|
3414
3491
|
|
|
3415
|
-
const
|
|
3492
|
+
const parseJSON = (prop) => {
|
|
3493
|
+
if (typeof prop === 'string') {
|
|
3494
|
+
try {
|
|
3495
|
+
// prop is potentially JSON parsable string, e.g. "{ base: 'block', l: 'inline' }" or "true" or "false"
|
|
3496
|
+
return JSON.parse(prop
|
|
3497
|
+
.replace(/'/g, '"') // convert single quotes to double quotes
|
|
3498
|
+
.replace(/[\s"]?([a-z]+)[\s"]?:([^//])/g, '"$1":$2') // wrap keys in double quotes if they don't have them but ignore potential urls
|
|
3499
|
+
);
|
|
3500
|
+
}
|
|
3501
|
+
catch {
|
|
3502
|
+
// prop is string, e.g. "block" or "inline"
|
|
3503
|
+
return prop;
|
|
3504
|
+
}
|
|
3505
|
+
}
|
|
3506
|
+
else {
|
|
3507
|
+
// prop is object, e.g. { base: 'block', l: 'inline' } or number, e.g. 123 or boolean, e.g. true
|
|
3508
|
+
return prop;
|
|
3509
|
+
}
|
|
3510
|
+
};
|
|
3416
3511
|
|
|
3417
|
-
|
|
3512
|
+
// NOTE: handpicked selection of plugins from jss-preset-default
|
|
3513
|
+
const jss = createJss({
|
|
3514
|
+
plugins: [
|
|
3515
|
+
jssGlobal(),
|
|
3516
|
+
jssNested(),
|
|
3517
|
+
camelCase(),
|
|
3518
|
+
jssPluginSortMediaQueries({ combineMediaQueries: true }),
|
|
3519
|
+
],
|
|
3520
|
+
});
|
|
3521
|
+
const getCss = (jssStyles) => jss
|
|
3522
|
+
.createStyleSheet(jssStyles, {
|
|
3523
|
+
generateId: (rule) => rule.key,
|
|
3524
|
+
})
|
|
3525
|
+
.toString();
|
|
3526
|
+
const supportsConstructableStylesheets = () => {
|
|
3527
|
+
try {
|
|
3528
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
3529
|
+
}
|
|
3530
|
+
catch {
|
|
3531
|
+
return false;
|
|
3532
|
+
}
|
|
3533
|
+
};
|
|
3534
|
+
// determine it once
|
|
3535
|
+
supportsConstructableStylesheets();
|
|
3536
|
+
const buildResponsiveStyles = (rawValue, getJssStyle) => {
|
|
3537
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
3538
|
+
const value = parseJSON(rawValue);
|
|
3539
|
+
return typeof value === 'object'
|
|
3540
|
+
? Object.keys(value)
|
|
3541
|
+
// base styles are applied on root object, responsive styles are nested within
|
|
3542
|
+
// hence it is used as the initial object within reduce function
|
|
3543
|
+
.filter((key) => key !== 'base')
|
|
3544
|
+
.reduce((result, breakpointValue) => ({
|
|
3545
|
+
...result,
|
|
3546
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
3547
|
+
[getMediaQueryMin(breakpointValue)]: getJssStyle(value[breakpointValue]),
|
|
3548
|
+
}), getJssStyle(value.base))
|
|
3549
|
+
: getJssStyle(value);
|
|
3550
|
+
};
|
|
3551
|
+
const isObject = (obj) => typeof obj === 'object' && !Array.isArray(obj);
|
|
3552
|
+
// NOTE: taken from https://stackoverflow.com/a/48218209
|
|
3553
|
+
const mergeDeep = (...objects) => {
|
|
3554
|
+
return objects.reduce((prev, obj) => {
|
|
3555
|
+
Object.keys(obj).forEach((key) => {
|
|
3556
|
+
const pVal = prev[key];
|
|
3557
|
+
const oVal = obj[key];
|
|
3558
|
+
if (isObject(pVal) && isObject(oVal)) {
|
|
3559
|
+
prev[key] = mergeDeep(pVal, oVal);
|
|
3560
|
+
}
|
|
3561
|
+
else {
|
|
3562
|
+
prev[key] = oVal;
|
|
3563
|
+
}
|
|
3564
|
+
});
|
|
3565
|
+
return prev;
|
|
3566
|
+
}, {});
|
|
3567
|
+
};
|
|
3418
3568
|
|
|
3419
|
-
|
|
3569
|
+
// TODO: Use function from ./jss (Causes bundling issues)
|
|
3570
|
+
(() => {
|
|
3571
|
+
try {
|
|
3572
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
3573
|
+
}
|
|
3574
|
+
catch {
|
|
3575
|
+
return false;
|
|
3576
|
+
}
|
|
3577
|
+
})(); // determine it once
|
|
3420
3578
|
|
|
3421
|
-
const
|
|
3579
|
+
const attributeMutationMap = new Map();
|
|
3580
|
+
hasWindow &&
|
|
3581
|
+
new MutationObserver((mutations) => {
|
|
3582
|
+
for (const mutation of mutations
|
|
3583
|
+
// reduce array to only entries that have really a changed value
|
|
3584
|
+
.filter((mutation) => mutation.oldValue !== mutation.target.getAttribute(mutation.attributeName))
|
|
3585
|
+
// remove duplicates so we execute callback only once per node
|
|
3586
|
+
.filter((mutation, idx, arr) => arr.findIndex((m) => m.target === mutation.target) === idx)) {
|
|
3587
|
+
attributeMutationMap.get(mutation.target)?.();
|
|
3588
|
+
}
|
|
3589
|
+
});
|
|
3422
3590
|
|
|
3423
|
-
const
|
|
3591
|
+
const mediaQueries = Object.values(breakpoint).map((v) => `(min-width:${v}px)`);
|
|
3592
|
+
hasWindow && window.matchMedia ? mediaQueries.map(window.matchMedia) : [];
|
|
3424
3593
|
|
|
3425
|
-
|
|
3594
|
+
Object.entries(breakpoint).reduce((result, [key, val]) => ({ ...result, [`${val}px`]: key }), {});
|
|
3426
3595
|
|
|
3427
|
-
const
|
|
3596
|
+
const hasVisibleIcon = (iconName, iconSource) => {
|
|
3597
|
+
return iconName !== 'none' || !!iconSource;
|
|
3598
|
+
};
|
|
3428
3599
|
|
|
3429
|
-
|
|
3430
|
-
|
|
3600
|
+
/**
|
|
3601
|
+
* Map of observed nodes and their corresponding callback functions.
|
|
3602
|
+
*/
|
|
3603
|
+
const observedNodesMap = new Map();
|
|
3604
|
+
/**
|
|
3605
|
+
* Mutation observer for observing changes in the children of observed nodes.
|
|
3606
|
+
*/
|
|
3607
|
+
hasWindow &&
|
|
3608
|
+
new MutationObserver((mutations) => {
|
|
3609
|
+
// there may be race conditions in jsdom-polyfill tests where the map is already empty when a mutation happens
|
|
3610
|
+
if (observedNodesMap.size > 0) {
|
|
3611
|
+
const observedNodes = Array.from(observedNodesMap.keys());
|
|
3612
|
+
// remove duplicates so we execute callback only once per node
|
|
3613
|
+
for (const mutation of mutations.filter((mutation, idx, arr) => arr.findIndex((m) => m.target === mutation.target) === idx)) {
|
|
3614
|
+
for (const node of observedNodes.filter((node) => node.contains(mutation.target))) {
|
|
3615
|
+
observedNodesMap.get(node)?.();
|
|
3616
|
+
}
|
|
3617
|
+
}
|
|
3618
|
+
}
|
|
3619
|
+
});
|
|
3431
3620
|
|
|
3432
|
-
const
|
|
3433
|
-
font: `${_displayFontPartA}${fontSizeDisplayMedium}${_displayFontPartB}`,
|
|
3434
|
-
};
|
|
3621
|
+
const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
|
|
3435
3622
|
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
};
|
|
3623
|
+
// index.ts
|
|
3624
|
+
var MODEL_SIGNATURES_MANIFEST = { "718": { "src": "718.493a9e3.svg", "width": 79, "height": 26 }, "911": { "src": "911.b68f913.svg", "width": 94, "height": 25 }, "boxster": { "src": "boxster.c321738.svg", "width": 239, "height": 26 }, "cayenne": { "src": "cayenne.2556201.svg", "width": 245, "height": 35 }, "cayman": { "src": "cayman.cc89196.svg", "width": 229, "height": 35 }, "gt3-rs": { "src": "gt3-rs.03ac3ee.svg", "width": 238, "height": 25 }, "gt3": { "src": "gt3.bd3186c.svg", "width": 151, "height": 25 }, "gts": { "src": "gts.99bd35e.svg", "width": 121, "height": 25 }, "macan": { "src": "macan.a1844f4.svg", "width": 196, "height": 26 }, "panamera": { "src": "panamera.6dae809.svg", "width": 260, "height": 25 }, "taycan": { "src": "taycan.df444c6.svg", "width": 167, "height": 36 }, "turbo-s": { "src": "turbo-s.73f1e10.svg", "width": 199, "height": 25 }, "turbo": { "src": "turbo.6a4084a.svg", "width": 143, "height": 25 } };
|
|
3439
3625
|
|
|
3440
|
-
const
|
|
3441
|
-
const _headingFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
3626
|
+
const hasDocument = typeof document !== 'undefined';
|
|
3442
3627
|
|
|
3443
|
-
const
|
|
3444
|
-
|
|
3445
|
-
|
|
3628
|
+
const hasShowPickerSupport = () => (hasDocument &&
|
|
3629
|
+
'showPicker' in HTMLInputElement.prototype &&
|
|
3630
|
+
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3446
3631
|
|
|
3447
|
-
const
|
|
3448
|
-
|
|
3632
|
+
const prefix = `[Porsche Design System v${"3.31.0-rc.0"}]` // this part isn't covered by unit tests
|
|
3633
|
+
;
|
|
3634
|
+
const consoleError = (...messages) => {
|
|
3635
|
+
console.error(prefix, ...messages); // eslint-disable-line no-console
|
|
3449
3636
|
};
|
|
3450
3637
|
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3638
|
+
/**
|
|
3639
|
+
* Applies a style only on Chromium based browsers by using a media query which is only supported there.
|
|
3640
|
+
* https://browserstack.com/guide/create-browser-specific-css
|
|
3641
|
+
*
|
|
3642
|
+
* @param {JssStyle} style - The style to be applied when the Chromium media query is supported.
|
|
3643
|
+
* @returns {JssStyle} - The Chromium media query containing the style.
|
|
3644
|
+
*/
|
|
3645
|
+
const supportsChromiumMediaQuery = (style) => ({
|
|
3646
|
+
'@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm)': style,
|
|
3647
|
+
});
|
|
3454
3648
|
|
|
3455
|
-
const
|
|
3456
|
-
|
|
3649
|
+
const isThemeAuto = (theme) => {
|
|
3650
|
+
return theme === 'auto';
|
|
3457
3651
|
};
|
|
3458
3652
|
|
|
3459
|
-
const
|
|
3460
|
-
|
|
3653
|
+
const isThemeDark = (theme) => {
|
|
3654
|
+
return theme === 'dark';
|
|
3461
3655
|
};
|
|
3462
3656
|
|
|
3463
|
-
const
|
|
3464
|
-
const _textFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
3657
|
+
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
3465
3658
|
|
|
3466
|
-
const
|
|
3467
|
-
|
|
3468
|
-
...fontHyphenationStyle,
|
|
3469
|
-
};
|
|
3659
|
+
const headerSlot = 'header';
|
|
3660
|
+
const anchorSlot = 'anchor';
|
|
3470
3661
|
|
|
3471
|
-
const
|
|
3472
|
-
|
|
3473
|
-
|
|
3662
|
+
const formatObjectOutput = (value) => {
|
|
3663
|
+
return JSON.stringify(value)
|
|
3664
|
+
.replace(/"([a-zA-Z?]+)":/g, '$1:') // remove double quotes from keys
|
|
3665
|
+
.replace(/([,:{])/g, '$1 ') // add space after following: ,:{
|
|
3666
|
+
.replace(/(})/g, ' $1') // add space before following: }
|
|
3667
|
+
.replace(/^"(.+)"$/, '$1'); // remove wrapping double quotes
|
|
3474
3668
|
};
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3669
|
+
const formatArrayOutput = (value) => {
|
|
3670
|
+
return (
|
|
3671
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
3672
|
+
JSON.stringify(value.map((x) => (x === undefined ? `${x}` : x))) // wrap undefined in quotes to not convert it to null
|
|
3673
|
+
.replace(/'/g, '') // remove single quotes
|
|
3674
|
+
// eslint-disable-next-line @typescript-eslint/quotes
|
|
3675
|
+
.replace(/"/g, "'") // replace double quotes with single quotes
|
|
3676
|
+
.replace(/'(undefined)'/, '$1') // remove quotes around undefined
|
|
3677
|
+
.replace(/,/g, ', ') // add space after comma
|
|
3678
|
+
);
|
|
3679
|
+
};
|
|
3680
|
+
const printErrorMessage = ({ propName, propValue, // TODO: might be nicer if this is always a string
|
|
3681
|
+
propType, componentName, }) => {
|
|
3682
|
+
consoleError(`Invalid property '${propName}' with value '${internalValidateProps.formatObjectOutput(propValue)}' supplied to ${componentName}, expected one of: ${propType}`);
|
|
3683
|
+
};
|
|
3684
|
+
const isValueNotOfType = (propValue, propType) => {
|
|
3685
|
+
return propValue !== undefined && typeof propValue !== propType;
|
|
3686
|
+
};
|
|
3687
|
+
const validateValueOfType = (propName, propValue, propType) => {
|
|
3688
|
+
if (internalValidateProps.isValueNotOfType(propValue, propType)) {
|
|
3689
|
+
return { propName, propValue, propType };
|
|
3690
|
+
}
|
|
3691
|
+
return undefined;
|
|
3479
3692
|
};
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3693
|
+
const getBreakpointCustomizableStructure = (allowedValues) => {
|
|
3694
|
+
return breakpointCustomizableTemplate.replace(/value/g, allowedValues !== 'boolean' && allowedValues !== 'number'
|
|
3695
|
+
? internalValidateProps
|
|
3696
|
+
.formatArrayOutput(allowedValues)
|
|
3697
|
+
.replace(/\[/g, '(') // starting inline type literal array
|
|
3698
|
+
.replace(/]/g, ')[]') // ending inline type literal array
|
|
3699
|
+
.replace(/,/g, ' |') // replace commas with a pipe
|
|
3700
|
+
: allowedValues);
|
|
3701
|
+
};
|
|
3702
|
+
const getAriaStructure = (allowedAriaAttributes) => {
|
|
3703
|
+
return (internalValidateProps
|
|
3704
|
+
.formatObjectOutput(allowedAriaAttributes.reduce((prev, key) => ({
|
|
3705
|
+
...prev,
|
|
3706
|
+
[key]: 'value',
|
|
3707
|
+
}), {}))
|
|
3708
|
+
.replace(/":/g, '"?:') // add optional modifier on keys before colon
|
|
3709
|
+
// eslint-disable-next-line @typescript-eslint/quotes
|
|
3710
|
+
.replace(/"/g, "'") // replace double quotes with single quotes
|
|
3711
|
+
);
|
|
3712
|
+
};
|
|
3713
|
+
const getShapeStructure = (shapeStructure) => {
|
|
3714
|
+
return internalValidateProps
|
|
3715
|
+
.formatObjectOutput(Object.keys(shapeStructure).reduce((prev, key) => ({ ...prev, [key]: shapeStructure[key].name }), {}))
|
|
3716
|
+
.replace(/"/g, ''); // remove double quotes
|
|
3717
|
+
};
|
|
3718
|
+
const isBreakpointCustomizableValueInvalid = (value, allowedValues) => {
|
|
3719
|
+
return allowedValues === 'boolean' || allowedValues === 'number'
|
|
3720
|
+
? internalValidateProps.isValueNotOfType(value, allowedValues)
|
|
3721
|
+
: !allowedValues.includes(value);
|
|
3484
3722
|
};
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3723
|
+
/**
|
|
3724
|
+
* Validates an array using a provided validator function and returns the first encountered validation error.
|
|
3725
|
+
*
|
|
3726
|
+
* @param {string} propName - The name of the property being validated.
|
|
3727
|
+
* @param {any} arr - The input to be validated.
|
|
3728
|
+
* @param {ValidatorFunction} validator - The validator function that checks each array item.
|
|
3729
|
+
* @returns {ValidationError | undefined} The first encountered validation error object, or undefined if the array is valid.
|
|
3730
|
+
*/
|
|
3731
|
+
const isValidArray = (propName, arr, validator) => {
|
|
3732
|
+
const validationError = Array.isArray(arr)
|
|
3733
|
+
? validator(propName, arr.find((item) => validator(propName, item)))
|
|
3734
|
+
: {
|
|
3735
|
+
propName,
|
|
3736
|
+
propValue: arr,
|
|
3737
|
+
propType: validator(propName, null).propType, // Get propType by passing in null which will always result in error
|
|
3738
|
+
};
|
|
3739
|
+
if (validationError) {
|
|
3740
|
+
return { ...validationError, propType: `${validationError.propType}[]` };
|
|
3741
|
+
}
|
|
3742
|
+
return undefined;
|
|
3489
3743
|
};
|
|
3744
|
+
const internalValidateProps = {
|
|
3745
|
+
isValueNotOfType,
|
|
3746
|
+
formatArrayOutput,
|
|
3747
|
+
formatObjectOutput,
|
|
3748
|
+
printErrorMessage,
|
|
3749
|
+
validateValueOfType,
|
|
3750
|
+
isValidArray,
|
|
3751
|
+
isBreakpointCustomizableValueInvalid,
|
|
3752
|
+
getBreakpointCustomizableStructure,
|
|
3753
|
+
getAriaStructure,
|
|
3754
|
+
getShapeStructure,
|
|
3755
|
+
};
|
|
3756
|
+
const breakpointCustomizableTemplate = `value, ${internalValidateProps
|
|
3757
|
+
.formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {}))
|
|
3758
|
+
.replace(/"/g, '')}`;
|
|
3759
|
+
|
|
3760
|
+
const OPTION_LIST_SAFE_ZONE = 6;
|
|
3490
3761
|
|
|
3491
3762
|
/* Auto Generated Start */
|
|
3492
3763
|
const themeLight = {
|
|
@@ -3750,181 +4021,10 @@ const forcedColorsMediaQuery = (style) => {
|
|
|
3750
4021
|
return { '@media (forced-colors: active)': style };
|
|
3751
4022
|
};
|
|
3752
4023
|
|
|
3753
|
-
|
|
3754
|
-
if (typeof prop === 'string') {
|
|
3755
|
-
try {
|
|
3756
|
-
// prop is potentially JSON parsable string, e.g. "{ base: 'block', l: 'inline' }" or "true" or "false"
|
|
3757
|
-
return JSON.parse(prop
|
|
3758
|
-
.replace(/'/g, '"') // convert single quotes to double quotes
|
|
3759
|
-
.replace(/[\s"]?([a-z]+)[\s"]?:([^//])/g, '"$1":$2') // wrap keys in double quotes if they don't have them but ignore potential urls
|
|
3760
|
-
);
|
|
3761
|
-
}
|
|
3762
|
-
catch {
|
|
3763
|
-
// prop is string, e.g. "block" or "inline"
|
|
3764
|
-
return prop;
|
|
3765
|
-
}
|
|
3766
|
-
}
|
|
3767
|
-
else {
|
|
3768
|
-
// prop is object, e.g. { base: 'block', l: 'inline' } or number, e.g. 123 or boolean, e.g. true
|
|
3769
|
-
return prop;
|
|
3770
|
-
}
|
|
3771
|
-
};
|
|
3772
|
-
|
|
3773
|
-
// NOTE: handpicked selection of plugins from jss-preset-default
|
|
3774
|
-
const jss = createJss({
|
|
3775
|
-
plugins: [
|
|
3776
|
-
jssGlobal(),
|
|
3777
|
-
jssNested(),
|
|
3778
|
-
camelCase(),
|
|
3779
|
-
jssPluginSortMediaQueries({ combineMediaQueries: true }),
|
|
3780
|
-
],
|
|
3781
|
-
});
|
|
3782
|
-
const getCss = (jssStyles) => jss
|
|
3783
|
-
.createStyleSheet(jssStyles, {
|
|
3784
|
-
generateId: (rule) => rule.key,
|
|
3785
|
-
})
|
|
3786
|
-
.toString();
|
|
3787
|
-
const supportsConstructableStylesheets = () => {
|
|
3788
|
-
try {
|
|
3789
|
-
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
3790
|
-
}
|
|
3791
|
-
catch {
|
|
3792
|
-
return false;
|
|
3793
|
-
}
|
|
3794
|
-
};
|
|
3795
|
-
// determine it once
|
|
3796
|
-
supportsConstructableStylesheets();
|
|
3797
|
-
const buildResponsiveStyles = (rawValue, getJssStyle) => {
|
|
3798
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
3799
|
-
const value = parseJSON(rawValue);
|
|
3800
|
-
return typeof value === 'object'
|
|
3801
|
-
? Object.keys(value)
|
|
3802
|
-
// base styles are applied on root object, responsive styles are nested within
|
|
3803
|
-
// hence it is used as the initial object within reduce function
|
|
3804
|
-
.filter((key) => key !== 'base')
|
|
3805
|
-
.reduce((result, breakpointValue) => ({
|
|
3806
|
-
...result,
|
|
3807
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
3808
|
-
[getMediaQueryMin(breakpointValue)]: getJssStyle(value[breakpointValue]),
|
|
3809
|
-
}), getJssStyle(value.base))
|
|
3810
|
-
: getJssStyle(value);
|
|
3811
|
-
};
|
|
3812
|
-
const isObject = (obj) => typeof obj === 'object' && !Array.isArray(obj);
|
|
3813
|
-
// NOTE: taken from https://stackoverflow.com/a/48218209
|
|
3814
|
-
const mergeDeep = (...objects) => {
|
|
3815
|
-
return objects.reduce((prev, obj) => {
|
|
3816
|
-
Object.keys(obj).forEach((key) => {
|
|
3817
|
-
const pVal = prev[key];
|
|
3818
|
-
const oVal = obj[key];
|
|
3819
|
-
if (isObject(pVal) && isObject(oVal)) {
|
|
3820
|
-
prev[key] = mergeDeep(pVal, oVal);
|
|
3821
|
-
}
|
|
3822
|
-
else {
|
|
3823
|
-
prev[key] = oVal;
|
|
3824
|
-
}
|
|
3825
|
-
});
|
|
3826
|
-
return prev;
|
|
3827
|
-
}, {});
|
|
3828
|
-
};
|
|
3829
|
-
|
|
3830
|
-
// TODO: Use function from ./jss (Causes bundling issues)
|
|
3831
|
-
(() => {
|
|
3832
|
-
try {
|
|
3833
|
-
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
3834
|
-
}
|
|
3835
|
-
catch {
|
|
3836
|
-
return false;
|
|
3837
|
-
}
|
|
3838
|
-
})(); // determine it once
|
|
3839
|
-
|
|
3840
|
-
const attributeMutationMap = new Map();
|
|
3841
|
-
hasWindow &&
|
|
3842
|
-
new MutationObserver((mutations) => {
|
|
3843
|
-
for (const mutation of mutations
|
|
3844
|
-
// reduce array to only entries that have really a changed value
|
|
3845
|
-
.filter((mutation) => mutation.oldValue !== mutation.target.getAttribute(mutation.attributeName))
|
|
3846
|
-
// remove duplicates so we execute callback only once per node
|
|
3847
|
-
.filter((mutation, idx, arr) => arr.findIndex((m) => m.target === mutation.target) === idx)) {
|
|
3848
|
-
attributeMutationMap.get(mutation.target)?.();
|
|
3849
|
-
}
|
|
3850
|
-
});
|
|
3851
|
-
|
|
3852
|
-
const mediaQueries = Object.values(breakpoint).map((v) => `(min-width:${v}px)`);
|
|
3853
|
-
hasWindow && window.matchMedia ? mediaQueries.map(window.matchMedia) : [];
|
|
3854
|
-
|
|
3855
|
-
Object.entries(breakpoint).reduce((result, [key, val]) => ({ ...result, [`${val}px`]: key }), {});
|
|
3856
|
-
|
|
3857
|
-
const hasVisibleIcon = (iconName, iconSource) => {
|
|
3858
|
-
return iconName !== 'none' || !!iconSource;
|
|
3859
|
-
};
|
|
3860
|
-
|
|
3861
|
-
/**
|
|
3862
|
-
* Map of observed nodes and their corresponding callback functions.
|
|
3863
|
-
*/
|
|
3864
|
-
const observedNodesMap = new Map();
|
|
3865
|
-
/**
|
|
3866
|
-
* Mutation observer for observing changes in the children of observed nodes.
|
|
3867
|
-
*/
|
|
3868
|
-
hasWindow &&
|
|
3869
|
-
new MutationObserver((mutations) => {
|
|
3870
|
-
// there may be race conditions in jsdom-polyfill tests where the map is already empty when a mutation happens
|
|
3871
|
-
if (observedNodesMap.size > 0) {
|
|
3872
|
-
const observedNodes = Array.from(observedNodesMap.keys());
|
|
3873
|
-
// remove duplicates so we execute callback only once per node
|
|
3874
|
-
for (const mutation of mutations.filter((mutation, idx, arr) => arr.findIndex((m) => m.target === mutation.target) === idx)) {
|
|
3875
|
-
for (const node of observedNodes.filter((node) => node.contains(mutation.target))) {
|
|
3876
|
-
observedNodesMap.get(node)?.();
|
|
3877
|
-
}
|
|
3878
|
-
}
|
|
3879
|
-
}
|
|
3880
|
-
});
|
|
3881
|
-
|
|
3882
|
-
const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
|
|
3883
|
-
|
|
3884
|
-
// index.ts
|
|
3885
|
-
var MODEL_SIGNATURES_MANIFEST = { "718": { "src": "718.493a9e3.svg", "width": 79, "height": 26 }, "911": { "src": "911.b68f913.svg", "width": 94, "height": 25 }, "boxster": { "src": "boxster.c321738.svg", "width": 239, "height": 26 }, "cayenne": { "src": "cayenne.2556201.svg", "width": 245, "height": 35 }, "cayman": { "src": "cayman.cc89196.svg", "width": 229, "height": 35 }, "gt3-rs": { "src": "gt3-rs.03ac3ee.svg", "width": 238, "height": 25 }, "gt3": { "src": "gt3.bd3186c.svg", "width": 151, "height": 25 }, "gts": { "src": "gts.99bd35e.svg", "width": 121, "height": 25 }, "macan": { "src": "macan.a1844f4.svg", "width": 196, "height": 26 }, "panamera": { "src": "panamera.6dae809.svg", "width": 260, "height": 25 }, "taycan": { "src": "taycan.df444c6.svg", "width": 167, "height": 36 }, "turbo-s": { "src": "turbo-s.73f1e10.svg", "width": 199, "height": 25 }, "turbo": { "src": "turbo.6a4084a.svg", "width": 143, "height": 25 } };
|
|
3886
|
-
|
|
3887
|
-
const hasDocument = typeof document !== 'undefined';
|
|
3888
|
-
|
|
3889
|
-
const hasShowPickerSupport = () => (hasDocument &&
|
|
3890
|
-
'showPicker' in HTMLInputElement.prototype &&
|
|
3891
|
-
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3892
|
-
|
|
4024
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
3893
4025
|
/**
|
|
3894
|
-
*
|
|
3895
|
-
* https://browserstack.com/guide/create-browser-specific-css
|
|
3896
|
-
*
|
|
3897
|
-
* @param {JssStyle} style - The style to be applied when the Chromium media query is supported.
|
|
3898
|
-
* @returns {JssStyle} - The Chromium media query containing the style.
|
|
4026
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
3899
4027
|
*/
|
|
3900
|
-
const supportsChromiumMediaQuery = (style) => ({
|
|
3901
|
-
'@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm)': style,
|
|
3902
|
-
});
|
|
3903
|
-
|
|
3904
|
-
const isThemeAuto = (theme) => {
|
|
3905
|
-
return theme === 'auto';
|
|
3906
|
-
};
|
|
3907
|
-
|
|
3908
|
-
const isThemeDark = (theme) => {
|
|
3909
|
-
return theme === 'dark';
|
|
3910
|
-
};
|
|
3911
|
-
|
|
3912
|
-
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
3913
|
-
|
|
3914
|
-
const headerSlot = 'header';
|
|
3915
|
-
const anchorSlot = 'anchor';
|
|
3916
|
-
|
|
3917
|
-
const formatObjectOutput = (value) => {
|
|
3918
|
-
return JSON.stringify(value)
|
|
3919
|
-
.replace(/"([a-zA-Z?]+)":/g, '$1:') // remove double quotes from keys
|
|
3920
|
-
.replace(/([,:{])/g, '$1 ') // add space after following: ,:{
|
|
3921
|
-
.replace(/(})/g, ' $1') // add space before following: }
|
|
3922
|
-
.replace(/^"(.+)"$/, '$1'); // remove wrapping double quotes
|
|
3923
|
-
};
|
|
3924
|
-
`value, ${formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {})).replace(/"/g, '')}`;
|
|
3925
|
-
|
|
3926
|
-
const OPTION_LIST_SAFE_ZONE = 6;
|
|
3927
|
-
|
|
3928
4028
|
const getComponentCss$1n = (size, compact, open, theme, sticky) => {
|
|
3929
4029
|
const { primaryColor, hoverColor, contrastLowColor, backgroundColor } = getThemedColors(theme);
|
|
3930
4030
|
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastLowColor: contrastLowColorDark, backgroundColor: backgroundColorDark, } = getThemedColors('dark');
|
|
@@ -4322,6 +4422,10 @@ const getFunctionalComponentLoadingMessageStyles = () => {
|
|
|
4322
4422
|
};
|
|
4323
4423
|
};
|
|
4324
4424
|
|
|
4425
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
4426
|
+
/**
|
|
4427
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
4428
|
+
*/
|
|
4325
4429
|
const getComponentCss$1k = (icon, iconSource, active, isLoading, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, underline, theme) => {
|
|
4326
4430
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4327
4431
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, underline, false, theme), {
|
|
@@ -4360,6 +4464,10 @@ const getFontWeight = (weight) => {
|
|
|
4360
4464
|
return fontWeightMap[weight];
|
|
4361
4465
|
};
|
|
4362
4466
|
|
|
4467
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
4468
|
+
/**
|
|
4469
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
4470
|
+
*/
|
|
4363
4471
|
const getComponentCss$1j = (isDisabledOrLoading, aspectRatio, size, weight, background, align, compact, hasGradient, hasFooterSlot, isDisabled) => {
|
|
4364
4472
|
const isTopAligned = align === 'top';
|
|
4365
4473
|
return getCss({
|
|
@@ -4649,6 +4757,10 @@ const getDisabledColors = (variant, loading, theme) => {
|
|
|
4649
4757
|
};
|
|
4650
4758
|
return colors[variant === 'tertiary' ? 'secondary' : variant];
|
|
4651
4759
|
};
|
|
4760
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
4761
|
+
/**
|
|
4762
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
4763
|
+
*/
|
|
4652
4764
|
const getComponentCss$1i = (icon, iconSource, variant, hideLabel, disabled, loading, compact, theme) => {
|
|
4653
4765
|
const disabledOrLoading = isDisabledOrLoading(disabled, loading);
|
|
4654
4766
|
const { textColor, borderColor, backgroundColor } = getDisabledColors(variant, loading, theme);
|
|
@@ -5104,6 +5216,10 @@ const getGradient = (theme, gradientColorTheme) => {
|
|
|
5104
5216
|
`rgba(${gradientColor},0.3) 68%,` +
|
|
5105
5217
|
`rgba(${gradientColor},0)`);
|
|
5106
5218
|
};
|
|
5219
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
5220
|
+
/**
|
|
5221
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
5222
|
+
*/
|
|
5107
5223
|
const getComponentCss$1g = (gradientColor, hasHeading, hasDescription, hasControlsSlot, headingSize, width, hasPagination, isInfinitePagination, alignHeader, theme, hasNavigation, alignControls) => {
|
|
5108
5224
|
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
5109
5225
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
@@ -5562,6 +5678,10 @@ const getCheckedSVGBackgroundImage$3 = (fill) => {
|
|
|
5562
5678
|
const getIndeterminateSVGBackgroundImage$1 = (fill) => {
|
|
5563
5679
|
return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20,11v2H4v-2h16Z"/>`);
|
|
5564
5680
|
};
|
|
5681
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
5682
|
+
/**
|
|
5683
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
5684
|
+
*/
|
|
5565
5685
|
const getComponentCss$1f = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
5566
5686
|
const checkedIconColor = escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
|
|
5567
5687
|
const checkedIconColorDark = escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
@@ -5764,6 +5884,10 @@ const getCheckboxCheckedBaseStyles = (theme, isDisabled, isLoading, state) => {
|
|
|
5764
5884
|
const getIndeterminateSVGBackgroundImage = (fill) => {
|
|
5765
5885
|
return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20,11v2H4v-2h16Z"/>`);
|
|
5766
5886
|
};
|
|
5887
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
5888
|
+
/**
|
|
5889
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
5890
|
+
*/
|
|
5767
5891
|
const getComponentCss$1e = (hideLabel, state, isDisabled, isLoading, compact, theme) => {
|
|
5768
5892
|
const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
5769
5893
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
@@ -7944,6 +8068,10 @@ const getHeadingJssStyle = (theme) => ({
|
|
|
7944
8068
|
...headingSmallStyle,
|
|
7945
8069
|
...getTextJssStyle(theme),
|
|
7946
8070
|
});
|
|
8071
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8072
|
+
/**
|
|
8073
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8074
|
+
*/
|
|
7947
8075
|
const getComponentCss$X = (state, hasAction, hasClose, theme) => {
|
|
7948
8076
|
return getCss({
|
|
7949
8077
|
'@global': {
|
|
@@ -7991,6 +8119,10 @@ const getComponentCss$X = (state, hasAction, hasClose, theme) => {
|
|
|
7991
8119
|
/**
|
|
7992
8120
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
7993
8121
|
*/
|
|
8122
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8123
|
+
/**
|
|
8124
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8125
|
+
*/
|
|
7994
8126
|
const getComponentCss$W = (disabled, loading, hideLabel, state, compact, readOnly, theme) => {
|
|
7995
8127
|
return getCss({
|
|
7996
8128
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
@@ -8014,6 +8146,10 @@ const getComponentCss$W = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8014
8146
|
/**
|
|
8015
8147
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
8016
8148
|
*/
|
|
8149
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8150
|
+
/**
|
|
8151
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8152
|
+
*/
|
|
8017
8153
|
const getComponentCss$V = (disabled, loading, hideLabel, state, compact, readOnly, theme) => {
|
|
8018
8154
|
return getCss({
|
|
8019
8155
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
@@ -8034,6 +8170,10 @@ const getComponentCss$V = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8034
8170
|
/**
|
|
8035
8171
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
8036
8172
|
*/
|
|
8173
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8174
|
+
/**
|
|
8175
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8176
|
+
*/
|
|
8037
8177
|
const getComponentCss$U = (disabled, loading, hideLabel, state, compact, readOnly, theme, controls) => {
|
|
8038
8178
|
return getCss({
|
|
8039
8179
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
@@ -8059,6 +8199,10 @@ const getComponentCss$U = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8059
8199
|
/**
|
|
8060
8200
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
8061
8201
|
*/
|
|
8202
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8203
|
+
/**
|
|
8204
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8205
|
+
*/
|
|
8062
8206
|
const getComponentCss$T = (disabled, loading, hideLabel, state, toggle, compact, readOnly, theme) => {
|
|
8063
8207
|
return getCss({
|
|
8064
8208
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
@@ -8082,6 +8226,10 @@ const getComponentCss$T = (disabled, loading, hideLabel, state, toggle, compact,
|
|
|
8082
8226
|
/**
|
|
8083
8227
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
8084
8228
|
*/
|
|
8229
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8230
|
+
/**
|
|
8231
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8232
|
+
*/
|
|
8085
8233
|
const getComponentCss$S = (disabled, loading, hideLabel, state, compact, readOnly, theme, clear) => {
|
|
8086
8234
|
return getCss({
|
|
8087
8235
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
@@ -8106,6 +8254,10 @@ const getComponentCss$S = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8106
8254
|
/**
|
|
8107
8255
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
8108
8256
|
*/
|
|
8257
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8258
|
+
/**
|
|
8259
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8260
|
+
*/
|
|
8109
8261
|
const getComponentCss$R = (disabled, loading, hideLabel, state, compact, readOnly, theme) => {
|
|
8110
8262
|
return getCss({
|
|
8111
8263
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
@@ -8126,6 +8278,10 @@ const getComponentCss$R = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8126
8278
|
/**
|
|
8127
8279
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
8128
8280
|
*/
|
|
8281
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8282
|
+
/**
|
|
8283
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8284
|
+
*/
|
|
8129
8285
|
const getComponentCss$Q = (disabled, loading, hideLabel, state, compact, readOnly, theme, counter) => {
|
|
8130
8286
|
return getCss({
|
|
8131
8287
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
@@ -8152,6 +8308,10 @@ const getComponentCss$Q = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8152
8308
|
/**
|
|
8153
8309
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
8154
8310
|
*/
|
|
8311
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8312
|
+
/**
|
|
8313
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8314
|
+
*/
|
|
8155
8315
|
const getComponentCss$P = (disabled, loading, hideLabel, state, compact, readOnly, theme) => {
|
|
8156
8316
|
return getCss({
|
|
8157
8317
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
@@ -8175,6 +8335,10 @@ const getComponentCss$P = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8175
8335
|
/**
|
|
8176
8336
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
8177
8337
|
*/
|
|
8338
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8339
|
+
/**
|
|
8340
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8341
|
+
*/
|
|
8178
8342
|
const getComponentCss$O = (disabled, loading, hideLabel, state, compact, readOnly, theme) => {
|
|
8179
8343
|
return getCss({
|
|
8180
8344
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
@@ -8188,6 +8352,10 @@ const getComponentCss$O = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8188
8352
|
});
|
|
8189
8353
|
};
|
|
8190
8354
|
|
|
8355
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8356
|
+
/**
|
|
8357
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8358
|
+
*/
|
|
8191
8359
|
const getComponentCss$N = (icon, iconSource, active, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor, theme) => {
|
|
8192
8360
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor, theme), hasSlottedAnchor && {
|
|
8193
8361
|
'@global': addImportantToEachRule({
|
|
@@ -8217,6 +8385,10 @@ const getComponentCss$N = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
8217
8385
|
};
|
|
8218
8386
|
|
|
8219
8387
|
const cssVariableInternalLinkScaling = '--p-internal-link-scaling';
|
|
8388
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8389
|
+
/**
|
|
8390
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8391
|
+
*/
|
|
8220
8392
|
const getComponentCss$M = (icon, iconSource, variant, hideLabel, hasSlottedAnchor, compact, theme) => {
|
|
8221
8393
|
const { linkColor } = getHighContrastColors();
|
|
8222
8394
|
const isPrimary = variant === 'primary';
|
|
@@ -8259,6 +8431,10 @@ const getComponentCss$M = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
8259
8431
|
}));
|
|
8260
8432
|
};
|
|
8261
8433
|
|
|
8434
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8435
|
+
/**
|
|
8436
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8437
|
+
*/
|
|
8262
8438
|
const getComponentCss$L = (aspectRatio, weight, // to get deprecated semibold typed
|
|
8263
8439
|
direction, hasDescription) => {
|
|
8264
8440
|
return getCss({
|
|
@@ -8401,6 +8577,10 @@ const getMultilineEllipsis = (lineClamp) => {
|
|
|
8401
8577
|
overflow: 'hidden',
|
|
8402
8578
|
};
|
|
8403
8579
|
};
|
|
8580
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8581
|
+
/**
|
|
8582
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8583
|
+
*/
|
|
8404
8584
|
const getComponentCss$K = (hasLikeButton, hasSlottedAnchor, hasPriceOriginal, hasDescription, aspectRatio, theme) => {
|
|
8405
8585
|
const { primaryColor, contrastHighColor, contrastMediumColor, backgroundSurfaceColor } = getThemedColors(theme);
|
|
8406
8586
|
const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, contrastMediumColor: contrastMediumColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, } = getThemedColors('dark');
|
|
@@ -8540,6 +8720,10 @@ const getComponentCss$K = (hasLikeButton, hasSlottedAnchor, hasPriceOriginal, ha
|
|
|
8540
8720
|
});
|
|
8541
8721
|
};
|
|
8542
8722
|
|
|
8723
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
8724
|
+
/**
|
|
8725
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
8726
|
+
*/
|
|
8543
8727
|
const getComponentCss$J = (aspectRatio, size, weight, // to get deprecated semibold typed
|
|
8544
8728
|
background, align, compact, hasGradient, hasFooterSlot, isDisabled) => {
|
|
8545
8729
|
const isTopAligned = align === 'top';
|
|
@@ -8934,6 +9118,10 @@ const getComponentCss$G = (model, safeZone, size, color, theme) => {
|
|
|
8934
9118
|
};
|
|
8935
9119
|
|
|
8936
9120
|
const cssVarInternalMultiSelectOptionScaling = '--p-internal-multi-select-option-scaling';
|
|
9121
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
9122
|
+
/**
|
|
9123
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
9124
|
+
*/
|
|
8937
9125
|
const getComponentCss$F = (theme, isDisabled, selected) => {
|
|
8938
9126
|
return getCss({
|
|
8939
9127
|
'@global': {
|
|
@@ -9007,6 +9195,10 @@ const getComponentCss$E = (isDisabled, theme) => {
|
|
|
9007
9195
|
};
|
|
9008
9196
|
|
|
9009
9197
|
const cssVarInternalMultiSelectScaling = '--p-internal-multi-select-scaling';
|
|
9198
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
9199
|
+
/**
|
|
9200
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
9201
|
+
*/
|
|
9010
9202
|
const getComponentCss$D = (isOpen, isDisabled, hideLabel, state, compact, theme) => {
|
|
9011
9203
|
const scalingVar = `var(${cssVarInternalMultiSelectScaling}, ${compact ? 0.5 : 1})`;
|
|
9012
9204
|
return getCss({
|
|
@@ -9195,6 +9387,10 @@ const removeStyles = (selector, styles) => Object.fromEntries(Object.entries(sty
|
|
|
9195
9387
|
|
|
9196
9388
|
const cssVarInternalPinCodeScaling = '--p-internal-pin-code-scaling';
|
|
9197
9389
|
const getScalingVar$1 = (compact) => `var(${cssVarInternalPinCodeScaling}, ${compact ? 0.5 : 1})`;
|
|
9390
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
9391
|
+
/**
|
|
9392
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
9393
|
+
*/
|
|
9198
9394
|
const getComponentCss$B = (hideLabel, state, isDisabled, isLoading, length, compact, theme) => {
|
|
9199
9395
|
const scalingVar = getScalingVar$1(compact);
|
|
9200
9396
|
const dimension = `max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px))`;
|
|
@@ -9264,6 +9460,10 @@ const getComponentCss$B = (hideLabel, state, isDisabled, isLoading, length, comp
|
|
|
9264
9460
|
const POPOVER_SAFE_ZONE = 8;
|
|
9265
9461
|
|
|
9266
9462
|
const { canvasTextColor } = getHighContrastColors();
|
|
9463
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
9464
|
+
/**
|
|
9465
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
9466
|
+
*/
|
|
9267
9467
|
const getComponentCss$A = (theme) => {
|
|
9268
9468
|
const { hoverColor, backgroundColor, primaryColor, backgroundSurfaceColor } = getThemedColors(theme);
|
|
9269
9469
|
const { hoverColor: hoverColorDark, primaryColor: primaryColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, } = getThemedColors('dark');
|
|
@@ -9371,6 +9571,10 @@ const getComponentCss$A = (theme) => {
|
|
|
9371
9571
|
const getCheckedSVGBackgroundImage$1 = (fill) => {
|
|
9372
9572
|
return getInlineSVGBackgroundImage(`<circle fill="${fill}" cx="12" cy="12" r="6"/>`);
|
|
9373
9573
|
};
|
|
9574
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
9575
|
+
/**
|
|
9576
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
9577
|
+
*/
|
|
9374
9578
|
const getComponentCss$z = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
9375
9579
|
const checkedIconColor = escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
|
|
9376
9580
|
const checkedIconColorDark = escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
@@ -9456,6 +9660,10 @@ const cssVarInternalRadioGroupOptionScaling = '--p-internal-radio-group-option-s
|
|
|
9456
9660
|
const getCheckedSVGBackgroundImage = (fill) => {
|
|
9457
9661
|
return getInlineSVGBackgroundImage(`<circle fill="${fill}" cx="12" cy="12" r="6"/>`);
|
|
9458
9662
|
};
|
|
9663
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
9664
|
+
/**
|
|
9665
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
9666
|
+
*/
|
|
9459
9667
|
const getComponentCss$y = (disabled, loading, state, theme) => {
|
|
9460
9668
|
const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
9461
9669
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
@@ -9648,6 +9856,10 @@ const groupRadioGroupDirectionJssStyles = {
|
|
|
9648
9856
|
const getRadioGroupDirectionJssStyles = (direction) => {
|
|
9649
9857
|
return groupRadioGroupDirectionJssStyles[direction];
|
|
9650
9858
|
};
|
|
9859
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
9860
|
+
/**
|
|
9861
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
9862
|
+
*/
|
|
9651
9863
|
const getComponentCss$x = (disabled, loading, hideLabel, state, compact, direction, theme) => {
|
|
9652
9864
|
const scalingVar = `var(${cssVarInternalRadioGroupScaling}, ${compact ? 0.6668 : 1})`;
|
|
9653
9865
|
const { primaryColor } = getThemedColors(theme);
|
|
@@ -9863,10 +10075,14 @@ const getScalableItemStyles = (hasIconAndSlottedContent, compact) => {
|
|
|
9863
10075
|
const dimension = `calc(max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px)) + (${verticalPadding} + ${borderWidthBase}) * 2)`;
|
|
9864
10076
|
return { padding, dimension };
|
|
9865
10077
|
};
|
|
10078
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
10079
|
+
/**
|
|
10080
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
10081
|
+
*/
|
|
9866
10082
|
const getComponentCss$v = (compact, isDisabled, isSelected, hasIcon, hasSlottedContent, theme) => {
|
|
9867
10083
|
const { buttonColor, labelColor, borderColor, hoverBorderColor } = getColors$2(isDisabled, isSelected, theme);
|
|
9868
10084
|
const { buttonColor: buttonColorDark, labelColor: labelColorDark, borderColor: borderColorDark, hoverBorderColor: hoverBorderColorDark, } = getColors$2(isDisabled, isSelected, 'dark');
|
|
9869
|
-
const
|
|
10085
|
+
const { dimension, padding } = getScalableItemStyles(hasIcon && hasSlottedContent, compact);
|
|
9870
10086
|
return getCss({
|
|
9871
10087
|
'@global': {
|
|
9872
10088
|
':host': {
|
|
@@ -9882,9 +10098,10 @@ const getComponentCss$v = (compact, isDisabled, isSelected, hasIcon, hasSlottedC
|
|
|
9882
10098
|
position: 'relative',
|
|
9883
10099
|
display: 'block',
|
|
9884
10100
|
height: '100%',
|
|
9885
|
-
minHeight: scalableItemStyles.dimension,
|
|
9886
10101
|
width: '100%',
|
|
9887
|
-
|
|
10102
|
+
minHeight: dimension,
|
|
10103
|
+
minWidth: dimension,
|
|
10104
|
+
padding: padding,
|
|
9888
10105
|
margin: 0, // Removes default button margin on safari 15
|
|
9889
10106
|
border: `${borderWidthBase} solid ${borderColor}`,
|
|
9890
10107
|
borderRadius: borderRadiusSmall,
|
|
@@ -9936,7 +10153,7 @@ const getComponentCss$v = (compact, isDisabled, isSelected, hasIcon, hasSlottedC
|
|
|
9936
10153
|
}),
|
|
9937
10154
|
});
|
|
9938
10155
|
};
|
|
9939
|
-
const getComponentCss$u = (maxWidth, columns, compact) => {
|
|
10156
|
+
const getComponentCss$u = (minWidth, maxWidth, columns, compact) => {
|
|
9940
10157
|
const scalingVar = getScalingVar(compact);
|
|
9941
10158
|
return getCss({
|
|
9942
10159
|
'@global': {
|
|
@@ -10178,6 +10395,10 @@ const getComponentCss$t = (isOpen, state, disabled, filter, theme) => {
|
|
|
10178
10395
|
}, filter ? getFilterStyles(isOpen, state, disabled, theme) : getButtonStyles(isOpen, state, theme), getListStyles(isOpen, theme)));
|
|
10179
10396
|
};
|
|
10180
10397
|
|
|
10398
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
10399
|
+
/**
|
|
10400
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
10401
|
+
*/
|
|
10181
10402
|
const getComponentCss$s = (isDisabled, hasCustomDropdown, hideLabel, state, theme) => {
|
|
10182
10403
|
return getCss({
|
|
10183
10404
|
'@global': {
|
|
@@ -10237,6 +10458,10 @@ const getComponentCss$s = (isDisabled, hasCustomDropdown, hideLabel, state, them
|
|
|
10237
10458
|
};
|
|
10238
10459
|
|
|
10239
10460
|
const cssVarInternalSelectOptionScaling = '--p-internal-select-option-scaling';
|
|
10461
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
10462
|
+
/**
|
|
10463
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
10464
|
+
*/
|
|
10240
10465
|
const getComponentCss$r = (theme) => {
|
|
10241
10466
|
return getCss({
|
|
10242
10467
|
'@global': {
|
|
@@ -10261,6 +10486,10 @@ const getComponentCss$r = (theme) => {
|
|
|
10261
10486
|
};
|
|
10262
10487
|
|
|
10263
10488
|
const cssVarInternalSelectScaling = '--p-internal-select-scaling';
|
|
10489
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
10490
|
+
/**
|
|
10491
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
10492
|
+
*/
|
|
10264
10493
|
const getComponentCss$q = (isOpen, isDisabled, hideLabel, state, compact, theme) => {
|
|
10265
10494
|
const scalingVar = `var(${cssVarInternalSelectScaling}, ${compact ? 0.5 : 1})`;
|
|
10266
10495
|
return getCss({
|
|
@@ -10453,6 +10682,10 @@ const getSVGPath = (stepCount, numberedCircleColors, isStateCurrent) => {
|
|
|
10453
10682
|
];
|
|
10454
10683
|
return svgNumberedCirclePaths[stepCount];
|
|
10455
10684
|
};
|
|
10685
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
10686
|
+
/**
|
|
10687
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
10688
|
+
*/
|
|
10456
10689
|
const getComponentCss$n = (state, disabled, theme) => {
|
|
10457
10690
|
const { primaryColor, hoverColor, disabledColor } = getThemedColors(theme);
|
|
10458
10691
|
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
@@ -10595,6 +10828,10 @@ const getColors$1 = (checked, disabled, loading, theme) => {
|
|
|
10595
10828
|
textColor: disabledOrLoadingColor || primaryColor,
|
|
10596
10829
|
};
|
|
10597
10830
|
};
|
|
10831
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
10832
|
+
/**
|
|
10833
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
10834
|
+
*/
|
|
10598
10835
|
const getComponentCss$l = (alignLabel, hideLabel, stretch, checked, disabled, loading, compact, theme) => {
|
|
10599
10836
|
const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, disabled, loading, theme);
|
|
10600
10837
|
const { buttonBorderColor: buttonBorderColorDark, buttonBorderColorHover: buttonBorderColorHoverDark, buttonBackgroundColor: buttonBackgroundColorDark, buttonBackgroundColorHover: buttonBackgroundColorHoverDark, toggleBackgroundColor: toggleBackgroundColorDark, toggleBackgroundColorHover: toggleBackgroundColorHoverDark, textColor: textColorDark, } = getColors$1(checked, disabled, loading, 'dark');
|
|
@@ -11141,6 +11378,10 @@ const getThemedBackgroundColor = (tagColor, themedColors) => {
|
|
|
11141
11378
|
return colorMap[tagColor];
|
|
11142
11379
|
};
|
|
11143
11380
|
|
|
11381
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
11382
|
+
/**
|
|
11383
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
11384
|
+
*/
|
|
11144
11385
|
const getComponentCss$a = (color, hasLabel, theme) => {
|
|
11145
11386
|
const themedColors = getThemedColors(theme);
|
|
11146
11387
|
const themedColorsDark = getThemedColors('dark');
|
|
@@ -11327,6 +11568,10 @@ const showCustomCalendarOrTimeIndicator = (isCalendar, isTime) => {
|
|
|
11327
11568
|
const cssVariableInputPaddingStart = '--p-internal-text-field-input-padding-start';
|
|
11328
11569
|
const cssVariableInputPaddingEnd = '--p-internal-text-field-input-padding-end';
|
|
11329
11570
|
const cssVarInternalTextFieldScaling = '--p-internal-text-field-scaling';
|
|
11571
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
11572
|
+
/**
|
|
11573
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
11574
|
+
*/
|
|
11330
11575
|
const getComponentCss$8 = (isDisabled, isReadonly, hideLabel, state, hasUnitOrVisibleCounter, unitPosition, inputType, showPasswordToggle, isWithinForm, hasSubmitButton, theme, unitLength) => {
|
|
11331
11576
|
const isSearch = isType(inputType, 'search');
|
|
11332
11577
|
const isPassword = isType(inputType, 'password');
|
|
@@ -11547,6 +11792,10 @@ const sizeMap = {
|
|
|
11547
11792
|
large: fontSizeTextLarge,
|
|
11548
11793
|
'x-large': fontSizeTextXLarge,
|
|
11549
11794
|
};
|
|
11795
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
11796
|
+
/**
|
|
11797
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
11798
|
+
*/
|
|
11550
11799
|
const getComponentCss$5 = (size, weight, align, color, ellipsis, theme) => {
|
|
11551
11800
|
return getCss({
|
|
11552
11801
|
'@global': {
|
|
@@ -11566,6 +11815,10 @@ const getComponentCss$5 = (size, weight, align, color, ellipsis, theme) => {
|
|
|
11566
11815
|
});
|
|
11567
11816
|
};
|
|
11568
11817
|
|
|
11818
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
11819
|
+
/**
|
|
11820
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
11821
|
+
*/
|
|
11569
11822
|
const getComponentCss$4 = (isDisabled, isReadonly, hideLabel, state, hasCounter, theme) => {
|
|
11570
11823
|
return getCss({
|
|
11571
11824
|
'@global': {
|
|
@@ -11621,6 +11874,10 @@ const getComponentCss$4 = (isDisabled, isReadonly, hideLabel, state, hasCounter,
|
|
|
11621
11874
|
});
|
|
11622
11875
|
};
|
|
11623
11876
|
|
|
11877
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
11878
|
+
/**
|
|
11879
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
11880
|
+
*/
|
|
11624
11881
|
const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, counter, resize, theme) => {
|
|
11625
11882
|
const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
11626
11883
|
const { primaryColor: primaryColorDark, contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
@@ -11748,6 +12005,10 @@ const getKeyframesMobile = (direction, bottomVar) => getKeyframes(direction, {
|
|
|
11748
12005
|
transform: `translate3d(0,calc(var(${bottomVar}) + 100%),0)`, // space before and after "+" is crucial
|
|
11749
12006
|
});
|
|
11750
12007
|
const toastCloseClassName = 'close';
|
|
12008
|
+
// CSS Variable defined in fontHyphenationStyle
|
|
12009
|
+
/**
|
|
12010
|
+
* @css-variable {"name": "--p-hyphens", "description": "Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.", "defaultValue": "auto"}
|
|
12011
|
+
*/
|
|
11751
12012
|
const getComponentCss$1 = () => {
|
|
11752
12013
|
return getCss({
|
|
11753
12014
|
'@global': {
|