@versini/ui-menu 5.1.1 → 5.1.3
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.
|
@@ -37,20 +37,20 @@ const d = ({
|
|
|
37
37
|
try {
|
|
38
38
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
39
39
|
version: "4.2.2",
|
|
40
|
-
buildTime: "10/
|
|
40
|
+
buildTime: "10/24/2025 06:42 PM EDT",
|
|
41
41
|
homepage: "https://github.com/aversini/ui-components",
|
|
42
42
|
license: "MIT"
|
|
43
43
|
});
|
|
44
44
|
} catch {
|
|
45
45
|
}
|
|
46
46
|
/*!
|
|
47
|
-
@versini/ui-icons v4.
|
|
47
|
+
@versini/ui-icons v4.14.1
|
|
48
48
|
© 2025 gizmette.com
|
|
49
49
|
*/
|
|
50
50
|
try {
|
|
51
51
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
52
|
-
version: "4.
|
|
53
|
-
buildTime: "10/
|
|
52
|
+
version: "4.14.1",
|
|
53
|
+
buildTime: "10/24/2025 06:42 PM EDT",
|
|
54
54
|
homepage: "https://github.com/aversini/ui-components",
|
|
55
55
|
license: "MIT"
|
|
56
56
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as b, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useFloatingTree as se, useFloatingNodeId as ie, useFloatingParentNodeId as W, useListItem as re, useFloating as ae, autoUpdate as le, offset as de, flip as ue, shift as ce, useHover as fe, safePolygon as me, useClick as pe, useRole as he, useDismiss as ve, useListNavigation as ge, useTypeahead as we, useInteractions as ye, useMergeRefs as be, FloatingNode as D, FloatingList as S, FloatingPortal as _, FloatingFocusManager as K, FloatingTree as xe } from "@floating-ui/react";
|
|
3
|
-
import { I as Ie } from "../../chunks/index.
|
|
3
|
+
import { I as Ie } from "../../chunks/index.Benv90bx.js";
|
|
4
4
|
import Fe from "clsx";
|
|
5
5
|
import Ne, { forwardRef as q, useState as y, useRef as U, useContext as Me, useEffect as P } from "react";
|
|
6
6
|
import { MenuContext as R } from "./MenuContext.js";
|
|
@@ -1,86 +1,80 @@
|
|
|
1
|
-
import { jsxs as x, jsx as
|
|
2
|
-
import { useListItem as
|
|
3
|
-
import { I as b } from "../../chunks/index.
|
|
1
|
+
import { jsxs as x, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useListItem as C, useFloatingTree as M, useMergeRefs as g } from "@floating-ui/react";
|
|
3
|
+
import { I as b } from "../../chunks/index.Benv90bx.js";
|
|
4
4
|
import l from "clsx";
|
|
5
5
|
import * as p from "react";
|
|
6
|
-
import { MenuContext as
|
|
7
|
-
const
|
|
6
|
+
import { MenuContext as h } from "./MenuContext.js";
|
|
7
|
+
const z = ({
|
|
8
8
|
className: e,
|
|
9
9
|
viewBox: t,
|
|
10
|
-
title:
|
|
11
|
-
monotone:
|
|
10
|
+
title: o,
|
|
11
|
+
monotone: a,
|
|
12
12
|
...r
|
|
13
13
|
}) => /* @__PURE__ */ x(
|
|
14
14
|
b,
|
|
15
15
|
{
|
|
16
|
-
defaultViewBox: "0 0
|
|
16
|
+
defaultViewBox: "0 0 512 512",
|
|
17
17
|
size: "size-5",
|
|
18
18
|
viewBox: t,
|
|
19
19
|
className: e,
|
|
20
|
-
title:
|
|
20
|
+
title: o || "Selected",
|
|
21
21
|
...r,
|
|
22
22
|
children: [
|
|
23
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ s(
|
|
24
24
|
"path",
|
|
25
25
|
{
|
|
26
|
-
d: "M0
|
|
26
|
+
d: "M0 256a256 256 0 1 0 512 0 256 256 0 1 0-512 0m352 0a96 96 0 1 1-192 0 96 96 0 1 1 192 0",
|
|
27
27
|
opacity: ".4"
|
|
28
28
|
}
|
|
29
29
|
),
|
|
30
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ s("path", { d: "M256 160a96 96 0 1 0 0 192 96 96 0 1 0 0-192" })
|
|
31
31
|
]
|
|
32
32
|
}
|
|
33
|
-
),
|
|
33
|
+
), I = ({
|
|
34
34
|
className: e,
|
|
35
35
|
viewBox: t,
|
|
36
|
-
title:
|
|
37
|
-
monotone:
|
|
36
|
+
title: o,
|
|
37
|
+
monotone: a,
|
|
38
38
|
...r
|
|
39
|
-
}) => /* @__PURE__ */
|
|
39
|
+
}) => /* @__PURE__ */ s(
|
|
40
40
|
b,
|
|
41
41
|
{
|
|
42
|
-
defaultViewBox: "0 0
|
|
42
|
+
defaultViewBox: "0 0 512 512",
|
|
43
43
|
size: "size-5",
|
|
44
44
|
viewBox: t,
|
|
45
45
|
className: e,
|
|
46
|
-
title:
|
|
46
|
+
title: o || "UnSelected",
|
|
47
47
|
...r,
|
|
48
|
-
children: /* @__PURE__ */
|
|
49
|
-
"path",
|
|
50
|
-
{
|
|
51
|
-
d: "M0 96c0-35.3 28.7-64 64-64h320c35.3 0 64 28.7 64 64v320c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64z",
|
|
52
|
-
opacity: ".4"
|
|
53
|
-
}
|
|
54
|
-
)
|
|
48
|
+
children: /* @__PURE__ */ s("path", { d: "M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512", opacity: ".4" })
|
|
55
49
|
}
|
|
56
|
-
),
|
|
50
|
+
), k = p.forwardRef(
|
|
57
51
|
({
|
|
58
52
|
label: e,
|
|
59
53
|
disabled: t,
|
|
60
|
-
icon:
|
|
61
|
-
raw:
|
|
54
|
+
icon: o,
|
|
55
|
+
raw: a = !1,
|
|
62
56
|
children: r,
|
|
63
57
|
ignoreClick: u = !1,
|
|
64
58
|
selected: i,
|
|
65
|
-
...
|
|
66
|
-
},
|
|
59
|
+
...n
|
|
60
|
+
}, N) => {
|
|
67
61
|
let d = "";
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
return /* @__PURE__ */
|
|
62
|
+
const c = p.useContext(h), w = C({ label: t ? null : e }), f = M(), v = g([w.ref, N]);
|
|
63
|
+
if (a && r)
|
|
64
|
+
return /* @__PURE__ */ s(
|
|
71
65
|
"div",
|
|
72
66
|
{
|
|
73
67
|
role: "menuitem",
|
|
74
|
-
...
|
|
75
|
-
onClick(
|
|
76
|
-
u || (
|
|
68
|
+
...c.getItemProps({
|
|
69
|
+
onClick(m) {
|
|
70
|
+
u || (n.onClick?.(m), f?.events.emit("click"));
|
|
77
71
|
}
|
|
78
72
|
}),
|
|
79
73
|
children: r
|
|
80
74
|
}
|
|
81
75
|
);
|
|
82
|
-
|
|
83
|
-
const
|
|
76
|
+
o && (d = "pl-2");
|
|
77
|
+
const y = l(
|
|
84
78
|
"flex flex-row items-center",
|
|
85
79
|
"w-full",
|
|
86
80
|
"m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1",
|
|
@@ -95,48 +89,48 @@ const g = ({
|
|
|
95
89
|
return /* @__PURE__ */ x(
|
|
96
90
|
"button",
|
|
97
91
|
{
|
|
98
|
-
...
|
|
92
|
+
...n,
|
|
99
93
|
ref: v,
|
|
100
94
|
role: "menuitem",
|
|
101
|
-
className:
|
|
95
|
+
className: y,
|
|
102
96
|
tabIndex: 0,
|
|
103
97
|
disabled: t,
|
|
104
|
-
...
|
|
105
|
-
onClick(
|
|
106
|
-
u || (
|
|
98
|
+
...c.getItemProps({
|
|
99
|
+
onClick(m) {
|
|
100
|
+
u || (n.onClick?.(m), f?.events.emit("click"));
|
|
107
101
|
},
|
|
108
|
-
onFocus(
|
|
109
|
-
|
|
102
|
+
onFocus(m) {
|
|
103
|
+
n.onFocus?.(m), c.setHasFocusInside(!0);
|
|
110
104
|
}
|
|
111
105
|
}),
|
|
112
106
|
children: [
|
|
113
|
-
i === !0 && /* @__PURE__ */
|
|
114
|
-
i === !1 && /* @__PURE__ */
|
|
115
|
-
|
|
116
|
-
e && /* @__PURE__ */
|
|
107
|
+
i === !0 && /* @__PURE__ */ s(z, { className: "text-copy-success mr-2", size: "size-4" }),
|
|
108
|
+
i === !1 && /* @__PURE__ */ s(I, { className: "text-copy-medium mr-2", size: "size-4" }),
|
|
109
|
+
o,
|
|
110
|
+
e && /* @__PURE__ */ s("span", { className: d, children: e })
|
|
117
111
|
]
|
|
118
112
|
}
|
|
119
113
|
);
|
|
120
114
|
}
|
|
121
115
|
);
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
return /* @__PURE__ */
|
|
126
|
-
},
|
|
116
|
+
k.displayName = "MenuItem";
|
|
117
|
+
const j = ({ className: e, ...t }) => {
|
|
118
|
+
const o = l(e, "my-1 border-t border-border-medium");
|
|
119
|
+
return /* @__PURE__ */ s("div", { className: o, ...t });
|
|
120
|
+
}, P = ({
|
|
127
121
|
className: e,
|
|
128
122
|
...t
|
|
129
123
|
}) => {
|
|
130
|
-
const
|
|
124
|
+
const o = l(
|
|
131
125
|
e,
|
|
132
126
|
"pt-1 mb-2",
|
|
133
127
|
"text-sm text-copy-dark font-bold",
|
|
134
128
|
"border-b border-border-medium"
|
|
135
129
|
);
|
|
136
|
-
return /* @__PURE__ */
|
|
130
|
+
return /* @__PURE__ */ s("div", { className: o, ...t });
|
|
137
131
|
};
|
|
138
132
|
export {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
133
|
+
P as MenuGroupLabel,
|
|
134
|
+
k as MenuItem,
|
|
135
|
+
j as MenuSeparator
|
|
142
136
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Menu as _ } from "./components/Menu/Menu.js";
|
|
2
2
|
import { MenuGroupLabel as n, MenuItem as t, MenuSeparator as u } from "./components/Menu/MenuItem.js";
|
|
3
3
|
/*!
|
|
4
|
-
@versini/ui-menu v5.1.
|
|
4
|
+
@versini/ui-menu v5.1.3
|
|
5
5
|
© 2025 gizmette.com
|
|
6
6
|
*/
|
|
7
7
|
try {
|
|
8
8
|
window.__VERSINI_UI_MENU__ || (window.__VERSINI_UI_MENU__ = {
|
|
9
|
-
version: "5.1.
|
|
10
|
-
buildTime: "10/
|
|
9
|
+
version: "5.1.3",
|
|
10
|
+
buildTime: "10/24/2025 07:47 PM EDT",
|
|
11
11
|
homepage: "https://github.com/aversini/ui-components",
|
|
12
12
|
license: "MIT"
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-menu",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@floating-ui/react": "0.27.16",
|
|
45
45
|
"@tailwindcss/typography": "0.5.19",
|
|
46
|
-
"@versini/ui-icons": "4.
|
|
46
|
+
"@versini/ui-icons": "4.14.1",
|
|
47
47
|
"clsx": "2.1.1",
|
|
48
|
-
"tailwindcss": "4.1.
|
|
48
|
+
"tailwindcss": "4.1.16"
|
|
49
49
|
},
|
|
50
50
|
"sideEffects": [
|
|
51
51
|
"**/*.css"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "26763e1e738bcdcb0806c39612161666e4bc4459"
|
|
54
54
|
}
|