@xyo-network/react-shared 2.27.20 → 2.27.23

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.
Files changed (51) hide show
  1. package/dist/cjs/components/TokenBar/TokenBar.d.ts +6 -2
  2. package/dist/cjs/components/TokenBar/TokenBar.d.ts.map +1 -1
  3. package/dist/cjs/components/TokenBar/TokenBar.js +2 -2
  4. package/dist/cjs/components/TokenBar/TokenBar.js.map +1 -1
  5. package/dist/cjs/components/TokenData/img/sol.png +0 -0
  6. package/dist/cjs/components/TokenSummary/TokenSummary.d.ts +3 -5
  7. package/dist/cjs/components/TokenSummary/TokenSummary.d.ts.map +1 -1
  8. package/dist/cjs/components/TokenSummary/TokenSummary.js +4 -4
  9. package/dist/cjs/components/TokenSummary/TokenSummary.js.map +1 -1
  10. package/dist/cjs/components/index.d.ts +1 -0
  11. package/dist/cjs/components/index.d.ts.map +1 -1
  12. package/dist/cjs/components/index.js +1 -0
  13. package/dist/cjs/components/index.js.map +1 -1
  14. package/dist/cjs/components/pluginValidation/DataMissing.d.ts +8 -0
  15. package/dist/cjs/components/pluginValidation/DataMissing.d.ts.map +1 -0
  16. package/dist/cjs/components/pluginValidation/DataMissing.js +12 -0
  17. package/dist/cjs/components/pluginValidation/DataMissing.js.map +1 -0
  18. package/dist/cjs/components/pluginValidation/index.d.ts +2 -0
  19. package/dist/cjs/components/pluginValidation/index.d.ts.map +1 -0
  20. package/dist/cjs/components/pluginValidation/index.js +5 -0
  21. package/dist/cjs/components/pluginValidation/index.js.map +1 -0
  22. package/dist/docs.json +1716 -17604
  23. package/dist/esm/components/TokenBar/TokenBar.d.ts +6 -2
  24. package/dist/esm/components/TokenBar/TokenBar.d.ts.map +1 -1
  25. package/dist/esm/components/TokenBar/TokenBar.js +3 -3
  26. package/dist/esm/components/TokenBar/TokenBar.js.map +1 -1
  27. package/dist/esm/components/TokenData/img/sol.png +0 -0
  28. package/dist/esm/components/TokenSummary/TokenSummary.d.ts +3 -5
  29. package/dist/esm/components/TokenSummary/TokenSummary.d.ts.map +1 -1
  30. package/dist/esm/components/TokenSummary/TokenSummary.js +9 -7
  31. package/dist/esm/components/TokenSummary/TokenSummary.js.map +1 -1
  32. package/dist/esm/components/index.d.ts +1 -0
  33. package/dist/esm/components/index.d.ts.map +1 -1
  34. package/dist/esm/components/index.js +1 -0
  35. package/dist/esm/components/index.js.map +1 -1
  36. package/dist/esm/components/pluginValidation/DataMissing.d.ts +8 -0
  37. package/dist/esm/components/pluginValidation/DataMissing.d.ts.map +1 -0
  38. package/dist/esm/components/pluginValidation/DataMissing.js +6 -0
  39. package/dist/esm/components/pluginValidation/DataMissing.js.map +1 -0
  40. package/dist/esm/components/pluginValidation/index.d.ts +2 -0
  41. package/dist/esm/components/pluginValidation/index.d.ts.map +1 -0
  42. package/dist/esm/components/pluginValidation/index.js +2 -0
  43. package/dist/esm/components/pluginValidation/index.js.map +1 -0
  44. package/package.json +10 -9
  45. package/src/components/TokenBar/TokenBar.stories.tsx +5 -1
  46. package/src/components/TokenBar/TokenBar.tsx +11 -4
  47. package/src/components/TokenData/img/sol.png +0 -0
  48. package/src/components/TokenSummary/TokenSummary.tsx +18 -16
  49. package/src/components/index.ts +1 -0
  50. package/src/components/pluginValidation/DataMissing.tsx +14 -0
  51. package/src/components/pluginValidation/index.ts +1 -0
@@ -1,8 +1,12 @@
1
- /// <reference types="react" />
2
- import { PaperProps } from '@mui/material';
1
+ import { PaperProps, TypographyProps } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
3
  export interface TokenBarProps extends PaperProps {
4
4
  text1?: string | number;
5
+ text1Props?: TypographyProps;
6
+ text1Suffix?: ReactNode;
5
7
  text2?: string | number;
8
+ text2Props?: TypographyProps;
9
+ text2Suffix?: ReactNode;
6
10
  }
