@xyo-network/react-gas-price 2.64.0 → 2.64.3

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 (52) hide show
  1. package/dist/browser/components/Avatar/EthereumGasPriceAvatar.js +3 -2
  2. package/dist/browser/components/Avatar/EthereumGasPriceAvatar.js.map +1 -1
  3. package/dist/browser/components/Avatar/index.js +10 -1
  4. package/dist/browser/components/Avatar/index.js.map +1 -1
  5. package/dist/browser/components/CardHeader/CardHeader.js +61 -6
  6. package/dist/browser/components/CardHeader/CardHeader.js.map +1 -1
  7. package/dist/browser/components/CardHeader/index.js +81 -1
  8. package/dist/browser/components/CardHeader/index.js.map +1 -1
  9. package/dist/browser/components/GasFees/Card.js +63 -10
  10. package/dist/browser/components/GasFees/Card.js.map +1 -1
  11. package/dist/browser/components/GasFees/components/GasPriceBox.js +12 -5
  12. package/dist/browser/components/GasFees/components/GasPriceBox.js.map +1 -1
  13. package/dist/browser/components/GasFees/components/GweiLabelTypography.js +3 -2
  14. package/dist/browser/components/GasFees/components/GweiLabelTypography.js.map +1 -1
  15. package/dist/browser/components/GasFees/components/PriorityFeeBox.js +14 -7
  16. package/dist/browser/components/GasFees/components/PriorityFeeBox.js.map +1 -1
  17. package/dist/browser/components/GasFees/components/SpeedBox.js +3 -2
  18. package/dist/browser/components/GasFees/components/SpeedBox.js.map +1 -1
  19. package/dist/browser/components/GasFees/components/index.js +55 -3
  20. package/dist/browser/components/GasFees/components/index.js.map +1 -1
  21. package/dist/browser/components/GasFees/index.js +71 -1
  22. package/dist/browser/components/GasFees/index.js.map +1 -1
  23. package/dist/browser/components/HeaderBox.js +65 -6
  24. package/dist/browser/components/HeaderBox.js.map +1 -1
  25. package/dist/browser/components/HeaderComponents/Actions.js +3 -2
  26. package/dist/browser/components/HeaderComponents/Actions.js.map +1 -1
  27. package/dist/browser/components/HeaderComponents/Header/Header.js +21 -4
  28. package/dist/browser/components/HeaderComponents/Header/Header.js.map +1 -1
  29. package/dist/browser/components/HeaderComponents/Header/Heading.js +3 -2
  30. package/dist/browser/components/HeaderComponents/Header/Heading.js.map +1 -1
  31. package/dist/browser/components/HeaderComponents/Header/index.js +31 -2
  32. package/dist/browser/components/HeaderComponents/Header/index.js.map +1 -1
  33. package/dist/browser/components/HeaderComponents/index.js +51 -2
  34. package/dist/browser/components/HeaderComponents/index.js.map +1 -1
  35. package/dist/browser/components/RawPayload/ToggleRawPayloadBox.js +3 -2
  36. package/dist/browser/components/RawPayload/ToggleRawPayloadBox.js.map +1 -1
  37. package/dist/browser/components/RawPayload/index.js +15 -1
  38. package/dist/browser/components/RawPayload/index.js.map +1 -1
  39. package/dist/browser/components/index.js +211 -7
  40. package/dist/browser/components/index.js.map +1 -1
  41. package/dist/browser/components/layout/Header.js +2 -1
  42. package/dist/browser/components/layout/Header.js.map +1 -1
  43. package/dist/browser/components/layout/StyledCardHeader.js +2 -1
  44. package/dist/browser/components/layout/StyledCardHeader.js.map +1 -1
  45. package/dist/browser/components/layout/index.js +23 -2
  46. package/dist/browser/components/layout/index.js.map +1 -1
  47. package/dist/browser/index.js +211 -2
  48. package/dist/browser/index.js.map +1 -1
  49. package/dist/browser/types/index.js +0 -1
  50. package/dist/browser/types/index.js.map +1 -1
  51. package/dist/docs.json +49 -49
  52. package/package.json +7 -7
