@blocklet/launcher-layout 2.0.18 → 2.0.19

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.
Files changed (2) hide show
  1. package/lib/index.js +16 -5
  2. package/package.json +9 -9
package/lib/index.js CHANGED
@@ -18,7 +18,7 @@ var _locale = require("./locale");
18
18
  var _header = _interopRequireDefault(require("./header"));
19
19
  var _nav = _interopRequireDefault(require("./nav"));
20
20
  var _jsxRuntime = require("react/jsx-runtime");
21
- const _excluded = ["blockletMeta", "children", "logoUrl", "locale", "headerEndAddons", "pcWidth", "pcHeight", "navLogo", "useOfSkeleton", "stepTip"];
21
+ const _excluded = ["blockletMeta", "children", "logoUrl", "locale", "headerEndAddons", "pcWidth", "pcHeight", "navLogo", "useOfSkeleton", "stepTip", "maxWidth"];
22
22
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
23
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
24
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -30,7 +30,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
30
30
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
31
31
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
32
32
  const MobileContent = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n overflow: hidden;\n width: 100%;\n height: 100%;\n padding-top: 68px;\n"])));
33
- const PcContent = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n height: 80%;\n max-height: 880px;\n border-radius: 8px;\n background-color: #fff;\n\n @media (min-width: 2500px) {\n width: 50%;\n }\n\n @media (min-width: 2500px) and (max-width: 2800px) {\n width: 80%;\n }\n\n @media (max-width: 2499px) {\n width: 90%;\n }\n"])));
33
+ const PcContent = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n min-width: 900px;\n max-height: 880px;\n border-radius: 8px;\n background-color: #fff;\n"])));
34
34
  function Layout(_ref) {
35
35
  let {
36
36
  blockletMeta,
@@ -42,7 +42,8 @@ function Layout(_ref) {
42
42
  pcHeight,
43
43
  navLogo,
44
44
  useOfSkeleton,
45
- stepTip
45
+ stepTip,
46
+ maxWidth
46
47
  } = _ref,
47
48
  rest = _objectWithoutProperties(_ref, _excluded);
48
49
  const isMobile = (0, _useMediaQuery.default)(theme => theme.breakpoints.down('md'));
@@ -66,6 +67,9 @@ function Layout(_ref) {
66
67
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, _objectSpread(_objectSpread({}, rest), {}, {
67
68
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("header", {
68
69
  className: "root-header",
70
+ style: isMobile ? {} : {
71
+ maxWidth
72
+ },
69
73
  children: [isMobile && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
70
74
  className: "left",
71
75
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_header.default, {
@@ -94,6 +98,11 @@ function Layout(_ref) {
94
98
  children: headerEndAddons
95
99
  })]
96
100
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
101
+ style: isMobile ? {} : {
102
+ width: pcWidth,
103
+ height: pcHeight,
104
+ maxWidth
105
+ },
97
106
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Hidden.default, {
98
107
  mdDown: true,
99
108
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_nav.default, {
@@ -122,8 +131,9 @@ Layout.propTypes = {
122
131
  logoUrl: _propTypes.default.string,
123
132
  locale: _propTypes.default.oneOf(['en', 'zh']),
124
133
  headerEndAddons: _propTypes.default.any,
125
- pcWidth: _propTypes.default.any,
126
- pcHeight: _propTypes.default.any,
134
+ maxWidth: _propTypes.default.string,
135
+ pcWidth: _propTypes.default.string,
136
+ pcHeight: _propTypes.default.string,
127
137
  navLogo: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.object]),
128
138
  useOfSkeleton: _propTypes.default.bool,
129
139
  stepTip: _propTypes.default.string
@@ -134,6 +144,7 @@ Layout.defaultProps = {
134
144
  headerEndAddons: null,
135
145
  pcWidth: '80%',
136
146
  pcHeight: '80%',
147
+ maxWidth: '1245px',
137
148
  navLogo: '',
138
149
  useOfSkeleton: true,
139
150
  stepTip: ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/launcher-layout",
3
- "version": "2.0.18",
3
+ "version": "2.0.19",
4
4
  "description": "Common ux components of launcher",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -37,15 +37,15 @@
37
37
  "react": ">=18.1.0"
38
38
  },
39
39
  "dependencies": {
40
- "@arcblock/did-connect": "^2.5.18",
41
- "@arcblock/icons": "^2.5.18",
42
- "@arcblock/ux": "^2.5.18",
43
- "@blocklet/launcher-ux": "2.0.18",
44
- "@blocklet/meta": "^1.16.1",
40
+ "@arcblock/did-connect": "^2.5.19",
41
+ "@arcblock/icons": "^2.5.19",
42
+ "@arcblock/ux": "^2.5.19",
43
+ "@blocklet/launcher-ux": "2.0.19",
44
+ "@blocklet/meta": "^1.16.3",
45
45
  "@emotion/react": "^11.10.6",
46
46
  "@emotion/styled": "^11.10.6",
47
- "@mui/icons-material": "^5.11.11",
48
- "@mui/material": "^5.11.15",
47
+ "@mui/icons-material": "^5.11.16",
48
+ "@mui/material": "^5.11.16",
49
49
  "lodash": "^4.17.21",
50
50
  "prop-types": "^15.8.1",
51
51
  "rehype-react": "^7.1.2",
@@ -59,5 +59,5 @@
59
59
  "@storybook/react": "^6.5.16",
60
60
  "babel-plugin-inline-react-svg": "^2.0.2"
61
61
  },
62
- "gitHead": "5930cbdd6b8aff12a4964c6e200ee1fea6c853f0"
62
+ "gitHead": "175de8438e3343bd9a2b4e6df34fd78e0bfbd601"
63
63
  }