@fluentui/react-popover
Advanced tools
Comparing version 9.0.0-alpha.48 to 9.0.0-alpha.49
@@ -5,3 +5,78 @@ { | ||
{ | ||
"date": "Thu, 23 Sep 2021 08:19:56 GMT", | ||
"date": "Fri, 24 Sep 2021 09:16:15 GMT", | ||
"tag": "@fluentui/react-popover_v9.0.0-alpha.49", | ||
"version": "9.0.0-alpha.49", | ||
"comments": { | ||
"prerelease": [ | ||
{ | ||
"author": "lingfangao@hotmail.com", | ||
"package": "@fluentui/react-popover", | ||
"comment": "fix(Popover): Remove leftover defaultProps and fix trigger props merge", | ||
"commit": "0d26909912889432060fd4c87b2f4a45017e1532" | ||
}, | ||
{ | ||
"author": "gcox@microsoft.com", | ||
"package": "@fluentui/react-popover", | ||
"comment": "Updated PopoverProps for consistency", | ||
"commit": "0d26909912889432060fd4c87b2f4a45017e1532" | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@fluentui/react-popover", | ||
"comment": "Bump @fluentui/react-context-selector to v9.0.0-alpha.35", | ||
"commit": "0d26909912889432060fd4c87b2f4a45017e1532" | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@fluentui/react-popover", | ||
"comment": "Bump @fluentui/react-make-styles to v9.0.0-alpha.72", | ||
"commit": "0d26909912889432060fd4c87b2f4a45017e1532" | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@fluentui/react-popover", | ||
"comment": "Bump @fluentui/react-portal to v9.0.0-alpha.54", | ||
"commit": "0d26909912889432060fd4c87b2f4a45017e1532" | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@fluentui/react-popover", | ||
"comment": "Bump @fluentui/react-positioning to v9.0.0-alpha.60", | ||
"commit": "0d26909912889432060fd4c87b2f4a45017e1532" | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@fluentui/react-popover", | ||
"comment": "Bump @fluentui/react-tabster to v9.0.0-alpha.66", | ||
"commit": "0d26909912889432060fd4c87b2f4a45017e1532" | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@fluentui/react-popover", | ||
"comment": "Bump @fluentui/react-utilities to v9.0.0-alpha.52", | ||
"commit": "0d26909912889432060fd4c87b2f4a45017e1532" | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@fluentui/react-popover", | ||
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-alpha.54", | ||
"commit": "0d26909912889432060fd4c87b2f4a45017e1532" | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@fluentui/react-popover", | ||
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.47", | ||
"commit": "0d26909912889432060fd4c87b2f4a45017e1532" | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@fluentui/react-popover", | ||
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.16", | ||
"commit": "0d26909912889432060fd4c87b2f4a45017e1532" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Thu, 23 Sep 2021 08:21:34 GMT", | ||
"tag": "@fluentui/react-popover_v9.0.0-alpha.48", | ||
@@ -8,0 +83,0 @@ "version": "9.0.0-alpha.48", |
# Change Log - @fluentui/react-popover | ||
This log was last generated on Thu, 23 Sep 2021 08:19:56 GMT and should not be manually modified. | ||
This log was last generated on Fri, 24 Sep 2021 09:16:15 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## [9.0.0-alpha.49](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.0.0-alpha.49) | ||
Fri, 24 Sep 2021 09:16:15 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.0-alpha.48..@fluentui/react-popover_v9.0.0-alpha.49) | ||
### Changes | ||
- fix(Popover): Remove leftover defaultProps and fix trigger props merge ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by lingfangao@hotmail.com) | ||
- Updated PopoverProps for consistency ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by gcox@microsoft.com) | ||
- Bump @fluentui/react-context-selector to v9.0.0-alpha.35 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball) | ||
- Bump @fluentui/react-make-styles to v9.0.0-alpha.72 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball) | ||
- Bump @fluentui/react-portal to v9.0.0-alpha.54 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball) | ||
- Bump @fluentui/react-positioning to v9.0.0-alpha.60 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball) | ||
- Bump @fluentui/react-tabster to v9.0.0-alpha.66 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball) | ||
- Bump @fluentui/react-utilities to v9.0.0-alpha.52 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball) | ||
- Bump @fluentui/babel-make-styles to v9.0.0-alpha.54 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball) | ||
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.47 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball) | ||
- Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.16 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball) | ||
## [9.0.0-alpha.48](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.0.0-alpha.48) | ||
Thu, 23 Sep 2021 08:19:56 GMT | ||
Thu, 23 Sep 2021 08:21:34 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.0-alpha.47..@fluentui/react-popover_v9.0.0-alpha.48) | ||
@@ -11,0 +30,0 @@ |
@@ -63,12 +63,7 @@ import type { ComponentProps } from '@fluentui/react-utilities'; | ||
/** | ||
* Uses brand colour as background | ||
* Mutually exclusive with `inverted` | ||
* A popover can appear styled with brand or inverted. | ||
* When not specified, the default style is used. | ||
*/ | ||
brand?: boolean; | ||
appearance?: 'brand' | 'inverted'; | ||
/** | ||
* Inverts the foreground/background colour of the popover | ||
* Mutually exclusive with `brand` | ||
*/ | ||
inverted?: boolean; | ||
/** | ||
* Should trap focus | ||
@@ -88,3 +83,3 @@ */ | ||
*/ | ||
export declare type PopoverContextValue = Pick<PopoverState, 'open' | 'setOpen' | 'triggerRef' | 'contentRef' | 'openOnHover' | 'openOnContext' | 'mountNode' | 'noArrow' | 'arrowRef' | 'size' | 'brand' | 'inverted' | 'trapFocus'>; | ||
export declare type PopoverContextValue = Pick<PopoverState, 'open' | 'setOpen' | 'triggerRef' | 'contentRef' | 'openOnHover' | 'openOnContext' | 'mountNode' | 'noArrow' | 'arrowRef' | 'size' | 'appearance' | 'trapFocus'>; | ||
@@ -178,3 +173,3 @@ /** | ||
*/ | ||
export declare type PopoverSurfaceState = ComponentState<PopoverSurfaceSlots> & Pick<PopoverContextValue, 'open' | 'mountNode' | 'noArrow' | 'size' | 'brand' | 'inverted' | 'arrowRef'> & { | ||
export declare type PopoverSurfaceState = ComponentState<PopoverSurfaceSlots> & Pick<PopoverContextValue, 'open' | 'mountNode' | 'noArrow' | 'size' | 'appearance' | 'arrowRef'> & { | ||
/** | ||
@@ -225,7 +220,6 @@ * CSS class for the arrow element | ||
* @param props - props from this instance of Popover | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
export declare const usePopover: (props: PopoverProps, defaultProps?: PopoverProps | undefined) => PopoverState; | ||
export declare const usePopover: (props: PopoverProps) => PopoverState; | ||
export declare const usePopoverContext: <T>(selector: ContextSelector<Pick<PopoverState, "mountNode" | "open" | "setOpen" | "triggerRef" | "contentRef" | "openOnHover" | "openOnContext" | "noArrow" | "arrowRef" | "size" | "brand" | "inverted" | "trapFocus">, T>) => T; | ||
export declare const usePopoverContext: <T>(selector: ContextSelector<Pick<PopoverState, "mountNode" | "open" | "setOpen" | "triggerRef" | "contentRef" | "openOnHover" | "openOnContext" | "noArrow" | "arrowRef" | "size" | "appearance" | "trapFocus">, T>) => T; | ||
@@ -240,3 +234,2 @@ /** | ||
* @param ref - reference to root HTMLDivElement of PopoverSurface | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
@@ -257,6 +250,5 @@ export declare const usePopoverSurface: (props: PopoverSurfaceProps, ref: React_2.Ref<HTMLDivElement>) => PopoverSurfaceState; | ||
* @param props - props from this instance of PopoverTrigger | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
export declare const usePopoverTrigger: (props: PopoverTriggerProps, defaultProps?: PopoverTriggerProps | undefined) => PopoverTriggerState; | ||
export declare const usePopoverTrigger: (props: PopoverTriggerProps) => PopoverTriggerState; | ||
export { } |
@@ -40,12 +40,7 @@ import * as React from 'react'; | ||
/** | ||
* Uses brand colour as background | ||
* Mutually exclusive with `inverted` | ||
* A popover can appear styled with brand or inverted. | ||
* When not specified, the default style is used. | ||
*/ | ||
brand?: boolean; | ||
appearance?: 'brand' | 'inverted'; | ||
/** | ||
* Inverts the foreground/background colour of the popover | ||
* Mutually exclusive with `brand` | ||
*/ | ||
inverted?: boolean; | ||
/** | ||
* Should trap focus | ||
@@ -52,0 +47,0 @@ */ |
@@ -27,4 +27,3 @@ "use strict"; | ||
noArrow = state.noArrow, | ||
brand = state.brand, | ||
inverted = state.inverted, | ||
appearance = state.appearance, | ||
trapFocus = state.trapFocus; | ||
@@ -43,4 +42,3 @@ return React.createElement(popoverContext_1.PopoverContext.Provider, { | ||
noArrow: noArrow, | ||
brand: brand, | ||
inverted: inverted, | ||
appearance: appearance, | ||
trapFocus: trapFocus | ||
@@ -47,0 +45,0 @@ } |
@@ -9,4 +9,3 @@ import type { PopoverProps, PopoverState } from './Popover.types'; | ||
* @param props - props from this instance of Popover | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
export declare const usePopover: (props: PopoverProps, defaultProps?: PopoverProps | undefined) => PopoverState; | ||
export declare const usePopover: (props: PopoverProps) => PopoverState; |
@@ -28,7 +28,6 @@ "use strict"; | ||
* @param props - props from this instance of Popover | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
var usePopover = function (props, defaultProps) { | ||
var usePopover = function (props) { | ||
var _a = react_positioning_1.usePopperMouseTarget(), | ||
@@ -35,0 +34,0 @@ contextTarget = _a[0], |
@@ -16,3 +16,3 @@ import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities'; | ||
*/ | ||
export declare type PopoverSurfaceState = ComponentState<PopoverSurfaceSlots> & Pick<PopoverContextValue, 'open' | 'mountNode' | 'noArrow' | 'size' | 'brand' | 'inverted' | 'arrowRef'> & { | ||
export declare type PopoverSurfaceState = ComponentState<PopoverSurfaceSlots> & Pick<PopoverContextValue, 'open' | 'mountNode' | 'noArrow' | 'size' | 'appearance' | 'arrowRef'> & { | ||
/** | ||
@@ -19,0 +19,0 @@ * CSS class for the arrow element |
@@ -12,4 +12,3 @@ import * as React from 'react'; | ||
* @param ref - reference to root HTMLDivElement of PopoverSurface | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
export declare const usePopoverSurface: (props: PopoverSurfaceProps, ref: React.Ref<HTMLDivElement>) => PopoverSurfaceState; |
@@ -27,3 +27,2 @@ "use strict"; | ||
* @param ref - reference to root HTMLDivElement of PopoverSurface | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
@@ -56,8 +55,5 @@ | ||
}); | ||
var brand = popoverContext_1.usePopoverContext(function (context) { | ||
return context.brand; | ||
var appearance = popoverContext_1.usePopoverContext(function (context) { | ||
return context.appearance; | ||
}); | ||
var inverted = popoverContext_1.usePopoverContext(function (context) { | ||
return context.inverted; | ||
}); | ||
var trapFocus = popoverContext_1.usePopoverContext(function (context) { | ||
@@ -69,6 +65,4 @@ return context.trapFocus; | ||
}).modalAttributes; | ||
var state = tslib_1.__assign(tslib_1.__assign({ | ||
brand: brand, | ||
inverted: inverted, | ||
var state = { | ||
appearance: appearance, | ||
noArrow: noArrow, | ||
@@ -78,4 +72,3 @@ size: size, | ||
open: open, | ||
mountNode: mountNode | ||
}, props), { | ||
mountNode: mountNode, | ||
components: { | ||
@@ -88,4 +81,3 @@ root: 'div' | ||
}, modalAttributes), props)) | ||
}); | ||
}; | ||
var _a = state.root, | ||
@@ -92,0 +84,0 @@ onMouseEnterOriginal = _a.onMouseEnter, |
@@ -92,3 +92,3 @@ "use strict"; | ||
var styles = useStyles(); | ||
state.root.className = react_make_styles_1.mergeClasses(styles.root, state.size === 'small' && styles.smallPadding, state.size === 'medium' && styles.mediumPadding, state.size === 'large' && styles.largePadding, state.inverted && styles.inverted, state.brand && styles.brand, state.root.className); | ||
state.root.className = react_make_styles_1.mergeClasses(styles.root, state.size === 'small' && styles.smallPadding, state.size === 'medium' && styles.mediumPadding, state.size === 'large' && styles.largePadding, state.appearance === 'inverted' && styles.inverted, state.appearance === 'brand' && styles.brand, state.root.className); | ||
state.arrowClassName = react_make_styles_1.mergeClasses(styles.arrow, state.size === 'small' ? styles.smallArrow : styles.mediumLargeArrow); | ||
@@ -95,0 +95,0 @@ return state; |
@@ -9,4 +9,3 @@ import type { PopoverTriggerProps, PopoverTriggerState } from './PopoverTrigger.types'; | ||
* @param props - props from this instance of PopoverTrigger | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
export declare const usePopoverTrigger: (props: PopoverTriggerProps, defaultProps?: PopoverTriggerProps | undefined) => PopoverTriggerState; | ||
export declare const usePopoverTrigger: (props: PopoverTriggerProps) => PopoverTriggerState; |
@@ -24,7 +24,6 @@ "use strict"; | ||
* @param props - props from this instance of PopoverTrigger | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
var usePopoverTrigger = function (props, defaultProps) { | ||
var usePopoverTrigger = function (props) { | ||
var setOpen = popoverContext_1.usePopoverContext(function (context) { | ||
@@ -99,4 +98,5 @@ return context.setOpen; | ||
return { | ||
children: React.cloneElement(child, tslib_1.__assign({ | ||
'aria-haspopup': 'true', | ||
children: React.cloneElement(child, tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, triggerAttributes), { | ||
'aria-haspopup': 'true' | ||
}), child.props), { | ||
onClick: onClick, | ||
@@ -108,3 +108,3 @@ onMouseEnter: onMouseEnter, | ||
ref: react_utilities_1.useMergedRefs(child.ref, triggerRef) | ||
}, triggerAttributes)) | ||
})) | ||
}; | ||
@@ -111,0 +111,0 @@ }; |
@@ -7,3 +7,3 @@ import type { ContextSelector, Context } from '@fluentui/react-context-selector'; | ||
*/ | ||
export declare type PopoverContextValue = Pick<PopoverState, 'open' | 'setOpen' | 'triggerRef' | 'contentRef' | 'openOnHover' | 'openOnContext' | 'mountNode' | 'noArrow' | 'arrowRef' | 'size' | 'brand' | 'inverted' | 'trapFocus'>; | ||
export declare const usePopoverContext: <T>(selector: ContextSelector<Pick<PopoverState, "mountNode" | "open" | "setOpen" | "triggerRef" | "contentRef" | "openOnHover" | "openOnContext" | "noArrow" | "arrowRef" | "size" | "brand" | "inverted" | "trapFocus">, T>) => T; | ||
export declare type PopoverContextValue = Pick<PopoverState, 'open' | 'setOpen' | 'triggerRef' | 'contentRef' | 'openOnHover' | 'openOnContext' | 'mountNode' | 'noArrow' | 'arrowRef' | 'size' | 'appearance' | 'trapFocus'>; | ||
export declare const usePopoverContext: <T>(selector: ContextSelector<Pick<PopoverState, "mountNode" | "open" | "setOpen" | "triggerRef" | "contentRef" | "openOnHover" | "openOnContext" | "noArrow" | "arrowRef" | "size" | "appearance" | "trapFocus">, T>) => T; |
@@ -40,12 +40,7 @@ import * as React from 'react'; | ||
/** | ||
* Uses brand colour as background | ||
* Mutually exclusive with `inverted` | ||
* A popover can appear styled with brand or inverted. | ||
* When not specified, the default style is used. | ||
*/ | ||
brand?: boolean; | ||
appearance?: 'brand' | 'inverted'; | ||
/** | ||
* Inverts the foreground/background colour of the popover | ||
* Mutually exclusive with `brand` | ||
*/ | ||
inverted?: boolean; | ||
/** | ||
* Should trap focus | ||
@@ -52,0 +47,0 @@ */ |
@@ -18,4 +18,3 @@ import * as React from 'react'; | ||
noArrow = state.noArrow, | ||
brand = state.brand, | ||
inverted = state.inverted, | ||
appearance = state.appearance, | ||
trapFocus = state.trapFocus; | ||
@@ -34,4 +33,3 @@ return /*#__PURE__*/React.createElement(PopoverContext.Provider, { | ||
noArrow: noArrow, | ||
brand: brand, | ||
inverted: inverted, | ||
appearance: appearance, | ||
trapFocus: trapFocus | ||
@@ -38,0 +36,0 @@ } |
@@ -9,4 +9,3 @@ import type { PopoverProps, PopoverState } from './Popover.types'; | ||
* @param props - props from this instance of Popover | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
export declare const usePopover: (props: PopoverProps, defaultProps?: PopoverProps | undefined) => PopoverState; | ||
export declare const usePopover: (props: PopoverProps) => PopoverState; |
@@ -15,6 +15,5 @@ import { __assign } from "tslib"; | ||
* @param props - props from this instance of Popover | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
export var usePopover = function (props, defaultProps) { | ||
export var usePopover = function (props) { | ||
var _a = usePopperMouseTarget(), | ||
@@ -21,0 +20,0 @@ contextTarget = _a[0], |
@@ -16,3 +16,3 @@ import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities'; | ||
*/ | ||
export declare type PopoverSurfaceState = ComponentState<PopoverSurfaceSlots> & Pick<PopoverContextValue, 'open' | 'mountNode' | 'noArrow' | 'size' | 'brand' | 'inverted' | 'arrowRef'> & { | ||
export declare type PopoverSurfaceState = ComponentState<PopoverSurfaceSlots> & Pick<PopoverContextValue, 'open' | 'mountNode' | 'noArrow' | 'size' | 'appearance' | 'arrowRef'> & { | ||
/** | ||
@@ -19,0 +19,0 @@ * CSS class for the arrow element |
@@ -12,4 +12,3 @@ import * as React from 'react'; | ||
* @param ref - reference to root HTMLDivElement of PopoverSurface | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
export declare const usePopoverSurface: (props: PopoverSurfaceProps, ref: React.Ref<HTMLDivElement>) => PopoverSurfaceState; |
@@ -15,3 +15,2 @@ import { __assign } from "tslib"; | ||
* @param ref - reference to root HTMLDivElement of PopoverSurface | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
@@ -44,8 +43,5 @@ | ||
}); | ||
var brand = usePopoverContext(function (context) { | ||
return context.brand; | ||
var appearance = usePopoverContext(function (context) { | ||
return context.appearance; | ||
}); | ||
var inverted = usePopoverContext(function (context) { | ||
return context.inverted; | ||
}); | ||
var trapFocus = usePopoverContext(function (context) { | ||
@@ -57,6 +53,4 @@ return context.trapFocus; | ||
}).modalAttributes; | ||
var state = __assign(__assign({ | ||
brand: brand, | ||
inverted: inverted, | ||
var state = { | ||
appearance: appearance, | ||
noArrow: noArrow, | ||
@@ -66,4 +60,3 @@ size: size, | ||
open: open, | ||
mountNode: mountNode | ||
}, props), { | ||
mountNode: mountNode, | ||
components: { | ||
@@ -76,4 +69,3 @@ root: 'div' | ||
}, modalAttributes), props)) | ||
}); | ||
}; | ||
var _a = state.root, | ||
@@ -80,0 +72,0 @@ onMouseEnterOriginal = _a.onMouseEnter, |
@@ -84,3 +84,3 @@ import { __styles, mergeClasses } from '@fluentui/react-make-styles'; | ||
var styles = useStyles(); | ||
state.root.className = mergeClasses(styles.root, state.size === 'small' && styles.smallPadding, state.size === 'medium' && styles.mediumPadding, state.size === 'large' && styles.largePadding, state.inverted && styles.inverted, state.brand && styles.brand, state.root.className); | ||
state.root.className = mergeClasses(styles.root, state.size === 'small' && styles.smallPadding, state.size === 'medium' && styles.mediumPadding, state.size === 'large' && styles.largePadding, state.appearance === 'inverted' && styles.inverted, state.appearance === 'brand' && styles.brand, state.root.className); | ||
state.arrowClassName = mergeClasses(styles.arrow, state.size === 'small' ? styles.smallArrow : styles.mediumLargeArrow); | ||
@@ -87,0 +87,0 @@ return state; |
@@ -9,4 +9,3 @@ import type { PopoverTriggerProps, PopoverTriggerState } from './PopoverTrigger.types'; | ||
* @param props - props from this instance of PopoverTrigger | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
export declare const usePopoverTrigger: (props: PopoverTriggerProps, defaultProps?: PopoverTriggerProps | undefined) => PopoverTriggerState; | ||
export declare const usePopoverTrigger: (props: PopoverTriggerProps) => PopoverTriggerState; |
@@ -13,6 +13,5 @@ import { __assign } from "tslib"; | ||
* @param props - props from this instance of PopoverTrigger | ||
* @param defaultProps - (optional) default prop values provided by the implementing type | ||
*/ | ||
export var usePopoverTrigger = function (props, defaultProps) { | ||
export var usePopoverTrigger = function (props) { | ||
var setOpen = usePopoverContext(function (context) { | ||
@@ -87,4 +86,5 @@ return context.setOpen; | ||
return { | ||
children: /*#__PURE__*/React.cloneElement(child, __assign({ | ||
'aria-haspopup': 'true', | ||
children: /*#__PURE__*/React.cloneElement(child, __assign(__assign(__assign(__assign({}, triggerAttributes), { | ||
'aria-haspopup': 'true' | ||
}), child.props), { | ||
onClick: onClick, | ||
@@ -96,5 +96,5 @@ onMouseEnter: onMouseEnter, | ||
ref: useMergedRefs(child.ref, triggerRef) | ||
}, triggerAttributes)) | ||
})) | ||
}; | ||
}; | ||
//# sourceMappingURL=usePopoverTrigger.js.map |
@@ -7,3 +7,3 @@ import type { ContextSelector, Context } from '@fluentui/react-context-selector'; | ||
*/ | ||
export declare type PopoverContextValue = Pick<PopoverState, 'open' | 'setOpen' | 'triggerRef' | 'contentRef' | 'openOnHover' | 'openOnContext' | 'mountNode' | 'noArrow' | 'arrowRef' | 'size' | 'brand' | 'inverted' | 'trapFocus'>; | ||
export declare const usePopoverContext: <T>(selector: ContextSelector<Pick<PopoverState, "mountNode" | "open" | "setOpen" | "triggerRef" | "contentRef" | "openOnHover" | "openOnContext" | "noArrow" | "arrowRef" | "size" | "brand" | "inverted" | "trapFocus">, T>) => T; | ||
export declare type PopoverContextValue = Pick<PopoverState, 'open' | 'setOpen' | 'triggerRef' | 'contentRef' | 'openOnHover' | 'openOnContext' | 'mountNode' | 'noArrow' | 'arrowRef' | 'size' | 'appearance' | 'trapFocus'>; | ||
export declare const usePopoverContext: <T>(selector: ContextSelector<Pick<PopoverState, "mountNode" | "open" | "setOpen" | "triggerRef" | "contentRef" | "openOnHover" | "openOnContext" | "noArrow" | "arrowRef" | "size" | "appearance" | "trapFocus">, T>) => T; |
{ | ||
"name": "@fluentui/react-popover", | ||
"version": "9.0.0-alpha.48", | ||
"version": "9.0.0-alpha.49", | ||
"description": "Popover component for Fluent UI", | ||
@@ -29,7 +29,7 @@ "main": "lib-commonjs/index.js", | ||
"devDependencies": { | ||
"@fluentui/babel-make-styles": "9.0.0-alpha.53", | ||
"@fluentui/babel-make-styles": "9.0.0-alpha.54", | ||
"@fluentui/eslint-plugin": "*", | ||
"@fluentui/jest-serializer-make-styles": "9.0.0-alpha.46", | ||
"@fluentui/jest-serializer-make-styles": "9.0.0-alpha.47", | ||
"@fluentui/react-conformance": "*", | ||
"@fluentui/react-conformance-make-styles": "9.0.0-alpha.15", | ||
"@fluentui/react-conformance-make-styles": "9.0.0-alpha.16", | ||
"@fluentui/scripts": "^1.0.0", | ||
@@ -48,9 +48,9 @@ "@types/enzyme": "3.10.3", | ||
"dependencies": { | ||
"@fluentui/react-context-selector": "9.0.0-alpha.34", | ||
"@fluentui/react-make-styles": "9.0.0-alpha.71", | ||
"@fluentui/react-portal": "9.0.0-alpha.53", | ||
"@fluentui/react-positioning": "9.0.0-alpha.59", | ||
"@fluentui/react-context-selector": "9.0.0-alpha.35", | ||
"@fluentui/react-make-styles": "9.0.0-alpha.72", | ||
"@fluentui/react-portal": "9.0.0-alpha.54", | ||
"@fluentui/react-positioning": "9.0.0-alpha.60", | ||
"@fluentui/react-shared-contexts": "9.0.0-alpha.25", | ||
"@fluentui/react-tabster": "9.0.0-alpha.65", | ||
"@fluentui/react-utilities": "9.0.0-alpha.51", | ||
"@fluentui/react-tabster": "9.0.0-alpha.66", | ||
"@fluentui/react-utilities": "9.0.0-alpha.52", | ||
"tslib": "^2.1.0" | ||
@@ -57,0 +57,0 @@ }, |
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
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
305517
4067
+ Added@fluentui/react-context-selector@9.0.0-alpha.35(transitive)
+ Added@fluentui/react-make-styles@9.0.0-alpha.72(transitive)
+ Added@fluentui/react-portal@9.0.0-alpha.54(transitive)
+ Added@fluentui/react-positioning@9.0.0-alpha.60(transitive)
+ Added@fluentui/react-tabster@9.0.0-alpha.66(transitive)
+ Added@fluentui/react-utilities@9.0.0-alpha.52(transitive)
- Removed@fluentui/react-context-selector@9.0.0-alpha.34(transitive)
- Removed@fluentui/react-make-styles@9.0.0-alpha.71(transitive)
- Removed@fluentui/react-portal@9.0.0-alpha.53(transitive)
- Removed@fluentui/react-positioning@9.0.0-alpha.59(transitive)
- Removed@fluentui/react-tabster@9.0.0-alpha.65(transitive)
- Removed@fluentui/react-utilities@9.0.0-alpha.51(transitive)