@jamsrui/context-menu 0.0.2
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/README.md +40 -0
- package/dist/chunk-2X5XTZP6.mjs +1 -0
- package/dist/chunk-4MJ6HKJE.mjs +1 -0
- package/dist/chunk-4RAU6P3D.js +1 -0
- package/dist/chunk-7LX5S77F.js +1 -0
- package/dist/chunk-FKZ7QFMS.js +1 -0
- package/dist/chunk-HMFJTFDZ.mjs +1 -0
- package/dist/chunk-JGTXYW6W.js +1 -0
- package/dist/chunk-KQMEILBD.mjs +1 -0
- package/dist/chunk-L5W7R6AL.mjs +1 -0
- package/dist/chunk-LSDTQD7I.js +1 -0
- package/dist/chunk-SERPJZ7J.mjs +1 -0
- package/dist/chunk-TMHKV7ZI.js +1 -0
- package/dist/chunk-TXB3K42I.mjs +1 -0
- package/dist/chunk-UEFGBHFK.js +1 -0
- package/dist/chunk-UNIE5VBW.mjs +1 -0
- package/dist/chunk-UQRZDXHX.js +1 -0
- package/dist/chunk-XNJ3K4PS.mjs +1 -0
- package/dist/chunk-ZMURG6Y5.js +1 -0
- package/dist/context-menu-config.d.mts +12 -0
- package/dist/context-menu-config.d.ts +12 -0
- package/dist/context-menu-config.js +1 -0
- package/dist/context-menu-config.mjs +1 -0
- package/dist/context-menu-content.d.mts +10 -0
- package/dist/context-menu-content.d.ts +10 -0
- package/dist/context-menu-content.js +1 -0
- package/dist/context-menu-content.mjs +1 -0
- package/dist/context-menu-context.d.mts +18 -0
- package/dist/context-menu-context.d.ts +18 -0
- package/dist/context-menu-context.js +1 -0
- package/dist/context-menu-context.mjs +1 -0
- package/dist/context-menu-floating-context.d.mts +13 -0
- package/dist/context-menu-floating-context.d.ts +13 -0
- package/dist/context-menu-floating-context.js +1 -0
- package/dist/context-menu-floating-context.mjs +1 -0
- package/dist/context-menu-item-inner.d.mts +10 -0
- package/dist/context-menu-item-inner.d.ts +10 -0
- package/dist/context-menu-item-inner.js +1 -0
- package/dist/context-menu-item-inner.mjs +1 -0
- package/dist/context-menu-item.d.mts +9 -0
- package/dist/context-menu-item.d.ts +9 -0
- package/dist/context-menu-item.js +1 -0
- package/dist/context-menu-item.mjs +1 -0
- package/dist/context-menu-trigger.d.mts +10 -0
- package/dist/context-menu-trigger.d.ts +10 -0
- package/dist/context-menu-trigger.js +1 -0
- package/dist/context-menu-trigger.mjs +1 -0
- package/dist/context-menu.d.mts +9 -0
- package/dist/context-menu.d.ts +9 -0
- package/dist/context-menu.js +1 -0
- package/dist/context-menu.mjs +1 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/dist/styles.d.mts +156 -0
- package/dist/styles.d.ts +156 -0
- package/dist/styles.js +1 -0
- package/dist/styles.mjs +1 -0
- package/dist/use-context-menu-CtaMbhFX.d.mts +65 -0
- package/dist/use-context-menu-nIR4O9Ae.d.ts +65 -0
- package/dist/use-context-menu.d.mts +9 -0
- package/dist/use-context-menu.d.ts +9 -0
- package/dist/use-context-menu.js +1 -0
- package/dist/use-context-menu.mjs +1 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# π **JamsrUI**
|
|
2
|
+
|
|
3
|
+
**A comprehensive React UI component library designed for developers, with Tailwind CSS integration for seamless styling.**
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## π **Overview**
|
|
7
|
+
|
|
8
|
+
[JamsrUI](https://jamsr-ui.jamsrworld.com) is designed to help developers build modern, fast and visually appealing web applications with ease.
|
|
9
|
+
|
|
10
|
+
## π Getting Started
|
|
11
|
+
|
|
12
|
+
Boost & Build your websites using [JamsrUI](https://jamsr-ui.jamsrworld.com).
|
|
13
|
+
|
|
14
|
+
## β¨ Features
|
|
15
|
+
|
|
16
|
+
- π **Production-Ready**: Optimized for modern React projects.
|
|
17
|
+
- π¨ **Customizable**: Easily override styles and themes.
|
|
18
|
+
- π οΈ **Reusable Components**: Save time with prebuilt, efficient UI elements.
|
|
19
|
+
- β‘ **Developer-Friendly**: Simple API and well-documented usage.
|
|
20
|
+
- π¦ **Lightweight**: Minimal dependencies for fast performance.
|
|
21
|
+
- π₯οΈ **Modern Design**: Clean, responsive, and user-friendly components.
|
|
22
|
+
|
|
23
|
+
## π± Community
|
|
24
|
+
|
|
25
|
+
Weβre thrilled to see the community actively engage with **JamsrUI**! Whether you're sharing feedback, reporting bugs, requesting features, or showcasing projects built with JamsrUI, your involvement helps us grow and improve.
|
|
26
|
+
|
|
27
|
+
### How to Engage
|
|
28
|
+
|
|
29
|
+
- π¬ **Report Bugs**: [GitHub Issues](https://github.com/jamsrworld/jamsr-ui/issues)
|
|
30
|
+
- π **Request Features**: Share ideas for new components.
|
|
31
|
+
- π€ **Showcase Projects**: Let us know how you use JamsrUI.
|
|
32
|
+
|
|
33
|
+
## Contributing
|
|
34
|
+
|
|
35
|
+
We welcome contributions from developers of all skill levels!
|
|
36
|
+
|
|
37
|
+
## β Support the Project
|
|
38
|
+
|
|
39
|
+
If you find **JamsrUI** helpful, consider giving it a β on [GitHub](https://github.com/jamsrworld/jamsr-ui).
|
|
40
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-HMFJTFDZ.mjs";import{b as o}from"./chunk-4MJ6HKJE.mjs";import{FloatingFocusManager as C,FloatingList as x,FloatingOverlay as c,FloatingPortal as F}from"@floating-ui/react";import{useRenderElement as d}from"@jamsrui/hooks";var h=t=>{let{getFloatingListProps:n,getOverlayProps:r,getFocusManagerProps:i,getRootProps:s,getContentProps:a,isOpen:l,floatingCtx:p}=o(),{children:g}=t,u=React.createElement(React.Fragment,null,React.createElement("div",{...a(t)},g)),m=d("div",{props:[s(),{children:u}]});return React.createElement(e,{value:p},React.createElement(x,{...n()},l?React.createElement(F,null,React.createElement(c,{...r()}),React.createElement(C,{...i()},m)):null))};export{h as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as e,use as n}from"react";var o=e(null),u=()=>{let t=n(o);if(!t)throw new Error("useContextMenuContext must be used within a ContextMenuContext");return t};export{o as a,u as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _react = require('react');var o=_react.createContext.call(void 0, {setHasFocusInside:()=>{},activeIndex:null,getItemProps:()=>({})}),s= exports.b =()=>_react.use.call(void 0, o);exports.a = o; exports.b = s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUQRZDXHXjs = require('./chunk-UQRZDXHX.js');var _react = require('react');var s=n=>{let{children:e}=n,{getTriggerProps:t}=_chunkUQRZDXHXjs.b.call(void 0, );return _react.isValidElement.call(void 0, e)?_react.cloneElement.call(void 0, e,t()):(console.warn("Invalid children passed to MenuTrigger"),null)};exports.a = s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUQRZDXHXjs = require('./chunk-UQRZDXHX.js');var _hooks = require('@jamsrui/hooks');var m=n=>{let{getMenuItemInnerProps:t}=_chunkUQRZDXHXjs.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "span",{props:[t(n)]})};exports.a = m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as t,use as e}from"react";var o=t({setHasFocusInside:()=>{},activeIndex:null,getItemProps:()=>({})}),s=()=>e(o);export{o as a,s as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZMURG6Y5js = require('./chunk-ZMURG6Y5.js');var _chunkUQRZDXHXjs = require('./chunk-UQRZDXHX.js');var _react = require('@floating-ui/react');var u=e=>{let t=_chunkZMURG6Y5js.a.call(void 0, e),{children:n}=e,{getNodeProps:x}=t;return React.createElement(_chunkUQRZDXHXjs.a,{value:t},React.createElement(_react.FloatingNode,{...x()},n))},l= exports.a =e=>{let t=_react.useFloatingParentNodeId.call(void 0, ),{children:n}=e;return t===null?React.createElement(_react.FloatingTree,null,React.createElement(u,{...e},n)):React.createElement(u,{...e},n)};exports.a = l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-4MJ6HKJE.mjs";import{useRenderElement as r}from"@jamsrui/hooks";var m=n=>{let{getMenuItemInnerProps:t}=e();return r("span",{props:[t(n)]})};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as I}from"./chunk-UNIE5VBW.mjs";import{b as B}from"./chunk-HMFJTFDZ.mjs";import{useCallback as a,useEffect as $,useMemo as q,useRef as g,useState as z}from"react";import{autoUpdate as de,flip as fe,offset as ge,safePolygon as Pe,shift as xe,useDismiss as Ie,useFloating as Ce,useFloatingNodeId as Me,useFloatingParentNodeId as ve,useFloatingTree as ye,useHover as Fe,useInteractions as be,useListItem as Ne,useListNavigation as he,useMergeRefs as Oe,useRole as Re,useTypeahead as ke}from"@floating-ui/react";import{useControlledState as Ee}from"@jamsrui/hooks";import{cn as C,dataAttrDev as u,mapPropsVariants as Se}from"@jamsrui/utils";var He=J=>{let m=ve(),t=m!==null,[Q,W]=Se(J,I.variantKeys),{isOpen:Z,defaultOpen:_,onOpenChange:ee,classNames:n,closeDelay:te=0,closeOnEscapeKey:ne=!0,closeOnOutsidePress:oe=!0,lockScroll:M=!0,offset:se=4,openDelay:ae=75,placement:re="right-start"}=Q,r=ye(),l=Me(),P=Ne(),[o=!1,c]=Ee({defaultProp:_,onChange:ee,prop:Z}),[le,v]=z(!1),[d,y]=z(null),F=g([]),b=g([]),{refs:p,floatingStyles:N,context:i}=Ce({nodeId:l,open:o,onOpenChange:c,middleware:[ge({mainAxis:se,alignmentAxis:t?-4:0}),fe({fallbackPlacements:["left-start"]}),xe({padding:5})],placement:re,whileElementsMounted:de}),ie=Fe(i,{enabled:t,delay:{open:ae,close:te},handleClose:Pe({blockPointerEvents:!0})}),ce=Re(i,{role:"menu"}),ue=Ie(i,{escapeKey:ne,outsidePress:oe}),me=he(i,{listRef:F,onNavigate:y,activeIndex:d}),pe=ke(i,{enabled:o,listRef:b,onMatch:y,activeIndex:d}),{getFloatingProps:h,getItemProps:O,getReferenceProps:R}=be([ce,ie,ue,me,pe]);$(()=>{if(!r)return;function e(){c(!1)}function Y(j){j.nodeId!==l&&j.parentId===m&&c(!1)}return r.events.on("click",e),r.events.on("menuopen",Y),()=>{r.events.off("click",e),r.events.off("menuopen",Y)}},[r,l,m,c,o]),$(()=>{o&&r&&r.events.emit("menuopen",{parentId:m,nodeId:l})},[r,o,l,m]);let s=I(W),k=o&&le&&t,f=B(),E=g(!1),x=g(null),S=a(e=>{e.preventDefault(),p.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e.clientX,y:e.clientY,top:e.clientY,right:e.clientX,bottom:e.clientY,left:e.clientX}}}),c(!0),x.current&&clearTimeout(x.current),E.current=!1,x.current=window.setTimeout(()=>{E.current=!0},300)},[p,c]),T=Oe([p.setReference,P.ref]),D=a(()=>({ref:T,tabIndex:t?f.activeIndex===P.index?0:-1:void 0,"data-slot":u("trigger"),role:t?"menuitem":void 0,"data-active":k,"data-nested":t,"data-open":o,onContextMenu:t?void 0:S,...R({...f.getItemProps({onMouseEnter(){v(!1),f.setHasFocusInside(!0)}})})}),[R,S,k,t,o,P.index,T,f]),w=a(()=>({lockScroll:M,"data-slot":u("overlay"),className:s.backdrop({className:n?.backdrop})}),[n?.backdrop,M,s]),L=a(()=>({context:i,modal:!0,initialFocus:1,returnFocus:!t,disabled:!1}),[i,t]),A=a(()=>({"data-component":u("menu"),"data-slot":u("root"),className:s.root({className:n?.root}),ref:p.setFloating,style:N,...h()}),[n?.root,N,h,p.setFloating,s]),U=a(()=>({className:s.content({className:C(n?.content)})}),[n?.content,s]),G=a(()=>({id:l}),[l]),H=a(()=>({elementsRef:F,labelsRef:b}),[]),K=q(()=>({activeIndex:d,getItemProps:O,setHasFocusInside:v}),[d,O]),V=a(e=>({...e,"data-slot":u("menu-item"),className:s.menuItem({className:C(n?.menuItem,e.className),color:e.color}),role:"menuitem"}),[n?.menuItem,s]),X=a(e=>({...e,"data-slot":u("menu-item-inner"),className:s.menuItemInner({className:C(n?.menuItemInner,e.className)})}),[n?.menuItemInner,s]);return q(()=>({getOverlayProps:w,getFocusManagerProps:L,getContentProps:U,getNodeProps:G,isOpen:o,getTriggerProps:D,getFloatingListProps:H,floatingCtx:K,getRootProps:A,getMenuItemProps:V,isNested:t,getMenuItemInnerProps:X}),[K,U,H,L,X,V,G,w,A,D,t,o])};export{He as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkFKZ7QFMSjs = require('./chunk-FKZ7QFMS.js');var _chunk4RAU6P3Djs = require('./chunk-4RAU6P3D.js');var _chunkUQRZDXHXjs = require('./chunk-UQRZDXHX.js');var _react = require('@floating-ui/react');var _hooks = require('@jamsrui/hooks');var F=c=>{let{getMenuItemProps:m}=_chunkUQRZDXHXjs.b.call(void 0, ),l=_react.useFloatingTree.call(void 0, ),{textValue:u,children:e,isDisabled:t,startContent:d,endContent:p,preventCloseOnClick:x,...C}=c,n=_chunk4RAU6P3Djs.b.call(void 0, ),o=_react.useListItem.call(void 0, {label:_nullishCoalesce(u, () => ((typeof e=="string"?e:void 0)))}),r=o.index===n.activeIndex,f=_hooks.useMergeRefs.call(void 0, [o.ref]),I=React.createElement(React.Fragment,null,d,React.createElement(_chunkFKZ7QFMSjs.a,null,e),p);return _hooks.useRenderElement.call(void 0, "button",{props:[m(C),{children:I,disabled:t,"data-disabled":t,"data-active":r,"aria-disabled":t,ref:f,tabIndex:r?0:-1,onClick(){x||_optionalChain([l, 'optionalAccess', _ => _.events, 'access', _2 => _2.emit, 'call', _3 => _3("click")])},onMouseEnter(){n.setHasFocusInside(!0)}}]})};exports.a = F;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as r}from"./chunk-4MJ6HKJE.mjs";import{cloneElement as o,isValidElement as i}from"react";var s=n=>{let{children:e}=n,{getTriggerProps:t}=r();return i(e)?o(e,t()):(console.warn("Invalid children passed to MenuTrigger"),null)};export{s as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4RAU6P3Djs = require('./chunk-4RAU6P3D.js');var _chunkUQRZDXHXjs = require('./chunk-UQRZDXHX.js');var _react = require('@floating-ui/react');var _hooks = require('@jamsrui/hooks');var h=t=>{let{getFloatingListProps:n,getOverlayProps:r,getFocusManagerProps:i,getRootProps:s,getContentProps:a,isOpen:l,floatingCtx:p}=_chunkUQRZDXHXjs.b.call(void 0, ),{children:g}=t,u=React.createElement(React.Fragment,null,React.createElement("div",{...a(t)},g)),m=_hooks.useRenderElement.call(void 0, "div",{props:[s(),{children:u}]});return React.createElement(_chunk4RAU6P3Djs.a,{value:p},React.createElement(_react.FloatingList,{...n()},l?React.createElement(_react.FloatingPortal,null,React.createElement(_react.FloatingOverlay,{...r()}),React.createElement(_react.FloatingFocusManager,{...i()},m)):null))};exports.a = h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-KQMEILBD.mjs";import{b as i}from"./chunk-HMFJTFDZ.mjs";import{b as s}from"./chunk-4MJ6HKJE.mjs";import{useFloatingTree as M,useListItem as b}from"@floating-ui/react";import{useMergeRefs as P,useRenderElement as g}from"@jamsrui/hooks";var F=c=>{let{getMenuItemProps:m}=s(),l=M(),{textValue:u,children:e,isDisabled:t,startContent:d,endContent:p,preventCloseOnClick:x,...C}=c,n=i(),o=b({label:u??(typeof e=="string"?e:void 0)}),r=o.index===n.activeIndex,f=P([o.ref]),I=React.createElement(React.Fragment,null,d,React.createElement(a,null,e),p);return g("button",{props:[m(C),{children:I,disabled:t,"data-disabled":t,"data-active":r,"aria-disabled":t,ref:f,tabIndex:r?0:-1,onClick(){x||l?.events.emit("click")},onMouseEnter(){n.setHasFocusInside(!0)}}]})};export{F as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@jamsrui/utils');var t="",n= exports.b =_utils.tv.call(void 0, {slots:{arrow:"fill-background-secondary",backdrop:"z-backdrop",root:"min-w-[150px] z-popover",content:"relative z-popover box-border inline-flex w-full flex-col justify-center bg-surface p-1 text-sm shadow-md outline-none",menuItem:["relative box-border flex size-full cursor-pointer select-none items-center gap-2 px-2 py-1.5 text-left outline-none ui-disabled:cursor-not-allowed ui-disabled:opacity-60","ui-active:bg-surface-secondary"],menuItemInner:"grow"},variants:{radius:_utils.radiusVariant.call(void 0, ["content","menuItem"]),backdrop:{transparent:{backdrop:""},opaque:{backdrop:"bg-black/50"},blur:{backdrop:"bg-black/30 backdrop-blur-md backdrop-saturate-150"}},color:{default:{menuItem:"ui-hover:bg-surface-secondary ui-hover:text-foreground"},primary:{menuItem:"ui-hover:bg-primary ui-hover:text-primary-foreground"},secondary:{menuItem:"ui-hover:bg-secondary ui-hover:text-secondary-foreground"},success:{menuItem:"ui-hover:bg-success ui-hover:text-success-foreground"},warning:{menuItem:"ui-hover:bg-warning ui-hover:text-warning-foreground"},danger:{menuItem:"ui-hover:bg-danger ui-hover:text-danger-foreground"}}},defaultVariants:{backdrop:"transparent",radius:"md",color:"default"}});exports.a = t; exports.b = n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{radiusVariant as e,tv as r}from"@jamsrui/utils";var t="",n=r({slots:{arrow:"fill-background-secondary",backdrop:"z-backdrop",root:"min-w-[150px] z-popover",content:"relative z-popover box-border inline-flex w-full flex-col justify-center bg-surface p-1 text-sm shadow-md outline-none",menuItem:["relative box-border flex size-full cursor-pointer select-none items-center gap-2 px-2 py-1.5 text-left outline-none ui-disabled:cursor-not-allowed ui-disabled:opacity-60","ui-active:bg-surface-secondary"],menuItemInner:"grow"},variants:{radius:e(["content","menuItem"]),backdrop:{transparent:{backdrop:""},opaque:{backdrop:"bg-black/50"},blur:{backdrop:"bg-black/30 backdrop-blur-md backdrop-saturate-150"}},color:{default:{menuItem:"ui-hover:bg-surface-secondary ui-hover:text-foreground"},primary:{menuItem:"ui-hover:bg-primary ui-hover:text-primary-foreground"},secondary:{menuItem:"ui-hover:bg-secondary ui-hover:text-secondary-foreground"},success:{menuItem:"ui-hover:bg-success ui-hover:text-success-foreground"},warning:{menuItem:"ui-hover:bg-warning ui-hover:text-warning-foreground"},danger:{menuItem:"ui-hover:bg-danger ui-hover:text-danger-foreground"}}},defaultVariants:{backdrop:"transparent",radius:"md",color:"default"}});export{t as a,n as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _react = require('react');var o=_react.createContext.call(void 0, null),u= exports.b =()=>{let t=_react.use.call(void 0, o);if(!t)throw new Error("useContextMenuContext must be used within a ContextMenuContext");return t};exports.a = o; exports.b = u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-L5W7R6AL.mjs";import{a as o}from"./chunk-4MJ6HKJE.mjs";import{FloatingNode as c,FloatingTree as s,useFloatingParentNodeId as a}from"@floating-ui/react";var u=e=>{let t=r(e),{children:n}=e,{getNodeProps:x}=t;return React.createElement(o,{value:t},React.createElement(c,{...x()},n))},l=e=>{let t=a(),{children:n}=e;return t===null?React.createElement(s,null,React.createElement(u,{...e},n)):React.createElement(u,{...e},n)};export{l as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkUEFGBHFKjs = require('./chunk-UEFGBHFK.js');var _chunk4RAU6P3Djs = require('./chunk-4RAU6P3D.js');var _react = require('react');var _react3 = require('@floating-ui/react');var _hooks = require('@jamsrui/hooks');var _utils = require('@jamsrui/utils');var He=J=>{let m=_react3.useFloatingParentNodeId.call(void 0, ),t=m!==null,[Q,W]=_utils.mapPropsVariants.call(void 0, J,_chunkUEFGBHFKjs.b.variantKeys),{isOpen:Z,defaultOpen:_,onOpenChange:ee,classNames:n,closeDelay:te=0,closeOnEscapeKey:ne=!0,closeOnOutsidePress:oe=!0,lockScroll:M=!0,offset:se=4,openDelay:ae=75,placement:re="right-start"}=Q,r=_react3.useFloatingTree.call(void 0, ),l=_react3.useFloatingNodeId.call(void 0, ),P=_react3.useListItem.call(void 0, ),[o=!1,c]=_hooks.useControlledState.call(void 0, {defaultProp:_,onChange:ee,prop:Z}),[le,v]=_react.useState.call(void 0, !1),[d,y]=_react.useState.call(void 0, null),F=_react.useRef.call(void 0, []),b=_react.useRef.call(void 0, []),{refs:p,floatingStyles:N,context:i}=_react3.useFloating.call(void 0, {nodeId:l,open:o,onOpenChange:c,middleware:[_react3.offset.call(void 0, {mainAxis:se,alignmentAxis:t?-4:0}),_react3.flip.call(void 0, {fallbackPlacements:["left-start"]}),_react3.shift.call(void 0, {padding:5})],placement:re,whileElementsMounted:_react3.autoUpdate}),ie=_react3.useHover.call(void 0, i,{enabled:t,delay:{open:ae,close:te},handleClose:_react3.safePolygon.call(void 0, {blockPointerEvents:!0})}),ce=_react3.useRole.call(void 0, i,{role:"menu"}),ue=_react3.useDismiss.call(void 0, i,{escapeKey:ne,outsidePress:oe}),me=_react3.useListNavigation.call(void 0, i,{listRef:F,onNavigate:y,activeIndex:d}),pe=_react3.useTypeahead.call(void 0, i,{enabled:o,listRef:b,onMatch:y,activeIndex:d}),{getFloatingProps:h,getItemProps:O,getReferenceProps:R}=_react3.useInteractions.call(void 0, [ce,ie,ue,me,pe]);_react.useEffect.call(void 0, ()=>{if(!r)return;function e(){c(!1)}function Y(j){j.nodeId!==l&&j.parentId===m&&c(!1)}return r.events.on("click",e),r.events.on("menuopen",Y),()=>{r.events.off("click",e),r.events.off("menuopen",Y)}},[r,l,m,c,o]),_react.useEffect.call(void 0, ()=>{o&&r&&r.events.emit("menuopen",{parentId:m,nodeId:l})},[r,o,l,m]);let s=_chunkUEFGBHFKjs.b.call(void 0, W),k=o&&le&&t,f=_chunk4RAU6P3Djs.b.call(void 0, ),E=_react.useRef.call(void 0, !1),x=_react.useRef.call(void 0, null),S=_react.useCallback.call(void 0, e=>{e.preventDefault(),p.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e.clientX,y:e.clientY,top:e.clientY,right:e.clientX,bottom:e.clientY,left:e.clientX}}}),c(!0),x.current&&clearTimeout(x.current),E.current=!1,x.current=window.setTimeout(()=>{E.current=!0},300)},[p,c]),T=_react3.useMergeRefs.call(void 0, [p.setReference,P.ref]),D=_react.useCallback.call(void 0, ()=>({ref:T,tabIndex:t?f.activeIndex===P.index?0:-1:void 0,"data-slot":_utils.dataAttrDev.call(void 0, "trigger"),role:t?"menuitem":void 0,"data-active":k,"data-nested":t,"data-open":o,onContextMenu:t?void 0:S,...R({...f.getItemProps({onMouseEnter(){v(!1),f.setHasFocusInside(!0)}})})}),[R,S,k,t,o,P.index,T,f]),w=_react.useCallback.call(void 0, ()=>({lockScroll:M,"data-slot":_utils.dataAttrDev.call(void 0, "overlay"),className:s.backdrop({className:_optionalChain([n, 'optionalAccess', _2 => _2.backdrop])})}),[_optionalChain([n, 'optionalAccess', _3 => _3.backdrop]),M,s]),L=_react.useCallback.call(void 0, ()=>({context:i,modal:!0,initialFocus:1,returnFocus:!t,disabled:!1}),[i,t]),A=_react.useCallback.call(void 0, ()=>({"data-component":_utils.dataAttrDev.call(void 0, "menu"),"data-slot":_utils.dataAttrDev.call(void 0, "root"),className:s.root({className:_optionalChain([n, 'optionalAccess', _4 => _4.root])}),ref:p.setFloating,style:N,...h()}),[_optionalChain([n, 'optionalAccess', _5 => _5.root]),N,h,p.setFloating,s]),U=_react.useCallback.call(void 0, ()=>({className:s.content({className:_utils.cn.call(void 0, _optionalChain([n, 'optionalAccess', _6 => _6.content]))})}),[_optionalChain([n, 'optionalAccess', _7 => _7.content]),s]),G=_react.useCallback.call(void 0, ()=>({id:l}),[l]),H=_react.useCallback.call(void 0, ()=>({elementsRef:F,labelsRef:b}),[]),K=_react.useMemo.call(void 0, ()=>({activeIndex:d,getItemProps:O,setHasFocusInside:v}),[d,O]),V=_react.useCallback.call(void 0, e=>({...e,"data-slot":_utils.dataAttrDev.call(void 0, "menu-item"),className:s.menuItem({className:_utils.cn.call(void 0, _optionalChain([n, 'optionalAccess', _8 => _8.menuItem]),e.className),color:e.color}),role:"menuitem"}),[_optionalChain([n, 'optionalAccess', _9 => _9.menuItem]),s]),X=_react.useCallback.call(void 0, e=>({...e,"data-slot":_utils.dataAttrDev.call(void 0, "menu-item-inner"),className:s.menuItemInner({className:_utils.cn.call(void 0, _optionalChain([n, 'optionalAccess', _10 => _10.menuItemInner]),e.className)})}),[_optionalChain([n, 'optionalAccess', _11 => _11.menuItemInner]),s]);return _react.useMemo.call(void 0, ()=>({getOverlayProps:w,getFocusManagerProps:L,getContentProps:U,getNodeProps:G,isOpen:o,getTriggerProps:D,getFloatingListProps:H,floatingCtx:K,getRootProps:A,getMenuItemProps:V,isNested:t,getMenuItemInnerProps:X}),[K,U,H,L,X,V,G,w,A,D,t,o])};exports.a = He;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
declare const useContextMenuConfig: () => ContextMenuConfig.Props;
|
|
4
|
+
declare const ContextMenuConfig: (props: ContextMenuConfig.Props & {
|
|
5
|
+
merge?: boolean;
|
|
6
|
+
}) => react.JSX.Element;
|
|
7
|
+
declare namespace ContextMenuConfig {
|
|
8
|
+
interface Props {
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { ContextMenuConfig, useContextMenuConfig };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
declare const useContextMenuConfig: () => ContextMenuConfig.Props;
|
|
4
|
+
declare const ContextMenuConfig: (props: ContextMenuConfig.Props & {
|
|
5
|
+
merge?: boolean;
|
|
6
|
+
}) => react.JSX.Element;
|
|
7
|
+
declare namespace ContextMenuConfig {
|
|
8
|
+
interface Props {
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { ContextMenuConfig, useContextMenuConfig };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@jamsrui/utils');var[n,t]=_utils.createConfigContext.call(void 0, {displayName:"ContextMenuConfig"});exports.ContextMenuConfig = n; exports.useContextMenuConfig = t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createConfigContext as o}from"@jamsrui/utils";var[n,t]=o({displayName:"ContextMenuConfig"});export{n as ContextMenuConfig,t as useContextMenuConfig};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { UIProps } from '@jamsrui/utils';
|
|
3
|
+
|
|
4
|
+
declare const ContextMenuContent: (props: ContextMenuContent.Props) => react.JSX.Element;
|
|
5
|
+
declare namespace ContextMenuContent {
|
|
6
|
+
interface Props extends UIProps<"div"> {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { ContextMenuContent };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { UIProps } from '@jamsrui/utils';
|
|
3
|
+
|
|
4
|
+
declare const ContextMenuContent: (props: ContextMenuContent.Props) => react.JSX.Element;
|
|
5
|
+
declare namespace ContextMenuContent {
|
|
6
|
+
interface Props extends UIProps<"div"> {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { ContextMenuContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTMHKV7ZIjs = require('./chunk-TMHKV7ZI.js');require('./chunk-4RAU6P3D.js');require('./chunk-UQRZDXHX.js');exports.ContextMenuContent = _chunkTMHKV7ZIjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-2X5XTZP6.mjs";import"./chunk-HMFJTFDZ.mjs";import"./chunk-4MJ6HKJE.mjs";export{a as ContextMenuContent};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { u as useContextMenu } from './use-context-menu-CtaMbhFX.mjs';
|
|
3
|
+
import '@floating-ui/react';
|
|
4
|
+
import '@jamsrui/utils';
|
|
5
|
+
import './context-menu-content.mjs';
|
|
6
|
+
import './context-menu-floating-context.mjs';
|
|
7
|
+
import './context-menu-item-inner.mjs';
|
|
8
|
+
import './styles.mjs';
|
|
9
|
+
import 'tailwind-variants';
|
|
10
|
+
|
|
11
|
+
declare const useContextMenuContext: () => ContextMenuContext.Props;
|
|
12
|
+
declare const ContextMenuContext: react.Context<ContextMenuContext.Props | null>;
|
|
13
|
+
declare namespace ContextMenuContext {
|
|
14
|
+
interface Props extends ReturnType<typeof useContextMenu> {
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { ContextMenuContext, useContextMenuContext };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { u as useContextMenu } from './use-context-menu-nIR4O9Ae.js';
|
|
3
|
+
import '@floating-ui/react';
|
|
4
|
+
import '@jamsrui/utils';
|
|
5
|
+
import './context-menu-content.js';
|
|
6
|
+
import './context-menu-floating-context.js';
|
|
7
|
+
import './context-menu-item-inner.js';
|
|
8
|
+
import './styles.js';
|
|
9
|
+
import 'tailwind-variants';
|
|
10
|
+
|
|
11
|
+
declare const useContextMenuContext: () => ContextMenuContext.Props;
|
|
12
|
+
declare const ContextMenuContext: react.Context<ContextMenuContext.Props | null>;
|
|
13
|
+
declare namespace ContextMenuContext {
|
|
14
|
+
interface Props extends ReturnType<typeof useContextMenu> {
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { ContextMenuContext, useContextMenuContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUQRZDXHXjs = require('./chunk-UQRZDXHX.js');exports.ContextMenuContext = _chunkUQRZDXHXjs.a; exports.useContextMenuContext = _chunkUQRZDXHXjs.b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-4MJ6HKJE.mjs";export{a as ContextMenuContext,b as useContextMenuContext};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
declare const useContextMenuFloatingContext: () => ContextMenuFloatingContext.Props;
|
|
4
|
+
declare const ContextMenuFloatingContext: react.Context<ContextMenuFloatingContext.Props>;
|
|
5
|
+
declare namespace ContextMenuFloatingContext {
|
|
6
|
+
interface Props {
|
|
7
|
+
setHasFocusInside: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
|
+
activeIndex: number | null;
|
|
9
|
+
getItemProps: (props?: React.HTMLProps<HTMLElement>) => React.HTMLProps<HTMLElement>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { ContextMenuFloatingContext, useContextMenuFloatingContext };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
declare const useContextMenuFloatingContext: () => ContextMenuFloatingContext.Props;
|
|
4
|
+
declare const ContextMenuFloatingContext: react.Context<ContextMenuFloatingContext.Props>;
|
|
5
|
+
declare namespace ContextMenuFloatingContext {
|
|
6
|
+
interface Props {
|
|
7
|
+
setHasFocusInside: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
|
+
activeIndex: number | null;
|
|
9
|
+
getItemProps: (props?: React.HTMLProps<HTMLElement>) => React.HTMLProps<HTMLElement>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { ContextMenuFloatingContext, useContextMenuFloatingContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4RAU6P3Djs = require('./chunk-4RAU6P3D.js');exports.ContextMenuFloatingContext = _chunk4RAU6P3Djs.a; exports.useContextMenuFloatingContext = _chunk4RAU6P3Djs.b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-HMFJTFDZ.mjs";export{a as ContextMenuFloatingContext,b as useContextMenuFloatingContext};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { UIProps } from '@jamsrui/utils';
|
|
3
|
+
|
|
4
|
+
declare const ContextMenuItemInner: (props: ContextMenuItemInner.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
+
declare namespace ContextMenuItemInner {
|
|
6
|
+
interface Props extends UIProps<"span"> {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { ContextMenuItemInner };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { UIProps } from '@jamsrui/utils';
|
|
3
|
+
|
|
4
|
+
declare const ContextMenuItemInner: (props: ContextMenuItemInner.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
+
declare namespace ContextMenuItemInner {
|
|
6
|
+
interface Props extends UIProps<"span"> {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { ContextMenuItemInner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFKZ7QFMSjs = require('./chunk-FKZ7QFMS.js');require('./chunk-UQRZDXHX.js');exports.ContextMenuItemInner = _chunkFKZ7QFMSjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-KQMEILBD.mjs";import"./chunk-4MJ6HKJE.mjs";export{a as ContextMenuItemInner};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
import '@jamsrui/utils';
|
|
3
|
+
export { a as ContextMenuItem } from './use-context-menu-CtaMbhFX.mjs';
|
|
4
|
+
import '@floating-ui/react';
|
|
5
|
+
import './context-menu-content.mjs';
|
|
6
|
+
import './context-menu-floating-context.mjs';
|
|
7
|
+
import './context-menu-item-inner.mjs';
|
|
8
|
+
import './styles.mjs';
|
|
9
|
+
import 'tailwind-variants';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
import '@jamsrui/utils';
|
|
3
|
+
export { a as ContextMenuItem } from './use-context-menu-nIR4O9Ae.js';
|
|
4
|
+
import '@floating-ui/react';
|
|
5
|
+
import './context-menu-content.js';
|
|
6
|
+
import './context-menu-floating-context.js';
|
|
7
|
+
import './context-menu-item-inner.js';
|
|
8
|
+
import './styles.js';
|
|
9
|
+
import 'tailwind-variants';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLSDTQD7Ijs = require('./chunk-LSDTQD7I.js');require('./chunk-FKZ7QFMS.js');require('./chunk-4RAU6P3D.js');require('./chunk-UQRZDXHX.js');exports.ContextMenuItem = _chunkLSDTQD7Ijs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-TXB3K42I.mjs";import"./chunk-KQMEILBD.mjs";import"./chunk-HMFJTFDZ.mjs";import"./chunk-4MJ6HKJE.mjs";export{a as ContextMenuItem};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
declare const ContextMenuTrigger: (props: ContextMenuTrigger.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
4
|
+
declare namespace ContextMenuTrigger {
|
|
5
|
+
interface Props {
|
|
6
|
+
children?: React.ReactElement;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { ContextMenuTrigger };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
declare const ContextMenuTrigger: (props: ContextMenuTrigger.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
4
|
+
declare namespace ContextMenuTrigger {
|
|
5
|
+
interface Props {
|
|
6
|
+
children?: React.ReactElement;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { ContextMenuTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7LX5S77Fjs = require('./chunk-7LX5S77F.js');require('./chunk-UQRZDXHX.js');exports.ContextMenuTrigger = _chunk7LX5S77Fjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-SERPJZ7J.mjs";import"./chunk-4MJ6HKJE.mjs";export{a as ContextMenuTrigger};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
export { C as ContextMenu } from './use-context-menu-CtaMbhFX.mjs';
|
|
3
|
+
import '@floating-ui/react';
|
|
4
|
+
import '@jamsrui/utils';
|
|
5
|
+
import './context-menu-content.mjs';
|
|
6
|
+
import './context-menu-floating-context.mjs';
|
|
7
|
+
import './context-menu-item-inner.mjs';
|
|
8
|
+
import './styles.mjs';
|
|
9
|
+
import 'tailwind-variants';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
export { C as ContextMenu } from './use-context-menu-nIR4O9Ae.js';
|
|
3
|
+
import '@floating-ui/react';
|
|
4
|
+
import '@jamsrui/utils';
|
|
5
|
+
import './context-menu-content.js';
|
|
6
|
+
import './context-menu-floating-context.js';
|
|
7
|
+
import './context-menu-item-inner.js';
|
|
8
|
+
import './styles.js';
|
|
9
|
+
import 'tailwind-variants';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJGTXYW6Wjs = require('./chunk-JGTXYW6W.js');require('./chunk-ZMURG6Y5.js');require('./chunk-UEFGBHFK.js');require('./chunk-4RAU6P3D.js');require('./chunk-UQRZDXHX.js');exports.ContextMenu = _chunkJGTXYW6Wjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-XNJ3K4PS.mjs";import"./chunk-L5W7R6AL.mjs";import"./chunk-UNIE5VBW.mjs";import"./chunk-HMFJTFDZ.mjs";import"./chunk-4MJ6HKJE.mjs";export{a as ContextMenu};
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { C as ContextMenu, a as ContextMenuItem } from './use-context-menu-CtaMbhFX.mjs';
|
|
2
|
+
export { ContextMenuTrigger } from './context-menu-trigger.mjs';
|
|
3
|
+
export { ContextMenuContent } from './context-menu-content.mjs';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '@floating-ui/react';
|
|
6
|
+
import '@jamsrui/utils';
|
|
7
|
+
import './context-menu-floating-context.mjs';
|
|
8
|
+
import './context-menu-item-inner.mjs';
|
|
9
|
+
import './styles.mjs';
|
|
10
|
+
import 'tailwind-variants';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { C as ContextMenu, a as ContextMenuItem } from './use-context-menu-nIR4O9Ae.js';
|
|
2
|
+
export { ContextMenuTrigger } from './context-menu-trigger.js';
|
|
3
|
+
export { ContextMenuContent } from './context-menu-content.js';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '@floating-ui/react';
|
|
6
|
+
import '@jamsrui/utils';
|
|
7
|
+
import './context-menu-floating-context.js';
|
|
8
|
+
import './context-menu-item-inner.js';
|
|
9
|
+
import './styles.js';
|
|
10
|
+
import 'tailwind-variants';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkTMHKV7ZIjs = require('./chunk-TMHKV7ZI.js');var _chunkLSDTQD7Ijs = require('./chunk-LSDTQD7I.js');require('./chunk-FKZ7QFMS.js');var _chunk7LX5S77Fjs = require('./chunk-7LX5S77F.js');var _chunkJGTXYW6Wjs = require('./chunk-JGTXYW6W.js');require('./chunk-ZMURG6Y5.js');require('./chunk-UEFGBHFK.js');require('./chunk-4RAU6P3D.js');require('./chunk-UQRZDXHX.js');exports.ContextMenu = _chunkJGTXYW6Wjs.a; exports.ContextMenuContent = _chunkTMHKV7ZIjs.a; exports.ContextMenuItem = _chunkLSDTQD7Ijs.a; exports.ContextMenuTrigger = _chunk7LX5S77Fjs.a;
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a as e}from"./chunk-2X5XTZP6.mjs";import{a as t}from"./chunk-TXB3K42I.mjs";import"./chunk-KQMEILBD.mjs";import{a as o}from"./chunk-SERPJZ7J.mjs";import{a as n}from"./chunk-XNJ3K4PS.mjs";import"./chunk-L5W7R6AL.mjs";import"./chunk-UNIE5VBW.mjs";import"./chunk-HMFJTFDZ.mjs";import"./chunk-4MJ6HKJE.mjs";export{n as ContextMenu,e as ContextMenuContent,t as ContextMenuItem,o as ContextMenuTrigger};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import { VariantProps } from '@jamsrui/utils';
|
|
3
|
+
|
|
4
|
+
declare const test = "";
|
|
5
|
+
declare const contextMenuVariants: tailwind_variants.TVReturnType<{
|
|
6
|
+
radius: {
|
|
7
|
+
sm: {};
|
|
8
|
+
md: {};
|
|
9
|
+
lg: {};
|
|
10
|
+
xl: {};
|
|
11
|
+
"2xl": {};
|
|
12
|
+
"3xl": {};
|
|
13
|
+
full: {};
|
|
14
|
+
none: {};
|
|
15
|
+
};
|
|
16
|
+
backdrop: {
|
|
17
|
+
transparent: {
|
|
18
|
+
backdrop: string;
|
|
19
|
+
};
|
|
20
|
+
opaque: {
|
|
21
|
+
backdrop: string;
|
|
22
|
+
};
|
|
23
|
+
blur: {
|
|
24
|
+
backdrop: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
color: {
|
|
28
|
+
default: {
|
|
29
|
+
menuItem: string;
|
|
30
|
+
};
|
|
31
|
+
primary: {
|
|
32
|
+
menuItem: string;
|
|
33
|
+
};
|
|
34
|
+
secondary: {
|
|
35
|
+
menuItem: string;
|
|
36
|
+
};
|
|
37
|
+
success: {
|
|
38
|
+
menuItem: string;
|
|
39
|
+
};
|
|
40
|
+
warning: {
|
|
41
|
+
menuItem: string;
|
|
42
|
+
};
|
|
43
|
+
danger: {
|
|
44
|
+
menuItem: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}, {
|
|
48
|
+
arrow: string;
|
|
49
|
+
backdrop: string;
|
|
50
|
+
root: string;
|
|
51
|
+
content: string;
|
|
52
|
+
menuItem: string[];
|
|
53
|
+
menuItemInner: string;
|
|
54
|
+
}, undefined, {
|
|
55
|
+
radius: {
|
|
56
|
+
sm: {};
|
|
57
|
+
md: {};
|
|
58
|
+
lg: {};
|
|
59
|
+
xl: {};
|
|
60
|
+
"2xl": {};
|
|
61
|
+
"3xl": {};
|
|
62
|
+
full: {};
|
|
63
|
+
none: {};
|
|
64
|
+
};
|
|
65
|
+
backdrop: {
|
|
66
|
+
transparent: {
|
|
67
|
+
backdrop: string;
|
|
68
|
+
};
|
|
69
|
+
opaque: {
|
|
70
|
+
backdrop: string;
|
|
71
|
+
};
|
|
72
|
+
blur: {
|
|
73
|
+
backdrop: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
color: {
|
|
77
|
+
default: {
|
|
78
|
+
menuItem: string;
|
|
79
|
+
};
|
|
80
|
+
primary: {
|
|
81
|
+
menuItem: string;
|
|
82
|
+
};
|
|
83
|
+
secondary: {
|
|
84
|
+
menuItem: string;
|
|
85
|
+
};
|
|
86
|
+
success: {
|
|
87
|
+
menuItem: string;
|
|
88
|
+
};
|
|
89
|
+
warning: {
|
|
90
|
+
menuItem: string;
|
|
91
|
+
};
|
|
92
|
+
danger: {
|
|
93
|
+
menuItem: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
}, {
|
|
97
|
+
arrow: string;
|
|
98
|
+
backdrop: string;
|
|
99
|
+
root: string;
|
|
100
|
+
content: string;
|
|
101
|
+
menuItem: string[];
|
|
102
|
+
menuItemInner: string;
|
|
103
|
+
}, tailwind_variants.TVReturnType<{
|
|
104
|
+
radius: {
|
|
105
|
+
sm: {};
|
|
106
|
+
md: {};
|
|
107
|
+
lg: {};
|
|
108
|
+
xl: {};
|
|
109
|
+
"2xl": {};
|
|
110
|
+
"3xl": {};
|
|
111
|
+
full: {};
|
|
112
|
+
none: {};
|
|
113
|
+
};
|
|
114
|
+
backdrop: {
|
|
115
|
+
transparent: {
|
|
116
|
+
backdrop: string;
|
|
117
|
+
};
|
|
118
|
+
opaque: {
|
|
119
|
+
backdrop: string;
|
|
120
|
+
};
|
|
121
|
+
blur: {
|
|
122
|
+
backdrop: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
color: {
|
|
126
|
+
default: {
|
|
127
|
+
menuItem: string;
|
|
128
|
+
};
|
|
129
|
+
primary: {
|
|
130
|
+
menuItem: string;
|
|
131
|
+
};
|
|
132
|
+
secondary: {
|
|
133
|
+
menuItem: string;
|
|
134
|
+
};
|
|
135
|
+
success: {
|
|
136
|
+
menuItem: string;
|
|
137
|
+
};
|
|
138
|
+
warning: {
|
|
139
|
+
menuItem: string;
|
|
140
|
+
};
|
|
141
|
+
danger: {
|
|
142
|
+
menuItem: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
}, {
|
|
146
|
+
arrow: string;
|
|
147
|
+
backdrop: string;
|
|
148
|
+
root: string;
|
|
149
|
+
content: string;
|
|
150
|
+
menuItem: string[];
|
|
151
|
+
menuItemInner: string;
|
|
152
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
153
|
+
type ContextMenuVariantProps = VariantProps<typeof contextMenuVariants>;
|
|
154
|
+
type ContextMenuSlots = keyof ReturnType<typeof contextMenuVariants>;
|
|
155
|
+
|
|
156
|
+
export { type ContextMenuSlots, type ContextMenuVariantProps, contextMenuVariants, test };
|
package/dist/styles.d.ts
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import { VariantProps } from '@jamsrui/utils';
|
|
3
|
+
|
|
4
|
+
declare const test = "";
|
|
5
|
+
declare const contextMenuVariants: tailwind_variants.TVReturnType<{
|
|
6
|
+
radius: {
|
|
7
|
+
sm: {};
|
|
8
|
+
md: {};
|
|
9
|
+
lg: {};
|
|
10
|
+
xl: {};
|
|
11
|
+
"2xl": {};
|
|
12
|
+
"3xl": {};
|
|
13
|
+
full: {};
|
|
14
|
+
none: {};
|
|
15
|
+
};
|
|
16
|
+
backdrop: {
|
|
17
|
+
transparent: {
|
|
18
|
+
backdrop: string;
|
|
19
|
+
};
|
|
20
|
+
opaque: {
|
|
21
|
+
backdrop: string;
|
|
22
|
+
};
|
|
23
|
+
blur: {
|
|
24
|
+
backdrop: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
color: {
|
|
28
|
+
default: {
|
|
29
|
+
menuItem: string;
|
|
30
|
+
};
|
|
31
|
+
primary: {
|
|
32
|
+
menuItem: string;
|
|
33
|
+
};
|
|
34
|
+
secondary: {
|
|
35
|
+
menuItem: string;
|
|
36
|
+
};
|
|
37
|
+
success: {
|
|
38
|
+
menuItem: string;
|
|
39
|
+
};
|
|
40
|
+
warning: {
|
|
41
|
+
menuItem: string;
|
|
42
|
+
};
|
|
43
|
+
danger: {
|
|
44
|
+
menuItem: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}, {
|
|
48
|
+
arrow: string;
|
|
49
|
+
backdrop: string;
|
|
50
|
+
root: string;
|
|
51
|
+
content: string;
|
|
52
|
+
menuItem: string[];
|
|
53
|
+
menuItemInner: string;
|
|
54
|
+
}, undefined, {
|
|
55
|
+
radius: {
|
|
56
|
+
sm: {};
|
|
57
|
+
md: {};
|
|
58
|
+
lg: {};
|
|
59
|
+
xl: {};
|
|
60
|
+
"2xl": {};
|
|
61
|
+
"3xl": {};
|
|
62
|
+
full: {};
|
|
63
|
+
none: {};
|
|
64
|
+
};
|
|
65
|
+
backdrop: {
|
|
66
|
+
transparent: {
|
|
67
|
+
backdrop: string;
|
|
68
|
+
};
|
|
69
|
+
opaque: {
|
|
70
|
+
backdrop: string;
|
|
71
|
+
};
|
|
72
|
+
blur: {
|
|
73
|
+
backdrop: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
color: {
|
|
77
|
+
default: {
|
|
78
|
+
menuItem: string;
|
|
79
|
+
};
|
|
80
|
+
primary: {
|
|
81
|
+
menuItem: string;
|
|
82
|
+
};
|
|
83
|
+
secondary: {
|
|
84
|
+
menuItem: string;
|
|
85
|
+
};
|
|
86
|
+
success: {
|
|
87
|
+
menuItem: string;
|
|
88
|
+
};
|
|
89
|
+
warning: {
|
|
90
|
+
menuItem: string;
|
|
91
|
+
};
|
|
92
|
+
danger: {
|
|
93
|
+
menuItem: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
}, {
|
|
97
|
+
arrow: string;
|
|
98
|
+
backdrop: string;
|
|
99
|
+
root: string;
|
|
100
|
+
content: string;
|
|
101
|
+
menuItem: string[];
|
|
102
|
+
menuItemInner: string;
|
|
103
|
+
}, tailwind_variants.TVReturnType<{
|
|
104
|
+
radius: {
|
|
105
|
+
sm: {};
|
|
106
|
+
md: {};
|
|
107
|
+
lg: {};
|
|
108
|
+
xl: {};
|
|
109
|
+
"2xl": {};
|
|
110
|
+
"3xl": {};
|
|
111
|
+
full: {};
|
|
112
|
+
none: {};
|
|
113
|
+
};
|
|
114
|
+
backdrop: {
|
|
115
|
+
transparent: {
|
|
116
|
+
backdrop: string;
|
|
117
|
+
};
|
|
118
|
+
opaque: {
|
|
119
|
+
backdrop: string;
|
|
120
|
+
};
|
|
121
|
+
blur: {
|
|
122
|
+
backdrop: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
color: {
|
|
126
|
+
default: {
|
|
127
|
+
menuItem: string;
|
|
128
|
+
};
|
|
129
|
+
primary: {
|
|
130
|
+
menuItem: string;
|
|
131
|
+
};
|
|
132
|
+
secondary: {
|
|
133
|
+
menuItem: string;
|
|
134
|
+
};
|
|
135
|
+
success: {
|
|
136
|
+
menuItem: string;
|
|
137
|
+
};
|
|
138
|
+
warning: {
|
|
139
|
+
menuItem: string;
|
|
140
|
+
};
|
|
141
|
+
danger: {
|
|
142
|
+
menuItem: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
}, {
|
|
146
|
+
arrow: string;
|
|
147
|
+
backdrop: string;
|
|
148
|
+
root: string;
|
|
149
|
+
content: string;
|
|
150
|
+
menuItem: string[];
|
|
151
|
+
menuItemInner: string;
|
|
152
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
153
|
+
type ContextMenuVariantProps = VariantProps<typeof contextMenuVariants>;
|
|
154
|
+
type ContextMenuSlots = keyof ReturnType<typeof contextMenuVariants>;
|
|
155
|
+
|
|
156
|
+
export { type ContextMenuSlots, type ContextMenuVariantProps, contextMenuVariants, test };
|
package/dist/styles.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUEFGBHFKjs = require('./chunk-UEFGBHFK.js');exports.contextMenuVariants = _chunkUEFGBHFKjs.b; exports.test = _chunkUEFGBHFKjs.a;
|
package/dist/styles.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-UNIE5VBW.mjs";export{b as contextMenuVariants,a as test};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { FloatingOverlayProps, FloatingFocusManagerProps, FloatingNodeProps, FloatingList, Placement } from '@floating-ui/react';
|
|
4
|
+
import { UIProps, PropGetter, SlotsToClassNames } from '@jamsrui/utils';
|
|
5
|
+
import { ContextMenuContent } from './context-menu-content.mjs';
|
|
6
|
+
import { ContextMenuFloatingContext } from './context-menu-floating-context.mjs';
|
|
7
|
+
import { ContextMenuItemInner } from './context-menu-item-inner.mjs';
|
|
8
|
+
import { ContextMenuVariantProps, ContextMenuSlots } from './styles.mjs';
|
|
9
|
+
|
|
10
|
+
declare const ContextMenu: (props: ContextMenu.Props) => react.JSX.Element;
|
|
11
|
+
declare namespace ContextMenu {
|
|
12
|
+
interface Props extends useContextMenu.Props {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare const ContextMenuItem: (props: ContextMenuItem.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
18
|
+
declare namespace ContextMenuItem {
|
|
19
|
+
interface Props extends UIProps<"button"> {
|
|
20
|
+
textValue?: string;
|
|
21
|
+
isDisabled?: boolean;
|
|
22
|
+
color?: ContextMenu.Props["color"];
|
|
23
|
+
startContent?: React.ReactNode;
|
|
24
|
+
endContent?: React.ReactNode;
|
|
25
|
+
preventCloseOnClick?: boolean;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare const useContextMenu: (props: useContextMenu.Props) => {
|
|
30
|
+
getOverlayProps: () => FloatingOverlayProps & UIProps<"div">;
|
|
31
|
+
getFocusManagerProps: () => Omit<FloatingFocusManagerProps, "children">;
|
|
32
|
+
getContentProps: PropGetter<ContextMenuContent.Props>;
|
|
33
|
+
getNodeProps: () => FloatingNodeProps;
|
|
34
|
+
isOpen: boolean;
|
|
35
|
+
getTriggerProps: () => UIProps<"div">;
|
|
36
|
+
getFloatingListProps: () => Omit<ComponentProps<typeof FloatingList>, "children">;
|
|
37
|
+
floatingCtx: ContextMenuFloatingContext.Props;
|
|
38
|
+
getRootProps: () => {
|
|
39
|
+
"data-component": string | undefined;
|
|
40
|
+
"data-slot": string | undefined;
|
|
41
|
+
className: string;
|
|
42
|
+
ref: ((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void);
|
|
43
|
+
style: react.CSSProperties;
|
|
44
|
+
};
|
|
45
|
+
getMenuItemProps: PropGetter<ContextMenuItem.Props>;
|
|
46
|
+
isNested: boolean;
|
|
47
|
+
getMenuItemInnerProps: PropGetter<ContextMenuItemInner.Props>;
|
|
48
|
+
};
|
|
49
|
+
declare namespace useContextMenu {
|
|
50
|
+
interface Props extends ContextMenuVariantProps {
|
|
51
|
+
classNames?: SlotsToClassNames<ContextMenuSlots>;
|
|
52
|
+
isOpen?: boolean;
|
|
53
|
+
defaultOpen?: boolean;
|
|
54
|
+
onOpenChange?: (open: boolean) => void;
|
|
55
|
+
openDelay?: number;
|
|
56
|
+
closeDelay?: number;
|
|
57
|
+
closeOnEscapeKey?: boolean;
|
|
58
|
+
closeOnOutsidePress?: boolean;
|
|
59
|
+
lockScroll?: boolean;
|
|
60
|
+
placement?: Placement;
|
|
61
|
+
offset?: number;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { ContextMenu as C, ContextMenuItem as a, useContextMenu as u };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { FloatingOverlayProps, FloatingFocusManagerProps, FloatingNodeProps, FloatingList, Placement } from '@floating-ui/react';
|
|
4
|
+
import { UIProps, PropGetter, SlotsToClassNames } from '@jamsrui/utils';
|
|
5
|
+
import { ContextMenuContent } from './context-menu-content.js';
|
|
6
|
+
import { ContextMenuFloatingContext } from './context-menu-floating-context.js';
|
|
7
|
+
import { ContextMenuItemInner } from './context-menu-item-inner.js';
|
|
8
|
+
import { ContextMenuVariantProps, ContextMenuSlots } from './styles.js';
|
|
9
|
+
|
|
10
|
+
declare const ContextMenu: (props: ContextMenu.Props) => react.JSX.Element;
|
|
11
|
+
declare namespace ContextMenu {
|
|
12
|
+
interface Props extends useContextMenu.Props {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare const ContextMenuItem: (props: ContextMenuItem.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
18
|
+
declare namespace ContextMenuItem {
|
|
19
|
+
interface Props extends UIProps<"button"> {
|
|
20
|
+
textValue?: string;
|
|
21
|
+
isDisabled?: boolean;
|
|
22
|
+
color?: ContextMenu.Props["color"];
|
|
23
|
+
startContent?: React.ReactNode;
|
|
24
|
+
endContent?: React.ReactNode;
|
|
25
|
+
preventCloseOnClick?: boolean;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare const useContextMenu: (props: useContextMenu.Props) => {
|
|
30
|
+
getOverlayProps: () => FloatingOverlayProps & UIProps<"div">;
|
|
31
|
+
getFocusManagerProps: () => Omit<FloatingFocusManagerProps, "children">;
|
|
32
|
+
getContentProps: PropGetter<ContextMenuContent.Props>;
|
|
33
|
+
getNodeProps: () => FloatingNodeProps;
|
|
34
|
+
isOpen: boolean;
|
|
35
|
+
getTriggerProps: () => UIProps<"div">;
|
|
36
|
+
getFloatingListProps: () => Omit<ComponentProps<typeof FloatingList>, "children">;
|
|
37
|
+
floatingCtx: ContextMenuFloatingContext.Props;
|
|
38
|
+
getRootProps: () => {
|
|
39
|
+
"data-component": string | undefined;
|
|
40
|
+
"data-slot": string | undefined;
|
|
41
|
+
className: string;
|
|
42
|
+
ref: ((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void);
|
|
43
|
+
style: react.CSSProperties;
|
|
44
|
+
};
|
|
45
|
+
getMenuItemProps: PropGetter<ContextMenuItem.Props>;
|
|
46
|
+
isNested: boolean;
|
|
47
|
+
getMenuItemInnerProps: PropGetter<ContextMenuItemInner.Props>;
|
|
48
|
+
};
|
|
49
|
+
declare namespace useContextMenu {
|
|
50
|
+
interface Props extends ContextMenuVariantProps {
|
|
51
|
+
classNames?: SlotsToClassNames<ContextMenuSlots>;
|
|
52
|
+
isOpen?: boolean;
|
|
53
|
+
defaultOpen?: boolean;
|
|
54
|
+
onOpenChange?: (open: boolean) => void;
|
|
55
|
+
openDelay?: number;
|
|
56
|
+
closeDelay?: number;
|
|
57
|
+
closeOnEscapeKey?: boolean;
|
|
58
|
+
closeOnOutsidePress?: boolean;
|
|
59
|
+
lockScroll?: boolean;
|
|
60
|
+
placement?: Placement;
|
|
61
|
+
offset?: number;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { ContextMenu as C, ContextMenuItem as a, useContextMenu as u };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
import '@floating-ui/react';
|
|
3
|
+
import '@jamsrui/utils';
|
|
4
|
+
import './context-menu-content.mjs';
|
|
5
|
+
import './context-menu-floating-context.mjs';
|
|
6
|
+
export { u as useContextMenu } from './use-context-menu-CtaMbhFX.mjs';
|
|
7
|
+
import './context-menu-item-inner.mjs';
|
|
8
|
+
import './styles.mjs';
|
|
9
|
+
import 'tailwind-variants';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
import '@floating-ui/react';
|
|
3
|
+
import '@jamsrui/utils';
|
|
4
|
+
import './context-menu-content.js';
|
|
5
|
+
import './context-menu-floating-context.js';
|
|
6
|
+
export { u as useContextMenu } from './use-context-menu-nIR4O9Ae.js';
|
|
7
|
+
import './context-menu-item-inner.js';
|
|
8
|
+
import './styles.js';
|
|
9
|
+
import 'tailwind-variants';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZMURG6Y5js = require('./chunk-ZMURG6Y5.js');require('./chunk-UEFGBHFK.js');require('./chunk-4RAU6P3D.js');exports.useContextMenu = _chunkZMURG6Y5js.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-L5W7R6AL.mjs";import"./chunk-UNIE5VBW.mjs";import"./chunk-HMFJTFDZ.mjs";export{a as useContextMenu};
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jamsrui/context-menu",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"react": ">=19"
|
|
6
|
+
},
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@floating-ui/react": ">=0.27",
|
|
9
|
+
"@jamsrui/hooks": "^0.0.2",
|
|
10
|
+
"@jamsrui/core": "^0.0.2",
|
|
11
|
+
"@jamsrui/utils": "^0.0.2"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.mjs",
|
|
17
|
+
"require": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"description": "A modern and beautiful Next.js UI components library.",
|
|
21
|
+
"keywords": [
|
|
22
|
+
"react",
|
|
23
|
+
"ui",
|
|
24
|
+
"UI components",
|
|
25
|
+
"Next.js",
|
|
26
|
+
"React",
|
|
27
|
+
"JamsrUI",
|
|
28
|
+
"jamsr-ui",
|
|
29
|
+
"TypeScript"
|
|
30
|
+
],
|
|
31
|
+
"sideEffects": false,
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"author": "@jamsrworld",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "https://github.com/jamsrworld/jamsr-ui"
|
|
37
|
+
},
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/jamsrworld/jamsr-ui/issues"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://jamsr-ui.jamsrworld.com",
|
|
42
|
+
"files": [
|
|
43
|
+
"dist",
|
|
44
|
+
"README",
|
|
45
|
+
"README.md",
|
|
46
|
+
"package.json",
|
|
47
|
+
"LICENSE"
|
|
48
|
+
]
|
|
49
|
+
}
|