@transferwise/neptune-css 14.28.2 → 14.29.1

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 (51) hide show
  1. package/dist/css/accordion.css +27 -46
  2. package/dist/css/alerts.css +56 -124
  3. package/dist/css/badge.css +20 -30
  4. package/dist/css/breadcrumbs.css +6 -4
  5. package/dist/css/button-groups.css +116 -254
  6. package/dist/css/buttons.css +50 -95
  7. package/dist/css/chevron.css +3 -0
  8. package/dist/css/circles.css +38 -76
  9. package/dist/css/close.css +1 -4
  10. package/dist/css/column-layout.css +38 -60
  11. package/dist/css/currency-flags.css +4 -17
  12. package/dist/css/decision.css +14 -12
  13. package/dist/css/dropdowns.css +59 -210
  14. package/dist/css/droppable.css +43 -38
  15. package/dist/css/flex.css +40 -136
  16. package/dist/css/footer.css +15 -14
  17. package/dist/css/grid.css +383 -1430
  18. package/dist/css/input-groups.css +254 -542
  19. package/dist/css/link-callout.css +2 -8
  20. package/dist/css/list-group.css +57 -92
  21. package/dist/css/loaders.css +11 -11
  22. package/dist/css/media.css +10 -34
  23. package/dist/css/modals.css +49 -59
  24. package/dist/css/navbar.css +372 -812
  25. package/dist/css/navs.css +59 -124
  26. package/dist/css/neptune-addons.css +687 -1234
  27. package/dist/css/neptune-core.css +123 -229
  28. package/dist/css/neptune-social-media.css +9 -33
  29. package/dist/css/neptune.css +3060 -6498
  30. package/dist/css/panels.css +143 -243
  31. package/dist/css/popovers.css +114 -295
  32. package/dist/css/process.css +79 -86
  33. package/dist/css/progress-bars.css +13 -19
  34. package/dist/css/select.css +21 -53
  35. package/dist/css/sequences.css +99 -219
  36. package/dist/css/table.css +48 -43
  37. package/dist/css/tick.css +14 -11
  38. package/dist/css/tooltip.css +49 -82
  39. package/dist/css/utilities.css +12 -40
  40. package/dist/css/wells.css +16 -16
  41. package/dist/less/legacy-variables.css +0 -0
  42. package/dist/less/neptune-tokens.css +0 -0
  43. package/package.json +2 -2
  44. package/src/less/addons/_spacing-utilities.less +4 -4
  45. package/src/less/buttons.less +3 -11
  46. package/src/less/chevron.less +4 -0
  47. package/src/less/mixins/_logical-properties-IE-friendly.less +1 -0
  48. package/src/less/mixins/_logical-properties-modern-browsers.less +80 -41
  49. package/src/less/mixins/_logical-properties.less +3 -3
  50. package/src/less/process.less +13 -6
  51. package/src/less/tick.less +7 -3
@@ -1,4 +1,3 @@
1
-
2
1
  // Mixin to support Logical properties/values for modern browsers
3
2
 
4
3
  // Custom property for the cases which doesn't exist a logical value. (Translations, linear-gradients)
@@ -17,20 +16,10 @@
17
16
 
18
17
  .float(@direction) {
19
18
  & when (@direction = left) {
20
- [dir="rtl"] & {
21
- float: right;
22
- }
23
-
24
- float: @direction;
25
19
  float: inline-start;
26
20
  }
27
21
 
28
22
  & when (@direction = right) {
29
- [dir="rtl"] & {
30
- float: left;
31
- }
32
-
33
- float: @direction;
34
23
  float: inline-end;
35
24
  }
36
25
  }
@@ -39,20 +28,10 @@
39
28
 
40
29
  .clear(@direction) {
41
30
  & when (@direction = left) {
42
- [dir="rtl"] & {
43
- clear: right;
44
- }
45
-
46
- clear: @direction;
47
31
  clear: inline-start;
48
32
  }
49
33
 
50
34
  & when (@direction = right) {
51
- [dir="rtl"] & {
52
- clear: left;
53
- }
54
-
55
- clear: @direction;
56
35
  clear: inline-end;
57
36
  }
58
37
  }
@@ -71,7 +50,27 @@
71
50
 
72
51
  // CSS Logical Properties: https://caniuse.com/css-logical-props
73
52
 
