@transferwise/neptune-css 0.0.0-experimental-74e7404 → 0.0.0-experimental-7eb16ef

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.
Files changed (45) hide show
  1. package/dist/css/accordion.css +23 -52
  2. package/dist/css/button-groups.css +29 -8
  3. package/dist/css/buttons.css +26 -2
  4. package/dist/css/decision.css +23 -52
  5. package/dist/css/dropdowns.css +39 -62
  6. package/dist/css/droppable.css +28 -8
  7. package/dist/css/footer.css +41 -14
  8. package/dist/css/input-groups.css +172 -165
  9. package/dist/css/list-group.css +0 -45
  10. package/dist/css/navbar.css +39 -62
  11. package/dist/css/neptune-addons.css +15 -0
  12. package/dist/css/neptune-core.css +368 -547
  13. package/dist/css/neptune.css +2877 -1443
  14. package/dist/css/popovers.css +35 -60
  15. package/dist/css/sequences.css +6 -1
  16. package/dist/css/tooltip.css +27 -7
  17. package/dist/less/neptune-tokens.less +0 -48
  18. package/dist/props/neptune-tokens.css +793 -1
  19. package/package.json +1 -1
  20. package/src/less/addons/_background-utilities.less +5 -0
  21. package/src/less/button-groups.less +3 -2
  22. package/src/less/buttons.less +1 -1
  23. package/src/less/core/_typography.less +67 -221
  24. package/src/less/decision.less +2 -2
  25. package/src/less/dropdowns.less +6 -5
  26. package/src/less/droppable.less +4 -4
  27. package/src/less/footer.less +4 -3
  28. package/src/less/forms/bootstrap-forms.less +70 -57
  29. package/src/less/input-groups.less +5 -5
  30. package/src/less/list-group.less +7 -4
  31. package/src/less/mixins/_text-emphasis.less +7 -1
  32. package/src/less/neptune.bundle.less +4 -0
  33. package/src/less/popovers.less +3 -3
  34. package/src/less/sequences.less +7 -2
  35. package/src/less/tooltip.less +1 -1
  36. package/dist/fonts/inter-cyrillic-ext-variable-wghtOnly-normal.woff2 +0 -0
  37. package/dist/fonts/inter-cyrillic-variable-wghtOnly-normal.woff2 +0 -0
  38. package/dist/fonts/inter-greek-ext-variable-wghtOnly-normal.woff2 +0 -0
  39. package/dist/fonts/inter-greek-variable-wghtOnly-normal.woff2 +0 -0
  40. package/dist/fonts/inter-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
  41. package/dist/fonts/inter-latin-variable-wghtOnly-normal.woff2 +0 -0
  42. package/dist/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
  43. package/dist/less/legacy-variables.css +0 -0
  44. package/dist/less/neptune-tokens.css +0 -0
  45. package/dist/less/zindex.css +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@transferwise/neptune-css",
3
3
  "description": "Neptune CSS library",
4
- "version": "0.0.0-experimental-74e7404",
4
+ "version": "0.0.0-experimental-7eb16ef",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -76,6 +76,11 @@
76
76
  .np-text-title-subsection,
77
77
  .np-text-title-body,
78
78
  .np-text-title-group,
79
+ .wds-text-title-screen,
80
+ .wds-text-title-section,
81
+ .wds-text-title-subsection,
82
+ .wds-text-title-body,
83
+ .wds-text-title-group,
79
84
  strong {
80
85
  color: @color-navy-content-primary;
81
86
  }
@@ -404,8 +404,9 @@
404
404
  }
405
405
  }
406
406
 
407
- .np-text-body-default,
408
407
  .body-2,
408
+ .np-text-body-default,
409
+ .wds-text-body-default,
409
410
  .small {
410
411
  color: var(--color-content-secondary);
411
412
  }
@@ -418,7 +419,7 @@
418
419
  }
419
420
 
420
421
  .btn-group .secondary {
421
- .np-text-body-default;
422
+ .wds-text-body-default;
422
423
 
423
424
  color: var(--color-content-secondary);
424
425
  }
