@porsche-design-system/components-react 3.7.0-rc.0 → 3.7.0-rc.1
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 +27 -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 +1020 -248
- 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 +986 -215
- 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
|
@@ -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,
|
|
@@ -5439,14 +5628,16 @@ const flyoutTransitionTimingFunction = 'cubic-bezier(0.77, 0, 0.175, 1)';
|
|
|
5439
5628
|
const cssVariableMaxWidth = '--p-flyout-max-width';
|
|
5440
5629
|
const maxWidthDefault = '1180px';
|
|
5441
5630
|
const minWidthDefault = '320px';
|
|
5442
|
-
const getComponentCss$
|
|
5631
|
+
const getComponentCss$M = (isOpen, position, hasHeader, hasFooter, hasSubFooter, theme) => {
|
|
5443
5632
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
5633
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
5444
5634
|
const { contrastHighColor: darkThemeContrastHighColor } = getThemedColors('dark');
|
|
5445
5635
|
const isPositionLeft = position === 'left';
|
|
5446
5636
|
const contentPadding = `${spacingStaticMedium} ${spacingFluidLarge} ${spacingStaticMedium} ${spacingFluidLarge}`;
|
|
5447
5637
|
const isDark = isThemeDark(theme);
|
|
5448
5638
|
const shadowColor = isDark ? scrollShadowColorDark : scrollShadowColor;
|
|
5449
|
-
const
|
|
5639
|
+
const transparentColorDark = 'rgba(14, 14, 18, 0)';
|
|
5640
|
+
const transparentColor = isDark ? transparentColorDark : 'rgba(255, 255, 255, 0)';
|
|
5450
5641
|
return getCss({
|
|
5451
5642
|
'@global': addImportantToEachRule({
|
|
5452
5643
|
':host': {
|
|
@@ -5463,6 +5654,7 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5463
5654
|
}),
|
|
5464
5655
|
...getInsetJssStyle(),
|
|
5465
5656
|
...getFrostedGlassBackgroundJssStyles(isOpen, flyoutTransitionDuration),
|
|
5657
|
+
...colorSchemeStyles,
|
|
5466
5658
|
...hostHiddenStyles,
|
|
5467
5659
|
},
|
|
5468
5660
|
}),
|
|
@@ -5473,12 +5665,18 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5473
5665
|
}),
|
|
5474
5666
|
justifyContent: 'flex-end',
|
|
5475
5667
|
background: backgroundColor,
|
|
5668
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5669
|
+
background: backgroundColorDark,
|
|
5670
|
+
}),
|
|
5476
5671
|
position: 'sticky',
|
|
5477
5672
|
top: 0,
|
|
5478
5673
|
zIndex: 1,
|
|
5479
5674
|
},
|
|
5480
5675
|
[headerShadowClass]: {
|
|
5481
5676
|
boxShadow: `${isDark ? scrollShadowColorDark : scrollShadowColor} 0px 5px 10px`,
|
|
5677
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5678
|
+
boxShadow: `${scrollShadowColorDark} 0px 5px 10px`,
|
|
5679
|
+
}),
|
|
5482
5680
|
},
|
|
5483
5681
|
...(hasHeader && {
|
|
5484
5682
|
'header-content': {
|
|
@@ -5492,6 +5690,10 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5492
5690
|
border: `2px solid ${backgroundColor}`,
|
|
5493
5691
|
borderRadius: '4px',
|
|
5494
5692
|
background: backgroundColor,
|
|
5693
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5694
|
+
borderColor: backgroundColorDark,
|
|
5695
|
+
background: backgroundColorDark,
|
|
5696
|
+
}),
|
|
5495
5697
|
...hoverMediaQuery({
|
|
5496
5698
|
'&:hover': {
|
|
5497
5699
|
background: darkThemeContrastHighColor,
|
|
@@ -5518,6 +5720,10 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5518
5720
|
transform: isOpen ? 'initial' : `translate3d(${isPositionLeft ? '-100%' : '100%'}, 0, 0)`,
|
|
5519
5721
|
transition: `opacity ${flyoutTransitionDuration} ${flyoutTransitionTimingFunction} ${isOpen ? '0s' : flyoutTransitionDuration}, transform ${flyoutTransitionDuration} ${flyoutTransitionTimingFunction}`,
|
|
5520
5722
|
boxShadow: `${isPositionLeft ? '3px' : '-3px'} 0px 30px rgba(0, 0, 0, 0.25)`,
|
|
5723
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5724
|
+
color: primaryColorDark,
|
|
5725
|
+
background: backgroundColorDark,
|
|
5726
|
+
}),
|
|
5521
5727
|
},
|
|
5522
5728
|
content: {
|
|
5523
5729
|
padding: contentPadding,
|
|
@@ -5533,6 +5739,9 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5533
5739
|
backgroundSize: '100% 20px, 100% 20px, 100% 10px, 100% 10px',
|
|
5534
5740
|
backgroundAttachment: 'local, local, scroll, scroll',
|
|
5535
5741
|
overscrollBehaviorY: 'none',
|
|
5742
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5743
|
+
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})`,
|
|
5744
|
+
}),
|
|
5536
5745
|
}),
|
|
5537
5746
|
},
|
|
5538
5747
|
...(hasFooter && {
|
|
@@ -5542,9 +5751,15 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5542
5751
|
position: 'sticky',
|
|
5543
5752
|
zIndex: 1,
|
|
5544
5753
|
bottom: 0,
|
|
5754
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5755
|
+
background: backgroundColorDark,
|
|
5756
|
+
}),
|
|
5545
5757
|
},
|
|
5546
5758
|
[footerShadowClass$1]: {
|
|
5547
5759
|
boxShadow: `${isDark ? scrollShadowColorDark : scrollShadowColor} 0px -5px 10px`,
|
|
5760
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5761
|
+
boxShadow: `${scrollShadowColorDark} 0px -5px 10px`,
|
|
5762
|
+
}),
|
|
5548
5763
|
},
|
|
5549
5764
|
}),
|
|
5550
5765
|
...(hasSubFooter && {
|
|
@@ -5559,7 +5774,7 @@ const gutter$1 = `calc(${gridGap} / 2)`;
|
|
|
5559
5774
|
const gridItemWidths = [
|
|
5560
5775
|
0, 8.333333, 16.666667, 25, 33.333333, 41.666667, 50, 58.333333, 66.666667, 75, 83.333333, 91.666667, 100,
|
|
5561
5776
|
];
|
|
5562
|
-
const getComponentCss$
|
|
5777
|
+
const getComponentCss$L = (size, offset) => {
|
|
5563
5778
|
return getCss({
|
|
5564
5779
|
'@global': {
|
|
5565
5780
|
':host': addImportantToEachRule({
|
|
@@ -5579,7 +5794,7 @@ const getComponentCss$K = (size, offset) => {
|
|
|
5579
5794
|
};
|
|
5580
5795
|
|
|
5581
5796
|
const gutter = `calc(${gridGap} / -2)`;
|
|
5582
|
-
const getComponentCss$
|
|
5797
|
+
const getComponentCss$K = (direction, wrap) => {
|
|
5583
5798
|
return getCss({
|
|
5584
5799
|
'@global': {
|
|
5585
5800
|
':host': addImportantToEachRule({
|
|
@@ -5588,6 +5803,7 @@ const getComponentCss$J = (direction, wrap) => {
|
|
|
5588
5803
|
width: 'auto',
|
|
5589
5804
|
marginLeft: gutter,
|
|
5590
5805
|
marginRight: gutter,
|
|
5806
|
+
...colorSchemeStyles,
|
|
5591
5807
|
...hostHiddenStyles,
|
|
5592
5808
|
...mergeDeep(buildResponsiveStyles(direction, (flexDirection) => ({ flexDirection })), buildResponsiveStyles(wrap, (flexWrap) => ({ flexWrap }))),
|
|
5593
5809
|
}),
|
|
@@ -5602,12 +5818,15 @@ const sizeMap$3 = {
|
|
|
5602
5818
|
'x-large': fontSizeHeadingXLarge,
|
|
5603
5819
|
'xx-large': fontSizeHeadingXXLarge,
|
|
5604
5820
|
};
|
|
5605
|
-
const getComponentCss$
|
|
5821
|
+
const getComponentCss$J = (size, align, color, ellipsis, theme) => {
|
|
5606
5822
|
return getCss({
|
|
5607
5823
|
'@global': {
|
|
5608
5824
|
':host': {
|
|
5609
5825
|
display: 'block',
|
|
5610
|
-
...addImportantToEachRule(
|
|
5826
|
+
...addImportantToEachRule({
|
|
5827
|
+
...colorSchemeStyles,
|
|
5828
|
+
...hostHiddenStyles,
|
|
5829
|
+
}),
|
|
5611
5830
|
},
|
|
5612
5831
|
'::slotted': {
|
|
5613
5832
|
[HEADING_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -5661,12 +5880,15 @@ const getTextSizeJssStyle = (textSize) => {
|
|
|
5661
5880
|
fontSize: textSize === 'inherit' ? textSize : textSizeMap[textSize],
|
|
5662
5881
|
};
|
|
5663
5882
|
};
|
|
5664
|
-
const getComponentCss$
|
|
5883
|
+
const getComponentCss$I = (variant, align, color, ellipsis, theme) => {
|
|
5665
5884
|
return getCss({
|
|
5666
5885
|
'@global': {
|
|
5667
5886
|
':host': {
|
|
5668
5887
|
display: 'block',
|
|
5669
|
-
...addImportantToEachRule(
|
|
5888
|
+
...addImportantToEachRule({
|
|
5889
|
+
...colorSchemeStyles,
|
|
5890
|
+
...hostHiddenStyles,
|
|
5891
|
+
}),
|
|
5670
5892
|
},
|
|
5671
5893
|
'::slotted': {
|
|
5672
5894
|
[HEADLINE_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -5710,29 +5932,32 @@ const sizeMap$2 = {
|
|
|
5710
5932
|
large: fontSizeTextLarge,
|
|
5711
5933
|
'x-large': fontSizeTextXLarge,
|
|
5712
5934
|
};
|
|
5713
|
-
const
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5935
|
+
const filterLight = {
|
|
5936
|
+
primary: filterLightPrimary,
|
|
5937
|
+
'state-disabled': filterLightDisabled,
|
|
5938
|
+
'contrast-low': filterLightContrastLow,
|
|
5939
|
+
'contrast-medium': filterLightContrastMedium,
|
|
5940
|
+
'contrast-high': filterLightContrastHigh,
|
|
5941
|
+
'notification-success': filterLightNotificationSuccess,
|
|
5942
|
+
'notification-warning': filterLightNotificationWarning,
|
|
5943
|
+
'notification-error': filterLightNotificationError,
|
|
5944
|
+
'notification-info': filterLightNotificationInfo,
|
|
5945
|
+
};
|
|
5946
|
+
const filterDark = {
|
|
5947
|
+
primary: filterDarkPrimary,
|
|
5948
|
+
'state-disabled': filterDarkDisabled,
|
|
5949
|
+
'contrast-low': filterDarkContrastLow,
|
|
5950
|
+
'contrast-medium': filterDarkContrastMedium,
|
|
5951
|
+
'contrast-high': filterDarkContrastHigh,
|
|
5952
|
+
'notification-success': filterDarkNotificationSuccess,
|
|
5953
|
+
'notification-warning': filterDarkNotificationWarning,
|
|
5954
|
+
'notification-error': filterDarkNotificationError,
|
|
5955
|
+
'notification-info': filterDarkNotificationInfo,
|
|
5956
|
+
};
|
|
5957
|
+
const filterMap = {
|
|
5958
|
+
auto: filterLight,
|
|
5959
|
+
light: filterLight,
|
|
5960
|
+
dark: filterDark,
|
|
5736
5961
|
};
|
|
5737
5962
|
const forceRerenderAnimationStyle = {
|
|
5738
5963
|
'0%': {
|
|
@@ -5744,7 +5969,7 @@ const forceRerenderAnimationStyle = {
|
|
|
5744
5969
|
};
|
|
5745
5970
|
const keyFramesLight = 'rerender-light';
|
|
5746
5971
|
const keyFramesDark = 'rerender-dark';
|
|
5747
|
-
const getComponentCss$
|
|
5972
|
+
const getComponentCss$H = (color, size, theme) => {
|
|
5748
5973
|
const isColorInherit = color === 'inherit';
|
|
5749
5974
|
const isSizeInherit = size === 'inherit';
|
|
5750
5975
|
const isDark = isThemeDark(theme);
|
|
@@ -5753,7 +5978,10 @@ const getComponentCss$G = (color, size, theme) => {
|
|
|
5753
5978
|
':host': {
|
|
5754
5979
|
display: 'inline-block',
|
|
5755
5980
|
verticalAlign: 'top',
|
|
5756
|
-
...addImportantToEachRule(
|
|
5981
|
+
...addImportantToEachRule({
|
|
5982
|
+
...colorSchemeStyles,
|
|
5983
|
+
...hostHiddenStyles,
|
|
5984
|
+
}),
|
|
5757
5985
|
},
|
|
5758
5986
|
img: {
|
|
5759
5987
|
display: 'block',
|
|
@@ -5761,12 +5989,15 @@ const getComponentCss$G = (color, size, theme) => {
|
|
|
5761
5989
|
padding: 0,
|
|
5762
5990
|
pointerEvents: 'none',
|
|
5763
5991
|
...(!isColorInherit && {
|
|
5764
|
-
filter:
|
|
5992
|
+
filter: filterMap[theme][color],
|
|
5993
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5994
|
+
filter: filterMap.dark[color],
|
|
5995
|
+
}),
|
|
5765
5996
|
...(isHighContrastMode &&
|
|
5766
5997
|
getSchemedHighContrastMediaQuery({
|
|
5767
|
-
filter:
|
|
5998
|
+
filter: filterMap.light[color],
|
|
5768
5999
|
}, {
|
|
5769
|
-
filter:
|
|
6000
|
+
filter: filterMap.dark[color],
|
|
5770
6001
|
})),
|
|
5771
6002
|
WebkitAnimation: `${isDark ? `${keyFramesDark}-${color}` : `${keyFramesLight}-${color}`} 1ms`, // needed to enforce repaint in Safari if theme is switched programmatically.
|
|
5772
6003
|
}),
|
|
@@ -5810,6 +6041,9 @@ const getNotificationRootJssStyle = (state, hasAction, hasClose, theme) => {
|
|
|
5810
6041
|
placeItems: 'start',
|
|
5811
6042
|
padding: spacingStaticMedium,
|
|
5812
6043
|
background: getBackgroundColor(state, theme),
|
|
6044
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6045
|
+
background: getBackgroundColor(state, 'dark'),
|
|
6046
|
+
}),
|
|
5813
6047
|
borderRadius: borderRadiusSmall,
|
|
5814
6048
|
...(isHighContrastMode && {
|
|
5815
6049
|
outline: '1px solid transparent',
|
|
@@ -5835,11 +6069,12 @@ const getNotificationContentJssStyle = () => ({
|
|
|
5835
6069
|
});
|
|
5836
6070
|
|
|
5837
6071
|
const mediaQueryMaxS = getMediaQueryMax('s');
|
|
5838
|
-
const getComponentCss$
|
|
6072
|
+
const getComponentCss$G = (state, hasAction, hasClose, theme) => {
|
|
5839
6073
|
return getCss({
|
|
5840
6074
|
'@global': {
|
|
5841
6075
|
':host': addImportantToEachRule({
|
|
5842
6076
|
...getNotificationRootJssStyle(state, hasAction, hasClose, theme),
|
|
6077
|
+
...colorSchemeStyles,
|
|
5843
6078
|
...hostHiddenStyles,
|
|
5844
6079
|
}),
|
|
5845
6080
|
h5: headingSmallStyle,
|
|
@@ -5847,6 +6082,9 @@ const getComponentCss$F = (state, hasAction, hasClose, theme) => {
|
|
|
5847
6082
|
'h5,p': {
|
|
5848
6083
|
margin: 0,
|
|
5849
6084
|
color: getThemedColors(theme).primaryColor,
|
|
6085
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6086
|
+
color: getThemedColors('dark').primaryColor,
|
|
6087
|
+
}),
|
|
5850
6088
|
},
|
|
5851
6089
|
},
|
|
5852
6090
|
icon: getNotificationIconJssStyle(),
|
|
@@ -5861,8 +6099,9 @@ const getComponentCss$F = (state, hasAction, hasClose, theme) => {
|
|
|
5861
6099
|
});
|
|
5862
6100
|
};
|
|
5863
6101
|
|
|
5864
|
-
const getComponentCss$
|
|
6102
|
+
const getComponentCss$F = (icon, iconSource, active, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor, theme) => {
|
|
5865
6103
|
const { focusColor } = getThemedColors(theme);
|
|
6104
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
5866
6105
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme), {
|
|
5867
6106
|
root: {
|
|
5868
6107
|
textDecoration: underline ? 'underline' : 'none',
|
|
@@ -5892,6 +6131,9 @@ const getComponentCss$E = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
5892
6131
|
},
|
|
5893
6132
|
'&(a:focus)::before': {
|
|
5894
6133
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6134
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6135
|
+
borderColor: focusColorDark,
|
|
6136
|
+
}),
|
|
5895
6137
|
},
|
|
5896
6138
|
'&(a:focus:not(:focus-visible))::before': {
|
|
5897
6139
|
border: 0,
|
|
@@ -5901,10 +6143,19 @@ const getComponentCss$E = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
5901
6143
|
}));
|
|
5902
6144
|
};
|
|
5903
6145
|
|
|
5904
|
-
const getComponentCss$
|
|
6146
|
+
const getComponentCss$E = (icon, iconSource, variant, hideLabel, hasSlottedAnchor, theme) => {
|
|
5905
6147
|
const { focusColor } = getThemedColors(theme);
|
|
6148
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
5906
6149
|
const { linkColor } = getHighContrastColors();
|
|
5907
|
-
|
|
6150
|
+
const isPrimary = variant === 'primary';
|
|
6151
|
+
return getCss(mergeDeep(getLinkButtonStyles(icon, iconSource, variant, hideLabel, false, hasSlottedAnchor, theme), {
|
|
6152
|
+
icon: {
|
|
6153
|
+
...(isPrimary &&
|
|
6154
|
+
!isHighContrastMode && {
|
|
6155
|
+
filter: 'invert(1)',
|
|
6156
|
+
}),
|
|
6157
|
+
},
|
|
6158
|
+
}, hasSlottedAnchor && {
|
|
5908
6159
|
...(isHighContrastMode && {
|
|
5909
6160
|
root: {
|
|
5910
6161
|
borderColor: linkColor,
|
|
@@ -5933,6 +6184,9 @@ const getComponentCss$D = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
5933
6184
|
},
|
|
5934
6185
|
'&(a:focus)::before': {
|
|
5935
6186
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6187
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6188
|
+
borderColor: focusColorDark,
|
|
6189
|
+
}),
|
|
5936
6190
|
},
|
|
5937
6191
|
'&(a:focus:not(:focus-visible))::before': {
|
|
5938
6192
|
border: 0,
|
|
@@ -5946,7 +6200,7 @@ const getComponentCss$D = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
5946
6200
|
// because it is created via Object.keys(MODEL_SIGNATURES_MANIFEST) would bundle the entire manifest into both chunks
|
|
5947
6201
|
const LINK_TILE_MODEL_SIGNATURE_HEADING_TAGS = ['h2', 'h3', 'h4', 'h5', 'h6'];
|
|
5948
6202
|
|
|
5949
|
-
const getComponentCss$
|
|
6203
|
+
const getComponentCss$D = (aspectRatio, weight, direction, hasDescription) => {
|
|
5950
6204
|
const tileBaseStyles = getTileBaseStyles(aspectRatio);
|
|
5951
6205
|
return getCss({
|
|
5952
6206
|
...tileBaseStyles,
|
|
@@ -5971,12 +6225,14 @@ const getComponentCss$C = (aspectRatio, weight, direction, hasDescription) => {
|
|
|
5971
6225
|
heading: {
|
|
5972
6226
|
margin: 0,
|
|
5973
6227
|
...textLargeStyle,
|
|
6228
|
+
hyphens: 'inherit',
|
|
5974
6229
|
...buildResponsiveStyles(weight, (w) => ({ fontWeight: getFontWeight(w) })),
|
|
5975
6230
|
},
|
|
5976
6231
|
...(hasDescription && {
|
|
5977
6232
|
description: {
|
|
5978
6233
|
margin: '-12px 0 0 ',
|
|
5979
6234
|
...textSmallStyle,
|
|
6235
|
+
hyphens: 'inherit',
|
|
5980
6236
|
},
|
|
5981
6237
|
}),
|
|
5982
6238
|
'link-group': {
|
|
@@ -5993,7 +6249,7 @@ const getComponentCss$C = (aspectRatio, weight, direction, hasDescription) => {
|
|
|
5993
6249
|
});
|
|
5994
6250
|
};
|
|
5995
6251
|
|
|
5996
|
-
const getComponentCss$
|
|
6252
|
+
const getComponentCss$C = (...args) => {
|
|
5997
6253
|
return getCss({
|
|
5998
6254
|
...getButtonLinkTileStyles(...args),
|
|
5999
6255
|
'link-overlay': {
|
|
@@ -6014,7 +6270,7 @@ const baseSizes = {
|
|
|
6014
6270
|
height: '72px',
|
|
6015
6271
|
},
|
|
6016
6272
|
};
|
|
6017
|
-
const getComponentCss$
|
|
6273
|
+
const getComponentCss$B = (size) => {
|
|
6018
6274
|
return getCss({
|
|
6019
6275
|
'@global': {
|
|
6020
6276
|
':host': {
|
|
@@ -6023,6 +6279,7 @@ const getComponentCss$A = (size) => {
|
|
|
6023
6279
|
verticalAlign: 'top',
|
|
6024
6280
|
...addImportantToEachRule({
|
|
6025
6281
|
outline: 0,
|
|
6282
|
+
...colorSchemeStyles,
|
|
6026
6283
|
...hostHiddenStyles,
|
|
6027
6284
|
}),
|
|
6028
6285
|
},
|
|
@@ -6102,7 +6359,7 @@ const getSlottedJssStyle = (marginValue, hasHeader, hasDismissButton) => {
|
|
|
6102
6359
|
},
|
|
6103
6360
|
};
|
|
6104
6361
|
};
|
|
6105
|
-
const getComponentCss$
|
|
6362
|
+
const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, hasFooter) => {
|
|
6106
6363
|
const isFullscreenForXlAndXxl = isFullscreenForXl(isFullscreen);
|
|
6107
6364
|
const duration = isOpen ? '.6s' : '.2s';
|
|
6108
6365
|
const contentPadding = '32px';
|
|
@@ -6125,6 +6382,7 @@ const getComponentCss$z = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6125
6382
|
visibility: 'hidden',
|
|
6126
6383
|
transition: 'visibility 0s linear .2s',
|
|
6127
6384
|
}),
|
|
6385
|
+
...colorSchemeStyles,
|
|
6128
6386
|
...hostHiddenStyles,
|
|
6129
6387
|
...getFrostedGlassBackgroundJssStyles(isOpen, duration),
|
|
6130
6388
|
}),
|
|
@@ -6223,21 +6481,24 @@ const getComponentCss$z = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6223
6481
|
|
|
6224
6482
|
const modelSignatureHeight = 36;
|
|
6225
6483
|
|
|
6484
|
+
const colorToFilterLight = {
|
|
6485
|
+
primary: filterLightPrimary,
|
|
6486
|
+
'contrast-low': filterLightContrastLow,
|
|
6487
|
+
'contrast-medium': filterLightContrastMedium,
|
|
6488
|
+
'contrast-high': filterLightContrastHigh,
|
|
6489
|
+
};
|
|
6490
|
+
const colorToFilterDark = {
|
|
6491
|
+
primary: filterDarkPrimary,
|
|
6492
|
+
'contrast-low': filterDarkContrastLow,
|
|
6493
|
+
'contrast-medium': filterDarkContrastMedium,
|
|
6494
|
+
'contrast-high': filterDarkContrastHigh,
|
|
6495
|
+
};
|
|
6226
6496
|
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
|
-
},
|
|
6497
|
+
auto: colorToFilterLight,
|
|
6498
|
+
light: colorToFilterLight,
|
|
6499
|
+
dark: colorToFilterDark,
|
|
6239
6500
|
};
|
|
6240
|
-
const getComponentCss$
|
|
6501
|
+
const getComponentCss$z = (size, color, theme) => {
|
|
6241
6502
|
const isSizeInherit = size === 'inherit';
|
|
6242
6503
|
const isColorInherit = color === 'inherit';
|
|
6243
6504
|
return getCss({
|
|
@@ -6254,6 +6515,7 @@ const getComponentCss$y = (size, color, theme) => {
|
|
|
6254
6515
|
// TODO: we need a width map of all signatures to ensure same fluid behavior like implemented fro crest + wordmark
|
|
6255
6516
|
maxHeight: `${modelSignatureHeight}px`,
|
|
6256
6517
|
}),
|
|
6518
|
+
...colorSchemeStyles,
|
|
6257
6519
|
...hostHiddenStyles,
|
|
6258
6520
|
}),
|
|
6259
6521
|
},
|
|
@@ -6264,6 +6526,9 @@ const getComponentCss$y = (size, color, theme) => {
|
|
|
6264
6526
|
pointerEvents: 'none',
|
|
6265
6527
|
...(!isColorInherit && {
|
|
6266
6528
|
filter: colorToFilterMap[theme][color],
|
|
6529
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6530
|
+
filter: colorToFilterMap.dark[color],
|
|
6531
|
+
}),
|
|
6267
6532
|
...(isHighContrastMode &&
|
|
6268
6533
|
getSchemedHighContrastMediaQuery({
|
|
6269
6534
|
filter: colorToFilterMap.light[color],
|
|
@@ -6277,7 +6542,10 @@ const getComponentCss$y = (size, color, theme) => {
|
|
|
6277
6542
|
});
|
|
6278
6543
|
};
|
|
6279
6544
|
|
|
6280
|
-
const getComponentCss$
|
|
6545
|
+
const getComponentCss$y = (theme) => {
|
|
6546
|
+
const { primaryColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor } = getThemedColors(theme);
|
|
6547
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
6548
|
+
const { highlightColor } = getHighContrastColors();
|
|
6281
6549
|
return getCss({
|
|
6282
6550
|
'@global': {
|
|
6283
6551
|
':host': addImportantToEachRule({
|
|
@@ -6285,7 +6553,62 @@ const getComponentCss$x = (theme) => {
|
|
|
6285
6553
|
...hostHiddenStyles,
|
|
6286
6554
|
}),
|
|
6287
6555
|
},
|
|
6288
|
-
|
|
6556
|
+
option: {
|
|
6557
|
+
display: 'flex',
|
|
6558
|
+
justifyContent: 'space-between',
|
|
6559
|
+
gap: '12px',
|
|
6560
|
+
padding: `${spacingStaticSmall} 12px`,
|
|
6561
|
+
flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
|
|
6562
|
+
color: contrastHighColor,
|
|
6563
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6564
|
+
color: contrastHighColorDark,
|
|
6565
|
+
}),
|
|
6566
|
+
cursor: 'pointer',
|
|
6567
|
+
textAlign: 'left',
|
|
6568
|
+
wordBreak: 'break-word',
|
|
6569
|
+
boxSizing: 'border-box',
|
|
6570
|
+
borderRadius: borderRadiusSmall,
|
|
6571
|
+
transition: ['background-color', 'color'].map(getTransition).join(),
|
|
6572
|
+
...getNoResultsOptionJssStyle(),
|
|
6573
|
+
...hoverMediaQuery({
|
|
6574
|
+
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
6575
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
6576
|
+
background: contrastLowColor,
|
|
6577
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6578
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
6579
|
+
background: contrastLowColorDark,
|
|
6580
|
+
}),
|
|
6581
|
+
},
|
|
6582
|
+
}),
|
|
6583
|
+
'&--selected': {
|
|
6584
|
+
background: backgroundSurfaceColor,
|
|
6585
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6586
|
+
background: backgroundSurfaceColorDark,
|
|
6587
|
+
}),
|
|
6588
|
+
},
|
|
6589
|
+
'&--highlighted': {
|
|
6590
|
+
background: contrastLowColor,
|
|
6591
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6592
|
+
background: contrastLowColorDark,
|
|
6593
|
+
}),
|
|
6594
|
+
},
|
|
6595
|
+
'&--highlighted, &--selected': {
|
|
6596
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
6597
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6598
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
6599
|
+
}),
|
|
6600
|
+
},
|
|
6601
|
+
'&--disabled': {
|
|
6602
|
+
cursor: 'not-allowed',
|
|
6603
|
+
color: disabledColor,
|
|
6604
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6605
|
+
color: disabledColorDark,
|
|
6606
|
+
}),
|
|
6607
|
+
},
|
|
6608
|
+
'&--hidden': {
|
|
6609
|
+
display: 'none',
|
|
6610
|
+
},
|
|
6611
|
+
},
|
|
6289
6612
|
checkbox: {
|
|
6290
6613
|
pointerEvents: 'none', // Avoid checkbox label click which updates input within p-checkbox-wrapper
|
|
6291
6614
|
},
|
|
@@ -6308,9 +6631,11 @@ const getPlaceholderJssStyle = (styles) => ({
|
|
|
6308
6631
|
const inputYPadding = '13px';
|
|
6309
6632
|
const selectorNativeSelect = '::slotted([slot=select])';
|
|
6310
6633
|
const INPUT_HEIGHT_CALC = `${fontLineHeight} + 6px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2`;
|
|
6311
|
-
const getComponentCss$
|
|
6634
|
+
const getComponentCss$x = (direction, isOpen, isDisabled, hideLabel, state, isWithinForm, hasLabel, theme) => {
|
|
6312
6635
|
const { primaryColor, contrastMediumColor, contrastHighColor, backgroundColor, disabledColor } = getThemedColors(theme);
|
|
6636
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, backgroundColor: backgroundColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
6313
6637
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
6638
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
6314
6639
|
const isDirectionDown = direction === 'down';
|
|
6315
6640
|
return getCss({
|
|
6316
6641
|
'@global': {
|
|
@@ -6318,6 +6643,7 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6318
6643
|
':host': {
|
|
6319
6644
|
display: 'block',
|
|
6320
6645
|
position: 'relative',
|
|
6646
|
+
...colorSchemeStyles,
|
|
6321
6647
|
...hostHiddenStyles,
|
|
6322
6648
|
},
|
|
6323
6649
|
...(isWithinForm && {
|
|
@@ -6336,19 +6662,25 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6336
6662
|
...getListStyles$1(isOpen, direction, theme),
|
|
6337
6663
|
'input-container': {
|
|
6338
6664
|
display: 'flex',
|
|
6339
|
-
background: backgroundColor,
|
|
6340
6665
|
transition: ['color', 'border-color', 'background-color'].map(getTransition).join(),
|
|
6341
6666
|
cursor: 'text',
|
|
6342
6667
|
...hoverMediaQuery({
|
|
6343
6668
|
'&:hover:not(.disabled)': {
|
|
6344
6669
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
6670
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6671
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
6672
|
+
}),
|
|
6345
6673
|
},
|
|
6346
6674
|
}),
|
|
6347
6675
|
...(!isDisabled && {
|
|
6348
6676
|
'&:focus-within': {
|
|
6349
6677
|
borderColor: primaryColor,
|
|
6678
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6679
|
+
borderColor: primaryColorDark,
|
|
6680
|
+
}),
|
|
6350
6681
|
},
|
|
6351
6682
|
}),
|
|
6683
|
+
background: backgroundColor,
|
|
6352
6684
|
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
6353
6685
|
borderRadius: borderRadiusSmall,
|
|
6354
6686
|
...(isOpen && {
|
|
@@ -6363,6 +6695,18 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6363
6695
|
borderColor: disabledColor,
|
|
6364
6696
|
WebkitTextFillColor: disabledColor,
|
|
6365
6697
|
}),
|
|
6698
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6699
|
+
background: backgroundColorDark,
|
|
6700
|
+
border: `${borderWidthBase} solid ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark}`,
|
|
6701
|
+
...(isOpen && {
|
|
6702
|
+
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColorDark}`),
|
|
6703
|
+
}),
|
|
6704
|
+
...(isDisabled && {
|
|
6705
|
+
color: disabledColorDark,
|
|
6706
|
+
borderColor: disabledColorDark,
|
|
6707
|
+
WebkitTextFillColor: disabledColorDark,
|
|
6708
|
+
}),
|
|
6709
|
+
}),
|
|
6366
6710
|
},
|
|
6367
6711
|
...buildResponsiveStyles(hideLabel, (isHidden) => isHidden
|
|
6368
6712
|
? {
|
|
@@ -6393,6 +6737,9 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6393
6737
|
'no-results': {
|
|
6394
6738
|
padding: `${spacingStaticSmall} 12px`,
|
|
6395
6739
|
color: contrastHighColor,
|
|
6740
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6741
|
+
color: contrastHighColorDark,
|
|
6742
|
+
}),
|
|
6396
6743
|
boxSizing: 'border-box',
|
|
6397
6744
|
...getNoResultsOptionJssStyle(),
|
|
6398
6745
|
},
|
|
@@ -6403,13 +6750,13 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6403
6750
|
};
|
|
6404
6751
|
const getInputStyles = (isDisabled, theme) => {
|
|
6405
6752
|
const { primaryColor, disabledColor } = getThemedColors(theme);
|
|
6753
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark } = getThemedColors('dark');
|
|
6406
6754
|
return {
|
|
6407
6755
|
input: {
|
|
6408
6756
|
flex: 1,
|
|
6409
6757
|
minWidth: 0,
|
|
6410
6758
|
height: `calc(${INPUT_HEIGHT_CALC})`,
|
|
6411
6759
|
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
6412
|
-
color: primaryColor,
|
|
6413
6760
|
padding: `${inputYPadding} ${spacingStaticMedium}`,
|
|
6414
6761
|
boxSizing: 'border-box',
|
|
6415
6762
|
border: 0,
|
|
@@ -6421,14 +6768,23 @@ const getInputStyles = (isDisabled, theme) => {
|
|
|
6421
6768
|
'&:disabled': {
|
|
6422
6769
|
cursor: 'not-allowed',
|
|
6423
6770
|
},
|
|
6424
|
-
|
|
6771
|
+
color: primaryColor,
|
|
6425
6772
|
...(isDisabled && getPlaceholderJssStyle({ color: disabledColor })),
|
|
6773
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6774
|
+
color: primaryColorDark,
|
|
6775
|
+
...(isDisabled && getPlaceholderJssStyle({ color: disabledColorDark })),
|
|
6776
|
+
}),
|
|
6777
|
+
'&:not(:focus)': {
|
|
6778
|
+
...getPlaceholderJssStyle({ color: primaryColor, opacity: 1 }),
|
|
6779
|
+
...prefersColorSchemeDarkMediaQuery(theme, getPlaceholderJssStyle({ color: primaryColorDark, opacity: 1 })),
|
|
6780
|
+
}, // Opacity fixes placeholder being shown lighter in firefox
|
|
6426
6781
|
},
|
|
6427
6782
|
};
|
|
6428
6783
|
};
|
|
6429
6784
|
const getListStyles$1 = (isOpen, direction, theme) => {
|
|
6430
6785
|
const isDirectionDown = direction === 'down';
|
|
6431
6786
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
6787
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
6432
6788
|
return {
|
|
6433
6789
|
listbox: {
|
|
6434
6790
|
position: 'absolute',
|
|
@@ -6437,7 +6793,6 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6437
6793
|
flexDirection: 'column',
|
|
6438
6794
|
gap: spacingStaticSmall,
|
|
6439
6795
|
padding: '6px',
|
|
6440
|
-
background: backgroundColor,
|
|
6441
6796
|
...textSmallStyle,
|
|
6442
6797
|
zIndex: 10,
|
|
6443
6798
|
left: 0,
|
|
@@ -6449,6 +6804,7 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6449
6804
|
maxHeight: `${8.5 * (MULTI_SELECT_OPTION_HEIGHT + 8) + 6 + 2}px`,
|
|
6450
6805
|
overflowY: 'auto',
|
|
6451
6806
|
WebkitOverflowScrolling: 'touch',
|
|
6807
|
+
background: backgroundColor,
|
|
6452
6808
|
border: `2px solid ${primaryColor}`,
|
|
6453
6809
|
[isDirectionDown ? 'borderTop' : 'borderBottom']: 'none',
|
|
6454
6810
|
borderRadius: borderRadiusSmall,
|
|
@@ -6457,7 +6813,11 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6457
6813
|
scrollbarWidth: 'thin',
|
|
6458
6814
|
scrollbarColor: 'auto',
|
|
6459
6815
|
transition: getTransition('border-color'),
|
|
6460
|
-
transform: 'translate3d(0,0,0)',
|
|
6816
|
+
transform: 'translate3d(0,0,0)',
|
|
6817
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6818
|
+
background: backgroundColorDark,
|
|
6819
|
+
borderColor: primaryColorDark,
|
|
6820
|
+
}),
|
|
6461
6821
|
},
|
|
6462
6822
|
};
|
|
6463
6823
|
};
|
|
@@ -6470,13 +6830,17 @@ const disabledCursorStyle = {
|
|
|
6470
6830
|
cursor: 'default',
|
|
6471
6831
|
pointerEvents: 'none', // prevents :hover (has no effect when forced), maybe we can remove it since CSS selectors already cover desired behavior
|
|
6472
6832
|
};
|
|
6473
|
-
const getComponentCss$
|
|
6833
|
+
const getComponentCss$w = (maxNumberOfPageLinks, theme) => {
|
|
6474
6834
|
const { primaryColor, disabledColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
6835
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, hoverColor: hoverColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
6475
6836
|
return getCss({
|
|
6476
6837
|
'@global': {
|
|
6477
6838
|
':host': {
|
|
6478
6839
|
display: 'block',
|
|
6479
|
-
...addImportantToEachRule(
|
|
6840
|
+
...addImportantToEachRule({
|
|
6841
|
+
...colorSchemeStyles,
|
|
6842
|
+
...hostHiddenStyles,
|
|
6843
|
+
}),
|
|
6480
6844
|
},
|
|
6481
6845
|
nav: {
|
|
6482
6846
|
display: 'flex',
|
|
@@ -6522,10 +6886,16 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
6522
6886
|
outline: 0,
|
|
6523
6887
|
borderRadius: borderRadiusSmall,
|
|
6524
6888
|
borderColor: 'transparent',
|
|
6889
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6890
|
+
color: primaryColorDark,
|
|
6891
|
+
}),
|
|
6525
6892
|
...hoverMediaQuery({
|
|
6526
6893
|
'&:not([aria-disabled]):not(.ellipsis):hover': {
|
|
6527
6894
|
...frostedGlassStyle,
|
|
6528
6895
|
background: hoverColor,
|
|
6896
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6897
|
+
background: hoverColorDark,
|
|
6898
|
+
}),
|
|
6529
6899
|
},
|
|
6530
6900
|
}),
|
|
6531
6901
|
'&:not(.ellipsis):focus:focus-visible::before': {
|
|
@@ -6534,16 +6904,26 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
6534
6904
|
...getInsetJssStyle(-4),
|
|
6535
6905
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6536
6906
|
borderRadius: borderRadiusMedium,
|
|
6907
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6908
|
+
borderColor: focusColorDark,
|
|
6909
|
+
}),
|
|
6537
6910
|
},
|
|
6538
6911
|
'&[aria-current]': {
|
|
6539
6912
|
...disabledCursorStyle,
|
|
6540
6913
|
color: primaryColor,
|
|
6541
6914
|
border: `${borderWidthBase} solid ${primaryColor}`,
|
|
6915
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6916
|
+
color: primaryColorDark,
|
|
6917
|
+
borderColor: primaryColorDark,
|
|
6918
|
+
}),
|
|
6542
6919
|
'&:not(.ellipsis):focus::before': getInsetJssStyle(-6),
|
|
6543
6920
|
},
|
|
6544
6921
|
'&[aria-disabled]': {
|
|
6545
6922
|
...disabledCursorStyle,
|
|
6546
6923
|
color: disabledColor,
|
|
6924
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6925
|
+
color: disabledColorDark,
|
|
6926
|
+
}),
|
|
6547
6927
|
},
|
|
6548
6928
|
},
|
|
6549
6929
|
},
|
|
@@ -6556,6 +6936,82 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
6556
6936
|
});
|
|
6557
6937
|
};
|
|
6558
6938
|
|
|
6939
|
+
const removeSlottedSelector = (styles) => Object.fromEntries(Object.entries(styles).map(([key, value]) => {
|
|
6940
|
+
value = typeof value === 'object' ? removeSlottedSelector(value) : value;
|
|
6941
|
+
return [key.replace(/::slotted\(([^,]+)\)/g, '$1'), value];
|
|
6942
|
+
}));
|
|
6943
|
+
const removeStyles = (selector, styles) => Object.fromEntries(Object.entries(styles)
|
|
6944
|
+
.filter(([key]) => key !== selector)
|
|
6945
|
+
.map(([key, value]) => {
|
|
6946
|
+
value = typeof value === 'object' ? removeStyles(selector, value) : value;
|
|
6947
|
+
return [key, value];
|
|
6948
|
+
}));
|
|
6949
|
+
|
|
6950
|
+
const getComponentCss$v = (hideLabel, state, isDisabled, isLoading, isWithinForm, length, theme) => {
|
|
6951
|
+
const inputSize = `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`; // equivalent to calculation of input height within form-styles
|
|
6952
|
+
const labelStyles = removeStyles('@media(hover:hover)', removeSlottedSelector(getLabelStyles('input', isDisabled, hideLabel, state, theme)));
|
|
6953
|
+
const inputStyles = removeStyles('input[readonly]', removeSlottedSelector(getBaseChildStyles('input', state, theme, {
|
|
6954
|
+
textAlign: 'center',
|
|
6955
|
+
width: inputSize,
|
|
6956
|
+
...(length === 6 && {
|
|
6957
|
+
[getMediaQueryMax('xs')]: {
|
|
6958
|
+
width: `calc((276px - (${spacingStaticSmall} * 5)) / 6)`, // calculate the max with of the inputs that fit into grid in viewport base (276px)
|
|
6959
|
+
},
|
|
6960
|
+
}),
|
|
6961
|
+
...(isLoading && {
|
|
6962
|
+
opacity: 0.2,
|
|
6963
|
+
cursor: 'not-allowed',
|
|
6964
|
+
}),
|
|
6965
|
+
})));
|
|
6966
|
+
return getCss({
|
|
6967
|
+
'@global': {
|
|
6968
|
+
':host': addImportantToEachRule({
|
|
6969
|
+
display: 'block',
|
|
6970
|
+
...colorSchemeStyles,
|
|
6971
|
+
...hostHiddenStyles,
|
|
6972
|
+
}),
|
|
6973
|
+
...inputStyles,
|
|
6974
|
+
...(isWithinForm &&
|
|
6975
|
+
addImportantToEachRule({
|
|
6976
|
+
'::slotted(input)': {
|
|
6977
|
+
position: 'absolute',
|
|
6978
|
+
height: inputSize,
|
|
6979
|
+
width: 0,
|
|
6980
|
+
opacity: 0,
|
|
6981
|
+
},
|
|
6982
|
+
})),
|
|
6983
|
+
},
|
|
6984
|
+
...(isLoading && {
|
|
6985
|
+
spinner: {
|
|
6986
|
+
width: '100%',
|
|
6987
|
+
height: inputSize,
|
|
6988
|
+
pointerEvents: 'none',
|
|
6989
|
+
position: 'absolute',
|
|
6990
|
+
top: '50%',
|
|
6991
|
+
left: '50%',
|
|
6992
|
+
transform: 'translate(-50%, -50%)',
|
|
6993
|
+
},
|
|
6994
|
+
}),
|
|
6995
|
+
'input-container': {
|
|
6996
|
+
display: 'flex',
|
|
6997
|
+
position: 'relative',
|
|
6998
|
+
gap: spacingStaticSmall,
|
|
6999
|
+
flexWrap: 'wrap',
|
|
7000
|
+
width: 'fit-content',
|
|
7001
|
+
},
|
|
7002
|
+
...mergeDeep(labelStyles, {
|
|
7003
|
+
label: {
|
|
7004
|
+
...buildResponsiveStyles(hideLabel,
|
|
7005
|
+
// workaround: since pin-code component is not wrapped into label tag it behaves differently
|
|
7006
|
+
(isLabelHidden) => (isLabelHidden ? { display: 'none' } : { display: 'inline-flex' })),
|
|
7007
|
+
marginBottom: spacingStaticXSmall,
|
|
7008
|
+
},
|
|
7009
|
+
}),
|
|
7010
|
+
...getFunctionalComponentRequiredStyles(),
|
|
7011
|
+
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
7012
|
+
});
|
|
7013
|
+
};
|
|
7014
|
+
|
|
6559
7015
|
const { backgroundColor: backgroundColorThemeLight, primaryColor: primaryColorThemeLight } = getThemedColors('light');
|
|
6560
7016
|
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
6561
7017
|
const directionPositionMap = {
|
|
@@ -6630,6 +7086,7 @@ const getComponentCss$u = (direction, theme) => {
|
|
|
6630
7086
|
...addImportantToEachRule({
|
|
6631
7087
|
position: 'relative',
|
|
6632
7088
|
display: 'inline-block',
|
|
7089
|
+
...colorSchemeStyles,
|
|
6633
7090
|
...hostHiddenStyles,
|
|
6634
7091
|
}),
|
|
6635
7092
|
verticalAlign: 'top',
|
|
@@ -6726,19 +7183,30 @@ const getComponentCss$u = (direction, theme) => {
|
|
|
6726
7183
|
});
|
|
6727
7184
|
};
|
|
6728
7185
|
|
|
6729
|
-
const
|
|
7186
|
+
const getCheckedSVGBackgroundImage = (fill) => {
|
|
7187
|
+
return getInlineSVGBackgroundImage(`<circle fill="${fill}" cx="12" cy="12" r="6"/>`);
|
|
7188
|
+
};
|
|
7189
|
+
const getComponentCss$t = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
6730
7190
|
const checkedIconColor = isHighContrastMode
|
|
6731
7191
|
? getHighContrastColors().canvasColor
|
|
6732
|
-
: getInvertedThemedColors(theme).primaryColor
|
|
6733
|
-
|
|
7192
|
+
: escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
|
|
7193
|
+
const checkedIconColorDark = isHighContrastMode
|
|
7194
|
+
? getHighContrastColors().canvasColor
|
|
7195
|
+
: escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
7196
|
+
return getCss(mergeDeep(getCheckboxRadioJssStyle(hideLabel, state, isDisabled, isLoading, theme), {
|
|
6734
7197
|
'@global': {
|
|
6735
7198
|
'::slotted': addImportantToEachRule({
|
|
6736
7199
|
'&(input)': {
|
|
6737
7200
|
borderRadius: '50%',
|
|
6738
7201
|
},
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
7202
|
+
...(!isLoading && {
|
|
7203
|
+
'&(input:checked)': {
|
|
7204
|
+
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColor),
|
|
7205
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7206
|
+
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColorDark),
|
|
7207
|
+
}),
|
|
7208
|
+
},
|
|
7209
|
+
}),
|
|
6742
7210
|
...(!isDisabled && {
|
|
6743
7211
|
'&(input:focus)::before': {
|
|
6744
7212
|
borderRadius: '50%',
|
|
@@ -6749,15 +7217,18 @@ const getComponentCss$t = (hideLabel, state, isDisabled, theme) => {
|
|
|
6749
7217
|
}));
|
|
6750
7218
|
};
|
|
6751
7219
|
|
|
7220
|
+
const gradientColorLight = {
|
|
7221
|
+
'background-base': '255,255,255',
|
|
7222
|
+
'background-surface': '238,239,242',
|
|
7223
|
+
};
|
|
7224
|
+
const gradientColorDark = {
|
|
7225
|
+
'background-base': '14,14,18',
|
|
7226
|
+
'background-surface': '33,34,37',
|
|
7227
|
+
};
|
|
6752
7228
|
const gradientColorMap = {
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
},
|
|
6757
|
-
dark: {
|
|
6758
|
-
'background-base': '14,14,18',
|
|
6759
|
-
'background-surface': '33,34,37',
|
|
6760
|
-
},
|
|
7229
|
+
auto: gradientColorLight,
|
|
7230
|
+
light: gradientColorLight,
|
|
7231
|
+
dark: gradientColorDark,
|
|
6761
7232
|
};
|
|
6762
7233
|
const getGradient = (theme, gradientColorTheme) => {
|
|
6763
7234
|
const gradientColor = gradientColorMap[theme][gradientColorTheme];
|
|
@@ -6768,15 +7239,17 @@ const getGradient = (theme, gradientColorTheme) => {
|
|
|
6768
7239
|
};
|
|
6769
7240
|
const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndicatorPosition, hasScrollbar, theme) => {
|
|
6770
7241
|
const { backgroundColor, backgroundSurfaceColor, focusColor, hoverColor } = getThemedColors(theme);
|
|
6771
|
-
const
|
|
7242
|
+
const { backgroundColor: backgroundColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, focusColor: focusColorDark, hoverColor: hoverColorDark, } = getThemedColors('dark');
|
|
7243
|
+
const backgroundColorLight = {
|
|
7244
|
+
'background-base': backgroundColor,
|
|
7245
|
+
'background-surface': backgroundSurfaceColor,
|
|
7246
|
+
};
|
|
6772
7247
|
const backgroundColorMap = {
|
|
7248
|
+
auto: backgroundColorLight,
|
|
7249
|
+
light: backgroundColorLight,
|
|
6773
7250
|
dark: {
|
|
6774
|
-
'background-base':
|
|
6775
|
-
'background-surface':
|
|
6776
|
-
},
|
|
6777
|
-
light: {
|
|
6778
|
-
'background-base': backgroundColor,
|
|
6779
|
-
'background-surface': backgroundSurfaceColor,
|
|
7251
|
+
'background-base': backgroundSurfaceColorDark,
|
|
7252
|
+
'background-surface': backgroundColorDark,
|
|
6780
7253
|
},
|
|
6781
7254
|
};
|
|
6782
7255
|
const actionPrevNextStyles = {
|
|
@@ -6791,6 +7264,7 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6791
7264
|
':host': addImportantToEachRule({
|
|
6792
7265
|
display: 'block',
|
|
6793
7266
|
height: 'inherit',
|
|
7267
|
+
...colorSchemeStyles,
|
|
6794
7268
|
...hostHiddenStyles,
|
|
6795
7269
|
}),
|
|
6796
7270
|
button: {
|
|
@@ -6805,15 +7279,21 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6805
7279
|
outline: 0,
|
|
6806
7280
|
cursor: 'pointer',
|
|
6807
7281
|
background: backgroundColorMap[theme][gradientColor],
|
|
7282
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7283
|
+
background: backgroundColorMap.dark[gradientColor],
|
|
7284
|
+
}),
|
|
6808
7285
|
borderRadius: borderRadiusSmall,
|
|
6809
7286
|
...frostedGlassStyle,
|
|
6810
7287
|
visibility: 'hidden',
|
|
6811
|
-
...(!
|
|
7288
|
+
...(!isThemeDark(theme) && dropShadowLowStyle),
|
|
6812
7289
|
...hoverMediaQuery({
|
|
6813
7290
|
transition: getTransition('background-color'),
|
|
6814
7291
|
'&:hover': {
|
|
6815
7292
|
...frostedGlassStyle,
|
|
6816
7293
|
background: hoverColor,
|
|
7294
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7295
|
+
background: hoverColorDark,
|
|
7296
|
+
}),
|
|
6817
7297
|
},
|
|
6818
7298
|
}),
|
|
6819
7299
|
},
|
|
@@ -6856,6 +7336,9 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6856
7336
|
},
|
|
6857
7337
|
'&:focus::before': {
|
|
6858
7338
|
borderColor: focusColor,
|
|
7339
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7340
|
+
borderColor: focusColorDark,
|
|
7341
|
+
}),
|
|
6859
7342
|
},
|
|
6860
7343
|
'&:focus:not(:focus-visible)::before': {
|
|
6861
7344
|
borderColor: 'transparent',
|
|
@@ -6880,6 +7363,9 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6880
7363
|
gridArea: '1 / 1 / 1 / 1',
|
|
6881
7364
|
justifyContent: 'flex-start',
|
|
6882
7365
|
background: `linear-gradient(to right, ${getGradient(theme, gradientColor)} 100%)`,
|
|
7366
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7367
|
+
background: `linear-gradient(to right, ${getGradient('dark', gradientColor)} 100%)`,
|
|
7368
|
+
}),
|
|
6883
7369
|
visibility: isPrevHidden ? 'hidden' : 'visible',
|
|
6884
7370
|
'& button': {
|
|
6885
7371
|
marginLeft: '8px',
|
|
@@ -6895,6 +7381,9 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6895
7381
|
gridArea: '1 / 3 / 1 / 3',
|
|
6896
7382
|
justifyContent: 'flex-end',
|
|
6897
7383
|
background: `linear-gradient(to left, ${getGradient(theme, gradientColor)} 100%)`,
|
|
7384
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7385
|
+
background: `linear-gradient(to left, ${getGradient('dark', gradientColor)} 100%)`,
|
|
7386
|
+
}),
|
|
6898
7387
|
visibility: isNextHidden ? 'hidden' : 'visible',
|
|
6899
7388
|
'& button': {
|
|
6900
7389
|
marginRight: '8px',
|
|
@@ -6923,7 +7412,9 @@ const getColors$2 = (isDisabled, isSelected, theme) => {
|
|
|
6923
7412
|
const getItemPadding = (hasIconAndSlottedContent) => hasIconAndSlottedContent ? `13px ${ITEM_PADDING} 13px 13px` : `13px ${ITEM_PADDING}`;
|
|
6924
7413
|
const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, theme) => {
|
|
6925
7414
|
const { focusColor } = getThemedColors(theme);
|
|
7415
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
6926
7416
|
const { buttonColor, labelColor, borderColor, hoverBorderColor } = getColors$2(isDisabled, isSelected, theme);
|
|
7417
|
+
const { buttonColor: buttonColorDark, labelColor: labelColorDark, borderColor: borderColorDark, hoverBorderColor: hoverBorderColorDark, } = getColors$2(isDisabled, isSelected, 'dark');
|
|
6927
7418
|
return getCss({
|
|
6928
7419
|
'@global': {
|
|
6929
7420
|
':host': addImportantToEachRule({
|
|
@@ -6933,6 +7424,7 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6933
7424
|
}),
|
|
6934
7425
|
// All width relevant styling has to be kept in sync with the tempDiv of the p-segmented-control utils
|
|
6935
7426
|
button: {
|
|
7427
|
+
position: 'relative',
|
|
6936
7428
|
display: 'block',
|
|
6937
7429
|
height: '100%',
|
|
6938
7430
|
width: '100%',
|
|
@@ -6944,7 +7436,10 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6944
7436
|
background: 'transparent',
|
|
6945
7437
|
color: buttonColor,
|
|
6946
7438
|
...textSmallStyle,
|
|
6947
|
-
|
|
7439
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7440
|
+
borderColor: borderColorDark,
|
|
7441
|
+
color: buttonColorDark,
|
|
7442
|
+
}),
|
|
6948
7443
|
'&::before': {
|
|
6949
7444
|
content: '""',
|
|
6950
7445
|
position: 'absolute',
|
|
@@ -6954,6 +7449,9 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6954
7449
|
},
|
|
6955
7450
|
'&:focus::before': {
|
|
6956
7451
|
borderColor: focusColor,
|
|
7452
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7453
|
+
borderColor: focusColorDark,
|
|
7454
|
+
}),
|
|
6957
7455
|
},
|
|
6958
7456
|
'&:focus:not(:focus-visible)::before': {
|
|
6959
7457
|
borderColor: 'transparent',
|
|
@@ -6969,6 +7467,9 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6969
7467
|
transition: getTransition('border-color'),
|
|
6970
7468
|
'&:hover': {
|
|
6971
7469
|
borderColor: hoverBorderColor,
|
|
7470
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7471
|
+
borderColor: hoverBorderColorDark,
|
|
7472
|
+
}),
|
|
6972
7473
|
},
|
|
6973
7474
|
})),
|
|
6974
7475
|
}),
|
|
@@ -6979,6 +7480,9 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6979
7480
|
...textXSmallStyle,
|
|
6980
7481
|
overflowWrap: 'normal',
|
|
6981
7482
|
color: labelColor,
|
|
7483
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7484
|
+
color: labelColorDark,
|
|
7485
|
+
}),
|
|
6982
7486
|
},
|
|
6983
7487
|
},
|
|
6984
7488
|
...(hasIcon && {
|
|
@@ -7006,6 +7510,7 @@ const getComponentCss$q = (maxWidth, columns) => {
|
|
|
7006
7510
|
gridTemplateColumns: col === 'auto' ? `repeat(auto-fit, ${maxWidth}px)` : `repeat(${col}, minmax(0, 1fr))`,
|
|
7007
7511
|
})),
|
|
7008
7512
|
gap: '6px',
|
|
7513
|
+
...colorSchemeStyles,
|
|
7009
7514
|
...hostHiddenStyles,
|
|
7010
7515
|
}),
|
|
7011
7516
|
},
|
|
@@ -7015,7 +7520,9 @@ const getComponentCss$q = (maxWidth, columns) => {
|
|
|
7015
7520
|
const dropdownPositionVar = '--p-internal-dropdown-position';
|
|
7016
7521
|
const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
7017
7522
|
const { primaryColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
7523
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
7018
7524
|
const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
|
|
7525
|
+
const { formStateHoverColor: formStateHoverColorDark, formStateColor: formStateColorDark } = getThemedFormStateColors('dark', state);
|
|
7019
7526
|
const isDirectionDown = direction === 'down';
|
|
7020
7527
|
return {
|
|
7021
7528
|
'@global': {
|
|
@@ -7032,17 +7539,29 @@ const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
|
7032
7539
|
outline: '0',
|
|
7033
7540
|
cursor: 'pointer',
|
|
7034
7541
|
transition: getTransition('border-color'),
|
|
7542
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7543
|
+
borderColor: isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7544
|
+
}),
|
|
7035
7545
|
'&:focus, &:focus ~ ul': {
|
|
7036
7546
|
borderColor: primaryColor,
|
|
7547
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7548
|
+
borderColor: primaryColorDark,
|
|
7549
|
+
}),
|
|
7037
7550
|
},
|
|
7038
7551
|
...hoverMediaQuery({
|
|
7039
7552
|
'&:not(:disabled):not(:focus):hover': {
|
|
7040
7553
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
7554
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7555
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
7556
|
+
}),
|
|
7041
7557
|
},
|
|
7042
7558
|
}),
|
|
7043
7559
|
'&:disabled': {
|
|
7044
7560
|
cursor: 'not-allowed',
|
|
7045
7561
|
borderColor: disabledColor,
|
|
7562
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7563
|
+
borderColor: disabledColorDark,
|
|
7564
|
+
}),
|
|
7046
7565
|
},
|
|
7047
7566
|
...(isOpen && {
|
|
7048
7567
|
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
@@ -7054,12 +7573,18 @@ const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
|
7054
7573
|
};
|
|
7055
7574
|
const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
7056
7575
|
const { primaryColor, backgroundColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
7576
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
7057
7577
|
const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
|
|
7578
|
+
const { formStateHoverColor: formStateHoverColorDark, formStateColor: formStateColorDark } = getThemedFormStateColors('dark', state);
|
|
7058
7579
|
const isDirectionDown = direction === 'down';
|
|
7059
7580
|
const placeHolderJssStyle = {
|
|
7060
7581
|
opacity: 1,
|
|
7061
7582
|
color: disabled ? disabledColor : primaryColor,
|
|
7062
7583
|
};
|
|
7584
|
+
const placeHolderDarkJssStyle = {
|
|
7585
|
+
opacity: 1,
|
|
7586
|
+
color: disabled ? disabledColorDark : primaryColorDark,
|
|
7587
|
+
};
|
|
7063
7588
|
return {
|
|
7064
7589
|
'@global': {
|
|
7065
7590
|
input: {
|
|
@@ -7083,23 +7608,45 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7083
7608
|
cursor: disabled ? 'not-allowed' : 'text',
|
|
7084
7609
|
color: primaryColor,
|
|
7085
7610
|
background: backgroundColor,
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7611
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7612
|
+
color: primaryColorDark,
|
|
7613
|
+
background: backgroundColorDark,
|
|
7614
|
+
}),
|
|
7615
|
+
'&::placeholder': {
|
|
7616
|
+
...placeHolderJssStyle,
|
|
7617
|
+
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
7618
|
+
},
|
|
7619
|
+
'&::-webkit-input-placeholder': {
|
|
7620
|
+
...placeHolderJssStyle,
|
|
7621
|
+
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
7622
|
+
},
|
|
7623
|
+
'&::-moz-placeholder': {
|
|
7624
|
+
...placeHolderJssStyle,
|
|
7625
|
+
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
7626
|
+
},
|
|
7089
7627
|
'&:not(:disabled):focus': {
|
|
7090
7628
|
opacity: 1,
|
|
7091
7629
|
'&+span, &~ ul': {
|
|
7092
7630
|
borderColor: primaryColor,
|
|
7631
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7632
|
+
borderColor: primaryColorDark,
|
|
7633
|
+
}),
|
|
7093
7634
|
},
|
|
7094
7635
|
},
|
|
7095
7636
|
...hoverMediaQuery({
|
|
7096
7637
|
'&:not(:disabled)': {
|
|
7097
7638
|
'&+span:hover': {
|
|
7098
7639
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
7640
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7641
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
7642
|
+
}),
|
|
7099
7643
|
},
|
|
7100
7644
|
'&:hover': {
|
|
7101
7645
|
'&+span, &~ul': {
|
|
7102
7646
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
7647
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7648
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
7649
|
+
}),
|
|
7103
7650
|
},
|
|
7104
7651
|
},
|
|
7105
7652
|
},
|
|
@@ -7112,6 +7659,9 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7112
7659
|
pointerEvents: 'all',
|
|
7113
7660
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
7114
7661
|
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
7662
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7663
|
+
borderColor: isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7664
|
+
}),
|
|
7115
7665
|
borderRadius: borderRadiusSmall,
|
|
7116
7666
|
...(isOpen && {
|
|
7117
7667
|
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
@@ -7124,7 +7674,9 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7124
7674
|
};
|
|
7125
7675
|
const getListStyles = (direction, theme) => {
|
|
7126
7676
|
const isDirectionDown = direction === 'down';
|
|
7127
|
-
const { primaryColor, backgroundColor, contrastMediumColor } = getThemedColors(
|
|
7677
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
7678
|
+
const { primaryColor, backgroundColor, contrastMediumColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor, } = getThemedColors(theme);
|
|
7679
|
+
const { highlightColor } = getHighContrastColors();
|
|
7128
7680
|
return {
|
|
7129
7681
|
'@global': {
|
|
7130
7682
|
ul: {
|
|
@@ -7153,15 +7705,72 @@ const getListStyles = (direction, theme) => {
|
|
|
7153
7705
|
scrollbarWidth: 'thin',
|
|
7154
7706
|
scrollbarColor: 'auto',
|
|
7155
7707
|
transition: getTransition('border-color'),
|
|
7156
|
-
transform: 'translate3d(0,0,0)',
|
|
7708
|
+
transform: 'translate3d(0,0,0)',
|
|
7709
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7710
|
+
background: backgroundColorDark,
|
|
7711
|
+
borderColor: primaryColorDark,
|
|
7712
|
+
[isDirectionDown ? 'borderTopColor' : 'borderBottomColor']: addImportantToRule(contrastMediumColorDark),
|
|
7713
|
+
}),
|
|
7157
7714
|
},
|
|
7158
7715
|
},
|
|
7159
|
-
|
|
7716
|
+
option: {
|
|
7717
|
+
display: 'flex',
|
|
7718
|
+
justifyContent: 'space-between',
|
|
7719
|
+
gap: '12px',
|
|
7720
|
+
padding: `${spacingStaticSmall} 12px`,
|
|
7721
|
+
flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
|
|
7722
|
+
color: contrastHighColor,
|
|
7723
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7724
|
+
color: contrastHighColorDark,
|
|
7725
|
+
}),
|
|
7726
|
+
cursor: 'pointer',
|
|
7727
|
+
textAlign: 'left',
|
|
7728
|
+
wordBreak: 'break-word',
|
|
7729
|
+
boxSizing: 'border-box',
|
|
7730
|
+
borderRadius: borderRadiusSmall,
|
|
7731
|
+
transition: ['background-color', 'color'].map(getTransition).join(),
|
|
7732
|
+
...getNoResultsOptionJssStyle(),
|
|
7733
|
+
...hoverMediaQuery({
|
|
7734
|
+
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
7735
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
7736
|
+
background: contrastLowColor,
|
|
7737
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7738
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
7739
|
+
background: contrastLowColorDark,
|
|
7740
|
+
}),
|
|
7741
|
+
},
|
|
7742
|
+
}),
|
|
7160
7743
|
'&--selected': {
|
|
7161
7744
|
cursor: 'default',
|
|
7162
7745
|
pointerEvents: 'none',
|
|
7746
|
+
background: backgroundSurfaceColor,
|
|
7747
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7748
|
+
background: backgroundSurfaceColorDark,
|
|
7749
|
+
}),
|
|
7163
7750
|
},
|
|
7164
|
-
|
|
7751
|
+
'&--highlighted': {
|
|
7752
|
+
background: contrastLowColor,
|
|
7753
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7754
|
+
background: contrastLowColorDark,
|
|
7755
|
+
}),
|
|
7756
|
+
},
|
|
7757
|
+
'&--highlighted, &--selected': {
|
|
7758
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
7759
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7760
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
7761
|
+
}),
|
|
7762
|
+
},
|
|
7763
|
+
'&--disabled': {
|
|
7764
|
+
cursor: 'not-allowed',
|
|
7765
|
+
color: disabledColor,
|
|
7766
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7767
|
+
color: disabledColorDark,
|
|
7768
|
+
}),
|
|
7769
|
+
},
|
|
7770
|
+
'&--hidden': {
|
|
7771
|
+
display: 'none',
|
|
7772
|
+
},
|
|
7773
|
+
},
|
|
7165
7774
|
optgroup: {
|
|
7166
7775
|
display: 'block',
|
|
7167
7776
|
padding: '3px 14px',
|
|
@@ -7177,7 +7786,9 @@ const getListStyles = (direction, theme) => {
|
|
|
7177
7786
|
};
|
|
7178
7787
|
const getComponentCss$p = (direction, isOpen, state, disabled, filter, theme) => {
|
|
7179
7788
|
const { primaryColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
7789
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
7180
7790
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
7791
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
7181
7792
|
return getCss(
|
|
7182
7793
|
// merge because of global styles
|
|
7183
7794
|
mergeDeep({
|
|
@@ -7192,11 +7803,17 @@ const getComponentCss$p = (direction, isOpen, state, disabled, filter, theme) =>
|
|
|
7192
7803
|
left: 0,
|
|
7193
7804
|
right: 0,
|
|
7194
7805
|
color: disabled ? disabledColor : formStateColor || contrastMediumColor,
|
|
7806
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7807
|
+
color: disabled ? disabledColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7808
|
+
}),
|
|
7195
7809
|
...(!disabled &&
|
|
7196
7810
|
!isHighContrastMode &&
|
|
7197
7811
|
hoverMediaQuery({
|
|
7198
7812
|
'&(:hover)': {
|
|
7199
7813
|
color: formStateHoverColor || primaryColor,
|
|
7814
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7815
|
+
color: formStateHoverColorDark || primaryColorDark,
|
|
7816
|
+
}),
|
|
7200
7817
|
},
|
|
7201
7818
|
})),
|
|
7202
7819
|
},
|
|
@@ -7214,6 +7831,7 @@ const getComponentCss$o = (isDisabled, hasCustomDropdown, hideLabel, state, them
|
|
|
7214
7831
|
'@global': addImportantToEachRule({
|
|
7215
7832
|
':host': {
|
|
7216
7833
|
display: 'block',
|
|
7834
|
+
...colorSchemeStyles,
|
|
7217
7835
|
...hostHiddenStyles,
|
|
7218
7836
|
},
|
|
7219
7837
|
...getBaseChildStyles('select', state, theme, {
|
|
@@ -7258,12 +7876,14 @@ const getComponentCss$n = (size, theme) => {
|
|
|
7258
7876
|
const strokeDasharray = '57'; // C = 2πR
|
|
7259
7877
|
const animationDuration = 'var(--p-animation-duration, 2s)';
|
|
7260
7878
|
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
7879
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
7261
7880
|
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
7262
7881
|
return getCss({
|
|
7263
7882
|
'@global': {
|
|
7264
7883
|
':host': addImportantToEachRule({
|
|
7265
7884
|
display: 'inline-flex',
|
|
7266
7885
|
verticalAlign: 'top',
|
|
7886
|
+
...colorSchemeStyles,
|
|
7267
7887
|
...hostHiddenStyles,
|
|
7268
7888
|
}),
|
|
7269
7889
|
svg: {
|
|
@@ -7275,13 +7895,21 @@ const getComponentCss$n = (size, theme) => {
|
|
|
7275
7895
|
},
|
|
7276
7896
|
circle: {
|
|
7277
7897
|
'&:first-child': {
|
|
7898
|
+
// TODO: High Contrast Mode should be handled within a local color helper function
|
|
7278
7899
|
stroke: isHighContrastMode ? canvasTextColor : contrastMediumColor,
|
|
7900
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7901
|
+
stroke: isHighContrastMode ? canvasTextColor : contrastMediumColorDark,
|
|
7902
|
+
}),
|
|
7279
7903
|
animation: `$rotate ${animationDuration} linear infinite`, // needs to rotate to eliminate stutter in safari
|
|
7280
7904
|
},
|
|
7281
7905
|
'&:last-child': {
|
|
7282
7906
|
transformOrigin: '0 0',
|
|
7283
7907
|
animation: `$dash ${animationDuration} ease-in-out infinite`,
|
|
7908
|
+
// TODO: High Contrast Mode should be handled within a local color helper function
|
|
7284
7909
|
stroke: isHighContrastMode ? canvasColor : primaryColor,
|
|
7910
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7911
|
+
stroke: isHighContrastMode ? canvasColor : primaryColorDark,
|
|
7912
|
+
}),
|
|
7285
7913
|
strokeDasharray: strokeDasharray
|
|
7286
7914
|
,
|
|
7287
7915
|
strokeLinecap: 'round',
|
|
@@ -7324,7 +7952,7 @@ const getComponentCss$n = (size, theme) => {
|
|
|
7324
7952
|
|
|
7325
7953
|
const getSVGPath = (stepCount, numberedCircleColors, isStateCurrent) => {
|
|
7326
7954
|
// # 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
|
|
7955
|
+
numberedCircleColors = Object.entries(numberedCircleColors).reduce((result, [key, value]) => ({ ...result, [key]: escapeHashCharacter(value) }), {});
|
|
7328
7956
|
const { disabledColor, invertedBaseColor, primaryColor } = numberedCircleColors;
|
|
7329
7957
|
const fillColor = isStateCurrent ? invertedBaseColor : disabledColor;
|
|
7330
7958
|
const svgCirclePath = `<circle fill="${isStateCurrent ? primaryColor : 'none'}"${isStateCurrent ? '' : ` stroke="${fillColor}"`} stroke-width="1px" cx="12" cy="12" r="9"/>`;
|
|
@@ -7346,6 +7974,7 @@ const getSVGPath = (stepCount, numberedCircleColors, isStateCurrent) => {
|
|
|
7346
7974
|
};
|
|
7347
7975
|
const getComponentCss$m = (state, disabled, theme) => {
|
|
7348
7976
|
const { primaryColor, hoverColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
7977
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
7349
7978
|
const isStateCurrent = state === 'current';
|
|
7350
7979
|
const isStateCurrentOrUndefined = !state || isStateCurrent;
|
|
7351
7980
|
const isDisabled = !state || disabled;
|
|
@@ -7361,6 +7990,13 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
7361
7990
|
invertedBaseColor: getInvertedThemedColors(theme).primaryColor,
|
|
7362
7991
|
disabledColor,
|
|
7363
7992
|
}, isStateCurrent)),
|
|
7993
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7994
|
+
backgroundImage: getInlineSVGBackgroundImage(getSVGPath(i, {
|
|
7995
|
+
primaryColor: primaryColorDark,
|
|
7996
|
+
invertedBaseColor: getInvertedThemedColors('dark').primaryColor,
|
|
7997
|
+
disabledColor: disabledColorDark,
|
|
7998
|
+
}, isStateCurrent)),
|
|
7999
|
+
}),
|
|
7364
8000
|
},
|
|
7365
8001
|
}), {})),
|
|
7366
8002
|
...addImportantToEachRule({
|
|
@@ -7389,12 +8025,21 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
7389
8025
|
...frostedGlassStyle,
|
|
7390
8026
|
background: hoverColor,
|
|
7391
8027
|
}),
|
|
8028
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8029
|
+
color: isDisabled ? disabledColorDark : primaryColorDark,
|
|
8030
|
+
...(isStateCurrent && {
|
|
8031
|
+
background: hoverColorDark,
|
|
8032
|
+
}),
|
|
8033
|
+
}),
|
|
7392
8034
|
...(!isDisabled &&
|
|
7393
8035
|
hoverMediaQuery({
|
|
7394
8036
|
transition: getTransition('background-color'),
|
|
7395
8037
|
'&:hover': {
|
|
7396
8038
|
...frostedGlassStyle,
|
|
7397
8039
|
background: hoverColor,
|
|
8040
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8041
|
+
background: hoverColorDark,
|
|
8042
|
+
}),
|
|
7398
8043
|
},
|
|
7399
8044
|
})),
|
|
7400
8045
|
...(isStateCurrentOrUndefined && {
|
|
@@ -7411,6 +8056,9 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
7411
8056
|
position: 'absolute',
|
|
7412
8057
|
...getInsetJssStyle(),
|
|
7413
8058
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
8059
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8060
|
+
borderColor: focusColorDark,
|
|
8061
|
+
}),
|
|
7414
8062
|
borderRadius: borderRadiusSmall,
|
|
7415
8063
|
},
|
|
7416
8064
|
'&:focus:not(:focus-visible)::after': {
|
|
@@ -7434,7 +8082,10 @@ const getComponentCss$l = (size) => {
|
|
|
7434
8082
|
'@global': {
|
|
7435
8083
|
':host': {
|
|
7436
8084
|
display: 'block',
|
|
7437
|
-
...addImportantToEachRule(
|
|
8085
|
+
...addImportantToEachRule({
|
|
8086
|
+
...colorSchemeStyles,
|
|
8087
|
+
...hostHiddenStyles,
|
|
8088
|
+
}),
|
|
7438
8089
|
},
|
|
7439
8090
|
},
|
|
7440
8091
|
scroller: {
|
|
@@ -7474,11 +8125,14 @@ const getColors$1 = (checked, disabled, loading, theme) => {
|
|
|
7474
8125
|
};
|
|
7475
8126
|
const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, loading, theme) => {
|
|
7476
8127
|
const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, disabled, loading, theme);
|
|
8128
|
+
const { buttonBorderColor: buttonBorderColorDark, buttonBorderColorHover: buttonBorderColorHoverDark, buttonBackgroundColor: buttonBackgroundColorDark, buttonBackgroundColorHover: buttonBackgroundColorHoverDark, toggleBackgroundColor: toggleBackgroundColorDark, toggleBackgroundColorHover: toggleBackgroundColorHoverDark, textColor: textColorDark, } = getColors$1(checked, disabled, loading, 'dark');
|
|
7477
8129
|
const { focusColor } = getThemedColors(theme);
|
|
8130
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
7478
8131
|
return getCss({
|
|
7479
8132
|
'@global': {
|
|
7480
8133
|
':host': addImportantToEachRule({
|
|
7481
8134
|
outline: 0,
|
|
8135
|
+
...colorSchemeStyles,
|
|
7482
8136
|
...hostHiddenStyles,
|
|
7483
8137
|
...buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
7484
8138
|
display: stretchValue ? 'block' : 'inline-block',
|
|
@@ -7507,8 +8161,15 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7507
8161
|
'&:hover .switch': {
|
|
7508
8162
|
borderColor: buttonBorderColorHover,
|
|
7509
8163
|
backgroundColor: buttonBackgroundColorHover,
|
|
8164
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8165
|
+
borderColor: buttonBorderColorHoverDark,
|
|
8166
|
+
backgroundColor: buttonBackgroundColorHoverDark,
|
|
8167
|
+
}),
|
|
7510
8168
|
'& .toggle': {
|
|
7511
8169
|
backgroundColor: toggleBackgroundColorHover,
|
|
8170
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8171
|
+
backgroundColor: toggleBackgroundColorHoverDark,
|
|
8172
|
+
}),
|
|
7512
8173
|
},
|
|
7513
8174
|
},
|
|
7514
8175
|
})),
|
|
@@ -7517,6 +8178,9 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7517
8178
|
position: 'absolute',
|
|
7518
8179
|
...getInsetJssStyle(-6),
|
|
7519
8180
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
8181
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8182
|
+
borderColor: focusColorDark,
|
|
8183
|
+
}),
|
|
7520
8184
|
borderRadius: '18px',
|
|
7521
8185
|
},
|
|
7522
8186
|
'&:not(:focus-visible) .switch::before': {
|
|
@@ -7534,6 +8198,10 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7534
8198
|
backgroundColor: buttonBackgroundColor,
|
|
7535
8199
|
cursor: isDisabledOrLoading(disabled, loading) ? 'not-allowed' : 'pointer',
|
|
7536
8200
|
transition: `${getTransition('background-color')},${getTransition('border-color')},${getTransition('color')}`,
|
|
8201
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8202
|
+
borderColor: buttonBorderColorDark,
|
|
8203
|
+
backgroundColor: buttonBackgroundColorDark,
|
|
8204
|
+
}),
|
|
7537
8205
|
},
|
|
7538
8206
|
toggle: {
|
|
7539
8207
|
position: 'absolute',
|
|
@@ -7544,6 +8212,9 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7544
8212
|
display: 'block',
|
|
7545
8213
|
borderRadius: '50%',
|
|
7546
8214
|
backgroundColor: toggleBackgroundColor,
|
|
8215
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8216
|
+
backgroundColor: toggleBackgroundColorDark,
|
|
8217
|
+
}),
|
|
7547
8218
|
transform: `translate3d(${checked ? '20px' : '0'}, 0, 0)`,
|
|
7548
8219
|
transition: `${getTransition('background-color')},${getTransition('transform')}`,
|
|
7549
8220
|
},
|
|
@@ -7562,6 +8233,9 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7562
8233
|
minWidth: 0,
|
|
7563
8234
|
minHeight: 0,
|
|
7564
8235
|
color: textColor,
|
|
8236
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8237
|
+
color: textColorDark,
|
|
8238
|
+
}),
|
|
7565
8239
|
...mergeDeep(buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
7566
8240
|
order: alignLabelValue === 'left' ? -1 : 0,
|
|
7567
8241
|
})), buildResponsiveStyles(hideLabel, getHiddenTextJssStyle)),
|
|
@@ -7607,6 +8281,7 @@ const cssVariableTableBorderColor = '--p-internal-table-border-color';
|
|
|
7607
8281
|
const cssVariableTableHeadCellIconFilter = '--p-internal-table-head-cell-icon-filter';
|
|
7608
8282
|
const getComponentCss$h = (theme) => {
|
|
7609
8283
|
const { primaryColor, hoverColor, contrastLowColor } = doGetThemedColors(theme);
|
|
8284
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastLowColor: contrastLowColorDark, } = doGetThemedColors('dark');
|
|
7610
8285
|
return getCss({
|
|
7611
8286
|
'@global': {
|
|
7612
8287
|
':host': addImportantToEachRule({
|
|
@@ -7614,12 +8289,21 @@ const getComponentCss$h = (theme) => {
|
|
|
7614
8289
|
...textSmallStyle,
|
|
7615
8290
|
color: primaryColor,
|
|
7616
8291
|
textAlign: 'left',
|
|
8292
|
+
...colorSchemeStyles,
|
|
7617
8293
|
...hostHiddenStyles,
|
|
8294
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8295
|
+
color: primaryColorDark,
|
|
8296
|
+
}),
|
|
7618
8297
|
}),
|
|
7619
8298
|
'::slotted(*)': addImportantToEachRule({
|
|
7620
8299
|
[cssVariableTableHoverColor]: hoverColor,
|
|
7621
8300
|
[cssVariableTableBorderColor]: contrastLowColor,
|
|
7622
8301
|
[cssVariableTableHeadCellIconFilter]: isThemeDark(theme) ? 'invert(100%)' : 'none',
|
|
8302
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8303
|
+
[cssVariableTableHoverColor]: hoverColorDark,
|
|
8304
|
+
[cssVariableTableBorderColor]: contrastLowColorDark,
|
|
8305
|
+
[cssVariableTableHeadCellIconFilter]: 'invert(100%)',
|
|
8306
|
+
}),
|
|
7623
8307
|
...(isHighContrastMode &&
|
|
7624
8308
|
getSchemedHighContrastMediaQuery({
|
|
7625
8309
|
[cssVariableTableHeadCellIconFilter]: 'none',
|
|
@@ -7774,11 +8458,21 @@ const targetSelectors = ['a', 'button'];
|
|
|
7774
8458
|
const transformSelector = (selector) => targetSelectors.map((tag) => selector.replace(/\[role]/g, tag)).join();
|
|
7775
8459
|
const getComponentCss$c = (size, weight, theme) => {
|
|
7776
8460
|
const { primaryColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
8461
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
7777
8462
|
const barJssStyle = {
|
|
7778
8463
|
position: 'absolute',
|
|
7779
8464
|
height: '2px',
|
|
7780
8465
|
left: 0,
|
|
7781
|
-
|
|
8466
|
+
...(isHighContrastMode
|
|
8467
|
+
? {
|
|
8468
|
+
background: getHighContrastColors().canvasTextColor,
|
|
8469
|
+
}
|
|
8470
|
+
: {
|
|
8471
|
+
background: primaryColor,
|
|
8472
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8473
|
+
background: primaryColorDark,
|
|
8474
|
+
}),
|
|
8475
|
+
}),
|
|
7782
8476
|
};
|
|
7783
8477
|
return getCss({
|
|
7784
8478
|
'@global': {
|
|
@@ -7786,6 +8480,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7786
8480
|
display: 'block',
|
|
7787
8481
|
...addImportantToEachRule({
|
|
7788
8482
|
position: 'relative',
|
|
8483
|
+
...colorSchemeStyles,
|
|
7789
8484
|
...hostHiddenStyles,
|
|
7790
8485
|
}),
|
|
7791
8486
|
},
|
|
@@ -7816,6 +8511,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7816
8511
|
cursor: 'pointer',
|
|
7817
8512
|
borderRadius: borderRadiusSmall,
|
|
7818
8513
|
zIndex: 0,
|
|
8514
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8515
|
+
color: primaryColorDark,
|
|
8516
|
+
}),
|
|
7819
8517
|
...hoverMediaQuery({
|
|
7820
8518
|
'&::before': {
|
|
7821
8519
|
content: '""',
|
|
@@ -7831,6 +8529,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7831
8529
|
[transformSelector('::slotted([role]:hover)::before')]: {
|
|
7832
8530
|
...frostedGlassStyle,
|
|
7833
8531
|
background: hoverColor,
|
|
8532
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8533
|
+
background: hoverColorDark,
|
|
8534
|
+
}),
|
|
7834
8535
|
},
|
|
7835
8536
|
}),
|
|
7836
8537
|
// basic invisible bar, that will be delayed via transition: visibility
|
|
@@ -7848,6 +8549,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7848
8549
|
// TODO: combine link-social-styles with link-button-styles and tabs-bar-styles
|
|
7849
8550
|
[transformSelector('::slotted([role]:focus:focus-visible)::before')]: {
|
|
7850
8551
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
8552
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8553
|
+
borderColor: focusColorDark,
|
|
8554
|
+
}),
|
|
7851
8555
|
},
|
|
7852
8556
|
[transformSelector('::slotted([role]:not(:last-child))')]: {
|
|
7853
8557
|
marginRight: spacingStaticMedium,
|
|
@@ -7885,20 +8589,27 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7885
8589
|
|
|
7886
8590
|
const getComponentCss$b = (theme) => {
|
|
7887
8591
|
const { primaryColor, focusColor } = getThemedColors(theme);
|
|
8592
|
+
const { primaryColor: primaryColorDark, focusColor: focusColorDark } = getThemedColors('dark');
|
|
7888
8593
|
return getCss({
|
|
7889
8594
|
'@global': {
|
|
7890
8595
|
':host': addImportantToEachRule({
|
|
7891
8596
|
display: 'block',
|
|
7892
8597
|
position: 'relative',
|
|
7893
8598
|
color: primaryColor,
|
|
7894
|
-
...hostHiddenStyles,
|
|
7895
8599
|
outline: 0,
|
|
8600
|
+
...hostHiddenStyles,
|
|
8601
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8602
|
+
color: primaryColorDark,
|
|
8603
|
+
}),
|
|
7896
8604
|
'&(:focus:focus-visible)::before': {
|
|
7897
8605
|
content: '""',
|
|
7898
8606
|
position: 'absolute',
|
|
7899
8607
|
...getInsetJssStyle(-4),
|
|
7900
8608
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
7901
8609
|
borderRadius: borderRadiusSmall,
|
|
8610
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8611
|
+
borderColor: focusColorDark,
|
|
8612
|
+
}),
|
|
7902
8613
|
},
|
|
7903
8614
|
}),
|
|
7904
8615
|
},
|
|
@@ -7910,7 +8621,10 @@ const getComponentCss$a = () => {
|
|
|
7910
8621
|
'@global': {
|
|
7911
8622
|
':host': {
|
|
7912
8623
|
display: 'block',
|
|
7913
|
-
...addImportantToEachRule(
|
|
8624
|
+
...addImportantToEachRule({
|
|
8625
|
+
...colorSchemeStyles,
|
|
8626
|
+
...hostHiddenStyles,
|
|
8627
|
+
}),
|
|
7914
8628
|
},
|
|
7915
8629
|
},
|
|
7916
8630
|
root: {
|
|
@@ -7948,14 +8662,18 @@ const getThemedBackgroundColor = (tagColor, themedColors) => {
|
|
|
7948
8662
|
|
|
7949
8663
|
const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
7950
8664
|
const themedColors = getThemedColors(theme);
|
|
8665
|
+
const themedColorsDark = getThemedColors('dark');
|
|
7951
8666
|
const { primaryColor, hoverColor, contrastHighColor } = themedColors;
|
|
8667
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastHighColor: contrastHighColorDark, } = themedColorsDark;
|
|
7952
8668
|
const backgroundColor = getThemedBackgroundColor(color, themedColors);
|
|
8669
|
+
const backgroundColorDark = getThemedBackgroundColor(color, themedColorsDark);
|
|
7953
8670
|
return getCss({
|
|
7954
8671
|
'@global': {
|
|
7955
8672
|
':host': addImportantToEachRule({
|
|
7956
8673
|
display: 'inline-block',
|
|
7957
8674
|
verticalAlign: 'top',
|
|
7958
8675
|
outline: 0,
|
|
8676
|
+
...colorSchemeStyles,
|
|
7959
8677
|
...hostHiddenStyles,
|
|
7960
8678
|
}),
|
|
7961
8679
|
button: {
|
|
@@ -7970,6 +8688,10 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
7970
8688
|
cursor: 'pointer',
|
|
7971
8689
|
background: backgroundColor,
|
|
7972
8690
|
color: primaryColor,
|
|
8691
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8692
|
+
background: backgroundColorDark,
|
|
8693
|
+
color: primaryColorDark,
|
|
8694
|
+
}),
|
|
7973
8695
|
textAlign: 'left',
|
|
7974
8696
|
...textSmallStyle,
|
|
7975
8697
|
outline: isHighContrastMode ? '1px solid transparent' : 0,
|
|
@@ -7977,6 +8699,9 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
7977
8699
|
...hoverMediaQuery({
|
|
7978
8700
|
'&:hover > .icon': {
|
|
7979
8701
|
backgroundColor: hoverColor,
|
|
8702
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8703
|
+
backgroundColor: hoverColorDark,
|
|
8704
|
+
}),
|
|
7980
8705
|
},
|
|
7981
8706
|
}),
|
|
7982
8707
|
},
|
|
@@ -7986,6 +8711,9 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
7986
8711
|
display: 'block',
|
|
7987
8712
|
marginBottom: '-4px',
|
|
7988
8713
|
color: contrastHighColor,
|
|
8714
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8715
|
+
color: contrastHighColorDark,
|
|
8716
|
+
}),
|
|
7989
8717
|
fontSize: fontSizeTextXSmall,
|
|
7990
8718
|
},
|
|
7991
8719
|
}),
|
|
@@ -8025,14 +8753,19 @@ const getColors = (themedColors, tagColor, theme) => {
|
|
|
8025
8753
|
};
|
|
8026
8754
|
const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
8027
8755
|
const themedColors = getThemedColors(theme);
|
|
8756
|
+
const themedColorsDark = getThemedColors('dark');
|
|
8028
8757
|
const { primaryColor, backgroundColor, backgroundHoverColor } = getColors(themedColors, tagColor, theme);
|
|
8758
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, backgroundHoverColor: backgroundHoverColorDark, } = getColors(themedColorsDark, tagColor, 'dark');
|
|
8029
8759
|
return getCss({
|
|
8030
8760
|
'@global': {
|
|
8031
8761
|
':host': {
|
|
8032
8762
|
display: 'inline-flex',
|
|
8033
8763
|
verticalAlign: 'top',
|
|
8034
8764
|
whiteSpace: 'nowrap',
|
|
8035
|
-
...addImportantToEachRule(
|
|
8765
|
+
...addImportantToEachRule({
|
|
8766
|
+
...colorSchemeStyles,
|
|
8767
|
+
...hostHiddenStyles,
|
|
8768
|
+
}),
|
|
8036
8769
|
},
|
|
8037
8770
|
span: {
|
|
8038
8771
|
display: 'flex',
|
|
@@ -8043,6 +8776,10 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8043
8776
|
borderRadius: borderRadiusSmall,
|
|
8044
8777
|
background: backgroundColor,
|
|
8045
8778
|
color: primaryColor,
|
|
8779
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8780
|
+
background: backgroundColorDark,
|
|
8781
|
+
color: primaryColorDark,
|
|
8782
|
+
}),
|
|
8046
8783
|
font: textXSmallStyle.font,
|
|
8047
8784
|
...(isHighContrastMode && {
|
|
8048
8785
|
outline: '1px solid transparent',
|
|
@@ -8052,6 +8789,9 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8052
8789
|
transition: getTransition('background-color'),
|
|
8053
8790
|
'&:hover': {
|
|
8054
8791
|
background: backgroundHoverColor,
|
|
8792
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8793
|
+
background: backgroundHoverColorDark,
|
|
8794
|
+
}),
|
|
8055
8795
|
},
|
|
8056
8796
|
})),
|
|
8057
8797
|
},
|
|
@@ -8081,6 +8821,11 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8081
8821
|
icon: {
|
|
8082
8822
|
marginLeft: '-2px',
|
|
8083
8823
|
alignSelf: 'flex-start',
|
|
8824
|
+
...(['neutral-contrast-high', 'primary'].includes(tagColor) && {
|
|
8825
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8826
|
+
filter: 'invert(1)',
|
|
8827
|
+
}),
|
|
8828
|
+
}),
|
|
8084
8829
|
},
|
|
8085
8830
|
});
|
|
8086
8831
|
};
|
|
@@ -8118,6 +8863,7 @@ const getButtonOrIconOffsetHorizontal = (buttonOrIconAmount) => {
|
|
|
8118
8863
|
};
|
|
8119
8864
|
const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter, unitPosition, inputType, showPasswordToggle, isWithinForm, theme) => {
|
|
8120
8865
|
const { contrastMediumColor } = getThemedColors(theme);
|
|
8866
|
+
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
8121
8867
|
const isSearch = isType(inputType, 'search');
|
|
8122
8868
|
const isPassword = isType(inputType, 'password');
|
|
8123
8869
|
const isNumber = isType(inputType, 'number');
|
|
@@ -8136,6 +8882,7 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
8136
8882
|
[cssVariableInputPaddingRight]: isSearchOrPassword || isCalendarOrTimeWithCustomIndicator
|
|
8137
8883
|
? getInputPaddingHorizontal(isSearchWithForm ? 2 : 1)
|
|
8138
8884
|
: spacingStaticMedium,
|
|
8885
|
+
...colorSchemeStyles,
|
|
8139
8886
|
...hostHiddenStyles,
|
|
8140
8887
|
}),
|
|
8141
8888
|
},
|
|
@@ -8183,6 +8930,9 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
8183
8930
|
padding: unitPosition === 'suffix' ? `0 ${spacingStaticMedium} 0 10px` : `0 10px 0 ${spacingStaticMedium}`,
|
|
8184
8931
|
font: textSmallStyle.font,
|
|
8185
8932
|
color: contrastMediumColor,
|
|
8933
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8934
|
+
color: contrastMediumColorDark,
|
|
8935
|
+
}),
|
|
8186
8936
|
},
|
|
8187
8937
|
}),
|
|
8188
8938
|
...getFunctionalComponentRequiredStyles(),
|
|
@@ -8214,18 +8964,22 @@ const getComponentCss$6 = (type, theme) => {
|
|
|
8214
8964
|
display: 'block',
|
|
8215
8965
|
...addImportantToEachRule({
|
|
8216
8966
|
counterReset: counter,
|
|
8967
|
+
...colorSchemeStyles,
|
|
8217
8968
|
...hostHiddenStyles,
|
|
8218
8969
|
}),
|
|
8219
8970
|
},
|
|
8220
8971
|
'ol,ul': {
|
|
8221
8972
|
...textSmallStyle,
|
|
8222
|
-
color: getThemedColors(theme).primaryColor,
|
|
8223
8973
|
margin: 0,
|
|
8224
8974
|
padding: `var(${cssVariablePaddingTop},0) 0 var(${cssVariablePaddingBottom},0) ${isOrderedList
|
|
8225
8975
|
? `var(${cssVariableOrderedPaddingLeft},1.5rem)` // reserves space for ::before (root ordered list)
|
|
8226
8976
|
: `var(${cssVariableUnorderedPaddingLeft},.375rem)` // reserves space for ::marker "•" (root unordered list)
|
|
8227
8977
|
}`,
|
|
8228
|
-
listStyleType: isOrderedList ? 'none' : `var(${cssVariableListStyleType},'•')`,
|
|
8978
|
+
listStyleType: isOrderedList ? 'none' : `var(${cssVariableListStyleType},'•')`,
|
|
8979
|
+
color: getThemedColors(theme).primaryColor,
|
|
8980
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8981
|
+
color: getThemedColors('dark').primaryColor,
|
|
8982
|
+
}),
|
|
8229
8983
|
},
|
|
8230
8984
|
// css selector for text-list-item
|
|
8231
8985
|
'::slotted(*)': addImportantToEachRule({
|
|
@@ -8284,7 +9038,10 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis, theme) => {
|
|
|
8284
9038
|
'@global': {
|
|
8285
9039
|
':host': {
|
|
8286
9040
|
display: 'block',
|
|
8287
|
-
...addImportantToEachRule(
|
|
9041
|
+
...addImportantToEachRule({
|
|
9042
|
+
...colorSchemeStyles,
|
|
9043
|
+
...hostHiddenStyles,
|
|
9044
|
+
}),
|
|
8288
9045
|
},
|
|
8289
9046
|
'::slotted': {
|
|
8290
9047
|
[TEXT_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -8299,10 +9056,12 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis, theme) => {
|
|
|
8299
9056
|
|
|
8300
9057
|
const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
8301
9058
|
const { contrastMediumColor } = getThemedColors(theme);
|
|
9059
|
+
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
8302
9060
|
return getCss({
|
|
8303
9061
|
'@global': {
|
|
8304
9062
|
':host': addImportantToEachRule({
|
|
8305
9063
|
display: 'block',
|
|
9064
|
+
...colorSchemeStyles,
|
|
8306
9065
|
...hostHiddenStyles,
|
|
8307
9066
|
}),
|
|
8308
9067
|
...mergeDeep(addImportantToEachRule(getBaseChildStyles('textarea', state, theme, {
|
|
@@ -8324,6 +9083,9 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
8324
9083
|
zIndex: 1,
|
|
8325
9084
|
font: textSmallStyle.font,
|
|
8326
9085
|
color: contrastMediumColor,
|
|
9086
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9087
|
+
color: contrastMediumColorDark,
|
|
9088
|
+
}),
|
|
8327
9089
|
},
|
|
8328
9090
|
}),
|
|
8329
9091
|
...getFunctionalComponentRequiredStyles(),
|
|
@@ -8379,6 +9141,7 @@ const getComponentCss$1 = () => {
|
|
|
8379
9141
|
[cssVariablePositionBottomInternal]: `var(${cssVariablePositionBottom}, 64px)`,
|
|
8380
9142
|
bottom: `var(${cssVariablePositionBottomInternal})`,
|
|
8381
9143
|
},
|
|
9144
|
+
...colorSchemeStyles,
|
|
8382
9145
|
...hostHiddenStyles,
|
|
8383
9146
|
}),
|
|
8384
9147
|
'@keyframes in': getKeyframesMobile('in', cssVariablePositionBottomInternal),
|
|
@@ -8412,6 +9175,7 @@ const getComponentCss = (size, theme) => {
|
|
|
8412
9175
|
height: 'round(down, clamp(0.63rem, 0.42vw + 0.5rem, 1rem), 1px)',
|
|
8413
9176
|
},
|
|
8414
9177
|
}),
|
|
9178
|
+
...colorSchemeStyles,
|
|
8415
9179
|
...hostHiddenStyles,
|
|
8416
9180
|
}),
|
|
8417
9181
|
},
|
|
@@ -8425,11 +9189,18 @@ const getComponentCss = (size, theme) => {
|
|
|
8425
9189
|
textDecoration: 'none',
|
|
8426
9190
|
...focusPseudoJssStyle,
|
|
8427
9191
|
},
|
|
8428
|
-
svg:
|
|
8429
|
-
|
|
8430
|
-
|
|
9192
|
+
svg: isHighContrastMode
|
|
9193
|
+
? {
|
|
9194
|
+
fill: getHighContrastColors().canvasTextColor,
|
|
9195
|
+
}
|
|
9196
|
+
: {
|
|
9197
|
+
fill: getThemedColors(theme).primaryColor,
|
|
9198
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9199
|
+
fill: getThemedColors('dark').primaryColor,
|
|
9200
|
+
}),
|
|
9201
|
+
},
|
|
8431
9202
|
},
|
|
8432
9203
|
});
|
|
8433
9204
|
};
|
|
8434
9205
|
|
|
8435
|
-
export { getComponentCss
|
|
9206
|
+
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 };
|