@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
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.Shell = Shell;
|
7
7
|
exports.width = exports.screenData = exports.ratio = exports.height = exports.default = void 0;
|
8
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
9
|
-
function ownKeys(
|
10
|
-
function _objectSpread(
|
9
|
+
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; }
|
10
|
+
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; }
|
11
11
|
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; }
|
12
|
-
function _toPropertyKey(
|
13
|
-
function _toPrimitive(
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
13
|
+
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); }
|
14
14
|
function Shell(_ref) {
|
15
15
|
let rest = Object.assign({}, _ref);
|
16
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", _objectSpread(_objectSpread({
|
@@ -35,17 +35,14 @@ function Shell(_ref) {
|
|
35
35
|
}
|
36
36
|
|
37
37
|
// 设备截图的实际尺寸
|
38
|
-
const width = 909;
|
39
|
-
exports.
|
40
|
-
const height = 517;
|
38
|
+
const width = exports.width = 909;
|
39
|
+
const height = exports.height = 517;
|
41
40
|
|
42
41
|
// 屏幕的比例
|
43
|
-
exports.
|
44
|
-
const ratio = 438 / 785;
|
42
|
+
const ratio = exports.ratio = 438 / 785;
|
45
43
|
|
46
44
|
// 屏幕相关数据
|
47
|
-
exports.
|
48
|
-
const screenData = {
|
45
|
+
const screenData = exports.screenData = {
|
49
46
|
// 屏幕坐标轴相对图片的百分比
|
50
47
|
x: 68 / 909,
|
51
48
|
y: 28 / 517,
|
@@ -55,12 +52,10 @@ const screenData = {
|
|
55
52
|
// 是否有圆角
|
56
53
|
radius: 'none'
|
57
54
|
};
|
58
|
-
exports.
|
59
|
-
var _default = {
|
55
|
+
var _default = exports.default = {
|
60
56
|
Shell,
|
61
57
|
ratio,
|
62
58
|
screenData,
|
63
59
|
width,
|
64
60
|
height
|
65
|
-
};
|
66
|
-
exports.default = _default;
|
61
|
+
};
|
@@ -6,15 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.Shell = Shell;
|
7
7
|
exports.width = exports.screenData = exports.ratio = exports.height = exports.default = void 0;
|
8
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
9
|
-
function ownKeys(
|
10
|
-
function _objectSpread(
|
9
|
+
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; }
|
10
|
+
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; }
|
11
11
|
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; }
|
12
|
-
function _toPropertyKey(
|
13
|
-
function _toPrimitive(
|
14
|
-
const width = 268;
|
15
|
-
exports.
|
16
|
-
const height = 554;
|
17
|
-
exports.height = height;
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
13
|
+
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); }
|
14
|
+
const width = exports.width = 268;
|
15
|
+
const height = exports.height = 554;
|
18
16
|
function Shell(_ref) {
|
19
17
|
let rest = Object.assign({}, _ref);
|
20
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", _objectSpread(_objectSpread({
|
@@ -32,21 +30,18 @@ function Shell(_ref) {
|
|
32
30
|
})
|
33
31
|
}));
|
34
32
|
}
|
35
|
-
const ratio = 798 / 386;
|
36
|
-
exports.
|
37
|
-
const screenData = {
|
33
|
+
const ratio = exports.ratio = 798 / 386;
|
34
|
+
const screenData = exports.screenData = {
|
38
35
|
x: 15 / 384,
|
39
36
|
y: 15 / 794,
|
40
37
|
width: 354 / 384,
|
41
38
|
height: 764 / 794,
|
42
39
|
radius: '10% / 5%'
|
43
40
|
};
|
44
|
-
exports.
|
45
|
-
var _default = {
|
41
|
+
var _default = exports.default = {
|
46
42
|
Shell,
|
47
43
|
ratio,
|
48
44
|
screenData,
|
49
45
|
width,
|
50
46
|
height
|
51
|
-
};
|
52
|
-
exports.default = _default;
|
47
|
+
};
|
package/lib/Screenshot/index.js
CHANGED
@@ -16,11 +16,11 @@ const _excluded = ["type", "children", "style", "className", "width", "height"],
|
|
16
16
|
_excluded2 = ["type", "src", "children", "style", "sx"];
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18
18
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
19
|
-
function ownKeys(
|
20
|
-
function _objectSpread(
|
19
|
+
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; }
|
20
|
+
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; }
|
21
21
|
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; }
|
22
|
-
function _toPropertyKey(
|
23
|
-
function _toPrimitive(
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
23
|
+
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); }
|
24
24
|
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; }
|
25
25
|
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; }
|
26
26
|
const types = {
|
@@ -285,5 +285,4 @@ Screenshot.defaultProps = {
|
|
285
285
|
style: {},
|
286
286
|
sx: {}
|
287
287
|
};
|
288
|
-
var _default = Screenshot;
|
289
|
-
exports.default = _default;
|
288
|
+
var _default = exports.default = Screenshot;
|
@@ -17,11 +17,11 @@ var _constant = require("../Util/constant");
|
|
17
17
|
var _SessionPermission = _interopRequireDefault(require("../SessionPermission"));
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
19
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
20
|
-
function ownKeys(
|
21
|
-
function _objectSpread(
|
20
|
+
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; }
|
21
|
+
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; }
|
22
22
|
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; }
|
23
|
-
function _toPropertyKey(
|
24
|
-
function _toPrimitive(
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
24
|
+
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); }
|
25
25
|
function SessionBlocklet(_ref) {
|
26
26
|
var _window;
|
27
27
|
let {
|
@@ -6,5 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.default = void 0;
|
7
7
|
var _SessionUser = _interopRequireDefault(require("../SessionUser"));
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9
|
-
var _default = _SessionUser.default;
|
10
|
-
exports.default = _default;
|
9
|
+
var _default = exports.default = _SessionUser.default;
|
@@ -26,11 +26,11 @@ const _excluded = ["icon", "title"];
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
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
|
-
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 LoggedIn(_ref) {
|
35
35
|
var _session$user, _session$user$avatar;
|
36
36
|
let {
|
@@ -238,6 +238,6 @@ function SessionMenuItem(_ref3) {
|
|
238
238
|
}));
|
239
239
|
}
|
240
240
|
SessionMenuItem.propTypes = {
|
241
|
-
icon: _propTypes.default.
|
241
|
+
icon: _propTypes.default.any.isRequired,
|
242
242
|
title: _propTypes.default.string.isRequired
|
243
243
|
};
|
@@ -23,11 +23,11 @@ var _utils = require("../libs/utils");
|
|
23
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
24
24
|
const _excluded = ["sessionItem", "statusContent", "active"];
|
25
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
26
|
-
function ownKeys(
|
27
|
-
function _objectSpread(
|
26
|
+
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; }
|
27
|
+
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; }
|
28
28
|
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; }
|
29
|
-
function _toPropertyKey(
|
30
|
-
function _toPrimitive(
|
29
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
30
|
+
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); }
|
31
31
|
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; }
|
32
32
|
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; }
|
33
33
|
const SessionUserItem = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
@@ -163,5 +163,4 @@ SessionUserItem.defaultProps = {
|
|
163
163
|
statusContent: null,
|
164
164
|
active: false
|
165
165
|
};
|
166
|
-
var _default = SessionUserItem;
|
167
|
-
exports.default = _default;
|
166
|
+
var _default = exports.default = SessionUserItem;
|
@@ -20,11 +20,11 @@ var _util = require("../../Locale/util");
|
|
20
20
|
var _translation = require("../libs/translation");
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
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); }
|
28
28
|
function SessionUserSwitch(_ref) {
|
29
29
|
let {
|
30
30
|
session,
|
package/lib/SessionUser/index.js
CHANGED
@@ -42,8 +42,8 @@ SessionUser.propTypes = {
|
|
42
42
|
user: _propTypes.default.shape({
|
43
43
|
did: _propTypes.default.string.isRequired,
|
44
44
|
fullName: _propTypes.default.string.isRequired,
|
45
|
-
|
46
|
-
|
45
|
+
avatar: _propTypes.default.string.isRequired,
|
46
|
+
email: _propTypes.default.string
|
47
47
|
})
|
48
48
|
}).isRequired,
|
49
49
|
onBindWallet: _propTypes.default.func,
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.translations = void 0;
|
7
7
|
/* eslint-disable import/prefer-default-export */
|
8
|
-
const translations = {
|
8
|
+
const translations = exports.translations = {
|
9
9
|
en: {
|
10
10
|
connectDIDWallet: 'Connect your DID Wallet for full functionality',
|
11
11
|
switch: 'Switch',
|
@@ -22,5 +22,4 @@ const translations = {
|
|
22
22
|
logout: '退出登录',
|
23
23
|
addAnotherAccount: '添加账户'
|
24
24
|
}
|
25
|
-
};
|
26
|
-
exports.translations = translations;
|
25
|
+
};
|
package/lib/Spinner/index.js
CHANGED
@@ -8,18 +8,18 @@ var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularPr
|
|
8
8
|
var _deprecate = require("../Util/deprecate");
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
function ownKeys(
|
12
|
-
function _objectSpread(
|
11
|
+
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; }
|
12
|
+
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; }
|
13
13
|
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; }
|
14
|
-
function _toPropertyKey(
|
15
|
-
function _toPrimitive(
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
15
|
+
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); } /**
|
16
|
+
* Spinner
|
17
|
+
*
|
18
|
+
* 之前的 Spinner 实现由内外 2 个环构成, 现在改为基于 @mui/material/CircularProgress 的实现
|
19
|
+
*
|
20
|
+
* - 之前 size prop 是 array 类型, 需要与 CircularProgress#size 兼容
|
21
|
+
* - color 默认使用 #4598fa, 如果调用方传入了 color prop 或 style#color, 则默认 color 被覆盖
|
22
|
+
*/
|
23
23
|
function Spinner(props) {
|
24
24
|
const _props = _objectSpread({}, props);
|
25
25
|
// 兼容之前的 size prop (设置外圈/内圈的尺寸)
|
@@ -28,8 +28,7 @@ function Spinner(props) {
|
|
28
28
|
}
|
29
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, _objectSpread({}, _props));
|
30
30
|
}
|
31
|
-
var _default = (0, _deprecate.withDeprecated)(Spinner, {
|
31
|
+
var _default = exports.default = (0, _deprecate.withDeprecated)(Spinner, {
|
32
32
|
name: 'Spinner',
|
33
33
|
alternative: '@mui/material/CircularProgress'
|
34
|
-
});
|
35
|
-
exports.default = _default;
|
34
|
+
});
|
package/lib/SplitButton/index.js
CHANGED
@@ -39,11 +39,11 @@ const _excluded = ["size", "color", "menu", "children", "variant", "onClick", "m
|
|
39
39
|
*/
|
40
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
41
41
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
42
|
-
function ownKeys(
|
43
|
-
function _objectSpread(
|
42
|
+
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; }
|
43
|
+
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; }
|
44
44
|
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; }
|
45
|
-
function _toPropertyKey(
|
46
|
-
function _toPrimitive(
|
45
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
46
|
+
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); }
|
47
47
|
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; }
|
48
48
|
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; }
|
49
49
|
function SplitButton(props) {
|
package/lib/Switch/index.js
CHANGED
@@ -13,11 +13,11 @@ const _excluded = ["labelProps"];
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
14
|
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; }
|
15
15
|
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; }
|
16
|
-
function ownKeys(
|
17
|
-
function _objectSpread(
|
16
|
+
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; }
|
17
|
+
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; }
|
18
18
|
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; }
|
19
|
-
function _toPropertyKey(
|
20
|
-
function _toPrimitive(
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
20
|
+
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); } // 参考: https://mui.com/material-ui/react-switch/#customization
|
21
21
|
const IOSSwitch = (0, _Theme.styled)(props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, _objectSpread({
|
22
22
|
focusVisibleClassName: ".Mui-focusVisible",
|
23
23
|
disableRipple: true
|
@@ -104,5 +104,4 @@ Switch.propTypes = {
|
|
104
104
|
Switch.defaultProps = {
|
105
105
|
labelProps: null
|
106
106
|
};
|
107
|
-
var _default = Switch;
|
108
|
-
exports.default = _default;
|
107
|
+
var _default = exports.default = Switch;
|
package/lib/Tabs/index.js
CHANGED
@@ -5,17 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.default = Tabs;
|
7
7
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
8
|
-
var
|
9
|
-
var
|
8
|
+
var _material = require("@mui/material");
|
9
|
+
var _Colors = require("../Colors");
|
10
10
|
var _Theme = require("../Theme");
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
12
|
-
const _excluded = ["tabs", "current", "onChange"]
|
12
|
+
const _excluded = ["tabs", "current", "onChange"],
|
13
|
+
_excluded2 = ["tabs", "current", "onChange"];
|
13
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
|
-
function ownKeys(
|
15
|
-
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; }
|
16
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; }
|
17
|
-
function _toPropertyKey(
|
18
|
-
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); }
|
19
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; }
|
20
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; }
|
21
22
|
const PREFIX = 'index';
|
@@ -23,7 +24,7 @@ const classes = {
|
|
23
24
|
tabs: "".concat(PREFIX, "-tabs"),
|
24
25
|
tab: "".concat(PREFIX, "-tab")
|
25
26
|
};
|
26
|
-
const StyledMuiTabs = (0, _Theme.styled)(
|
27
|
+
const StyledMuiTabs = (0, _Theme.styled)(_material.Tabs)(_ref => {
|
27
28
|
let {
|
28
29
|
theme
|
29
30
|
} = _ref;
|
@@ -37,22 +38,108 @@ const StyledMuiTabs = (0, _Theme.styled)(_Tabs.default)(_ref => {
|
|
37
38
|
}
|
38
39
|
};
|
39
40
|
});
|
40
|
-
function
|
41
|
+
function CardTabs(_ref2) {
|
41
42
|
let {
|
42
43
|
tabs,
|
43
44
|
current,
|
44
45
|
onChange: _onChange
|
45
46
|
} = _ref2,
|
46
47
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
48
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tabs, _objectSpread(_objectSpread({
|
49
|
+
scrollButtons: "auto",
|
50
|
+
value: current,
|
51
|
+
onChange: (_, newValue) => _onChange(newValue)
|
52
|
+
}, rest), {}, {
|
53
|
+
variant: "scrollable",
|
54
|
+
sx: _objectSpread({
|
55
|
+
minHeight: 'auto',
|
56
|
+
'.MuiTabs-scrollButtons.Mui-disabled': {
|
57
|
+
opacity: 0.3,
|
58
|
+
cursor: 'not-allowed',
|
59
|
+
pointerEvents: 'auto'
|
60
|
+
},
|
61
|
+
'.MuiTabs-scroller': {
|
62
|
+
borderRadius: '100vw'
|
63
|
+
},
|
64
|
+
'.MuiTabs-flexContainer': {
|
65
|
+
borderRadius: '100vw',
|
66
|
+
backgroundColor: _Colors.temp.backgroundsBgComponent,
|
67
|
+
padding: 0.5,
|
68
|
+
display: 'inline-flex',
|
69
|
+
columnGap: 0.25
|
70
|
+
},
|
71
|
+
'.MuiTab-root': {
|
72
|
+
borderRadius: '100vw',
|
73
|
+
border: '1px solid transparent',
|
74
|
+
minHeight: 'auto',
|
75
|
+
lineHeight: 1,
|
76
|
+
py: 1,
|
77
|
+
color: _Colors.temp.foregroundsFgSubtile,
|
78
|
+
fontSize: '13px',
|
79
|
+
fontWeight: 'normal',
|
80
|
+
textTransform: 'capitalize',
|
81
|
+
transition: 'background-color 0.2s ease',
|
82
|
+
'&.Mui-selected, &:hover': {
|
83
|
+
backgroundColor: 'white',
|
84
|
+
borderColor: _Colors.temp.lineBorderBase,
|
85
|
+
color: _Colors.temp.foregroundsFgBase
|
86
|
+
}
|
87
|
+
},
|
88
|
+
'.MuiTabs-indicator': {
|
89
|
+
display: 'none'
|
90
|
+
}
|
91
|
+
}, rest.sx),
|
92
|
+
children: tabs.map(x => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tab, {
|
93
|
+
className: classes.tab,
|
94
|
+
value: x.value,
|
95
|
+
label: x.label,
|
96
|
+
icon: x.icon || null
|
97
|
+
}, x.value))
|
98
|
+
}));
|
99
|
+
}
|
100
|
+
CardTabs.propTypes = {
|
101
|
+
tabs: _propTypes.default.array.isRequired,
|
102
|
+
current: _propTypes.default.string.isRequired,
|
103
|
+
onChange: _propTypes.default.func.isRequired
|
104
|
+
};
|
105
|
+
|
106
|
+
/**
|
107
|
+
* @typedef {import('@mui/material').TabsProps & {
|
108
|
+
* tabs: string[];
|
109
|
+
* onChange: (value) => {};
|
110
|
+
* variant: 'card' | 'fullWidth' | 'scrollable' | 'standard'
|
111
|
+
* }} TabsProps
|
112
|
+
*/
|
113
|
+
|
114
|
+
/**
|
115
|
+
* @description
|
116
|
+
* @param { TabsProps} props
|
117
|
+
* @return {import('react').ReactNode}
|
118
|
+
*/
|
119
|
+
|
120
|
+
function Tabs(_ref3) {
|
121
|
+
let {
|
122
|
+
tabs,
|
123
|
+
current,
|
124
|
+
onChange: _onChange2
|
125
|
+
} = _ref3,
|
126
|
+
rest = _objectWithoutProperties(_ref3, _excluded2);
|
127
|
+
if (rest.variant === 'card') {
|
128
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(CardTabs, {
|
129
|
+
tabs: tabs,
|
130
|
+
current: current,
|
131
|
+
onChange: _onChange2
|
132
|
+
});
|
133
|
+
}
|
47
134
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledMuiTabs, _objectSpread(_objectSpread({
|
48
135
|
scrollButtons: "auto",
|
49
136
|
variant: "scrollable",
|
50
137
|
value: current,
|
51
|
-
onChange: (_, newValue) =>
|
138
|
+
onChange: (_, newValue) => _onChange2(newValue),
|
52
139
|
indicatorColor: "primary"
|
53
140
|
}, rest), {}, {
|
54
141
|
className: [classes.tabs, rest.className || ''].join(' '),
|
55
|
-
children: tabs.map(x => /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
142
|
+
children: tabs.map(x => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tab, {
|
56
143
|
className: classes.tab,
|
57
144
|
value: x.value,
|
58
145
|
label: x.label,
|
package/lib/Tag/index.js
CHANGED
@@ -15,11 +15,11 @@ var _templateObject;
|
|
15
15
|
const _excluded = ["type", "content", "children", "style", "className", "forwardedRef"];
|
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
|
const types = {
|
@@ -108,6 +108,5 @@ Tag.defaultProps = {
|
|
108
108
|
const TagComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Tag, _objectSpread(_objectSpread({}, props), {}, {
|
109
109
|
forwardedRef: ref
|
110
110
|
})));
|
111
|
-
var _default = TagComponent;
|
112
|
-
exports.default = _default;
|
111
|
+
var _default = exports.default = TagComponent;
|
113
112
|
const Span = (0, _Theme.styled)(_Typography.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n && {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 10px;\n height: 20px;\n line-height: 20px;\n font-size: 12px;\n font-weight: 500;\n border-radius: 4px;\n }\n"])));
|