@fluentui/react-dialog 9.1.5 → 9.1.7
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 +113 -1
- package/CHANGELOG.md +30 -2
- package/lib/components/Dialog/Dialog.js +0 -1
- package/lib/components/Dialog/Dialog.js.map +1 -1
- package/lib/components/Dialog/renderDialog.js +0 -1
- package/lib/components/Dialog/renderDialog.js.map +1 -1
- package/lib/components/Dialog/useDialog.js +2 -8
- package/lib/components/Dialog/useDialog.js.map +1 -1
- package/lib/components/Dialog/useDialogContextValues.js +0 -1
- package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib/components/DialogActions/DialogActions.js +0 -1
- package/lib/components/DialogActions/DialogActions.js.map +1 -1
- package/lib/components/DialogActions/renderDialogActions.js +4 -4
- package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActions.js +0 -1
- package/lib/components/DialogActions/useDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActionsStyles.js +24 -27
- package/lib/components/DialogActions/useDialogActionsStyles.js.map +1 -1
- package/lib/components/DialogBody/DialogBody.js +0 -1
- package/lib/components/DialogBody/DialogBody.js.map +1 -1
- package/lib/components/DialogBody/renderDialogBody.js +4 -4
- package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib/components/DialogBody/useDialogBody.js +0 -2
- package/lib/components/DialogBody/useDialogBody.js.map +1 -1
- package/lib/components/DialogBody/useDialogBodyStyles.js +23 -26
- package/lib/components/DialogBody/useDialogBodyStyles.js.map +1 -1
- package/lib/components/DialogContent/DialogContent.js +0 -1
- package/lib/components/DialogContent/DialogContent.js.map +1 -1
- package/lib/components/DialogContent/renderDialogContent.js +2 -2
- package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib/components/DialogContent/useDialogContent.js +0 -2
- package/lib/components/DialogContent/useDialogContent.js.map +1 -1
- package/lib/components/DialogContent/useDialogContentStyles.js +15 -18
- package/lib/components/DialogContent/useDialogContentStyles.js.map +1 -1
- package/lib/components/DialogSurface/DialogSurface.js +0 -1
- package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/renderDialogSurface.js +4 -3
- package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurface.js +2 -7
- package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceStyles.js +92 -97
- package/lib/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
- package/lib/components/DialogTitle/DialogTitle.js +0 -1
- package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/renderDialogTitle.js +4 -3
- package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitle.js +0 -1
- package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitleStyles.js +74 -80
- package/lib/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
- package/lib/components/DialogTrigger/DialogTrigger.js +2 -3
- package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/useDialogTrigger.js +4 -5
- package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib/contexts/dialogContext.js +2 -4
- package/lib/contexts/dialogContext.js.map +1 -1
- package/lib/contexts/dialogSurfaceContext.js +0 -1
- package/lib/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/isEscapeKeyDown.js +0 -1
- package/lib/utils/isEscapeKeyDown.js.map +1 -1
- package/lib/utils/useDisableBodyScroll.js +0 -9
- package/lib/utils/useDisableBodyScroll.js.map +1 -1
- package/lib/utils/useFocusFirstElement.js +0 -5
- package/lib/utils/useFocusFirstElement.js.map +1 -1
- package/lib-commonjs/Dialog.js +0 -2
- package/lib-commonjs/Dialog.js.map +1 -1
- package/lib-commonjs/DialogActions.js +0 -2
- package/lib-commonjs/DialogActions.js.map +1 -1
- package/lib-commonjs/DialogBody.js +0 -2
- package/lib-commonjs/DialogBody.js.map +1 -1
- package/lib-commonjs/DialogContent.js +0 -2
- package/lib-commonjs/DialogContent.js.map +1 -1
- package/lib-commonjs/DialogSurface.js +0 -2
- package/lib-commonjs/DialogSurface.js.map +1 -1
- package/lib-commonjs/DialogTitle.js +0 -2
- package/lib-commonjs/DialogTitle.js.map +1 -1
- package/lib-commonjs/DialogTrigger.js +0 -2
- package/lib-commonjs/DialogTrigger.js.map +1 -1
- package/lib-commonjs/components/Dialog/Dialog.js +0 -6
- 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 +0 -5
- package/lib-commonjs/components/Dialog/index.js.map +1 -1
- package/lib-commonjs/components/Dialog/renderDialog.js +0 -5
- package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialog.js +2 -15
- package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialogContextValues.js +0 -3
- package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogActions/DialogActions.js +0 -6
- 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 +0 -6
- package/lib-commonjs/components/DialogActions/index.js.map +1 -1
- package/lib-commonjs/components/DialogActions/renderDialogActions.js +4 -8
- package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActions.js +0 -4
- package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js +24 -31
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js.map +1 -1
- package/lib-commonjs/components/DialogBody/DialogBody.js +0 -6
- 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 +0 -6
- package/lib-commonjs/components/DialogBody/index.js.map +1 -1
- package/lib-commonjs/components/DialogBody/renderDialogBody.js +4 -8
- package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBody.js +0 -5
- package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js +23 -30
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js.map +1 -1
- package/lib-commonjs/components/DialogContent/DialogContent.js +0 -6
- 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 +0 -6
- package/lib-commonjs/components/DialogContent/index.js.map +1 -1
- package/lib-commonjs/components/DialogContent/renderDialogContent.js +2 -6
- package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContent.js +0 -5
- package/lib-commonjs/components/DialogContent/useDialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.js +15 -23
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/DialogSurface.js +0 -7
- 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 +0 -6
- package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +4 -9
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js +2 -13
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js +0 -2
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js +92 -103
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/DialogTitle.js +0 -6
- 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 +0 -6
- package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +4 -7
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js +0 -10
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js +74 -86
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.js +2 -7
- 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 +0 -5
- package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js +0 -2
- package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +4 -11
- 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 +2 -8
- package/lib-commonjs/contexts/dialogContext.js.map +1 -1
- package/lib-commonjs/contexts/dialogSurfaceContext.js +0 -5
- package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib-commonjs/contexts/index.js +0 -4
- package/lib-commonjs/contexts/index.js.map +1 -1
- package/lib-commonjs/index.js +0 -14
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/index.js +0 -4
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/isEscapeKeyDown.js +0 -4
- package/lib-commonjs/utils/isEscapeKeyDown.js.map +1 -1
- package/lib-commonjs/utils/useDisableBodyScroll.js +0 -14
- package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -1
- package/lib-commonjs/utils/useFocusFirstElement.js +0 -10
- package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;AAQO,MAAMA,kBAAkB,GAAIC,KAAkB,IAAiB;EACpE,MAAM;IAAEC,QAAQ;IAAEC,SAAS,GAAG,OAAO;IAAEC;EAAY,CAAE,GAAGH,KAAK;EAE7D,MAAM,CAACI,OAAO,EAAEC,OAAO,CAAC,GAAGC,2BAA2B,CAACL,QAAQ,CAAC;EAEhE,MAAM,CAACM,IAAI,EAAEC,OAAO,CAAC,GAAGC,sCAAoB,CAAC;IAC3CC,KAAK,EAAEV,KAAK,CAACO,IAAI;IACjBI,YAAY,EAAEX,KAAK,CAACY,WAAW;IAC/BC,YAAY,EAAE;GACf,CAAC;EAEF,MAAMC,iBAAiB,GAAGL,kCAAgB,CAAEM,IAA0B,IAAI;IACxEZ,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAGY,IAAI,CAACC,KAAK,EAAED,IAAI,CAAC;IAEhC;IACA;IACA,IAAI,CAACA,IAAI,CAACC,KAAK,CAACC,kBAAkB,EAAE,EAAE;MACpCT,OAAO,CAACO,IAAI,CAACR,IAAI,CAAC;;EAEtB,CAAC,CAAC;EAEF,MAAMW,QAAQ,GAAGC,4BAAoB,CAACZ,IAAI,EAAEL,SAAS,CAAC;EACtD,MAAMkB,iBAAiB,GAAGD,4BAAoB,EAAE;EAChD,MAAME,kBAAkB,GAAGC,OAAO,CAACf,IAAI,IAAIL,SAAS,KAAK,WAAW,CAAC;EAErEO,2CAAyB,CAAC,MAAK;IAC7B,IAAIY,kBAAkB,EAAE;MACtB,OAAOD,iBAAiB,EAAE;;EAE9B,CAAC,EAAE,CAACA,iBAAiB,EAAEC,kBAAkB,CAAC,CAAC;EAE3C,OAAO;IACLE,UAAU,EAAE;MACVC,QAAQ,EAAE;KACX;IACDjB,IAAI;IACJL,SAAS;IACTG,OAAO,EAAEE,IAAI,GAAGF,OAAO,GAAG,IAAI;IAC9BD,OAAO;IACPU,iBAAiB;IACjBW,aAAa,EAAEhB,uBAAK,CAAC,eAAe,CAAC;IACrCiB,cAAc,EAAEC,4CAAmB,CAACC,wBAAa,CAAC;IAClDC,SAAS,EAAEX;GACZ;AACH,CAAC;AA5CYY,0BAAkB;AA8C/B;;;AAGA,SAASxB,2BAA2B,CAClCL,QAAyB;EAEzB,MAAM8B,aAAa,GAAGC,KAAK,CAACC,QAAQ,CAACC,OAAO,CAACjC,QAAQ,CAAyB;EAC9E,IAAIkC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAIN,aAAa,CAACO,MAAM,KAAK,CAAC,IAAIP,aAAa,CAACO,MAAM,KAAK,CAAC,EAAE;MAC5D;MACAC,OAAO,CAACC,IAAI,CACV,4DAA4D,GAC1D,4EAA4E,CAC/E;;;EAGL,QAAQT,aAAa,CAACO,MAAM;IAC1B;IACA,KAAK,CAAC;MACJ,OAAOP,aAAqE;IAC9E;IACA,KAAK,CAAC;MACJ,OAAO,CAACU,SAAS,EAAEV,aAAa,CAAC,CAAC,CAAC,CAAC;IACtC;IACA;MACE,OAAO,CAACU,SAAS,EAAEA,SAAS,CAAC;EAAC;AAEpC","names":["useDialog_unstable","props","children","modalType","onOpenChange","trigger","content","childrenToTriggerAndContent","open","setOpen","react_utilities_1","state","defaultState","defaultOpen","initialState","requestOpenChange","data","event","isDefaultPrevented","focusRef","utils_1","disableBodyScroll","isBodyScrollLocked","Boolean","components","backdrop","dialogTitleId","isNestedDialog","react_context_selector_1","contexts_1","dialogRef","exports","childrenArray","React","Children","toArray","process","env","NODE_ENV","length","console","warn","undefined"],"sourceRoot":"../src/","sources":["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 } = 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 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"]}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useDialogContextValues_unstable = void 0;
|
|
7
|
-
|
|
8
7
|
function useDialogContextValues_unstable(state) {
|
|
9
8
|
const {
|
|
10
9
|
modalType,
|
|
@@ -18,7 +17,6 @@ function useDialogContextValues_unstable(state) {
|
|
|
18
17
|
* This context is created with "@fluentui/react-context-selector",
|
|
19
18
|
* there is no sense to memoize it
|
|
20
19
|
*/
|
|
21
|
-
|
|
22
20
|
const dialog = {
|
|
23
21
|
open,
|
|
24
22
|
modalType,
|
|
@@ -33,6 +31,5 @@ function useDialogContextValues_unstable(state) {
|
|
|
33
31
|
dialogSurface
|
|
34
32
|
};
|
|
35
33
|
}
|
|
36
|
-
|
|
37
34
|
exports.useDialogContextValues_unstable = useDialogContextValues_unstable;
|
|
38
35
|
//# sourceMappingURL=useDialogContextValues.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAGA,SAAgBA,+BAA+B,CAACC,KAAkB;EAChE,MAAM;IAAEC,SAAS;IAAEC,IAAI;IAAEC,SAAS;IAAEC,aAAa;IAAEC,cAAc;IAAEC;EAAiB,CAAE,GAAGN,KAAK;EAE9F;;;;EAIA,MAAMO,MAAM,GAAuB;IACjCL,IAAI;IACJD,SAAS;IACTE,SAAS;IACTC,aAAa;IACbC,cAAc;IACdC;GACD;EAED,MAAME,aAAa,GAA8B,KAAK;EAEtD,OAAO;IAAED,MAAM;IAAEC;EAAa,CAAE;AAClC;AAnBAC","names":["useDialogContextValues_unstable","state","modalType","open","dialogRef","dialogTitleId","isNestedDialog","requestOpenChange","dialog","dialogSurface","exports"],"sourceRoot":"../src/","sources":["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, 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 requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"]}
|
|
@@ -4,20 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DialogActions = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const useDialogActions_1 = /*#__PURE__*/require("./useDialogActions");
|
|
11
|
-
|
|
12
9
|
const renderDialogActions_1 = /*#__PURE__*/require("./renderDialogActions");
|
|
13
|
-
|
|
14
10
|
const useDialogActionsStyles_1 = /*#__PURE__*/require("./useDialogActionsStyles");
|
|
15
11
|
/**
|
|
16
12
|
* `DialogActions` is a container for the actions of the dialog.
|
|
17
13
|
* Apart from styling, this component does not have other behavior.
|
|
18
14
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
15
|
exports.DialogActions = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
22
16
|
const state = useDialogActions_1.useDialogActions_unstable(props, ref);
|
|
23
17
|
useDialogActionsStyles_1.useDialogActionsStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;;AAIaA,qBAAa,gBAA4CC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpG,MAAMC,KAAK,GAAGC,4CAAyB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEnDG,wDAA+B,CAACF,KAAK,CAAC;EACtC,OAAOG,kDAA4B,CAACH,KAAK,CAAC;AAC5C,CAAC,CAAC;AAEFL,qBAAa,CAACS,WAAW,GAAG,eAAe","names":["exports","React","forwardRef","props","ref","state","useDialogActions_1","useDialogActionsStyles_1","renderDialogActions_1","displayName"],"sourceRoot":"../src/","sources":["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';\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 return renderDialogActions_unstable(state);\n});\n\nDialogActions.displayName = 'DialogActions';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
|
|
@@ -3,16 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
8
|
-
|
|
9
7
|
tslib_1.__exportStar(require("./DialogActions"), exports);
|
|
10
|
-
|
|
11
8
|
tslib_1.__exportStar(require("./DialogActions.types"), exports);
|
|
12
|
-
|
|
13
9
|
tslib_1.__exportStar(require("./renderDialogActions"), exports);
|
|
14
|
-
|
|
15
10
|
tslib_1.__exportStar(require("./useDialogActions"), exports);
|
|
16
|
-
|
|
17
11
|
tslib_1.__exportStar(require("./useDialogActionsStyles"), exports);
|
|
18
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogActions/index.ts"],"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -4,24 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.renderDialogActions_unstable = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
11
9
|
/**
|
|
12
10
|
* Render the final JSX of DialogActions
|
|
13
11
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
12
|
const renderDialogActions_unstable = state => {
|
|
17
13
|
const {
|
|
18
14
|
slots,
|
|
19
15
|
slotProps
|
|
20
|
-
} = react_utilities_1.getSlots(state);
|
|
21
|
-
|
|
22
|
-
return React.createElement(slots.root, {
|
|
16
|
+
} = react_utilities_1.getSlots(state);
|
|
17
|
+
// TODO Add additional slots in the appropriate place
|
|
18
|
+
return React.createElement(slots.root, {
|
|
19
|
+
...slotProps.root
|
|
23
20
|
});
|
|
24
21
|
};
|
|
25
|
-
|
|
26
22
|
exports.renderDialogActions_unstable = renderDialogActions_unstable;
|
|
27
23
|
//# sourceMappingURL=renderDialogActions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;AAGO,MAAMA,4BAA4B,GAAIC,KAAyB,IAAI;EACxE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAqBH,KAAK,CAAC;EAEhE;EACA,OAAOI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AALYC,oCAA4B","names":["renderDialogActions_unstable","state","slots","slotProps","react_utilities_1","React","root","exports"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useDialogActions_unstable = void 0;
|
|
7
|
-
|
|
8
7
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
9
8
|
/**
|
|
10
9
|
* Create the state required to render DialogActions.
|
|
@@ -15,8 +14,6 @@ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
|
15
14
|
* @param props - props from this instance of DialogActions
|
|
16
15
|
* @param ref - reference to root HTMLElement of DialogActions
|
|
17
16
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
17
|
const useDialogActions_unstable = (props, ref) => {
|
|
21
18
|
const {
|
|
22
19
|
position = 'end'
|
|
@@ -32,6 +29,5 @@ const useDialogActions_unstable = (props, ref) => {
|
|
|
32
29
|
position
|
|
33
30
|
};
|
|
34
31
|
};
|
|
35
|
-
|
|
36
32
|
exports.useDialogActions_unstable = useDialogActions_unstable;
|
|
37
33
|
//# sourceMappingURL=useDialogActions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AACA;AAGA;;;;;;;;;AASO,MAAMA,yBAAyB,GAAG,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,EAAEC,uCAAqB,CAAC,KAAK,EAAE;MACjCJ,GAAG;MACH,GAAGD;KACJ,CAAC;IACFE;GACD;AACH,CAAC;AAfYI,iCAAyB","names":["useDialogActions_unstable","props","ref","position","components","root","react_utilities_1","exports"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -4,57 +4,50 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useDialogActionsStyles_unstable = exports.dialogActionsClassNames = void 0;
|
|
7
|
-
|
|
8
7
|
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
9
|
-
|
|
10
8
|
const constants_1 = /*#__PURE__*/require("../../contexts/constants");
|
|
11
|
-
|
|
12
9
|
exports.dialogActionsClassNames = {
|
|
13
10
|
root: 'fui-DialogActions'
|
|
14
11
|
};
|
|
15
|
-
|
|
16
12
|
const useStyles = /*#__PURE__*/react_1.__styles({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
root: {
|
|
14
|
+
Bqenvij: "f3052tw",
|
|
15
|
+
B7ck84d: "f1ewtqcl",
|
|
16
|
+
mc9l5x: "f22iagw",
|
|
17
|
+
i8kkvl: "f4px1ci",
|
|
18
|
+
Belr9w4: "fn67r4l",
|
|
19
|
+
Bmdcpmo: "f6glcwc",
|
|
20
|
+
th9wkt: "f1e3st1r"
|
|
25
21
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
gridPositionEnd: {
|
|
23
|
+
Bdqf98w: "f1a7i8kp",
|
|
24
|
+
Ijaq50: "f11u0jfc",
|
|
25
|
+
Br312pm: "f1d6tb1o",
|
|
26
|
+
nk6f5a: "f23awfp",
|
|
27
|
+
Bw0ie65: "fiappcv"
|
|
32
28
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
gridPositionStart: {
|
|
30
|
+
Bdqf98w: "fsxvdwy",
|
|
31
|
+
Ijaq50: "f1vnb230",
|
|
32
|
+
Br312pm: "f14781pt",
|
|
33
|
+
nk6f5a: "f13d374e",
|
|
34
|
+
Bw0ie65: "f1fjo411"
|
|
39
35
|
}
|
|
40
36
|
}, {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
d: [".f3052tw{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;}", ".f1ewtqcl{box-sizing:border-box;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}", ".fn67r4l{row-gap:8px;}", ".f1a7i8kp{justify-self:end;}", ".f11u0jfc{grid-row-start:actions-end;}", ".f1d6tb1o{grid-column-start:actions-end;}", ".f23awfp{grid-row-end:actions-end;}", ".fiappcv{grid-column-end:actions-end;}", ".fsxvdwy{justify-self:start;}", ".f1vnb230{grid-row-start:actions-start;}", ".f14781pt{grid-column-start:actions-start;}", ".f13d374e{grid-row-end:actions-start;}", ".f1fjo411{grid-column-end:actions-start;}"],
|
|
38
|
+
m: [["@media screen and (max-width: 480px){.f6glcwc{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}}", {
|
|
39
|
+
m: "screen and (max-width: 480px)"
|
|
44
40
|
}], ["@media screen and (max-width: 480px){.f1e3st1r{justify-self:stretch;}}", {
|
|
45
|
-
|
|
41
|
+
m: "screen and (max-width: 480px)"
|
|
46
42
|
}]]
|
|
47
43
|
});
|
|
48
44
|
/**
|
|
49
45
|
* Apply styling to the DialogActions slots based on the state
|
|
50
46
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
47
|
const useDialogActionsStyles_unstable = state => {
|
|
54
48
|
const styles = useStyles();
|
|
55
49
|
state.root.className = react_1.mergeClasses(exports.dialogActionsClassNames.root, styles.root, state.position === 'start' && styles.gridPositionStart, state.position === 'end' && styles.gridPositionEnd, state.root.className);
|
|
56
50
|
return state;
|
|
57
51
|
};
|
|
58
|
-
|
|
59
52
|
exports.useDialogActionsStyles_unstable = useDialogActionsStyles_unstable;
|
|
60
53
|
//# sourceMappingURL=useDialogActionsStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAGA;AAOaA,+BAAuB,GAAuC;EACzEC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAGC,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;AAAA,EAmB1B;AAEF;;;AAGO,MAAMC,+BAA+B,GAAIC,KAAyB,IAAwB;EAC/F,MAAMC,MAAM,GAAGJ,SAAS,EAAE;EAC1BG,KAAK,CAACJ,IAAI,CAACM,SAAS,GAAGJ,oBAAY,CACjCH,+BAAuB,CAACC,IAAI,EAC5BK,MAAM,CAACL,IAAI,EACXI,KAAK,CAACG,QAAQ,KAAK,OAAO,IAAIF,MAAM,CAACG,iBAAiB,EACtDJ,KAAK,CAACG,QAAQ,KAAK,KAAK,IAAIF,MAAM,CAACI,eAAe,EAClDL,KAAK,CAACJ,IAAI,CAACM,SAAS,CACrB;EACD,OAAOF,KAAK;AACd,CAAC;AAVYL,uCAA+B","names":["exports","root","useStyles","react_1","useDialogActionsStyles_unstable","state","styles","className","position","gridPositionStart","gridPositionEnd"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -4,20 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DialogBody = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const useDialogBody_1 = /*#__PURE__*/require("./useDialogBody");
|
|
11
|
-
|
|
12
9
|
const renderDialogBody_1 = /*#__PURE__*/require("./renderDialogBody");
|
|
13
|
-
|
|
14
10
|
const useDialogBodyStyles_1 = /*#__PURE__*/require("./useDialogBodyStyles");
|
|
15
11
|
/**
|
|
16
12
|
* The `DialogBody` is a container where the content of the dialog is rendered.
|
|
17
13
|
* Apart from styling, this component does not have other behavior.
|
|
18
14
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
15
|
exports.DialogBody = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
22
16
|
const state = useDialogBody_1.useDialogBody_unstable(props, ref);
|
|
23
17
|
useDialogBodyStyles_1.useDialogBodyStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;;AAIaA,kBAAU,gBAAyCC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9F,MAAMC,KAAK,GAAGC,sCAAsB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEhDG,kDAA4B,CAACF,KAAK,CAAC;EACnC,OAAOG,4CAAyB,CAACH,KAAK,CAAC;AACzC,CAAC,CAAC;AAEFL,kBAAU,CAACS,WAAW,GAAG,YAAY","names":["exports","React","forwardRef","props","ref","state","useDialogBody_1","useDialogBodyStyles_1","renderDialogBody_1","displayName"],"sourceRoot":"../src/","sources":["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';\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 return renderDialogBody_unstable(state);\n});\n\nDialogBody.displayName = 'DialogBody';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
|
|
@@ -3,16 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
8
|
-
|
|
9
7
|
tslib_1.__exportStar(require("./DialogBody"), exports);
|
|
10
|
-
|
|
11
8
|
tslib_1.__exportStar(require("./DialogBody.types"), exports);
|
|
12
|
-
|
|
13
9
|
tslib_1.__exportStar(require("./renderDialogBody"), exports);
|
|
14
|
-
|
|
15
10
|
tslib_1.__exportStar(require("./useDialogBody"), exports);
|
|
16
|
-
|
|
17
11
|
tslib_1.__exportStar(require("./useDialogBodyStyles"), exports);
|
|
18
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogBody/index.ts"],"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -4,24 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.renderDialogBody_unstable = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
11
9
|
/**
|
|
12
10
|
* Render the final JSX of DialogBody
|
|
13
11
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
12
|
const renderDialogBody_unstable = state => {
|
|
17
13
|
const {
|
|
18
14
|
slots,
|
|
19
15
|
slotProps
|
|
20
|
-
} = react_utilities_1.getSlots(state);
|
|
21
|
-
|
|
22
|
-
return React.createElement(slots.root, {
|
|
16
|
+
} = react_utilities_1.getSlots(state);
|
|
17
|
+
// TODO Add additional slots in the appropriate place
|
|
18
|
+
return React.createElement(slots.root, {
|
|
19
|
+
...slotProps.root
|
|
23
20
|
});
|
|
24
21
|
};
|
|
25
|
-
|
|
26
22
|
exports.renderDialogBody_unstable = renderDialogBody_unstable;
|
|
27
23
|
//# sourceMappingURL=renderDialogBody.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;AAGO,MAAMA,yBAAyB,GAAIC,KAAsB,IAAI;EAClE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAkBH,KAAK,CAAC;EAE7D;EACA,OAAOI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AALYC,iCAAyB","names":["renderDialogBody_unstable","state","slots","slotProps","react_utilities_1","React","root","exports"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useDialogBody_unstable = void 0;
|
|
7
|
-
|
|
8
7
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
9
8
|
/**
|
|
10
9
|
* Create the state required to render DialogBody.
|
|
@@ -15,11 +14,8 @@ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
|
15
14
|
* @param props - props from this instance of DialogBody
|
|
16
15
|
* @param ref - reference to root HTMLElement of DialogBody
|
|
17
16
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
17
|
const useDialogBody_unstable = (props, ref) => {
|
|
21
18
|
var _a;
|
|
22
|
-
|
|
23
19
|
return {
|
|
24
20
|
components: {
|
|
25
21
|
root: 'div'
|
|
@@ -30,6 +26,5 @@ const useDialogBody_unstable = (props, ref) => {
|
|
|
30
26
|
})
|
|
31
27
|
};
|
|
32
28
|
};
|
|
33
|
-
|
|
34
29
|
exports.useDialogBody_unstable = useDialogBody_unstable;
|
|
35
30
|
//# sourceMappingURL=useDialogBody.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AACA;AAGA;;;;;;;;;AASO,MAAMA,sBAAsB,GAAG,CAACC,KAAsB,EAAEC,GAA2B,KAAqB;;EAC7G,OAAO;IACLC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEC,uCAAqB,CAAC,WAAK,CAACC,EAAE,mCAAI,KAAK,EAAE;MAC7CJ,GAAG;MACH,GAAGD;KACJ;GACF;AACH,CAAC;AAVYM,8BAAsB","names":["useDialogBody_unstable","props","ref","components","root","react_utilities_1","as","exports"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -4,58 +4,51 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useDialogBodyStyles_unstable = exports.dialogBodyClassNames = void 0;
|
|
7
|
-
|
|
8
7
|
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
9
|
-
|
|
10
8
|
const contexts_1 = /*#__PURE__*/require("../../contexts");
|
|
11
|
-
|
|
12
9
|
exports.dialogBodyClassNames = {
|
|
13
10
|
root: 'fui-DialogBody'
|
|
14
11
|
};
|
|
15
12
|
/**
|
|
16
13
|
* Styles for the root slot
|
|
17
14
|
*/
|
|
18
|
-
|
|
19
15
|
const useStyles = /*#__PURE__*/react_1.__styles({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
16
|
+
root: {
|
|
17
|
+
mc9l5x: "f13qh94s",
|
|
18
|
+
fshzfu: "f120kxnn",
|
|
19
|
+
a9b677: "fly5x3f",
|
|
20
|
+
Bqenvij: "f3052tw",
|
|
21
|
+
B2u0y6b: "fvgz9i8",
|
|
22
|
+
Bxyxcbc: "flnwrvu",
|
|
23
|
+
B7ck84d: "f1ewtqcl",
|
|
24
|
+
wkccdc: "f874eam",
|
|
25
|
+
Budl1dq: "fjj47a5",
|
|
26
|
+
zoa1oz: "fe34spp",
|
|
27
|
+
B68tc82: "f1ln0qer",
|
|
28
|
+
Bmxbyg5: "fa2wlxz",
|
|
29
|
+
i8kkvl: "f4px1ci",
|
|
30
|
+
Belr9w4: "fn67r4l",
|
|
31
|
+
B5xtmjs: "ff54dml",
|
|
32
|
+
Bqu9lor: "f52bj20",
|
|
33
|
+
B06wobe: "f1dangjo"
|
|
38
34
|
}
|
|
39
35
|
}, {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
d: [".f13qh94s{display:grid;}", ".f120kxnn::backdrop{background-color:rgba(0, 0, 0, 0.4);}", ".fly5x3f{width:100%;}", ".f3052tw{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;}", ".fvgz9i8{max-width:600px;}", ".flnwrvu{max-height:calc(100vh - 2 * 24px);}", ".f1ewtqcl{box-sizing:border-box;}", ".f874eam{grid-template-rows:auto 1fr auto;}", ".fjj47a5{grid-template-columns:1fr 1fr auto;}", ".fe34spp{grid-template-areas:\"title title close-button\" \"body body body\" \"actions-start actions-end actions-end\";}", ".f1ln0qer{overflow-x:unset;}", ".fa2wlxz{overflow-y:unset;}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}", ".fn67r4l{row-gap:8px;}"],
|
|
37
|
+
m: [["@media screen and (max-width: 480px){.ff54dml{max-width:100vw;}}", {
|
|
38
|
+
m: "screen and (max-width: 480px)"
|
|
43
39
|
}], ["@media screen and (max-width: 480px){.f52bj20{grid-template-rows:auto 1fr auto auto;}}", {
|
|
44
|
-
|
|
40
|
+
m: "screen and (max-width: 480px)"
|
|
45
41
|
}], ["@media screen and (max-width: 480px){.f1dangjo{grid-template-areas:\"title title close-button\" \"body body body\" \"actions-start actions-start actions-start\" \"actions-end actions-end actions-end\";}}", {
|
|
46
|
-
|
|
42
|
+
m: "screen and (max-width: 480px)"
|
|
47
43
|
}]]
|
|
48
44
|
});
|
|
49
45
|
/**
|
|
50
46
|
* Apply styling to the DialogBody slots based on the state
|
|
51
47
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
48
|
const useDialogBodyStyles_unstable = state => {
|
|
55
49
|
const styles = useStyles();
|
|
56
50
|
state.root.className = react_1.mergeClasses(exports.dialogBodyClassNames.root, styles.root, state.root.className);
|
|
57
51
|
return state;
|
|
58
52
|
};
|
|
59
|
-
|
|
60
53
|
exports.useDialogBodyStyles_unstable = useDialogBodyStyles_unstable;
|
|
61
54
|
//# sourceMappingURL=useDialogBodyStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAGA;AAWaA,4BAAoB,GAAoC;EACnEC,IAAI,EAAE;CACP;AAED;;;AAGA,MAAMC,SAAS,gBAAGC,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;AAAA,EA+B1B;AAEF;;;AAGO,MAAMC,4BAA4B,GAAIC,KAAsB,IAAqB;EACtF,MAAMC,MAAM,GAAGJ,SAAS,EAAE;EAC1BG,KAAK,CAACJ,IAAI,CAACM,SAAS,GAAGJ,oBAAY,CAACH,4BAAoB,CAACC,IAAI,EAAEK,MAAM,CAACL,IAAI,EAAEI,KAAK,CAACJ,IAAI,CAACM,SAAS,CAAC;EAEjG,OAAOF,KAAK;AACd,CAAC;AALYL,oCAA4B","names":["exports","root","useStyles","react_1","useDialogBodyStyles_unstable","state","styles","className"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -4,20 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DialogContent = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const useDialogContent_1 = /*#__PURE__*/require("./useDialogContent");
|
|
11
|
-
|
|
12
9
|
const renderDialogContent_1 = /*#__PURE__*/require("./renderDialogContent");
|
|
13
|
-
|
|
14
10
|
const useDialogContentStyles_1 = /*#__PURE__*/require("./useDialogContentStyles");
|
|
15
11
|
/**
|
|
16
12
|
* The `DialogContent` is a container where the content of the dialog is rendered.
|
|
17
13
|
* Apart from styling, this component does not have other behavior.
|
|
18
14
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
15
|
exports.DialogContent = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
22
16
|
const state = useDialogContent_1.useDialogContent_unstable(props, ref);
|
|
23
17
|
useDialogContentStyles_1.useDialogContentStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;;AAIaA,qBAAa,gBAA4CC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpG,MAAMC,KAAK,GAAGC,4CAAyB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEnDG,wDAA+B,CAACF,KAAK,CAAC;EACtC,OAAOG,kDAA4B,CAACH,KAAK,CAAC;AAC5C,CAAC,CAAC;AAEFL,qBAAa,CAACS,WAAW,GAAG,eAAe","names":["exports","React","forwardRef","props","ref","state","useDialogContent_1","useDialogContentStyles_1","renderDialogContent_1","displayName"],"sourceRoot":"../src/","sources":["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';\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 return renderDialogContent_unstable(state);\n});\n\nDialogContent.displayName = 'DialogContent';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
|