@xyo-network/react-gas-price 2.68.3 → 2.69.0
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.
- package/dist/browser/components/GasFees/Card.d.cts.map +1 -1
- package/dist/browser/components/GasFees/Card.d.mts.map +1 -1
- package/dist/browser/components/GasFees/Card.d.ts.map +1 -1
- package/dist/browser/components/HeaderComponents/Actions.d.cts.map +1 -1
- package/dist/browser/components/HeaderComponents/Actions.d.mts.map +1 -1
- package/dist/browser/components/HeaderComponents/Actions.d.ts.map +1 -1
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/node/components/GasFees/Card.d.cts.map +1 -1
- package/dist/node/components/GasFees/Card.d.mts.map +1 -1
- package/dist/node/components/GasFees/Card.d.ts.map +1 -1
- package/dist/node/components/HeaderComponents/Actions.d.cts.map +1 -1
- package/dist/node/components/HeaderComponents/Actions.d.mts.map +1 -1
- package/dist/node/components/HeaderComponents/Actions.d.ts.map +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +7 -7
- package/src/components/GasFees/Card.tsx +3 -1
- package/src/components/GasFees/components/SpeedBox.tsx +7 -7
- package/src/components/HeaderComponents/Actions.tsx +9 -3
- package/src/components/RawPayload/ToggleRawPayloadBox.tsx +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/GasFees/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAmB,MAAM,eAAe,CAAA;AAMhE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/GasFees/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAmB,MAAM,eAAe,CAAA;AAMhE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkBhD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/GasFees/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAmB,MAAM,eAAe,CAAA;AAMhE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/GasFees/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAmB,MAAM,eAAe,CAAA;AAMhE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkBhD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/GasFees/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAmB,MAAM,eAAe,CAAA;AAMhE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/GasFees/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAmB,MAAM,eAAe,CAAA;AAMhE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkBhD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderComponents/Actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderComponents/Actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,CAqB9E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderComponents/Actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderComponents/Actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,CAqB9E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderComponents/Actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderComponents/Actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,CAqB9E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../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":["export * from './components'\nexport * from './types'\n","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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,4BAAqE;AACrE,sBAAoC;AAK9B;AAHC,IAAM,yBAAgD,CAAC,EAAE,GAAG,MAAM,MAAM;AAC7E,SACE,4CAAC,0BAAQ,GAAG,OACV,sDAAC,sBAAAA,wBAAA,EAA2B,GAC9B;AAEJ;;;ACRA,mBAA2B;;;ACD3B,IAAAC,mBAAqB;AACrB,2BAAsC;AAmBlC,IAAAC,sBAAA;AATG,IAAM,2BAAsE,CAAC;AAAA,EAClF;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SACE,8CAAC,gCAAQ,WAAW,GAAG,QAAQ,GAAG,UAAS,QAAQ,GAAG,OACnD;AAAA,gBAAY,6CAAC,yBAAK,OAAO,IAAI,KAAK,SAAS,EAAE,eAAe,GAAG,IAAK;AAAA,IACpE,UAAU,6CAAC,yBAAK,OAAO,GAAG,YAAY,MAAM,QAAQ,QAAQ,CAAC,CAAC,SAAS,IAAK;AAAA,IAC5E,cAAc,6CAAC,yBAAK,OAAO,GAAG,gBAAgB,MAAM,WAAW,IAAI,IAAK;AAAA,KAC3E;AAEJ;;;AC1BA,IAAAC,mBAAyB;AAEzB,IAAAC,uBAAmD;;;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M,MAAM,YAAY,MAAM,MAAM,MAAM,YAAY,KAAK,GAC3H,wDAAC,YAAS,OAAc,GAC1B;AAAA,KACF,GACF;AAEJ;;;AKjBI,IAAAC,uBAAA;AAFG,IAAM,2BAAoE,CAAC,EAAE,SAAS,eAAe,GAAG,MAAM,MAAM;AACzH,SACE,+CAAC,2BAAyB,GAAG,OAC3B;AAAA,kDAAC,4BAAyB,SAAkB;AAAA,IAC5C;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,IAAAC,oBAAwC;AACxC,IAAAC,wBAAsC;AACtC,IAAAC,gBAAyB;AASrB,IAAAC,uBAAA;AAHG,IAAM,sBAA0D,CAAC,EAAE,iBAAiB,GAAG,MAAM,MAAM;AACxG,QAAM,CAAC,UAAU,WAAW,QAAI,wBAAS,KAAK;AAC9C,SAAO,kBACL,+CAAC,iCAAQ,QAAQ,GAAI,GAAG,OACtB;AAAA,kDAAC,4BAAO,OAAM,aAAY,IAAI,EAAE,SAAS,kBAAkB,OAAO,QAAQ,GAAG,SAAQ,aAAY,SAAS,MAAM,YAAY,CAAC,QAAQ,GAAG,yBAExI;AAAA,IACA,8CAAC,8BAAS,IAAI,UACZ,wDAAC,2BAAM,WAAW,GAAG,IAAI,EAAE,GAAG,EAAE,GAC9B,wDAAC,SAAK,eAAK,UAAU,iBAAiB,MAAM,CAAC,GAAE,GACjD,GACF;AAAA,KACF,IACE;AACN;","names":["LocalGasStationRoundedIcon","import_material","import_jsx_runtime","import_material","import_react_shared","import_material","import_jsx_runtime","import_jsx_runtime","import_material","import_react_flexbox","import_material","import_jsx_runtime","import_material","import_react_flexbox","import_material","import_react_flexbox","import_react_shared","import_react_shared","import_jsx_runtime","import_jsx_runtime","import_icons_material","import_material","import_react_flexbox","import_react_shared","import_jsx_runtime","LocalGasStationRoundedIcon","import_material","import_react_flexbox","import_react_shared","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_material","import_react_flexbox","import_react","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../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":["export * from './components'\nexport * from './types'\n","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 ?\n <Chip label={new Date(timestamp).toLocaleString()} />\n : null}\n {baseFee ?\n <Chip label={`${baseFeeLabel} - ${baseFee.toFixed(2)} GWEI`} />\n : null}\n {blockNumber ?\n <Chip label={`${blockNumberLabel} - ${blockNumber}`} />\n : 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 ?\n <PriorityFeeBox priorityFee={priorityFee} priorityFeeLabel={priorityFeeLabel} />\n : 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,4BAAqE;AACrE,sBAAoC;AAK9B;AAHC,IAAM,yBAAgD,CAAC,EAAE,GAAG,MAAM,MAAM;AAC7E,SACE,4CAAC,0BAAQ,GAAG,OACV,sDAAC,sBAAAA,wBAAA,EAA2B,GAC9B;AAEJ;;;ACRA,mBAA2B;;;ACD3B,IAAAC,mBAAqB;AACrB,2BAAsC;AAmBlC,IAAAC,sBAAA;AATG,IAAM,2BAAsE,CAAC;AAAA,EAClF;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SACE,8CAAC,gCAAQ,WAAW,GAAG,QAAQ,GAAG,UAAS,QAAQ,GAAG,OACnD;AAAA,gBACC,6CAAC,yBAAK,OAAO,IAAI,KAAK,SAAS,EAAE,eAAe,GAAG,IACnD;AAAA,IACD,UACC,6CAAC,yBAAK,OAAO,GAAG,YAAY,MAAM,QAAQ,QAAQ,CAAC,CAAC,SAAS,IAC7D;AAAA,IACD,cACC,6CAAC,yBAAK,OAAO,GAAG,gBAAgB,MAAM,WAAW,IAAI,IACrD;AAAA,KACJ;AAEJ;;;AChCA,IAAAC,mBAAyB;AAEzB,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AE,cAAc,OAAO,MAAM,MAAM,YAAY,MAAM,MAAM,MAAM,YAAY,KAAK,GAC3H,wDAAC,YAAS,OAAc,GAC1B;AAAA,KACF,GACF;AAEJ;;;AKnBI,IAAAC,uBAAA;AAFG,IAAM,2BAAoE,CAAC,EAAE,SAAS,eAAe,GAAG,MAAM,MAAM;AACzH,SACE,+CAAC,2BAAyB,GAAG,OAC3B;AAAA,kDAAC,4BAAyB,SAAkB;AAAA,IAC5C;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,IAAAC,oBAAwC;AACxC,IAAAC,wBAAsC;AACtC,IAAAC,gBAAyB;AASnB,IAAAC,uBAAA;AAHC,IAAM,sBAA0D,CAAC,EAAE,iBAAiB,GAAG,MAAM,MAAM;AACxG,QAAM,CAAC,UAAU,WAAW,QAAI,wBAAS,KAAK;AAC9C,SAAO,kBACH,+CAAC,iCAAQ,QAAQ,GAAI,GAAG,OACtB;AAAA,kDAAC,4BAAO,OAAM,aAAY,IAAI,EAAE,SAAS,kBAAkB,OAAO,QAAQ,GAAG,SAAQ,aAAY,SAAS,MAAM,YAAY,CAAC,QAAQ,GAAG,yBAExI;AAAA,IACA,8CAAC,8BAAS,IAAI,UACZ,wDAAC,2BAAM,WAAW,GAAG,IAAI,EAAE,GAAG,EAAE,GAC9B,wDAAC,SAAK,eAAK,UAAU,iBAAiB,MAAM,CAAC,GAAE,GACjD,GACF;AAAA,KACF,IACA;AACN;","names":["LocalGasStationRoundedIcon","import_material","import_jsx_runtime","import_material","import_react_shared","import_material","import_jsx_runtime","import_jsx_runtime","import_material","import_react_flexbox","import_material","import_jsx_runtime","import_material","import_react_flexbox","import_material","import_react_flexbox","import_react_shared","import_react_shared","import_jsx_runtime","import_jsx_runtime","import_icons_material","import_material","import_react_flexbox","import_react_shared","import_jsx_runtime","LocalGasStationRoundedIcon","import_material","import_react_flexbox","import_react_shared","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_material","import_react_flexbox","import_react","import_jsx_runtime"]}
|
|
@@ -1 +1 @@
|
|
|
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,GAAG,UAAS,QAAQ,GAAG,OACnD;AAAA,gBAAY,gBAAAA,KAAC,QAAK,OAAO,IAAI,KAAK,SAAS,EAAE,eAAe,GAAG,IAAK;AAAA,IACpE,UAAU,gBAAAA,KAAC,QAAK,OAAO,GAAG,YAAY,MAAM,QAAQ,QAAQ,CAAC,CAAC,SAAS,IAAK;AAAA,IAC5E,cAAc,gBAAAA,KAAC,QAAK,OAAO,GAAG,gBAAgB,MAAM,WAAW,IAAI,IAAK;AAAA,KAC3E;AAEJ;;;AC1BA,SAAS,YAAAC,iBAAgB;AAEzB,SAA4B,uBAAuB;;;ACFnD,SAAS,gBAAgB;AACzB,SAAS,oBAAuC;AAY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Y,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
|
+
{"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 ?\n <Chip label={new Date(timestamp).toLocaleString()} />\n : null}\n {baseFee ?\n <Chip label={`${baseFeeLabel} - ${baseFee.toFixed(2)} GWEI`} />\n : null}\n {blockNumber ?\n <Chip label={`${blockNumberLabel} - ${blockNumber}`} />\n : 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 ?\n <PriorityFeeBox priorityFee={priorityFee} priorityFeeLabel={priorityFeeLabel} />\n : 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,SAEI,OAAAA,MAFJ;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,GAAG,UAAS,QAAQ,GAAG,OACnD;AAAA,gBACC,gBAAAA,KAAC,QAAK,OAAO,IAAI,KAAK,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B;AASnB,SACE,OAAAC,OADF,QAAAC,aAAA;AAHC,IAAM,sBAA0D,CAAC,EAAE,iBAAiB,GAAG,MAAM,MAAM;AACxG,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,SAAO,kBACH,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,IACA;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/GasFees/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAmB,MAAM,eAAe,CAAA;AAMhE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/GasFees/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAmB,MAAM,eAAe,CAAA;AAMhE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkBhD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/GasFees/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAmB,MAAM,eAAe,CAAA;AAMhE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/GasFees/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAmB,MAAM,eAAe,CAAA;AAMhE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkBhD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/GasFees/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAmB,MAAM,eAAe,CAAA;AAMhE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/GasFees/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAmB,MAAM,eAAe,CAAA;AAMhE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkBhD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderComponents/Actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderComponents/Actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,CAqB9E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderComponents/Actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderComponents/Actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,CAqB9E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderComponents/Actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderComponents/Actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,CAqB9E,CAAA"}
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../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":["export * from './components'\nexport * from './types'\n","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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,4BAAqE;AACrE,sBAAoC;AAK9B;AAHC,IAAM,yBAAgD,CAAC,EAAE,GAAG,MAAM,MAAM;AAC7E,SACE,4CAAC,0BAAQ,GAAG,OACV,sDAAC,sBAAAA,wBAAA,EAA2B,GAC9B;AAEJ;;;ACRA,mBAA2B;;;ACD3B,IAAAC,mBAAqB;AACrB,2BAAsC;AAmBlC,IAAAC,sBAAA;AATG,IAAM,2BAAsE,CAAC;AAAA,EAClF;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SACE,8CAAC,gCAAQ,WAAW,GAAG,QAAQ,GAAG,UAAS,QAAQ,GAAG,OACnD;AAAA,gBAAY,6CAAC,yBAAK,OAAO,IAAI,KAAK,SAAS,EAAE,eAAe,GAAG,IAAK;AAAA,IACpE,UAAU,6CAAC,yBAAK,OAAO,GAAG,YAAY,MAAM,QAAQ,QAAQ,CAAC,CAAC,SAAS,IAAK;AAAA,IAC5E,cAAc,6CAAC,yBAAK,OAAO,GAAG,gBAAgB,MAAM,WAAW,IAAI,IAAK;AAAA,KAC3E;AAEJ;;;AC1BA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","import_material","import_jsx_runtime","import_jsx_runtime","import_material","import_react_flexbox","import_material","import_jsx_runtime","import_material","import_react_flexbox","import_material","import_react_flexbox","import_react_shared","import_react_shared","import_jsx_runtime","import_jsx_runtime","import_icons_material","import_material","import_react_flexbox","import_react_shared","import_jsx_runtime","LocalGasStationRoundedIcon","import_material","import_react_flexbox","import_react_shared","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_material","import_react_flexbox","import_react","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../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":["export * from './components'\nexport * from './types'\n","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 ?\n <Chip label={new Date(timestamp).toLocaleString()} />\n : null}\n {baseFee ?\n <Chip label={`${baseFeeLabel} - ${baseFee.toFixed(2)} GWEI`} />\n : null}\n {blockNumber ?\n <Chip label={`${blockNumberLabel} - ${blockNumber}`} />\n : 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 ?\n <PriorityFeeBox priorityFee={priorityFee} priorityFeeLabel={priorityFeeLabel} />\n : 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,4BAAqE;AACrE,sBAAoC;AAK9B;AAHC,IAAM,yBAAgD,CAAC,EAAE,GAAG,MAAM,MAAM;AAC7E,SACE,4CAAC,0BAAQ,GAAG,OACV,sDAAC,sBAAAA,wBAAA,EAA2B,GAC9B;AAEJ;;;ACRA,mBAA2B;;;ACD3B,IAAAC,mBAAqB;AACrB,2BAAsC;AAmBlC,IAAAC,sBAAA;AATG,IAAM,2BAAsE,CAAC;AAAA,EAClF;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SACE,8CAAC,gCAAQ,WAAW,GAAG,QAAQ,GAAG,UAAS,QAAQ,GAAG,OACnD;AAAA,gBACC,6CAAC,yBAAK,OAAO,IAAI,KAAK,SAAS,EAAE,eAAe,GAAG,IACnD;AAAA,IACD,UACC,6CAAC,yBAAK,OAAO,GAAG,YAAY,MAAM,QAAQ,QAAQ,CAAC,CAAC,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AAU,iBAAiB,MAAM,CAAC,GAAE,GACjD,GACF;AAAA,KACF,IACA;AACN;","names":["LocalGasStationRoundedIcon","import_material","import_jsx_runtime","import_material","import_react_shared","import_material","import_jsx_runtime","import_jsx_runtime","import_material","import_react_flexbox","import_material","import_jsx_runtime","import_material","import_react_flexbox","import_material","import_react_flexbox","import_react_shared","import_react_shared","import_jsx_runtime","import_jsx_runtime","import_icons_material","import_material","import_react_flexbox","import_react_shared","import_jsx_runtime","LocalGasStationRoundedIcon","import_material","import_react_flexbox","import_react_shared","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_material","import_react_flexbox","import_react","import_jsx_runtime"]}
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,GAAG,UAAS,QAAQ,GAAG,OACnD;AAAA,gBAAY,gBAAAA,KAAC,QAAK,OAAO,IAAI,KAAK,SAAS,EAAE,eAAe,GAAG,IAAK;AAAA,IACpE,UAAU,gBAAAA,KAAC,QAAK,OAAO,GAAG,Y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e;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
|
+
{"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 ?\n <Chip label={new Date(timestamp).toLocaleString()} />\n : null}\n {baseFee ?\n <Chip label={`${baseFeeLabel} - ${baseFee.toFixed(2)} GWEI`} />\n : null}\n {blockNumber ?\n <Chip label={`${blockNumberLabel} - ${blockNumber}`} />\n : 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 ?\n <PriorityFeeBox priorityFee={priorityFee} priorityFeeLabel={priorityFeeLabel} />\n : 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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AM;AAX3H;AAYE,SACE,gBAAAA,MAAC,2BAAyB,GAAG,OAC3B;AAAA,oBAAAD,MAAC,4BAAyB,SAAkB;AAAA,IAC5C,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,+CAAe;AAAA,QAC1B,UAAS,oDAAe,YAAf,mBAAwB;AAAA,QACjC,eAAc,oDAAe,YAAf,mBAAwB;AAAA,QACtC,cAAa,oDAAe,gBAAf,mBAA4B;AAAA,QACzC,mBAAkB,oDAAe,gBAAf,mBAA4B;AAAA;AAAA,IAChD;AAAA,KACF;AAEJ;;;ACxBA,SAAS,QAAQ,UAAU,SAAAE,cAAa;AACxC,SAAuB,WAAAC,gBAAe;AACtC,SAAS,gBAAgB;AASnB,SACE,OAAAC,OADF,QAAAC,aAAA;AAHC,IAAM,sBAA0D,CAAC,EAAE,iBAAiB,GAAG,MAAM,MAAM;AACxG,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,SAAO,kBACH,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,IACA;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"]}
|
package/package.json
CHANGED
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/react-flexbox": "^3.0
|
|
14
|
-
"@xylabs/react-shared": "^3.0
|
|
15
|
-
"@xyo-network/react-card": "~2.
|
|
16
|
-
"@xyo-network/react-shared": "~2.
|
|
13
|
+
"@xylabs/react-flexbox": "^3.1.0",
|
|
14
|
+
"@xylabs/react-shared": "^3.1.0",
|
|
15
|
+
"@xyo-network/react-card": "~2.69.0",
|
|
16
|
+
"@xyo-network/react-shared": "~2.69.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@storybook/react": "^7.6.16",
|
|
20
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
21
|
-
"@xylabs/tsconfig-react": "^3.
|
|
20
|
+
"@xylabs/ts-scripts-yarn3": "^3.4.1",
|
|
21
|
+
"@xylabs/tsconfig-react": "^3.4.1",
|
|
22
22
|
"typescript": "^5.3.3"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
@@ -79,6 +79,6 @@
|
|
|
79
79
|
},
|
|
80
80
|
"sideEffects": false,
|
|
81
81
|
"types": "dist/browser/index.d.ts",
|
|
82
|
-
"version": "2.
|
|
82
|
+
"version": "2.69.0",
|
|
83
83
|
"type": "module"
|
|
84
84
|
}
|
|
@@ -20,7 +20,9 @@ export const GasFeeCard: React.FC<GasFeeCardProps> = ({ gasPrice, speedPaperElev
|
|
|
20
20
|
<CardContentEx removePadding sx={{ flexDirection: 'column', flexGrow: 1, p: 0, rowGap: 2 }}>
|
|
21
21
|
<FlexGrowCol bgcolor={theme.palette.secondary.dark} alignItems="start" p={2} rowGap={1.5} color={theme.palette.common.white}>
|
|
22
22
|
<GasPriceBox gasPrice={gasPrice} />
|
|
23
|
-
{priorityFee ?
|
|
23
|
+
{priorityFee ?
|
|
24
|
+
<PriorityFeeBox priorityFee={priorityFee} priorityFeeLabel={priorityFeeLabel} />
|
|
25
|
+
: null}
|
|
24
26
|
</FlexGrowCol>
|
|
25
27
|
<Paper elevation={speedPaperElevation} sx={{ borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px` }}>
|
|
26
28
|
<SpeedBox speed={speed} />
|
|
@@ -9,11 +9,11 @@ export interface SpeedBoxProps extends FlexBoxProps {
|
|
|
9
9
|
export const SpeedBox: React.FC<SpeedBoxProps> = ({ speed, ...props }) => {
|
|
10
10
|
const theme = useTheme()
|
|
11
11
|
|
|
12
|
-
return speed ?
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
return speed ?
|
|
13
|
+
<FlexGrowCol {...props}>
|
|
14
|
+
<TypographyEx fontSize={theme.spacing(3)} fontWeight="200" p={1}>
|
|
15
|
+
{speed}
|
|
16
|
+
</TypographyEx>
|
|
17
|
+
</FlexGrowCol>
|
|
18
|
+
: null
|
|
19
19
|
}
|
|
@@ -19,9 +19,15 @@ export const GasPriceHeaderActionsBox: React.FC<GasPriceEstimateActionsBoxProps>
|
|
|
19
19
|
}) => {
|
|
20
20
|
return (
|
|
21
21
|
<FlexRow columnGap={1} rowGap={1} flexWrap="wrap" {...props}>
|
|
22
|
-
{timestamp ?
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
{timestamp ?
|
|
23
|
+
<Chip label={new Date(timestamp).toLocaleString()} />
|
|
24
|
+
: null}
|
|
25
|
+
{baseFee ?
|
|
26
|
+
<Chip label={`${baseFeeLabel} - ${baseFee.toFixed(2)} GWEI`} />
|
|
27
|
+
: null}
|
|
28
|
+
{blockNumber ?
|
|
29
|
+
<Chip label={`${blockNumberLabel} - ${blockNumber}`} />
|
|
30
|
+
: null}
|
|
25
31
|
</FlexRow>
|
|
26
32
|
)
|
|
27
33
|
}
|
|
@@ -8,16 +8,16 @@ export interface ToggleRawPayloadBoxProps extends FlexBoxProps {
|
|
|
8
8
|
|
|
9
9
|
export const ToggleRawPayloadBox: React.FC<ToggleRawPayloadBoxProps> = ({ gasPricePayload, ...props }) => {
|
|
10
10
|
const [collapse, setCollapse] = useState(false)
|
|
11
|
-
return gasPricePayload ?
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
return gasPricePayload ?
|
|
12
|
+
<FlexCol rowGap={1} {...props}>
|
|
13
|
+
<Button color="secondary" sx={{ bgcolor: 'secondary.dark', color: 'white' }} variant="contained" onClick={() => setCollapse(!collapse)}>
|
|
14
|
+
Raw Payload
|
|
15
|
+
</Button>
|
|
16
|
+
<Collapse in={collapse}>
|
|
17
|
+
<Paper elevation={4} sx={{ p: 2 }}>
|
|
18
|
+
<pre>{JSON.stringify(gasPricePayload, null, 2)}</pre>
|
|
19
|
+
</Paper>
|
|
20
|
+
</Collapse>
|
|
21
|
+
</FlexCol>
|
|
22
|
+
: null
|
|
23
23
|
}
|