@fluentui/react-positioning 9.15.12 → 9.15.14
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +23 -2
- package/lib/createSlideStyles.js +4 -1
- package/lib/createSlideStyles.js.map +1 -1
- package/lib/middleware/index.js +7 -7
- package/lib/middleware/index.js.map +1 -1
- package/lib/utils/index.js +16 -16
- package/lib/utils/index.js.map +1 -1
- package/lib-commonjs/createSlideStyles.js +4 -1
- package/lib-commonjs/createSlideStyles.js.map +1 -1
- package/lib-commonjs/middleware/index.js +42 -8
- package/lib-commonjs/middleware/index.js.map +1 -1
- package/lib-commonjs/utils/index.js +78 -17
- package/lib-commonjs/utils/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,33 @@
|
|
1
1
|
# Change Log - @fluentui/react-positioning
|
2
2
|
|
3
|
-
This log was last generated on Mon,
|
3
|
+
This log was last generated on Mon, 09 Dec 2024 17:34:08 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.15.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.15.14)
|
8
|
+
|
9
|
+
Mon, 09 Dec 2024 17:34:08 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.15.13..@fluentui/react-positioning_v9.15.14)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- fix(Popover): opacity transition was not happening ([PR #33421](https://github.com/microsoft/fluentui/pull/33421) by robertpenner@microsoft.com)
|
15
|
+
|
16
|
+
## [9.15.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.15.13)
|
17
|
+
|
18
|
+
Fri, 06 Dec 2024 12:53:41 GMT
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.15.12..@fluentui/react-positioning_v9.15.13)
|
20
|
+
|
21
|
+
### Patches
|
22
|
+
|
23
|
+
- chore: remove usage of "export *" ([PR #33380](https://github.com/microsoft/fluentui/pull/33380) by olfedias@microsoft.com)
|
24
|
+
- Bump @fluentui/react-shared-contexts to v9.21.1 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
25
|
+
- Bump @fluentui/react-theme to v9.1.23 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
26
|
+
- Bump @fluentui/react-utilities to v9.18.18 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
27
|
+
|
7
28
|
## [9.15.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.15.12)
|
8
29
|
|
9
|
-
Mon, 18 Nov 2024 09:
|
30
|
+
Mon, 18 Nov 2024 09:44:39 GMT
|
10
31
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.15.11..@fluentui/react-positioning_v9.15.12)
|
11
32
|
|
12
33
|
### Patches
|
package/lib/createSlideStyles.js
CHANGED
@@ -16,7 +16,8 @@ import { DATA_POSITIONING_PLACEMENT } from './constants';
|
|
16
16
|
const slideDistanceVarX = '--fui-positioning-slide-distance-x';
|
17
17
|
const slideDistanceVarY = '--fui-positioning-slide-distance-y';
|
18
18
|
return {
|
19
|
-
|
19
|
+
// The fade has absolute values, whereas the slide amount is relative.
|
20
|
+
animationComposition: 'replace, accumulate',
|
20
21
|
animationDuration: tokens.durationSlower,
|
21
22
|
animationTimingFunction: tokens.curveDecelerateMid,
|
22
23
|
[slideDistanceVarX]: `0px`,
|
@@ -45,6 +46,7 @@ import { DATA_POSITIONING_PLACEMENT } from './constants';
|
|
45
46
|
// Note: at-rules have more specificity in Griffel
|
46
47
|
'@media(prefers-reduced-motion)': {
|
47
48
|
[`&[${DATA_POSITIONING_PLACEMENT}]`]: {
|
49
|
+
animationComposition: 'replace',
|
48
50
|
animationDuration: '1ms',
|
49
51
|
animationName: fadeIn
|
50
52
|
}
|
@@ -52,6 +54,7 @@ import { DATA_POSITIONING_PLACEMENT } from './constants';
|
|
52
54
|
// Tested in Firefox 79
|
53
55
|
'@supports not (animation-composition: accumulate)': {
|
54
56
|
[`&[${DATA_POSITIONING_PLACEMENT}]`]: {
|
57
|
+
animationComposition: 'replace',
|
55
58
|
animationName: fadeIn
|
56
59
|
}
|
57
60
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/createSlideStyles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport type { GriffelStyle } from '@griffel/react';\nimport { DATA_POSITIONING_PLACEMENT } from './constants';\n\n/**\n * Creates animation styles so that positioned elements slide in from the main axis\n * @param mainAxis - distance than the element sides for\n * @returns Griffel styles to spread to a slot\n */\nexport function createSlideStyles(mainAxis: number): GriffelStyle {\n const fadeIn = {\n from: {\n opacity: 0,\n },\n to: {\n opacity: 1,\n },\n };\n\n const slideDistanceVarX = '--fui-positioning-slide-distance-x';\n const slideDistanceVarY = '--fui-positioning-slide-distance-y';\n\n return {\n animationComposition: 'accumulate',\n animationDuration: tokens.durationSlower,\n animationTimingFunction: tokens.curveDecelerateMid,\n [slideDistanceVarX]: `0px`,\n [slideDistanceVarY]: `${mainAxis}px`,\n [`&[${DATA_POSITIONING_PLACEMENT}^=right]`]: {\n [slideDistanceVarX]: `-${mainAxis}px`,\n [slideDistanceVarY]: '0px',\n },\n\n [`&[${DATA_POSITIONING_PLACEMENT}^=bottom]`]: {\n [slideDistanceVarX]: '0px',\n [slideDistanceVarY]: `-${mainAxis}px`,\n },\n\n [`&[${DATA_POSITIONING_PLACEMENT}^=left]`]: {\n [slideDistanceVarX]: `${mainAxis}px`,\n [slideDistanceVarY]: '0px',\n },\n\n animationName: [\n fadeIn,\n {\n from: {\n transform: `translate(var(${slideDistanceVarX}), var(${slideDistanceVarY}))`,\n },\n to: {},\n },\n ],\n\n // Note: at-rules have more specificity in Griffel\n '@media(prefers-reduced-motion)': {\n [`&[${DATA_POSITIONING_PLACEMENT}]`]: {\n animationDuration: '1ms',\n animationName: fadeIn,\n },\n },\n\n // Tested in Firefox 79\n '@supports not (animation-composition: accumulate)': {\n [`&[${DATA_POSITIONING_PLACEMENT}]`]: {\n animationName: fadeIn,\n },\n },\n };\n}\n"],"names":["tokens","DATA_POSITIONING_PLACEMENT","createSlideStyles","mainAxis","fadeIn","from","opacity","to","slideDistanceVarX","slideDistanceVarY","animationComposition","animationDuration","durationSlower","animationTimingFunction","curveDecelerateMid","animationName","transform"],"rangeMappings":"
|
1
|
+
{"version":3,"sources":["../src/createSlideStyles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport type { GriffelStyle } from '@griffel/react';\nimport { DATA_POSITIONING_PLACEMENT } from './constants';\n\n/**\n * Creates animation styles so that positioned elements slide in from the main axis\n * @param mainAxis - distance than the element sides for\n * @returns Griffel styles to spread to a slot\n */\nexport function createSlideStyles(mainAxis: number): GriffelStyle {\n const fadeIn = {\n from: {\n opacity: 0,\n },\n to: {\n opacity: 1,\n },\n };\n\n const slideDistanceVarX = '--fui-positioning-slide-distance-x';\n const slideDistanceVarY = '--fui-positioning-slide-distance-y';\n\n return {\n // The fade has absolute values, whereas the slide amount is relative.\n animationComposition: 'replace, accumulate',\n animationDuration: tokens.durationSlower,\n animationTimingFunction: tokens.curveDecelerateMid,\n [slideDistanceVarX]: `0px`,\n [slideDistanceVarY]: `${mainAxis}px`,\n [`&[${DATA_POSITIONING_PLACEMENT}^=right]`]: {\n [slideDistanceVarX]: `-${mainAxis}px`,\n [slideDistanceVarY]: '0px',\n },\n\n [`&[${DATA_POSITIONING_PLACEMENT}^=bottom]`]: {\n [slideDistanceVarX]: '0px',\n [slideDistanceVarY]: `-${mainAxis}px`,\n },\n\n [`&[${DATA_POSITIONING_PLACEMENT}^=left]`]: {\n [slideDistanceVarX]: `${mainAxis}px`,\n [slideDistanceVarY]: '0px',\n },\n\n animationName: [\n fadeIn,\n {\n from: {\n transform: `translate(var(${slideDistanceVarX}), var(${slideDistanceVarY}))`,\n },\n to: {},\n },\n ],\n\n // Note: at-rules have more specificity in Griffel\n '@media(prefers-reduced-motion)': {\n [`&[${DATA_POSITIONING_PLACEMENT}]`]: {\n animationComposition: 'replace',\n animationDuration: '1ms',\n animationName: fadeIn,\n },\n },\n\n // Tested in Firefox 79\n '@supports not (animation-composition: accumulate)': {\n [`&[${DATA_POSITIONING_PLACEMENT}]`]: {\n animationComposition: 'replace',\n animationName: fadeIn,\n },\n },\n };\n}\n"],"names":["tokens","DATA_POSITIONING_PLACEMENT","createSlideStyles","mainAxis","fadeIn","from","opacity","to","slideDistanceVarX","slideDistanceVarY","animationComposition","animationDuration","durationSlower","animationTimingFunction","curveDecelerateMid","animationName","transform"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,MAAM,QAAQ,wBAAwB;AAE/C,SAASC,0BAA0B,QAAQ,cAAc;AAEzD;;;;CAIC,GACD,OAAO,SAASC,kBAAkBC,QAAgB;IAChD,MAAMC,SAAS;QACbC,MAAM;YACJC,SAAS;QACX;QACAC,IAAI;YACFD,SAAS;QACX;IACF;IAEA,MAAME,oBAAoB;IAC1B,MAAMC,oBAAoB;IAE1B,OAAO;QACL,sEAAsE;QACtEC,sBAAsB;QACtBC,mBAAmBX,OAAOY,cAAc;QACxCC,yBAAyBb,OAAOc,kBAAkB;QAClD,CAACN,kBAAkB,EAAE,CAAC,GAAG,CAAC;QAC1B,CAACC,kBAAkB,EAAE,CAAC,EAAEN,SAAS,EAAE,CAAC;QACpC,CAAC,CAAC,EAAE,EAAEF,2BAA2B,QAAQ,CAAC,CAAC,EAAE;YAC3C,CAACO,kBAAkB,EAAE,CAAC,CAAC,EAAEL,SAAS,EAAE,CAAC;YACrC,CAACM,kBAAkB,EAAE;QACvB;QAEA,CAAC,CAAC,EAAE,EAAER,2BAA2B,SAAS,CAAC,CAAC,EAAE;YAC5C,CAACO,kBAAkB,EAAE;YACrB,CAACC,kBAAkB,EAAE,CAAC,CAAC,EAAEN,SAAS,EAAE,CAAC;QACvC;QAEA,CAAC,CAAC,EAAE,EAAEF,2BAA2B,OAAO,CAAC,CAAC,EAAE;YAC1C,CAACO,kBAAkB,EAAE,CAAC,EAAEL,SAAS,EAAE,CAAC;YACpC,CAACM,kBAAkB,EAAE;QACvB;QAEAM,eAAe;YACbX;YACA;gBACEC,MAAM;oBACJW,WAAW,CAAC,cAAc,EAAER,kBAAkB,OAAO,EAAEC,kBAAkB,EAAE,CAAC;gBAC9E;gBACAF,IAAI,CAAC;YACP;SACD;QAED,kDAAkD;QAClD,kCAAkC;YAChC,CAAC,CAAC,EAAE,EAAEN,2BAA2B,CAAC,CAAC,CAAC,EAAE;gBACpCS,sBAAsB;gBACtBC,mBAAmB;gBACnBI,eAAeX;YACjB;QACF;QAEA,uBAAuB;QACvB,qDAAqD;YACnD,CAAC,CAAC,EAAE,EAAEH,2BAA2B,CAAC,CAAC,CAAC,EAAE;gBACpCS,sBAAsB;gBACtBK,eAAeX;YACjB;QACF;IACF;AACF"}
|
package/lib/middleware/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
export
|
2
|
-
export
|
3
|
-
export
|
4
|
-
export
|
5
|
-
export
|
6
|
-
export
|
7
|
-
export
|
1
|
+
export { coverTarget } from './coverTarget';
|
2
|
+
export { flip } from './flip';
|
3
|
+
export { intersecting } from './intersecting';
|
4
|
+
export { maxSize, resetMaxSize } from './maxSize';
|
5
|
+
export { offset } from './offset';
|
6
|
+
export { shift } from './shift';
|
7
|
+
export { matchTargetSize, matchTargetSizeCssVar } from './matchTargetSize';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/middleware/index.ts"],"sourcesContent":["export
|
1
|
+
{"version":3,"sources":["../src/middleware/index.ts"],"sourcesContent":["export { coverTarget } from './coverTarget';\nexport type { FlipMiddlewareOptions } from './flip';\nexport { flip } from './flip';\nexport { intersecting } from './intersecting';\nexport type { MaxSizeMiddlewareOptions } from './maxSize';\nexport { maxSize, resetMaxSize } from './maxSize';\nexport { offset } from './offset';\nexport type { ShiftMiddlewareOptions } from './shift';\nexport { shift } from './shift';\nexport { matchTargetSize, matchTargetSizeCssVar } from './matchTargetSize';\n"],"names":["coverTarget","flip","intersecting","maxSize","resetMaxSize","offset","shift","matchTargetSize","matchTargetSizeCssVar"],"rangeMappings":";;;;;;","mappings":"AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAE5C,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,SAASC,OAAO,EAAEC,YAAY,QAAQ,YAAY;AAClD,SAASC,MAAM,QAAQ,WAAW;AAElC,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,eAAe,EAAEC,qBAAqB,QAAQ,oBAAoB"}
|
package/lib/utils/index.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
export
|
2
|
-
export
|
3
|
-
export
|
4
|
-
export
|
5
|
-
export
|
6
|
-
export
|
7
|
-
export
|
8
|
-
export
|
9
|
-
export
|
10
|
-
export
|
11
|
-
export
|
12
|
-
export
|
13
|
-
export
|
14
|
-
export
|
15
|
-
export
|
16
|
-
export
|
1
|
+
export { parseFloatingUIPlacement } from './parseFloatingUIPlacement';
|
2
|
+
export { getBoundary } from './getBoundary';
|
3
|
+
export { getReactFiberFromNode } from './getReactFiberFromNode';
|
4
|
+
export { getParentNode, getScrollParent, hasScrollParent } from './getScrollParent';
|
5
|
+
export { mergeArrowOffset } from './mergeArrowOffset';
|
6
|
+
export { toFloatingUIPadding } from './toFloatingUIPadding';
|
7
|
+
export { toFloatingUIPlacement } from './toFloatingUIPlacement';
|
8
|
+
export { fromFloatingUIPlacement } from './fromFloatingUIPlacement';
|
9
|
+
export { resolvePositioningShorthand } from './resolvePositioningShorthand';
|
10
|
+
export { useCallbackRef } from './useCallbackRef';
|
11
|
+
export { debounce } from './debounce';
|
12
|
+
export { toggleScrollListener } from './toggleScrollListener';
|
13
|
+
export { hasAutofocusFilter } from './hasAutoFocusFilter';
|
14
|
+
export { writeArrowUpdates } from './writeArrowUpdates';
|
15
|
+
export { writeContainerUpdates } from './writeContainerupdates';
|
16
|
+
export { normalizeAutoSize } from './normalizeAutoSize';
|
package/lib/utils/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/utils/index.ts"],"sourcesContent":["export
|
1
|
+
{"version":3,"sources":["../src/utils/index.ts"],"sourcesContent":["export { parseFloatingUIPlacement } from './parseFloatingUIPlacement';\nexport { getBoundary } from './getBoundary';\nexport type { Fiber, HookType } from './getReactFiberFromNode';\nexport { getReactFiberFromNode } from './getReactFiberFromNode';\nexport { getParentNode, getScrollParent, hasScrollParent } from './getScrollParent';\nexport { mergeArrowOffset } from './mergeArrowOffset';\nexport { toFloatingUIPadding } from './toFloatingUIPadding';\nexport { toFloatingUIPlacement } from './toFloatingUIPlacement';\nexport { fromFloatingUIPlacement } from './fromFloatingUIPlacement';\nexport { resolvePositioningShorthand } from './resolvePositioningShorthand';\nexport { useCallbackRef } from './useCallbackRef';\nexport { debounce } from './debounce';\nexport { toggleScrollListener } from './toggleScrollListener';\nexport { hasAutofocusFilter } from './hasAutoFocusFilter';\nexport { writeArrowUpdates } from './writeArrowUpdates';\nexport { writeContainerUpdates } from './writeContainerupdates';\nexport { normalizeAutoSize } from './normalizeAutoSize';\n"],"names":["parseFloatingUIPlacement","getBoundary","getReactFiberFromNode","getParentNode","getScrollParent","hasScrollParent","mergeArrowOffset","toFloatingUIPadding","toFloatingUIPlacement","fromFloatingUIPlacement","resolvePositioningShorthand","useCallbackRef","debounce","toggleScrollListener","hasAutofocusFilter","writeArrowUpdates","writeContainerUpdates","normalizeAutoSize"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,wBAAwB,QAAQ,6BAA6B;AACtE,SAASC,WAAW,QAAQ,gBAAgB;AAE5C,SAASC,qBAAqB,QAAQ,0BAA0B;AAChE,SAASC,aAAa,EAAEC,eAAe,EAAEC,eAAe,QAAQ,oBAAoB;AACpF,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,mBAAmB,QAAQ,wBAAwB;AAC5D,SAASC,qBAAqB,QAAQ,0BAA0B;AAChE,SAASC,uBAAuB,QAAQ,4BAA4B;AACpE,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5E,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAASC,qBAAqB,QAAQ,0BAA0B;AAChE,SAASC,iBAAiB,QAAQ,sBAAsB"}
|
@@ -22,7 +22,8 @@ function createSlideStyles(mainAxis) {
|
|
22
22
|
const slideDistanceVarX = '--fui-positioning-slide-distance-x';
|
23
23
|
const slideDistanceVarY = '--fui-positioning-slide-distance-y';
|
24
24
|
return {
|
25
|
-
|
25
|
+
// The fade has absolute values, whereas the slide amount is relative.
|
26
|
+
animationComposition: 'replace, accumulate',
|
26
27
|
animationDuration: _reacttheme.tokens.durationSlower,
|
27
28
|
animationTimingFunction: _reacttheme.tokens.curveDecelerateMid,
|
28
29
|
[slideDistanceVarX]: `0px`,
|
@@ -51,6 +52,7 @@ function createSlideStyles(mainAxis) {
|
|
51
52
|
// Note: at-rules have more specificity in Griffel
|
52
53
|
'@media(prefers-reduced-motion)': {
|
53
54
|
[`&[${_constants.DATA_POSITIONING_PLACEMENT}]`]: {
|
55
|
+
animationComposition: 'replace',
|
54
56
|
animationDuration: '1ms',
|
55
57
|
animationName: fadeIn
|
56
58
|
}
|
@@ -58,6 +60,7 @@ function createSlideStyles(mainAxis) {
|
|
58
60
|
// Tested in Firefox 79
|
59
61
|
'@supports not (animation-composition: accumulate)': {
|
60
62
|
[`&[${_constants.DATA_POSITIONING_PLACEMENT}]`]: {
|
63
|
+
animationComposition: 'replace',
|
61
64
|
animationName: fadeIn
|
62
65
|
}
|
63
66
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/createSlideStyles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport type { GriffelStyle } from '@griffel/react';\nimport { DATA_POSITIONING_PLACEMENT } from './constants';\n\n/**\n * Creates animation styles so that positioned elements slide in from the main axis\n * @param mainAxis - distance than the element sides for\n * @returns Griffel styles to spread to a slot\n */\nexport function createSlideStyles(mainAxis: number): GriffelStyle {\n const fadeIn = {\n from: {\n opacity: 0,\n },\n to: {\n opacity: 1,\n },\n };\n\n const slideDistanceVarX = '--fui-positioning-slide-distance-x';\n const slideDistanceVarY = '--fui-positioning-slide-distance-y';\n\n return {\n animationComposition: 'accumulate',\n animationDuration: tokens.durationSlower,\n animationTimingFunction: tokens.curveDecelerateMid,\n [slideDistanceVarX]: `0px`,\n [slideDistanceVarY]: `${mainAxis}px`,\n [`&[${DATA_POSITIONING_PLACEMENT}^=right]`]: {\n [slideDistanceVarX]: `-${mainAxis}px`,\n [slideDistanceVarY]: '0px',\n },\n\n [`&[${DATA_POSITIONING_PLACEMENT}^=bottom]`]: {\n [slideDistanceVarX]: '0px',\n [slideDistanceVarY]: `-${mainAxis}px`,\n },\n\n [`&[${DATA_POSITIONING_PLACEMENT}^=left]`]: {\n [slideDistanceVarX]: `${mainAxis}px`,\n [slideDistanceVarY]: '0px',\n },\n\n animationName: [\n fadeIn,\n {\n from: {\n transform: `translate(var(${slideDistanceVarX}), var(${slideDistanceVarY}))`,\n },\n to: {},\n },\n ],\n\n // Note: at-rules have more specificity in Griffel\n '@media(prefers-reduced-motion)': {\n [`&[${DATA_POSITIONING_PLACEMENT}]`]: {\n animationDuration: '1ms',\n animationName: fadeIn,\n },\n },\n\n // Tested in Firefox 79\n '@supports not (animation-composition: accumulate)': {\n [`&[${DATA_POSITIONING_PLACEMENT}]`]: {\n animationName: fadeIn,\n },\n },\n };\n}\n"],"names":["createSlideStyles","mainAxis","fadeIn","from","opacity","to","slideDistanceVarX","slideDistanceVarY","animationComposition","animationDuration","tokens","durationSlower","animationTimingFunction","curveDecelerateMid","DATA_POSITIONING_PLACEMENT","animationName","transform"],"rangeMappings":"
|
1
|
+
{"version":3,"sources":["../src/createSlideStyles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport type { GriffelStyle } from '@griffel/react';\nimport { DATA_POSITIONING_PLACEMENT } from './constants';\n\n/**\n * Creates animation styles so that positioned elements slide in from the main axis\n * @param mainAxis - distance than the element sides for\n * @returns Griffel styles to spread to a slot\n */\nexport function createSlideStyles(mainAxis: number): GriffelStyle {\n const fadeIn = {\n from: {\n opacity: 0,\n },\n to: {\n opacity: 1,\n },\n };\n\n const slideDistanceVarX = '--fui-positioning-slide-distance-x';\n const slideDistanceVarY = '--fui-positioning-slide-distance-y';\n\n return {\n // The fade has absolute values, whereas the slide amount is relative.\n animationComposition: 'replace, accumulate',\n animationDuration: tokens.durationSlower,\n animationTimingFunction: tokens.curveDecelerateMid,\n [slideDistanceVarX]: `0px`,\n [slideDistanceVarY]: `${mainAxis}px`,\n [`&[${DATA_POSITIONING_PLACEMENT}^=right]`]: {\n [slideDistanceVarX]: `-${mainAxis}px`,\n [slideDistanceVarY]: '0px',\n },\n\n [`&[${DATA_POSITIONING_PLACEMENT}^=bottom]`]: {\n [slideDistanceVarX]: '0px',\n [slideDistanceVarY]: `-${mainAxis}px`,\n },\n\n [`&[${DATA_POSITIONING_PLACEMENT}^=left]`]: {\n [slideDistanceVarX]: `${mainAxis}px`,\n [slideDistanceVarY]: '0px',\n },\n\n animationName: [\n fadeIn,\n {\n from: {\n transform: `translate(var(${slideDistanceVarX}), var(${slideDistanceVarY}))`,\n },\n to: {},\n },\n ],\n\n // Note: at-rules have more specificity in Griffel\n '@media(prefers-reduced-motion)': {\n [`&[${DATA_POSITIONING_PLACEMENT}]`]: {\n animationComposition: 'replace',\n animationDuration: '1ms',\n animationName: fadeIn,\n },\n },\n\n // Tested in Firefox 79\n '@supports not (animation-composition: accumulate)': {\n [`&[${DATA_POSITIONING_PLACEMENT}]`]: {\n animationComposition: 'replace',\n animationName: fadeIn,\n },\n },\n };\n}\n"],"names":["createSlideStyles","mainAxis","fadeIn","from","opacity","to","slideDistanceVarX","slideDistanceVarY","animationComposition","animationDuration","tokens","durationSlower","animationTimingFunction","curveDecelerateMid","DATA_POSITIONING_PLACEMENT","animationName","transform"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASgBA;;;eAAAA;;;4BATO;2BAEoB;AAOpC,SAASA,kBAAkBC,QAAgB;IAChD,MAAMC,SAAS;QACbC,MAAM;YACJC,SAAS;QACX;QACAC,IAAI;YACFD,SAAS;QACX;IACF;IAEA,MAAME,oBAAoB;IAC1B,MAAMC,oBAAoB;IAE1B,OAAO;QACL,sEAAsE;QACtEC,sBAAsB;QACtBC,mBAAmBC,kBAAM,CAACC,cAAc;QACxCC,yBAAyBF,kBAAM,CAACG,kBAAkB;QAClD,CAACP,kBAAkB,EAAE,CAAC,GAAG,CAAC;QAC1B,CAACC,kBAAkB,EAAE,CAAC,EAAEN,SAAS,EAAE,CAAC;QACpC,CAAC,CAAC,EAAE,EAAEa,qCAA0B,CAAC,QAAQ,CAAC,CAAC,EAAE;YAC3C,CAACR,kBAAkB,EAAE,CAAC,CAAC,EAAEL,SAAS,EAAE,CAAC;YACrC,CAACM,kBAAkB,EAAE;QACvB;QAEA,CAAC,CAAC,EAAE,EAAEO,qCAA0B,CAAC,SAAS,CAAC,CAAC,EAAE;YAC5C,CAACR,kBAAkB,EAAE;YACrB,CAACC,kBAAkB,EAAE,CAAC,CAAC,EAAEN,SAAS,EAAE,CAAC;QACvC;QAEA,CAAC,CAAC,EAAE,EAAEa,qCAA0B,CAAC,OAAO,CAAC,CAAC,EAAE;YAC1C,CAACR,kBAAkB,EAAE,CAAC,EAAEL,SAAS,EAAE,CAAC;YACpC,CAACM,kBAAkB,EAAE;QACvB;QAEAQ,eAAe;YACbb;YACA;gBACEC,MAAM;oBACJa,WAAW,CAAC,cAAc,EAAEV,kBAAkB,OAAO,EAAEC,kBAAkB,EAAE,CAAC;gBAC9E;gBACAF,IAAI,CAAC;YACP;SACD;QAED,kDAAkD;QAClD,kCAAkC;YAChC,CAAC,CAAC,EAAE,EAAES,qCAA0B,CAAC,CAAC,CAAC,CAAC,EAAE;gBACpCN,sBAAsB;gBACtBC,mBAAmB;gBACnBM,eAAeb;YACjB;QACF;QAEA,uBAAuB;QACvB,qDAAqD;YACnD,CAAC,CAAC,EAAE,EAAEY,qCAA0B,CAAC,CAAC,CAAC,CAAC,EAAE;gBACpCN,sBAAsB;gBACtBO,eAAeb;YACjB;QACF;IACF;AACF"}
|
@@ -2,11 +2,45 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
coverTarget: function() {
|
13
|
+
return _coverTarget.coverTarget;
|
14
|
+
},
|
15
|
+
flip: function() {
|
16
|
+
return _flip.flip;
|
17
|
+
},
|
18
|
+
intersecting: function() {
|
19
|
+
return _intersecting.intersecting;
|
20
|
+
},
|
21
|
+
matchTargetSize: function() {
|
22
|
+
return _matchTargetSize.matchTargetSize;
|
23
|
+
},
|
24
|
+
matchTargetSizeCssVar: function() {
|
25
|
+
return _matchTargetSize.matchTargetSizeCssVar;
|
26
|
+
},
|
27
|
+
maxSize: function() {
|
28
|
+
return _maxSize.maxSize;
|
29
|
+
},
|
30
|
+
offset: function() {
|
31
|
+
return _offset.offset;
|
32
|
+
},
|
33
|
+
resetMaxSize: function() {
|
34
|
+
return _maxSize.resetMaxSize;
|
35
|
+
},
|
36
|
+
shift: function() {
|
37
|
+
return _shift.shift;
|
38
|
+
}
|
39
|
+
});
|
40
|
+
const _coverTarget = require("./coverTarget");
|
41
|
+
const _flip = require("./flip");
|
42
|
+
const _intersecting = require("./intersecting");
|
43
|
+
const _maxSize = require("./maxSize");
|
44
|
+
const _offset = require("./offset");
|
45
|
+
const _shift = require("./shift");
|
46
|
+
const _matchTargetSize = require("./matchTargetSize");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/middleware/index.ts"],"sourcesContent":["export
|
1
|
+
{"version":3,"sources":["../src/middleware/index.ts"],"sourcesContent":["export { coverTarget } from './coverTarget';\nexport type { FlipMiddlewareOptions } from './flip';\nexport { flip } from './flip';\nexport { intersecting } from './intersecting';\nexport type { MaxSizeMiddlewareOptions } from './maxSize';\nexport { maxSize, resetMaxSize } from './maxSize';\nexport { offset } from './offset';\nexport type { ShiftMiddlewareOptions } from './shift';\nexport { shift } from './shift';\nexport { matchTargetSize, matchTargetSizeCssVar } from './matchTargetSize';\n"],"names":["coverTarget","flip","intersecting","matchTargetSize","matchTargetSizeCssVar","maxSize","offset","resetMaxSize","shift"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,WAAW;eAAXA,wBAAW;;IAEXC,IAAI;eAAJA,UAAI;;IACJC,YAAY;eAAZA,0BAAY;;IAMZC,eAAe;eAAfA,gCAAe;;IAAEC,qBAAqB;eAArBA,sCAAqB;;IAJtCC,OAAO;eAAPA,gBAAO;;IACPC,MAAM;eAANA,cAAM;;IADGC,YAAY;eAAZA,qBAAY;;IAGrBC,KAAK;eAALA,YAAK;;;6BARc;sBAEP;8BACQ;yBAES;wBACf;uBAED;iCACiC"}
|
@@ -2,20 +2,81 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
debounce: function() {
|
13
|
+
return _debounce.debounce;
|
14
|
+
},
|
15
|
+
fromFloatingUIPlacement: function() {
|
16
|
+
return _fromFloatingUIPlacement.fromFloatingUIPlacement;
|
17
|
+
},
|
18
|
+
getBoundary: function() {
|
19
|
+
return _getBoundary.getBoundary;
|
20
|
+
},
|
21
|
+
getParentNode: function() {
|
22
|
+
return _getScrollParent.getParentNode;
|
23
|
+
},
|
24
|
+
getReactFiberFromNode: function() {
|
25
|
+
return _getReactFiberFromNode.getReactFiberFromNode;
|
26
|
+
},
|
27
|
+
getScrollParent: function() {
|
28
|
+
return _getScrollParent.getScrollParent;
|
29
|
+
},
|
30
|
+
hasAutofocusFilter: function() {
|
31
|
+
return _hasAutoFocusFilter.hasAutofocusFilter;
|
32
|
+
},
|
33
|
+
hasScrollParent: function() {
|
34
|
+
return _getScrollParent.hasScrollParent;
|
35
|
+
},
|
36
|
+
mergeArrowOffset: function() {
|
37
|
+
return _mergeArrowOffset.mergeArrowOffset;
|
38
|
+
},
|
39
|
+
normalizeAutoSize: function() {
|
40
|
+
return _normalizeAutoSize.normalizeAutoSize;
|
41
|
+
},
|
42
|
+
parseFloatingUIPlacement: function() {
|
43
|
+
return _parseFloatingUIPlacement.parseFloatingUIPlacement;
|
44
|
+
},
|
45
|
+
resolvePositioningShorthand: function() {
|
46
|
+
return _resolvePositioningShorthand.resolvePositioningShorthand;
|
47
|
+
},
|
48
|
+
toFloatingUIPadding: function() {
|
49
|
+
return _toFloatingUIPadding.toFloatingUIPadding;
|
50
|
+
},
|
51
|
+
toFloatingUIPlacement: function() {
|
52
|
+
return _toFloatingUIPlacement.toFloatingUIPlacement;
|
53
|
+
},
|
54
|
+
toggleScrollListener: function() {
|
55
|
+
return _toggleScrollListener.toggleScrollListener;
|
56
|
+
},
|
57
|
+
useCallbackRef: function() {
|
58
|
+
return _useCallbackRef.useCallbackRef;
|
59
|
+
},
|
60
|
+
writeArrowUpdates: function() {
|
61
|
+
return _writeArrowUpdates.writeArrowUpdates;
|
62
|
+
},
|
63
|
+
writeContainerUpdates: function() {
|
64
|
+
return _writeContainerupdates.writeContainerUpdates;
|
65
|
+
}
|
66
|
+
});
|
67
|
+
const _parseFloatingUIPlacement = require("./parseFloatingUIPlacement");
|
68
|
+
const _getBoundary = require("./getBoundary");
|
69
|
+
const _getReactFiberFromNode = require("./getReactFiberFromNode");
|
70
|
+
const _getScrollParent = require("./getScrollParent");
|
71
|
+
const _mergeArrowOffset = require("./mergeArrowOffset");
|
72
|
+
const _toFloatingUIPadding = require("./toFloatingUIPadding");
|
73
|
+
const _toFloatingUIPlacement = require("./toFloatingUIPlacement");
|
74
|
+
const _fromFloatingUIPlacement = require("./fromFloatingUIPlacement");
|
75
|
+
const _resolvePositioningShorthand = require("./resolvePositioningShorthand");
|
76
|
+
const _useCallbackRef = require("./useCallbackRef");
|
77
|
+
const _debounce = require("./debounce");
|
78
|
+
const _toggleScrollListener = require("./toggleScrollListener");
|
79
|
+
const _hasAutoFocusFilter = require("./hasAutoFocusFilter");
|
80
|
+
const _writeArrowUpdates = require("./writeArrowUpdates");
|
81
|
+
const _writeContainerupdates = require("./writeContainerupdates");
|
82
|
+
const _normalizeAutoSize = require("./normalizeAutoSize");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/utils/index.ts"],"sourcesContent":["export
|
1
|
+
{"version":3,"sources":["../src/utils/index.ts"],"sourcesContent":["export { parseFloatingUIPlacement } from './parseFloatingUIPlacement';\nexport { getBoundary } from './getBoundary';\nexport type { Fiber, HookType } from './getReactFiberFromNode';\nexport { getReactFiberFromNode } from './getReactFiberFromNode';\nexport { getParentNode, getScrollParent, hasScrollParent } from './getScrollParent';\nexport { mergeArrowOffset } from './mergeArrowOffset';\nexport { toFloatingUIPadding } from './toFloatingUIPadding';\nexport { toFloatingUIPlacement } from './toFloatingUIPlacement';\nexport { fromFloatingUIPlacement } from './fromFloatingUIPlacement';\nexport { resolvePositioningShorthand } from './resolvePositioningShorthand';\nexport { useCallbackRef } from './useCallbackRef';\nexport { debounce } from './debounce';\nexport { toggleScrollListener } from './toggleScrollListener';\nexport { hasAutofocusFilter } from './hasAutoFocusFilter';\nexport { writeArrowUpdates } from './writeArrowUpdates';\nexport { writeContainerUpdates } from './writeContainerupdates';\nexport { normalizeAutoSize } from './normalizeAutoSize';\n"],"names":["debounce","fromFloatingUIPlacement","getBoundary","getParentNode","getReactFiberFromNode","getScrollParent","hasAutofocusFilter","hasScrollParent","mergeArrowOffset","normalizeAutoSize","parseFloatingUIPlacement","resolvePositioningShorthand","toFloatingUIPadding","toFloatingUIPlacement","toggleScrollListener","useCallbackRef","writeArrowUpdates","writeContainerUpdates"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAWSA,QAAQ;eAARA,kBAAQ;;IAHRC,uBAAuB;eAAvBA,gDAAuB;;IAPvBC,WAAW;eAAXA,wBAAW;;IAGXC,aAAa;eAAbA,8BAAa;;IADbC,qBAAqB;eAArBA,4CAAqB;;IACNC,eAAe;eAAfA,gCAAe;;IAS9BC,kBAAkB;eAAlBA,sCAAkB;;IATcC,eAAe;eAAfA,gCAAe;;IAC/CC,gBAAgB;eAAhBA,kCAAgB;;IAWhBC,iBAAiB;eAAjBA,oCAAiB;;IAhBjBC,wBAAwB;eAAxBA,kDAAwB;;IASxBC,2BAA2B;eAA3BA,wDAA2B;;IAH3BC,mBAAmB;eAAnBA,wCAAmB;;IACnBC,qBAAqB;eAArBA,4CAAqB;;IAKrBC,oBAAoB;eAApBA,0CAAoB;;IAFpBC,cAAc;eAAdA,8BAAc;;IAIdC,iBAAiB;eAAjBA,oCAAiB;;IACjBC,qBAAqB;eAArBA,4CAAqB;;;0CAfW;6BACb;uCAEU;iCAC0B;kCAC/B;qCACG;uCACE;yCACE;6CACI;gCACb;0BACN;sCACY;oCACF;mCACD;uCACI;mCACJ"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-positioning",
|
3
|
-
"version": "9.15.
|
3
|
+
"version": "9.15.14",
|
4
4
|
"description": "A react wrapper around Popper.js for Fluent UI",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -18,9 +18,9 @@
|
|
18
18
|
"dependencies": {
|
19
19
|
"@floating-ui/dom": "^1.2.0",
|
20
20
|
"@floating-ui/devtools": "0.2.1",
|
21
|
-
"@fluentui/react-shared-contexts": "^9.21.
|
22
|
-
"@fluentui/react-theme": "^9.1.
|
23
|
-
"@fluentui/react-utilities": "^9.18.
|
21
|
+
"@fluentui/react-shared-contexts": "^9.21.1",
|
22
|
+
"@fluentui/react-theme": "^9.1.23",
|
23
|
+
"@fluentui/react-utilities": "^9.18.18",
|
24
24
|
"@griffel/react": "^1.5.22",
|
25
25
|
"@swc/helpers": "^0.5.1"
|
26
26
|
},
|