@fluentui/react-dialog 9.1.16 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +105 -1
- package/CHANGELOG.md +35 -2
- package/dist/index.d.ts +8 -0
- package/lib/components/Dialog/Dialog.js.map +1 -1
- package/lib/components/Dialog/Dialog.types.js.map +1 -1
- package/lib/components/Dialog/renderDialog.js.map +1 -1
- package/lib/components/Dialog/useDialog.js +3 -1
- package/lib/components/Dialog/useDialog.js.map +1 -1
- package/lib/components/Dialog/useDialogContextValues.js +2 -0
- package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib/components/DialogActions/DialogActions.js +5 -0
- package/lib/components/DialogActions/DialogActions.js.map +1 -1
- package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActionsStyles.js.map +1 -1
- package/lib/components/DialogBody/DialogBody.js +5 -0
- package/lib/components/DialogBody/DialogBody.js.map +1 -1
- package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib/components/DialogBody/useDialogBody.js.map +1 -1
- package/lib/components/DialogBody/useDialogBodyStyles.js.map +1 -1
- package/lib/components/DialogContent/DialogContent.js +5 -0
- package/lib/components/DialogContent/DialogContent.js.map +1 -1
- package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib/components/DialogContent/useDialogContent.js.map +1 -1
- package/lib/components/DialogContent/useDialogContentStyles.js.map +1 -1
- package/lib/components/DialogSurface/DialogSurface.js +5 -0
- package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurface.js +3 -1
- package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
- package/lib/components/DialogTitle/DialogTitle.js +5 -0
- package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
- package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib/contexts/dialogContext.js +1 -0
- package/lib/contexts/dialogContext.js.map +1 -1
- package/lib/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/isEscapeKeyDown.js.map +1 -1
- package/lib/utils/useDisableBodyScroll.js.map +1 -1
- package/lib/utils/useFocusFirstElement.js.map +1 -1
- package/lib-amd/components/Dialog/Dialog.types.js.map +1 -1
- package/lib-amd/components/Dialog/useDialog.js +5 -4
- package/lib-amd/components/Dialog/useDialog.js.map +1 -1
- package/lib-amd/components/Dialog/useDialogContextValues.js +2 -1
- package/lib-amd/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib-amd/components/DialogActions/DialogActions.js +3 -1
- package/lib-amd/components/DialogActions/DialogActions.js.map +1 -1
- package/lib-amd/components/DialogBody/DialogBody.js +3 -1
- package/lib-amd/components/DialogBody/DialogBody.js.map +1 -1
- package/lib-amd/components/DialogContent/DialogContent.js +3 -1
- package/lib-amd/components/DialogContent/DialogContent.js.map +1 -1
- package/lib-amd/components/DialogSurface/DialogSurface.js +3 -1
- package/lib-amd/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib-amd/components/DialogSurface/useDialogSurface.js +5 -1
- package/lib-amd/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib-amd/components/DialogTitle/DialogTitle.js +3 -1
- package/lib-amd/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib-amd/contexts/dialogContext.js +1 -0
- package/lib-amd/contexts/dialogContext.js.map +1 -1
- package/lib-commonjs/Dialog.js.map +1 -1
- package/lib-commonjs/DialogActions.js.map +1 -1
- package/lib-commonjs/DialogBody.js.map +1 -1
- package/lib-commonjs/DialogContent.js.map +1 -1
- package/lib-commonjs/DialogSurface.js.map +1 -1
- package/lib-commonjs/DialogTitle.js.map +1 -1
- package/lib-commonjs/DialogTrigger.js.map +1 -1
- package/lib-commonjs/components/Dialog/Dialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/Dialog.types.js.map +1 -1
- package/lib-commonjs/components/Dialog/index.js.map +1 -1
- package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialog.js +3 -1
- package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialogContextValues.js +2 -0
- package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogActions/DialogActions.js +5 -0
- package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/DialogActions.types.js.map +1 -1
- package/lib-commonjs/components/DialogActions/index.js.map +1 -1
- package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js.map +1 -1
- package/lib-commonjs/components/DialogBody/DialogBody.js +5 -0
- package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/DialogBody.types.js.map +1 -1
- package/lib-commonjs/components/DialogBody/index.js.map +1 -1
- package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js.map +1 -1
- package/lib-commonjs/components/DialogContent/DialogContent.js +5 -0
- package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/DialogContent.types.js.map +1 -1
- package/lib-commonjs/components/DialogContent/index.js.map +1 -1
- package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/DialogSurface.js +5 -0
- package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/DialogSurface.types.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js +3 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/DialogTitle.js +5 -0
- package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/DialogTitle.types.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib-commonjs/contexts/constants.js.map +1 -1
- package/lib-commonjs/contexts/dialogContext.js +1 -0
- package/lib-commonjs/contexts/dialogContext.js.map +1 -1
- package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib-commonjs/contexts/index.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/isEscapeKeyDown.js.map +1 -1
- package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -1
- package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDialogSurface.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogSurface/useDialogSurface.ts"],"names":[],"mappings":";;;;IAkBA;;;;;;;;OAQG;IACI,IAAM,yBAAyB,GAAG,UACvC,KAAyB,EACzB,GAAoC;QAE5B,IAAA,QAAQ,GAAS,KAAK,SAAd,EAAE,EAAE,GAAK,KAAK,GAAV,CAAW;QAC/B,IAAM,SAAS,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,SAAS,EAAb,CAAa,CAAC,CAAC;QAClE,IAAM,SAAS,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,SAAS,EAAb,CAAa,CAAC,CAAC;QAClE,IAAM,IAAI,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,IAAI,EAAR,CAAQ,CAAC,CAAC;QACxD,IAAM,iBAAiB,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,iBAAiB,EAArB,CAAqB,CAAC,CAAC;QAClF,IAAM,aAAa,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,aAAa,EAAjB,CAAiB,CAAC,CAAC;QAE1E,IAAM,oBAAoB,GAAG,kCAAgB,CAAC,UAAC,KAAuC;;YACpF,IAAI,qCAAmB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;gBACvC,MAAA,MAAA,KAAK,CAAC,QAAQ,EAAC,OAAO,mDAAG,KAAK,CAAC,CAAC;aACjC;YACD,IAAI,SAAS,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAE;gBACxD,iBAAiB,CAAC;oBAChB,KAAK,OAAA;oBACL,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,eAAe;iBACtB,CAAC,CAAC;aACJ;QACH,CAAC,CAAC,CAAC;QAEH,IAAM,aAAa,GAAG,kCAAgB,CAAC,UAAC,KAA4D;;YAClG,MAAA,KAAK,CAAC,SAAS,+CAAf,KAAK,EAAa,KAAK,CAAC,CAAC;YAEzB,IAAI,0BAAkB,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE;gBACxC,iBAAiB,CAAC;oBAChB,KAAK,OAAA;oBACL,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,eAAe;iBACtB,CAAC,CAAC;gBACH,qFAAqF;gBACrF,gDAAgD;gBAChD,KAAK,CAAC,eAAe,EAAE,CAAC;aACzB;QACH,CAAC,CAAC,CAAC;QAEK,IAAA,eAAe,GAAK,kCAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"useDialogSurface.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogSurface/useDialogSurface.ts"],"names":[],"mappings":";;;;IAkBA;;;;;;;;OAQG;IACI,IAAM,yBAAyB,GAAG,UACvC,KAAyB,EACzB,GAAoC;QAE5B,IAAA,QAAQ,GAAS,KAAK,SAAd,EAAE,EAAE,GAAK,KAAK,GAAV,CAAW;QAC/B,IAAM,SAAS,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,SAAS,EAAb,CAAa,CAAC,CAAC;QAClE,IAAM,cAAc,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,cAAc,EAAlB,CAAkB,CAAC,CAAC;QAC5E,IAAM,SAAS,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,SAAS,EAAb,CAAa,CAAC,CAAC;QAClE,IAAM,IAAI,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,IAAI,EAAR,CAAQ,CAAC,CAAC;QACxD,IAAM,iBAAiB,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,iBAAiB,EAArB,CAAqB,CAAC,CAAC;QAClF,IAAM,aAAa,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,aAAa,EAAjB,CAAiB,CAAC,CAAC;QAE1E,IAAM,oBAAoB,GAAG,kCAAgB,CAAC,UAAC,KAAuC;;YACpF,IAAI,qCAAmB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;gBACvC,MAAA,MAAA,KAAK,CAAC,QAAQ,EAAC,OAAO,mDAAG,KAAK,CAAC,CAAC;aACjC;YACD,IAAI,SAAS,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAE;gBACxD,iBAAiB,CAAC;oBAChB,KAAK,OAAA;oBACL,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,eAAe;iBACtB,CAAC,CAAC;aACJ;QACH,CAAC,CAAC,CAAC;QAEH,IAAM,aAAa,GAAG,kCAAgB,CAAC,UAAC,KAA4D;;YAClG,MAAA,KAAK,CAAC,SAAS,+CAAf,KAAK,EAAa,KAAK,CAAC,CAAC;YAEzB,IAAI,0BAAkB,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE;gBACxC,iBAAiB,CAAC;oBAChB,KAAK,OAAA;oBACL,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,eAAe;iBACtB,CAAC,CAAC;gBACH,qFAAqF;gBACrF,gDAAgD;gBAChD,KAAK,CAAC,eAAe,EAAE,CAAC;aACzB;QACH,CAAC,CAAC,CAAC;QAEK,IAAA,eAAe,GAAK,kCAAkB,CAAC;YAC7C,SAAS,EAAE,SAAS,KAAK,WAAW;YACpC,eAAe,EAAE,CAAC,cAAc;SACjC,CAAC,gBAHqB,CAGpB;QAEH,OAAO;YACL,UAAU,EAAE;gBACV,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,KAAK;aACZ;YACD,QAAQ,EAAE,kCAAgB,CAAC,QAAQ,EAAE;gBACnC,QAAQ,EAAE,IAAI,IAAI,SAAS,KAAK,WAAW;gBAC3C,YAAY,EAAE;oBACZ,aAAa,EAAE,MAAM;oBACrB,OAAO,EAAE,oBAAoB;iBAC9B;aACF,CAAC;YACF,IAAI,EAAE,uCAAqB,CAAC,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,uDACrC,QAAQ,EAAE,CAAC,CAAC,EACZ,YAAY,EAAE,SAAS,KAAK,WAAW,EACvC,IAAI,EAAE,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,EACtD,iBAAiB,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,IAC/D,KAAK,GACL,eAAe,KAClB,SAAS,EAAE,aAAa,EACxB,GAAG,EAAE,+BAAa,CAAC,GAAG,EAAE,SAAS,CAAC,IAClC;SACH,CAAC;IACJ,CAAC,CAAC;IApEW,QAAA,yBAAyB,6BAoEpC","sourcesContent":["import * as React from 'react';\nimport {\n getNativeElementProps,\n resolveShorthand,\n useEventCallback,\n useMergedRefs,\n isResolvedShorthand,\n} from '@fluentui/react-utilities';\nimport type {\n DialogSurfaceElement,\n DialogSurfaceElementIntersection,\n DialogSurfaceProps,\n DialogSurfaceState,\n} from './DialogSurface.types';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { isEscapeKeyDismiss } from '../../utils';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */\nexport const useDialogSurface_unstable = (\n props: DialogSurfaceProps,\n ref: React.Ref<DialogSurfaceElement>,\n): DialogSurfaceState => {\n const { backdrop, as } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const inertTrapFocus = useDialogContext_unstable(ctx => ctx.inertTrapFocus);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n\n const handledBackdropClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (isResolvedShorthand(props.backdrop)) {\n props.backdrop.onClick?.(event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick',\n });\n }\n });\n\n const handleKeyDown = useEventCallback((event: React.KeyboardEvent<DialogSurfaceElementIntersection>) => {\n props.onKeyDown?.(event);\n\n if (isEscapeKeyDismiss(event, modalType)) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown',\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n\n const { modalAttributes } = useModalAttributes({\n trapFocus: modalType !== 'non-modal',\n legacyTrapFocus: !inertTrapFocus,\n });\n\n return {\n components: {\n backdrop: 'div',\n root: 'div',\n },\n backdrop: resolveShorthand(backdrop, {\n required: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n onClick: handledBackdropClick,\n },\n }),\n root: getNativeElementProps(as ?? 'div', {\n tabIndex: -1, // https://github.com/microsoft/fluentui/issues/25150\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef),\n }),\n };\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(["require", "exports", "react", "./useDialogTitle", "./renderDialogTitle", "./useDialogTitleStyles"], function (require, exports, React, useDialogTitle_1, renderDialogTitle_1, useDialogTitleStyles_1) {
|
|
1
|
+
define(["require", "exports", "react", "./useDialogTitle", "./renderDialogTitle", "./useDialogTitleStyles", "@fluentui/react-shared-contexts"], function (require, exports, React, useDialogTitle_1, renderDialogTitle_1, useDialogTitleStyles_1, react_shared_contexts_1) {
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.DialogTitle = void 0;
|
|
@@ -9,6 +9,8 @@ define(["require", "exports", "react", "./useDialogTitle", "./renderDialogTitle"
|
|
|
9
9
|
exports.DialogTitle = React.forwardRef(function (props, ref) {
|
|
10
10
|
var state = useDialogTitle_1.useDialogTitle_unstable(props, ref);
|
|
11
11
|
useDialogTitleStyles_1.useDialogTitleStyles_unstable(state);
|
|
12
|
+
var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useDialogTitleStyles_unstable;
|
|
13
|
+
useCustomStyles(state);
|
|
12
14
|
return renderDialogTitle_1.renderDialogTitle_unstable(state);
|
|
13
15
|
});
|
|
14
16
|
exports.DialogTitle.displayName = 'DialogTitle';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogTitle.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogTitle/DialogTitle.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"DialogTitle.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogTitle/DialogTitle.tsx"],"names":[],"mappings":";;;;IAQA;;;OAGG;IACU,QAAA,WAAW,GAA0C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAC5F,IAAM,KAAK,GAAG,wCAAuB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAElD,oDAA6B,CAAC,KAAK,CAAC,CAAC;QAE7B,IAA+B,eAAe,GAAK,oDAA4B,EAAE,8BAAnC,CAAoC;QAC1F,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,8CAA0B,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import * as React from 'react';\nimport { useDialogTitle_unstable } from './useDialogTitle';\nimport { renderDialogTitle_unstable } from './renderDialogTitle';\nimport { useDialogTitleStyles_unstable } from './useDialogTitleStyles';\nimport type { DialogTitleProps } from './DialogTitle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogTitle` component expects to have a title/header\n * and when `Dialog` is `non-modal` a close (X icon) button is provided through `action` slot by default.\n */\nexport const DialogTitle: ForwardRefComponent<DialogTitleProps> = React.forwardRef((props, ref) => {\n const state = useDialogTitle_unstable(props, ref);\n\n useDialogTitleStyles_unstable(state);\n\n const { useDialogTitleStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogTitle_unstable(state);\n});\n\nDialogTitle.displayName = 'DialogTitle';\n"]}
|
|
@@ -4,6 +4,7 @@ define(["require", "exports", "@fluentui/react-context-selector"], function (req
|
|
|
4
4
|
exports.useDialogContext_unstable = exports.DialogProvider = exports.DialogContext = void 0;
|
|
5
5
|
var defaultContextValue = {
|
|
6
6
|
open: false,
|
|
7
|
+
inertTrapFocus: false,
|
|
7
8
|
modalType: 'modal',
|
|
8
9
|
isNestedDialog: false,
|
|
9
10
|
dialogRef: { current: null },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogContext.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-dialog/src/contexts/dialogContext.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"dialogContext.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-dialog/src/contexts/dialogContext.ts"],"names":[],"mappings":";;;;IAmBA,IAAM,mBAAmB,GAAuB;QAC9C,IAAI,EAAE,KAAK;QACX,cAAc,EAAE,KAAK;QACrB,SAAS,EAAE,OAAO;QAClB,cAAc,EAAE,KAAK;QACrB,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QAC5B,iBAAiB;YACf,UAAU;QACZ,CAAC;KACF,CAAC;IAEF,uCAAuC;IAC1B,QAAA,aAAa,GAA4C,sCAAa,CACjF,SAAS,CACV,CAAC;IAEW,QAAA,cAAc,GAAG,qBAAa,CAAC,QAAQ,CAAC;IAC9C,IAAM,yBAAyB,GAAG,UAAI,QAAgD;QAC3F,OAAA,2CAAkB,CAAC,qBAAa,EAAE,UAAC,GAAyB;YAAzB,oBAAA,EAAA,yBAAyB;YAAK,OAAA,QAAQ,CAAC,GAAG,CAAC;QAAb,CAAa,CAAC;IAA/E,CAA+E,CAAC;IADrE,QAAA,yBAAyB,6BAC4C","sourcesContent":["import * as React from 'react';\nimport { createContext, ContextSelector, useContextSelector } from '@fluentui/react-context-selector';\nimport { DialogSurfaceElement } from '../DialogSurface';\nimport type { Context } from '@fluentui/react-context-selector';\nimport type { DialogModalType, DialogOpenChangeData } from '../Dialog';\n\nexport type DialogContextValue = {\n open: boolean;\n inertTrapFocus: boolean;\n dialogTitleId?: string;\n isNestedDialog: boolean;\n dialogRef: React.Ref<DialogSurfaceElement>;\n modalType: DialogModalType;\n /**\n * Requests dialog main component to update it's internal open state\n */\n requestOpenChange: (data: DialogOpenChangeData) => void;\n};\n\nconst defaultContextValue: DialogContextValue = {\n open: false,\n inertTrapFocus: false,\n modalType: 'modal',\n isNestedDialog: false,\n dialogRef: { current: null },\n requestOpenChange() {\n /* noop */\n },\n};\n\n// Contexts should default to undefined\nexport const DialogContext: Context<DialogContextValue | undefined> = createContext<DialogContextValue | undefined>(\n undefined,\n);\n\nexport const DialogProvider = DialogContext.Provider;\nexport const useDialogContext_unstable = <T>(selector: ContextSelector<DialogContextValue, T>): T =>\n useContextSelector(DialogContext, (ctx = defaultContextValue) => selector(ctx));\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/Dialog.ts"],"sourcesContent":["export * from './components/Dialog/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,+BAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/DialogActions.ts"],"sourcesContent":["export * from './components/DialogActions/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,sCAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/DialogBody.ts"],"sourcesContent":["export * from './components/DialogBody/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,mCAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/DialogContent.ts"],"sourcesContent":["export * from './components/DialogContent/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,sCAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/DialogSurface.ts"],"sourcesContent":["export * from './components/DialogSurface/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,sCAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/DialogTitle.ts"],"sourcesContent":["export * from './components/DialogTitle/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,oCAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/DialogTrigger.ts"],"sourcesContent":["export * from './components/DialogTrigger/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,sCAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","require","useDialog_1","renderDialog_1","useDialogContextValues_1","exports","Dialog","memo","props","state","useDialog_unstable","contextValues","useDialogContextValues_unstable","renderDialog_unstable","displayName"],"sources":["../src/packages/react-components/react-dialog/src/components/Dialog/Dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialog_unstable } from './useDialog';\nimport { renderDialog_unstable } from './renderDialog';\nimport type { DialogProps } from './Dialog.types';\nimport { useDialogContextValues_unstable } from './useDialogContextValues';\n\n/**\n * The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.\n * It provides context down the hierarchy to `children` compound components to allow functionality.\n * This component expects to receive as children either a `DialogSurface` or a `DialogTrigger`\n * and a `DialogSurface` (or some component that will eventually render one of those compound components)\n * in this specific order\n */\nexport const Dialog: React.FC<DialogProps> = React.memo(props => {\n const state = useDialog_unstable(props);\n const contextValues = useDialogContextValues_unstable(state);\n\n return renderDialog_unstable(state, contextValues);\n});\n\nDialog.displayName = 'Dialog';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,WAAA,gBAAAD,OAAA;AACA,MAAAE,cAAA,gBAAAF,OAAA;AAEA,MAAAG,wBAAA,gBAAAH,OAAA;AAEA;;;;;;;AAOaI,OAAA,CAAAC,MAAM,gBAA0BN,KAAK,CAACO,IAAI,CAACC,KAAK,IAAG;EAC9D,MAAMC,KAAK,GAAGP,WAAA,CAAAQ,kBAAkB,CAACF,KAAK,CAAC;EACvC,MAAMG,aAAa,GAAGP,wBAAA,CAAAQ,+BAA+B,CAACH,KAAK,CAAC;EAE5D,OAAON,cAAA,CAAAU,qBAAqB,CAACJ,KAAK,EAAEE,aAAa,CAAC;AACpD,CAAC,CAAC;AAEFN,OAAA,CAAAC,MAAM,CAACQ,WAAW,GAAG,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/packages/react-components/react-dialog/src/components/Dialog/Dialog.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogSurfaceElement } from '../DialogSurface/DialogSurface.types';\n\nexport type DialogSlots = {};\n\nexport type DialogOpenChangeEvent = DialogOpenChangeData['event'];\n\nexport type DialogOpenChangeData =\n | {\n type: 'escapeKeyDown';\n open: boolean;\n event: React.KeyboardEvent<DialogSurfaceElement>;\n }\n | {\n type: 'backdropClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n }\n | {\n type: 'triggerClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n };\n\nexport type DialogModalType = 'modal' | 'non-modal' | 'alert';\n\n/**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information,\n * such as open value and type of interaction that created the event\n */\nexport type DialogOpenChangeEventHandler = (event: DialogOpenChangeEvent, data: DialogOpenChangeData) => void;\n\nexport type DialogContextValues = {\n dialog: DialogContextValue;\n /**\n * dialogSurface context is provided by Dialog as false\n * to ensure components inside Dialog but outside DialogSurface will consume this as false\n */\n dialogSurface: DialogSurfaceContextValue;\n};\n\nexport type DialogProps = ComponentProps<Partial<DialogSlots>> & {\n /**\n * Dialog variations.\n *\n * `modal`: When this type of dialog is open, the rest of the page is dimmed out and cannot be interacted with.\n * The tab sequence is kept within the dialog and moving the focus outside\n * the dialog will imply closing it. This is the default type of the component.\n *\n * `non-modal`: When a non-modal dialog is open, the rest of the page is not dimmed out\n * and users can interact with the rest of the page.\n * This also implies that the tab focus can move outside the dialog when it reaches the last focusable element.\n *\n * `alert`: is a special type of modal dialogs that interrupts the user's workflow\n * to communicate an important message or ask for a decision.\n * Unlike a typical modal dialog, the user must take an action through the options given to dismiss the dialog,\n * and it cannot be dismissed through the dimmed background or escape key.\n *\n * @default modal\n */\n modalType?: DialogModalType;\n /**\n * Controls the open state of the dialog\n * @default false\n */\n open?: boolean;\n /**\n * Default value for the uncontrolled open state of the dialog.\n * @default false\n */\n defaultOpen?: boolean;\n /**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information,\n * such as open value and type of interaction that created the event\n */\n onOpenChange?: DialogOpenChangeEventHandler;\n /**\n * Can contain two children including {@link DialogTrigger} and {@link DialogSurface}.\n * Alternatively can only contain {@link DialogSurface} if using trigger outside dialog, or controlling state.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n /**\n * Enables standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert.\n *\n * @default false\n */\n inertTrapFocus?: boolean;\n};\n\nexport type DialogState = ComponentState<DialogSlots> &\n DialogContextValue & {\n content: React.ReactNode;\n trigger: React.ReactNode;\n };\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/Dialog/index.ts"],"sourcesContent":["export * from './Dialog';\nexport * from './Dialog.types';\nexport * from './renderDialog';\nexport * from './useDialog';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,cAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,oBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,oBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,iBAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","require","contexts_1","renderDialog_unstable","state","contextValues","content","trigger","createElement","DialogProvider","value","dialog","DialogSurfaceProvider","dialogSurface","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/Dialog/renderDialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport { DialogProvider, DialogSurfaceProvider } from '../../contexts';\nimport type { DialogState, DialogContextValues } from './Dialog.types';\n\n/**\n * Render the final JSX of Dialog\n */\nexport const renderDialog_unstable = (state: DialogState, contextValues: DialogContextValues) => {\n const { content, trigger } = state;\n\n return (\n <DialogProvider value={contextValues.dialog}>\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n {trigger}\n {content}\n </DialogSurfaceProvider>\n </DialogProvider>\n );\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,UAAA,gBAAAD,OAAA;AAGA;;;AAGO,MAAME,qBAAqB,GAAGA,CAACC,KAAkB,EAAEC,aAAkC,KAAI;EAC9F,MAAM;IAAEC,OAAO;IAAEC;EAAO,CAAE,GAAGH,KAAK;EAElC,OACEJ,KAAA,CAAAQ,aAAA,CAACN,UAAA,CAAAO,cAAc;IAACC,KAAK,EAAEL,aAAa,CAACM;EAAM,GACzCX,KAAA,CAAAQ,aAAA,CAACN,UAAA,CAAAU,qBAAqB;IAACF,KAAK,EAAEL,aAAa,CAACQ;EAAa,GACtDN,OAAO,EACPD,OAAO,CACc,CACT;AAErB,CAAC;AAXYQ,OAAA,CAAAX,qBAAqB,GAAAA,qBAAA"}
|
|
@@ -21,7 +21,8 @@ const useDialog_unstable = props => {
|
|
|
21
21
|
const {
|
|
22
22
|
children,
|
|
23
23
|
modalType = 'modal',
|
|
24
|
-
onOpenChange
|
|
24
|
+
onOpenChange,
|
|
25
|
+
inertTrapFocus = false
|
|
25
26
|
} = props;
|
|
26
27
|
const [trigger, content] = childrenToTriggerAndContent(children);
|
|
27
28
|
const [open, setOpen] = react_utilities_1.useControllableState({
|
|
@@ -49,6 +50,7 @@ const useDialog_unstable = props => {
|
|
|
49
50
|
components: {
|
|
50
51
|
backdrop: 'div'
|
|
51
52
|
},
|
|
53
|
+
inertTrapFocus,
|
|
52
54
|
open,
|
|
53
55
|
modalType,
|
|
54
56
|
content: open ? content : null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","require","react_utilities_1","react_context_selector_1","utils_1","contexts_1","useDialog_unstable","props","children","modalType","onOpenChange","inertTrapFocus","trigger","content","childrenToTriggerAndContent","open","setOpen","useControllableState","state","defaultState","defaultOpen","initialState","requestOpenChange","useEventCallback","data","event","isDefaultPrevented","focusRef","useFocusFirstElement","disableBodyScroll","useDisableBodyScroll","isBodyScrollLocked","Boolean","useIsomorphicLayoutEffect","components","backdrop","dialogTitleId","useId","isNestedDialog","useHasParentContext","DialogContext","dialogRef","exports","childrenArray","Children","toArray","process","env","NODE_ENV","length","console","warn","undefined"],"sources":["../src/packages/react-components/react-dialog/src/components/Dialog/useDialog.ts"],"sourcesContent":["import * as React from 'react';\nimport { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useDisableBodyScroll, useFocusFirstElement } from '../../utils';\nimport { DialogContext } from '../../contexts';\n\nimport type { DialogOpenChangeData, DialogProps, DialogState } from './Dialog.types';\n\n/**\n * Create the state required to render Dialog.\n *\n * The returned state can be modified with hooks such as useDialogStyles_unstable,\n * before being passed to renderDialog_unstable.\n *\n * @param props - props from this instance of Dialog\n */\nexport const useDialog_unstable = (props: DialogProps): DialogState => {\n const { children, modalType = 'modal', onOpenChange, inertTrapFocus = false } = props;\n\n const [trigger, content] = childrenToTriggerAndContent(children);\n\n const [open, setOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const requestOpenChange = useEventCallback((data: DialogOpenChangeData) => {\n onOpenChange?.(data.event, data);\n\n // if user prevents default then do not change state value\n // otherwise updates state value and trigger reference to the element that caused the opening\n if (!data.event.isDefaultPrevented()) {\n setOpen(data.open);\n }\n });\n\n const focusRef = useFocusFirstElement(open, modalType);\n const disableBodyScroll = useDisableBodyScroll();\n const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');\n\n useIsomorphicLayoutEffect(() => {\n if (isBodyScrollLocked) {\n return disableBodyScroll();\n }\n }, [disableBodyScroll, isBodyScrollLocked]);\n\n return {\n components: {\n backdrop: 'div',\n },\n inertTrapFocus,\n open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogTitleId: useId('dialog-title-'),\n isNestedDialog: useHasParentContext(DialogContext),\n dialogRef: focusRef,\n };\n};\n\n/**\n * Extracts trigger and content from children\n */\nfunction childrenToTriggerAndContent(\n children: React.ReactNode,\n): readonly [trigger: React.ReactNode, content: React.ReactNode] {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length !== 1 && childrenArray.length !== 2) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Dialog must contain at least one child <DialogSurface/>,\\n' +\n 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)',\n );\n }\n }\n switch (childrenArray.length) {\n // case where there's a trigger followed by content\n case 2:\n return childrenArray as [trigger: React.ReactNode, content: React.ReactNode];\n // case where there's only content\n case 1:\n return [undefined, childrenArray[0]];\n // unknown case\n default:\n return [undefined, undefined];\n }\n}\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AACA,MAAAE,wBAAA,gBAAAF,OAAA;AACA,MAAAG,OAAA,gBAAAH,OAAA;AACA,MAAAI,UAAA,gBAAAJ,OAAA;AAIA;;;;;;;;AAQO,MAAMK,kBAAkB,GAAIC,KAAkB,IAAiB;EACpE,MAAM;IAAEC,QAAQ;IAAEC,SAAS,GAAG,OAAO;IAAEC,YAAY;IAAEC,cAAc,GAAG;EAAK,CAAE,GAAGJ,KAAK;EAErF,MAAM,CAACK,OAAO,EAAEC,OAAO,CAAC,GAAGC,2BAA2B,CAACN,QAAQ,CAAC;EAEhE,MAAM,CAACO,IAAI,EAAEC,OAAO,CAAC,GAAGd,iBAAA,CAAAe,oBAAoB,CAAC;IAC3CC,KAAK,EAAEX,KAAK,CAACQ,IAAI;IACjBI,YAAY,EAAEZ,KAAK,CAACa,WAAW;IAC/BC,YAAY,EAAE;GACf,CAAC;EAEF,MAAMC,iBAAiB,GAAGpB,iBAAA,CAAAqB,gBAAgB,CAAEC,IAA0B,IAAI;IACxEd,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAGc,IAAI,CAACC,KAAK,EAAED,IAAI,CAAC;IAEhC;IACA;IACA,IAAI,CAACA,IAAI,CAACC,KAAK,CAACC,kBAAkB,EAAE,EAAE;MACpCV,OAAO,CAACQ,IAAI,CAACT,IAAI,CAAC;;EAEtB,CAAC,CAAC;EAEF,MAAMY,QAAQ,GAAGvB,OAAA,CAAAwB,oBAAoB,CAACb,IAAI,EAAEN,SAAS,CAAC;EACtD,MAAMoB,iBAAiB,GAAGzB,OAAA,CAAA0B,oBAAoB,EAAE;EAChD,MAAMC,kBAAkB,GAAGC,OAAO,CAACjB,IAAI,IAAIN,SAAS,KAAK,WAAW,CAAC;EAErEP,iBAAA,CAAA+B,yBAAyB,CAAC,MAAK;IAC7B,IAAIF,kBAAkB,EAAE;MACtB,OAAOF,iBAAiB,EAAE;;EAE9B,CAAC,EAAE,CAACA,iBAAiB,EAAEE,kBAAkB,CAAC,CAAC;EAE3C,OAAO;IACLG,UAAU,EAAE;MACVC,QAAQ,EAAE;KACX;IACDxB,cAAc;IACdI,IAAI;IACJN,SAAS;IACTI,OAAO,EAAEE,IAAI,GAAGF,OAAO,GAAG,IAAI;IAC9BD,OAAO;IACPU,iBAAiB;IACjBc,aAAa,EAAElC,iBAAA,CAAAmC,KAAK,CAAC,eAAe,CAAC;IACrCC,cAAc,EAAEnC,wBAAA,CAAAoC,mBAAmB,CAAClC,UAAA,CAAAmC,aAAa,CAAC;IAClDC,SAAS,EAAEd;GACZ;AACH,CAAC;AA7CYe,OAAA,CAAApC,kBAAkB,GAAAA,kBAAA;AA+C/B;;;AAGA,SAASQ,2BAA2BA,CAClCN,QAAyB;EAEzB,MAAMmC,aAAa,GAAG3C,KAAK,CAAC4C,QAAQ,CAACC,OAAO,CAACrC,QAAQ,CAAyB;EAC9E,IAAIsC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAIL,aAAa,CAACM,MAAM,KAAK,CAAC,IAAIN,aAAa,CAACM,MAAM,KAAK,CAAC,EAAE;MAC5D;MACAC,OAAO,CAACC,IAAI,CACV,4DAA4D,GAC1D,4EAA4E,CAC/E;;;EAGL,QAAQR,aAAa,CAACM,MAAM;IAC1B;IACA,KAAK,CAAC;MACJ,OAAON,aAAqE;IAC9E;IACA,KAAK,CAAC;MACJ,OAAO,CAACS,SAAS,EAAET,aAAa,CAAC,CAAC,CAAC,CAAC;IACtC;IACA;MACE,OAAO,CAACS,SAAS,EAAEA,SAAS,CAAC;EAAC;AAEpC"}
|
|
@@ -11,6 +11,7 @@ function useDialogContextValues_unstable(state) {
|
|
|
11
11
|
dialogRef,
|
|
12
12
|
dialogTitleId,
|
|
13
13
|
isNestedDialog,
|
|
14
|
+
inertTrapFocus,
|
|
14
15
|
requestOpenChange
|
|
15
16
|
} = state;
|
|
16
17
|
/**
|
|
@@ -23,6 +24,7 @@ function useDialogContextValues_unstable(state) {
|
|
|
23
24
|
dialogRef,
|
|
24
25
|
dialogTitleId,
|
|
25
26
|
isNestedDialog,
|
|
27
|
+
inertTrapFocus,
|
|
26
28
|
requestOpenChange
|
|
27
29
|
};
|
|
28
30
|
const dialogSurface = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useDialogContextValues_unstable","state","modalType","open","dialogRef","dialogTitleId","isNestedDialog","inertTrapFocus","requestOpenChange","dialog","dialogSurface","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/Dialog/useDialogContextValues.ts"],"sourcesContent":["import type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogContextValues, DialogState } from './Dialog.types';\n\nexport function useDialogContextValues_unstable(state: DialogState): DialogContextValues {\n const { modalType, open, dialogRef, dialogTitleId, isNestedDialog, inertTrapFocus, requestOpenChange } = state;\n\n /**\n * This context is created with \"@fluentui/react-context-selector\",\n * there is no sense to memoize it\n */\n const dialog: DialogContextValue = {\n open,\n modalType,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"],"mappings":";;;;;;AAGA,SAAgBA,+BAA+BA,CAACC,KAAkB;EAChE,MAAM;IAAEC,SAAS;IAAEC,IAAI;IAAEC,SAAS;IAAEC,aAAa;IAAEC,cAAc;IAAEC,cAAc;IAAEC;EAAiB,CAAE,GAAGP,KAAK;EAE9G;;;;EAIA,MAAMQ,MAAM,GAAuB;IACjCN,IAAI;IACJD,SAAS;IACTE,SAAS;IACTC,aAAa;IACbC,cAAc;IACdC,cAAc;IACdC;GACD;EAED,MAAME,aAAa,GAA8B,KAAK;EAEtD,OAAO;IAAED,MAAM;IAAEC;EAAa,CAAE;AAClC;AApBAC,OAAA,CAAAX,+BAAA,GAAAA,+BAAA"}
|
|
@@ -8,6 +8,7 @@ const React = /*#__PURE__*/require("react");
|
|
|
8
8
|
const useDialogActions_1 = /*#__PURE__*/require("./useDialogActions");
|
|
9
9
|
const renderDialogActions_1 = /*#__PURE__*/require("./renderDialogActions");
|
|
10
10
|
const useDialogActionsStyles_1 = /*#__PURE__*/require("./useDialogActionsStyles");
|
|
11
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
|
11
12
|
/**
|
|
12
13
|
* `DialogActions` is a container for the actions of the dialog.
|
|
13
14
|
* Apart from styling, this component does not have other behavior.
|
|
@@ -15,6 +16,10 @@ const useDialogActionsStyles_1 = /*#__PURE__*/require("./useDialogActionsStyles"
|
|
|
15
16
|
exports.DialogActions = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
16
17
|
const state = useDialogActions_1.useDialogActions_unstable(props, ref);
|
|
17
18
|
useDialogActionsStyles_1.useDialogActionsStyles_unstable(state);
|
|
19
|
+
const {
|
|
20
|
+
useDialogActionsStyles_unstable: useCustomStyles
|
|
21
|
+
} = react_shared_contexts_1.useCustomStyleHooks_unstable();
|
|
22
|
+
useCustomStyles(state);
|
|
18
23
|
return renderDialogActions_1.renderDialogActions_unstable(state);
|
|
19
24
|
});
|
|
20
25
|
exports.DialogActions.displayName = 'DialogActions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","require","useDialogActions_1","renderDialogActions_1","useDialogActionsStyles_1","react_shared_contexts_1","exports","DialogActions","forwardRef","props","ref","state","useDialogActions_unstable","useDialogActionsStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderDialogActions_unstable","displayName"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogActions/DialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogActions_unstable } from './useDialogActions';\nimport { renderDialogActions_unstable } from './renderDialogActions';\nimport { useDialogActionsStyles_unstable } from './useDialogActionsStyles';\nimport type { DialogActionsProps } from './DialogActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * `DialogActions` is a container for the actions of the dialog.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogActions: ForwardRefComponent<DialogActionsProps> = React.forwardRef((props, ref) => {\n const state = useDialogActions_unstable(props, ref);\n\n useDialogActionsStyles_unstable(state);\n\n const { useDialogActionsStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogActions_unstable(state);\n});\n\nDialogActions.displayName = 'DialogActions';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,kBAAA,gBAAAD,OAAA;AACA,MAAAE,qBAAA,gBAAAF,OAAA;AACA,MAAAG,wBAAA,gBAAAH,OAAA;AAGA,MAAAI,uBAAA,gBAAAJ,OAAA;AAEA;;;;AAIaK,OAAA,CAAAC,aAAa,gBAA4CP,KAAK,CAACQ,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpG,MAAMC,KAAK,GAAGT,kBAAA,CAAAU,yBAAyB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEnDN,wBAAA,CAAAS,+BAA+B,CAACF,KAAK,CAAC;EAEtC,MAAM;IAAEE,+BAA+B,EAAEC;EAAe,CAAE,GAAGT,uBAAA,CAAAU,4BAA4B,EAAE;EAC3FD,eAAe,CAACH,KAAK,CAAC;EAEtB,OAAOR,qBAAA,CAAAa,4BAA4B,CAACL,KAAK,CAAC;AAC5C,CAAC,CAAC;AAEFL,OAAA,CAAAC,aAAa,CAACU,WAAW,GAAG,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/packages/react-components/react-dialog/src/components/DialogActions/DialogActions.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogActionsSlots = {\n root: Slot<'div'>;\n};\n\nexport type DialogActionsPosition = 'start' | 'end';\n\n/**\n * DialogActions Props\n */\nexport type DialogActionsProps = ComponentProps<DialogActionsSlots> & {\n /**\n * defines the position on the dialog grid of the actions\n * @default 'end'\n */\n position?: DialogActionsPosition;\n};\n\n/**\n * State used in rendering DialogActions\n */\nexport type DialogActionsState = ComponentState<DialogActionsSlots> & {\n position: DialogActionsPosition;\n};\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogActions/index.ts"],"sourcesContent":["export * from './DialogActions';\nexport * from './DialogActions.types';\nexport * from './renderDialogActions';\nexport * from './useDialogActions';\nexport * from './useDialogActionsStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,8BAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","require","react_utilities_1","renderDialogActions_unstable","state","slots","slotProps","getSlots","createElement","root","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogActions/renderDialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogActionsState, DialogActionsSlots } from './DialogActions.types';\n\n/**\n * Render the final JSX of DialogActions\n */\nexport const renderDialogActions_unstable = (state: DialogActionsState) => {\n const { slots, slotProps } = getSlots<DialogActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAGA;;;AAGO,MAAME,4BAA4B,GAAIC,KAAyB,IAAI;EACxE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAqBH,KAAK,CAAC;EAEhE;EACA,OAAOJ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AALYC,OAAA,CAAAP,4BAA4B,GAAAA,4BAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["react_utilities_1","require","useDialogActions_unstable","props","ref","position","components","root","getNativeElementProps","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogActions/useDialogActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DialogActionsProps, DialogActionsState } from './DialogActions.types';\n\n/**\n * Create the state required to render DialogActions.\n *\n * The returned state can be modified with hooks such as useDialogActionsStyles_unstable,\n * before being passed to renderDialogActions_unstable.\n *\n * @param props - props from this instance of DialogActions\n * @param ref - reference to root HTMLElement of DialogActions\n */\nexport const useDialogActions_unstable = (\n props: DialogActionsProps,\n ref: React.Ref<HTMLElement>,\n): DialogActionsState => {\n const { position = 'end' } = props;\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n position,\n };\n};\n"],"mappings":";;;;;;AACA,MAAAA,iBAAA,gBAAAC,OAAA;AAGA;;;;;;;;;AASO,MAAMC,yBAAyB,GAAGA,CACvCC,KAAyB,EACzBC,GAA2B,KACL;EACtB,MAAM;IAAEC,QAAQ,GAAG;EAAK,CAAE,GAAGF,KAAK;EAClC,OAAO;IACLG,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEP,iBAAA,CAAAQ,qBAAqB,CAAC,KAAK,EAAE;MACjCJ,GAAG;MACH,GAAGD;KACJ,CAAC;IACFE;GACD;AACH,CAAC;AAfYI,OAAA,CAAAP,yBAAyB,GAAAA,yBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["react_1","require","constants_1","exports","dialogActionsClassNames","root","useStyles","__styles","Bqenvij","B7ck84d","mc9l5x","i8kkvl","Belr9w4","Bmdcpmo","th9wkt","gridPositionEnd","Bdqf98w","Ijaq50","Br312pm","nk6f5a","Bw0ie65","gridPositionStart","d","m","useDialogActionsStyles_unstable","state","styles","className","mergeClasses","position"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogActions/useDialogActionsStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogActionsSlots, DialogActionsState } from './DialogActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {\n DIALOG_GAP,\n ACTIONS_END_GRID_AREA,\n ACTIONS_START_GRID_AREA,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n} from '../../contexts/constants';\n\nexport const dialogActionsClassNames: SlotClassNames<DialogActionsSlots> = {\n root: 'fui-DialogActions',\n};\n\nconst useStyles = makeStyles({\n root: {\n height: 'fit-content',\n boxSizing: 'border-box',\n display: 'flex',\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n flexDirection: 'column',\n justifySelf: 'stretch',\n },\n },\n gridPositionEnd: {\n justifySelf: 'end',\n ...shorthands.gridArea(ACTIONS_END_GRID_AREA),\n },\n gridPositionStart: {\n justifySelf: 'start',\n ...shorthands.gridArea(ACTIONS_START_GRID_AREA),\n },\n});\n\n/**\n * Apply styling to the DialogActions slots based on the state\n */\nexport const useDialogActionsStyles_unstable = (state: DialogActionsState): DialogActionsState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogActionsClassNames.root,\n styles.root,\n state.position === 'start' && styles.gridPositionStart,\n state.position === 'end' && styles.gridPositionEnd,\n state.root.className,\n );\n return state;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,OAAA,gBAAAC,OAAA;AAGA,MAAAC,WAAA,gBAAAD,OAAA;AAOaE,OAAA,CAAAC,uBAAuB,GAAuC;EACzEC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAGN,OAAA,CAAAO,QAAU;EAAAF,IAAA;IAAAG,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,eAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,iBAAA;IAAAL,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAE,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,EAmB1B;AAEF;;;AAGO,MAAMC,+BAA+B,GAAIC,KAAyB,IAAwB;EAC/F,MAAMC,MAAM,GAAGpB,SAAS,EAAE;EAC1BmB,KAAK,CAACpB,IAAI,CAACsB,SAAS,GAAG3B,OAAA,CAAA4B,YAAY,CACjCzB,OAAA,CAAAC,uBAAuB,CAACC,IAAI,EAC5BqB,MAAM,CAACrB,IAAI,EACXoB,KAAK,CAACI,QAAQ,KAAK,OAAO,IAAIH,MAAM,CAACL,iBAAiB,EACtDI,KAAK,CAACI,QAAQ,KAAK,KAAK,IAAIH,MAAM,CAACX,eAAe,EAClDU,KAAK,CAACpB,IAAI,CAACsB,SAAS,CACrB;EACD,OAAOF,KAAK;AACd,CAAC;AAVYtB,OAAA,CAAAqB,+BAA+B,GAAAA,+BAAA"}
|
|
@@ -8,6 +8,7 @@ const React = /*#__PURE__*/require("react");
|
|
|
8
8
|
const useDialogBody_1 = /*#__PURE__*/require("./useDialogBody");
|
|
9
9
|
const renderDialogBody_1 = /*#__PURE__*/require("./renderDialogBody");
|
|
10
10
|
const useDialogBodyStyles_1 = /*#__PURE__*/require("./useDialogBodyStyles");
|
|
11
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
|
11
12
|
/**
|
|
12
13
|
* The `DialogBody` is a container where the content of the dialog is rendered.
|
|
13
14
|
* Apart from styling, this component does not have other behavior.
|
|
@@ -15,6 +16,10 @@ const useDialogBodyStyles_1 = /*#__PURE__*/require("./useDialogBodyStyles");
|
|
|
15
16
|
exports.DialogBody = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
16
17
|
const state = useDialogBody_1.useDialogBody_unstable(props, ref);
|
|
17
18
|
useDialogBodyStyles_1.useDialogBodyStyles_unstable(state);
|
|
19
|
+
const {
|
|
20
|
+
useDialogBodyStyles_unstable: useCustomStyles
|
|
21
|
+
} = react_shared_contexts_1.useCustomStyleHooks_unstable();
|
|
22
|
+
useCustomStyles(state);
|
|
18
23
|
return renderDialogBody_1.renderDialogBody_unstable(state);
|
|
19
24
|
});
|
|
20
25
|
exports.DialogBody.displayName = 'DialogBody';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","require","useDialogBody_1","renderDialogBody_1","useDialogBodyStyles_1","react_shared_contexts_1","exports","DialogBody","forwardRef","props","ref","state","useDialogBody_unstable","useDialogBodyStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderDialogBody_unstable","displayName"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogBody/DialogBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogBody_unstable } from './useDialogBody';\nimport { renderDialogBody_unstable } from './renderDialogBody';\nimport { useDialogBodyStyles_unstable } from './useDialogBodyStyles';\nimport type { DialogBodyProps } from './DialogBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogBody` is a container where the content of the dialog is rendered.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogBody: ForwardRefComponent<DialogBodyProps> = React.forwardRef((props, ref) => {\n const state = useDialogBody_unstable(props, ref);\n\n useDialogBodyStyles_unstable(state);\n\n const { useDialogBodyStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogBody_unstable(state);\n});\n\nDialogBody.displayName = 'DialogBody';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,eAAA,gBAAAD,OAAA;AACA,MAAAE,kBAAA,gBAAAF,OAAA;AACA,MAAAG,qBAAA,gBAAAH,OAAA;AAGA,MAAAI,uBAAA,gBAAAJ,OAAA;AAEA;;;;AAIaK,OAAA,CAAAC,UAAU,gBAAyCP,KAAK,CAACQ,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9F,MAAMC,KAAK,GAAGT,eAAA,CAAAU,sBAAsB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEhDN,qBAAA,CAAAS,4BAA4B,CAACF,KAAK,CAAC;EAEnC,MAAM;IAAEE,4BAA4B,EAAEC;EAAe,CAAE,GAAGT,uBAAA,CAAAU,4BAA4B,EAAE;EACxFD,eAAe,CAACH,KAAK,CAAC;EAEtB,OAAOR,kBAAA,CAAAa,yBAAyB,CAACL,KAAK,CAAC;AACzC,CAAC,CAAC;AAEFL,OAAA,CAAAC,UAAU,CAACU,WAAW,GAAG,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/packages/react-components/react-dialog/src/components/DialogBody/DialogBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogBodySlots = {\n root: Slot<'div'>;\n};\n\n/**\n * DialogBody Props\n */\nexport type DialogBodyProps = ComponentProps<DialogBodySlots> & {};\n\n/**\n * State used in rendering DialogBody\n */\nexport type DialogBodyState = ComponentState<DialogBodySlots>;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogBody/index.ts"],"sourcesContent":["export * from './DialogBody';\nexport * from './DialogBody.types';\nexport * from './renderDialogBody';\nexport * from './useDialogBody';\nexport * from './useDialogBodyStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,kBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","require","react_utilities_1","renderDialogBody_unstable","state","slots","slotProps","getSlots","createElement","root","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogBody/renderDialogBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogBodyState, DialogBodySlots } from './DialogBody.types';\n\n/**\n * Render the final JSX of DialogBody\n */\nexport const renderDialogBody_unstable = (state: DialogBodyState) => {\n const { slots, slotProps } = getSlots<DialogBodySlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAGA;;;AAGO,MAAME,yBAAyB,GAAIC,KAAsB,IAAI;EAClE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAkBH,KAAK,CAAC;EAE7D;EACA,OAAOJ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AALYC,OAAA,CAAAP,yBAAyB,GAAAA,yBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["react_utilities_1","require","useDialogBody_unstable","props","ref","components","root","getNativeElementProps","_a","as","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogBody/useDialogBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DialogBodyProps, DialogBodyState } from './DialogBody.types';\n\n/**\n * Create the state required to render DialogBody.\n *\n * The returned state can be modified with hooks such as useDialogBodyStyles_unstable,\n * before being passed to renderDialogBody_unstable.\n *\n * @param props - props from this instance of DialogBody\n * @param ref - reference to root HTMLElement of DialogBody\n */\nexport const useDialogBody_unstable = (props: DialogBodyProps, ref: React.Ref<HTMLElement>): DialogBodyState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps(props.as ?? 'div', {\n ref,\n ...props,\n }),\n };\n};\n"],"mappings":";;;;;;AACA,MAAAA,iBAAA,gBAAAC,OAAA;AAGA;;;;;;;;;AASO,MAAMC,sBAAsB,GAAGA,CAACC,KAAsB,EAAEC,GAA2B,KAAqB;;EAC7G,OAAO;IACLC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEN,iBAAA,CAAAO,qBAAqB,CAAC,CAAAC,EAAA,GAAAL,KAAK,CAACM,EAAE,cAAAD,EAAA,cAAAA,EAAA,GAAI,KAAK,EAAE;MAC7CJ,GAAG;MACH,GAAGD;KACJ;GACF;AACH,CAAC;AAVYO,OAAA,CAAAR,sBAAsB,GAAAA,sBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["react_1","require","contexts_1","exports","dialogBodyClassNames","root","useStyles","__styles","mc9l5x","fshzfu","a9b677","Bqenvij","B2u0y6b","Bxyxcbc","B7ck84d","wkccdc","Budl1dq","zoa1oz","B68tc82","Bmxbyg5","i8kkvl","Belr9w4","B5xtmjs","Bqu9lor","B06wobe","d","m","useDialogBodyStyles_unstable","state","styles","className","mergeClasses"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogBody/useDialogBodyStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogBodySlots, DialogBodyState } from './DialogBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {\n ACTIONS_END_GRID_AREA,\n ACTIONS_START_GRID_AREA,\n CONTENT_GRID_AREA,\n DIALOG_GAP,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n SURFACE_PADDING,\n TITLE_ACTION_GRID_AREA,\n TITLE_GRID_AREA,\n} from '../../contexts';\n\nexport const dialogBodyClassNames: SlotClassNames<DialogBodySlots> = {\n root: 'fui-DialogBody',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'grid',\n '&::backdrop': {\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n },\n width: `100%`,\n height: 'fit-content',\n maxWidth: '600px',\n maxHeight: `calc(100vh - 2 * ${SURFACE_PADDING})`,\n boxSizing: 'border-box',\n gridTemplateRows: 'auto 1fr auto',\n gridTemplateColumns: '1fr 1fr auto',\n gridTemplateAreas: `\n \"${TITLE_GRID_AREA} ${TITLE_GRID_AREA} ${TITLE_ACTION_GRID_AREA}\"\n \"${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA}\"\n \"${ACTIONS_START_GRID_AREA} ${ACTIONS_END_GRID_AREA} ${ACTIONS_END_GRID_AREA}\"\n `,\n ...shorthands.overflow('unset'),\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n gridTemplateRows: 'auto 1fr auto auto',\n gridTemplateAreas: `\n \"${TITLE_GRID_AREA} ${TITLE_GRID_AREA} ${TITLE_ACTION_GRID_AREA}\"\n \"${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA}\"\n \"${ACTIONS_START_GRID_AREA} ${ACTIONS_START_GRID_AREA} ${ACTIONS_START_GRID_AREA}\"\n \"${ACTIONS_END_GRID_AREA} ${ACTIONS_END_GRID_AREA} ${ACTIONS_END_GRID_AREA}\"\n `,\n },\n },\n});\n\n/**\n * Apply styling to the DialogBody slots based on the state\n */\nexport const useDialogBodyStyles_unstable = (state: DialogBodyState): DialogBodyState => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogBodyClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,OAAA,gBAAAC,OAAA;AAGA,MAAAC,UAAA,gBAAAD,OAAA;AAWaE,OAAA,CAAAC,oBAAoB,GAAoC;EACnEC,IAAI,EAAE;CACP;AAED;;;AAGA,MAAMC,SAAS,gBAAGN,OAAA,CAAAO,QAAU;EAAAF,IAAA;IAAAG,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,EA+B1B;AAEF;;;AAGO,MAAMC,4BAA4B,GAAIC,KAAsB,IAAqB;EACtF,MAAMC,MAAM,GAAGvB,SAAS,EAAE;EAC1BsB,KAAK,CAACvB,IAAI,CAACyB,SAAS,GAAG9B,OAAA,CAAA+B,YAAY,CAAC5B,OAAA,CAAAC,oBAAoB,CAACC,IAAI,EAAEwB,MAAM,CAACxB,IAAI,EAAEuB,KAAK,CAACvB,IAAI,CAACyB,SAAS,CAAC;EAEjG,OAAOF,KAAK;AACd,CAAC;AALYzB,OAAA,CAAAwB,4BAA4B,GAAAA,4BAAA"}
|
|
@@ -8,6 +8,7 @@ const React = /*#__PURE__*/require("react");
|
|
|
8
8
|
const useDialogContent_1 = /*#__PURE__*/require("./useDialogContent");
|
|
9
9
|
const renderDialogContent_1 = /*#__PURE__*/require("./renderDialogContent");
|
|
10
10
|
const useDialogContentStyles_1 = /*#__PURE__*/require("./useDialogContentStyles");
|
|
11
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
|
11
12
|
/**
|
|
12
13
|
* The `DialogContent` is a container where the content of the dialog is rendered.
|
|
13
14
|
* Apart from styling, this component does not have other behavior.
|
|
@@ -15,6 +16,10 @@ const useDialogContentStyles_1 = /*#__PURE__*/require("./useDialogContentStyles"
|
|
|
15
16
|
exports.DialogContent = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
16
17
|
const state = useDialogContent_1.useDialogContent_unstable(props, ref);
|
|
17
18
|
useDialogContentStyles_1.useDialogContentStyles_unstable(state);
|
|
19
|
+
const {
|
|
20
|
+
useDialogContentStyles_unstable: useCustomStyles
|
|
21
|
+
} = react_shared_contexts_1.useCustomStyleHooks_unstable();
|
|
22
|
+
useCustomStyles(state);
|
|
18
23
|
return renderDialogContent_1.renderDialogContent_unstable(state);
|
|
19
24
|
});
|
|
20
25
|
exports.DialogContent.displayName = 'DialogContent';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","require","useDialogContent_1","renderDialogContent_1","useDialogContentStyles_1","react_shared_contexts_1","exports","DialogContent","forwardRef","props","ref","state","useDialogContent_unstable","useDialogContentStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderDialogContent_unstable","displayName"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogContent/DialogContent.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogContent_unstable } from './useDialogContent';\nimport { renderDialogContent_unstable } from './renderDialogContent';\nimport { useDialogContentStyles_unstable } from './useDialogContentStyles';\nimport type { DialogContentProps } from './DialogContent.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogContent` is a container where the content of the dialog is rendered.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogContent: ForwardRefComponent<DialogContentProps> = React.forwardRef((props, ref) => {\n const state = useDialogContent_unstable(props, ref);\n\n useDialogContentStyles_unstable(state);\n\n const { useDialogContentStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogContent_unstable(state);\n});\n\nDialogContent.displayName = 'DialogContent';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,kBAAA,gBAAAD,OAAA;AACA,MAAAE,qBAAA,gBAAAF,OAAA;AACA,MAAAG,wBAAA,gBAAAH,OAAA;AAGA,MAAAI,uBAAA,gBAAAJ,OAAA;AAEA;;;;AAIaK,OAAA,CAAAC,aAAa,gBAA4CP,KAAK,CAACQ,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpG,MAAMC,KAAK,GAAGT,kBAAA,CAAAU,yBAAyB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEnDN,wBAAA,CAAAS,+BAA+B,CAACF,KAAK,CAAC;EAEtC,MAAM;IAAEE,+BAA+B,EAAEC;EAAe,CAAE,GAAGT,uBAAA,CAAAU,4BAA4B,EAAE;EAC3FD,eAAe,CAACH,KAAK,CAAC;EAEtB,OAAOR,qBAAA,CAAAa,4BAA4B,CAACL,KAAK,CAAC;AAC5C,CAAC,CAAC;AAEFL,OAAA,CAAAC,aAAa,CAACU,WAAW,GAAG,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/packages/react-components/react-dialog/src/components/DialogContent/DialogContent.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogContentSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * DialogContent Props\n */\nexport type DialogContentProps = ComponentProps<DialogContentSlots>;\n\n/**\n * State used in rendering DialogContent\n */\nexport type DialogContentState = ComponentState<DialogContentSlots>;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogContent/index.ts"],"sourcesContent":["export * from './DialogContent';\nexport * from './DialogContent.types';\nexport * from './renderDialogContent';\nexport * from './useDialogContent';\nexport * from './useDialogContentStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,8BAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","require","react_utilities_1","renderDialogContent_unstable","state","slots","slotProps","getSlots","createElement","root","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogContent/renderDialogContent.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogContentState, DialogContentSlots } from './DialogContent.types';\n\n/**\n * Render the final JSX of DialogContent\n */\nexport const renderDialogContent_unstable = (state: DialogContentState) => {\n const { slots, slotProps } = getSlots<DialogContentSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAGA;;;AAGO,MAAME,4BAA4B,GAAIC,KAAyB,IAAI;EACxE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAqBH,KAAK,CAAC;EAEhE,OAAOJ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AAJYC,OAAA,CAAAP,4BAA4B,GAAAA,4BAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["react_utilities_1","require","useDialogContent_unstable","props","ref","components","root","getNativeElementProps","_a","as","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogContent/useDialogContent.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { DialogContentProps, DialogContentState } from './DialogContent.types';\n\n/**\n * Create the state required to render DialogBody.\n *\n * The returned state can be modified with hooks such as useDialogBodyStyles_unstable,\n * before being passed to renderDialogBody_unstable.\n *\n * @param props - props from this instance of DialogBody\n * @param ref - reference to root HTMLElement of DialogBody\n */\nexport const useDialogContent_unstable = (\n props: DialogContentProps,\n ref: React.Ref<HTMLElement>,\n): DialogContentState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps(props.as ?? 'div', {\n ref,\n ...props,\n }),\n };\n};\n"],"mappings":";;;;;;AACA,MAAAA,iBAAA,gBAAAC,OAAA;AAGA;;;;;;;;;AASO,MAAMC,yBAAyB,GAAGA,CACvCC,KAAyB,EACzBC,GAA2B,KACL;;EACtB,OAAO;IACLC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEN,iBAAA,CAAAO,qBAAqB,CAAC,CAAAC,EAAA,GAAAL,KAAK,CAACM,EAAE,cAAAD,EAAA,cAAAA,EAAA,GAAI,KAAK,EAAE;MAC7CJ,GAAG;MACH,GAAGD;KACJ;GACF;AACH,CAAC;AAbYO,OAAA,CAAAR,yBAAyB,GAAAA,yBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["react_1","require","constants_1","react_theme_1","exports","dialogContentClassNames","root","useStyles","__styles","a9b677","Bqenvij","Bmxbyg5","sshi5w","B7ck84d","Ijaq50","Br312pm","nk6f5a","Bw0ie65","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","useDialogContentStyles_unstable","state","styles","className","mergeClasses"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogContent/useDialogContentStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogContentSlots, DialogContentState } from './DialogContent.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { CONTENT_GRID_AREA } from '../../contexts/constants';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const dialogContentClassNames: SlotClassNames<DialogContentSlots> = {\n root: 'fui-DialogContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%',\n overflowY: 'auto',\n minHeight: '32px',\n boxSizing: 'border-box',\n ...shorthands.gridArea(CONTENT_GRID_AREA),\n ...typographyStyles.body1,\n },\n});\n\n/**\n * Apply styling to the DialogContent slots based on the state\n */\nexport const useDialogContentStyles_unstable = (state: DialogContentState): DialogContentState => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogContentClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,OAAA,gBAAAC,OAAA;AAGA,MAAAC,WAAA,gBAAAD,OAAA;AACA,MAAAE,aAAA,gBAAAF,OAAA;AAEaG,OAAA,CAAAC,uBAAuB,GAAuC;EACzEC,IAAI,EAAE;CACP;AAED;;;AAGA,MAAMC,SAAS,gBAAGP,OAAA,CAAAQ,QAAU;EAAAF,IAAA;IAAAG,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAU1B;AAEF;;;AAGO,MAAMC,+BAA+B,GAAIC,KAAyB,IAAwB;EAC/F,MAAMC,MAAM,GAAGlB,SAAS,EAAE;EAC1BiB,KAAK,CAAClB,IAAI,CAACoB,SAAS,GAAG1B,OAAA,CAAA2B,YAAY,CAACvB,OAAA,CAAAC,uBAAuB,CAACC,IAAI,EAAEmB,MAAM,CAACnB,IAAI,EAAEkB,KAAK,CAAClB,IAAI,CAACoB,SAAS,CAAC;EACpG,OAAOF,KAAK;AACd,CAAC;AAJYpB,OAAA,CAAAmB,+BAA+B,GAAAA,+BAAA"}
|
|
@@ -9,6 +9,7 @@ const useDialogSurface_1 = /*#__PURE__*/require("./useDialogSurface");
|
|
|
9
9
|
const renderDialogSurface_1 = /*#__PURE__*/require("./renderDialogSurface");
|
|
10
10
|
const useDialogSurfaceStyles_1 = /*#__PURE__*/require("./useDialogSurfaceStyles");
|
|
11
11
|
const useDialogSurfaceContextValues_1 = /*#__PURE__*/require("./useDialogSurfaceContextValues");
|
|
12
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
|
12
13
|
/**
|
|
13
14
|
* DialogSurface component represents the visual part of a `Dialog` as a whole,
|
|
14
15
|
* it contains everything that should be visible.
|
|
@@ -17,6 +18,10 @@ exports.DialogSurface = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
17
18
|
const state = useDialogSurface_1.useDialogSurface_unstable(props, ref);
|
|
18
19
|
const contextValues = useDialogSurfaceContextValues_1.useDialogSurfaceContextValues_unstable(state);
|
|
19
20
|
useDialogSurfaceStyles_1.useDialogSurfaceStyles_unstable(state);
|
|
21
|
+
const {
|
|
22
|
+
useDialogSurfaceStyles_unstable: useCustomStyles
|
|
23
|
+
} = react_shared_contexts_1.useCustomStyleHooks_unstable();
|
|
24
|
+
useCustomStyles(state);
|
|
20
25
|
return renderDialogSurface_1.renderDialogSurface_unstable(state, contextValues);
|
|
21
26
|
});
|
|
22
27
|
exports.DialogSurface.displayName = 'DialogSurface';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","require","useDialogSurface_1","renderDialogSurface_1","useDialogSurfaceStyles_1","useDialogSurfaceContextValues_1","react_shared_contexts_1","exports","DialogSurface","forwardRef","props","ref","state","useDialogSurface_unstable","contextValues","useDialogSurfaceContextValues_unstable","useDialogSurfaceStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderDialogSurface_unstable","displayName"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogSurface/DialogSurface.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles';\nimport type { DialogSurfaceProps } from './DialogSurface.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DialogSurface component represents the visual part of a `Dialog` as a whole,\n * it contains everything that should be visible.\n */\nexport const DialogSurface: ForwardRefComponent<DialogSurfaceProps> = React.forwardRef((props, ref) => {\n const state = useDialogSurface_unstable(props, ref);\n const contextValues = useDialogSurfaceContextValues_unstable(state);\n\n useDialogSurfaceStyles_unstable(state);\n\n const { useDialogSurfaceStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogSurface_unstable(state, contextValues);\n});\n\nDialogSurface.displayName = 'DialogSurface';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,kBAAA,gBAAAD,OAAA;AACA,MAAAE,qBAAA,gBAAAF,OAAA;AACA,MAAAG,wBAAA,gBAAAH,OAAA;AAGA,MAAAI,+BAAA,gBAAAJ,OAAA;AACA,MAAAK,uBAAA,gBAAAL,OAAA;AAEA;;;;AAIaM,OAAA,CAAAC,aAAa,gBAA4CR,KAAK,CAACS,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpG,MAAMC,KAAK,GAAGV,kBAAA,CAAAW,yBAAyB,CAACH,KAAK,EAAEC,GAAG,CAAC;EACnD,MAAMG,aAAa,GAAGT,+BAAA,CAAAU,sCAAsC,CAACH,KAAK,CAAC;EAEnER,wBAAA,CAAAY,+BAA+B,CAACJ,KAAK,CAAC;EAEtC,MAAM;IAAEI,+BAA+B,EAAEC;EAAe,CAAE,GAAGX,uBAAA,CAAAY,4BAA4B,EAAE;EAC3FD,eAAe,CAACL,KAAK,CAAC;EAEtB,OAAOT,qBAAA,CAAAgB,4BAA4B,CAACP,KAAK,EAAEE,aAAa,CAAC;AAC3D,CAAC,CAAC;AAEFP,OAAA,CAAAC,aAAa,CAACY,WAAW,GAAG,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/packages/react-components/react-dialog/src/components/DialogSurface/DialogSurface.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { DialogSurfaceContextValue } from '../../contexts';\n\nexport type DialogSurfaceSlots = {\n /**\n * Dimmed background of dialog.\n * The default backdrop is rendered as a `<div>` with styling.\n * This slot expects a `<div>` element which will replace the default backdrop.\n * The backdrop should have `aria-hidden=\"true\"`.\n *\n * By default if `DialogSurface` is `<dialog>` element the backdrop is ignored,\n * since native `<dialog>` element supports [::backdrop](https://developer.mozilla.org/en-US/docs/Web/CSS/::backdrop)\n */\n backdrop?: Slot<'div'>;\n root: Slot<'div'>;\n};\n\n/**\n * Union between all possible semantic element that represent a DialogSurface\n */\nexport type DialogSurfaceElement = HTMLDialogElement | HTMLDivElement;\n\n/** @internal */\nexport type DialogSurfaceElementIntersection = HTMLDialogElement & HTMLDivElement;\n\n/**\n * DialogSurface Props\n *\n * Omits basic types from native `dialog` (`open`, `onCancel` and `onClose`)\n * to ensure `onOpenChange`, `open` and `defaultOpen` from `Dialog` is used instead\n */\nexport type DialogSurfaceProps = Omit<ComponentProps<DialogSurfaceSlots>, 'open' | 'onCancel' | 'onClose'>;\n\nexport type DialogSurfaceContextValues = {\n dialogSurface: DialogSurfaceContextValue;\n};\n\n/**\n * State used in rendering DialogSurface\n */\nexport type DialogSurfaceState = ComponentState<DialogSurfaceSlots>;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogSurface/index.ts"],"sourcesContent":["export * from './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,8BAAAC,OAAA"}
|