@fluentui/react-positioning 9.0.0-rc.1 → 9.0.0-rc.12

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 (99) hide show
  1. package/CHANGELOG.json +335 -1
  2. package/CHANGELOG.md +186 -69
  3. package/dist/{react-positioning.d.ts → index.d.ts} +72 -46
  4. package/{lib → dist}/tsdoc-metadata.json +0 -0
  5. package/lib/createArrowStyles.js.map +1 -1
  6. package/lib/createVirtualElementFromClick.js +2 -0
  7. package/lib/createVirtualElementFromClick.js.map +1 -1
  8. package/lib/index.js +4 -5
  9. package/lib/index.js.map +1 -1
  10. package/lib/isIntersectingModifier.js +26 -0
  11. package/lib/isIntersectingModifier.js.map +1 -0
  12. package/lib/types.js.map +1 -1
  13. package/lib/{usePopper.js → usePositioning.js} +11 -9
  14. package/lib/usePositioning.js.map +1 -0
  15. package/lib/{usePopperMouseTarget.js → usePositioningMouseTarget.js} +3 -3
  16. package/lib/usePositioningMouseTarget.js.map +1 -0
  17. package/lib/utils/fromPopperPlacement.js +40 -0
  18. package/lib/utils/fromPopperPlacement.js.map +1 -0
  19. package/lib/utils/getBoundary.js.map +1 -1
  20. package/lib/utils/getPopperOffset.js +44 -0
  21. package/lib/utils/getPopperOffset.js.map +1 -0
  22. package/lib/utils/getReactFiberFromNode.js.map +1 -1
  23. package/lib/utils/getScrollParent.js.map +1 -1
  24. package/lib/utils/index.js +1 -1
  25. package/lib/utils/index.js.map +1 -1
  26. package/lib/utils/mergeArrowOffset.js +23 -22
  27. package/lib/utils/mergeArrowOffset.js.map +1 -1
  28. package/lib/utils/parsePopperPlacement.js +14 -0
  29. package/lib/utils/parsePopperPlacement.js.map +1 -0
  30. package/lib/utils/positioningHelper.js.map +1 -1
  31. package/lib/utils/resolvePositioningShorthand.js.map +1 -1
  32. package/lib/utils/useCallbackRef.js.map +1 -1
  33. package/lib-commonjs/createArrowStyles.js.map +1 -1
  34. package/lib-commonjs/createVirtualElementFromClick.js +2 -0
  35. package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
  36. package/lib-commonjs/index.js +38 -8
  37. package/lib-commonjs/index.js.map +1 -1
  38. package/lib-commonjs/isIntersectingModifier.js +34 -0
  39. package/lib-commonjs/isIntersectingModifier.js.map +1 -0
  40. package/lib-commonjs/types.js.map +1 -1
  41. package/lib-commonjs/{usePopper.js → usePositioning.js} +15 -11
  42. package/lib-commonjs/usePositioning.js.map +1 -0
  43. package/lib-commonjs/{usePopperMouseTarget.js → usePositioningMouseTarget.js} +5 -5
  44. package/lib-commonjs/usePositioningMouseTarget.js.map +1 -0
  45. package/lib-commonjs/utils/fromPopperPlacement.js +50 -0
  46. package/lib-commonjs/utils/fromPopperPlacement.js.map +1 -0
  47. package/lib-commonjs/utils/getBoundary.js.map +1 -1
  48. package/lib-commonjs/utils/getPopperOffset.js +54 -0
  49. package/lib-commonjs/utils/getPopperOffset.js.map +1 -0
  50. package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
  51. package/lib-commonjs/utils/getScrollParent.js.map +1 -1
  52. package/lib-commonjs/utils/index.js +2 -2
  53. package/lib-commonjs/utils/index.js.map +1 -1
  54. package/lib-commonjs/utils/mergeArrowOffset.js +23 -22
  55. package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
  56. package/lib-commonjs/utils/parsePopperPlacement.js +23 -0
  57. package/lib-commonjs/utils/parsePopperPlacement.js.map +1 -0
  58. package/lib-commonjs/utils/positioningHelper.js.map +1 -1
  59. package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
  60. package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
  61. package/package.json +15 -11
  62. package/lib/createArrowStyles.d.ts +0 -64
  63. package/lib/createVirtualElementFromClick.d.ts +0 -6
  64. package/lib/index.d.ts +0 -6
  65. package/lib/types.d.ts +0 -89
  66. package/lib/usePopper.d.ts +0 -23
  67. package/lib/usePopper.js.map +0 -1
  68. package/lib/usePopperMouseTarget.d.ts +0 -11
  69. package/lib/usePopperMouseTarget.js.map +0 -1
  70. package/lib/utils/getBasePlacement.d.ts +0 -8
  71. package/lib/utils/getBasePlacement.js +0 -10
  72. package/lib/utils/getBasePlacement.js.map +0 -1
  73. package/lib/utils/getBoundary.d.ts +0 -6
  74. package/lib/utils/getReactFiberFromNode.d.ts +0 -108
  75. package/lib/utils/getScrollParent.d.ts +0 -12
  76. package/lib/utils/index.d.ts +0 -8
  77. package/lib/utils/mergeArrowOffset.d.ts +0 -10
  78. package/lib/utils/positioningHelper.d.ts +0 -7
  79. package/lib/utils/resolvePositioningShorthand.d.ts +0 -2
  80. package/lib/utils/useCallbackRef.d.ts +0 -19
  81. package/lib-commonjs/createArrowStyles.d.ts +0 -64
  82. package/lib-commonjs/createVirtualElementFromClick.d.ts +0 -6
  83. package/lib-commonjs/index.d.ts +0 -6
  84. package/lib-commonjs/types.d.ts +0 -89
  85. package/lib-commonjs/usePopper.d.ts +0 -23
  86. package/lib-commonjs/usePopper.js.map +0 -1
  87. package/lib-commonjs/usePopperMouseTarget.d.ts +0 -11
  88. package/lib-commonjs/usePopperMouseTarget.js.map +0 -1
  89. package/lib-commonjs/utils/getBasePlacement.d.ts +0 -8
  90. package/lib-commonjs/utils/getBasePlacement.js +0 -19
  91. package/lib-commonjs/utils/getBasePlacement.js.map +0 -1
  92. package/lib-commonjs/utils/getBoundary.d.ts +0 -6
  93. package/lib-commonjs/utils/getReactFiberFromNode.d.ts +0 -108
  94. package/lib-commonjs/utils/getScrollParent.d.ts +0 -12
  95. package/lib-commonjs/utils/index.d.ts +0 -8
  96. package/lib-commonjs/utils/mergeArrowOffset.d.ts +0 -10
  97. package/lib-commonjs/utils/positioningHelper.d.ts +0 -7
  98. package/lib-commonjs/utils/resolvePositioningShorthand.d.ts +0 -2
  99. package/lib-commonjs/utils/useCallbackRef.d.ts +0 -19
