@xyo-network/react-shared 2.27.13 → 2.27.14

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.
@@ -5,6 +5,7 @@ export interface TokenSummaryProps extends FlexBoxProps {
5
5
  icon?: string;
6
6
  symbol?: string;
7
7
  imgBgProps?: PaperProps;
8
+ imageMode?: 'circle';
8
9
  }
9
10
  export declare const TokenSummary: React.FC<TokenSummaryProps>;
10
11
  //# sourceMappingURL=TokenSummary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TokenSummary.d.ts","sourceRoot":"","sources":["../../../../src/components/TokenSummary/TokenSummary.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAS,UAAU,EAAc,MAAM,eAAe,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAoB,MAAM,uBAAuB,CAAA;AAEtE,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,UAAU,CAAA;CACxB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAcpD,CAAA"}
1
+ {"version":3,"file":"TokenSummary.d.ts","sourceRoot":"","sources":["../../../../src/components/TokenSummary/TokenSummary.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAS,UAAU,EAAc,MAAM,eAAe,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAoB,MAAM,uBAAuB,CAAA;AAEtE,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,SAAS,CAAC,EAAE,QAAQ,CAAA;CACrB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqBpD,CAAA"}
@@ -1,7 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Paper, Typography } from '@mui/material';
3
3
  import { FlexCol, FlexRow } from '@xylabs/react-flexbox';
4
- export const TokenSummary = ({ imgBgProps, icon, symbol, children, ...props }) => {
5
- return (_jsxs(_Fragment, { children: [_jsxs(FlexRow, { className: "TokenSummary-root", paddingBottom: 3, width: "100%", justifyContent: "flex-start", ...props, children: [_jsx(Paper, { component: FlexCol, padding: 1, className: "token-logo-bg", height: "40px", width: "40px", sx: { borderRadius: '50%' }, ...imgBgProps, children: _jsx("img", { src: icon, height: "25px" }) }), _jsx(Typography, { variant: "h6", fontWeight: 300, textTransform: "uppercase", paddingLeft: 1, children: symbol })] }), children] }));
4
+ export const TokenSummary = ({ imageMode = 'circle', imgBgProps = {}, icon, symbol, children, ...props }) => {
5
+ const paperProps = {
6
+ ...imgBgProps,
7
+ sx: {
8
+ ...imgBgProps.sx,
9
+ borderRadius: imageMode === 'circle' ? '50%' : 'inherit',
10
+ },
11
+ };
12
+ return (_jsxs(_Fragment, { children: [_jsxs(FlexRow, { className: "TokenSummary-root", paddingBottom: 3, width: "100%", justifyContent: "flex-start", ...props, children: [_jsx(Paper, { component: FlexCol, padding: 1, className: "token-logo-bg", height: "40px", width: "40px", ...paperProps, children: _jsx("img", { src: icon, height: "25px" }) }), _jsx(Typography, { variant: "h6", fontWeight: 300, textTransform: "uppercase", paddingLeft: 1, children: symbol })] }), children] }));
6
13
  };
7
14
  //# sourceMappingURL=TokenSummary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TokenSummary.js","sourceRoot":"","sources":["../../../../src/components/TokenSummary/TokenSummary.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAc,UAAU,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAO,EAAgB,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAQtE,MAAM,CAAC,MAAM,YAAY,GAAgC,CAA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SAAS;SACzD;KACF,CAAA;IACD,OAAO,CACL,8BACE,MAAC,OAAO,IAAC,SAAS,EAAC,mBAAmB,EAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAC,MAAM,EAAC,cAAc,EAAC,YAAY,KAAK,KAAK,aACzG,KAAC,KAAK,IAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAC,eAAe,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,KAAK,UAAU,YACxG,cAAK,GAAG,EAAE,IAAI,EAAE,MAAM,EAAC,MAAM,GAAG,GAC1B,EACR,KAAC,UAAU,IAAC,OAAO,EAAC,IAAI,EAAC,UAAU,EAAE,GAAG,EAAE,aAAa,EAAC,WAAW,EAAC,WAAW,EAAE,CAAC,YAC/E,MAAM,GACI,IACL,EACT,QAAQ,IACR,CACJ,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import '@mui/material/Paper/';
2
+ declare module '@mui/material/Paper/' {
3
+ interface PaperPropsVariantOverrides {
4
+ tokenBar: true;
5
+ }
6
+ }
7
+ //# sourceMappingURL=variantOverrides.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variantOverrides.d.ts","sourceRoot":"","sources":["../../../../src/components/TokenSummary/variantOverrides.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAE7B,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,0BAA0B;QAClC,QAAQ,EAAE,IAAI,CAAA;KACf;CACF"}
@@ -0,0 +1,2 @@
1
+ import '@mui/material/Paper/';
2
+ //# sourceMappingURL=variantOverrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variantOverrides.js","sourceRoot":"","sources":["../../../../src/components/TokenSummary/variantOverrides.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA"}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ContextExState } from './State';
3
2
  export declare const createContextEx: <T>() => import("react").Context<T & ContextExState>;
4
3
  //# sourceMappingURL=create.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/contexts/contextEx/create.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC,eAAO,MAAM,eAAe,sDAAwF,CAAA"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/contexts/contextEx/create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC,eAAO,MAAM,eAAe,sDAAwF,CAAA"}
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "@xylabs/react-flexbox": "^2.14.10",
23
23
  "@xylabs/react-link": "^2.14.10",
24
24
  "@xylabs/react-shared": "^2.14.10",
25
- "@xyo-network/core": "^2.24.12",
25
+ "@xyo-network/core": "^2.24.13",
26
26
  "axios": "^0.27.2",
27
27
  "react": "^18.2.0",
28
28
  "react-dom": "^18.2.0",
@@ -34,9 +34,9 @@
34
34
  "devDependencies": {
35
35
  "@storybook/react": "^6.5.10",
36
36
  "@xylabs/pixel": "^1.4.5",
37
- "@xylabs/tsconfig-dom": "^2.5.87",
38
- "@xyo-network/api": "^2.24.12",
39
- "@xyo-network/react-storybook": "^2.27.13"
37
+ "@xylabs/tsconfig-dom": "^2.5.88",
38
+ "@xyo-network/api": "^2.24.13",
39
+ "@xyo-network/react-storybook": "^2.27.14"
40
40
  },
41
41
  "browser": "dist/esm/index.js",
42
42
  "docs": "dist/docs.json",
@@ -80,5 +80,5 @@
80
80
  },