7
11
  export declare const TokenBar: React.FC<TokenBarProps>;
8
12
  //# sourceMappingURL=TokenBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TokenBar.d.ts","sourceRoot":"","sources":["../../../../src/components/TokenBar/TokenBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAS,UAAU,EAAc,MAAM,eAAe,CAAA;AAE7D,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAa5C,CAAA"}
1
+ {"version":3,"file":"TokenBar.d.ts","sourceRoot":"","sources":["../../../../src/components/TokenBar/TokenBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAc,eAAe,EAAE,MAAM,eAAe,CAAA;AAE9E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,WAAW,CAAC,EAAE,SAAS,CAAA;CACxB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAe5C,CAAA"}
@@ -1,7 +1,7 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Paper, Typography } from '@mui/material';
3
3
  import { FlexRow } from '@xylabs/react-flexbox';
4
- export const TokenBar = ({ text1, text2, ...props }) => {
5
- return (_jsx(Paper, { elevation: 0, className: "TokenBar-root", ...props, children: _jsxs(FlexRow, { justifyContent: "space-between", children: [_jsx(Typography, { variant: "body1", fontWeight: 300, margin: 1, children: text1 }), _jsx(Typography, { variant: "body1", fontWeight: 300, textTransform: "uppercase", color: "gray", margin: 1, children: text2 })] }) }));
4
+ export const TokenBar = ({ text1, text1Props, text1Suffix, text2, text2Props, text2Suffix, ...props }) => {
5
+ return (_jsx(Paper, { elevation: 0, className: "TokenBar-root", ...props, children: _jsxs(FlexRow, { justifyContent: "space-between", children: [_jsxs(Typography, { variant: "body1", fontWeight: 300, margin: 1, ...text1Props, children: [text1, text1Suffix] }), _jsxs(Typography, { variant: "body1", fontWeight: 300, textTransform: "uppercase", color: "gray", margin: 1, ...text2Props, children: [text2, text2Suffix] })] }) }));
6
6
  };
7
7
  //# sourceMappingURL=TokenBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TokenBar.js","sourceRoot":"","sources":["../../../../src/components/TokenBar/TokenBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAc,UAAU,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAM/C,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC9E,OAAO,CACL,KAAC,KAAK,IAAC,SAAS,EAAE,CAAC,EAAE,SAAS,EAAC,eAAe,KAAK,KAAK,YACtD,MAAC,OAAO,IAAC,cAAc,EAAC,eAAe,aACrC,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,YACnD,KAAK,GACK,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,aAAa,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAE,CAAC,YAC1F,KAAK,GACK,IACL,GACJ,CACT,CAAA;AACH,CAAC,CAAA"}
1
+ {"version":3,"file":"TokenBar.js","sourceRoot":"","sources":["../../../../src/components/TokenBar/TokenBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAc,UAAU,EAAmB,MAAM,eAAe,CAAA;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAW/C,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAChI,OAAO,CACL,KAAC,KAAK,IAAC,SAAS,EAAE,CAAC,EAAE,SAAS,EAAC,eAAe,KAAK,KAAK,YACtD,MAAC,OAAO,IAAC,cAAc,EAAC,eAAe,aACrC,MAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,KAAM,UAAU,aACnE,KAAK,EACL,WAAW,IACD,EACb,MAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,aAAa,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAE,CAAC,KAAM,UAAU,aAC1G,KAAK,EACL,WAAW,IACD,IACL,GACJ,CACT,CAAA;AACH,CAAC,CAAA"}
@@ -1,11 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { PaperProps } from '@mui/material';
3
- import { FlexBoxProps } from '@xylabs/react-flexbox';
4
- export interface TokenSummaryProps extends FlexBoxProps {
2
+ import { AvatarProps, CardHeaderProps } from '@mui/material';
3
+ export interface TokenSummaryProps extends CardHeaderProps {
5
4
  icon?: string;
6
5
  symbol?: string;
7
- imgBgProps?: PaperProps;
8
- imageMode?: 'circle';
6
+ imgBgProps?: AvatarProps;
9
7
  }
10
8
  export declare const TokenSummary: React.FC<TokenSummaryProps>;
11
9
  //# 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;IACvB,SAAS,CAAC,EAAE,QAAQ,CAAA;CACrB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqBpD,CAAA"}
1
+ {"version":3,"file":"TokenSummary.d.ts","sourceRoot":"","sources":["../../../../src/components/TokenSummary/TokenSummary.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAU,WAAW,EAAc,eAAe,EAAwB,MAAM,eAAe,CAAA;AAEtG,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,WAAW,CAAA;CACzB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyBpD,CAAA"}
@@ -1,14 +1,16 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Paper, Typography } from '@mui/material';
3
- import { FlexCol, FlexRow } from '@xylabs/react-flexbox';
4
- export const TokenSummary = ({ imageMode = 'circle', imgBgProps = {}, icon, symbol, children, ...props }) => {
5
- const paperProps = {
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Avatar, CardHeader, Typography, useTheme } from '@mui/material';
3
+ export const TokenSummary = ({ imgBgProps = {}, icon, symbol, children, ...props }) => {
4
+ const theme = useTheme();
5
+ const avatarProps = {
6
6
  ...imgBgProps,
7
7
  sx: {
8
+ background: theme.palette.common.white,
9
+ height: '40px',
10
+ padding: theme.spacing(0.25),
8
11
  ...imgBgProps.sx,
9
- borderRadius: imageMode === 'circle' ? '50%' : 'inherit',
10
12
  },
11
13
  };
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] }));
14
+ return (_jsxs(_Fragment, { children: [_jsx(CardHeader, { avatar: _jsx(Avatar, { src: icon, alt: symbol, ...avatarProps }), title: _jsx(Typography, { variant: "h6", fontWeight: 300, textTransform: "uppercase", children: symbol }), ...props }), children] }));
13
15
  };
