@transferwise/components 46.41.0 → 46.41.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.
@@ -8,6 +8,9 @@
8
8
  border-color: #c9cbce !important;
9
9
  border-color: var(--color-interactive-secondary) !important;
10
10
  }
11
+ .np-upload-button-container.droppable-dropping:before {
12
+ z-index: 2;
13
+ }
11
14
  .np-upload-button-container input[type="file"] {
12
15
  opacity: 0;
13
16
  z-index: -1;
@@ -18,6 +21,7 @@
18
21
  }
19
22
  .np-upload-button {
20
23
  width: 100%;
24
+ border-top: 1px solid transparent;
21
25
  padding: 16px;
22
26
  padding: var(--padding-small);
23
27
  border-radius: 0;
@@ -7,6 +7,10 @@
7
7
 
8
8
  &.droppable-dropping {
9
9
  border-color: var(--color-interactive-secondary) !important;
10
+
11
+ &:before {
12
+ z-index: 2;
13
+ }
10
14
  }
11
15
 
12
16
  input[type="file"] {
@@ -22,6 +26,7 @@
22
26
 
23
27
  .np-upload-button {
24
28
  width: 100%;
29
+ border-top: 1px solid transparent;
25
30
  padding: var(--padding-small);
26
31
  border-radius: 0;
27
32
 
@@ -1,30 +1,49 @@
1
1
  .np-upload-item {
2
2
  border: 1px solid #c9cbce;
3
3
  border: 1px solid var(--color-interactive-secondary);
4
+ position: relative;
4
5
  }
5
- .np-upload-item:first-child ~ div:before {
6
+ .np-upload-item:first-child ~ div:not(.np-upload-item__link):before,
7
+ .np-upload-item:not(:first-child).np-upload-item__link .np-upload-item--link:before,
8
+ .np-upload-item.np-upload-item__link:hover .np-upload-item--link:after {
6
9
  display: block;
7
- position: relative;
10
+ position: absolute;
8
11
  height: 1px;
9
12
  background-color: rgba(0,0,0,0.10196);
10
13
  background-color: var(--color-border-neutral);
11
14
  content: " ";
12
- margin: 0 16px;
13
- margin: 0 var(--size-16);
15
+ left: 16px;
16
+ left: var(--size-16);
17
+ width: calc(100% - 2 * 16px);
18
+ width: calc(100% - 2 * var(--size-16));
19
+ }
20
+ .np-upload-item:first-child ~ div:not(.np-upload-item__link):before,
21
+ .np-upload-item:not(:first-child).np-upload-item__link .np-upload-item--link:before {
22
+ top: 0;
23
+ }
24
+ .np-upload-item.np-upload-item__link:hover .np-upload-item--link:after {
25
+ bottom: -1px;
14
26
  }
15
27
  .np-upload-item:first-child ~ div {
16
- border-top: 0;
28
+ border-top: 1px;
29
+ }
30
+ .np-upload-item:not(:first-child) .np-upload-item--link:hover {
31
+ border-top-color: rgba(0,0,0,0.10196);
32
+ border-top-color: var(--color-border-neutral);
17
33
  }
18
34
  .np-upload-item:not(:last-child) {
19
35
  border-bottom: 0;
20
36
  }
21
- .np-upload-item.np-upload-item__link:hover:before,
22
- .np-upload-button-container:hover:before {
23
- margin: 0 !important;
37
+ .np-upload-item.np-upload-item__link:hover + .np-upload-item:before,
38
+ .np-upload-item.np-upload-item__link:hover + .np-upload-button-container:before,
39
+ .np-upload-item.np-upload-item__link:hover + .np-upload-item .np-upload-item--link:before,
40
+ .np-upload-item.np-upload-item__link:hover + .np-upload-button-container .np-upload-item--link:before {
41
+ display: none;
24
42
  }
25
- .np-upload-item.np-upload-item__link:hover + div:before,
26
- .np-upload-button-container:hover + div:before {
27
- margin: 0 !important;
43
+ .np-upload-button-container:hover:before,
44
+ .np-upload-button-container.droppable-dropping:before {
45
+ left: 0 !important;
46
+ width: 100% !important;
28
47
  }
29
48
  .np-upload-button-container:has(:focus-visible) {
30
49
  outline: var(--ring-outline-color) solid var(--ring-outline-width);
@@ -41,17 +60,29 @@
41
60
  flex: 1;
42
61
  -webkit-text-decoration: none;
43
62
  text-decoration: none;
63
+ border-top: 1px solid transparent;
44
64
  border-radius: inherit;
45
65
  }
46
66
  .np-upload-item__link a:focus-visible {
47
67
  outline-offset: -2px;
48
68
  }
69
+ .np-upload-item__link a:hover:before {
70
+ display: none !important;
71
+ }
72
+ .np-upload-item__link a:hover:after {
73
+ left: 0 !important;
74
+ width: 100% !important;
75
+ }
49
76
  .np-upload-item__link a:hover,
50
77
  .np-upload-item__link a:active {
51
78
  -webkit-text-decoration: none;
52
79
  text-decoration: none;
80
+ }
81
+ .np-upload-item__link a:hover .np-upload-button,
82
+ .np-upload-item__link a:active .np-upload-button {
53
83
  background-color: rgba(134,167,189,0.10196);
54
84
  background-color: var(--color-background-neutral);
85
+ border-radius: inherit;
55
86
  }
56
87
  .np-upload-item__body {
57
88
  display: flex;
@@ -76,6 +107,7 @@
76
107
  outline-offset: 0 !important;
77
108
  background-color: rgba(134,167,189,0.10196);
78
109
  background-color: var(--color-background-neutral);
110
+ border: none;
79
111
  color: var(--color-interactive-primary);
80
112
  right: 16px;
81
113
  right: var(--size-16);
@@ -1,42 +1,69 @@
1
1
  @import (reference) "../../../node_modules/@transferwise/neptune-css/src/less/ring.less";
2
2
 
3
+ // Be aware of touching styles related to :before/:after pseudo-elements in this file, delimiters between items build by using them
3
4
  .np-upload-item {
4
5
  border: 1px solid var(--color-interactive-secondary);
6
+ position: relative;
5
7
 
6
- &:first-child ~ div:before {
8
+ &:first-child ~ div:not(.np-upload-item__link):before,
9
+ &:not(:first-child).np-upload-item__link .np-upload-item--link:before,
10
+ &.np-upload-item__link:hover .np-upload-item--link:after {
7
11
  display: block;
8
- position: relative;
12
+ position: absolute;
9
13
  height: 1px;
10
14
  background-color: var(--color-border-neutral);
11
15
  content: " ";
12
- margin: 0 var(--size-16);
16
+ left: var(--size-16);
17
+ width: calc(100% - 2 * var(--size-16));
18
+ }
19
+
20
+ &:first-child ~ div:not(.np-upload-item__link):before,
21
+ &:not(:first-child).np-upload-item__link .np-upload-item--link:before {
22
+ top: 0;
23
+ }
24
+
25
+ &.np-upload-item__link:hover .np-upload-item--link:after {
26
+ bottom: -1px;
13
27
  }
14
28
 
15
29
  &:first-child {
16
30
  & ~ div {
17
- border-top: 0;
31
+ border-top: 1px;
32
+ }
33
+ }
34
+
35
+ &:not(:first-child) {
36
+ .np-upload-item--link:hover {
37
+ border-top-color: var(--color-border-neutral);
18
38
  }
19
39
  }
20
40
 
21
41
  &:not(:last-child) {
22
42
  border-bottom: 0;
23
43
  }
24
- }
25
44
 
26
- .np-upload-item.np-upload-item__link:hover,
27
- .np-upload-button-container:hover {
28
- &:before {
29
- margin: 0 !important;
30
- }
31
- & + div:before {
32
- margin: 0 !important;
45
+
46
+ &.np-upload-item__link:hover + .np-upload-item,
47
+ &.np-upload-item__link:hover + .np-upload-button-container {
48
+ &:before,
49
+ .np-upload-item--link:before {
50
+ display: none;
51
+ }
33
52
  }
34
53
  }
35
54
 
36
- .np-upload-button-container:has(:focus-visible) {
37
- .ring();
38
- border-color: transparent;
39
- outline-offset: -3px;
55
+ .np-upload-button-container {
56
+ &:hover:before,
57
+ &.droppable-dropping:before {
58
+ left: 0 !important;
59
+ width: 100% !important;
60
+ }
61
+
62
+ &:has(:focus-visible) {
63
+ .ring();
64
+ border-color: transparent;
65
+ outline-offset: -3px;
66
+ }
40
67
  }
41
68
 
42
69
  .np-upload-item--single-file:focus-visible,
@@ -49,15 +76,31 @@
49
76
  a {
50
77
  flex: 1;
51
78
  text-decoration: none;
79
+ border-top: 1px solid transparent;
52
80
  border-radius: inherit;
81
+
53
82
  &:focus-visible {
54
83
  outline-offset: -2px;
55
84
  }
56
85
 
86
+ &:hover {
87
+ &:before {
88
+ display: none !important;
89
+ }
90
+
91
+ &:after {
92
+ left: 0 !important;
93
+ width: 100% !important;
94
+ }
95
+ }
96
+
57
97
  &:hover,
58
98
  &:active {
59
99
  text-decoration: none;
60
- background-color: var(--color-background-neutral);
100
+ .np-upload-button {
101
+ background-color: var(--color-background-neutral);
102
+ border-radius: inherit;
103
+ }
61
104
  }
62
105
  }
63
106
  }
@@ -84,6 +127,7 @@
84
127
  border-radius: 50% !important;
85
128
  outline-offset: 0 !important;
86
129
  background-color: var(--color-background-neutral);
130
+ border: none;
87
131
  color: var(--color-interactive-primary);
88
132
  right: var(--size-16);
89
133
  top: var(--size-16);