@fluentui/react-positioning 0.0.0-nightly-20230317-1454.1 → 0.0.0-nightly-20230322-0439.1

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 (92) hide show
  1. package/.swcrc +2 -11
  2. package/CHANGELOG.json +48 -9
  3. package/CHANGELOG.md +20 -7
  4. package/lib/constants.js +4 -4
  5. package/lib/createArrowStyles.js +19 -19
  6. package/lib/createPositionManager.js +13 -13
  7. package/lib/createPositionManager.js.map +1 -1
  8. package/lib/index.js +5 -5
  9. package/lib/middleware/coverTarget.js +6 -6
  10. package/lib/middleware/flip.js +4 -4
  11. package/lib/middleware/index.js +6 -6
  12. package/lib/middleware/intersecting.js +2 -2
  13. package/lib/middleware/maxSize.js +8 -8
  14. package/lib/middleware/offset.js +2 -2
  15. package/lib/middleware/shift.js +5 -5
  16. package/lib/types.js +1 -1
  17. package/lib/usePositioning.js +37 -29
  18. package/lib/usePositioning.js.map +1 -1
  19. package/lib/usePositioningMouseTarget.js +4 -4
  20. package/lib/utils/fromFloatingUIPlacement.js +10 -10
  21. package/lib/utils/getBoundary.js +8 -8
  22. package/lib/utils/getBoundary.js.map +1 -1
  23. package/lib/utils/getFloatingUIOffset.js +2 -2
  24. package/lib/utils/getReactFiberFromNode.js +3 -3
  25. package/lib/utils/getScrollParent.js +8 -6
  26. package/lib/utils/getScrollParent.js.map +1 -1
  27. package/lib/utils/hasAutoFocusFilter.js +4 -3
  28. package/lib/utils/hasAutoFocusFilter.js.map +1 -1
  29. package/lib/utils/index.js +15 -15
  30. package/lib/utils/mergeArrowOffset.js +6 -5
  31. package/lib/utils/mergeArrowOffset.js.map +1 -1
  32. package/lib/utils/parseFloatingUIPlacement.js +1 -1
  33. package/lib/utils/resolvePositioningShorthand.js +33 -33
  34. package/lib/utils/toFloatingUIPadding.js +3 -3
  35. package/lib/utils/toFloatingUIPlacement.js +11 -11
  36. package/lib/utils/toggleScrollListener.js +4 -4
  37. package/lib/utils/useCallbackRef.js +2 -2
  38. package/lib/utils/writeContainerupdates.js +8 -7
  39. package/lib/utils/writeContainerupdates.js.map +1 -1
  40. package/lib-commonjs/constants.js +4 -4
  41. package/lib-commonjs/constants.js.map +1 -1
  42. package/lib-commonjs/createArrowStyles.js +16 -16
  43. package/lib-commonjs/createArrowStyles.js.map +1 -1
  44. package/lib-commonjs/createPositionManager.js +10 -10
  45. package/lib-commonjs/createPositionManager.js.map +1 -1
  46. package/lib-commonjs/index.js.map +1 -1
  47. package/lib-commonjs/middleware/coverTarget.js +5 -5
  48. package/lib-commonjs/middleware/coverTarget.js.map +1 -1
  49. package/lib-commonjs/middleware/flip.js +2 -2
  50. package/lib-commonjs/middleware/flip.js.map +1 -1
  51. package/lib-commonjs/middleware/index.js.map +1 -1
  52. package/lib-commonjs/middleware/intersecting.js +1 -1
  53. package/lib-commonjs/middleware/intersecting.js.map +1 -1
  54. package/lib-commonjs/middleware/maxSize.js +6 -6
  55. package/lib-commonjs/middleware/maxSize.js.map +1 -1
  56. package/lib-commonjs/middleware/offset.js.map +1 -1
  57. package/lib-commonjs/middleware/shift.js +3 -3
  58. package/lib-commonjs/middleware/shift.js.map +1 -1
  59. package/lib-commonjs/types.js.map +1 -1
  60. package/lib-commonjs/usePositioning.js +30 -22
  61. package/lib-commonjs/usePositioning.js.map +1 -1
  62. package/lib-commonjs/usePositioningMouseTarget.js +2 -2
  63. package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
  64. package/lib-commonjs/utils/fromFloatingUIPlacement.js +9 -9
  65. package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
  66. package/lib-commonjs/utils/getBoundary.js +7 -7
  67. package/lib-commonjs/utils/getBoundary.js.map +1 -1
  68. package/lib-commonjs/utils/getFloatingUIOffset.js +1 -1
  69. package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
  70. package/lib-commonjs/utils/getReactFiberFromNode.js +2 -2
  71. package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
  72. package/lib-commonjs/utils/getScrollParent.js +8 -6
  73. package/lib-commonjs/utils/getScrollParent.js.map +1 -1
  74. package/lib-commonjs/utils/hasAutoFocusFilter.js +3 -2
  75. package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
  76. package/lib-commonjs/utils/index.js.map +1 -1
  77. package/lib-commonjs/utils/mergeArrowOffset.js +6 -5
  78. package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
  79. package/lib-commonjs/utils/parseFloatingUIPlacement.js +1 -1
  80. package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
  81. package/lib-commonjs/utils/resolvePositioningShorthand.js +33 -33
  82. package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
  83. package/lib-commonjs/utils/toFloatingUIPadding.js +3 -3
  84. package/lib-commonjs/utils/toFloatingUIPadding.js.map +1 -1
  85. package/lib-commonjs/utils/toFloatingUIPlacement.js +11 -11
  86. package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
  87. package/lib-commonjs/utils/toggleScrollListener.js +2 -2
  88. package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
  89. package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
  90. package/lib-commonjs/utils/writeContainerupdates.js +7 -6
  91. package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
  92. package/package.json +5 -4
