@transferwise/components 0.0.0-experimental-28eac06 → 0.0.0-experimental-e9dbb78
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/alert/Alert.js +17 -17
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +14 -14
- package/build/alert/Alert.mjs.map +1 -1
- package/build/common/action/Action.js +15 -26
- package/build/common/action/Action.js.map +1 -1
- package/build/common/action/Action.mjs +15 -26
- package/build/common/action/Action.mjs.map +1 -1
- package/build/common/propsValues/sentiment.js +0 -1
- package/build/common/propsValues/sentiment.js.map +1 -1
- package/build/common/propsValues/sentiment.mjs +0 -1
- package/build/common/propsValues/sentiment.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +73 -10
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +74 -11
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/i18n/en.json +0 -1
- package/build/i18n/en.json.js +0 -1
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +0 -1
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/main.css +70 -21
- package/build/statusIcon/StatusIcon.js +1 -5
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.messages.js +0 -3
- package/build/statusIcon/StatusIcon.messages.js.map +1 -1
- package/build/statusIcon/StatusIcon.messages.mjs +0 -3
- package/build/statusIcon/StatusIcon.messages.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +1 -5
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/button/Button.css +0 -3
- package/build/styles/criticalBanner/CriticalCommsBanner.css +73 -21
- package/build/styles/main.css +70 -21
- package/build/types/alert/Alert.d.ts +4 -3
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/common/action/Action.d.ts +2 -5
- package/build/types/common/action/Action.d.ts.map +1 -1
- package/build/types/common/propsValues/sentiment.d.ts +0 -1
- package/build/types/common/propsValues/sentiment.d.ts.map +1 -1
- package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.messages.d.ts +0 -5
- package/build/types/statusIcon/StatusIcon.messages.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +0 -2
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/alert/Alert.spec.tsx +30 -0
- package/src/alert/Alert.story.tsx +1 -34
- package/src/alert/Alert.tsx +15 -20
- package/src/button/Button.css +0 -3
- package/src/button/Button.less +3 -6
- package/src/button/Button.vars.less +4 -0
- package/src/common/action/Action.tsx +22 -40
- package/src/common/propsValues/sentiment.ts +0 -1
- package/src/criticalBanner/CriticalCommsBanner.css +73 -21
- package/src/criticalBanner/CriticalCommsBanner.less +70 -24
- package/src/criticalBanner/CriticalCommsBanner.story.tsx +4 -26
- package/src/criticalBanner/CriticalCommsBanner.tsx +50 -8
- package/src/i18n/en.json +0 -1
- package/src/index.ts +1 -0
- package/src/main.css +70 -21
- package/src/radio/Radio.spec.tsx +73 -0
- package/src/radio/Radio.story.tsx +22 -52
- package/src/radioGroup/RadioGroup.spec.tsx +91 -0
- package/src/radioGroup/RadioGroup.story.tsx +3 -5
- package/src/statusIcon/StatusIcon.less +0 -1
- package/src/statusIcon/StatusIcon.messages.ts +0 -6
- package/src/statusIcon/StatusIcon.tsx +1 -8
- package/src/radio/Radio.rtl.spec.tsx +0 -24
- package/src/radio/Radio.spec.js +0 -76
- package/src/radio/__snapshots__/Radio.rtl.spec.tsx.snap +0 -49
- package/src/radioGroup/RadioGroup.rtl.spec.tsx +0 -30
- package/src/radioGroup/RadioGroup.spec.js +0 -90
|
@@ -1,6 +1,34 @@
|
|
|
1
|
-
import Alert from '
|
|
1
|
+
import { AlertCircleFill, Alert } from '@transferwise/icons';
|
|
2
|
+
import { useTheme } from '@wise/components-theming';
|
|
2
3
|
import { clsx } from 'clsx';
|
|
3
|
-
import {
|
|
4
|
+
import { AvatarType } from '../avatar/avatarTypes.mjs';
|
|
5
|
+
import Avatar from '../avatar/Avatar.mjs';
|
|
6
|
+
import Body from '../body/Body.mjs';
|
|
7
|
+
import Button from '../button/Button.resolver.mjs';
|
|
8
|
+
import '../common/theme.mjs';
|
|
9
|
+
import '../common/direction.mjs';
|
|
10
|
+
import { ControlType, Priority } from '../common/propsValues/control.mjs';
|
|
11
|
+
import '../common/propsValues/breakpoint.mjs';
|
|
12
|
+
import { Size } from '../common/propsValues/size.mjs';
|
|
13
|
+
import { Typography } from '../common/propsValues/typography.mjs';
|
|
14
|
+
import '../common/propsValues/width.mjs';
|
|
15
|
+
import '../common/propsValues/type.mjs';
|
|
16
|
+
import '../common/propsValues/dateMode.mjs';
|
|
17
|
+
import '../common/propsValues/monthFormat.mjs';
|
|
18
|
+
import '../common/propsValues/position.mjs';
|
|
19
|
+
import '../common/propsValues/layouts.mjs';
|
|
20
|
+
import '../common/propsValues/status.mjs';
|
|
21
|
+
import '../common/propsValues/sentiment.mjs';
|
|
22
|
+
import '../common/propsValues/profileType.mjs';
|
|
23
|
+
import '../common/propsValues/variant.mjs';
|
|
24
|
+
import '../common/propsValues/scroll.mjs';
|
|
25
|
+
import '../common/propsValues/markdownNodeType.mjs';
|
|
26
|
+
import '../common/fileType.mjs';
|
|
27
|
+
import 'react';
|
|
28
|
+
import 'react-intl';
|
|
29
|
+
import '../common/closeButton/CloseButton.messages.mjs';
|
|
30
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
31
|
+
import Title from '../title/Title.mjs';
|
|
4
32
|
|
|
5
33
|
function CriticalCommsBanner({
|
|
6
34
|
title,
|
|
@@ -8,17 +36,52 @@ function CriticalCommsBanner({
|
|
|
8
36
|
action,
|
|
9
37
|
className
|
|
10
38
|
}) {
|
|
39
|
+
const {
|
|
40
|
+
isModern
|
|
41
|
+
} = useTheme();
|
|
11
42
|
return /*#__PURE__*/jsx("div", {
|
|
12
43
|
className: clsx('critical-comms', className),
|
|
13
|
-
children: /*#__PURE__*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
44
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
45
|
+
className: "critical-comms-body",
|
|
46
|
+
children: [/*#__PURE__*/jsx(Avatar, {
|
|
47
|
+
size: Size.MEDIUM,
|
|
48
|
+
type: AvatarType.ICON,
|
|
49
|
+
className: clsx(isModern ? 'm-r-2' : 'm-r-1'),
|
|
50
|
+
backgroundColor: isModern ? 'var(--color-sentiment-negative)' : 'var(--color-background-negative)',
|
|
51
|
+
children: isModern ? /*#__PURE__*/jsx(AlertCircleFill, {}) : /*#__PURE__*/jsx(Alert, {
|
|
52
|
+
size: 24
|
|
53
|
+
})
|
|
54
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
55
|
+
className: "critical-comms-content d-flex align-items-center flex-grow-1",
|
|
56
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
57
|
+
className: clsx('flex-grow-1', {
|
|
58
|
+
'p-x-2': !isModern
|
|
59
|
+
}),
|
|
60
|
+
children: [/*#__PURE__*/jsx(Title, {
|
|
61
|
+
type: isModern ? Typography.TITLE_BODY : Typography.TITLE_GROUP,
|
|
62
|
+
className: "critical-comms--title",
|
|
63
|
+
children: title
|
|
64
|
+
}), /*#__PURE__*/jsx(Body, {
|
|
65
|
+
className: "critical-comms--subtitle",
|
|
66
|
+
children: subtitle
|
|
67
|
+
})]
|
|
68
|
+
}), action ? /*#__PURE__*/jsx("div", {
|
|
69
|
+
className: "critical-comms--cta",
|
|
70
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
71
|
+
block: isModern,
|
|
72
|
+
size: Size.SMALL,
|
|
73
|
+
type: ControlType.NEGATIVE,
|
|
74
|
+
priority: isModern ? Priority.SECONDARY : Priority.PRIMARY,
|
|
75
|
+
className: "cta-btn",
|
|
76
|
+
onClick: () => {
|
|
77
|
+
if (action) {
|
|
78
|
+
window.location.href = action.href;
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
children: action.label
|
|
82
|
+
})
|
|
83
|
+
}) : null]
|
|
84
|
+
})]
|
|
22
85
|
})
|
|
23
86
|
});
|
|
24
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalCommsBanner.mjs","sources":["../../src/criticalBanner/CriticalCommsBanner.tsx"],"sourcesContent":["import Alert from '
|
|
1
|
+
{"version":3,"file":"CriticalCommsBanner.mjs","sources":["../../src/criticalBanner/CriticalCommsBanner.tsx"],"sourcesContent":["import { Alert as DangerIcon, AlertCircleFill } from '@transferwise/icons';\nimport { useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\n\nimport Avatar, { AvatarType } from '../avatar';\nimport Body from '../body';\nimport Button from '../button';\nimport { ControlType, Priority, Size, Typography } from '../common';\nimport Title from '../title';\n\nexport type CriticalCommsBannerProps = {\n title: string;\n subtitle?: string;\n action?: {\n label: string;\n href: string;\n };\n className?: string;\n};\n\nfunction CriticalCommsBanner({ title, subtitle, action, className }: CriticalCommsBannerProps) {\n const { isModern } = useTheme();\n return (\n <div className={clsx('critical-comms', className)}>\n <div className=\"critical-comms-body\">\n <Avatar\n size={Size.MEDIUM}\n type={AvatarType.ICON}\n className={clsx(isModern ? 'm-r-2' : 'm-r-1')}\n backgroundColor={\n isModern ? 'var(--color-sentiment-negative)' : 'var(--color-background-negative)'\n }\n >\n {isModern ? <AlertCircleFill /> : <DangerIcon size={24} />}\n </Avatar>\n <div className=\"critical-comms-content d-flex align-items-center flex-grow-1\">\n <div className={clsx('flex-grow-1', { 'p-x-2': !isModern })}>\n <Title\n type={isModern ? Typography.TITLE_BODY : Typography.TITLE_GROUP}\n className=\"critical-comms--title\"\n >\n {title}\n </Title>\n <Body className=\"critical-comms--subtitle\">{subtitle}</Body>\n </div>\n {action ? (\n <div className=\"critical-comms--cta\">\n <Button\n block={isModern}\n size={Size.SMALL}\n type={ControlType.NEGATIVE}\n priority={isModern ? Priority.SECONDARY : Priority.PRIMARY}\n className=\"cta-btn\"\n onClick={() => {\n if (action) {\n window.location.href = action.href;\n }\n }}\n >\n {action.label}\n </Button>\n </div>\n ) : null}\n </div>\n </div>\n </div>\n );\n}\n\nexport default CriticalCommsBanner;\n"],"names":["CriticalCommsBanner","title","subtitle","action","className","isModern","useTheme","_jsx","clsx","children","_jsxs","Avatar","size","Size","MEDIUM","type","AvatarType","ICON","backgroundColor","AlertCircleFill","DangerIcon","Title","Typography","TITLE_BODY","TITLE_GROUP","Body","Button","block","SMALL","ControlType","NEGATIVE","priority","Priority","SECONDARY","PRIMARY","onClick","window","location","href","label"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,SAASA,mBAAmBA,CAAC;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,MAAM;AAAEC,EAAAA,SAAAA;AAAqC,CAAA,EAAA;EAC3F,MAAM;AAAEC,IAAAA,QAAAA;GAAU,GAAGC,QAAQ,EAAE,CAAA;AAC/B,EAAA,oBACEC,GAAA,CAAA,KAAA,EAAA;AAAKH,IAAAA,SAAS,EAAEI,IAAI,CAAC,gBAAgB,EAAEJ,SAAS,CAAE;AAAAK,IAAAA,QAAA,eAChDC,IAAA,CAAA,KAAA,EAAA;AAAKN,MAAAA,SAAS,EAAC,qBAAqB;MAAAK,QAAA,EAAA,cAClCF,GAAA,CAACI,MAAM,EAAA;QACLC,IAAI,EAAEC,IAAI,CAACC,MAAO;QAClBC,IAAI,EAAEC,UAAU,CAACC,IAAK;QACtBb,SAAS,EAAEI,IAAI,CAACH,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAE;AAC9Ca,QAAAA,eAAe,EACbb,QAAQ,GAAG,iCAAiC,GAAG,kCAChD;QAA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IAAI,CAAA;AACpC,eAAA;aACA;YAAA7B,QAAA,EAEDN,MAAM,CAACoC,KAAAA;WACF,CAAA;SACL,CAAC,GACJ,IAAI,CAAA;AAAA,OACL,CACP,CAAA;KAAK,CAAA;AACP,GAAK,CAAC,CAAA;AAEV;;;;"}
|
package/build/i18n/en.json
CHANGED
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"neptune.SelectInput.noResultsFound": "No results found",
|
|
28
28
|
"neptune.SelectOption.action.label": "Choose",
|
|
29
29
|
"neptune.SelectOption.selected.action.label": "Change chosen option",
|
|
30
|
-
"neptune.StatusIcon.iconLabel.critical": "Critical:",
|
|
31
30
|
"neptune.StatusIcon.iconLabel.error": "Error:",
|
|
32
31
|
"neptune.StatusIcon.iconLabel.information": "Information:",
|
|
33
32
|
"neptune.StatusIcon.iconLabel.pending": "Pending:",
|
package/build/i18n/en.json.js
CHANGED
|
@@ -29,7 +29,6 @@ var en = {
|
|
|
29
29
|
"neptune.SelectInput.noResultsFound": "No results found",
|
|
30
30
|
"neptune.SelectOption.action.label": "Choose",
|
|
31
31
|
"neptune.SelectOption.selected.action.label": "Change chosen option",
|
|
32
|
-
"neptune.StatusIcon.iconLabel.critical": "Critical:",
|
|
33
32
|
"neptune.StatusIcon.iconLabel.error": "Error:",
|
|
34
33
|
"neptune.StatusIcon.iconLabel.information": "Information:",
|
|
35
34
|
"neptune.StatusIcon.iconLabel.pending": "Pending:",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/i18n/en.json.mjs
CHANGED
|
@@ -27,7 +27,6 @@ var en = {
|
|
|
27
27
|
"neptune.SelectInput.noResultsFound": "No results found",
|
|
28
28
|
"neptune.SelectOption.action.label": "Choose",
|
|
29
29
|
"neptune.SelectOption.selected.action.label": "Change chosen option",
|
|
30
|
-
"neptune.StatusIcon.iconLabel.critical": "Critical:",
|
|
31
30
|
"neptune.StatusIcon.iconLabel.error": "Error:",
|
|
32
31
|
"neptune.StatusIcon.iconLabel.information": "Information:",
|
|
33
32
|
"neptune.StatusIcon.iconLabel.pending": "Pending:",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/main.css
CHANGED
|
@@ -1,25 +1,77 @@
|
|
|
1
|
-
.critical-comms
|
|
2
|
-
color: var(--color-
|
|
3
|
-
|
|
1
|
+
div.critical-comms {
|
|
2
|
+
--critical-comms-background-color: var(--color-background-negative);
|
|
3
|
+
--critical-comms-title-color: var(--color-content-negative);
|
|
4
|
+
--critical-comms-subtitle-color: var(--color-content-secondary);
|
|
5
|
+
--critical-comms-subtitle-color-padding-left: var(--size-16);
|
|
6
|
+
--critical-comms-vertical-spacing: var(--size-8);
|
|
7
|
+
background-color: rgba(255,135,135,0.10196);
|
|
8
|
+
background-color: var(--critical-comms-background-color);
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
4
12
|
}
|
|
5
|
-
.
|
|
6
|
-
|
|
13
|
+
.np-theme-personal div.critical-comms,
|
|
14
|
+
.np-theme-personal--dark div.critical-comms {
|
|
15
|
+
--critical-comms-background-color: var(--color-sentiment-negative);
|
|
16
|
+
--critical-comms-title-color: var(--color-contrast);
|
|
17
|
+
--critical-comms-subtitle-color: var(--color-contrast);
|
|
18
|
+
--critical-comms-subtitle-color-padding-left: 0;
|
|
19
|
+
--critical-comms-vertical-spacing: var(--size-16);
|
|
20
|
+
padding: 24px;
|
|
21
|
+
padding: var(--padding-medium);
|
|
7
22
|
}
|
|
8
|
-
.critical-comms .
|
|
9
|
-
|
|
10
|
-
|
|
23
|
+
.np-theme-personal div.critical-comms .tw-icon-alert-circle-fill,
|
|
24
|
+
.np-theme-personal--dark div.critical-comms .tw-icon-alert-circle-fill {
|
|
25
|
+
color: var(--color-contrast);
|
|
11
26
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
27
|
+
.np-theme-personal div.critical-comms .tw-icon-alert-circle-fill svg,
|
|
28
|
+
.np-theme-personal--dark div.critical-comms .tw-icon-alert-circle-fill svg {
|
|
29
|
+
width: 48px;
|
|
30
|
+
height: 48px;
|
|
31
|
+
}
|
|
32
|
+
.np-theme-personal div.critical-comms .cta-btn,
|
|
33
|
+
.np-theme-personal--dark div.critical-comms .cta-btn {
|
|
34
|
+
background-color: var(--color-contrast);
|
|
35
|
+
}
|
|
36
|
+
.np-theme-personal div.critical-comms .cta-btn:not(.disabled):not(:disabled):focus,
|
|
37
|
+
.np-theme-personal--dark div.critical-comms .cta-btn:not(.disabled):not(:disabled):focus {
|
|
38
|
+
outline-color: var(--color-contrast);
|
|
39
|
+
}
|
|
40
|
+
@media (max-width: 767px) {
|
|
41
|
+
div.critical-comms {
|
|
42
|
+
display: inline;
|
|
43
|
+
display: initial;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
div.critical-comms .critical-comms--title {
|
|
47
|
+
color: var(--critical-comms-title-color);
|
|
48
|
+
}
|
|
49
|
+
div.critical-comms .critical-comms--subtitle {
|
|
50
|
+
color: var(--critical-comms-subtitle-color);
|
|
51
|
+
}
|
|
52
|
+
div.critical-comms .critical-comms--cta {
|
|
53
|
+
padding-left: 0;
|
|
54
|
+
}
|
|
55
|
+
@media (max-width: 767px) {
|
|
56
|
+
div.critical-comms .critical-comms--cta {
|
|
57
|
+
padding-left: var(--critical-comms-subtitle-color-padding-left);
|
|
58
|
+
padding-top: var(--critical-comms-vertical-spacing);
|
|
59
|
+
min-width: 100%;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
div.critical-comms .critical-comms-body {
|
|
63
|
+
display: flex;
|
|
64
|
+
width: 100%;
|
|
65
|
+
}
|
|
66
|
+
@media (max-width: 767px) {
|
|
67
|
+
div.critical-comms .critical-comms-body {
|
|
68
|
+
flex-direction: column;
|
|
18
69
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
padding-
|
|
70
|
+
}
|
|
71
|
+
@media (max-width: 767px) {
|
|
72
|
+
div.critical-comms .critical-comms-content {
|
|
73
|
+
padding-top: var(--critical-comms-vertical-spacing);
|
|
74
|
+
flex-wrap: wrap;
|
|
23
75
|
}
|
|
24
76
|
}
|
|
25
77
|
.tw-date-lookup-calendar > tbody > tr > td.weekend button {
|
|
@@ -897,9 +949,6 @@
|
|
|
897
949
|
.np-theme-personal--bright-green .wds-Button--minimal .wds-Button-avatars .np-circle {
|
|
898
950
|
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
899
951
|
}
|
|
900
|
-
.critical-comms .wds-Button {
|
|
901
|
-
--Button-background: var(--color-contrast-overlay);
|
|
902
|
-
}
|
|
903
952
|
[dir="rtl"] .wds-Button .tw-icon-chevron-right,[dir="rtl"] .wds-Button .tw-icon-arrow-right,[dir="rtl"] .wds-Button .tw-icon-chevron-left,[dir="rtl"] .wds-Button .tw-icon-arrow-left,[dir="rtl"] .wds-Button .tw-icon-arrow-diagonal-down,[dir="rtl"] .wds-Button .tw-icon-arrow-diagonal-up,[dir="rtl"] .wds-Button .tw-icon-list,[dir="rtl"] .wds-Button .tw-icon-activity {
|
|
904
953
|
scale: -1 1;
|
|
905
954
|
}
|
|
@@ -53,10 +53,6 @@ const StatusIcon = ({
|
|
|
53
53
|
Icon: icons.Alert,
|
|
54
54
|
defaultIconLabel: intl.formatMessage(StatusIcon_messages.warningLabel)
|
|
55
55
|
},
|
|
56
|
-
[sentiment.Sentiment.CRITICAL]: {
|
|
57
|
-
Icon: icons.Alert,
|
|
58
|
-
defaultIconLabel: intl.formatMessage(StatusIcon_messages.criticalLabel)
|
|
59
|
-
},
|
|
60
56
|
[sentiment.Sentiment.PENDING]: {
|
|
61
57
|
Icon: icons.ClockBorderless,
|
|
62
58
|
defaultIconLabel: intl.formatMessage(StatusIcon_messages.pendingLabel)
|
|
@@ -83,7 +79,7 @@ const StatusIcon = ({
|
|
|
83
79
|
Icon,
|
|
84
80
|
defaultIconLabel
|
|
85
81
|
} = iconMetaBySentiment[sentiment$1];
|
|
86
|
-
const iconColor = sentiment$1 === 'warning' || sentiment$1 === 'pending'
|
|
82
|
+
const iconColor = sentiment$1 === 'warning' || sentiment$1 === 'pending' ? 'dark' : 'light';
|
|
87
83
|
const isTinyViewport = useMedia.useMedia(`(max-width: ${breakpoint.Breakpoint.ZOOM_400}px)`);
|
|
88
84
|
const size = mapLegacySize[sizeProp] ?? sizeProp;
|
|
89
85
|
return /*#__PURE__*/jsxRuntime.jsx(Circle, {
|
|
@@ -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';\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.
|
|
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';\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,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,aAAAA,WAAS,GAAG,SAAS;EAAEC,IAAI,EAAEC,QAAQ,GAAG,EAAE;AAAEC,EAAAA,SAAAA;AAAS,CAAmB,KAAI;AAChG,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE,CAAA;AAEtB,EAAA,MAAMC,mBAAmB,GAMrB;IACF,CAACC,mBAAS,CAACC,QAAQ,GAAG;AACpBC,MAAAA,IAAI,EAAEC,WAAK;AACXC,MAAAA,gBAAgB,EAAEP,IAAI,CAACQ,aAAa,CAACC,mBAAQ,CAACC,UAAU,CAAA;KACzD;IACD,CAACP,mBAAS,CAACQ,QAAQ,GAAG;AACpBN,MAAAA,IAAI,EAAEO,WAAK;AACXL,MAAAA,gBAAgB,EAAEP,IAAI,CAACQ,aAAa,CAACC,mBAAQ,CAACI,YAAY,CAAA;KAC3D;IACD,CAACV,mBAAS,CAACW,OAAO,GAAG;AACnBT,MAAAA,IAAI,EAAEU,WAAK;AACXR,MAAAA,gBAAgB,EAAEP,IAAI,CAACQ,aAAa,CAACC,mBAAQ,CA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Q,CAAA;EAChD,oBACEiC,cAAA,CAACC,MAAM,EAAA;AACLC,IAAAA,EAAE,EAAC,MAAM;IACTpC,IAAI,EAAE8B,cAAc,IAAI9B,IAAI,GAAG,EAAE,GAAG,EAAE,GAAGA,IAAK;AAC9C,IAAA,aAAA,EAAY,aAAa;AACzBqC,IAAAA,SAAS,EAAEC,SAAI,CAAC,eAAe,EAAEvC,WAAS,CAAE;IAAAwC,QAAA,eAE5CL,cAAA,CAAC1B,IAAI,EAAA;AACH6B,MAAAA,SAAS,EAAEC,SAAI,CAAC,aAAa,EAAET,SAAS,CAAE;MAC1CW,KAAK,EAAEtC,SAAS,KAAK,IAAI,GAAGuC,SAAS,GAAGvC,SAAS,IAAIQ,gBAAAA;KAEzD,CAAA;AAAA,GAAQ,CAAC,CAAA;AAEb;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.messages.js","sources":["../../src/statusIcon/StatusIcon.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n errorLabel: {\n id: 'neptune.StatusIcon.iconLabel.error',\n defaultMessage: 'Error:',\n description:\n 'Visually hidden label read by screen readers, describing the Error icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n successLabel: {\n id: 'neptune.StatusIcon.iconLabel.success',\n defaultMessage: 'Success:',\n description:\n 'Visually hidden label read by screen readers, describing the Success icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n warningLabel: {\n id: 'neptune.StatusIcon.iconLabel.warning',\n defaultMessage: 'Warning:',\n description:\n 'Visually hidden label read by screen readers, describing the Warning icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n
|
|
1
|
+
{"version":3,"file":"StatusIcon.messages.js","sources":["../../src/statusIcon/StatusIcon.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n errorLabel: {\n id: 'neptune.StatusIcon.iconLabel.error',\n defaultMessage: 'Error:',\n description:\n 'Visually hidden label read by screen readers, describing the Error icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n successLabel: {\n id: 'neptune.StatusIcon.iconLabel.success',\n defaultMessage: 'Success:',\n description:\n 'Visually hidden label read by screen readers, describing the Success icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n warningLabel: {\n id: 'neptune.StatusIcon.iconLabel.warning',\n defaultMessage: 'Warning:',\n description:\n 'Visually hidden label read by screen readers, describing the Warning icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n pendingLabel: {\n id: 'neptune.StatusIcon.iconLabel.pending',\n defaultMessage: 'Pending:',\n description:\n 'Visually hidden label read by screen readers, describing the Pending icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n informationLabel: {\n id: 'neptune.StatusIcon.iconLabel.information',\n defaultMessage: 'Information:',\n description:\n 'Visually hidden label read by screen readers, describing the Information icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n});\n"],"names":["defineMessages","errorLabel","id","successLabel","warningLabel","pendingLabel","informationLabel"],"mappings":";;;;AAEA,eAAeA,wBAAc,CAAC;AAC5BC,EAAAA,UAAU,EAAE;IACVC,EAAE,EAAA,oCAAA;GAIH;AACDC,EAAAA,YAAY,EAAE;IACZD,EAAE,EAAA,sCAAA;GAIH;AACDE,EAAAA,YAAY,EAAE;IACZF,EAAE,EAAA,sCAAA;GAIH;AACDG,EAAAA,YAAY,EAAE;IACZH,EAAE,EAAA,sCAAA;GAIH;AACDI,EAAAA,gBAAgB,EAAE;IAChBJ,EAAE,EAAA,0CAAA;AAIH,GAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.messages.mjs","sources":["../../src/statusIcon/StatusIcon.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n errorLabel: {\n id: 'neptune.StatusIcon.iconLabel.error',\n defaultMessage: 'Error:',\n description:\n 'Visually hidden label read by screen readers, describing the Error icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n successLabel: {\n id: 'neptune.StatusIcon.iconLabel.success',\n defaultMessage: 'Success:',\n description:\n 'Visually hidden label read by screen readers, describing the Success icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n warningLabel: {\n id: 'neptune.StatusIcon.iconLabel.warning',\n defaultMessage: 'Warning:',\n description:\n 'Visually hidden label read by screen readers, describing the Warning icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n
|
|
1
|
+
{"version":3,"file":"StatusIcon.messages.mjs","sources":["../../src/statusIcon/StatusIcon.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n errorLabel: {\n id: 'neptune.StatusIcon.iconLabel.error',\n defaultMessage: 'Error:',\n description:\n 'Visually hidden label read by screen readers, describing the Error icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n successLabel: {\n id: 'neptune.StatusIcon.iconLabel.success',\n defaultMessage: 'Success:',\n description:\n 'Visually hidden label read by screen readers, describing the Success icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n warningLabel: {\n id: 'neptune.StatusIcon.iconLabel.warning',\n defaultMessage: 'Warning:',\n description:\n 'Visually hidden label read by screen readers, describing the Warning icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n pendingLabel: {\n id: 'neptune.StatusIcon.iconLabel.pending',\n defaultMessage: 'Pending:',\n description:\n 'Visually hidden label read by screen readers, describing the Pending icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n informationLabel: {\n id: 'neptune.StatusIcon.iconLabel.information',\n defaultMessage: 'Information:',\n description:\n 'Visually hidden label read by screen readers, describing the Information icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n});\n"],"names":["defineMessages","errorLabel","id","successLabel","warningLabel","pendingLabel","informationLabel"],"mappings":";;AAEA,eAAeA,cAAc,CAAC;AAC5BC,EAAAA,UAAU,EAAE;IACVC,EAAE,EAAA,oCAAA;GAIH;AACDC,EAAAA,YAAY,EAAE;IACZD,EAAE,EAAA,sCAAA;GAIH;AACDE,EAAAA,YAAY,EAAE;IACZF,EAAE,EAAA,sCAAA;GAIH;AACDG,EAAAA,YAAY,EAAE;IACZH,EAAE,EAAA,sCAAA;GAIH;AACDI,EAAAA,gBAAgB,EAAE;IAChBJ,EAAE,EAAA,0CAAA;AAIH,GAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -51,10 +51,6 @@ const StatusIcon = ({
|
|
|
51
51
|
Icon: Alert,
|
|
52
52
|
defaultIconLabel: intl.formatMessage(messages.warningLabel)
|
|
53
53
|
},
|
|
54
|
-
[Sentiment.CRITICAL]: {
|
|
55
|
-
Icon: Alert,
|
|
56
|
-
defaultIconLabel: intl.formatMessage(messages.criticalLabel)
|
|
57
|
-
},
|
|
58
54
|
[Sentiment.PENDING]: {
|
|
59
55
|
Icon: ClockBorderless,
|
|
60
56
|
defaultIconLabel: intl.formatMessage(messages.pendingLabel)
|
|
@@ -81,7 +77,7 @@ const StatusIcon = ({
|
|
|
81
77
|
Icon,
|
|
82
78
|
defaultIconLabel
|
|
83
79
|
} = iconMetaBySentiment[sentiment];
|
|
84
|
-
const iconColor = sentiment === 'warning' || sentiment === 'pending'
|
|
80
|
+
const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';
|
|
85
81
|
const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
|
|
86
82
|
const size = mapLegacySize[sizeProp] ?? sizeProp;
|
|
87
83
|
return /*#__PURE__*/jsx(Circle, {
|
|
@@ -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\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.
|
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,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,EAAE;AAAEC,EAAAA,SAAAA;AAAS,CAAmB,KAAI;AAChG,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE,CAAA;AAEtB,EAAA,MAAMC,mBAAmB,GAMrB;IACF,CAACC,SAAS,CAACC,QAAQ,GAAG;AACpBC,MAAAA,IAAI,EAAEC,KAAK;AACXC,MAAAA,gBAAgB,EAAEP,IAAI,CAACQ,aAAa,CAACC,QAAQ,CAACC,UAAU,CAAA;KACzD;IACD,CAACP,SAAS,CAACQ,QAAQ,GAAG;AACpBN,MAAAA,IAAI,EAAEO,KAAK;AACXL,MAAAA,gBAAgB,EA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OAAO,CAAA;EACvF,MAAM+B,cAAc,GAAGC,QAAQ,CAAC,eAAeC,UAAU,CAACC,QAAQ,CAAA,GAAA,CAAK,CAAC,CAAA;AACxE,EAAA,MAAMjC,IAAI,GAAGR,aAAa,CAACS,QAAQ,CAAC,IAAIA,QAAQ,CAAA;EAChD,oBACEiC,GAAA,CAACC,MAAM,EAAA;AACLC,IAAAA,EAAE,EAAC,MAAM;IACTpC,IAAI,EAAE8B,cAAc,IAAI9B,IAAI,GAAG,EAAE,GAAG,EAAE,GAAGA,IAAK;AAC9C,IAAA,aAAA,EAAY,aAAa;AACzBqC,IAAAA,SAAS,EAAEC,IAAI,CAAC,eAAe,EAAEvC,SAAS,CAAE;IAAAwC,QAAA,eAE5CL,GAAA,CAAC1B,IAAI,EAAA;AACH6B,MAAAA,SAAS,EAAEC,IAAI,CAAC,aAAa,EAAET,SAAS,CAAE;MAC1CW,KAAK,EAAEtC,SAAS,KAAK,IAAI,GAAGuC,SAAS,GAAGvC,SAAS,IAAIQ,gBAAAA;KAEzD,CAAA;AAAA,GAAQ,CAAC,CAAA;AAEb;;;;"}
|
|
@@ -230,9 +230,6 @@
|
|
|
230
230
|
.np-theme-personal--bright-green .wds-Button--minimal .wds-Button-avatars .np-circle {
|
|
231
231
|
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
232
232
|
}
|
|
233
|
-
.critical-comms .wds-Button {
|
|
234
|
-
--Button-background: var(--color-contrast-overlay);
|
|
235
|
-
}
|
|
236
233
|
[dir="rtl"] .wds-Button .tw-icon-chevron-right,[dir="rtl"] .wds-Button .tw-icon-arrow-right,[dir="rtl"] .wds-Button .tw-icon-chevron-left,[dir="rtl"] .wds-Button .tw-icon-arrow-left,[dir="rtl"] .wds-Button .tw-icon-arrow-diagonal-down,[dir="rtl"] .wds-Button .tw-icon-arrow-diagonal-up,[dir="rtl"] .wds-Button .tw-icon-list,[dir="rtl"] .wds-Button .tw-icon-activity {
|
|
237
234
|
scale: -1 1;
|
|
238
235
|
}
|
|
@@ -1,24 +1,76 @@
|
|
|
1
|
-
.critical-comms
|
|
2
|
-
color: var(--color-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
div.critical-comms {
|
|
2
|
+
--critical-comms-background-color: var(--color-background-negative);
|
|
3
|
+
--critical-comms-title-color: var(--color-content-negative);
|
|
4
|
+
--critical-comms-subtitle-color: var(--color-content-secondary);
|
|
5
|
+
--critical-comms-subtitle-color-padding-left: var(--size-16);
|
|
6
|
+
--critical-comms-vertical-spacing: var(--size-8);
|
|
7
|
+
background-color: rgba(255,135,135,0.10196);
|
|
8
|
+
background-color: var(--critical-comms-background-color);
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
}
|
|
13
|
+
.np-theme-personal div.critical-comms,
|
|
14
|
+
.np-theme-personal--dark div.critical-comms {
|
|
15
|
+
--critical-comms-background-color: var(--color-sentiment-negative);
|
|
16
|
+
--critical-comms-title-color: var(--color-contrast);
|
|
17
|
+
--critical-comms-subtitle-color: var(--color-contrast);
|
|
18
|
+
--critical-comms-subtitle-color-padding-left: 0;
|
|
19
|
+
--critical-comms-vertical-spacing: var(--size-16);
|
|
20
|
+
padding: 24px;
|
|
21
|
+
padding: var(--padding-medium);
|
|
22
|
+
}
|
|
23
|
+
.np-theme-personal div.critical-comms .tw-icon-alert-circle-fill,
|
|
24
|
+
.np-theme-personal--dark div.critical-comms .tw-icon-alert-circle-fill {
|
|
25
|
+
color: var(--color-contrast);
|
|
26
|
+
}
|
|
27
|
+
.np-theme-personal div.critical-comms .tw-icon-alert-circle-fill svg,
|
|
28
|
+
.np-theme-personal--dark div.critical-comms .tw-icon-alert-circle-fill svg {
|
|
29
|
+
width: 48px;
|
|
30
|
+
height: 48px;
|
|
31
|
+
}
|
|
32
|
+
.np-theme-personal div.critical-comms .cta-btn,
|
|
33
|
+
.np-theme-personal--dark div.critical-comms .cta-btn {
|
|
34
|
+
background-color: var(--color-contrast);
|
|
35
|
+
}
|
|
36
|
+
.np-theme-personal div.critical-comms .cta-btn:not(.disabled):not(:disabled):focus,
|
|
37
|
+
.np-theme-personal--dark div.critical-comms .cta-btn:not(.disabled):not(:disabled):focus {
|
|
38
|
+
outline-color: var(--color-contrast);
|
|
39
|
+
}
|
|
40
|
+
@media (max-width: 767px) {
|
|
41
|
+
div.critical-comms {
|
|
42
|
+
display: inline;
|
|
43
|
+
display: initial;
|
|
18
44
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
45
|
+
}
|
|
46
|
+
div.critical-comms .critical-comms--title {
|
|
47
|
+
color: var(--critical-comms-title-color);
|
|
48
|
+
}
|
|
49
|
+
div.critical-comms .critical-comms--subtitle {
|
|
50
|
+
color: var(--critical-comms-subtitle-color);
|
|
51
|
+
}
|
|
52
|
+
div.critical-comms .critical-comms--cta {
|
|
53
|
+
padding-left: 0;
|
|
54
|
+
}
|
|
55
|
+
@media (max-width: 767px) {
|
|
56
|
+
div.critical-comms .critical-comms--cta {
|
|
57
|
+
padding-left: var(--critical-comms-subtitle-color-padding-left);
|
|
58
|
+
padding-top: var(--critical-comms-vertical-spacing);
|
|
59
|
+
min-width: 100%;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
div.critical-comms .critical-comms-body {
|
|
63
|
+
display: flex;
|
|
64
|
+
width: 100%;
|
|
65
|
+
}
|
|
66
|
+
@media (max-width: 767px) {
|
|
67
|
+
div.critical-comms .critical-comms-body {
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
@media (max-width: 767px) {
|
|
72
|
+
div.critical-comms .critical-comms-content {
|
|
73
|
+
padding-top: var(--critical-comms-vertical-spacing);
|
|
74
|
+
flex-wrap: wrap;
|
|
23
75
|
}
|
|
24
76
|
}
|