@porsche-design-system/components-react 3.0.0-rc.0 → 3.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -25
- package/bin/patchRemixRunProcessBrowserGlobalIdentifier.js +35 -26
- package/esm/lib/components/checkbox-wrapper.wrapper.js +3 -3
- package/esm/lib/components/icon.wrapper.js +1 -1
- package/esm/lib/components/scroller.wrapper.js +3 -3
- package/lib/components/checkbox-wrapper.wrapper.d.ts +8 -0
- package/lib/components/checkbox-wrapper.wrapper.js +3 -3
- package/lib/components/icon.wrapper.js +1 -1
- package/lib/components/scroller.wrapper.d.ts +15 -7
- package/lib/components/scroller.wrapper.js +3 -3
- package/lib/types.d.ts +219 -191
- package/package.json +2 -2
- package/ssr/components/dist/styles/esm/styles-entry.js +408 -266
- package/ssr/components/dist/utils/esm/utils-entry.js +90 -83
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.js +38 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +0 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.js +1 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.js +62 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/model-signature.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.js +34 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +6 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.js +408 -267
- package/ssr/esm/components/dist/utils/esm/utils-entry.js +82 -83
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.js +36 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.js +1 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.js +62 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.js +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/model-signature.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.js +32 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +6 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +1 -1
- package/ssr/lib/components/checkbox-wrapper.wrapper.d.ts +8 -0
- package/ssr/lib/components/scroller.wrapper.d.ts +15 -7
- package/ssr/lib/components/select-wrapper-dropdown.wrapper.d.ts +30 -0
- package/ssr/lib/dsr-components/select-wrapper.d.ts +0 -1
- package/ssr/lib/types.d.ts +219 -191
|
@@ -6,6 +6,8 @@ const isDisabledOrLoading = (disabled, loading) => {
|
|
|
6
6
|
|
|
7
7
|
const hasWindow = typeof window !== 'undefined';
|
|
8
8
|
|
|
9
|
+
const isHighContrastMode = hasWindow && window.matchMedia && matchMedia('(forced-colors: active)').matches;
|
|
10
|
+
|
|
9
11
|
const attributeMutationMap = new Map();
|
|
10
12
|
hasWindow &&
|
|
11
13
|
new MutationObserver((mutations) => {
|
|
@@ -41,6 +43,8 @@ const borderRadiusSmall = '4px';
|
|
|
41
43
|
|
|
42
44
|
const borderRadiusMedium = '8px';
|
|
43
45
|
|
|
46
|
+
const borderRadiusLarge = '12px';
|
|
47
|
+
|
|
44
48
|
const borderWidthBase = '2px';
|
|
45
49
|
|
|
46
50
|
const _dropShadowBackgroundColor = 'rgba(0, 0, 0, 0.16)';
|
|
@@ -107,12 +111,6 @@ const fontWeightSemiBold = 600;
|
|
|
107
111
|
|
|
108
112
|
const fontWeightBold = 700;
|
|
109
113
|
|
|
110
|
-
const fontWeight = {
|
|
111
|
-
regular: fontWeightRegular,
|
|
112
|
-
semiBold: fontWeightSemiBold,
|
|
113
|
-
bold: fontWeightBold,
|
|
114
|
-
};
|
|
115
|
-
|
|
116
114
|
const fontStyleNormal = 'normal';
|
|
117
115
|
|
|
118
116
|
const fontVariant = 'normal';
|
|
@@ -520,25 +518,6 @@ var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symb
|
|
|
520
518
|
|
|
521
519
|
var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof$1(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof$1(document)) === 'object' && document.nodeType === 9;
|
|
522
520
|
|
|
523
|
-
var isProduction = process.env.NODE_ENV === 'production';
|
|
524
|
-
function warning(condition, message) {
|
|
525
|
-
if (!isProduction) {
|
|
526
|
-
if (condition) {
|
|
527
|
-
return;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
var text = "Warning: " + message;
|
|
531
|
-
|
|
532
|
-
if (typeof console !== 'undefined') {
|
|
533
|
-
console.warn(text);
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
try {
|
|
537
|
-
throw Error(text);
|
|
538
|
-
} catch (x) {}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
|
|
542
521
|
function _typeof(obj) {
|
|
543
522
|
"@babel/helpers - typeof";
|
|
544
523
|
|
|
@@ -645,9 +624,7 @@ function createRule(name, decl, options) {
|
|
|
645
624
|
var rule = jss.plugins.onCreateRule(name, declCopy, options);
|
|
646
625
|
if (rule) return rule; // It is an at-rule and it has no instance.
|
|
647
626
|
|
|
648
|
-
if (name[0] === '@')
|
|
649
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Unknown rule " + name) : void 0;
|
|
650
|
-
}
|
|
627
|
+
if (name[0] === '@') ;
|
|
651
628
|
|
|
652
629
|
return null;
|
|
653
630
|
}
|
|
@@ -848,9 +825,7 @@ function () {
|
|
|
848
825
|
|
|
849
826
|
var sheet = this.options.sheet;
|
|
850
827
|
|
|
851
|
-
if (sheet && sheet.attached)
|
|
852
|
-
process.env.NODE_ENV !== "production" ? warning(false, '[JSS] Rule is not linked. Missing sheet option "link: true".') : void 0;
|
|
853
|
-
}
|
|
828
|
+
if (sheet && sheet.attached) ;
|
|
854
829
|
|
|
855
830
|
return this;
|
|
856
831
|
};
|
|
@@ -1096,7 +1071,6 @@ function () {
|
|
|
1096
1071
|
this.name = nameMatch[1];
|
|
1097
1072
|
} else {
|
|
1098
1073
|
this.name = 'noname';
|
|
1099
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Bad keyframes name " + key) : void 0;
|
|
1100
1074
|
}
|
|
1101
1075
|
|
|
1102
1076
|
this.key = this.type + "-" + this.name;
|
|
@@ -1155,8 +1129,6 @@ var findReferencedKeyframe = function findReferencedKeyframe(val, keyframes) {
|
|
|
1155
1129
|
if (name in keyframes) {
|
|
1156
1130
|
return keyframes[name];
|
|
1157
1131
|
}
|
|
1158
|
-
|
|
1159
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Referenced keyframes rule \"" + name + "\" is not defined.") : void 0;
|
|
1160
1132
|
return match;
|
|
1161
1133
|
});
|
|
1162
1134
|
}
|
|
@@ -1981,8 +1953,6 @@ function () {
|
|
|
1981
1953
|
for (var name in plugin) {
|
|
1982
1954
|
if (name in registry) {
|
|
1983
1955
|
registry[name].push(plugin[name]);
|
|
1984
|
-
} else {
|
|
1985
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Unknown hook \"" + name + "\".") : void 0;
|
|
1986
1956
|
}
|
|
1987
1957
|
}
|
|
1988
1958
|
|
|
@@ -2124,8 +2094,6 @@ if (globalThis$1[ns] == null) globalThis$1[ns] = 0; // Bundle may contain multip
|
|
|
2124
2094
|
// the module.
|
|
2125
2095
|
|
|
2126
2096
|
var moduleId = globalThis$1[ns]++;
|
|
2127
|
-
|
|
2128
|
-
var maxRules = 1e10;
|
|
2129
2097
|
/**
|
|
2130
2098
|
* Returns a function which generates unique class names based on counters.
|
|
2131
2099
|
* When new generator function is created, rule counter is reseted.
|
|
@@ -2142,10 +2110,6 @@ var createGenerateId = function createGenerateId(options) {
|
|
|
2142
2110
|
var generateId = function generateId(rule, sheet) {
|
|
2143
2111
|
ruleCounter += 1;
|
|
2144
2112
|
|
|
2145
|
-
if (ruleCounter > maxRules) {
|
|
2146
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] You might have a memory leak. Rule counter is at " + ruleCounter + ".") : void 0;
|
|
2147
|
-
}
|
|
2148
|
-
|
|
2149
2113
|
var jssId = '';
|
|
2150
2114
|
var prefix = '';
|
|
2151
2115
|
|
|
@@ -2241,7 +2205,6 @@ var removeProperty = function removeProperty(cssRule, prop) {
|
|
|
2241
2205
|
cssRule.style.removeProperty(prop);
|
|
2242
2206
|
}
|
|
2243
2207
|
} catch (err) {
|
|
2244
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] DOMException \"" + err.message + "\" was thrown. Tried to remove property \"" + prop + "\".") : void 0;
|
|
2245
2208
|
}
|
|
2246
2209
|
};
|
|
2247
2210
|
/**
|
|
@@ -2355,10 +2318,6 @@ function findPrevNode(options) {
|
|
|
2355
2318
|
node: comment.nextSibling
|
|
2356
2319
|
};
|
|
2357
2320
|
} // If user specifies an insertion point and it can't be found in the document -
|
|
2358
|
-
// bad specificity issues may appear.
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Insertion point \"" + insertionPoint + "\" not found.") : void 0;
|
|
2362
2321
|
}
|
|
2363
2322
|
|
|
2364
2323
|
return false;
|
|
@@ -2381,7 +2340,7 @@ function insertStyle(style, options) {
|
|
|
2381
2340
|
if (insertionPoint && typeof insertionPoint.nodeType === 'number') {
|
|
2382
2341
|
var insertionPointElement = insertionPoint;
|
|
2383
2342
|
var parentNode = insertionPointElement.parentNode;
|
|
2384
|
-
if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);
|
|
2343
|
+
if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);
|
|
2385
2344
|
return;
|
|
2386
2345
|
}
|
|
2387
2346
|
|
|
@@ -2406,7 +2365,6 @@ var _insertRule = function insertRule(container, rule, index) {
|
|
|
2406
2365
|
container.appendRule(rule);
|
|
2407
2366
|
}
|
|
2408
2367
|
} catch (err) {
|
|
2409
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] " + err.message) : void 0;
|
|
2410
2368
|
return false;
|
|
2411
2369
|
}
|
|
2412
2370
|
|
|
@@ -2827,8 +2785,6 @@ function () {
|
|
|
2827
2785
|
entry.refs++;
|
|
2828
2786
|
return entry.sheet;
|
|
2829
2787
|
}
|
|
2830
|
-
|
|
2831
|
-
warning(false, "[JSS] SheetsManager: can't find sheet to manage");
|
|
2832
2788
|
return undefined;
|
|
2833
2789
|
};
|
|
2834
2790
|
|
|
@@ -2840,8 +2796,6 @@ function () {
|
|
|
2840
2796
|
entry.refs--;
|
|
2841
2797
|
if (entry.refs === 0) entry.sheet.detach();
|
|
2842
2798
|
}
|
|
2843
|
-
} else {
|
|
2844
|
-
warning(false, "SheetsManager: can't find sheet to unmanage");
|
|
2845
2799
|
}
|
|
2846
2800
|
};
|
|
2847
2801
|
|
|
@@ -3183,8 +3137,6 @@ function jssNested() {
|
|
|
3183
3137
|
if (rule) {
|
|
3184
3138
|
return rule.selector;
|
|
3185
3139
|
}
|
|
3186
|
-
|
|
3187
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Could not find the referenced rule \"" + key + "\" in \"" + (container.options.meta || container.toString()) + "\".") : void 0;
|
|
3188
3140
|
return key;
|
|
3189
3141
|
};
|
|
3190
3142
|
}
|
|
@@ -3276,6 +3228,10 @@ function jssNested() {
|
|
|
3276
3228
|
};
|
|
3277
3229
|
}
|
|
3278
3230
|
|
|
3231
|
+
function getDefaultExportFromCjs (x) {
|
|
3232
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3233
|
+
}
|
|
3234
|
+
|
|
3279
3235
|
function getAugmentedNamespace(n) {
|
|
3280
3236
|
if (n.__esModule) return n;
|
|
3281
3237
|
var f = n.default;
|
|
@@ -3337,7 +3293,7 @@ var _tslib$1 = {};
|
|
|
3337
3293
|
return t;
|
|
3338
3294
|
};
|
|
3339
3295
|
return exports.__assign.apply(this, arguments);
|
|
3340
|
-
};
|
|
3296
|
+
};
|
|
3341
3297
|
} (_tslib$1));
|
|
3342
3298
|
|
|
3343
3299
|
var require$$1 = /*@__PURE__*/getAugmentedNamespace(jss_esm);
|
|
@@ -3697,6 +3653,8 @@ function jssCombineAndSortMQ(options) {
|
|
|
3697
3653
|
|
|
3698
3654
|
var dist = jssCombineAndSortMQ;
|
|
3699
3655
|
|
|
3656
|
+
var jssPluginSortMediaQueries = /*@__PURE__*/getDefaultExportFromCjs(dist);
|
|
3657
|
+
|
|
3700
3658
|
/* Auto Generated Start */
|
|
3701
3659
|
const themeLight = {
|
|
3702
3660
|
primaryColor: '#010205',
|
|
@@ -3779,8 +3737,21 @@ const themes = {
|
|
|
3779
3737
|
'dark': themeDark
|
|
3780
3738
|
};
|
|
3781
3739
|
/* Auto Generated End */
|
|
3740
|
+
const schemeHighContrastMerged = {
|
|
3741
|
+
disabledColor: 'GrayText',
|
|
3742
|
+
focusColor: 'Highlight',
|
|
3743
|
+
};
|
|
3744
|
+
const schemeHighContrast = {
|
|
3745
|
+
canvasColor: 'Canvas',
|
|
3746
|
+
canvasTextColor: 'CanvasText',
|
|
3747
|
+
highlightColor: 'Highlight',
|
|
3748
|
+
linkColor: 'LinkText',
|
|
3749
|
+
};
|
|
3782
3750
|
const getThemedColors = (theme) => {
|
|
3783
|
-
return themes[theme];
|
|
3751
|
+
return isHighContrastMode ? Object.assign(Object.assign({}, themes[theme]), schemeHighContrastMerged) : themes[theme];
|
|
3752
|
+
};
|
|
3753
|
+
const getHighContrastColors = () => {
|
|
3754
|
+
return schemeHighContrast;
|
|
3784
3755
|
};
|
|
3785
3756
|
const getInvertedThemedColors = (theme) => {
|
|
3786
3757
|
return getThemedColors(isThemeDark(theme) ? 'light' : 'dark');
|
|
@@ -3827,36 +3798,20 @@ const focusPseudoJssStyle = {
|
|
|
3827
3798
|
outline: 0,
|
|
3828
3799
|
},
|
|
3829
3800
|
};
|
|
3830
|
-
const getTextHiddenJssStyle = (isHidden) => isHidden
|
|
3831
|
-
? getScreenReaderOnlyJssStyle()
|
|
3832
|
-
: {
|
|
3833
|
-
position: 'static',
|
|
3834
|
-
width: 'auto',
|
|
3835
|
-
height: 'auto',
|
|
3836
|
-
margin: 0,
|
|
3837
|
-
overflow: 'visible',
|
|
3838
|
-
clip: 'auto',
|
|
3839
|
-
clipPath: 'none',
|
|
3840
|
-
whiteSpace: 'normal',
|
|
3841
|
-
};
|
|
3842
|
-
const getFormTextHiddenJssStyle = (isHidden) => (Object.assign(Object.assign({}, getTextHiddenJssStyle(isHidden)), { width: 'fit-content' }));
|
|
3843
|
-
const getFormCheckboxRadioHiddenJssStyle = (isHidden) => (Object.assign(Object.assign({}, getTextHiddenJssStyle(isHidden)), { width: 'auto', padding: `2px 0 0 ${spacingStaticSmall}` }));
|
|
3844
3801
|
/**
|
|
3845
|
-
*
|
|
3802
|
+
* Returns a JSS style object that can be used to visually hide text in the browser, while still allowing it to be accessed by screen readers.
|
|
3803
|
+
* @param {boolean} isHidden - A boolean value indicating whether the text should be hidden or not. Defaults to true.
|
|
3804
|
+
* @param {JssStyle} isShownJssStyle - Additional styles applied when isHidden = false
|
|
3805
|
+
* @returns {JssStyle} - A JSS style object containing styles depending on the value of isHidden and isShownJssStyle.
|
|
3846
3806
|
*/
|
|
3847
|
-
const
|
|
3848
|
-
|
|
3807
|
+
const getHiddenTextJssStyle = (isHidden = true, isShownJssStyle) => isHidden
|
|
3808
|
+
? {
|
|
3849
3809
|
position: 'absolute',
|
|
3810
|
+
width: 0,
|
|
3850
3811
|
height: '1px',
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
overflow: 'hidden',
|
|
3855
|
-
clip: 'rect(1px,1px,1px,1px)',
|
|
3856
|
-
clipPath: 'inset(50%)',
|
|
3857
|
-
whiteSpace: 'nowrap',
|
|
3858
|
-
};
|
|
3859
|
-
};
|
|
3812
|
+
textIndent: '-999999px',
|
|
3813
|
+
}
|
|
3814
|
+
: Object.assign({ position: 'static', width: 'auto', height: 'auto', textIndent: 0 }, isShownJssStyle);
|
|
3860
3815
|
const getBackfaceVisibilityJssStyle = () => ({
|
|
3861
3816
|
backfaceVisibility: 'hidden',
|
|
3862
3817
|
WebkitBackfaceVisibility: 'hidden',
|
|
@@ -3878,13 +3833,20 @@ const hoverMediaQuery = (style) =>
|
|
|
3878
3833
|
({ '@media(hover:hover)': style }) // used for prod build, yarn start and unit tests
|
|
3879
3834
|
; // used for staging build in e2e and vrt tests
|
|
3880
3835
|
|
|
3836
|
+
const getSchemedHighContrastMediaQuery = (light, dark) => {
|
|
3837
|
+
return {
|
|
3838
|
+
'@media (forced-colors: active) and (prefers-color-scheme: light)': light,
|
|
3839
|
+
'@media (forced-colors: active) and (prefers-color-scheme: dark)': dark,
|
|
3840
|
+
};
|
|
3841
|
+
};
|
|
3842
|
+
|
|
3881
3843
|
// NOTE: handpicked selection of plugins from jss-preset-default
|
|
3882
3844
|
const jss = createJss({
|
|
3883
3845
|
plugins: [
|
|
3884
3846
|
jssGlobal(),
|
|
3885
3847
|
jssNested(),
|
|
3886
3848
|
camelCase(),
|
|
3887
|
-
|
|
3849
|
+
jssPluginSortMediaQueries({ combineMediaQueries: true }),
|
|
3888
3850
|
],
|
|
3889
3851
|
});
|
|
3890
3852
|
const getCss = (jssStyles) => jss
|
|
@@ -3955,14 +3917,14 @@ const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
|
3955
3917
|
|
|
3956
3918
|
const getComponentCss$Y = (size, compact, open, theme) => {
|
|
3957
3919
|
const { primaryColor, hoverColor, focusColor, contrastLowColor } = getThemedColors(theme);
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
':host': addImportantToEachRule(Object.assign({ display: 'block' },
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
fontSize:
|
|
3965
|
-
padding: compact ? '4px
|
|
3920
|
+
return getCss({
|
|
3921
|
+
'@global': {
|
|
3922
|
+
':host': addImportantToEachRule(Object.assign(Object.assign({ display: 'block' }, (!compact && {
|
|
3923
|
+
borderBottom: `1px solid ${contrastLowColor}`,
|
|
3924
|
+
})), hostHiddenStyles)),
|
|
3925
|
+
button: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', position: 'relative', justifyContent: 'space-between', width: '100%', textDecoration: 'none', border: 0, outline: 0, gap: '24px', background: 'transparent', cursor: 'pointer', textAlign: 'left', color: primaryColor }, textSmallStyle), { fontWeight: fontWeightSemiBold }), buildResponsiveStyles(size, (s) => ({
|
|
3926
|
+
fontSize: s === 'medium' ? fontSizeTextMedium : fontSizeTextSmall,
|
|
3927
|
+
padding: `${compact ? '4px' : s === 'medium' ? '20px' : '12px'} 0`,
|
|
3966
3928
|
}))), mergeDeep({
|
|
3967
3929
|
'&::before': Object.assign({ content: '""', position: 'absolute', borderRadius: borderRadiusSmall, left: '-4px', right: '-4px' }, (compact
|
|
3968
3930
|
? {
|
|
@@ -3985,41 +3947,37 @@ const getComponentCss$Y = (size, compact, open, theme) => {
|
|
|
3985
3947
|
}, '&:not(:focus-visible)::before': {
|
|
3986
3948
|
border: 0,
|
|
3987
3949
|
} }),
|
|
3988
|
-
} }, (!compact && {
|
|
3989
|
-
root: {
|
|
3990
|
-
borderBottom: border,
|
|
3991
3950
|
},
|
|
3992
|
-
|
|
3951
|
+
heading: {
|
|
3993
3952
|
margin: 0,
|
|
3994
|
-
padding: 0,
|
|
3995
|
-
},
|
|
3953
|
+
padding: '0 0 2px',
|
|
3954
|
+
},
|
|
3955
|
+
icon: {
|
|
3996
3956
|
width: fontLineHeight,
|
|
3997
3957
|
height: fontLineHeight,
|
|
3998
|
-
transformOrigin: '50% 50%',
|
|
3999
3958
|
transform: open ? 'rotate3d(0)' : 'rotate3d(0,0,1,90deg)',
|
|
4000
3959
|
transition: getTransition('transform'),
|
|
4001
|
-
},
|
|
3960
|
+
},
|
|
3961
|
+
collapsible: Object.assign({ color: primaryColor, overflow: 'hidden' }, (open
|
|
4002
3962
|
? {
|
|
4003
3963
|
height: 'auto',
|
|
4004
3964
|
paddingBottom: compact ? spacingStaticSmall : '24px',
|
|
4005
3965
|
visibility: 'visible',
|
|
4006
|
-
transition: getTransition('height') +
|
|
4007
|
-
animation: `$open ${transitionDuration}
|
|
3966
|
+
transition: getTransition('height') + ',' + getTransition('padding-bottom'),
|
|
3967
|
+
animation: `$open 0s ${transitionDuration} forwards`, // delay overflow change and have `overflow: visible` after transition
|
|
4008
3968
|
}
|
|
4009
3969
|
: {
|
|
4010
3970
|
height: 0,
|
|
4011
3971
|
visibility: 'hidden',
|
|
4012
|
-
transition: getTransition('height') + `,visibility
|
|
4013
|
-
})),
|
|
3972
|
+
transition: getTransition('height') + `,visibility 0s linear ${transitionDuration}`,
|
|
3973
|
+
})),
|
|
4014
3974
|
// TODO: this doesn't get shortened and results in `keyframes-open` for some unknown reason
|
|
4015
3975
|
'@keyframes open': {
|
|
4016
|
-
|
|
4017
|
-
overflow: 'hidden',
|
|
4018
|
-
},
|
|
4019
|
-
'100%': {
|
|
3976
|
+
to: {
|
|
4020
3977
|
overflow: 'visible',
|
|
4021
3978
|
},
|
|
4022
|
-
}
|
|
3979
|
+
},
|
|
3980
|
+
});
|
|
4023
3981
|
};
|
|
4024
3982
|
|
|
4025
3983
|
const TOAST_Z_INDEX = 999999;
|
|
@@ -4115,7 +4073,7 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4115
4073
|
fontSize: getFontSizeText(sizeValue),
|
|
4116
4074
|
})))), { '&::before': Object.assign(Object.assign(Object.assign({ content: '""', position: 'absolute', top: offsetVertical, bottom: offsetVertical }, buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
4117
4075
|
right: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
4118
|
-
left: hideLabelValue
|
|
4076
|
+
left: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
4119
4077
|
}))), { borderRadius: borderRadiusSmall, transition: getTransition('background-color') }), (active && Object.assign(Object.assign({}, frostedGlassStyle), { backgroundColor: hoverColor }))) }), (!isDisabledOrLoading &&
|
|
4120
4078
|
hoverMediaQuery({
|
|
4121
4079
|
'&:hover::before': Object.assign(Object.assign({}, frostedGlassStyle), { backgroundColor: hoverColor }),
|
|
@@ -4134,6 +4092,12 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4134
4092
|
flexShrink: '0',
|
|
4135
4093
|
width: fontLineHeight,
|
|
4136
4094
|
height: fontLineHeight,
|
|
4095
|
+
// workaround for Safari to optimize vertical alignment of icons
|
|
4096
|
+
// TODO: check if this is still needed after optimized icons are included
|
|
4097
|
+
'@supports (width: round(down, 1px, 1px))': {
|
|
4098
|
+
width: `round(down, ${fontLineHeight}, 1px)`,
|
|
4099
|
+
height: `round(down, ${fontLineHeight}, 1px)`,
|
|
4100
|
+
},
|
|
4137
4101
|
},
|
|
4138
4102
|
label: mergeDeep(buildResponsiveStyles(hideLabel, getVisibilityJssStyle), buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
4139
4103
|
order: alignLabelValue === 'left' ? -1 : 0,
|
|
@@ -4210,7 +4174,7 @@ const getTileBaseStyles = (aspectRatio, isDisabled) => {
|
|
|
4210
4174
|
},
|
|
4211
4175
|
},
|
|
4212
4176
|
})),
|
|
4213
|
-
root: Object.assign(Object.assign({ position: 'relative',
|
|
4177
|
+
root: Object.assign(Object.assign({ position: 'relative', overflow: 'hidden', transform: 'translate3d(0,0,0)', borderRadius: borderRadiusLarge, color: getThemedTypographyColor('dark', 'primary') }, buildResponsiveStyles(aspectRatio, (ratio) => ({
|
|
4214
4178
|
paddingTop: aspectRatioPaddingMap[ratio],
|
|
4215
4179
|
}))), (!isDisabled &&
|
|
4216
4180
|
hoverMediaQuery({
|
|
@@ -4226,7 +4190,7 @@ const getTileBaseStyles = (aspectRatio, isDisabled) => {
|
|
|
4226
4190
|
display: 'flex',
|
|
4227
4191
|
justifyItems: 'start',
|
|
4228
4192
|
gap: spacingStaticMedium,
|
|
4229
|
-
borderRadius:
|
|
4193
|
+
borderRadius: borderRadiusLarge,
|
|
4230
4194
|
'@media (forced-colors: active)': {
|
|
4231
4195
|
background: 'rgba(0,0,0,0.7)',
|
|
4232
4196
|
},
|
|
@@ -4273,6 +4237,7 @@ const { primaryColor: darkThemePrimaryColor$1 } = getThemedColors('dark');
|
|
|
4273
4237
|
const { primaryColor: lightThemePrimaryColor$1 } = getThemedColors('light');
|
|
4274
4238
|
const getVariantColors = (variant, theme) => {
|
|
4275
4239
|
const { primaryColor, contrastHighColor, contrastMediumColor, hoverColor } = getThemedColors(theme);
|
|
4240
|
+
const { canvasColor } = getHighContrastColors();
|
|
4276
4241
|
const colors = {
|
|
4277
4242
|
primary: {
|
|
4278
4243
|
textColor: theme === 'dark' ? lightThemePrimaryColor$1 : darkThemePrimaryColor$1,
|
|
@@ -4285,7 +4250,7 @@ const getVariantColors = (variant, theme) => {
|
|
|
4285
4250
|
textColor: primaryColor,
|
|
4286
4251
|
borderColor: primaryColor,
|
|
4287
4252
|
borderColorHover: contrastMediumColor,
|
|
4288
|
-
backgroundColor: 'transparent',
|
|
4253
|
+
backgroundColor: isHighContrastMode ? canvasColor : 'transparent',
|
|
4289
4254
|
backgroundColorHover: hoverColor,
|
|
4290
4255
|
},
|
|
4291
4256
|
};
|
|
@@ -4309,18 +4274,8 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4309
4274
|
},
|
|
4310
4275
|
})), (!isDisabledOrLoading &&
|
|
4311
4276
|
hoverMediaQuery({
|
|
4312
|
-
'&:hover': Object.assign({ backgroundColor: backgroundColorHover, borderColor: borderColorHover }, (!isPrimary && frostedGlassStyle)),
|
|
4313
|
-
}))), label:
|
|
4314
|
-
? {
|
|
4315
|
-
width: 0,
|
|
4316
|
-
height: '1px',
|
|
4317
|
-
textIndent: '-999999px',
|
|
4318
|
-
}
|
|
4319
|
-
: {
|
|
4320
|
-
width: 'auto',
|
|
4321
|
-
height: 'auto',
|
|
4322
|
-
textIndent: 0,
|
|
4323
|
-
})) }, (hasIcon && {
|
|
4277
|
+
'&:hover': Object.assign({ backgroundColor: backgroundColorHover, borderColor: isHighContrastMode ? focusColor : borderColorHover }, (!isPrimary && frostedGlassStyle)),
|
|
4278
|
+
}))), label: buildResponsiveStyles(hideLabel, getHiddenTextJssStyle) }, (hasIcon && {
|
|
4324
4279
|
icon: {
|
|
4325
4280
|
width: fontLineHeight,
|
|
4326
4281
|
height: fontLineHeight,
|
|
@@ -4330,16 +4285,17 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4330
4285
|
|
|
4331
4286
|
const getDisabledColors = (variant, loading, theme) => {
|
|
4332
4287
|
const { contrastMediumColor, contrastHighColor, disabledColor, hoverColor } = getThemedColors(theme);
|
|
4288
|
+
const { canvasColor } = getHighContrastColors();
|
|
4333
4289
|
const colors = {
|
|
4334
4290
|
primary: {
|
|
4335
|
-
textColor: contrastHighColor,
|
|
4336
|
-
borderColor: loading ? contrastHighColor : disabledColor,
|
|
4337
|
-
backgroundColor: loading ? contrastHighColor : disabledColor,
|
|
4291
|
+
textColor: isHighContrastMode ? disabledColor : contrastHighColor,
|
|
4292
|
+
borderColor: isHighContrastMode ? disabledColor : loading ? contrastHighColor : disabledColor,
|
|
4293
|
+
backgroundColor: isHighContrastMode ? canvasColor : loading ? contrastHighColor : disabledColor,
|
|
4338
4294
|
},
|
|
4339
4295
|
secondary: {
|
|
4340
4296
|
textColor: disabledColor,
|
|
4341
|
-
borderColor: loading ? contrastMediumColor : disabledColor,
|
|
4342
|
-
backgroundColor: loading ? hoverColor : 'transparent',
|
|
4297
|
+
borderColor: isHighContrastMode ? disabledColor : loading ? contrastMediumColor : disabledColor,
|
|
4298
|
+
backgroundColor: isHighContrastMode ? canvasColor : loading ? hoverColor : 'transparent',
|
|
4343
4299
|
},
|
|
4344
4300
|
};
|
|
4345
4301
|
return colors[variant === 'tertiary' ? 'secondary' : variant];
|
|
@@ -4385,6 +4341,7 @@ const spacingMap = {
|
|
|
4385
4341
|
};
|
|
4386
4342
|
const getComponentCss$S = (width, hasPagination, alignHeader, theme) => {
|
|
4387
4343
|
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
4344
|
+
const { canvasTextColor } = getHighContrastColors();
|
|
4388
4345
|
const isHeaderAlignCenter = alignHeader === 'center';
|
|
4389
4346
|
return getCss(Object.assign({ '@global': {
|
|
4390
4347
|
':host': addImportantToEachRule(Object.assign({ display: 'flex', gap: spacingFluidMedium, flexDirection: 'column', boxSizing: 'content-box' }, hostHiddenStyles)),
|
|
@@ -4395,22 +4352,18 @@ const getComponentCss$S = (width, hasPagination, alignHeader, theme) => {
|
|
|
4395
4352
|
[mediaQueryS]: isHeaderAlignCenter
|
|
4396
4353
|
? {
|
|
4397
4354
|
gridColumn: 2,
|
|
4398
|
-
textAlign: 'center', // relevant when text becomes multiline
|
|
4399
4355
|
}
|
|
4400
4356
|
: {
|
|
4401
4357
|
gridColumn: '1 / 3',
|
|
4402
4358
|
},
|
|
4403
4359
|
}),
|
|
4404
|
-
}, header: {
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
[mediaQueryS]: Object.assign(Object.assign({ fontFamily, fontSize: fontSizeTextSmall, columnGap: spacingStaticMedium, gridTemplateColumns: `${buttonGroupWidth} minmax(0px, 1fr) ${buttonGroupWidth}` }, (isHeaderAlignCenter && {
|
|
4360
|
+
}, header: Object.assign(Object.assign({ display: 'grid', padding: `0 ${spacingMap[width].base}` }, (isHeaderAlignCenter && {
|
|
4361
|
+
textAlign: 'center',
|
|
4362
|
+
})), { [mediaQueryS]: Object.assign(Object.assign({ fontFamily, fontSize: fontSizeTextSmall, columnGap: spacingStaticMedium, gridTemplateColumns: `${buttonGroupWidth} minmax(0px, 1fr) ${buttonGroupWidth}` }, (isHeaderAlignCenter && {
|
|
4408
4363
|
justifyItems: 'center', // relevant when max-width of heading or description is reached
|
|
4409
|
-
})), { padding: `0 ${spacingMap[width].s}` }),
|
|
4410
|
-
[mediaQueryXXL]: {
|
|
4364
|
+
})), { padding: `0 ${spacingMap[width].s}` }), [mediaQueryXXL]: {
|
|
4411
4365
|
padding: `0 ${spacingMap[width].xxl}`,
|
|
4412
|
-
},
|
|
4413
|
-
}, nav: {
|
|
4366
|
+
} }), nav: {
|
|
4414
4367
|
display: 'none',
|
|
4415
4368
|
[mediaQueryS]: {
|
|
4416
4369
|
display: 'flex',
|
|
@@ -4441,21 +4394,21 @@ const getComponentCss$S = (width, hasPagination, alignHeader, theme) => {
|
|
|
4441
4394
|
} }),
|
|
4442
4395
|
'&__list': Object.assign({ display: 'flex', height: '100%' }, getBackfaceVisibilityJssStyle()),
|
|
4443
4396
|
'&__slide': Object.assign(Object.assign({ position: 'relative', flexShrink: 0 }, getBackfaceVisibilityJssStyle()), { transform: 'translateZ(0)' }),
|
|
4444
|
-
'&__sr':
|
|
4397
|
+
'&__sr': getHiddenTextJssStyle(), // appears in the DOM when sliding
|
|
4445
4398
|
} }, (hasPagination && {
|
|
4446
4399
|
pagination: Object.assign(Object.assign({}, buildResponsiveStyles(hasPagination, (hasPaginationValue) => ({
|
|
4447
4400
|
display: hasPaginationValue ? 'flex' : 'none',
|
|
4448
4401
|
}))), { justifyContent: 'center', gap: spacingStaticSmall }),
|
|
4449
4402
|
bullet: {
|
|
4450
4403
|
borderRadius: borderRadiusSmall,
|
|
4451
|
-
background: contrastMediumColor,
|
|
4404
|
+
background: isHighContrastMode ? canvasTextColor : contrastMediumColor,
|
|
4452
4405
|
// set transition to have the same speed as switching slides in splide
|
|
4453
4406
|
transition: `background-color ${carouselTransitionDuration}ms, width ${carouselTransitionDuration}ms`,
|
|
4454
4407
|
width: '8px',
|
|
4455
4408
|
height: '8px',
|
|
4456
4409
|
},
|
|
4457
4410
|
[bulletActiveClass]: {
|
|
4458
|
-
background: primaryColor,
|
|
4411
|
+
background: isHighContrastMode ? canvasTextColor : primaryColor,
|
|
4459
4412
|
width: '20px',
|
|
4460
4413
|
},
|
|
4461
4414
|
})));
|
|
@@ -4483,12 +4436,18 @@ const getFunctionalComponentStateMessageStyles = (theme, state) => {
|
|
|
4483
4436
|
};
|
|
4484
4437
|
};
|
|
4485
4438
|
|
|
4486
|
-
const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, theme) => {
|
|
4439
|
+
const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
4487
4440
|
const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
4488
4441
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
4489
|
-
const
|
|
4442
|
+
const { canvasTextColor } = getHighContrastColors();
|
|
4443
|
+
const disabledOrLoading = isDisabledOrLoading(isDisabled, isLoading);
|
|
4444
|
+
const uncheckedColor = disabledOrLoading ? disabledColor : formStateColor || contrastMediumColor;
|
|
4490
4445
|
const uncheckedHoverColor = formStateHoverColor || primaryColor;
|
|
4491
|
-
const checkedColor =
|
|
4446
|
+
const checkedColor = isHighContrastMode
|
|
4447
|
+
? canvasTextColor
|
|
4448
|
+
: disabledOrLoading
|
|
4449
|
+
? disabledColor
|
|
4450
|
+
: formStateColor || primaryColor;
|
|
4492
4451
|
const checkedHoverColor = formStateHoverColor || contrastHighColor;
|
|
4493
4452
|
return Object.assign(Object.assign({ '@global': {
|
|
4494
4453
|
':host': addImportantToEachRule(Object.assign(Object.assign({}, hostHiddenStyles), { display: 'block' })),
|
|
@@ -4505,56 +4464,77 @@ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, theme) => {
|
|
|
4505
4464
|
WebkitAppearance: 'none',
|
|
4506
4465
|
appearance: 'none',
|
|
4507
4466
|
boxSizing: 'content-box',
|
|
4508
|
-
|
|
4509
|
-
backgroundColor: 'transparent',
|
|
4467
|
+
background: `transparent 0% 0% / ${fontLineHeight}`,
|
|
4510
4468
|
transition: ['border-color', 'background-color'].map(getTransition).join(),
|
|
4511
4469
|
border: `2px solid ${uncheckedColor}`,
|
|
4512
4470
|
outline: 0,
|
|
4513
|
-
cursor:
|
|
4471
|
+
cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
|
|
4514
4472
|
}, '&(input:checked)': {
|
|
4473
|
+
// background-image is merged in later
|
|
4515
4474
|
borderColor: checkedColor,
|
|
4516
4475
|
backgroundColor: checkedColor,
|
|
4517
|
-
} }, (!
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4476
|
+
} }, (!disabledOrLoading && Object.assign(Object.assign({}, (!isHighContrastMode &&
|
|
4477
|
+
hoverMediaQuery({
|
|
4478
|
+
'&(input:hover), .text:hover ~ &(input)': {
|
|
4479
|
+
borderColor: uncheckedHoverColor,
|
|
4480
|
+
},
|
|
4481
|
+
'&(input:checked:hover), .text:hover ~ &(input:checked)': {
|
|
4482
|
+
borderColor: checkedHoverColor,
|
|
4483
|
+
backgroundColor: checkedHoverColor,
|
|
4484
|
+
},
|
|
4485
|
+
}))), (!isDisabled && {
|
|
4486
|
+
'&(input:focus)::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-6)), { border: `${borderWidthBase} solid ${focusColor}` }),
|
|
4487
|
+
'&(input:focus:not(:focus-visible))::before': {
|
|
4526
4488
|
borderColor: 'transparent',
|
|
4527
|
-
}
|
|
4489
|
+
},
|
|
4490
|
+
}))))),
|
|
4528
4491
|
label: {
|
|
4529
4492
|
position: 'relative',
|
|
4530
4493
|
display: 'flex',
|
|
4531
4494
|
alignItems: 'flex-start',
|
|
4532
4495
|
},
|
|
4533
|
-
}, text: Object.assign(Object.assign(Object.assign({ order: 1, cursor:
|
|
4496
|
+
}, text: Object.assign(Object.assign(Object.assign({ order: 1, cursor: disabledOrLoading ? 'default' : 'pointer' }, textSmallStyle), { color: disabledOrLoading ? disabledColor : primaryColor, transition: getTransition('color') }), buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, { padding: `2px 0 0 ${spacingStaticSmall}` }))) }, getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state));
|
|
4534
4497
|
};
|
|
4535
4498
|
|
|
4536
4499
|
const getInlineSVGBackgroundImage = (path) => {
|
|
4537
4500
|
return `url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${path}</svg>')`;
|
|
4538
4501
|
};
|
|
4539
4502
|
|
|
4540
|
-
const getComponentCss$R = (hideLabel, state, isDisabled, theme) => {
|
|
4541
|
-
const
|
|
4542
|
-
const
|
|
4543
|
-
|
|
4544
|
-
'
|
|
4545
|
-
|
|
4503
|
+
const getComponentCss$R = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
4504
|
+
const { canvasColor } = getHighContrastColors();
|
|
4505
|
+
const checkedIconColor = isHighContrastMode
|
|
4506
|
+
? canvasColor
|
|
4507
|
+
: getInvertedThemedColors(theme).primaryColor.replace(/#/g, '%23');
|
|
4508
|
+
const indeterminateIconColor = isHighContrastMode
|
|
4509
|
+
? canvasColor
|
|
4510
|
+
: getThemedColors(theme).primaryColor.replace(/#/g, '%23');
|
|
4511
|
+
return getCss(mergeDeep(getCheckboxRadioJssStyle(hideLabel, state, isDisabled, isLoading, theme), Object.assign({ '@global': {
|
|
4512
|
+
'::slotted': addImportantToEachRule(Object.assign(Object.assign(Object.assign({ '&(input)': {
|
|
4546
4513
|
borderRadius: borderRadiusSmall,
|
|
4547
|
-
},
|
|
4514
|
+
} }, (!isLoading && {
|
|
4515
|
+
'&(input:checked)': {
|
|
4548
4516
|
backgroundImage: getInlineSVGBackgroundImage(`<path fill="${checkedIconColor}" d="m20.22,7.47l-1.47-1.42-9.26,9.02-4.24-4.15-1.47,1.42,5.71,5.6,10.73-10.47Z"/>`),
|
|
4549
|
-
},
|
|
4517
|
+
},
|
|
4518
|
+
})), { '&(input:indeterminate)': {
|
|
4550
4519
|
backgroundImage: getInlineSVGBackgroundImage(`<path fill="${indeterminateIconColor}" d="m20,11v2H4v-2h16Z"/>`),
|
|
4551
|
-
} }, (!isDisabled && {
|
|
4520
|
+
} }), (!isDisabled && {
|
|
4552
4521
|
'&(input:focus)::before': {
|
|
4553
4522
|
borderRadius: borderRadiusMedium,
|
|
4554
4523
|
},
|
|
4555
4524
|
}))),
|
|
4525
|
+
} }, (isLoading && {
|
|
4526
|
+
spinner: {
|
|
4527
|
+
position: 'absolute',
|
|
4528
|
+
top: `calc(${fontLineHeight}/2 + 2px)`,
|
|
4529
|
+
left: `calc(${fontLineHeight}/2 + 2px)`,
|
|
4530
|
+
transform: 'translate(-50%, -50%)',
|
|
4531
|
+
height: fontLineHeight,
|
|
4532
|
+
width: fontLineHeight,
|
|
4533
|
+
fontFamily,
|
|
4534
|
+
fontSize: '1rem',
|
|
4535
|
+
cursor: 'not-allowed',
|
|
4556
4536
|
},
|
|
4557
|
-
}));
|
|
4537
|
+
}))));
|
|
4558
4538
|
};
|
|
4559
4539
|
|
|
4560
4540
|
const widthMap = {
|
|
@@ -4583,19 +4563,33 @@ const getComponentCss$Q = (width) => {
|
|
|
4583
4563
|
});
|
|
4584
4564
|
};
|
|
4585
4565
|
|
|
4566
|
+
const crestSize = {
|
|
4567
|
+
width: 30,
|
|
4568
|
+
height: 40,
|
|
4569
|
+
};
|
|
4570
|
+
|
|
4571
|
+
const { width, height } = crestSize;
|
|
4572
|
+
const getDimensionStyle = {
|
|
4573
|
+
maxWidth: `${width}px`,
|
|
4574
|
+
maxHeight: `${height}px`,
|
|
4575
|
+
width: 'inherit',
|
|
4576
|
+
height: 'inherit',
|
|
4577
|
+
};
|
|
4586
4578
|
const getComponentCss$P = () => {
|
|
4587
4579
|
return getCss({
|
|
4588
4580
|
'@global': {
|
|
4589
|
-
':host': Object.assign({ position: 'relative', display: 'inline-block', verticalAlign: 'top' }, addImportantToEachRule(Object.assign({ outline: 0 }, hostHiddenStyles))),
|
|
4590
|
-
a: Object.assign({ display: 'block', textDecoration: 'none' }, focusPseudoJssStyle),
|
|
4581
|
+
':host': Object.assign({ position: 'relative', display: 'inline-block', verticalAlign: 'top' }, addImportantToEachRule(Object.assign(Object.assign({ outline: 0, boxSizing: 'content-box' }, getDimensionStyle), hostHiddenStyles))),
|
|
4582
|
+
a: Object.assign(Object.assign({ display: 'block', textDecoration: 'none' }, getDimensionStyle), focusPseudoJssStyle),
|
|
4591
4583
|
picture: {
|
|
4592
4584
|
display: 'block',
|
|
4593
|
-
width:
|
|
4594
|
-
height:
|
|
4585
|
+
width: `min(${width}px, 100%)`,
|
|
4586
|
+
height: `min(${height}px, 100%)`,
|
|
4595
4587
|
},
|
|
4596
4588
|
img: {
|
|
4597
4589
|
display: 'block',
|
|
4598
|
-
|
|
4590
|
+
maxWidth: '100%',
|
|
4591
|
+
maxHeight: '100%',
|
|
4592
|
+
width: 'auto',
|
|
4599
4593
|
height: 'auto',
|
|
4600
4594
|
},
|
|
4601
4595
|
},
|
|
@@ -4661,7 +4655,7 @@ const getComponentCss$N = (color, orientation, theme) => {
|
|
|
4661
4655
|
return getCss({
|
|
4662
4656
|
'@global': {
|
|
4663
4657
|
':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
|
|
4664
|
-
hr: Object.assign({ margin: 0, padding: 0, border: 'none', textAlign: 'left', background: colorMap[color] }, buildResponsiveStyles(orientation, (o) => o === 'horizontal' ? { height: '1px', width: '100%' } : { height: '100%', width: '1px' })),
|
|
4658
|
+
hr: Object.assign({ margin: 0, padding: 0, border: 'none', textAlign: 'left', background: isHighContrastMode ? getHighContrastColors().canvasTextColor : colorMap[color] }, buildResponsiveStyles(orientation, (o) => o === 'horizontal' ? { height: '1px', width: '100%' } : { height: '100%', width: '1px' })),
|
|
4665
4659
|
},
|
|
4666
4660
|
});
|
|
4667
4661
|
};
|
|
@@ -4912,10 +4906,12 @@ const getComponentCss$E = (color, size, theme) => {
|
|
|
4912
4906
|
const isSizeInherit = size === 'inherit';
|
|
4913
4907
|
const isDark = isThemeDark(theme);
|
|
4914
4908
|
return getCss({
|
|
4915
|
-
'@global': Object.assign({ ':host': Object.assign({ display: 'inline-block', verticalAlign: 'top' }, addImportantToEachRule(hostHiddenStyles)), img: Object.assign(Object.assign({ display: 'block', margin: 0, padding: 0 }, (!isColorInherit && {
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4909
|
+
'@global': Object.assign({ ':host': Object.assign({ display: 'inline-block', verticalAlign: 'top' }, addImportantToEachRule(hostHiddenStyles)), img: Object.assign(Object.assign({ display: 'block', margin: 0, padding: 0 }, (!isColorInherit && Object.assign(Object.assign({ filter: filter[theme][color] }, (isHighContrastMode &&
|
|
4910
|
+
getSchemedHighContrastMediaQuery({
|
|
4911
|
+
filter: filter.light[color],
|
|
4912
|
+
}, {
|
|
4913
|
+
filter: filter.dark[color],
|
|
4914
|
+
}))), { WebkitAnimation: `${isDark ? `${keyFramesDark}-${color}` : `${keyFramesLight}-${color}`} 1ms` }))), (isSizeInherit
|
|
4919
4915
|
? {
|
|
4920
4916
|
width: size,
|
|
4921
4917
|
height: size,
|
|
@@ -4925,7 +4921,7 @@ const getComponentCss$E = (color, size, theme) => {
|
|
|
4925
4921
|
height: fontLineHeight,
|
|
4926
4922
|
font: `${sizeMap$2[size]} ${fontFamily}`,
|
|
4927
4923
|
})) }, (!isColorInherit && {
|
|
4928
|
-
[`@keyframes ${isDark ? keyFramesDark : keyFramesLight}`]: forceRerenderAnimationStyle,
|
|
4924
|
+
[`@keyframes ${isDark ? `${keyFramesDark}-${color}` : `${keyFramesLight}-${color}`}`]: forceRerenderAnimationStyle,
|
|
4929
4925
|
})),
|
|
4930
4926
|
});
|
|
4931
4927
|
};
|
|
@@ -4944,20 +4940,14 @@ const getBackgroundColor = (state, theme) => {
|
|
|
4944
4940
|
return colorMap[state];
|
|
4945
4941
|
};
|
|
4946
4942
|
const getNotificationRootJssStyle = (state, hasAction, hasClose, theme) => {
|
|
4947
|
-
return {
|
|
4948
|
-
display: 'grid',
|
|
4943
|
+
return Object.assign(Object.assign({ display: 'grid',
|
|
4949
4944
|
// 2 columns for content and optional close button
|
|
4950
|
-
gridTemplateColumns: `minmax(auto, 1fr)${hasClose ? ' auto' : ''}`,
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
padding: spacingStaticMedium,
|
|
4954
|
-
background: getBackgroundColor(state, theme),
|
|
4955
|
-
borderRadius: borderRadiusSmall,
|
|
4956
|
-
[mediaQueryMinS$1]: {
|
|
4945
|
+
gridTemplateColumns: `minmax(auto, 1fr)${hasClose ? ' auto' : ''}`, gap: spacingStaticMedium, placeItems: 'start', padding: spacingStaticMedium, background: getBackgroundColor(state, theme), borderRadius: borderRadiusSmall }, (isHighContrastMode && {
|
|
4946
|
+
outline: '1px solid transparent',
|
|
4947
|
+
})), { [mediaQueryMinS$1]: {
|
|
4957
4948
|
// 4 columns are for icon, content, optional action button and optional close button
|
|
4958
4949
|
gridTemplateColumns: `auto minmax(auto, 1fr)${hasAction ? ' auto' : ''}${hasClose ? ' auto' : ''}`,
|
|
4959
|
-
}
|
|
4960
|
-
};
|
|
4950
|
+
} });
|
|
4961
4951
|
};
|
|
4962
4952
|
const getNotificationIconJssStyle = () => ({
|
|
4963
4953
|
[mediaQueryMaxS$1]: {
|
|
@@ -4994,7 +4984,6 @@ const getComponentCss$D = (state, hasAction, hasClose, theme) => {
|
|
|
4994
4984
|
|
|
4995
4985
|
const getComponentCss$C = (icon, iconSource, active, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor, theme) => {
|
|
4996
4986
|
const { focusColor } = getThemedColors(theme);
|
|
4997
|
-
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4998
4987
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme), Object.assign(Object.assign({}, (hasSlottedAnchor && {
|
|
4999
4988
|
'@global': addImportantToEachRule({
|
|
5000
4989
|
'::slotted': {
|
|
@@ -5004,7 +4993,7 @@ const getComponentCss$C = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
5004
4993
|
// (https://bugs.webkit.org/show_bug.cgi?id=178237)
|
|
5005
4994
|
'&(a)::before': Object.assign({ content: '""', position: 'fixed', top: offsetVertical, bottom: offsetVertical, borderRadius: borderRadiusSmall }, buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
5006
4995
|
right: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
5007
|
-
left: hideLabelValue
|
|
4996
|
+
left: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
5008
4997
|
}))),
|
|
5009
4998
|
'&(a:focus)::before': {
|
|
5010
4999
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
@@ -5021,8 +5010,12 @@ const getComponentCss$C = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
5021
5010
|
|
|
5022
5011
|
const getComponentCss$B = (icon, iconSource, variant, hideLabel, hasSlottedAnchor, theme) => {
|
|
5023
5012
|
const { focusColor } = getThemedColors(theme);
|
|
5024
|
-
|
|
5025
|
-
|
|
5013
|
+
const { linkColor } = getHighContrastColors();
|
|
5014
|
+
return getCss(mergeDeep(getLinkButtonStyles(icon, iconSource, variant, hideLabel, false, hasSlottedAnchor, theme), Object.assign({}, (hasSlottedAnchor && Object.assign(Object.assign({}, (isHighContrastMode && {
|
|
5015
|
+
root: {
|
|
5016
|
+
borderColor: linkColor,
|
|
5017
|
+
},
|
|
5018
|
+
})), { '@global': addImportantToEachRule({
|
|
5026
5019
|
'::slotted': {
|
|
5027
5020
|
'&(a)': Object.assign(Object.assign({}, getResetInitialStylesForSlottedAnchor), { outline: 0, textDecoration: 'none', font: 'inherit', color: 'inherit' }),
|
|
5028
5021
|
// The clickable area for Safari < ~15 (<= release date: 2021-10-28) is reduced to the slotted anchor itself,
|
|
@@ -5040,10 +5033,10 @@ const getComponentCss$B = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
5040
5033
|
border: 0,
|
|
5041
5034
|
},
|
|
5042
5035
|
},
|
|
5043
|
-
})
|
|
5044
|
-
}))));
|
|
5036
|
+
}) })))));
|
|
5045
5037
|
};
|
|
5046
5038
|
|
|
5039
|
+
// array is redefined instead of using the one from in model-signature
|
|
5047
5040
|
const LINK_TILE_MODEL_SIGNATURE_HEADING_TAGS = ['h2', 'h3', 'h4', 'h5', 'h6'];
|
|
5048
5041
|
|
|
5049
5042
|
const getComponentCss$A = (aspectRatio, weight, direction, hasDescription) => {
|
|
@@ -5095,7 +5088,7 @@ const getComponentCss$y = (size) => {
|
|
|
5095
5088
|
|
|
5096
5089
|
const mediaQueryXl = getMediaQueryMin('xl');
|
|
5097
5090
|
const { backgroundColor, primaryColor: lightThemePrimaryColor } = getThemedColors('light');
|
|
5098
|
-
const { primaryColor: darkThemePrimaryColor } = getThemedColors('dark');
|
|
5091
|
+
const { primaryColor: darkThemePrimaryColor, contrastHighColor: darkThemeContrastHighColor } = getThemedColors('dark');
|
|
5099
5092
|
const transitionTimingFunction = 'cubic-bezier(.16,1,.3,1)';
|
|
5100
5093
|
const stretchToFullModalWidthClassName = 'stretch-to-full-modal-width';
|
|
5101
5094
|
const getFullscreenJssStyles = (fullscreen) => {
|
|
@@ -5178,7 +5171,7 @@ const getComponentCss$x = (isOpen, isFullscreen, hasDismissButton, hasHeader) =>
|
|
|
5178
5171
|
transition: `opacity ${duration} ${transitionTimingFunction},transform ${duration} ${transitionTimingFunction}`,
|
|
5179
5172
|
padding: hasDismissButton ? `${pxToRemWithUnit(32)} 32px 32px 32px` : '32px',
|
|
5180
5173
|
background: backgroundColor,
|
|
5181
|
-
outline: 0,
|
|
5174
|
+
outline: isHighContrastMode ? '1px solid transparent' : 0,
|
|
5182
5175
|
'&:focus::before': Object.assign({ content: '""', position: 'fixed', border: `${borderWidthBase} solid`, pointerEvents: 'none' }, buildResponsiveStyles(isFullscreen, (fullscreenValue) => (Object.assign({ borderRadius: fullscreenValue ? 0 : '12px', borderColor: fullscreenValue ? lightThemePrimaryColor : darkThemePrimaryColor }, getInsetJssStyle(fullscreenValue ? 0 : -4))))),
|
|
5183
5176
|
'&:not(:focus-visible)::before': {
|
|
5184
5177
|
border: 0,
|
|
@@ -5193,13 +5186,15 @@ const getComponentCss$x = (isOpen, isFullscreen, hasDismissButton, hasHeader) =>
|
|
|
5193
5186
|
})), (hasDismissButton && {
|
|
5194
5187
|
dismiss: Object.assign({ position: 'absolute', top: '8px', right: '8px', border: `2px solid ${backgroundColor}`, borderRadius: '4px', background: backgroundColor }, hoverMediaQuery({
|
|
5195
5188
|
'&:hover': {
|
|
5196
|
-
background:
|
|
5197
|
-
borderColor:
|
|
5189
|
+
background: darkThemeContrastHighColor,
|
|
5190
|
+
borderColor: darkThemeContrastHighColor,
|
|
5198
5191
|
},
|
|
5199
5192
|
})),
|
|
5200
5193
|
})));
|
|
5201
5194
|
};
|
|
5202
5195
|
|
|
5196
|
+
const modelSignatureHeight = 36;
|
|
5197
|
+
|
|
5203
5198
|
const colorToFilterMap = {
|
|
5204
5199
|
light: {
|
|
5205
5200
|
primary: filterLightPrimary,
|
|
@@ -5219,8 +5214,18 @@ const getComponentCss$w = (size, color, theme) => {
|
|
|
5219
5214
|
const isColorInherit = color === 'inherit';
|
|
5220
5215
|
return getCss({
|
|
5221
5216
|
'@global': {
|
|
5222
|
-
':host': Object.assign({ display: 'block' }, addImportantToEachRule(
|
|
5223
|
-
|
|
5217
|
+
':host': Object.assign({ display: 'inline-block', verticalAlign: 'top' }, addImportantToEachRule(Object.assign(Object.assign({ maxWidth: '100%', maxHeight: '100%' }, (!isSizeInherit && {
|
|
5218
|
+
width: 'inherit',
|
|
5219
|
+
height: 'inherit',
|
|
5220
|
+
// TODO: we need a width map of all signatures to ensure same fluid behavior like implemented fro crest + wordmark
|
|
5221
|
+
maxHeight: `${modelSignatureHeight}px`,
|
|
5222
|
+
})), hostHiddenStyles))),
|
|
5223
|
+
img: Object.assign(Object.assign({ display: 'block', maxWidth: '100%', maxHeight: '100%', pointerEvents: 'none' }, (!isColorInherit && Object.assign({ filter: colorToFilterMap[theme][color] }, (isHighContrastMode &&
|
|
5224
|
+
getSchemedHighContrastMediaQuery({
|
|
5225
|
+
filter: colorToFilterMap.light[color],
|
|
5226
|
+
}, {
|
|
5227
|
+
filter: colorToFilterMap.dark[color],
|
|
5228
|
+
}))))), (isSizeInherit && { height: size })),
|
|
5224
5229
|
},
|
|
5225
5230
|
});
|
|
5226
5231
|
};
|
|
@@ -5280,7 +5285,7 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
5280
5285
|
};
|
|
5281
5286
|
|
|
5282
5287
|
const { backgroundColor: backgroundColorThemeLight, primaryColor: primaryColorThemeLight } = getThemedColors('light');
|
|
5283
|
-
const
|
|
5288
|
+
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
5284
5289
|
const directionPositionMap = {
|
|
5285
5290
|
top: {
|
|
5286
5291
|
bottom: '100%',
|
|
@@ -5305,8 +5310,6 @@ const directionPositionMap = {
|
|
|
5305
5310
|
};
|
|
5306
5311
|
const borderWidth = '12px';
|
|
5307
5312
|
const transparentColor = 'transparent';
|
|
5308
|
-
const canvas = 'canvas';
|
|
5309
|
-
const canvasText = 'canvastext';
|
|
5310
5313
|
const join = (...arr) => arr.join(' ');
|
|
5311
5314
|
const directionArrowMap = {
|
|
5312
5315
|
top: {
|
|
@@ -5314,40 +5317,36 @@ const directionArrowMap = {
|
|
|
5314
5317
|
left: '50%',
|
|
5315
5318
|
transform: 'translateX(-50%)',
|
|
5316
5319
|
borderWidth: join(borderWidth, borderWidth, 0),
|
|
5317
|
-
borderColor:
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
},
|
|
5320
|
+
borderColor: isHighContrastMode
|
|
5321
|
+
? join(canvasTextColor, canvasColor, canvasColor)
|
|
5322
|
+
: join(backgroundColorThemeLight, transparentColor, transparentColor),
|
|
5321
5323
|
},
|
|
5322
5324
|
right: {
|
|
5323
5325
|
top: '50%',
|
|
5324
5326
|
right: 0,
|
|
5325
5327
|
transform: 'translateY(-50%)',
|
|
5326
5328
|
borderWidth: join(borderWidth, borderWidth, borderWidth, 0),
|
|
5327
|
-
borderColor:
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
},
|
|
5329
|
+
borderColor: isHighContrastMode
|
|
5330
|
+
? join(canvasColor, canvasTextColor, canvasColor, canvasColor)
|
|
5331
|
+
: join(transparentColor, backgroundColorThemeLight, transparentColor, transparentColor),
|
|
5331
5332
|
},
|
|
5332
5333
|
bottom: {
|
|
5333
5334
|
bottom: 0,
|
|
5334
5335
|
left: '50%',
|
|
5335
5336
|
transform: 'translateX(-50%)',
|
|
5336
5337
|
borderWidth: join(0, borderWidth, borderWidth),
|
|
5337
|
-
borderColor:
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
},
|
|
5338
|
+
borderColor: isHighContrastMode
|
|
5339
|
+
? join(canvasColor, canvasColor, canvasTextColor)
|
|
5340
|
+
: join(transparentColor, transparentColor, backgroundColorThemeLight),
|
|
5341
5341
|
},
|
|
5342
5342
|
left: {
|
|
5343
5343
|
top: '50%',
|
|
5344
5344
|
left: 0,
|
|
5345
5345
|
transform: 'translateY(-50%)',
|
|
5346
5346
|
borderWidth: join(borderWidth, 0, borderWidth, borderWidth),
|
|
5347
|
-
borderColor:
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
},
|
|
5347
|
+
borderColor: isHighContrastMode
|
|
5348
|
+
? join(canvasColor, canvasColor, canvasColor, canvasTextColor)
|
|
5349
|
+
: join(transparentColor, transparentColor, transparentColor, backgroundColorThemeLight),
|
|
5351
5350
|
},
|
|
5352
5351
|
};
|
|
5353
5352
|
const getComponentCss$u = (direction, theme) => {
|
|
@@ -5366,7 +5365,7 @@ const getComponentCss$u = (direction, theme) => {
|
|
|
5366
5365
|
borderColor: 'transparent',
|
|
5367
5366
|
} }),
|
|
5368
5367
|
},
|
|
5369
|
-
label:
|
|
5368
|
+
label: getHiddenTextJssStyle(),
|
|
5370
5369
|
icon: {
|
|
5371
5370
|
display: 'inline-block',
|
|
5372
5371
|
transform: 'translate3d(0,0,0)', // Fixes movement on hover in Safari
|
|
@@ -5385,9 +5384,9 @@ const getComponentCss$u = (direction, theme) => {
|
|
|
5385
5384
|
,
|
|
5386
5385
|
'&::before': Object.assign({ content: '""', position: 'absolute', borderStyle: 'solid' }, directionArrowMap[direction]),
|
|
5387
5386
|
},
|
|
5388
|
-
popover: Object.assign(Object.assign(Object.assign({ position: 'absolute', maxWidth: 'min(90vw, 27rem)', width: 'max-content', boxSizing: 'border-box', background: backgroundColorThemeLight, padding: '8px 16px', pointerEvents: 'auto' }, directionPositionMap[direction]), textSmallStyle), { listStyleType: 'none', color: primaryColorThemeLight, whiteSpace: 'inherit', borderRadius: borderRadiusSmall,
|
|
5389
|
-
|
|
5390
|
-
|
|
5387
|
+
popover: Object.assign(Object.assign(Object.assign(Object.assign({ position: 'absolute', maxWidth: 'min(90vw, 27rem)', width: 'max-content', boxSizing: 'border-box', background: backgroundColorThemeLight, padding: '8px 16px', pointerEvents: 'auto' }, directionPositionMap[direction]), textSmallStyle), { listStyleType: 'none', color: primaryColorThemeLight, whiteSpace: 'inherit', borderRadius: borderRadiusSmall }), (isHighContrastMode && {
|
|
5388
|
+
outline: `1px solid ${canvasTextColor}`,
|
|
5389
|
+
})),
|
|
5391
5390
|
'@keyframes fadeIn': {
|
|
5392
5391
|
from: {
|
|
5393
5392
|
opacity: 0,
|
|
@@ -5400,8 +5399,10 @@ const getComponentCss$u = (direction, theme) => {
|
|
|
5400
5399
|
};
|
|
5401
5400
|
|
|
5402
5401
|
const getComponentCss$t = (hideLabel, state, isDisabled, theme) => {
|
|
5403
|
-
const checkedIconColor =
|
|
5404
|
-
|
|
5402
|
+
const checkedIconColor = isHighContrastMode
|
|
5403
|
+
? getHighContrastColors().canvasColor
|
|
5404
|
+
: getInvertedThemedColors(theme).primaryColor.replace(/#/g, '%23');
|
|
5405
|
+
return getCss(mergeDeep(getCheckboxRadioJssStyle(hideLabel, state, isDisabled, false, theme), {
|
|
5405
5406
|
'@global': {
|
|
5406
5407
|
'::slotted': addImportantToEachRule(Object.assign({ '&(input)': {
|
|
5407
5408
|
borderRadius: '50%',
|
|
@@ -5519,10 +5520,11 @@ const ICON_SIZE = pxToRemWithUnit(24);
|
|
|
5519
5520
|
const ICON_MARGIN = pxToRemWithUnit(4);
|
|
5520
5521
|
const getColors$2 = (isDisabled, isSelected, theme) => {
|
|
5521
5522
|
const { primaryColor, contrastMediumColor, disabledColor, contrastLowColor } = getThemedColors(theme);
|
|
5523
|
+
const { highlightColor } = getHighContrastColors();
|
|
5522
5524
|
return {
|
|
5523
5525
|
buttonColor: isDisabled ? disabledColor : primaryColor,
|
|
5524
5526
|
labelColor: isDisabled ? disabledColor : contrastMediumColor,
|
|
5525
|
-
borderColor: isSelected ? primaryColor : contrastLowColor,
|
|
5527
|
+
borderColor: isSelected ? (isHighContrastMode ? highlightColor : primaryColor) : contrastLowColor,
|
|
5526
5528
|
hoverBorderColor: primaryColor,
|
|
5527
5529
|
};
|
|
5528
5530
|
};
|
|
@@ -5568,6 +5570,7 @@ const getComponentCss$q = (maxWidth) => {
|
|
|
5568
5570
|
},
|
|
5569
5571
|
});
|
|
5570
5572
|
};
|
|
5573
|
+
|
|
5571
5574
|
const getBaseChildStyles = (child, state, theme, additionalDefaultJssStyle) => {
|
|
5572
5575
|
const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
5573
5576
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
@@ -5601,7 +5604,7 @@ const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUni
|
|
|
5601
5604
|
flexDirection: 'column',
|
|
5602
5605
|
gap: spacingStaticXSmall,
|
|
5603
5606
|
position: 'relative',
|
|
5604
|
-
'&__text': Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(hideLabel,
|
|
5607
|
+
'&__text': Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, { width: 'fit-content' }))), textSmallStyle), { color: isDisabled ? disabledColor : primaryColor, transition: getTransition('color'), '&+&': Object.assign({ marginTop: `-${spacingStaticXSmall}`, fontSize: fontSizeTextXSmall }, (!isDisabled && {
|
|
5605
5608
|
color: contrastHighColor,
|
|
5606
5609
|
})) }), hoverMediaQuery({
|
|
5607
5610
|
'&:hover': {
|
|
@@ -5618,14 +5621,10 @@ const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUni
|
|
|
5618
5621
|
})),
|
|
5619
5622
|
}));
|
|
5620
5623
|
};
|
|
5621
|
-
|
|
5622
|
-
const
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
zIndex: 0,
|
|
5626
|
-
cursor: 'pointer',
|
|
5627
|
-
padding: `8px ${ICON_SPACE} 8px ${spacingStaticMedium}`,
|
|
5628
|
-
}))), root: {
|
|
5624
|
+
|
|
5625
|
+
const OPTION_HEIGHT = 40; // optgroups are higher and ignored
|
|
5626
|
+
const getComponentCss$p = (isDisabled, native, hideLabel, state, theme) => {
|
|
5627
|
+
return getCss(Object.assign(Object.assign(Object.assign({ '@global': addImportantToEachRule(Object.assign({ ':host': Object.assign({ display: 'block' }, hostHiddenStyles) }, getBaseChildStyles('select', state, theme, Object.assign({ position: 'static', zIndex: 0, cursor: 'pointer', padding: `8px calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2) 8px ${spacingStaticMedium}` }, (!native && !isDisabled && { borderColor: 'transparent' }))))), root: {
|
|
5629
5628
|
display: 'block',
|
|
5630
5629
|
position: 'relative',
|
|
5631
5630
|
} }, getLabelStyles('select', isDisabled, hideLabel, state, theme, {
|
|
@@ -5642,6 +5641,129 @@ const getComponentCss$p = (isDisabled, hideLabel, state, theme) => {
|
|
|
5642
5641
|
})), getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state)));
|
|
5643
5642
|
};
|
|
5644
5643
|
|
|
5644
|
+
const dropdownPositionVar = '--p-internal-dropdown-position';
|
|
5645
|
+
const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
5646
|
+
const { primaryColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
5647
|
+
const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
|
|
5648
|
+
const isDirectionDown = direction === 'down';
|
|
5649
|
+
return {
|
|
5650
|
+
'@global': {
|
|
5651
|
+
button: Object.assign(Object.assign(Object.assign({ position: 'absolute', top: 0, height: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`, width: '100%', font: textSmallStyle.font.replace('ex', 'ex + 6px'), padding: 0, background: 'transparent', border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`, borderRadius: borderRadiusSmall, outline: '0', cursor: 'pointer', transition: getTransition('border-color'), '&:focus, &:focus ~ ul': {
|
|
5652
|
+
borderColor: primaryColor,
|
|
5653
|
+
} }, hoverMediaQuery({
|
|
5654
|
+
'&:not(:disabled):not(:focus):hover': {
|
|
5655
|
+
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
5656
|
+
},
|
|
5657
|
+
})), { '&:disabled': {
|
|
5658
|
+
cursor: 'not-allowed',
|
|
5659
|
+
borderColor: disabledColor,
|
|
5660
|
+
} }), (isOpen && {
|
|
5661
|
+
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
5662
|
+
[isDirectionDown ? 'borderBottomRightRadius' : 'borderTopRightRadius']: 0,
|
|
5663
|
+
})),
|
|
5664
|
+
},
|
|
5665
|
+
};
|
|
5666
|
+
};
|
|
5667
|
+
const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
5668
|
+
const { primaryColor, backgroundColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
5669
|
+
const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
|
|
5670
|
+
const isDirectionDown = direction === 'down';
|
|
5671
|
+
const placeHolderJssStyle = {
|
|
5672
|
+
opacity: 1,
|
|
5673
|
+
color: disabled ? disabledColor : primaryColor,
|
|
5674
|
+
};
|
|
5675
|
+
return {
|
|
5676
|
+
'@global': {
|
|
5677
|
+
input: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block', position: 'absolute', zIndex: 1, bottom: '2px', left: '2px', width: `calc(100% - (${fontLineHeight} + 6px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2))`, height: `calc(${fontLineHeight} + 6px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`, font: textSmallStyle.font.replace('ex', 'ex + 6px'), padding: `13px ${spacingStaticMedium}`, outline: '0', appearance: 'none', boxSizing: 'border-box', border: '0', borderRadius: borderRadiusSmall, opacity: 0 }, textSmallStyle), { textIndent: 0, cursor: disabled ? 'not-allowed' : 'text', color: primaryColor, background: backgroundColor, '&::placeholder': placeHolderJssStyle, '&::-webkit-input-placeholder': placeHolderJssStyle, '&::-moz-placeholder': placeHolderJssStyle, '&:not(:disabled):focus': {
|
|
5678
|
+
opacity: 1,
|
|
5679
|
+
'&+span, &~ ul': {
|
|
5680
|
+
borderColor: primaryColor,
|
|
5681
|
+
},
|
|
5682
|
+
} }), hoverMediaQuery({
|
|
5683
|
+
'&:not(:disabled)': {
|
|
5684
|
+
'&+span:hover': {
|
|
5685
|
+
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
5686
|
+
},
|
|
5687
|
+
'&:hover': {
|
|
5688
|
+
'&+span, &~ul': {
|
|
5689
|
+
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
5690
|
+
},
|
|
5691
|
+
},
|
|
5692
|
+
},
|
|
5693
|
+
})), { '&+span': Object.assign(Object.assign(Object.assign({
|
|
5694
|
+
// for focus outline and clicking arrow since input ends left of the icon
|
|
5695
|
+
position: 'absolute' }, getInsetJssStyle()), { transition: getTransition('border-color'), pointerEvents: 'all', cursor: disabled ? 'not-allowed' : 'pointer', border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`, borderRadius: borderRadiusSmall }), (isOpen && {
|
|
5696
|
+
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
5697
|
+
[isDirectionDown ? 'borderBottomRightRadius' : 'borderTopRightRadius']: 0,
|
|
5698
|
+
})) }),
|
|
5699
|
+
},
|
|
5700
|
+
};
|
|
5701
|
+
};
|
|
5702
|
+
const getListStyles = (direction, theme) => {
|
|
5703
|
+
const isDirectionDown = direction === 'down';
|
|
5704
|
+
const { primaryColor, backgroundColor, contrastMediumColor, contrastHighColor, backgroundSurfaceColor, disabledColor, } = getThemedColors(theme);
|
|
5705
|
+
const { highlightColor } = getHighContrastColors();
|
|
5706
|
+
return {
|
|
5707
|
+
'@global': {
|
|
5708
|
+
ul: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', flexDirection: 'column', gap: spacingStaticSmall, position: `var(${dropdownPositionVar})`, padding: '6px', margin: 0, background: backgroundColor }, textSmallStyle), { zIndex: 10, left: 0, right: 0, [isDirectionDown ? 'top' : 'bottom']: 'calc(100% - 2px)', boxSizing: 'border-box', maxHeight: `${8.5 * (OPTION_HEIGHT + 8) + 6 + 2}px`, overflowY: 'auto', WebkitOverflowScrolling: 'touch', scrollBehavior: 'smooth', border: `2px solid ${primaryColor}`, [isDirectionDown ? 'borderTop' : 'borderBottom']: addImportantToRule(`1px solid ${contrastMediumColor}`) }), (isDirectionDown
|
|
5709
|
+
? ['borderBottomLeftRadius', 'borderBottomRightRadius']
|
|
5710
|
+
: ['borderTopLeftRadius', 'borderTopRightRadius']).reduce((result, curr) => (Object.assign(Object.assign({}, result), { [curr]: borderRadiusSmall })), {})), { scrollbarWidth: 'thin', scrollbarColor: 'auto', transition: getTransition('border-color'), transform: 'translate3d(0,0,0)' }),
|
|
5711
|
+
},
|
|
5712
|
+
option: Object.assign(Object.assign({ display: 'flex', justifyContent: 'space-between', gap: '12px', padding: `${spacingStaticSmall} 12px`, flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`, color: contrastHighColor, cursor: 'pointer', textAlign: 'left', wordBreak: 'break-word', boxSizing: 'border-box', borderRadius: borderRadiusSmall, transition: ['background-color', 'color'].map(getTransition).join(), '&[role=status]': {
|
|
5713
|
+
cursor: 'not-allowed',
|
|
5714
|
+
}, '&__sr': getHiddenTextJssStyle() }, hoverMediaQuery({
|
|
5715
|
+
'&:not([aria-disabled]):not([role=status]):hover': {
|
|
5716
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
5717
|
+
background: backgroundSurfaceColor,
|
|
5718
|
+
},
|
|
5719
|
+
})), { '&--highlighted, &--selected': {
|
|
5720
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
5721
|
+
background: backgroundSurfaceColor,
|
|
5722
|
+
}, '&--selected': {
|
|
5723
|
+
cursor: 'default',
|
|
5724
|
+
pointerEvents: 'none',
|
|
5725
|
+
}, '&--disabled': {
|
|
5726
|
+
cursor: 'not-allowed',
|
|
5727
|
+
color: disabledColor,
|
|
5728
|
+
}, '&--hidden': {
|
|
5729
|
+
display: 'none',
|
|
5730
|
+
} }),
|
|
5731
|
+
optgroup: {
|
|
5732
|
+
display: 'block',
|
|
5733
|
+
padding: '3px 14px',
|
|
5734
|
+
fontWeight: fontWeightSemiBold,
|
|
5735
|
+
'&:not(:first-child)': {
|
|
5736
|
+
marginTop: spacingStaticSmall,
|
|
5737
|
+
},
|
|
5738
|
+
'&~$option': {
|
|
5739
|
+
paddingLeft: '24px',
|
|
5740
|
+
},
|
|
5741
|
+
},
|
|
5742
|
+
};
|
|
5743
|
+
};
|
|
5744
|
+
const getComponentCss$o = (direction, isOpen, state, disabled, filter, theme) => {
|
|
5745
|
+
const { primaryColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
5746
|
+
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
5747
|
+
return getCss(
|
|
5748
|
+
// merge because of global styles
|
|
5749
|
+
mergeDeep({
|
|
5750
|
+
'@global': {
|
|
5751
|
+
':host': Object.assign({ [dropdownPositionVar]: 'absolute', display: 'block', position: `var(${dropdownPositionVar})`, font: textSmallStyle.font.replace('ex', 'ex + 6px'), marginTop: `calc(-1 * (${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2))`, paddingTop: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`, left: 0, right: 0, color: disabled ? disabledColor : formStateColor || contrastMediumColor }, (!disabled &&
|
|
5752
|
+
!isHighContrastMode &&
|
|
5753
|
+
hoverMediaQuery({
|
|
5754
|
+
'&(:hover)': {
|
|
5755
|
+
color: formStateHoverColor || primaryColor,
|
|
5756
|
+
},
|
|
5757
|
+
}))),
|
|
5758
|
+
},
|
|
5759
|
+
'sr-text': {
|
|
5760
|
+
display: 'none',
|
|
5761
|
+
},
|
|
5762
|
+
}, filter
|
|
5763
|
+
? getFilterStyles(direction, isOpen, state, disabled, theme)
|
|
5764
|
+
: getButtonStyles(direction, isOpen, state, theme), isOpen && getListStyles(direction, theme)));
|
|
5765
|
+
};
|
|
5766
|
+
|
|
5645
5767
|
const sizeSmall = '48px';
|
|
5646
5768
|
const sizeMedium = '72px';
|
|
5647
5769
|
const sizeLarge = '104px';
|
|
@@ -5655,6 +5777,7 @@ const getComponentCss$n = (size, theme) => {
|
|
|
5655
5777
|
const strokeDasharray = '57'; // C = 2πR
|
|
5656
5778
|
const animationDuration = 'var(--p-animation-duration, 2s)';
|
|
5657
5779
|
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
5780
|
+
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
5658
5781
|
return getCss({
|
|
5659
5782
|
'@global': {
|
|
5660
5783
|
':host': addImportantToEachRule(Object.assign({ display: 'inline-flex', verticalAlign: 'top' }, hostHiddenStyles)),
|
|
@@ -5667,13 +5790,13 @@ const getComponentCss$n = (size, theme) => {
|
|
|
5667
5790
|
},
|
|
5668
5791
|
circle: {
|
|
5669
5792
|
'&:first-child': {
|
|
5670
|
-
stroke: contrastMediumColor,
|
|
5793
|
+
stroke: isHighContrastMode ? canvasTextColor : contrastMediumColor,
|
|
5671
5794
|
animation: `$rotate ${animationDuration} linear infinite`, // needs to rotate to eliminate stutter in safari
|
|
5672
5795
|
},
|
|
5673
5796
|
'&:last-child': {
|
|
5674
5797
|
transformOrigin: '0 0',
|
|
5675
5798
|
animation: `$dash ${animationDuration} ease-in-out infinite`,
|
|
5676
|
-
stroke: primaryColor,
|
|
5799
|
+
stroke: isHighContrastMode ? canvasColor : primaryColor,
|
|
5677
5800
|
strokeDasharray: strokeDasharray
|
|
5678
5801
|
,
|
|
5679
5802
|
strokeLinecap: 'round',
|
|
@@ -5703,7 +5826,7 @@ const getComponentCss$n = (size, theme) => {
|
|
|
5703
5826
|
},
|
|
5704
5827
|
},
|
|
5705
5828
|
root: Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(size, (s) => sizeMap$1[s])), { margin: 0, padding: 0, boxSizing: 'border-box', strokeWidth: 1.5 }),
|
|
5706
|
-
'sr-only':
|
|
5829
|
+
'sr-only': getHiddenTextJssStyle(),
|
|
5707
5830
|
});
|
|
5708
5831
|
};
|
|
5709
5832
|
|
|
@@ -5766,7 +5889,7 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
5766
5889
|
height: fontLineHeight,
|
|
5767
5890
|
width: fontLineHeight,
|
|
5768
5891
|
},
|
|
5769
|
-
})), { 'sr-only':
|
|
5892
|
+
})), { 'sr-only': getHiddenTextJssStyle() }));
|
|
5770
5893
|
};
|
|
5771
5894
|
|
|
5772
5895
|
const getComponentCss$l = (size) => {
|
|
@@ -5781,17 +5904,28 @@ const getComponentCss$l = (size) => {
|
|
|
5781
5904
|
const getColors$1 = (checked, disabled, loading, theme) => {
|
|
5782
5905
|
const { primaryColor, contrastMediumColor, successColor, successColorDarken, disabledColor } = getThemedColors(theme);
|
|
5783
5906
|
const { backgroundColor: lightThemeBackgroundColor } = getThemedColors('light');
|
|
5784
|
-
const
|
|
5907
|
+
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
5908
|
+
const checkedColor = isHighContrastMode ? canvasTextColor : successColor;
|
|
5785
5909
|
const disabledOrLoadingColor = isDisabledOrLoading(disabled, loading) && disabledColor;
|
|
5786
5910
|
return {
|
|
5787
5911
|
buttonBorderColor: disabledOrLoadingColor || (checked ? checkedColor : contrastMediumColor),
|
|
5788
|
-
buttonBorderColorHover: checked ? successColorDarken : primaryColor,
|
|
5912
|
+
buttonBorderColorHover: checked ? (isHighContrastMode ? primaryColor : successColorDarken) : primaryColor,
|
|
5789
5913
|
buttonBackgroundColor: checked ? disabledOrLoadingColor || checkedColor : 'transparent',
|
|
5790
|
-
buttonBackgroundColorHover: checked ? successColorDarken : 'transparent',
|
|
5914
|
+
buttonBackgroundColorHover: checked ? (isHighContrastMode ? checkedColor : successColorDarken) : 'transparent',
|
|
5791
5915
|
toggleBackgroundColor: (loading && 'transparent') ||
|
|
5792
5916
|
(disabled && !checked && disabledColor) ||
|
|
5793
|
-
(checked
|
|
5794
|
-
|
|
5917
|
+
(checked
|
|
5918
|
+
? isHighContrastMode
|
|
5919
|
+
? canvasColor
|
|
5920
|
+
: lightThemeBackgroundColor
|
|
5921
|
+
: isHighContrastMode
|
|
5922
|
+
? canvasTextColor
|
|
5923
|
+
: primaryColor),
|
|
5924
|
+
toggleBackgroundColorHover: checked
|
|
5925
|
+
? lightThemeBackgroundColor
|
|
5926
|
+
: isHighContrastMode
|
|
5927
|
+
? canvasTextColor
|
|
5928
|
+
: primaryColor,
|
|
5795
5929
|
textColor: disabledOrLoadingColor || primaryColor,
|
|
5796
5930
|
};
|
|
5797
5931
|
};
|
|
@@ -5845,7 +5979,7 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
5845
5979
|
},
|
|
5846
5980
|
})), { label: Object.assign(Object.assign(Object.assign({}, textSmallStyle), { paddingTop: '2px', minWidth: 0, minHeight: 0, color: textColor }), mergeDeep(buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
5847
5981
|
order: alignLabelValue === 'left' ? -1 : 0,
|
|
5848
|
-
})), buildResponsiveStyles(hideLabel,
|
|
5982
|
+
})), buildResponsiveStyles(hideLabel, getHiddenTextJssStyle))) }));
|
|
5849
5983
|
};
|
|
5850
5984
|
|
|
5851
5985
|
const getComponentCss$j = () => {
|
|
@@ -5877,11 +6011,12 @@ const getComponentCss$h = (theme) => {
|
|
|
5877
6011
|
return getCss({
|
|
5878
6012
|
'@global': {
|
|
5879
6013
|
':host': addImportantToEachRule(Object.assign(Object.assign(Object.assign({ display: 'block' }, textSmallStyle), { color: primaryColor, textAlign: 'left' }), hostHiddenStyles)),
|
|
5880
|
-
'::slotted(*)': addImportantToEachRule({
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
6014
|
+
'::slotted(*)': addImportantToEachRule(Object.assign({ [cssVariableTableHoverColor]: hoverColor, [cssVariableTableBorderColor]: contrastLowColor, [cssVariableTableHeadCellIconFilter]: isThemeDark(theme) ? 'invert(100%)' : 'none' }, (isHighContrastMode &&
|
|
6015
|
+
getSchemedHighContrastMediaQuery({
|
|
6016
|
+
[cssVariableTableHeadCellIconFilter]: 'none',
|
|
6017
|
+
}, {
|
|
6018
|
+
[cssVariableTableHeadCellIconFilter]: 'invert(100%)',
|
|
6019
|
+
})))),
|
|
5885
6020
|
},
|
|
5886
6021
|
caption: {
|
|
5887
6022
|
marginBottom: spacingFluidMedium,
|
|
@@ -5926,7 +6061,7 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
|
5926
6061
|
} }),
|
|
5927
6062
|
}
|
|
5928
6063
|
: hideLabel && {
|
|
5929
|
-
span: Object.assign(Object.assign({},
|
|
6064
|
+
span: Object.assign(Object.assign({}, getHiddenTextJssStyle()), { display: 'block', border: 0 }),
|
|
5930
6065
|
})) }, (sortable && {
|
|
5931
6066
|
icon: {
|
|
5932
6067
|
transition: getTransition('opacity'),
|
|
@@ -5996,10 +6131,10 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
5996
6131
|
display: 'block',
|
|
5997
6132
|
position: 'absolute',
|
|
5998
6133
|
width: 0,
|
|
5999
|
-
height:
|
|
6134
|
+
height: '2px',
|
|
6000
6135
|
left: 0,
|
|
6001
|
-
bottom: '-
|
|
6002
|
-
background: primaryColor,
|
|
6136
|
+
bottom: isHighContrastMode ? '0' : '-2px',
|
|
6137
|
+
background: isHighContrastMode ? getHighContrastColors().canvasTextColor : primaryColor,
|
|
6003
6138
|
'&--enable-transition': {
|
|
6004
6139
|
willChange: 'width',
|
|
6005
6140
|
transition: `transform ${tabsTransitionDuration},width ${tabsTransitionDuration}`,
|
|
@@ -6060,7 +6195,7 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
6060
6195
|
const backgroundColor = getThemedBackgroundColor(color, themedColors);
|
|
6061
6196
|
return getCss(Object.assign(Object.assign({ '@global': {
|
|
6062
6197
|
':host': addImportantToEachRule(Object.assign({ display: 'inline-block', verticalAlign: 'top', outline: 0 }, hostHiddenStyles)),
|
|
6063
|
-
button: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', position: 'relative', alignItems: 'center', gap: '12px', minHeight: '54px', padding: '4px 0 4px 12px', borderRadius: borderRadiusSmall, border: 0, cursor: 'pointer', background: backgroundColor, color: primaryColor, textAlign: 'left' }, textSmallStyle), { outline: 0 }), getTagFocusJssStyle(themedColors)), hoverMediaQuery({
|
|
6198
|
+
button: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', position: 'relative', alignItems: 'center', gap: '12px', minHeight: '54px', padding: '4px 0 4px 12px', borderRadius: borderRadiusSmall, border: 0, cursor: 'pointer', background: backgroundColor, color: primaryColor, textAlign: 'left' }, textSmallStyle), { outline: isHighContrastMode ? '1px solid transparent' : 0 }), getTagFocusJssStyle(themedColors)), hoverMediaQuery({
|
|
6064
6199
|
'&:hover > .icon': {
|
|
6065
6200
|
backgroundColor: hoverColor,
|
|
6066
6201
|
},
|
|
@@ -6077,7 +6212,7 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
6077
6212
|
marginRight: '10px',
|
|
6078
6213
|
transition: getTransition('background-color'),
|
|
6079
6214
|
borderRadius: borderRadiusSmall,
|
|
6080
|
-
}, 'sr-only':
|
|
6215
|
+
}, 'sr-only': getHiddenTextJssStyle() }));
|
|
6081
6216
|
};
|
|
6082
6217
|
|
|
6083
6218
|
const getThemedBackgroundHoverColor = (tagColor, themedColors, theme) => {
|
|
@@ -6110,7 +6245,9 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
6110
6245
|
return getCss({
|
|
6111
6246
|
'@global': {
|
|
6112
6247
|
':host': Object.assign({ display: 'inline-flex', verticalAlign: 'top' }, addImportantToEachRule(hostHiddenStyles)),
|
|
6113
|
-
span: Object.assign({ display: 'flex', gap: '2px', alignItems: 'center', position: 'relative', padding: '4px 9px', borderRadius: borderRadiusSmall, background: backgroundColor, color: primaryColor, font: textXSmallStyle.font, whiteSpace: 'nowrap' }, (
|
|
6248
|
+
span: Object.assign(Object.assign({ display: 'flex', gap: '2px', alignItems: 'center', position: 'relative', padding: '4px 9px', borderRadius: borderRadiusSmall, background: backgroundColor, color: primaryColor, font: textXSmallStyle.font, whiteSpace: 'nowrap' }, (isHighContrastMode && {
|
|
6249
|
+
outline: '1px solid transparent',
|
|
6250
|
+
})), (isFocusable &&
|
|
6114
6251
|
hoverMediaQuery({
|
|
6115
6252
|
transition: getTransition('background-color'),
|
|
6116
6253
|
'&:hover': {
|
|
@@ -6203,7 +6340,7 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
6203
6340
|
},
|
|
6204
6341
|
})), getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state)), {
|
|
6205
6342
|
// TODO: could be made conditional if we had hasUnit
|
|
6206
|
-
'sr-only': Object.assign(Object.assign({},
|
|
6343
|
+
'sr-only': Object.assign(Object.assign({}, getHiddenTextJssStyle()), { padding: 0 }) }));
|
|
6207
6344
|
};
|
|
6208
6345
|
|
|
6209
6346
|
/** @deprecated */
|
|
@@ -6300,7 +6437,7 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
6300
6437
|
color: contrastMediumColor,
|
|
6301
6438
|
},
|
|
6302
6439
|
})), getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state)), (hasCounter && {
|
|
6303
|
-
'sr-only': Object.assign(Object.assign({},
|
|
6440
|
+
'sr-only': Object.assign(Object.assign({}, getHiddenTextJssStyle()), { padding: 0 }),
|
|
6304
6441
|
})));
|
|
6305
6442
|
};
|
|
6306
6443
|
|
|
@@ -6354,12 +6491,16 @@ const getComponentCss$1 = () => {
|
|
|
6354
6491
|
const getComponentCss = (size, theme) => {
|
|
6355
6492
|
return getCss({
|
|
6356
6493
|
'@global': {
|
|
6357
|
-
':host': Object.assign({ position: 'relative', display: 'inline-block', verticalAlign: 'top' }, addImportantToEachRule(Object.assign(Object.assign({ outline: 0, boxSizing: 'content-box' }, (!(size === 'inherit') && { height: 'clamp(0.63rem, 0.42vw + 0.5rem, 1rem)' })), hostHiddenStyles))),
|
|
6358
|
-
a
|
|
6359
|
-
svg: {
|
|
6494
|
+
':host': Object.assign({ position: 'relative', display: 'inline-block', verticalAlign: 'top' }, addImportantToEachRule(Object.assign(Object.assign({ outline: 0, maxWidth: '100%', maxHeight: '100%', boxSizing: 'content-box' }, (!(size === 'inherit') && { height: 'clamp(0.63rem, 0.42vw + 0.5rem, 1rem)' })), hostHiddenStyles))),
|
|
6495
|
+
'a, svg': {
|
|
6360
6496
|
display: 'block',
|
|
6497
|
+
maxWidth: '100%',
|
|
6498
|
+
maxHeight: '100%',
|
|
6361
6499
|
height: 'inherit',
|
|
6362
|
-
|
|
6500
|
+
},
|
|
6501
|
+
a: Object.assign({ textDecoration: 'none' }, focusPseudoJssStyle),
|
|
6502
|
+
svg: {
|
|
6503
|
+
fill: isHighContrastMode ? getHighContrastColors().canvasTextColor : getThemedColors(theme).primaryColor,
|
|
6363
6504
|
},
|
|
6364
6505
|
},
|
|
6365
6506
|
});
|
|
@@ -6404,6 +6545,7 @@ exports.getScrollerCss = getComponentCss$s;
|
|
|
6404
6545
|
exports.getSegmentedControlCss = getComponentCss$q;
|
|
6405
6546
|
exports.getSegmentedControlItemCss = getComponentCss$r;
|
|
6406
6547
|
exports.getSelectWrapperCss = getComponentCss$p;
|
|
6548
|
+
exports.getSelectWrapperDropdownCss = getComponentCss$o;
|
|
6407
6549
|
exports.getSpinnerCss = getComponentCss$n;
|
|
6408
6550
|
exports.getStepperHorizontalCss = getComponentCss$l;
|
|
6409
6551
|
exports.getStepperHorizontalItemCss = getComponentCss$m;
|