package/.swcrc CHANGED
@@ -1,15 +1,5 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/swcrc",
3
- "env": {
4
- "targets": {
5
- "chrome": "84",
6
- "edge": "84",
7
- "firefox": "75",
8
- "opera": "73",
9
- "safari": "14.1"
10
- },
11
- "bugfixes": true
12
- },
13
3
  "exclude": [
14
4
  "/testing",
15
5
  "/**/*.cy.ts",
@@ -32,7 +22,8 @@
32
22
  "runtime": "classic",
33
23
  "useSpread": true
34
24
  }
35
- }
25
+ },
26
+ "target": "es2019"
36
27
  },
37
28
  "minify": false,
38
29
  "sourceMaps": true
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-positioning",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 17 Mar 2023 15:00:02 GMT",
6
- "tag": "@fluentui/react-positioning_v0.0.0-nightly-20230317-1454.1",
7
- "version": "0.0.0-nightly-20230317-1454.1",
5
+ "date": "Wed, 22 Mar 2023 04:46:48 GMT",
6
+ "tag": "@fluentui/react-positioning_v0.0.0-nightly-20230322-0439.1",
7
+ "version": "0.0.0-nightly-20230322-0439.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,20 +16,59 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-positioning",
19
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230317-1454.1",
20
- "commit": "636275472966fa37b1efc14ac2e70ad32bd39b86"
19
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230322-0439.1",
20
+ "commit": "49dde84493fc2c3e96abac5ce918169c9668ba66"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-positioning",
25
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230317-1454.1",
26
- "commit": "636275472966fa37b1efc14ac2e70ad32bd39b86"
25
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230322-0439.1",
26
+ "commit": "49dde84493fc2c3e96abac5ce918169c9668ba66"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-positioning",
31
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230317-1454.1",
32
- "commit": "636275472966fa37b1efc14ac2e70ad32bd39b86"
31
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230322-0439.1",
32
+ "commit": "49dde84493fc2c3e96abac5ce918169c9668ba66"
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ {
38
+ "date": "Tue, 21 Mar 2023 21:23:45 GMT",
39
+ "tag": "@fluentui/react-positioning_v9.5.6",
40
+ "version": "9.5.6",
41
+ "comments": {
42
+ "patch": [
43
+ {
44
+ "author": "tristan.watanabe@gmail.com",
45
+ "package": "@fluentui/react-positioning",
46
+ "commit": "2fac1a139149bd13b76b1306207bc988dca9c72c",
47
+ "comment": "chore: migrate to swc transpilation approach."
48
+ },
49
+ {
50
+ "author": "tristan.watanabe@gmail.com",
51
+ "package": "@fluentui/react-positioning",
52
+ "commit": "ead1c6d4c2ac3f3596b62b8cbc07b0a03041f11f",
53
+ "comment": "fix: add node field to package.json exports map."
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "@fluentui/react-positioning",
58
+ "comment": "Bump @fluentui/react-shared-contexts to v9.3.2",
59
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-positioning",
64
+ "comment": "Bump @fluentui/react-theme to v9.1.7",
65
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-positioning",
70
+ "comment": "Bump @fluentui/react-utilities to v9.7.2",
71
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
33
72
  }
34
73
  ]
35
74
  }
package/CHANGELOG.md CHANGED
@@ -1,20 +1,33 @@
1
1
  # Change Log - @fluentui/react-positioning
2
2
 
3
- This log was last generated on Fri, 17 Mar 2023 15:00:02 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 22 Mar 2023 04:46:48 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20230317-1454.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v0.0.0-nightly-20230317-1454.1)
7
+ ## [0.0.0-nightly-20230322-0439.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v0.0.0-nightly-20230322-0439.1)
8
8
 