14
16
  //# 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;AAStE,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EAAE,SAAS,GAAG,QAAQ,EAAE,UAAU,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACvI,MAAM,UAAU,GAAG;QACjB,GAAG,UAAU;QACb,EAAE,EAAE;YACF,GAAG,UAAU,CAAC,EAAE;YAChB,YAAY,EAAE,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,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"}
1
+ {"version":3,"file":"TokenSummary.js","sourceRoot":"","sources":["../../../../src/components/TokenSummary/TokenSummary.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAe,UAAU,EAAmB,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAQtG,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EAAE,UAAU,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACjH,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,MAAM,WAAW,GAAG;QAClB,GAAG,UAAU;QACb,EAAE,EAAE;YACF,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;YACtC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;YAC5B,GAAG,UAAU,CAAC,EAAE;SACjB;KACF,CAAA;IACD,OAAO,CACL,8BACE,KAAC,UAAU,IACT,MAAM,EAAE,KAAC,MAAM,IAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAM,WAAW,GAAI,EAC3D,KAAK,EACH,KAAC,UAAU,IAAC,OAAO,EAAC,IAAI,EAAC,UAAU,EAAE,GAAG,EAAE,aAAa,EAAC,WAAW,YAChE,MAAM,GACI,KAEX,KAAK,GACT,EACD,QAAQ,IACR,CACJ,CAAA;AACH,CAAC,CAAA"}
@@ -4,6 +4,7 @@ export * from './ErrorBoundry';
4
4
  export * from './JsonRouteWrapper';
5
5
  export * from './ListItemButtonEx';
6
6
  export * from './Pipe';
7
+ export * from './pluginValidation';
7
8
  export * from './ScrollTableOnSm';
8
9
  export * from './SectionSpacingRow';
9
10
  export * from './TableCell';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,QAAQ,CAAA;AACtB,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,QAAQ,CAAA;AACtB,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
@@ -4,6 +4,7 @@ export * from './ErrorBoundry';
4
4
  export * from './JsonRouteWrapper';
5
5
  export * from './ListItemButtonEx';
6
6
  export * from './Pipe';
7
+ export * from './pluginValidation';
7
8
  export * from './ScrollTableOnSm';
8
9
  export * from './SectionSpacingRow';
9
10
  export * from './TableCell';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,QAAQ,CAAA;AACtB,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,QAAQ,CAAA;AACtB,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { AlertProps } from '@mui/material';
3
+ interface PayloadDataMissingProps extends AlertProps {
4
+ alertBody?: string;
5
+ }
6
+ export declare const PayloadDataMissing: React.FC<PayloadDataMissingProps>;
7
+ export {};
8
+ //# sourceMappingURL=DataMissing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataMissing.d.ts","sourceRoot":"","sources":["../../../../src/components/pluginValidation/DataMissing.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAS,UAAU,EAAc,MAAM,eAAe,CAAA;AAE7D,UAAU,uBAAwB,SAAQ,UAAU;IAClD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAOhE,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Alert, AlertTitle } from '@mui/material';
3
+ export const PayloadDataMissing = ({ alertBody, ...props }) => {
4
+ return (_jsxs(Alert, { severity: "warning", ...props, children: [_jsx(AlertTitle, { children: "Missing Data" }), alertBody ?? 'Payload is missing required data to render correctly'] }));
5
+ };
6
+ //# sourceMappingURL=DataMissing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataMissing.js","sourceRoot":"","sources":["../../../../src/components/pluginValidation/DataMissing.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAc,UAAU,EAAE,MAAM,eAAe,CAAA;AAM7D,MAAM,CAAC,MAAM,kBAAkB,GAAsC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC/F,OAAO,CACL,MAAC,KAAK,IAAC,QAAQ,EAAC,SAAS,KAAK,KAAK,aACjC,KAAC,UAAU,+BAA0B,EACpC,SAAS,IAAI,sDAAsD,IAC9D,CACT,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './DataMissing';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/pluginValidation/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './DataMissing';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/pluginValidation/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
package/package.json CHANGED
@@ -16,12 +16,13 @@
16
16
  "@mui/material": "^5.10.0",
17
17
  "@mui/styles": "^5.9.3",
18
18
  "@xylabs/pixel": "^1.4.5",
19
- "@xylabs/react-appbar": "^2.14.10",
20
- "@xylabs/react-button": "^2.14.10",
21
- "@xylabs/react-dialogs": "^2.14.10",
22
- "@xylabs/react-flexbox": "^2.14.10",
23
- "@xylabs/react-link": "^2.14.10",
24
- "@xylabs/react-shared": "^2.14.10",
19
+ "@xylabs/react-appbar": "^2.14.11",
20
+ "@xylabs/react-button": "^2.14.11",
21
+ "@xylabs/react-dialogs": "^2.14.11",
22
+ "@xylabs/react-flexbox": "^2.14.11",
23
+ "@xylabs/react-link": "^2.14.11",
24
+ "@xylabs/react-quick-tip-button": "^2.14.11",
25
+ "@xylabs/react-shared": "^2.14.11",
25
26
  "@xyo-network/core": "^2.25.2",
26
27
  "axios": "^0.27.2",
27
28
  "react": "^18.2.0",
@@ -34,9 +35,9 @@
34
35
  "devDependencies": {
35
36
  "@storybook/react": "^6.5.10",
36
37
  "@xylabs/pixel": "^1.4.5",
37
- "@xylabs/tsconfig-dom": "^2.5.89",
38
+ "@xylabs/tsconfig-dom": "^2.5.92",
38
39
  "@xyo-network/api": "^2.25.2",
39
- "@xyo-network/react-storybook": "^2.27.20"
40
+ "@xyo-network/react-storybook": "^2.27.23"
40
41
  },
41
42
  "browser": "dist/esm/index.js",
42
43
  "docs": "dist/docs.json",
@@ -80,5 +81,5 @@
80
81
  },
