@fluentui/react-dialog 9.11.21 → 9.11.23

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/dist/index.d.ts +1 -2
  3. package/lib/Dialog.js +1 -1
  4. package/lib/Dialog.js.map +1 -1
  5. package/lib/DialogActions.js +1 -1
  6. package/lib/DialogActions.js.map +1 -1
  7. package/lib/DialogBody.js +1 -1
  8. package/lib/DialogBody.js.map +1 -1
  9. package/lib/DialogContent.js +1 -1
  10. package/lib/DialogContent.js.map +1 -1
  11. package/lib/DialogSurface.js +1 -1
  12. package/lib/DialogSurface.js.map +1 -1
  13. package/lib/DialogTitle.js +1 -1
  14. package/lib/DialogTitle.js.map +1 -1
  15. package/lib/DialogTrigger.js +1 -1
  16. package/lib/DialogTrigger.js.map +1 -1
  17. package/lib/components/Dialog/index.js +4 -5
  18. package/lib/components/Dialog/index.js.map +1 -1
  19. package/lib/components/DialogActions/index.js +4 -5
  20. package/lib/components/DialogActions/index.js.map +1 -1
  21. package/lib/components/DialogBackdropMotion.js +2 -23
  22. package/lib/components/DialogBackdropMotion.js.map +1 -1
  23. package/lib/components/DialogBody/index.js +4 -5
  24. package/lib/components/DialogBody/index.js.map +1 -1
  25. package/lib/components/DialogContent/index.js +4 -5
  26. package/lib/components/DialogContent/index.js.map +1 -1
  27. package/lib/components/DialogSurface/index.js +5 -6
  28. package/lib/components/DialogSurface/index.js.map +1 -1
  29. package/lib/components/DialogTitle/index.js +4 -5
  30. package/lib/components/DialogTitle/index.js.map +1 -1
  31. package/lib/components/DialogTrigger/index.js +3 -4
  32. package/lib/components/DialogTrigger/index.js.map +1 -1
  33. package/lib/contexts/dialogSurfaceContext.js +4 -4
  34. package/lib/contexts/dialogSurfaceContext.js.map +1 -1
  35. package/lib/contexts/index.js +3 -3
  36. package/lib/contexts/index.js.map +1 -1
  37. package/lib/utils/index.js +2 -2
  38. package/lib/utils/index.js.map +1 -1
  39. package/lib/utils/useDisableBodyScroll.js +3 -3
  40. package/lib/utils/useDisableBodyScroll.js.map +1 -1
  41. package/lib-commonjs/Dialog.js +21 -2
  42. package/lib-commonjs/Dialog.js.map +1 -1
  43. package/lib-commonjs/DialogActions.js +24 -2
  44. package/lib-commonjs/DialogActions.js.map +1 -1
  45. package/lib-commonjs/DialogBody.js +24 -2
  46. package/lib-commonjs/DialogBody.js.map +1 -1
  47. package/lib-commonjs/DialogContent.js +24 -2
  48. package/lib-commonjs/DialogContent.js.map +1 -1
  49. package/lib-commonjs/DialogSurface.js +27 -2
  50. package/lib-commonjs/DialogSurface.js.map +1 -1
  51. package/lib-commonjs/DialogTitle.js +27 -2
  52. package/lib-commonjs/DialogTitle.js.map +1 -1
  53. package/lib-commonjs/DialogTrigger.js +18 -2
  54. package/lib-commonjs/DialogTrigger.js.map +1 -1
  55. package/lib-commonjs/components/Dialog/index.js +24 -6
  56. package/lib-commonjs/components/Dialog/index.js.map +1 -1
  57. package/lib-commonjs/components/DialogActions/index.js +27 -6
  58. package/lib-commonjs/components/DialogActions/index.js.map +1 -1
  59. package/lib-commonjs/components/DialogBackdropMotion.js +2 -23
  60. package/lib-commonjs/components/DialogBackdropMotion.js.map +1 -1
  61. package/lib-commonjs/components/DialogBody/index.js +27 -6
  62. package/lib-commonjs/components/DialogBody/index.js.map +1 -1
  63. package/lib-commonjs/components/DialogContent/index.js +27 -6
  64. package/lib-commonjs/components/DialogContent/index.js.map +1 -1
  65. package/lib-commonjs/components/DialogSurface/index.js +31 -7
  66. package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
  67. package/lib-commonjs/components/DialogTitle/index.js +30 -6
  68. package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
  69. package/lib-commonjs/components/DialogTrigger/index.js +20 -5
  70. package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
  71. package/lib-commonjs/contexts/dialogSurfaceContext.js +5 -4
  72. package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
  73. package/lib-commonjs/contexts/index.js +47 -4
  74. package/lib-commonjs/contexts/index.js.map +1 -1
  75. package/lib-commonjs/utils/index.js +16 -3
  76. package/lib-commonjs/utils/index.js.map +1 -1
  77. package/lib-commonjs/utils/useDisableBodyScroll.js +4 -3
  78. package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -1
  79. package/package.json +11 -10