9
- Fri, 17 Mar 2023 15:00:02 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.5.5..@fluentui/react-positioning_v0.0.0-nightly-20230317-1454.1)
9
+ Wed, 22 Mar 2023 04:46:48 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.5.6..@fluentui/react-positioning_v0.0.0-nightly-20230322-0439.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230317-1454.1 ([commit](https://github.com/microsoft/fluentui/commit/636275472966fa37b1efc14ac2e70ad32bd39b86) by beachball)
16
- - Bump @fluentui/react-theme to v0.0.0-nightly-20230317-1454.1 ([commit](https://github.com/microsoft/fluentui/commit/636275472966fa37b1efc14ac2e70ad32bd39b86) by beachball)
17
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20230317-1454.1 ([commit](https://github.com/microsoft/fluentui/commit/636275472966fa37b1efc14ac2e70ad32bd39b86) by beachball)
15
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230322-0439.1 ([commit](https://github.com/microsoft/fluentui/commit/49dde84493fc2c3e96abac5ce918169c9668ba66) by beachball)
16
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20230322-0439.1 ([commit](https://github.com/microsoft/fluentui/commit/49dde84493fc2c3e96abac5ce918169c9668ba66) by beachball)
17
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230322-0439.1 ([commit](https://github.com/microsoft/fluentui/commit/49dde84493fc2c3e96abac5ce918169c9668ba66) by beachball)
18
+
19
+ ## [9.5.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.5.6)
20
+
21
+ Tue, 21 Mar 2023 21:23:45 GMT
22
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.5.5..@fluentui/react-positioning_v9.5.6)
23
+
24
+ ### Patches
25
+
26
+ - chore: migrate to swc transpilation approach. ([PR #27250](https://github.com/microsoft/fluentui/pull/27250) by tristan.watanabe@gmail.com)
27
+ - fix: add node field to package.json exports map. ([PR #27154](https://github.com/microsoft/fluentui/pull/27154) by tristan.watanabe@gmail.com)
28
+ - Bump @fluentui/react-shared-contexts to v9.3.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
29
+ - Bump @fluentui/react-theme to v9.1.7 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
30
+ - Bump @fluentui/react-utilities to v9.7.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
18
31
 
19
32
  ## [9.5.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.5.5)
20
33
 
package/lib/constants.js CHANGED
@@ -1,5 +1,5 @@
1
- export const DATA_POSITIONING_INTERSECTING = "data-popper-is-intersecting";
2
- export const DATA_POSITIONING_ESCAPED = "data-popper-escaped";
3
- export const DATA_POSITIONING_HIDDEN = "data-popper-reference-hidden";
4
- export const DATA_POSITIONING_PLACEMENT = "data-popper-placement";
1
+ export const DATA_POSITIONING_INTERSECTING = 'data-popper-is-intersecting';
2
+ export const DATA_POSITIONING_ESCAPED = 'data-popper-escaped';
3
+ export const DATA_POSITIONING_HIDDEN = 'data-popper-reference-hidden';
4
+ export const DATA_POSITIONING_PLACEMENT = 'data-popper-placement';
5
5
  //# sourceMappingURL=constants.js.map
@@ -1,5 +1,5 @@
1
- import { shorthands } from "@griffel/react";
2
- import { tokens } from "@fluentui/react-theme";
1
+ import { shorthands } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
3
  /**
4
4
  * @internal
5
5
  * Helper that creates a makeStyles rule for an arrow element.
@@ -26,45 +26,45 @@ import { tokens } from "@fluentui/react-theme";
26
26
  export function createArrowStyles(options) {
27
27
  const {
28
28
  arrowHeight,
29
- borderWidth = "1px",
30
- borderStyle = "solid",
29
+ borderWidth = '1px',
30
+ borderStyle = 'solid',
31
31
  borderColor = tokens.colorTransparentStroke
32
32
  } = options;
33
33
  return {
34
- position: "absolute",
35
- backgroundColor: "inherit",
36
- visibility: "hidden",
34
+ position: 'absolute',
35
+ backgroundColor: 'inherit',
36
+ visibility: 'hidden',
37
37
  zIndex: -1,
38
38
  ...(arrowHeight && createArrowHeightStyles(arrowHeight)),
39
- "::before": {
39
+ '::before': {
40
40
  content: '""',
41
- visibility: "visible",
42
- position: "absolute",
43
- boxSizing: "border-box",
44
- width: "inherit",
45
- height: "inherit",
46
- backgroundColor: "inherit",
41
+ visibility: 'visible',
42
+ position: 'absolute',
43
+ boxSizing: 'border-box',
44
+ width: 'inherit',
45
+ height: 'inherit',
46
+ backgroundColor: 'inherit',
47
47
  ...shorthands.borderRight(`${borderWidth} /* @noflip */`, `${borderStyle} /* @noflip */`, `${borderColor} /* @noflip */`),
48
48
  ...shorthands.borderBottom(borderWidth, borderStyle, borderColor),
49
49
  borderBottomRightRadius: tokens.borderRadiusSmall,
50
- transform: "rotate(var(--angle)) translate(0, 50%) rotate(45deg)"
50
+ transform: 'rotate(var(--angle)) translate(0, 50%) rotate(45deg)'
51
51
  },
52
52
  // Popper sets data-popper-placement on the root element, which is used to align the arrow
53
53
  ':global([data-popper-placement^="top"])': {
54
54
  bottom: `-${borderWidth}`,
55
- "--angle": "0"
55
+ '--angle': '0'
56
56
  },
57
57
  ':global([data-popper-placement^="right"])': {
58
58
  left: `-${borderWidth} /* @noflip */`,
59
- "--angle": "90deg"
59
+ '--angle': '90deg'
60
60
  },
61
61
  ':global([data-popper-placement^="bottom"])': {
62
62
  top: `-${borderWidth}`,
63
- "--angle": "180deg"
63
+ '--angle': '180deg'
64
64
  },
65
65
  ':global([data-popper-placement^="left"])': {
66
66
  right: `-${borderWidth} /* @noflip */`,
67
- "--angle": "270deg"
67
+ '--angle': '270deg'
68
68
  }
69
69
  };
70
70
  }
@@ -1,6 +1,6 @@
1
- import { computePosition } from "@floating-ui/dom";
2
- import { debounce, writeArrowUpdates, writeContainerUpdates, getScrollParent } from "./utils";
3
- import { isHTMLElement } from "@fluentui/react-utilities";
1
+ import { computePosition } from '@floating-ui/dom';
2
+ import { debounce, writeArrowUpdates, writeContainerUpdates, getScrollParent } from './utils';
3
+ import { isHTMLElement } from '@fluentui/react-utilities';
4
4
  /**
5
5
  * @internal
6
6
  * @returns manager that handles positioning out of the react lifecycle
@@ -27,7 +27,7 @@ export function createPositionManager(options) {
27
27
  // When the container is first resolved, set position `fixed` to avoid scroll jumps.
28
28
  // Without this scroll jumps can occur when the element is rendered initially and receives focus
29
29
  Object.assign(container.style, {
30
- position: "fixed",
30
+ position: 'fixed',
31
31
  left: 0,
32
32
  top: 0,
33
33
  margin: 0
@@ -44,7 +44,7 @@ export function createPositionManager(options) {
44
44
  scrollParents.add(getScrollParent(target));
45
45
  }
46
46
  scrollParents.forEach(scrollParent => {
47
- scrollParent.addEventListener("scroll", updatePosition);
47
+ scrollParent.addEventListener('scroll', updatePosition);
48
48
  });
49
49
  isFirstUpdate = false;
50
50
  }
@@ -78,7 +78,7 @@ export function createPositionManager(options) {
78
78
  x,
79
79
  y
80
80
  },
81
- lowPPI: (targetWindow?.devicePixelRatio || 1) <= 1,
81
+ lowPPI: ((targetWindow === null || targetWindow === void 0 ? void 0 : targetWindow.devicePixelRatio) || 1) <= 1,
82
82
  strategy
83
83
  });
84
84
  }).catch(err => {
@@ -89,9 +89,9 @@ export function createPositionManager(options) {
89
89
  // JSDOM being torn down before this promise is resolved so globals like `window` and `document` don't exist
90
90
  // Unless all tests that ever use `usePositioning` are turned into async tests, any logging during testing
91
91
  // will actually be counter productive
92
- if (process.env.NODE_ENV === "development") {
92
+ if (process.env.NODE_ENV === 'development') {
93
93
  // eslint-disable-next-line no-console
94
- console.error("[usePositioning]: Failed to calculate position", err);
94
+ console.error('[usePositioning]: Failed to calculate position', err);
95
95
  }
96
96
  });
97
97
  };
@@ -99,16 +99,16 @@ export function createPositionManager(options) {
99
99
  const dispose = () => {
100
100
  isDestroyed = true;
101
101
  if (targetWindow) {
102
- targetWindow.removeEventListener("scroll", updatePosition);
103
- targetWindow.removeEventListener("resize", updatePosition);
102
+ targetWindow.removeEventListener('scroll', updatePosition);
103
+ targetWindow.removeEventListener('resize', updatePosition);
104
104
  }
105
105
  scrollParents.forEach(scrollParent => {
106
- scrollParent.removeEventListener("scroll", updatePosition);
106
+ scrollParent.removeEventListener('scroll', updatePosition);
107
107
  });
108
108
  };
109
109
  if (targetWindow) {
110
- targetWindow.addEventListener("scroll", updatePosition);
111
- targetWindow.addEventListener("resize", updatePosition);
110
+ targetWindow.addEventListener('scroll', updatePosition);
111
+ targetWindow.addEventListener('resize', updatePosition);
112
112
  }
113
113
  // Update the position on initialization
114
114
  updatePosition();
@@ -1 +1 @@
1
- {"version":3,"names":["computePosition","debounce","writeArrowUpdates","writeContainerUpdates","getScrollParent","isHTMLElement","createPositionManager","options","container","target","arrow","strategy","middleware","placement","isDestroyed","updatePosition","undefined","dispose","isFirstUpdate","scrollParents","Set","targetWindow","ownerDocument","defaultView","Object","assign","style","position","left","top","margin","forceUpdate","add","forEach","scrollParent","addEventListener","then","x","y","middlewareData","computedPlacement","coordinates","lowPPI","devicePixelRatio","catch","err","process","env","NODE_ENV","console","error","removeEventListener"],"sources":["../src/createPositionManager.ts"],"sourcesContent":["import { computePosition } from '@floating-ui/dom';\nimport type { Middleware, Placement, Strategy } from '@floating-ui/dom';\nimport type { PositionManager, TargetElement } from './types';\nimport { debounce, writeArrowUpdates, writeContainerUpdates, getScrollParent } from './utils';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n\ninterface PositionManagerOptions {\n /**\n * The positioned element\n */\n container: HTMLElement;\n /**\n * Element that the container will be anchored to\n */\n target: TargetElement;\n /**\n * Arrow that points from the container to the target\n */\n arrow: HTMLElement | null;\n /**\n * The value of the css `position` property\n * @default absolute\n */\n strategy: Strategy;\n /**\n * [Floating UI middleware](https://floating-ui.com/docs/middleware)\n */\n middleware: Middleware[];\n /**\n * [Floating UI placement](https://floating-ui.com/docs/computePosition#placement)\n */\n placement?: Placement;\n}\n\n/**\n * @internal\n * @returns manager that handles positioning out of the react lifecycle\n */\nexport function createPositionManager(options: PositionManagerOptions): PositionManager {\n const { container, target, arrow, strategy, middleware, placement } = options;\n let isDestroyed = false;\n if (!target || !container) {\n return {\n updatePosition: () => undefined,\n dispose: () => undefined,\n };\n }\n\n let isFirstUpdate = true;\n const scrollParents: Set<HTMLElement> = new Set<HTMLElement>();\n const targetWindow = container.ownerDocument.defaultView;\n\n // When the container is first resolved, set position `fixed` to avoid scroll jumps.\n // Without this scroll jumps can occur when the element is rendered initially and receives focus\n Object.assign(container.style, { position: 'fixed', left: 0, top: 0, margin: 0 });\n\n const forceUpdate = () => {\n // debounced update can still occur afterwards\n // early return to avoid memory leaks\n if (isDestroyed) {\n return;\n }\n\n if (isFirstUpdate) {\n scrollParents.add(getScrollParent(container));\n if (isHTMLElement(target)) {\n scrollParents.add(getScrollParent(target));\n }\n\n scrollParents.forEach(scrollParent => {\n scrollParent.addEventListener('scroll', updatePosition);\n });\n\n isFirstUpdate = false;\n }\n\n Object.assign(container.style, { position: strategy });\n computePosition(target, container, { placement, middleware, strategy })\n .then(({ x, y, middlewareData, placement: computedPlacement }) => {\n // Promise can still resolve after destruction\n // early return to avoid applying outdated position\n if (isDestroyed) {\n return;\n }\n\n writeArrowUpdates({ arrow, middlewareData });\n writeContainerUpdates({\n container,\n middlewareData,\n placement: computedPlacement,\n coordinates: { x, y },\n lowPPI: (targetWindow?.devicePixelRatio || 1) <= 1,\n strategy,\n });\n })\n .catch(err => {\n // https://github.com/floating-ui/floating-ui/issues/1845\n // FIXME for node > 14\n // node 15 introduces promise rejection which means that any components\n // tests need to be `it('', async () => {})` otherwise there can be race conditions with\n // JSDOM being torn down before this promise is resolved so globals like `window` and `document` don't exist\n // Unless all tests that ever use `usePositioning` are turned into async tests, any logging during testing\n // will actually be counter productive\n if (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.error('[usePositioning]: Failed to calculate position', err);\n }\n });\n };\n\n const updatePosition = debounce(() => forceUpdate());\n\n const dispose = () => {\n isDestroyed = true;\n\n if (targetWindow) {\n targetWindow.removeEventListener('scroll', updatePosition);\n targetWindow.removeEventListener('resize', updatePosition);\n }\n\n scrollParents.forEach(scrollParent => {\n scrollParent.removeEventListener('scroll', updatePosition);\n });\n };\n\n if (targetWindow) {\n targetWindow.addEventListener('scroll', updatePosition);\n targetWindow.addEventListener('resize', updatePosition);\n }\n\n // Update the position on initialization\n updatePosition();\n\n return {\n updatePosition,\n dispose,\n };\n}\n"],"mappings":"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"}
1
+ {"version":3,"names":["computePosition","debounce","writeArrowUpdates","writeContainerUpdates","getScrollParent","isHTMLElement","createPositionManager","options","container","target","arrow","strategy","middleware","placement","isDestroyed","updatePosition","undefined","dispose","isFirstUpdate","scrollParents","Set","targetWindow","ownerDocument","defaultView","Object","assign","style","position","left","top","margin","forceUpdate","add","forEach","scrollParent","addEventListener","then","x","y","middlewareData","computedPlacement","coordinates","lowPPI","devicePixelRatio","catch","err","process","env","NODE_ENV","console","error","removeEventListener"],"sources":["../src/createPositionManager.ts"],"sourcesContent":["import { computePosition } from '@floating-ui/dom';\nimport type { Middleware, Placement, Strategy } from '@floating-ui/dom';\nimport type { PositionManager, TargetElement } from './types';\nimport { debounce, writeArrowUpdates, writeContainerUpdates, getScrollParent } from './utils';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n\ninterface PositionManagerOptions {\n /**\n * The positioned element\n */\n container: HTMLElement;\n /**\n * Element that the container will be anchored to\n */\n target: TargetElement;\n /**\n * Arrow that points from the container to the target\n */\n arrow: HTMLElement | null;\n /**\n * The value of the css `position` property\n * @default absolute\n */\n strategy: Strategy;\n /**\n * [Floating UI middleware](https://floating-ui.com/docs/middleware)\n */\n middleware: Middleware[];\n /**\n * [Floating UI placement](https://floating-ui.com/docs/computePosition#placement)\n */\n placement?: Placement;\n}\n\n/**\n * @internal\n * @returns manager that handles positioning out of the react lifecycle\n */\nexport function createPositionManager(options: PositionManagerOptions): PositionManager {\n const { container, target, arrow, strategy, middleware, placement } = options;\n let isDestroyed = false;\n if (!target || !container) {\n return {\n updatePosition: () => undefined,\n dispose: () => undefined,\n };\n }\n\n let isFirstUpdate = true;\n const scrollParents: Set<HTMLElement> = new Set<HTMLElement>();\n const targetWindow = container.ownerDocument.defaultView;\n\n // When the container is first resolved, set position `fixed` to avoid scroll jumps.\n // Without this scroll jumps can occur when the element is rendered initially and receives focus\n Object.assign(container.style, { position: 'fixed', left: 0, top: 0, margin: 0 });\n\n const forceUpdate = () => {\n // debounced update can still occur afterwards\n // early return to avoid memory leaks\n if (isDestroyed) {\n return;\n }\n\n if (isFirstUpdate) {\n scrollParents.add(getScrollParent(container));\n if (isHTMLElement(target)) {\n scrollParents.add(getScrollParent(target));\n }\n\n scrollParents.forEach(scrollParent => {\n scrollParent.addEventListener('scroll', updatePosition);\n });\n\n isFirstUpdate = false;\n }\n\n Object.assign(container.style, { position: strategy });\n computePosition(target, container, { placement, middleware, strategy })\n .then(({ x, y, middlewareData, placement: computedPlacement }) => {\n // Promise can still resolve after destruction\n // early return to avoid applying outdated position\n if (isDestroyed) {\n return;\n }\n\n writeArrowUpdates({ arrow, middlewareData });\n writeContainerUpdates({\n container,\n middlewareData,\n placement: computedPlacement,\n coordinates: { x, y },\n lowPPI: (targetWindow?.devicePixelRatio || 1) <= 1,\n strategy,\n });\n })\n .catch(err => {\n // https://github.com/floating-ui/floating-ui/issues/1845\n // FIXME for node > 14\n // node 15 introduces promise rejection which means that any components\n // tests need to be `it('', async () => {})` otherwise there can be race conditions with\n // JSDOM being torn down before this promise is resolved so globals like `window` and `document` don't exist\n // Unless all tests that ever use `usePositioning` are turned into async tests, any logging during testing\n // will actually be counter productive\n if (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.error('[usePositioning]: Failed to calculate position', err);\n }\n });\n };\n\n const updatePosition = debounce(() => forceUpdate());\n\n const dispose = () => {\n isDestroyed = true;\n\n if (targetWindow) {\n targetWindow.removeEventListener('scroll', updatePosition);\n targetWindow.removeEventListener('resize', updatePosition);\n }\n\n scrollParents.forEach(scrollParent => {\n scrollParent.removeEventListener('scroll', updatePosition);\n });\n };\n\n if (targetWindow) {\n targetWindow.addEventListener('scroll', updatePosition);\n targetWindow.addEventListener('resize', updatePosition);\n }\n\n // Update the position on initialization\n updatePosition();\n\n return {\n updatePosition,\n dispose,\n };\n}\n"],"mappings":"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"}
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { createVirtualElementFromClick } from "./createVirtualElementFromClick";
2
- export { createArrowHeightStyles, createArrowStyles } from "./createArrowStyles";
3
- export { usePositioning } from "./usePositioning";
4
- export { usePositioningMouseTarget } from "./usePositioningMouseTarget";
5
- export { resolvePositioningShorthand, mergeArrowOffset } from "./utils/index";
1
+ export { createVirtualElementFromClick } from './createVirtualElementFromClick';
2
+ export { createArrowHeightStyles, createArrowStyles } from './createArrowStyles';
3
+ export { usePositioning } from './usePositioning';
4
+ export { usePositioningMouseTarget } from './usePositioningMouseTarget';
5
+ export { resolvePositioningShorthand, mergeArrowOffset } from './utils/index';
6
6
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
- import { parseFloatingUIPlacement } from "../utils/index";
1
+ import { parseFloatingUIPlacement } from '../utils/index';
2
2
  export function coverTarget() {
3
3
  return {
4
- name: "coverTarget",
4
+ name: 'coverTarget',
5
5
  fn: middlewareArguments => {
6
6
  const {
7
7
  placement,
@@ -15,16 +15,16 @@ export function coverTarget() {
15
15
  y
16
16
  };
17
17
  switch (basePlacement) {
18
- case "bottom":
18
+ case 'bottom':
19
19
  newCoords.y -= rects.reference.height;
20
20
  break;
21
- case "top":
21
+ case 'top':
22
22
  newCoords.y += rects.reference.height;
23
23
  break;
24
- case "left":
24
+ case 'left':
25
25
  newCoords.x += rects.reference.width;
26
26
  break;
27
- case "right":
27
+ case 'right':
28
28
  newCoords.x -= rects.reference.width;
29
29
  break;
30
30
  }
@@ -1,5 +1,5 @@
1
- import { flip as baseFlip } from "@floating-ui/dom";
2
- import { getBoundary, resolvePositioningShorthand, toFloatingUIPlacement } from "../utils/index";
1
+ import { flip as baseFlip } from '@floating-ui/dom';
2
+ import { getBoundary, resolvePositioningShorthand, toFloatingUIPlacement } from '../utils/index';
3
3
  export function flip(options) {
4
4
  const {
5
5
  hasScrollableElement,
@@ -21,13 +21,13 @@ export function flip(options) {
21
21
  }, []);
22
22
  return baseFlip({
23
23
  ...(hasScrollableElement && {
24
- boundary: "clippingAncestors"
24
+ boundary: 'clippingAncestors'
25
25
  }),
26
26
  ...(flipBoundary && {
27
27
  altBoundary: true,
28
28
  boundary: getBoundary(container, flipBoundary)
29
29
  }),
30
- fallbackStrategy: "bestFit",
30
+ fallbackStrategy: 'bestFit',
31
31
  ...(fallbackPlacements.length && {
32
32
  fallbackPlacements
33
33
  })
@@ -1,7 +1,7 @@
1
- export * from "./coverTarget";
2
- export * from "./flip";
3
- export * from "./intersecting";
4
- export * from "./maxSize";
5
- export * from "./offset";
6
- export * from "./shift";
1
+ export * from './coverTarget';
2
+ export * from './flip';
3
+ export * from './intersecting';
4
+ export * from './maxSize';
5
+ export * from './offset';
6
+ export * from './shift';
7
7
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
- import { detectOverflow } from "@floating-ui/dom";
1
+ import { detectOverflow } from '@floating-ui/dom';
2
2
  export function intersecting() {
3
3
  return {
4
- name: "intersectionObserver",
4
+ name: 'intersectionObserver',
5
5
  fn: async middlewareArguments => {
6
6
  const floatingRect = middlewareArguments.rects.floating;
7
7
  const altOverflow = await detectOverflow(middlewareArguments, {
@@ -1,5 +1,5 @@
1
- import { size } from "@floating-ui/dom";
2
- import { getBoundary } from "../utils/getBoundary";
1
+ import { size } from '@floating-ui/dom';
2
+ import { getBoundary } from '../utils/getBoundary';
3
3
  export function maxSize(autoSize, options) {
4
4
  const {
5
5
  container,
@@ -16,20 +16,20 @@ export function maxSize(autoSize, options) {
16
16
  elements,
17
17
  rects
18
18
  }) {
19
- const applyMaxWidth = autoSize === "always" || autoSize === "width-always" || rects.floating.width > availableWidth && (autoSize === true || autoSize === "width");
20
- const applyMaxHeight = autoSize === "always" || autoSize === "height-always" || rects.floating.height > availableHeight && (autoSize === true || autoSize === "height");
19
+ const applyMaxWidth = autoSize === 'always' || autoSize === 'width-always' || rects.floating.width > availableWidth && (autoSize === true || autoSize === 'width');
20
+ const applyMaxHeight = autoSize === 'always' || autoSize === 'height-always' || rects.floating.height > availableHeight && (autoSize === true || autoSize === 'height');
21
21
  if (applyMaxHeight) {
22
22
  Object.assign(elements.floating.style, {
23
23
  maxHeight: `${availableHeight}px`,
24
- boxSizing: "border-box",
25
- overflowY: "auto"
24
+ boxSizing: 'border-box',
25
+ overflowY: 'auto'
26
26
  });
27
27
  }
28
28
  if (applyMaxWidth) {
29
29
  Object.assign(elements.floating.style, {
30
30
  maxWidth: `${availableWidth}px`,
31
- boxSizing: "border-box",
32
- overflowX: "auto"
31
+ boxSizing: 'border-box',
32
+ overflowX: 'auto'
33
33
  });
34
34
  }
35
35
  }
@@ -1,5 +1,5 @@
1
- import { offset as baseOffset } from "@floating-ui/dom";
2
- import { getFloatingUIOffset } from "../utils/getFloatingUIOffset";
1
+ import { offset as baseOffset } from '@floating-ui/dom';
2
+ import { getFloatingUIOffset } from '../utils/getFloatingUIOffset';
3
3
  /**
4
4
  * Wraps floating UI offset middleware to to transform offset value
5
5
  */
@@ -1,5 +1,5 @@
1
- import { shift as baseShift, limitShift } from "@floating-ui/dom";
2
- import { getBoundary, toFloatingUIPadding } from "../utils/index";
1
+ import { shift as baseShift, limitShift } from '@floating-ui/dom';
2
+ import { getBoundary, toFloatingUIPadding } from '../utils/index';
3
3
  /**
4
4
  * Wraps the floating UI shift middleware for easier usage of our options
5
5
  */
@@ -14,12 +14,12 @@ export function shift(options) {
14
14
  } = options;
15
15
  return baseShift({
16
16
  ...(hasScrollableElement && {
17
- boundary: "clippingAncestors"
17
+ boundary: 'clippingAncestors'
18
18
  }),
19
19
  ...(disableTether && {
20
- crossAxis: disableTether === "all",
20
+ crossAxis: disableTether === 'all',
21
21
  limiter: limitShift({
22
- crossAxis: disableTether !== "all",
22
+ crossAxis: disableTether !== 'all',
23
23
  mainAxis: false
24
24
  })
25
25
  }),
package/lib/types.js CHANGED
@@ -1,2 +1,2 @@
1
- import * as React from "react";
1
+ import * as React from 'react';
2
2
  //# sourceMappingURL=types.js.map