@transferwise/neptune-css 14.8.2 → 14.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/css/border-radius.css +8 -0
  2. package/dist/css/flex.css +417 -253
  3. package/dist/css/navbar-base.css +168 -339
  4. package/dist/css/navbar.css +41 -107
  5. package/dist/css/neptune-addons.css +426 -898
  6. package/dist/css/neptune-core.css +163 -200
  7. package/dist/css/neptune.css +14432 -15228
  8. package/dist/css/utilities.css +1202 -72
  9. package/package.json +1 -1
  10. package/src/less/{mixins → addons}/_center-block.less +2 -4
  11. package/src/less/addons/_spacing-utilities.less +3 -26
  12. package/src/less/border-radius.less +1 -3
  13. package/src/less/core/_scaffolding.less +7 -27
  14. package/src/less/core/_typography-utilities.less +17 -237
  15. package/src/less/flex.less +9 -18
  16. package/src/less/navbar.less +10 -2
  17. package/src/less/neptune-addons.less +4 -1
  18. package/src/less/utilities/align-items.less +107 -0
  19. package/src/less/utilities/align-self.less +107 -0
  20. package/src/less/utilities/border-radius.less +11 -0
  21. package/src/less/utilities/color.less +70 -0
  22. package/src/less/utilities/cursor.less +3 -0
  23. package/src/less/utilities/display.less +178 -0
  24. package/src/less/utilities/flex-direction.less +47 -0
  25. package/src/less/utilities/flex-grow.less +27 -0
  26. package/src/less/utilities/flex-wrap.less +47 -0
  27. package/src/less/utilities/float.less +77 -0
  28. package/src/less/utilities/font-weight.less +11 -0
  29. package/src/less/utilities/gap.less +3 -0
  30. package/src/less/utilities/justify-content.less +107 -0
  31. package/src/less/utilities/margin.less +192 -0
  32. package/src/less/utilities/max-width.less +3 -0
  33. package/src/less/utilities/order.less +87 -0
  34. package/src/less/utilities/outline-style.less +8 -0
  35. package/src/less/utilities/overflow-wrap.less +3 -0
  36. package/src/less/utilities/padding.less +179 -0
  37. package/src/less/utilities/position.less +3 -0
  38. package/src/less/utilities/rotate.less +12 -0
  39. package/src/less/utilities/screen-reader.less +24 -0
  40. package/src/less/utilities/text-align.less +87 -0
  41. package/src/less/utilities/text-decoration-line.less +8 -0
  42. package/src/less/utilities/text-overflow.less +7 -0
  43. package/src/less/utilities/text-transform.less +11 -0
  44. package/src/less/utilities/visibility.less +3 -0
  45. package/src/less/utilities/white-space.less +27 -0
  46. package/src/less/utilities.less +29 -141
  47. package/src/less/addons/_display-utilities.less +0 -159
  48. package/src/less/addons/_utilities.less +0 -147
  49. package/src/less/mixins/_flex.less +0 -105
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@transferwise/neptune-css",
3
3
  "description": "Neptune CSS library",
