@arcblock/ux 3.1.41 → 3.1.42

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,5 +1,5 @@
1
- import { jsx as r, jsxs as t, Fragment as y } from "react/jsx-runtime";
2
- import { Box as d, Container as w } from "@mui/material";
1
+ import { jsx as r, jsxs as t, Fragment as w } from "react/jsx-runtime";
2
+ import { Box as d, Container as y } from "@mui/material";
3
3
  import { useRef as v, useState as N, useEffect as k } from "react";
4
4
  import z from "./auto-hidden.js";
5
5
  import { styled as W } from "../Theme/index.js";
@@ -14,24 +14,24 @@ function I({
14
14
  prepend: f = null,
15
15
  align: o = "left",
16
16
  maxWidth: x = !1,
17
- homeLink: i = "/",
17
+ homeLink: a = "/",
18
18
  ...m
19
19
  }) {
20
- const a = v(null), [g, u] = N("0px"), b = { minWidth: g };
20
+ const i = v(null), [g, u] = N("0px"), b = { minWidth: g };
21
21
  return k(() => {
22
22
  const { searchParams: n } = new URL(window.location.href);
23
- n.get("inviter") && window.localStorage.setItem("inviter", n.get("inviter")), a.current && u(`${a.current.offsetWidth}px`);
24
- }, []), /* @__PURE__ */ r(B, { ...m, children: /* @__PURE__ */ t(w, { maxWidth: x, className: "header-container", children: [
23
+ n.get("inviter") && window.localStorage.setItem("inviter", n.get("inviter")), i.current && u(`${i.current.offsetWidth}px`);
24
+ }, []), /* @__PURE__ */ r(B, { ...m, children: /* @__PURE__ */ t(y, { maxWidth: x, className: "header-container", children: [
25
25
  f,
26
26
  /* @__PURE__ */ r("div", { className: "header-brand-wrapper", style: b, children: (() => {
27
- const n = /* @__PURE__ */ t(y, { children: [
28
- e && /* @__PURE__ */ r("div", { className: "header-logo", ref: a, children: e }),
27
+ const n = /* @__PURE__ */ t(w, { children: [
28
+ e && /* @__PURE__ */ r("div", { className: "header-logo", ref: i, children: e }),
29
29
  l && /* @__PURE__ */ r(z, { height: 44, sx: { flexShrink: { xs: 1 } }, children: /* @__PURE__ */ t("div", { className: "header-brand", children: [
30
30
  /* @__PURE__ */ r("div", { className: "header-brand-title", children: /* @__PURE__ */ r("h2", { children: l }) }),
31
31
  /* @__PURE__ */ r("div", { className: "header-brand-desc", children: s })
32
32
  ] }) })
33
33
  ] });
34
- return typeof i == "function" ? i(n) : /* @__PURE__ */ r("a", { href: i, children: n });
34
+ return typeof a == "function" ? a(n) : /* @__PURE__ */ r("a", { href: a, children: n });
35
35
  })() }),
36
36
  /* @__PURE__ */ r("div", { className: "header-brand-addon", children: h }),
37
37
  o === "right" && /* @__PURE__ */ r(
@@ -138,7 +138,7 @@ const B = W(d)`
138
138
  .header-menu {
139
139
  display: inline-block;
140
140
  }
141
- .header-logo {
141
+ .header-brand-wrapper .header-logo {
142
142
  height: 32px;
143
143
  }
144
144
  .header-brand {
@@ -1,22 +1,22 @@
1
1
  import { jsx as o, jsxs as c } from "react/jsx-runtime";
2
2
  import { useState as f } from "react";
3
- import { useReactive as y, useCreation as v } from "ahooks";
4
- import { Close as h, Menu as g } from "@mui/icons-material";
5
- import { Container as b, useTheme as x, useMediaQuery as w, Drawer as P, Button as k } from "@mui/material";
6
- import p from "./header.js";
7
- import { styled as i } from "../Theme/index.js";
8
- function z({ prepend: n, children: r = null, ...s }) {
9
- const a = x(), l = w(a.breakpoints.down("md")), [t, m] = f(!1), u = typeof r == "function" ? r({ isMobile: l, closeMenu: () => m(!1) }) : r, e = y({
3
+ import { useReactive as v, useCreation as g } from "ahooks";
4
+ import { Close as y, Menu as h } from "@mui/icons-material";
5
+ import { Container as x, useTheme as b, useMediaQuery as w, Drawer as P, Button as k } from "@mui/material";
6
+ import u from "./header.js";
7
+ import { styled as s } from "../Theme/index.js";
8
+ function z({ prepend: n, children: r = null, ...i }) {
9
+ const a = b(), l = w(a.breakpoints.down("md")), [t, m] = f(!1), d = typeof r == "function" ? r({ isMobile: l, closeMenu: () => m(!1) }) : r, e = v({
10
10
  changed: !1,
11
11
  value: "",
12
12
  priority: ""
13
13
  });
14
- return v(() => {
14
+ return g(() => {
15
15
  if (document.documentElement?.style) {
16
- const d = () => {
16
+ const p = () => {
17
17
  e.changed && (e.value ? document.documentElement.style.setProperty("overflow", e.value, e.priority) : document.documentElement.style.removeProperty("overflow"), e.value = "", e.priority = "", e.changed = !1);
18
18
  };
19
- return t ? (e.changed = !0, e.value = document.documentElement.style.getPropertyValue("overflow"), e.priority = document.documentElement.style.getPropertyPriority("overflow"), document.documentElement.style.setProperty("overflow", "revert", "important")) : d(), d;
19
+ return t ? (e.changed = !0, e.value = document.documentElement.style.getPropertyValue("overflow"), e.priority = document.documentElement.style.getPropertyPriority("overflow"), document.documentElement.style.setProperty("overflow", "revert", "important")) : p(), p;
20
20
  }
21
21
  return () => {
22
22
  };
@@ -30,12 +30,12 @@ function z({ prepend: n, children: r = null, ...s }) {
30
30
  className: "header-menu",
31
31
  "aria-label": "header menu button",
32
32
  onClick: () => m(!t),
33
- children: t ? /* @__PURE__ */ o(h, {}) : /* @__PURE__ */ o(g, {})
33
+ children: t ? /* @__PURE__ */ o(y, {}) : /* @__PURE__ */ o(h, {})
34
34
  }
35
35
  ),
36
- ...s,
36
+ ...i,
37
37
  children: [
38
- !l && u,
38
+ !l && d,
39
39
  l && /* @__PURE__ */ o(
40
40
  P,
41
41
  {
@@ -53,33 +53,41 @@ function z({ prepend: n, children: r = null, ...s }) {
53
53
  },
54
54
  slotProps: {
55
55
  paper: {
56
- style: {
56
+ sx: {
57
57
  top: 64,
58
58
  bottom: 0,
59
59
  boxShadow: "none",
60
60
  backgroundImage: "none",
61
- backgroundColor: a.palette.background.paper
61
+ backgroundColor: a.palette.background.paper,
62
+ "& .navmenu.navmenu--inline": {
63
+ margin: 0,
64
+ padding: 0
65
+ }
62
66
  }
63
67
  }
64
68
  },
65
- children: /* @__PURE__ */ o(M, { children: u })
69
+ children: /* @__PURE__ */ o(M, { children: d })
66
70
  }
67
71
  )
68
72
  ]
69
73
  }
70
- ) : /* @__PURE__ */ o(p, { prepend: n, ...s });
74
+ ) : /* @__PURE__ */ o(u, { prepend: n, ...i });
71
75
  }
72
- const C = i(p)`
76
+ const C = s(u)`
73
77
  .header-menu {
74
78
  display: none;
75
79
  }
76
80
  ${(n) => n.theme.breakpoints.down("md")} {
77
81
  .header-menu {
78
82
  display: flex;
79
- margin-right: 12px;
83
+ padding-left: 6px;
84
+ padding-right: 6px;
85
+ min-width: 0;
86
+ margin-left: -4px;
87
+ margin-right: 8px;
80
88
  }
81
89
  }
82
- `, M = i(b)`
90
+ `, M = s(x)`
83
91
  padding-top: 8px;
84
92
  padding-bottom: 16px;
85
93
  .navmenu {
@@ -158,7 +158,7 @@ const o = i("nav", {
158
158
  // inline 布局中
159
159
  "&.navmenu-item--inline": {
160
160
  margin: 0,
161
- padding: "0 16px",
161
+ padding: 0,
162
162
  minHeight: "48px",
163
163
  lineHeight: "48px",
164
164
  flexWrap: "wrap"
@@ -207,7 +207,6 @@ const o = i("nav", {
207
207
  position: "static",
208
208
  transform: "none",
209
209
  flex: "1 0 100%",
210
- margin: "0 -16px",
211
210
  padding: 0,
212
211
  height: 0,
213
212
  overflow: "hidden",
@@ -220,7 +219,7 @@ const o = i("nav", {
220
219
  },
221
220
  ".navmenu-sub__list": {
222
221
  padding: 0,
223
- paddingLeft: "16px",
222
+ paddingLeft: "24px",
224
223
  boxShadow: "none"
225
224
  },
226
225
  ".navmenu-item__content": {
@@ -1,4 +1,4 @@
1
- const e = "3.1.41", s = { "@blocklet/js-sdk": "^1.16.49-beta-20250823-082650-626c1473" }, t = {
1
+ const e = "3.1.42", s = { "@blocklet/js-sdk": "^1.16.49-beta-20250823-082650-626c1473" }, t = {
2
2
  version: e,
3
3
  dependencies: s
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "3.1.41",
3
+ "version": "3.1.42",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -68,16 +68,16 @@
68
68
  "react": "^19.0.0",
69
69
  "react-router-dom": "^6.22.3"
70
70
  },
71
- "gitHead": "21979ee3abb716f0201960abe9c85d8f0a8f291c",
71
+ "gitHead": "747490bf0ea403cb53f961ae64f0544a75c13703",
72
72
  "dependencies": {
73
- "@arcblock/bridge": "3.1.41",
73
+ "@arcblock/bridge": "3.1.42",
74
74
  "@arcblock/did": "^1.21.3",
75
75
  "@arcblock/did-motif": "^1.1.14",
76
- "@arcblock/icons": "3.1.41",
77
- "@arcblock/nft-display": "3.1.41",
78
- "@arcblock/react-hooks": "3.1.41",
76
+ "@arcblock/icons": "3.1.42",
77
+ "@arcblock/nft-display": "3.1.42",
78
+ "@arcblock/react-hooks": "3.1.42",
79
79
  "@blocklet/js-sdk": "^1.16.49-beta-20250823-082650-626c1473",
80
- "@blocklet/theme": "3.1.41",
80
+ "@blocklet/theme": "3.1.42",
81
81
  "@fontsource/roboto": "~5.1.1",
82
82
  "@fontsource/ubuntu-mono": "^5.2.6",
83
83
  "@iconify-icons/logos": "^1.2.36",
@@ -195,7 +195,7 @@ const Root = styled(Box)`
195
195
  .header-menu {
196
196
  display: inline-block;
197
197
  }
198
- .header-logo {
198
+ .header-brand-wrapper .header-logo {
199
199
  height: 32px;
200
200
  }
201
201
  .header-brand {
@@ -94,12 +94,16 @@ function ResponsiveHeader({ prepend, children = null, ...rest }: ResponsiveHeade
94
94
  }}
95
95
  slotProps={{
96
96
  paper: {
97
- style: {
97
+ sx: {
98
98
  top: 64,
99
99
  bottom: 0,
100
100
  boxShadow: 'none',
101
101
  backgroundImage: 'none',
102
102
  backgroundColor: theme.palette.background.paper,
103
+ '& .navmenu.navmenu--inline': {
104
+ margin: 0,
105
+ padding: 0,
106
+ },
103
107
  },
104
108
  },
105
109
  }}>
@@ -117,7 +121,11 @@ const Root = styled(Header)`
117
121
  ${(props) => props.theme.breakpoints.down('md')} {
118
122
  .header-menu {
119
123
  display: flex;
120
- margin-right: 12px;
124
+ padding-left: 6px;
125
+ padding-right: 6px;
126
+ min-width: 0;
127
+ margin-left: -4px;
128
+ margin-right: 8px;
121
129
  }
122
130
  }
123
131
  `;
@@ -173,7 +173,7 @@ export const NavMenuItem = styled('li', {
173
173
  // inline 布局中
174
174
  '&.navmenu-item--inline': {
175
175
  margin: 0,
176
- padding: '0 16px',
176
+ padding: 0,
177
177
  minHeight: '48px',
178
178
  lineHeight: '48px',
179
179
  flexWrap: 'wrap',
@@ -225,7 +225,6 @@ export const NavMenuSub = styled(NavMenuItem)(({ theme }) => ({
225
225
  position: 'static',
226
226
  transform: 'none',
227
227
  flex: '1 0 100%',
228
- margin: '0 -16px',
229
228
  padding: 0,
230
229
  height: 0,
231
230
  overflow: 'hidden',
@@ -238,7 +237,7 @@ export const NavMenuSub = styled(NavMenuItem)(({ theme }) => ({
238
237
  },
239
238
  '.navmenu-sub__list': {
240
239
  padding: 0,
241
- paddingLeft: '16px',
240
+ paddingLeft: '24px',
242
241
  boxShadow: 'none',
243
242
  },
244
243
  '.navmenu-item__content': {