@transferwise/components 0.0.0-experimental-37d8e2c → 0.0.0-experimental-dabe7c7

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 (144) hide show
  1. package/build/actionButton/ActionButton.js +1 -1
  2. package/build/actionButton/ActionButton.js.map +1 -1
  3. package/build/actionButton/ActionButton.mjs +1 -1
  4. package/build/actionButton/ActionButton.mjs.map +1 -1
  5. package/build/actionOption/ActionOption.js +7 -2
  6. package/build/actionOption/ActionOption.js.map +1 -1
  7. package/build/actionOption/ActionOption.mjs +8 -3
  8. package/build/actionOption/ActionOption.mjs.map +1 -1
  9. package/build/avatar/Avatar.js +1 -4
  10. package/build/avatar/Avatar.js.map +1 -1
  11. package/build/avatar/Avatar.mjs +1 -4
  12. package/build/avatar/Avatar.mjs.map +1 -1
  13. package/build/avatar/colors/colors.js +1 -1
  14. package/build/avatar/colors/colors.js.map +1 -1
  15. package/build/avatar/colors/colors.mjs +1 -1
  16. package/build/avatar/colors/colors.mjs.map +1 -1
  17. package/build/avatarWrapper/AvatarWrapper.js +9 -6
  18. package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
  19. package/build/avatarWrapper/AvatarWrapper.mjs +8 -5
  20. package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
  21. package/build/badge/Badge.js +1 -6
  22. package/build/badge/Badge.js.map +1 -1
  23. package/build/badge/Badge.mjs +1 -6
  24. package/build/badge/Badge.mjs.map +1 -1
  25. package/build/circularButton/CircularButton.js +7 -4
  26. package/build/circularButton/CircularButton.js.map +1 -1
  27. package/build/circularButton/CircularButton.mjs +7 -4
  28. package/build/circularButton/CircularButton.mjs.map +1 -1
  29. package/build/common/circle/Circle.js +1 -24
  30. package/build/common/circle/Circle.js.map +1 -1
  31. package/build/common/circle/Circle.mjs +1 -24
  32. package/build/common/circle/Circle.mjs.map +1 -1
  33. package/build/display/Display.js +1 -1
  34. package/build/display/Display.js.map +1 -1
  35. package/build/display/Display.mjs +1 -1
  36. package/build/display/Display.mjs.map +1 -1
  37. package/build/index.js +0 -6
  38. package/build/index.js.map +1 -1
  39. package/build/index.mjs +0 -3
  40. package/build/index.mjs.map +1 -1
  41. package/build/main.css +56 -82
  42. package/build/statusIcon/StatusIcon.js +2 -4
  43. package/build/statusIcon/StatusIcon.js.map +1 -1
  44. package/build/statusIcon/StatusIcon.mjs +2 -4
  45. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  46. package/build/styles/actionButton/ActionButton.css +11 -0
  47. package/build/styles/actionOption/ActionOption.css +4 -0
  48. package/build/styles/badge/Badge.css +5 -5
  49. package/build/styles/circularButton/CircularButton.css +24 -0
  50. package/build/styles/common/circle/Circle.css +0 -17
  51. package/build/styles/main.css +56 -82
  52. package/build/styles/statusIcon/StatusIcon.css +12 -0
  53. package/build/types/actionButton/ActionButton.d.ts +3 -3
  54. package/build/types/actionButton/ActionButton.d.ts.map +1 -1
  55. package/build/types/actionOption/ActionOption.d.ts +2 -2
  56. package/build/types/actionOption/ActionOption.d.ts.map +1 -1
  57. package/build/types/avatar/Avatar.d.ts +0 -3
  58. package/build/types/avatar/Avatar.d.ts.map +1 -1
  59. package/build/types/avatar/colors/colors.d.ts +1 -1
  60. package/build/types/avatar/colors/colors.d.ts.map +1 -1
  61. package/build/types/avatarWrapper/AvatarWrapper.d.ts +0 -3
  62. package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
  63. package/build/types/badge/Badge.d.ts +1 -2
  64. package/build/types/badge/Badge.d.ts.map +1 -1
  65. package/build/types/circularButton/CircularButton.d.ts.map +1 -1
  66. package/build/types/common/circle/Circle.d.ts +1 -1
  67. package/build/types/common/circle/Circle.d.ts.map +1 -1
  68. package/build/types/common/index.d.ts +0 -1
  69. package/build/types/index.d.ts +1 -4
  70. package/build/types/index.d.ts.map +1 -1
  71. package/build/types/statusIcon/StatusIcon.d.ts +2 -6
  72. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  73. package/package.json +3 -3
  74. package/src/actionButton/ActionButton.css +11 -0
  75. package/src/actionButton/ActionButton.less +14 -0
  76. package/src/actionButton/ActionButton.story.tsx +7 -0
  77. package/src/actionButton/ActionButton.tsx +7 -3
  78. package/src/actionOption/ActionOption.css +4 -0
  79. package/src/actionOption/ActionOption.less +3 -0
  80. package/src/actionOption/ActionOption.story.tsx +4 -0
  81. package/src/actionOption/ActionOption.tsx +15 -2
  82. package/src/avatar/Avatar.tsx +1 -4
  83. package/src/avatar/colors/colors.ts +4 -4
  84. package/src/avatarWrapper/AvatarWrapper.tsx +16 -12
  85. package/src/badge/Badge.css +5 -5
  86. package/src/badge/Badge.less +3 -3
  87. package/src/badge/Badge.tsx +1 -10
  88. package/src/circularButton/CircularButton.css +24 -0
  89. package/src/circularButton/CircularButton.less +15 -15
  90. package/src/circularButton/CircularButton.tsx +5 -4
  91. package/src/common/circle/Circle.css +0 -17
  92. package/src/common/circle/Circle.less +0 -22
  93. package/src/common/circle/Circle.tsx +2 -33
  94. package/src/common/index.js +0 -1
  95. package/src/display/Display.tsx +1 -1
  96. package/src/index.ts +0 -4
  97. package/src/main.css +56 -82
  98. package/src/main.less +1 -3
  99. package/src/statusIcon/StatusIcon.css +12 -0
  100. package/src/statusIcon/StatusIcon.less +6 -6
  101. package/src/statusIcon/StatusIcon.story.tsx +28 -32
  102. package/src/statusIcon/StatusIcon.tsx +4 -18
  103. package/build/avatarView/AvatarView.js +0 -207
  104. package/build/avatarView/AvatarView.js.map +0 -1
  105. package/build/avatarView/AvatarView.mjs +0 -205
  106. package/build/avatarView/AvatarView.mjs.map +0 -1
  107. package/build/common/initials.js +0 -12
  108. package/build/common/initials.js.map +0 -1
  109. package/build/common/initials.mjs +0 -10
  110. package/build/common/initials.mjs.map +0 -1
  111. package/build/common/notificationDot/NotificationDot.js +0 -16
  112. package/build/common/notificationDot/NotificationDot.js.map +0 -1
  113. package/build/common/notificationDot/NotificationDot.mjs +0 -14
  114. package/build/common/notificationDot/NotificationDot.mjs.map +0 -1
  115. package/build/styles/avatarGroup/AvatarGroup.css +0 -28
  116. package/build/styles/avatarView/AvatarView.css +0 -22
  117. package/build/styles/common/notificationDot/NotificationDot.css +0 -10
  118. package/build/types/avatarGroup/AvatarGroup.d.ts +0 -19
  119. package/build/types/avatarGroup/AvatarGroup.d.ts.map +0 -1
  120. package/build/types/avatarGroup/index.d.ts +0 -3
  121. package/build/types/avatarGroup/index.d.ts.map +0 -1
  122. package/build/types/avatarView/AvatarView.d.ts +0 -25
  123. package/build/types/avatarView/AvatarView.d.ts.map +0 -1
  124. package/build/types/avatarView/index.d.ts +0 -3
  125. package/build/types/avatarView/index.d.ts.map +0 -1
  126. package/build/types/common/initials.d.ts +0 -2
  127. package/build/types/common/initials.d.ts.map +0 -1
  128. package/build/types/common/notificationDot/NotificationDot.d.ts +0 -8
  129. package/build/types/common/notificationDot/NotificationDot.d.ts.map +0 -1
  130. package/src/avatarGroup/AvatarGroup.css +0 -28
  131. package/src/avatarGroup/AvatarGroup.less +0 -32
  132. package/src/avatarGroup/AvatarGroup.story.tsx +0 -249
  133. package/src/avatarGroup/AvatarGroup.tsx +0 -78
  134. package/src/avatarGroup/index.ts +0 -2
  135. package/src/avatarView/AvatarView.css +0 -22
  136. package/src/avatarView/AvatarView.less +0 -24
  137. package/src/avatarView/AvatarView.story.tsx +0 -425
  138. package/src/avatarView/AvatarView.tsx +0 -217
  139. package/src/avatarView/index.ts +0 -2
  140. package/src/common/initials.ts +0 -13
  141. package/src/common/notificationDot/NotificationDot.css +0 -10
  142. package/src/common/notificationDot/NotificationDot.less +0 -7
  143. package/src/common/notificationDot/NotificationDot.tsx +0 -10
  144. package/src/test-utils/avatar-img.webp +0 -0