4
- "version": "14.8.2",
4
+ "version": "14.9.0",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,7 +1,5 @@
1
- // Center-align a block level element
2
-
3
- .center-block() {
4
- display: block;
1
+ .center-block {
5
2
  margin-left: auto;
6
3
  margin-right: auto;
4
+ display: block;
7
5
  }
@@ -1,37 +1,14 @@
1
1
  @import "../mixins/_spacing.less";
2
2
 
3
- .spacing(0, 0);
4
- .spacing(1, var(--size-8));
5
- .spacing(2, var(--size-16));
6
- .spacing(3, var(--size-24));
7
- .spacing(4, var(--size-32));
8
- .spacing(5, var(--size-40));
9
-
10
- .spacing-vertical(4, var(--size-32));
11
- .spacing-vertical(5, var(--size-40));
12
-
13
- .gap-y-1 {
14
- row-gap: var(--size-8);
15
- }
3
+ @import "../utilities/gap.less";
4
+ @import "../utilities/margin.less";
5
+ @import "../utilities/padding.less";
16
6
 
17
7
  .responsive-spacing(panel, var(--size-16), var(--size-24), var(--size-32));
18
8
  .responsive-spacing-vertical(section-1, var(--size-16), var(--size-24), var(--size-32));
19
9
  .responsive-spacing-vertical(section-2, var(--size-32), var(--size-48), var(--size-64));
20
10
  .responsive-spacing-vertical(section-3, var(--size-48), var(--size-72), var(--size-96));
21
11
 
22
- .m-x-auto {
23
- .margin(right,auto) !important;
24
- .margin(left, auto) !important;
25
- }
26
-
27
- .m-r-auto {
28
- .margin(right,auto) !important;
29
- }
30
-
31
- .m-l-auto {
32
- .margin(left, auto) !important;
33
- }
34
-
35
12
  .section {
36
13
  padding-top: var(--size-48);
37
14
  padding-bottom: var(--size-48);
@@ -1,3 +1 @@
1
- .rounded-sm {
2
- border-radius: 2px;
3
- }
1
+ @import "./utilities/border-radius.less";
@@ -5,8 +5,13 @@
5
5
  @import (reference) "../mixins/_logical-properties.less";
6
6
  @import (reference) "../mixins/_links.less";
7
7
  @import (reference) "../core/_typography.less";
8
+ @import (reference) "../utilities/border-radius.less";
8
9
  @import "../../variables/legacy-variables.less";
9
10
 
11
+ /* TODO: Remove utility imports to prevent duplicates */
12
+ @import "../utilities/border-radius.less";
13
+ @import "../utilities/screen-reader.less";
14
+
10
15
  :root {
11
16
  // page default font size should be set in absolute units (pixels)
12
17
  --base-font-size: 16px;
@@ -333,11 +338,11 @@ video {
333
338
  }
334
339
 
335
340
  .img-rounded {
336
- border-radius: var(--radius-small);
341
+ .rounded();
337
342
  }
338
343
 
339
344
  .img-circle {
340
- border-radius: 50%;
345
+ .rounded-full();
341
346
  }
342
347
 
343
348
  .disabled,
@@ -346,28 +351,3 @@ video {
346
351
  opacity: 0.45;
347
352
  cursor: not-allowed !important;
348
353
  }
349
-
350
- // Only display content to screen readers
351
- .sr-only {
352
- position: absolute;
353
- width: 1px;
354
- height: 1px;
355
- margin: -1px;
356
- padding: 0;
357
- overflow: hidden;
358
- border: 0;
359
- clip: rect(0, 0, 0, 0);
360
- }
361
-
362
- // Use in conjunction with `.sr-only` to only display content when it's focused.
363
- .sr-only-focusable {
364
- &:active,
365
- &:focus {
366
- position: static;
367
- width: auto;
368
- height: auto;
369
- margin: 0;
370
- overflow: visible;
371
- clip: auto;
372
- }
373
- }
@@ -3,247 +3,27 @@
3
3
  @import (reference) "../mixins/_links.less";
4
4
  @import "../mixins/_text-emphasis.less";
5
5
 
6
- // Deprecated classes in next iterations.
7
-
8
- //.text-danger (Replaced by .text-negative)
9
- //.text-success( Replaced by .text-positive)
10
-
11
- .text-xs-left {
12
- .text-align(left);
13
- }
14
-
15
- .text-xs-right {
16
- .text-align(right);
17
- }
18
-
19
- .text-xs-center {
20
- text-align: center;
21
- }
22
-
23
- .text-xs-justify {
24
- text-align: justify;
25
- }
26
-
27
- .text-xs-nowrap {
28
- white-space: nowrap;
29
- }
30
-
31
- @media (--screen-sm) {
32
- .text-sm-left {
33
- .text-align(left);
34
- }
35
-
36
- .text-sm-right {
37
- .text-align(right);
38
- }
39
-
40
- .text-sm-center {
41
- text-align: center;
42
- }
43
-
44
- .text-sm-justify {
45
- text-align: justify;
46
- }
47
-
48
- .text-sm-nowrap {
49
- white-space: nowrap;
50
- }
51
- }
52
-
53
- @media (--screen-md) {
54
- .text-md-left {
55
- .text-align(left);
56
- }
57
-
58
- .text-md-right {
59
- .text-align(right);
60
- }
61
-
62
- .text-md-center {
63
- text-align: center;
64
- }
65
-
66
- .text-md-justify {
67
- text-align: justify;
68
- }
69
-
70
- .text-md-nowrap {
71
- white-space: nowrap;
72
- }
73
- }
74
-
75
- @media (--screen-lg) {
76
- .text-lg-left {
77
- .text-align(left);
78
- }
79
-
80
- .text-lg-right {
81
- .text-align(right);
82
- }
83
-
84
- .text-lg-center {
85
- text-align: center;
86
- }
87
-
88
- .text-lg-justify {
89
- text-align: justify;
90
- }
91
-
92
- .text-lg-nowrap {
93
- white-space: nowrap;
94
- }
95
- }
96
-
97
- @media (--screen-xl) {
98
- .text-xl-left {
99
- .text-align(left);
100
- }
101
-
102
- .text-xl-right {
103
- .text-align(right);
104
- }
105
-
106
- .text-xl-center {
107
- text-align: center;
108
- }
109
-
110
- .text-xl-justify {
111
- text-align: justify;
112
- }
113
-
114
- .text-xl-nowrap {
115
- white-space: nowrap;
116
- }
117
- }
118
-
119
- .text-lowercase {
120
- text-transform: lowercase;
121
- }
122
-
123
- .text-uppercase {
124
- text-transform: uppercase;
125
- }
126
-
127
- .text-capitalize {
128
- text-transform: capitalize;
129
- }
130
-
131
- .text-underline {
132
- .link-underline(true);
133
- }
134
-
135
- .text-no-decoration {
136
- text-decoration: none !important;
137
- }
138
-
139
- .text-ellipsis,
140
- .text-ellipses {
141
- display: block;
142
- text-overflow: ellipsis;
143
- white-space: nowrap;
144
- overflow: hidden;
145
- }
146
-
147
- .text-max-width {
148
- max-width: 600px;
149
- }
150
-
151
- .text-word-break {
152
- word-break: break-all;
153
- }
154
-
155
- .font-weight-bold {
156
- font-weight: var(--font-weight-bold) !important;
157
- }
158
-
159
- .font-weight-semi-bold {
160
- font-weight: var(--font-weight-semi-bold) !important;
161
- }
162
-
163
- .font-weight-normal {
164
- font-weight: var(--font-weight-regular) !important;
165
- }
166
-
6
+ /* TODO: Remove utility imports to prevent duplicates */
7
+ @import "../utilities/color.less";
8
+ @import "../utilities/font-weight.less";
9
+ @import "../utilities/max-width.less";
10
+ @import "../utilities/overflow-wrap.less";
11
+ @import "../utilities/text-align.less";
12
+ @import "../utilities/text-decoration-line.less";
13
+ @import "../utilities/text-overflow.less";
14
+ @import "../utilities/text-transform.less";
15
+ @import "../utilities/white-space.less";
16
+
17
+ /**
18
+ * @deprecated Obsolete since the brand has turned green.
19
+ */
167
20
  .font-italic {
168
21
  font-style: italic !important;
169
22
  }
170
23
 
171
- // Contextual colors `.text-*`
172
-
173
- .text-primary {
174
- .text-emphasis-variant(var(--color-content-primary), var(--color-content-primary), var(--color-content-primary));
175
-
176
- // @DEPRECATED: .bg-primary use .bg-elevated or ThemeProvider with theme="forest-green" instead
177
- .bg-primary & {
178
- color: @color-navy-content-primary !important;
179
- }
180
- }
181
-
182
- .text-secondary {
183
- color: var(--color-content-secondary) !important;
184
- }
185
-
186
- .text-positive,
187
- .text-success {
188
- .text-emphasis-variant(
189
- var(--color-content-positive),
190
- var(--color-content-positive),
191
- var(--color-content-positive-hover)
192
- );
193
-
194
- // @DEPRECATED: .bg-primary use .bg-elevated or ThemeProvider with theme="forest-green" instead
195
- .bg-primary & {
196
- color: @color-navy-content-positive !important;
197
- }
198
- }
199
-
200
- .text-accent,
201
- .text-info {
202
- .text-emphasis-variant(var(--color-content-accent), var(--color-content-accent), var(--color-content-accent-hover));
203
- color: var(--color-interactive-primary) !important;
204
-
205
- // @DEPRECATED: .bg-primary use .bg-elevated or ThemeProvider with theme="forest-green" instead
206
- .bg-primary & {
207
- color: @color-navy-content-accent !important;
208
- }
209
- }
210
-
211
- .text-warning {
212
- .text-emphasis-variant(
213
- var(--color-content-warning),
214
- var(--color-content-warning),
215
- var(--color-content-warning-hover),
216
- );
217
-
218
- // @DEPRECATED: .bg-primary use .bg-elevated or ThemeProvider with theme="forest-green" instead
219
- .bg-primary & {
220
- color: @color-navy-content-warning !important;
221
- }
222
- }
223
-
224
- .text-negative,
225
- .text-danger {
226
- .text-emphasis-variant(
227
- var(--color-sentiment-negative),
228
- var(--color-sentiment-negative),
229
- var(--color-sentiment-negative-hover)
230
- );
231
-
232
- // @DEPRECATED: .bg-primary use .bg-elevated or ThemeProvider with theme="forest-green" instead
233
- .bg-primary & {
234
- color: @color-navy-content-negative !important;
235
- }
236
- }
237
-
238
- .text-inverse {
239
- .text-emphasis-variant(@color-navy-content-primary, @color-navy-content-primary, @color-navy-content-secondary);
240
- }
241
-
242
- .text-muted {
243
- color: var(--color-content-tertiary) !important;
244
- }
245
-
246
- // @deprecated: we no longer have "colored dot" design feature in new brand
24
+ /**
25
+ * @deprecated Obsolete since the brand has turned green.
26
+ */
247
27
  .colored-dot {
248
28
  &::after {
249
29
  content: none;
@@ -1,24 +1,15 @@
1
1
  // mixins
2
- @import (reference) "./mixins/_flex.less";
3
2
  @import (reference) "./mixins/_logical-properties.less";
4
3
 
5
- .flex-properties(~"");
6
-
7
- @media (--screen-sm) {
8
- .flex-properties(--sm);
9
- }
10
-
11
- @media (--screen-md) {
12
- .flex-properties(--md);
13
- }
14
-
15
- @media (--screen-lg) {
16
- .flex-properties(--lg);
17
- }
18
-
19
- @media (--screen-xl) {
20
- .flex-properties(--xl);
21
- }
4
+ /* TODO: Remove utility imports to prevent duplicates */
5
+ @import "./utilities/align-items.less";
6
+ @import "./utilities/align-self.less";
7
+ @import "./utilities/display.less";
8
+ @import "./utilities/flex-direction.less";
9
+ @import "./utilities/flex-grow.less";
10
+ @import "./utilities/flex-wrap.less";
11
+ @import "./utilities/justify-content.less";
12
+ @import "./utilities/order.less";
22
13
 
23
14
  /* Items */
24
15
  .flex__inner {
@@ -4,12 +4,15 @@
4
4
  @import (reference) "./mixins/_arrows.less";
5
5
  @import (reference) "./mixins/_border-radius.less";
6
6
  @import (reference) "./mixins/_clearfix.less";
7
- @import (reference) "./mixins/_center-block.less";
8
7
  @import (reference) "./mixins/_hide-text.less";
9
8
  @import (reference) "./mixins/_grid.less";
10
9
  @import (reference) "./mixins/_tab-focus.less";
11
10
  @import (reference) "./mixins/_logical-properties.less";
12
- @import "./addons/_utilities.less";
11
+
12
+ /* TODO: Remove utility imports to prevent duplicates */
13
+ @import "./addons/_center-block.less";
14
+ @import "./utilities/float.less";
15
+
13
16
  @import "dropdowns.less";
14
17
  @import "navs.less";
15
18
  @import "navbar-base.less";
@@ -104,3 +107,8 @@
104
107
  .navbar-background--inverse {
105
108
  background-color: @color-navy-background-elevated;
106
109
  }
110
+
111
+ /* TODO: Remove to prefer direct utility imports */
112
+ .clearfix {
113
+ .clearfix();
114
+ }
@@ -1,4 +1,7 @@
1
1
  @import "./addons/_background-utilities.less";
2
- @import "./addons/_display-utilities.less";
3
2
  @import "./addons/_spacing-utilities.less";
4
3
  @import "./addons/_border.less";
4
+
5
+ /* TODO: Remove utility imports to prevent duplicates */
6
+ @import "./utilities/display.less";
7
+ @import "./utilities/outline-style.less";
@@ -0,0 +1,107 @@
1
+ .align-items-start {
2
+ align-items: flex-start;
3
+ }
4
+
5
+ .align-items-end {
6
+ align-items: flex-end;
7
+ }
8
+
9
+ .align-items-center {
10
+ align-items: center;
11
+ }
12
+
13
+ .align-items-baseline {
14
+ align-items: baseline;
15
+ }
16
+
17
+ .align-items-stretch {
18
+ align-items: stretch;
19
+ }
20
+
21
+ @media (--screen-sm) {
22
+ .align-items-start--sm {
23
+ align-items: flex-start;
24
+ }
25
+
26
+ .align-items-end--sm {
27
+ align-items: flex-end;
28
+ }
29
+
30
+ .align-items-center--sm {
31
+ align-items: center;
32
+ }
33
+
34
+ .align-items-baseline--sm {
35
+ align-items: baseline;
36
+ }
37
+
38
+ .align-items-stretch--sm {
39
+ align-items: stretch;
40
+ }
41
+ }
42
+
43
+ @media (--screen-md) {
44
+ .align-items-start--md {
45
+ align-items: flex-start;
46
+ }
47
+
48
+ .align-items-end--md {
49
+ align-items: flex-end;
50
+ }
51
+
52
+ .align-items-center--md {
53
+ align-items: center;
54
+ }
55
+
56
+ .align-items-baseline--md {
57
+ align-items: baseline;
58
+ }
59
+
60
+ .align-items-stretch--md {
61
+ align-items: stretch;
62
+ }
63
+ }
64
+
65
+ @media (--screen-lg) {
66
+ .align-items-start--lg {
67
+ align-items: flex-start;
68
+ }
69
+
70
+ .align-items-end--lg {
71
+ align-items: flex-end;
72
+ }
73
+
74
+ .align-items-center--lg {
75
+ align-items: center;
76
+ }
77
+
78
+ .align-items-baseline--lg {
79
+ align-items: baseline;
80
+ }
81
+
82
+ .align-items-stretch--lg {
83
+ align-items: stretch;
84
+ }
85
+ }
86
+
87
+ @media (--screen-xl) {
88
+ .align-items-start--xl {
89
+ align-items: flex-start;
90
+ }
91
+
92
+ .align-items-end--xl {
93
+ align-items: flex-end;
94
+ }
95
+
96
+ .align-items-center--xl {
97
+ align-items: center;
98
+ }
99
+
100
+ .align-items-baseline--xl {
101
+ align-items: baseline;
102
+ }
103
+
104
+ .align-items-stretch--xl {
105
+ align-items: stretch;
106
+ }
107
+ }
@@ -0,0 +1,107 @@
1
+ .align-self-start {
2
+ align-self: flex-start;
3
+ }
4
+
5
+ .align-self-end {
6
+ align-self: flex-end;
7
+ }
8
+
9
+ .align-self-center {
10
+ align-self: center;
11
+ }
12
+
13
+ .align-self-stretch {
14
+ align-self: stretch;
15
+ }
16
+
17
+ .align-self-baseline {
18
+ align-self: baseline;
19
+ }
20
+
21
+ @media (--screen-sm) {
22
+ .align-self-start--sm {
23
+ align-self: flex-start;
24
+ }
25
+
26
+ .align-self-end--sm {
27
+ align-self: flex-end;
28
+ }
29
+
30
+ .align-self-center--sm {
31
+ align-self: center;
32
+ }
33
+
34
+ .align-self-stretch--sm {
35
+ align-self: stretch;
36
+ }
37
+
38
+ .align-self-baseline--sm {
39
+ align-self: baseline;
40
+ }
41
+ }
42
+
43
+ @media (--screen-md) {
44
+ .align-self-start--md {
45
+ align-self: flex-start;
46
+ }
47
+
48
+ .align-self-end--md {
49
+ align-self: flex-end;
50
+ }
51
+
52
+ .align-self-center--md {
53
+ align-self: center;
54
+ }
55
+
56
+ .align-self-stretch--md {
57
+ align-self: stretch;
58
+ }
59
+
60
+ .align-self-baseline--md {
61
+ align-self: baseline;
62
+ }
63
+ }
64
+
65
+ @media (--screen-lg) {
66
+ .align-self-start--lg {
67
+ align-self: flex-start;
68
+ }
69
+
70
+ .align-self-end--lg {
71
+ align-self: flex-end;
72
+ }
73
+
74
+ .align-self-center--lg {
75
+ align-self: center;
76
+ }
77
+
78
+ .align-self-stretch--lg {
79
+ align-self: stretch;
80
+ }
81
+
82
+ .align-self-baseline--lg {
83
+ align-self: baseline;
84
+ }
85
+ }
86
+
87
+ @media (--screen-xl) {
88
+ .align-self-start--xl {
89
+ align-self: flex-start;
90
+ }
91
+
92
+ .align-self-end--xl {
93
+ align-self: flex-end;
94
+ }
95
+
96
+ .align-self-center--xl {
97
+ align-self: center;
98
+ }
99
+
100
+ .align-self-stretch--xl {
101
+ align-self: stretch;
102
+ }
103
+
104
+ .align-self-baseline--xl {
105
+ align-self: baseline;
106
+ }
107
+ }
@@ -0,0 +1,11 @@
1
+ .rounded-sm {
2
+ border-radius: 2px;
3
+ }
4
+
5
+ .rounded {
6
+ border-radius: var(--radius-small);
7
+ }
8
+
9
+ .rounded-full {
10
+ border-radius: var(--radius-full);
11
+ }