@xylabs/sdk-react 2.12.6 → 2.12.7
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/dist/cjs/components/Errors/ErrorsViewer.js +2 -2
- package/dist/cjs/components/Errors/ErrorsViewer.js.map +1 -1
- package/dist/cjs/components/QuickTipButton/QuickTipButton.d.ts +4 -2
- package/dist/cjs/components/QuickTipButton/QuickTipButton.js +3 -3
- package/dist/cjs/components/QuickTipButton/QuickTipButton.js.map +1 -1
- package/dist/cjs/components/QuickTipButton/index.d.ts +1 -2
- package/dist/cjs/components/QuickTipButton/index.js +2 -3
- package/dist/cjs/components/QuickTipButton/index.js.map +1 -1
- package/dist/docs.json +31326 -21769
- package/dist/esm/components/Errors/ErrorsViewer.js +2 -2
- package/dist/esm/components/Errors/ErrorsViewer.js.map +1 -1
- package/dist/esm/components/QuickTipButton/QuickTipButton.d.ts +4 -2
- package/dist/esm/components/QuickTipButton/QuickTipButton.js +3 -4
- package/dist/esm/components/QuickTipButton/QuickTipButton.js.map +1 -1
- package/dist/esm/components/QuickTipButton/index.d.ts +1 -2
- package/dist/esm/components/QuickTipButton/index.js +1 -2
- package/dist/esm/components/QuickTipButton/index.js.map +1 -1
- package/package.json +25 -26
- package/src/components/Errors/ErrorsViewer.tsx +2 -2
- package/src/components/QuickTipButton/QuickTipButton.stories.tsx +6 -1
- package/src/components/QuickTipButton/QuickTipButton.tsx +7 -5
- package/src/components/QuickTipButton/index.ts +1 -3
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import ReplayIcon from '@mui/icons-material/Replay';
|
|
2
3
|
import { IconButton } from '@mui/material';
|
|
3
|
-
import { AiOutlineReload } from 'react-icons/ai';
|
|
4
4
|
import { FlexGrowCol } from '../FlexBox';
|
|
5
5
|
import { ErrorViewer } from './ErrorViewer';
|
|
6
6
|
const ErrorsViewer = (props) => {
|
|
7
7
|
const { onRetry, errors, ...boxProps } = props;
|
|
8
8
|
return (_jsxs(FlexGrowCol, { padding: 1, ...boxProps, children: [errors?.map((error, index) => {
|
|
9
9
|
return _jsx(ErrorViewer, { error: error }, index);
|
|
10
|
-
}), onRetry ? (_jsx(IconButton, { onClick: onRetry, children: _jsx(
|
|
10
|
+
}), onRetry ? (_jsx(IconButton, { onClick: onRetry, children: _jsx(ReplayIcon, {}) })) : null] }));
|
|
11
11
|
};
|
|
12
12
|
export { ErrorsViewer };
|
|
13
13
|
//# sourceMappingURL=ErrorsViewer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorsViewer.js","sourceRoot":"","sources":["../../../../src/components/Errors/ErrorsViewer.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ErrorsViewer.js","sourceRoot":"","sources":["../../../../src/components/Errors/ErrorsViewer.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,4BAA4B,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG1C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,YAAY,GAAgC,CAAC,KAAK,EAAE,EAAE;IAC1D,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAA;IAC9C,OAAO,CACL,MAAC,WAAW,IAAC,OAAO,EAAE,CAAC,KAAM,QAAQ,aAClC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;gBAC5B,OAAO,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,IAAO,KAAK,CAAI,CAAA;YAClD,CAAC,CAAC,EACD,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,YAC1B,KAAC,UAAU,KAAG,GACH,CACd,CAAC,CAAC,CAAC,IAAI,IACI,CACf,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IconButtonProps } from '@mui/material';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
export interface QuickTipButtonProps extends IconButtonProps {
|
|
4
|
+
fontSize?: 'small' | 'medium' | 'large' | 'inherit';
|
|
5
|
+
}
|
|
6
|
+
export declare const QuickTipButton: React.FC<QuickTipButtonProps>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import HelpOutlineIcon from '@mui/icons-material/HelpOutline';
|
|
2
3
|
import { IconButton } from '@mui/material';
|
|
3
4
|
import { useState } from 'react';
|
|
4
|
-
import { AiOutlineQuestionCircle } from 'react-icons/ai';
|
|
5
5
|
import { MessageDialog } from '../dialogs';
|
|
6
|
-
const QuickTipButton = ({ title, children, ...props }) => {
|
|
6
|
+
export const QuickTipButton = ({ fontSize = 'inherit', title, children, ...props }) => {
|
|
7
7
|
const [messageOpen, setMessageOpen] = useState(false);
|
|
8
|
-
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { onClick: () => setMessageOpen(true), size: "small", ...props, children: _jsx(
|
|
8
|
+
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { onClick: () => setMessageOpen(true), size: "small", ...props, children: _jsx(HelpOutlineIcon, { fontSize: fontSize }) }), _jsx(MessageDialog, { onOk: () => setMessageOpen(false), onCancel: () => setMessageOpen(false), onClose: () => setMessageOpen(false), open: messageOpen, title: title ?? '', children: children })] }));
|
|
9
9
|
};
|
|
10
|
-
export { QuickTipButton };
|
|
11
10
|
//# sourceMappingURL=QuickTipButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickTipButton.js","sourceRoot":"","sources":["../../../../src/components/QuickTipButton/QuickTipButton.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"QuickTipButton.js","sourceRoot":"","sources":["../../../../src/components/QuickTipButton/QuickTipButton.tsx"],"names":[],"mappings":";AAAA,OAAO,eAAe,MAAM,iCAAiC,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAmB,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAM1C,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAAE,QAAQ,GAAG,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACnH,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAErD,OAAO,CACL,8BACE,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,EAAC,OAAO,KAAK,KAAK,YACrE,KAAC,eAAe,IAAC,QAAQ,EAAE,QAAQ,GAAI,GAC5B,EACb,KAAC,aAAa,IAAC,IAAI,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,YACjK,QAAQ,GACK,IACf,CACJ,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { QuickTipButton };
|
|
1
|
+
export * from './QuickTipButton';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/QuickTipButton/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/QuickTipButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
package/package.json
CHANGED
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@emotion/react": "^11.9.0",
|
|
13
13
|
"@emotion/styled": "^11.8.1",
|
|
14
|
-
"@ethersproject/abstract-signer": "^5.6.
|
|
15
|
-
"@ethersproject/providers": "^5.6.
|
|
14
|
+
"@ethersproject/abstract-signer": "^5.6.1",
|
|
15
|
+
"@ethersproject/providers": "^5.6.7",
|
|
16
16
|
"@metamask/providers": "^8.1.1",
|
|
17
|
-
"@mui/icons-material": "^5.
|
|
18
|
-
"@mui/material": "^5.
|
|
19
|
-
"@mui/styles": "^5.
|
|
17
|
+
"@mui/icons-material": "^5.8.0",
|
|
18
|
+
"@mui/material": "^5.8.1",
|
|
19
|
+
"@mui/styles": "^5.8.0",
|
|
20
20
|
"@xylabs/pixel": "^1.3.7",
|
|
21
21
|
"@xylabs/sdk-js": "^2.5.5",
|
|
22
22
|
"axios": "^0.27.2",
|
|
@@ -25,32 +25,31 @@
|
|
|
25
25
|
"numeral": "^2.0.6",
|
|
26
26
|
"query-string": "^7.1.1",
|
|
27
27
|
"react-helmet": "^6.1.0",
|
|
28
|
-
"react-icons": "^4.3.1",
|
|
29
28
|
"react-router-dom": "^6.3.0"
|
|
30
29
|
},
|
|
31
30
|
"description": "Common React library for all XY Labs projects that use React",
|
|
32
31
|
"devDependencies": {
|
|
33
|
-
"@babel/core": "^7.
|
|
34
|
-
"@babel/preset-env": "^7.
|
|
35
|
-
"@storybook/addon-actions": "^6.4
|
|
36
|
-
"@storybook/addon-docs": "^6.4
|
|
37
|
-
"@storybook/addon-essentials": "^6.4
|
|
38
|
-
"@storybook/addon-interactions": "^6.4
|
|
39
|
-
"@storybook/addon-links": "^6.4
|
|
40
|
-
"@storybook/addons": "^6.4
|
|
41
|
-
"@storybook/api": "^6.4
|
|
42
|
-
"@storybook/builder-webpack5": "^6.4
|
|
43
|
-
"@storybook/components": "^6.4
|
|
44
|
-
"@storybook/core-events": "^6.4
|
|
45
|
-
"@storybook/manager-webpack5": "^6.4
|
|
46
|
-
"@storybook/react": "^6.4
|
|
32
|
+
"@babel/core": "^7.18.0",
|
|
33
|
+
"@babel/preset-env": "^7.18.0",
|
|
34
|
+
"@storybook/addon-actions": "^6.5.4",
|
|
35
|
+
"@storybook/addon-docs": "^6.5.4",
|
|
36
|
+
"@storybook/addon-essentials": "^6.5.4",
|
|
37
|
+
"@storybook/addon-interactions": "^6.5.4",
|
|
38
|
+
"@storybook/addon-links": "^6.5.4",
|
|
39
|
+
"@storybook/addons": "^6.5.4",
|
|
40
|
+
"@storybook/api": "^6.5.4",
|
|
41
|
+
"@storybook/builder-webpack5": "^6.5.4",
|
|
42
|
+
"@storybook/components": "^6.5.4",
|
|
43
|
+
"@storybook/core-events": "^6.5.4",
|
|
44
|
+
"@storybook/manager-webpack5": "^6.5.4",
|
|
45
|
+
"@storybook/react": "^6.5.4",
|
|
47
46
|
"@storybook/testing-library": "^0.0.11",
|
|
48
|
-
"@storybook/theming": "^6.4
|
|
47
|
+
"@storybook/theming": "^6.5.4",
|
|
49
48
|
"@types/lodash": "^4.14.182",
|
|
50
49
|
"@types/md5": "^2.3.2",
|
|
51
50
|
"@types/numeral": "^2.0.2",
|
|
52
51
|
"@types/react": "^18.0.9",
|
|
53
|
-
"@types/react-dom": "^18.0.
|
|
52
|
+
"@types/react-dom": "^18.0.5",
|
|
54
53
|
"@types/react-helmet": "^6.1.5",
|
|
55
54
|
"@xylabs/eslint-config-react": "^2.1.5",
|
|
56
55
|
"@xylabs/rollup-config": "^1.1.17",
|
|
@@ -58,13 +57,13 @@
|
|
|
58
57
|
"@xylabs/tsconfig": "^1.0.13",
|
|
59
58
|
"copyfiles": "^2.4.1",
|
|
60
59
|
"depcheck": "^1.4.3",
|
|
61
|
-
"eslint": "^8.
|
|
60
|
+
"eslint": "^8.16.0",
|
|
62
61
|
"react": "^18.1.0",
|
|
63
62
|
"react-dom": "^18.1.0",
|
|
64
63
|
"rimraf": "^3.0.2",
|
|
65
|
-
"rollup": "^2.
|
|
64
|
+
"rollup": "^2.74.1",
|
|
66
65
|
"storybook-dark-mode": "^1.1.0",
|
|
67
|
-
"ts-node": "^10.
|
|
66
|
+
"ts-node": "^10.8.0",
|
|
68
67
|
"typedoc": "^0.22.15",
|
|
69
68
|
"typescript": "^4.6.4",
|
|
70
69
|
"webpack": "^5.72.1"
|
|
@@ -127,6 +126,6 @@
|
|
|
127
126
|
},
|
|
128
127
|
"sideEffects": false,
|
|
129
128
|
"types": "dist/esm/index.d.ts",
|
|
130
|
-
"version": "2.12.
|
|
129
|
+
"version": "2.12.7",
|
|
131
130
|
"packageManager": "yarn@3.1.1"
|
|
132
131
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import ReplayIcon from '@mui/icons-material/Replay'
|
|
1
2
|
import { IconButton } from '@mui/material'
|
|
2
3
|
import React from 'react'
|
|
3
|
-
import { AiOutlineReload } from 'react-icons/ai'
|
|
4
4
|
|
|
5
5
|
import { FlexGrowCol } from '../FlexBox'
|
|
6
6
|
import { ErrorsViewerProps } from './ErrorsViewerProps'
|
|
@@ -15,7 +15,7 @@ const ErrorsViewer: React.FC<ErrorsViewerProps> = (props) => {
|
|
|
15
15
|
})}
|
|
16
16
|
{onRetry ? (
|
|
17
17
|
<IconButton onClick={onRetry}>
|
|
18
|
-
<
|
|
18
|
+
<ReplayIcon />
|
|
19
19
|
</IconButton>
|
|
20
20
|
) : null}
|
|
21
21
|
</FlexGrowCol>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Typography } from '@mui/material'
|
|
2
2
|
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
3
3
|
|
|
4
|
+
import { FlexRow } from '../FlexBox'
|
|
4
5
|
import { QuickTipButton } from './QuickTipButton'
|
|
5
6
|
|
|
6
7
|
const StorybookEntry = {
|
|
@@ -14,7 +15,11 @@ const StorybookEntry = {
|
|
|
14
15
|
title: 'Components/QuickTipButton',
|
|
15
16
|
} as ComponentMeta<typeof QuickTipButton>
|
|
16
17
|
|
|
17
|
-
const Template: ComponentStory<typeof QuickTipButton> = (args) =>
|
|
18
|
+
const Template: ComponentStory<typeof QuickTipButton> = (args) => (
|
|
19
|
+
<FlexRow>
|
|
20
|
+
<QuickTipButton {...args}></QuickTipButton>
|
|
21
|
+
</FlexRow>
|
|
22
|
+
)
|
|
18
23
|
|
|
19
24
|
const Default = Template.bind({})
|
|
20
25
|
Default.args = {
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
import HelpOutlineIcon from '@mui/icons-material/HelpOutline'
|
|
1
2
|
import { IconButton, IconButtonProps } from '@mui/material'
|
|
2
3
|
import { useState } from 'react'
|
|
3
|
-
import { AiOutlineQuestionCircle } from 'react-icons/ai'
|
|
4
4
|
|
|
5
5
|
import { MessageDialog } from '../dialogs'
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
export interface QuickTipButtonProps extends IconButtonProps {
|
|
8
|
+
fontSize?: 'small' | 'medium' | 'large' | 'inherit'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const QuickTipButton: React.FC<QuickTipButtonProps> = ({ fontSize = 'inherit', title, children, ...props }) => {
|
|
8
12
|
const [messageOpen, setMessageOpen] = useState(false)
|
|
9
13
|
|
|
10
14
|
return (
|
|
11
15
|
<>
|
|
12
16
|
<IconButton onClick={() => setMessageOpen(true)} size="small" {...props}>
|
|
13
|
-
<
|
|
17
|
+
<HelpOutlineIcon fontSize={fontSize} />
|
|
14
18
|
</IconButton>
|
|
15
19
|
<MessageDialog onOk={() => setMessageOpen(false)} onCancel={() => setMessageOpen(false)} onClose={() => setMessageOpen(false)} open={messageOpen} title={title ?? ''}>
|
|
16
20
|
{children}
|
|
@@ -18,5 +22,3 @@ const QuickTipButton: React.FC<IconButtonProps> = ({ title, children, ...props }
|
|
|
18
22
|
</>
|
|
19
23
|
)
|
|
20
24
|
}
|
|
21
|
-
|
|
22
|
-
export { QuickTipButton }
|