@transferwise/components 0.0.0-experimental-6fa7ff3 → 0.0.0-experimental-f341b41
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/avatarView/AvatarView.js +1 -12
- package/build/avatarView/AvatarView.js.map +1 -1
- package/build/avatarView/AvatarView.mjs +1 -12
- package/build/avatarView/AvatarView.mjs.map +1 -1
- package/build/circularButton/CircularButton.js +21 -18
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +22 -19
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/definitionList/DefinitionList.js.map +1 -1
- package/build/definitionList/DefinitionList.mjs.map +1 -1
- package/build/i18n/de.json +0 -1
- package/build/i18n/de.json.js +0 -1
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/de.json.mjs +0 -1
- package/build/i18n/de.json.mjs.map +1 -1
- package/build/i18n/it.json +0 -1
- package/build/i18n/it.json.js +0 -1
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/it.json.mjs +0 -1
- package/build/i18n/it.json.mjs.map +1 -1
- package/build/i18n/th.json +0 -1
- package/build/i18n/th.json.js +0 -1
- package/build/i18n/th.json.js.map +1 -1
- package/build/i18n/th.json.mjs +0 -1
- package/build/i18n/th.json.mjs.map +1 -1
- package/build/main.css +180 -47
- package/build/styles/button/Button.css +22 -30
- package/build/styles/button/Button.vars.css +1 -18
- package/build/styles/circularButton/CircularButton.css +158 -17
- package/build/styles/main.css +180 -47
- package/build/types/avatarView/AvatarView.d.ts.map +1 -1
- package/build/types/circularButton/CircularButton.d.ts +4 -11
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/definitionList/DefinitionList.d.ts +2 -1
- package/build/types/definitionList/DefinitionList.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/avatarView/AvatarView.tsx +1 -15
- package/src/button/Button.css +22 -30
- package/src/button/Button.less +30 -6
- package/src/button/Button.vars.css +1 -18
- package/src/button/Button.vars.less +1 -24
- package/src/circularButton/CircularButton.css +158 -17
- package/src/circularButton/CircularButton.less +91 -22
- package/src/circularButton/CircularButton.story.tsx +24 -45
- package/src/circularButton/CircularButton.tsx +25 -38
- package/src/circularButton/_button-label-states.less +34 -0
- package/src/dateInput/DateInput.spec.tsx +26 -45
- package/src/definitionList/DefinitionList.spec.js +91 -0
- package/src/definitionList/DefinitionList.story.tsx +57 -57
- package/src/definitionList/DefinitionList.tsx +1 -1
- package/src/i18n/de.json +0 -1
- package/src/i18n/it.json +0 -1
- package/src/i18n/th.json +0 -1
- package/src/iconButton/IconButton.story.tsx +6 -6
- package/src/main.css +180 -47
- package/src/slidingPanel/SlidingPanel.spec.js +56 -0
- package/src/slidingPanel/SlidingPanel.spec.tsx +0 -69
package/src/button/Button.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
.wds-Button {
|
|
2
2
|
--Button-background: var(--color-interactive-accent);
|
|
3
3
|
--Button-background-hover: var(--color-interactive-accent-hover);
|
|
4
4
|
--Button-background-active: var(--color-interactive-accent-active);
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
--Button-size-small-padding: 5px var(--size-12);
|
|
9
9
|
--Button-size-medium-padding: var(--size-8) var(--size-12);
|
|
10
10
|
--Button-size-large-padding: var(--size-12) var(--size-16);
|
|
11
|
-
--Button-avatar-border-color: var(--color-border-neutral);
|
|
12
11
|
--Button-transition-duration: 150ms;
|
|
13
12
|
--Button-transition-easing: ease-in-out;
|
|
14
13
|
--Button-secondary-background: var(--color-interactive-neutral);
|
|
@@ -27,31 +26,15 @@
|
|
|
27
26
|
--Button-primary-negative-background-hover: var(--color-sentiment-negative-primary-hover);
|
|
28
27
|
--Button-primary-negative-background-active: var(--color-sentiment-negative-primary-active);
|
|
29
28
|
--Button-primary-negative-color: var(--color-contrast);
|
|
30
|
-
--Button-primary-netative-avatar-border-color: rgba(255,255,255,0.2);
|
|
31
29
|
--Button-secondary-negative-background: var(--color-sentiment-negative-secondary);
|
|
32
30
|
--Button-secondary-negative-background-hover: var(--color-sentiment-negative-secondary-hover);
|
|
33
31
|
--Button-secondary-negative-background-active: var(--color-sentiment-negative-secondary-active);
|
|
34
32
|
--Button-secondary-negative-color: var(--color-sentiment-negative-primary);
|
|
35
|
-
--Button-secondary-netative-avatar-border-color: rgba(168,32,13,0.12157);
|
|
36
|
-
}
|
|
37
|
-
.np-theme-personal--dark .wds-Button {
|
|
38
|
-
--Button-primary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
39
|
-
}
|
|
40
|
-
.np-theme-personal--forest-green .wds-Button {
|
|
41
|
-
--color-interactive-neutral: rgba(159,232,112,0.2);
|
|
42
|
-
--color-interactive-neutral-hover: rgba(205,255,173,0.2);
|
|
43
|
-
--color-interactive-neutral-active: rgba(236,255,224,0.2);
|
|
44
|
-
--color-sentiment-negative-secondary: rgba(255,196,194,0.2);
|
|
45
|
-
--color-sentiment-negative-secondary-hover: rgba(255,220,219,0.2);
|
|
46
|
-
--color-sentiment-negative-secondary-active: rgba(255,235,235,0.2);
|
|
47
|
-
--Button-primary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
48
|
-
--Button-secondary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
49
33
|
}
|
|
50
34
|
.np-theme-personal--bright-green .wds-Button {
|
|
51
35
|
--color-contrast: #FFFFFF;
|
|
52
36
|
--Button-secondary-color: var(--color-interactive-control);
|
|
53
37
|
--Button-secondary-negative-color: var(--color-contrast);
|
|
54
|
-
--Button-secondary-netative-avatar-border-color: var(--Button-primary-netative-avatar-border-color);
|
|
55
38
|
}
|
|
56
39
|
/* Button Styles */
|
|
57
40
|
.wds-Button {
|
|
@@ -69,16 +52,12 @@
|
|
|
69
52
|
-webkit-appearance: none;
|
|
70
53
|
-moz-appearance: none;
|
|
71
54
|
appearance: none;
|
|
72
|
-
background-color: #00a2dd;
|
|
73
55
|
background-color: var(--Button-background);
|
|
74
56
|
border: none;
|
|
75
|
-
border-radius: 9999px;
|
|
76
57
|
border-radius: var(--Button-border-radius);
|
|
77
58
|
color: var(--Button-color);
|
|
78
59
|
cursor: pointer;
|
|
79
|
-
padding: 8px 12px;
|
|
80
60
|
padding: var(--Button-padding);
|
|
81
|
-
transition: color, background-color 150ms ease-in-out;
|
|
82
61
|
transition: color, background-color var(--Button-transition-duration) var(--Button-transition-easing);
|
|
83
62
|
}
|
|
84
63
|
.wds-Button:focus {
|
|
@@ -86,13 +65,11 @@
|
|
|
86
65
|
text-decoration: none;
|
|
87
66
|
}
|
|
88
67
|
.wds-Button:hover {
|
|
89
|
-
background-color: #008fc9;
|
|
90
68
|
background-color: var(--Button-background-hover);
|
|
91
69
|
-webkit-text-decoration: none;
|
|
92
70
|
text-decoration: none;
|
|
93
71
|
}
|
|
94
72
|
.wds-Button:active {
|
|
95
|
-
background-color: #0081ba;
|
|
96
73
|
background-color: var(--Button-background-active);
|
|
97
74
|
-webkit-text-decoration: none;
|
|
98
75
|
text-decoration: none;
|
|
@@ -107,7 +84,6 @@
|
|
|
107
84
|
.wds-Button:disabled:hover,
|
|
108
85
|
.wds-Button.wds-Button--disabled:active,
|
|
109
86
|
.wds-Button:disabled:active {
|
|
110
|
-
background-color: #00a2dd;
|
|
111
87
|
background-color: var(--Button-background);
|
|
112
88
|
}
|
|
113
89
|
.wds-Button--secondary {
|
|
@@ -145,14 +121,12 @@
|
|
|
145
121
|
--Button-background-hover: var(--Button-primary-negative-background-hover);
|
|
146
122
|
--Button-background-active: var(--Button-primary-negative-background-active);
|
|
147
123
|
--Button-color: var(--Button-primary-negative-color);
|
|
148
|
-
--Button-avatar-border-color: var(--Button-primary-netative-avatar-border-color);
|
|
149
124
|
}
|
|
150
125
|
.wds-Button--negative.wds-Button--secondary {
|
|
151
126
|
--Button-background: var(--Button-secondary-negative-background);
|
|
152
127
|
--Button-background-hover: var(--Button-secondary-negative-background-hover);
|
|
153
128
|
--Button-background-active: var(--Button-secondary-negative-background-active);
|
|
154
129
|
--Button-color: var(--Button-secondary-negative-color);
|
|
155
|
-
--Button-avatar-border-color: var(--Button-secondary-netative-avatar-border-color);
|
|
156
130
|
}
|
|
157
131
|
.wds-Button--small {
|
|
158
132
|
--Button-padding: var(--Button-size-small-padding);
|
|
@@ -185,9 +159,6 @@
|
|
|
185
159
|
margin-right: 0;
|
|
186
160
|
margin-left: 5px;
|
|
187
161
|
}
|
|
188
|
-
.wds-Button-avatars .np-circle {
|
|
189
|
-
--circle-border-color: var(--Button-avatar-border-color);
|
|
190
|
-
}
|
|
191
162
|
.wds-Button-avatars .np-avatar-view .np-avatar-view-content {
|
|
192
163
|
color: var(--Button-color);
|
|
193
164
|
}
|
|
@@ -245,3 +216,24 @@
|
|
|
245
216
|
[dir="rtl"] .wds-Button .tw-icon-chevron-left,[dir="rtl"] .wds-Button .tw-icon-arrow-left {
|
|
246
217
|
transform: rotate(180deg);
|
|
247
218
|
}
|
|
219
|
+
/* Avatar border transparency */
|
|
220
|
+
/* dark buttons get 20% transparency, light buttons get 12% */
|
|
221
|
+
.wds-Button-avatars .np-circle {
|
|
222
|
+
--circle-border-color: color-mix(in srgb, var(--Button-color) 20%, transparent);
|
|
223
|
+
}
|
|
224
|
+
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--forest-green):not(.np-theme-personal--bright-green) .wds-Button--secondary.wds-Button--negative .wds-Button-avatars .np-circle,
|
|
225
|
+
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--forest-green):not(.np-theme-personal--bright-green) .wds-Button--secondary .wds-Button-avatars .np-circle,
|
|
226
|
+
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--forest-green):not(.np-theme-personal--bright-green) .wds-Button--tertiary .wds-Button-avatars .np-circle,
|
|
227
|
+
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--forest-green):not(.np-theme-personal--bright-green) .wds-Button--minimal .wds-Button-avatars .np-circle {
|
|
228
|
+
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
229
|
+
}
|
|
230
|
+
.np-theme-personal--dark .wds-Button--primary .wds-Button-avatars .np-circle,
|
|
231
|
+
.np-theme-personal--dark .wds-Button--primary.wds-Button--negative .wds-Button-avatars .np-circle,
|
|
232
|
+
.np-theme-personal--forest-green .wds-Button--primary .wds-Button-avatars .np-circle,
|
|
233
|
+
.np-theme-personal--forest-green .wds-Button--primary.wds-Button--negative .wds-Button-avatars .np-circle {
|
|
234
|
+
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
235
|
+
}
|
|
236
|
+
.np-theme-personal--bright-green .wds-Button--tertiary .wds-Button-avatars .np-circle,
|
|
237
|
+
.np-theme-personal--bright-green .wds-Button--minimal .wds-Button-avatars .np-circle {
|
|
238
|
+
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
239
|
+
}
|
package/src/button/Button.less
CHANGED
|
@@ -90,7 +90,6 @@
|
|
|
90
90
|
--Button-background-hover: var(--Button-primary-negative-background-hover);
|
|
91
91
|
--Button-background-active: var(--Button-primary-negative-background-active);
|
|
92
92
|
--Button-color: var(--Button-primary-negative-color);
|
|
93
|
-
--Button-avatar-border-color: var(--Button-primary-netative-avatar-border-color);
|
|
94
93
|
}
|
|
95
94
|
|
|
96
95
|
&.wds-Button--secondary {
|
|
@@ -98,7 +97,6 @@
|
|
|
98
97
|
--Button-background-hover: var(--Button-secondary-negative-background-hover);
|
|
99
98
|
--Button-background-active: var(--Button-secondary-negative-background-active);
|
|
100
99
|
--Button-color: var(--Button-secondary-negative-color);
|
|
101
|
-
--Button-avatar-border-color: var(--Button-secondary-netative-avatar-border-color);
|
|
102
100
|
}
|
|
103
101
|
}
|
|
104
102
|
|
|
@@ -138,10 +136,6 @@
|
|
|
138
136
|
margin-left: 5px;
|
|
139
137
|
}
|
|
140
138
|
|
|
141
|
-
.np-circle {
|
|
142
|
-
--circle-border-color: var(--Button-avatar-border-color);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
139
|
.np-avatar-view .np-avatar-view-content {
|
|
146
140
|
color: var(--Button-color);
|
|
147
141
|
}
|
|
@@ -216,3 +210,33 @@
|
|
|
216
210
|
}
|
|
217
211
|
}
|
|
218
212
|
}
|
|
213
|
+
|
|
214
|
+
/* Avatar border transparency */
|
|
215
|
+
/* dark buttons get 20% transparency, light buttons get 12% */
|
|
216
|
+
.wds-Button-avatars {
|
|
217
|
+
.np-circle {
|
|
218
|
+
--circle-border-color: color-mix(in srgb, var(--Button-color) 20%, transparent);
|
|
219
|
+
|
|
220
|
+
.wds-Button--secondary.wds-Button--negative &,
|
|
221
|
+
.wds-Button--secondary &,
|
|
222
|
+
.wds-Button--tertiary &,
|
|
223
|
+
.wds-Button--minimal & {
|
|
224
|
+
.np-theme-personal:not(.np-theme-personal--dark, .np-theme-personal--forest-green, .np-theme-personal--bright-green) & {
|
|
225
|
+
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
.wds-Button--primary &,
|
|
229
|
+
.wds-Button--primary.wds-Button--negative & {
|
|
230
|
+
.np-theme-personal--dark &,
|
|
231
|
+
.np-theme-personal--forest-green & {
|
|
232
|
+
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
.wds-Button--tertiary &,
|
|
236
|
+
.wds-Button--minimal & {
|
|
237
|
+
.np-theme-personal--bright-green & {
|
|
238
|
+
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
.wds-Button {
|
|
2
2
|
--Button-background: var(--color-interactive-accent);
|
|
3
3
|
--Button-background-hover: var(--color-interactive-accent-hover);
|
|
4
4
|
--Button-background-active: var(--color-interactive-accent-active);
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
--Button-size-small-padding: 5px var(--size-12);
|
|
9
9
|
--Button-size-medium-padding: var(--size-8) var(--size-12);
|
|
10
10
|
--Button-size-large-padding: var(--size-12) var(--size-16);
|
|
11
|
-
--Button-avatar-border-color: var(--color-border-neutral);
|
|
12
11
|
--Button-transition-duration: 150ms;
|
|
13
12
|
--Button-transition-easing: ease-in-out;
|
|
14
13
|
--Button-secondary-background: var(--color-interactive-neutral);
|
|
@@ -27,29 +26,13 @@
|
|
|
27
26
|
--Button-primary-negative-background-hover: var(--color-sentiment-negative-primary-hover);
|
|
28
27
|
--Button-primary-negative-background-active: var(--color-sentiment-negative-primary-active);
|
|
29
28
|
--Button-primary-negative-color: var(--color-contrast);
|
|
30
|
-
--Button-primary-netative-avatar-border-color: rgba(255,255,255,0.2);
|
|
31
29
|
--Button-secondary-negative-background: var(--color-sentiment-negative-secondary);
|
|
32
30
|
--Button-secondary-negative-background-hover: var(--color-sentiment-negative-secondary-hover);
|
|
33
31
|
--Button-secondary-negative-background-active: var(--color-sentiment-negative-secondary-active);
|
|
34
32
|
--Button-secondary-negative-color: var(--color-sentiment-negative-primary);
|
|
35
|
-
--Button-secondary-netative-avatar-border-color: rgba(168,32,13,0.12157);
|
|
36
|
-
}
|
|
37
|
-
.np-theme-personal--dark .wds-Button {
|
|
38
|
-
--Button-primary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
39
|
-
}
|
|
40
|
-
.np-theme-personal--forest-green .wds-Button {
|
|
41
|
-
--color-interactive-neutral: rgba(159,232,112,0.2);
|
|
42
|
-
--color-interactive-neutral-hover: rgba(205,255,173,0.2);
|
|
43
|
-
--color-interactive-neutral-active: rgba(236,255,224,0.2);
|
|
44
|
-
--color-sentiment-negative-secondary: rgba(255,196,194,0.2);
|
|
45
|
-
--color-sentiment-negative-secondary-hover: rgba(255,220,219,0.2);
|
|
46
|
-
--color-sentiment-negative-secondary-active: rgba(255,235,235,0.2);
|
|
47
|
-
--Button-primary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
48
|
-
--Button-secondary-netative-avatar-border-color: rgba(14,15,12,0.12157);
|
|
49
33
|
}
|
|
50
34
|
.np-theme-personal--bright-green .wds-Button {
|
|
51
35
|
--color-contrast: #FFFFFF;
|
|
52
36
|
--Button-secondary-color: var(--color-interactive-control);
|
|
53
37
|
--Button-secondary-negative-color: var(--color-contrast);
|
|
54
|
-
--Button-secondary-netative-avatar-border-color: var(--Button-primary-netative-avatar-border-color);
|
|
55
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
.wds-Button {
|
|
2
2
|
--Button-background: var(--color-interactive-accent);
|
|
3
3
|
--Button-background-hover: var(--color-interactive-accent-hover);
|
|
4
4
|
--Button-background-active: var(--color-interactive-accent-active);
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
--Button-size-small-padding: 5px var(--size-12);
|
|
9
9
|
--Button-size-medium-padding: var(--size-8) var(--size-12);
|
|
10
10
|
--Button-size-large-padding: var(--size-12) var(--size-16);
|
|
11
|
-
--Button-avatar-border-color: var(--color-border-neutral);
|
|
12
11
|
--Button-transition-duration: 150ms;
|
|
13
12
|
--Button-transition-easing: ease-in-out;
|
|
14
13
|
|
|
@@ -31,32 +30,11 @@
|
|
|
31
30
|
--Button-primary-negative-background-hover: var(--color-sentiment-negative-primary-hover);
|
|
32
31
|
--Button-primary-negative-background-active: var(--color-sentiment-negative-primary-active);
|
|
33
32
|
--Button-primary-negative-color: var(--color-contrast);
|
|
34
|
-
--Button-primary-netative-avatar-border-color: #FFFFFF33;
|
|
35
33
|
|
|
36
34
|
--Button-secondary-negative-background: var(--color-sentiment-negative-secondary);
|
|
37
35
|
--Button-secondary-negative-background-hover: var(--color-sentiment-negative-secondary-hover);
|
|
38
36
|
--Button-secondary-negative-background-active: var(--color-sentiment-negative-secondary-active);
|
|
39
37
|
--Button-secondary-negative-color: var(--color-sentiment-negative-primary);
|
|
40
|
-
--Button-secondary-netative-avatar-border-color: #A8200D1F;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.np-theme-personal--dark {
|
|
44
|
-
.wds-Button {
|
|
45
|
-
--Button-primary-netative-avatar-border-color: #0E0F0C1F;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.np-theme-personal--forest-green {
|
|
50
|
-
.wds-Button {
|
|
51
|
-
--color-interactive-neutral: #9FE87033;
|
|
52
|
-
--color-interactive-neutral-hover: #CDFFAD33;
|
|
53
|
-
--color-interactive-neutral-active: #ECFFE033;
|
|
54
|
-
--color-sentiment-negative-secondary: #FFC4C233;
|
|
55
|
-
--color-sentiment-negative-secondary-hover: #FFDCDB33;
|
|
56
|
-
--color-sentiment-negative-secondary-active: #FFEBEB33;
|
|
57
|
-
--Button-primary-netative-avatar-border-color: #0E0F0C1F;
|
|
58
|
-
--Button-secondary-netative-avatar-border-color: #0E0F0C1F;
|
|
59
|
-
}
|
|
60
38
|
}
|
|
61
39
|
|
|
62
40
|
.np-theme-personal--bright-green {
|
|
@@ -64,6 +42,5 @@
|
|
|
64
42
|
--color-contrast: #FFFFFF;
|
|
65
43
|
--Button-secondary-color: var(--color-interactive-control);
|
|
66
44
|
--Button-secondary-negative-color: var(--color-contrast);
|
|
67
|
-
--Button-secondary-netative-avatar-border-color: var(--Button-primary-netative-avatar-border-color);
|
|
68
45
|
}
|
|
69
46
|
}
|
|
@@ -2,32 +2,173 @@
|
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: center;
|
|
5
|
+
text-align: center;
|
|
5
6
|
cursor: pointer;
|
|
7
|
+
position: relative;
|
|
6
8
|
}
|
|
7
|
-
.np-circular-btn
|
|
8
|
-
|
|
9
|
+
.np-circular-btn .tw-icon {
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 16px;
|
|
12
|
+
top: var(--size-16);
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
color: white;
|
|
15
|
+
transition: color 0.15s ease-in-out;
|
|
16
|
+
width: 100%;
|
|
17
|
+
left: 0;
|
|
18
|
+
}
|
|
19
|
+
[dir="rtl"] .np-circular-btn .tw-icon {
|
|
20
|
+
right: 0;
|
|
21
|
+
left: auto;
|
|
22
|
+
left: initial;
|
|
23
|
+
}
|
|
24
|
+
@media (max-width: 320px) {
|
|
25
|
+
.np-circular-btn .tw-icon {
|
|
26
|
+
top: 12px;
|
|
27
|
+
top: var(--size-12);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
.np-circular-btn .tw-icon > svg {
|
|
31
|
+
margin: 0 auto;
|
|
32
|
+
}
|
|
33
|
+
.np-theme-personal .np-circular-btn {
|
|
34
|
+
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
35
|
+
}
|
|
36
|
+
.np-theme-personal .np-circular-btn .tw-icon,
|
|
37
|
+
.np-theme-personal .np-circular-btn .tw-icon:hover,
|
|
38
|
+
.np-theme-personal .np-circular-btn .tw-icon:active {
|
|
39
|
+
color: var(--color-interactive-control);
|
|
40
|
+
}
|
|
41
|
+
.np-theme-personal .np-circular-btn.negative .tw-icon,
|
|
42
|
+
.np-theme-personal .np-circular-btn.negative.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
43
|
+
.np-theme-personal .np-circular-btn.negative.secondary:not(.disabled):not(:disabled):active .tw-icon {
|
|
44
|
+
color: var(--color-contrast) !important;
|
|
45
|
+
}
|
|
46
|
+
.np-theme-personal .np-circular-btn.negative.secondary:not(.disabled):not(:disabled) .tw-icon {
|
|
47
|
+
color: var(--color-sentiment-negative) !important;
|
|
48
|
+
}
|
|
49
|
+
.np-circular-btn.accent .np-circular-btn__label {
|
|
50
|
+
color: #00a2dd;
|
|
51
|
+
color: var(--color-interactive-accent);
|
|
52
|
+
}
|
|
53
|
+
.np-circular-btn.accent:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
54
|
+
color: #008fc9;
|
|
55
|
+
color: var(--color-interactive-accent-hover);
|
|
56
|
+
}
|
|
57
|
+
.np-circular-btn.accent:active .np-circular-btn__label,
|
|
58
|
+
.np-circular-btn.accent input[type="button"]:active ~ .np-circular-btn__label {
|
|
59
|
+
color: #0081ba;
|
|
60
|
+
color: var(--color-interactive-accent-active);
|
|
61
|
+
}
|
|
62
|
+
.np-circular-btn.accent.secondary .tw-icon {
|
|
63
|
+
color: #00a2dd;
|
|
64
|
+
color: var(--color-interactive-accent);
|
|
65
|
+
}
|
|
66
|
+
.np-circular-btn.accent.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
67
|
+
.np-circular-btn.accent.secondary input[type="button"]:active + .tw-icon {
|
|
68
|
+
color: white;
|
|
69
|
+
}
|
|
70
|
+
.np-circular-btn.positive .np-circular-btn__label {
|
|
71
|
+
color: #2ead4b;
|
|
72
|
+
color: var(--color-interactive-positive);
|
|
73
|
+
}
|
|
74
|
+
.np-circular-btn.positive:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
75
|
+
color: #069939;
|
|
76
|
+
color: var(--color-interactive-positive-hover);
|
|
77
|
+
}
|
|
78
|
+
.np-circular-btn.positive:active .np-circular-btn__label,
|
|
79
|
+
.np-circular-btn.positive input[type="button"]:active ~ .np-circular-btn__label {
|
|
80
|
+
color: #008b2b;
|
|
81
|
+
color: var(--color-interactive-positive-active);
|
|
82
|
+
}
|
|
83
|
+
.np-circular-btn.positive.secondary .tw-icon {
|
|
84
|
+
color: #2ead4b;
|
|
85
|
+
color: var(--color-interactive-positive);
|
|
86
|
+
}
|
|
87
|
+
.np-circular-btn.positive.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
88
|
+
.np-circular-btn.positive.secondary input[type="button"]:active + .tw-icon {
|
|
89
|
+
color: white;
|
|
90
|
+
}
|
|
91
|
+
.np-circular-btn.negative .np-circular-btn__label {
|
|
92
|
+
color: #e74848;
|
|
93
|
+
color: var(--color-interactive-negative);
|
|
94
|
+
}
|
|
95
|
+
.np-circular-btn.negative:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
96
|
+
color: #d03238;
|
|
97
|
+
color: var(--color-interactive-negative-hover);
|
|
98
|
+
}
|
|
99
|
+
.np-circular-btn.negative:active .np-circular-btn__label,
|
|
100
|
+
.np-circular-btn.negative input[type="button"]:active ~ .np-circular-btn__label {
|
|
101
|
+
color: #bf1e2c;
|
|
102
|
+
color: var(--color-interactive-negative-active);
|
|
103
|
+
}
|
|
104
|
+
.np-circular-btn.negative.secondary .tw-icon {
|
|
105
|
+
color: #e74848;
|
|
106
|
+
color: var(--color-interactive-negative);
|
|
107
|
+
}
|
|
108
|
+
.np-circular-btn.negative.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
109
|
+
.np-circular-btn.negative.secondary input[type="button"]:active + .tw-icon {
|
|
110
|
+
color: white;
|
|
111
|
+
}
|
|
112
|
+
.np-theme-personal .np-circular-btn.accent .np-circular-btn__label {
|
|
9
113
|
color: var(--color-interactive-primary);
|
|
10
114
|
}
|
|
11
|
-
.np-
|
|
12
|
-
.np-circular-btn-secondary-default .np-circular-btn-label:not(.disabled):not(:disabled):hover {
|
|
115
|
+
.np-theme-personal .np-circular-btn.accent:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
13
116
|
color: var(--color-interactive-primary-hover);
|
|
14
117
|
}
|
|
15
|
-
.np-
|
|
16
|
-
.np-
|
|
118
|
+
.np-theme-personal .np-circular-btn.accent:active .np-circular-btn__label,
|
|
119
|
+
.np-theme-personal .np-circular-btn.accent input[type="button"]:active ~ .np-circular-btn__label {
|
|
17
120
|
color: var(--color-interactive-primary-active);
|
|
18
121
|
}
|
|
19
|
-
.np-
|
|
20
|
-
|
|
21
|
-
|
|
122
|
+
.np-theme-personal .np-circular-btn.accent.secondary .tw-icon {
|
|
123
|
+
color: var(--color-interactive-primary);
|
|
124
|
+
}
|
|
125
|
+
.np-theme-personal .np-circular-btn.accent.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
126
|
+
.np-theme-personal .np-circular-btn.accent.secondary input[type="button"]:active + .tw-icon {
|
|
127
|
+
color: white;
|
|
128
|
+
color: var(--color-interactive-control);
|
|
129
|
+
}
|
|
130
|
+
.np-theme-personal .np-circular-btn.accent.secondary:active input[type="button"] + .tw-icon {
|
|
131
|
+
color: var(--color-interactive-control);
|
|
132
|
+
}
|
|
133
|
+
.np-theme-personal .np-circular-btn.positive .np-circular-btn__label {
|
|
134
|
+
color: var(--color-interactive-primary);
|
|
135
|
+
}
|
|
136
|
+
.np-theme-personal .np-circular-btn.positive:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
137
|
+
color: var(--color-interactive-primary-hover);
|
|
138
|
+
}
|
|
139
|
+
.np-theme-personal .np-circular-btn.positive:active .np-circular-btn__label,
|
|
140
|
+
.np-theme-personal .np-circular-btn.positive input[type="button"]:active ~ .np-circular-btn__label {
|
|
141
|
+
color: var(--color-interactive-primary-active);
|
|
142
|
+
}
|
|
143
|
+
.np-theme-personal .np-circular-btn.positive.secondary .tw-icon {
|
|
144
|
+
color: var(--color-interactive-primary);
|
|
145
|
+
}
|
|
146
|
+
.np-theme-personal .np-circular-btn.positive.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
147
|
+
.np-theme-personal .np-circular-btn.positive.secondary input[type="button"]:active + .tw-icon {
|
|
148
|
+
color: white;
|
|
149
|
+
color: var(--color-interactive-control);
|
|
150
|
+
}
|
|
151
|
+
.np-theme-personal .np-circular-btn.positive.secondary:active input[type="button"] + .tw-icon {
|
|
152
|
+
color: var(--color-interactive-control);
|
|
153
|
+
}
|
|
154
|
+
.np-theme-personal .np-circular-btn.negative .np-circular-btn__label {
|
|
155
|
+
color: var(--color-sentiment-negative);
|
|
156
|
+
}
|
|
157
|
+
.np-theme-personal .np-circular-btn.negative:not(.disabled):not(:disabled):hover .np-circular-btn__label {
|
|
158
|
+
color: var(--color-sentiment-negative-hover);
|
|
159
|
+
}
|
|
160
|
+
.np-theme-personal .np-circular-btn.negative:active .np-circular-btn__label,
|
|
161
|
+
.np-theme-personal .np-circular-btn.negative input[type="button"]:active ~ .np-circular-btn__label {
|
|
162
|
+
color: var(--color-sentiment-negative-active);
|
|
22
163
|
}
|
|
23
|
-
.np-
|
|
24
|
-
|
|
25
|
-
color: var(--color-sentiment-negative-primary-hover);
|
|
164
|
+
.np-theme-personal .np-circular-btn.negative.secondary .tw-icon {
|
|
165
|
+
color: var(--color-sentiment-negative);
|
|
26
166
|
}
|
|
27
|
-
.np-
|
|
28
|
-
.np-
|
|
29
|
-
color:
|
|
167
|
+
.np-theme-personal .np-circular-btn.negative.secondary:not(.disabled):not(:disabled):hover .tw-icon,
|
|
168
|
+
.np-theme-personal .np-circular-btn.negative.secondary input[type="button"]:active + .tw-icon {
|
|
169
|
+
color: white;
|
|
170
|
+
color: var(--color-interactive-control);
|
|
30
171
|
}
|
|
31
|
-
.np-circular-btn-
|
|
32
|
-
|
|
172
|
+
.np-theme-personal .np-circular-btn.negative.secondary:active input[type="button"] + .tw-icon {
|
|
173
|
+
color: var(--color-interactive-control);
|
|
33
174
|
}
|
|
@@ -1,36 +1,105 @@
|
|
|
1
|
+
@import (reference) "../../node_modules/@transferwise/neptune-css/src/less/mixins/_logical-properties.less";
|
|
2
|
+
@import "./_button-label-states.less";
|
|
3
|
+
|
|
1
4
|
.np-circular-btn {
|
|
2
5
|
display: inline-flex;
|
|
3
6
|
flex-direction: column;
|
|
4
7
|
align-items: center;
|
|
8
|
+
text-align: center;
|
|
5
9
|
cursor: pointer;
|
|
10
|
+
position: relative;
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
.tw-icon {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: var(--size-16);
|
|
15
|
+
pointer-events: none;
|
|
16
|
+
color: white;
|
|
17
|
+
transition: color 0.15s ease-in-out;
|
|
18
|
+
width: 100%;
|
|
19
|
+
.left(0);
|
|
20
|
+
|
|
21
|
+
@media (--screen-400-zoom) {
|
|
22
|
+
top: var(--size-12);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
> svg {
|
|
26
|
+
margin: 0 auto;
|
|
17
27
|
}
|
|
18
28
|
}
|
|
19
29
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.
|
|
23
|
-
|
|
24
|
-
&:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
&:not(.disabled, :disabled):active {
|
|
28
|
-
color: var(--color-sentiment-negative-primary-active);
|
|
30
|
+
.np-theme-personal & {
|
|
31
|
+
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
32
|
+
.tw-icon {
|
|
33
|
+
&,
|
|
34
|
+
&:hover,
|
|
35
|
+
&:active {
|
|
36
|
+
color: var(--color-interactive-control);
|
|
29
37
|
}
|
|
30
38
|
}
|
|
31
|
-
}
|
|
32
39
|
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
&.negative .tw-icon,
|
|
41
|
+
&.negative.secondary:not(.disabled, :disabled):hover .tw-icon,
|
|
42
|
+
&.negative.secondary:not(.disabled, :disabled):active .tw-icon {
|
|
43
|
+
// TODO, this will need to be removed when we update our CSS architecture
|
|
44
|
+
color: var(--color-contrast) !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.negative.secondary:not(.disabled, :disabled) .tw-icon {
|
|
48
|
+
// TODO, this will need to be removed when we update our CSS architecture
|
|
49
|
+
color: var(--color-sentiment-negative) !important;
|
|
50
|
+
}
|
|
35
51
|
}
|
|
36
52
|
}
|
|
53
|
+
|
|
54
|
+
.button-label-states(
|
|
55
|
+
np-circular-btn,
|
|
56
|
+
accent,
|
|
57
|
+
var(--color-interactive-accent),
|
|
58
|
+
var(--color-interactive-accent-hover),
|
|
59
|
+
var(--color-interactive-accent-active)
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
.button-label-states(
|
|
63
|
+
np-circular-btn,
|
|
64
|
+
positive,
|
|
65
|
+
var(--color-interactive-positive),
|
|
66
|
+
var(--color-interactive-positive-hover),
|
|
67
|
+
var(--color-interactive-positive-active)
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
.button-label-states(
|
|
71
|
+
np-circular-btn,
|
|
72
|
+
negative,
|
|
73
|
+
var(--color-interactive-negative),
|
|
74
|
+
var(--color-interactive-negative-hover),
|
|
75
|
+
var(--color-interactive-negative-active)
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
.np-theme-personal {
|
|
79
|
+
.button-label-states(
|
|
80
|
+
np-circular-btn,
|
|
81
|
+
accent,
|
|
82
|
+
var(--color-interactive-primary),
|
|
83
|
+
var(--color-interactive-primary-hover),
|
|
84
|
+
var(--color-interactive-primary-active),
|
|
85
|
+
true
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
.button-label-states(
|
|
89
|
+
np-circular-btn,
|
|
90
|
+
positive,
|
|
91
|
+
var(--color-interactive-primary),
|
|
92
|
+
var(--color-interactive-primary-hover),
|
|
93
|
+
var(--color-interactive-primary-active),
|
|
94
|
+
true
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
.button-label-states(
|
|
98
|
+
np-circular-btn,
|
|
99
|
+
negative,
|
|
100
|
+
var(--color-sentiment-negative),
|
|
101
|
+
var(--color-sentiment-negative-hover),
|
|
102
|
+
var(--color-sentiment-negative-active),
|
|
103
|
+
true
|
|
104
|
+
);
|
|
105
|
+
}
|