@versini/ui-menu 6.8.1 → 6.8.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/dist/index.js +2 -17
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-menu v6.8.
|
|
2
|
+
@versini/ui-menu v6.8.2
|
|
3
3
|
© 2026 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useUniqueId } from "@versini/ui-hooks/use-unique-id";
|
|
8
8
|
import { cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
9
|
-
import clsx_0, { clsx } from "clsx";
|
|
9
|
+
import clsx_0 , { clsx } from "clsx";
|
|
10
10
|
import { IconNext } from "@versini/ui-icons";
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
const MenuGroupContext = createContext(false);
|
|
18
17
|
/* v8 ignore start - default context values are fallbacks, never used directly */ const MenuRootContext = createContext({
|
|
19
18
|
closeAll: ()=>{}
|
|
@@ -31,7 +30,6 @@ const MenuContentContext = createContext({
|
|
|
31
30
|
}); /* v8 ignore stop */
|
|
32
31
|
|
|
33
32
|
|
|
34
|
-
|
|
35
33
|
function getNextEnabledIndex(items, currentIndex, direction) {
|
|
36
34
|
const count = items.length;
|
|
37
35
|
/* v8 ignore start - empty items edge case */ if (count === 0) {
|
|
@@ -260,7 +258,6 @@ function getLastEnabledIndex(items) {
|
|
|
260
258
|
|
|
261
259
|
|
|
262
260
|
|
|
263
|
-
|
|
264
261
|
const getDisplayName = (element)=>{
|
|
265
262
|
if (typeof element === "string") {
|
|
266
263
|
return element;
|
|
@@ -643,8 +640,6 @@ Menu.displayName = "Menu";
|
|
|
643
640
|
|
|
644
641
|
|
|
645
642
|
|
|
646
|
-
|
|
647
|
-
|
|
648
643
|
const MenuGroup = ({ children, label, className, icon })=>{
|
|
649
644
|
const groupClass = clsx_0("rounded-md", "p-2", "first:mt-0 mt-1", "bg-surface-dark", "text-copy-light", className);
|
|
650
645
|
const labelContainerClass = clsx_0("pt-2 pb-2", "px-3 sm:px-2", "-mx-1 -mt-1", "flex items-center justify-between", "text-xs text-copy-medium uppercase font-bold", "rounded-t-md");
|
|
@@ -678,9 +673,6 @@ MenuGroup.displayName = "MenuGroup";
|
|
|
678
673
|
|
|
679
674
|
|
|
680
675
|
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
676
|
const ITEM_CLASS = getMenuItemClasses({
|
|
685
677
|
isSub: false
|
|
686
678
|
});
|
|
@@ -813,8 +805,6 @@ MenuItem.displayName = "MenuItem";
|
|
|
813
805
|
|
|
814
806
|
|
|
815
807
|
|
|
816
|
-
|
|
817
|
-
|
|
818
808
|
const MenuLabel = ({ className, icon, children, ...props })=>{
|
|
819
809
|
const groupLabelClass = clsx_0(className, "pt-1 pb-2", "text-xs text-copy-medium uppercase font-bold", "border-b border-border-medium", {
|
|
820
810
|
"flex items-center": icon
|
|
@@ -836,8 +826,6 @@ MenuLabel.displayName = "MenuLabel";
|
|
|
836
826
|
|
|
837
827
|
|
|
838
828
|
|
|
839
|
-
|
|
840
|
-
|
|
841
829
|
const MenuSeparator = ({ className, ...props })=>{
|
|
842
830
|
const separatorClass = clsx_0(className, "my-1 border-t border-border-medium");
|
|
843
831
|
return /*#__PURE__*/ jsx("div", {
|
|
@@ -857,9 +845,6 @@ MenuSeparator.displayName = "MenuSeparator";
|
|
|
857
845
|
|
|
858
846
|
|
|
859
847
|
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
848
|
const SUB_CONTENT_CLASS = getMenuClasses({
|
|
864
849
|
isSub: true
|
|
865
850
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-menu",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@testing-library/jest-dom": "6.9.1",
|
|
41
|
-
"@versini/ui-types": "8.
|
|
41
|
+
"@versini/ui-types": "8.4.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@versini/ui-hooks": "6.1.1",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"sideEffects": [
|
|
50
50
|
"**/*.css"
|
|
51
51
|
],
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "08f46d8b356d5cfbb4e58dca300428ed6bb03789"
|
|
53
53
|
}
|