@transferwise/components 0.0.0-experimental-e0e44ba → 0.0.0-experimental-9cff936

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 (48) hide show
  1. package/build/dateInput/DateInput.js +3 -0
  2. package/build/dateInput/DateInput.js.map +1 -1
  3. package/build/dateInput/DateInput.mjs +3 -0
  4. package/build/dateInput/DateInput.mjs.map +1 -1
  5. package/build/main.css +210 -210
  6. package/build/styles/main.css +210 -210
  7. package/build/styles/uploadInput/UploadInput.css +81 -13
  8. package/build/styles/uploadInput/uploadButton/UploadButton.css +31 -78
  9. package/build/styles/uploadInput/uploadItem/UploadItem.css +109 -130
  10. package/build/types/dateInput/DateInput.d.ts.map +1 -1
  11. package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
  12. package/build/types/uploadInput/uploadButton/UploadButton.d.ts +1 -6
  13. package/build/types/uploadInput/uploadButton/UploadButton.d.ts.map +1 -1
  14. package/build/uploadInput/UploadInput.js +16 -26
  15. package/build/uploadInput/UploadInput.js.map +1 -1
  16. package/build/uploadInput/UploadInput.mjs +16 -26
  17. package/build/uploadInput/UploadInput.mjs.map +1 -1
  18. package/build/uploadInput/uploadButton/UploadButton.js +31 -24
  19. package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
  20. package/build/uploadInput/uploadButton/UploadButton.mjs +31 -24
  21. package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
  22. package/build/uploadInput/uploadItem/UploadItem.js +37 -30
  23. package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
  24. package/build/uploadInput/uploadItem/UploadItem.mjs +38 -31
  25. package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
  26. package/build/uploadInput/uploadItem/UploadItemLink.js +1 -2
  27. package/build/uploadInput/uploadItem/UploadItemLink.js.map +1 -1
  28. package/build/uploadInput/uploadItem/UploadItemLink.mjs +1 -2
  29. package/build/uploadInput/uploadItem/UploadItemLink.mjs.map +1 -1
  30. package/package.json +3 -3
  31. package/src/actionOption/ActionOption.story.tsx +15 -11
  32. package/src/checkboxOption/CheckboxOption.story.tsx +4 -2
  33. package/src/dateInput/DateInput.tsx +3 -0
  34. package/src/main.css +210 -210
  35. package/src/navigationOption/NavigationOption.story.js +4 -2
  36. package/src/radioOption/RadioOption.story.tsx +4 -2
  37. package/src/switchOption/SwitchOption.story.tsx +4 -2
  38. package/src/uploadInput/UploadInput.css +81 -13
  39. package/src/uploadInput/UploadInput.less +79 -17
  40. package/src/uploadInput/UploadInput.tests.story.tsx +3 -8
  41. package/src/uploadInput/UploadInput.tsx +28 -38
  42. package/src/uploadInput/uploadButton/UploadButton.css +31 -78
  43. package/src/uploadInput/uploadButton/UploadButton.less +35 -78
  44. package/src/uploadInput/uploadButton/UploadButton.tsx +25 -36
  45. package/src/uploadInput/uploadItem/UploadItem.css +109 -130
  46. package/src/uploadInput/uploadItem/UploadItem.less +118 -129
  47. package/src/uploadInput/uploadItem/UploadItem.tsx +27 -27
  48. package/src/uploadInput/uploadItem/UploadItemLink.tsx +3 -3