@@ -1,7 +0,0 @@
1
- import * as PopperJs from '@popperjs/core';
2
- import type { Alignment, Offset, Position } from '../types';
3
- /**
4
- * @see positioninHelper.test.ts for expected placement values
5
- */
6
- export declare const getPlacement: (align?: Alignment | undefined, position?: Position | undefined, rtl?: boolean | undefined) => PopperJs.Placement;
7
- export declare const applyRtlToOffset: (offset: Offset | undefined) => Offset | undefined;
@@ -1,2 +0,0 @@
1
- import type { PositioningShorthand, PositioningProps } from '../types';
2
- export declare function resolvePositioningShorthand(shorthand: PositioningShorthand | undefined | null): Readonly<PositioningProps>;
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * Creates a MutableRef with ref change callback. Is useful as React.useRef() doesn't notify you when its content
4
- * changes and mutating the .current property doesn't cause a re-render. An opt-out will be use a callback ref via
5
- * React.useState(), but it will cause re-renders always.
6
- *
7
- * https://reactjs.org/docs/hooks-reference.html#useref
8
- * https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
9
- *
10
- * @param initialValue - initial ref value
11
- * @param callback - a callback to run when value changes
12
- * @param skipInitialResolve - a flag to skip an initial ref report
13
- *
14
- * @example
15
- * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
16
- * ref.current = 1;
17
- * // prints 0 -> 1
18
- */
19
- export declare function useCallbackRef<T>(initialValue: T | null, callback: (newValue: T | null, lastValue: T | null) => void, skipInitialResolve?: boolean): React.MutableRefObject<T | null>;