@fluentui/react-popover 9.5.15 → 9.7.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +147 -1
- package/CHANGELOG.md +42 -2
- package/lib/Popover.js +0 -1
- package/lib/Popover.js.map +1 -1
- package/lib/PopoverSurface.js +0 -1
- package/lib/PopoverSurface.js.map +1 -1
- package/lib/PopoverTrigger.js +0 -1
- package/lib/PopoverTrigger.js.map +1 -1
- package/lib/components/Popover/Popover.js +3 -5
- package/lib/components/Popover/Popover.js.map +1 -1
- package/lib/components/Popover/Popover.types.js +0 -1
- package/lib/components/Popover/Popover.types.js.map +1 -1
- package/lib/components/Popover/constants.js +1 -2
- package/lib/components/Popover/constants.js.map +1 -1
- package/lib/components/Popover/index.js +0 -1
- package/lib/components/Popover/index.js.map +1 -1
- package/lib/components/Popover/renderPopover.js +21 -39
- package/lib/components/Popover/renderPopover.js.map +1 -1
- package/lib/components/Popover/usePopover.js +165 -156
- package/lib/components/Popover/usePopover.js.map +1 -1
- package/lib/components/PopoverSurface/PopoverSurface.js +5 -7
- package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
- package/lib/components/PopoverSurface/PopoverSurface.types.js +1 -2
- package/lib/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
- package/lib/components/PopoverSurface/index.js +0 -1
- package/lib/components/PopoverSurface/index.js.map +1 -1
- package/lib/components/PopoverSurface/renderPopoverSurface.js +13 -18
- package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
- package/lib/components/PopoverSurface/usePopoverSurface.js +59 -67
- package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
- package/lib/components/PopoverSurface/usePopoverSurfaceStyles.styles.js +25 -3
- package/lib/components/PopoverSurface/usePopoverSurfaceStyles.styles.js.map +1 -1
- package/lib/components/PopoverTrigger/PopoverTrigger.js +3 -5
- package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
- package/lib/components/PopoverTrigger/PopoverTrigger.types.js +0 -1
- package/lib/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
- package/lib/components/PopoverTrigger/index.js +0 -1
- package/lib/components/PopoverTrigger/index.js.map +1 -1
- package/lib/components/PopoverTrigger/renderPopoverTrigger.js +2 -3
- package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
- package/lib/components/PopoverTrigger/usePopoverTrigger.js +57 -64
- package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/popoverContext.js +19 -20
- package/lib/popoverContext.js.map +1 -1
- package/lib-commonjs/Popover.js +0 -3
- package/lib-commonjs/Popover.js.map +1 -1
- package/lib-commonjs/PopoverSurface.js +0 -3
- package/lib-commonjs/PopoverSurface.js.map +1 -1
- package/lib-commonjs/PopoverTrigger.js +0 -3
- package/lib-commonjs/PopoverTrigger.js.map +1 -1
- package/lib-commonjs/components/Popover/Popover.js +1 -3
- package/lib-commonjs/components/Popover/Popover.js.map +1 -1
- package/lib-commonjs/components/Popover/Popover.types.js +0 -3
- package/lib-commonjs/components/Popover/Popover.types.js.map +1 -1
- package/lib-commonjs/components/Popover/constants.js +1 -3
- package/lib-commonjs/components/Popover/constants.js.map +1 -1
- package/lib-commonjs/components/Popover/index.js +0 -3
- package/lib-commonjs/components/Popover/index.js.map +1 -1
- package/lib-commonjs/components/Popover/renderPopover.js +1 -3
- package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
- package/lib-commonjs/components/Popover/usePopover.js +1 -3
- package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/PopoverSurface.js +1 -3
- package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js +0 -3
- package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/index.js +0 -3
- package/lib-commonjs/components/PopoverSurface/index.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js +1 -3
- package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +1 -3
- package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.styles.js +51 -3
- package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.styles.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js +1 -3
- package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js +0 -3
- package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/index.js +0 -3
- package/lib-commonjs/components/PopoverTrigger/index.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js +1 -3
- package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js +1 -3
- package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
- package/lib-commonjs/index.js +0 -3
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/popoverContext.js +2 -4
- package/lib-commonjs/popoverContext.js.map +1 -1
- package/package.json +12 -12
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["popoverContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { PopoverState } from './components/Popover/index';\n\nexport const PopoverContext: Context<PopoverContextValue> = createContext<PopoverContextValue | undefined>(\n undefined,\n) as Context<PopoverContextValue>;\nconst popoverContextDefaultValue: PopoverContextValue = {\n open: false,\n setOpen: () => null,\n toggleOpen: () => null,\n triggerRef: { current: null },\n contentRef: { current: null },\n arrowRef: { current: null },\n openOnContext: false,\n openOnHover: false,\n size: 'medium' as const,\n trapFocus: false,\n inline: false,\n};\n\nexport const PopoverProvider = PopoverContext.Provider;\n\n/**\n * Context shared between Popover and its children components\n */\nexport type PopoverContextValue = Pick<\n PopoverState,\n | 'open'\n | 'toggleOpen'\n | 'setOpen'\n | 'triggerRef'\n | 'contentRef'\n | 'openOnHover'\n | 'openOnContext'\n | 'mountNode'\n | 'withArrow'\n | 'arrowRef'\n | 'size'\n | 'appearance'\n | 'trapFocus'\n | 'inertTrapFocus'\n | 'inline'\n>;\n\nexport const usePopoverContext_unstable = <T>(selector: ContextSelector<PopoverContextValue, T>): T =>\n useContextSelector(PopoverContext, (ctx = popoverContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","PopoverContext","undefined","popoverContextDefaultValue","open","setOpen","toggleOpen","triggerRef","current","contentRef","arrowRef","openOnContext","openOnHover","size","trapFocus","inline","PopoverProvider","Provider","usePopoverContext_unstable","selector","ctx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,iBAA+CF,cAC1DG,WACgC;AAClC,MAAMC,6BAAkD;IACtDC,MAAM,KAAK;IACXC,SAAS,IAAM,IAAI;IACnBC,YAAY,IAAM,IAAI;IACtBC,YAAY;QAAEC,SAAS,IAAI;IAAC;IAC5BC,YAAY;QAAED,SAAS,IAAI;IAAC;IAC5BE,UAAU;QAAEF,SAAS,IAAI;IAAC;IAC1BG,eAAe,KAAK;IACpBC,aAAa,KAAK;IAClBC,MAAM;IACNC,WAAW,KAAK;IAChBC,QAAQ,KAAK;AACf;AAEA,OAAO,MAAMC,kBAAkBf,eAAegB,QAAQ,CAAC;AAwBvD,OAAO,MAAMC,6BAA6B,CAAIC,WAC5CnB,mBAAmBC,gBAAgB,CAACmB,MAAMjB,0BAA0B,GAAKgB,SAASC,MAAM"}
|
package/lib-commonjs/Popover.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["Popover.js"],"sourcesContent":["export * from './components/Popover/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
|
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
6
6
|
_exportStar(require("./components/PopoverSurface/index"), exports);
|
7
|
-
//# sourceMappingURL=PopoverSurface.js.map
|
8
|
-
|
9
|
-
//# sourceMappingURL=PopoverSurface.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["PopoverSurface.js"],"sourcesContent":["export * from './components/PopoverSurface/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
|
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
6
6
|
_exportStar(require("./components/PopoverTrigger/index"), exports);
|
7
|
-
//# sourceMappingURL=PopoverTrigger.js.map
|
8
|
-
|
9
|
-
//# sourceMappingURL=PopoverTrigger.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["PopoverTrigger.js"],"sourcesContent":["export * from './components/PopoverTrigger/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
|
@@ -14,6 +14,4 @@ const Popover = (props)=>{
|
|
14
14
|
const state = (0, _usePopover.usePopover_unstable)(props);
|
15
15
|
return (0, _renderPopover.renderPopover_unstable)(state);
|
16
16
|
};
|
17
|
-
Popover.displayName = 'Popover';
|
18
|
-
|
19
|
-
//# sourceMappingURL=Popover.js.map
|
17
|
+
Popover.displayName = 'Popover';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["Popover.js"],"sourcesContent":["import * as React from 'react';\nimport { usePopover_unstable } from './usePopover';\nimport { renderPopover_unstable } from './renderPopover';\n/**\n * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.\n */ export const Popover = (props)=>{\n const state = usePopover_unstable(props);\n return renderPopover_unstable(state);\n};\nPopover.displayName = 'Popover';\n"],"names":["Popover","props","state","usePopover_unstable","renderPopover_unstable","displayName"],"mappings":";;;;+BAKiBA;;aAAAA;;;6DALM;4BACa;+BACG;AAG5B,MAAMA,UAAU,CAACC,QAAQ;IAChC,MAAMC,QAAQC,IAAAA,+BAAmB,EAACF;IAClC,OAAOG,IAAAA,qCAAsB,EAACF;AAClC;AACAF,QAAQK,WAAW,GAAG"}
|
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
6
6
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
7
|
-
//# sourceMappingURL=Popover.types.js.map
|
8
|
-
|
9
|
-
//# sourceMappingURL=Popover.types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["Popover.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;6DAAuB"}
|
@@ -13,6 +13,4 @@ Object.defineProperty(exports, "popoverSurfaceBorderRadius", {
|
|
13
13
|
enumerable: true,
|
14
14
|
get: ()=>popoverSurfaceBorderRadius
|
15
15
|
});
|
16
|
-
const popoverSurfaceBorderRadius = 4;
|
17
|
-
|
18
|
-
//# sourceMappingURL=constants.js.map
|
16
|
+
const popoverSurfaceBorderRadius = 4;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["constants.js"],"sourcesContent":["/**\n * @internal\n * The default value of the tooltip's border radius (borderRadiusMedium).\n *\n * Unfortunately, Popper requires it to be specified as a variable instead of using CSS.\n * While we could use getComputedStyle, that adds a performance penalty for something that\n * will likely never change.\n */ export const popoverSurfaceBorderRadius = 4;\n"],"names":["popoverSurfaceBorderRadius"],"mappings":"AAAA;;;;;;;CAOC;;;;+BAAgBA;;aAAAA;;AAAN,MAAMA,6BAA6B"}
|
@@ -7,6 +7,3 @@ _exportStar(require("./Popover"), exports);
|
|
7
7
|
_exportStar(require("./Popover.types"), exports);
|
8
8
|
_exportStar(require("./renderPopover"), exports);
|
9
9
|
_exportStar(require("./usePopover"), exports);
|
10
|
-
//# sourceMappingURL=index.js.map
|
11
|
-
|
12
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './Popover';\nexport * from './Popover.types';\nexport * from './renderPopover';\nexport * from './usePopover';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["renderPopover.js"],"sourcesContent":["import * as React from 'react';\nimport { PopoverContext } from '../../popoverContext';\n/**\n * Render the final JSX of Popover\n */ export const renderPopover_unstable = (state)=>{\n const { appearance , arrowRef , contentRef , inline , mountNode , open , openOnContext , openOnHover , setOpen , size , toggleOpen , trapFocus , triggerRef , withArrow , inertTrapFocus } = state;\n return /*#__PURE__*/ React.createElement(PopoverContext.Provider, {\n value: {\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n toggleOpen,\n triggerRef,\n size,\n trapFocus,\n inertTrapFocus,\n withArrow\n }\n }, state.popoverTrigger, state.open && state.popoverSurface);\n};\n"],"names":["renderPopover_unstable","state","appearance","arrowRef","contentRef","inline","mountNode","open","openOnContext","openOnHover","setOpen","size","toggleOpen","trapFocus","triggerRef","withArrow","inertTrapFocus","React","createElement","PopoverContext","Provider","value","popoverTrigger","popoverSurface"],"mappings":";;;;+BAIiBA;;aAAAA;;;6DAJM;gCACQ;AAGpB,MAAMA,yBAAyB,CAACC,QAAQ;IAC/C,MAAM,EAAEC,WAAU,EAAGC,SAAQ,EAAGC,WAAU,EAAGC,OAAM,EAAGC,UAAS,EAAGC,KAAI,EAAGC,cAAa,EAAGC,YAAW,EAAGC,QAAO,EAAGC,KAAI,EAAGC,WAAU,EAAGC,UAAS,EAAGC,WAAU,EAAGC,UAAS,EAAGC,eAAc,EAAG,GAAGf;IAC9L,OAAO,WAAW,GAAGgB,OAAMC,aAAa,CAACC,8BAAc,CAACC,QAAQ,EAAE;QAC9DC,OAAO;YACHnB;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAE;YACAE;YACAH;YACAE;YACAG;YACAD;QACJ;IACJ,GAAGd,MAAMqB,cAAc,EAAErB,MAAMM,IAAI,IAAIN,MAAMsB,cAAc;AAC/D"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Popover/usePopover.js"],"sourcesContent":["import * as React from 'react';\nimport { useControllableState, useEventCallback, useOnClickOutside, useOnScrollOutside } from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { usePositioning, resolvePositioningShorthand, mergeArrowOffset, usePositioningMouseTarget } from '@fluentui/react-positioning';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { arrowHeights } from '../PopoverSurface/index';\nimport { popoverSurfaceBorderRadius } from './constants';\n/**\n * Create the state required to render Popover.\n *\n * The returned state can be modified with hooks such as usePopoverStyles,\n * before being passed to renderPopover_unstable.\n *\n * @param props - props from this instance of Popover\n */\nexport const usePopover_unstable = props => {\n const [contextTarget, setContextTarget] = usePositioningMouseTarget();\n const initialState = {\n size: 'medium',\n contextTarget,\n setContextTarget,\n ...props\n };\n const children = React.Children.toArray(props.children);\n if (process.env.NODE_ENV !== 'production') {\n if (children.length === 0) {\n // eslint-disable-next-line no-console\n console.warn('Popover must contain at least one child');\n }\n if (children.length > 2) {\n // eslint-disable-next-line no-console\n console.warn('Popover must contain at most two children');\n }\n }\n let popoverTrigger = undefined;\n let popoverSurface = undefined;\n if (children.length === 2) {\n popoverTrigger = children[0];\n popoverSurface = children[1];\n } else if (children.length === 1) {\n popoverSurface = children[0];\n }\n const [open, setOpenState] = useOpenState(initialState);\n const setOpenTimeoutRef = React.useRef(0);\n const setOpen = useEventCallback((e, shouldOpen) => {\n clearTimeout(setOpenTimeoutRef.current);\n if (!(e instanceof Event) && e.persist) {\n // < React 17 still uses pooled synthetic events\n e.persist();\n }\n if (e.type === 'mouseleave') {\n var _props_mouseLeaveDelay;\n // FIXME leaking Node timeout type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n setOpenTimeoutRef.current = setTimeout(() => {\n setOpenState(e, shouldOpen);\n }, (_props_mouseLeaveDelay = props.mouseLeaveDelay) !== null && _props_mouseLeaveDelay !== void 0 ? _props_mouseLeaveDelay : 500);\n } else {\n setOpenState(e, shouldOpen);\n }\n });\n // Clear timeout on unmount\n // Setting state after a component unmounts can cause memory leaks\n React.useEffect(() => {\n return () => {\n clearTimeout(setOpenTimeoutRef.current);\n };\n }, []);\n const toggleOpen = React.useCallback(e => {\n setOpen(e, !open);\n }, [setOpen, open]);\n const positioningRefs = usePopoverRefs(initialState);\n const {\n targetDocument\n } = useFluent();\n useOnClickOutside({\n contains: elementContains,\n element: targetDocument,\n callback: ev => setOpen(ev, false),\n refs: [positioningRefs.triggerRef, positioningRefs.contentRef],\n disabled: !open\n });\n // only close on scroll for context, or when closeOnScroll is specified\n const closeOnScroll = initialState.openOnContext || initialState.closeOnScroll;\n useOnScrollOutside({\n contains: elementContains,\n element: targetDocument,\n callback: ev => setOpen(ev, false),\n refs: [positioningRefs.triggerRef, positioningRefs.contentRef],\n disabled: !open || !closeOnScroll\n });\n const {\n findFirstFocusable\n } = useFocusFinders();\n React.useEffect(() => {\n if (props.unstable_disableAutoFocus) {\n return;\n }\n if (open && positioningRefs.contentRef.current) {\n var _positioningRefs_contentRef_current_getAttribute;\n const containerTabIndex = (_positioningRefs_contentRef_current_getAttribute = positioningRefs.contentRef.current.getAttribute('tabIndex')) !== null && _positioningRefs_contentRef_current_getAttribute !== void 0 ? _positioningRefs_contentRef_current_getAttribute : undefined;\n const firstFocusable = isNaN(containerTabIndex) ? findFirstFocusable(positioningRefs.contentRef.current) : positioningRefs.contentRef.current;\n firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();\n }\n }, [findFirstFocusable, open, positioningRefs.contentRef, props.unstable_disableAutoFocus]);\n var _props_inertTrapFocus, _props_inline;\n return {\n ...initialState,\n ...positioningRefs,\n // eslint-disable-next-line deprecation/deprecation\n inertTrapFocus: (_props_inertTrapFocus = props.inertTrapFocus) !== null && _props_inertTrapFocus !== void 0 ? _props_inertTrapFocus : props.legacyTrapFocus === undefined ? false : !props.legacyTrapFocus,\n popoverTrigger,\n popoverSurface,\n open,\n setOpen,\n toggleOpen,\n setContextTarget,\n contextTarget,\n inline: (_props_inline = props.inline) !== null && _props_inline !== void 0 ? _props_inline : false\n };\n};\n/**\n * Creates and manages the Popover open state\n */\nfunction useOpenState(state) {\n const onOpenChange = useEventCallback((e, data) => {\n var _state_onOpenChange;\n return (_state_onOpenChange = state.onOpenChange) === null || _state_onOpenChange === void 0 ? void 0 : _state_onOpenChange.call(state, e, data);\n });\n const [open, setOpenState] = useControllableState({\n state: state.open,\n defaultState: state.defaultOpen,\n initialState: false\n });\n state.open = open !== undefined ? open : state.open;\n const setContextTarget = state.setContextTarget;\n const setOpen = React.useCallback((e, shouldOpen) => {\n if (shouldOpen && e.type === 'contextmenu') {\n setContextTarget(e);\n }\n if (!shouldOpen) {\n setContextTarget(undefined);\n }\n setOpenState(shouldOpen);\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(e, {\n open: shouldOpen\n });\n }, [setOpenState, onOpenChange, setContextTarget]);\n return [open, setOpen];\n}\n/**\n * Creates and sets the necessary trigger, target and content refs used by Popover\n */\nfunction usePopoverRefs(state) {\n const positioningOptions = {\n position: 'above',\n align: 'center',\n arrowPadding: 2 * popoverSurfaceBorderRadius,\n target: state.openOnContext ? state.contextTarget : undefined,\n ...resolvePositioningShorthand(state.positioning)\n };\n // no reason to render arrow when covering the target\n if (positioningOptions.coverTarget) {\n state.withArrow = false;\n }\n if (state.withArrow) {\n positioningOptions.offset = mergeArrowOffset(positioningOptions.offset, arrowHeights[state.size]);\n }\n const {\n targetRef: triggerRef,\n containerRef: contentRef,\n arrowRef\n } = usePositioning(positioningOptions);\n return {\n triggerRef,\n contentRef,\n arrowRef\n };\n}\n//# sourceMappingURL=usePopover.js.map"],"names":["usePopover_unstable","props","contextTarget","setContextTarget","usePositioningMouseTarget","initialState","size","children","React","Children","toArray","process","env","NODE_ENV","length","console","warn","popoverTrigger","undefined","popoverSurface","open","setOpenState","useOpenState","setOpenTimeoutRef","useRef","setOpen","useEventCallback","e","shouldOpen","clearTimeout","current","Event","persist","type","_props_mouseLeaveDelay","setTimeout","mouseLeaveDelay","useEffect","toggleOpen","useCallback","positioningRefs","usePopoverRefs","targetDocument","useFluent","useOnClickOutside","contains","elementContains","element","callback","ev","refs","triggerRef","contentRef","disabled","closeOnScroll","openOnContext","useOnScrollOutside","findFirstFocusable","useFocusFinders","unstable_disableAutoFocus","_positioningRefs_contentRef_current_getAttribute","containerTabIndex","getAttribute","firstFocusable","isNaN","focus","_props_inertTrapFocus","_props_inline","inertTrapFocus","legacyTrapFocus","inline","state","onOpenChange","data","_state_onOpenChange","call","useControllableState","defaultState","defaultOpen","positioningOptions","position","align","arrowPadding","popoverSurfaceBorderRadius","target","resolvePositioningShorthand","positioning","coverTarget","withArrow","offset","mergeArrowOffset","arrowHeights","targetRef","containerRef","arrowRef","usePositioning"],"mappings":";;;;+BAgBaA;;aAAAA;;;6DAhBU;gCACuE;qCAC9C;kCACyD;6BACzE;8BACA;uBACH;2BACc;AASpC,MAAMA,sBAAsBC,CAAAA,QAAS;IAC1C,MAAM,CAACC,eAAeC,iBAAiB,GAAGC,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mBAAmBoE,MAAMpE,gBAAgB;IAC/C,MAAMsB,UAAUjB,OAAM+B,WAAW,CAAC,CAACZ,GAAGC,aAAe;QACnD,IAAIA,cAAcD,EAAEM,IAAI,KAAK,eAAe;YAC1C9B,iBAAiBwB;QACnB,CAAC;QACD,IAAI,CAACC,YAAY;YACfzB,iBAAiBe;QACnB,CAAC;QACDG,aAAaO;QACb4C,iBAAiB,IAAI,IAAIA,iBAAiB,KAAK,IAAI,KAAK,IAAIA,aAAa7C,GAAG;YAC1EP,MAAMQ;QACR,EAAE;IACJ,GAAG;QAACP;QAAcmD;QAAcrE;KAAiB;IACjD,OAAO;QAACiB;QAAMK;KAAQ;AACxB;AACA;;CAEC,GACD,SAASgB,eAAe8B,KAAK,EAAE;IAC7B,MAAMQ,qBAAqB;QACzBC,UAAU;QACVC,OAAO;QACPC,cAAc,IAAIC,qCAA0B;QAC5CC,QAAQb,MAAMhB,aAAa,GAAGgB,MAAMrE,aAAa,GAAGgB,SAAS;QAC7D,GAAGmE,IAAAA,6CAA2B,EAACd,MAAMe,WAAW,CAAC;IACnD;IACA,qDAAqD;IACrD,IAAIP,mBAAmBQ,WAAW,EAAE;QAClChB,MAAMiB,SAAS,GAAG,KAAK;IACzB,CAAC;IACD,IAAIjB,MAAMiB,SAAS,EAAE;QACnBT,mBAAmBU,MAAM,GAAGC,IAAAA,kCAAgB,EAACX,mBAAmBU,MAAM,EAAEE,mBAAY,CAACpB,MAAMjE,IAAI,CAAC;IAClG,CAAC;IACD,MAAM,EACJsF,WAAWzC,WAAU,EACrB0C,cAAczC,WAAU,EACxB0C,SAAQ,EACT,GAAGC,IAAAA,gCAAc,EAAChB;IACnB,OAAO;QACL5B;QACAC;QACA0C;IACF;AACF,EACA,sCAAsC"}
|
1
|
+
{"version":3,"sources":["usePopover.js"],"sourcesContent":["import * as React from 'react';\nimport { useControllableState, useEventCallback, useOnClickOutside, useOnScrollOutside } from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { usePositioning, resolvePositioningShorthand, mergeArrowOffset, usePositioningMouseTarget } from '@fluentui/react-positioning';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { arrowHeights } from '../PopoverSurface/index';\nimport { popoverSurfaceBorderRadius } from './constants';\n/**\n * Create the state required to render Popover.\n *\n * The returned state can be modified with hooks such as usePopoverStyles,\n * before being passed to renderPopover_unstable.\n *\n * @param props - props from this instance of Popover\n */ export const usePopover_unstable = (props)=>{\n const [contextTarget, setContextTarget] = usePositioningMouseTarget();\n const initialState = {\n size: 'medium',\n contextTarget,\n setContextTarget,\n ...props\n };\n const children = React.Children.toArray(props.children);\n if (process.env.NODE_ENV !== 'production') {\n if (children.length === 0) {\n // eslint-disable-next-line no-console\n console.warn('Popover must contain at least one child');\n }\n if (children.length > 2) {\n // eslint-disable-next-line no-console\n console.warn('Popover must contain at most two children');\n }\n }\n let popoverTrigger = undefined;\n let popoverSurface = undefined;\n if (children.length === 2) {\n popoverTrigger = children[0];\n popoverSurface = children[1];\n } else if (children.length === 1) {\n popoverSurface = children[0];\n }\n const [open, setOpenState] = useOpenState(initialState);\n const setOpenTimeoutRef = React.useRef(0);\n const setOpen = useEventCallback((e, shouldOpen)=>{\n clearTimeout(setOpenTimeoutRef.current);\n if (!(e instanceof Event) && e.persist) {\n // < React 17 still uses pooled synthetic events\n e.persist();\n }\n if (e.type === 'mouseleave') {\n var _props_mouseLeaveDelay;\n // FIXME leaking Node timeout type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n setOpenTimeoutRef.current = setTimeout(()=>{\n setOpenState(e, shouldOpen);\n }, (_props_mouseLeaveDelay = props.mouseLeaveDelay) !== null && _props_mouseLeaveDelay !== void 0 ? _props_mouseLeaveDelay : 500);\n } else {\n setOpenState(e, shouldOpen);\n }\n });\n // Clear timeout on unmount\n // Setting state after a component unmounts can cause memory leaks\n React.useEffect(()=>{\n return ()=>{\n clearTimeout(setOpenTimeoutRef.current);\n };\n }, []);\n const toggleOpen = React.useCallback((e)=>{\n setOpen(e, !open);\n }, [\n setOpen,\n open\n ]);\n const positioningRefs = usePopoverRefs(initialState);\n const { targetDocument } = useFluent();\n useOnClickOutside({\n contains: elementContains,\n element: targetDocument,\n callback: (ev)=>setOpen(ev, false),\n refs: [\n positioningRefs.triggerRef,\n positioningRefs.contentRef\n ],\n disabled: !open\n });\n // only close on scroll for context, or when closeOnScroll is specified\n const closeOnScroll = initialState.openOnContext || initialState.closeOnScroll;\n useOnScrollOutside({\n contains: elementContains,\n element: targetDocument,\n callback: (ev)=>setOpen(ev, false),\n refs: [\n positioningRefs.triggerRef,\n positioningRefs.contentRef\n ],\n disabled: !open || !closeOnScroll\n });\n const { findFirstFocusable } = useFocusFinders();\n React.useEffect(()=>{\n if (props.unstable_disableAutoFocus) {\n return;\n }\n if (open && positioningRefs.contentRef.current) {\n var _positioningRefs_contentRef_current_getAttribute;\n const containerTabIndex = (_positioningRefs_contentRef_current_getAttribute = positioningRefs.contentRef.current.getAttribute('tabIndex')) !== null && _positioningRefs_contentRef_current_getAttribute !== void 0 ? _positioningRefs_contentRef_current_getAttribute : undefined;\n const firstFocusable = isNaN(containerTabIndex) ? findFirstFocusable(positioningRefs.contentRef.current) : positioningRefs.contentRef.current;\n firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();\n }\n }, [\n findFirstFocusable,\n open,\n positioningRefs.contentRef,\n props.unstable_disableAutoFocus\n ]);\n var _props_inertTrapFocus, _props_inline;\n return {\n ...initialState,\n ...positioningRefs,\n // eslint-disable-next-line deprecation/deprecation\n inertTrapFocus: (_props_inertTrapFocus = props.inertTrapFocus) !== null && _props_inertTrapFocus !== void 0 ? _props_inertTrapFocus : props.legacyTrapFocus === undefined ? false : !props.legacyTrapFocus,\n popoverTrigger,\n popoverSurface,\n open,\n setOpen,\n toggleOpen,\n setContextTarget,\n contextTarget,\n inline: (_props_inline = props.inline) !== null && _props_inline !== void 0 ? _props_inline : false\n };\n};\n/**\n * Creates and manages the Popover open state\n */ function useOpenState(state) {\n const onOpenChange = useEventCallback((e, data)=>{\n var _state_onOpenChange;\n return (_state_onOpenChange = state.onOpenChange) === null || _state_onOpenChange === void 0 ? void 0 : _state_onOpenChange.call(state, e, data);\n });\n const [open, setOpenState] = useControllableState({\n state: state.open,\n defaultState: state.defaultOpen,\n initialState: false\n });\n state.open = open !== undefined ? open : state.open;\n const setContextTarget = state.setContextTarget;\n const setOpen = React.useCallback((e, shouldOpen)=>{\n if (shouldOpen && e.type === 'contextmenu') {\n setContextTarget(e);\n }\n if (!shouldOpen) {\n setContextTarget(undefined);\n }\n setOpenState(shouldOpen);\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(e, {\n open: shouldOpen\n });\n }, [\n setOpenState,\n onOpenChange,\n setContextTarget\n ]);\n return [\n open,\n setOpen\n ];\n}\n/**\n * Creates and sets the necessary trigger, target and content refs used by Popover\n */ function usePopoverRefs(state) {\n const positioningOptions = {\n position: 'above',\n align: 'center',\n arrowPadding: 2 * popoverSurfaceBorderRadius,\n target: state.openOnContext ? state.contextTarget : undefined,\n ...resolvePositioningShorthand(state.positioning)\n };\n // no reason to render arrow when covering the target\n if (positioningOptions.coverTarget) {\n state.withArrow = false;\n }\n if (state.withArrow) {\n positioningOptions.offset = mergeArrowOffset(positioningOptions.offset, arrowHeights[state.size]);\n }\n const { targetRef: triggerRef , containerRef: contentRef , arrowRef } = usePositioning(positioningOptions);\n return {\n triggerRef,\n contentRef,\n arrowRef\n };\n}\n"],"names":["usePopover_unstable","props","contextTarget","setContextTarget","usePositioningMouseTarget","initialState","size","children","React","Children","toArray","process","env","NODE_ENV","length","console","warn","popoverTrigger","undefined","popoverSurface","open","setOpenState","useOpenState","setOpenTimeoutRef","useRef","setOpen","useEventCallback","e","shouldOpen","clearTimeout","current","Event","persist","type","_props_mouseLeaveDelay","setTimeout","mouseLeaveDelay","useEffect","toggleOpen","useCallback","positioningRefs","usePopoverRefs","targetDocument","useFluent","useOnClickOutside","contains","elementContains","element","callback","ev","refs","triggerRef","contentRef","disabled","closeOnScroll","openOnContext","useOnScrollOutside","findFirstFocusable","useFocusFinders","unstable_disableAutoFocus","_positioningRefs_contentRef_current_getAttribute","containerTabIndex","getAttribute","firstFocusable","isNaN","focus","_props_inertTrapFocus","_props_inline","inertTrapFocus","legacyTrapFocus","inline","state","onOpenChange","data","_state_onOpenChange","call","useControllableState","defaultState","defaultOpen","positioningOptions","position","align","arrowPadding","popoverSurfaceBorderRadius","target","resolvePositioningShorthand","positioning","coverTarget","withArrow","offset","mergeArrowOffset","arrowHeights","targetRef","containerRef","arrowRef","usePositioning"],"mappings":";;;;+BAeiBA;;aAAAA;;;6DAfM;gCACuE;qCAC9C;kCACyD;6BACzE;8BACA;uBACH;2BACc;AAQhC,MAAMA,sBAAsB,CAACC,QAAQ;IAC5C,MAAM,CAACC,eAAeC,iBAAiB,GAAGC,IAAAA,2CAAyB;IACnE,MAAMC,eAAe;QACjBC,MAAM;QACNJ;QACAC;QACA,GAAGF,KAAK;IACZ;IACA,MAAMM,WAAWC,OAAMC,QAAQ,CAACC,OAAO,CAACT,MAAMM,QAAQ;IACtD,IAAII,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,IAAIN,SAASO,MAAM,KAAK,GAAG;YACvB,sCAAsC;YACtCC,QAAQC,IAAI,CAAC;QACjB,CAAC;QACD,IAAIT,SAASO,MAAM,GAAG,GAAG;YACrB,sCAAsC;YACtCC,QAAQC,IAAI,CAAC;QACjB,CAAC;IACL,CAAC;IACD,IAAIC,iBAAiBC;IACrB,IAAIC,iBAAiBD;IACrB,IAAIX,SAASO,MAAM,KAAK,GAAG;QACvBG,iBAAiBV,QAAQ,CAAC,EAAE;QAC5BY,iBAAiBZ,QAAQ,CAAC,EAAE;IAChC,OAAO,IAAIA,SAASO,MAAM,KAAK,GAAG;QAC9BK,iBAAiBZ,QAAQ,CAAC,EAAE;IAChC,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AAMe,WAAW,CAAC;IACrD;IACA,qDAAqD;IACrD,IAAIP,mBAAmBQ,WAAW,EAAE;QAChChB,MAAMiB,SAAS,GAAG,KAAK;IAC3B,CAAC;IACD,IAAIjB,MAAMiB,SAAS,EAAE;QACjBT,mBAAmBU,MAAM,GAAGC,IAAAA,kCAAgB,EAACX,mBAAmBU,MAAM,EAAEE,mBAAY,CAACpB,MAAMjE,IAAI,CAAC;IACpG,CAAC;IACD,MAAM,EAAEsF,WAAWzC,WAAU,EAAG0C,cAAczC,WAAU,EAAG0C,SAAQ,EAAG,GAAGC,IAAAA,gCAAc,EAAChB;IACxF,OAAO;QACH5B;QACAC;QACA0C;IACJ;AACJ"}
|
@@ -18,6 +18,4 @@ const PopoverSurface = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
18
18
|
(0, _reactSharedContexts.useCustomStyleHook_unstable)('usePopoverSurfaceStyles_unstable')(state);
|
19
19
|
return (0, _renderPopoverSurface.renderPopoverSurface_unstable)(state);
|
20
20
|
});
|
21
|
-
PopoverSurface.displayName = 'PopoverSurface';
|
22
|
-
|
23
|
-
//# sourceMappingURL=PopoverSurface.js.map
|
21
|
+
PopoverSurface.displayName = 'PopoverSurface';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["PopoverSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { usePopoverSurface_unstable } from './usePopoverSurface';\nimport { renderPopoverSurface_unstable } from './renderPopoverSurface';\nimport { usePopoverSurfaceStyles_unstable } from './usePopoverSurfaceStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * PopoverSurface component renders react children in a positioned box\n */ export const PopoverSurface = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = usePopoverSurface_unstable(props, ref);\n usePopoverSurfaceStyles_unstable(state);\n useCustomStyleHook_unstable('usePopoverSurfaceStyles_unstable')(state);\n return renderPopoverSurface_unstable(state);\n});\nPopoverSurface.displayName = 'PopoverSurface';\n"],"names":["PopoverSurface","React","forwardRef","props","ref","state","usePopoverSurface_unstable","usePopoverSurfaceStyles_unstable","useCustomStyleHook_unstable","renderPopoverSurface_unstable","displayName"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;mCACoB;sCACG;+CACG;qCACL;AAGjC,MAAMA,iBAAiB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IAC3E,MAAMC,QAAQC,IAAAA,6CAA0B,EAACH,OAAOC;IAChDG,IAAAA,+DAAgC,EAACF;IACjCG,IAAAA,gDAA2B,EAAC,oCAAoCH;IAChE,OAAOI,IAAAA,mDAA6B,EAACJ;AACzC;AACAL,eAAeU,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
@@ -8,6 +8,3 @@ _exportStar(require("./PopoverSurface.types"), exports);
|
|
8
8
|
_exportStar(require("./renderPopoverSurface"), exports);
|
9
9
|
_exportStar(require("./usePopoverSurface"), exports);
|
10
10
|
_exportStar(require("./usePopoverSurfaceStyles.styles"), exports);
|
11
|
-
//# sourceMappingURL=index.js.map
|
12
|
-
|
13
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './PopoverSurface';\nexport * from './PopoverSurface.types';\nexport * from './renderPopoverSurface';\nexport * from './usePopoverSurface';\nexport * from './usePopoverSurfaceStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
|
@@ -21,6 +21,4 @@ const renderPopoverSurface_unstable = (state)=>{
|
|
21
21
|
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactPortal.Portal, {
|
22
22
|
mountNode: state.mountNode
|
23
23
|
}, surface);
|
24
|
-
};
|
25
|
-
|
26
|
-
//# sourceMappingURL=renderPopoverSurface.js.map
|
24
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["renderPopoverSurface.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { Portal } from '@fluentui/react-portal';\n/**\n * Render the final JSX of PopoverSurface\n */ export const renderPopoverSurface_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n const surface = /*#__PURE__*/ createElement(slots.root, slotProps.root, state.withArrow && /*#__PURE__*/ createElement(\"div\", {\n ref: state.arrowRef,\n className: state.arrowClassName\n }), slotProps.root.children);\n if (state.inline) {\n return surface;\n }\n return /*#__PURE__*/ createElement(Portal, {\n mountNode: state.mountNode\n }, surface);\n};\n"],"names":["renderPopoverSurface_unstable","state","slots","slotProps","getSlotsNext","surface","createElement","root","withArrow","ref","arrowRef","className","arrowClassName","children","inline","Portal","mountNode"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACtD;6BACN;AAGZ,MAAMA,gCAAgC,CAACC,QAAQ;IACtD,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,MAAMI,UAAU,WAAW,GAAGC,IAAAA,8BAAa,EAACJ,MAAMK,IAAI,EAAEJ,UAAUI,IAAI,EAAEN,MAAMO,SAAS,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAAC,OAAO;QAC1HG,KAAKR,MAAMS,QAAQ;QACnBC,WAAWV,MAAMW,cAAc;IACnC,IAAIT,UAAUI,IAAI,CAACM,QAAQ;IAC3B,IAAIZ,MAAMa,MAAM,EAAE;QACd,OAAOT;IACX,CAAC;IACD,OAAO,WAAW,GAAGC,IAAAA,8BAAa,EAACS,mBAAM,EAAE;QACvCC,WAAWf,MAAMe,SAAS;IAC9B,GAAGX;AACP"}
|
@@ -70,6 +70,4 @@ const usePopoverSurface_unstable = (props, ref)=>{
|
|
70
70
|
onKeyDownOriginal === null || onKeyDownOriginal === void 0 ? void 0 : onKeyDownOriginal(e);
|
71
71
|
};
|
72
72
|
return state;
|
73
|
-
};
|
74
|
-
|
75
|
-
//# sourceMappingURL=usePopoverSurface.js.map
|
73
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["usePopoverSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\n/**\n * Create the state required to render PopoverSurface.\n *\n * The returned state can be modified with hooks such as usePopoverSurfaceStyles_unstable,\n * before being passed to renderPopoverSurface_unstable.\n *\n * @param props - props from this instance of PopoverSurface\n * @param ref - reference to root HTMLDivElement of PopoverSurface\n */ export const usePopoverSurface_unstable = (props, ref)=>{\n const contentRef = usePopoverContext_unstable((context)=>context.contentRef);\n const openOnHover = usePopoverContext_unstable((context)=>context.openOnHover);\n const setOpen = usePopoverContext_unstable((context)=>context.setOpen);\n const mountNode = usePopoverContext_unstable((context)=>context.mountNode);\n const arrowRef = usePopoverContext_unstable((context)=>context.arrowRef);\n const size = usePopoverContext_unstable((context)=>context.size);\n const withArrow = usePopoverContext_unstable((context)=>context.withArrow);\n const appearance = usePopoverContext_unstable((context)=>context.appearance);\n const trapFocus = usePopoverContext_unstable((context)=>context.trapFocus);\n const inertTrapFocus = usePopoverContext_unstable((context)=>context.inertTrapFocus);\n const inline = usePopoverContext_unstable((context)=>context.inline);\n const { modalAttributes } = useModalAttributes({\n trapFocus,\n legacyTrapFocus: !inertTrapFocus,\n alwaysFocusable: !trapFocus\n });\n const state = {\n inline,\n appearance,\n withArrow,\n size,\n arrowRef,\n mountNode,\n components: {\n root: 'div'\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, contentRef),\n role: trapFocus ? 'dialog' : 'group',\n 'aria-modal': trapFocus ? true : undefined,\n ...modalAttributes,\n ...props\n })\n };\n const { onMouseEnter: onMouseEnterOriginal , onMouseLeave: onMouseLeaveOriginal , onKeyDown: onKeyDownOriginal } = state.root;\n state.root.onMouseEnter = (e)=>{\n if (openOnHover) {\n setOpen(e, true);\n }\n onMouseEnterOriginal === null || onMouseEnterOriginal === void 0 ? void 0 : onMouseEnterOriginal(e);\n };\n state.root.onMouseLeave = (e)=>{\n if (openOnHover) {\n setOpen(e, false);\n }\n onMouseLeaveOriginal === null || onMouseLeaveOriginal === void 0 ? void 0 : onMouseLeaveOriginal(e);\n };\n state.root.onKeyDown = (e)=>{\n var _contentRef_current;\n // only close if the event happened inside the current popover\n // If using a stack of inline popovers, the user should call `stopPropagation` to avoid dismissing the entire stack\n if (e.key === 'Escape' && ((_contentRef_current = contentRef.current) === null || _contentRef_current === void 0 ? void 0 : _contentRef_current.contains(e.target))) {\n e.preventDefault();\n setOpen(e, false);\n }\n onKeyDownOriginal === null || onKeyDownOriginal === void 0 ? void 0 : onKeyDownOriginal(e);\n };\n return state;\n};\n"],"names":["usePopoverSurface_unstable","props","ref","contentRef","usePopoverContext_unstable","context","openOnHover","setOpen","mountNode","arrowRef","size","withArrow","appearance","trapFocus","inertTrapFocus","inline","modalAttributes","useModalAttributes","legacyTrapFocus","alwaysFocusable","state","components","root","getNativeElementProps","useMergedRefs","role","undefined","onMouseEnter","onMouseEnterOriginal","onMouseLeave","onMouseLeaveOriginal","onKeyDown","onKeyDownOriginal","e","_contentRef_current","key","current","contains","target","preventDefault"],"mappings":";;;;+BAYiBA;;aAAAA;;;6DAZM;gCAC8B;8BAClB;gCACQ;AAShC,MAAMA,6BAA6B,CAACC,OAAOC,MAAM;IACxD,MAAMC,aAAaC,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQF,UAAU;IAC3E,MAAMG,cAAcF,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQC,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,QAAQ0B,GAAG,IAAI;QACnB,CAAC;QACDL,yBAAyB,IAAI,IAAIA,yBAAyB,KAAK,IAAI,KAAK,IAAIA,qBAAqBK,EAAE;IACvG;IACAb,MAAME,IAAI,CAACO,YAAY,GAAG,CAACI,IAAI;QAC3B,IAAI3B,aAAa;YACbC,QAAQ0B,GAAG,KAAK;QACpB,CAAC;QACDH,yBAAyB,IAAI,IAAIA,yBAAyB,KAAK,IAAI,KAAK,IAAIA,qBAAqBG,EAAE;IACvG;IACAb,MAAME,IAAI,CAACS,SAAS,GAAG,CAACE,IAAI;QACxB,IAAIC;QACJ,8DAA8D;QAC9D,mHAAmH;QACnH,IAAID,EAAEE,GAAG,KAAK,YAAa,CAAA,AAACD,CAAAA,sBAAsB/B,WAAWiC,OAAO,AAAD,MAAO,IAAI,IAAIF,wBAAwB,KAAK,IAAI,KAAK,IAAIA,oBAAoBG,QAAQ,CAACJ,EAAEK,MAAM,CAAC,AAAD,GAAI;YACjKL,EAAEM,cAAc;YAChBhC,QAAQ0B,GAAG,KAAK;QACpB,CAAC;QACDD,sBAAsB,IAAI,IAAIA,sBAAsB,KAAK,IAAI,KAAK,IAAIA,kBAAkBC,EAAE;IAC9F;IACA,OAAOb;AACX"}
|
@@ -78,7 +78,22 @@ const arrowHeights = {
|
|
78
78
|
Bahqtrf: "fk6fouc",
|
79
79
|
Be2twd7: "fkhj508",
|
80
80
|
Bhrd7zp: "figsok6",
|
81
|
-
Bg96gwp: "f1i3iumi"
|
81
|
+
Bg96gwp: "f1i3iumi",
|
82
|
+
B93otf3: "f18k4bn6",
|
83
|
+
vin17d: "fo1kyvf",
|
84
|
+
Ezkn3b: "fetxo7e",
|
85
|
+
ex8oj8: "fmm77a6",
|
86
|
+
Bksk4gw: "f12t24nk",
|
87
|
+
Bc5phfd: "f1babd7",
|
88
|
+
cbiifc: "f1jgo889",
|
89
|
+
fyiq5g: "f1ij1pew",
|
90
|
+
Bqc19t1: "f1gu8pa9",
|
91
|
+
Eet2gb: "fhfnl4n",
|
92
|
+
Bhl7k63: "fk8tkmz",
|
93
|
+
Bv12yb3: "f3n0535",
|
94
|
+
z0t1cu: "fi19xcv",
|
95
|
+
Bks05zx: "f1mzajhk",
|
96
|
+
Bvtglag: "fjp4h9y"
|
82
97
|
},
|
83
98
|
inverted: {
|
84
99
|
De3pzq: "fg3r6xk",
|
@@ -192,6 +207,18 @@ const arrowHeights = {
|
|
192
207
|
".fkhj508{font-size:var(--fontSizeBase300);}",
|
193
208
|
".figsok6{font-weight:var(--fontWeightRegular);}",
|
194
209
|
".f1i3iumi{line-height:var(--lineHeightBase300);}",
|
210
|
+
".f18k4bn6{animation-composition:accumulate;}",
|
211
|
+
".fo1kyvf{-webkit-animation-duration:var(--durationSlower);animation-duration:var(--durationSlower);}",
|
212
|
+
".fetxo7e{-webkit-animation-timing-function:var(--curveDecelerateMid);animation-timing-function:var(--curveDecelerateMid);}",
|
213
|
+
".fmm77a6{--slide-distance-x:0px;}",
|
214
|
+
".f12t24nk{--slide-distance-y:10px;}",
|
215
|
+
".f1babd7[data-popper-placement^=right]{--slide-distance-x:-10px;}",
|
216
|
+
".f1jgo889[data-popper-placement^=right]{--slide-distance-y:0px;}",
|
217
|
+
".f1ij1pew[data-popper-placement^=bottom]{--slide-distance-x:0px;}",
|
218
|
+
".f1gu8pa9[data-popper-placement^=bottom]{--slide-distance-y:-10px;}",
|
219
|
+
".fhfnl4n[data-popper-placement^=left]{--slide-distance-x:10px;}",
|
220
|
+
".fk8tkmz[data-popper-placement^=left]{--slide-distance-y:0px;}",
|
221
|
+
".f3n0535{-webkit-animation-name:f5j8bii,fld5wjx;animation-name:f5j8bii,fld5wjx;}",
|
195
222
|
".fg3r6xk{background-color:var(--colorNeutralBackgroundStatic);}",
|
196
223
|
".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}",
|
197
224
|
".ffp7eso{background-color:var(--colorBrandBackground);}",
|
@@ -241,6 +268,29 @@ const arrowHeights = {
|
|
241
268
|
"[data-popper-placement^=\"bottom\"] .f159pzir{--angle:180deg;}",
|
242
269
|
"[data-popper-placement^=\"left\"] .f11yvu4{right:-1px;}",
|
243
270
|
"[data-popper-placement^=\"left\"] .fm1ycve{--angle:270deg;}"
|
271
|
+
],
|
272
|
+
k: [
|
273
|
+
"@-webkit-keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}",
|
274
|
+
"@keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}",
|
275
|
+
"@-webkit-keyframes fld5wjx{from{-webkit-transform:translate(var(--slide-distance-x), var(--slide-distance-y));-moz-transform:translate(var(--slide-distance-x), var(--slide-distance-y));-ms-transform:translate(var(--slide-distance-x), var(--slide-distance-y));transform:translate(var(--slide-distance-x), var(--slide-distance-y));}}",
|
276
|
+
"@keyframes fld5wjx{from{-webkit-transform:translate(var(--slide-distance-x), var(--slide-distance-y));-moz-transform:translate(var(--slide-distance-x), var(--slide-distance-y));-ms-transform:translate(var(--slide-distance-x), var(--slide-distance-y));transform:translate(var(--slide-distance-x), var(--slide-distance-y));}}"
|
277
|
+
],
|
278
|
+
m: [
|
279
|
+
[
|
280
|
+
"@media (prefers-reduced-motion){.fi19xcv[data-popper-placement]{-webkit-animation-duration:1ms;animation-duration:1ms;}}",
|
281
|
+
{
|
282
|
+
m: "(prefers-reduced-motion)"
|
283
|
+
}
|
284
|
+
],
|
285
|
+
[
|
286
|
+
"@media (prefers-reduced-motion){.f1mzajhk[data-popper-placement]{-webkit-animation-name:f5j8bii;animation-name:f5j8bii;}}",
|
287
|
+
{
|
288
|
+
m: "(prefers-reduced-motion)"
|
289
|
+
}
|
290
|
+
]
|
291
|
+
],
|
292
|
+
t: [
|
293
|
+
"@supports not (animation-composition: accumulate){.fjp4h9y[data-popper-placement]{-webkit-animation-name:f5j8bii;animation-name:f5j8bii;}}"
|
244
294
|
]
|
245
295
|
});
|
246
296
|
const usePopoverSurfaceStyles_unstable = (state)=>{
|
@@ -249,5 +299,3 @@ const usePopoverSurfaceStyles_unstable = (state)=>{
|
|
249
299
|
state.arrowClassName = (0, _react.mergeClasses)(styles.arrow, state.size === 'small' ? styles.smallArrow : styles.mediumLargeArrow);
|
250
300
|
return state;
|
251
301
|
}; //# sourceMappingURL=usePopoverSurfaceStyles.styles.js.map
|
252
|
-
|
253
|
-
//# sourceMappingURL=usePopoverSurfaceStyles.styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/PopoverSurface/usePopoverSurfaceStyles.styles.js"],"sourcesContent":["import { shorthands, __styles, mergeClasses } from '@griffel/react';\nimport { createArrowHeightStyles, createArrowStyles } from '@fluentui/react-positioning';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const popoverSurfaceClassNames = {\n root: 'fui-PopoverSurface'\n};\nexport const arrowHeights = {\n small: 6,\n medium: 8,\n large: 8\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n sj55zd: \"f19n0e5\",\n De3pzq: \"fxugw4r\",\n E5pizo: \"f1hg901r\",\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"],\n B4j52fo: \"f5ogflp\",\n Bekrc4i: [\"f1hqa2wf\", \"finvdd3\"],\n Bn0qgzm: \"f1f09k3d\",\n ibv6hh: [\"finvdd3\", \"f1hqa2wf\"],\n icvyot: \"fzkkow9\",\n vrafjx: [\"fcdblym\", \"fjik90z\"],\n oivjwe: \"fg706s2\",\n wvpqe5: [\"fjik90z\", \"fcdblym\"],\n g2u3we: \"fghlq4f\",\n h3c5rm: [\"f1gn591s\", \"fjscplz\"],\n B9xav0g: \"fb073pr\",\n zhjwy3: [\"fjscplz\", \"f1gn591s\"],\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n },\n inverted: {\n De3pzq: \"fg3r6xk\",\n sj55zd: \"fonrgv7\"\n },\n brand: {\n De3pzq: \"ffp7eso\",\n sj55zd: \"f1phragk\"\n },\n smallPadding: {\n z8tnut: \"f1kcqot9\",\n z189sj: [\"f11qrl6u\", \"fjlbh76\"],\n Byoj8tv: \"fpe6lb7\",\n uwmqm3: [\"fjlbh76\", \"f11qrl6u\"]\n },\n mediumPadding: {\n z8tnut: \"fqag9an\",\n z189sj: [\"f1gbmcue\", \"f1rh9g5y\"],\n Byoj8tv: \"fp67ikv\",\n uwmqm3: [\"f1rh9g5y\", \"f1gbmcue\"]\n },\n largePadding: {\n z8tnut: \"fc7z3ec\",\n z189sj: [\"fat0sn4\", \"fekwl8i\"],\n Byoj8tv: \"fe2my4m\",\n uwmqm3: [\"fekwl8i\", \"fat0sn4\"]\n },\n smallArrow: {\n a9b677: \"f1ekdpwm\",\n Bqenvij: \"f83vc9z\"\n },\n mediumLargeArrow: {\n a9b677: \"f1kmc0fn\",\n Bqenvij: \"fb6lvc5\"\n },\n arrow: {\n qhf8xq: \"f1euv43f\",\n De3pzq: \"f1u2r49w\",\n Bcdw1i0: \"fd7fpy0\",\n Bj3rh1h: \"f1bsuimh\",\n Ftih45: \"f1wl9k8s\",\n B1puzpu: \"f1wkw4r9\",\n Brfgrao: \"f1j7ml58\",\n Bcvre1j: \"fyl8oag\",\n Ccq8qp: \"frdoeuz\",\n Baz25je: \"fb81m9q\",\n cmx5o7: \"f1ljr5q2\",\n B4f6apu: \"fyfemzf\",\n m598lv: \"focyt6c\",\n Bk5zm6e: \"fnhxbxj\",\n y0oebl: \"fdw6hkg\",\n qa3bma: \"f11yjt3y\",\n Bqjgrrk: \"f1172wan\",\n Budzafs: [\"f9e5op9\", \"f112wvtl\"],\n Hv9wc6: [\"ftj5xct\", \"fyavhwi\"],\n hl6cv3: \"f1773hnp\",\n Bh2vraf: \"f1n8855c\",\n yayu3t: \"f1v7783n\",\n wedwtw: \"fsw6im5\",\n rhl9o9: \"fh2hsk5\",\n Bu8t5uz: \"f159pzir\",\n B6q6orb: \"f11yvu4\",\n Bwwlvwl: \"fm1ycve\"\n }\n}, {\n d: [\".f19n0e5{color:var(--colorNeutralForeground1);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f1hg901r{box-shadow:var(--shadow16);}\", \".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}\", \".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}\", \".f5ogflp{border-top-width:1px;}\", \".f1hqa2wf{border-right-width:1px;}\", \".finvdd3{border-left-width:1px;}\", \".f1f09k3d{border-bottom-width:1px;}\", \".fzkkow9{border-top-style:solid;}\", \".fcdblym{border-right-style:solid;}\", \".fjik90z{border-left-style:solid;}\", \".fg706s2{border-bottom-style:solid;}\", \".fghlq4f{border-top-color:var(--colorTransparentStroke);}\", \".f1gn591s{border-right-color:var(--colorTransparentStroke);}\", \".fjscplz{border-left-color:var(--colorTransparentStroke);}\", \".fb073pr{border-bottom-color:var(--colorTransparentStroke);}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".fg3r6xk{background-color:var(--colorNeutralBackgroundStatic);}\", \".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}\", \".ffp7eso{background-color:var(--colorBrandBackground);}\", \".f1phragk{color:var(--colorNeutralForegroundOnBrand);}\", \".f1kcqot9{padding-top:12px;}\", \".f11qrl6u{padding-right:12px;}\", \".fjlbh76{padding-left:12px;}\", \".fpe6lb7{padding-bottom:12px;}\", \".fqag9an{padding-top:16px;}\", \".f1gbmcue{padding-right:16px;}\", \".f1rh9g5y{padding-left:16px;}\", \".fp67ikv{padding-bottom:16px;}\", \".fc7z3ec{padding-top:20px;}\", \".fat0sn4{padding-right:20px;}\", \".fekwl8i{padding-left:20px;}\", \".fe2my4m{padding-bottom:20px;}\", \".f1ekdpwm{width:8.484px;}\", \".f83vc9z{height:8.484px;}\", \".f1kmc0fn{width:11.312px;}\", \".fb6lvc5{height:11.312px;}\", \".f1euv43f{position:absolute;}\", \".f1u2r49w{background-color:inherit;}\", \".fd7fpy0{visibility:hidden;}\", \".f1bsuimh{z-index:-1;}\", \".f1wl9k8s::before{content:\\\"\\\";}\", \".f1wkw4r9::before{visibility:visible;}\", \".f1j7ml58::before{position:absolute;}\", \".fyl8oag::before{box-sizing:border-box;}\", \".frdoeuz::before{width:inherit;}\", \".fb81m9q::before{height:inherit;}\", \".f1ljr5q2::before{background-color:inherit;}\", \".fyfemzf::before{border-right-width:1px;}\", \".focyt6c::before{border-right-style:solid;}\", \".fnhxbxj::before{border-right-color:var(--colorTransparentStroke);}\", \".fdw6hkg::before{border-bottom-width:1px;}\", \".f11yjt3y::before{border-bottom-style:solid;}\", \".f1172wan::before{border-bottom-color:var(--colorTransparentStroke);}\", \".f9e5op9::before{border-bottom-right-radius:var(--borderRadiusSmall);}\", \".f112wvtl::before{border-bottom-left-radius:var(--borderRadiusSmall);}\", \".ftj5xct::before{-webkit-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-moz-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-ms-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);}\", \".fyavhwi::before{-webkit-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);-moz-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);-ms-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);}\", \"[data-popper-placement^=\\\"top\\\"] .f1773hnp{bottom:-1px;}\", \"[data-popper-placement^=\\\"top\\\"] .f1n8855c{--angle:0;}\", \"[data-popper-placement^=\\\"right\\\"] .f1v7783n{left:-1px;}\", \"[data-popper-placement^=\\\"right\\\"] .fsw6im5{--angle:90deg;}\", \"[data-popper-placement^=\\\"bottom\\\"] .fh2hsk5{top:-1px;}\", \"[data-popper-placement^=\\\"bottom\\\"] .f159pzir{--angle:180deg;}\", \"[data-popper-placement^=\\\"left\\\"] .f11yvu4{right:-1px;}\", \"[data-popper-placement^=\\\"left\\\"] .fm1ycve{--angle:270deg;}\"]\n});\n/**\n * Apply styling to the PopoverSurface slots based on the state\n */\nexport const usePopoverSurfaceStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(popoverSurfaceClassNames.root, 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);\n state.arrowClassName = mergeClasses(styles.arrow, state.size === 'small' ? styles.smallArrow : styles.mediumLargeArrow);\n return state;\n};\n//# sourceMappingURL=usePopoverSurfaceStyles.styles.js.map"],"names":["popoverSurfaceClassNames","arrowHeights","usePopoverSurfaceStyles_unstable","root","small","medium","large","useStyles","__styles","sj55zd","De3pzq","E5pizo","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","inverted","brand","smallPadding","z8tnut","z189sj","Byoj8tv","uwmqm3","mediumPadding","largePadding","smallArrow","a9b677","Bqenvij","mediumLargeArrow","arrow","qhf8xq","Bcdw1i0","Bj3rh1h","Ftih45","B1puzpu","Brfgrao","Bcvre1j","Ccq8qp","Baz25je","cmx5o7","B4f6apu","m598lv","Bk5zm6e","y0oebl","qa3bma","Bqjgrrk","Budzafs","Hv9wc6","hl6cv3","Bh2vraf","yayu3t","wedwtw","rhl9o9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,EAAEsE,MAAMI,IAAI,KAAK,WAAWH,OAAOxC,YAAY,EAAEuC,MAAMI,IAAI,KAAK,YAAYH,OAAOnC,aAAa,EAAEkC,MAAMI,IAAI,KAAK,WAAWH,OAAOlC,YAAY,EAAEiC,MAAMK,UAAU,KAAK,cAAcJ,OAAO1C,QAAQ,EAAEyC,MAAMK,UAAU,KAAK,WAAWJ,OAAOzC,KAAK,EAAEwC,MAAMtE,IAAI,CAACwE,SAAS;IACrVF,MAAMM,cAAc,GAAGH,IAAAA,mBAAY,EAACF,OAAO7B,KAAK,EAAE4B,MAAMI,IAAI,KAAK,UAAUH,OAAOjC,UAAU,GAAGiC,OAAO9B,gBAAgB;IACtH,OAAO6B;AACT,GACA,0DAA0D"}
|
1
|
+
{"version":3,"sources":["usePopoverSurfaceStyles.styles.js"],"sourcesContent":["import { shorthands, __styles, mergeClasses } from '@griffel/react';\nimport { createArrowHeightStyles, createArrowStyles, createSlideStyles } from '@fluentui/react-positioning';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const popoverSurfaceClassNames = {\n root: 'fui-PopoverSurface'\n};\nexport const arrowHeights = {\n small: 6,\n medium: 8,\n large: 8\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n sj55zd: \"f19n0e5\",\n De3pzq: \"fxugw4r\",\n E5pizo: \"f1hg901r\",\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"],\n B4j52fo: \"f5ogflp\",\n Bekrc4i: [\"f1hqa2wf\", \"finvdd3\"],\n Bn0qgzm: \"f1f09k3d\",\n ibv6hh: [\"finvdd3\", \"f1hqa2wf\"],\n icvyot: \"fzkkow9\",\n vrafjx: [\"fcdblym\", \"fjik90z\"],\n oivjwe: \"fg706s2\",\n wvpqe5: [\"fjik90z\", \"fcdblym\"],\n g2u3we: \"fghlq4f\",\n h3c5rm: [\"f1gn591s\", \"fjscplz\"],\n B9xav0g: \"fb073pr\",\n zhjwy3: [\"fjscplz\", \"f1gn591s\"],\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\",\n B93otf3: \"f18k4bn6\",\n vin17d: \"fo1kyvf\",\n Ezkn3b: \"fetxo7e\",\n ex8oj8: \"fmm77a6\",\n Bksk4gw: \"f12t24nk\",\n Bc5phfd: \"f1babd7\",\n cbiifc: \"f1jgo889\",\n fyiq5g: \"f1ij1pew\",\n Bqc19t1: \"f1gu8pa9\",\n Eet2gb: \"fhfnl4n\",\n Bhl7k63: \"fk8tkmz\",\n Bv12yb3: \"f3n0535\",\n z0t1cu: \"fi19xcv\",\n Bks05zx: \"f1mzajhk\",\n Bvtglag: \"fjp4h9y\"\n },\n inverted: {\n De3pzq: \"fg3r6xk\",\n sj55zd: \"fonrgv7\"\n },\n brand: {\n De3pzq: \"ffp7eso\",\n sj55zd: \"f1phragk\"\n },\n smallPadding: {\n z8tnut: \"f1kcqot9\",\n z189sj: [\"f11qrl6u\", \"fjlbh76\"],\n Byoj8tv: \"fpe6lb7\",\n uwmqm3: [\"fjlbh76\", \"f11qrl6u\"]\n },\n mediumPadding: {\n z8tnut: \"fqag9an\",\n z189sj: [\"f1gbmcue\", \"f1rh9g5y\"],\n Byoj8tv: \"fp67ikv\",\n uwmqm3: [\"f1rh9g5y\", \"f1gbmcue\"]\n },\n largePadding: {\n z8tnut: \"fc7z3ec\",\n z189sj: [\"fat0sn4\", \"fekwl8i\"],\n Byoj8tv: \"fe2my4m\",\n uwmqm3: [\"fekwl8i\", \"fat0sn4\"]\n },\n smallArrow: {\n a9b677: \"f1ekdpwm\",\n Bqenvij: \"f83vc9z\"\n },\n mediumLargeArrow: {\n a9b677: \"f1kmc0fn\",\n Bqenvij: \"fb6lvc5\"\n },\n arrow: {\n qhf8xq: \"f1euv43f\",\n De3pzq: \"f1u2r49w\",\n Bcdw1i0: \"fd7fpy0\",\n Bj3rh1h: \"f1bsuimh\",\n Ftih45: \"f1wl9k8s\",\n B1puzpu: \"f1wkw4r9\",\n Brfgrao: \"f1j7ml58\",\n Bcvre1j: \"fyl8oag\",\n Ccq8qp: \"frdoeuz\",\n Baz25je: \"fb81m9q\",\n cmx5o7: \"f1ljr5q2\",\n B4f6apu: \"fyfemzf\",\n m598lv: \"focyt6c\",\n Bk5zm6e: \"fnhxbxj\",\n y0oebl: \"fdw6hkg\",\n qa3bma: \"f11yjt3y\",\n Bqjgrrk: \"f1172wan\",\n Budzafs: [\"f9e5op9\", \"f112wvtl\"],\n Hv9wc6: [\"ftj5xct\", \"fyavhwi\"],\n hl6cv3: \"f1773hnp\",\n Bh2vraf: \"f1n8855c\",\n yayu3t: \"f1v7783n\",\n wedwtw: \"fsw6im5\",\n rhl9o9: \"fh2hsk5\",\n Bu8t5uz: \"f159pzir\",\n B6q6orb: \"f11yvu4\",\n Bwwlvwl: \"fm1ycve\"\n }\n}, {\n d: [\".f19n0e5{color:var(--colorNeutralForeground1);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f1hg901r{box-shadow:var(--shadow16);}\", \".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}\", \".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}\", \".f5ogflp{border-top-width:1px;}\", \".f1hqa2wf{border-right-width:1px;}\", \".finvdd3{border-left-width:1px;}\", \".f1f09k3d{border-bottom-width:1px;}\", \".fzkkow9{border-top-style:solid;}\", \".fcdblym{border-right-style:solid;}\", \".fjik90z{border-left-style:solid;}\", \".fg706s2{border-bottom-style:solid;}\", \".fghlq4f{border-top-color:var(--colorTransparentStroke);}\", \".f1gn591s{border-right-color:var(--colorTransparentStroke);}\", \".fjscplz{border-left-color:var(--colorTransparentStroke);}\", \".fb073pr{border-bottom-color:var(--colorTransparentStroke);}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".f18k4bn6{animation-composition:accumulate;}\", \".fo1kyvf{-webkit-animation-duration:var(--durationSlower);animation-duration:var(--durationSlower);}\", \".fetxo7e{-webkit-animation-timing-function:var(--curveDecelerateMid);animation-timing-function:var(--curveDecelerateMid);}\", \".fmm77a6{--slide-distance-x:0px;}\", \".f12t24nk{--slide-distance-y:10px;}\", \".f1babd7[data-popper-placement^=right]{--slide-distance-x:-10px;}\", \".f1jgo889[data-popper-placement^=right]{--slide-distance-y:0px;}\", \".f1ij1pew[data-popper-placement^=bottom]{--slide-distance-x:0px;}\", \".f1gu8pa9[data-popper-placement^=bottom]{--slide-distance-y:-10px;}\", \".fhfnl4n[data-popper-placement^=left]{--slide-distance-x:10px;}\", \".fk8tkmz[data-popper-placement^=left]{--slide-distance-y:0px;}\", \".f3n0535{-webkit-animation-name:f5j8bii,fld5wjx;animation-name:f5j8bii,fld5wjx;}\", \".fg3r6xk{background-color:var(--colorNeutralBackgroundStatic);}\", \".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}\", \".ffp7eso{background-color:var(--colorBrandBackground);}\", \".f1phragk{color:var(--colorNeutralForegroundOnBrand);}\", \".f1kcqot9{padding-top:12px;}\", \".f11qrl6u{padding-right:12px;}\", \".fjlbh76{padding-left:12px;}\", \".fpe6lb7{padding-bottom:12px;}\", \".fqag9an{padding-top:16px;}\", \".f1gbmcue{padding-right:16px;}\", \".f1rh9g5y{padding-left:16px;}\", \".fp67ikv{padding-bottom:16px;}\", \".fc7z3ec{padding-top:20px;}\", \".fat0sn4{padding-right:20px;}\", \".fekwl8i{padding-left:20px;}\", \".fe2my4m{padding-bottom:20px;}\", \".f1ekdpwm{width:8.484px;}\", \".f83vc9z{height:8.484px;}\", \".f1kmc0fn{width:11.312px;}\", \".fb6lvc5{height:11.312px;}\", \".f1euv43f{position:absolute;}\", \".f1u2r49w{background-color:inherit;}\", \".fd7fpy0{visibility:hidden;}\", \".f1bsuimh{z-index:-1;}\", \".f1wl9k8s::before{content:\\\"\\\";}\", \".f1wkw4r9::before{visibility:visible;}\", \".f1j7ml58::before{position:absolute;}\", \".fyl8oag::before{box-sizing:border-box;}\", \".frdoeuz::before{width:inherit;}\", \".fb81m9q::before{height:inherit;}\", \".f1ljr5q2::before{background-color:inherit;}\", \".fyfemzf::before{border-right-width:1px;}\", \".focyt6c::before{border-right-style:solid;}\", \".fnhxbxj::before{border-right-color:var(--colorTransparentStroke);}\", \".fdw6hkg::before{border-bottom-width:1px;}\", \".f11yjt3y::before{border-bottom-style:solid;}\", \".f1172wan::before{border-bottom-color:var(--colorTransparentStroke);}\", \".f9e5op9::before{border-bottom-right-radius:var(--borderRadiusSmall);}\", \".f112wvtl::before{border-bottom-left-radius:var(--borderRadiusSmall);}\", \".ftj5xct::before{-webkit-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-moz-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-ms-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);}\", \".fyavhwi::before{-webkit-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);-moz-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);-ms-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);}\", \"[data-popper-placement^=\\\"top\\\"] .f1773hnp{bottom:-1px;}\", \"[data-popper-placement^=\\\"top\\\"] .f1n8855c{--angle:0;}\", \"[data-popper-placement^=\\\"right\\\"] .f1v7783n{left:-1px;}\", \"[data-popper-placement^=\\\"right\\\"] .fsw6im5{--angle:90deg;}\", \"[data-popper-placement^=\\\"bottom\\\"] .fh2hsk5{top:-1px;}\", \"[data-popper-placement^=\\\"bottom\\\"] .f159pzir{--angle:180deg;}\", \"[data-popper-placement^=\\\"left\\\"] .f11yvu4{right:-1px;}\", \"[data-popper-placement^=\\\"left\\\"] .fm1ycve{--angle:270deg;}\"],\n k: [\"@-webkit-keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}\", \"@keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}\", \"@-webkit-keyframes fld5wjx{from{-webkit-transform:translate(var(--slide-distance-x), var(--slide-distance-y));-moz-transform:translate(var(--slide-distance-x), var(--slide-distance-y));-ms-transform:translate(var(--slide-distance-x), var(--slide-distance-y));transform:translate(var(--slide-distance-x), var(--slide-distance-y));}}\", \"@keyframes fld5wjx{from{-webkit-transform:translate(var(--slide-distance-x), var(--slide-distance-y));-moz-transform:translate(var(--slide-distance-x), var(--slide-distance-y));-ms-transform:translate(var(--slide-distance-x), var(--slide-distance-y));transform:translate(var(--slide-distance-x), var(--slide-distance-y));}}\"],\n m: [[\"@media (prefers-reduced-motion){.fi19xcv[data-popper-placement]{-webkit-animation-duration:1ms;animation-duration:1ms;}}\", {\n m: \"(prefers-reduced-motion)\"\n }], [\"@media (prefers-reduced-motion){.f1mzajhk[data-popper-placement]{-webkit-animation-name:f5j8bii;animation-name:f5j8bii;}}\", {\n m: \"(prefers-reduced-motion)\"\n }]],\n t: [\"@supports not (animation-composition: accumulate){.fjp4h9y[data-popper-placement]{-webkit-animation-name:f5j8bii;animation-name:f5j8bii;}}\"]\n});\n/**\n * Apply styling to the PopoverSurface slots based on the state\n */\nexport const usePopoverSurfaceStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(popoverSurfaceClassNames.root, 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);\n state.arrowClassName = mergeClasses(styles.arrow, state.size === 'small' ? styles.smallArrow : styles.mediumLargeArrow);\n return state;\n};\n//# sourceMappingURL=usePopoverSurfaceStyles.styles.js.map"],"names":["popoverSurfaceClassNames","arrowHeights","usePopoverSurfaceStyles_unstable","root","small","medium","large","useStyles","__styles","sj55zd","De3pzq","E5pizo","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","B93otf3","vin17d","Ezkn3b","ex8oj8","Bksk4gw","Bc5phfd","cbiifc","fyiq5g","Bqc19t1","Eet2gb","Bhl7k63","Bv12yb3","z0t1cu","Bks05zx","Bvtglag","inverted","brand","smallPadding","z8tnut","z189sj","Byoj8tv","uwmqm3","mediumPadding","largePadding","smallArrow","a9b677","Bqenvij","mediumLargeArrow","arrow","qhf8xq","Bcdw1i0","Bj3rh1h","Ftih45","B1puzpu","Brfgrao","Bcvre1j","Ccq8qp","Baz25je","cmx5o7","B4f6apu","m598lv","Bk5zm6e","y0oebl","qa3bma","Bqjgrrk","Budzafs","Hv9wc6","hl6cv3","Bh2vraf","yayu3t","wedwtw","rhl9o9","Bu8t5uz","B6q6orb","Bwwlvwl","d","k","m","t","state","styles","className","mergeClasses","size","appearance","arrowClassName"],"mappings":";;;;;;;;;;;IAGaA,wBAAwB,MAAxBA;IAGAC,YAAY,MAAZA;IA6HAC,gCAAgC,MAAhCA;;uBAnIsC;AAG5C,MAAMF,2BAA2B;IACtCG,MAAM;AACR;AACO,MAAMF,eAAe;IAC1BG,OAAO;IACPC,QAAQ;IACRC,OAAO;AACT;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCL,MAAM;QACJM,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;YAAC;YAAY;SAAW;QACjCC,SAAS;YAA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IAAI,EAAEyF,OAAOzF,IAAI,EAAEwF,MAAMI,IAAI,KAAK,WAAWH,OAAO3C,YAAY,EAAE0C,MAAMI,IAAI,KAAK,YAAYH,OAAOtC,aAAa,EAAEqC,MAAMI,IAAI,KAAK,WAAWH,OAAOrC,YAAY,EAAEoC,MAAMK,UAAU,KAAK,cAAcJ,OAAO7C,QAAQ,EAAE4C,MAAMK,UAAU,KAAK,WAAWJ,OAAO5C,KAAK,EAAE2C,MAAMxF,IAAI,CAAC0F,SAAS;IACrVF,MAAMM,cAAc,GAAGH,IAAAA,mBAAY,EAACF,OAAOhC,KAAK,EAAE+B,MAAMI,IAAI,KAAK,UAAUH,OAAOpC,UAAU,GAAGoC,OAAOjC,gBAAgB;IACtH,OAAOgC;AACT,GACA,0DAA0D"}
|
@@ -16,6 +16,4 @@ const PopoverTrigger = (props)=>{
|
|
16
16
|
};
|
17
17
|
PopoverTrigger.displayName = 'PopoverTrigger';
|
18
18
|
// type casting here is required to ensure internal type FluentTriggerComponent is not leaked
|
19
|
-
PopoverTrigger.isFluentTriggerComponent = true;
|
20
|
-
|
21
|
-
//# sourceMappingURL=PopoverTrigger.js.map
|
19
|
+
PopoverTrigger.isFluentTriggerComponent = true;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["PopoverTrigger.js"],"sourcesContent":["import * as React from 'react';\nimport { usePopoverTrigger_unstable } from './usePopoverTrigger';\nimport { renderPopoverTrigger_unstable } from './renderPopoverTrigger';\n/**\n * Wraps a trigger element as an only child and adds the necessary event handling to open a popover.\n */ export const PopoverTrigger = (props)=>{\n const state = usePopoverTrigger_unstable(props);\n return renderPopoverTrigger_unstable(state);\n};\nPopoverTrigger.displayName = 'PopoverTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\nPopoverTrigger.isFluentTriggerComponent = true;\n"],"names":["PopoverTrigger","props","state","usePopoverTrigger_unstable","renderPopoverTrigger_unstable","displayName","isFluentTriggerComponent"],"mappings":";;;;+BAKiBA;;aAAAA;;;6DALM;mCACoB;sCACG;AAGnC,MAAMA,iBAAiB,CAACC,QAAQ;IACvC,MAAMC,QAAQC,IAAAA,6CAA0B,EAACF;IACzC,OAAOG,IAAAA,mDAA6B,EAACF;AACzC;AACAF,eAAeK,WAAW,GAAG;AAC7B,6FAA6F;AAC7FL,eAAeM,wBAAwB,GAAG,IAAI"}
|
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
6
6
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
7
|
-
//# sourceMappingURL=PopoverTrigger.types.js.map
|
8
|
-
|
9
|
-
//# sourceMappingURL=PopoverTrigger.types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["PopoverTrigger.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;6DAAuB"}
|
@@ -7,6 +7,3 @@ _exportStar(require("./PopoverTrigger"), exports);
|
|
7
7
|
_exportStar(require("./PopoverTrigger.types"), exports);
|
8
8
|
_exportStar(require("./renderPopoverTrigger"), exports);
|
9
9
|
_exportStar(require("./usePopoverTrigger"), exports);
|
10
|
-
//# sourceMappingURL=index.js.map
|
11
|
-
|
12
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './PopoverTrigger';\nexport * from './PopoverTrigger.types';\nexport * from './renderPopoverTrigger';\nexport * from './usePopoverTrigger';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA"}
|
@@ -10,6 +10,4 @@ Object.defineProperty(exports, "renderPopoverTrigger_unstable", {
|
|
10
10
|
});
|
11
11
|
const renderPopoverTrigger_unstable = (state)=>{
|
12
12
|
return state.children;
|
13
|
-
};
|
14
|
-
|
15
|
-
//# sourceMappingURL=renderPopoverTrigger.js.map
|
13
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["renderPopoverTrigger.js"],"sourcesContent":["/**\n * Render the final JSX of PopoverTrigger\n */ export const renderPopoverTrigger_unstable = (state)=>{\n return state.children;\n};\n"],"names":["renderPopoverTrigger_unstable","state","children"],"mappings":"AAAA;;CAEC;;;;+BAAgBA;;aAAAA;;AAAN,MAAMA,gCAAgC,CAACC,QAAQ;IACtD,OAAOA,MAAMC,QAAQ;AACzB"}
|
@@ -70,6 +70,4 @@ const usePopoverTrigger_unstable = (props)=>{
|
|
70
70
|
return {
|
71
71
|
children: (0, _reactUtilities.applyTriggerPropsToChildren)(props.children, (0, _reactAria.useARIAButtonProps)((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps))
|
72
72
|
};
|
73
|
-
};
|
74
|
-
|
75
|
-
//# sourceMappingURL=usePopoverTrigger.js.map
|
73
|
+
};
|