@arcblock/ux 2.10.24 → 2.10.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel.config.es.js +1 -0
- package/lib/ActionButton/index.js +1 -1
- package/lib/ActivityIndicator/index.d.ts +34 -0
- package/lib/ActivityIndicator/index.js +1 -1
- package/lib/Address/compact-text.js +1 -1
- package/lib/Address/did-address.js +1 -1
- package/lib/Address/index.js +1 -1
- package/lib/Address/responsive-did-address.js +1 -1
- package/lib/Alert/index.d.ts +12 -0
- package/lib/Alert/index.js +1 -1
- package/lib/AnimationWaiter/index.js +1 -1
- package/lib/Async/index.js +1 -1
- package/lib/Avatar/did-motif.d.ts +29 -0
- package/lib/Avatar/did-motif.js +1 -1
- package/lib/Avatar/etherscan-blockies.d.ts +5 -0
- package/lib/Avatar/index.d.ts +64 -0
- package/lib/Avatar/index.js +1 -1
- package/lib/Badge/index.d.ts +12 -0
- package/lib/Badge/index.js +1 -1
- package/lib/Blocklet/blocklet.d.ts +84 -0
- package/lib/Blocklet/blocklet.js +1 -1
- package/lib/Blocklet/index.d.ts +5 -0
- package/lib/Blocklet/utils.d.ts +3 -0
- package/lib/BlockletContext/index.js +1 -1
- package/lib/BlockletNFT/index.js +1 -1
- package/lib/Button/index.d.ts +3 -0
- package/lib/Button/wrap.d.ts +27 -0
- package/lib/Button/wrap.js +4 -3
- package/lib/CardSelector/index.js +1 -1
- package/lib/Center/index.js +1 -1
- package/lib/ClickToCopy/copy-button.js +1 -1
- package/lib/ClickToCopy/index.js +1 -1
- package/lib/CodeBlock/index.js +1 -1
- package/lib/Colors/index.d.ts +2 -0
- package/lib/Colors/themes/default.d.ts +76 -0
- package/lib/Colors/themes/temp.d.ts +36 -0
- package/lib/ContactForm/index.js +1 -1
- package/lib/CookieConsent/index.js +1 -1
- package/lib/CountDown/index.js +1 -1
- package/lib/DID/index.js +1 -1
- package/lib/Datatable/CustomToolbar.d.ts +37 -0
- package/lib/Datatable/CustomToolbar.js +1 -1
- package/lib/Datatable/DatatableContext.d.ts +4 -0
- package/lib/Datatable/DatatableContext.js +1 -1
- package/lib/Datatable/TableSearch.d.ts +28 -0
- package/lib/Datatable/TableSearch.js +1 -1
- package/lib/Datatable/index.d.ts +53 -0
- package/lib/Datatable/index.js +11 -3
- package/lib/Datatable/utils.d.ts +5 -0
- package/lib/Dialog/confirm.d.ts +86 -0
- package/lib/Dialog/confirm.js +23 -13
- package/lib/Dialog/dialog.d.ts +115 -0
- package/lib/Dialog/dialog.js +12 -7
- package/lib/Dialog/index.d.ts +3 -0
- package/lib/Dialog/use-confirm.d.ts +8 -0
- package/lib/Dialog/use-confirm.js +1 -1
- package/lib/DidLogo/index.js +1 -1
- package/lib/Earth/index.js +1 -1
- package/lib/Empty/index.d.ts +39 -0
- package/lib/Empty/index.js +1 -1
- package/lib/ErrorBoundary/fallback.js +1 -1
- package/lib/Footer/index.js +1 -1
- package/lib/Header/auto-hidden.js +1 -1
- package/lib/Header/header.js +1 -1
- package/lib/Header/responsive-header.js +1 -1
- package/lib/Icon/image.js +1 -1
- package/lib/Icon/index.d.ts +2 -0
- package/lib/Icon/index.js +1 -1
- package/lib/Img/index.d.ts +77 -0
- package/lib/Img/index.js +2 -1
- package/lib/InfoRow/index.js +1 -1
- package/lib/Layout/dashboard/external-link.js +1 -1
- package/lib/Layout/dashboard/full-page.js +1 -1
- package/lib/Layout/dashboard/index.js +1 -1
- package/lib/Layout/dashboard/sidebar.js +1 -1
- package/lib/Layout/dashboard-legacy/header.js +1 -1
- package/lib/Layout/dashboard-legacy/index.js +1 -1
- package/lib/Layout/dashboard-legacy/sidebar.js +1 -1
- package/lib/Layout/index.js +1 -1
- package/lib/LoadingMask/index.js +1 -1
- package/lib/Locale/context.js +1 -1
- package/lib/Locale/selector.js +1 -1
- package/lib/Logo/index.d.ts +42 -0
- package/lib/Logo/index.js +1 -1
- package/lib/Metric/index.js +1 -1
- package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
- package/lib/NFTDisplay/broken.js +1 -1
- package/lib/NFTDisplay/index.js +1 -1
- package/lib/NFTDisplay/loading.js +1 -1
- package/lib/NFTDisplay/svg-embedder/img.js +1 -1
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
- package/lib/NavMenu/nav-menu.js +1 -1
- package/lib/PageScroller/index.js +1 -1
- package/lib/PageScroller/story/FullPage.js +1 -1
- package/lib/PageScroller/story/PageContain.js +1 -1
- package/lib/Passport/passport.js +1 -1
- package/lib/PoweredByArcBlock/index.js +1 -1
- package/lib/PricingTable/PricingPlan.js +1 -1
- package/lib/PricingTable/index.js +1 -1
- package/lib/QRCode/index.js +1 -1
- package/lib/RelativeTime/index.js +1 -1
- package/lib/Result/common.js +1 -1
- package/lib/Result/index.js +1 -1
- package/lib/Result/result.js +1 -1
- package/lib/Screenshot/BaseScreenshot/index.js +1 -1
- package/lib/Screenshot/index.js +1 -1
- package/lib/SessionBlocklet/index.js +1 -1
- package/lib/SessionUser/components/logged-in.js +1 -1
- package/lib/SessionUser/components/session-user-item.js +1 -1
- package/lib/SessionUser/components/session-user-switch.js +1 -1
- package/lib/SessionUser/components/un-login.js +1 -1
- package/lib/SessionUser/components/user-info.js +1 -1
- package/lib/SessionUser/index.js +1 -1
- package/lib/Spinner/index.js +1 -1
- package/lib/SplitButton/index.js +8 -8
- package/lib/Success/index.js +1 -1
- package/lib/Switch/index.d.ts +31 -0
- package/lib/Switch/index.js +1 -1
- package/lib/Tabs/index.js +1 -1
- package/lib/Tag/index.d.ts +14 -0
- package/lib/Tag/index.js +11 -7
- package/lib/TextCollapse/index.js +1 -1
- package/lib/Theme/index.d.ts +14 -0
- package/lib/Theme/index.js +9 -0
- package/lib/Theme/theme-provider.d.ts +25 -0
- package/lib/Theme/theme-provider.js +1 -1
- package/lib/Theme/theme.d.ts +17 -0
- package/lib/Theme/theme.js +21 -3
- package/lib/Toast/index.d.ts +11 -0
- package/lib/Toast/index.js +2 -1
- package/lib/Typography/index.js +1 -1
- package/lib/Util/constant.d.ts +33 -0
- package/lib/Util/deprecate.d.ts +5 -0
- package/lib/Util/deprecate.js +1 -1
- package/lib/Util/index.d.ts +81 -0
- package/lib/Video/index.js +1 -1
- package/lib/Wallet/Action.js +1 -1
- package/lib/Wallet/Download.js +1 -1
- package/lib/Wallet/Open.js +1 -1
- package/lib/WalletOSIcon/index.js +1 -1
- package/lib/WebWalletSWKeeper/index.js +1 -1
- package/lib/WechatPrompt/index.js +1 -1
- package/lib/withTheme/index.js +1 -1
- package/lib/withTracker/error_boundary.js +1 -1
- package/lib/withTracker/index.js +1 -1
- package/package.json +13 -7
- package/src/Button/wrap.js +3 -2
- package/src/Datatable/index.jsx +9 -2
- package/src/Dialog/confirm.jsx +22 -12
- package/src/Dialog/dialog.jsx +11 -6
- package/src/SplitButton/index.js +7 -7
- package/src/Tag/index.js +10 -6
- package/src/Theme/index.js +8 -0
- package/src/Theme/theme.js +20 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
/* eslint-disable jsx-a11y/control-has-associated-label */
|
|
2
3
|
import { useState } from 'react';
|
|
3
4
|
import Button from '../../Button';
|
|
@@ -8,7 +9,6 @@ import ThirdComponent from './ThirdComponent';
|
|
|
8
9
|
import FourthComponent from './FourthComponent';
|
|
9
10
|
import FifthComponent from './FifthComponent';
|
|
10
11
|
import './index.css';
|
|
11
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
export default function FullPage() {
|
|
13
13
|
const [current, setCurrent] = useState(0);
|
|
14
14
|
const pageNumbers = [];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
/* eslint-disable jsx-a11y/control-has-associated-label */
|
|
2
3
|
import { useState } from 'react';
|
|
3
4
|
import Button from '../../Button';
|
|
@@ -8,7 +9,6 @@ import ThirdComponent from './ThirdComponent';
|
|
|
8
9
|
import FourthComponent from './FourthComponent';
|
|
9
10
|
import FifthComponent from './FifthComponent';
|
|
10
11
|
import './index.css';
|
|
11
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
export default function FullPage() {
|
|
13
13
|
const [current, setCurrent] = useState(0);
|
|
14
14
|
const pageNumbers = [];
|
package/lib/Passport/passport.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import upperFirst from 'lodash/upperFirst';
|
|
3
4
|
import { Box } from '@mui/material';
|
|
4
5
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
5
6
|
import RevokeIcon from '@arcblock/icons/lib/RevokeIcon';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
export default function Passport({
|
|
8
8
|
passport,
|
|
9
9
|
user,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import { Link, Typography } from '@mui/material';
|
|
3
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
4
|
export default function PoweredByArcBlock({
|
|
5
5
|
linkProps,
|
|
6
6
|
...props
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import Card from '@mui/material/Card';
|
|
3
4
|
import Button from '@mui/material/Button';
|
|
4
5
|
import CardContent from '@mui/material/CardContent';
|
|
5
6
|
import Typography from '@mui/material/Typography';
|
|
6
7
|
import { styled } from '../Theme';
|
|
7
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
function PricingPlan({
|
|
9
9
|
plan
|
|
10
10
|
}) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import Grid from '@mui/material/Grid';
|
|
3
4
|
import PricingPlan from './PricingPlan';
|
|
4
5
|
import { styled } from '../Theme';
|
|
5
6
|
import { withDeprecated } from '../Util/deprecate';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
function PricingTable({
|
|
8
8
|
plans
|
|
9
9
|
}) {
|
package/lib/QRCode/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { useRef, useEffect, useMemo, useState } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import QRCodeStyling from '@solana/qr-code-styling';
|
|
4
5
|
import { Box } from '@mui/material';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
const defaults = {
|
|
7
7
|
margin: 0,
|
|
8
8
|
dotsOptions: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
3
4
|
import dayjs from 'dayjs';
|
|
@@ -8,7 +9,6 @@ import utc from 'dayjs/plugin/utc';
|
|
|
8
9
|
import timezone from 'dayjs/plugin/timezone';
|
|
9
10
|
import updateLocale from 'dayjs/plugin/updateLocale';
|
|
10
11
|
import { formatToDatetime, setDateTool } from '../Util';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
dayjs.extend(localizedFormat);
|
|
13
13
|
dayjs.extend(utc);
|
|
14
14
|
dayjs.extend(timezone);
|
package/lib/Result/common.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
/* eslint-disable react/prop-types */
|
|
2
3
|
/* eslint-disable no-param-reassign */
|
|
3
4
|
import InfoIcon from '@mui/icons-material/Info';
|
|
@@ -8,7 +9,6 @@ import { useLocaleContext } from '../Locale/context';
|
|
|
8
9
|
import { useTheme } from '../Theme';
|
|
9
10
|
|
|
10
11
|
// 优先使用显式指定的 locale, 再尝试使用 context 中的 locale, 最后使用默认 'en'
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
const useLocale = locale => {
|
|
13
13
|
locale = ['zh', 'en'].includes(locale) ? locale : '';
|
|
14
14
|
const {
|
package/lib/Result/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import Result from './result';
|
|
3
4
|
import * as common from './common';
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
const componentsKeyByStatus = Object.keys(common).reduce((acc, cur) => ({
|
|
6
6
|
...acc,
|
|
7
7
|
[common[cur].status || cur]: common[cur]
|
package/lib/Result/result.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import Box from '@mui/material/Box';
|
|
3
4
|
import { styled } from '../Theme';
|
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
function Result({
|
|
6
6
|
icon,
|
|
7
7
|
title,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { styled } from '@arcblock/ux/lib/Theme';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import phone from './shells/Phone';
|
|
4
5
|
import macbook from './shells/Macbook';
|
|
5
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
6
|
const map = {
|
|
7
7
|
phone,
|
|
8
8
|
macbook
|
package/lib/Screenshot/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { createElement, Children, cloneElement, useEffect, useRef, useState } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { mergeProps } from '../Util';
|
|
4
5
|
import { styled } from '../Theme';
|
|
5
6
|
import BaseScreenshot from './BaseScreenshot';
|
|
6
7
|
import './devices.css';
|
|
7
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
const types = {
|
|
9
9
|
'iphone-x': {
|
|
10
10
|
borderRadius: 32,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { useRef } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { Box, ClickAwayListener, Fade, IconButton, List, ListItem, ListItemButton, Paper, Popper, Typography } from '@mui/material';
|
|
@@ -10,7 +11,6 @@ import { temp as colors } from '../Colors';
|
|
|
10
11
|
import { AUTH_SERVICE_PREFIX, NAVIGATION_URL } from '../Util/constant';
|
|
11
12
|
import SessionPermission from '../SessionPermission';
|
|
12
13
|
import { getTranslation } from '../Util';
|
|
13
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
14
|
export default function SessionBlocklet({
|
|
15
15
|
session,
|
|
16
16
|
locale,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import { useRef } from 'react';
|
|
3
4
|
import { useMemoizedFn, useReactive } from 'ahooks';
|
|
@@ -15,7 +16,6 @@ import { DASHBOARD_URL, PROFILE_URL } from '../../Util/constant';
|
|
|
15
16
|
import SessionPermission from '../../SessionPermission';
|
|
16
17
|
import { translations } from '../libs/translation';
|
|
17
18
|
import { translate } from '../../Locale/util';
|
|
18
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
export default function LoggedIn({
|
|
20
20
|
session,
|
|
21
21
|
dark,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import { forwardRef } from 'react';
|
|
3
4
|
import { Box, IconButton, Tooltip, Typography } from '@mui/material';
|
|
@@ -8,7 +9,6 @@ import Avatar from '../../Avatar';
|
|
|
8
9
|
import DID from '../../DID';
|
|
9
10
|
import { temp as colors } from '../../Colors';
|
|
10
11
|
import { getSourceProvider } from '../libs/utils';
|
|
11
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
const SessionUserItem = /*#__PURE__*/forwardRef(({
|
|
13
13
|
sessionItem,
|
|
14
14
|
statusContent,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import { Box, ClickAwayListener, Divider, Fade, LinearProgress, MenuItem, MenuList, Paper, Popper } from '@mui/material';
|
|
3
4
|
import { useRef } from 'react';
|
|
@@ -12,7 +13,6 @@ import { temp as colors } from '../../Colors';
|
|
|
12
13
|
import { getVisitorId } from '../../Util';
|
|
13
14
|
import { translate } from '../../Locale/util';
|
|
14
15
|
import { translations } from '../libs/translation';
|
|
15
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
16
|
export default function SessionUserSwitch({
|
|
17
17
|
session,
|
|
18
18
|
onSwitch,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import { Box, CircularProgress, IconButton } from '@mui/material';
|
|
3
4
|
import { Icon } from '@iconify/react';
|
|
@@ -5,7 +6,6 @@ import PersonOutlineRoundedIcon from 'iconify-icons-material-symbols-400/person-
|
|
|
5
6
|
import { useRef } from 'react';
|
|
6
7
|
import { useMemoizedFn } from 'ahooks';
|
|
7
8
|
import noop from 'lodash/noop';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export default function UnLogin({
|
|
10
10
|
session,
|
|
11
11
|
onLogin,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import { Box, Chip, Typography } from '@mui/material';
|
|
3
4
|
import { Icon } from '@iconify/react';
|
|
@@ -12,7 +13,6 @@ import { temp as colors } from '../../Colors';
|
|
|
12
13
|
import { getWallet } from '../libs/utils';
|
|
13
14
|
import { translations } from '../libs/translation';
|
|
14
15
|
import { translate } from '../../Locale/util';
|
|
15
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
export default function UserInfo({
|
|
17
17
|
session,
|
|
18
18
|
onSwitchPassport,
|
package/lib/SessionUser/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import noop from 'lodash/noop';
|
|
3
4
|
import { useCreation } from 'ahooks';
|
|
4
5
|
import LoggedIn from './components/logged-in';
|
|
5
6
|
import UnLogin from './components/un-login';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export default function SessionUser({
|
|
8
8
|
session,
|
|
9
9
|
onBindWallet,
|
package/lib/Spinner/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
2
3
|
import { withDeprecated } from '../Util/deprecate';
|
|
3
4
|
|
|
@@ -9,7 +10,6 @@ import { withDeprecated } from '../Util/deprecate';
|
|
|
9
10
|
* - 之前 size prop 是 array 类型, 需要与 CircularProgress#size 兼容
|
|
10
11
|
* - color 默认使用 #4598fa, 如果调用方传入了 color prop 或 style#color, 则默认 color 被覆盖
|
|
11
12
|
*/
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
function Spinner(props) {
|
|
14
14
|
const _props = {
|
|
15
15
|
...props
|
package/lib/SplitButton/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { useState, useRef, isValidElement, createElement as _createElement } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import ExpandMore from '@mui/icons-material/ExpandMore';
|
|
@@ -12,13 +13,12 @@ import noop from 'lodash/noop';
|
|
|
12
13
|
import { styled } from '../Theme';
|
|
13
14
|
|
|
14
15
|
/**
|
|
16
|
+
* @typedef {import('@mui/material').MenuItem} MenuItem
|
|
17
|
+
* @typedef {import('@mui/material').MenuItemProps} MenuItemProps
|
|
15
18
|
* SplitButton 组件 Props
|
|
16
19
|
* @typedef {{
|
|
17
|
-
*
|
|
18
|
-
* color?: 'primary' | 'secondary' | 'inherit';
|
|
19
|
-
* menu?: Array<import('@mui/material').MenuItem> | import('@mui/material').MenuItem;
|
|
20
|
+
* menu?: React.ReactElement<MenuItemProps, MenuItem>[] | React.ReactElement<MenuItemProps, MenuItem>;
|
|
20
21
|
* children?: JSX.Element | (() => JSX.Element);
|
|
21
|
-
* variant?: 'outlined' | 'contained';
|
|
22
22
|
* onClick?: () => void;
|
|
23
23
|
* menuButtonProps?: import('@mui/material').ButtonProps;
|
|
24
24
|
* } & import('@mui/material').ButtonGroupProps } SplitButtonProps
|
|
@@ -30,7 +30,6 @@ import { styled } from '../Theme';
|
|
|
30
30
|
* @param {SplitButtonProps} props
|
|
31
31
|
* @return {JSX.Element}
|
|
32
32
|
*/
|
|
33
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
34
33
|
export default function SplitButton(props) {
|
|
35
34
|
const {
|
|
36
35
|
size,
|
|
@@ -101,8 +100,8 @@ export default function SplitButton(props) {
|
|
|
101
100
|
});
|
|
102
101
|
}
|
|
103
102
|
SplitButton.propTypes = {
|
|
104
|
-
size: PropTypes.
|
|
105
|
-
color: PropTypes.
|
|
103
|
+
size: PropTypes.string,
|
|
104
|
+
color: PropTypes.string,
|
|
106
105
|
menu: PropTypes.oneOfType([PropTypes.node, PropTypes.array]),
|
|
107
106
|
// 也可以是用于渲染主按钮的 function
|
|
108
107
|
children: PropTypes.node,
|
|
@@ -119,8 +118,9 @@ SplitButton.defaultProps = {
|
|
|
119
118
|
onClick: noop,
|
|
120
119
|
menuButtonProps: {}
|
|
121
120
|
};
|
|
121
|
+
|
|
122
122
|
/**
|
|
123
|
-
* @type {
|
|
123
|
+
* @type {MenuItem}
|
|
124
124
|
*/
|
|
125
125
|
SplitButton.Item = MenuItem;
|
|
126
126
|
const StyledButtonGroup = styled(ButtonGroup)`
|
package/lib/Success/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import { Box } from '@mui/material';
|
|
3
4
|
|
|
4
5
|
// FIXME: @zhanghan 目前无法适配各种 size,后续优化
|
|
5
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
6
|
export default function Success({
|
|
7
7
|
size,
|
|
8
8
|
backgroundColor,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export default Switch;
|
|
2
|
+
/**
|
|
3
|
+
* Switch 组件 Props
|
|
4
|
+
*/
|
|
5
|
+
export type SwitchProps = {
|
|
6
|
+
labelProps?: import("@mui/material").FormControlLabelProps;
|
|
7
|
+
} & import("@mui/material").SwitchProps;
|
|
8
|
+
/**
|
|
9
|
+
* Switch 组件 Props
|
|
10
|
+
* @typedef {{
|
|
11
|
+
* labelProps?: import('@mui/material').FormControlLabelProps;
|
|
12
|
+
* } & import('@mui/material').SwitchProps } SwitchProps
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* 抽取 blocklet server 中使用的 iOS 风格的 Switch,
|
|
16
|
+
* 该组件把 FormControlLabel 和 MuiSwitch 组合在一起,
|
|
17
|
+
* 兼容 mui Switch props, 使用 labelProps 控制 FormControlLabel
|
|
18
|
+
* @param {SwitchProps} props
|
|
19
|
+
* @returns {JSX.Element}
|
|
20
|
+
*/
|
|
21
|
+
declare function Switch({ labelProps, ...rest }: SwitchProps): JSX.Element;
|
|
22
|
+
declare namespace Switch {
|
|
23
|
+
namespace propTypes {
|
|
24
|
+
let labelProps: PropTypes.Requireable<object>;
|
|
25
|
+
}
|
|
26
|
+
namespace defaultProps {
|
|
27
|
+
let labelProps_1: any;
|
|
28
|
+
export { labelProps_1 as labelProps };
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
import PropTypes from 'prop-types';
|
package/lib/Switch/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
3
4
|
import MuiSwitch from '@mui/material/Switch';
|
|
4
5
|
import { styled } from '../Theme';
|
|
5
6
|
|
|
6
7
|
// 参考: https://mui.com/material-ui/react-switch/#customization
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const IOSSwitch = styled(props => /*#__PURE__*/_jsx(MuiSwitch, {
|
|
9
9
|
focusVisibleClassName: ".Mui-focusVisible",
|
|
10
10
|
disableRipple: true,
|
package/lib/Tabs/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import { Tabs as MuiTabs, Tab as MuiTab } from '@mui/material';
|
|
3
4
|
import { temp as colors } from '../Colors';
|
|
4
5
|
import { styled } from '../Theme';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
const PREFIX = 'index';
|
|
7
7
|
const classes = {
|
|
8
8
|
tabs: `${PREFIX}-tabs`,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default TagComponent;
|
|
2
|
+
export type TypographyProps = import("@mui/material/Typography").TypographyProps;
|
|
3
|
+
export type TagOwnProps = {
|
|
4
|
+
type?: "error" | "warning" | "success" | "primary" | "reverse";
|
|
5
|
+
content?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
children: import("react").ReactNode;
|
|
8
|
+
style?: import("react").CSSProperties;
|
|
9
|
+
};
|
|
10
|
+
export type TagProps = TypographyProps & TagOwnProps;
|
|
11
|
+
/**
|
|
12
|
+
* @type {React.ForwardRefExoticComponent<React.PropsWithoutRef<TagProps> & React.RefAttributes<HTMLSpanElement>>}
|
|
13
|
+
*/
|
|
14
|
+
declare const TagComponent: React.ForwardRefExoticComponent<React.PropsWithoutRef<TagProps> & React.RefAttributes<HTMLSpanElement>>;
|
package/lib/Tag/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import Typography from '@mui/material/Typography';
|
|
4
5
|
import { mergeProps } from '../Util';
|
|
5
6
|
import colors from '../Colors';
|
|
6
7
|
import { useTheme, styled } from '../Theme';
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const types = {
|
|
9
9
|
error: {
|
|
10
10
|
color: colors.common.white,
|
|
@@ -29,13 +29,15 @@ const types = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
+
* @typedef {import('@mui/material/Typography').TypographyProps} TypographyProps
|
|
32
33
|
* @typedef {{
|
|
33
|
-
* type
|
|
34
|
-
* content
|
|
35
|
-
* className
|
|
34
|
+
* type?: 'error' | 'warning' | 'success' | 'primary' | 'reverse',
|
|
35
|
+
* content?: string,
|
|
36
|
+
* className?: string;
|
|
36
37
|
* children: import('react').ReactNode,
|
|
37
|
-
* style
|
|
38
|
-
* }}
|
|
38
|
+
* style?: import('react').CSSProperties
|
|
39
|
+
* }} TagOwnProps
|
|
40
|
+
* @typedef { TypographyProps & TagOwnProps} TagProps
|
|
39
41
|
*/
|
|
40
42
|
|
|
41
43
|
/**
|
|
@@ -87,7 +89,9 @@ Tag.defaultProps = {
|
|
|
87
89
|
style: {}
|
|
88
90
|
};
|
|
89
91
|
|
|
90
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* @type {React.ForwardRefExoticComponent<React.PropsWithoutRef<TagProps> & React.RefAttributes<HTMLSpanElement>>}
|
|
94
|
+
*/
|
|
91
95
|
const TagComponent = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/_jsx(Tag, {
|
|
92
96
|
...props,
|
|
93
97
|
forwardedRef: ref
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import Typography from '@mui/material/Typography';
|
|
3
4
|
import { styled } from '../Theme';
|
|
4
5
|
import { withDeprecated } from '../Util/deprecate';
|
|
5
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
6
|
function TextCollapse({
|
|
7
7
|
children,
|
|
8
8
|
startChars,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./theme";
|
|
2
|
+
export { default as ThemeProvider } from "./theme-provider";
|
|
3
|
+
export { useTheme };
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {import('@mui/material/styles').Theme} Theme
|
|
6
|
+
* @typedef {import('@mui/material/styles').CreateMUIStyled<Theme>} Styled
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @type {Styled}
|
|
10
|
+
*/
|
|
11
|
+
export const styled: Styled;
|
|
12
|
+
export type Theme = import("@mui/material/styles").Theme;
|
|
13
|
+
export type Styled = import("@mui/material/styles").CreateMUIStyled<Theme>;
|
|
14
|
+
import { useTheme } from '@mui/material/styles';
|
package/lib/Theme/index.js
CHANGED
|
@@ -3,6 +3,15 @@ export * from './theme';
|
|
|
3
3
|
export { default as ThemeProvider } from './theme-provider';
|
|
4
4
|
export { useTheme };
|
|
5
5
|
const isTransientProp = prop => prop.startsWith('$');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {import('@mui/material/styles').Theme} Theme
|
|
9
|
+
* @typedef {import('@mui/material/styles').CreateMUIStyled<Theme>} Styled
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @type {Styled}
|
|
14
|
+
*/
|
|
6
15
|
export const styled = (component, options = {}) => {
|
|
7
16
|
return muiStyled(component, {
|
|
8
17
|
...options,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 默认的 theme provider, 可以为 webapp/blocklet 快捷的配置好 mui theme provider
|
|
3
|
+
*/
|
|
4
|
+
declare function ThemeProvider({ children, theme, injectFirst }: {
|
|
5
|
+
children: any;
|
|
6
|
+
theme: any;
|
|
7
|
+
injectFirst: any;
|
|
8
|
+
}): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
9
|
+
declare namespace ThemeProvider {
|
|
10
|
+
namespace propTypes {
|
|
11
|
+
let children: PropTypes.Requireable<any>;
|
|
12
|
+
let theme: PropTypes.Requireable<any>;
|
|
13
|
+
let injectFirst: PropTypes.Requireable<boolean>;
|
|
14
|
+
}
|
|
15
|
+
namespace defaultProps {
|
|
16
|
+
let children_1: any;
|
|
17
|
+
export { children_1 as children };
|
|
18
|
+
export { defaultTheme as theme };
|
|
19
|
+
let injectFirst_1: boolean;
|
|
20
|
+
export { injectFirst_1 as injectFirst };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export default ThemeProvider;
|
|
24
|
+
import PropTypes from 'prop-types';
|
|
25
|
+
declare const defaultTheme: import("@mui/material/styles").Theme;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';
|
|
3
4
|
import StyledEngineProvider from '@mui/material/StyledEngineProvider';
|
|
4
5
|
import CssBaseline from '@mui/material/CssBaseline';
|
|
5
6
|
import { createTheme } from './theme';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
const defaultTheme = createTheme();
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function create({ mode, pageWidth, palette, typography, overrides, ...rest }?: {
|
|
2
|
+
mode?: string;
|
|
3
|
+
pageWidth?: string;
|
|
4
|
+
palette?: import("@mui/material/styles").PaletteOptions;
|
|
5
|
+
typography?: TypographyVariantsOptions;
|
|
6
|
+
overrides?: Components<Omit<Theme, "components">>;
|
|
7
|
+
}): Theme;
|
|
8
|
+
export function createTheme({ mode, pageWidth, palette, typography, overrides, ...rest }?: {
|
|
9
|
+
mode?: string;
|
|
10
|
+
pageWidth?: string;
|
|
11
|
+
palette?: import("@mui/material/styles").PaletteOptions;
|
|
12
|
+
typography?: TypographyVariantsOptions;
|
|
13
|
+
overrides?: Components<Omit<Theme, "components">>;
|
|
14
|
+
}): Theme;
|
|
15
|
+
export type Theme = import("@mui/material/styles").Theme;
|
|
16
|
+
export type TypographyVariantsOptions = import("@mui/material/styles").TypographyVariantsOptions;
|
|
17
|
+
export type Components = import("@mui/material/styles").Components;
|
package/lib/Theme/theme.js
CHANGED
|
@@ -10,6 +10,13 @@ import '@fontsource/inter/latin-ext-400.css';
|
|
|
10
10
|
import '@fontsource/inter/latin-ext-500.css';
|
|
11
11
|
import '@fontsource/inter/latin-ext-700.css';
|
|
12
12
|
import colors from '../Colors';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {import('@mui/material/styles').Theme} Theme
|
|
16
|
+
* @typedef {import('@mui/material/styles').TypographyVariantsOptions} TypographyVariantsOptions
|
|
17
|
+
* @typedef {import('@mui/material/styles').Components} Components
|
|
18
|
+
*/
|
|
19
|
+
|
|
13
20
|
const muiDarkTheme = _createTheme({
|
|
14
21
|
palette: {
|
|
15
22
|
mode: 'dark'
|
|
@@ -17,13 +24,24 @@ const muiDarkTheme = _createTheme({
|
|
|
17
24
|
});
|
|
18
25
|
|
|
19
26
|
// https://material-ui.com/customization/default-theme/
|
|
20
|
-
|
|
27
|
+
/**
|
|
28
|
+
* @description
|
|
29
|
+
* @export
|
|
30
|
+
* @param {{
|
|
31
|
+
* mode?: string,
|
|
32
|
+
* pageWidth?: string,
|
|
33
|
+
* palette?: import('@mui/material/styles').PaletteOptions,
|
|
34
|
+
* typography?: TypographyVariantsOptions,
|
|
35
|
+
* overrides?: Components<Omit<Theme, 'components'>>,
|
|
36
|
+
* }} options
|
|
37
|
+
* @return {Theme}
|
|
38
|
+
*/
|
|
21
39
|
export const create = ({
|
|
22
40
|
mode = 'light',
|
|
23
41
|
pageWidth = 'md',
|
|
24
42
|
palette,
|
|
25
43
|
typography,
|
|
26
|
-
overrides,
|
|
44
|
+
overrides = {},
|
|
27
45
|
...rest
|
|
28
46
|
} = {}) => {
|
|
29
47
|
// palette 考虑 light & dark mode, dark mode 需要持续完善
|
|
@@ -62,7 +80,7 @@ export const create = ({
|
|
|
62
80
|
button: {
|
|
63
81
|
fontWeight: 700
|
|
64
82
|
}
|
|
65
|
-
}, typography
|
|
83
|
+
}, typography),
|
|
66
84
|
components: {
|
|
67
85
|
MuiButton: {
|
|
68
86
|
styleOverrides: {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let success: EnqueueSnackbarFunc;
|
|
3
|
+
let error: EnqueueSnackbarFunc;
|
|
4
|
+
let warning: EnqueueSnackbarFunc;
|
|
5
|
+
let info: EnqueueSnackbarFunc;
|
|
6
|
+
}
|
|
7
|
+
export default _default;
|
|
8
|
+
export type EnqueueSnackbarFunc = (message: import("notistack").SnackbarMessage, options?: import("notistack").OptionsObject, ...args: any[]) => import("notistack").SnackbarKey;
|
|
9
|
+
export function ToastProvider({ children }: {
|
|
10
|
+
children: any;
|
|
11
|
+
}): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
package/lib/Toast/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { createRef } from 'react';
|
|
2
3
|
import { SnackbarProvider, useSnackbar } from 'notistack';
|
|
3
4
|
import IconButton from '@mui/material/IconButton';
|
|
@@ -13,7 +14,7 @@ import noop from 'lodash/noop';
|
|
|
13
14
|
/**
|
|
14
15
|
* @type {import('notistack').ProviderContext['enqueueSnackbar']}
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
+
|
|
17
18
|
let success = noop;
|
|
18
19
|
let error = noop;
|
|
19
20
|
let warning = noop;
|
package/lib/Typography/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import PropTyps from 'prop-types';
|
|
2
3
|
import { Box, Typography as MuiTypography, Skeleton } from '@mui/material';
|
|
3
4
|
import { useCreation, useReactive, useSize } from 'ahooks';
|
|
4
5
|
import { useEffect, useRef } from 'react';
|
|
5
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
6
|
export default function Typography({
|
|
7
7
|
minFontSize,
|
|
8
8
|
fontSize,
|