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
+13
View File
@@ -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;
}
+110
View File
@@ -0,0 +1,110 @@
import { __assign, __decorate, __extends } from "tslib";
import * as React from 'react';
import { warnDeprecations, classNamesFunction, getId } from '../../Utilities';
import { DialogType } from './DialogContent.types';
import { Modal } from '../../Modal';
import { withResponsiveMode } from '../../ResponsiveMode';
var getClassNames = classNamesFunction();
import { DialogContent } from './DialogContent';
var DefaultModalProps = {
isDarkOverlay: false,
isBlocking: false,
className: '',
containerClassName: '',
topOffsetFixed: false,
enableAriaHiddenSiblings: true,
};
var DefaultDialogContentProps = {
type: DialogType.normal,
className: '',
topButtonsProps: [],
};
// eslint-disable-next-line @typescript-eslint/no-deprecated
var DialogBase = /** @class */ (function (_super) {
__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 = getId('Dialog');
_this._defaultTitleTextId = _this._id + '-title';
_this._defaultSubTextId = _this._id + '-subText';
if (process.env.NODE_ENV !== 'production') {
warnDeprecations('Dialog', props, {
isOpen: 'hidden',
type: 'dialogContentProps.type',
subText: 'dialogContentProps.subText',
contentClassName: 'dialogContentProps.className',
topButtonsProps: 'dialogContentProps.topButtonsProps',
className: 'modalProps.className',
isDarkOverlay: 'modalProps.isDarkOverlay',
isBlocking: 'modalProps.isBlocking',
containerClassName: 'modalProps.containerClassName',
onDismissed: 'modalProps.onDismissed',
onLayerDidMount: 'modalProps.layerProps.onLayerDidMount',
ariaDescribedById: 'modalProps.subtitleAriaId',
ariaLabelledById: 'modalProps.titleAriaId',
});
}
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 = __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 = __assign({}, modalProps.dragOptions);
dialogDraggableClassName = 'ms-Dialog-draggable-header';
dragOptions.dragHandleSelector = ".".concat(dialogDraggableClassName);
}
var mergedModalProps = __assign(__assign(__assign(__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 = __assign(__assign(__assign({ className: contentClassName, subText: subText, title: title, topButtonsProps: topButtonsProps, type: type }, DefaultDialogContentProps), props.dialogContentProps), { draggableHeaderClassName: dialogDraggableClassName, titleProps: __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, __assign({}, mergedModalProps, { className: classNames.root, containerClassName: classNames.main, onDismiss: onDismiss || mergedModalProps.onDismiss, subtitleAriaId: this._getSubTextId(), titleAriaId: this._getTitleTextId() }),
React.createElement(DialogContent, __assign({ subTextId: this._defaultSubTextId, showCloseButton: mergedModalProps.isBlocking, onDismiss: onDismiss }, dialogContentProps), props.children)));
};
DialogBase.defaultProps = {
hidden: true,
};
DialogBase = __decorate([
withResponsiveMode
], DialogBase);
return DialogBase;
}(React.Component));
export { 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>;
+6
View File
@@ -0,0 +1,6 @@
import { styled } from '../../Utilities';
import { DialogBase } from './Dialog.base';
import { getStyles } from './Dialog.styles';
export var Dialog = styled(DialogBase, getStyles, undefined, { scope: 'Dialog' });
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":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,CAAC,IAAM,MAAM,GAA0C,MAAM,CACjE,UAAU,EACV,SAAS,EACT,SAAS,EACT,EAAE,KAAK,EAAE,QAAQ,EAAE,CACpB,CAAC;AACF,MAAM,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;
+30
View File
@@ -0,0 +1,30 @@
import { ScreenWidthMinMedium, getGlobalClassNames } from '../../Styling';
var GlobalClassNames = {
root: 'ms-Dialog',
};
export 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 = 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(ScreenWidthMinMedium, "px)")] = {
width: 'auto',
maxWidth: dialogDefaultMaxWidth,
minWidth: dialogDefaultMinWidth,
},
_a),
},
!hidden && { display: 'flex' },
containerClassName,
],
};
};
//# sourceMappingURL=Dialog.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Dialog.styles.js","sourceRoot":"../src/","sources":["components/Dialog/Dialog.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAG1E,IAAM,gBAAgB,GAAG;IACvB,IAAI,EAAE,WAAW;CAClB,CAAC;AAEF,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,KAAwB;;IAE9C,IAAA,SAAS,GAMP,KAAK,UANE,EACT,kBAAkB,GAKhB,KAAK,mBALW,EAAE,uDAAuD;IAC3E,KAIE,KAAK,sBAJwB,EADX,uDAAuD;IAC3E,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;IAEV,IAAM,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IAEhE,OAAO;QACL,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC;QAEtD,IAAI,EAAE;YACJ;gBACE,KAAK,EAAE,qBAAqB;gBAC5B,OAAO,EAAE,uBAAuB;gBAEhC,SAAS;oBACP,GAAC,6BAAsB,oBAAoB,QAAK,IAAG;wBACjD,KAAK,EAAE,MAAM;wBACb,QAAQ,EAAE,qBAAqB;wBAC/B,QAAQ,EAAE,qBAAqB;qBAChC;uBACF;aACF;YACD,CAAC,MAAM,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE;YAC9B,kBAAkB;SACnB;KACF,CAAC;AACJ,CAAC,CAAC","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"]}
+190
View File
@@ -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;
}
+2
View File
@@ -0,0 +1,2 @@
export {};
//# 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,80 @@
import { __assign, __decorate, __extends } from "tslib";
import * as React from 'react';
import { classNamesFunction, css, warnDeprecations, initializeComponentRef } from '../../Utilities';
import { DialogType } from './DialogContent.types';
import { IconButton } from '../../Button';
import { DialogFooter } from './DialogFooter';
import { withResponsiveMode } from '../../ResponsiveMode';
var getClassNames = classNamesFunction();
var DialogFooterType = (React.createElement(DialogFooter, null)).type;
var COMPONENT_NAME = 'DialogContent';
// eslint-disable-next-line @typescript-eslint/no-deprecated
var DialogContentBase = /** @class */ (function (_super) {
__extends(DialogContentBase, _super);
function DialogContentBase(props) {
var _this = _super.call(this, props) || this;
initializeComponentRef(_this);
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 === DialogType.largeHeader,
isClose: type === 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", __assign({ id: titleId, role: "heading", "aria-level": 1 }, titleProps, { className: css(classNames.title, titleProps.className) }), title),
React.createElement("div", { className: classNames.topButton },
this.props.topButtonsProps.map(function (props, index) { return (React.createElement(IconButton, __assign({ key: props.uniqueId || index }, props))); }),
(type === DialogType.close || (showCloseButton && type !== DialogType.largeHeader)) && (React.createElement(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 = __decorate([
withResponsiveMode
], DialogContentBase);
return DialogContentBase;
}(React.Component));
export { 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>;
+6
View File
@@ -0,0 +1,6 @@
import { styled } from '../../Utilities';
import { DialogContentBase } from './DialogContent.base';
import { getStyles } from './DialogContent.styles';
export var DialogContent = styled(DialogContentBase, getStyles, undefined, { scope: 'DialogContent' });
DialogContent.displayName = 'DialogContent';
//# sourceMappingURL=DialogContent.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DialogContent.js","sourceRoot":"../src/","sources":["components/Dialog/DialogContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,MAAM,CAAC,IAAM,aAAa,GAAiD,MAAM,CAI/E,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;AAEvE,aAAa,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,137 @@
import { FontWeights, getGlobalClassNames, IconFontSizes, ScreenWidthMinSmall, ScreenWidthMaxSmall, } from '../../Styling';
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',
};
export 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 = 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: 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: IconFontSizes.medium,
},
},
},
],
inner: [
classNames.inner,
{
padding: '0 24px 24px',
selectors: (_a = {},
_a["@media (min-width: ".concat(ScreenWidthMinSmall, "px) and (max-width: ").concat(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(ScreenWidthMinSmall, "px) and (max-width: ").concat(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(ScreenWidthMinSmall, "px) and (max-width: ").concat(ScreenWidthMaxSmall, "px)")] = {
padding: '15px 8px 0 0',
},
_c),
},
],
};
};
//# 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,13 @@
/**
* {@docCategory Dialog}
*/
export 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 || (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":"AAgHA;;GAEG;AACH,MAAM,CAAN,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,sBAAsB;IACtB,+CAAU,CAAA;IACV,sCAAsC;IACtC,yDAAe,CAAA;IACf,gEAAgE;IAChE,6CAAS,CAAA;AACX,CAAC,EAPW,UAAU,KAAV,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,30 @@
import { __extends } from "tslib";
import * as React from 'react';
import { classNamesFunction, initializeComponentRef } from '../../Utilities';
var getClassNames = classNamesFunction();
var DialogFooterBase = /** @class */ (function (_super) {
__extends(DialogFooterBase, _super);
function DialogFooterBase(props) {
var _this = _super.call(this, props) || this;
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));
export { 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":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAM7E,IAAM,aAAa,GAAG,kBAAkB,EAAgD,CAAC;AAEzF;IAAsC,oCAAuC;IAG3E,0BAAY,KAAyB;QACnC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;QAEb,sBAAsB,CAAC,KAAI,CAAC,CAAC;;IAC/B,CAAC;IAEM,iCAAM,GAAb;QACQ,IAAA,KAA+B,IAAI,CAAC,KAAK,EAAvC,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAe,CAAC;QAEhD,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,MAAO,EAAE;YACxC,KAAK,EAAE,KAAM;YACb,SAAS,WAAA;SACV,CAAC,CAAC;QAEH,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO;YACtC,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,YAAY,IAAG,IAAI,CAAC,wBAAwB,EAAE,CAAO,CAClF,CACP,CAAC;IACJ,CAAC;IAEO,mDAAwB,GAAhC;QAAA,iBAIC;QAHC,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAA,KAAK;YAClD,OAAA,KAAK,CAAC,CAAC,CAAC,8BAAM,SAAS,EAAE,KAAI,CAAC,WAAW,CAAC,MAAM,IAAG,KAAK,CAAQ,CAAC,CAAC,CAAC,IAAI;QAAvE,CAAuE,CACxE,CAAC;IACJ,CAAC;IACH,uBAAC;AAAD,CAAC,AA7BD,CAAsC,KAAK,CAAC,SAAS,GA6BpD","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"]}
+3
View File
@@ -0,0 +1,3 @@
import * as React from 'react';
import type { IDialogFooterProps } from './DialogFooter.types';
export declare const DialogFooter: React.FunctionComponent<IDialogFooterProps>;
+6
View File
@@ -0,0 +1,6 @@
import { styled } from '../../Utilities';
import { DialogFooterBase } from './DialogFooter.base';
import { getStyles } from './DialogFooter.styles';
export var DialogFooter = styled(DialogFooterBase, getStyles, undefined, { scope: 'DialogFooter' });
DialogFooter.displayName = 'DialogFooter';
//# sourceMappingURL=DialogFooter.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DialogFooter.js","sourceRoot":"../src/","sources":["components/Dialog/DialogFooter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,MAAM,CAAC,IAAM,YAAY,GAAgD,MAAM,CAI7E,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC;AAErE,YAAY,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,47 @@
import { getGlobalClassNames } from '../../Styling';
var GlobalClassNames = {
actions: 'ms-Dialog-actions',
action: 'ms-Dialog-action',
actionsRight: 'ms-Dialog-actionsRight',
};
export var getStyles = function (props) {
var className = props.className, theme = props.theme;
var classNames = 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',
},
],
};
};
//# sourceMappingURL=DialogFooter.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DialogFooter.styles.js","sourceRoot":"../src/","sources":["components/Dialog/DialogFooter.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAGpD,IAAM,gBAAgB,GAAG;IACvB,OAAO,EAAE,mBAAmB;IAC5B,MAAM,EAAE,kBAAkB;IAC1B,YAAY,EAAE,wBAAwB;CACvC,CAAC;AAEF,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,KAA8B;IAC9C,IAAA,SAAS,GAAY,KAAK,UAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;IAEnC,IAAM,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IAEhE,OAAO;QACL,OAAO,EAAE;YACP,UAAU,CAAC,OAAO;YAClB;gBACE,QAAQ,EAAE,UAAU;gBACpB,KAAK,EAAE,MAAM;gBACb,SAAS,EAAE,MAAM;gBACjB,UAAU,EAAE,MAAM;gBAClB,MAAM,EAAE,UAAU;gBAClB,QAAQ,EAAE,GAAG;gBAEb,SAAS,EAAE;oBACT,YAAY,EAAE;wBACZ,UAAU,EAAE,QAAQ;wBACpB,aAAa,EAAE,QAAQ;qBACxB;iBACF;aACF;YACD,SAAS;SACV;QAED,MAAM,EAAE;YACN,UAAU,CAAC,MAAM;YACjB;gBACE,MAAM,EAAE,OAAO;aAChB;SACF;QAED,YAAY,EAAE;YACZ,UAAU,CAAC,YAAY;YACvB;gBACE,UAAU,EAAE,QAAQ;gBACpB,OAAO,EAAE,MAAM;gBACf,QAAQ,EAAE,GAAG;gBACb,cAAc,EAAE,UAAU;gBAC1B,WAAW,EAAE,MAAM;aACpB;SACF;KACF,CAAC;AACJ,CAAC,CAAC","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,2 @@
export {};
//# 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';
+10
View File
@@ -0,0 +1,10 @@
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';
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC","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"]}