@versini/ui-menu 4.0.2 → 4.0.4

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.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as J, jsx as i } from "react/jsx-runtime";
2
- import { useFloatingTree as K, useFloatingNodeId as Q, useListItem as V, useFloating as W, offset as X, flip as Y, shift as Z, autoUpdate as $, useClick as O, useRole as ee, useDismiss as te, useListNavigation as se, useTypeahead as oe, useInteractions as ne, useMergeRefs as ie, FloatingNode as re, FloatingList as ae, FloatingPortal as le, FloatingFocusManager as ue, FloatingTree as ce } from "@floating-ui/react";
3
- import fe, { forwardRef as N, useState as f, useRef as F, useContext as de, useEffect as I } from "react";
4
- import { MenuContext as v } from "./MenuContext.js";
2
+ import { useFloatingTree as K, useFloatingNodeId as Q, useListItem as V, useFloating as W, autoUpdate as X, offset as Y, flip as Z, shift as $, useClick as O, useRole as ee, useDismiss as te, useListNavigation as se, useTypeahead as oe, useInteractions as ne, useMergeRefs as ie, FloatingNode as re, FloatingList as ae, FloatingPortal as le, FloatingFocusManager as ce, FloatingTree as ue } from "@floating-ui/react";
3
+ import fe, { forwardRef as N, useState as f, useRef as v, useContext as de, useEffect as F } from "react";
4
+ import { MenuContext as I } from "./MenuContext.js";
5
5
  const x = (e) => {
6
6
  if (typeof e == "string")
7
7
  return e;
@@ -24,7 +24,7 @@ const x = (e) => {
24
24
  focusMode: k = "system",
25
25
  ...P
26
26
  }, w) => {
27
- const [o, d] = f(!1), [E, j] = f(!1), [u, c] = f(null), m = F([]), p = F([]), T = de(v), n = K(), l = Q(), B = V(), { floatingStyles: L, refs: y, context: r } = W({
27
+ const [o, d] = f(!1), [E, j] = f(!1), [c, u] = f(null), m = v([]), p = v([]), T = de(I), n = K(), l = Q(), B = V(), { floatingStyles: L, refs: y, context: r } = W({
28
28
  nodeId: l,
29
29
  open: o,
30
30
  onOpenChange: (a) => {
@@ -32,22 +32,22 @@ const x = (e) => {
32
32
  },
33
33
  placement: M,
34
34
  strategy: "fixed",
35
- middleware: [X({ mainAxis: 10 }), Y(), Z()],
36
- whileElementsMounted: $
35
+ middleware: [Y({ mainAxis: 10 }), Z(), $()],
36
+ whileElementsMounted: X
37
37
  }), A = O(r, {
38
38
  event: "mousedown",
39
39
  toggle: !0,
40
40
  ignoreMouse: !1
41
41
  }), D = ee(r, { role: "menu" }), S = te(r, { bubbles: !0 }), _ = se(r, {
42
42
  listRef: m,
43
- activeIndex: u,
43
+ activeIndex: c,
44
44
  nested: !1,
45
- onNavigate: c,
45
+ onNavigate: u,
46
46
  loop: !0
47
47
  }), H = oe(r, {
48
48
  listRef: p,
49
- onMatch: o ? c : void 0,
50
- activeIndex: u
49
+ onMatch: o ? u : void 0,
50
+ activeIndex: c
51
51
  }), { getReferenceProps: U, getFloatingProps: q, getItemProps: z } = ne([A, D, S, _, H]), g = x(e) === "Button" || x(e) === "ButtonIcon", C = g ? {
52
52
  noInternalClick: g,
53
53
  focusMode: k,
@@ -67,7 +67,7 @@ const x = (e) => {
67
67
  )
68
68
  }
69
69
  );
70
- return I(() => {
70
+ return F(() => {
71
71
  if (!n)
72
72
  return;
73
73
  function a() {
@@ -76,22 +76,22 @@ const x = (e) => {
76
76
  return n.events.on("click", a), () => {
77
77
  n.events.off("click", a);
78
78
  };
79
- }, [n, s]), I(() => {
79
+ }, [n, s]), F(() => {
80
80
  o && n && n.events.emit("menuopen", { nodeId: l });
81
81
  }, [n, o, l]), /* @__PURE__ */ J(re, { id: l, children: [
82
82
  G,
83
83
  /* @__PURE__ */ i(
84
- v.Provider,
84
+ I.Provider,
85
85
  {
86
86
  value: {
87
- activeIndex: u,
88
- setActiveIndex: c,
87
+ activeIndex: c,
88
+ setActiveIndex: u,
89
89
  getItemProps: z,
90
90
  setHasFocusInside: j,
91
91
  isOpen: o
92
92
  },
93
93
  children: /* @__PURE__ */ i(ae, { elementsRef: m, labelsRef: p, children: o && /* @__PURE__ */ i(le, { children: /* @__PURE__ */ i(
94
- ue,
94
+ ce,
95
95
  {
96
96
  context: r,
97
97
  modal: !1,
@@ -113,7 +113,7 @@ const x = (e) => {
113
113
  )
114
114
  ] });
115
115
  }
116
- ), me = N((e, t) => /* @__PURE__ */ i(ce, { children: /* @__PURE__ */ i(R, { ...e, ref: t }) }));
116
+ ), me = N((e, t) => /* @__PURE__ */ i(ue, { children: /* @__PURE__ */ i(R, { ...e, ref: t }) }));
117
117
  me.displayName = "Menu";
118
118
  R.displayName = "MenuComponent";
119
119
  export {
@@ -40,7 +40,7 @@ const V = ({
40
40
  try {
41
41
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
42
42
  version: "4.2.0",
43
- buildTime: "03/19/2025 05:27 PM EDT",
43
+ buildTime: "05/17/2025 06:18 PM EDT",
44
44
  homepage: "https://github.com/aversini/ui-components",
45
45
  license: "MIT"
46
46
  });
@@ -74,13 +74,13 @@ const y = ({
74
74
  }
75
75
  );
76
76
  /*!
77
- @versini/ui-icons v4.8.2
77
+ @versini/ui-icons v4.10.0
78
78
  © 2025 gizmette.com
79
79
  */
80
80
  try {
81
81
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
82
- version: "4.8.2",
83
- buildTime: "03/19/2025 05:27 PM EDT",
82
+ version: "4.10.0",
83
+ buildTime: "05/17/2025 06:18 PM EDT",
84
84
  homepage: "https://github.com/aversini/ui-components",
85
85
  license: "MIT"
86
86
  });
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 v4.0.2
4
+ @versini/ui-menu v4.0.4
5
5
  © 2025 gizmette.com
6
6
  */
7
7
  try {
8
8
  window.__VERSINI_UI_MENU__ || (window.__VERSINI_UI_MENU__ = {
9
- version: "4.0.2",
10
- buildTime: "04/02/2025 04:19 PM EDT",
9
+ version: "4.0.4",
10
+ buildTime: "05/26/2025 03:48 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": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -39,17 +39,17 @@
39
39
  "react-dom": "^18.3.1 || ^19.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@versini/ui-types": "5.0.1"
42
+ "@versini/ui-types": "5.0.3"
43
43
  },
44
44
  "dependencies": {
45
- "@floating-ui/react": "0.27.6",
45
+ "@floating-ui/react": "0.27.9",
46
46
  "@tailwindcss/typography": "0.5.16",
47
- "@versini/ui-icons": "4.8.2",
47
+ "@versini/ui-icons": "4.10.0",
48
48
  "clsx": "2.1.1",
49
- "tailwindcss": "4.1.1"
49
+ "tailwindcss": "4.1.7"
50
50
  },
51
51
  "sideEffects": [
52
52
  "**/*.css"
53
53
  ],
54
- "gitHead": "bd0dc5cacbcb1457f384709b76609590ff9c22c1"
54
+ "gitHead": "863a399128080a19f2668e458d495110aa0f68f8"
55
55
  }