@porsche-design-system/components-react 3.7.0-rc.0 → 3.7.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/LICENSE.md +115 -0
- package/cjs/lib/components/pin-code.wrapper.cjs +26 -0
- package/cjs/lib/components/radio-button-wrapper.wrapper.cjs +3 -3
- package/cjs/public-api.cjs +2 -0
- package/esm/lib/components/accordion.wrapper.d.ts +1 -1
- package/esm/lib/components/banner.wrapper.d.ts +1 -1
- package/esm/lib/components/button-pure.wrapper.d.ts +1 -1
- package/esm/lib/components/button-tile.wrapper.d.ts +1 -1
- package/esm/lib/components/button.wrapper.d.ts +1 -1
- package/esm/lib/components/carousel.wrapper.d.ts +1 -1
- package/esm/lib/components/checkbox-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/content-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/display.wrapper.d.ts +1 -1
- package/esm/lib/components/divider.wrapper.d.ts +1 -1
- package/esm/lib/components/fieldset-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/fieldset.wrapper.d.ts +1 -1
- package/esm/lib/components/flyout.wrapper.d.ts +1 -1
- package/esm/lib/components/heading.wrapper.d.ts +1 -1
- package/esm/lib/components/headline.wrapper.d.ts +1 -1
- package/esm/lib/components/icon.wrapper.d.ts +1 -1
- package/esm/lib/components/index.d.ts +1 -0
- package/esm/lib/components/inline-notification.wrapper.d.ts +1 -1
- package/esm/lib/components/link-pure.wrapper.d.ts +1 -1
- package/esm/lib/components/link-social.wrapper.d.ts +1 -1
- package/esm/lib/components/link-tile.wrapper.d.ts +1 -1
- package/esm/lib/components/link.wrapper.d.ts +1 -1
- package/esm/lib/components/modal.wrapper.d.ts +4 -2
- package/esm/lib/components/model-signature.wrapper.d.ts +1 -1
- package/esm/lib/components/multi-select.wrapper.d.ts +1 -1
- package/esm/lib/components/pagination.wrapper.d.ts +1 -1
- package/esm/lib/components/pin-code.wrapper.d.ts +120 -0
- package/esm/lib/components/pin-code.wrapper.mjs +24 -0
- package/esm/lib/components/popover.wrapper.d.ts +1 -1
- package/esm/lib/components/radio-button-wrapper.wrapper.d.ts +9 -1
- package/esm/lib/components/radio-button-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/scroller.wrapper.d.ts +1 -1
- package/esm/lib/components/segmented-control.wrapper.d.ts +1 -1
- package/esm/lib/components/select-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/spinner.wrapper.d.ts +1 -1
- package/esm/lib/components/stepper-horizontal.wrapper.d.ts +1 -1
- package/esm/lib/components/switch.wrapper.d.ts +1 -1
- package/esm/lib/components/table.wrapper.d.ts +1 -1
- package/esm/lib/components/tabs-bar.wrapper.d.ts +1 -1
- package/esm/lib/components/tabs.wrapper.d.ts +1 -1
- package/esm/lib/components/tag-dismissible.wrapper.d.ts +1 -1
- package/esm/lib/components/tag.wrapper.d.ts +1 -1
- package/esm/lib/components/text-field-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/text-list.wrapper.d.ts +1 -1
- package/esm/lib/components/text.wrapper.d.ts +1 -1
- package/esm/lib/components/textarea-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/toast.wrapper.d.ts +1 -1
- package/esm/lib/components/wordmark.wrapper.d.ts +1 -1
- package/esm/lib/types.d.ts +18 -2
- package/esm/public-api.mjs +1 -0
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +1027 -250
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +19 -17
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/pin-code.wrapper.cjs +40 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +8 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +6 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +96 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.cjs +68 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-head-cell.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/public-api.cjs +2 -0
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +993 -217
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +19 -17
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pin-code.wrapper.mjs +38 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +10 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/content-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.mjs +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.mjs +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/marque.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/model-signature.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +8 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +94 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.mjs +68 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-head-cell.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/public-api.mjs +1 -0
- package/ssr/esm/lib/components/index.d.ts +1 -0
- package/ssr/esm/lib/components/modal.wrapper.d.ts +4 -2
- package/ssr/esm/lib/components/pin-code.wrapper.d.ts +120 -0
- package/ssr/esm/lib/components/radio-button-wrapper.wrapper.d.ts +8 -0
- package/ssr/esm/lib/dsr-components/carousel.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/pin-code.d.ts +9 -0
- package/ssr/esm/lib/types.d.ts +18 -2
- package/LICENSE +0 -59
|
@@ -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,
|
|
@@ -5438,20 +5627,26 @@ const headerShadowClass = 'header--shadow';
|
|
|
5438
5627
|
const footerShadowClass$1 = 'footer--shadow';
|
|
5439
5628
|
const flyoutTransitionDuration = '0.5s';
|
|
5440
5629
|
const flyoutTransitionTimingFunction = 'cubic-bezier(0.77, 0, 0.175, 1)';
|
|
5630
|
+
const cssVariableWidth = '--p-flyout-width';
|
|
5441
5631
|
const cssVariableMaxWidth = '--p-flyout-max-width';
|
|
5442
5632
|
const maxWidthDefault = '1180px';
|
|
5443
5633
|
const minWidthDefault = '320px';
|
|
5444
|
-
const getComponentCss$
|
|
5634
|
+
const getComponentCss$M = (isOpen, position, hasHeader, hasFooter, hasSubFooter, theme) => {
|
|
5445
5635
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
5636
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
5446
5637
|
const { contrastHighColor: darkThemeContrastHighColor } = getThemedColors('dark');
|
|
5447
5638
|
const isPositionLeft = position === 'left';
|
|
5448
|
-
const contentPadding = `${spacingStaticMedium} ${spacingFluidLarge}
|
|
5639
|
+
const contentPadding = `${spacingStaticMedium} ${spacingFluidLarge}`;
|
|
5449
5640
|
const isDark = isThemeDark(theme);
|
|
5450
5641
|
const shadowColor = isDark ? scrollShadowColorDark : scrollShadowColor;
|
|
5451
|
-
const
|
|
5642
|
+
const transparentColorDark = 'rgba(14, 14, 18, 0)';
|
|
5643
|
+
const transparentColor = isDark ? transparentColorDark : 'rgba(255, 255, 255, 0)';
|
|
5452
5644
|
return getCss({
|
|
5453
5645
|
'@global': addImportantToEachRule({
|
|
5454
5646
|
':host': {
|
|
5647
|
+
// needed for correct alignment of the Porsche Grid within the Flyout
|
|
5648
|
+
'--pds-internal-grid-outer-column': `calc(${spacingFluidLarge} - ${gridGap})`,
|
|
5649
|
+
'--pds-internal-grid-margin': `calc(${spacingFluidLarge} * -1)`,
|
|
5455
5650
|
display: 'flex',
|
|
5456
5651
|
position: 'fixed',
|
|
5457
5652
|
zIndex: FLYOUT_Z_INDEX,
|
|
@@ -5465,6 +5660,7 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5465
5660
|
}),
|
|
5466
5661
|
...getInsetJssStyle(),
|
|
5467
5662
|
...getFrostedGlassBackgroundJssStyles(isOpen, flyoutTransitionDuration),
|
|
5663
|
+
...colorSchemeStyles,
|
|
5468
5664
|
...hostHiddenStyles,
|
|
5469
5665
|
},
|
|
5470
5666
|
}),
|
|
@@ -5475,12 +5671,18 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5475
5671
|
}),
|
|
5476
5672
|
justifyContent: 'flex-end',
|
|
5477
5673
|
background: backgroundColor,
|
|
5674
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5675
|
+
background: backgroundColorDark,
|
|
5676
|
+
}),
|
|
5478
5677
|
position: 'sticky',
|
|
5479
5678
|
top: 0,
|
|
5480
|
-
zIndex:
|
|
5679
|
+
zIndex: 2,
|
|
5481
5680
|
},
|
|
5482
5681
|
[headerShadowClass]: {
|
|
5483
5682
|
boxShadow: `${isDark ? scrollShadowColorDark : scrollShadowColor} 0px 5px 10px`,
|
|
5683
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5684
|
+
boxShadow: `${scrollShadowColorDark} 0px 5px 10px`,
|
|
5685
|
+
}),
|
|
5484
5686
|
},
|
|
5485
5687
|
...(hasHeader && {
|
|
5486
5688
|
'header-content': {
|
|
@@ -5494,6 +5696,10 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5494
5696
|
border: `2px solid ${backgroundColor}`,
|
|
5495
5697
|
borderRadius: '4px',
|
|
5496
5698
|
background: backgroundColor,
|
|
5699
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5700
|
+
borderColor: backgroundColorDark,
|
|
5701
|
+
background: backgroundColorDark,
|
|
5702
|
+
}),
|
|
5497
5703
|
...hoverMediaQuery({
|
|
5498
5704
|
'&:hover': {
|
|
5499
5705
|
background: darkThemeContrastHighColor,
|
|
@@ -5512,6 +5718,7 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5512
5718
|
overflowY: 'auto',
|
|
5513
5719
|
overscrollBehaviorY: 'none',
|
|
5514
5720
|
}),
|
|
5721
|
+
width: `var(${cssVariableWidth}, auto)`,
|
|
5515
5722
|
height: '100%',
|
|
5516
5723
|
minWidth: minWidthDefault,
|
|
5517
5724
|
maxWidth: `var(${cssVariableMaxWidth}, ${maxWidthDefault})`,
|
|
@@ -5520,6 +5727,10 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5520
5727
|
transform: isOpen ? 'initial' : `translate3d(${isPositionLeft ? '-100%' : '100%'}, 0, 0)`,
|
|
5521
5728
|
transition: `opacity ${flyoutTransitionDuration} ${flyoutTransitionTimingFunction} ${isOpen ? '0s' : flyoutTransitionDuration}, transform ${flyoutTransitionDuration} ${flyoutTransitionTimingFunction}`,
|
|
5522
5729
|
boxShadow: `${isPositionLeft ? '3px' : '-3px'} 0px 30px rgba(0, 0, 0, 0.25)`,
|
|
5730
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5731
|
+
color: primaryColorDark,
|
|
5732
|
+
background: backgroundColorDark,
|
|
5733
|
+
}),
|
|
5523
5734
|
},
|
|
5524
5735
|
content: {
|
|
5525
5736
|
padding: contentPadding,
|
|
@@ -5535,6 +5746,9 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5535
5746
|
backgroundSize: '100% 20px, 100% 20px, 100% 10px, 100% 10px',
|
|
5536
5747
|
backgroundAttachment: 'local, local, scroll, scroll',
|
|
5537
5748
|
overscrollBehaviorY: 'none',
|
|
5749
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5750
|
+
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})`,
|
|
5751
|
+
}),
|
|
5538
5752
|
}),
|
|
5539
5753
|
},
|
|
5540
5754
|
...(hasFooter && {
|
|
@@ -5544,9 +5758,15 @@ const getComponentCss$L = (isOpen, position, hasHeader, hasFooter, hasSubFooter,
|
|
|
5544
5758
|
position: 'sticky',
|
|
5545
5759
|
zIndex: 1,
|
|
5546
5760
|
bottom: 0,
|
|
5761
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5762
|
+
background: backgroundColorDark,
|
|
5763
|
+
}),
|
|
5547
5764
|
},
|
|
5548
5765
|
[footerShadowClass$1]: {
|
|
5549
5766
|
boxShadow: `${isDark ? scrollShadowColorDark : scrollShadowColor} 0px -5px 10px`,
|
|
5767
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5768
|
+
boxShadow: `${scrollShadowColorDark} 0px -5px 10px`,
|
|
5769
|
+
}),
|
|
5550
5770
|
},
|
|
5551
5771
|
}),
|
|
5552
5772
|
...(hasSubFooter && {
|
|
@@ -5561,7 +5781,7 @@ const gutter$1 = `calc(${gridGap} / 2)`;
|
|
|
5561
5781
|
const gridItemWidths = [
|
|
5562
5782
|
0, 8.333333, 16.666667, 25, 33.333333, 41.666667, 50, 58.333333, 66.666667, 75, 83.333333, 91.666667, 100,
|
|
5563
5783
|
];
|
|
5564
|
-
const getComponentCss$
|
|
5784
|
+
const getComponentCss$L = (size, offset) => {
|
|
5565
5785
|
return getCss({
|
|
5566
5786
|
'@global': {
|
|
5567
5787
|
':host': addImportantToEachRule({
|
|
@@ -5581,7 +5801,7 @@ const getComponentCss$K = (size, offset) => {
|
|
|
5581
5801
|
};
|
|
5582
5802
|
|
|
5583
5803
|
const gutter = `calc(${gridGap} / -2)`;
|
|
5584
|
-
const getComponentCss$
|
|
5804
|
+
const getComponentCss$K = (direction, wrap) => {
|
|
5585
5805
|
return getCss({
|
|
5586
5806
|
'@global': {
|
|
5587
5807
|
':host': addImportantToEachRule({
|
|
@@ -5590,6 +5810,7 @@ const getComponentCss$J = (direction, wrap) => {
|
|
|
5590
5810
|
width: 'auto',
|
|
5591
5811
|
marginLeft: gutter,
|
|
5592
5812
|
marginRight: gutter,
|
|
5813
|
+
...colorSchemeStyles,
|
|
5593
5814
|
...hostHiddenStyles,
|
|
5594
5815
|
...mergeDeep(buildResponsiveStyles(direction, (flexDirection) => ({ flexDirection })), buildResponsiveStyles(wrap, (flexWrap) => ({ flexWrap }))),
|
|
5595
5816
|
}),
|
|
@@ -5604,12 +5825,15 @@ const sizeMap$3 = {
|
|
|
5604
5825
|
'x-large': fontSizeHeadingXLarge,
|
|
5605
5826
|
'xx-large': fontSizeHeadingXXLarge,
|
|
5606
5827
|
};
|
|
5607
|
-
const getComponentCss$
|
|
5828
|
+
const getComponentCss$J = (size, align, color, ellipsis, theme) => {
|
|
5608
5829
|
return getCss({
|
|
5609
5830
|
'@global': {
|
|
5610
5831
|
':host': {
|
|
5611
5832
|
display: 'block',
|
|
5612
|
-
...addImportantToEachRule(
|
|
5833
|
+
...addImportantToEachRule({
|
|
5834
|
+
...colorSchemeStyles,
|
|
5835
|
+
...hostHiddenStyles,
|
|
5836
|
+
}),
|
|
5613
5837
|
},
|
|
5614
5838
|
'::slotted': {
|
|
5615
5839
|
[HEADING_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -5663,12 +5887,15 @@ const getTextSizeJssStyle = (textSize) => {
|
|
|
5663
5887
|
fontSize: textSize === 'inherit' ? textSize : textSizeMap[textSize],
|
|
5664
5888
|
};
|
|
5665
5889
|
};
|
|
5666
|
-
const getComponentCss$
|
|
5890
|
+
const getComponentCss$I = (variant, align, color, ellipsis, theme) => {
|
|
5667
5891
|
return getCss({
|
|
5668
5892
|
'@global': {
|
|
5669
5893
|
':host': {
|
|
5670
5894
|
display: 'block',
|
|
5671
|
-
...addImportantToEachRule(
|
|
5895
|
+
...addImportantToEachRule({
|
|
5896
|
+
...colorSchemeStyles,
|
|
5897
|
+
...hostHiddenStyles,
|
|
5898
|
+
}),
|
|
5672
5899
|
},
|
|
5673
5900
|
'::slotted': {
|
|
5674
5901
|
[HEADLINE_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -5712,29 +5939,32 @@ const sizeMap$2 = {
|
|
|
5712
5939
|
large: fontSizeTextLarge,
|
|
5713
5940
|
'x-large': fontSizeTextXLarge,
|
|
5714
5941
|
};
|
|
5715
|
-
const
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5942
|
+
const filterLight = {
|
|
5943
|
+
primary: filterLightPrimary,
|
|
5944
|
+
'state-disabled': filterLightDisabled,
|
|
5945
|
+
'contrast-low': filterLightContrastLow,
|
|
5946
|
+
'contrast-medium': filterLightContrastMedium,
|
|
5947
|
+
'contrast-high': filterLightContrastHigh,
|
|
5948
|
+
'notification-success': filterLightNotificationSuccess,
|
|
5949
|
+
'notification-warning': filterLightNotificationWarning,
|
|
5950
|
+
'notification-error': filterLightNotificationError,
|
|
5951
|
+
'notification-info': filterLightNotificationInfo,
|
|
5952
|
+
};
|
|
5953
|
+
const filterDark = {
|
|
5954
|
+
primary: filterDarkPrimary,
|
|
5955
|
+
'state-disabled': filterDarkDisabled,
|
|
5956
|
+
'contrast-low': filterDarkContrastLow,
|
|
5957
|
+
'contrast-medium': filterDarkContrastMedium,
|
|
5958
|
+
'contrast-high': filterDarkContrastHigh,
|
|
5959
|
+
'notification-success': filterDarkNotificationSuccess,
|
|
5960
|
+
'notification-warning': filterDarkNotificationWarning,
|
|
5961
|
+
'notification-error': filterDarkNotificationError,
|
|
5962
|
+
'notification-info': filterDarkNotificationInfo,
|
|
5963
|
+
};
|
|
5964
|
+
const filterMap = {
|
|
5965
|
+
auto: filterLight,
|
|
5966
|
+
light: filterLight,
|
|
5967
|
+
dark: filterDark,
|
|
5738
5968
|
};
|
|
5739
5969
|
const forceRerenderAnimationStyle = {
|
|
5740
5970
|
'0%': {
|
|
@@ -5746,7 +5976,7 @@ const forceRerenderAnimationStyle = {
|
|
|
5746
5976
|
};
|
|
5747
5977
|
const keyFramesLight = 'rerender-light';
|
|
5748
5978
|
const keyFramesDark = 'rerender-dark';
|
|
5749
|
-
const getComponentCss$
|
|
5979
|
+
const getComponentCss$H = (color, size, theme) => {
|
|
5750
5980
|
const isColorInherit = color === 'inherit';
|
|
5751
5981
|
const isSizeInherit = size === 'inherit';
|
|
5752
5982
|
const isDark = isThemeDark(theme);
|
|
@@ -5755,7 +5985,10 @@ const getComponentCss$G = (color, size, theme) => {
|
|
|
5755
5985
|
':host': {
|
|
5756
5986
|
display: 'inline-block',
|
|
5757
5987
|
verticalAlign: 'top',
|
|
5758
|
-
...addImportantToEachRule(
|
|
5988
|
+
...addImportantToEachRule({
|
|
5989
|
+
...colorSchemeStyles,
|
|
5990
|
+
...hostHiddenStyles,
|
|
5991
|
+
}),
|
|
5759
5992
|
},
|
|
5760
5993
|
img: {
|
|
5761
5994
|
display: 'block',
|
|
@@ -5763,12 +5996,15 @@ const getComponentCss$G = (color, size, theme) => {
|
|
|
5763
5996
|
padding: 0,
|
|
5764
5997
|
pointerEvents: 'none',
|
|
5765
5998
|
...(!isColorInherit && {
|
|
5766
|
-
filter:
|
|
5999
|
+
filter: filterMap[theme][color],
|
|
6000
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6001
|
+
filter: filterMap.dark[color],
|
|
6002
|
+
}),
|
|
5767
6003
|
...(isHighContrastMode &&
|
|
5768
6004
|
getSchemedHighContrastMediaQuery({
|
|
5769
|
-
filter:
|
|
6005
|
+
filter: filterMap.light[color],
|
|
5770
6006
|
}, {
|
|
5771
|
-
filter:
|
|
6007
|
+
filter: filterMap.dark[color],
|
|
5772
6008
|
})),
|
|
5773
6009
|
WebkitAnimation: `${isDark ? `${keyFramesDark}-${color}` : `${keyFramesLight}-${color}`} 1ms`, // needed to enforce repaint in Safari if theme is switched programmatically.
|
|
5774
6010
|
}),
|
|
@@ -5812,6 +6048,9 @@ const getNotificationRootJssStyle = (state, hasAction, hasClose, theme) => {
|
|
|
5812
6048
|
placeItems: 'start',
|
|
5813
6049
|
padding: spacingStaticMedium,
|
|
5814
6050
|
background: getBackgroundColor(state, theme),
|
|
6051
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6052
|
+
background: getBackgroundColor(state, 'dark'),
|
|
6053
|
+
}),
|
|
5815
6054
|
borderRadius: borderRadiusSmall,
|
|
5816
6055
|
...(isHighContrastMode && {
|
|
5817
6056
|
outline: '1px solid transparent',
|
|
@@ -5837,11 +6076,12 @@ const getNotificationContentJssStyle = () => ({
|
|
|
5837
6076
|
});
|
|
5838
6077
|
|
|
5839
6078
|
const mediaQueryMaxS = getMediaQueryMax('s');
|
|
5840
|
-
const getComponentCss$
|
|
6079
|
+
const getComponentCss$G = (state, hasAction, hasClose, theme) => {
|
|
5841
6080
|
return getCss({
|
|
5842
6081
|
'@global': {
|
|
5843
6082
|
':host': addImportantToEachRule({
|
|
5844
6083
|
...getNotificationRootJssStyle(state, hasAction, hasClose, theme),
|
|
6084
|
+
...colorSchemeStyles,
|
|
5845
6085
|
...hostHiddenStyles,
|
|
5846
6086
|
}),
|
|
5847
6087
|
h5: headingSmallStyle,
|
|
@@ -5849,6 +6089,9 @@ const getComponentCss$F = (state, hasAction, hasClose, theme) => {
|
|
|
5849
6089
|
'h5,p': {
|
|
5850
6090
|
margin: 0,
|
|
5851
6091
|
color: getThemedColors(theme).primaryColor,
|
|
6092
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6093
|
+
color: getThemedColors('dark').primaryColor,
|
|
6094
|
+
}),
|
|
5852
6095
|
},
|
|
5853
6096
|
},
|
|
5854
6097
|
icon: getNotificationIconJssStyle(),
|
|
@@ -5863,8 +6106,9 @@ const getComponentCss$F = (state, hasAction, hasClose, theme) => {
|
|
|
5863
6106
|
});
|
|
5864
6107
|
};
|
|
5865
6108
|
|
|
5866
|
-
const getComponentCss$
|
|
6109
|
+
const getComponentCss$F = (icon, iconSource, active, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor, theme) => {
|
|
5867
6110
|
const { focusColor } = getThemedColors(theme);
|
|
6111
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
5868
6112
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme), {
|
|
5869
6113
|
root: {
|
|
5870
6114
|
textDecoration: underline ? 'underline' : 'none',
|
|
@@ -5894,6 +6138,9 @@ const getComponentCss$E = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
5894
6138
|
},
|
|
5895
6139
|
'&(a:focus)::before': {
|
|
5896
6140
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6141
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6142
|
+
borderColor: focusColorDark,
|
|
6143
|
+
}),
|
|
5897
6144
|
},
|
|
5898
6145
|
'&(a:focus:not(:focus-visible))::before': {
|
|
5899
6146
|
border: 0,
|
|
@@ -5903,10 +6150,19 @@ const getComponentCss$E = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
5903
6150
|
}));
|
|
5904
6151
|
};
|
|
5905
6152
|
|
|
5906
|
-
const getComponentCss$
|
|
6153
|
+
const getComponentCss$E = (icon, iconSource, variant, hideLabel, hasSlottedAnchor, theme) => {
|
|
5907
6154
|
const { focusColor } = getThemedColors(theme);
|
|
6155
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
5908
6156
|
const { linkColor } = getHighContrastColors();
|
|
5909
|
-
|
|
6157
|
+
const isPrimary = variant === 'primary';
|
|
6158
|
+
return getCss(mergeDeep(getLinkButtonStyles(icon, iconSource, variant, hideLabel, false, hasSlottedAnchor, theme), {
|
|
6159
|
+
icon: {
|
|
6160
|
+
...(isPrimary &&
|
|
6161
|
+
!isHighContrastMode && {
|
|
6162
|
+
filter: 'invert(1)',
|
|
6163
|
+
}),
|
|
6164
|
+
},
|
|
6165
|
+
}, hasSlottedAnchor && {
|
|
5910
6166
|
...(isHighContrastMode && {
|
|
5911
6167
|
root: {
|
|
5912
6168
|
borderColor: linkColor,
|
|
@@ -5935,6 +6191,9 @@ const getComponentCss$D = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
5935
6191
|
},
|
|
5936
6192
|
'&(a:focus)::before': {
|
|
5937
6193
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6194
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6195
|
+
borderColor: focusColorDark,
|
|
6196
|
+
}),
|
|
5938
6197
|
},
|
|
5939
6198
|
'&(a:focus:not(:focus-visible))::before': {
|
|
5940
6199
|
border: 0,
|
|
@@ -5948,7 +6207,7 @@ const getComponentCss$D = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
5948
6207
|
// because it is created via Object.keys(MODEL_SIGNATURES_MANIFEST) would bundle the entire manifest into both chunks
|
|
5949
6208
|
const LINK_TILE_MODEL_SIGNATURE_HEADING_TAGS = ['h2', 'h3', 'h4', 'h5', 'h6'];
|
|
5950
6209
|
|
|
5951
|
-
const getComponentCss$
|
|
6210
|
+
const getComponentCss$D = (aspectRatio, weight, direction, hasDescription) => {
|
|
5952
6211
|
const tileBaseStyles = getTileBaseStyles(aspectRatio);
|
|
5953
6212
|
return getCss({
|
|
5954
6213
|
...tileBaseStyles,
|
|
@@ -5973,12 +6232,14 @@ const getComponentCss$C = (aspectRatio, weight, direction, hasDescription) => {
|
|
|
5973
6232
|
heading: {
|
|
5974
6233
|
margin: 0,
|
|
5975
6234
|
...textLargeStyle,
|
|
6235
|
+
hyphens: 'inherit',
|
|
5976
6236
|
...buildResponsiveStyles(weight, (w) => ({ fontWeight: getFontWeight(w) })),
|
|
5977
6237
|
},
|
|
5978
6238
|
...(hasDescription && {
|
|
5979
6239
|
description: {
|
|
5980
6240
|
margin: '-12px 0 0 ',
|
|
5981
6241
|
...textSmallStyle,
|
|
6242
|
+
hyphens: 'inherit',
|
|
5982
6243
|
},
|
|
5983
6244
|
}),
|
|
5984
6245
|
'link-group': {
|
|
@@ -5995,7 +6256,7 @@ const getComponentCss$C = (aspectRatio, weight, direction, hasDescription) => {
|
|
|
5995
6256
|
});
|
|
5996
6257
|
};
|
|
5997
6258
|
|
|
5998
|
-
const getComponentCss$
|
|
6259
|
+
const getComponentCss$C = (...args) => {
|
|
5999
6260
|
return getCss({
|
|
6000
6261
|
...getButtonLinkTileStyles(...args),
|
|
6001
6262
|
'link-overlay': {
|
|
@@ -6016,7 +6277,7 @@ const baseSizes = {
|
|
|
6016
6277
|
height: '72px',
|
|
6017
6278
|
},
|
|
6018
6279
|
};
|
|
6019
|
-
const getComponentCss$
|
|
6280
|
+
const getComponentCss$B = (size) => {
|
|
6020
6281
|
return getCss({
|
|
6021
6282
|
'@global': {
|
|
6022
6283
|
':host': {
|
|
@@ -6025,6 +6286,7 @@ const getComponentCss$A = (size) => {
|
|
|
6025
6286
|
verticalAlign: 'top',
|
|
6026
6287
|
...addImportantToEachRule({
|
|
6027
6288
|
outline: 0,
|
|
6289
|
+
...colorSchemeStyles,
|
|
6028
6290
|
...hostHiddenStyles,
|
|
6029
6291
|
}),
|
|
6030
6292
|
},
|
|
@@ -6104,7 +6366,7 @@ const getSlottedJssStyle = (marginValue, hasHeader, hasDismissButton) => {
|
|
|
6104
6366
|
},
|
|
6105
6367
|
};
|
|
6106
6368
|
};
|
|
6107
|
-
const getComponentCss$
|
|
6369
|
+
const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, hasFooter) => {
|
|
6108
6370
|
const isFullscreenForXlAndXxl = isFullscreenForXl(isFullscreen);
|
|
6109
6371
|
const duration = isOpen ? '.6s' : '.2s';
|
|
6110
6372
|
const contentPadding = '32px';
|
|
@@ -6127,6 +6389,7 @@ const getComponentCss$z = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6127
6389
|
visibility: 'hidden',
|
|
6128
6390
|
transition: 'visibility 0s linear .2s',
|
|
6129
6391
|
}),
|
|
6392
|
+
...colorSchemeStyles,
|
|
6130
6393
|
...hostHiddenStyles,
|
|
6131
6394
|
...getFrostedGlassBackgroundJssStyles(isOpen, duration),
|
|
6132
6395
|
}),
|
|
@@ -6225,21 +6488,24 @@ const getComponentCss$z = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6225
6488
|
|
|
6226
6489
|
const modelSignatureHeight = 36;
|
|
6227
6490
|
|
|
6491
|
+
const colorToFilterLight = {
|
|
6492
|
+
primary: filterLightPrimary,
|
|
6493
|
+
'contrast-low': filterLightContrastLow,
|
|
6494
|
+
'contrast-medium': filterLightContrastMedium,
|
|
6495
|
+
'contrast-high': filterLightContrastHigh,
|
|
6496
|
+
};
|
|
6497
|
+
const colorToFilterDark = {
|
|
6498
|
+
primary: filterDarkPrimary,
|
|
6499
|
+
'contrast-low': filterDarkContrastLow,
|
|
6500
|
+
'contrast-medium': filterDarkContrastMedium,
|
|
6501
|
+
'contrast-high': filterDarkContrastHigh,
|
|
6502
|
+
};
|
|
6228
6503
|
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
|
-
},
|
|
6504
|
+
auto: colorToFilterLight,
|
|
6505
|
+
light: colorToFilterLight,
|
|
6506
|
+
dark: colorToFilterDark,
|
|
6241
6507
|
};
|
|
6242
|
-
const getComponentCss$
|
|
6508
|
+
const getComponentCss$z = (size, color, theme) => {
|
|
6243
6509
|
const isSizeInherit = size === 'inherit';
|
|
6244
6510
|
const isColorInherit = color === 'inherit';
|
|
6245
6511
|
return getCss({
|
|
@@ -6256,6 +6522,7 @@ const getComponentCss$y = (size, color, theme) => {
|
|
|
6256
6522
|
// TODO: we need a width map of all signatures to ensure same fluid behavior like implemented fro crest + wordmark
|
|
6257
6523
|
maxHeight: `${modelSignatureHeight}px`,
|
|
6258
6524
|
}),
|
|
6525
|
+
...colorSchemeStyles,
|
|
6259
6526
|
...hostHiddenStyles,
|
|
6260
6527
|
}),
|
|
6261
6528
|
},
|
|
@@ -6266,6 +6533,9 @@ const getComponentCss$y = (size, color, theme) => {
|
|
|
6266
6533
|
pointerEvents: 'none',
|
|
6267
6534
|
...(!isColorInherit && {
|
|
6268
6535
|
filter: colorToFilterMap[theme][color],
|
|
6536
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6537
|
+
filter: colorToFilterMap.dark[color],
|
|
6538
|
+
}),
|
|
6269
6539
|
...(isHighContrastMode &&
|
|
6270
6540
|
getSchemedHighContrastMediaQuery({
|
|
6271
6541
|
filter: colorToFilterMap.light[color],
|
|
@@ -6279,7 +6549,10 @@ const getComponentCss$y = (size, color, theme) => {
|
|
|
6279
6549
|
});
|
|
6280
6550
|
};
|
|
6281
6551
|
|
|
6282
|
-
const getComponentCss$
|
|
6552
|
+
const getComponentCss$y = (theme) => {
|
|
6553
|
+
const { primaryColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor } = getThemedColors(theme);
|
|
6554
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
6555
|
+
const { highlightColor } = getHighContrastColors();
|
|
6283
6556
|
return getCss({
|
|
6284
6557
|
'@global': {
|
|
6285
6558
|
':host': addImportantToEachRule({
|
|
@@ -6287,7 +6560,62 @@ const getComponentCss$x = (theme) => {
|
|
|
6287
6560
|
...hostHiddenStyles,
|
|
6288
6561
|
}),
|
|
6289
6562
|
},
|
|
6290
|
-
|
|
6563
|
+
option: {
|
|
6564
|
+
display: 'flex',
|
|
6565
|
+
justifyContent: 'space-between',
|
|
6566
|
+
gap: '12px',
|
|
6567
|
+
padding: `${spacingStaticSmall} 12px`,
|
|
6568
|
+
flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
|
|
6569
|
+
color: contrastHighColor,
|
|
6570
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6571
|
+
color: contrastHighColorDark,
|
|
6572
|
+
}),
|
|
6573
|
+
cursor: 'pointer',
|
|
6574
|
+
textAlign: 'left',
|
|
6575
|
+
wordBreak: 'break-word',
|
|
6576
|
+
boxSizing: 'border-box',
|
|
6577
|
+
borderRadius: borderRadiusSmall,
|
|
6578
|
+
transition: ['background-color', 'color'].map(getTransition).join(),
|
|
6579
|
+
...getNoResultsOptionJssStyle(),
|
|
6580
|
+
...hoverMediaQuery({
|
|
6581
|
+
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
6582
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
6583
|
+
background: contrastLowColor,
|
|
6584
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6585
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
6586
|
+
background: contrastLowColorDark,
|
|
6587
|
+
}),
|
|
6588
|
+
},
|
|
6589
|
+
}),
|
|
6590
|
+
'&--selected': {
|
|
6591
|
+
background: backgroundSurfaceColor,
|
|
6592
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6593
|
+
background: backgroundSurfaceColorDark,
|
|
6594
|
+
}),
|
|
6595
|
+
},
|
|
6596
|
+
'&--highlighted': {
|
|
6597
|
+
background: contrastLowColor,
|
|
6598
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6599
|
+
background: contrastLowColorDark,
|
|
6600
|
+
}),
|
|
6601
|
+
},
|
|
6602
|
+
'&--highlighted, &--selected': {
|
|
6603
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
6604
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6605
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
6606
|
+
}),
|
|
6607
|
+
},
|
|
6608
|
+
'&--disabled': {
|
|
6609
|
+
cursor: 'not-allowed',
|
|
6610
|
+
color: disabledColor,
|
|
6611
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6612
|
+
color: disabledColorDark,
|
|
6613
|
+
}),
|
|
6614
|
+
},
|
|
6615
|
+
'&--hidden': {
|
|
6616
|
+
display: 'none',
|
|
6617
|
+
},
|
|
6618
|
+
},
|
|
6291
6619
|
checkbox: {
|
|
6292
6620
|
pointerEvents: 'none', // Avoid checkbox label click which updates input within p-checkbox-wrapper
|
|
6293
6621
|
},
|
|
@@ -6310,9 +6638,11 @@ const getPlaceholderJssStyle = (styles) => ({
|
|
|
6310
6638
|
const inputYPadding = '13px';
|
|
6311
6639
|
const selectorNativeSelect = '::slotted([slot=select])';
|
|
6312
6640
|
const INPUT_HEIGHT_CALC = `${fontLineHeight} + 6px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2`;
|
|
6313
|
-
const getComponentCss$
|
|
6641
|
+
const getComponentCss$x = (direction, isOpen, isDisabled, hideLabel, state, isWithinForm, hasLabel, theme) => {
|
|
6314
6642
|
const { primaryColor, contrastMediumColor, contrastHighColor, backgroundColor, disabledColor } = getThemedColors(theme);
|
|
6643
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, backgroundColor: backgroundColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
6315
6644
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
6645
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
6316
6646
|
const isDirectionDown = direction === 'down';
|
|
6317
6647
|
return getCss({
|
|
6318
6648
|
'@global': {
|
|
@@ -6320,6 +6650,7 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6320
6650
|
':host': {
|
|
6321
6651
|
display: 'block',
|
|
6322
6652
|
position: 'relative',
|
|
6653
|
+
...colorSchemeStyles,
|
|
6323
6654
|
...hostHiddenStyles,
|
|
6324
6655
|
},
|
|
6325
6656
|
...(isWithinForm && {
|
|
@@ -6338,19 +6669,25 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6338
6669
|
...getListStyles$1(isOpen, direction, theme),
|
|
6339
6670
|
'input-container': {
|
|
6340
6671
|
display: 'flex',
|
|
6341
|
-
background: backgroundColor,
|
|
6342
6672
|
transition: ['color', 'border-color', 'background-color'].map(getTransition).join(),
|
|
6343
6673
|
cursor: 'text',
|
|
6344
6674
|
...hoverMediaQuery({
|
|
6345
6675
|
'&:hover:not(.disabled)': {
|
|
6346
6676
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
6677
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6678
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
6679
|
+
}),
|
|
6347
6680
|
},
|
|
6348
6681
|
}),
|
|
6349
6682
|
...(!isDisabled && {
|
|
6350
6683
|
'&:focus-within': {
|
|
6351
6684
|
borderColor: primaryColor,
|
|
6685
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6686
|
+
borderColor: primaryColorDark,
|
|
6687
|
+
}),
|
|
6352
6688
|
},
|
|
6353
6689
|
}),
|
|
6690
|
+
background: backgroundColor,
|
|
6354
6691
|
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
6355
6692
|
borderRadius: borderRadiusSmall,
|
|
6356
6693
|
...(isOpen && {
|
|
@@ -6365,6 +6702,18 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6365
6702
|
borderColor: disabledColor,
|
|
6366
6703
|
WebkitTextFillColor: disabledColor,
|
|
6367
6704
|
}),
|
|
6705
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6706
|
+
background: backgroundColorDark,
|
|
6707
|
+
border: `${borderWidthBase} solid ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark}`,
|
|
6708
|
+
...(isOpen && {
|
|
6709
|
+
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColorDark}`),
|
|
6710
|
+
}),
|
|
6711
|
+
...(isDisabled && {
|
|
6712
|
+
color: disabledColorDark,
|
|
6713
|
+
borderColor: disabledColorDark,
|
|
6714
|
+
WebkitTextFillColor: disabledColorDark,
|
|
6715
|
+
}),
|
|
6716
|
+
}),
|
|
6368
6717
|
},
|
|
6369
6718
|
...buildResponsiveStyles(hideLabel, (isHidden) => isHidden
|
|
6370
6719
|
? {
|
|
@@ -6395,6 +6744,9 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6395
6744
|
'no-results': {
|
|
6396
6745
|
padding: `${spacingStaticSmall} 12px`,
|
|
6397
6746
|
color: contrastHighColor,
|
|
6747
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6748
|
+
color: contrastHighColorDark,
|
|
6749
|
+
}),
|
|
6398
6750
|
boxSizing: 'border-box',
|
|
6399
6751
|
...getNoResultsOptionJssStyle(),
|
|
6400
6752
|
},
|
|
@@ -6405,13 +6757,13 @@ const getComponentCss$w = (direction, isOpen, isDisabled, hideLabel, state, isWi
|
|
|
6405
6757
|
};
|
|
6406
6758
|
const getInputStyles = (isDisabled, theme) => {
|
|
6407
6759
|
const { primaryColor, disabledColor } = getThemedColors(theme);
|
|
6760
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark } = getThemedColors('dark');
|
|
6408
6761
|
return {
|
|
6409
6762
|
input: {
|
|
6410
6763
|
flex: 1,
|
|
6411
6764
|
minWidth: 0,
|
|
6412
6765
|
height: `calc(${INPUT_HEIGHT_CALC})`,
|
|
6413
6766
|
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
6414
|
-
color: primaryColor,
|
|
6415
6767
|
padding: `${inputYPadding} ${spacingStaticMedium}`,
|
|
6416
6768
|
boxSizing: 'border-box',
|
|
6417
6769
|
border: 0,
|
|
@@ -6423,14 +6775,23 @@ const getInputStyles = (isDisabled, theme) => {
|
|
|
6423
6775
|
'&:disabled': {
|
|
6424
6776
|
cursor: 'not-allowed',
|
|
6425
6777
|
},
|
|
6426
|
-
|
|
6778
|
+
color: primaryColor,
|
|
6427
6779
|
...(isDisabled && getPlaceholderJssStyle({ color: disabledColor })),
|
|
6780
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6781
|
+
color: primaryColorDark,
|
|
6782
|
+
...(isDisabled && getPlaceholderJssStyle({ color: disabledColorDark })),
|
|
6783
|
+
}),
|
|
6784
|
+
'&:not(:focus)': {
|
|
6785
|
+
...getPlaceholderJssStyle({ color: primaryColor, opacity: 1 }),
|
|
6786
|
+
...prefersColorSchemeDarkMediaQuery(theme, getPlaceholderJssStyle({ color: primaryColorDark, opacity: 1 })),
|
|
6787
|
+
}, // Opacity fixes placeholder being shown lighter in firefox
|
|
6428
6788
|
},
|
|
6429
6789
|
};
|
|
6430
6790
|
};
|
|
6431
6791
|
const getListStyles$1 = (isOpen, direction, theme) => {
|
|
6432
6792
|
const isDirectionDown = direction === 'down';
|
|
6433
6793
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
6794
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
6434
6795
|
return {
|
|
6435
6796
|
listbox: {
|
|
6436
6797
|
position: 'absolute',
|
|
@@ -6439,7 +6800,6 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6439
6800
|
flexDirection: 'column',
|
|
6440
6801
|
gap: spacingStaticSmall,
|
|
6441
6802
|
padding: '6px',
|
|
6442
|
-
background: backgroundColor,
|
|
6443
6803
|
...textSmallStyle,
|
|
6444
6804
|
zIndex: 10,
|
|
6445
6805
|
left: 0,
|
|
@@ -6451,6 +6811,7 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6451
6811
|
maxHeight: `${8.5 * (MULTI_SELECT_OPTION_HEIGHT + 8) + 6 + 2}px`,
|
|
6452
6812
|
overflowY: 'auto',
|
|
6453
6813
|
WebkitOverflowScrolling: 'touch',
|
|
6814
|
+
background: backgroundColor,
|
|
6454
6815
|
border: `2px solid ${primaryColor}`,
|
|
6455
6816
|
[isDirectionDown ? 'borderTop' : 'borderBottom']: 'none',
|
|
6456
6817
|
borderRadius: borderRadiusSmall,
|
|
@@ -6459,7 +6820,11 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6459
6820
|
scrollbarWidth: 'thin',
|
|
6460
6821
|
scrollbarColor: 'auto',
|
|
6461
6822
|
transition: getTransition('border-color'),
|
|
6462
|
-
transform: 'translate3d(0,0,0)',
|
|
6823
|
+
transform: 'translate3d(0,0,0)',
|
|
6824
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6825
|
+
background: backgroundColorDark,
|
|
6826
|
+
borderColor: primaryColorDark,
|
|
6827
|
+
}),
|
|
6463
6828
|
},
|
|
6464
6829
|
};
|
|
6465
6830
|
};
|
|
@@ -6472,13 +6837,17 @@ const disabledCursorStyle = {
|
|
|
6472
6837
|
cursor: 'default',
|
|
6473
6838
|
pointerEvents: 'none', // prevents :hover (has no effect when forced), maybe we can remove it since CSS selectors already cover desired behavior
|
|
6474
6839
|
};
|
|
6475
|
-
const getComponentCss$
|
|
6840
|
+
const getComponentCss$w = (maxNumberOfPageLinks, theme) => {
|
|
6476
6841
|
const { primaryColor, disabledColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
6842
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, hoverColor: hoverColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
6477
6843
|
return getCss({
|
|
6478
6844
|
'@global': {
|
|
6479
6845
|
':host': {
|
|
6480
6846
|
display: 'block',
|
|
6481
|
-
...addImportantToEachRule(
|
|
6847
|
+
...addImportantToEachRule({
|
|
6848
|
+
...colorSchemeStyles,
|
|
6849
|
+
...hostHiddenStyles,
|
|
6850
|
+
}),
|
|
6482
6851
|
},
|
|
6483
6852
|
nav: {
|
|
6484
6853
|
display: 'flex',
|
|
@@ -6524,10 +6893,16 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
6524
6893
|
outline: 0,
|
|
6525
6894
|
borderRadius: borderRadiusSmall,
|
|
6526
6895
|
borderColor: 'transparent',
|
|
6896
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6897
|
+
color: primaryColorDark,
|
|
6898
|
+
}),
|
|
6527
6899
|
...hoverMediaQuery({
|
|
6528
6900
|
'&:not([aria-disabled]):not(.ellipsis):hover': {
|
|
6529
6901
|
...frostedGlassStyle,
|
|
6530
6902
|
background: hoverColor,
|
|
6903
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6904
|
+
background: hoverColorDark,
|
|
6905
|
+
}),
|
|
6531
6906
|
},
|
|
6532
6907
|
}),
|
|
6533
6908
|
'&:not(.ellipsis):focus:focus-visible::before': {
|
|
@@ -6536,16 +6911,26 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
6536
6911
|
...getInsetJssStyle(-4),
|
|
6537
6912
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6538
6913
|
borderRadius: borderRadiusMedium,
|
|
6914
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6915
|
+
borderColor: focusColorDark,
|
|
6916
|
+
}),
|
|
6539
6917
|
},
|
|
6540
6918
|
'&[aria-current]': {
|
|
6541
6919
|
...disabledCursorStyle,
|
|
6542
6920
|
color: primaryColor,
|
|
6543
6921
|
border: `${borderWidthBase} solid ${primaryColor}`,
|
|
6922
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6923
|
+
color: primaryColorDark,
|
|
6924
|
+
borderColor: primaryColorDark,
|
|
6925
|
+
}),
|
|
6544
6926
|
'&:not(.ellipsis):focus::before': getInsetJssStyle(-6),
|
|
6545
6927
|
},
|
|
6546
6928
|
'&[aria-disabled]': {
|
|
6547
6929
|
...disabledCursorStyle,
|
|
6548
6930
|
color: disabledColor,
|
|
6931
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6932
|
+
color: disabledColorDark,
|
|
6933
|
+
}),
|
|
6549
6934
|
},
|
|
6550
6935
|
},
|
|
6551
6936
|
},
|
|
@@ -6558,6 +6943,82 @@ const getComponentCss$v = (maxNumberOfPageLinks, theme) => {
|
|
|
6558
6943
|
});
|
|
6559
6944
|
};
|
|
6560
6945
|
|
|
6946
|
+
const removeSlottedSelector = (styles) => Object.fromEntries(Object.entries(styles).map(([key, value]) => {
|
|
6947
|
+
value = typeof value === 'object' ? removeSlottedSelector(value) : value;
|
|
6948
|
+
return [key.replace(/::slotted\(([^,]+)\)/g, '$1'), value];
|
|
6949
|
+
}));
|
|
6950
|
+
const removeStyles = (selector, styles) => Object.fromEntries(Object.entries(styles)
|
|
6951
|
+
.filter(([key]) => key !== selector)
|
|
6952
|
+
.map(([key, value]) => {
|
|
6953
|
+
value = typeof value === 'object' ? removeStyles(selector, value) : value;
|
|
6954
|
+
return [key, value];
|
|
6955
|
+
}));
|
|
6956
|
+
|
|
6957
|
+
const getComponentCss$v = (hideLabel, state, isDisabled, isLoading, isWithinForm, length, theme) => {
|
|
6958
|
+
const inputSize = `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`; // equivalent to calculation of input height within form-styles
|
|
6959
|
+
const labelStyles = removeStyles('@media(hover:hover)', removeSlottedSelector(getLabelStyles('input', isDisabled, hideLabel, state, theme)));
|
|
6960
|
+
const inputStyles = removeStyles('input[readonly]', removeSlottedSelector(getBaseChildStyles('input', state, theme, {
|
|
6961
|
+
textAlign: 'center',
|
|
6962
|
+
width: inputSize,
|
|
6963
|
+
...(length === 6 && {
|
|
6964
|
+
[getMediaQueryMax('xs')]: {
|
|
6965
|
+
width: `calc((276px - (${spacingStaticSmall} * 5)) / 6)`, // calculate the max with of the inputs that fit into grid in viewport base (276px)
|
|
6966
|
+
},
|
|
6967
|
+
}),
|
|
6968
|
+
...(isLoading && {
|
|
6969
|
+
opacity: 0.2,
|
|
6970
|
+
cursor: 'not-allowed',
|
|
6971
|
+
}),
|
|
6972
|
+
})));
|
|
6973
|
+
return getCss({
|
|
6974
|
+
'@global': {
|
|
6975
|
+
':host': addImportantToEachRule({
|
|
6976
|
+
display: 'block',
|
|
6977
|
+
...colorSchemeStyles,
|
|
6978
|
+
...hostHiddenStyles,
|
|
6979
|
+
}),
|
|
6980
|
+
...inputStyles,
|
|
6981
|
+
...(isWithinForm &&
|
|
6982
|
+
addImportantToEachRule({
|
|
6983
|
+
'::slotted(input)': {
|
|
6984
|
+
position: 'absolute',
|
|
6985
|
+
height: inputSize,
|
|
6986
|
+
width: 0,
|
|
6987
|
+
opacity: 0,
|
|
6988
|
+
},
|
|
6989
|
+
})),
|
|
6990
|
+
},
|
|
6991
|
+
...(isLoading && {
|
|
6992
|
+
spinner: {
|
|
6993
|
+
width: '100%',
|
|
6994
|
+
height: inputSize,
|
|
6995
|
+
pointerEvents: 'none',
|
|
6996
|
+
position: 'absolute',
|
|
6997
|
+
top: '50%',
|
|
6998
|
+
left: '50%',
|
|
6999
|
+
transform: 'translate(-50%, -50%)',
|
|
7000
|
+
},
|
|
7001
|
+
}),
|
|
7002
|
+
'input-container': {
|
|
7003
|
+
display: 'flex',
|
|
7004
|
+
position: 'relative',
|
|
7005
|
+
gap: spacingStaticSmall,
|
|
7006
|
+
flexWrap: 'wrap',
|
|
7007
|
+
width: 'fit-content',
|
|
7008
|
+
},
|
|
7009
|
+
...mergeDeep(labelStyles, {
|
|
7010
|
+
label: {
|
|
7011
|
+
...buildResponsiveStyles(hideLabel,
|
|
7012
|
+
// workaround: since pin-code component is not wrapped into label tag it behaves differently
|
|
7013
|
+
(isLabelHidden) => (isLabelHidden ? { display: 'none' } : { display: 'inline-flex' })),
|
|
7014
|
+
marginBottom: spacingStaticXSmall,
|
|
7015
|
+
},
|
|
7016
|
+
}),
|
|
7017
|
+
...getFunctionalComponentRequiredStyles(),
|
|
7018
|
+
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
7019
|
+
});
|
|
7020
|
+
};
|
|
7021
|
+
|
|
6561
7022
|
const { backgroundColor: backgroundColorThemeLight, primaryColor: primaryColorThemeLight } = getThemedColors('light');
|
|
6562
7023
|
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
6563
7024
|
const directionPositionMap = {
|
|
@@ -6632,6 +7093,7 @@ const getComponentCss$u = (direction, theme) => {
|
|
|
6632
7093
|
...addImportantToEachRule({
|
|
6633
7094
|
position: 'relative',
|
|
6634
7095
|
display: 'inline-block',
|
|
7096
|
+
...colorSchemeStyles,
|
|
6635
7097
|
...hostHiddenStyles,
|
|
6636
7098
|
}),
|
|
6637
7099
|
verticalAlign: 'top',
|
|
@@ -6728,19 +7190,30 @@ const getComponentCss$u = (direction, theme) => {
|
|
|
6728
7190
|
});
|
|
6729
7191
|
};
|
|
6730
7192
|
|
|
6731
|
-
const
|
|
7193
|
+
const getCheckedSVGBackgroundImage = (fill) => {
|
|
7194
|
+
return getInlineSVGBackgroundImage(`<circle fill="${fill}" cx="12" cy="12" r="6"/>`);
|
|
7195
|
+
};
|
|
7196
|
+
const getComponentCss$t = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
6732
7197
|
const checkedIconColor = isHighContrastMode
|
|
6733
7198
|
? getHighContrastColors().canvasColor
|
|
6734
|
-
: getInvertedThemedColors(theme).primaryColor
|
|
6735
|
-
|
|
7199
|
+
: escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
|
|
7200
|
+
const checkedIconColorDark = isHighContrastMode
|
|
7201
|
+
? getHighContrastColors().canvasColor
|
|
7202
|
+
: escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
7203
|
+
return getCss(mergeDeep(getCheckboxRadioJssStyle(hideLabel, state, isDisabled, isLoading, theme), {
|
|
6736
7204
|
'@global': {
|
|
6737
7205
|
'::slotted': addImportantToEachRule({
|
|
6738
7206
|
'&(input)': {
|
|
6739
7207
|
borderRadius: '50%',
|
|
6740
7208
|
},
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
7209
|
+
...(!isLoading && {
|
|
7210
|
+
'&(input:checked)': {
|
|
7211
|
+
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColor),
|
|
7212
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7213
|
+
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColorDark),
|
|
7214
|
+
}),
|
|
7215
|
+
},
|
|
7216
|
+
}),
|
|
6744
7217
|
...(!isDisabled && {
|
|
6745
7218
|
'&(input:focus)::before': {
|
|
6746
7219
|
borderRadius: '50%',
|
|
@@ -6751,15 +7224,18 @@ const getComponentCss$t = (hideLabel, state, isDisabled, theme) => {
|
|
|
6751
7224
|
}));
|
|
6752
7225
|
};
|
|
6753
7226
|
|
|
7227
|
+
const gradientColorLight = {
|
|
7228
|
+
'background-base': '255,255,255',
|
|
7229
|
+
'background-surface': '238,239,242',
|
|
7230
|
+
};
|
|
7231
|
+
const gradientColorDark = {
|
|
7232
|
+
'background-base': '14,14,18',
|
|
7233
|
+
'background-surface': '33,34,37',
|
|
7234
|
+
};
|
|
6754
7235
|
const gradientColorMap = {
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
},
|
|
6759
|
-
dark: {
|
|
6760
|
-
'background-base': '14,14,18',
|
|
6761
|
-
'background-surface': '33,34,37',
|
|
6762
|
-
},
|
|
7236
|
+
auto: gradientColorLight,
|
|
7237
|
+
light: gradientColorLight,
|
|
7238
|
+
dark: gradientColorDark,
|
|
6763
7239
|
};
|
|
6764
7240
|
const getGradient = (theme, gradientColorTheme) => {
|
|
6765
7241
|
const gradientColor = gradientColorMap[theme][gradientColorTheme];
|
|
@@ -6770,15 +7246,17 @@ const getGradient = (theme, gradientColorTheme) => {
|
|
|
6770
7246
|
};
|
|
6771
7247
|
const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndicatorPosition, hasScrollbar, theme) => {
|
|
6772
7248
|
const { backgroundColor, backgroundSurfaceColor, focusColor, hoverColor } = getThemedColors(theme);
|
|
6773
|
-
const
|
|
7249
|
+
const { backgroundColor: backgroundColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, focusColor: focusColorDark, hoverColor: hoverColorDark, } = getThemedColors('dark');
|
|
7250
|
+
const backgroundColorLight = {
|
|
7251
|
+
'background-base': backgroundColor,
|
|
7252
|
+
'background-surface': backgroundSurfaceColor,
|
|
7253
|
+
};
|
|
6774
7254
|
const backgroundColorMap = {
|
|
7255
|
+
auto: backgroundColorLight,
|
|
7256
|
+
light: backgroundColorLight,
|
|
6775
7257
|
dark: {
|
|
6776
|
-
'background-base':
|
|
6777
|
-
'background-surface':
|
|
6778
|
-
},
|
|
6779
|
-
light: {
|
|
6780
|
-
'background-base': backgroundColor,
|
|
6781
|
-
'background-surface': backgroundSurfaceColor,
|
|
7258
|
+
'background-base': backgroundSurfaceColorDark,
|
|
7259
|
+
'background-surface': backgroundColorDark,
|
|
6782
7260
|
},
|
|
6783
7261
|
};
|
|
6784
7262
|
const actionPrevNextStyles = {
|
|
@@ -6793,6 +7271,7 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6793
7271
|
':host': addImportantToEachRule({
|
|
6794
7272
|
display: 'block',
|
|
6795
7273
|
height: 'inherit',
|
|
7274
|
+
...colorSchemeStyles,
|
|
6796
7275
|
...hostHiddenStyles,
|
|
6797
7276
|
}),
|
|
6798
7277
|
button: {
|
|
@@ -6807,15 +7286,21 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6807
7286
|
outline: 0,
|
|
6808
7287
|
cursor: 'pointer',
|
|
6809
7288
|
background: backgroundColorMap[theme][gradientColor],
|
|
7289
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7290
|
+
background: backgroundColorMap.dark[gradientColor],
|
|
7291
|
+
}),
|
|
6810
7292
|
borderRadius: borderRadiusSmall,
|
|
6811
7293
|
...frostedGlassStyle,
|
|
6812
7294
|
visibility: 'hidden',
|
|
6813
|
-
...(!
|
|
7295
|
+
...(!isThemeDark(theme) && dropShadowLowStyle),
|
|
6814
7296
|
...hoverMediaQuery({
|
|
6815
7297
|
transition: getTransition('background-color'),
|
|
6816
7298
|
'&:hover': {
|
|
6817
7299
|
...frostedGlassStyle,
|
|
6818
7300
|
background: hoverColor,
|
|
7301
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7302
|
+
background: hoverColorDark,
|
|
7303
|
+
}),
|
|
6819
7304
|
},
|
|
6820
7305
|
}),
|
|
6821
7306
|
},
|
|
@@ -6858,6 +7343,9 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6858
7343
|
},
|
|
6859
7344
|
'&:focus::before': {
|
|
6860
7345
|
borderColor: focusColor,
|
|
7346
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7347
|
+
borderColor: focusColorDark,
|
|
7348
|
+
}),
|
|
6861
7349
|
},
|
|
6862
7350
|
'&:focus:not(:focus-visible)::before': {
|
|
6863
7351
|
borderColor: 'transparent',
|
|
@@ -6882,6 +7370,9 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6882
7370
|
gridArea: '1 / 1 / 1 / 1',
|
|
6883
7371
|
justifyContent: 'flex-start',
|
|
6884
7372
|
background: `linear-gradient(to right, ${getGradient(theme, gradientColor)} 100%)`,
|
|
7373
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7374
|
+
background: `linear-gradient(to right, ${getGradient('dark', gradientColor)} 100%)`,
|
|
7375
|
+
}),
|
|
6885
7376
|
visibility: isPrevHidden ? 'hidden' : 'visible',
|
|
6886
7377
|
'& button': {
|
|
6887
7378
|
marginLeft: '8px',
|
|
@@ -6897,6 +7388,9 @@ const getComponentCss$s = (gradientColor, isNextHidden, isPrevHidden, scrollIndi
|
|
|
6897
7388
|
gridArea: '1 / 3 / 1 / 3',
|
|
6898
7389
|
justifyContent: 'flex-end',
|
|
6899
7390
|
background: `linear-gradient(to left, ${getGradient(theme, gradientColor)} 100%)`,
|
|
7391
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7392
|
+
background: `linear-gradient(to left, ${getGradient('dark', gradientColor)} 100%)`,
|
|
7393
|
+
}),
|
|
6900
7394
|
visibility: isNextHidden ? 'hidden' : 'visible',
|
|
6901
7395
|
'& button': {
|
|
6902
7396
|
marginRight: '8px',
|
|
@@ -6925,7 +7419,9 @@ const getColors$2 = (isDisabled, isSelected, theme) => {
|
|
|
6925
7419
|
const getItemPadding = (hasIconAndSlottedContent) => hasIconAndSlottedContent ? `13px ${ITEM_PADDING} 13px 13px` : `13px ${ITEM_PADDING}`;
|
|
6926
7420
|
const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, theme) => {
|
|
6927
7421
|
const { focusColor } = getThemedColors(theme);
|
|
7422
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
6928
7423
|
const { buttonColor, labelColor, borderColor, hoverBorderColor } = getColors$2(isDisabled, isSelected, theme);
|
|
7424
|
+
const { buttonColor: buttonColorDark, labelColor: labelColorDark, borderColor: borderColorDark, hoverBorderColor: hoverBorderColorDark, } = getColors$2(isDisabled, isSelected, 'dark');
|
|
6929
7425
|
return getCss({
|
|
6930
7426
|
'@global': {
|
|
6931
7427
|
':host': addImportantToEachRule({
|
|
@@ -6935,6 +7431,7 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6935
7431
|
}),
|
|
6936
7432
|
// All width relevant styling has to be kept in sync with the tempDiv of the p-segmented-control utils
|
|
6937
7433
|
button: {
|
|
7434
|
+
position: 'relative',
|
|
6938
7435
|
display: 'block',
|
|
6939
7436
|
height: '100%',
|
|
6940
7437
|
width: '100%',
|
|
@@ -6946,7 +7443,10 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6946
7443
|
background: 'transparent',
|
|
6947
7444
|
color: buttonColor,
|
|
6948
7445
|
...textSmallStyle,
|
|
6949
|
-
|
|
7446
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7447
|
+
borderColor: borderColorDark,
|
|
7448
|
+
color: buttonColorDark,
|
|
7449
|
+
}),
|
|
6950
7450
|
'&::before': {
|
|
6951
7451
|
content: '""',
|
|
6952
7452
|
position: 'absolute',
|
|
@@ -6956,6 +7456,9 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6956
7456
|
},
|
|
6957
7457
|
'&:focus::before': {
|
|
6958
7458
|
borderColor: focusColor,
|
|
7459
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7460
|
+
borderColor: focusColorDark,
|
|
7461
|
+
}),
|
|
6959
7462
|
},
|
|
6960
7463
|
'&:focus:not(:focus-visible)::before': {
|
|
6961
7464
|
borderColor: 'transparent',
|
|
@@ -6971,6 +7474,9 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6971
7474
|
transition: getTransition('border-color'),
|
|
6972
7475
|
'&:hover': {
|
|
6973
7476
|
borderColor: hoverBorderColor,
|
|
7477
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7478
|
+
borderColor: hoverBorderColorDark,
|
|
7479
|
+
}),
|
|
6974
7480
|
},
|
|
6975
7481
|
})),
|
|
6976
7482
|
}),
|
|
@@ -6981,6 +7487,9 @@ const getComponentCss$r = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
6981
7487
|
...textXSmallStyle,
|
|
6982
7488
|
overflowWrap: 'normal',
|
|
6983
7489
|
color: labelColor,
|
|
7490
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7491
|
+
color: labelColorDark,
|
|
7492
|
+
}),
|
|
6984
7493
|
},
|
|
6985
7494
|
},
|
|
6986
7495
|
...(hasIcon && {
|
|
@@ -7008,6 +7517,7 @@ const getComponentCss$q = (maxWidth, columns) => {
|
|
|
7008
7517
|
gridTemplateColumns: col === 'auto' ? `repeat(auto-fit, ${maxWidth}px)` : `repeat(${col}, minmax(0, 1fr))`,
|
|
7009
7518
|
})),
|
|
7010
7519
|
gap: '6px',
|
|
7520
|
+
...colorSchemeStyles,
|
|
7011
7521
|
...hostHiddenStyles,
|
|
7012
7522
|
}),
|
|
7013
7523
|
},
|
|
@@ -7017,7 +7527,9 @@ const getComponentCss$q = (maxWidth, columns) => {
|
|
|
7017
7527
|
const dropdownPositionVar = '--p-internal-dropdown-position';
|
|
7018
7528
|
const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
7019
7529
|
const { primaryColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
7530
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
7020
7531
|
const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
|
|
7532
|
+
const { formStateHoverColor: formStateHoverColorDark, formStateColor: formStateColorDark } = getThemedFormStateColors('dark', state);
|
|
7021
7533
|
const isDirectionDown = direction === 'down';
|
|
7022
7534
|
return {
|
|
7023
7535
|
'@global': {
|
|
@@ -7034,17 +7546,29 @@ const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
|
7034
7546
|
outline: '0',
|
|
7035
7547
|
cursor: 'pointer',
|
|
7036
7548
|
transition: getTransition('border-color'),
|
|
7549
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7550
|
+
borderColor: isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7551
|
+
}),
|
|
7037
7552
|
'&:focus, &:focus ~ ul': {
|
|
7038
7553
|
borderColor: primaryColor,
|
|
7554
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7555
|
+
borderColor: primaryColorDark,
|
|
7556
|
+
}),
|
|
7039
7557
|
},
|
|
7040
7558
|
...hoverMediaQuery({
|
|
7041
7559
|
'&:not(:disabled):not(:focus):hover': {
|
|
7042
7560
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
7561
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7562
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
7563
|
+
}),
|
|
7043
7564
|
},
|
|
7044
7565
|
}),
|
|
7045
7566
|
'&:disabled': {
|
|
7046
7567
|
cursor: 'not-allowed',
|
|
7047
7568
|
borderColor: disabledColor,
|
|
7569
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7570
|
+
borderColor: disabledColorDark,
|
|
7571
|
+
}),
|
|
7048
7572
|
},
|
|
7049
7573
|
...(isOpen && {
|
|
7050
7574
|
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
@@ -7056,12 +7580,18 @@ const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
|
7056
7580
|
};
|
|
7057
7581
|
const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
7058
7582
|
const { primaryColor, backgroundColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
7583
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
7059
7584
|
const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
|
|
7585
|
+
const { formStateHoverColor: formStateHoverColorDark, formStateColor: formStateColorDark } = getThemedFormStateColors('dark', state);
|
|
7060
7586
|
const isDirectionDown = direction === 'down';
|
|
7061
7587
|
const placeHolderJssStyle = {
|
|
7062
7588
|
opacity: 1,
|
|
7063
7589
|
color: disabled ? disabledColor : primaryColor,
|
|
7064
7590
|
};
|
|
7591
|
+
const placeHolderDarkJssStyle = {
|
|
7592
|
+
opacity: 1,
|
|
7593
|
+
color: disabled ? disabledColorDark : primaryColorDark,
|
|
7594
|
+
};
|
|
7065
7595
|
return {
|
|
7066
7596
|
'@global': {
|
|
7067
7597
|
input: {
|
|
@@ -7085,23 +7615,45 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7085
7615
|
cursor: disabled ? 'not-allowed' : 'text',
|
|
7086
7616
|
color: primaryColor,
|
|
7087
7617
|
background: backgroundColor,
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7618
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7619
|
+
color: primaryColorDark,
|
|
7620
|
+
background: backgroundColorDark,
|
|
7621
|
+
}),
|
|
7622
|
+
'&::placeholder': {
|
|
7623
|
+
...placeHolderJssStyle,
|
|
7624
|
+
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
7625
|
+
},
|
|
7626
|
+
'&::-webkit-input-placeholder': {
|
|
7627
|
+
...placeHolderJssStyle,
|
|
7628
|
+
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
7629
|
+
},
|
|
7630
|
+
'&::-moz-placeholder': {
|
|
7631
|
+
...placeHolderJssStyle,
|
|
7632
|
+
...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
|
|
7633
|
+
},
|
|
7091
7634
|
'&:not(:disabled):focus': {
|
|
7092
7635
|
opacity: 1,
|
|
7093
7636
|
'&+span, &~ ul': {
|
|
7094
7637
|
borderColor: primaryColor,
|
|
7638
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7639
|
+
borderColor: primaryColorDark,
|
|
7640
|
+
}),
|
|
7095
7641
|
},
|
|
7096
7642
|
},
|
|
7097
7643
|
...hoverMediaQuery({
|
|
7098
7644
|
'&:not(:disabled)': {
|
|
7099
7645
|
'&+span:hover': {
|
|
7100
7646
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
7647
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7648
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
7649
|
+
}),
|
|
7101
7650
|
},
|
|
7102
7651
|
'&:hover': {
|
|
7103
7652
|
'&+span, &~ul': {
|
|
7104
7653
|
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
7654
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7655
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
7656
|
+
}),
|
|
7105
7657
|
},
|
|
7106
7658
|
},
|
|
7107
7659
|
},
|
|
@@ -7114,6 +7666,9 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7114
7666
|
pointerEvents: 'all',
|
|
7115
7667
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
7116
7668
|
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
7669
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7670
|
+
borderColor: isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7671
|
+
}),
|
|
7117
7672
|
borderRadius: borderRadiusSmall,
|
|
7118
7673
|
...(isOpen && {
|
|
7119
7674
|
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
@@ -7126,7 +7681,9 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7126
7681
|
};
|
|
7127
7682
|
const getListStyles = (direction, theme) => {
|
|
7128
7683
|
const isDirectionDown = direction === 'down';
|
|
7129
|
-
const { primaryColor, backgroundColor, contrastMediumColor } = getThemedColors(
|
|
7684
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
7685
|
+
const { primaryColor, backgroundColor, contrastMediumColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor, } = getThemedColors(theme);
|
|
7686
|
+
const { highlightColor } = getHighContrastColors();
|
|
7130
7687
|
return {
|
|
7131
7688
|
'@global': {
|
|
7132
7689
|
ul: {
|
|
@@ -7155,15 +7712,72 @@ const getListStyles = (direction, theme) => {
|
|
|
7155
7712
|
scrollbarWidth: 'thin',
|
|
7156
7713
|
scrollbarColor: 'auto',
|
|
7157
7714
|
transition: getTransition('border-color'),
|
|
7158
|
-
transform: 'translate3d(0,0,0)',
|
|
7715
|
+
transform: 'translate3d(0,0,0)',
|
|
7716
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7717
|
+
background: backgroundColorDark,
|
|
7718
|
+
borderColor: primaryColorDark,
|
|
7719
|
+
[isDirectionDown ? 'borderTopColor' : 'borderBottomColor']: addImportantToRule(contrastMediumColorDark),
|
|
7720
|
+
}),
|
|
7159
7721
|
},
|
|
7160
7722
|
},
|
|
7161
|
-
|
|
7723
|
+
option: {
|
|
7724
|
+
display: 'flex',
|
|
7725
|
+
justifyContent: 'space-between',
|
|
7726
|
+
gap: '12px',
|
|
7727
|
+
padding: `${spacingStaticSmall} 12px`,
|
|
7728
|
+
flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
|
|
7729
|
+
color: contrastHighColor,
|
|
7730
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7731
|
+
color: contrastHighColorDark,
|
|
7732
|
+
}),
|
|
7733
|
+
cursor: 'pointer',
|
|
7734
|
+
textAlign: 'left',
|
|
7735
|
+
wordBreak: 'break-word',
|
|
7736
|
+
boxSizing: 'border-box',
|
|
7737
|
+
borderRadius: borderRadiusSmall,
|
|
7738
|
+
transition: ['background-color', 'color'].map(getTransition).join(),
|
|
7739
|
+
...getNoResultsOptionJssStyle(),
|
|
7740
|
+
...hoverMediaQuery({
|
|
7741
|
+
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
7742
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
7743
|
+
background: contrastLowColor,
|
|
7744
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7745
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
7746
|
+
background: contrastLowColorDark,
|
|
7747
|
+
}),
|
|
7748
|
+
},
|
|
7749
|
+
}),
|
|
7162
7750
|
'&--selected': {
|
|
7163
7751
|
cursor: 'default',
|
|
7164
7752
|
pointerEvents: 'none',
|
|
7753
|
+
background: backgroundSurfaceColor,
|
|
7754
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7755
|
+
background: backgroundSurfaceColorDark,
|
|
7756
|
+
}),
|
|
7165
7757
|
},
|
|
7166
|
-
|
|
7758
|
+
'&--highlighted': {
|
|
7759
|
+
background: contrastLowColor,
|
|
7760
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7761
|
+
background: contrastLowColorDark,
|
|
7762
|
+
}),
|
|
7763
|
+
},
|
|
7764
|
+
'&--highlighted, &--selected': {
|
|
7765
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
7766
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7767
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
7768
|
+
}),
|
|
7769
|
+
},
|
|
7770
|
+
'&--disabled': {
|
|
7771
|
+
cursor: 'not-allowed',
|
|
7772
|
+
color: disabledColor,
|
|
7773
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7774
|
+
color: disabledColorDark,
|
|
7775
|
+
}),
|
|
7776
|
+
},
|
|
7777
|
+
'&--hidden': {
|
|
7778
|
+
display: 'none',
|
|
7779
|
+
},
|
|
7780
|
+
},
|
|
7167
7781
|
optgroup: {
|
|
7168
7782
|
display: 'block',
|
|
7169
7783
|
padding: '3px 14px',
|
|
@@ -7179,7 +7793,9 @@ const getListStyles = (direction, theme) => {
|
|
|
7179
7793
|
};
|
|
7180
7794
|
const getComponentCss$p = (direction, isOpen, state, disabled, filter, theme) => {
|
|
7181
7795
|
const { primaryColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
7796
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
7182
7797
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
7798
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
7183
7799
|
return getCss(
|
|
7184
7800
|
// merge because of global styles
|
|
7185
7801
|
mergeDeep({
|
|
@@ -7194,11 +7810,17 @@ const getComponentCss$p = (direction, isOpen, state, disabled, filter, theme) =>
|
|
|
7194
7810
|
left: 0,
|
|
7195
7811
|
right: 0,
|
|
7196
7812
|
color: disabled ? disabledColor : formStateColor || contrastMediumColor,
|
|
7813
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7814
|
+
color: disabled ? disabledColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7815
|
+
}),
|
|
7197
7816
|
...(!disabled &&
|
|
7198
7817
|
!isHighContrastMode &&
|
|
7199
7818
|
hoverMediaQuery({
|
|
7200
7819
|
'&(:hover)': {
|
|
7201
7820
|
color: formStateHoverColor || primaryColor,
|
|
7821
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7822
|
+
color: formStateHoverColorDark || primaryColorDark,
|
|
7823
|
+
}),
|
|
7202
7824
|
},
|
|
7203
7825
|
})),
|
|
7204
7826
|
},
|
|
@@ -7216,6 +7838,7 @@ const getComponentCss$o = (isDisabled, hasCustomDropdown, hideLabel, state, them
|
|
|
7216
7838
|
'@global': addImportantToEachRule({
|
|
7217
7839
|
':host': {
|
|
7218
7840
|
display: 'block',
|
|
7841
|
+
...colorSchemeStyles,
|
|
7219
7842
|
...hostHiddenStyles,
|
|
7220
7843
|
},
|
|
7221
7844
|
...getBaseChildStyles('select', state, theme, {
|
|
@@ -7260,12 +7883,14 @@ const getComponentCss$n = (size, theme) => {
|
|
|
7260
7883
|
const strokeDasharray = '57'; // C = 2πR
|
|
7261
7884
|
const animationDuration = 'var(--p-animation-duration, 2s)';
|
|
7262
7885
|
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
7886
|
+
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
7263
7887
|
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
7264
7888
|
return getCss({
|
|
7265
7889
|
'@global': {
|
|
7266
7890
|
':host': addImportantToEachRule({
|
|
7267
7891
|
display: 'inline-flex',
|
|
7268
7892
|
verticalAlign: 'top',
|
|
7893
|
+
...colorSchemeStyles,
|
|
7269
7894
|
...hostHiddenStyles,
|
|
7270
7895
|
}),
|
|
7271
7896
|
svg: {
|
|
@@ -7277,13 +7902,21 @@ const getComponentCss$n = (size, theme) => {
|
|
|
7277
7902
|
},
|
|
7278
7903
|
circle: {
|
|
7279
7904
|
'&:first-child': {
|
|
7905
|
+
// TODO: High Contrast Mode should be handled within a local color helper function
|
|
7280
7906
|
stroke: isHighContrastMode ? canvasTextColor : contrastMediumColor,
|
|
7907
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7908
|
+
stroke: isHighContrastMode ? canvasTextColor : contrastMediumColorDark,
|
|
7909
|
+
}),
|
|
7281
7910
|
animation: `$rotate ${animationDuration} linear infinite`, // needs to rotate to eliminate stutter in safari
|
|
7282
7911
|
},
|
|
7283
7912
|
'&:last-child': {
|
|
7284
7913
|
transformOrigin: '0 0',
|
|
7285
7914
|
animation: `$dash ${animationDuration} ease-in-out infinite`,
|
|
7915
|
+
// TODO: High Contrast Mode should be handled within a local color helper function
|
|
7286
7916
|
stroke: isHighContrastMode ? canvasColor : primaryColor,
|
|
7917
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7918
|
+
stroke: isHighContrastMode ? canvasColor : primaryColorDark,
|
|
7919
|
+
}),
|
|
7287
7920
|
strokeDasharray: strokeDasharray
|
|
7288
7921
|
,
|
|
7289
7922
|
strokeLinecap: 'round',
|
|
@@ -7326,7 +7959,7 @@ const getComponentCss$n = (size, theme) => {
|
|
|
7326
7959
|
|
|
7327
7960
|
const getSVGPath = (stepCount, numberedCircleColors, isStateCurrent) => {
|
|
7328
7961
|
// # 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
|
|
7962
|
+
numberedCircleColors = Object.entries(numberedCircleColors).reduce((result, [key, value]) => ({ ...result, [key]: escapeHashCharacter(value) }), {});
|
|
7330
7963
|
const { disabledColor, invertedBaseColor, primaryColor } = numberedCircleColors;
|
|
7331
7964
|
const fillColor = isStateCurrent ? invertedBaseColor : disabledColor;
|
|
7332
7965
|
const svgCirclePath = `<circle fill="${isStateCurrent ? primaryColor : 'none'}"${isStateCurrent ? '' : ` stroke="${fillColor}"`} stroke-width="1px" cx="12" cy="12" r="9"/>`;
|
|
@@ -7348,6 +7981,7 @@ const getSVGPath = (stepCount, numberedCircleColors, isStateCurrent) => {
|
|
|
7348
7981
|
};
|
|
7349
7982
|
const getComponentCss$m = (state, disabled, theme) => {
|
|
7350
7983
|
const { primaryColor, hoverColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
7984
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
7351
7985
|
const isStateCurrent = state === 'current';
|
|
7352
7986
|
const isStateCurrentOrUndefined = !state || isStateCurrent;
|
|
7353
7987
|
const isDisabled = !state || disabled;
|
|
@@ -7363,6 +7997,13 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
7363
7997
|
invertedBaseColor: getInvertedThemedColors(theme).primaryColor,
|
|
7364
7998
|
disabledColor,
|
|
7365
7999
|
}, isStateCurrent)),
|
|
8000
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8001
|
+
backgroundImage: getInlineSVGBackgroundImage(getSVGPath(i, {
|
|
8002
|
+
primaryColor: primaryColorDark,
|
|
8003
|
+
invertedBaseColor: getInvertedThemedColors('dark').primaryColor,
|
|
8004
|
+
disabledColor: disabledColorDark,
|
|
8005
|
+
}, isStateCurrent)),
|
|
8006
|
+
}),
|
|
7366
8007
|
},
|
|
7367
8008
|
}), {})),
|
|
7368
8009
|
...addImportantToEachRule({
|
|
@@ -7391,12 +8032,21 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
7391
8032
|
...frostedGlassStyle,
|
|
7392
8033
|
background: hoverColor,
|
|
7393
8034
|
}),
|
|
8035
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8036
|
+
color: isDisabled ? disabledColorDark : primaryColorDark,
|
|
8037
|
+
...(isStateCurrent && {
|
|
8038
|
+
background: hoverColorDark,
|
|
8039
|
+
}),
|
|
8040
|
+
}),
|
|
7394
8041
|
...(!isDisabled &&
|
|
7395
8042
|
hoverMediaQuery({
|
|
7396
8043
|
transition: getTransition('background-color'),
|
|
7397
8044
|
'&:hover': {
|
|
7398
8045
|
...frostedGlassStyle,
|
|
7399
8046
|
background: hoverColor,
|
|
8047
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8048
|
+
background: hoverColorDark,
|
|
8049
|
+
}),
|
|
7400
8050
|
},
|
|
7401
8051
|
})),
|
|
7402
8052
|
...(isStateCurrentOrUndefined && {
|
|
@@ -7413,6 +8063,9 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
7413
8063
|
position: 'absolute',
|
|
7414
8064
|
...getInsetJssStyle(),
|
|
7415
8065
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
8066
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8067
|
+
borderColor: focusColorDark,
|
|
8068
|
+
}),
|
|
7416
8069
|
borderRadius: borderRadiusSmall,
|
|
7417
8070
|
},
|
|
7418
8071
|
'&:focus:not(:focus-visible)::after': {
|
|
@@ -7436,7 +8089,10 @@ const getComponentCss$l = (size) => {
|
|
|
7436
8089
|
'@global': {
|
|
7437
8090
|
':host': {
|
|
7438
8091
|
display: 'block',
|
|
7439
|
-
...addImportantToEachRule(
|
|
8092
|
+
...addImportantToEachRule({
|
|
8093
|
+
...colorSchemeStyles,
|
|
8094
|
+
...hostHiddenStyles,
|
|
8095
|
+
}),
|
|
7440
8096
|
},
|
|
7441
8097
|
},
|
|
7442
8098
|
scroller: {
|
|
@@ -7476,11 +8132,14 @@ const getColors$1 = (checked, disabled, loading, theme) => {
|
|
|
7476
8132
|
};
|
|
7477
8133
|
const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, loading, theme) => {
|
|
7478
8134
|
const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, disabled, loading, theme);
|
|
8135
|
+
const { buttonBorderColor: buttonBorderColorDark, buttonBorderColorHover: buttonBorderColorHoverDark, buttonBackgroundColor: buttonBackgroundColorDark, buttonBackgroundColorHover: buttonBackgroundColorHoverDark, toggleBackgroundColor: toggleBackgroundColorDark, toggleBackgroundColorHover: toggleBackgroundColorHoverDark, textColor: textColorDark, } = getColors$1(checked, disabled, loading, 'dark');
|
|
7479
8136
|
const { focusColor } = getThemedColors(theme);
|
|
8137
|
+
const { focusColor: focusColorDark } = getThemedColors('dark');
|
|
7480
8138
|
return getCss({
|
|
7481
8139
|
'@global': {
|
|
7482
8140
|
':host': addImportantToEachRule({
|
|
7483
8141
|
outline: 0,
|
|
8142
|
+
...colorSchemeStyles,
|
|
7484
8143
|
...hostHiddenStyles,
|
|
7485
8144
|
...buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
7486
8145
|
display: stretchValue ? 'block' : 'inline-block',
|
|
@@ -7509,8 +8168,15 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7509
8168
|
'&:hover .switch': {
|
|
7510
8169
|
borderColor: buttonBorderColorHover,
|
|
7511
8170
|
backgroundColor: buttonBackgroundColorHover,
|
|
8171
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8172
|
+
borderColor: buttonBorderColorHoverDark,
|
|
8173
|
+
backgroundColor: buttonBackgroundColorHoverDark,
|
|
8174
|
+
}),
|
|
7512
8175
|
'& .toggle': {
|
|
7513
8176
|
backgroundColor: toggleBackgroundColorHover,
|
|
8177
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8178
|
+
backgroundColor: toggleBackgroundColorHoverDark,
|
|
8179
|
+
}),
|
|
7514
8180
|
},
|
|
7515
8181
|
},
|
|
7516
8182
|
})),
|
|
@@ -7519,6 +8185,9 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7519
8185
|
position: 'absolute',
|
|
7520
8186
|
...getInsetJssStyle(-6),
|
|
7521
8187
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
8188
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8189
|
+
borderColor: focusColorDark,
|
|
8190
|
+
}),
|
|
7522
8191
|
borderRadius: '18px',
|
|
7523
8192
|
},
|
|
7524
8193
|
'&:not(:focus-visible) .switch::before': {
|
|
@@ -7536,6 +8205,10 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7536
8205
|
backgroundColor: buttonBackgroundColor,
|
|
7537
8206
|
cursor: isDisabledOrLoading(disabled, loading) ? 'not-allowed' : 'pointer',
|
|
7538
8207
|
transition: `${getTransition('background-color')},${getTransition('border-color')},${getTransition('color')}`,
|
|
8208
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8209
|
+
borderColor: buttonBorderColorDark,
|
|
8210
|
+
backgroundColor: buttonBackgroundColorDark,
|
|
8211
|
+
}),
|
|
7539
8212
|
},
|
|
7540
8213
|
toggle: {
|
|
7541
8214
|
position: 'absolute',
|
|
@@ -7546,6 +8219,9 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7546
8219
|
display: 'block',
|
|
7547
8220
|
borderRadius: '50%',
|
|
7548
8221
|
backgroundColor: toggleBackgroundColor,
|
|
8222
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8223
|
+
backgroundColor: toggleBackgroundColorDark,
|
|
8224
|
+
}),
|
|
7549
8225
|
transform: `translate3d(${checked ? '20px' : '0'}, 0, 0)`,
|
|
7550
8226
|
transition: `${getTransition('background-color')},${getTransition('transform')}`,
|
|
7551
8227
|
},
|
|
@@ -7564,6 +8240,9 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7564
8240
|
minWidth: 0,
|
|
7565
8241
|
minHeight: 0,
|
|
7566
8242
|
color: textColor,
|
|
8243
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8244
|
+
color: textColorDark,
|
|
8245
|
+
}),
|
|
7567
8246
|
...mergeDeep(buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
7568
8247
|
order: alignLabelValue === 'left' ? -1 : 0,
|
|
7569
8248
|
})), buildResponsiveStyles(hideLabel, getHiddenTextJssStyle)),
|
|
@@ -7609,6 +8288,7 @@ const cssVariableTableBorderColor = '--p-internal-table-border-color';
|
|
|
7609
8288
|
const cssVariableTableHeadCellIconFilter = '--p-internal-table-head-cell-icon-filter';
|
|
7610
8289
|
const getComponentCss$h = (theme) => {
|
|
7611
8290
|
const { primaryColor, hoverColor, contrastLowColor } = doGetThemedColors(theme);
|
|
8291
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastLowColor: contrastLowColorDark, } = doGetThemedColors('dark');
|
|
7612
8292
|
return getCss({
|
|
7613
8293
|
'@global': {
|
|
7614
8294
|
':host': addImportantToEachRule({
|
|
@@ -7616,12 +8296,21 @@ const getComponentCss$h = (theme) => {
|
|
|
7616
8296
|
...textSmallStyle,
|
|
7617
8297
|
color: primaryColor,
|
|
7618
8298
|
textAlign: 'left',
|
|
8299
|
+
...colorSchemeStyles,
|
|
7619
8300
|
...hostHiddenStyles,
|
|
8301
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8302
|
+
color: primaryColorDark,
|
|
8303
|
+
}),
|
|
7620
8304
|
}),
|
|
7621
8305
|
'::slotted(*)': addImportantToEachRule({
|
|
7622
8306
|
[cssVariableTableHoverColor]: hoverColor,
|
|
7623
8307
|
[cssVariableTableBorderColor]: contrastLowColor,
|
|
7624
8308
|
[cssVariableTableHeadCellIconFilter]: isThemeDark(theme) ? 'invert(100%)' : 'none',
|
|
8309
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8310
|
+
[cssVariableTableHoverColor]: hoverColorDark,
|
|
8311
|
+
[cssVariableTableBorderColor]: contrastLowColorDark,
|
|
8312
|
+
[cssVariableTableHeadCellIconFilter]: 'invert(100%)',
|
|
8313
|
+
}),
|
|
7625
8314
|
...(isHighContrastMode &&
|
|
7626
8315
|
getSchemedHighContrastMediaQuery({
|
|
7627
8316
|
[cssVariableTableHeadCellIconFilter]: 'none',
|
|
@@ -7776,11 +8465,21 @@ const targetSelectors = ['a', 'button'];
|
|
|
7776
8465
|
const transformSelector = (selector) => targetSelectors.map((tag) => selector.replace(/\[role]/g, tag)).join();
|
|
7777
8466
|
const getComponentCss$c = (size, weight, theme) => {
|
|
7778
8467
|
const { primaryColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
8468
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
7779
8469
|
const barJssStyle = {
|
|
7780
8470
|
position: 'absolute',
|
|
7781
8471
|
height: '2px',
|
|
7782
8472
|
left: 0,
|
|
7783
|
-
|
|
8473
|
+
...(isHighContrastMode
|
|
8474
|
+
? {
|
|
8475
|
+
background: getHighContrastColors().canvasTextColor,
|
|
8476
|
+
}
|
|
8477
|
+
: {
|
|
8478
|
+
background: primaryColor,
|
|
8479
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8480
|
+
background: primaryColorDark,
|
|
8481
|
+
}),
|
|
8482
|
+
}),
|
|
7784
8483
|
};
|
|
7785
8484
|
return getCss({
|
|
7786
8485
|
'@global': {
|
|
@@ -7788,6 +8487,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7788
8487
|
display: 'block',
|
|
7789
8488
|
...addImportantToEachRule({
|
|
7790
8489
|
position: 'relative',
|
|
8490
|
+
...colorSchemeStyles,
|
|
7791
8491
|
...hostHiddenStyles,
|
|
7792
8492
|
}),
|
|
7793
8493
|
},
|
|
@@ -7818,6 +8518,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7818
8518
|
cursor: 'pointer',
|
|
7819
8519
|
borderRadius: borderRadiusSmall,
|
|
7820
8520
|
zIndex: 0,
|
|
8521
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8522
|
+
color: primaryColorDark,
|
|
8523
|
+
}),
|
|
7821
8524
|
...hoverMediaQuery({
|
|
7822
8525
|
'&::before': {
|
|
7823
8526
|
content: '""',
|
|
@@ -7833,6 +8536,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7833
8536
|
[transformSelector('::slotted([role]:hover)::before')]: {
|
|
7834
8537
|
...frostedGlassStyle,
|
|
7835
8538
|
background: hoverColor,
|
|
8539
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8540
|
+
background: hoverColorDark,
|
|
8541
|
+
}),
|
|
7836
8542
|
},
|
|
7837
8543
|
}),
|
|
7838
8544
|
// basic invisible bar, that will be delayed via transition: visibility
|
|
@@ -7850,6 +8556,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7850
8556
|
// TODO: combine link-social-styles with link-button-styles and tabs-bar-styles
|
|
7851
8557
|
[transformSelector('::slotted([role]:focus:focus-visible)::before')]: {
|
|
7852
8558
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
8559
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8560
|
+
borderColor: focusColorDark,
|
|
8561
|
+
}),
|
|
7853
8562
|
},
|
|
7854
8563
|
[transformSelector('::slotted([role]:not(:last-child))')]: {
|
|
7855
8564
|
marginRight: spacingStaticMedium,
|
|
@@ -7887,20 +8596,27 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
7887
8596
|
|
|
7888
8597
|
const getComponentCss$b = (theme) => {
|
|
7889
8598
|
const { primaryColor, focusColor } = getThemedColors(theme);
|
|
8599
|
+
const { primaryColor: primaryColorDark, focusColor: focusColorDark } = getThemedColors('dark');
|
|
7890
8600
|
return getCss({
|
|
7891
8601
|
'@global': {
|
|
7892
8602
|
':host': addImportantToEachRule({
|
|
7893
8603
|
display: 'block',
|
|
7894
8604
|
position: 'relative',
|
|
7895
8605
|
color: primaryColor,
|
|
7896
|
-
...hostHiddenStyles,
|
|
7897
8606
|
outline: 0,
|
|
8607
|
+
...hostHiddenStyles,
|
|
8608
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8609
|
+
color: primaryColorDark,
|
|
8610
|
+
}),
|
|
7898
8611
|
'&(:focus:focus-visible)::before': {
|
|
7899
8612
|
content: '""',
|
|
7900
8613
|
position: 'absolute',
|
|
7901
8614
|
...getInsetJssStyle(-4),
|
|
7902
8615
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
7903
8616
|
borderRadius: borderRadiusSmall,
|
|
8617
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8618
|
+
borderColor: focusColorDark,
|
|
8619
|
+
}),
|
|
7904
8620
|
},
|
|
7905
8621
|
}),
|
|
7906
8622
|
},
|
|
@@ -7912,7 +8628,10 @@ const getComponentCss$a = () => {
|
|
|
7912
8628
|
'@global': {
|
|
7913
8629
|
':host': {
|
|
7914
8630
|
display: 'block',
|
|
7915
|
-
...addImportantToEachRule(
|
|
8631
|
+
...addImportantToEachRule({
|
|
8632
|
+
...colorSchemeStyles,
|
|
8633
|
+
...hostHiddenStyles,
|
|
8634
|
+
}),
|
|
7916
8635
|
},
|
|
7917
8636
|
},
|
|
7918
8637
|
root: {
|
|
@@ -7950,14 +8669,18 @@ const getThemedBackgroundColor = (tagColor, themedColors) => {
|
|
|
7950
8669
|
|
|
7951
8670
|
const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
7952
8671
|
const themedColors = getThemedColors(theme);
|
|
8672
|
+
const themedColorsDark = getThemedColors('dark');
|
|
7953
8673
|
const { primaryColor, hoverColor, contrastHighColor } = themedColors;
|
|
8674
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastHighColor: contrastHighColorDark, } = themedColorsDark;
|
|
7954
8675
|
const backgroundColor = getThemedBackgroundColor(color, themedColors);
|
|
8676
|
+
const backgroundColorDark = getThemedBackgroundColor(color, themedColorsDark);
|
|
7955
8677
|
return getCss({
|
|
7956
8678
|
'@global': {
|
|
7957
8679
|
':host': addImportantToEachRule({
|
|
7958
8680
|
display: 'inline-block',
|
|
7959
8681
|
verticalAlign: 'top',
|
|
7960
8682
|
outline: 0,
|
|
8683
|
+
...colorSchemeStyles,
|
|
7961
8684
|
...hostHiddenStyles,
|
|
7962
8685
|
}),
|
|
7963
8686
|
button: {
|
|
@@ -7972,6 +8695,10 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
7972
8695
|
cursor: 'pointer',
|
|
7973
8696
|
background: backgroundColor,
|
|
7974
8697
|
color: primaryColor,
|
|
8698
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8699
|
+
background: backgroundColorDark,
|
|
8700
|
+
color: primaryColorDark,
|
|
8701
|
+
}),
|
|
7975
8702
|
textAlign: 'left',
|
|
7976
8703
|
...textSmallStyle,
|
|
7977
8704
|
outline: isHighContrastMode ? '1px solid transparent' : 0,
|
|
@@ -7979,6 +8706,9 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
7979
8706
|
...hoverMediaQuery({
|
|
7980
8707
|
'&:hover > .icon': {
|
|
7981
8708
|
backgroundColor: hoverColor,
|
|
8709
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8710
|
+
backgroundColor: hoverColorDark,
|
|
8711
|
+
}),
|
|
7982
8712
|
},
|
|
7983
8713
|
}),
|
|
7984
8714
|
},
|
|
@@ -7988,6 +8718,9 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
7988
8718
|
display: 'block',
|
|
7989
8719
|
marginBottom: '-4px',
|
|
7990
8720
|
color: contrastHighColor,
|
|
8721
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8722
|
+
color: contrastHighColorDark,
|
|
8723
|
+
}),
|
|
7991
8724
|
fontSize: fontSizeTextXSmall,
|
|
7992
8725
|
},
|
|
7993
8726
|
}),
|
|
@@ -8027,14 +8760,19 @@ const getColors = (themedColors, tagColor, theme) => {
|
|
|
8027
8760
|
};
|
|
8028
8761
|
const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
8029
8762
|
const themedColors = getThemedColors(theme);
|
|
8763
|
+
const themedColorsDark = getThemedColors('dark');
|
|
8030
8764
|
const { primaryColor, backgroundColor, backgroundHoverColor } = getColors(themedColors, tagColor, theme);
|
|
8765
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, backgroundHoverColor: backgroundHoverColorDark, } = getColors(themedColorsDark, tagColor, 'dark');
|
|
8031
8766
|
return getCss({
|
|
8032
8767
|
'@global': {
|
|
8033
8768
|
':host': {
|
|
8034
8769
|
display: 'inline-flex',
|
|
8035
8770
|
verticalAlign: 'top',
|
|
8036
8771
|
whiteSpace: 'nowrap',
|
|
8037
|
-
...addImportantToEachRule(
|
|
8772
|
+
...addImportantToEachRule({
|
|
8773
|
+
...colorSchemeStyles,
|
|
8774
|
+
...hostHiddenStyles,
|
|
8775
|
+
}),
|
|
8038
8776
|
},
|
|
8039
8777
|
span: {
|
|
8040
8778
|
display: 'flex',
|
|
@@ -8045,6 +8783,10 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8045
8783
|
borderRadius: borderRadiusSmall,
|
|
8046
8784
|
background: backgroundColor,
|
|
8047
8785
|
color: primaryColor,
|
|
8786
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8787
|
+
background: backgroundColorDark,
|
|
8788
|
+
color: primaryColorDark,
|
|
8789
|
+
}),
|
|
8048
8790
|
font: textXSmallStyle.font,
|
|
8049
8791
|
...(isHighContrastMode && {
|
|
8050
8792
|
outline: '1px solid transparent',
|
|
@@ -8054,6 +8796,9 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8054
8796
|
transition: getTransition('background-color'),
|
|
8055
8797
|
'&:hover': {
|
|
8056
8798
|
background: backgroundHoverColor,
|
|
8799
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8800
|
+
background: backgroundHoverColorDark,
|
|
8801
|
+
}),
|
|
8057
8802
|
},
|
|
8058
8803
|
})),
|
|
8059
8804
|
},
|
|
@@ -8083,6 +8828,11 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8083
8828
|
icon: {
|
|
8084
8829
|
marginLeft: '-2px',
|
|
8085
8830
|
alignSelf: 'flex-start',
|
|
8831
|
+
...(['neutral-contrast-high', 'primary'].includes(tagColor) && {
|
|
8832
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8833
|
+
filter: 'invert(1)',
|
|
8834
|
+
}),
|
|
8835
|
+
}),
|
|
8086
8836
|
},
|
|
8087
8837
|
});
|
|
8088
8838
|
};
|
|
@@ -8120,6 +8870,7 @@ const getButtonOrIconOffsetHorizontal = (buttonOrIconAmount) => {
|
|
|
8120
8870
|
};
|
|
8121
8871
|
const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter, unitPosition, inputType, showPasswordToggle, isWithinForm, theme) => {
|
|
8122
8872
|
const { contrastMediumColor } = getThemedColors(theme);
|
|
8873
|
+
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
8123
8874
|
const isSearch = isType(inputType, 'search');
|
|
8124
8875
|
const isPassword = isType(inputType, 'password');
|
|
8125
8876
|
const isNumber = isType(inputType, 'number');
|
|
@@ -8138,6 +8889,7 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
8138
8889
|
[cssVariableInputPaddingRight]: isSearchOrPassword || isCalendarOrTimeWithCustomIndicator
|
|
8139
8890
|
? getInputPaddingHorizontal(isSearchWithForm ? 2 : 1)
|
|
8140
8891
|
: spacingStaticMedium,
|
|
8892
|
+
...colorSchemeStyles,
|
|
8141
8893
|
...hostHiddenStyles,
|
|
8142
8894
|
}),
|
|
8143
8895
|
},
|
|
@@ -8185,6 +8937,9 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
8185
8937
|
padding: unitPosition === 'suffix' ? `0 ${spacingStaticMedium} 0 10px` : `0 10px 0 ${spacingStaticMedium}`,
|
|
8186
8938
|
font: textSmallStyle.font,
|
|
8187
8939
|
color: contrastMediumColor,
|
|
8940
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8941
|
+
color: contrastMediumColorDark,
|
|
8942
|
+
}),
|
|
8188
8943
|
},
|
|
8189
8944
|
}),
|
|
8190
8945
|
...getFunctionalComponentRequiredStyles(),
|
|
@@ -8216,18 +8971,22 @@ const getComponentCss$6 = (type, theme) => {
|
|
|
8216
8971
|
display: 'block',
|
|
8217
8972
|
...addImportantToEachRule({
|
|
8218
8973
|
counterReset: counter,
|
|
8974
|
+
...colorSchemeStyles,
|
|
8219
8975
|
...hostHiddenStyles,
|
|
8220
8976
|
}),
|
|
8221
8977
|
},
|
|
8222
8978
|
'ol,ul': {
|
|
8223
8979
|
...textSmallStyle,
|
|
8224
|
-
color: getThemedColors(theme).primaryColor,
|
|
8225
8980
|
margin: 0,
|
|
8226
8981
|
padding: `var(${cssVariablePaddingTop},0) 0 var(${cssVariablePaddingBottom},0) ${isOrderedList
|
|
8227
8982
|
? `var(${cssVariableOrderedPaddingLeft},1.5rem)` // reserves space for ::before (root ordered list)
|
|
8228
8983
|
: `var(${cssVariableUnorderedPaddingLeft},.375rem)` // reserves space for ::marker "•" (root unordered list)
|
|
8229
8984
|
}`,
|
|
8230
|
-
listStyleType: isOrderedList ? 'none' : `var(${cssVariableListStyleType},'•')`,
|
|
8985
|
+
listStyleType: isOrderedList ? 'none' : `var(${cssVariableListStyleType},'•')`,
|
|
8986
|
+
color: getThemedColors(theme).primaryColor,
|
|
8987
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8988
|
+
color: getThemedColors('dark').primaryColor,
|
|
8989
|
+
}),
|
|
8231
8990
|
},
|
|
8232
8991
|
// css selector for text-list-item
|
|
8233
8992
|
'::slotted(*)': addImportantToEachRule({
|
|
@@ -8286,7 +9045,10 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis, theme) => {
|
|
|
8286
9045
|
'@global': {
|
|
8287
9046
|
':host': {
|
|
8288
9047
|
display: 'block',
|
|
8289
|
-
...addImportantToEachRule(
|
|
9048
|
+
...addImportantToEachRule({
|
|
9049
|
+
...colorSchemeStyles,
|
|
9050
|
+
...hostHiddenStyles,
|
|
9051
|
+
}),
|
|
8290
9052
|
},
|
|
8291
9053
|
'::slotted': {
|
|
8292
9054
|
[TEXT_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
@@ -8301,10 +9063,12 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis, theme) => {
|
|
|
8301
9063
|
|
|
8302
9064
|
const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
8303
9065
|
const { contrastMediumColor } = getThemedColors(theme);
|
|
9066
|
+
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
8304
9067
|
return getCss({
|
|
8305
9068
|
'@global': {
|
|
8306
9069
|
':host': addImportantToEachRule({
|
|
8307
9070
|
display: 'block',
|
|
9071
|
+
...colorSchemeStyles,
|
|
8308
9072
|
...hostHiddenStyles,
|
|
8309
9073
|
}),
|
|
8310
9074
|
...mergeDeep(addImportantToEachRule(getBaseChildStyles('textarea', state, theme, {
|
|
@@ -8326,6 +9090,9 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
8326
9090
|
zIndex: 1,
|
|
8327
9091
|
font: textSmallStyle.font,
|
|
8328
9092
|
color: contrastMediumColor,
|
|
9093
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9094
|
+
color: contrastMediumColorDark,
|
|
9095
|
+
}),
|
|
8329
9096
|
},
|
|
8330
9097
|
}),
|
|
8331
9098
|
...getFunctionalComponentRequiredStyles(),
|
|
@@ -8381,6 +9148,7 @@ const getComponentCss$1 = () => {
|
|
|
8381
9148
|
[cssVariablePositionBottomInternal]: `var(${cssVariablePositionBottom}, 64px)`,
|
|
8382
9149
|
bottom: `var(${cssVariablePositionBottomInternal})`,
|
|
8383
9150
|
},
|
|
9151
|
+
...colorSchemeStyles,
|
|
8384
9152
|
...hostHiddenStyles,
|
|
8385
9153
|
}),
|
|
8386
9154
|
'@keyframes in': getKeyframesMobile('in', cssVariablePositionBottomInternal),
|
|
@@ -8414,6 +9182,7 @@ const getComponentCss = (size, theme) => {
|
|
|
8414
9182
|
height: 'round(down, clamp(0.63rem, 0.42vw + 0.5rem, 1rem), 1px)',
|
|
8415
9183
|
},
|
|
8416
9184
|
}),
|
|
9185
|
+
...colorSchemeStyles,
|
|
8417
9186
|
...hostHiddenStyles,
|
|
8418
9187
|
}),
|
|
8419
9188
|
},
|
|
@@ -8427,49 +9196,57 @@ const getComponentCss = (size, theme) => {
|
|
|
8427
9196
|
textDecoration: 'none',
|
|
8428
9197
|
...focusPseudoJssStyle,
|
|
8429
9198
|
},
|
|
8430
|
-
svg:
|
|
8431
|
-
|
|
8432
|
-
|
|
9199
|
+
svg: isHighContrastMode
|
|
9200
|
+
? {
|
|
9201
|
+
fill: getHighContrastColors().canvasTextColor,
|
|
9202
|
+
}
|
|
9203
|
+
: {
|
|
9204
|
+
fill: getThemedColors(theme).primaryColor,
|
|
9205
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9206
|
+
fill: getThemedColors('dark').primaryColor,
|
|
9207
|
+
}),
|
|
9208
|
+
},
|
|
8433
9209
|
},
|
|
8434
9210
|
});
|
|
8435
9211
|
};
|
|
8436
9212
|
|
|
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$
|
|
9213
|
+
exports.getAccordionCss = getComponentCss$10;
|
|
9214
|
+
exports.getBannerCss = getComponentCss$$;
|
|
9215
|
+
exports.getButtonCss = getComponentCss$X;
|
|
9216
|
+
exports.getButtonGroupCss = getComponentCss$_;
|
|
9217
|
+
exports.getButtonPureCss = getComponentCss$Z;
|
|
9218
|
+
exports.getButtonTileCss = getComponentCss$Y;
|
|
9219
|
+
exports.getCarouselCss = getComponentCss$W;
|
|
9220
|
+
exports.getCheckboxWrapperCss = getComponentCss$V;
|
|
9221
|
+
exports.getContentWrapperCss = getComponentCss$U;
|
|
9222
|
+
exports.getCrestCss = getComponentCss$T;
|
|
9223
|
+
exports.getDisplayCss = getComponentCss$S;
|
|
9224
|
+
exports.getDividerCss = getComponentCss$R;
|
|
9225
|
+
exports.getFieldsetCss = getComponentCss$P;
|
|
9226
|
+
exports.getFieldsetWrapperCss = getComponentCss$Q;
|
|
9227
|
+
exports.getFlexCss = getComponentCss$N;
|
|
9228
|
+
exports.getFlexItemCss = getComponentCss$O;
|
|
9229
|
+
exports.getFlyoutCss = getComponentCss$M;
|
|
8454
9230
|
exports.getFunctionalComponentRequiredStyles = getFunctionalComponentRequiredStyles;
|
|
8455
9231
|
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$
|
|
9232
|
+
exports.getGridCss = getComponentCss$K;
|
|
9233
|
+
exports.getGridItemCss = getComponentCss$L;
|
|
9234
|
+
exports.getHeadingCss = getComponentCss$J;
|
|
9235
|
+
exports.getHeadlineCss = getComponentCss$I;
|
|
9236
|
+
exports.getIconCss = getComponentCss$H;
|
|
9237
|
+
exports.getInlineNotificationCss = getComponentCss$G;
|
|
9238
|
+
exports.getLinkCss = getComponentCss$E;
|
|
9239
|
+
exports.getLinkPureCss = getComponentCss$F;
|
|
9240
|
+
exports.getLinkSocialCss = getComponentCss$E;
|
|
9241
|
+
exports.getLinkTileCss = getComponentCss$C;
|
|
9242
|
+
exports.getLinkTileModelSignatureCss = getComponentCss$D;
|
|
9243
|
+
exports.getMarqueCss = getComponentCss$B;
|
|
9244
|
+
exports.getModalCss = getComponentCss$A;
|
|
9245
|
+
exports.getModelSignatureCss = getComponentCss$z;
|
|
9246
|
+
exports.getMultiSelectCss = getComponentCss$x;
|
|
9247
|
+
exports.getMultiSelectOptionCss = getComponentCss$y;
|
|
9248
|
+
exports.getPaginationCss = getComponentCss$w;
|
|
9249
|
+
exports.getPinCodeCss = getComponentCss$v;
|
|
8473
9250
|
exports.getPopoverCss = getComponentCss$u;
|
|
8474
9251
|
exports.getRadioButtonWrapperCss = getComponentCss$t;
|
|
8475
9252
|
exports.getScrollerCss = getComponentCss$s;
|