@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
|
@@ -6,12 +6,10 @@ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
|
6
6
|
/**
|
|
7
7
|
* `DialogActions` is a container for the actions of the dialog.
|
|
8
8
|
* Apart from styling, this component does not have other behavior.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return renderDialogActions_unstable(state);
|
|
9
|
+
*/ export const DialogActions = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
10
|
+
const state = useDialogActions_unstable(props, ref);
|
|
11
|
+
useDialogActionsStyles_unstable(state);
|
|
12
|
+
useCustomStyleHook_unstable('useDialogActionsStyles_unstable')(state);
|
|
13
|
+
return renderDialogActions_unstable(state);
|
|
15
14
|
});
|
|
16
15
|
DialogActions.displayName = 'DialogActions';
|
|
17
|
-
//# sourceMappingURL=DialogActions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["DialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogActions_unstable } from './useDialogActions';\nimport { renderDialogActions_unstable } from './renderDialogActions';\nimport { useDialogActionsStyles_unstable } from './useDialogActionsStyles.styles';\nimport type { DialogActionsProps } from './DialogActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * `DialogActions` is a container for the actions of the dialog.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogActions: ForwardRefComponent<DialogActionsProps> = React.forwardRef((props, ref) => {\n const state = useDialogActions_unstable(props, ref);\n\n useDialogActionsStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogActionsStyles_unstable')(state);\n\n return renderDialogActions_unstable(state);\n});\n\nDialogActions.displayName = 'DialogActions';\n"],"names":["React","useDialogActions_unstable","renderDialogActions_unstable","useDialogActionsStyles_unstable","useCustomStyleHook_unstable","DialogActions","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,kCAAkC;AAGlF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACrG,MAAMC,QAAQR,0BAA0BM,OAAOC;IAE/CL,gCAAgCM;IAEhCL,4BAA4B,mCAAmCK;IAE/D,OAAOP,6BAA6BO;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=DialogActions.types.js.map
|
|
1
|
+
export { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["DialogActions.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogActionsSlots = {\n root: Slot<'div'>;\n};\n\nexport type DialogActionsPosition = 'start' | 'end';\n\n/**\n * DialogActions Props\n */\nexport type DialogActionsProps = ComponentProps<DialogActionsSlots> & {\n /**\n * defines the position on the dialog grid of the actions\n * @default 'end'\n */\n position?: DialogActionsPosition;\n\n /**\n * Makes the actions expand the entire width of the DialogBody\n * @default false\n */\n fluid?: boolean;\n};\n\n/**\n * State used in rendering DialogActions\n */\nexport type DialogActionsState = ComponentState<DialogActionsSlots> &\n Pick<Required<DialogActionsProps>, 'position' | 'fluid'>;\n"],"names":[],"mappings":"AAAA,WA6B2D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DialogActions';\nexport * from './DialogActions.types';\nexport * from './renderDialogActions';\nexport * from './useDialogActions';\nexport * from './useDialogActionsStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,kCAAkC"}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
2
|
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of DialogActions
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
slots,
|
|
9
|
-
slotProps
|
|
10
|
-
} = getSlotsNext(state);
|
|
11
|
-
// TODO Add additional slots in the appropriate place
|
|
12
|
-
return /*#__PURE__*/createElement(slots.root, slotProps.root);
|
|
5
|
+
*/ export const renderDialogActions_unstable = (state)=>{
|
|
6
|
+
const { slots , slotProps } = getSlotsNext(state);
|
|
7
|
+
// TODO Add additional slots in the appropriate place
|
|
8
|
+
return /*#__PURE__*/ createElement(slots.root, slotProps.root);
|
|
13
9
|
};
|
|
14
|
-
//# sourceMappingURL=renderDialogActions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["renderDialogActions.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } 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 } = getSlotsNext<DialogActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"names":["createElement","getSlotsNext","renderDialogActions_unstable","state","slots","slotProps","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC,QAA8B;IACzE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAAiCE;IAE9D,qDAAqD;IACrD,qBAAO,AAdT,cAcUC,MAAME,IAAI,EAAKD,UAAUC,IAAI;AACvC,EAAE"}
|
|
@@ -8,22 +8,17 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
|
8
8
|
*
|
|
9
9
|
* @param props - props from this instance of DialogActions
|
|
10
10
|
* @param ref - reference to root HTMLElement of DialogActions
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}),
|
|
25
|
-
position,
|
|
26
|
-
fluid
|
|
27
|
-
};
|
|
11
|
+
*/ export const useDialogActions_unstable = (props, ref)=>{
|
|
12
|
+
const { position ='end' , fluid =false } = props;
|
|
13
|
+
return {
|
|
14
|
+
components: {
|
|
15
|
+
root: 'div'
|
|
16
|
+
},
|
|
17
|
+
root: getNativeElementProps('div', {
|
|
18
|
+
ref,
|
|
19
|
+
...props
|
|
20
|
+
}),
|
|
21
|
+
position,
|
|
22
|
+
fluid
|
|
23
|
+
};
|
|
28
24
|
};
|
|
29
|
-
//# sourceMappingURL=useDialogActions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["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', 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":["React","getNativeElementProps","useDialogActions_unstable","props","ref","position","fluid","components","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAGlE;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC,MACuB;IACvB,MAAM,EAAEC,UAAW,MAAK,EAAEC,OAAQ,KAAK,CAAA,EAAE,GAAGH;IAC5C,OAAO;QACLI,YAAY;YACVC,MAAM;QACR;QACAA,MAAMP,sBAAsB,OAAO;YACjCG;YACA,GAAGD,KAAK;QACV;QACAE;QACAC;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","shorthands","DIALOG_GAP","MEDIA_QUERY_BREAKPOINT_SELECTOR","dialogActionsClassNames","root","useStyles","Bqenvij","B7ck84d","mc9l5x","Ijaq50","nk6f5a","i8kkvl","Belr9w4","Bmdcpmo","th9wkt","gridPositionEnd","Bdqf98w","Br312pm","Bw0ie65","gridPositionStart","fluidStart","fluidEnd","d","m","useDialogActionsStyles_unstable","state","styles","className","position","fluid"],"sources":["
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","shorthands","DIALOG_GAP","MEDIA_QUERY_BREAKPOINT_SELECTOR","dialogActionsClassNames","root","useStyles","Bqenvij","B7ck84d","mc9l5x","Ijaq50","nk6f5a","i8kkvl","Belr9w4","Bmdcpmo","th9wkt","gridPositionEnd","Bdqf98w","Br312pm","Bw0ie65","gridPositionStart","fluidStart","fluidEnd","d","m","useDialogActionsStyles_unstable","state","styles","className","position","fluid"],"sources":["useDialogActionsStyles.styles.js"],"sourcesContent":["import { makeStyles, 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 = makeStyles({\n root: {\n height: 'fit-content',\n boxSizing: 'border-box',\n display: 'flex',\n gridRowStart: 3,\n gridRowEnd: 3,\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n flexDirection: 'column',\n justifySelf: 'stretch'\n }\n },\n gridPositionEnd: {\n justifySelf: 'end',\n gridColumnStart: 2,\n gridColumnEnd: 4\n },\n gridPositionStart: {\n justifySelf: 'start',\n gridColumnStart: 1,\n gridColumnEnd: 2\n },\n fluidStart: {\n gridColumnEnd: 4\n },\n fluidEnd: {\n gridColumnStart: 1\n }\n});\n/**\n * Apply styling to the DialogActions slots based on the state\n */ export 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"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,UAAU,EAAEC,+BAA+B,QAAQ,0BAA0B;AACtF,OAAO,MAAMC,uBAAuB,GAAG;EACnCC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,SAAS,gBAAGP,QAAA;EAAAM,IAAA;IAAAE,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,eAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,iBAAA;IAAAH,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAE,UAAA;IAAAF,OAAA;EAAA;EAAAG,QAAA;IAAAJ,OAAA;EAAA;AAAA;EAAAK,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CA6BjB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,+BAA+B,GAAIC,KAAK,IAAG;EACxD,MAAMC,MAAM,GAAGrB,SAAS,CAAC,CAAC;EAC1BoB,KAAK,CAACrB,IAAI,CAACuB,SAAS,GAAG5B,YAAY,CAACI,uBAAuB,CAACC,IAAI,EAAEsB,MAAM,CAACtB,IAAI,EAAEqB,KAAK,CAACG,QAAQ,KAAK,OAAO,IAAIF,MAAM,CAACP,iBAAiB,EAAEM,KAAK,CAACG,QAAQ,KAAK,KAAK,IAAIF,MAAM,CAACX,eAAe,EAAEU,KAAK,CAACI,KAAK,IAAIJ,KAAK,CAACG,QAAQ,KAAK,OAAO,IAAIF,MAAM,CAACN,UAAU,EAAEK,KAAK,CAACI,KAAK,IAAIJ,KAAK,CAACG,QAAQ,KAAK,KAAK,IAAIF,MAAM,CAACL,QAAQ,EAAEI,KAAK,CAACrB,IAAI,CAACuB,SAAS,CAAC;EAC5U,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -6,12 +6,10 @@ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
|
6
6
|
/**
|
|
7
7
|
* The `DialogBody` is a container where the content of the dialog is rendered.
|
|
8
8
|
* Apart from styling, this component does not have other behavior.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return renderDialogBody_unstable(state);
|
|
9
|
+
*/ export const DialogBody = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
10
|
+
const state = useDialogBody_unstable(props, ref);
|
|
11
|
+
useDialogBodyStyles_unstable(state);
|
|
12
|
+
useCustomStyleHook_unstable('useDialogBodyStyles_unstable')(state);
|
|
13
|
+
return renderDialogBody_unstable(state);
|
|
15
14
|
});
|
|
16
15
|
DialogBody.displayName = 'DialogBody';
|
|
17
|
-
//# sourceMappingURL=DialogBody.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["DialogBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogBody_unstable } from './useDialogBody';\nimport { renderDialogBody_unstable } from './renderDialogBody';\nimport { useDialogBodyStyles_unstable } from './useDialogBodyStyles.styles';\nimport type { DialogBodyProps } from './DialogBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogBody` is a container where the content of the dialog is rendered.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogBody: ForwardRefComponent<DialogBodyProps> = React.forwardRef((props, ref) => {\n const state = useDialogBody_unstable(props, ref);\n\n useDialogBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogBodyStyles_unstable')(state);\n\n return renderDialogBody_unstable(state);\n});\n\nDialogBody.displayName = 'DialogBody';\n"],"names":["React","useDialogBody_unstable","renderDialogBody_unstable","useDialogBodyStyles_unstable","useCustomStyleHook_unstable","DialogBody","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,+BAA+B;AAG5E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,2BAAmDL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC/F,MAAMC,QAAQR,uBAAuBM,OAAOC;IAE5CL,6BAA6BM;IAE7BL,4BAA4B,gCAAgCK;IAE5D,OAAOP,0BAA0BO;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=DialogBody.types.js.map
|
|
1
|
+
export { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["DialogBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogBodySlots = {\n root: Slot<'div'>;\n};\n\n/**\n * DialogBody Props\n */\nexport type DialogBodyProps = ComponentProps<DialogBodySlots> & {};\n\n/**\n * State used in rendering DialogBody\n */\nexport type DialogBodyState = ComponentState<DialogBodySlots>;\n"],"names":[],"mappings":"AAAA,WAc8D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DialogBody';\nexport * from './DialogBody.types';\nexport * from './renderDialogBody';\nexport * from './useDialogBody';\nexport * from './useDialogBodyStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,+BAA+B"}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
2
|
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of DialogBody
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
slots,
|
|
9
|
-
slotProps
|
|
10
|
-
} = getSlotsNext(state);
|
|
11
|
-
// TODO Add additional slots in the appropriate place
|
|
12
|
-
return /*#__PURE__*/createElement(slots.root, slotProps.root);
|
|
5
|
+
*/ export const renderDialogBody_unstable = (state)=>{
|
|
6
|
+
const { slots , slotProps } = getSlotsNext(state);
|
|
7
|
+
// TODO Add additional slots in the appropriate place
|
|
8
|
+
return /*#__PURE__*/ createElement(slots.root, slotProps.root);
|
|
13
9
|
};
|
|
14
|
-
//# sourceMappingURL=renderDialogBody.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["renderDialogBody.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } 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 } = getSlotsNext<DialogBodySlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"names":["createElement","getSlotsNext","renderDialogBody_unstable","state","slots","slotProps","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC,QAA2B;IACnE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAA8BE;IAE3D,qDAAqD;IACrD,qBAAO,AAdT,cAcUC,MAAME,IAAI,EAAKD,UAAUC,IAAI;AACvC,EAAE"}
|
|
@@ -8,17 +8,15 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
|
8
8
|
*
|
|
9
9
|
* @param props - props from this instance of DialogBody
|
|
10
10
|
* @param ref - reference to root HTMLElement of DialogBody
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
};
|
|
11
|
+
*/ export const useDialogBody_unstable = (props, ref)=>{
|
|
12
|
+
var _props_as;
|
|
13
|
+
return {
|
|
14
|
+
components: {
|
|
15
|
+
root: 'div'
|
|
16
|
+
},
|
|
17
|
+
root: getNativeElementProps((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'div', {
|
|
18
|
+
ref,
|
|
19
|
+
...props
|
|
20
|
+
})
|
|
21
|
+
};
|
|
23
22
|
};
|
|
24
|
-
//# sourceMappingURL=useDialogBody.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["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"],"names":["React","getNativeElementProps","useDialogBody_unstable","props","ref","components","root","as"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAGlE;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC,MAAiD;QAKhFD;IAJ9B,OAAO;QACLE,YAAY;YACVC,MAAM;QACR;QACAA,MAAML,sBAAsBE,CAAAA,YAAAA,MAAMI,EAAE,cAARJ,uBAAAA,YAAY,KAAK,EAAE;YAC7CC;YACA,GAAGD,KAAK;QACV;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","shorthands","DIALOG_GAP","MEDIA_QUERY_BREAKPOINT_SELECTOR","SURFACE_PADDING","dialogBodyClassNames","root","useStyles","mc9l5x","fshzfu","Bxyxcbc","B7ck84d","B68tc82","Bmxbyg5","i8kkvl","Belr9w4","wkccdc","B5xtmjs","Bqu9lor","d","m","useDialogBodyStyles_unstable","state","styles","className"],"sources":["
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","shorthands","DIALOG_GAP","MEDIA_QUERY_BREAKPOINT_SELECTOR","SURFACE_PADDING","dialogBodyClassNames","root","useStyles","mc9l5x","fshzfu","Bxyxcbc","B7ck84d","B68tc82","Bmxbyg5","i8kkvl","Belr9w4","wkccdc","B5xtmjs","Bqu9lor","d","m","useDialogBodyStyles_unstable","state","styles","className"],"sources":["useDialogBodyStyles.styles.js"],"sourcesContent":["import { makeStyles, 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 */ const useStyles = makeStyles({\n root: {\n display: 'grid',\n '&::backdrop': {\n backgroundColor: 'rgba(0, 0, 0, 0.4)'\n },\n maxHeight: `calc(100vh - 2 * ${SURFACE_PADDING})`,\n boxSizing: 'border-box',\n ...shorthands.overflow('unset'),\n ...shorthands.gap(DIALOG_GAP),\n gridTemplateRows: 'auto 1fr',\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n gridTemplateRows: 'auto 1fr auto'\n }\n }\n});\n/**\n * Apply styling to the DialogBody slots based on the state\n */ export 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"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,UAAU,EAAEC,+BAA+B,EAAEC,eAAe,QAAQ,gBAAgB;AAC7F,OAAO,MAAMC,oBAAoB,GAAG;EAChCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGR,QAAA;EAAAO,IAAA;IAAAE,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CAgBrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,4BAA4B,GAAIC,KAAK,IAAG;EACrD,MAAMC,MAAM,GAAGhB,SAAS,CAAC,CAAC;EAC1Be,KAAK,CAAChB,IAAI,CAACkB,SAAS,GAAGxB,YAAY,CAACK,oBAAoB,CAACC,IAAI,EAAEiB,MAAM,CAACjB,IAAI,EAAEgB,KAAK,CAAChB,IAAI,CAACkB,SAAS,CAAC;EACjG,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -6,12 +6,10 @@ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
|
6
6
|
/**
|
|
7
7
|
* The `DialogContent` is a container where the content of the dialog is rendered.
|
|
8
8
|
* Apart from styling, this component does not have other behavior.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return renderDialogContent_unstable(state);
|
|
9
|
+
*/ export const DialogContent = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
10
|
+
const state = useDialogContent_unstable(props, ref);
|
|
11
|
+
useDialogContentStyles_unstable(state);
|
|
12
|
+
useCustomStyleHook_unstable('useDialogContentStyles_unstable')(state);
|
|
13
|
+
return renderDialogContent_unstable(state);
|
|
15
14
|
});
|
|
16
15
|
DialogContent.displayName = 'DialogContent';
|
|
17
|
-
//# sourceMappingURL=DialogContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["DialogContent.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogContent_unstable } from './useDialogContent';\nimport { renderDialogContent_unstable } from './renderDialogContent';\nimport { useDialogContentStyles_unstable } from './useDialogContentStyles.styles';\nimport type { DialogContentProps } from './DialogContent.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogContent` is a container where the content of the dialog is rendered.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogContent: ForwardRefComponent<DialogContentProps> = React.forwardRef((props, ref) => {\n const state = useDialogContent_unstable(props, ref);\n\n useDialogContentStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogContentStyles_unstable')(state);\n\n return renderDialogContent_unstable(state);\n});\n\nDialogContent.displayName = 'DialogContent';\n"],"names":["React","useDialogContent_unstable","renderDialogContent_unstable","useDialogContentStyles_unstable","useCustomStyleHook_unstable","DialogContent","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,kCAAkC;AAGlF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACrG,MAAMC,QAAQR,0BAA0BM,OAAOC;IAE/CL,gCAAgCM;IAEhCL,4BAA4B,mCAAmCK;IAE/D,OAAOP,6BAA6BO;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=DialogContent.types.js.map
|
|
1
|
+
export { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["DialogContent.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogContentSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * DialogContent Props\n */\nexport type DialogContentProps = ComponentProps<DialogContentSlots>;\n\n/**\n * State used in rendering DialogContent\n */\nexport type DialogContentState = ComponentState<DialogContentSlots>;\n"],"names":[],"mappings":"AAAA,WAcoE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DialogContent';\nexport * from './DialogContent.types';\nexport * from './renderDialogContent';\nexport * from './useDialogContent';\nexport * from './useDialogContentStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,kCAAkC"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
2
|
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of DialogContent
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
slots,
|
|
9
|
-
slotProps
|
|
10
|
-
} = getSlotsNext(state);
|
|
11
|
-
return /*#__PURE__*/createElement(slots.root, slotProps.root);
|
|
5
|
+
*/ export const renderDialogContent_unstable = (state)=>{
|
|
6
|
+
const { slots , slotProps } = getSlotsNext(state);
|
|
7
|
+
return /*#__PURE__*/ createElement(slots.root, slotProps.root);
|
|
12
8
|
};
|
|
13
|
-
//# sourceMappingURL=renderDialogContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["renderDialogContent.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { DialogContentState, DialogContentSlots } from './DialogContent.types';\n\n/**\n * Render the final JSX of DialogContent\n */\nexport const renderDialogContent_unstable = (state: DialogContentState) => {\n const { slots, slotProps } = getSlotsNext<DialogContentSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"names":["createElement","getSlotsNext","renderDialogContent_unstable","state","slots","slotProps","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC,QAA8B;IACzE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAAiCE;IAE9D,qBAAO,AAbT,cAaUC,MAAME,IAAI,EAAKD,UAAUC,IAAI;AACvC,EAAE"}
|
|
@@ -8,17 +8,15 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
|
8
8
|
*
|
|
9
9
|
* @param props - props from this instance of DialogBody
|
|
10
10
|
* @param ref - reference to root HTMLElement of DialogBody
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
};
|
|
11
|
+
*/ export const useDialogContent_unstable = (props, ref)=>{
|
|
12
|
+
var _props_as;
|
|
13
|
+
return {
|
|
14
|
+
components: {
|
|
15
|
+
root: 'div'
|
|
16
|
+
},
|
|
17
|
+
root: getNativeElementProps((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'div', {
|
|
18
|
+
ref,
|
|
19
|
+
...props
|
|
20
|
+
})
|
|
21
|
+
};
|
|
23
22
|
};
|
|
24
|
-
//# sourceMappingURL=useDialogContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["useDialogContent.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { DialogContentProps, DialogContentState } from './DialogContent.types';\n\n/**\n * Create the state required to render DialogBody.\n *\n * The returned state can be modified with hooks such as useDialogBodyStyles_unstable,\n * before being passed to renderDialogBody_unstable.\n *\n * @param props - props from this instance of DialogBody\n * @param ref - reference to root HTMLElement of DialogBody\n */\nexport const useDialogContent_unstable = (\n props: DialogContentProps,\n ref: React.Ref<HTMLElement>,\n): DialogContentState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps(props.as ?? 'div', {\n ref,\n ...props,\n }),\n };\n};\n"],"names":["React","getNativeElementProps","useDialogContent_unstable","props","ref","components","root","as"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAGlE;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC,MACuB;QAKOD;IAJ9B,OAAO;QACLE,YAAY;YACVC,MAAM;QACR;QACAA,MAAML,sBAAsBE,CAAAA,YAAAA,MAAMI,EAAE,cAARJ,uBAAAA,YAAY,KAAK,EAAE;YAC7CC;YACA,GAAGD,KAAK;QACV;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","dialogContentClassNames","root","useStyles","Bmxbyg5","sshi5w","B7ck84d","Ijaq50","nk6f5a","Br312pm","Bw0ie65","z8tnut","z189sj","Byoj8tv","uwmqm3","B6of3ja","t21cq0","jrapky","Frg6f3","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","useDialogContentStyles_unstable","state","styles","className"],"sources":["
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","dialogContentClassNames","root","useStyles","Bmxbyg5","sshi5w","B7ck84d","Ijaq50","nk6f5a","Br312pm","Bw0ie65","z8tnut","z189sj","Byoj8tv","uwmqm3","B6of3ja","t21cq0","jrapky","Frg6f3","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","useDialogContentStyles_unstable","state","styles","className"],"sources":["useDialogContentStyles.styles.js"],"sourcesContent":["import { makeStyles, 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 */ const useStyles = makeStyles({\n root: {\n overflowY: 'auto',\n minHeight: '32px',\n boxSizing: 'border-box',\n gridRowStart: 2,\n gridRowEnd: 2,\n gridColumnStart: 1,\n gridColumnEnd: 4,\n ...shorthands.padding(tokens.strokeWidthThick),\n ...shorthands.margin(`calc(${tokens.strokeWidthThick} * -1)`),\n ...typographyStyles.body1\n }\n});\n/**\n * Apply styling to the DialogContent slots based on the state\n */ export 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"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,uBAAuB,GAAG;EACnCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGP,QAAA;EAAAM,IAAA;IAAAE,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAarB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,+BAA+B,GAAIC,KAAK,IAAG;EACxD,MAAMC,MAAM,GAAGvB,SAAS,CAAC,CAAC;EAC1BsB,KAAK,CAACvB,IAAI,CAACyB,SAAS,GAAG9B,YAAY,CAACI,uBAAuB,CAACC,IAAI,EAAEwB,MAAM,CAACxB,IAAI,EAAEuB,KAAK,CAACvB,IAAI,CAACyB,SAAS,CAAC;EACpG,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -7,13 +7,11 @@ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
|
7
7
|
/**
|
|
8
8
|
* DialogSurface component represents the visual part of a `Dialog` as a whole,
|
|
9
9
|
* it contains everything that should be visible.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return renderDialogSurface_unstable(state, contextValues);
|
|
10
|
+
*/ export const DialogSurface = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
11
|
+
const state = useDialogSurface_unstable(props, ref);
|
|
12
|
+
const contextValues = useDialogSurfaceContextValues_unstable(state);
|
|
13
|
+
useDialogSurfaceStyles_unstable(state);
|
|
14
|
+
useCustomStyleHook_unstable('useDialogSurfaceStyles_unstable')(state);
|
|
15
|
+
return renderDialogSurface_unstable(state, contextValues);
|
|
17
16
|
});
|
|
18
17
|
DialogSurface.displayName = 'DialogSurface';
|
|
19
|
-
//# sourceMappingURL=DialogSurface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["DialogSurface.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles.styles';\nimport type { DialogSurfaceProps } from './DialogSurface.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DialogSurface component represents the visual part of a `Dialog` as a whole,\n * it contains everything that should be visible.\n */\nexport const DialogSurface: ForwardRefComponent<DialogSurfaceProps> = React.forwardRef((props, ref) => {\n const state = useDialogSurface_unstable(props, ref);\n const contextValues = useDialogSurfaceContextValues_unstable(state);\n\n useDialogSurfaceStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogSurfaceStyles_unstable')(state);\n\n return renderDialogSurface_unstable(state, contextValues);\n});\n\nDialogSurface.displayName = 'DialogSurface';\n"],"names":["React","useDialogSurface_unstable","renderDialogSurface_unstable","useDialogSurfaceStyles_unstable","useDialogSurfaceContextValues_unstable","useCustomStyleHook_unstable","DialogSurface","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,kCAAkC;AAGlF,SAASC,sCAAsC,QAAQ,kCAAkC;AACzF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,8BAAyDN,MAAMO,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACrG,MAAMC,QAAQT,0BAA0BO,OAAOC;IAC/C,MAAME,gBAAgBP,uCAAuCM;IAE7DP,gCAAgCO;IAEhCL,4BAA4B,mCAAmCK;IAE/D,OAAOR,6BAA6BQ,OAAOC;AAC7C,GAAG;AAEHL,cAAcM,WAAW,GAAG"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=DialogSurface.types.js.map
|
|
1
|
+
export { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["DialogSurface.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { DialogSurfaceContextValue } from '../../contexts';\n\nexport type DialogSurfaceSlots = {\n /**\n * Dimmed background of dialog.\n * The default backdrop is rendered as a `<div>` with styling.\n * This slot expects a `<div>` element which will replace the default backdrop.\n * The backdrop should have `aria-hidden=\"true\"`.\n *\n */\n backdrop?: Slot<'div'>;\n root: Slot<'div'>;\n};\n\n/**\n * Union between all possible semantic element that represent a DialogSurface\n */\nexport type DialogSurfaceElement = HTMLElement;\n\n/**\n * DialogSurface Props\n */\nexport type DialogSurfaceProps = ComponentProps<DialogSurfaceSlots>;\n\nexport type DialogSurfaceContextValues = {\n dialogSurface: DialogSurfaceContextValue;\n};\n\n/**\n * State used in rendering DialogSurface\n */\nexport type DialogSurfaceState = ComponentState<DialogSurfaceSlots>;\n"],"names":[],"mappings":"AAAA,WAgCoE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,kCAAkC"}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
2
|
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
3
3
|
import { DialogSurfaceProvider } from '../../contexts';
|
|
4
4
|
import { Portal } from '@fluentui/react-portal';
|
|
5
5
|
/**
|
|
6
6
|
* Render the final JSX of DialogSurface
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
slotProps
|
|
12
|
-
} = getSlotsNext(state);
|
|
13
|
-
return /*#__PURE__*/createElement(Portal, null, slots.backdrop && /*#__PURE__*/createElement(slots.backdrop, slotProps.backdrop), /*#__PURE__*/createElement(DialogSurfaceProvider, {
|
|
14
|
-
value: contextValues.dialogSurface
|
|
15
|
-
}, /*#__PURE__*/createElement(slots.root, slotProps.root)));
|
|
7
|
+
*/ export const renderDialogSurface_unstable = (state, contextValues)=>{
|
|
8
|
+
const { slots , slotProps } = getSlotsNext(state);
|
|
9
|
+
return /*#__PURE__*/ createElement(Portal, null, slots.backdrop && /*#__PURE__*/ createElement(slots.backdrop, slotProps.backdrop), /*#__PURE__*/ createElement(DialogSurfaceProvider, {
|
|
10
|
+
value: contextValues.dialogSurface
|
|
11
|
+
}, /*#__PURE__*/ createElement(slots.root, slotProps.root)));
|
|
16
12
|
};
|
|
17
|
-
//# sourceMappingURL=renderDialogSurface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["renderDialogSurface.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { DialogSurfaceState, DialogSurfaceSlots, DialogSurfaceContextValues } from './DialogSurface.types';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (state: DialogSurfaceState, contextValues: DialogSurfaceContextValues) => {\n const { slots, slotProps } = getSlotsNext<DialogSurfaceSlots>(state);\n\n return (\n <Portal>\n {slots.backdrop && <slots.backdrop {...slotProps.backdrop} />}\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n <slots.root {...slotProps.root} />\n </DialogSurfaceProvider>\n </Portal>\n );\n};\n"],"names":["createElement","getSlotsNext","DialogSurfaceProvider","Portal","renderDialogSurface_unstable","state","contextValues","slots","slotProps","backdrop","value","dialogSurface","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAEzD,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,MAAM,QAAQ,yBAAyB;AAEhD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC,OAA2BC,gBAA8C;IACpH,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGP,aAAiCI;IAE9D,qBACE,AAhBJ,cAgBKF,cACEI,MAAME,QAAQ,kBAAI,AAjBzB,cAiB0BF,MAAME,QAAQ,EAAKD,UAAUC,QAAQ,iBACzD,AAlBN,cAkBOP;QAAsBQ,OAAOJ,cAAcK,aAAa;qBACvD,AAnBR,cAmBSJ,MAAMK,IAAI,EAAKJ,UAAUI,IAAI;AAItC,EAAE"}
|