@transferwise/components 45.17.0 → 45.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/build/i18n/en.json +1 -0
- package/build/index.esm.js +391 -350
- package/build/index.esm.js.map +1 -1
- package/build/index.js +391 -349
- package/build/index.js.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/common/Option/Option.css +1 -1
- package/build/styles/inputs/SelectInput.css +1 -1
- package/build/styles/instructionsList/InstructionsList.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/stepper/Stepper.css +1 -1
- package/build/styles/tooltip/Tooltip.css +1 -1
- package/build/types/accordion/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/button/Button.messages.d.ts +9 -0
- package/build/types/button/Button.messages.d.ts.map +1 -0
- package/build/types/common/index.d.ts +1 -0
- package/build/types/common/polymorphicWithOverrides/PolymorphicWithOverrides.d.ts +13 -0
- package/build/types/common/polymorphicWithOverrides/PolymorphicWithOverrides.d.ts.map +1 -0
- package/build/types/common/randomId.d.ts +13 -0
- package/build/types/common/randomId.d.ts.map +1 -0
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts +16 -6
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts +10 -3
- package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
- package/build/types/processIndicator/ProcessIndicator.d.ts +1 -1
- package/build/types/promoCard/PromoCard.d.ts.map +1 -1
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/select/searchBox/SearchBox.d.ts.map +1 -1
- package/build/types/tooltip/Tooltip.d.ts +2 -1
- package/build/types/tooltip/Tooltip.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/accordion/AccordionItem/AccordionItem.spec.js +1 -0
- package/src/accordion/AccordionItem/AccordionItem.tsx +19 -11
- package/src/accordion/AccordionItem/__snapshots__/AccordionItem.spec.js.snap +18 -4
- package/src/button/Button.messages.js +9 -0
- package/src/button/Button.spec.js +1 -2
- package/src/button/Button.story.tsx +6 -0
- package/src/button/Button.tsx +17 -2
- package/src/button/__snapshots__/Button.spec.js.snap +22 -15
- package/src/common/Option/Option.css +1 -1
- package/src/common/Option/Option.less +0 -5
- package/src/common/index.js +1 -0
- package/src/common/polymorphicWithOverrides/PolymorphicWithOverrides.tsx +19 -0
- package/src/common/randomId.ts +14 -0
- package/src/dateInput/DateInput.story.tsx +0 -3
- package/src/i18n/en.json +1 -0
- package/src/index.ts +3 -0
- package/src/inputs/SelectInput.css +1 -1
- package/src/inputs/SelectInput.less +8 -2
- package/src/inputs/SelectInput.story.tsx +52 -5
- package/src/inputs/SelectInput.tsx +165 -104
- package/src/inputs/_Popover.less +1 -1
- package/src/instructionsList/InstructionList.story.tsx +39 -0
- package/src/instructionsList/InstructionsList.css +1 -1
- package/src/instructionsList/InstructionsList.less +3 -15
- package/src/instructionsList/InstructionsList.spec.tsx +35 -0
- package/src/instructionsList/InstructionsList.tsx +40 -25
- package/src/main.css +1 -1
- package/src/moneyInput/MoneyInput.story.tsx +0 -3
- package/src/phoneNumberInput/PhoneNumberInput.story.js +0 -3
- package/src/processIndicator/ProcessIndicator.js +2 -2
- package/src/promoCard/PromoCard.tsx +1 -16
- package/src/select/Select.js +2 -0
- package/src/select/Select.story.js +0 -6
- package/src/select/searchBox/SearchBox.spec.js +3 -7
- package/src/select/searchBox/SearchBox.tsx +2 -0
- package/src/stepper/Stepper.css +1 -1
- package/src/stepper/Stepper.less +1 -1
- package/src/tooltip/Tooltip.css +1 -1
- package/src/tooltip/Tooltip.less +13 -0
- package/src/tooltip/Tooltip.spec.tsx +97 -29
- package/src/tooltip/Tooltip.tsx +24 -31
- package/src/tooltip/__snapshots__/Tooltip.spec.tsx.snap +31 -0
- package/src/upload/Upload.spec.js +2 -0
- package/src/instructionsList/InstructionList.story.js +0 -27
- package/src/instructionsList/InstructionsList.spec.js +0 -29
- package/src/select/searchBox/__snapshots__/SearchBox.spec.js.snap +0 -46
|
@@ -1 +1 @@
|
|
|
1
|
-
.tw-stepper{padding-bottom:24px;width:100%}@media only screen and (max-width:575px){.tw-stepper{padding-bottom:0}}.tw-stepper__step{list-style-type:none;position:absolute;top:0}.tw-stepper__step--active .tw-stepper__step-label{color:#37517e;color:var(--color-content-primary);cursor:default}.tw-stepper__step--clickable .tw-stepper__step-label{border-radius:2px;color:#0097c7;color:var(--color-content-accent);line-height:0;transition:color .15s ease-in-out}.np-theme-personal .tw-stepper__step--clickable .tw-stepper__step-label{color:#5d7079;color:var(--color-content-secondary);top:0}.tw-stepper__step--has-tooltip{cursor:pointer}@media screen and (min-width:576px) and (max-width:991px){.tw-stepper__step:first-child .tooltip-inner{transform:translateX(calc(50% - 32px))}.tw-stepper__step:last-child .tooltip-inner{transform:translateX(calc(-50% + 32px))}}.tw-stepper__step-label{color:#5d7079;color:var(--color-content-secondary);position:absolute;top:0;transform:translateX(-50%);transition:color .6s ease-in-out;white-space:nowrap}[dir=rtl] .tw-stepper__step-label{transform:translateX(50%)}.tw-stepper .tooltip{top:24px!important;white-space:nowrap}.tw-stepper .tooltip .tooltip-inner{max-width:100%}.tw-stepper .tw-tooltip-container{display:block}.tw-stepper-steps{padding:0;position:relative}[dir=rtl] .tw-stepper-steps{padding:0}.progress-bar{-webkit-backface-visibility:hidden;background-color:var(--color-interactive-primary);border-bottom-left-radius:1px;border-top-left-radius:1px;float:left;height:100%;transition:width .6s ease-in-out;will-change:width}[dir=rtl] .progress-bar{float:right}.progress-bar:after{border-radius:4px;content:"";float:right;height:8px;margin-right:-4px;margin-top:-3px;width:8px}[dir=rtl] .progress-bar:after{float:left;margin-left:-4px;margin-right:0}.btn-unstyled{background:none;border:none;display:block;margin:0;padding:0}
|
|
1
|
+
.tw-stepper{padding-bottom:24px;width:100%}@media only screen and (max-width:575px){.tw-stepper{padding-bottom:0}}.tw-stepper__step{list-style-type:none;position:absolute;top:0}.tw-stepper__step--active .tw-stepper__step-label{color:#37517e;color:var(--color-content-primary);cursor:default}.tw-stepper__step--clickable .tw-stepper__step-label{border-radius:2px;color:#0097c7;color:var(--color-content-accent);line-height:0;transition:color .15s ease-in-out}.np-theme-personal .tw-stepper__step--clickable .tw-stepper__step-label{color:#5d7079;color:var(--color-content-secondary);top:0}.tw-stepper__step--has-tooltip{cursor:pointer}@media screen and (min-width:576px) and (max-width:991px){.tw-stepper__step:first-child .tooltip-inner{transform:translateX(calc(50% - 32px))}.tw-stepper__step:last-child .tooltip-inner{transform:translateX(calc(-50% + 32px))}}.tw-stepper__step-label{color:#5d7079;color:var(--color-content-secondary);position:absolute;top:0;transform:translateX(-50%);transition:color .6s ease-in-out;white-space:nowrap}[dir=rtl] .tw-stepper__step-label{transform:translateX(50%)}.tw-stepper .tooltip{top:24px!important;white-space:nowrap}.tw-stepper .tooltip .tooltip-inner{max-width:100%}.tw-stepper .tw-tooltip-container{display:inline-block}.tw-stepper-steps{padding:0;position:relative}[dir=rtl] .tw-stepper-steps{padding:0}.progress-bar{-webkit-backface-visibility:hidden;background-color:var(--color-interactive-primary);border-bottom-left-radius:1px;border-top-left-radius:1px;float:left;height:100%;transition:width .6s ease-in-out;will-change:width}[dir=rtl] .progress-bar{float:right}.progress-bar:after{border-radius:4px;content:"";float:right;height:8px;margin-right:-4px;margin-top:-3px;width:8px}[dir=rtl] .progress-bar:after{float:left;margin-left:-4px;margin-right:0}.btn-unstyled{background:none;border:none;display:block;margin:0;padding:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tw-tooltip-container{display:inline-block}.tw-tooltip-container .tooltip{-webkit-user-select:none;-moz-user-select:none;user-select:none;visibility:visible}.tw-tooltip-container .tooltip:not(.in){animation:tw-tooltip-disappear;animation-delay:.15s;animation-duration:0s;animation-fill-mode:both;pointer-events:none}@keyframes tw-tooltip-disappear{0%{visibility:visible}to{visibility:hidden}}.np-tooltip{z-index:1070}.np-panel[data-popper-placement^=right]>.np-panel__content.tooltip-inner .np-panel__arrow{left:-7px}.np-panel[data-popper-placement^=left]>.np-panel__content.tooltip-inner .np-panel__arrow{right:-7px}
|
|
1
|
+
.tw-tooltip-container{display:inline-block}.tw-tooltip-container .tooltip{-webkit-user-select:none;-moz-user-select:none;user-select:none;visibility:visible}.tw-tooltip-container .tooltip:not(.in){animation:tw-tooltip-disappear;animation-delay:.15s;animation-duration:0s;animation-fill-mode:both;pointer-events:none}@keyframes tw-tooltip-disappear{0%{visibility:visible}to{visibility:hidden}}.np-tooltip{z-index:1070}.np-tooltip,.np-tooltip .tooltip-inner{visibility:hidden}.np-tooltip--open,.np-tooltip--open .tooltip-inner{visibility:initial}.np-panel[data-popper-placement^=right]>.np-panel__content.tooltip-inner .np-panel__arrow{left:-7px}.np-panel[data-popper-placement^=left]>.np-panel__content.tooltip-inner .np-panel__arrow{right:-7px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItem.d.ts","sourceRoot":"","sources":["../../../../src/accordion/AccordionItem/AccordionItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AccordionItem.d.ts","sourceRoot":"","sources":["../../../../src/accordion/AccordionItem/AccordionItem.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAgB,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOpD,MAAM,WAAW,kBAAkB;IACjC,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,uCAAuC;IACvC,KAAK,EAAE,SAAS,CAAC;IACjB,yCAAyC;IACzC,OAAO,EAAE,SAAS,CAAC;IACnB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,8DAA8D;IAC9D,IAAI,EAAE,OAAO,CAAC;IACd,oEAAoE;IACpE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,sBAAsB;IACtB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAoDzC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,WAAW,EAAc,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,WAAW,EAAc,MAAM,OAAO,CAAC;AAG5F,OAAO,EAIL,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACV,MAAM,WAAW,CAAC;AAOnB,kBAAkB;AAClB,KAAK,eAAe,GAAG,SAAS,GAAG,KAAK,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE3E,kBAAkB;AAClB,KAAK,eAAe,GAAG,cAAc,CAAC;AAEtC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,mBAAmB,GAAG,eAAe,CAAC;IACvF,QAAQ,CAAC,EAAE,eAAe,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;IAClE,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,eAAe,CAAC;CAC7D,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,WAAW,GACnC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,GAAG;IACtD,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;CAC1C,CAAC;AAEJ,MAAM,MAAM,WAAW,GAAG,WAAW,GACnC,oBAAoB,CAAC,iBAAiB,CAAC,GACvC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG;IACxB,EAAE,CAAC,EAAE,GAAG,CAAC;IACT,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEJ,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,WAAW,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAExE,QAAA,MAAM,MAAM,uGA4EX,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.messages.d.ts","sourceRoot":"","sources":["../../../src/button/Button.messages.js"],"names":[],"mappings":""}
|
|
@@ -12,6 +12,7 @@ export * from "./propsValues/profileType";
|
|
|
12
12
|
export * from "./propsValues/scroll";
|
|
13
13
|
export * from "./locale";
|
|
14
14
|
export * from "./commonProps";
|
|
15
|
+
export * from "./randomId";
|
|
15
16
|
export { Breakpoint } from "./propsValues/breakpoint";
|
|
16
17
|
export { Type } from "./propsValues/type";
|
|
17
18
|
export { DateMode } from "./propsValues/dateMode";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface PolymorphicWithOverridesProps {
|
|
3
|
+
__overrides: {
|
|
4
|
+
as: React.ElementType;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* For overcoming the limitations of third-party components with an `as` prop.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PolymorphicWithOverrides: import("react").ForwardRefExoticComponent<Omit<PolymorphicWithOverridesProps, "ref"> & import("react").RefAttributes<Element>>;
|
|
13
|
+
//# sourceMappingURL=PolymorphicWithOverrides.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolymorphicWithOverrides.d.ts","sourceRoot":"","sources":["../../../../src/common/polymorphicWithOverrides/PolymorphicWithOverrides.tsx"],"names":[],"mappings":";AAEA,MAAM,WAAW,6BAA6B;IAC5C,WAAW,EAAE;QACX,EAAE,EAAE,KAAK,CAAC,WAAW,CAAC;QACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,gIAKnC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* generateRandomId() function
|
|
3
|
+
*
|
|
4
|
+
* This function generates a random string of characters that can be used as
|
|
5
|
+
* an ID.
|
|
6
|
+
*
|
|
7
|
+
* @returns {string} A random string of characters.
|
|
8
|
+
* @example
|
|
9
|
+
* const id = generateRandomId();
|
|
10
|
+
* // id will be a random string of characters, such as "id-4711".
|
|
11
|
+
*/
|
|
12
|
+
export declare const generateRandomId: () => string;
|
|
13
|
+
//# sourceMappingURL=randomId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"randomId.d.ts","sourceRoot":"","sources":["../../../src/common/randomId.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,QAAO,MAEnC,CAAC"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export type { InputProps } from './inputs/Input';
|
|
5
5
|
export type { InputGroupProps } from './inputs/InputGroup';
|
|
6
6
|
export type { SearchInputProps } from './inputs/SearchInput';
|
|
7
|
-
export type { SelectInputItem, SelectInputOptionContentProps, SelectInputProps, } from './inputs/SelectInput';
|
|
7
|
+
export type { SelectInputGroupItem, SelectInputItem, SelectInputOptionContentProps, SelectInputOptionItem, SelectInputProps, SelectInputSeparatorItem, } from './inputs/SelectInput';
|
|
8
8
|
export type { TextAreaProps } from './inputs/TextArea';
|
|
9
9
|
export type { UploadedFile, UploadError, UploadResponse } from './uploadInput/types';
|
|
10
10
|
export type { ModalProps } from './modal';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EACV,eAAe,EACf,6BAA6B,EAC7B,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,6BAA6B,EAC7B,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrF,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EACV,eAAe,EACf,eAA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AAiB,EACjB,SAAS,EACT,YAAY,EACZ,aAAa,EACb,mBAAmB,GACpB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface SelectInputOptionItem<T = string> {
|
|
2
|
+
export interface SelectInputOptionItem<T = string> {
|
|
3
3
|
type: 'option';
|
|
4
4
|
value: T;
|
|
5
5
|
filterMatchers?: readonly string[];
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
}
|
|
8
|
-
interface SelectInputGroupItem<T = string> {
|
|
8
|
+
export interface SelectInputGroupItem<T = string> {
|
|
9
9
|
type: 'group';
|
|
10
10
|
label: string;
|
|
11
11
|
options: readonly SelectInputOptionItem<T>[];
|
|
12
12
|
}
|
|
13
|
-
interface SelectInputSeparatorItem {
|
|
13
|
+
export interface SelectInputSeparatorItem {
|
|
14
14
|
type: 'separator';
|
|
15
15
|
}
|
|
16
16
|
export type SelectInputItem<T = string> = SelectInputOptionItem<T> | SelectInputGroupItem<T> | SelectInputSeparatorItem;
|
|
@@ -20,8 +20,15 @@ export interface SelectInputProps<T = string> {
|
|
|
20
20
|
items: readonly SelectInputItem<NonNullable<T>>[];
|
|
21
21
|
defaultValue?: T;
|
|
22
22
|
value?: T;
|
|
23
|
-
renderValue?: (value: NonNullable<T>, compact: boolean) => React.ReactNode;
|
|
24
23
|
compareValues?: (keyof NonNullable<T> & string) | ((a: T | undefined, b: T | undefined) => boolean);
|
|
24
|
+
renderValue?: (value: NonNullable<T>, withinTrigger: boolean) => React.ReactNode;
|
|
25
|
+
renderTrigger?: (args: {
|
|
26
|
+
content: React.ReactNode;
|
|
27
|
+
placeholderShown: boolean;
|
|
28
|
+
clear: (() => void) | undefined;
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
className: string | undefined;
|
|
31
|
+
}) => React.ReactNode;
|
|
25
32
|
filterable?: boolean;
|
|
26
33
|
filterPlaceholder?: string;
|
|
27
34
|
disabled?: boolean;
|
|
@@ -29,7 +36,11 @@ export interface SelectInputProps<T = string> {
|
|
|
29
36
|
onChange?: (value: T) => void;
|
|
30
37
|
onClear?: () => void;
|
|
31
38
|
}
|
|
32
|
-
export declare function SelectInput<T>({ name, placeholder, items, defaultValue, value: controlledValue, renderValue,
|
|
39
|
+
export declare function SelectInput<T = string>({ name, placeholder, items, defaultValue, value: controlledValue, compareValues, renderValue, renderTrigger, filterable, filterPlaceholder, disabled, className, onChange, onClear, }: SelectInputProps<T>): import("react").JSX.Element;
|
|
40
|
+
export type SelectInputTriggerButtonProps<T extends React.ComponentType | 'button' = 'button'> = {
|
|
41
|
+
as?: T;
|
|
42
|
+
} & React.ComponentPropsWithoutRef<T>;
|
|
43
|
+
export declare function SelectInputTriggerButton<T extends React.ComponentType | 'button' = 'button'>({ as, ...restProps }: SelectInputTriggerButtonProps<T>): import("react").JSX.Element;
|
|
33
44
|
export interface SelectInputOptionContentProps {
|
|
34
45
|
title: string;
|
|
35
46
|
note?: string;
|
|
@@ -37,5 +48,4 @@ export interface SelectInputOptionContentProps {
|
|
|
37
48
|
icon?: React.ReactNode;
|
|
38
49
|
}
|
|
39
50
|
export declare function SelectInputOptionContent({ title, note, description, icon, }: SelectInputOptionContentProps): import("react").JSX.Element;
|
|
40
|
-
export {};
|
|
41
51
|
//# sourceMappingURL=SelectInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../src/inputs/SelectInput.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../src/inputs/SelectInput.tsx"],"names":[],"mappings":";AAgDA,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,MAAM;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;IACT,cAAc,CAAC,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ACX,IAAI,GACL,EAAE,6BAA6B,+BA4C/B"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { CommonProps } from '../common';
|
|
3
|
-
type
|
|
3
|
+
type InstructionNode = {
|
|
4
|
+
content: ReactNode;
|
|
5
|
+
['aria-label']: string;
|
|
6
|
+
};
|
|
7
|
+
type Props = CommonProps & ({
|
|
4
8
|
dos?: ReactNode[];
|
|
5
9
|
donts?: ReactNode[];
|
|
6
|
-
}
|
|
7
|
-
|
|
10
|
+
} | {
|
|
11
|
+
dos?: InstructionNode[];
|
|
12
|
+
donts?: InstructionNode[];
|
|
13
|
+
});
|
|
14
|
+
declare const InstructionsList: ({ dos, donts }: Props) => import("react").JSX.Element;
|
|
8
15
|
export default InstructionsList;
|
|
9
16
|
//# sourceMappingURL=InstructionsList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstructionsList.d.ts","sourceRoot":"","sources":["../../../src/instructionsList/InstructionsList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InstructionsList.d.ts","sourceRoot":"","sources":["../../../src/instructionsList/InstructionsList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAkB,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAc,WAAW,EAAE,MAAM,WAAW,CAAC;AAEpD,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,SAAS,CAAC;IACnB,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,KAAK,GAAG,WAAW,GACtB,CACI;IACE,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;CACrB,GACD;IACE,GAAG,CAAC,EAAE,eAAe,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;CAC3B,CACJ,CAAC;AAEJ,QAAA,MAAM,gBAAgB,mBAAoB,KAAK,gCAe9C,CAAC;AAsBF,eAAe,gBAAgB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
|
|
3
3
|
export type ProcessIndicatorStatus = "processing" | "failed" | "succeeded" | "hidden";
|
|
4
4
|
|
|
5
|
-
export type ProcessIndicatorSize = "xs" | "sm" | "xl";
|
|
5
|
+
export type ProcessIndicatorSize = "xxs" | "xs" | "sm" | "xl";
|
|
6
6
|
|
|
7
7
|
export interface ProcessIndicatorProps {
|
|
8
8
|
status?: ProcessIndicatorStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromoCard.d.ts","sourceRoot":"","sources":["../../../src/promoCard/PromoCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2E,MAAM,OAAO,CAAC;AAIhG,OAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAMjD,OAA2B,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACxD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AACjE,MAAM,MAAM,YAAY,GACpB,EAAE,GACF,WAAW,GACX,QAAQ,GACR,UAAU,GACV,UAAU,GACV,MAAM,GACN,SAAS,GACT,MAAM,GACN,UAAU,GACV,YAAY,GACZ,UAAU,GACV,MAAM,GACN,QAAQ,GACR,KAAK,CAAC;AAEV,MAAM,WAAW,oBAAoB;IACnC,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,uDAAuD;IACvD,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAEzC,6EAA6E;IAC7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,CAAC,EAAE,KAAK,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC9F,6DAA6D;IAC7D,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,uDAAuD;IACvD,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,iDAAiD;IACjD,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B,gEAAgE;IAChE,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAE5B,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;AAExE,MAAM,MAAM,oBAAoB,GAAG,CACjC,KAAK,EAAE,kBAAkB,GAAG,qBAAqB,KAC9C,GAAG,CAAC,OAAO,CAAC;;AAmOjB,wBAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.js"],"names":[],"mappings":"AA8EA;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.js"],"names":[],"mappings":"AA8EA;;;;;;;;;;;;;;;;;;;;;;gCAmeC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBox.d.ts","sourceRoot":"","sources":["../../../../src/select/searchBox/SearchBox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAUxD,QAAA,MAAM,SAAS;;;;
|
|
1
|
+
{"version":3,"file":"SearchBox.d.ts","sourceRoot":"","sources":["../../../../src/select/searchBox/SearchBox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAUxD,QAAA,MAAM,SAAS;;;;oJA0Cd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -4,7 +4,8 @@ import { PositionBottom, PositionLeft, PositionRight, PositionTop } from '../com
|
|
|
4
4
|
type Props = PropsWithChildren<{
|
|
5
5
|
position?: PositionTop | PositionRight | PositionBottom | PositionLeft;
|
|
6
6
|
label: ReactNode;
|
|
7
|
+
id?: string;
|
|
7
8
|
}> & CommonProps;
|
|
8
|
-
declare const Tooltip: ({ position, children, label, className, }: Props) => ReactElement;
|
|
9
|
+
declare const Tooltip: ({ position, children, label, id, className, }: Props) => ReactElement;
|
|
9
10
|
export default Tooltip;
|
|
10
11
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/tooltip/Tooltip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/tooltip/Tooltip.tsx"],"names":[],"mappings":"AAGA,OAAO,EAKL,SAAS,EACT,YAAY,EACZ,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,WAAW,EAAY,MAAM,WAAW,CAAC;AAClD,OAAO,EACL,cAAc,EACd,YAAY,EACZ,aAAa,EACb,WAAW,EACZ,MAAM,gCAAgC,CAAC;AAExC,KAAK,KAAK,GAAG,iBAAiB,CAAC;IAC7B,QAAQ,CAAC,EAAE,WAAW,GAAG,aAAa,GAAG,cAAc,GAAG,YAAY,CAAC;IACvE,KAAK,EAAE,SAAS,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC,GACA,WAAW,CAAC;AAEd,QAAA,MAAM,OAAO,kDAMV,KAAK,KAAG,YAsFV,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "45.
|
|
3
|
+
"version": "45.18.0",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
"rollup": "^3.28.1",
|
|
79
79
|
"storybook": "^7.4.5",
|
|
80
80
|
"@transferwise/less-config": "3.0.6",
|
|
81
|
-
"@transferwise/neptune-css": "14.6.
|
|
81
|
+
"@transferwise/neptune-css": "14.6.2",
|
|
82
82
|
"@wise/components-theming": "0.8.4"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@transferwise/icons": "^3.7.0",
|
|
86
|
-
"@transferwise/neptune-css": "^14.6.
|
|
86
|
+
"@transferwise/neptune-css": "^14.6.2",
|
|
87
87
|
"@wise/art": "^2.7.0",
|
|
88
88
|
"@wise/components-theming": "^0.8.4",
|
|
89
89
|
"currency-flags": "^4.0.2",
|
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
"lodash.difference": "^4.5.0",
|
|
118
118
|
"lodash.throttle": "^4.1.1",
|
|
119
119
|
"lodash.topairs": "^4.3.0",
|
|
120
|
+
"merge-props": "^6.0.0",
|
|
120
121
|
"prop-types": "^15.7.2",
|
|
121
122
|
"react-merge-refs": "^1.1.0",
|
|
122
123
|
"react-popper": "^2.2.4",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useId } from '@radix-ui/react-id';
|
|
1
2
|
import { useTheme } from '@wise/components-theming';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import { cloneElement, FC, ReactNode } from 'react';
|
|
@@ -70,11 +71,13 @@ const AccordionItem: FC<AccordionItemProps> = ({
|
|
|
70
71
|
icon,
|
|
71
72
|
theme = 'light',
|
|
72
73
|
}) => {
|
|
73
|
-
const iconElement = icon ? cloneElement(icon as
|
|
74
|
+
const iconElement = icon ? cloneElement(icon as React.ReactElement<any>, { size: 24 }) : null;
|
|
75
|
+
const fallbackId = useId();
|
|
76
|
+
const accordionId = id ?? fallbackId;
|
|
74
77
|
|
|
75
78
|
return (
|
|
76
79
|
<div
|
|
77
|
-
id={
|
|
80
|
+
id={accordionId}
|
|
78
81
|
className={classNames(
|
|
79
82
|
'np-accordion-item',
|
|
80
83
|
iconElement ? 'np-accordion-item--with-icon' : null,
|
|
@@ -90,18 +93,23 @@ const AccordionItem: FC<AccordionItemProps> = ({
|
|
|
90
93
|
title={title}
|
|
91
94
|
button={<Chevron orientation={open ? Position.TOP : Position.BOTTOM} size={Size.MEDIUM} />}
|
|
92
95
|
inverseMediaCircle={false}
|
|
96
|
+
aria-expanded={open}
|
|
97
|
+
aria-controls={`${accordionId}-section`}
|
|
98
|
+
id={`${accordionId}-control`}
|
|
93
99
|
onClick={onClick}
|
|
94
100
|
/>
|
|
95
101
|
{open && (
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
'
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
<div id={`${accordionId}-section`} role="region" aria-labelledby={`${accordionId}-control`}>
|
|
103
|
+
<Body
|
|
104
|
+
as="span"
|
|
105
|
+
type={Typography.BODY_LARGE}
|
|
106
|
+
className={classNames('np-accordion-item__content', 'd-block', {
|
|
107
|
+
'has-icon': icon,
|
|
108
|
+
})}
|
|
109
|
+
>
|
|
110
|
+
{content}
|
|
111
|
+
</Body>
|
|
112
|
+
</div>
|
|
105
113
|
)}
|
|
106
114
|
</div>
|
|
107
115
|
);
|
|
@@ -4,9 +4,13 @@ exports[`AccordionItem open / close renders an item closed 1`] = `
|
|
|
4
4
|
<div>
|
|
5
5
|
<div
|
|
6
6
|
class="np-accordion-item"
|
|
7
|
+
id="test-accordion"
|
|
7
8
|
>
|
|
8
9
|
<button
|
|
10
|
+
aria-controls="test-accordion-section"
|
|
11
|
+
aria-expanded="false"
|
|
9
12
|
class="np-option decision"
|
|
13
|
+
id="test-accordion-control"
|
|
10
14
|
>
|
|
11
15
|
<div
|
|
12
16
|
class="media"
|
|
@@ -52,9 +56,13 @@ exports[`AccordionItem open / close renders an item open 1`] = `
|
|
|
52
56
|
<div>
|
|
53
57
|
<div
|
|
54
58
|
class="np-accordion-item np-accordion-item--open"
|
|
59
|
+
id="test-accordion"
|
|
55
60
|
>
|
|
56
61
|
<button
|
|
62
|
+
aria-controls="test-accordion-section"
|
|
63
|
+
aria-expanded="true"
|
|
57
64
|
class="np-option decision"
|
|
65
|
+
id="test-accordion-control"
|
|
58
66
|
>
|
|
59
67
|
<div
|
|
60
68
|
class="media"
|
|
@@ -92,11 +100,17 @@ exports[`AccordionItem open / close renders an item open 1`] = `
|
|
|
92
100
|
</div>
|
|
93
101
|
</div>
|
|
94
102
|
</button>
|
|
95
|
-
<
|
|
96
|
-
|
|
103
|
+
<div
|
|
104
|
+
aria-labelledby="test-accordion-control"
|
|
105
|
+
id="test-accordion-section"
|
|
106
|
+
role="region"
|
|
97
107
|
>
|
|
98
|
-
|
|
99
|
-
|
|
108
|
+
<span
|
|
109
|
+
class="np-text-body-large np-accordion-item__content d-block"
|
|
110
|
+
>
|
|
111
|
+
Lauri Ipsum has been the industry standard dummy text ever since the 1500s.
|
|
112
|
+
</span>
|
|
113
|
+
</div>
|
|
100
114
|
</div>
|
|
101
115
|
</div>
|
|
102
116
|
`;
|
|
@@ -166,9 +166,8 @@ describe('Button', () => {
|
|
|
166
166
|
describe('alternative states', () => {
|
|
167
167
|
it('renders as loading if loading is true', () => {
|
|
168
168
|
const { container } = render(<Button {...props} loading />);
|
|
169
|
-
expect(container).toMatchSnapshot();
|
|
170
|
-
|
|
171
169
|
expect(container.querySelector('.btn-loader')).toBeInTheDocument();
|
|
170
|
+
expect(screen.getByRole('button', { name: 'loading' })).toBeInTheDocument();
|
|
172
171
|
});
|
|
173
172
|
|
|
174
173
|
it('renders as block if block is true', () => {
|
|
@@ -74,6 +74,12 @@ export const Variants = storyConfig<Story>(
|
|
|
74
74
|
<Button {...args} priority={Priority.SECONDARY} disabled />
|
|
75
75
|
<Button {...args} priority={Priority.TERTIARY} disabled />
|
|
76
76
|
</div>
|
|
77
|
+
<div className="m-b-2">
|
|
78
|
+
<div className="title-4 m-b-1">Loading</div>
|
|
79
|
+
<Button {...args} priority={Priority.PRIMARY} loading />
|
|
80
|
+
<Button {...args} priority={Priority.SECONDARY} loading />
|
|
81
|
+
<Button {...args} priority={Priority.TERTIARY} loading />
|
|
82
|
+
</div>
|
|
77
83
|
</>
|
|
78
84
|
);
|
|
79
85
|
},
|
package/src/button/Button.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, forwardRef } from 'react';
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
3
4
|
|
|
4
5
|
import {
|
|
5
6
|
Size,
|
|
@@ -17,7 +18,9 @@ import {
|
|
|
17
18
|
SizeLarge,
|
|
18
19
|
LinkProps,
|
|
19
20
|
} from '../common';
|
|
21
|
+
import ProcessIndicator from '../processIndicator';
|
|
20
22
|
|
|
23
|
+
import messages from './Button.messages';
|
|
21
24
|
import { typeClassMap, priorityClassMap } from './classMap';
|
|
22
25
|
import { establishNewPriority, establishNewType, logDeprecationNotices } from './legacyUtils';
|
|
23
26
|
|
|
@@ -70,6 +73,8 @@ const Button = forwardRef<ButtonReferenceType, Props>(
|
|
|
70
73
|
}: Props,
|
|
71
74
|
reference,
|
|
72
75
|
) => {
|
|
76
|
+
const intl = useIntl();
|
|
77
|
+
|
|
73
78
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
74
79
|
logDeprecationNotices({ size, type });
|
|
75
80
|
|
|
@@ -97,6 +102,10 @@ const Button = forwardRef<ButtonReferenceType, Props>(
|
|
|
97
102
|
className,
|
|
98
103
|
);
|
|
99
104
|
|
|
105
|
+
function processIndicatorSize(): string {
|
|
106
|
+
return ['sm', 'xs'].includes(size) ? 'xxs' : 'xs';
|
|
107
|
+
}
|
|
108
|
+
|
|
100
109
|
const Element = (component as ElementType) ?? 'button';
|
|
101
110
|
let props;
|
|
102
111
|
|
|
@@ -112,9 +121,15 @@ const Button = forwardRef<ButtonReferenceType, Props>(
|
|
|
112
121
|
}
|
|
113
122
|
|
|
114
123
|
return (
|
|
115
|
-
<Element
|
|
124
|
+
<Element
|
|
125
|
+
ref={reference}
|
|
126
|
+
className={classes}
|
|
127
|
+
{...props}
|
|
128
|
+
aria-live={loading ? 'polite' : 'off'}
|
|
129
|
+
aria-label={loading ? intl.formatMessage(messages.loadingAriaLabel) : undefined}
|
|
130
|
+
>
|
|
116
131
|
{children}
|
|
117
|
-
{loading && <
|
|
132
|
+
{loading && <ProcessIndicator size={processIndicatorSize()} className="btn-loader" />}
|
|
118
133
|
</Element>
|
|
119
134
|
);
|
|
120
135
|
},
|