@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.
@@ -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(AiOutlineReload, {}) })) : null] }));
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,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,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,eAAe,KAAG,GACR,CACd,CAAC,CAAC,CAAC,IAAI,IACI,CACf,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
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
- declare const QuickTipButton: React.FC<IconButtonProps>;
4
- export { QuickTipButton };
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(AiOutlineQuestionCircle, { size: 16 }) }), _jsx(MessageDialog, { onOk: () => setMessageOpen(false), onCancel: () => setMessageOpen(false), onClose: () => setMessageOpen(false), open: messageOpen, title: title ?? '', children: children })] }));
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,EAAE,UAAU,EAAmB,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAg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,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
- import { QuickTipButton } from './QuickTipButton';
2
- export { QuickTipButton };
1
+ export * from './QuickTipButton';
@@ -1,3 +1,2 @@
1
- import { QuickTipButton } from './QuickTipButton';
2
- export { QuickTipButton };
1
+ export * from './QuickTipButton';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/QuickTipButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,EAAE,cAAc,EAAE,CAAA"}
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.0",
15
- "@ethersproject/providers": "^5.6.5",
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.6.2",
18
- "@mui/material": "^5.7.0",
19
- "@mui/styles": "^5.7.0",
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.17.10",
34
- "@babel/preset-env": "^7.17.10",
35
- "@storybook/addon-actions": "^6.4.22",
36
- "@storybook/addon-docs": "^6.4.22",
37
- "@storybook/addon-essentials": "^6.4.22",
38
- "@storybook/addon-interactions": "^6.4.22",
39
- "@storybook/addon-links": "^6.4.22",
40
- "@storybook/addons": "^6.4.22",
41
- "@storybook/api": "^6.4.22",
42
- "@storybook/builder-webpack5": "^6.4.22",
43
- "@storybook/components": "^6.4.22",
44
- "@storybook/core-events": "^6.4.22",
45
- "@storybook/manager-webpack5": "^6.4.22",
46
- "@storybook/react": "^6.4.22",
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.22",
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.4",
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.15.0",
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.72.1",
64
+ "rollup": "^2.74.1",
66
65
  "storybook-dark-mode": "^1.1.0",
67
- "ts-node": "^10.7.0",
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.6",
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
- <AiOutlineReload />
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) => <QuickTipButton {...args}></QuickTipButton>
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
- const QuickTipButton: React.FC<IconButtonProps> = ({ title, children, ...props }) => {
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
- <AiOutlineQuestionCircle size={16} />
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 }
@@ -1,3 +1 @@
1
- import { QuickTipButton } from './QuickTipButton'
2
-
3
- export { QuickTipButton }
1
+ export * from './QuickTipButton'