@porsche-design-system/components-react 3.7.0-rc.0 → 3.7.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 +39 -0
- package/LICENSE.md +115 -0
- package/cjs/lib/components/pin-code.wrapper.cjs +26 -0
- package/cjs/lib/components/radio-button-wrapper.wrapper.cjs +3 -3
- package/cjs/public-api.cjs +2 -0
- package/esm/lib/components/accordion.wrapper.d.ts +1 -1
- package/esm/lib/components/banner.wrapper.d.ts +1 -1
- package/esm/lib/components/button-pure.wrapper.d.ts +1 -1
- package/esm/lib/components/button-tile.wrapper.d.ts +1 -1
- package/esm/lib/components/button.wrapper.d.ts +1 -1
- package/esm/lib/components/carousel.wrapper.d.ts +1 -1
- package/esm/lib/components/checkbox-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/content-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/display.wrapper.d.ts +1 -1
- package/esm/lib/components/divider.wrapper.d.ts +1 -1
- package/esm/lib/components/fieldset-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/fieldset.wrapper.d.ts +1 -1
- package/esm/lib/components/flyout.wrapper.d.ts +1 -1
- package/esm/lib/components/heading.wrapper.d.ts +1 -1
- package/esm/lib/components/headline.wrapper.d.ts +1 -1
- package/esm/lib/components/icon.wrapper.d.ts +1 -1
- package/esm/lib/components/index.d.ts +1 -0
- package/esm/lib/components/inline-notification.wrapper.d.ts +1 -1
- package/esm/lib/components/link-pure.wrapper.d.ts +1 -1
- package/esm/lib/components/link-social.wrapper.d.ts +1 -1
- package/esm/lib/components/link-tile.wrapper.d.ts +1 -1
- package/esm/lib/components/link.wrapper.d.ts +1 -1
- package/esm/lib/components/modal.wrapper.d.ts +4 -2
- package/esm/lib/components/model-signature.wrapper.d.ts +1 -1
- package/esm/lib/components/multi-select.wrapper.d.ts +1 -1
- package/esm/lib/components/pagination.wrapper.d.ts +1 -1
- package/esm/lib/components/pin-code.wrapper.d.ts +120 -0
- package/esm/lib/components/pin-code.wrapper.mjs +24 -0
- package/esm/lib/components/popover.wrapper.d.ts +1 -1
- package/esm/lib/components/radio-button-wrapper.wrapper.d.ts +9 -1
- package/esm/lib/components/radio-button-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/scroller.wrapper.d.ts +1 -1
- package/esm/lib/components/segmented-control.wrapper.d.ts +1 -1
- package/esm/lib/components/select-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/spinner.wrapper.d.ts +1 -1
- package/esm/lib/components/stepper-horizontal.wrapper.d.ts +1 -1
- package/esm/lib/components/switch.wrapper.d.ts +1 -1
- package/esm/lib/components/table.wrapper.d.ts +1 -1
- package/esm/lib/components/tabs-bar.wrapper.d.ts +1 -1
- package/esm/lib/components/tabs.wrapper.d.ts +1 -1
- package/esm/lib/components/tag-dismissible.wrapper.d.ts +1 -1
- package/esm/lib/components/tag.wrapper.d.ts +1 -1
- package/esm/lib/components/text-field-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/text-list.wrapper.d.ts +1 -1
- package/esm/lib/components/text.wrapper.d.ts +1 -1
- package/esm/lib/components/textarea-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/toast.wrapper.d.ts +1 -1
- package/esm/lib/components/wordmark.wrapper.d.ts +1 -1
- package/esm/lib/types.d.ts +18 -2
- package/esm/public-api.mjs +1 -0
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +1027 -250
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +19 -17
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/pin-code.wrapper.cjs +40 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +8 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +6 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +96 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.cjs +68 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-head-cell.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/public-api.cjs +2 -0
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +993 -217
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +19 -17
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pin-code.wrapper.mjs +38 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +10 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/content-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.mjs +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.mjs +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/marque.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/model-signature.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +8 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +94 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.mjs +68 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-head-cell.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/public-api.mjs +1 -0
- package/ssr/esm/lib/components/index.d.ts +1 -0
- package/ssr/esm/lib/components/modal.wrapper.d.ts +4 -2
- package/ssr/esm/lib/components/pin-code.wrapper.d.ts +120 -0
- package/ssr/esm/lib/components/radio-button-wrapper.wrapper.d.ts +8 -0
- package/ssr/esm/lib/dsr-components/carousel.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/pin-code.d.ts +9 -0
- package/ssr/esm/lib/types.d.ts +18 -2
- package/LICENSE +0 -59
|
@@ -529,14 +529,14 @@ var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symb
|
|
|
529
529
|
|
|
530
530
|
var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof$1(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof$1(document)) === 'object' && document.nodeType === 9;
|
|
531
531
|
|
|
532
|
-
function _typeof(
|
|
532
|
+
function _typeof(o) {
|
|
533
533
|
"@babel/helpers - typeof";
|
|
534
534
|
|
|
535
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
536
|
-
return typeof
|
|
537
|
-
} : function (
|
|
538
|
-
return
|
|
539
|
-
}, _typeof(
|
|
535
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
536
|
+
return typeof o;
|
|
537
|
+
} : function (o) {
|
|
538
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
539
|
+
}, _typeof(o);
|
|
540
540
|
}
|
|
541
541
|
|
|
542
542
|
function _toPrimitive(input, hint) {
|
|
@@ -3740,9 +3740,13 @@ const themeDark = {
|
|
|
3740
3740
|
infoSoftColorDarken: '#0C1A27',
|
|
3741
3741
|
infoSoftColorLighten: '#1A3856'
|
|
3742
3742
|
};
|
|
3743
|
+
const themeAuto = {
|
|
3744
|
+
...themeLight,
|
|
3745
|
+
};
|
|
3743
3746
|
const themes = {
|
|
3744
3747
|
'light': themeLight,
|
|
3745
|
-
'dark': themeDark
|
|
3748
|
+
'dark': themeDark,
|
|
3749
|
+
'auto': themeAuto
|
|
3746
3750
|
};
|
|
3747
3751
|
/* Auto Generated End */
|
|
3748
3752
|
const schemeHighContrastMerged = {
|
|
@@ -3874,6 +3878,10 @@ const hostHiddenStyles = {
|
|
|
3874
3878
|
},
|
|
3875
3879
|
};
|
|
3876
3880
|
|
|
3881
|
+
const colorSchemeStyles = {
|
|
3882
|
+
colorScheme: 'light dark',
|
|
3883
|
+
};
|
|
3884
|
+
|
|
3877
3885
|
/**
|
|
3878
3886
|
* utility to wrap jss styles parameter in `@media (hover: hover)`
|
|
3879
3887
|
* which is used to not have hover styles on touch devices
|
|
@@ -3884,6 +3892,10 @@ const hoverMediaQuery = (style) =>
|
|
|
3884
3892
|
({ '@media(hover:hover)': style }) // used for prod build, yarn start and unit tests
|
|
3885
3893
|
; // used for staging build in e2e and vrt tests
|
|
3886
3894
|
|
|
3895
|
+
const prefersColorSchemeDarkMediaQuery = (theme, style) => {
|
|
3896
|
+
return isThemeAuto(theme) && { '@media (prefers-color-scheme: dark)': style };
|
|
3897
|
+
};
|
|
3898
|
+
|
|
3887
3899
|
const getSchemedHighContrastMediaQuery = (light, dark) => {
|
|
3888
3900
|
return {
|
|
3889
3901
|
'@media (forced-colors: active) and (prefers-color-scheme: light)': light,
|
|
@@ -3948,10 +3960,6 @@ const mergeDeep = (...objects) => {
|
|
|
3948
3960
|
}, {});
|
|
3949
3961
|
};
|
|
3950
3962
|
|
|
3951
|
-
const isThemeDark = (theme) => {
|
|
3952
|
-
return theme === 'dark';
|
|
3953
|
-
};
|
|
3954
|
-
|
|
3955
3963
|
const scrollShadowColor = 'rgba(204, 204, 204, 0.35)';
|
|
3956
3964
|
const scrollShadowColorDark = 'rgba(0, 0, 0, 0.6)';
|
|
3957
3965
|
|
|
@@ -3965,7 +3973,9 @@ const getThemedFormStateColors = (theme, state) => {
|
|
|
3965
3973
|
|
|
3966
3974
|
const getBaseChildStyles = (child, state, theme, additionalDefaultJssStyle) => {
|
|
3967
3975
|
const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
3976
|
+
const { primaryColor: primaryColorDark, contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
3968
3977
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
3978
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
3969
3979
|
return {
|
|
3970
3980
|
[`::slotted(${child})`]: {
|
|
3971
3981
|
display: 'block',
|
|
@@ -3985,34 +3995,55 @@ const getBaseChildStyles = (child, state, theme, additionalDefaultJssStyle) => {
|
|
|
3985
3995
|
textIndent: 0,
|
|
3986
3996
|
color: primaryColor,
|
|
3987
3997
|
transition: ['color', 'border-color', 'background-color'].map(getTransition).join(),
|
|
3998
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
3999
|
+
borderColor: formStateColorDark || contrastMediumColorDark,
|
|
4000
|
+
color: primaryColorDark,
|
|
4001
|
+
}),
|
|
3988
4002
|
...additionalDefaultJssStyle,
|
|
3989
4003
|
},
|
|
3990
4004
|
...hoverMediaQuery({
|
|
3991
4005
|
// with the media query the selector has higher priority and overrides disabled styles
|
|
3992
4006
|
[`::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover)`]: {
|
|
3993
4007
|
borderColor: formStateHoverColor || primaryColor,
|
|
4008
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4009
|
+
borderColor: formStateHoverColorDark || primaryColorDark,
|
|
4010
|
+
}),
|
|
3994
4011
|
},
|
|
3995
4012
|
}),
|
|
3996
4013
|
[`::slotted(${child}:focus)`]: {
|
|
3997
4014
|
borderColor: primaryColor,
|
|
4015
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4016
|
+
borderColor: primaryColorDark,
|
|
4017
|
+
}),
|
|
3998
4018
|
},
|
|
3999
4019
|
[`::slotted(${child}:disabled)`]: {
|
|
4000
4020
|
cursor: 'not-allowed',
|
|
4001
4021
|
color: disabledColor,
|
|
4002
4022
|
borderColor: disabledColor,
|
|
4003
4023
|
WebkitTextFillColor: disabledColor,
|
|
4024
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4025
|
+
color: disabledColorDark,
|
|
4026
|
+
borderColor: disabledColorDark,
|
|
4027
|
+
WebkitTextFillColor: disabledColorDark,
|
|
4028
|
+
}),
|
|
4004
4029
|
},
|
|
4005
4030
|
...(child !== 'select' && {
|
|
4006
4031
|
[`::slotted(${child}[readonly])`]: {
|
|
4007
4032
|
borderColor: contrastLowColor,
|
|
4008
4033
|
background: contrastLowColor,
|
|
4034
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4035
|
+
borderColor: contrastLowColorDark,
|
|
4036
|
+
background: contrastLowColorDark,
|
|
4037
|
+
}),
|
|
4009
4038
|
},
|
|
4010
4039
|
}),
|
|
4011
4040
|
};
|
|
4012
4041
|
};
|
|
4013
4042
|
const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUnitOrIconStyles, additionalLabelJssStyle) => {
|
|
4014
4043
|
const { primaryColor, disabledColor, contrastHighColor } = getThemedColors(theme);
|
|
4044
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, } = getThemedColors('dark');
|
|
4015
4045
|
const { formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
4046
|
+
const { formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
4016
4047
|
const counterOrUnitOrIconStylesKey = counterOrUnitOrIconStyles && Object.keys(counterOrUnitOrIconStyles)[0];
|
|
4017
4048
|
return {
|
|
4018
4049
|
label: {
|
|
@@ -4026,18 +4057,26 @@ const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUni
|
|
|
4026
4057
|
...textSmallStyle,
|
|
4027
4058
|
color: isDisabled ? disabledColor : primaryColor,
|
|
4028
4059
|
transition: getTransition('color'),
|
|
4060
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4061
|
+
color: isDisabled ? disabledColorDark : primaryColorDark,
|
|
4062
|
+
}),
|
|
4029
4063
|
'&+&': {
|
|
4030
4064
|
marginTop: `-${spacingStaticXSmall}`,
|
|
4031
4065
|
fontSize: fontSizeTextXSmall,
|
|
4032
4066
|
...(!isDisabled && {
|
|
4033
4067
|
color: contrastHighColor,
|
|
4068
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4069
|
+
color: contrastHighColorDark,
|
|
4070
|
+
}),
|
|
4034
4071
|
}),
|
|
4035
4072
|
},
|
|
4036
4073
|
...hoverMediaQuery({
|
|
4037
4074
|
'&:hover': {
|
|
4038
|
-
[`&~::slotted(${child}:not(:disabled):not(:focus):not([readonly]))`
|
|
4039
|
-
(formStateHoverColor ? `,::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover)` : '')]: {
|
|
4075
|
+
[`&~::slotted(${child}:not(:disabled):not(:focus):not([readonly]))`]: {
|
|
4040
4076
|
borderColor: addImportantToRule(formStateHoverColor || primaryColor),
|
|
4077
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4078
|
+
borderColor: addImportantToRule(formStateHoverColorDark || primaryColorDark),
|
|
4079
|
+
}),
|
|
4041
4080
|
},
|
|
4042
4081
|
},
|
|
4043
4082
|
}),
|
|
@@ -4051,6 +4090,9 @@ const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUni
|
|
|
4051
4090
|
...(isDisabled && {
|
|
4052
4091
|
color: disabledColor,
|
|
4053
4092
|
cursor: 'not-allowed',
|
|
4093
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4094
|
+
color: disabledColorDark,
|
|
4095
|
+
}),
|
|
4054
4096
|
}),
|
|
4055
4097
|
},
|
|
4056
4098
|
}),
|
|
@@ -4059,50 +4101,6 @@ const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUni
|
|
|
4059
4101
|
|
|
4060
4102
|
const OPTION_HEIGHT = 40; // optgroups are higher and ignored
|
|
4061
4103
|
const MULTI_SELECT_OPTION_HEIGHT = 44;
|
|
4062
|
-
const getSelectOptionStyles = (theme, additionalOptionJssStyle) => {
|
|
4063
|
-
const { primaryColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor } = getThemedColors(theme);
|
|
4064
|
-
const { highlightColor } = getHighContrastColors();
|
|
4065
|
-
return {
|
|
4066
|
-
option: {
|
|
4067
|
-
display: 'flex',
|
|
4068
|
-
justifyContent: 'space-between',
|
|
4069
|
-
gap: '12px',
|
|
4070
|
-
padding: `${spacingStaticSmall} 12px`,
|
|
4071
|
-
flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
|
|
4072
|
-
color: contrastHighColor,
|
|
4073
|
-
cursor: 'pointer',
|
|
4074
|
-
textAlign: 'left',
|
|
4075
|
-
wordBreak: 'break-word',
|
|
4076
|
-
boxSizing: 'border-box',
|
|
4077
|
-
borderRadius: borderRadiusSmall,
|
|
4078
|
-
transition: ['background-color', 'color'].map(getTransition).join(),
|
|
4079
|
-
...getNoResultsOptionJssStyle(),
|
|
4080
|
-
...hoverMediaQuery({
|
|
4081
|
-
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
4082
|
-
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
4083
|
-
background: contrastLowColor,
|
|
4084
|
-
},
|
|
4085
|
-
}),
|
|
4086
|
-
'&--selected': {
|
|
4087
|
-
background: backgroundSurfaceColor,
|
|
4088
|
-
},
|
|
4089
|
-
'&--highlighted': {
|
|
4090
|
-
background: contrastLowColor,
|
|
4091
|
-
},
|
|
4092
|
-
'&--highlighted, &--selected': {
|
|
4093
|
-
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
4094
|
-
},
|
|
4095
|
-
'&--disabled': {
|
|
4096
|
-
cursor: 'not-allowed',
|
|
4097
|
-
color: disabledColor,
|
|
4098
|
-
},
|
|
4099
|
-
'&--hidden': {
|
|
4100
|
-
display: 'none',
|
|
4101
|
-
},
|
|
4102
|
-
...additionalOptionJssStyle,
|
|
4103
|
-
},
|
|
4104
|
-
};
|
|
4105
|
-
};
|
|
4106
4104
|
const getNoResultsOptionJssStyle = () => ({
|
|
4107
4105
|
'&[role=status]': {
|
|
4108
4106
|
cursor: 'not-allowed',
|
|
@@ -4112,6 +4110,14 @@ const getNoResultsOptionJssStyle = () => ({
|
|
|
4112
4110
|
|
|
4113
4111
|
const hasDocument = typeof document !== 'undefined';
|
|
4114
4112
|
|
|
4113
|
+
const isThemeAuto = (theme) => {
|
|
4114
|
+
return theme === 'auto';
|
|
4115
|
+
};
|
|
4116
|
+
|
|
4117
|
+
const isThemeDark = (theme) => {
|
|
4118
|
+
return theme === 'dark';
|
|
4119
|
+
};
|
|
4120
|
+
|
|
4115
4121
|
const formatObjectOutput = (value) => {
|
|
4116
4122
|
return JSON.stringify(value)
|
|
4117
4123
|
.replace(/"([a-zA-Z?]+)":/g, '$1:') // remove double quotes from keys
|
|
@@ -4124,15 +4130,20 @@ const formatObjectOutput = (value) => {
|
|
|
4124
4130
|
|
|
4125
4131
|
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
4126
4132
|
|
|
4127
|
-
const getComponentCss
|
|
4133
|
+
const getComponentCss$10 = (size, compact, open, theme) => {
|
|
4128
4134
|
const { primaryColor, hoverColor, focusColor, contrastLowColor } = getThemedColors(theme);
|
|
4135
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, focusColor: focusColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
4129
4136
|
return getCss({
|
|
4130
4137
|
'@global': {
|
|
4131
4138
|
':host': addImportantToEachRule({
|
|
4132
4139
|
display: 'block',
|
|
4133
4140
|
...(!compact && {
|
|
4134
4141
|
borderBottom: `1px solid ${contrastLowColor}`,
|
|
4142
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4143
|
+
borderColor: contrastLowColorDark,
|
|
4144
|
+
}),
|
|
4135
4145
|
}),
|
|
4146
|
+
...colorSchemeStyles,
|
|
4136
4147
|
...hostHiddenStyles,
|
|
4137
4148
|
}),
|
|
4138
4149
|
button: {
|
|
@@ -4148,6 +4159,9 @@ const getComponentCss$$ = (size, compact, open, theme) => {
|
|
|
4148
4159
|
cursor: 'pointer',
|
|
4149
4160
|
textAlign: 'left',
|
|
4150
4161
|
color: primaryColor,
|
|
4162
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4163
|
+
color: primaryColorDark,
|
|
4164
|
+
}),
|
|
4151
4165
|
...textSmallStyle,
|
|
4152
4166
|
fontWeight: fontWeightSemiBold,
|
|
4153
4167
|
...buildResponsiveStyles(size, (s) => ({
|
|
@@ -4178,10 +4192,16 @@ const getComponentCss$$ = (size, compact, open, theme) => {
|
|
|
4178
4192
|
},
|
|
4179
4193
|
'&:hover::before': {
|
|
4180
4194
|
background: hoverColor,
|
|
4195
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4196
|
+
background: hoverColorDark,
|
|
4197
|
+
}),
|
|
4181
4198
|
},
|
|
4182
4199
|
})),
|
|
4183
4200
|
'&:focus::before': {
|
|
4184
4201
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
4202
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4203
|
+
borderColor: focusColorDark,
|
|
4204
|
+
}),
|
|
4185
4205
|
},
|
|
4186
4206
|
'&:not(:focus-visible)::before': {
|
|
4187
4207
|
border: 0,
|
|
@@ -4207,6 +4227,9 @@ const getComponentCss$$ = (size, compact, open, theme) => {
|
|
|
4207
4227
|
},
|
|
4208
4228
|
collapsible: {
|
|
4209
4229
|
color: primaryColor,
|
|
4230
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4231
|
+
color: primaryColorDark,
|
|
4232
|
+
}),
|
|
4210
4233
|
display: 'grid',
|
|
4211
4234
|
...(open
|
|
4212
4235
|
? {
|
|
@@ -4251,7 +4274,7 @@ const duration$1 = `var(${cssVariableAnimationDuration},${ANIMATION_DURATION$1}m
|
|
|
4251
4274
|
const easeInQuad$1 = 'cubic-bezier(0.45,0,0.55,1)';
|
|
4252
4275
|
const easeOutQuad$1 = 'cubic-bezier(0.5,1,0.89,1)';
|
|
4253
4276
|
const topBottomFallback = '56px';
|
|
4254
|
-
const getComponentCss
|
|
4277
|
+
const getComponentCss$$ = (isOpen) => {
|
|
4255
4278
|
return getCss({
|
|
4256
4279
|
'@global': {
|
|
4257
4280
|
':host': addImportantToEachRule({
|
|
@@ -4293,6 +4316,7 @@ const getComponentCss$_ = (isOpen) => {
|
|
|
4293
4316
|
left: gridExtendedOffsetXXL,
|
|
4294
4317
|
right: gridExtendedOffsetXXL,
|
|
4295
4318
|
},
|
|
4319
|
+
...colorSchemeStyles,
|
|
4296
4320
|
...hostHiddenStyles,
|
|
4297
4321
|
}),
|
|
4298
4322
|
},
|
|
@@ -4313,12 +4337,15 @@ const getGroupDirectionJssStyles = (direction) => {
|
|
|
4313
4337
|
return groupDirectionJssStyles[direction];
|
|
4314
4338
|
};
|
|
4315
4339
|
|
|
4316
|
-
const getComponentCss$
|
|
4340
|
+
const getComponentCss$_ = (direction) => {
|
|
4317
4341
|
return getCss({
|
|
4318
4342
|
'@global': {
|
|
4319
4343
|
':host': {
|
|
4320
4344
|
display: 'block',
|
|
4321
|
-
...addImportantToEachRule(
|
|
4345
|
+
...addImportantToEachRule({
|
|
4346
|
+
...colorSchemeStyles,
|
|
4347
|
+
...hostHiddenStyles,
|
|
4348
|
+
}),
|
|
4322
4349
|
},
|
|
4323
4350
|
div: {
|
|
4324
4351
|
display: 'flex',
|
|
@@ -4363,6 +4390,7 @@ const offsetVertical = '-2px';
|
|
|
4363
4390
|
const offsetHorizontal = '-4px';
|
|
4364
4391
|
const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme) => {
|
|
4365
4392
|
const { primaryColor, disabledColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
4393
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, hoverColor: hoverColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
4366
4394
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4367
4395
|
return {
|
|
4368
4396
|
'@global': {
|
|
@@ -4370,6 +4398,7 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4370
4398
|
...addImportantToEachRule({
|
|
4371
4399
|
transform: 'translate3d(0,0,0)',
|
|
4372
4400
|
outline: 0,
|
|
4401
|
+
...colorSchemeStyles,
|
|
4373
4402
|
...hostHiddenStyles,
|
|
4374
4403
|
}),
|
|
4375
4404
|
...buildResponsiveStyles(stretch, (responsiveStretch) => ({
|
|
@@ -4386,6 +4415,9 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4386
4415
|
margin: 0,
|
|
4387
4416
|
padding: 0,
|
|
4388
4417
|
color: isDisabledOrLoading ? disabledColor : primaryColor,
|
|
4418
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4419
|
+
color: isDisabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
4420
|
+
}),
|
|
4389
4421
|
outline: 0,
|
|
4390
4422
|
...textSmallStyle,
|
|
4391
4423
|
...mergeDeep(buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
@@ -4408,6 +4440,9 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4408
4440
|
...(active && {
|
|
4409
4441
|
...frostedGlassStyle,
|
|
4410
4442
|
backgroundColor: hoverColor,
|
|
4443
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4444
|
+
backgroundColor: hoverColorDark,
|
|
4445
|
+
}),
|
|
4411
4446
|
}),
|
|
4412
4447
|
},
|
|
4413
4448
|
...(!isDisabledOrLoading &&
|
|
@@ -4415,11 +4450,17 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4415
4450
|
'&:hover::before': {
|
|
4416
4451
|
...frostedGlassStyle,
|
|
4417
4452
|
backgroundColor: hoverColor,
|
|
4453
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4454
|
+
backgroundColor: hoverColorDark,
|
|
4455
|
+
}),
|
|
4418
4456
|
},
|
|
4419
4457
|
})),
|
|
4420
4458
|
...(!hasSlottedAnchor && {
|
|
4421
4459
|
'&:focus::before': {
|
|
4422
4460
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
4461
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4462
|
+
borderColor: focusColorDark,
|
|
4463
|
+
}),
|
|
4423
4464
|
},
|
|
4424
4465
|
'&:not(:focus-visible)::before': {
|
|
4425
4466
|
border: 0,
|
|
@@ -4449,7 +4490,7 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4449
4490
|
};
|
|
4450
4491
|
};
|
|
4451
4492
|
|
|
4452
|
-
const getComponentCss$
|
|
4493
|
+
const getComponentCss$Z = (icon, iconSource, active, isLoading, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, theme) => {
|
|
4453
4494
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4454
4495
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, false, theme), {
|
|
4455
4496
|
root: {
|
|
@@ -4515,7 +4556,11 @@ const getTileBaseStyles = (aspectRatio, isDisabled) => {
|
|
|
4515
4556
|
'@global': {
|
|
4516
4557
|
':host': {
|
|
4517
4558
|
display: 'block',
|
|
4518
|
-
|
|
4559
|
+
hyphens: 'auto',
|
|
4560
|
+
...addImportantToEachRule({
|
|
4561
|
+
...colorSchemeStyles,
|
|
4562
|
+
...hostHiddenStyles,
|
|
4563
|
+
}),
|
|
4519
4564
|
},
|
|
4520
4565
|
...addImportantToEachRule({
|
|
4521
4566
|
'::slotted': {
|
|
@@ -4580,6 +4625,7 @@ background, align, compact, hasGradient, isDisabled) => {
|
|
|
4580
4625
|
maxWidth: pxToRemWithUnit(550),
|
|
4581
4626
|
margin: 0,
|
|
4582
4627
|
...textLargeStyle,
|
|
4628
|
+
hyphens: 'inherit',
|
|
4583
4629
|
...mergeDeep(buildResponsiveStyles(size, (s) => sizeMap$5[s]), buildResponsiveStyles(weight, (w) => ({
|
|
4584
4630
|
fontWeight: getFontWeight(w === 'semibold' ? 'semi-bold' : w), // mapping of the deprecated weight semibold
|
|
4585
4631
|
}))),
|
|
@@ -4620,7 +4666,7 @@ background, align, compact, hasGradient, isDisabled) => {
|
|
|
4620
4666
|
});
|
|
4621
4667
|
};
|
|
4622
4668
|
|
|
4623
|
-
const getComponentCss$
|
|
4669
|
+
const getComponentCss$Y = (isDisabledOrLoading, ...args) => {
|
|
4624
4670
|
const buttonLinkTileStyles = getButtonLinkTileStyles(...args);
|
|
4625
4671
|
return getCss({
|
|
4626
4672
|
...buttonLinkTileStyles,
|
|
@@ -4657,6 +4703,7 @@ const getVariantColors = (variant, theme) => {
|
|
|
4657
4703
|
const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrLoading, hasSlottedAnchor, theme) => {
|
|
4658
4704
|
const isPrimary = variant === 'primary';
|
|
4659
4705
|
const { textColor, borderColor, borderColorHover, backgroundColor, backgroundColorHover } = getVariantColors(variant, theme);
|
|
4706
|
+
const { textColor: textColorDark, borderColor: borderColorDark, borderColorHover: borderColorHoverDark, backgroundColor: backgroundColorDark, backgroundColorHover: backgroundColorHoverDark, } = getVariantColors(variant, 'dark');
|
|
4660
4707
|
const { focusColor } = getThemedColors(theme);
|
|
4661
4708
|
const hasIcon = hasVisibleIcon(icon, iconSource) || hideLabel;
|
|
4662
4709
|
return {
|
|
@@ -4666,6 +4713,7 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4666
4713
|
...addImportantToEachRule({
|
|
4667
4714
|
verticalAlign: 'top',
|
|
4668
4715
|
outline: 0,
|
|
4716
|
+
...colorSchemeStyles,
|
|
4669
4717
|
...hostHiddenStyles,
|
|
4670
4718
|
}),
|
|
4671
4719
|
},
|
|
@@ -4711,8 +4759,17 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4711
4759
|
backgroundColor: backgroundColorHover,
|
|
4712
4760
|
borderColor: isHighContrastMode ? focusColor : borderColorHover,
|
|
4713
4761
|
...(!isPrimary && frostedGlassStyle),
|
|
4762
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4763
|
+
backgroundColor: backgroundColorHoverDark,
|
|
4764
|
+
borderColor: borderColorHoverDark,
|
|
4765
|
+
}),
|
|
4714
4766
|
},
|
|
4715
4767
|
})),
|
|
4768
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4769
|
+
borderColor: borderColorDark,
|
|
4770
|
+
backgroundColor: backgroundColorDark,
|
|
4771
|
+
color: textColorDark,
|
|
4772
|
+
}),
|
|
4716
4773
|
},
|
|
4717
4774
|
label: buildResponsiveStyles(hideLabel, getHiddenTextJssStyle),
|
|
4718
4775
|
...(hasIcon && {
|
|
@@ -4741,9 +4798,10 @@ const getDisabledColors = (variant, loading, theme) => {
|
|
|
4741
4798
|
};
|
|
4742
4799
|
return colors[variant === 'tertiary' ? 'secondary' : variant];
|
|
4743
4800
|
};
|
|
4744
|
-
const getComponentCss$
|
|
4801
|
+
const getComponentCss$X = (icon, iconSource, variant, hideLabel, disabled, loading, theme) => {
|
|
4745
4802
|
const disabledOrLoading = isDisabledOrLoading(disabled, loading);
|
|
4746
4803
|
const { textColor, borderColor, backgroundColor } = getDisabledColors(variant, loading, theme);
|
|
4804
|
+
const { textColor: textColorDark, borderColor: borderColorDark, backgroundColor: backgroundColorDark, } = getDisabledColors(variant, loading, 'dark');
|
|
4747
4805
|
const isPrimary = variant === 'primary';
|
|
4748
4806
|
return getCss(mergeDeep(getLinkButtonStyles(icon, iconSource, variant, hideLabel, disabledOrLoading, false, theme), {
|
|
4749
4807
|
root: {
|
|
@@ -4752,6 +4810,11 @@ const getComponentCss$W = (icon, iconSource, variant, hideLabel, disabled, loadi
|
|
|
4752
4810
|
backgroundColor,
|
|
4753
4811
|
borderColor,
|
|
4754
4812
|
color: textColor,
|
|
4813
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4814
|
+
backgroundColor: backgroundColorDark,
|
|
4815
|
+
borderColor: borderColorDark,
|
|
4816
|
+
color: textColorDark,
|
|
4817
|
+
}),
|
|
4755
4818
|
}),
|
|
4756
4819
|
...(loading && !isPrimary && frostedGlassStyle),
|
|
4757
4820
|
},
|
|
@@ -4764,6 +4827,7 @@ const getComponentCss$W = (icon, iconSource, variant, hideLabel, disabled, loadi
|
|
|
4764
4827
|
top: '50%',
|
|
4765
4828
|
left: '50%',
|
|
4766
4829
|
transform: 'translate(-50%, -50%)',
|
|
4830
|
+
...(isPrimary && !isHighContrastMode && { filter: 'invert(1)' }),
|
|
4767
4831
|
},
|
|
4768
4832
|
}),
|
|
4769
4833
|
label: {
|
|
@@ -4774,6 +4838,11 @@ const getComponentCss$W = (icon, iconSource, variant, hideLabel, disabled, loadi
|
|
|
4774
4838
|
},
|
|
4775
4839
|
icon: {
|
|
4776
4840
|
transition: getTransition('opacity'),
|
|
4841
|
+
...(!disabled &&
|
|
4842
|
+
isPrimary &&
|
|
4843
|
+
!isHighContrastMode && {
|
|
4844
|
+
filter: 'invert(1)',
|
|
4845
|
+
}),
|
|
4777
4846
|
...(loading && {
|
|
4778
4847
|
opacity: 0, // use opacity for smooth transition between states
|
|
4779
4848
|
}),
|
|
@@ -4800,8 +4869,9 @@ const spacingMap = {
|
|
|
4800
4869
|
basic: gridBasicOffset,
|
|
4801
4870
|
extended: gridExtendedOffset,
|
|
4802
4871
|
};
|
|
4803
|
-
const getComponentCss$
|
|
4872
|
+
const getComponentCss$W = (width, hasPagination, isInfinitePagination, alignHeader, theme) => {
|
|
4804
4873
|
const { primaryColor, contrastMediumColor, focusColor } = getThemedColors(theme);
|
|
4874
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
4805
4875
|
const { canvasTextColor } = getHighContrastColors();
|
|
4806
4876
|
const isHeaderAlignCenter = alignHeader === 'center';
|
|
4807
4877
|
return getCss({
|
|
@@ -4811,6 +4881,7 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4811
4881
|
gap: spacingFluidMedium,
|
|
4812
4882
|
flexDirection: 'column',
|
|
4813
4883
|
boxSizing: 'content-box',
|
|
4884
|
+
...colorSchemeStyles,
|
|
4814
4885
|
...hostHiddenStyles,
|
|
4815
4886
|
}),
|
|
4816
4887
|
'::slotted(*)': {
|
|
@@ -4818,6 +4889,9 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4818
4889
|
},
|
|
4819
4890
|
'::slotted(*:focus-visible)': addImportantToEachRule({
|
|
4820
4891
|
outline: `${borderWidthBase} solid ${focusColor}`,
|
|
4892
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4893
|
+
outlineColor: focusColorDark,
|
|
4894
|
+
}),
|
|
4821
4895
|
outlineOffset: '2px',
|
|
4822
4896
|
}),
|
|
4823
4897
|
[selectorHeading]: addImportantToEachRule({
|
|
@@ -4832,6 +4906,9 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4832
4906
|
}),
|
|
4833
4907
|
[`${selectorHeading},${selectorDescription}`]: addImportantToEachRule({
|
|
4834
4908
|
color: primaryColor,
|
|
4909
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4910
|
+
color: primaryColorDark,
|
|
4911
|
+
}),
|
|
4835
4912
|
[mediaQueryS]: isHeaderAlignCenter
|
|
4836
4913
|
? {
|
|
4837
4914
|
gridColumn: 2,
|
|
@@ -4888,7 +4965,6 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4888
4965
|
padding: '4px 0',
|
|
4889
4966
|
margin: '-4px 0',
|
|
4890
4967
|
'&__track': {
|
|
4891
|
-
cursor: 'grab',
|
|
4892
4968
|
// !important is necessary to override inline styles set by splide library
|
|
4893
4969
|
...addImportantToEachRule({
|
|
4894
4970
|
padding: `0 ${spacingMap[width].base}`,
|
|
@@ -4903,6 +4979,7 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4903
4979
|
},
|
|
4904
4980
|
}),
|
|
4905
4981
|
'&--draggable': {
|
|
4982
|
+
cursor: 'grab',
|
|
4906
4983
|
userSelect: 'none',
|
|
4907
4984
|
WebkitUserSelect: 'none',
|
|
4908
4985
|
WebkitTouchCallout: 'none',
|
|
@@ -4920,7 +4997,7 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4920
4997
|
'&__sr': getHiddenTextJssStyle(), // appears in the DOM when sliding
|
|
4921
4998
|
},
|
|
4922
4999
|
...(hasPagination && {
|
|
4923
|
-
|
|
5000
|
+
'pagination-container': {
|
|
4924
5001
|
...buildResponsiveStyles(hasPagination, (hasPaginationValue) => ({
|
|
4925
5002
|
display: hasPaginationValue ? 'flex' : 'none',
|
|
4926
5003
|
})),
|
|
@@ -4940,7 +5017,16 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4940
5017
|
},
|
|
4941
5018
|
bullet: {
|
|
4942
5019
|
borderRadius: borderRadiusSmall,
|
|
4943
|
-
|
|
5020
|
+
...(isHighContrastMode
|
|
5021
|
+
? {
|
|
5022
|
+
background: canvasTextColor,
|
|
5023
|
+
}
|
|
5024
|
+
: {
|
|
5025
|
+
background: contrastMediumColor,
|
|
5026
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5027
|
+
background: contrastMediumColorDark,
|
|
5028
|
+
}),
|
|
5029
|
+
}),
|
|
4944
5030
|
...(isInfinitePagination
|
|
4945
5031
|
? {
|
|
4946
5032
|
width: '0px',
|
|
@@ -4954,13 +5040,13 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4954
5040
|
}),
|
|
4955
5041
|
},
|
|
4956
5042
|
...(isInfinitePagination && {
|
|
4957
|
-
[
|
|
4958
|
-
|
|
5043
|
+
[paginationInfiniteStartCaseClass]: {
|
|
5044
|
+
'& > .bullet:nth-child(-n+4)': {
|
|
4959
5045
|
width: paginationBulletSize,
|
|
4960
5046
|
height: paginationBulletSize,
|
|
4961
5047
|
},
|
|
4962
5048
|
},
|
|
4963
|
-
[
|
|
5049
|
+
[bulletInfiniteClass]: {
|
|
4964
5050
|
// Necessary to override the bulletActiveClass sibling selector
|
|
4965
5051
|
...addImportantToEachRule({
|
|
4966
5052
|
width: paginationInfiniteBulletSize,
|
|
@@ -4976,8 +5062,17 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4976
5062
|
},
|
|
4977
5063
|
},
|
|
4978
5064
|
}),
|
|
4979
|
-
[
|
|
4980
|
-
|
|
5065
|
+
[bulletActiveClass]: {
|
|
5066
|
+
...(isHighContrastMode
|
|
5067
|
+
? {
|
|
5068
|
+
background: canvasTextColor,
|
|
5069
|
+
}
|
|
5070
|
+
: {
|
|
5071
|
+
background: primaryColor,
|
|
5072
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5073
|
+
background: primaryColorDark,
|
|
5074
|
+
}),
|
|
5075
|
+
}),
|
|
4981
5076
|
height: paginationBulletSize,
|
|
4982
5077
|
width: addImportantToRule(paginationActiveBulletSize),
|
|
4983
5078
|
...(isInfinitePagination && {
|
|
@@ -5011,6 +5106,9 @@ const getFunctionalComponentStateMessageStyles = (theme, state) => {
|
|
|
5011
5106
|
marginTop: spacingStaticXSmall,
|
|
5012
5107
|
...textSmallStyle,
|
|
5013
5108
|
color: getThemedFormStateColors(theme, state).formStateColor,
|
|
5109
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5110
|
+
color: getThemedFormStateColors('dark', state).formStateColor,
|
|
5111
|
+
}),
|
|
5014
5112
|
transition: getTransition('color'),
|
|
5015
5113
|
},
|
|
5016
5114
|
};
|
|
@@ -5018,20 +5116,32 @@ const getFunctionalComponentStateMessageStyles = (theme, state) => {
|
|
|
5018
5116
|
|
|
5019
5117
|
const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
5020
5118
|
const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
5119
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
5021
5120
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
5121
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
5022
5122
|
const { canvasTextColor } = getHighContrastColors();
|
|
5023
5123
|
const disabledOrLoading = isDisabledOrLoading(isDisabled, isLoading);
|
|
5124
|
+
// TODO: needs to be extracted into a color function
|
|
5024
5125
|
const uncheckedColor = disabledOrLoading ? disabledColor : formStateColor || contrastMediumColor;
|
|
5126
|
+
const uncheckedColorDark = disabledOrLoading ? disabledColorDark : formStateColorDark || contrastMediumColorDark;
|
|
5025
5127
|
const uncheckedHoverColor = formStateHoverColor || primaryColor;
|
|
5128
|
+
const uncheckedHoverColorDark = formStateHoverColorDark || primaryColorDark;
|
|
5026
5129
|
const checkedColor = isHighContrastMode
|
|
5027
5130
|
? canvasTextColor
|
|
5028
5131
|
: disabledOrLoading
|
|
5029
5132
|
? disabledColor
|
|
5030
5133
|
: formStateColor || primaryColor;
|
|
5134
|
+
const checkedColorDark = isHighContrastMode
|
|
5135
|
+
? canvasTextColor
|
|
5136
|
+
: disabledOrLoading
|
|
5137
|
+
? disabledColorDark
|
|
5138
|
+
: formStateColorDark || primaryColorDark;
|
|
5031
5139
|
const checkedHoverColor = formStateHoverColor || contrastHighColor;
|
|
5140
|
+
const checkedHoverColorDark = formStateHoverColorDark || contrastHighColorDark;
|
|
5032
5141
|
return {
|
|
5033
5142
|
'@global': {
|
|
5034
5143
|
':host': addImportantToEachRule({
|
|
5144
|
+
...colorSchemeStyles,
|
|
5035
5145
|
...hostHiddenStyles,
|
|
5036
5146
|
display: 'block',
|
|
5037
5147
|
}),
|
|
@@ -5052,6 +5162,9 @@ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme
|
|
|
5052
5162
|
background: `transparent 0% 0% / ${fontLineHeight}`,
|
|
5053
5163
|
transition: ['border-color', 'background-color'].map(getTransition).join(),
|
|
5054
5164
|
border: `2px solid ${uncheckedColor}`,
|
|
5165
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5166
|
+
borderColor: uncheckedColorDark,
|
|
5167
|
+
}),
|
|
5055
5168
|
outline: 0,
|
|
5056
5169
|
cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
|
|
5057
5170
|
},
|
|
@@ -5059,16 +5172,27 @@ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme
|
|
|
5059
5172
|
// background-image is merged in later
|
|
5060
5173
|
borderColor: checkedColor,
|
|
5061
5174
|
backgroundColor: checkedColor,
|
|
5175
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5176
|
+
borderColor: checkedColorDark,
|
|
5177
|
+
backgroundColor: checkedColorDark,
|
|
5178
|
+
}),
|
|
5062
5179
|
},
|
|
5063
5180
|
...(!disabledOrLoading && {
|
|
5064
5181
|
...(!isHighContrastMode &&
|
|
5065
5182
|
hoverMediaQuery({
|
|
5066
5183
|
'&(input:hover), .text:hover ~ &(input)': {
|
|
5067
5184
|
borderColor: uncheckedHoverColor,
|
|
5185
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5186
|
+
borderColor: uncheckedHoverColorDark,
|
|
5187
|
+
}),
|
|
5068
5188
|
},
|
|
5069
5189
|
'&(input:checked:hover), .text:hover ~ &(input:checked)': {
|
|
5070
5190
|
borderColor: checkedHoverColor,
|
|
5071
5191
|
backgroundColor: checkedHoverColor,
|
|
5192
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5193
|
+
borderColor: checkedHoverColorDark,
|
|
5194
|
+
backgroundColor: checkedHoverColorDark,
|
|
5195
|
+
}),
|
|
5072
5196
|
},
|
|
5073
5197
|
})),
|
|
5074
5198
|
...(!isDisabled && {
|
|
@@ -5077,6 +5201,9 @@ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme
|
|
|
5077
5201
|
position: 'absolute',
|
|
5078
5202
|
...getInsetJssStyle(-6),
|
|
5079
5203
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
5204
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5205
|
+
borderColor: focusColorDark,
|
|
5206
|
+
}),
|
|
5080
5207
|
},
|
|
5081
5208
|
'&(input:focus:not(:focus-visible))::before': {
|
|
5082
5209
|
borderColor: 'transparent',
|
|
@@ -5095,11 +5222,28 @@ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme
|
|
|
5095
5222
|
cursor: disabledOrLoading ? 'default' : 'pointer',
|
|
5096
5223
|
...textSmallStyle,
|
|
5097
5224
|
color: disabledOrLoading ? disabledColor : primaryColor,
|
|
5225
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5226
|
+
color: disabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
5227
|
+
}),
|
|
5098
5228
|
transition: getTransition('color'),
|
|
5099
5229
|
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, { padding: `2px 0 0 ${spacingStaticSmall}` })),
|
|
5100
5230
|
},
|
|
5101
5231
|
...getFunctionalComponentRequiredStyles(),
|
|
5102
5232
|
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
5233
|
+
...(isLoading && {
|
|
5234
|
+
spinner: {
|
|
5235
|
+
position: 'absolute',
|
|
5236
|
+
top: `calc(${fontLineHeight}/2 + 2px)`,
|
|
5237
|
+
left: `calc(${fontLineHeight}/2 + 2px)`,
|
|
5238
|
+
transform: 'translate(-50%, -50%)',
|
|
5239
|
+
height: fontLineHeight,
|
|
5240
|
+
width: fontLineHeight,
|
|
5241
|
+
padding: '2px',
|
|
5242
|
+
fontFamily,
|
|
5243
|
+
fontSize: '1rem',
|
|
5244
|
+
cursor: 'not-allowed',
|
|
5245
|
+
},
|
|
5246
|
+
}),
|
|
5103
5247
|
};
|
|
5104
5248
|
};
|
|
5105
5249
|
|
|
@@ -5107,14 +5251,30 @@ const getInlineSVGBackgroundImage = (path) => {
|
|
|
5107
5251
|
return `url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${path}</svg>')`;
|
|
5108
5252
|
};
|
|
5109
5253
|
|
|
5110
|
-
const
|
|
5254
|
+
const escapeHashCharacter = (colorString) => {
|
|
5255
|
+
return colorString.replace('#', '%23');
|
|
5256
|
+
};
|
|
5257
|
+
|
|
5258
|
+
const getCheckedSVGBackgroundImage$1 = (fill) => {
|
|
5259
|
+
return getInlineSVGBackgroundImage(`<path fill="${fill}" 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"/>`);
|
|
5260
|
+
};
|
|
5261
|
+
const getIndeterminateSVGBackgroundImage = (fill) => {
|
|
5262
|
+
return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20,11v2H4v-2h16Z"/>`);
|
|
5263
|
+
};
|
|
5264
|
+
const getComponentCss$V = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
5111
5265
|
const { canvasColor } = getHighContrastColors();
|
|
5112
5266
|
const checkedIconColor = isHighContrastMode
|
|
5113
5267
|
? canvasColor
|
|
5114
|
-
: getInvertedThemedColors(theme).primaryColor
|
|
5268
|
+
: escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
|
|
5269
|
+
const checkedIconColorDark = isHighContrastMode
|
|
5270
|
+
? canvasColor
|
|
5271
|
+
: escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
5115
5272
|
const indeterminateIconColor = isHighContrastMode
|
|
5116
5273
|
? canvasColor
|
|
5117
|
-
: getThemedColors(theme).primaryColor
|
|
5274
|
+
: escapeHashCharacter(getThemedColors(theme).primaryColor);
|
|
5275
|
+
const indeterminateIconColorDark = isHighContrastMode
|
|
5276
|
+
? canvasColor
|
|
5277
|
+
: escapeHashCharacter(getThemedColors('dark').primaryColor);
|
|
5118
5278
|
return getCss(mergeDeep(getCheckboxRadioJssStyle(hideLabel, state, isDisabled, isLoading, theme), {
|
|
5119
5279
|
'@global': {
|
|
5120
5280
|
'::slotted': addImportantToEachRule({
|
|
@@ -5123,11 +5283,17 @@ const getComponentCss$U = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5123
5283
|
},
|
|
5124
5284
|
...(!isLoading && {
|
|
5125
5285
|
'&(input:checked)': {
|
|
5126
|
-
backgroundImage:
|
|
5286
|
+
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColor),
|
|
5287
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5288
|
+
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColorDark),
|
|
5289
|
+
}),
|
|
5127
5290
|
},
|
|
5128
5291
|
}),
|
|
5129
5292
|
'&(input:indeterminate)': {
|
|
5130
|
-
backgroundImage:
|
|
5293
|
+
backgroundImage: getIndeterminateSVGBackgroundImage(indeterminateIconColor),
|
|
5294
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5295
|
+
backgroundImage: getIndeterminateSVGBackgroundImage(indeterminateIconColorDark),
|
|
5296
|
+
}),
|
|
5131
5297
|
},
|
|
5132
5298
|
...(!isDisabled && {
|
|
5133
5299
|
'&(input:focus)::before': {
|
|
@@ -5136,19 +5302,6 @@ const getComponentCss$U = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5136
5302
|
}),
|
|
5137
5303
|
}),
|
|
5138
5304
|
},
|
|
5139
|
-
...(isLoading && {
|
|
5140
|
-
spinner: {
|
|
5141
|
-
position: 'absolute',
|
|
5142
|
-
top: `calc(${fontLineHeight}/2 + 2px)`,
|
|
5143
|
-
left: `calc(${fontLineHeight}/2 + 2px)`,
|
|
5144
|
-
transform: 'translate(-50%, -50%)',
|
|
5145
|
-
height: fontLineHeight,
|
|
5146
|
-
width: fontLineHeight,
|
|
5147
|
-
fontFamily,
|
|
5148
|
-
fontSize: '1rem',
|
|
5149
|
-
cursor: 'not-allowed',
|
|
5150
|
-
},
|
|
5151
|
-
}),
|
|
5152
5305
|
}));
|
|
5153
5306
|
};
|
|
5154
5307
|
|
|
@@ -5157,12 +5310,15 @@ const widthMap = {
|
|
|
5157
5310
|
basic: gridBasicOffset,
|
|
5158
5311
|
extended: gridExtendedOffset,
|
|
5159
5312
|
};
|
|
5160
|
-
const getComponentCss$
|
|
5313
|
+
const getComponentCss$U = (width) => {
|
|
5161
5314
|
return getCss({
|
|
5162
5315
|
'@global': {
|
|
5163
5316
|
':host': {
|
|
5164
5317
|
display: 'block',
|
|
5165
|
-
...addImportantToEachRule(
|
|
5318
|
+
...addImportantToEachRule({
|
|
5319
|
+
...colorSchemeStyles,
|
|
5320
|
+
...hostHiddenStyles,
|
|
5321
|
+
}),
|
|
5166
5322
|
},
|
|
5167
5323
|
},
|
|
5168
5324
|
root: {
|
|
@@ -5196,7 +5352,7 @@ const getDimensionStyle = {
|
|
|
5196
5352
|
width: 'inherit',
|
|
5197
5353
|
height: 'inherit',
|
|
5198
5354
|
};
|
|
5199
|
-
const getComponentCss$
|
|
5355
|
+
const getComponentCss$T = () => {
|
|
5200
5356
|
return getCss({
|
|
5201
5357
|
'@global': {
|
|
5202
5358
|
':host': {
|
|
@@ -5207,6 +5363,7 @@ const getComponentCss$S = () => {
|
|
|
5207
5363
|
outline: 0,
|
|
5208
5364
|
boxSizing: 'content-box',
|
|
5209
5365
|
...getDimensionStyle,
|
|
5366
|
+
...colorSchemeStyles,
|
|
5210
5367
|
...hostHiddenStyles,
|
|
5211
5368
|
}),
|
|
5212
5369
|
},
|
|
@@ -5242,6 +5399,9 @@ ellipsis, theme) => {
|
|
|
5242
5399
|
padding: 0,
|
|
5243
5400
|
...baseTextStyle,
|
|
5244
5401
|
color: getThemedTypographyColor(theme, color),
|
|
5402
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5403
|
+
color: getThemedTypographyColor('dark', color),
|
|
5404
|
+
}),
|
|
5245
5405
|
textAlign: align,
|
|
5246
5406
|
letterSpacing: 'normal',
|
|
5247
5407
|
listStyleType: 'none',
|
|
@@ -5280,12 +5440,15 @@ const sizeMap$4 = {
|
|
|
5280
5440
|
medium: fontSizeDisplayMedium,
|
|
5281
5441
|
large: fontSizeDisplayLarge,
|
|
5282
5442
|
};
|
|
5283
|
-
const getComponentCss$
|
|
5443
|
+
const getComponentCss$S = (size, align, color, ellipsis, theme) => {
|
|
5284
5444
|
return getCss({
|
|
5285
5445
|
'@global': {
|
|
5286
5446
|
':host': {
|
|
5287
5447
|
display: 'block',
|
|
5288
|
-
...addImportantToEachRule(
|
|
5448
|
+
...addImportantToEachRule({
|
|
5449
|
+
...colorSchemeStyles,
|
|
5450
|
+
...hostHiddenStyles,
|
|
5451
|
+
}),
|
|
5289
5452
|
},
|
|
5290
5453
|
'::slotted': {
|
|
5291
5454
|
[DISPLAY_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -5297,36 +5460,55 @@ const getComponentCss$R = (size, align, color, ellipsis, theme) => {
|
|
|
5297
5460
|
});
|
|
5298
5461
|
};
|
|
5299
5462
|
|
|
5300
|
-
const getComponentCss$
|
|
5463
|
+
const getComponentCss$R = (color, orientation, theme) => {
|
|
5301
5464
|
const { contrastLowColor, contrastMediumColor, contrastHighColor } = getThemedColors(theme);
|
|
5465
|
+
const { contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, } = getThemedColors('dark');
|
|
5302
5466
|
const colorMap = {
|
|
5303
5467
|
'contrast-low': contrastLowColor,
|
|
5304
5468
|
'contrast-medium': contrastMediumColor,
|
|
5305
5469
|
'contrast-high': contrastHighColor,
|
|
5306
5470
|
};
|
|
5471
|
+
const colorMapDark = {
|
|
5472
|
+
'contrast-low': contrastLowColorDark,
|
|
5473
|
+
'contrast-medium': contrastMediumColorDark,
|
|
5474
|
+
'contrast-high': contrastHighColorDark,
|
|
5475
|
+
};
|
|
5307
5476
|
return getCss({
|
|
5308
5477
|
'@global': {
|
|
5309
5478
|
':host': {
|
|
5310
5479
|
display: 'block',
|
|
5311
|
-
...addImportantToEachRule(
|
|
5480
|
+
...addImportantToEachRule({
|
|
5481
|
+
...colorSchemeStyles,
|
|
5482
|
+
...hostHiddenStyles,
|
|
5483
|
+
}),
|
|
5312
5484
|
},
|
|
5313
5485
|
hr: {
|
|
5314
5486
|
margin: 0,
|
|
5315
5487
|
padding: 0,
|
|
5316
5488
|
border: 'none',
|
|
5317
5489
|
textAlign: 'left',
|
|
5318
|
-
|
|
5490
|
+
...(isHighContrastMode
|
|
5491
|
+
? {
|
|
5492
|
+
background: getHighContrastColors().canvasTextColor,
|
|
5493
|
+
}
|
|
5494
|
+
: {
|
|
5495
|
+
background: colorMap[color],
|
|
5496
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5497
|
+
background: colorMapDark[color],
|
|
5498
|
+
}),
|
|
5499
|
+
}),
|
|
5319
5500
|
...buildResponsiveStyles(orientation, (o) => o === 'horizontal' ? { height: '1px', width: '100%' } : { height: '100%', width: '1px' }),
|
|
5320
5501
|
},
|
|
5321
5502
|
},
|
|
5322
5503
|
});
|
|
5323
5504
|
};
|
|
5324
5505
|
|
|
5325
|
-
const getComponentCss$
|
|
5506
|
+
const getComponentCss$Q = (state, labelSize, hasLabel, theme) => {
|
|
5326
5507
|
return getCss({
|
|
5327
5508
|
'@global': {
|
|
5328
5509
|
':host': addImportantToEachRule({
|
|
5329
5510
|
display: 'block',
|
|
5511
|
+
...colorSchemeStyles,
|
|
5330
5512
|
...hostHiddenStyles,
|
|
5331
5513
|
}),
|
|
5332
5514
|
fieldset: {
|
|
@@ -5340,6 +5522,9 @@ const getComponentCss$P = (state, labelSize, hasLabel, theme) => {
|
|
|
5340
5522
|
padding: 0,
|
|
5341
5523
|
color: getThemedColors(theme).primaryColor,
|
|
5342
5524
|
...(labelSize === 'small' ? headingSmallStyle : headingMediumStyle),
|
|
5525
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5526
|
+
color: getThemedColors('dark').primaryColor,
|
|
5527
|
+
}),
|
|
5343
5528
|
},
|
|
5344
5529
|
}),
|
|
5345
5530
|
},
|
|
@@ -5352,11 +5537,12 @@ const getComponentCss$P = (state, labelSize, hasLabel, theme) => {
|
|
|
5352
5537
|
});
|
|
5353
5538
|
};
|
|
5354
5539
|
|
|
5355
|
-
const getComponentCss$
|
|
5540
|
+
const getComponentCss$P = (state, labelSize, hasLabel, theme) => {
|
|
5356
5541
|
return getCss({
|
|
5357
5542
|
'@global': {
|
|
5358
5543
|
':host': addImportantToEachRule({
|
|
5359
5544
|
display: 'block',
|
|
5545
|
+
...colorSchemeStyles,
|
|
5360
5546
|
...hostHiddenStyles,
|
|
5361
5547
|
}),
|
|
5362
5548
|
fieldset: {
|
|
@@ -5369,6 +5555,9 @@ const getComponentCss$O = (state, labelSize, hasLabel, theme) => {
|
|
|
5369
5555
|
margin: `0 0 ${spacingStaticMedium}`,
|
|
5370
5556
|
padding: 0,
|
|
5371
5557
|
color: getThemedColors(theme).primaryColor,
|
|
5558
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5559
|
+
color: getThemedColors('dark').primaryColor,
|
|
5560
|
+
}),
|
|
5372
5561
|
...(labelSize === 'small' ? headingSmallStyle : headingMediumStyle),
|
|
5373
5562
|
},
|
|
5374
5563
|
}),
|
|
@@ -5392,7 +5581,7 @@ const flexItemWidths = {
|
|
|
5392
5581
|
full: 100,
|
|
5393
5582
|
auto: 'auto',
|
|
5394
5583
|
};
|
|
5395
|
-
const getComponentCss$
|
|
5584
|
+
const getComponentCss$O = (width, offset, alignSelf, grow, shrink, flex) => {
|
|
5396
5585
|
return getCss({
|
|
5397
5586
|
'@global': {
|
|
5398
5587
|
':host': addImportantToEachRule({
|
|
@@ -5414,10 +5603,10 @@ const getComponentCss$N = (width, offset, alignSelf, grow, shrink, flex) => {
|
|
|
5414
5603
|
});
|
|
5415
5604
|
};
|
|
5416
5605
|
|
|
5417
|
-
const getComponentCss$
|
|
5606
|
+
const getComponentCss$N = (inline, wrap, direction, justifyContent, alignItems, alignContent) => {
|
|
5418
5607
|
return getCss({
|
|
5419
5608
|
'@global': {
|
|
5420
|
-
':host': addImportantToEachRule(mergeDeep(hostHiddenStyles, buildResponsiveStyles(inline, (inlineResponsive) => ({
|
|
5609
|
+
':host': addImportantToEachRule(mergeDeep(colorSchemeStyles, hostHiddenStyles, buildResponsiveStyles(inline, (inlineResponsive) => ({
|
|
5421
5610
|
display: inlineResponsive ? 'inline-flex' : 'flex',
|
|
5422
5611
|
})), buildResponsiveStyles(wrap, (flexWrapResponsive) => ({ flexWrap: flexWrapResponsive })), buildResponsiveStyles(direction, (flexDirectionResponsive) => ({
|
|
5423
5612
|
flexDirection: flexDirectionResponsive,
|
|
@@ -5436,20 +5625,26 @@ const headerShadowClass = 'header--shadow';
|
|
|
5436
5625
|
const footerShadowClass$1 = 'footer--shadow';
|
|
5437
5626
|
const flyoutTransitionDuration = '0.5s';
|
|
5438
5627
|
const flyoutTransitionTimingFunction = 'cubic-bezier(0.77, 0, 0.175, 1)';
|
|
5628
|
+
const cssVariableWidth = '--p-flyout-width';
|
|
5439
5629
|
const cssVariableMaxWidth = '--p-flyout-max-width';
|
|
5440
5630
|
const maxWidthDefault = '1180px';
|
|
5441
5631
|
const minWidthDefault = '320px';
|
|
5442
|
-
const getComponentCss$
|
|
5632
|
+
const getComponentCss$M = (isOpen, position, hasHeader, hasFooter, hasSubFooter, theme) => {
|
|
5443
5633
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
5634
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
5444
5635
|
const { contrastHighColor: darkThemeContrastHighColor } = getThemedColors('dark');
|
|
5445
5636
|
const isPositionLeft = position === 'left';
|
|
5446
|
-
const contentPadding = `${spacingStaticMedium} ${spacingFluidLarge}
|
|
5637
|
+
const contentPadding = `${spacingStaticMedium} ${spacingFluidLarge}`;
|
|
5447
5638
|
const isDark = isThemeDark(theme);
|
|
5448
5639
|
const shadowColor = isDark ? scrollShadowColorDark : scrollShadowColor;
|
|
5449
|
-
const
|
|
5640
|
+
const transparentColorDark = 'rgba(14, 14, 18, 0)';
|
|
5641
|
+
const transparentColor = isDark ? transparentColorDark : 'rgba(255, 255, 255, 0)';
|
|
5450
5642
|
return getCss({
|
|
5451
5643
|
'@global': addImportantToEachRule({
|
|
5452
5644
|
':host': {
|
|
5645
|
+
// needed for correct alignment of the Porsche Grid within the Flyout
|
|
5646
|
+
'--pds-internal-grid-outer-column': `calc(${spacingFluidLarge} - ${gridGap})`,
|
|
5647
|
+
'--pds-internal-grid-margin': `calc(${spacingFluidLarge} * -1)`,
|
|
5453
5648
|
display: 'flex',
|
|
5454
5649
|
position: 'fixed',
|
|
5455
5650
|
zIndex: FLYOUT_Z_INDEX,
|
|
@@ -5463,6 +5658,7 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5463
5658
|
}),
|
|
5464
5659
|
...getInsetJssStyle(),
|
|
5465
5660
|
...getFrostedGlassBackgroundJssStyles(isOpen, flyoutTransitionDuration),
|
|
5661
|
+
...colorSchemeStyles,
|
|
5466
5662
|
...hostHiddenStyles,
|
|
5467
5663
|
},
|
|
5468
5664
|
}),
|
|
@@ -5473,12 +5669,18 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5473
5669
|
}),
|
|
5474
5670
|
justifyContent: 'flex-end',
|
|
5475
5671
|
background: backgroundColor,
|
|
5672
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5673
|
+
background: backgroundColorDark,
|
|
5674
|
+
}),
|
|
5476
5675
|
position: 'sticky',
|
|
5477
5676
|
top: 0,
|
|
5478
|
-
zIndex:
|
|
5677
|
+
zIndex: 2,
|
|
5479
5678
|
},
|
|
5480
5679
|
[headerShadowClass]: {
|
|
5481
5680
|
boxShadow: `${isDark ? scrollShadowColorDark : scrollShadowColor} 0px 5px 10px`,
|
|
5681
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5682
|
+
boxShadow: `${scrollShadowColorDark} 0px 5px 10px`,
|
|
5683
|
+
}),
|
|
5482
5684
|
},
|
|
5483
5685
|
...(hasHeader && {
|
|
5484
5686
|
'header-content': {
|
|
@@ -5492,6 +5694,10 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5492
5694
|
border: `2px solid ${backgroundColor}`,
|
|
5493
5695
|
borderRadius: '4px',
|
|
5494
5696
|
background: backgroundColor,
|
|
5697
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5698
|
+
borderColor: backgroundColorDark,
|
|
5699
|
+
background: backgroundColorDark,
|
|
5700
|
+
}),
|
|
5495
5701
|
...hoverMediaQuery({
|
|
5496
5702
|
'&:hover': {
|
|
5497
5703
|
background: darkThemeContrastHighColor,
|
|
@@ -5510,6 +5716,7 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5510
5716
|
overflowY: 'auto',
|
|
5511
5717
|
overscrollBehaviorY: 'none',
|
|
5512
5718
|
}),
|
|
5719
|
+
width: `var(${cssVariableWidth}, auto)`,
|
|
5513
5720
|
height: '100%',
|
|
5514
5721
|
minWidth: minWidthDefault,
|
|
5515
5722
|
maxWidth: `var(${cssVariableMaxWidth}, ${maxWidthDefault})`,
|
|
@@ -5518,6 +5725,10 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5518
5725
|
transform: isOpen ? 'initial' : `translate3d(${isPositionLeft ? '-100%' : '100%'}, 0, 0)`,
|
|
5519
5726
|
transition: `opacity ${flyoutTransitionDuration} ${flyoutTransitionTimingFunction} ${isOpen ? '0s' : flyoutTransitionDuration}, transform ${flyoutTransitionDuration} ${flyoutTransitionTimingFunction}`,
|
|
5520
5727
|
boxShadow: `${isPositionLeft ? '3px' : '-3px'} 0px 30px rgba(0, 0, 0, 0.25)`,
|
|
5728
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5729
|
+
color: primaryColorDark,
|
|
5730
|
+
background: backgroundColorDark,
|
|
5731
|
+
}),
|
|
5521
5732
|
},
|
|
5522
5733
|
content: {
|
|
5523
5734
|
padding: contentPadding,
|
|
@@ -5533,6 +5744,9 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5533
5744
|
backgroundSize: '100% 20px, 100% 20px, 100% 10px, 100% 10px',
|
|
5534
5745
|
backgroundAttachment: 'local, local, scroll, scroll',
|
|
5535
5746
|
overscrollBehaviorY: 'none',
|
|
5747
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5748
|
+
backgroundImage: `linear-gradient(to top, ${backgroundColorDark}, ${backgroundColorDark}), linear-gradient(to top, ${backgroundColorDark}, ${backgroundColorDark}), linear-gradient(to top, ${scrollShadowColorDark}, ${transparentColorDark}), linear-gradient(to bottom, ${scrollShadowColorDark}, ${transparentColorDark})`,
|
|
5749
|
+
}),
|
|
5536
5750
|
}),
|
|
5537
5751
|
},
|
|
5538
5752
|
...(hasFooter && {
|
|
@@ -5542,9 +5756,15 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5542
5756
|
position: 'sticky',
|
|
5543
5757
|
zIndex: 1,
|
|
5544
5758
|
bottom: 0,
|
|
5759
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5760
|
+
background: backgroundColorDark,
|
|
5761
|
+
}),
|
|
5545
5762
|
},
|
|
5546
5763
|
[footerShadowClass$1]: {
|
|
5547
5764
|
boxShadow: `${isDark ? scrollShadowColorDark : scrollShadowColor} 0px -5px 10px`,
|
|
5765
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5766
|
+
boxShadow: `${scrollShadowColorDark} 0px -5px 10px`,
|
|
5767
|
+
}),
|
|
5548
5768
|
},
|
|
5549
5769
|
}),
|
|
5550
5770
|
...(hasSubFooter && {
|
|
@@ -5559,7 +5779,7 @@ const gutter$1 = `calc(${gridGap} / 2)`;
|
|
|
5559
5779
|
const gridItemWidths = [
|
|
5560
5780
|
0, 8.333333, 16.666667, 25, 33.333333, 41.666667, 50, 58.333333, 66.666667, 75, 83.333333, 91.666667, 100,
|
|
5561
5781
|
];
|
|
5562
|
-
const getComponentCss$
|
|
5782
|
+
const getComponentCss$L = (size, offset) => {
|
|
5563
5783
|
return getCss({
|
|
5564
5784
|
'@global': {
|
|
5565
5785
|
':host': addImportantToEachRule({
|
|
@@ -5579,7 +5799,7 @@ const getComponentCss$K = (size, offset) => {
|
|
|
5579
5799
|
};
|
|
5580
5800
|
|
|
5581
5801
|
const gutter = `calc(${gridGap} / -2)`;
|
|
5582
|
-
const getComponentCss$
|
|
5802
|
+
const getComponentCss$K = (direction, wrap) => {
|
|
5583
5803
|
return getCss({
|
|
5584
5804
|
'@global': {
|
|
5585
5805
|
':host': addImportantToEachRule({
|
|
@@ -5588,6 +5808,7 @@ const getComponentCss$J = (direction, wrap) => {
|
|
|
5588
5808
|
width: 'auto',
|
|
5589
5809
|
marginLeft: gutter,
|
|
5590
5810
|
marginRight: gutter,
|
|
5811
|
+
...colorSchemeStyles,
|
|
5591
5812
|
...hostHiddenStyles,
|
|
5592
5813
|
...mergeDeep(buildResponsiveStyles(direction, (flexDirection) => ({ flexDirection })), buildResponsiveStyles(wrap, (flexWrap) => ({ flexWrap }))),
|
|
5593
5814
|
}),
|
|
@@ -5602,12 +5823,15 @@ const sizeMap$3 = {
|
|
|
5602
5823
|
'x-large': fontSizeHeadingXLarge,
|
|
5603
5824
|
'xx-large': fontSizeHeadingXXLarge,
|
|
5604
5825
|
};
|
|
5605
|
-
const getComponentCss$
|
|
5826
|
+
const getComponentCss$J = (size, align, color, ellipsis, theme) => {
|
|
5606
5827
|
return getCss({
|
|
5607
5828
|
'@global': {
|
|
5608
5829
|
':host': {
|
|
5609
5830
|
display: 'block',
|
|
5610
|
-
...addImportantToEachRule(
|
|
5831
|
+
...addImportantToEachRule({
|
|
5832
|
+
...colorSchemeStyles,
|
|
5833
|
+
...hostHiddenStyles,
|
|
5834
|
+
}),
|
|
5611
5835
|
},
|
|
5612
5836
|
'::slotted': {
|
|
5613
5837
|
[HEADING_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -5661,12 +5885,15 @@ const getTextSizeJssStyle = (textSize) => {
|
|
|
5661
5885
|
fontSize: textSize === 'inherit' ? textSize : textSizeMap[textSize],
|
|
5662
5886
|
};
|
|
5663
5887
|
};
|
|
5664
|
-
const getComponentCss$
|
|
5888
|
+
const getComponentCss$I = (variant, align, color, ellipsis, theme) => {
|
|
5665
5889
|
return getCss({
|
|
5666
5890
|
'@global': {
|
|
5667
5891
|
':host': {
|
|
5668
5892
|
display: 'block',
|
|
5669
|
-
...addImportantToEachRule(
|
|
5893
|
+
...addImportantToEachRule({
|
|
5894
|
+
...colorSchemeStyles,
|
|
5895
|
+
...hostHiddenStyles,
|
|
5896
|
+
}),
|
|
5670
5897
|
},
|
|
5671
5898
|
'::slotted': {
|
|
5672
5899
|
[HEADLINE_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -5710,29 +5937,32 @@ const sizeMap$2 = {
|
|
|
5710
5937
|
large: fontSizeTextLarge,
|
|
5711
5938
|
'x-large': fontSizeTextXLarge,
|
|
5712
5939
|
};
|
|
5713
|
-
const
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5940
|
+
const filterLight = {
|
|
5941
|
+
primary: filterLightPrimary,
|
|
5942
|
+
'state-disabled': filterLightDisabled,
|
|
5943
|
+
'contrast-low': filterLightContrastLow,
|
|
5944
|
+
'contrast-medium': filterLightContrastMedium,
|
|
5945
|
+
'contrast-high': filterLightContrastHigh,
|
|
5946
|
+
'notification-success': filterLightNotificationSuccess,
|
|
5947
|
+
'notification-warning': filterLightNotificationWarning,
|
|
5948
|
+
'notification-error': filterLightNotificationError,
|
|
5949
|
+
'notification-info': filterLightNotificationInfo,
|
|
5950
|
+
};
|
|
5951
|
+
const filterDark = {
|
|
5952
|
+
primary: filterDarkPrimary,
|
|
5953
|
+
'state-disabled': filterDarkDisabled,
|
|
5954
|
+
'contrast-low': filterDarkContrastLow,
|
|
5955
|
+
'contrast-medium': filterDarkContrastMedium,
|
|
5956
|
+
'contrast-high': filterDarkContrastHigh,
|
|
5957
|
+
'notification-success': filterDarkNotificationSuccess,
|
|
5958
|
+
'notification-warning': filterDarkNotificationWarning,
|
|
5959
|
+
'notification-error': filterDarkNotificationError,
|
|
5960
|
+
'notification-info': filterDarkNotificationInfo,
|
|
5961
|
+
};
|
|
5962
|
+
const filterMap = {
|
|
5963
|
+
auto: filterLight,
|
|
5964
|
+
light: filterLight,
|
|
5965
|
+
dark: filterDark,
|
|
5736
5966
|
};
|
|
5737
5967
|
const forceRerenderAnimationStyle = {
|
|
5738
5968
|
'0%': {
|
|
@@ -5744,7 +5974,7 @@ const forceRerenderAnimationStyle = {
|
|
|
5744
5974
|
};
|
|
5745
5975
|
const keyFramesLight = 'rerender-light';
|
|
5746
5976
|
const keyFramesDark = 'rerender-dark';
|
|
5747
|
-
const getComponentCss$
|
|
5977
|
+
const getComponentCss$H = (color, size, theme) => {
|
|
5748
5978
|
const isColorInherit = color === 'inherit';
|
|
5749
5979
|
const isSizeInherit = size === 'inherit';
|
|
5750
5980
|
const isDark = isThemeDark(theme);
|
|
@@ -5753,7 +5983,10 @@ const getComponentCss$G = (color, size, theme) => {
|
|
|
5753
5983
|
':host': {
|
|
5754
5984
|
display: 'inline-block',
|
|
5755
5985
|
verticalAlign: 'top',
|
|
5756
|
-
...addImportantToEachRule(
|
|
5986
|
+
...addImportantToEachRule({
|
|
5987
|
+
...colorSchemeStyles,
|
|
5988
|
+
...hostHiddenStyles,
|
|
5989
|
+
}),
|
|
5757
5990
|
},
|
|
5758
5991
|
img: {
|
|
5759
5992
|
display: 'block',
|
|
@@ -5761,12 +5994,15 @@ const getComponentCss$G = (color, size, theme) => {
|
|
|
5761
5994
|
padding: 0,
|
|
5762
5995
|
pointerEvents: 'none',
|
|
5763
5996
|
...(!isColorInherit && {
|
|
5764
|
-
filter:
|
|
5997
|
+
filter: filterMap[theme][color],
|
|
5998
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5999
|
+
filter: filterMap.dark[color],
|
|
6000
|
+
}),
|
|
5765
6001
|
...(isHighContrastMode &&
|
|
5766
6002
|
getSchemedHighContrastMediaQuery({
|
|
5767
|
-
filter:
|
|
6003
|
+
filter: filterMap.light[color],
|
|
5768
6004
|
}, {
|
|
5769
|
-
filter:
|
|
6005
|
+
filter: filterMap.dark[color],
|
|
5770
6006
|
})),
|
|
5771
6007
|
WebkitAnimation: `${isDark ? `${keyFramesDark}-${color}` : `${keyFramesLight}-${color}`} 1ms`, // needed to enforce repaint in Safari if theme is switched programmatically.
|
|
5772
6008
|
}),
|
|
@@ -5810,6 +6046,9 @@ const getNotificationRootJssStyle = (state, hasAction, hasClose, theme) => {
|
|
|
5810
6046
|
placeItems: 'start',
|
|
5811
6047
|
padding: spacingStaticMedium,
|
|
5812
6048
|
background: getBackgroundColor(state, theme),
|
|
6049
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6050
|
+
background: getBackgroundColor(state, 'dark'),
|
|
6051
|
+
}),
|
|
5813
6052
|
borderRadius: borderRadiusSmall,
|
|
5814
6053
|
...(isHighContrastMode && {
|
|
5815
6054
|
outline: '1px solid transparent',
|
|
@@ -5835,11 +6074,12 @@ const getNotificationContentJssStyle = () => ({
|
|
|
5835
6074
|
});
|
|
5836
6075
|
|
|
5837
6076
|
const mediaQueryMaxS = getMediaQueryMax('s');
|
|
5838
|
-
const getComponentCss$
|
|
6077
|
+
const getComponentCss$G = (state, hasAction, hasClose, theme) => {
|
|
5839
6078
|
return getCss({
|
|
5840
6079
|
'@global': {
|
|
5841
6080
|
':host': addImportantToEachRule({
|
|
5842
6081
|
...getNotificationRootJssStyle(state, hasAction, hasClose, theme),
|
|
6082
|
+
...colorSchemeStyles,
|
|
5843
6083
|
...hostHiddenStyles,
|
|
5844
6084
|
}),
|
|
5845
6085
|
h5: headingSmallStyle,
|
|
@@ -5847,6 +6087,9 @@ const getComponentCss$F = (state, hasAction, hasClose, theme) => {
|
|
|
5847
6087
|
'h5,p': {
|
|
5848
6088
|
margin: 0,
|
|
5849
6089
|
color: getThemedColors(theme).primaryColor,
|
|
6090
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6091
|
+
color: getThemedColors('dark').primaryColor,
|
|
6092
|
+
}),
|
|
5850
6093
|
},
|
|
5851
6094
|
},
|
|
5852
6095
|
icon: getNotificationIconJssStyle(),
|
|
@@ -5861,8 +6104,9 @@ const getComponentCss$F = (state, hasAction, hasClose, theme) => {
|
|
|
5861
6104
|
});
|
|
5862
6105
|
};
|
|
5863
6106
|
|
|
5864
|
-
const getComponentCss$
|
|
6107
|
+
const getComponentCss$F = (icon, iconSource, active, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor, theme) => {
|
|
5865
6108
|
const { focusColor } = getThemedColors(theme);
|
|
6109
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
5866
6110
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme), {
|
|
5867
6111
|
root: {
|
|
5868
6112
|
textDecoration: underline ? 'underline' : 'none',
|
|
@@ -5892,6 +6136,9 @@ const getComponentCss$E = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
5892
6136
|
},
|
|
5893
6137
|
'&(a:focus)::before': {
|
|
5894
6138
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6139
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6140
|
+
borderColor: focusColorDark,
|
|
6141
|
+
}),
|
|
5895
6142
|
},
|
|
5896
6143
|
'&(a:focus:not(:focus-visible))::before': {
|
|
5897
6144
|
border: 0,
|
|
@@ -5901,10 +6148,19 @@ const getComponentCss$E = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
5901
6148
|
}));
|
|
5902
6149
|
};
|
|
5903
6150
|
|
|
5904
|
-
const getComponentCss$
|
|
6151
|
+
const getComponentCss$E = (icon, iconSource, variant, hideLabel, hasSlottedAnchor, theme) => {
|
|
5905
6152
|
const { focusColor } = getThemedColors(theme);
|
|
6153
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
5906
6154
|
const { linkColor } = getHighContrastColors();
|
|
5907
|
-
|
|
6155
|
+
const isPrimary = variant === 'primary';
|
|
6156
|
+
return getCss(mergeDeep(getLinkButtonStyles(icon, iconSource, variant, hideLabel, false, hasSlottedAnchor, theme), {
|
|
6157
|
+
icon: {
|
|
6158
|
+
...(isPrimary &&
|
|
6159
|
+
!isHighContrastMode && {
|
|
6160
|
+
filter: 'invert(1)',
|
|
6161
|
+
}),
|
|
6162
|
+
},
|
|
6163
|
+
}, hasSlottedAnchor && {
|
|
5908
6164
|
...(isHighContrastMode && {
|
|
5909
6165
|
root: {
|
|
5910
6166
|
borderColor: linkColor,
|
|
@@ -5933,6 +6189,9 @@ const getComponentCss$D = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
5933
6189
|
},
|
|
5934
6190
|
'&(a:focus)::before': {
|
|
5935
6191
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6192
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6193
|
+
borderColor: focusColorDark,
|
|
6194
|
+
}),
|
|
5936
6195
|
},
|
|
5937
6196
|
'&(a:focus:not(:focus-visible))::before': {
|
|
5938
6197
|
border: 0,
|
|
@@ -5946,7 +6205,7 @@ const getComponentCss$D = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
5946
6205
|
// because it is created via Object.keys(MODEL_SIGNATURES_MANIFEST) would bundle the entire manifest into both chunks
|
|
5947
6206
|
const LINK_TILE_MODEL_SIGNATURE_HEADING_TAGS = ['h2', 'h3', 'h4', 'h5', 'h6'];
|
|
5948
6207
|
|
|
5949
|
-
const getComponentCss$
|
|
6208
|
+
const getComponentCss$D = (aspectRatio, weight, direction, hasDescription) => {
|
|
5950
6209
|
const tileBaseStyles = getTileBaseStyles(aspectRatio);
|
|
5951
6210
|
return getCss({
|
|
5952
6211
|
...tileBaseStyles,
|
|
@@ -5971,12 +6230,14 @@ const getComponentCss$C = (aspectRatio, weight, direction, hasDescription) => {
|
|
|
5971
6230
|
heading: {
|
|
5972
6231
|
margin: 0,
|
|
5973
6232
|
...textLargeStyle,
|
|
6233
|
+
hyphens: 'inherit',
|
|
5974
6234
|
...buildResponsiveStyles(weight, (w) => ({ fontWeight: getFontWeight(w) })),
|
|
5975
6235
|
},
|
|
5976
6236
|
...(hasDescription && {
|
|
5977
6237
|
description: {
|
|
5978
6238
|
margin: '-12px 0 0 ',
|
|
5979
6239
|
...textSmallStyle,
|
|
6240
|
+
hyphens: 'inherit',
|
|
5980
6241
|
},
|
|
5981
6242
|
}),
|
|
5982
6243
|
'link-group': {
|
|
@@ -5993,7 +6254,7 @@ const getComponentCss$C = (aspectRatio, weight, direction, hasDescription) => {
|
|
|
5993
6254
|
});
|
|
5994
6255
|
};
|
|
5995
6256
|
|
|
5996
|
-
const getComponentCss$
|
|
6257
|
+
const getComponentCss$C = (...args) => {
|
|
5997
6258
|
return getCss({
|
|
5998
6259
|
...getButtonLinkTileStyles(...args),
|
|
5999
6260
|
'link-overlay': {
|
|
@@ -6014,7 +6275,7 @@ const baseSizes = {
|
|
|
6014
6275
|
height: '72px',
|
|
6015
6276
|
},
|
|
6016
6277
|
};
|
|
6017
|
-
const getComponentCss$
|
|
6278
|
+
const getComponentCss$B = (size) => {
|
|
6018
6279
|
return getCss({
|
|
6019
6280
|
'@global': {
|
|
6020
6281
|
':host': {
|
|
@@ -6023,6 +6284,7 @@ const getComponentCss$A = (size) => {
|
|
|
6023
6284
|
verticalAlign: 'top',
|
|
6024
6285
|
...addImportantToEachRule({
|
|
6025
6286
|
outline: 0,
|
|
6287
|
+
...colorSchemeStyles,
|
|
6026
6288
|
...hostHiddenStyles,
|
|
6027
6289
|
}),
|
|
6028
6290
|
},
|
|
@@ -6102,7 +6364,7 @@ const getSlottedJssStyle = (marginValue, hasHeader, hasDismissButton) => {
|
|
|
6102
6364
|
},
|
|
6103
6365
|
};
|
|
6104
6366
|
};
|
|
6105
|
-
const getComponentCss$
|
|
6367
|
+
const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, hasFooter) => {
|
|
6106
6368
|
const isFullscreenForXlAndXxl = isFullscreenForXl(isFullscreen);
|
|
6107
6369
|
const duration = isOpen ? '.6s' : '.2s';
|
|
6108
6370
|
const contentPadding = '32px';
|
|
@@ -6125,6 +6387,7 @@ const getComponentCss$z = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6125
6387
|
visibility: 'hidden',
|
|
6126
6388
|
transition: 'visibility 0s linear .2s',
|
|
6127
6389
|
}),
|
|
6390
|
+
...colorSchemeStyles,
|
|
6128
6391
|
...hostHiddenStyles,
|
|
6129
6392
|
...getFrostedGlassBackgroundJssStyles(isOpen, duration),
|
|
6130
6393
|
}),
|
|
@@ -6223,21 +6486,24 @@ const getComponentCss$z = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6223
6486
|
|
|
6224
6487
|
const modelSignatureHeight = 36;
|
|
6225
6488
|
|
|
6489
|
+
const colorToFilterLight = {
|
|
6490
|
+
primary: filterLightPrimary,
|
|
6491
|
+
'contrast-low': filterLightContrastLow,
|
|
6492
|
+
'contrast-medium': filterLightContrastMedium,
|
|
6493
|
+
'contrast-high': filterLightContrastHigh,
|
|
6494
|
+
};
|
|
6495
|
+
const colorToFilterDark = {
|
|
6496
|
+
primary: filterDarkPrimary,
|
|
6497
|
+
'contrast-low': filterDarkContrastLow,
|
|
6498
|
+
'contrast-medium': filterDarkContrastMedium,
|
|
6499
|
+
'contrast-high': filterDarkContrastHigh,
|
|
6500
|
+
};
|
|
6226
6501
|
const colorToFilterMap = {
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
'contrast-medium': filterLightContrastMedium,
|
|
6231
|
-
'contrast-high': filterLightContrastHigh,
|
|
6232
|
-
},
|
|
6233
|
-
dark: {
|
|
6234
|
-
primary: filterDarkPrimary,
|
|
6235
|
-
'contrast-low': filterDarkContrastLow,
|
|
6236
|
-
'contrast-medium': filterDarkContrastMedium,
|
|
6237
|
-
'contrast-high': filterDarkContrastHigh,
|
|
6238
|
-
},
|
|
6502
|
+
auto: colorToFilterLight,
|
|
6503
|
+
light: colorToFilterLight,
|
|
6504
|
+
dark: colorToFilterDark,
|
|
6239
6505
|
};
|
|
6240
|
-
const getComponentCss$
|
|
6506
|
+
const getComponentCss$z = (size, color, theme) => {
|
|
6241
6507
|
const isSizeInherit = size === 'inherit';
|
|
6242
6508
|
const isColorInherit = color === 'inherit';
|
|
6243
6509
|
return getCss({
|
|
@@ -6254,6 +6520,7 @@ const getComponentCss$y = (size, color, theme) => {
|
|
|
6254
6520
|
// TODO: we need a width map of all signatures to ensure same fluid behavior like implemented fro crest + wordmark
|
|
6255
6521
|
maxHeight: `${modelSignatureHeight}px`,
|
|
6256
6522
|
}),
|
|
6523
|
+
...colorSchemeStyles,
|
|
6257
6524
|
...hostHiddenStyles,
|
|
6258
6525
|
}),
|
|
6259
6526
|
},
|
|
@@ -6264,6 +6531,9 @@ const getComponentCss$y = (size, color, theme) => {
|
|
|
6264
6531
|
pointerEvents: 'none',
|
|
6265
6532
|
...(!isColorInherit && {
|
|
6266
6533
|
filter: colorToFilterMap[theme][color],
|
|
6534
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6535
|
+
filter: colorToFilterMap.dark[color],
|
|
6536
|
+
}),
|
|
6267
6537
|
...(isHighContrastMode &&
|
|
6268
6538
|
getSchemedHighContrastMediaQuery({
|
|
6269
6539
|
filter: colorToFilterMap.light[color],
|
|
@@ -6277,7 +6547,10 @@ const getComponentCss$y = (size, color, theme) => {
|
|
|
6277
6547
|
});
|
|
6278
6548
|
};
|
|
6279
6549
|
|
|
6280
|
-
const getComponentCss$
|
|
6550
|
+
const getComponentCss$y = (theme) => {
|
|
6551
|
+
const { primaryColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor } = getThemedColors(theme);
|
|
6552
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
6553
|
+
const { highlightColor } = getHighContrastColors();
|
|
6281
6554
|
return getCss({
|
|
6282
6555
|
'@global': {
|
|
6283
6556
|
':host': addImportantToEachRule({
|
|
@@ -6285,7 +6558,62 @@ const getComponentCss$x = (theme) => {
|
|
|
6285
6558
|
...hostHiddenStyles,
|
|
6286
6559
|
}),
|
|
6287
6560
|
},
|
|
6288
|
-
|
|
6561
|
+
option: {
|
|
6562
|
+
display: 'flex',
|
|
6563
|
+
justifyContent: 'space-between',
|
|
6564
|
+
gap: '12px',
|
|
6565
|
+
padding: `${spacingStaticSmall} 12px`,
|
|
6566
|
+
flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
|
|
6567
|
+
color: contrastHighColor,
|
|
6568
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6569
|
+
color: contrastHighColorDark,
|
|
6570
|
+
}),
|
|
6571
|
+
cursor: 'pointer',
|
|
6572
|
+
textAlign: 'left',
|
|
6573
|
+
wordBreak: 'break-word',
|
|
6574
|
+
boxSizing: 'border-box',
|
|
6575
|
+
borderRadius: borderRadiusSmall,
|
|
6576
|
+
transition: ['background-color', 'color'].map(getTransition).join(),
|
|
6577
|
+
...getNoResultsOptionJssStyle(),
|
|
6578
|
+
...hoverMediaQuery({
|
|
6579
|
+
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
6580
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
6581
|
+
background: contrastLowColor,
|
|
6582
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6583
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
6584
|
+
background: contrastLowColorDark,
|
|
6585
|
+
}),
|
|
6586
|
+
},
|
|
6587
|
+
}),
|
|
6588
|
+
'&--selected': {
|
|
6589
|
+
background: backgroundSurfaceColor,
|
|
6590
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6591
|
+
background: backgroundSurfaceColorDark,
|
|
6592
|
+
}),
|
|
6593
|
+
},
|
|
6594
|
+
'&--highlighted': {
|
|
6595
|
+
background: contrastLowColor,
|
|
6596
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6597
|
+
background: contrastLowColorDark,
|
|
6598
|
+
}),
|
|
6599
|
+
},
|
|
6600
|
+
'&--highlighted, &--selected': {
|
|
6601
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
6602
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6603
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
6604
|
+
}),
|
|
6605
|
+
},
|
|
6606
|
+
'&--disabled': {
|
|
6607
|
+
cursor: 'not-allowed',
|
|
6608
|
+
color: disabledColor,
|
|
6609
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6610
|
+
color: disabledColorDark,
|
|
6611
|
+
}),
|
|
6612
|
+
},
|
|
6613
|
+
'&--hidden': {
|
|
6614
|
+
display: 'none',
|
|
6615
|
+
},
|
|
6616
|
+
},
|
|
6289
6617
|
checkbox: {
|
|
6290
6618
|
pointerEvents: 'none', // Avoid checkbox label click which updates input within p-checkbox-wrapper
|
|
6291
6619
|
},
|
|
@@ -6308,9 +6636,11 @@ const getPlaceholderJssStyle = (styles) => ({
|
|
|
6308
6636
|
const inputYPadding = '13px';
|
|
6309
6637
|
const selectorNativeSelect = '::slotted([slot=select])';
|
|
6310
6638
|
const INPUT_HEIGHT_CALC = `${fontLineHeight} + 6px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2`;
|
|
6311
|
-
const getComponentCss$
|
|
6639
|
+
const getComponentCss$x = (direction, isOpen, isDisabled, hideLabel, state, isWithinForm, hasLabel, theme) => {
|
|
6312
6640
|
const { primaryColor, contrastMediumColor, contrastHighColor, backgroundColor, disabledColor } = getThemedColors(theme);
|
|
6641
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, backgroundColor: backgroundColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
6313
6642
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
6643
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
6314
6644
|
const isDirectionDown = direction === 'down';
|
|
6315
6645
|
return getCss({
|
|
6316
6646
|
'@global': {
|
|
@@ -6318,6 +6648,7 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6318
6648
|
':host': {
|
|
6319
6649
|
display: 'block',
|
|
6320
6650
|
position: 'relative',
|
|
6651
|
+
...colorSchemeStyles,
|
|
6321
6652
|
...hostHiddenStyles,
|
|
6322
6653
|
},
|
|
6323
6654
|
...(isWithinForm && {
|
|
@@ -6336,19 +6667,25 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6336
6667
|
...getListStyles$1(isOpen, direction, theme),
|
|
6337
6668
|
'input-container': {
|
|
6338
6669
|
display: 'flex',
|
|
6339
|
-
background: backgroundColor,
|
|
6340
6670
|
transition: ['color', 'border-color', 'background-color'].map(getTransition).join(),
|
|
6341
6671
|
cursor: 'text',
|
|
6342
6672
|
...hoverMediaQuery({
|
|
6343
6673
|
'&:hover:not(.disabled)': {
|
|
6344
6674
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
6675
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6676
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
6677
|
+
}),
|
|
6345
6678
|
},
|
|
6346
6679
|
}),
|
|
6347
6680
|
...(!isDisabled && {
|
|
6348
6681
|
'&:focus-within': {
|
|
6349
6682
|
borderColor: primaryColor,
|
|
6683
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6684
|
+
borderColor: primaryColorDark,
|
|
6685
|
+
}),
|
|
6350
6686
|
},
|
|
6351
6687
|
}),
|
|
6688
|
+
background: backgroundColor,
|
|
6352
6689
|
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
6353
6690
|
borderRadius: borderRadiusSmall,
|
|
6354
6691
|
...(isOpen && {
|
|
@@ -6363,6 +6700,18 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6363
6700
|
borderColor: disabledColor,
|
|
6364
6701
|
WebkitTextFillColor: disabledColor,
|
|
6365
6702
|
}),
|
|
6703
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6704
|
+
background: backgroundColorDark,
|
|
6705
|
+
border: `${borderWidthBase} solid ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark}`,
|
|
6706
|
+
...(isOpen && {
|
|
6707
|
+
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColorDark}`),
|
|
6708
|
+
}),
|
|
6709
|
+
...(isDisabled && {
|
|
6710
|
+
color: disabledColorDark,
|
|
6711
|
+
borderColor: disabledColorDark,
|
|
6712
|
+
WebkitTextFillColor: disabledColorDark,
|
|
6713
|
+
}),
|
|
6714
|
+
}),
|
|
6366
6715
|
},
|
|
6367
6716
|
...buildResponsiveStyles(hideLabel, (isHidden) => isHidden
|
|
6368
6717
|
? {
|
|
@@ -6393,6 +6742,9 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6393
6742
|
'no-results': {
|
|
6394
6743
|
padding: `${spacingStaticSmall} 12px`,
|
|
6395
6744
|
color: contrastHighColor,
|
|
6745
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6746
|
+
color: contrastHighColorDark,
|
|
6747
|
+
}),
|
|
6396
6748
|
boxSizing: 'border-box',
|
|
6397
6749
|
...getNoResultsOptionJssStyle(),
|
|
6398
6750
|
},
|
|
@@ -6403,13 +6755,13 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6403
6755
|
};
|
|
6404
6756
|
const getInputStyles = (isDisabled, theme) => {
|
|
6405
6757
|
const { primaryColor, disabledColor } = getThemedColors(theme);
|
|
6758
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark } = getThemedColors('dark');
|
|
6406
6759
|
return {
|
|
6407
6760
|
input: {
|
|
6408
6761
|
flex: 1,
|
|
6409
6762
|
minWidth: 0,
|
|
6410
6763
|
height: `calc(${INPUT_HEIGHT_CALC})`,
|
|
6411
6764
|
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
6412
|
-
color: primaryColor,
|
|
6413
6765
|
padding: `${inputYPadding} ${spacingStaticMedium}`,
|
|
6414
6766
|
boxSizing: 'border-box',
|
|
6415
6767
|
border: 0,
|
|
@@ -6421,14 +6773,23 @@ const getInputStyles = (isDisabled, theme) => {
|
|
|
6421
6773
|
'&:disabled': {
|
|
6422
6774
|
cursor: 'not-allowed',
|
|
6423
6775
|
},
|
|
6424
|
-
|
|
6776
|
+
color: primaryColor,
|
|
6425
6777
|
...(isDisabled && getPlaceholderJssStyle({ color: disabledColor })),
|
|
6778
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6779
|
+
color: primaryColorDark,
|
|
6780
|
+
...(isDisabled && getPlaceholderJssStyle({ color: disabledColorDark })),
|
|
6781
|
+
}),
|
|
6782
|
+
'&:not(:focus)': {
|
|
6783
|
+
...getPlaceholderJssStyle({ color: primaryColor, opacity: 1 }),
|
|
6784
|
+
...prefersColorSchemeDarkMediaQuery(theme, getPlaceholderJssStyle({ color: primaryColorDark, opacity: 1 })),
|
|
6785
|
+
}, // Opacity fixes placeholder being shown lighter in firefox
|
|
6426
6786
|
},
|
|
6427
6787
|
};
|
|
6428
6788
|
};
|
|
6429
6789
|
const getListStyles$1 = (isOpen, direction, theme) => {
|
|
6430
6790
|
const isDirectionDown = direction === 'down';
|
|
6431
6791
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
6792
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
6432
6793
|
return {
|
|
6433
6794
|
listbox: {
|
|
6434
6795
|
position: 'absolute',
|
|
@@ -6437,7 +6798,6 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6437
6798
|
flexDirection: 'column',
|
|
6438
6799
|
gap: spacingStaticSmall,
|
|
6439
6800
|
padding: '6px',
|
|
6440
|
-
background: backgroundColor,
|
|
6441
6801
|
...textSmallStyle,
|
|
6442
6802
|
zIndex: 10,
|
|
6443
6803
|
left: 0,
|
|
@@ -6449,6 +6809,7 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6449
6809
|
maxHeight: `${8.5 * (MULTI_SELECT_OPTION_HEIGHT + 8) + 6 + 2}px`,
|
|
6450
6810
|
overflowY: 'auto',
|
|
6451
6811
|
WebkitOverflowScrolling: 'touch',
|
|
6812
|
+
background: backgroundColor,
|
|
6452
6813
|
border: `2px solid ${primaryColor}`,
|
|
6453
6814
|
[isDirectionDown ? 'borderTop' : 'borderBottom']: 'none',
|
|
6454
6815
|
borderRadius: borderRadiusSmall,
|
|
@@ -6457,7 +6818,11 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6457
6818
|
scrollbarWidth: 'thin',
|
|
6458
6819
|
scrollbarColor: 'auto',
|
|
6459
6820
|
transition: getTransition('border-color'),
|
|
6460
|
-
transform: 'translate3d(0,0,0)',
|
|
6821
|
+
transform: 'translate3d(0,0,0)',
|
|
6822
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6823
|
+
background: backgroundColorDark,
|
|
6824
|
+
borderColor: primaryColorDark,
|
|
6825
|
+
}),
|
|
6461
6826
|
},
|
|
6462
6827
|
};
|
|
6463
6828
|
};
|
|
@@ -6470,13 +6835,17 @@ const disabledCursorStyle = {
|
|
|
6470
6835
|
cursor: 'default',
|
|
6471
6836
|
pointerEvents: 'none', // prevents :hover (has no effect when forced), maybe we can remove it since CSS selectors already cover desired behavior
|
|
6472
6837
|
};
|
|
6473
|
-
const getComponentCss$
|
|
6838
|
+
const getComponentCss$w = (maxNumberOfPageLinks, theme) => {
|
|
6474
6839
|
const { primaryColor, disabledColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
6840
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, hoverColor: hoverColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
6475
6841
|
return getCss({
|
|
6476
6842
|
'@global': {
|
|
6477
6843
|
':host': {
|
|
6478
6844
|
display: 'block',
|
|
6479
|
-
...addImportantToEachRule(
|
|
6845
|
+
...addImportantToEachRule({
|
|
6846
|
+
...colorSchemeStyles,
|
|
6847
|
+
...hostHiddenStyles,
|
|
6848
|
+
}),
|
|
6480
6849
|
},
|
|
6481
6850
|
nav: {
|
|
6482
6851
|
display: 'flex',
|
|
@@ -6522,10 +6891,16 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
6522
6891
|
outline: 0,
|
|
6523
6892
|
borderRadius: borderRadiusSmall,
|
|
6524
6893
|
borderColor: 'transparent',
|
|
6894
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6895
|
+
color: primaryColorDark,
|
|
6896
|
+
}),
|
|
6525
6897
|
...hoverMediaQuery({
|
|
6526
6898
|
'&:not([aria-disabled]):not(.ellipsis):hover': {
|
|
6527
6899
|
...frostedGlassStyle,
|
|
6528
6900
|
background: hoverColor,
|
|
6901
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6902
|
+
background: hoverColorDark,
|
|
6903
|
+
}),
|
|
6529
6904
|
},
|
|
6530
6905
|
}),
|
|
6531
6906
|
'&:not(.ellipsis):focus:focus-visible::before': {
|
|
@@ -6534,16 +6909,26 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
6534
6909
|
...getInsetJssStyle(-4),
|
|
6535
6910
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6536
6911
|
borderRadius: borderRadiusMedium,
|
|
6912
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6913
|
+
borderColor: focusColorDark,
|
|
6914
|
+
}),
|
|
6537
6915
|
},
|
|
6538
6916
|
'&[aria-current]': {
|
|
6539
6917
|
...disabledCursorStyle,
|
|
6540
6918
|
color: primaryColor,
|
|
6541
6919
|
border: `${borderWidthBase} solid ${primaryColor}`,
|
|
6920
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6921
|
+
color: primaryColorDark,
|
|
6922
|
+
borderColor: primaryColorDark,
|
|
6923
|
+
}),
|
|
6542
6924
|
'&:not(.ellipsis):focus::before': getInsetJssStyle(-6),
|
|
6543
6925
|
},
|
|
6544
6926
|
'&[aria-disabled]': {
|
|
6545
6927
|
...disabledCursorStyle,
|
|
6546
6928
|
color: disabledColor,
|
|
6929
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6930
|
+
color: disabledColorDark,
|
|
6931
|
+
}),
|
|
6547
6932
|
},
|
|
6548
6933
|
},
|
|
6549
6934
|
},
|
|
@@ -6556,6 +6941,82 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
6556
6941
|
});
|
|
6557
6942
|
};
|
|
6558
6943
|
|
|
6944
|
+
const removeSlottedSelector = (styles) => Object.fromEntries(Object.entries(styles).map(([key, value]) => {
|
|
6945
|
+
value = typeof value === 'object' ? removeSlottedSelector(value) : value;
|
|
6946
|
+
return [key.replace(/::slotted\(([^,]+)\)/g, '$1'), value];
|
|
6947
|
+
}));
|
|
6948
|
+
const removeStyles = (selector, styles) => Object.fromEntries(Object.entries(styles)
|
|
6949
|
+
.filter(([key]) => key !== selector)
|
|
6950
|
+
.map(([key, value]) => {
|
|
6951
|
+
value = typeof value === 'object' ? removeStyles(selector, value) : value;
|
|
6952
|
+
return [key, value];
|
|
6953
|
+
}));
|
|
6954
|
+
|
|
6955
|
+
const getComponentCss$v = (hideLabel, state, isDisabled, isLoading, isWithinForm, length, theme) => {
|
|
6956
|
+
const inputSize = `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`; // equivalent to calculation of input height within form-styles
|
|
6957
|
+
const labelStyles = removeStyles('@media(hover:hover)', removeSlottedSelector(getLabelStyles('input', isDisabled, hideLabel, state, theme)));
|
|
6958
|
+
const inputStyles = removeStyles('input[readonly]', removeSlottedSelector(getBaseChildStyles('input', state, theme, {
|
|
6959
|
+
textAlign: 'center',
|
|
6960
|
+
width: inputSize,
|
|
6961
|
+
...(length === 6 && {
|
|
6962
|
+
[getMediaQueryMax('xs')]: {
|
|
6963
|
+
width: `calc((276px - (${spacingStaticSmall} * 5)) / 6)`, // calculate the max with of the inputs that fit into grid in viewport base (276px)
|
|
6964
|
+
},
|
|
6965
|
+
}),
|
|
6966
|
+
...(isLoading && {
|
|
6967
|
+
opacity: 0.2,
|
|
6968
|
+
cursor: 'not-allowed',
|
|
6969
|
+
}),
|
|
6970
|
+
})));
|
|
6971
|
+
return getCss({
|
|
6972
|
+
'@global': {
|
|
6973
|
+
':host': addImportantToEachRule({
|
|
6974
|
+
display: 'block',
|
|
6975
|
+
...colorSchemeStyles,
|
|
6976
|
+
...hostHiddenStyles,
|
|
6977
|
+
}),
|
|
6978
|
+
...inputStyles,
|
|
6979
|
+
...(isWithinForm &&
|
|
6980
|
+
addImportantToEachRule({
|
|
6981
|
+
'::slotted(input)': {
|
|
6982
|
+
position: 'absolute',
|
|
6983
|
+
height: inputSize,
|
|
6984
|
+
width: 0,
|
|
6985
|
+
opacity: 0,
|
|
6986
|
+
},
|
|
6987
|
+
})),
|
|
6988
|
+
},
|
|
6989
|
+
...(isLoading && {
|
|
6990
|
+
spinner: {
|
|
6991
|
+
width: '100%',
|
|
6992
|
+
height: inputSize,
|
|
6993
|
+
pointerEvents: 'none',
|
|
6994
|
+
position: 'absolute',
|
|
6995
|
+
top: '50%',
|
|
6996
|
+
left: '50%',
|
|
6997
|
+
transform: 'translate(-50%, -50%)',
|
|
6998
|
+
},
|
|
6999
|
+
}),
|
|
7000
|
+
'input-container': {
|
|
7001
|
+
display: 'flex',
|
|
7002
|
+
position: 'relative',
|
|
7003
|
+
gap: spacingStaticSmall,
|
|
7004
|
+
flexWrap: 'wrap',
|
|
7005
|
+
width: 'fit-content',
|
|
7006
|
+
},
|
|
7007
|
+
...mergeDeep(labelStyles, {
|
|
7008
|
+
label: {
|
|
7009
|
+
...buildResponsiveStyles(hideLabel,
|
|
7010
|
+
// workaround: since pin-code component is not wrapped into label tag it behaves differently
|
|
7011
|
+
(isLabelHidden) => (isLabelHidden ? { display: 'none' } : { display: 'inline-flex' })),
|
|
7012
|
+
marginBottom: spacingStaticXSmall,
|
|
7013
|
+
},
|
|
7014
|
+
}),
|
|
7015
|
+
...getFunctionalComponentRequiredStyles(),
|
|
7016
|
+
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
7017
|
+
});
|
|
7018
|
+
};
|
|
7019
|
+
|
|
6559
7020
|
const { backgroundColor: backgroundColorThemeLight, primaryColor: primaryColorThemeLight } = getThemedColors('light');
|
|
6560
7021
|
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
6561
7022
|
const directionPositionMap = {
|
|
@@ -6630,6 +7091,7 @@ const getComponentCss$u = (direction, theme) => {
|
|
|
6630
7091
|
...addImportantToEachRule({
|
|
6631
7092
|
position: 'relative',
|
|
6632
7093
|
display: 'inline-block',
|
|
7094
|
+
...colorSchemeStyles,
|
|
6633
7095
|
...hostHiddenStyles,
|
|
6634
7096
|
}),
|
|
6635
7097
|
verticalAlign: 'top',
|
|
@@ -6726,19 +7188,30 @@ const getComponentCss$u = (direction, theme) => {
|
|
|
6726
7188
|
});
|
|
6727
7189
|
};
|
|
6728
7190
|
|
|
6729
|
-
const
|
|
7191
|
+
const getCheckedSVGBackgroundImage = (fill) => {
|
|
7192
|
+
return getInlineSVGBackgroundImage(`<circle fill="${fill}" cx="12" cy="12" r="6"/>`);
|
|
7193
|
+
};
|
|
7194
|
+
const getComponentCss$t = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
6730
7195
|
const checkedIconColor = isHighContrastMode
|
|
6731
7196
|
? getHighContrastColors().canvasColor
|
|
6732
|
-
: getInvertedThemedColors(theme).primaryColor
|
|
6733
|
-
|
|
7197
|
+
: escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
|
|
7198
|
+
const checkedIconColorDark = isHighContrastMode
|
|
7199
|
+
? getHighContrastColors().canvasColor
|
|
7200
|
+
: escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
7201
|
+
return getCss(mergeDeep(getCheckboxRadioJssStyle(hideLabel, state, isDisabled, isLoading, theme), {
|
|
6734
7202
|
'@global': {
|
|
6735
7203
|
'::slotted': addImportantToEachRule({
|
|
6736
7204
|
'&(input)': {
|
|
6737
7205
|
borderRadius: '50%',
|
|
6738
7206
|
},
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
7207
|
+
...(!isLoading && {
|
|
7208
|
+
'&(input:checked)': {
|
|
7209
|
+
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColor),
|
|
7210
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7211
|
+
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColorDark),
|
|
7212
|
+
}),
|
|
7213
|
+
},
|
|
7214
|
+
}),
|
|
6742
7215
|
...(!isDisabled && {
|
|
6743
7216
|
'&(input:focus)::before': {
|
|
6744
7217
|
borderRadius: '50%',
|
|
@@ -6749,15 +7222,18 @@ const getComponentCss$t = (hideLabel, state, isDisabled, theme) => {
|
|
|
6749
7222
|
}));
|
|
6750
7223
|
};
|
|
6751
7224
|
|
|
7225
|
+
const gradientColorLight = {
|
|
7226
|
+
'background-base': '255,255,255',
|
|
7227
|
+
'background-surface': '238,239,242',
|
|
7228
|
+
};
|
|
7229
|
+
const gradientColorDark = {
|
|
7230
|
+
'background-base': '14,14,18',
|
|
7231
|
+
'background-surface': '33,34,37',
|
|
7232
|
+
};
|
|
6752
7233
|
const gradientColorMap = {
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
},
|
|
6757
|
-
dark: {
|
|
6758
|
-
'background-base': '14,14,18',
|
|
6759
|
-
'background-surface': '33,34,37',
|
|
6760
|
-
},
|
|
7234
|
+
auto: gradientColorLight,
|
|
7235
|
+
light: gradientColorLight,
|
|
7236
|
+
dark: gradientColorDark,
|
|
6761
7237
|
};
|
|
6762
7238
|
const getGradient = (theme, gradientColorTheme) => {
|
|
6763
7239
|
const gradientColor = gradientColorMap[theme][gradientColorTheme];
|
|
@@ -6768,15 +7244,17 @@ const getGradient = (theme, gradientColorTheme) => {
|
|
|
6768
7244
|
};
|
|
6769
7245
|
const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndicatorPosition, hasScrollbar, theme) => {
|
|
6770
7246
|
const { backgroundColor, backgroundSurfaceColor, focusColor, hoverColor } = getThemedColors(theme);
|
|
6771
|
-
const
|
|
7247
|
+
const { backgroundColor: backgroundColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, focusColor: focusColorDark, hoverColor: hoverColorDark, } = getThemedColors('dark');
|
|
7248
|
+
const backgroundColorLight = {
|
|
7249
|
+
'background-base': backgroundColor,
|
|
7250
|
+
'background-surface': backgroundSurfaceColor,
|
|
7251
|
+
};
|
|
6772
7252
|
const backgroundColorMap = {
|
|
7253
|
+
auto: backgroundColorLight,
|
|
7254
|
+
light: backgroundColorLight,
|
|
6773
7255
|
dark: {
|
|
6774
|
-
'background-base':
|
|
6775
|
-
'background-surface':
|
|
6776
|
-
},
|
|
6777
|
-
light: {
|
|
6778
|
-
'background-base': backgroundColor,
|
|
6779
|
-
'background-surface': backgroundSurfaceColor,
|
|
7256
|
+
'background-base': backgroundSurfaceColorDark,
|
|
7257
|
+
'background-surface': backgroundColorDark,
|
|
6780
7258
|
},
|
|
6781
7259
|
};
|
|
6782
7260
|
const actionPrevNextStyles = {
|
|
@@ -6791,6 +7269,7 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6791
7269
|
':host': addImportantToEachRule({
|
|
6792
7270
|
display: 'block',
|
|
6793
7271
|
height: 'inherit',
|
|
7272
|
+
...colorSchemeStyles,
|
|
6794
7273
|
...hostHiddenStyles,
|
|
6795
7274
|
}),
|
|
6796
7275
|
button: {
|
|
@@ -6805,15 +7284,21 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6805
7284
|
outline: 0,
|
|
6806
7285
|
cursor: 'pointer',
|
|
6807
7286
|
background: backgroundColorMap[theme][gradientColor],
|
|
7287
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7288
|
+
background: backgroundColorMap.dark[gradientColor],
|
|
7289
|
+
}),
|
|
6808
7290
|
borderRadius: borderRadiusSmall,
|
|
6809
7291
|
...frostedGlassStyle,
|
|
6810
7292
|
visibility: 'hidden',
|
|
6811
|
-
...(!
|
|
7293
|
+
...(!isThemeDark(theme) && dropShadowLowStyle),
|
|
6812
7294
|
...hoverMediaQuery({
|
|
6813
7295
|
transition: getTransition('background-color'),
|
|
6814
7296
|
'&:hover': {
|
|
6815
7297
|
...frostedGlassStyle,
|
|
6816
7298
|
background: hoverColor,
|
|
7299
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7300
|
+
background: hoverColorDark,
|
|
7301
|
+
}),
|
|
6817
7302
|
},
|
|
6818
7303
|
}),
|
|
6819
7304
|
},
|
|
@@ -6856,6 +7341,9 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6856
7341
|
},
|
|
6857
7342
|
'&:focus::before': {
|
|
6858
7343
|
borderColor: focusColor,
|
|
7344
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7345
|
+
borderColor: focusColorDark,
|
|
7346
|
+
}),
|
|
6859
7347
|
},
|
|
6860
7348
|
'&:focus:not(:focus-visible)::before': {
|
|
6861
7349
|
borderColor: 'transparent',
|
|
@@ -6880,6 +7368,9 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6880
7368
|
gridArea: '1 / 1 / 1 / 1',
|
|
6881
7369
|
justifyContent: 'flex-start',
|
|
6882
7370
|
background: `linear-gradient(to right, ${getGradient(theme, gradientColor)} 100%)`,
|
|
7371
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7372
|
+
background: `linear-gradient(to right, ${getGradient('dark', gradientColor)} 100%)`,
|
|
7373
|
+
}),
|
|
6883
7374
|
visibility: isPrevHidden ? 'hidden' : 'visible',
|
|
6884
7375
|
'& button': {
|
|
6885
7376
|
marginLeft: '8px',
|
|
@@ -6895,6 +7386,9 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6895
7386
|
gridArea: '1 / 3 / 1 / 3',
|
|
6896
7387
|
justifyContent: 'flex-end',
|
|
6897
7388
|
background: `linear-gradient(to left, ${getGradient(theme, gradientColor)} 100%)`,
|
|
7389
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7390
|
+
background: `linear-gradient(to left, ${getGradient('dark', gradientColor)} 100%)`,
|
|
7391
|
+
}),
|
|
6898
7392
|
visibility: isNextHidden ? 'hidden' : 'visible',
|
|
6899
7393
|
'& button': {
|
|
6900
7394
|
marginRight: '8px',
|
|
@@ -6923,7 +7417,9 @@ const getColors$2 = (isDisabled, isSelected, theme) => {
|
|
|
6923
7417
|
const getItemPadding = (hasIconAndSlottedContent) => hasIconAndSlottedContent ? `13px ${ITEM_PADDING} 13px 13px` : `13px ${ITEM_PADDING}`;
|
|
6924
7418
|
const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, theme) => {
|
|
6925
7419
|
const { focusColor } = getThemedColors(theme);
|
|
7420
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
6926
7421
|
const { buttonColor, labelColor, borderColor, hoverBorderColor } = getColors$2(isDisabled, isSelected, theme);
|
|
7422
|
+
const { buttonColor: buttonColorDark, labelColor: labelColorDark, borderColor: borderColorDark, hoverBorderColor: hoverBorderColorDark, } = getColors$2(isDisabled, isSelected, 'dark');
|
|
6927
7423
|
return getCss({
|
|
6928
7424
|
'@global': {
|
|
6929
7425
|
':host': addImportantToEachRule({
|
|
@@ -6933,6 +7429,7 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6933
7429
|
}),
|
|
6934
7430
|
// All width relevant styling has to be kept in sync with the tempDiv of the p-segmented-control utils
|
|
6935
7431
|
button: {
|
|
7432
|
+
position: 'relative',
|
|
6936
7433
|
display: 'block',
|
|
6937
7434
|
height: '100%',
|
|
6938
7435
|
width: '100%',
|
|
@@ -6944,7 +7441,10 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6944
7441
|
background: 'transparent',
|
|
6945
7442
|
color: buttonColor,
|
|
6946
7443
|
...textSmallStyle,
|
|
6947
|
-
|
|
7444
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7445
|
+
borderColor: borderColorDark,
|
|
7446
|
+
color: buttonColorDark,
|
|
7447
|
+
}),
|
|
6948
7448
|
'&::before': {
|
|
6949
7449
|
content: '""',
|
|
6950
7450
|
position: 'absolute',
|
|
@@ -6954,6 +7454,9 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6954
7454
|
},
|
|
6955
7455
|
'&:focus::before': {
|
|
6956
7456
|
borderColor: focusColor,
|
|
7457
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7458
|
+
borderColor: focusColorDark,
|
|
7459
|
+
}),
|
|
6957
7460
|
},
|
|
6958
7461
|
'&:focus:not(:focus-visible)::before': {
|
|
6959
7462
|
borderColor: 'transparent',
|
|
@@ -6969,6 +7472,9 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6969
7472
|
transition: getTransition('border-color'),
|
|
6970
7473
|
'&:hover': {
|
|
6971
7474
|
borderColor: hoverBorderColor,
|
|
7475
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7476
|
+
borderColor: hoverBorderColorDark,
|
|
7477
|
+
}),
|
|
6972
7478
|
},
|
|
6973
7479
|
})),
|
|
6974
7480
|
}),
|
|
@@ -6979,6 +7485,9 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6979
7485
|
...textXSmallStyle,
|
|
6980
7486
|
overflowWrap: 'normal',
|
|
6981
7487
|
color: labelColor,
|
|
7488
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7489
|
+
color: labelColorDark,
|
|
7490
|
+
}),
|
|
6982
7491
|
},
|
|
6983
7492
|
},
|
|
6984
7493
|
...(hasIcon && {
|
|
@@ -7006,6 +7515,7 @@ const getComponentCss$q = (maxWidth, columns) => {
|
|
|
7006
7515
|
gridTemplateColumns: col === 'auto' ? `repeat(auto-fit, ${maxWidth}px)` : `repeat(${col}, minmax(0, 1fr))`,
|
|
7007
7516
|
})),
|
|
7008
7517
|
gap: '6px',
|
|
7518
|
+
...colorSchemeStyles,
|
|
7009
7519
|
...hostHiddenStyles,
|
|
7010
7520
|
}),
|
|
7011
7521
|
},
|
|
@@ -7015,7 +7525,9 @@ const getComponentCss$q = (maxWidth, columns) => {
|
|
|
7015
7525
|
const dropdownPositionVar = '--p-internal-dropdown-position';
|
|
7016
7526
|
const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
7017
7527
|
const { primaryColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
7528
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
7018
7529
|
const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
|
|
7530
|
+
const { formStateHoverColor: formStateHoverColorDark, formStateColor: formStateColorDark } = getThemedFormStateColors('dark', state);
|
|
7019
7531
|
const isDirectionDown = direction === 'down';
|
|
7020
7532
|
return {
|
|
7021
7533
|
'@global': {
|
|
@@ -7032,17 +7544,29 @@ const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
|
7032
7544
|
outline: '0',
|
|
7033
7545
|
cursor: 'pointer',
|
|
7034
7546
|
transition: getTransition('border-color'),
|
|
7547
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7548
|
+
borderColor: isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7549
|
+
}),
|
|
7035
7550
|
'&:focus, &:focus ~ ul': {
|
|
7036
7551
|
borderColor: primaryColor,
|
|
7552
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7553
|
+
borderColor: primaryColorDark,
|
|
7554
|
+
}),
|
|
7037
7555
|
},
|
|
7038
7556
|
...hoverMediaQuery({
|
|
7039
7557
|
'&:not(:disabled):not(:focus):hover': {
|
|
7040
7558
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
7559
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7560
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
7561
|
+
}),
|
|
7041
7562
|
},
|
|
7042
7563
|
}),
|
|
7043
7564
|
'&:disabled': {
|
|
7044
7565
|
cursor: 'not-allowed',
|
|
7045
7566
|
borderColor: disabledColor,
|
|
7567
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7568
|
+
borderColor: disabledColorDark,
|
|
7569
|
+
}),
|
|
7046
7570
|
},
|
|
7047
7571
|
...(isOpen && {
|
|
7048
7572
|
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
@@ -7054,12 +7578,18 @@ const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
|
7054
7578
|
};
|
|
7055
7579
|
const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
7056
7580
|
const { primaryColor, backgroundColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
7581
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
7057
7582
|
const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
|
|
7583
|
+
const { formStateHoverColor: formStateHoverColorDark, formStateColor: formStateColorDark } = getThemedFormStateColors('dark', state);
|
|
7058
7584
|
const isDirectionDown = direction === 'down';
|
|
7059
7585
|
const placeHolderJssStyle = {
|
|
7060
7586
|
opacity: 1,
|
|
7061
7587
|
color: disabled ? disabledColor : primaryColor,
|
|
7062
7588
|
};
|
|
7589
|
+
const placeHolderDarkJssStyle = {
|
|
7590
|
+
opacity: 1,
|
|
7591
|
+
color: disabled ? disabledColorDark : primaryColorDark,
|
|
7592
|
+
};
|
|
7063
7593
|
return {
|
|
7064
7594
|
'@global': {
|
|
7065
7595
|
input: {
|
|
@@ -7083,23 +7613,45 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7083
7613
|
cursor: disabled ? 'not-allowed' : 'text',
|
|
7084
7614
|
color: primaryColor,
|
|
7085
7615
|
background: backgroundColor,
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7616
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7617
|
+
color: primaryColorDark,
|
|
7618
|
+
background: backgroundColorDark,
|
|
7619
|
+
}),
|
|
7620
|
+
'&::placeholder': {
|
|
7621
|
+
...placeHolderJssStyle,
|
|
7622
|
+
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
7623
|
+
},
|
|
7624
|
+
'&::-webkit-input-placeholder': {
|
|
7625
|
+
...placeHolderJssStyle,
|
|
7626
|
+
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
7627
|
+
},
|
|
7628
|
+
'&::-moz-placeholder': {
|
|
7629
|
+
...placeHolderJssStyle,
|
|
7630
|
+
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
7631
|
+
},
|
|
7089
7632
|
'&:not(:disabled):focus': {
|
|
7090
7633
|
opacity: 1,
|
|
7091
7634
|
'&+span, &~ ul': {
|
|
7092
7635
|
borderColor: primaryColor,
|
|
7636
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7637
|
+
borderColor: primaryColorDark,
|
|
7638
|
+
}),
|
|
7093
7639
|
},
|
|
7094
7640
|
},
|
|
7095
7641
|
...hoverMediaQuery({
|
|
7096
7642
|
'&:not(:disabled)': {
|
|
7097
7643
|
'&+span:hover': {
|
|
7098
7644
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
7645
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7646
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
7647
|
+
}),
|
|
7099
7648
|
},
|
|
7100
7649
|
'&:hover': {
|
|
7101
7650
|
'&+span, &~ul': {
|
|
7102
7651
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
7652
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7653
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
7654
|
+
}),
|
|
7103
7655
|
},
|
|
7104
7656
|
},
|
|
7105
7657
|
},
|
|
@@ -7112,6 +7664,9 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7112
7664
|
pointerEvents: 'all',
|
|
7113
7665
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
7114
7666
|
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
7667
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7668
|
+
borderColor: isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7669
|
+
}),
|
|
7115
7670
|
borderRadius: borderRadiusSmall,
|
|
7116
7671
|
...(isOpen && {
|
|
7117
7672
|
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
@@ -7124,7 +7679,9 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7124
7679
|
};
|
|
7125
7680
|
const getListStyles = (direction, theme) => {
|
|
7126
7681
|
const isDirectionDown = direction === 'down';
|
|
7127
|
-
const { primaryColor, backgroundColor, contrastMediumColor } = getThemedColors(
|
|
7682
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
7683
|
+
const { primaryColor, backgroundColor, contrastMediumColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor, } = getThemedColors(theme);
|
|
7684
|
+
const { highlightColor } = getHighContrastColors();
|
|
7128
7685
|
return {
|
|
7129
7686
|
'@global': {
|
|
7130
7687
|
ul: {
|
|
@@ -7153,15 +7710,72 @@ const getListStyles = (direction, theme) => {
|
|
|
7153
7710
|
scrollbarWidth: 'thin',
|
|
7154
7711
|
scrollbarColor: 'auto',
|
|
7155
7712
|
transition: getTransition('border-color'),
|
|
7156
|
-
transform: 'translate3d(0,0,0)',
|
|
7713
|
+
transform: 'translate3d(0,0,0)',
|
|
7714
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7715
|
+
background: backgroundColorDark,
|
|
7716
|
+
borderColor: primaryColorDark,
|
|
7717
|
+
[isDirectionDown ? 'borderTopColor' : 'borderBottomColor']: addImportantToRule(contrastMediumColorDark),
|
|
7718
|
+
}),
|
|
7157
7719
|
},
|
|
7158
7720
|
},
|
|
7159
|
-
|
|
7721
|
+
option: {
|
|
7722
|
+
display: 'flex',
|
|
7723
|
+
justifyContent: 'space-between',
|
|
7724
|
+
gap: '12px',
|
|
7725
|
+
padding: `${spacingStaticSmall} 12px`,
|
|
7726
|
+
flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
|
|
7727
|
+
color: contrastHighColor,
|
|
7728
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7729
|
+
color: contrastHighColorDark,
|
|
7730
|
+
}),
|
|
7731
|
+
cursor: 'pointer',
|
|
7732
|
+
textAlign: 'left',
|
|
7733
|
+
wordBreak: 'break-word',
|
|
7734
|
+
boxSizing: 'border-box',
|
|
7735
|
+
borderRadius: borderRadiusSmall,
|
|
7736
|
+
transition: ['background-color', 'color'].map(getTransition).join(),
|
|
7737
|
+
...getNoResultsOptionJssStyle(),
|
|
7738
|
+
...hoverMediaQuery({
|
|
7739
|
+
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
7740
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
7741
|
+
background: contrastLowColor,
|
|
7742
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7743
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
7744
|
+
background: contrastLowColorDark,
|
|
7745
|
+
}),
|
|
7746
|
+
},
|
|
7747
|
+
}),
|
|
7160
7748
|
'&--selected': {
|
|
7161
7749
|
cursor: 'default',
|
|
7162
7750
|
pointerEvents: 'none',
|
|
7751
|
+
background: backgroundSurfaceColor,
|
|
7752
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7753
|
+
background: backgroundSurfaceColorDark,
|
|
7754
|
+
}),
|
|
7163
7755
|
},
|
|
7164
|
-
|
|
7756
|
+
'&--highlighted': {
|
|
7757
|
+
background: contrastLowColor,
|
|
7758
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7759
|
+
background: contrastLowColorDark,
|
|
7760
|
+
}),
|
|
7761
|
+
},
|
|
7762
|
+
'&--highlighted, &--selected': {
|
|
7763
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
7764
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7765
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
7766
|
+
}),
|
|
7767
|
+
},
|
|
7768
|
+
'&--disabled': {
|
|
7769
|
+
cursor: 'not-allowed',
|
|
7770
|
+
color: disabledColor,
|
|
7771
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7772
|
+
color: disabledColorDark,
|
|
7773
|
+
}),
|
|
7774
|
+
},
|
|
7775
|
+
'&--hidden': {
|
|
7776
|
+
display: 'none',
|
|
7777
|
+
},
|
|
7778
|
+
},
|
|
7165
7779
|
optgroup: {
|
|
7166
7780
|
display: 'block',
|
|
7167
7781
|
padding: '3px 14px',
|
|
@@ -7177,7 +7791,9 @@ const getListStyles = (direction, theme) => {
|
|
|
7177
7791
|
};
|
|
7178
7792
|
const getComponentCss$p = (direction, isOpen, state, disabled, filter, theme) => {
|
|
7179
7793
|
const { primaryColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
7794
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
7180
7795
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
7796
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
7181
7797
|
return getCss(
|
|
7182
7798
|
// merge because of global styles
|
|
7183
7799
|
mergeDeep({
|
|
@@ -7192,11 +7808,17 @@ const getComponentCss$p = (direction, isOpen, state, disabled, filter, theme) =>
|
|
|
7192
7808
|
left: 0,
|
|
7193
7809
|
right: 0,
|
|
7194
7810
|
color: disabled ? disabledColor : formStateColor || contrastMediumColor,
|
|
7811
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7812
|
+
color: disabled ? disabledColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7813
|
+
}),
|
|
7195
7814
|
...(!disabled &&
|
|
7196
7815
|
!isHighContrastMode &&
|
|
7197
7816
|
hoverMediaQuery({
|
|
7198
7817
|
'&(:hover)': {
|
|
7199
7818
|
color: formStateHoverColor || primaryColor,
|
|
7819
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7820
|
+
color: formStateHoverColorDark || primaryColorDark,
|
|
7821
|
+
}),
|
|
7200
7822
|
},
|
|
7201
7823
|
})),
|
|
7202
7824
|
},
|
|
@@ -7214,6 +7836,7 @@ const getComponentCss$o = (isDisabled, hasCustomDropdown, hideLabel, state, them
|
|
|
7214
7836
|
'@global': addImportantToEachRule({
|
|
7215
7837
|
':host': {
|
|
7216
7838
|
display: 'block',
|
|
7839
|
+
...colorSchemeStyles,
|
|
7217
7840
|
...hostHiddenStyles,
|
|
7218
7841
|
},
|
|
7219
7842
|
...getBaseChildStyles('select', state, theme, {
|
|
@@ -7258,12 +7881,14 @@ const getComponentCss$n = (size, theme) => {
|
|
|
7258
7881
|
const strokeDasharray = '57'; // C = 2πR
|
|
7259
7882
|
const animationDuration = 'var(--p-animation-duration, 2s)';
|
|
7260
7883
|
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
7884
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
7261
7885
|
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
7262
7886
|
return getCss({
|
|
7263
7887
|
'@global': {
|
|
7264
7888
|
':host': addImportantToEachRule({
|
|
7265
7889
|
display: 'inline-flex',
|
|
7266
7890
|
verticalAlign: 'top',
|
|
7891
|
+
...colorSchemeStyles,
|
|
7267
7892
|
...hostHiddenStyles,
|
|
7268
7893
|
}),
|
|
7269
7894
|
svg: {
|
|
@@ -7275,13 +7900,21 @@ const getComponentCss$n = (size, theme) => {
|
|
|
7275
7900
|
},
|
|
7276
7901
|
circle: {
|
|
7277
7902
|
'&:first-child': {
|
|
7903
|
+
// TODO: High Contrast Mode should be handled within a local color helper function
|
|
7278
7904
|
stroke: isHighContrastMode ? canvasTextColor : contrastMediumColor,
|
|
7905
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7906
|
+
stroke: isHighContrastMode ? canvasTextColor : contrastMediumColorDark,
|
|
7907
|
+
}),
|
|
7279
7908
|
animation: `$rotate ${animationDuration} linear infinite`, // needs to rotate to eliminate stutter in safari
|
|
7280
7909
|
},
|
|
7281
7910
|
'&:last-child': {
|
|
7282
7911
|
transformOrigin: '0 0',
|
|
7283
7912
|
animation: `$dash ${animationDuration} ease-in-out infinite`,
|
|
7913
|
+
// TODO: High Contrast Mode should be handled within a local color helper function
|
|
7284
7914
|
stroke: isHighContrastMode ? canvasColor : primaryColor,
|
|
7915
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7916
|
+
stroke: isHighContrastMode ? canvasColor : primaryColorDark,
|
|
7917
|
+
}),
|
|
7285
7918
|
strokeDasharray: strokeDasharray
|
|
7286
7919
|
,
|
|
7287
7920
|
strokeLinecap: 'round',
|
|
@@ -7324,7 +7957,7 @@ const getComponentCss$n = (size, theme) => {
|
|
|
7324
7957
|
|
|
7325
7958
|
const getSVGPath = (stepCount, numberedCircleColors, isStateCurrent) => {
|
|
7326
7959
|
// # of the hexcolor starts a fragment identifier in URLs, so we have to replace it with the escaped value of # = %23
|
|
7327
|
-
numberedCircleColors = Object.entries(numberedCircleColors).reduce((result, [key, value]) => ({ ...result, [key]: value
|
|
7960
|
+
numberedCircleColors = Object.entries(numberedCircleColors).reduce((result, [key, value]) => ({ ...result, [key]: escapeHashCharacter(value) }), {});
|
|
7328
7961
|
const { disabledColor, invertedBaseColor, primaryColor } = numberedCircleColors;
|
|
7329
7962
|
const fillColor = isStateCurrent ? invertedBaseColor : disabledColor;
|
|
7330
7963
|
const svgCirclePath = `<circle fill="${isStateCurrent ? primaryColor : 'none'}"${isStateCurrent ? '' : ` stroke="${fillColor}"`} stroke-width="1px" cx="12" cy="12" r="9"/>`;
|
|
@@ -7346,6 +7979,7 @@ const getSVGPath = (stepCount, numberedCircleColors, isStateCurrent) => {
|
|
|
7346
7979
|
};
|
|
7347
7980
|
const getComponentCss$m = (state, disabled, theme) => {
|
|
7348
7981
|
const { primaryColor, hoverColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
7982
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
7349
7983
|
const isStateCurrent = state === 'current';
|
|
7350
7984
|
const isStateCurrentOrUndefined = !state || isStateCurrent;
|
|
7351
7985
|
const isDisabled = !state || disabled;
|
|
@@ -7361,6 +7995,13 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
7361
7995
|
invertedBaseColor: getInvertedThemedColors(theme).primaryColor,
|
|
7362
7996
|
disabledColor,
|
|
7363
7997
|
}, isStateCurrent)),
|
|
7998
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7999
|
+
backgroundImage: getInlineSVGBackgroundImage(getSVGPath(i, {
|
|
8000
|
+
primaryColor: primaryColorDark,
|
|
8001
|
+
invertedBaseColor: getInvertedThemedColors('dark').primaryColor,
|
|
8002
|
+
disabledColor: disabledColorDark,
|
|
8003
|
+
}, isStateCurrent)),
|
|
8004
|
+
}),
|
|
7364
8005
|
},
|
|
7365
8006
|
}), {})),
|
|
7366
8007
|
...addImportantToEachRule({
|
|
@@ -7389,12 +8030,21 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
7389
8030
|
...frostedGlassStyle,
|
|
7390
8031
|
background: hoverColor,
|
|
7391
8032
|
}),
|
|
8033
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8034
|
+
color: isDisabled ? disabledColorDark : primaryColorDark,
|
|
8035
|
+
...(isStateCurrent && {
|
|
8036
|
+
background: hoverColorDark,
|
|
8037
|
+
}),
|
|
8038
|
+
}),
|
|
7392
8039
|
...(!isDisabled &&
|
|
7393
8040
|
hoverMediaQuery({
|
|
7394
8041
|
transition: getTransition('background-color'),
|
|
7395
8042
|
'&:hover': {
|
|
7396
8043
|
...frostedGlassStyle,
|
|
7397
8044
|
background: hoverColor,
|
|
8045
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8046
|
+
background: hoverColorDark,
|
|
8047
|
+
}),
|
|
7398
8048
|
},
|
|
7399
8049
|
})),
|
|
7400
8050
|
...(isStateCurrentOrUndefined && {
|
|
@@ -7411,6 +8061,9 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
7411
8061
|
position: 'absolute',
|
|
7412
8062
|
...getInsetJssStyle(),
|
|
7413
8063
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
8064
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8065
|
+
borderColor: focusColorDark,
|
|
8066
|
+
}),
|
|
7414
8067
|
borderRadius: borderRadiusSmall,
|
|
7415
8068
|
},
|
|
7416
8069
|
'&:focus:not(:focus-visible)::after': {
|
|
@@ -7434,7 +8087,10 @@ const getComponentCss$l = (size) => {
|
|
|
7434
8087
|
'@global': {
|
|
7435
8088
|
':host': {
|
|
7436
8089
|
display: 'block',
|
|
7437
|
-
...addImportantToEachRule(
|
|
8090
|
+
...addImportantToEachRule({
|
|
8091
|
+
...colorSchemeStyles,
|
|
8092
|
+
...hostHiddenStyles,
|
|
8093
|
+
}),
|
|
7438
8094
|
},
|
|
7439
8095
|
},
|
|
7440
8096
|
scroller: {
|
|
@@ -7474,11 +8130,14 @@ const getColors$1 = (checked, disabled, loading, theme) => {
|
|
|
7474
8130
|
};
|
|
7475
8131
|
const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, loading, theme) => {
|
|
7476
8132
|
const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, disabled, loading, theme);
|
|
8133
|
+
const { buttonBorderColor: buttonBorderColorDark, buttonBorderColorHover: buttonBorderColorHoverDark, buttonBackgroundColor: buttonBackgroundColorDark, buttonBackgroundColorHover: buttonBackgroundColorHoverDark, toggleBackgroundColor: toggleBackgroundColorDark, toggleBackgroundColorHover: toggleBackgroundColorHoverDark, textColor: textColorDark, } = getColors$1(checked, disabled, loading, 'dark');
|
|
7477
8134
|
const { focusColor } = getThemedColors(theme);
|
|
8135
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
7478
8136
|
return getCss({
|
|
7479
8137
|
'@global': {
|
|
7480
8138
|
':host': addImportantToEachRule({
|
|
7481
8139
|
outline: 0,
|
|
8140
|
+
...colorSchemeStyles,
|
|
7482
8141
|
...hostHiddenStyles,
|
|
7483
8142
|
...buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
7484
8143
|
display: stretchValue ? 'block' : 'inline-block',
|
|
@@ -7507,8 +8166,15 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7507
8166
|
'&:hover .switch': {
|
|
7508
8167
|
borderColor: buttonBorderColorHover,
|
|
7509
8168
|
backgroundColor: buttonBackgroundColorHover,
|
|
8169
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8170
|
+
borderColor: buttonBorderColorHoverDark,
|
|
8171
|
+
backgroundColor: buttonBackgroundColorHoverDark,
|
|
8172
|
+
}),
|
|
7510
8173
|
'& .toggle': {
|
|
7511
8174
|
backgroundColor: toggleBackgroundColorHover,
|
|
8175
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8176
|
+
backgroundColor: toggleBackgroundColorHoverDark,
|
|
8177
|
+
}),
|
|
7512
8178
|
},
|
|
7513
8179
|
},
|
|
7514
8180
|
})),
|
|
@@ -7517,6 +8183,9 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7517
8183
|
position: 'absolute',
|
|
7518
8184
|
...getInsetJssStyle(-6),
|
|
7519
8185
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
8186
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8187
|
+
borderColor: focusColorDark,
|
|
8188
|
+
}),
|
|
7520
8189
|
borderRadius: '18px',
|
|
7521
8190
|
},
|
|
7522
8191
|
'&:not(:focus-visible) .switch::before': {
|
|
@@ -7534,6 +8203,10 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7534
8203
|
backgroundColor: buttonBackgroundColor,
|
|
7535
8204
|
cursor: isDisabledOrLoading(disabled, loading) ? 'not-allowed' : 'pointer',
|
|
7536
8205
|
transition: `${getTransition('background-color')},${getTransition('border-color')},${getTransition('color')}`,
|
|
8206
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8207
|
+
borderColor: buttonBorderColorDark,
|
|
8208
|
+
backgroundColor: buttonBackgroundColorDark,
|
|
8209
|
+
}),
|
|
7537
8210
|
},
|
|
7538
8211
|
toggle: {
|
|
7539
8212
|
position: 'absolute',
|
|
@@ -7544,6 +8217,9 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7544
8217
|
display: 'block',
|
|
7545
8218
|
borderRadius: '50%',
|
|
7546
8219
|
backgroundColor: toggleBackgroundColor,
|
|
8220
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8221
|
+
backgroundColor: toggleBackgroundColorDark,
|
|
8222
|
+
}),
|
|
7547
8223
|
transform: `translate3d(${checked ? '20px' : '0'}, 0, 0)`,
|
|
7548
8224
|
transition: `${getTransition('background-color')},${getTransition('transform')}`,
|
|
7549
8225
|
},
|
|
@@ -7562,6 +8238,9 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7562
8238
|
minWidth: 0,
|
|
7563
8239
|
minHeight: 0,
|
|
7564
8240
|
color: textColor,
|
|
8241
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8242
|
+
color: textColorDark,
|
|
8243
|
+
}),
|
|
7565
8244
|
...mergeDeep(buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
7566
8245
|
order: alignLabelValue === 'left' ? -1 : 0,
|
|
7567
8246
|
})), buildResponsiveStyles(hideLabel, getHiddenTextJssStyle)),
|
|
@@ -7607,6 +8286,7 @@ const cssVariableTableBorderColor = '--p-internal-table-border-color';
|
|
|
7607
8286
|
const cssVariableTableHeadCellIconFilter = '--p-internal-table-head-cell-icon-filter';
|
|
7608
8287
|
const getComponentCss$h = (theme) => {
|
|
7609
8288
|
const { primaryColor, hoverColor, contrastLowColor } = doGetThemedColors(theme);
|
|
8289
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastLowColor: contrastLowColorDark, } = doGetThemedColors('dark');
|
|
7610
8290
|
return getCss({
|
|
7611
8291
|
'@global': {
|
|
7612
8292
|
':host': addImportantToEachRule({
|
|
@@ -7614,12 +8294,21 @@ const getComponentCss$h = (theme) => {
|
|
|
7614
8294
|
...textSmallStyle,
|
|
7615
8295
|
color: primaryColor,
|
|
7616
8296
|
textAlign: 'left',
|
|
8297
|
+
...colorSchemeStyles,
|
|
7617
8298
|
...hostHiddenStyles,
|
|
8299
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8300
|
+
color: primaryColorDark,
|
|
8301
|
+
}),
|
|
7618
8302
|
}),
|
|
7619
8303
|
'::slotted(*)': addImportantToEachRule({
|
|
7620
8304
|
[cssVariableTableHoverColor]: hoverColor,
|
|
7621
8305
|
[cssVariableTableBorderColor]: contrastLowColor,
|
|
7622
8306
|
[cssVariableTableHeadCellIconFilter]: isThemeDark(theme) ? 'invert(100%)' : 'none',
|
|
8307
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8308
|
+
[cssVariableTableHoverColor]: hoverColorDark,
|
|
8309
|
+
[cssVariableTableBorderColor]: contrastLowColorDark,
|
|
8310
|
+
[cssVariableTableHeadCellIconFilter]: 'invert(100%)',
|
|
8311
|
+
}),
|
|
7623
8312
|
...(isHighContrastMode &&
|
|
7624
8313
|
getSchemedHighContrastMediaQuery({
|
|
7625
8314
|
[cssVariableTableHeadCellIconFilter]: 'none',
|
|
@@ -7774,11 +8463,21 @@ const targetSelectors = ['a', 'button'];
|
|
|
7774
8463
|
const transformSelector = (selector) => targetSelectors.map((tag) => selector.replace(/\[role]/g, tag)).join();
|
|
7775
8464
|
const getComponentCss$c = (size, weight, theme) => {
|
|
7776
8465
|
const { primaryColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
8466
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
7777
8467
|
const barJssStyle = {
|
|
7778
8468
|
position: 'absolute',
|
|
7779
8469
|
height: '2px',
|
|
7780
8470
|
left: 0,
|
|
7781
|
-
|
|
8471
|
+
...(isHighContrastMode
|
|
8472
|
+
? {
|
|
8473
|
+
background: getHighContrastColors().canvasTextColor,
|
|
8474
|
+
}
|
|
8475
|
+
: {
|
|
8476
|
+
background: primaryColor,
|
|
8477
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8478
|
+
background: primaryColorDark,
|
|
8479
|
+
}),
|
|
8480
|
+
}),
|
|
7782
8481
|
};
|
|
7783
8482
|
return getCss({
|
|
7784
8483
|
'@global': {
|
|
@@ -7786,6 +8485,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7786
8485
|
display: 'block',
|
|
7787
8486
|
...addImportantToEachRule({
|
|
7788
8487
|
position: 'relative',
|
|
8488
|
+
...colorSchemeStyles,
|
|
7789
8489
|
...hostHiddenStyles,
|
|
7790
8490
|
}),
|
|
7791
8491
|
},
|
|
@@ -7816,6 +8516,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7816
8516
|
cursor: 'pointer',
|
|
7817
8517
|
borderRadius: borderRadiusSmall,
|
|
7818
8518
|
zIndex: 0,
|
|
8519
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8520
|
+
color: primaryColorDark,
|
|
8521
|
+
}),
|
|
7819
8522
|
...hoverMediaQuery({
|
|
7820
8523
|
'&::before': {
|
|
7821
8524
|
content: '""',
|
|
@@ -7831,6 +8534,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7831
8534
|
[transformSelector('::slotted([role]:hover)::before')]: {
|
|
7832
8535
|
...frostedGlassStyle,
|
|
7833
8536
|
background: hoverColor,
|
|
8537
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8538
|
+
background: hoverColorDark,
|
|
8539
|
+
}),
|
|
7834
8540
|
},
|
|
7835
8541
|
}),
|
|
7836
8542
|
// basic invisible bar, that will be delayed via transition: visibility
|
|
@@ -7848,6 +8554,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7848
8554
|
// TODO: combine link-social-styles with link-button-styles and tabs-bar-styles
|
|
7849
8555
|
[transformSelector('::slotted([role]:focus:focus-visible)::before')]: {
|
|
7850
8556
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
8557
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8558
|
+
borderColor: focusColorDark,
|
|
8559
|
+
}),
|
|
7851
8560
|
},
|
|
7852
8561
|
[transformSelector('::slotted([role]:not(:last-child))')]: {
|
|
7853
8562
|
marginRight: spacingStaticMedium,
|
|
@@ -7885,20 +8594,27 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7885
8594
|
|
|
7886
8595
|
const getComponentCss$b = (theme) => {
|
|
7887
8596
|
const { primaryColor, focusColor } = getThemedColors(theme);
|
|
8597
|
+
const { primaryColor: primaryColorDark, focusColor: focusColorDark } = getThemedColors('dark');
|
|
7888
8598
|
return getCss({
|
|
7889
8599
|
'@global': {
|
|
7890
8600
|
':host': addImportantToEachRule({
|
|
7891
8601
|
display: 'block',
|
|
7892
8602
|
position: 'relative',
|
|
7893
8603
|
color: primaryColor,
|
|
7894
|
-
...hostHiddenStyles,
|
|
7895
8604
|
outline: 0,
|
|
8605
|
+
...hostHiddenStyles,
|
|
8606
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8607
|
+
color: primaryColorDark,
|
|
8608
|
+
}),
|
|
7896
8609
|
'&(:focus:focus-visible)::before': {
|
|
7897
8610
|
content: '""',
|
|
7898
8611
|
position: 'absolute',
|
|
7899
8612
|
...getInsetJssStyle(-4),
|
|
7900
8613
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
7901
8614
|
borderRadius: borderRadiusSmall,
|
|
8615
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8616
|
+
borderColor: focusColorDark,
|
|
8617
|
+
}),
|
|
7902
8618
|
},
|
|
7903
8619
|
}),
|
|
7904
8620
|
},
|
|
@@ -7910,7 +8626,10 @@ const getComponentCss$a = () => {
|
|
|
7910
8626
|
'@global': {
|
|
7911
8627
|
':host': {
|
|
7912
8628
|
display: 'block',
|
|
7913
|
-
...addImportantToEachRule(
|
|
8629
|
+
...addImportantToEachRule({
|
|
8630
|
+
...colorSchemeStyles,
|
|
8631
|
+
...hostHiddenStyles,
|
|
8632
|
+
}),
|
|
7914
8633
|
},
|
|
7915
8634
|
},
|
|
7916
8635
|
root: {
|
|
@@ -7948,14 +8667,18 @@ const getThemedBackgroundColor = (tagColor, themedColors) => {
|
|
|
7948
8667
|
|
|
7949
8668
|
const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
7950
8669
|
const themedColors = getThemedColors(theme);
|
|
8670
|
+
const themedColorsDark = getThemedColors('dark');
|
|
7951
8671
|
const { primaryColor, hoverColor, contrastHighColor } = themedColors;
|
|
8672
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastHighColor: contrastHighColorDark, } = themedColorsDark;
|
|
7952
8673
|
const backgroundColor = getThemedBackgroundColor(color, themedColors);
|
|
8674
|
+
const backgroundColorDark = getThemedBackgroundColor(color, themedColorsDark);
|
|
7953
8675
|
return getCss({
|
|
7954
8676
|
'@global': {
|
|
7955
8677
|
':host': addImportantToEachRule({
|
|
7956
8678
|
display: 'inline-block',
|
|
7957
8679
|
verticalAlign: 'top',
|
|
7958
8680
|
outline: 0,
|
|
8681
|
+
...colorSchemeStyles,
|
|
7959
8682
|
...hostHiddenStyles,
|
|
7960
8683
|
}),
|
|
7961
8684
|
button: {
|
|
@@ -7970,6 +8693,10 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
7970
8693
|
cursor: 'pointer',
|
|
7971
8694
|
background: backgroundColor,
|
|
7972
8695
|
color: primaryColor,
|
|
8696
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8697
|
+
background: backgroundColorDark,
|
|
8698
|
+
color: primaryColorDark,
|
|
8699
|
+
}),
|
|
7973
8700
|
textAlign: 'left',
|
|
7974
8701
|
...textSmallStyle,
|
|
7975
8702
|
outline: isHighContrastMode ? '1px solid transparent' : 0,
|
|
@@ -7977,6 +8704,9 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
7977
8704
|
...hoverMediaQuery({
|
|
7978
8705
|
'&:hover > .icon': {
|
|
7979
8706
|
backgroundColor: hoverColor,
|
|
8707
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8708
|
+
backgroundColor: hoverColorDark,
|
|
8709
|
+
}),
|
|
7980
8710
|
},
|
|
7981
8711
|
}),
|
|
7982
8712
|
},
|
|
@@ -7986,6 +8716,9 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
7986
8716
|
display: 'block',
|
|
7987
8717
|
marginBottom: '-4px',
|
|
7988
8718
|
color: contrastHighColor,
|
|
8719
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8720
|
+
color: contrastHighColorDark,
|
|
8721
|
+
}),
|
|
7989
8722
|
fontSize: fontSizeTextXSmall,
|
|
7990
8723
|
},
|
|
7991
8724
|
}),
|
|
@@ -8025,14 +8758,19 @@ const getColors = (themedColors, tagColor, theme) => {
|
|
|
8025
8758
|
};
|
|
8026
8759
|
const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
8027
8760
|
const themedColors = getThemedColors(theme);
|
|
8761
|
+
const themedColorsDark = getThemedColors('dark');
|
|
8028
8762
|
const { primaryColor, backgroundColor, backgroundHoverColor } = getColors(themedColors, tagColor, theme);
|
|
8763
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, backgroundHoverColor: backgroundHoverColorDark, } = getColors(themedColorsDark, tagColor, 'dark');
|
|
8029
8764
|
return getCss({
|
|
8030
8765
|
'@global': {
|
|
8031
8766
|
':host': {
|
|
8032
8767
|
display: 'inline-flex',
|
|
8033
8768
|
verticalAlign: 'top',
|
|
8034
8769
|
whiteSpace: 'nowrap',
|
|
8035
|
-
...addImportantToEachRule(
|
|
8770
|
+
...addImportantToEachRule({
|
|
8771
|
+
...colorSchemeStyles,
|
|
8772
|
+
...hostHiddenStyles,
|
|
8773
|
+
}),
|
|
8036
8774
|
},
|
|
8037
8775
|
span: {
|
|
8038
8776
|
display: 'flex',
|
|
@@ -8043,6 +8781,10 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8043
8781
|
borderRadius: borderRadiusSmall,
|
|
8044
8782
|
background: backgroundColor,
|
|
8045
8783
|
color: primaryColor,
|
|
8784
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8785
|
+
background: backgroundColorDark,
|
|
8786
|
+
color: primaryColorDark,
|
|
8787
|
+
}),
|
|
8046
8788
|
font: textXSmallStyle.font,
|
|
8047
8789
|
...(isHighContrastMode && {
|
|
8048
8790
|
outline: '1px solid transparent',
|
|
@@ -8052,6 +8794,9 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8052
8794
|
transition: getTransition('background-color'),
|
|
8053
8795
|
'&:hover': {
|
|
8054
8796
|
background: backgroundHoverColor,
|
|
8797
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8798
|
+
background: backgroundHoverColorDark,
|
|
8799
|
+
}),
|
|
8055
8800
|
},
|
|
8056
8801
|
})),
|
|
8057
8802
|
},
|
|
@@ -8081,6 +8826,11 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8081
8826
|
icon: {
|
|
8082
8827
|
marginLeft: '-2px',
|
|
8083
8828
|
alignSelf: 'flex-start',
|
|
8829
|
+
...(['neutral-contrast-high', 'primary'].includes(tagColor) && {
|
|
8830
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8831
|
+
filter: 'invert(1)',
|
|
8832
|
+
}),
|
|
8833
|
+
}),
|
|
8084
8834
|
},
|
|
8085
8835
|
});
|
|
8086
8836
|
};
|
|
@@ -8118,6 +8868,7 @@ const getButtonOrIconOffsetHorizontal = (buttonOrIconAmount) => {
|
|
|
8118
8868
|
};
|
|
8119
8869
|
const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter, unitPosition, inputType, showPasswordToggle, isWithinForm, theme) => {
|
|
8120
8870
|
const { contrastMediumColor } = getThemedColors(theme);
|
|
8871
|
+
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
8121
8872
|
const isSearch = isType(inputType, 'search');
|
|
8122
8873
|
const isPassword = isType(inputType, 'password');
|
|
8123
8874
|
const isNumber = isType(inputType, 'number');
|
|
@@ -8136,6 +8887,7 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
8136
8887
|
[cssVariableInputPaddingRight]: isSearchOrPassword || isCalendarOrTimeWithCustomIndicator
|
|
8137
8888
|
? getInputPaddingHorizontal(isSearchWithForm ? 2 : 1)
|
|
8138
8889
|
: spacingStaticMedium,
|
|
8890
|
+
...colorSchemeStyles,
|
|
8139
8891
|
...hostHiddenStyles,
|
|
8140
8892
|
}),
|
|
8141
8893
|
},
|
|
@@ -8183,6 +8935,9 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
8183
8935
|
padding: unitPosition === 'suffix' ? `0 ${spacingStaticMedium} 0 10px` : `0 10px 0 ${spacingStaticMedium}`,
|
|
8184
8936
|
font: textSmallStyle.font,
|
|
8185
8937
|
color: contrastMediumColor,
|
|
8938
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8939
|
+
color: contrastMediumColorDark,
|
|
8940
|
+
}),
|
|
8186
8941
|
},
|
|
8187
8942
|
}),
|
|
8188
8943
|
...getFunctionalComponentRequiredStyles(),
|
|
@@ -8214,18 +8969,22 @@ const getComponentCss$6 = (type, theme) => {
|
|
|
8214
8969
|
display: 'block',
|
|
8215
8970
|
...addImportantToEachRule({
|
|
8216
8971
|
counterReset: counter,
|
|
8972
|
+
...colorSchemeStyles,
|
|
8217
8973
|
...hostHiddenStyles,
|
|
8218
8974
|
}),
|
|
8219
8975
|
},
|
|
8220
8976
|
'ol,ul': {
|
|
8221
8977
|
...textSmallStyle,
|
|
8222
|
-
color: getThemedColors(theme).primaryColor,
|
|
8223
8978
|
margin: 0,
|
|
8224
8979
|
padding: `var(${cssVariablePaddingTop},0) 0 var(${cssVariablePaddingBottom},0) ${isOrderedList
|
|
8225
8980
|
? `var(${cssVariableOrderedPaddingLeft},1.5rem)` // reserves space for ::before (root ordered list)
|
|
8226
8981
|
: `var(${cssVariableUnorderedPaddingLeft},.375rem)` // reserves space for ::marker "•" (root unordered list)
|
|
8227
8982
|
}`,
|
|
8228
|
-
listStyleType: isOrderedList ? 'none' : `var(${cssVariableListStyleType},'•')`,
|
|
8983
|
+
listStyleType: isOrderedList ? 'none' : `var(${cssVariableListStyleType},'•')`,
|
|
8984
|
+
color: getThemedColors(theme).primaryColor,
|
|
8985
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8986
|
+
color: getThemedColors('dark').primaryColor,
|
|
8987
|
+
}),
|
|
8229
8988
|
},
|
|
8230
8989
|
// css selector for text-list-item
|
|
8231
8990
|
'::slotted(*)': addImportantToEachRule({
|
|
@@ -8284,7 +9043,10 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis, theme) => {
|
|
|
8284
9043
|
'@global': {
|
|
8285
9044
|
':host': {
|
|
8286
9045
|
display: 'block',
|
|
8287
|
-
...addImportantToEachRule(
|
|
9046
|
+
...addImportantToEachRule({
|
|
9047
|
+
...colorSchemeStyles,
|
|
9048
|
+
...hostHiddenStyles,
|
|
9049
|
+
}),
|
|
8288
9050
|
},
|
|
8289
9051
|
'::slotted': {
|
|
8290
9052
|
[TEXT_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -8299,10 +9061,12 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis, theme) => {
|
|
|
8299
9061
|
|
|
8300
9062
|
const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
8301
9063
|
const { contrastMediumColor } = getThemedColors(theme);
|
|
9064
|
+
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
8302
9065
|
return getCss({
|
|
8303
9066
|
'@global': {
|
|
8304
9067
|
':host': addImportantToEachRule({
|
|
8305
9068
|
display: 'block',
|
|
9069
|
+
...colorSchemeStyles,
|
|
8306
9070
|
...hostHiddenStyles,
|
|
8307
9071
|
}),
|
|
8308
9072
|
...mergeDeep(addImportantToEachRule(getBaseChildStyles('textarea', state, theme, {
|
|
@@ -8324,6 +9088,9 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
8324
9088
|
zIndex: 1,
|
|
8325
9089
|
font: textSmallStyle.font,
|
|
8326
9090
|
color: contrastMediumColor,
|
|
9091
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9092
|
+
color: contrastMediumColorDark,
|
|
9093
|
+
}),
|
|
8327
9094
|
},
|
|
8328
9095
|
}),
|
|
8329
9096
|
...getFunctionalComponentRequiredStyles(),
|
|
@@ -8379,6 +9146,7 @@ const getComponentCss$1 = () => {
|
|
|
8379
9146
|
[cssVariablePositionBottomInternal]: `var(${cssVariablePositionBottom}, 64px)`,
|
|
8380
9147
|
bottom: `var(${cssVariablePositionBottomInternal})`,
|
|
8381
9148
|
},
|
|
9149
|
+
...colorSchemeStyles,
|
|
8382
9150
|
...hostHiddenStyles,
|
|
8383
9151
|
}),
|
|
8384
9152
|
'@keyframes in': getKeyframesMobile('in', cssVariablePositionBottomInternal),
|
|
@@ -8412,6 +9180,7 @@ const getComponentCss = (size, theme) => {
|
|
|
8412
9180
|
height: 'round(down, clamp(0.63rem, 0.42vw + 0.5rem, 1rem), 1px)',
|
|
8413
9181
|
},
|
|
8414
9182
|
}),
|
|
9183
|
+
...colorSchemeStyles,
|
|
8415
9184
|
...hostHiddenStyles,
|
|
8416
9185
|
}),
|
|
8417
9186
|
},
|
|
@@ -8425,11 +9194,18 @@ const getComponentCss = (size, theme) => {
|
|
|
8425
9194
|
textDecoration: 'none',
|
|
8426
9195
|
...focusPseudoJssStyle,
|
|
8427
9196
|
},
|
|
8428
|
-
svg:
|
|
8429
|
-
|
|
8430
|
-
|
|
9197
|
+
svg: isHighContrastMode
|
|
9198
|
+
? {
|
|
9199
|
+
fill: getHighContrastColors().canvasTextColor,
|
|
9200
|
+
}
|
|
9201
|
+
: {
|
|
9202
|
+
fill: getThemedColors(theme).primaryColor,
|
|
9203
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9204
|
+
fill: getThemedColors('dark').primaryColor,
|
|
9205
|
+
}),
|
|
9206
|
+
},
|
|
8431
9207
|
},
|
|
8432
9208
|
});
|
|
8433
9209
|
};
|
|
8434
9210
|
|
|
8435
|
-
export { getComponentCss
|
|
9211
|
+
export { getComponentCss$10 as getAccordionCss, getComponentCss$$ as getBannerCss, getComponentCss$X as getButtonCss, getComponentCss$_ as getButtonGroupCss, getComponentCss$Z as getButtonPureCss, getComponentCss$Y as getButtonTileCss, getComponentCss$W as getCarouselCss, getComponentCss$V as getCheckboxWrapperCss, getComponentCss$U as getContentWrapperCss, getComponentCss$T as getCrestCss, getComponentCss$S as getDisplayCss, getComponentCss$R as getDividerCss, getComponentCss$P as getFieldsetCss, getComponentCss$Q as getFieldsetWrapperCss, getComponentCss$N as getFlexCss, getComponentCss$O as getFlexItemCss, getComponentCss$M as getFlyoutCss, getFunctionalComponentRequiredStyles, getFunctionalComponentStateMessageStyles, getComponentCss$K as getGridCss, getComponentCss$L as getGridItemCss, getComponentCss$J as getHeadingCss, getComponentCss$I as getHeadlineCss, getComponentCss$H as getIconCss, getComponentCss$G as getInlineNotificationCss, getComponentCss$E as getLinkCss, getComponentCss$F as getLinkPureCss, getComponentCss$E as getLinkSocialCss, getComponentCss$C as getLinkTileCss, getComponentCss$D as getLinkTileModelSignatureCss, getComponentCss$B as getMarqueCss, getComponentCss$A as getModalCss, getComponentCss$z as getModelSignatureCss, getComponentCss$x as getMultiSelectCss, getComponentCss$y as getMultiSelectOptionCss, getComponentCss$w as getPaginationCss, getComponentCss$v as getPinCodeCss, getComponentCss$u as getPopoverCss, getComponentCss$t as getRadioButtonWrapperCss, getComponentCss$s as getScrollerCss, getComponentCss$q as getSegmentedControlCss, getComponentCss$r as getSegmentedControlItemCss, getComponentCss$o as getSelectWrapperCss, getComponentCss$p as getSelectWrapperDropdownCss, getComponentCss$n as getSpinnerCss, getComponentCss$l as getStepperHorizontalCss, getComponentCss$m as getStepperHorizontalItemCss, getComponentCss$k as getSwitchCss, getComponentCss$j as getTableBodyCss, getComponentCss$i as getTableCellCss, getComponentCss$h as getTableCss, getComponentCss$g as getTableHeadCellCss, getComponentCss$e as getTableHeadCss, getComponentCss$f as getTableHeadRowCss, getComponentCss$d as getTableRowCss, getComponentCss$c as getTabsBarCss, getComponentCss$a as getTabsCss, getComponentCss$b as getTabsItemCss, getComponentCss$8 as getTagCss, getComponentCss$9 as getTagDismissibleCss, getComponentCss$4 as getTextCss, getComponentCss$7 as getTextFieldWrapperCss, getComponentCss$6 as getTextListCss, getComponentCss$5 as getTextListItemCss, getComponentCss$3 as getTextareaWrapperCss, getComponentCss$1 as getToastCss, getComponentCss as getWordmarkCss };
|