@fluentui/react-positioning 9.5.14 → 9.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. package/CHANGELOG.json +77 -1
  2. package/CHANGELOG.md +33 -2
  3. package/dist/index.d.ts +14 -2
  4. package/lib/constants.js +0 -1
  5. package/lib/constants.js.map +1 -1
  6. package/lib/createArrowStyles.js +47 -55
  7. package/lib/createArrowStyles.js.map +1 -1
  8. package/lib/createPositionManager.js +95 -108
  9. package/lib/createPositionManager.js.map +1 -1
  10. package/lib/createSlideStyles.js +59 -0
  11. package/lib/createSlideStyles.js.map +1 -0
  12. package/lib/createVirtualElementFromClick.js +18 -19
  13. package/lib/createVirtualElementFromClick.js.map +1 -1
  14. package/lib/index.js +1 -1
  15. package/lib/index.js.map +1 -1
  16. package/lib/middleware/coverTarget.js +26 -32
  17. package/lib/middleware/coverTarget.js.map +1 -1
  18. package/lib/middleware/flip.js +22 -32
  19. package/lib/middleware/flip.js.map +1 -1
  20. package/lib/middleware/index.js +0 -1
  21. package/lib/middleware/index.js.map +1 -1
  22. package/lib/middleware/intersecting.js +16 -17
  23. package/lib/middleware/intersecting.js.map +1 -1
  24. package/lib/middleware/maxSize.js +25 -34
  25. package/lib/middleware/maxSize.js.map +1 -1
  26. package/lib/middleware/offset.js +3 -5
  27. package/lib/middleware/offset.js.map +1 -1
  28. package/lib/middleware/shift.js +21 -30
  29. package/lib/middleware/shift.js.map +1 -1
  30. package/lib/types.js +0 -1
  31. package/lib/types.js.map +1 -1
  32. package/lib/usePositioning.js +188 -154
  33. package/lib/usePositioning.js.map +1 -1
  34. package/lib/usePositioningMouseTarget.js +24 -23
  35. package/lib/usePositioningMouseTarget.js.map +1 -1
  36. package/lib/utils/debounce.js +13 -14
  37. package/lib/utils/debounce.js.map +1 -1
  38. package/lib/utils/fromFloatingUIPlacement.js +23 -28
  39. package/lib/utils/fromFloatingUIPlacement.js.map +1 -1
  40. package/lib/utils/getBoundary.js +14 -16
  41. package/lib/utils/getBoundary.js.map +1 -1
  42. package/lib/utils/getFloatingUIOffset.js +16 -27
  43. package/lib/utils/getFloatingUIOffset.js.map +1 -1
  44. package/lib/utils/getReactFiberFromNode.js +36 -37
  45. package/lib/utils/getReactFiberFromNode.js.map +1 -1
  46. package/lib/utils/getScrollParent.js +35 -42
  47. package/lib/utils/getScrollParent.js.map +1 -1
  48. package/lib/utils/hasAutoFocusFilter.js +9 -11
  49. package/lib/utils/hasAutoFocusFilter.js.map +1 -1
  50. package/lib/utils/index.js +0 -1
  51. package/lib/utils/index.js.map +1 -1
  52. package/lib/utils/mergeArrowOffset.js +24 -25
  53. package/lib/utils/mergeArrowOffset.js.map +1 -1
  54. package/lib/utils/parseFloatingUIPlacement.js +6 -7
  55. package/lib/utils/parseFloatingUIPlacement.js.map +1 -1
  56. package/lib/utils/resolvePositioningShorthand.js +55 -56
  57. package/lib/utils/resolvePositioningShorthand.js.map +1 -1
  58. package/lib/utils/toFloatingUIPadding.js +16 -21
  59. package/lib/utils/toFloatingUIPadding.js.map +1 -1
  60. package/lib/utils/toFloatingUIPlacement.js +25 -27
  61. package/lib/utils/toFloatingUIPlacement.js.map +1 -1
  62. package/lib/utils/toggleScrollListener.js +12 -14
  63. package/lib/utils/toggleScrollListener.js.map +1 -1
  64. package/lib/utils/useCallbackRef.js +30 -32
  65. package/lib/utils/useCallbackRef.js.map +1 -1
  66. package/lib/utils/writeArrowUpdates.js +10 -17
  67. package/lib/utils/writeArrowUpdates.js.map +1 -1
  68. package/lib/utils/writeContainerupdates.js +39 -39
  69. package/lib/utils/writeContainerupdates.js.map +1 -1
  70. package/lib-commonjs/constants.js +1 -3
  71. package/lib-commonjs/constants.js.map +1 -1
  72. package/lib-commonjs/createArrowStyles.js +1 -3
  73. package/lib-commonjs/createArrowStyles.js.map +1 -1
  74. package/lib-commonjs/createPositionManager.js +4 -5
  75. package/lib-commonjs/createPositionManager.js.map +1 -1
  76. package/lib-commonjs/createSlideStyles.js +63 -0
  77. package/lib-commonjs/createSlideStyles.js.map +1 -0
  78. package/lib-commonjs/createVirtualElementFromClick.js +1 -3
  79. package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
  80. package/lib-commonjs/index.js +2 -3
  81. package/lib-commonjs/index.js.map +1 -1
  82. package/lib-commonjs/middleware/coverTarget.js +1 -3
  83. package/lib-commonjs/middleware/coverTarget.js.map +1 -1
  84. package/lib-commonjs/middleware/flip.js +1 -3
  85. package/lib-commonjs/middleware/flip.js.map +1 -1
  86. package/lib-commonjs/middleware/index.js +0 -3
  87. package/lib-commonjs/middleware/index.js.map +1 -1
  88. package/lib-commonjs/middleware/intersecting.js +1 -3
  89. package/lib-commonjs/middleware/intersecting.js.map +1 -1
  90. package/lib-commonjs/middleware/maxSize.js +1 -3
  91. package/lib-commonjs/middleware/maxSize.js.map +1 -1
  92. package/lib-commonjs/middleware/offset.js +1 -3
  93. package/lib-commonjs/middleware/offset.js.map +1 -1
  94. package/lib-commonjs/middleware/shift.js +1 -3
  95. package/lib-commonjs/middleware/shift.js.map +1 -1
  96. package/lib-commonjs/types.js +0 -3
  97. package/lib-commonjs/types.js.map +1 -1
  98. package/lib-commonjs/usePositioning.js +6 -6
  99. package/lib-commonjs/usePositioning.js.map +1 -1
  100. package/lib-commonjs/usePositioningMouseTarget.js +1 -3
  101. package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
  102. package/lib-commonjs/utils/debounce.js +1 -3
  103. package/lib-commonjs/utils/debounce.js.map +1 -1
  104. package/lib-commonjs/utils/fromFloatingUIPlacement.js +1 -3
  105. package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
  106. package/lib-commonjs/utils/getBoundary.js +1 -3
  107. package/lib-commonjs/utils/getBoundary.js.map +1 -1
  108. package/lib-commonjs/utils/getFloatingUIOffset.js +1 -3
  109. package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
  110. package/lib-commonjs/utils/getReactFiberFromNode.js +1 -3
  111. package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
  112. package/lib-commonjs/utils/getScrollParent.js +1 -3
  113. package/lib-commonjs/utils/getScrollParent.js.map +1 -1
  114. package/lib-commonjs/utils/hasAutoFocusFilter.js +1 -3
  115. package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
  116. package/lib-commonjs/utils/index.js +0 -3
  117. package/lib-commonjs/utils/index.js.map +1 -1
  118. package/lib-commonjs/utils/mergeArrowOffset.js +1 -3
  119. package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
  120. package/lib-commonjs/utils/parseFloatingUIPlacement.js +1 -3
  121. package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
  122. package/lib-commonjs/utils/resolvePositioningShorthand.js +1 -3
  123. package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
  124. package/lib-commonjs/utils/toFloatingUIPadding.js +1 -3
  125. package/lib-commonjs/utils/toFloatingUIPadding.js.map +1 -1
  126. package/lib-commonjs/utils/toFloatingUIPlacement.js +1 -3
  127. package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
  128. package/lib-commonjs/utils/toggleScrollListener.js +1 -3
  129. package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
  130. package/lib-commonjs/utils/useCallbackRef.js +1 -3
  131. package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
  132. package/lib-commonjs/utils/writeArrowUpdates.js +1 -3
  133. package/lib-commonjs/utils/writeArrowUpdates.js.map +1 -1
  134. package/lib-commonjs/utils/writeContainerupdates.js +12 -5
  135. package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
  136. package/package.json +5 -5
@@ -1,61 +1,60 @@
1
1
  // Look up table for shorthand to avoid parsing strings
