@blocklet/ui-react 2.11.24 → 2.11.25
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,6 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
-
import Box from "@mui/material
|
|
3
|
+
import { Box } from "@mui/material";
|
|
4
|
+
import clsx from "clsx";
|
|
4
5
|
import Brand from "./brand.js";
|
|
5
6
|
import Links from "./links.js";
|
|
6
7
|
import SocialMedia from "./social-media.js";
|
|
@@ -59,7 +60,7 @@ function InternalFooter(props) {
|
|
|
59
60
|
if (!LayoutComponent) {
|
|
60
61
|
throw new Error(`layout ${layout} is not supported.`);
|
|
61
62
|
}
|
|
62
|
-
return /* @__PURE__ */ jsxs(Box, { position: "relative", ...rest, children: [
|
|
63
|
+
return /* @__PURE__ */ jsxs(Box, { position: "relative", ...rest, className: clsx("blocklet__footer", rest.className), children: [
|
|
63
64
|
/* @__PURE__ */ jsx(LayoutComponent, { elements, data: props }),
|
|
64
65
|
/* @__PURE__ */ jsx(
|
|
65
66
|
Box,
|
package/lib/Header/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import NavMenu from "@arcblock/ux/lib/NavMenu";
|
|
|
8
8
|
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
9
9
|
import { temp as colors } from "@arcblock/ux/lib/Colors";
|
|
10
10
|
import omit from "lodash/omit";
|
|
11
|
+
import clsx from "clsx";
|
|
11
12
|
import Icon from "../Icon/index.js";
|
|
12
13
|
import OverridableThemeProvider from "../common/overridable-theme-provider.js";
|
|
13
14
|
import { mapRecursive, flatRecursive, matchPaths } from "../utils.js";
|
|
@@ -91,6 +92,7 @@ function Header({
|
|
|
91
92
|
...omit(rest, ["bordered"]),
|
|
92
93
|
$bordered: rest?.bordered,
|
|
93
94
|
$bgcolor: theme?.background?.header,
|
|
95
|
+
className: clsx("blocklet__header", rest.className),
|
|
94
96
|
children: hideNavMenu || !navItems?.length ? null : ({ isMobile }) => (
|
|
95
97
|
// @ts-ignore
|
|
96
98
|
/* @__PURE__ */ jsx(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/ui-react",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.25",
|
|
4
4
|
"description": "Some useful front-end web components that can be used in Blocklets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"url": "https://github.com/ArcBlock/ux/issues"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@arcblock/bridge": "^2.11.
|
|
36
|
-
"@arcblock/react-hooks": "^2.11.
|
|
35
|
+
"@arcblock/bridge": "^2.11.25",
|
|
36
|
+
"@arcblock/react-hooks": "^2.11.25",
|
|
37
37
|
"@blocklet/did-space-react": "^1.0.2",
|
|
38
38
|
"@iconify-icons/logos": "^1.2.36",
|
|
39
39
|
"@iconify-icons/material-symbols": "^1.2.58",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"jest": "^29.7.0",
|
|
82
82
|
"unbuild": "^2.0.0"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "1efa61a0f43a73a0b90654ff2db7d116782952a1"
|
|
85
85
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import Box from '@mui/material
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
|
|
3
5
|
import Brand from './brand';
|
|
4
6
|
import Links from './links';
|
|
5
7
|
import SocialMedia from './social-media';
|
|
@@ -66,8 +68,9 @@ function InternalFooter(props) {
|
|
|
66
68
|
if (!LayoutComponent) {
|
|
67
69
|
throw new Error(`layout ${layout} is not supported.`);
|
|
68
70
|
}
|
|
71
|
+
|
|
69
72
|
return (
|
|
70
|
-
<Box position="relative" {...rest}>
|
|
73
|
+
<Box position="relative" {...rest} className={clsx('blocklet__footer', rest.className)}>
|
|
71
74
|
<LayoutComponent elements={elements} data={props} />
|
|
72
75
|
<Box
|
|
73
76
|
position="absolute"
|
package/src/Header/index.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import { temp as colors } from '@arcblock/ux/lib/Colors';
|
|
|
9
9
|
import omit from 'lodash/omit';
|
|
10
10
|
import { LiteralUnion } from 'type-fest';
|
|
11
11
|
import type { BoxProps } from '@mui/material';
|
|
12
|
+
import clsx from 'clsx';
|
|
12
13
|
|
|
13
14
|
import Icon from '../Icon';
|
|
14
15
|
import OverridableThemeProvider from '../common/overridable-theme-provider';
|
|
@@ -125,12 +126,14 @@ function Header({
|
|
|
125
126
|
return (
|
|
126
127
|
<OverridableThemeProvider theme={themeOverrides}>
|
|
127
128
|
<StyledUxHeader
|
|
129
|
+
// @ts-ignore
|
|
128
130
|
homeLink={homeLink}
|
|
129
131
|
logo={<img src={appLogoRect || appLogo} alt="logo" />}
|
|
130
132
|
addons={headerAddons}
|
|
131
133
|
{...omit(rest, ['bordered'])}
|
|
132
134
|
$bordered={rest?.bordered}
|
|
133
|
-
$bgcolor={theme?.background?.header}
|
|
135
|
+
$bgcolor={theme?.background?.header}
|
|
136
|
+
className={clsx('blocklet__header', rest.className)}>
|
|
134
137
|
{/* blocklet.yml 没有配置 navigation 时, 则为 children 传入 null, 此时 ResponsiveHeader 会渲染普通的不带 menu 的 Header */}
|
|
135
138
|
{hideNavMenu || !navItems?.length
|
|
136
139
|
? null
|