@blocklet/launcher-layout 2.0.22 → 2.0.24
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.
- package/lib/index.js +15 -16
- package/package.json +3 -3
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", "contentMaxWidth"];
|
|
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 min-width: 900px;\n max-height: 880px;\n border-radius: 8px;\n background-color: #fff;\n"])));
|
|
33
|
+
const PcContent = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n min-width: 900px;\n max-width: ", ";\n max-height: 880px;\n border-radius: 8px;\n background-color: #fff;\n"])), props => props.contentMaxWidth);
|
|
34
34
|
function Layout(_ref) {
|
|
35
35
|
let {
|
|
36
36
|
blockletMeta,
|
|
@@ -43,7 +43,7 @@ function Layout(_ref) {
|
|
|
43
43
|
navLogo,
|
|
44
44
|
useOfSkeleton,
|
|
45
45
|
stepTip,
|
|
46
|
-
|
|
46
|
+
contentMaxWidth
|
|
47
47
|
} = _ref,
|
|
48
48
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
49
49
|
const isMobile = (0, _useMediaQuery.default)(theme => theme.breakpoints.down('md'));
|
|
@@ -64,12 +64,11 @@ function Layout(_ref) {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, _objectSpread(_objectSpread({
|
|
67
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, _objectSpread(_objectSpread({
|
|
68
|
+
contentMaxWidth: contentMaxWidth
|
|
69
|
+
}, rest), {}, {
|
|
68
70
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("header", {
|
|
69
71
|
className: "root-header",
|
|
70
|
-
style: isMobile ? {} : {
|
|
71
|
-
maxWidth
|
|
72
|
-
},
|
|
73
72
|
children: [isMobile && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
74
73
|
className: "left",
|
|
75
74
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_header.default, {
|
|
@@ -98,11 +97,11 @@ function Layout(_ref) {
|
|
|
98
97
|
children: headerEndAddons
|
|
99
98
|
})]
|
|
100
99
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
|
|
101
|
-
|
|
100
|
+
contentMaxWidth: contentMaxWidth,
|
|
101
|
+
style: !isMobile ? {
|
|
102
102
|
width: pcWidth,
|
|
103
|
-
height: pcHeight
|
|
104
|
-
|
|
105
|
-
},
|
|
103
|
+
height: pcHeight
|
|
104
|
+
} : {},
|
|
106
105
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Hidden.default, {
|
|
107
106
|
mdDown: true,
|
|
108
107
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_nav.default, {
|
|
@@ -131,9 +130,9 @@ Layout.propTypes = {
|
|
|
131
130
|
logoUrl: _propTypes.default.string,
|
|
132
131
|
locale: _propTypes.default.oneOf(['en', 'zh']),
|
|
133
132
|
headerEndAddons: _propTypes.default.any,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
pcWidth: _propTypes.default.any,
|
|
134
|
+
pcHeight: _propTypes.default.any,
|
|
135
|
+
contentMaxWidth: _propTypes.default.string,
|
|
137
136
|
navLogo: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.object]),
|
|
138
137
|
useOfSkeleton: _propTypes.default.bool,
|
|
139
138
|
stepTip: _propTypes.default.string
|
|
@@ -144,7 +143,7 @@ Layout.defaultProps = {
|
|
|
144
143
|
headerEndAddons: null,
|
|
145
144
|
pcWidth: '80%',
|
|
146
145
|
pcHeight: '80%',
|
|
147
|
-
|
|
146
|
+
contentMaxWidth: '1245px',
|
|
148
147
|
navLogo: '',
|
|
149
148
|
useOfSkeleton: true,
|
|
150
149
|
stepTip: ''
|
|
@@ -156,7 +155,7 @@ let injectStyle = '';
|
|
|
156
155
|
if (ua.includes('iphone os') && ua.includes('crios')) {
|
|
157
156
|
injectStyle = 'height: calc(100vh - 60px);';
|
|
158
157
|
}
|
|
159
|
-
const Root = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n letter-spacing: normal;\n ", "\n\n .circular {\n display: inline-block;\n position: relative;\n width: 15px;\n height: 12px;\n > * {\n position: absolute;\n left: 3px;\n top: 2px;\n width: 100%;\n height: 100%;\n }\n }\n\n .ellipsis-title {\n flex: 1;\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n ", " {\n left: 26px;\n width: calc(100% - 26px);\n }\n }\n\n ", " {\n background: #f6f8fa;\n }\n\n ", " {\n background: ", ";\n }\n\n .root-header {\n box-sizing: border-box;\n position: absolute;\n z-index: 200;\n top: 0;\n display: flex;\n width: 100%;\n height: 68px;\n align-items: center;\n\n ", " {\n padding: 24px;\n justify-content: flex-end;\n }\n\n ", " {\n height: 56px;\n padding: 14px 16px;\n justify-content: space-between;\n background: #f6f8fa;\n }\n\n .left {\n flex: 1;\n display: flex;\n align-items: center;\n }\n\n .right {\n display: flex;\n align-items: center;\n ", " {\n button,\n a {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n }\n }\n"])), injectStyle, props => props.theme.breakpoints.down('md'), props => props.theme.breakpoints.up('sm'), props => props.theme.breakpoints.down('md'), props => props.theme.palette.common.white, props => props.theme.breakpoints.up('sm'), props => props.theme.breakpoints.down('md'), props => props.theme.breakpoints.down('md'));
|
|
158
|
+
const Root = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n letter-spacing: normal;\n ", "\n\n .circular {\n display: inline-block;\n position: relative;\n width: 15px;\n height: 12px;\n > * {\n position: absolute;\n left: 3px;\n top: 2px;\n width: 100%;\n height: 100%;\n }\n }\n\n .ellipsis-title {\n flex: 1;\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n ", " {\n left: 26px;\n width: calc(100% - 26px);\n }\n }\n\n ", " {\n background: #f6f8fa;\n }\n\n ", " {\n background: ", ";\n }\n\n .root-header {\n box-sizing: border-box;\n position: absolute;\n z-index: 200;\n top: 0;\n display: flex;\n width: 100%;\n max-width: ", ";\n height: 68px;\n align-items: center;\n\n ", " {\n padding: 24px;\n justify-content: flex-end;\n }\n\n ", " {\n height: 56px;\n padding: 14px 16px;\n justify-content: space-between;\n background: #f6f8fa;\n }\n\n .left {\n flex: 1;\n display: flex;\n align-items: center;\n }\n\n .right {\n display: flex;\n align-items: center;\n ", " {\n button,\n a {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n }\n }\n"])), injectStyle, props => props.theme.breakpoints.down('md'), props => props.theme.breakpoints.up('sm'), props => props.theme.breakpoints.down('md'), props => props.theme.palette.common.white, props => props.contentMaxWidth, props => props.theme.breakpoints.up('sm'), props => props.theme.breakpoints.down('md'), props => props.theme.breakpoints.down('md'));
|
|
160
159
|
const LogoContainer = _styled.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: block;\n margin-top: 4px;\n"])));
|
|
161
160
|
var _default = Layout;
|
|
162
161
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/launcher-layout",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.24",
|
|
4
4
|
"description": "Common ux components of launcher",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@arcblock/did-connect": "2.5.18",
|
|
41
41
|
"@arcblock/icons": "^2.5.19",
|
|
42
42
|
"@arcblock/ux": "2.5.18",
|
|
43
|
-
"@blocklet/launcher-ux": "2.0.
|
|
43
|
+
"@blocklet/launcher-ux": "2.0.24",
|
|
44
44
|
"@blocklet/meta": "^1.16.3",
|
|
45
45
|
"@emotion/react": "^11.10.6",
|
|
46
46
|
"@emotion/styled": "^11.10.6",
|
|
@@ -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": "
|
|
62
|
+
"gitHead": "4b679fa0fda843078e2439cd185d6e52698320cd"
|
|
63
63
|
}
|