@transferwise/neptune-css 0.0.0-experimental-0cae6bf → 0.0.0-experimental-d0b3ee6

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 +52 -23
  2. package/dist/css/button-groups.css +8 -29
  3. package/dist/css/buttons.css +2 -26
  4. package/dist/css/decision.css +52 -23
  5. package/dist/css/dropdowns.css +62 -39
  6. package/dist/css/droppable.css +8 -28
  7. package/dist/css/footer.css +14 -41
  8. package/dist/css/input-groups.css +165 -172
  9. package/dist/css/list-group.css +45 -0
  10. package/dist/css/navbar.css +62 -39
  11. package/dist/css/neptune-addons.css +0 -15
  12. package/dist/css/neptune-core.css +547 -375
  13. package/dist/css/neptune.css +1451 -2910
  14. package/dist/css/popovers.css +60 -35
  15. package/dist/css/sequences.css +1 -6
  16. package/dist/css/tooltip.css +7 -27
  17. package/dist/fonts/inter-cyrillic-ext-variable-wghtOnly-normal.woff2 +0 -0
  18. package/dist/fonts/inter-cyrillic-variable-wghtOnly-normal.woff2 +0 -0
  19. package/dist/fonts/inter-greek-ext-variable-wghtOnly-normal.woff2 +0 -0
  20. package/dist/fonts/inter-greek-variable-wghtOnly-normal.woff2 +0 -0
  21. package/dist/fonts/inter-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
  22. package/dist/fonts/inter-latin-variable-wghtOnly-normal.woff2 +0 -0
  23. package/dist/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
  24. package/dist/less/legacy-variables.css +0 -0
  25. package/dist/less/neptune-tokens.css +0 -0
  26. package/dist/less/neptune-tokens.less +48 -0
  27. package/dist/less/zindex.css +0 -0
  28. package/dist/props/neptune-tokens.css +1 -802
  29. package/package.json +1 -1
  30. package/src/less/addons/_background-utilities.less +0 -5
  31. package/src/less/button-groups.less +2 -3
  32. package/src/less/buttons.less +1 -1
  33. package/src/less/core/_typography.less +221 -67
  34. package/src/less/decision.less +2 -2
  35. package/src/less/dropdowns.less +5 -6
  36. package/src/less/droppable.less +4 -4
  37. package/src/less/footer.less +3 -4
  38. package/src/less/forms/bootstrap-forms.less +57 -70
  39. package/src/less/input-groups.less +5 -5
  40. package/src/less/list-group.less +4 -7
  41. package/src/less/mixins/_text-emphasis.less +1 -7
  42. package/src/less/neptune.bundle.less +0 -4
  43. package/src/less/popovers.less +3 -3
  44. package/src/less/sequences.less +2 -7
  45. package/src/less/tooltip.less +1 -1
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-0cae6bf",
4
+ "version": "0.0.0-experimental-d0b3ee6",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -76,11 +76,6 @@
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,
84
79
  strong {
85
80
  color: @color-navy-content-primary;
86
81
  }
@@ -404,9 +404,8 @@
404
404
  }
405
405
  }
406
406
 
407
- .body-2,
408
407
  .np-text-body-default,
409
- .wds-text-body-default,
408
+ .body-2,
410
409
  .small {
411
410
  color: var(--color-content-secondary);
412
411
  }
@@ -419,7 +418,7 @@
419
418
  }
420
419
 
421
420
  .btn-group .secondary {
422
- .wds-text-body-default;
421
+ .np-text-body-default;
423
422
 
424
423
  color: var(--color-content-secondary);
425
424
  }
@@ -8,7 +8,7 @@
8
8
  @import (reference) "./ring.less";
9
9
 
10
10
  .btn {
11
- .wds-text-body-large-bold;
11
+ .np-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 `.wds-text-*` instead */
9
+ /* DEPRECATED: use .np-text-*-title instead */
10
10
  /* stylelint-disable-next-line selector-list-comma-newline-after */
11
11
  .h1,
12
12
  .h2,
@@ -32,6 +32,8 @@ 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;
35
37
  .np-text-hyphenated;
36
38
 
37
39
  + p,
@@ -41,76 +43,86 @@ h6,
41
43
  }
42
44
  }
43
45
 
44
- /* DEPRECATED: use `.wds-text-title-screen` instead */
46
+ /* DEPRECATED: use .np-text-title-screen instead */
45
47
  /* stylelint-disable-next-line selector-list-comma-newline-after */
46
48
  .h1,
47
49
  .title-1,
48
50
  h1,
49
- .np-text-title-screen,
50
- .wds-text-title-screen {
51
- &:extend(.wds-text-title-screen);
51
+ .np-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%;
53
57
  }
