@transferwise/components 46.77.0 → 46.78.0
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 +2 -7
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs +2 -7
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/badge/Badge.js +1 -10
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs +1 -10
- package/build/badge/Badge.mjs.map +1 -1
- package/build/circularButton/CircularButton.js +1 -1
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +1 -1
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/circle/Circle.js +15 -2
- package/build/common/circle/Circle.js.map +1 -1
- package/build/common/circle/Circle.mjs +15 -2
- package/build/common/circle/Circle.mjs.map +1 -1
- package/build/i18n/de.json +5 -0
- package/build/i18n/de.json.js +5 -0
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/de.json.mjs +5 -0
- package/build/i18n/de.json.mjs.map +1 -1
- package/build/i18n/es.json +5 -0
- package/build/i18n/es.json.js +5 -0
- package/build/i18n/es.json.js.map +1 -1
- package/build/i18n/es.json.mjs +5 -0
- package/build/i18n/es.json.mjs.map +1 -1
- package/build/i18n/fr.json +5 -0
- package/build/i18n/fr.json.js +5 -0
- package/build/i18n/fr.json.js.map +1 -1
- package/build/i18n/fr.json.mjs +5 -0
- package/build/i18n/fr.json.mjs.map +1 -1
- package/build/i18n/hu.json +5 -0
- package/build/i18n/hu.json.js +5 -0
- package/build/i18n/hu.json.js.map +1 -1
- package/build/i18n/hu.json.mjs +5 -0
- package/build/i18n/hu.json.mjs.map +1 -1
- package/build/i18n/id.json +5 -0
- package/build/i18n/id.json.js +5 -0
- package/build/i18n/id.json.js.map +1 -1
- package/build/i18n/id.json.mjs +5 -0
- package/build/i18n/id.json.mjs.map +1 -1
- package/build/i18n/it.json +5 -0
- package/build/i18n/it.json.js +5 -0
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/it.json.mjs +5 -0
- package/build/i18n/it.json.mjs.map +1 -1
- package/build/i18n/ja.json +5 -0
- package/build/i18n/ja.json.js +5 -0
- package/build/i18n/ja.json.js.map +1 -1
- package/build/i18n/ja.json.mjs +5 -0
- package/build/i18n/ja.json.mjs.map +1 -1
- package/build/i18n/pl.json +5 -0
- package/build/i18n/pl.json.js +5 -0
- package/build/i18n/pl.json.js.map +1 -1
- package/build/i18n/pl.json.mjs +5 -0
- package/build/i18n/pl.json.mjs.map +1 -1
- package/build/i18n/pt.json +5 -0
- package/build/i18n/pt.json.js +5 -0
- package/build/i18n/pt.json.js.map +1 -1
- package/build/i18n/pt.json.mjs +5 -0
- package/build/i18n/pt.json.mjs.map +1 -1
- package/build/i18n/ro.json +5 -0
- package/build/i18n/ro.json.js +5 -0
- package/build/i18n/ro.json.js.map +1 -1
- package/build/i18n/ro.json.mjs +5 -0
- package/build/i18n/ro.json.mjs.map +1 -1
- package/build/i18n/ru.json +5 -0
- package/build/i18n/ru.json.js +5 -0
- package/build/i18n/ru.json.js.map +1 -1
- package/build/i18n/ru.json.mjs +5 -0
- package/build/i18n/ru.json.mjs.map +1 -1
- package/build/i18n/tr.json +5 -0
- package/build/i18n/tr.json.js +5 -0
- package/build/i18n/tr.json.js.map +1 -1
- package/build/i18n/tr.json.mjs +5 -0
- package/build/i18n/tr.json.mjs.map +1 -1
- package/build/main.css +46 -22
- package/build/statusIcon/StatusIcon.js +4 -4
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +4 -4
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/avatar/Avatar.css +29 -0
- package/build/styles/badge/Badge.css +6 -0
- package/build/styles/circularButton/CircularButton.css +2 -2
- package/build/styles/common/circle/Circle.css +4 -0
- package/build/styles/main.css +46 -22
- package/build/styles/statusIcon/StatusIcon.css +0 -20
- package/build/types/avatar/Avatar.d.ts.map +1 -1
- package/build/types/badge/Badge.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/statusIcon/StatusIcon.d.ts +7 -3
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/avatar/Avatar.css +29 -0
- package/src/avatar/Avatar.less +12 -0
- package/src/avatar/Avatar.tsx +4 -8
- package/src/avatarWrapper/__snapshots__/AvatarWrapper.spec.tsx.snap +11 -22
- package/src/badge/Badge.css +6 -0
- package/src/badge/Badge.less +6 -0
- package/src/badge/Badge.tsx +1 -11
- package/src/circularButton/CircularButton.css +2 -2
- package/src/circularButton/CircularButton.less +1 -1
- package/src/circularButton/CircularButton.story.tsx +3 -0
- package/src/circularButton/CircularButton.tsx +1 -1
- package/src/circularButton/__snapshots__/CircularButton.spec.tsx.snap +10 -10
- package/src/common/circle/Circle.css +4 -0
- package/src/common/circle/Circle.less +6 -0
- package/src/common/circle/Circle.story.tsx +2 -2
- package/src/common/circle/Circle.tsx +25 -2
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +4 -8
- package/src/i18n/de.json +5 -0
- package/src/i18n/es.json +5 -0
- package/src/i18n/fr.json +5 -0
- package/src/i18n/hu.json +5 -0
- package/src/i18n/id.json +5 -0
- package/src/i18n/it.json +5 -0
- package/src/i18n/ja.json +5 -0
- package/src/i18n/pl.json +5 -0
- package/src/i18n/pt.json +5 -0
- package/src/i18n/ro.json +5 -0
- package/src/i18n/ru.json +5 -0
- package/src/i18n/tr.json +5 -0
- package/src/main.css +46 -22
- package/src/overlayHeader/__snapshots__/OverlayHeader.spec.tsx.snap +2 -4
- package/src/promoCard/PromoCard.spec.tsx +1 -1
- package/src/radio/__snapshots__/Radio.rtl.spec.tsx.snap +2 -4
- package/src/statusIcon/StatusIcon.css +0 -20
- package/src/statusIcon/StatusIcon.less +0 -17
- package/src/statusIcon/StatusIcon.spec.tsx +2 -21
- package/src/statusIcon/StatusIcon.story.tsx +32 -1
- package/src/statusIcon/StatusIcon.tsx +11 -10
|
@@ -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';\nimport { useIntl } from 'react-intl';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nimport messages from './StatusIcon.messages';\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';\nimport { useIntl } from 'react-intl';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nimport messages from './StatusIcon.messages';\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 * Override for the sentiment's-derived, default, accessible\n * name announced by the screen readers. <br />\n * Using `null` will render the icon purely presentational.\n * */\n iconLabel?: string | null;\n};\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 = 40, iconLabel }: StatusIconProps) => {\n const intl = useIntl();\n\n const iconMetaBySentiment: Record<\n `${Sentiment}`,\n {\n Icon: React.ElementType;\n defaultIconLabel: string;\n }\n > = {\n [Sentiment.NEGATIVE]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.POSITIVE]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n [Sentiment.WARNING]: {\n Icon: Alert,\n defaultIconLabel: intl.formatMessage(messages.warningLabel),\n },\n [Sentiment.PENDING]: {\n Icon: ClockBorderless,\n defaultIconLabel: intl.formatMessage(messages.pendingLabel),\n },\n [Sentiment.NEUTRAL]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n // deprecated\n [Sentiment.ERROR]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.INFO]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n [Sentiment.SUCCESS]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n };\n const { Icon, defaultIconLabel } = iconMetaBySentiment[sentiment];\n\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n return (\n <Circle\n as=\"span\"\n size={isTinyViewport && size < 40 ? 32 : size}\n data-testid=\"status-icon\"\n className={clsx('status-circle', sentiment)}\n >\n <Icon\n className={clsx('status-icon', iconColor)}\n title={iconLabel === null ? undefined : iconLabel || defaultIconLabel}\n />\n </Circle>\n );\n};\n\nexport default StatusIcon;\n"],"names":["mapLegacySize","String","Size","SMALL","MEDIUM","LARGE","StatusIcon","sentiment","size","sizeProp","iconLabel","intl","useIntl","iconMetaBySentiment","Sentiment","NEGATIVE","Icon","Cross","defaultIconLabel","formatMessage","messages","errorLabel","POSITIVE","Check","successLabel","WARNING","Alert","warningLabel","PENDING","ClockBorderless","pendingLabel","NEUTRAL","Info","informationLabel","ERROR","INFO","SUCCESS","iconColor","isTinyViewport","useMedia","Breakpoint","ZOOM_400","_jsx","Circle","as","className","clsx","children","title","undefined"],"mappings":"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"}
|
|
@@ -2,17 +2,26 @@
|
|
|
2
2
|
}@media (min-width: 768px) {
|
|
3
3
|
}.tw-avatar {
|
|
4
4
|
position: relative;
|
|
5
|
+
border-radius: 50%;
|
|
5
6
|
-webkit-user-select: none;
|
|
6
7
|
-moz-user-select: none;
|
|
7
8
|
user-select: none;
|
|
8
9
|
box-sizing: border-box;
|
|
9
10
|
}.tw-avatar .tw-avatar__content {
|
|
11
|
+
align-items: center;
|
|
10
12
|
background-color: rgba(134,167,189,0.10196);
|
|
11
13
|
background-color: #86a7bd1a;
|
|
12
14
|
background-color: var(--color-background-neutral);
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
color: #37517e;
|
|
17
|
+
color: var(--color-content-primary);
|
|
18
|
+
display: flex;
|
|
19
|
+
height: 100%;
|
|
20
|
+
justify-content: center;
|
|
13
21
|
max-height: 100%;
|
|
14
22
|
max-width: 100%;
|
|
15
23
|
overflow: hidden;
|
|
24
|
+
width: 100%;
|
|
16
25
|
}.tw-avatar--outlined {
|
|
17
26
|
border: 1px solid #00a2dd;
|
|
18
27
|
border: 1px solid var(--color-interactive-accent);
|
|
@@ -46,6 +55,10 @@
|
|
|
46
55
|
font-feature-settings: "ss01";
|
|
47
56
|
color: var(--color-dark-charcoal);
|
|
48
57
|
line-height: 1;
|
|
58
|
+
}.tw-avatar--24 {
|
|
59
|
+
min-width: 24px;
|
|
60
|
+
width: 24px;
|
|
61
|
+
height: 24px;
|
|
49
62
|
}.tw-avatar--24.tw-avatar--emoji,
|
|
50
63
|
.tw-avatar--24.tw-avatar--icon {
|
|
51
64
|
font-size: 12px;
|
|
@@ -70,6 +83,10 @@
|
|
|
70
83
|
border: 1px solid var(--color-border-overlay);
|
|
71
84
|
content: "";
|
|
72
85
|
border-radius: 50%;
|
|
86
|
+
}.tw-avatar--40 {
|
|
87
|
+
min-width: 40px;
|
|
88
|
+
width: 40px;
|
|
89
|
+
height: 40px;
|
|
73
90
|
}.tw-avatar--40.tw-avatar--emoji,
|
|
74
91
|
.tw-avatar--40.tw-avatar--icon {
|
|
75
92
|
font-size: 20px;
|
|
@@ -94,6 +111,10 @@
|
|
|
94
111
|
border: 1px solid var(--color-border-overlay);
|
|
95
112
|
content: "";
|
|
96
113
|
border-radius: 50%;
|
|
114
|
+
}.tw-avatar--48 {
|
|
115
|
+
min-width: 48px;
|
|
116
|
+
width: 48px;
|
|
117
|
+
height: 48px;
|
|
97
118
|
}.tw-avatar--48.tw-avatar--emoji,
|
|
98
119
|
.tw-avatar--48.tw-avatar--icon {
|
|
99
120
|
font-size: 24px;
|
|
@@ -118,6 +139,10 @@
|
|
|
118
139
|
border: 1px solid var(--color-border-overlay);
|
|
119
140
|
content: "";
|
|
120
141
|
border-radius: 50%;
|
|
142
|
+
}.tw-avatar--56 {
|
|
143
|
+
min-width: 56px;
|
|
144
|
+
width: 56px;
|
|
145
|
+
height: 56px;
|
|
121
146
|
}.tw-avatar--56.tw-avatar--emoji,
|
|
122
147
|
.tw-avatar--56.tw-avatar--icon {
|
|
123
148
|
font-size: 28px;
|
|
@@ -142,6 +167,10 @@
|
|
|
142
167
|
border: 1px solid var(--color-border-overlay);
|
|
143
168
|
content: "";
|
|
144
169
|
border-radius: 50%;
|
|
170
|
+
}.tw-avatar--72 {
|
|
171
|
+
min-width: 72px;
|
|
172
|
+
width: 72px;
|
|
173
|
+
height: 72px;
|
|
145
174
|
}.tw-avatar--72.tw-avatar--emoji,
|
|
146
175
|
.tw-avatar--72.tw-avatar--icon {
|
|
147
176
|
font-size: 36px;
|
|
@@ -23,10 +23,16 @@
|
|
|
23
23
|
}
|
|
24
24
|
.tw-badge > .tw-badge__content {
|
|
25
25
|
position: absolute;
|
|
26
|
+
width: var(--badge-size);
|
|
27
|
+
height: var(--badge-size);
|
|
26
28
|
bottom: 0;
|
|
27
29
|
right: 0;
|
|
28
30
|
box-sizing: border-box;
|
|
31
|
+
border-radius: 50%;
|
|
29
32
|
text-align: center;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
30
36
|
overflow: hidden;
|
|
31
37
|
-webkit-user-select: none;
|
|
32
38
|
-moz-user-select: none;
|
package/build/styles/main.css
CHANGED
|
@@ -221,18 +221,27 @@ div.critical-comms .critical-comms-body {
|
|
|
221
221
|
}
|
|
222
222
|
.tw-avatar {
|
|
223
223
|
position: relative;
|
|
224
|
+
border-radius: 50%;
|
|
224
225
|
-webkit-user-select: none;
|
|
225
226
|
-moz-user-select: none;
|
|
226
227
|
user-select: none;
|
|
227
228
|
box-sizing: border-box;
|
|
228
229
|
}
|
|
229
230
|
.tw-avatar .tw-avatar__content {
|
|
231
|
+
align-items: center;
|
|
230
232
|
background-color: rgba(134,167,189,0.10196);
|
|
231
233
|
background-color: #86a7bd1a;
|
|
232
234
|
background-color: var(--color-background-neutral);
|
|
235
|
+
border-radius: 50%;
|
|
236
|
+
color: #37517e;
|
|
237
|
+
color: var(--color-content-primary);
|
|
238
|
+
display: flex;
|
|
239
|
+
height: 100%;
|
|
240
|
+
justify-content: center;
|
|
233
241
|
max-height: 100%;
|
|
234
242
|
max-width: 100%;
|
|
235
243
|
overflow: hidden;
|
|
244
|
+
width: 100%;
|
|
236
245
|
}
|
|
237
246
|
.tw-avatar--outlined {
|
|
238
247
|
border: 1px solid #00a2dd;
|
|
@@ -275,6 +284,11 @@ div.critical-comms .critical-comms-body {
|
|
|
275
284
|
color: var(--color-dark-charcoal);
|
|
276
285
|
line-height: 1;
|
|
277
286
|
}
|
|
287
|
+
.tw-avatar--24 {
|
|
288
|
+
min-width: 24px;
|
|
289
|
+
width: 24px;
|
|
290
|
+
height: 24px;
|
|
291
|
+
}
|
|
278
292
|
.tw-avatar--24.tw-avatar--emoji,
|
|
279
293
|
.tw-avatar--24.tw-avatar--icon {
|
|
280
294
|
font-size: 12px;
|
|
@@ -305,6 +319,11 @@ div.critical-comms .critical-comms-body {
|
|
|
305
319
|
content: "";
|
|
306
320
|
border-radius: 50%;
|
|
307
321
|
}
|
|
322
|
+
.tw-avatar--40 {
|
|
323
|
+
min-width: 40px;
|
|
324
|
+
width: 40px;
|
|
325
|
+
height: 40px;
|
|
326
|
+
}
|
|
308
327
|
.tw-avatar--40.tw-avatar--emoji,
|
|
309
328
|
.tw-avatar--40.tw-avatar--icon {
|
|
310
329
|
font-size: 20px;
|
|
@@ -335,6 +354,11 @@ div.critical-comms .critical-comms-body {
|
|
|
335
354
|
content: "";
|
|
336
355
|
border-radius: 50%;
|
|
337
356
|
}
|
|
357
|
+
.tw-avatar--48 {
|
|
358
|
+
min-width: 48px;
|
|
359
|
+
width: 48px;
|
|
360
|
+
height: 48px;
|
|
361
|
+
}
|
|
338
362
|
.tw-avatar--48.tw-avatar--emoji,
|
|
339
363
|
.tw-avatar--48.tw-avatar--icon {
|
|
340
364
|
font-size: 24px;
|
|
@@ -365,6 +389,11 @@ div.critical-comms .critical-comms-body {
|
|
|
365
389
|
content: "";
|
|
366
390
|
border-radius: 50%;
|
|
367
391
|
}
|
|
392
|
+
.tw-avatar--56 {
|
|
393
|
+
min-width: 56px;
|
|
394
|
+
width: 56px;
|
|
395
|
+
height: 56px;
|
|
396
|
+
}
|
|
368
397
|
.tw-avatar--56.tw-avatar--emoji,
|
|
369
398
|
.tw-avatar--56.tw-avatar--icon {
|
|
370
399
|
font-size: 28px;
|
|
@@ -395,6 +424,11 @@ div.critical-comms .critical-comms-body {
|
|
|
395
424
|
content: "";
|
|
396
425
|
border-radius: 50%;
|
|
397
426
|
}
|
|
427
|
+
.tw-avatar--72 {
|
|
428
|
+
min-width: 72px;
|
|
429
|
+
width: 72px;
|
|
430
|
+
height: 72px;
|
|
431
|
+
}
|
|
398
432
|
.tw-avatar--72.tw-avatar--emoji,
|
|
399
433
|
.tw-avatar--72.tw-avatar--icon {
|
|
400
434
|
font-size: 36px;
|
|
@@ -460,10 +494,16 @@ div.critical-comms .critical-comms-body {
|
|
|
460
494
|
}
|
|
461
495
|
.tw-badge > .tw-badge__content {
|
|
462
496
|
position: absolute;
|
|
497
|
+
width: var(--badge-size);
|
|
498
|
+
height: var(--badge-size);
|
|
463
499
|
bottom: 0;
|
|
464
500
|
right: 0;
|
|
465
501
|
box-sizing: border-box;
|
|
502
|
+
border-radius: 50%;
|
|
466
503
|
text-align: center;
|
|
504
|
+
display: flex;
|
|
505
|
+
align-items: center;
|
|
506
|
+
justify-content: center;
|
|
467
507
|
overflow: hidden;
|
|
468
508
|
-webkit-user-select: none;
|
|
469
509
|
-moz-user-select: none;
|
|
@@ -1016,8 +1056,8 @@ div.critical-comms .critical-comms-body {
|
|
|
1016
1056
|
}
|
|
1017
1057
|
@media (max-width: 320px) {
|
|
1018
1058
|
.np-circular-btn .tw-icon {
|
|
1019
|
-
top:
|
|
1020
|
-
top: var(--size-
|
|
1059
|
+
top: 12px;
|
|
1060
|
+
top: var(--size-12);
|
|
1021
1061
|
}
|
|
1022
1062
|
}
|
|
1023
1063
|
.np-circular-btn .tw-icon > svg {
|
|
@@ -1172,6 +1212,10 @@ div.critical-comms .critical-comms-body {
|
|
|
1172
1212
|
height: var(--circle-size);
|
|
1173
1213
|
flex-shrink: 0;
|
|
1174
1214
|
}
|
|
1215
|
+
.np-circle .tw-icon > svg {
|
|
1216
|
+
height: var(--circle-icon-size);
|
|
1217
|
+
width: var(--circle-icon-size);
|
|
1218
|
+
}
|
|
1175
1219
|
.np-bottom-sheet {
|
|
1176
1220
|
border-radius: 10px 10px 0 0;
|
|
1177
1221
|
}
|
|
@@ -4158,12 +4202,6 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4158
4202
|
transform: translateY(-24px);
|
|
4159
4203
|
}
|
|
4160
4204
|
}
|
|
4161
|
-
.status-icon > svg {
|
|
4162
|
-
height: 32px;
|
|
4163
|
-
height: var(--size-32);
|
|
4164
|
-
width: 32px;
|
|
4165
|
-
width: var(--size-32);
|
|
4166
|
-
}
|
|
4167
4205
|
.status-circle .light {
|
|
4168
4206
|
color: var(--color-contrast);
|
|
4169
4207
|
}
|
|
@@ -4179,20 +4217,6 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4179
4217
|
.np-theme-personal .status-circle.pending .status-icon {
|
|
4180
4218
|
color: var(--color-dark);
|
|
4181
4219
|
}
|
|
4182
|
-
.status-circle-sm .status-icon > svg {
|
|
4183
|
-
height: 14px;
|
|
4184
|
-
height: var(--size-14);
|
|
4185
|
-
width: 14px;
|
|
4186
|
-
width: var(--size-14);
|
|
4187
|
-
}
|
|
4188
|
-
@media (max-width: 320px) {
|
|
4189
|
-
.status-circle-sm .status-icon > svg {
|
|
4190
|
-
width: 24px;
|
|
4191
|
-
width: var(--size-24);
|
|
4192
|
-
height: 24px;
|
|
4193
|
-
height: var(--size-24);
|
|
4194
|
-
}
|
|
4195
|
-
}
|
|
4196
4220
|
.status-circle.negative,
|
|
4197
4221
|
.status-circle.error {
|
|
4198
4222
|
background-color: var(--color-sentiment-negative);
|
|
@@ -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,20 +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
|
-
@media (max-width: 320px) {
|
|
29
|
-
.status-circle-sm .status-icon > svg {
|
|
30
|
-
width: 24px;
|
|
31
|
-
width: var(--size-24);
|
|
32
|
-
height: 24px;
|
|
33
|
-
height: var(--size-24);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
16
|
.status-circle.negative,
|
|
37
17
|
.status-circle.error {
|
|
38
18
|
background-color: var(--color-sentiment-negative);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/avatar/Avatar.tsx"],"names":[],"mappings":"AAOA,KAAK,iBAAiB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEhD,KAAK,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;AAErE,MAAM,WAAW,WAAW;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAkBD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/avatar/Avatar.tsx"],"names":[],"mappings":"AAOA,KAAK,iBAAiB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEhD,KAAK,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;AAErE,MAAM,WAAW,WAAW;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAkBD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAwCjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/badge/Badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAGL,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACZ,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/badge/Badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAGL,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACZ,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,KAAK,eAAe,GAAG,UAAU,CAAC;AAElC,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,eAAe,GAAG,SAAS,CAAC;IAC/C,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,WAAW,CAAC;AAEhB,QAAA,MAAM,KAAK,qFAOR,UAAU,gCAkBZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["../../../../src/common/circle/Circle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["../../../../src/common/circle/Circle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AAKnD,MAAM,MAAM,SAAS,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEzD,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAenC,QAAA,MAAM,MAAM;IA5BV;;OAEG;SACE,KAAK,CAAC,WAAW;IACtB;;OAEG;WACI,SAAS;IAChB;;;OAGG;gBACS,OAAO;4EA8CnB,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { SizeSmall, SizeMedium, SizeLarge, Sentiment } from '../common';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead
|
|
4
|
+
*/
|
|
5
|
+
type LegacySizes = SizeSmall | SizeMedium | SizeLarge;
|
|
2
6
|
export type StatusIconProps = {
|
|
3
|
-
sentiment
|
|
4
|
-
size
|
|
7
|
+
sentiment?: `${Sentiment}`;
|
|
8
|
+
size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;
|
|
5
9
|
/**
|
|
6
10
|
* Override for the sentiment's-derived, default, accessible
|
|
7
11
|
* name announced by the screen readers. <br />
|
|
@@ -9,6 +13,6 @@ export type StatusIconProps = {
|
|
|
9
13
|
* */
|
|
10
14
|
iconLabel?: string | null;
|
|
11
15
|
};
|
|
12
|
-
declare const StatusIcon: ({ sentiment, size: sizeProp, iconLabel
|
|
16
|
+
declare const StatusIcon: ({ sentiment, size: sizeProp, iconLabel }: StatusIconProps) => import("react").JSX.Element;
|
|
13
17
|
export default StatusIcon;
|
|
14
18
|
//# sourceMappingURL=StatusIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.d.ts","sourceRoot":"","sources":["../../../src/statusIcon/StatusIcon.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAC;AAM1F,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,GAAG,SAAS,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusIcon.d.ts","sourceRoot":"","sources":["../../../src/statusIcon/StatusIcon.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAC;AAM1F;;GAEG;AACH,KAAK,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC;IAC3B,IAAI,CAAC,EAAE,WAAW,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACtD;;;;SAIK;IACL,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAQF,QAAA,MAAM,UAAU,6CAA+D,eAAe,gCA8D7F,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.78.0",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
"rollup": "^4.18.1",
|
|
92
92
|
"rollup-preserve-directives": "^1.1.1",
|
|
93
93
|
"storybook": "^8.2.2",
|
|
94
|
+
"@transferwise/less-config": "3.1.0",
|
|
94
95
|
"@transferwise/neptune-css": "14.19.1",
|
|
95
|
-
"@wise/components-theming": "1.6.1"
|
|
96
|
-
"@transferwise/less-config": "3.1.0"
|
|
96
|
+
"@wise/components-theming": "1.6.1"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
99
|
"@transferwise/icons": "^3.13.1",
|
package/src/avatar/Avatar.css
CHANGED
|
@@ -2,17 +2,26 @@
|
|
|
2
2
|
}@media (min-width: 768px) {
|
|
3
3
|
}.tw-avatar {
|
|
4
4
|
position: relative;
|
|
5
|
+
border-radius: 50%;
|
|
5
6
|
-webkit-user-select: none;
|
|
6
7
|
-moz-user-select: none;
|
|
7
8
|
user-select: none;
|
|
8
9
|
box-sizing: border-box;
|
|
9
10
|
}.tw-avatar .tw-avatar__content {
|
|
11
|
+
align-items: center;
|
|
10
12
|
background-color: rgba(134,167,189,0.10196);
|
|
11
13
|
background-color: #86a7bd1a;
|
|
12
14
|
background-color: var(--color-background-neutral);
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
color: #37517e;
|
|
17
|
+
color: var(--color-content-primary);
|
|
18
|
+
display: flex;
|
|
19
|
+
height: 100%;
|
|
20
|
+
justify-content: center;
|
|
13
21
|
max-height: 100%;
|
|
14
22
|
max-width: 100%;
|
|
15
23
|
overflow: hidden;
|
|
24
|
+
width: 100%;
|
|
16
25
|
}.tw-avatar--outlined {
|
|
17
26
|
border: 1px solid #00a2dd;
|
|
18
27
|
border: 1px solid var(--color-interactive-accent);
|
|
@@ -46,6 +55,10 @@
|
|
|
46
55
|
font-feature-settings: "ss01";
|
|
47
56
|
color: var(--color-dark-charcoal);
|
|
48
57
|
line-height: 1;
|
|
58
|
+
}.tw-avatar--24 {
|
|
59
|
+
min-width: 24px;
|
|
60
|
+
width: 24px;
|
|
61
|
+
height: 24px;
|
|
49
62
|
}.tw-avatar--24.tw-avatar--emoji,
|
|
50
63
|
.tw-avatar--24.tw-avatar--icon {
|
|
51
64
|
font-size: 12px;
|
|
@@ -70,6 +83,10 @@
|
|
|
70
83
|
border: 1px solid var(--color-border-overlay);
|
|
71
84
|
content: "";
|
|
72
85
|
border-radius: 50%;
|
|
86
|
+
}.tw-avatar--40 {
|
|
87
|
+
min-width: 40px;
|
|
88
|
+
width: 40px;
|
|
89
|
+
height: 40px;
|
|
73
90
|
}.tw-avatar--40.tw-avatar--emoji,
|
|
74
91
|
.tw-avatar--40.tw-avatar--icon {
|
|
75
92
|
font-size: 20px;
|
|
@@ -94,6 +111,10 @@
|
|
|
94
111
|
border: 1px solid var(--color-border-overlay);
|
|
95
112
|
content: "";
|
|
96
113
|
border-radius: 50%;
|
|
114
|
+
}.tw-avatar--48 {
|
|
115
|
+
min-width: 48px;
|
|
116
|
+
width: 48px;
|
|
117
|
+
height: 48px;
|
|
97
118
|
}.tw-avatar--48.tw-avatar--emoji,
|
|
98
119
|
.tw-avatar--48.tw-avatar--icon {
|
|
99
120
|
font-size: 24px;
|
|
@@ -118,6 +139,10 @@
|
|
|
118
139
|
border: 1px solid var(--color-border-overlay);
|
|
119
140
|
content: "";
|
|
120
141
|
border-radius: 50%;
|
|
142
|
+
}.tw-avatar--56 {
|
|
143
|
+
min-width: 56px;
|
|
144
|
+
width: 56px;
|
|
145
|
+
height: 56px;
|
|
121
146
|
}.tw-avatar--56.tw-avatar--emoji,
|
|
122
147
|
.tw-avatar--56.tw-avatar--icon {
|
|
123
148
|
font-size: 28px;
|
|
@@ -142,6 +167,10 @@
|
|
|
142
167
|
border: 1px solid var(--color-border-overlay);
|
|
143
168
|
content: "";
|
|
144
169
|
border-radius: 50%;
|
|
170
|
+
}.tw-avatar--72 {
|
|
171
|
+
min-width: 72px;
|
|
172
|
+
width: 72px;
|
|
173
|
+
height: 72px;
|
|
145
174
|
}.tw-avatar--72.tw-avatar--emoji,
|
|
146
175
|
.tw-avatar--72.tw-avatar--icon {
|
|
147
176
|
font-size: 36px;
|
package/src/avatar/Avatar.less
CHANGED
|
@@ -10,15 +10,23 @@
|
|
|
10
10
|
|
|
11
11
|
.tw-avatar {
|
|
12
12
|
position: relative;
|
|
13
|
+
border-radius: 50%;
|
|
13
14
|
user-select: none;
|
|
14
15
|
box-sizing: border-box;
|
|
15
16
|
|
|
16
17
|
& &__content {
|
|
18
|
+
align-items: center;
|
|
17
19
|
background-color: #86a7bd1a;
|
|
18
20
|
background-color: var(--color-background-neutral);
|
|
21
|
+
border-radius: 50%;
|
|
22
|
+
color: var(--color-content-primary);
|
|
23
|
+
display: flex;
|
|
24
|
+
height: 100%;
|
|
25
|
+
justify-content: center;
|
|
19
26
|
max-height: 100%;
|
|
20
27
|
max-width: 100%;
|
|
21
28
|
overflow: hidden;
|
|
29
|
+
width: 100%;
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
&--outlined {
|
|
@@ -109,6 +117,10 @@
|
|
|
109
117
|
.avatar-dimension(@avatar-size) {
|
|
110
118
|
@mask-size: 2px;
|
|
111
119
|
|
|
120
|
+
min-width: @avatar-size;
|
|
121
|
+
width: @avatar-size;
|
|
122
|
+
height: @avatar-size;
|
|
123
|
+
|
|
112
124
|
&.tw-avatar--emoji,
|
|
113
125
|
&.tw-avatar--icon {
|
|
114
126
|
font-size: @avatar-size * 0.5;
|
package/src/avatar/Avatar.tsx
CHANGED
|
@@ -65,9 +65,7 @@ const Avatar: React.FC<AvatarProps> = ({
|
|
|
65
65
|
const size = backwardsCompatibleSize(sizeFromProps);
|
|
66
66
|
|
|
67
67
|
return (
|
|
68
|
-
<
|
|
69
|
-
size={size}
|
|
70
|
-
fixedSize
|
|
68
|
+
<div
|
|
71
69
|
className={clsx('tw-avatar', className, `tw-avatar--${size}`, `tw-avatar--${type}`, {
|
|
72
70
|
'tw-avatar--outlined': outlined,
|
|
73
71
|
'tw-avatar--branded': Boolean(backgroundColorFromSeed),
|
|
@@ -75,17 +73,15 @@ const Avatar: React.FC<AvatarProps> = ({
|
|
|
75
73
|
})}
|
|
76
74
|
aria-label={ariaLabel}
|
|
77
75
|
>
|
|
78
|
-
<
|
|
79
|
-
size={size}
|
|
80
|
-
fixedSize
|
|
76
|
+
<div
|
|
81
77
|
className="tw-avatar__content"
|
|
82
78
|
style={{
|
|
83
79
|
backgroundColor: backgroundColor || backgroundColorFromSeed,
|
|
84
80
|
}}
|
|
85
81
|
>
|
|
86
82
|
{children}
|
|
87
|
-
</
|
|
88
|
-
</
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
89
85
|
);
|
|
90
86
|
};
|
|
91
87
|
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar with a name AND profileType AND avatar url renders the image 1`] = `
|
|
4
4
|
<div
|
|
5
|
-
class="
|
|
6
|
-
style="--circle-size: 48px;"
|
|
5
|
+
class="tw-avatar tw-avatar--48 tw-avatar--thumbnail"
|
|
7
6
|
>
|
|
8
7
|
<div
|
|
9
|
-
class="
|
|
10
|
-
style="--circle-size: 48px;"
|
|
8
|
+
class="tw-avatar__content"
|
|
11
9
|
>
|
|
12
10
|
<img
|
|
13
11
|
alt=""
|
|
@@ -19,12 +17,10 @@ exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar w
|
|
|
19
17
|
|
|
20
18
|
exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar with a name AND profileType renders as BUSINESS profile type with an icon 1`] = `
|
|
21
19
|
<div
|
|
22
|
-
class="
|
|
23
|
-
style="--circle-size: 48px;"
|
|
20
|
+
class="tw-avatar tw-avatar--48 tw-avatar--icon"
|
|
24
21
|
>
|
|
25
22
|
<div
|
|
26
|
-
class="
|
|
27
|
-
style="--circle-size: 48px;"
|
|
23
|
+
class="tw-avatar__content"
|
|
28
24
|
>
|
|
29
25
|
<span
|
|
30
26
|
class="tw-icon tw-icon-briefcase "
|
|
@@ -50,12 +46,10 @@ exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar w
|
|
|
50
46
|
|
|
51
47
|
exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar with a name AND profileType renders as PERSONAL profile type with an icon 1`] = `
|
|
52
48
|
<div
|
|
53
|
-
class="
|
|
54
|
-
style="--circle-size: 48px;"
|
|
49
|
+
class="tw-avatar tw-avatar--48 tw-avatar--icon"
|
|
55
50
|
>
|
|
56
51
|
<div
|
|
57
|
-
class="
|
|
58
|
-
style="--circle-size: 48px;"
|
|
52
|
+
class="tw-avatar__content"
|
|
59
53
|
>
|
|
60
54
|
<span
|
|
61
55
|
class="tw-icon tw-icon-person "
|
|
@@ -87,12 +81,10 @@ exports[`FlowNavigationAvatar with a name AND profileType with a badge url passe
|
|
|
87
81
|
class="tw-badge__children"
|
|
88
82
|
>
|
|
89
83
|
<div
|
|
90
|
-
class="
|
|
91
|
-
style="--circle-size: 48px;"
|
|
84
|
+
class="tw-avatar tw-avatar--48 tw-avatar--icon"
|
|
92
85
|
>
|
|
93
86
|
<div
|
|
94
|
-
class="
|
|
95
|
-
style="--circle-size: 48px;"
|
|
87
|
+
class="tw-avatar__content"
|
|
96
88
|
>
|
|
97
89
|
<span
|
|
98
90
|
class="tw-icon tw-icon-person "
|
|
@@ -116,8 +108,7 @@ exports[`FlowNavigationAvatar with a name AND profileType with a badge url passe
|
|
|
116
108
|
</div>
|
|
117
109
|
</div>
|
|
118
110
|
<div
|
|
119
|
-
class="
|
|
120
|
-
style="--circle-size: 24px;"
|
|
111
|
+
class="tw-badge__content"
|
|
121
112
|
>
|
|
122
113
|
<img
|
|
123
114
|
alt="badge alt text"
|
|
@@ -129,12 +120,10 @@ exports[`FlowNavigationAvatar with a name AND profileType with a badge url passe
|
|
|
129
120
|
|
|
130
121
|
exports[`FlowNavigationAvatar with a name AND profileType with nothing passed renders a personal icon 1`] = `
|
|
131
122
|
<div
|
|
132
|
-
class="
|
|
133
|
-
style="--circle-size: 48px;"
|
|
123
|
+
class="tw-avatar tw-avatar--48 tw-avatar--icon"
|
|
134
124
|
>
|
|
135
125
|
<div
|
|
136
|
-
class="
|
|
137
|
-
style="--circle-size: 48px;"
|
|
126
|
+
class="tw-avatar__content"
|
|
138
127
|
>
|
|
139
128
|
<span
|
|
140
129
|
class="tw-icon tw-icon-person "
|
package/src/badge/Badge.css
CHANGED
|
@@ -23,10 +23,16 @@
|
|
|
23
23
|
}
|
|
24
24
|
.tw-badge > .tw-badge__content {
|
|
25
25
|
position: absolute;
|
|
26
|
+
width: var(--badge-size);
|
|
27
|
+
height: var(--badge-size);
|
|
26
28
|
bottom: 0;
|
|
27
29
|
right: 0;
|
|
28
30
|
box-sizing: border-box;
|
|
31
|
+
border-radius: 50%;
|
|
29
32
|
text-align: center;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
30
36
|
overflow: hidden;
|
|
31
37
|
-webkit-user-select: none;
|
|
32
38
|
-moz-user-select: none;
|