@transferwise/components 0.0.0-experimental-e5e0684 → 0.0.0-experimental-37d8e2c
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.
- package/build/avatar/Avatar.js +4 -1
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs +4 -1
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/avatar/colors/colors.js +1 -1
- package/build/avatar/colors/colors.js.map +1 -1
- package/build/avatar/colors/colors.mjs +1 -1
- package/build/avatar/colors/colors.mjs.map +1 -1
- package/build/avatarView/AvatarView.js +207 -0
- package/build/avatarView/AvatarView.js.map +1 -0
- package/build/avatarView/AvatarView.mjs +205 -0
- package/build/avatarView/AvatarView.mjs.map +1 -0
- package/build/avatarWrapper/AvatarWrapper.js +6 -9
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs +5 -8
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/badge/Badge.js +6 -1
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs +6 -1
- package/build/badge/Badge.mjs.map +1 -1
- package/build/circularButton/CircularButton.js +4 -7
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +4 -7
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/circle/Circle.js +24 -1
- package/build/common/circle/Circle.js.map +1 -1
- package/build/common/circle/Circle.mjs +24 -1
- package/build/common/circle/Circle.mjs.map +1 -1
- package/build/common/initials.js +12 -0
- package/build/common/initials.js.map +1 -0
- package/build/common/initials.mjs +10 -0
- package/build/common/initials.mjs.map +1 -0
- package/build/common/notificationDot/NotificationDot.js +16 -0
- package/build/common/notificationDot/NotificationDot.js.map +1 -0
- package/build/common/notificationDot/NotificationDot.mjs +14 -0
- package/build/common/notificationDot/NotificationDot.mjs.map +1 -0
- package/build/display/Display.js +1 -1
- package/build/display/Display.js.map +1 -1
- package/build/display/Display.mjs +1 -1
- package/build/display/Display.mjs.map +1 -1
- package/build/index.js +6 -0
- package/build/index.js.map +1 -1
- package/build/index.mjs +3 -0
- package/build/index.mjs.map +1 -1
- package/build/main.css +82 -41
- package/build/statusIcon/StatusIcon.js +4 -2
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +4 -2
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/avatarGroup/AvatarGroup.css +28 -0
- package/build/styles/avatarView/AvatarView.css +22 -0
- package/build/styles/badge/Badge.css +5 -5
- package/build/styles/circularButton/CircularButton.css +0 -24
- package/build/styles/common/circle/Circle.css +17 -0
- package/build/styles/common/notificationDot/NotificationDot.css +10 -0
- package/build/styles/main.css +82 -41
- package/build/styles/statusIcon/StatusIcon.css +0 -12
- package/build/typeahead/util/highlight.js +14 -2
- package/build/typeahead/util/highlight.js.map +1 -1
- package/build/typeahead/util/highlight.mjs +15 -3
- package/build/typeahead/util/highlight.mjs.map +1 -1
- package/build/types/avatar/Avatar.d.ts +3 -0
- package/build/types/avatar/Avatar.d.ts.map +1 -1
- package/build/types/avatar/colors/colors.d.ts +1 -1
- package/build/types/avatar/colors/colors.d.ts.map +1 -1
- package/build/types/avatarGroup/AvatarGroup.d.ts +19 -0
- package/build/types/avatarGroup/AvatarGroup.d.ts.map +1 -0
- package/build/types/avatarGroup/index.d.ts +3 -0
- package/build/types/avatarGroup/index.d.ts.map +1 -0
- package/build/types/avatarView/AvatarView.d.ts +25 -0
- package/build/types/avatarView/AvatarView.d.ts.map +1 -0
- package/build/types/avatarView/index.d.ts +3 -0
- package/build/types/avatarView/index.d.ts.map +1 -0
- package/build/types/avatarWrapper/AvatarWrapper.d.ts +3 -0
- package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
- package/build/types/badge/Badge.d.ts +2 -1
- package/build/types/badge/Badge.d.ts.map +1 -1
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/common/circle/Circle.d.ts +1 -1
- package/build/types/common/circle/Circle.d.ts.map +1 -1
- package/build/types/common/index.d.ts +1 -0
- package/build/types/common/initials.d.ts +2 -0
- package/build/types/common/initials.d.ts.map +1 -0
- package/build/types/common/notificationDot/NotificationDot.d.ts +8 -0
- package/build/types/common/notificationDot/NotificationDot.d.ts.map +1 -0
- package/build/types/index.d.ts +4 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +6 -2
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/typeahead/util/highlight.d.ts +1 -1
- package/build/types/typeahead/util/highlight.d.ts.map +1 -1
- package/build/types/uploadInput/UploadInput.d.ts +0 -9
- package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
- package/build/types/uploadInput/uploadItem/UploadItem.d.ts +1 -3
- package/build/types/uploadInput/uploadItem/UploadItem.d.ts.map +1 -1
- package/build/types/uploadInput/uploadItem/UploadItemLink.d.ts.map +1 -1
- package/build/uploadInput/UploadInput.js +51 -57
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +51 -57
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js +3 -8
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs +3 -8
- package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItemLink.js +0 -1
- package/build/uploadInput/uploadItem/UploadItemLink.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItemLink.mjs +0 -1
- package/build/uploadInput/uploadItem/UploadItemLink.mjs.map +1 -1
- package/package.json +3 -3
- package/src/avatar/Avatar.tsx +4 -1
- package/src/avatar/colors/colors.ts +4 -4
- package/src/avatarGroup/AvatarGroup.css +28 -0
- package/src/avatarGroup/AvatarGroup.less +32 -0
- package/src/avatarGroup/AvatarGroup.story.tsx +249 -0
- package/src/avatarGroup/AvatarGroup.tsx +78 -0
- package/src/avatarGroup/index.ts +2 -0
- package/src/avatarView/AvatarView.css +22 -0
- package/src/avatarView/AvatarView.less +24 -0
- package/src/avatarView/AvatarView.story.tsx +425 -0
- package/src/avatarView/AvatarView.tsx +217 -0
- package/src/avatarView/index.ts +2 -0
- package/src/avatarWrapper/AvatarWrapper.tsx +12 -16
- package/src/badge/Badge.css +5 -5
- package/src/badge/Badge.less +3 -3
- package/src/badge/Badge.tsx +10 -1
- package/src/circularButton/CircularButton.css +0 -24
- package/src/circularButton/CircularButton.less +15 -15
- package/src/circularButton/CircularButton.tsx +4 -5
- package/src/common/circle/Circle.css +17 -0
- package/src/common/circle/Circle.less +22 -0
- package/src/common/circle/Circle.tsx +33 -2
- package/src/common/index.js +1 -0
- package/src/common/initials.ts +13 -0
- package/src/common/notificationDot/NotificationDot.css +10 -0
- package/src/common/notificationDot/NotificationDot.less +7 -0
- package/src/common/notificationDot/NotificationDot.tsx +10 -0
- package/src/display/Display.tsx +1 -1
- package/src/index.ts +4 -0
- package/src/main.css +82 -41
- package/src/main.less +3 -0
- package/src/statusIcon/StatusIcon.css +0 -12
- package/src/statusIcon/StatusIcon.less +6 -6
- package/src/statusIcon/StatusIcon.story.tsx +32 -28
- package/src/statusIcon/StatusIcon.tsx +18 -4
- package/src/test-utils/avatar-img.webp +0 -0
- package/src/typeahead/typeaheadOption/TypeaheadOption.spec.js +7 -5
- package/src/typeahead/util/highlight.tsx +7 -2
- package/src/uploadInput/UploadInput.spec.tsx +6 -150
- package/src/uploadInput/UploadInput.tsx +60 -81
- package/src/uploadInput/uploadItem/UploadItem.tsx +6 -12
- package/src/uploadInput/uploadItem/UploadItemLink.tsx +1 -9
package/build/index.mjs
CHANGED
|
@@ -6,6 +6,7 @@ export { default as SelectOption } from './selectOption/SelectOption.mjs';
|
|
|
6
6
|
export { default as Alert, AlertArrowPosition } from './alert/Alert.mjs';
|
|
7
7
|
export { AvatarType } from './avatar/avatarTypes.mjs';
|
|
8
8
|
export { default as Avatar } from './avatar/Avatar.mjs';
|
|
9
|
+
export { default as AvatarView } from './avatarView/AvatarView.mjs';
|
|
9
10
|
export { default as AvatarWrapper } from './avatarWrapper/AvatarWrapper.mjs';
|
|
10
11
|
export { default as Badge } from './badge/Badge.mjs';
|
|
11
12
|
export { default as Body } from './body/Body.mjs';
|
|
@@ -95,6 +96,7 @@ export { default as Upload, UploadStep } from './upload/Upload.mjs';
|
|
|
95
96
|
export { default as UploadInput } from './uploadInput/UploadInput.mjs';
|
|
96
97
|
export { useScreenSize } from './common/hooks/useScreenSize.mjs';
|
|
97
98
|
export { default as useSnackbar } from './snackbar/useSnackbar.mjs';
|
|
99
|
+
export { getAvatarColorFromSeed } from './avatar/colors/colors.mjs';
|
|
98
100
|
export { default as translations } from './i18n/index.mjs';
|
|
99
101
|
export { default as withId } from './withId/withId.mjs';
|
|
100
102
|
export { default as CheckboxButton } from './checkboxButton/CheckboxButton.mjs';
|
|
@@ -122,4 +124,5 @@ export { Variant } from './common/propsValues/variant.mjs';
|
|
|
122
124
|
export { Width } from './common/propsValues/width.mjs';
|
|
123
125
|
export { DEFAULT_LANG, DEFAULT_LOCALE, RTL_LANGUAGES, SUPPORTED_LANGUAGES, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale } from './common/locale/index.mjs';
|
|
124
126
|
export { isBrowser, isServerSide } from './common/domHelpers/documentIosClick.mjs';
|
|
127
|
+
export { getInitials } from './common/initials.mjs';
|
|
125
128
|
//# sourceMappingURL=index.mjs.map
|
package/build/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/main.css
CHANGED
|
@@ -421,6 +421,56 @@ div.critical-comms .critical-comms-body {
|
|
|
421
421
|
.np-theme-personal .tw-avatar--outlined:not(.disabled):not(:disabled):hover {
|
|
422
422
|
border-color: var(--color-interactive-primary-hover);
|
|
423
423
|
}
|
|
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
|
+
}
|
|
424
474
|
.tw-badge {
|
|
425
475
|
position: relative;
|
|
426
476
|
display: inline-block;
|
|
@@ -437,16 +487,16 @@ div.critical-comms .critical-comms-body {
|
|
|
437
487
|
--badge-border-color: rgba(0, 0, 0, 0.08);
|
|
438
488
|
}
|
|
439
489
|
.tw-badge > .tw-badge__children {
|
|
440
|
-
-webkit-mask-image: radial-gradient(circle at
|
|
441
|
-
mask-image: radial-gradient(circle at
|
|
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));
|
|
442
492
|
}
|
|
443
493
|
[dir="rtl"] .tw-badge > .tw-badge__children {
|
|
444
|
-
-webkit-mask-image: radial-gradient(circle at
|
|
445
|
-
mask-image: radial-gradient(circle at
|
|
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));
|
|
446
496
|
}
|
|
447
497
|
.tw-badge > .tw-badge__content {
|
|
448
498
|
position: absolute;
|
|
449
|
-
bottom:
|
|
499
|
+
bottom: var(--badge-bottom-position);
|
|
450
500
|
right: 0;
|
|
451
501
|
box-sizing: border-box;
|
|
452
502
|
text-align: center;
|
|
@@ -985,30 +1035,6 @@ div.critical-comms .critical-comms-body {
|
|
|
985
1035
|
cursor: pointer;
|
|
986
1036
|
position: relative;
|
|
987
1037
|
}
|
|
988
|
-
.np-circular-btn .tw-icon {
|
|
989
|
-
position: absolute;
|
|
990
|
-
top: 16px;
|
|
991
|
-
top: var(--size-16);
|
|
992
|
-
pointer-events: none;
|
|
993
|
-
color: white;
|
|
994
|
-
transition: color 0.15s ease-in-out;
|
|
995
|
-
width: 100%;
|
|
996
|
-
left: 0;
|
|
997
|
-
}
|
|
998
|
-
[dir="rtl"] .np-circular-btn .tw-icon {
|
|
999
|
-
right: 0;
|
|
1000
|
-
left: auto;
|
|
1001
|
-
left: initial;
|
|
1002
|
-
}
|
|
1003
|
-
@media (max-width: 320px) {
|
|
1004
|
-
.np-circular-btn .tw-icon {
|
|
1005
|
-
top: 8px;
|
|
1006
|
-
top: var(--size-8);
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
.np-circular-btn .tw-icon > svg {
|
|
1010
|
-
margin: 0 auto;
|
|
1011
|
-
}
|
|
1012
1038
|
.np-theme-personal .np-circular-btn {
|
|
1013
1039
|
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
1014
1040
|
}
|
|
@@ -1157,6 +1183,23 @@ div.critical-comms .critical-comms-body {
|
|
|
1157
1183
|
width: var(--circle-size);
|
|
1158
1184
|
height: var(--circle-size);
|
|
1159
1185
|
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);
|
|
1160
1203
|
}
|
|
1161
1204
|
.np-bottom-sheet {
|
|
1162
1205
|
border-radius: 10px 10px 0 0;
|
|
@@ -1439,6 +1482,16 @@ button.np-option {
|
|
|
1439
1482
|
border-radius: var(--radius-small);
|
|
1440
1483
|
}
|
|
1441
1484
|
}
|
|
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
|
+
}
|
|
1442
1495
|
.np-select-option {
|
|
1443
1496
|
border-radius: 10px;
|
|
1444
1497
|
border-radius: var(--radius-small);
|
|
@@ -4144,12 +4197,6 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4144
4197
|
transform: translateY(-24px);
|
|
4145
4198
|
}
|
|
4146
4199
|
}
|
|
4147
|
-
.status-icon > svg {
|
|
4148
|
-
height: 32px;
|
|
4149
|
-
height: var(--size-32);
|
|
4150
|
-
width: 32px;
|
|
4151
|
-
width: var(--size-32);
|
|
4152
|
-
}
|
|
4153
4200
|
.status-circle .light {
|
|
4154
4201
|
color: var(--color-contrast);
|
|
4155
4202
|
}
|
|
@@ -4165,12 +4212,6 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4165
4212
|
.np-theme-personal .status-circle.pending .status-icon {
|
|
4166
4213
|
color: var(--color-dark);
|
|
4167
4214
|
}
|
|
4168
|
-
.status-circle-sm .status-icon > svg {
|
|
4169
|
-
height: 14px;
|
|
4170
|
-
height: var(--size-14);
|
|
4171
|
-
width: 14px;
|
|
4172
|
-
width: var(--size-14);
|
|
4173
|
-
}
|
|
4174
4215
|
@media (max-width: 320px) {
|
|
4175
4216
|
.status-circle-sm .status-icon > svg {
|
|
4176
4217
|
width: 24px;
|
|
@@ -30,12 +30,14 @@ const StatusIcon = ({
|
|
|
30
30
|
const Icon = iconTypeMap[sentiment];
|
|
31
31
|
const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';
|
|
32
32
|
const isTinyViewport = useMedia.useMedia(`(max-width: ${breakpoint.Breakpoint.ZOOM_400}px)`);
|
|
33
|
-
const size$1 = sizeProp === size.Size.SMALL && isTinyViewport ? 32 : mapLegacySize[sizeProp];
|
|
33
|
+
const size$1 = sizeProp === size.Size.SMALL && isTinyViewport ? 32 : typeof sizeProp === 'string' ? mapLegacySize[sizeProp] : sizeProp;
|
|
34
34
|
return /*#__PURE__*/jsxRuntime.jsx(Circle, {
|
|
35
35
|
as: "span",
|
|
36
36
|
size: size$1,
|
|
37
37
|
"data-testid": "status-icon",
|
|
38
|
-
className: clsx.clsx('status-circle',
|
|
38
|
+
className: clsx.clsx('status-circle',
|
|
39
|
+
// `status-circle-${sizeProp}`,
|
|
40
|
+
sentiment),
|
|
39
41
|
children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
40
42
|
className: clsx.clsx('status-icon', iconColor)
|
|
41
43
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.js","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nexport type StatusIconProps = {\n sentiment
|
|
1
|
+
{"version":3,"file":"StatusIcon.js","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\n/**\n * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead\n */\ntype LegacySizes = SizeSmall | SizeMedium | SizeLarge;\n\nexport type StatusIconProps = {\n sentiment?: `${Sentiment}`;\n size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;\n};\n\nconst iconTypeMap = {\n positive: Check,\n neutral: Info,\n warning: Alert,\n negative: Cross,\n pending: ClockBorderless,\n info: Info,\n error: Cross,\n success: Check,\n} satisfies Record<`${Sentiment}`, React.ElementType>;\n\nconst mapLegacySize = {\n [String(Size.SMALL)]: 16,\n [String(Size.MEDIUM)]: 40,\n [String(Size.LARGE)]: 48,\n} satisfies Record<string, CircleProps['size']>;\n\nconst StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 'md' }: StatusIconProps) => {\n const Icon = iconTypeMap[sentiment];\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n const size =\n sizeProp === Size.SMALL && isTinyViewport\n ? 32\n : typeof sizeProp === 'string'\n ? mapLegacySize[sizeProp]\n : sizeProp;\n return (\n <Circle\n as=\"span\"\n size={size}\n data-testid=\"status-icon\"\n className={clsx(\n 'status-circle',\n // `status-circle-${sizeProp}`,\n sentiment,\n )}\n >\n <Icon className={clsx('status-icon', iconColor)} />\n </Circle>\n );\n};\n\nexport default StatusIcon;\n"],"names":["iconTypeMap","positive","Check","neutral","Info","warning","Alert","negative","Cross","pending","ClockBorderless","info","error","success","mapLegacySize","String","Size","SMALL","MEDIUM","LARGE","StatusIcon","sentiment","size","sizeProp","Icon","iconColor","isTinyViewport","useMedia","Breakpoint","ZOOM_400","_jsx","Circle","as","className","clsx","children"],"mappings":";;;;;;;;;;AAiBA,MAAMA,WAAW,GAAG;AAClBC,EAAAA,QAAQ,EAAEC,WAAK;AACfC,EAAAA,OAAO,EAAEC,UAAI;AACbC,EAAAA,OAAO,EAAEC,WAAK;AACdC,EAAAA,QAAQ,EAAEC,WAAK;AACfC,EAAAA,OAAO,EAAEC,qBAAe;AACxBC,EAAAA,IAAI,EAAEP,UAAI;AACVQ,EAAAA,KAAK,EAAEJ,WAAK;AACZK,EAAAA,OAAO,EAAEX,WAAAA;CAC0C,CAAA;AAErD,MAAMY,aAAa,GAAG;AACpB,EAAA,CAACC,MAAM,CAACC,SAAI,CAACC,KAAK,CAAC,GAAG,EAAE;AACxB,EAAA,CAACF,MAAM,CAACC,SAAI,CAACE,MAAM,CAAC,GAAG,EAAE;AACzB,EAAA,CAACH,MAAM,CAACC,SAAI,CAACG,KAAK,CAAC,GAAG,EAAA;CACuB,CAAA;AAEzCC,MAAAA,UAAU,GAAGA,CAAC;AAAEC,EAAAA,SAAS,GAAG,SAAS;EAAEC,IAAI,EAAEC,QAAQ,GAAG,IAAA;AAAI,CAAmB,KAAI;AACvF,EAAA,MAAMC,IAAI,GAAGxB,WAAW,CAACqB,SAAS,CAAC,CAAA;AACnC,EAAA,MAAMI,SAAS,GAAGJ,SAAS,KAAK,SAAS,IAAIA,SAAS,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;EACvF,MAAMK,cAAc,GAAGC,iBAAQ,CAAC,eAAeC,qBAAU,CAACC,QAAQ,CAAA,GAAA,CAAK,CAAC,CAAA;EACxE,MAAMP,MAAI,GACRC,QAAQ,KAAKP,SAAI,CAACC,KAAK,IAAIS,cAAc,GACrC,EAAE,GACF,OAAOH,QAAQ,KAAK,QAAQ,GAC1BT,aAAa,CAACS,QAAQ,CAAC,GACvBA,QAAQ,CAAA;EAChB,oBACEO,cAAA,CAACC,MAAM,EAAA;AACLC,IAAAA,EAAE,EAAC,MAAM;AACTV,IAAAA,IAAI,EAAEA,MAAK;AACX,IAAA,aAAA,EAAY,aAAa;IACzBW,SAAS,EAAEC,SAAI,CACb,eAAe;AACf;AACAb,IAAAA,SAAS,CACT;IAAAc,QAAA,eAEFL,cAAA,CAACN,IAAI,EAAA;AAACS,MAAAA,SAAS,EAAEC,SAAI,CAAC,aAAa,EAAET,SAAS,CAAA;KAChD,CAAA;AAAA,GAAQ,CAAC,CAAA;AAEb;;;;"}
|
|
@@ -28,12 +28,14 @@ const StatusIcon = ({
|
|
|
28
28
|
const Icon = iconTypeMap[sentiment];
|
|
29
29
|
const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';
|
|
30
30
|
const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
|
|
31
|
-
const size = sizeProp === Size.SMALL && isTinyViewport ? 32 : mapLegacySize[sizeProp];
|
|
31
|
+
const size = sizeProp === Size.SMALL && isTinyViewport ? 32 : typeof sizeProp === 'string' ? mapLegacySize[sizeProp] : sizeProp;
|
|
32
32
|
return /*#__PURE__*/jsx(Circle, {
|
|
33
33
|
as: "span",
|
|
34
34
|
size: size,
|
|
35
35
|
"data-testid": "status-icon",
|
|
36
|
-
className: clsx('status-circle',
|
|
36
|
+
className: clsx('status-circle',
|
|
37
|
+
// `status-circle-${sizeProp}`,
|
|
38
|
+
sentiment),
|
|
37
39
|
children: /*#__PURE__*/jsx(Icon, {
|
|
38
40
|
className: clsx('status-icon', iconColor)
|
|
39
41
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.mjs","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nexport type StatusIconProps = {\n sentiment
|
|
1
|
+
{"version":3,"file":"StatusIcon.mjs","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\n/**\n * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead\n */\ntype LegacySizes = SizeSmall | SizeMedium | SizeLarge;\n\nexport type StatusIconProps = {\n sentiment?: `${Sentiment}`;\n size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;\n};\n\nconst iconTypeMap = {\n positive: Check,\n neutral: Info,\n warning: Alert,\n negative: Cross,\n pending: ClockBorderless,\n info: Info,\n error: Cross,\n success: Check,\n} satisfies Record<`${Sentiment}`, React.ElementType>;\n\nconst mapLegacySize = {\n [String(Size.SMALL)]: 16,\n [String(Size.MEDIUM)]: 40,\n [String(Size.LARGE)]: 48,\n} satisfies Record<string, CircleProps['size']>;\n\nconst StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 'md' }: StatusIconProps) => {\n const Icon = iconTypeMap[sentiment];\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n const size =\n sizeProp === Size.SMALL && isTinyViewport\n ? 32\n : typeof sizeProp === 'string'\n ? mapLegacySize[sizeProp]\n : sizeProp;\n return (\n <Circle\n as=\"span\"\n size={size}\n data-testid=\"status-icon\"\n className={clsx(\n 'status-circle',\n // `status-circle-${sizeProp}`,\n sentiment,\n )}\n >\n <Icon className={clsx('status-icon', iconColor)} />\n </Circle>\n );\n};\n\nexport default StatusIcon;\n"],"names":["iconTypeMap","positive","Check","neutral","Info","warning","Alert","negative","Cross","pending","ClockBorderless","info","error","success","mapLegacySize","String","Size","SMALL","MEDIUM","LARGE","StatusIcon","sentiment","size","sizeProp","Icon","iconColor","isTinyViewport","useMedia","Breakpoint","ZOOM_400","_jsx","Circle","as","className","clsx","children"],"mappings":";;;;;;;;AAiBA,MAAMA,WAAW,GAAG;AAClBC,EAAAA,QAAQ,EAAEC,KAAK;AACfC,EAAAA,OAAO,EAAEC,IAAI;AACbC,EAAAA,OAAO,EAAEC,KAAK;AACdC,EAAAA,QAAQ,EAAEC,KAAK;AACfC,EAAAA,OAAO,EAAEC,eAAe;AACxBC,EAAAA,IAAI,EAAEP,IAAI;AACVQ,EAAAA,KAAK,EAAEJ,KAAK;AACZK,EAAAA,OAAO,EAAEX,KAAAA;CAC0C,CAAA;AAErD,MAAMY,aAAa,GAAG;AACpB,EAAA,CAACC,MAAM,CAACC,IAAI,CAACC,KAAK,CAAC,GAAG,EAAE;AACxB,EAAA,CAACF,MAAM,CAACC,IAAI,CAACE,MAAM,CAAC,GAAG,EAAE;AACzB,EAAA,CAACH,MAAM,CAACC,IAAI,CAACG,KAAK,CAAC,GAAG,EAAA;CACuB,CAAA;AAEzCC,MAAAA,UAAU,GAAGA,CAAC;AAAEC,EAAAA,SAAS,GAAG,SAAS;EAAEC,IAAI,EAAEC,QAAQ,GAAG,IAAA;AAAI,CAAmB,KAAI;AACvF,EAAA,MAAMC,IAAI,GAAGxB,WAAW,CAACqB,SAAS,CAAC,CAAA;AACnC,EAAA,MAAMI,SAAS,GAAGJ,SAAS,KAAK,SAAS,IAAIA,SAAS,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;EACvF,MAAMK,cAAc,GAAGC,QAAQ,CAAC,eAAeC,UAAU,CAACC,QAAQ,CAAA,GAAA,CAAK,CAAC,CAAA;EACxE,MAAMP,IAAI,GACRC,QAAQ,KAAKP,IAAI,CAACC,KAAK,IAAIS,cAAc,GACrC,EAAE,GACF,OAAOH,QAAQ,KAAK,QAAQ,GAC1BT,aAAa,CAACS,QAAQ,CAAC,GACvBA,QAAQ,CAAA;EAChB,oBACEO,GAAA,CAACC,MAAM,EAAA;AACLC,IAAAA,EAAE,EAAC,MAAM;AACTV,IAAAA,IAAI,EAAEA,IAAK;AACX,IAAA,aAAA,EAAY,aAAa;IACzBW,SAAS,EAAEC,IAAI,CACb,eAAe;AACf;AACAb,IAAAA,SAAS,CACT;IAAAc,QAAA,eAEFL,GAAA,CAACN,IAAI,EAAA;AAACS,MAAAA,SAAS,EAAEC,IAAI,CAAC,aAAa,EAAET,SAAS,CAAA;KAChD,CAAA;AAAA,GAAQ,CAAC,CAAA;AAEb;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.np-avatar-group {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
--np-avatar-group-size: 48px;
|
|
4
|
+
--np-avatar-size: 32px;
|
|
5
|
+
}
|
|
6
|
+
.np-avatar-group-diagonal {
|
|
7
|
+
width: var(--np-avatar-group-size);
|
|
8
|
+
height: var(--np-avatar-group-size);
|
|
9
|
+
}
|
|
10
|
+
.np-avatar-group-diagonal-mask {
|
|
11
|
+
-webkit-mask-image: radial-gradient(circle at right 100%, transparent, transparent calc(var(--np-avatar-size) / 1.8), black 0);
|
|
12
|
+
mask-image: radial-gradient(circle at right 100%, transparent, transparent calc(var(--np-avatar-size) / 1.8), black 0);
|
|
13
|
+
}
|
|
14
|
+
.np-avatar-group-diagonal-child {
|
|
15
|
+
margin-left: calc((var(--np-avatar-size) / 2) * -1);
|
|
16
|
+
margin-top: calc((var(--np-avatar-size) * var(--np-avatar-group-index)) / 2);
|
|
17
|
+
}
|
|
18
|
+
.np-avatar-group-horizontal {
|
|
19
|
+
width: calc((var(--np-avatar-size) * 2) - 2px);
|
|
20
|
+
height: var(--np-avatar-group-size);
|
|
21
|
+
}
|
|
22
|
+
.np-avatar-group-horizontal-mask {
|
|
23
|
+
-webkit-mask-image: radial-gradient(circle at right 50%, transparent, transparent calc(var(--np-avatar-size) / 2), black 0);
|
|
24
|
+
mask-image: radial-gradient(circle at right 50%, transparent, transparent calc(var(--np-avatar-size) / 2), black 0);
|
|
25
|
+
}
|
|
26
|
+
.np-avatar-group-horizontal-child {
|
|
27
|
+
margin-left: calc((var(--np-avatar-size) / 4) * -1);
|
|
28
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.np-avatar-view {
|
|
2
|
+
border-radius: 9999px;
|
|
3
|
+
border-radius: var(--radius-full);
|
|
4
|
+
color: var(--color-interactive-primary);
|
|
5
|
+
height: -moz-fit-content;
|
|
6
|
+
height: fit-content;
|
|
7
|
+
width: -moz-fit-content;
|
|
8
|
+
width: fit-content;
|
|
9
|
+
}
|
|
10
|
+
.np-avatar-view .np-circle {
|
|
11
|
+
background-color: transparent;
|
|
12
|
+
border: var(--avatar-view-non-interactive-border-width) solid rgba(0,0,0,0.10196);
|
|
13
|
+
border: var(--avatar-view-non-interactive-border-width) solid var(--color-border-neutral);
|
|
14
|
+
}
|
|
15
|
+
.np-avatar-view-selected .np-circle {
|
|
16
|
+
border: var(--avatar-view-selected-border-width) solid var(--color-interactive-primary) !important;
|
|
17
|
+
}
|
|
18
|
+
.np-avatar-view-interactive .np-circle {
|
|
19
|
+
background-color: rgba(134,167,189,0.10196);
|
|
20
|
+
background-color: var(--color-background-neutral);
|
|
21
|
+
border: none;
|
|
22
|
+
}
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
--badge-border-color: rgba(0, 0, 0, 0.08);
|
|
15
15
|
}
|
|
16
16
|
.tw-badge > .tw-badge__children {
|
|
17
|
-
-webkit-mask-image: radial-gradient(circle at
|
|
18
|
-
mask-image: radial-gradient(circle at
|
|
17
|
+
-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));
|
|
18
|
+
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));
|
|
19
19
|
}
|
|
20
20
|
[dir="rtl"] .tw-badge > .tw-badge__children {
|
|
21
|
-
-webkit-mask-image: radial-gradient(circle at
|
|
22
|
-
mask-image: radial-gradient(circle at
|
|
21
|
+
-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));
|
|
22
|
+
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));
|
|
23
23
|
}
|
|
24
24
|
.tw-badge > .tw-badge__content {
|
|
25
25
|
position: absolute;
|
|
26
|
-
bottom:
|
|
26
|
+
bottom: var(--badge-bottom-position);
|
|
27
27
|
right: 0;
|
|
28
28
|
box-sizing: border-box;
|
|
29
29
|
text-align: center;
|
|
@@ -6,30 +6,6 @@
|
|
|
6
6
|
cursor: pointer;
|
|
7
7
|
position: relative;
|
|
8
8
|
}
|
|
9
|
-
.np-circular-btn .tw-icon {
|
|
10
|
-
position: absolute;
|
|
11
|
-
top: 16px;
|
|
12
|
-
top: var(--size-16);
|
|
13
|
-
pointer-events: none;
|
|
14
|
-
color: white;
|
|
15
|
-
transition: color 0.15s ease-in-out;
|
|
16
|
-
width: 100%;
|
|
17
|
-
left: 0;
|
|
18
|
-
}
|
|
19
|
-
[dir="rtl"] .np-circular-btn .tw-icon {
|
|
20
|
-
right: 0;
|
|
21
|
-
left: auto;
|
|
22
|
-
left: initial;
|
|
23
|
-
}
|
|
24
|
-
@media (max-width: 320px) {
|
|
25
|
-
.np-circular-btn .tw-icon {
|
|
26
|
-
top: 8px;
|
|
27
|
-
top: var(--size-8);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
.np-circular-btn .tw-icon > svg {
|
|
31
|
-
margin: 0 auto;
|
|
32
|
-
}
|
|
33
9
|
.np-theme-personal .np-circular-btn {
|
|
34
10
|
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
35
11
|
}
|
|
@@ -4,4 +4,21 @@
|
|
|
4
4
|
width: var(--circle-size);
|
|
5
5
|
height: var(--circle-size);
|
|
6
6
|
flex-shrink: 0;
|
|
7
|
+
font-size: var(--circle-font-size);
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
font-weight: var(--font-weight-semi-bold);
|
|
10
|
+
line-height: 1;
|
|
11
|
+
}
|
|
12
|
+
.np-circle img {
|
|
13
|
+
border-radius: 9999px;
|
|
14
|
+
border-radius: var(--radius-full);
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
.np-circle .np-display {
|
|
19
|
+
font-size: var(--circle-font-size);
|
|
20
|
+
}
|
|
21
|
+
.np-circle .tw-icon > svg {
|
|
22
|
+
height: var(--circle-icon-size);
|
|
23
|
+
width: var(--circle-icon-size);
|
|
7
24
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
.np-notification-dot {
|
|
2
|
+
--badge-notification-dot-size: 14px;
|
|
3
|
+
width: 14px;
|
|
4
|
+
width: var(--badge-notification-dot-size);
|
|
5
|
+
height: 14px;
|
|
6
|
+
height: var(--badge-notification-dot-size);
|
|
7
|
+
background-color: var(--color-sentiment-negative);
|
|
8
|
+
border-radius: 9999px;
|
|
9
|
+
border-radius: var(--radius-full);
|
|
10
|
+
}
|
package/build/styles/main.css
CHANGED
|
@@ -421,6 +421,56 @@ div.critical-comms .critical-comms-body {
|
|
|
421
421
|
.np-theme-personal .tw-avatar--outlined:not(.disabled):not(:disabled):hover {
|
|
422
422
|
border-color: var(--color-interactive-primary-hover);
|
|
423
423
|
}
|
|
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
|
+
}
|
|
424
474
|
.tw-badge {
|
|
425
475
|
position: relative;
|
|
426
476
|
display: inline-block;
|
|
@@ -437,16 +487,16 @@ div.critical-comms .critical-comms-body {
|
|
|
437
487
|
--badge-border-color: rgba(0, 0, 0, 0.08);
|
|
438
488
|
}
|
|
439
489
|
.tw-badge > .tw-badge__children {
|
|
440
|
-
-webkit-mask-image: radial-gradient(circle at
|
|
441
|
-
mask-image: radial-gradient(circle at
|
|
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));
|
|
442
492
|
}
|
|
443
493
|
[dir="rtl"] .tw-badge > .tw-badge__children {
|
|
444
|
-
-webkit-mask-image: radial-gradient(circle at
|
|
445
|
-
mask-image: radial-gradient(circle at
|
|
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));
|
|
446
496
|
}
|
|
447
497
|
.tw-badge > .tw-badge__content {
|
|
448
498
|
position: absolute;
|
|
449
|
-
bottom:
|
|
499
|
+
bottom: var(--badge-bottom-position);
|
|
450
500
|
right: 0;
|
|
451
501
|
box-sizing: border-box;
|
|
452
502
|
text-align: center;
|
|
@@ -985,30 +1035,6 @@ div.critical-comms .critical-comms-body {
|
|
|
985
1035
|
cursor: pointer;
|
|
986
1036
|
position: relative;
|
|
987
1037
|
}
|
|
988
|
-
.np-circular-btn .tw-icon {
|
|
989
|
-
position: absolute;
|
|
990
|
-
top: 16px;
|
|
991
|
-
top: var(--size-16);
|
|
992
|
-
pointer-events: none;
|
|
993
|
-
color: white;
|
|
994
|
-
transition: color 0.15s ease-in-out;
|
|
995
|
-
width: 100%;
|
|
996
|
-
left: 0;
|
|
997
|
-
}
|
|
998
|
-
[dir="rtl"] .np-circular-btn .tw-icon {
|
|
999
|
-
right: 0;
|
|
1000
|
-
left: auto;
|
|
1001
|
-
left: initial;
|
|
1002
|
-
}
|
|
1003
|
-
@media (max-width: 320px) {
|
|
1004
|
-
.np-circular-btn .tw-icon {
|
|
1005
|
-
top: 8px;
|
|
1006
|
-
top: var(--size-8);
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
.np-circular-btn .tw-icon > svg {
|
|
1010
|
-
margin: 0 auto;
|
|
1011
|
-
}
|
|
1012
1038
|
.np-theme-personal .np-circular-btn {
|
|
1013
1039
|
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
1014
1040
|
}
|
|
@@ -1157,6 +1183,23 @@ div.critical-comms .critical-comms-body {
|
|
|
1157
1183
|
width: var(--circle-size);
|
|
1158
1184
|
height: var(--circle-size);
|
|
1159
1185
|
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);
|
|
1160
1203
|
}
|
|
1161
1204
|
.np-bottom-sheet {
|
|
1162
1205
|
border-radius: 10px 10px 0 0;
|
|
@@ -1439,6 +1482,16 @@ button.np-option {
|
|
|
1439
1482
|
border-radius: var(--radius-small);
|
|
1440
1483
|
}
|
|
1441
1484
|
}
|
|
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
|
+
}
|
|
1442
1495
|
.np-select-option {
|
|
1443
1496
|
border-radius: 10px;
|
|
1444
1497
|
border-radius: var(--radius-small);
|
|
@@ -4144,12 +4197,6 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4144
4197
|
transform: translateY(-24px);
|
|
4145
4198
|
}
|
|
4146
4199
|
}
|
|
4147
|
-
.status-icon > svg {
|
|
4148
|
-
height: 32px;
|
|
4149
|
-
height: var(--size-32);
|
|
4150
|
-
width: 32px;
|
|
4151
|
-
width: var(--size-32);
|
|
4152
|
-
}
|
|
4153
4200
|
.status-circle .light {
|
|
4154
4201
|
color: var(--color-contrast);
|
|
4155
4202
|
}
|
|
@@ -4165,12 +4212,6 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4165
4212
|
.np-theme-personal .status-circle.pending .status-icon {
|
|
4166
4213
|
color: var(--color-dark);
|
|
4167
4214
|
}
|
|
4168
|
-
.status-circle-sm .status-icon > svg {
|
|
4169
|
-
height: 14px;
|
|
4170
|
-
height: var(--size-14);
|
|
4171
|
-
width: 14px;
|
|
4172
|
-
width: var(--size-14);
|
|
4173
|
-
}
|
|
4174
4215
|
@media (max-width: 320px) {
|
|
4175
4216
|
.status-circle-sm .status-icon > svg {
|
|
4176
4217
|
width: 24px;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
.status-icon > svg {
|
|
2
|
-
height: 32px;
|
|
3
|
-
height: var(--size-32);
|
|
4
|
-
width: 32px;
|
|
5
|
-
width: var(--size-32);
|
|
6
|
-
}
|
|
7
1
|
.status-circle .light {
|
|
8
2
|
color: var(--color-contrast);
|
|
9
3
|
}
|
|
@@ -19,12 +13,6 @@
|
|
|
19
13
|
.np-theme-personal .status-circle.pending .status-icon {
|
|
20
14
|
color: var(--color-dark);
|
|
21
15
|
}
|
|
22
|
-
.status-circle-sm .status-icon > svg {
|
|
23
|
-
height: 14px;
|
|
24
|
-
height: var(--size-14);
|
|
25
|
-
width: 14px;
|
|
26
|
-
width: var(--size-14);
|
|
27
|
-
}
|
|
28
16
|
@media (max-width: 320px) {
|
|
29
17
|
.status-circle-sm .status-icon > svg {
|
|
30
18
|
width: 24px;
|
|
@@ -6,13 +6,25 @@ function Highlight({
|
|
|
6
6
|
className,
|
|
7
7
|
value,
|
|
8
8
|
query
|
|
9
|
+
}) {
|
|
10
|
+
const content = /*#__PURE__*/jsxRuntime.jsx(HighlightContent, {
|
|
11
|
+
value: value,
|
|
12
|
+
query: query
|
|
13
|
+
});
|
|
14
|
+
return className ? /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
15
|
+
className: className,
|
|
16
|
+
children: content
|
|
17
|
+
}) : content;
|
|
18
|
+
}
|
|
19
|
+
function HighlightContent({
|
|
20
|
+
value,
|
|
21
|
+
query
|
|
9
22
|
}) {
|
|
10
23
|
if (value && query) {
|
|
11
24
|
const highlightStart = value.toUpperCase().indexOf(query.trim().toUpperCase());
|
|
12
25
|
const highlightEnd = highlightStart + query.trim().length;
|
|
13
26
|
if (highlightStart !== -1) {
|
|
14
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
15
|
-
className: className,
|
|
27
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
16
28
|
children: [value.slice(0, Math.max(0, highlightStart)), /*#__PURE__*/jsxRuntime.jsx("strong", {
|
|
17
29
|
children: value.slice(highlightStart, highlightEnd)
|
|
18
30
|
}), value.slice(Math.max(0, highlightEnd))]
|