@versini/ui-menu 5.1.0 → 5.1.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.
@@ -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/19/2025 01:03 PM EDT",
40
+ buildTime: "10/20/2025 07:37 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.13.0
47
+ @versini/ui-icons v4.14.0
48
48
  © 2025 gizmette.com
49
49
  */
50
50
  try {
51
51
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
52
- version: "4.13.0",
53
- buildTime: "10/19/2025 01:03 PM EDT",
52
+ version: "4.14.0",
53
+ buildTime: "10/20/2025 07:37 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.dzHBmDC4.js";
3
+ import { I as Ie } from "../../chunks/index.CQwwH0hY.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";
@@ -128,8 +128,13 @@ const Ee = ({
128
128
  } : {};
129
129
  if (c && !e) {
130
130
  const s = Fe(
131
- "items-center flex-row justify-between",
132
- "m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1 flex w-full rounded-md border border-transparent text-left text-base outline-hidden focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium",
131
+ "flex items-center flex-row justify-between",
132
+ "w-full",
133
+ "m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1",
134
+ "rounded-md border border-transparent",
135
+ "text-left text-base",
136
+ "outline-hidden focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline",
137
+ "disabled:cursor-not-allowed disabled:text-copy-medium",
133
138
  {
134
139
  "bg-surface-lighter": o && !C
135
140
  }
@@ -181,7 +186,7 @@ const Ee = ({
181
186
  "div",
182
187
  {
183
188
  ref: E.setFloating,
184
- className: "rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-4 sm:p-2",
189
+ className: "rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-3 sm:p-2",
185
190
  style: H,
186
191
  ...j(),
187
192
  children: n
@@ -233,7 +238,7 @@ const Ee = ({
233
238
  "div",
234
239
  {
235
240
  ref: E.setFloating,
236
- className: "rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-4 sm:p-2",
241
+ className: "rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-3 sm:p-2",
237
242
  style: H,
238
243
  ...j(),
239
244
  children: n
@@ -1,88 +1,87 @@
1
- import { jsxs as x, jsx as o } from "react/jsx-runtime";
2
- import { useListItem as N, useFloatingTree as w, useMergeRefs as y } from "@floating-ui/react";
3
- import { I as b } from "../../chunks/index.dzHBmDC4.js";
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.CQwwH0hY.js";
4
4
  import l from "clsx";
5
5
  import * as p from "react";
6
- import { MenuContext as M } from "./MenuContext.js";
7
- const g = ({
6
+ import { MenuContext as h } from "./MenuContext.js";
7
+ const z = ({
8
8
  className: e,
9
9
  viewBox: t,
10
- title: s,
11
- monotone: n,
10
+ title: o,
11
+ monotone: a,
12
12
  ...r
13
13
  }) => /* @__PURE__ */ x(
14
14
  b,
15
15
  {
16
- defaultViewBox: "0 0 448 512",
16
+ defaultViewBox: "0 0 512 512",
17
17
  size: "size-5",
18
18
  viewBox: t,
19
19
  className: e,
20
- title: s || "Checked",
20
+ title: o || "Selected",
21
21
  ...r,
22
22
  children: [
23
- /* @__PURE__ */ o(
23
+ /* @__PURE__ */ s(
24
24
  "path",
25
25
  {
26
- d: "M0 96v320c0 35.3 28.7 64 64 64h320c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96m104 160c0-6.1 2.3-12.3 7-17 9.4-9.4 24.6-9.4 33.9 0l47 47 111-111c4.7-4.7 10.8-7 17-7s12.3 2.3 17 7c2.3 2.3 4.1 5 5.3 7.9.6 1.5 1 2.9 1.3 4.4.2 1.1.3 2.2.3 2.2.1 1.2.1 1.2.1 2.5-.1 1.5-.1 1.9-.1 2.3-.1.7-.2 1.5-.3 2.2-.3 1.5-.7 3-1.3 4.4-1.2 2.9-2.9 5.6-5.3 7.9l-128 128c-4.7 4.7-10.8 7-17 7s-12.3-2.3-17-7l-64-64c-4.7-4.7-7-10.8-7-17z",
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__ */ o("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
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
- ), k = ({
33
+ ), I = ({
34
34
  className: e,
35
35
  viewBox: t,
36
- title: s,
37
- monotone: n,
36
+ title: o,
37
+ monotone: a,
38
38
  ...r
39
- }) => /* @__PURE__ */ o(
39
+ }) => /* @__PURE__ */ s(
40
40
  b,
41
41
  {
42
- defaultViewBox: "0 0 448 512",
42
+ defaultViewBox: "0 0 512 512",
43
43
  size: "size-5",
44
44
  viewBox: t,
45
45
  className: e,
46
- title: s || "UnChecked",
46
+ title: o || "UnSelected",
47
47
  ...r,
48
- children: /* @__PURE__ */ o(
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
- ), I = p.forwardRef(
50
+ ), k = p.forwardRef(
57
51
  ({
58
52
  label: e,
59
53
  disabled: t,
60
- icon: s,
61
- raw: n = !1,
54
+ icon: o,
55
+ raw: a = !1,
62
56
  children: r,
63
57
  ignoreClick: u = !1,
64
58
  selected: i,
65
- ...m
66
- }, h) => {
59
+ ...n
60
+ }, N) => {
67
61
  let d = "";
68
- const a = p.useContext(M), C = N({ label: t ? null : e }), f = w(), v = y([C.ref, h]);
69
- if (n && r)
70
- return /* @__PURE__ */ o(
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
- ...a.getItemProps({
75
- onClick(c) {
76
- u || (m.onClick?.(c), f?.events.emit("click"));
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
- s && (d = "pl-2");
83
- const z = l(
84
- "items-center flex-row",
85
- "m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1 flex w-full rounded-md border border-transparent text-left text-base outline-hidden focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium",
76
+ o && (d = "pl-2");
77
+ const y = l(
78
+ "flex flex-row items-center",
79
+ "w-full",
80
+ "m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1",
81
+ "rounded-md border border-transparent",
82
+ "text-left text-base",
83
+ "outline-hidden focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline",
84
+ "disabled:cursor-not-allowed disabled:text-copy-medium",
86
85
  {
87
86
  "bg-none": !t && !i
88
87
  }
@@ -90,46 +89,48 @@ const g = ({
90
89
  return /* @__PURE__ */ x(
91
90
  "button",
92
91
  {
93
- ...m,
92
+ ...n,
94
93
  ref: v,
95
94
  role: "menuitem",
96
- className: z,
95
+ className: y,
97
96
  tabIndex: 0,
98
97
  disabled: t,
99
- ...a.getItemProps({
100
- onClick(c) {
101
- u || (m.onClick?.(c), f?.events.emit("click"));
98
+ ...c.getItemProps({
99
+ onClick(m) {
100
+ u || (n.onClick?.(m), f?.events.emit("click"));
102
101
  },
103
- onFocus(c) {
104
- m.onFocus?.(c), a.setHasFocusInside(!0);
102
+ onFocus(m) {
103
+ n.onFocus?.(m), c.setHasFocusInside(!0);
105
104
  }
106
105
  }),
107
106
  children: [
108
- i === !0 && /* @__PURE__ */ o(g, { className: "text-copy-success mr-2", size: "size-4" }),
109
- i === !1 && /* @__PURE__ */ o(k, { className: "text-copy-medium mr-2", size: "size-4" }),
110
- s,
111
- e && /* @__PURE__ */ o("span", { className: d, children: e })
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 })
112
111
  ]
113
112
  }
114
113
  );
115
114
  }
116
115
  );
117
- I.displayName = "MenuItem";
118
- const V = ({ className: e, ...t }) => {
119
- const s = l(e, "my-1 border-t border-border-medium");
120
- return /* @__PURE__ */ o("div", { className: s, ...t });
121
- }, j = ({
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 = ({
122
121
  className: e,
123
122
  ...t
124
123
  }) => {
125
- const s = l(
124
+ const o = l(
126
125
  e,
127
- "pt-1 mb-2 text-sm text-copy-dark border-b border-border-medium"
126
+ "pt-1 mb-2",
127
+ "text-sm text-copy-dark font-bold",
128
+ "border-b border-border-medium"
128
129
  );
129
- return /* @__PURE__ */ o("div", { className: s, ...t });
130
+ return /* @__PURE__ */ s("div", { className: o, ...t });
130
131
  };
131
132
  export {
132
- j as MenuGroupLabel,
133
- I as MenuItem,
134
- V as MenuSeparator
133
+ P as MenuGroupLabel,
134
+ k as MenuItem,
135
+ j as MenuSeparator
135
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.0
4
+ @versini/ui-menu v5.1.2
5
5
  © 2025 gizmette.com
6
6
  */
7
7
  try {
8
8
  window.__VERSINI_UI_MENU__ || (window.__VERSINI_UI_MENU__ = {
9
- version: "5.1.0",
10
- buildTime: "10/19/2025 04:18 PM EDT",
9
+ version: "5.1.2",
10
+ buildTime: "10/20/2025 07:55 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.0",
3
+ "version": "5.1.2",
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.13.0",
46
+ "@versini/ui-icons": "4.14.0",
47
47
  "clsx": "2.1.1",
48
- "tailwindcss": "4.1.14"
48
+ "tailwindcss": "4.1.15"
49
49
  },
50
50
  "sideEffects": [
51
51
  "**/*.css"
52
52
  ],
53
- "gitHead": "5e38069da8dfd7a151bb67950a96d193b50a0b00"
53
+ "gitHead": "83222981436f0aa6a5885586df15430f32c23e43"
54
54
  }