Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
Dialog: function() {
return _index.Dialog;
},
renderDialog_unstable: function() {
return _index.renderDialog_unstable;
},
useDialogContextValues_unstable: function() {
return _index.useDialogContextValues_unstable;
},
useDialog_unstable: function() {
return _index.useDialog_unstable;
}
});
const _index = require("./components/Dialog/index");
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/Dialog.ts"],"sourcesContent":["export type {\n DialogContextValues,\n DialogModalType,\n DialogOpenChangeData,\n DialogOpenChangeEvent,\n DialogOpenChangeEventHandler,\n DialogProps,\n DialogSlots,\n DialogState,\n InternalDialogSlots,\n} from './components/Dialog/index';\nexport {\n Dialog,\n renderDialog_unstable,\n useDialogContextValues_unstable,\n useDialog_unstable,\n} from './components/Dialog/index';\n"],"names":["Dialog","renderDialog_unstable","useDialogContextValues_unstable","useDialog_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAYEA,MAAM;eAANA,aAAM;;IACNC,qBAAqB;eAArBA,4BAAqB;;IACrBC,+BAA+B;eAA/BA,sCAA+B;;IAC/BC,kBAAkB;eAAlBA,yBAAkB;;;uBACb"}
+28
View File
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogActions: function() {
return _index.DialogActions;
},
dialogActionsClassNames: function() {
return _index.dialogActionsClassNames;
},
renderDialogActions_unstable: function() {
return _index.renderDialogActions_unstable;
},
useDialogActionsStyles_unstable: function() {
return _index.useDialogActionsStyles_unstable;
},
useDialogActions_unstable: function() {
return _index.useDialogActions_unstable;
}
});
const _index = require("./components/DialogActions/index");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DialogActions.ts"],"sourcesContent":["export type {\n DialogActionsPosition,\n DialogActionsProps,\n DialogActionsSlots,\n DialogActionsState,\n} from './components/DialogActions/index';\nexport {\n DialogActions,\n dialogActionsClassNames,\n renderDialogActions_unstable,\n useDialogActionsStyles_unstable,\n useDialogActions_unstable,\n} from './components/DialogActions/index';\n"],"names":["DialogActions","dialogActionsClassNames","renderDialogActions_unstable","useDialogActionsStyles_unstable","useDialogActions_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAOEA,aAAa;eAAbA,oBAAa;;IACbC,uBAAuB;eAAvBA,8BAAuB;;IACvBC,4BAA4B;eAA5BA,mCAA4B;;IAC5BC,+BAA+B;eAA/BA,sCAA+B;;IAC/BC,yBAAyB;eAAzBA,gCAAyB;;;uBACpB"}
+28
View File
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogBody: function() {
return _index.DialogBody;
},
dialogBodyClassNames: function() {
return _index.dialogBodyClassNames;
},
renderDialogBody_unstable: function() {
return _index.renderDialogBody_unstable;
},
useDialogBodyStyles_unstable: function() {
return _index.useDialogBodyStyles_unstable;
},
useDialogBody_unstable: function() {
return _index.useDialogBody_unstable;
}
});
const _index = require("./components/DialogBody/index");
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DialogBody.ts"],"sourcesContent":["export type { DialogBodyProps, DialogBodySlots, DialogBodyState } from './components/DialogBody/index';\nexport {\n DialogBody,\n dialogBodyClassNames,\n renderDialogBody_unstable,\n useDialogBodyStyles_unstable,\n useDialogBody_unstable,\n} from './components/DialogBody/index';\n"],"names":["DialogBody","dialogBodyClassNames","renderDialogBody_unstable","useDialogBodyStyles_unstable","useDialogBody_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEEA,UAAU;eAAVA,iBAAU;;IACVC,oBAAoB;eAApBA,2BAAoB;;IACpBC,yBAAyB;eAAzBA,gCAAyB;;IACzBC,4BAA4B;eAA5BA,mCAA4B;;IAC5BC,sBAAsB;eAAtBA,6BAAsB;;;uBACjB"}
+28
View File
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogContent: function() {
return _index.DialogContent;
},
dialogContentClassNames: function() {
return _index.dialogContentClassNames;
},
renderDialogContent_unstable: function() {
return _index.renderDialogContent_unstable;
},
useDialogContentStyles_unstable: function() {
return _index.useDialogContentStyles_unstable;
},
useDialogContent_unstable: function() {
return _index.useDialogContent_unstable;
}
});
const _index = require("./components/DialogContent/index");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DialogContent.ts"],"sourcesContent":["export type { DialogContentProps, DialogContentSlots, DialogContentState } from './components/DialogContent/index';\nexport {\n DialogContent,\n dialogContentClassNames,\n renderDialogContent_unstable,\n useDialogContentStyles_unstable,\n useDialogContent_unstable,\n} from './components/DialogContent/index';\n"],"names":["DialogContent","dialogContentClassNames","renderDialogContent_unstable","useDialogContentStyles_unstable","useDialogContent_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEEA,aAAa;eAAbA,oBAAa;;IACbC,uBAAuB;eAAvBA,8BAAuB;;IACvBC,4BAA4B;eAA5BA,mCAA4B;;IAC5BC,+BAA+B;eAA/BA,sCAA+B;;IAC/BC,yBAAyB;eAAzBA,gCAAyB;;;uBACpB"}
+31
View File
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogSurface: function() {
return _index.DialogSurface;
},
dialogSurfaceClassNames: function() {
return _index.dialogSurfaceClassNames;
},
renderDialogSurface_unstable: function() {
return _index.renderDialogSurface_unstable;
},
useDialogSurfaceContextValues_unstable: function() {
return _index.useDialogSurfaceContextValues_unstable;
},
useDialogSurfaceStyles_unstable: function() {
return _index.useDialogSurfaceStyles_unstable;
},
useDialogSurface_unstable: function() {
return _index.useDialogSurface_unstable;
}
});
const _index = require("./components/DialogSurface/index");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DialogSurface.ts"],"sourcesContent":["export type {\n DialogSurfaceContextValues,\n DialogSurfaceElement,\n DialogSurfaceProps,\n DialogSurfaceSlots,\n DialogSurfaceState,\n} from './components/DialogSurface/index';\nexport {\n DialogSurface,\n dialogSurfaceClassNames,\n renderDialogSurface_unstable,\n useDialogSurfaceContextValues_unstable,\n useDialogSurfaceStyles_unstable,\n useDialogSurface_unstable,\n} from './components/DialogSurface/index';\n"],"names":["DialogSurface","dialogSurfaceClassNames","renderDialogSurface_unstable","useDialogSurfaceContextValues_unstable","useDialogSurfaceStyles_unstable","useDialogSurface_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAQEA,aAAa;eAAbA,oBAAa;;IACbC,uBAAuB;eAAvBA,8BAAuB;;IACvBC,4BAA4B;eAA5BA,mCAA4B;;IAC5BC,sCAAsC;eAAtCA,6CAAsC;;IACtCC,+BAA+B;eAA/BA,sCAA+B;;IAC/BC,yBAAyB;eAAzBA,gCAAyB;;;uBACpB"}
+31
View File
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogTitle: function() {
return _index.DialogTitle;
},
dialogTitleClassNames: function() {
return _index.dialogTitleClassNames;
},
renderDialogTitle_unstable: function() {
return _index.renderDialogTitle_unstable;
},
useDialogTitleInternalStyles: function() {
return _index.useDialogTitleInternalStyles;
},
useDialogTitleStyles_unstable: function() {
return _index.useDialogTitleStyles_unstable;
},
useDialogTitle_unstable: function() {
return _index.useDialogTitle_unstable;
}
});
const _index = require("./components/DialogTitle/index");
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DialogTitle.ts"],"sourcesContent":["export type { DialogTitleProps, DialogTitleSlots, DialogTitleState } from './components/DialogTitle/index';\nexport {\n DialogTitle,\n dialogTitleClassNames,\n renderDialogTitle_unstable,\n useDialogTitleInternalStyles,\n useDialogTitleStyles_unstable,\n useDialogTitle_unstable,\n} from './components/DialogTitle/index';\n"],"names":["DialogTitle","dialogTitleClassNames","renderDialogTitle_unstable","useDialogTitleInternalStyles","useDialogTitleStyles_unstable","useDialogTitle_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEEA,WAAW;eAAXA,kBAAW;;IACXC,qBAAqB;eAArBA,4BAAqB;;IACrBC,0BAA0B;eAA1BA,iCAA0B;;IAC1BC,4BAA4B;eAA5BA,mCAA4B;;IAC5BC,6BAA6B;eAA7BA,oCAA6B;;IAC7BC,uBAAuB;eAAvBA,8BAAuB;;;uBAClB"}
+22
View File
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogTrigger: function() {
return _index.DialogTrigger;
},
renderDialogTrigger_unstable: function() {
return _index.renderDialogTrigger_unstable;
},
useDialogTrigger_unstable: function() {
return _index.useDialogTrigger_unstable;
}
});
const _index = require("./components/DialogTrigger/index");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DialogTrigger.ts"],"sourcesContent":["export type {\n DialogTriggerAction,\n DialogTriggerChildProps,\n DialogTriggerProps,\n DialogTriggerState,\n} from './components/DialogTrigger/index';\nexport {\n DialogTrigger,\n renderDialogTrigger_unstable,\n useDialogTrigger_unstable,\n} from './components/DialogTrigger/index';\n"],"names":["DialogTrigger","renderDialogTrigger_unstable","useDialogTrigger_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAOEA,aAAa;eAAbA,oBAAa;;IACbC,4BAA4B;eAA5BA,mCAA4B;;IAC5BC,yBAAyB;eAAzBA,gCAAyB;;;uBACpB"}
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Dialog", {
enumerable: true,
get: function() {
return Dialog;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDialog = require("./useDialog");
const _renderDialog = require("./renderDialog");
const _useDialogContextValues = require("./useDialogContextValues");
const Dialog = /*#__PURE__*/ _react.memo((props)=>{
const state = (0, _useDialog.useDialog_unstable)(props);
const contextValues = (0, _useDialogContextValues.useDialogContextValues_unstable)(state);
return (0, _renderDialog.renderDialog_unstable)(state, contextValues);
});
Dialog.displayName = 'Dialog';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialog_unstable } from './useDialog';\nimport { renderDialog_unstable } from './renderDialog';\nimport type { DialogProps } from './Dialog.types';\nimport { useDialogContextValues_unstable } from './useDialogContextValues';\n\n/**\n * The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.\n * It provides context down the hierarchy to `children` compound components to allow functionality.\n * This component expects to receive as children either a `DialogSurface` or a `DialogTrigger`\n * and a `DialogSurface` (or some component that will eventually render one of those compound components)\n * in this specific order\n */\nexport const Dialog: React.FC<DialogProps> = React.memo(props => {\n const state = useDialog_unstable(props);\n const contextValues = useDialogContextValues_unstable(state);\n\n return renderDialog_unstable(state, contextValues);\n});\n\nDialog.displayName = 'Dialog';\n"],"names":["Dialog","React","memo","props","state","useDialog_unstable","contextValues","useDialogContextValues_unstable","renderDialog_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;2BACY;8BACG;wCAEU;AASzC,MAAMA,SAAAA,WAAAA,GAAgCC,OAAMC,IAAI,CAACC,CAAAA;IACtD,MAAMC,QAAQC,IAAAA,6BAAAA,EAAmBF;IACjC,MAAMG,gBAAgBC,IAAAA,uDAAAA,EAAgCH;IAEtD,OAAOI,IAAAA,mCAAAA,EAAsBJ,OAAOE;AACtC;AAEAN,OAAOS,WAAW,GAAG"}
@@ -0,0 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Dialog/Dialog.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { PresenceMotionSlotProps } from '@fluentui/react-motion';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nimport type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogSurfaceElement } from '../DialogSurface/DialogSurface.types';\n\nexport type DialogSlots = {\n /**\n * For more information refer to the [Motion docs page](https://react.fluentui.dev/?path=/docs/motion-motion-slot--docs).\n *\n */\n surfaceMotion: Slot<PresenceMotionSlotProps>;\n};\n\nexport type InternalDialogSlots = {\n surfaceMotion: NonNullable<Slot<PresenceMotionSlotProps>>;\n};\n\nexport type DialogOpenChangeEvent = DialogOpenChangeData['event'];\n\nexport type DialogOpenChangeData =\n | {\n type: 'escapeKeyDown';\n open: boolean;\n event: React.KeyboardEvent<DialogSurfaceElement>;\n }\n | {\n type: 'backdropClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n }\n | {\n type: 'triggerClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n };\n\nexport type DialogModalType = 'modal' | 'non-modal' | 'alert';\n\n/**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information,\n * such as open value and type of interaction that created the event\n */\nexport type DialogOpenChangeEventHandler = (event: DialogOpenChangeEvent, data: DialogOpenChangeData) => void;\n\nexport type DialogContextValues = {\n dialog: DialogContextValue;\n /**\n * dialogSurface context is provided by Dialog as false\n * to ensure components inside Dialog but outside DialogSurface will consume this as false\n */\n dialogSurface: DialogSurfaceContextValue;\n};\n\nexport type DialogProps = ComponentProps<Partial<DialogSlots>> & {\n /**\n * Dialog variations.\n *\n * `modal`: When this type of dialog is open, the rest of the page is dimmed out and cannot be interacted with.\n * The tab sequence is kept within the dialog and moving the focus outside\n * the dialog will imply closing it. This is the default type of the component.\n *\n * `non-modal`: When a non-modal dialog is open, the rest of the page is not dimmed out\n * and users can interact with the rest of the page.\n * This also implies that the tab focus can move outside the dialog when it reaches the last focusable element.\n *\n * `alert`: is a special type of modal dialogs that interrupts the user's workflow\n * to communicate an important message or ask for a decision.\n * Unlike a typical modal dialog, the user must take an action through the options given to dismiss the dialog,\n * and it cannot be dismissed through the dimmed background.\n *\n * @default modal\n */\n modalType?: DialogModalType;\n /**\n * Controls the open state of the dialog\n * @default false\n */\n open?: boolean;\n /**\n * Default value for the uncontrolled open state of the dialog.\n * @default false\n */\n defaultOpen?: boolean;\n /**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information,\n * such as open value and type of interaction that created the event\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onOpenChange?: DialogOpenChangeEventHandler;\n /**\n * Can contain two children including `DialogTrigger` and `DialogSurface`.\n * Alternatively can only contain `DialogSurface` if using trigger outside dialog, or controlling state.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n /**\n * Enables standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert.\n *\n * @default false\n */\n inertTrapFocus?: boolean;\n};\n\nexport type DialogState = ComponentState<InternalDialogSlots> &\n DialogContextValue & {\n content: React.ReactNode;\n trigger: React.ReactNode;\n };\n"],"names":[],"rangeMappings":"","mappings":""}
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
Dialog: function() {
return _Dialog.Dialog;
},
renderDialog_unstable: function() {
return _renderDialog.renderDialog_unstable;
},
useDialogContextValues_unstable: function() {
return _useDialogContextValues.useDialogContextValues_unstable;
},
useDialog_unstable: function() {
return _useDialog.useDialog_unstable;
}
});
const _Dialog = require("./Dialog");
const _renderDialog = require("./renderDialog");
const _useDialog = require("./useDialog");
const _useDialogContextValues = require("./useDialogContextValues");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Dialog/index.ts"],"sourcesContent":["export { Dialog } from './Dialog';\nexport type {\n DialogContextValues,\n DialogModalType,\n DialogOpenChangeData,\n DialogOpenChangeEvent,\n DialogOpenChangeEventHandler,\n DialogProps,\n DialogSlots,\n DialogState,\n InternalDialogSlots,\n} from './Dialog.types';\nexport { renderDialog_unstable } from './renderDialog';\nexport { useDialog_unstable } from './useDialog';\nexport { useDialogContextValues_unstable } from './useDialogContextValues';\n"],"names":["Dialog","renderDialog_unstable","useDialogContextValues_unstable","useDialog_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,MAAM;eAANA,cAAM;;IAYNC,qBAAqB;eAArBA,mCAAqB;;IAErBC,+BAA+B;eAA/BA,uDAA+B;;IAD/BC,kBAAkB;eAAlBA,6BAAkB;;;wBAbJ;8BAYe;2BACH;wCACa"}
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDialog_unstable", {
enumerable: true,
get: function() {
return renderDialog_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _MotionRefForwarder = require("../MotionRefForwarder");
const _contexts = require("../../contexts");
const renderDialog_unstable = (state, contextValues)=>{
(0, _reactutilities.assertSlots)(state);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_contexts.DialogProvider, {
value: contextValues.dialog,
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_contexts.DialogSurfaceProvider, {
value: contextValues.dialogSurface,
children: [
state.trigger,
state.content && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.surfaceMotion, {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_MotionRefForwarder.MotionRefForwarder, {
children: state.content
})
})
]
})
});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Dialog/renderDialog.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport { MotionRefForwarder } from '../MotionRefForwarder';\nimport { DialogProvider, DialogSurfaceProvider } from '../../contexts';\nimport type { DialogState, DialogContextValues, InternalDialogSlots } from './Dialog.types';\n\n/**\n * Render the final JSX of Dialog\n */\nexport const renderDialog_unstable = (state: DialogState, contextValues: DialogContextValues) => {\n assertSlots<InternalDialogSlots>(state);\n\n return (\n <DialogProvider value={contextValues.dialog}>\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n {state.trigger}\n {state.content && (\n <state.surfaceMotion>\n <MotionRefForwarder>\n {/* Casting here as content should be equivalent to <DialogSurface/> */}\n {/* FIXME: content should not be ReactNode it should be ReactElement instead. */}\n {state.content as React.ReactElement}\n </MotionRefForwarder>\n </state.surfaceMotion>\n )}\n </DialogSurfaceProvider>\n </DialogProvider>\n );\n};\n"],"names":["renderDialog_unstable","state","contextValues","assertSlots","_jsx","DialogProvider","value","dialog","_jsxs","DialogSurfaceProvider","dialogSurface","trigger","content","surfaceMotion","MotionRefForwarder"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;4BAZb;gCAE4B;iEACL;oCAEY;0BACmB;AAM/C,MAAMA,wBAAwB,CAACC,OAAoBC;IACxDC,IAAAA,2BAAAA,EAAiCF;IAEjC,OAAA,WAAA,GACEG,IAAAA,eAAA,EAACC,wBAAAA,EAAAA;QAAeC,OAAOJ,cAAcK,MAAM;kBACzC,WAAA,GAAAC,IAAAA,gBAAA,EAACC,+BAAAA,EAAAA;YAAsBH,OAAOJ,cAAcQ,aAAa;;gBACtDT,MAAMU,OAAO;gBACbV,MAAMW,OAAO,IAAA,WAAA,GACZR,IAAAA,eAAA,EAACH,MAAMY,aAAa,EAAA;8BAClB,WAAA,GAAAT,IAAAA,eAAA,EAACU,sCAAAA,EAAAA;kCAGEb,MAAMW,OAAO;;;;;;AAO5B"}
@@ -0,0 +1,100 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDialog_unstable", {
enumerable: true,
get: function() {
return useDialog_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _reactcontextselector = require("@fluentui/react-context-selector");
const _reacttabster = require("@fluentui/react-tabster");
const _reactmotion = require("@fluentui/react-motion");
const _reactutilities = require("@fluentui/react-utilities");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _utils = require("../../utils");
const _contexts = require("../../contexts");
const _DialogSurfaceMotion = require("../DialogSurfaceMotion");
const useDialog_unstable = (props)=>{
const { children, modalType = 'modal', onOpenChange, inertTrapFocus = false } = props;
const [trigger, content] = childrenToTriggerAndContent(children);
const [open, setOpen] = (0, _reactutilities.useControllableState)({
state: props.open,
defaultState: props.defaultOpen,
initialState: false
});
const requestOpenChange = (0, _reactutilities.useEventCallback)((data)=>{
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(data.event, data);
// if user prevents default then do not change state value
// otherwise updates state value and trigger reference to the element that caused the opening
if (!data.event.isDefaultPrevented()) {
setOpen(data.open);
}
});
const focusRef = (0, _utils.useFocusFirstElement)(open, modalType);
const { modalAttributes, triggerAttributes } = (0, _reacttabster.useModalAttributes)({
trapFocus: modalType !== 'non-modal',
legacyTrapFocus: !inertTrapFocus
});
const isNestedDialog = (0, _reactcontextselector.useHasParentContext)(_contexts.DialogContext);
return {
components: {
// TODO: remove once React v18 slot API is modified
// This is a problem at the moment due to UnknownSlotProps assumption
// that `children` property is `ReactNode`, which in this case is not valid
// as PresenceComponentProps['children'] is `ReactElement`
surfaceMotion: _DialogSurfaceMotion.DialogSurfaceMotion
},
inertTrapFocus,
open,
modalType,
content,
trigger,
requestOpenChange,
dialogTitleId: (0, _reactutilities.useId)('dialog-title-'),
isNestedDialog,
dialogRef: focusRef,
modalAttributes,
triggerAttributes,
surfaceMotion: (0, _reactmotion.presenceMotionSlot)(props.surfaceMotion, {
elementType: _DialogSurfaceMotion.DialogSurfaceMotion,
defaultProps: {
appear: true,
visible: open,
unmountOnExit: true
}
})
};
};
/**
* Extracts trigger and content from children
*/ function childrenToTriggerAndContent(children) {
const childrenArray = _react.Children.toArray(children);
if (process.env.NODE_ENV !== 'production') {
if (childrenArray.length !== 1 && childrenArray.length !== 2) {
// eslint-disable-next-line no-console
console.warn(`@fluentui/react-dialog [useDialog]:
Dialog must contain at least one child <DialogSurface/>,
and at most two children <DialogTrigger/> <DialogSurface/> (in this order).`);
}
}
switch(childrenArray.length){
// case where there's a trigger followed by content
case 2:
return childrenArray;
// case where there's only content
case 1:
return [
undefined,
childrenArray[0]
];
// unknown case
default:
return [
undefined,
undefined
];
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDialogContextValues_unstable", {
enumerable: true,
get: function() {
return useDialogContextValues_unstable;
}
});
function useDialogContextValues_unstable(state) {
const { modalType, open, dialogRef, dialogTitleId, isNestedDialog, inertTrapFocus, requestOpenChange, modalAttributes, triggerAttributes } = state;
/**
* This context is created with "@fluentui/react-context-selector",
* there is no sense to memoize it
*/ const dialog = {
open,
modalType,
dialogRef,
dialogTitleId,
isNestedDialog,
inertTrapFocus,
modalAttributes,
triggerAttributes,
requestOpenChange
};
const dialogSurface = false;
return {
dialog,
dialogSurface
};
}
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Dialog/useDialogContextValues.ts"],"sourcesContent":["import type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogContextValues, DialogState } from './Dialog.types';\n\nexport function useDialogContextValues_unstable(state: DialogState): DialogContextValues {\n const {\n modalType,\n open,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n requestOpenChange,\n modalAttributes,\n triggerAttributes,\n } = state;\n\n /**\n * This context is created with \"@fluentui/react-context-selector\",\n * there is no sense to memoize it\n */\n const dialog: DialogContextValue = {\n open,\n modalType,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n modalAttributes,\n triggerAttributes,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"],"names":["useDialogContextValues_unstable","state","modalType","open","dialogRef","dialogTitleId","isNestedDialog","inertTrapFocus","requestOpenChange","modalAttributes","triggerAttributes","dialog","dialogSurface"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGgBA;;;eAAAA;;;AAAT,SAASA,gCAAgCC,KAAkB;IAChE,MAAM,EACJC,SAAS,EACTC,IAAI,EACJC,SAAS,EACTC,aAAa,EACbC,cAAc,EACdC,cAAc,EACdC,iBAAiB,EACjBC,eAAe,EACfC,iBAAiB,EAClB,GAAGT;IAEJ;;;GAGC,GACD,MAAMU,SAA6B;QACjCR;QACAD;QACAE;QACAC;QACAC;QACAC;QACAE;QACAC;QACAF;IACF;IAEA,MAAMI,gBAA2C;IAEjD,OAAO;QAAED;QAAQC;IAAc;AACjC"}
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DialogActions", {
enumerable: true,
get: function() {
return DialogActions;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDialogActions = require("./useDialogActions");
const _renderDialogActions = require("./renderDialogActions");
const _useDialogActionsStylesstyles = require("./useDialogActionsStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DialogActions = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDialogActions.useDialogActions_unstable)(props, ref);
(0, _useDialogActionsStylesstyles.useDialogActionsStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDialogActionsStyles_unstable')(state);
return (0, _renderDialogActions.renderDialogActions_unstable)(state);
});
DialogActions.displayName = 'DialogActions';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogActions/DialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogActions_unstable } from './useDialogActions';\nimport { renderDialogActions_unstable } from './renderDialogActions';\nimport { useDialogActionsStyles_unstable } from './useDialogActionsStyles.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":["DialogActions","React","forwardRef","props","ref","state","useDialogActions_unstable","useDialogActionsStyles_unstable","useCustomStyleHook_unstable","renderDialogActions_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;kCACmB;qCACG;8CACG;qCAGJ;AAMrC,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAEhCG,IAAAA,gDAAAA,EAA4B,mCAAmCH;IAE/D,OAAOI,IAAAA,iDAAAA,EAA6BJ;AACtC;AAEAL,cAAcU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering DialogActions
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogActions/DialogActions.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogActionsSlots = {\n root: Slot<'div'>;\n};\n\nexport type DialogActionsPosition = 'start' | 'end';\n\n/**\n * DialogActions Props\n */\nexport type DialogActionsProps = ComponentProps<DialogActionsSlots> & {\n /**\n * defines the position on the dialog grid of the actions\n * @default 'end'\n */\n position?: DialogActionsPosition;\n\n /**\n * 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":[],"rangeMappings":";;","mappings":"AAyBA;;CAEC"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogActions: function() {
return _DialogActions.DialogActions;
},
dialogActionsClassNames: function() {
return _useDialogActionsStylesstyles.dialogActionsClassNames;
},
renderDialogActions_unstable: function() {
return _renderDialogActions.renderDialogActions_unstable;
},
useDialogActionsStyles_unstable: function() {
return _useDialogActionsStylesstyles.useDialogActionsStyles_unstable;
},
useDialogActions_unstable: function() {
return _useDialogActions.useDialogActions_unstable;
}
});
const _DialogActions = require("./DialogActions");
const _renderDialogActions = require("./renderDialogActions");
const _useDialogActions = require("./useDialogActions");
const _useDialogActionsStylesstyles = require("./useDialogActionsStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogActions/index.ts"],"sourcesContent":["export { DialogActions } from './DialogActions';\nexport type {\n DialogActionsPosition,\n DialogActionsProps,\n DialogActionsSlots,\n DialogActionsState,\n} from './DialogActions.types';\nexport { renderDialogActions_unstable } from './renderDialogActions';\nexport { useDialogActions_unstable } from './useDialogActions';\nexport { dialogActionsClassNames, useDialogActionsStyles_unstable } from './useDialogActionsStyles.styles';\n"],"names":["DialogActions","dialogActionsClassNames","renderDialogActions_unstable","useDialogActionsStyles_unstable","useDialogActions_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IASbC,uBAAuB;eAAvBA,qDAAuB;;IAFvBC,4BAA4B;eAA5BA,iDAA4B;;IAEHC,+BAA+B;eAA/BA,6DAA+B;;IADxDC,yBAAyB;eAAzBA,2CAAyB;;;+BARJ;qCAOe;kCACH;8CAC+B"}
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDialogActions_unstable", {
enumerable: true,
get: function() {
return renderDialogActions_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const renderDialogActions_unstable = (state)=>{
(0, _reactutilities.assertSlots)(state);
// TODO Add additional slots in the appropriate place
return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogActions/renderDialogActions.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } 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 assertSlots<DialogActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <state.root />;\n};\n"],"names":["renderDialogActions_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,2BAAAA,EAAgCD;IAEhC,qDAAqD;IACrD,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDialogActions_unstable", {
enumerable: true,
get: function() {
return useDialogActions_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
const useDialogActions_unstable = (props, ref)=>{
const { position = 'end', fluid = false } = props;
return {
components: {
root: 'div'
},
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
// FIXME:
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
ref: ref,
...props
}), {
elementType: 'div'
}),
position,
fluid
};
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogActions/useDialogActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } 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: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n position,\n fluid,\n };\n};\n"],"names":["useDialogActions_unstable","props","ref","position","fluid","components","root","slot","always","getIntrinsicElementProps","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;gCACwB;AAYxC,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EAAEC,WAAW,KAAK,EAAEC,QAAQ,KAAK,EAAE,GAAGH;IAC5C,OAAO;QACLI,YAAY;YACVC,MAAM;QACR;QACAA,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FP,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAES,aAAa;QAAM;QAEvBP;QACAC;IACF;AACF"}
@@ -0,0 +1,104 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dialogActionsClassNames: function() {
return dialogActionsClassNames;
},
useDialogActionsStyles_unstable: function() {
return useDialogActionsStyles_unstable;
}
});
const _react = require("@griffel/react");
const dialogActionsClassNames = {
root: 'fui-DialogActions'
};
/**
* Styles for the root slot
*/ const useResetStyles = /*#__PURE__*/ (0, _react.__resetStyles)("rhfpeu0", null, {
r: [
".rhfpeu0{gap:8px;height:fit-content;box-sizing:border-box;display:flex;grid-row-start:3;grid-row-end:3;}"
],
s: [
"@media screen and (max-width: 480px){.rhfpeu0{flex-direction:column;justify-self:stretch;}}"
]
});
const useStyles = /*#__PURE__*/ (0, _react.__styles)({
gridPositionEnd: {
Bdqf98w: "f1a7i8kp",
Br312pm: "fd46tj4",
Bw0ie65: "fsyjsko",
B6n781s: "f1f41i0t",
Bv5d0be: "f1jaqex3",
v4ugfu: "f2ao6jk"
},
gridPositionStart: {
Bdqf98w: "fsxvdwy",
Br312pm: "fwpfdsa",
Bw0ie65: "f1e2fz10",
Bojbm9c: "f11ihkml",
Bv5d0be: "fce5bvx",
v4ugfu: "f2ao6jk"
},
fluidStart: {
Bw0ie65: "fsyjsko"
},
fluidEnd: {
Br312pm: "fwpfdsa"
}
}, {
d: [
".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;}"
],
m: [
[
"@media screen and (max-width: 480px){.f1f41i0t{grid-column-start:1;}}",
{
m: "screen and (max-width: 480px)"
}
],
[
"@media screen and (max-width: 480px){.f1jaqex3{grid-row-start:4;}}",
{
m: "screen and (max-width: 480px)"
}
],
[
"@media screen and (max-width: 480px){.f2ao6jk{grid-row-end:auto;}}",
{
m: "screen and (max-width: 480px)"
}
],
[
"@media screen and (max-width: 480px){.f11ihkml{grid-column-end:4;}}",
{
m: "screen and (max-width: 480px)"
}
],
[
"@media screen and (max-width: 480px){.fce5bvx{grid-row-start:3;}}",
{
m: "screen and (max-width: 480px)"
}
]
]
});
const useDialogActionsStyles_unstable = (state)=>{
'use no memo';
const resetStyles = useResetStyles();
const styles = useStyles();
state.root.className = (0, _react.mergeClasses)(dialogActionsClassNames.root, resetStyles, 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);
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDialogActionsStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { DIALOG_GAP, MEDIA_QUERY_BREAKPOINT_SELECTOR } from '../../contexts/constants';\nexport const dialogActionsClassNames = {\n root: 'fui-DialogActions'\n};\n/**\n * Styles for the root slot\n */ const useResetStyles = makeResetStyles({\n gap: DIALOG_GAP,\n height: 'fit-content',\n boxSizing: 'border-box',\n display: 'flex',\n gridRowStart: 3,\n gridRowEnd: 3,\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n flexDirection: 'column',\n justifySelf: 'stretch'\n }\n});\nconst useStyles = makeStyles({\n gridPositionEnd: {\n justifySelf: 'end',\n gridColumnStart: 2,\n gridColumnEnd: 4,\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n gridColumnStart: 1,\n gridRowStart: 4,\n gridRowEnd: 'auto'\n }\n },\n gridPositionStart: {\n justifySelf: 'start',\n gridColumnStart: 1,\n gridColumnEnd: 2,\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n gridColumnEnd: 4,\n gridRowStart: 3,\n gridRowEnd: 'auto'\n }\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 'use no memo';\n const resetStyles = useResetStyles();\n const styles = useStyles();\n state.root.className = mergeClasses(dialogActionsClassNames.root, resetStyles, 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"],"names":["dialogActionsClassNames","useDialogActionsStyles_unstable","root","useResetStyles","__resetStyles","r","s","useStyles","__styles","gridPositionEnd","Bdqf98w","Br312pm","Bw0ie65","B6n781s","Bv5d0be","v4ugfu","gridPositionStart","Bojbm9c","fluidStart","fluidEnd","d","m","state","resetStyles","styles","className","mergeClasses","position","fluid"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,uBAAuB;eAAvBA;;IA+CIC,+BAA+B;eAA/BA;;;uBAjDyC;AAEnD,MAAMD,0BAA0B;IACnCE,MAAM;AACV;AACA;;CAEA,GAAI,MAAMC,iBAAc,WAAA,GAAGC,IAAAA,oBAAA,EAAA,WAAA,MAAA;IAAAC,GAAA;QAAA;KAAA;IAAAC,GAAA;QAAA;KAAA;AAAA;AAY3B,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,iBAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;IAAA;IAAAC,mBAAA;QAAAN,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAK,SAAA;QAAAH,SAAA;QAAAC,QAAA;IAAA;IAAAG,YAAA;QAAAN,SAAA;IAAA;IAAAO,UAAA;QAAAR,SAAA;IAAA;AAAA,GAAA;IAAAS,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,GAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;KAAA;AAAA;AA8BP,MAAMpB,kCAAmCqB,CAAAA;IAChD;IACA,MAAMC,cAAcpB;IACpB,MAAMqB,SAASjB;IACfe,MAAMpB,IAAI,CAACuB,SAAS,GAAGC,IAAAA,mBAAY,EAAC1B,wBAAwBE,IAAI,EAAEqB,aAAaD,MAAMK,QAAQ,KAAK,WAAWH,OAAOR,iBAAiB,EAAEM,MAAMK,QAAQ,KAAK,SAASH,OAAOf,eAAe,EAAEa,MAAMM,KAAK,IAAIN,MAAMK,QAAQ,KAAK,WAAWH,OAAON,UAAU,EAAEI,MAAMM,KAAK,IAAIN,MAAMK,QAAQ,KAAK,SAASH,OAAOL,QAAQ,EAAEG,MAAMpB,IAAI,CAACuB,SAAS;IAC3U,OAAOH;AACX"}
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DialogBackdropMotion", {
enumerable: true,
get: function() {
return DialogBackdropMotion;
}
});
const _reactmotioncomponentspreview = require("@fluentui/react-motion-components-preview");
const DialogBackdropMotion = _reactmotioncomponentspreview.FadeRelaxed;
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogBackdropMotion.ts"],"sourcesContent":["import { FadeRelaxed } from '@fluentui/react-motion-components-preview';\n\nexport const DialogBackdropMotion = FadeRelaxed;\n"],"names":["DialogBackdropMotion","FadeRelaxed"],"rangeMappings":";;;;;;;;;;;","mappings":";;;;+BAEaA;;;eAAAA;;;8CAFe;AAErB,MAAMA,uBAAuBC,yCAAAA"}
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DialogBody", {
enumerable: true,
get: function() {
return DialogBody;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDialogBody = require("./useDialogBody");
const _renderDialogBody = require("./renderDialogBody");
const _useDialogBodyStylesstyles = require("./useDialogBodyStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DialogBody = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDialogBody.useDialogBody_unstable)(props, ref);
(0, _useDialogBodyStylesstyles.useDialogBodyStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDialogBodyStyles_unstable')(state);
return (0, _renderDialogBody.renderDialogBody_unstable)(state);
});
DialogBody.displayName = 'DialogBody';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogBody/DialogBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogBody_unstable } from './useDialogBody';\nimport { renderDialogBody_unstable } from './renderDialogBody';\nimport { useDialogBodyStyles_unstable } from './useDialogBodyStyles.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":["DialogBody","React","forwardRef","props","ref","state","useDialogBody_unstable","useDialogBodyStyles_unstable","useCustomStyleHook_unstable","renderDialogBody_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;+BACgB;kCACG;2CACG;qCAGD;AAMrC,MAAMA,aAAAA,WAAAA,GAAmDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQC,IAAAA,qCAAAA,EAAuBH,OAAOC;IAE5CG,IAAAA,uDAAAA,EAA6BF;IAE7BG,IAAAA,gDAAAA,EAA4B,gCAAgCH;IAE5D,OAAOI,IAAAA,2CAAAA,EAA0BJ;AACnC;AAEAL,WAAWU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering DialogBody
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogBody/DialogBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogBodySlots = {\n root: Slot<'div'>;\n};\n\n/**\n * DialogBody Props\n */\nexport type DialogBodyProps = ComponentProps<DialogBodySlots> & {};\n\n/**\n * State used in rendering DialogBody\n */\nexport type DialogBodyState = ComponentState<DialogBodySlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAWA;;CAEC"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogBody: function() {
return _DialogBody.DialogBody;
},
dialogBodyClassNames: function() {
return _useDialogBodyStylesstyles.dialogBodyClassNames;
},
renderDialogBody_unstable: function() {
return _renderDialogBody.renderDialogBody_unstable;
},
useDialogBodyStyles_unstable: function() {
return _useDialogBodyStylesstyles.useDialogBodyStyles_unstable;
},
useDialogBody_unstable: function() {
return _useDialogBody.useDialogBody_unstable;
}
});
const _DialogBody = require("./DialogBody");
const _renderDialogBody = require("./renderDialogBody");
const _useDialogBody = require("./useDialogBody");
const _useDialogBodyStylesstyles = require("./useDialogBodyStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogBody/index.ts"],"sourcesContent":["export { DialogBody } from './DialogBody';\nexport type { DialogBodyProps, DialogBodySlots, DialogBodyState } from './DialogBody.types';\nexport { renderDialogBody_unstable } from './renderDialogBody';\nexport { useDialogBody_unstable } from './useDialogBody';\nexport { dialogBodyClassNames, useDialogBodyStyles_unstable } from './useDialogBodyStyles.styles';\n"],"names":["DialogBody","dialogBodyClassNames","renderDialogBody_unstable","useDialogBodyStyles_unstable","useDialogBody_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,UAAU;eAAVA,sBAAU;;IAIVC,oBAAoB;eAApBA,+CAAoB;;IAFpBC,yBAAyB;eAAzBA,2CAAyB;;IAEHC,4BAA4B;eAA5BA,uDAA4B;;IADlDC,sBAAsB;eAAtBA,qCAAsB;;;4BAHJ;kCAEe;+BACH;2CAC4B"}
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDialogBody_unstable", {
enumerable: true,
get: function() {
return renderDialogBody_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const renderDialogBody_unstable = (state)=>{
(0, _reactutilities.assertSlots)(state);
// TODO Add additional slots in the appropriate place
return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogBody/renderDialogBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } 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 assertSlots<DialogBodySlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <state.root />;\n};\n"],"names":["renderDialogBody_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,4BAA4B,CAACC;IACxCC,IAAAA,2BAAAA,EAA6BD;IAE7B,qDAAqD;IACrD,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDialogBody_unstable", {
enumerable: true,
get: function() {
return useDialogBody_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
const useDialogBody_unstable = (props, ref)=>{
var _props_as;
return {
components: {
root: 'div'
},
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'div', {
// FIXME:
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
ref: ref,
...props
}), {
elementType: 'div'
})
};
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogBody/useDialogBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } 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: slot.always(\n getIntrinsicElementProps(props.as ?? 'div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["useDialogBody_unstable","props","ref","components","root","slot","always","getIntrinsicElementProps","as","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;gCACwB;AAYxC,MAAMA,yBAAyB,CAACC,OAAwBC;QAMhCD;IAL7B,OAAO;QACLE,YAAY;YACVC,MAAM;QACR;QACAA,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyBN,CAAAA,YAAAA,MAAMO,EAAE,AAAFA,MAAE,QAARP,cAAAA,KAAAA,IAAAA,YAAY,OAAO;YAC1C,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FC,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEQ,aAAa;QAAM;IAEzB;AACF"}
@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dialogBodyClassNames: function() {
return dialogBodyClassNames;
},
useDialogBodyStyles_unstable: function() {
return useDialogBodyStyles_unstable;
}
});
const _react = require("@griffel/react");
const dialogBodyClassNames = {
root: 'fui-DialogBody'
};
/**
* Styles for the root slot
*/ const useResetStyles = /*#__PURE__*/ (0, _react.__resetStyles)("r1h3qql9", null, {
r: [
".r1h3qql9{overflow:unset;gap:8px;display:grid;max-height:calc(100vh - 2 * 24px);box-sizing:border-box;grid-template-rows:auto 1fr;grid-template-columns:1fr 1fr auto;}"
],
s: [
"@media screen and (max-width: 480px){.r1h3qql9{max-width:100vw;grid-template-rows:auto 1fr auto;}}",
"@media screen and (max-height: 359px){.r1h3qql9{max-height:unset;}}"
]
});
const useDialogBodyStyles_unstable = (state)=>{
'use no memo';
const resetStyles = useResetStyles();
state.root.className = (0, _react.mergeClasses)(dialogBodyClassNames.root, resetStyles, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDialogBodyStyles.styles.js"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { DIALOG_GAP, MEDIA_QUERY_BREAKPOINT_SELECTOR, MEDIA_QUERY_SHORT_SCREEN, SURFACE_PADDING } from '../../contexts';\nexport const dialogBodyClassNames = {\n root: 'fui-DialogBody'\n};\n/**\n * Styles for the root slot\n */ const useResetStyles = makeResetStyles({\n overflow: 'unset',\n gap: DIALOG_GAP,\n display: 'grid',\n maxHeight: `calc(100vh - 2 * ${SURFACE_PADDING})`,\n boxSizing: 'border-box',\n gridTemplateRows: 'auto 1fr',\n gridTemplateColumns: '1fr 1fr auto',\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n gridTemplateRows: 'auto 1fr auto'\n },\n [MEDIA_QUERY_SHORT_SCREEN]: {\n maxHeight: 'unset'\n }\n});\n/**\n * Apply styling to the DialogBody slots based on the state\n */ export const useDialogBodyStyles_unstable = (state)=>{\n 'use no memo';\n const resetStyles = useResetStyles();\n state.root.className = mergeClasses(dialogBodyClassNames.root, resetStyles, state.root.className);\n return state;\n};\n"],"names":["dialogBodyClassNames","useDialogBodyStyles_unstable","root","useResetStyles","__resetStyles","r","s","state","resetStyles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,oBAAoB;eAApBA;;IAuBIC,4BAA4B;eAA5BA;;;uBAzB6B;AAEvC,MAAMD,uBAAuB;IAChCE,MAAM;AACV;AACA;;CAEA,GAAI,MAAMC,iBAAc,WAAA,GAAGC,IAAAA,oBAAA,EAAA,YAAA,MAAA;IAAAC,GAAA;QAAA;KAAA;IAAAC,GAAA;QAAA;QAAA;KAAA;AAAA;AAkBhB,MAAML,+BAAgCM,CAAAA;IAC7C;IACA,MAAMC,cAAcL;IACpBI,MAAML,IAAI,CAACO,SAAS,GAAGC,IAAAA,mBAAY,EAACV,qBAAqBE,IAAI,EAAEM,aAAaD,MAAML,IAAI,CAACO,SAAS;IAChG,OAAOF;AACX"}
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DialogContent", {
enumerable: true,
get: function() {
return DialogContent;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDialogContent = require("./useDialogContent");
const _renderDialogContent = require("./renderDialogContent");
const _useDialogContentStylesstyles = require("./useDialogContentStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DialogContent = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDialogContent.useDialogContent_unstable)(props, ref);
(0, _useDialogContentStylesstyles.useDialogContentStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDialogContentStyles_unstable')(state);
return (0, _renderDialogContent.renderDialogContent_unstable)(state);
});
DialogContent.displayName = 'DialogContent';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogContent/DialogContent.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogContent_unstable } from './useDialogContent';\nimport { renderDialogContent_unstable } from './renderDialogContent';\nimport { useDialogContentStyles_unstable } from './useDialogContentStyles.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":["DialogContent","React","forwardRef","props","ref","state","useDialogContent_unstable","useDialogContentStyles_unstable","useCustomStyleHook_unstable","renderDialogContent_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;kCACmB;qCACG;8CACG;qCAGJ;AAMrC,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAEhCG,IAAAA,gDAAAA,EAA4B,mCAAmCH;IAE/D,OAAOI,IAAAA,iDAAAA,EAA6BJ;AACtC;AAEAL,cAAcU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering DialogContent
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogContent/DialogContent.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogContentSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * DialogContent Props\n */\nexport type DialogContentProps = ComponentProps<DialogContentSlots>;\n\n/**\n * State used in rendering DialogContent\n */\nexport type DialogContentState = ComponentState<DialogContentSlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAWA;;CAEC"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogContent: function() {
return _DialogContent.DialogContent;
},
dialogContentClassNames: function() {
return _useDialogContentStylesstyles.dialogContentClassNames;
},
renderDialogContent_unstable: function() {
return _renderDialogContent.renderDialogContent_unstable;
},
useDialogContentStyles_unstable: function() {
return _useDialogContentStylesstyles.useDialogContentStyles_unstable;
},
useDialogContent_unstable: function() {
return _useDialogContent.useDialogContent_unstable;
}
});
const _DialogContent = require("./DialogContent");
const _renderDialogContent = require("./renderDialogContent");
const _useDialogContent = require("./useDialogContent");
const _useDialogContentStylesstyles = require("./useDialogContentStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogContent/index.ts"],"sourcesContent":["export { DialogContent } from './DialogContent';\nexport type { DialogContentProps, DialogContentSlots, DialogContentState } from './DialogContent.types';\nexport { renderDialogContent_unstable } from './renderDialogContent';\nexport { useDialogContent_unstable } from './useDialogContent';\nexport { dialogContentClassNames, useDialogContentStyles_unstable } from './useDialogContentStyles.styles';\n"],"names":["DialogContent","dialogContentClassNames","renderDialogContent_unstable","useDialogContentStyles_unstable","useDialogContent_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAIbC,uBAAuB;eAAvBA,qDAAuB;;IAFvBC,4BAA4B;eAA5BA,iDAA4B;;IAEHC,+BAA+B;eAA/BA,6DAA+B;;IADxDC,yBAAyB;eAAzBA,2CAAyB;;;+BAHJ;qCAEe;kCACH;8CAC+B"}
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDialogContent_unstable", {
enumerable: true,
get: function() {
return renderDialogContent_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const renderDialogContent_unstable = (state)=>{
(0, _reactutilities.assertSlots)(state);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogContent/renderDialogContent.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } 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 assertSlots<DialogContentSlots>(state);\n\n return <state.root />;\n};\n"],"names":["renderDialogContent_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,2BAAAA,EAAgCD;IAEhC,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDialogContent_unstable", {
enumerable: true,
get: function() {
return useDialogContent_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
const useDialogContent_unstable = (props, ref)=>{
var _props_as;
return {
components: {
root: 'div'
},
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'div', {
// FIXME:
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
ref: ref,
...props
}), {
elementType: 'div'
})
};
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogContent/useDialogContent.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } 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: slot.always(\n getIntrinsicElementProps(props.as ?? 'div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["useDialogContent_unstable","props","ref","components","root","slot","always","getIntrinsicElementProps","as","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;gCACwB;AAYxC,MAAMA,4BAA4B,CACvCC,OACAC;QAO6BD;IAL7B,OAAO;QACLE,YAAY;YACVC,MAAM;QACR;QACAA,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyBN,CAAAA,YAAAA,MAAMO,EAAE,AAAFA,MAAE,QAARP,cAAAA,KAAAA,IAAAA,YAAY,OAAO;YAC1C,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FC,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEQ,aAAa;QAAM;IAEzB;AACF"}
@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dialogContentClassNames: function() {
return dialogContentClassNames;
},
useDialogContentStyles_unstable: function() {
return useDialogContentStyles_unstable;
}
});
const _react = require("@griffel/react");
const dialogContentClassNames = {
root: 'fui-DialogContent'
};
/**
* Styles for the root slot
*/ const useStyles = /*#__PURE__*/ (0, _react.__resetStyles)("r1v5zwsm", null, {
r: [
".r1v5zwsm{padding:var(--strokeWidthThick);margin:calc(var(--strokeWidthThick) * -1);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);overflow-y:auto;min-height:32px;box-sizing:border-box;grid-row-start:2;grid-row-end:2;grid-column-start:1;grid-column-end:4;}"
],
s: [
"@media screen and (max-height: 359px){.r1v5zwsm{overflow-y:unset;}}"
]
});
const useDialogContentStyles_unstable = (state)=>{
'use no memo';
const styles = useStyles();
state.root.className = (0, _react.mergeClasses)(dialogContentClassNames.root, styles, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDialogContentStyles.styles.js"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { MEDIA_QUERY_SHORT_SCREEN } from '../../contexts';\nexport const dialogContentClassNames = {\n root: 'fui-DialogContent'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeResetStyles({\n padding: tokens.strokeWidthThick,\n margin: `calc(${tokens.strokeWidthThick} * -1)`,\n ...typographyStyles.body1,\n overflowY: 'auto',\n minHeight: '32px',\n boxSizing: 'border-box',\n gridRowStart: 2,\n gridRowEnd: 2,\n gridColumnStart: 1,\n gridColumnEnd: 4,\n [MEDIA_QUERY_SHORT_SCREEN]: {\n overflowY: 'unset'\n }\n});\n/**\n * Apply styling to the DialogContent slots based on the state\n */ export const useDialogContentStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(dialogContentClassNames.root, styles, state.root.className);\n return state;\n};\n"],"names":["dialogContentClassNames","useDialogContentStyles_unstable","root","useStyles","__resetStyles","r","s","state","styles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGaA,uBAAuB;eAAvBA;;IAsBIC,+BAA+B;eAA/BA;;;uBAzB6B;AAGvC,MAAMD,0BAA0B;IACnCE,MAAM;AACV;AACA;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,oBAAA,EAAA,YAAA,MAAA;IAAAC,GAAA;QAAA;KAAA;IAAAC,GAAA;QAAA;KAAA;AAAA;AAiBX,MAAML,kCAAmCM,CAAAA;IAChD;IACA,MAAMC,SAASL;IACfI,MAAML,IAAI,CAACO,SAAS,GAAGC,IAAAA,mBAAY,EAACV,wBAAwBE,IAAI,EAAEM,QAAQD,MAAML,IAAI,CAACO,SAAS;IAC9F,OAAOF;AACX"}
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DialogSurface", {
enumerable: true,
get: function() {
return DialogSurface;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDialogSurface = require("./useDialogSurface");
const _renderDialogSurface = require("./renderDialogSurface");
const _useDialogSurfaceStylesstyles = require("./useDialogSurfaceStyles.styles");
const _useDialogSurfaceContextValues = require("./useDialogSurfaceContextValues");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DialogSurface = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDialogSurface.useDialogSurface_unstable)(props, ref);
const contextValues = (0, _useDialogSurfaceContextValues.useDialogSurfaceContextValues_unstable)(state);
(0, _useDialogSurfaceStylesstyles.useDialogSurfaceStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDialogSurfaceStyles_unstable')(state);
return (0, _renderDialogSurface.renderDialogSurface_unstable)(state, contextValues);
});
DialogSurface.displayName = 'DialogSurface';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogSurface/DialogSurface.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles.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":["DialogSurface","React","forwardRef","props","ref","state","useDialogSurface_unstable","contextValues","useDialogSurfaceContextValues_unstable","useDialogSurfaceStyles_unstable","useCustomStyleHook_unstable","renderDialogSurface_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;kCACmB;qCACG;8CACG;+CAGO;qCACX;AAMrC,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAC/C,MAAMG,gBAAgBC,IAAAA,qEAAAA,EAAuCH;IAE7DI,IAAAA,6DAAAA,EAAgCJ;IAEhCK,IAAAA,gDAAAA,EAA4B,mCAAmCL;IAE/D,OAAOM,IAAAA,iDAAAA,EAA6BN,OAAOE;AAC7C;AAEAP,cAAcY,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering DialogSurface
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogSurface/DialogSurface.types.ts"],"sourcesContent":["import type { PresenceMotionSlotProps } from '@fluentui/react-motion';\nimport type { PortalProps } from '@fluentui/react-portal';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nimport { DialogContextValue, 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 * For more information refer to the [Motion docs page](https://react.fluentui.dev/?path=/docs/motion-motion-slot--docs).\n *\n */\n backdropMotion: Slot<PresenceMotionSlotProps>;\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<Partial<DialogSurfaceSlots>> & Pick<PortalProps, 'mountNode'>;\n\nexport type DialogSurfaceContextValues = {\n dialogSurface: DialogSurfaceContextValue;\n};\n\n/**\n * State used in rendering DialogSurface\n */\nexport type DialogSurfaceState = ComponentState<DialogSurfaceSlots> &\n // This is only partial to avoid breaking changes, it should be mandatory and in fact it is always defined internally.\n Pick<DialogContextValue, 'isNestedDialog'> &\n Pick<PortalProps, 'mountNode'> & {\n open?: boolean;\n\n /**\n * Transition status for animation.\n * In test environment, this is always `undefined`.\n *\n * @deprecated Will be always `undefined`.\n */\n transitionStatus?: 'entering' | 'entered' | 'idle' | 'exiting' | 'exited' | 'unmounted';\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAqCA;;CAEC"}
@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogSurface: function() {
return _DialogSurface.DialogSurface;
},
dialogSurfaceClassNames: function() {
return _useDialogSurfaceStylesstyles.dialogSurfaceClassNames;
},
renderDialogSurface_unstable: function() {
return _renderDialogSurface.renderDialogSurface_unstable;
},
useDialogSurfaceContextValues_unstable: function() {
return _useDialogSurfaceContextValues.useDialogSurfaceContextValues_unstable;
},
useDialogSurfaceStyles_unstable: function() {
return _useDialogSurfaceStylesstyles.useDialogSurfaceStyles_unstable;
},
useDialogSurface_unstable: function() {
return _useDialogSurface.useDialogSurface_unstable;
}
});
const _DialogSurface = require("./DialogSurface");
const _renderDialogSurface = require("./renderDialogSurface");
const _useDialogSurface = require("./useDialogSurface");
const _useDialogSurfaceStylesstyles = require("./useDialogSurfaceStyles.styles");
const _useDialogSurfaceContextValues = require("./useDialogSurfaceContextValues");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogSurface/index.ts"],"sourcesContent":["export { DialogSurface } from './DialogSurface';\nexport type {\n DialogSurfaceContextValues,\n DialogSurfaceElement,\n DialogSurfaceProps,\n DialogSurfaceSlots,\n DialogSurfaceState,\n} from './DialogSurface.types';\nexport { renderDialogSurface_unstable } from './renderDialogSurface';\nexport { useDialogSurface_unstable } from './useDialogSurface';\nexport { dialogSurfaceClassNames, useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles.styles';\nexport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\n"],"names":["DialogSurface","dialogSurfaceClassNames","renderDialogSurface_unstable","useDialogSurfaceContextValues_unstable","useDialogSurfaceStyles_unstable","useDialogSurface_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAUbC,uBAAuB;eAAvBA,qDAAuB;;IAFvBC,4BAA4B;eAA5BA,iDAA4B;;IAG5BC,sCAAsC;eAAtCA,qEAAsC;;IADbC,+BAA+B;eAA/BA,6DAA+B;;IADxDC,yBAAyB;eAAzBA,2CAAyB;;;+BATJ;qCAQe;kCACH;8CAC+B;+CAClB"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDialogSurface_unstable", {
enumerable: true,
get: function() {
return renderDialogSurface_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactportal = require("@fluentui/react-portal");
const _reactutilities = require("@fluentui/react-utilities");
const _contexts = require("../../contexts");
const renderDialogSurface_unstable = (state, contextValues)=>{
(0, _reactutilities.assertSlots)(state);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_reactportal.Portal, {
mountNode: state.mountNode,
children: [
state.backdrop && // TODO: state.backdropMotion is non nullable, but assertSlots asserts it as nullable
// FIXME: this should be resolved by properly splitting props and state slots declaration
state.backdropMotion && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.backdropMotion, {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.backdrop, {})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_contexts.DialogSurfaceProvider, {
value: contextValues.dialogSurface,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
})
]
});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogSurface/renderDialogSurface.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { Portal } from '@fluentui/react-portal';\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport { DialogSurfaceProvider } from '../../contexts';\nimport type { DialogSurfaceState, DialogSurfaceSlots, DialogSurfaceContextValues } from './DialogSurface.types';\n\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (state: DialogSurfaceState, contextValues: DialogSurfaceContextValues) => {\n assertSlots<DialogSurfaceSlots>(state);\n\n return (\n <Portal mountNode={state.mountNode}>\n {state.backdrop &&\n // TODO: state.backdropMotion is non nullable, but assertSlots asserts it as nullable\n // FIXME: this should be resolved by properly splitting props and state slots declaration\n state.backdropMotion && (\n <state.backdropMotion>\n <state.backdrop />\n </state.backdropMotion>\n )}\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n <state.root />\n </DialogSurfaceProvider>\n </Portal>\n );\n};\n"],"names":["renderDialogSurface_unstable","state","contextValues","assertSlots","_jsxs","Portal","mountNode","backdrop","backdropMotion","_jsx","DialogSurfaceProvider","value","dialogSurface","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;4BAXb;6BAEuB;gCACK;0BAEU;AAM/B,MAAMA,+BAA+B,CAACC,OAA2BC;IACtEC,IAAAA,2BAAAA,EAAgCF;IAEhC,OAAA,WAAA,GACEG,IAAAA,gBAAA,EAACC,mBAAAA,EAAAA;QAAOC,WAAWL,MAAMK,SAAS;;YAC/BL,MAAMM,QAAQ,IACb,qFAAqF;YACrF,yFAAyF;YACzFN,MAAMO,cAAc,IAAA,WAAA,GAClBC,IAAAA,eAAA,EAACR,MAAMO,cAAc,EAAA;0BACnB,WAAA,GAAAC,IAAAA,eAAA,EAACR,MAAMM,QAAQ,EAAA,CAAA;;0BAGrBE,IAAAA,eAAA,EAACC,+BAAAA,EAAAA;gBAAsBC,OAAOT,cAAcU,aAAa;0BACvD,WAAA,GAAAH,IAAAA,eAAA,EAACR,MAAMY,IAAI,EAAA,CAAA;;;;AAInB"}
@@ -0,0 +1,120 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDialogSurface_unstable", {
enumerable: true,
get: function() {
return useDialogSurface_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _keyboardkeys = require("@fluentui/keyboard-keys");
const _reactmotion = require("@fluentui/react-motion");
const _reactutilities = require("@fluentui/react-utilities");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _contexts = require("../../contexts");
const _useDisableBodyScroll = require("../../utils/useDisableBodyScroll");
const _DialogBackdropMotion = require("../DialogBackdropMotion");
const _MotionRefForwarder = require("../MotionRefForwarder");
const useDialogSurface_unstable = (props, ref)=>{
const contextRef = (0, _MotionRefForwarder.useMotionForwardedRef)();
const modalType = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.modalType);
const isNestedDialog = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.isNestedDialog);
const modalAttributes = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.modalAttributes);
const dialogRef = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.dialogRef);
const requestOpenChange = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.requestOpenChange);
const dialogTitleID = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.dialogTitleId);
const open = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.open);
const handledBackdropClick = (0, _reactutilities.useEventCallback)((event)=>{
if ((0, _reactutilities.isResolvedShorthand)(props.backdrop)) {
var _props_backdrop_onClick, _props_backdrop;
(_props_backdrop_onClick = (_props_backdrop = props.backdrop).onClick) === null || _props_backdrop_onClick === void 0 ? void 0 : _props_backdrop_onClick.call(_props_backdrop, event);
}
if (modalType === 'modal' && !event.isDefaultPrevented()) {
requestOpenChange({
event,
open: false,
type: 'backdropClick'
});
}
});
const handleKeyDown = (0, _reactutilities.useEventCallback)((event)=>{
var _props_onKeyDown;
(_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);
if (event.key === _keyboardkeys.Escape && !event.isDefaultPrevented()) {
requestOpenChange({
event,
open: false,
type: 'escapeKeyDown'
});
// stop propagation to avoid conflicting with other elements that listen for `Escape`
// e,g: nested Dialog, Popover, Menu and Tooltip
event.preventDefault();
}
});
const backdrop = _reactutilities.slot.optional(props.backdrop, {
renderByDefault: modalType !== 'non-modal',
defaultProps: {
'aria-hidden': 'true'
},
elementType: 'div'
});
if (backdrop) {
backdrop.onClick = handledBackdropClick;
}
const { disableBodyScroll, enableBodyScroll } = (0, _useDisableBodyScroll.useDisableBodyScroll)();
(0, _reactutilities.useIsomorphicLayoutEffect)(()=>{
if (isNestedDialog || modalType === 'non-modal') {
return;
}
disableBodyScroll();
return ()=>{
enableBodyScroll();
};
}, [
enableBodyScroll,
isNestedDialog,
disableBodyScroll,
modalType
]);
return {
components: {
backdrop: 'div',
root: 'div',
// TODO: remove once React v18 slot API is modified
// This is a problem at the moment due to UnknownSlotProps assumption
// that `children` property is `ReactNode`, which in this case is not valid
// as PresenceComponentProps['children'] is `ReactElement`
backdropMotion: _DialogBackdropMotion.DialogBackdropMotion
},
open,
backdrop,
isNestedDialog,
mountNode: props.mountNode,
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
tabIndex: -1,
'aria-modal': modalType !== 'non-modal',
role: modalType === 'alert' ? 'alertdialog' : 'dialog',
'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,
...props,
...modalAttributes,
onKeyDown: handleKeyDown,
// FIXME:
// `DialogSurfaceElement` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
ref: (0, _reactutilities.useMergedRefs)(ref, contextRef, dialogRef)
}), {
elementType: 'div'
}),
backdropMotion: (0, _reactmotion.presenceMotionSlot)(props.backdropMotion, {
elementType: _DialogBackdropMotion.DialogBackdropMotion,
defaultProps: {
appear: true,
visible: open
}
}),
// Deprecated properties
transitionStatus: undefined
};
};
File diff suppressed because one or more lines are too long
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDialogSurfaceContextValues_unstable", {
enumerable: true,
get: function() {
return useDialogSurfaceContextValues_unstable;
}
});
function useDialogSurfaceContextValues_unstable(state) {
const dialogSurface = true;
return {
dialogSurface
};
}
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogSurface/useDialogSurfaceContextValues.ts"],"sourcesContent":["import type { DialogSurfaceContextValues, DialogSurfaceState } from './DialogSurface.types';\nimport type { DialogSurfaceContextValue } from '../../contexts';\n\nexport function useDialogSurfaceContextValues_unstable(state: DialogSurfaceState): DialogSurfaceContextValues {\n const dialogSurface: DialogSurfaceContextValue = true;\n\n return { dialogSurface };\n}\n"],"names":["useDialogSurfaceContextValues_unstable","state","dialogSurface"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BAGgBA;;;eAAAA;;;AAAT,SAASA,uCAAuCC,KAAyB;IAC9E,MAAMC,gBAA2C;IAEjD,OAAO;QAAEA;IAAc;AACzB"}
@@ -0,0 +1,71 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dialogSurfaceClassNames: function() {
return dialogSurfaceClassNames;
},
useDialogSurfaceStyles_unstable: function() {
return useDialogSurfaceStyles_unstable;
}
});
const _react = require("@griffel/react");
const dialogSurfaceClassNames = {
root: 'fui-DialogSurface',
backdrop: 'fui-DialogSurface__backdrop'
};
/**
* Styles for the root slot
*/ const useRootBaseStyle = /*#__PURE__*/ (0, _react.__resetStyles)("rsmdyd3", "rup8wml", {
r: [
".rsmdyd3{inset:0;padding:24px;margin:auto;border-style:none;overflow:unset;border:1px solid var(--colorTransparentStroke);border-radius:var(--borderRadiusXLarge);display:block;-webkit-user-select:unset;-moz-user-select:unset;user-select:unset;visibility:unset;position:fixed;height:fit-content;max-width:600px;max-height:100vh;box-sizing:border-box;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);box-shadow:var(--shadow64);}",
".rsmdyd3:focus{outline-style:none;}",
".rsmdyd3:focus-visible{outline-style:none;}",
".rsmdyd3[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",
".rsmdyd3[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}",
".rup8wml{inset:0;padding:24px;margin:auto;border-style:none;overflow:unset;border:1px solid var(--colorTransparentStroke);border-radius:var(--borderRadiusXLarge);display:block;-webkit-user-select:unset;-moz-user-select:unset;user-select:unset;visibility:unset;position:fixed;height:fit-content;max-width:600px;max-height:100vh;box-sizing:border-box;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);box-shadow:var(--shadow64);}",
".rup8wml:focus{outline-style:none;}",
".rup8wml:focus-visible{outline-style:none;}",
".rup8wml[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",
".rup8wml[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}"
],
s: [
"@media (forced-colors: active){.rsmdyd3[data-fui-focus-visible]::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}",
"@media screen and (max-width: 480px){.rsmdyd3{max-width:100vw;}}",
"@media screen and (max-height: 359px){.rsmdyd3{overflow-y:auto;padding-right:calc(24px - 4px);border-right-width:4px;border-top-width:4px;border-bottom-width:4px;}}",
"@media (forced-colors: active){.rup8wml[data-fui-focus-visible]::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}",
"@media screen and (max-width: 480px){.rup8wml{max-width:100vw;}}",
"@media screen and (max-height: 359px){.rup8wml{overflow-y:auto;padding-left:calc(24px - 4px);border-left-width:4px;border-top-width:4px;border-bottom-width:4px;}}"
]
});
const useBackdropBaseStyle = /*#__PURE__*/ (0, _react.__resetStyles)("rsptlh5", null, [
".rsptlh5{inset:0px;background-color:rgba(0, 0, 0, 0.4);position:fixed;}"
]);
const useBackdropStyles = /*#__PURE__*/ (0, _react.__styles)({
nestedDialogBackdrop: {
De3pzq: "f1c21dwh"
}
}, {
d: [
".f1c21dwh{background-color:var(--colorTransparentBackground);}"
]
});
const useDialogSurfaceStyles_unstable = (state)=>{
'use no memo';
const { isNestedDialog, root, backdrop } = state;
const rootBaseStyle = useRootBaseStyle();
const backdropBaseStyle = useBackdropBaseStyle();
const backdropStyles = useBackdropStyles();
root.className = (0, _react.mergeClasses)(dialogSurfaceClassNames.root, rootBaseStyle, root.className);
if (backdrop) {
backdrop.className = (0, _react.mergeClasses)(dialogSurfaceClassNames.backdrop, backdropBaseStyle, isNestedDialog && backdropStyles.nestedDialogBackdrop, backdrop.className);
}
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDialogSurfaceStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { FULLSCREEN_DIALOG_SCROLLBAR_OFFSET, MEDIA_QUERY_BREAKPOINT_SELECTOR, MEDIA_QUERY_SHORT_SCREEN, SURFACE_BORDER_WIDTH, SURFACE_PADDING } from '../../contexts';\nexport const dialogSurfaceClassNames = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop'\n};\n/**\n * Styles for the root slot\n */ const useRootBaseStyle = makeResetStyles({\n ...createFocusOutlineStyle(),\n inset: 0,\n padding: SURFACE_PADDING,\n margin: 'auto',\n borderStyle: 'none',\n overflow: 'unset',\n border: `${SURFACE_BORDER_WIDTH} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusXLarge,\n display: 'block',\n userSelect: 'unset',\n visibility: 'unset',\n position: 'fixed',\n height: 'fit-content',\n maxWidth: '600px',\n maxHeight: '100vh',\n boxSizing: 'border-box',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n // Same styles as DialogSurfaceMotion last keyframe,\n // to ensure dialog will be properly styled when surfaceMotion is opted-out\n boxShadow: tokens.shadow64,\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw'\n },\n [MEDIA_QUERY_SHORT_SCREEN]: {\n overflowY: 'auto',\n // We need to offset the scrollbar by adding transparent borders otherwise\n // it conflicts with the border radius.\n paddingRight: `calc(${SURFACE_PADDING} - ${FULLSCREEN_DIALOG_SCROLLBAR_OFFSET})`,\n borderRightWidth: FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n borderTopWidth: FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n borderBottomWidth: FULLSCREEN_DIALOG_SCROLLBAR_OFFSET\n }\n});\nconst useBackdropBaseStyle = makeResetStyles({\n inset: '0px',\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n position: 'fixed'\n});\nconst useBackdropStyles = makeStyles({\n nestedDialogBackdrop: {\n backgroundColor: tokens.colorTransparentBackground\n }\n});\n/**\n * Apply styling to the DialogSurface slots based on the state\n */ export const useDialogSurfaceStyles_unstable = (state)=>{\n 'use no memo';\n const { isNestedDialog, root, backdrop } = state;\n const rootBaseStyle = useRootBaseStyle();\n const backdropBaseStyle = useBackdropBaseStyle();\n const backdropStyles = useBackdropStyles();\n root.className = mergeClasses(dialogSurfaceClassNames.root, rootBaseStyle, root.className);\n if (backdrop) {\n backdrop.className = mergeClasses(dialogSurfaceClassNames.backdrop, backdropBaseStyle, isNestedDialog && backdropStyles.nestedDialogBackdrop, backdrop.className);\n }\n return state;\n};\n"],"names":["dialogSurfaceClassNames","useDialogSurfaceStyles_unstable","root","backdrop","useRootBaseStyle","__resetStyles","r","s","useBackdropBaseStyle","useBackdropStyles","__styles","nestedDialogBackdrop","De3pzq","d","state","isNestedDialog","rootBaseStyle","backdropBaseStyle","backdropStyles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,uBAAuB;eAAvBA;;IAqDIC,+BAA+B;eAA/BA;;;uBAzDyC;AAInD,MAAMD,0BAA0B;IACnCE,MAAM;IACNC,UAAU;AACd;AACA;;CAEA,GAAI,MAAMC,mBAAgB,WAAA,GAAGC,IAAAA,oBAAA,EAAA,WAAA,WAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAmC7B,MAAMC,uBAAoB,WAAA,GAAGH,IAAAA,oBAAA,EAAA,WAAA,MAAA;IAAA;CAI5B;AACD,MAAMI,oBAAiB,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,sBAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;KAAA;AAAA;AAOf,MAAMZ,kCAAmCa,CAAAA;IAChD;IACA,MAAM,EAAEC,cAAc,EAAEb,IAAI,EAAEC,QAAAA,EAAU,GAAGW;IAC3C,MAAME,gBAAgBZ;IACtB,MAAMa,oBAAoBT;IAC1B,MAAMU,iBAAiBT;IACvBP,KAAKiB,SAAS,GAAGC,IAAAA,mBAAY,EAACpB,wBAAwBE,IAAI,EAAEc,eAAed,KAAKiB,SAAS;IACzF,IAAIhB,UAAU;QACVA,SAASgB,SAAS,GAAGC,IAAAA,mBAAY,EAACpB,wBAAwBG,QAAQ,EAAEc,mBAAmBF,kBAAkBG,eAAeP,oBAAoB,EAAER,SAASgB,SAAS;IACpK;IACA,OAAOL;AACX"}
@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DialogSurfaceMotion", {
enumerable: true,
get: function() {
return DialogSurfaceMotion;
}
});
const _reactmotion = require("@fluentui/react-motion");
const _reacttheme = require("@fluentui/react-theme");
const keyframes = [
{
opacity: 0,
boxShadow: '0px 0px 0px 0px rgba(0, 0, 0, 0.1)',
transform: 'scale(0.85) translateZ(0)'
},
{
boxShadow: _reacttheme.tokens.shadow64,
transform: 'scale(1) translateZ(0)',
opacity: 1
}
];
const DialogSurfaceMotion = (0, _reactmotion.createPresenceComponent)({
enter: {
keyframes,
easing: _reactmotion.motionTokens.curveDecelerateMid,
duration: _reactmotion.motionTokens.durationGentle
},
exit: {
keyframes: [
...keyframes
].reverse(),
easing: _reactmotion.motionTokens.curveAccelerateMin,
duration: _reactmotion.motionTokens.durationGentle
}
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogSurfaceMotion.ts"],"sourcesContent":["import { createPresenceComponent, motionTokens } from '@fluentui/react-motion';\nimport { tokens } from '@fluentui/react-theme';\n\nconst keyframes = [\n { opacity: 0, boxShadow: '0px 0px 0px 0px rgba(0, 0, 0, 0.1)', transform: 'scale(0.85) translateZ(0)' },\n {\n boxShadow: tokens.shadow64,\n transform: 'scale(1) translateZ(0)',\n opacity: 1,\n },\n];\n\nexport const DialogSurfaceMotion = createPresenceComponent({\n enter: {\n keyframes,\n easing: motionTokens.curveDecelerateMid,\n duration: motionTokens.durationGentle,\n },\n exit: {\n keyframes: [...keyframes].reverse(),\n easing: motionTokens.curveAccelerateMin,\n duration: motionTokens.durationGentle,\n },\n});\n"],"names":["DialogSurfaceMotion","keyframes","opacity","boxShadow","transform","tokens","shadow64","createPresenceComponent","enter","easing","motionTokens","curveDecelerateMid","duration","durationGentle","exit","reverse","curveAccelerateMin"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;6BAZyC;4BAC/B;AAEvB,MAAMC,YAAY;IAChB;QAAEC,SAAS;QAAGC,WAAW;QAAsCC,WAAW;IAA4B;IACtG;QACED,WAAWE,kBAAAA,CAAOC,QAAQ;QAC1BF,WAAW;QACXF,SAAS;IACX;CACD;AAEM,MAAMF,sBAAsBO,IAAAA,oCAAAA,EAAwB;IACzDC,OAAO;QACLP;QACAQ,QAAQC,yBAAAA,CAAaC,kBAAkB;QACvCC,UAAUF,yBAAAA,CAAaG,cAAc;IACvC;IACAC,MAAM;QACJb,WAAW;eAAIA;SAAU,CAACc,OAAO;QACjCN,QAAQC,yBAAAA,CAAaM,kBAAkB;QACvCJ,UAAUF,yBAAAA,CAAaG,cAAc;IACvC;AACF"}
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DialogTitle", {
enumerable: true,
get: function() {
return DialogTitle;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDialogTitle = require("./useDialogTitle");
const _renderDialogTitle = require("./renderDialogTitle");
const _useDialogTitleStylesstyles = require("./useDialogTitleStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DialogTitle = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDialogTitle.useDialogTitle_unstable)(props, ref);
(0, _useDialogTitleStylesstyles.useDialogTitleStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDialogTitleStyles_unstable')(state);
return (0, _renderDialogTitle.renderDialogTitle_unstable)(state);
});
DialogTitle.displayName = 'DialogTitle';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogTitle/DialogTitle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogTitle_unstable } from './useDialogTitle';\nimport { renderDialogTitle_unstable } from './renderDialogTitle';\nimport { useDialogTitleStyles_unstable } from './useDialogTitleStyles.styles';\nimport type { DialogTitleProps } from './DialogTitle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogTitle` component expects to have a title/header\n * and when `Dialog` is `non-modal` a close (X icon) button is provided through `action` slot by default.\n */\nexport const DialogTitle: ForwardRefComponent<DialogTitleProps> = React.forwardRef((props, ref) => {\n const state = useDialogTitle_unstable(props, ref);\n\n useDialogTitleStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogTitleStyles_unstable')(state);\n\n return renderDialogTitle_unstable(state);\n});\n\nDialogTitle.displayName = 'DialogTitle';\n"],"names":["DialogTitle","React","forwardRef","props","ref","state","useDialogTitle_unstable","useDialogTitleStyles_unstable","useCustomStyleHook_unstable","renderDialogTitle_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;gCACiB;mCACG;4CACG;qCAGF;AAMrC,MAAMA,cAAAA,WAAAA,GAAqDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQC,IAAAA,uCAAAA,EAAwBH,OAAOC;IAE7CG,IAAAA,yDAAAA,EAA8BF;IAE9BG,IAAAA,gDAAAA,EAA4B,iCAAiCH;IAE7D,OAAOI,IAAAA,6CAAAA,EAA2BJ;AACpC;AAEAL,YAAYU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering DialogTitle
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogTitle/DialogTitle.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogTitleSlots = {\n /**\n * By default this is a h2, but can be any heading or div,\n * if `div` is provided do not forget to also provide proper `role=\"heading\"` and `aria-level` attributes\n */\n root: Slot<'h2', 'h1' | 'h3' | 'h4' | 'h5' | 'h6' | 'div'>;\n /**\n * By default a Dialog with modalType='non-modal' will have a close button action\n */\n action?: Slot<'div'>;\n};\n\n/**\n * DialogTitle Props\n */\nexport type DialogTitleProps = ComponentProps<DialogTitleSlots>;\n\n/**\n * State used in rendering DialogTitle\n */\nexport type DialogTitleState = ComponentState<DialogTitleSlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAmBA;;CAEC"}
@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogTitle: function() {
return _DialogTitle.DialogTitle;
},
dialogTitleClassNames: function() {
return _useDialogTitleStylesstyles.dialogTitleClassNames;
},
renderDialogTitle_unstable: function() {
return _renderDialogTitle.renderDialogTitle_unstable;
},
useDialogTitleInternalStyles: function() {
return _useDialogTitleStylesstyles.useDialogTitleInternalStyles;
},
useDialogTitleStyles_unstable: function() {
return _useDialogTitleStylesstyles.useDialogTitleStyles_unstable;
},
useDialogTitle_unstable: function() {
return _useDialogTitle.useDialogTitle_unstable;
}
});
const _DialogTitle = require("./DialogTitle");
const _renderDialogTitle = require("./renderDialogTitle");
const _useDialogTitle = require("./useDialogTitle");
const _useDialogTitleStylesstyles = require("./useDialogTitleStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogTitle/index.ts"],"sourcesContent":["export { DialogTitle } from './DialogTitle';\nexport type { DialogTitleProps, DialogTitleSlots, DialogTitleState } from './DialogTitle.types';\nexport { renderDialogTitle_unstable } from './renderDialogTitle';\nexport { useDialogTitle_unstable } from './useDialogTitle';\nexport {\n dialogTitleClassNames,\n useDialogTitleInternalStyles,\n useDialogTitleStyles_unstable,\n} from './useDialogTitleStyles.styles';\n"],"names":["DialogTitle","dialogTitleClassNames","renderDialogTitle_unstable","useDialogTitleInternalStyles","useDialogTitleStyles_unstable","useDialogTitle_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,WAAW;eAAXA,wBAAW;;IAKlBC,qBAAqB;eAArBA,iDAAqB;;IAHdC,0BAA0B;eAA1BA,6CAA0B;;IAIjCC,4BAA4B;eAA5BA,wDAA4B;;IAC5BC,6BAA6B;eAA7BA,yDAA6B;;IAJtBC,uBAAuB;eAAvBA,uCAAuB;;;6BAHJ;mCAEe;gCACH;4CAKjC"}
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDialogTitle_unstable", {
enumerable: true,
get: function() {
return renderDialogTitle_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const renderDialogTitle_unstable = (state)=>{
(0, _reactutilities.assertSlots)(state);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {
children: state.root.children
}),
state.action && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.action, {})
]
});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogTitle/renderDialogTitle.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DialogTitleState, DialogTitleSlots } from './DialogTitle.types';\n\n/**\n * Render the final JSX of DialogTitle\n */\nexport const renderDialogTitle_unstable = (state: DialogTitleState) => {\n assertSlots<DialogTitleSlots>(state);\n\n return (\n <>\n <state.root>{state.root.children}</state.root>\n {state.action && <state.action />}\n </>\n );\n};\n"],"names":["renderDialogTitle_unstable","state","assertSlots","_jsxs","_Fragment","_jsx","root","children","action"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,6BAA6B,CAACC;IACzCC,IAAAA,2BAAAA,EAA8BD;IAE9B,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAAAC,oBAAA,EAAA;;0BACEC,IAAAA,eAAA,EAACJ,MAAMK,IAAI,EAAA;0BAAEL,MAAMK,IAAI,CAACC,QAAQ;;YAC/BN,MAAMO,MAAM,IAAA,WAAA,GAAIH,IAAAA,eAAA,EAACJ,MAAMO,MAAM,EAAA,CAAA;;;AAGpC"}
@@ -0,0 +1,50 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDialogTitle_unstable", {
enumerable: true,
get: function() {
return useDialogTitle_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
const _dialogContext = require("../../contexts/dialogContext");
const _reacticons = require("@fluentui/react-icons");
const _DialogTrigger = require("../DialogTrigger/DialogTrigger");
const _useDialogTitleStylesstyles = require("./useDialogTitleStyles.styles");
const useDialogTitle_unstable = (props, ref)=>{
const { action } = props;
const modalType = (0, _dialogContext.useDialogContext_unstable)((ctx)=>ctx.modalType);
const internalStyles = (0, _useDialogTitleStylesstyles.useDialogTitleInternalStyles)();
return {
components: {
root: 'h2',
action: 'div'
},
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('h2', {
ref,
id: (0, _dialogContext.useDialogContext_unstable)((ctx)=>ctx.dialogTitleId),
...props
}), {
elementType: 'h2'
}),
action: _reactutilities.slot.optional(action, {
renderByDefault: modalType === 'non-modal',
defaultProps: {
children: /*#__PURE__*/ _react.createElement(_DialogTrigger.DialogTrigger, {
disableButtonEnhancement: true,
action: "close"
}, /*#__PURE__*/ _react.createElement("button", {
type: "button",
className: internalStyles,
// TODO: find a better way to add internal labels
"aria-label": "close"
}, /*#__PURE__*/ _react.createElement(_reacticons.Dismiss20Regular, null)))
},
elementType: 'div'
})
};
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogTitle/useDialogTitle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { DialogTitleProps, DialogTitleState } from './DialogTitle.types';\nimport { useDialogContext_unstable } from '../../contexts/dialogContext';\nimport { Dismiss20Regular } from '@fluentui/react-icons';\nimport { DialogTrigger } from '../DialogTrigger/DialogTrigger';\nimport { useDialogTitleInternalStyles } from './useDialogTitleStyles.styles';\n\n/**\n * Create the state required to render DialogTitle.\n *\n * The returned state can be modified with hooks such as useDialogTitleStyles_unstable,\n * before being passed to renderDialogTitle_unstable.\n *\n * @param props - props from this instance of DialogTitle\n * @param ref - reference to root HTMLElement of DialogTitle\n */\nexport const useDialogTitle_unstable = (props: DialogTitleProps, ref: React.Ref<HTMLDivElement>): DialogTitleState => {\n const { action } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const internalStyles = useDialogTitleInternalStyles();\n\n return {\n components: {\n root: 'h2',\n action: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('h2', {\n ref,\n id: useDialogContext_unstable(ctx => ctx.dialogTitleId),\n ...props,\n }),\n { elementType: 'h2' },\n ),\n action: slot.optional(action, {\n renderByDefault: modalType === 'non-modal',\n defaultProps: {\n children: (\n <DialogTrigger disableButtonEnhancement action=\"close\">\n <button\n type=\"button\"\n className={internalStyles}\n // TODO: find a better way to add internal labels\n aria-label=\"close\"\n >\n <Dismiss20Regular />\n </button>\n </DialogTrigger>\n ),\n },\n elementType: 'div',\n }),\n };\n};\n"],"names":["useDialogTitle_unstable","props","ref","action","modalType","useDialogContext_unstable","ctx","internalStyles","useDialogTitleInternalStyles","components","root","slot","always","getIntrinsicElementProps","id","dialogTitleId","elementType","optional","renderByDefault","defaultProps","children","React","createElement","DialogTrigger","disableButtonEnhancement","button","type","className","aria-label","Dismiss20Regular"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBaA;;;eAAAA;;;;iEAjBU;gCACwB;+BAEL;4BACT;+BACH;4CACe;AAWtC,MAAMA,0BAA0B,CAACC,OAAyBC;IAC/D,MAAM,EAAEC,MAAM,EAAE,GAAGF;IACnB,MAAMG,YAAYC,IAAAA,wCAAAA,EAA0BC,CAAAA,MAAOA,IAAIF,SAAS;IAChE,MAAMG,iBAAiBC,IAAAA,wDAAAA;IAEvB,OAAO;QACLC,YAAY;YACVC,MAAM;YACNP,QAAQ;QACV;QACAO,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyB,MAAM;YAC7BX;YACAY,IAAIT,IAAAA,wCAAAA,EAA0BC,CAAAA,MAAOA,IAAIS,aAAa;YACtD,GAAGd,KAAK;QACV,IACA;YAAEe,aAAa;QAAK;QAEtBb,QAAQQ,oBAAAA,CAAKM,QAAQ,CAACd,QAAQ;YAC5Be,iBAAiBd,cAAc;YAC/Be,cAAc;gBACZC,UAAAA,WAAAA,GACEC,OAAAC,aAAA,CAACC,4BAAAA,EAAAA;oBAAcC,0BAAAA;oBAAyBrB,QAAO;iCAC7CkB,OAAAC,aAAA,CAACG,UAAAA;oBACCC,MAAK;oBACLC,WAAWpB;oBACX,iDAAiD;oBACjDqB,cAAW;iCAEXP,OAAAC,aAAA,CAACO,4BAAAA,EAAAA;YAIT;YACAb,aAAa;QACf;IACF;AACF"}
@@ -0,0 +1,74 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dialogTitleClassNames: function() {
return dialogTitleClassNames;
},
useDialogTitleInternalStyles: function() {
return useDialogTitleInternalStyles;
},
useDialogTitleStyles_unstable: function() {
return useDialogTitleStyles_unstable;
}
});
const _react = require("@griffel/react");
const dialogTitleClassNames = {
root: 'fui-DialogTitle',
action: 'fui-DialogTitle__action'
};
/**
* Styles for the root slot
*/ const useRootResetStyles = /*#__PURE__*/ (0, _react.__resetStyles)("rxjm636", null, [
".rxjm636{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase500);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase500);margin:0;grid-row-start:1;grid-row-end:1;grid-column-start:1;grid-column-end:3;}"
]);
const useStyles = /*#__PURE__*/ (0, _react.__styles)({
rootWithoutAction: {
Bw0ie65: "fsyjsko"
}
}, {
d: [
".fsyjsko{grid-column-end:4;}"
]
});
/**
* Styles for the action slot
*/ const useActionResetStyles = /*#__PURE__*/ (0, _react.__resetStyles)("r13kcrze", null, [
".r13kcrze{grid-row-start:1;grid-row-end:1;grid-column-start:3;justify-self:end;align-self:start;}"
]);
const useDialogTitleInternalStyles = /*#__PURE__*/ (0, _react.__resetStyles)("r2avt6e", "roj2bbc", {
r: [
".r2avt6e{overflow:visible;padding:0;border-style:none;position:relative;box-sizing:content-box;background-color:inherit;color:inherit;font-family:inherit;font-size:inherit;cursor:pointer;line-height:0;-webkit-appearance:button;text-align:unset;}",
".r2avt6e:focus{outline-style:none;}",
".r2avt6e:focus-visible{outline-style:none;}",
".r2avt6e[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",
".r2avt6e[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}",
".roj2bbc{overflow:visible;padding:0;border-style:none;position:relative;box-sizing:content-box;background-color:inherit;color:inherit;font-family:inherit;font-size:inherit;cursor:pointer;line-height:0;-webkit-appearance:button;text-align:unset;}",
".roj2bbc:focus{outline-style:none;}",
".roj2bbc:focus-visible{outline-style:none;}",
".roj2bbc[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",
".roj2bbc[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}"
],
s: [
"@media (forced-colors: active){.r2avt6e[data-fui-focus-visible]::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}",
"@media (forced-colors: active){.roj2bbc[data-fui-focus-visible]::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}"
]
});
const useDialogTitleStyles_unstable = (state)=>{
'use no memo';
const rootResetStyles = useRootResetStyles();
const actionResetStyles = useActionResetStyles();
const styles = useStyles();
state.root.className = (0, _react.mergeClasses)(dialogTitleClassNames.root, rootResetStyles, !state.action && styles.rootWithoutAction, state.root.className);
if (state.action) {
state.action.className = (0, _react.mergeClasses)(dialogTitleClassNames.action, actionResetStyles, state.action.className);
}
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDialogTitleStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nexport const dialogTitleClassNames = {\n root: 'fui-DialogTitle',\n action: 'fui-DialogTitle__action'\n};\n/**\n * Styles for the root slot\n */ const useRootResetStyles = makeResetStyles({\n ...typographyStyles.subtitle1,\n margin: 0,\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 1,\n gridColumnEnd: 3\n});\nconst useStyles = makeStyles({\n rootWithoutAction: {\n gridColumnEnd: 4\n }\n});\n/**\n * Styles for the action slot\n */ const useActionResetStyles = makeResetStyles({\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 3,\n justifySelf: 'end',\n alignSelf: 'start'\n});\n/**\n * Styles to be applied on internal elements used by default action on non-modal Dialog\n * @internal\n */ export const useDialogTitleInternalStyles = makeResetStyles({\n ...createFocusOutlineStyle(),\n overflow: 'visible',\n padding: 0,\n borderStyle: 'none',\n position: 'relative',\n boxSizing: 'content-box',\n backgroundColor: 'inherit',\n color: 'inherit',\n fontFamily: 'inherit',\n fontSize: 'inherit',\n cursor: 'pointer',\n lineHeight: 0,\n WebkitAppearance: 'button',\n textAlign: 'unset'\n});\n/**\n * Apply styling to the DialogTitle slots based on the state\n */ export const useDialogTitleStyles_unstable = (state)=>{\n 'use no memo';\n const rootResetStyles = useRootResetStyles();\n const actionResetStyles = useActionResetStyles();\n const styles = useStyles();\n state.root.className = mergeClasses(dialogTitleClassNames.root, rootResetStyles, !state.action && styles.rootWithoutAction, state.root.className);\n if (state.action) {\n state.action.className = mergeClasses(dialogTitleClassNames.action, actionResetStyles, state.action.className);\n }\n return state;\n};\n"],"names":["dialogTitleClassNames","useDialogTitleInternalStyles","useDialogTitleStyles_unstable","root","action","useRootResetStyles","__resetStyles","useStyles","__styles","rootWithoutAction","Bw0ie65","d","useActionResetStyles","r","s","state","rootResetStyles","actionResetStyles","styles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGaA,qBAAqB;eAArBA;;IA+BIC,4BAA4B;eAA5BA;;IAkBAC,6BAA6B;eAA7BA;;;uBApDyC;AAGnD,MAAMF,wBAAwB;IACjCG,MAAM;IACNC,QAAQ;AACZ;AACA;;CAEA,GAAI,MAAMC,qBAAkB,WAAA,GAAGC,IAAAA,oBAAA,EAAA,WAAA,MAAA;IAAA;CAO9B;AACD,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,mBAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;KAAA;AAAA;AAKlB;;CAEA,GAAI,MAAMC,uBAAoB,WAAA,GAAGN,IAAAA,oBAAA,EAAA,YAAA,MAAA;IAAA;CAMhC;AAIU,MAAML,+BAA4B,WAAA,GAAGK,IAAAA,oBAAA,EAAA,WAAA,WAAA;IAAAO,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,GAAA;QAAA;QAAA;KAAA;AAAA;AAkBrC,MAAMZ,gCAAiCa,CAAAA;IAC9C;IACA,MAAMC,kBAAkBX;IACxB,MAAMY,oBAAoBL;IAC1B,MAAMM,SAASX;IACfQ,MAAMZ,IAAI,CAACgB,SAAS,GAAGC,IAAAA,mBAAY,EAACpB,sBAAsBG,IAAI,EAAEa,iBAAiB,CAACD,MAAMX,MAAM,IAAIc,OAAOT,iBAAiB,EAAEM,MAAMZ,IAAI,CAACgB,SAAS;IAChJ,IAAIJ,MAAMX,MAAM,EAAE;QACdW,MAAMX,MAAM,CAACe,SAAS,GAAGC,IAAAA,mBAAY,EAACpB,sBAAsBI,MAAM,EAAEa,mBAAmBF,MAAMX,MAAM,CAACe,SAAS;IACjH;IACA,OAAOJ;AACX"}
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DialogTrigger", {
enumerable: true,
get: function() {
return DialogTrigger;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDialogTrigger = require("./useDialogTrigger");
const _renderDialogTrigger = require("./renderDialogTrigger");
const DialogTrigger = (props)=>{
const state = (0, _useDialogTrigger.useDialogTrigger_unstable)(props);
return (0, _renderDialogTrigger.renderDialogTrigger_unstable)(state);
};
DialogTrigger.displayName = 'DialogTrigger';
// type casting here is required to ensure internal type FluentTriggerComponent is not leaked
DialogTrigger.isFluentTriggerComponent = true;
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogTrigger/DialogTrigger.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogTrigger_unstable } from './useDialogTrigger';\nimport { renderDialogTrigger_unstable } from './renderDialogTrigger';\nimport type { DialogTriggerProps } from './DialogTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * A non-visual component that wraps its child\n * and configures them to be the trigger that will open or close a `Dialog`.\n * This component should only accept one child.\n *\n * This component sole purpose is to avoid opting out of the internal controlled open state of a `Dialog`\n * Besides being a trigger that opens/close a dialog through context this component doesn't do much,\n * making it basically unnecessary in cases where the trigger is outside of the `Dialog` component.\n */\nexport const DialogTrigger: React.FC<DialogTriggerProps> = props => {\n const state = useDialogTrigger_unstable(props);\n\n return renderDialogTrigger_unstable(state);\n};\n\nDialogTrigger.displayName = 'DialogTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(DialogTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"names":["DialogTrigger","props","state","useDialogTrigger_unstable","renderDialogTrigger_unstable","displayName","isFluentTriggerComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;kCACmB;qCACG;AAatC,MAAMA,gBAA8CC,CAAAA;IACzD,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BF;IAExC,OAAOG,IAAAA,iDAAAA,EAA6BF;AACtC;AAEAF,cAAcK,WAAW,GAAG;AAC5B,6FAA6F;AAC5FL,cAAyCM,wBAAwB,GAAG"}
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogTrigger/DialogTrigger.types.ts"],"sourcesContent":["import { ARIAButtonResultProps, ARIAButtonType } from '@fluentui/react-aria';\nimport type { TriggerProps } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nexport type DialogTriggerAction = 'open' | 'close';\n\nexport type DialogTriggerProps = TriggerProps<DialogTriggerChildProps> & {\n /**\n * Explicitly declare if the trigger is responsible for opening or\n * closing a Dialog visibility state.\n *\n * If `DialogTrigger` is outside `DialogSurface` then it'll be `open` by default\n *\n * If `DialogTrigger` is inside `DialogSurface` then it'll be `close` by default\n */\n action?: DialogTriggerAction;\n /**\n * Disables internal trigger mechanism that ensures a child provided will be a compliant ARIA button.\n * @default false\n */\n disableButtonEnhancement?: boolean;\n};\n\n/**\n * Props that are passed to the child of the DialogTrigger when cloned to ensure correct behaviour for the Dialog\n */\nexport type DialogTriggerChildProps<Type extends ARIAButtonType = ARIAButtonType, Props = {}> = ARIAButtonResultProps<\n Type,\n Props & {\n 'aria-haspopup'?: 'dialog';\n }\n>;\n\nexport type DialogTriggerState = {\n children: React.ReactElement | null;\n};\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAEuB"}
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DialogTrigger: function() {
return _DialogTrigger.DialogTrigger;
},
renderDialogTrigger_unstable: function() {
return _renderDialogTrigger.renderDialogTrigger_unstable;
},
useDialogTrigger_unstable: function() {
return _useDialogTrigger.useDialogTrigger_unstable;
}
});
const _DialogTrigger = require("./DialogTrigger");
const _renderDialogTrigger = require("./renderDialogTrigger");
const _useDialogTrigger = require("./useDialogTrigger");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogTrigger/index.ts"],"sourcesContent":["export { DialogTrigger } from './DialogTrigger';\nexport type {\n DialogTriggerAction,\n DialogTriggerChildProps,\n DialogTriggerProps,\n DialogTriggerState,\n} from './DialogTrigger.types';\nexport { renderDialogTrigger_unstable } from './renderDialogTrigger';\nexport { useDialogTrigger_unstable } from './useDialogTrigger';\n"],"names":["DialogTrigger","renderDialogTrigger_unstable","useDialogTrigger_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAObC,4BAA4B;eAA5BA,iDAA4B;;IAC5BC,yBAAyB;eAAzBA,2CAAyB;;;+BARJ;qCAOe;kCACH"}
@@ -0,0 +1,15 @@
/**
* Render the final JSX of MenuTrigger
*
* Only renders children
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDialogTrigger_unstable", {
enumerable: true,
get: function() {
return renderDialogTrigger_unstable;
}
});
const renderDialogTrigger_unstable = (state)=>state.children;
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DialogTrigger/renderDialogTrigger.tsx"],"sourcesContent":["import type { DialogTriggerState } from './DialogTrigger.types';\n\n/**\n * Render the final JSX of MenuTrigger\n *\n * Only renders children\n */\nexport const renderDialogTrigger_unstable = (state: DialogTriggerState) => state.children;\n"],"names":["renderDialogTrigger_unstable","state","children"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAEA;;;;CAIC;;;;+BACYA;;;eAAAA;;;AAAN,MAAMA,+BAA+B,CAACC,QAA8BA,MAAMC,QAAQ"}

Some files were not shown because too many files have changed in this diff Show More