74
- .padding(@direction, @value) {
53
+ .padding(@direction, @value, @oppositeValue: ~"") {
54
+ & when (@direction = left) {
55
+ padding-inline-start: @value;
56
+ & when not (@oppositeValue = ~"") {
57
+ [dir="rtl"] & {
58
+ padding-inline-end: @oppositeValue;
59
+ }
60
+ }
61
+ }
62
+
63
+ & when (@direction = right) {
64
+ padding-inline-end: @value;
65
+ & when not (@oppositeValue = ~"") {
66
+ [dir="rtl"] & {
67
+ padding-inline-start: @oppositeValue;
68
+ }
69
+ }
70
+ }
71
+ }
72
+
73
+ .padding-for-spacing(@direction, @value) {
75
74
  & when (@direction = left) {
76
75
  padding-inline-start: @value;
77
76
  }
@@ -85,25 +84,45 @@
85
84
  // Use for single value shorthand 'padding: var(--foo);' -> '.padding-shorthand(var(--foo))'
86
85
  // Use for multiple value shorthand 'padding: var(--foo1) var(--foo2) var(--foo3) var(--foo4);' -> '.padding-shorthand(var(--foo1), var(--foo2), var(--foo3), var(--foo4))'
87
86
 
88
- .padding-shorthand(@value1, @value2: ~'', @value3: ~'', @value4: ~'') {
89
- [dir="rtl"] & {
90
- padding: @value1 @value4 @value3 @value2;
87
+ .padding-shorthand(@value1, @value2: ~"", @value3: ~"", @value4: ~"") {
88
+ & when (@value2 = ~"") {
89
+ padding: @value1;
91
90
  }
92
-
93
- html:not([dir="rtl"]) & {
94
- padding: @value1 @value2 @value3 @value4;
91
+ & when not (@value2 = ~"") {
92
+ padding-block: @value1 @value3;
93
+ padding-inline: @value4 @value2;
95
94
  }
96
95
  }
97
96
 
98
97
  // CSS Logical Properties: https://caniuse.com/css-logical-props
99
98
 
100
- .margin(@direction, @value) {
99
+ .margin(@direction, @value, @oppositeValue: ~"") {
101
100
  & when (@direction = left) {
102
101
  margin-inline-start: @value;
102
+ & when not (@oppositeValue = ~"") {
103
+ [dir="rtl"] & {
104
+ margin-inline-end: @oppositeValue;
105
+ }
106
+ }
103
107
  }
104
108
 
105
109
  & when (@direction = right) {
106
- padding-inline-end: @value;
110
+ margin-inline-end: @value;
111
+ & when not (@oppositeValue = ~"") {
112
+ [dir="rtl"] & {
113
+ margin-inline-start: @oppositeValue;
114
+ }
115
+ }
116
+ }
117
+ }
118
+
119
+ .margin-for-spacing(@direction, @value) {
120
+ & when (@direction = left) {
121
+ margin-inline-start: @value;
122
+ }
123
+
124
+ & when (@direction = right) {
125
+ margin-inline-end: @value;
107
126
  }
108
127
  }
109
128
 
@@ -111,29 +130,39 @@
111
130
  // Use for single value shorthand 'margin: var(--foo);' -> '.margin-shorthand(var(--foo))'
112
131
  // Use for multiple value shorthand 'margin: var(--foo1) var(--foo2) var(--foo3) var(--foo4);' -> '.margin-shorthand(var(--foo1), var(--foo2), var(--foo3), var(--foo4))'
113
132
 
114
- .margin-shorthand(@value1, @value2: ~'', @value3: ~'', @value4: ~'') {
115
- [dir="rtl"] & {
116
- margin: @value1 @value4 @value3 @value2;
133
+ .margin-shorthand(@value1, @value2: ~"", @value3: ~"", @value4: ~"") {
134
+ & when (@value2 = ~"") {
135
+ margin: @value1;
117
136
  }
118
-
119
- html:not([dir="rtl"]) & {
120
- margin: @value1 @value2 @value3 @value4;
137
+ & when not (@value2 = ~"") {
138
+ margin-block: @value1 @value3;
139
+ margin-inline: @value4 @value2;
121
140
  }
122
141
  }
123
142
 
124
143
  // CSS property: inset-inline (positions): https://caniuse.com/mdn-css_properties_inset-inline
125
144
 
126
- .left(@value) {
145
+ .left(@value, @oppositeValue: ~"") {
127
146
  inset-inline-start: @value;
147
+ & when not (@oppositeValue = ~"") {
148
+ [dir="rtl"] & {
149
+ inset-inline-end: @oppositeValue;
150
+ }
151
+ }
128
152
  }
129
153
 
130
- .right(@value) {
154
+ .right(@value, @oppositeValue: ~"") {
131
155
  inset-inline-end: @value;
156
+ & when not (@oppositeValue = ~"") {
157
+ [dir="rtl"] & {
158
+ inset-inline-start: @oppositeValue;
159
+ }
160
+ }
132
161
  }
133
162
 
134
163
  // CSS property: border-inline-start https://caniuse.com/mdn-css_properties_border-inline-start
135
164
 
136
- .border(@direction, @size, @style: ~'', @color: ~'') {
165
+ .border(@direction, @size, @style: ~"", @color: ~"") {
137
166
  & when (@direction = left) {
138
167
  border-inline-start: @size @style @color;
139
168
  }
@@ -193,7 +222,7 @@
193
222
 
194
223
  // Background position
195
224
 
196
- .background-position(@direction, @vertical-direction: ~'') {
225
+ .background-position(@direction, @vertical-direction: ~"") {
197
226
  & when (@direction = left) {
198
227
  background-position: var(--left) @vertical-direction;
199
228
  }
@@ -215,9 +244,19 @@
215
244
  }
216
245
  }
217
246
 
247
+ // Rotations
248
+
249
+ .rotate(@deg) {
250
+ [dir="rtl"] & {
251
+ transform: rotate(@deg * -1);
252
+ }
253
+
254
+ transform: rotate(@deg);
255
+ }
256
+
218
257
  // Horizontal translations
219
258
 
220
- .translateX(@value, @transform2: ~'', @transform3: ~'') {
259
+ .translateX(@value, @transform2: ~"", @transform3: ~"") {
221
260
  [dir="rtl"] & {
222
261
  transform: translateX(@value * -1) @transform2 @transform3;
223
262
  }
@@ -1,5 +1,5 @@
1
1
  // Custom support for logical properties/values. Select one of the options:
2
2
 
3
- // @import '../mixins/_physical-properties.less';
4
- @import "./_logical-properties-IE-friendly.less";
5
- // @import '../mixins/_logical-properties-modern-browsers.less';
3
+ // @import "./_physical-properties.less";
4
+ // @import './_logical-properties-IE-friendly.less';
5
+ @import "../mixins/_logical-properties-modern-browsers.less";
@@ -84,6 +84,11 @@
84
84
  width: 50%;
85
85
  left: 25%;
86
86
  top: 25%;
87
+
88
+ // Icon is purely decorative — keep physical positioning in RTL
89
+ [dir="rtl"] & {
90
+ transform: rotate(45deg) scaleX(-1);
91
+ }
87
92
  }
88
93
 
89
94
  .process-icon-horizontal,
@@ -231,7 +236,7 @@
231
236
  }
232
237
  }
233
238
  .process-size(
234
- xs, @process-xxs-radius, @process-xxs-circumference, @process-xxs-stroke, @process-xxs-icon-size, @process-xxs-icon-stroke
239
+ xxs, @process-xxs-radius, @process-xxs-circumference, @process-xxs-stroke, @process-xxs-icon-size, @process-xxs-icon-stroke
235
240
  );
236
241
  .process-size(
237
242
  xs, @process-xs-radius, @process-xs-circumference, @process-xs-stroke, @process-xs-icon-size, @process-xs-icon-stroke
@@ -244,6 +249,10 @@
244
249
  );
245
250
 
246
251
  .process-xxs {
252
+ .process-icon-container {
253
+ display: none;
254
+ }
255
+
247
256
  .process-circle {
248
257
  animation-name: process-chase-circle-xxs;
249
258
  }
@@ -379,11 +388,9 @@
379
388
  }
380
389
 
381
390
  .btn .process:first-child {
382
- .margin(left, -12px);
383
-
384
- .margin(right, 12px);
385
-
386
- .float(left);
391
+ margin-left: -12px;
392
+ margin-right: 12px;
393
+ float: left;
387
394
  }
388
395
 
389
396
  .btn-block .process:first-child {
@@ -11,9 +11,13 @@
11
11
  content: "";
12
12
  position: absolute;
13
13
  background: var(--color-background-screen);
14
- transform: translateX(0.5px) rotate(-45deg);
14
+ transform: translateX(-1.5px) rotate(-45deg);
15
15
  transform-origin: left bottom;
16
- left: var(--size-8);
16
+
17
+ [dir="rtl"] & {
18
+ transform: translateX(-1.5px) rotate(-45deg) scaleX(-1);
19
+ transform-origin: right bottom;
20
+ }
17
21
  }
18
22
 
19
23
  .has-error {
@@ -34,4 +38,4 @@
34
38
  height: 2px;
35
39
  width: 11px;
36
40
  }
37
- }
41
+ }