92 lines
4.7 KiB
JavaScript
92 lines
4.7 KiB
JavaScript
define(["require", "exports", "../../Styling", "../../Utilities", "./DocumentCardPreview.styles", "./DocumentCardActivity.styles", "./DocumentCardTitle.styles", "./DocumentCardLocation.styles"], function (require, exports, Styling_1, Utilities_1, DocumentCardPreview_styles_1, DocumentCardActivity_styles_1, DocumentCardTitle_styles_1, DocumentCardLocation_styles_1) {
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.getStyles = void 0;
|
|
var GlobalClassNames = {
|
|
root: 'ms-DocumentCard',
|
|
rootActionable: 'ms-DocumentCard--actionable',
|
|
rootCompact: 'ms-DocumentCard--compact',
|
|
};
|
|
var getStyles = function (props) {
|
|
var _a, _b;
|
|
var className = props.className, theme = props.theme, actionable = props.actionable, compact = props.compact;
|
|
var palette = theme.palette, fonts = theme.fonts, effects = theme.effects;
|
|
var classNames = (0, Styling_1.getGlobalClassNames)(GlobalClassNames, theme);
|
|
return {
|
|
root: [
|
|
classNames.root,
|
|
{
|
|
WebkitFontSmoothing: 'antialiased',
|
|
backgroundColor: palette.white,
|
|
border: "1px solid ".concat(palette.neutralLight),
|
|
maxWidth: '320px',
|
|
minWidth: '206px',
|
|
userSelect: 'none',
|
|
position: 'relative',
|
|
selectors: (_a = {
|
|
':focus': {
|
|
outline: '0px solid',
|
|
}
|
|
},
|
|
_a[".".concat(Utilities_1.IsFocusVisibleClassName, " &:focus, :host(.").concat(Utilities_1.IsFocusVisibleClassName, ") &:focus")] = (0, Styling_1.getInputFocusStyle)(palette.neutralSecondary, effects.roundedCorner2),
|
|
_a[".".concat(DocumentCardLocation_styles_1.DocumentCardLocationGlobalClassNames.root, " + .").concat(DocumentCardTitle_styles_1.DocumentCardTitleGlobalClassNames.root)] = {
|
|
paddingTop: '4px',
|
|
},
|
|
_a),
|
|
},
|
|
actionable && [
|
|
classNames.rootActionable,
|
|
{
|
|
selectors: {
|
|
':hover': {
|
|
cursor: 'pointer',
|
|
borderColor: palette.neutralTertiaryAlt,
|
|
},
|
|
':hover:after': {
|
|
content: '" "',
|
|
position: 'absolute',
|
|
top: 0,
|
|
right: 0,
|
|
bottom: 0,
|
|
left: 0,
|
|
border: "1px solid ".concat(palette.neutralTertiaryAlt),
|
|
pointerEvents: 'none',
|
|
},
|
|
},
|
|
},
|
|
],
|
|
compact && [
|
|
classNames.rootCompact,
|
|
{
|
|
display: 'flex',
|
|
maxWidth: '480px',
|
|
height: '108px',
|
|
selectors: (_b = {},
|
|
_b[".".concat(DocumentCardPreview_styles_1.DocumentCardPreviewGlobalClassNames.root)] = {
|
|
borderRight: "1px solid ".concat(palette.neutralLight),
|
|
borderBottom: 0, // Remove the usual border from the preview
|
|
maxHeight: '106px',
|
|
maxWidth: '144px',
|
|
},
|
|
_b[".".concat(DocumentCardPreview_styles_1.DocumentCardPreviewGlobalClassNames.icon)] = {
|
|
maxHeight: '32px',
|
|
maxWidth: '32px',
|
|
},
|
|
_b[".".concat(DocumentCardActivity_styles_1.DocumentCardActivityGlobalClassNames.root)] = {
|
|
paddingBottom: '12px',
|
|
},
|
|
_b[".".concat(DocumentCardTitle_styles_1.DocumentCardTitleGlobalClassNames.root)] = {
|
|
paddingBottom: '12px 16px 8px 16px',
|
|
fontSize: fonts.mediumPlus.fontSize,
|
|
lineHeight: '16px',
|
|
},
|
|
_b),
|
|
},
|
|
],
|
|
className,
|
|
],
|
|
};
|
|
};
|
|
exports.getStyles = getStyles;
|
|
});
|
|
//# sourceMappingURL=DocumentCard.styles.js.map
|