@@ -1,165 +1,144 @@
1
- .np-upload-input__item {
1
+ .np-upload-item {
2
+ border: 1px solid #c9cbce;
3
+ border: 1px solid var(--color-interactive-secondary);
2
4
  position: relative;
3
- padding: 16px;
4
- padding: var(--size-16);
5
- display: flex;
6
- align-items: flex-start;
7
- border-left: var(--outerBorder);
8
- border-right: var(--outerBorder);
9
- }
10
- .np-upload-input__item:first-child {
11
- border-top: var(--outerBorder);
12
- border-top-left-radius: 10px;
13
- border-top-left-radius: var(--radius-small);
14
- border-top-right-radius: 10px;
15
- border-top-right-radius: var(--radius-small);
16
- }
17
- .np-upload-input__item + .np-upload-input__item:before {
18
- content: " ";
5
+ }
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 {
19
9
  display: block;
20
10
  position: absolute;
21
11
  height: 1px;
12
+ background-color: rgba(0,0,0,0.10196);
13
+ background-color: var(--color-border-neutral);
14
+ content: " ";
22
15
  left: 16px;
23
16
  left: var(--size-16);
24
17
  width: calc(100% - 2 * 16px);
25
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 {
26
22
  top: 0;
27
- background: rgba(0,0,0,0.10196);
28
- background: var(--color-border-neutral);
29
23
  }
30
- .np-upload-input__item .np-upload-input__item-content {
31
- padding-right: 32px;
32
- padding-right: var(--size-32);
33
- flex: 1;
24
+ .np-upload-item.np-upload-item--link:hover .np-upload-item__link:after {
25
+ bottom: -1px;
34
26
  }
35
- @media (max-width: 320px) {
36
- .np-upload-input__item .np-upload-input__item-content {
37
- padding-right: 64px;
38
- padding-right: var(--size-64);
39
- }
27
+ .np-upload-item:first-child ~ div {
28
+ border-top: 1px;
40
29
  }
41
- .np-upload-input__item .np-upload-input__title,
42
- .np-upload-input__item .np-upload-input__text {
43
- margin: 0;
44
- -moz-text-align-last: left;
45
- text-align-last: left;
46
- color: #5d7079;
47
- color: var(--color-content-secondary);
48
- }
49
- .np-upload-input__item .np-upload-input__title + .np-upload-input__text {
50
- margin-top: 4px;
51
- margin-top: var(--size-4);
52
- }
53
- .np-upload-input__item .np-upload-input__icon {
54
- padding-right: 16px;
55
- padding-right: var(--size-16);
56
- }
57
- .np-upload-input__item .np-upload-input__item-link,
58
- .np-upload-input__item .np-upload-input__item-container {
59
- align-items: flex-start;
60
- display: flex;
61
- width: 100%;
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);
62
33
  }
63
- .np-upload-input__item .np-upload-input__item-action {
64
- --iconSize: var(--size-24);
65
- --clickAreaSize: 44px;
66
- --buttonTopRightOffset: var(--size-16);
67
- --clickAreaTopRightOffset: calc((var(--clickAreaSize) - var(--iconSize)) * -0.5);
68
- position: absolute;
69
- right: 16px;
70
- right: var(--buttonTopRightOffset);
71
- top: 16px;
72
- top: var(--buttonTopRightOffset);
34
+ .np-upload-item:not(:last-child) {
35
+ border-bottom: 0;
73
36
  }
74
- @media (max-width: 320px) {
75
- .np-upload-input__item .np-upload-input__item-action {
76
- --iconSize: var(--size-48);
77
- --clickAreaTopRightOffset: calc(-1 * var(--buttonTopRightOffset));
78
- }
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;
79
42
  }
80
- .np-upload-input__item .np-upload-input__item-action .np-upload-input__item-button {
81
- -webkit-appearance: none;
82
- -moz-appearance: none;
83
- appearance: none;
84
- height: var(--iconSize);
85
- width: var(--iconSize);
86
- padding: 0 4px;
87
- padding: 0 var(--size-4);
88
- border-radius: 50%;
89
- border: 0;
90
- background-color: rgba(134,167,189,0.10196);
91
- background-color: var(--color-background-neutral);
92
- color: var(--color-interactive-primary);
93
- transition: color, background-color 0.15s ease-in-out;
94
- outline-offset: 0;
95
- display: flex;
96
- align-items: center;
97
- justify-content: center;
98
- }
99
- .np-upload-input__item .np-upload-input__item-action .np-upload-input__item-button:before {
100
- content: '';
101
- display: block;
102
- width: var(--clickAreaSize);
103
- height: var(--clickAreaSize);
104
- border-radius: 50%;
105
- position: absolute;
106
- top: var(--clickAreaTopRightOffset);
107
- right: var(--clickAreaTopRightOffset);
108
- }
109
- .np-upload-input__item .np-upload-input__item-action .np-upload-input__item-button:hover {
110
- background-color: var(--color-sentiment-negative);
111
- color: var(--color-contrast-overlay) !important;
112
- }
113
- .np-upload-input__item .np-upload-input__item-action .np-upload-input__item-button:active {
114
- background-color: var(--color-background-neutral-active);
43
+ .np-upload-button-container:hover:before,
44
+ .np-upload-button-container.droppable-dropping:before {
45
+ left: 0 !important;
46
+ width: 100% !important;
115
47
  }
116
- .np-upload-input__item.is-interactive {
117
- padding: 0;
48
+ .np-upload-button-container:has(:focus-visible) {
49
+ outline: var(--ring-outline-color) solid var(--ring-outline-width);
50
+ outline-offset: var(--ring-outline-offset);
51
+ border-color: transparent;
52
+ outline-offset: -3px;
118
53
  }
119
- .np-upload-input__item.is-interactive:hover:not(:has(.np-upload-input__item-button:hover)):before,
120
- .np-upload-input__item.is-interactive:hover:not(:has(.np-upload-input__item-button:hover)) + .np-upload-input__item:before {
121
- width: 100%;
122
- left: 0;
54
+ .np-upload-item--single-file:focus-visible,
55
+ .np-upload-item__link:focus-visible,
56
+ .np-upload-button-container:has(:focus-visible) {
57
+ outline-width: 3px;
123
58
  }
124
- .np-upload-input__item.is-interactive .np-upload-input__item-link {
125
- padding: 16px;
126
- padding: var(--size-16);
59
+ .np-upload-item--link a {
60
+ flex: 1;
127
61
  -webkit-text-decoration: none;
128
62
  text-decoration: none;
129
- border-radius: inherit;
130
63
  border-top: 1px solid transparent;
131
- background-clip: padding-box;
64
+ border-radius: inherit;
132
65
  }
133
- .np-upload-input__item.is-interactive .np-upload-input__item-link:focus-visible {
66
+ .np-upload-item--link a:focus-visible {
134
67
  outline-offset: -2px;
135
- outline-width: 3px;
136
68
  }
137
- .np-upload-input__item.is-interactive .np-upload-input__item-link:hover,
138
- .np-upload-input__item.is-interactive .np-upload-input__item-link:active {
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
+ }
76
+ .np-upload-item--link a:hover,
77
+ .np-upload-item--link a:active {
78
+ -webkit-text-decoration: none;
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 {
139
83
  background-color: rgba(134,167,189,0.10196);
140
84
  background-color: var(--color-background-neutral);
85
+ border-radius: inherit;
141
86
  }
142
- .np-upload-input__item.is-interactive:first-child .np-upload-input__item-link {
143
- border-top-width: 0;
144
- }
145
- .np-upload-input__item .np-upload-input-errors {
146
- padding-left: 0;
147
- list-style-type: "";
87
+ .np-upload-item--link:first-of-type a {
88
+ border-top: 0;
148
89
  }
149
- .np-upload-input__item .np-upload-input-errors > li {
90
+ .np-upload-item__body {
91
+ display: flex;
92
+ align-items: center;
93
+ justify-content: space-between;
150
94
  position: relative;
151
- padding-left: 16px;
152
- padding-left: var(--size-16);
95
+ border-radius: inherit;
153
96
  }
154
- .np-upload-input__item .np-upload-input-errors > li::before {
155
- content: '•';
97
+ .np-upload-item__remove-button {
98
+ display: flex;
99
+ align-items: center;
100
+ justify-content: center;
101
+ align-self: flex-start;
156
102
  position: absolute;
157
- display: block;
158
- left: 0;
103
+ height: 24px;
104
+ height: var(--size-24);
105
+ min-height: 0;
106
+ width: 24px;
107
+ width: var(--size-24);
108
+ padding: 0;
109
+ border-radius: 50% !important;
110
+ outline-offset: 0 !important;
111
+ background-color: rgba(134,167,189,0.10196);
112
+ background-color: var(--color-background-neutral);
113
+ border: none;
114
+ color: var(--color-interactive-primary);
115
+ right: 16px;
116
+ right: var(--size-16);
117
+ top: 16px;
118
+ top: var(--size-16);
119
+ transition: color, background-color 0.15s ease-in-out;
159
120
  }
160
121
  @media (max-width: 320px) {
161
- .np-upload-input__item .np-upload-input-errors > li {
162
- padding-left: 32px;
163
- padding-left: var(--size-32);
122
+ .np-upload-item__remove-button {
123
+ top: 16px;
124
+ top: var(--size-16);
125
+ right: 16px;
126
+ right: var(--size-16);
127
+ height: 48px;
128
+ height: var(--size-48);
129
+ width: 48px;
130
+ width: var(--size-48);
164
131
  }
165
132
  }
133
+ .np-upload-item__remove-button:hover {
134
+ background-color: var(--color-sentiment-negative);
135
+ color: var(--color-contrast-overlay) !important;
136
+ }
137
+ .np-upload-item__remove-button:before {
138
+ display: block;
139
+ width: 44px;
140
+ height: 44px;
141
+ content: '';
142
+ border-radius: 50%;
143
+ position: absolute;
144
+ }
@@ -1,171 +1,160 @@
1
1
  @import (reference) "../../../node_modules/@transferwise/neptune-css/src/less/ring.less";
2
2
 
3
- .np-upload-input__item {
3
+ // Be aware of touching styles related to :before/:after pseudo-elements in this file, delimiters between items build by using them
4
+ .np-upload-item {
5
+ border: 1px solid var(--color-interactive-secondary);
4
6
  position: relative;
5
- padding: var(--size-16);
6
- display: flex;
7
- align-items: flex-start;
8
- border-left: var(--outerBorder);
9
- border-right: var(--outerBorder);
10
7
 
11
- &:first-child {
12
- border-top: var(--outerBorder);
13
- border-top-left-radius: var(--radius-small);
14
- border-top-right-radius: var(--radius-small);
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 {
11
+ display: block;
12
+ position: absolute;
13
+ height: 1px;
14
+ background-color: var(--color-border-neutral);
15
+ content: " ";
16
+ left: var(--size-16);
17
+ width: calc(100% - 2 * var(--size-16));
15
18
  }
16
19
 
17
- & + .np-upload-input__item {
18
- &:before {
19
- content: " ";
20
- display: block;
21
- position: absolute;
22
- height: 1px;
23
- left: var(--size-16);
24
- width: calc(100% - 2 * var(--size-16));
25
- top: 0;
26
- background: var(--color-border-neutral);
27
- }
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;
28
23
  }
29
24
 
30
- .np-upload-input__item-content {
31
- padding-right: var(--size-32);
32
- flex: 1;
25
+ &.np-upload-item--link:hover .np-upload-item__link:after {
26
+ bottom: -1px;
27
+ }
33
28
 
34
- @media (max-width: 320px) {
35
- padding-right: var(--size-64);
29
+ &:first-child {
30
+ & ~ div {
31
+ border-top: 1px;
36
32
  }
37
33
  }
38
34
 
39
- .np-upload-input__title,
40
- .np-upload-input__text {
41
- margin: 0;
42
- text-align-last: left;
43
- color: var(--color-content-secondary);
35
+ &:not(:first-child) {
36
+ .np-upload-item__link:hover {
37
+ border-top-color: var(--color-border-neutral);
38
+ }
44
39
  }
45
40
 
46
- .np-upload-input__title + .np-upload-input__text {
47
- margin-top: var(--size-4);
41
+ &:not(:last-child) {
42
+ border-bottom: 0;
48
43
  }
49
44
 
50
- .np-upload-input__icon {
51
- padding-right: var(--size-16);
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
+ }
52
52
  }
53
+ }
53
54
 
54
- .np-upload-input__item-link,
55
- .np-upload-input__item-container {
56
- align-items: flex-start;
57
- display: flex;
58
- width: 100%;
55
+ .np-upload-button-container {
56
+ &:hover:before,
57
+ &.droppable-dropping:before {
58
+ left: 0 !important;
59
+ width: 100% !important;
59
60
  }
60
61
 
61
- .np-upload-input__item-action {
62
- --iconSize: var(--size-24);
63
- --clickAreaSize: 44px;
64
- --buttonTopRightOffset: var(--size-16);
65
- // Offset towards the parent's top-right edge
66
- // ensuring no overflow on smaller screens
67
- --clickAreaTopRightOffset: calc((var(--clickAreaSize) - var(--iconSize)) * -.5);
62
+ &:has(:focus-visible) {
63
+ .ring();
64
+ border-color: transparent;
65
+ outline-offset: -3px;
66
+ }
67
+ }
68
68
 
69
- position: absolute;
70
- right: var(--buttonTopRightOffset);
71
- top: var(--buttonTopRightOffset);
69
+ .np-upload-item--single-file:focus-visible,
70
+ .np-upload-item__link:focus-visible,
71
+ .np-upload-button-container:has(:focus-visible) {
72
+ outline-width: 3px;
73
+ }
72
74
 
73
- @media (--screen-400-zoom) {
74
- --iconSize: var(--size-48);
75
- --clickAreaTopRightOffset: calc(-1 * var(--buttonTopRightOffset));
76
- }
75
+ .np-upload-item--link {
76
+ a {
77
+ flex: 1;
78
+ text-decoration: none;
79
+ border-top: 1px solid transparent;
80
+ border-radius: inherit;
77
81
 
78
- .np-upload-input__item-button {
79
- appearance: none;
80
- height: var(--iconSize);
81
- width: var(--iconSize);
82
- padding: 0 var(--size-4);
83
- border-radius: 50%;
84
- border: 0;
85
- background-color: var(--color-background-neutral);
86
- color: var(--color-interactive-primary);
87
- transition: color, background-color 0.15s ease-in-out;
88
- outline-offset: 0;
89
- display: flex;
90
- align-items: center;
91
- justify-content: center;
82
+ &:focus-visible {
83
+ outline-offset: -2px;
84
+ }
92
85
 
86
+ &:hover {
93
87
  &:before {
94
- content: '';
95
- display: block;
96
- width: var(--clickAreaSize);
97
- height: var(--clickAreaSize);
98
- border-radius: 50%;
99
- position: absolute;
100
- top: var(--clickAreaTopRightOffset);
101
- right: var(--clickAreaTopRightOffset);
102
- }
103
-
104
- &:hover {
105
- background-color: var(--color-sentiment-negative);
106
- color: var(--color-contrast-overlay) !important;
107
- }
108
-
109
- &:active {
110
- background-color: var(--color-background-neutral-active);
88
+ display: none !important;
111
89
  }
112
- }
113
- }
114
90
 
115
- &.is-interactive {
116
- padding: 0;
117
-
118
- &:hover:not(:has(.np-upload-input__item-button:hover)) {
119
- &:before,
120
- & + .np-upload-input__item:before {
121
- width: 100%;
122
- left: 0;
91
+ &:after {
92
+ left: 0 !important;
93
+ width: 100% !important;
123
94
  }
124
95
  }
125
96
 
126
- .np-upload-input__item-link {
127
- padding: var(--size-16);
97
+ &:hover,
98
+ &:active {
128
99
  text-decoration: none;
129
- border-radius: inherit;
130
- border-top: 1px solid transparent;
131
- background-clip: padding-box;
132
-
133
- &:focus-visible {
134
- outline-offset: -2px;
135
- outline-width: 3px;
136
- }
137
-
138
- &:hover,
139
- &:active {
100
+ .np-upload-button {
140
101
  background-color: var(--color-background-neutral);
102
+ border-radius: inherit;
141
103
  }
142
104
  }
105
+ }
143
106
 
144
- &:first-child {
145
- .np-upload-input__item-link {
146
- border-top-width: 0;
147
- }
148
- }
107
+ &:first-of-type a {
108
+ border-top: 0;
149
109
  }
110
+ }
150
111
 
151
- .np-upload-input-errors {
152
- padding-left: 0;
153
- list-style-type: "";
112
+ .np-upload-item__body {
113
+ display: flex;
114
+ align-items: center;
115
+ justify-content: space-between;
116
+ // We should have the `relative` position for the body, because we have `absolute` position for `np-upload-item__remove-button` to achieve appropriate `hover` effects
117
+ position: relative;
118
+ border-radius: inherit;
119
+ }
154
120
 
155
- & > li {
156
- position: relative;
157
- padding-left: var(--size-16);
121
+ .np-upload-item__remove-button {
122
+ display: flex;
123
+ align-items: center;
124
+ justify-content: center;
125
+ align-self: flex-start;
126
+ position: absolute;
127
+ height: var(--size-24);
128
+ min-height: 0;
129
+ width: var(--size-24);
130
+ padding: 0;
131
+ border-radius: 50% !important;
132
+ outline-offset: 0 !important;
133
+ background-color: var(--color-background-neutral);
134
+ border: none;
135
+ color: var(--color-interactive-primary);
136
+ right: var(--size-16);
137
+ top: var(--size-16);
138
+ transition: color, background-color 0.15s ease-in-out;
139
+
140
+ @media (--screen-400-zoom) {
141
+ top: var(--size-16);
142
+ right: var(--size-16);
143
+ height: var(--size-48);
144
+ width: var(--size-48);
145
+ }
158
146
 
159
- &::before {
160
- content: '•';
161
- position: absolute;
162
- display: block;
163
- left: 0;
164
- }
147
+ &:hover {
148
+ background-color: var(--color-sentiment-negative);
149
+ color: var(--color-contrast-overlay) !important;
150
+ }
165
151
 
166
- @media (max-width: 320px) {
167
- padding-left: var(--size-32);
168
- }
169
- }
152
+ &:before {
153
+ display: block;
154
+ width: 44px;
155
+ height: 44px;
156
+ content: '';
157
+ border-radius: 50%;
158
+ position: absolute;
170
159
  }
171
160
  }
@@ -97,7 +97,7 @@ const UploadItem = ({
97
97
  const getDescription = () => {
98
98
  if (error || errors?.length || status === Status.FAILED) {
99
99
  return (
100
- <Body type={Typography.BODY_DEFAULT_BOLD} className="np-upload-input__text text-negative">
100
+ <Body type={Typography.BODY_DEFAULT_BOLD} className="text-negative">
101
101
  {errors?.length ? getMultipleErrors(errors) : getErrorMessage(error)}
102
102
  </Body>
103
103
  );
@@ -105,18 +105,14 @@ const UploadItem = ({
105
105
 
106
106
  switch (status) {
107
107
  case Status.PENDING:
108
- return (
109
- <Body type={Typography.BODY_DEFAULT} className="np-upload-input__text">
110
- {formatMessage(MESSAGES.uploading)}
111
- </Body>
112
- );
108
+ return <Body type={Typography.BODY_DEFAULT_BOLD}>{formatMessage(MESSAGES.uploading)}</Body>;
113
109
  case Status.PROCESSING:
114
- return <Body className="np-upload-input__text">{formatMessage(MESSAGES.deleting)}</Body>;
110
+ return <Body>{formatMessage(MESSAGES.deleting)}</Body>;
115
111
  case Status.SUCCEEDED:
116
112
  case Status.DONE:
117
113
  default:
118
114
  return (
119
- <Body type={Typography.BODY_DEFAULT_BOLD} className="np-upload-input__text">
115
+ <Body type={Typography.BODY_DEFAULT_BOLD} className="text-positive">
120
116
  {formatMessage(MESSAGES.uploaded)}
121
117
  </Body>
122
118
  );
@@ -136,34 +132,38 @@ const UploadItem = ({
136
132
 
137
133
  return (
138
134
  <div
139
- className={clsx('np-upload-input__item', { 'is-interactive': isSucceeded && url })}
135
+ className={clsx('np-upload-item', { 'np-upload-item--link': isSucceeded })}
140
136
  data-testid={TEST_IDS.uploadItem}
141
137
  >
142
- <UploadItemLink
143
- url={isSucceeded ? url : undefined}
144
- singleFileUpload={singleFileUpload}
145
- onDownload={onDownloadFile}
146
- >
147
- <span className="np-upload-input__icon">{getIcon()}</span>
148
- <div className="np-upload-input__item-content">
149
- <Body type={Typography.BODY_LARGE} className="np-upload-input__title text-word-break">
150
- {getTitle()}
151
- </Body>
152
- {getDescription()}
153
- </div>
154
- </UploadItemLink>
155
- {canDelete && (
156
- <div className="np-upload-input__item-action">
138
+ <div className="np-upload-item__body">
139
+ <UploadItemLink
140
+ url={isSucceeded ? url : undefined}
141
+ singleFileUpload={singleFileUpload}
142
+ onDownload={onDownloadFile}
143
+ >
144
+ <div className="np-upload-button" aria-live="polite">
145
+ <div className="media">
146
+ <div className="np-upload-icon media-left">{getIcon()}</div>
147
+ <div className="media-body text-xs-left" data-testid={TEST_IDS.mediaBody}>
148
+ <Body className="text-word-break d-block text-primary">{getTitle()}</Body>
149
+ {getDescription()}
150
+ </div>
151
+ </div>
152
+ </div>
153
+ </UploadItemLink>
154
+ {canDelete && (
157
155
  <button
158
156
  aria-label={formatMessage(MESSAGES.removeFile, { filename })}
159
- className="np-upload-input__item-button"
157
+ className={clsx('btn', 'np-upload-item__remove-button', 'media-left', {
158
+ 'np-upload-item--single-file': singleFileUpload,
159
+ })}
160
160
  type="button"
161
161
  onClick={() => onDelete()}
162
162
  >
163
163
  <Bin size={16} />
164
164
  </button>
165
- </div>
166
- )}
165
+ )}
166
+ </div>
167
167
  </div>
168
168
  );
169
169
  };
@@ -14,7 +14,7 @@ export const UploadItemLink = ({
14
14
  singleFileUpload,
15
15
  }: UploadItemLinkProps) => {
16
16
  if (!url) {
17
- return <div className={clsx('np-upload-input__item-container')}>{children}</div>;
17
+ return <div>{children}</div>;
18
18
  }
19
19
 
20
20
  return (
@@ -23,8 +23,8 @@ export const UploadItemLink = ({
23
23
  target="_blank"
24
24
  rel="noopener noreferrer"
25
25
  className={clsx(
26
- 'np-upload-input__item-link',
27
- singleFileUpload ? 'np-upload-input__item-link--single-file' : '',
26
+ 'np-upload-item__link',
27
+ singleFileUpload ? 'np-upload-item--single-file' : '',
28
28
  )}
29
29
  onClick={onDownload}
30
30
  >