package/src/main.css CHANGED
@@ -186,6 +186,10 @@ div.critical-comms .critical-comms-body {
186
186
  background-color: var(--color-background-neutral);
187
187
  color: var(--color-interactive-primary);
188
188
  }
189
+ .np-action-btn.btn-priority-3 {
190
+ background-color: transparent !important;
191
+ color: var(--color-interactive-primary);
192
+ }
189
193
  .np-action-btn:not(:disabled):hover {
190
194
  background-color: #008fc9;
191
195
  background-color: var(--color-interactive-accent-hover);
@@ -193,6 +197,9 @@ div.critical-comms .critical-comms-body {
193
197
  .np-action-btn:not(:disabled):hover.btn-priority-2 {
194
198
  background-color: var(--color-background-neutral-hover);
195
199
  }
200
+ .np-action-btn:not(:disabled):hover.btn-priority-3 {
201
+ color: var(--color-interactive-primary-hover);
202
+ }
196
203
  .np-action-btn:not(:disabled):active {
197
204
  box-shadow: none;
198
205
  border-color: transparent;
@@ -202,6 +209,10 @@ div.critical-comms .critical-comms-body {
202
209
  .np-action-btn:not(:disabled):active.btn-priority-2 {
203
210
  background-color: var(--color-background-neutral-active);
204
211
  }
212
+ .np-action-btn:not(:disabled):active.btn-priority-3 {
213
+ color: var(--color-interactive-primary-active);
214
+ background-color: var(--color-background-screen-active) !important;
215
+ }
205
216
  .np-action-btn:not(:disabled):focus {
206
217
  box-shadow: none;
207
218
  }
@@ -421,56 +432,6 @@ div.critical-comms .critical-comms-body {
421
432
  .np-theme-personal .tw-avatar--outlined:not(.disabled):not(:disabled):hover {
422
433
  border-color: var(--color-interactive-primary-hover);
423
434
  }
424
- .np-avatar-view {
425
- border-radius: 9999px;
426
- border-radius: var(--radius-full);
427
- color: var(--color-interactive-primary);
428
- height: -moz-fit-content;
429
- height: fit-content;
430
- width: -moz-fit-content;
431
- width: fit-content;
432
- }
433
- .np-avatar-view .np-circle {
434
- background-color: transparent;
435
- border: var(--avatar-view-non-interactive-border-width) solid rgba(0,0,0,0.10196);
436
- border: var(--avatar-view-non-interactive-border-width) solid var(--color-border-neutral);
437
- }
438
- .np-avatar-view-selected .np-circle {
439
- border: var(--avatar-view-selected-border-width) solid var(--color-interactive-primary) !important;
440
- }
441
- .np-avatar-view-interactive .np-circle {
442
- background-color: rgba(134,167,189,0.10196);
443
- background-color: var(--color-background-neutral);
444
- border: none;
445
- }
446
- .np-avatar-group {
447
- display: inline-flex;
448
- --np-avatar-group-size: 48px;
449
- --np-avatar-size: 32px;
450
- }
451
- .np-avatar-group-diagonal {
452
- width: var(--np-avatar-group-size);
453
- height: var(--np-avatar-group-size);
454
- }
455
- .np-avatar-group-diagonal-mask {
456
- -webkit-mask-image: radial-gradient(circle at right 100%, transparent, transparent calc(var(--np-avatar-size) / 1.8), black 0);
457
- mask-image: radial-gradient(circle at right 100%, transparent, transparent calc(var(--np-avatar-size) / 1.8), black 0);
458
- }
459
- .np-avatar-group-diagonal-child {
460
- margin-left: calc((var(--np-avatar-size) / 2) * -1);
461
- margin-top: calc((var(--np-avatar-size) * var(--np-avatar-group-index)) / 2);
462
- }
463
- .np-avatar-group-horizontal {
464
- width: calc((var(--np-avatar-size) * 2) - 2px);
465
- height: var(--np-avatar-group-size);
466
- }
467
- .np-avatar-group-horizontal-mask {
468
- -webkit-mask-image: radial-gradient(circle at right 50%, transparent, transparent calc(var(--np-avatar-size) / 2), black 0);
469
- mask-image: radial-gradient(circle at right 50%, transparent, transparent calc(var(--np-avatar-size) / 2), black 0);
470
- }
471
- .np-avatar-group-horizontal-child {
472
- margin-left: calc((var(--np-avatar-size) / 4) * -1);
473
- }
474
435
  .tw-badge {
475
436
  position: relative;
476
437
  display: inline-block;
@@ -487,16 +448,16 @@ div.critical-comms .critical-comms-body {
487
448
  --badge-border-color: rgba(0, 0, 0, 0.08);
488
449
  }
489
450
  .tw-badge > .tw-badge__children {
490
- -webkit-mask-image: radial-gradient(circle at var(--badge-mask-position) calc(100% - var(--badge-mask-offset)) left calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
491
- mask-image: radial-gradient(circle at var(--badge-mask-position) calc(100% - var(--badge-mask-offset)) left calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
451
+ -webkit-mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset)) left calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
452
+ mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset)) left calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
492
453
  }
493
454
  [dir="rtl"] .tw-badge > .tw-badge__children {
494
- -webkit-mask-image: radial-gradient(circle at var(--badge-mask-position) calc(100% - var(--badge-mask-offset)) right calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
495
- mask-image: radial-gradient(circle at var(--badge-mask-position) calc(100% - var(--badge-mask-offset)) right calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
455
+ -webkit-mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset)) right calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
456
+ mask-image: radial-gradient(circle at top calc(100% - var(--badge-mask-offset)) right calc(100% - var(--badge-mask-offset)), transparent 0, transparent calc(var(--badge-size) / 2 + var(--badge-mask)), black calc(var(--badge-size) / 2 + var(--badge-mask) + 0.5px));
496
457
  }
497
458
  .tw-badge > .tw-badge__content {
498
459
  position: absolute;
499
- bottom: var(--badge-bottom-position);
460
+ bottom: 0;
500
461
  right: 0;
501
462
  box-sizing: border-box;
502
463
  text-align: center;
@@ -1035,6 +996,30 @@ div.critical-comms .critical-comms-body {
1035
996
  cursor: pointer;
1036
997
  position: relative;
1037
998
  }
999
+ .np-circular-btn .tw-icon {
1000
+ position: absolute;
1001
+ top: 16px;
1002
+ top: var(--size-16);
1003
+ pointer-events: none;
1004
+ color: white;
1005
+ transition: color 0.15s ease-in-out;
1006
+ width: 100%;
1007
+ left: 0;
1008
+ }
1009
+ [dir="rtl"] .np-circular-btn .tw-icon {
1010
+ right: 0;
1011
+ left: auto;
1012
+ left: initial;
1013
+ }
1014
+ @media (max-width: 320px) {
1015
+ .np-circular-btn .tw-icon {
1016
+ top: 8px;
1017
+ top: var(--size-8);
1018
+ }
1019
+ }
1020
+ .np-circular-btn .tw-icon > svg {
1021
+ margin: 0 auto;
1022
+ }
1038
1023
  .np-theme-personal .np-circular-btn {
1039
1024
  /* stylelint-disable-next-line no-duplicate-selectors */
1040
1025
  }
@@ -1183,23 +1168,6 @@ div.critical-comms .critical-comms-body {
1183
1168
  width: var(--circle-size);
1184
1169
  height: var(--circle-size);
1185
1170
  flex-shrink: 0;
1186
- font-size: var(--circle-font-size);
1187
- font-weight: 600;
1188
- font-weight: var(--font-weight-semi-bold);
1189
- line-height: 1;
1190
- }
1191
- .np-circle img {
1192
- border-radius: 9999px;
1193
- border-radius: var(--radius-full);
1194
- width: 100%;
1195
- height: 100%;
1196
- }
1197
- .np-circle .np-display {
1198
- font-size: var(--circle-font-size);
1199
- }
1200
- .np-circle .tw-icon > svg {
1201
- height: var(--circle-icon-size);
1202
- width: var(--circle-icon-size);
1203
1171
  }
1204
1172
  .np-bottom-sheet {
1205
1173
  border-radius: 10px 10px 0 0;
@@ -1482,16 +1450,6 @@ button.np-option {
1482
1450
  border-radius: var(--radius-small);
1483
1451
  }
1484
1452
  }
1485
- .np-notification-dot {
1486
- --badge-notification-dot-size: 14px;
1487
- width: 14px;
1488
- width: var(--badge-notification-dot-size);
1489
- height: 14px;
1490
- height: var(--badge-notification-dot-size);
1491
- background-color: var(--color-sentiment-negative);
1492
- border-radius: 9999px;
1493
- border-radius: var(--radius-full);
1494
- }
1495
1453
  .np-select-option {
1496
1454
  border-radius: 10px;
1497
1455
  border-radius: var(--radius-small);
@@ -4197,6 +4155,12 @@ html:not([dir="rtl"]) .np-navigation-option {
4197
4155
  transform: translateY(-24px);
4198
4156
  }
4199
4157
  }
4158
+ .status-icon > svg {
4159
+ height: 32px;
4160
+ height: var(--size-32);
4161
+ width: 32px;
4162
+ width: var(--size-32);
4163
+ }
4200
4164
  .status-circle .light {
4201
4165
  color: var(--color-contrast);
4202
4166
  }
@@ -4212,6 +4176,12 @@ html:not([dir="rtl"]) .np-navigation-option {
4212
4176
  .np-theme-personal .status-circle.pending .status-icon {
4213
4177
  color: var(--color-dark);
4214
4178
  }
4179
+ .status-circle-sm .status-icon > svg {
4180
+ height: 14px;
4181
+ height: var(--size-14);
4182
+ width: 14px;
4183
+ width: var(--size-14);
4184
+ }
4215
4185
  @media (max-width: 320px) {
4216
4186
  .status-circle-sm .status-icon > svg {
4217
4187
  width: 24px;
@@ -5732,3 +5702,7 @@ html:not([dir="rtl"]) .np-navigation-option {
5732
5702
  .np-list-item__action {
5733
5703
  flex-shrink: 0;
5734
5704
  }
5705
+ .np-action-btn-chevron {
5706
+ color: #c9cbce;
5707
+ color: var(--color-interactive-secondary);
5708
+ }
package/src/main.less CHANGED
@@ -2,8 +2,6 @@
2
2
  @import "./accordion/Accordion.less";
3
3
  @import "./actionButton/ActionButton.less";
4
4
  @import "./avatar/Avatar.less";
5
- @import "./avatarView/AvatarView.less";
6
- @import "./avatarGroup/AvatarGroup.less";
7
5
  @import "./badge/Badge.less";
8
6
  @import "./button/Button.less";
9
7
  @import "./card/Card.less";
@@ -16,7 +14,6 @@
16
14
  @import "./common/card/Card.less";
17
15
  @import "./common/closeButton/CloseButton.less";
18
16
  @import "./common/Option/Option.less";
19
- @import "./common/notificationDot/NotificationDot.less";
20
17
  @import "./selectOption/SelectOption.less";
21
18
  @import "./common/panel/Panel.less";
22
19
  @import "./common/RadioButton/RadioButton.less";
@@ -74,6 +71,7 @@
74
71
  @import "./progress/Progress.less";
75
72
  @import "./progressBar/ProgressBar.less";
76
73
  @import "./listItem/ListItem.less";
74
+ @import "./actionOption/ActionOption.less";
77
75
 
78
76
  // List all less files in src in alphabetical order: find -s src -type f -name '*.less' ! -name 'main.less'
79
77
  // Make sure you are not referencing main.less itself in this file!
@@ -1,3 +1,9 @@
1
+ .status-icon > svg {
2
+ height: 32px;
3
+ height: var(--size-32);
4
+ width: 32px;
5
+ width: var(--size-32);
6
+ }
1
7
  .status-circle .light {
2
8
  color: var(--color-contrast);
3
9
  }
@@ -13,6 +19,12 @@
13
19
  .np-theme-personal .status-circle.pending .status-icon {
14
20
  color: var(--color-dark);
15
21
  }
22
+ .status-circle-sm .status-icon > svg {
23
+ height: 14px;
24
+ height: var(--size-14);
25
+ width: 14px;
26
+ width: var(--size-14);
27
+ }
16
28
  @media (max-width: 320px) {
17
29
  .status-circle-sm .status-icon > svg {
18
30
  width: 24px;
@@ -1,7 +1,7 @@
1
- // .status-icon > svg {
2
- // height: var(--size-32);
3
- // width: var(--size-32);
4
- // }
1
+ .status-icon > svg {
2
+ height: var(--size-32);
3
+ width: var(--size-32);
4
+ }
5
5
 
6
6
  .status-circle {
7
7
  .light {
@@ -25,8 +25,8 @@
25
25
 
26
26
  &-sm {
27
27
  .status-icon > svg {
28
- // height: var(--size-14);
29
- // width: var(--size-14);
28
+ height: var(--size-14);
29
+ width: var(--size-14);
30
30
 
31
31
  @media (--screen-400-zoom) {
32
32
  width: var(--size-24);
@@ -20,36 +20,32 @@ export const Basic: Story = {
20
20
  };
21
21
 
22
22
  export const Variants: Story = {
23
- render: () => {
24
- const sizes = [16, 24, 32, 40, 48, 56, 72];
25
- return (
26
- <span style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '400px' }}>
27
- {[
28
- Sentiment.POSITIVE,
29
- Sentiment.NEGATIVE,
30
- Sentiment.WARNING,
31
- Sentiment.NEUTRAL,
32
- Sentiment.PENDING,
33
- ].map((sentiment) => {
34
- return (
35
- <span
36
- key={sentiment}
37
- style={{
38
- display: 'flex',
39
- gap: '1em',
40
- justifyContent: 'space-between',
41
- flexDirection: 'column',
42
- minHeight: '150px',
43
- alignItems: 'center',
44
- }}
45
- >
46
- {sizes.map((size) => {
47
- return <StatusIcon key={size} size={size} sentiment={sentiment} />;
48
- })}
49
- </span>
50
- );
51
- })}
52
- </span>
53
- );
54
- },
23
+ render: () => (
24
+ <span style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '400px' }}>
25
+ {[
26
+ Sentiment.POSITIVE,
27
+ Sentiment.NEGATIVE,
28
+ Sentiment.NEUTRAL,
29
+ Sentiment.WARNING,
30
+ Sentiment.PENDING,
31
+ ].map((sentiment) => {
32
+ return (
33
+ <span
34
+ key={sentiment}
35
+ style={{
36
+ display: 'flex',
37
+ justifyContent: 'space-between',
38
+ flexDirection: 'column',
39
+ minHeight: '150px',
40
+ alignItems: 'center',
41
+ }}
42
+ >
43
+ {([Size.SMALL, Size.MEDIUM, Size.LARGE] as const).map((size) => {
44
+ return <StatusIcon key={size} size={size} sentiment={sentiment} />;
45
+ })}
46
+ </span>
47
+ );
48
+ })}
49
+ </span>
50
+ ),
55
51
  };
@@ -5,14 +5,9 @@ import { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint } from '.
5
5
  import Circle, { CircleProps } from '../common/circle';
6
6
  import { useMedia } from '../common/hooks/useMedia';
7
7
 
8
- /**
9
- * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead
10
- */
11
- type LegacySizes = SizeSmall | SizeMedium | SizeLarge;
12
-
13
8
  export type StatusIconProps = {
14
- sentiment?: `${Sentiment}`;
15
- size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;
9
+ sentiment: `${Sentiment}`;
10
+ size: SizeSmall | SizeMedium | SizeLarge;
16
11
  };
17
12
 
18
13
  const iconTypeMap = {
@@ -36,22 +31,13 @@ const StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 'md' }: StatusIcon
36
31
  const Icon = iconTypeMap[sentiment];
37
32
  const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';
38
33
  const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
39
- const size =
40
- sizeProp === Size.SMALL && isTinyViewport
41
- ? 32
42
- : typeof sizeProp === 'string'
43
- ? mapLegacySize[sizeProp]
44
- : sizeProp;
34
+ const size = sizeProp === Size.SMALL && isTinyViewport ? 32 : mapLegacySize[sizeProp];
45
35
  return (
46
36
  <Circle
47
37
  as="span"
48
38
  size={size}
49
39
  data-testid="status-icon"
50
- className={clsx(
51
- 'status-circle',
52
- // `status-circle-${sizeProp}`,
53
- sentiment,
54
- )}
40
+ className={clsx('status-circle', `status-circle-${sizeProp}`, sentiment)}
55
41
  >
56
42
  <Icon className={clsx('status-icon', iconColor)} />
57
43
  </Circle>
@@ -1,207 +0,0 @@
1
- 'use strict';
2
-
3
- var Badge = require('../badge/Badge.js');
4
- var NotificationDot = require('../common/notificationDot/NotificationDot.js');
5
- var StatusIcon = require('../statusIcon/StatusIcon.js');
6
- var Circle = require('../common/circle/Circle.js');
7
- var React = require('react');
8
- var clsx = require('clsx');
9
- var icons = require('@transferwise/icons');
10
- var jsxRuntime = require('react/jsx-runtime');
11
- var initials = require('../common/initials.js');
12
-
13
- const AvatarViewDefaultSize = 48;
14
- /** Non interactive avatar view has custom border width */
15
- const mapNonInteractiveBorderWidth = {
16
- 16: 0.667,
17
- 24: 1,
18
- 32: 1,
19
- 40: 1.25,
20
- 48: 1.5,
21
- 56: 1.75,
22
- 72: 2.25
23
- };
24
- /** Selected state has custom border width */
25
- const mapSelectedBorderWidth = {
26
- 16: 1,
27
- 24: 1,
28
- 32: 1,
29
- 40: 2,
30
- 48: 2,
31
- 56: 2,
32
- 72: 2
33
- };
34
- function AvatarView({
35
- children = undefined,
36
- size = AvatarViewDefaultSize,
37
- selected,
38
- notification,
39
- badge,
40
- entity,
41
- action,
42
- className,
43
- style
44
- }) {
45
- return /*#__PURE__*/jsxRuntime.jsx(Interactive, {
46
- ...action,
47
- className: clsx.clsx('np-avatar-view', {
48
- 'np-avatar-view-selected': selected
49
- }, className),
50
- children: /*#__PURE__*/jsxRuntime.jsx(Badges, {
51
- asset: badge,
52
- avatarProps: {
53
- size,
54
- notification,
55
- selected
56
- },
57
- children: /*#__PURE__*/jsxRuntime.jsx(Circle, {
58
- size: size,
59
- fixedSize: true,
60
- style: {
61
- // @ts-expect-error CSS custom props allowed
62
- '--avatar-view-selected-border-width': `${mapSelectedBorderWidth[size]}px`,
63
- '--avatar-view-non-interactive-border-width': `${mapNonInteractiveBorderWidth[size]}px`,
64
- ...style
65
- },
66
- children: children === undefined ? /*#__PURE__*/jsxRuntime.jsx(Entity, {
67
- ...entity
68
- }) : children
69
- })
70
- })
71
- });
72
- }
73
- function Interactive({
74
- children,
75
- onClick,
76
- href,
77
- target,
78
- className,
79
- 'aria-label': ariaLabel,
80
- 'aria-labelledby': ariaLabelledby
81
- }) {
82
- const elementName = onClick ? 'button' : href ? 'a' : null;
83
- if (elementName === null) {
84
- // non interactive
85
- return /*#__PURE__*/jsxRuntime.jsx("div", {
86
- className: className,
87
- children: children
88
- });
89
- }
90
- const a11yProps = {
91
- ariaLabel,
92
- ariaLabelledby
93
- };
94
- if (elementName === 'button') {
95
- return /*#__PURE__*/jsxRuntime.jsx("button", {
96
- type: "button",
97
- className: clsx.clsx(className, 'np-avatar-view-interactive', 'btn-unstyled'),
98
- onClick: onClick,
99
- ...a11yProps,
100
- children: children
101
- });
102
- }
103
- if (elementName === 'a') {
104
- return (
105
- /*#__PURE__*/
106
- // eslint-disable-next-line react/jsx-no-target-blank
107
- jsxRuntime.jsx("a", {
108
- href: href,
109
- target: target,
110
- rel: target === '_blank' ? 'noreferrer' : undefined,
111
- className: clsx.clsx(className, 'np-avatar-view-interactive', 'text-no-decoration'),
112
- ...a11yProps,
113
- children: children
114
- })
115
- );
116
- }
117
- }
118
- const mapBadgeSize = {
119
- 16: 'sm',
120
- 24: 'sm',
121
- 32: 'sm',
122
- 40: 'sm',
123
- 48: 'sm',
124
- 56: 'lg',
125
- 72: 'lg'
126
- };
127
- /** AvatarView has a custom sizes for badge */
128
- const mapNotificationSize = {
129
- 16: 6,
130
- 24: 8,
131
- 32: 10,
132
- 40: 10,
133
- 48: 14,
134
- 56: 16,
135
- 72: 20
136
- };
137
- function Badges({
138
- children,
139
- asset,
140
- avatarProps
141
- }) {
142
- const {
143
- size = AvatarViewDefaultSize,
144
- selected,
145
- notification
146
- } = avatarProps;
147
- if (asset || selected || notification) {
148
- if (asset && size > 16) {
149
- return /*#__PURE__*/jsxRuntime.jsx(Badge, {
150
- badge: asset,
151
- size: mapBadgeSize[size],
152
- children: children
153
- });
154
- }
155
- if (selected && size > 16) {
156
- return /*#__PURE__*/jsxRuntime.jsx(Badge, {
157
- badge: /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
158
- sentiment: "positive",
159
- size: mapBadgeSize[size]
160
- }),
161
- size: mapBadgeSize[size],
162
- children: children
163
- });
164
- }
165
- if (notification) {
166
- return /*#__PURE__*/jsxRuntime.jsx(Badge, {
167
- badge: /*#__PURE__*/jsxRuntime.jsx(NotificationDot
168
- // @ts-expect-error CSS custom props allowed
169
- , {
170
- style: {
171
- '--badge-notification-dot-size': `${mapNotificationSize[size]}px`
172
- }
173
- }),
174
- position: "top-right",
175
- size: mapBadgeSize[size],
176
- children: children
177
- });
178
- }
179
- }
180
- return children;
181
- }
182
- function Entity({
183
- imageSrc = null,
184
- name = null,
185
- profileType = null
186
- }) {
187
- const [tryLoadImage, setTryLoadImage] = React.useState(true);
188
- if (imageSrc && tryLoadImage) {
189
- return /*#__PURE__*/jsxRuntime.jsx("img", {
190
- src: imageSrc,
191
- alt: "",
192
- onError: () => setTryLoadImage(false)
193
- });
194
- }
195
- if (profileType) {
196
- return profileType === 'business' ? /*#__PURE__*/jsxRuntime.jsx(icons.Briefcase, {}) : /*#__PURE__*/jsxRuntime.jsx(icons.Profile, {});
197
- }
198
- if (name) {
199
- return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
200
- children: initials.getInitials(name)
201
- });
202
- }
203
- return /*#__PURE__*/jsxRuntime.jsx(icons.Profile, {});
204
- }
205
-
206
- module.exports = AvatarView;
207
- //# sourceMappingURL=AvatarView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AvatarView.js","sources":["../../src/avatarView/AvatarView.tsx"],"sourcesContent":["import Badge from '../badge';\nimport { getInitials } from '../common';\nimport NotificationDot from '../common/notificationDot/NotificationDot';\nimport StatusIcon from '../statusIcon';\nimport Circle from '../common/circle';\nimport { HTMLAttributes, PropsWithChildren, useState } from 'react';\nimport { ActionOptions as ActionProps } from '../common/action/Action';\nimport { clsx } from 'clsx';\nimport { Briefcase, Profile } from '@transferwise/icons';\n\ntype InteractiveProps = Omit<ActionProps, 'text'> &\n Pick<HTMLAttributes<HTMLDivElement>, 'className' | 'aria-labelledby'>;\n\nconst AvatarViewDefaultSize = 48;\n\nexport type Props = PropsWithChildren<{\n size?: 16 | 24 | 32 | 40 | 48 | 56 | 72;\n /** adds prebuilt notification dot via Badge component */\n notification?: boolean;\n /** adds custom badge to avatar */\n badge?: React.ReactNode;\n entity?: EntityProps;\n /** changes background color to neutral and wraps component with button */\n action?: InteractiveProps;\n /** changes background color to neutral and adds predefined Badge */\n selected?: boolean;\n /** often use case to override `background-color` or `border` */\n style?: React.CSSProperties;\n}> &\n Pick<HTMLAttributes<HTMLDivElement>, 'className' | 'style'>;\n\n/** Non interactive avatar view has custom border width */\nconst mapNonInteractiveBorderWidth = {\n 16: 0.667,\n 24: 1,\n 32: 1,\n 40: 1.25,\n 48: 1.5,\n 56: 1.75,\n 72: 2.25,\n};\n\n/** Selected state has custom border width */\nconst mapSelectedBorderWidth = {\n 16: 1,\n 24: 1,\n 32: 1,\n 40: 2,\n 48: 2,\n 56: 2,\n 72: 2,\n};\n\nfunction AvatarView({\n children = undefined,\n size = AvatarViewDefaultSize,\n selected,\n notification,\n badge,\n entity,\n action,\n className,\n style,\n}: Props) {\n return (\n <Interactive\n {...action}\n className={clsx('np-avatar-view', { 'np-avatar-view-selected': selected }, className)}\n >\n <Badges asset={badge} avatarProps={{ size, notification, selected }}>\n <Circle\n size={size}\n fixedSize\n style={{\n // @ts-expect-error CSS custom props allowed\n '--avatar-view-selected-border-width': `${mapSelectedBorderWidth[size]}px`,\n '--avatar-view-non-interactive-border-width': `${mapNonInteractiveBorderWidth[size]}px`,\n ...style,\n }}\n >\n {children === undefined ? <Entity {...entity} /> : children}\n </Circle>\n </Badges>\n </Interactive>\n );\n}\n\nfunction Interactive({\n children,\n onClick,\n href,\n target,\n className,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n}: PropsWithChildren<InteractiveProps>) {\n const elementName: React.ElementType | null = onClick ? 'button' : href ? 'a' : null;\n if (elementName === null) {\n // non interactive\n return <div className={className}>{children}</div>;\n }\n const a11yProps = { ariaLabel, ariaLabelledby };\n if (elementName === 'button') {\n return (\n <button\n type=\"button\"\n className={clsx(className, 'np-avatar-view-interactive', 'btn-unstyled')}\n onClick={onClick}\n {...a11yProps}\n >\n {children}\n </button>\n );\n }\n if (elementName === 'a') {\n return (\n // eslint-disable-next-line react/jsx-no-target-blank\n <a\n href={href}\n target={target}\n rel={target === '_blank' ? 'noreferrer' : undefined}\n className={clsx(className, 'np-avatar-view-interactive', 'text-no-decoration')}\n {...a11yProps}\n >\n {children}\n </a>\n );\n }\n}\n\nconst mapBadgeSize = {\n 16: 'sm',\n 24: 'sm',\n 32: 'sm',\n 40: 'sm',\n 48: 'sm',\n 56: 'lg',\n 72: 'lg',\n};\n\n/** AvatarView has a custom sizes for badge */\nconst mapNotificationSize = {\n 16: 6,\n 24: 8,\n 32: 10,\n 40: 10,\n 48: 14,\n 56: 16,\n 72: 20,\n};\n\ntype BadgesProps = PropsWithChildren<{\n asset: React.ReactNode;\n avatarProps: Pick<Props, 'selected' | 'size' | 'notification'>;\n}>;\n\nfunction Badges({ children, asset, avatarProps }: BadgesProps) {\n const { size = AvatarViewDefaultSize, selected, notification } = avatarProps;\n if (asset || selected || notification) {\n if (asset && size > 16) {\n return (\n <Badge badge={asset} size={mapBadgeSize[size]}>\n {children}\n </Badge>\n );\n }\n if (selected && size > 16) {\n return (\n <Badge\n badge={<StatusIcon sentiment=\"positive\" size={mapBadgeSize[size]} />}\n size={mapBadgeSize[size]}\n >\n {children}\n </Badge>\n );\n }\n if (notification) {\n return (\n <Badge\n badge={\n <NotificationDot\n // @ts-expect-error CSS custom props allowed\n style={{ '--badge-notification-dot-size': `${mapNotificationSize[size]}px` }}\n />\n }\n position=\"top-right\"\n size={mapBadgeSize[size]}\n >\n {children}\n </Badge>\n );\n }\n }\n return children;\n}\n\nexport type EntityProps = {\n imageSrc?: string | null;\n name?: string | null;\n profileType?: 'personal' | 'business' | null;\n};\n\nfunction Entity({ imageSrc = null, name = null, profileType = null }: EntityProps) {\n const [tryLoadImage, setTryLoadImage] = useState(true);\n if (imageSrc && tryLoadImage) {\n return <img src={imageSrc} alt=\"\" onError={() => setTryLoadImage(false)} />;\n }\n if (profileType) {\n return profileType === 'business' ? <Briefcase /> : <Profile />;\n }\n if (name) {\n return <>{getInitials(name)}</>;\n }\n return <Profile />;\n}\n\nexport default AvatarView;\n"],"names":["AvatarViewDefaultSize","mapNonInteractiveBorderWidth","mapSelectedBorderWidth","AvatarView","children","undefined","size","selected","notification","badge","entity","action","className","style","_jsx","Interactive","clsx","Badges","asset","avatarProps","Circle","fixedSize","Entity","onClick","href","target","ariaLabel","ariaLabelledby","elementName","a11yProps","type","rel","mapBadgeSize","mapNotificationSize","Badge","StatusIcon","sentiment","NotificationDot","position","imageSrc","name","profileType","tryLoadImage","setTryLoadImage","useState","src","alt","onError","Briefcase","Profile","_Fragment","getInitials"],"mappings":";;;;;;;;;;;;AAaA,MAAMA,qBAAqB,GAAG,EAAE,CAAA;AAkBhC;AACA,MAAMC,4BAA4B,GAAG;AACnC,EAAA,EAAE,EAAE,KAAK;AACT,EAAA,EAAE,EAAE,CAAC;AAC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