@rango-dev/ui 0.22.1-next.0 → 0.22.1-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/index.js +6 -6
  2. package/dist/index.js.map +4 -4
  3. package/dist/translations/en.d.ts.map +1 -1
  4. package/dist/translations/es.d.ts.map +1 -1
  5. package/dist/translations/fr.d.ts.map +1 -1
  6. package/dist/translations/ja.d.ts.map +1 -1
  7. package/dist/widget/ui/src/components/QuoteCost/QuoteCost.d.ts +4 -0
  8. package/dist/widget/ui/src/components/QuoteCost/QuoteCost.d.ts.map +1 -0
  9. package/dist/widget/ui/src/components/{BestRoute/BestRouteSkeleton.styles.d.ts → QuoteCost/QuoteCost.styles.d.ts} +3 -7
  10. package/dist/widget/ui/src/components/QuoteCost/QuoteCost.styles.d.ts.map +1 -0
  11. package/dist/widget/ui/src/components/{RouteCost/RouteCost.types.d.ts → QuoteCost/QuoteCost.types.d.ts} +1 -1
  12. package/dist/widget/ui/src/components/QuoteCost/QuoteCost.types.d.ts.map +1 -0
  13. package/dist/widget/ui/src/components/QuoteCost/index.d.ts +2 -0
  14. package/dist/widget/ui/src/components/QuoteCost/index.d.ts.map +1 -0
  15. package/dist/widget/ui/src/components/StepDetails/StepDetails.styles.d.ts +1 -1
  16. package/dist/widget/ui/src/components/StepDetails/StepDetails.types.d.ts +16 -2
  17. package/dist/widget/ui/src/components/StepDetails/StepDetails.types.d.ts.map +1 -1
  18. package/dist/widget/ui/src/components/StepDetails/index.d.ts +1 -1
  19. package/dist/widget/ui/src/components/StepDetails/index.d.ts.map +1 -1
  20. package/dist/widget/ui/src/components/StepDetails/mock.d.ts +1 -1
  21. package/dist/widget/ui/src/components/StepDetails/mock.d.ts.map +1 -1
  22. package/dist/widget/ui/src/components/index.d.ts +1 -2
  23. package/dist/widget/ui/src/components/index.d.ts.map +1 -1
  24. package/package.json +2 -2
  25. package/src/components/PriceImpact/PriceImpact.tsx +2 -2
  26. package/src/components/{RouteCost/RouteCost.styles.ts → QuoteCost/QuoteCost.styles.ts} +7 -0
  27. package/src/components/{RouteCost/RouteCost.tsx → QuoteCost/QuoteCost.tsx} +3 -4
  28. package/src/components/QuoteCost/index.ts +1 -0
  29. package/src/components/StepDetails/StepDetails.stories.tsx +1 -1
  30. package/src/components/StepDetails/StepDetails.styles.ts +2 -2
  31. package/src/components/StepDetails/StepDetails.tsx +3 -3
  32. package/src/components/StepDetails/StepDetails.types.ts +17 -2
  33. package/src/components/StepDetails/index.ts +1 -1
  34. package/src/components/StepDetails/mock.ts +1 -1
  35. package/src/components/index.ts +1 -2
  36. package/dist/widget/ui/src/components/BestRoute/BestRoute.d.ts +0 -4
  37. package/dist/widget/ui/src/components/BestRoute/BestRoute.d.ts.map +0 -1
  38. package/dist/widget/ui/src/components/BestRoute/BestRoute.stories.d.ts +0 -7
  39. package/dist/widget/ui/src/components/BestRoute/BestRoute.stories.d.ts.map +0 -1
  40. package/dist/widget/ui/src/components/BestRoute/BestRoute.styles.d.ts +0 -1429
  41. package/dist/widget/ui/src/components/BestRoute/BestRoute.styles.d.ts.map +0 -1
  42. package/dist/widget/ui/src/components/BestRoute/BestRoute.types.d.ts +0 -34
  43. package/dist/widget/ui/src/components/BestRoute/BestRoute.types.d.ts.map +0 -1
  44. package/dist/widget/ui/src/components/BestRoute/BestRouteSkeleton.d.ts +0 -4
  45. package/dist/widget/ui/src/components/BestRoute/BestRouteSkeleton.d.ts.map +0 -1
  46. package/dist/widget/ui/src/components/BestRoute/BestRouteSkeleton.styles.d.ts.map +0 -1
  47. package/dist/widget/ui/src/components/BestRoute/BestRouteSkeleton.types.d.ts +0 -6
  48. package/dist/widget/ui/src/components/BestRoute/BestRouteSkeleton.types.d.ts.map +0 -1
  49. package/dist/widget/ui/src/components/BestRoute/RouteSummary.d.ts +0 -12
  50. package/dist/widget/ui/src/components/BestRoute/RouteSummary.d.ts.map +0 -1
  51. package/dist/widget/ui/src/components/BestRoute/RouteSummary.styles.d.ts +0 -158
  52. package/dist/widget/ui/src/components/BestRoute/RouteSummary.styles.d.ts.map +0 -1
  53. package/dist/widget/ui/src/components/BestRoute/index.d.ts +0 -5
  54. package/dist/widget/ui/src/components/BestRoute/index.d.ts.map +0 -1
  55. package/dist/widget/ui/src/components/BestRoute/mock.d.ts +0 -3
  56. package/dist/widget/ui/src/components/BestRoute/mock.d.ts.map +0 -1
  57. package/dist/widget/ui/src/components/RouteCost/RouteCost.d.ts +0 -4
  58. package/dist/widget/ui/src/components/RouteCost/RouteCost.d.ts.map +0 -1
  59. package/dist/widget/ui/src/components/RouteCost/RouteCost.styles.d.ts +0 -158
  60. package/dist/widget/ui/src/components/RouteCost/RouteCost.styles.d.ts.map +0 -1
  61. package/dist/widget/ui/src/components/RouteCost/RouteCost.types.d.ts.map +0 -1
  62. package/dist/widget/ui/src/components/RouteCost/index.d.ts +0 -2
  63. package/dist/widget/ui/src/components/RouteCost/index.d.ts.map +0 -1
  64. package/src/components/BestRoute/BestRoute.stories.tsx +0 -17
  65. package/src/components/BestRoute/BestRoute.styles.ts +0 -213
  66. package/src/components/BestRoute/BestRoute.tsx +0 -176
  67. package/src/components/BestRoute/BestRoute.types.ts +0 -32
  68. package/src/components/BestRoute/BestRouteSkeleton.styles.ts +0 -110
  69. package/src/components/BestRoute/BestRouteSkeleton.tsx +0 -112
  70. package/src/components/BestRoute/BestRouteSkeleton.types.ts +0 -5
  71. package/src/components/BestRoute/RouteSummary.styles.ts +0 -15
  72. package/src/components/BestRoute/RouteSummary.tsx +0 -48
  73. package/src/components/BestRoute/index.ts +0 -4
  74. package/src/components/BestRoute/mock.ts +0 -142
  75. package/src/components/RouteCost/index.ts +0 -1
  76. /package/src/components/{RouteCost/RouteCost.types.ts → QuoteCost/QuoteCost.types.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../translations/en.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAAwgW,CAAC"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../translations/en.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAA0kX,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../translations/es.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAAuyX,CAAC"}
