@jamsrui/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/index.d.mts +2 -1
- package/dist/{menu-BF85INsd.d.mts → menu-CptFvNqD.d.mts} +2 -1
- package/dist/menu-config.d.mts +4 -3
- package/dist/menu-content.d.mts +2 -2
- package/dist/menu-content.mjs +1 -1
- package/dist/menu-context.d.mts +2 -1
- package/dist/menu-item.d.mts +2 -1
- package/dist/menu-item.mjs +1 -1
- package/dist/menu.d.mts +2 -1
- package/dist/menu.mjs +1 -1
- package/dist/use-menu.d.mts +2 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { M as Menu, a as MenuItem } from './menu-
|
|
1
|
+
export { M as Menu, a as MenuItem } from './menu-CptFvNqD.mjs';
|
|
2
2
|
export { MenuConfig, useMenuConfig } from './menu-config.mjs';
|
|
3
3
|
export { MenuContent } from './menu-content.mjs';
|
|
4
4
|
export { MenuTrigger } from './menu-trigger.mjs';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
5
6
|
import 'react';
|
|
6
7
|
import '@floating-ui/react';
|
|
7
8
|
import '@jamsrui/utils';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as react from 'react';
|
|
2
3
|
import { ComponentProps } from 'react';
|
|
3
4
|
import { FloatingOverlayProps, FloatingFocusManagerProps, FloatingArrowProps, FloatingNodeProps, FloatingList, Placement } from '@floating-ui/react';
|
|
@@ -59,7 +60,7 @@ declare namespace useMenu {
|
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
declare const Menu: (props: Menu.Props) =>
|
|
63
|
+
declare const Menu: (props: Menu.Props) => react_jsx_runtime.JSX.Element;
|
|
63
64
|
declare namespace Menu {
|
|
64
65
|
interface Props extends useMenu.Props {
|
|
65
66
|
children: React.ReactNode;
|
package/dist/menu-config.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { GlobalConfigProps } from '@jamsrui/core';
|
|
3
|
-
import { M as Menu } from './menu-
|
|
3
|
+
import { M as Menu } from './menu-CptFvNqD.mjs';
|
|
4
|
+
import 'react';
|
|
4
5
|
import '@floating-ui/react';
|
|
5
6
|
import '@jamsrui/utils';
|
|
6
7
|
import './menu-content.mjs';
|
|
@@ -12,7 +13,7 @@ import 'tailwind-variants';
|
|
|
12
13
|
declare const useMenuConfig: () => MenuConfig.Props;
|
|
13
14
|
declare const MenuConfig: (props: MenuConfig.Props & {
|
|
14
15
|
merge?: boolean;
|
|
15
|
-
}) =>
|
|
16
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
16
17
|
declare namespace MenuConfig {
|
|
17
18
|
interface Props extends Menu.Props, GlobalConfigProps<Menu.Props> {
|
|
18
19
|
}
|
package/dist/menu-content.d.mts
CHANGED
|
@@ -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 MenuContent: (props: MenuContent.Props) =>
|
|
4
|
+
declare const MenuContent: (props: MenuContent.Props) => react_jsx_runtime.JSX.Element;
|
|
5
5
|
declare namespace MenuContent {
|
|
6
6
|
interface Props extends UIProps<"div"> {
|
|
7
7
|
}
|
package/dist/menu-content.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FloatingArrow as
|
|
1
|
+
import{Fragment as y,jsx as o,jsxs as e}from"react/jsx-runtime";import{FloatingArrow as P,FloatingFocusManager as C,FloatingList as M,FloatingOverlay as f,FloatingPortal as v}from"@floating-ui/react";import{useRenderElement as x}from"@jamsrui/hooks";import{useMenuContext as h}from"./menu-context";import{MenuFloatingContext as w}from"./menu-floating-context";const I=t=>{const{getFloatingListProps:n,isOpen:r,getFocusManagerProps:i,getOverlayProps:s,showArrow:l,getArrowProps:a,floatingCtx:p,getContentProps:g,getRootProps:u,isNested:m}=h(),{children:F}=t,c=e(y,{children:[!!l&&o(P,{...a()}),o("div",{...g(t),children:F})]}),d=x("div",{props:[u(),{children:c}]});return o(w,{value:p,children:o(M,{...n(),children:r?e(v,{children:[m?null:o(f,{...s()}),o(C,{...i(),children:d})]}):null})})};export{I as MenuContent};
|
package/dist/menu-context.d.mts
CHANGED
package/dist/menu-item.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '@jamsrui/utils';
|
|
3
|
-
export { a as MenuItem } from './menu-
|
|
3
|
+
export { a as MenuItem } from './menu-CptFvNqD.mjs';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
4
5
|
import '@floating-ui/react';
|
|
5
6
|
import './menu-content.mjs';
|
|
6
7
|
import './menu-floating-context.mjs';
|
package/dist/menu-item.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useFloatingTree as I,useListItem as C}from"@floating-ui/react";import{useMergeRefs as
|
|
1
|
+
import{Fragment as R,jsx as v,jsxs as k}from"react/jsx-runtime";import{useFloatingTree as I,useListItem as C}from"@floating-ui/react";import{useMergeRefs as M,useRenderElement as b}from"@jamsrui/hooks";import{useMenuContext as x}from"./menu-context";import{useMenuFloatingContext as P}from"./menu-floating-context";import{MenuItemInner as g}from"./menu-item-inner";const O=s=>{const{getMenuItemProps:i}=x(),a=I(),{textValue:m,children:e,isDisabled:t,startContent:c,endContent:l,preventCloseOnClick:d,...u}=s,n=P(),o=C({label:m??(typeof e=="string"?e:void 0)}),r=o.index===n.activeIndex,p=M([o.ref]),f=k(R,{children:[c,v(g,{children:e}),l]});return b("button",{props:[i(u),{children:f,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 MenuItem};
|
package/dist/menu.d.mts
CHANGED
package/dist/menu.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FloatingNode as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{FloatingNode as c,FloatingTree as s,useFloatingParentNodeId as a}from"@floating-ui/react";import{MenuContext as i}from"./menu-context";import{useMenu as d}from"./use-menu";const r=e=>{const t=d(e),{children:o}=e,{getNodeProps:u}=t;return n(i,{value:t,children:n(c,{...u(),children:o})})},g=e=>{const t=a(),{children:o}=e;return t===null?n(s,{children:n(r,{...e,children:o})}):n(r,{...e,children:o})};export{g as Menu};
|
package/dist/use-menu.d.mts
CHANGED
|
@@ -3,7 +3,8 @@ import '@floating-ui/react';
|
|
|
3
3
|
import '@jamsrui/utils';
|
|
4
4
|
import './menu-content.mjs';
|
|
5
5
|
import './menu-floating-context.mjs';
|
|
6
|
-
export { u as useMenu } from './menu-
|
|
6
|
+
export { u as useMenu } from './menu-CptFvNqD.mjs';
|
|
7
7
|
import './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/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/hooks": "^0.0.
|
|
10
|
-
"@jamsrui/
|
|
11
|
-
"@jamsrui/
|
|
9
|
+
"@jamsrui/hooks": "^0.0.6",
|
|
10
|
+
"@jamsrui/core": "^0.0.6",
|
|
11
|
+
"@jamsrui/utils": "^0.0.6"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|