@versini/ui-menu 4.0.13 → 5.0.1

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,85 +1,167 @@
1
- import { jsx as s, jsxs as I } from "react/jsx-runtime";
2
- import { useListItem as k, useFloatingTree as M, useMergeRefs as N } from "@floating-ui/react";
3
- import { IconCopied as v } from "@versini/ui-icons";
1
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
+ import { useListItem as h, useFloatingTree as N, useMergeRefs as g } from "@floating-ui/react";
4
3
  import u from "clsx";
5
- import * as f from "react";
6
- import { MenuContext as y } from "./MenuContext.js";
7
- const w = f.forwardRef(
4
+ import * as I from "react";
5
+ import { MenuContext as v } from "./MenuContext.js";
6
+ const C = ({
7
+ children: e,
8
+ fill: t,
9
+ viewBox: s,
10
+ className: l,
11
+ defaultViewBox: i,
12
+ size: m,
13
+ title: n,
14
+ semantic: r = !1,
15
+ ...d
16
+ }) => {
17
+ const a = u(m, l);
18
+ return /* @__PURE__ */ p(
19
+ "svg",
20
+ {
21
+ xmlns: "http://www.w3.org/2000/svg",
22
+ className: a,
23
+ viewBox: s || i,
24
+ fill: t || "currentColor",
25
+ role: "img",
26
+ "aria-hidden": !r,
27
+ focusable: !1,
28
+ ...d,
29
+ children: [
30
+ n && r && /* @__PURE__ */ o("title", { children: n }),
31
+ e
32
+ ]
33
+ }
34
+ );
35
+ };
36
+ /*!
37
+ @versini/ui-svgicon v4.2.1
38
+ © 2025 gizmette.com
39
+ */
40
+ try {
41
+ window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
42
+ version: "4.2.1",
43
+ buildTime: "08/27/2025 08:27 AM EDT",
44
+ homepage: "https://github.com/aversini/ui-components",
45
+ license: "MIT"
46
+ });
47
+ } catch {
48
+ }
49
+ const M = ({
50
+ className: e,
51
+ viewBox: t,
52
+ title: s,
53
+ monotone: l,
54
+ ...i
55
+ }) => /* @__PURE__ */ p(
56
+ C,
57
+ {
58
+ defaultViewBox: "0 0 448 512",
59
+ size: "size-5",
60
+ viewBox: t,
61
+ className: e,
62
+ title: s || "Copied",
63
+ ...i,
64
+ children: [
65
+ /* @__PURE__ */ o(
66
+ "path",
67
+ {
68
+ 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",
69
+ opacity: ".4"
70
+ }
71
+ ),
72
+ /* @__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" })
73
+ ]
74
+ }
75
+ );
76
+ /*!
77
+ @versini/ui-icons v4.11.0
78
+ © 2025 gizmette.com
79
+ */
80
+ try {
81
+ window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
82
+ version: "4.11.0",
83
+ buildTime: "08/27/2025 08:28 AM EDT",
84
+ homepage: "https://github.com/aversini/ui-components",
85
+ license: "MIT"
86
+ });
87
+ } catch {
88
+ }
89
+ const S = I.forwardRef(
8
90
  ({
9
91
  label: e,
10
92
  disabled: t,
11
- icon: r,
12
- raw: b = !1,
93
+ icon: s,
94
+ raw: l = !1,
13
95
  children: i,
14
- ignoreClick: a = !1,
15
- selected: c = !1,
16
- ...n
17
- }, p) => {
18
- let l = "";
19
- const m = f.useContext(y), x = k({ label: t ? null : e }), d = M(), C = N([x.ref, p]);
20
- if (b && i)
21
- return /* @__PURE__ */ s(
96
+ ignoreClick: m = !1,
97
+ selected: n = !1,
98
+ ...r
99
+ }, d) => {
100
+ let a = "";
101
+ const f = I.useContext(v), _ = h({ label: t ? null : e }), b = N(), w = g([_.ref, d]);
102
+ if (l && i)
103
+ return /* @__PURE__ */ o(
22
104
  "div",
23
105
  {
24
106
  role: "menuitem",
25
- ...m.getItemProps({
26
- onClick(o) {
27
- a || (n.onClick?.(o), d?.events.emit("click"));
107
+ ...f.getItemProps({
108
+ onClick(c) {
109
+ m || (r.onClick?.(c), b?.events.emit("click"));
28
110
  }
29
111
  }),
30
112
  children: i
31
113
  }
32
114
  );
33
- r && (l = "pl-2");
34
- const g = u(
115
+ s && (a = "pl-2");
116
+ const x = u(
35
117
  "items-center flex-row",
36
118
  "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",
37
119
  {
38
- "bg-none": !t && !c
120
+ "bg-none": !t && !n
39
121
  }
40
122
  );
41
- return /* @__PURE__ */ I(
123
+ return /* @__PURE__ */ p(
42
124
  "button",
43
125
  {
44
- ...n,
45
- ref: C,
126
+ ...r,
127
+ ref: w,
46
128
  role: "menuitem",
47
- className: g,
129
+ className: x,
48
130
  tabIndex: 0,
49
131
  disabled: t,
50
- ...m.getItemProps({
51
- onClick(o) {
52
- a || (n.onClick?.(o), d?.events.emit("click"));
132
+ ...f.getItemProps({
133
+ onClick(c) {
134
+ m || (r.onClick?.(c), b?.events.emit("click"));
53
135
  },
54
- onFocus(o) {
55
- n.onFocus?.(o), m.setHasFocusInside(!0);
136
+ onFocus(c) {
137
+ r.onFocus?.(c), f.setHasFocusInside(!0);
56
138
  }
57
139
  }),
58
140
  children: [
59
- c && /* @__PURE__ */ s(v, { className: "mr-2", size: "size-4" }),
60
- r,
61
- e && /* @__PURE__ */ s("span", { className: l, children: e })
141
+ n && /* @__PURE__ */ o(M, { className: "mr-2", size: "size-4" }),
142
+ s,
143
+ e && /* @__PURE__ */ o("span", { className: a, children: e })
62
144
  ]
63
145
  }
64
146
  );
65
147
  }
66
148
  );
67
- w.displayName = "MenuItem";
68
- const z = ({ className: e, ...t }) => {
69
- const r = u(e, "my-1 border-t border-border-medium");
70
- return /* @__PURE__ */ s("div", { className: r, ...t });
71
- }, P = ({
149
+ S.displayName = "MenuItem";
150
+ const T = ({ className: e, ...t }) => {
151
+ const s = u(e, "my-1 border-t border-border-medium");
152
+ return /* @__PURE__ */ o("div", { className: s, ...t });
153
+ }, k = ({
72
154
  className: e,
73
155
  ...t
74
156
  }) => {
75
- const r = u(
157
+ const s = u(
76
158
  e,
77
159
  "pt-1 mb-2 text-sm text-copy-dark border-b border-border-medium"
78
160
  );
79
- return /* @__PURE__ */ s("div", { className: r, ...t });
161
+ return /* @__PURE__ */ o("div", { className: s, ...t });
80
162
  };
81
163
  export {
82
- P as MenuGroupLabel,
83
- w as MenuItem,
84
- z as MenuSeparator
164
+ k as MenuGroupLabel,
165
+ S as MenuItem,
166
+ T as MenuSeparator
85
167
  };
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.13
4
+ @versini/ui-menu v5.0.1
5
5
  © 2025 gizmette.com
6
6
  */
7
7
  try {
8
8
  window.__VERSINI_UI_MENU__ || (window.__VERSINI_UI_MENU__ = {
9
- version: "4.0.13",
10
- buildTime: "09/01/2025 02:19 PM EDT",
9
+ version: "5.0.1",
10
+ buildTime: "09/01/2025 04:02 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.13",
3
+ "version": "5.0.1",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -37,22 +37,22 @@
37
37
  "test": "vitest run"
38
38
  },
39
39
  "peerDependencies": {
40
- "react": "^18.3.1 || ^19.0.0",
41
- "react-dom": "^18.3.1 || ^19.0.0"
40
+ "react": "^19.1.0",
41
+ "react-dom": "^19.1.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@testing-library/jest-dom": "6.8.0",
45
- "@versini/ui-types": "5.0.7"
45
+ "@versini/ui-types": "6.0.1"
46
46
  },
47
47
  "dependencies": {
48
48
  "@floating-ui/react": "0.27.16",
49
49
  "@tailwindcss/typography": "0.5.16",
50
- "@versini/ui-icons": "4.10.0",
50
+ "@versini/ui-icons": "4.11.0",
51
51
  "clsx": "2.1.1",
52
52
  "tailwindcss": "4.1.12"
53
53
  },
54
54
  "sideEffects": [
55
55
  "**/*.css"
56
56
  ],
57
- "gitHead": "c577149643ec36cad454587166e62410a77aed38"
57
+ "gitHead": "dcc216644c8c3e7d43a49ea655a22aed21fa4b83"
58
58
  }