54
58
 
55
- /* DEPRECATED: use `.wds-text-title-section` instead */
59
+ /* DEPRECATED: use .np-text-title-section instead */
56
60
  /* stylelint-disable-next-line selector-list-comma-newline-after */
57
61
  .h2,
58
62
  .title-2,
59
63
  h2,
60
- .np-text-title-section,
61
- .wds-text-title-section {
62
- &:extend(.wds-text-title-section);
64
+ .np-text-title-section {
63
65
  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%;
64
70
  }
65
71
 
66
- /* DEPRECATED: use `.wds-text-title-subsection` instead */
72
+ /* DEPRECATED: use .np-text-title-subsection instead */
67
73
  /* stylelint-disable-next-line selector-list-comma-newline-after */
68
74
  .h3,
69
75
  .title-3,
70
76
  h3,
71
- .np-text-title-subsection,
72
- .wds-text-title-subsection {
73
- &:extend(.wds-text-title-subsection);
77
+ .np-text-title-subsection {
74
78
  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%;
75
83
  }
76
84
 
77
- /* DEPRECATED: use `.wds-text-title-body` instead */
85
+ /* DEPRECATED: use .np-text-title-body instead */
78
86
  /* stylelint-disable-next-line selector-list-comma-newline-after */
79
87
  .h4,
80
88
  .title-4,
81
89
  h4,
82
- .np-text-title-body,
83
- .wds-text-title-body {
84
- &:extend(.wds-text-title-body);
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%;
85
95
  }
86
96
 
87
- /* DEPRECATED: use `.wds-text-title-group` instead */
97
+ /* DEPRECATED: use .np-text-title-group instead */
88
98
  /* stylelint-disable-next-line selector-list-comma-newline-after */
89
99
  .h5,
90
100
  .h6,
91
101
  .title-5,
92
102
  h5,
93
103
  h6,
94
- .np-text-title-group,
95
- .wds-text-title-group {
96
- &:extend(.wds-text-title-group);
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%;
97
109
  }
98
110
 
99
- /* DEPRECATED: use `.wds-text-title-body` instead */
111
+ /* DEPRECATED: use .np-text-title-body instead */
100
112
  .lead {
101
113
  margin-bottom: var(--size-24);
102
114
  font-size: var(--font-size-20);
103
115
  line-height: var(--line-height-title);
104
116
  }
105
117
 
106
- // DEPRECATED: use `.wds-text-body-default` instead
118
+ // DEPRECATED: use .np-text-body-default instead
107
119
  .tiny {
108
120
  color: var(--color-content-secondary);
109
121
  }
110
122
 
111
123
  // BODY
112
124
 
113
- /* DEPRECATED: use `.wds-text-body-default` instead */
125
+ /* DEPRECATED: use .np-text-body-default instead */
114
126
  /* stylelint-disable-next-line selector-list-comma-newline-after */
115
127
  .body-2,
116
128
  .body-3,
@@ -118,41 +130,49 @@ h6,
118
130
  .tiny,
119
131
  body,
120
132
  small,
121
- .np-text-body-default,
122
- .wds-text-body-default {
123
- &:extend(.wds-text-body-default);
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);
124
138
  .np-text-hyphenated;
125
139
  }
126
140
 
127
- /* DEPRECATED: use `.wds-text-body-default-bold` instead */
141
+ /* DEPRECATED: use .np-text-body-default-bold instead */
128
142
  /* stylelint-disable-next-line selector-list-comma-newline-after */
129
143
  .control-2,
130
144
 
131
145
  // DEPRECATED: use `Field` component (or in some edge cases `Label` component) instead
132
146
  .label, .control-label,
133
147
 
134
- .np-text-body-default-bold,
135
- .wds-text-body-default-bold {
136
- &:extend(.wds-text-body-default-bold);
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);
137
153
  .np-text-hyphenated;
138
154
  }
139
155
 
140
- /* DEPRECATED: use `.wds-text-body-large` instead */
156
+ /* DEPRECATED: use .np-text-body-large instead */
141
157
  /* stylelint-disable-next-line selector-list-comma-newline-after */
142
158
  .body-1,
143
159
  .value,
144
- .np-text-body-large,
145
- .wds-text-body-large {
146
- &:extend(.wds-text-body-large);
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;
147
165
  .np-text-hyphenated;
148
166
  }
149
167
 
150
- /* DEPRECATED: use `.wds-text-body-large-bold` instead */
168
+ /* DEPRECATED: use np-text-body-large-bold instead */
151
169
  /* stylelint-disable-next-line selector-list-comma-newline-after */
