@fluentui/react-dialog 9.5.2 → 9.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +135 -1
- package/CHANGELOG.md +36 -2
- package/dist/index.d.ts +5 -3
- package/lib/components/Dialog/useDialog.js +11 -1
- package/lib/components/Dialog/useDialog.js.map +1 -1
- package/lib/components/Dialog/useDialogContextValues.js +5 -1
- package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib/components/DialogActions/DialogActions.js +3 -6
- package/lib/components/DialogActions/DialogActions.js.map +1 -1
- package/lib/components/DialogActions/index.js +1 -1
- package/lib/components/DialogActions/index.js.map +1 -1
- package/lib/components/DialogActions/{useDialogActionsStyles.js → useDialogActionsStyles.styles.js} +1 -1
- package/lib/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -0
- package/lib/components/DialogBody/DialogBody.js +3 -6
- package/lib/components/DialogBody/DialogBody.js.map +1 -1
- package/lib/components/DialogBody/index.js +1 -1
- package/lib/components/DialogBody/index.js.map +1 -1
- package/lib/components/DialogBody/{useDialogBodyStyles.js → useDialogBodyStyles.styles.js} +1 -1
- package/lib/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -0
- package/lib/components/DialogContent/DialogContent.js +3 -6
- package/lib/components/DialogContent/DialogContent.js.map +1 -1
- package/lib/components/DialogContent/index.js +1 -1
- package/lib/components/DialogContent/index.js.map +1 -1
- package/lib/components/DialogContent/{useDialogContentStyles.js → useDialogContentStyles.styles.js} +1 -1
- package/lib/components/DialogContent/useDialogContentStyles.styles.js.map +1 -0
- package/lib/components/DialogSurface/DialogSurface.js +3 -6
- package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/index.js +1 -1
- package/lib/components/DialogSurface/index.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurface.js +1 -8
- package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/{useDialogSurfaceStyles.js → useDialogSurfaceStyles.styles.js} +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -0
- package/lib/components/DialogTitle/DialogTitle.js +3 -6
- package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/DialogTitle.types.js.map +1 -1
- package/lib/components/DialogTitle/index.js +1 -1
- package/lib/components/DialogTitle/index.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitle.js +5 -5
- package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/{useDialogTitleStyles.js → useDialogTitleStyles.styles.js} +7 -3
- package/lib/components/DialogTitle/useDialogTitleStyles.styles.js.map +1 -0
- package/lib/components/DialogTrigger/DialogTrigger.js +1 -1
- package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/index.js +1 -1
- package/lib/components/DialogTrigger/index.js.map +1 -1
- package/lib/components/DialogTrigger/{useDialogTrigger.js → useDialogTrigger.styles.js} +2 -5
- package/lib/components/DialogTrigger/useDialogTrigger.styles.js.map +1 -0
- package/lib/contexts/dialogContext.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialog.js +8 -1
- package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialogContextValues.js +3 -1
- package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogActions/DialogActions.js +3 -4
- package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/index.js +1 -1
- package/lib-commonjs/components/DialogActions/index.js.map +1 -1
- package/lib-commonjs/components/DialogActions/{useDialogActionsStyles.js → useDialogActionsStyles.styles.js} +2 -2
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DialogBody/DialogBody.js +3 -4
- package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/index.js +1 -1
- package/lib-commonjs/components/DialogBody/index.js.map +1 -1
- package/lib-commonjs/components/DialogBody/{useDialogBodyStyles.js → useDialogBodyStyles.styles.js} +2 -2
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DialogContent/DialogContent.js +3 -4
- package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/index.js +1 -1
- package/lib-commonjs/components/DialogContent/index.js.map +1 -1
- package/lib-commonjs/components/DialogContent/{useDialogContentStyles.js → useDialogContentStyles.styles.js} +2 -2
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DialogSurface/DialogSurface.js +3 -4
- package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/index.js +1 -1
- package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js +1 -6
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/{useDialogSurfaceStyles.js → useDialogSurfaceStyles.styles.js} +2 -2
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DialogTitle/DialogTitle.js +3 -4
- package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/index.js +1 -1
- package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js +5 -5
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/{useDialogTitleStyles.js → useDialogTitleStyles.styles.js} +17 -3
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.js +2 -2
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/index.js +1 -1
- package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/{useDialogTrigger.js → useDialogTrigger.styles.js} +3 -4
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.styles.js.map +1 -0
- package/package.json +11 -11
- package/.swcrc +0 -30
- package/lib/components/DialogActions/useDialogActionsStyles.js.map +0 -1
- package/lib/components/DialogBody/useDialogBodyStyles.js.map +0 -1
- package/lib/components/DialogContent/useDialogContentStyles.js.map +0 -1
- package/lib/components/DialogSurface/useDialogSurfaceStyles.js.map +0 -1
- package/lib/components/DialogTitle/useDialogTitleStyles.js.map +0 -1
- package/lib/components/DialogTrigger/useDialogTrigger.js.map +0 -1
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js.map +0 -1
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js.map +0 -1
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.js.map +0 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js.map +0 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +0 -1
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogContent/index.js"],"sourcesContent":["export * from './DialogContent';\nexport * from './DialogContent.types';\nexport * from './renderDialogContent';\nexport * from './useDialogContent';\nexport * from './useDialogContentStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogContent/index.js"],"sourcesContent":["export * from './DialogContent';\nexport * from './DialogContent.types';\nexport * from './renderDialogContent';\nexport * from './useDialogContent';\nexport * from './useDialogContentStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
|
@@ -79,6 +79,6 @@ const useDialogContentStyles_unstable = (state)=>{
|
|
|
79
79
|
const styles = useStyles();
|
|
80
80
|
state.root.className = (0, _react.mergeClasses)(dialogContentClassNames.root, styles.root, state.root.className);
|
|
81
81
|
return state;
|
|
82
|
-
}; //# sourceMappingURL=useDialogContentStyles.js.map
|
|
82
|
+
}; //# sourceMappingURL=useDialogContentStyles.styles.js.map
|
|
83
83
|
|
|
84
|
-
//# sourceMappingURL=useDialogContentStyles.js.map
|
|
84
|
+
//# sourceMappingURL=useDialogContentStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogContent/useDialogContentStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { CONTENT_GRID_AREA } from '../../contexts/constants';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const dialogContentClassNames = {\n root: 'fui-DialogContent'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Bmxbyg5: \"f5zp4f\",\n sshi5w: \"f1nxs5xn\",\n B7ck84d: \"f1ewtqcl\",\n z8tnut: \"fr4fn7s\",\n z189sj: [\"f171n1a0\", \"f1jwbs5a\"],\n Byoj8tv: \"f1ean75l\",\n uwmqm3: [\"f1jwbs5a\", \"f171n1a0\"],\n B6of3ja: \"fxlnl9e\",\n t21cq0: [\"ffs23cn\", \"f1v5tmjd\"],\n jrapky: \"f2uu7rc\",\n Frg6f3: [\"f1v5tmjd\", \"ffs23cn\"],\n Ijaq50: \"f6owso0\",\n Br312pm: \"fupswjn\",\n nk6f5a: \"foucsne\",\n Bw0ie65: \"f1ka72gx\",\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n }\n}, {\n d: [\".f5zp4f{overflow-y:auto;}\", \".f1nxs5xn{min-height:32px;}\", \".f1ewtqcl{box-sizing:border-box;}\", \".fr4fn7s{padding-top:var(--strokeWidthThick);}\", \".f171n1a0{padding-right:var(--strokeWidthThick);}\", \".f1jwbs5a{padding-left:var(--strokeWidthThick);}\", \".f1ean75l{padding-bottom:var(--strokeWidthThick);}\", \".fxlnl9e{margin-top:calc(var(--strokeWidthThick) * -1);}\", \".ffs23cn{margin-right:calc(var(--strokeWidthThick) * -1);}\", \".f1v5tmjd{margin-left:calc(var(--strokeWidthThick) * -1);}\", \".f2uu7rc{margin-bottom:calc(var(--strokeWidthThick) * -1);}\", \".f6owso0{grid-row-start:body;}\", \".fupswjn{grid-column-start:body;}\", \".foucsne{grid-row-end:body;}\", \".f1ka72gx{grid-column-end:body;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\"]\n});\n/**\n * Apply styling to the DialogContent slots based on the state\n */\nexport const useDialogContentStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogContentClassNames.root, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useDialogContentStyles.styles.js.map"],"names":["dialogContentClassNames","useDialogContentStyles_unstable","root","useStyles","__styles","Bmxbyg5","sshi5w","B7ck84d","z8tnut","z189sj","Byoj8tv","uwmqm3","B6of3ja","t21cq0","jrapky","Frg6f3","Ijaq50","Br312pm","nk6f5a","Bw0ie65","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAGaA,uBAAuB,MAAvBA;IAkCAC,+BAA+B,MAA/BA;;uBArCsC;AAG5C,MAAMD,0BAA0B;IACrCE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCF,MAAM;QACJG,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA6B;QAA+B;QAAqC;QAAkD;QAAqD;QAAoD;QAAsD;QAA4D;QAA8D;QAA8D;QAA+D;QAAkC;QAAqC;QAAgC;QAAoC;QAAgD;QAA+C;QAAmD;KAAmD;AAC/3B;AAIO,MAAMvB,kCAAkCwB,CAAAA,QAAS;IACtD,MAAMC,SAASvB;IACfsB,MAAMvB,IAAI,CAACyB,SAAS,GAAGC,IAAAA,mBAAY,EAAC5B,wBAAwBE,IAAI,EAAEwB,OAAOxB,IAAI,EAAEuB,MAAMvB,IAAI,CAACyB,SAAS;IACnG,OAAOF;AACT,GACA,yDAAyD"}
|
|
@@ -10,15 +10,14 @@ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildc
|
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
11
|
const _useDialogSurface = require("./useDialogSurface");
|
|
12
12
|
const _renderDialogSurface = require("./renderDialogSurface");
|
|
13
|
-
const
|
|
13
|
+
const _useDialogSurfaceStylesStyles = require("./useDialogSurfaceStyles.styles");
|
|
14
14
|
const _useDialogSurfaceContextValues = require("./useDialogSurfaceContextValues");
|
|
15
15
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
|
16
16
|
const DialogSurface = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
17
|
const state = (0, _useDialogSurface.useDialogSurface_unstable)(props, ref);
|
|
18
18
|
const contextValues = (0, _useDialogSurfaceContextValues.useDialogSurfaceContextValues_unstable)(state);
|
|
19
|
-
(0,
|
|
20
|
-
|
|
21
|
-
useCustomStyles(state);
|
|
19
|
+
(0, _useDialogSurfaceStylesStyles.useDialogSurfaceStyles_unstable)(state);
|
|
20
|
+
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useDialogSurfaceStyles_unstable')(state);
|
|
22
21
|
return (0, _renderDialogSurface.renderDialogSurface_unstable)(state, contextValues);
|
|
23
22
|
});
|
|
24
23
|
DialogSurface.displayName = 'DialogSurface'; //# sourceMappingURL=DialogSurface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogSurface/DialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles';\nimport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogSurface/DialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles.styles';\nimport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * DialogSurface component represents the visual part of a `Dialog` as a whole,\n * it contains everything that should be visible.\n */\nexport const DialogSurface = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useDialogSurface_unstable(props, ref);\n const contextValues = useDialogSurfaceContextValues_unstable(state);\n useDialogSurfaceStyles_unstable(state);\n useCustomStyleHook_unstable('useDialogSurfaceStyles_unstable')(state);\n return renderDialogSurface_unstable(state, contextValues);\n});\nDialogSurface.displayName = 'DialogSurface';\n//# sourceMappingURL=DialogSurface.js.map"],"names":["DialogSurface","React","forwardRef","props","ref","state","useDialogSurface_unstable","contextValues","useDialogSurfaceContextValues_unstable","useDialogSurfaceStyles_unstable","useCustomStyleHook_unstable","renderDialogSurface_unstable","displayName"],"mappings":";;;;+BAUaA;;aAAAA;;;6DAVU;kCACmB;qCACG;8CACG;+CACO;qCACX;AAKrC,MAAMA,gBAAgB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACzE,MAAMC,QAAQC,IAAAA,2CAAyB,EAACH,OAAOC;IAC/C,MAAMG,gBAAgBC,IAAAA,qEAAsC,EAACH;IAC7DI,IAAAA,6DAA+B,EAACJ;IAChCK,IAAAA,gDAA2B,EAAC,mCAAmCL;IAC/D,OAAOM,IAAAA,iDAA4B,EAACN,OAAOE;AAC7C;AACAP,cAAcY,WAAW,GAAG,iBAC5B,yCAAyC"}
|
|
@@ -7,7 +7,7 @@ _exportStar(require("./DialogSurface"), exports);
|
|
|
7
7
|
_exportStar(require("./DialogSurface.types"), exports);
|
|
8
8
|
_exportStar(require("./renderDialogSurface"), exports);
|
|
9
9
|
_exportStar(require("./useDialogSurface"), exports);
|
|
10
|
-
_exportStar(require("./useDialogSurfaceStyles"), exports);
|
|
10
|
+
_exportStar(require("./useDialogSurfaceStyles.styles"), exports);
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogSurface/index.js"],"sourcesContent":["export * from './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogSurface/index.js"],"sourcesContent":["export * from './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
|
@@ -11,11 +11,10 @@ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
|
11
11
|
const _reactUtilities = require("@fluentui/react-utilities");
|
|
12
12
|
const _contexts = require("../../contexts");
|
|
13
13
|
const _utils = require("../../utils");
|
|
14
|
-
const _reactTabster = require("@fluentui/react-tabster");
|
|
15
14
|
const useDialogSurface_unstable = (props, ref)=>{
|
|
16
15
|
const { backdrop , as } = props;
|
|
17
16
|
const modalType = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.modalType);
|
|
18
|
-
const
|
|
17
|
+
const modalAttributes = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.modalAttributes);
|
|
19
18
|
const dialogRef = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.dialogRef);
|
|
20
19
|
const open = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.open);
|
|
21
20
|
const requestOpenChange = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.requestOpenChange);
|
|
@@ -47,10 +46,6 @@ const useDialogSurface_unstable = (props, ref)=>{
|
|
|
47
46
|
event.stopPropagation();
|
|
48
47
|
}
|
|
49
48
|
});
|
|
50
|
-
const { modalAttributes } = (0, _reactTabster.useModalAttributes)({
|
|
51
|
-
trapFocus: modalType !== 'non-modal',
|
|
52
|
-
legacyTrapFocus: !inertTrapFocus
|
|
53
|
-
});
|
|
54
49
|
return {
|
|
55
50
|
components: {
|
|
56
51
|
backdrop: 'div',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogSurface/useDialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useEventCallback, useMergedRefs, isResolvedShorthand } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { isEscapeKeyDismiss } from '../../utils';\
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogSurface/useDialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useEventCallback, useMergedRefs, isResolvedShorthand } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { isEscapeKeyDismiss } from '../../utils';\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */\nexport const useDialogSurface_unstable = (props, ref) => {\n const {\n backdrop,\n as\n } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const modalAttributes = useDialogContext_unstable(ctx => ctx.modalAttributes);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n const handledBackdropClick = useEventCallback(event => {\n if (isResolvedShorthand(props.backdrop)) {\n var _props_backdrop, _props_backdrop_onClick;\n (_props_backdrop_onClick = (_props_backdrop = props.backdrop).onClick) === null || _props_backdrop_onClick === void 0 ? void 0 : _props_backdrop_onClick.call(_props_backdrop, event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick'\n });\n }\n });\n const handleKeyDown = useEventCallback(event => {\n var _props_onKeyDown;\n (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);\n if (isEscapeKeyDismiss(event, modalType)) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown'\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n return {\n components: {\n backdrop: 'div',\n root: 'div'\n },\n backdrop: resolveShorthand(backdrop, {\n required: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n onClick: handledBackdropClick\n }\n }),\n root: getNativeElementProps(as !== null && as !== void 0 ? as : 'div', {\n tabIndex: -1,\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef)\n })\n };\n};\n//# sourceMappingURL=useDialogSurface.js.map"],"names":["useDialogSurface_unstable","props","ref","backdrop","as","modalType","useDialogContext_unstable","ctx","modalAttributes","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","useEventCallback","event","isResolvedShorthand","_props_backdrop","_props_backdrop_onClick","onClick","call","isDefaultPrevented","type","handleKeyDown","_props_onKeyDown","onKeyDown","isEscapeKeyDismiss","stopPropagation","components","root","resolveShorthand","required","defaultProps","getNativeElementProps","tabIndex","role","undefined","useMergedRefs"],"mappings":";;;;+BAaaA;;aAAAA;;;6DAbU;gCACuF;0BACpE;uBACP;AAU5B,MAAMA,4BAA4B,CAACC,OAAOC,MAAQ;IACvD,MAAM,EACJC,SAAQ,EACRC,GAAE,EACH,GAAGH;IACJ,MAAMI,YAAYC,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAIF,SAAS;IAChE,MAAMG,kBAAkBF,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAIC,eAAe;IAC5E,MAAMC,YAAYH,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAIE,SAAS;IAChE,MAAMC,OAAOJ,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAIG,IAAI;IACtD,MAAMC,oBAAoBL,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAII,iBAAiB;IAChF,MA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Ac,UAAU,gBAAgB,QAAQ;YACtD,mBAAmBJ,KAAK,CAAC,aAAa,GAAGoC,YAAYzB,aAAa;YAClE,GAAGX,KAAK;YACR,GAAGO,eAAe;YAClBkB,WAAWF;YACXtB,KAAKoC,IAAAA,6BAAa,EAACpC,KAAKO;QAC1B;IACF;AACF,GACA,4CAA4C"}
|
|
@@ -311,6 +311,6 @@ const useDialogSurfaceStyles_unstable = (state)=>{
|
|
|
311
311
|
state.backdrop.className = (0, _react.mergeClasses)(dialogSurfaceClassNames.backdrop, styles.backdrop, isNestedDialog && styles.nestedDialogBackdrop, state.backdrop.className);
|
|
312
312
|
}
|
|
313
313
|
return state;
|
|
314
|
-
}; //# sourceMappingURL=useDialogSurfaceStyles.js.map
|
|
314
|
+
}; //# sourceMappingURL=useDialogSurfaceStyles.styles.js.map
|
|
315
315
|
|
|
316
|
-
//# sourceMappingURL=useDialogSurfaceStyles.js.map
|
|
316
|
+
//# sourceMappingURL=useDialogSurfaceStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogSurface/useDialogSurfaceStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { MEDIA_QUERY_BREAKPOINT_SELECTOR, SURFACE_BORDER_WIDTH, SURFACE_PADDING, useDialogContext_unstable } from '../../contexts';\nexport const dialogSurfaceClassNames = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n focusOutline: {\n Brovlpu: \"ftqa4ok\",\n B486eqv: \"f2hkw1w\",\n B8q5s1w: \"f8hki3x\",\n Bci5o5g: [\"f1d2448m\", \"ffh67wi\"],\n n8qw10: \"f1bjia2o\",\n Bdrgwmp: [\"ffh67wi\", \"f1d2448m\"],\n Bm4h7ae: \"f15bsgw9\",\n B7ys5i9: \"f14e48fq\",\n Busjfv9: \"f18yb2kv\",\n Bhk32uz: \"fd6o370\",\n Bf4ptjt: \"fh1cnn4\",\n kclons: [\"fy7oxxb\", \"f184ne2d\"],\n Bhdgwq3: \"fpukqih\",\n Blkhhs4: [\"f184ne2d\", \"fy7oxxb\"],\n Bqtpl0w: \"frrh606\",\n clg4pj: [\"f1v5zibi\", \"fo2hd23\"],\n hgwjuy: \"ful5kiu\",\n Bonggc9: [\"fo2hd23\", \"f1v5zibi\"],\n B1tsrr9: [\"f1jqcqds\", \"ftffrms\"],\n Dah5zi: [\"ftffrms\", \"f1jqcqds\"],\n Bkh64rk: [\"f2e7qr6\", \"fsr1zz6\"],\n qqdqy8: [\"fsr1zz6\", \"f2e7qr6\"],\n B6dhp37: \"f1dvezut\",\n i03rao: [\"fd0oaoj\", \"f1cwg4i8\"],\n Boxcth7: \"fjvm52t\",\n Bsom6fd: [\"f1cwg4i8\", \"fd0oaoj\"],\n J0r882: \"fdiulkx\",\n Bjwuhne: \"f1yalx80\",\n Ghsupd: [\"fq22d5a\", \"f1jw7pan\"],\n Bule8hv: [\"f1jw7pan\", \"fq22d5a\"]\n },\n root: {\n mc9l5x: \"ftgm304\",\n famaaq: \"f1c515w\",\n Bcdw1i0: \"f1bitti\",\n Bhzewxz: \"f15twtuk\",\n j35jbq: [\"f1e31b4d\", \"f1vgc2s3\"],\n B5kzvoi: \"f1yab3r1\",\n oyh7mz: [\"f1vgc2s3\", \"f1e31b4d\"],\n z8tnut: \"fuq56rw\",\n z189sj: [\"f15kemlc\", \"fdgang7\"],\n Byoj8tv: \"fl2zwns\",\n uwmqm3: [\"fdgang7\", \"f15kemlc\"],\n B6of3ja: \"fgr6219\",\n t21cq0: [\"f1ujusj6\", \"fcgxt0o\"],\n jrapky: \"f10jk5vf\",\n Frg6f3: [\"fcgxt0o\", \"f1ujusj6\"],\n icvyot: \"fzkkow9\",\n vrafjx: [\"fcdblym\", \"fjik90z\"],\n oivjwe: \"fg706s2\",\n wvpqe5: [\"fjik90z\", \"fcdblym\"],\n B68tc82: \"f1ln0qer\",\n Bmxbyg5: \"fa2wlxz\",\n fshzfu: \"f120kxnn\",\n qhf8xq: \"f19dog8a\",\n Bqenvij: \"f3052tw\",\n B2u0y6b: \"fvgz9i8\",\n Bxyxcbc: \"f6a9g1z\",\n B7ck84d: \"f1ewtqcl\",\n E5pizo: \"f10nrhrw\",\n De3pzq: \"fxugw4r\",\n sj55zd: \"f19n0e5\",\n B4j52fo: \"f5ogflp\",\n Bekrc4i: [\"f1hqa2wf\", \"finvdd3\"],\n Bn0qgzm: \"f1f09k3d\",\n ibv6hh: [\"finvdd3\", \"f1hqa2wf\"],\n g2u3we: \"fghlq4f\",\n h3c5rm: [\"f1gn591s\", \"fjscplz\"],\n B9xav0g: \"fb073pr\",\n zhjwy3: [\"fjscplz\", \"f1gn591s\"],\n Bbmb7ep: [\"fnivh3a\", \"fc7yr5o\"],\n Beyfa6y: [\"fc7yr5o\", \"fnivh3a\"],\n B7oj6ja: [\"f1el4m67\", \"f8yange\"],\n Btl43ni: [\"f8yange\", \"f1el4m67\"],\n B5xtmjs: \"ff54dml\"\n },\n backdrop: {\n qhf8xq: \"f19dog8a\",\n De3pzq: \"fju19wo\",\n Bhzewxz: \"f113wtx2\",\n j35jbq: [\"f10k790i\", \"f1xynx9j\"],\n B5kzvoi: \"f5gq2j6\",\n oyh7mz: [\"f1xynx9j\", \"f10k790i\"]\n },\n nestedDialogBackdrop: {\n De3pzq: \"f3rmtva\"\n },\n nestedNativeDialogBackdrop: {\n fshzfu: \"foe20jx\"\n }\n}, {\n f: [\".ftqa4ok:focus{outline-style:none;}\"],\n i: [\".f2hkw1w:focus-visible{outline-style:none;}\"],\n d: [\".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}\", \".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}\", \".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}\", \".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}\", \".f15bsgw9[data-fui-focus-visible]::after{content:\\\"\\\";}\", \".f14e48fq[data-fui-focus-visible]::after{position:absolute;}\", \".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}\", \".fd6o370[data-fui-focus-visible]::after{z-index:1;}\", \".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}\", \".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}\", \".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}\", \".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}\", \".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}\", \".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}\", \".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}\", \".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}\", \".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}\", \".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}\", \".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}\", \".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}\", \".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}\", \".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}\", \".fdiulkx[data-fui-focus-visible]::after{top:-2px;}\", \".f1yalx80[data-fui-focus-visible]::after{bottom:-2px;}\", \".fq22d5a[data-fui-focus-visible]::after{left:-2px;}\", \".f1jw7pan[data-fui-focus-visible]::after{right:-2px;}\", \".ftgm304{display:block;}\", \".f1c515w{-webkit-user-select:unset;-moz-user-select:unset;-ms-user-select:unset;user-select:unset;}\", \".f1bitti{visibility:unset;}\", \".f15twtuk{top:0;}\", \".f1e31b4d{right:0;}\", \".f1vgc2s3{left:0;}\", \".f1yab3r1{bottom:0;}\", \".fuq56rw{padding-top:24px;}\", \".f15kemlc{padding-right:24px;}\", \".fdgang7{padding-left:24px;}\", \".fl2zwns{padding-bottom:24px;}\", \".fgr6219{margin-top:auto;}\", \".f1ujusj6{margin-right:auto;}\", \".fcgxt0o{margin-left:auto;}\", \".f10jk5vf{margin-bottom:auto;}\", \".fzkkow9{border-top-style:solid;}\", \".fcdblym{border-right-style:solid;}\", \".fjik90z{border-left-style:solid;}\", \".fg706s2{border-bottom-style:solid;}\", \".f1ln0qer{overflow-x:unset;}\", \".fa2wlxz{overflow-y:unset;}\", \".f120kxnn::backdrop{background-color:rgba(0, 0, 0, 0.4);}\", \".f19dog8a{position:fixed;}\", \".f3052tw{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;}\", \".fvgz9i8{max-width:600px;}\", \".f6a9g1z{max-height:100vh;}\", \".f1ewtqcl{box-sizing:border-box;}\", \".f10nrhrw{box-shadow:var(--shadow64);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".f5ogflp{border-top-width:1px;}\", \".f1hqa2wf{border-right-width:1px;}\", \".finvdd3{border-left-width:1px;}\", \".f1f09k3d{border-bottom-width:1px;}\", \".fghlq4f{border-top-color:var(--colorTransparentStroke);}\", \".f1gn591s{border-right-color:var(--colorTransparentStroke);}\", \".fjscplz{border-left-color:var(--colorTransparentStroke);}\", \".fb073pr{border-bottom-color:var(--colorTransparentStroke);}\", \".fnivh3a{border-bottom-right-radius:var(--borderRadiusXLarge);}\", \".fc7yr5o{border-bottom-left-radius:var(--borderRadiusXLarge);}\", \".f1el4m67{border-top-right-radius:var(--borderRadiusXLarge);}\", \".f8yange{border-top-left-radius:var(--borderRadiusXLarge);}\", \".fju19wo{background-color:rgba(0, 0, 0, 0.4);}\", \".f113wtx2{top:0px;}\", \".f10k790i{right:0px;}\", \".f1xynx9j{left:0px;}\", \".f5gq2j6{bottom:0px;}\", \".f3rmtva{background-color:transparent;}\", \".foe20jx::backdrop{background-color:transparent;}\"],\n m: [[\"@media screen and (max-width: 480px){.ff54dml{max-width:100vw;}}\", {\n m: \"screen and (max-width: 480px)\"\n }]]\n});\n/**\n * Apply styling to the DialogSurface slots based on the state\n */\nexport const useDialogSurfaceStyles_unstable = state => {\n const styles = useStyles();\n const isNestedDialog = useDialogContext_unstable(ctx => ctx.isNestedDialog);\n state.root.className = mergeClasses(dialogSurfaceClassNames.root, styles.root, styles.focusOutline, isNestedDialog && styles.nestedNativeDialogBackdrop, state.root.className);\n if (state.backdrop) {\n state.backdrop.className = mergeClasses(dialogSurfaceClassNames.backdrop, styles.backdrop, isNestedDialog && styles.nestedDialogBackdrop, state.backdrop.className);\n }\n return state;\n};\n//# sourceMappingURL=useDialogSurfaceStyles.styles.js.map"],"names":["dialogSurfaceClassNames","useDialogSurfaceStyles_unstable","root","backdrop","useStyles","__styles","focusOutline","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bjwuhne","Ghsupd","Bule8hv","mc9l5x","famaaq","Bcdw1i0","Bhzewxz","j35jbq","B5kzvoi","oyh7mz","z8tnut","z189sj","Byoj8tv","uwmqm3","B6of3ja","t21cq0","jrapky","Frg6f3","icvyot","vrafjx","oivjwe","wvpqe5","B68tc82","Bmxbyg5","fshzfu","qhf8xq","Bqenvij","B2u0y6b","Bxyxcbc","B7ck84d","E5pizo","De3pzq","sj55zd","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B5xtmjs","nestedDialogBackdrop","nestedNativeDialogBackdrop","f","i","d","m","state","styles","isNestedDialog","useDialogContext_unstable","ctx","className","mergeClasses"],"mappings":";;;;;;;;;;;IAIaA,uBAAuB,MAAvBA;IA8GAC,+BAA+B,MAA/BA;;uBAlHsC;0BAG+D;AAC3G,MAAMD,0BAA0B;IACrCE,MAAM;IACNC,UAAU;AACZ;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,cAAc;QACZC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,QAAQ;QACRC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,QAAQ;QACRC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;YAAC;YAAY;SAAU;QAChCC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;YAAC;YAAW;SAAU;QAC/BC,QAAQ;YAAC;YAAW;SAAU;QAC9BC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,QAAQ;QACRC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;YAAC;YAAY;SAAU;IAClC;IACAlC,MAAM;QACJmC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;QACTC,QAAQ;YAAC;YAAW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C;QAA8B;QAAiC;QAA+B;QAAkC;QAAqC;QAAuC;QAAsC;QAAwC;QAAgC;QAA+B;QAA6D;QAA8B;QAAoF;QAA8B;QAA+B;QAAqC;QAA0C;QAA8D;QAAmD;QAAmC;QAAsC;QAAoC;QAAuC;QAA6D;QAAgE;QAA8D;QAAgE;QAAmE;QAAkE;QAAiE;QAA+D;QAAkD;QAAuB;QAAyB;QAAwB;QAAyB;QAA2C;KAAoD;IACjgIC,GAAG;QAAC;YAAC;YAAoE;gBACvEA,GAAG;YACL;SAAE;KAAC;AACL;AAIO,MAAMpF,kCAAkCqF,CAAAA,QAAS;IACtD,MAAMC,SAASnF;IACf,MAAMoF,iBAAiBC,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAIF,cAAc;IAC1EF,MAAMpF,IAAI,CAACyF,SAAS,GAAGC,IAAAA,mBAAY,EAAC5F,wBAAwBE,IAAI,EAAEqF,OAAOrF,IAAI,EAAEqF,OAAOjF,YAAY,EAAEkF,kBAAkBD,OAAON,0BAA0B,EAAEK,MAAMpF,IAAI,CAACyF,SAAS;IAC7K,IAAIL,MAAMnF,QAAQ,EAAE;QAClBmF,MAAMnF,QAAQ,CAACwF,SAAS,GAAGC,IAAAA,mBAAY,EAAC5F,wBAAwBG,QAAQ,EAAEoF,OAAOpF,QAAQ,EAAEqF,kBAAkBD,OAAOP,oBAAoB,EAAEM,MAAMnF,QAAQ,CAACwF,SAAS;IACpK,CAAC;IACD,OAAOL;AACT,GACA,yDAAyD"}
|
|
@@ -10,13 +10,12 @@ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildc
|
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
11
|
const _useDialogTitle = require("./useDialogTitle");
|
|
12
12
|
const _renderDialogTitle = require("./renderDialogTitle");
|
|
13
|
-
const
|
|
13
|
+
const _useDialogTitleStylesStyles = require("./useDialogTitleStyles.styles");
|
|
14
14
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
|
15
15
|
const DialogTitle = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
16
16
|
const state = (0, _useDialogTitle.useDialogTitle_unstable)(props, ref);
|
|
17
|
-
(0,
|
|
18
|
-
|
|
19
|
-
useCustomStyles(state);
|
|
17
|
+
(0, _useDialogTitleStylesStyles.useDialogTitleStyles_unstable)(state);
|
|
18
|
+
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useDialogTitleStyles_unstable')(state);
|
|
20
19
|
return (0, _renderDialogTitle.renderDialogTitle_unstable)(state);
|
|
21
20
|
});
|
|
22
21
|
DialogTitle.displayName = 'DialogTitle'; //# sourceMappingURL=DialogTitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogTitle/DialogTitle.js"],"sourcesContent":["import * as React from 'react';\nimport { useDialogTitle_unstable } from './useDialogTitle';\nimport { renderDialogTitle_unstable } from './renderDialogTitle';\nimport { useDialogTitleStyles_unstable } from './useDialogTitleStyles';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogTitle/DialogTitle.js"],"sourcesContent":["import * as React from 'react';\nimport { useDialogTitle_unstable } from './useDialogTitle';\nimport { renderDialogTitle_unstable } from './renderDialogTitle';\nimport { useDialogTitleStyles_unstable } from './useDialogTitleStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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 = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useDialogTitle_unstable(props, ref);\n useDialogTitleStyles_unstable(state);\n useCustomStyleHook_unstable('useDialogTitleStyles_unstable')(state);\n return renderDialogTitle_unstable(state);\n});\nDialogTitle.displayName = 'DialogTitle';\n//# sourceMappingURL=DialogTitle.js.map"],"names":["DialogTitle","React","forwardRef","props","ref","state","useDialogTitle_unstable","useDialogTitleStyles_unstable","useCustomStyleHook_unstable","renderDialogTitle_unstable","displayName"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;gCACiB;mCACG;4CACG;qCACF;AAKrC,MAAMA,cAAc,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACvE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,yDAA6B,EAACF;IAC9BG,IAAAA,gDAA2B,EAAC,iCAAiCH;IAC7D,OAAOI,IAAAA,6CAA0B,EAACJ;AACpC;AACAL,YAAYU,WAAW,GAAG,eAC1B,uCAAuC"}
|
|
@@ -7,7 +7,7 @@ _exportStar(require("./DialogTitle"), exports);
|
|
|
7
7
|
_exportStar(require("./DialogTitle.types"), exports);
|
|
8
8
|
_exportStar(require("./renderDialogTitle"), exports);
|
|
9
9
|
_exportStar(require("./useDialogTitle"), exports);
|
|
10
|
-
_exportStar(require("./useDialogTitleStyles"), exports);
|
|
10
|
+
_exportStar(require("./useDialogTitleStyles.styles"), exports);
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogTitle/index.js"],"sourcesContent":["export * from './DialogTitle';\nexport * from './DialogTitle.types';\nexport * from './renderDialogTitle';\nexport * from './useDialogTitle';\nexport * from './useDialogTitleStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogTitle/index.js"],"sourcesContent":["export * from './DialogTitle';\nexport * from './DialogTitle.types';\nexport * from './renderDialogTitle';\nexport * from './useDialogTitle';\nexport * from './useDialogTitleStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
|
@@ -12,17 +12,17 @@ const _reactUtilities = require("@fluentui/react-utilities");
|
|
|
12
12
|
const _dialogContext = require("../../contexts/dialogContext");
|
|
13
13
|
const _reactIcons = require("@fluentui/react-icons");
|
|
14
14
|
const _dialogTrigger = require("../DialogTrigger/DialogTrigger");
|
|
15
|
-
const
|
|
15
|
+
const _useDialogTitleStylesStyles = require("./useDialogTitleStyles.styles");
|
|
16
16
|
const useDialogTitle_unstable = (props, ref)=>{
|
|
17
17
|
const { as , action } = props;
|
|
18
18
|
const modalType = (0, _dialogContext.useDialogContext_unstable)((ctx)=>ctx.modalType);
|
|
19
|
-
const internalStyles = (0,
|
|
19
|
+
const internalStyles = (0, _useDialogTitleStylesStyles.useDialogTitleInternalStyles)();
|
|
20
20
|
return {
|
|
21
21
|
components: {
|
|
22
|
-
root: '
|
|
22
|
+
root: 'h2',
|
|
23
23
|
action: 'div'
|
|
24
24
|
},
|
|
25
|
-
root: (0, _reactUtilities.getNativeElementProps)(as !== null && as !== void 0 ? as : '
|
|
25
|
+
root: (0, _reactUtilities.getNativeElementProps)(as !== null && as !== void 0 ? as : 'h2', {
|
|
26
26
|
ref,
|
|
27
27
|
id: (0, _dialogContext.useDialogContext_unstable)((ctx)=>ctx.dialogTitleId),
|
|
28
28
|
...props
|
|
@@ -38,7 +38,7 @@ const useDialogTitle_unstable = (props, ref)=>{
|
|
|
38
38
|
className: internalStyles.button,
|
|
39
39
|
// TODO: find a better way to add internal labels
|
|
40
40
|
"aria-label": "close"
|
|
41
|
-
}, /*#__PURE__*/ _react.createElement(_reactIcons.
|
|
41
|
+
}, /*#__PURE__*/ _react.createElement(_reactIcons.Dismiss20Regular, null)))
|
|
42
42
|
}
|
|
43
43
|
})
|
|
44
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogTitle/useDialogTitle.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '../../contexts/dialogContext';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogTitle/useDialogTitle.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '../../contexts/dialogContext';\nimport { Dismiss20Regular } from '@fluentui/react-icons';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { DialogTrigger } from '../DialogTrigger/DialogTrigger';\nimport { useDialogTitleInternalStyles } from './useDialogTitleStyles.styles';\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, ref) => {\n const {\n as,\n action\n } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const internalStyles = useDialogTitleInternalStyles();\n return {\n components: {\n root: 'h2',\n action: 'div'\n },\n root: getNativeElementProps(as !== null && as !== void 0 ? as : 'h2', {\n ref,\n id: useDialogContext_unstable(ctx => ctx.dialogTitleId),\n ...props\n }),\n action: resolveShorthand(action, {\n required: modalType === 'non-modal',\n defaultProps: {\n children: /*#__PURE__*/React.createElement(DialogTrigger, {\n disableButtonEnhancement: true,\n action: \"close\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: internalStyles.button,\n // TODO: find a better way to add internal labels\n \"aria-label\": \"close\"\n }, /*#__PURE__*/React.createElement(Dismiss20Regular, null)))\n }\n })\n };\n};\n//# sourceMappingURL=useDialogTitle.js.map"],"names":["useDialogTitle_unstable","props","ref","as","action","modalType","useDialogContext_unstable","ctx","internalStyles","useDialogTitleInternalStyles","components","root","getNativeElementProps","id","dialogTitleId","resolveShorthand","required","defaultProps","children","React","createElement","DialogTrigger","disableButtonEnhancement","type","className","button","Dismiss20Regular"],"mappings":";;;;+BAgBaA;;aAAAA;;;6DAhBU;gCACe;+BACI;4BACT;+BAEH;4CACe;AAUtC,MAAMA,0BAA0B,CAACC,OAAOC,MAAQ;IACrD,MAAM,EACJC,GAAE,EACFC,OAAM,EACP,GAAGH;IACJ,MAAMI,YAAYC,IAAAA,wCAAyB,EAACC,CAAAA,MAAOA,IAAIF,SAAS;IAChE,MAAMG,iBAAiBC,IAAAA,wDAA4B;IACnD,OAAO;QACLC,YAAY;YACVC,MAAM;YACNP,QAAQ;QACV;QACAO,MAAMC,IAAAA,qCAAqB,EAACT,OAAO,IAAI,IAAIA,OAAO,KAAK,IAAIA,KAAK,IAAI,EAAE;YACpED;YACAW,IAAIP,IAAAA,wCAAyB,EAACC,CAAAA,MAAOA,IAAIO,aAAa;YACtD,GAAGb,KAAK;QACV;QACAG,QAAQW,IAAAA,gCAAgB,EAACX,QAAQ;YAC/BY,UAAUX,cAAc;YACxBY,cAAc;gBACZC,UAAU,WAAW,GAAEC,OAAMC,aAAa,CAACC,4BAAa,EAAE;oBACxDC,0BAA0B,IAAI;oBAC9BlB,QAAQ;gBACV,GAAG,WAAW,GAAEe,OAAMC,aAAa,CAAC,UAAU;oBAC5CG,MAAM;oBACNC,WAAWhB,eAAeiB,MAAM;oBAChC,iDAAiD;oBACjD,cAAc;gBAChB,GAAG,WAAW,GAAEN,OAAMC,aAAa,CAACM,4BAAgB,EAAE,IAAI;YAC5D;QACF;IACF;AACF,GACA,0CAA0C"}
|
|
@@ -29,7 +29,17 @@ const dialogTitleClassNames = {
|
|
|
29
29
|
Ijaq50: "faq1aip",
|
|
30
30
|
Br312pm: "f1m489tg",
|
|
31
31
|
nk6f5a: "fv2srd9",
|
|
32
|
-
Bw0ie65: "f1tz6hh8"
|
|
32
|
+
Bw0ie65: "f1tz6hh8",
|
|
33
|
+
B6of3ja: "f1hu3pq6",
|
|
34
|
+
t21cq0: [
|
|
35
|
+
"f11qmguv",
|
|
36
|
+
"f1tyq0we"
|
|
37
|
+
],
|
|
38
|
+
jrapky: "f19f4twv",
|
|
39
|
+
Frg6f3: [
|
|
40
|
+
"f1tyq0we",
|
|
41
|
+
"f11qmguv"
|
|
42
|
+
]
|
|
33
43
|
},
|
|
34
44
|
rootWithoutCloseButton: {
|
|
35
45
|
Ijaq50: "faq1aip",
|
|
@@ -53,6 +63,10 @@ const dialogTitleClassNames = {
|
|
|
53
63
|
".f1m489tg{grid-column-start:title;}",
|
|
54
64
|
".fv2srd9{grid-row-end:title;}",
|
|
55
65
|
".f1tz6hh8{grid-column-end:title;}",
|
|
66
|
+
".f1hu3pq6{margin-top:0;}",
|
|
67
|
+
".f11qmguv{margin-right:0;}",
|
|
68
|
+
".f1tyq0we{margin-left:0;}",
|
|
69
|
+
".f19f4twv{margin-bottom:0;}",
|
|
56
70
|
".f11nczdl{grid-row-end:close-button;}",
|
|
57
71
|
".f98d4vj{grid-column-end:close-button;}",
|
|
58
72
|
".f1hysmiz{grid-row-start:close-button;}",
|
|
@@ -231,6 +245,6 @@ const useDialogTitleStyles_unstable = (state)=>{
|
|
|
231
245
|
state.action.className = (0, _react.mergeClasses)(dialogTitleClassNames.action, styles.action, state.action.className);
|
|
232
246
|
}
|
|
233
247
|
return state;
|
|
234
|
-
}; //# sourceMappingURL=useDialogTitleStyles.js.map
|
|
248
|
+
}; //# sourceMappingURL=useDialogTitleStyles.styles.js.map
|
|
235
249
|
|
|
236
|
-
//# sourceMappingURL=useDialogTitleStyles.js.map
|
|
250
|
+
//# sourceMappingURL=useDialogTitleStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogTitle/useDialogTitleStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport { TITLE_ACTION_GRID_AREA, TITLE_GRID_AREA } from '../../contexts/constants';\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 */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"f1pp30po\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"f106mvju\",\n Ijaq50: \"faq1aip\",\n Br312pm: \"f1m489tg\",\n nk6f5a: \"fv2srd9\",\n Bw0ie65: \"f1tz6hh8\",\n B6of3ja: \"f1hu3pq6\",\n t21cq0: [\"f11qmguv\", \"f1tyq0we\"],\n jrapky: \"f19f4twv\",\n Frg6f3: [\"f1tyq0we\", \"f11qmguv\"]\n },\n rootWithoutCloseButton: {\n Ijaq50: \"faq1aip\",\n Br312pm: \"f1m489tg\",\n nk6f5a: \"f11nczdl\",\n Bw0ie65: \"f98d4vj\"\n },\n action: {\n Ijaq50: \"f1hysmiz\",\n Br312pm: \"f1379kmu\",\n nk6f5a: \"f11nczdl\",\n Bw0ie65: \"f98d4vj\"\n }\n}, {\n d: [\".fk6fouc{font-family:var(--fontFamilyBase);}\", \".f1pp30po{font-size:var(--fontSizeBase500);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\", \".f106mvju{line-height:var(--lineHeightBase500);}\", \".faq1aip{grid-row-start:title;}\", \".f1m489tg{grid-column-start:title;}\", \".fv2srd9{grid-row-end:title;}\", \".f1tz6hh8{grid-column-end:title;}\", \".f1hu3pq6{margin-top:0;}\", \".f11qmguv{margin-right:0;}\", \".f1tyq0we{margin-left:0;}\", \".f19f4twv{margin-bottom:0;}\", \".f11nczdl{grid-row-end:close-button;}\", \".f98d4vj{grid-column-end:close-button;}\", \".f1hysmiz{grid-row-start:close-button;}\", \".f1379kmu{grid-column-start:close-button;}\"]\n});\n/**\n * Styles to be applied on internal elements used by default action on non-modal Dialog\n * @internal\n */\nexport const useDialogTitleInternalStyles = /*#__PURE__*/__styles({\n button: {\n qhf8xq: \"f10pi13n\",\n B7ck84d: \"f1e4lqlz\",\n De3pzq: \"f1u2r49w\",\n sj55zd: \"f1ym3bx4\",\n Bahqtrf: \"f1mo0ibp\",\n Be2twd7: \"fjoy568\",\n Bceei9c: \"f1k6fduh\",\n Bg96gwp: \"fez10in\",\n B68tc82: \"f1mtd64y\",\n Bmxbyg5: \"f1y7q3j9\",\n z8tnut: \"f1g0x7ka\",\n z189sj: [\"fhxju0i\", \"f1cnd47f\"],\n Byoj8tv: \"f1qch9an\",\n uwmqm3: [\"f1cnd47f\", \"fhxju0i\"],\n icvyot: \"f1ern45e\",\n vrafjx: [\"f1n71otn\", \"f1deefiw\"],\n oivjwe: \"f1h8hb77\",\n wvpqe5: [\"f1deefiw\", \"f1n71otn\"],\n Bv0vk6g: \"f37px4s\",\n fsow6f: \"fgusgyc\",\n Brovlpu: \"ftqa4ok\",\n B486eqv: \"f2hkw1w\",\n B8q5s1w: \"f8hki3x\",\n Bci5o5g: [\"f1d2448m\", \"ffh67wi\"],\n n8qw10: \"f1bjia2o\",\n Bdrgwmp: [\"ffh67wi\", \"f1d2448m\"],\n Bm4h7ae: \"f15bsgw9\",\n B7ys5i9: \"f14e48fq\",\n Busjfv9: \"f18yb2kv\",\n Bhk32uz: \"fd6o370\",\n Bf4ptjt: \"fh1cnn4\",\n kclons: [\"fy7oxxb\", \"f184ne2d\"],\n Bhdgwq3: \"fpukqih\",\n Blkhhs4: [\"f184ne2d\", \"fy7oxxb\"],\n Bqtpl0w: \"frrh606\",\n clg4pj: [\"f1v5zibi\", \"fo2hd23\"],\n hgwjuy: \"ful5kiu\",\n Bonggc9: [\"fo2hd23\", \"f1v5zibi\"],\n B1tsrr9: [\"f1jqcqds\", \"ftffrms\"],\n Dah5zi: [\"ftffrms\", \"f1jqcqds\"],\n Bkh64rk: [\"f2e7qr6\", \"fsr1zz6\"],\n qqdqy8: [\"fsr1zz6\", \"f2e7qr6\"],\n B6dhp37: \"f1dvezut\",\n i03rao: [\"fd0oaoj\", \"f1cwg4i8\"],\n Boxcth7: \"fjvm52t\",\n Bsom6fd: [\"f1cwg4i8\", \"fd0oaoj\"],\n J0r882: \"fdiulkx\",\n Bjwuhne: \"f1yalx80\",\n Ghsupd: [\"fq22d5a\", \"f1jw7pan\"],\n Bule8hv: [\"f1jw7pan\", \"fq22d5a\"]\n }\n}, {\n d: [\".f10pi13n{position:relative;}\", \".f1e4lqlz{box-sizing:content-box;}\", \".f1u2r49w{background-color:inherit;}\", \".f1ym3bx4{color:inherit;}\", \".f1mo0ibp{font-family:inherit;}\", \".fjoy568{font-size:inherit;}\", \".f1k6fduh{cursor:pointer;}\", \".fez10in{line-height:0;}\", \".f1mtd64y{overflow-x:visible;}\", \".f1y7q3j9{overflow-y:visible;}\", \".f1g0x7ka{padding-top:0;}\", \".fhxju0i{padding-right:0;}\", \".f1cnd47f{padding-left:0;}\", \".f1qch9an{padding-bottom:0;}\", \".f1ern45e{border-top-style:none;}\", \".f1n71otn{border-right-style:none;}\", \".f1deefiw{border-left-style:none;}\", \".f1h8hb77{border-bottom-style:none;}\", \".f37px4s{-webkit-appearance:button;}\", \".fgusgyc{text-align:unset;}\", \".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}\", \".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}\", \".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}\", \".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}\", \".f15bsgw9[data-fui-focus-visible]::after{content:\\\"\\\";}\", \".f14e48fq[data-fui-focus-visible]::after{position:absolute;}\", \".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}\", \".fd6o370[data-fui-focus-visible]::after{z-index:1;}\", \".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}\", \".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}\", \".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}\", \".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}\", \".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}\", \".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}\", \".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}\", \".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}\", \".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}\", \".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}\", \".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}\", \".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}\", \".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}\", \".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}\", \".fdiulkx[data-fui-focus-visible]::after{top:-2px;}\", \".f1yalx80[data-fui-focus-visible]::after{bottom:-2px;}\", \".fq22d5a[data-fui-focus-visible]::after{left:-2px;}\", \".f1jw7pan[data-fui-focus-visible]::after{right:-2px;}\"],\n f: [\".ftqa4ok:focus{outline-style:none;}\"],\n i: [\".f2hkw1w:focus-visible{outline-style:none;}\"]\n});\n/**\n * Apply styling to the DialogTitle slots based on the state\n */\nexport const useDialogTitleStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogTitleClassNames.root, styles.root, !state.action && styles.rootWithoutCloseButton, state.root.className);\n if (state.action) {\n state.action.className = mergeClasses(dialogTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n//# sourceMappingURL=useDialogTitleStyles.styles.js.map"],"names":["dialogTitleClassNames","useDialogTitleInternalStyles","useDialogTitleStyles_unstable","root","action","useStyles","__styles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","Ijaq50","Br312pm","nk6f5a","Bw0ie65","B6of3ja","t21cq0","jrapky","Frg6f3","rootWithoutCloseButton","d","button","qhf8xq","B7ck84d","De3pzq","sj55zd","Bceei9c","B68tc82","Bmxbyg5","z8tnut","z189sj","Byoj8tv","uwmqm3","icvyot","vrafjx","oivjwe","wvpqe5","Bv0vk6g","fsow6f","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bjwuhne","Ghsupd","Bule8hv","f","i","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAIaA,qBAAqB,MAArBA;IAyCAC,4BAA4B,MAA5BA;IA6DAC,6BAA6B,MAA7BA;;uBA1GsC;AAI5C,MAAMF,wBAAwB;IACnCG,MAAM;IACNC,QAAQ;AACV;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCH,MAAM;QACJI,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;IAClC;IACAC,wBAAwB;QACtBR,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;IACX;IACAV,QAAQ;QACNO,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;IACX;AACF,GAAG;IACDM,GAAG;QAAC;QAAgD;QAAgD;QAAoD;QAAoD;QAAmC;QAAuC;QAAiC;QAAqC;QAA4B;QAA8B;QAA6B;QAA+B;QAAyC;QAA2C;QAA2C;KAA6C;AAChoB;AAKO,MAAMnB,+BAA+B,WAAW,GAAEK,IAAAA,kBAAQ,EAAC;IAChEe,QAAQ;QACNC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACR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;QAAiG;QAA+F;QAA8F;QAAwF;QAAyF;QAAyF;QAA0F;QAAsD;QAA0D;QAAuD;KAAwD;IAC7pFiD,GAAG;QAAC;KAAsC;IAC1CC,GAAG;QAAC;KAA8C;AACpD;AAIO,MAAMpE,gCAAgCqE,CAAAA,QAAS;IACpD,MAAMC,SAASnE;IACfkE,MAAMpE,IAAI,CAACsE,SAAS,GAAGC,IAAAA,mBAAY,EAAC1E,sBAAsBG,IAAI,EAAEqE,OAAOrE,IAAI,EAAE,CAACoE,MAAMnE,MAAM,IAAIoE,OAAOrD,sBAAsB,EAAEoD,MAAMpE,IAAI,CAACsE,SAAS;IACjJ,IAAIF,MAAMnE,MAAM,EAAE;QAChBmE,MAAMnE,MAAM,CAACqE,SAAS,GAAGC,IAAAA,mBAAY,EAAC1E,sBAAsBI,MAAM,EAAEoE,OAAOpE,MAAM,EAAEmE,MAAMnE,MAAM,CAACqE,SAAS;IAC3G,CAAC;IACD,OAAOF;AACT,GACA,uDAAuD"}
|
|
@@ -8,10 +8,10 @@ Object.defineProperty(exports, "DialogTrigger", {
|
|
|
8
8
|
});
|
|
9
9
|
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
|
-
const
|
|
11
|
+
const _useDialogTriggerStyles = require("./useDialogTrigger.styles");
|
|
12
12
|
const _renderDialogTrigger = require("./renderDialogTrigger");
|
|
13
13
|
const DialogTrigger = (props)=>{
|
|
14
|
-
const state = (0,
|
|
14
|
+
const state = (0, _useDialogTriggerStyles.useDialogTrigger_unstable)(props);
|
|
15
15
|
return (0, _renderDialogTrigger.renderDialogTrigger_unstable)(state);
|
|
16
16
|
};
|
|
17
17
|
DialogTrigger.displayName = 'DialogTrigger';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogTrigger/DialogTrigger.js"],"sourcesContent":["import * as React from 'react';\nimport { useDialogTrigger_unstable } from './useDialogTrigger';\nimport { renderDialogTrigger_unstable } from './renderDialogTrigger';\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 = props => {\n const state = useDialogTrigger_unstable(props);\n return renderDialogTrigger_unstable(state);\n};\nDialogTrigger.displayName = 'DialogTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\nDialogTrigger.isFluentTriggerComponent = true;\n//# sourceMappingURL=DialogTrigger.js.map"],"names":["DialogTrigger","props","state","useDialogTrigger_unstable","renderDialogTrigger_unstable","displayName","isFluentTriggerComponent"],"mappings":";;;;+BAYaA;;aAAAA;;;6DAZU;
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogTrigger/DialogTrigger.js"],"sourcesContent":["import * as React from 'react';\nimport { useDialogTrigger_unstable } from './useDialogTrigger.styles';\nimport { renderDialogTrigger_unstable } from './renderDialogTrigger';\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 = props => {\n const state = useDialogTrigger_unstable(props);\n return renderDialogTrigger_unstable(state);\n};\nDialogTrigger.displayName = 'DialogTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\nDialogTrigger.isFluentTriggerComponent = true;\n//# sourceMappingURL=DialogTrigger.js.map"],"names":["DialogTrigger","props","state","useDialogTrigger_unstable","renderDialogTrigger_unstable","displayName","isFluentTriggerComponent"],"mappings":";;;;+BAYaA;;aAAAA;;;6DAZU;wCACmB;qCACG;AAUtC,MAAMA,gBAAgBC,CAAAA,QAAS;IACpC,MAAMC,QAAQC,IAAAA,iDAAyB,EAACF;IACxC,OAAOG,IAAAA,iDAA4B,EAACF;AACtC;AACAF,cAAcK,WAAW,GAAG;AAC5B,6FAA6F;AAC7FL,cAAcM,wBAAwB,GAAG,IAAI,EAC7C,yCAAyC"}
|
|
@@ -6,7 +6,7 @@ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
|
|
6
6
|
_exportStar(require("./DialogTrigger"), exports);
|
|
7
7
|
_exportStar(require("./DialogTrigger.types"), exports);
|
|
8
8
|
_exportStar(require("./renderDialogTrigger"), exports);
|
|
9
|
-
_exportStar(require("./useDialogTrigger"), exports);
|
|
9
|
+
_exportStar(require("./useDialogTrigger.styles"), exports);
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
11
11
|
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogTrigger/index.js"],"sourcesContent":["export * from './DialogTrigger';\nexport * from './DialogTrigger.types';\nexport * from './renderDialogTrigger';\nexport * from './useDialogTrigger';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogTrigger/index.js"],"sourcesContent":["export * from './DialogTrigger';\nexport * from './DialogTrigger.types';\nexport * from './renderDialogTrigger';\nexport * from './useDialogTrigger.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
package/lib-commonjs/components/DialogTrigger/{useDialogTrigger.js → useDialogTrigger.styles.js}
RENAMED
|
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "useDialogTrigger_unstable", {
|
|
|
8
8
|
});
|
|
9
9
|
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
|
-
const _reactTabster = require("@fluentui/react-tabster");
|
|
12
11
|
const _reactUtilities = require("@fluentui/react-utilities");
|
|
13
12
|
const _contexts = require("../../contexts");
|
|
14
13
|
const _reactAria = require("@fluentui/react-aria");
|
|
@@ -17,7 +16,7 @@ const useDialogTrigger_unstable = (props)=>{
|
|
|
17
16
|
const { children , disableButtonEnhancement =false , action =isInsideSurfaceDialog ? 'close' : 'open' } = props;
|
|
18
17
|
const child = (0, _reactUtilities.getTriggerChild)(children);
|
|
19
18
|
const requestOpenChange = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.requestOpenChange);
|
|
20
|
-
const
|
|
19
|
+
const triggerAttributes = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.triggerAttributes);
|
|
21
20
|
const handleClick = (0, _reactUtilities.useEventCallback)((event)=>{
|
|
22
21
|
var _child_props, _child_props_onClick;
|
|
23
22
|
(_child_props_onClick = (_child_props = child === null || child === void 0 ? void 0 : child.props).onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, event);
|
|
@@ -42,6 +41,6 @@ const useDialogTrigger_unstable = (props)=>{
|
|
|
42
41
|
return {
|
|
43
42
|
children: (0, _reactUtilities.applyTriggerPropsToChildren)(children, disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps)
|
|
44
43
|
};
|
|
45
|
-
}; //# sourceMappingURL=useDialogTrigger.js.map
|
|
44
|
+
}; //# sourceMappingURL=useDialogTrigger.styles.js.map
|
|
46
45
|
|
|
47
|
-
//# sourceMappingURL=useDialogTrigger.js.map
|
|
46
|
+
//# sourceMappingURL=useDialogTrigger.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogTrigger/useDialogTrigger.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\n/**\n * Create the state required to render DialogTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup Dialog\n *\n * @param props - props from this instance of DialogTrigger\n */\nexport const useDialogTrigger_unstable = props => {\n const isInsideSurfaceDialog = useDialogSurfaceContext_unstable();\n const {\n children,\n disableButtonEnhancement = false,\n action = isInsideSurfaceDialog ? 'close' : 'open'\n } = props;\n const child = getTriggerChild(children);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const triggerAttributes = useDialogContext_unstable(ctx => ctx.triggerAttributes);\n const handleClick = useEventCallback(event => {\n var _child_props, _child_props_onClick;\n (_child_props_onClick = (_child_props = child === null || child === void 0 ? void 0 : child.props).onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, event);\n if (!event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n type: 'triggerClick',\n open: action === 'open'\n });\n }\n });\n const triggerChildProps = {\n ...(child === null || child === void 0 ? void 0 : child.props),\n ref: child === null || child === void 0 ? void 0 : child.ref,\n onClick: handleClick,\n ...triggerAttributes\n };\n const ariaButtonTriggerChildProps = useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', {\n ...triggerChildProps,\n type: 'button'\n });\n return {\n children: applyTriggerPropsToChildren(children, disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps)\n };\n};\n//# sourceMappingURL=useDialogTrigger.styles.js.map"],"names":["useDialogTrigger_unstable","props","isInsideSurfaceDialog","useDialogSurfaceContext_unstable","children","disableButtonEnhancement","action","child","getTriggerChild","requestOpenChange","useDialogContext_unstable","ctx","triggerAttributes","handleClick","useEventCallback","event","_child_props","_child_props_onClick","onClick","call","isDefaultPrevented","type","open","triggerChildProps","ref","ariaButtonTriggerChildProps","useARIAButtonProps","applyTriggerPropsToChildren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AAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMc,IAAI,AAAD,MAAO,MAAMd,MAAMc,IAAI,GAAG,KAAK,EAAE;QACzN,GAAGE,iBAAiB;QACpBF,MAAM;IACR;IACA,OAAO;QACLjB,UAAUuB,IAAAA,2CAA2B,EAACvB,UAAUC,2BAA2BkB,oBAAoBE,2BAA2B;IAC5H;AACF,GACA,mDAAmD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-dialog",
|
|
3
|
-
"version": "9.5.
|
|
3
|
+
"version": "9.5.4",
|
|
4
4
|
"description": "Dialog component for Fluent UI React",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -29,23 +29,23 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@fluentui/eslint-plugin": "*",
|
|
31
31
|
"@fluentui/react-conformance": "*",
|
|
32
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
|
32
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.21",
|
|
33
33
|
"@fluentui/scripts-api-extractor": "*",
|
|
34
34
|
"@fluentui/scripts-cypress": "*",
|
|
35
35
|
"@fluentui/scripts-tasks": "*"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@griffel/react": "^1.5.2",
|
|
39
|
-
"@fluentui/react-utilities": "^9.8.
|
|
40
|
-
"@fluentui/react-jsx-runtime": "
|
|
41
|
-
"@fluentui/keyboard-keys": "^9.0.
|
|
42
|
-
"@fluentui/react-context-selector": "^9.1.
|
|
43
|
-
"@fluentui/react-shared-contexts": "^9.
|
|
44
|
-
"@fluentui/react-aria": "^9.3.
|
|
39
|
+
"@fluentui/react-utilities": "^9.8.1",
|
|
40
|
+
"@fluentui/react-jsx-runtime": "9.0.0-alpha.3",
|
|
41
|
+
"@fluentui/keyboard-keys": "^9.0.3",
|
|
42
|
+
"@fluentui/react-context-selector": "^9.1.19",
|
|
43
|
+
"@fluentui/react-shared-contexts": "^9.4.0",
|
|
44
|
+
"@fluentui/react-aria": "^9.3.19",
|
|
45
45
|
"@fluentui/react-icons": "^2.0.196",
|
|
46
|
-
"@fluentui/react-tabster": "^9.
|
|
47
|
-
"@fluentui/react-theme": "^9.1.
|
|
48
|
-
"@fluentui/react-portal": "^9.2.
|
|
46
|
+
"@fluentui/react-tabster": "^9.7.0",
|
|
47
|
+
"@fluentui/react-theme": "^9.1.8",
|
|
48
|
+
"@fluentui/react-portal": "^9.2.7",
|
|
49
49
|
"@swc/helpers": "^0.4.14"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
package/.swcrc
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/swcrc",
|
|
3
|
-
"exclude": [
|
|
4
|
-
"/testing",
|
|
5
|
-
"/**/*.cy.ts",
|
|
6
|
-
"/**/*.cy.tsx",
|
|
7
|
-
"/**/*.spec.ts",
|
|
8
|
-
"/**/*.spec.tsx",
|
|
9
|
-
"/**/*.test.ts",
|
|
10
|
-
"/**/*.test.tsx"
|
|
11
|
-
],
|
|
12
|
-
"jsc": {
|
|
13
|
-
"parser": {
|
|
14
|
-
"syntax": "typescript",
|
|
15
|
-
"tsx": true,
|
|
16
|
-
"decorators": false,
|
|
17
|
-
"dynamicImport": false
|
|
18
|
-
},
|
|
19
|
-
"externalHelpers": true,
|
|
20
|
-
"transform": {
|
|
21
|
-
"react": {
|
|
22
|
-
"runtime": "classic",
|
|
23
|
-
"useSpread": true
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"target": "es2019"
|
|
27
|
-
},
|
|
28
|
-
"minify": false,
|
|
29
|
-
"sourceMaps": true
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","shorthands","DIALOG_GAP","ACTIONS_END_GRID_AREA","ACTIONS_START_GRID_AREA","MEDIA_QUERY_BREAKPOINT_SELECTOR","dialogActionsClassNames","root","useStyles","Bqenvij","B7ck84d","mc9l5x","i8kkvl","Belr9w4","Bmdcpmo","th9wkt","gridPositionEnd","Bdqf98w","Ijaq50","Br312pm","nk6f5a","Bw0ie65","gridPositionStart","fluidStart","fluidEnd","d","m","useDialogActionsStyles_unstable","state","styles","className","position","fluid"],"sources":["../../../src/components/DialogActions/useDialogActionsStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogActionsSlots, DialogActionsState } from './DialogActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {\n DIALOG_GAP,\n ACTIONS_END_GRID_AREA,\n ACTIONS_START_GRID_AREA,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n} from '../../contexts/constants';\n\nexport const dialogActionsClassNames: SlotClassNames<DialogActionsSlots> = {\n root: 'fui-DialogActions',\n};\n\nconst useStyles = makeStyles({\n root: {\n height: 'fit-content',\n boxSizing: 'border-box',\n display: 'flex',\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n flexDirection: 'column',\n justifySelf: 'stretch',\n },\n },\n gridPositionEnd: {\n justifySelf: 'end',\n ...shorthands.gridArea(ACTIONS_END_GRID_AREA),\n },\n gridPositionStart: {\n justifySelf: 'start',\n ...shorthands.gridArea(ACTIONS_START_GRID_AREA),\n },\n fluidStart: {\n gridColumnEnd: ACTIONS_END_GRID_AREA,\n },\n fluidEnd: {\n gridColumnStart: ACTIONS_START_GRID_AREA,\n },\n});\n\n/**\n * Apply styling to the DialogActions slots based on the state\n */\nexport const useDialogActionsStyles_unstable = (state: DialogActionsState): DialogActionsState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogActionsClassNames.root,\n styles.root,\n state.position === 'start' && styles.gridPositionStart,\n state.position === 'end' && styles.gridPositionEnd,\n state.fluid && state.position === 'start'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,EAC1DI,KAAA,CAAMrB,IAAI,CAACuB,SAAS;EAEtB,OAAOF,KAAA;AACT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","shorthands","ACTIONS_END_GRID_AREA","ACTIONS_START_GRID_AREA","CONTENT_GRID_AREA","DIALOG_GAP","MEDIA_QUERY_BREAKPOINT_SELECTOR","SURFACE_PADDING","TITLE_ACTION_GRID_AREA","TITLE_GRID_AREA","dialogBodyClassNames","root","useStyles","mc9l5x","fshzfu","Bxyxcbc","B7ck84d","wkccdc","Budl1dq","zoa1oz","B68tc82","Bmxbyg5","i8kkvl","Belr9w4","B5xtmjs","Bqu9lor","B06wobe","d","m","useDialogBodyStyles_unstable","state","styles","className"],"sources":["../../../src/components/DialogBody/useDialogBodyStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogBodySlots, DialogBodyState } from './DialogBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {\n ACTIONS_END_GRID_AREA,\n ACTIONS_START_GRID_AREA,\n CONTENT_GRID_AREA,\n DIALOG_GAP,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n SURFACE_PADDING,\n TITLE_ACTION_GRID_AREA,\n TITLE_GRID_AREA,\n} from '../../contexts';\n\nexport const dialogBodyClassNames: SlotClassNames<DialogBodySlots> = {\n root: 'fui-DialogBody',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'grid',\n '&::backdrop': {\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n },\n maxHeight: `calc(100vh - 2 * ${SURFACE_PADDING})`,\n boxSizing: 'border-box',\n gridTemplateRows: 'auto 1fr auto',\n gridTemplateColumns: '1fr 1fr auto',\n gridTemplateAreas: `\n \"${TITLE_GRID_AREA} ${TITLE_GRID_AREA} ${TITLE_ACTION_GRID_AREA}\"\n \"${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA}\"\n \"${ACTIONS_START_GRID_AREA} ${ACTIONS_END_GRID_AREA} ${ACTIONS_END_GRID_AREA}\"\n `,\n ...shorthands.overflow('unset'),\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n gridTemplateRows: 'auto 1fr auto auto',\n gridTemplateAreas: `\n \"${TITLE_GRID_AREA} ${TITLE_GRID_AREA} ${TITLE_ACTION_GRID_AREA}\"\n \"${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA}\"\n \"${ACTIONS_START_GRID_AREA} ${ACTIONS_START_GRID_AREA} ${ACTIONS_START_GRID_AREA}\"\n \"${ACTIONS_END_GRID_AREA} ${ACTIONS_END_GRID_AREA} ${ACTIONS_END_GRID_AREA}\"\n `,\n },\n },\n});\n\n/**\n * Apply styling to the DialogBody slots based on the state\n */\nexport const useDialogBodyStyles_unstable = (state: DialogBodyState): DialogBodyState => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogBodyClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,SACEC,qBAAqB,EACrBC,uBAAuB,EACvBC,iBAAiB,EACjBC,UAAU,EACVC,+BAA+B,EAC/BC,eAAe,EACfC,sBAAsB,EACtBC,eAAe,QACV;AAEP,OAAO,MAAMC,oBAAA,GAAwD;EACnEC,IAAA,EAAM;AACR;AAEA;;;AAGA,MAAMC,SAAA,gBAAYb,QAAA;EAAAY,IAAA;IAAAE,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,EA4BlB;AAEA;;;AAGA,OAAO,MAAMC,4BAAA,GAAgCC,KAAA,IAA4C;EACvF,MAAMC,MAAA,GAASnB,SAAA;EACfkB,KAAA,CAAMnB,IAAI,CAACqB,SAAS,GAAGhC,YAAA,CAAaU,oBAAA,CAAqBC,IAAI,EAAEoB,MAAA,CAAOpB,IAAI,EAAEmB,KAAA,CAAMnB,IAAI,CAACqB,SAAS;EAEhG,OAAOF,KAAA;AACT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","shorthands","CONTENT_GRID_AREA","tokens","typographyStyles","dialogContentClassNames","root","useStyles","Bmxbyg5","sshi5w","B7ck84d","z8tnut","z189sj","Byoj8tv","uwmqm3","B6of3ja","t21cq0","jrapky","Frg6f3","Ijaq50","Br312pm","nk6f5a","Bw0ie65","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","useDialogContentStyles_unstable","state","styles","className"],"sources":["../../../src/components/DialogContent/useDialogContentStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogContentSlots, DialogContentState } from './DialogContent.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { CONTENT_GRID_AREA } from '../../contexts/constants';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n\nexport const dialogContentClassNames: SlotClassNames<DialogContentSlots> = {\n root: 'fui-DialogContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n overflowY: 'auto',\n minHeight: '32px',\n boxSizing: 'border-box',\n ...shorthands.padding(tokens.strokeWidthThick),\n ...shorthands.margin(`calc(${tokens.strokeWidthThick} * -1)`),\n ...shorthands.gridArea(CONTENT_GRID_AREA),\n ...typographyStyles.body1,\n },\n});\n\n/**\n * Apply styling to the DialogContent slots based on the state\n */\nexport const useDialogContentStyles_unstable = (state: DialogContentState): DialogContentState => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogContentClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,MAAM,EAAEC,gBAAgB,QAAQ;AAEzC,OAAO,MAAMC,uBAAA,GAA8D;EACzEC,IAAA,EAAM;AACR;AAEA;;;AAGA,MAAMC,SAAA,gBAAYR,QAAA;EAAAO,IAAA;IAAAE,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAUlB;AAEA;;;AAGA,OAAO,MAAMC,+BAAA,GAAmCC,KAAA,IAAkD;EAChG,MAAMC,MAAA,GAASvB,SAAA;EACfsB,KAAA,CAAMvB,IAAI,CAACyB,SAAS,GAAG/B,YAAA,CAAaK,uBAAA,CAAwBC,IAAI,EAAEwB,MAAA,CAAOxB,IAAI,EAAEuB,KAAA,CAAMvB,IAAI,CAACyB,SAAS;EACnG,OAAOF,KAAA;AACT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","shorthands","tokens","createFocusOutlineStyle","MEDIA_QUERY_BREAKPOINT_SELECTOR","SURFACE_BORDER_WIDTH","SURFACE_PADDING","useDialogContext_unstable","dialogSurfaceClassNames","root","backdrop","useStyles","focusOutline","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bjwuhne","Ghsupd","Bule8hv","mc9l5x","famaaq","Bcdw1i0","Bhzewxz","j35jbq","B5kzvoi","oyh7mz","z8tnut","z189sj","Byoj8tv","uwmqm3","B6of3ja","t21cq0","jrapky","Frg6f3","icvyot","vrafjx","oivjwe","wvpqe5","B68tc82","Bmxbyg5","fshzfu","qhf8xq","Bqenvij","B2u0y6b","Bxyxcbc","B7ck84d","E5pizo","De3pzq","sj55zd","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B5xtmjs","nestedDialogBackdrop","nestedNativeDialogBackdrop","f","i","d","m","useDialogSurfaceStyles_unstable","state","styles","isNestedDialog","ctx","className"],"sources":["../../../src/components/DialogSurface/useDialogSurfaceStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport {\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n SURFACE_BORDER_WIDTH,\n SURFACE_PADDING,\n useDialogContext_unstable,\n} from '../../contexts';\nimport type { DialogSurfaceSlots, DialogSurfaceState } from './DialogSurface.types';\n\nexport const dialogSurfaceClassNames: SlotClassNames<DialogSurfaceSlots> = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n focusOutline: createFocusOutlineStyle(),\n root: {\n display: 'block',\n userSelect: 'unset',\n visibility: 'unset',\n ...shorthands.inset(0),\n ...shorthands.padding(0),\n ...shorthands.padding(SURFACE_PADDING),\n ...shorthands.margin('auto'),\n ...shorthands.borderStyle('none'),\n ...shorthands.overflow('unset'),\n '&::backdrop': {\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n },\n position: 'fixed',\n height: 'fit-content',\n maxWidth: '600px',\n maxHeight: '100vh',\n boxSizing: 'border-box',\n boxShadow: tokens.shadow64,\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n ...shorthands.border(SURFACE_BORDER_WIDTH, 'solid', tokens.colorTransparentStroke),\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n },\n },\n backdrop: {\n position: 'fixed',\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n ...shorthands.inset('0px'),\n },\n nestedDialogBackdrop: {\n backgroundColor: 'transparent',\n },\n nestedNativeDialogBackdrop: {\n '&::backdrop': {\n backgroundColor: 'transparent',\n },\n },\n});\n\n/**\n * Apply styling to the DialogSurface slots based on the state\n */\nexport const useDialogSurfaceStyles_unstable = (state: DialogSurfaceState): DialogSurfaceState => {\n const styles = useStyles();\n const isNestedDialog = useDialogContext_unstable(ctx => ctx.isNestedDialog);\n\n state.root.className = mergeClasses(\n dialogSurfaceClassNames.root,\n styles.root,\n styles.focusOutline,\n isNestedDialog && styles.nestedNativeDialogBackdrop,\n state.root.className,\n );\n if (state.backdrop) {\n state.backdrop.className = mergeClasses(\n dialogSurfaceClassNames.backdrop,\n styles.backdrop,\n isNestedDialog && styles.nestedDialogBackdrop,\n state.backdrop.className,\n );\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAErD,SAASC,MAAM,QAAQ;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SACEC,+BAA+B,EAC/BC,oBAAoB,EACpBC,eAAe,EACfC,yBAAyB,QACpB;AAGP,OAAO,MAAMC,uBAAA,GAA8D;EACzEC,IAAA,EAAM;EACNC,QAAA,EAAU;AACZ;AAEA;;;AAGA,MAAMC,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AA;EAAAC,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;AAAA,EA0ClB;AAEA;;;AAGA,OAAO,MAAMC,+BAAA,GAAmCC,KAAA,IAAkD;EAChG,MAAMC,MAAA,GAASnF,SAAA;EACf,MAAMoF,cAAA,GAAiBxF,yBAAA,CAA0ByF,GAAA,IAAOA,GAAA,CAAID,cAAc;EAE1EF,KAAA,CAAMpF,IAAI,CAACwF,SAAS,GAAGjG,YAAA,CACrBQ,uBAAA,CAAwBC,IAAI,EAC5BqF,MAAA,CAAOrF,IAAI,EACXqF,MAAA,CAAOlF,YAAY,EACnBmF,cAAA,IAAkBD,MAAA,CAAOP,0BAA0B,EACnDM,KAAA,CAAMpF,IAAI,CAACwF,SAAS;EAEtB,IAAIJ,KAAA,CAAMnF,QAAQ,EAAE;IAClBmF,KAAA,CAAMnF,QAAQ,CAACuF,SAAS,GAAGjG,YAAA,CACzBQ,uBAAA,CAAwBE,QAAQ,EAChCoF,MAAA,CAAOpF,QAAQ,EACfqF,cAAA,IAAkBD,MAAA,CAAOR,oBAAoB,EAC7CO,KAAA,CAAMnF,QAAQ,CAACuF,SAAS;EAE5B;EACA,OAAOJ,KAAA;AACT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","shorthands","typographyStyles","TITLE_ACTION_GRID_AREA","TITLE_GRID_AREA","createFocusOutlineStyle","dialogTitleClassNames","root","action","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","Ijaq50","Br312pm","nk6f5a","Bw0ie65","rootWithoutCloseButton","d","useDialogTitleInternalStyles","button","qhf8xq","B7ck84d","De3pzq","sj55zd","Bceei9c","B68tc82","Bmxbyg5","z8tnut","z189sj","Byoj8tv","uwmqm3","icvyot","vrafjx","oivjwe","wvpqe5","Bv0vk6g","fsow6f","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bjwuhne","Ghsupd","Bule8hv","f","i","useDialogTitleStyles_unstable","state","styles","className"],"sources":["../../../src/components/DialogTitle/useDialogTitleStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogTitleSlots, DialogTitleState } from './DialogTitle.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport { TITLE_ACTION_GRID_AREA, TITLE_GRID_AREA } from '../../contexts/constants';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\n\nexport const dialogTitleClassNames: SlotClassNames<DialogTitleSlots> = {\n root: 'fui-DialogTitle',\n action: 'fui-DialogTitle__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.subtitle1,\n ...shorthands.gridArea(TITLE_GRID_AREA),\n },\n rootWithoutCloseButton: {\n ...shorthands.gridArea(TITLE_GRID_AREA, TITLE_GRID_AREA, TITLE_ACTION_GRID_AREA, TITLE_ACTION_GRID_AREA),\n },\n action: {\n ...shorthands.gridArea(TITLE_ACTION_GRID_AREA),\n },\n});\n\n/**\n * Styles to be applied on internal elements used by default action on non-modal Dialog\n * @internal\n */\nexport const useDialogTitleInternalStyles = makeStyles({\n button: {\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 ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n ...shorthands.borderStyle('none'),\n WebkitAppearance: 'button',\n textAlign: 'unset',\n ...createFocusOutlineStyle(),\n },\n});\n\n/**\n * Apply styling to the DialogTitle slots based on the state\n */\nexport const useDialogTitleStyles_unstable = (state: DialogTitleState): DialogTitleState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogTitleClassNames.root,\n styles.root,\n !state.action && styles.rootWithoutCloseButton,\n state.root.className,\n );\n if (state.action) {\n state.action.className = mergeClasses(dialogTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,SAASC,gBAAgB,QAAQ;AACjC,SAASC,sBAAsB,EAAEC,eAAe,QAAQ;AACxD,SAASC,uBAAuB,QAAQ;AAExC,OAAO,MAAMC,qBAAA,GAA0D;EACrEC,IAAA,EAAM;EACNC,MAAA,EAAQ;AACV;AAEA;;;AAGA,MAAMC,SAAA,gBAAYV,QAAA;EAAAQ,IAAA;IAAAG,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,sBAAA;IAAAJ,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAT,MAAA;IAAAM,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,EAWlB;AAEA;;;;AAIA,OAAO,MAAMC,4BAAA,gBAA+BrB,QAAA;EAAAsB,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAf,OAAA;IAAAC,OAAA;IAAAe,OAAA;IAAAb,OAAA;IAAAc,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAA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