@rango-dev/ui 0.42.1-next.4 → 0.43.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/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/ui.build.json +1 -1
- package/dist/widget/ui/src/components/FullExpandedQuote/FullExpandedQuote.d.ts.map +1 -1
- package/dist/widget/ui/src/components/FullExpandedQuote/FullExpandedQuote.types.d.ts +1 -2
- package/dist/widget/ui/src/components/FullExpandedQuote/FullExpandedQuote.types.d.ts.map +1 -1
- package/dist/widget/ui/src/components/QuoteCost/QuoteCost.d.ts.map +1 -1
- package/dist/widget/ui/src/components/QuoteCost/QuoteCost.types.d.ts +0 -1
- package/dist/widget/ui/src/components/QuoteCost/QuoteCost.types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/FullExpandedQuote/FullExpandedQuote.tsx +8 -1
- package/src/components/FullExpandedQuote/FullExpandedQuote.types.ts +1 -1
- package/src/components/QuoteCost/QuoteCost.tsx +1 -2
- package/src/components/QuoteCost/QuoteCost.types.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FullExpandedQuote.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FullExpandedQuote/FullExpandedQuote.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAI/E,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FullExpandedQuote.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FullExpandedQuote/FullExpandedQuote.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAI/E,OAAO,KAAmB,MAAM,OAAO,CAAC;AA6CxC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,qBAyOjD"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { SwapInputPropTypes } from '../../containers/SwapInput/SwapInput.types.js';
|
|
3
2
|
import type { ChainTokenPropTypes } from '../ChainToken/index.js';
|
|
4
3
|
import type { PriceImpactPropTypes } from '../PriceImpact/PriceImpact.types.js';
|
|
@@ -13,6 +12,7 @@ type BaseProps = {
|
|
|
13
12
|
tooltipContainer?: HTMLElement;
|
|
14
13
|
onClick?: () => void;
|
|
15
14
|
selected?: boolean;
|
|
15
|
+
feeWarning?: boolean;
|
|
16
16
|
};
|
|
17
17
|
export type DataLoadedProps = {
|
|
18
18
|
steps: Step[];
|
|
@@ -21,7 +21,6 @@ export type DataLoadedProps = {
|
|
|
21
21
|
fee: QuoteCostProps['fee'];
|
|
22
22
|
outputPrice: SwapInputPropTypes['price'];
|
|
23
23
|
loading?: false;
|
|
24
|
-
quoteCost: React.ReactElement;
|
|
25
24
|
};
|
|
26
25
|
type LoadingProps = {
|
|
27
26
|
loading: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FullExpandedQuote.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FullExpandedQuote/FullExpandedQuote.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FullExpandedQuote.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FullExpandedQuote/FullExpandedQuote.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,qBAAqB,CAA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zC,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;QAC5C,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;KACjC,CAAC;IACF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC9C,UAAU,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC9C,IAAI,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuoteCost.d.ts","sourceRoot":"","sources":["../../../../../../src/components/QuoteCost/QuoteCost.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"QuoteCost.d.ts","sourceRoot":"","sources":["../../../../../../src/components/QuoteCost/QuoteCost.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,qBA0DzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuoteCost.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/QuoteCost/QuoteCost.types.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,
|
|
1
|
+
{"version":3,"file":"QuoteCost.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/QuoteCost/QuoteCost.types.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,WAAW,CAAC;CAChC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@radix-ui/react-select": "^2.0.0",
|
|
54
54
|
"@radix-ui/react-switch": "^1.0.1",
|
|
55
55
|
"@radix-ui/react-tooltip": "^1.0.2",
|
|
56
|
-
"@rango-dev/wallets-shared": "^0.
|
|
56
|
+
"@rango-dev/wallets-shared": "^0.41.0",
|
|
57
57
|
"@stitches/react": "^1.2.8",
|
|
58
58
|
"copy-to-clipboard": "^3.3.3",
|
|
59
59
|
"rango-types": "^0.1.74",
|
|
@@ -8,6 +8,7 @@ import { ErrorIcon, WarningIcon } from '../../icons/index.js';
|
|
|
8
8
|
import { ChainToken } from '../ChainToken/index.js';
|
|
9
9
|
import { Image } from '../common/index.js';
|
|
10
10
|
import { Divider } from '../Divider/index.js';
|
|
11
|
+
import { QuoteCost } from '../QuoteCost/index.js';
|
|
11
12
|
import { QuoteTag } from '../QuoteTag/index.js';
|
|
12
13
|
import { NumericTooltip, Tooltip } from '../Tooltip/index.js';
|
|
13
14
|
import { Typography } from '../Typography/index.js';
|
|
@@ -53,6 +54,7 @@ export function FullExpandedQuote(props: PropTypes) {
|
|
|
53
54
|
warningLevel,
|
|
54
55
|
tooltipContainer,
|
|
55
56
|
onClick,
|
|
57
|
+
feeWarning,
|
|
56
58
|
selected = false,
|
|
57
59
|
} = props;
|
|
58
60
|
const [hoveredItemIndex, setHoveredItemIndex] = useState<number | null>(null);
|
|
@@ -72,7 +74,12 @@ export function FullExpandedQuote(props: PropTypes) {
|
|
|
72
74
|
<SkeletonHeader />
|
|
73
75
|
) : (
|
|
74
76
|
<>
|
|
75
|
-
|
|
77
|
+
<QuoteCost
|
|
78
|
+
fee={props.fee}
|
|
79
|
+
time={props.time}
|
|
80
|
+
steps={numberOfSteps}
|
|
81
|
+
feeWarning={feeWarning}
|
|
82
|
+
/>
|
|
76
83
|
<TagsContainer>
|
|
77
84
|
{props.tags.map((tag) => (
|
|
78
85
|
<QuoteTag
|
|
@@ -16,6 +16,7 @@ type BaseProps = {
|
|
|
16
16
|
tooltipContainer?: HTMLElement;
|
|
17
17
|
onClick?: () => void;
|
|
18
18
|
selected?: boolean;
|
|
19
|
+
feeWarning?: boolean;
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
export type DataLoadedProps = {
|
|
@@ -25,7 +26,6 @@ export type DataLoadedProps = {
|
|
|
25
26
|
fee: QuoteCostProps['fee'];
|
|
26
27
|
outputPrice: SwapInputPropTypes['price'];
|
|
27
28
|
loading?: false;
|
|
28
|
-
quoteCost: React.ReactElement;
|
|
29
29
|
};
|
|
30
30
|
type LoadingProps = {
|
|
31
31
|
loading: true;
|
|
@@ -22,7 +22,6 @@ export function QuoteCost(props: PropTypes) {
|
|
|
22
22
|
onClickFee,
|
|
23
23
|
tooltipGas,
|
|
24
24
|
feeWarning,
|
|
25
|
-
timeWarning,
|
|
26
25
|
tooltipContainer,
|
|
27
26
|
} = props;
|
|
28
27
|
return (
|
|
@@ -48,7 +47,7 @@ export function QuoteCost(props: PropTypes) {
|
|
|
48
47
|
</Tooltip>
|
|
49
48
|
|
|
50
49
|
<Separator />
|
|
51
|
-
<div className={
|
|
50
|
+
<div className={itemStyles()}>
|
|
52
51
|
<div className={iconStyles()}>
|
|
53
52
|
<TimeIcon size={12} color="gray" />
|
|
54
53
|
</div>
|