@@ -2,5 +2,30 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./components/DialogTitle/index"), exports);
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
+ DialogTitle: function() {
13
+ return _index.DialogTitle;
14
+ },
15
+ dialogTitleClassNames: function() {
16
+ return _index.dialogTitleClassNames;
17
+ },
18
+ renderDialogTitle_unstable: function() {
19
+ return _index.renderDialogTitle_unstable;
20
+ },
21
+ useDialogTitleInternalStyles: function() {
22
+ return _index.useDialogTitleInternalStyles;
23
+ },
24
+ useDialogTitleStyles_unstable: function() {
25
+ return _index.useDialogTitleStyles_unstable;
26
+ },
27
+ useDialogTitle_unstable: function() {
28
+ return _index.useDialogTitle_unstable;
29
+ }
30
+ });
31
+ const _index = require("./components/DialogTitle/index");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/DialogTitle.ts"],"sourcesContent":["export * from './components/DialogTitle/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["../src/DialogTitle.ts"],"sourcesContent":["export type { DialogTitleProps, DialogTitleSlots, DialogTitleState } from './components/DialogTitle/index';\nexport {\n DialogTitle,\n dialogTitleClassNames,\n renderDialogTitle_unstable,\n useDialogTitleInternalStyles,\n useDialogTitleStyles_unstable,\n useDialogTitle_unstable,\n} from './components/DialogTitle/index';\n"],"names":["DialogTitle","dialogTitleClassNames","renderDialogTitle_unstable","useDialogTitleInternalStyles","useDialogTitleStyles_unstable","useDialogTitle_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEEA,WAAW;eAAXA,kBAAW;;IACXC,qBAAqB;eAArBA,4BAAqB;;IACrBC,0BAA0B;eAA1BA,iCAA0B;;IAC1BC,4BAA4B;eAA5BA,mCAA4B;;IAC5BC,6BAA6B;eAA7BA,oCAA6B;;IAC7BC,uBAAuB;eAAvBA,8BAAuB;;;uBAClB"}
@@ -2,5 +2,21 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./components/DialogTrigger/index"), exports);
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
+ DialogTrigger: function() {
13
+ return _index.DialogTrigger;
14
+ },
15
+ renderDialogTrigger_unstable: function() {
16
+ return _index.renderDialogTrigger_unstable;
17
+ },
18
+ useDialogTrigger_unstable: function() {
19
+ return _index.useDialogTrigger_unstable;
20
+ }
21
+ });
22
+ const _index = require("./components/DialogTrigger/index");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/DialogTrigger.ts"],"sourcesContent":["export * from './components/DialogTrigger/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["../src/DialogTrigger.ts"],"sourcesContent":["export type {\n DialogTriggerAction,\n DialogTriggerChildProps,\n DialogTriggerProps,\n DialogTriggerState,\n} from './components/DialogTrigger/index';\nexport {\n DialogTrigger,\n renderDialogTrigger_unstable,\n useDialogTrigger_unstable,\n} from './components/DialogTrigger/index';\n"],"names":["DialogTrigger","renderDialogTrigger_unstable","useDialogTrigger_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAOEA,aAAa;eAAbA,oBAAa;;IACbC,4BAA4B;eAA5BA,mCAA4B;;IAC5BC,yBAAyB;eAAzBA,gCAAyB;;;uBACpB"}
@@ -2,9 +2,27 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./Dialog"), exports);
7
- _export_star._(require("./Dialog.types"), exports);
8
- _export_star._(require("./renderDialog"), exports);
9
- _export_star._(require("./useDialog"), exports);
10
- _export_star._(require("./useDialogContextValues"), exports);
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
+ Dialog: function() {
13
+ return _Dialog.Dialog;
14
+ },
15
+ renderDialog_unstable: function() {
16
+ return _renderDialog.renderDialog_unstable;
17
+ },
18
+ useDialogContextValues_unstable: function() {
19
+ return _useDialogContextValues.useDialogContextValues_unstable;
20
+ },
21
+ useDialog_unstable: function() {
22
+ return _useDialog.useDialog_unstable;
23
+ }
24
+ });
25
+ const _Dialog = require("./Dialog");
26
+ const _renderDialog = require("./renderDialog");
27
+ const _useDialog = require("./useDialog");
28
+ const _useDialogContextValues = require("./useDialogContextValues");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Dialog/index.ts"],"sourcesContent":["export * from './Dialog';\nexport * from './Dialog.types';\nexport * from './renderDialog';\nexport * from './useDialog';\nexport * from './useDialogContextValues';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["../src/components/Dialog/index.ts"],"sourcesContent":["export { Dialog } from './Dialog';\nexport type {\n DialogContextValues,\n DialogModalType,\n DialogOpenChangeData,\n DialogOpenChangeEvent,\n DialogOpenChangeEventHandler,\n DialogProps,\n DialogSlots,\n DialogState,\n InternalDialogSlots,\n} from './Dialog.types';\nexport { renderDialog_unstable } from './renderDialog';\nexport { useDialog_unstable } from './useDialog';\nexport { useDialogContextValues_unstable } from './useDialogContextValues';\n"],"names":["Dialog","renderDialog_unstable","useDialogContextValues_unstable","useDialog_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,MAAM;eAANA,cAAM;;IAYNC,qBAAqB;eAArBA,mCAAqB;;IAErBC,+BAA+B;eAA/BA,uDAA+B;;IAD/BC,kBAAkB;eAAlBA,6BAAkB;;;wBAbJ;8BAYe;2BACH;wCACa"}
@@ -2,9 +2,30 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./DialogActions"), exports);
7
- _export_star._(require("./DialogActions.types"), exports);
8
- _export_star._(require("./renderDialogActions"), exports);
9
- _export_star._(require("./useDialogActions"), exports);
10
- _export_star._(require("./useDialogActionsStyles.styles"), exports);
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
+ DialogActions: function() {
13
+ return _DialogActions.DialogActions;
14
+ },
15
+ dialogActionsClassNames: function() {
16
+ return _useDialogActionsStylesstyles.dialogActionsClassNames;
17
+ },
18
+ renderDialogActions_unstable: function() {
19
+ return _renderDialogActions.renderDialogActions_unstable;
20
+ },
21
+ useDialogActionsStyles_unstable: function() {
22
+ return _useDialogActionsStylesstyles.useDialogActionsStyles_unstable;
23
+ },
24
+ useDialogActions_unstable: function() {
25
+ return _useDialogActions.useDialogActions_unstable;
26
+ }
27
+ });
28
+ const _DialogActions = require("./DialogActions");
29
+ const _renderDialogActions = require("./renderDialogActions");
30
+ const _useDialogActions = require("./useDialogActions");
31
+ const _useDialogActionsStylesstyles = require("./useDialogActionsStyles.styles");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogActions/index.ts"],"sourcesContent":["export * from './DialogActions';\nexport * from './DialogActions.types';\nexport * from './renderDialogActions';\nexport * from './useDialogActions';\nexport * from './useDialogActionsStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["../src/components/DialogActions/index.ts"],"sourcesContent":["export { DialogActions } from './DialogActions';\nexport type {\n DialogActionsPosition,\n DialogActionsProps,\n DialogActionsSlots,\n DialogActionsState,\n} from './DialogActions.types';\nexport { renderDialogActions_unstable } from './renderDialogActions';\nexport { useDialogActions_unstable } from './useDialogActions';\nexport { dialogActionsClassNames, useDialogActionsStyles_unstable } from './useDialogActionsStyles.styles';\n"],"names":["DialogActions","dialogActionsClassNames","renderDialogActions_unstable","useDialogActionsStyles_unstable","useDialogActions_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IASbC,uBAAuB;eAAvBA,qDAAuB;;IAFvBC,4BAA4B;eAA5BA,iDAA4B;;IAEHC,+BAA+B;eAA/BA,6DAA+B;;IADxDC,yBAAyB;eAAzBA,2CAAyB;;;+BARJ;qCAOe;kCACH;8CAC+B"}
@@ -8,26 +8,5 @@ Object.defineProperty(exports, "DialogBackdropMotion", {
8
8
  return DialogBackdropMotion;
9
9
  }
10
10
  });