1
+ {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../translations/es.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAAy2Y,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../translations/fr.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAAm9X,CAAC"}
1
+ {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../translations/fr.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAAqhZ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ja.d.ts","sourceRoot":"","sources":["../../../../translations/ja.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAAyxS,CAAC"}
1
+ {"version":3,"file":"ja.d.ts","sourceRoot":"","sources":["../../../../translations/ja.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAA21T,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { PropTypes } from './QuoteCost.types';
2
+ import React from 'react';
3
+ export declare function QuoteCost(props: PropTypes): React.JSX.Element;
4
+ //# sourceMappingURL=QuoteCost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuoteCost.d.ts","sourceRoot":"","sources":["../../../../../../src/components/QuoteCost/QuoteCost.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,qBAgCzC"}
@@ -1,6 +1,4 @@
1
- export declare const Container: import("@stitches/react/types/styled-component").StyledComponent<"div", {
2
- rounded?: boolean | "true" | undefined;
3
- }, {
1
+ export declare const Container: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
4
2
  sm: string;
5
3
  md: string;
6
4
  lg: string;
@@ -157,9 +155,7 @@ export declare const Container: import("@stitches/react/types/styled-component")
157
155
  zIndices: {};
158
156
  transitions: {};
159
157
  }, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
160
- export declare const StepSeparator: import("@stitches/react/types/styled-component").StyledComponent<"div", {
161
- hideSeparator?: boolean | "true" | undefined;
162
- }, {
158
+ export declare const Separator: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
163
159
  sm: string;
164
160
  md: string;
165
161
  lg: string;
@@ -316,4 +312,4 @@ export declare const StepSeparator: import("@stitches/react/types/styled-compone
316
312
  zIndices: {};
317
313
  transitions: {};
318
314
  }, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
319
- //# sourceMappingURL=BestRouteSkeleton.styles.d.ts.map
315
+ //# sourceMappingURL=QuoteCost.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuoteCost.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/QuoteCost/QuoteCost.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAiBpB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAKpB,CAAC"}
@@ -3,4 +3,4 @@ export type PropTypes = {
3
3
  time: string | number;
4
4
  steps: number;
5
5
  };
6
- //# sourceMappingURL=RouteCost.types.d.ts.map
6
+ //# sourceMappingURL=QuoteCost.types.d.ts.map
@@ -0,0 +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,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { QuoteCost } from './QuoteCost';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/QuoteCost/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export declare const Container: import("@stitches/react/types/styled-component").StyledComponent<"div", {
2
- type?: "route-details" | "route-progress" | undefined;
2
+ type?: "quote-details" | "swap-progress" | undefined;
3
3
  state?: "warning" | "error" | "default" | "in-progress" | "completed" | undefined;
4
4
  }, {
5
5
  sm: string;
@@ -1,10 +1,24 @@
1
- import type { Step } from '../BestRoute/BestRoute.types';
1
+ import type { ReactNode } from 'react';
2
+ import type { SwapInputProps } from 'src/containers/SwapInput/SwapInput.types';
3
+ type BaseStep = Pick<SwapInputProps, 'chain' | 'token' | 'price'>;
4
+ export type Step = {
5
+ swapper: SwapInputProps['chain'];
6
+ from: BaseStep;
7
+ to: BaseStep;
8
+ error?: {
9
+ title?: string;
10
+ description?: string;
11
+ };
12
+ alerts?: ReactNode;
13
+ state?: 'error' | 'warning';
14
+ };
2
15
  export type StepDetailsProps = {
3
16
  step: Step;
4
17
  hasSeparator: boolean;
5
- type: 'route-details' | 'route-progress';
18
+ type: 'quote-details' | 'swap-progress';
6
19
  state?: 'default' | 'in-progress' | 'completed' | 'warning' | 'error';
7
20
  isFocused?: boolean;
8
21
  tabIndex?: number;
9
22
  };
23
+ export {};
10
24
  //# sourceMappingURL=StepDetails.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StepDetails.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/StepDetails/StepDetails.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,eAAe,GAAG,gBAAgB,CAAC;IACzC,KAAK,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"}
1
+ {"version":3,"file":"StepDetails.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/StepDetails/StepDetails.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE/E,KAAK,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC,CAAC;AAElE,MAAM,MAAM,IAAI,GAAG;IACjB,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,QAAQ,CAAC;IACb,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,eAAe,GAAG,eAAe,CAAC;IACxC,KAAK,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export { StepDetails } from './StepDetails';
2
- export type { StepDetailsProps } from './StepDetails.types';
2
+ export type { StepDetailsProps, Step } from './StepDetails.types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/StepDetails/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/StepDetails/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { Step } from '../BestRoute/BestRoute.types';
1
+ import type { Step } from './StepDetails.types';
2
2
  export declare const step1: Step;
3
3
  //# sourceMappingURL=mock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../../../src/components/StepDetails/mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD,eAAO,MAAM,KAAK,EAAE,IAgCnB,CAAC"}
1
+ {"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../../../src/components/StepDetails/mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD,eAAO,MAAM,KAAK,EAAE,IAgCnB,CAAC"}
@@ -1,6 +1,5 @@
1
1
  export * from './I18nManager';
2
2
  export * from './Alert';
3
- export * from './BestRoute';
4
3
  export * from './BlockchainsChip';
5
4
  export * from './BottomLogo';
6
5
  export * from './Button';
@@ -45,7 +44,7 @@ export * from './ListItem';
45
44
  export * from './NotFound';
46
45
  export * from './MessageBox';
47
46
  export * from './IconButton';
48
- export * from './RouteCost';
47
+ export * from './QuoteCost';
49
48
  export * from './TokenAmount';
50
49
  export * from './StepDetails';
51
50
  export * from './Popover';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/ui",
3
- "version": "0.22.1-next.0",
3
+ "version": "0.22.1-next.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -65,7 +65,7 @@
65
65
  "@radix-ui/react-radio-group": "^1.1.1",
66
66
  "@radix-ui/react-switch": "^1.0.1",
67
67
  "@radix-ui/react-tooltip": "^1.0.2",
68
- "@rango-dev/wallets-shared": "^0.21.1-next.0",
68
+ "@rango-dev/wallets-shared": "^0.21.1-next.1",
69
69
  "@stitches/react": "^1.2.8",
70
70
  "rango-sdk": "^0.1.35",
71
71
  "react-virtualized-auto-sizer": "^1.0.7",
@@ -9,7 +9,7 @@ import { Container } from './PriceImpact.styles';
9
9
  export function PriceImpact(props: PriceImpactProps) {
10
10
  const { size, outputUsdValue, percentageChange, warningLevel, error } = props;
11
11
 
12
- let percentageChangeColor = '$neutral700';
12
+ let percentageChangeColor = '$neutral600';
13
13
  if (!outputUsdValue || warningLevel === 'low') {
14
14
  percentageChangeColor = '$warning500';
15
15
  } else if (warningLevel === 'high') {
@@ -22,7 +22,7 @@ export function PriceImpact(props: PriceImpactProps) {
22
22
  <Typography
23
23
  size={size === 'small' ? 'small' : 'medium'}
24
24
  variant="body"
25
- color={size !== 'small' ? '$neutral600' : '$neutral700'}>
25
+ color="$neutral600">
26
26
  {`~$${outputUsdValue}`}
27
27
  </Typography>
28
28
  )}
@@ -18,3 +18,10 @@ export const Container = styled('div', {
18
18
  alignItems: 'center',
19
19
  },
20
20
  });
21
+
22
+ export const Separator = styled('div', {
23
+ height: '$12',
24
+ marginLeft: '$10',
25
+ marginRight: '$10',
26
+ borderLeft: '1px solid $foreground',
27
+ });
@@ -1,14 +1,13 @@
1
- import type { PropTypes } from './RouteCost.types';
1
+ import type { PropTypes } from './QuoteCost.types';
2
2
 
3
3
  import React from 'react';
4
4
 
5
5
  import { GasIcon, NumberIcon, TimeIcon } from '../../icons';
6
- import { Separator } from '../BestRoute/BestRoute.styles';
7
6
  import { Typography } from '../Typography';
8
7
 
9
- import { Container } from './RouteCost.styles';
8
+ import { Container, Separator } from './QuoteCost.styles';
10
9
 
11
- export function RouteCost(props: PropTypes) {
10
+ export function QuoteCost(props: PropTypes) {
12
11
  const { fee, time, steps } = props;
13
12
  return (
14
13
  <Container>
@@ -0,0 +1 @@
1
+ export { QuoteCost } from './QuoteCost';
@@ -17,7 +17,7 @@ type Story = StoryObj<typeof StepDetails>;
17
17
  export const Main: Story = {
18
18
  args: {
19
19
  step: { ...step1, alerts: <Alert title="test alert" type="warning" /> },
20
- type: 'route-progress',
20
+ type: 'swap-progress',
21
21
  state: 'completed',
22
22
  },
23
23
  };
@@ -8,8 +8,8 @@ export const Container = styled('div', {
8
8
  border: '1px solid transparent',
9
9
  variants: {
10
10
  type: {
11
- 'route-details': { border: 'none' },
12
- 'route-progress': {
11
+ 'quote-details': { border: 'none' },
12
+ 'swap-progress': {
13
13
  $$color: '$colors$neutral100',
14
14
  [`.${darkTheme} &`]: {
15
15
  $$color: '$colors$neutral300',
@@ -40,7 +40,7 @@ const StepDetailsComponent = forwardRef<HTMLDivElement, StepDetailsProps>(
40
40
  ref={containerRef}
41
41
  tabIndex={tabIndex}>
42
42
  <div className="swapper">
43
- {type === 'route-progress' && hasSeparator && (
43
+ {type === 'swap-progress' && hasSeparator && (
44
44
  <StepSeparator state={state} />
45
45
  )}
46
46
  <SwapperImage state={state}>
@@ -61,7 +61,7 @@ const StepDetailsComponent = forwardRef<HTMLDivElement, StepDetailsProps>(
61
61
  </Typography>
62
62
  </div>
63
63
  <div className="step-info">
64
- <DashedLine invisible={!hasSeparator || type === 'route-progress'} />
64
+ <DashedLine invisible={!hasSeparator || type === 'swap-progress'} />
65
65
  <div className="tokens-container">
66
66
  <div className="tokens">
67
67
  <ChainToken
@@ -90,7 +90,7 @@ const StepDetailsComponent = forwardRef<HTMLDivElement, StepDetailsProps>(
90
90
  step.to.price.value
91
91
  } ${step.to.token.displayName}`}</Typography>
92
92
  </div>
93
- <Alerts pb={hasSeparator && type === 'route-details'}>
93
+ <Alerts pb={hasSeparator && type === 'quote-details'}>
94
94
  {step.alerts}
95
95
  </Alerts>
96
96
  </div>
@@ -1,9 +1,24 @@
1
- import type { Step } from '../BestRoute/BestRoute.types';
1
+ import type { ReactNode } from 'react';
2
+ import type { SwapInputProps } from 'src/containers/SwapInput/SwapInput.types';
3
+
4
+ type BaseStep = Pick<SwapInputProps, 'chain' | 'token' | 'price'>;
5
+
6
+ export type Step = {
7
+ swapper: SwapInputProps['chain'];
8
+ from: BaseStep;
9
+ to: BaseStep;
10
+ error?: {
11
+ title?: string;
12
+ description?: string;
13
+ };
14
+ alerts?: ReactNode;
15
+ state?: 'error' | 'warning';
16
+ };
2
17
 
3
18
  export type StepDetailsProps = {
4
19
  step: Step;
5
20
  hasSeparator: boolean;
6
- type: 'route-details' | 'route-progress';
21
+ type: 'quote-details' | 'swap-progress';
7
22
  state?: 'default' | 'in-progress' | 'completed' | 'warning' | 'error';
8
23
  isFocused?: boolean;
9
24
  tabIndex?: number;
@@ -1,2 +1,2 @@
1
1
  export { StepDetails } from './StepDetails';
2
- export type { StepDetailsProps } from './StepDetails.types';
2
+ export type { StepDetailsProps, Step } from './StepDetails.types';
@@ -1,4 +1,4 @@
1
- import type { Step } from '../BestRoute/BestRoute.types';
1
+ import type { Step } from './StepDetails.types';
2
2
 
3
3
  export const step1: Step = {
4
4
  swapper: {
@@ -1,6 +1,5 @@
1
1
  export * from './I18nManager';
2
2
  export * from './Alert';
3
- export * from './BestRoute';
4
3
  export * from './BlockchainsChip';
5
4
  export * from './BottomLogo';
6
5
  export * from './Button';
@@ -45,7 +44,7 @@ export * from './ListItem';
45
44
  export * from './NotFound';
46
45
  export * from './MessageBox';
47
46
  export * from './IconButton';
48
- export * from './RouteCost';
47
+ export * from './QuoteCost';
49
48
  export * from './TokenAmount';
50
49
  export * from './StepDetails';
51
50
  export * from './Popover';
@@ -1,4 +0,0 @@
1
- import type { BestRouteProps } from './BestRoute.types';
2
- import React from 'react';
3
- export declare function BestRoute(props: BestRouteProps): React.JSX.Element;
4
- //# sourceMappingURL=BestRoute.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BestRoute.d.ts","sourceRoot":"","sources":["../../../../../../src/components/BestRoute/BestRoute.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,KAA4C,MAAM,OAAO,CAAC;AAuBjE,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,qBAsJ9C"}
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { BestRoute } from './BestRoute';
3
- declare const meta: Meta<typeof BestRoute>;
4
- export default meta;
5
- type Story = StoryObj<typeof BestRoute>;
6
- export declare const Main: Story;
7
- //# sourceMappingURL=BestRoute.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BestRoute.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/BestRoute/BestRoute.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAEhC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,KAIlB,CAAC"}