@transferwise/components 0.0.0-experimental-3759445 → 0.0.0-experimental-cc11279
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/build/index.js +20 -15
- package/build/index.js.map +1 -1
- package/build/index.mjs +20 -15
- package/build/index.mjs.map +1 -1
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/dimmer/Dimmer.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/loader/Loader.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/popover/Popover.d.ts.map +1 -1
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/stepper/deviceDetection.d.ts.map +1 -1
- package/build/types/uploadInput/uploadButton/UploadButton.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/accordion/Accordion.story.tsx +1 -1
- package/src/alert/Alert.tsx +2 -1
- package/src/avatar/colors/colors.ts +1 -1
- package/src/body/Body.spec.tsx +1 -1
- package/src/body/Body.story.tsx +8 -8
- package/src/checkbox/Checkbox.js +1 -1
- package/src/checkboxButton/CheckboxButton.spec.tsx +0 -1
- package/src/common/Option/Option.tsx +1 -1
- package/src/common/deviceDetection/deviceDetection.js +1 -1
- package/src/common/deviceDetection/deviceDetection.spec.js +4 -2
- package/src/common/responsivePanel/ResponsivePanel.spec.js +11 -15
- package/src/decision/Decision.spec.js +0 -1
- package/src/dimmer/Dimmer.tsx +6 -2
- package/src/inlineAlert/InlineAlert.story.tsx +8 -7
- package/src/inputs/SelectInput.tsx +1 -0
- package/src/link/Link.story.tsx +16 -16
- package/src/loader/Loader.tsx +0 -1
- package/src/logo/Logo.js +2 -2
- package/src/moneyInput/MoneyInput.story.tsx +3 -3
- package/src/nudge/Nudge.spec.tsx +5 -5
- package/src/phoneNumberInput/PhoneNumberInput.tsx +2 -1
- package/src/phoneNumberInput/utils/cleanNumber/cleanNumber.ts +1 -1
- package/src/popover/Popover.tsx +2 -1
- package/src/promoCard/PromoCard.tsx +1 -1
- package/src/radioGroup/RadioGroup.spec.js +1 -1
- package/src/section/Section.story.tsx +2 -1
- package/src/segmentedControl/SegmentedControl.spec.tsx +2 -2
- package/src/select/Select.js +2 -3
- package/src/stepper/deviceDetection.js +1 -2
- package/src/stepper/deviceDetection.spec.js +8 -3
- package/src/test-utils/index.js +1 -1
- package/src/test-utils/story-config.ts +1 -1
- package/src/title/Title.spec.tsx +1 -1
- package/src/typeahead/Typeahead.spec.js +4 -2
- package/src/upload/Upload.spec.js +8 -4
- package/src/uploadInput/uploadButton/UploadButton.tsx +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/alert/Alert.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAc,OAAO,EAAE,MAAM,WAAW,CAAC;AASjE,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACvB,CAAC;AAEF,kDAAkD;AAClD,KAAK,mBAAmB,GAAG,GAAG,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC;AACrF,KAAK,iBAAiB,GAAG,GACrB,SAAS,CAAC,QAAQ,GAClB,SAAS,CAAC,OAAO,GACjB,SAAS,CAAC,OAAO,GACjB,SAAS,CAAC,QAAQ,EAAE,CAAC;AACzB,MAAM,MAAM,SAAS,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;AAEhE,oBAAY,kBAAkB;IAC5B,QAAQ,YAAY;IACpB,GAAG,cAAc;IACjB,SAAS,aAAa;IACtB,WAAW,cAAc;IACzB,MAAM,gBAAgB;IACtB,YAAY,eAAe;CAC5B;AAED,MA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
|
-
{"version":3,"file":"Dimmer.d.ts","sourceRoot":"","sources":["../../../src/dimmer/Dimmer.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,SAAS,EAKV,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,WAAW,EACX,cAAc,EACd,cAAc,EACd,WAAW,EAEZ,MAAM,WAAW,CAAC;AAOnB,eAAO,MAAM,cAAc,MAAM,CAAC;AAIlC,KAAK,WAAW,GAAG,WAAW,GAAG;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,WAAW,GAAG,cAAc,GAAG,cAAc,CAAC;IAChE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,KAAK,IAAI,CAAC;CACvD,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,KAAK,SAU3C,CAAC;AAEF,QAAA,MAAM,MAAM,kJAWT,WAAW,
|
|
1
|
+
{"version":3,"file":"Dimmer.d.ts","sourceRoot":"","sources":["../../../src/dimmer/Dimmer.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,SAAS,EAKV,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,WAAW,EACX,cAAc,EACd,cAAc,EACd,WAAW,EAEZ,MAAM,WAAW,CAAC;AAOnB,eAAO,MAAM,cAAc,MAAM,CAAC;AAIlC,KAAK,WAAW,GAAG,WAAW,GAAG;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAA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CAAC,CAAC,EAAE;IAAE,EAAE,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAEzD,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,mCAAmC,GAAG,QAAQ,EAAE,EACjG,EAAkB,EAClB,GAAG,SAAS,EACb,EAAE,6BAA6B,CAAC,CAAC,CAAC,+BAalC;AAyTD,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,IAAI,EACJ,WAAW,EACX,IAAI,GACL,EAAE,6BAA6B,+BAiD/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loader.d.ts","sourceRoot":"","sources":["../../../src/loader/Loader.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAQ,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGnG,KAAK,cAAc,GAAG,cAAc,GAAG,SAAS,GAAG,cAAc,CAAC;AAElE,KAAK,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAEvC,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,GAAG,cAAc,CAAC;IACjC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;GASG;AACH,QAAA,MAAM,MAAM,gEAMT,WAAW,
|
|
1
|
+
{"version":3,"file":"Loader.d.ts","sourceRoot":"","sources":["../../../src/loader/Loader.tsx"],"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CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IACvD,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAKD,QAAA,MAAM,gBAAgB,+LAenB,qBAAqB,gCAwIvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/popover/Popover.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,QAAQ,EAAc,MAAM,WAAW,CAAC;AAKjD,kDAAkD;AAClD,KAAK,mCAAmC,GACpC,GAAG,QAAQ,CAAC,QAAQ,EAAE,GACtB,GAAG,QAAQ,CAAC,SAAS,EAAE,GACvB,GAAG,QAAQ,CAAC,YAAY,EAAE,GAC1B,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;AAE9B,MAAM,MAAM,yBAAyB,GACjC,GAAG,QAAQ,CAAC,GAAG,EAAE,GACjB,GAAG,QAAQ,CAAC,KAAK,EAAE,GACnB,GAAG,QAAQ,CAAC,MAAM,EAAE,GACpB,GAAG,QAAQ,CAAC,IAAI,EAAE,GAClB,mCAAmC,CAAC;AAExC,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;IAC/C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/popover/Popover.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,QAAQ,EAAc,MAAM,WAAW,CAAC;AAKjD,kDAAkD;AAClD,KAAK,mCAAmC,GACpC,GAAG,QAAQ,CAAC,QAAQ,EAAE,GACtB,GAAG,QAAQ,CAAC,SAAS,EAAE,GACvB,GAAG,QAAQ,CAAC,YAAY,EAAE,GAC1B,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;AAE9B,MAAM,MAAM,yBAAyB,GACjC,GAAG,QAAQ,CAAC,GAAG,EAAE,GACjB,GAAG,QAAQ,CAAC,KAAK,EAAE,GACnB,GAAG,QAAQ,CAAC,MAAM,EAAE,GACpB,GAAG,QAAQ,CAAC,IAAI,EAAE,GAClB,mCAAmC,CAAC;AAExC,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;IAC/C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAeD,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,OAAO,EACP,kBAAmC,EACnC,KAAK,EACL,OAAO,GACR,EAAE,YAAY,+BAiDd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.js"],"names":[],"mappings":"AA6EA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.js"],"names":[],"mappings":"AA6EA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;gCAieC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceDetection.d.ts","sourceRoot":"","sources":["../../../src/stepper/deviceDetection.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deviceDetection.d.ts","sourceRoot":"","sources":["../../../src/stepper/deviceDetection.js"],"names":[],"mappings":"AA2BA,yCAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadButton.d.ts","sourceRoot":"","sources":["../../../../src/uploadInput/uploadButton/UploadButton.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,QAAQ,EAAc,MAAM,cAAc,CAAC;AAOpD,KAAK,gBAAgB,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,QAAQ,EAAE,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IAEpC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,+BAA+B,EAAE,OAAO,CAAC;CAC1C,CAAC;AAEF,oBAAY,QAAQ;IAClB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;CACxB;AAOD,QAAA,MAAM,YAAY,2IAWf,iBAAiB,
|
|
1
|
+
{"version":3,"file":"UploadButton.d.ts","sourceRoot":"","sources":["../../../../src/uploadInput/uploadButton/UploadButton.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,QAAQ,EAAc,MAAM,cAAc,CAAC;AAOpD,KAAK,gBAAgB,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,QAAQ,EAAE,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IAEpC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,+BAA+B,EAAE,OAAO,CAAC;CAC1C,CAAC;AAEF,oBAAY,QAAQ;IAClB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;CACxB;AAOD,QAAA,MAAM,YAAY,2IAWf,iBAAiB,gCA8KnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-cc11279",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"build:css": "gulp compileLess --dest=src",
|
|
146
146
|
"build": "npm-run-all build:*",
|
|
147
147
|
"build:clean": "rm -rf lib build",
|
|
148
|
-
"build:crowdin-source-file": "formatjs extract 'src/**/*.messages.+(js|ts|tsx)' --out-file src/i18n/en.json --format simple && prettier --
|
|
148
|
+
"build:crowdin-source-file": "formatjs extract 'src/**/*.messages.+(js|ts|tsx)' --out-file src/i18n/en.json --format simple && prettier --write src/i18n/*.json",
|
|
149
149
|
"build:js": "rollup --config --sourcemap",
|
|
150
150
|
"build:generate-types": "node ./scripts/generate-type-declarations.js",
|
|
151
151
|
"build:copy-files": "cpx 'src/**/!(db)/*.{json,svg}' build",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"lint": "pnpm run lint:check",
|
|
158
158
|
"lint:check": "npm-run-all --parallel lint:check:*",
|
|
159
159
|
"lint:check:format": "prettier --check --ignore-path ../../.prettierignore . || echo \"Prettier failed. Remove this to make this a failure\"",
|
|
160
|
-
"lint:check:js+ts": "eslint --ext .js,.jsx,.mjs,.ts,.tsx,.mts --ignore-path ../../.gitignore .",
|
|
160
|
+
"lint:check:js+ts": "eslint --ext .js,.jsx,.mjs,.cjs,.ts,.tsx,.mts,.cts --ignore-path ../../.gitignore .",
|
|
161
161
|
"lint:check:types": "tsc --noEmit --emitDeclarationOnly false",
|
|
162
162
|
"lint:fix": "npm-run-all --serial lint:fix:*",
|
|
163
163
|
"lint:fix:format": "prettier --write --ignore-path ../../.prettierignore .",
|
package/src/alert/Alert.tsx
CHANGED
|
@@ -23,7 +23,7 @@ const hashSeed = (seed: string): number => {
|
|
|
23
23
|
let hashValue = 0;
|
|
24
24
|
let basePow = 1;
|
|
25
25
|
|
|
26
|
-
for (let i = 0; i < seed.length; i
|
|
26
|
+
for (let i = 0; i < seed.length; i += 1) {
|
|
27
27
|
hashValue = (hashValue + seed.charCodeAt(i) * basePow) % modulo;
|
|
28
28
|
basePow = (basePow * base) % modulo;
|
|
29
29
|
}
|
package/src/body/Body.spec.tsx
CHANGED
|
@@ -34,7 +34,7 @@ describe('Body', () => {
|
|
|
34
34
|
|
|
35
35
|
it('handles unsupported typography type', () => {
|
|
36
36
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
37
|
-
// @ts-
|
|
37
|
+
// @ts-expect-error
|
|
38
38
|
render(<Body type={Typography.TITLE_SCREEN}>Test</Body>);
|
|
39
39
|
const copy = screen.getByText('Test');
|
|
40
40
|
expect(copy).toBeInTheDocument();
|
package/src/body/Body.story.tsx
CHANGED
|
@@ -15,8 +15,8 @@ export const Basic = () => {
|
|
|
15
15
|
<div>
|
|
16
16
|
<Title type={Typography.TITLE_SUBSECTION}>Body Large Bold</Title>
|
|
17
17
|
<Body as="p" type={Typography.BODY_LARGE_BOLD}>
|
|
18
|
-
We’re building the world
|
|
19
|
-
world
|
|
18
|
+
We’re building the world’s most <strong>international account</strong>. We’re building the
|
|
19
|
+
world’s most <b>international account</b>.
|
|
20
20
|
</Body>
|
|
21
21
|
<Body as="p" type={Typography.BODY_LARGE_BOLD}>
|
|
22
22
|
Ми будуємо найбільш <strong>міжнародний рахунок у світі</strong>. Ми будуємо найбільш{' '}
|
|
@@ -37,8 +37,8 @@ export const Basic = () => {
|
|
|
37
37
|
<div>
|
|
38
38
|
<Title type={Typography.TITLE_SUBSECTION}>Body Default</Title>
|
|
39
39
|
<Body as="p" type={Typography.BODY_DEFAULT}>
|
|
40
|
-
We’re building the world
|
|
41
|
-
world
|
|
40
|
+
We’re building the world’s most <strong>international account</strong>. We’re building the
|
|
41
|
+
world’s most <b>international account</b>.
|
|
42
42
|
</Body>
|
|
43
43
|
<Body as="p" type={Typography.BODY_DEFAULT}>
|
|
44
44
|
Ми будуємо найбільш <strong>міжнародний рахунок у світі</strong>. Ми будуємо найбільш{' '}
|
|
@@ -59,8 +59,8 @@ export const Basic = () => {
|
|
|
59
59
|
<div>
|
|
60
60
|
<Title type={Typography.TITLE_SUBSECTION}>Body Default Bold</Title>
|
|
61
61
|
<Body as="p" type={Typography.BODY_DEFAULT_BOLD}>
|
|
62
|
-
We’re building the world
|
|
63
|
-
world
|
|
62
|
+
We’re building the world’s most <strong>international account</strong>. We’re building the
|
|
63
|
+
world’s most <b>international account</b>.
|
|
64
64
|
</Body>
|
|
65
65
|
<Body as="p" type={Typography.BODY_DEFAULT_BOLD}>
|
|
66
66
|
Ми будуємо найбільш <strong>міжнародний рахунок у світі</strong>. Ми будуємо найбільш{' '}
|
|
@@ -81,8 +81,8 @@ export const Basic = () => {
|
|
|
81
81
|
<div>
|
|
82
82
|
<Title type={Typography.TITLE_SUBSECTION}>Body Large</Title>
|
|
83
83
|
<Body as="p" type={Typography.BODY_LARGE}>
|
|
84
|
-
We’re building the world
|
|
85
|
-
world
|
|
84
|
+
We’re building the world’s most <strong>international account</strong>. We’re building the
|
|
85
|
+
world’s most <b>international account</b>.
|
|
86
86
|
</Body>
|
|
87
87
|
<Body as="p" type={Typography.BODY_LARGE}>
|
|
88
88
|
Ми будуємо найбільш <strong>міжнародний рахунок у світі</strong>. Ми будуємо найбільш{' '}
|
package/src/checkbox/Checkbox.js
CHANGED
|
@@ -34,7 +34,7 @@ const Checkbox = ({
|
|
|
34
34
|
const innerDisabled = disabled || readOnly;
|
|
35
35
|
return (
|
|
36
36
|
<div id={id} className={classList}>
|
|
37
|
-
{/* eslint-disable jsx-a11y/label-has-for */}
|
|
37
|
+
{/* eslint-disable-next-line jsx-a11y/label-has-for */}
|
|
38
38
|
<label className={classNames({ disabled })}>
|
|
39
39
|
<CheckboxButton
|
|
40
40
|
className="p-r-2"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function isIosDevice() {
|
|
2
2
|
const sampleTouchDevices = ['iphone', 'ipad', 'ipod'];
|
|
3
3
|
const matchString = sampleTouchDevices.map((device) => `(${device})`).join('|');
|
|
4
|
-
const regex = new RegExp(matchString, '
|
|
4
|
+
const regex = new RegExp(matchString, 'gi');
|
|
5
5
|
|
|
6
6
|
return typeof navigator !== 'undefined' && !!navigator.userAgent.match(regex);
|
|
7
7
|
}
|
|
@@ -2,8 +2,10 @@ import { isIosDevice } from './deviceDetection';
|
|
|
2
2
|
|
|
3
3
|
describe('Device detection', () => {
|
|
4
4
|
function fakeUserAgent(userAgent) {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
Object.defineProperty(navigator, 'userAgent', {
|
|
6
|
+
value: userAgent,
|
|
7
|
+
configurable: true,
|
|
8
|
+
});
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
beforeEach(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Breakpoint, Position } from '..';
|
|
2
|
-
import { mockMatchMedia, render
|
|
2
|
+
import { mockMatchMedia, render } from '../../test-utils';
|
|
3
3
|
|
|
4
4
|
import ResponsivePanel from './ResponsivePanel';
|
|
5
5
|
|
|
@@ -45,13 +45,11 @@ describe('ResponsivePanel', () => {
|
|
|
45
45
|
|
|
46
46
|
describe('on desktop', () => {
|
|
47
47
|
it('renders Panel', async () => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
));
|
|
54
|
-
});
|
|
48
|
+
({ container } = render(
|
|
49
|
+
<ResponsivePanel {...props} intialOpen>
|
|
50
|
+
children
|
|
51
|
+
</ResponsivePanel>,
|
|
52
|
+
));
|
|
55
53
|
|
|
56
54
|
expect(container).toMatchSnapshot();
|
|
57
55
|
});
|
|
@@ -63,13 +61,11 @@ describe('ResponsivePanel', () => {
|
|
|
63
61
|
});
|
|
64
62
|
|
|
65
63
|
it('renders bottomSheet', async () => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
));
|
|
72
|
-
});
|
|
64
|
+
({ container } = render(
|
|
65
|
+
<ResponsivePanel {...props} open>
|
|
66
|
+
children
|
|
67
|
+
</ResponsivePanel>,
|
|
68
|
+
));
|
|
73
69
|
|
|
74
70
|
expect(container).toMatchSnapshot();
|
|
75
71
|
});
|
package/src/dimmer/Dimmer.tsx
CHANGED
|
@@ -99,12 +99,16 @@ const Dimmer = ({
|
|
|
99
99
|
const onEnter = () => {
|
|
100
100
|
setHasNotExited(true);
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
if (dimmerReference.current) {
|
|
103
|
+
dimmerManager.add(dimmerReference.current);
|
|
104
|
+
}
|
|
103
105
|
};
|
|
104
106
|
const onExited = () => {
|
|
105
107
|
setHasNotExited(false);
|
|
106
108
|
|
|
107
|
-
|
|
109
|
+
if (dimmerReference.current) {
|
|
110
|
+
dimmerManager.remove(dimmerReference.current);
|
|
111
|
+
}
|
|
108
112
|
};
|
|
109
113
|
|
|
110
114
|
useEffect(() => {
|
|
@@ -31,21 +31,22 @@ export const Basic = () => {
|
|
|
31
31
|
|
|
32
32
|
let typeClass = '';
|
|
33
33
|
switch (type) {
|
|
34
|
-
case
|
|
35
|
-
case
|
|
34
|
+
case Sentiment.ERROR:
|
|
35
|
+
case Sentiment.NEGATIVE:
|
|
36
36
|
typeClass = 'has-error';
|
|
37
37
|
break;
|
|
38
|
-
case
|
|
39
|
-
case
|
|
38
|
+
case Sentiment.SUCCESS:
|
|
39
|
+
case Sentiment.POSITIVE:
|
|
40
40
|
typeClass = 'has-success';
|
|
41
41
|
break;
|
|
42
|
-
case
|
|
43
|
-
case
|
|
42
|
+
case Sentiment.INFO:
|
|
43
|
+
case Sentiment.NEUTRAL:
|
|
44
44
|
typeClass = 'has-info';
|
|
45
45
|
break;
|
|
46
|
-
case
|
|
46
|
+
case Sentiment.WARNING:
|
|
47
47
|
typeClass = 'has-warning';
|
|
48
48
|
break;
|
|
49
|
+
case Sentiment.PENDING:
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
return (
|
package/src/link/Link.story.tsx
CHANGED
|
@@ -29,64 +29,64 @@ export const Basic = () => {
|
|
|
29
29
|
Links via <code>{'<Link />'}</code> component in all types of body copy
|
|
30
30
|
</Title>
|
|
31
31
|
<Body type={Typography.BODY_LARGE_BOLD} className="m-t-3">
|
|
32
|
-
We’re building the world
|
|
32
|
+
We’re building the world’s{' '}
|
|
33
33
|
<Link href="#" target="_blank">
|
|
34
34
|
most international account
|
|
35
35
|
</Link>
|
|
36
|
-
. We’re building the world
|
|
36
|
+
. We’re building the world’s most international account
|
|
37
37
|
</Body>
|
|
38
38
|
<Body type={Typography.BODY_LARGE} className="m-t-3">
|
|
39
|
-
We’re building the world
|
|
39
|
+
We’re building the world’s{' '}
|
|
40
40
|
<Link href="#" target="_blank">
|
|
41
41
|
most international account
|
|
42
42
|
</Link>
|
|
43
|
-
. We’re building the world
|
|
43
|
+
. We’re building the world’s most international account
|
|
44
44
|
</Body>
|
|
45
45
|
<Body type={Typography.BODY_DEFAULT_BOLD} className="m-t-3">
|
|
46
|
-
We’re building the world
|
|
46
|
+
We’re building the world’s{' '}
|
|
47
47
|
<Link href="#" target="_blank">
|
|
48
48
|
most international account
|
|
49
49
|
</Link>
|
|
50
|
-
. We’re building the world
|
|
50
|
+
. We’re building the world’s most international account
|
|
51
51
|
</Body>
|
|
52
52
|
<Body type={Typography.BODY_DEFAULT} className="m-t-3">
|
|
53
|
-
We’re building the world
|
|
53
|
+
We’re building the world’s{' '}
|
|
54
54
|
<Link href="#" target="_blank">
|
|
55
55
|
most international account
|
|
56
56
|
</Link>
|
|
57
|
-
. We’re building the world
|
|
57
|
+
. We’re building the world’s most international account
|
|
58
58
|
</Body>
|
|
59
59
|
|
|
60
60
|
<Title type={Typography.TITLE_SCREEN} className="m-t-3">
|
|
61
61
|
Links via <code>{'<a>'}</code> tag in all types of body copy
|
|
62
62
|
</Title>
|
|
63
63
|
<Body type={Typography.BODY_LARGE_BOLD} className="m-t-3">
|
|
64
|
-
We’re building the world
|
|
64
|
+
We’re building the world’s{' '}
|
|
65
65
|
<a href="#" target="_blank">
|
|
66
66
|
most international account
|
|
67
67
|
</a>
|
|
68
|
-
. We’re building the world
|
|
68
|
+
. We’re building the world’s most international account
|
|
69
69
|
</Body>
|
|
70
70
|
<Body type={Typography.BODY_LARGE} className="m-t-3">
|
|
71
|
-
We’re building the world
|
|
71
|
+
We’re building the world’s{' '}
|
|
72
72
|
<a href="#" target="_blank">
|
|
73
73
|
most international account
|
|
74
74
|
</a>
|
|
75
|
-
. We’re building the world
|
|
75
|
+
. We’re building the world’s most international account
|
|
76
76
|
</Body>
|
|
77
77
|
<Body type={Typography.BODY_DEFAULT_BOLD} className="m-t-3">
|
|
78
|
-
We’re building the world
|
|
78
|
+
We’re building the world’s{' '}
|
|
79
79
|
<a href="#" target="_blank">
|
|
80
80
|
most international account
|
|
81
81
|
</a>
|
|
82
|
-
. We’re building the world
|
|
82
|
+
. We’re building the world’s most international account
|
|
83
83
|
</Body>
|
|
84
84
|
<Body type={Typography.BODY_DEFAULT} className="m-t-3">
|
|
85
|
-
We’re building the world
|
|
85
|
+
We’re building the world’s{' '}
|
|
86
86
|
<a href="#" target="_blank">
|
|
87
87
|
most international account
|
|
88
88
|
</a>
|
|
89
|
-
. We’re building the world
|
|
89
|
+
. We’re building the world’s most international account
|
|
90
90
|
</Body>
|
|
91
91
|
</>
|
|
92
92
|
);
|
package/src/loader/Loader.tsx
CHANGED
package/src/logo/Logo.js
CHANGED
|
@@ -42,8 +42,8 @@ const Logo = ({ className, inverse, type }) => {
|
|
|
42
42
|
type === LogoType.WISE
|
|
43
43
|
? 'Wise'
|
|
44
44
|
: 'Wise Business' | (type === LogoType.WISE_PLATFORM)
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
? 'Wise Platform'
|
|
46
|
+
: 'Wise Business'
|
|
47
47
|
}
|
|
48
48
|
role="img"
|
|
49
49
|
className={classNames(className, 'np-logo')}
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
18
|
<>
|
|
19
|
-
<label htmlFor={args.id
|
|
19
|
+
<label htmlFor={args.id}>Editable money input label</label>
|
|
20
20
|
<MoneyInput
|
|
21
21
|
{...args}
|
|
22
22
|
selectedCurrency={selectedCurrency}
|
|
@@ -160,13 +160,13 @@ export const SmallInput: Story = {
|
|
|
160
160
|
render: (args) => {
|
|
161
161
|
return (
|
|
162
162
|
<>
|
|
163
|
-
<label htmlFor={args.id
|
|
163
|
+
<label htmlFor={args.id}>Money inputs</label>
|
|
164
164
|
<MoneyInput {...args} {...SingleCurrency.args} />
|
|
165
165
|
<br />
|
|
166
166
|
<MoneyInput {...args} {...MultipleCurrencies.args} />
|
|
167
167
|
<hr />
|
|
168
168
|
<div className="has-error">
|
|
169
|
-
<label htmlFor={args.id
|
|
169
|
+
<label htmlFor={args.id}>Error states</label>
|
|
170
170
|
<MoneyInput {...args} {...SingleCurrency.args} />
|
|
171
171
|
<br />
|
|
172
172
|
<MoneyInput {...args} {...MultipleCurrencies.args} />
|
package/src/nudge/Nudge.spec.tsx
CHANGED
|
@@ -51,14 +51,14 @@ describe('Nudge', () => {
|
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
it('does NOT render a nudge if localStorage has been set with the id of the nudge', () => {
|
|
54
|
-
jest.spyOn(
|
|
54
|
+
jest.spyOn(Storage.prototype, 'getItem').mockReturnValue('["CAKE","TEST"]');
|
|
55
55
|
|
|
56
56
|
render(<Nudge {...defaultProps} id="TEST" persistDismissal />);
|
|
57
57
|
expect(screen.queryByText('A nudge title')).not.toBeInTheDocument();
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
it('does NOT render a nudge if localStorage has been set with the id of the nudge AND calls is previously dismissed with TRUE', () => {
|
|
61
|
-
jest.spyOn(
|
|
61
|
+
jest.spyOn(Storage.prototype, 'getItem').mockReturnValue('["CAKE","TEST"]');
|
|
62
62
|
const isPreviouslyDismissed = jest.fn();
|
|
63
63
|
|
|
64
64
|
render(
|
|
@@ -75,7 +75,7 @@ describe('Nudge', () => {
|
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
it('shows a nudge if localStorage has been set with a different id for a different nudge and calls is previously dismissed with FALSE', () => {
|
|
78
|
-
jest.spyOn(
|
|
78
|
+
jest.spyOn(Storage.prototype, 'getItem').mockReturnValue('["BANANA"]');
|
|
79
79
|
const isPreviouslyDismissed = jest.fn();
|
|
80
80
|
|
|
81
81
|
render(
|
|
@@ -92,8 +92,8 @@ describe('Nudge', () => {
|
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
it('calls local storage with updated dismissed nudges value', () => {
|
|
95
|
-
jest.spyOn(
|
|
96
|
-
const setItem = jest.spyOn(
|
|
95
|
+
jest.spyOn(Storage.prototype, 'getItem').mockReturnValue('["BANANA"]');
|
|
96
|
+
const setItem = jest.spyOn(Storage.prototype, 'setItem');
|
|
97
97
|
|
|
98
98
|
render(<Nudge {...defaultProps} id="TEST" persistDismissal />);
|
|
99
99
|
expect(screen.getByText('A nudge title')).toBeInTheDocument();
|
|
@@ -110,7 +110,8 @@ const PhoneNumberInput = ({
|
|
|
110
110
|
|
|
111
111
|
useEffect(() => {
|
|
112
112
|
if (broadcastedValue === null) {
|
|
113
|
-
|
|
113
|
+
setBroadcastedValue(internalValue);
|
|
114
|
+
return;
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
const internalPhoneNumber = `${internalValue.prefix ?? ''}${internalValue.suffix}`;
|
package/src/popover/Popover.tsx
CHANGED
|
@@ -38,8 +38,9 @@ function resolvePlacement(preferredPlacement: PopoverPreferredPlacement) {
|
|
|
38
38
|
case 'bottom-left':
|
|
39
39
|
case 'bottom-right':
|
|
40
40
|
return 'bottom';
|
|
41
|
+
default:
|
|
42
|
+
return preferredPlacement;
|
|
41
43
|
}
|
|
42
|
-
return preferredPlacement;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
export default function Popover({
|
|
@@ -298,7 +298,7 @@ const PromoCard: FunctionComponent<PromoCardProps> = forwardRef(
|
|
|
298
298
|
...commonProps,
|
|
299
299
|
'aria-checked':
|
|
300
300
|
type === 'radio' ? value === state : type === 'checkbox' ? checked : undefined,
|
|
301
|
-
'aria-describedby': `${componentId}-title
|
|
301
|
+
'aria-describedby': `${componentId}-title`,
|
|
302
302
|
'aria-disabled': isDisabled,
|
|
303
303
|
'data-value': value ?? undefined,
|
|
304
304
|
role: type === 'checkbox' || type === 'radio' ? type : undefined,
|
|
@@ -34,7 +34,7 @@ const RADIOS = [
|
|
|
34
34
|
|
|
35
35
|
describe('RadioGroup', () => {
|
|
36
36
|
it('renders null if no radios are provided', () => {
|
|
37
|
-
expect(shallow(<RadioGroup radios={[]} {...props} />).
|
|
37
|
+
expect(shallow(<RadioGroup radios={[]} {...props} />).isEmptyRender()).toBe(true);
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
it('renders radio options', () => {
|
|
@@ -96,7 +96,7 @@ describe('SegmentedControl', () => {
|
|
|
96
96
|
|
|
97
97
|
// new function is created on every render
|
|
98
98
|
const onChange = () => {
|
|
99
|
-
onChangeCallCount
|
|
99
|
+
onChangeCallCount += 1;
|
|
100
100
|
simulateRerender({});
|
|
101
101
|
};
|
|
102
102
|
|
|
@@ -118,7 +118,7 @@ describe('SegmentedControl', () => {
|
|
|
118
118
|
|
|
119
119
|
// a new onChange function is created on every render
|
|
120
120
|
const onChange = () => {
|
|
121
|
-
onChangeCallCount
|
|
121
|
+
onChangeCallCount += 1;
|
|
122
122
|
simulateRerender({});
|
|
123
123
|
};
|
|
124
124
|
|
package/src/select/Select.js
CHANGED
|
@@ -246,8 +246,8 @@ export default function Select({
|
|
|
246
246
|
};
|
|
247
247
|
|
|
248
248
|
function selectKeyboardFocusedOption() {
|
|
249
|
-
if (keyboardFocusedOptionIndex != null) {
|
|
250
|
-
|
|
249
|
+
if (keyboardFocusedOptionIndex != null && selectableOptions.length > 0) {
|
|
250
|
+
selectOption(selectableOptions[keyboardFocusedOptionIndex]);
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
|
|
@@ -511,7 +511,6 @@ export default function Select({
|
|
|
511
511
|
disabled={disabled}
|
|
512
512
|
aria-controls={listboxId}
|
|
513
513
|
aria-expanded={open}
|
|
514
|
-
aria-autocomplete="none"
|
|
515
514
|
onClick={handleOnClick}
|
|
516
515
|
{...buttonProps}
|
|
517
516
|
>
|