@xyo-network/react-shared 2.27.21 → 2.27.22

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 (36) 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/TokenSummary/variantOverrides.d.ts +7 -0
  11. package/dist/cjs/components/TokenSummary/variantOverrides.d.ts.map +1 -0
  12. package/dist/cjs/components/TokenSummary/variantOverrides.js +4 -0
  13. package/dist/cjs/components/TokenSummary/variantOverrides.js.map +1 -0
  14. package/dist/cjs/contexts/contextEx/create.d.ts +0 -1
  15. package/dist/cjs/contexts/contextEx/create.d.ts.map +1 -1
  16. package/dist/docs.json +1368 -17332
  17. package/dist/esm/components/TokenBar/TokenBar.d.ts +6 -2
  18. package/dist/esm/components/TokenBar/TokenBar.d.ts.map +1 -1
  19. package/dist/esm/components/TokenBar/TokenBar.js +3 -3
  20. package/dist/esm/components/TokenBar/TokenBar.js.map +1 -1
  21. package/dist/esm/components/TokenData/img/sol.png +0 -0
  22. package/dist/esm/components/TokenSummary/TokenSummary.d.ts +3 -5
  23. package/dist/esm/components/TokenSummary/TokenSummary.d.ts.map +1 -1
  24. package/dist/esm/components/TokenSummary/TokenSummary.js +9 -7
  25. package/dist/esm/components/TokenSummary/TokenSummary.js.map +1 -1
  26. package/dist/esm/components/TokenSummary/variantOverrides.d.ts +7 -0
  27. package/dist/esm/components/TokenSummary/variantOverrides.d.ts.map +1 -0
  28. package/dist/esm/components/TokenSummary/variantOverrides.js +2 -0
  29. package/dist/esm/components/TokenSummary/variantOverrides.js.map +1 -0
  30. package/dist/esm/contexts/contextEx/create.d.ts +0 -1
  31. package/dist/esm/contexts/contextEx/create.d.ts.map +1 -1
  32. package/package.json +3 -2
  33. package/src/components/TokenBar/TokenBar.stories.tsx +5 -1
  34. package/src/components/TokenBar/TokenBar.tsx +11 -4
  35. package/src/components/TokenData/img/sol.png +0 -0
  36. package/src/components/TokenSummary/TokenSummary.tsx +18 -16
@@ -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"}
@@ -6,8 +6,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_flexbox_1 = require("@xylabs/react-flexbox");
8
8
  const TokenBar = (_a) => {
9
- var { text1, text2 } = _a, props = tslib_1.__rest(_a, ["text1", "text2"]);
10
- return ((0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ elevation: 0, className: "TokenBar-root" }, props, { children: (0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexRow, Object.assign({ justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", fontWeight: 300, margin: 1 }, { children: text1 })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", fontWeight: 300, textTransform: "uppercase", color: "gray", margin: 1 }, { children: text2 }))] })) })));
9
+ var { text1, text1Props, text1Suffix, text2, text2Props, text2Suffix } = _a, props = tslib_1.__rest(_a, ["text1", "text1Props", "text1Suffix", "text2", "text2Props", "text2Suffix"]);
10
+ return ((0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ elevation: 0, className: "TokenBar-root" }, props, { children: (0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexRow, Object.assign({ justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: "body1", fontWeight: 300, margin: 1 }, text1Props, { children: [text1, text1Suffix] })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: "body1", fontWeight: 300, textTransform: "uppercase", color: "gray", margin: 1 }, text2Props, { children: [text2, text2Suffix] }))] })) })));
11
11
  };
12
12
  exports.TokenBar = TokenBar;
13
13
  //# sourceMappingURL=TokenBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TokenBar.js","sourceRoot":"","sources":["../../../../src/components/TokenBar/TokenBar.tsx"],"names":[],"mappings":";;;;;AAAA,4CAA6D;AAC7D,yDAA+C;AAMxC,MAAM,QAAQ,GAA4B,CAAC,EAA0B,EAAE,EAAE;QAA9B,EAAE,KAAK,EAAE,KAAK,OAAY,EAAP,KAAK,sBAAxB,kBAA0B,CAAF;IACxE,OAAO,CACL,uBAAC,gBAAK,kBAAC,SAAS,EAAE,CAAC,EAAE,SAAS,EAAC,eAAe,IAAK,KAAK,cACtD,wBAAC,uBAAO,kBAAC,cAAc,EAAC,eAAe,iBACrC,uBAAC,qBAAU,kBAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,gBACnD,KAAK,IACK,EACb,uBAAC,qBAAU,kBAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,aAAa,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAE,CAAC,gBAC1F,KAAK,IACK,KACL,IACJ,CACT,CAAA;AACH,CAAC,CAAA;AAbY,QAAA,QAAQ,YAapB"}
