@fluentui/react-dialog 9.13.7 → 9.14.0
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.md +22 -1
- package/lib/components/DialogActions/useDialogActionsStyles.styles.raw.js +56 -0
- package/lib/components/DialogActions/useDialogActionsStyles.styles.raw.js.map +1 -0
- package/lib/components/DialogBody/useDialogBodyStyles.styles.raw.js +34 -0
- package/lib/components/DialogBody/useDialogBodyStyles.styles.raw.js.map +1 -0
- package/lib/components/DialogContent/useDialogContentStyles.styles.raw.js +31 -0
- package/lib/components/DialogContent/useDialogContentStyles.styles.raw.js.map +1 -0
- package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.raw.js +72 -0
- package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.raw.js.map +1 -0
- package/lib/components/DialogTitle/useDialogTitleStyles.styles.raw.js +63 -0
- package/lib/components/DialogTitle/useDialogTitleStyles.styles.raw.js.map +1 -0
- package/lib/utils/useDisableBodyScroll.styles.raw.js +12 -0
- package/lib/utils/useDisableBodyScroll.styles.raw.js.map +1 -0
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.raw.js +72 -0
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.raw.js +50 -0
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.raw.js +47 -0
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.raw.js +88 -0
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.raw.js +79 -0
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/utils/useDisableBodyScroll.styles.raw.js +29 -0
- package/lib-commonjs/utils/useDisableBodyScroll.styles.raw.js.map +1 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-dialog
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 17 Jul 2025 13:45:38 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.14.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.14.0)
|
|
8
|
+
|
|
9
|
+
Thu, 17 Jul 2025 13:45:38 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.13.8..@fluentui/react-dialog_v9.14.0)
|
|
11
|
+
|
|
12
|
+
### Minor changes
|
|
13
|
+
|
|
14
|
+
- feat: enable griffel raw styles ([PR #34853](https://github.com/microsoft/fluentui/pull/34853) by martinhochel@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-aria to v9.15.4 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
|
|
16
|
+
- Bump @fluentui/react-tabster to v9.26.0 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
|
|
17
|
+
- Bump @fluentui/react-portal to v9.7.0 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
|
|
18
|
+
|
|
19
|
+
## [9.13.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.13.8)
|
|
20
|
+
|
|
21
|
+
Wed, 16 Jul 2025 13:52:50 GMT
|
|
22
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.13.6..@fluentui/react-dialog_v9.13.8)
|
|
23
|
+
|
|
24
|
+
### Patches
|
|
25
|
+
|
|
26
|
+
- Bump @fluentui/react-motion-components-preview to v0.7.0 ([PR #34849](https://github.com/microsoft/fluentui/pull/34849) by beachball)
|
|
27
|
+
|
|
7
28
|
## [9.13.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.13.6)
|
|
8
29
|
|
|
9
30
|
Fri, 04 Jul 2025 10:02:42 GMT
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';
|
|
2
|
+
import { DIALOG_GAP, MEDIA_QUERY_BREAKPOINT_SELECTOR } from '../../contexts/constants';
|
|
3
|
+
export const dialogActionsClassNames = {
|
|
4
|
+
root: 'fui-DialogActions'
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Styles for the root slot
|
|
8
|
+
*/ const useResetStyles = makeResetStyles({
|
|
9
|
+
gap: DIALOG_GAP,
|
|
10
|
+
height: 'fit-content',
|
|
11
|
+
boxSizing: 'border-box',
|
|
12
|
+
display: 'flex',
|
|
13
|
+
gridRowStart: 3,
|
|
14
|
+
gridRowEnd: 3,
|
|
15
|
+
[MEDIA_QUERY_BREAKPOINT_SELECTOR]: {
|
|
16
|
+
flexDirection: 'column',
|
|
17
|
+
justifySelf: 'stretch'
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const useStyles = makeStyles({
|
|
21
|
+
gridPositionEnd: {
|
|
22
|
+
justifySelf: 'end',
|
|
23
|
+
gridColumnStart: 2,
|
|
24
|
+
gridColumnEnd: 4,
|
|
25
|
+
[MEDIA_QUERY_BREAKPOINT_SELECTOR]: {
|
|
26
|
+
gridColumnStart: 1,
|
|
27
|
+
gridRowStart: 4,
|
|
28
|
+
gridRowEnd: 'auto'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
gridPositionStart: {
|
|
32
|
+
justifySelf: 'start',
|
|
33
|
+
gridColumnStart: 1,
|
|
34
|
+
gridColumnEnd: 2,
|
|
35
|
+
[MEDIA_QUERY_BREAKPOINT_SELECTOR]: {
|
|
36
|
+
gridColumnEnd: 4,
|
|
37
|
+
gridRowStart: 3,
|
|
38
|
+
gridRowEnd: 'auto'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
fluidStart: {
|
|
42
|
+
gridColumnEnd: 4
|
|
43
|
+
},
|
|
44
|
+
fluidEnd: {
|
|
45
|
+
gridColumnStart: 1
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* Apply styling to the DialogActions slots based on the state
|
|
50
|
+
*/ export const useDialogActionsStyles_unstable = (state)=>{
|
|
51
|
+
'use no memo';
|
|
52
|
+
const resetStyles = useResetStyles();
|
|
53
|
+
const styles = useStyles();
|
|
54
|
+
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);
|
|
55
|
+
return state;
|
|
56
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DialogActions/useDialogActionsStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { DialogActionsSlots, DialogActionsState } from './DialogActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { DIALOG_GAP, MEDIA_QUERY_BREAKPOINT_SELECTOR } from '../../contexts/constants';\n\nexport const dialogActionsClassNames: SlotClassNames<DialogActionsSlots> = {\n root: 'fui-DialogActions',\n};\n\n/**\n * Styles for the root slot\n */\nconst 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});\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/**\n * Apply styling to the DialogActions slots based on the state\n */\nexport const useDialogActionsStyles_unstable = (state: DialogActionsState): DialogActionsState => {\n 'use no memo';\n\n const resetStyles = useResetStyles();\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogActionsClassNames.root,\n resetStyles,\n state.position === 'start' && styles.gridPositionStart,\n state.position === 'end' && styles.gridPositionEnd,\n state.fluid && state.position === 'start' && styles.fluidStart,\n state.fluid && state.position === 'end' && styles.fluidEnd,\n state.root.className,\n );\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","DIALOG_GAP","MEDIA_QUERY_BREAKPOINT_SELECTOR","dialogActionsClassNames","root","useResetStyles","gap","height","boxSizing","display","gridRowStart","gridRowEnd","flexDirection","justifySelf","useStyles","gridPositionEnd","gridColumnStart","gridColumnEnd","gridPositionStart","fluidStart","fluidEnd","useDialogActionsStyles_unstable","state","resetStyles","styles","className","position","fluid"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG3E,SAASC,UAAU,EAAEC,+BAA+B,QAAQ,2BAA2B;AAEvF,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,iBAAiBP,gBAAgB;IACrCQ,KAAKL;IACLM,QAAQ;IACRC,WAAW;IACXC,SAAS;IACTC,cAAc;IACdC,YAAY;IACZ,CAACT,gCAAgC,EAAE;QACjCU,eAAe;QACfC,aAAa;IACf;AACF;AAEA,MAAMC,YAAYf,WAAW;IAC3BgB,iBAAiB;QACfF,aAAa;QACbG,iBAAiB;QACjBC,eAAe;QACf,CAACf,gCAAgC,EAAE;YACjCc,iBAAiB;YACjBN,cAAc;YACdC,YAAY;QACd;IACF;IACAO,mBAAmB;QACjBL,aAAa;QACbG,iBAAiB;QACjBC,eAAe;QACf,CAACf,gCAAgC,EAAE;YACjCe,eAAe;YACfP,cAAc;YACdC,YAAY;QACd;IACF;IACAQ,YAAY;QACVF,eAAe;IACjB;IACAG,UAAU;QACRJ,iBAAiB;IACnB;AACF;AAEA;;CAEC,GACD,OAAO,MAAMK,kCAAkC,CAACC;IAC9C;IAEA,MAAMC,cAAclB;IACpB,MAAMmB,SAASV;IACfQ,MAAMlB,IAAI,CAACqB,SAAS,GAAGzB,aACrBG,wBAAwBC,IAAI,EAC5BmB,aACAD,MAAMI,QAAQ,KAAK,WAAWF,OAAON,iBAAiB,EACtDI,MAAMI,QAAQ,KAAK,SAASF,OAAOT,eAAe,EAClDO,MAAMK,KAAK,IAAIL,MAAMI,QAAQ,KAAK,WAAWF,OAAOL,UAAU,EAC9DG,MAAMK,KAAK,IAAIL,MAAMI,QAAQ,KAAK,SAASF,OAAOJ,QAAQ,EAC1DE,MAAMlB,IAAI,CAACqB,SAAS;IAEtB,OAAOH;AACT,EAAE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { makeResetStyles, mergeClasses } from '@griffel/react';
|
|
2
|
+
import { DIALOG_GAP, MEDIA_QUERY_BREAKPOINT_SELECTOR, MEDIA_QUERY_SHORT_SCREEN, SURFACE_PADDING } from '../../contexts';
|
|
3
|
+
export const dialogBodyClassNames = {
|
|
4
|
+
root: 'fui-DialogBody'
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Styles for the root slot
|
|
8
|
+
*/ const useResetStyles = makeResetStyles({
|
|
9
|
+
overflow: 'unset',
|
|
10
|
+
gap: DIALOG_GAP,
|
|
11
|
+
display: 'grid',
|
|
12
|
+
maxHeight: `calc(100vh - 2 * ${SURFACE_PADDING})`,
|
|
13
|
+
boxSizing: 'border-box',
|
|
14
|
+
gridTemplateRows: 'auto 1fr',
|
|
15
|
+
gridTemplateColumns: '1fr 1fr auto',
|
|
16
|
+
'@supports (height: 1dvh)': {
|
|
17
|
+
maxHeight: `calc(100dvh - 2 * ${SURFACE_PADDING})`
|
|
18
|
+
},
|
|
19
|
+
[MEDIA_QUERY_BREAKPOINT_SELECTOR]: {
|
|
20
|
+
maxWidth: '100vw',
|
|
21
|
+
gridTemplateRows: 'auto 1fr auto'
|
|
22
|
+
},
|
|
23
|
+
[MEDIA_QUERY_SHORT_SCREEN]: {
|
|
24
|
+
maxHeight: 'unset'
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Apply styling to the DialogBody slots based on the state
|
|
29
|
+
*/ export const useDialogBodyStyles_unstable = (state)=>{
|
|
30
|
+
'use no memo';
|
|
31
|
+
const resetStyles = useResetStyles();
|
|
32
|
+
state.root.className = mergeClasses(dialogBodyClassNames.root, resetStyles, state.root.className);
|
|
33
|
+
return state;
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DialogBody/useDialogBodyStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { DialogBodySlots, DialogBodyState } from './DialogBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { DIALOG_GAP, MEDIA_QUERY_BREAKPOINT_SELECTOR, MEDIA_QUERY_SHORT_SCREEN, SURFACE_PADDING } from '../../contexts';\n\nexport const dialogBodyClassNames: SlotClassNames<DialogBodySlots> = {\n root: 'fui-DialogBody',\n};\n\n/**\n * Styles for the root slot\n */\nconst 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\n '@supports (height: 1dvh)': {\n maxHeight: `calc(100dvh - 2 * ${SURFACE_PADDING})`,\n },\n\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n gridTemplateRows: 'auto 1fr auto',\n },\n\n [MEDIA_QUERY_SHORT_SCREEN]: {\n maxHeight: 'unset',\n },\n});\n\n/**\n * Apply styling to the DialogBody slots based on the state\n */\nexport const useDialogBodyStyles_unstable = (state: DialogBodyState): DialogBodyState => {\n 'use no memo';\n\n const resetStyles = useResetStyles();\n\n state.root.className = mergeClasses(dialogBodyClassNames.root, resetStyles, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","DIALOG_GAP","MEDIA_QUERY_BREAKPOINT_SELECTOR","MEDIA_QUERY_SHORT_SCREEN","SURFACE_PADDING","dialogBodyClassNames","root","useResetStyles","overflow","gap","display","maxHeight","boxSizing","gridTemplateRows","gridTemplateColumns","maxWidth","useDialogBodyStyles_unstable","state","resetStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,iBAAiB;AAG/D,SAASC,UAAU,EAAEC,+BAA+B,EAAEC,wBAAwB,EAAEC,eAAe,QAAQ,iBAAiB;AAExH,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,iBAAiBR,gBAAgB;IACrCS,UAAU;IACVC,KAAKR;IACLS,SAAS;IACTC,WAAW,CAAC,iBAAiB,EAAEP,gBAAgB,CAAC,CAAC;IACjDQ,WAAW;IACXC,kBAAkB;IAClBC,qBAAqB;IAErB,4BAA4B;QAC1BH,WAAW,CAAC,kBAAkB,EAAEP,gBAAgB,CAAC,CAAC;IACpD;IAEA,CAACF,gCAAgC,EAAE;QACjCa,UAAU;QACVF,kBAAkB;IACpB;IAEA,CAACV,yBAAyB,EAAE;QAC1BQ,WAAW;IACb;AACF;AAEA;;CAEC,GACD,OAAO,MAAMK,+BAA+B,CAACC;IAC3C;IAEA,MAAMC,cAAcX;IAEpBU,MAAMX,IAAI,CAACa,SAAS,GAAGnB,aAAaK,qBAAqBC,IAAI,EAAEY,aAAaD,MAAMX,IAAI,CAACa,SAAS;IAEhG,OAAOF;AACT,EAAE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { makeResetStyles, mergeClasses } from '@griffel/react';
|
|
2
|
+
import { tokens, typographyStyles } from '@fluentui/react-theme';
|
|
3
|
+
import { MEDIA_QUERY_SHORT_SCREEN } from '../../contexts';
|
|
4
|
+
export const dialogContentClassNames = {
|
|
5
|
+
root: 'fui-DialogContent'
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Styles for the root slot
|
|
9
|
+
*/ const useStyles = makeResetStyles({
|
|
10
|
+
padding: tokens.strokeWidthThick,
|
|
11
|
+
margin: `calc(${tokens.strokeWidthThick} * -1)`,
|
|
12
|
+
...typographyStyles.body1,
|
|
13
|
+
overflowY: 'auto',
|
|
14
|
+
minHeight: '32px',
|
|
15
|
+
boxSizing: 'border-box',
|
|
16
|
+
gridRowStart: 2,
|
|
17
|
+
gridRowEnd: 2,
|
|
18
|
+
gridColumnStart: 1,
|
|
19
|
+
gridColumnEnd: 4,
|
|
20
|
+
[MEDIA_QUERY_SHORT_SCREEN]: {
|
|
21
|
+
overflowY: 'unset'
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* Apply styling to the DialogContent slots based on the state
|
|
26
|
+
*/ export const useDialogContentStyles_unstable = (state)=>{
|
|
27
|
+
'use no memo';
|
|
28
|
+
const styles = useStyles();
|
|
29
|
+
state.root.className = mergeClasses(dialogContentClassNames.root, styles, state.root.className);
|
|
30
|
+
return state;
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DialogContent/useDialogContentStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { DialogContentSlots, DialogContentState } from './DialogContent.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { MEDIA_QUERY_SHORT_SCREEN } from '../../contexts';\n\nexport const dialogContentClassNames: SlotClassNames<DialogContentSlots> = {\n root: 'fui-DialogContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst 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\n [MEDIA_QUERY_SHORT_SCREEN]: {\n overflowY: 'unset',\n },\n});\n\n/**\n * Apply styling to the DialogContent slots based on the state\n */\nexport const useDialogContentStyles_unstable = (state: DialogContentState): DialogContentState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(dialogContentClassNames.root, styles, state.root.className);\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","typographyStyles","MEDIA_QUERY_SHORT_SCREEN","dialogContentClassNames","root","useStyles","padding","strokeWidthThick","margin","body1","overflowY","minHeight","boxSizing","gridRowStart","gridRowEnd","gridColumnStart","gridColumnEnd","useDialogContentStyles_unstable","state","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,iBAAiB;AAG/D,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AACjE,SAASC,wBAAwB,QAAQ,iBAAiB;AAE1D,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,gBAAgB;IAChCQ,SAASN,OAAOO,gBAAgB;IAChCC,QAAQ,CAAC,KAAK,EAAER,OAAOO,gBAAgB,CAAC,MAAM,CAAC;IAC/C,GAAGN,iBAAiBQ,KAAK;IACzBC,WAAW;IACXC,WAAW;IACXC,WAAW;IACXC,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBC,eAAe;IAEf,CAACd,yBAAyB,EAAE;QAC1BQ,WAAW;IACb;AACF;AAEA;;CAEC,GACD,OAAO,MAAMO,kCAAkC,CAACC;IAC9C;IAEA,MAAMC,SAASd;IACfa,MAAMd,IAAI,CAACgB,SAAS,GAAGrB,aAAaI,wBAAwBC,IAAI,EAAEe,QAAQD,MAAMd,IAAI,CAACgB,SAAS;IAC9F,OAAOF;AACT,EAAE"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
3
|
+
import { createFocusOutlineStyle } from '@fluentui/react-tabster';
|
|
4
|
+
import { FULLSCREEN_DIALOG_SCROLLBAR_OFFSET, MEDIA_QUERY_BREAKPOINT_SELECTOR, MEDIA_QUERY_SHORT_SCREEN, SURFACE_BORDER_WIDTH, SURFACE_PADDING } from '../../contexts';
|
|
5
|
+
export const dialogSurfaceClassNames = {
|
|
6
|
+
root: 'fui-DialogSurface',
|
|
7
|
+
backdrop: 'fui-DialogSurface__backdrop'
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Styles for the root slot
|
|
11
|
+
*/ const useRootBaseStyle = makeResetStyles({
|
|
12
|
+
...createFocusOutlineStyle(),
|
|
13
|
+
inset: 0,
|
|
14
|
+
padding: SURFACE_PADDING,
|
|
15
|
+
margin: 'auto',
|
|
16
|
+
borderStyle: 'none',
|
|
17
|
+
overflow: 'unset',
|
|
18
|
+
border: `${SURFACE_BORDER_WIDTH} solid ${tokens.colorTransparentStroke}`,
|
|
19
|
+
borderRadius: tokens.borderRadiusXLarge,
|
|
20
|
+
display: 'block',
|
|
21
|
+
userSelect: 'unset',
|
|
22
|
+
visibility: 'unset',
|
|
23
|
+
position: 'fixed',
|
|
24
|
+
height: 'fit-content',
|
|
25
|
+
maxWidth: '600px',
|
|
26
|
+
maxHeight: '100vh',
|
|
27
|
+
boxSizing: 'border-box',
|
|
28
|
+
backgroundColor: tokens.colorNeutralBackground1,
|
|
29
|
+
color: tokens.colorNeutralForeground1,
|
|
30
|
+
// Same styles as DialogSurfaceMotion last keyframe,
|
|
31
|
+
// to ensure dialog will be properly styled when surfaceMotion is opted-out
|
|
32
|
+
boxShadow: tokens.shadow64,
|
|
33
|
+
'@supports (height: 1dvh)': {
|
|
34
|
+
maxHeight: '100dvh'
|
|
35
|
+
},
|
|
36
|
+
[MEDIA_QUERY_BREAKPOINT_SELECTOR]: {
|
|
37
|
+
maxWidth: '100vw'
|
|
38
|
+
},
|
|
39
|
+
[MEDIA_QUERY_SHORT_SCREEN]: {
|
|
40
|
+
overflowY: 'auto',
|
|
41
|
+
// We need to offset the scrollbar by adding transparent borders otherwise
|
|
42
|
+
// it conflicts with the border radius.
|
|
43
|
+
paddingRight: `calc(${SURFACE_PADDING} - ${FULLSCREEN_DIALOG_SCROLLBAR_OFFSET})`,
|
|
44
|
+
borderRightWidth: FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,
|
|
45
|
+
borderTopWidth: FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,
|
|
46
|
+
borderBottomWidth: FULLSCREEN_DIALOG_SCROLLBAR_OFFSET
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const useBackdropBaseStyle = makeResetStyles({
|
|
50
|
+
inset: '0px',
|
|
51
|
+
backgroundColor: tokens.colorBackgroundOverlay,
|
|
52
|
+
position: 'fixed'
|
|
53
|
+
});
|
|
54
|
+
const useStyles = makeStyles({
|
|
55
|
+
nestedDialogBackdrop: {
|
|
56
|
+
backgroundColor: tokens.colorTransparentBackground
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* Apply styling to the DialogSurface slots based on the state
|
|
61
|
+
*/ export const useDialogSurfaceStyles_unstable = (state)=>{
|
|
62
|
+
'use no memo';
|
|
63
|
+
const { isNestedDialog, root, backdrop } = state;
|
|
64
|
+
const rootBaseStyle = useRootBaseStyle();
|
|
65
|
+
const backdropBaseStyle = useBackdropBaseStyle();
|
|
66
|
+
const styles = useStyles();
|
|
67
|
+
root.className = mergeClasses(dialogSurfaceClassNames.root, rootBaseStyle, root.className);
|
|
68
|
+
if (backdrop) {
|
|
69
|
+
backdrop.className = mergeClasses(dialogSurfaceClassNames.backdrop, backdropBaseStyle, isNestedDialog && styles.nestedDialogBackdrop, backdrop.className);
|
|
70
|
+
}
|
|
71
|
+
return state;
|
|
72
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DialogSurface/useDialogSurfaceStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport {\n FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n MEDIA_QUERY_SHORT_SCREEN,\n SURFACE_BORDER_WIDTH,\n SURFACE_PADDING,\n} from '../../contexts';\nimport type { DialogSurfaceSlots, DialogSurfaceState } from './DialogSurface.types';\n\nexport const dialogSurfaceClassNames: SlotClassNames<Omit<DialogSurfaceSlots, 'backdropMotion'>> = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop',\n};\n\n/**\n * Styles for the root slot\n */\nconst 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\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\n '@supports (height: 1dvh)': {\n maxHeight: '100dvh',\n },\n\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n },\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});\n\nconst useBackdropBaseStyle = makeResetStyles({\n inset: '0px',\n backgroundColor: tokens.colorBackgroundOverlay,\n position: 'fixed',\n});\n\nconst useStyles = makeStyles({\n nestedDialogBackdrop: {\n backgroundColor: tokens.colorTransparentBackground,\n },\n});\n\n/**\n * Apply styling to the DialogSurface slots based on the state\n */\nexport const useDialogSurfaceStyles_unstable = (state: DialogSurfaceState): DialogSurfaceState => {\n 'use no memo';\n\n const { isNestedDialog, root, backdrop } = state;\n\n const rootBaseStyle = useRootBaseStyle();\n\n const backdropBaseStyle = useBackdropBaseStyle();\n const styles = useStyles();\n\n root.className = mergeClasses(dialogSurfaceClassNames.root, rootBaseStyle, root.className);\n\n if (backdrop) {\n backdrop.className = mergeClasses(\n dialogSurfaceClassNames.backdrop,\n backdropBaseStyle,\n isNestedDialog && styles.nestedDialogBackdrop,\n backdrop.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","createFocusOutlineStyle","FULLSCREEN_DIALOG_SCROLLBAR_OFFSET","MEDIA_QUERY_BREAKPOINT_SELECTOR","MEDIA_QUERY_SHORT_SCREEN","SURFACE_BORDER_WIDTH","SURFACE_PADDING","dialogSurfaceClassNames","root","backdrop","useRootBaseStyle","inset","padding","margin","borderStyle","overflow","border","colorTransparentStroke","borderRadius","borderRadiusXLarge","display","userSelect","visibility","position","height","maxWidth","maxHeight","boxSizing","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground1","boxShadow","shadow64","overflowY","paddingRight","borderRightWidth","borderTopWidth","borderBottomWidth","useBackdropBaseStyle","colorBackgroundOverlay","useStyles","nestedDialogBackdrop","colorTransparentBackground","useDialogSurfaceStyles_unstable","state","isNestedDialog","rootBaseStyle","backdropBaseStyle","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAE3E,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,uBAAuB,QAAQ,0BAA0B;AAClE,SACEC,kCAAkC,EAClCC,+BAA+B,EAC/BC,wBAAwB,EACxBC,oBAAoB,EACpBC,eAAe,QACV,iBAAiB;AAGxB,OAAO,MAAMC,0BAAsF;IACjGC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF;;CAEC,GACD,MAAMC,mBAAmBb,gBAAgB;IACvC,GAAGI,yBAAyB;IAC5BU,OAAO;IACPC,SAASN;IACTO,QAAQ;IACRC,aAAa;IACbC,UAAU;IACVC,QAAQ,CAAC,EAAEX,qBAAqB,OAAO,EAAEL,OAAOiB,sBAAsB,CAAC,CAAC;IACxEC,cAAclB,OAAOmB,kBAAkB;IAEvCC,SAAS;IACTC,YAAY;IACZC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,UAAU;IACVC,WAAW;IACXC,WAAW;IACXC,iBAAiB5B,OAAO6B,uBAAuB;IAC/CC,OAAO9B,OAAO+B,uBAAuB;IACrC,oDAAoD;IACpD,2EAA2E;IAC3EC,WAAWhC,OAAOiC,QAAQ;IAE1B,4BAA4B;QAC1BP,WAAW;IACb;IAEA,CAACvB,gCAAgC,EAAE;QACjCsB,UAAU;IACZ;IAEA,CAACrB,yBAAyB,EAAE;QAC1B8B,WAAW;QACX,0EAA0E;QAC1E,uCAAuC;QACvCC,cAAc,CAAC,KAAK,EAAE7B,gBAAgB,GAAG,EAAEJ,mCAAmC,CAAC,CAAC;QAChFkC,kBAAkBlC;QAClBmC,gBAAgBnC;QAChBoC,mBAAmBpC;IACrB;AACF;AAEA,MAAMqC,uBAAuB1C,gBAAgB;IAC3Cc,OAAO;IACPiB,iBAAiB5B,OAAOwC,sBAAsB;IAC9CjB,UAAU;AACZ;AAEA,MAAMkB,YAAY3C,WAAW;IAC3B4C,sBAAsB;QACpBd,iBAAiB5B,OAAO2C,0BAA0B;IACpD;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAACC;IAC9C;IAEA,MAAM,EAAEC,cAAc,EAAEtC,IAAI,EAAEC,QAAQ,EAAE,GAAGoC;IAE3C,MAAME,gBAAgBrC;IAEtB,MAAMsC,oBAAoBT;IAC1B,MAAMU,SAASR;IAEfjC,KAAK0C,SAAS,GAAGnD,aAAaQ,wBAAwBC,IAAI,EAAEuC,eAAevC,KAAK0C,SAAS;IAEzF,IAAIzC,UAAU;QACZA,SAASyC,SAAS,GAAGnD,aACnBQ,wBAAwBE,QAAQ,EAChCuC,mBACAF,kBAAkBG,OAAOP,oBAAoB,EAC7CjC,SAASyC,SAAS;IAEtB;IAEA,OAAOL;AACT,EAAE"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';
|
|
2
|
+
import { typographyStyles } from '@fluentui/react-theme';
|
|
3
|
+
import { createFocusOutlineStyle } from '@fluentui/react-tabster';
|
|
4
|
+
export const dialogTitleClassNames = {
|
|
5
|
+
root: 'fui-DialogTitle',
|
|
6
|
+
action: 'fui-DialogTitle__action'
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Styles for the root slot
|
|
10
|
+
*/ const useRootResetStyles = makeResetStyles({
|
|
11
|
+
...typographyStyles.subtitle1,
|
|
12
|
+
margin: 0,
|
|
13
|
+
gridRowStart: 1,
|
|
14
|
+
gridRowEnd: 1,
|
|
15
|
+
gridColumnStart: 1,
|
|
16
|
+
gridColumnEnd: 3
|
|
17
|
+
});
|
|
18
|
+
const useStyles = makeStyles({
|
|
19
|
+
rootWithoutAction: {
|
|
20
|
+
gridColumnEnd: 4
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* Styles for the action slot
|
|
25
|
+
*/ const useActionResetStyles = makeResetStyles({
|
|
26
|
+
gridRowStart: 1,
|
|
27
|
+
gridRowEnd: 1,
|
|
28
|
+
gridColumnStart: 3,
|
|
29
|
+
justifySelf: 'end',
|
|
30
|
+
alignSelf: 'start'
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* Styles to be applied on internal elements used by default action on non-modal Dialog
|
|
34
|
+
* @internal
|
|
35
|
+
*/ export const useDialogTitleInternalStyles = makeResetStyles({
|
|
36
|
+
...createFocusOutlineStyle(),
|
|
37
|
+
overflow: 'visible',
|
|
38
|
+
padding: 0,
|
|
39
|
+
borderStyle: 'none',
|
|
40
|
+
position: 'relative',
|
|
41
|
+
boxSizing: 'content-box',
|
|
42
|
+
backgroundColor: 'inherit',
|
|
43
|
+
color: 'inherit',
|
|
44
|
+
fontFamily: 'inherit',
|
|
45
|
+
fontSize: 'inherit',
|
|
46
|
+
cursor: 'pointer',
|
|
47
|
+
lineHeight: 0,
|
|
48
|
+
WebkitAppearance: 'button',
|
|
49
|
+
textAlign: 'unset'
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* Apply styling to the DialogTitle slots based on the state
|
|
53
|
+
*/ export const useDialogTitleStyles_unstable = (state)=>{
|
|
54
|
+
'use no memo';
|
|
55
|
+
const rootResetStyles = useRootResetStyles();
|
|
56
|
+
const actionResetStyles = useActionResetStyles();
|
|
57
|
+
const styles = useStyles();
|
|
58
|
+
state.root.className = mergeClasses(dialogTitleClassNames.root, rootResetStyles, !state.action && styles.rootWithoutAction, state.root.className);
|
|
59
|
+
if (state.action) {
|
|
60
|
+
state.action.className = mergeClasses(dialogTitleClassNames.action, actionResetStyles, state.action.className);
|
|
61
|
+
}
|
|
62
|
+
return state;
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DialogTitle/useDialogTitleStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { DialogTitleSlots, DialogTitleState } from './DialogTitle.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\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 useRootResetStyles = makeResetStyles({\n ...typographyStyles.subtitle1,\n margin: 0,\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 1,\n gridColumnEnd: 3,\n});\n\nconst useStyles = makeStyles({\n rootWithoutAction: {\n gridColumnEnd: 4,\n },\n});\n\n/**\n * Styles for the action slot\n */\nconst useActionResetStyles = makeResetStyles({\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 3,\n justifySelf: 'end',\n alignSelf: 'start',\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 = 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/**\n * Apply styling to the DialogTitle slots based on the state\n */\nexport const useDialogTitleStyles_unstable = (state: DialogTitleState): DialogTitleState => {\n 'use no memo';\n\n const rootResetStyles = useRootResetStyles();\n const actionResetStyles = useActionResetStyles();\n const styles = useStyles();\n\n state.root.className = mergeClasses(\n dialogTitleClassNames.root,\n rootResetStyles,\n !state.action && styles.rootWithoutAction,\n state.root.className,\n );\n\n if (state.action) {\n state.action.className = mergeClasses(dialogTitleClassNames.action, actionResetStyles, state.action.className);\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","typographyStyles","createFocusOutlineStyle","dialogTitleClassNames","root","action","useRootResetStyles","subtitle1","margin","gridRowStart","gridRowEnd","gridColumnStart","gridColumnEnd","useStyles","rootWithoutAction","useActionResetStyles","justifySelf","alignSelf","useDialogTitleInternalStyles","overflow","padding","borderStyle","position","boxSizing","backgroundColor","color","fontFamily","fontSize","cursor","lineHeight","WebkitAppearance","textAlign","useDialogTitleStyles_unstable","state","rootResetStyles","actionResetStyles","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG3E,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,uBAAuB,QAAQ,0BAA0B;AAElE,OAAO,MAAMC,wBAA0D;IACrEC,MAAM;IACNC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,qBAAqBR,gBAAgB;IACzC,GAAGG,iBAAiBM,SAAS;IAC7BC,QAAQ;IACRC,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBC,eAAe;AACjB;AAEA,MAAMC,YAAYd,WAAW;IAC3Be,mBAAmB;QACjBF,eAAe;IACjB;AACF;AAEA;;CAEC,GACD,MAAMG,uBAAuBjB,gBAAgB;IAC3CW,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBK,aAAa;IACbC,WAAW;AACb;AAEA;;;CAGC,GACD,OAAO,MAAMC,+BAA+BpB,gBAAgB;IAC1D,GAAGI,yBAAyB;IAC5BiB,UAAU;IACVC,SAAS;IACTC,aAAa;IACbC,UAAU;IACVC,WAAW;IACXC,iBAAiB;IACjBC,OAAO;IACPC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,YAAY;IACZC,kBAAkB;IAClBC,WAAW;AACb,GAAG;AAEH;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC;IAC5C;IAEA,MAAMC,kBAAkB5B;IACxB,MAAM6B,oBAAoBpB;IAC1B,MAAMqB,SAASvB;IAEfoB,MAAM7B,IAAI,CAACiC,SAAS,GAAGrC,aACrBG,sBAAsBC,IAAI,EAC1B8B,iBACA,CAACD,MAAM5B,MAAM,IAAI+B,OAAOtB,iBAAiB,EACzCmB,MAAM7B,IAAI,CAACiC,SAAS;IAGtB,IAAIJ,MAAM5B,MAAM,EAAE;QAChB4B,MAAM5B,MAAM,CAACgC,SAAS,GAAGrC,aAAaG,sBAAsBE,MAAM,EAAE8B,mBAAmBF,MAAM5B,MAAM,CAACgC,SAAS;IAC/G;IAEA,OAAOJ;AACT,EAAE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { makeResetStyles } from '@griffel/react';
|
|
2
|
+
// this style must be applied to the html element to disable scrolling
|
|
3
|
+
export const useHTMLNoScrollStyles = makeResetStyles({
|
|
4
|
+
overflowY: [
|
|
5
|
+
'hidden',
|
|
6
|
+
'clip'
|
|
7
|
+
],
|
|
8
|
+
scrollbarGutter: 'stable'
|
|
9
|
+
});
|
|
10
|
+
export const useBodyNoScrollStyles = makeResetStyles({
|
|
11
|
+
overflowY: 'hidden'
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/useDisableBodyScroll.styles.ts"],"sourcesContent":["import { makeResetStyles } from '@griffel/react';\n\n// this style must be applied to the html element to disable scrolling\nexport const useHTMLNoScrollStyles = makeResetStyles({\n overflowY: ['hidden', 'clip'],\n scrollbarGutter: 'stable',\n});\n\nexport const useBodyNoScrollStyles = makeResetStyles({\n overflowY: 'hidden',\n});\n"],"names":["makeResetStyles","useHTMLNoScrollStyles","overflowY","scrollbarGutter","useBodyNoScrollStyles"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,QAAQ,iBAAiB;AAEjD,sEAAsE;AACtE,OAAO,MAAMC,wBAAwBD,gBAAgB;IACnDE,WAAW;QAAC;QAAU;KAAO;IAC7BC,iBAAiB;AACnB,GAAG;AAEH,OAAO,MAAMC,wBAAwBJ,gBAAgB;IACnDE,WAAW;AACb,GAAG"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
dialogActionsClassNames: function() {
|
|
13
|
+
return dialogActionsClassNames;
|
|
14
|
+
},
|
|
15
|
+
useDialogActionsStyles_unstable: function() {
|
|
16
|
+
return useDialogActionsStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _react = require("@griffel/react");
|
|
20
|
+
const _constants = require("../../contexts/constants");
|
|
21
|
+
const dialogActionsClassNames = {
|
|
22
|
+
root: 'fui-DialogActions'
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Styles for the root slot
|
|
26
|
+
*/ const useResetStyles = (0, _react.makeResetStyles)({
|
|
27
|
+
gap: _constants.DIALOG_GAP,
|
|
28
|
+
height: 'fit-content',
|
|
29
|
+
boxSizing: 'border-box',
|
|
30
|
+
display: 'flex',
|
|
31
|
+
gridRowStart: 3,
|
|
32
|
+
gridRowEnd: 3,
|
|
33
|
+
[_constants.MEDIA_QUERY_BREAKPOINT_SELECTOR]: {
|
|
34
|
+
flexDirection: 'column',
|
|
35
|
+
justifySelf: 'stretch'
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const useStyles = (0, _react.makeStyles)({
|
|
39
|
+
gridPositionEnd: {
|
|
40
|
+
justifySelf: 'end',
|
|
41
|
+
gridColumnStart: 2,
|
|
42
|
+
gridColumnEnd: 4,
|
|
43
|
+
[_constants.MEDIA_QUERY_BREAKPOINT_SELECTOR]: {
|
|
44
|
+
gridColumnStart: 1,
|
|
45
|
+
gridRowStart: 4,
|
|
46
|
+
gridRowEnd: 'auto'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
gridPositionStart: {
|
|
50
|
+
justifySelf: 'start',
|
|
51
|
+
gridColumnStart: 1,
|
|
52
|
+
gridColumnEnd: 2,
|
|
53
|
+
[_constants.MEDIA_QUERY_BREAKPOINT_SELECTOR]: {
|
|
54
|
+
gridColumnEnd: 4,
|
|
55
|
+
gridRowStart: 3,
|
|
56
|
+
gridRowEnd: 'auto'
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
fluidStart: {
|
|
60
|
+
gridColumnEnd: 4
|
|
61
|
+
},
|
|
62
|
+
fluidEnd: {
|
|
63
|
+
gridColumnStart: 1
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
const useDialogActionsStyles_unstable = (state)=>{
|
|
67
|
+
'use no memo';
|
|
68
|
+
const resetStyles = useResetStyles();
|
|
69
|
+
const styles = useStyles();
|
|
70
|
+
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);
|
|
71
|
+
return state;
|
|
72
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DialogActions/useDialogActionsStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { DialogActionsSlots, DialogActionsState } from './DialogActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { DIALOG_GAP, MEDIA_QUERY_BREAKPOINT_SELECTOR } from '../../contexts/constants';\n\nexport const dialogActionsClassNames: SlotClassNames<DialogActionsSlots> = {\n root: 'fui-DialogActions',\n};\n\n/**\n * Styles for the root slot\n */\nconst 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});\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/**\n * Apply styling to the DialogActions slots based on the state\n */\nexport const useDialogActionsStyles_unstable = (state: DialogActionsState): DialogActionsState => {\n 'use no memo';\n\n const resetStyles = useResetStyles();\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogActionsClassNames.root,\n resetStyles,\n state.position === 'start' && styles.gridPositionStart,\n state.position === 'end' && styles.gridPositionEnd,\n state.fluid && state.position === 'start' && styles.fluidStart,\n state.fluid && state.position === 'end' && styles.fluidEnd,\n state.root.className,\n );\n return state;\n};\n"],"names":["dialogActionsClassNames","useDialogActionsStyles_unstable","root","useResetStyles","makeResetStyles","gap","DIALOG_GAP","height","boxSizing","display","gridRowStart","gridRowEnd","MEDIA_QUERY_BREAKPOINT_SELECTOR","flexDirection","justifySelf","useStyles","makeStyles","gridPositionEnd","gridColumnStart","gridColumnEnd","gridPositionStart","fluidStart","fluidEnd","state","resetStyles","styles","className","mergeClasses","position","fluid"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,uBAAAA;eAAAA;;IAoDAC,+BAAAA;eAAAA;;;uBAzD6C;2BAGE;AAErD,MAAMD,0BAA8D;IACzEE,MAAM;AACR;AAEA;;CAEC,GACD,MAAMC,iBAAiBC,IAAAA,sBAAAA,EAAgB;IACrCC,KAAKC,qBAAAA;IACLC,QAAQ;IACRC,WAAW;IACXC,SAAS;IACTC,cAAc;IACdC,YAAY;IACZ,CAACC,0CAAAA,CAAgC,EAAE;QACjCC,eAAe;QACfC,aAAa;IACf;AACF;AAEA,MAAMC,YAAYC,IAAAA,iBAAAA,EAAW;IAC3BC,iBAAiB;QACfH,aAAa;QACbI,iBAAiB;QACjBC,eAAe;QACf,CAACP,0CAAAA,CAAgC,EAAE;YACjCM,iBAAiB;YACjBR,cAAc;YACdC,YAAY;QACd;IACF;IACAS,mBAAmB;QACjBN,aAAa;QACbI,iBAAiB;QACjBC,eAAe;QACf,CAACP,0CAAAA,CAAgC,EAAE;YACjCO,eAAe;YACfT,cAAc;YACdC,YAAY;QACd;IACF;IACAU,YAAY;QACVF,eAAe;IACjB;IACAG,UAAU;QACRJ,iBAAiB;IACnB;AACF;AAKO,MAAMjB,kCAAkC,CAACsB;IAC9C;IAEA,MAAMC,cAAcrB;IACpB,MAAMsB,SAASV;IACfQ,MAAMrB,IAAI,CAACwB,SAAS,GAAGC,IAAAA,mBAAAA,EACrB3B,wBAAwBE,IAAI,EAC5BsB,aACAD,MAAMK,QAAQ,KAAK,WAAWH,OAAOL,iBAAiB,EACtDG,MAAMK,QAAQ,KAAK,SAASH,OAAOR,eAAe,EAClDM,MAAMM,KAAK,IAAIN,MAAMK,QAAQ,KAAK,WAAWH,OAAOJ,UAAU,EAC9DE,MAAMM,KAAK,IAAIN,MAAMK,QAAQ,KAAK,SAASH,OAAOH,QAAQ,EAC1DC,MAAMrB,IAAI,CAACwB,SAAS;IAEtB,OAAOH;AACT"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
dialogBodyClassNames: function() {
|
|
13
|
+
return dialogBodyClassNames;
|
|
14
|
+
},
|
|
15
|
+
useDialogBodyStyles_unstable: function() {
|
|
16
|
+
return useDialogBodyStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _react = require("@griffel/react");
|
|
20
|
+
const _contexts = require("../../contexts");
|
|
21
|
+
const dialogBodyClassNames = {
|
|
22
|
+
root: 'fui-DialogBody'
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Styles for the root slot
|
|
26
|
+
*/ const useResetStyles = (0, _react.makeResetStyles)({
|
|
27
|
+
overflow: 'unset',
|
|
28
|
+
gap: _contexts.DIALOG_GAP,
|
|
29
|
+
display: 'grid',
|
|
30
|
+
maxHeight: `calc(100vh - 2 * ${_contexts.SURFACE_PADDING})`,
|
|
31
|
+
boxSizing: 'border-box',
|
|
32
|
+
gridTemplateRows: 'auto 1fr',
|
|
33
|
+
gridTemplateColumns: '1fr 1fr auto',
|
|
34
|
+
'@supports (height: 1dvh)': {
|
|
35
|
+
maxHeight: `calc(100dvh - 2 * ${_contexts.SURFACE_PADDING})`
|
|
36
|
+
},
|
|
37
|
+
[_contexts.MEDIA_QUERY_BREAKPOINT_SELECTOR]: {
|
|
38
|
+
maxWidth: '100vw',
|
|
39
|
+
gridTemplateRows: 'auto 1fr auto'
|
|
40
|
+
},
|
|
41
|
+
[_contexts.MEDIA_QUERY_SHORT_SCREEN]: {
|
|
42
|
+
maxHeight: 'unset'
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const useDialogBodyStyles_unstable = (state)=>{
|
|
46
|
+
'use no memo';
|
|
47
|
+
const resetStyles = useResetStyles();
|
|
48
|
+
state.root.className = (0, _react.mergeClasses)(dialogBodyClassNames.root, resetStyles, state.root.className);
|
|
49
|
+
return state;
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DialogBody/useDialogBodyStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { DialogBodySlots, DialogBodyState } from './DialogBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { DIALOG_GAP, MEDIA_QUERY_BREAKPOINT_SELECTOR, MEDIA_QUERY_SHORT_SCREEN, SURFACE_PADDING } from '../../contexts';\n\nexport const dialogBodyClassNames: SlotClassNames<DialogBodySlots> = {\n root: 'fui-DialogBody',\n};\n\n/**\n * Styles for the root slot\n */\nconst 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\n '@supports (height: 1dvh)': {\n maxHeight: `calc(100dvh - 2 * ${SURFACE_PADDING})`,\n },\n\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n gridTemplateRows: 'auto 1fr auto',\n },\n\n [MEDIA_QUERY_SHORT_SCREEN]: {\n maxHeight: 'unset',\n },\n});\n\n/**\n * Apply styling to the DialogBody slots based on the state\n */\nexport const useDialogBodyStyles_unstable = (state: DialogBodyState): DialogBodyState => {\n 'use no memo';\n\n const resetStyles = useResetStyles();\n\n state.root.className = mergeClasses(dialogBodyClassNames.root, resetStyles, state.root.className);\n\n return state;\n};\n"],"names":["dialogBodyClassNames","useDialogBodyStyles_unstable","root","useResetStyles","makeResetStyles","overflow","gap","DIALOG_GAP","display","maxHeight","SURFACE_PADDING","boxSizing","gridTemplateRows","gridTemplateColumns","MEDIA_QUERY_BREAKPOINT_SELECTOR","maxWidth","MEDIA_QUERY_SHORT_SCREEN","state","resetStyles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,oBAAAA;eAAAA;;IAiCAC,4BAAAA;eAAAA;;;uBAtCiC;0BAGyD;AAEhG,MAAMD,uBAAwD;IACnEE,MAAM;AACR;AAEA;;CAEC,GACD,MAAMC,iBAAiBC,IAAAA,sBAAAA,EAAgB;IACrCC,UAAU;IACVC,KAAKC,oBAAAA;IACLC,SAAS;IACTC,WAAW,CAAC,iBAAiB,EAAEC,yBAAAA,CAAgB,CAAC,CAAC;IACjDC,WAAW;IACXC,kBAAkB;IAClBC,qBAAqB;IAErB,4BAA4B;QAC1BJ,WAAW,CAAC,kBAAkB,EAAEC,yBAAAA,CAAgB,CAAC,CAAC;IACpD;IAEA,CAACI,yCAAAA,CAAgC,EAAE;QACjCC,UAAU;QACVH,kBAAkB;IACpB;IAEA,CAACI,kCAAAA,CAAyB,EAAE;QAC1BP,WAAW;IACb;AACF;AAKO,MAAMR,+BAA+B,CAACgB;IAC3C;IAEA,MAAMC,cAAcf;IAEpBc,MAAMf,IAAI,CAACiB,SAAS,GAAGC,IAAAA,mBAAAA,EAAapB,qBAAqBE,IAAI,EAAEgB,aAAaD,MAAMf,IAAI,CAACiB,SAAS;IAEhG,OAAOF;AACT"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
dialogContentClassNames: function() {
|
|
13
|
+
return dialogContentClassNames;
|
|
14
|
+
},
|
|
15
|
+
useDialogContentStyles_unstable: function() {
|
|
16
|
+
return useDialogContentStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _react = require("@griffel/react");
|
|
20
|
+
const _reacttheme = require("@fluentui/react-theme");
|
|
21
|
+
const _contexts = require("../../contexts");
|
|
22
|
+
const dialogContentClassNames = {
|
|
23
|
+
root: 'fui-DialogContent'
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Styles for the root slot
|
|
27
|
+
*/ const useStyles = (0, _react.makeResetStyles)({
|
|
28
|
+
padding: _reacttheme.tokens.strokeWidthThick,
|
|
29
|
+
margin: `calc(${_reacttheme.tokens.strokeWidthThick} * -1)`,
|
|
30
|
+
..._reacttheme.typographyStyles.body1,
|
|
31
|
+
overflowY: 'auto',
|
|
32
|
+
minHeight: '32px',
|
|
33
|
+
boxSizing: 'border-box',
|
|
34
|
+
gridRowStart: 2,
|
|
35
|
+
gridRowEnd: 2,
|
|
36
|
+
gridColumnStart: 1,
|
|
37
|
+
gridColumnEnd: 4,
|
|
38
|
+
[_contexts.MEDIA_QUERY_SHORT_SCREEN]: {
|
|
39
|
+
overflowY: 'unset'
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const useDialogContentStyles_unstable = (state)=>{
|
|
43
|
+
'use no memo';
|
|
44
|
+
const styles = useStyles();
|
|
45
|
+
state.root.className = (0, _react.mergeClasses)(dialogContentClassNames.root, styles, state.root.className);
|
|
46
|
+
return state;
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DialogContent/useDialogContentStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { DialogContentSlots, DialogContentState } from './DialogContent.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { MEDIA_QUERY_SHORT_SCREEN } from '../../contexts';\n\nexport const dialogContentClassNames: SlotClassNames<DialogContentSlots> = {\n root: 'fui-DialogContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst 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\n [MEDIA_QUERY_SHORT_SCREEN]: {\n overflowY: 'unset',\n },\n});\n\n/**\n * Apply styling to the DialogContent slots based on the state\n */\nexport const useDialogContentStyles_unstable = (state: DialogContentState): DialogContentState => {\n 'use no memo';\n\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","makeResetStyles","padding","tokens","strokeWidthThick","margin","typographyStyles","body1","overflowY","minHeight","boxSizing","gridRowStart","gridRowEnd","gridColumnStart","gridColumnEnd","MEDIA_QUERY_SHORT_SCREEN","state","styles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,uBAAAA;eAAAA;;IA2BAC,+BAAAA;eAAAA;;;uBAjCiC;4BAGL;0BACA;AAElC,MAAMD,0BAA8D;IACzEE,MAAM;AACR;AAEA;;CAEC,GACD,MAAMC,YAAYC,IAAAA,sBAAAA,EAAgB;IAChCC,SAASC,kBAAAA,CAAOC,gBAAgB;IAChCC,QAAQ,CAAC,KAAK,EAAEF,kBAAAA,CAAOC,gBAAgB,CAAC,MAAM,CAAC;IAC/C,GAAGE,4BAAAA,CAAiBC,KAAK;IACzBC,WAAW;IACXC,WAAW;IACXC,WAAW;IACXC,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBC,eAAe;IAEf,CAACC,kCAAAA,CAAyB,EAAE;QAC1BP,WAAW;IACb;AACF;AAKO,MAAMV,kCAAkC,CAACkB;IAC9C;IAEA,MAAMC,SAASjB;IACfgB,MAAMjB,IAAI,CAACmB,SAAS,GAAGC,IAAAA,mBAAAA,EAAatB,wBAAwBE,IAAI,EAAEkB,QAAQD,MAAMjB,IAAI,CAACmB,SAAS;IAC9F,OAAOF;AACT"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
dialogSurfaceClassNames: function() {
|
|
13
|
+
return dialogSurfaceClassNames;
|
|
14
|
+
},
|
|
15
|
+
useDialogSurfaceStyles_unstable: function() {
|
|
16
|
+
return useDialogSurfaceStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _react = require("@griffel/react");
|
|
20
|
+
const _reacttheme = require("@fluentui/react-theme");
|
|
21
|
+
const _reacttabster = require("@fluentui/react-tabster");
|
|
22
|
+
const _contexts = require("../../contexts");
|
|
23
|
+
const dialogSurfaceClassNames = {
|
|
24
|
+
root: 'fui-DialogSurface',
|
|
25
|
+
backdrop: 'fui-DialogSurface__backdrop'
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the root slot
|
|
29
|
+
*/ const useRootBaseStyle = (0, _react.makeResetStyles)({
|
|
30
|
+
...(0, _reacttabster.createFocusOutlineStyle)(),
|
|
31
|
+
inset: 0,
|
|
32
|
+
padding: _contexts.SURFACE_PADDING,
|
|
33
|
+
margin: 'auto',
|
|
34
|
+
borderStyle: 'none',
|
|
35
|
+
overflow: 'unset',
|
|
36
|
+
border: `${_contexts.SURFACE_BORDER_WIDTH} solid ${_reacttheme.tokens.colorTransparentStroke}`,
|
|
37
|
+
borderRadius: _reacttheme.tokens.borderRadiusXLarge,
|
|
38
|
+
display: 'block',
|
|
39
|
+
userSelect: 'unset',
|
|
40
|
+
visibility: 'unset',
|
|
41
|
+
position: 'fixed',
|
|
42
|
+
height: 'fit-content',
|
|
43
|
+
maxWidth: '600px',
|
|
44
|
+
maxHeight: '100vh',
|
|
45
|
+
boxSizing: 'border-box',
|
|
46
|
+
backgroundColor: _reacttheme.tokens.colorNeutralBackground1,
|
|
47
|
+
color: _reacttheme.tokens.colorNeutralForeground1,
|
|
48
|
+
// Same styles as DialogSurfaceMotion last keyframe,
|
|
49
|
+
// to ensure dialog will be properly styled when surfaceMotion is opted-out
|
|
50
|
+
boxShadow: _reacttheme.tokens.shadow64,
|
|
51
|
+
'@supports (height: 1dvh)': {
|
|
52
|
+
maxHeight: '100dvh'
|
|
53
|
+
},
|
|
54
|
+
[_contexts.MEDIA_QUERY_BREAKPOINT_SELECTOR]: {
|
|
55
|
+
maxWidth: '100vw'
|
|
56
|
+
},
|
|
57
|
+
[_contexts.MEDIA_QUERY_SHORT_SCREEN]: {
|
|
58
|
+
overflowY: 'auto',
|
|
59
|
+
// We need to offset the scrollbar by adding transparent borders otherwise
|
|
60
|
+
// it conflicts with the border radius.
|
|
61
|
+
paddingRight: `calc(${_contexts.SURFACE_PADDING} - ${_contexts.FULLSCREEN_DIALOG_SCROLLBAR_OFFSET})`,
|
|
62
|
+
borderRightWidth: _contexts.FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,
|
|
63
|
+
borderTopWidth: _contexts.FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,
|
|
64
|
+
borderBottomWidth: _contexts.FULLSCREEN_DIALOG_SCROLLBAR_OFFSET
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
const useBackdropBaseStyle = (0, _react.makeResetStyles)({
|
|
68
|
+
inset: '0px',
|
|
69
|
+
backgroundColor: _reacttheme.tokens.colorBackgroundOverlay,
|
|
70
|
+
position: 'fixed'
|
|
71
|
+
});
|
|
72
|
+
const useStyles = (0, _react.makeStyles)({
|
|
73
|
+
nestedDialogBackdrop: {
|
|
74
|
+
backgroundColor: _reacttheme.tokens.colorTransparentBackground
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
const useDialogSurfaceStyles_unstable = (state)=>{
|
|
78
|
+
'use no memo';
|
|
79
|
+
const { isNestedDialog, root, backdrop } = state;
|
|
80
|
+
const rootBaseStyle = useRootBaseStyle();
|
|
81
|
+
const backdropBaseStyle = useBackdropBaseStyle();
|
|
82
|
+
const styles = useStyles();
|
|
83
|
+
root.className = (0, _react.mergeClasses)(dialogSurfaceClassNames.root, rootBaseStyle, root.className);
|
|
84
|
+
if (backdrop) {
|
|
85
|
+
backdrop.className = (0, _react.mergeClasses)(dialogSurfaceClassNames.backdrop, backdropBaseStyle, isNestedDialog && styles.nestedDialogBackdrop, backdrop.className);
|
|
86
|
+
}
|
|
87
|
+
return state;
|
|
88
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DialogSurface/useDialogSurfaceStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport {\n FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n MEDIA_QUERY_SHORT_SCREEN,\n SURFACE_BORDER_WIDTH,\n SURFACE_PADDING,\n} from '../../contexts';\nimport type { DialogSurfaceSlots, DialogSurfaceState } from './DialogSurface.types';\n\nexport const dialogSurfaceClassNames: SlotClassNames<Omit<DialogSurfaceSlots, 'backdropMotion'>> = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop',\n};\n\n/**\n * Styles for the root slot\n */\nconst 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\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\n '@supports (height: 1dvh)': {\n maxHeight: '100dvh',\n },\n\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n },\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});\n\nconst useBackdropBaseStyle = makeResetStyles({\n inset: '0px',\n backgroundColor: tokens.colorBackgroundOverlay,\n position: 'fixed',\n});\n\nconst useStyles = makeStyles({\n nestedDialogBackdrop: {\n backgroundColor: tokens.colorTransparentBackground,\n },\n});\n\n/**\n * Apply styling to the DialogSurface slots based on the state\n */\nexport const useDialogSurfaceStyles_unstable = (state: DialogSurfaceState): DialogSurfaceState => {\n 'use no memo';\n\n const { isNestedDialog, root, backdrop } = state;\n\n const rootBaseStyle = useRootBaseStyle();\n\n const backdropBaseStyle = useBackdropBaseStyle();\n const styles = useStyles();\n\n root.className = mergeClasses(dialogSurfaceClassNames.root, rootBaseStyle, root.className);\n\n if (backdrop) {\n backdrop.className = mergeClasses(\n dialogSurfaceClassNames.backdrop,\n backdropBaseStyle,\n isNestedDialog && styles.nestedDialogBackdrop,\n backdrop.className,\n );\n }\n\n return state;\n};\n"],"names":["dialogSurfaceClassNames","useDialogSurfaceStyles_unstable","root","backdrop","useRootBaseStyle","makeResetStyles","createFocusOutlineStyle","inset","padding","SURFACE_PADDING","margin","borderStyle","overflow","border","SURFACE_BORDER_WIDTH","tokens","colorTransparentStroke","borderRadius","borderRadiusXLarge","display","userSelect","visibility","position","height","maxWidth","maxHeight","boxSizing","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground1","boxShadow","shadow64","MEDIA_QUERY_BREAKPOINT_SELECTOR","MEDIA_QUERY_SHORT_SCREEN","overflowY","paddingRight","FULLSCREEN_DIALOG_SCROLLBAR_OFFSET","borderRightWidth","borderTopWidth","borderBottomWidth","useBackdropBaseStyle","colorBackgroundOverlay","useStyles","makeStyles","nestedDialogBackdrop","colorTransparentBackground","state","isNestedDialog","rootBaseStyle","backdropBaseStyle","styles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAaaA,uBAAAA;eAAAA;;IAkEAC,+BAAAA;eAAAA;;;uBA/E6C;4BAEnC;8BACiB;0BAOjC;AAGA,MAAMD,0BAAsF;IACjGE,MAAM;IACNC,UAAU;AACZ;AAEA;;CAEC,GACD,MAAMC,mBAAmBC,IAAAA,sBAAAA,EAAgB;IACvC,GAAGC,IAAAA,qCAAAA,GAAyB;IAC5BC,OAAO;IACPC,SAASC,yBAAAA;IACTC,QAAQ;IACRC,aAAa;IACbC,UAAU;IACVC,QAAQ,CAAC,EAAEC,8BAAAA,CAAqB,OAAO,EAAEC,kBAAAA,CAAOC,sBAAsB,CAAC,CAAC;IACxEC,cAAcF,kBAAAA,CAAOG,kBAAkB;IAEvCC,SAAS;IACTC,YAAY;IACZC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,UAAU;IACVC,WAAW;IACXC,WAAW;IACXC,iBAAiBZ,kBAAAA,CAAOa,uBAAuB;IAC/CC,OAAOd,kBAAAA,CAAOe,uBAAuB;IACrC,oDAAoD;IACpD,2EAA2E;IAC3EC,WAAWhB,kBAAAA,CAAOiB,QAAQ;IAE1B,4BAA4B;QAC1BP,WAAW;IACb;IAEA,CAACQ,yCAAAA,CAAgC,EAAE;QACjCT,UAAU;IACZ;IAEA,CAACU,kCAAAA,CAAyB,EAAE;QAC1BC,WAAW;QACX,0EAA0E;QAC1E,uCAAuC;QACvCC,cAAc,CAAC,KAAK,EAAE3B,yBAAAA,CAAgB,GAAG,EAAE4B,4CAAAA,CAAmC,CAAC,CAAC;QAChFC,kBAAkBD,4CAAAA;QAClBE,gBAAgBF,4CAAAA;QAChBG,mBAAmBH,4CAAAA;IACrB;AACF;AAEA,MAAMI,uBAAuBpC,IAAAA,sBAAAA,EAAgB;IAC3CE,OAAO;IACPoB,iBAAiBZ,kBAAAA,CAAO2B,sBAAsB;IAC9CpB,UAAU;AACZ;AAEA,MAAMqB,YAAYC,IAAAA,iBAAAA,EAAW;IAC3BC,sBAAsB;QACpBlB,iBAAiBZ,kBAAAA,CAAO+B,0BAA0B;IACpD;AACF;AAKO,MAAM7C,kCAAkC,CAAC8C;IAC9C;IAEA,MAAM,EAAEC,cAAc,EAAE9C,IAAI,EAAEC,QAAQ,EAAE,GAAG4C;IAE3C,MAAME,gBAAgB7C;IAEtB,MAAM8C,oBAAoBT;IAC1B,MAAMU,SAASR;IAEfzC,KAAKkD,SAAS,GAAGC,IAAAA,mBAAAA,EAAarD,wBAAwBE,IAAI,EAAE+C,eAAe/C,KAAKkD,SAAS;IAEzF,IAAIjD,UAAU;QACZA,SAASiD,SAAS,GAAGC,IAAAA,mBAAAA,EACnBrD,wBAAwBG,QAAQ,EAChC+C,mBACAF,kBAAkBG,OAAON,oBAAoB,EAC7C1C,SAASiD,SAAS;IAEtB;IAEA,OAAOL;AACT"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
dialogTitleClassNames: function() {
|
|
13
|
+
return dialogTitleClassNames;
|
|
14
|
+
},
|
|
15
|
+
useDialogTitleInternalStyles: function() {
|
|
16
|
+
return useDialogTitleInternalStyles;
|
|
17
|
+
},
|
|
18
|
+
useDialogTitleStyles_unstable: function() {
|
|
19
|
+
return useDialogTitleStyles_unstable;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const _react = require("@griffel/react");
|
|
23
|
+
const _reacttheme = require("@fluentui/react-theme");
|
|
24
|
+
const _reacttabster = require("@fluentui/react-tabster");
|
|
25
|
+
const dialogTitleClassNames = {
|
|
26
|
+
root: 'fui-DialogTitle',
|
|
27
|
+
action: 'fui-DialogTitle__action'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Styles for the root slot
|
|
31
|
+
*/ const useRootResetStyles = (0, _react.makeResetStyles)({
|
|
32
|
+
..._reacttheme.typographyStyles.subtitle1,
|
|
33
|
+
margin: 0,
|
|
34
|
+
gridRowStart: 1,
|
|
35
|
+
gridRowEnd: 1,
|
|
36
|
+
gridColumnStart: 1,
|
|
37
|
+
gridColumnEnd: 3
|
|
38
|
+
});
|
|
39
|
+
const useStyles = (0, _react.makeStyles)({
|
|
40
|
+
rootWithoutAction: {
|
|
41
|
+
gridColumnEnd: 4
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* Styles for the action slot
|
|
46
|
+
*/ const useActionResetStyles = (0, _react.makeResetStyles)({
|
|
47
|
+
gridRowStart: 1,
|
|
48
|
+
gridRowEnd: 1,
|
|
49
|
+
gridColumnStart: 3,
|
|
50
|
+
justifySelf: 'end',
|
|
51
|
+
alignSelf: 'start'
|
|
52
|
+
});
|
|
53
|
+
const useDialogTitleInternalStyles = (0, _react.makeResetStyles)({
|
|
54
|
+
...(0, _reacttabster.createFocusOutlineStyle)(),
|
|
55
|
+
overflow: 'visible',
|
|
56
|
+
padding: 0,
|
|
57
|
+
borderStyle: 'none',
|
|
58
|
+
position: 'relative',
|
|
59
|
+
boxSizing: 'content-box',
|
|
60
|
+
backgroundColor: 'inherit',
|
|
61
|
+
color: 'inherit',
|
|
62
|
+
fontFamily: 'inherit',
|
|
63
|
+
fontSize: 'inherit',
|
|
64
|
+
cursor: 'pointer',
|
|
65
|
+
lineHeight: 0,
|
|
66
|
+
WebkitAppearance: 'button',
|
|
67
|
+
textAlign: 'unset'
|
|
68
|
+
});
|
|
69
|
+
const useDialogTitleStyles_unstable = (state)=>{
|
|
70
|
+
'use no memo';
|
|
71
|
+
const rootResetStyles = useRootResetStyles();
|
|
72
|
+
const actionResetStyles = useActionResetStyles();
|
|
73
|
+
const styles = useStyles();
|
|
74
|
+
state.root.className = (0, _react.mergeClasses)(dialogTitleClassNames.root, rootResetStyles, !state.action && styles.rootWithoutAction, state.root.className);
|
|
75
|
+
if (state.action) {
|
|
76
|
+
state.action.className = (0, _react.mergeClasses)(dialogTitleClassNames.action, actionResetStyles, state.action.className);
|
|
77
|
+
}
|
|
78
|
+
return state;
|
|
79
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DialogTitle/useDialogTitleStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { DialogTitleSlots, DialogTitleState } from './DialogTitle.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\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 useRootResetStyles = makeResetStyles({\n ...typographyStyles.subtitle1,\n margin: 0,\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 1,\n gridColumnEnd: 3,\n});\n\nconst useStyles = makeStyles({\n rootWithoutAction: {\n gridColumnEnd: 4,\n },\n});\n\n/**\n * Styles for the action slot\n */\nconst useActionResetStyles = makeResetStyles({\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 3,\n justifySelf: 'end',\n alignSelf: 'start',\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 = 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/**\n * Apply styling to the DialogTitle slots based on the state\n */\nexport const useDialogTitleStyles_unstable = (state: DialogTitleState): DialogTitleState => {\n 'use no memo';\n\n const rootResetStyles = useRootResetStyles();\n const actionResetStyles = useActionResetStyles();\n const styles = useStyles();\n\n state.root.className = mergeClasses(\n dialogTitleClassNames.root,\n rootResetStyles,\n !state.action && styles.rootWithoutAction,\n state.root.className,\n );\n\n if (state.action) {\n state.action.className = mergeClasses(dialogTitleClassNames.action, actionResetStyles, state.action.className);\n }\n\n return state;\n};\n"],"names":["dialogTitleClassNames","useDialogTitleInternalStyles","useDialogTitleStyles_unstable","root","action","useRootResetStyles","makeResetStyles","typographyStyles","subtitle1","margin","gridRowStart","gridRowEnd","gridColumnStart","gridColumnEnd","useStyles","makeStyles","rootWithoutAction","useActionResetStyles","justifySelf","alignSelf","createFocusOutlineStyle","overflow","padding","borderStyle","position","boxSizing","backgroundColor","color","fontFamily","fontSize","cursor","lineHeight","WebkitAppearance","textAlign","state","rootResetStyles","actionResetStyles","styles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,qBAAAA;eAAAA;;IAsCAC,4BAAAA;eAAAA;;IAoBAC,6BAAAA;eAAAA;;;uBAhE6C;4BAGzB;8BACO;AAEjC,MAAMF,wBAA0D;IACrEG,MAAM;IACNC,QAAQ;AACV;AAEA;;CAEC,GACD,MAAMC,qBAAqBC,IAAAA,sBAAAA,EAAgB;IACzC,GAAGC,4BAAAA,CAAiBC,SAAS;IAC7BC,QAAQ;IACRC,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBC,eAAe;AACjB;AAEA,MAAMC,YAAYC,IAAAA,iBAAAA,EAAW;IAC3BC,mBAAmB;QACjBH,eAAe;IACjB;AACF;AAEA;;CAEC,GACD,MAAMI,uBAAuBX,IAAAA,sBAAAA,EAAgB;IAC3CI,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBM,aAAa;IACbC,WAAW;AACb;AAMO,MAAMlB,+BAA+BK,IAAAA,sBAAAA,EAAgB;IAC1D,GAAGc,IAAAA,qCAAAA,GAAyB;IAC5BC,UAAU;IACVC,SAAS;IACTC,aAAa;IACbC,UAAU;IACVC,WAAW;IACXC,iBAAiB;IACjBC,OAAO;IACPC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,YAAY;IACZC,kBAAkB;IAClBC,WAAW;AACb;AAKO,MAAM/B,gCAAgC,CAACgC;IAC5C;IAEA,MAAMC,kBAAkB9B;IACxB,MAAM+B,oBAAoBnB;IAC1B,MAAMoB,SAASvB;IAEfoB,MAAM/B,IAAI,CAACmC,SAAS,GAAGC,IAAAA,mBAAAA,EACrBvC,sBAAsBG,IAAI,EAC1BgC,iBACA,CAACD,MAAM9B,MAAM,IAAIiC,OAAOrB,iBAAiB,EACzCkB,MAAM/B,IAAI,CAACmC,SAAS;IAGtB,IAAIJ,MAAM9B,MAAM,EAAE;QAChB8B,MAAM9B,MAAM,CAACkC,SAAS,GAAGC,IAAAA,mBAAAA,EAAavC,sBAAsBI,MAAM,EAAEgC,mBAAmBF,MAAM9B,MAAM,CAACkC,SAAS;IAC/G;IAEA,OAAOJ;AACT"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
useBodyNoScrollStyles: function() {
|
|
13
|
+
return useBodyNoScrollStyles;
|
|
14
|
+
},
|
|
15
|
+
useHTMLNoScrollStyles: function() {
|
|
16
|
+
return useHTMLNoScrollStyles;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _react = require("@griffel/react");
|
|
20
|
+
const useHTMLNoScrollStyles = (0, _react.makeResetStyles)({
|
|
21
|
+
overflowY: [
|
|
22
|
+
'hidden',
|
|
23
|
+
'clip'
|
|
24
|
+
],
|
|
25
|
+
scrollbarGutter: 'stable'
|
|
26
|
+
});
|
|
27
|
+
const useBodyNoScrollStyles = (0, _react.makeResetStyles)({
|
|
28
|
+
overflowY: 'hidden'
|
|
29
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/useDisableBodyScroll.styles.ts"],"sourcesContent":["import { makeResetStyles } from '@griffel/react';\n\n// this style must be applied to the html element to disable scrolling\nexport const useHTMLNoScrollStyles = makeResetStyles({\n overflowY: ['hidden', 'clip'],\n scrollbarGutter: 'stable',\n});\n\nexport const useBodyNoScrollStyles = makeResetStyles({\n overflowY: 'hidden',\n});\n"],"names":["useBodyNoScrollStyles","useHTMLNoScrollStyles","makeResetStyles","overflowY","scrollbarGutter"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAQaA,qBAAAA;eAAAA;;IALAC,qBAAAA;eAAAA;;;uBAHmB;AAGzB,MAAMA,wBAAwBC,IAAAA,sBAAAA,EAAgB;IACnDC,WAAW;QAAC;QAAU;KAAO;IAC7BC,iBAAiB;AACnB;AAEO,MAAMJ,wBAAwBE,IAAAA,sBAAAA,EAAgB;IACnDC,WAAW;AACb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-dialog",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.14.0",
|
|
4
4
|
"description": "Dialog component for Fluent UI React",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"@fluentui/keyboard-keys": "^9.0.8",
|
|
30
30
|
"@fluentui/react-context-selector": "^9.2.2",
|
|
31
31
|
"@fluentui/react-motion": "^9.9.0",
|
|
32
|
-
"@fluentui/react-motion-components-preview": "^0.
|
|
32
|
+
"@fluentui/react-motion-components-preview": "^0.7.0",
|
|
33
33
|
"@fluentui/react-shared-contexts": "^9.24.0",
|
|
34
|
-
"@fluentui/react-aria": "^9.15.
|
|
34
|
+
"@fluentui/react-aria": "^9.15.4",
|
|
35
35
|
"@fluentui/react-icons": "^2.0.245",
|
|
36
|
-
"@fluentui/react-tabster": "^9.
|
|
36
|
+
"@fluentui/react-tabster": "^9.26.0",
|
|
37
37
|
"@fluentui/react-theme": "^9.1.24",
|
|
38
|
-
"@fluentui/react-portal": "^9.
|
|
38
|
+
"@fluentui/react-portal": "^9.7.0",
|
|
39
39
|
"@griffel/react": "^1.5.22",
|
|
40
40
|
"@swc/helpers": "^0.5.1"
|
|
41
41
|
},
|