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,13 @@
import * as React from 'react';
import type { IDialogProps } from './Dialog.types';
import type { JSXElement } from '@fluentui/utilities';
export declare class DialogBase extends React.Component<IDialogProps, {}> {
static defaultProps: IDialogProps;
private _id;
private _defaultTitleTextId;
private _defaultSubTextId;
constructor(props: IDialogProps);
render(): JSXElement;
private _getSubTextId;
private _getTitleTextId;
}
+92
View File
@@ -0,0 +1,92 @@
define(["require", "exports", "tslib", "react", "../../Utilities", "./DialogContent.types", "../../Modal", "../../ResponsiveMode", "./DialogContent"], function (require, exports, tslib_1, React, Utilities_1, DialogContent_types_1, Modal_1, ResponsiveMode_1, DialogContent_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DialogBase = void 0;
var getClassNames = (0, Utilities_1.classNamesFunction)();
var DefaultModalProps = {
isDarkOverlay: false,
isBlocking: false,
className: '',
containerClassName: '',
topOffsetFixed: false,
enableAriaHiddenSiblings: true,
};
var DefaultDialogContentProps = {
type: DialogContent_types_1.DialogType.normal,
className: '',
topButtonsProps: [],
};
// eslint-disable-next-line @typescript-eslint/no-deprecated
var DialogBase = /** @class */ (function (_super) {
tslib_1.__extends(DialogBase, _super);
function DialogBase(props) {
var _this = _super.call(this, props) || this;
_this._getSubTextId = function () {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var _a = _this.props, ariaDescribedById = _a.ariaDescribedById, modalProps = _a.modalProps, dialogContentProps = _a.dialogContentProps, subText = _a.subText;
var id = (modalProps && modalProps.subtitleAriaId) || ariaDescribedById;
if (!id) {
id = ((dialogContentProps && dialogContentProps.subText) || subText) && _this._defaultSubTextId;
}
return id;
};
_this._getTitleTextId = function () {
// eslint-disable-next-line @typescript-eslint/no-deprecated
var _a = _this.props, ariaLabelledById = _a.ariaLabelledById, modalProps = _a.modalProps, dialogContentProps = _a.dialogContentProps, title = _a.title;
var id = (modalProps && modalProps.titleAriaId) || ariaLabelledById;
if (!id) {
id = ((dialogContentProps && dialogContentProps.title) || title) && _this._defaultTitleTextId;
}
return id;
};
_this._id = (0, Utilities_1.getId)('Dialog');
_this._defaultTitleTextId = _this._id + '-title';
_this._defaultSubTextId = _this._id + '-subText';
return _this;
}
DialogBase.prototype.render = function () {
var _a, _b, _c;
var props = this.props;
var
/* eslint-disable @typescript-eslint/no-deprecated */
className = props.className, containerClassName = props.containerClassName, contentClassName = props.contentClassName, elementToFocusOnDismiss = props.elementToFocusOnDismiss, firstFocusableSelector = props.firstFocusableSelector, forceFocusInsideTrap = props.forceFocusInsideTrap, styles = props.styles, hidden = props.hidden, _d = props.disableRestoreFocus, disableRestoreFocus = _d === void 0 ? props.ignoreExternalFocusing : _d, isBlocking = props.isBlocking, isClickableOutsideFocusTrap = props.isClickableOutsideFocusTrap, isDarkOverlay = props.isDarkOverlay, _e = props.isOpen, isOpen = _e === void 0 ? !hidden : _e, onDismiss = props.onDismiss, onDismissed = props.onDismissed, onLayerDidMount = props.onLayerDidMount, responsiveMode = props.responsiveMode, subText = props.subText, theme = props.theme, title = props.title, topButtonsProps = props.topButtonsProps, type = props.type,
/* eslint-enable @typescript-eslint/no-deprecated */
minWidth = props.minWidth, maxWidth = props.maxWidth, modalProps = props.modalProps;
var mergedLayerProps = tslib_1.__assign({ onLayerDidMount: onLayerDidMount }, modalProps === null || modalProps === void 0 ? void 0 : modalProps.layerProps);
var dialogDraggableClassName;
var dragOptions;
// If dragOptions are provided, but no drag handle is specified, we supply a drag handle,
// and inform dialog contents to add class to draggable class to the header
if ((modalProps === null || modalProps === void 0 ? void 0 : modalProps.dragOptions) && !((_a = modalProps.dragOptions) === null || _a === void 0 ? void 0 : _a.dragHandleSelector)) {
// spread options to avoid mutating props
dragOptions = tslib_1.__assign({}, modalProps.dragOptions);
dialogDraggableClassName = 'ms-Dialog-draggable-header';
dragOptions.dragHandleSelector = ".".concat(dialogDraggableClassName);
}
var mergedModalProps = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, DefaultModalProps), { elementToFocusOnDismiss: elementToFocusOnDismiss, firstFocusableSelector: firstFocusableSelector, forceFocusInsideTrap: forceFocusInsideTrap, disableRestoreFocus: disableRestoreFocus, isClickableOutsideFocusTrap: isClickableOutsideFocusTrap, responsiveMode: responsiveMode, className: className, containerClassName: containerClassName, isBlocking: isBlocking, isDarkOverlay: isDarkOverlay, onDismissed: onDismissed }), modalProps), { dragOptions: dragOptions, layerProps: mergedLayerProps, isOpen: isOpen });
var dialogContentProps = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ className: contentClassName, subText: subText, title: title, topButtonsProps: topButtonsProps, type: type }, DefaultDialogContentProps), props.dialogContentProps), { draggableHeaderClassName: dialogDraggableClassName, titleProps: tslib_1.__assign({
// eslint-disable-next-line @typescript-eslint/no-deprecated
id: ((_b = props.dialogContentProps) === null || _b === void 0 ? void 0 : _b.titleId) || this._defaultTitleTextId }, (_c = props.dialogContentProps) === null || _c === void 0 ? void 0 : _c.titleProps) });
var classNames = getClassNames(styles, {
theme: theme,
className: mergedModalProps.className,
containerClassName: mergedModalProps.containerClassName,
hidden: hidden,
dialogDefaultMinWidth: minWidth,
dialogDefaultMaxWidth: maxWidth,
});
return (React.createElement(Modal_1.Modal, tslib_1.__assign({}, mergedModalProps, { className: classNames.root, containerClassName: classNames.main, onDismiss: onDismiss || mergedModalProps.onDismiss, subtitleAriaId: this._getSubTextId(), titleAriaId: this._getTitleTextId() }),
React.createElement(DialogContent_1.DialogContent, tslib_1.__assign({ subTextId: this._defaultSubTextId, showCloseButton: mergedModalProps.isBlocking, onDismiss: onDismiss }, dialogContentProps), props.children)));
};
DialogBase.defaultProps = {
hidden: true,
};
DialogBase = tslib_1.__decorate([
ResponsiveMode_1.withResponsiveMode
], DialogBase);
return DialogBase;
}(React.Component));
exports.DialogBase = DialogBase;
});
//# sourceMappingURL=Dialog.base.js.map
File diff suppressed because one or more lines are too long
+3
View File
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IDialogProps } from './Dialog.types';
export declare const Dialog: React.FunctionComponent<IDialogProps>;
+8
View File
@@ -0,0 +1,8 @@
define(["require", "exports", "../../Utilities", "./Dialog.base", "./Dialog.styles"], function (require, exports, Utilities_1, Dialog_base_1, Dialog_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Dialog = void 0;
exports.Dialog = (0, Utilities_1.styled)(Dialog_base_1.DialogBase, Dialog_styles_1.getStyles, undefined, { scope: 'Dialog' });
exports.Dialog.displayName = 'Dialog';
});
//# sourceMappingURL=Dialog.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"Dialog.js","sourceRoot":"../src/","sources":["components/Dialog/Dialog.tsx"],"names":[],"mappings":";;;;IAMa,QAAA,MAAM,GAA0C,IAAA,kBAAM,EACjE,wBAAU,EACV,yBAAS,EACT,SAAS,EACT,EAAE,KAAK,EAAE,QAAQ,EAAE,CACpB,CAAC;IACF,cAAM,CAAC,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { DialogBase } from './Dialog.base';\nimport { getStyles } from './Dialog.styles';\nimport type { IDialogProps, IDialogStyleProps, IDialogStyles } from './Dialog.types';\n\nexport const Dialog: React.FunctionComponent<IDialogProps> = styled<IDialogProps, IDialogStyleProps, IDialogStyles>(\n DialogBase,\n getStyles,\n undefined,\n { scope: 'Dialog' },\n);\nDialog.displayName = 'Dialog';\n"]}
@@ -0,0 +1,2 @@
import type { IDialogStyleProps, IDialogStyles } from './Dialog.types';
export declare const getStyles: (props: IDialogStyleProps) => IDialogStyles;
@@ -0,0 +1,35 @@
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-Dialog',
};
var getStyles = function (props) {
var _a;
var className = props.className, containerClassName = props.containerClassName, // eslint-disable-line @typescript-eslint/no-deprecated
_b = props.dialogDefaultMinWidth, // eslint-disable-line @typescript-eslint/no-deprecated
dialogDefaultMinWidth = _b === void 0 ? '288px' : _b, _c = props.dialogDefaultMaxWidth, dialogDefaultMaxWidth = _c === void 0 ? '340px' : _c, hidden = props.hidden, theme = props.theme;
var classNames = (0, Styling_1.getGlobalClassNames)(GlobalClassNames, theme);
return {
root: [classNames.root, theme.fonts.medium, className],
main: [
{
width: dialogDefaultMinWidth,
outline: '3px solid transparent',
selectors: (_a = {},
_a["@media (min-width: ".concat(Styling_1.ScreenWidthMinMedium, "px)")] = {
width: 'auto',
maxWidth: dialogDefaultMaxWidth,
minWidth: dialogDefaultMinWidth,
},
_a),
},
!hidden && { display: 'flex' },
containerClassName,
],
};
};
exports.getStyles = getStyles;
});
//# sourceMappingURL=Dialog.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Dialog.styles.js","sourceRoot":"../src/","sources":["components/Dialog/Dialog.styles.ts"],"names":[],"mappings":";;;;IAGA,IAAM,gBAAgB,GAAG;QACvB,IAAI,EAAE,WAAW;KAClB,CAAC;IAEK,IAAM,SAAS,GAAG,UAAC,KAAwB;;QAE9C,IAAA,SAAS,GAMP,KAAK,UANE,EACT,kBAAkB,GAKhB,KAAK,mBALW,EAAE,uDAAuD;QAC3E,KAIE,KAAK,sBAJwB,EADX,uDAAuD;QAC3E,qBAAqB,mBAAG,OAAO,KAAA,EAC/B,KAGE,KAAK,sBAHwB,EAA/B,qBAAqB,mBAAG,OAAO,KAAA,EAC/B,MAAM,GAEJ,KAAK,OAFD,EACN,KAAK,GACH,KAAK,MADF,CACG;QAEV,IAAM,UAAU,GAAG,IAAA,6BAAmB,EAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;QAEhE,OAAO;YACL,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC;YAEtD,IAAI,EAAE;gBACJ;oBACE,KAAK,EAAE,qBAAqB;oBAC5B,OAAO,EAAE,uBAAuB;oBAEhC,SAAS;wBACP,GAAC,6BAAsB,8BAAoB,QAAK,IAAG;4BACjD,KAAK,EAAE,MAAM;4BACb,QAAQ,EAAE,qBAAqB;4BAC/B,QAAQ,EAAE,qBAAqB;yBAChC;2BACF;iBACF;gBACD,CAAC,MAAM,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE;gBAC9B,kBAAkB;aACnB;SACF,CAAC;IACJ,CAAC,CAAC;IAhCW,QAAA,SAAS,aAgCpB","sourcesContent":["import { ScreenWidthMinMedium, getGlobalClassNames } from '../../Styling';\nimport type { IDialogStyleProps, IDialogStyles } from './Dialog.types';\n\nconst GlobalClassNames = {\n root: 'ms-Dialog',\n};\n\nexport const getStyles = (props: IDialogStyleProps): IDialogStyles => {\n const {\n className,\n containerClassName, // eslint-disable-line @typescript-eslint/no-deprecated\n dialogDefaultMinWidth = '288px',\n dialogDefaultMaxWidth = '340px',\n hidden,\n theme,\n } = props;\n\n const classNames = getGlobalClassNames(GlobalClassNames, theme);\n\n return {\n root: [classNames.root, theme.fonts.medium, className],\n\n main: [\n {\n width: dialogDefaultMinWidth,\n outline: '3px solid transparent',\n\n selectors: {\n [`@media (min-width: ${ScreenWidthMinMedium}px)`]: {\n width: 'auto',\n maxWidth: dialogDefaultMaxWidth,\n minWidth: dialogDefaultMinWidth,\n },\n },\n },\n !hidden && { display: 'flex' },\n containerClassName,\n ],\n };\n};\n"]}
@@ -0,0 +1,190 @@
import * as React from 'react';
import { DialogBase } from './Dialog.base';
import { DialogType } from './DialogContent.types';
import type { IModalProps } from '../../Modal';
import type { IDialogContentProps } from './DialogContent.types';
import type { IButtonProps } from '../../Button';
import type { IWithResponsiveModeState } from '../../ResponsiveMode';
import type { IAccessiblePopupProps } from '../../common/IAccessiblePopupProps';
import type { IStyle, ITheme } from '../../Styling';
import type { IRefObject, IStyleFunctionOrObject } from '../../Utilities';
import type { ICSSRule, ICSSPixelUnitRule } from '@fluentui/merge-styles';
import type { JSXElement } from '@fluentui/utilities';
/**
* {@docCategory Dialog}
*/
export interface IDialog {
}
/**
* {@docCategory Dialog}
*/
export interface IDialogProps extends React.ClassAttributes<DialogBase>, IWithResponsiveModeState, IAccessiblePopupProps {
children?: React.ReactNode;
/**
* @deprecated Unused, returns no value
*/
componentRef?: IRefObject<IDialog>;
/**
* Call to provide customized styling that will layer on top of the variant rules
*/
styles?: IStyleFunctionOrObject<IDialogStyleProps, IDialogStyles>;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Props to be passed through to Dialog Content
*/
dialogContentProps?: IDialogContentProps;
/**
* A callback function for when the Dialog is dismissed from the close button or light dismiss.
* Can also be specified separately in content and modal.
*/
onDismiss?: (ev?: React.MouseEvent<HTMLButtonElement>) => any;
/**
* Whether the dialog is hidden.
* @defaultvalue true
*/
hidden?: boolean;
/**
* Props to be passed through to Modal
*/
modalProps?: IModalProps;
/**
* Whether the dialog is displayed.
* @defaultvalue false
* @deprecated Use `hidden` instead
*/
isOpen?: boolean;
/**
* Whether the overlay is dark themed.
* @defaultvalue true
* @deprecated Pass through via `modalProps` instead
*/
isDarkOverlay?: boolean;
/**
* A callback function which is called after the Dialog is dismissed and the animation is complete.
* @deprecated Pass through via `modalProps` instead
*/
onDismissed?: () => any;
/**
* Whether the dialog can be light dismissed by clicking outside the dialog (on the overlay).
* @defaultvalue false
* @deprecated Pass through via `modalProps` instead
*/
isBlocking?: boolean;
/**
* Optional class name to be added to the root class
* @deprecated Pass through via `modalProps.className` instead
*/
className?: string;
/**
* Optional override for container class
* @deprecated Pass through via `modalProps.className` instead
*/
containerClassName?: string;
/**
* A callback function for when the Dialog content is mounted on the overlay layer
* @deprecated Pass through via `modalProps.layerProps` instead
*/
onLayerDidMount?: () => void;
/**
* Deprecated at 0.81.2.
* @deprecated Use `onLayerDidMount` instead.
*/
onLayerMounted?: () => void;
/**
* The type of Dialog to display.
* @defaultvalue DialogType.normal
* @deprecated Pass through via `dialogContentProps` instead.
*/
type?: DialogType;
/**
* The title text to display at the top of the dialog.
* @deprecated Pass through via `dialogContentProps` instead.
*/
title?: string | JSXElement;
/**
* The subtext to display in the dialog.
* @deprecated Pass through via `dialogContentProps` instead.
*/
subText?: string;
/**
* Optional override content class
* @deprecated Pass through via `dialogContentProps` instead as `className`.
*/
contentClassName?: string;
/**
* Other top buttons that will show up next to the close button
* @deprecated Pass through via `dialogContentProps` instead.
*/
topButtonsProps?: IButtonProps[];
/**
* Optional id for aria-LabelledBy
* @deprecated Pass through via `modalProps.titleAriaId` instead.
*/
ariaLabelledById?: string;
/**
* Optional id for aria-DescribedBy
* @deprecated Pass through via `modalProps.subtitleAriaId` instead.
*/
ariaDescribedById?: string;
/**
* Sets the minimum width of the dialog. It limits the width property to be not
* smaller than the value specified in min-width.
*/
minWidth?: ICSSRule | ICSSPixelUnitRule;
/**
* Sets the maximum width for the dialog. It limits the width property to be larger
* than the value specified in max-width.
*/
maxWidth?: ICSSRule | ICSSPixelUnitRule;
}
/**
* {@docCategory Dialog}
*/
export interface IDialogStyleProps {
/**
* Accept theme prop.
*/
theme: ITheme;
/**
* Accept custom classNames
*/
className?: string;
/**
* Optional override for container class
* @deprecated Pass through via `modalProps.className` instead.
*/
containerClassName?: string;
/**
* Optional override content class
* @deprecated Pass through via `dialogContentProps` instead as `className`.
*/
contentClassName?: string;
/**
* Whether the dialog is hidden.
* @defaultvalue false
*/
hidden?: boolean;
/**
* Default min-width for the dialog box.
* @defaultvalue '288px'
*/
dialogDefaultMinWidth?: string | ICSSRule | ICSSPixelUnitRule;
/**
* Default max-width for the dialog box.
* @defaultvalue '340px'
*/
dialogDefaultMaxWidth?: string | ICSSRule | ICSSPixelUnitRule;
}
/**
* {@docCategory Dialog}
*/
export interface IDialogStyles {
/**
* Style for the root element.
*/
root: IStyle;
main: IStyle;
}
@@ -0,0 +1,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=Dialog.types.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,9 @@
import * as React from 'react';
import type { IDialogContentProps } from './DialogContent.types';
import type { JSXElement } from '@fluentui/utilities';
export declare class DialogContentBase extends React.Component<IDialogContentProps, {}> {
static defaultProps: IDialogContentProps;
constructor(props: IDialogContentProps);
render(): JSXElement;
private _groupChildren;
}
@@ -0,0 +1,78 @@
define(["require", "exports", "tslib", "react", "../../Utilities", "./DialogContent.types", "../../Button", "./DialogFooter", "../../ResponsiveMode"], function (require, exports, tslib_1, React, Utilities_1, DialogContent_types_1, Button_1, DialogFooter_1, ResponsiveMode_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DialogContentBase = void 0;
var getClassNames = (0, Utilities_1.classNamesFunction)();
var DialogFooterType = (React.createElement(DialogFooter_1.DialogFooter, null)).type;
var COMPONENT_NAME = 'DialogContent';
// eslint-disable-next-line @typescript-eslint/no-deprecated
var DialogContentBase = /** @class */ (function (_super) {
tslib_1.__extends(DialogContentBase, _super);
function DialogContentBase(props) {
var _this = _super.call(this, props) || this;
(0, Utilities_1.initializeComponentRef)(_this);
(0, Utilities_1.warnDeprecations)(COMPONENT_NAME, props, {
titleId: 'titleProps.id',
});
return _this;
}
DialogContentBase.prototype.render = function () {
var _a = this.props, showCloseButton = _a.showCloseButton, className = _a.className, closeButtonAriaLabel = _a.closeButtonAriaLabel, onDismiss = _a.onDismiss, subTextId = _a.subTextId, subText = _a.subText, _b = _a.titleProps, titleProps = _b === void 0 ? {} : _b,
// eslint-disable-next-line @typescript-eslint/no-deprecated
titleId = _a.titleId, title = _a.title, type = _a.type, styles = _a.styles, theme = _a.theme, draggableHeaderClassName = _a.draggableHeaderClassName;
var classNames = getClassNames(styles, {
theme: theme,
className: className,
isLargeHeader: type === DialogContent_types_1.DialogType.largeHeader,
isClose: type === DialogContent_types_1.DialogType.close,
draggableHeaderClassName: draggableHeaderClassName,
});
var groupings = this._groupChildren();
var subTextContent;
if (subText) {
subTextContent = (React.createElement("p", { className: classNames.subText, id: subTextId }, subText));
}
return (React.createElement("div", { className: classNames.content },
React.createElement("div", { className: classNames.header },
React.createElement("div", tslib_1.__assign({ id: titleId, role: "heading", "aria-level": 1 }, titleProps, { className: (0, Utilities_1.css)(classNames.title, titleProps.className) }), title),
React.createElement("div", { className: classNames.topButton },
this.props.topButtonsProps.map(function (props, index) { return (React.createElement(Button_1.IconButton, tslib_1.__assign({ key: props.uniqueId || index }, props))); }),
(type === DialogContent_types_1.DialogType.close || (showCloseButton && type !== DialogContent_types_1.DialogType.largeHeader)) && (React.createElement(Button_1.IconButton, { className: classNames.button, iconProps: { iconName: 'Cancel' }, ariaLabel: closeButtonAriaLabel, onClick: onDismiss })))),
React.createElement("div", { className: classNames.inner },
React.createElement("div", { className: classNames.innerContent },
subTextContent,
groupings.contents),
groupings.footers)));
};
// @TODO - typing the footers as an array of DialogFooter is difficult because
// casing "child as DialogFooter" causes a problem because
// "Neither type 'ReactElement<any>' nor type 'DialogFooter' is assignable to the other."
DialogContentBase.prototype._groupChildren = function () {
var groupings = {
footers: [],
contents: [],
};
React.Children.map(this.props.children, function (child) {
if (typeof child === 'object' && child !== null && child.type === DialogFooterType) {
groupings.footers.push(child);
}
else {
groupings.contents.push(child);
}
});
return groupings;
};
DialogContentBase.defaultProps = {
showCloseButton: false,
className: '',
topButtonsProps: [],
closeButtonAriaLabel: 'Close',
};
DialogContentBase = tslib_1.__decorate([
ResponsiveMode_1.withResponsiveMode
], DialogContentBase);
return DialogContentBase;
}(React.Component));
exports.DialogContentBase = DialogContentBase;
});
//# sourceMappingURL=DialogContent.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 { IDialogContentProps } from './DialogContent.types';
export declare const DialogContent: React.FunctionComponent<IDialogContentProps>;
@@ -0,0 +1,8 @@
define(["require", "exports", "../../Utilities", "./DialogContent.base", "./DialogContent.styles"], function (require, exports, Utilities_1, DialogContent_base_1, DialogContent_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DialogContent = void 0;
exports.DialogContent = (0, Utilities_1.styled)(DialogContent_base_1.DialogContentBase, DialogContent_styles_1.getStyles, undefined, { scope: 'DialogContent' });
exports.DialogContent.displayName = 'DialogContent';
});
//# sourceMappingURL=DialogContent.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DialogContent.js","sourceRoot":"../src/","sources":["components/Dialog/DialogContent.tsx"],"names":[],"mappings":";;;;IAMa,QAAA,aAAa,GAAiD,IAAA,kBAAM,EAI/E,sCAAiB,EAAE,gCAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;IAEvE,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { DialogContentBase } from './DialogContent.base';\nimport { getStyles } from './DialogContent.styles';\nimport type { IDialogContentProps, IDialogContentStyleProps, IDialogContentStyles } from './DialogContent.types';\n\nexport const DialogContent: React.FunctionComponent<IDialogContentProps> = styled<\n IDialogContentProps,\n IDialogContentStyleProps,\n IDialogContentStyles\n>(DialogContentBase, getStyles, undefined, { scope: 'DialogContent' });\n\nDialogContent.displayName = 'DialogContent';\n"]}
@@ -0,0 +1,2 @@
import type { IDialogContentStyleProps, IDialogContentStyles } from './DialogContent.types';
export declare const getStyles: (props: IDialogContentStyleProps) => IDialogContentStyles;
@@ -0,0 +1,142 @@
define(["require", "exports", "../../Styling"], function (require, exports, Styling_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = void 0;
var GlobalClassNames = {
contentLgHeader: 'ms-Dialog-lgHeader',
close: 'ms-Dialog--close',
subText: 'ms-Dialog-subText',
header: 'ms-Dialog-header',
headerLg: 'ms-Dialog--lgHeader',
button: 'ms-Dialog-button ms-Dialog-button--close',
inner: 'ms-Dialog-inner',
content: 'ms-Dialog-content',
title: 'ms-Dialog-title',
};
var getStyles = function (props) {
var _a, _b, _c;
var className = props.className, theme = props.theme, isLargeHeader = props.isLargeHeader, isClose = props.isClose, hidden = props.hidden, isMultiline = props.isMultiline, draggableHeaderClassName = props.draggableHeaderClassName;
var palette = theme.palette, fonts = theme.fonts, effects = theme.effects, semanticColors = theme.semanticColors;
var classNames = (0, Styling_1.getGlobalClassNames)(GlobalClassNames, theme);
return {
content: [
isLargeHeader && [
classNames.contentLgHeader,
{
borderTop: "4px solid ".concat(palette.themePrimary),
},
],
isClose && classNames.close,
{
flexGrow: 1,
overflowY: 'hidden', // required for allowScrollOnElement
},
className,
],
subText: [
classNames.subText,
fonts.medium,
{
margin: '0 0 24px 0',
color: semanticColors.bodySubtext,
lineHeight: '1.5',
wordWrap: 'break-word',
fontWeight: Styling_1.FontWeights.regular,
},
],
header: [
classNames.header,
{
position: 'relative',
width: '100%',
boxSizing: 'border-box',
},
isClose && classNames.close,
draggableHeaderClassName && [
draggableHeaderClassName,
{
cursor: 'move',
},
],
],
button: [
classNames.button,
hidden && {
selectors: {
'.ms-Icon.ms-Icon--Cancel': {
color: semanticColors.buttonText,
fontSize: Styling_1.IconFontSizes.medium,
},
},
},
],
inner: [
classNames.inner,
{
padding: '0 24px 24px',
selectors: (_a = {},
_a["@media (min-width: ".concat(Styling_1.ScreenWidthMinSmall, "px) and (max-width: ").concat(Styling_1.ScreenWidthMaxSmall, "px)")] = {
padding: '0 16px 16px',
},
_a),
},
],
innerContent: [
classNames.content,
{
position: 'relative',
width: '100%',
},
],
title: [
classNames.title,
fonts.xLarge,
{
color: semanticColors.bodyText,
margin: '0',
minHeight: fonts.xLarge.fontSize,
padding: '16px 46px 20px 24px',
lineHeight: 'normal',
selectors: (_b = {},
_b["@media (min-width: ".concat(Styling_1.ScreenWidthMinSmall, "px) and (max-width: ").concat(Styling_1.ScreenWidthMaxSmall, "px)")] = {
padding: '16px 46px 16px 16px',
},
_b),
},
isLargeHeader && {
color: semanticColors.menuHeader,
},
isMultiline && { fontSize: fonts.xxLarge.fontSize },
],
topButton: [
{
display: 'flex',
flexDirection: 'row',
flexWrap: 'nowrap',
position: 'absolute',
top: '0',
right: '0',
padding: '15px 15px 0 0',
selectors: (_c = {
'> *': {
flex: '0 0 auto',
},
'.ms-Dialog-button': {
color: semanticColors.buttonText,
},
'.ms-Dialog-button:hover': {
color: semanticColors.buttonTextHovered,
borderRadius: effects.roundedCorner2,
}
},
_c["@media (min-width: ".concat(Styling_1.ScreenWidthMinSmall, "px) and (max-width: ").concat(Styling_1.ScreenWidthMaxSmall, "px)")] = {
padding: '15px 8px 0 0',
},
_c),
},
],
};
};
exports.getStyles = getStyles;
});
//# sourceMappingURL=DialogContent.styles.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,142 @@
import * as React from 'react';
import { DialogContentBase } from './DialogContent.base';
import { ResponsiveMode } from '../../ResponsiveMode';
import type { IButtonProps } from '../../Button';
import type { IStyle, ITheme } from '../../Styling';
import type { IRefObject, IStyleFunctionOrObject } from '../../Utilities';
import type { JSXElement } from '@fluentui/utilities';
/**
* {@docCategory Dialog}
*/
export interface IDialogContent {
}
/**
* {@docCategory Dialog}
*/
export interface IDialogContentProps extends React.ClassAttributes<DialogContentBase> {
children?: React.ReactNode;
/**
* Optional callback to access the IDialogContent interface. Use this instead of ref for accessing
* the public methods and properties of the component.
*/
componentRef?: IRefObject<IDialogContent>;
/**
* Call to provide customized styling that will layer on top of the variant rules
*/
styles?: IStyleFunctionOrObject<IDialogContentStyleProps, IDialogContentStyles>;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Is inside a multiline wrapper
*/
isMultiline?: boolean;
/**
* Show an 'x' close button in the upper-right corner
*/
showCloseButton?: boolean;
/**
* Other top buttons that will show up next to the close button
*/
topButtonsProps?: IButtonProps[];
/**
* Optional override class name
*/
className?: string;
/**
* Callback for when the Dialog is dismissed from the close button or light dismiss, before the animation completes.
*/
onDismiss?: (ev?: React.MouseEvent<HTMLButtonElement>) => any;
/**
* The Id for subText container
*/
subTextId?: string;
/**
* The subtext to display in the dialog
*/
subText?: string;
/**
* The Id for title container
*
* @deprecated use the `id` attribute in `titleProps` instead.
*/
titleId?: string;
/**
* The title text to display at the top of the dialog.
*/
title?: string | JSXElement;
/**
* The props for title container.
*/
titleProps?: React.HTMLAttributes<HTMLDivElement>;
/**
* Responsive mode passed in from decorator.
*/
responsiveMode?: ResponsiveMode;
/**
* Label to be passed to to aria-label of close button
* @defaultvalue Close
*/
closeButtonAriaLabel?: string;
/**
* The type of Dialog to display.
* @defaultvalue DialogType.normal
*/
type?: DialogType;
/**
* The classname for when the header is draggable
*/
draggableHeaderClassName?: string;
}
/**
* {@docCategory Dialog}
*/
export declare enum DialogType {
/** Standard dialog */
normal = 0,
/** Dialog with large header banner */
largeHeader = 1,
/** Dialog with an 'x' close button in the upper-right corner */
close = 2
}
/**
* {@docCategory Dialog}
*/
export interface IDialogContentStyleProps {
/**
* Accept theme prop.
*/
theme: ITheme;
/**
* Accept custom classNames
*/
className?: string;
isLargeHeader?: boolean;
isClose?: boolean;
hidden?: boolean;
/**
* Is inside a multiline wrapper
*/
isMultiline?: boolean;
/**
* The classname for when the header is draggable
*/
draggableHeaderClassName?: string;
}
/**
* {@docCategory Dialog}
*/
export interface IDialogContentStyles {
/**
* Style for the content element.
*/
content: IStyle;
subText: IStyle;
header: IStyle;
button: IStyle;
inner: IStyle;
innerContent: IStyle;
title: IStyle;
topButton: IStyle;
}
@@ -0,0 +1,18 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DialogType = void 0;
/**
* {@docCategory Dialog}
*/
var DialogType;
(function (DialogType) {
/** Standard dialog */
DialogType[DialogType["normal"] = 0] = "normal";
/** Dialog with large header banner */
DialogType[DialogType["largeHeader"] = 1] = "largeHeader";
/** Dialog with an 'x' close button in the upper-right corner */
DialogType[DialogType["close"] = 2] = "close";
})(DialogType || (exports.DialogType = DialogType = {}));
});
//# sourceMappingURL=DialogContent.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DialogContent.types.js","sourceRoot":"../src/","sources":["components/Dialog/DialogContent.types.ts"],"names":[],"mappings":";;;;IAgHA;;OAEG;IACH,IAAY,UAOX;IAPD,WAAY,UAAU;QACpB,sBAAsB;QACtB,+CAAU,CAAA;QACV,sCAAsC;QACtC,yDAAe,CAAA;QACf,gEAAgE;QAChE,6CAAS,CAAA;IACX,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB","sourcesContent":["import * as React from 'react';\nimport { DialogContentBase } from './DialogContent.base';\nimport { ResponsiveMode } from '../../ResponsiveMode';\nimport type { IButtonProps } from '../../Button';\nimport type { IStyle, ITheme } from '../../Styling';\nimport type { IRefObject, IStyleFunctionOrObject } from '../../Utilities';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\n/**\n * {@docCategory Dialog}\n */\nexport interface IDialogContent {}\n\n/**\n * {@docCategory Dialog}\n */\nexport interface IDialogContentProps extends React.ClassAttributes<DialogContentBase> {\n children?: React.ReactNode;\n\n /**\n * Optional callback to access the IDialogContent interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: IRefObject<IDialogContent>;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: IStyleFunctionOrObject<IDialogContentStyleProps, IDialogContentStyles>;\n\n /**\n * Theme provided by HOC.\n */\n theme?: ITheme;\n\n /**\n * Is inside a multiline wrapper\n */\n isMultiline?: boolean;\n\n /**\n * Show an 'x' close button in the upper-right corner\n */\n showCloseButton?: boolean;\n\n /**\n * Other top buttons that will show up next to the close button\n */\n topButtonsProps?: IButtonProps[];\n\n /**\n * Optional override class name\n */\n className?: string;\n\n /**\n * Callback for when the Dialog is dismissed from the close button or light dismiss, before the animation completes.\n */\n onDismiss?: (ev?: React.MouseEvent<HTMLButtonElement>) => any;\n\n /**\n * The Id for subText container\n */\n subTextId?: string;\n\n /**\n * The subtext to display in the dialog\n */\n subText?: string;\n\n /**\n * The Id for title container\n *\n * @deprecated use the `id` attribute in `titleProps` instead.\n */\n titleId?: string;\n\n /**\n * The title text to display at the top of the dialog.\n */\n\n title?: string | JSXElement;\n\n /**\n * The props for title container.\n */\n titleProps?: React.HTMLAttributes<HTMLDivElement>;\n\n /**\n * Responsive mode passed in from decorator.\n */\n responsiveMode?: ResponsiveMode;\n\n /**\n * Label to be passed to to aria-label of close button\n * @defaultvalue Close\n */\n closeButtonAriaLabel?: string;\n\n /**\n * The type of Dialog to display.\n * @defaultvalue DialogType.normal\n */\n type?: DialogType;\n\n /**\n * The classname for when the header is draggable\n */\n draggableHeaderClassName?: string;\n}\n\n/**\n * {@docCategory Dialog}\n */\nexport enum DialogType {\n /** Standard dialog */\n normal = 0,\n /** Dialog with large header banner */\n largeHeader = 1,\n /** Dialog with an 'x' close button in the upper-right corner */\n close = 2,\n}\n\n/**\n * {@docCategory Dialog}\n */\nexport interface IDialogContentStyleProps {\n /**\n * Accept theme prop.\n */\n theme: ITheme;\n\n /**\n * Accept custom classNames\n */\n className?: string;\n\n isLargeHeader?: boolean;\n isClose?: boolean;\n hidden?: boolean;\n\n /**\n * Is inside a multiline wrapper\n */\n isMultiline?: boolean;\n\n /**\n * The classname for when the header is draggable\n */\n draggableHeaderClassName?: string;\n}\n\n/**\n * {@docCategory Dialog}\n */\nexport interface IDialogContentStyles {\n /**\n * Style for the content element.\n */\n content: IStyle;\n subText: IStyle;\n header: IStyle;\n button: IStyle;\n inner: IStyle;\n innerContent: IStyle;\n title: IStyle;\n topButton: IStyle;\n}\n"]}
@@ -0,0 +1,9 @@
import * as React from 'react';
import type { IDialogFooterProps } from './DialogFooter.types';
import type { JSXElement } from '@fluentui/utilities';
export declare class DialogFooterBase extends React.Component<IDialogFooterProps, {}> {
private _classNames;
constructor(props: IDialogFooterProps);
render(): JSXElement;
private _renderChildrenAsActions;
}
@@ -0,0 +1,32 @@
define(["require", "exports", "tslib", "react", "../../Utilities"], function (require, exports, tslib_1, React, Utilities_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DialogFooterBase = void 0;
var getClassNames = (0, Utilities_1.classNamesFunction)();
var DialogFooterBase = /** @class */ (function (_super) {
tslib_1.__extends(DialogFooterBase, _super);
function DialogFooterBase(props) {
var _this = _super.call(this, props) || this;
(0, Utilities_1.initializeComponentRef)(_this);
return _this;
}
DialogFooterBase.prototype.render = function () {
var _a = this.props, className = _a.className, styles = _a.styles, theme = _a.theme;
this._classNames = getClassNames(styles, {
theme: theme,
className: className,
});
return (React.createElement("div", { className: this._classNames.actions },
React.createElement("div", { className: this._classNames.actionsRight }, this._renderChildrenAsActions())));
};
DialogFooterBase.prototype._renderChildrenAsActions = function () {
var _this = this;
return React.Children.map(this.props.children, function (child) {
return child ? React.createElement("span", { className: _this._classNames.action }, child) : null;
});
};
return DialogFooterBase;
}(React.Component));
exports.DialogFooterBase = DialogFooterBase;
});
//# sourceMappingURL=DialogFooter.base.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DialogFooter.base.js","sourceRoot":"../src/","sources":["components/Dialog/DialogFooter.base.tsx"],"names":[],"mappings":";;;;IAOA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAgD,CAAC;IAEzF;QAAsC,4CAAuC;QAG3E,0BAAY,KAAyB;YACnC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAEb,IAAA,kCAAsB,EAAC,KAAI,CAAC,CAAC;;QAC/B,CAAC;QAEM,iCAAM,GAAb;YACQ,IAAA,KAA+B,IAAI,CAAC,KAAK,EAAvC,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAe,CAAC;YAEhD,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,OAAO;gBACtC,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,YAAY,IAAG,IAAI,CAAC,wBAAwB,EAAE,CAAO,CAClF,CACP,CAAC;QACJ,CAAC;QAEO,mDAAwB,GAAhC;YAAA,iBAIC;YAHC,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAA,KAAK;gBAClD,OAAA,KAAK,CAAC,CAAC,CAAC,8BAAM,SAAS,EAAE,KAAI,CAAC,WAAW,CAAC,MAAM,IAAG,KAAK,CAAQ,CAAC,CAAC,CAAC,IAAI;YAAvE,CAAuE,CACxE,CAAC;QACJ,CAAC;QACH,uBAAC;IAAD,CAAC,AA7BD,CAAsC,KAAK,CAAC,SAAS,GA6BpD;IA7BY,4CAAgB","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, initializeComponentRef } from '../../Utilities';\nimport type { IDialogFooterProps, IDialogFooterStyleProps, IDialogFooterStyles } from './DialogFooter.types';\nimport type { IProcessedStyleSet } from '../../Styling';\n\nimport type { JSXElement } from '@fluentui/utilities';\n\nconst getClassNames = classNamesFunction<IDialogFooterStyleProps, IDialogFooterStyles>();\n\nexport class DialogFooterBase extends React.Component<IDialogFooterProps, {}> {\n private _classNames: IProcessedStyleSet<IDialogFooterStyles>;\n\n constructor(props: IDialogFooterProps) {\n super(props);\n\n initializeComponentRef(this);\n }\n\n public render(): JSXElement {\n const { className, styles, theme } = this.props;\n\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n\n return (\n <div className={this._classNames.actions}>\n <div className={this._classNames.actionsRight}>{this._renderChildrenAsActions()}</div>\n </div>\n );\n }\n\n private _renderChildrenAsActions(): (JSXElement | null)[] | null | undefined {\n return React.Children.map(this.props.children, child =>\n child ? <span className={this._classNames.action}>{child}</span> : null,\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IDialogFooterProps } from './DialogFooter.types';
export declare const DialogFooter: React.FunctionComponent<IDialogFooterProps>;
@@ -0,0 +1,8 @@
define(["require", "exports", "../../Utilities", "./DialogFooter.base", "./DialogFooter.styles"], function (require, exports, Utilities_1, DialogFooter_base_1, DialogFooter_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DialogFooter = void 0;
exports.DialogFooter = (0, Utilities_1.styled)(DialogFooter_base_1.DialogFooterBase, DialogFooter_styles_1.getStyles, undefined, { scope: 'DialogFooter' });
exports.DialogFooter.displayName = 'DialogFooter';
});
//# sourceMappingURL=DialogFooter.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DialogFooter.js","sourceRoot":"../src/","sources":["components/Dialog/DialogFooter.tsx"],"names":[],"mappings":";;;;IAMa,QAAA,YAAY,GAAgD,IAAA,kBAAM,EAI7E,oCAAgB,EAAE,+BAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC;IAErE,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { DialogFooterBase } from './DialogFooter.base';\nimport { getStyles } from './DialogFooter.styles';\nimport type { IDialogFooterProps, IDialogFooterStyleProps, IDialogFooterStyles } from './DialogFooter.types';\n\nexport const DialogFooter: React.FunctionComponent<IDialogFooterProps> = styled<\n IDialogFooterProps,\n IDialogFooterStyleProps,\n IDialogFooterStyles\n>(DialogFooterBase, getStyles, undefined, { scope: 'DialogFooter' });\n\nDialogFooter.displayName = 'DialogFooter';\n"]}
@@ -0,0 +1,2 @@
import type { IDialogFooterStyleProps, IDialogFooterStyles } from './DialogFooter.types';
export declare const getStyles: (props: IDialogFooterStyleProps) => IDialogFooterStyles;
@@ -0,0 +1,52 @@
define(["require", "exports", "../../Styling"], function (require, exports, Styling_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = void 0;
var GlobalClassNames = {
actions: 'ms-Dialog-actions',
action: 'ms-Dialog-action',
actionsRight: 'ms-Dialog-actionsRight',
};
var getStyles = function (props) {
var className = props.className, theme = props.theme;
var classNames = (0, Styling_1.getGlobalClassNames)(GlobalClassNames, theme);
return {
actions: [
classNames.actions,
{
position: 'relative',
width: '100%',
minHeight: '24px',
lineHeight: '24px',
margin: '16px 0 0',
fontSize: '0',
selectors: {
'.ms-Button': {
lineHeight: 'normal',
verticalAlign: 'middle',
},
},
},
className,
],
action: [
classNames.action,
{
margin: '0 4px',
},
],
actionsRight: [
classNames.actionsRight,
{
alignItems: 'center',
display: 'flex',
fontSize: '0',
justifyContent: 'flex-end',
marginRight: '-4px',
},
],
};
};
exports.getStyles = getStyles;
});
//# sourceMappingURL=DialogFooter.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DialogFooter.styles.js","sourceRoot":"../src/","sources":["components/Dialog/DialogFooter.styles.ts"],"names":[],"mappings":";;;;IAGA,IAAM,gBAAgB,GAAG;QACvB,OAAO,EAAE,mBAAmB;QAC5B,MAAM,EAAE,kBAAkB;QAC1B,YAAY,EAAE,wBAAwB;KACvC,CAAC;IAEK,IAAM,SAAS,GAAG,UAAC,KAA8B;QAC9C,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,OAAO,EAAE;gBACP,UAAU,CAAC,OAAO;gBAClB;oBACE,QAAQ,EAAE,UAAU;oBACpB,KAAK,EAAE,MAAM;oBACb,SAAS,EAAE,MAAM;oBACjB,UAAU,EAAE,MAAM;oBAClB,MAAM,EAAE,UAAU;oBAClB,QAAQ,EAAE,GAAG;oBAEb,SAAS,EAAE;wBACT,YAAY,EAAE;4BACZ,UAAU,EAAE,QAAQ;4BACpB,aAAa,EAAE,QAAQ;yBACxB;qBACF;iBACF;gBACD,SAAS;aACV;YAED,MAAM,EAAE;gBACN,UAAU,CAAC,MAAM;gBACjB;oBACE,MAAM,EAAE,OAAO;iBAChB;aACF;YAED,YAAY,EAAE;gBACZ,UAAU,CAAC,YAAY;gBACvB;oBACE,UAAU,EAAE,QAAQ;oBACpB,OAAO,EAAE,MAAM;oBACf,QAAQ,EAAE,GAAG;oBACb,cAAc,EAAE,UAAU;oBAC1B,WAAW,EAAE,MAAM;iBACpB;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IA5CW,QAAA,SAAS,aA4CpB","sourcesContent":["import { getGlobalClassNames } from '../../Styling';\nimport type { IDialogFooterStyleProps, IDialogFooterStyles } from './DialogFooter.types';\n\nconst GlobalClassNames = {\n actions: 'ms-Dialog-actions',\n action: 'ms-Dialog-action',\n actionsRight: 'ms-Dialog-actionsRight',\n};\n\nexport const getStyles = (props: IDialogFooterStyleProps): IDialogFooterStyles => {\n const { className, theme } = props;\n\n const classNames = getGlobalClassNames(GlobalClassNames, theme);\n\n return {\n actions: [\n classNames.actions,\n {\n position: 'relative',\n width: '100%',\n minHeight: '24px',\n lineHeight: '24px',\n margin: '16px 0 0',\n fontSize: '0',\n\n selectors: {\n '.ms-Button': {\n lineHeight: 'normal',\n verticalAlign: 'middle',\n },\n },\n },\n className,\n ],\n\n action: [\n classNames.action,\n {\n margin: '0 4px',\n },\n ],\n\n actionsRight: [\n classNames.actionsRight,\n {\n alignItems: 'center',\n display: 'flex',\n fontSize: '0',\n justifyContent: 'flex-end',\n marginRight: '-4px',\n },\n ],\n };\n};\n"]}
@@ -0,0 +1,55 @@
import * as React from 'react';
import { DialogFooterBase } from './DialogFooter.base';
import type { IStyle, ITheme } from '../../Styling';
import type { IReactProps, IRefObject, IStyleFunctionOrObject } from '../../Utilities';
/**
* {@docCategory Dialog}
*/
export interface IDialogFooter {
}
/**
* {@docCategory Dialog}
*/
export interface IDialogFooterProps extends IReactProps<DialogFooterBase> {
children?: React.ReactNode;
/**
* Gets the component ref.
*/
componentRef?: IRefObject<IDialogFooter>;
/**
* Call to provide customized styling that will layer on top of the variant rules
*/
styles?: IStyleFunctionOrObject<IDialogFooterStyleProps, IDialogFooterStyles>;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory Dialog}
*/
export interface IDialogFooterStyleProps {
/**
* Accept theme prop.
*/
theme: ITheme;
/**
* Optional override class name
*/
className?: string;
}
/**
* {@docCategory Dialog}
*/
export interface IDialogFooterStyles {
/**
* Style for the actions element.
*/
actions: IStyle;
actionsRight: IStyle;
action: IStyle;
}
@@ -0,0 +1,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=DialogFooter.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DialogFooter.types.js","sourceRoot":"../src/","sources":["components/Dialog/DialogFooter.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { DialogFooterBase } from './DialogFooter.base';\nimport type { IStyle, ITheme } from '../../Styling';\nimport type { IReactProps, IRefObject, IStyleFunctionOrObject } from '../../Utilities';\n\n/**\n * {@docCategory Dialog}\n */\nexport interface IDialogFooter {}\n\n/**\n * {@docCategory Dialog}\n */\nexport interface IDialogFooterProps extends IReactProps<DialogFooterBase> {\n children?: React.ReactNode;\n\n /**\n * Gets the component ref.\n */\n componentRef?: IRefObject<IDialogFooter>;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules\n */\n styles?: IStyleFunctionOrObject<IDialogFooterStyleProps, IDialogFooterStyles>;\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 Dialog}\n */\nexport interface IDialogFooterStyleProps {\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 Dialog}\n */\nexport interface IDialogFooterStyles {\n /**\n * Style for the actions element.\n */\n actions: IStyle;\n\n actionsRight: IStyle;\n action: IStyle;\n}\n"]}
+9
View File
@@ -0,0 +1,9 @@
export * from './Dialog';
export * from './Dialog.base';
export * from './DialogContent';
export * from './DialogContent.base';
export * from './DialogFooter';
export * from './DialogFooter.base';
export * from './Dialog.types';
export * from './DialogContent.types';
export * from './DialogFooter.types';
+14
View File
@@ -0,0 +1,14 @@
define(["require", "exports", "tslib", "./Dialog", "./Dialog.base", "./DialogContent", "./DialogContent.base", "./DialogFooter", "./DialogFooter.base", "./Dialog.types", "./DialogContent.types", "./DialogFooter.types"], function (require, exports, tslib_1, Dialog_1, Dialog_base_1, DialogContent_1, DialogContent_base_1, DialogFooter_1, DialogFooter_base_1, Dialog_types_1, DialogContent_types_1, DialogFooter_types_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
tslib_1.__exportStar(Dialog_1, exports);
tslib_1.__exportStar(Dialog_base_1, exports);
tslib_1.__exportStar(DialogContent_1, exports);
tslib_1.__exportStar(DialogContent_base_1, exports);
tslib_1.__exportStar(DialogFooter_1, exports);
tslib_1.__exportStar(DialogFooter_base_1, exports);
tslib_1.__exportStar(Dialog_types_1, exports);
tslib_1.__exportStar(DialogContent_types_1, exports);
tslib_1.__exportStar(DialogFooter_types_1, exports);
});
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Dialog/index.ts"],"names":[],"mappings":";;;IAAA,wCAAyB;IACzB,6CAA8B;IAC9B,+CAAgC;IAChC,oDAAqC;IACrC,8CAA+B;IAC/B,mDAAoC;IACpC,8CAA+B;IAC/B,qDAAsC;IACtC,oDAAqC","sourcesContent":["export * from './Dialog';\nexport * from './Dialog.base';\nexport * from './DialogContent';\nexport * from './DialogContent.base';\nexport * from './DialogFooter';\nexport * from './DialogFooter.base';\nexport * from './Dialog.types';\nexport * from './DialogContent.types';\nexport * from './DialogFooter.types';\n"]}