@fluentui/react-menu 9.7.10 → 9.7.12
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +168 -2
- package/CHANGELOG.md +41 -3
- package/lib/components/Menu/useMenu.js +3 -1
- package/lib/components/Menu/useMenu.js.map +1 -1
- package/lib/components/MenuDivider/MenuDivider.js +3 -6
- package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/index.js +1 -1
- package/lib/components/MenuDivider/index.js.map +1 -1
- package/lib/components/MenuDivider/{useMenuDividerStyles.js → useMenuDividerStyles.styles.js} +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -0
- package/lib/components/MenuGroup/MenuGroup.js +3 -6
- package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/index.js +1 -1
- package/lib/components/MenuGroup/index.js.map +1 -1
- package/lib/components/MenuGroup/{useMenuGroupStyles.js → useMenuGroupStyles.styles.js} +1 -1
- package/lib/components/MenuGroup/useMenuGroupStyles.styles.js.map +1 -0
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js +3 -6
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/index.js +1 -1
- package/lib/components/MenuGroupHeader/index.js.map +1 -1
- package/lib/components/MenuGroupHeader/{useMenuGroupHeaderStyles.js → useMenuGroupHeaderStyles.styles.js} +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js.map +1 -0
- package/lib/components/MenuItem/MenuItem.js +3 -6
- package/lib/components/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/MenuItem/index.js +1 -1
- package/lib/components/MenuItem/index.js.map +1 -1
- package/lib/components/MenuItem/{useMenuItemStyles.js → useMenuItemStyles.styles.js} +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.styles.js.map +1 -0
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +3 -6
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/index.js +1 -1
- package/lib/components/MenuItemCheckbox/index.js.map +1 -1
- package/lib/components/MenuItemCheckbox/{useMenuItemCheckboxStyles.js → useMenuItemCheckboxStyles.styles.js} +2 -2
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js.map +1 -0
- package/lib/components/MenuItemRadio/MenuItemRadio.js +3 -6
- package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/index.js +1 -1
- package/lib/components/MenuItemRadio/index.js.map +1 -1
- package/lib/components/MenuItemRadio/{useMenuItemRadioStyles.js → useMenuItemRadioStyles.styles.js} +2 -2
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.styles.js.map +1 -0
- package/lib/components/MenuList/MenuList.js +3 -6
- package/lib/components/MenuList/MenuList.js.map +1 -1
- package/lib/components/MenuList/index.js +1 -1
- package/lib/components/MenuList/index.js.map +1 -1
- package/lib/components/MenuList/{useMenuListStyles.js → useMenuListStyles.styles.js} +1 -1
- package/lib/components/MenuList/useMenuListStyles.styles.js.map +1 -0
- package/lib/components/MenuPopover/MenuPopover.js +3 -6
- package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/index.js +1 -1
- package/lib/components/MenuPopover/index.js.map +1 -1
- package/lib/components/MenuPopover/{useMenuPopoverStyles.js → useMenuPopoverStyles.styles.js} +1 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js +3 -6
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/index.js +1 -1
- package/lib/components/MenuSplitGroup/index.js.map +1 -1
- package/lib/components/MenuSplitGroup/{useMenuSplitGroupStyles.js → useMenuSplitGroupStyles.styles.js} +2 -2
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js.map +1 -0
- package/lib/components/MenuTrigger/MenuTrigger.js +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/index.js +1 -1
- package/lib/components/MenuTrigger/index.js.map +1 -1
- package/lib/components/MenuTrigger/{useMenuTrigger.js → useMenuTrigger.styles.js} +1 -1
- package/lib/components/MenuTrigger/useMenuTrigger.styles.js.map +1 -0
- package/lib/selectable/index.js +1 -1
- package/lib/selectable/index.js.map +1 -1
- package/lib/selectable/{useCheckmarkStyles.js → useCheckmarkStyles.styles.js} +1 -1
- package/lib/selectable/useCheckmarkStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Menu/useMenu.js +2 -1
- package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.js +3 -4
- package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/index.js +1 -1
- package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/{useMenuDividerStyles.js → useMenuDividerStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuGroup/MenuGroup.js +3 -4
- package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/index.js +1 -1
- package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/{useMenuGroupStyles.js → useMenuGroupStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +3 -4
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/index.js +1 -1
- package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/{useMenuGroupHeaderStyles.js → useMenuGroupHeaderStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuItem/MenuItem.js +3 -4
- package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/index.js +1 -1
- package/lib-commonjs/components/MenuItem/index.js.map +1 -1
- package/lib-commonjs/components/MenuItem/{useMenuItemStyles.js → useMenuItemStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +3 -4
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/index.js +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/{useMenuItemCheckboxStyles.js → useMenuItemCheckboxStyles.styles.js} +4 -4
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +3 -4
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/index.js +1 -1
- package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/{useMenuItemRadioStyles.js → useMenuItemRadioStyles.styles.js} +4 -4
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuList/MenuList.js +3 -4
- package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/index.js +1 -1
- package/lib-commonjs/components/MenuList/index.js.map +1 -1
- package/lib-commonjs/components/MenuList/{useMenuListStyles.js → useMenuListStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuPopover/MenuPopover.js +3 -4
- package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/index.js +1 -1
- package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/{useMenuPopoverStyles.js → useMenuPopoverStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +3 -4
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/index.js +1 -1
- package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/{useMenuSplitGroupStyles.js → useMenuSplitGroupStyles.styles.js} +2 -2
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js.map +1 -0
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +2 -2
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/index.js +1 -1
- package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/{useMenuTrigger.js → useMenuTrigger.styles.js} +2 -2
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.styles.js.map +1 -0
- package/lib-commonjs/selectable/index.js +1 -1
- package/lib-commonjs/selectable/index.js.map +1 -1
- package/lib-commonjs/selectable/{useCheckmarkStyles.js → useCheckmarkStyles.styles.js} +2 -2
- package/lib-commonjs/selectable/useCheckmarkStyles.styles.js.map +1 -0
- package/package.json +14 -13
- package/.swcrc +0 -30
- package/lib/components/MenuDivider/useMenuDividerStyles.js.map +0 -1
- package/lib/components/MenuGroup/useMenuGroupStyles.js.map +0 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +0 -1
- package/lib/components/MenuItem/useMenuItemStyles.js.map +0 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +0 -1
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +0 -1
- package/lib/components/MenuList/useMenuListStyles.js.map +0 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +0 -1
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +0 -1
- package/lib/components/MenuTrigger/useMenuTrigger.js.map +0 -1
- package/lib/selectable/useCheckmarkStyles.js.map +0 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +0 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +0 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +0 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +0 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +0 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +0 -1
- package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +0 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +0 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +0 -1
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +0 -1
- package/lib-commonjs/selectable/useCheckmarkStyles.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Menu/useMenu.js"],"sourcesContent":["import * as React from 'react';\nimport { usePositioningMouseTarget, usePositioning, resolvePositioningShorthand } from '@fluentui/react-positioning';\nimport { useControllableState, useId, useOnClickOutside, useEventCallback, useOnScrollOutside, useFirstMount } from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { MENU_ENTER_EVENT, useOnMenuMouseEnter } from '../../utils/index';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\n// If it's not possible to position the submenu in smaller viewports, try\n// and fallback to this order of positions\nconst submenuFallbackPositions = ['after', 'after-bottom', 'before-top', 'before', 'before-bottom', 'above'];\n/**\n * Create the state required to render Menu.\n *\n * The returned state can be modified with hooks such as useMenuStyles,\n * before being passed to renderMenu_unstable.\n *\n * @param props - props from this instance of Menu\n */\nexport const useMenu_unstable = props => {\n const isSubmenu = useIsSubmenu();\n const {\n hoverDelay = 500,\n inline = false,\n hasCheckmarks = false,\n hasIcons = false,\n closeOnScroll = false,\n openOnContext = false,\n persistOnItemClick = false,\n openOnHover = isSubmenu,\n defaultCheckedValues,\n mountNode = null\n } = props;\n const triggerId = useId('menu');\n const [contextTarget, setContextTarget] = usePositioningMouseTarget();\n const positioningState = {\n position: isSubmenu ? 'after' : 'below',\n align: isSubmenu ? 'top' : 'start',\n target: props.openOnContext ? contextTarget : undefined,\n fallbackPositions: isSubmenu ? submenuFallbackPositions : undefined,\n ...resolvePositioningShorthand(props.positioning)\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('Menu must contain at least one child');\n }\n if (children.length > 2) {\n // eslint-disable-next-line no-console\n console.warn('Menu must contain at most two children');\n }\n }\n let menuTrigger = undefined;\n let menuPopover = undefined;\n if (children.length === 2) {\n menuTrigger = children[0];\n menuPopover = children[1];\n } else if (children.length === 1) {\n menuPopover = children[0];\n }\n const {\n targetRef: triggerRef,\n containerRef: menuPopoverRef\n } = usePositioning(positioningState);\n // TODO Better way to narrow types ?\n const [open, setOpen] = useMenuOpenState({\n hoverDelay,\n isSubmenu,\n setContextTarget,\n closeOnScroll,\n menuPopoverRef,\n triggerRef,\n open: props.open,\n defaultOpen: props.defaultOpen,\n onOpenChange: props.onOpenChange,\n openOnContext\n });\n const [checkedValues, onCheckedValueChange] = useMenuSelectableState({\n checkedValues: props.checkedValues,\n defaultCheckedValues,\n onCheckedValueChange: props.onCheckedValueChange\n });\n return {\n inline,\n hoverDelay,\n triggerId,\n isSubmenu,\n openOnHover,\n contextTarget,\n setContextTarget,\n hasCheckmarks,\n hasIcons,\n closeOnScroll,\n menuTrigger,\n menuPopover,\n mountNode,\n triggerRef,\n menuPopoverRef,\n components: {},\n openOnContext,\n open,\n setOpen,\n checkedValues,\n onCheckedValueChange,\n persistOnItemClick\n };\n};\n/**\n * Adds appropriate state values and handlers for selectable items\n * i.e checkboxes and radios\n */\nconst useMenuSelectableState = props => {\n const [checkedValues, setCheckedValues] = useControllableState({\n state: props.checkedValues,\n defaultState: props.defaultCheckedValues,\n initialState: {}\n });\n const onCheckedValueChange = useEventCallback((e, {\n name,\n checkedItems\n }) => {\n var _props_onCheckedValueChange;\n (_props_onCheckedValueChange = props.onCheckedValueChange) === null || _props_onCheckedValueChange === void 0 ? void 0 : _props_onCheckedValueChange.call(props, e, {\n name,\n checkedItems\n });\n setCheckedValues(currentValue => ({\n ...currentValue,\n [name]: checkedItems\n }));\n });\n return [checkedValues, onCheckedValueChange];\n};\nconst useMenuOpenState = state => {\n const {\n targetDocument\n } = useFluent();\n const parentSetOpen = useMenuContext_unstable(context => context.setOpen);\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 setOpenTimeout = React.useRef(0);\n const enteringTriggerRef = React.useRef(false);\n const [open, setOpenState] = useControllableState({\n state: state.open,\n defaultState: state.defaultOpen,\n initialState: false\n });\n const trySetOpen = useEventCallback((e, data) => {\n const event = e instanceof CustomEvent && e.type === MENU_ENTER_EVENT ? e.detail.nativeEvent : e;\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(event, {\n ...data\n });\n if (data.open && e.type === 'contextmenu') {\n state.setContextTarget(e);\n }\n if (!data.open) {\n state.setContextTarget(undefined);\n }\n if (data.bubble) {\n parentSetOpen(e, {\n ...data\n });\n }\n setOpenState(data.open);\n });\n const setOpen = useEventCallback((e, data) => {\n clearTimeout(setOpenTimeout.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' || e.type === 'mouseenter' || e.type === 'mousemove' || e.type === MENU_ENTER_EVENT) {\n var _state_triggerRef_current;\n if ((_state_triggerRef_current = state.triggerRef.current) === null || _state_triggerRef_current === void 0 ? void 0 : _state_triggerRef_current.contains(e.target)) {\n enteringTriggerRef.current = e.type === 'mouseenter' || e.type === 'mousemove';\n }\n // FIXME leaking Node timeout type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n setOpenTimeout.current = setTimeout(() => trySetOpen(e, data), state.hoverDelay);\n } else {\n trySetOpen(e, data);\n }\n });\n useOnClickOutside({\n contains: elementContains,\n disabled: !open,\n element: targetDocument,\n refs: [state.menuPopoverRef, !state.openOnContext && state.triggerRef].filter(Boolean),\n callback: event => setOpen(event, {\n open: false,\n type: 'clickOutside',\n event\n })\n });\n // only close on scroll for context, or when closeOnScroll is specified\n const closeOnScroll = state.openOnContext || state.closeOnScroll;\n useOnScrollOutside({\n contains: elementContains,\n element: targetDocument,\n callback: event => setOpen(event, {\n open: false,\n type: 'scrollOutside',\n event\n }),\n refs: [state.menuPopoverRef, !state.openOnContext && state.triggerRef].filter(Boolean),\n disabled: !open || !closeOnScroll\n });\n useOnMenuMouseEnter({\n element: targetDocument,\n callback: event => {\n // When moving from a menu directly back to its trigger, this handler can close the menu\n // Explicitly check a flag to see if this situation happens\n if (!enteringTriggerRef.current) {\n setOpen(event, {\n open: false,\n type: 'menuMouseEnter',\n event\n });\n }\n },\n disabled: !open,\n refs: [state.menuPopoverRef]\n });\n // Clear timeout on unmount\n // Setting state after a component unmounts can cause memory leaks\n React.useEffect(() => {\n return () => {\n clearTimeout(setOpenTimeout.current);\n };\n }, []);\n // Manage focus for open state\n const {\n findFirstFocusable\n } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(state.menuPopoverRef.current);\n firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();\n }, [findFirstFocusable, state.menuPopoverRef]);\n const firstMount = useFirstMount();\n React.useEffect(() => {\n if (open) {\n focusFirst();\n } else {\n if (!firstMount) {\n if ((targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement) === (targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.body)) {\n var\n // We know that React effects are sync so we focus the trigger here\n // after any event handler (event handlers will update state and re-render).\n // Since the browser only performs the default behaviour for the Tab key once\n // keyboard events have fully bubbled up the window, the browser will move\n // focus to the next tabbable element before/after the trigger if needed.\n // If the Tab key was not pressed, focus will remain on the trigger as expected.\n _state_triggerRef_current;\n (_state_triggerRef_current = state.triggerRef.current) === null || _state_triggerRef_current === void 0 ? void 0 : _state_triggerRef_current.focus();\n }\n }\n }\n }, [state.triggerRef, state.isSubmenu, open, focusFirst, firstMount, targetDocument, state.menuPopoverRef]);\n return [open, setOpen];\n};\n//# sourceMappingURL=useMenu.js.map"],"names":["useMenu_unstable","submenuFallbackPositions","props","isSubmenu","useIsSubmenu","hoverDelay","inline","hasCheckmarks","hasIcons","closeOnScroll","openOnContext","persistOnItemClick","openOnHover","defaultCheckedValues","mountNode","triggerId","useId","contextTarget","setContextTarget","usePositioningMouseTarget","positioningState","position","align","target","undefined","fallbackPositions","resolvePositioningShorthand","positioning","children","React","Children","toArray","process","env","NODE_ENV","length","console","warn","menuTrigger","menuPopover","targetRef","triggerRef","containerRef","menuPopoverRef","usePositioning","open","setOpen","useMenuOpenState","defaultOpen","onOpenChange","checkedValues","onCheckedValueChange","useMenuSelectableState","components","setCheckedValues","useControllableState","state","defaultState","initialState","useEventCallback","e","name","checkedItems","_props_onCheckedValueChange","call","currentValue","targetDocument","useFluent","parentSetOpen","useMenuContext_unstable","context","data","_state_onOpenChange","setOpenTimeout","useRef","enteringTriggerRef","setOpenState","trySetOpen","event","CustomEvent","type","MENU_ENTER_EVENT","detail","nativeEvent","bubble","clearTimeout","current","Event","persist","_state_triggerRef_current","contains","setTimeout","useOnClickOutside","elementContains","disabled","element","refs","filter","Boolean","callback","useOnScrollOutside","useOnMenuMouseEnter","useEffect","findFirstFocusable","useFocusFinders","focusFirst","useCallback","firstFocusable","focus","firstMount","useFirstMount","activeElement","body"],"mappings":";;;;+BAoBaA;;aAAAA;;;6DApBU;kCACgE;gCAC6B;qCACpE;6BAChB;8BACA;6BACQ;uBACc;8BACzB;AAC7B,yEAAyE;AACzE,0CAA0C;AAC1C,MAAMC,2BAA2B;IAAC;IAAS;IAAgB;IAAc;IAAU;IAAiB;CAAQ;AASrG,MAAMD,mBAAmBE,CAAAA,QAAS;IACvC,MAAMC,YAAYC,IAAAA,0BAAY;IAC9B,MAAM,EACJC,YAAa,IAAG,EAChBC,QAAS,KAAK,CAAA,EACdC,eAAgB,KAAK,CAAA,EACrBC,UAAW,KAAK,CAAA,EAChBC,eAAgB,KAAK,CAAA,EACrBC,eAAgB,KAAK,CAAA,EACrBC,oBAAqB,KAAK,CAAA,EAC1BC,aAAcT,UAAS,EACvBU,qBAAoB,EACpBC,WAAY,IAAI,CAAA,EACjB,GAAGZ;IACJ,MAAMa,YAAYC,IAAAA,qBAAK,EAAC;IACxB,MAAM,CAACC,eAAeC,iBAAiB,GAAGC,IAAAA,2CAAyB;IACnE,MAAMC,mBAAmB;QACvBC,UAAUlB,YAAY,UAAU,OAAO;QACvCmB,OAAOnB,YAAY,QAAQ,OAAO;QAClCoB,QAAQrB,MAAMQ,aAAa,GAAGO,gBAAgBO,SAAS;QACvDC,mBAAmBtB,YAAYF,2BAA2BuB,SAAS;QACnE,GAAGE,IAAAA,6CAA2B,EAACxB,MAAMyB,WAAW,CAAC;IACnD;IACA,MAAMC,WAAWC,OAAMC,QAAQ,CAACC,OAAO,CAAC7B,MAAM0B,QAAQ;IACtD,IAAII,Q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MAAMC,iBAAiBJ,mBAAmB/C,MAAMb,cAAc,CAAC2C,OAAO;QACtEqB,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeC,KAAK,EAAE;IACxF,GAAG;QAACL;QAAoB/C,MAAMb,cAAc;KAAC;IAC7C,MAAMkE,aAAaC,IAAAA,6BAAa;IAChCjF,OAAMyE,SAAS,CAAC,IAAM;QACpB,IAAIzD,MAAM;YACR4D;QACF,OAAO;YACL,IAAI,CAACI,YAAY;gBACf,IAAI,AAAC3C,CAAAA,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAe6C,aAAa,AAAD,MAAQ7C,CAAAA,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAe8C,IAAI,AAAD,GAAI;oBAC5L,IACA,mEAAmE;oBACnE,4EAA4E;oBAC5E,6EAA6E;oBAC7E,0EAA0E;oBAC1E,yEAAyE;oBACzE,gFAAgF;oBAChFvB;oBACCA,CAAAA,4BAA4BjC,MAAMf,UAAU,CAAC6C,OAAO,AAAD,MAAO,IAAI,IAAIG,8BAA8B,KAAK,IAAI,KAAK,IAAIA,0BAA0BmB,KAAK,EAAE;gBACtJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,GAAG;QAACpD,MAAMf,UAAU;QAAEe,MAAMrD,SAAS;QAAE0C;QAAM4D;QAAYI;QAAY3C;QAAgBV,MAAMb,cAAc;KAAC;IAC1G,OAAO;QAACE;QAAMC;KAAQ;AACxB,GACA,mCAAmC"}
|
1
|
+
{"version":3,"sources":["../../../lib/components/Menu/useMenu.js"],"sourcesContent":["import * as React from 'react';\nimport { usePositioningMouseTarget, usePositioning, resolvePositioningShorthand } from '@fluentui/react-positioning';\nimport { useControllableState, useId, useOnClickOutside, useEventCallback, useOnScrollOutside, useFirstMount } from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { MENU_ENTER_EVENT, useOnMenuMouseEnter } from '../../utils/index';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\n// If it's not possible to position the submenu in smaller viewports, try\n// and fallback to this order of positions\nconst submenuFallbackPositions = ['after', 'after-bottom', 'before-top', 'before', 'before-bottom', 'above'];\n/**\n * Create the state required to render Menu.\n *\n * The returned state can be modified with hooks such as useMenuStyles,\n * before being passed to renderMenu_unstable.\n *\n * @param props - props from this instance of Menu\n */\nexport const useMenu_unstable = props => {\n const isSubmenu = useIsSubmenu();\n const {\n hoverDelay = 500,\n inline = false,\n hasCheckmarks = false,\n hasIcons = false,\n closeOnScroll = false,\n openOnContext = false,\n persistOnItemClick = false,\n openOnHover = isSubmenu,\n defaultCheckedValues,\n mountNode = null\n } = props;\n const triggerId = useId('menu');\n const [contextTarget, setContextTarget] = usePositioningMouseTarget();\n const positioningState = {\n position: isSubmenu ? 'after' : 'below',\n align: isSubmenu ? 'top' : 'start',\n target: props.openOnContext ? contextTarget : undefined,\n fallbackPositions: isSubmenu ? submenuFallbackPositions : undefined,\n ...resolvePositioningShorthand(props.positioning)\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('Menu must contain at least one child');\n }\n if (children.length > 2) {\n // eslint-disable-next-line no-console\n console.warn('Menu must contain at most two children');\n }\n }\n let menuTrigger = undefined;\n let menuPopover = undefined;\n if (children.length === 2) {\n menuTrigger = children[0];\n menuPopover = children[1];\n } else if (children.length === 1) {\n menuPopover = children[0];\n }\n const {\n targetRef: triggerRef,\n containerRef: menuPopoverRef\n } = usePositioning(positioningState);\n // TODO Better way to narrow types ?\n const [open, setOpen] = useMenuOpenState({\n hoverDelay,\n isSubmenu,\n setContextTarget,\n closeOnScroll,\n menuPopoverRef,\n triggerRef,\n open: props.open,\n defaultOpen: props.defaultOpen,\n onOpenChange: props.onOpenChange,\n openOnContext\n });\n const [checkedValues, onCheckedValueChange] = useMenuSelectableState({\n checkedValues: props.checkedValues,\n defaultCheckedValues,\n onCheckedValueChange: props.onCheckedValueChange\n });\n return {\n inline,\n hoverDelay,\n triggerId,\n isSubmenu,\n openOnHover,\n contextTarget,\n setContextTarget,\n hasCheckmarks,\n hasIcons,\n closeOnScroll,\n menuTrigger,\n menuPopover,\n mountNode,\n triggerRef,\n menuPopoverRef,\n components: {},\n openOnContext,\n open,\n setOpen,\n checkedValues,\n onCheckedValueChange,\n persistOnItemClick\n };\n};\n/**\n * Adds appropriate state values and handlers for selectable items\n * i.e checkboxes and radios\n */\nconst useMenuSelectableState = props => {\n const [checkedValues, setCheckedValues] = useControllableState({\n state: props.checkedValues,\n defaultState: props.defaultCheckedValues,\n initialState: {}\n });\n const onCheckedValueChange = useEventCallback((e, {\n name,\n checkedItems\n }) => {\n var _props_onCheckedValueChange;\n (_props_onCheckedValueChange = props.onCheckedValueChange) === null || _props_onCheckedValueChange === void 0 ? void 0 : _props_onCheckedValueChange.call(props, e, {\n name,\n checkedItems\n });\n setCheckedValues(currentValue => ({\n ...currentValue,\n [name]: checkedItems\n }));\n });\n return [checkedValues, onCheckedValueChange];\n};\nconst useMenuOpenState = state => {\n const {\n targetDocument\n } = useFluent();\n const parentSetOpen = useMenuContext_unstable(context => context.setOpen);\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 setOpenTimeout = React.useRef(0);\n const enteringTriggerRef = React.useRef(false);\n const [open, setOpenState] = useControllableState({\n state: state.open,\n defaultState: state.defaultOpen,\n initialState: false\n });\n const trySetOpen = useEventCallback((e, data) => {\n const event = e instanceof CustomEvent && e.type === MENU_ENTER_EVENT ? e.detail.nativeEvent : e;\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(event, {\n ...data\n });\n if (data.open && e.type === 'contextmenu') {\n state.setContextTarget(e);\n }\n if (!data.open) {\n state.setContextTarget(undefined);\n }\n if (data.bubble) {\n parentSetOpen(e, {\n ...data\n });\n }\n setOpenState(data.open);\n });\n const setOpen = useEventCallback((e, data) => {\n clearTimeout(setOpenTimeout.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' || e.type === 'mouseenter' || e.type === 'mousemove' || e.type === MENU_ENTER_EVENT) {\n var _state_triggerRef_current;\n if ((_state_triggerRef_current = state.triggerRef.current) === null || _state_triggerRef_current === void 0 ? void 0 : _state_triggerRef_current.contains(e.target)) {\n enteringTriggerRef.current = e.type === 'mouseenter' || e.type === 'mousemove';\n }\n // FIXME leaking Node timeout type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n setOpenTimeout.current = setTimeout(() => trySetOpen(e, data), state.hoverDelay);\n } else {\n trySetOpen(e, data);\n }\n });\n useOnClickOutside({\n contains: elementContains,\n disabled: !open,\n element: targetDocument,\n refs: [state.menuPopoverRef, !state.openOnContext && state.triggerRef].filter(Boolean),\n callback: event => setOpen(event, {\n open: false,\n type: 'clickOutside',\n event\n })\n });\n // only close on scroll for context, or when closeOnScroll is specified\n const closeOnScroll = state.openOnContext || state.closeOnScroll;\n useOnScrollOutside({\n contains: elementContains,\n element: targetDocument,\n callback: event => setOpen(event, {\n open: false,\n type: 'scrollOutside',\n event\n }),\n refs: [state.menuPopoverRef, !state.openOnContext && state.triggerRef].filter(Boolean),\n disabled: !open || !closeOnScroll\n });\n useOnMenuMouseEnter({\n element: targetDocument,\n callback: event => {\n // When moving from a menu directly back to its trigger, this handler can close the menu\n // Explicitly check a flag to see if this situation happens\n if (!enteringTriggerRef.current) {\n setOpen(event, {\n open: false,\n type: 'menuMouseEnter',\n event\n });\n }\n },\n disabled: !open,\n refs: [state.menuPopoverRef]\n });\n // Clear timeout on unmount\n // Setting state after a component unmounts can cause memory leaks\n React.useEffect(() => {\n return () => {\n clearTimeout(setOpenTimeout.current);\n };\n }, []);\n // Manage focus for open state\n const {\n findFirstFocusable\n } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(state.menuPopoverRef.current);\n firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();\n }, [findFirstFocusable, state.menuPopoverRef]);\n const firstMount = useFirstMount();\n React.useEffect(() => {\n if (open) {\n focusFirst();\n } else {\n if (!firstMount) {\n if ((targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement) === (targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.body)) {\n var\n // We know that React effects are sync so we focus the trigger here\n // after any event handler (event handlers will update state and re-render).\n // Since the browser only performs the default behaviour for the Tab key once\n // keyboard events have fully bubbled up the window, the browser will move\n // focus to the next tabbable element before/after the trigger if needed.\n // If the Tab key was not pressed, focus will remain on the trigger as expected.\n _state_triggerRef_current;\n (_state_triggerRef_current = state.triggerRef.current) === null || _state_triggerRef_current === void 0 ? void 0 : _state_triggerRef_current.focus();\n }\n }\n }\n // firstMount change should not re-run this effect\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.triggerRef, state.isSubmenu, open, focusFirst, targetDocument, state.menuPopoverRef]);\n return [open, setOpen];\n};\n//# sourceMappingURL=useMenu.js.map"],"names":["useMenu_unstable","submenuFallbackPositions","props","isSubmenu","useIsSubmenu","hoverDelay","inline","hasCheckmarks","hasIcons","closeOnScroll","openOnContext","persistOnItemClick","openOnHover","defaultCheckedValues","mountNode","triggerId","useId","contextTarget","setContextTarget","usePositioningMouseTarget","positioningState","position","align","target","undefined","fallbackPositions","resolvePositioningShorthand","positioning","children","React","Children","toArray","process","env","NODE_ENV","length","console","warn","menuTrigger","menuPopover","targetRef","triggerRef","containerRef","menuPopoverRef","usePositioning","open","setOpen","useMenuOpenState","defaultOpen","onOpenChange","checkedValues","onCheckedValueChange","useMenuSelectableState","components","setCheckedValues","useControllableState","state","defaultState","initialState","useEventCallback","e","name","checkedItems","_props_onCheckedValueChange","call","currentValue","targetDocument","useFluent","parentSetOpen","useMenuContext_unstable","context","data","_state_onOpenChange","setOpenTimeout","useRef","enteringTriggerRef","setOpenState","trySetOpen","event","CustomEvent","type","MENU_ENTER_EVENT","detail","nativeEvent","bubble","clearTimeout","current","Event","persist","_state_triggerRef_current","contains","setTimeout","useOnClickOutside","elementContains","disabled","element","refs","filter","Boolean","callback","useOnScrollOutside","useOnMenuMouseEnter","useEffect","findFirstFocusable","useFocusFinders","focusFirst","useCallback","firstFocusable","focus","firstMount","useFirstMount","activeElement","body"],"mappings":";;;;+BAoBaA;;aAAAA;;;6DApBU;kCACgE;gCAC6B;qCACpE;6BAChB;8BACA;6BACQ;uBACc;8BACzB;AAC7B,yEAAyE;AACzE,0CAA0C;AAC1C,MAAMC,2BAA2B;IAAC;IAAS;IAAgB;IAAc;IAAU;IAAiB;CAAQ;AASrG,MAAMD,mBAAmBE,CAAAA,QAAS;IACvC,MAAMC,YAAYC,IAAAA,0BAAY;IAC9B,MAAM,EACJC,YAAa,IAAG,EAChBC,QAAS,KAAK,CAAA,EACdC,eAAgB,KAAK,CAAA,EACrBC,UAAW,KAAK,CAAA,EAChBC,eAAgB,KAAK,CAAA,EACrBC,eAAgB,KAAK,CAAA,EACrBC,oBAAqB,KAAK,CAAA,EAC1BC,aAAcT,UAAS,EACvBU,qBAAoB,EACpBC,WAAY,IAAI,CAAA,EACjB,GAAGZ;IACJ,MAAMa,YAAYC,IAAAA,qBAAK,EAAC;IACxB,MAAM,CAACC,eAAeC,iBAAiB,GAAGC,IAAAA,2CAAyB;IACnE,MAAMC,mBAAmB;QACvBC,UAAUlB,YAAY,UAAU,OAAO;QACvCmB,OAAOnB,YAAY,QAAQ,OAAO;QAClCoB,QAAQrB,MAAMQ,aAAa,GAAGO,gBAAgBO,SAAS;QACvDC,mBAAmBtB,YAAYF,2BAA2B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/helpers/lib/_interop_require_wildcard.js").default;
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
11
11
|
const _useMenuDivider = require("./useMenuDivider");
|
12
|
-
const
|
12
|
+
const _useMenuDividerStylesStyles = require("./useMenuDividerStyles.styles");
|
13
13
|
const _renderMenuDivider = require("./renderMenuDivider");
|
14
14
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
15
15
|
const MenuDivider = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
16
16
|
const state = (0, _useMenuDivider.useMenuDivider_unstable)(props, ref);
|
17
|
-
(0,
|
18
|
-
|
19
|
-
useCustomStyles(state);
|
17
|
+
(0, _useMenuDividerStylesStyles.useMenuDividerStyles_unstable)(state);
|
18
|
+
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useMenuDividerStyles_unstable')(state);
|
20
19
|
return (0, _renderMenuDivider.renderMenuDivider_unstable)(state);
|
21
20
|
});
|
22
21
|
MenuDivider.displayName = 'MenuDivider'; //# sourceMappingURL=MenuDivider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuDivider/MenuDivider.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuDivider_unstable } from './useMenuDivider';\nimport { useMenuDividerStyles_unstable } from './useMenuDividerStyles';\nimport { renderMenuDivider_unstable } from './renderMenuDivider';\nimport {
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuDivider/MenuDivider.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuDivider_unstable } from './useMenuDivider';\nimport { useMenuDividerStyles_unstable } from './useMenuDividerStyles.styles';\nimport { renderMenuDivider_unstable } from './renderMenuDivider';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuDivider, using the `useMenuDivider_unstable` hook.\n */\nexport const MenuDivider = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useMenuDivider_unstable(props, ref);\n useMenuDividerStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuDividerStyles_unstable')(state);\n return renderMenuDivider_unstable(state);\n});\nMenuDivider.displayName = 'MenuDivider';\n//# sourceMappingURL=MenuDivider.js.map"],"names":["MenuDivider","React","forwardRef","props","ref","state","useMenuDivider_unstable","useMenuDividerStyles_unstable","useCustomStyleHook_unstable","renderMenuDivider_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;gCACiB;4CACM;mCACH;qCACC;AAIrC,MAAMA,cAAc,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACvE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,yDAA6B,EAACF;IAC9BG,IAAAA,gDAA2B,EAAC,iCAAiCH;IAC7D,OAAOI,IAAAA,6CAA0B,EAACJ;AACpC;AACAL,YAAYU,WAAW,GAAG,eAC1B,uCAAuC"}
|
@@ -7,7 +7,7 @@ _exportStar(require("./MenuDivider.types"), exports);
|
|
7
7
|
_exportStar(require("./MenuDivider"), exports);
|
8
8
|
_exportStar(require("./renderMenuDivider"), exports);
|
9
9
|
_exportStar(require("./useMenuDivider"), exports);
|
10
|
-
_exportStar(require("./useMenuDividerStyles"), exports);
|
10
|
+
_exportStar(require("./useMenuDividerStyles.styles"), exports);
|
11
11
|
//# sourceMappingURL=index.js.map
|
12
12
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuDivider/index.js"],"sourcesContent":["export * from './MenuDivider.types';\nexport * from './MenuDivider';\nexport * from './renderMenuDivider';\nexport * from './useMenuDivider';\nexport * from './useMenuDividerStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuDivider/index.js"],"sourcesContent":["export * from './MenuDivider.types';\nexport * from './MenuDivider';\nexport * from './renderMenuDivider';\nexport * from './useMenuDivider';\nexport * from './useMenuDividerStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
@@ -49,6 +49,6 @@ const useMenuDividerStyles_unstable = (state)=>{
|
|
49
49
|
const styles = useStyles();
|
50
50
|
state.root.className = (0, _react.mergeClasses)(menuDividerClassNames.root, styles.root, state.root.className);
|
51
51
|
return state;
|
52
|
-
}; //# sourceMappingURL=useMenuDividerStyles.js.map
|
52
|
+
}; //# sourceMappingURL=useMenuDividerStyles.styles.js.map
|
53
53
|
|
54
|
-
//# sourceMappingURL=useMenuDividerStyles.js.map
|
54
|
+
//# sourceMappingURL=useMenuDividerStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuDivider/useMenuDividerStyles.styles.js"],"sourcesContent":["import { shorthands, mergeClasses, __styles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const menuDividerClassNames = {\n root: 'fui-MenuDivider'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n B6of3ja: \"fvjh0tl\",\n t21cq0: [\"f1rnx978\", \"f1q7jvqi\"],\n jrapky: \"fd1gkq\",\n Frg6f3: [\"f1q7jvqi\", \"f1rnx978\"],\n a9b677: \"f14z66ap\",\n Bn0qgzm: \"f1vxd6vx\",\n oivjwe: \"fg706s2\",\n B9xav0g: \"frpde29\"\n }\n}, {\n d: [\".fvjh0tl{margin-top:4px;}\", \".f1rnx978{margin-right:-5px;}\", \".f1q7jvqi{margin-left:-5px;}\", \".fd1gkq{margin-bottom:4px;}\", \".f14z66ap{width:auto;}\", \".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}\", \".fg706s2{border-bottom-style:solid;}\", \".frpde29{border-bottom-color:var(--colorNeutralStroke2);}\"]\n});\nexport const useMenuDividerStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuDividerClassNames.root, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useMenuDividerStyles.styles.js.map"],"names":["menuDividerClassNames","useMenuDividerStyles_unstable","root","useStyles","__styles","B6of3ja","t21cq0","jrapky","Frg6f3","a9b677","Bn0qgzm","oivjwe","B9xav0g","d","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,qBAAqB,MAArBA;IAiBAC,6BAA6B,MAA7BA;;uBAnBsC;AAE5C,MAAMD,wBAAwB;IACnCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCF,MAAM;QACJG,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA6B;QAAiC;QAAgC;QAA+B;QAA0B;QAA0D;QAAwC;KAA4D;AAC3T;AACO,MAAMZ,gCAAgCa,CAAAA,QAAS;IACpD,MAAMC,SAASZ;IACfW,MAAMZ,IAAI,CAACc,SAAS,GAAGC,IAAAA,mBAAY,EAACjB,sBAAsBE,IAAI,EAAEa,OAAOb,IAAI,EAAEY,MAAMZ,IAAI,CAACc,SAAS;IACjG,OAAOF;AACT,GACA,uDAAuD"}
|
@@ -11,14 +11,13 @@ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
11
|
const _useMenuGroup = require("./useMenuGroup");
|
12
12
|
const _renderMenuGroup = require("./renderMenuGroup");
|
13
13
|
const _useMenuGroupContextValues = require("./useMenuGroupContextValues");
|
14
|
-
const
|
14
|
+
const _useMenuGroupStylesStyles = require("./useMenuGroupStyles.styles");
|
15
15
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
16
16
|
const MenuGroup = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
17
17
|
const state = (0, _useMenuGroup.useMenuGroup_unstable)(props, ref);
|
18
18
|
const contextValues = (0, _useMenuGroupContextValues.useMenuGroupContextValues_unstable)(state);
|
19
|
-
(0,
|
20
|
-
|
21
|
-
useCustomStyles(state);
|
19
|
+
(0, _useMenuGroupStylesStyles.useMenuGroupStyles_unstable)(state);
|
20
|
+
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useMenuGroupStyles_unstable')(state);
|
22
21
|
return (0, _renderMenuGroup.renderMenuGroup_unstable)(state, contextValues);
|
23
22
|
});
|
24
23
|
MenuGroup.displayName = 'MenuGroup'; //# sourceMappingURL=MenuGroup.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuGroup/MenuGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuGroup_unstable } from './useMenuGroup';\nimport { renderMenuGroup_unstable } from './renderMenuGroup';\nimport { useMenuGroupContextValues_unstable } from './useMenuGroupContextValues';\nimport { useMenuGroupStyles_unstable } from './useMenuGroupStyles';\nimport {
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuGroup/MenuGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuGroup_unstable } from './useMenuGroup';\nimport { renderMenuGroup_unstable } from './renderMenuGroup';\nimport { useMenuGroupContextValues_unstable } from './useMenuGroupContextValues';\nimport { useMenuGroupStyles_unstable } from './useMenuGroupStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuGroup, using the `useMenuGroup_unstable` hook.\n */\nexport const MenuGroup = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useMenuGroup_unstable(props, ref);\n const contextValues = useMenuGroupContextValues_unstable(state);\n useMenuGroupStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuGroupStyles_unstable')(state);\n return renderMenuGroup_unstable(state, contextValues);\n});\nMenuGroup.displayName = 'MenuGroup';\n//# sourceMappingURL=MenuGroup.js.map"],"names":["MenuGroup","React","forwardRef","props","ref","state","useMenuGroup_unstable","contextValues","useMenuGroupContextValues_unstable","useMenuGroupStyles_unstable","useCustomStyleHook_unstable","renderMenuGroup_unstable","displayName"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;8BACe;iCACG;2CACU;0CACP;qCACA;AAIrC,MAAMA,YAAY,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACrE,MAAMC,QAAQC,IAAAA,mCAAqB,EAACH,OAAOC;IAC3C,MAAMG,gBAAgBC,IAAAA,6DAAkC,EAACH;IACzDI,IAAAA,qDAA2B,EAACJ;IAC5BK,IAAAA,gDAA2B,EAAC,+BAA+BL;IAC3D,OAAOM,IAAAA,yCAAwB,EAACN,OAAOE;AACzC;AACAP,UAAUY,WAAW,GAAG,aACxB,qCAAqC"}
|
@@ -8,7 +8,7 @@ _exportStar(require("./MenuGroup"), exports);
|
|
8
8
|
_exportStar(require("./renderMenuGroup"), exports);
|
9
9
|
_exportStar(require("./useMenuGroup"), exports);
|
10
10
|
_exportStar(require("./useMenuGroupContextValues"), exports);
|
11
|
-
_exportStar(require("./useMenuGroupStyles"), exports);
|
11
|
+
_exportStar(require("./useMenuGroupStyles.styles"), exports);
|
12
12
|
//# sourceMappingURL=index.js.map
|
13
13
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuGroup/index.js"],"sourcesContent":["export * from './MenuGroup.types';\nexport * from './MenuGroup';\nexport * from './renderMenuGroup';\nexport * from './useMenuGroup';\nexport * from './useMenuGroupContextValues';\nexport * from './useMenuGroupStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuGroup/index.js"],"sourcesContent":["export * from './MenuGroup.types';\nexport * from './MenuGroup';\nexport * from './renderMenuGroup';\nexport * from './useMenuGroup';\nexport * from './useMenuGroupContextValues';\nexport * from './useMenuGroupStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
package/lib-commonjs/components/MenuGroup/{useMenuGroupStyles.js → useMenuGroupStyles.styles.js}
RENAMED
@@ -19,6 +19,6 @@ const menuGroupClassNames = {
|
|
19
19
|
const useMenuGroupStyles_unstable = (state)=>{
|
20
20
|
state.root.className = (0, _react.mergeClasses)(menuGroupClassNames.root, state.root.className);
|
21
21
|
return state;
|
22
|
-
}; //# sourceMappingURL=useMenuGroupStyles.js.map
|
22
|
+
}; //# sourceMappingURL=useMenuGroupStyles.styles.js.map
|
23
23
|
|
24
|
-
//# sourceMappingURL=useMenuGroupStyles.js.map
|
24
|
+
//# sourceMappingURL=useMenuGroupStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuGroup/useMenuGroupStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nexport const menuGroupClassNames = {\n root: 'fui-MenuGroup'\n};\nexport const useMenuGroupStyles_unstable = state => {\n state.root.className = mergeClasses(menuGroupClassNames.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useMenuGroupStyles.styles.js.map"],"names":["menuGroupClassNames","useMenuGroupStyles_unstable","root","state","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,mBAAmB,MAAnBA;IAGAC,2BAA2B,MAA3BA;;uBAJgB;AACtB,MAAMD,sBAAsB;IACjCE,MAAM;AACR;AACO,MAAMD,8BAA8BE,CAAAA,QAAS;IAClDA,MAAMD,IAAI,CAACE,SAAS,GAAGC,IAAAA,mBAAY,EAACL,oBAAoBE,IAAI,EAAEC,MAAMD,IAAI,CAACE,SAAS;IAClF,OAAOD;AACT,GACA,qDAAqD"}
|
@@ -9,14 +9,13 @@ Object.defineProperty(exports, "MenuGroupHeader", {
|
|
9
9
|
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
11
11
|
const _useMenuGroupHeader = require("./useMenuGroupHeader");
|
12
|
-
const
|
12
|
+
const _useMenuGroupHeaderStylesStyles = require("./useMenuGroupHeaderStyles.styles");
|
13
13
|
const _renderMenuGroupHeader = require("./renderMenuGroupHeader");
|
14
14
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
15
15
|
const MenuGroupHeader = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
16
16
|
const state = (0, _useMenuGroupHeader.useMenuGroupHeader_unstable)(props, ref);
|
17
|
-
(0,
|
18
|
-
|
19
|
-
useCustomStyles(state);
|
17
|
+
(0, _useMenuGroupHeaderStylesStyles.useMenuGroupHeaderStyles_unstable)(state);
|
18
|
+
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useMenuGroupHeaderStyles_unstable')(state);
|
20
19
|
return (0, _renderMenuGroupHeader.renderMenuGroupHeader_unstable)(state);
|
21
20
|
});
|
22
21
|
MenuGroupHeader.displayName = 'MenuGroupHeader'; //# sourceMappingURL=MenuGroupHeader.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuGroupHeader/MenuGroupHeader.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuGroupHeader_unstable } from './useMenuGroupHeader';\nimport { useMenuGroupHeaderStyles_unstable } from './useMenuGroupHeaderStyles';\nimport { renderMenuGroupHeader_unstable } from './renderMenuGroupHeader';\nimport {
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuGroupHeader/MenuGroupHeader.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuGroupHeader_unstable } from './useMenuGroupHeader';\nimport { useMenuGroupHeaderStyles_unstable } from './useMenuGroupHeaderStyles.styles';\nimport { renderMenuGroupHeader_unstable } from './renderMenuGroupHeader';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuGroupHeader, using the `useMenuGroupHeader_unstable` hook.\n */\nexport const MenuGroupHeader = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useMenuGroupHeader_unstable(props, ref);\n useMenuGroupHeaderStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuGroupHeaderStyles_unstable')(state);\n return renderMenuGroupHeader_unstable(state);\n});\nMenuGroupHeader.displayName = 'MenuGroupHeader';\n//# sourceMappingURL=MenuGroupHeader.js.map"],"names":["MenuGroupHeader","React","forwardRef","props","ref","state","useMenuGroupHeader_unstable","useMenuGroupHeaderStyles_unstable","useCustomStyleHook_unstable","renderMenuGroupHeader_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;oCACqB;gDACM;uCACH;qCACH;AAIrC,MAAMA,kBAAkB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC3E,MAAMC,QAAQC,IAAAA,+CAA2B,EAACH,OAAOC;IACjDG,IAAAA,iEAAiC,EAACF;IAClCG,IAAAA,gDAA2B,EAAC,qCAAqCH;IACjE,OAAOI,IAAAA,qDAA8B,EAACJ;AACxC;AACAL,gBAAgBU,WAAW,GAAG,mBAC9B,2CAA2C"}
|
@@ -7,7 +7,7 @@ _exportStar(require("./MenuGroupHeader.types"), exports);
|
|
7
7
|
_exportStar(require("./MenuGroupHeader"), exports);
|
8
8
|
_exportStar(require("./renderMenuGroupHeader"), exports);
|
9
9
|
_exportStar(require("./useMenuGroupHeader"), exports);
|
10
|
-
_exportStar(require("./useMenuGroupHeaderStyles"), exports);
|
10
|
+
_exportStar(require("./useMenuGroupHeaderStyles.styles"), exports);
|
11
11
|
//# sourceMappingURL=index.js.map
|
12
12
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuGroupHeader/index.js"],"sourcesContent":["export * from './MenuGroupHeader.types';\nexport * from './MenuGroupHeader';\nexport * from './renderMenuGroupHeader';\nexport * from './useMenuGroupHeader';\nexport * from './useMenuGroupHeaderStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuGroupHeader/index.js"],"sourcesContent":["export * from './MenuGroupHeader.types';\nexport * from './MenuGroupHeader';\nexport * from './renderMenuGroupHeader';\nexport * from './useMenuGroupHeader';\nexport * from './useMenuGroupHeaderStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
@@ -49,6 +49,6 @@ const useMenuGroupHeaderStyles_unstable = (state)=>{
|
|
49
49
|
const styles = useStyles();
|
50
50
|
state.root.className = (0, _react.mergeClasses)(menuGroupHeaderClassNames.root, styles.root, state.root.className);
|
51
51
|
return state;
|
52
|
-
}; //# sourceMappingURL=useMenuGroupHeaderStyles.js.map
|
52
|
+
}; //# sourceMappingURL=useMenuGroupHeaderStyles.styles.js.map
|
53
53
|
|
54
|
-
//# sourceMappingURL=useMenuGroupHeaderStyles.js.map
|
54
|
+
//# sourceMappingURL=useMenuGroupHeaderStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js"],"sourcesContent":["import { mergeClasses, __styles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const menuGroupHeaderClassNames = {\n root: 'fui-MenuGroupHeader'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Be2twd7: \"fy9rknc\",\n sj55zd: \"f11d4kpn\",\n uwmqm3: [\"fjlbh76\", \"f11qrl6u\"],\n z189sj: [\"f11qrl6u\", \"fjlbh76\"],\n Bhrd7zp: \"fl43uef\",\n Bqenvij: \"f1d2rq10\",\n mc9l5x: \"f22iagw\",\n Bt984gj: \"f122n59\"\n }\n}, {\n d: [\".fy9rknc{font-size:var(--fontSizeBase200);}\", \".f11d4kpn{color:var(--colorNeutralForeground3);}\", \".fjlbh76{padding-left:12px;}\", \".f11qrl6u{padding-right:12px;}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\", \".f1d2rq10{height:32px;}\", \".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}\", \".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}\"]\n});\nexport const useMenuGroupHeaderStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuGroupHeaderClassNames.root, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useMenuGroupHeaderStyles.styles.js.map"],"names":["menuGroupHeaderClassNames","useMenuGroupHeaderStyles_unstable","root","useStyles","__styles","Be2twd7","sj55zd","uwmqm3","z189sj","Bhrd7zp","Bqenvij","mc9l5x","Bt984gj","d","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,yBAAyB,MAAzBA;IAiBAC,iCAAiC,MAAjCA;;uBAnB0B;AAEhC,MAAMD,4BAA4B;IACvCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCF,MAAM;QACJG,SAAS;QACTC,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA+C;QAAoD;QAAgC;QAAkC;QAAoD;QAA2B;QAAwF;KAA0G;AAC5b;AACO,MAAMZ,oCAAoCa,CAAAA,QAAS;IACxD,MAAMC,SAASZ;IACfW,MAAMZ,IAAI,CAACc,SAAS,GAAGC,IAAAA,mBAAY,EAACjB,0BAA0BE,IAAI,EAAEa,OAAOb,IAAI,EAAEY,MAAMZ,IAAI,CAACc,SAAS;IACrG,OAAOF;AACT,GACA,2DAA2D"}
|
@@ -10,13 +10,12 @@ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildc
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
11
11
|
const _useMenuItem = require("./useMenuItem");
|
12
12
|
const _renderMenuItem = require("./renderMenuItem");
|
13
|
-
const
|
13
|
+
const _useMenuItemStylesStyles = require("./useMenuItemStyles.styles");
|
14
14
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
15
15
|
const MenuItem = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
16
16
|
const state = (0, _useMenuItem.useMenuItem_unstable)(props, ref);
|
17
|
-
(0,
|
18
|
-
|
19
|
-
useCustomStyles(state);
|
17
|
+
(0, _useMenuItemStylesStyles.useMenuItemStyles_unstable)(state);
|
18
|
+
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useMenuItemStyles_unstable')(state);
|
20
19
|
return (0, _renderMenuItem.renderMenuItem_unstable)(state);
|
21
20
|
});
|
22
21
|
MenuItem.displayName = 'MenuItem'; //# sourceMappingURL=MenuItem.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuItem/MenuItem.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItem_unstable } from './useMenuItem';\nimport { renderMenuItem_unstable } from './renderMenuItem';\nimport { useMenuItemStyles_unstable } from './useMenuItemStyles';\nimport {
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuItem/MenuItem.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItem_unstable } from './useMenuItem';\nimport { renderMenuItem_unstable } from './renderMenuItem';\nimport { useMenuItemStyles_unstable } from './useMenuItemStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuItem, using the `useMenuItem_unstable` and `useMenuItemStyles_unstable` hook.\n */\nexport const MenuItem = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useMenuItem_unstable(props, ref);\n useMenuItemStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuItemStyles_unstable')(state);\n return renderMenuItem_unstable(state);\n});\nMenuItem.displayName = 'MenuItem';\n//# sourceMappingURL=MenuItem.js.map"],"names":["MenuItem","React","forwardRef","props","ref","state","useMenuItem_unstable","useMenuItemStyles_unstable","useCustomStyleHook_unstable","renderMenuItem_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;6BACc;gCACG;yCACG;qCACC;AAIrC,MAAMA,WAAW,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACpE,MAAMC,QAAQC,IAAAA,iCAAoB,EAACH,OAAOC;IAC1CG,IAAAA,mDAA0B,EAACF;IAC3BG,IAAAA,gDAA2B,EAAC,8BAA8BH;IAC1D,OAAOI,IAAAA,uCAAuB,EAACJ;AACjC;AACAL,SAASU,WAAW,GAAG,YACvB,oCAAoC"}
|
@@ -7,7 +7,7 @@ _exportStar(require("./MenuItem"), exports);
|
|
7
7
|
_exportStar(require("./MenuItem.types"), exports);
|
8
8
|
_exportStar(require("./renderMenuItem"), exports);
|
9
9
|
_exportStar(require("./useMenuItem"), exports);
|
10
|
-
_exportStar(require("./useMenuItemStyles"), exports);
|
10
|
+
_exportStar(require("./useMenuItemStyles.styles"), exports);
|
11
11
|
//# sourceMappingURL=index.js.map
|
12
12
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuItem/index.js"],"sourcesContent":["export * from './MenuItem';\nexport * from './MenuItem.types';\nexport * from './renderMenuItem';\nexport * from './useMenuItem';\nexport * from './useMenuItemStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuItem/index.js"],"sourcesContent":["export * from './MenuItem';\nexport * from './MenuItem.types';\nexport * from './renderMenuItem';\nexport * from './useMenuItem';\nexport * from './useMenuItemStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
package/lib-commonjs/components/MenuItem/{useMenuItemStyles.js → useMenuItemStyles.styles.js}
RENAMED
@@ -320,6 +320,6 @@ const useMenuItemStyles_unstable = (state)=>{
|
|
320
320
|
state.submenuIndicator.className = (0, _react.mergeClasses)(menuItemClassNames.submenuIndicator, styles.submenuIndicator, state.submenuIndicator.className);
|
321
321
|
}
|
322
322
|
(0, _index.useCheckmarkStyles_unstable)(state);
|
323
|
-
}; //# sourceMappingURL=useMenuItemStyles.js.map
|
323
|
+
}; //# sourceMappingURL=useMenuItemStyles.styles.js.map
|
324
324
|
|
325
|
-
//# sourceMappingURL=useMenuItemStyles.js.map
|
325
|
+
//# sourceMappingURL=useMenuItemStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuItem/useMenuItemStyles.styles.js"],"sourcesContent":["import { mergeClasses, __styles, shorthands } from '@griffel/react';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nexport const menuItemClassNames = {\n root: 'fui-MenuItem',\n icon: 'fui-MenuItem__icon',\n checkmark: 'fui-MenuItem__checkmark',\n submenuIndicator: 'fui-MenuItem__submenuIndicator',\n content: 'fui-MenuItem__content',\n secondaryContent: 'fui-MenuItem__secondaryContent'\n};\nconst useStyles = /*#__PURE__*/__styles({\n focusIndicator: {\n Brovlpu: \"ftqa4ok\",\n B486eqv: \"f2hkw1w\",\n B8q5s1w: \"f8hki3x\",\n Bci5o5g: [\"f1d2448m\", \"ffh67wi\"],\n n8qw10: \"f1bjia2o\",\n Bdrgwmp: [\"ffh67wi\", \"f1d2448m\"],\n Bm4h7ae: \"f15bsgw9\",\n B7ys5i9: \"f14e48fq\",\n Busjfv9: \"f18yb2kv\",\n Bhk32uz: \"fd6o370\",\n Bf4ptjt: \"fh1cnn4\",\n kclons: [\"fy7oxxb\", \"f184ne2d\"],\n Bhdgwq3: \"fpukqih\",\n Blkhhs4: [\"f184ne2d\", \"fy7oxxb\"],\n Bqtpl0w: \"frrh606\",\n clg4pj: [\"f1v5zibi\", \"fo2hd23\"],\n hgwjuy: \"ful5kiu\",\n Bonggc9: [\"fo2hd23\", \"f1v5zibi\"],\n B1tsrr9: [\"f1jqcqds\", \"ftffrms\"],\n Dah5zi: [\"ftffrms\", \"f1jqcqds\"],\n Bkh64rk: [\"f2e7qr6\", \"fsr1zz6\"],\n qqdqy8: [\"fsr1zz6\", \"f2e7qr6\"],\n B6dhp37: \"f1dvezut\",\n i03rao: [\"fd0oaoj\", \"f1cwg4i8\"],\n Boxcth7: \"fjvm52t\",\n Bsom6fd: [\"f1cwg4i8\", \"fd0oaoj\"],\n J0r882: \"fdiulkx\",\n Bjwuhne: \"f1yalx80\",\n Ghsupd: [\"fq22d5a\", \"f1jw7pan\"],\n Bule8hv: [\"f1jw7pan\", \"fq22d5a\"]\n },\n root: {\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"],\n qhf8xq: \"f10pi13n\",\n sj55zd: \"fkfq4zb\",\n De3pzq: \"fxugw4r\",\n z189sj: [\"f81rol6\", \"frdkuqy\"],\n uwmqm3: [\"frdkuqy\", \"f81rol6\"],\n Bqenvij: \"f1d2rq10\",\n mc9l5x: \"f22iagw\",\n Bt984gj: \"f122n59\",\n Be2twd7: \"fkhj508\",\n Bceei9c: \"f1k6fduh\",\n i8kkvl: \"f1q8lukm\",\n Belr9w4: \"f1ma2n7n\",\n Jwef8y: \"f1knas48\",\n Bi91k9c: \"fnwyq0v\",\n Bk3fhr4: \"ft1hn21\",\n Bmfj8id: \"fuxngvv\",\n Bg7n49j: \"fp258yr\",\n famaaq: \"f1xqy1su\"\n },\n content: {\n uwmqm3: [\"f161knb0\", \"f12huiiw\"],\n z189sj: [\"f12huiiw\", \"f161knb0\"],\n De3pzq: \"f3rmtva\",\n Bh6795r: \"fqerorx\"\n },\n secondaryContent: {\n uwmqm3: [\"f161knb0\", \"f12huiiw\"],\n z189sj: [\"f12huiiw\", \"f161knb0\"],\n sj55zd: \"f11d4kpn\",\n Bi91k9c: \"f1jp5ecu\",\n t0hwav: \"fc1cou1\"\n },\n icon: {\n a9b677: \"f64fuq3\",\n Bqenvij: \"fjamq6b\",\n Be2twd7: \"fe5j1ua\",\n Bg96gwp: \"fez10in\",\n Bt984gj: \"f122n59\",\n mc9l5x: \"ftuwxu6\",\n Brf1p80: \"f4d9j23\"\n },\n submenuIndicator: {\n a9b677: \"f64fuq3\",\n Bqenvij: \"fjamq6b\",\n Be2twd7: \"fe5j1ua\",\n Bg96gwp: \"fez10in\",\n Bt984gj: \"f122n59\",\n mc9l5x: \"ftuwxu6\",\n Brf1p80: \"f4d9j23\"\n },\n disabled: {\n sj55zd: \"f1s2aq7o\",\n Bi91k9c: \"fvgxktp\",\n Bk3fhr4: \"f19vpps7\",\n Bmfj8id: \"fv5swzo\",\n Bg7n49j: \"f1q1x1ba\",\n t0hwav: \"ft33916\",\n Bbusuzp: \"f1dcs8yz\",\n ze5xyy: \"f1kc2mi9\",\n Bctn1xl: \"fk56vqo\",\n Bh6z0a4: \"f1ikwg0d\"\n }\n}, {\n f: [\".ftqa4ok:focus{outline-style:none;}\", \".fc1cou1:focus{color:var(--colorNeutralForeground3Hover);}\", \".ft33916:focus{color:var(--colorNeutralForegroundDisabled);}\"],\n i: [\".f2hkw1w:focus-visible{outline-style:none;}\"],\n d: [\".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}\", \".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}\", \".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}\", \".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}\", \".f15bsgw9[data-fui-focus-visible]::after{content:\\\"\\\";}\", \".f14e48fq[data-fui-focus-visible]::after{position:absolute;}\", \".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}\", \".fd6o370[data-fui-focus-visible]::after{z-index:1;}\", \".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}\", \".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}\", \".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}\", \".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}\", \".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}\", \".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}\", \".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}\", \".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}\", \".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}\", \".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}\", \".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}\", \".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}\", \".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}\", \".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}\", \".fdiulkx[data-fui-focus-visible]::after{top:-2px;}\", \".f1yalx80[data-fui-focus-visible]::after{bottom:-2px;}\", \".fq22d5a[data-fui-focus-visible]::after{left:-2px;}\", \".f1jw7pan[data-fui-focus-visible]::after{right:-2px;}\", \".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);}\", \".f10pi13n{position:relative;}\", \".fkfq4zb{color:var(--colorNeutralForeground2);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f81rol6{padding-right:10px;}\", \".frdkuqy{padding-left:10px;}\", \".f1d2rq10{height:32px;}\", \".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}\", \".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".f1k6fduh{cursor:pointer;}\", \".f1q8lukm{-webkit-column-gap:4px;column-gap:4px;}\", \".f1ma2n7n{row-gap:4px;}\", \".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}\", \".f161knb0{padding-left:2px;}\", \".f12huiiw{padding-right:2px;}\", \".f3rmtva{background-color:transparent;}\", \".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}\", \".f11d4kpn{color:var(--colorNeutralForeground3);}\", \".f64fuq3{width:20px;}\", \".fjamq6b{height:20px;}\", \".fe5j1ua{font-size:20px;}\", \".fez10in{line-height:0;}\", \".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}\", \".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\"],\n h: [\".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}\", \".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}\", \".ft1hn21:hover .fui-Icon-filled{display:inline;}\", \".fuxngvv:hover .fui-Icon-regular{display:none;}\", \".fp258yr:hover .fui-MenuItem__icon{color:var(--colorNeutralForeground2BrandSelected);}\", \".f1jp5ecu:hover{color:var(--colorNeutralForeground3Hover);}\", \".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}\", \".f19vpps7:hover .fui-Icon-filled{display:none;}\", \".fv5swzo:hover .fui-Icon-regular{display:inline;}\", \".f1q1x1ba:hover .fui-MenuItem__icon{color:var(--colorNeutralForegroundDisabled);}\"],\n m: [[\"@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1kc2mi9:hover{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fk56vqo:hover .fui-MenuItem__icon{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1ikwg0d:focus{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\n/** Applies style classnames to slots */\nexport const useMenuItemStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuItemClassNames.root, styles.root, styles.focusIndicator, state.disabled && styles.disabled, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuItemClassNames.content, styles.content, state.content.className);\n }\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemClassNames.checkmark, state.checkmark.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(menuItemClassNames.secondaryContent, !state.disabled && styles.secondaryContent, state.secondaryContent.className);\n }\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemClassNames.icon, styles.icon, state.icon.className);\n }\n if (state.submenuIndicator) {\n state.submenuIndicator.className = mergeClasses(menuItemClassNames.submenuIndicator, styles.submenuIndicator, state.submenuIndicator.className);\n }\n useCheckmarkStyles_unstable(state);\n};\n//# sourceMappingURL=useMenuItemStyles.styles.js.map"],"names":["menuItemClassNames","useMenuItemStyles_unstable","root","icon","checkmark","submenuIndicator","content","secondaryContent","useStyles","__styles","focusIndicator","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bjwuhne","Ghsupd","Bule8hv","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","qhf8xq","sj55zd","De3pzq","z189sj","uwmqm3","Bqenvij","mc9l5x","Bt984gj","Be2twd7","Bceei9c","i8kkvl","Belr9w4","Jwef8y","Bi91k9c","Bk3fhr4","Bmfj8id","Bg7n49j","famaaq","Bh6795r","t0hwav","a9b677","Bg96gwp","Brf1p80","disabled","Bbusuzp","ze5xyy","Bctn1xl","Bh6z0a4","f","i","d","h","m","state","styles","className","mergeClasses","useCheckmarkStyles_unstable"],"mappings":";;;;;;;;;;;IAKaA,kBAAkB,MAAlBA;IA4HAC,0BAA0B,MAA1BA;;uBAjIsC;uBAIP;AACrC,MAAMD,qBAAqB;IAChCE,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,kBAAkB;IAClBC,SAAS;IACTC,kBAAkB;AACpB;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,gBAAgB;QACdC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,QAAQ;QACRC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,QAAQ;QACRC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;YAAC;YAAY;SAAU;QAChCC,QAAQ;YAAC;YAAW;SAAW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OzE,OAAO,EAAEwE,MAAMxE,OAAO,CAAC0E,SAAS;IAC5G,CAAC;IACD,IAAIF,MAAM1E,SAAS,EAAE;QACnB0E,MAAM1E,SAAS,CAAC4E,SAAS,GAAGC,IAAAA,mBAAY,EAACjF,mBAAmBI,SAAS,EAAE0E,MAAM1E,SAAS,CAAC4E,SAAS;IAClG,CAAC;IACD,IAAIF,MAAMvE,gBAAgB,EAAE;QAC1BuE,MAAMvE,gBAAgB,CAACyE,SAAS,GAAGC,IAAAA,mBAAY,EAACjF,mBAAmBO,gBAAgB,EAAE,CAACuE,MAAMV,QAAQ,IAAIW,OAAOxE,gBAAgB,EAAEuE,MAAMvE,gBAAgB,CAACyE,SAAS;IACnK,CAAC;IACD,IAAIF,MAAM3E,IAAI,EAAE;QACd2E,MAAM3E,IAAI,CAAC6E,SAAS,GAAGC,IAAAA,mBAAY,EAACjF,mBAAmBG,IAAI,EAAE4E,OAAO5E,IAAI,EAAE2E,MAAM3E,IAAI,CAAC6E,SAAS;IAChG,CAAC;IACD,IAAIF,MAAMzE,gBAAgB,EAAE;QAC1ByE,MAAMzE,gBAAgB,CAAC2E,SAAS,GAAGC,IAAAA,mBAAY,EAACjF,mBAAmBK,gBAAgB,EAAE0E,OAAO1E,gBAAgB,EAAEyE,MAAMzE,gBAAgB,CAAC2E,SAAS;IAChJ,CAAC;IACDE,IAAAA,kCAA2B,EAACJ;AAC9B,GACA,oDAAoD"}
|
@@ -10,13 +10,12 @@ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildc
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
11
11
|
const _useMenuItemCheckbox = require("./useMenuItemCheckbox");
|
12
12
|
const _renderMenuItemCheckbox = require("./renderMenuItemCheckbox");
|
13
|
-
const
|
13
|
+
const _useMenuItemCheckboxStylesStyles = require("./useMenuItemCheckboxStyles.styles");
|
14
14
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
15
15
|
const MenuItemCheckbox = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
16
16
|
const state = (0, _useMenuItemCheckbox.useMenuItemCheckbox_unstable)(props, ref);
|
17
|
-
(0,
|
18
|
-
|
19
|
-
useCustomStyles(state);
|
17
|
+
(0, _useMenuItemCheckboxStylesStyles.useMenuItemCheckboxStyles_unstable)(state);
|
18
|
+
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useMenuItemCheckboxStyles_unstable')(state);
|
20
19
|
return (0, _renderMenuItemCheckbox.renderMenuItemCheckbox_unstable)(state);
|
21
20
|
});
|
22
21
|
MenuItemCheckbox.displayName = 'MenuItemCheckbox'; //# sourceMappingURL=MenuItemCheckbox.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuItemCheckbox/MenuItemCheckbox.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemCheckbox_unstable } from './useMenuItemCheckbox';\nimport { renderMenuItemCheckbox_unstable } from './renderMenuItemCheckbox';\nimport { useMenuItemCheckboxStyles_unstable } from './useMenuItemCheckboxStyles';\nimport {
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuItemCheckbox/MenuItemCheckbox.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemCheckbox_unstable } from './useMenuItemCheckbox';\nimport { renderMenuItemCheckbox_unstable } from './renderMenuItemCheckbox';\nimport { useMenuItemCheckboxStyles_unstable } from './useMenuItemCheckboxStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.\n */\nexport const MenuItemCheckbox = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useMenuItemCheckbox_unstable(props, ref);\n useMenuItemCheckboxStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuItemCheckboxStyles_unstable')(state);\n return renderMenuItemCheckbox_unstable(state);\n});\nMenuItemCheckbox.displayName = 'MenuItemCheckbox';\n//# sourceMappingURL=MenuItemCheckbox.js.map"],"names":["MenuItemCheckbox","React","forwardRef","props","ref","state","useMenuItemCheckbox_unstable","useMenuItemCheckboxStyles_unstable","useCustomStyleHook_unstable","renderMenuItemCheckbox_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;qCACsB;wCACG;iDACG;qCACP;AAIrC,MAAMA,mBAAmB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC5E,MAAMC,QAAQC,IAAAA,iDAA4B,EAACH,OAAOC;IAClDG,IAAAA,mEAAkC,EAACF;IACnCG,IAAAA,gDAA2B,EAAC,sCAAsCH;IAClE,OAAOI,IAAAA,uDAA+B,EAACJ;AACzC;AACAL,iBAAiBU,WAAW,GAAG,oBAC/B,4CAA4C"}
|
@@ -7,7 +7,7 @@ _exportStar(require("./MenuItemCheckbox.types"), exports);
|
|
7
7
|
_exportStar(require("./MenuItemCheckbox"), exports);
|
8
8
|
_exportStar(require("./renderMenuItemCheckbox"), exports);
|
9
9
|
_exportStar(require("./useMenuItemCheckbox"), exports);
|
10
|
-
_exportStar(require("./useMenuItemCheckboxStyles"), exports);
|
10
|
+
_exportStar(require("./useMenuItemCheckboxStyles.styles"), exports);
|
11
11
|
//# sourceMappingURL=index.js.map
|
12
12
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuItemCheckbox/index.js"],"sourcesContent":["export * from './MenuItemCheckbox.types';\nexport * from './MenuItemCheckbox';\nexport * from './renderMenuItemCheckbox';\nexport * from './useMenuItemCheckbox';\nexport * from './useMenuItemCheckboxStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuItemCheckbox/index.js"],"sourcesContent":["export * from './MenuItemCheckbox.types';\nexport * from './MenuItemCheckbox';\nexport * from './renderMenuItemCheckbox';\nexport * from './useMenuItemCheckbox';\nexport * from './useMenuItemCheckboxStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
@@ -14,7 +14,7 @@ _export(exports, {
|
|
14
14
|
});
|
15
15
|
const _react = require("@griffel/react");
|
16
16
|
const _index = require("../../selectable/index");
|
17
|
-
const
|
17
|
+
const _useMenuItemStylesStyles = require("../MenuItem/useMenuItemStyles.styles");
|
18
18
|
const menuItemCheckboxClassNames = {
|
19
19
|
root: 'fui-MenuItemCheckbox',
|
20
20
|
icon: 'fui-MenuItemCheckbox__icon',
|
@@ -36,8 +36,8 @@ const useMenuItemCheckboxStyles_unstable = (state)=>{
|
|
36
36
|
if (state.checkmark) {
|
37
37
|
state.checkmark.className = (0, _react.mergeClasses)(menuItemCheckboxClassNames.checkmark, state.checkmark.className);
|
38
38
|
}
|
39
|
-
(0,
|
39
|
+
(0, _useMenuItemStylesStyles.useMenuItemStyles_unstable)(state);
|
40
40
|
(0, _index.useCheckmarkStyles_unstable)(state);
|
41
|
-
}; //# sourceMappingURL=useMenuItemCheckboxStyles.js.map
|
41
|
+
}; //# sourceMappingURL=useMenuItemCheckboxStyles.styles.js.map
|
42
42
|
|
43
|
-
//# sourceMappingURL=useMenuItemCheckboxStyles.js.map
|
43
|
+
//# sourceMappingURL=useMenuItemCheckboxStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\nexport const menuItemCheckboxClassNames = {\n root: 'fui-MenuItemCheckbox',\n icon: 'fui-MenuItemCheckbox__icon',\n checkmark: 'fui-MenuItemCheckbox__checkmark',\n content: 'fui-MenuItemCheckbox__content',\n secondaryContent: 'fui-MenuItemCheckbox__secondaryContent'\n};\nexport const useMenuItemCheckboxStyles_unstable = state => {\n state.root.className = mergeClasses(menuItemCheckboxClassNames.root, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuItemCheckboxClassNames.content, state.content.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(menuItemCheckboxClassNames.secondaryContent, state.secondaryContent.className);\n }\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemCheckboxClassNames.icon, state.icon.className);\n }\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemCheckboxClassNames.checkmark, state.checkmark.className);\n }\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n//# sourceMappingURL=useMenuItemCheckboxStyles.styles.js.map"],"names":["menuItemCheckboxClassNames","useMenuItemCheckboxStyles_unstable","root","icon","checkmark","content","secondaryContent","state","className","mergeClasses","useMenuItemStyles_unstable","useCheckmarkStyles_unstable"],"mappings":";;;;;;;;;;;IAGaA,0BAA0B,MAA1BA;IAOAC,kCAAkC,MAAlCA;;uBAVgB;uBACe;yCACD;AACpC,MAAMD,6BAA6B;IACxCE,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,SAAS;IACTC,kBAAkB;AACpB;AACO,MAAML,qCAAqCM,CAAAA,QAAS;IACzDA,MAAML,IAAI,CAACM,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BE,IAAI,EAAEK,MAAML,IAAI,CAACM,SAAS;IACzF,IAAID,MAAMF,OAAO,EAAE;QACjBE,MAAMF,OAAO,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BK,OAAO,EAAEE,MAAMF,OAAO,CAACG,SAAS;IACpG,CAAC;IACD,IAAID,MAAMD,gBAAgB,EAAE;QAC1BC,MAAMD,gBAAgB,CAACE,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BM,gBAAgB,EAAEC,MAAMD,gBAAgB,CAACE,SAAS;IAC/H,CAAC;IACD,IAAID,MAAMJ,IAAI,EAAE;QACdI,MAAMJ,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BG,IAAI,EAAEI,MAAMJ,IAAI,CAACK,SAAS;IAC3F,CAAC;IACD,IAAID,MAAMH,SAAS,EAAE;QACnBG,MAAMH,SAAS,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACT,2BAA2BI,SAAS,EAAEG,MAAMH,SAAS,CAACI,SAAS;IAC1G,CAAC;IACDE,IAAAA,mDAA0B,EAACH;IAC3BI,IAAAA,kCAA2B,EAACJ;AAC9B,GACA,4DAA4D"}
|
@@ -10,13 +10,12 @@ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildc
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
11
11
|
const _useMenuItemRadio = require("./useMenuItemRadio");
|
12
12
|
const _renderMenuItemRadio = require("./renderMenuItemRadio");
|
13
|
-
const
|
13
|
+
const _useMenuItemRadioStylesStyles = require("./useMenuItemRadioStyles.styles");
|
14
14
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
15
15
|
const MenuItemRadio = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
16
16
|
const state = (0, _useMenuItemRadio.useMenuItemRadio_unstable)(props, ref);
|
17
|
-
(0,
|
18
|
-
|
19
|
-
useCustomStyles(state);
|
17
|
+
(0, _useMenuItemRadioStylesStyles.useMenuItemRadioStyles_unstable)(state);
|
18
|
+
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useMenuItemRadioStyles_unstable')(state);
|
20
19
|
return (0, _renderMenuItemRadio.renderMenuItemRadio_unstable)(state);
|
21
20
|
});
|
22
21
|
MenuItemRadio.displayName = 'MenuItemRadio'; //# sourceMappingURL=MenuItemRadio.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuItemRadio/MenuItemRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemRadio_unstable } from './useMenuItemRadio';\nimport { renderMenuItemRadio_unstable } from './renderMenuItemRadio';\nimport { useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles';\nimport {
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuItemRadio/MenuItemRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuItemRadio_unstable } from './useMenuItemRadio';\nimport { renderMenuItemRadio_unstable } from './renderMenuItemRadio';\nimport { useMenuItemRadioStyles_unstable } from './useMenuItemRadioStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.\n */\nexport const MenuItemRadio = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useMenuItemRadio_unstable(props, ref);\n useMenuItemRadioStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuItemRadioStyles_unstable')(state);\n return renderMenuItemRadio_unstable(state);\n});\nMenuItemRadio.displayName = 'MenuItemRadio';\n//# sourceMappingURL=MenuItemRadio.js.map"],"names":["MenuItemRadio","React","forwardRef","props","ref","state","useMenuItemRadio_unstable","useMenuItemRadioStyles_unstable","useCustomStyleHook_unstable","renderMenuItemRadio_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;kCACmB;qCACG;8CACG;qCACJ;AAIrC,MAAMA,gBAAgB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACzE,MAAMC,QAAQC,IAAAA,2CAAyB,EAACH,OAAOC;IAC/CG,IAAAA,6DAA+B,EAACF;IAChCG,IAAAA,gDAA2B,EAAC,mCAAmCH;IAC/D,OAAOI,IAAAA,iDAA4B,EAACJ;AACtC;AACAL,cAAcU,WAAW,GAAG,iBAC5B,yCAAyC"}
|
@@ -7,7 +7,7 @@ _exportStar(require("./MenuItemRadio.types"), exports);
|
|
7
7
|
_exportStar(require("./MenuItemRadio"), exports);
|
8
8
|
_exportStar(require("./renderMenuItemRadio"), exports);
|
9
9
|
_exportStar(require("./useMenuItemRadio"), exports);
|
10
|
-
_exportStar(require("./useMenuItemRadioStyles"), exports);
|
10
|
+
_exportStar(require("./useMenuItemRadioStyles.styles"), exports);
|
11
11
|
//# sourceMappingURL=index.js.map
|
12
12
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuItemRadio/index.js"],"sourcesContent":["export * from './MenuItemRadio.types';\nexport * from './MenuItemRadio';\nexport * from './renderMenuItemRadio';\nexport * from './useMenuItemRadio';\nexport * from './useMenuItemRadioStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuItemRadio/index.js"],"sourcesContent":["export * from './MenuItemRadio.types';\nexport * from './MenuItemRadio';\nexport * from './renderMenuItemRadio';\nexport * from './useMenuItemRadio';\nexport * from './useMenuItemRadioStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
@@ -14,7 +14,7 @@ _export(exports, {
|
|
14
14
|
});
|
15
15
|
const _react = require("@griffel/react");
|
16
16
|
const _index = require("../../selectable/index");
|
17
|
-
const
|
17
|
+
const _useMenuItemStylesStyles = require("../MenuItem/useMenuItemStyles.styles");
|
18
18
|
const menuItemRadioClassNames = {
|
19
19
|
root: 'fui-MenuItemRadio',
|
20
20
|
icon: 'fui-MenuItemRadio__icon',
|
@@ -36,8 +36,8 @@ const useMenuItemRadioStyles_unstable = (state)=>{
|
|
36
36
|
if (state.checkmark) {
|
37
37
|
state.checkmark.className = (0, _react.mergeClasses)(menuItemRadioClassNames.checkmark, state.checkmark.className);
|
38
38
|
}
|
39
|
-
(0,
|
39
|
+
(0, _useMenuItemStylesStyles.useMenuItemStyles_unstable)(state);
|
40
40
|
(0, _index.useCheckmarkStyles_unstable)(state);
|
41
|
-
}; //# sourceMappingURL=useMenuItemRadioStyles.js.map
|
41
|
+
}; //# sourceMappingURL=useMenuItemRadioStyles.styles.js.map
|
42
42
|
|
43
|
-
//# sourceMappingURL=useMenuItemRadioStyles.js.map
|
43
|
+
//# sourceMappingURL=useMenuItemRadioStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuItemRadio/useMenuItemRadioStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles.styles';\nexport const menuItemRadioClassNames = {\n root: 'fui-MenuItemRadio',\n icon: 'fui-MenuItemRadio__icon',\n checkmark: 'fui-MenuItemRadio__checkmark',\n content: 'fui-MenuItemRadio__content',\n secondaryContent: 'fui-MenuItemRadio__secondaryContent'\n};\nexport const useMenuItemRadioStyles_unstable = state => {\n state.root.className = mergeClasses(menuItemRadioClassNames.root, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuItemRadioClassNames.content, state.content.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(menuItemRadioClassNames.secondaryContent, state.secondaryContent.className);\n }\n if (state.icon) {\n state.icon.className = mergeClasses(menuItemRadioClassNames.icon, state.icon.className);\n }\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(menuItemRadioClassNames.checkmark, state.checkmark.className);\n }\n useMenuItemStyles_unstable(state);\n useCheckmarkStyles_unstable(state);\n};\n//# sourceMappingURL=useMenuItemRadioStyles.styles.js.map"],"names":["menuItemRadioClassNames","useMenuItemRadioStyles_unstable","root","icon","checkmark","content","secondaryContent","state","className","mergeClasses","useMenuItemStyles_unstable","useCheckmarkStyles_unstable"],"mappings":";;;;;;;;;;;IAGaA,uBAAuB,MAAvBA;IAOAC,+BAA+B,MAA/BA;;uBAVgB;uBACe;yCACD;AACpC,MAAMD,0BAA0B;IACrCE,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,SAAS;IACTC,kBAAkB;AACpB;AACO,MAAML,kCAAkCM,CAAAA,QAAS;IACtDA,MAAML,IAAI,CAACM,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBE,IAAI,EAAEK,MAAML,IAAI,CAACM,SAAS;IACtF,IAAID,MAAMF,OAAO,EAAE;QACjBE,MAAMF,OAAO,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBK,OAAO,EAAEE,MAAMF,OAAO,CAACG,SAAS;IACjG,CAAC;IACD,IAAID,MAAMD,gBAAgB,EAAE;QAC1BC,MAAMD,gBAAgB,CAACE,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBM,gBAAgB,EAAEC,MAAMD,gBAAgB,CAACE,SAAS;IAC5H,CAAC;IACD,IAAID,MAAMJ,IAAI,EAAE;QACdI,MAAMJ,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBG,IAAI,EAAEI,MAAMJ,IAAI,CAACK,SAAS;IACxF,CAAC;IACD,IAAID,MAAMH,SAAS,EAAE;QACnBG,MAAMH,SAAS,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACT,wBAAwBI,SAAS,EAAEG,MAAMH,SAAS,CAACI,SAAS;IACvG,CAAC;IACDE,IAAAA,mDAA0B,EAACH;IAC3BI,IAAAA,kCAA2B,EAACJ;AAC9B,GACA,yDAAyD"}
|
@@ -11,14 +11,13 @@ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
11
|
const _useMenuList = require("./useMenuList");
|
12
12
|
const _renderMenuList = require("./renderMenuList");
|
13
13
|
const _useMenuListContextValues = require("./useMenuListContextValues");
|
14
|
-
const
|
14
|
+
const _useMenuListStylesStyles = require("./useMenuListStyles.styles");
|
15
15
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
16
16
|
const MenuList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
17
17
|
const state = (0, _useMenuList.useMenuList_unstable)(props, ref);
|
18
18
|
const contextValues = (0, _useMenuListContextValues.useMenuListContextValues_unstable)(state);
|
19
|
-
(0,
|
20
|
-
|
21
|
-
useCustomStyles(state);
|
19
|
+
(0, _useMenuListStylesStyles.useMenuListStyles_unstable)(state);
|
20
|
+
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useMenuListStyles_unstable')(state);
|
22
21
|
return (0, _renderMenuList.renderMenuList_unstable)(state, contextValues);
|
23
22
|
});
|
24
23
|
MenuList.displayName = 'MenuList'; //# sourceMappingURL=MenuList.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/MenuList/MenuList.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuList_unstable } from './useMenuList';\nimport { renderMenuList_unstable } from './renderMenuList';\nimport { useMenuListContextValues_unstable } from './useMenuListContextValues';\nimport { useMenuListStyles_unstable } from './useMenuListStyles';\nimport {
|
1
|
+
{"version":3,"sources":["../../../lib/components/MenuList/MenuList.js"],"sourcesContent":["import * as React from 'react';\nimport { useMenuList_unstable } from './useMenuList';\nimport { renderMenuList_unstable } from './renderMenuList';\nimport { useMenuListContextValues_unstable } from './useMenuListContextValues';\nimport { useMenuListStyles_unstable } from './useMenuListStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Define a styled MenuList, using the `useMenuList_unstable` hook.\n */\nexport const MenuList = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useMenuList_unstable(props, ref);\n const contextValues = useMenuListContextValues_unstable(state);\n useMenuListStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuListStyles_unstable')(state);\n return renderMenuList_unstable(state, contextValues);\n});\nMenuList.displayName = 'MenuList';\n//# sourceMappingURL=MenuList.js.map"],"names":["MenuList","React","forwardRef","props","ref","state","useMenuList_unstable","contextValues","useMenuListContextValues_unstable","useMenuListStyles_unstable","useCustomStyleHook_unstable","renderMenuList_unstable","displayName"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;6BACc;gCACG;0CACU;yCACP;qCACC;AAIrC,MAAMA,WAAW,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACpE,MAAMC,QAAQC,IAAAA,iCAAoB,EAACH,OAAOC;IAC1C,MAAMG,gBAAgBC,IAAAA,2DAAiC,EAACH;IACxDI,IAAAA,mDAA0B,EAACJ;IAC3BK,IAAAA,gDAA2B,EAAC,8BAA8BL;IAC1D,OAAOM,IAAAA,uCAAuB,EAACN,OAAOE;AACxC;AACAP,SAASY,WAAW,GAAG,YACvB,oCAAoC"}
|