@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
|
@@ -531,14 +531,14 @@ var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symb
|
|
|
531
531
|
|
|
532
532
|
var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof$1(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof$1(document)) === 'object' && document.nodeType === 9;
|
|
533
533
|
|
|
534
|
-
function _typeof(
|
|
534
|
+
function _typeof(o) {
|
|
535
535
|
"@babel/helpers - typeof";
|
|
536
536
|
|
|
537
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
538
|
-
return typeof
|
|
539
|
-
} : function (
|
|
540
|
-
return
|
|
541
|
-
}, _typeof(
|
|
537
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
538
|
+
return typeof o;
|
|
539
|
+
} : function (o) {
|
|
540
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
541
|
+
}, _typeof(o);
|
|
542
542
|
}
|
|
543
543
|
|
|
544
544
|
function _toPrimitive(input, hint) {
|
|
@@ -3742,9 +3742,13 @@ const themeDark = {
|
|
|
3742
3742
|
infoSoftColorDarken: '#0C1A27',
|
|
3743
3743
|
infoSoftColorLighten: '#1A3856'
|
|
3744
3744
|
};
|
|
3745
|
+
const themeAuto = {
|
|
3746
|
+
...themeLight,
|
|
3747
|
+
};
|
|
3745
3748
|
const themes = {
|
|
3746
3749
|
'light': themeLight,
|
|
3747
|
-
'dark': themeDark
|
|
3750
|
+
'dark': themeDark,
|
|
3751
|
+
'auto': themeAuto
|
|
3748
3752
|
};
|
|
3749
3753
|
/* Auto Generated End */
|
|
3750
3754
|
const schemeHighContrastMerged = {
|
|
@@ -3876,6 +3880,10 @@ const hostHiddenStyles = {
|
|
|
3876
3880
|
},
|
|
3877
3881
|
};
|
|
3878
3882
|
|
|
3883
|
+
const colorSchemeStyles = {
|
|
3884
|
+
colorScheme: 'light dark',
|
|
3885
|
+
};
|
|
3886
|
+
|
|
3879
3887
|
/**
|
|
3880
3888
|
* utility to wrap jss styles parameter in `@media (hover: hover)`
|
|
3881
3889
|
* which is used to not have hover styles on touch devices
|
|
@@ -3886,6 +3894,10 @@ const hoverMediaQuery = (style) =>
|
|
|
3886
3894
|
({ '@media(hover:hover)': style }) // used for prod build, yarn start and unit tests
|
|
3887
3895
|
; // used for staging build in e2e and vrt tests
|
|
3888
3896
|
|
|
3897
|
+
const prefersColorSchemeDarkMediaQuery = (theme, style) => {
|
|
3898
|
+
return isThemeAuto(theme) && { '@media (prefers-color-scheme: dark)': style };
|
|
3899
|
+
};
|
|
3900
|
+
|
|
3889
3901
|
const getSchemedHighContrastMediaQuery = (light, dark) => {
|
|
3890
3902
|
return {
|
|
3891
3903
|
'@media (forced-colors: active) and (prefers-color-scheme: light)': light,
|
|
@@ -3950,10 +3962,6 @@ const mergeDeep = (...objects) => {
|
|
|
3950
3962
|
}, {});
|
|
3951
3963
|
};
|
|
3952
3964
|
|
|
3953
|
-
const isThemeDark = (theme) => {
|
|
3954
|
-
return theme === 'dark';
|
|
3955
|
-
};
|
|
3956
|
-
|
|
3957
3965
|
const scrollShadowColor = 'rgba(204, 204, 204, 0.35)';
|
|
3958
3966
|
const scrollShadowColorDark = 'rgba(0, 0, 0, 0.6)';
|
|
3959
3967
|
|
|
@@ -3967,7 +3975,9 @@ const getThemedFormStateColors = (theme, state) => {
|
|
|
3967
3975
|
|
|
3968
3976
|
const getBaseChildStyles = (child, state, theme, additionalDefaultJssStyle) => {
|
|
3969
3977
|
const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
3978
|
+
const { primaryColor: primaryColorDark, contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
3970
3979
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
3980
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
3971
3981
|
return {
|
|
3972
3982
|
[`::slotted(${child})`]: {
|
|
3973
3983
|
display: 'block',
|
|
@@ -3987,34 +3997,55 @@ const getBaseChildStyles = (child, state, theme, additionalDefaultJssStyle) => {
|
|
|
3987
3997
|
textIndent: 0,
|
|
3988
3998
|
color: primaryColor,
|
|
3989
3999
|
transition: ['color', 'border-color', 'background-color'].map(getTransition).join(),
|
|
4000
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4001
|
+
borderColor: formStateColorDark || contrastMediumColorDark,
|
|
4002
|
+
color: primaryColorDark,
|
|
4003
|
+
}),
|
|
3990
4004
|
...additionalDefaultJssStyle,
|
|
3991
4005
|
},
|
|
3992
4006
|
...hoverMediaQuery({
|
|
3993
4007
|
// with the media query the selector has higher priority and overrides disabled styles
|
|
3994
4008
|
[`::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover)`]: {
|
|
3995
4009
|
borderColor: formStateHoverColor || primaryColor,
|
|
4010
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4011
|
+
borderColor: formStateHoverColorDark || primaryColorDark,
|
|
4012
|
+
}),
|
|
3996
4013
|
},
|
|
3997
4014
|
}),
|
|
3998
4015
|
[`::slotted(${child}:focus)`]: {
|
|
3999
4016
|
borderColor: primaryColor,
|
|
4017
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4018
|
+
borderColor: primaryColorDark,
|
|
4019
|
+
}),
|
|
4000
4020
|
},
|
|
4001
4021
|
[`::slotted(${child}:disabled)`]: {
|
|
4002
4022
|
cursor: 'not-allowed',
|
|
4003
4023
|
color: disabledColor,
|
|
4004
4024
|
borderColor: disabledColor,
|
|
4005
4025
|
WebkitTextFillColor: disabledColor,
|
|
4026
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4027
|
+
color: disabledColorDark,
|
|
4028
|
+
borderColor: disabledColorDark,
|
|
4029
|
+
WebkitTextFillColor: disabledColorDark,
|
|
4030
|
+
}),
|
|
4006
4031
|
},
|
|
4007
4032
|
...(child !== 'select' && {
|
|
4008
4033
|
[`::slotted(${child}[readonly])`]: {
|
|
4009
4034
|
borderColor: contrastLowColor,
|
|
4010
4035
|
background: contrastLowColor,
|
|
4036
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4037
|
+
borderColor: contrastLowColorDark,
|
|
4038
|
+
background: contrastLowColorDark,
|
|
4039
|
+
}),
|
|
4011
4040
|
},
|
|
4012
4041
|
}),
|
|
4013
4042
|
};
|
|
4014
4043
|
};
|
|
4015
4044
|
const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUnitOrIconStyles, additionalLabelJssStyle) => {
|
|
4016
4045
|
const { primaryColor, disabledColor, contrastHighColor } = getThemedColors(theme);
|
|
4046
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, } = getThemedColors('dark');
|
|
4017
4047
|
const { formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
4048
|
+
const { formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
4018
4049
|
const counterOrUnitOrIconStylesKey = counterOrUnitOrIconStyles && Object.keys(counterOrUnitOrIconStyles)[0];
|
|
4019
4050
|
return {
|
|
4020
4051
|
label: {
|
|
@@ -4028,18 +4059,26 @@ const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUni
|
|
|
4028
4059
|
...textSmallStyle,
|
|
4029
4060
|
color: isDisabled ? disabledColor : primaryColor,
|
|
4030
4061
|
transition: getTransition('color'),
|
|
4062
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4063
|
+
color: isDisabled ? disabledColorDark : primaryColorDark,
|
|
4064
|
+
}),
|
|
4031
4065
|
'&+&': {
|
|
4032
4066
|
marginTop: `-${spacingStaticXSmall}`,
|
|
4033
4067
|
fontSize: fontSizeTextXSmall,
|
|
4034
4068
|
...(!isDisabled && {
|
|
4035
4069
|
color: contrastHighColor,
|
|
4070
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4071
|
+
color: contrastHighColorDark,
|
|
4072
|
+
}),
|
|
4036
4073
|
}),
|
|
4037
4074
|
},
|
|
4038
4075
|
...hoverMediaQuery({
|
|
4039
4076
|
'&:hover': {
|
|
4040
|
-
[`&~::slotted(${child}:not(:disabled):not(:focus):not([readonly]))`
|
|
4041
|
-
(formStateHoverColor ? `,::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover)` : '')]: {
|
|
4077
|
+
[`&~::slotted(${child}:not(:disabled):not(:focus):not([readonly]))`]: {
|
|
4042
4078
|
borderColor: addImportantToRule(formStateHoverColor || primaryColor),
|
|
4079
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4080
|
+
borderColor: addImportantToRule(formStateHoverColorDark || primaryColorDark),
|
|
4081
|
+
}),
|
|
4043
4082
|
},
|
|
4044
4083
|
},
|
|
4045
4084
|
}),
|
|
@@ -4053,6 +4092,9 @@ const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUni
|
|
|
4053
4092
|
...(isDisabled && {
|
|
4054
4093
|
color: disabledColor,
|
|
4055
4094
|
cursor: 'not-allowed',
|
|
4095
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4096
|
+
color: disabledColorDark,
|
|
4097
|
+
}),
|
|
4056
4098
|
}),
|
|
4057
4099
|
},
|
|
4058
4100
|
}),
|
|
@@ -4061,50 +4103,6 @@ const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUni
|
|
|
4061
4103
|
|
|
4062
4104
|
const OPTION_HEIGHT = 40; // optgroups are higher and ignored
|
|
4063
4105
|
const MULTI_SELECT_OPTION_HEIGHT = 44;
|
|
4064
|
-
const getSelectOptionStyles = (theme, additionalOptionJssStyle) => {
|
|
4065
|
-
const { primaryColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor } = getThemedColors(theme);
|
|
4066
|
-
const { highlightColor } = getHighContrastColors();
|
|
4067
|
-
return {
|
|
4068
|
-
option: {
|
|
4069
|
-
display: 'flex',
|
|
4070
|
-
justifyContent: 'space-between',
|
|
4071
|
-
gap: '12px',
|
|
4072
|
-
padding: `${spacingStaticSmall} 12px`,
|
|
4073
|
-
flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
|
|
4074
|
-
color: contrastHighColor,
|
|
4075
|
-
cursor: 'pointer',
|
|
4076
|
-
textAlign: 'left',
|
|
4077
|
-
wordBreak: 'break-word',
|
|
4078
|
-
boxSizing: 'border-box',
|
|
4079
|
-
borderRadius: borderRadiusSmall,
|
|
4080
|
-
transition: ['background-color', 'color'].map(getTransition).join(),
|
|
4081
|
-
...getNoResultsOptionJssStyle(),
|
|
4082
|
-
...hoverMediaQuery({
|
|
4083
|
-
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
4084
|
-
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
4085
|
-
background: contrastLowColor,
|
|
4086
|
-
},
|
|
4087
|
-
}),
|
|
4088
|
-
'&--selected': {
|
|
4089
|
-
background: backgroundSurfaceColor,
|
|
4090
|
-
},
|
|
4091
|
-
'&--highlighted': {
|
|
4092
|
-
background: contrastLowColor,
|
|
4093
|
-
},
|
|
4094
|
-
'&--highlighted, &--selected': {
|
|
4095
|
-
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
4096
|
-
},
|
|
4097
|
-
'&--disabled': {
|
|
4098
|
-
cursor: 'not-allowed',
|
|
4099
|
-
color: disabledColor,
|
|
4100
|
-
},
|
|
4101
|
-
'&--hidden': {
|
|
4102
|
-
display: 'none',
|
|
4103
|
-
},
|
|
4104
|
-
...additionalOptionJssStyle,
|
|
4105
|
-
},
|
|
4106
|
-
};
|
|
4107
|
-
};
|
|
4108
4106
|
const getNoResultsOptionJssStyle = () => ({
|
|
4109
4107
|
'&[role=status]': {
|
|
4110
4108
|
cursor: 'not-allowed',
|
|
@@ -4114,6 +4112,14 @@ const getNoResultsOptionJssStyle = () => ({
|
|
|
4114
4112
|
|
|
4115
4113
|
const hasDocument = typeof document !== 'undefined';
|
|
4116
4114
|
|
|
4115
|
+
const isThemeAuto = (theme) => {
|
|
4116
|
+
return theme === 'auto';
|
|
4117
|
+
};
|
|
4118
|
+
|
|
4119
|
+
const isThemeDark = (theme) => {
|
|
4120
|
+
return theme === 'dark';
|
|
4121
|
+
};
|
|
4122
|
+
|
|
4117
4123
|
const formatObjectOutput = (value) => {
|
|
4118
4124
|
return JSON.stringify(value)
|
|
4119
4125
|
.replace(/"([a-zA-Z?]+)":/g, '$1:') // remove double quotes from keys
|
|
@@ -4126,15 +4132,20 @@ const formatObjectOutput = (value) => {
|
|
|
4126
4132
|
|
|
4127
4133
|
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
4128
4134
|
|
|
4129
|
-
const getComponentCss
|
|
4135
|
+
const getComponentCss$10 = (size, compact, open, theme) => {
|
|
4130
4136
|
const { primaryColor, hoverColor, focusColor, contrastLowColor } = getThemedColors(theme);
|
|
4137
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, focusColor: focusColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
4131
4138
|
return getCss({
|
|
4132
4139
|
'@global': {
|
|
4133
4140
|
':host': addImportantToEachRule({
|
|
4134
4141
|
display: 'block',
|
|
4135
4142
|
...(!compact && {
|
|
4136
4143
|
borderBottom: `1px solid ${contrastLowColor}`,
|
|
4144
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4145
|
+
borderColor: contrastLowColorDark,
|
|
4146
|
+
}),
|
|
4137
4147
|
}),
|
|
4148
|
+
...colorSchemeStyles,
|
|
4138
4149
|
...hostHiddenStyles,
|
|
4139
4150
|
}),
|
|
4140
4151
|
button: {
|
|
@@ -4150,6 +4161,9 @@ const getComponentCss$$ = (size, compact, open, theme) => {
|
|
|
4150
4161
|
cursor: 'pointer',
|
|
4151
4162
|
textAlign: 'left',
|
|
4152
4163
|
color: primaryColor,
|
|
4164
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4165
|
+
color: primaryColorDark,
|
|
4166
|
+
}),
|
|
4153
4167
|
...textSmallStyle,
|
|
4154
4168
|
fontWeight: fontWeightSemiBold,
|
|
4155
4169
|
...buildResponsiveStyles(size, (s) => ({
|
|
@@ -4180,10 +4194,16 @@ const getComponentCss$$ = (size, compact, open, theme) => {
|
|
|
4180
4194
|
},
|
|
4181
4195
|
'&:hover::before': {
|
|
4182
4196
|
background: hoverColor,
|
|
4197
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4198
|
+
background: hoverColorDark,
|
|
4199
|
+
}),
|
|
4183
4200
|
},
|
|
4184
4201
|
})),
|
|
4185
4202
|
'&:focus::before': {
|
|
4186
4203
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
4204
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4205
|
+
borderColor: focusColorDark,
|
|
4206
|
+
}),
|
|
4187
4207
|
},
|
|
4188
4208
|
'&:not(:focus-visible)::before': {
|
|
4189
4209
|
border: 0,
|
|
@@ -4209,6 +4229,9 @@ const getComponentCss$$ = (size, compact, open, theme) => {
|
|
|
4209
4229
|
},
|
|
4210
4230
|
collapsible: {
|
|
4211
4231
|
color: primaryColor,
|
|
4232
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4233
|
+
color: primaryColorDark,
|
|
4234
|
+
}),
|
|
4212
4235
|
display: 'grid',
|
|
4213
4236
|
...(open
|
|
4214
4237
|
? {
|
|
@@ -4253,7 +4276,7 @@ const duration$1 = `var(${cssVariableAnimationDuration},${ANIMATION_DURATION$1}m
|
|
|
4253
4276
|
const easeInQuad$1 = 'cubic-bezier(0.45,0,0.55,1)';
|
|
4254
4277
|
const easeOutQuad$1 = 'cubic-bezier(0.5,1,0.89,1)';
|
|
4255
4278
|
const topBottomFallback = '56px';
|
|
4256
|
-
const getComponentCss
|
|
4279
|
+
const getComponentCss$$ = (isOpen) => {
|
|
4257
4280
|
return getCss({
|
|
4258
4281
|
'@global': {
|
|
4259
4282
|
':host': addImportantToEachRule({
|
|
@@ -4295,6 +4318,7 @@ const getComponentCss$_ = (isOpen) => {
|
|
|
4295
4318
|
left: gridExtendedOffsetXXL,
|
|
4296
4319
|
right: gridExtendedOffsetXXL,
|
|
4297
4320
|
},
|
|
4321
|
+
...colorSchemeStyles,
|
|
4298
4322
|
...hostHiddenStyles,
|
|
4299
4323
|
}),
|
|
4300
4324
|
},
|
|
@@ -4315,12 +4339,15 @@ const getGroupDirectionJssStyles = (direction) => {
|
|
|
4315
4339
|
return groupDirectionJssStyles[direction];
|
|
4316
4340
|
};
|
|
4317
4341
|
|
|
4318
|
-
const getComponentCss$
|
|
4342
|
+
const getComponentCss$_ = (direction) => {
|
|
4319
4343
|
return getCss({
|
|
4320
4344
|
'@global': {
|
|
4321
4345
|
':host': {
|
|
4322
4346
|
display: 'block',
|
|
4323
|
-
...addImportantToEachRule(
|
|
4347
|
+
...addImportantToEachRule({
|
|
4348
|
+
...colorSchemeStyles,
|
|
4349
|
+
...hostHiddenStyles,
|
|
4350
|
+
}),
|
|
4324
4351
|
},
|
|
4325
4352
|
div: {
|
|
4326
4353
|
display: 'flex',
|
|
@@ -4365,6 +4392,7 @@ const offsetVertical = '-2px';
|
|
|
4365
4392
|
const offsetHorizontal = '-4px';
|
|
4366
4393
|
const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme) => {
|
|
4367
4394
|
const { primaryColor, disabledColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
4395
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, hoverColor: hoverColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
4368
4396
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4369
4397
|
return {
|
|
4370
4398
|
'@global': {
|
|
@@ -4372,6 +4400,7 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4372
4400
|
...addImportantToEachRule({
|
|
4373
4401
|
transform: 'translate3d(0,0,0)',
|
|
4374
4402
|
outline: 0,
|
|
4403
|
+
...colorSchemeStyles,
|
|
4375
4404
|
...hostHiddenStyles,
|
|
4376
4405
|
}),
|
|
4377
4406
|
...buildResponsiveStyles(stretch, (responsiveStretch) => ({
|
|
@@ -4388,6 +4417,9 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4388
4417
|
margin: 0,
|
|
4389
4418
|
padding: 0,
|
|
4390
4419
|
color: isDisabledOrLoading ? disabledColor : primaryColor,
|
|
4420
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4421
|
+
color: isDisabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
4422
|
+
}),
|
|
4391
4423
|
outline: 0,
|
|
4392
4424
|
...textSmallStyle,
|
|
4393
4425
|
...mergeDeep(buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
@@ -4410,6 +4442,9 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4410
4442
|
...(active && {
|
|
4411
4443
|
...frostedGlassStyle,
|
|
4412
4444
|
backgroundColor: hoverColor,
|
|
4445
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4446
|
+
backgroundColor: hoverColorDark,
|
|
4447
|
+
}),
|
|
4413
4448
|
}),
|
|
4414
4449
|
},
|
|
4415
4450
|
...(!isDisabledOrLoading &&
|
|
@@ -4417,11 +4452,17 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4417
4452
|
'&:hover::before': {
|
|
4418
4453
|
...frostedGlassStyle,
|
|
4419
4454
|
backgroundColor: hoverColor,
|
|
4455
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4456
|
+
backgroundColor: hoverColorDark,
|
|
4457
|
+
}),
|
|
4420
4458
|
},
|
|
4421
4459
|
})),
|
|
4422
4460
|
...(!hasSlottedAnchor && {
|
|
4423
4461
|
'&:focus::before': {
|
|
4424
4462
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
4463
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4464
|
+
borderColor: focusColorDark,
|
|
4465
|
+
}),
|
|
4425
4466
|
},
|
|
4426
4467
|
'&:not(:focus-visible)::before': {
|
|
4427
4468
|
border: 0,
|
|
@@ -4451,7 +4492,7 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4451
4492
|
};
|
|
4452
4493
|
};
|
|
4453
4494
|
|
|
4454
|
-
const getComponentCss$
|
|
4495
|
+
const getComponentCss$Z = (icon, iconSource, active, isLoading, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, theme) => {
|
|
4455
4496
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4456
4497
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, false, theme), {
|
|
4457
4498
|
root: {
|
|
@@ -4517,7 +4558,11 @@ const getTileBaseStyles = (aspectRatio, isDisabled) => {
|
|
|
4517
4558
|
'@global': {
|
|
4518
4559
|
':host': {
|
|
4519
4560
|
display: 'block',
|
|
4520
|
-
|
|
4561
|
+
hyphens: 'auto',
|
|
4562
|
+
...addImportantToEachRule({
|
|
4563
|
+
...colorSchemeStyles,
|
|
4564
|
+
...hostHiddenStyles,
|
|
4565
|
+
}),
|
|
4521
4566
|
},
|
|
4522
4567
|
...addImportantToEachRule({
|
|
4523
4568
|
'::slotted': {
|
|
@@ -4582,6 +4627,7 @@ background, align, compact, hasGradient, isDisabled) => {
|
|
|
4582
4627
|
maxWidth: pxToRemWithUnit(550),
|
|
4583
4628
|
margin: 0,
|
|
4584
4629
|
...textLargeStyle,
|
|
4630
|
+
hyphens: 'inherit',
|
|
4585
4631
|
...mergeDeep(buildResponsiveStyles(size, (s) => sizeMap$5[s]), buildResponsiveStyles(weight, (w) => ({
|
|
4586
4632
|
fontWeight: getFontWeight(w === 'semibold' ? 'semi-bold' : w), // mapping of the deprecated weight semibold
|
|
4587
4633
|
}))),
|
|
@@ -4622,7 +4668,7 @@ background, align, compact, hasGradient, isDisabled) => {
|
|
|
4622
4668
|
});
|
|
4623
4669
|
};
|
|
4624
4670
|
|
|
4625
|
-
const getComponentCss$
|
|
4671
|
+
const getComponentCss$Y = (isDisabledOrLoading, ...args) => {
|
|
4626
4672
|
const buttonLinkTileStyles = getButtonLinkTileStyles(...args);
|
|
4627
4673
|
return getCss({
|
|
4628
4674
|
...buttonLinkTileStyles,
|
|
@@ -4659,6 +4705,7 @@ const getVariantColors = (variant, theme) => {
|
|
|
4659
4705
|
const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrLoading, hasSlottedAnchor, theme) => {
|
|
4660
4706
|
const isPrimary = variant === 'primary';
|
|
4661
4707
|
const { textColor, borderColor, borderColorHover, backgroundColor, backgroundColorHover } = getVariantColors(variant, theme);
|
|
4708
|
+
const { textColor: textColorDark, borderColor: borderColorDark, borderColorHover: borderColorHoverDark, backgroundColor: backgroundColorDark, backgroundColorHover: backgroundColorHoverDark, } = getVariantColors(variant, 'dark');
|
|
4662
4709
|
const { focusColor } = getThemedColors(theme);
|
|
4663
4710
|
const hasIcon = hasVisibleIcon(icon, iconSource) || hideLabel;
|
|
4664
4711
|
return {
|
|
@@ -4668,6 +4715,7 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4668
4715
|
...addImportantToEachRule({
|
|
4669
4716
|
verticalAlign: 'top',
|
|
4670
4717
|
outline: 0,
|
|
4718
|
+
...colorSchemeStyles,
|
|
4671
4719
|
...hostHiddenStyles,
|
|
4672
4720
|
}),
|
|
4673
4721
|
},
|
|
@@ -4713,8 +4761,17 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4713
4761
|
backgroundColor: backgroundColorHover,
|
|
4714
4762
|
borderColor: isHighContrastMode ? focusColor : borderColorHover,
|
|
4715
4763
|
...(!isPrimary && frostedGlassStyle),
|
|
4764
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4765
|
+
backgroundColor: backgroundColorHoverDark,
|
|
4766
|
+
borderColor: borderColorHoverDark,
|
|
4767
|
+
}),
|
|
4716
4768
|
},
|
|
4717
4769
|
})),
|
|
4770
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4771
|
+
borderColor: borderColorDark,
|
|
4772
|
+
backgroundColor: backgroundColorDark,
|
|
4773
|
+
color: textColorDark,
|
|
4774
|
+
}),
|
|
4718
4775
|
},
|
|
4719
4776
|
label: buildResponsiveStyles(hideLabel, getHiddenTextJssStyle),
|
|
4720
4777
|
...(hasIcon && {
|
|
@@ -4743,9 +4800,10 @@ const getDisabledColors = (variant, loading, theme) => {
|
|
|
4743
4800
|
};
|
|
4744
4801
|
return colors[variant === 'tertiary' ? 'secondary' : variant];
|
|
4745
4802
|
};
|
|
4746
|
-
const getComponentCss$
|
|
4803
|
+
const getComponentCss$X = (icon, iconSource, variant, hideLabel, disabled, loading, theme) => {
|
|
4747
4804
|
const disabledOrLoading = isDisabledOrLoading(disabled, loading);
|
|
4748
4805
|
const { textColor, borderColor, backgroundColor } = getDisabledColors(variant, loading, theme);
|
|
4806
|
+
const { textColor: textColorDark, borderColor: borderColorDark, backgroundColor: backgroundColorDark, } = getDisabledColors(variant, loading, 'dark');
|
|
4749
4807
|
const isPrimary = variant === 'primary';
|
|
4750
4808
|
return getCss(mergeDeep(getLinkButtonStyles(icon, iconSource, variant, hideLabel, disabledOrLoading, false, theme), {
|
|
4751
4809
|
root: {
|
|
@@ -4754,6 +4812,11 @@ const getComponentCss$W = (icon, iconSource, variant, hideLabel, disabled, loadi
|
|
|
4754
4812
|
backgroundColor,
|
|
4755
4813
|
borderColor,
|
|
4756
4814
|
color: textColor,
|
|
4815
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4816
|
+
backgroundColor: backgroundColorDark,
|
|
4817
|
+
borderColor: borderColorDark,
|
|
4818
|
+
color: textColorDark,
|
|
4819
|
+
}),
|
|
4757
4820
|
}),
|
|
4758
4821
|
...(loading && !isPrimary && frostedGlassStyle),
|
|
4759
4822
|
},
|
|
@@ -4766,6 +4829,7 @@ const getComponentCss$W = (icon, iconSource, variant, hideLabel, disabled, loadi
|
|
|
4766
4829
|
top: '50%',
|
|
4767
4830
|
left: '50%',
|
|
4768
4831
|
transform: 'translate(-50%, -50%)',
|
|
4832
|
+
...(isPrimary && !isHighContrastMode && { filter: 'invert(1)' }),
|
|
4769
4833
|
},
|
|
4770
4834
|
}),
|
|
4771
4835
|
label: {
|
|
@@ -4776,6 +4840,11 @@ const getComponentCss$W = (icon, iconSource, variant, hideLabel, disabled, loadi
|
|
|
4776
4840
|
},
|
|
4777
4841
|
icon: {
|
|
4778
4842
|
transition: getTransition('opacity'),
|
|
4843
|
+
...(!disabled &&
|
|
4844
|
+
isPrimary &&
|
|
4845
|
+
!isHighContrastMode && {
|
|
4846
|
+
filter: 'invert(1)',
|
|
4847
|
+
}),
|
|
4779
4848
|
...(loading && {
|
|
4780
4849
|
opacity: 0, // use opacity for smooth transition between states
|
|
4781
4850
|
}),
|
|
@@ -4802,8 +4871,9 @@ const spacingMap = {
|
|
|
4802
4871
|
basic: gridBasicOffset,
|
|
4803
4872
|
extended: gridExtendedOffset,
|
|
4804
4873
|
};
|
|
4805
|
-
const getComponentCss$
|
|
4874
|
+
const getComponentCss$W = (width, hasPagination, isInfinitePagination, alignHeader, theme) => {
|
|
4806
4875
|
const { primaryColor, contrastMediumColor, focusColor } = getThemedColors(theme);
|
|
4876
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
4807
4877
|
const { canvasTextColor } = getHighContrastColors();
|
|
4808
4878
|
const isHeaderAlignCenter = alignHeader === 'center';
|
|
4809
4879
|
return getCss({
|
|
@@ -4813,6 +4883,7 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4813
4883
|
gap: spacingFluidMedium,
|
|
4814
4884
|
flexDirection: 'column',
|
|
4815
4885
|
boxSizing: 'content-box',
|
|
4886
|
+
...colorSchemeStyles,
|
|
4816
4887
|
...hostHiddenStyles,
|
|
4817
4888
|
}),
|
|
4818
4889
|
'::slotted(*)': {
|
|
@@ -4820,6 +4891,9 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4820
4891
|
},
|
|
4821
4892
|
'::slotted(*:focus-visible)': addImportantToEachRule({
|
|
4822
4893
|
outline: `${borderWidthBase} solid ${focusColor}`,
|
|
4894
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4895
|
+
outlineColor: focusColorDark,
|
|
4896
|
+
}),
|
|
4823
4897
|
outlineOffset: '2px',
|
|
4824
4898
|
}),
|
|
4825
4899
|
[selectorHeading]: addImportantToEachRule({
|
|
@@ -4834,6 +4908,9 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4834
4908
|
}),
|
|
4835
4909
|
[`${selectorHeading},${selectorDescription}`]: addImportantToEachRule({
|
|
4836
4910
|
color: primaryColor,
|
|
4911
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4912
|
+
color: primaryColorDark,
|
|
4913
|
+
}),
|
|
4837
4914
|
[mediaQueryS]: isHeaderAlignCenter
|
|
4838
4915
|
? {
|
|
4839
4916
|
gridColumn: 2,
|
|
@@ -4890,7 +4967,6 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4890
4967
|
padding: '4px 0',
|
|
4891
4968
|
margin: '-4px 0',
|
|
4892
4969
|
'&__track': {
|
|
4893
|
-
cursor: 'grab',
|
|
4894
4970
|
// !important is necessary to override inline styles set by splide library
|
|
4895
4971
|
...addImportantToEachRule({
|
|
4896
4972
|
padding: `0 ${spacingMap[width].base}`,
|
|
@@ -4905,6 +4981,7 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4905
4981
|
},
|
|
4906
4982
|
}),
|
|
4907
4983
|
'&--draggable': {
|
|
4984
|
+
cursor: 'grab',
|
|
4908
4985
|
userSelect: 'none',
|
|
4909
4986
|
WebkitUserSelect: 'none',
|
|
4910
4987
|
WebkitTouchCallout: 'none',
|
|
@@ -4922,7 +4999,7 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4922
4999
|
'&__sr': getHiddenTextJssStyle(), // appears in the DOM when sliding
|
|
4923
5000
|
},
|
|
4924
5001
|
...(hasPagination && {
|
|
4925
|
-
|
|
5002
|
+
'pagination-container': {
|
|
4926
5003
|
...buildResponsiveStyles(hasPagination, (hasPaginationValue) => ({
|
|
4927
5004
|
display: hasPaginationValue ? 'flex' : 'none',
|
|
4928
5005
|
})),
|
|
@@ -4942,7 +5019,16 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4942
5019
|
},
|
|
4943
5020
|
bullet: {
|
|
4944
5021
|
borderRadius: borderRadiusSmall,
|
|
4945
|
-
|
|
5022
|
+
...(isHighContrastMode
|
|
5023
|
+
? {
|
|
5024
|
+
background: canvasTextColor,
|
|
5025
|
+
}
|
|
5026
|
+
: {
|
|
5027
|
+
background: contrastMediumColor,
|
|
5028
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5029
|
+
background: contrastMediumColorDark,
|
|
5030
|
+
}),
|
|
5031
|
+
}),
|
|
4946
5032
|
...(isInfinitePagination
|
|
4947
5033
|
? {
|
|
4948
5034
|
width: '0px',
|
|
@@ -4956,13 +5042,13 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4956
5042
|
}),
|
|
4957
5043
|
},
|
|
4958
5044
|
...(isInfinitePagination && {
|
|
4959
|
-
[
|
|
4960
|
-
|
|
5045
|
+
[paginationInfiniteStartCaseClass]: {
|
|
5046
|
+
'& > .bullet:nth-child(-n+4)': {
|
|
4961
5047
|
width: paginationBulletSize,
|
|
4962
5048
|
height: paginationBulletSize,
|
|
4963
5049
|
},
|
|
4964
5050
|
},
|
|
4965
|
-
[
|
|
5051
|
+
[bulletInfiniteClass]: {
|
|
4966
5052
|
// Necessary to override the bulletActiveClass sibling selector
|
|
4967
5053
|
...addImportantToEachRule({
|
|
4968
5054
|
width: paginationInfiniteBulletSize,
|
|
@@ -4978,8 +5064,17 @@ const getComponentCss$V = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
4978
5064
|
},
|
|
4979
5065
|
},
|
|
4980
5066
|
}),
|
|
4981
|
-
[
|
|
4982
|
-
|
|
5067
|
+
[bulletActiveClass]: {
|
|
5068
|
+
...(isHighContrastMode
|
|
5069
|
+
? {
|
|
5070
|
+
background: canvasTextColor,
|
|
5071
|
+
}
|
|
5072
|
+
: {
|
|
5073
|
+
background: primaryColor,
|
|
5074
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5075
|
+
background: primaryColorDark,
|
|
5076
|
+
}),
|
|
5077
|
+
}),
|
|
4983
5078
|
height: paginationBulletSize,
|
|
4984
5079
|
width: addImportantToRule(paginationActiveBulletSize),
|
|
4985
5080
|
...(isInfinitePagination && {
|
|
@@ -5013,6 +5108,9 @@ const getFunctionalComponentStateMessageStyles = (theme, state) => {
|
|
|
5013
5108
|
marginTop: spacingStaticXSmall,
|
|
5014
5109
|
...textSmallStyle,
|
|
5015
5110
|
color: getThemedFormStateColors(theme, state).formStateColor,
|
|
5111
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5112
|
+
color: getThemedFormStateColors('dark', state).formStateColor,
|
|
5113
|
+
}),
|
|
5016
5114
|
transition: getTransition('color'),
|
|
5017
5115
|
},
|
|
5018
5116
|
};
|
|
@@ -5020,20 +5118,32 @@ const getFunctionalComponentStateMessageStyles = (theme, state) => {
|
|
|
5020
5118
|
|
|
5021
5119
|
const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
5022
5120
|
const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
5121
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
5023
5122
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
5123
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
5024
5124
|
const { canvasTextColor } = getHighContrastColors();
|
|
5025
5125
|
const disabledOrLoading = isDisabledOrLoading(isDisabled, isLoading);
|
|
5126
|
+
// TODO: needs to be extracted into a color function
|
|
5026
5127
|
const uncheckedColor = disabledOrLoading ? disabledColor : formStateColor || contrastMediumColor;
|
|
5128
|
+
const uncheckedColorDark = disabledOrLoading ? disabledColorDark : formStateColorDark || contrastMediumColorDark;
|
|
5027
5129
|
const uncheckedHoverColor = formStateHoverColor || primaryColor;
|
|
5130
|
+
const uncheckedHoverColorDark = formStateHoverColorDark || primaryColorDark;
|
|
5028
5131
|
const checkedColor = isHighContrastMode
|
|
5029
5132
|
? canvasTextColor
|
|
5030
5133
|
: disabledOrLoading
|
|
5031
5134
|
? disabledColor
|
|
5032
5135
|
: formStateColor || primaryColor;
|
|
5136
|
+
const checkedColorDark = isHighContrastMode
|
|
5137
|
+
? canvasTextColor
|
|
5138
|
+
: disabledOrLoading
|
|
5139
|
+
? disabledColorDark
|
|
5140
|
+
: formStateColorDark || primaryColorDark;
|
|
5033
5141
|
const checkedHoverColor = formStateHoverColor || contrastHighColor;
|
|
5142
|
+
const checkedHoverColorDark = formStateHoverColorDark || contrastHighColorDark;
|
|
5034
5143
|
return {
|
|
5035
5144
|
'@global': {
|
|
5036
5145
|
':host': addImportantToEachRule({
|
|
5146
|
+
...colorSchemeStyles,
|
|
5037
5147
|
...hostHiddenStyles,
|
|
5038
5148
|
display: 'block',
|
|
5039
5149
|
}),
|
|
@@ -5054,6 +5164,9 @@ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme
|
|
|
5054
5164
|
background: `transparent 0% 0% / ${fontLineHeight}`,
|
|
5055
5165
|
transition: ['border-color', 'background-color'].map(getTransition).join(),
|
|
5056
5166
|
border: `2px solid ${uncheckedColor}`,
|
|
5167
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5168
|
+
borderColor: uncheckedColorDark,
|
|
5169
|
+
}),
|
|
5057
5170
|
outline: 0,
|
|
5058
5171
|
cursor: disabledOrLoading ? 'not-allowed' : 'pointer',
|
|
5059
5172
|
},
|
|
@@ -5061,16 +5174,27 @@ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme
|
|
|
5061
5174
|
// background-image is merged in later
|
|
5062
5175
|
borderColor: checkedColor,
|
|
5063
5176
|
backgroundColor: checkedColor,
|
|
5177
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5178
|
+
borderColor: checkedColorDark,
|
|
5179
|
+
backgroundColor: checkedColorDark,
|
|
5180
|
+
}),
|
|
5064
5181
|
},
|
|
5065
5182
|
...(!disabledOrLoading && {
|
|
5066
5183
|
...(!isHighContrastMode &&
|
|
5067
5184
|
hoverMediaQuery({
|
|
5068
5185
|
'&(input:hover), .text:hover ~ &(input)': {
|
|
5069
5186
|
borderColor: uncheckedHoverColor,
|
|
5187
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5188
|
+
borderColor: uncheckedHoverColorDark,
|
|
5189
|
+
}),
|
|
5070
5190
|
},
|
|
5071
5191
|
'&(input:checked:hover), .text:hover ~ &(input:checked)': {
|
|
5072
5192
|
borderColor: checkedHoverColor,
|
|
5073
5193
|
backgroundColor: checkedHoverColor,
|
|
5194
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5195
|
+
borderColor: checkedHoverColorDark,
|
|
5196
|
+
backgroundColor: checkedHoverColorDark,
|
|
5197
|
+
}),
|
|
5074
5198
|
},
|
|
5075
5199
|
})),
|
|
5076
5200
|
...(!isDisabled && {
|
|
@@ -5079,6 +5203,9 @@ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme
|
|
|
5079
5203
|
position: 'absolute',
|
|
5080
5204
|
...getInsetJssStyle(-6),
|
|
5081
5205
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
5206
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5207
|
+
borderColor: focusColorDark,
|
|
5208
|
+
}),
|
|
5082
5209
|
},
|
|
5083
5210
|
'&(input:focus:not(:focus-visible))::before': {
|
|
5084
5211
|
borderColor: 'transparent',
|
|
@@ -5097,11 +5224,28 @@ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme
|
|
|
5097
5224
|
cursor: disabledOrLoading ? 'default' : 'pointer',
|
|
5098
5225
|
...textSmallStyle,
|
|
5099
5226
|
color: disabledOrLoading ? disabledColor : primaryColor,
|
|
5227
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5228
|
+
color: disabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
5229
|
+
}),
|
|
5100
5230
|
transition: getTransition('color'),
|
|
5101
5231
|
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, { padding: `2px 0 0 ${spacingStaticSmall}` })),
|
|
5102
5232
|
},
|
|
5103
5233
|
...getFunctionalComponentRequiredStyles(),
|
|
5104
5234
|
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
5235
|
+
...(isLoading && {
|
|
5236
|
+
spinner: {
|
|
5237
|
+
position: 'absolute',
|
|
5238
|
+
top: `calc(${fontLineHeight}/2 + 2px)`,
|
|
5239
|
+
left: `calc(${fontLineHeight}/2 + 2px)`,
|
|
5240
|
+
transform: 'translate(-50%, -50%)',
|
|
5241
|
+
height: fontLineHeight,
|
|
5242
|
+
width: fontLineHeight,
|
|
5243
|
+
padding: '2px',
|
|
5244
|
+
fontFamily,
|
|
5245
|
+
fontSize: '1rem',
|
|
5246
|
+
cursor: 'not-allowed',
|
|
5247
|
+
},
|
|
5248
|
+
}),
|
|
5105
5249
|
};
|
|
5106
5250
|
};
|
|
5107
5251
|
|
|
@@ -5109,14 +5253,30 @@ const getInlineSVGBackgroundImage = (path) => {
|
|
|
5109
5253
|
return `url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${path}</svg>')`;
|
|
5110
5254
|
};
|
|
5111
5255
|
|
|
5112
|
-
const
|
|
5256
|
+
const escapeHashCharacter = (colorString) => {
|
|
5257
|
+
return colorString.replace('#', '%23');
|
|
5258
|
+
};
|
|
5259
|
+
|
|
5260
|
+
const getCheckedSVGBackgroundImage$1 = (fill) => {
|
|
5261
|
+
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"/>`);
|
|
5262
|
+
};
|
|
5263
|
+
const getIndeterminateSVGBackgroundImage = (fill) => {
|
|
5264
|
+
return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20,11v2H4v-2h16Z"/>`);
|
|
5265
|
+
};
|
|
5266
|
+
const getComponentCss$V = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
5113
5267
|
const { canvasColor } = getHighContrastColors();
|
|
5114
5268
|
const checkedIconColor = isHighContrastMode
|
|
5115
5269
|
? canvasColor
|
|
5116
|
-
: getInvertedThemedColors(theme).primaryColor
|
|
5270
|
+
: escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
|
|
5271
|
+
const checkedIconColorDark = isHighContrastMode
|
|
5272
|
+
? canvasColor
|
|
5273
|
+
: escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
5117
5274
|
const indeterminateIconColor = isHighContrastMode
|
|
5118
5275
|
? canvasColor
|
|
5119
|
-
: getThemedColors(theme).primaryColor
|
|
5276
|
+
: escapeHashCharacter(getThemedColors(theme).primaryColor);
|
|
5277
|
+
const indeterminateIconColorDark = isHighContrastMode
|
|
5278
|
+
? canvasColor
|
|
5279
|
+
: escapeHashCharacter(getThemedColors('dark').primaryColor);
|
|
5120
5280
|
return getCss(mergeDeep(getCheckboxRadioJssStyle(hideLabel, state, isDisabled, isLoading, theme), {
|
|
5121
5281
|
'@global': {
|
|
5122
5282
|
'::slotted': addImportantToEachRule({
|
|
@@ -5125,11 +5285,17 @@ const getComponentCss$U = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5125
5285
|
},
|
|
5126
5286
|
...(!isLoading && {
|
|
5127
5287
|
'&(input:checked)': {
|
|
5128
|
-
backgroundImage:
|
|
5288
|
+
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColor),
|
|
5289
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5290
|
+
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColorDark),
|
|
5291
|
+
}),
|
|
5129
5292
|
},
|
|
5130
5293
|
}),
|
|
5131
5294
|
'&(input:indeterminate)': {
|
|
5132
|
-
backgroundImage:
|
|
5295
|
+
backgroundImage: getIndeterminateSVGBackgroundImage(indeterminateIconColor),
|
|
5296
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5297
|
+
backgroundImage: getIndeterminateSVGBackgroundImage(indeterminateIconColorDark),
|
|
5298
|
+
}),
|
|
5133
5299
|
},
|
|
5134
5300
|
...(!isDisabled && {
|
|
5135
5301
|
'&(input:focus)::before': {
|
|
@@ -5138,19 +5304,6 @@ const getComponentCss$U = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5138
5304
|
}),
|
|
5139
5305
|
}),
|
|
5140
5306
|
},
|
|
5141
|
-
...(isLoading && {
|
|
5142
|
-
spinner: {
|
|
5143
|
-
position: 'absolute',
|
|
5144
|
-
top: `calc(${fontLineHeight}/2 + 2px)`,
|
|
5145
|
-
left: `calc(${fontLineHeight}/2 + 2px)`,
|
|
5146
|
-
transform: 'translate(-50%, -50%)',
|
|
5147
|
-
height: fontLineHeight,
|
|
5148
|
-
width: fontLineHeight,
|
|
5149
|
-
fontFamily,
|
|
5150
|
-
fontSize: '1rem',
|
|
5151
|
-
cursor: 'not-allowed',
|
|
5152
|
-
},
|
|
5153
|
-
}),
|
|
5154
5307
|
}));
|
|
5155
5308
|
};
|
|
5156
5309
|
|
|
@@ -5159,12 +5312,15 @@ const widthMap = {
|
|
|
5159
5312
|
basic: gridBasicOffset,
|
|
5160
5313
|
extended: gridExtendedOffset,
|
|
5161
5314
|
};
|
|
5162
|
-
const getComponentCss$
|
|
5315
|
+
const getComponentCss$U = (width) => {
|
|
5163
5316
|
return getCss({
|
|
5164
5317
|
'@global': {
|
|
5165
5318
|
':host': {
|
|
5166
5319
|
display: 'block',
|
|
5167
|
-
...addImportantToEachRule(
|
|
5320
|
+
...addImportantToEachRule({
|
|
5321
|
+
...colorSchemeStyles,
|
|
5322
|
+
...hostHiddenStyles,
|
|
5323
|
+
}),
|
|
5168
5324
|
},
|
|
5169
5325
|
},
|
|
5170
5326
|
root: {
|
|
@@ -5198,7 +5354,7 @@ const getDimensionStyle = {
|
|
|
5198
5354
|
width: 'inherit',
|
|
5199
5355
|
height: 'inherit',
|
|
5200
5356
|
};
|
|
5201
|
-
const getComponentCss$
|
|
5357
|
+
const getComponentCss$T = () => {
|
|
5202
5358
|
return getCss({
|
|
5203
5359
|
'@global': {
|
|
5204
5360
|
':host': {
|
|
@@ -5209,6 +5365,7 @@ const getComponentCss$S = () => {
|
|
|
5209
5365
|
outline: 0,
|
|
5210
5366
|
boxSizing: 'content-box',
|
|
5211
5367
|
...getDimensionStyle,
|
|
5368
|
+
...colorSchemeStyles,
|
|
5212
5369
|
...hostHiddenStyles,
|
|
5213
5370
|
}),
|
|
5214
5371
|
},
|
|
@@ -5244,6 +5401,9 @@ ellipsis, theme) => {
|
|
|
5244
5401
|
padding: 0,
|
|
5245
5402
|
...baseTextStyle,
|
|
5246
5403
|
color: getThemedTypographyColor(theme, color),
|
|
5404
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5405
|
+
color: getThemedTypographyColor('dark', color),
|
|
5406
|
+
}),
|
|
5247
5407
|
textAlign: align,
|
|
5248
5408
|
letterSpacing: 'normal',
|
|
5249
5409
|
listStyleType: 'none',
|
|
@@ -5282,12 +5442,15 @@ const sizeMap$4 = {
|
|
|
5282
5442
|
medium: fontSizeDisplayMedium,
|
|
5283
5443
|
large: fontSizeDisplayLarge,
|
|
5284
5444
|
};
|
|
5285
|
-
const getComponentCss$
|
|
5445
|
+
const getComponentCss$S = (size, align, color, ellipsis, theme) => {
|
|
5286
5446
|
return getCss({
|
|
5287
5447
|
'@global': {
|
|
5288
5448
|
':host': {
|
|
5289
5449
|
display: 'block',
|
|
5290
|
-
...addImportantToEachRule(
|
|
5450
|
+
...addImportantToEachRule({
|
|
5451
|
+
...colorSchemeStyles,
|
|
5452
|
+
...hostHiddenStyles,
|
|
5453
|
+
}),
|
|
5291
5454
|
},
|
|
5292
5455
|
'::slotted': {
|
|
5293
5456
|
[DISPLAY_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -5299,36 +5462,55 @@ const getComponentCss$R = (size, align, color, ellipsis, theme) => {
|
|
|
5299
5462
|
});
|
|
5300
5463
|
};
|
|
5301
5464
|
|
|
5302
|
-
const getComponentCss$
|
|
5465
|
+
const getComponentCss$R = (color, orientation, theme) => {
|
|
5303
5466
|
const { contrastLowColor, contrastMediumColor, contrastHighColor } = getThemedColors(theme);
|
|
5467
|
+
const { contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, } = getThemedColors('dark');
|
|
5304
5468
|
const colorMap = {
|
|
5305
5469
|
'contrast-low': contrastLowColor,
|
|
5306
5470
|
'contrast-medium': contrastMediumColor,
|
|
5307
5471
|
'contrast-high': contrastHighColor,
|
|
5308
5472
|
};
|
|
5473
|
+
const colorMapDark = {
|
|
5474
|
+
'contrast-low': contrastLowColorDark,
|
|
5475
|
+
'contrast-medium': contrastMediumColorDark,
|
|
5476
|
+
'contrast-high': contrastHighColorDark,
|
|
5477
|
+
};
|
|
5309
5478
|
return getCss({
|
|
5310
5479
|
'@global': {
|
|
5311
5480
|
':host': {
|
|
5312
5481
|
display: 'block',
|
|
5313
|
-
...addImportantToEachRule(
|
|
5482
|
+
...addImportantToEachRule({
|
|
5483
|
+
...colorSchemeStyles,
|
|
5484
|
+
...hostHiddenStyles,
|
|
5485
|
+
}),
|
|
5314
5486
|
},
|
|
5315
5487
|
hr: {
|
|
5316
5488
|
margin: 0,
|
|
5317
5489
|
padding: 0,
|
|
5318
5490
|
border: 'none',
|
|
5319
5491
|
textAlign: 'left',
|
|
5320
|
-
|
|
5492
|
+
...(isHighContrastMode
|
|
5493
|
+
? {
|
|
5494
|
+
background: getHighContrastColors().canvasTextColor,
|
|
5495
|
+
}
|
|
5496
|
+
: {
|
|
5497
|
+
background: colorMap[color],
|
|
5498
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5499
|
+
background: colorMapDark[color],
|
|
5500
|
+
}),
|
|
5501
|
+
}),
|
|
5321
5502
|
...buildResponsiveStyles(orientation, (o) => o === 'horizontal' ? { height: '1px', width: '100%' } : { height: '100%', width: '1px' }),
|
|
5322
5503
|
},
|
|
5323
5504
|
},
|
|
5324
5505
|
});
|
|
5325
5506
|
};
|
|
5326
5507
|
|
|
5327
|
-
const getComponentCss$
|
|
5508
|
+
const getComponentCss$Q = (state, labelSize, hasLabel, theme) => {
|
|
5328
5509
|
return getCss({
|
|
5329
5510
|
'@global': {
|
|
5330
5511
|
':host': addImportantToEachRule({
|
|
5331
5512
|
display: 'block',
|
|
5513
|
+
...colorSchemeStyles,
|
|
5332
5514
|
...hostHiddenStyles,
|
|
5333
5515
|
}),
|
|
5334
5516
|
fieldset: {
|
|
@@ -5342,6 +5524,9 @@ const getComponentCss$P = (state, labelSize, hasLabel, theme) => {
|
|
|
5342
5524
|
padding: 0,
|
|
5343
5525
|
color: getThemedColors(theme).primaryColor,
|
|
5344
5526
|
...(labelSize === 'small' ? headingSmallStyle : headingMediumStyle),
|
|
5527
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5528
|
+
color: getThemedColors('dark').primaryColor,
|
|
5529
|
+
}),
|
|
5345
5530
|
},
|
|
5346
5531
|
}),
|
|
5347
5532
|
},
|
|
@@ -5354,11 +5539,12 @@ const getComponentCss$P = (state, labelSize, hasLabel, theme) => {
|
|
|
5354
5539
|
});
|
|
5355
5540
|
};
|
|
5356
5541
|
|
|
5357
|
-
const getComponentCss$
|
|
5542
|
+
const getComponentCss$P = (state, labelSize, hasLabel, theme) => {
|
|
5358
5543
|
return getCss({
|
|
5359
5544
|
'@global': {
|
|
5360
5545
|
':host': addImportantToEachRule({
|
|
5361
5546
|
display: 'block',
|
|
5547
|
+
...colorSchemeStyles,
|
|
5362
5548
|
...hostHiddenStyles,
|
|
5363
5549
|
}),
|
|
5364
5550
|
fieldset: {
|
|
@@ -5371,6 +5557,9 @@ const getComponentCss$O = (state, labelSize, hasLabel, theme) => {
|
|
|
5371
5557
|
margin: `0 0 ${spacingStaticMedium}`,
|
|
5372
5558
|
padding: 0,
|
|
5373
5559
|
color: getThemedColors(theme).primaryColor,
|
|
5560
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5561
|
+
color: getThemedColors('dark').primaryColor,
|
|
5562
|
+
}),
|
|
5374
5563
|
...(labelSize === 'small' ? headingSmallStyle : headingMediumStyle),
|
|
5375
5564
|
},
|
|
5376
5565
|
}),
|
|
@@ -5394,7 +5583,7 @@ const flexItemWidths = {
|
|
|
5394
5583
|
full: 100,
|
|
5395
5584
|
auto: 'auto',
|
|
5396
5585
|
};
|
|
5397
|
-
const getComponentCss$
|
|
5586
|
+
const getComponentCss$O = (width, offset, alignSelf, grow, shrink, flex) => {
|
|
5398
5587
|
return getCss({
|
|
5399
5588
|
'@global': {
|
|
5400
5589
|
':host': addImportantToEachRule({
|
|
@@ -5416,10 +5605,10 @@ const getComponentCss$N = (width, offset, alignSelf, grow, shrink, flex) => {
|
|
|
5416
5605
|
});
|
|
5417
5606
|
};
|
|
5418
5607
|
|
|
5419
|
-
const getComponentCss$
|
|
5608
|
+
const getComponentCss$N = (inline, wrap, direction, justifyContent, alignItems, alignContent) => {
|
|
5420
5609
|
return getCss({
|
|
5421
5610
|
'@global': {
|
|
5422
|
-
':host': addImportantToEachRule(mergeDeep(hostHiddenStyles, buildResponsiveStyles(inline, (inlineResponsive) => ({
|
|
5611
|
+
':host': addImportantToEachRule(mergeDeep(colorSchemeStyles, hostHiddenStyles, buildResponsiveStyles(inline, (inlineResponsive) => ({
|
|
5423
5612
|
display: inlineResponsive ? 'inline-flex' : 'flex',
|
|
5424
5613
|
})), buildResponsiveStyles(wrap, (flexWrapResponsive) => ({ flexWrap: flexWrapResponsive })), buildResponsiveStyles(direction, (flexDirectionResponsive) => ({
|
|
5425
5614
|
flexDirection: flexDirectionResponsive,
|
|
@@ -5441,14 +5630,16 @@ const flyoutTransitionTimingFunction = 'cubic-bezier(0.77, 0, 0.175, 1)';
|
|
|
5441
5630
|
const cssVariableMaxWidth = '--p-flyout-max-width';
|
|
5442
5631
|
const maxWidthDefault = '1180px';
|
|
5443
5632
|
const minWidthDefault = '320px';
|
|
5444
|
-
const getComponentCss$
|
|
5633
|
+
const getComponentCss$M = (isOpen, position, hasHeader, hasFooter, hasSubFooter, theme) => {
|
|
5445
5634
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
5635
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
5446
5636
|
const { contrastHighColor: darkThemeContrastHighColor } = getThemedColors('dark');
|
|
5447
5637
|
const isPositionLeft = position === 'left';
|
|
5448
5638
|
const contentPadding = `${spacingStaticMedium} ${spacingFluidLarge} ${spacingStaticMedium} ${spacingFluidLarge}`;
|
|
5449
5639
|
const isDark = isThemeDark(theme);
|
|
5450
5640
|
const shadowColor = isDark ? scrollShadowColorDark : scrollShadowColor;
|
|
5451
|
-
const
|
|
5641
|
+
const transparentColorDark = 'rgba(14, 14, 18, 0)';
|
|
5642
|
+
const transparentColor = isDark ? transparentColorDark : 'rgba(255, 255, 255, 0)';
|
|
5452
5643
|
return getCss({
|
|
5453
5644
|
'@global': addImportantToEachRule({
|
|
5454
5645
|
':host': {
|
|
@@ -5465,6 +5656,7 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5465
5656
|
}),
|
|
5466
5657
|
...getInsetJssStyle(),
|
|
5467
5658
|
...getFrostedGlassBackgroundJssStyles(isOpen, flyoutTransitionDuration),
|
|
5659
|
+
...colorSchemeStyles,
|
|
5468
5660
|
...hostHiddenStyles,
|
|
5469
5661
|
},
|
|
5470
5662
|
}),
|
|
@@ -5475,12 +5667,18 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5475
5667
|
}),
|
|
5476
5668
|
justifyContent: 'flex-end',
|
|
5477
5669
|
background: backgroundColor,
|
|
5670
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5671
|
+
background: backgroundColorDark,
|
|
5672
|
+
}),
|
|
5478
5673
|
position: 'sticky',
|
|
5479
5674
|
top: 0,
|
|
5480
5675
|
zIndex: 1,
|
|
5481
5676
|
},
|
|
5482
5677
|
[headerShadowClass]: {
|
|
5483
5678
|
boxShadow: `${isDark ? scrollShadowColorDark : scrollShadowColor} 0px 5px 10px`,
|
|
5679
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5680
|
+
boxShadow: `${scrollShadowColorDark} 0px 5px 10px`,
|
|
5681
|
+
}),
|
|
5484
5682
|
},
|
|
5485
5683
|
...(hasHeader && {
|
|
5486
5684
|
'header-content': {
|
|
@@ -5494,6 +5692,10 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5494
5692
|
border: `2px solid ${backgroundColor}`,
|
|
5495
5693
|
borderRadius: '4px',
|
|
5496
5694
|
background: backgroundColor,
|
|
5695
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5696
|
+
borderColor: backgroundColorDark,
|
|
5697
|
+
background: backgroundColorDark,
|
|
5698
|
+
}),
|
|
5497
5699
|
...hoverMediaQuery({
|
|
5498
5700
|
'&:hover': {
|
|
5499
5701
|
background: darkThemeContrastHighColor,
|
|
@@ -5520,6 +5722,10 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5520
5722
|
transform: isOpen ? 'initial' : `translate3d(${isPositionLeft ? '-100%' : '100%'}, 0, 0)`,
|
|
5521
5723
|
transition: `opacity ${flyoutTransitionDuration} ${flyoutTransitionTimingFunction} ${isOpen ? '0s' : flyoutTransitionDuration}, transform ${flyoutTransitionDuration} ${flyoutTransitionTimingFunction}`,
|
|
5522
5724
|
boxShadow: `${isPositionLeft ? '3px' : '-3px'} 0px 30px rgba(0, 0, 0, 0.25)`,
|
|
5725
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5726
|
+
color: primaryColorDark,
|
|
5727
|
+
background: backgroundColorDark,
|
|
5728
|
+
}),
|
|
5523
5729
|
},
|
|
5524
5730
|
content: {
|
|
5525
5731
|
padding: contentPadding,
|
|
@@ -5535,6 +5741,9 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5535
5741
|
backgroundSize: '100% 20px, 100% 20px, 100% 10px, 100% 10px',
|
|
5536
5742
|
backgroundAttachment: 'local, local, scroll, scroll',
|
|
5537
5743
|
overscrollBehaviorY: 'none',
|
|
5744
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5745
|
+
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})`,
|
|
5746
|
+
}),
|
|
5538
5747
|
}),
|
|
5539
5748
|
},
|
|
5540
5749
|
...(hasFooter && {
|
|
@@ -5544,9 +5753,15 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5544
5753
|
position: 'sticky',
|
|
5545
5754
|
zIndex: 1,
|
|
5546
5755
|
bottom: 0,
|
|
5756
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5757
|
+
background: backgroundColorDark,
|
|
5758
|
+
}),
|
|
5547
5759
|
},
|
|
5548
5760
|
[footerShadowClass$1]: {
|
|
5549
5761
|
boxShadow: `${isDark ? scrollShadowColorDark : scrollShadowColor} 0px -5px 10px`,
|
|
5762
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5763
|
+
boxShadow: `${scrollShadowColorDark} 0px -5px 10px`,
|
|
5764
|
+
}),
|
|
5550
5765
|
},
|
|
5551
5766
|
}),
|
|
5552
5767
|
...(hasSubFooter && {
|
|
@@ -5561,7 +5776,7 @@ const gutter$1 = `calc(${gridGap} / 2)`;
|
|
|
5561
5776
|
const gridItemWidths = [
|
|
5562
5777
|
0, 8.333333, 16.666667, 25, 33.333333, 41.666667, 50, 58.333333, 66.666667, 75, 83.333333, 91.666667, 100,
|
|
5563
5778
|
];
|
|
5564
|
-
const getComponentCss$
|
|
5779
|
+
const getComponentCss$L = (size, offset) => {
|
|
5565
5780
|
return getCss({
|
|
5566
5781
|
'@global': {
|
|
5567
5782
|
':host': addImportantToEachRule({
|
|
@@ -5581,7 +5796,7 @@ const getComponentCss$K = (size, offset) => {
|
|
|
5581
5796
|
};
|
|
5582
5797
|
|
|
5583
5798
|
const gutter = `calc(${gridGap} / -2)`;
|
|
5584
|
-
const getComponentCss$
|
|
5799
|
+
const getComponentCss$K = (direction, wrap) => {
|
|
5585
5800
|
return getCss({
|
|
5586
5801
|
'@global': {
|
|
5587
5802
|
':host': addImportantToEachRule({
|
|
@@ -5590,6 +5805,7 @@ const getComponentCss$J = (direction, wrap) => {
|
|
|
5590
5805
|
width: 'auto',
|
|
5591
5806
|
marginLeft: gutter,
|
|
5592
5807
|
marginRight: gutter,
|
|
5808
|
+
...colorSchemeStyles,
|
|
5593
5809
|
...hostHiddenStyles,
|
|
5594
5810
|
...mergeDeep(buildResponsiveStyles(direction, (flexDirection) => ({ flexDirection })), buildResponsiveStyles(wrap, (flexWrap) => ({ flexWrap }))),
|
|
5595
5811
|
}),
|
|
@@ -5604,12 +5820,15 @@ const sizeMap$3 = {
|
|
|
5604
5820
|
'x-large': fontSizeHeadingXLarge,
|
|
5605
5821
|
'xx-large': fontSizeHeadingXXLarge,
|
|
5606
5822
|
};
|
|
5607
|
-
const getComponentCss$
|
|
5823
|
+
const getComponentCss$J = (size, align, color, ellipsis, theme) => {
|
|
5608
5824
|
return getCss({
|
|
5609
5825
|
'@global': {
|
|
5610
5826
|
':host': {
|
|
5611
5827
|
display: 'block',
|
|
5612
|
-
...addImportantToEachRule(
|
|
5828
|
+
...addImportantToEachRule({
|
|
5829
|
+
...colorSchemeStyles,
|
|
5830
|
+
...hostHiddenStyles,
|
|
5831
|
+
}),
|
|
5613
5832
|
},
|
|
5614
5833
|
'::slotted': {
|
|
5615
5834
|
[HEADING_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -5663,12 +5882,15 @@ const getTextSizeJssStyle = (textSize) => {
|
|
|
5663
5882
|
fontSize: textSize === 'inherit' ? textSize : textSizeMap[textSize],
|
|
5664
5883
|
};
|
|
5665
5884
|
};
|
|
5666
|
-
const getComponentCss$
|
|
5885
|
+
const getComponentCss$I = (variant, align, color, ellipsis, theme) => {
|
|
5667
5886
|
return getCss({
|
|
5668
5887
|
'@global': {
|
|
5669
5888
|
':host': {
|
|
5670
5889
|
display: 'block',
|
|
5671
|
-
...addImportantToEachRule(
|
|
5890
|
+
...addImportantToEachRule({
|
|
5891
|
+
...colorSchemeStyles,
|
|
5892
|
+
...hostHiddenStyles,
|
|
5893
|
+
}),
|
|
5672
5894
|
},
|
|
5673
5895
|
'::slotted': {
|
|
5674
5896
|
[HEADLINE_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -5712,29 +5934,32 @@ const sizeMap$2 = {
|
|
|
5712
5934
|
large: fontSizeTextLarge,
|
|
5713
5935
|
'x-large': fontSizeTextXLarge,
|
|
5714
5936
|
};
|
|
5715
|
-
const
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5937
|
+
const filterLight = {
|
|
5938
|
+
primary: filterLightPrimary,
|
|
5939
|
+
'state-disabled': filterLightDisabled,
|
|
5940
|
+
'contrast-low': filterLightContrastLow,
|
|
5941
|
+
'contrast-medium': filterLightContrastMedium,
|
|
5942
|
+
'contrast-high': filterLightContrastHigh,
|
|
5943
|
+
'notification-success': filterLightNotificationSuccess,
|
|
5944
|
+
'notification-warning': filterLightNotificationWarning,
|
|
5945
|
+
'notification-error': filterLightNotificationError,
|
|
5946
|
+
'notification-info': filterLightNotificationInfo,
|
|
5947
|
+
};
|
|
5948
|
+
const filterDark = {
|
|
5949
|
+
primary: filterDarkPrimary,
|
|
5950
|
+
'state-disabled': filterDarkDisabled,
|
|
5951
|
+
'contrast-low': filterDarkContrastLow,
|
|
5952
|
+
'contrast-medium': filterDarkContrastMedium,
|
|
5953
|
+
'contrast-high': filterDarkContrastHigh,
|
|
5954
|
+
'notification-success': filterDarkNotificationSuccess,
|
|
5955
|
+
'notification-warning': filterDarkNotificationWarning,
|
|
5956
|
+
'notification-error': filterDarkNotificationError,
|
|
5957
|
+
'notification-info': filterDarkNotificationInfo,
|
|
5958
|
+
};
|
|
5959
|
+
const filterMap = {
|
|
5960
|
+
auto: filterLight,
|
|
5961
|
+
light: filterLight,
|
|
5962
|
+
dark: filterDark,
|
|
5738
5963
|
};
|
|
5739
5964
|
const forceRerenderAnimationStyle = {
|
|
5740
5965
|
'0%': {
|
|
@@ -5746,7 +5971,7 @@ const forceRerenderAnimationStyle = {
|
|
|
5746
5971
|
};
|
|
5747
5972
|
const keyFramesLight = 'rerender-light';
|
|
5748
5973
|
const keyFramesDark = 'rerender-dark';
|
|
5749
|
-
const getComponentCss$
|
|
5974
|
+
const getComponentCss$H = (color, size, theme) => {
|
|
5750
5975
|
const isColorInherit = color === 'inherit';
|
|
5751
5976
|
const isSizeInherit = size === 'inherit';
|
|
5752
5977
|
const isDark = isThemeDark(theme);
|
|
@@ -5755,7 +5980,10 @@ const getComponentCss$G = (color, size, theme) => {
|
|
|
5755
5980
|
':host': {
|
|
5756
5981
|
display: 'inline-block',
|
|
5757
5982
|
verticalAlign: 'top',
|
|
5758
|
-
...addImportantToEachRule(
|
|
5983
|
+
...addImportantToEachRule({
|
|
5984
|
+
...colorSchemeStyles,
|
|
5985
|
+
...hostHiddenStyles,
|
|
5986
|
+
}),
|
|
5759
5987
|
},
|
|
5760
5988
|
img: {
|
|
5761
5989
|
display: 'block',
|
|
@@ -5763,12 +5991,15 @@ const getComponentCss$G = (color, size, theme) => {
|
|
|
5763
5991
|
padding: 0,
|
|
5764
5992
|
pointerEvents: 'none',
|
|
5765
5993
|
...(!isColorInherit && {
|
|
5766
|
-
filter:
|
|
5994
|
+
filter: filterMap[theme][color],
|
|
5995
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5996
|
+
filter: filterMap.dark[color],
|
|
5997
|
+
}),
|
|
5767
5998
|
...(isHighContrastMode &&
|
|
5768
5999
|
getSchemedHighContrastMediaQuery({
|
|
5769
|
-
filter:
|
|
6000
|
+
filter: filterMap.light[color],
|
|
5770
6001
|
}, {
|
|
5771
|
-
filter:
|
|
6002
|
+
filter: filterMap.dark[color],
|
|
5772
6003
|
})),
|
|
5773
6004
|
WebkitAnimation: `${isDark ? `${keyFramesDark}-${color}` : `${keyFramesLight}-${color}`} 1ms`, // needed to enforce repaint in Safari if theme is switched programmatically.
|
|
5774
6005
|
}),
|
|
@@ -5812,6 +6043,9 @@ const getNotificationRootJssStyle = (state, hasAction, hasClose, theme) => {
|
|
|
5812
6043
|
placeItems: 'start',
|
|
5813
6044
|
padding: spacingStaticMedium,
|
|
5814
6045
|
background: getBackgroundColor(state, theme),
|
|
6046
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6047
|
+
background: getBackgroundColor(state, 'dark'),
|
|
6048
|
+
}),
|
|
5815
6049
|
borderRadius: borderRadiusSmall,
|
|
5816
6050
|
...(isHighContrastMode && {
|
|
5817
6051
|
outline: '1px solid transparent',
|
|
@@ -5837,11 +6071,12 @@ const getNotificationContentJssStyle = () => ({
|
|
|
5837
6071
|
});
|
|
5838
6072
|
|
|
5839
6073
|
const mediaQueryMaxS = getMediaQueryMax('s');
|
|
5840
|
-
const getComponentCss$
|
|
6074
|
+
const getComponentCss$G = (state, hasAction, hasClose, theme) => {
|
|
5841
6075
|
return getCss({
|
|
5842
6076
|
'@global': {
|
|
5843
6077
|
':host': addImportantToEachRule({
|
|
5844
6078
|
...getNotificationRootJssStyle(state, hasAction, hasClose, theme),
|
|
6079
|
+
...colorSchemeStyles,
|
|
5845
6080
|
...hostHiddenStyles,
|
|
5846
6081
|
}),
|
|
5847
6082
|
h5: headingSmallStyle,
|
|
@@ -5849,6 +6084,9 @@ const getComponentCss$F = (state, hasAction, hasClose, theme) => {
|
|
|
5849
6084
|
'h5,p': {
|
|
5850
6085
|
margin: 0,
|
|
5851
6086
|
color: getThemedColors(theme).primaryColor,
|
|
6087
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6088
|
+
color: getThemedColors('dark').primaryColor,
|
|
6089
|
+
}),
|
|
5852
6090
|
},
|
|
5853
6091
|
},
|
|
5854
6092
|
icon: getNotificationIconJssStyle(),
|
|
@@ -5863,8 +6101,9 @@ const getComponentCss$F = (state, hasAction, hasClose, theme) => {
|
|
|
5863
6101
|
});
|
|
5864
6102
|
};
|
|
5865
6103
|
|
|
5866
|
-
const getComponentCss$
|
|
6104
|
+
const getComponentCss$F = (icon, iconSource, active, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor, theme) => {
|
|
5867
6105
|
const { focusColor } = getThemedColors(theme);
|
|
6106
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
5868
6107
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme), {
|
|
5869
6108
|
root: {
|
|
5870
6109
|
textDecoration: underline ? 'underline' : 'none',
|
|
@@ -5894,6 +6133,9 @@ const getComponentCss$E = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
5894
6133
|
},
|
|
5895
6134
|
'&(a:focus)::before': {
|
|
5896
6135
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6136
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6137
|
+
borderColor: focusColorDark,
|
|
6138
|
+
}),
|
|
5897
6139
|
},
|
|
5898
6140
|
'&(a:focus:not(:focus-visible))::before': {
|
|
5899
6141
|
border: 0,
|
|
@@ -5903,10 +6145,19 @@ const getComponentCss$E = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
5903
6145
|
}));
|
|
5904
6146
|
};
|
|
5905
6147
|
|
|
5906
|
-
const getComponentCss$
|
|
6148
|
+
const getComponentCss$E = (icon, iconSource, variant, hideLabel, hasSlottedAnchor, theme) => {
|
|
5907
6149
|
const { focusColor } = getThemedColors(theme);
|
|
6150
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
5908
6151
|
const { linkColor } = getHighContrastColors();
|
|
5909
|
-
|
|
6152
|
+
const isPrimary = variant === 'primary';
|
|
6153
|
+
return getCss(mergeDeep(getLinkButtonStyles(icon, iconSource, variant, hideLabel, false, hasSlottedAnchor, theme), {
|
|
6154
|
+
icon: {
|
|
6155
|
+
...(isPrimary &&
|
|
6156
|
+
!isHighContrastMode && {
|
|
6157
|
+
filter: 'invert(1)',
|
|
6158
|
+
}),
|
|
6159
|
+
},
|
|
6160
|
+
}, hasSlottedAnchor && {
|
|
5910
6161
|
...(isHighContrastMode && {
|
|
5911
6162
|
root: {
|
|
5912
6163
|
borderColor: linkColor,
|
|
@@ -5935,6 +6186,9 @@ const getComponentCss$D = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
5935
6186
|
},
|
|
5936
6187
|
'&(a:focus)::before': {
|
|
5937
6188
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6189
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6190
|
+
borderColor: focusColorDark,
|
|
6191
|
+
}),
|
|
5938
6192
|
},
|
|
5939
6193
|
'&(a:focus:not(:focus-visible))::before': {
|
|
5940
6194
|
border: 0,
|
|
@@ -5948,7 +6202,7 @@ const getComponentCss$D = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
5948
6202
|
// because it is created via Object.keys(MODEL_SIGNATURES_MANIFEST) would bundle the entire manifest into both chunks
|
|
5949
6203
|
const LINK_TILE_MODEL_SIGNATURE_HEADING_TAGS = ['h2', 'h3', 'h4', 'h5', 'h6'];
|
|
5950
6204
|
|
|
5951
|
-
const getComponentCss$
|
|
6205
|
+
const getComponentCss$D = (aspectRatio, weight, direction, hasDescription) => {
|
|
5952
6206
|
const tileBaseStyles = getTileBaseStyles(aspectRatio);
|
|
5953
6207
|
return getCss({
|
|
5954
6208
|
...tileBaseStyles,
|
|
@@ -5973,12 +6227,14 @@ const getComponentCss$C = (aspectRatio, weight, direction, hasDescription) => {
|
|
|
5973
6227
|
heading: {
|
|
5974
6228
|
margin: 0,
|
|
5975
6229
|
...textLargeStyle,
|
|
6230
|
+
hyphens: 'inherit',
|
|
5976
6231
|
...buildResponsiveStyles(weight, (w) => ({ fontWeight: getFontWeight(w) })),
|
|
5977
6232
|
},
|
|
5978
6233
|
...(hasDescription && {
|
|
5979
6234
|
description: {
|
|
5980
6235
|
margin: '-12px 0 0 ',
|
|
5981
6236
|
...textSmallStyle,
|
|
6237
|
+
hyphens: 'inherit',
|
|
5982
6238
|
},
|
|
5983
6239
|
}),
|
|
5984
6240
|
'link-group': {
|
|
@@ -5995,7 +6251,7 @@ const getComponentCss$C = (aspectRatio, weight, direction, hasDescription) => {
|
|
|
5995
6251
|
});
|
|
5996
6252
|
};
|
|
5997
6253
|
|
|
5998
|
-
const getComponentCss$
|
|
6254
|
+
const getComponentCss$C = (...args) => {
|
|
5999
6255
|
return getCss({
|
|
6000
6256
|
...getButtonLinkTileStyles(...args),
|
|
6001
6257
|
'link-overlay': {
|
|
@@ -6016,7 +6272,7 @@ const baseSizes = {
|
|
|
6016
6272
|
height: '72px',
|
|
6017
6273
|
},
|
|
6018
6274
|
};
|
|
6019
|
-
const getComponentCss$
|
|
6275
|
+
const getComponentCss$B = (size) => {
|
|
6020
6276
|
return getCss({
|
|
6021
6277
|
'@global': {
|
|
6022
6278
|
':host': {
|
|
@@ -6025,6 +6281,7 @@ const getComponentCss$A = (size) => {
|
|
|
6025
6281
|
verticalAlign: 'top',
|
|
6026
6282
|
...addImportantToEachRule({
|
|
6027
6283
|
outline: 0,
|
|
6284
|
+
...colorSchemeStyles,
|
|
6028
6285
|
...hostHiddenStyles,
|
|
6029
6286
|
}),
|
|
6030
6287
|
},
|
|
@@ -6104,7 +6361,7 @@ const getSlottedJssStyle = (marginValue, hasHeader, hasDismissButton) => {
|
|
|
6104
6361
|
},
|
|
6105
6362
|
};
|
|
6106
6363
|
};
|
|
6107
|
-
const getComponentCss$
|
|
6364
|
+
const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, hasFooter) => {
|
|
6108
6365
|
const isFullscreenForXlAndXxl = isFullscreenForXl(isFullscreen);
|
|
6109
6366
|
const duration = isOpen ? '.6s' : '.2s';
|
|
6110
6367
|
const contentPadding = '32px';
|
|
@@ -6127,6 +6384,7 @@ const getComponentCss$z = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6127
6384
|
visibility: 'hidden',
|
|
6128
6385
|
transition: 'visibility 0s linear .2s',
|
|
6129
6386
|
}),
|
|
6387
|
+
...colorSchemeStyles,
|
|
6130
6388
|
...hostHiddenStyles,
|
|
6131
6389
|
...getFrostedGlassBackgroundJssStyles(isOpen, duration),
|
|
6132
6390
|
}),
|
|
@@ -6225,21 +6483,24 @@ const getComponentCss$z = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6225
6483
|
|
|
6226
6484
|
const modelSignatureHeight = 36;
|
|
6227
6485
|
|
|
6486
|
+
const colorToFilterLight = {
|
|
6487
|
+
primary: filterLightPrimary,
|
|
6488
|
+
'contrast-low': filterLightContrastLow,
|
|
6489
|
+
'contrast-medium': filterLightContrastMedium,
|
|
6490
|
+
'contrast-high': filterLightContrastHigh,
|
|
6491
|
+
};
|
|
6492
|
+
const colorToFilterDark = {
|
|
6493
|
+
primary: filterDarkPrimary,
|
|
6494
|
+
'contrast-low': filterDarkContrastLow,
|
|
6495
|
+
'contrast-medium': filterDarkContrastMedium,
|
|
6496
|
+
'contrast-high': filterDarkContrastHigh,
|
|
6497
|
+
};
|
|
6228
6498
|
const colorToFilterMap = {
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
'contrast-medium': filterLightContrastMedium,
|
|
6233
|
-
'contrast-high': filterLightContrastHigh,
|
|
6234
|
-
},
|
|
6235
|
-
dark: {
|
|
6236
|
-
primary: filterDarkPrimary,
|
|
6237
|
-
'contrast-low': filterDarkContrastLow,
|
|
6238
|
-
'contrast-medium': filterDarkContrastMedium,
|
|
6239
|
-
'contrast-high': filterDarkContrastHigh,
|
|
6240
|
-
},
|
|
6499
|
+
auto: colorToFilterLight,
|
|
6500
|
+
light: colorToFilterLight,
|
|
6501
|
+
dark: colorToFilterDark,
|
|
6241
6502
|
};
|
|
6242
|
-
const getComponentCss$
|
|
6503
|
+
const getComponentCss$z = (size, color, theme) => {
|
|
6243
6504
|
const isSizeInherit = size === 'inherit';
|
|
6244
6505
|
const isColorInherit = color === 'inherit';
|
|
6245
6506
|
return getCss({
|
|
@@ -6256,6 +6517,7 @@ const getComponentCss$y = (size, color, theme) => {
|
|
|
6256
6517
|
// TODO: we need a width map of all signatures to ensure same fluid behavior like implemented fro crest + wordmark
|
|
6257
6518
|
maxHeight: `${modelSignatureHeight}px`,
|
|
6258
6519
|
}),
|
|
6520
|
+
...colorSchemeStyles,
|
|
6259
6521
|
...hostHiddenStyles,
|
|
6260
6522
|
}),
|
|
6261
6523
|
},
|
|
@@ -6266,6 +6528,9 @@ const getComponentCss$y = (size, color, theme) => {
|
|
|
6266
6528
|
pointerEvents: 'none',
|
|
6267
6529
|
...(!isColorInherit && {
|
|
6268
6530
|
filter: colorToFilterMap[theme][color],
|
|
6531
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6532
|
+
filter: colorToFilterMap.dark[color],
|
|
6533
|
+
}),
|
|
6269
6534
|
...(isHighContrastMode &&
|
|
6270
6535
|
getSchemedHighContrastMediaQuery({
|
|
6271
6536
|
filter: colorToFilterMap.light[color],
|
|
@@ -6279,7 +6544,10 @@ const getComponentCss$y = (size, color, theme) => {
|
|
|
6279
6544
|
});
|
|
6280
6545
|
};
|
|
6281
6546
|
|
|
6282
|
-
const getComponentCss$
|
|
6547
|
+
const getComponentCss$y = (theme) => {
|
|
6548
|
+
const { primaryColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor } = getThemedColors(theme);
|
|
6549
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
6550
|
+
const { highlightColor } = getHighContrastColors();
|
|
6283
6551
|
return getCss({
|
|
6284
6552
|
'@global': {
|
|
6285
6553
|
':host': addImportantToEachRule({
|
|
@@ -6287,7 +6555,62 @@ const getComponentCss$x = (theme) => {
|
|
|
6287
6555
|
...hostHiddenStyles,
|
|
6288
6556
|
}),
|
|
6289
6557
|
},
|
|
6290
|
-
|
|
6558
|
+
option: {
|
|
6559
|
+
display: 'flex',
|
|
6560
|
+
justifyContent: 'space-between',
|
|
6561
|
+
gap: '12px',
|
|
6562
|
+
padding: `${spacingStaticSmall} 12px`,
|
|
6563
|
+
flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
|
|
6564
|
+
color: contrastHighColor,
|
|
6565
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6566
|
+
color: contrastHighColorDark,
|
|
6567
|
+
}),
|
|
6568
|
+
cursor: 'pointer',
|
|
6569
|
+
textAlign: 'left',
|
|
6570
|
+
wordBreak: 'break-word',
|
|
6571
|
+
boxSizing: 'border-box',
|
|
6572
|
+
borderRadius: borderRadiusSmall,
|
|
6573
|
+
transition: ['background-color', 'color'].map(getTransition).join(),
|
|
6574
|
+
...getNoResultsOptionJssStyle(),
|
|
6575
|
+
...hoverMediaQuery({
|
|
6576
|
+
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
6577
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
6578
|
+
background: contrastLowColor,
|
|
6579
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6580
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
6581
|
+
background: contrastLowColorDark,
|
|
6582
|
+
}),
|
|
6583
|
+
},
|
|
6584
|
+
}),
|
|
6585
|
+
'&--selected': {
|
|
6586
|
+
background: backgroundSurfaceColor,
|
|
6587
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6588
|
+
background: backgroundSurfaceColorDark,
|
|
6589
|
+
}),
|
|
6590
|
+
},
|
|
6591
|
+
'&--highlighted': {
|
|
6592
|
+
background: contrastLowColor,
|
|
6593
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6594
|
+
background: contrastLowColorDark,
|
|
6595
|
+
}),
|
|
6596
|
+
},
|
|
6597
|
+
'&--highlighted, &--selected': {
|
|
6598
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
6599
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6600
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
6601
|
+
}),
|
|
6602
|
+
},
|
|
6603
|
+
'&--disabled': {
|
|
6604
|
+
cursor: 'not-allowed',
|
|
6605
|
+
color: disabledColor,
|
|
6606
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6607
|
+
color: disabledColorDark,
|
|
6608
|
+
}),
|
|
6609
|
+
},
|
|
6610
|
+
'&--hidden': {
|
|
6611
|
+
display: 'none',
|
|
6612
|
+
},
|
|
6613
|
+
},
|
|
6291
6614
|
checkbox: {
|
|
6292
6615
|
pointerEvents: 'none', // Avoid checkbox label click which updates input within p-checkbox-wrapper
|
|
6293
6616
|
},
|
|
@@ -6310,9 +6633,11 @@ const getPlaceholderJssStyle = (styles) => ({
|
|
|
6310
6633
|
const inputYPadding = '13px';
|
|
6311
6634
|
const selectorNativeSelect = '::slotted([slot=select])';
|
|
6312
6635
|
const INPUT_HEIGHT_CALC = `${fontLineHeight} + 6px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2`;
|
|
6313
|
-
const getComponentCss$
|
|
6636
|
+
const getComponentCss$x = (direction, isOpen, isDisabled, hideLabel, state, isWithinForm, hasLabel, theme) => {
|
|
6314
6637
|
const { primaryColor, contrastMediumColor, contrastHighColor, backgroundColor, disabledColor } = getThemedColors(theme);
|
|
6638
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, backgroundColor: backgroundColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
6315
6639
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
6640
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
6316
6641
|
const isDirectionDown = direction === 'down';
|
|
6317
6642
|
return getCss({
|
|
6318
6643
|
'@global': {
|
|
@@ -6320,6 +6645,7 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6320
6645
|
':host': {
|
|
6321
6646
|
display: 'block',
|
|
6322
6647
|
position: 'relative',
|
|
6648
|
+
...colorSchemeStyles,
|
|
6323
6649
|
...hostHiddenStyles,
|
|
6324
6650
|
},
|
|
6325
6651
|
...(isWithinForm && {
|
|
@@ -6338,19 +6664,25 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6338
6664
|
...getListStyles$1(isOpen, direction, theme),
|
|
6339
6665
|
'input-container': {
|
|
6340
6666
|
display: 'flex',
|
|
6341
|
-
background: backgroundColor,
|
|
6342
6667
|
transition: ['color', 'border-color', 'background-color'].map(getTransition).join(),
|
|
6343
6668
|
cursor: 'text',
|
|
6344
6669
|
...hoverMediaQuery({
|
|
6345
6670
|
'&:hover:not(.disabled)': {
|
|
6346
6671
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
6672
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6673
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
6674
|
+
}),
|
|
6347
6675
|
},
|
|
6348
6676
|
}),
|
|
6349
6677
|
...(!isDisabled && {
|
|
6350
6678
|
'&:focus-within': {
|
|
6351
6679
|
borderColor: primaryColor,
|
|
6680
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6681
|
+
borderColor: primaryColorDark,
|
|
6682
|
+
}),
|
|
6352
6683
|
},
|
|
6353
6684
|
}),
|
|
6685
|
+
background: backgroundColor,
|
|
6354
6686
|
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
6355
6687
|
borderRadius: borderRadiusSmall,
|
|
6356
6688
|
...(isOpen && {
|
|
@@ -6365,6 +6697,18 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6365
6697
|
borderColor: disabledColor,
|
|
6366
6698
|
WebkitTextFillColor: disabledColor,
|
|
6367
6699
|
}),
|
|
6700
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6701
|
+
background: backgroundColorDark,
|
|
6702
|
+
border: `${borderWidthBase} solid ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark}`,
|
|
6703
|
+
...(isOpen && {
|
|
6704
|
+
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColorDark}`),
|
|
6705
|
+
}),
|
|
6706
|
+
...(isDisabled && {
|
|
6707
|
+
color: disabledColorDark,
|
|
6708
|
+
borderColor: disabledColorDark,
|
|
6709
|
+
WebkitTextFillColor: disabledColorDark,
|
|
6710
|
+
}),
|
|
6711
|
+
}),
|
|
6368
6712
|
},
|
|
6369
6713
|
...buildResponsiveStyles(hideLabel, (isHidden) => isHidden
|
|
6370
6714
|
? {
|
|
@@ -6395,6 +6739,9 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6395
6739
|
'no-results': {
|
|
6396
6740
|
padding: `${spacingStaticSmall} 12px`,
|
|
6397
6741
|
color: contrastHighColor,
|
|
6742
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6743
|
+
color: contrastHighColorDark,
|
|
6744
|
+
}),
|
|
6398
6745
|
boxSizing: 'border-box',
|
|
6399
6746
|
...getNoResultsOptionJssStyle(),
|
|
6400
6747
|
},
|
|
@@ -6405,13 +6752,13 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6405
6752
|
};
|
|
6406
6753
|
const getInputStyles = (isDisabled, theme) => {
|
|
6407
6754
|
const { primaryColor, disabledColor } = getThemedColors(theme);
|
|
6755
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark } = getThemedColors('dark');
|
|
6408
6756
|
return {
|
|
6409
6757
|
input: {
|
|
6410
6758
|
flex: 1,
|
|
6411
6759
|
minWidth: 0,
|
|
6412
6760
|
height: `calc(${INPUT_HEIGHT_CALC})`,
|
|
6413
6761
|
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
6414
|
-
color: primaryColor,
|
|
6415
6762
|
padding: `${inputYPadding} ${spacingStaticMedium}`,
|
|
6416
6763
|
boxSizing: 'border-box',
|
|
6417
6764
|
border: 0,
|
|
@@ -6423,14 +6770,23 @@ const getInputStyles = (isDisabled, theme) => {
|
|
|
6423
6770
|
'&:disabled': {
|
|
6424
6771
|
cursor: 'not-allowed',
|
|
6425
6772
|
},
|
|
6426
|
-
|
|
6773
|
+
color: primaryColor,
|
|
6427
6774
|
...(isDisabled && getPlaceholderJssStyle({ color: disabledColor })),
|
|
6775
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6776
|
+
color: primaryColorDark,
|
|
6777
|
+
...(isDisabled && getPlaceholderJssStyle({ color: disabledColorDark })),
|
|
6778
|
+
}),
|
|
6779
|
+
'&:not(:focus)': {
|
|
6780
|
+
...getPlaceholderJssStyle({ color: primaryColor, opacity: 1 }),
|
|
6781
|
+
...prefersColorSchemeDarkMediaQuery(theme, getPlaceholderJssStyle({ color: primaryColorDark, opacity: 1 })),
|
|
6782
|
+
}, // Opacity fixes placeholder being shown lighter in firefox
|
|
6428
6783
|
},
|
|
6429
6784
|
};
|
|
6430
6785
|
};
|
|
6431
6786
|
const getListStyles$1 = (isOpen, direction, theme) => {
|
|
6432
6787
|
const isDirectionDown = direction === 'down';
|
|
6433
6788
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
6789
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
6434
6790
|
return {
|
|
6435
6791
|
listbox: {
|
|
6436
6792
|
position: 'absolute',
|
|
@@ -6439,7 +6795,6 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6439
6795
|
flexDirection: 'column',
|
|
6440
6796
|
gap: spacingStaticSmall,
|
|
6441
6797
|
padding: '6px',
|
|
6442
|
-
background: backgroundColor,
|
|
6443
6798
|
...textSmallStyle,
|
|
6444
6799
|
zIndex: 10,
|
|
6445
6800
|
left: 0,
|
|
@@ -6451,6 +6806,7 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6451
6806
|
maxHeight: `${8.5 * (MULTI_SELECT_OPTION_HEIGHT + 8) + 6 + 2}px`,
|
|
6452
6807
|
overflowY: 'auto',
|
|
6453
6808
|
WebkitOverflowScrolling: 'touch',
|
|
6809
|
+
background: backgroundColor,
|
|
6454
6810
|
border: `2px solid ${primaryColor}`,
|
|
6455
6811
|
[isDirectionDown ? 'borderTop' : 'borderBottom']: 'none',
|
|
6456
6812
|
borderRadius: borderRadiusSmall,
|
|
@@ -6459,7 +6815,11 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6459
6815
|
scrollbarWidth: 'thin',
|
|
6460
6816
|
scrollbarColor: 'auto',
|
|
6461
6817
|
transition: getTransition('border-color'),
|
|
6462
|
-
transform: 'translate3d(0,0,0)',
|
|
6818
|
+
transform: 'translate3d(0,0,0)',
|
|
6819
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6820
|
+
background: backgroundColorDark,
|
|
6821
|
+
borderColor: primaryColorDark,
|
|
6822
|
+
}),
|
|
6463
6823
|
},
|
|
6464
6824
|
};
|
|
6465
6825
|
};
|
|
@@ -6472,13 +6832,17 @@ const disabledCursorStyle = {
|
|
|
6472
6832
|
cursor: 'default',
|
|
6473
6833
|
pointerEvents: 'none', // prevents :hover (has no effect when forced), maybe we can remove it since CSS selectors already cover desired behavior
|
|
6474
6834
|
};
|
|
6475
|
-
const getComponentCss$
|
|
6835
|
+
const getComponentCss$w = (maxNumberOfPageLinks, theme) => {
|
|
6476
6836
|
const { primaryColor, disabledColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
6837
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, hoverColor: hoverColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
6477
6838
|
return getCss({
|
|
6478
6839
|
'@global': {
|
|
6479
6840
|
':host': {
|
|
6480
6841
|
display: 'block',
|
|
6481
|
-
...addImportantToEachRule(
|
|
6842
|
+
...addImportantToEachRule({
|
|
6843
|
+
...colorSchemeStyles,
|
|
6844
|
+
...hostHiddenStyles,
|
|
6845
|
+
}),
|
|
6482
6846
|
},
|
|
6483
6847
|
nav: {
|
|
6484
6848
|
display: 'flex',
|
|
@@ -6524,10 +6888,16 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
6524
6888
|
outline: 0,
|
|
6525
6889
|
borderRadius: borderRadiusSmall,
|
|
6526
6890
|
borderColor: 'transparent',
|
|
6891
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6892
|
+
color: primaryColorDark,
|
|
6893
|
+
}),
|
|
6527
6894
|
...hoverMediaQuery({
|
|
6528
6895
|
'&:not([aria-disabled]):not(.ellipsis):hover': {
|
|
6529
6896
|
...frostedGlassStyle,
|
|
6530
6897
|
background: hoverColor,
|
|
6898
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6899
|
+
background: hoverColorDark,
|
|
6900
|
+
}),
|
|
6531
6901
|
},
|
|
6532
6902
|
}),
|
|
6533
6903
|
'&:not(.ellipsis):focus:focus-visible::before': {
|
|
@@ -6536,16 +6906,26 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
6536
6906
|
...getInsetJssStyle(-4),
|
|
6537
6907
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6538
6908
|
borderRadius: borderRadiusMedium,
|
|
6909
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6910
|
+
borderColor: focusColorDark,
|
|
6911
|
+
}),
|
|
6539
6912
|
},
|
|
6540
6913
|
'&[aria-current]': {
|
|
6541
6914
|
...disabledCursorStyle,
|
|
6542
6915
|
color: primaryColor,
|
|
6543
6916
|
border: `${borderWidthBase} solid ${primaryColor}`,
|
|
6917
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6918
|
+
color: primaryColorDark,
|
|
6919
|
+
borderColor: primaryColorDark,
|
|
6920
|
+
}),
|
|
6544
6921
|
'&:not(.ellipsis):focus::before': getInsetJssStyle(-6),
|
|
6545
6922
|
},
|
|
6546
6923
|
'&[aria-disabled]': {
|
|
6547
6924
|
...disabledCursorStyle,
|
|
6548
6925
|
color: disabledColor,
|
|
6926
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6927
|
+
color: disabledColorDark,
|
|
6928
|
+
}),
|
|
6549
6929
|
},
|
|
6550
6930
|
},
|
|
6551
6931
|
},
|
|
@@ -6558,6 +6938,82 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
6558
6938
|
});
|
|
6559
6939
|
};
|
|
6560
6940
|
|
|
6941
|
+
const removeSlottedSelector = (styles) => Object.fromEntries(Object.entries(styles).map(([key, value]) => {
|
|
6942
|
+
value = typeof value === 'object' ? removeSlottedSelector(value) : value;
|
|
6943
|
+
return [key.replace(/::slotted\(([^,]+)\)/g, '$1'), value];
|
|
6944
|
+
}));
|
|
6945
|
+
const removeStyles = (selector, styles) => Object.fromEntries(Object.entries(styles)
|
|
6946
|
+
.filter(([key]) => key !== selector)
|
|
6947
|
+
.map(([key, value]) => {
|
|
6948
|
+
value = typeof value === 'object' ? removeStyles(selector, value) : value;
|
|
6949
|
+
return [key, value];
|
|
6950
|
+
}));
|
|
6951
|
+
|
|
6952
|
+
const getComponentCss$v = (hideLabel, state, isDisabled, isLoading, isWithinForm, length, theme) => {
|
|
6953
|
+
const inputSize = `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`; // equivalent to calculation of input height within form-styles
|
|
6954
|
+
const labelStyles = removeStyles('@media(hover:hover)', removeSlottedSelector(getLabelStyles('input', isDisabled, hideLabel, state, theme)));
|
|
6955
|
+
const inputStyles = removeStyles('input[readonly]', removeSlottedSelector(getBaseChildStyles('input', state, theme, {
|
|
6956
|
+
textAlign: 'center',
|
|
6957
|
+
width: inputSize,
|
|
6958
|
+
...(length === 6 && {
|
|
6959
|
+
[getMediaQueryMax('xs')]: {
|
|
6960
|
+
width: `calc((276px - (${spacingStaticSmall} * 5)) / 6)`, // calculate the max with of the inputs that fit into grid in viewport base (276px)
|
|
6961
|
+
},
|
|
6962
|
+
}),
|
|
6963
|
+
...(isLoading && {
|
|
6964
|
+
opacity: 0.2,
|
|
6965
|
+
cursor: 'not-allowed',
|
|
6966
|
+
}),
|
|
6967
|
+
})));
|
|
6968
|
+
return getCss({
|
|
6969
|
+
'@global': {
|
|
6970
|
+
':host': addImportantToEachRule({
|
|
6971
|
+
display: 'block',
|
|
6972
|
+
...colorSchemeStyles,
|
|
6973
|
+
...hostHiddenStyles,
|
|
6974
|
+
}),
|
|
6975
|
+
...inputStyles,
|
|
6976
|
+
...(isWithinForm &&
|
|
6977
|
+
addImportantToEachRule({
|
|
6978
|
+
'::slotted(input)': {
|
|
6979
|
+
position: 'absolute',
|
|
6980
|
+
height: inputSize,
|
|
6981
|
+
width: 0,
|
|
6982
|
+
opacity: 0,
|
|
6983
|
+
},
|
|
6984
|
+
})),
|
|
6985
|
+
},
|
|
6986
|
+
...(isLoading && {
|
|
6987
|
+
spinner: {
|
|
6988
|
+
width: '100%',
|
|
6989
|
+
height: inputSize,
|
|
6990
|
+
pointerEvents: 'none',
|
|
6991
|
+
position: 'absolute',
|
|
6992
|
+
top: '50%',
|
|
6993
|
+
left: '50%',
|
|
6994
|
+
transform: 'translate(-50%, -50%)',
|
|
6995
|
+
},
|
|
6996
|
+
}),
|
|
6997
|
+
'input-container': {
|
|
6998
|
+
display: 'flex',
|
|
6999
|
+
position: 'relative',
|
|
7000
|
+
gap: spacingStaticSmall,
|
|
7001
|
+
flexWrap: 'wrap',
|
|
7002
|
+
width: 'fit-content',
|
|
7003
|
+
},
|
|
7004
|
+
...mergeDeep(labelStyles, {
|
|
7005
|
+
label: {
|
|
7006
|
+
...buildResponsiveStyles(hideLabel,
|
|
7007
|
+
// workaround: since pin-code component is not wrapped into label tag it behaves differently
|
|
7008
|
+
(isLabelHidden) => (isLabelHidden ? { display: 'none' } : { display: 'inline-flex' })),
|
|
7009
|
+
marginBottom: spacingStaticXSmall,
|
|
7010
|
+
},
|
|
7011
|
+
}),
|
|
7012
|
+
...getFunctionalComponentRequiredStyles(),
|
|
7013
|
+
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
7014
|
+
});
|
|
7015
|
+
};
|
|
7016
|
+
|
|
6561
7017
|
const { backgroundColor: backgroundColorThemeLight, primaryColor: primaryColorThemeLight } = getThemedColors('light');
|
|
6562
7018
|
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
6563
7019
|
const directionPositionMap = {
|
|
@@ -6632,6 +7088,7 @@ const getComponentCss$u = (direction, theme) => {
|
|
|
6632
7088
|
...addImportantToEachRule({
|
|
6633
7089
|
position: 'relative',
|
|
6634
7090
|
display: 'inline-block',
|
|
7091
|
+
...colorSchemeStyles,
|
|
6635
7092
|
...hostHiddenStyles,
|
|
6636
7093
|
}),
|
|
6637
7094
|
verticalAlign: 'top',
|
|
@@ -6728,19 +7185,30 @@ const getComponentCss$u = (direction, theme) => {
|
|
|
6728
7185
|
});
|
|
6729
7186
|
};
|
|
6730
7187
|
|
|
6731
|
-
const
|
|
7188
|
+
const getCheckedSVGBackgroundImage = (fill) => {
|
|
7189
|
+
return getInlineSVGBackgroundImage(`<circle fill="${fill}" cx="12" cy="12" r="6"/>`);
|
|
7190
|
+
};
|
|
7191
|
+
const getComponentCss$t = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
6732
7192
|
const checkedIconColor = isHighContrastMode
|
|
6733
7193
|
? getHighContrastColors().canvasColor
|
|
6734
|
-
: getInvertedThemedColors(theme).primaryColor
|
|
6735
|
-
|
|
7194
|
+
: escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
|
|
7195
|
+
const checkedIconColorDark = isHighContrastMode
|
|
7196
|
+
? getHighContrastColors().canvasColor
|
|
7197
|
+
: escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
7198
|
+
return getCss(mergeDeep(getCheckboxRadioJssStyle(hideLabel, state, isDisabled, isLoading, theme), {
|
|
6736
7199
|
'@global': {
|
|
6737
7200
|
'::slotted': addImportantToEachRule({
|
|
6738
7201
|
'&(input)': {
|
|
6739
7202
|
borderRadius: '50%',
|
|
6740
7203
|
},
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
7204
|
+
...(!isLoading && {
|
|
7205
|
+
'&(input:checked)': {
|
|
7206
|
+
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColor),
|
|
7207
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7208
|
+
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColorDark),
|
|
7209
|
+
}),
|
|
7210
|
+
},
|
|
7211
|
+
}),
|
|
6744
7212
|
...(!isDisabled && {
|
|
6745
7213
|
'&(input:focus)::before': {
|
|
6746
7214
|
borderRadius: '50%',
|
|
@@ -6751,15 +7219,18 @@ const getComponentCss$t = (hideLabel, state, isDisabled, theme) => {
|
|
|
6751
7219
|
}));
|
|
6752
7220
|
};
|
|
6753
7221
|
|
|
7222
|
+
const gradientColorLight = {
|
|
7223
|
+
'background-base': '255,255,255',
|
|
7224
|
+
'background-surface': '238,239,242',
|
|
7225
|
+
};
|
|
7226
|
+
const gradientColorDark = {
|
|
7227
|
+
'background-base': '14,14,18',
|
|
7228
|
+
'background-surface': '33,34,37',
|
|
7229
|
+
};
|
|
6754
7230
|
const gradientColorMap = {
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
},
|
|
6759
|
-
dark: {
|
|
6760
|
-
'background-base': '14,14,18',
|
|
6761
|
-
'background-surface': '33,34,37',
|
|
6762
|
-
},
|
|
7231
|
+
auto: gradientColorLight,
|
|
7232
|
+
light: gradientColorLight,
|
|
7233
|
+
dark: gradientColorDark,
|
|
6763
7234
|
};
|
|
6764
7235
|
const getGradient = (theme, gradientColorTheme) => {
|
|
6765
7236
|
const gradientColor = gradientColorMap[theme][gradientColorTheme];
|
|
@@ -6770,15 +7241,17 @@ const getGradient = (theme, gradientColorTheme) => {
|
|
|
6770
7241
|
};
|
|
6771
7242
|
const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndicatorPosition, hasScrollbar, theme) => {
|
|
6772
7243
|
const { backgroundColor, backgroundSurfaceColor, focusColor, hoverColor } = getThemedColors(theme);
|
|
6773
|
-
const
|
|
7244
|
+
const { backgroundColor: backgroundColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, focusColor: focusColorDark, hoverColor: hoverColorDark, } = getThemedColors('dark');
|
|
7245
|
+
const backgroundColorLight = {
|
|
7246
|
+
'background-base': backgroundColor,
|
|
7247
|
+
'background-surface': backgroundSurfaceColor,
|
|
7248
|
+
};
|
|
6774
7249
|
const backgroundColorMap = {
|
|
7250
|
+
auto: backgroundColorLight,
|
|
7251
|
+
light: backgroundColorLight,
|
|
6775
7252
|
dark: {
|
|
6776
|
-
'background-base':
|
|
6777
|
-
'background-surface':
|
|
6778
|
-
},
|
|
6779
|
-
light: {
|
|
6780
|
-
'background-base': backgroundColor,
|
|
6781
|
-
'background-surface': backgroundSurfaceColor,
|
|
7253
|
+
'background-base': backgroundSurfaceColorDark,
|
|
7254
|
+
'background-surface': backgroundColorDark,
|
|
6782
7255
|
},
|
|
6783
7256
|
};
|
|
6784
7257
|
const actionPrevNextStyles = {
|
|
@@ -6793,6 +7266,7 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6793
7266
|
':host': addImportantToEachRule({
|
|
6794
7267
|
display: 'block',
|
|
6795
7268
|
height: 'inherit',
|
|
7269
|
+
...colorSchemeStyles,
|
|
6796
7270
|
...hostHiddenStyles,
|
|
6797
7271
|
}),
|
|
6798
7272
|
button: {
|
|
@@ -6807,15 +7281,21 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6807
7281
|
outline: 0,
|
|
6808
7282
|
cursor: 'pointer',
|
|
6809
7283
|
background: backgroundColorMap[theme][gradientColor],
|
|
7284
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7285
|
+
background: backgroundColorMap.dark[gradientColor],
|
|
7286
|
+
}),
|
|
6810
7287
|
borderRadius: borderRadiusSmall,
|
|
6811
7288
|
...frostedGlassStyle,
|
|
6812
7289
|
visibility: 'hidden',
|
|
6813
|
-
...(!
|
|
7290
|
+
...(!isThemeDark(theme) && dropShadowLowStyle),
|
|
6814
7291
|
...hoverMediaQuery({
|
|
6815
7292
|
transition: getTransition('background-color'),
|
|
6816
7293
|
'&:hover': {
|
|
6817
7294
|
...frostedGlassStyle,
|
|
6818
7295
|
background: hoverColor,
|
|
7296
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7297
|
+
background: hoverColorDark,
|
|
7298
|
+
}),
|
|
6819
7299
|
},
|
|
6820
7300
|
}),
|
|
6821
7301
|
},
|
|
@@ -6858,6 +7338,9 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6858
7338
|
},
|
|
6859
7339
|
'&:focus::before': {
|
|
6860
7340
|
borderColor: focusColor,
|
|
7341
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7342
|
+
borderColor: focusColorDark,
|
|
7343
|
+
}),
|
|
6861
7344
|
},
|
|
6862
7345
|
'&:focus:not(:focus-visible)::before': {
|
|
6863
7346
|
borderColor: 'transparent',
|
|
@@ -6882,6 +7365,9 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6882
7365
|
gridArea: '1 / 1 / 1 / 1',
|
|
6883
7366
|
justifyContent: 'flex-start',
|
|
6884
7367
|
background: `linear-gradient(to right, ${getGradient(theme, gradientColor)} 100%)`,
|
|
7368
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7369
|
+
background: `linear-gradient(to right, ${getGradient('dark', gradientColor)} 100%)`,
|
|
7370
|
+
}),
|
|
6885
7371
|
visibility: isPrevHidden ? 'hidden' : 'visible',
|
|
6886
7372
|
'& button': {
|
|
6887
7373
|
marginLeft: '8px',
|
|
@@ -6897,6 +7383,9 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6897
7383
|
gridArea: '1 / 3 / 1 / 3',
|
|
6898
7384
|
justifyContent: 'flex-end',
|
|
6899
7385
|
background: `linear-gradient(to left, ${getGradient(theme, gradientColor)} 100%)`,
|
|
7386
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7387
|
+
background: `linear-gradient(to left, ${getGradient('dark', gradientColor)} 100%)`,
|
|
7388
|
+
}),
|
|
6900
7389
|
visibility: isNextHidden ? 'hidden' : 'visible',
|
|
6901
7390
|
'& button': {
|
|
6902
7391
|
marginRight: '8px',
|
|
@@ -6925,7 +7414,9 @@ const getColors$2 = (isDisabled, isSelected, theme) => {
|
|
|
6925
7414
|
const getItemPadding = (hasIconAndSlottedContent) => hasIconAndSlottedContent ? `13px ${ITEM_PADDING} 13px 13px` : `13px ${ITEM_PADDING}`;
|
|
6926
7415
|
const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, theme) => {
|
|
6927
7416
|
const { focusColor } = getThemedColors(theme);
|
|
7417
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
6928
7418
|
const { buttonColor, labelColor, borderColor, hoverBorderColor } = getColors$2(isDisabled, isSelected, theme);
|
|
7419
|
+
const { buttonColor: buttonColorDark, labelColor: labelColorDark, borderColor: borderColorDark, hoverBorderColor: hoverBorderColorDark, } = getColors$2(isDisabled, isSelected, 'dark');
|
|
6929
7420
|
return getCss({
|
|
6930
7421
|
'@global': {
|
|
6931
7422
|
':host': addImportantToEachRule({
|
|
@@ -6935,6 +7426,7 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6935
7426
|
}),
|
|
6936
7427
|
// All width relevant styling has to be kept in sync with the tempDiv of the p-segmented-control utils
|
|
6937
7428
|
button: {
|
|
7429
|
+
position: 'relative',
|
|
6938
7430
|
display: 'block',
|
|
6939
7431
|
height: '100%',
|
|
6940
7432
|
width: '100%',
|
|
@@ -6946,7 +7438,10 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6946
7438
|
background: 'transparent',
|
|
6947
7439
|
color: buttonColor,
|
|
6948
7440
|
...textSmallStyle,
|
|
6949
|
-
|
|
7441
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7442
|
+
borderColor: borderColorDark,
|
|
7443
|
+
color: buttonColorDark,
|
|
7444
|
+
}),
|
|
6950
7445
|
'&::before': {
|
|
6951
7446
|
content: '""',
|
|
6952
7447
|
position: 'absolute',
|
|
@@ -6956,6 +7451,9 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6956
7451
|
},
|
|
6957
7452
|
'&:focus::before': {
|
|
6958
7453
|
borderColor: focusColor,
|
|
7454
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7455
|
+
borderColor: focusColorDark,
|
|
7456
|
+
}),
|
|
6959
7457
|
},
|
|
6960
7458
|
'&:focus:not(:focus-visible)::before': {
|
|
6961
7459
|
borderColor: 'transparent',
|
|
@@ -6971,6 +7469,9 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6971
7469
|
transition: getTransition('border-color'),
|
|
6972
7470
|
'&:hover': {
|
|
6973
7471
|
borderColor: hoverBorderColor,
|
|
7472
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7473
|
+
borderColor: hoverBorderColorDark,
|
|
7474
|
+
}),
|
|
6974
7475
|
},
|
|
6975
7476
|
})),
|
|
6976
7477
|
}),
|
|
@@ -6981,6 +7482,9 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6981
7482
|
...textXSmallStyle,
|
|
6982
7483
|
overflowWrap: 'normal',
|
|
6983
7484
|
color: labelColor,
|
|
7485
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7486
|
+
color: labelColorDark,
|
|
7487
|
+
}),
|
|
6984
7488
|
},
|
|
6985
7489
|
},
|
|
6986
7490
|
...(hasIcon && {
|
|
@@ -7008,6 +7512,7 @@ const getComponentCss$q = (maxWidth, columns) => {
|
|
|
7008
7512
|
gridTemplateColumns: col === 'auto' ? `repeat(auto-fit, ${maxWidth}px)` : `repeat(${col}, minmax(0, 1fr))`,
|
|
7009
7513
|
})),
|
|
7010
7514
|
gap: '6px',
|
|
7515
|
+
...colorSchemeStyles,
|
|
7011
7516
|
...hostHiddenStyles,
|
|
7012
7517
|
}),
|
|
7013
7518
|
},
|
|
@@ -7017,7 +7522,9 @@ const getComponentCss$q = (maxWidth, columns) => {
|
|
|
7017
7522
|
const dropdownPositionVar = '--p-internal-dropdown-position';
|
|
7018
7523
|
const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
7019
7524
|
const { primaryColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
7525
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
7020
7526
|
const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
|
|
7527
|
+
const { formStateHoverColor: formStateHoverColorDark, formStateColor: formStateColorDark } = getThemedFormStateColors('dark', state);
|
|
7021
7528
|
const isDirectionDown = direction === 'down';
|
|
7022
7529
|
return {
|
|
7023
7530
|
'@global': {
|
|
@@ -7034,17 +7541,29 @@ const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
|
7034
7541
|
outline: '0',
|
|
7035
7542
|
cursor: 'pointer',
|
|
7036
7543
|
transition: getTransition('border-color'),
|
|
7544
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7545
|
+
borderColor: isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7546
|
+
}),
|
|
7037
7547
|
'&:focus, &:focus ~ ul': {
|
|
7038
7548
|
borderColor: primaryColor,
|
|
7549
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7550
|
+
borderColor: primaryColorDark,
|
|
7551
|
+
}),
|
|
7039
7552
|
},
|
|
7040
7553
|
...hoverMediaQuery({
|
|
7041
7554
|
'&:not(:disabled):not(:focus):hover': {
|
|
7042
7555
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
7556
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7557
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
7558
|
+
}),
|
|
7043
7559
|
},
|
|
7044
7560
|
}),
|
|
7045
7561
|
'&:disabled': {
|
|
7046
7562
|
cursor: 'not-allowed',
|
|
7047
7563
|
borderColor: disabledColor,
|
|
7564
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7565
|
+
borderColor: disabledColorDark,
|
|
7566
|
+
}),
|
|
7048
7567
|
},
|
|
7049
7568
|
...(isOpen && {
|
|
7050
7569
|
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
@@ -7056,12 +7575,18 @@ const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
|
7056
7575
|
};
|
|
7057
7576
|
const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
7058
7577
|
const { primaryColor, backgroundColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
7578
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
7059
7579
|
const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
|
|
7580
|
+
const { formStateHoverColor: formStateHoverColorDark, formStateColor: formStateColorDark } = getThemedFormStateColors('dark', state);
|
|
7060
7581
|
const isDirectionDown = direction === 'down';
|
|
7061
7582
|
const placeHolderJssStyle = {
|
|
7062
7583
|
opacity: 1,
|
|
7063
7584
|
color: disabled ? disabledColor : primaryColor,
|
|
7064
7585
|
};
|
|
7586
|
+
const placeHolderDarkJssStyle = {
|
|
7587
|
+
opacity: 1,
|
|
7588
|
+
color: disabled ? disabledColorDark : primaryColorDark,
|
|
7589
|
+
};
|
|
7065
7590
|
return {
|
|
7066
7591
|
'@global': {
|
|
7067
7592
|
input: {
|
|
@@ -7085,23 +7610,45 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7085
7610
|
cursor: disabled ? 'not-allowed' : 'text',
|
|
7086
7611
|
color: primaryColor,
|
|
7087
7612
|
background: backgroundColor,
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7613
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7614
|
+
color: primaryColorDark,
|
|
7615
|
+
background: backgroundColorDark,
|
|
7616
|
+
}),
|
|
7617
|
+
'&::placeholder': {
|
|
7618
|
+
...placeHolderJssStyle,
|
|
7619
|
+
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
7620
|
+
},
|
|
7621
|
+
'&::-webkit-input-placeholder': {
|
|
7622
|
+
...placeHolderJssStyle,
|
|
7623
|
+
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
7624
|
+
},
|
|
7625
|
+
'&::-moz-placeholder': {
|
|
7626
|
+
...placeHolderJssStyle,
|
|
7627
|
+
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
7628
|
+
},
|
|
7091
7629
|
'&:not(:disabled):focus': {
|
|
7092
7630
|
opacity: 1,
|
|
7093
7631
|
'&+span, &~ ul': {
|
|
7094
7632
|
borderColor: primaryColor,
|
|
7633
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7634
|
+
borderColor: primaryColorDark,
|
|
7635
|
+
}),
|
|
7095
7636
|
},
|
|
7096
7637
|
},
|
|
7097
7638
|
...hoverMediaQuery({
|
|
7098
7639
|
'&:not(:disabled)': {
|
|
7099
7640
|
'&+span:hover': {
|
|
7100
7641
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
7642
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7643
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
7644
|
+
}),
|
|
7101
7645
|
},
|
|
7102
7646
|
'&:hover': {
|
|
7103
7647
|
'&+span, &~ul': {
|
|
7104
7648
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
7649
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7650
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
7651
|
+
}),
|
|
7105
7652
|
},
|
|
7106
7653
|
},
|
|
7107
7654
|
},
|
|
@@ -7114,6 +7661,9 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7114
7661
|
pointerEvents: 'all',
|
|
7115
7662
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
7116
7663
|
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
7664
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7665
|
+
borderColor: isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7666
|
+
}),
|
|
7117
7667
|
borderRadius: borderRadiusSmall,
|
|
7118
7668
|
...(isOpen && {
|
|
7119
7669
|
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
@@ -7126,7 +7676,9 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7126
7676
|
};
|
|
7127
7677
|
const getListStyles = (direction, theme) => {
|
|
7128
7678
|
const isDirectionDown = direction === 'down';
|
|
7129
|
-
const { primaryColor, backgroundColor, contrastMediumColor } = getThemedColors(
|
|
7679
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
7680
|
+
const { primaryColor, backgroundColor, contrastMediumColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor, } = getThemedColors(theme);
|
|
7681
|
+
const { highlightColor } = getHighContrastColors();
|
|
7130
7682
|
return {
|
|
7131
7683
|
'@global': {
|
|
7132
7684
|
ul: {
|
|
@@ -7155,15 +7707,72 @@ const getListStyles = (direction, theme) => {
|
|
|
7155
7707
|
scrollbarWidth: 'thin',
|
|
7156
7708
|
scrollbarColor: 'auto',
|
|
7157
7709
|
transition: getTransition('border-color'),
|
|
7158
|
-
transform: 'translate3d(0,0,0)',
|
|
7710
|
+
transform: 'translate3d(0,0,0)',
|
|
7711
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7712
|
+
background: backgroundColorDark,
|
|
7713
|
+
borderColor: primaryColorDark,
|
|
7714
|
+
[isDirectionDown ? 'borderTopColor' : 'borderBottomColor']: addImportantToRule(contrastMediumColorDark),
|
|
7715
|
+
}),
|
|
7159
7716
|
},
|
|
7160
7717
|
},
|
|
7161
|
-
|
|
7718
|
+
option: {
|
|
7719
|
+
display: 'flex',
|
|
7720
|
+
justifyContent: 'space-between',
|
|
7721
|
+
gap: '12px',
|
|
7722
|
+
padding: `${spacingStaticSmall} 12px`,
|
|
7723
|
+
flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
|
|
7724
|
+
color: contrastHighColor,
|
|
7725
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7726
|
+
color: contrastHighColorDark,
|
|
7727
|
+
}),
|
|
7728
|
+
cursor: 'pointer',
|
|
7729
|
+
textAlign: 'left',
|
|
7730
|
+
wordBreak: 'break-word',
|
|
7731
|
+
boxSizing: 'border-box',
|
|
7732
|
+
borderRadius: borderRadiusSmall,
|
|
7733
|
+
transition: ['background-color', 'color'].map(getTransition).join(),
|
|
7734
|
+
...getNoResultsOptionJssStyle(),
|
|
7735
|
+
...hoverMediaQuery({
|
|
7736
|
+
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
7737
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
7738
|
+
background: contrastLowColor,
|
|
7739
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7740
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
7741
|
+
background: contrastLowColorDark,
|
|
7742
|
+
}),
|
|
7743
|
+
},
|
|
7744
|
+
}),
|
|
7162
7745
|
'&--selected': {
|
|
7163
7746
|
cursor: 'default',
|
|
7164
7747
|
pointerEvents: 'none',
|
|
7748
|
+
background: backgroundSurfaceColor,
|
|
7749
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7750
|
+
background: backgroundSurfaceColorDark,
|
|
7751
|
+
}),
|
|
7165
7752
|
},
|
|
7166
|
-
|
|
7753
|
+
'&--highlighted': {
|
|
7754
|
+
background: contrastLowColor,
|
|
7755
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7756
|
+
background: contrastLowColorDark,
|
|
7757
|
+
}),
|
|
7758
|
+
},
|
|
7759
|
+
'&--highlighted, &--selected': {
|
|
7760
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
7761
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7762
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
7763
|
+
}),
|
|
7764
|
+
},
|
|
7765
|
+
'&--disabled': {
|
|
7766
|
+
cursor: 'not-allowed',
|
|
7767
|
+
color: disabledColor,
|
|
7768
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7769
|
+
color: disabledColorDark,
|
|
7770
|
+
}),
|
|
7771
|
+
},
|
|
7772
|
+
'&--hidden': {
|
|
7773
|
+
display: 'none',
|
|
7774
|
+
},
|
|
7775
|
+
},
|
|
7167
7776
|
optgroup: {
|
|
7168
7777
|
display: 'block',
|
|
7169
7778
|
padding: '3px 14px',
|
|
@@ -7179,7 +7788,9 @@ const getListStyles = (direction, theme) => {
|
|
|
7179
7788
|
};
|
|
7180
7789
|
const getComponentCss$p = (direction, isOpen, state, disabled, filter, theme) => {
|
|
7181
7790
|
const { primaryColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
7791
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
7182
7792
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
7793
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
7183
7794
|
return getCss(
|
|
7184
7795
|
// merge because of global styles
|
|
7185
7796
|
mergeDeep({
|
|
@@ -7194,11 +7805,17 @@ const getComponentCss$p = (direction, isOpen, state, disabled, filter, theme) =>
|
|
|
7194
7805
|
left: 0,
|
|
7195
7806
|
right: 0,
|
|
7196
7807
|
color: disabled ? disabledColor : formStateColor || contrastMediumColor,
|
|
7808
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7809
|
+
color: disabled ? disabledColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7810
|
+
}),
|
|
7197
7811
|
...(!disabled &&
|
|
7198
7812
|
!isHighContrastMode &&
|
|
7199
7813
|
hoverMediaQuery({
|
|
7200
7814
|
'&(:hover)': {
|
|
7201
7815
|
color: formStateHoverColor || primaryColor,
|
|
7816
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7817
|
+
color: formStateHoverColorDark || primaryColorDark,
|
|
7818
|
+
}),
|
|
7202
7819
|
},
|
|
7203
7820
|
})),
|
|
7204
7821
|
},
|
|
@@ -7216,6 +7833,7 @@ const getComponentCss$o = (isDisabled, hasCustomDropdown, hideLabel, state, them
|
|
|
7216
7833
|
'@global': addImportantToEachRule({
|
|
7217
7834
|
':host': {
|
|
7218
7835
|
display: 'block',
|
|
7836
|
+
...colorSchemeStyles,
|
|
7219
7837
|
...hostHiddenStyles,
|
|
7220
7838
|
},
|
|
7221
7839
|
...getBaseChildStyles('select', state, theme, {
|
|
@@ -7260,12 +7878,14 @@ const getComponentCss$n = (size, theme) => {
|
|
|
7260
7878
|
const strokeDasharray = '57'; // C = 2πR
|
|
7261
7879
|
const animationDuration = 'var(--p-animation-duration, 2s)';
|
|
7262
7880
|
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
7881
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
7263
7882
|
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
7264
7883
|
return getCss({
|
|
7265
7884
|
'@global': {
|
|
7266
7885
|
':host': addImportantToEachRule({
|
|
7267
7886
|
display: 'inline-flex',
|
|
7268
7887
|
verticalAlign: 'top',
|
|
7888
|
+
...colorSchemeStyles,
|
|
7269
7889
|
...hostHiddenStyles,
|
|
7270
7890
|
}),
|
|
7271
7891
|
svg: {
|
|
@@ -7277,13 +7897,21 @@ const getComponentCss$n = (size, theme) => {
|
|
|
7277
7897
|
},
|
|
7278
7898
|
circle: {
|
|
7279
7899
|
'&:first-child': {
|
|
7900
|
+
// TODO: High Contrast Mode should be handled within a local color helper function
|
|
7280
7901
|
stroke: isHighContrastMode ? canvasTextColor : contrastMediumColor,
|
|
7902
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7903
|
+
stroke: isHighContrastMode ? canvasTextColor : contrastMediumColorDark,
|
|
7904
|
+
}),
|
|
7281
7905
|
animation: `$rotate ${animationDuration} linear infinite`, // needs to rotate to eliminate stutter in safari
|
|
7282
7906
|
},
|
|
7283
7907
|
'&:last-child': {
|
|
7284
7908
|
transformOrigin: '0 0',
|
|
7285
7909
|
animation: `$dash ${animationDuration} ease-in-out infinite`,
|
|
7910
|
+
// TODO: High Contrast Mode should be handled within a local color helper function
|
|
7286
7911
|
stroke: isHighContrastMode ? canvasColor : primaryColor,
|
|
7912
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7913
|
+
stroke: isHighContrastMode ? canvasColor : primaryColorDark,
|
|
7914
|
+
}),
|
|
7287
7915
|
strokeDasharray: strokeDasharray
|
|
7288
7916
|
,
|
|
7289
7917
|
strokeLinecap: 'round',
|
|
@@ -7326,7 +7954,7 @@ const getComponentCss$n = (size, theme) => {
|
|
|
7326
7954
|
|
|
7327
7955
|
const getSVGPath = (stepCount, numberedCircleColors, isStateCurrent) => {
|
|
7328
7956
|
// # of the hexcolor starts a fragment identifier in URLs, so we have to replace it with the escaped value of # = %23
|
|
7329
|
-
numberedCircleColors = Object.entries(numberedCircleColors).reduce((result, [key, value]) => ({ ...result, [key]: value
|
|
7957
|
+
numberedCircleColors = Object.entries(numberedCircleColors).reduce((result, [key, value]) => ({ ...result, [key]: escapeHashCharacter(value) }), {});
|
|
7330
7958
|
const { disabledColor, invertedBaseColor, primaryColor } = numberedCircleColors;
|
|
7331
7959
|
const fillColor = isStateCurrent ? invertedBaseColor : disabledColor;
|
|
7332
7960
|
const svgCirclePath = `<circle fill="${isStateCurrent ? primaryColor : 'none'}"${isStateCurrent ? '' : ` stroke="${fillColor}"`} stroke-width="1px" cx="12" cy="12" r="9"/>`;
|
|
@@ -7348,6 +7976,7 @@ const getSVGPath = (stepCount, numberedCircleColors, isStateCurrent) => {
|
|
|
7348
7976
|
};
|
|
7349
7977
|
const getComponentCss$m = (state, disabled, theme) => {
|
|
7350
7978
|
const { primaryColor, hoverColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
7979
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
7351
7980
|
const isStateCurrent = state === 'current';
|
|
7352
7981
|
const isStateCurrentOrUndefined = !state || isStateCurrent;
|
|
7353
7982
|
const isDisabled = !state || disabled;
|
|
@@ -7363,6 +7992,13 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
7363
7992
|
invertedBaseColor: getInvertedThemedColors(theme).primaryColor,
|
|
7364
7993
|
disabledColor,
|
|
7365
7994
|
}, isStateCurrent)),
|
|
7995
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7996
|
+
backgroundImage: getInlineSVGBackgroundImage(getSVGPath(i, {
|
|
7997
|
+
primaryColor: primaryColorDark,
|
|
7998
|
+
invertedBaseColor: getInvertedThemedColors('dark').primaryColor,
|
|
7999
|
+
disabledColor: disabledColorDark,
|
|
8000
|
+
}, isStateCurrent)),
|
|
8001
|
+
}),
|
|
7366
8002
|
},
|
|
7367
8003
|
}), {})),
|
|
7368
8004
|
...addImportantToEachRule({
|
|
@@ -7391,12 +8027,21 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
7391
8027
|
...frostedGlassStyle,
|
|
7392
8028
|
background: hoverColor,
|
|
7393
8029
|
}),
|
|
8030
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8031
|
+
color: isDisabled ? disabledColorDark : primaryColorDark,
|
|
8032
|
+
...(isStateCurrent && {
|
|
8033
|
+
background: hoverColorDark,
|
|
8034
|
+
}),
|
|
8035
|
+
}),
|
|
7394
8036
|
...(!isDisabled &&
|
|
7395
8037
|
hoverMediaQuery({
|
|
7396
8038
|
transition: getTransition('background-color'),
|
|
7397
8039
|
'&:hover': {
|
|
7398
8040
|
...frostedGlassStyle,
|
|
7399
8041
|
background: hoverColor,
|
|
8042
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8043
|
+
background: hoverColorDark,
|
|
8044
|
+
}),
|
|
7400
8045
|
},
|
|
7401
8046
|
})),
|
|
7402
8047
|
...(isStateCurrentOrUndefined && {
|
|
@@ -7413,6 +8058,9 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
7413
8058
|
position: 'absolute',
|
|
7414
8059
|
...getInsetJssStyle(),
|
|
7415
8060
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
8061
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8062
|
+
borderColor: focusColorDark,
|
|
8063
|
+
}),
|
|
7416
8064
|
borderRadius: borderRadiusSmall,
|
|
7417
8065
|
},
|
|
7418
8066
|
'&:focus:not(:focus-visible)::after': {
|
|
@@ -7436,7 +8084,10 @@ const getComponentCss$l = (size) => {
|
|
|
7436
8084
|
'@global': {
|
|
7437
8085
|
':host': {
|
|
7438
8086
|
display: 'block',
|
|
7439
|
-
...addImportantToEachRule(
|
|
8087
|
+
...addImportantToEachRule({
|
|
8088
|
+
...colorSchemeStyles,
|
|
8089
|
+
...hostHiddenStyles,
|
|
8090
|
+
}),
|
|
7440
8091
|
},
|
|
7441
8092
|
},
|
|
7442
8093
|
scroller: {
|
|
@@ -7476,11 +8127,14 @@ const getColors$1 = (checked, disabled, loading, theme) => {
|
|
|
7476
8127
|
};
|
|
7477
8128
|
const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, loading, theme) => {
|
|
7478
8129
|
const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, disabled, loading, theme);
|
|
8130
|
+
const { buttonBorderColor: buttonBorderColorDark, buttonBorderColorHover: buttonBorderColorHoverDark, buttonBackgroundColor: buttonBackgroundColorDark, buttonBackgroundColorHover: buttonBackgroundColorHoverDark, toggleBackgroundColor: toggleBackgroundColorDark, toggleBackgroundColorHover: toggleBackgroundColorHoverDark, textColor: textColorDark, } = getColors$1(checked, disabled, loading, 'dark');
|
|
7479
8131
|
const { focusColor } = getThemedColors(theme);
|
|
8132
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
7480
8133
|
return getCss({
|
|
7481
8134
|
'@global': {
|
|
7482
8135
|
':host': addImportantToEachRule({
|
|
7483
8136
|
outline: 0,
|
|
8137
|
+
...colorSchemeStyles,
|
|
7484
8138
|
...hostHiddenStyles,
|
|
7485
8139
|
...buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
7486
8140
|
display: stretchValue ? 'block' : 'inline-block',
|
|
@@ -7509,8 +8163,15 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7509
8163
|
'&:hover .switch': {
|
|
7510
8164
|
borderColor: buttonBorderColorHover,
|
|
7511
8165
|
backgroundColor: buttonBackgroundColorHover,
|
|
8166
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8167
|
+
borderColor: buttonBorderColorHoverDark,
|
|
8168
|
+
backgroundColor: buttonBackgroundColorHoverDark,
|
|
8169
|
+
}),
|
|
7512
8170
|
'& .toggle': {
|
|
7513
8171
|
backgroundColor: toggleBackgroundColorHover,
|
|
8172
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8173
|
+
backgroundColor: toggleBackgroundColorHoverDark,
|
|
8174
|
+
}),
|
|
7514
8175
|
},
|
|
7515
8176
|
},
|
|
7516
8177
|
})),
|
|
@@ -7519,6 +8180,9 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7519
8180
|
position: 'absolute',
|
|
7520
8181
|
...getInsetJssStyle(-6),
|
|
7521
8182
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
8183
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8184
|
+
borderColor: focusColorDark,
|
|
8185
|
+
}),
|
|
7522
8186
|
borderRadius: '18px',
|
|
7523
8187
|
},
|
|
7524
8188
|
'&:not(:focus-visible) .switch::before': {
|
|
@@ -7536,6 +8200,10 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7536
8200
|
backgroundColor: buttonBackgroundColor,
|
|
7537
8201
|
cursor: isDisabledOrLoading(disabled, loading) ? 'not-allowed' : 'pointer',
|
|
7538
8202
|
transition: `${getTransition('background-color')},${getTransition('border-color')},${getTransition('color')}`,
|
|
8203
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8204
|
+
borderColor: buttonBorderColorDark,
|
|
8205
|
+
backgroundColor: buttonBackgroundColorDark,
|
|
8206
|
+
}),
|
|
7539
8207
|
},
|
|
7540
8208
|
toggle: {
|
|
7541
8209
|
position: 'absolute',
|
|
@@ -7546,6 +8214,9 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7546
8214
|
display: 'block',
|
|
7547
8215
|
borderRadius: '50%',
|
|
7548
8216
|
backgroundColor: toggleBackgroundColor,
|
|
8217
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8218
|
+
backgroundColor: toggleBackgroundColorDark,
|
|
8219
|
+
}),
|
|
7549
8220
|
transform: `translate3d(${checked ? '20px' : '0'}, 0, 0)`,
|
|
7550
8221
|
transition: `${getTransition('background-color')},${getTransition('transform')}`,
|
|
7551
8222
|
},
|
|
@@ -7564,6 +8235,9 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7564
8235
|
minWidth: 0,
|
|
7565
8236
|
minHeight: 0,
|
|
7566
8237
|
color: textColor,
|
|
8238
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8239
|
+
color: textColorDark,
|
|
8240
|
+
}),
|
|
7567
8241
|
...mergeDeep(buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
7568
8242
|
order: alignLabelValue === 'left' ? -1 : 0,
|
|
7569
8243
|
})), buildResponsiveStyles(hideLabel, getHiddenTextJssStyle)),
|
|
@@ -7609,6 +8283,7 @@ const cssVariableTableBorderColor = '--p-internal-table-border-color';
|
|
|
7609
8283
|
const cssVariableTableHeadCellIconFilter = '--p-internal-table-head-cell-icon-filter';
|
|
7610
8284
|
const getComponentCss$h = (theme) => {
|
|
7611
8285
|
const { primaryColor, hoverColor, contrastLowColor } = doGetThemedColors(theme);
|
|
8286
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastLowColor: contrastLowColorDark, } = doGetThemedColors('dark');
|
|
7612
8287
|
return getCss({
|
|
7613
8288
|
'@global': {
|
|
7614
8289
|
':host': addImportantToEachRule({
|
|
@@ -7616,12 +8291,21 @@ const getComponentCss$h = (theme) => {
|
|
|
7616
8291
|
...textSmallStyle,
|
|
7617
8292
|
color: primaryColor,
|
|
7618
8293
|
textAlign: 'left',
|
|
8294
|
+
...colorSchemeStyles,
|
|
7619
8295
|
...hostHiddenStyles,
|
|
8296
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8297
|
+
color: primaryColorDark,
|
|
8298
|
+
}),
|
|
7620
8299
|
}),
|
|
7621
8300
|
'::slotted(*)': addImportantToEachRule({
|
|
7622
8301
|
[cssVariableTableHoverColor]: hoverColor,
|
|
7623
8302
|
[cssVariableTableBorderColor]: contrastLowColor,
|
|
7624
8303
|
[cssVariableTableHeadCellIconFilter]: isThemeDark(theme) ? 'invert(100%)' : 'none',
|
|
8304
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8305
|
+
[cssVariableTableHoverColor]: hoverColorDark,
|
|
8306
|
+
[cssVariableTableBorderColor]: contrastLowColorDark,
|
|
8307
|
+
[cssVariableTableHeadCellIconFilter]: 'invert(100%)',
|
|
8308
|
+
}),
|
|
7625
8309
|
...(isHighContrastMode &&
|
|
7626
8310
|
getSchemedHighContrastMediaQuery({
|
|
7627
8311
|
[cssVariableTableHeadCellIconFilter]: 'none',
|
|
@@ -7776,11 +8460,21 @@ const targetSelectors = ['a', 'button'];
|
|
|
7776
8460
|
const transformSelector = (selector) => targetSelectors.map((tag) => selector.replace(/\[role]/g, tag)).join();
|
|
7777
8461
|
const getComponentCss$c = (size, weight, theme) => {
|
|
7778
8462
|
const { primaryColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
8463
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
7779
8464
|
const barJssStyle = {
|
|
7780
8465
|
position: 'absolute',
|
|
7781
8466
|
height: '2px',
|
|
7782
8467
|
left: 0,
|
|
7783
|
-
|
|
8468
|
+
...(isHighContrastMode
|
|
8469
|
+
? {
|
|
8470
|
+
background: getHighContrastColors().canvasTextColor,
|
|
8471
|
+
}
|
|
8472
|
+
: {
|
|
8473
|
+
background: primaryColor,
|
|
8474
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8475
|
+
background: primaryColorDark,
|
|
8476
|
+
}),
|
|
8477
|
+
}),
|
|
7784
8478
|
};
|
|
7785
8479
|
return getCss({
|
|
7786
8480
|
'@global': {
|
|
@@ -7788,6 +8482,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7788
8482
|
display: 'block',
|
|
7789
8483
|
...addImportantToEachRule({
|
|
7790
8484
|
position: 'relative',
|
|
8485
|
+
...colorSchemeStyles,
|
|
7791
8486
|
...hostHiddenStyles,
|
|
7792
8487
|
}),
|
|
7793
8488
|
},
|
|
@@ -7818,6 +8513,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7818
8513
|
cursor: 'pointer',
|
|
7819
8514
|
borderRadius: borderRadiusSmall,
|
|
7820
8515
|
zIndex: 0,
|
|
8516
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8517
|
+
color: primaryColorDark,
|
|
8518
|
+
}),
|
|
7821
8519
|
...hoverMediaQuery({
|
|
7822
8520
|
'&::before': {
|
|
7823
8521
|
content: '""',
|
|
@@ -7833,6 +8531,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7833
8531
|
[transformSelector('::slotted([role]:hover)::before')]: {
|
|
7834
8532
|
...frostedGlassStyle,
|
|
7835
8533
|
background: hoverColor,
|
|
8534
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8535
|
+
background: hoverColorDark,
|
|
8536
|
+
}),
|
|
7836
8537
|
},
|
|
7837
8538
|
}),
|
|
7838
8539
|
// basic invisible bar, that will be delayed via transition: visibility
|
|
@@ -7850,6 +8551,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7850
8551
|
// TODO: combine link-social-styles with link-button-styles and tabs-bar-styles
|
|
7851
8552
|
[transformSelector('::slotted([role]:focus:focus-visible)::before')]: {
|
|
7852
8553
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
8554
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8555
|
+
borderColor: focusColorDark,
|
|
8556
|
+
}),
|
|
7853
8557
|
},
|
|
7854
8558
|
[transformSelector('::slotted([role]:not(:last-child))')]: {
|
|
7855
8559
|
marginRight: spacingStaticMedium,
|
|
@@ -7887,20 +8591,27 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7887
8591
|
|
|
7888
8592
|
const getComponentCss$b = (theme) => {
|
|
7889
8593
|
const { primaryColor, focusColor } = getThemedColors(theme);
|
|
8594
|
+
const { primaryColor: primaryColorDark, focusColor: focusColorDark } = getThemedColors('dark');
|
|
7890
8595
|
return getCss({
|
|
7891
8596
|
'@global': {
|
|
7892
8597
|
':host': addImportantToEachRule({
|
|
7893
8598
|
display: 'block',
|
|
7894
8599
|
position: 'relative',
|
|
7895
8600
|
color: primaryColor,
|
|
7896
|
-
...hostHiddenStyles,
|
|
7897
8601
|
outline: 0,
|
|
8602
|
+
...hostHiddenStyles,
|
|
8603
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8604
|
+
color: primaryColorDark,
|
|
8605
|
+
}),
|
|
7898
8606
|
'&(:focus:focus-visible)::before': {
|
|
7899
8607
|
content: '""',
|
|
7900
8608
|
position: 'absolute',
|
|
7901
8609
|
...getInsetJssStyle(-4),
|
|
7902
8610
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
7903
8611
|
borderRadius: borderRadiusSmall,
|
|
8612
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8613
|
+
borderColor: focusColorDark,
|
|
8614
|
+
}),
|
|
7904
8615
|
},
|
|
7905
8616
|
}),
|
|
7906
8617
|
},
|
|
@@ -7912,7 +8623,10 @@ const getComponentCss$a = () => {
|
|
|
7912
8623
|
'@global': {
|
|
7913
8624
|
':host': {
|
|
7914
8625
|
display: 'block',
|
|
7915
|
-
...addImportantToEachRule(
|
|
8626
|
+
...addImportantToEachRule({
|
|
8627
|
+
...colorSchemeStyles,
|
|
8628
|
+
...hostHiddenStyles,
|
|
8629
|
+
}),
|
|
7916
8630
|
},
|
|
7917
8631
|
},
|
|
7918
8632
|
root: {
|
|
@@ -7950,14 +8664,18 @@ const getThemedBackgroundColor = (tagColor, themedColors) => {
|
|
|
7950
8664
|
|
|
7951
8665
|
const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
7952
8666
|
const themedColors = getThemedColors(theme);
|
|
8667
|
+
const themedColorsDark = getThemedColors('dark');
|
|
7953
8668
|
const { primaryColor, hoverColor, contrastHighColor } = themedColors;
|
|
8669
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastHighColor: contrastHighColorDark, } = themedColorsDark;
|
|
7954
8670
|
const backgroundColor = getThemedBackgroundColor(color, themedColors);
|
|
8671
|
+
const backgroundColorDark = getThemedBackgroundColor(color, themedColorsDark);
|
|
7955
8672
|
return getCss({
|
|
7956
8673
|
'@global': {
|
|
7957
8674
|
':host': addImportantToEachRule({
|
|
7958
8675
|
display: 'inline-block',
|
|
7959
8676
|
verticalAlign: 'top',
|
|
7960
8677
|
outline: 0,
|
|
8678
|
+
...colorSchemeStyles,
|
|
7961
8679
|
...hostHiddenStyles,
|
|
7962
8680
|
}),
|
|
7963
8681
|
button: {
|
|
@@ -7972,6 +8690,10 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
7972
8690
|
cursor: 'pointer',
|
|
7973
8691
|
background: backgroundColor,
|
|
7974
8692
|
color: primaryColor,
|
|
8693
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8694
|
+
background: backgroundColorDark,
|
|
8695
|
+
color: primaryColorDark,
|
|
8696
|
+
}),
|
|
7975
8697
|
textAlign: 'left',
|
|
7976
8698
|
...textSmallStyle,
|
|
7977
8699
|
outline: isHighContrastMode ? '1px solid transparent' : 0,
|
|
@@ -7979,6 +8701,9 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
7979
8701
|
...hoverMediaQuery({
|
|
7980
8702
|
'&:hover > .icon': {
|
|
7981
8703
|
backgroundColor: hoverColor,
|
|
8704
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8705
|
+
backgroundColor: hoverColorDark,
|
|
8706
|
+
}),
|
|
7982
8707
|
},
|
|
7983
8708
|
}),
|
|
7984
8709
|
},
|
|
@@ -7988,6 +8713,9 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
7988
8713
|
display: 'block',
|
|
7989
8714
|
marginBottom: '-4px',
|
|
7990
8715
|
color: contrastHighColor,
|
|
8716
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8717
|
+
color: contrastHighColorDark,
|
|
8718
|
+
}),
|
|
7991
8719
|
fontSize: fontSizeTextXSmall,
|
|
7992
8720
|
},
|
|
7993
8721
|
}),
|
|
@@ -8027,14 +8755,19 @@ const getColors = (themedColors, tagColor, theme) => {
|
|
|
8027
8755
|
};
|
|
8028
8756
|
const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
8029
8757
|
const themedColors = getThemedColors(theme);
|
|
8758
|
+
const themedColorsDark = getThemedColors('dark');
|
|
8030
8759
|
const { primaryColor, backgroundColor, backgroundHoverColor } = getColors(themedColors, tagColor, theme);
|
|
8760
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, backgroundHoverColor: backgroundHoverColorDark, } = getColors(themedColorsDark, tagColor, 'dark');
|
|
8031
8761
|
return getCss({
|
|
8032
8762
|
'@global': {
|
|
8033
8763
|
':host': {
|
|
8034
8764
|
display: 'inline-flex',
|
|
8035
8765
|
verticalAlign: 'top',
|
|
8036
8766
|
whiteSpace: 'nowrap',
|
|
8037
|
-
...addImportantToEachRule(
|
|
8767
|
+
...addImportantToEachRule({
|
|
8768
|
+
...colorSchemeStyles,
|
|
8769
|
+
...hostHiddenStyles,
|
|
8770
|
+
}),
|
|
8038
8771
|
},
|
|
8039
8772
|
span: {
|
|
8040
8773
|
display: 'flex',
|
|
@@ -8045,6 +8778,10 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8045
8778
|
borderRadius: borderRadiusSmall,
|
|
8046
8779
|
background: backgroundColor,
|
|
8047
8780
|
color: primaryColor,
|
|
8781
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8782
|
+
background: backgroundColorDark,
|
|
8783
|
+
color: primaryColorDark,
|
|
8784
|
+
}),
|
|
8048
8785
|
font: textXSmallStyle.font,
|
|
8049
8786
|
...(isHighContrastMode && {
|
|
8050
8787
|
outline: '1px solid transparent',
|
|
@@ -8054,6 +8791,9 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8054
8791
|
transition: getTransition('background-color'),
|
|
8055
8792
|
'&:hover': {
|
|
8056
8793
|
background: backgroundHoverColor,
|
|
8794
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8795
|
+
background: backgroundHoverColorDark,
|
|
8796
|
+
}),
|
|
8057
8797
|
},
|
|
8058
8798
|
})),
|
|
8059
8799
|
},
|
|
@@ -8083,6 +8823,11 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8083
8823
|
icon: {
|
|
8084
8824
|
marginLeft: '-2px',
|
|
8085
8825
|
alignSelf: 'flex-start',
|
|
8826
|
+
...(['neutral-contrast-high', 'primary'].includes(tagColor) && {
|
|
8827
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8828
|
+
filter: 'invert(1)',
|
|
8829
|
+
}),
|
|
8830
|
+
}),
|
|
8086
8831
|
},
|
|
8087
8832
|
});
|
|
8088
8833
|
};
|
|
@@ -8120,6 +8865,7 @@ const getButtonOrIconOffsetHorizontal = (buttonOrIconAmount) => {
|
|
|
8120
8865
|
};
|
|
8121
8866
|
const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter, unitPosition, inputType, showPasswordToggle, isWithinForm, theme) => {
|
|
8122
8867
|
const { contrastMediumColor } = getThemedColors(theme);
|
|
8868
|
+
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
8123
8869
|
const isSearch = isType(inputType, 'search');
|
|
8124
8870
|
const isPassword = isType(inputType, 'password');
|
|
8125
8871
|
const isNumber = isType(inputType, 'number');
|
|
@@ -8138,6 +8884,7 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
8138
8884
|
[cssVariableInputPaddingRight]: isSearchOrPassword || isCalendarOrTimeWithCustomIndicator
|
|
8139
8885
|
? getInputPaddingHorizontal(isSearchWithForm ? 2 : 1)
|
|
8140
8886
|
: spacingStaticMedium,
|
|
8887
|
+
...colorSchemeStyles,
|
|
8141
8888
|
...hostHiddenStyles,
|
|
8142
8889
|
}),
|
|
8143
8890
|
},
|
|
@@ -8185,6 +8932,9 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
8185
8932
|
padding: unitPosition === 'suffix' ? `0 ${spacingStaticMedium} 0 10px` : `0 10px 0 ${spacingStaticMedium}`,
|
|
8186
8933
|
font: textSmallStyle.font,
|
|
8187
8934
|
color: contrastMediumColor,
|
|
8935
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8936
|
+
color: contrastMediumColorDark,
|
|
8937
|
+
}),
|
|
8188
8938
|
},
|
|
8189
8939
|
}),
|
|
8190
8940
|
...getFunctionalComponentRequiredStyles(),
|
|
@@ -8216,18 +8966,22 @@ const getComponentCss$6 = (type, theme) => {
|
|
|
8216
8966
|
display: 'block',
|
|
8217
8967
|
...addImportantToEachRule({
|
|
8218
8968
|
counterReset: counter,
|
|
8969
|
+
...colorSchemeStyles,
|
|
8219
8970
|
...hostHiddenStyles,
|
|
8220
8971
|
}),
|
|
8221
8972
|
},
|
|
8222
8973
|
'ol,ul': {
|
|
8223
8974
|
...textSmallStyle,
|
|
8224
|
-
color: getThemedColors(theme).primaryColor,
|
|
8225
8975
|
margin: 0,
|
|
8226
8976
|
padding: `var(${cssVariablePaddingTop},0) 0 var(${cssVariablePaddingBottom},0) ${isOrderedList
|
|
8227
8977
|
? `var(${cssVariableOrderedPaddingLeft},1.5rem)` // reserves space for ::before (root ordered list)
|
|
8228
8978
|
: `var(${cssVariableUnorderedPaddingLeft},.375rem)` // reserves space for ::marker "•" (root unordered list)
|
|
8229
8979
|
}`,
|
|
8230
|
-
listStyleType: isOrderedList ? 'none' : `var(${cssVariableListStyleType},'•')`,
|
|
8980
|
+
listStyleType: isOrderedList ? 'none' : `var(${cssVariableListStyleType},'•')`,
|
|
8981
|
+
color: getThemedColors(theme).primaryColor,
|
|
8982
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8983
|
+
color: getThemedColors('dark').primaryColor,
|
|
8984
|
+
}),
|
|
8231
8985
|
},
|
|
8232
8986
|
// css selector for text-list-item
|
|
8233
8987
|
'::slotted(*)': addImportantToEachRule({
|
|
@@ -8286,7 +9040,10 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis, theme) => {
|
|
|
8286
9040
|
'@global': {
|
|
8287
9041
|
':host': {
|
|
8288
9042
|
display: 'block',
|
|
8289
|
-
...addImportantToEachRule(
|
|
9043
|
+
...addImportantToEachRule({
|
|
9044
|
+
...colorSchemeStyles,
|
|
9045
|
+
...hostHiddenStyles,
|
|
9046
|
+
}),
|
|
8290
9047
|
},
|
|
8291
9048
|
'::slotted': {
|
|
8292
9049
|
[TEXT_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -8301,10 +9058,12 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis, theme) => {
|
|
|
8301
9058
|
|
|
8302
9059
|
const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
8303
9060
|
const { contrastMediumColor } = getThemedColors(theme);
|
|
9061
|
+
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
8304
9062
|
return getCss({
|
|
8305
9063
|
'@global': {
|
|
8306
9064
|
':host': addImportantToEachRule({
|
|
8307
9065
|
display: 'block',
|
|
9066
|
+
...colorSchemeStyles,
|
|
8308
9067
|
...hostHiddenStyles,
|
|
8309
9068
|
}),
|
|
8310
9069
|
...mergeDeep(addImportantToEachRule(getBaseChildStyles('textarea', state, theme, {
|
|
@@ -8326,6 +9085,9 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
8326
9085
|
zIndex: 1,
|
|
8327
9086
|
font: textSmallStyle.font,
|
|
8328
9087
|
color: contrastMediumColor,
|
|
9088
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9089
|
+
color: contrastMediumColorDark,
|
|
9090
|
+
}),
|
|
8329
9091
|
},
|
|
8330
9092
|
}),
|
|
8331
9093
|
...getFunctionalComponentRequiredStyles(),
|
|
@@ -8381,6 +9143,7 @@ const getComponentCss$1 = () => {
|
|
|
8381
9143
|
[cssVariablePositionBottomInternal]: `var(${cssVariablePositionBottom}, 64px)`,
|
|
8382
9144
|
bottom: `var(${cssVariablePositionBottomInternal})`,
|
|
8383
9145
|
},
|
|
9146
|
+
...colorSchemeStyles,
|
|
8384
9147
|
...hostHiddenStyles,
|
|
8385
9148
|
}),
|
|
8386
9149
|
'@keyframes in': getKeyframesMobile('in', cssVariablePositionBottomInternal),
|
|
@@ -8414,6 +9177,7 @@ const getComponentCss = (size, theme) => {
|
|
|
8414
9177
|
height: 'round(down, clamp(0.63rem, 0.42vw + 0.5rem, 1rem), 1px)',
|
|
8415
9178
|
},
|
|
8416
9179
|
}),
|
|
9180
|
+
...colorSchemeStyles,
|
|
8417
9181
|
...hostHiddenStyles,
|
|
8418
9182
|
}),
|
|
8419
9183
|
},
|
|
@@ -8427,49 +9191,57 @@ const getComponentCss = (size, theme) => {
|
|
|
8427
9191
|
textDecoration: 'none',
|
|
8428
9192
|
...focusPseudoJssStyle,
|
|
8429
9193
|
},
|
|
8430
|
-
svg:
|
|
8431
|
-
|
|
8432
|
-
|
|
9194
|
+
svg: isHighContrastMode
|
|
9195
|
+
? {
|
|
9196
|
+
fill: getHighContrastColors().canvasTextColor,
|
|
9197
|
+
}
|
|
9198
|
+
: {
|
|
9199
|
+
fill: getThemedColors(theme).primaryColor,
|
|
9200
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9201
|
+
fill: getThemedColors('dark').primaryColor,
|
|
9202
|
+
}),
|
|
9203
|
+
},
|
|
8433
9204
|
},
|
|
8434
9205
|
});
|
|
8435
9206
|
};
|
|
8436
9207
|
|
|
8437
|
-
exports.getAccordionCss = getComponentCss
|
|
8438
|
-
exports.getBannerCss = getComponentCss
|
|
8439
|
-
exports.getButtonCss = getComponentCss$
|
|
8440
|
-
exports.getButtonGroupCss = getComponentCss$
|
|
8441
|
-
exports.getButtonPureCss = getComponentCss$
|
|
8442
|
-
exports.getButtonTileCss = getComponentCss$
|
|
8443
|
-
exports.getCarouselCss = getComponentCss$
|
|
8444
|
-
exports.getCheckboxWrapperCss = getComponentCss$
|
|
8445
|
-
exports.getContentWrapperCss = getComponentCss$
|
|
8446
|
-
exports.getCrestCss = getComponentCss$
|
|
8447
|
-
exports.getDisplayCss = getComponentCss$
|
|
8448
|
-
exports.getDividerCss = getComponentCss$
|
|
8449
|
-
exports.getFieldsetCss = getComponentCss$
|
|
8450
|
-
exports.getFieldsetWrapperCss = getComponentCss$
|
|
8451
|
-
exports.getFlexCss = getComponentCss$
|
|
8452
|
-
exports.getFlexItemCss = getComponentCss$
|
|
8453
|
-
exports.getFlyoutCss = getComponentCss$
|
|
9208
|
+
exports.getAccordionCss = getComponentCss$10;
|
|
9209
|
+
exports.getBannerCss = getComponentCss$$;
|
|
9210
|
+
exports.getButtonCss = getComponentCss$X;
|
|
9211
|
+
exports.getButtonGroupCss = getComponentCss$_;
|
|
9212
|
+
exports.getButtonPureCss = getComponentCss$Z;
|
|
9213
|
+
exports.getButtonTileCss = getComponentCss$Y;
|
|
9214
|
+
exports.getCarouselCss = getComponentCss$W;
|
|
9215
|
+
exports.getCheckboxWrapperCss = getComponentCss$V;
|
|
9216
|
+
exports.getContentWrapperCss = getComponentCss$U;
|
|
9217
|
+
exports.getCrestCss = getComponentCss$T;
|
|
9218
|
+
exports.getDisplayCss = getComponentCss$S;
|
|
9219
|
+
exports.getDividerCss = getComponentCss$R;
|
|
9220
|
+
exports.getFieldsetCss = getComponentCss$P;
|
|
9221
|
+
exports.getFieldsetWrapperCss = getComponentCss$Q;
|
|
9222
|
+
exports.getFlexCss = getComponentCss$N;
|
|
9223
|
+
exports.getFlexItemCss = getComponentCss$O;
|
|
9224
|
+
exports.getFlyoutCss = getComponentCss$M;
|
|
8454
9225
|
exports.getFunctionalComponentRequiredStyles = getFunctionalComponentRequiredStyles;
|
|
8455
9226
|
exports.getFunctionalComponentStateMessageStyles = getFunctionalComponentStateMessageStyles;
|
|
8456
|
-
exports.getGridCss = getComponentCss$
|
|
8457
|
-
exports.getGridItemCss = getComponentCss$
|
|
8458
|
-
exports.getHeadingCss = getComponentCss$
|
|
8459
|
-
exports.getHeadlineCss = getComponentCss$
|
|
8460
|
-
exports.getIconCss = getComponentCss$
|
|
8461
|
-
exports.getInlineNotificationCss = getComponentCss$
|
|
8462
|
-
exports.getLinkCss = getComponentCss$
|
|
8463
|
-
exports.getLinkPureCss = getComponentCss$
|
|
8464
|
-
exports.getLinkSocialCss = getComponentCss$
|
|
8465
|
-
exports.getLinkTileCss = getComponentCss$
|
|
8466
|
-
exports.getLinkTileModelSignatureCss = getComponentCss$
|
|
8467
|
-
exports.getMarqueCss = getComponentCss$
|
|
8468
|
-
exports.getModalCss = getComponentCss$
|
|
8469
|
-
exports.getModelSignatureCss = getComponentCss$
|
|
8470
|
-
exports.getMultiSelectCss = getComponentCss$
|
|
8471
|
-
exports.getMultiSelectOptionCss = getComponentCss$
|
|
8472
|
-
exports.getPaginationCss = getComponentCss$
|
|
9227
|
+
exports.getGridCss = getComponentCss$K;
|
|
9228
|
+
exports.getGridItemCss = getComponentCss$L;
|
|
9229
|
+
exports.getHeadingCss = getComponentCss$J;
|
|
9230
|
+
exports.getHeadlineCss = getComponentCss$I;
|
|
9231
|
+
exports.getIconCss = getComponentCss$H;
|
|
9232
|
+
exports.getInlineNotificationCss = getComponentCss$G;
|
|
9233
|
+
exports.getLinkCss = getComponentCss$E;
|
|
9234
|
+
exports.getLinkPureCss = getComponentCss$F;
|
|
9235
|
+
exports.getLinkSocialCss = getComponentCss$E;
|
|
9236
|
+
exports.getLinkTileCss = getComponentCss$C;
|
|
9237
|
+
exports.getLinkTileModelSignatureCss = getComponentCss$D;
|
|
9238
|
+
exports.getMarqueCss = getComponentCss$B;
|
|
9239
|
+
exports.getModalCss = getComponentCss$A;
|
|
9240
|
+
exports.getModelSignatureCss = getComponentCss$z;
|
|
9241
|
+
exports.getMultiSelectCss = getComponentCss$x;
|
|
9242
|
+
exports.getMultiSelectOptionCss = getComponentCss$y;
|
|
9243
|
+
exports.getPaginationCss = getComponentCss$w;
|
|
9244
|
+
exports.getPinCodeCss = getComponentCss$v;
|
|
8473
9245
|
exports.getPopoverCss = getComponentCss$u;
|
|
8474
9246
|
exports.getRadioButtonWrapperCss = getComponentCss$t;
|
|
8475
9247
|
exports.getScrollerCss = getComponentCss$s;
|