81
82
  "sideEffects": false,
82
83
  "types": "dist/esm/index.d.ts",
83
- "version": "2.27.20"
84
+ "version": "2.27.23"
84
85
  }
@@ -1,4 +1,5 @@
1
1
  import { ComponentMeta, ComponentStory } from '@storybook/react'
2
+ import { QuickTipButton } from '@xylabs/react-quick-tip-button'
2
3
  import { BrowserRouter } from 'react-router-dom'
3
4
 
4
5
  import { TokenBar } from './TokenBar'
@@ -22,10 +23,13 @@ const Template: ComponentStory<typeof TokenBar> = (args) => (
22
23
  const WithData = Template.bind({})
23
24
  WithData.args = { text1: 'Hello', text2: 'World' }
24
25
 
26
+ const WithSuffixes = Template.bind({})
27
+ WithSuffixes.args = { text1: 'ETH', text2: '0.062342', text2Suffix: <QuickTipButton title="0.06234298345834958" /> }
28
+
25
29
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
26
30
  //@ts-ignore
27
31
 
28
- export { WithData }
32
+ export { WithData, WithSuffixes }
29
33
 
30
34
  // eslint-disable-next-line import/no-default-export
31
35
  export default StorybookEntry
@@ -1,19 +1,26 @@
1
- import { Paper, PaperProps, Typography } from '@mui/material'
1
+ import { Paper, PaperProps, Typography, TypographyProps } from '@mui/material'
2
2
  import { FlexRow } from '@xylabs/react-flexbox'
3
+ import { ReactNode } from 'react'
3
4
  export interface TokenBarProps extends PaperProps {
4
5
  text1?: string | number
6
+ text1Props?: TypographyProps
7
+ text1Suffix?: ReactNode
5
8
  text2?: string | number
9
+ text2Props?: TypographyProps
10
+ text2Suffix?: ReactNode
6
11
  }
7
12
 
8
- export const TokenBar: React.FC<TokenBarProps> = ({ text1, text2, ...props }) => {
13
+ export const TokenBar: React.FC<TokenBarProps> = ({ text1, text1Props, text1Suffix, text2, text2Props, text2Suffix, ...props }) => {
9
14
  return (
10
15
  <Paper elevation={0} className="TokenBar-root" {...props}>
11
16
  <FlexRow justifyContent="space-between">
12
- <Typography variant="body1" fontWeight={300} margin={1}>
17
+ <Typography variant="body1" fontWeight={300} margin={1} {...text1Props}>
13
18
  {text1}
19
+ {text1Suffix}
14
20
  </Typography>
15
- <Typography variant="body1" fontWeight={300} textTransform="uppercase" color="gray" margin={1}>
21
+ <Typography variant="body1" fontWeight={300} textTransform="uppercase" color="gray" margin={1} {...text2Props}>
16
22
  {text2}
23
+ {text2Suffix}
17
24
  </Typography>
18
25
  </FlexRow>
19
26
  </Paper>
@@ -1,31 +1,33 @@
1
- import { Paper, PaperProps, Typography } from '@mui/material'
2
- import { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'
1
+ import { Avatar, AvatarProps, CardHeader, CardHeaderProps, Typography, useTheme } from '@mui/material'
3
2
 
4
- export interface TokenSummaryProps extends FlexBoxProps {
3
+ export interface TokenSummaryProps extends CardHeaderProps {
5
4
  icon?: string
6
5
  symbol?: string
7
- imgBgProps?: PaperProps
8
- imageMode?: 'circle'
6
+ imgBgProps?: AvatarProps
9
7
  }
10
8
 
11
- export const TokenSummary: React.FC<TokenSummaryProps> = ({ imageMode = 'circle', imgBgProps = {}, icon, symbol, children, ...props }) => {
12
- const paperProps = {
9
+ export const TokenSummary: React.FC<TokenSummaryProps> = ({ imgBgProps = {}, icon, symbol, children, ...props }) => {
10
+ const theme = useTheme()
11
+ const avatarProps = {
13
12
  ...imgBgProps,
14
13
  sx: {
14
+ background: theme.palette.common.white,
15
+ height: '40px',
16
+ padding: theme.spacing(0.25),
15
17
  ...imgBgProps.sx,
16
- borderRadius: imageMode === 'circle' ? '50%' : 'inherit',
17
18
  },
18
19
  }
19
20
  return (
20
21
  <>
21
- <FlexRow className="TokenSummary-root" paddingBottom={3} width="100%" justifyContent="flex-start" {...props}>
22
- <Paper component={FlexCol} padding={1} className="token-logo-bg" height="40px" width="40px" {...paperProps}>
23
- <img src={icon} height="25px" />
24
- </Paper>
25
- <Typography variant="h6" fontWeight={300} textTransform="uppercase" paddingLeft={1}>
26
- {symbol}
27
- </Typography>
28
- </FlexRow>
22
+ <CardHeader
23
+ avatar={<Avatar src={icon} alt={symbol} {...avatarProps} />}
24
+ title={
25
+ <Typography variant="h6" fontWeight={300} textTransform="uppercase">
26
+ {symbol}
27
+ </Typography>
28
+ }
29
+ {...props}
30
+ />
29
31
  {children}
30
32
  </>
31
33
  )
@@ -4,6 +4,7 @@ export * from './ErrorBoundry'
4
4
  export * from './JsonRouteWrapper'
5
5
  export * from './ListItemButtonEx'
6
6
  export * from './Pipe'
7
+ export * from './pluginValidation'
7
8
  export * from './ScrollTableOnSm'
8
9
  export * from './SectionSpacingRow'
9
10
  export * from './TableCell'
@@ -0,0 +1,14 @@
1
+ import { Alert, AlertProps, AlertTitle } from '@mui/material'
2
+
3
+ interface PayloadDataMissingProps extends AlertProps {
4
+ alertBody?: string
5
+ }
6
+
7
+ export const PayloadDataMissing: React.FC<PayloadDataMissingProps> = ({ alertBody, ...props }) => {
8
+ return (
9
+ <Alert severity="warning" {...props}>
10
+ <AlertTitle>Missing Data</AlertTitle>
11
+ {alertBody ?? 'Payload is missing required data to render correctly'}
12
+ </Alert>
13
+ )
14
+ }
@@ -0,0 +1 @@
1
+ export * from './DataMissing'