@transferwise/components 0.0.0-experimental-7a83d86 → 0.0.0-experimental-b2a535a
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 +17 -22
- package/build/index.js.map +1 -1
- package/build/index.mjs +17 -22
- 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/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/segmentedControl/SegmentedControl.d.ts +2 -2
- package/build/types/segmentedControl/SegmentedControl.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 +1 -2
- 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 +1 -0
- package/src/common/Option/Option.tsx +1 -1
- package/src/common/deviceDetection/deviceDetection.js +1 -1
- package/src/common/deviceDetection/deviceDetection.spec.js +2 -4
- package/src/common/responsivePanel/ResponsivePanel.spec.js +15 -11
- package/src/decision/Decision.spec.js +1 -0
- package/src/dimmer/Dimmer.tsx +2 -6
- package/src/inlineAlert/InlineAlert.story.tsx +7 -8
- package/src/link/Link.story.tsx +16 -16
- package/src/loader/Loader.tsx +1 -0
- 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 +1 -2
- package/src/phoneNumberInput/utils/cleanNumber/cleanNumber.ts +1 -1
- package/src/popover/Popover.tsx +1 -2
- package/src/promoCard/PromoCard.tsx +1 -1
- package/src/radioGroup/RadioGroup.spec.js +1 -1
- package/src/section/Section.story.tsx +1 -2
- package/src/segmentedControl/SegmentedControl.spec.tsx +41 -3
- package/src/segmentedControl/SegmentedControl.story.tsx +51 -13
- package/src/segmentedControl/SegmentedControl.tsx +3 -4
- package/src/select/Select.js +3 -2
- package/src/stepper/deviceDetection.js +2 -1
- package/src/stepper/deviceDetection.spec.js +3 -8
- 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 +2 -4
- package/src/upload/Upload.spec.js +4 -8
- package/src/uploadInput/uploadButton/UploadButton.tsx +0 -1
|
@@ -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,cAA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,KAAK,EACL,IAAgB,EAChB,OAAmB,GACpB,EAAE,UAAU,+BA+GZ"}
|
|
@@ -1 +1 @@
|
|
|
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,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,Q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CAAC;AAEF;;;;;;;;;GASG;AACH,QAAA,MAAM,MAAM,gEAMT,WAAW,
|
|
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,gCA4Cb,CAAC;AAgBF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneNumberInput.d.ts","sourceRoot":"","sources":["../../../src/phoneNumberInput/PhoneNumberInput.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAQ,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAyC,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAkBhG,MAAM,WAAW,qBAAqB;IACpC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,CAA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,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;AAcD,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,OAAO,EACP,kBAAmC,EACnC,KAAK,EACL,OAAO,GACR,EAAE,YAAY,+BAiDd"}
|
|
@@ -13,7 +13,7 @@ type SegmentWithControls = SegmentBase & {
|
|
|
13
13
|
export type Segments = readonly Segment[] | readonly SegmentWithControls[];
|
|
14
14
|
type SegmentedControlPropsBase = {
|
|
15
15
|
name: string;
|
|
16
|
-
|
|
16
|
+
selectedValue: string;
|
|
17
17
|
mode: 'input' | 'view';
|
|
18
18
|
onChange: (value: string) => void;
|
|
19
19
|
};
|
|
@@ -26,6 +26,6 @@ type SegmentedControlInputProps = {
|
|
|
26
26
|
segments: readonly Segment[];
|
|
27
27
|
};
|
|
28
28
|
export type SegmentedControlProps = SegmentedControlPropsBase & (SegmentedControlViewProps | SegmentedControlInputProps);
|
|
29
|
-
declare const SegmentedControl: ({ name,
|
|
29
|
+
declare const SegmentedControl: ({ name, selectedValue, mode, segments, onChange, }: SegmentedControlProps) => import("react").JSX.Element;
|
|
30
30
|
export default SegmentedControl;
|
|
31
31
|
//# sourceMappingURL=SegmentedControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../src/segmentedControl/SegmentedControl.tsx"],"names":[],"mappings":";AAMA,KAAK,WAAW,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhE,KAAK,OAAO,GAAG,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAClD,KAAK,mBAAmB,GAAG,WAAW,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,QAAQ,GAAG,SAAS,OAAO,EAAE,GAAG,SAAS,mBAAmB,EAAE,CAAC;AAE3E,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,
|
|
1
|
+
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../src/segmentedControl/SegmentedControl.tsx"],"names":[],"mappings":";AAMA,KAAK,WAAW,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhE,KAAK,OAAO,GAAG,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAClD,KAAK,mBAAmB,GAAG,WAAW,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,QAAQ,GAAG,SAAS,OAAO,EAAE,GAAG,SAAS,mBAAmB,EAAE,CAAC;AAE3E,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,mBAAmB,EAAE,CAAC;CAC1C,CAAC;AAEF,KAAK,0BAA0B,GAAG;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,GAC3D,CAAC,yBAAyB,GAAG,0BAA0B,CAAC,CAAC;AAE3D,QAAA,MAAM,gBAAgB,uDAMnB,qBAAqB,gCAgIvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;gCAkeC"}
|
|
@@ -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":"AA4BA,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,gCA6KnB,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-b2a535a",
|
|
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 --write src/i18n/*.json",
|
|
148
|
+
"build:crowdin-source-file": "formatjs extract 'src/**/*.messages.+(js|ts|tsx)' --out-file src/i18n/en.json --format simple && prettier --find-config-path --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,.
|
|
160
|
+
"lint:check:js+ts": "eslint --ext .js,.jsx,.mjs,.ts,.tsx,.mts --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++) {
|
|
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-ignore
|
|
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
|
|
37
|
+
{/* eslint-disable 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, 'ig');
|
|
5
5
|
|
|
6
6
|
return typeof navigator !== 'undefined' && !!navigator.userAgent.match(regex);
|
|
7
7
|
}
|
|
@@ -2,10 +2,8 @@ import { isIosDevice } from './deviceDetection';
|
|
|
2
2
|
|
|
3
3
|
describe('Device detection', () => {
|
|
4
4
|
function fakeUserAgent(userAgent) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
configurable: true,
|
|
8
|
-
});
|
|
5
|
+
navigator.__defineGetter__('userAgent', () => userAgent);
|
|
6
|
+
// need to use this instead of defineProperty, as it's blocked from overriding
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
beforeEach(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Breakpoint, Position } from '..';
|
|
2
|
-
import { mockMatchMedia, render } from '../../test-utils';
|
|
2
|
+
import { mockMatchMedia, render, waitFor } from '../../test-utils';
|
|
3
3
|
|
|
4
4
|
import ResponsivePanel from './ResponsivePanel';
|
|
5
5
|
|
|
@@ -45,11 +45,13 @@ describe('ResponsivePanel', () => {
|
|
|
45
45
|
|
|
46
46
|
describe('on desktop', () => {
|
|
47
47
|
it('renders Panel', async () => {
|
|
48
|
-
(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
await waitFor(() => {
|
|
49
|
+
({ container } = render(
|
|
50
|
+
<ResponsivePanel {...props} intialOpen>
|
|
51
|
+
children
|
|
52
|
+
</ResponsivePanel>,
|
|
53
|
+
));
|
|
54
|
+
});
|
|
53
55
|
|
|
54
56
|
expect(container).toMatchSnapshot();
|
|
55
57
|
});
|
|
@@ -61,11 +63,13 @@ describe('ResponsivePanel', () => {
|
|
|
61
63
|
});
|
|
62
64
|
|
|
63
65
|
it('renders bottomSheet', async () => {
|
|
64
|
-
(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
await waitFor(() => {
|
|
67
|
+
({ container } = render(
|
|
68
|
+
<ResponsivePanel {...props} open>
|
|
69
|
+
children
|
|
70
|
+
</ResponsivePanel>,
|
|
71
|
+
));
|
|
72
|
+
});
|
|
69
73
|
|
|
70
74
|
expect(container).toMatchSnapshot();
|
|
71
75
|
});
|
package/src/dimmer/Dimmer.tsx
CHANGED
|
@@ -99,16 +99,12 @@ const Dimmer = ({
|
|
|
99
99
|
const onEnter = () => {
|
|
100
100
|
setHasNotExited(true);
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
dimmerManager.add(dimmerReference.current);
|
|
104
|
-
}
|
|
102
|
+
dimmerReference.current && dimmerManager.add(dimmerReference.current);
|
|
105
103
|
};
|
|
106
104
|
const onExited = () => {
|
|
107
105
|
setHasNotExited(false);
|
|
108
106
|
|
|
109
|
-
|
|
110
|
-
dimmerManager.remove(dimmerReference.current);
|
|
111
|
-
}
|
|
107
|
+
dimmerReference.current && dimmerManager.remove(dimmerReference.current);
|
|
112
108
|
};
|
|
113
109
|
|
|
114
110
|
useEffect(() => {
|
|
@@ -31,22 +31,21 @@ export const Basic = () => {
|
|
|
31
31
|
|
|
32
32
|
let typeClass = '';
|
|
33
33
|
switch (type) {
|
|
34
|
-
case
|
|
35
|
-
case
|
|
34
|
+
case 'error':
|
|
35
|
+
case 'negative':
|
|
36
36
|
typeClass = 'has-error';
|
|
37
37
|
break;
|
|
38
|
-
case
|
|
39
|
-
case
|
|
38
|
+
case 'success':
|
|
39
|
+
case 'positive':
|
|
40
40
|
typeClass = 'has-success';
|
|
41
41
|
break;
|
|
42
|
-
case
|
|
43
|
-
case
|
|
42
|
+
case 'info':
|
|
43
|
+
case 'neutral':
|
|
44
44
|
typeClass = 'has-info';
|
|
45
45
|
break;
|
|
46
|
-
case
|
|
46
|
+
case 'warning':
|
|
47
47
|
typeClass = 'has-warning';
|
|
48
48
|
break;
|
|
49
|
-
case Sentiment.PENDING:
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
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}>Editable money input label</label>
|
|
19
|
+
<label htmlFor={args.id as string}>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}>Money inputs</label>
|
|
163
|
+
<label htmlFor={args.id as string}>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}>Error states</label>
|
|
169
|
+
<label htmlFor={args.id as string}>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(window.localStorage.__proto__, '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(window.localStorage.__proto__, '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(window.localStorage.__proto__, '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(window.localStorage.__proto__, 'getItem').mockReturnValue('["BANANA"]');
|
|
96
|
+
const setItem = jest.spyOn(window.localStorage.__proto__, 'setItem');
|
|
97
97
|
|
|
98
98
|
render(<Nudge {...defaultProps} id="TEST" persistDismissal />);
|
|
99
99
|
expect(screen.getByText('A nudge title')).toBeInTheDocument();
|
|
@@ -110,8 +110,7 @@ const PhoneNumberInput = ({
|
|
|
110
110
|
|
|
111
111
|
useEffect(() => {
|
|
112
112
|
if (broadcastedValue === null) {
|
|
113
|
-
setBroadcastedValue(internalValue);
|
|
114
|
-
return;
|
|
113
|
+
return setBroadcastedValue(internalValue);
|
|
115
114
|
}
|
|
116
115
|
|
|
117
116
|
const internalPhoneNumber = `${internalValue.prefix ?? ''}${internalValue.suffix}`;
|
package/src/popover/Popover.tsx
CHANGED
|
@@ -38,9 +38,8 @@ function resolvePlacement(preferredPlacement: PopoverPreferredPlacement) {
|
|
|
38
38
|
case 'bottom-left':
|
|
39
39
|
case 'bottom-right':
|
|
40
40
|
return 'bottom';
|
|
41
|
-
default:
|
|
42
|
-
return preferredPlacement;
|
|
43
41
|
}
|
|
42
|
+
return preferredPlacement;
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
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` || undefined,
|
|
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} />).toBeNully);
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
it('renders radio options', () => {
|