first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
@@ -0,0 +1,20 @@
import * as React from 'react';
import type { IDocumentCard, IDocumentCardContext, IDocumentCardProps } from './DocumentCard.types';
import type { JSXElement } from '@fluentui/utilities';
export declare const DocumentCardContext: React.Context<IDocumentCardContext>;
/**
* {@docCategory DocumentCard}
*/
export declare class DocumentCardBase extends React.Component<IDocumentCardProps, any> implements IDocumentCard {
static defaultProps: IDocumentCardProps;
static contextType: React.Context<import("@fluentui/react-window-provider").WindowProviderProps>;
context: any;
private _rootElement;
private _classNames;
constructor(props: IDocumentCardProps);
render(): JSXElement;
focus(): void;
private _onClick;
private _onKeyDown;
private _onAction;
}
@@ -0,0 +1,92 @@
define(["require", "exports", "tslib", "react", "../../Utilities", "./DocumentCard.types", "@fluentui/react-window-provider", "../../utilities/dom"], function (require, exports, tslib_1, React, Utilities_1, DocumentCard_types_1, react_window_provider_1, dom_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardBase = exports.DocumentCardContext = void 0;
var getClassNames = (0, Utilities_1.classNamesFunction)();
var COMPONENT_NAME = 'DocumentCard';
exports.DocumentCardContext = React.createContext({});
/**
* {@docCategory DocumentCard}
*/
var DocumentCardBase = /** @class */ (function (_super) {
tslib_1.__extends(DocumentCardBase, _super);
function DocumentCardBase(props) {
var _this = _super.call(this, props) || this;
_this._rootElement = React.createRef();
_this._onClick = function (ev) {
_this._onAction(ev);
};
_this._onKeyDown = function (ev) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which === Utilities_1.KeyCodes.enter || ev.which === Utilities_1.KeyCodes.space) {
_this._onAction(ev);
}
};
_this._onAction = function (ev) {
var _a = _this.props, onClick = _a.onClick, onClickHref = _a.onClickHref, onClickTarget = _a.onClickTarget;
var win = (0, dom_1.getWindowEx)(_this.context); // can only be called on the client
if (onClick) {
onClick(ev);
}
else if (!onClick && onClickHref) {
// If no onClick Function was provided and we do have an onClickHref, redirect to the onClickHref
if (onClickTarget) {
win.open(onClickHref, onClickTarget, 'noreferrer noopener nofollow');
}
else {
win.location.href = onClickHref;
}
ev.preventDefault();
ev.stopPropagation();
}
};
(0, Utilities_1.initializeComponentRef)(_this);
(0, Utilities_1.warnDeprecations)(COMPONENT_NAME, props, {
accentColor: undefined,
});
return _this;
}
DocumentCardBase.prototype.render = function () {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var _a = this.props, onClick = _a.onClick, onClickHref = _a.onClickHref, children = _a.children, type = _a.type, accentColor = _a.accentColor, styles = _a.styles, theme = _a.theme, className = _a.className;
var nativeProps = (0, Utilities_1.getNativeProps)(this.props, Utilities_1.divProperties, [
'className',
'onClick',
'type',
'role',
]);
var actionable = onClick || onClickHref ? true : false;
this._classNames = getClassNames(styles, {
theme: theme,
className: className,
actionable: actionable,
compact: type === DocumentCard_types_1.DocumentCardType.compact ? true : false,
});
// Override the border color if an accent color was provided (compact card only)
var style;
if (type === DocumentCard_types_1.DocumentCardType.compact && accentColor) {
style = {
borderBottomColor: accentColor,
};
}
// if this element is actionable it should have an aria role
var role = this.props.role || (actionable ? (onClick ? 'button' : 'link') : undefined);
var tabIndex = actionable ? 0 : undefined;
var documentCardContextValue = { role: role, tabIndex: tabIndex };
return (React.createElement("div", tslib_1.__assign({ ref: this._rootElement, role: 'group', className: this._classNames.root, onKeyDown: actionable ? this._onKeyDown : undefined, onClick: actionable ? this._onClick : undefined, style: style }, nativeProps),
React.createElement(exports.DocumentCardContext.Provider, { value: documentCardContextValue }, children)));
};
DocumentCardBase.prototype.focus = function () {
if (this._rootElement.current) {
this._rootElement.current.focus();
}
};
DocumentCardBase.defaultProps = {
type: DocumentCard_types_1.DocumentCardType.normal,
};
DocumentCardBase.contextType = react_window_provider_1.WindowContext;
return DocumentCardBase;
}(React.Component));
exports.DocumentCardBase = DocumentCardBase;
});
//# sourceMappingURL=DocumentCard.base.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IDocumentCardProps } from './DocumentCard.types';
export declare const DocumentCard: React.FunctionComponent<IDocumentCardProps>;
@@ -0,0 +1,7 @@
define(["require", "exports", "../../Utilities", "./DocumentCard.base", "./DocumentCard.styles"], function (require, exports, Utilities_1, DocumentCard_base_1, DocumentCard_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCard = void 0;
exports.DocumentCard = (0, Utilities_1.styled)(DocumentCard_base_1.DocumentCardBase, DocumentCard_styles_1.getStyles, undefined, { scope: 'DocumentCard' });
});
//# sourceMappingURL=DocumentCard.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCard.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCard.ts"],"names":[],"mappings":";;;;IAMa,QAAA,YAAY,GAAgD,IAAA,kBAAM,EAI7E,oCAAgB,EAAE,+BAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { DocumentCardBase } from './DocumentCard.base';\nimport { getStyles } from './DocumentCard.styles';\nimport type { IDocumentCardProps, IDocumentCardStyleProps, IDocumentCardStyles } from './DocumentCard.types';\n\nexport const DocumentCard: React.FunctionComponent<IDocumentCardProps> = styled<\n IDocumentCardProps,\n IDocumentCardStyleProps,\n IDocumentCardStyles\n>(DocumentCardBase, getStyles, undefined, { scope: 'DocumentCard' });\n"]}
@@ -0,0 +1,2 @@
import type { IDocumentCardStyleProps, IDocumentCardStyles } from './DocumentCard.types';
export declare const getStyles: (props: IDocumentCardStyleProps) => IDocumentCardStyles;
@@ -0,0 +1,92 @@
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
File diff suppressed because one or more lines are too long
@@ -0,0 +1,117 @@
import * as React from 'react';
import type { IStyle, ITheme } from '../../Styling';
import type { IBaseProps, IRefObject, IStyleFunctionOrObject } from '../../Utilities';
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCard {
/**
* Sets focus to the DocumentCard.
*/
focus: () => void;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardProps extends IBaseProps<IDocumentCard>, React.HTMLAttributes<HTMLDivElement> {
/**
* Optional callback to access the IDocumentCard interface. Use this instead of ref for accessing
* the public methods and properties of the component.
*/
componentRef?: IRefObject<IDocumentCard>;
/**
* The type of DocumentCard to display.
* @defaultvalue DocumentCardType.normal
*/
type?: DocumentCardType;
/**
* Function to call when the card is clicked or keyboard Enter/Space is pushed.
*/
onClick?: (ev?: React.SyntheticEvent<HTMLElement>) => void;
/**
* A URL to navigate to when the card is clicked. If a function has also been provided,
* it will be used instead of the URL.
*/
onClickHref?: string;
/**
* A target browser context for opening the link. If not specified, will open in the same tab/window.
*/
onClickTarget?: string;
/**
* Aria role assigned to the documentCard (Eg. button, link).
* Use this to override the default assignment.
* @defaultvalue When `onClick` is provided, default role will be 'button'.
* When `onClickHref` is provided, default role will be 'link'.
*/
role?: string;
/**
* Hex color value of the line below the card, which should correspond to the document type.
* This should only be supplied when using the 'compact' card layout.
*
* @deprecated To be removed at \>= v5.0.0.
*/
accentColor?: string;
/**
* Child components to render within the card.
*/
children?: React.ReactNode;
/**
* Call to provide customized styling that will layer on top of the variant rules
*/
styles?: IStyleFunctionOrObject<IDocumentCardStyleProps, IDocumentCardStyles>;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory DocumentCard}
*/
export declare enum DocumentCardType {
/**
* Standard DocumentCard.
*/
normal = 0,
/**
* Compact layout. Displays the preview beside the details, rather than above.
*/
compact = 1
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardStyleProps {
/**
* Accept theme prop.
*/
theme: ITheme;
/**
* Optional override class name
*/
className?: string;
/**
* True when the card has a click action.
*/
actionable?: boolean;
/**
* Compact variant of the card.
*/
compact?: boolean;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardStyles {
root: IStyle;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardContext {
role?: string;
tabIndex?: number;
}
@@ -0,0 +1,20 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardType = void 0;
/**
* {@docCategory DocumentCard}
*/
var DocumentCardType;
(function (DocumentCardType) {
/**
* Standard DocumentCard.
*/
DocumentCardType[DocumentCardType["normal"] = 0] = "normal";
/**
* Compact layout. Displays the preview beside the details, rather than above.
*/
DocumentCardType[DocumentCardType["compact"] = 1] = "compact";
})(DocumentCardType || (exports.DocumentCardType = DocumentCardType = {}));
});
//# sourceMappingURL=DocumentCard.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCard.types.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCard.types.ts"],"names":[],"mappings":";;;;IAmFA;;OAEG;IACH,IAAY,gBASX;IATD,WAAY,gBAAgB;QAC1B;;WAEG;QACH,2DAAU,CAAA;QACV;;WAEG;QACH,6DAAW,CAAA;IACb,CAAC,EATW,gBAAgB,gCAAhB,gBAAgB,QAS3B","sourcesContent":["import * as React from 'react';\nimport type { IStyle, ITheme } from '../../Styling';\nimport type { IBaseProps, IRefObject, IStyleFunctionOrObject } from '../../Utilities';\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCard {\n /**\n * Sets focus to the DocumentCard.\n */\n focus: () => void;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardProps extends IBaseProps<IDocumentCard>, React.HTMLAttributes<HTMLDivElement> {\n /**\n * Optional callback to access the IDocumentCard interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: IRefObject<IDocumentCard>;\n\n /**\n * The type of DocumentCard to display.\n * @defaultvalue DocumentCardType.normal\n */\n type?: DocumentCardType;\n\n /**\n * Function to call when the card is clicked or keyboard Enter/Space is pushed.\n */\n onClick?: (ev?: React.SyntheticEvent<HTMLElement>) => void;\n\n /**\n * A URL to navigate to when the card is clicked. If a function has also been provided,\n * it will be used instead of the URL.\n */\n onClickHref?: string;\n\n /**\n * A target browser context for opening the link. If not specified, will open in the same tab/window.\n */\n onClickTarget?: string;\n\n /**\n * Aria role assigned to the documentCard (Eg. button, link).\n * Use this to override the default assignment.\n * @defaultvalue When `onClick` is provided, default role will be 'button'.\n * When `onClickHref` is provided, default role will be 'link'.\n */\n role?: string;\n\n /**\n * Hex color value of the line below the card, which should correspond to the document type.\n * This should only be supplied when using the 'compact' card layout.\n *\n * @deprecated To be removed at \\>= v5.0.0.\n */\n accentColor?: string;\n\n /**\n * Child components to render within the card.\n */\n children?: React.ReactNode;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: IStyleFunctionOrObject<IDocumentCardStyleProps, IDocumentCardStyles>;\n\n /**\n * Theme provided by HOC.\n */\n theme?: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport enum DocumentCardType {\n /**\n * Standard DocumentCard.\n */\n normal = 0,\n /**\n * Compact layout. Displays the preview beside the details, rather than above.\n */\n compact = 1,\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardStyleProps {\n /**\n * Accept theme prop.\n */\n theme: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n\n /**\n * True when the card has a click action.\n */\n actionable?: boolean;\n\n /**\n * Compact variant of the card.\n */\n compact?: boolean;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardStyles {\n root: IStyle;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardContext {\n role?: string;\n tabIndex?: number;\n}\n"]}
@@ -0,0 +1,11 @@
import * as React from 'react';
import type { IDocumentCardActionsProps } from './DocumentCardActions.types';
import type { JSXElement } from '@fluentui/utilities';
/**
* {@docCategory DocumentCard}
*/
export declare class DocumentCardActionsBase extends React.Component<IDocumentCardActionsProps, any> {
private _classNames;
constructor(props: IDocumentCardActionsProps);
render(): JSXElement;
}
@@ -0,0 +1,37 @@
define(["require", "exports", "tslib", "react", "../../Utilities", "../../Icon", "../../Button"], function (require, exports, tslib_1, React, Utilities_1, Icon_1, Button_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardActionsBase = void 0;
var getClassNames = (0, Utilities_1.classNamesFunction)();
/**
* {@docCategory DocumentCard}
*/
var DocumentCardActionsBase = /** @class */ (function (_super) {
tslib_1.__extends(DocumentCardActionsBase, _super);
function DocumentCardActionsBase(props) {
var _this = _super.call(this, props) || this;
(0, Utilities_1.initializeComponentRef)(_this);
return _this;
}
DocumentCardActionsBase.prototype.render = function () {
var _this = this;
var _a = this.props, actions = _a.actions, views = _a.views, styles = _a.styles, theme = _a.theme, className = _a.className;
this._classNames = getClassNames(styles, {
theme: theme,
className: className,
});
return (React.createElement("div", { className: this._classNames.root },
actions &&
actions.map(function (action, index) {
return (React.createElement("div", { className: _this._classNames.action, key: index },
React.createElement(Button_1.IconButton, tslib_1.__assign({}, action))));
}),
views > 0 && (React.createElement("div", { className: this._classNames.views },
React.createElement(Icon_1.Icon, { iconName: "View", className: this._classNames.viewsIcon }),
views))));
};
return DocumentCardActionsBase;
}(React.Component));
exports.DocumentCardActionsBase = DocumentCardActionsBase;
});
//# sourceMappingURL=DocumentCardActions.base.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardActions.base.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardActions.base.tsx"],"names":[],"mappings":";;;;IAaA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA8D,CAAC;IAEvG;;OAEG;IACH;QAA6C,mDAA+C;QAG1F,iCAAY,KAAgC;YAC1C,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAEb,IAAA,kCAAsB,EAAC,KAAI,CAAC,CAAC;;QAC/B,CAAC;QAEM,wCAAM,GAAb;YAAA,iBA2BC;YA1BO,IAAA,KAA+C,IAAI,CAAC,KAAK,EAAvD,OAAO,aAAA,EAAE,KAAK,WAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,SAAS,eAAe,CAAC;YAEhE,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,MAAO,EAAE;gBACxC,KAAK,EAAE,KAAM;gBACb,SAAS,WAAA;aACV,CAAC,CAAC;YAEH,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;gBAClC,OAAO;oBACN,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM,EAAE,KAAK;wBACxB,OAAO,CACL,6BAAK,SAAS,EAAE,KAAI,CAAC,WAAW,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK;4BACjD,oBAAC,mBAAU,uBAAK,MAAM,EAAI,CACtB,CACP,CAAC;oBACJ,CAAC,CAAC;gBAEF,KAAgB,GAAG,CAAC,IAAI,CACxB,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK;oBACpC,oBAAC,WAAI,IAAC,QAAQ,EAAC,MAAM,EAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,GAAI;oBAC9D,KAAK,CACF,CACP,CACG,CACP,CAAC;QACJ,CAAC;QACH,8BAAC;IAAD,CAAC,AArCD,CAA6C,KAAK,CAAC,SAAS,GAqC3D;IArCY,0DAAuB","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, initializeComponentRef } from '../../Utilities';\nimport { Icon } from '../../Icon';\nimport { IconButton } from '../../Button';\nimport type {\n IDocumentCardActionsProps,\n IDocumentCardActionsStyleProps,\n IDocumentCardActionsStyles,\n} from './DocumentCardActions.types';\nimport type { IProcessedStyleSet } from '../../Styling';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\nconst getClassNames = classNamesFunction<IDocumentCardActionsStyleProps, IDocumentCardActionsStyles>();\n\n/**\n * {@docCategory DocumentCard}\n */\nexport class DocumentCardActionsBase extends React.Component<IDocumentCardActionsProps, any> {\n private _classNames: IProcessedStyleSet<IDocumentCardActionsStyles>;\n\n constructor(props: IDocumentCardActionsProps) {\n super(props);\n\n initializeComponentRef(this);\n }\n\n public render(): JSXElement {\n const { actions, views, styles, theme, className } = this.props;\n\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n\n return (\n <div className={this._classNames.root}>\n {actions &&\n actions.map((action, index) => {\n return (\n <div className={this._classNames.action} key={index}>\n <IconButton {...action} />\n </div>\n );\n })}\n\n {(views as number) > 0 && (\n <div className={this._classNames.views}>\n <Icon iconName=\"View\" className={this._classNames.viewsIcon} />\n {views}\n </div>\n )}\n </div>\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IDocumentCardActionsProps } from './DocumentCardActions.types';
export declare const DocumentCardActions: React.FunctionComponent<IDocumentCardActionsProps>;
@@ -0,0 +1,7 @@
define(["require", "exports", "../../Utilities", "./DocumentCardActions.base", "./DocumentCardActions.styles"], function (require, exports, Utilities_1, DocumentCardActions_base_1, DocumentCardActions_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardActions = void 0;
exports.DocumentCardActions = (0, Utilities_1.styled)(DocumentCardActions_base_1.DocumentCardActionsBase, DocumentCardActions_styles_1.getStyles, undefined, { scope: 'DocumentCardActions' });
});
//# sourceMappingURL=DocumentCardActions.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardActions.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardActions.ts"],"names":[],"mappings":";;;;IAUa,QAAA,mBAAmB,GAAuD,IAAA,kBAAM,EAI3F,kDAAuB,EAAE,sCAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { DocumentCardActionsBase } from './DocumentCardActions.base';\nimport { getStyles } from './DocumentCardActions.styles';\nimport type {\n IDocumentCardActionsProps,\n IDocumentCardActionsStyleProps,\n IDocumentCardActionsStyles,\n} from './DocumentCardActions.types';\n\nexport const DocumentCardActions: React.FunctionComponent<IDocumentCardActionsProps> = styled<\n IDocumentCardActionsProps,\n IDocumentCardActionsStyleProps,\n IDocumentCardActionsStyles\n>(DocumentCardActionsBase, getStyles, undefined, { scope: 'DocumentCardActions' });\n"]}
@@ -0,0 +1,2 @@
import type { IDocumentCardActionsStyleProps, IDocumentCardActionsStyles } from './DocumentCardActions.types';
export declare const getStyles: (props: IDocumentCardActionsStyleProps) => IDocumentCardActionsStyles;
@@ -0,0 +1,63 @@
define(["require", "exports", "../../Styling"], function (require, exports, Styling_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = void 0;
var ACTION_SIZE = 34;
var HORIZONTAL_PADDING = 12;
var VERTICAL_PADDING = 4;
var GlobalClassNames = {
root: 'ms-DocumentCardActions',
action: 'ms-DocumentCardActions-action',
views: 'ms-DocumentCardActions-views',
};
var getStyles = function (props) {
var className = props.className, theme = props.theme;
var palette = theme.palette, fonts = theme.fonts;
var classNames = (0, Styling_1.getGlobalClassNames)(GlobalClassNames, theme);
return {
root: [
classNames.root,
{
height: "".concat(ACTION_SIZE, "px"),
padding: "".concat(VERTICAL_PADDING, "px ").concat(HORIZONTAL_PADDING, "px"),
position: 'relative',
},
className,
],
action: [
classNames.action,
{
float: 'left',
marginRight: '4px',
color: palette.neutralSecondary,
cursor: 'pointer',
selectors: {
'.ms-Button': {
fontSize: fonts.mediumPlus.fontSize,
height: ACTION_SIZE,
width: ACTION_SIZE,
},
'.ms-Button:hover .ms-Button-icon': {
color: theme.semanticColors.buttonText,
cursor: 'pointer',
},
},
},
],
views: [
classNames.views,
{
textAlign: 'right',
lineHeight: ACTION_SIZE,
},
],
viewsIcon: {
marginRight: '8px',
fontSize: fonts.medium.fontSize,
verticalAlign: 'top',
},
};
};
exports.getStyles = getStyles;
});
//# sourceMappingURL=DocumentCardActions.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardActions.styles.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardActions.styles.ts"],"names":[],"mappings":";;;;IAGA,IAAM,WAAW,GAAG,EAAE,CAAC;IACvB,IAAM,kBAAkB,GAAG,EAAE,CAAC;IAC9B,IAAM,gBAAgB,GAAG,CAAC,CAAC;IAE3B,IAAM,gBAAgB,GAAG;QACvB,IAAI,EAAE,wBAAwB;QAC9B,MAAM,EAAE,+BAA+B;QACvC,KAAK,EAAE,8BAA8B;KACtC,CAAC;IAEK,IAAM,SAAS,GAAG,UAAC,KAAqC;QACrD,IAAA,SAAS,GAAY,KAAK,UAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;QAC3B,IAAA,OAAO,GAAY,KAAK,QAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;QAEjC,IAAM,UAAU,GAAG,IAAA,6BAAmB,EAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;QAEhE,OAAO;YACL,IAAI,EAAE;gBACJ,UAAU,CAAC,IAAI;gBACf;oBACE,MAAM,EAAE,UAAG,WAAW,OAAI;oBAC1B,OAAO,EAAE,UAAG,gBAAgB,gBAAM,kBAAkB,OAAI;oBACxD,QAAQ,EAAE,UAAU;iBACrB;gBACD,SAAS;aACV;YACD,MAAM,EAAE;gBACN,UAAU,CAAC,MAAM;gBACjB;oBACE,KAAK,EAAE,MAAM;oBACb,WAAW,EAAE,KAAK;oBAClB,KAAK,EAAE,OAAO,CAAC,gBAAgB;oBAC/B,MAAM,EAAE,SAAS;oBAEjB,SAAS,EAAE;wBACT,YAAY,EAAE;4BACZ,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,QAAQ;4BACnC,MAAM,EAAE,WAAW;4BACnB,KAAK,EAAE,WAAW;yBACnB;wBACD,kCAAkC,EAAE;4BAClC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU;4BACtC,MAAM,EAAE,SAAS;yBAClB;qBACF;iBACF;aACF;YACD,KAAK,EAAE;gBACL,UAAU,CAAC,KAAK;gBAChB;oBACE,SAAS,EAAE,OAAO;oBAClB,UAAU,EAAE,WAAW;iBACxB;aACF;YACD,SAAS,EAAE;gBACT,WAAW,EAAE,KAAK;gBAClB,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ;gBAC/B,aAAa,EAAE,KAAK;aACrB;SACF,CAAC;IACJ,CAAC,CAAC;IAlDW,QAAA,SAAS,aAkDpB","sourcesContent":["import { getGlobalClassNames } from '../../Styling';\nimport type { IDocumentCardActionsStyleProps, IDocumentCardActionsStyles } from './DocumentCardActions.types';\n\nconst ACTION_SIZE = 34;\nconst HORIZONTAL_PADDING = 12;\nconst VERTICAL_PADDING = 4;\n\nconst GlobalClassNames = {\n root: 'ms-DocumentCardActions',\n action: 'ms-DocumentCardActions-action',\n views: 'ms-DocumentCardActions-views',\n};\n\nexport const getStyles = (props: IDocumentCardActionsStyleProps): IDocumentCardActionsStyles => {\n const { className, theme } = props;\n const { palette, fonts } = theme;\n\n const classNames = getGlobalClassNames(GlobalClassNames, theme);\n\n return {\n root: [\n classNames.root,\n {\n height: `${ACTION_SIZE}px`,\n padding: `${VERTICAL_PADDING}px ${HORIZONTAL_PADDING}px`,\n position: 'relative',\n },\n className,\n ],\n action: [\n classNames.action,\n {\n float: 'left',\n marginRight: '4px',\n color: palette.neutralSecondary,\n cursor: 'pointer',\n\n selectors: {\n '.ms-Button': {\n fontSize: fonts.mediumPlus.fontSize,\n height: ACTION_SIZE,\n width: ACTION_SIZE,\n },\n '.ms-Button:hover .ms-Button-icon': {\n color: theme.semanticColors.buttonText,\n cursor: 'pointer',\n },\n },\n },\n ],\n views: [\n classNames.views,\n {\n textAlign: 'right',\n lineHeight: ACTION_SIZE,\n },\n ],\n viewsIcon: {\n marginRight: '8px',\n fontSize: fonts.medium.fontSize,\n verticalAlign: 'top',\n },\n };\n};\n"]}
@@ -0,0 +1,61 @@
import * as React from 'react';
import { DocumentCardActionsBase } from './DocumentCardActions.base';
import type { IButtonProps } from '../../Button';
import type { IStyle, ITheme } from '../../Styling';
import type { IRefObject, IStyleFunctionOrObject } from '../../Utilities';
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardActions {
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardActionsProps extends React.ClassAttributes<DocumentCardActionsBase> {
/**
* Gets the component ref.
*/
componentRef?: IRefObject<IDocumentCardActions>;
/**
* The actions available for this document.
*/
actions: IButtonProps[];
/**
* The number of views this document has received.
*/
views?: number;
/**
* Call to provide customized styling that will layer on top of the variant rules
*/
styles?: IStyleFunctionOrObject<IDocumentCardActionsStyleProps, IDocumentCardActionsStyles>;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardActionsStyleProps {
/**
* Accept theme prop.
*/
theme: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardActionsStyles {
root: IStyle;
action: IStyle;
views: IStyle;
viewsIcon: IStyle;
}
@@ -0,0 +1,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=DocumentCardActions.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardActions.types.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardActions.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { DocumentCardActionsBase } from './DocumentCardActions.base';\nimport type { IButtonProps } from '../../Button';\nimport type { IStyle, ITheme } from '../../Styling';\nimport type { IRefObject, IStyleFunctionOrObject } from '../../Utilities';\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardActions {}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardActionsProps extends React.ClassAttributes<DocumentCardActionsBase> {\n /**\n * Gets the component ref.\n */\n componentRef?: IRefObject<IDocumentCardActions>;\n\n /**\n * The actions available for this document.\n */\n actions: IButtonProps[];\n\n /**\n * The number of views this document has received.\n */\n views?: number;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: IStyleFunctionOrObject<IDocumentCardActionsStyleProps, IDocumentCardActionsStyles>;\n\n /**\n * Theme provided by HOC.\n */\n theme?: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardActionsStyleProps {\n /**\n * Accept theme prop.\n */\n theme: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardActionsStyles {\n root: IStyle;\n action: IStyle;\n views: IStyle;\n viewsIcon: IStyle;\n}\n"]}
@@ -0,0 +1,14 @@
import * as React from 'react';
import type { IDocumentCardActivityProps } from './DocumentCardActivity.types';
import type { JSXElement } from '@fluentui/utilities';
/**
* {@docCategory DocumentCard}
*/
export declare class DocumentCardActivityBase extends React.Component<IDocumentCardActivityProps, any> {
private _classNames;
constructor(props: IDocumentCardActivityProps);
render(): JSXElement | null;
private _renderAvatars;
private _renderAvatar;
private _getNameString;
}
@@ -0,0 +1,52 @@
define(["require", "exports", "tslib", "react", "../../Utilities", "../../Persona", "../../PersonaCoin"], function (require, exports, tslib_1, React, Utilities_1, Persona_1, PersonaCoin_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardActivityBase = void 0;
var getClassNames = (0, Utilities_1.classNamesFunction)();
/**
* {@docCategory DocumentCard}
*/
var DocumentCardActivityBase = /** @class */ (function (_super) {
tslib_1.__extends(DocumentCardActivityBase, _super);
function DocumentCardActivityBase(props) {
var _this = _super.call(this, props) || this;
(0, Utilities_1.initializeComponentRef)(_this);
return _this;
}
DocumentCardActivityBase.prototype.render = function () {
var _a = this.props, activity = _a.activity, people = _a.people, styles = _a.styles, theme = _a.theme, className = _a.className;
this._classNames = getClassNames(styles, {
theme: theme,
className: className,
multiplePeople: people.length > 1,
});
if (!people || people.length === 0) {
return null;
}
return (React.createElement("div", { className: this._classNames.root },
this._renderAvatars(people),
React.createElement("div", { className: this._classNames.details },
React.createElement("span", { className: this._classNames.name }, this._getNameString(people)),
React.createElement("span", { className: this._classNames.activity }, activity))));
};
DocumentCardActivityBase.prototype._renderAvatars = function (people) {
return (React.createElement("div", { className: this._classNames.avatars },
people.length > 1 ? this._renderAvatar(people[1]) : null,
this._renderAvatar(people[0])));
};
DocumentCardActivityBase.prototype._renderAvatar = function (person) {
return (React.createElement("div", { className: this._classNames.avatar },
React.createElement(PersonaCoin_1.PersonaCoin, { imageInitials: person.initials, text: person.name, imageUrl: person.profileImageSrc, initialsColor: person.initialsColor, allowPhoneInitials: person.allowPhoneInitials, role: "presentation", size: Persona_1.PersonaSize.size32 })));
};
DocumentCardActivityBase.prototype._getNameString = function (people) {
var nameString = people[0].name;
if (people.length >= 2) {
nameString += ' +' + (people.length - 1);
}
return nameString;
};
return DocumentCardActivityBase;
}(React.Component));
exports.DocumentCardActivityBase = DocumentCardActivityBase;
});
//# sourceMappingURL=DocumentCardActivity.base.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardActivity.base.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardActivity.base.tsx"],"names":[],"mappings":";;;;IAcA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAgE,CAAC;IAEzG;;OAEG;IACH;QAA8C,oDAAgD;QAG5F,kCAAY,KAAiC;YAC3C,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAEb,IAAA,kCAAsB,EAAC,KAAI,CAAC,CAAC;;QAC/B,CAAC;QAEM,yCAAM,GAAb;YACQ,IAAA,KAAiD,IAAI,CAAC,KAAK,EAAzD,QAAQ,cAAA,EAAE,MAAM,YAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,SAAS,eAAe,CAAC;YAElE,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,MAAO,EAAE;gBACxC,KAAK,EAAE,KAAM;gBACb,SAAS,WAAA;gBACT,cAAc,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC;aAClC,CAAC,CAAC;YAEH,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnC,OAAO,IAAI,CAAC;YACd,CAAC;YAED,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;gBAClC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;gBAC5B,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO;oBACtC,8BAAM,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,IAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAQ;oBAC5E,8BAAM,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ,IAAG,QAAQ,CAAQ,CACzD,CACF,CACP,CAAC;QACJ,CAAC;QAEO,iDAAc,GAAtB,UAAuB,MAAqC;YAC1D,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO;gBACrC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;gBACxD,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAC1B,CACP,CAAC;QACJ,CAAC;QAEO,gDAAa,GAArB,UAAsB,MAAmC;YACvD,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM;gBACrC,oBAAC,yBAAW,IACV,aAAa,EAAE,MAAM,CAAC,QAAQ,EAC9B,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,QAAQ,EAAE,MAAM,CAAC,eAAe,EAChC,aAAa,EAAE,MAAM,CAAC,aAAa,EACnC,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,EAC7C,IAAI,EAAC,cAAc,EACnB,IAAI,EAAE,qBAAW,CAAC,MAAM,GACxB,CACE,CACP,CAAC;QACJ,CAAC;QAEO,iDAAc,GAAtB,UAAuB,MAAqC;YAC1D,IAAI,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YAEhC,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;gBACvB,UAAU,IAAI,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAC3C,CAAC;YAED,OAAO,UAAU,CAAC;QACpB,CAAC;QACH,+BAAC;IAAD,CAAC,AAnED,CAA8C,KAAK,CAAC,SAAS,GAmE5D;IAnEY,4DAAwB","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, initializeComponentRef } from '../../Utilities';\nimport { PersonaSize } from '../../Persona';\nimport { PersonaCoin } from '../../PersonaCoin';\nimport type {\n IDocumentCardActivityProps,\n IDocumentCardActivityPerson,\n IDocumentCardActivityStyleProps,\n IDocumentCardActivityStyles,\n} from './DocumentCardActivity.types';\nimport type { IProcessedStyleSet } from '../../Styling';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\nconst getClassNames = classNamesFunction<IDocumentCardActivityStyleProps, IDocumentCardActivityStyles>();\n\n/**\n * {@docCategory DocumentCard}\n */\nexport class DocumentCardActivityBase extends React.Component<IDocumentCardActivityProps, any> {\n private _classNames: IProcessedStyleSet<IDocumentCardActivityStyles>;\n\n constructor(props: IDocumentCardActivityProps) {\n super(props);\n\n initializeComponentRef(this);\n }\n\n public render(): JSXElement | null {\n const { activity, people, styles, theme, className } = this.props;\n\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n multiplePeople: people.length > 1,\n });\n\n if (!people || people.length === 0) {\n return null;\n }\n\n return (\n <div className={this._classNames.root}>\n {this._renderAvatars(people)}\n <div className={this._classNames.details}>\n <span className={this._classNames.name}>{this._getNameString(people)}</span>\n <span className={this._classNames.activity}>{activity}</span>\n </div>\n </div>\n );\n }\n\n private _renderAvatars(people: IDocumentCardActivityPerson[]): React.ReactElement<{}> {\n return (\n <div className={this._classNames.avatars}>\n {people.length > 1 ? this._renderAvatar(people[1]) : null}\n {this._renderAvatar(people[0])}\n </div>\n );\n }\n\n private _renderAvatar(person: IDocumentCardActivityPerson): JSXElement {\n return (\n <div className={this._classNames.avatar}>\n <PersonaCoin\n imageInitials={person.initials}\n text={person.name}\n imageUrl={person.profileImageSrc}\n initialsColor={person.initialsColor}\n allowPhoneInitials={person.allowPhoneInitials}\n role=\"presentation\"\n size={PersonaSize.size32}\n />\n </div>\n );\n }\n\n private _getNameString(people: IDocumentCardActivityPerson[]): string {\n let nameString = people[0].name;\n\n if (people.length >= 2) {\n nameString += ' +' + (people.length - 1);\n }\n\n return nameString;\n }\n}\n"]}
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IDocumentCardActivityProps } from './DocumentCardActivity.types';
export declare const DocumentCardActivity: React.FunctionComponent<IDocumentCardActivityProps>;
@@ -0,0 +1,7 @@
define(["require", "exports", "../../Utilities", "./DocumentCardActivity.base", "./DocumentCardActivity.styles"], function (require, exports, Utilities_1, DocumentCardActivity_base_1, DocumentCardActivity_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardActivity = void 0;
exports.DocumentCardActivity = (0, Utilities_1.styled)(DocumentCardActivity_base_1.DocumentCardActivityBase, DocumentCardActivity_styles_1.getStyles, undefined, { scope: 'DocumentCardActivity' });
});
//# sourceMappingURL=DocumentCardActivity.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardActivity.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardActivity.ts"],"names":[],"mappings":";;;;IAUa,QAAA,oBAAoB,GAAwD,IAAA,kBAAM,EAI7F,oDAAwB,EAAE,uCAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { DocumentCardActivityBase } from './DocumentCardActivity.base';\nimport { getStyles } from './DocumentCardActivity.styles';\nimport type {\n IDocumentCardActivityProps,\n IDocumentCardActivityStyleProps,\n IDocumentCardActivityStyles,\n} from './DocumentCardActivity.types';\n\nexport const DocumentCardActivity: React.FunctionComponent<IDocumentCardActivityProps> = styled<\n IDocumentCardActivityProps,\n IDocumentCardActivityStyleProps,\n IDocumentCardActivityStyles\n>(DocumentCardActivityBase, getStyles, undefined, { scope: 'DocumentCardActivity' });\n"]}
@@ -0,0 +1,11 @@
import type { IDocumentCardActivityStyleProps, IDocumentCardActivityStyles } from './DocumentCardActivity.types';
export declare const DocumentCardActivityGlobalClassNames: {
root: string;
multiplePeople: string;
details: string;
name: string;
activity: string;
avatars: string;
avatar: string;
};
export declare const getStyles: (props: IDocumentCardActivityStyleProps) => IDocumentCardActivityStyles;
@@ -0,0 +1,108 @@
define(["require", "exports", "../../Styling"], function (require, exports, Styling_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = exports.DocumentCardActivityGlobalClassNames = void 0;
var VERTICAL_PADDING = 8;
var HORIZONTAL_PADDING = 16;
var IMAGE_SIZE = 32;
var PERSONA_TEXT_GUTTER = 8;
exports.DocumentCardActivityGlobalClassNames = {
root: 'ms-DocumentCardActivity',
multiplePeople: 'ms-DocumentCardActivity--multiplePeople',
details: 'ms-DocumentCardActivity-details',
name: 'ms-DocumentCardActivity-name',
activity: 'ms-DocumentCardActivity-activity',
avatars: 'ms-DocumentCardActivity-avatars',
avatar: 'ms-DocumentCardActivity-avatar',
};
var getStyles = function (props) {
var theme = props.theme, className = props.className, multiplePeople = props.multiplePeople;
var palette = theme.palette, fonts = theme.fonts;
var classNames = (0, Styling_1.getGlobalClassNames)(exports.DocumentCardActivityGlobalClassNames, theme);
return {
root: [
classNames.root,
multiplePeople && classNames.multiplePeople,
{
padding: "".concat(VERTICAL_PADDING, "px ").concat(HORIZONTAL_PADDING, "px"),
position: 'relative',
},
className,
],
avatars: [
classNames.avatars,
{
marginLeft: '-2px', // Avatars sit outside of the usual padding for visual balance
height: '32px',
},
],
avatar: [
classNames.avatar,
{
display: 'inline-block',
verticalAlign: 'top',
position: 'relative',
textAlign: 'center',
width: IMAGE_SIZE,
height: IMAGE_SIZE,
selectors: {
'&:after': {
content: '" "',
position: 'absolute',
left: '-1px',
top: '-1px',
right: '-1px',
bottom: '-1px',
border: "2px solid ".concat(palette.white), // Match the background of the card
borderRadius: '50%',
},
':nth-of-type(2)': multiplePeople && {
marginLeft: '-16px',
},
},
},
],
details: [
classNames.details,
{
left: multiplePeople
? "".concat(HORIZONTAL_PADDING + IMAGE_SIZE * 1.5 + PERSONA_TEXT_GUTTER, "px")
: "".concat(HORIZONTAL_PADDING + IMAGE_SIZE + PERSONA_TEXT_GUTTER, "px"),
height: IMAGE_SIZE,
position: 'absolute',
top: VERTICAL_PADDING,
width: "calc(100% - ".concat(HORIZONTAL_PADDING + IMAGE_SIZE + PERSONA_TEXT_GUTTER + HORIZONTAL_PADDING, "px)"),
},
],
name: [
classNames.name,
{
display: 'block',
fontSize: fonts.small.fontSize,
lineHeight: '15px',
height: '15px',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
color: palette.neutralPrimary,
fontWeight: Styling_1.FontWeights.semibold,
},
],
activity: [
classNames.activity,
{
display: 'block',
fontSize: fonts.small.fontSize,
lineHeight: '15px',
height: '15px',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
color: palette.neutralSecondary,
},
],
};
};
exports.getStyles = getStyles;
});
//# sourceMappingURL=DocumentCardActivity.styles.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,95 @@
import * as React from 'react';
import { PersonaInitialsColor } from '../../Persona';
import { DocumentCardActivityBase } from './DocumentCardActivity.base';
import type { IStyle, ITheme } from '../../Styling';
import type { IRefObject, IStyleFunctionOrObject } from '../../Utilities';
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardActivity {
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardActivityProps extends React.ClassAttributes<DocumentCardActivityBase> {
/**
* Gets the component ref.
*/
componentRef?: IRefObject<IDocumentCardActivity>;
/**
* Describes the activity that has taken place, such as "Created Feb 23, 2016".
*/
activity: string;
/**
* One or more people who are involved in this activity.
*/
people: IDocumentCardActivityPerson[];
/**
* Call to provide customized styling that will layer on top of the variant rules
*/
styles?: IStyleFunctionOrObject<IDocumentCardActivityStyleProps, IDocumentCardActivityStyles>;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardActivityPerson {
/**
* The name of the person.
*/
name: string;
/**
* Path to the profile photo of the person.
*/
profileImageSrc: string;
/**
* The user's initials to display in the profile photo area when there is no image.
*/
initials?: string;
/**
* Whether initials are calculated for phone numbers and number sequences.
* Example: Set property to true to get initials for project names consisting of numbers only.
* @defaultvalue false
*/
allowPhoneInitials?: boolean;
/**
* The background color when the user's initials are displayed.
* @defaultvalue PersonaInitialsColor.blue
*/
initialsColor?: PersonaInitialsColor;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardActivityStyleProps {
/**
* Accept theme prop.
*/
theme: ITheme;
/**
* Optional override class name
*/
className?: string;
/**
* Indicates if multiple people are being shown.
*/
multiplePeople?: boolean;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardActivityStyles {
root: IStyle;
avatars: IStyle;
avatar: IStyle;
details: IStyle;
name: IStyle;
activity: IStyle;
}
@@ -0,0 +1,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=DocumentCardActivity.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardActivity.types.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardActivity.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { PersonaInitialsColor } from '../../Persona';\nimport { DocumentCardActivityBase } from './DocumentCardActivity.base';\nimport type { IStyle, ITheme } from '../../Styling';\nimport type { IRefObject, IStyleFunctionOrObject } from '../../Utilities';\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardActivity {}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardActivityProps extends React.ClassAttributes<DocumentCardActivityBase> {\n /**\n * Gets the component ref.\n */\n componentRef?: IRefObject<IDocumentCardActivity>;\n\n /**\n * Describes the activity that has taken place, such as \"Created Feb 23, 2016\".\n */\n activity: string;\n\n /**\n * One or more people who are involved in this activity.\n */\n people: IDocumentCardActivityPerson[];\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: IStyleFunctionOrObject<IDocumentCardActivityStyleProps, IDocumentCardActivityStyles>;\n\n /**\n * Theme provided by HOC.\n */\n theme?: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardActivityPerson {\n /**\n * The name of the person.\n */\n name: string;\n\n /**\n * Path to the profile photo of the person.\n */\n profileImageSrc: string;\n\n /**\n * The user's initials to display in the profile photo area when there is no image.\n */\n initials?: string;\n\n /**\n * Whether initials are calculated for phone numbers and number sequences.\n * Example: Set property to true to get initials for project names consisting of numbers only.\n * @defaultvalue false\n */\n allowPhoneInitials?: boolean;\n\n /**\n * The background color when the user's initials are displayed.\n * @defaultvalue PersonaInitialsColor.blue\n */\n initialsColor?: PersonaInitialsColor;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardActivityStyleProps {\n /**\n * Accept theme prop.\n */\n theme: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n\n /**\n * Indicates if multiple people are being shown.\n */\n multiplePeople?: boolean;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardActivityStyles {\n root: IStyle;\n avatars: IStyle;\n avatar: IStyle;\n details: IStyle;\n name: IStyle;\n activity: IStyle;\n}\n"]}
@@ -0,0 +1,11 @@
import * as React from 'react';
import type { IDocumentCardDetailsProps } from './DocumentCardDetails.types';
import type { JSXElement } from '@fluentui/utilities';
/**
* {@docCategory DocumentCard}
*/
export declare class DocumentCardDetailsBase extends React.Component<IDocumentCardDetailsProps, any> {
private _classNames;
constructor(props: IDocumentCardDetailsProps);
render(): JSXElement;
}
@@ -0,0 +1,28 @@
define(["require", "exports", "tslib", "react", "../../Utilities"], function (require, exports, tslib_1, React, Utilities_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardDetailsBase = void 0;
var getClassNames = (0, Utilities_1.classNamesFunction)();
/**
* {@docCategory DocumentCard}
*/
var DocumentCardDetailsBase = /** @class */ (function (_super) {
tslib_1.__extends(DocumentCardDetailsBase, _super);
function DocumentCardDetailsBase(props) {
var _this = _super.call(this, props) || this;
(0, Utilities_1.initializeComponentRef)(_this);
return _this;
}
DocumentCardDetailsBase.prototype.render = function () {
var _a = this.props, children = _a.children, styles = _a.styles, theme = _a.theme, className = _a.className;
this._classNames = getClassNames(styles, {
theme: theme,
className: className,
});
return React.createElement("div", { className: this._classNames.root }, children);
};
return DocumentCardDetailsBase;
}(React.Component));
exports.DocumentCardDetailsBase = DocumentCardDetailsBase;
});
//# sourceMappingURL=DocumentCardDetails.base.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardDetails.base.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardDetails.base.tsx"],"names":[],"mappings":";;;;IAWA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA8D,CAAC;IAEvG;;OAEG;IACH;QAA6C,mDAA+C;QAG1F,iCAAY,KAAgC;YAC1C,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAEb,IAAA,kCAAsB,EAAC,KAAI,CAAC,CAAC;;QAC/B,CAAC;QAEM,wCAAM,GAAb;YACQ,IAAA,KAAyC,IAAI,CAAC,KAAK,EAAjD,QAAQ,cAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,SAAS,eAAe,CAAC;YAE1D,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,MAAO,EAAE;gBACxC,KAAK,EAAE,KAAM;gBACb,SAAS,WAAA;aACV,CAAC,CAAC;YAEH,OAAO,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,IAAG,QAAQ,CAAO,CAAC;QACjE,CAAC;QACH,8BAAC;IAAD,CAAC,AAnBD,CAA6C,KAAK,CAAC,SAAS,GAmB3D;IAnBY,0DAAuB","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, initializeComponentRef } from '../../Utilities';\nimport type {\n IDocumentCardDetailsProps,\n IDocumentCardDetailsStyleProps,\n IDocumentCardDetailsStyles,\n} from './DocumentCardDetails.types';\nimport type { IProcessedStyleSet } from '../../Styling';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\nconst getClassNames = classNamesFunction<IDocumentCardDetailsStyleProps, IDocumentCardDetailsStyles>();\n\n/**\n * {@docCategory DocumentCard}\n */\nexport class DocumentCardDetailsBase extends React.Component<IDocumentCardDetailsProps, any> {\n private _classNames: IProcessedStyleSet<IDocumentCardDetailsStyles>;\n\n constructor(props: IDocumentCardDetailsProps) {\n super(props);\n\n initializeComponentRef(this);\n }\n\n public render(): JSXElement {\n const { children, styles, theme, className } = this.props;\n\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n\n return <div className={this._classNames.root}>{children}</div>;\n }\n}\n"]}
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IDocumentCardDetailsProps } from './DocumentCardDetails.types';
export declare const DocumentCardDetails: React.FunctionComponent<IDocumentCardDetailsProps>;
@@ -0,0 +1,7 @@
define(["require", "exports", "../../Utilities", "./DocumentCardDetails.base", "./DocumentCardDetails.styles"], function (require, exports, Utilities_1, DocumentCardDetails_base_1, DocumentCardDetails_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardDetails = void 0;
exports.DocumentCardDetails = (0, Utilities_1.styled)(DocumentCardDetails_base_1.DocumentCardDetailsBase, DocumentCardDetails_styles_1.getStyles, undefined, { scope: 'DocumentCardDetails' });
});
//# sourceMappingURL=DocumentCardDetails.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardDetails.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardDetails.ts"],"names":[],"mappings":";;;;IAUa,QAAA,mBAAmB,GAAuD,IAAA,kBAAM,EAI3F,kDAAuB,EAAE,sCAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { DocumentCardDetailsBase } from './DocumentCardDetails.base';\nimport { getStyles } from './DocumentCardDetails.styles';\nimport type {\n IDocumentCardDetailsProps,\n IDocumentCardDetailsStyleProps,\n IDocumentCardDetailsStyles,\n} from './DocumentCardDetails.types';\n\nexport const DocumentCardDetails: React.FunctionComponent<IDocumentCardDetailsProps> = styled<\n IDocumentCardDetailsProps,\n IDocumentCardDetailsStyleProps,\n IDocumentCardDetailsStyles\n>(DocumentCardDetailsBase, getStyles, undefined, { scope: 'DocumentCardDetails' });\n"]}
@@ -0,0 +1,2 @@
import type { IDocumentCardStatusStyleProps, IDocumentCardStatusStyles } from './DocumentCardStatus.types';
export declare const getStyles: (props: IDocumentCardStatusStyleProps) => IDocumentCardStatusStyles;
@@ -0,0 +1,27 @@
define(["require", "exports", "../../Styling"], function (require, exports, Styling_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = void 0;
var GlobalClassNames = {
root: 'ms-DocumentCardDetails',
};
var getStyles = function (props) {
var className = props.className, theme = props.theme;
var classNames = (0, Styling_1.getGlobalClassNames)(GlobalClassNames, theme);
return {
root: [
classNames.root,
{
display: 'flex',
flexDirection: 'column',
flex: 1,
justifyContent: 'space-between',
overflow: 'hidden',
},
className,
],
};
};
exports.getStyles = getStyles;
});
//# sourceMappingURL=DocumentCardDetails.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardDetails.styles.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardDetails.styles.ts"],"names":[],"mappings":";;;;IAGA,IAAM,gBAAgB,GAAG;QACvB,IAAI,EAAE,wBAAwB;KAC/B,CAAC;IAEK,IAAM,SAAS,GAAG,UAAC,KAAoC;QACpD,IAAA,SAAS,GAAY,KAAK,UAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;QAEnC,IAAM,UAAU,GAAG,IAAA,6BAAmB,EAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;QAEhE,OAAO;YACL,IAAI,EAAE;gBACJ,UAAU,CAAC,IAAI;gBACf;oBACE,OAAO,EAAE,MAAM;oBACf,aAAa,EAAE,QAAQ;oBACvB,IAAI,EAAE,CAAC;oBACP,cAAc,EAAE,eAAe;oBAC/B,QAAQ,EAAE,QAAQ;iBACnB;gBACD,SAAS;aACV;SACF,CAAC;IACJ,CAAC,CAAC;IAlBW,QAAA,SAAS,aAkBpB","sourcesContent":["import { getGlobalClassNames } from '../../Styling';\nimport type { IDocumentCardStatusStyleProps, IDocumentCardStatusStyles } from './DocumentCardStatus.types';\n\nconst GlobalClassNames = {\n root: 'ms-DocumentCardDetails',\n};\n\nexport const getStyles = (props: IDocumentCardStatusStyleProps): IDocumentCardStatusStyles => {\n const { className, theme } = props;\n\n const classNames = getGlobalClassNames(GlobalClassNames, theme);\n\n return {\n root: [\n classNames.root,\n {\n display: 'flex',\n flexDirection: 'column',\n flex: 1,\n justifyContent: 'space-between',\n overflow: 'hidden',\n },\n className,\n ],\n };\n};\n"]}
@@ -0,0 +1,48 @@
import { DocumentCardDetailsBase } from './DocumentCardDetails.base';
import type { IStyle, ITheme } from '../../Styling';
import type { IReactProps, IRefObject, IStyleFunctionOrObject } from '../../Utilities';
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardDetails {
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardDetailsProps extends IReactProps<DocumentCardDetailsBase> {
/**
* Gets the component ref.
*/
componentRef?: IRefObject<IDocumentCardDetails>;
/**
* Call to provide customized styling that will layer on top of the variant rules
*/
styles?: IStyleFunctionOrObject<IDocumentCardDetailsStyleProps, IDocumentCardDetailsStyles>;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardDetailsStyleProps {
/**
* Accept theme prop.
*/
theme: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardDetailsStyles {
root: IStyle;
}
@@ -0,0 +1,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=DocumentCardDetails.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardDetails.types.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardDetails.types.ts"],"names":[],"mappings":"","sourcesContent":["import { DocumentCardDetailsBase } from './DocumentCardDetails.base';\nimport type { IStyle, ITheme } from '../../Styling';\nimport type { IReactProps, IRefObject, IStyleFunctionOrObject } from '../../Utilities';\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardDetails {}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardDetailsProps extends IReactProps<DocumentCardDetailsBase> {\n /**\n * Gets the component ref.\n */\n componentRef?: IRefObject<IDocumentCardDetails>;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: IStyleFunctionOrObject<IDocumentCardDetailsStyleProps, IDocumentCardDetailsStyles>;\n\n /**\n * Theme provided by HOC.\n */\n theme?: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardDetailsStyleProps {\n /**\n * Accept theme prop.\n */\n theme: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardDetailsStyles {\n root: IStyle;\n}\n"]}
@@ -0,0 +1,17 @@
import * as React from 'react';
import type { IDocumentCardImageProps } from './DocumentCardImage.types';
import type { JSXElement } from '@fluentui/utilities';
export interface IDocumentCardImageState {
readonly imageHasLoaded: boolean;
}
/**
* {@docCategory DocumentCard}
*/
export declare class DocumentCardImageBase extends React.Component<IDocumentCardImageProps, IDocumentCardImageState> {
private _classNames;
constructor(props: IDocumentCardImageProps);
render(): JSXElement;
private _onImageLoad;
private _renderCenterIcon;
private _renderCornerIcon;
}
@@ -0,0 +1,40 @@
define(["require", "exports", "tslib", "react", "../../Icon", "../../Image", "../../Utilities"], function (require, exports, tslib_1, React, Icon_1, Image_1, Utilities_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardImageBase = void 0;
var getClassNames = (0, Utilities_1.classNamesFunction)();
/**
* {@docCategory DocumentCard}
*/
var DocumentCardImageBase = /** @class */ (function (_super) {
tslib_1.__extends(DocumentCardImageBase, _super);
function DocumentCardImageBase(props) {
var _this = _super.call(this, props) || this;
_this._onImageLoad = function () {
_this.setState({ imageHasLoaded: true });
};
(0, Utilities_1.initializeComponentRef)(_this);
_this.state = { imageHasLoaded: false };
return _this;
}
DocumentCardImageBase.prototype.render = function () {
var _a = this.props, styles = _a.styles, width = _a.width, height = _a.height, imageFit = _a.imageFit, imageSrc = _a.imageSrc;
this._classNames = getClassNames(styles, this.props);
return (React.createElement("div", { className: this._classNames.root },
imageSrc && (React.createElement(Image_1.Image, { width: width, height: height, imageFit: imageFit, src: imageSrc, role: "presentation", alt: "", onLoad: this._onImageLoad })),
this.state.imageHasLoaded ? this._renderCornerIcon() : this._renderCenterIcon()));
};
DocumentCardImageBase.prototype._renderCenterIcon = function () {
var iconProps = this.props.iconProps;
return (React.createElement("div", { className: this._classNames.centeredIconWrapper },
React.createElement(Icon_1.Icon, tslib_1.__assign({ className: this._classNames.centeredIcon }, iconProps))));
};
DocumentCardImageBase.prototype._renderCornerIcon = function () {
var iconProps = this.props.iconProps;
return React.createElement(Icon_1.Icon, tslib_1.__assign({ className: this._classNames.cornerIcon }, iconProps));
};
return DocumentCardImageBase;
}(React.Component));
exports.DocumentCardImageBase = DocumentCardImageBase;
});
//# sourceMappingURL=DocumentCardImage.base.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardImage.base.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardImage.base.tsx"],"names":[],"mappings":";;;;IAiBA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA0D,CAAC;IAEnG;;OAEG;IACH;QAA2C,iDAAiE;QAG1G,+BAAY,KAA8B;YACxC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YA6BP,kBAAY,GAAG;gBACrB,KAAI,CAAC,QAAQ,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;YAC1C,CAAC,CAAC;YA7BA,IAAA,kCAAsB,EAAC,KAAI,CAAC,CAAC;YAC7B,KAAI,CAAC,KAAK,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC;;QACzC,CAAC;QAEM,sCAAM,GAAb;YACQ,IAAA,KAAgD,IAAI,CAAC,KAAK,EAAxD,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,MAAM,YAAA,EAAE,QAAQ,cAAA,EAAE,QAAQ,cAAe,CAAC;YAEjE,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,MAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YAEtD,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;gBAClC,QAAQ,IAAI,CACX,oBAAC,aAAK,IACJ,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,QAAQ,EACb,IAAI,EAAC,cAAc,EACnB,GAAG,EAAC,EAAE,EACN,MAAM,EAAE,IAAI,CAAC,YAAY,GACzB,CACH;gBACA,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAC5E,CACP,CAAC;QACJ,CAAC;QAMO,iDAAiB,GAAzB;YACU,IAAA,SAAS,GAAK,IAAI,CAAC,KAAK,UAAf,CAAgB;YACjC,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,mBAAmB;gBAClD,oBAAC,WAAI,qBAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,YAAY,IAAM,SAAS,EAAI,CAC7D,CACP,CAAC;QACJ,CAAC;QAEO,iDAAiB,GAAzB;YACU,IAAA,SAAS,GAAK,IAAI,CAAC,KAAK,UAAf,CAAgB;YACjC,OAAO,oBAAC,WAAI,qBAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,UAAU,IAAM,SAAS,EAAI,CAAC;QACzE,CAAC;QACH,4BAAC;IAAD,CAAC,AAlDD,CAA2C,KAAK,CAAC,SAAS,GAkDzD;IAlDY,sDAAqB","sourcesContent":["import * as React from 'react';\nimport { Icon } from '../../Icon';\nimport { Image } from '../../Image';\nimport { classNamesFunction, initializeComponentRef } from '../../Utilities';\nimport type { IProcessedStyleSet } from '../../Styling';\nimport type {\n IDocumentCardImageProps,\n IDocumentCardImageStyleProps,\n IDocumentCardImageStyles,\n} from './DocumentCardImage.types';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\nexport interface IDocumentCardImageState {\n readonly imageHasLoaded: boolean;\n}\n\nconst getClassNames = classNamesFunction<IDocumentCardImageStyleProps, IDocumentCardImageStyles>();\n\n/**\n * {@docCategory DocumentCard}\n */\nexport class DocumentCardImageBase extends React.Component<IDocumentCardImageProps, IDocumentCardImageState> {\n private _classNames: IProcessedStyleSet<IDocumentCardImageStyles>;\n\n constructor(props: IDocumentCardImageProps) {\n super(props);\n\n initializeComponentRef(this);\n this.state = { imageHasLoaded: false };\n }\n\n public render(): JSXElement {\n const { styles, width, height, imageFit, imageSrc } = this.props;\n\n this._classNames = getClassNames(styles!, this.props);\n\n return (\n <div className={this._classNames.root}>\n {imageSrc && (\n <Image\n width={width}\n height={height}\n imageFit={imageFit}\n src={imageSrc}\n role=\"presentation\"\n alt=\"\"\n onLoad={this._onImageLoad}\n />\n )}\n {this.state.imageHasLoaded ? this._renderCornerIcon() : this._renderCenterIcon()}\n </div>\n );\n }\n\n private _onImageLoad = () => {\n this.setState({ imageHasLoaded: true });\n };\n\n private _renderCenterIcon(): JSXElement {\n const { iconProps } = this.props;\n return (\n <div className={this._classNames.centeredIconWrapper}>\n <Icon className={this._classNames.centeredIcon} {...iconProps} />\n </div>\n );\n }\n\n private _renderCornerIcon(): JSXElement {\n const { iconProps } = this.props;\n return <Icon className={this._classNames.cornerIcon} {...iconProps} />;\n }\n}\n"]}
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IDocumentCardImageProps } from './DocumentCardImage.types';
export declare const DocumentCardImage: React.FunctionComponent<IDocumentCardImageProps>;
@@ -0,0 +1,7 @@
define(["require", "exports", "../../Utilities", "./DocumentCardImage.base", "./DocumentCardImage.styles"], function (require, exports, Utilities_1, DocumentCardImage_base_1, DocumentCardImage_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardImage = void 0;
exports.DocumentCardImage = (0, Utilities_1.styled)(DocumentCardImage_base_1.DocumentCardImageBase, DocumentCardImage_styles_1.getStyles, undefined, { scope: 'DocumentCardImage' });
});
//# sourceMappingURL=DocumentCardImage.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardImage.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardImage.ts"],"names":[],"mappings":";;;;IAUa,QAAA,iBAAiB,GAAqD,IAAA,kBAAM,EAIvF,8CAAqB,EAAE,oCAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { DocumentCardImageBase } from './DocumentCardImage.base';\nimport { getStyles } from './DocumentCardImage.styles';\nimport type {\n IDocumentCardImageProps,\n IDocumentCardImageStyleProps,\n IDocumentCardImageStyles,\n} from './DocumentCardImage.types';\n\nexport const DocumentCardImage: React.FunctionComponent<IDocumentCardImageProps> = styled<\n IDocumentCardImageProps,\n IDocumentCardImageStyleProps,\n IDocumentCardImageStyles\n>(DocumentCardImageBase, getStyles, undefined, { scope: 'DocumentCardImage' });\n"]}
@@ -0,0 +1,2 @@
import type { IDocumentCardImageStyleProps, IDocumentCardImageStyles } from './DocumentCardImage.types';
export declare const getStyles: (props: IDocumentCardImageStyleProps) => IDocumentCardImageStyles;
@@ -0,0 +1,56 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = void 0;
var centeredIconSize = '42px';
var cornerIconSize = '32px';
var getStyles = function (props) {
var theme = props.theme, className = props.className, height = props.height, width = props.width;
var palette = theme.palette;
return {
root: [
{
borderBottom: "1px solid ".concat(palette.neutralLight),
position: 'relative',
backgroundColor: palette.neutralLighterAlt,
overflow: "hidden",
height: height && "".concat(height, "px"),
width: width && "".concat(width, "px"),
},
className,
],
centeredIcon: [
{
height: centeredIconSize,
width: centeredIconSize,
fontSize: centeredIconSize,
},
],
centeredIconWrapper: [
{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
height: '100%',
width: '100%',
position: 'absolute',
top: 0,
left: 0,
},
],
cornerIcon: [
{
left: '10px',
bottom: '10px',
height: cornerIconSize,
width: cornerIconSize,
fontSize: cornerIconSize,
position: 'absolute',
overflow: 'visible',
},
],
};
};
exports.getStyles = getStyles;
});
//# sourceMappingURL=DocumentCardImage.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardImage.styles.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardImage.styles.ts"],"names":[],"mappings":";;;;IAEA,IAAM,gBAAgB,GAAG,MAAM,CAAC;IAChC,IAAM,cAAc,GAAG,MAAM,CAAC;IAEvB,IAAM,SAAS,GAAG,UAAC,KAAmC;QACnD,IAAA,KAAK,GAA+B,KAAK,MAApC,EAAE,SAAS,GAAoB,KAAK,UAAzB,EAAE,MAAM,GAAY,KAAK,OAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;QAC1C,IAAA,OAAO,GAAK,KAAM,QAAX,CAAY;QAE3B,OAAO;YACL,IAAI,EAAE;gBACJ;oBACE,YAAY,EAAE,oBAAa,OAAO,CAAC,YAAY,CAAE;oBACjD,QAAQ,EAAE,UAAU;oBACpB,eAAe,EAAE,OAAO,CAAC,iBAAiB;oBAC1C,QAAQ,EAAE,QAAQ;oBAClB,MAAM,EAAE,MAAM,IAAI,UAAG,MAAM,OAAI;oBAC/B,KAAK,EAAE,KAAK,IAAI,UAAG,KAAK,OAAI;iBAC7B;gBACD,SAAS;aACV;YACD,YAAY,EAAE;gBACZ;oBACE,MAAM,EAAE,gBAAgB;oBACxB,KAAK,EAAE,gBAAgB;oBACvB,QAAQ,EAAE,gBAAgB;iBAC3B;aACF;YACD,mBAAmB,EAAE;gBACnB;oBACE,OAAO,EAAE,MAAM;oBACf,UAAU,EAAE,QAAQ;oBACpB,cAAc,EAAE,QAAQ;oBACxB,MAAM,EAAE,MAAM;oBACd,KAAK,EAAE,MAAM;oBACb,QAAQ,EAAE,UAAU;oBACpB,GAAG,EAAE,CAAC;oBACN,IAAI,EAAE,CAAC;iBACR;aACF;YACD,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,MAAM;oBACd,MAAM,EAAE,cAAc;oBACtB,KAAK,EAAE,cAAc;oBACrB,QAAQ,EAAE,cAAc;oBACxB,QAAQ,EAAE,UAAU;oBACpB,QAAQ,EAAE,SAAS;iBACpB;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IA/CW,QAAA,SAAS,aA+CpB","sourcesContent":["import type { IDocumentCardImageStyleProps, IDocumentCardImageStyles } from './DocumentCardImage.types';\n\nconst centeredIconSize = '42px';\nconst cornerIconSize = '32px';\n\nexport const getStyles = (props: IDocumentCardImageStyleProps): IDocumentCardImageStyles => {\n const { theme, className, height, width } = props;\n const { palette } = theme!;\n\n return {\n root: [\n {\n borderBottom: `1px solid ${palette.neutralLight}`,\n position: 'relative',\n backgroundColor: palette.neutralLighterAlt,\n overflow: `hidden`,\n height: height && `${height}px`,\n width: width && `${width}px`,\n },\n className,\n ],\n centeredIcon: [\n {\n height: centeredIconSize,\n width: centeredIconSize,\n fontSize: centeredIconSize,\n },\n ],\n centeredIconWrapper: [\n {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%',\n width: '100%',\n position: 'absolute',\n top: 0,\n left: 0,\n },\n ],\n cornerIcon: [\n {\n left: '10px',\n bottom: '10px',\n height: cornerIconSize,\n width: cornerIconSize,\n fontSize: cornerIconSize,\n position: 'absolute',\n overflow: 'visible',\n },\n ],\n };\n};\n"]}
@@ -0,0 +1,65 @@
import { ImageFit } from '../../Image';
import type { IIconProps } from '../../Icon';
import type { IStyle, ITheme } from '../../Styling';
import type { IBaseProps, IRefObject, IStyleFunctionOrObject } from '../../Utilities';
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardImage {
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardImageProps extends IBaseProps<{}> {
/**
* Gets the component ref.
*/
componentRef?: IRefObject<IDocumentCardImage>;
/**
* Call to provide customized styling that will layer on top of the variant rules
*/
styles?: IStyleFunctionOrObject<IDocumentCardImageStyleProps, IDocumentCardImageStyles>;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Optional override class name
*/
className?: string;
/**
* Path to the preview image.
*/
imageSrc?: string;
/**
* The props for the icon associated with this document type.
*/
iconProps?: IIconProps;
/**
* If provided, forces the preview image to be this width.
*/
width?: number;
/**
* If provided, forces the preview image to be this height.
*/
height?: number;
/**
* Used to determine how to size the image to fit the dimensions of the component.
* If both dimensions are provided, then the image is fit using ImageFit.scale, otherwise ImageFit.none is used.
*/
imageFit?: ImageFit;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardImageStyleProps extends IDocumentCardImageProps {
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardImageStyles {
root: IStyle;
cornerIcon: IStyle;
centeredIcon: IStyle;
centeredIconWrapper: IStyle;
}
@@ -0,0 +1,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=DocumentCardImage.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardImage.types.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardImage.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ImageFit } from '../../Image';\nimport type { IIconProps } from '../../Icon';\nimport type { IStyle, ITheme } from '../../Styling';\nimport type { IBaseProps, IRefObject, IStyleFunctionOrObject } from '../../Utilities';\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardImage {}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardImageProps extends IBaseProps<{}> {\n /**\n * Gets the component ref.\n */\n componentRef?: IRefObject<IDocumentCardImage>;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: IStyleFunctionOrObject<IDocumentCardImageStyleProps, IDocumentCardImageStyles>;\n\n /**\n * Theme provided by HOC.\n */\n theme?: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n\n /**\n * Path to the preview image.\n */\n imageSrc?: string;\n\n /**\n * The props for the icon associated with this document type.\n */\n iconProps?: IIconProps;\n\n /**\n * If provided, forces the preview image to be this width.\n */\n width?: number;\n\n /**\n * If provided, forces the preview image to be this height.\n */\n height?: number;\n\n /**\n * Used to determine how to size the image to fit the dimensions of the component.\n * If both dimensions are provided, then the image is fit using ImageFit.scale, otherwise ImageFit.none is used.\n */\n imageFit?: ImageFit;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardImageStyleProps extends IDocumentCardImageProps {}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardImageStyles {\n root: IStyle;\n cornerIcon: IStyle;\n centeredIcon: IStyle;\n centeredIconWrapper: IStyle;\n}\n"]}
@@ -0,0 +1,11 @@
import * as React from 'react';
import type { IDocumentCardLocationProps } from './DocumentCardLocation.types';
import type { JSXElement } from '@fluentui/utilities';
/**
* {@docCategory DocumentCard}
*/
export declare class DocumentCardLocationBase extends React.Component<IDocumentCardLocationProps, any> {
private _classNames;
constructor(props: IDocumentCardLocationProps);
render(): JSXElement;
}
@@ -0,0 +1,28 @@
define(["require", "exports", "tslib", "react", "../../Utilities"], function (require, exports, tslib_1, React, Utilities_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardLocationBase = void 0;
var getClassNames = (0, Utilities_1.classNamesFunction)();
/**
* {@docCategory DocumentCard}
*/
var DocumentCardLocationBase = /** @class */ (function (_super) {
tslib_1.__extends(DocumentCardLocationBase, _super);
function DocumentCardLocationBase(props) {
var _this = _super.call(this, props) || this;
(0, Utilities_1.initializeComponentRef)(_this);
return _this;
}
DocumentCardLocationBase.prototype.render = function () {
var _a = this.props, location = _a.location, locationHref = _a.locationHref, ariaLabel = _a.ariaLabel, onClick = _a.onClick, styles = _a.styles, theme = _a.theme, className = _a.className;
this._classNames = getClassNames(styles, {
theme: theme,
className: className,
});
return (React.createElement("a", { className: this._classNames.root, href: locationHref, onClick: onClick, "aria-label": ariaLabel }, location));
};
return DocumentCardLocationBase;
}(React.Component));
exports.DocumentCardLocationBase = DocumentCardLocationBase;
});
//# sourceMappingURL=DocumentCardLocation.base.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardLocation.base.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardLocation.base.tsx"],"names":[],"mappings":";;;;IAWA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAgE,CAAC;IAEzG;;OAEG;IACH;QAA8C,oDAAgD;QAG5F,kCAAY,KAAiC;YAC3C,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAEb,IAAA,kCAAsB,EAAC,KAAI,CAAC,CAAC;;QAC/B,CAAC;QAEM,yCAAM,GAAb;YACQ,IAAA,KAA2E,IAAI,CAAC,KAAK,EAAnF,QAAQ,cAAA,EAAE,YAAY,kBAAA,EAAE,SAAS,eAAA,EAAE,OAAO,aAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,SAAS,eAAe,CAAC;YAE5F,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,MAAO,EAAE;gBACxC,KAAK,EAAE,KAAM;gBACb,SAAS,WAAA;aACV,CAAC,CAAC;YAEH,OAAO,CACL,2BAAG,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,gBAAc,SAAS,IAC7F,QAAQ,CACP,CACL,CAAC;QACJ,CAAC;QACH,+BAAC;IAAD,CAAC,AAvBD,CAA8C,KAAK,CAAC,SAAS,GAuB5D;IAvBY,4DAAwB","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, initializeComponentRef } from '../../Utilities';\nimport type { IProcessedStyleSet } from '../../Styling';\nimport type {\n IDocumentCardLocationProps,\n IDocumentCardLocationStyleProps,\n IDocumentCardLocationStyles,\n} from './DocumentCardLocation.types';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\nconst getClassNames = classNamesFunction<IDocumentCardLocationStyleProps, IDocumentCardLocationStyles>();\n\n/**\n * {@docCategory DocumentCard}\n */\nexport class DocumentCardLocationBase extends React.Component<IDocumentCardLocationProps, any> {\n private _classNames: IProcessedStyleSet<IDocumentCardLocationStyles>;\n\n constructor(props: IDocumentCardLocationProps) {\n super(props);\n\n initializeComponentRef(this);\n }\n\n public render(): JSXElement {\n const { location, locationHref, ariaLabel, onClick, styles, theme, className } = this.props;\n\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n\n return (\n <a className={this._classNames.root} href={locationHref} onClick={onClick} aria-label={ariaLabel}>\n {location}\n </a>\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IDocumentCardLocationProps } from './DocumentCardLocation.types';
export declare const DocumentCardLocation: React.FunctionComponent<IDocumentCardLocationProps>;
@@ -0,0 +1,7 @@
define(["require", "exports", "../../Utilities", "./DocumentCardLocation.base", "./DocumentCardLocation.styles"], function (require, exports, Utilities_1, DocumentCardLocation_base_1, DocumentCardLocation_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardLocation = void 0;
exports.DocumentCardLocation = (0, Utilities_1.styled)(DocumentCardLocation_base_1.DocumentCardLocationBase, DocumentCardLocation_styles_1.getStyles, undefined, { scope: 'DocumentCardLocation' });
});
//# sourceMappingURL=DocumentCardLocation.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardLocation.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardLocation.ts"],"names":[],"mappings":";;;;IAUa,QAAA,oBAAoB,GAAwD,IAAA,kBAAM,EAI7F,oDAAwB,EAAE,uCAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { DocumentCardLocationBase } from './DocumentCardLocation.base';\nimport { getStyles } from './DocumentCardLocation.styles';\nimport type {\n IDocumentCardLocationProps,\n IDocumentCardLocationStyleProps,\n IDocumentCardLocationStyles,\n} from './DocumentCardLocation.types';\n\nexport const DocumentCardLocation: React.FunctionComponent<IDocumentCardLocationProps> = styled<\n IDocumentCardLocationProps,\n IDocumentCardLocationStyleProps,\n IDocumentCardLocationStyles\n>(DocumentCardLocationBase, getStyles, undefined, { scope: 'DocumentCardLocation' });\n"]}
@@ -0,0 +1,5 @@
import type { IDocumentCardLocationStyleProps, IDocumentCardLocationStyles } from './DocumentCardLocation.types';
export declare const DocumentCardLocationGlobalClassNames: {
root: string;
};
export declare const getStyles: (props: IDocumentCardLocationStyleProps) => IDocumentCardLocationStyles;
@@ -0,0 +1,39 @@
define(["require", "exports", "../../Styling"], function (require, exports, Styling_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = exports.DocumentCardLocationGlobalClassNames = void 0;
exports.DocumentCardLocationGlobalClassNames = {
root: 'ms-DocumentCardLocation',
};
var getStyles = function (props) {
var theme = props.theme, className = props.className;
var palette = theme.palette, fonts = theme.fonts;
var classNames = (0, Styling_1.getGlobalClassNames)(exports.DocumentCardLocationGlobalClassNames, theme);
return {
root: [
classNames.root,
fonts.small,
{
color: palette.themePrimary,
display: 'block',
fontWeight: Styling_1.FontWeights.semibold,
overflow: 'hidden',
padding: '8px 16px',
position: 'relative',
textDecoration: 'none',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
selectors: {
':hover': {
color: palette.themePrimary,
cursor: 'pointer',
},
},
},
className,
],
};
};
exports.getStyles = getStyles;
});
//# sourceMappingURL=DocumentCardLocation.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardLocation.styles.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardLocation.styles.ts"],"names":[],"mappings":";;;;IAGa,QAAA,oCAAoC,GAAG;QAClD,IAAI,EAAE,yBAAyB;KAChC,CAAC;IAEK,IAAM,SAAS,GAAG,UAAC,KAAsC;QACtD,IAAA,KAAK,GAAgB,KAAK,MAArB,EAAE,SAAS,GAAK,KAAK,UAAV,CAAW;QAC3B,IAAA,OAAO,GAAY,KAAK,QAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;QAEjC,IAAM,UAAU,GAAG,IAAA,6BAAmB,EAAC,4CAAoC,EAAE,KAAK,CAAC,CAAC;QAEpF,OAAO;YACL,IAAI,EAAE;gBACJ,UAAU,CAAC,IAAI;gBACf,KAAK,CAAC,KAAK;gBACX;oBACE,KAAK,EAAE,OAAO,CAAC,YAAY;oBAC3B,OAAO,EAAE,OAAO;oBAChB,UAAU,EAAE,qBAAW,CAAC,QAAQ;oBAChC,QAAQ,EAAE,QAAQ;oBAClB,OAAO,EAAE,UAAU;oBACnB,QAAQ,EAAE,UAAU;oBACpB,cAAc,EAAE,MAAM;oBACtB,YAAY,EAAE,UAAU;oBACxB,UAAU,EAAE,QAAQ;oBAEpB,SAAS,EAAE;wBACT,QAAQ,EAAE;4BACR,KAAK,EAAE,OAAO,CAAC,YAAY;4BAC3B,MAAM,EAAE,SAAS;yBAClB;qBACF;iBACF;gBACD,SAAS;aACV;SACF,CAAC;IACJ,CAAC,CAAC;IA/BW,QAAA,SAAS,aA+BpB","sourcesContent":["import { getGlobalClassNames, FontWeights } from '../../Styling';\nimport type { IDocumentCardLocationStyleProps, IDocumentCardLocationStyles } from './DocumentCardLocation.types';\n\nexport const DocumentCardLocationGlobalClassNames = {\n root: 'ms-DocumentCardLocation',\n};\n\nexport const getStyles = (props: IDocumentCardLocationStyleProps): IDocumentCardLocationStyles => {\n const { theme, className } = props;\n const { palette, fonts } = theme;\n\n const classNames = getGlobalClassNames(DocumentCardLocationGlobalClassNames, theme);\n\n return {\n root: [\n classNames.root,\n fonts.small,\n {\n color: palette.themePrimary,\n display: 'block',\n fontWeight: FontWeights.semibold,\n overflow: 'hidden',\n padding: '8px 16px',\n position: 'relative',\n textDecoration: 'none',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n\n selectors: {\n ':hover': {\n color: palette.themePrimary,\n cursor: 'pointer',\n },\n },\n },\n className,\n ],\n };\n};\n"]}
@@ -0,0 +1,65 @@
import * as React from 'react';
import { DocumentCardLocationBase } from './DocumentCardLocation.base';
import type { IStyle, ITheme } from '../../Styling';
import type { IRefObject, IStyleFunctionOrObject } from '../../Utilities';
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardLocation {
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardLocationProps extends React.ClassAttributes<DocumentCardLocationBase> {
/**
* Gets the component ref.
*/
componentRef?: IRefObject<IDocumentCardLocation>;
/**
* Text for the location of the document.
*/
location: string;
/**
* URL to navigate to for this location.
*/
locationHref?: string;
/**
* Function to call when the location is clicked.
*/
onClick?: (ev?: React.MouseEvent<HTMLElement>) => void;
/**
* Aria label for the link to the document location.
*/
ariaLabel?: string;
/**
* Call to provide customized styling that will layer on top of the variant rules
*/
styles?: IStyleFunctionOrObject<IDocumentCardLocationStyleProps, IDocumentCardLocationStyles>;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardLocationStyleProps {
/**
* Accept theme prop.
*/
theme: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardLocationStyles {
root: IStyle;
}
@@ -0,0 +1,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=DocumentCardLocation.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardLocation.types.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardLocation.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { DocumentCardLocationBase } from './DocumentCardLocation.base';\nimport type { IStyle, ITheme } from '../../Styling';\nimport type { IRefObject, IStyleFunctionOrObject } from '../../Utilities';\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardLocation {}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardLocationProps extends React.ClassAttributes<DocumentCardLocationBase> {\n /**\n * Gets the component ref.\n */\n componentRef?: IRefObject<IDocumentCardLocation>;\n\n /**\n * Text for the location of the document.\n */\n location: string;\n\n /**\n * URL to navigate to for this location.\n */\n locationHref?: string;\n\n /**\n * Function to call when the location is clicked.\n */\n onClick?: (ev?: React.MouseEvent<HTMLElement>) => void;\n\n /**\n * Aria label for the link to the document location.\n */\n ariaLabel?: string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: IStyleFunctionOrObject<IDocumentCardLocationStyleProps, IDocumentCardLocationStyles>;\n\n /**\n * Theme provided by HOC.\n */\n theme?: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardLocationStyleProps {\n /**\n * Accept theme prop.\n */\n theme: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardLocationStyles {\n root: IStyle;\n}\n"]}
@@ -0,0 +1,11 @@
import * as React from 'react';
import type { IDocumentCardLogoProps } from './DocumentCardLogo.types';
import type { JSXElement } from '@fluentui/utilities';
/**
* {@docCategory DocumentCard}
*/
export declare class DocumentCardLogoBase extends React.Component<IDocumentCardLogoProps, any> {
private _classNames;
constructor(props: IDocumentCardLogoProps);
render(): JSXElement;
}
@@ -0,0 +1,29 @@
define(["require", "exports", "tslib", "react", "../../Icon", "../../Utilities"], function (require, exports, tslib_1, React, Icon_1, Utilities_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardLogoBase = void 0;
var getClassNames = (0, Utilities_1.classNamesFunction)();
/**
* {@docCategory DocumentCard}
*/
var DocumentCardLogoBase = /** @class */ (function (_super) {
tslib_1.__extends(DocumentCardLogoBase, _super);
function DocumentCardLogoBase(props) {
var _this = _super.call(this, props) || this;
(0, Utilities_1.initializeComponentRef)(_this);
return _this;
}
DocumentCardLogoBase.prototype.render = function () {
var _a = this.props, logoIcon = _a.logoIcon, styles = _a.styles, theme = _a.theme, className = _a.className;
this._classNames = getClassNames(styles, {
theme: theme,
className: className,
});
return (React.createElement("div", { className: this._classNames.root },
React.createElement(Icon_1.Icon, { iconName: logoIcon })));
};
return DocumentCardLogoBase;
}(React.Component));
exports.DocumentCardLogoBase = DocumentCardLogoBase;
});
//# sourceMappingURL=DocumentCardLogo.base.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardLogo.base.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardLogo.base.tsx"],"names":[],"mappings":";;;;IAYA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAwD,CAAC;IAEjG;;OAEG;IACH;QAA0C,gDAA4C;QAGpF,8BAAY,KAA6B;YACvC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAEb,IAAA,kCAAsB,EAAC,KAAI,CAAC,CAAC;;QAC/B,CAAC;QAEM,qCAAM,GAAb;YACQ,IAAA,KAAyC,IAAI,CAAC,KAAK,EAAjD,QAAQ,cAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,SAAS,eAAe,CAAC;YAE1D,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,MAAO,EAAE;gBACxC,KAAK,EAAE,KAAM;gBACb,SAAS,WAAA;aACV,CAAC,CAAC;YAEH,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;gBACnC,oBAAC,WAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACxB,CACP,CAAC;QACJ,CAAC;QACH,2BAAC;IAAD,CAAC,AAvBD,CAA0C,KAAK,CAAC,SAAS,GAuBxD;IAvBY,oDAAoB","sourcesContent":["import * as React from 'react';\nimport { Icon } from '../../Icon';\nimport { classNamesFunction, initializeComponentRef } from '../../Utilities';\nimport type { IProcessedStyleSet } from '../../Styling';\nimport type {\n IDocumentCardLogoProps,\n IDocumentCardLogoStyleProps,\n IDocumentCardLogoStyles,\n} from './DocumentCardLogo.types';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\nconst getClassNames = classNamesFunction<IDocumentCardLogoStyleProps, IDocumentCardLogoStyles>();\n\n/**\n * {@docCategory DocumentCard}\n */\nexport class DocumentCardLogoBase extends React.Component<IDocumentCardLogoProps, any> {\n private _classNames: IProcessedStyleSet<IDocumentCardLogoStyles>;\n\n constructor(props: IDocumentCardLogoProps) {\n super(props);\n\n initializeComponentRef(this);\n }\n\n public render(): JSXElement {\n const { logoIcon, styles, theme, className } = this.props;\n\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n\n return (\n <div className={this._classNames.root}>\n <Icon iconName={logoIcon} />\n </div>\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IDocumentCardLogoProps } from './DocumentCardLogo.types';
export declare const DocumentCardLogo: React.FunctionComponent<IDocumentCardLogoProps>;
@@ -0,0 +1,7 @@
define(["require", "exports", "../../Utilities", "./DocumentCardLogo.base", "./DocumentCardLogo.styles"], function (require, exports, Utilities_1, DocumentCardLogo_base_1, DocumentCardLogo_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardLogo = void 0;
exports.DocumentCardLogo = (0, Utilities_1.styled)(DocumentCardLogo_base_1.DocumentCardLogoBase, DocumentCardLogo_styles_1.getStyles, undefined, { scope: 'DocumentCardLogo' });
});
//# sourceMappingURL=DocumentCardLogo.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardLogo.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardLogo.ts"],"names":[],"mappings":";;;;IAUa,QAAA,gBAAgB,GAAoD,IAAA,kBAAM,EAIrF,4CAAoB,EAAE,mCAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { DocumentCardLogoBase } from './DocumentCardLogo.base';\nimport { getStyles } from './DocumentCardLogo.styles';\nimport type {\n IDocumentCardLogoProps,\n IDocumentCardLogoStyleProps,\n IDocumentCardLogoStyles,\n} from './DocumentCardLogo.types';\n\nexport const DocumentCardLogo: React.FunctionComponent<IDocumentCardLogoProps> = styled<\n IDocumentCardLogoProps,\n IDocumentCardLogoStyleProps,\n IDocumentCardLogoStyles\n>(DocumentCardLogoBase, getStyles, undefined, { scope: 'DocumentCardLogo' });\n"]}
@@ -0,0 +1,2 @@
import type { IDocumentCardLogoStyleProps, IDocumentCardLogoStyles } from './DocumentCardLogo.types';
export declare const getStyles: (props: IDocumentCardLogoStyleProps) => IDocumentCardLogoStyles;
@@ -0,0 +1,28 @@
define(["require", "exports", "../../Styling"], function (require, exports, Styling_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = void 0;
var GlobalClassNames = {
root: 'ms-DocumentCardLogo',
};
var getStyles = function (props) {
var theme = props.theme, className = props.className;
var palette = theme.palette, fonts = theme.fonts;
var classNames = (0, Styling_1.getGlobalClassNames)(GlobalClassNames, theme);
return {
root: [
classNames.root,
{
// eslint-disable-next-line @typescript-eslint/no-deprecated
fontSize: fonts.xxLargePlus.fontSize,
color: palette.themePrimary,
display: 'block',
padding: '16px 16px 0 16px',
},
className,
],
};
};
exports.getStyles = getStyles;
});
//# sourceMappingURL=DocumentCardLogo.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardLogo.styles.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardLogo.styles.ts"],"names":[],"mappings":";;;;IAGA,IAAM,gBAAgB,GAAG;QACvB,IAAI,EAAE,qBAAqB;KAC5B,CAAC;IAEK,IAAM,SAAS,GAAG,UAAC,KAAkC;QAClD,IAAA,KAAK,GAAgB,KAAK,MAArB,EAAE,SAAS,GAAK,KAAK,UAAV,CAAW;QAC3B,IAAA,OAAO,GAAY,KAAK,QAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;QAEjC,IAAM,UAAU,GAAG,IAAA,6BAAmB,EAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;QAEhE,OAAO;YACL,IAAI,EAAE;gBACJ,UAAU,CAAC,IAAI;gBACf;oBACE,4DAA4D;oBAC5D,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,QAAQ;oBACpC,KAAK,EAAE,OAAO,CAAC,YAAY;oBAC3B,OAAO,EAAE,OAAO;oBAChB,OAAO,EAAE,kBAAkB;iBAC5B;gBACD,SAAS;aACV;SACF,CAAC;IACJ,CAAC,CAAC;IAnBW,QAAA,SAAS,aAmBpB","sourcesContent":["import { getGlobalClassNames } from '../../Styling';\nimport type { IDocumentCardLogoStyleProps, IDocumentCardLogoStyles } from './DocumentCardLogo.types';\n\nconst GlobalClassNames = {\n root: 'ms-DocumentCardLogo',\n};\n\nexport const getStyles = (props: IDocumentCardLogoStyleProps): IDocumentCardLogoStyles => {\n const { theme, className } = props;\n const { palette, fonts } = theme;\n\n const classNames = getGlobalClassNames(GlobalClassNames, theme);\n\n return {\n root: [\n classNames.root,\n {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n fontSize: fonts.xxLargePlus.fontSize,\n color: palette.themePrimary,\n display: 'block',\n padding: '16px 16px 0 16px',\n },\n className,\n ],\n };\n};\n"]}
@@ -0,0 +1,57 @@
import * as React from 'react';
import { DocumentCardLogoBase } from './DocumentCardLogo.base';
import type { IStyle, ITheme } from '../../Styling';
import type { IRefObject, IStyleFunctionOrObject } from '../../Utilities';
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardLogo {
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardLogoProps extends React.ClassAttributes<DocumentCardLogoBase> {
/**
* Gets the component ref.
*/
componentRef?: IRefObject<IDocumentCardLogo>;
/**
* Describes DocumentCard Logo badge.
*/
logoIcon: string;
/**
* Describe Logo name, optional.
*/
logoName?: string;
/**
* Call to provide customized styling that will layer on top of the variant rules
*/
styles?: IStyleFunctionOrObject<IDocumentCardLogoStyleProps, IDocumentCardLogoStyles>;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardLogoStyleProps {
/**
* Accept theme prop.
*/
theme: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardLogoStyles {
root: IStyle;
}
@@ -0,0 +1,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=DocumentCardLogo.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardLogo.types.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardLogo.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { DocumentCardLogoBase } from './DocumentCardLogo.base';\nimport type { IStyle, ITheme } from '../../Styling';\nimport type { IRefObject, IStyleFunctionOrObject } from '../../Utilities';\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardLogo {}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardLogoProps extends React.ClassAttributes<DocumentCardLogoBase> {\n /**\n * Gets the component ref.\n */\n componentRef?: IRefObject<IDocumentCardLogo>;\n /**\n * Describes DocumentCard Logo badge.\n */\n logoIcon: string;\n\n /**\n * Describe Logo name, optional.\n */\n logoName?: string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: IStyleFunctionOrObject<IDocumentCardLogoStyleProps, IDocumentCardLogoStyles>;\n\n /**\n * Theme provided by HOC.\n */\n theme?: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardLogoStyleProps {\n /**\n * Accept theme prop.\n */\n theme: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardLogoStyles {\n root: IStyle;\n}\n"]}
@@ -0,0 +1,13 @@
import * as React from 'react';
import type { IDocumentCardPreviewProps } from './DocumentCardPreview.types';
import type { JSXElement } from '@fluentui/utilities';
/**
* {@docCategory DocumentCard}
*/
export declare class DocumentCardPreviewBase extends React.Component<IDocumentCardPreviewProps, any> {
private _classNames;
constructor(props: IDocumentCardPreviewProps);
render(): JSXElement;
private _renderPreviewImage;
private _renderPreviewList;
}
@@ -0,0 +1,84 @@
define(["require", "exports", "tslib", "react", "../../Icon", "../../Image", "../../Link", "../../Utilities"], function (require, exports, tslib_1, React, Icon_1, Image_1, Link_1, Utilities_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardPreviewBase = void 0;
var DEFAULT_DISPLAY_COUNT = 3;
var getClassNames = (0, Utilities_1.classNamesFunction)();
/**
* {@docCategory DocumentCard}
*/
var DocumentCardPreviewBase = /** @class */ (function (_super) {
tslib_1.__extends(DocumentCardPreviewBase, _super);
function DocumentCardPreviewBase(props) {
var _this = _super.call(this, props) || this;
_this._renderPreviewList = function (previewImages) {
var _a = _this.props, getOverflowDocumentCountText = _a.getOverflowDocumentCountText, _b = _a.maxDisplayCount, maxDisplayCount = _b === void 0 ? DEFAULT_DISPLAY_COUNT : _b;
// Determine how many documents we won't be showing
var overflowDocumentCount = previewImages.length - maxDisplayCount;
// Determine the overflow text that will be rendered after the preview list.
var overflowText = overflowDocumentCount
? getOverflowDocumentCountText
? getOverflowDocumentCountText(overflowDocumentCount)
: '+' + overflowDocumentCount
: null;
// Create list items for the documents to be shown
var fileListItems = previewImages.slice(0, maxDisplayCount).map(function (file, fileIndex) { return (React.createElement("li", { key: fileIndex },
React.createElement(Image_1.Image, { className: _this._classNames.fileListIcon, src: file.iconSrc, role: "presentation", alt: "", width: "16px", height: "16px" }),
React.createElement(Link_1.Link, tslib_1.__assign({ className: _this._classNames.fileListLink,
// eslint-disable-next-line @typescript-eslint/no-deprecated
href: file.url }, file.linkProps), file.name))); });
return (React.createElement("div", null,
React.createElement("ul", { className: _this._classNames.fileList }, fileListItems),
overflowText && React.createElement("span", { className: _this._classNames.fileListOverflowText }, overflowText)));
};
(0, Utilities_1.initializeComponentRef)(_this);
return _this;
}
DocumentCardPreviewBase.prototype.render = function () {
var _a = this.props, previewImages = _a.previewImages, styles = _a.styles, theme = _a.theme, className = _a.className;
var style;
var preview;
var isFileList = previewImages.length > 1;
this._classNames = getClassNames(styles, {
theme: theme,
className: className,
isFileList: isFileList,
});
if (previewImages.length > 1) {
// Render a list of files
preview = this._renderPreviewList(previewImages);
}
else if (previewImages.length === 1) {
// Render a single preview
preview = this._renderPreviewImage(previewImages[0]);
// Override the border color if an accent color was provided
/* eslint-disable @typescript-eslint/no-deprecated */
if (previewImages[0].accentColor) {
style = {
borderBottomColor: previewImages[0].accentColor,
};
}
/* eslint-enable @typescript-eslint/no-deprecated */
}
return (React.createElement("div", { className: this._classNames.root, style: style }, preview));
};
DocumentCardPreviewBase.prototype._renderPreviewImage = function (previewImage) {
var width = previewImage.width, height = previewImage.height, imageFit = previewImage.imageFit, previewIconProps = previewImage.previewIconProps, previewIconContainerClass = previewImage.previewIconContainerClass;
if (previewIconProps) {
return (React.createElement("div", { className: (0, Utilities_1.css)(this._classNames.previewIcon, previewIconContainerClass), style: { width: width, height: height } },
React.createElement(Icon_1.Icon, tslib_1.__assign({}, previewIconProps))));
}
var image = (React.createElement(Image_1.Image, { width: width, height: height, imageFit: imageFit, src: previewImage.previewImageSrc, role: "presentation", alt: "" }));
var icon;
if (previewImage.iconSrc) {
icon = React.createElement(Image_1.Image, { className: this._classNames.icon, src: previewImage.iconSrc, role: "presentation", alt: "" });
}
return (React.createElement("div", null,
image,
icon));
};
return DocumentCardPreviewBase;
}(React.Component));
exports.DocumentCardPreviewBase = DocumentCardPreviewBase;
});
//# sourceMappingURL=DocumentCardPreview.base.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IDocumentCardPreviewProps } from './DocumentCardPreview.types';
export declare const DocumentCardPreview: React.FunctionComponent<IDocumentCardPreviewProps>;
@@ -0,0 +1,7 @@
define(["require", "exports", "../../Utilities", "./DocumentCardPreview.base", "./DocumentCardPreview.styles"], function (require, exports, Utilities_1, DocumentCardPreview_base_1, DocumentCardPreview_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardPreview = void 0;
exports.DocumentCardPreview = (0, Utilities_1.styled)(DocumentCardPreview_base_1.DocumentCardPreviewBase, DocumentCardPreview_styles_1.getStyles, undefined, { scope: 'DocumentCardPreview' });
});
//# sourceMappingURL=DocumentCardPreview.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardPreview.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardPreview.ts"],"names":[],"mappings":";;;;IAUa,QAAA,mBAAmB,GAAuD,IAAA,kBAAM,EAI3F,kDAAuB,EAAE,sCAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { DocumentCardPreviewBase } from './DocumentCardPreview.base';\nimport { getStyles } from './DocumentCardPreview.styles';\nimport type {\n IDocumentCardPreviewProps,\n IDocumentCardPreviewStyleProps,\n IDocumentCardPreviewStyles,\n} from './DocumentCardPreview.types';\n\nexport const DocumentCardPreview: React.FunctionComponent<IDocumentCardPreviewProps> = styled<\n IDocumentCardPreviewProps,\n IDocumentCardPreviewStyleProps,\n IDocumentCardPreviewStyles\n>(DocumentCardPreviewBase, getStyles, undefined, { scope: 'DocumentCardPreview' });\n"]}
@@ -0,0 +1,7 @@
import type { IDocumentCardPreviewStyleProps, IDocumentCardPreviewStyles } from './DocumentCardPreview.types';
export declare const DocumentCardPreviewGlobalClassNames: {
root: string;
icon: string;
iconContainer: string;
};
export declare const getStyles: (props: IDocumentCardPreviewStyleProps) => IDocumentCardPreviewStyles;
@@ -0,0 +1,104 @@
define(["require", "exports", "../../Styling", "../../Utilities"], function (require, exports, Styling_1, Utilities_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = exports.DocumentCardPreviewGlobalClassNames = void 0;
exports.DocumentCardPreviewGlobalClassNames = {
root: 'ms-DocumentCardPreview',
icon: 'ms-DocumentCardPreview-icon',
iconContainer: 'ms-DocumentCardPreview-iconContainer',
};
var getStyles = function (props) {
var _a, _b;
var theme = props.theme, className = props.className, isFileList = props.isFileList;
var palette = theme.palette, fonts = theme.fonts;
var classNames = (0, Styling_1.getGlobalClassNames)(exports.DocumentCardPreviewGlobalClassNames, theme);
return {
root: [
classNames.root,
fonts.small,
{
backgroundColor: isFileList ? palette.white : palette.neutralLighterAlt,
borderBottom: "1px solid ".concat(palette.neutralLight),
overflow: "hidden",
position: 'relative',
},
className,
],
previewIcon: [
classNames.iconContainer,
{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
height: '100%',
},
],
icon: [
classNames.icon,
{
left: '10px',
bottom: '10px',
position: 'absolute',
},
],
fileList: {
padding: '16px 16px 0 16px',
listStyleType: 'none',
margin: 0,
selectors: {
li: {
height: '16px',
lineHeight: '16px',
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'center',
marginBottom: '8px',
overflow: 'hidden',
},
},
},
fileListIcon: {
display: 'inline-block',
flexShrink: 0,
marginRight: '8px',
},
fileListLink: [
(0, Styling_1.getFocusStyle)(theme, {
highContrastStyle: {
border: '1px solid WindowText',
outline: 'none',
},
}),
{
boxSizing: 'border-box',
color: palette.neutralDark,
flexGrow: 1,
overflow: 'hidden',
display: 'inline-block',
textDecoration: 'none',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
selectors: (_a = {
':hover': {
color: palette.themePrimary,
}
},
_a[".".concat(Utilities_1.IsFocusVisibleClassName, " &:focus, :host(.").concat(Utilities_1.IsFocusVisibleClassName, ") &:focus")] = {
selectors: (_b = {},
_b[Styling_1.HighContrastSelector] = {
outline: 'none',
},
_b),
},
_a),
},
],
fileListOverflowText: {
padding: '0px 16px 8px 16px',
display: 'block',
},
};
};
exports.getStyles = getStyles;
});
//# sourceMappingURL=DocumentCardPreview.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardPreview.styles.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardPreview.styles.ts"],"names":[],"mappings":";;;;IAIa,QAAA,mCAAmC,GAAG;QACjD,IAAI,EAAE,wBAAwB;QAC9B,IAAI,EAAE,6BAA6B;QACnC,aAAa,EAAE,sCAAsC;KACtD,CAAC;IAEK,IAAM,SAAS,GAAG,UAAC,KAAqC;;QACrD,IAAA,KAAK,GAA4B,KAAK,MAAjC,EAAE,SAAS,GAAiB,KAAK,UAAtB,EAAE,UAAU,GAAK,KAAK,WAAV,CAAW;QACvC,IAAA,OAAO,GAAY,KAAK,QAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;QAEjC,IAAM,UAAU,GAAG,IAAA,6BAAmB,EAAC,2CAAmC,EAAE,KAAK,CAAC,CAAC;QAEnF,OAAO;YACL,IAAI,EAAE;gBACJ,UAAU,CAAC,IAAI;gBACf,KAAK,CAAC,KAAK;gBACX;oBACE,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB;oBACvE,YAAY,EAAE,oBAAa,OAAO,CAAC,YAAY,CAAE;oBACjD,QAAQ,EAAE,QAAQ;oBAClB,QAAQ,EAAE,UAAU;iBACrB;gBACD,SAAS;aACV;YACD,WAAW,EAAE;gBACX,UAAU,CAAC,aAAa;gBACxB;oBACE,OAAO,EAAE,MAAM;oBACf,UAAU,EAAE,QAAQ;oBACpB,cAAc,EAAE,QAAQ;oBACxB,MAAM,EAAE,MAAM;iBACf;aACF;YACD,IAAI,EAAE;gBACJ,UAAU,CAAC,IAAI;gBACf;oBACE,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,MAAM;oBACd,QAAQ,EAAE,UAAU;iBACrB;aACF;YACD,QAAQ,EAAE;gBACR,OAAO,EAAE,kBAAkB;gBAC3B,aAAa,EAAE,MAAM;gBACrB,MAAM,EAAE,CAAC;gBACT,SAAS,EAAE;oBACT,EAAE,EAAE;wBACF,MAAM,EAAE,MAAM;wBACd,UAAU,EAAE,MAAM;wBAClB,OAAO,EAAE,MAAM;wBACf,QAAQ,EAAE,QAAQ;wBAClB,UAAU,EAAE,QAAQ;wBACpB,YAAY,EAAE,KAAK;wBACnB,QAAQ,EAAE,QAAQ;qBACnB;iBACF;aACF;YACD,YAAY,EAAE;gBACZ,OAAO,EAAE,cAAc;gBACvB,UAAU,EAAE,CAAC;gBACb,WAAW,EAAE,KAAK;aACnB;YACD,YAAY,EAAE;gBACZ,IAAA,uBAAa,EAAC,KAAK,EAAE;oBACnB,iBAAiB,EAAE;wBACjB,MAAM,EAAE,sBAAsB;wBAC9B,OAAO,EAAE,MAAM;qBAChB;iBACF,CAAC;gBACF;oBACE,SAAS,EAAE,YAAY;oBACvB,KAAK,EAAE,OAAO,CAAC,WAAW;oBAC1B,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,QAAQ;oBAClB,OAAO,EAAE,cAAc;oBACvB,cAAc,EAAE,MAAM;oBACtB,YAAY,EAAE,UAAU;oBACxB,UAAU,EAAE,QAAQ;oBACpB,SAAS;4BACP,QAAQ,EAAE;gCACR,KAAK,EAAE,OAAO,CAAC,YAAY;6BAC5B;;wBACD,GAAC,WAAI,mCAAuB,8BAAoB,mCAAuB,cAAW,IAAG;4BACnF,SAAS;gCACP,GAAC,8BAAoB,IAAG;oCACtB,OAAO,EAAE,MAAM;iCAChB;mCACF;yBACF;2BACF;iBACF;aACF;YACD,oBAAoB,EAAE;gBACpB,OAAO,EAAE,mBAAmB;gBAC5B,OAAO,EAAE,OAAO;aACjB;SACF,CAAC;IACJ,CAAC,CAAC;IA3FW,QAAA,SAAS,aA2FpB","sourcesContent":["import { getFocusStyle, getGlobalClassNames, HighContrastSelector } from '../../Styling';\nimport { IsFocusVisibleClassName } from '../../Utilities';\nimport type { IDocumentCardPreviewStyleProps, IDocumentCardPreviewStyles } from './DocumentCardPreview.types';\n\nexport const DocumentCardPreviewGlobalClassNames = {\n root: 'ms-DocumentCardPreview',\n icon: 'ms-DocumentCardPreview-icon',\n iconContainer: 'ms-DocumentCardPreview-iconContainer',\n};\n\nexport const getStyles = (props: IDocumentCardPreviewStyleProps): IDocumentCardPreviewStyles => {\n const { theme, className, isFileList } = props;\n const { palette, fonts } = theme;\n\n const classNames = getGlobalClassNames(DocumentCardPreviewGlobalClassNames, theme);\n\n return {\n root: [\n classNames.root,\n fonts.small,\n {\n backgroundColor: isFileList ? palette.white : palette.neutralLighterAlt,\n borderBottom: `1px solid ${palette.neutralLight}`,\n overflow: `hidden`,\n position: 'relative',\n },\n className,\n ],\n previewIcon: [\n classNames.iconContainer,\n {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%',\n },\n ],\n icon: [\n classNames.icon,\n {\n left: '10px',\n bottom: '10px',\n position: 'absolute',\n },\n ],\n fileList: {\n padding: '16px 16px 0 16px',\n listStyleType: 'none',\n margin: 0,\n selectors: {\n li: {\n height: '16px',\n lineHeight: '16px',\n display: 'flex',\n flexWrap: 'nowrap',\n alignItems: 'center',\n marginBottom: '8px',\n overflow: 'hidden',\n },\n },\n },\n fileListIcon: {\n display: 'inline-block',\n flexShrink: 0,\n marginRight: '8px',\n },\n fileListLink: [\n getFocusStyle(theme, {\n highContrastStyle: {\n border: '1px solid WindowText',\n outline: 'none',\n },\n }),\n {\n boxSizing: 'border-box',\n color: palette.neutralDark,\n flexGrow: 1,\n overflow: 'hidden',\n display: 'inline-block',\n textDecoration: 'none',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n selectors: {\n ':hover': {\n color: palette.themePrimary,\n },\n [`.${IsFocusVisibleClassName} &:focus, :host(.${IsFocusVisibleClassName}) &:focus`]: {\n selectors: {\n [HighContrastSelector]: {\n outline: 'none',\n },\n },\n },\n },\n },\n ],\n fileListOverflowText: {\n padding: '0px 16px 8px 16px',\n display: 'block',\n },\n };\n};\n"]}
@@ -0,0 +1,138 @@
import { ImageFit } from '../../Image';
import type { IIconProps } from '../../Icon';
import type { ILinkProps } from '../../Link';
import type { IStyle, ITheme } from '../../Styling';
import type { IBaseProps, IRefObject, IStyleFunctionOrObject } from '../../Utilities';
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardPreview {
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardPreviewProps extends IBaseProps<{}> {
/**
* Gets the component ref.
*/
componentRef?: IRefObject<IDocumentCardPreview>;
/**
* One or more preview images to display.
*/
previewImages: IDocumentCardPreviewImage[];
/**
* The function return string that will describe the number of overflow documents.
* such as (overflowCount: number) =\> `+${ overflowCount } more`,
*/
getOverflowDocumentCountText?: (overflowCount: number) => string;
/**
* Maximum number of document previews to display
* @default 3
*/
maxDisplayCount?: number;
/**
* Call to provide customized styling that will layer on top of the variant rules
*/
styles?: IStyleFunctionOrObject<IDocumentCardPreviewStyleProps, IDocumentCardPreviewStyles>;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardPreviewImage {
/**
* Gets the component ref.
*/
componentRef?: IRefObject<{}>;
/**
* File name for the document this preview represents.
*/
name?: string;
/**
* URL to view the file.
* @deprecated Use `href` inside of `linkProps` instead.
*/
url?: string;
/**
* Props to pass to Link component
*/
linkProps?: ILinkProps;
/**
* Path to the preview image.
*/
previewImageSrc?: string;
/**
* @deprecated To be removed at \>= v2.0.0.
*/
errorImageSrc?: string;
/**
* Path to the icon associated with this document type.
*
*/
iconSrc?: string;
/**
* If provided, forces the preview image to be this width.
*/
width?: number;
/**
* If provided, forces the preview image to be this height.
*/
height?: number;
/**
* Used to determine how to size the image to fit the dimensions of the component.
* If both dimensions are provided, then the image is fit using ImageFit.scale, otherwise ImageFit.none is used.
*/
imageFit?: ImageFit;
/**
* Hex color value of the line below the preview, which should correspond to the document type.
*
* @deprecated To be removed at \>= v5.0.0.
*/
accentColor?: string;
/**
* The props for the preview icon.
* If provided, icon will be rendered instead of image.
*/
previewIconProps?: IIconProps;
/**
* The props for the preview icon container classname.
* If provided, icon container classname will be used..
*/
previewIconContainerClass?: string;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardPreviewStyleProps {
/**
* Accept theme prop.
*/
theme: ITheme;
/**
* Optional override class name
*/
className?: string;
/**
* Is it a list of files rather than a preview image?
*/
isFileList?: boolean;
}
/**
* {@docCategory DocumentCard}
*/
export interface IDocumentCardPreviewStyles {
root: IStyle;
previewIcon: IStyle;
icon: IStyle;
fileList: IStyle;
fileListIcon: IStyle;
fileListLink: IStyle;
fileListOverflowText: IStyle;
}
@@ -0,0 +1,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=DocumentCardPreview.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardPreview.types.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardPreview.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ImageFit } from '../../Image';\nimport type { IIconProps } from '../../Icon';\nimport type { ILinkProps } from '../../Link';\nimport type { IStyle, ITheme } from '../../Styling';\nimport type { IBaseProps, IRefObject, IStyleFunctionOrObject } from '../../Utilities';\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardPreview {}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardPreviewProps extends IBaseProps<{}> {\n /**\n * Gets the component ref.\n */\n componentRef?: IRefObject<IDocumentCardPreview>;\n\n /**\n * One or more preview images to display.\n */\n previewImages: IDocumentCardPreviewImage[];\n\n /**\n * The function return string that will describe the number of overflow documents.\n * such as (overflowCount: number) =\\> `+${ overflowCount } more`,\n */\n getOverflowDocumentCountText?: (overflowCount: number) => string;\n\n /**\n * Maximum number of document previews to display\n * @default 3\n */\n maxDisplayCount?: number;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: IStyleFunctionOrObject<IDocumentCardPreviewStyleProps, IDocumentCardPreviewStyles>;\n\n /**\n * Theme provided by HOC.\n */\n theme?: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardPreviewImage {\n /**\n * Gets the component ref.\n */\n componentRef?: IRefObject<{}>;\n\n /**\n * File name for the document this preview represents.\n */\n name?: string;\n\n /**\n * URL to view the file.\n * @deprecated Use `href` inside of `linkProps` instead.\n */\n url?: string;\n\n /**\n * Props to pass to Link component\n */\n linkProps?: ILinkProps;\n\n /**\n * Path to the preview image.\n */\n previewImageSrc?: string;\n\n /**\n * @deprecated To be removed at \\>= v2.0.0.\n */\n errorImageSrc?: string;\n\n /**\n * Path to the icon associated with this document type.\n *\n */\n iconSrc?: string;\n\n /**\n * If provided, forces the preview image to be this width.\n */\n width?: number;\n\n /**\n * If provided, forces the preview image to be this height.\n */\n height?: number;\n\n /**\n * Used to determine how to size the image to fit the dimensions of the component.\n * If both dimensions are provided, then the image is fit using ImageFit.scale, otherwise ImageFit.none is used.\n */\n imageFit?: ImageFit;\n\n /**\n * Hex color value of the line below the preview, which should correspond to the document type.\n *\n * @deprecated To be removed at \\>= v5.0.0.\n */\n accentColor?: string;\n\n /**\n * The props for the preview icon.\n * If provided, icon will be rendered instead of image.\n */\n previewIconProps?: IIconProps;\n\n /**\n * The props for the preview icon container classname.\n * If provided, icon container classname will be used..\n */\n previewIconContainerClass?: string;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardPreviewStyleProps {\n /**\n * Accept theme prop.\n */\n theme: ITheme;\n\n /**\n * Optional override class name\n */\n className?: string;\n\n /**\n * Is it a list of files rather than a preview image?\n */\n isFileList?: boolean;\n}\n\n/**\n * {@docCategory DocumentCard}\n */\nexport interface IDocumentCardPreviewStyles {\n root: IStyle;\n previewIcon: IStyle;\n icon: IStyle;\n fileList: IStyle;\n fileListIcon: IStyle;\n fileListLink: IStyle;\n fileListOverflowText: IStyle;\n}\n"]}
@@ -0,0 +1,11 @@
import * as React from 'react';
import type { IDocumentCardStatusProps } from './DocumentCardStatus.types';
import type { JSXElement } from '@fluentui/utilities';
/**
* {@docCategory DocumentCard}
*/
export declare class DocumentCardStatusBase extends React.Component<IDocumentCardStatusProps, any> {
private _classNames;
constructor(props: IDocumentCardStatusProps);
render(): JSXElement;
}
@@ -0,0 +1,36 @@
define(["require", "exports", "tslib", "react", "../../Utilities", "../../Icon"], function (require, exports, tslib_1, React, Utilities_1, Icon_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocumentCardStatusBase = void 0;
var getClassNames = (0, Utilities_1.classNamesFunction)();
/**
* {@docCategory DocumentCard}
*/
var DocumentCardStatusBase = /** @class */ (function (_super) {
tslib_1.__extends(DocumentCardStatusBase, _super);
function DocumentCardStatusBase(props) {
var _this = _super.call(this, props) || this;
(0, Utilities_1.initializeComponentRef)(_this);
return _this;
}
DocumentCardStatusBase.prototype.render = function () {
var _a = this.props, statusIcon = _a.statusIcon, status = _a.status, styles = _a.styles, theme = _a.theme, className = _a.className;
var iconProps = {
iconName: statusIcon,
styles: {
root: { padding: '8px' },
},
};
this._classNames = getClassNames(styles, {
theme: theme,
className: className,
});
return (React.createElement("div", { className: this._classNames.root },
statusIcon && React.createElement(Icon_1.Icon, tslib_1.__assign({}, iconProps)),
status));
};
return DocumentCardStatusBase;
}(React.Component));
exports.DocumentCardStatusBase = DocumentCardStatusBase;
});
//# sourceMappingURL=DocumentCardStatus.base.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DocumentCardStatus.base.js","sourceRoot":"../src/","sources":["components/DocumentCard/DocumentCardStatus.base.tsx"],"names":[],"mappings":";;;;IAaA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4D,CAAC;IAErG;;OAEG;IACH;QAA4C,kDAA8C;QAGxF,gCAAY,KAA+B;YACzC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAEb,IAAA,kCAAsB,EAAC,KAAI,CAAC,CAAC;;QAC/B,CAAC;QAEM,uCAAM,GAAb;YACQ,IAAA,KAAmD,IAAI,CAAC,KAAK,EAA3D,UAAU,gBAAA,EAAE,MAAM,YAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,SAAS,eAAe,CAAC;YACpE,IAAM,SAAS,GAAG;gBAChB,QAAQ,EAAE,UAAU;gBACpB,MAAM,EAAE;oBACN,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;iBACzB;aACF,CAAC;YAEF,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,MAAO,EAAE;gBACxC,KAAK,EAAE,KAAM;gBACb,SAAS,WAAA;aACV,CAAC,CAAC;YAEH,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;gBAClC,UAAU,IAAI,oBAAC,WAAI,uBAAK,SAAS,EAAI;gBACrC,MAAM,CACH,CACP,CAAC;QACJ,CAAC;QACH,6BAAC;IAAD,CAAC,AA9BD,CAA4C,KAAK,CAAC,SAAS,GA8B1D;IA9BY,wDAAsB","sourcesContent":["import * as React from 'react';\n\nimport { classNamesFunction, initializeComponentRef } from '../../Utilities';\nimport { Icon } from '../../Icon';\nimport type {\n IDocumentCardStatusProps,\n IDocumentCardStatusStyleProps,\n IDocumentCardStatusStyles,\n} from './DocumentCardStatus.types';\nimport type { IProcessedStyleSet } from '../../Styling';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\nconst getClassNames = classNamesFunction<IDocumentCardStatusStyleProps, IDocumentCardStatusStyles>();\n\n/**\n * {@docCategory DocumentCard}\n */\nexport class DocumentCardStatusBase extends React.Component<IDocumentCardStatusProps, any> {\n private _classNames: IProcessedStyleSet<IDocumentCardStatusStyles>;\n\n constructor(props: IDocumentCardStatusProps) {\n super(props);\n\n initializeComponentRef(this);\n }\n\n public render(): JSXElement {\n const { statusIcon, status, styles, theme, className } = this.props;\n const iconProps = {\n iconName: statusIcon,\n styles: {\n root: { padding: '8px' },\n },\n };\n\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n\n return (\n <div className={this._classNames.root}>\n {statusIcon && <Icon {...iconProps} />}\n {status}\n </div>\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IDocumentCardStatusProps } from './DocumentCardStatus.types';
export declare const DocumentCardStatus: React.FunctionComponent<IDocumentCardStatusProps>;

Some files were not shown because too many files have changed in this diff Show More