@transferwise/components 0.0.0-experimental-d2bc8ee → 0.0.0-experimental-c3d7358
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/common/closeButton/CloseButton.messages.js +2 -2
- package/build/common/closeButton/CloseButton.messages.js.map +1 -1
- package/build/common/closeButton/CloseButton.messages.mjs +2 -2
- package/build/common/closeButton/CloseButton.messages.mjs.map +1 -1
- package/build/common/closeButton/CloseButton.mjs +2 -2
- package/build/common/closeButton/CloseButton.mjs.map +1 -1
- package/build/drawer/Drawer.js +18 -9
- package/build/drawer/Drawer.js.map +1 -1
- package/build/drawer/Drawer.mjs +18 -9
- package/build/drawer/Drawer.mjs.map +1 -1
- package/build/main.css +649 -510
- package/build/mocks.js +7 -0
- package/build/mocks.js.map +1 -1
- package/build/mocks.mjs +7 -1
- package/build/mocks.mjs.map +1 -1
- package/build/modal/Modal.js +20 -21
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs +20 -21
- package/build/modal/Modal.mjs.map +1 -1
- package/build/select/Select.js +2 -1
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +2 -1
- package/build/select/Select.mjs.map +1 -1
- package/build/sentimentSurface/classMap.js +22 -0
- package/build/sentimentSurface/classMap.js.map +1 -0
- package/build/sentimentSurface/classMap.mjs +18 -0
- package/build/sentimentSurface/classMap.mjs.map +1 -0
- package/build/statusIcon/StatusIcon.js +4 -1
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +4 -1
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/accordion/Accordion.css +6 -2
- package/build/styles/actionButton/ActionButton.css +4 -12
- package/build/styles/avatar/Avatar.css +10 -13
- package/build/styles/avatarView/AvatarView.css +3 -5
- package/build/styles/avatarView/Dot.css +1 -2
- package/build/styles/button/Button.css +0 -1
- package/build/styles/card/Card.css +2 -2
- package/build/styles/carousel/Carousel.css +2 -5
- package/build/styles/checkboxButton/CheckboxButton.css +1 -0
- package/build/styles/chips/Chip.css +12 -31
- package/build/styles/circularButton/CircularButton.css +0 -6
- package/build/styles/common/Option/Option.css +2 -2
- package/build/styles/common/RadioButton/RadioButton.css +1 -1
- package/build/styles/common/bottomSheet/BottomSheet.css +1 -1
- package/build/styles/common/card/Card.css +1 -1
- package/build/styles/common/closeButton/CloseButton.css +2 -7
- package/build/styles/criticalBanner/CriticalCommsBanner.css +0 -4
- package/build/styles/dateLookup/DateLookup.css +3 -5
- package/build/styles/definitionList/DefinitionList.css +1 -1
- package/build/styles/divider/Divider.css +1 -1
- package/build/styles/drawer/Drawer.css +11 -58
- package/build/styles/emphasis/Emphasis.css +5 -4
- package/build/styles/expressiveMoneyInput/ExpressiveMoneyInput.css +0 -2
- package/build/styles/expressiveMoneyInput/amountInput/AmountInput.css +0 -1
- package/build/styles/expressiveMoneyInput/chevron/Chevron.css +0 -1
- package/build/styles/flowNavigation/FlowNavigation.css +1 -2
- package/build/styles/header/Header.css +2 -2
- package/build/styles/iconButton/IconButton.css +4 -27
- package/build/styles/inputs/Input.css +5 -5
- package/build/styles/inputs/InputGroup.css +2 -3
- package/build/styles/inputs/SelectInput.css +13 -14
- package/build/styles/inputs/TextArea.css +5 -5
- package/build/styles/instructionsList/InstructionsList.css +0 -2
- package/build/styles/listItem/ListItem.css +8 -22
- package/build/styles/logo/Logo.css +0 -2
- package/build/styles/main.css +649 -510
- package/build/styles/modal/Modal.css +6 -68
- package/build/styles/moneyInput/MoneyInput.css +2 -2
- package/build/styles/navigationOption/NavigationOption.css +3 -1
- package/build/styles/nudge/Nudge.css +1 -1
- package/build/styles/overlayHeader/OverlayHeader.css +1 -2
- package/build/styles/popover/Popover.css +2 -2
- package/build/styles/progress/Progress.css +3 -3
- package/build/styles/progressBar/ProgressBar.css +2 -2
- package/build/styles/promoCard/PromoCard.css +3 -3
- package/build/styles/prompt/InlinePrompt/InlinePrompt.css +3 -39
- package/build/styles/segmentedControl/SegmentedControl.css +2 -6
- package/build/styles/select/Select.css +41 -25
- package/build/styles/sentimentSurface/SentimentSurface.css +424 -0
- package/build/styles/slidingPanel/SlidingPanel.css +4 -4
- package/build/styles/snackbar/Snackbar.css +4 -4
- package/build/styles/statusIcon/StatusIcon.css +4 -44
- package/build/styles/stepper/Stepper.css +4 -4
- package/build/styles/summary/Summary.css +2 -5
- package/build/styles/switch/Switch.css +2 -3
- package/build/styles/table/Table.css +5 -13
- package/build/styles/tabs/Tabs.css +9 -10
- package/build/styles/tile/Tile.css +5 -8
- package/build/styles/typeahead/Typeahead.css +1 -2
- package/build/styles/typeahead/typeaheadOption/TypeaheadOption.css +4 -1
- package/build/styles/upload/Upload.css +1 -1
- package/build/styles/uploadInput/uploadButton/UploadButton.css +2 -4
- package/build/styles/uploadInput/uploadItem/UploadItem.css +4 -8
- package/build/types/drawer/Drawer.d.ts.map +1 -1
- package/build/types/mocks.d.ts +1 -0
- package/build/types/mocks.d.ts.map +1 -1
- package/build/types/modal/Modal.d.ts.map +1 -1
- package/build/types/select/Select.d.ts +1 -1
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/sentimentSurface/SentimentSurface.d.ts +30 -0
- package/build/types/sentimentSurface/SentimentSurface.d.ts.map +1 -0
- package/build/types/sentimentSurface/SentimentSurface.types.d.ts +80 -0
- package/build/types/sentimentSurface/SentimentSurface.types.d.ts.map +1 -0
- package/build/types/sentimentSurface/classMap.d.ts +5 -0
- package/build/types/sentimentSurface/classMap.d.ts.map +1 -0
- package/build/types/sentimentSurface/index.d.ts +3 -0
- package/build/types/sentimentSurface/index.d.ts.map +1 -0
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/test-utils/window-mock.d.ts +1 -0
- package/build/types/test-utils/window-mock.d.ts.map +1 -1
- package/package.json +5 -10
- package/src/accordion/Accordion.css +6 -2
- package/src/accordion/Accordion.less +7 -0
- package/src/accordion/Accordion.story.tsx +1 -1
- package/src/actionButton/ActionButton.css +4 -12
- package/src/avatar/Avatar.css +10 -13
- package/src/avatarLayout/AvatarLayout.story.tsx +1 -0
- package/src/avatarView/AvatarView.css +3 -5
- package/src/avatarView/AvatarView.story.tsx +1 -0
- package/src/avatarView/Dot.css +1 -2
- package/src/button/Button.css +0 -1
- package/src/card/Card.css +2 -2
- package/src/carousel/Carousel.css +2 -5
- package/src/checkboxButton/CheckboxButton.css +1 -0
- package/src/chips/Chip.css +12 -31
- package/src/circularButton/CircularButton.css +0 -6
- package/src/common/Option/Option.css +2 -2
- package/src/common/RadioButton/RadioButton.css +1 -1
- package/src/common/bottomSheet/BottomSheet.css +1 -1
- package/src/common/card/Card.css +1 -1
- package/src/common/closeButton/CloseButton.css +2 -7
- package/src/criticalBanner/CriticalCommsBanner.css +0 -4
- package/src/dateLookup/DateLookup.css +3 -5
- package/src/definitionList/DefinitionList.css +1 -1
- package/src/display/Display.story.tsx +1 -0
- package/src/divider/Divider.css +1 -1
- package/src/drawer/Drawer.css +11 -58
- package/src/drawer/Drawer.less +14 -70
- package/src/drawer/Drawer.story.tsx +158 -100
- package/src/drawer/Drawer.tsx +26 -7
- package/src/emphasis/Emphasis.css +5 -4
- package/src/expressiveMoneyInput/ExpressiveMoneyInput.css +0 -2
- package/src/expressiveMoneyInput/ExpressiveMoneyInput.spec.tsx +229 -0
- package/src/expressiveMoneyInput/amountInput/AmountInput.css +0 -1
- package/src/expressiveMoneyInput/amountInput/AmountInput.spec.tsx +282 -0
- package/src/expressiveMoneyInput/chevron/Chevron.css +0 -1
- package/src/expressiveMoneyInput/currencySelector/CurrencySelector.spec.tsx +160 -0
- package/src/flowNavigation/FlowNavigation.css +1 -2
- package/src/header/Header.css +2 -2
- package/src/iconButton/IconButton.css +4 -27
- package/src/iconButton/IconButton.story.tsx +1 -0
- package/src/inputs/Input.css +5 -5
- package/src/inputs/InputGroup.css +2 -3
- package/src/inputs/SelectInput.css +13 -14
- package/src/inputs/SelectInput.spec.tsx +7 -1
- package/src/inputs/TextArea.css +5 -5
- package/src/instructionsList/InstructionsList.css +0 -2
- package/src/listItem/ListItem.css +8 -22
- package/src/logo/Logo.css +0 -2
- package/src/main.css +649 -510
- package/src/main.less +2 -0
- package/src/mocks.ts +7 -0
- package/src/modal/Modal.css +6 -68
- package/src/modal/Modal.less +6 -76
- package/src/modal/Modal.tsx +23 -23
- package/src/moneyInput/MoneyInput.css +2 -2
- package/src/moneyInput/MoneyInput.spec.tsx +9 -1
- package/src/navigationOption/NavigationOption.css +3 -1
- package/src/nudge/Nudge.css +1 -1
- package/src/overlayHeader/OverlayHeader.css +1 -2
- package/src/popover/Popover.css +2 -2
- package/src/progress/Progress.css +3 -3
- package/src/progressBar/ProgressBar.css +2 -2
- package/src/promoCard/PromoCard.css +3 -3
- package/src/prompt/InlinePrompt/InlinePrompt.css +3 -39
- package/src/provider/theme/ThemeProvider.story.tsx +78 -11
- package/src/segmentedControl/SegmentedControl.css +2 -6
- package/src/select/Select.css +41 -25
- package/src/select/Select.less +25 -0
- package/src/select/Select.tsx +6 -1
- package/src/sentimentSurface/SentimentSurface.css +424 -0
- package/src/sentimentSurface/SentimentSurface.less +296 -0
- package/src/sentimentSurface/SentimentSurface.spec.tsx +140 -0
- package/src/sentimentSurface/SentimentSurface.story.tsx +210 -0
- package/src/sentimentSurface/SentimentSurface.tests.story.tsx +95 -0
- package/src/sentimentSurface/SentimentSurface.tsx +72 -0
- package/src/sentimentSurface/SentimentSurface.types.ts +104 -0
- package/src/sentimentSurface/classMap.ts +20 -0
- package/src/sentimentSurface/index.ts +8 -0
- package/src/slidingPanel/SlidingPanel.css +4 -4
- package/src/snackbar/Snackbar.css +4 -4
- package/src/snackbar/Snackbar.less +4 -2
- package/src/statusIcon/StatusIcon.css +4 -44
- package/src/statusIcon/StatusIcon.less +2 -40
- package/src/statusIcon/StatusIcon.tsx +10 -1
- package/src/stepper/Stepper.css +4 -4
- package/src/summary/Summary.css +2 -5
- package/src/switch/Switch.css +2 -3
- package/src/table/Table.css +5 -13
- package/src/tabs/Tabs.css +9 -10
- package/src/test-utils/jest.setup.ts +0 -5
- package/src/test-utils/window-mock.ts +5 -0
- package/src/tile/Tile.css +5 -8
- package/src/typeahead/Typeahead.css +1 -2
- package/src/typeahead/typeaheadOption/TypeaheadOption.css +4 -1
- package/src/typeahead/typeaheadOption/TypeaheadOption.less +6 -0
- package/src/upload/Upload.css +1 -1
- package/src/uploadInput/uploadButton/UploadButton.css +2 -4
- package/src/uploadInput/uploadItem/UploadItem.css +4 -8
package/src/main.less
CHANGED
package/src/mocks.ts
CHANGED
|
@@ -46,3 +46,10 @@ export function mockResizeObserver({ fn, stubGlobal = defaultStubGlobal }: Globa
|
|
|
46
46
|
),
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
|
+
|
|
50
|
+
export function mockRequestAnimationFrame() {
|
|
51
|
+
global.requestAnimationFrame = (callback: (time: number) => void): number => {
|
|
52
|
+
callback(performance.now());
|
|
53
|
+
return 0;
|
|
54
|
+
};
|
|
55
|
+
}
|
package/src/modal/Modal.css
CHANGED
|
@@ -6,14 +6,9 @@
|
|
|
6
6
|
.tw-modal .tw-modal-dialog {
|
|
7
7
|
transition: transform 0.3s ease-out;
|
|
8
8
|
transform: translateY(-25%);
|
|
9
|
-
box-shadow:
|
|
10
|
-
background: #ffffff;
|
|
11
|
-
background: var(--color-background-elevated);
|
|
12
|
-
}
|
|
13
|
-
.np-theme-personal .tw-modal .tw-modal-dialog {
|
|
9
|
+
box-shadow: none;
|
|
14
10
|
background: #ffffff;
|
|
15
11
|
background: var(--color-background-elevated);
|
|
16
|
-
box-shadow: none;
|
|
17
12
|
border-radius: 24px;
|
|
18
13
|
border-radius: var(--radius-large);
|
|
19
14
|
}
|
|
@@ -22,6 +17,7 @@
|
|
|
22
17
|
}
|
|
23
18
|
.tw-modal .tw-modal-content {
|
|
24
19
|
width: 100%;
|
|
20
|
+
background-color: transparent;
|
|
25
21
|
}
|
|
26
22
|
.tw-modal .tw-modal-content .tw-modal-body {
|
|
27
23
|
flex: 1;
|
|
@@ -30,25 +26,6 @@
|
|
|
30
26
|
.tw-modal .tw-modal-content .tw-modal-body--scrollable {
|
|
31
27
|
overflow-y: auto;
|
|
32
28
|
}
|
|
33
|
-
.tw-modal .tw-modal-content .tw-modal-header {
|
|
34
|
-
box-shadow: inset 0 -1px 0 0 #e2e6e8;
|
|
35
|
-
}
|
|
36
|
-
.np-theme-personal .tw-modal .tw-modal-content .tw-modal-header {
|
|
37
|
-
box-shadow: inset 0 -1px 0 0 rgba(14,15,12,0.12157);
|
|
38
|
-
box-shadow: inset 0 -1px 0 0 var(--color-border-neutral);
|
|
39
|
-
}
|
|
40
|
-
.np-theme-personal .tw-modal .tw-modal-content .tw-modal-header .np-close-button {
|
|
41
|
-
margin: calc(8px * -1) calc(8px * -1) calc(8px * -1) 0;
|
|
42
|
-
margin: calc(var(--size-8) * -1) calc(var(--size-8) * -1) calc(var(--size-8) * -1) 0;
|
|
43
|
-
}
|
|
44
|
-
.tw-modal .tw-modal-content .tw-modal-header.modal--withoutborder {
|
|
45
|
-
box-shadow: none;
|
|
46
|
-
}
|
|
47
|
-
.tw-modal .tw-modal-content .tw-modal-header .tw-icon {
|
|
48
|
-
fill: var(--color-content-accent);
|
|
49
|
-
cursor: pointer;
|
|
50
|
-
display: block;
|
|
51
|
-
}
|
|
52
29
|
.tw-modal .tw-modal-content .tw-modal-header,
|
|
53
30
|
.tw-modal .tw-modal-content .tw-modal-footer,
|
|
54
31
|
.tw-modal .tw-modal-content .tw-modal-body {
|
|
@@ -63,55 +40,16 @@
|
|
|
63
40
|
padding-top: var(--size-12);
|
|
64
41
|
padding-bottom: 12px;
|
|
65
42
|
padding-bottom: var(--size-12);
|
|
66
|
-
box-shadow: inset 0 1px 0 0 #e2e6e8;
|
|
67
|
-
}
|
|
68
|
-
.np-theme-personal .tw-modal .tw-modal-content .tw-modal-footer {
|
|
69
|
-
border-top: 1px solid rgba(14,15,12,0.12157);
|
|
70
|
-
border-top: 1px solid var(--color-border-neutral);
|
|
71
|
-
}
|
|
72
|
-
.np-theme-personal .tw-modal .tw-modal-content .tw-modal-footer,
|
|
73
|
-
.tw-modal .tw-modal-content .tw-modal-footer.modal--withoutborder {
|
|
74
|
-
box-shadow: none;
|
|
75
|
-
}
|
|
76
|
-
.tw-modal .tw-modal-content.tw-modal-no-title .tw-modal-body {
|
|
77
|
-
padding-top: 0 !important;
|
|
78
|
-
}
|
|
79
|
-
.tw-modal .tw-modal-content.tw-modal-no-title .tw-modal-header {
|
|
80
|
-
min-height: 32px;
|
|
81
|
-
min-height: var(--size-32);
|
|
82
|
-
padding-bottom: 4px !important;
|
|
83
|
-
}
|
|
84
|
-
.tw-modal .tw-modal-content .np-theme-personal {
|
|
85
|
-
background-color: transparent;
|
|
86
|
-
}
|
|
87
|
-
.tw-modal table,
|
|
88
|
-
.tw-modal .table {
|
|
89
|
-
background-color: transparent;
|
|
90
43
|
}
|
|
91
44
|
@media (min-width: 576px) {
|
|
92
45
|
.tw-modal .tw-modal-content .tw-modal-header,
|
|
93
|
-
.tw-modal .tw-modal-content .tw-modal-footer
|
|
94
|
-
.tw-modal .tw-modal-content .tw-modal-body {
|
|
95
|
-
padding: 32px 24px;
|
|
96
|
-
padding: var(--size-32) var(--size-24);
|
|
97
|
-
}
|
|
98
|
-
.np-theme-personal .tw-modal .tw-modal-content .tw-modal-header,
|
|
99
|
-
.np-theme-personal .tw-modal .tw-modal-content .tw-modal-footer,
|
|
100
|
-
.np-theme-personal .tw-modal .tw-modal-content .tw-modal-body {
|
|
46
|
+
.tw-modal .tw-modal-content .tw-modal-footer {
|
|
101
47
|
padding: 24px;
|
|
102
48
|
padding: var(--size-24);
|
|
103
49
|
}
|
|
104
|
-
.tw-modal .tw-modal-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
.tw-modal .tw-modal-compact .tw-modal-header,
|
|
109
|
-
.tw-modal .tw-modal-compact .tw-modal-footer,
|
|
110
|
-
.tw-modal .tw-modal-compact .tw-modal-body {
|
|
111
|
-
padding-top: 16px;
|
|
112
|
-
padding-top: var(--size-16);
|
|
113
|
-
padding-bottom: 16px;
|
|
114
|
-
padding-bottom: var(--size-16);
|
|
50
|
+
.tw-modal .tw-modal-content .tw-modal-body {
|
|
51
|
+
padding: 0 24px;
|
|
52
|
+
padding: 0 var(--size-24);
|
|
115
53
|
}
|
|
116
54
|
}
|
|
117
55
|
@media (min-width: 480px) {
|
package/src/modal/Modal.less
CHANGED
|
@@ -10,14 +10,9 @@
|
|
|
10
10
|
.tw-modal-dialog {
|
|
11
11
|
transition: transform 0.3s ease-out;
|
|
12
12
|
transform: translateY(-25%);
|
|
13
|
-
box-shadow:
|
|
13
|
+
box-shadow: none;
|
|
14
14
|
background: var(--color-background-elevated);
|
|
15
|
-
|
|
16
|
-
.np-theme-personal & {
|
|
17
|
-
background: var(--color-background-elevated);
|
|
18
|
-
box-shadow: none;
|
|
19
|
-
border-radius: var(--radius-large);
|
|
20
|
-
}
|
|
15
|
+
border-radius: var(--radius-large);
|
|
21
16
|
}
|
|
22
17
|
|
|
23
18
|
&.in {
|
|
@@ -28,6 +23,7 @@
|
|
|
28
23
|
|
|
29
24
|
.tw-modal-content {
|
|
30
25
|
width: 100%;
|
|
26
|
+
background-color: transparent;
|
|
31
27
|
|
|
32
28
|
.tw-modal-body {
|
|
33
29
|
flex: 1;
|
|
@@ -38,28 +34,6 @@
|
|
|
38
34
|
}
|
|
39
35
|
}
|
|
40
36
|
|
|
41
|
-
.tw-modal-header {
|
|
42
|
-
box-shadow: inset 0 -1px 0 0 rgb(226 230 232);
|
|
43
|
-
|
|
44
|
-
.np-theme-personal & {
|
|
45
|
-
box-shadow: inset 0 -1px 0 0 var(--color-border-neutral);
|
|
46
|
-
|
|
47
|
-
.np-close-button {
|
|
48
|
-
margin: calc(var(--size-8) * -1) calc(var(--size-8) * -1) calc(var(--size-8) * -1) 0;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&.modal--withoutborder {
|
|
53
|
-
box-shadow: none;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.tw-icon {
|
|
57
|
-
fill: var(--color-content-accent);
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
display: block;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
37
|
.tw-modal-header,
|
|
64
38
|
.tw-modal-footer,
|
|
65
39
|
.tw-modal-body {
|
|
@@ -73,63 +47,19 @@
|
|
|
73
47
|
.tw-modal-footer {
|
|
74
48
|
padding-top: var(--size-12);
|
|
75
49
|
padding-bottom: var(--size-12);
|
|
76
|
-
box-shadow: inset 0 1px 0 0 rgb(226 230 232);
|
|
77
|
-
|
|
78
|
-
.np-theme-personal & {
|
|
79
|
-
border-top: 1px solid var(--color-border-neutral);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.np-theme-personal &,
|
|
83
|
-
&.modal--withoutborder {
|
|
84
|
-
box-shadow: none;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&.tw-modal-no-title {
|
|
89
|
-
.tw-modal-body {
|
|
90
|
-
padding-top: 0 !important;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.tw-modal-header {
|
|
94
|
-
min-height: var(--size-32);
|
|
95
|
-
padding-bottom: 4px !important;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.np-theme-personal {
|
|
100
|
-
background-color: transparent;
|
|
101
50
|
}
|
|
102
51
|
}
|
|
103
|
-
|
|
104
|
-
table, .table {
|
|
105
|
-
background-color: transparent;
|
|
106
|
-
}
|
|
107
52
|
}
|
|
108
53
|
|
|
109
54
|
@media (--screen-sm) {
|
|
110
55
|
.tw-modal {
|
|
111
56
|
.tw-modal-content {
|
|
112
57
|
.tw-modal-header,
|
|
113
|
-
.tw-modal-footer
|
|
114
|
-
|
|
115
|
-
padding: var(--size-32) var(--size-24);
|
|
116
|
-
|
|
117
|
-
.np-theme-personal & {
|
|
118
|
-
padding: var(--size-24);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.tw-modal-compact {
|
|
124
|
-
.tw-modal-header {
|
|
125
|
-
min-height: calc(var(--size-8) * 7);
|
|
58
|
+
.tw-modal-footer {
|
|
59
|
+
padding: var(--size-24);
|
|
126
60
|
}
|
|
127
|
-
|
|
128
|
-
.tw-modal-header,
|
|
129
|
-
.tw-modal-footer,
|
|
130
61
|
.tw-modal-body {
|
|
131
|
-
padding
|
|
132
|
-
padding-bottom: var(--size-16);
|
|
62
|
+
padding: 0 var(--size-24);
|
|
133
63
|
}
|
|
134
64
|
}
|
|
135
65
|
}
|
package/src/modal/Modal.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { ReactNode, useContext, useId, useRef } from 'react';
|
|
3
3
|
import { CSSTransition } from 'react-transition-group';
|
|
4
|
+
import { useIntl } from 'react-intl';
|
|
4
5
|
|
|
5
6
|
import {
|
|
6
7
|
Size,
|
|
@@ -17,12 +18,14 @@ import {
|
|
|
17
18
|
ScrollViewport,
|
|
18
19
|
Typography,
|
|
19
20
|
} from '../common';
|
|
20
|
-
import { CloseButton } from '../common/closeButton';
|
|
21
21
|
import { useLayout } from '../common/hooks';
|
|
22
22
|
import Dimmer from '../dimmer';
|
|
23
23
|
import Drawer from '../drawer';
|
|
24
24
|
import { OverlayIdContext } from '../provider/overlay/OverlayIdProvider';
|
|
25
25
|
import Title from '../title/Title';
|
|
26
|
+
import { Cross } from '@transferwise/icons';
|
|
27
|
+
import IconButton from '../iconButton';
|
|
28
|
+
import closeBtnMessages from '../common/closeButton/CloseButton.messages';
|
|
26
29
|
|
|
27
30
|
const TRANSITION_DURATION_IN_MILLISECONDS = 150;
|
|
28
31
|
|
|
@@ -53,14 +56,9 @@ const Modal = ({
|
|
|
53
56
|
disableDimmerClickToClose = false,
|
|
54
57
|
...otherProps
|
|
55
58
|
}: ModalProps) => {
|
|
56
|
-
const
|
|
57
|
-
className?.split(' ').includes(classToCheck);
|
|
59
|
+
const intl = useIntl();
|
|
58
60
|
const { isMedium } = useLayout();
|
|
59
61
|
|
|
60
|
-
// These should be replaced with props in breaking change.
|
|
61
|
-
const isCompact = checkSpecialClasses('compact');
|
|
62
|
-
const noDivider = checkSpecialClasses('no-divider');
|
|
63
|
-
|
|
64
62
|
const contentReference = useRef<HTMLDivElement>(null);
|
|
65
63
|
const titleId = useId();
|
|
66
64
|
|
|
@@ -121,10 +119,6 @@ const Modal = ({
|
|
|
121
119
|
'd-flex',
|
|
122
120
|
'flex-column',
|
|
123
121
|
'justify-content-between',
|
|
124
|
-
{
|
|
125
|
-
'tw-modal-compact': isCompact,
|
|
126
|
-
'tw-modal-no-title': !title,
|
|
127
|
-
},
|
|
128
122
|
)}
|
|
129
123
|
>
|
|
130
124
|
<div
|
|
@@ -132,17 +126,23 @@ const Modal = ({
|
|
|
132
126
|
'tw-modal-header',
|
|
133
127
|
'd-flex',
|
|
134
128
|
'align-items-center',
|
|
135
|
-
'justify-content-between',
|
|
129
|
+
title ? 'justify-content-between' : 'justify-content-end',
|
|
136
130
|
'flex-wrap',
|
|
137
|
-
{
|
|
138
|
-
'modal--withoutborder': !title || noDivider,
|
|
139
|
-
},
|
|
140
131
|
)}
|
|
141
132
|
>
|
|
142
|
-
|
|
143
|
-
{title
|
|
144
|
-
|
|
145
|
-
|
|
133
|
+
{title && (
|
|
134
|
+
<Title id={titleId} type={Typography.TITLE_SUBSECTION} className="tw-modal-title">
|
|
135
|
+
{title}
|
|
136
|
+
</Title>
|
|
137
|
+
)}
|
|
138
|
+
<IconButton
|
|
139
|
+
size={40}
|
|
140
|
+
priority="tertiary"
|
|
141
|
+
aria-label={intl.formatMessage(closeBtnMessages.ariaLabel)}
|
|
142
|
+
onClick={onClose}
|
|
143
|
+
>
|
|
144
|
+
<Cross />
|
|
145
|
+
</IconButton>
|
|
146
146
|
</div>
|
|
147
147
|
<div
|
|
148
148
|
className={clsx('tw-modal-body', {
|
|
@@ -151,14 +151,14 @@ const Modal = ({
|
|
|
151
151
|
>
|
|
152
152
|
{body}
|
|
153
153
|
</div>
|
|
154
|
-
{footer
|
|
154
|
+
{footer ? (
|
|
155
155
|
<div
|
|
156
|
-
className={clsx('tw-modal-footer', 'd-flex', 'align-items-center', 'flex-wrap'
|
|
157
|
-
'modal--withoutborder': noDivider,
|
|
158
|
-
})}
|
|
156
|
+
className={clsx('tw-modal-footer', 'd-flex', 'align-items-center', 'flex-wrap')}
|
|
159
157
|
>
|
|
160
158
|
{footer}
|
|
161
159
|
</div>
|
|
160
|
+
) : (
|
|
161
|
+
<div className="m-t-3" />
|
|
162
162
|
)}
|
|
163
163
|
</div>
|
|
164
164
|
</div>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
padding-left: initial !important;
|
|
11
11
|
}
|
|
12
12
|
.tw-money-input .tw-money-input__fixed-currency .np-text-title-subsection {
|
|
13
|
-
color: #
|
|
13
|
+
color: #768e9c;
|
|
14
14
|
color: var(--color-content-tertiary);
|
|
15
15
|
font-weight: 600;
|
|
16
16
|
font-weight: var(--font-weight-semi-bold);
|
|
@@ -69,6 +69,6 @@
|
|
|
69
69
|
box-shadow: none;
|
|
70
70
|
}
|
|
71
71
|
.tw-money-input:not(.disabled):not(:disabled):not(.np-button-input:active):has(.np-button-input:focus-visible) {
|
|
72
|
-
box-shadow: inset 0 0 0 1px #
|
|
72
|
+
box-shadow: inset 0 0 0 1px #c9cbce !important;
|
|
73
73
|
box-shadow: inset 0 0 0 1px var(--color-interactive-secondary) !important;
|
|
74
74
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
mockMatchMedia,
|
|
3
|
+
mockRequestAnimationFrame,
|
|
4
|
+
mockResizeObserver,
|
|
5
|
+
render,
|
|
6
|
+
screen,
|
|
7
|
+
userEvent,
|
|
8
|
+
} from '../test-utils';
|
|
2
9
|
|
|
3
10
|
import { MoneyInput, CurrencyItem, CurrencyOptionItem, Field } from '..';
|
|
4
11
|
import { MoneyInputPropsWithInputAttributes } from './MoneyInput';
|
|
@@ -7,6 +14,7 @@ import messages from './MoneyInput.messages';
|
|
|
7
14
|
|
|
8
15
|
mockMatchMedia();
|
|
9
16
|
mockResizeObserver();
|
|
17
|
+
mockRequestAnimationFrame();
|
|
10
18
|
|
|
11
19
|
describe('Money Input', () => {
|
|
12
20
|
const popularCurrencies: CurrencyOptionItem[] = [
|
|
@@ -31,7 +31,7 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
31
31
|
background-color: var(--color-background-screen);
|
|
32
32
|
}
|
|
33
33
|
.np-theme-personal .np-navigation-option:not(.disabled):not(:disabled):hover .tw-avatar__content {
|
|
34
|
-
background-color: rgba(
|
|
34
|
+
background-color: rgba(134,167,189,0.10196);
|
|
35
35
|
background-color: var(--color-background-neutral);
|
|
36
36
|
}
|
|
37
37
|
.np-navigation-option .circle {
|
|
@@ -56,9 +56,11 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
56
56
|
}
|
|
57
57
|
.np-navigation-option__chevron:not(.disabled):not(:disabled):hover,
|
|
58
58
|
.np-navigation-option__chevron:not(.disabled):not(:disabled):focus {
|
|
59
|
+
color: #0084b3;
|
|
59
60
|
color: var(--color-content-accent-hover);
|
|
60
61
|
}
|
|
61
62
|
.np-navigation-option__chevron:not(.disabled):not(:disabled):active {
|
|
63
|
+
color: #0077a5;
|
|
62
64
|
color: var(--color-content-accent-active);
|
|
63
65
|
}
|
|
64
66
|
.np-theme-personal .np-option__container-aligned {
|
package/src/nudge/Nudge.css
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
--nudge-control-width: var(--size-24);
|
|
15
15
|
--nudge-control-background-color: var(--color-background-neutral);
|
|
16
16
|
align-items: stretch;
|
|
17
|
-
background-color: rgba(
|
|
17
|
+
background-color: rgba(134,167,189,0.10196);
|
|
18
18
|
background-color: var(--nudge-background-color);
|
|
19
19
|
border-radius: 16px;
|
|
20
20
|
border-radius: var(--nudge-border-radius);
|
|
@@ -5,12 +5,11 @@
|
|
|
5
5
|
max-width: 1164px;
|
|
6
6
|
}
|
|
7
7
|
.np-theme-personal .np-overlay-header {
|
|
8
|
-
border-bottom: 1px solid rgba(
|
|
8
|
+
border-bottom: 1px solid rgba(0,0,0,0.10196);
|
|
9
9
|
border-bottom: 1px solid var(--color-border-neutral);
|
|
10
10
|
}
|
|
11
11
|
.np-theme-personal--forest-green .np-overlay-header .np-flow-header__left path,
|
|
12
12
|
.np-theme-personal--bright-green .np-overlay-header .np-flow-header__left path,
|
|
13
13
|
.np-theme-personal--dark .np-overlay-header .np-flow-header__left path {
|
|
14
|
-
fill: #163300;
|
|
15
14
|
fill: var(--color-interactive-primary);
|
|
16
15
|
}
|
package/src/popover/Popover.css
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
border-radius: var(--radius-medium);
|
|
4
4
|
}
|
|
5
5
|
.np-popover__container .np-popover__content {
|
|
6
|
-
color: #
|
|
6
|
+
color: #5d7079;
|
|
7
7
|
color: var(--color-content-secondary);
|
|
8
8
|
font-size: 0.875rem;
|
|
9
9
|
font-size: var(--font-size-14);
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
24
24
|
margin: 0;
|
|
25
|
-
color: #
|
|
25
|
+
color: #37517e;
|
|
26
26
|
color: var(--color-content-primary);
|
|
27
27
|
line-height: 1.2;
|
|
28
28
|
line-height: var(--line-height-title);
|
|
@@ -6,27 +6,27 @@
|
|
|
6
6
|
height: var(--size-8);
|
|
7
7
|
}
|
|
8
8
|
.np-progress::-webkit-progress-bar {
|
|
9
|
-
background-color: rgba(
|
|
9
|
+
background-color: rgba(134,167,189,0.10196);
|
|
10
10
|
background-color: var(--color-background-neutral);
|
|
11
11
|
border-radius: 10px;
|
|
12
12
|
border-radius: var(--radius-small);
|
|
13
13
|
}
|
|
14
14
|
.np-progress::-webkit-progress-value {
|
|
15
|
+
background-color: #0097c7;
|
|
15
16
|
background-color: var(--color-content-accent);
|
|
16
17
|
border-radius: 10px;
|
|
17
18
|
border-radius: var(--radius-small);
|
|
18
19
|
}
|
|
19
20
|
.np-theme-personal .np-progress::-webkit-progress-value {
|
|
20
|
-
background-color: #163300;
|
|
21
21
|
background-color: var(--color-interactive-primary);
|
|
22
22
|
}
|
|
23
23
|
.np-progress::-moz-progress-bar {
|
|
24
|
+
background-color: #0097c7;
|
|
24
25
|
background-color: var(--color-content-accent);
|
|
25
26
|
border-radius: 10px;
|
|
26
27
|
border-radius: var(--radius-small);
|
|
27
28
|
}
|
|
28
29
|
.np-theme-personal .np-progress::-moz-progress-bar {
|
|
29
|
-
background-color: #163300;
|
|
30
30
|
background-color: var(--color-interactive-primary);
|
|
31
31
|
}
|
|
32
32
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
.np-progress-bar__title .h4 {
|
|
2
|
-
color: #
|
|
2
|
+
color: #37517e;
|
|
3
3
|
color: var(--color-content-primary);
|
|
4
4
|
margin-bottom: 4px;
|
|
5
5
|
margin-bottom: var(--size-4);
|
|
6
6
|
}
|
|
7
7
|
.np-progress-bar p {
|
|
8
|
-
color: #
|
|
8
|
+
color: #37517e;
|
|
9
9
|
color: var(--color-content-primary);
|
|
10
10
|
margin-top: 4px;
|
|
11
11
|
margin-top: var(--size-4);
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
right: calc(var(--size-24) * -1);
|
|
33
33
|
}
|
|
34
34
|
.np-Card-description {
|
|
35
|
-
color: #
|
|
35
|
+
color: #5d7079;
|
|
36
36
|
color: var(--color-content-secondary);
|
|
37
37
|
}
|
|
38
38
|
.np-Card-indicator {
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
outline: none;
|
|
122
122
|
}
|
|
123
123
|
.np-Card--link .np-Card-titleLink {
|
|
124
|
-
color: #
|
|
124
|
+
color: #37517e;
|
|
125
125
|
color: var(--color-content-primary);
|
|
126
126
|
-webkit-text-decoration: none;
|
|
127
127
|
text-decoration: none;
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
z-index: 10;
|
|
141
141
|
}
|
|
142
142
|
.np-Card--checked.is-checked {
|
|
143
|
-
box-shadow: 0 0 0 4px
|
|
143
|
+
box-shadow: 0 0 0 4px var(--color-interactive-primary);
|
|
144
144
|
box-shadow: 0 0 0 var(--size-4) var(--color-interactive-primary);
|
|
145
145
|
}
|
|
146
146
|
.np-Card--checked.is-checked .np-Card-check {
|
|
@@ -44,85 +44,66 @@
|
|
|
44
44
|
}
|
|
45
45
|
.wds-inline-prompt__media-wrapper .tw-icon-tags,
|
|
46
46
|
.wds-inline-prompt__media-wrapper .tw-icon-confetti {
|
|
47
|
-
color: #054d28;
|
|
48
47
|
color: var(--color-sentiment-positive-primary);
|
|
49
48
|
}
|
|
50
49
|
.wds-inline-prompt--negative {
|
|
51
|
-
background-color: #fbeaea;
|
|
52
50
|
background-color: var(--color-sentiment-negative-secondary);
|
|
53
|
-
color: #cb272f;
|
|
54
51
|
color: var(--color-sentiment-negative-primary);
|
|
55
52
|
}
|
|
56
53
|
.wds-inline-prompt--negative a,
|
|
57
54
|
.wds-inline-prompt--negative button {
|
|
58
|
-
color: #cb272f;
|
|
59
55
|
color: var(--color-sentiment-negative-primary);
|
|
60
56
|
}
|
|
61
57
|
.wds-inline-prompt--negative a:hover,
|
|
62
58
|
.wds-inline-prompt--negative button:hover {
|
|
63
|
-
color: #b8232b;
|
|
64
59
|
color: var(--color-sentiment-negative-primary-hover);
|
|
65
60
|
}
|
|
66
61
|
.wds-inline-prompt--negative a:active,
|
|
67
62
|
.wds-inline-prompt--negative button:active {
|
|
68
|
-
color: #a72027;
|
|
69
63
|
color: var(--color-sentiment-negative-primary-active);
|
|
70
64
|
}
|
|
71
65
|
.wds-inline-prompt.wds-inline-prompt--negative:has(a, button):hover {
|
|
72
|
-
background-color: #f9e1e1;
|
|
73
66
|
background-color: var(--color-sentiment-negative-secondary-hover);
|
|
74
67
|
}
|
|
75
68
|
.wds-inline-prompt.wds-inline-prompt--negative:has(a, button):active {
|
|
76
|
-
background-color: #f8d8d8;
|
|
77
69
|
background-color: var(--color-sentiment-negative-secondary-active);
|
|
78
70
|
}
|
|
79
71
|
.wds-inline-prompt--positive {
|
|
80
|
-
background-color: #e2f6d5;
|
|
81
72
|
background-color: var(--color-sentiment-positive-secondary);
|
|
82
|
-
color: #054d28;
|
|
83
73
|
color: var(--color-sentiment-positive-primary);
|
|
84
74
|
}
|
|
85
75
|
.wds-inline-prompt--positive a,
|
|
86
76
|
.wds-inline-prompt--positive button {
|
|
87
|
-
color: #054d28;
|
|
88
77
|
color: var(--color-sentiment-positive-primary);
|
|
89
78
|
}
|
|
90
79
|
.wds-inline-prompt--positive a:hover,
|
|
91
80
|
.wds-inline-prompt--positive button:hover {
|
|
92
|
-
color: #043a1e;
|
|
93
81
|
color: var(--color-sentiment-positive-primary-hover);
|
|
94
82
|
}
|
|
95
83
|
.wds-inline-prompt--positive a:active,
|
|
96
84
|
.wds-inline-prompt--positive button:active {
|
|
97
|
-
color: #022614;
|
|
98
85
|
color: var(--color-sentiment-positive-primary-active);
|
|
99
86
|
}
|
|
100
87
|
.wds-inline-prompt.wds-inline-prompt--positive:has(a, button):hover {
|
|
101
|
-
background-color: #d3f2c0;
|
|
102
88
|
background-color: var(--color-sentiment-positive-secondary-hover);
|
|
103
89
|
}
|
|
104
90
|
.wds-inline-prompt.wds-inline-prompt--positive:has(a, button):active {
|
|
105
|
-
background-color: #c5edab;
|
|
106
91
|
background-color: var(--color-sentiment-positive-secondary-active);
|
|
107
92
|
}
|
|
108
93
|
.wds-inline-prompt--proposition {
|
|
109
94
|
background-color: #D2F9F7;
|
|
110
|
-
color: #163300;
|
|
111
95
|
color: var(--color-interactive-primary);
|
|
112
96
|
}
|
|
113
97
|
.wds-inline-prompt--proposition a,
|
|
114
98
|
.wds-inline-prompt--proposition button {
|
|
115
|
-
color: #163300;
|
|
116
99
|
color: var(--color-interactive-primary);
|
|
117
100
|
}
|
|
118
101
|
.wds-inline-prompt--proposition a:hover,
|
|
119
102
|
.wds-inline-prompt--proposition button:hover {
|
|
120
|
-
color: #0d1f00;
|
|
121
103
|
color: var(--color-interactive-primary-hover);
|
|
122
104
|
}
|
|
123
105
|
.wds-inline-prompt--proposition a:active,
|
|
124
106
|
.wds-inline-prompt--proposition button:active {
|
|
125
|
-
color: #0e0f0c;
|
|
126
107
|
color: var(--color-interactive-primary-active);
|
|
127
108
|
}
|
|
128
109
|
.wds-inline-prompt.wds-inline-prompt--proposition:has(a, button):hover {
|
|
@@ -132,58 +113,41 @@
|
|
|
132
113
|
background-color: #91F0EE;
|
|
133
114
|
}
|
|
134
115
|
.wds-inline-prompt--neutral {
|
|
135
|
-
background-color: rgba(
|
|
116
|
+
background-color: rgba(134,167,189,0.10196);
|
|
136
117
|
background-color: var(--color-background-neutral);
|
|
137
|
-
color: #
|
|
118
|
+
color: #37517e;
|
|
138
119
|
color: var(--color-content-primary);
|
|
139
120
|
}
|
|
140
121
|
.wds-inline-prompt--neutral a,
|
|
141
122
|
.wds-inline-prompt--neutral button {
|
|
142
|
-
color: #
|
|
123
|
+
color: #37517e;
|
|
143
124
|
color: var(--color-content-primary);
|
|
144
125
|
}
|
|
145
126
|
.wds-inline-prompt.wds-inline-prompt--neutral:has(a, button):hover {
|
|
146
|
-
background-color: rgba(22,51,0,0.12941);
|
|
147
127
|
background-color: var(--color-background-neutral-hover);
|
|
148
128
|
}
|
|
149
129
|
.wds-inline-prompt.wds-inline-prompt--neutral:has(a, button):active {
|
|
150
|
-
background-color: rgba(22,51,0,0.18039);
|
|
151
130
|
background-color: var(--color-background-neutral-active);
|
|
152
131
|
}
|
|
153
132
|
.wds-inline-prompt--warning {
|
|
154
|
-
background-color: #fff7d7;
|
|
155
133
|
background-color: var(--color-sentiment-warning-secondary);
|
|
156
|
-
color: #4a3b1c;
|
|
157
134
|
color: var(--color-sentiment-warning-content);
|
|
158
135
|
}
|
|
159
136
|
.wds-inline-prompt--warning a,
|
|
160
137
|
.wds-inline-prompt--warning button {
|
|
161
|
-
color: #4a3b1c;
|
|
162
138
|
color: var(--color-sentiment-warning-content);
|
|
163
139
|
}
|
|
164
140
|
.wds-inline-prompt--warning a:hover,
|
|
165
141
|
.wds-inline-prompt--warning button:hover {
|
|
166
|
-
color: #3b2f16;
|
|
167
142
|
color: var(--color-sentiment-warning-content-hover);
|
|
168
143
|
}
|
|
169
144
|
.wds-inline-prompt--warning a:active,
|
|
170
145
|
.wds-inline-prompt--warning button:active {
|
|
171
|
-
color: #2c2311;
|
|
172
146
|
color: var(--color-sentiment-warning-content-active);
|
|
173
147
|
}
|
|
174
|
-
.wds-inline-prompt.wds-inline-prompt--warning:has(a, button):hover {
|
|
175
|
-
background-color: rgb(255, 244, 200);
|
|
176
|
-
}
|
|
177
|
-
@supports (color: color-mix(in lch, red, blue)) {
|
|
178
148
|
.wds-inline-prompt.wds-inline-prompt--warning:has(a, button):hover {
|
|
179
149
|
background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 92%, var(--color-sentiment-warning-primary));
|
|
180
150
|
}
|
|
181
|
-
}
|
|
182
|
-
.wds-inline-prompt.wds-inline-prompt--warning:has(a, button):active {
|
|
183
|
-
background-color: rgb(255, 241, 185);
|
|
184
|
-
}
|
|
185
|
-
@supports (color: color-mix(in lch, red, blue)) {
|
|
186
151
|
.wds-inline-prompt.wds-inline-prompt--warning:has(a, button):active {
|
|
187
152
|
background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 84%, var(--color-sentiment-warning-primary));
|
|
188
153
|
}
|
|
189
|
-
}
|