@mantine-vue/contextmenu 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.cjs +319 -360
- package/cjs/index.cjs.map +1 -1
- package/esm/index.mjs +315 -356
- package/esm/index.mjs.map +1 -1
- package/lib/components/ContextMenu/ContextMenu.vue.d.ts +9 -0
- package/lib/components/ContextMenu/index.d.ts +2 -0
- package/lib/components/ContextMenuDivider/ContextMenuDivider.vue.d.ts +5 -0
- package/lib/components/ContextMenuDivider/index.d.ts +2 -0
- package/lib/components/ContextMenuItem/ContextMenuItem.vue.d.ts +9 -0
- package/lib/components/ContextMenuItem/index.d.ts +2 -0
- package/lib/components/ContextMenuOverlay/ContextMenuOverlay.vue.d.ts +21 -0
- package/lib/components/ContextMenuOverlay/index.d.ts +1 -0
- package/lib/components/ContextMenuPortal/ContextMenuPortal.vue.d.ts +8 -0
- package/lib/components/ContextMenuPortal/index.d.ts +2 -0
- package/lib/components/ContextMenuProvider/ContextMenuProvider.vue.d.ts +14 -0
- package/lib/components/ContextMenuProvider/index.d.ts +4 -0
- package/lib/index.d.mts +6 -6
- package/lib/index.d.ts +6 -6
- package/lib/types.d.ts +11 -2
- package/lib/utils.d.ts +1 -1
- package/package.json +3 -3
- package/lib/ContextMenu.d.ts +0 -4
- package/lib/ContextMenuDivider.d.ts +0 -14
- package/lib/ContextMenuItem.d.ts +0 -9
- package/lib/ContextMenuOverlay.d.ts +0 -25
- package/lib/ContextMenuPortal.d.ts +0 -33
- package/lib/ContextMenuProvider.d.ts +0 -93
package/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../src/utils.ts","../src/ContextMenuDivider.ts","../src/context.ts","../src/ContextMenuItem.ts","../src/ContextMenu.ts","../src/ContextMenuOverlay.ts","../src/ContextMenuPortal.ts","../src/ContextMenuProvider.ts"],"sourcesContent":["import type { ContextMenuStyle, ContextMenuStyles } from './types'\nimport type { MantineStyle, MantineTheme } from '@mantine-vue/core'\n\n/** Returns a humanized version of a string, for example \"camelCase\" becomes \"Camel Case\". */\nexport function humanize(value: string) {\n const str = value\n .replace(/([a-z\\d])([A-Z]+)/g, '$1 $2')\n .replace(/\\W|_/g, ' ')\n .trim()\n .toLowerCase()\n\n return `${str.charAt(0).toUpperCase()}${str.slice(1)}`\n}\n\nexport function resolveContextMenuStyle(\n style: ContextMenuStyle | undefined,\n theme: MantineTheme,\n): MantineStyle | undefined {\n return typeof style === 'function' ? style(theme) : style\n}\n\nexport function resolveContextMenuStyles(\n styles: ContextMenuStyles | ((theme: MantineTheme) => ContextMenuStyles) | undefined,\n theme: MantineTheme,\n) {\n return typeof styles === 'function' ? styles(theme) : styles\n}\n","import { defineComponent, h, type PropType } from 'vue'\nimport { Box, useMantineTheme } from '@mantine-vue/core'\nimport { resolveContextMenuStyle } from './utils'\nimport type { ContextMenuDividerProps, ContextMenuStyle } from './types'\nimport './ContextMenuDivider.css'\n\nexport const ContextMenuDivider = defineComponent({\n name: 'ContextMenuDivider',\n props: {\n className: { type: String, default: undefined },\n style: {\n type: [Object, Function] as PropType<ContextMenuStyle>,\n default: undefined,\n },\n },\n setup(props: ContextMenuDividerProps) {\n const theme = useMantineTheme()\n\n return () =>\n h(Box, {\n class: ['mantine-contextmenu-divider', props.className],\n style: resolveContextMenuStyle(props.style, theme.value),\n })\n },\n})\n","import { inject, readonly, ref, type InjectionKey, type Ref } from 'vue'\nimport type { ContextMenuContextValue, ContextMenuSettings } from './types'\n\nexport interface ResolvedContextMenuSettings {\n shadow: NonNullable<ContextMenuSettings['shadow']>\n borderRadius: NonNullable<ContextMenuSettings['borderRadius']>\n submenuDelay: number\n repositionOnRepeat: boolean\n}\n\nexport const ContextMenuSettingsKey = Symbol('ContextMenuSettings') as InjectionKey<\n Ref<ResolvedContextMenuSettings>\n>\n\nexport const ContextMenuKey = Symbol('ContextMenu') as InjectionKey<ContextMenuContextValue>\n\nconst hidden = readonly(ref(false))\nconst fallback: ContextMenuContextValue = {\n showContextMenu: () => () => undefined,\n hideContextMenu: () => undefined,\n isContextMenuVisible: hidden,\n}\n\nexport function useContextMenu() {\n return inject(ContextMenuKey, fallback)\n}\n\nexport function useContextMenuSettings() {\n return inject(ContextMenuSettingsKey, {\n value: {\n shadow: 'sm',\n borderRadius: 'xs',\n submenuDelay: 500,\n repositionOnRepeat: false,\n },\n } as Ref<ResolvedContextMenuSettings>)\n}\n","import {\n defineComponent,\n h,\n ref,\n type DefineComponent,\n type PropType,\n type SlotsType,\n type VNode,\n type VNodeChild,\n} from 'vue'\nimport {\n Box,\n parseThemeColor,\n resolveNode,\n rgba,\n UnstyledButton,\n useMantineTheme,\n type MantineColor,\n type MantineNode,\n} from '@mantine-vue/core'\nimport { useMediaQuery, useTimeout } from '@mantine-vue/hooks'\nimport { ContextMenu } from './ContextMenu'\nimport { useContextMenuSettings } from './context'\nimport { resolveContextMenuStyle } from './utils'\nimport type {\n ContextMenuItemOptions,\n ContextMenuItemProps,\n ContextMenuSubmenuProps,\n ContextMenuStyle,\n} from './types'\nimport './ContextMenuItem.css'\n\nexport interface ContextMenuItemSlots {\n title?: () => VNodeChild\n icon?: () => VNodeChild\n iconRight?: () => VNodeChild\n}\n\nexport const ContextMenuItem = defineComponent({\n name: 'ContextMenuItem',\n slots: Object as SlotsType<ContextMenuItemSlots>,\n props: {\n title: {\n type: null as unknown as PropType<MantineNode>,\n default: undefined,\n },\n icon: {\n type: null as unknown as PropType<MantineNode>,\n default: undefined,\n },\n iconRight: {\n type: null as unknown as PropType<MantineNode>,\n default: undefined,\n },\n color: {\n type: String as PropType<MantineColor>,\n default: undefined,\n },\n disabled: { type: Boolean, default: false },\n onClick: {\n type: Function as PropType<(event: MouseEvent) => void>,\n default: undefined,\n },\n items: {\n type: Array as PropType<ContextMenuItemOptions[]>,\n default: undefined,\n },\n onHide: {\n type: Function as PropType<() => void>,\n required: true,\n },\n submenuProps: {\n type: Object as PropType<ContextMenuSubmenuProps>,\n required: true,\n },\n className: { type: String, default: undefined },\n style: {\n type: [Object, Function] as PropType<ContextMenuStyle>,\n default: undefined,\n },\n },\n setup(props, { slots }) {\n const button = ref<HTMLElement | null>(null)\n const submenuPosition = ref<{ x: number; y: number } | null>(null)\n const settings = useContextMenuSettings()\n const theme = useMantineTheme()\n const hoverAvailable = useMediaQuery('(hover: hover)')\n\n const showSubmenuTimeout = useTimeout(() => {\n if (!button.value) {\n return\n }\n\n const rect = button.value.getBoundingClientRect()\n submenuPosition.value = {\n x: (props.submenuProps.dir || 'ltr') === 'ltr' ? rect.right : rect.left,\n y: rect.top,\n }\n }, settings.value.submenuDelay)\n\n const hideSubmenuTimeout = useTimeout(() => {\n submenuPosition.value = null\n }, settings.value.submenuDelay)\n\n const showSubmenu = () => {\n hideSubmenuTimeout.clear()\n showSubmenuTimeout.start()\n }\n\n const hideSubmenu = () => {\n showSubmenuTimeout.clear()\n hideSubmenuTimeout.start()\n }\n\n const handleSubmenuClick = (event: MouseEvent) => {\n event.stopPropagation()\n showSubmenu()\n }\n\n const handleActionClick = (event: MouseEvent) => {\n props.onHide()\n props.onClick?.(event)\n }\n\n const setButtonRef = (node: any) => {\n button.value = node?.$el ?? node ?? null\n }\n\n return (): VNode => {\n const hasSubmenu = Boolean(props.items && !props.disabled)\n const parsed = props.color\n ? parseThemeColor({ color: props.color, theme: theme.value })\n : null\n const itemColor = parsed?.value ?? 'var(--mantine-color-text)'\n const colorValue = parsed?.value\n const icon = resolveNode(props.icon, slots.icon)\n const title = resolveNode(props.title, slots.title)\n const iconRight = resolveNode(props.iconRight, slots.iconRight)\n\n return h(\n 'div',\n {\n onMouseenter: hasSubmenu && hoverAvailable.value ? showSubmenu : undefined,\n onMouseleave: hasSubmenu && hoverAvailable.value ? hideSubmenu : undefined,\n },\n [\n h(\n UnstyledButton,\n {\n ref: setButtonRef,\n dir: props.submenuProps.dir || 'ltr',\n class: ['mantine-contextmenu-item-button', props.className],\n disabled: props.disabled,\n style: {\n '--mantine-contextmenu-item-button-color': itemColor,\n '--mantine-contextmenu-item-button-hover-bg-color-light': colorValue\n ? rgba(colorValue, 0.08)\n : rgba(theme.value.colors.gray[4], 0.25),\n '--mantine-contextmenu-item-button-hover-bg-color-dark': colorValue\n ? rgba(colorValue, 0.15)\n : rgba(theme.value.colors.dark[3], 0.25),\n '--mantine-contextmenu-item-button-pressed-bg-color-light': colorValue\n ? rgba(colorValue, 0.2)\n : rgba(theme.value.colors.gray[4], 0.5),\n '--mantine-contextmenu-item-button-pressed-bg-color-dark': colorValue\n ? rgba(colorValue, 0.3)\n : rgba(theme.value.colors.dark[3], 0.5),\n ...resolveContextMenuStyle(props.style, theme.value),\n },\n onClick: hasSubmenu\n ? handleSubmenuClick\n : props.onClick\n ? handleActionClick\n : undefined,\n },\n () => [\n icon ? h(Box, { fz: 0, me: 'xs', mt: -2 }, () => icon) : null,\n h('div', { class: 'mantine-contextmenu-item-button-title' }, [title]),\n iconRight\n ? h(Box, { fz: 0, ms: 'xs', mt: -2 }, () => iconRight)\n : props.items\n ? h(Box, { mt: -1, ms: 'xs' }, () =>\n (props.submenuProps.dir || 'ltr') === 'rtl' ? '‹' : '›',\n )\n : null,\n ],\n ),\n submenuPosition.value && props.items\n ? h(ContextMenu, {\n ...props.submenuProps,\n x: submenuPosition.value.x,\n y: submenuPosition.value.y,\n content: props.items,\n onHide: props.onHide,\n dir: props.submenuProps.dir || 'ltr',\n })\n : null,\n ],\n )\n }\n },\n}) as unknown as DefineComponent<ContextMenuItemProps>\n","import {\n computed,\n defineComponent,\n h,\n onBeforeUnmount,\n ref,\n watch,\n type DefineComponent,\n type PropType,\n type VNode,\n type VNodeChild,\n} from 'vue'\nimport {\n Paper,\n px,\n useMantineTheme,\n type MantineRadius,\n type MantineTheme,\n} from '@mantine-vue/core'\nimport { useResizeObserver } from '@mantine-vue/hooks'\nimport { ContextMenuDivider } from './ContextMenuDivider'\nimport { ContextMenuItem } from './ContextMenuItem'\nimport { useContextMenuSettings } from './context'\nimport { resolveContextMenuStyle, resolveContextMenuStyles, humanize } from './utils'\nimport type {\n ContextMenuContent,\n ContextMenuOptions,\n ContextMenuProps,\n ContextMenuSubmenuProps,\n ContextMenuStyles,\n ContextMenuStyle,\n} from './types'\nimport './ContextMenu.css'\n\nexport const ContextMenu = defineComponent({\n name: 'ContextMenu',\n props: {\n x: { type: Number, required: true },\n y: { type: Number, required: true },\n content: {\n type: [Array, Function] as PropType<ContextMenuContent>,\n required: true,\n },\n onHide: {\n type: Function as PropType<() => void>,\n required: true,\n },\n zIndex: { type: Number, default: undefined },\n dir: {\n type: String as PropType<'ltr' | 'rtl'>,\n default: 'ltr',\n },\n className: { type: String, default: undefined },\n style: {\n type: [Object, Function] as PropType<ContextMenuStyle>,\n default: undefined,\n },\n classNames: {\n type: Object as PropType<ContextMenuOptions['classNames']>,\n default: undefined,\n },\n styles: {\n type: [Object, Function] as PropType<\n ContextMenuStyles | ((theme: MantineTheme) => ContextMenuStyles)\n >,\n default: undefined,\n },\n },\n setup(props: ContextMenuProps) {\n const settings = useContextMenuSettings()\n const theme = useMantineTheme()\n const { ref: menuRef, rect } = useResizeObserver<HTMLElement>()\n const mounted = ref(false)\n let frameId = 0\n\n watch(\n () => [rect.value.width, rect.value.height],\n ([width, height]) => {\n if (width > 0 && height > 0) {\n cancelAnimationFrame(frameId)\n frameId = requestAnimationFrame(() => {\n mounted.value = true\n })\n }\n },\n { immediate: true },\n )\n\n onBeforeUnmount(() => cancelAnimationFrame(frameId))\n\n const position = computed(() => {\n const spacing = px(theme.value.spacing.md)\n const windowWidth = typeof window === 'undefined' ? 0 : window.innerWidth\n const windowHeight = typeof window === 'undefined' ? 0 : window.innerHeight\n const top =\n props.y + rect.value.height + spacing > windowHeight\n ? windowHeight - rect.value.height - spacing\n : props.y\n const left =\n props.dir === 'rtl'\n ? props.x - rect.value.width < spacing\n ? spacing\n : props.x - rect.value.width\n : props.x + rect.value.width + spacing > windowWidth\n ? windowWidth - rect.value.width - spacing\n : props.x\n\n return { zIndex: props.zIndex, top: `${top}px`, left: `${left}px` }\n })\n\n const setMenuRef = (node: any) => {\n menuRef.value = node?.$el ?? node ?? null\n }\n\n return (): VNode => {\n const resolvedStyles = resolveContextMenuStyles(props.styles, theme.value)\n const submenuProps: ContextMenuSubmenuProps = {\n className: props.className,\n style: props.style,\n classNames: props.classNames,\n styles: props.styles,\n dir: props.dir,\n }\n\n const content: VNodeChild =\n typeof props.content === 'function'\n ? props.content(props.onHide)\n : props.content.map((item): VNodeChild => {\n if (item.hidden) {\n return null\n }\n\n if (item.onClick || item.items) {\n return h(ContextMenuItem, {\n key: item.key,\n className: [props.classNames?.item, item.className].filter(Boolean).join(' '),\n style: {\n ...resolveContextMenuStyle(resolvedStyles?.item, theme.value),\n ...resolveContextMenuStyle(item.style, theme.value),\n },\n title: item.title ?? humanize(item.key),\n icon: item.icon,\n iconRight: item.iconRight,\n color: item.color,\n disabled: item.disabled,\n onClick: item.onClick,\n items: item.items,\n onHide: props.onHide,\n submenuProps,\n })\n }\n\n return h(ContextMenuDivider, {\n key: item.key,\n className: [props.classNames?.divider, item.className].filter(Boolean).join(' '),\n style: {\n ...resolveContextMenuStyle(resolvedStyles?.divider, theme.value),\n ...resolveContextMenuStyle(item.style, theme.value),\n },\n })\n })\n\n return h(\n Paper,\n {\n ref: setMenuRef,\n shadow: settings.value.shadow,\n radius: settings.value.borderRadius as MantineRadius,\n dir: props.dir,\n class: [\n 'mantine-contextmenu',\n mounted.value && 'mantine-contextmenu-mounted',\n props.className,\n props.classNames?.root,\n ],\n style: {\n ...position.value,\n ...resolveContextMenuStyle(props.style, theme.value),\n ...resolveContextMenuStyle(resolvedStyles?.root, theme.value),\n },\n },\n () => content,\n )\n }\n },\n}) as unknown as DefineComponent<ContextMenuProps>\n","import { defineComponent, h, type PropType } from 'vue'\nimport { useContextMenuSettings } from './context'\nimport './ContextMenuOverlay.css'\n\nexport const ContextMenuOverlay = defineComponent({\n name: 'ContextMenuOverlay',\n props: {\n zIndex: { type: Number, default: undefined },\n onHide: {\n type: Function as PropType<() => void>,\n required: true,\n },\n },\n setup(props, { slots }) {\n const settings = useContextMenuSettings()\n\n const handleClick = (event: MouseEvent) => {\n event.preventDefault()\n props.onHide()\n }\n\n const handleContextMenu = (event: MouseEvent) => {\n event.preventDefault()\n\n if (!settings.value.repositionOnRepeat) {\n props.onHide()\n return\n }\n\n try {\n document.elementsFromPoint(event.clientX, event.clientY)[1]?.dispatchEvent(\n new MouseEvent('contextmenu', {\n bubbles: true,\n clientX: event.clientX,\n clientY: event.clientY,\n }),\n )\n } catch {\n // Ignore dispatch errors from elements that disappear during the event.\n }\n }\n\n return () =>\n h(\n 'div',\n {\n class: 'mantine-contextmenu-overlay',\n style: { zIndex: props.zIndex },\n onClick: handleClick,\n onContextmenu: handleContextMenu,\n },\n slots.default?.(),\n )\n },\n})\n","import { defineComponent, h, type PropType } from 'vue'\nimport { Portal, type Direction, type MantineTheme } from '@mantine-vue/core'\nimport { useHotkeys, useWindowEvent } from '@mantine-vue/hooks'\nimport { ContextMenu } from './ContextMenu'\nimport { ContextMenuOverlay } from './ContextMenuOverlay'\nimport type {\n ContextMenuContent,\n ContextMenuOptions,\n ContextMenuPortalProps,\n ContextMenuStyles,\n ContextMenuStyle,\n} from './types'\n\nexport const ContextMenuPortal = defineComponent({\n name: 'ContextMenuPortal',\n props: {\n x: { type: Number, required: true },\n y: { type: Number, required: true },\n content: {\n type: [Array, Function] as PropType<ContextMenuContent>,\n required: true,\n },\n onHide: {\n type: Function as PropType<() => void>,\n required: true,\n },\n zIndex: { type: Number, default: undefined },\n dir: {\n type: String as PropType<Direction>,\n required: true,\n },\n className: { type: String, default: undefined },\n style: {\n type: [Object, Function] as PropType<ContextMenuStyle>,\n default: undefined,\n },\n classNames: {\n type: Object as PropType<ContextMenuOptions['classNames']>,\n default: undefined,\n },\n styles: {\n type: [Object, Function] as PropType<\n ContextMenuStyles | ((theme: MantineTheme) => ContextMenuStyles)\n >,\n default: undefined,\n },\n },\n setup(props: ContextMenuPortalProps) {\n useWindowEvent('resize', props.onHide)\n useWindowEvent('scroll', props.onHide)\n useHotkeys([['Escape', props.onHide]])\n\n return () =>\n h(Portal, null, () =>\n h(ContextMenuOverlay, { zIndex: props.zIndex, onHide: props.onHide }, () =>\n h(ContextMenu, {\n x: props.x,\n y: props.y,\n content: props.content,\n onHide: props.onHide,\n dir: props.dir,\n zIndex: props.zIndex,\n className: props.className,\n style: props.style,\n classNames: props.classNames,\n styles: props.styles,\n }),\n ),\n )\n },\n})\n","import {\n Fragment,\n computed,\n defineComponent,\n h,\n provide,\n shallowRef,\n toRef,\n type PropType,\n} from 'vue'\nimport {\n useDirection,\n type MantineRadius,\n type MantineShadow,\n type MantineTheme,\n} from '@mantine-vue/core'\nimport { ContextMenuPortal } from './ContextMenuPortal'\nimport { ContextMenuKey, ContextMenuSettingsKey, useContextMenu } from './context'\nimport type {\n ContextMenuInstanceOptions,\n ContextMenuOptions,\n ContextMenuStyles,\n ContextMenuStyle,\n ShowContextMenuFunction,\n} from './types'\n\nconst DEFAULT_SETTINGS = {\n shadow: 'sm',\n borderRadius: 'xs',\n submenuDelay: 500,\n repositionOnRepeat: false,\n} as const\n\nexport const ContextMenuProvider = defineComponent({\n name: 'ContextMenuProvider',\n props: {\n zIndex: { type: Number, default: 9999 },\n shadow: {\n type: String as PropType<MantineShadow>,\n default: DEFAULT_SETTINGS.shadow,\n },\n borderRadius: {\n type: [String, Number] as PropType<MantineRadius>,\n default: DEFAULT_SETTINGS.borderRadius,\n },\n submenuDelay: { type: Number, default: DEFAULT_SETTINGS.submenuDelay },\n repositionOnRepeat: {\n type: Boolean,\n default: DEFAULT_SETTINGS.repositionOnRepeat,\n },\n className: { type: String, default: undefined },\n style: {\n type: [Object, Function] as PropType<ContextMenuStyle>,\n default: undefined,\n },\n classNames: {\n type: Object as PropType<ContextMenuOptions['classNames']>,\n default: undefined,\n },\n styles: {\n type: [Object, Function] as PropType<\n ContextMenuStyles | ((theme: MantineTheme) => ContextMenuStyles)\n >,\n default: undefined,\n },\n },\n setup(props, { slots }) {\n const data = shallowRef<(ContextMenuInstanceOptions & ContextMenuOptions) | null>(null)\n const { dir } = useDirection()\n\n const hideContextMenu = () => {\n data.value = null\n }\n\n const showContextMenu: ShowContextMenuFunction = (content, options) => (event) => {\n event.preventDefault()\n event.stopPropagation()\n\n const position =\n 'touches' in event\n ? {\n x: event.touches.item(0)!.clientX,\n y: event.touches.item(0)!.clientY,\n }\n : { x: event.clientX, y: event.clientY }\n\n data.value = {\n ...position,\n content,\n zIndex: options?.zIndex || props.zIndex,\n className: options?.className,\n style: options?.style,\n classNames: options?.classNames,\n styles: options?.styles,\n }\n }\n\n provide(\n ContextMenuSettingsKey,\n computed(() => ({\n shadow: props.shadow,\n borderRadius: props.borderRadius,\n submenuDelay: props.submenuDelay,\n repositionOnRepeat: props.repositionOnRepeat,\n })),\n )\n provide(ContextMenuKey, {\n showContextMenu,\n hideContextMenu,\n isContextMenuVisible: toRef(() => Boolean(data.value)),\n })\n\n return () =>\n h(Fragment, null, [\n slots.default?.(),\n data.value\n ? h(ContextMenuPortal, {\n ...data.value,\n onHide: hideContextMenu,\n dir: dir.value,\n })\n : null,\n ])\n },\n})\n\nexport { ContextMenuKey, ContextMenuSettingsKey, useContextMenu }\nexport { ContextMenuKey as ContextMenuCtx, ContextMenuSettingsKey as ContextMenuSettingsCtx }\n"],"mappings":";;;;;;AAIA,SAAgB,SAAS,OAAe;CACtC,MAAM,MAAM,MACT,QAAQ,sBAAsB,OAAO,EACrC,QAAQ,SAAS,GAAG,EACpB,KAAK,EACL,YAAY;CAEf,OAAO,GAAG,IAAI,OAAO,CAAC,EAAE,YAAY,IAAI,IAAI,MAAM,CAAC;AACrD;AAEA,SAAgB,wBACd,OACA,OAC0B;CAC1B,OAAO,OAAO,UAAU,aAAa,MAAM,KAAK,IAAI;AACtD;AAEA,SAAgB,yBACd,QACA,OACA;CACA,OAAO,OAAO,WAA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AGvB,SAAS,KAAA;EACX;CACF;CACA,MAAM,OAAO,EAAE,SAAS;EACtB,MAAM,QAAA,GAAA,IAAA,YAA4E,IAAI;EACtF,MAAM,EAAE,SAAA,GAAA,kBAAA,cAAqB;EAE7B,MAAM,wBAAwB;GAC5B,KAAK,QAAQ;EACf;EAEA,MAAM,mBAA4C,SAAS,aAAa,UAAU;GAChF,MAAM,eAAe;GACrB,MAAM,gBAAgB;GAUtB,KAAK,QAAQ;IACX,GARA,aAAa,QACT;KACE,GAAG,MAAM,QAAQ,KAAK,CAAC,EAAG;KAC1B,GAAG,MAAM,QAAQ,KAAK,CAAC,EAAG;IAC5B,IACA;KAAE,GAAG,MAAM;KAAS,GAAG,MAAM;IAAQ;IAIzC;IACA,QAAQ,SAAS,UAAU,MAAM;IACjC,WAAW,SAAS;IACpB,OAAO,SAAS;IAChB,YAAY,SAAS;IACrB,QAAQ,SAAS;GACnB;EACF;EAEA,CAAA,GAAA,IAAA,SACE,yBAAA,GAAA,IAAA,iBACgB;GACd,QAAQ,MAAM;GACd,cAAc,MAAM;GACpB,cAAc,MAAM;GACpB,oBAAoB,MAAM;EAC5B,EAAE,CACJ;EACA,CAAA,GAAA,IAAA,SAAQ,gBAAgB;GACtB;GACA;GACA,uBAAA,GAAA,IAAA,aAAkC,QAAQ,KAAK,KAAK,CAAC;EACvD,CAAC;EAED,cAAA,GAAA,IAAA,GACI,IAAA,UAAU,MAAM,CAChB,MAAM,UAAU,GAChB,KAAK,SAAA,GAAA,IAAA,GACC,mBAAmB;GACnB,GAAG,KAAK;GACR,QAAQ;GACR,KAAK,IAAI;EACX,CAAC,IACD,IACN,CAAC;CACL;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/utils.ts","../src/components/ContextMenuDivider/ContextMenuDivider.vue","../src/components/ContextMenuDivider/ContextMenuDivider.vue","../src/context.ts","../src/components/ContextMenuItem/ContextMenuItem.vue","../src/components/ContextMenuItem/ContextMenuItem.vue","../src/components/ContextMenu/ContextMenu.vue","../src/components/ContextMenu/ContextMenu.vue","../src/components/ContextMenuOverlay/ContextMenuOverlay.vue","../src/components/ContextMenuOverlay/ContextMenuOverlay.vue","../src/components/ContextMenuPortal/ContextMenuPortal.vue","../src/components/ContextMenuPortal/ContextMenuPortal.vue","../src/components/ContextMenuProvider/ContextMenuProvider.vue","../src/components/ContextMenuProvider/ContextMenuProvider.vue"],"sourcesContent":["import type { ContextMenuStyle, ContextMenuStyles } from './types'\nimport type { MantineStyle, MantineTheme } from '@mantine-vue/core'\n\n/** Returns a humanized version of a string, for example \"camelCase\" becomes \"Camel Case\". */\nexport function humanize(value: string) {\n const str = value\n .replace(/([a-z\\d])([A-Z]+)/g, '$1 $2')\n .replace(/\\W|_/g, ' ')\n .trim()\n .toLowerCase()\n\n return `${str.charAt(0).toUpperCase()}${str.slice(1)}`\n}\n\nexport function resolveContextMenuStyle(\n style: ContextMenuStyle | undefined,\n theme: MantineTheme,\n): MantineStyle | undefined {\n return typeof style === 'function' ? style(theme) : style\n}\n\nexport function resolveContextMenuStyles(\n styles: ContextMenuStyles | ((theme: MantineTheme) => ContextMenuStyles) | undefined,\n theme: MantineTheme,\n) {\n return typeof styles === 'function' ? styles(theme) : styles\n}\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Box, useMantineTheme } from '@mantine-vue/core'\nimport { resolveContextMenuStyle } from '../../utils'\nimport type { ContextMenuDividerProps } from '../../types'\nimport '../../ContextMenuDivider.css'\n\ndefineOptions({ name: 'ContextMenuDivider' })\nconst props = defineProps<ContextMenuDividerProps>()\nconst theme = useMantineTheme()\nconst resolvedStyle = computed(() => resolveContextMenuStyle(props.style, theme.value))\n</script>\n\n<template>\n <Box :class=\"['mantine-contextmenu-divider', props.className]\" :style=\"resolvedStyle\" />\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Box, useMantineTheme } from '@mantine-vue/core'\nimport { resolveContextMenuStyle } from '../../utils'\nimport type { ContextMenuDividerProps } from '../../types'\nimport '../../ContextMenuDivider.css'\n\ndefineOptions({ name: 'ContextMenuDivider' })\nconst props = defineProps<ContextMenuDividerProps>()\nconst theme = useMantineTheme()\nconst resolvedStyle = computed(() => resolveContextMenuStyle(props.style, theme.value))\n</script>\n\n<template>\n <Box :class=\"['mantine-contextmenu-divider', props.className]\" :style=\"resolvedStyle\" />\n</template>\n","import { inject, readonly, ref, type InjectionKey, type Ref } from 'vue'\nimport type { ContextMenuContextValue, ContextMenuSettings } from './types'\n\nexport interface ResolvedContextMenuSettings {\n shadow: NonNullable<ContextMenuSettings['shadow']>\n borderRadius: NonNullable<ContextMenuSettings['borderRadius']>\n submenuDelay: number\n repositionOnRepeat: boolean\n}\n\nexport const ContextMenuSettingsKey = Symbol('ContextMenuSettings') as InjectionKey<\n Ref<ResolvedContextMenuSettings>\n>\n\nexport const ContextMenuKey = Symbol('ContextMenu') as InjectionKey<ContextMenuContextValue>\n\nconst hidden = readonly(ref(false))\nconst fallback: ContextMenuContextValue = {\n showContextMenu: () => () => undefined,\n hideContextMenu: () => undefined,\n isContextMenuVisible: hidden,\n}\n\nexport function useContextMenu() {\n return inject(ContextMenuKey, fallback)\n}\n\nexport function useContextMenuSettings() {\n return inject(ContextMenuSettingsKey, {\n value: {\n shadow: 'sm',\n borderRadius: 'xs',\n submenuDelay: 500,\n repositionOnRepeat: false,\n },\n } as Ref<ResolvedContextMenuSettings>)\n}\n","<script setup lang=\"ts\">\nimport { computed, ref, useSlots } from 'vue'\nimport {\n Box,\n UnstyledButton,\n parseThemeColor,\n resolveNode,\n rgba,\n useMantineTheme,\n} from '@mantine-vue/core'\nimport { useMediaQuery, useTimeout } from '@mantine-vue/hooks'\nimport ContextMenu from '../ContextMenu/ContextMenu.vue'\nimport { useContextMenuSettings } from '../../context'\nimport { resolveContextMenuStyle } from '../../utils'\nimport type { ContextMenuItemEmits, ContextMenuItemProps } from '../../types'\nimport '../../ContextMenuItem.css'\n\ndefineOptions({ name: 'ContextMenuItem' })\nconst props = withDefaults(defineProps<ContextMenuItemProps>(), { disabled: false })\nconst emit = defineEmits<ContextMenuItemEmits>()\nconst slots = useSlots()\nconst button = ref<HTMLElement | null>(null)\nconst submenuPosition = ref<{ x: number; y: number } | null>(null)\nconst settings = useContextMenuSettings()\nconst theme = useMantineTheme()\nconst hoverAvailable = useMediaQuery('(hover: hover)')\nconst hasSubmenu = computed(() => Boolean(props.items && !props.disabled))\nconst parsedColor = computed(() =>\n props.color ? parseThemeColor({ color: props.color, theme: theme.value }) : null,\n)\nconst itemStyle = computed(() => {\n const color = parsedColor.value?.value\n return {\n '--mantine-contextmenu-item-button-color': color ?? 'var(--mantine-color-text)',\n '--mantine-contextmenu-item-button-hover-bg-color-light': color\n ? rgba(color, 0.08)\n : rgba(theme.value.colors.gray[4], 0.25),\n '--mantine-contextmenu-item-button-hover-bg-color-dark': color\n ? rgba(color, 0.15)\n : rgba(theme.value.colors.dark[3], 0.25),\n '--mantine-contextmenu-item-button-pressed-bg-color-light': color\n ? rgba(color, 0.2)\n : rgba(theme.value.colors.gray[4], 0.5),\n '--mantine-contextmenu-item-button-pressed-bg-color-dark': color\n ? rgba(color, 0.3)\n : rgba(theme.value.colors.dark[3], 0.5),\n ...resolveContextMenuStyle(props.style, theme.value),\n }\n})\nconst icon = computed(() => resolveNode(props.icon, slots.icon))\nconst title = computed(() => resolveNode(props.title, slots.title))\nconst iconRight = computed(() => resolveNode(props.iconRight, slots.iconRight))\nconst renderIcon = () => icon.value\nconst renderTitle = () => title.value\nconst renderIconRight = () => iconRight.value\n\nconst showSubmenuTimeout = useTimeout(() => {\n if (!button.value) return\n const rect = button.value.getBoundingClientRect()\n submenuPosition.value = {\n x: (props.submenuProps.dir || 'ltr') === 'ltr' ? rect.right : rect.left,\n y: rect.top,\n }\n}, settings.value.submenuDelay)\nconst hideSubmenuTimeout = useTimeout(\n () => (submenuPosition.value = null),\n settings.value.submenuDelay,\n)\n\nfunction showSubmenu() {\n hideSubmenuTimeout.clear()\n showSubmenuTimeout.start()\n}\nfunction hideSubmenu() {\n showSubmenuTimeout.clear()\n hideSubmenuTimeout.start()\n}\nfunction mouseenter() {\n if (hasSubmenu.value && hoverAvailable.value) showSubmenu()\n}\nfunction mouseleave() {\n if (hasSubmenu.value && hoverAvailable.value) hideSubmenu()\n}\nfunction click(event: MouseEvent) {\n if (hasSubmenu.value) {\n event.stopPropagation()\n showSubmenu()\n } else if (props.onClick) {\n emit('hide')\n props.onClick(event)\n }\n}\n</script>\n\n<template>\n <div @mouseenter=\"mouseenter\" @mouseleave=\"mouseleave\">\n <UnstyledButton\n :ref=\"(node: any) => (button = node?.$el ?? node ?? null)\"\n :dir=\"props.submenuProps.dir || 'ltr'\"\n :class=\"['mantine-contextmenu-item-button', props.className]\"\n :disabled=\"props.disabled\"\n :style=\"itemStyle\"\n @click=\"click\"\n >\n <Box v-if=\"icon\" :fz=\"0\" me=\"xs\" :mt=\"-2\"><component :is=\"renderIcon\" /></Box>\n <div class=\"mantine-contextmenu-item-button-title\"><component :is=\"renderTitle\" /></div>\n <Box v-if=\"iconRight\" :fz=\"0\" ms=\"xs\" :mt=\"-2\"><component :is=\"renderIconRight\" /></Box>\n <Box v-else-if=\"props.items\" :mt=\"-1\" ms=\"xs\">\n {{ (props.submenuProps.dir || 'ltr') === 'rtl' ? '‹' : '›' }}\n </Box>\n </UnstyledButton>\n <ContextMenu\n v-if=\"submenuPosition && props.items\"\n v-bind=\"props.submenuProps\"\n :x=\"submenuPosition.x\"\n :y=\"submenuPosition.y\"\n :content=\"props.items\"\n :dir=\"props.submenuProps.dir || 'ltr'\"\n @hide=\"emit('hide')\"\n />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useSlots } from 'vue'\nimport {\n Box,\n UnstyledButton,\n parseThemeColor,\n resolveNode,\n rgba,\n useMantineTheme,\n} from '@mantine-vue/core'\nimport { useMediaQuery, useTimeout } from '@mantine-vue/hooks'\nimport ContextMenu from '../ContextMenu/ContextMenu.vue'\nimport { useContextMenuSettings } from '../../context'\nimport { resolveContextMenuStyle } from '../../utils'\nimport type { ContextMenuItemEmits, ContextMenuItemProps } from '../../types'\nimport '../../ContextMenuItem.css'\n\ndefineOptions({ name: 'ContextMenuItem' })\nconst props = withDefaults(defineProps<ContextMenuItemProps>(), { disabled: false })\nconst emit = defineEmits<ContextMenuItemEmits>()\nconst slots = useSlots()\nconst button = ref<HTMLElement | null>(null)\nconst submenuPosition = ref<{ x: number; y: number } | null>(null)\nconst settings = useContextMenuSettings()\nconst theme = useMantineTheme()\nconst hoverAvailable = useMediaQuery('(hover: hover)')\nconst hasSubmenu = computed(() => Boolean(props.items && !props.disabled))\nconst parsedColor = computed(() =>\n props.color ? parseThemeColor({ color: props.color, theme: theme.value }) : null,\n)\nconst itemStyle = computed(() => {\n const color = parsedColor.value?.value\n return {\n '--mantine-contextmenu-item-button-color': color ?? 'var(--mantine-color-text)',\n '--mantine-contextmenu-item-button-hover-bg-color-light': color\n ? rgba(color, 0.08)\n : rgba(theme.value.colors.gray[4], 0.25),\n '--mantine-contextmenu-item-button-hover-bg-color-dark': color\n ? rgba(color, 0.15)\n : rgba(theme.value.colors.dark[3], 0.25),\n '--mantine-contextmenu-item-button-pressed-bg-color-light': color\n ? rgba(color, 0.2)\n : rgba(theme.value.colors.gray[4], 0.5),\n '--mantine-contextmenu-item-button-pressed-bg-color-dark': color\n ? rgba(color, 0.3)\n : rgba(theme.value.colors.dark[3], 0.5),\n ...resolveContextMenuStyle(props.style, theme.value),\n }\n})\nconst icon = computed(() => resolveNode(props.icon, slots.icon))\nconst title = computed(() => resolveNode(props.title, slots.title))\nconst iconRight = computed(() => resolveNode(props.iconRight, slots.iconRight))\nconst renderIcon = () => icon.value\nconst renderTitle = () => title.value\nconst renderIconRight = () => iconRight.value\n\nconst showSubmenuTimeout = useTimeout(() => {\n if (!button.value) return\n const rect = button.value.getBoundingClientRect()\n submenuPosition.value = {\n x: (props.submenuProps.dir || 'ltr') === 'ltr' ? rect.right : rect.left,\n y: rect.top,\n }\n}, settings.value.submenuDelay)\nconst hideSubmenuTimeout = useTimeout(\n () => (submenuPosition.value = null),\n settings.value.submenuDelay,\n)\n\nfunction showSubmenu() {\n hideSubmenuTimeout.clear()\n showSubmenuTimeout.start()\n}\nfunction hideSubmenu() {\n showSubmenuTimeout.clear()\n hideSubmenuTimeout.start()\n}\nfunction mouseenter() {\n if (hasSubmenu.value && hoverAvailable.value) showSubmenu()\n}\nfunction mouseleave() {\n if (hasSubmenu.value && hoverAvailable.value) hideSubmenu()\n}\nfunction click(event: MouseEvent) {\n if (hasSubmenu.value) {\n event.stopPropagation()\n showSubmenu()\n } else if (props.onClick) {\n emit('hide')\n props.onClick(event)\n }\n}\n</script>\n\n<template>\n <div @mouseenter=\"mouseenter\" @mouseleave=\"mouseleave\">\n <UnstyledButton\n :ref=\"(node: any) => (button = node?.$el ?? node ?? null)\"\n :dir=\"props.submenuProps.dir || 'ltr'\"\n :class=\"['mantine-contextmenu-item-button', props.className]\"\n :disabled=\"props.disabled\"\n :style=\"itemStyle\"\n @click=\"click\"\n >\n <Box v-if=\"icon\" :fz=\"0\" me=\"xs\" :mt=\"-2\"><component :is=\"renderIcon\" /></Box>\n <div class=\"mantine-contextmenu-item-button-title\"><component :is=\"renderTitle\" /></div>\n <Box v-if=\"iconRight\" :fz=\"0\" ms=\"xs\" :mt=\"-2\"><component :is=\"renderIconRight\" /></Box>\n <Box v-else-if=\"props.items\" :mt=\"-1\" ms=\"xs\">\n {{ (props.submenuProps.dir || 'ltr') === 'rtl' ? '‹' : '›' }}\n </Box>\n </UnstyledButton>\n <ContextMenu\n v-if=\"submenuPosition && props.items\"\n v-bind=\"props.submenuProps\"\n :x=\"submenuPosition.x\"\n :y=\"submenuPosition.y\"\n :content=\"props.items\"\n :dir=\"props.submenuProps.dir || 'ltr'\"\n @hide=\"emit('hide')\"\n />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, ref, watch } from 'vue'\nimport { Paper, px, useMantineTheme, type MantineRadius } from '@mantine-vue/core'\nimport { useResizeObserver } from '@mantine-vue/hooks'\nimport ContextMenuDivider from '../ContextMenuDivider/ContextMenuDivider.vue'\nimport ContextMenuItem from '../ContextMenuItem/ContextMenuItem.vue'\nimport { useContextMenuSettings } from '../../context'\nimport { humanize, resolveContextMenuStyle, resolveContextMenuStyles } from '../../utils'\nimport type { ContextMenuEmits, ContextMenuItemOptions, ContextMenuProps } from '../../types'\nimport '../../ContextMenu.css'\n\ndefineOptions({ name: 'ContextMenu' })\nconst props = withDefaults(defineProps<ContextMenuProps>(), { dir: 'ltr' })\nconst emit = defineEmits<ContextMenuEmits>()\nconst settings = useContextMenuSettings()\nconst theme = useMantineTheme()\nconst { ref: menuRef, rect } = useResizeObserver<HTMLElement>()\nconst mounted = ref(false)\nlet frameId = 0\n\nwatch(\n () => [rect.value.width, rect.value.height],\n ([width, height]) => {\n if (width > 0 && height > 0) {\n cancelAnimationFrame(frameId)\n frameId = requestAnimationFrame(() => (mounted.value = true))\n }\n },\n { immediate: true },\n)\nonBeforeUnmount(() => cancelAnimationFrame(frameId))\n\nconst position = computed(() => {\n const spacing = px(theme.value.spacing.md)\n const windowWidth = typeof window === 'undefined' ? 0 : window.innerWidth\n const windowHeight = typeof window === 'undefined' ? 0 : window.innerHeight\n const top =\n props.y + rect.value.height + spacing > windowHeight\n ? windowHeight - rect.value.height - spacing\n : props.y\n const left =\n props.dir === 'rtl'\n ? props.x - rect.value.width < spacing\n ? spacing\n : props.x - rect.value.width\n : props.x + rect.value.width + spacing > windowWidth\n ? windowWidth - rect.value.width - spacing\n : props.x\n return { zIndex: props.zIndex, top: `${top}px`, left: `${left}px` }\n})\nconst resolvedStyles = computed(() => resolveContextMenuStyles(props.styles, theme.value))\nconst rootStyle = computed(() => ({\n ...position.value,\n ...resolveContextMenuStyle(props.style, theme.value),\n ...resolveContextMenuStyle(resolvedStyles.value?.root, theme.value),\n}))\nconst submenuProps = computed(() => ({\n className: props.className,\n style: props.style,\n classNames: props.classNames,\n styles: props.styles,\n dir: props.dir,\n}))\n\nfunction itemClass(item: ContextMenuItemOptions, part: 'item' | 'divider') {\n return [props.classNames?.[part], item.className].filter(Boolean).join(' ')\n}\nfunction itemStyle(item: ContextMenuItemOptions, part: 'item' | 'divider') {\n return {\n ...resolveContextMenuStyle(resolvedStyles.value?.[part], theme.value),\n ...resolveContextMenuStyle(item.style, theme.value),\n }\n}\nconst renderCustomContent = () =>\n typeof props.content === 'function' ? props.content(() => emit('hide')) : null\n</script>\n\n<template>\n <Paper\n :ref=\"(node: any) => (menuRef = node?.$el ?? node ?? null)\"\n :shadow=\"settings.shadow\"\n :radius=\"settings.borderRadius as MantineRadius\"\n :dir=\"props.dir\"\n :class=\"[\n 'mantine-contextmenu',\n mounted && 'mantine-contextmenu-mounted',\n props.className,\n props.classNames?.root,\n ]\"\n :style=\"rootStyle\"\n >\n <component v-if=\"typeof props.content === 'function'\" :is=\"renderCustomContent\" />\n <template v-else>\n <template v-for=\"item in props.content\" :key=\"item.key\">\n <ContextMenuItem\n v-if=\"!item.hidden && (item.onClick || item.items)\"\n :class-name=\"itemClass(item, 'item')\"\n :style=\"itemStyle(item, 'item')\"\n :title=\"item.title ?? humanize(item.key)\"\n :icon=\"item.icon\"\n :icon-right=\"item.iconRight\"\n :color=\"item.color\"\n :disabled=\"item.disabled\"\n :on-click=\"item.onClick\"\n :items=\"item.items\"\n :submenu-props=\"submenuProps\"\n @hide=\"emit('hide')\"\n />\n <ContextMenuDivider\n v-else-if=\"!item.hidden\"\n :class-name=\"itemClass(item, 'divider')\"\n :style=\"itemStyle(item, 'divider')\"\n />\n </template>\n </template>\n </Paper>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, ref, watch } from 'vue'\nimport { Paper, px, useMantineTheme, type MantineRadius } from '@mantine-vue/core'\nimport { useResizeObserver } from '@mantine-vue/hooks'\nimport ContextMenuDivider from '../ContextMenuDivider/ContextMenuDivider.vue'\nimport ContextMenuItem from '../ContextMenuItem/ContextMenuItem.vue'\nimport { useContextMenuSettings } from '../../context'\nimport { humanize, resolveContextMenuStyle, resolveContextMenuStyles } from '../../utils'\nimport type { ContextMenuEmits, ContextMenuItemOptions, ContextMenuProps } from '../../types'\nimport '../../ContextMenu.css'\n\ndefineOptions({ name: 'ContextMenu' })\nconst props = withDefaults(defineProps<ContextMenuProps>(), { dir: 'ltr' })\nconst emit = defineEmits<ContextMenuEmits>()\nconst settings = useContextMenuSettings()\nconst theme = useMantineTheme()\nconst { ref: menuRef, rect } = useResizeObserver<HTMLElement>()\nconst mounted = ref(false)\nlet frameId = 0\n\nwatch(\n () => [rect.value.width, rect.value.height],\n ([width, height]) => {\n if (width > 0 && height > 0) {\n cancelAnimationFrame(frameId)\n frameId = requestAnimationFrame(() => (mounted.value = true))\n }\n },\n { immediate: true },\n)\nonBeforeUnmount(() => cancelAnimationFrame(frameId))\n\nconst position = computed(() => {\n const spacing = px(theme.value.spacing.md)\n const windowWidth = typeof window === 'undefined' ? 0 : window.innerWidth\n const windowHeight = typeof window === 'undefined' ? 0 : window.innerHeight\n const top =\n props.y + rect.value.height + spacing > windowHeight\n ? windowHeight - rect.value.height - spacing\n : props.y\n const left =\n props.dir === 'rtl'\n ? props.x - rect.value.width < spacing\n ? spacing\n : props.x - rect.value.width\n : props.x + rect.value.width + spacing > windowWidth\n ? windowWidth - rect.value.width - spacing\n : props.x\n return { zIndex: props.zIndex, top: `${top}px`, left: `${left}px` }\n})\nconst resolvedStyles = computed(() => resolveContextMenuStyles(props.styles, theme.value))\nconst rootStyle = computed(() => ({\n ...position.value,\n ...resolveContextMenuStyle(props.style, theme.value),\n ...resolveContextMenuStyle(resolvedStyles.value?.root, theme.value),\n}))\nconst submenuProps = computed(() => ({\n className: props.className,\n style: props.style,\n classNames: props.classNames,\n styles: props.styles,\n dir: props.dir,\n}))\n\nfunction itemClass(item: ContextMenuItemOptions, part: 'item' | 'divider') {\n return [props.classNames?.[part], item.className].filter(Boolean).join(' ')\n}\nfunction itemStyle(item: ContextMenuItemOptions, part: 'item' | 'divider') {\n return {\n ...resolveContextMenuStyle(resolvedStyles.value?.[part], theme.value),\n ...resolveContextMenuStyle(item.style, theme.value),\n }\n}\nconst renderCustomContent = () =>\n typeof props.content === 'function' ? props.content(() => emit('hide')) : null\n</script>\n\n<template>\n <Paper\n :ref=\"(node: any) => (menuRef = node?.$el ?? node ?? null)\"\n :shadow=\"settings.shadow\"\n :radius=\"settings.borderRadius as MantineRadius\"\n :dir=\"props.dir\"\n :class=\"[\n 'mantine-contextmenu',\n mounted && 'mantine-contextmenu-mounted',\n props.className,\n props.classNames?.root,\n ]\"\n :style=\"rootStyle\"\n >\n <component v-if=\"typeof props.content === 'function'\" :is=\"renderCustomContent\" />\n <template v-else>\n <template v-for=\"item in props.content\" :key=\"item.key\">\n <ContextMenuItem\n v-if=\"!item.hidden && (item.onClick || item.items)\"\n :class-name=\"itemClass(item, 'item')\"\n :style=\"itemStyle(item, 'item')\"\n :title=\"item.title ?? humanize(item.key)\"\n :icon=\"item.icon\"\n :icon-right=\"item.iconRight\"\n :color=\"item.color\"\n :disabled=\"item.disabled\"\n :on-click=\"item.onClick\"\n :items=\"item.items\"\n :submenu-props=\"submenuProps\"\n @hide=\"emit('hide')\"\n />\n <ContextMenuDivider\n v-else-if=\"!item.hidden\"\n :class-name=\"itemClass(item, 'divider')\"\n :style=\"itemStyle(item, 'divider')\"\n />\n </template>\n </template>\n </Paper>\n</template>\n","<script setup lang=\"ts\">\nimport { useContextMenuSettings } from '../../context'\nimport type { ContextMenuOverlayEmits } from '../../types'\nimport '../../ContextMenuOverlay.css'\n\ndefineOptions({ name: 'ContextMenuOverlay' })\nconst props = defineProps<{ zIndex?: number }>()\nconst emit = defineEmits<ContextMenuOverlayEmits>()\nconst settings = useContextMenuSettings()\n\nfunction click(event: MouseEvent) {\n event.preventDefault()\n emit('hide')\n}\n\nfunction contextmenu(event: MouseEvent) {\n event.preventDefault()\n if (!settings.value.repositionOnRepeat) {\n emit('hide')\n return\n }\n try {\n document.elementsFromPoint(event.clientX, event.clientY)[1]?.dispatchEvent(\n new MouseEvent('contextmenu', {\n bubbles: true,\n clientX: event.clientX,\n clientY: event.clientY,\n }),\n )\n } catch {\n // The target may disappear while the event is dispatched.\n }\n}\n</script>\n\n<template>\n <div\n class=\"mantine-contextmenu-overlay\"\n :style=\"{ zIndex: props.zIndex }\"\n @click=\"click\"\n @contextmenu=\"contextmenu\"\n >\n <slot />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useContextMenuSettings } from '../../context'\nimport type { ContextMenuOverlayEmits } from '../../types'\nimport '../../ContextMenuOverlay.css'\n\ndefineOptions({ name: 'ContextMenuOverlay' })\nconst props = defineProps<{ zIndex?: number }>()\nconst emit = defineEmits<ContextMenuOverlayEmits>()\nconst settings = useContextMenuSettings()\n\nfunction click(event: MouseEvent) {\n event.preventDefault()\n emit('hide')\n}\n\nfunction contextmenu(event: MouseEvent) {\n event.preventDefault()\n if (!settings.value.repositionOnRepeat) {\n emit('hide')\n return\n }\n try {\n document.elementsFromPoint(event.clientX, event.clientY)[1]?.dispatchEvent(\n new MouseEvent('contextmenu', {\n bubbles: true,\n clientX: event.clientX,\n clientY: event.clientY,\n }),\n )\n } catch {\n // The target may disappear while the event is dispatched.\n }\n}\n</script>\n\n<template>\n <div\n class=\"mantine-contextmenu-overlay\"\n :style=\"{ zIndex: props.zIndex }\"\n @click=\"click\"\n @contextmenu=\"contextmenu\"\n >\n <slot />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { Portal } from '@mantine-vue/core'\nimport { useHotkeys, useWindowEvent } from '@mantine-vue/hooks'\nimport ContextMenu from '../ContextMenu/ContextMenu.vue'\nimport ContextMenuOverlay from '../ContextMenuOverlay/ContextMenuOverlay.vue'\nimport type { ContextMenuPortalEmits, ContextMenuPortalProps } from '../../types'\n\ndefineOptions({ name: 'ContextMenuPortal' })\nconst props = defineProps<ContextMenuPortalProps>()\nconst emit = defineEmits<ContextMenuPortalEmits>()\nconst hide = () => emit('hide')\nuseWindowEvent('resize', hide)\nuseWindowEvent('scroll', hide)\nuseHotkeys([['Escape', hide]])\n</script>\n\n<template>\n <Portal>\n <ContextMenuOverlay :z-index=\"props.zIndex\" @hide=\"hide\">\n <ContextMenu\n :x=\"props.x\"\n :y=\"props.y\"\n :content=\"props.content\"\n :dir=\"props.dir\"\n :z-index=\"props.zIndex\"\n :class-name=\"props.className\"\n :style=\"props.style\"\n :class-names=\"props.classNames\"\n :styles=\"props.styles\"\n @hide=\"hide\"\n />\n </ContextMenuOverlay>\n </Portal>\n</template>\n","<script setup lang=\"ts\">\nimport { Portal } from '@mantine-vue/core'\nimport { useHotkeys, useWindowEvent } from '@mantine-vue/hooks'\nimport ContextMenu from '../ContextMenu/ContextMenu.vue'\nimport ContextMenuOverlay from '../ContextMenuOverlay/ContextMenuOverlay.vue'\nimport type { ContextMenuPortalEmits, ContextMenuPortalProps } from '../../types'\n\ndefineOptions({ name: 'ContextMenuPortal' })\nconst props = defineProps<ContextMenuPortalProps>()\nconst emit = defineEmits<ContextMenuPortalEmits>()\nconst hide = () => emit('hide')\nuseWindowEvent('resize', hide)\nuseWindowEvent('scroll', hide)\nuseHotkeys([['Escape', hide]])\n</script>\n\n<template>\n <Portal>\n <ContextMenuOverlay :z-index=\"props.zIndex\" @hide=\"hide\">\n <ContextMenu\n :x=\"props.x\"\n :y=\"props.y\"\n :content=\"props.content\"\n :dir=\"props.dir\"\n :z-index=\"props.zIndex\"\n :class-name=\"props.className\"\n :style=\"props.style\"\n :class-names=\"props.classNames\"\n :styles=\"props.styles\"\n @hide=\"hide\"\n />\n </ContextMenuOverlay>\n </Portal>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, provide, shallowRef, toRef } from 'vue'\nimport { useDirection } from '@mantine-vue/core'\nimport ContextMenuPortal from '../ContextMenuPortal/ContextMenuPortal.vue'\nimport { ContextMenuKey, ContextMenuSettingsKey } from '../../context'\nimport type {\n ContextMenuInstanceOptions,\n ContextMenuOptions,\n ContextMenuProviderProps,\n ShowContextMenuFunction,\n} from '../../types'\n\ndefineOptions({ name: 'ContextMenuProvider' })\nconst props = withDefaults(defineProps<ContextMenuProviderProps>(), {\n zIndex: 9999,\n shadow: 'sm',\n borderRadius: 'xs',\n submenuDelay: 500,\n repositionOnRepeat: false,\n})\nconst data = shallowRef<(ContextMenuInstanceOptions & ContextMenuOptions) | null>(null)\nconst { dir } = useDirection()\n\nfunction hideContextMenu() {\n data.value = null\n}\n\nconst showContextMenu: ShowContextMenuFunction = (content, options) => (event) => {\n event.preventDefault()\n event.stopPropagation()\n const position =\n 'touches' in event\n ? { x: event.touches.item(0)!.clientX, y: event.touches.item(0)!.clientY }\n : { x: event.clientX, y: event.clientY }\n data.value = {\n ...position,\n content,\n zIndex: options?.zIndex || props.zIndex,\n className: options?.className,\n style: options?.style,\n classNames: options?.classNames,\n styles: options?.styles,\n }\n}\n\nprovide(\n ContextMenuSettingsKey,\n computed(() => ({\n shadow: props.shadow,\n borderRadius: props.borderRadius,\n submenuDelay: props.submenuDelay,\n repositionOnRepeat: props.repositionOnRepeat,\n })),\n)\nprovide(ContextMenuKey, {\n showContextMenu,\n hideContextMenu,\n isContextMenuVisible: toRef(() => Boolean(data.value)),\n})\n</script>\n\n<template>\n <slot />\n <ContextMenuPortal v-if=\"data\" v-bind=\"data\" :dir=\"dir\" @hide=\"hideContextMenu\" />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, provide, shallowRef, toRef } from 'vue'\nimport { useDirection } from '@mantine-vue/core'\nimport ContextMenuPortal from '../ContextMenuPortal/ContextMenuPortal.vue'\nimport { ContextMenuKey, ContextMenuSettingsKey } from '../../context'\nimport type {\n ContextMenuInstanceOptions,\n ContextMenuOptions,\n ContextMenuProviderProps,\n ShowContextMenuFunction,\n} from '../../types'\n\ndefineOptions({ name: 'ContextMenuProvider' })\nconst props = withDefaults(defineProps<ContextMenuProviderProps>(), {\n zIndex: 9999,\n shadow: 'sm',\n borderRadius: 'xs',\n submenuDelay: 500,\n repositionOnRepeat: false,\n})\nconst data = shallowRef<(ContextMenuInstanceOptions & ContextMenuOptions) | null>(null)\nconst { dir } = useDirection()\n\nfunction hideContextMenu() {\n data.value = null\n}\n\nconst showContextMenu: ShowContextMenuFunction = (content, options) => (event) => {\n event.preventDefault()\n event.stopPropagation()\n const position =\n 'touches' in event\n ? { x: event.touches.item(0)!.clientX, y: event.touches.item(0)!.clientY }\n : { x: event.clientX, y: event.clientY }\n data.value = {\n ...position,\n content,\n zIndex: options?.zIndex || props.zIndex,\n className: options?.className,\n style: options?.style,\n classNames: options?.classNames,\n styles: options?.styles,\n }\n}\n\nprovide(\n ContextMenuSettingsKey,\n computed(() => ({\n shadow: props.shadow,\n borderRadius: props.borderRadius,\n submenuDelay: props.submenuDelay,\n repositionOnRepeat: props.repositionOnRepeat,\n })),\n)\nprovide(ContextMenuKey, {\n showContextMenu,\n hideContextMenu,\n isContextMenuVisible: toRef(() => Boolean(data.value)),\n})\n</script>\n\n<template>\n <slot />\n <ContextMenuPortal v-if=\"data\" v-bind=\"data\" :dir=\"dir\" @hide=\"hideContextMenu\" />\n</template>\n"],"mappings":";;;;;;AAIA,SAAgB,SAAS,OAAe;CACtC,MAAM,MAAM,MACT,QAAQ,sBAAsB,OAAO,EACrC,QAAQ,SAAS,GAAG,EACpB,KAAK,EACL,YAAY;CAEf,OAAO,GAAG,IAAI,OAAO,CAAC,EAAE,YAAY,IAAI,IAAI,MAAM,CAAC;AACrD;AAEA,SAAgB,wBACd,OACA,OAC0B;CAC1B,OAAO,OAAO,UAAU,aAAa,MAAM,KAAK,IAAI;AACtD;AAEA,SAAgB,yBACd,QACA,OACA;CACA,OAAO,OAAO,WAAW,aAAa,OAAO,KAAK,IAAI;AACxD;;;;;;;;;;;EClBA,MAAM,QAAQ;EACd,MAAM,SAAA,GAAA,kBAAA,iBAAwB;EAC9B,MAAM,iBAAA,GAAA,IAAA,gBAA+B,wBAAwB,MAAM,OAAO,MAAM,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