@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 21.9 kB
Source Map (JSON)
{"version":3,"file":"menu.cjs","names":["createSlotComponent","menuStyle","MenuRoot: FC<MenuRootProps>","usePopoverProps","useMenu","MenuDescendantsContext","MenuContext","MainMenuContext","styled","useMenuContext","rest","Fragment","items","index","useMenuGroupContext","useMenuGroup","MenuGroupContext","useMenuOptionGroup","MenuOptionGroupContext","useMenuItem","ChevronRightIcon","useMenuOptionItem","CircleSmallIcon","CheckIcon"],"sources":["../../../../src/components/menu/menu.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, ReactElement, ReactNode } from \"react\"\nimport type {\n Direction,\n GenericsComponent,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n WithoutThemeProps,\n} from \"../../core\"\nimport type { MenuStyle } from \"./menu.style\"\nimport type {\n MenuOptionGroupType,\n MenuOptionGroupValue,\n UseMenuGroupProps,\n UseMenuItemProps,\n UseMenuOptionGroupProps,\n UseMenuOptionItemProps,\n UseMenuProps,\n UseMenuReturn,\n} from \"./use-menu\"\nimport { Fragment, useMemo, useState } from \"react\"\nimport { createSlotComponent, styled } from \"../../core\"\nimport { cast, handlerAll } from \"../../utils\"\nimport { CheckIcon, ChevronRightIcon, CircleSmallIcon } from \"../icon\"\nimport { Popover, usePopoverProps } from \"../popover\"\nimport { menuStyle } from \"./menu.style\"\nimport {\n MainMenuContext,\n MenuContext,\n MenuDescendantsContext,\n MenuGroupContext,\n MenuOptionGroupContext,\n useMenu,\n useMenuContext,\n useMenuGroup,\n useMenuGroupContext,\n useMenuItem,\n useMenuOptionGroup,\n useMenuOptionItem,\n} from \"./use-menu\"\n\ninterface MenuSharedItem {\n label?: ReactNode\n}\n\ninterface MenuItemWithValue extends MenuSharedItem, MenuItemProps {}\n\ninterface MenuOptionItem extends MenuSharedItem, MenuOptionItemProps {}\n\ninterface MenuItemWithSeparator extends MenuSeparatorProps {\n type: \"separator\"\n}\n\ninterface MenuItemWithRadioGroup<Y extends string = string>\n extends Omit<MenuItemWithItems, \"defaultValue\" | \"items\" | \"onChange\">,\n MenuOptionGroupProps<\"radio\", Y> {\n type: \"radio\"\n items?: MenuOptionItem[]\n}\n\ninterface MenuItemWithCheckboxGroup<Y extends string[] = string[]>\n extends Omit<MenuItemWithItems, \"defaultValue\" | \"items\" | \"onChange\">,\n MenuOptionGroupProps<\"checkbox\", Y> {\n type: \"checkbox\"\n items?: MenuOptionItem[]\n}\n\ninterface MenuItemWithItems extends MenuSharedItem, MenuGroupProps {\n hasEndSeparator?: boolean\n hasSeparator?: boolean\n hasStartSeparator?: boolean\n items?: MenuItemWithValue[]\n labelProps?: MenuLabelProps\n}\n\nexport type MenuItem =\n | MenuItemWithCheckboxGroup\n | MenuItemWithItems\n | MenuItemWithRadioGroup\n | MenuItemWithSeparator\n | MenuItemWithValue\n\ninterface ComponentContext\n extends Pick<\n UseMenuReturn,\n | \"getContentProps\"\n | \"getContextTriggerProps\"\n | \"getSeparatorProps\"\n | \"getTriggerProps\"\n > {}\n\nexport interface MenuRootProps\n extends UseMenuProps,\n Omit<\n WithoutThemeProps<Popover.RootProps, MenuStyle>,\n \"autoFocus\" | \"modal\" | \"updateRef\" | \"withCloseButton\"\n >,\n ThemeProps<MenuStyle> {\n /**\n * The placement of the popper relative to its reference.\n *\n * @default 'end-start'\n */\n placement?: Direction\n}\n\nconst {\n ComponentContext,\n PropsContext: MenuPropsContext,\n StyleContext,\n useComponentContext,\n usePropsContext: useMenuPropsContext,\n withContext,\n useRootComponentProps,\n} = createSlotComponent<MenuRootProps, MenuStyle, ComponentContext>(\n \"menu\",\n menuStyle,\n)\n\nexport { MenuPropsContext, useMenuPropsContext }\n\n/**\n * `Menu` is a component that displays a common dropdown menu.\n *\n * @see https://yamada-ui.com/docs/components/menu\n */\nexport const MenuRoot: FC<MenuRootProps> = (props) => {\n const [styleContext, mergedProps] = useRootComponentProps(props)\n const [\n { animationScheme, initialFocusRef, offset, placement, ...popoverProps },\n { children, disabled, ...rest },\n ] = usePopoverProps(mergedProps, [\n \"disabled\",\n \"open\",\n \"defaultOpen\",\n \"onOpen\",\n \"onClose\",\n ])\n const {\n closeOnSelect,\n descendants,\n open,\n subMenu,\n subMenuDirection,\n updateRef,\n getContentProps,\n getContextTriggerProps,\n getSeparatorProps,\n getTriggerProps,\n onActiveDescendant,\n onClose,\n onCloseRef,\n onCloseSubMenu,\n onOpen,\n onSelect,\n } = useMenu({ disabled, ...rest })\n const mergedPopoverProps = useMemo<Popover.RootProps>(\n () => ({\n ...popoverProps,\n animationScheme:\n animationScheme ?? (subMenu ? \"inline-start\" : \"block-start\"),\n autoFocus: !!initialFocusRef,\n disabled,\n initialFocusRef,\n offset: offset ?? (subMenu ? [0, 0] : undefined),\n open,\n placement:\n placement ?? (subMenu ? `center-${subMenuDirection}` : \"end-start\"),\n updateRef,\n onClose,\n onOpen,\n }),\n [\n animationScheme,\n disabled,\n initialFocusRef,\n offset,\n onClose,\n onOpen,\n open,\n placement,\n popoverProps,\n subMenu,\n subMenuDirection,\n updateRef,\n ],\n )\n const menuContext = useMemo(\n () => ({\n subMenu,\n subMenuDirection,\n onActiveDescendant,\n onClose,\n onCloseSubMenu,\n onOpen,\n onSelect,\n }),\n [\n onClose,\n onOpen,\n onSelect,\n onActiveDescendant,\n subMenu,\n subMenuDirection,\n onCloseSubMenu,\n ],\n )\n const mainMenuContext = useMemo(\n () => ({\n closeOnSelect,\n descendants,\n onActiveDescendant,\n onCloseRef,\n onSelect,\n }),\n [closeOnSelect, descendants, onActiveDescendant, onCloseRef, onSelect],\n )\n const componentContext = useMemo(\n () => ({\n getContentProps,\n getContextTriggerProps,\n getSeparatorProps,\n getTriggerProps,\n }),\n [\n getContentProps,\n getContextTriggerProps,\n getSeparatorProps,\n getTriggerProps,\n ],\n )\n\n return (\n <StyleContext value={styleContext}>\n <MenuDescendantsContext value={descendants}>\n <MenuContext value={menuContext}>\n <MainMenuContext value={mainMenuContext}>\n <ComponentContext value={componentContext}>\n <Popover.Root {...mergedPopoverProps}>{children}</Popover.Root>\n </ComponentContext>\n </MainMenuContext>\n </MenuContext>\n </MenuDescendantsContext>\n </StyleContext>\n )\n}\n\nexport interface MenuTriggerProps extends Popover.TriggerProps {}\n\nexport const MenuTrigger = withContext<\"button\", MenuTriggerProps>(\n Popover.Trigger,\n \"trigger\",\n)(undefined, (props) => {\n const { getTriggerProps } = useComponentContext()\n\n return cast<HTMLProps<\"button\">>(getTriggerProps(cast<HTMLProps>(props)))\n})\n\ninterface Rect {\n left: number\n top: number\n}\n\nexport interface MenuContextTriggerProps extends HTMLProps {}\n\nexport const MenuContextTrigger = withContext<\"div\", MenuContextTriggerProps>(\n ({ children, onContextMenu, ...rest }) => {\n const [rect, setRect] = useState<Rect>({\n left: 0,\n top: 0,\n })\n const { getContextTriggerProps } = useComponentContext()\n\n return (\n <>\n <MenuAnchor>\n <styled.div style={{ position: \"fixed\", ...rect }} />\n </MenuAnchor>\n\n <styled.div\n asChild\n {...getContextTriggerProps({\n onContextMenu: handlerAll(onContextMenu, (ev) => {\n setRect({ left: ev.clientX, top: ev.clientY })\n }),\n ...rest,\n })}\n >\n {children}\n </styled.div>\n </>\n )\n },\n \"contextTrigger\",\n)()\n\nexport interface MenuAnchorProps extends Popover.AnchorProps {}\n\nexport const MenuAnchor = withContext<\"div\", MenuAnchorProps>(\n Popover.Anchor,\n \"anchor\",\n)()\n\nexport interface MenuContentProps extends Popover.ContentProps {\n /**\n * The footer of the menu.\n */\n footer?: ReactNode\n /**\n * The header of the menu.\n */\n header?: ReactNode\n /**\n * If provided, generate elements based on items.\n */\n items?: MenuItem[]\n /**\n * Props for the footer component.\n */\n footerProps?: MenuFooterProps\n /**\n * Props for the header component.\n */\n headerProps?: MenuHeaderProps\n}\n\nexport const MenuContent = withContext<\"div\", MenuContentProps>(\n Popover.Content,\n \"content\",\n)(\n undefined,\n ({\n children,\n footer,\n header,\n items = [],\n footerProps,\n headerProps,\n portalProps,\n ...rest\n }) => {\n const { subMenu } = useMenuContext()\n const { getContentProps } = useComponentContext()\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return (\n <>\n {header ? <MenuHeader {...headerProps}>{header}</MenuHeader> : null}\n\n {items.map((props, index) => {\n if (\"type\" in props) {\n if (props.type === \"radio\") {\n const {\n type,\n hasSeparator = true,\n hasEndSeparator = hasSeparator,\n hasStartSeparator = hasSeparator,\n items = [],\n ...rest\n } = props\n\n return (\n <Fragment key={index}>\n {hasStartSeparator ? <MenuSeparator /> : null}\n\n <MenuOptionGroup type={type} {...rest}>\n {items.map(({ label, ...rest }, index) => (\n <MenuOptionItem key={index} {...rest}>\n {label}\n </MenuOptionItem>\n ))}\n </MenuOptionGroup>\n\n {hasEndSeparator ? <MenuSeparator /> : null}\n </Fragment>\n )\n } else if (props.type === \"checkbox\") {\n const {\n type,\n hasSeparator = true,\n hasEndSeparator = hasSeparator,\n hasStartSeparator = hasSeparator,\n items = [],\n ...rest\n } = props\n\n return (\n <Fragment key={index}>\n {hasStartSeparator ? <MenuSeparator /> : null}\n\n <MenuOptionGroup type={type} {...rest}>\n {items.map(({ label, ...rest }, index) => (\n <MenuOptionItem key={index} {...rest}>\n {label}\n </MenuOptionItem>\n ))}\n </MenuOptionGroup>\n\n {hasEndSeparator ? <MenuSeparator /> : null}\n </Fragment>\n )\n } else {\n return <MenuSeparator key={index} />\n }\n } else if (\"items\" in props) {\n const {\n hasSeparator = true,\n hasEndSeparator = hasSeparator,\n hasStartSeparator = hasSeparator,\n items = [],\n ...rest\n } = props\n\n return (\n <Fragment key={index}>\n {hasStartSeparator ? <MenuSeparator /> : null}\n\n <MenuGroup {...rest}>\n {items.map(({ label, ...rest }, index) => (\n <MenuItem key={index} {...rest}>\n {label}\n </MenuItem>\n ))}\n </MenuGroup>\n\n {hasEndSeparator ? <MenuSeparator /> : null}\n </Fragment>\n )\n } else if (\"value\" in props) {\n const { label, ...rest } = props\n\n return (\n <MenuItem key={index} {...rest}>\n {label}\n </MenuItem>\n )\n }\n })}\n\n {footer ? <MenuFooter {...footerProps}>{footer}</MenuFooter> : null}\n </>\n )\n }, [children, footer, footerProps, header, headerProps, items])\n\n return {\n ...getContentProps(\n cast<HTMLProps>({ ...rest, children: computedChildren }),\n ),\n portalProps: subMenu ? { ...portalProps, disabled: true } : portalProps,\n }\n },\n)\n\nexport interface MenuHeaderProps extends HTMLStyledProps {}\n\nexport const MenuHeader = withContext<\"div\", MenuHeaderProps>(\n \"div\",\n \"header\",\n)({ \"data-header\": \"\" })\n\nexport interface MenuFooterProps extends HTMLStyledProps {}\n\nexport const MenuFooter = withContext<\"div\", MenuFooterProps>(\n \"div\",\n \"footer\",\n)({ \"data-footer\": \"\" })\n\nexport interface MenuLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const MenuLabel = withContext<\"span\", MenuLabelProps>(\"span\", \"label\")(\n undefined,\n (props) => {\n const { getLabelProps } = useMenuGroupContext()\n\n return getLabelProps(props)\n },\n)\n\nexport interface MenuGroupProps extends UseMenuGroupProps, HTMLStyledProps {\n /**\n * The label of the group.\n */\n label?: ReactNode\n /**\n * Props for the label component.\n */\n labelProps?: MenuLabelProps\n}\n\nexport const MenuGroup = withContext<\"div\", MenuGroupProps>(\n ({ children, label, labelProps, ...rest }) => {\n const { getGroupProps, getLabelProps } = useMenuGroup(rest)\n const context = useMemo(() => ({ getLabelProps }), [getLabelProps])\n\n return (\n <MenuGroupContext value={context}>\n <styled.div {...getGroupProps()}>\n {label ? <MenuLabel {...labelProps}>{label}</MenuLabel> : null}\n {children}\n </styled.div>\n </MenuGroupContext>\n )\n },\n \"group\",\n)()\n\nexport interface MenuOptionGroupProps<\n Y extends MenuOptionGroupType = \"checkbox\",\n M extends MenuOptionGroupValue<Y> = MenuOptionGroupValue<Y>,\n> extends UseMenuOptionGroupProps<Y, M>,\n Omit<MenuGroupProps, \"defaultValue\" | \"onChange\"> {}\n\nexport const MenuOptionGroup = withContext<\"div\", MenuOptionGroupProps>(\n ({\n type: typeProp,\n defaultValue,\n value: valueProp,\n onChange: onChangeProp,\n ...rest\n }) => {\n const { type, value, onChange } = useMenuOptionGroup({\n type: typeProp,\n defaultValue,\n value: valueProp,\n onChange: onChangeProp,\n })\n const context = useMemo(\n () => ({ type, value, onChange }),\n [type, value, onChange],\n )\n\n return (\n <MenuOptionGroupContext value={context}>\n <MenuGroup {...rest} />\n </MenuOptionGroupContext>\n )\n },\n { name: \"optionGroup\", slot: [\"group\", \"option\"] },\n)() as GenericsComponent<{\n <\n Y extends MenuOptionGroupType = \"checkbox\",\n M extends MenuOptionGroupValue<Y> = MenuOptionGroupValue<Y>,\n >(\n props: MenuOptionGroupProps<Y, M>,\n ): ReactElement\n}>\n\nexport interface MenuItemProps extends HTMLStyledProps, UseMenuItemProps {}\n\nexport const MenuItem = withContext<\"div\", MenuItemProps>(\n ({ children, ...rest }) => {\n const { subMenuTrigger, getItemProps } = useMenuItem(rest)\n\n return (\n <styled.div {...getItemProps()}>\n {children}\n\n {subMenuTrigger ? (\n <MenuIndicator as={ChevronRightIcon} ms=\"auto\" />\n ) : null}\n </styled.div>\n )\n },\n \"item\",\n)()\n\nexport interface MenuOptionItemProps\n extends HTMLStyledProps,\n UseMenuOptionItemProps {\n /**\n * The icon to be used in the menu option item.\n */\n icon?: ReactNode\n}\n\nexport const MenuOptionItem = withContext<\"div\", MenuOptionItemProps>(\n ({ children, icon, ...rest }) => {\n const { type, getIndicatorProps, getOptionItemProps } =\n useMenuOptionItem(rest)\n\n return (\n <styled.div {...getOptionItemProps()}>\n <MenuIndicator {...getIndicatorProps()}>\n {icon ||\n (type === \"radio\" ? (\n <CircleSmallIcon fill=\"currentColor\" />\n ) : (\n <CheckIcon />\n ))}\n </MenuIndicator>\n {children}\n </styled.div>\n )\n },\n { name: \"optionItem\", slot: [\"item\", \"option\"] },\n)()\n\nexport interface MenuIndicatorProps extends HTMLStyledProps {}\n\nexport const MenuIndicator = withContext<\"div\", MenuIndicatorProps>(\n \"div\",\n \"indicator\",\n)()\n\nexport interface MenuCommandProps extends HTMLStyledProps<\"kbd\"> {}\n\nexport const MenuCommand = withContext<\"kbd\", MenuCommandProps>(\n \"kbd\",\n \"command\",\n)()\n\nexport interface MenuSeparatorProps extends HTMLStyledProps<\"hr\"> {}\n\nexport const MenuSeparator = withContext<\"hr\", MenuSeparatorProps>(\n \"hr\",\n \"separator\",\n)(undefined, (props) => {\n const { getSeparatorProps } = useComponentContext()\n\n return getSeparatorProps(props)\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4GA,MAAM,EACJ,kBACA,cAAc,kBACd,cACA,qBACA,iBAAiB,qBACjB,aACA,0BACEA,6CACF,QACAC,6BACD;;;;;;AASD,MAAaC,YAA+B,UAAU;CACpD,MAAM,CAAC,cAAc,eAAe,sBAAsB,MAAM;CAChE,MAAM,CACJ,EAAE,iBAAiB,iBAAiB,QAAQ,UAAW,GAAG,gBAC1D,EAAE,UAAU,SAAU,GAAG,UACvBC,oCAAgB,aAAa;EAC/B;EACA;EACA;EACA;EACA;EACD,CAAC;CACF,MAAM,EACJ,eACA,aACA,MACA,SACA,kBACA,WACA,iBACA,wBACA,mBACA,iBACA,oBACA,SACA,YACA,gBACA,QACA,aACEC,yBAAQ;EAAE;EAAU,GAAG;EAAM,CAAC;CAClC,MAAM,+CACG;EACL,GAAG;EACH,iBACE,oBAAoB,UAAU,iBAAiB;EACjD,WAAW,CAAC,CAAC;EACb;EACA;EACA,QAAQ,WAAW,UAAU,CAAC,GAAG,EAAE,GAAG;EACtC;EACA,WACE,cAAc,UAAU,UAAU,qBAAqB;EACzD;EACA;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;AA8CD,QACE,2CAAC;EAAa,OAAO;YACnB,2CAACC;GAAuB,OAAO;aAC7B,2CAACC;IAAY,iCA/CV;KACL;KACA;KACA;KACA;KACA;KACA;KACA;KACD,GACD;KACE;KACA;KACA;KACA;KACA;KACA;KACA;KACD,CACF;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