2
2
  const shorthandLookup = {
3
- above: {
4
- position: 'above',
5
- align: 'center'
6
- },
7
- 'above-start': {
8
- position: 'above',
9
- align: 'start'
10
- },
11
- 'above-end': {
12
- position: 'above',
13
- align: 'end'
14
- },
15
- below: {
16
- position: 'below',
17
- align: 'center'
18
- },
19
- 'below-start': {
20
- position: 'below',
21
- align: 'start'
22
- },
23
- 'below-end': {
24
- position: 'below',
25
- align: 'end'
26
- },
27
- before: {
28
- position: 'before',
29
- align: 'center'
30
- },
31
- 'before-top': {
32
- position: 'before',
33
- align: 'top'
34
- },
35
- 'before-bottom': {
36
- position: 'before',
37
- align: 'bottom'
38
- },
39
- after: {
40
- position: 'after',
41
- align: 'center'
42
- },
43
- 'after-top': {
44
- position: 'after',
45
- align: 'top'
46
- },
47
- 'after-bottom': {
48
- position: 'after',
49
- align: 'bottom'
50
- }
3
+ above: {
4
+ position: 'above',
5
+ align: 'center'
6
+ },
7
+ 'above-start': {
8
+ position: 'above',
9
+ align: 'start'
10
+ },
11
+ 'above-end': {
12
+ position: 'above',
13
+ align: 'end'
14
+ },
15
+ below: {
16
+ position: 'below',
17
+ align: 'center'
18
+ },
19
+ 'below-start': {
20
+ position: 'below',
21
+ align: 'start'
22
+ },
23
+ 'below-end': {
24
+ position: 'below',
25
+ align: 'end'
26
+ },
27
+ before: {
28
+ position: 'before',
29
+ align: 'center'
30
+ },
31
+ 'before-top': {
32
+ position: 'before',
33
+ align: 'top'
34
+ },
35
+ 'before-bottom': {
36
+ position: 'before',
37
+ align: 'bottom'
38
+ },
39
+ after: {
40
+ position: 'after',
41
+ align: 'center'
42
+ },
43
+ 'after-top': {
44
+ position: 'after',
45
+ align: 'top'
46
+ },
47
+ 'after-bottom': {
48
+ position: 'after',
49
+ align: 'bottom'
50
+ }
51
51
  };
52
52
  export function resolvePositioningShorthand(shorthand) {
53
- if (shorthand === undefined || shorthand === null) {
54
- return {};
55
- }
56
- if (typeof shorthand === 'string') {
57
- return shorthandLookup[shorthand];
58
- }
59
- return shorthand;
53
+ if (shorthand === undefined || shorthand === null) {
54
+ return {};
55
+ }
56
+ if (typeof shorthand === 'string') {
57
+ return shorthandLookup[shorthand];
58
+ }
59
+ return shorthand;
60
60
  }
61
- //# sourceMappingURL=resolvePositioningShorthand.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["shorthandLookup","above","position","align","below","before","after","resolvePositioningShorthand","shorthand","undefined"],"sources":["../../src/utils/resolvePositioningShorthand.ts"],"sourcesContent":["import type { PositioningShorthand, PositioningShorthandValue, PositioningProps } from '../types';\n\n// Look up table for shorthand to avoid parsing strings\nconst shorthandLookup: Record<PositioningShorthandValue, Pick<PositioningProps, 'position' | 'align'>> = {\n above: { position: 'above', align: 'center' },\n 'above-start': { position: 'above', align: 'start' },\n 'above-end': { position: 'above', align: 'end' },\n below: { position: 'below', align: 'center' },\n 'below-start': { position: 'below', align: 'start' },\n 'below-end': { position: 'below', align: 'end' },\n before: { position: 'before', align: 'center' },\n 'before-top': { position: 'before', align: 'top' },\n 'before-bottom': { position: 'before', align: 'bottom' },\n after: { position: 'after', align: 'center' },\n 'after-top': { position: 'after', align: 'top' },\n 'after-bottom': { position: 'after', align: 'bottom' },\n};\n\nexport function resolvePositioningShorthand(\n shorthand: PositioningShorthand | undefined | null,\n): Readonly<PositioningProps> {\n if (shorthand === undefined || shorthand === null) {\n return {};\n }\n\n if (typeof shorthand === 'string') {\n return shorthandLookup[shorthand];\n }\n\n return shorthand as Readonly<PositioningProps>;\n}\n"],"mappings":"AAEA;AACA,MAAMA,eAAA,GAAmG;EACvGC,KAAA,EAAO;IAAEC,QAAA,EAAU;IAASC,KAAA,EAAO;EAAS;EAC5C,eAAe;IAAED,QAAA,EAAU;IAASC,KAAA,EAAO;EAAQ;EACnD,aAAa;IAAED,QAAA,EAAU;IAASC,KAAA,EAAO;EAAM;EAC/CC,KAAA,EAAO;IAAEF,QAAA,EAAU;IAASC,KAAA,EAAO;EAAS;EAC5C,eAAe;IAAED,QAAA,EAAU;IAASC,KAAA,EAAO;EAAQ;EACnD,aAAa;IAAED,QAAA,EAAU;IAASC,KAAA,EAAO;EAAM;EAC/CE,MAAA,EAAQ;IAAEH,QAAA,EAAU;IAAUC,KAAA,EAAO;EAAS;EAC9C,cAAc;IAAED,QAAA,EAAU;IAAUC,KAAA,EAAO;EAAM;EACjD,iBAAiB;IAAED,QAAA,EAAU;IAAUC,KAAA,EAAO;EAAS;EACvDG,KAAA,EAAO;IAAEJ,QAAA,EAAU;IAASC,KAAA,EAAO;EAAS;EAC5C,aAAa;IAAED,QAAA,EAAU;IAASC,KAAA,EAAO;EAAM;EAC/C,gBAAgB;IAAED,QAAA,EAAU;IAASC,KAAA,EAAO;EAAS;AACvD;AAEA,OAAO,SAASI,4BACdC,SAAkD,EACtB;EAC5B,IAAIA,SAAA,KAAcC,SAAA,IAAaD,SAAA,KAAc,IAAI,EAAE;IACjD,OAAO,CAAC;EACV;EAEA,IAAI,OAAOA,SAAA,KAAc,UAAU;IACjC,OAAOR,eAAe,CAACQ,SAAA,CAAU;EACnC;EAEA,OAAOA,SAAA;AACT"}
1
+ {"version":3,"sources":["resolvePositioningShorthand.ts"],"sourcesContent":["import type { PositioningShorthand, PositioningShorthandValue, PositioningProps } from '../types';\n\n// Look up table for shorthand to avoid parsing strings\nconst shorthandLookup: Record<PositioningShorthandValue, Pick<PositioningProps, 'position' | 'align'>> = {\n above: { position: 'above', align: 'center' },\n 'above-start': { position: 'above', align: 'start' },\n 'above-end': { position: 'above', align: 'end' },\n below: { position: 'below', align: 'center' },\n 'below-start': { position: 'below', align: 'start' },\n 'below-end': { position: 'below', align: 'end' },\n before: { position: 'before', align: 'center' },\n 'before-top': { position: 'before', align: 'top' },\n 'before-bottom': { position: 'before', align: 'bottom' },\n after: { position: 'after', align: 'center' },\n 'after-top': { position: 'after', align: 'top' },\n 'after-bottom': { position: 'after', align: 'bottom' },\n};\n\nexport function resolvePositioningShorthand(\n shorthand: PositioningShorthand | undefined | null,\n): Readonly<PositioningProps> {\n if (shorthand === undefined || shorthand === null) {\n return {};\n }\n\n if (typeof shorthand === 'string') {\n return shorthandLookup[shorthand];\n }\n\n return shorthand as Readonly<PositioningProps>;\n}\n"],"names":["shorthandLookup","above","position","align","below","before","after","resolvePositioningShorthand","shorthand","undefined"],"mappings":"AAEA,uDAAuD;AACvD,MAAMA,kBAAmG;IACvGC,OAAO;QAAEC,UAAU;QAASC,OAAO;IAAS;IAC5C,eAAe;QAAED,UAAU;QAASC,OAAO;IAAQ;IACnD,aAAa;QAAED,UAAU;QAASC,OAAO;IAAM;IAC/CC,OAAO;QAAEF,UAAU;QAASC,OAAO;IAAS;IAC5C,eAAe;QAAED,UAAU;QAASC,OAAO;IAAQ;IACnD,aAAa;QAAED,UAAU;QAASC,OAAO;IAAM;IAC/CE,QAAQ;QAAEH,UAAU;QAAUC,OAAO;IAAS;IAC9C,cAAc;QAAED,UAAU;QAAUC,OAAO;IAAM;IACjD,iBAAiB;QAAED,UAAU;QAAUC,OAAO;IAAS;IACvDG,OAAO;QAAEJ,UAAU;QAASC,OAAO;IAAS;IAC5C,aAAa;QAAED,UAAU;QAASC,OAAO;IAAM;IAC/C,gBAAgB;QAAED,UAAU;QAASC,OAAO;IAAS;AACvD;AAEA,OAAO,SAASI,4BACdC,SAAkD,EACtB;IAC5B,IAAIA,cAAcC,aAAaD,cAAc,IAAI,EAAE;QACjD,OAAO,CAAC;IACV,CAAC;IAED,IAAI,OAAOA,cAAc,UAAU;QACjC,OAAOR,eAAe,CAACQ,UAAU;IACnC,CAAC;IAED,OAAOA;AACT,CAAC"}
@@ -1,23 +1,18 @@
1
1
  export function toFloatingUIPadding(padding, isRtl) {
2
- if (typeof padding === 'number') {
3
- return padding;
4
- }
5
- const {
6
- start,
7
- end,
8
- ...verticalPadding
9
- } = padding;
10
- const paddingObject = verticalPadding;
11
- const left = isRtl ? 'end' : 'start';
12
- const right = isRtl ? 'start' : 'end';
13
- // assign properties explicitly since undefined values are actually handled by floating UI
14
- // TODO create floating UI issue
15
- if (padding[left]) {
16
- paddingObject.left = padding[left];
17
- }
18
- if (padding[right]) {
19
- paddingObject.right = padding[right];
20
- }
21
- return paddingObject;
2
+ if (typeof padding === 'number') {
3
+ return padding;
4
+ }
5
+ const { start , end , ...verticalPadding } = padding;
6
+ const paddingObject = verticalPadding;
7
+ const left = isRtl ? 'end' : 'start';
8
+ const right = isRtl ? 'start' : 'end';
9
+ // assign properties explicitly since undefined values are actually handled by floating UI
10
+ // TODO create floating UI issue
11
+ if (padding[left]) {
12
+ paddingObject.left = padding[left];
13
+ }
14
+ if (padding[right]) {
15
+ paddingObject.right = padding[right];
16
+ }
17
+ return paddingObject;
22
18
  }