11
- const _reactmotion = require("@fluentui/react-motion");
12
- const keyframes = [
13
- {
14
- opacity: 0
15
- },
16
- {
17
- opacity: 1
18
- }
19
- ];
20
- const DialogBackdropMotion = (0, _reactmotion.createPresenceComponent)({
21
- enter: {
22
- keyframes,
23
- easing: _reactmotion.motionTokens.curveLinear,
24
- duration: _reactmotion.motionTokens.durationGentle
25
- },
26
- exit: {
27
- keyframes: [
28
- ...keyframes
29
- ].reverse(),
30
- easing: _reactmotion.motionTokens.curveLinear,
31
- duration: _reactmotion.motionTokens.durationGentle
32
- }
33
- });
11
+ const _reactmotioncomponentspreview = require("@fluentui/react-motion-components-preview");
12
+ const DialogBackdropMotion = _reactmotioncomponentspreview.FadeRelaxed;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogBackdropMotion.ts"],"sourcesContent":["import { createPresenceComponent, motionTokens } from '@fluentui/react-motion';\n\nconst keyframes = [{ opacity: 0 }, { opacity: 1 }];\n\nexport const DialogBackdropMotion = createPresenceComponent({\n enter: {\n keyframes,\n easing: motionTokens.curveLinear,\n duration: motionTokens.durationGentle,\n },\n exit: {\n keyframes: [...keyframes].reverse(),\n easing: motionTokens.curveLinear,\n duration: motionTokens.durationGentle,\n },\n});\n"],"names":["DialogBackdropMotion","keyframes","opacity","createPresenceComponent","enter","easing","motionTokens","curveLinear","duration","durationGentle","exit","reverse"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;6BAJyC;AAEtD,MAAMC,YAAY;IAAC;QAAEC,SAAS;IAAE;IAAG;QAAEA,SAAS;IAAE;CAAE;AAE3C,MAAMF,uBAAuBG,IAAAA,oCAAAA,EAAwB;IAC1DC,OAAO;QACLH;QACAI,QAAQC,yBAAAA,CAAaC,WAAW;QAChCC,UAAUF,yBAAAA,CAAaG,cAAc;IACvC;IACAC,MAAM;QACJT,WAAW;eAAIA;SAAU,CAACU,OAAO;QACjCN,QAAQC,yBAAAA,CAAaC,WAAW;QAChCC,UAAUF,yBAAAA,CAAaG,cAAc;IACvC;AACF"}
1
+ {"version":3,"sources":["../src/components/DialogBackdropMotion.ts"],"sourcesContent":["import { FadeRelaxed } from '@fluentui/react-motion-components-preview';\n\nexport const DialogBackdropMotion = FadeRelaxed;\n"],"names":["DialogBackdropMotion","FadeRelaxed"],"rangeMappings":";;;;;;;;;;;","mappings":";;;;+BAEaA;;;eAAAA;;;8CAFe;AAErB,MAAMA,uBAAuBC,yCAAAA"}
@@ -2,9 +2,30 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./DialogBody"), exports);
7
- _export_star._(require("./DialogBody.types"), exports);
8
- _export_star._(require("./renderDialogBody"), exports);
9
- _export_star._(require("./useDialogBody"), exports);
10
- _export_star._(require("./useDialogBodyStyles.styles"), exports);
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
+ DialogBody: function() {
13
+ return _DialogBody.DialogBody;
14
+ },
15
+ dialogBodyClassNames: function() {
16
+ return _useDialogBodyStylesstyles.dialogBodyClassNames;
17
+ },
18
+ renderDialogBody_unstable: function() {
19
+ return _renderDialogBody.renderDialogBody_unstable;
20
+ },
21
+ useDialogBodyStyles_unstable: function() {
22
+ return _useDialogBodyStylesstyles.useDialogBodyStyles_unstable;
23
+ },
24
+ useDialogBody_unstable: function() {
25
+ return _useDialogBody.useDialogBody_unstable;
26
+ }
27
+ });
28
+ const _DialogBody = require("./DialogBody");
29
+ const _renderDialogBody = require("./renderDialogBody");
30
+ const _useDialogBody = require("./useDialogBody");
31
+ const _useDialogBodyStylesstyles = require("./useDialogBodyStyles.styles");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogBody/index.ts"],"sourcesContent":["export * from './DialogBody';\nexport * from './DialogBody.types';\nexport * from './renderDialogBody';\nexport * from './useDialogBody';\nexport * from './useDialogBodyStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["../src/components/DialogBody/index.ts"],"sourcesContent":["export { DialogBody } from './DialogBody';\nexport type { DialogBodyProps, DialogBodySlots, DialogBodyState } from './DialogBody.types';\nexport { renderDialogBody_unstable } from './renderDialogBody';\nexport { useDialogBody_unstable } from './useDialogBody';\nexport { dialogBodyClassNames, useDialogBodyStyles_unstable } from './useDialogBodyStyles.styles';\n"],"names":["DialogBody","dialogBodyClassNames","renderDialogBody_unstable","useDialogBodyStyles_unstable","useDialogBody_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,UAAU;eAAVA,sBAAU;;IAIVC,oBAAoB;eAApBA,+CAAoB;;IAFpBC,yBAAyB;eAAzBA,2CAAyB;;IAEHC,4BAA4B;eAA5BA,uDAA4B;;IADlDC,sBAAsB;eAAtBA,qCAAsB;;;4BAHJ;kCAEe;+BACH;2CAC4B"}
@@ -2,9 +2,30 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./DialogContent"), exports);
7
- _export_star._(require("./DialogContent.types"), exports);
8
- _export_star._(require("./renderDialogContent"), exports);
9
- _export_star._(require("./useDialogContent"), exports);
10
- _export_star._(require("./useDialogContentStyles.styles"), exports);
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
+ DialogContent: function() {
13
+ return _DialogContent.DialogContent;
14
+ },
15
+ dialogContentClassNames: function() {
16
+ return _useDialogContentStylesstyles.dialogContentClassNames;
17
+ },
18
+ renderDialogContent_unstable: function() {
19
+ return _renderDialogContent.renderDialogContent_unstable;
20
+ },
21
+ useDialogContentStyles_unstable: function() {
22
+ return _useDialogContentStylesstyles.useDialogContentStyles_unstable;
23
+ },
24
+ useDialogContent_unstable: function() {
25
+ return _useDialogContent.useDialogContent_unstable;
26
+ }
27
+ });
28
+ const _DialogContent = require("./DialogContent");
29
+ const _renderDialogContent = require("./renderDialogContent");
30
+ const _useDialogContent = require("./useDialogContent");
31
+ const _useDialogContentStylesstyles = require("./useDialogContentStyles.styles");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogContent/index.ts"],"sourcesContent":["export * from './DialogContent';\nexport * from './DialogContent.types';\nexport * from './renderDialogContent';\nexport * from './useDialogContent';\nexport * from './useDialogContentStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["../src/components/DialogContent/index.ts"],"sourcesContent":["export { DialogContent } from './DialogContent';\nexport type { DialogContentProps, DialogContentSlots, DialogContentState } from './DialogContent.types';\nexport { renderDialogContent_unstable } from './renderDialogContent';\nexport { useDialogContent_unstable } from './useDialogContent';\nexport { dialogContentClassNames, useDialogContentStyles_unstable } from './useDialogContentStyles.styles';\n"],"names":["DialogContent","dialogContentClassNames","renderDialogContent_unstable","useDialogContentStyles_unstable","useDialogContent_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAIbC,uBAAuB;eAAvBA,qDAAuB;;IAFvBC,4BAA4B;eAA5BA,iDAA4B;;IAEHC,+BAA+B;eAA/BA,6DAA+B;;IADxDC,yBAAyB;eAAzBA,2CAAyB;;;+BAHJ;qCAEe;kCACH;8CAC+B"}
@@ -2,10 +2,34 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./DialogSurface"), exports);
7
- _export_star._(require("./DialogSurface.types"), exports);
8
- _export_star._(require("./renderDialogSurface"), exports);
9
- _export_star._(require("./useDialogSurface"), exports);
10
- _export_star._(require("./useDialogSurfaceStyles.styles"), exports);
11
- _export_star._(require("./useDialogSurfaceContextValues"), exports);
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
+ DialogSurface: function() {
13
+ return _DialogSurface.DialogSurface;
14
+ },
15
+ dialogSurfaceClassNames: function() {
16
+ return _useDialogSurfaceStylesstyles.dialogSurfaceClassNames;
17
+ },
18
+ renderDialogSurface_unstable: function() {
19
+ return _renderDialogSurface.renderDialogSurface_unstable;
20
+ },
21
+ useDialogSurfaceContextValues_unstable: function() {
22
+ return _useDialogSurfaceContextValues.useDialogSurfaceContextValues_unstable;
23
+ },
24
+ useDialogSurfaceStyles_unstable: function() {
25
+ return _useDialogSurfaceStylesstyles.useDialogSurfaceStyles_unstable;
26
+ },
27
+ useDialogSurface_unstable: function() {
28
+ return _useDialogSurface.useDialogSurface_unstable;
29
+ }
30
+ });
31
+ const _DialogSurface = require("./DialogSurface");
32
+ const _renderDialogSurface = require("./renderDialogSurface");
33
+ const _useDialogSurface = require("./useDialogSurface");
34
+ const _useDialogSurfaceStylesstyles = require("./useDialogSurfaceStyles.styles");
35
+ const _useDialogSurfaceContextValues = require("./useDialogSurfaceContextValues");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogSurface/index.ts"],"sourcesContent":["export * from './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles.styles';\nexport * from './useDialogSurfaceContextValues';\n"],"names":[],"rangeMappings":";;;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["../src/components/DialogSurface/index.ts"],"sourcesContent":["export { DialogSurface } from './DialogSurface';\nexport type {\n DialogSurfaceContextValues,\n DialogSurfaceElement,\n DialogSurfaceProps,\n DialogSurfaceSlots,\n DialogSurfaceState,\n} from './DialogSurface.types';\nexport { renderDialogSurface_unstable } from './renderDialogSurface';\nexport { useDialogSurface_unstable } from './useDialogSurface';\nexport { dialogSurfaceClassNames, useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles.styles';\nexport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\n"],"names":["DialogSurface","dialogSurfaceClassNames","renderDialogSurface_unstable","useDialogSurfaceContextValues_unstable","useDialogSurfaceStyles_unstable","useDialogSurface_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAUbC,uBAAuB;eAAvBA,qDAAuB;;IAFvBC,4BAA4B;eAA5BA,iDAA4B;;IAG5BC,sCAAsC;eAAtCA,qEAAsC;;IADbC,+BAA+B;eAA/BA,6DAA+B;;IADxDC,yBAAyB;eAAzBA,2CAAyB;;;+BATJ;qCAQe;kCACH;8CAC+B;+CAClB"}
@@ -2,9 +2,33 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./DialogTitle"), exports);
7
- _export_star._(require("./DialogTitle.types"), exports);
8
- _export_star._(require("./renderDialogTitle"), exports);
9
- _export_star._(require("./useDialogTitle"), exports);
10
- _export_star._(require("./useDialogTitleStyles.styles"), exports);
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
+ DialogTitle: function() {
13
+ return _DialogTitle.DialogTitle;
14
+ },
15
+ dialogTitleClassNames: function() {
16
+ return _useDialogTitleStylesstyles.dialogTitleClassNames;
17
+ },
18
+ renderDialogTitle_unstable: function() {
19
+ return _renderDialogTitle.renderDialogTitle_unstable;
20
+ },
21
+ useDialogTitleInternalStyles: function() {
22
+ return _useDialogTitleStylesstyles.useDialogTitleInternalStyles;
23
+ },
24
+ useDialogTitleStyles_unstable: function() {
25
+ return _useDialogTitleStylesstyles.useDialogTitleStyles_unstable;
26
+ },
27
+ useDialogTitle_unstable: function() {
28
+ return _useDialogTitle.useDialogTitle_unstable;
29
+ }
30
+ });
31
+ const _DialogTitle = require("./DialogTitle");
32
+ const _renderDialogTitle = require("./renderDialogTitle");
33
+ const _useDialogTitle = require("./useDialogTitle");
34
+ const _useDialogTitleStylesstyles = require("./useDialogTitleStyles.styles");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTitle/index.ts"],"sourcesContent":["export * from './DialogTitle';\nexport * from './DialogTitle.types';\nexport * from './renderDialogTitle';\nexport * from './useDialogTitle';\nexport * from './useDialogTitleStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["../src/components/DialogTitle/index.ts"],"sourcesContent":["export { DialogTitle } from './DialogTitle';\nexport type { DialogTitleProps, DialogTitleSlots, DialogTitleState } from './DialogTitle.types';\nexport { renderDialogTitle_unstable } from './renderDialogTitle';\nexport { useDialogTitle_unstable } from './useDialogTitle';\nexport {\n dialogTitleClassNames,\n useDialogTitleInternalStyles,\n useDialogTitleStyles_unstable,\n} from './useDialogTitleStyles.styles';\n"],"names":["DialogTitle","dialogTitleClassNames","renderDialogTitle_unstable","useDialogTitleInternalStyles","useDialogTitleStyles_unstable","useDialogTitle_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,WAAW;eAAXA,wBAAW;;IAKlBC,qBAAqB;eAArBA,iDAAqB;;IAHdC,0BAA0B;eAA1BA,6CAA0B;;IAIjCC,4BAA4B;eAA5BA,wDAA4B;;IAC5BC,6BAA6B;eAA7BA,yDAA6B;;IAJtBC,uBAAuB;eAAvBA,uCAAuB;;;6BAHJ;mCAEe;gCACH;4CAKjC"}
@@ -2,8 +2,23 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./DialogTrigger"), exports);
7
- _export_star._(require("./DialogTrigger.types"), exports);
8
- _export_star._(require("./renderDialogTrigger"), exports);
9
- _export_star._(require("./useDialogTrigger"), exports);
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
+ DialogTrigger: function() {
13
+ return _DialogTrigger.DialogTrigger;
14
+ },
15
+ renderDialogTrigger_unstable: function() {
16
+ return _renderDialogTrigger.renderDialogTrigger_unstable;
17
+ },
18
+ useDialogTrigger_unstable: function() {
19
+ return _useDialogTrigger.useDialogTrigger_unstable;
20
+ }
21
+ });
22
+ const _DialogTrigger = require("./DialogTrigger");
23
+ const _renderDialogTrigger = require("./renderDialogTrigger");
24
+ const _useDialogTrigger = require("./useDialogTrigger");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTrigger/index.ts"],"sourcesContent":["export * from './DialogTrigger';\nexport * from './DialogTrigger.types';\nexport * from './renderDialogTrigger';\nexport * from './useDialogTrigger';\n"],"names":[],"rangeMappings":";;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["../src/components/DialogTrigger/index.ts"],"sourcesContent":["export { DialogTrigger } from './DialogTrigger';\nexport type {\n DialogTriggerAction,\n DialogTriggerChildProps,\n DialogTriggerProps,\n DialogTriggerState,\n} from './DialogTrigger.types';\nexport { renderDialogTrigger_unstable } from './renderDialogTrigger';\nexport { useDialogTrigger_unstable } from './useDialogTrigger';\n"],"names":["DialogTrigger","renderDialogTrigger_unstable","useDialogTrigger_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAObC,4BAA4B;eAA5BA,iDAA4B;;IAC5BC,yBAAyB;eAAzBA,2CAAyB;;;+BARJ;qCAOe;kCACH"}
@@ -19,11 +19,12 @@ _export(exports, {
19
19
  return useDialogSurfaceContext_unstable;
20
20
  }
21
21
  });
