102 lines
3.6 KiB
JavaScript
102 lines
3.6 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.getStyles = void 0;
|
|
var tslib_1 = require("tslib");
|
|
var Styling_1 = require("../../../Styling");
|
|
var Utilities_1 = require("../../../Utilities");
|
|
var BaseButton_styles_1 = require("../BaseButton.styles");
|
|
var SplitButton_styles_1 = require("../SplitButton/SplitButton.styles");
|
|
var ButtonThemes_1 = require("../ButtonThemes");
|
|
exports.getStyles = (0, Utilities_1.memoizeFunction)(function (theme, customStyles, primary) {
|
|
var _a, _b, _c, _d, _e;
|
|
var fonts = theme.fonts, palette = theme.palette;
|
|
var baseButtonStyles = (0, BaseButton_styles_1.getStyles)(theme);
|
|
var splitButtonStyles = (0, SplitButton_styles_1.getStyles)(theme);
|
|
var compoundButtonStyles = {
|
|
root: {
|
|
maxWidth: '280px',
|
|
minHeight: '72px',
|
|
height: 'auto',
|
|
padding: '16px 12px',
|
|
},
|
|
flexContainer: {
|
|
flexDirection: 'row',
|
|
alignItems: 'flex-start',
|
|
minWidth: '100%',
|
|
margin: '',
|
|
},
|
|
textContainer: {
|
|
textAlign: 'left',
|
|
},
|
|
icon: {
|
|
fontSize: '2em',
|
|
lineHeight: '1em',
|
|
height: '1em',
|
|
margin: '0px 8px 0px 0px',
|
|
flexBasis: '1em',
|
|
flexShrink: '0',
|
|
},
|
|
label: {
|
|
margin: '0 0 5px',
|
|
lineHeight: '100%',
|
|
fontWeight: Styling_1.FontWeights.semibold,
|
|
},
|
|
description: [
|
|
fonts.small,
|
|
{
|
|
lineHeight: '100%',
|
|
},
|
|
],
|
|
};
|
|
var standardCompoundTheme = {
|
|
description: {
|
|
color: palette.neutralSecondary,
|
|
},
|
|
descriptionHovered: {
|
|
color: palette.neutralDark,
|
|
},
|
|
descriptionPressed: {
|
|
color: 'inherit',
|
|
},
|
|
descriptionChecked: {
|
|
color: 'inherit',
|
|
},
|
|
descriptionDisabled: {
|
|
color: 'inherit',
|
|
},
|
|
};
|
|
var primaryCompoundTheme = {
|
|
description: (_a = {
|
|
color: palette.white
|
|
},
|
|
_a[Styling_1.HighContrastSelector] = tslib_1.__assign({ backgroundColor: 'WindowText', color: 'Window' }, (0, Styling_1.getHighContrastNoAdjustStyle)()),
|
|
_a),
|
|
descriptionHovered: (_b = {
|
|
color: palette.white
|
|
},
|
|
_b[Styling_1.HighContrastSelector] = {
|
|
backgroundColor: 'Highlight',
|
|
color: 'Window',
|
|
},
|
|
_b),
|
|
descriptionPressed: (_c = {
|
|
color: 'inherit'
|
|
},
|
|
_c[Styling_1.HighContrastSelector] = tslib_1.__assign({ color: 'Window', backgroundColor: 'WindowText' }, (0, Styling_1.getHighContrastNoAdjustStyle)()),
|
|
_c),
|
|
descriptionChecked: (_d = {
|
|
color: 'inherit'
|
|
},
|
|
_d[Styling_1.HighContrastSelector] = tslib_1.__assign({ color: 'Window', backgroundColor: 'WindowText' }, (0, Styling_1.getHighContrastNoAdjustStyle)()),
|
|
_d),
|
|
descriptionDisabled: (_e = {
|
|
color: 'inherit'
|
|
},
|
|
_e[Styling_1.HighContrastSelector] = {
|
|
color: 'inherit',
|
|
},
|
|
_e),
|
|
};
|
|
return (0, Styling_1.concatStyleSets)(baseButtonStyles, compoundButtonStyles, primary ? (0, ButtonThemes_1.primaryStyles)(theme) : (0, ButtonThemes_1.standardStyles)(theme), primary ? primaryCompoundTheme : standardCompoundTheme, splitButtonStyles, customStyles);
|
|
});
|
|
//# sourceMappingURL=CompoundButton.styles.js.map
|