@fluentui/react-dialog 9.5.7 → 9.5.9
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 +109 -1
- package/CHANGELOG.md +33 -2
- package/dist/index.d.ts +1 -1
- package/lib/Dialog.js +0 -1
- package/lib/Dialog.js.map +1 -1
- package/lib/DialogActions.js +0 -1
- package/lib/DialogActions.js.map +1 -1
- package/lib/DialogBody.js +0 -1
- package/lib/DialogBody.js.map +1 -1
- package/lib/DialogContent.js +0 -1
- package/lib/DialogContent.js.map +1 -1
- package/lib/DialogSurface.js +0 -1
- package/lib/DialogSurface.js.map +1 -1
- package/lib/DialogTitle.js +0 -1
- package/lib/DialogTitle.js.map +1 -1
- package/lib/DialogTrigger.js +0 -1
- package/lib/DialogTrigger.js.map +1 -1
- package/lib/components/Dialog/Dialog.js +4 -6
- package/lib/components/Dialog/Dialog.js.map +1 -1
- package/lib/components/Dialog/Dialog.types.js +1 -2
- package/lib/components/Dialog/Dialog.types.js.map +1 -1
- package/lib/components/Dialog/index.js +0 -1
- package/lib/components/Dialog/index.js.map +1 -1
- package/lib/components/Dialog/renderDialog.js +8 -13
- package/lib/components/Dialog/renderDialog.js.map +1 -1
- package/lib/components/Dialog/useDialog.js +71 -73
- package/lib/components/Dialog/useDialog.js.map +1 -1
- package/lib/components/Dialog/useDialogContextValues.js +20 -32
- package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib/components/DialogActions/DialogActions.js +5 -7
- package/lib/components/DialogActions/DialogActions.js.map +1 -1
- package/lib/components/DialogActions/DialogActions.types.js +1 -2
- package/lib/components/DialogActions/DialogActions.types.js.map +1 -1
- package/lib/components/DialogActions/index.js +0 -1
- package/lib/components/DialogActions/index.js.map +1 -1
- package/lib/components/DialogActions/renderDialogActions.js +5 -10
- package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActions.js +13 -18
- package/lib/components/DialogActions/useDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -1
- package/lib/components/DialogBody/DialogBody.js +5 -7
- package/lib/components/DialogBody/DialogBody.js.map +1 -1
- package/lib/components/DialogBody/DialogBody.types.js +1 -2
- package/lib/components/DialogBody/DialogBody.types.js.map +1 -1
- package/lib/components/DialogBody/index.js +0 -1
- package/lib/components/DialogBody/index.js.map +1 -1
- package/lib/components/DialogBody/renderDialogBody.js +5 -10
- package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib/components/DialogBody/useDialogBody.js +11 -13
- package/lib/components/DialogBody/useDialogBody.js.map +1 -1
- package/lib/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -1
- package/lib/components/DialogContent/DialogContent.js +5 -7
- package/lib/components/DialogContent/DialogContent.js.map +1 -1
- package/lib/components/DialogContent/DialogContent.types.js +1 -2
- package/lib/components/DialogContent/DialogContent.types.js.map +1 -1
- package/lib/components/DialogContent/index.js +0 -1
- package/lib/components/DialogContent/index.js.map +1 -1
- package/lib/components/DialogContent/renderDialogContent.js +4 -9
- package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib/components/DialogContent/useDialogContent.js +11 -13
- package/lib/components/DialogContent/useDialogContent.js.map +1 -1
- package/lib/components/DialogContent/useDialogContentStyles.styles.js.map +1 -1
- package/lib/components/DialogSurface/DialogSurface.js +6 -8
- package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/DialogSurface.types.js +1 -2
- package/lib/components/DialogSurface/DialogSurface.types.js.map +1 -1
- package/lib/components/DialogSurface/index.js +0 -1
- package/lib/components/DialogSurface/index.js.map +1 -1
- package/lib/components/DialogSurface/renderDialogSurface.js +6 -11
- package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurface.js +58 -63
- package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceContextValues.js +4 -5
- package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.js +5 -5
- package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -1
- package/lib/components/DialogTitle/DialogTitle.js +5 -7
- package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/DialogTitle.types.js +1 -2
- package/lib/components/DialogTitle/DialogTitle.types.js.map +1 -1
- package/lib/components/DialogTitle/index.js +0 -1
- package/lib/components/DialogTitle/index.js.map +1 -1
- package/lib/components/DialogTitle/renderDialogTitle.js +4 -9
- package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitle.js +29 -34
- package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitleStyles.styles.js +5 -5
- package/lib/components/DialogTitle/useDialogTitleStyles.styles.js.map +1 -1
- package/lib/components/DialogTrigger/DialogTrigger.js +3 -5
- package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/DialogTrigger.types.js +0 -1
- package/lib/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
- package/lib/components/DialogTrigger/index.js +0 -1
- package/lib/components/DialogTrigger/index.js.map +1 -1
- package/lib/components/DialogTrigger/renderDialogTrigger.js +1 -2
- package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/useDialogTrigger.styles.js.map +1 -1
- package/lib/contexts/constants.js +0 -1
- package/lib/contexts/constants.js.map +1 -1
- package/lib/contexts/dialogContext.js +11 -12
- package/lib/contexts/dialogContext.js.map +1 -1
- package/lib/contexts/dialogSurfaceContext.js +2 -3
- package/lib/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib/contexts/index.js +0 -1
- package/lib/contexts/index.js.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/index.js +0 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/isEscapeKeyDown.js +2 -4
- package/lib/utils/isEscapeKeyDown.js.map +1 -1
- package/lib/utils/useDisableBodyScroll.js +31 -36
- package/lib/utils/useDisableBodyScroll.js.map +1 -1
- package/lib/utils/useFocusFirstElement.js +29 -27
- package/lib/utils/useFocusFirstElement.js.map +1 -1
- package/lib-commonjs/Dialog.js +0 -3
- package/lib-commonjs/Dialog.js.map +1 -1
- package/lib-commonjs/DialogActions.js +0 -3
- package/lib-commonjs/DialogActions.js.map +1 -1
- package/lib-commonjs/DialogBody.js +0 -3
- package/lib-commonjs/DialogBody.js.map +1 -1
- package/lib-commonjs/DialogContent.js +0 -3
- package/lib-commonjs/DialogContent.js.map +1 -1
- package/lib-commonjs/DialogSurface.js +0 -3
- package/lib-commonjs/DialogSurface.js.map +1 -1
- package/lib-commonjs/DialogTitle.js +0 -3
- package/lib-commonjs/DialogTitle.js.map +1 -1
- package/lib-commonjs/DialogTrigger.js +0 -3
- package/lib-commonjs/DialogTrigger.js.map +1 -1
- package/lib-commonjs/components/Dialog/Dialog.js +1 -3
- package/lib-commonjs/components/Dialog/Dialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/Dialog.types.js +0 -3
- package/lib-commonjs/components/Dialog/Dialog.types.js.map +1 -1
- package/lib-commonjs/components/Dialog/index.js +0 -3
- package/lib-commonjs/components/Dialog/index.js.map +1 -1
- package/lib-commonjs/components/Dialog/renderDialog.js +1 -3
- package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialog.js +1 -3
- package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialogContextValues.js +4 -6
- package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogActions/DialogActions.js +1 -3
- package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/DialogActions.types.js +0 -3
- package/lib-commonjs/components/DialogActions/DialogActions.types.js.map +1 -1
- package/lib-commonjs/components/DialogActions/index.js +0 -3
- package/lib-commonjs/components/DialogActions/index.js.map +1 -1
- package/lib-commonjs/components/DialogActions/renderDialogActions.js +1 -3
- package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActions.js +1 -3
- package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.js +0 -2
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogBody/DialogBody.js +1 -3
- package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/DialogBody.types.js +0 -3
- package/lib-commonjs/components/DialogBody/DialogBody.types.js.map +1 -1
- package/lib-commonjs/components/DialogBody/index.js +0 -3
- package/lib-commonjs/components/DialogBody/index.js.map +1 -1
- package/lib-commonjs/components/DialogBody/renderDialogBody.js +1 -3
- package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBody.js +1 -3
- package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.js +0 -2
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogContent/DialogContent.js +1 -3
- package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/DialogContent.types.js +0 -3
- package/lib-commonjs/components/DialogContent/DialogContent.types.js.map +1 -1
- package/lib-commonjs/components/DialogContent/index.js +0 -3
- package/lib-commonjs/components/DialogContent/index.js.map +1 -1
- package/lib-commonjs/components/DialogContent/renderDialogContent.js +1 -3
- package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContent.js +1 -3
- package/lib-commonjs/components/DialogContent/useDialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.js +0 -2
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/DialogSurface.js +1 -3
- package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/DialogSurface.types.js +0 -3
- package/lib-commonjs/components/DialogSurface/DialogSurface.types.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/index.js +0 -3
- package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +1 -3
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js +1 -3
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js +1 -3
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.js +12 -14
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/DialogTitle.js +1 -3
- package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/DialogTitle.types.js +0 -3
- package/lib-commonjs/components/DialogTitle/DialogTitle.types.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/index.js +0 -3
- package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +1 -3
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js +1 -3
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.js +12 -14
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.js +1 -3
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js +0 -3
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/index.js +0 -3
- package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js +1 -3
- package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.styles.js +0 -2
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.styles.js.map +1 -1
- package/lib-commonjs/contexts/constants.js +1 -3
- package/lib-commonjs/contexts/constants.js.map +1 -1
- package/lib-commonjs/contexts/dialogContext.js +2 -4
- package/lib-commonjs/contexts/dialogContext.js.map +1 -1
- package/lib-commonjs/contexts/dialogSurfaceContext.js +1 -3
- package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib-commonjs/contexts/index.js +0 -3
- package/lib-commonjs/contexts/index.js.map +1 -1
- package/lib-commonjs/index.js +0 -3
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/index.js +0 -3
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/isEscapeKeyDown.js +1 -3
- package/lib-commonjs/utils/isEscapeKeyDown.js.map +1 -1
- package/lib-commonjs/utils/useDisableBodyScroll.js +1 -3
- package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -1
- package/lib-commonjs/utils/useFocusFirstElement.js +1 -3
- package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useDialog.js"],"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';\nimport { useModalAttributes } from '@fluentui/react-tabster';\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 */ export const useDialog_unstable = (props)=>{\n const { children , modalType ='modal' , onOpenChange , inertTrapFocus =false } = props;\n const [trigger, content] = childrenToTriggerAndContent(children);\n const [open, setOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false\n });\n const requestOpenChange = useEventCallback((data)=>{\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(data.event, data);\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 const focusRef = useFocusFirstElement(open, modalType);\n const disableBodyScroll = useDisableBodyScroll();\n const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');\n useIsomorphicLayoutEffect(()=>{\n if (isBodyScrollLocked) {\n return disableBodyScroll();\n }\n }, [\n disableBodyScroll,\n isBodyScrollLocked\n ]);\n const { modalAttributes , triggerAttributes } = useModalAttributes({\n trapFocus: modalType !== 'non-modal',\n legacyTrapFocus: !inertTrapFocus\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 modalAttributes: modalType !== 'non-modal' ? modalAttributes : undefined,\n triggerAttributes\n };\n};\n/**\n * Extracts trigger and content from children\n */ function childrenToTriggerAndContent(children) {\n const childrenArray = React.Children.toArray(children);\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('Dialog must contain at least one child <DialogSurface/>,\\n' + 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)');\n }\n }\n switch(childrenArray.length){\n // case where there's a trigger followed by content\n case 2:\n return childrenArray;\n // case where there's only content\n case 1:\n return [\n undefined,\n childrenArray[0]\n ];\n // unknown case\n default:\n return [\n undefined,\n undefined\n ];\n }\n}\n"],"names":["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","modalAttributes","triggerAttributes","useModalAttributes","trapFocus","legacyTrapFocus","components","backdrop","dialogTitleId","useId","isNestedDialog","useHasParentContext","DialogContext","dialogRef","undefined","childrenArray","React","Children","toArray","process","env","NODE_ENV","length","console","warn"],"mappings":";;;;+BAaiBA;;aAAAA;;;6DAbM;gCACkE;sCACrD;uBACuB;0BAC7B;8BACK;AAQxB,MAAMA,qBAAqB,CAACC,QAAQ;IAC3C,MAAM,EAAEC,SAAQ,EAAGC,WAAW,QAAO,EAAGC,aAAY,EAAGC,gBAAgB,KAAK,CAAA,EAAG,GAAGJ;IAClF,MAAM,CAACK,SAASC,QAAQ,GAAGC,4BAA4BN;IACvD,MAAM,CAACO,MAAMC,QAAQ,GAAGC,IAAAA,oCAAoB,EAAC;QACzCC,OAAOX,MAAMQ,IAAI;QACjBI,cAAcZ,MAAMa,WAAW;QAC/BC,cAAc,KAAK;IACvB;IACA,MAAMC,oBAAoBC,IAAAA,gCAAgB,EAAC,CAACC,OAAO;QAC/Cd,iBAAiB,IAAI,IAAIA,iBAAiB,KAAK,IAAI,KAAK,IAAIA,aAAac,KAAKC,KAAK,EAAED,KAAK;QAC1F,0DAA0D;QAC1D,6FAA6F;QAC7F,IAAI,CAACA,KAAKC,KAAK,CAACC,kBAAkB,IAAI;YAClCV,QAAQQ,KAAKT,IAAI;QACrB,CAAC;IACL;IACA,MAAMY,WAAWC,IAAAA,2BAAoB,EAACb,MAAMN;IAC5C,MAAMoB,oBAAoBC,IAAAA,2BAAoB;IAC9C,MAAMC,qBAAqBC,QAAQjB,QAAQN,cAAc;IACzDwB,IAAAA,yCAAyB,EAAC,IAAI;QAC1B,IAAIF,oBAAoB;YACpB,OAAOF;QACX,CAAC;IACL,GAAG;QACCA;QACAE;KACH;IACD,MAAM,EAAEG,gBAAe,EAAGC,kBAAiB,EAAG,GAAGC,IAAAA,gCAAkB,EAAC;QAChEC,WAAW5B,cAAc;QACzB6B,iBAAiB,CAAC3B;IACtB;IACA,OAAO;QACH4B,YAAY;YACRC,UAAU;QACd;QACA7B;QACAI;QACAN;QACAI,SAASE,OAAOF,UAAU,IAAI;QAC9BD;QACAU;QACAmB,eAAeC,IAAAA,qBAAK,EAAC;QACrBC,gBAAgBC,IAAAA,yCAAmB,EAACC,uBAAa;QACjDC,WAAWnB;QACXO,iBAAiBzB,cAAc,cAAcyB,kBAAkBa,SAAS;QACxEZ;IACJ;AACJ;AACA;;CAEC,GAAG,SAASrB,4BAA4BN,QAAQ,EAAE;IAC/C,MAAMwC,gBAAgBC,OAAMC,QAAQ,CAACC,OAAO,CAAC3C;IAC7C,IAAI4C,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,IAAIN,cAAcO,MAAM,KAAK,KAAKP,cAAcO,MAAM,KAAK,GAAG;YAC1D,sCAAsC;YACtCC,QAAQC,IAAI,CAAC,+DAA+D;QAChF,CAAC;IACL,CAAC;IACD,OAAOT,cAAcO,MAAM;QACvB,mDAAmD;QACnD,KAAK;YACD,OAAOP;QACX,kCAAkC;QAClC,KAAK;YACD,OAAO;gBACHD;gBACAC,aAAa,CAAC,EAAE;aACnB;QACL,eAAe;QACf;YACI,OAAO;gBACHD;gBACAA;aACH;IACT;AACJ"}
|
|
@@ -9,9 +9,9 @@ Object.defineProperty(exports, "useDialogContextValues_unstable", {
|
|
|
9
9
|
function useDialogContextValues_unstable(state) {
|
|
10
10
|
const { modalType , open , dialogRef , dialogTitleId , isNestedDialog , inertTrapFocus , requestOpenChange , modalAttributes , triggerAttributes } = state;
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
* This context is created with "@fluentui/react-context-selector",
|
|
13
|
+
* there is no sense to memoize it
|
|
14
|
+
*/ const dialog = {
|
|
15
15
|
open,
|
|
16
16
|
modalType,
|
|
17
17
|
dialogRef,
|
|
@@ -27,6 +27,4 @@ function useDialogContextValues_unstable(state) {
|
|
|
27
27
|
dialog,
|
|
28
28
|
dialogSurface
|
|
29
29
|
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
//# sourceMappingURL=useDialogContextValues.js.map
|
|
30
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useDialogContextValues.js"],"sourcesContent":["export function useDialogContextValues_unstable(state) {\n const { modalType , open , dialogRef , dialogTitleId , isNestedDialog , inertTrapFocus , requestOpenChange , modalAttributes , triggerAttributes } = state;\n /**\n * This context is created with \"@fluentui/react-context-selector\",\n * there is no sense to memoize it\n */ const dialog = {\n open,\n modalType,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n modalAttributes,\n triggerAttributes,\n requestOpenChange\n };\n const dialogSurface = false;\n return {\n dialog,\n dialogSurface\n };\n}\n"],"names":["useDialogContextValues_unstable","state","modalType","open","dialogRef","dialogTitleId","isNestedDialog","inertTrapFocus","requestOpenChange","modalAttributes","triggerAttributes","dialog","dialogSurface"],"mappings":";;;;+BAAgBA;;aAAAA;;AAAT,SAASA,gCAAgCC,KAAK,EAAE;IACnD,MAAM,EAAEC,UAAS,EAAGC,KAAI,EAAGC,UAAS,EAAGC,cAAa,EAAGC,eAAc,EAAGC,eAAc,EAAGC,kBAAiB,EAAGC,gBAAe,EAAGC,kBAAiB,EAAG,GAAGT;IACtJ;;;GAGD,GAAG,MAAMU,SAAS;QACbR;QACAD;QACAE;QACAC;QACAC;QACAC;QACAE;QACAC;QACAF;IACJ;IACA,MAAMI,gBAAgB,KAAK;IAC3B,OAAO;QACHD;QACAC;IACJ;AACJ"}
|
|
@@ -18,6 +18,4 @@ const DialogActions = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
18
18
|
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useDialogActionsStyles_unstable')(state);
|
|
19
19
|
return (0, _renderDialogActions.renderDialogActions_unstable)(state);
|
|
20
20
|
});
|
|
21
|
-
DialogActions.displayName = 'DialogActions';
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=DialogActions.js.map
|
|
21
|
+
DialogActions.displayName = 'DialogActions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["DialogActions.js"],"sourcesContent":["import * as React from 'react';\nimport { useDialogActions_unstable } from './useDialogActions';\nimport { renderDialogActions_unstable } from './renderDialogActions';\nimport { useDialogActionsStyles_unstable } from './useDialogActionsStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * `DialogActions` is a container for the actions of the dialog.\n * Apart from styling, this component does not have other behavior.\n */ export const DialogActions = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useDialogActions_unstable(props, ref);\n useDialogActionsStyles_unstable(state);\n useCustomStyleHook_unstable('useDialogActionsStyles_unstable')(state);\n return renderDialogActions_unstable(state);\n});\nDialogActions.displayName = 'DialogActions';\n"],"names":["DialogActions","React","forwardRef","props","ref","state","useDialogActions_unstable","useDialogActionsStyles_unstable","useCustomStyleHook_unstable","renderDialogActions_unstable","displayName"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;kCACmB;qCACG;8CACG;qCACJ;AAIjC,MAAMA,gBAAgB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IAC1E,MAAMC,QAAQC,IAAAA,2CAAyB,EAACH,OAAOC;IAC/CG,IAAAA,6DAA+B,EAACF;IAChCG,IAAAA,gDAA2B,EAAC,mCAAmCH;IAC/D,OAAOI,IAAAA,iDAA4B,EAACJ;AACxC;AACAL,cAAcU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -8,6 +8,3 @@ _exportStar(require("./DialogActions.types"), exports);
|
|
|
8
8
|
_exportStar(require("./renderDialogActions"), exports);
|
|
9
9
|
_exportStar(require("./useDialogActions"), exports);
|
|
10
10
|
_exportStar(require("./useDialogActionsStyles.styles"), exports);
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './DialogActions';\nexport * from './DialogActions.types';\nexport * from './renderDialogActions';\nexport * from './useDialogActions';\nexport * from './useDialogActionsStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
|
|
@@ -12,6 +12,4 @@ const renderDialogActions_unstable = (state)=>{
|
|
|
12
12
|
const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
|
|
13
13
|
// TODO Add additional slots in the appropriate place
|
|
14
14
|
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=renderDialogActions.js.map
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["renderDialogActions.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogActions\n */ export const renderDialogActions_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n // TODO Add additional slots in the appropriate place\n return /*#__PURE__*/ createElement(slots.root, slotProps.root);\n};\n"],"names":["renderDialogActions_unstable","state","slots","slotProps","getSlotsNext","createElement","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,+BAA+B,CAACC,QAAQ;IACrD,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,qDAAqD;IACrD,OAAO,WAAW,GAAGI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI;AACjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useDialogActions.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\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 */ export const useDialogActions_unstable = (props, ref)=>{\n const { position ='end' , fluid =false } = props;\n return {\n components: {\n root: 'div'\n },\n root: getNativeElementProps('div', {\n ref,\n ...props\n }),\n position,\n fluid\n };\n};\n"],"names":["useDialogActions_unstable","props","ref","position","fluid","components","root","getNativeElementProps"],"mappings":";;;;+BAUiBA;;aAAAA;;;6DAVM;gCACe;AAS3B,MAAMA,4BAA4B,CAACC,OAAOC,MAAM;IACvD,MAAM,EAAEC,UAAU,MAAK,EAAGC,OAAO,KAAK,CAAA,EAAG,GAAGH;IAC5C,OAAO;QACHI,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,IAAAA,qCAAqB,EAAC,OAAO;YAC/BL;YACA,GAAGD,KAAK;QACZ;QACAE;QACAC;IACJ;AACJ"}
|
|
@@ -80,5 +80,3 @@ const useDialogActionsStyles_unstable = (state)=>{
|
|
|
80
80
|
state.root.className = (0, _react.mergeClasses)(dialogActionsClassNames.root, styles.root, state.position === 'start' && styles.gridPositionStart, state.position === 'end' && styles.gridPositionEnd, state.fluid && state.position === 'start' && styles.fluidStart, state.fluid && state.position === 'end' && styles.fluidEnd, state.root.className);
|
|
81
81
|
return state;
|
|
82
82
|
}; //# sourceMappingURL=useDialogActionsStyles.styles.js.map
|
|
83
|
-
|
|
84
|
-
//# sourceMappingURL=useDialogActionsStyles.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useDialogActionsStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { DIALOG_GAP, MEDIA_QUERY_BREAKPOINT_SELECTOR } from '../../contexts/constants';\nexport const dialogActionsClassNames = {\n root: 'fui-DialogActions'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Bqenvij: \"f3052tw\",\n B7ck84d: \"f1ewtqcl\",\n mc9l5x: \"f22iagw\",\n Ijaq50: \"f1cztu7b\",\n nk6f5a: \"fcu02xx\",\n i8kkvl: \"f4px1ci\",\n Belr9w4: \"fn67r4l\",\n Bmdcpmo: \"f6glcwc\",\n th9wkt: \"f1e3st1r\"\n },\n gridPositionEnd: {\n Bdqf98w: \"f1a7i8kp\",\n Br312pm: \"fd46tj4\",\n Bw0ie65: \"fsyjsko\"\n },\n gridPositionStart: {\n Bdqf98w: \"fsxvdwy\",\n Br312pm: \"fwpfdsa\",\n Bw0ie65: \"f1e2fz10\"\n },\n fluidStart: {\n Bw0ie65: \"fsyjsko\"\n },\n fluidEnd: {\n Br312pm: \"fwpfdsa\"\n }\n}, {\n 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;}\", \".f1cztu7b{grid-row-start:3;}\", \".fcu02xx{grid-row-end:3;}\", \".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}\", \".fn67r4l{row-gap:8px;}\", \".f1a7i8kp{justify-self:end;}\", \".fd46tj4{grid-column-start:2;}\", \".fsyjsko{grid-column-end:4;}\", \".fsxvdwy{justify-self:start;}\", \".fwpfdsa{grid-column-start:1;}\", \".f1e2fz10{grid-column-end:2;}\"],\n m: [[\"@media screen and (max-width: 480px){.f6glcwc{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}}\", {\n m: \"screen and (max-width: 480px)\"\n }], [\"@media screen and (max-width: 480px){.f1e3st1r{justify-self:stretch;}}\", {\n m: \"screen and (max-width: 480px)\"\n }]]\n});\n/**\n * Apply styling to the DialogActions slots based on the state\n */\nexport const useDialogActionsStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogActionsClassNames.root, styles.root, state.position === 'start' && styles.gridPositionStart, state.position === 'end' && styles.gridPositionEnd, state.fluid && state.position === 'start' && styles.fluidStart, state.fluid && state.position === 'end' && styles.fluidEnd, state.root.className);\n return state;\n};\n//# sourceMappingURL=useDialogActionsStyles.styles.js.map"],"names":["dialogActionsClassNames","useDialogActionsStyles_unstable","root","useStyles","__styles","Bqenvij","B7ck84d","mc9l5x","Ijaq50","nk6f5a","i8kkvl","Belr9w4","Bmdcpmo","th9wkt","gridPositionEnd","Bdqf98w","Br312pm","Bw0ie65","gridPositionStart","fluidStart","fluidEnd","d","m","state","styles","className","mergeClasses","position","fluid"],"mappings":";;;;;;;;;;;IAEaA,uBAAuB,MAAvBA;IA0CAC,+BAA+B,MAA/BA;;uBA5CsC;AAE5C,MAAMD,0BAA0B;IACrCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCF,MAAM;QACJG,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,QAAQ;IACV;IACAC,iBAAiB;QACfC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;IACAC,mBAAmB;QACjBH,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;IACAE,YAAY;QACVF,SAAS;IACX;IACAG,UAAU;QACRJ,SAAS;IACX;AACF,GAAG;IACDK,GAAG;QAAC;QAAoF;QAAqC;QAAwF;QAAgC;QAA6B;QAAoD;QAA0B;QAAgC;QAAkC;QAAgC;QAAiC;QAAkC;KAAgC;IACriBC,GAAG;QAAC;YAAC;YAAkI;gBACrIA,GAAG;YACL;SAAE;QAAE;YAAC;YAA0E;gBAC7EA,GAAG;YACL;SAAE;KAAC;AACL;AAIO,MAAMrB,kCAAkCsB,CAAAA,QAAS;IACtD,MAAMC,SAASrB;IACfoB,MAAMrB,IAAI,CAACuB,SAAS,GAAGC,IAAAA,mBAAY,EAAC1B,wBAAwBE,IAAI,EAAEsB,OAAOtB,IAAI,EAAEqB,MAAMI,QAAQ,KAAK,WAAWH,OAAON,iBAAiB,EAAEK,MAAMI,QAAQ,KAAK,SAASH,OAAOV,eAAe,EAAES,MAAMK,KAAK,IAAIL,MAAMI,QAAQ,KAAK,WAAWH,OAAOL,UAAU,EAAEI,MAAMK,KAAK,IAAIL,MAAMI,QAAQ,KAAK,SAASH,OAAOJ,QAAQ,EAAEG,MAAMrB,IAAI,CAACuB,SAAS;IAC3U,OAAOF;AACT,GACA,yDAAyD"}
|
|
@@ -18,6 +18,4 @@ const DialogBody = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
18
18
|
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useDialogBodyStyles_unstable')(state);
|
|
19
19
|
return (0, _renderDialogBody.renderDialogBody_unstable)(state);
|
|
20
20
|
});
|
|
21
|
-
DialogBody.displayName = 'DialogBody';
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=DialogBody.js.map
|
|
21
|
+
DialogBody.displayName = 'DialogBody';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["DialogBody.js"],"sourcesContent":["import * as React from 'react';\nimport { useDialogBody_unstable } from './useDialogBody';\nimport { renderDialogBody_unstable } from './renderDialogBody';\nimport { useDialogBodyStyles_unstable } from './useDialogBodyStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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 */ export const DialogBody = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useDialogBody_unstable(props, ref);\n useDialogBodyStyles_unstable(state);\n useCustomStyleHook_unstable('useDialogBodyStyles_unstable')(state);\n return renderDialogBody_unstable(state);\n});\nDialogBody.displayName = 'DialogBody';\n"],"names":["DialogBody","React","forwardRef","props","ref","state","useDialogBody_unstable","useDialogBodyStyles_unstable","useCustomStyleHook_unstable","renderDialogBody_unstable","displayName"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;+BACgB;kCACG;2CACG;qCACD;AAIjC,MAAMA,aAAa,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACvE,MAAMC,QAAQC,IAAAA,qCAAsB,EAACH,OAAOC;IAC5CG,IAAAA,uDAA4B,EAACF;IAC7BG,IAAAA,gDAA2B,EAAC,gCAAgCH;IAC5D,OAAOI,IAAAA,2CAAyB,EAACJ;AACrC;AACAL,WAAWU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -8,6 +8,3 @@ _exportStar(require("./DialogBody.types"), exports);
|
|
|
8
8
|
_exportStar(require("./renderDialogBody"), exports);
|
|
9
9
|
_exportStar(require("./useDialogBody"), exports);
|
|
10
10
|
_exportStar(require("./useDialogBodyStyles.styles"), exports);
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './DialogBody';\nexport * from './DialogBody.types';\nexport * from './renderDialogBody';\nexport * from './useDialogBody';\nexport * from './useDialogBodyStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
|
|
@@ -12,6 +12,4 @@ const renderDialogBody_unstable = (state)=>{
|
|
|
12
12
|
const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
|
|
13
13
|
// TODO Add additional slots in the appropriate place
|
|
14
14
|
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=renderDialogBody.js.map
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["renderDialogBody.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogBody\n */ export const renderDialogBody_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n // TODO Add additional slots in the appropriate place\n return /*#__PURE__*/ createElement(slots.root, slotProps.root);\n};\n"],"names":["renderDialogBody_unstable","state","slots","slotProps","getSlotsNext","createElement","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,4BAA4B,CAACC,QAAQ;IAClD,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,qDAAqD;IACrD,OAAO,WAAW,GAAGI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI;AACjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useDialogBody.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\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 */ export const useDialogBody_unstable = (props, ref)=>{\n var _props_as;\n return {\n components: {\n root: 'div'\n },\n root: getNativeElementProps((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'div', {\n ref,\n ...props\n })\n };\n};\n"],"names":["useDialogBody_unstable","props","ref","_props_as","components","root","getNativeElementProps","as"],"mappings":";;;;+BAUiBA;;aAAAA;;;6DAVM;gCACe;AAS3B,MAAMA,yBAAyB,CAACC,OAAOC,MAAM;IACpD,IAAIC;IACJ,OAAO;QACHC,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,IAAAA,qCAAqB,EAAC,AAACH,CAAAA,YAAYF,MAAMM,EAAE,AAAD,MAAO,IAAI,IAAIJ,cAAc,KAAK,IAAIA,YAAY,KAAK,EAAE;YACrGD;YACA,GAAGD,KAAK;QACZ;IACJ;AACJ"}
|
|
@@ -64,5 +64,3 @@ const useDialogBodyStyles_unstable = (state)=>{
|
|
|
64
64
|
state.root.className = (0, _react.mergeClasses)(dialogBodyClassNames.root, styles.root, state.root.className);
|
|
65
65
|
return state;
|
|
66
66
|
}; //# sourceMappingURL=useDialogBodyStyles.styles.js.map
|
|
67
|
-
|
|
68
|
-
//# sourceMappingURL=useDialogBodyStyles.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useDialogBodyStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { DIALOG_GAP, MEDIA_QUERY_BREAKPOINT_SELECTOR, SURFACE_PADDING } from '../../contexts';\nexport const dialogBodyClassNames = {\n root: 'fui-DialogBody'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f13qh94s\",\n fshzfu: \"f120kxnn\",\n Bxyxcbc: \"flnwrvu\",\n B7ck84d: \"f1ewtqcl\",\n B68tc82: \"f1ln0qer\",\n Bmxbyg5: \"fa2wlxz\",\n i8kkvl: \"f4px1ci\",\n Belr9w4: \"fn67r4l\",\n wkccdc: \"f1x46k84\",\n B5xtmjs: \"ff54dml\",\n Bqu9lor: \"f1t97isy\"\n }\n}, {\n d: [\".f13qh94s{display:grid;}\", \".f120kxnn::backdrop{background-color:rgba(0, 0, 0, 0.4);}\", \".flnwrvu{max-height:calc(100vh - 2 * 24px);}\", \".f1ewtqcl{box-sizing:border-box;}\", \".f1ln0qer{overflow-x:unset;}\", \".fa2wlxz{overflow-y:unset;}\", \".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}\", \".fn67r4l{row-gap:8px;}\", \".f1x46k84{grid-template-rows:auto 1fr;}\"],\n m: [[\"@media screen and (max-width: 480px){.ff54dml{max-width:100vw;}}\", {\n m: \"screen and (max-width: 480px)\"\n }], [\"@media screen and (max-width: 480px){.f1t97isy{grid-template-rows:auto 1fr auto;}}\", {\n m: \"screen and (max-width: 480px)\"\n }]]\n});\n/**\n * Apply styling to the DialogBody slots based on the state\n */\nexport const useDialogBodyStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogBodyClassNames.root, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useDialogBodyStyles.styles.js.map"],"names":["dialogBodyClassNames","useDialogBodyStyles_unstable","root","useStyles","__styles","mc9l5x","fshzfu","Bxyxcbc","B7ck84d","B68tc82","Bmxbyg5","i8kkvl","Belr9w4","wkccdc","B5xtmjs","Bqu9lor","d","m","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,oBAAoB,MAApBA;IA+BAC,4BAA4B,MAA5BA;;uBAjCsC;AAE5C,MAAMD,uBAAuB;IAClCE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA4B;QAA6D;QAAgD;QAAqC;QAAgC;QAA+B;QAAoD;QAA0B;KAA0C;IACzWC,GAAG;QAAC;YAAC;YAAoE;gBACvEA,GAAG;YACL;SAAE;QAAE;YAAC;YAAsF;gBACzFA,GAAG;YACL;SAAE;KAAC;AACL;AAIO,MAAMhB,+BAA+BiB,CAAAA,QAAS;IACnD,MAAMC,SAAShB;IACfe,MAAMhB,IAAI,CAACkB,SAAS,GAAGC,IAAAA,mBAAY,EAACrB,qBAAqBE,IAAI,EAAEiB,OAAOjB,IAAI,EAAEgB,MAAMhB,IAAI,CAACkB,SAAS;IAChG,OAAOF;AACT,GACA,sDAAsD"}
|
|
@@ -18,6 +18,4 @@ const DialogContent = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
18
18
|
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useDialogContentStyles_unstable')(state);
|
|
19
19
|
return (0, _renderDialogContent.renderDialogContent_unstable)(state);
|
|
20
20
|
});
|
|
21
|
-
DialogContent.displayName = 'DialogContent';
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=DialogContent.js.map
|
|
21
|
+
DialogContent.displayName = 'DialogContent';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["DialogContent.js"],"sourcesContent":["import * as React from 'react';\nimport { useDialogContent_unstable } from './useDialogContent';\nimport { renderDialogContent_unstable } from './renderDialogContent';\nimport { useDialogContentStyles_unstable } from './useDialogContentStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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 */ export const DialogContent = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useDialogContent_unstable(props, ref);\n useDialogContentStyles_unstable(state);\n useCustomStyleHook_unstable('useDialogContentStyles_unstable')(state);\n return renderDialogContent_unstable(state);\n});\nDialogContent.displayName = 'DialogContent';\n"],"names":["DialogContent","React","forwardRef","props","ref","state","useDialogContent_unstable","useDialogContentStyles_unstable","useCustomStyleHook_unstable","renderDialogContent_unstable","displayName"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;kCACmB;qCACG;8CACG;qCACJ;AAIjC,MAAMA,gBAAgB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IAC1E,MAAMC,QAAQC,IAAAA,2CAAyB,EAACH,OAAOC;IAC/CG,IAAAA,6DAA+B,EAACF;IAChCG,IAAAA,gDAA2B,EAAC,mCAAmCH;IAC/D,OAAOI,IAAAA,iDAA4B,EAACJ;AACxC;AACAL,cAAcU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -8,6 +8,3 @@ _exportStar(require("./DialogContent.types"), exports);
|
|
|
8
8
|
_exportStar(require("./renderDialogContent"), exports);
|
|
9
9
|
_exportStar(require("./useDialogContent"), exports);
|
|
10
10
|
_exportStar(require("./useDialogContentStyles.styles"), exports);
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './DialogContent';\nexport * from './DialogContent.types';\nexport * from './renderDialogContent';\nexport * from './useDialogContent';\nexport * from './useDialogContentStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
|
|
@@ -11,6 +11,4 @@ const _reactUtilities = require("@fluentui/react-utilities");
|
|
|
11
11
|
const renderDialogContent_unstable = (state)=>{
|
|
12
12
|
const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
|
|
13
13
|
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=renderDialogContent.js.map
|
|
14
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["renderDialogContent.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogContent\n */ export const renderDialogContent_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(slots.root, slotProps.root);\n};\n"],"names":["renderDialogContent_unstable","state","slots","slotProps","getSlotsNext","createElement","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,+BAA+B,CAACC,QAAQ;IACrD,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,OAAO,WAAW,GAAGI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI;AACjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useDialogContent.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\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 */ export const useDialogContent_unstable = (props, ref)=>{\n var _props_as;\n return {\n components: {\n root: 'div'\n },\n root: getNativeElementProps((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'div', {\n ref,\n ...props\n })\n };\n};\n"],"names":["useDialogContent_unstable","props","ref","_props_as","components","root","getNativeElementProps","as"],"mappings":";;;;+BAUiBA;;aAAAA;;;6DAVM;gCACe;AAS3B,MAAMA,4BAA4B,CAACC,OAAOC,MAAM;IACvD,IAAIC;IACJ,OAAO;QACHC,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,IAAAA,qCAAqB,EAAC,AAACH,CAAAA,YAAYF,MAAMM,EAAE,AAAD,MAAO,IAAI,IAAIJ,cAAc,KAAK,IAAIA,YAAY,KAAK,EAAE;YACrGD;YACA,GAAGD,KAAK;QACZ;IACJ;AACJ"}
|
|
@@ -80,5 +80,3 @@ const useDialogContentStyles_unstable = (state)=>{
|
|
|
80
80
|
state.root.className = (0, _react.mergeClasses)(dialogContentClassNames.root, styles.root, state.root.className);
|
|
81
81
|
return state;
|
|
82
82
|
}; //# sourceMappingURL=useDialogContentStyles.styles.js.map
|
|
83
|
-
|
|
84
|
-
//# sourceMappingURL=useDialogContentStyles.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useDialogContentStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const dialogContentClassNames = {\n root: 'fui-DialogContent'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Bmxbyg5: \"f5zp4f\",\n sshi5w: \"f1nxs5xn\",\n B7ck84d: \"f1ewtqcl\",\n Ijaq50: \"faunodf\",\n nk6f5a: \"f88nxoq\",\n Br312pm: \"fwpfdsa\",\n Bw0ie65: \"fsyjsko\",\n z8tnut: \"fr4fn7s\",\n z189sj: [\"f171n1a0\", \"f1jwbs5a\"],\n Byoj8tv: \"f1ean75l\",\n uwmqm3: [\"f1jwbs5a\", \"f171n1a0\"],\n B6of3ja: \"fxlnl9e\",\n t21cq0: [\"ffs23cn\", \"f1v5tmjd\"],\n jrapky: \"f2uu7rc\",\n Frg6f3: [\"f1v5tmjd\", \"ffs23cn\"],\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n }\n}, {\n d: [\".f5zp4f{overflow-y:auto;}\", \".f1nxs5xn{min-height:32px;}\", \".f1ewtqcl{box-sizing:border-box;}\", \".faunodf{grid-row-start:2;}\", \".f88nxoq{grid-row-end:2;}\", \".fwpfdsa{grid-column-start:1;}\", \".fsyjsko{grid-column-end:4;}\", \".fr4fn7s{padding-top:var(--strokeWidthThick);}\", \".f171n1a0{padding-right:var(--strokeWidthThick);}\", \".f1jwbs5a{padding-left:var(--strokeWidthThick);}\", \".f1ean75l{padding-bottom:var(--strokeWidthThick);}\", \".fxlnl9e{margin-top:calc(var(--strokeWidthThick) * -1);}\", \".ffs23cn{margin-right:calc(var(--strokeWidthThick) * -1);}\", \".f1v5tmjd{margin-left:calc(var(--strokeWidthThick) * -1);}\", \".f2uu7rc{margin-bottom:calc(var(--strokeWidthThick) * -1);}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\"]\n});\n/**\n * Apply styling to the DialogContent slots based on the state\n */\nexport const useDialogContentStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogContentClassNames.root, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useDialogContentStyles.styles.js.map"],"names":["dialogContentClassNames","useDialogContentStyles_unstable","root","useStyles","__styles","Bmxbyg5","sshi5w","B7ck84d","Ijaq50","nk6f5a","Br312pm","Bw0ie65","z8tnut","z189sj","Byoj8tv","uwmqm3","B6of3ja","t21cq0","jrapky","Frg6f3","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,uBAAuB,MAAvBA;IAkCAC,+BAA+B,MAA/BA;;uBApCsC;AAE5C,MAAMD,0BAA0B;IACrCE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCF,MAAM;QACJG,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA6B;QAA+B;QAAqC;QAA+B;QAA6B;QAAkC;QAAgC;QAAkD;QAAqD;QAAoD;QAAsD;QAA4D;QAA8D;QAA8D;QAA+D;QAAgD;QAA+C;QAAmD;KAAmD;AACl3B;AAIO,MAAMvB,kCAAkCwB,CAAAA,QAAS;IACtD,MAAMC,SAASvB;IACfsB,MAAMvB,IAAI,CAACyB,SAAS,GAAGC,IAAAA,mBAAY,EAAC5B,wBAAwBE,IAAI,EAAEwB,OAAOxB,IAAI,EAAEuB,MAAMvB,IAAI,CAACyB,SAAS;IACnG,OAAOF;AACT,GACA,yDAAyD"}
|
|
@@ -20,6 +20,4 @@ const DialogSurface = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
20
20
|
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useDialogSurfaceStyles_unstable')(state);
|
|
21
21
|
return (0, _renderDialogSurface.renderDialogSurface_unstable)(state, contextValues);
|
|
22
22
|
});
|
|
23
|
-
DialogSurface.displayName = 'DialogSurface';
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=DialogSurface.js.map
|
|
23
|
+
DialogSurface.displayName = 'DialogSurface';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["DialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles.styles';\nimport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * DialogSurface component represents the visual part of a `Dialog` as a whole,\n * it contains everything that should be visible.\n */ export const DialogSurface = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useDialogSurface_unstable(props, ref);\n const contextValues = useDialogSurfaceContextValues_unstable(state);\n useDialogSurfaceStyles_unstable(state);\n useCustomStyleHook_unstable('useDialogSurfaceStyles_unstable')(state);\n return renderDialogSurface_unstable(state, contextValues);\n});\nDialogSurface.displayName = 'DialogSurface';\n"],"names":["DialogSurface","React","forwardRef","props","ref","state","useDialogSurface_unstable","contextValues","useDialogSurfaceContextValues_unstable","useDialogSurfaceStyles_unstable","useCustomStyleHook_unstable","renderDialogSurface_unstable","displayName"],"mappings":";;;;+BASiBA;;aAAAA;;;6DATM;kCACmB;qCACG;8CACG;+CACO;qCACX;AAIjC,MAAMA,gBAAgB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IAC1E,MAAMC,QAAQC,IAAAA,2CAAyB,EAACH,OAAOC;IAC/C,MAAMG,gBAAgBC,IAAAA,qEAAsC,EAACH;IAC7DI,IAAAA,6DAA+B,EAACJ;IAChCK,IAAAA,gDAA2B,EAAC,mCAAmCL;IAC/D,OAAOM,IAAAA,iDAA4B,EAACN,OAAOE;AAC/C;AACAP,cAAcY,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -8,6 +8,3 @@ _exportStar(require("./DialogSurface.types"), exports);
|
|
|
8
8
|
_exportStar(require("./renderDialogSurface"), exports);
|
|
9
9
|
_exportStar(require("./useDialogSurface"), exports);
|
|
10
10
|
_exportStar(require("./useDialogSurfaceStyles.styles"), exports);
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
|
|
@@ -15,6 +15,4 @@ const renderDialogSurface_unstable = (state, contextValues)=>{
|
|
|
15
15
|
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactPortal.Portal, null, slots.backdrop && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.backdrop, slotProps.backdrop), /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_contexts.DialogSurfaceProvider, {
|
|
16
16
|
value: contextValues.dialogSurface
|
|
17
17
|
}, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root)));
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=renderDialogSurface.js.map
|
|
18
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["renderDialogSurface.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n/**\n * Render the final JSX of DialogSurface\n */ export const renderDialogSurface_unstable = (state, contextValues)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(Portal, null, slots.backdrop && /*#__PURE__*/ createElement(slots.backdrop, slotProps.backdrop), /*#__PURE__*/ createElement(DialogSurfaceProvider, {\n value: contextValues.dialogSurface\n }, /*#__PURE__*/ createElement(slots.root, slotProps.root)));\n};\n"],"names":["renderDialogSurface_unstable","state","contextValues","slots","slotProps","getSlotsNext","createElement","Portal","backdrop","DialogSurfaceProvider","value","dialogSurface","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAMjCA;;aAAAA;;iCANkE;gCACtD;0BACS;6BACf;AAGZ,MAAMA,+BAA+B,CAACC,OAAOC,gBAAgB;IACpE,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACJ;IAC5C,OAAO,WAAW,GAAGK,IAAAA,8BAAa,EAACC,mBAAM,EAAE,IAAI,EAAEJ,MAAMK,QAAQ,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAACH,MAAMK,QAAQ,EAAEJ,UAAUI,QAAQ,GAAG,WAAW,GAAGF,IAAAA,8BAAa,EAACG,+BAAqB,EAAE;QACnLC,OAAOR,cAAcS,aAAa;IACtC,GAAG,WAAW,GAAGL,IAAAA,8BAAa,EAACH,MAAMS,IAAI,EAAER,UAAUQ,IAAI;AAC7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useDialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useEventCallback, useMergedRefs, isResolvedShorthand } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { isEscapeKeyDismiss } from '../../utils';\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 */ export const useDialogSurface_unstable = (props, ref)=>{\n const { backdrop , as } = props;\n const modalType = useDialogContext_unstable((ctx)=>ctx.modalType);\n const modalAttributes = useDialogContext_unstable((ctx)=>ctx.modalAttributes);\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 const handledBackdropClick = useEventCallback((event)=>{\n if (isResolvedShorthand(props.backdrop)) {\n var _props_backdrop, _props_backdrop_onClick;\n (_props_backdrop_onClick = (_props_backdrop = props.backdrop).onClick) === null || _props_backdrop_onClick === void 0 ? void 0 : _props_backdrop_onClick.call(_props_backdrop, event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick'\n });\n }\n });\n const handleKeyDown = useEventCallback((event)=>{\n var _props_onKeyDown;\n (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);\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 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 !== null && as !== void 0 ? as : 'div', {\n tabIndex: -1,\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"],"names":["useDialogSurface_unstable","props","ref","backdrop","as","modalType","useDialogContext_unstable","ctx","modalAttributes","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","useEventCallback","event","isResolvedShorthand","_props_backdrop","_props_backdrop_onClick","onClick","call","isDefaultPrevented","type","handleKeyDown","_props_onKeyDown","onKeyDown","isEscapeKeyDismiss","stopPropagation","components","root","resolveShorthand","required","defaultProps","getNativeElementProps","tabIndex","role","undefined","useMergedRefs"],"mappings":";;;;+BAYiBA;;aAAAA;;;6DAZM;gCACuF;0BACpE;uBACP;AASxB,MAAMA,4BAA4B,CAACC,OAAOC,MAAM;IACvD,MAAM,EAAEC,SAAQ,EAAGC,GAAE,EAAG,GAAGH;IAC3B,MAAMI,YAAYC,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIF,SAAS;IAChE,MAAMG,kBAAkBF,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIC,eAAe;IAC5E,MAAMC,YAAYH,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIE,SAAS;IAChE,MAAMC,OAAOJ,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIG,IAAI;IACtD,MAAMC,oBAAoBL,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAII,iBAAiB;IAChF,MAAMC,gBAAgBN,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIM,aAAa;IACxE,MAAMC,uBAAuBC,IAAAA,gCAAgB,EAAC,CAACC,QAAQ;QACnD,IAAIC,IAAAA,mCAAmB,EAAChB,MAAME,QAAQ,GAAG;YACrC,IAAIe,iBAAiBC;YACpBA,CAAAA,0BAA0B,AAACD,CAAAA,kBAAkBjB,MAAME,QAAQ,AAAD,EAAGiB,OAAO,AAAD,MAAO,IAAI,IAAID,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBE,IAAI,CAACH,iBAAiBF,MAAM;QACzL,CAAC;QACD,IAAIX,cAAc,WAAW,CAACW,MAAMM,kBAAkB,IAAI;YACtDX,kBAAkB;gBACdK;gBACAN,MAAM,KAAK;gBACXa,MAAM;YACV;QACJ,CAAC;IACL;IACA,MAAMC,gBAAgBT,IAAAA,gCAAgB,EAAC,CAACC,QAAQ;QAC5C,IAAIS;QACHA,CAAAA,mBAAmBxB,MAAMyB,SAAS,AAAD,MAAO,IAAI,IAAID,qBAAqB,KAAK,IAAI,KAAK,IAAIA,iBAAiBJ,IAAI,CAACpB,OAAOe,MAAM;QAC3H,IAAIW,IAAAA,yBAAkB,EAACX,OAAOX,YAAY;YACtCM,kBAAkB;gBACdK;gBACAN,MAAM,KAAK;gBACXa,MAAM;YACV;YACA,qFAAqF;YACrF,gDAAgD;YAChDP,MAAMY,eAAe;QACzB,CAAC;IACL;IACA,OAAO;QACHC,YAAY;YACR1B,UAAU;YACV2B,MAAM;QACV;QACA3B,UAAU4B,IAAAA,gCAAgB,EAAC5B,UAAU;YACjC6B,UAAUtB,QAAQL,cAAc;YAChC4B,cAAc;gBACV,eAAe;gBACfb,SAASN;YACb;QACJ;QACAgB,MAAMI,IAAAA,qCAAqB,EAAC9B,OAAO,IAAI,IAAIA,OAAO,KAAK,IAAIA,KAAK,KAAK,EAAE;YACnE+B,UAAU,CAAC;YACX,cAAc9B,cAAc;YAC5B+B,MAAM/B,cAAc,UAAU,gBAAgB,QAAQ;YACtD,mBAAmBJ,KAAK,CAAC,aAAa,GAAGoC,YAAYzB,aAAa;YAClE,GAAGX,KAAK;YACR,GAAGO,eAAe;YAClBkB,WAAWF;YACXtB,KAAKoC,IAAAA,6BAAa,EAACpC,KAAKO;QAC5B;IACJ;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useDialogSurfaceContextValues.js"],"sourcesContent":["export function useDialogSurfaceContextValues_unstable(state) {\n const dialogSurface = true;\n return {\n dialogSurface\n };\n}\n"],"names":["useDialogSurfaceContextValues_unstable","state","dialogSurface"],"mappings":";;;;+BAAgBA;;aAAAA;;AAAT,SAASA,uCAAuCC,KAAK,EAAE;IAC1D,MAAMC,gBAAgB,IAAI;IAC1B,OAAO;QACHA;IACJ;AACJ"}
|