1
+ {"version":3,"file":"TokenBar.js","sourceRoot":"","sources":["../../../../src/components/TokenBar/TokenBar.tsx"],"names":[],"mappings":";;;;;AAAA,4CAA8E;AAC9E,yDAA+C;AAWxC,MAAM,QAAQ,GAA4B,CAAC,EAA4E,EAAE,EAAE;QAAhF,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,OAAY,EAAP,KAAK,sBAA1E,4EAA4E,CAAF;IAC1H,OAAO,CACL,uBAAC,gBAAK,kBAAC,SAAS,EAAE,CAAC,EAAE,SAAS,EAAC,eAAe,IAAK,KAAK,cACtD,wBAAC,uBAAO,kBAAC,cAAc,EAAC,eAAe,iBACrC,wBAAC,qBAAU,kBAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,IAAM,UAAU,eACnE,KAAK,EACL,WAAW,KACD,EACb,wBAAC,qBAAU,kBAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,aAAa,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAE,CAAC,IAAM,UAAU,eAC1G,KAAK,EACL,WAAW,KACD,KACL,IACJ,CACT,CAAA;AACH,CAAC,CAAA;AAfY,QAAA,QAAQ,YAepB"}
@@ -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"}
@@ -4,11 +4,11 @@ exports.TokenSummary = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const material_1 = require("@mui/material");
7
- const react_flexbox_1 = require("@xylabs/react-flexbox");
8
7
  const TokenSummary = (_a) => {
9
- var { imageMode = 'circle', imgBgProps = {}, icon, symbol, children } = _a, props = tslib_1.__rest(_a, ["imageMode", "imgBgProps", "icon", "symbol", "children"]);
10
- const paperProps = Object.assign(Object.assign({}, imgBgProps), { sx: Object.assign(Object.assign({}, imgBgProps.sx), { borderRadius: imageMode === 'circle' ? '50%' : 'inherit' }) });
11
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexRow, Object.assign({ className: "TokenSummary-root", paddingBottom: 3, width: "100%", justifyContent: "flex-start" }, props, { children: [(0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ component: react_flexbox_1.FlexCol, padding: 1, className: "token-logo-bg", height: "40px", width: "40px" }, paperProps, { children: (0, jsx_runtime_1.jsx)("img", { src: icon, height: "25px" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", fontWeight: 300, textTransform: "uppercase", paddingLeft: 1 }, { children: symbol }))] })), children] }));
8
+ var { imgBgProps = {}, icon, symbol, children } = _a, props = tslib_1.__rest(_a, ["imgBgProps", "icon", "symbol", "children"]);
9
+ const theme = (0, material_1.useTheme)();
10
+ const avatarProps = Object.assign(Object.assign({}, imgBgProps), { sx: Object.assign({ background: theme.palette.common.white, height: '40px', padding: theme.spacing(0.25) }, imgBgProps.sx) });
11
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.CardHeader, Object.assign({ avatar: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ src: icon, alt: symbol }, avatarProps)), title: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", fontWeight: 300, textTransform: "uppercase" }, { children: symbol })) }, props)), children] }));
12
12
  };
13
13
  exports.TokenSummary = TokenSummary;
14
14
  //# sourceMappingURL=TokenSummary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TokenSummary.js","sourceRoot":"","sources":["../../../../src/components/TokenSummary/TokenSummary.tsx"],"names":[],"mappings":";;;;;AAAA,4CAA6D;AAC7D,yDAAsE;AAS/D,MAAM,YAAY,GAAgC,CAAC,EAA2E,EAAE,EAAE;QAA/E,EAAE,SAAS,GAAG,QAAQ,EAAE,UAAU,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAAzE,yDAA2E,CAAF;IACjI,MAAM,UAAU,mCACX,UAAU,KACb,EAAE,kCACG,UAAU,CAAC,EAAE,KAChB,YAAY,EAAE,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,MAE3D,CAAA;IACD,OAAO,CACL,6DACE,wBAAC,uBAAO,kBAAC,SAAS,EAAC,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,qBAAU,kBAAC,OAAO,EAAC,IAAI,EAAC,UAAU,EAAE,GAAG,EAAE,aAAa,EAAC,WAAW,gBAChE,MAAM,IACI,IAEX,KAAK,EACT,EACD,QAAQ,IACR,CACJ,CAAA;AACH,CAAC,CAAA;AAzBY,QAAA,YAAY,gBAyBxB"}
@@ -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,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("@mui/material/Paper/");
4
+ //# sourceMappingURL=variantOverrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variantOverrides.js","sourceRoot":"","sources":["../../../../src/components/TokenSummary/variantOverrides.ts"],"names":[],"mappings":";;AAAA,gCAA6B"}
@@ -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"}