23
- //# sourceMappingURL=toFloatingUIPadding.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["toFloatingUIPadding","padding","isRtl","start","end","verticalPadding","paddingObject","left","right"],"sources":["../../src/utils/toFloatingUIPadding.ts"],"sourcesContent":["import type { SideObject } from '@floating-ui/dom';\nimport { PositioningOptions } from '../types';\n\nexport function toFloatingUIPadding(\n padding: NonNullable<PositioningOptions['overflowBoundaryPadding']>,\n isRtl: boolean,\n): number | Partial<SideObject> {\n if (typeof padding === 'number') {\n return padding;\n }\n\n const { start, end, ...verticalPadding } = padding;\n\n const paddingObject: Partial<SideObject> = verticalPadding;\n\n const left = isRtl ? 'end' : 'start';\n const right = isRtl ? 'start' : 'end';\n\n // assign properties explicitly since undefined values are actually handled by floating UI\n // TODO create floating UI issue\n if (padding[left]) {\n paddingObject.left = padding[left];\n }\n\n if (padding[right]) {\n paddingObject.right = padding[right];\n }\n\n return paddingObject;\n}\n"],"mappings":"AAGA,OAAO,SAASA,oBACdC,OAAmE,EACnEC,KAAc,EACgB;EAC9B,IAAI,OAAOD,OAAA,KAAY,UAAU;IAC/B,OAAOA,OAAA;EACT;EAEA,MAAM;IAAEE,KAAA;IAAOC,GAAA;IAAK,GAAGC;EAAA,CAAiB,GAAGJ,OAAA;EAE3C,MAAMK,aAAA,GAAqCD,eAAA;EAE3C,MAAME,IAAA,GAAOL,KAAA,GAAQ,QAAQ,OAAO;EACpC,MAAMM,KAAA,GAAQN,KAAA,GAAQ,UAAU,KAAK;EAErC;EACA;EACA,IAAID,OAAO,CAACM,IAAA,CAAK,EAAE;IACjBD,aAAA,CAAcC,IAAI,GAAGN,OAAO,CAACM,IAAA,CAAK;EACpC;EAEA,IAAIN,OAAO,CAACO,KAAA,CAAM,EAAE;IAClBF,aAAA,CAAcE,KAAK,GAAGP,OAAO,CAACO,KAAA,CAAM;EACtC;EAEA,OAAOF,aAAA;AACT"}
1
+ {"version":3,"sources":["toFloatingUIPadding.ts"],"sourcesContent":["import type { SideObject } from '@floating-ui/dom';\nimport { PositioningOptions } from '../types';\n\nexport function toFloatingUIPadding(\n padding: NonNullable<PositioningOptions['overflowBoundaryPadding']>,\n isRtl: boolean,\n): number | Partial<SideObject> {\n if (typeof padding === 'number') {\n return padding;\n }\n\n const { start, end, ...verticalPadding } = padding;\n\n const paddingObject: Partial<SideObject> = verticalPadding;\n\n const left = isRtl ? 'end' : 'start';\n const right = isRtl ? 'start' : 'end';\n\n // assign properties explicitly since undefined values are actually handled by floating UI\n // TODO create floating UI issue\n if (padding[left]) {\n paddingObject.left = padding[left];\n }\n\n if (padding[right]) {\n paddingObject.right = padding[right];\n }\n\n return paddingObject;\n}\n"],"names":["toFloatingUIPadding","padding","isRtl","start","end","verticalPadding","paddingObject","left","right"],"mappings":"AAGA,OAAO,SAASA,oBACdC,OAAmE,EACnEC,KAAc,EACgB;IAC9B,IAAI,OAAOD,YAAY,UAAU;QAC/B,OAAOA;IACT,CAAC;IAED,MAAM,EAAEE,MAAK,EAAEC,IAAG,EAAE,GAAGC,iBAAiB,GAAGJ;IAE3C,MAAMK,gBAAqCD;IAE3C,MAAME,OAAOL,QAAQ,QAAQ,OAAO;IACpC,MAAMM,QAAQN,QAAQ,UAAU,KAAK;IAErC,0FAA0F;IAC1F,gCAAgC;IAChC,IAAID,OAAO,CAACM,KAAK,EAAE;QACjBD,cAAcC,IAAI,GAAGN,OAAO,CAACM,KAAK;IACpC,CAAC;IAED,IAAIN,OAAO,CAACO,MAAM,EAAE;QAClBF,cAAcE,KAAK,GAAGP,OAAO,CAACO,MAAM;IACtC,CAAC;IAED,OAAOF;AACT,CAAC"}
@@ -1,34 +1,32 @@
1
- const getPositionMap = rtl => ({
2
- above: 'top',
3
- below: 'bottom',
4
- before: rtl ? 'right' : 'left',
5
- after: rtl ? 'left' : 'right'
6
- });
1
+ const getPositionMap = (rtl)=>({
2
+ above: 'top',
3
+ below: 'bottom',
4
+ before: rtl ? 'right' : 'left',
5
+ after: rtl ? 'left' : 'right'
6
+ });
7
7
  // Floating UI automatically flips alignment
8
8
  // https://github.com/floating-ui/floating-ui/issues/1563