@@ -8,7 +8,7 @@
8
8
  @import (reference) "./ring.less";
9
9
 
10
10
  .btn {
11
- .np-text-body-large-bold;
11
+ .wds-text-body-large-bold;
12
12
 
13
13
  display: inline-block;
14
14
  margin-bottom: 0;
@@ -6,7 +6,7 @@
6
6
 
7
7
  // TITLE
8
8
 
9
- /* DEPRECATED: use .np-text-*-title instead */
9
+ /* DEPRECATED: use `.wds-text-*` instead */
10
10
  /* stylelint-disable-next-line selector-list-comma-newline-after */
11
11
  .h1,
12
12
  .h2,
@@ -32,8 +32,6 @@ h6,
32
32
  .np-text-title-group {
33
33
  margin: 0;
34
34
  color: var(--color-content-primary);
35
- line-height: var(--line-height-title);
36
- letter-spacing: 0;
37
35
  .np-text-hyphenated;
38
36
 
39
37
  + p,
@@ -43,86 +41,76 @@ h6,
43
41
  }
44
42
  }
45
43
 
46
- /* DEPRECATED: use .np-text-title-screen instead */
44
+ /* DEPRECATED: use `.wds-text-title-screen` instead */
47
45
  /* stylelint-disable-next-line selector-list-comma-newline-after */
48
46
  .h1,
49
47
  .title-1,
50
48
  h1,
