@rango-dev/ui 0.17.1-next.9 → 0.18.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/CHANGELOG.md +20 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +4 -4
- package/dist/translations/en.d.ts.map +1 -1
- package/dist/translations/es.d.ts.map +1 -1
- package/dist/translations/fr.d.ts.map +1 -1
- package/dist/translations/{jp.d.ts → ja.d.ts} +1 -1
- package/dist/translations/ja.d.ts.map +1 -0
- package/dist/widget/ui/src/components/Flags/English.d.ts +4 -0
- package/dist/widget/ui/src/components/Flags/English.d.ts.map +1 -0
- package/dist/widget/ui/src/components/Flags/Flags.constants.d.ts +2 -0
- package/dist/widget/ui/src/components/Flags/Flags.constants.d.ts.map +1 -0
- package/dist/widget/ui/src/components/Flags/Flags.types.d.ts +4 -0
- package/dist/widget/ui/src/components/Flags/Flags.types.d.ts.map +1 -0
- package/dist/widget/ui/src/components/Flags/French.d.ts +4 -0
- package/dist/widget/ui/src/components/Flags/French.d.ts.map +1 -0
- package/dist/widget/ui/src/components/Flags/Japanese.d.ts +4 -0
- package/dist/widget/ui/src/components/Flags/Japanese.d.ts.map +1 -0
- package/dist/widget/ui/src/components/Flags/Spanish.d.ts +4 -0
- package/dist/widget/ui/src/components/Flags/Spanish.d.ts.map +1 -0
- package/dist/widget/ui/src/components/Flags/index.d.ts +7 -0
- package/dist/widget/ui/src/components/Flags/index.d.ts.map +1 -0
- package/dist/widget/ui/src/components/I18nManager/I18nManager.d.ts +2 -2
- package/dist/widget/ui/src/components/I18nManager/I18nManager.d.ts.map +1 -1
- package/dist/widget/ui/src/components/StepDetails/StepDetails.d.ts.map +1 -1
- package/dist/widget/ui/src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Typography/Typography.styles.d.ts +4 -4
- package/dist/widget/ui/src/components/index.d.ts +1 -0
- package/dist/widget/ui/src/components/index.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/Warnings/HighSlippageWarning.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/Warnings/MinRequiredSlippage.d.ts.map +1 -1
- package/package.json +6 -4
- package/src/components/Flags/English.tsx +35 -0
- package/src/components/Flags/Flags.constants.ts +1 -0
- package/src/components/Flags/Flags.types.ts +3 -0
- package/src/components/Flags/French.tsx +26 -0
- package/src/components/Flags/Japanese.tsx +25 -0
- package/src/components/Flags/Spanish.tsx +85 -0
- package/src/components/Flags/index.ts +8 -0
- package/src/components/I18nManager/I18nManager.tsx +18 -9
- package/src/components/StepDetails/StepDetails.tsx +1 -2
- package/src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.tsx +4 -5
- package/src/components/index.ts +1 -0
- package/src/containers/Warnings/HighSlippageWarning.tsx +7 -10
- package/src/containers/Warnings/MinRequiredSlippage.tsx +7 -10
- package/dist/translations/jp.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../translations/en.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../translations/en.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAAwgW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../translations/es.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../translations/es.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAAuyX,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../translations/fr.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../translations/fr.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAAm9X,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const messages: any;
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=ja.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ja.d.ts","sourceRoot":"","sources":["../../../../translations/ja.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAAyxS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"English.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Flags/English.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,aAAa,qBA4BnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flags.constants.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Flags/Flags.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flags.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Flags/Flags.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"French.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Flags/French.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,aAAa,qBAmBlD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Japanese.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Flags/Japanese.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,qBAkBpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spanish.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Flags/Spanish.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,aAAa,qBA8EnD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import English from './English';
|
|
2
|
+
import French from './French';
|
|
3
|
+
import Japanese from './Japanese';
|
|
4
|
+
import Spanish from './Spanish';
|
|
5
|
+
export type { FlagPropTypes } from './Flags.types';
|
|
6
|
+
export { English, Spanish, Japanese, French };
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Flags/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -3,12 +3,12 @@ import React from 'react';
|
|
|
3
3
|
declare const messages: {
|
|
4
4
|
en: any;
|
|
5
5
|
es: any;
|
|
6
|
-
|
|
6
|
+
ja: any;
|
|
7
7
|
fr: any;
|
|
8
8
|
};
|
|
9
9
|
export type Language = keyof typeof messages;
|
|
10
10
|
interface PropTypes {
|
|
11
|
-
language
|
|
11
|
+
language: Language;
|
|
12
12
|
}
|
|
13
13
|
declare function I18nManager(props: PropsWithChildren<PropTypes>): React.JSX.Element;
|
|
14
14
|
export { I18nManager };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"I18nManager.d.ts","sourceRoot":"","sources":["../../../../../../src/components/I18nManager/I18nManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/C,OAAO,
|
|
1
|
+
{"version":3,"file":"I18nManager.d.ts","sourceRoot":"","sources":["../../../../../../src/components/I18nManager/I18nManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/C,OAAO,KAAgC,MAAM,OAAO,CAAC;AAcrD,QAAA,MAAM,QAAQ;;;;;CAKb,CAAC;AAIF,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,QAAQ,CAAC;AAC7C,UAAU,SAAS;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,iBAAS,WAAW,CAAC,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,qBAgBvD;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepDetails.d.ts","sourceRoot":"","sources":["../../../../../../src/components/StepDetails/StepDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,OAAO,KAA8C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"StepDetails.d.ts","sourceRoot":"","sources":["../../../../../../src/components/StepDetails/StepDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,OAAO,KAA8C,MAAM,OAAO,CAAC;AAqGnE,eAAO,MAAM,WAAW,oHAA6B,CAAC"}
|
package/dist/widget/ui/src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwapDetailsPlaceholder.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAM1B,CAAC;AAEH,UAAU,SAAS;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"SwapDetailsPlaceholder.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAM1B,CAAC;AAEH,UAAU,SAAS;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,qBAyBtD"}
|
|
@@ -3,10 +3,10 @@ export declare const TypographyContainer: import("@stitches/react/types/styled-c
|
|
|
3
3
|
size?: "small" | "medium" | "large" | "xmedium" | "xsmall" | undefined;
|
|
4
4
|
align?: "center" | "left" | "right" | undefined;
|
|
5
5
|
noWrap?: boolean | "true" | undefined;
|
|
6
|
-
ml?: 12 | 4 | 8 |
|
|
7
|
-
mt?: 12 | 4 | 8 |
|
|
8
|
-
mr?: 12 | 4 | 8 |
|
|
9
|
-
mb?: 12 | 4 | 8 |
|
|
6
|
+
ml?: 2 | 12 | 4 | 8 | "4" | "8" | "12" | "2" | undefined;
|
|
7
|
+
mt?: 2 | 12 | 4 | 8 | "4" | "8" | "12" | "2" | undefined;
|
|
8
|
+
mr?: 2 | 12 | 4 | 8 | "4" | "8" | "12" | "2" | undefined;
|
|
9
|
+
mb?: 2 | 12 | 4 | 8 | "4" | "8" | "12" | "2" | undefined;
|
|
10
10
|
}, {
|
|
11
11
|
sm: string;
|
|
12
12
|
md: string;
|
|
@@ -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,U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ning.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"HighSlippageWarning.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/Warnings/HighSlippageWarning.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,SAAS;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,qBAiBnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinRequiredSlippage.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/Warnings/MinRequiredSlippage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MinRequiredSlippage.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/Warnings/MinRequiredSlippage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,SAAS;IACjB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAMD,wBAAgB,mBAAmB,CAAC,EAClC,mBAAmB,EACnB,cAAc,GACf,EAAE,SAAS,qBAWX"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"lint": "eslint \"**/*.{ts,tsx}\" --ignore-path ../../.eslintignore"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
+
"@lingui/core": "4.2.1",
|
|
27
|
+
"@lingui/react": "4.2.1",
|
|
26
28
|
"@rango-dev/queue-manager-rango-preset": "*",
|
|
27
29
|
"react": ">=16"
|
|
28
30
|
},
|
|
@@ -31,6 +33,8 @@
|
|
|
31
33
|
"@babel/preset-env": "^7.21.4",
|
|
32
34
|
"@babel/preset-react": "^7.18.6",
|
|
33
35
|
"@babel/preset-typescript": "^7.21.4",
|
|
36
|
+
"@lingui/core": "4.2.1",
|
|
37
|
+
"@lingui/react": "4.2.1",
|
|
34
38
|
"@storybook/addon-essentials": "^7.1.1",
|
|
35
39
|
"@storybook/addon-info": "^5.3.21",
|
|
36
40
|
"@storybook/addon-links": "^7.1.1",
|
|
@@ -55,15 +59,13 @@
|
|
|
55
59
|
"typescript": "^4.8.4"
|
|
56
60
|
},
|
|
57
61
|
"dependencies": {
|
|
58
|
-
"@lingui/core": "4.2.1",
|
|
59
|
-
"@lingui/react": "4.2.1",
|
|
60
62
|
"@radix-ui/react-checkbox": "^1.0.1",
|
|
61
63
|
"@radix-ui/react-collapsible": "^1.0.3",
|
|
62
64
|
"@radix-ui/react-popover": "^1.0.6",
|
|
63
65
|
"@radix-ui/react-radio-group": "^1.1.1",
|
|
64
66
|
"@radix-ui/react-switch": "^1.0.1",
|
|
65
67
|
"@radix-ui/react-tooltip": "^1.0.2",
|
|
66
|
-
"@rango-dev/wallets-shared": "^0.
|
|
68
|
+
"@rango-dev/wallets-shared": "^0.18.0",
|
|
67
69
|
"@stitches/react": "^1.2.8",
|
|
68
70
|
"rango-sdk": "^0.1.35",
|
|
69
71
|
"react-virtualized-auto-sizer": "^1.0.7",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { FlagPropTypes } from './Flags.types';
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
import { DEFAULT_SIZE } from './Flags.constants';
|
|
6
|
+
|
|
7
|
+
export default function English(props: FlagPropTypes) {
|
|
8
|
+
const { size = DEFAULT_SIZE } = props;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<svg
|
|
12
|
+
width={size}
|
|
13
|
+
height={size}
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
viewBox="0 0 512 512">
|
|
16
|
+
<mask id="a">
|
|
17
|
+
<circle cx="256" cy="256" r="256" fill="#fff" />
|
|
18
|
+
</mask>
|
|
19
|
+
<g mask="url(#a)">
|
|
20
|
+
<path
|
|
21
|
+
fill="#eee"
|
|
22
|
+
d="m0 0 8 22-8 23v23l32 54-32 54v32l32 48-32 48v32l32 54-32 54v68l22-8 23 8h23l54-32 54 32h32l48-32 48 32h32l54-32 54 32h68l-8-22 8-23v-23l-32-54 32-54v-32l-32-48 32-48v-32l-32-54 32-54V0l-22 8-23-8h-23l-54 32-54-32h-32l-48 32-48-32h-32l-54 32L68 0H0z"
|
|
23
|
+
/>
|
|
24
|
+
<path
|
|
25
|
+
fill="#0052b4"
|
|
26
|
+
d="M336 0v108L444 0Zm176 68L404 176h108zM0 176h108L0 68ZM68 0l108 108V0Zm108 512V404L68 512ZM0 444l108-108H0Zm512-108H404l108 108Zm-68 176L336 404v108z"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
fill="#d80027"
|
|
30
|
+
d="M0 0v45l131 131h45L0 0zm208 0v208H0v96h208v208h96V304h208v-96H304V0h-96zm259 0L336 131v45L512 0h-45zM176 336 0 512h45l131-131v-45zm160 0 176 176v-45L381 336h-45z"
|
|
31
|
+
/>
|
|
32
|
+
</g>
|
|
33
|
+
</svg>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const DEFAULT_SIZE = '1em';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { FlagPropTypes } from './Flags.types';
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
import { DEFAULT_SIZE } from './Flags.constants';
|
|
6
|
+
|
|
7
|
+
export default function French(props: FlagPropTypes) {
|
|
8
|
+
const { size = DEFAULT_SIZE } = props;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<svg
|
|
12
|
+
width={size}
|
|
13
|
+
height={size}
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
viewBox="0 0 512 512">
|
|
16
|
+
<mask id="a">
|
|
17
|
+
<circle cx="256" cy="256" r="256" fill="#fff" />
|
|
18
|
+
</mask>
|
|
19
|
+
<g mask="url(#a)">
|
|
20
|
+
<path fill="#eee" d="M167 0h178l25.9 252.3L345 512H167l-29.8-253.4z" />
|
|
21
|
+
<path fill="#0052b4" d="M0 0h167v512H0z" />
|
|
22
|
+
<path fill="#d80027" d="M345 0h167v512H345z" />
|
|
23
|
+
</g>
|
|
24
|
+
</svg>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { FlagPropTypes } from './Flags.types';
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
import { DEFAULT_SIZE } from './Flags.constants';
|
|
6
|
+
|
|
7
|
+
export default function Japanese(props: FlagPropTypes) {
|
|
8
|
+
const { size = DEFAULT_SIZE } = props;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<svg
|
|
12
|
+
width={size}
|
|
13
|
+
height={size}
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
viewBox="0 0 512 512">
|
|
16
|
+
<mask id="a">
|
|
17
|
+
<circle cx="256" cy="256" r="256" fill="#fff" />
|
|
18
|
+
</mask>
|
|
19
|
+
<g mask="url(#a)">
|
|
20
|
+
<path fill="#eee" d="M0 0h512v512H0z" />
|
|
21
|
+
<circle cx="256" cy="256" r="111.3" fill="#d80027" />
|
|
22
|
+
</g>
|
|
23
|
+
</svg>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { FlagPropTypes } from './Flags.types';
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
import { DEFAULT_SIZE } from './Flags.constants';
|
|
6
|
+
|
|
7
|
+
export default function Spanish(props: FlagPropTypes) {
|
|
8
|
+
const { size = DEFAULT_SIZE } = props;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<svg
|
|
12
|
+
width={size}
|
|
13
|
+
height={size}
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
viewBox="0 0 512 512">
|
|
16
|
+
<mask id="a">
|
|
17
|
+
<circle cx="256" cy="256" r="256" fill="#fff" />
|
|
18
|
+
</mask>
|
|
19
|
+
<g mask="url(#a)">
|
|
20
|
+
<path fill="#ffda44" d="m0 128 256-32 256 32v256l-256 32L0 384Z" />
|
|
21
|
+
<path fill="#d80027" d="M0 0h512v128H0zm0 384h512v128H0z" />
|
|
22
|
+
<g fill="#eee">
|
|
23
|
+
<path d="M144 304h-16v-80h16zm128 0h16v-80h-16z" />
|
|
24
|
+
<ellipse cx="208" cy="296" rx="48" ry="32" />
|
|
25
|
+
</g>
|
|
26
|
+
<g fill="#d80027">
|
|
27
|
+
<rect width="16" height="24" x="128" y="192" rx="8" />
|
|
28
|
+
<rect width="16" height="24" x="272" y="192" rx="8" />
|
|
29
|
+
<path d="M208 272v24a24 24 0 0 0 24 24 24 24 0 0 0 24-24v-24h-24z" />
|
|
30
|
+
</g>
|
|
31
|
+
<rect width="32" height="16" x="120" y="208" fill="#ff9811" ry="8" />
|
|
32
|
+
<rect width="32" height="16" x="264" y="208" fill="#ff9811" ry="8" />
|
|
33
|
+
<rect width="32" height="16" x="120" y="304" fill="#ff9811" rx="8" />
|
|
34
|
+
<rect width="32" height="16" x="264" y="304" fill="#ff9811" rx="8" />
|
|
35
|
+
<path
|
|
36
|
+
fill="#ff9811"
|
|
37
|
+
d="M160 272v24c0 8 4 14 9 19l5-6 5 10a21 21 0 0 0 10 0l5-10 5 6c6-5 9-11 9-19v-24h-9l-5 8-5-8h-10l-5 8-5-8z"
|
|
38
|
+
/>
|
|
39
|
+
<path d="M122 252h172m-172 24h28m116 0h28" />
|
|
40
|
+
<path
|
|
41
|
+
fill="#d80027"
|
|
42
|
+
d="M122 248a4 4 0 0 0-4 4 4 4 0 0 0 4 4h172a4 4 0 0 0 4-4 4 4 0 0 0-4-4zm0 24a4 4 0 0 0-4 4 4 4 0 0 0 4 4h28a4 4 0 0 0 4-4 4 4 0 0 0-4-4zm144 0a4 4 0 0 0-4 4 4 4 0 0 0 4 4h28a4 4 0 0 0 4-4 4 4 0 0 0-4-4z"
|
|
43
|
+
/>
|
|
44
|
+
<path
|
|
45
|
+
fill="#eee"
|
|
46
|
+
d="M196 168c-7 0-13 5-15 11l-5-1c-9 0-16 7-16 16s7 16 16 16c7 0 13-4 15-11a16 16 0 0 0 17-4 16 16 0 0 0 17 4 16 16 0 1 0 10-20 16 16 0 0 0-27-5c-3-4-7-6-12-6zm0 8c5 0 8 4 8 8 0 5-3 8-8 8-4 0-8-3-8-8 0-4 4-8 8-8zm24 0c5 0 8 4 8 8 0 5-3 8-8 8-4 0-8-3-8-8 0-4 4-8 8-8zm-44 10 4 1 4 8c0 4-4 7-8 7s-8-3-8-8c0-4 4-8 8-8zm64 0c5 0 8 4 8 8 0 5-3 8-8 8-4 0-8-3-8-7l4-8z"
|
|
47
|
+
/>
|
|
48
|
+
<path fill="none" d="M220 284v12c0 7 5 12 12 12s12-5 12-12v-12z" />
|
|
49
|
+
<path fill="#ff9811" d="M200 160h16v32h-16z" />
|
|
50
|
+
<path fill="#eee" d="M208 224h48v48h-48z" />
|
|
51
|
+
<path
|
|
52
|
+
fill="#d80027"
|
|
53
|
+
d="m248 208-8 8h-64l-8-8c0-13 18-24 40-24s40 11 40 24zm-88 16h48v48h-48z"
|
|
54
|
+
/>
|
|
55
|
+
<rect
|
|
56
|
+
width="20"
|
|
57
|
+
height="32"
|
|
58
|
+
x="222"
|
|
59
|
+
y="232"
|
|
60
|
+
fill="#d80027"
|
|
61
|
+
rx="10"
|
|
62
|
+
ry="10"
|
|
63
|
+
/>
|
|
64
|
+
<path
|
|
65
|
+
fill="#ff9811"
|
|
66
|
+
d="M168 232v8h8v16h-8v8h32v-8h-8v-16h8v-8zm8-16h64v8h-64z"
|
|
67
|
+
/>
|
|
68
|
+
<g fill="#ffda44">
|
|
69
|
+
<circle cx="186" cy="202" r="6" />
|
|
70
|
+
<circle cx="208" cy="202" r="6" />
|
|
71
|
+
<circle cx="230" cy="202" r="6" />
|
|
72
|
+
</g>
|
|
73
|
+
<path
|
|
74
|
+
fill="#d80027"
|
|
75
|
+
d="M169 272v43a24 24 0 0 0 10 4v-47h-10zm20 0v47a24 24 0 0 0 10-4v-43h-10z"
|
|
76
|
+
/>
|
|
77
|
+
<g fill="#338af3">
|
|
78
|
+
<circle cx="208" cy="272" r="16" />
|
|
79
|
+
<rect width="32" height="16" x="264" y="320" ry="8" />
|
|
80
|
+
<rect width="32" height="16" x="120" y="320" ry="8" />
|
|
81
|
+
</g>
|
|
82
|
+
</g>
|
|
83
|
+
</svg>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
@@ -2,7 +2,7 @@ import type { PropsWithChildren } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { i18n } from '@lingui/core';
|
|
4
4
|
import { I18nProvider } from '@lingui/react';
|
|
5
|
-
import React, { useEffect } from 'react';
|
|
5
|
+
import React, { useEffect, useReducer } from 'react';
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
*Note: esbuild doesn't work properly with paths yet, so I couldn't use `paths` to make this path shorter.
|
|
@@ -14,13 +14,12 @@ import React, { useEffect } from 'react';
|
|
|
14
14
|
import { messages as enMessages } from '../../../../../translations/en';
|
|
15
15
|
import { messages as esMessages } from '../../../../../translations/es';
|
|
16
16
|
import { messages as frMessages } from '../../../../../translations/fr';
|
|
17
|
-
import { messages as
|
|
17
|
+
import { messages as jaMessages } from '../../../../../translations/ja';
|
|
18
18
|
|
|
19
|
-
const DEFAULT_LANGUAGE = 'en';
|
|
20
19
|
const messages = {
|
|
21
20
|
en: enMessages,
|
|
22
21
|
es: esMessages,
|
|
23
|
-
|
|
22
|
+
ja: jaMessages,
|
|
24
23
|
fr: frMessages,
|
|
25
24
|
};
|
|
26
25
|
|
|
@@ -28,15 +27,25 @@ i18n.load(messages);
|
|
|
28
27
|
|
|
29
28
|
export type Language = keyof typeof messages;
|
|
30
29
|
interface PropTypes {
|
|
31
|
-
language
|
|
30
|
+
language: Language;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
function I18nManager(props: PropsWithChildren<PropTypes>) {
|
|
34
|
+
const [count, forceUpdate] = useReducer((x) => x + 1, 0);
|
|
35
35
|
useEffect(() => {
|
|
36
|
-
i18n.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
i18n.on('change', () => {
|
|
37
|
+
forceUpdate();
|
|
38
|
+
});
|
|
39
|
+
}, [i18n]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
i18n.activate(props.language);
|
|
42
|
+
}, [props.language]);
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<I18nProvider i18n={i18n} key={count}>
|
|
46
|
+
{props.children}
|
|
47
|
+
</I18nProvider>
|
|
48
|
+
);
|
|
40
49
|
}
|
|
41
50
|
|
|
42
51
|
export { I18nManager };
|
|
@@ -52,8 +52,7 @@ const StepDetailsComponent = forwardRef<HTMLDivElement, StepDetailsProps>(
|
|
|
52
52
|
size="small"
|
|
53
53
|
variant="body">
|
|
54
54
|
{i18n.t({
|
|
55
|
-
id: '
|
|
56
|
-
message: 'Swap on {fromChain} via {swapper}',
|
|
55
|
+
id: 'Swap on {fromChain} via {swapper}',
|
|
57
56
|
values: {
|
|
58
57
|
fromChain: step.from.chain.displayName,
|
|
59
58
|
swapper: step.swapper.displayName,
|
|
@@ -36,11 +36,10 @@ export function SwapDetailsPlaceholder(props: PropTypes) {
|
|
|
36
36
|
) : (
|
|
37
37
|
<Alert
|
|
38
38
|
type="error"
|
|
39
|
-
title={i18n.t(
|
|
40
|
-
'
|
|
41
|
-
{ requestId },
|
|
42
|
-
|
|
43
|
-
)}
|
|
39
|
+
title={i18n.t({
|
|
40
|
+
id: 'Swap with request ID = {requestId} not found.',
|
|
41
|
+
values: { requestId },
|
|
42
|
+
})}
|
|
44
43
|
/>
|
|
45
44
|
)}
|
|
46
45
|
</PlaceholderContainer>
|
package/src/components/index.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i18n } from '@lingui/core';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { Alert } from '../../components/Alert';
|
|
3
5
|
import { ChangeSlippageButton } from '../../components/ChangeSlippageButton';
|
|
4
|
-
import { i18n } from '@lingui/core';
|
|
5
6
|
|
|
6
7
|
interface PropTypes {
|
|
7
8
|
selectedSlippage: number;
|
|
@@ -18,14 +19,10 @@ export function HighSlippageWarning(props: PropTypes) {
|
|
|
18
19
|
<Alert
|
|
19
20
|
type="warning"
|
|
20
21
|
footer={<ChangeSlippageButton onClick={changeSlippage} />}>
|
|
21
|
-
{i18n.t(
|
|
22
|
-
'
|
|
23
|
-
{ selectedSlippage },
|
|
24
|
-
|
|
25
|
-
message:
|
|
26
|
-
' Caution, your slippage is high (={selectedSlippage}). Your trade may be front run.',
|
|
27
|
-
}
|
|
28
|
-
)}
|
|
22
|
+
{i18n.t({
|
|
23
|
+
id: ' Caution, your slippage is high (={selectedSlippage}). Your trade may be front run.',
|
|
24
|
+
values: { selectedSlippage },
|
|
25
|
+
})}
|
|
29
26
|
</Alert>
|
|
30
27
|
)}
|
|
31
28
|
</>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { i18n } from '@lingui/core';
|
|
3
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { ChangeSlippageButton, Divider, Typography } from '../../components';
|
|
4
5
|
import { styled } from '../../theme';
|
|
5
6
|
|
|
6
7
|
interface PropTypes {
|
|
@@ -18,14 +19,10 @@ export function MinRequiredSlippage({
|
|
|
18
19
|
}: PropTypes) {
|
|
19
20
|
return (
|
|
20
21
|
<StyledMessage variant="body" size="small">
|
|
21
|
-
{i18n.t(
|
|
22
|
-
'
|
|
23
|
-
{ minRequiredSlippage },
|
|
24
|
-
|
|
25
|
-
message:
|
|
26
|
-
'We recommend you to increase slippage to at least {minRequiredSlippage} for this route.',
|
|
27
|
-
}
|
|
28
|
-
)}
|
|
22
|
+
{i18n.t({
|
|
23
|
+
id: 'We recommend you to increase slippage to at least {minRequiredSlippage} for this route.',
|
|
24
|
+
values: { minRequiredSlippage },
|
|
25
|
+
})}
|
|
29
26
|
<Divider size={8} />
|
|
30
27
|
<ChangeSlippageButton onClick={changeSlippage} />
|
|
31
28
|
</StyledMessage>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jp.d.ts","sourceRoot":"","sources":["../../../../translations/jp.ts"],"names":[],"mappings":"AAAkB,eAAO,MAAM,QAAQ,KAAkvV,CAAC"}
|