@transferwise/components 46.1.0 → 46.2.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/README.md +3 -5
- package/build/index.esm.js +44 -23
- package/build/index.esm.js.map +1 -1
- package/build/index.js +44 -23
- package/build/index.js.map +1 -1
- package/build/main.css +5494 -1
- package/build/styles/accordion/Accordion.css +60 -1
- package/build/styles/actionButton/ActionButton.css +53 -1
- package/build/styles/avatar/Avatar.css +205 -1
- package/build/styles/badge/Badge.css +68 -1
- package/build/styles/button/Button.css +20 -1
- package/build/styles/card/Card.css +100 -1
- package/build/styles/checkboxButton/CheckboxButton.css +24 -1
- package/build/styles/chips/Chip.css +190 -1
- package/build/styles/circularButton/CircularButton.css +211 -1
- package/build/styles/common/Option/Option.css +100 -1
- package/build/styles/common/RadioButton/RadioButton.css +4 -1
- package/build/styles/common/bottomSheet/BottomSheet.css +53 -1
- package/build/styles/common/card/Card.css +49 -1
- package/build/styles/common/closeButton/CloseButton.css +79 -1
- package/build/styles/common/panel/Panel.css +73 -1
- package/build/styles/criticalBanner/CriticalCommsBanner.css +76 -1
- package/build/styles/dateInput/DateInput.css +3 -1
- package/build/styles/dateLookup/DateLookup.css +98 -1
- package/build/styles/dateLookup/dateTrigger/DateTrigger.css +68 -1
- package/build/styles/decision/Decision.css +93 -1
- package/build/styles/definitionList/DefinitionList.css +53 -1
- package/build/styles/dimmer/Dimmer.css +70 -1
- package/build/styles/drawer/Drawer.css +100 -1
- package/build/styles/dropFade/DropFade.css +19 -1
- package/build/styles/dynamicFieldDefinitionList/FormattedValue/FormattedValue.css +5 -1
- package/build/styles/emphasis/Emphasis.css +31 -1
- package/build/styles/flowNavigation/FlowNavigation.css +72 -1
- package/build/styles/flowNavigation/animatedLabel/AnimatedLabel.css +21 -1
- package/build/styles/flowNavigation/backButton/BackButton.css +32 -1
- package/build/styles/header/Header.css +28 -1
- package/build/styles/image/Image.css +13 -1
- package/build/styles/info/Info.css +32 -1
- package/build/styles/inputs/Input.css +105 -1
- package/build/styles/inputs/InputGroup.css +62 -1
- package/build/styles/inputs/SelectInput.css +374 -1
- package/build/styles/inputs/TextArea.css +109 -1
- package/build/styles/instructionsList/InstructionsList.css +22 -1
- package/build/styles/link/Link.css +15 -1
- package/build/styles/listItem/ListItem.css +6 -1
- package/build/styles/loader/Loader.css +313 -1
- package/build/styles/logo/Logo.css +26 -1
- package/build/styles/main.css +5494 -1
- package/build/styles/modal/Modal.css +155 -1
- package/build/styles/moneyInput/MoneyInput.css +66 -1
- package/build/styles/navigationOption/NavigationOption.css +69 -1
- package/build/styles/navigationOptionsList/NavigationOptionsList.css +13 -1
- package/build/styles/nudge/Nudge.css +179 -1
- package/build/styles/overlayHeader/OverlayHeader.css +15 -1
- package/build/styles/phoneNumberInput/PhoneNumberInput.css +23 -1
- package/build/styles/popover/Popover.css +43 -1
- package/build/styles/progress/Progress.css +43 -1
- package/build/styles/progressBar/ProgressBar.css +14 -1
- package/build/styles/promoCard/PromoCard.css +186 -1
- package/build/styles/section/Section.css +10 -1
- package/build/styles/select/Select.css +309 -1
- package/build/styles/slidingPanel/SlidingPanel.css +105 -1
- package/build/styles/snackbar/Snackbar.css +93 -1
- package/build/styles/statusIcon/StatusIcon.css +78 -1
- package/build/styles/stepper/Stepper.css +108 -1
- package/build/styles/summary/Summary.css +81 -1
- package/build/styles/switch/Switch.css +68 -1
- package/build/styles/tabs/Tabs.css +121 -1
- package/build/styles/tile/Tile.css +55 -1
- package/build/styles/tooltip/Tooltip.css +50 -1
- package/build/styles/typeahead/Typeahead.css +183 -1
- package/build/styles/typeahead/typeaheadOption/TypeaheadOption.css +9 -1
- package/build/styles/upload/Upload.css +15 -1
- package/build/styles/uploadInput/UploadInput.css +71 -1
- package/build/styles/uploadInput/uploadButton/UploadButton.css +49 -1
- package/build/styles/uploadInput/uploadItem/UploadItem.css +74 -1
- package/build/types/accordion/Accordion.d.ts +1 -0
- package/build/types/accordion/Accordion.d.ts.map +1 -1
- package/build/types/accordion/AccordionItem/AccordionItem.d.ts +3 -0
- package/build/types/accordion/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts +6 -3
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/inputs/_BottomSheet.d.ts +2 -1
- package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
- package/build/types/inputs/_Popover.d.ts +2 -1
- package/build/types/inputs/_Popover.d.ts.map +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/select/option/Option.d.ts.map +1 -1
- package/build/types/typeahead/util/highlight.d.ts +1 -1
- package/build/types/typeahead/util/highlight.d.ts.map +1 -1
- package/package.json +5 -11
- package/src/accordion/Accordion.css +60 -1
- package/src/accordion/Accordion.story.tsx +8 -0
- package/src/accordion/Accordion.tsx +2 -0
- package/src/accordion/AccordionItem/AccordionItem.tsx +5 -0
- package/src/actionButton/ActionButton.css +53 -1
- package/src/avatar/Avatar.css +205 -1
- package/src/badge/Badge.css +68 -1
- package/src/button/Button.css +20 -1
- package/src/card/Card.css +100 -1
- package/src/checkboxButton/CheckboxButton.css +24 -1
- package/src/chips/Chip.css +190 -1
- package/src/circularButton/CircularButton.css +211 -1
- package/src/common/Option/Option.css +100 -1
- package/src/common/RadioButton/RadioButton.css +4 -1
- package/src/common/bottomSheet/BottomSheet.css +53 -1
- package/src/common/card/Card.css +49 -1
- package/src/common/closeButton/CloseButton.css +79 -1
- package/src/common/panel/Panel.css +73 -1
- package/src/criticalBanner/CriticalCommsBanner.css +76 -1
- package/src/dateInput/DateInput.css +3 -1
- package/src/dateLookup/DateLookup.css +98 -1
- package/src/dateLookup/DateLookup.story.js +12 -8
- package/src/dateLookup/dateTrigger/DateTrigger.css +68 -1
- package/src/decision/Decision.css +93 -1
- package/src/definitionList/DefinitionList.css +53 -1
- package/src/dimmer/Dimmer.css +70 -1
- package/src/drawer/Drawer.css +100 -1
- package/src/dropFade/DropFade.css +19 -1
- package/src/dynamicFieldDefinitionList/FormattedValue/FormattedValue.css +5 -1
- package/src/emphasis/Emphasis.css +31 -1
- package/src/flowNavigation/FlowNavigation.css +72 -1
- package/src/flowNavigation/animatedLabel/AnimatedLabel.css +21 -1
- package/src/flowNavigation/backButton/BackButton.css +32 -1
- package/src/header/Header.css +28 -1
- package/src/image/Image.css +13 -1
- package/src/info/Info.css +32 -1
- package/src/inputs/Input.css +105 -1
- package/src/inputs/InputGroup.css +62 -1
- package/src/inputs/SelectInput.css +374 -1
- package/src/inputs/SelectInput.spec.tsx +52 -3
- package/src/inputs/SelectInput.story.tsx +1 -1
- package/src/inputs/SelectInput.tsx +30 -15
- package/src/inputs/TextArea.css +109 -1
- package/src/inputs/_BottomSheet.tsx +3 -0
- package/src/inputs/_Popover.tsx +3 -0
- package/src/instructionsList/InstructionsList.css +22 -1
- package/src/link/Link.css +15 -1
- package/src/listItem/ListItem.css +6 -1
- package/src/loader/Loader.css +313 -1
- package/src/logo/Logo.css +26 -1
- package/src/main.css +5494 -1
- package/src/modal/Modal.css +155 -1
- package/src/moneyInput/MoneyInput.css +66 -1
- package/src/moneyInput/MoneyInput.js +3 -1
- package/src/moneyInput/MoneyInput.spec.js +4 -1
- package/src/navigationOption/NavigationOption.css +69 -1
- package/src/navigationOptionsList/NavigationOptionsList.css +13 -1
- package/src/nudge/Nudge.css +179 -1
- package/src/overlayHeader/OverlayHeader.css +15 -1
- package/src/phoneNumberInput/PhoneNumberInput.css +23 -1
- package/src/popover/Popover.css +43 -1
- package/src/progress/Progress.css +43 -1
- package/src/progressBar/ProgressBar.css +14 -1
- package/src/promoCard/PromoCard.css +186 -1
- package/src/section/Section.css +10 -1
- package/src/select/Select.css +309 -1
- package/src/select/Select.less +1 -8
- package/src/select/option/Option.spec.js +3 -21
- package/src/select/option/Option.tsx +2 -7
- package/src/slidingPanel/SlidingPanel.css +105 -1
- package/src/snackbar/Snackbar.css +93 -1
- package/src/statusIcon/StatusIcon.css +78 -1
- package/src/stepper/Stepper.css +108 -1
- package/src/summary/Summary.css +81 -1
- package/src/switch/Switch.css +68 -1
- package/src/tabs/Tabs.css +121 -1
- package/src/tile/Tile.css +55 -1
- package/src/tooltip/Tooltip.css +50 -1
- package/src/typeahead/Typeahead.css +183 -1
- package/src/typeahead/typeaheadOption/TypeaheadOption.css +9 -1
- package/src/typeahead/typeaheadOption/TypeaheadOption.js +3 -3
- package/src/typeahead/util/highlight.js +1 -1
- package/src/upload/Upload.css +15 -1
- package/src/uploadInput/UploadInput.css +71 -1
- package/src/uploadInput/uploadButton/UploadButton.css +49 -1
- package/src/uploadInput/uploadItem/UploadItem.css +74 -1
package/src/inputs/TextArea.css
CHANGED
|
@@ -1 +1,109 @@
|
|
|
1
|
-
|
|
1
|
+
@media (min-width: 768px) {
|
|
2
|
+
}@media (min-width: 768px) {
|
|
3
|
+
}.np-form-control {
|
|
4
|
+
--ring-width: 1px;
|
|
5
|
+
--ring-color: var(--color-interactive-secondary);
|
|
6
|
+
border: none;
|
|
7
|
+
background-color: transparent;
|
|
8
|
+
min-height: 0;
|
|
9
|
+
/* TODO: Remove this override once `.form-control` isn’t used anymore */
|
|
10
|
+
padding-left: 16px;
|
|
11
|
+
padding-left: var(--size-16);
|
|
12
|
+
padding-right: 16px;
|
|
13
|
+
padding-right: var(--size-16);
|
|
14
|
+
color: #37517e;
|
|
15
|
+
color: var(--color-content-primary);
|
|
16
|
+
box-shadow: inset 0 0 0 1px #c9cbce;
|
|
17
|
+
box-shadow: inset 0 0 0 var(--ring-width) var(--ring-color);
|
|
18
|
+
transition-property: color, opacity, box-shadow;
|
|
19
|
+
transition-timing-function: ease-in-out;
|
|
20
|
+
transition-duration: 300ms;
|
|
21
|
+
/* TODO: Remove these overrides once `.form-control` isn’t used anymore */
|
|
22
|
+
}.np-form-control:focus-visible {
|
|
23
|
+
outline: none;
|
|
24
|
+
}.np-form-control[aria-invalid="true"] {
|
|
25
|
+
--ring-width: 2px;
|
|
26
|
+
--ring-color: var(--color-sentiment-negative) !important;
|
|
27
|
+
}.np-form-control:hover:enabled {
|
|
28
|
+
--ring-width: 2px;
|
|
29
|
+
--ring-color: var(--color-interactive-secondary-hover);
|
|
30
|
+
}.np-form-control:focus:enabled {
|
|
31
|
+
--ring-width: 3px;
|
|
32
|
+
--ring-color: var(--color-interactive-primary);
|
|
33
|
+
}.np-form-control--size-auto {
|
|
34
|
+
font-weight: 400;
|
|
35
|
+
font-weight: var(--font-weight-regular);
|
|
36
|
+
font-size: 1rem;
|
|
37
|
+
font-size: var(--font-size-16);
|
|
38
|
+
line-height: 150%;
|
|
39
|
+
letter-spacing: -0.011em;
|
|
40
|
+
padding-top: 12px;
|
|
41
|
+
padding-top: var(--size-12);
|
|
42
|
+
padding-bottom: 12px;
|
|
43
|
+
padding-bottom: var(--size-12);
|
|
44
|
+
}.np-form-control--size-sm,
|
|
45
|
+
.np-form-control--size-md,
|
|
46
|
+
.np-form-control--size-lg {
|
|
47
|
+
padding-top: 0 !important;
|
|
48
|
+
padding-bottom: 0 !important;
|
|
49
|
+
}.np-form-control--size-sm {
|
|
50
|
+
line-height: 1.5;
|
|
51
|
+
line-height: var(--line-height-body);
|
|
52
|
+
font-size: 1rem;
|
|
53
|
+
font-size: var(--font-size-16);
|
|
54
|
+
font-size: 0.875rem;
|
|
55
|
+
font-size: var(--font-size-14);
|
|
56
|
+
line-height: 155%;
|
|
57
|
+
letter-spacing: -0.006em;
|
|
58
|
+
font-weight: 400;
|
|
59
|
+
font-weight: var(--font-weight-regular);
|
|
60
|
+
height: 32px !important;
|
|
61
|
+
height: var(--size-32) !important;
|
|
62
|
+
}.np-form-control--size-md {
|
|
63
|
+
font-weight: 400;
|
|
64
|
+
font-weight: var(--font-weight-regular);
|
|
65
|
+
font-size: 1rem;
|
|
66
|
+
font-size: var(--font-size-16);
|
|
67
|
+
line-height: 150%;
|
|
68
|
+
letter-spacing: -0.011em;
|
|
69
|
+
height: 48px !important;
|
|
70
|
+
height: var(--size-48) !important;
|
|
71
|
+
}.np-form-control--size-lg {
|
|
72
|
+
margin: 0;
|
|
73
|
+
color: #37517e;
|
|
74
|
+
color: var(--color-content-primary);
|
|
75
|
+
line-height: 1.2;
|
|
76
|
+
line-height: var(--line-height-title);
|
|
77
|
+
letter-spacing: 0;
|
|
78
|
+
margin-bottom: 0;
|
|
79
|
+
margin-bottom: initial;
|
|
80
|
+
font-size: 1.375rem;
|
|
81
|
+
font-size: var(--font-size-22);
|
|
82
|
+
font-weight: 600;
|
|
83
|
+
font-weight: var(--font-weight-semi-bold);
|
|
84
|
+
letter-spacing: -0.018em;
|
|
85
|
+
line-height: 125%;
|
|
86
|
+
height: 72px !important;
|
|
87
|
+
height: var(--size-72) !important;
|
|
88
|
+
}.np-form-control--size-lg + p,
|
|
89
|
+
.np-form-control--size-lg + ul:not(.list-unstyled),
|
|
90
|
+
.np-form-control--size-lg + ol:not(.list-unstyled) {
|
|
91
|
+
margin-top: 8px;
|
|
92
|
+
margin-top: var(--size-8);
|
|
93
|
+
}.np-text-area {
|
|
94
|
+
min-height: 72px;
|
|
95
|
+
min-height: var(--size-72);
|
|
96
|
+
scroll-padding-top: 8px;
|
|
97
|
+
scroll-padding-top: var(--size-8);
|
|
98
|
+
scroll-padding-bottom: 8px;
|
|
99
|
+
scroll-padding-bottom: var(--size-8);
|
|
100
|
+
overscroll-behavior: none;
|
|
101
|
+
border-radius: 10px !important;
|
|
102
|
+
border-radius: var(--radius-small) !important;
|
|
103
|
+
}.np-text-area::-moz-placeholder {
|
|
104
|
+
color: #768e9c;
|
|
105
|
+
color: var(--color-content-tertiary);
|
|
106
|
+
}.np-text-area::placeholder {
|
|
107
|
+
color: #768e9c;
|
|
108
|
+
color: var(--color-content-tertiary);
|
|
109
|
+
}
|
|
@@ -29,6 +29,7 @@ export interface BottomSheetProps {
|
|
|
29
29
|
padding?: 'none' | 'md';
|
|
30
30
|
children?: React.ReactNode;
|
|
31
31
|
onClose?: () => void;
|
|
32
|
+
onCloseEnd?: () => void;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
export function BottomSheet({
|
|
@@ -39,6 +40,7 @@ export function BottomSheet({
|
|
|
39
40
|
padding = 'md',
|
|
40
41
|
children,
|
|
41
42
|
onClose,
|
|
43
|
+
onCloseEnd,
|
|
42
44
|
}: BottomSheetProps) {
|
|
43
45
|
const { refs, context } = useFloating<Element>({
|
|
44
46
|
open,
|
|
@@ -73,6 +75,7 @@ export function BottomSheet({
|
|
|
73
75
|
beforeEnter={() => {
|
|
74
76
|
setFloatingKey((prev) => prev + 1);
|
|
75
77
|
}}
|
|
78
|
+
afterLeave={onCloseEnd}
|
|
76
79
|
>
|
|
77
80
|
<FocusBoundary>
|
|
78
81
|
<Transition.Child
|
package/src/inputs/_Popover.tsx
CHANGED
|
@@ -34,6 +34,7 @@ export interface PopoverProps {
|
|
|
34
34
|
padding?: 'none' | 'md';
|
|
35
35
|
children?: React.ReactNode;
|
|
36
36
|
onClose?: () => void;
|
|
37
|
+
onCloseEnd?: () => void;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
const floatingPadding = 16;
|
|
@@ -47,6 +48,7 @@ export function Popover({
|
|
|
47
48
|
padding = 'md',
|
|
48
49
|
children,
|
|
49
50
|
onClose,
|
|
51
|
+
onCloseEnd,
|
|
50
52
|
}: PopoverProps) {
|
|
51
53
|
const { refs, floatingStyles, context } = useFloating<Element>({
|
|
52
54
|
placement,
|
|
@@ -96,6 +98,7 @@ export function Popover({
|
|
|
96
98
|
beforeEnter={() => {
|
|
97
99
|
setFloatingKey((prev) => prev + 1);
|
|
98
100
|
}}
|
|
101
|
+
afterLeave={onCloseEnd}
|
|
99
102
|
>
|
|
100
103
|
<FocusBoundary>
|
|
101
104
|
<FloatingFocusManager context={context} guards={false} modal={false}>
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
.tw-instructions
|
|
1
|
+
.tw-instructions {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
}
|
|
5
|
+
.tw-instructions .instruction {
|
|
6
|
+
display: flex;
|
|
7
|
+
margin-top: 8px;
|
|
8
|
+
margin-top: var(--padding-x-small);
|
|
9
|
+
}
|
|
10
|
+
.tw-instructions .instruction .do,
|
|
11
|
+
.tw-instructions .instruction .dont {
|
|
12
|
+
flex-shrink: 0;
|
|
13
|
+
margin-right: 8px;
|
|
14
|
+
margin-right: var(--padding-x-small);
|
|
15
|
+
margin-bottom: 0;
|
|
16
|
+
}
|
|
17
|
+
.tw-instructions .instruction .do {
|
|
18
|
+
color: var(--color-sentiment-positive);
|
|
19
|
+
}
|
|
20
|
+
.tw-instructions .instruction .dont {
|
|
21
|
+
color: var(--color-sentiment-negative);
|
|
22
|
+
}
|
package/src/link/Link.css
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
a
|
|
1
|
+
a {
|
|
2
|
+
border-radius: 2px;
|
|
3
|
+
}
|
|
4
|
+
.np-link .tw-icon {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
margin-left: 4px;
|
|
8
|
+
margin-left: var(--size-4);
|
|
9
|
+
}
|
|
10
|
+
[dir="rtl"] .np-link .tw-icon {
|
|
11
|
+
margin-right: 4px;
|
|
12
|
+
margin-right: var(--size-4);
|
|
13
|
+
margin-left: 0;
|
|
14
|
+
margin-left: initial;
|
|
15
|
+
}
|