51
- .np-text-title-screen {
49
+ .np-text-title-screen,
50
+ .wds-text-title-screen {
51
+ &:extend(.wds-text-title-screen);
52
52
  margin-bottom: initial;
53
- font-size: var(--font-size-30);
54
- font-weight: var(--font-weight-semi-bold);
55
- letter-spacing: -0.021em;
56
- line-height: 115%;
57
53
  }
58
54
 
59
- /* DEPRECATED: use .np-text-title-section instead */
55
+ /* DEPRECATED: use `.wds-text-title-section` instead */
60
56
  /* stylelint-disable-next-line selector-list-comma-newline-after */
61
57
  .h2,
62
58
  .title-2,
63
59
  h2,
64
- .np-text-title-section {
60
+ .np-text-title-section,
61
+ .wds-text-title-section {
62
+ &:extend(.wds-text-title-section);
65
63
  margin-bottom: initial;
66
- font-weight: var(--font-weight-semi-bold);
67
- font-size: var(--font-size-26);
68
- letter-spacing: -0.02em;
69
- line-height: 122%;
70
64
  }
71
65
 
72
- /* DEPRECATED: use .np-text-title-subsection instead */
66
+ /* DEPRECATED: use `.wds-text-title-subsection` instead */
73
67
  /* stylelint-disable-next-line selector-list-comma-newline-after */
74
68
  .h3,
75
69
  .title-3,
76
70
  h3,
77
- .np-text-title-subsection {
71
+ .np-text-title-subsection,
72
+ .wds-text-title-subsection {
73
+ &:extend(.wds-text-title-subsection);
78
74
  margin-bottom: initial;
79
- font-size: var(--font-size-22);
80
- font-weight: var(--font-weight-semi-bold);
81
- letter-spacing: -0.018em;
82
- line-height: 125%;
83
75
  }
84
76
 
85
- /* DEPRECATED: use .np-text-title-body instead */
77
+ /* DEPRECATED: use `.wds-text-title-body` instead */
86
78
  /* stylelint-disable-next-line selector-list-comma-newline-after */
87
79
  .h4,
88
80
  .title-4,
89
81
  h4,
90
- .np-text-title-body {
91
- font-size: var(--font-size-18);
92
- font-weight: var(--font-weight-semi-bold);
93
- letter-spacing: -0.014em;
94
- line-height: 135%;
82
+ .np-text-title-body,
83
+ .wds-text-title-body {
84
+ &:extend(.wds-text-title-body);
95
85
  }
96
86
 
97
- /* DEPRECATED: use .np-text-title-group instead */
87
+ /* DEPRECATED: use `.wds-text-title-group` instead */
98
88
  /* stylelint-disable-next-line selector-list-comma-newline-after */
99
89
  .h5,
100
90
  .h6,
101
91
  .title-5,
102
92
  h5,
103
93
  h6,
104
- .np-text-title-group {
105
- font-weight: var(--font-weight-medium);
106
- font-size: var(--font-size-14);
107
- letter-spacing: -0.006em;
108
- line-height: 140%;
94
+ .np-text-title-group,
95
+ .wds-text-title-group {
96
+ &:extend(.wds-text-title-group);
109
97
  }
110
98
 
111
- /* DEPRECATED: use .np-text-title-body instead */
99
+ /* DEPRECATED: use `.wds-text-title-body` instead */
112
100
  .lead {
113
101
  margin-bottom: var(--size-24);
114
102
  font-size: var(--font-size-20);
115
103
  line-height: var(--line-height-title);
116
104
  }
117
105
 
118
- // DEPRECATED: use .np-text-body-default instead
106
+ // DEPRECATED: use `.wds-text-body-default` instead
119
107
  .tiny {
120
108
  color: var(--color-content-secondary);
121
109
  }
122
110
 
123
111
  // BODY
124
112
 
125
- /* DEPRECATED: use .np-text-body-default instead */
113
+ /* DEPRECATED: use `.wds-text-body-default` instead */
126
114
  /* stylelint-disable-next-line selector-list-comma-newline-after */
127
115
  .body-2,
128
116
  .body-3,
@@ -130,49 +118,41 @@ h6,
130
118
  .tiny,
131
119
  body,
132
120
  small,
133
- .np-text-body-default {
134
- font-size: var(--font-size-14);
135
- line-height: 155%;
136
- letter-spacing: -0.006em;
137
- font-weight: var(--font-weight-regular);
121
+ .np-text-body-default,
122
+ .wds-text-body-default {
123
+ &:extend(.wds-text-body-default);
138
124
  .np-text-hyphenated;
139
125
  }
140
126
 
141
- /* DEPRECATED: use .np-text-body-default-bold instead */
127
+ /* DEPRECATED: use `.wds-text-body-default-bold` instead */
142
128
  /* stylelint-disable-next-line selector-list-comma-newline-after */
143
129
  .control-2,
144
130
 
145
131
  // DEPRECATED: use `Field` component (or in some edge cases `Label` component) instead
146
132
  .label, .control-label,
147
133
 
148
- .np-text-body-default-bold {
149
- font-size: var(--font-size-14);
150
- line-height: 155%;
151
- letter-spacing: -0.006em;
152
- font-weight: var(--font-weight-semi-bold);
134
+ .np-text-body-default-bold,
135
+ .wds-text-body-default-bold {
136
+ &:extend(.wds-text-body-default-bold);
153
137
  .np-text-hyphenated;
154
138
  }
155
139
 
156
- /* DEPRECATED: use .np-text-body-large instead */
140
+ /* DEPRECATED: use `.wds-text-body-large` instead */
157
141
  /* stylelint-disable-next-line selector-list-comma-newline-after */
158
142
  .body-1,
159
143
  .value,
160
- .np-text-body-large {
161
- font-weight: var(--font-weight-regular);
162
- font-size: var(--font-size-16);
163
- line-height: 150%;
164
- letter-spacing: -0.011em;
144
+ .np-text-body-large,
145
+ .wds-text-body-large {
146
+ &:extend(.wds-text-body-large);
165
147
  .np-text-hyphenated;
166
148
  }
167
149
 
168
- /* DEPRECATED: use np-text-body-large-bold instead */
150
+ /* DEPRECATED: use `.wds-text-body-large-bold` instead */
169
151
  /* stylelint-disable-next-line selector-list-comma-newline-after */
170
152
  .control-1,
171
- .np-text-body-large-bold {
172
- font-weight: var(--font-weight-semi-bold);
173
- font-size: var(--font-size-16);
174
- line-height: 150%;
175
- letter-spacing: -0.011em;
153
+ .np-text-body-large-bold,
154
+ .wds-text-body-large-bold {
155
+ &:extend(.wds-text-body-large-bold);
176
156
  .np-text-hyphenated;
177
157
  }
178
158
 
@@ -199,19 +179,25 @@ a,
199
179
 
200
180
  // DISPLAY
201
181
 
202
- .np-text-display-number {
203
- font-weight: var(--font-weight-semi-bold);
204
- font-size: 40px;
205
- line-height: 110%;
182
+ /* DEPRECATED: use .wds-text-display-number-small instead */
183
+ .np-text-display-number,
184
+ .wds-text-display-number {
185
+ &:extend(.wds-text-display-number);
186
+ }
187
+
188
+ .np-text-display-number-small,
189
+ .wds-text-display-number-small {
190
+ &:extend(.wds-text-display-number-small);
206
191
  }
207
192
 
208
- .display-formatting(
209
- @font-size;
210
- @line-height;
211
- @font-weight: var(--font-weight-regular)) {
212
- font-size: @font-size;
213
- line-height: @line-height;
214
- font-weight: @font-weight;
193
+ .np-text-display-number-medium,
194
+ .wds-text-display-number-medium {
195
+ &:extend(.wds-text-display-number-medium);
196
+ }
197
+
198
+ .np-text-display-number-large,
199
+ .wds-text-display-number-large {
200
+ &:extend(.wds-text-display-number-large);
215
201
  }
216
202
 
217
203
  .display-1,
@@ -223,28 +209,12 @@ a,
223
209
  .np-text-display-large,
224
210
  .np-text-display-medium,
225
211
  .np-text-display-small {
226
- &,
212
+ font-synthesis: none;
213
+
227
214
  &--forced {
228
215
  font-family: var(--font-family-display);
229
216
  font-synthesis: none;
230
217
  }
231
-
232
- :lang(ja) &,
233
- :lang(th) &,
234
- :lang(zh-CN) &,
235
- :lang(zh-HK) & {
236
- /**
237
- * Wise Sans covers extended Latin glyphs for logged-in experiences and a small subset
238
- * of Japanese ones for the logged out ones (exposed by the Editorial DS). Unfortunately,
239
- * font files are browser-cached and we carried over to launchpad, where it causes issues
240
- * for unsupported locales, especially those that share glyphs, like Japanese and Chinese.
241
- * There are exceptions for small UI parts where Wise Sans is fine or expected — e.g. the
242
- * numeric input of ExpressiveMoneyInput.
243
- * Add `--forced` BEM modifier to the original class name to guarantee it.
244
- */
245
- font-family: var(--font-family-regular);
246
- line-height: var(--line-height-title);
247
- }
248
218
  }
249
219
 
250
220
  /* DEPRECATED(.np-text-display-extra-large): use .np-text-display-large instead */
@@ -252,36 +222,23 @@ a,
252
222
  .np-text-display-large,
253
223
  .np-text-display-medium,
254
224
  .np-text-display-small {
255
- letter-spacing: normal;
256
225
  .np-text-hyphenated;
257
226
  }
258
227
 
259
228
  .np-text-display-extra-large,
260
- .np-text-display-large {
261
- .display-formatting(var(--size-64), normal, var(--font-weight-bold));
262
- }
263
-
264
- .np-text-display-medium {
265
- .display-formatting(var(--size-52), normal, var(--font-weight-bold));
229
+ .np-text-display-large,
230
+ .wds-text-display-large {
231
+ &:extend(.wds-text-display-large);
266
232
  }
267
233
 
268
- .np-text-display-small {
269
- .display-formatting(var(--size-40), normal, var(--font-weight-bold));
234
+ .np-text-display-medium,
235
+ .wds-text-display-medium {
236
+ &:extend(.wds-text-display-medium);
270
237
  }
271
238
 
272
- :lang(en) {
273
- > .np-text-display-extra-large,
274
- > .np-text-display-large {
275
- .display-formatting(var(--size-64), 0.85);
276
- }
277
-
278
- > .np-text-display-medium {
279
- .display-formatting(var(--size-52), 0.85);
280
- }
281
-
282
- > .np-text-display-small {
283
- .display-formatting(var(--size-40), 0.85);
284
- }
239
+ .np-text-display-small,
240
+ .wds-text-display-small {
241
+ &:extend(.wds-text-display-small);
285
242
  }
286
243
 
287
244
  /* Disable hyphenation for English
@@ -294,117 +251,6 @@ a,
294
251
  hyphens: none;
295
252
  }
296
253
 
297
- :lang(af),
298
- :lang(sq),
299
- :lang(eu),
300
- :lang(bs),
301
- :lang(ca),
302
- :lang(kw),
303
- :lang(hr),
304
- :lang(cs),
305
- :lang(da),
306
- :lang(nl),
307
- :lang(eo),
308
- :lang(et),
309
- :lang(fo),
310
- :lang(fi),
311
- :lang(fr),
312
- :lang(gl),
313
- :lang(lg),
314
- :lang(de),
315
- :lang(hu),
316
- :lang(is),
317
- :lang(se),
318
- :lang(id),
319
- :lang(in),
320
- :lang(ga),
321
- :lang(it),
322
- :lang(kl),
323
- :lang(ki),
324
- :lang(rw),
325
- :lang(lv),
326
- :lang(lt),
327
- :lang(lb),
328
- :lang(mg),
329
- :lang(ms),
330
- :lang(mt),
331
- :lang(gv),
332
- :lang(mi),
333
- :lang(nd),
334
- :lang(nb),
335
- :lang(nn),
336
- :lang(om),
337
- :lang(pl),
338
- :lang(pt),
339
- :lang(ro),
340
- :lang(rm),
341
- :lang(rn),
342
- :lang(sg),
343
- :lang(gd),
344
- :lang(sr),
345
- :lang(sn),
346
- :lang(sk),
347
- :lang(sl),
348
- :lang(so),
349
- :lang(es),
350
- :lang(sw),
351
- :lang(sv),
352
- :lang(tr),
353
- :lang(cy),
354
- :lang(fy),
355
- :lang(wo),
356
- :lang(zu),
357
- :lang(hsb),
358
- :lang(gsw),
359
- :lang(dsb),
360
- :lang(fil) {
361
- .np-text-display-extra-large,
362
- .np-text-display-large {
363
- .display-formatting(var(--size-64), 1.05);
364
- }
365
-
366
- .np-text-display-medium {
367
- .display-formatting(var(--size-52), 1.05);
368
- }
369
-
370
- .np-text-display-small {
371
- .display-formatting(var(--size-40), 1.05);
372
- }
373
- }
374
-
375
- :lang(el),
376
- :lang(az),
377
- :lang(be),
378
- :lang(bs),
379
- :lang(bg),
380
- :lang(ce),
381
- :lang(mk),
382
- :lang(os),
383
- :lang(ru),
384
- :lang(sr),
385
- :lang(uk),
386
- :lang(uz),
387
- :lang(sah) {
388
- .np-text-display-extra-large,
389
- .np-text-display-large {
390
- .display-formatting(var(--size-60),
391
- 120%,
392
- var(--font-weight-semi-bold));
393
- }
394
-
395
- .np-text-display-medium {
396
- .display-formatting(var(--size-48),
397
- 120%,
398
- var(--font-weight-semi-bold));
399
- }
400
-
401
- .np-text-display-small {
402
- .display-formatting(var(--size-40),
403
- 120%,
404
- var(--font-weight-semi-bold));
405
- }
406
- }
407
-
408
254
  /* DEPRECATED: use `.np-text-display-*` instead */
409
255
  .display-1 {
410
256
  margin-bottom: var(--size-24);
@@ -18,11 +18,11 @@
18
18
  }
19
19
 
20
20
  &__title {
21
- .np-text-title-body();
21
+ .wds-text-title-body();
22
22
  }
23
23
 
24
24
  &__content {
25
- .np-text-body-default;
25
+ .wds-text-body-default;
26
26
 
27
27
  margin-top: var(--size-4);
28
28
  }
@@ -1,4 +1,4 @@
1
- @import (reference) "../variables/neptune-tokens.less";
1
+ @import (reference) "../variables/neptune-tokens.less";
2
2
  @import (reference) "../variables/legacy-variables.less";
3
3
  @import (reference) "../less/core/_typography.less";
4
4
  @import (reference) "./mixins/_border-radius.less";
@@ -30,7 +30,7 @@
30
30
 
31
31
  margin: 0; // override default ul
32
32
  list-style: none;
33
- .np-text-body-default;
33
+ .wds-text-body-default;
34
34
  .text-align(left); // Ensures proper alignment if parent has it changed (e.g., modal footer)
35
35
 
36
36
  background-color: var(--color-background-screen);
@@ -74,7 +74,7 @@
74
74
  padding: var(--dropdown-link-padding);
75
75
  clear: both;
76
76
  border-radius: @border-radius-base;
77
- .np-text-body-default;
77
+ .wds-text-body-default;
78
78
 
79
79
  color: var(--color-content-primary);
80
80
  white-space: nowrap; // prevent links from randomly breaking onto new lines
@@ -174,8 +174,9 @@
174
174
  color: inherit;
175
175
  }
176
176
 
177
- .np-text-body-default,
178
177
  .small,
178
+ .np-text-body-default,
179
+ .wds-text-body-default,
179
180
  .secondary {
180
181
  color: @color-navy-content-secondary;
181
182
  }
@@ -313,7 +314,7 @@
313
314
  color: var(--color-content-secondary);
314
315
  white-space: nowrap; // as with > li > a
315
316
 
316
- .np-text-title-group();
317
+ .wds-text-title-group();
317
318
  }
318
319
 
319
320
  // Backdrop to catch body clicks on mobile, etc.
@@ -4,7 +4,7 @@
4
4
 
5
5
  .droppable {
6
6
  position: relative;
7
- .np-text-body-large;
7
+ .wds-text-body-large;
8
8
 
9
9
  text-align: center;
10
10
  border: 1px solid var(--color-interactive-secondary);
@@ -74,7 +74,7 @@
74
74
  }
75
75
  .circle {
76
76
  background-color: var(--color-contrast);
77
- color: var(--color-content-primary)!important;
77
+ color: var(--color-content-primary) !important;
78
78
  }
79
79
  }
80
80
  }
@@ -136,7 +136,7 @@
136
136
 
137
137
  .np-theme-personal & {
138
138
  // is a hex code because can't have transparency
139
- background-color: #E1E4DF;
139
+ background-color: #e1e4df;
140
140
  color: var(--color-content-primary);
141
141
  }
142
142
 
@@ -147,7 +147,7 @@
147
147
 
148
148
  .np-theme-personal--forest-green & {
149
149
  // is a hex code because can't have transparency
150
- background-color: #455C35;
150
+ background-color: #455c35;
151
151
  }
152
152
  }
153
153
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  .footer {
5
5
  background-color: var(--color-background-neutral);
6
- .np-text-body-default;
6
+ .wds-text-body-default;
7
7
 
8
8
  padding-top: calc(var(--size-8) * 10);
9
9
  padding-bottom: calc(var(--size-8) * 10);
@@ -21,7 +21,7 @@
21
21
  .footer-link,
22
22
  .link-icon {
23
23
  color: var(--color-content-secondary);
24
- .np-text-body-default;
24
+ .wds-text-body-default;
25
25
 
26
26
  &:hover,
27
27
  &:active,
@@ -102,7 +102,8 @@
102
102
 
103
103
  .tiny,
104
104
  .body-3,
105
- .np-text-body-default {
105
+ .np-text-body-default,
106
+ .wds-text-body-default {
106
107
  color: @color-navy-content-primary;
107
108
  }
108
109
  }