22
- const _react = require("react");
22
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
23
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
23
24
  const defaultContextValue = false;
24
- const DialogSurfaceContext = /*#__PURE__*/ (0, _react.createContext)(undefined);
25
+ const DialogSurfaceContext = /*#__PURE__*/ _react.createContext(undefined);
25
26
  const DialogSurfaceProvider = DialogSurfaceContext.Provider;
26
27
  const useDialogSurfaceContext_unstable = ()=>{
27
- var _useContext;
28
- return (_useContext = (0, _react.useContext)(DialogSurfaceContext)) !== null && _useContext !== void 0 ? _useContext : defaultContextValue;
28
+ var _React_useContext;
29
+ return (_React_useContext = _react.useContext(DialogSurfaceContext)) !== null && _React_useContext !== void 0 ? _React_useContext : defaultContextValue;
29
30
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/dialogSurfaceContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport type DialogSurfaceContextValue = boolean;\n\nconst defaultContextValue: DialogSurfaceContextValue = false;\n\nexport const DialogSurfaceContext = createContext<DialogSurfaceContextValue | undefined>(undefined);\n\nexport const DialogSurfaceProvider = DialogSurfaceContext.Provider;\n\nexport const useDialogSurfaceContext_unstable = () => useContext(DialogSurfaceContext) ?? defaultContextValue;\n"],"names":["DialogSurfaceContext","DialogSurfaceProvider","useDialogSurfaceContext_unstable","defaultContextValue","createContext","undefined","Provider","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,oBAAAA;eAAAA;;IAEAC,qBAAAA;eAAAA;;IAEAC,gCAAAA;eAAAA;;;uBAV6B;AAI1C,MAAMC,sBAAiD;AAEhD,MAAMH,qCAAuBI,IAAAA,oBAAAA,EAAqDC;AAElF,MAAMJ,wBAAwBD,qBAAqBM,QAAQ;AAE3D,MAAMJ,mCAAmC;QAAMK;WAAAA,CAAAA,cAAAA,IAAAA,iBAAAA,EAAWP,qBAAAA,MAAAA,QAAXO,gBAAAA,KAAAA,IAAAA,cAAoCJ;AAAkB"}
1
+ {"version":3,"sources":["../src/contexts/dialogSurfaceContext.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type DialogSurfaceContextValue = boolean;\n\nconst defaultContextValue: DialogSurfaceContextValue = false;\n\nexport const DialogSurfaceContext = React.createContext<DialogSurfaceContextValue | undefined>(undefined);\n\nexport const DialogSurfaceProvider = DialogSurfaceContext.Provider;\n\nexport const useDialogSurfaceContext_unstable = () => React.useContext(DialogSurfaceContext) ?? defaultContextValue;\n"],"names":["DialogSurfaceContext","DialogSurfaceProvider","useDialogSurfaceContext_unstable","defaultContextValue","React","createContext","undefined","Provider","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,oBAAAA;eAAAA;;IAEAC,qBAAAA;eAAAA;;IAEAC,gCAAAA;eAAAA;;;;iEAVU;AAIvB,MAAMC,sBAAiD;AAEhD,MAAMH,qCAAuBI,OAAMC,aAAa,CAAwCC;AAExF,MAAML,wBAAwBD,qBAAqBO,QAAQ;AAE3D,MAAML,mCAAmC;QAAME;WAAAA,CAAAA,oBAAAA,OAAMI,UAAU,CAACR,qBAAAA,MAAAA,QAAjBI,sBAAAA,KAAAA,IAAAA,oBAA0CD;AAAkB"}
@@ -2,7 +2,50 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./constants"), exports);
7
- _export_star._(require("./dialogContext"), exports);
8
- _export_star._(require("./dialogSurfaceContext"), exports);
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
+ DIALOG_GAP: function() {
13
+ return _constants.DIALOG_GAP;
14
+ },
15
+ DialogContext: function() {
16
+ return _dialogContext.DialogContext;
17
+ },
18
+ DialogProvider: function() {
19
+ return _dialogContext.DialogProvider;
20
+ },
21
+ DialogSurfaceContext: function() {
22
+ return _dialogSurfaceContext.DialogSurfaceContext;
23
+ },
24
+ DialogSurfaceProvider: function() {
25
+ return _dialogSurfaceContext.DialogSurfaceProvider;
26
+ },
27
+ FULLSCREEN_DIALOG_SCROLLBAR_OFFSET: function() {
28
+ return _constants.FULLSCREEN_DIALOG_SCROLLBAR_OFFSET;
29
+ },
30
+ MEDIA_QUERY_BREAKPOINT_SELECTOR: function() {
31
+ return _constants.MEDIA_QUERY_BREAKPOINT_SELECTOR;
32
+ },
33
+ MEDIA_QUERY_SHORT_SCREEN: function() {
34
+ return _constants.MEDIA_QUERY_SHORT_SCREEN;
35
+ },
36
+ SURFACE_BORDER_WIDTH: function() {
37
+ return _constants.SURFACE_BORDER_WIDTH;
38
+ },
39
+ SURFACE_PADDING: function() {
40
+ return _constants.SURFACE_PADDING;
41
+ },
42
+ useDialogContext_unstable: function() {
43
+ return _dialogContext.useDialogContext_unstable;
44
+ },
45
+ useDialogSurfaceContext_unstable: function() {
46
+ return _dialogSurfaceContext.useDialogSurfaceContext_unstable;
47
+ }
48
+ });
49
+ const _constants = require("./constants");
50
+ const _dialogContext = require("./dialogContext");
51
+ const _dialogSurfaceContext = require("./dialogSurfaceContext");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/index.ts"],"sourcesContent":["export * from './constants';\nexport * from './dialogContext';\nexport * from './dialogSurfaceContext';\n"],"names":[],"rangeMappings":";;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA"}
1
+ {"version":3,"sources":["../src/contexts/index.ts"],"sourcesContent":["export {\n DIALOG_GAP,\n FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n MEDIA_QUERY_SHORT_SCREEN,\n SURFACE_BORDER_WIDTH,\n SURFACE_PADDING,\n} from './constants';\nexport type { DialogContextValue } from './dialogContext';\nexport { DialogContext, DialogProvider, useDialogContext_unstable } from './dialogContext';\nexport type { DialogSurfaceContextValue } from './dialogSurfaceContext';\nexport { DialogSurfaceContext, DialogSurfaceProvider, useDialogSurfaceContext_unstable } from './dialogSurfaceContext';\n"],"names":["DIALOG_GAP","DialogContext","DialogProvider","DialogSurfaceContext","DialogSurfaceProvider","FULLSCREEN_DIALOG_SCROLLBAR_OFFSET","MEDIA_QUERY_BREAKPOINT_SELECTOR","MEDIA_QUERY_SHORT_SCREEN","SURFACE_BORDER_WIDTH","SURFACE_PADDING","useDialogContext_unstable","useDialogSurfaceContext_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,UAAU;eAAVA,qBAAU;;IAQHC,aAAa;eAAbA,4BAAa;;IAAEC,cAAc;eAAdA,6BAAc;;IAE7BC,oBAAoB;eAApBA,0CAAoB;;IAAEC,qBAAqB;eAArBA,2CAAqB;;IATlDC,kCAAkC;eAAlCA,6CAAkC;;IAClCC,+BAA+B;eAA/BA,0CAA+B;;IAC/BC,wBAAwB;eAAxBA,mCAAwB;;IACxBC,oBAAoB;eAApBA,+BAAoB;;IACpBC,eAAe;eAAfA,0BAAe;;IAGuBC,yBAAyB;eAAzBA,wCAAyB;;IAEXC,gCAAgC;eAAhCA,sDAAgC;;;2BAJ/E;+BAEkE;sCAEqB"}
@@ -2,6 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./useDisableBodyScroll"), exports);
7
- _export_star._(require("./useFocusFirstElement"), exports);
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
+ useDisableBodyScroll: function() {
13
+ return _useDisableBodyScroll.useDisableBodyScroll;
14
+ },
15
+ useFocusFirstElement: function() {
16
+ return _useFocusFirstElement.useFocusFirstElement;
17
+ }
18
+ });
19
+ const _useDisableBodyScroll = require("./useDisableBodyScroll");
20
+ const _useFocusFirstElement = require("./useFocusFirstElement");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/index.ts"],"sourcesContent":["export * from './useDisableBodyScroll';\nexport * from './useFocusFirstElement';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
1
+ {"version":3,"sources":["../src/utils/index.ts"],"sourcesContent":["export { useDisableBodyScroll } from './useDisableBodyScroll';\nexport { useFocusFirstElement } from './useFocusFirstElement';\n"],"names":["useDisableBodyScroll","useFocusFirstElement"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,oBAAoB;eAApBA,0CAAoB;;IACpBC,oBAAoB;eAApBA,0CAAoB;;;sCADQ;sCACA"}
@@ -8,14 +8,15 @@ Object.defineProperty(exports, "useDisableBodyScroll", {
8
8
  return useDisableBodyScroll;
9
9
  }
10
10
  });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
12
- const _react = require("react");
13
14
  const _useDisableBodyScrollstyles = require("./useDisableBodyScroll.styles");
14
15
  function useDisableBodyScroll() {
15
16
  const htmlNoScrollStyles = (0, _useDisableBodyScrollstyles.useHTMLNoScrollStyles)();
16
17
  const bodyNoScrollStyles = (0, _useDisableBodyScrollstyles.useBodyNoScrollStyles)();
17
18
  const { targetDocument } = (0, _reactsharedcontexts.useFluent_unstable)();
18
- const disableBodyScroll = (0, _react.useCallback)(()=>{
19
+ const disableBodyScroll = _react.useCallback(()=>{
19
20
  var _targetDocument_defaultView;
20
21
  if (!targetDocument) {
21
22
  return;
@@ -34,7 +35,7 @@ function useDisableBodyScroll() {
34
35
  htmlNoScrollStyles,
35
36
  bodyNoScrollStyles
36
37
  ]);
37
- const enableBodyScroll = (0, _react.useCallback)(()=>{
38
+ const enableBodyScroll = _react.useCallback(()=>{
38
39
  if (!targetDocument) {
39
40
  return;
40
41
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/useDisableBodyScroll.ts"],"sourcesContent":["import { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { useCallback } from 'react';\n\nimport { useBodyNoScrollStyles, useHTMLNoScrollStyles } from './useDisableBodyScroll.styles';\n\n/**\n * @internal\n * A React *hook* that disables body scrolling through `overflowY: hidden` CSS property\n */\nexport function useDisableBodyScroll(): {\n disableBodyScroll: () => void;\n enableBodyScroll: () => void;\n} {\n const htmlNoScrollStyles = useHTMLNoScrollStyles();\n const bodyNoScrollStyles = useBodyNoScrollStyles();\n const { targetDocument } = useFluent_unstable();\n\n const disableBodyScroll = useCallback(() => {\n if (!targetDocument) {\n return;\n }\n const isHorizontalScrollbarVisible =\n // When the window is a fractional height, `innerHeight` always rounds down but `clientHeight` rounds either up or down depending on the value.\n // To properly compare the body clientHeight to the window innerHeight, manually round down the fractional value to match innerHeight's calculation.\n Math.floor(targetDocument.body.getBoundingClientRect().height) > (targetDocument.defaultView?.innerHeight ?? 0);\n if (!isHorizontalScrollbarVisible) {\n return;\n }\n targetDocument.documentElement.classList.add(htmlNoScrollStyles);\n targetDocument.body.classList.add(bodyNoScrollStyles);\n return;\n }, [targetDocument, htmlNoScrollStyles, bodyNoScrollStyles]);\n\n const enableBodyScroll = useCallback(() => {\n if (!targetDocument) {\n return;\n }\n targetDocument.documentElement.classList.remove(htmlNoScrollStyles);\n targetDocument.body.classList.remove(bodyNoScrollStyles);\n }, [targetDocument, htmlNoScrollStyles, bodyNoScrollStyles]);\n\n return {\n disableBodyScroll,\n enableBodyScroll,\n };\n}\n"],"names":["useDisableBodyScroll","htmlNoScrollStyles","useHTMLNoScrollStyles","bodyNoScrollStyles","useBodyNoScrollStyles","targetDocument","useFluent_unstable","disableBodyScroll","useCallback","isHorizontalScrollbarVisible","Math","floor","body","getBoundingClientRect","height","defaultView","innerHeight","documentElement","classList","add","enableBodyScroll","remove"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASgBA;;;eAAAA;;;qCATmB;uBACP;4CAEiC;AAMtD,SAASA;IAId,MAAMC,qBAAqBC,IAAAA,iDAAAA;IAC3B,MAAMC,qBAAqBC,IAAAA,iDAAAA;IAC3B,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,uCAAAA;IAE3B,MAAMC,oBAAoBC,IAAAA,kBAAAA,EAAY;YAOgCH;QANpE,IAAI,CAACA,gBAAgB;YACnB;QACF;YAIoEA;QAHpE,MAAMI,+BAEJ,oJAAoJ;QACpJC,KAAKC,KAAK,CAACN,eAAeO,IAAI,CAACC,qBAAqB,GAAGC,MAAM,IAAKT,CAAAA,CAAAA,0CAAAA,CAAAA,8BAAAA,eAAeU,WAAW,AAAXA,MAAW,QAA1BV,gCAAAA,KAAAA,IAAAA,KAAAA,IAAAA,4BAA4BW,WAAW,AAAXA,MAAW,QAAvCX,4CAAAA,KAAAA,IAAAA,0CAA2C,CAAA;QAC/G,IAAI,CAACI,8BAA8B;YACjC;QACF;QACAJ,eAAeY,eAAe,CAACC,SAAS,CAACC,GAAG,CAAClB;QAC7CI,eAAeO,IAAI,CAACM,SAAS,CAACC,GAAG,CAAChB;QAClC;IACF,GAAG;QAACE;QAAgBJ;QAAoBE;KAAmB;IAE3D,MAAMiB,mBAAmBZ,IAAAA,kBAAAA,EAAY;QACnC,IAAI,CAACH,gBAAgB;YACnB;QACF;QACAA,eAAeY,eAAe,CAACC,SAAS,CAACG,MAAM,CAACpB;QAChDI,eAAeO,IAAI,CAACM,SAAS,CAACG,MAAM,CAAClB;IACvC,GAAG;QAACE;QAAgBJ;QAAoBE;KAAmB;IAE3D,OAAO;QACLI;QACAa;IACF;AACF"}
1
+ {"version":3,"sources":["../src/utils/useDisableBodyScroll.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useBodyNoScrollStyles, useHTMLNoScrollStyles } from './useDisableBodyScroll.styles';\n\n/**\n * @internal\n * A React *hook* that disables body scrolling through `overflowY: hidden` CSS property\n */\nexport function useDisableBodyScroll(): {\n disableBodyScroll: () => void;\n enableBodyScroll: () => void;\n} {\n const htmlNoScrollStyles = useHTMLNoScrollStyles();\n const bodyNoScrollStyles = useBodyNoScrollStyles();\n const { targetDocument } = useFluent_unstable();\n\n const disableBodyScroll = React.useCallback(() => {\n if (!targetDocument) {\n return;\n }\n const isHorizontalScrollbarVisible =\n // When the window is a fractional height, `innerHeight` always rounds down but `clientHeight` rounds either up or down depending on the value.\n // To properly compare the body clientHeight to the window innerHeight, manually round down the fractional value to match innerHeight's calculation.\n Math.floor(targetDocument.body.getBoundingClientRect().height) > (targetDocument.defaultView?.innerHeight ?? 0);\n if (!isHorizontalScrollbarVisible) {\n return;\n }\n targetDocument.documentElement.classList.add(htmlNoScrollStyles);\n targetDocument.body.classList.add(bodyNoScrollStyles);\n return;\n }, [targetDocument, htmlNoScrollStyles, bodyNoScrollStyles]);\n\n const enableBodyScroll = React.useCallback(() => {\n if (!targetDocument) {\n return;\n }\n targetDocument.documentElement.classList.remove(htmlNoScrollStyles);\n targetDocument.body.classList.remove(bodyNoScrollStyles);\n }, [targetDocument, htmlNoScrollStyles, bodyNoScrollStyles]);\n\n return {\n disableBodyScroll,\n enableBodyScroll,\n };\n}\n"],"names":["useDisableBodyScroll","htmlNoScrollStyles","useHTMLNoScrollStyles","bodyNoScrollStyles","useBodyNoScrollStyles","targetDocument","useFluent_unstable","disableBodyScroll","React","useCallback","isHorizontalScrollbarVisible","Math","floor","body","getBoundingClientRect","height","defaultView","innerHeight","documentElement","classList","add","enableBodyScroll","remove"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASgBA;;;eAAAA;;;;iEATO;qCACY;4CAE0B;AAMtD,SAASA;IAId,MAAMC,qBAAqBC,IAAAA,iDAAAA;IAC3B,MAAMC,qBAAqBC,IAAAA,iDAAAA;IAC3B,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,uCAAAA;IAE3B,MAAMC,oBAAoBC,OAAMC,WAAW,CAAC;YAO0BJ;QANpE,IAAI,CAACA,gBAAgB;YACnB;QACF;YAIoEA;QAHpE,MAAMK,+BAEJ,oJAAoJ;QACpJC,KAAKC,KAAK,CAACP,eAAeQ,IAAI,CAACC,qBAAqB,GAAGC,MAAM,IAAKV,CAAAA,CAAAA,0CAAAA,CAAAA,8BAAAA,eAAeW,WAAW,AAAXA,MAAW,QAA1BX,gCAAAA,KAAAA,IAAAA,KAAAA,IAAAA,4BAA4BY,WAAW,AAAXA,MAAW,QAAvCZ,4CAAAA,KAAAA,IAAAA,0CAA2C,CAAA;QAC/G,IAAI,CAACK,8BAA8B;YACjC;QACF;QACAL,eAAea,eAAe,CAACC,SAAS,CAACC,GAAG,CAACnB;QAC7CI,eAAeQ,IAAI,CAACM,SAAS,CAACC,GAAG,CAACjB;QAClC;IACF,GAAG;QAACE;QAAgBJ;QAAoBE;KAAmB;IAE3D,MAAMkB,mBAAmBb,OAAMC,WAAW,CAAC;QACzC,IAAI,CAACJ,gBAAgB;YACnB;QACF;QACAA,eAAea,eAAe,CAACC,SAAS,CAACG,MAAM,CAACrB;QAChDI,eAAeQ,IAAI,CAACM,SAAS,CAACG,MAAM,CAACnB;IACvC,GAAG;QAACE;QAAgBJ;QAAoBE;KAAmB;IAE3D,OAAO;QACLI;QACAc;IACF;AACF"}