9
- const getAlignmentMap = () => ({
10
- start: 'start',
11
- end: 'end',
12
- top: 'start',
13
- bottom: 'end',
14
- center: undefined
15
- });
16
- const shouldAlignToCenter = (p, a) => {
17
- const positionedVertically = p === 'above' || p === 'below';
18
- const alignedVertically = a === 'top' || a === 'bottom';
19
- return positionedVertically && alignedVertically || !positionedVertically && !alignedVertically;
9
+ const getAlignmentMap = ()=>({
10
+ start: 'start',
11
+ end: 'end',
12
+ top: 'start',
13
+ bottom: 'end',
14
+ center: undefined
15
+ });
16
+ const shouldAlignToCenter = (p, a)=>{
17
+ const positionedVertically = p === 'above' || p === 'below';
18
+ const alignedVertically = a === 'top' || a === 'bottom';
19
+ return positionedVertically && alignedVertically || !positionedVertically && !alignedVertically;
20
20
  };
21
21
  /**
22
22
  * Maps internal positioning values to Floating UI placement
23
23
  * @see positioningHelper.test.ts for expected placement values
24
- */
25
- export const toFloatingUIPlacement = (align, position, rtl) => {
26
- const alignment = shouldAlignToCenter(position, align) ? 'center' : align;
27
- const computedPosition = position && getPositionMap(rtl)[position];
28
- const computedAlignment = alignment && getAlignmentMap()[alignment];
29
- if (computedPosition && computedAlignment) {
30
- return `${computedPosition}-${computedAlignment}`;
31
- }
32
- return computedPosition;
24
+ */ export const toFloatingUIPlacement = (align, position, rtl)=>{
25
+ const alignment = shouldAlignToCenter(position, align) ? 'center' : align;
26
+ const computedPosition = position && getPositionMap(rtl)[position];
27
+ const computedAlignment = alignment && getAlignmentMap()[alignment];
28
+ if (computedPosition && computedAlignment) {
29
+ return `${computedPosition}-${computedAlignment}`;
30
+ }
31
+ return computedPosition;
33
32
  };
34
- //# sourceMappingURL=toFloatingUIPlacement.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getPositionMap","rtl","above","below","before","after","getAlignmentMap","start","end","top","bottom","center","undefined","shouldAlignToCenter","p","a","positionedVertically","alignedVertically","toFloatingUIPlacement","align","position","alignment","computedPosition","computedAlignment"],"sources":["../../src/utils/toFloatingUIPlacement.ts"],"sourcesContent":["import type { Placement, Side, Alignment as FloatingUIAlignment } from '@floating-ui/dom';\nimport type { Alignment, Position } from '../types';\n\ntype PlacementPosition = Side;\ntype PlacementAlign = FloatingUIAlignment;\n\nconst getPositionMap = (rtl?: boolean): Record<Position, PlacementPosition> => ({\n above: 'top',\n below: 'bottom',\n before: rtl ? 'right' : 'left',\n after: rtl ? 'left' : 'right',\n});\n\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = (): Record<Alignment, PlacementAlign | undefined> => ({\n start: 'start',\n end: 'end',\n top: 'start',\n bottom: 'end',\n center: undefined,\n});\n\nconst shouldAlignToCenter = (p?: Position, a?: Alignment): boolean => {\n const positionedVertically = p === 'above' || p === 'below';\n const alignedVertically = a === 'top' || a === 'bottom';\n\n return (positionedVertically && alignedVertically) || (!positionedVertically && !alignedVertically);\n};\n\n/**\n * Maps internal positioning values to Floating UI placement\n * @see positioningHelper.test.ts for expected placement values\n */\nexport const toFloatingUIPlacement = (align?: Alignment, position?: Position, rtl?: boolean): Placement | undefined => {\n const alignment = shouldAlignToCenter(position, align) ? 'center' : align;\n\n const computedPosition = position && getPositionMap(rtl)[position];\n const computedAlignment = alignment && getAlignmentMap()[alignment];\n\n if (computedPosition && computedAlignment) {\n return `${computedPosition}-${computedAlignment}` as Placement;\n }\n\n return computedPosition;\n};\n"],"mappings":"AAMA,MAAMA,cAAA,GAAkBC,GAAA,KAAwD;EAC9EC,KAAA,EAAO;EACPC,KAAA,EAAO;EACPC,MAAA,EAAQH,GAAA,GAAM,UAAU,MAAM;EAC9BI,KAAA,EAAOJ,GAAA,GAAM,SAAS;AACxB;AAEA;AACA;AACA,MAAMK,eAAA,GAAkBA,CAAA,MAAsD;EAC5EC,KAAA,EAAO;EACPC,GAAA,EAAK;EACLC,GAAA,EAAK;EACLC,MAAA,EAAQ;EACRC,MAAA,EAAQC;AACV;AAEA,MAAMC,mBAAA,GAAsBA,CAACC,CAAA,EAAcC,CAAA,KAA2B;EACpE,MAAMC,oBAAA,GAAuBF,CAAA,KAAM,WAAWA,CAAA,KAAM;EACpD,MAAMG,iBAAA,GAAoBF,CAAA,KAAM,SAASA,CAAA,KAAM;EAE/C,OAAOC,oBAAC,IAAwBC,iBAAA,IAAuB,CAACD,oBAAA,IAAwB,CAACC,iBAAA;AACnF;AAEA;;;;AAIA,OAAO,MAAMC,qBAAA,GAAwBA,CAACC,KAAA,EAAmBC,QAAA,EAAqBnB,GAAA,KAAyC;EACrH,MAAMoB,SAAA,GAAYR,mBAAA,CAAoBO,QAAA,EAAUD,KAAA,IAAS,WAAWA,KAAK;EAEzE,MAAMG,gBAAA,GAAmBF,QAAA,IAAYpB,cAAA,CAAeC,GAAA,CAAI,CAACmB,QAAA,CAAS;EAClE,MAAMG,iBAAA,GAAoBF,SAAA,IAAaf,eAAA,EAAiB,CAACe,SAAA,CAAU;EAEnE,IAAIC,gBAAA,IAAoBC,iBAAA,EAAmB;IACzC,OAAQ,GAAED,gBAAiB,IAAGC,iBAAkB,EAAC;EACnD;EAEA,OAAOD,gBAAA;AACT"}
1
+ {"version":3,"sources":["toFloatingUIPlacement.ts"],"sourcesContent":["import type { Placement, Side, Alignment as FloatingUIAlignment } from '@floating-ui/dom';\nimport type { Alignment, Position } from '../types';\n\ntype PlacementPosition = Side;\ntype PlacementAlign = FloatingUIAlignment;\n\nconst getPositionMap = (rtl?: boolean): Record<Position, PlacementPosition> => ({\n above: 'top',\n below: 'bottom',\n before: rtl ? 'right' : 'left',\n after: rtl ? 'left' : 'right',\n});\n\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = (): Record<Alignment, PlacementAlign | undefined> => ({\n start: 'start',\n end: 'end',\n top: 'start',\n bottom: 'end',\n center: undefined,\n});\n\nconst shouldAlignToCenter = (p?: Position, a?: Alignment): boolean => {\n const positionedVertically = p === 'above' || p === 'below';\n const alignedVertically = a === 'top' || a === 'bottom';\n\n return (positionedVertically && alignedVertically) || (!positionedVertically && !alignedVertically);\n};\n\n/**\n * Maps internal positioning values to Floating UI placement\n * @see positioningHelper.test.ts for expected placement values\n */\nexport const toFloatingUIPlacement = (align?: Alignment, position?: Position, rtl?: boolean): Placement | undefined => {\n const alignment = shouldAlignToCenter(position, align) ? 'center' : align;\n\n const computedPosition = position && getPositionMap(rtl)[position];\n const computedAlignment = alignment && getAlignmentMap()[alignment];\n\n if (computedPosition && computedAlignment) {\n return `${computedPosition}-${computedAlignment}` as Placement;\n }\n\n return computedPosition;\n};\n"],"names":["getPositionMap","rtl","above","below","before","after","getAlignmentMap","start","end","top","bottom","center","undefined","shouldAlignToCenter","p","a","positionedVertically","alignedVertically","toFloatingUIPlacement","align","position","alignment","computedPosition","computedAlignment"],"mappings":"AAMA,MAAMA,iBAAiB,CAACC,MAAwD,CAAA;QAC9EC,OAAO;QACPC,OAAO;QACPC,QAAQH,MAAM,UAAU,MAAM;QAC9BI,OAAOJ,MAAM,SAAS,OAAO;IAC/B,CAAA;AAEA,4CAA4C;AAC5C,yDAAyD;AACzD,MAAMK,kBAAkB,IAAsD,CAAA;QAC5EC,OAAO;QACPC,KAAK;QACLC,KAAK;QACLC,QAAQ;QACRC,QAAQC;IACV,CAAA;AAEA,MAAMC,sBAAsB,CAACC,GAAcC,IAA2B;IACpE,MAAMC,uBAAuBF,MAAM,WAAWA,MAAM;IACpD,MAAMG,oBAAoBF,MAAM,SAASA,MAAM;IAE/C,OAAO,AAACC,wBAAwBC,qBAAuB,CAACD,wBAAwB,CAACC;AACnF;AAEA;;;CAGC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAmBC,UAAqBnB,MAAyC;IACrH,MAAMoB,YAAYR,oBAAoBO,UAAUD,SAAS,WAAWA,KAAK;IAEzE,MAAMG,mBAAmBF,YAAYpB,eAAeC,IAAI,CAACmB,SAAS;IAClE,MAAMG,oBAAoBF,aAAaf,iBAAiB,CAACe,UAAU;IAEnE,IAAIC,oBAAoBC,mBAAmB;QACzC,OAAO,CAAC,EAAED,iBAAiB,CAAC,EAAEC,kBAAkB,CAAC;IACnD,CAAC;IAED,OAAOD;AACT,EAAE"}
@@ -5,18 +5,16 @@ import { getScrollParent } from './getScrollParent';
5
5
  * Cleans up the event listeners for the previous element and adds them for the new scroll parent.
6
6
  * @param next Next element
7
7
  * @param prev Previous element
8
- */
9
- export function toggleScrollListener(next, prev, handler) {
10
- if (next === prev) {
11
- return;
12
- }
13
- if (isHTMLElement(prev)) {
14
- const prevScrollParent = getScrollParent(prev);
15
- prevScrollParent.removeEventListener('scroll', handler);
16
- }
17
- if (isHTMLElement(next)) {
18
- const scrollParent = getScrollParent(next);
19
- scrollParent.addEventListener('scroll', handler);
20
- }
8
+ */ export function toggleScrollListener(next, prev, handler) {
9
+ if (next === prev) {
10
+ return;
11
+ }
12
+ if (isHTMLElement(prev)) {
13
+ const prevScrollParent = getScrollParent(prev);
14
+ prevScrollParent.removeEventListener('scroll', handler);
15
+ }
16
+ if (isHTMLElement(next)) {
17
+ const scrollParent = getScrollParent(next);
18
+ scrollParent.addEventListener('scroll', handler);
19
+ }
21
20
  }
22
- //# sourceMappingURL=toggleScrollListener.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["isHTMLElement","getScrollParent","toggleScrollListener","next","prev","handler","prevScrollParent","removeEventListener","scrollParent","addEventListener"],"sources":["../../src/utils/toggleScrollListener.ts"],"sourcesContent":["import { isHTMLElement } from '@fluentui/react-utilities';\nimport type { PositioningVirtualElement } from '../types';\nimport { getScrollParent } from './getScrollParent';\n\n/**\n * Toggles event listeners for scroll parent.\n * Cleans up the event listeners for the previous element and adds them for the new scroll parent.\n * @param next Next element\n * @param prev Previous element\n */\nexport function toggleScrollListener(\n next: HTMLElement | PositioningVirtualElement | null,\n prev: HTMLElement | PositioningVirtualElement | null,\n handler: EventListener,\n) {\n if (next === prev) {\n return;\n }\n\n if (isHTMLElement(prev)) {\n const prevScrollParent = getScrollParent(prev);\n prevScrollParent.removeEventListener('scroll', handler);\n }\n if (isHTMLElement(next)) {\n const scrollParent = getScrollParent(next);\n scrollParent.addEventListener('scroll', handler);\n }\n}\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ;AAE9B,SAASC,eAAe,QAAQ;AAEhC;;;;;;AAMA,OAAO,SAASC,qBACdC,IAAoD,EACpDC,IAAoD,EACpDC,OAAsB,EACtB;EACA,IAAIF,IAAA,KAASC,IAAA,EAAM;IACjB;EACF;EAEA,IAAIJ,aAAA,CAAcI,IAAA,GAAO;IACvB,MAAME,gBAAA,GAAmBL,eAAA,CAAgBG,IAAA;IACzCE,gBAAA,CAAiBC,mBAAmB,CAAC,UAAUF,OAAA;EACjD;EACA,IAAIL,aAAA,CAAcG,IAAA,GAAO;IACvB,MAAMK,YAAA,GAAeP,eAAA,CAAgBE,IAAA;IACrCK,YAAA,CAAaC,gBAAgB,CAAC,UAAUJ,OAAA;EAC1C;AACF"}
1
+ {"version":3,"sources":["toggleScrollListener.ts"],"sourcesContent":["import { isHTMLElement } from '@fluentui/react-utilities';\nimport type { PositioningVirtualElement } from '../types';\nimport { getScrollParent } from './getScrollParent';\n\n/**\n * Toggles event listeners for scroll parent.\n * Cleans up the event listeners for the previous element and adds them for the new scroll parent.\n * @param next Next element\n * @param prev Previous element\n */\nexport function toggleScrollListener(\n next: HTMLElement | PositioningVirtualElement | null,\n prev: HTMLElement | PositioningVirtualElement | null,\n handler: EventListener,\n) {\n if (next === prev) {\n return;\n }\n\n if (isHTMLElement(prev)) {\n const prevScrollParent = getScrollParent(prev);\n prevScrollParent.removeEventListener('scroll', handler);\n }\n if (isHTMLElement(next)) {\n const scrollParent = getScrollParent(next);\n scrollParent.addEventListener('scroll', handler);\n }\n}\n"],"names":["isHTMLElement","getScrollParent","toggleScrollListener","next","prev","handler","prevScrollParent","removeEventListener","scrollParent","addEventListener"],"mappings":"AAAA,SAASA,aAAa,QAAQ,4BAA4B;AAE1D,SAASC,eAAe,QAAQ,oBAAoB;AAEpD;;;;;CAKC,GACD,OAAO,SAASC,qBACdC,IAAoD,EACpDC,IAAoD,EACpDC,OAAsB,EACtB;IACA,IAAIF,SAASC,MAAM;QACjB;IACF,CAAC;IAED,IAAIJ,cAAcI,OAAO;QACvB,MAAME,mBAAmBL,gBAAgBG;QACzCE,iBAAiBC,mBAAmB,CAAC,UAAUF;IACjD,CAAC;IACD,IAAIL,cAAcG,OAAO;QACvB,MAAMK,eAAeP,gBAAgBE;QACrCK,aAAaC,gBAAgB,CAAC,UAAUJ;IAC1C,CAAC;AACH,CAAC"}
@@ -16,36 +16,34 @@ import { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';
16
16
  * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
17
17
  * ref.current = 1;
18
18
  * // prints 0 -> 1
19
- */
20
- export function useCallbackRef(initialValue, callback, skipInitialResolve) {
21
- const isFirst = React.useRef(true);
22
- const [ref] = React.useState(() => ({
23
- // value
24
- value: initialValue,
25
- // last callback
26
- callback,
27
- // "memoized" public interface
28
- facade: {
29
- get current() {
30
- return ref.value;
31
- },
32
- set current(value) {
33
- const last = ref.value;
34
- if (last !== value) {
35
- ref.value = value;
36
- if (skipInitialResolve && isFirst.current) {
37
- return;
38
- }
39
- ref.callback(value, last);
40
- }
41
- }
42
- }
43
- }));
44
- useIsomorphicLayoutEffect(() => {
45
- isFirst.current = false;
46
- }, []);
47
- // update callback
48
- ref.callback = callback;
49
- return ref.facade;
19
+ */ export function useCallbackRef(initialValue, callback, skipInitialResolve) {
20
+ const isFirst = React.useRef(true);
21
+ const [ref] = React.useState(()=>({
22
+ // value
23
+ value: initialValue,
24
+ // last callback
25
+ callback,
26
+ // "memoized" public interface
27
+ facade: {
28
+ get current () {
29
+ return ref.value;
30
+ },
31
+ set current (value){
32
+ const last = ref.value;
33
+ if (last !== value) {
34
+ ref.value = value;
35
+ if (skipInitialResolve && isFirst.current) {
36
+ return;
37
+ }
38
+ ref.callback(value, last);
39
+ }
40
+ }
41
+ }
42
+ }));
43
+ useIsomorphicLayoutEffect(()=>{
44
+ isFirst.current = false;
45
+ }, []);
46
+ // update callback
47
+ ref.callback = callback;
48
+ return ref.facade;
50
49
  }
51
- //# sourceMappingURL=useCallbackRef.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useIsomorphicLayoutEffect","useCallbackRef","initialValue","callback","skipInitialResolve","isFirst","useRef","ref","useState","value","facade","current","last"],"sources":["../../src/utils/useCallbackRef.ts"],"sourcesContent":["import * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n\n/**\n * Creates a MutableRef with ref change callback. Is useful as React.useRef() doesn't notify you when its content\n * changes and mutating the .current property doesn't cause a re-render. An opt-out will be use a callback ref via\n * React.useState(), but it will cause re-renders always.\n *\n * https://reactjs.org/docs/hooks-reference.html#useref\n * https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n *\n * @param initialValue - initial ref value\n * @param callback - a callback to run when value changes\n * @param skipInitialResolve - a flag to skip an initial ref report\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n */\nexport function useCallbackRef<T>(\n initialValue: T | null,\n callback: (newValue: T | null, lastValue: T | null) => void,\n skipInitialResolve?: boolean,\n): React.MutableRefObject<T | null> {\n const isFirst = React.useRef(true);\n const [ref] = React.useState(() => ({\n // value\n value: initialValue,\n // last callback\n callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n const last = ref.value;\n\n if (last !== value) {\n ref.value = value;\n\n if (skipInitialResolve && isFirst.current) {\n return;\n }\n\n ref.callback(value, last);\n }\n },\n },\n }));\n\n useIsomorphicLayoutEffect(() => {\n isFirst.current = false;\n }, []);\n\n // update callback\n ref.callback = callback;\n\n return ref.facade;\n}\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,yBAAyB,QAAQ;AAE1C;;;;;;;;;;;;;;;;;AAiBA,OAAO,SAASC,eACdC,YAAsB,EACtBC,QAA2D,EAC3DC,kBAA4B,EACM;EAClC,MAAMC,OAAA,GAAUN,KAAA,CAAMO,MAAM,CAAC,IAAI;EACjC,MAAM,CAACC,GAAA,CAAI,GAAGR,KAAA,CAAMS,QAAQ,CAAC,OAAO;IAClC;IACAC,KAAA,EAAOP,YAAA;IACP;IACAC,QAAA;IACA;IACAO,MAAA,EAAQ;MACN,IAAIC,QAAA,EAAU;QACZ,OAAOJ,GAAA,CAAIE,KAAK;MAClB;MACA,IAAIE,QAAQF,KAAA,EAAO;QACjB,MAAMG,IAAA,GAAOL,GAAA,CAAIE,KAAK;QAEtB,IAAIG,IAAA,KAASH,KAAA,EAAO;UAClBF,GAAA,CAAIE,KAAK,GAAGA,KAAA;UAEZ,IAAIL,kBAAA,IAAsBC,OAAA,CAAQM,OAAO,EAAE;YACzC;UACF;UAEAJ,GAAA,CAAIJ,QAAQ,CAACM,KAAA,EAAOG,IAAA;QACtB;MACF;IACF;EACF;EAEAZ,yBAAA,CAA0B,MAAM;IAC9BK,OAAA,CAAQM,OAAO,GAAG,KAAK;EACzB,GAAG,EAAE;EAEL;EACAJ,GAAA,CAAIJ,QAAQ,GAAGA,QAAA;EAEf,OAAOI,GAAA,CAAIG,MAAM;AACnB"}
1
+ {"version":3,"sources":["useCallbackRef.ts"],"sourcesContent":["import * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n\n/**\n * Creates a MutableRef with ref change callback. Is useful as React.useRef() doesn't notify you when its content\n * changes and mutating the .current property doesn't cause a re-render. An opt-out will be use a callback ref via\n * React.useState(), but it will cause re-renders always.\n *\n * https://reactjs.org/docs/hooks-reference.html#useref\n * https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n *\n * @param initialValue - initial ref value\n * @param callback - a callback to run when value changes\n * @param skipInitialResolve - a flag to skip an initial ref report\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n */\nexport function useCallbackRef<T>(\n initialValue: T | null,\n callback: (newValue: T | null, lastValue: T | null) => void,\n skipInitialResolve?: boolean,\n): React.MutableRefObject<T | null> {\n const isFirst = React.useRef(true);\n const [ref] = React.useState(() => ({\n // value\n value: initialValue,\n // last callback\n callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n const last = ref.value;\n\n if (last !== value) {\n ref.value = value;\n\n if (skipInitialResolve && isFirst.current) {\n return;\n }\n\n ref.callback(value, last);\n }\n },\n },\n }));\n\n useIsomorphicLayoutEffect(() => {\n isFirst.current = false;\n }, []);\n\n // update callback\n ref.callback = callback;\n\n return ref.facade;\n}\n"],"names":["React","useIsomorphicLayoutEffect","useCallbackRef","initialValue","callback","skipInitialResolve","isFirst","useRef","ref","useState","value","facade","current","last"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,4BAA4B;AAEtE;;;;;;;;;;;;;;;;CAgBC,GACD,OAAO,SAASC,eACdC,YAAsB,EACtBC,QAA2D,EAC3DC,kBAA4B,EACM;IAClC,MAAMC,UAAUN,MAAMO,MAAM,CAAC,IAAI;IACjC,MAAM,CAACC,IAAI,GAAGR,MAAMS,QAAQ,CAAC,IAAO,CAAA;YAClC,QAAQ;YACRC,OAAOP;YACP,gBAAgB;YAChBC;YACA,8BAA8B;YAC9BO,QAAQ;gBACN,IAAIC,WAAU;oBACZ,OAAOJ,IAAIE,KAAK;gBAClB;gBACA,IAAIE,SAAQF,MAAO;oBACjB,MAAMG,OAAOL,IAAIE,KAAK;oBAEtB,IAAIG,SAASH,OAAO;wBAClBF,IAAIE,KAAK,GAAGA;wBAEZ,IAAIL,sBAAsBC,QAAQM,OAAO,EAAE;4BACzC;wBACF,CAAC;wBAEDJ,IAAIJ,QAAQ,CAACM,OAAOG;oBACtB,CAAC;gBACH;YACF;QACF,CAAA;IAEAZ,0BAA0B,IAAM;QAC9BK,QAAQM,OAAO,GAAG,KAAK;IACzB,GAAG,EAAE;IAEL,kBAAkB;IAClBJ,IAAIJ,QAAQ,GAAGA;IAEf,OAAOI,IAAIG,MAAM;AACnB,CAAC"}
@@ -1,20 +1,13 @@
1
1
  /**
2
2
  * Writes all DOM element updates after position is computed
3
- */export function writeArrowUpdates(options) {
4
- const {
5
- arrow,
6
- middlewareData
7
- } = options;
8
- if (!middlewareData.arrow || !arrow) {
9
- return;
10
- }
11
- const {
12
- x: arrowX,
13
- y: arrowY
14
- } = middlewareData.arrow;
15
- Object.assign(arrow.style, {
16
- left: `${arrowX}px`,
17
- top: `${arrowY}px`
18
- });
3
+ */ export function writeArrowUpdates(options) {
4
+ const { arrow , middlewareData } = options;
5
+ if (!middlewareData.arrow || !arrow) {
6
+ return;
7
+ }
8
+ const { x: arrowX , y: arrowY } = middlewareData.arrow;
9
+ Object.assign(arrow.style, {
10
+ left: `${arrowX}px`,
11
+ top: `${arrowY}px`
12
+ });
19
13
  }
20
- //# sourceMappingURL=writeArrowUpdates.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["writeArrowUpdates","options","arrow","middlewareData","x","arrowX","y","arrowY","Object","assign","style","left","top"],"sources":["../../src/utils/writeArrowUpdates.ts"],"sourcesContent":["import { MiddlewareData } from '@floating-ui/dom';\n\n/**\n * Writes all DOM element updates after position is computed\n */\nexport function writeArrowUpdates(options: { arrow: HTMLElement | null; middlewareData: MiddlewareData }) {\n const { arrow, middlewareData } = options;\n if (!middlewareData.arrow || !arrow) {\n return;\n }\n\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n\n Object.assign(arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`,\n });\n}\n"],"mappings":"AAEA;;GAGA,OAAO,SAASA,kBAAkBC,OAAsE,EAAE;EACxG,MAAM;IAAEC,KAAA;IAAOC;EAAc,CAAE,GAAGF,OAAA;EAClC,IAAI,CAACE,cAAA,CAAeD,KAAK,IAAI,CAACA,KAAA,EAAO;IACnC;EACF;EAEA,MAAM;IAAEE,CAAA,EAAGC,MAAA;IAAQC,CAAA,EAAGC;EAAM,CAAE,GAAGJ,cAAA,CAAeD,KAAK;EAErDM,MAAA,CAAOC,MAAM,CAACP,KAAA,CAAMQ,KAAK,EAAE;IACzBC,IAAA,EAAO,GAAEN,MAAO,IAAG;IACnBO,GAAA,EAAM,GAAEL,MAAO;EACjB;AACF"}
1
+ {"version":3,"sources":["writeArrowUpdates.ts"],"sourcesContent":["import { MiddlewareData } from '@floating-ui/dom';\n\n/**\n * Writes all DOM element updates after position is computed\n */\nexport function writeArrowUpdates(options: { arrow: HTMLElement | null; middlewareData: MiddlewareData }) {\n const { arrow, middlewareData } = options;\n if (!middlewareData.arrow || !arrow) {\n return;\n }\n\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n\n Object.assign(arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`,\n });\n}\n"],"names":["writeArrowUpdates","options","arrow","middlewareData","x","arrowX","y","arrowY","Object","assign","style","left","top"],"mappings":"AAEA;;CAEC,GACD,OAAO,SAASA,kBAAkBC,OAAsE,EAAE;IACxG,MAAM,EAAEC,MAAK,EAAEC,eAAc,EAAE,GAAGF;IAClC,IAAI,CAACE,eAAeD,KAAK,IAAI,CAACA,OAAO;QACnC;IACF,CAAC;IAED,MAAM,EAAEE,GAAGC,OAAM,EAAEC,GAAGC,OAAM,EAAE,GAAGJ,eAAeD,KAAK;IAErDM,OAAOC,MAAM,CAACP,MAAMQ,KAAK,EAAE;QACzBC,MAAM,CAAC,EAAEN,OAAO,EAAE,CAAC;QACnBO,KAAK,CAAC,EAAEL,OAAO,EAAE,CAAC;IACpB;AACF,CAAC"}
@@ -1,43 +1,43 @@
1
1
  import { DATA_POSITIONING_ESCAPED, DATA_POSITIONING_HIDDEN, DATA_POSITIONING_INTERSECTING, DATA_POSITIONING_PLACEMENT } from '../constants';
2
2
  /**
3
3
  * Writes all container element position updates after the position is computed
4
- */
5
- export function writeContainerUpdates(options) {
6
- var _middlewareData_hide, _middlewareData_hide1, _container_ownerDocument_defaultView;
7
- const {
8
- container,
9
- placement,
10
- middlewareData,
11
- strategy,
12
- lowPPI,
13
- coordinates
14
- } = options;
15
- if (!container) {
16
- return;
17
- }
18
- container.setAttribute(DATA_POSITIONING_PLACEMENT, placement);
19
- container.removeAttribute(DATA_POSITIONING_INTERSECTING);
20
- if (middlewareData.intersectionObserver.intersecting) {
21
- container.setAttribute(DATA_POSITIONING_INTERSECTING, '');
22
- }
23
- container.removeAttribute(DATA_POSITIONING_ESCAPED);
24
- if ((_middlewareData_hide = middlewareData.hide) === null || _middlewareData_hide === void 0 ? void 0 : _middlewareData_hide.escaped) {
25
- container.setAttribute(DATA_POSITIONING_ESCAPED, '');
26
- }
27
- container.removeAttribute(DATA_POSITIONING_HIDDEN);
28
- if ((_middlewareData_hide1 = middlewareData.hide) === null || _middlewareData_hide1 === void 0 ? void 0 : _middlewareData_hide1.referenceHidden) {
29
- container.setAttribute(DATA_POSITIONING_HIDDEN, '');
30
- }
31
- // Round so that the coordinates land on device pixels.
32
- // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like
33
- // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.
34
- // See https://github.com/microsoft/fluentui/issues/26764 for more info.
35
- const devicePixelRatio = ((_container_ownerDocument_defaultView = container.ownerDocument.defaultView) === null || _container_ownerDocument_defaultView === void 0 ? void 0 : _container_ownerDocument_defaultView.devicePixelRatio) || 1;
36
- const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;
37
- const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;
38
- Object.assign(container.style, {
39
- transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,
40
- position: strategy
41
- });
4
+ */ export function writeContainerUpdates(options) {
5
+ var _middlewareData_hide, _middlewareData_hide1, _container_ownerDocument_defaultView;
6
+ const { container , placement , middlewareData , strategy , lowPPI , coordinates , useTransform =true } = options;
7
+ if (!container) {
8
+ return;
9
+ }
10
+ container.setAttribute(DATA_POSITIONING_PLACEMENT, placement);
11
+ container.removeAttribute(DATA_POSITIONING_INTERSECTING);
12
+ if (middlewareData.intersectionObserver.intersecting) {
13
+ container.setAttribute(DATA_POSITIONING_INTERSECTING, '');
14
+ }
15
+ container.removeAttribute(DATA_POSITIONING_ESCAPED);
16
+ if ((_middlewareData_hide = middlewareData.hide) === null || _middlewareData_hide === void 0 ? void 0 : _middlewareData_hide.escaped) {
17
+ container.setAttribute(DATA_POSITIONING_ESCAPED, '');
18
+ }
19
+ container.removeAttribute(DATA_POSITIONING_HIDDEN);
20
+ if ((_middlewareData_hide1 = middlewareData.hide) === null || _middlewareData_hide1 === void 0 ? void 0 : _middlewareData_hide1.referenceHidden) {
21
+ container.setAttribute(DATA_POSITIONING_HIDDEN, '');
22
+ }
23
+ // Round so that the coordinates land on device pixels.
24
+ // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like
25
+ // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.
26
+ // See https://github.com/microsoft/fluentui/issues/26764 for more info.
27
+ const devicePixelRatio = ((_container_ownerDocument_defaultView = container.ownerDocument.defaultView) === null || _container_ownerDocument_defaultView === void 0 ? void 0 : _container_ownerDocument_defaultView.devicePixelRatio) || 1;
28
+ const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;
29
+ const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;
30
+ Object.assign(container.style, {
31
+ position: strategy
32
+ });
33
+ if (useTransform) {
34
+ Object.assign(container.style, {
35
+ transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`
36
+ });
37
+ return;
38
+ }
39
+ Object.assign(container.style, {
40
+ left: `${x}px`,
41
+ top: `${y}px`
42
+ });
42
43
  }
43
- //# sourceMappingURL=writeContainerupdates.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DATA_POSITIONING_ESCAPED","DATA_POSITIONING_HIDDEN","DATA_POSITIONING_INTERSECTING","DATA_POSITIONING_PLACEMENT","writeContainerUpdates","options","_middlewareData_hide","_middlewareData_hide1","_container_ownerDocument_defaultView","container","placement","middlewareData","strategy","lowPPI","coordinates","setAttribute","removeAttribute","intersectionObserver","intersecting","hide","escaped","referenceHidden","devicePixelRatio","ownerDocument","defaultView","x","Math","round","y","Object","assign","style","transform","position"],"sources":["../../src/utils/writeContainerupdates.ts"],"sourcesContent":["import type { Placement, MiddlewareData, Strategy, Coords } from '@floating-ui/dom';\nimport {\n DATA_POSITIONING_ESCAPED,\n DATA_POSITIONING_HIDDEN,\n DATA_POSITIONING_INTERSECTING,\n DATA_POSITIONING_PLACEMENT,\n} from '../constants';\n\n/**\n * Writes all container element position updates after the position is computed\n */\nexport function writeContainerUpdates(options: {\n container: HTMLElement | null;\n placement: Placement;\n middlewareData: MiddlewareData;\n /**\n * Layer acceleration can disable subpixel rendering which causes slightly\n * blurry text on low PPI displays, so we want to use 2D transforms\n * instead\n */\n lowPPI: boolean;\n strategy: Strategy;\n coordinates: Coords;\n}) {\n const { container, placement, middlewareData, strategy, lowPPI, coordinates } = options;\n if (!container) {\n return;\n }\n container.setAttribute(DATA_POSITIONING_PLACEMENT, placement);\n container.removeAttribute(DATA_POSITIONING_INTERSECTING);\n if (middlewareData.intersectionObserver.intersecting) {\n container.setAttribute(DATA_POSITIONING_INTERSECTING, '');\n }\n\n container.removeAttribute(DATA_POSITIONING_ESCAPED);\n if (middlewareData.hide?.escaped) {\n container.setAttribute(DATA_POSITIONING_ESCAPED, '');\n }\n\n container.removeAttribute(DATA_POSITIONING_HIDDEN);\n if (middlewareData.hide?.referenceHidden) {\n container.setAttribute(DATA_POSITIONING_HIDDEN, '');\n }\n\n // Round so that the coordinates land on device pixels.\n // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like\n // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.\n // See https://github.com/microsoft/fluentui/issues/26764 for more info.\n const devicePixelRatio = container.ownerDocument.defaultView?.devicePixelRatio || 1;\n const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;\n const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;\n\n Object.assign(container.style, {\n transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,\n position: strategy,\n });\n}\n"],"mappings":"AACA,SACEA,wBAAwB,EACxBC,uBAAuB,EACvBC,6BAA6B,EAC7BC,0BAA0B,QACrB;AAEP;;;AAGA,OAAO,SAASC,sBAAsBC,OAYrC,EAAE;MAYGC,oBAAA,EAKAC,qBAAA,EAQqBC,oCAAA;EAxBzB,MAAM;IAAEC,SAAA;IAAWC,SAAA;IAAWC,cAAA;IAAgBC,QAAA;IAAUC,MAAA;IAAQC;EAAW,CAAE,GAAGT,OAAA;EAChF,IAAI,CAACI,SAAA,EAAW;IACd;EACF;EACAA,SAAA,CAAUM,YAAY,CAACZ,0BAAA,EAA4BO,SAAA;EACnDD,SAAA,CAAUO,eAAe,CAACd,6BAAA;EAC1B,IAAIS,cAAA,CAAeM,oBAAoB,CAACC,YAAY,EAAE;IACpDT,SAAA,CAAUM,YAAY,CAACb,6BAAA,EAA+B;EACxD;EAEAO,SAAA,CAAUO,eAAe,CAAChB,wBAAA;EAC1B,IAAI,CAAAM,oBAAA,GAAAK,cAAA,CAAeQ,IAAI,cAAnBb,oBAAA,uBAAAA,oBAAA,CAAqBc,OAAO,EAAE;IAChCX,SAAA,CAAUM,YAAY,CAACf,wBAAA,EAA0B;EACnD;EAEAS,SAAA,CAAUO,eAAe,CAACf,uBAAA;EAC1B,IAAI,CAAAM,qBAAA,GAAAI,cAAA,CAAeQ,IAAI,cAAnBZ,qBAAA,uBAAAA,qBAAA,CAAqBc,eAAe,EAAE;IACxCZ,SAAA,CAAUM,YAAY,CAACd,uBAAA,EAAyB;EAClD;EAEA;EACA;EACA;EACA;EACA,MAAMqB,gBAAA,GAAmB,EAAAd,oCAAA,GAAAC,SAAA,CAAUc,aAAa,CAACC,WAAW,cAAnChB,oCAAA,uBAAAA,oCAAA,CAAqCc,gBAAgB,KAAI;EAClF,MAAMG,CAAA,GAAIC,IAAA,CAAKC,KAAK,CAACb,WAAA,CAAYW,CAAC,GAAGH,gBAAA,IAAoBA,gBAAA;EACzD,MAAMM,CAAA,GAAIF,IAAA,CAAKC,KAAK,CAACb,WAAA,CAAYc,CAAC,GAAGN,gBAAA,IAAoBA,gBAAA;EAEzDO,MAAA,CAAOC,MAAM,CAACrB,SAAA,CAAUsB,KAAK,EAAE;IAC7BC,SAAA,EAAWnB,MAAA,GAAU,aAAYY,CAAE,OAAMG,CAAE,KAAI,GAAI,eAAcH,CAAE,OAAMG,CAAE,QAAO;IAClFK,QAAA,EAAUrB;EACZ;AACF"}
1
+ {"version":3,"sources":["writeContainerupdates.ts"],"sourcesContent":["import type { Placement, MiddlewareData, Strategy, Coords } from '@floating-ui/dom';\nimport {\n DATA_POSITIONING_ESCAPED,\n DATA_POSITIONING_HIDDEN,\n DATA_POSITIONING_INTERSECTING,\n DATA_POSITIONING_PLACEMENT,\n} from '../constants';\n\n/**\n * Writes all container element position updates after the position is computed\n */\nexport function writeContainerUpdates(options: {\n container: HTMLElement | null;\n placement: Placement;\n middlewareData: MiddlewareData;\n /**\n * Layer acceleration can disable subpixel rendering which causes slightly\n * blurry text on low PPI displays, so we want to use 2D transforms\n * instead\n */\n lowPPI: boolean;\n strategy: Strategy;\n coordinates: Coords;\n useTransform?: boolean;\n}) {\n const { container, placement, middlewareData, strategy, lowPPI, coordinates, useTransform = true } = options;\n if (!container) {\n return;\n }\n container.setAttribute(DATA_POSITIONING_PLACEMENT, placement);\n container.removeAttribute(DATA_POSITIONING_INTERSECTING);\n if (middlewareData.intersectionObserver.intersecting) {\n container.setAttribute(DATA_POSITIONING_INTERSECTING, '');\n }\n\n container.removeAttribute(DATA_POSITIONING_ESCAPED);\n if (middlewareData.hide?.escaped) {\n container.setAttribute(DATA_POSITIONING_ESCAPED, '');\n }\n\n container.removeAttribute(DATA_POSITIONING_HIDDEN);\n if (middlewareData.hide?.referenceHidden) {\n container.setAttribute(DATA_POSITIONING_HIDDEN, '');\n }\n\n // Round so that the coordinates land on device pixels.\n // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like\n // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.\n // See https://github.com/microsoft/fluentui/issues/26764 for more info.\n const devicePixelRatio = container.ownerDocument.defaultView?.devicePixelRatio || 1;\n const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;\n const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;\n\n Object.assign(container.style, {\n position: strategy,\n });\n\n if (useTransform) {\n Object.assign(container.style, {\n transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,\n });\n return;\n }\n\n Object.assign(container.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n}\n"],"names":["DATA_POSITIONING_ESCAPED","DATA_POSITIONING_HIDDEN","DATA_POSITIONING_INTERSECTING","DATA_POSITIONING_PLACEMENT","writeContainerUpdates","options","middlewareData","container","placement","strategy","lowPPI","coordinates","useTransform","setAttribute","removeAttribute","intersectionObserver","intersecting","hide","escaped","referenceHidden","devicePixelRatio","ownerDocument","defaultView","x","Math","round","y","Object","assign","style","position","transform","left","top"],"mappings":"AACA,SACEA,wBAAwB,EACxBC,uBAAuB,EACvBC,6BAA6B,EAC7BC,0BAA0B,QACrB,eAAe;AAEtB;;CAEC,GACD,OAAO,SAASC,sBAAsBC,OAarC,EAAE;QAYGC,sBAKAA,uBAQqBC;IAxBzB,MAAM,EAAEA,UAAS,EAAEC,UAAS,EAAEF,eAAc,EAAEG,SAAQ,EAAEC,OAAM,EAAEC,YAAW,EAAEC,cAAe,IAAI,CAAA,EAAE,GAAGP;IACrG,IAAI,CAACE,WAAW;QACd;IACF,CAAC;IACDA,UAAUM,YAAY,CAACV,4BAA4BK;IACnDD,UAAUO,eAAe,CAACZ;IAC1B,IAAII,eAAeS,oBAAoB,CAACC,YAAY,EAAE;QACpDT,UAAUM,YAAY,CAACX,+BAA+B;IACxD,CAAC;IAEDK,UAAUO,eAAe,CAACd;IAC1B,IAAIM,CAAAA,uBAAAA,eAAeW,IAAI,cAAnBX,kCAAAA,KAAAA,IAAAA,qBAAqBY,OAAO,EAAE;QAChCX,UAAUM,YAAY,CAACb,0BAA0B;IACnD,CAAC;IAEDO,UAAUO,eAAe,CAACb;IAC1B,IAAIK,CAAAA,wBAAAA,eAAeW,IAAI,cAAnBX,mCAAAA,KAAAA,IAAAA,sBAAqBa,eAAe,EAAE;QACxCZ,UAAUM,YAAY,CAACZ,yBAAyB;IAClD,CAAC;IAED,uDAAuD;IACvD,oHAAoH;IACpH,wFAAwF;IACxF,wEAAwE;IACxE,MAAMmB,mBAAmBb,CAAAA,CAAAA,uCAAAA,UAAUc,aAAa,CAACC,WAAW,cAAnCf,kDAAAA,KAAAA,IAAAA,qCAAqCa,gBAAgB,AAAD,KAAK;IAClF,MAAMG,IAAIC,KAAKC,KAAK,CAACd,YAAYY,CAAC,GAAGH,oBAAoBA;IACzD,MAAMM,IAAIF,KAAKC,KAAK,CAACd,YAAYe,CAAC,GAAGN,oBAAoBA;IAEzDO,OAAOC,MAAM,CAACrB,UAAUsB,KAAK,EAAE;QAC7BC,UAAUrB;IACZ;IAEA,IAAIG,cAAc;QAChBe,OAAOC,MAAM,CAACrB,UAAUsB,KAAK,EAAE;YAC7BE,WAAWrB,SAAS,CAAC,UAAU,EAAEa,EAAE,IAAI,EAAEG,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,EAAEH,EAAE,IAAI,EAAEG,EAAE,MAAM,CAAC;QACpF;QACA;IACF,CAAC;IAEDC,OAAOC,MAAM,CAACrB,UAAUsB,KAAK,EAAE;QAC7BG,MAAM,CAAC,EAAET,EAAE,EAAE,CAAC;QACdU,KAAK,CAAC,EAAEP,EAAE,EAAE,CAAC;IACf;AACF,CAAC"}
@@ -17,6 +17,4 @@ _export(exports, {
17
17
  const DATA_POSITIONING_INTERSECTING = 'data-popper-is-intersecting';
18
18
  const DATA_POSITIONING_ESCAPED = 'data-popper-escaped';
19
19
  const DATA_POSITIONING_HIDDEN = 'data-popper-reference-hidden';
20
- const DATA_POSITIONING_PLACEMENT = 'data-popper-placement'; //# sourceMappingURL=constants.js.map
21
-
22
- //# sourceMappingURL=constants.js.map
20
+ const DATA_POSITIONING_PLACEMENT = 'data-popper-placement';
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/constants.js"],"sourcesContent":["export const DATA_POSITIONING_INTERSECTING = 'data-popper-is-intersecting';\nexport const DATA_POSITIONING_ESCAPED = 'data-popper-escaped';\nexport const DATA_POSITIONING_HIDDEN = 'data-popper-reference-hidden';\nexport const DATA_POSITIONING_PLACEMENT = 'data-popper-placement';\n//# sourceMappingURL=constants.js.map"],"names":["DATA_POSITIONING_INTERSECTING","DATA_POSITIONING_ESCAPED","DATA_POSITIONING_HIDDEN","DATA_POSITIONING_PLACEMENT"],"mappings":";;;;;;;;;;;IAAaA,6BAA6B,MAA7BA;IACAC,wBAAwB,MAAxBA;IACAC,uBAAuB,MAAvBA;IACAC,0BAA0B,MAA1BA;;AAHN,MAAMH,gCAAgC;AACtC,MAAMC,2BAA2B;AACjC,MAAMC,0BAA0B;AAChC,MAAMC,6BAA6B,yBAC1C,qCAAqC"}
1
+ {"version":3,"sources":["constants.js"],"sourcesContent":["export const DATA_POSITIONING_INTERSECTING = 'data-popper-is-intersecting';\nexport const DATA_POSITIONING_ESCAPED = 'data-popper-escaped';\nexport const DATA_POSITIONING_HIDDEN = 'data-popper-reference-hidden';\nexport const DATA_POSITIONING_PLACEMENT = 'data-popper-placement';\n"],"names":["DATA_POSITIONING_INTERSECTING","DATA_POSITIONING_ESCAPED","DATA_POSITIONING_HIDDEN","DATA_POSITIONING_PLACEMENT"],"mappings":";;;;;;;;;;;IAAaA,6BAA6B,MAA7BA;IACAC,wBAAwB,MAAxBA;IACAC,uBAAuB,MAAvBA;IACAC,0BAA0B,MAA1BA;;AAHN,MAAMH,gCAAgC;AACtC,MAAMC,2BAA2B;AACjC,MAAMC,0BAA0B;AAChC,MAAMC,6BAA6B"}
@@ -62,6 +62,4 @@ function createArrowHeightStyles(arrowHeight) {
62
62
  width: edgeLength,
63
63
  height: edgeLength
64
64
  };
65
- } //# sourceMappingURL=createArrowStyles.js.map
66
-
67
- //# sourceMappingURL=createArrowStyles.js.map
65
+ }