@arcblock/ux 2.9.13 → 2.9.14
Sign up to get free protection for your applications and to get access to all the features.
- package/es/Address/did-address.js +18 -13
- package/es/Colors/themes/default.js +0 -1
- package/es/Colors/themes/temp.js +10 -1
- package/es/ContactForm/index.js +2 -2
- package/es/DID/index.js +0 -1
- package/es/Dialog/confirm.js +1 -99
- package/es/Dialog/dialog.js +4 -7
- package/es/Dialog/index.js +1 -1
- package/es/Dialog/use-confirm.js +105 -0
- package/es/Locale/util.js +10 -5
- package/es/NFTDisplay/index.js +0 -1
- package/es/Passport/index.js +2 -0
- package/es/Passport/passport.js +103 -0
- package/es/SessionUser/components/logged-in.js +1 -1
- package/es/SessionUser/components/user-info.js +1 -1
- package/es/SessionUser/index.js +2 -2
- package/es/Tabs/index.js +88 -2
- package/es/Util/passport.js +62 -0
- package/lib/ActionButton/index.js +6 -7
- package/lib/ActivityIndicator/index.js +4 -4
- package/lib/Address/compact-text.js +6 -6
- package/lib/Address/did-address.js +25 -21
- package/lib/Address/index.js +4 -4
- package/lib/Address/responsive-did-address.js +4 -4
- package/lib/Alert/index.js +5 -6
- package/lib/AnimationWaiter/index.js +4 -4
- package/lib/Async/index.js +6 -6
- package/lib/Avatar/did-motif.js +5 -6
- package/lib/Avatar/etherscan-blockies.js +2 -3
- package/lib/Avatar/index.js +4 -4
- package/lib/Badge/index.js +5 -6
- package/lib/Blocklet/blocklet.js +4 -4
- package/lib/Blocklet/index.js +3 -4
- package/lib/Blocklet/utils.js +3 -5
- package/lib/BlockletContext/index.js +1 -2
- package/lib/BlockletNFT/index.js +4 -4
- package/lib/Button/index.js +1 -2
- package/lib/Button/wrap.js +4 -4
- package/lib/ButtonGroup/index.js +1 -2
- package/lib/ClickToCopy/copy-button.js +4 -4
- package/lib/ClickToCopy/index.js +6 -6
- package/lib/CodeBlock/LightBox.js +1 -2
- package/lib/CodeBlock/index.js +4 -4
- package/lib/Colors/themes/default.js +1 -2
- package/lib/Colors/themes/temp.js +11 -3
- package/lib/ContactForm/index.js +2 -2
- package/lib/CookieConsent/index.js +6 -6
- package/lib/CountDown/index.js +4 -4
- package/lib/DID/index.js +7 -9
- package/lib/Datatable/CustomToolbar.js +2 -2
- package/lib/Datatable/index.js +49 -49
- package/lib/Datatable/utils.js +2 -3
- package/lib/Dialog/confirm.js +5 -113
- package/lib/Dialog/dialog.js +14 -18
- package/lib/Dialog/index.js +3 -4
- package/lib/Dialog/use-confirm.js +126 -0
- package/lib/Earth/index.js +7 -8
- package/lib/Empty/index.js +5 -6
- package/lib/Header/auto-hidden.js +5 -6
- package/lib/Header/header.js +5 -6
- package/lib/Header/responsive-header.js +5 -6
- package/lib/Icon/image.js +4 -4
- package/lib/Icon/index.js +6 -7
- package/lib/Img/index.js +5 -6
- package/lib/InfoRow/index.js +5 -6
- package/lib/Layout/dashboard/external-link.js +4 -4
- package/lib/Layout/dashboard/full-page.js +5 -6
- package/lib/Layout/dashboard/index.js +4 -4
- package/lib/Layout/dashboard/sidebar.js +5 -6
- package/lib/Layout/dashboard-legacy/header.js +4 -4
- package/lib/Layout/dashboard-legacy/index.js +4 -4
- package/lib/Layout/dashboard-legacy/sidebar.js +4 -4
- package/lib/Layout/index.js +4 -4
- package/lib/Locale/browser-lang.js +1 -2
- package/lib/Locale/context.js +6 -8
- package/lib/Locale/languages.js +7 -9
- package/lib/Locale/selector.js +4 -4
- package/lib/Locale/util.js +12 -11
- package/lib/Logo/index.js +4 -4
- package/lib/NFTDisplay/aspect-ratio-container.js +5 -6
- package/lib/NFTDisplay/broken.js +4 -4
- package/lib/NFTDisplay/index.js +5 -7
- package/lib/NFTDisplay/svg-embedder/img.js +5 -6
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +5 -6
- package/lib/NavMenu/nav-menu.js +5 -6
- package/lib/NavMenu/style.js +2 -4
- package/lib/PageScroller/index.js +6 -7
- package/lib/Passport/index.js +9 -0
- package/lib/Passport/passport.js +116 -0
- package/lib/PoweredByArcBlock/index.js +4 -4
- package/lib/PricingTable/PricingPlan.js +1 -2
- package/lib/PricingTable/index.js +1 -2
- package/lib/QRCode/index.js +5 -6
- package/lib/RelativeTime/index.js +4 -4
- package/lib/Result/common.js +4 -4
- package/lib/Result/index.js +7 -8
- package/lib/Result/result.js +5 -6
- package/lib/Result/translations.js +2 -3
- package/lib/Screenshot/BaseScreenshot/index.js +5 -6
- package/lib/Screenshot/BaseScreenshot/shells/Macbook.js +10 -15
- package/lib/Screenshot/BaseScreenshot/shells/Phone.js +10 -15
- package/lib/Screenshot/index.js +5 -6
- package/lib/SessionBlocklet/index.js +4 -4
- package/lib/SessionManager/index.js +1 -2
- package/lib/SessionUser/components/logged-in.js +5 -5
- package/lib/SessionUser/components/session-user-item.js +5 -6
- package/lib/SessionUser/components/session-user-switch.js +4 -4
- package/lib/SessionUser/components/user-info.js +1 -1
- package/lib/SessionUser/index.js +2 -2
- package/lib/SessionUser/libs/translation.js +2 -3
- package/lib/Spinner/index.js +13 -14
- package/lib/SplitButton/index.js +4 -4
- package/lib/Switch/index.js +5 -6
- package/lib/Tabs/index.js +98 -11
- package/lib/Tag/index.js +5 -6
- package/lib/TextCollapse/index.js +5 -6
- package/lib/Theme/index.js +6 -7
- package/lib/Theme/theme.js +6 -8
- package/lib/Toast/index.js +12 -13
- package/lib/Typography/index.js +4 -4
- package/lib/Util/constant.js +10 -20
- package/lib/Util/deprecate.js +4 -4
- package/lib/Util/index.js +2 -4
- package/lib/Util/passport.js +72 -0
- package/lib/Util/wallet.js +1 -2
- package/lib/Video/index.js +4 -4
- package/lib/Wallet/Action.js +4 -4
- package/lib/Wallet/Download.js +4 -4
- package/lib/WebWalletSWKeeper/index.js +5 -6
- package/lib/withTheme/index.js +5 -6
- package/lib/withTracker/error_boundary.js +2 -2
- package/lib/withTracker/index.js +8 -9
- package/package.json +9 -4
- package/src/Address/did-address.jsx +15 -12
- package/src/Colors/themes/temp.js +9 -0
- package/src/Dialog/confirm.jsx +94 -0
- package/src/Dialog/{dialog.js → dialog.jsx} +14 -7
- package/src/Dialog/index.js +1 -1
- package/src/Dialog/use-confirm.jsx +114 -0
- package/src/Locale/util.js +12 -5
- package/src/Passport/index.jsx +3 -0
- package/src/Passport/passport.jsx +99 -0
- package/src/SessionUser/components/logged-in.jsx +1 -1
- package/src/SessionUser/components/user-info.jsx +1 -1
- package/src/SessionUser/index.jsx +1 -1
- package/src/Tabs/index.jsx +124 -0
- package/src/Util/passport.js +75 -0
- package/src/Dialog/confirm.js +0 -201
- package/src/Tabs/index.js +0 -45
package/lib/Dialog/confirm.js
CHANGED
@@ -4,11 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = Confirm;
|
7
|
-
exports.useConfirm = useConfirm;
|
8
7
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
9
|
-
var _react = require("react");
|
10
|
-
var _ahooks = require("ahooks");
|
11
|
-
var _noop = _interopRequireDefault(require("lodash/noop"));
|
12
8
|
var _Button = _interopRequireDefault(require("../Button"));
|
13
9
|
var _dialog = _interopRequireDefault(require("./dialog"));
|
14
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
@@ -32,11 +28,11 @@ const _excluded = ["title", "children", "onConfirm", "onCancel", "showCancelButt
|
|
32
28
|
* @returns {import('react').ReactComponentElement}
|
33
29
|
*/
|
34
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
35
|
-
function ownKeys(
|
36
|
-
function _objectSpread(
|
31
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
32
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
37
33
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
38
|
-
function _toPropertyKey(
|
39
|
-
function _toPrimitive(
|
34
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
35
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
40
36
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
41
37
|
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; }
|
42
38
|
function Confirm(_ref) {
|
@@ -103,108 +99,4 @@ Confirm.defaultProps = {
|
|
103
99
|
text: 'Cancel'
|
104
100
|
},
|
105
101
|
PaperProps: {}
|
106
|
-
};
|
107
|
-
const ConfirmHolder = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
108
|
-
const state = (0, _ahooks.useReactive)({
|
109
|
-
show: false,
|
110
|
-
title: '',
|
111
|
-
content: '',
|
112
|
-
onConfirm: _noop.default,
|
113
|
-
onCancel: _noop.default,
|
114
|
-
loading: false,
|
115
|
-
confirmButtonText: 'Confirm',
|
116
|
-
cancelButtonText: 'Cancel'
|
117
|
-
});
|
118
|
-
const open = (0, _ahooks.useMemoizedFn)(function () {
|
119
|
-
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
120
|
-
state.show = true;
|
121
|
-
state.title = params.title;
|
122
|
-
state.content = params.content;
|
123
|
-
state.onConfirm = params.onConfirm || _noop.default;
|
124
|
-
state.onCancel = params.onCancel || _noop.default;
|
125
|
-
if (params.confirmButtonText) state.confirmButtonText = params.confirmButtonText;
|
126
|
-
if (params.cancelButtonText) state.cancelButtonText = params.cancelButtonText;
|
127
|
-
state.loading = false;
|
128
|
-
});
|
129
|
-
const reset = (0, _ahooks.useMemoizedFn)(() => {
|
130
|
-
state.title = '';
|
131
|
-
state.content = '';
|
132
|
-
state.onConfirm = _noop.default;
|
133
|
-
state.onCancel = _noop.default;
|
134
|
-
state.confirmButtonText = 'Confirm';
|
135
|
-
state.cancelButtonText = 'Cancel';
|
136
|
-
});
|
137
|
-
const close = (0, _ahooks.useMemoizedFn)(() => {
|
138
|
-
state.show = false;
|
139
|
-
setTimeout(() => {
|
140
|
-
reset();
|
141
|
-
}, 300);
|
142
|
-
});
|
143
|
-
const onCancel = (0, _ahooks.useMemoizedFn)(() => {
|
144
|
-
close();
|
145
|
-
state === null || state === void 0 ? void 0 : state.onCancel();
|
146
|
-
}, []);
|
147
|
-
const onConfirm = (0, _ahooks.useMemoizedFn)(async () => {
|
148
|
-
state.loading = true;
|
149
|
-
try {
|
150
|
-
await (state === null || state === void 0 ? void 0 : state.onConfirm(close));
|
151
|
-
} finally {
|
152
|
-
state.loading = false;
|
153
|
-
}
|
154
|
-
}, []);
|
155
|
-
(0, _react.useImperativeHandle)(ref, () => {
|
156
|
-
return {
|
157
|
-
open,
|
158
|
-
close
|
159
|
-
};
|
160
|
-
}, [open, close]);
|
161
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Confirm, {
|
162
|
-
open: state.show,
|
163
|
-
title: state.title,
|
164
|
-
onConfirm: onConfirm,
|
165
|
-
onCancel: onCancel,
|
166
|
-
confirmButton: {
|
167
|
-
text: state.confirmButtonText,
|
168
|
-
props: {
|
169
|
-
variant: 'contained',
|
170
|
-
color: 'primary',
|
171
|
-
loading: state.loading
|
172
|
-
}
|
173
|
-
},
|
174
|
-
cancelButton: {
|
175
|
-
text: state.cancelButtonText,
|
176
|
-
props: {
|
177
|
-
variant: 'outlined',
|
178
|
-
color: 'primary'
|
179
|
-
}
|
180
|
-
},
|
181
|
-
children: state.content
|
182
|
-
});
|
183
|
-
});
|
184
|
-
function useConfirm() {
|
185
|
-
const confirmRef = (0, _react.useRef)(null);
|
186
|
-
const open = (0, _ahooks.useMemoizedFn)(function () {
|
187
|
-
var _confirmRef$current;
|
188
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
189
|
-
args[_key] = arguments[_key];
|
190
|
-
}
|
191
|
-
(_confirmRef$current = confirmRef.current) === null || _confirmRef$current === void 0 ? void 0 : _confirmRef$current.open(...args);
|
192
|
-
});
|
193
|
-
const close = (0, _ahooks.useMemoizedFn)(function () {
|
194
|
-
var _confirmRef$current2;
|
195
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
196
|
-
args[_key2] = arguments[_key2];
|
197
|
-
}
|
198
|
-
(_confirmRef$current2 = confirmRef.current) === null || _confirmRef$current2 === void 0 ? void 0 : _confirmRef$current2.close(...args);
|
199
|
-
});
|
200
|
-
const confirmApi = {
|
201
|
-
open,
|
202
|
-
close
|
203
|
-
};
|
204
|
-
return {
|
205
|
-
confirmHolder: /*#__PURE__*/(0, _jsxRuntime.jsx)(ConfirmHolder, {
|
206
|
-
ref: confirmRef
|
207
|
-
}),
|
208
|
-
confirmApi
|
209
|
-
};
|
210
|
-
}
|
102
|
+
};
|
package/lib/Dialog/dialog.js
CHANGED
@@ -5,12 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
7
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
8
|
-
var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
|
9
|
-
var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
|
10
|
-
var _DialogActions = _interopRequireDefault(require("@mui/material/DialogActions"));
|
11
|
-
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
12
|
-
var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
|
13
8
|
var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
|
9
|
+
var _material = require("@mui/material");
|
14
10
|
var _Theme = require("../Theme");
|
15
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
16
12
|
var _templateObject, _templateObject2;
|
@@ -31,7 +27,7 @@ const _excluded = ["children", "title", "prepend", "toolbar", "actions", "showCl
|
|
31
27
|
@property {boolean} [showCloseButton=true] - Whether or not to show the close button.
|
32
28
|
@property {'left'|'center'|'right'} [actionsPosition='right'] - The position of the actions toolbar.
|
33
29
|
@property {PaperStyle} [PaperProps] - Props to be passed down to the dialog paper.
|
34
|
-
@property {(event: React.SyntheticEvent, reason: string) => void} [onClose] - Callback function fired when the dialog is closed.
|
30
|
+
@property {(event: React.SyntheticEvent, reason: string) => void} [onClose] - Callback function fired when the dialog is closed.
|
35
31
|
*/
|
36
32
|
/**
|
37
33
|
* Dialog
|
@@ -47,11 +43,11 @@ const _excluded = ["children", "title", "prepend", "toolbar", "actions", "showCl
|
|
47
43
|
*/
|
48
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
49
45
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
50
|
-
function ownKeys(
|
51
|
-
function _objectSpread(
|
46
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
47
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
52
48
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
53
|
-
function _toPropertyKey(
|
54
|
-
function _toPrimitive(
|
49
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
50
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
55
51
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
56
52
|
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; }
|
57
53
|
function Dialog(_ref) {
|
@@ -68,7 +64,7 @@ function Dialog(_ref) {
|
|
68
64
|
rest = _objectWithoutProperties(_ref, _excluded);
|
69
65
|
const theme = (0, _Theme.useTheme)();
|
70
66
|
// 不管是否是 mobile 设备, 只要屏宽 < sm, dialog 就处于 mobile 模式
|
71
|
-
const isMobile = (0,
|
67
|
+
const isMobile = (0, _material.useMediaQuery)(theme.breakpoints.down('md'));
|
72
68
|
const showHeader = title || showCloseButton || toolbar;
|
73
69
|
const handleOnClose = (e, reason) => {
|
74
70
|
// escapeKeyDown/backdropClick
|
@@ -84,7 +80,7 @@ function Dialog(_ref) {
|
|
84
80
|
minWidth: 300,
|
85
81
|
minHeight: 300
|
86
82
|
}, PaperProps.style);
|
87
|
-
const closeButton = /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
83
|
+
const closeButton = /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.IconButton, {
|
88
84
|
className: "ux-dialog_closeButton",
|
89
85
|
onClick: e => handleOnClose(e, 'closeButton'),
|
90
86
|
size: "large",
|
@@ -103,7 +99,8 @@ function Dialog(_ref) {
|
|
103
99
|
children: [showCloseButton && isMobile && closeButton, prepend && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
104
100
|
className: "ux-dialog_prepend",
|
105
101
|
children: prepend
|
106
|
-
}), title && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
102
|
+
}), title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
103
|
+
variant: "h6",
|
107
104
|
className: "ux-dialog_title",
|
108
105
|
children: title
|
109
106
|
})]
|
@@ -114,9 +111,9 @@ function Dialog(_ref) {
|
|
114
111
|
children: toolbar
|
115
112
|
}), showCloseButton && !isMobile && closeButton]
|
116
113
|
})]
|
117
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
114
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.DialogContent, {
|
118
115
|
children: children
|
119
|
-
}), actions && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
116
|
+
}), actions && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.DialogActions, {
|
120
117
|
className: "ux-dialog_actions--".concat(actionsPosition),
|
121
118
|
children: actions
|
122
119
|
})]
|
@@ -146,11 +143,10 @@ Dialog.defaultProps = {
|
|
146
143
|
/**
|
147
144
|
* @type {import('@emotion/styled').StyledComponent<import('@mui/material').DialogProps, {}, { ref?: React.Ref<any> | undefined;}>}
|
148
145
|
*/
|
149
|
-
const StyledMuiDialog = (0, _Theme.styled)(
|
146
|
+
const StyledMuiDialog = (0, _Theme.styled)(_material.Dialog)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .MuiDialog-paper {\n ", ";\n }\n .MuiDialogContent-root {\n padding: 16px 24px;\n }\n .MuiDialogActions-root {\n padding: 8px 24px 16px 24px;\n }\n .MuiDialogActions-root.ux-dialog_actions--left {\n justify-content: flex-start;\n }\n .MuiDialogActions-root.ux-dialog_actions--right {\n justify-content: flex-end;\n }\n .MuiDialogActions-root.ux-dialog_actions--center {\n justify-content: center;\n }\n"])), props => props.fullScreen ? 'border-radius: 0;' : '');
|
150
147
|
|
151
148
|
/** @type {import('@emotion/styled').StyledComponent<import('react').ComponentPropsWithoutRef<"div">, {}, { ref?: React.Ref<any> | undefined;}>} */
|
152
149
|
const Header = (0, _Theme.styled)('div', {
|
153
150
|
shouldForwardProp: prop => prop !== 'isMobile'
|
154
151
|
})(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 24px;\n .ux-dialog_left {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n min-width: 0;\n }\n .ux-dialog_right {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n }\n .ux-dialog_toolbar {\n display: flex;\n align-items: center;\n }\n .ux-dialog_title {\n margin: 0;\n font-size: 18px;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .ux-dialog_closeButton {\n /* \u4F7F closeButton \u4E0E content \u5DE6/\u53F3\u5BF9\u9F50 */\n ", "\n }\n"])), props => props.isMobile ? 'margin-left: -12px;' : 'margin-right: -12px;');
|
155
|
-
var _default = Dialog;
|
156
|
-
exports.default = _default;
|
152
|
+
var _default = exports.default = Dialog;
|
package/lib/Dialog/index.js
CHANGED
@@ -18,11 +18,10 @@ Object.defineProperty(exports, "default", {
|
|
18
18
|
Object.defineProperty(exports, "useConfirm", {
|
19
19
|
enumerable: true,
|
20
20
|
get: function get() {
|
21
|
-
return
|
21
|
+
return _useConfirm.default;
|
22
22
|
}
|
23
23
|
});
|
24
24
|
var _dialog = _interopRequireDefault(require("./dialog"));
|
25
|
-
var _confirm =
|
26
|
-
|
27
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
25
|
+
var _confirm = _interopRequireDefault(require("./confirm"));
|
26
|
+
var _useConfirm = _interopRequireDefault(require("./use-confirm"));
|
28
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
@@ -0,0 +1,126 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = useConfirm;
|
7
|
+
var _react = require("react");
|
8
|
+
var _ahooks = require("ahooks");
|
9
|
+
var _noop = _interopRequireDefault(require("lodash/noop"));
|
10
|
+
var _confirm = _interopRequireDefault(require("./confirm"));
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
15
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
17
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
18
|
+
const ConfirmHolder = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
19
|
+
// HACK: 这里默认值不使用 null,来避免开发环境中的字段必填警告
|
20
|
+
const [title, setTitle] = (0, _react.useState)('');
|
21
|
+
const [content, setContent] = (0, _react.useState)('');
|
22
|
+
const state = (0, _ahooks.useReactive)({
|
23
|
+
show: false,
|
24
|
+
onConfirm: _noop.default,
|
25
|
+
onCancel: _noop.default,
|
26
|
+
loading: false,
|
27
|
+
confirmButtonText: 'Confirm',
|
28
|
+
cancelButtonText: 'Cancel'
|
29
|
+
});
|
30
|
+
const open = (0, _ahooks.useMemoizedFn)(function () {
|
31
|
+
var _params$showCancelBut;
|
32
|
+
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
33
|
+
setTitle(params.title);
|
34
|
+
setContent(params.content);
|
35
|
+
state.onConfirm = params.onConfirm || _noop.default;
|
36
|
+
state.onCancel = params.onCancel || _noop.default;
|
37
|
+
state.showCancelButton = (_params$showCancelBut = params.showCancelButton) !== null && _params$showCancelBut !== void 0 ? _params$showCancelBut : true;
|
38
|
+
if (params.confirmButtonText) state.confirmButtonText = params.confirmButtonText;
|
39
|
+
if (params.cancelButtonText) state.cancelButtonText = params.cancelButtonText;
|
40
|
+
state.loading = false;
|
41
|
+
state.show = true;
|
42
|
+
});
|
43
|
+
const reset = (0, _ahooks.useMemoizedFn)(() => {
|
44
|
+
setTitle('');
|
45
|
+
setContent('');
|
46
|
+
state.onConfirm = _noop.default;
|
47
|
+
state.onCancel = _noop.default;
|
48
|
+
state.confirmButtonText = 'Confirm';
|
49
|
+
state.cancelButtonText = 'Cancel';
|
50
|
+
});
|
51
|
+
const close = (0, _ahooks.useMemoizedFn)(() => {
|
52
|
+
state.show = false;
|
53
|
+
setTimeout(() => {
|
54
|
+
reset();
|
55
|
+
}, 300);
|
56
|
+
});
|
57
|
+
const onCancel = (0, _ahooks.useMemoizedFn)(() => {
|
58
|
+
close();
|
59
|
+
state === null || state === void 0 ? void 0 : state.onCancel();
|
60
|
+
}, []);
|
61
|
+
const onConfirm = (0, _ahooks.useMemoizedFn)(async () => {
|
62
|
+
state.loading = true;
|
63
|
+
try {
|
64
|
+
await (state === null || state === void 0 ? void 0 : state.onConfirm(close));
|
65
|
+
} finally {
|
66
|
+
state.loading = false;
|
67
|
+
}
|
68
|
+
}, []);
|
69
|
+
(0, _react.useImperativeHandle)(ref, () => {
|
70
|
+
return {
|
71
|
+
open,
|
72
|
+
close
|
73
|
+
};
|
74
|
+
}, [open, close]);
|
75
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_confirm.default, _objectSpread(_objectSpread({}, props), {}, {
|
76
|
+
open: state.show,
|
77
|
+
title: title,
|
78
|
+
onConfirm: onConfirm,
|
79
|
+
onCancel: onCancel,
|
80
|
+
confirmButton: {
|
81
|
+
text: state.confirmButtonText,
|
82
|
+
props: {
|
83
|
+
variant: 'contained',
|
84
|
+
color: 'primary',
|
85
|
+
loading: state.loading
|
86
|
+
}
|
87
|
+
},
|
88
|
+
showCancelButton: state.showCancelButton,
|
89
|
+
cancelButton: {
|
90
|
+
text: state.cancelButtonText,
|
91
|
+
props: {
|
92
|
+
variant: 'outlined',
|
93
|
+
color: 'primary'
|
94
|
+
}
|
95
|
+
},
|
96
|
+
children: content
|
97
|
+
}));
|
98
|
+
});
|
99
|
+
function useConfirm() {
|
100
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
101
|
+
const confirmRef = (0, _react.useRef)(null);
|
102
|
+
const open = (0, _ahooks.useMemoizedFn)(function () {
|
103
|
+
var _confirmRef$current;
|
104
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
105
|
+
args[_key] = arguments[_key];
|
106
|
+
}
|
107
|
+
(_confirmRef$current = confirmRef.current) === null || _confirmRef$current === void 0 ? void 0 : _confirmRef$current.open(...args);
|
108
|
+
});
|
109
|
+
const close = (0, _ahooks.useMemoizedFn)(function () {
|
110
|
+
var _confirmRef$current2;
|
111
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
112
|
+
args[_key2] = arguments[_key2];
|
113
|
+
}
|
114
|
+
(_confirmRef$current2 = confirmRef.current) === null || _confirmRef$current2 === void 0 ? void 0 : _confirmRef$current2.close(...args);
|
115
|
+
});
|
116
|
+
const confirmApi = {
|
117
|
+
open,
|
118
|
+
close
|
119
|
+
};
|
120
|
+
return {
|
121
|
+
confirmHolder: /*#__PURE__*/(0, _jsxRuntime.jsx)(ConfirmHolder, _objectSpread(_objectSpread({}, props), {}, {
|
122
|
+
ref: confirmRef
|
123
|
+
})),
|
124
|
+
confirmApi
|
125
|
+
};
|
126
|
+
}
|
package/lib/Earth/index.js
CHANGED
@@ -16,15 +16,15 @@ var _deprecate = require("../Util/deprecate");
|
|
16
16
|
var _Theme = require("../Theme");
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
18
18
|
var _templateObject, _templateObject2;
|
19
|
-
function _getRequireWildcardCache(
|
20
|
-
function _interopRequireWildcard(
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
22
22
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
23
|
-
function ownKeys(
|
24
|
-
function _objectSpread(
|
23
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
24
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
25
25
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
26
|
-
function _toPropertyKey(
|
27
|
-
function _toPrimitive(
|
26
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
27
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /* eslint-disable consistent-return */
|
28
28
|
const geoJson = topojson.feature(_countries.default, _countries.default.objects.ne_110m_admin_0_countries);
|
29
29
|
const themes = {
|
30
30
|
light: {
|
@@ -410,9 +410,8 @@ Earth.defaultProps = {
|
|
410
410
|
activeMarkerId: undefined,
|
411
411
|
colors: {}
|
412
412
|
};
|
413
|
-
var _default = (0, _deprecate.withDeprecated)(Earth, {
|
413
|
+
var _default = exports.default = (0, _deprecate.withDeprecated)(Earth, {
|
414
414
|
name: 'Earth'
|
415
415
|
});
|
416
|
-
exports.default = _default;
|
417
416
|
const Container = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n position: relative;\n animation-name: zoomIn;\n animation-duration: 1s;\n animation-iteration-count: 1;\n animation-timing-function: ease;\n user-select: none;\n\n .defs {\n height: 0;\n width: 0;\n }\n\n .frame {\n fill: none;\n pointer-events: all;\n }\n\n .country {\n fill: ", ";\n stroke: ", ";\n stroke-width: 0.5px;\n transition: fill 300ms ease;\n\n &:hover {\n fill: ", ";\n }\n }\n\n .country--active {\n fill: ", ";\n }\n\n .globe {\n fill: ", ";\n stroke: rgba(255, 255, 255, 0.5);\n stroke-width: 0.25px;\n }\n\n .graticule {\n fill: none;\n stroke: ", ";\n }\n\n .star {\n fill: #fff;\n stroke: rgba(255, 255, 255, 0.5);\n stroke-width: 0.25px;\n }\n\n .marker {\n .marker__outer {\n fill-opacity: 0;\n animation: scaleIn 2s infinite ease-in-out;\n }\n }\n\n @keyframes zoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.1, 0.1, 0.1);\n }\n\n 50% {\n opacity: 1;\n }\n }\n\n @keyframes scaleIn {\n from {\n fill-opacity: 0.3;\n transform: scale3d(0.5, 0.5, 0.5);\n }\n to {\n fill-opacity: 0;\n transform: scale3d(1.5, 1.5, 1.5);\n }\n }\n"])), props => props.theme === 'light' ? '#f7f7f7' : '#222', props => props.width, props => props.height, props => props.colors.land, props => props.colors.border, props => props.colors.activeLand, props => props.colors.activeLand, props => props.colors.ocean, props => props.colors.graticule);
|
418
417
|
const Tooltip = (0, _Theme.styled)('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n width: auto;\n min-width: 90px;\n max-width: 320px;\n padding: 8px 12px;\n font-size: 14px;\n background-color: #4a4a4a;\n border-radius: 2px;\n animation-name: fadeIn;\n animation-duration: 250ms;\n animation-iteration-count: 1;\n animation-timing-function: ease;\n\n .title,\n .description {\n margin: 0;\n font-size: 16px;\n color: #fff;\n }\n\n .description {\n margin-top: ", "px;\n color: #fff;\n font-size: 12px;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n"])), props => props.theme.spacing(1));
|
package/lib/Empty/index.js
CHANGED
@@ -11,11 +11,11 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
const _excluded = ["color", "size", "children"];
|
12
12
|
var _templateObject;
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
|
-
function ownKeys(
|
15
|
-
function _objectSpread(
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
16
16
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
17
|
-
function _toPropertyKey(
|
18
|
-
function _toPrimitive(
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
18
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
19
19
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
20
20
|
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; }
|
21
21
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
@@ -66,5 +66,4 @@ Empty.defaultProps = {
|
|
66
66
|
size: 36,
|
67
67
|
children: null
|
68
68
|
};
|
69
|
-
var _default = Empty;
|
70
|
-
exports.default = _default;
|
69
|
+
var _default = exports.default = Empty;
|
@@ -15,11 +15,11 @@ const _excluded = ["height"];
|
|
15
15
|
*/
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
17
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
18
|
-
function ownKeys(
|
19
|
-
function _objectSpread(
|
18
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
20
20
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
21
|
-
function _toPropertyKey(
|
22
|
-
function _toPrimitive(
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
22
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
23
23
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
24
24
|
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; }
|
25
25
|
function AutoHidden(_ref) {
|
@@ -35,5 +35,4 @@ AutoHidden.propTypes = {
|
|
35
35
|
height: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired
|
36
36
|
};
|
37
37
|
const Root = (0, _Theme.styled)(_Box.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n &:before {\n content: '';\n display: inline-block;\n width: 1px;\n height: 100%;\n float: left;\n }\n > * {\n float: left;\n white-space: nowrap;\n }\n"])));
|
38
|
-
var _default = AutoHidden;
|
39
|
-
exports.default = _default;
|
38
|
+
var _default = exports.default = AutoHidden;
|
package/lib/Header/header.js
CHANGED
@@ -19,11 +19,11 @@ const _excluded = ["logo", "brand", "brandAddon", "description", "children", "ad
|
|
19
19
|
*/
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
21
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
22
|
-
function ownKeys(
|
23
|
-
function _objectSpread(
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
24
24
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
25
|
-
function _toPropertyKey(
|
26
|
-
function _toPrimitive(
|
25
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
26
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
27
27
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
28
28
|
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; }
|
29
29
|
function Header(_ref) {
|
@@ -138,5 +138,4 @@ Header.defaultProps = {
|
|
138
138
|
homeLink: '/'
|
139
139
|
};
|
140
140
|
const Root = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n z-index: ", ";\n font-size: 14px;\n background: ", ";\n .header-container {\n display: flex;\n align-items: center;\n height: 64px;\n }\n\n .header-brand-wrapper {\n flex-shrink: 2;\n > a {\n display: flex;\n align-items: center;\n height: 100%;\n line-height: 1;\n color: inherit;\n text-decoration: none;\n }\n }\n .header-brand-wrapper .header-logo {\n display: inline-flex;\n position: relative;\n height: 44px;\n margin-right: 16px;\n img,\n svg {\n width: auto;\n height: 100%;\n max-height: 100%;\n }\n }\n .header-brand {\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 44px;\n margin-right: 16px;\n line-height: 1;\n a {\n color: inherit;\n text-decoration: none;\n }\n .header-brand-title {\n display: flex;\n align-items: center;\n h2 {\n margin: 0;\n font-size: 16px;\n }\n }\n .header-brand-desc {\n margin-top: 4px;\n color: #9397a1;\n }\n }\n .header-brand-addon {\n margin-right: 16px;\n }\n .header-addons {\n display: flex;\n align-items: center;\n }\n ", " {\n .header-brand {\n margin-right: 12px;\n .header-brand-title {\n h2 {\n font-size: 14px;\n }\n }\n }\n .header-brand-addon {\n display: none;\n }\n }\n ", " {\n .header-menu {\n display: inline-block;\n }\n .header-logo {\n height: 32px;\n }\n .header-brand {\n .header-brand-title {\n h2 {\n font-size: 13px;\n }\n }\n .header-brand-desc {\n font-size: 12px;\n }\n }\n }\n"])), props => props.theme.zIndex.appBar, props => props.theme.palette.common.white, props => props.theme.breakpoints.down('lg'), props => props.theme.breakpoints.down('md'));
|
141
|
-
var _default = Header;
|
142
|
-
exports.default = _default;
|
141
|
+
var _default = exports.default = Header;
|
@@ -26,11 +26,11 @@ const _excluded = ["menu", "prepend", "children"];
|
|
26
26
|
*/
|
27
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
28
28
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
29
|
-
function ownKeys(
|
30
|
-
function _objectSpread(
|
29
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
30
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
31
31
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
32
|
-
function _toPropertyKey(
|
33
|
-
function _toPrimitive(
|
32
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
33
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
34
34
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
35
35
|
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; }
|
36
36
|
function ResponsiveHeader(_ref) {
|
@@ -100,5 +100,4 @@ ResponsiveHeader.propTypes = _objectSpread(_objectSpread({}, _header.default.Pro
|
|
100
100
|
ResponsiveHeader.defaultProps = _objectSpread({}, _header.default.defaultProps);
|
101
101
|
const Root = (0, _Theme.styled)(_header.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .header-menu {\n display: none;\n }\n ", " {\n .header-menu {\n display: flex;\n margin-right: 12px;\n }\n }\n"])), props => props.theme.breakpoints.down('md'));
|
102
102
|
const MenuPanel = (0, _Theme.styled)(_Container.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-top: 8px;\n padding-bottom: 16px;\n .navmenu {\n margin: 0 -16px;\n .navmenu-root > .navmenu-item,\n .navmenu-root > .navmenu-sub {\n border: 0;\n }\n }\n"])));
|
103
|
-
var _default = ResponsiveHeader;
|
104
|
-
exports.default = _default;
|
103
|
+
var _default = exports.default = ResponsiveHeader;
|
package/lib/Icon/image.js
CHANGED
@@ -12,11 +12,11 @@ var _templateObject;
|
|
12
12
|
const _excluded = ["name", "size", "alt", "color", "style", "prefix", "showBadge"];
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
15
|
-
function ownKeys(
|
16
|
-
function _objectSpread(
|
15
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
16
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
17
17
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
18
|
-
function _toPropertyKey(
|
19
|
-
function _toPrimitive(
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
19
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
20
20
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
21
21
|
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; }
|
22
22
|
function ImageIcon(_ref) {
|