152
170
  .control-1,
153
- .np-text-body-large-bold,
154
- .wds-text-body-large-bold {
155
- &:extend(.wds-text-body-large-bold);
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;
156
176
  .np-text-hyphenated;
157
177
  }
158
178
 
@@ -179,25 +199,19 @@ a,
179
199
 
180
200
  // DISPLAY
181
201
 
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);
191
- }
192
-
193
- .np-text-display-number-medium,
194
- .wds-text-display-number-medium {
195
- &:extend(.wds-text-display-number-medium);
202
+ .np-text-display-number {
203
+ font-weight: var(--font-weight-semi-bold);
204
+ font-size: 40px;
205
+ line-height: 110%;
196
206
  }
197
207
 
198
- .np-text-display-number-large,
199
- .wds-text-display-number-large {
200
- &:extend(.wds-text-display-number-large);
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;
201
215
  }
202
216
 
203
217
  .display-1,
@@ -209,12 +223,28 @@ a,
209
223
  .np-text-display-large,
210
224
  .np-text-display-medium,
211
225
  .np-text-display-small {
212
- font-synthesis: none;
213
-
226
+ &,
214
227
  &--forced {
215
228
  font-family: var(--font-family-display);
216
229
  font-synthesis: none;
217
230
  }
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
+ }
218
248
  }
219
249
 
220
250
  /* DEPRECATED(.np-text-display-extra-large): use .np-text-display-large instead */
@@ -222,23 +252,36 @@ a,
222
252
  .np-text-display-large,
223
253
  .np-text-display-medium,
224
254
  .np-text-display-small {
255
+ letter-spacing: normal;
225
256
  .np-text-hyphenated;
226
257
  }
227
258
 
228
259
  .np-text-display-extra-large,
229
- .np-text-display-large,
230
- .wds-text-display-large {
231
- &:extend(.wds-text-display-large);
260
+ .np-text-display-large {
261
+ .display-formatting(var(--size-64), normal, var(--font-weight-bold));
232
262
  }
233
263
 
234
- .np-text-display-medium,
235
- .wds-text-display-medium {
236
- &:extend(.wds-text-display-medium);
264
+ .np-text-display-medium {
265
+ .display-formatting(var(--size-52), normal, var(--font-weight-bold));
237
266
  }
238
267
 
239
- .np-text-display-small,
240
- .wds-text-display-small {
241
- &:extend(.wds-text-display-small);
268
+ .np-text-display-small {
269
+ .display-formatting(var(--size-40), normal, var(--font-weight-bold));
270
+ }
271
+
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
+ }
242
285
  }
243
286
 
244
287
  /* Disable hyphenation for English
@@ -251,6 +294,117 @@ a,
251
294
  hyphens: none;
252
295
  }
253
296
 
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
+
254
408
  /* DEPRECATED: use `.np-text-display-*` instead */
255
409
  .display-1 {
256
410
  margin-bottom: var(--size-24);
@@ -18,11 +18,11 @@
18
18
  }
19
19
 
20
20
  &__title {
21
- .wds-text-title-body();
21
+ .np-text-title-body();
22
22
  }
23
23
 
24
24
  &__content {
25
- .wds-text-body-default;
25
+ .np-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
- .wds-text-body-default;
33
+ .np-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
- .wds-text-body-default;
77
+ .np-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,9 +174,8 @@
174
174
  color: inherit;
175
175
  }
176
176
 
177
- .small,
178
177
  .np-text-body-default,
179
- .wds-text-body-default,
178
+ .small,
180
179
  .secondary {
181
180
  color: @color-navy-content-secondary;
182
181
  }
@@ -314,7 +313,7 @@
314
313
  color: var(--color-content-secondary);
315
314
  white-space: nowrap; // as with > li > a
316
315
 
317
- .wds-text-title-group();
316
+ .np-text-title-group();
318
317
  }
319
318
 
320
319
  // Backdrop to catch body clicks on mobile, etc.
@@ -4,7 +4,7 @@
4
4
 
5
5
  .droppable {
6
6
  position: relative;
7
- .wds-text-body-large;
7
+ .np-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
- .wds-text-body-default;
6
+ .np-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
- .wds-text-body-default;
24
+ .np-text-body-default;
25
25
 
26
26
  &:hover,
27
27
  &:active,
@@ -102,8 +102,7 @@
102
102
 
103
103
  .tiny,
104
104
  .body-3,
105
- .np-text-body-default,
106
- .wds-text-body-default {
105
+ .np-text-body-default {
107
106
  color: @color-navy-content-primary;
108
107
  }
109
108
  }