81
81
  "sideEffects": false,
82
82
  "types": "dist/esm/index.d.ts",
83
- "version": "2.27.13"
83
+ "version": "2.27.14"
84
84
  }
@@ -5,13 +5,21 @@ export interface TokenSummaryProps extends FlexBoxProps {
5
5
  icon?: string
6
6
  symbol?: string
7
7
  imgBgProps?: PaperProps
8
+ imageMode?: 'circle'
8
9
  }
9
10
 
10
- export const TokenSummary: React.FC<TokenSummaryProps> = ({ imgBgProps, icon, symbol, children, ...props }) => {
11
+ export const TokenSummary: React.FC<TokenSummaryProps> = ({ imageMode = 'circle', imgBgProps = {}, icon, symbol, children, ...props }) => {
12
+ const paperProps = {
13
+ ...imgBgProps,
14
+ sx: {
15
+ ...imgBgProps.sx,
16
+ borderRadius: imageMode === 'circle' ? '50%' : 'inherit',
17
+ },
18
+ }
11
19
  return (
12
20
  <>
13
21
  <FlexRow className="TokenSummary-root" paddingBottom={3} width="100%" justifyContent="flex-start" {...props}>
14
- <Paper component={FlexCol} padding={1} className="token-logo-bg" height="40px" width="40px" sx={{ borderRadius: '50%' }} {...imgBgProps}>
22
+ <Paper component={FlexCol} padding={1} className="token-logo-bg" height="40px" width="40px" {...paperProps}>
15
23
  <img src={icon} height="25px" />
16
24
  </Paper>
17
25
  <Typography variant="h6" fontWeight={300} textTransform="uppercase" paddingLeft={1}>