@@ -1,8 +1,212 @@
1
- export * from "./Avatar";
2
- export * from "./CardHeader";
3
- export * from "./GasFees";
4
- export * from "./HeaderBox";
5
- export * from "./HeaderComponents";
6
- export * from "./layout";
7
- export * from "./RawPayload";
1
+ // src/components/Avatar/EthereumGasPriceAvatar.tsx
2
+ import { LocalGasStationRounded as LocalGasStationRoundedIcon } from "@mui/icons-material";
3
+ import { Avatar } from "@mui/material";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var EthereumGasPriceAvatar = ({ ...props }) => {
6
+ return /* @__PURE__ */ jsx(Avatar, { ...props, children: /* @__PURE__ */ jsx(LocalGasStationRoundedIcon, {}) });
7
+ };
8
+
9
+ // src/components/CardHeader/CardHeader.tsx
10
+ import { forwardRef } from "react";
11
+
12
+ // src/components/HeaderComponents/Actions.tsx
13
+ import { Chip } from "@mui/material";
14
+ import { FlexRow } from "@xylabs/react-flexbox";
15
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
16
+ var GasPriceHeaderActionsBox = ({
17
+ baseFee,
18
+ baseFeeLabel = "Base Fee",
19
+ blockNumber,
20
+ blockNumberLabel = "Block Number",
21
+ timestamp,
22
+ ...props
23
+ }) => {
24
+ return /* @__PURE__ */ jsxs(FlexRow, { columnGap: 1, rowGap: 1, flexWrap: "wrap", ...props, children: [
25
+ timestamp ? /* @__PURE__ */ jsx2(Chip, { label: new Date(timestamp).toLocaleString() }) : null,
26
+ baseFee ? /* @__PURE__ */ jsx2(Chip, { label: `${baseFeeLabel} - ${baseFee.toFixed(2)} GWEI` }) : null,
27
+ blockNumber ? /* @__PURE__ */ jsx2(Chip, { label: `${blockNumberLabel} - ${blockNumber}` }) : null
28
+ ] });
29
+ };
30
+
31
+ // src/components/HeaderComponents/Header/Header.tsx
32
+ import { useTheme as useTheme2 } from "@mui/material";
33
+ import { useGetTokenData } from "@xyo-network/react-shared";
34
+
35
+ // src/components/HeaderComponents/Header/Heading.tsx
36
+ import { useTheme } from "@mui/material";
37
+ import { TypographyEx } from "@xyo-network/react-shared";
38
+ import { jsxs as jsxs2 } from "react/jsx-runtime";
39
+ var GasPriceHeadingTypography = ({ children, heading, networkIcon, ...props }) => {
40
+ const theme = useTheme();
41
+ return /* @__PURE__ */ jsxs2(TypographyEx, { fontSize: theme.spacing(6), lineHeight: 1, ...props, children: [
42
+ heading,
43
+ " ",
44
+ networkIcon,
45
+ " ",
46
+ children
47
+ ] });
48
+ };
49
+
50
+ // src/components/HeaderComponents/Header/Header.tsx
51
+ import { jsx as jsx3 } from "react/jsx-runtime";
52
+ var GasPriceHeaderTypography = ({ heading, children, ...props }) => {
53
+ const theme = useTheme2();
54
+ const [ethData] = useGetTokenData(["eth"]);
55
+ const networkIcon = /* @__PURE__ */ jsx3("img", { height: theme.spacing(4), src: ethData.icon });
56
+ return /* @__PURE__ */ jsx3(GasPriceHeadingTypography, { heading, networkIcon, ...props, children });
57
+ };
58
+
59
+ // src/components/layout/Header.tsx
60
+ import { styled } from "@mui/material";
61
+ import { FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
62
+ var StyledGasPriceHeaderBox = styled(FlexRow2, { name: "StyledGasPriceEstimateBox" })(({ theme }) => ({
63
+ alignItems: "end",
64
+ columnGap: theme.spacing(2),
65
+ flexWrap: "wrap",
66
+ justifyContent: "space-between",
67
+ justifyItems: "space-between",
68
+ rowGap: theme.spacing(2),
69
+ width: "100%"
70
+ }));
71
+
72
+ // src/components/layout/StyledCardHeader.tsx
73
+ import { CardHeader, styled as styled2 } from "@mui/material";
74
+ var StyledCardHeader = styled2(CardHeader, { name: "StyledCardHeader" })(({ theme }) => ({
75
+ flexWrap: "wrap",
76
+ rowGap: theme.spacing(2)
77
+ }));
78
+
79
+ // src/components/CardHeader/CardHeader.tsx
80
+ import { jsx as jsx4 } from "react/jsx-runtime";
81
+ var GasPriceWitnessCardHeader = forwardRef(({ title, parsedPayload, ...props }, ref) => /* @__PURE__ */ jsx4(
82
+ StyledCardHeader,
83
+ {
84
+ title: /* @__PURE__ */ jsx4(GasPriceHeaderTypography, { heading: title }),
85
+ action: /* @__PURE__ */ jsx4(
86
+ GasPriceHeaderActionsBox,
87
+ {
88
+ timestamp: parsedPayload?.timestamp,
89
+ baseFee: parsedPayload?.baseFee?.value,
90
+ baseFeeLabel: parsedPayload?.baseFee?.label,
91
+ blockNumber: parsedPayload?.blockNumber?.value,
92
+ blockNumberLabel: parsedPayload?.blockNumber?.label
93
+ }
94
+ ),
95
+ ref,
96
+ ...props
97
+ }
98
+ ));
99
+ GasPriceWitnessCardHeader.displayName = "GasPriceWitnessCardHeader";
100
+
101
+ // src/components/GasFees/Card.tsx
102
+ import { Card, Paper, useTheme as useTheme6 } from "@mui/material";
103
+ import { FlexGrowCol as FlexGrowCol2 } from "@xylabs/react-flexbox";
104
+ import { CardContentEx } from "@xyo-network/react-card";
105
+
106
+ // src/components/GasFees/components/GasPriceBox.tsx
107
+ import { useTheme as useTheme3 } from "@mui/material";
108
+ import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
109
+ import { TypographyEx as TypographyEx3 } from "@xyo-network/react-shared";
110
+
111
+ // src/components/GasFees/components/GweiLabelTypography.tsx
112
+ import { TypographyEx as TypographyEx2 } from "@xyo-network/react-shared";
113
+ import { jsx as jsx5 } from "react/jsx-runtime";
114
+ var GweiLabelTypography = (props) => /* @__PURE__ */ jsx5(TypographyEx2, { variant: "caption", ...props, children: "GWEI" });
115
+
116
+ // src/components/GasFees/components/GasPriceBox.tsx
117
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
118
+ var GasPriceBox = ({ gasPrice, ...props }) => {
119
+ const theme = useTheme3();
120
+ return /* @__PURE__ */ jsxs3(FlexRow3, { columnGap: 1.5, rowGap: 1.5, alignItems: "end", ...props, children: [
121
+ /* @__PURE__ */ jsx6(TypographyEx3, { lineHeight: 1, fontWeight: "200", fontSize: theme.spacing(6), title: gasPrice?.toString() ?? "", children: gasPrice?.toFixed(2) }),
122
+ /* @__PURE__ */ jsx6(GweiLabelTypography, { fontSize: theme.spacing(2) })
123
+ ] });
124
+ };
125
+
126
+ // src/components/GasFees/components/PriorityFeeBox.tsx
127
+ import { LocalGasStationRounded as LocalGasStationRoundedIcon2 } from "@mui/icons-material";
128
+ import { useTheme as useTheme4 } from "@mui/material";
129
+ import { FlexCol, FlexGrowRow } from "@xylabs/react-flexbox";
130
+ import { TypographyEx as TypographyEx4 } from "@xyo-network/react-shared";
131
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
132
+ var PriorityFeeBox = ({ priorityFee, priorityFeeLabel = "Priority Fee", ...props }) => {
133
+ const theme = useTheme4();
134
+ return /* @__PURE__ */ jsxs4(FlexGrowRow, { width: "100%", justifyContent: "space-between", alignItems: "end", ...props, children: [
135
+ /* @__PURE__ */ jsxs4(FlexCol, { alignItems: "start", children: [
136
+ /* @__PURE__ */ jsx7(TypographyEx4, { children: priorityFeeLabel }),
137
+ /* @__PURE__ */ jsxs4(TypographyEx4, { title: priorityFee?.toString() ?? "", children: [
138
+ priorityFee?.toFixed(2),
139
+ " ",
140
+ /* @__PURE__ */ jsx7(GweiLabelTypography, { fontSize: theme.spacing(1) })
141
+ ] })
142
+ ] }),
143
+ /* @__PURE__ */ jsx7(LocalGasStationRoundedIcon2, {})
144
+ ] });
145
+ };
146
+
147
+ // src/components/GasFees/components/SpeedBox.tsx
148
+ import { useTheme as useTheme5 } from "@mui/material";
149
+ import { FlexGrowCol } from "@xylabs/react-flexbox";
150
+ import { TypographyEx as TypographyEx5 } from "@xyo-network/react-shared";
151
+ import { jsx as jsx8 } from "react/jsx-runtime";
152
+ var SpeedBox = ({ speed, ...props }) => {
153
+ const theme = useTheme5();
154
+ return speed ? /* @__PURE__ */ jsx8(FlexGrowCol, { ...props, children: /* @__PURE__ */ jsx8(TypographyEx5, { fontSize: theme.spacing(3), fontWeight: "200", p: 1, children: speed }) }) : null;
155
+ };
156
+
157
+ // src/components/GasFees/Card.tsx
158
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
159
+ var GasFeeCard = ({ gasPrice, speedPaperElevation, priorityFee, priorityFeeLabel, speed = "low", ...props }) => {
160
+ const theme = useTheme6();
161
+ return /* @__PURE__ */ jsx9(Card, { sx: { p: 0 }, ...props, children: /* @__PURE__ */ jsxs5(CardContentEx, { removePadding: true, sx: { flexDirection: "column", flexGrow: 1, p: 0, rowGap: 2 }, children: [
162
+ /* @__PURE__ */ jsxs5(FlexGrowCol2, { bgcolor: theme.palette.secondary.dark, alignItems: "start", p: 2, rowGap: 1.5, color: theme.palette.common.white, children: [
163
+ /* @__PURE__ */ jsx9(GasPriceBox, { gasPrice }),
164
+ priorityFee ? /* @__PURE__ */ jsx9(PriorityFeeBox, { priorityFee, priorityFeeLabel }) : null
165
+ ] }),
166
+ /* @__PURE__ */ jsx9(Paper, { elevation: speedPaperElevation, sx: { borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px` }, children: /* @__PURE__ */ jsx9(SpeedBox, { speed }) })
167
+ ] }) });
168
+ };
169
+
170
+ // src/components/HeaderBox.tsx
171
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
172
+ var GasPriceWitnessHeaderBox = ({ heading, parsedPayload, ...props }) => {
173
+ return /* @__PURE__ */ jsxs6(StyledGasPriceHeaderBox, { ...props, children: [
174
+ /* @__PURE__ */ jsx10(GasPriceHeaderTypography, { heading }),
175
+ /* @__PURE__ */ jsx10(
176
+ GasPriceHeaderActionsBox,
177
+ {
178
+ timestamp: parsedPayload?.timestamp,
179
+ baseFee: parsedPayload?.baseFee?.value,
180
+ baseFeeLabel: parsedPayload?.baseFee?.label,
181
+ blockNumber: parsedPayload?.blockNumber?.value,
182
+ blockNumberLabel: parsedPayload?.blockNumber?.label
183
+ }
184
+ )
185
+ ] });
186
+ };
187
+
188
+ // src/components/RawPayload/ToggleRawPayloadBox.tsx
189
+ import { Button, Collapse, Paper as Paper2 } from "@mui/material";
190
+ import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
191
+ import { useState } from "react";
192
+ import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
193
+ var ToggleRawPayloadBox = ({ gasPricePayload, ...props }) => {
194
+ const [collapse, setCollapse] = useState(false);
195
+ return gasPricePayload ? /* @__PURE__ */ jsxs7(FlexCol2, { rowGap: 1, ...props, children: [
196
+ /* @__PURE__ */ jsx11(Button, { color: "secondary", sx: { bgcolor: "secondary.dark", color: "white" }, variant: "contained", onClick: () => setCollapse(!collapse), children: "Raw Payload" }),
197
+ /* @__PURE__ */ jsx11(Collapse, { in: collapse, children: /* @__PURE__ */ jsx11(Paper2, { elevation: 4, sx: { p: 2 }, children: /* @__PURE__ */ jsx11("pre", { children: JSON.stringify(gasPricePayload, null, 2) }) }) })
198
+ ] }) : null;
199
+ };
200
+ export {
201
+ EthereumGasPriceAvatar,
202
+ GasFeeCard,
203
+ GasPriceHeaderActionsBox,
204
+ GasPriceHeaderTypography,
205
+ GasPriceHeadingTypography,
206
+ GasPriceWitnessCardHeader,
207
+ GasPriceWitnessHeaderBox,
208
+ StyledCardHeader,
209
+ StyledGasPriceHeaderBox,
210
+ ToggleRawPayloadBox
211
+ };
8
212
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './Avatar'\nexport * from './CardHeader'\nexport * from './GasFees'\nexport * from './HeaderBox'\nexport * from './HeaderComponents'\nexport * from './layout'\nexport * from './RawPayload'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/Avatar/EthereumGasPriceAvatar.tsx","../../../src/components/CardHeader/CardHeader.tsx","../../../src/components/HeaderComponents/Actions.tsx","../../../src/components/HeaderComponents/Header/Header.tsx","../../../src/components/HeaderComponents/Header/Heading.tsx","../../../src/components/layout/Header.tsx","../../../src/components/layout/StyledCardHeader.tsx","../../../src/components/GasFees/Card.tsx","../../../src/components/GasFees/components/GasPriceBox.tsx","../../../src/components/GasFees/components/GweiLabelTypography.tsx","../../../src/components/GasFees/components/PriorityFeeBox.tsx","../../../src/components/GasFees/components/SpeedBox.tsx","../../../src/components/HeaderBox.tsx","../../../src/components/RawPayload/ToggleRawPayloadBox.tsx"],"sourcesContent":["import { LocalGasStationRounded as LocalGasStationRoundedIcon } from '@mui/icons-material'\nimport { Avatar, AvatarProps } from '@mui/material'\n\nexport const EthereumGasPriceAvatar: React.FC<AvatarProps> = ({ ...props }) => {\n return (\n <Avatar {...props}>\n <LocalGasStationRoundedIcon />\n </Avatar>\n )\n}\n","import { CardProps } from '@mui/material'\nimport { forwardRef } from 'react'\n\nimport { GasPriceWitnessUIBasePayload } from '../../types'\nimport { GasPriceHeaderActionsBox, GasPriceHeaderTypography } from '../HeaderComponents'\nimport { StyledCardHeader } from '../layout'\n\nexport interface GasPriceCardHeaderProps extends CardProps {\n parsedPayload?: GasPriceWitnessUIBasePayload\n title?: string\n}\nexport const GasPriceWitnessCardHeader = forwardRef<HTMLDivElement, GasPriceCardHeaderProps>(({ title, parsedPayload, ...props }, ref) => (\n <StyledCardHeader\n title={<GasPriceHeaderTypography heading={title} />}\n action={\n <GasPriceHeaderActionsBox\n timestamp={parsedPayload?.timestamp}\n baseFee={parsedPayload?.baseFee?.value}\n baseFeeLabel={parsedPayload?.baseFee?.label}\n blockNumber={parsedPayload?.blockNumber?.value}\n blockNumberLabel={parsedPayload?.blockNumber?.label}\n />\n }\n ref={ref}\n {...props}\n />\n))\n\nGasPriceWitnessCardHeader.displayName = 'GasPriceWitnessCardHeader'\n","import { Chip } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\n\nexport interface GasPriceEstimateActionsBoxProps extends FlexBoxProps {\n baseFee?: number\n baseFeeLabel?: string\n blockNumber?: number\n blockNumberLabel?: string\n timestamp?: number\n}\n\nexport const GasPriceHeaderActionsBox: React.FC<GasPriceEstimateActionsBoxProps> = ({\n baseFee,\n baseFeeLabel = 'Base Fee',\n blockNumber,\n blockNumberLabel = 'Block Number',\n timestamp,\n ...props\n}) => {\n return (\n <FlexRow columnGap={1} rowGap={1} flexWrap=\"wrap\" {...props}>\n {timestamp ? <Chip label={new Date(timestamp).toLocaleString()} /> : null}\n {baseFee ? <Chip label={`${baseFeeLabel} - ${baseFee.toFixed(2)} GWEI`} /> : null}\n {blockNumber ? <Chip label={`${blockNumberLabel} - ${blockNumber}`} /> : null}\n </FlexRow>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { TypographyExProps, useGetTokenData } from '@xyo-network/react-shared'\n\nimport { GasPriceHeadingTypography } from './Heading'\n\nexport interface GasPriceHeaderTypographyProps extends TypographyExProps, WithChildren {\n heading?: string\n}\n\nexport const GasPriceHeaderTypography: React.FC<GasPriceHeaderTypographyProps> = ({ heading, children, ...props }) => {\n const theme = useTheme()\n const [ethData] = useGetTokenData(['eth'])\n const networkIcon = <img height={theme.spacing(4)} src={ethData.icon} />\n\n return (\n <GasPriceHeadingTypography heading={heading} networkIcon={networkIcon} {...props}>\n {children}\n </GasPriceHeadingTypography>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { TypographyEx, TypographyExProps } from '@xyo-network/react-shared'\nimport { ReactNode } from 'react'\n\nexport interface GasPriceHeadingTypographyProps extends TypographyExProps {\n children?: ReactNode\n heading?: string\n networkIcon?: ReactNode\n}\n\nexport const GasPriceHeadingTypography: React.FC<GasPriceHeadingTypographyProps> = ({ children, heading, networkIcon, ...props }) => {\n const theme = useTheme()\n return (\n <TypographyEx fontSize={theme.spacing(6)} lineHeight={1} {...props}>\n {heading} {networkIcon} {children}\n </TypographyEx>\n )\n}\n","import { styled } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nexport const StyledGasPriceHeaderBox = styled(FlexRow, { name: 'StyledGasPriceEstimateBox' })(({ theme }) => ({\n alignItems: 'end',\n columnGap: theme.spacing(2),\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n justifyItems: 'space-between',\n rowGap: theme.spacing(2),\n width: '100%',\n}))\n","import { CardHeader, styled } from '@mui/material'\n\nexport const StyledCardHeader = styled(CardHeader, { name: 'StyledCardHeader' })(({ theme }) => ({\n flexWrap: 'wrap',\n rowGap: theme.spacing(2),\n}))\n","import { Card, CardProps, Paper, useTheme } from '@mui/material'\nimport { FlexGrowCol } from '@xylabs/react-flexbox'\nimport { CardContentEx } from '@xyo-network/react-card'\n\nimport { GasPriceBox, PriorityFeeBox, SpeedBox } from './components'\n\nexport interface GasFeeCardProps extends CardProps {\n gasPrice?: number\n priorityFee?: number\n priorityFeeLabel?: string\n speed?: string\n speedPaperElevation?: number\n}\n\nexport const GasFeeCard: React.FC<GasFeeCardProps> = ({ gasPrice, speedPaperElevation, priorityFee, priorityFeeLabel, speed = 'low', ...props }) => {\n const theme = useTheme()\n\n return (\n <Card sx={{ p: 0 }} {...props}>\n <CardContentEx removePadding sx={{ flexDirection: 'column', flexGrow: 1, p: 0, rowGap: 2 }}>\n <FlexGrowCol bgcolor={theme.palette.secondary.dark} alignItems=\"start\" p={2} rowGap={1.5} color={theme.palette.common.white}>\n <GasPriceBox gasPrice={gasPrice} />\n {priorityFee ? <PriorityFeeBox priorityFee={priorityFee} priorityFeeLabel={priorityFeeLabel} /> : null}\n </FlexGrowCol>\n <Paper elevation={speedPaperElevation} sx={{ borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px` }}>\n <SpeedBox speed={speed} />\n </Paper>\n </CardContentEx>\n </Card>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { TypographyEx } from '@xyo-network/react-shared'\n\nimport { GweiLabelTypography } from './GweiLabelTypography'\n\nexport interface GasPriceBoxProps extends FlexBoxProps {\n gasPrice?: number\n}\n\nexport const GasPriceBox: React.FC<GasPriceBoxProps> = ({ gasPrice, ...props }) => {\n const theme = useTheme()\n return (\n <FlexRow columnGap={1.5} rowGap={1.5} alignItems=\"end\" {...props}>\n <TypographyEx lineHeight={1} fontWeight=\"200\" fontSize={theme.spacing(6)} title={gasPrice?.toString() ?? ''}>\n {gasPrice?.toFixed(2)}\n </TypographyEx>\n <GweiLabelTypography fontSize={theme.spacing(2)} />\n </FlexRow>\n )\n}\n","import { TypographyEx, TypographyExProps } from '@xyo-network/react-shared'\n\nexport const GweiLabelTypography: React.FC<TypographyExProps> = (props) => (\n <TypographyEx variant=\"caption\" {...props}>\n GWEI\n </TypographyEx>\n)\n","import { LocalGasStationRounded as LocalGasStationRoundedIcon } from '@mui/icons-material'\nimport { useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport { TypographyEx } from '@xyo-network/react-shared'\n\nimport { GweiLabelTypography } from './GweiLabelTypography'\n\nexport interface PriorityFeeBoxProps extends FlexBoxProps {\n priorityFee?: number\n priorityFeeLabel?: string\n}\n\nexport const PriorityFeeBox: React.FC<PriorityFeeBoxProps> = ({ priorityFee, priorityFeeLabel = 'Priority Fee', ...props }) => {\n const theme = useTheme()\n\n return (\n <FlexGrowRow width=\"100%\" justifyContent=\"space-between\" alignItems=\"end\" {...props}>\n <FlexCol alignItems=\"start\">\n <TypographyEx>{priorityFeeLabel}</TypographyEx>\n <TypographyEx title={priorityFee?.toString() ?? ''}>\n {priorityFee?.toFixed(2)} <GweiLabelTypography fontSize={theme.spacing(1)} />\n </TypographyEx>\n </FlexCol>\n <LocalGasStationRoundedIcon />\n </FlexGrowRow>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexGrowCol } from '@xylabs/react-flexbox'\nimport { TypographyEx } from '@xyo-network/react-shared'\n\nexport interface SpeedBoxProps extends FlexBoxProps {\n speed?: string\n}\n\nexport const SpeedBox: React.FC<SpeedBoxProps> = ({ speed, ...props }) => {\n const theme = useTheme()\n\n return speed ? (\n <FlexGrowCol {...props}>\n <TypographyEx fontSize={theme.spacing(3)} fontWeight=\"200\" p={1}>\n {speed}\n </TypographyEx>\n </FlexGrowCol>\n ) : null\n}\n","import { FlexBoxProps } from '@xylabs/react-flexbox'\n\nimport { GasPriceWitnessUIBasePayload } from '../types'\nimport { GasPriceHeaderActionsBox, GasPriceHeaderTypography } from './HeaderComponents'\nimport { StyledGasPriceHeaderBox } from './layout'\n\nexport interface GasPriceWitnessHeaderBoxProps extends FlexBoxProps {\n heading?: string\n parsedPayload?: GasPriceWitnessUIBasePayload\n}\n\nexport const GasPriceWitnessHeaderBox: React.FC<GasPriceWitnessHeaderBoxProps> = ({ heading, parsedPayload, ...props }) => {\n return (\n <StyledGasPriceHeaderBox {...props}>\n <GasPriceHeaderTypography heading={heading} />\n <GasPriceHeaderActionsBox\n timestamp={parsedPayload?.timestamp}\n baseFee={parsedPayload?.baseFee?.value}\n baseFeeLabel={parsedPayload?.baseFee?.label}\n blockNumber={parsedPayload?.blockNumber?.value}\n blockNumberLabel={parsedPayload?.blockNumber?.label}\n />\n </StyledGasPriceHeaderBox>\n )\n}\n","import { Button, Collapse, Paper } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport { useState } from 'react'\n\nexport interface ToggleRawPayloadBoxProps extends FlexBoxProps {\n gasPricePayload?: object\n}\n\nexport const ToggleRawPayloadBox: React.FC<ToggleRawPayloadBoxProps> = ({ gasPricePayload, ...props }) => {\n const [collapse, setCollapse] = useState(false)\n return gasPricePayload ? (\n <FlexCol rowGap={1} {...props}>\n <Button color=\"secondary\" sx={{ bgcolor: 'secondary.dark', color: 'white' }} variant=\"contained\" onClick={() => setCollapse(!collapse)}>\n Raw Payload\n </Button>\n <Collapse in={collapse}>\n <Paper elevation={4} sx={{ p: 2 }}>\n <pre>{JSON.stringify(gasPricePayload, null, 2)}</pre>\n </Paper>\n </Collapse>\n </FlexCol>\n ) : null\n}\n"],"mappings":";AAAA,SAAS,0BAA0B,kCAAkC;AACrE,SAAS,cAA2B;AAK9B;AAHC,IAAM,yBAAgD,CAAC,EAAE,GAAG,MAAM,MAAM;AAC7E,SACE,oBAAC,UAAQ,GAAG,OACV,8BAAC,8BAA2B,GAC9B;AAEJ;;;ACRA,SAAS,kBAAkB;;;ACD3B,SAAS,YAAY;AACrB,SAAuB,eAAe;AAmBlC,SACe,OAAAA,MADf;AATG,IAAM,2BAAsE,CAAC;AAAA,EAClF;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SACE,qBAAC,WAAQ,WAAW,GAAG,QAAQ,G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;;;ACxBA,SAAS,QAAQ,UAAU,SAAAE,cAAa;AACxC,SAAuB,WAAAC,gBAAe;AACtC,SAAS,gBAAgB;AASrB,SACE,OAAAC,OADF,QAAAC,aAAA;AAHG,IAAM,sBAA0D,CAAC,EAAE,iBAAiB,GAAG,MAAM,MAAM;AACxG,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,SAAO,kBACL,gBAAAA,MAACF,UAAA,EAAQ,QAAQ,GAAI,GAAG,OACtB;AAAA,oBAAAC,MAAC,UAAO,OAAM,aAAY,IAAI,EAAE,SAAS,kBAAkB,OAAO,QAAQ,GAAG,SAAQ,aAAY,SAAS,MAAM,YAAY,CAAC,QAAQ,GAAG,yBAExI;AAAA,IACA,gBAAAA,MAAC,YAAS,IAAI,UACZ,0BAAAA,MAACF,QAAA,EAAM,WAAW,GAAG,IAAI,EAAE,GAAG,EAAE,GAC9B,0BAAAE,MAAC,SAAK,eAAK,UAAU,iBAAiB,MAAM,CAAC,GAAE,GACjD,GACF;AAAA,KACF,IACE;AACN;","names":["jsx","useTheme","jsxs","jsx","useTheme","FlexRow","styled","jsx","useTheme","FlexGrowCol","useTheme","FlexRow","TypographyEx","TypographyEx","jsx","jsx","jsxs","useTheme","FlexRow","TypographyEx","LocalGasStationRoundedIcon","useTheme","TypographyEx","jsx","jsxs","useTheme","TypographyEx","LocalGasStationRoundedIcon","useTheme","TypographyEx","jsx","jsx","jsxs","useTheme","FlexGrowCol","jsx","jsxs","Paper","FlexCol","jsx","jsxs"]}
@@ -1,6 +1,7 @@
1
+ // src/components/layout/Header.tsx
1
2
  import { styled } from "@mui/material";
2
3
  import { FlexRow } from "@xylabs/react-flexbox";
3
- const StyledGasPriceHeaderBox = styled(FlexRow, { name: "StyledGasPriceEstimateBox" })(({ theme }) => ({
4
+ var StyledGasPriceHeaderBox = styled(FlexRow, { name: "StyledGasPriceEstimateBox" })(({ theme }) => ({
4
5
  alignItems: "end",
5
6
  columnGap: theme.spacing(2),
6
7
  flexWrap: "wrap",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/layout/Header.tsx"],"sourcesContent":["import { styled } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nexport const StyledGasPriceHeaderBox = styled(FlexRow, { name: 'StyledGasPriceEstimateBox' })(({ theme }) => ({\n alignItems: 'end',\n columnGap: theme.spacing(2),\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n justifyItems: 'space-between',\n rowGap: theme.spacing(2),\n width: '100%',\n}))\n"],"mappings":"AAAA,SAAS,cAAc;AACvB,SAAS,eAAe;AAEjB,MAAM,0BAA0B,OAAO,SAAS,EAAE,MAAM,4BAA4B,CAAC,EAAE,CAAC,EAAE,MAAM,OAAO;AAAA,EAC5G,YAAY;AAAA,EACZ,WAAW,MAAM,QAAQ,CAAC;AAAA,EAC1B,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,QAAQ,MAAM,QAAQ,CAAC;AAAA,EACvB,OAAO;AACT,EAAE;","names":[]}
1
+ {"version":3,"sources":["../../../../src/components/layout/Header.tsx"],"sourcesContent":["import { styled } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nexport const StyledGasPriceHeaderBox = styled(FlexRow, { name: 'StyledGasPriceEstimateBox' })(({ theme }) => ({\n alignItems: 'end',\n columnGap: theme.spacing(2),\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n justifyItems: 'space-between',\n rowGap: theme.spacing(2),\n width: '100%',\n}))\n"],"mappings":";AAAA,SAAS,cAAc;AACvB,SAAS,eAAe;AAEjB,IAAM,0BAA0B,OAAO,SAAS,EAAE,MAAM,4BAA4B,CAAC,EAAE,CAAC,EAAE,MAAM,OAAO;AAAA,EAC5G,YAAY;AAAA,EACZ,WAAW,MAAM,QAAQ,CAAC;AAAA,EAC1B,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,QAAQ,MAAM,QAAQ,CAAC;AAAA,EACvB,OAAO;AACT,EAAE;","names":[]}
@@ -1,5 +1,6 @@
1
+ // src/components/layout/StyledCardHeader.tsx
1
2
  import { CardHeader, styled } from "@mui/material";
2
- const StyledCardHeader = styled(CardHeader, { name: "StyledCardHeader" })(({ theme }) => ({
3
+ var StyledCardHeader = styled(CardHeader, { name: "StyledCardHeader" })(({ theme }) => ({
3
4
  flexWrap: "wrap",
4
5
  rowGap: theme.spacing(2)
5
6
  }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/layout/StyledCardHeader.tsx"],"sourcesContent":["import { CardHeader, styled } from '@mui/material'\n\nexport const StyledCardHeader = styled(CardHeader, { name: 'StyledCardHeader' })(({ theme }) => ({\n flexWrap: 'wrap',\n rowGap: theme.spacing(2),\n}))\n"],"mappings":"AAAA,SAAS,YAAY,cAAc;AAE5B,MAAM,mBAAmB,OAAO,YAAY,EAAE,MAAM,mBAAmB,CAAC,EAAE,CAAC,EAAE,MAAM,OAAO;AAAA,EAC/F,UAAU;AAAA,EACV,QAAQ,MAAM,QAAQ,CAAC;AACzB,EAAE;","names":[]}
1
+ {"version":3,"sources":["../../../../src/components/layout/StyledCardHeader.tsx"],"sourcesContent":["import { CardHeader, styled } from '@mui/material'\n\nexport const StyledCardHeader = styled(CardHeader, { name: 'StyledCardHeader' })(({ theme }) => ({\n flexWrap: 'wrap',\n rowGap: theme.spacing(2),\n}))\n"],"mappings":";AAAA,SAAS,YAAY,cAAc;AAE5B,IAAM,mBAAmB,OAAO,YAAY,EAAE,MAAM,mBAAmB,CAAC,EAAE,CAAC,EAAE,MAAM,OAAO;AAAA,EAC/F,UAAU;AAAA,EACV,QAAQ,MAAM,QAAQ,CAAC;AACzB,EAAE;","names":[]}
@@ -1,3 +1,24 @@
1
- export * from "./Header";
2
- export * from "./StyledCardHeader";
1
+ // src/components/layout/Header.tsx
2
+ import { styled } from "@mui/material";
3
+ import { FlexRow } from "@xylabs/react-flexbox";
4
+ var StyledGasPriceHeaderBox = styled(FlexRow, { name: "StyledGasPriceEstimateBox" })(({ theme }) => ({
5
+ alignItems: "end",
6
+ columnGap: theme.spacing(2),
7
+ flexWrap: "wrap",
8
+ justifyContent: "space-between",
9
+ justifyItems: "space-between",
10
+ rowGap: theme.spacing(2),
11
+ width: "100%"
12
+ }));
13
+
14
+ // src/components/layout/StyledCardHeader.tsx
15
+ import { CardHeader, styled as styled2 } from "@mui/material";
16
+ var StyledCardHeader = styled2(CardHeader, { name: "StyledCardHeader" })(({ theme }) => ({
17
+ flexWrap: "wrap",
18
+ rowGap: theme.spacing(2)
19
+ }));
20
+ export {
21
+ StyledCardHeader,
22
+ StyledGasPriceHeaderBox
23
+ };
3
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/layout/index.ts"],"sourcesContent":["export * from './Header'\nexport * from './StyledCardHeader'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../../../src/components/layout/Header.tsx","../../../../src/components/layout/StyledCardHeader.tsx"],"sourcesContent":["import { styled } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nexport const StyledGasPriceHeaderBox = styled(FlexRow, { name: 'StyledGasPriceEstimateBox' })(({ theme }) => ({\n alignItems: 'end',\n columnGap: theme.spacing(2),\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n justifyItems: 'space-between',\n rowGap: theme.spacing(2),\n width: '100%',\n}))\n","import { CardHeader, styled } from '@mui/material'\n\nexport const StyledCardHeader = styled(CardHeader, { name: 'StyledCardHeader' })(({ theme }) => ({\n flexWrap: 'wrap',\n rowGap: theme.spacing(2),\n}))\n"],"mappings":";AAAA,SAAS,cAAc;AACvB,SAAS,eAAe;AAEjB,IAAM,0BAA0B,OAAO,SAAS,EAAE,MAAM,4BAA4B,CAAC,EAAE,CAAC,EAAE,MAAM,OAAO;AAAA,EAC5G,YAAY;AAAA,EACZ,WAAW,MAAM,QAAQ,CAAC;AAAA,EAC1B,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,QAAQ,MAAM,QAAQ,CAAC;AAAA,EACvB,OAAO;AACT,EAAE;;;ACXF,SAAS,YAAY,UAAAA,eAAc;AAE5B,IAAM,mBAAmBA,QAAO,YAAY,EAAE,MAAM,mBAAmB,CAAC,EAAE,CAAC,EAAE,MAAM,OAAO;AAAA,EAC/F,UAAU;AAAA,EACV,QAAQ,MAAM,QAAQ,CAAC;AACzB,EAAE;","names":["styled"]}
@@ -1,3 +1,212 @@
1
- export * from "./components";
2
- export * from "./types";
1
+ // src/components/Avatar/EthereumGasPriceAvatar.tsx
2
+ import { LocalGasStationRounded as LocalGasStationRoundedIcon } from "@mui/icons-material";
3
+ import { Avatar } from "@mui/material";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var EthereumGasPriceAvatar = ({ ...props }) => {
6
+ return /* @__PURE__ */ jsx(Avatar, { ...props, children: /* @__PURE__ */ jsx(LocalGasStationRoundedIcon, {}) });
7
+ };
8
+
9
+ // src/components/CardHeader/CardHeader.tsx
10
+ import { forwardRef } from "react";
11
+
12
+ // src/components/HeaderComponents/Actions.tsx
13
+ import { Chip } from "@mui/material";
14
+ import { FlexRow } from "@xylabs/react-flexbox";
15
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
16
+ var GasPriceHeaderActionsBox = ({
17
+ baseFee,
18
+ baseFeeLabel = "Base Fee",
19
+ blockNumber,
20
+ blockNumberLabel = "Block Number",
21
+ timestamp,
22
+ ...props
23
+ }) => {
24
+ return /* @__PURE__ */ jsxs(FlexRow, { columnGap: 1, rowGap: 1, flexWrap: "wrap", ...props, children: [
25
+ timestamp ? /* @__PURE__ */ jsx2(Chip, { label: new Date(timestamp).toLocaleString() }) : null,
26
+ baseFee ? /* @__PURE__ */ jsx2(Chip, { label: `${baseFeeLabel} - ${baseFee.toFixed(2)} GWEI` }) : null,
27
+ blockNumber ? /* @__PURE__ */ jsx2(Chip, { label: `${blockNumberLabel} - ${blockNumber}` }) : null
28
+ ] });
29
+ };
30
+
31
+ // src/components/HeaderComponents/Header/Header.tsx
32
+ import { useTheme as useTheme2 } from "@mui/material";
33
+ import { useGetTokenData } from "@xyo-network/react-shared";
34
+
35
+ // src/components/HeaderComponents/Header/Heading.tsx
36
+ import { useTheme } from "@mui/material";
37
+ import { TypographyEx } from "@xyo-network/react-shared";
38
+ import { jsxs as jsxs2 } from "react/jsx-runtime";
39
+ var GasPriceHeadingTypography = ({ children, heading, networkIcon, ...props }) => {
40
+ const theme = useTheme();
41
+ return /* @__PURE__ */ jsxs2(TypographyEx, { fontSize: theme.spacing(6), lineHeight: 1, ...props, children: [
42
+ heading,
43
+ " ",
44
+ networkIcon,
45
+ " ",
46
+ children
47
+ ] });
48
+ };
49
+
50
+ // src/components/HeaderComponents/Header/Header.tsx
51
+ import { jsx as jsx3 } from "react/jsx-runtime";
52
+ var GasPriceHeaderTypography = ({ heading, children, ...props }) => {
53
+ const theme = useTheme2();
54
+ const [ethData] = useGetTokenData(["eth"]);
55
+ const networkIcon = /* @__PURE__ */ jsx3("img", { height: theme.spacing(4), src: ethData.icon });
56
+ return /* @__PURE__ */ jsx3(GasPriceHeadingTypography, { heading, networkIcon, ...props, children });
57
+ };
58
+
59
+ // src/components/layout/Header.tsx
60
+ import { styled } from "@mui/material";
61
+ import { FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
62
+ var StyledGasPriceHeaderBox = styled(FlexRow2, { name: "StyledGasPriceEstimateBox" })(({ theme }) => ({
63
+ alignItems: "end",
64
+ columnGap: theme.spacing(2),
65
+ flexWrap: "wrap",
66
+ justifyContent: "space-between",
67
+ justifyItems: "space-between",
68
+ rowGap: theme.spacing(2),
69
+ width: "100%"
70
+ }));
71
+
72
+ // src/components/layout/StyledCardHeader.tsx
73
+ import { CardHeader, styled as styled2 } from "@mui/material";
74
+ var StyledCardHeader = styled2(CardHeader, { name: "StyledCardHeader" })(({ theme }) => ({
75
+ flexWrap: "wrap",
76
+ rowGap: theme.spacing(2)
77
+ }));
78
+
79
+ // src/components/CardHeader/CardHeader.tsx
80
+ import { jsx as jsx4 } from "react/jsx-runtime";
81
+ var GasPriceWitnessCardHeader = forwardRef(({ title, parsedPayload, ...props }, ref) => /* @__PURE__ */ jsx4(
82
+ StyledCardHeader,
83
+ {
84
+ title: /* @__PURE__ */ jsx4(GasPriceHeaderTypography, { heading: title }),
85
+ action: /* @__PURE__ */ jsx4(
86
+ GasPriceHeaderActionsBox,
87
+ {
88
+ timestamp: parsedPayload?.timestamp,
89
+ baseFee: parsedPayload?.baseFee?.value,
90
+ baseFeeLabel: parsedPayload?.baseFee?.label,
91
+ blockNumber: parsedPayload?.blockNumber?.value,
92
+ blockNumberLabel: parsedPayload?.blockNumber?.label
93
+ }
94
+ ),
95
+ ref,
96
+ ...props
97
+ }
98
+ ));
99
+ GasPriceWitnessCardHeader.displayName = "GasPriceWitnessCardHeader";
100
+
101
+ // src/components/GasFees/Card.tsx
102
+ import { Card, Paper, useTheme as useTheme6 } from "@mui/material";
103
+ import { FlexGrowCol as FlexGrowCol2 } from "@xylabs/react-flexbox";
104
+ import { CardContentEx } from "@xyo-network/react-card";
105
+
106
+ // src/components/GasFees/components/GasPriceBox.tsx
107
+ import { useTheme as useTheme3 } from "@mui/material";
108
+ import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
109
+ import { TypographyEx as TypographyEx3 } from "@xyo-network/react-shared";
110
+
111
+ // src/components/GasFees/components/GweiLabelTypography.tsx
112
+ import { TypographyEx as TypographyEx2 } from "@xyo-network/react-shared";
113
+ import { jsx as jsx5 } from "react/jsx-runtime";
114
+ var GweiLabelTypography = (props) => /* @__PURE__ */ jsx5(TypographyEx2, { variant: "caption", ...props, children: "GWEI" });
115
+
116
+ // src/components/GasFees/components/GasPriceBox.tsx
117
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
118
+ var GasPriceBox = ({ gasPrice, ...props }) => {
119
+ const theme = useTheme3();
120
+ return /* @__PURE__ */ jsxs3(FlexRow3, { columnGap: 1.5, rowGap: 1.5, alignItems: "end", ...props, children: [
121
+ /* @__PURE__ */ jsx6(TypographyEx3, { lineHeight: 1, fontWeight: "200", fontSize: theme.spacing(6), title: gasPrice?.toString() ?? "", children: gasPrice?.toFixed(2) }),
122
+ /* @__PURE__ */ jsx6(GweiLabelTypography, { fontSize: theme.spacing(2) })
123
+ ] });
124
+ };
125
+
126
+ // src/components/GasFees/components/PriorityFeeBox.tsx
127
+ import { LocalGasStationRounded as LocalGasStationRoundedIcon2 } from "@mui/icons-material";
128
+ import { useTheme as useTheme4 } from "@mui/material";
129
+ import { FlexCol, FlexGrowRow } from "@xylabs/react-flexbox";
130
+ import { TypographyEx as TypographyEx4 } from "@xyo-network/react-shared";
131
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
132
+ var PriorityFeeBox = ({ priorityFee, priorityFeeLabel = "Priority Fee", ...props }) => {
133
+ const theme = useTheme4();
134
+ return /* @__PURE__ */ jsxs4(FlexGrowRow, { width: "100%", justifyContent: "space-between", alignItems: "end", ...props, children: [
135
+ /* @__PURE__ */ jsxs4(FlexCol, { alignItems: "start", children: [
136
+ /* @__PURE__ */ jsx7(TypographyEx4, { children: priorityFeeLabel }),
137
+ /* @__PURE__ */ jsxs4(TypographyEx4, { title: priorityFee?.toString() ?? "", children: [
138
+ priorityFee?.toFixed(2),
139
+ " ",
140
+ /* @__PURE__ */ jsx7(GweiLabelTypography, { fontSize: theme.spacing(1) })
141
+ ] })
142
+ ] }),
143
+ /* @__PURE__ */ jsx7(LocalGasStationRoundedIcon2, {})
144
+ ] });
145
+ };
146
+
147
+ // src/components/GasFees/components/SpeedBox.tsx
148
+ import { useTheme as useTheme5 } from "@mui/material";
149
+ import { FlexGrowCol } from "@xylabs/react-flexbox";
150
+ import { TypographyEx as TypographyEx5 } from "@xyo-network/react-shared";
151
+ import { jsx as jsx8 } from "react/jsx-runtime";
152
+ var SpeedBox = ({ speed, ...props }) => {
153
+ const theme = useTheme5();
154
+ return speed ? /* @__PURE__ */ jsx8(FlexGrowCol, { ...props, children: /* @__PURE__ */ jsx8(TypographyEx5, { fontSize: theme.spacing(3), fontWeight: "200", p: 1, children: speed }) }) : null;
155
+ };
156
+
157
+ // src/components/GasFees/Card.tsx
158
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
159
+ var GasFeeCard = ({ gasPrice, speedPaperElevation, priorityFee, priorityFeeLabel, speed = "low", ...props }) => {
160
+ const theme = useTheme6();
161
+ return /* @__PURE__ */ jsx9(Card, { sx: { p: 0 }, ...props, children: /* @__PURE__ */ jsxs5(CardContentEx, { removePadding: true, sx: { flexDirection: "column", flexGrow: 1, p: 0, rowGap: 2 }, children: [
162
+ /* @__PURE__ */ jsxs5(FlexGrowCol2, { bgcolor: theme.palette.secondary.dark, alignItems: "start", p: 2, rowGap: 1.5, color: theme.palette.common.white, children: [
163
+ /* @__PURE__ */ jsx9(GasPriceBox, { gasPrice }),
164
+ priorityFee ? /* @__PURE__ */ jsx9(PriorityFeeBox, { priorityFee, priorityFeeLabel }) : null
165
+ ] }),
166
+ /* @__PURE__ */ jsx9(Paper, { elevation: speedPaperElevation, sx: { borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px` }, children: /* @__PURE__ */ jsx9(SpeedBox, { speed }) })
167
+ ] }) });
168
+ };
169
+
170
+ // src/components/HeaderBox.tsx
171
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
172
+ var GasPriceWitnessHeaderBox = ({ heading, parsedPayload, ...props }) => {
173
+ return /* @__PURE__ */ jsxs6(StyledGasPriceHeaderBox, { ...props, children: [
174
+ /* @__PURE__ */ jsx10(GasPriceHeaderTypography, { heading }),
175
+ /* @__PURE__ */ jsx10(
176
+ GasPriceHeaderActionsBox,
177
+ {
178
+ timestamp: parsedPayload?.timestamp,
179
+ baseFee: parsedPayload?.baseFee?.value,
180
+ baseFeeLabel: parsedPayload?.baseFee?.label,
181
+ blockNumber: parsedPayload?.blockNumber?.value,
182
+ blockNumberLabel: parsedPayload?.blockNumber?.label
183
+ }
184
+ )
185
+ ] });
186
+ };
187
+
188
+ // src/components/RawPayload/ToggleRawPayloadBox.tsx
189
+ import { Button, Collapse, Paper as Paper2 } from "@mui/material";
190
+ import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
191
+ import { useState } from "react";
192
+ import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
193
+ var ToggleRawPayloadBox = ({ gasPricePayload, ...props }) => {
194
+ const [collapse, setCollapse] = useState(false);
195
+ return gasPricePayload ? /* @__PURE__ */ jsxs7(FlexCol2, { rowGap: 1, ...props, children: [
196
+ /* @__PURE__ */ jsx11(Button, { color: "secondary", sx: { bgcolor: "secondary.dark", color: "white" }, variant: "contained", onClick: () => setCollapse(!collapse), children: "Raw Payload" }),
197
+ /* @__PURE__ */ jsx11(Collapse, { in: collapse, children: /* @__PURE__ */ jsx11(Paper2, { elevation: 4, sx: { p: 2 }, children: /* @__PURE__ */ jsx11("pre", { children: JSON.stringify(gasPricePayload, null, 2) }) }) })
198
+ ] }) : null;
199
+ };
200
+ export {
201
+ EthereumGasPriceAvatar,
202
+ GasFeeCard,
203
+ GasPriceHeaderActionsBox,
204
+ GasPriceHeaderTypography,
205
+ GasPriceHeadingTypography,
206
+ GasPriceWitnessCardHeader,
207
+ GasPriceWitnessHeaderBox,
208
+ StyledCardHeader,
209
+ StyledGasPriceHeaderBox,
210
+ ToggleRawPayloadBox
211
+ };
3
212
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './components'\nexport * from './types'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/components/Avatar/EthereumGasPriceAvatar.tsx","../../src/components/CardHeader/CardHeader.tsx","../../src/components/HeaderComponents/Actions.tsx","../../src/components/HeaderComponents/Header/Header.tsx","../../src/components/HeaderComponents/Header/Heading.tsx","../../src/components/layout/Header.tsx","../../src/components/layout/StyledCardHeader.tsx","../../src/components/GasFees/Card.tsx","../../src/components/GasFees/components/GasPriceBox.tsx","../../src/components/GasFees/components/GweiLabelTypography.tsx","../../src/components/GasFees/components/PriorityFeeBox.tsx","../../src/components/GasFees/components/SpeedBox.tsx","../../src/components/HeaderBox.tsx","../../src/components/RawPayload/ToggleRawPayloadBox.tsx"],"sourcesContent":["import { LocalGasStationRounded as LocalGasStationRoundedIcon } from '@mui/icons-material'\nimport { Avatar, AvatarProps } from '@mui/material'\n\nexport const EthereumGasPriceAvatar: React.FC<AvatarProps> = ({ ...props }) => {\n return (\n <Avatar {...props}>\n <LocalGasStationRoundedIcon />\n </Avatar>\n )\n}\n","import { CardProps } from '@mui/material'\nimport { forwardRef } from 'react'\n\nimport { GasPriceWitnessUIBasePayload } from '../../types'\nimport { GasPriceHeaderActionsBox, GasPriceHeaderTypography } from '../HeaderComponents'\nimport { StyledCardHeader } from '../layout'\n\nexport interface GasPriceCardHeaderProps extends CardProps {\n parsedPayload?: GasPriceWitnessUIBasePayload\n title?: string\n}\nexport const GasPriceWitnessCardHeader = forwardRef<HTMLDivElement, GasPriceCardHeaderProps>(({ title, parsedPayload, ...props }, ref) => (\n <StyledCardHeader\n title={<GasPriceHeaderTypography heading={title} />}\n action={\n <GasPriceHeaderActionsBox\n timestamp={parsedPayload?.timestamp}\n baseFee={parsedPayload?.baseFee?.value}\n baseFeeLabel={parsedPayload?.baseFee?.label}\n blockNumber={parsedPayload?.blockNumber?.value}\n blockNumberLabel={parsedPayload?.blockNumber?.label}\n />\n }\n ref={ref}\n {...props}\n />\n))\n\nGasPriceWitnessCardHeader.displayName = 'GasPriceWitnessCardHeader'\n","import { Chip } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\n\nexport interface GasPriceEstimateActionsBoxProps extends FlexBoxProps {\n baseFee?: number\n baseFeeLabel?: string\n blockNumber?: number\n blockNumberLabel?: string\n timestamp?: number\n}\n\nexport const GasPriceHeaderActionsBox: React.FC<GasPriceEstimateActionsBoxProps> = ({\n baseFee,\n baseFeeLabel = 'Base Fee',\n blockNumber,\n blockNumberLabel = 'Block Number',\n timestamp,\n ...props\n}) => {\n return (\n <FlexRow columnGap={1} rowGap={1} flexWrap=\"wrap\" {...props}>\n {timestamp ? <Chip label={new Date(timestamp).toLocaleString()} /> : null}\n {baseFee ? <Chip label={`${baseFeeLabel} - ${baseFee.toFixed(2)} GWEI`} /> : null}\n {blockNumber ? <Chip label={`${blockNumberLabel} - ${blockNumber}`} /> : null}\n </FlexRow>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { TypographyExProps, useGetTokenData } from '@xyo-network/react-shared'\n\nimport { GasPriceHeadingTypography } from './Heading'\n\nexport interface GasPriceHeaderTypographyProps extends TypographyExProps, WithChildren {\n heading?: string\n}\n\nexport const GasPriceHeaderTypography: React.FC<GasPriceHeaderTypographyProps> = ({ heading, children, ...props }) => {\n const theme = useTheme()\n const [ethData] = useGetTokenData(['eth'])\n const networkIcon = <img height={theme.spacing(4)} src={ethData.icon} />\n\n return (\n <GasPriceHeadingTypography heading={heading} networkIcon={networkIcon} {...props}>\n {children}\n </GasPriceHeadingTypography>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { TypographyEx, TypographyExProps } from '@xyo-network/react-shared'\nimport { ReactNode } from 'react'\n\nexport interface GasPriceHeadingTypographyProps extends TypographyExProps {\n children?: ReactNode\n heading?: string\n networkIcon?: ReactNode\n}\n\nexport const GasPriceHeadingTypography: React.FC<GasPriceHeadingTypographyProps> = ({ children, heading, networkIcon, ...props }) => {\n const theme = useTheme()\n return (\n <TypographyEx fontSize={theme.spacing(6)} lineHeight={1} {...props}>\n {heading} {networkIcon} {children}\n </TypographyEx>\n )\n}\n","import { styled } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nexport const StyledGasPriceHeaderBox = styled(FlexRow, { name: 'StyledGasPriceEstimateBox' })(({ theme }) => ({\n alignItems: 'end',\n columnGap: theme.spacing(2),\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n justifyItems: 'space-between',\n rowGap: theme.spacing(2),\n width: '100%',\n}))\n","import { CardHeader, styled } from '@mui/material'\n\nexport const StyledCardHeader = styled(CardHeader, { name: 'StyledCardHeader' })(({ theme }) => ({\n flexWrap: 'wrap',\n rowGap: theme.spacing(2),\n}))\n","import { Card, CardProps, Paper, useTheme } from '@mui/material'\nimport { FlexGrowCol } from '@xylabs/react-flexbox'\nimport { CardContentEx } from '@xyo-network/react-card'\n\nimport { GasPriceBox, PriorityFeeBox, SpeedBox } from './components'\n\nexport interface GasFeeCardProps extends CardProps {\n gasPrice?: number\n priorityFee?: number\n priorityFeeLabel?: string\n speed?: string\n speedPaperElevation?: number\n}\n\nexport const GasFeeCard: React.FC<GasFeeCardProps> = ({ gasPrice, speedPaperElevation, priorityFee, priorityFeeLabel, speed = 'low', ...props }) => {\n const theme = useTheme()\n\n return (\n <Card sx={{ p: 0 }} {...props}>\n <CardContentEx removePadding sx={{ flexDirection: 'column', flexGrow: 1, p: 0, rowGap: 2 }}>\n <FlexGrowCol bgcolor={theme.palette.secondary.dark} alignItems=\"start\" p={2} rowGap={1.5} color={theme.palette.common.white}>\n <GasPriceBox gasPrice={gasPrice} />\n {priorityFee ? <PriorityFeeBox priorityFee={priorityFee} priorityFeeLabel={priorityFeeLabel} /> : null}\n </FlexGrowCol>\n <Paper elevation={speedPaperElevation} sx={{ borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px` }}>\n <SpeedBox speed={speed} />\n </Paper>\n </CardContentEx>\n </Card>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { TypographyEx } from '@xyo-network/react-shared'\n\nimport { GweiLabelTypography } from './GweiLabelTypography'\n\nexport interface GasPriceBoxProps extends FlexBoxProps {\n gasPrice?: number\n}\n\nexport const GasPriceBox: React.FC<GasPriceBoxProps> = ({ gasPrice, ...props }) => {\n const theme = useTheme()\n return (\n <FlexRow columnGap={1.5} rowGap={1.5} alignItems=\"end\" {...props}>\n <TypographyEx lineHeight={1} fontWeight=\"200\" fontSize={theme.spacing(6)} title={gasPrice?.toString() ?? ''}>\n {gasPrice?.toFixed(2)}\n </TypographyEx>\n <GweiLabelTypography fontSize={theme.spacing(2)} />\n </FlexRow>\n )\n}\n","import { TypographyEx, TypographyExProps } from '@xyo-network/react-shared'\n\nexport const GweiLabelTypography: React.FC<TypographyExProps> = (props) => (\n <TypographyEx variant=\"caption\" {...props}>\n GWEI\n </TypographyEx>\n)\n","import { LocalGasStationRounded as LocalGasStationRoundedIcon } from '@mui/icons-material'\nimport { useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport { TypographyEx } from '@xyo-network/react-shared'\n\nimport { GweiLabelTypography } from './GweiLabelTypography'\n\nexport interface PriorityFeeBoxProps extends FlexBoxProps {\n priorityFee?: number\n priorityFeeLabel?: string\n}\n\nexport const PriorityFeeBox: React.FC<PriorityFeeBoxProps> = ({ priorityFee, priorityFeeLabel = 'Priority Fee', ...props }) => {\n const theme = useTheme()\n\n return (\n <FlexGrowRow width=\"100%\" justifyContent=\"space-between\" alignItems=\"end\" {...props}>\n <FlexCol alignItems=\"start\">\n <TypographyEx>{priorityFeeLabel}</TypographyEx>\n <TypographyEx title={priorityFee?.toString() ?? ''}>\n {priorityFee?.toFixed(2)} <GweiLabelTypography fontSize={theme.spacing(1)} />\n </TypographyEx>\n </FlexCol>\n <LocalGasStationRoundedIcon />\n </FlexGrowRow>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexGrowCol } from '@xylabs/react-flexbox'\nimport { TypographyEx } from '@xyo-network/react-shared'\n\nexport interface SpeedBoxProps extends FlexBoxProps {\n speed?: string\n}\n\nexport const SpeedBox: React.FC<SpeedBoxProps> = ({ speed, ...props }) => {\n const theme = useTheme()\n\n return speed ? (\n <FlexGrowCol {...props}>\n <TypographyEx fontSize={theme.spacing(3)} fontWeight=\"200\" p={1}>\n {speed}\n </TypographyEx>\n </FlexGrowCol>\n ) : null\n}\n","import { FlexBoxProps } from '@xylabs/react-flexbox'\n\nimport { GasPriceWitnessUIBasePayload } from '../types'\nimport { GasPriceHeaderActionsBox, GasPriceHeaderTypography } from './HeaderComponents'\nimport { StyledGasPriceHeaderBox } from './layout'\n\nexport interface GasPriceWitnessHeaderBoxProps extends FlexBoxProps {\n heading?: string\n parsedPayload?: GasPriceWitnessUIBasePayload\n}\n\nexport const GasPriceWitnessHeaderBox: React.FC<GasPriceWitnessHeaderBoxProps> = ({ heading, parsedPayload, ...props }) => {\n return (\n <StyledGasPriceHeaderBox {...props}>\n <GasPriceHeaderTypography heading={heading} />\n <GasPriceHeaderActionsBox\n timestamp={parsedPayload?.timestamp}\n baseFee={parsedPayload?.baseFee?.value}\n baseFeeLabel={parsedPayload?.baseFee?.label}\n blockNumber={parsedPayload?.blockNumber?.value}\n blockNumberLabel={parsedPayload?.blockNumber?.label}\n />\n </StyledGasPriceHeaderBox>\n )\n}\n","import { Button, Collapse, Paper } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport { useState } from 'react'\n\nexport interface ToggleRawPayloadBoxProps extends FlexBoxProps {\n gasPricePayload?: object\n}\n\nexport const ToggleRawPayloadBox: React.FC<ToggleRawPayloadBoxProps> = ({ gasPricePayload, ...props }) => {\n const [collapse, setCollapse] = useState(false)\n return gasPricePayload ? (\n <FlexCol rowGap={1} {...props}>\n <Button color=\"secondary\" sx={{ bgcolor: 'secondary.dark', color: 'white' }} variant=\"contained\" onClick={() => setCollapse(!collapse)}>\n Raw Payload\n </Button>\n <Collapse in={collapse}>\n <Paper elevation={4} sx={{ p: 2 }}>\n <pre>{JSON.stringify(gasPricePayload, null, 2)}</pre>\n </Paper>\n </Collapse>\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,0BAAAA,KAAC,YAAS,OAAc,GAC1B;AAAA,KACF,GACF;AAEJ;;;AKjBI,SACE,OAAAI,OADF,QAAAC,aAAA;AAFG,IAAM,2BAAoE,CAAC,EAAE,SAAS,eAAe,GAAG,MAAM,MAAM;AACzH,SACE,gBAAAA,MAAC,2BAAyB,GAAG,OAC3B;AAAA,oBAAAD,MAAC,4BAAyB,SAAkB;AAAA,IAC5C,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,eAAe;AAAA,QAC1B,SAAS,eAAe,SAAS;AAAA,QACjC,cAAc,eAAe,SAAS;AAAA,QACtC,aAAa,eAAe,aAAa;AAAA,QACzC,kBAAkB,eAAe,aAAa;AAAA;AAAA,IAChD;AAAA,KACF;AAEJ;;;ACxBA,SAAS,QAAQ,UAAU,SAAAE,cAAa;AACxC,SAAuB,WAAAC,gBAAe;AACtC,SAAS,gBAAgB;AASrB,SACE,OAAAC,OADF,QAAAC,aAAA;AAHG,IAAM,sBAA0D,CAAC,EAAE,iBAAiB,GAAG,MAAM,MAAM;AACxG,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,SAAO,kBACL,gBAAAA,MAACF,UAAA,EAAQ,QAAQ,GAAI,GAAG,OACtB;AAAA,oBAAAC,MAAC,UAAO,OAAM,aAAY,IAAI,EAAE,SAAS,kBAAkB,OAAO,QAAQ,GAAG,SAAQ,aAAY,SAAS,MAAM,YAAY,CAAC,QAAQ,GAAG,yBAExI;AAAA,IACA,gBAAAA,MAAC,YAAS,IAAI,UACZ,0BAAAA,MAACF,QAAA,EAAM,WAAW,GAAG,IAAI,EAAE,GAAG,EAAE,GAC9B,0BAAAE,MAAC,SAAK,eAAK,UAAU,iBAAiB,MAAM,CAAC,GAAE,GACjD,GACF;AAAA,KACF,IACE;AACN;","names":["jsx","useTheme","jsxs","jsx","useTheme","FlexRow","styled","jsx","useTheme","FlexGrowCol","useTheme","FlexRow","TypographyEx","TypographyEx","jsx","jsx","jsxs","useTheme","FlexRow","TypographyEx","LocalGasStationRoundedIcon","useTheme","TypographyEx","jsx","jsxs","useTheme","TypographyEx","LocalGasStationRoundedIcon","useTheme","TypographyEx","jsx","jsx","jsxs","useTheme","FlexGrowCol","jsx","jsxs","Paper","FlexCol","jsx","jsxs"]}
@@ -1,2 +1 @@
1
- export * from "./GasPriceWitnessPayload";
2
1
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/types/index.ts"],"sourcesContent":["export * from './GasPriceWitnessPayload'\n"],"mappings":"AAAA,cAAc;","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}