@jamsrui/context-menu 0.0.4 → 0.0.6
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/dist/context-menu-config.d.mts +2 -2
- package/dist/context-menu-content.d.mts +2 -2
- package/dist/context-menu-content.mjs +1 -1
- package/dist/context-menu-context.d.mts +2 -1
- package/dist/context-menu-item.d.mts +2 -1
- package/dist/context-menu-item.mjs +1 -1
- package/dist/context-menu.d.mts +2 -1
- package/dist/context-menu.mjs +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/{use-context-menu-CtaMbhFX.d.mts → use-context-menu-K6P2zj_Q.d.mts} +2 -1
- package/dist/use-context-menu.d.mts +2 -1
- package/package.json +4 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
3
|
declare const useContextMenuConfig: () => ContextMenuConfig.Props;
|
|
4
4
|
declare const ContextMenuConfig: (props: ContextMenuConfig.Props & {
|
|
5
5
|
merge?: boolean;
|
|
6
|
-
}) =>
|
|
6
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
7
7
|
declare namespace ContextMenuConfig {
|
|
8
8
|
interface Props {
|
|
9
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { UIProps } from '@jamsrui/utils';
|
|
3
3
|
|
|
4
|
-
declare const ContextMenuContent: (props: ContextMenuContent.Props) =>
|
|
4
|
+
declare const ContextMenuContent: (props: ContextMenuContent.Props) => react_jsx_runtime.JSX.Element;
|
|
5
5
|
declare namespace ContextMenuContent {
|
|
6
6
|
interface Props extends UIProps<"div"> {
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FloatingFocusManager as
|
|
1
|
+
import{Fragment as M,jsx as t,jsxs as f}from"react/jsx-runtime";import{FloatingFocusManager as C,FloatingList as m,FloatingOverlay as x,FloatingPortal as F}from"@floating-ui/react";import{useRenderElement as c}from"@jamsrui/hooks";import{useContextMenuContext as d}from"./context-menu-context";import{ContextMenuFloatingContext as P}from"./context-menu-floating-context";const O=o=>{const{getFloatingListProps:e,getOverlayProps:n,getFocusManagerProps:r,getRootProps:i,getContentProps:s,isOpen:a,floatingCtx:l}=d(),{children:p}=o,g=t(M,{children:t("div",{...s(o),children:p})}),u=c("div",{props:[i(),{children:g}]});return t(P,{value:l,children:t(m,{...e(),children:a?f(F,{children:[t(x,{...n()}),t(C,{...r(),children:u})]}):null})})};export{O as ContextMenuContent};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { u as useContextMenu } from './use-context-menu-
|
|
2
|
+
import { u as useContextMenu } from './use-context-menu-K6P2zj_Q.mjs';
|
|
3
3
|
import '@floating-ui/react';
|
|
4
4
|
import '@jamsrui/utils';
|
|
5
5
|
import './context-menu-content.mjs';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
6
7
|
import './context-menu-floating-context.mjs';
|
|
7
8
|
import './context-menu-item-inner.mjs';
|
|
8
9
|
import './styles.mjs';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '@jamsrui/utils';
|
|
3
|
-
export { a as ContextMenuItem } from './use-context-menu-
|
|
3
|
+
export { a as ContextMenuItem } from './use-context-menu-K6P2zj_Q.mjs';
|
|
4
4
|
import '@floating-ui/react';
|
|
5
5
|
import './context-menu-content.mjs';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
6
7
|
import './context-menu-floating-context.mjs';
|
|
7
8
|
import './context-menu-item-inner.mjs';
|
|
8
9
|
import './styles.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useFloatingTree as
|
|
1
|
+
import{Fragment as R,jsx as v,jsxs as k}from"react/jsx-runtime";import{useFloatingTree as x,useListItem as f}from"@floating-ui/react";import{useMergeRefs as I,useRenderElement as M}from"@jamsrui/hooks";import{useContextMenuContext as b}from"./context-menu-context";import{useContextMenuFloatingContext as P}from"./context-menu-floating-context";import{ContextMenuItemInner as g}from"./context-menu-item-inner";const O=s=>{const{getMenuItemProps:i}=b(),a=x(),{textValue:c,children:e,isDisabled:t,startContent:m,endContent:l,preventCloseOnClick:d,...u}=s,n=P(),o=f({label:c??(typeof e=="string"?e:void 0)}),r=o.index===n.activeIndex,p=I([o.ref]),C=k(R,{children:[m,v(g,{children:e}),l]});return M("button",{props:[i(u),{children:C,disabled:t,"data-disabled":t,"data-active":r,"aria-disabled":t,ref:p,tabIndex:r?0:-1,onClick(){d||a?.events.emit("click")},onMouseEnter(){n.setHasFocusInside(!0)}}]})};export{O as ContextMenuItem};
|
package/dist/context-menu.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
export { C as ContextMenu } from './use-context-menu-K6P2zj_Q.mjs';
|
|
1
3
|
import 'react';
|
|
2
|
-
export { C as ContextMenu } from './use-context-menu-CtaMbhFX.mjs';
|
|
3
4
|
import '@floating-ui/react';
|
|
4
5
|
import '@jamsrui/utils';
|
|
5
6
|
import './context-menu-content.mjs';
|
package/dist/context-menu.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FloatingNode as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{FloatingNode as x,FloatingTree as c,useFloatingParentNodeId as s}from"@floating-ui/react";import{ContextMenuContext as C}from"./context-menu-context";import{useContextMenu as a}from"./use-context-menu";const r=e=>{const t=a(e),{children:o}=e,{getNodeProps:u}=t;return n(C,{value:t,children:n(x,{...u(),children:o})})},M=e=>{const t=s(),{children:o}=e;return t===null?n(c,{children:n(r,{...e,children:o})}):n(r,{...e,children:o})};export{M as ContextMenu};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export { C as ContextMenu, a as ContextMenuItem } from './use-context-menu-
|
|
1
|
+
export { C as ContextMenu, a as ContextMenuItem } from './use-context-menu-K6P2zj_Q.mjs';
|
|
2
2
|
export { ContextMenuTrigger } from './context-menu-trigger.mjs';
|
|
3
3
|
export { ContextMenuContent } from './context-menu-content.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@floating-ui/react';
|
|
6
6
|
import '@jamsrui/utils';
|
|
7
7
|
import './context-menu-floating-context.mjs';
|
|
8
|
+
import 'react/jsx-runtime';
|
|
8
9
|
import './context-menu-item-inner.mjs';
|
|
9
10
|
import './styles.mjs';
|
|
10
11
|
import 'tailwind-variants';
|
|
@@ -4,10 +4,11 @@ import { FloatingOverlayProps, FloatingFocusManagerProps, FloatingNodeProps, Flo
|
|
|
4
4
|
import { UIProps, PropGetter, SlotsToClassNames } from '@jamsrui/utils';
|
|
5
5
|
import { ContextMenuContent } from './context-menu-content.mjs';
|
|
6
6
|
import { ContextMenuFloatingContext } from './context-menu-floating-context.mjs';
|
|
7
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
8
|
import { ContextMenuItemInner } from './context-menu-item-inner.mjs';
|
|
8
9
|
import { ContextMenuVariantProps, ContextMenuSlots } from './styles.mjs';
|
|
9
10
|
|
|
10
|
-
declare const ContextMenu: (props: ContextMenu.Props) =>
|
|
11
|
+
declare const ContextMenu: (props: ContextMenu.Props) => react_jsx_runtime.JSX.Element;
|
|
11
12
|
declare namespace ContextMenu {
|
|
12
13
|
interface Props extends useContextMenu.Props {
|
|
13
14
|
children: React.ReactNode;
|
|
@@ -3,7 +3,8 @@ import '@floating-ui/react';
|
|
|
3
3
|
import '@jamsrui/utils';
|
|
4
4
|
import './context-menu-content.mjs';
|
|
5
5
|
import './context-menu-floating-context.mjs';
|
|
6
|
-
export { u as useContextMenu } from './use-context-menu-
|
|
6
|
+
export { u as useContextMenu } from './use-context-menu-K6P2zj_Q.mjs';
|
|
7
7
|
import './context-menu-item-inner.mjs';
|
|
8
8
|
import './styles.mjs';
|
|
9
|
+
import 'react/jsx-runtime';
|
|
9
10
|
import 'tailwind-variants';
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/context-menu",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@floating-ui/react": ">=0.27",
|
|
9
|
-
"@jamsrui/
|
|
10
|
-
"@jamsrui/utils": "^0.0.
|
|
11
|
-
"@jamsrui/
|
|
9
|
+
"@jamsrui/hooks": "^0.0.6",
|
|
10
|
+
"@jamsrui/utils": "^0.0.6",
|
|
11
|
+
"@jamsrui/core": "^0.0.6"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|