@fluentui/react-dialog
Advanced tools
Comparing version 9.11.21 to 9.11.22
@@ -12,3 +12,2 @@ /// <reference types="react" /> | ||
import type { PresenceMotionSlotProps } from '@fluentui/react-motion'; | ||
import { Provider } from 'react'; | ||
import * as React_2 from 'react'; | ||
@@ -249,3 +248,3 @@ import { ReactElement } from 'react'; | ||
export declare const DialogSurfaceProvider: Provider<boolean | undefined>; | ||
export declare const DialogSurfaceProvider: React_2.Provider<boolean | undefined>; | ||
@@ -252,0 +251,0 @@ export declare type DialogSurfaceSlots = { |
@@ -11,24 +11,3 @@ "use strict"; | ||
}); | ||
const _reactmotion = require("@fluentui/react-motion"); | ||
const keyframes = [ | ||
{ | ||
opacity: 0 | ||
}, | ||
{ | ||
opacity: 1 | ||
} | ||
]; | ||
const DialogBackdropMotion = (0, _reactmotion.createPresenceComponent)({ | ||
enter: { | ||
keyframes, | ||
easing: _reactmotion.motionTokens.curveLinear, | ||
duration: _reactmotion.motionTokens.durationGentle | ||
}, | ||
exit: { | ||
keyframes: [ | ||
...keyframes | ||
].reverse(), | ||
easing: _reactmotion.motionTokens.curveLinear, | ||
duration: _reactmotion.motionTokens.durationGentle | ||
} | ||
}); | ||
const _reactmotioncomponentspreview = require("@fluentui/react-motion-components-preview"); | ||
const DialogBackdropMotion = _reactmotioncomponentspreview.FadeRelaxed; |
@@ -22,9 +22,10 @@ "use strict"; | ||
}); | ||
const _react = require("react"); | ||
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard"); | ||
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react")); | ||
const defaultContextValue = false; | ||
const DialogSurfaceContext = /*#__PURE__*/ (0, _react.createContext)(undefined); | ||
const DialogSurfaceContext = /*#__PURE__*/ _react.createContext(undefined); | ||
const DialogSurfaceProvider = DialogSurfaceContext.Provider; | ||
const useDialogSurfaceContext_unstable = ()=>{ | ||
var _useContext; | ||
return (_useContext = (0, _react.useContext)(DialogSurfaceContext)) !== null && _useContext !== void 0 ? _useContext : defaultContextValue; | ||
var _React_useContext; | ||
return (_React_useContext = _react.useContext(DialogSurfaceContext)) !== null && _React_useContext !== void 0 ? _React_useContext : defaultContextValue; | ||
}; |
@@ -11,4 +11,5 @@ "use strict"; | ||
}); | ||
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard"); | ||
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react")); | ||
const _reactsharedcontexts = require("@fluentui/react-shared-contexts"); | ||
const _react = require("react"); | ||
const _useDisableBodyScrollstyles = require("./useDisableBodyScroll.styles"); | ||
@@ -19,3 +20,3 @@ function useDisableBodyScroll() { | ||
const { targetDocument } = (0, _reactsharedcontexts.useFluent_unstable)(); | ||
const disableBodyScroll = (0, _react.useCallback)(()=>{ | ||
const disableBodyScroll = _react.useCallback(()=>{ | ||
var _targetDocument_defaultView; | ||
@@ -39,3 +40,3 @@ if (!targetDocument) { | ||
]); | ||
const enableBodyScroll = (0, _react.useCallback)(()=>{ | ||
const enableBodyScroll = _react.useCallback(()=>{ | ||
if (!targetDocument) { | ||
@@ -42,0 +43,0 @@ return; |
@@ -1,23 +0,2 @@ | ||
import { createPresenceComponent, motionTokens } from '@fluentui/react-motion'; | ||
const keyframes = [ | ||
{ | ||
opacity: 0 | ||
}, | ||
{ | ||
opacity: 1 | ||
} | ||
]; | ||
export const DialogBackdropMotion = createPresenceComponent({ | ||
enter: { | ||
keyframes, | ||
easing: motionTokens.curveLinear, | ||
duration: motionTokens.durationGentle | ||
}, | ||
exit: { | ||
keyframes: [ | ||
...keyframes | ||
].reverse(), | ||
easing: motionTokens.curveLinear, | ||
duration: motionTokens.durationGentle | ||
} | ||
}); | ||
import { FadeRelaxed } from '@fluentui/react-motion-components-preview'; | ||
export const DialogBackdropMotion = FadeRelaxed; |
@@ -1,8 +0,8 @@ | ||
import { createContext, useContext } from 'react'; | ||
import * as React from 'react'; | ||
const defaultContextValue = false; | ||
export const DialogSurfaceContext = createContext(undefined); | ||
export const DialogSurfaceContext = React.createContext(undefined); | ||
export const DialogSurfaceProvider = DialogSurfaceContext.Provider; | ||
export const useDialogSurfaceContext_unstable = ()=>{ | ||
var _useContext; | ||
return (_useContext = useContext(DialogSurfaceContext)) !== null && _useContext !== void 0 ? _useContext : defaultContextValue; | ||
var _React_useContext; | ||
return (_React_useContext = React.useContext(DialogSurfaceContext)) !== null && _React_useContext !== void 0 ? _React_useContext : defaultContextValue; | ||
}; |
@@ -0,3 +1,3 @@ | ||
import * as React from 'react'; | ||
import { useFluent_unstable } from '@fluentui/react-shared-contexts'; | ||
import { useCallback } from 'react'; | ||
import { useBodyNoScrollStyles, useHTMLNoScrollStyles } from './useDisableBodyScroll.styles'; | ||
@@ -11,3 +11,3 @@ /** | ||
const { targetDocument } = useFluent_unstable(); | ||
const disableBodyScroll = useCallback(()=>{ | ||
const disableBodyScroll = React.useCallback(()=>{ | ||
var _targetDocument_defaultView; | ||
@@ -32,3 +32,3 @@ if (!targetDocument) { | ||
]); | ||
const enableBodyScroll = useCallback(()=>{ | ||
const enableBodyScroll = React.useCallback(()=>{ | ||
if (!targetDocument) { | ||
@@ -35,0 +35,0 @@ return; |
{ | ||
"name": "@fluentui/react-dialog", | ||
"version": "9.11.21", | ||
"version": "9.11.22", | ||
"description": "Dialog component for Fluent UI React", | ||
@@ -31,3 +31,4 @@ "main": "lib-commonjs/index.js", | ||
"@fluentui/react-context-selector": "^9.1.69", | ||
"@fluentui/react-motion": "^9.6.1", | ||
"@fluentui/react-motion": "^9.6.2", | ||
"@fluentui/react-motion-components-preview": "^0.3.1", | ||
"@fluentui/react-shared-contexts": "^9.21.0", | ||
@@ -34,0 +35,0 @@ "@fluentui/react-aria": "^9.13.9", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
468381
18
3182
+ Added@fluentui/react-motion-components-preview@0.3.1(transitive)