@transferwise/components 0.0.0-experimental-8ef2fe2 → 0.0.0-experimental-1ffdc56
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 +33 -17
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +30 -14
- package/build/alert/Alert.mjs.map +1 -1
- package/build/common/action/Action.js +26 -15
- package/build/common/action/Action.js.map +1 -1
- package/build/common/action/Action.mjs +26 -15
- package/build/common/action/Action.mjs.map +1 -1
- package/build/common/propsValues/sentiment.js +1 -0
- package/build/common/propsValues/sentiment.js.map +1 -1
- package/build/common/propsValues/sentiment.mjs +1 -0
- package/build/common/propsValues/sentiment.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +10 -73
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +11 -74
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/i18n/en.json +1 -0
- package/build/i18n/en.json.js +1 -0
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +1 -0
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/main.css +14 -72
- package/build/statusIcon/StatusIcon.js +5 -1
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.messages.js +3 -0
- package/build/statusIcon/StatusIcon.messages.js.map +1 -1
- package/build/statusIcon/StatusIcon.messages.mjs +3 -0
- package/build/statusIcon/StatusIcon.messages.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +5 -1
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/button/Button.css +3 -0
- package/build/styles/criticalBanner/CriticalCommsBanner.css +7 -72
- package/build/styles/main.css +14 -72
- package/build/styles/statusIcon/StatusIcon.css +4 -0
- package/build/types/alert/Alert.d.ts +2 -1
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/common/action/Action.d.ts +4 -1
- package/build/types/common/action/Action.d.ts.map +1 -1
- package/build/types/common/propsValues/sentiment.d.ts +1 -0
- package/build/types/common/propsValues/sentiment.d.ts.map +1 -1
- package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.messages.d.ts +5 -0
- package/build/types/statusIcon/StatusIcon.messages.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +2 -0
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/alert/Alert.story.tsx +36 -0
- package/src/alert/Alert.tsx +37 -8
- package/src/button/Button.css +3 -0
- package/src/button/Button.less +6 -2
- package/src/button/Button.vars.less +0 -2
- package/src/common/action/Action.tsx +39 -21
- package/src/common/propsValues/sentiment.ts +1 -0
- package/src/criticalBanner/CriticalCommsBanner.css +7 -72
- package/src/criticalBanner/CriticalCommsBanner.less +12 -73
- package/src/criticalBanner/CriticalCommsBanner.story.tsx +13 -9
- package/src/criticalBanner/CriticalCommsBanner.tsx +8 -50
- package/src/i18n/en.json +1 -0
- package/src/main.css +14 -72
- package/src/statusIcon/StatusIcon.css +4 -0
- package/src/statusIcon/StatusIcon.less +4 -0
- package/src/statusIcon/StatusIcon.messages.ts +6 -0
- package/src/statusIcon/StatusIcon.tsx +8 -1
|
@@ -1,36 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var componentsTheming = require('@wise/components-theming');
|
|
3
|
+
var Alert = require('../alert/Alert.js');
|
|
5
4
|
var clsx = require('clsx');
|
|
6
|
-
var avatarTypes = require('../avatar/avatarTypes.js');
|
|
7
|
-
var Avatar = require('../avatar/Avatar.js');
|
|
8
|
-
var Body = require('../body/Body.js');
|
|
9
|
-
var Button_resolver = require('../button/Button.resolver.js');
|
|
10
|
-
require('../common/theme.js');
|
|
11
|
-
require('../common/direction.js');
|
|
12
|
-
var control = require('../common/propsValues/control.js');
|
|
13
|
-
require('../common/propsValues/breakpoint.js');
|
|
14
|
-
var size = require('../common/propsValues/size.js');
|
|
15
|
-
var typography = require('../common/propsValues/typography.js');
|
|
16
|
-
require('../common/propsValues/width.js');
|
|
17
|
-
require('../common/propsValues/type.js');
|
|
18
|
-
require('../common/propsValues/dateMode.js');
|
|
19
|
-
require('../common/propsValues/monthFormat.js');
|
|
20
|
-
require('../common/propsValues/position.js');
|
|
21
|
-
require('../common/propsValues/layouts.js');
|
|
22
|
-
require('../common/propsValues/status.js');
|
|
23
|
-
require('../common/propsValues/sentiment.js');
|
|
24
|
-
require('../common/propsValues/profileType.js');
|
|
25
|
-
require('../common/propsValues/variant.js');
|
|
26
|
-
require('../common/propsValues/scroll.js');
|
|
27
|
-
require('../common/propsValues/markdownNodeType.js');
|
|
28
|
-
require('../common/fileType.js');
|
|
29
|
-
require('react');
|
|
30
|
-
require('react-intl');
|
|
31
|
-
require('../common/closeButton/CloseButton.messages.js');
|
|
32
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
33
|
-
var Title = require('../title/Title.js');
|
|
34
6
|
|
|
35
7
|
function CriticalCommsBanner({
|
|
36
8
|
title,
|
|
@@ -38,52 +10,17 @@ function CriticalCommsBanner({
|
|
|
38
10
|
action,
|
|
39
11
|
className
|
|
40
12
|
}) {
|
|
41
|
-
const {
|
|
42
|
-
isModern
|
|
43
|
-
} = componentsTheming.useTheme();
|
|
44
13
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
45
14
|
className: clsx.clsx('critical-comms', className),
|
|
46
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
})
|
|
56
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
57
|
-
className: "critical-comms-content d-flex align-items-center flex-grow-1",
|
|
58
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
59
|
-
className: clsx.clsx('flex-grow-1', {
|
|
60
|
-
'p-x-2': !isModern
|
|
61
|
-
}),
|
|
62
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
63
|
-
type: isModern ? typography.Typography.TITLE_BODY : typography.Typography.TITLE_GROUP,
|
|
64
|
-
className: "critical-comms--title",
|
|
65
|
-
children: title
|
|
66
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
67
|
-
className: "critical-comms--subtitle",
|
|
68
|
-
children: subtitle
|
|
69
|
-
})]
|
|
70
|
-
}), action ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
71
|
-
className: "critical-comms--cta",
|
|
72
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Button_resolver, {
|
|
73
|
-
block: isModern,
|
|
74
|
-
size: size.Size.SMALL,
|
|
75
|
-
type: control.ControlType.NEGATIVE,
|
|
76
|
-
priority: isModern ? control.Priority.SECONDARY : control.Priority.PRIMARY,
|
|
77
|
-
className: "cta-btn",
|
|
78
|
-
onClick: () => {
|
|
79
|
-
if (action) {
|
|
80
|
-
window.location.href = action.href;
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
children: action.label
|
|
84
|
-
})
|
|
85
|
-
}) : null]
|
|
86
|
-
})]
|
|
15
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Alert.default, {
|
|
16
|
+
title: title,
|
|
17
|
+
message: subtitle,
|
|
18
|
+
action: {
|
|
19
|
+
target: action?.href,
|
|
20
|
+
text: action?.label
|
|
21
|
+
},
|
|
22
|
+
className: className,
|
|
23
|
+
type: "critical"
|
|
87
24
|
})
|
|
88
25
|
});
|
|
89
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalCommsBanner.js","sources":["../../src/criticalBanner/CriticalCommsBanner.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"CriticalCommsBanner.js","sources":["../../src/criticalBanner/CriticalCommsBanner.tsx"],"sourcesContent":["import Alert from '../alert';\nimport { clsx } from 'clsx';\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 return (\n <div className={clsx('critical-comms', className)}>\n <Alert\n title={title}\n message={subtitle}\n action={{ target: action?.href, text: action?.label }}\n className={className}\n type=\"critical\"\n />\n </div>\n );\n}\n\nexport default CriticalCommsBanner;\n"],"names":["CriticalCommsBanner","title","subtitle","action","className","_jsx","clsx","children","Alert","message","target","href","text","label","type"],"mappings":";;;;;;AAaA,SAASA,mBAAmBA,CAAC;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,MAAM;AAAEC,EAAAA,SAAAA;AAAqC,CAAA,EAAA;AAC3F,EAAA,oBACEC,cAAA,CAAA,KAAA,EAAA;AAAKD,IAAAA,SAAS,EAAEE,SAAI,CAAC,gBAAgB,EAAEF,SAAS,CAAE;IAAAG,QAAA,eAChDF,cAAA,CAACG,aAAK,EAAA;AACJP,MAAAA,KAAK,EAAEA,KAAM;AACbQ,MAAAA,OAAO,EAAEP,QAAS;AAClBC,MAAAA,MAAM,EAAE;QAAEO,MAAM,EAAEP,MAAM,EAAEQ,IAAI;QAAEC,IAAI,EAAET,MAAM,EAAEU,KAAAA;OAAQ;AACtDT,MAAAA,SAAS,EAAEA,SAAU;AACrBU,MAAAA,IAAI,EAAC,UAAA;KAET,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|
|
@@ -1,34 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useTheme } from '@wise/components-theming';
|
|
1
|
+
import Alert from '../alert/Alert.mjs';
|
|
3
2
|
import { clsx } from 'clsx';
|
|
4
|
-
import {
|
|
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';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
32
4
|
|
|
33
5
|
function CriticalCommsBanner({
|
|
34
6
|
title,
|
|
@@ -36,52 +8,17 @@ function CriticalCommsBanner({
|
|
|
36
8
|
action,
|
|
37
9
|
className
|
|
38
10
|
}) {
|
|
39
|
-
const {
|
|
40
|
-
isModern
|
|
41
|
-
} = useTheme();
|
|
42
11
|
return /*#__PURE__*/jsx("div", {
|
|
43
12
|
className: clsx('critical-comms', className),
|
|
44
|
-
children: /*#__PURE__*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
})]
|
|
13
|
+
children: /*#__PURE__*/jsx(Alert, {
|
|
14
|
+
title: title,
|
|
15
|
+
message: subtitle,
|
|
16
|
+
action: {
|
|
17
|
+
target: action?.href,
|
|
18
|
+
text: action?.label
|
|
19
|
+
},
|
|
20
|
+
className: className,
|
|
21
|
+
type: "critical"
|
|
85
22
|
})
|
|
86
23
|
});
|
|
87
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalCommsBanner.mjs","sources":["../../src/criticalBanner/CriticalCommsBanner.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"CriticalCommsBanner.mjs","sources":["../../src/criticalBanner/CriticalCommsBanner.tsx"],"sourcesContent":["import Alert from '../alert';\nimport { clsx } from 'clsx';\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 return (\n <div className={clsx('critical-comms', className)}>\n <Alert\n title={title}\n message={subtitle}\n action={{ target: action?.href, text: action?.label }}\n className={className}\n type=\"critical\"\n />\n </div>\n );\n}\n\nexport default CriticalCommsBanner;\n"],"names":["CriticalCommsBanner","title","subtitle","action","className","_jsx","clsx","children","Alert","message","target","href","text","label","type"],"mappings":";;;;AAaA,SAASA,mBAAmBA,CAAC;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,MAAM;AAAEC,EAAAA,SAAAA;AAAqC,CAAA,EAAA;AAC3F,EAAA,oBACEC,GAAA,CAAA,KAAA,EAAA;AAAKD,IAAAA,SAAS,EAAEE,IAAI,CAAC,gBAAgB,EAAEF,SAAS,CAAE;IAAAG,QAAA,eAChDF,GAAA,CAACG,KAAK,EAAA;AACJP,MAAAA,KAAK,EAAEA,KAAM;AACbQ,MAAAA,OAAO,EAAEP,QAAS;AAClBC,MAAAA,MAAM,EAAE;QAAEO,MAAM,EAAEP,MAAM,EAAEQ,IAAI;QAAEC,IAAI,EAAET,MAAM,EAAEU,KAAAA;OAAQ;AACtDT,MAAAA,SAAS,EAAEA,SAAU;AACrBU,MAAAA,IAAI,EAAC,UAAA;KAET,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|
package/build/i18n/en.json
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
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:",
|
|
30
31
|
"neptune.StatusIcon.iconLabel.error": "Error:",
|
|
31
32
|
"neptune.StatusIcon.iconLabel.information": "Information:",
|
|
32
33
|
"neptune.StatusIcon.iconLabel.pending": "Pending:",
|
package/build/i18n/en.json.js
CHANGED
|
@@ -29,6 +29,7 @@ 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:",
|
|
32
33
|
"neptune.StatusIcon.iconLabel.error": "Error:",
|
|
33
34
|
"neptune.StatusIcon.iconLabel.information": "Information:",
|
|
34
35
|
"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,6 +27,7 @@ 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:",
|
|
30
31
|
"neptune.StatusIcon.iconLabel.error": "Error:",
|
|
31
32
|
"neptune.StatusIcon.iconLabel.information": "Information:",
|
|
32
33
|
"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,78 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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;
|
|
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;
|
|
1
|
+
.np-theme-personal .critical-comms .alert-critical {
|
|
2
|
+
color: var(--color-contrast-overlay);
|
|
3
|
+
background-color: var(--color-sentiment-negative) !important;
|
|
54
4
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
padding-left: var(--critical-comms-subtitle-color-padding-left);
|
|
58
|
-
padding-top: var(--critical-comms-vertical-spacing);
|
|
59
|
-
min-width: 100%;
|
|
60
|
-
}
|
|
5
|
+
.np-theme-personal .critical-comms .alert-critical .np-text-title-body {
|
|
6
|
+
color: var(--color-contrast-overlay);
|
|
61
7
|
}
|
|
62
|
-
|
|
8
|
+
.np-theme-personal .critical-comms .action__desktop {
|
|
63
9
|
display: flex;
|
|
64
|
-
|
|
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;
|
|
75
|
-
}
|
|
10
|
+
align-items: center;
|
|
76
11
|
}
|
|
77
12
|
.tw-date-lookup-calendar > tbody > tr > td.weekend button {
|
|
78
13
|
font-size: 0.875rem;
|
|
@@ -939,6 +874,9 @@ div.critical-comms .critical-comms-body {
|
|
|
939
874
|
.np-theme-personal--bright-green .wds-Button--minimal .wds-Button-avatars .np-circle {
|
|
940
875
|
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
941
876
|
}
|
|
877
|
+
.critical-comms .wds-Button {
|
|
878
|
+
--Button-background: var(--color-contrast-overlay);
|
|
879
|
+
}
|
|
942
880
|
[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 {
|
|
943
881
|
scale: -1 1;
|
|
944
882
|
}
|
|
@@ -4477,6 +4415,10 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4477
4415
|
.status-circle.error {
|
|
4478
4416
|
background-color: var(--color-sentiment-negative);
|
|
4479
4417
|
}
|
|
4418
|
+
.status-circle.critical {
|
|
4419
|
+
background-color: #ffffff;
|
|
4420
|
+
background-color: var(--color-background-screen);
|
|
4421
|
+
}
|
|
4480
4422
|
.status-circle.neutral {
|
|
4481
4423
|
background-color: #5d7079;
|
|
4482
4424
|
background-color: var(--color-content-secondary);
|
|
@@ -53,6 +53,10 @@ 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
|
+
},
|
|
56
60
|
[sentiment.Sentiment.PENDING]: {
|
|
57
61
|
Icon: icons.ClockBorderless,
|
|
58
62
|
defaultIconLabel: intl.formatMessage(StatusIcon_messages.pendingLabel)
|
|
@@ -79,7 +83,7 @@ const StatusIcon = ({
|
|
|
79
83
|
Icon,
|
|
80
84
|
defaultIconLabel
|
|
81
85
|
} = iconMetaBySentiment[sentiment$1];
|
|
82
|
-
const iconColor = sentiment$1 === 'warning' || sentiment$1 === 'pending' ? 'dark' : 'light';
|
|
86
|
+
const iconColor = sentiment$1 === 'warning' || sentiment$1 === 'pending' || sentiment$1 === 'critical' ? 'dark' : 'light';
|
|
83
87
|
const isTinyViewport = useMedia.useMedia(`(max-width: ${breakpoint.Breakpoint.ZOOM_400}px)`);
|
|
84
88
|
const size = mapLegacySize[sizeProp] ?? sizeProp;
|
|
85
89
|
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.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
|
|
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.CRITICAL]: {\n Icon: Alert,\n defaultIconLabel: intl.formatMessage(messages.criticalLabel),\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 =\n sentiment === 'warning' || sentiment === 'pending' || sentiment === 'critical'\n ? 'dark'\n : '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","CRITICAL","criticalLabel","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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"}
|
|
@@ -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 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;
|
|
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 criticalLabel: {\n id: 'neptune.StatusIcon.iconLabel.critical',\n defaultMessage: 'Critical:',\n description:\n 'Visually hidden label read by screen readers, describing the Critical 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","criticalLabel","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,aAAa,EAAE;IACbH,EAAE,EAAA,uCAAA;GAIH;AACDI,EAAAA,YAAY,EAAE;IACZJ,EAAE,EAAA,sCAAA;GAIH;AACDK,EAAAA,gBAAgB,EAAE;IAChBL,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 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;
|
|
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 criticalLabel: {\n id: 'neptune.StatusIcon.iconLabel.critical',\n defaultMessage: 'Critical:',\n description:\n 'Visually hidden label read by screen readers, describing the Critical 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","criticalLabel","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,aAAa,EAAE;IACbH,EAAE,EAAA,uCAAA;GAIH;AACDI,EAAAA,YAAY,EAAE;IACZJ,EAAE,EAAA,sCAAA;GAIH;AACDK,EAAAA,gBAAgB,EAAE;IAChBL,EAAE,EAAA,0CAAA;AAIH,GAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -51,6 +51,10 @@ 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
|
+
},
|
|
54
58
|
[Sentiment.PENDING]: {
|
|
55
59
|
Icon: ClockBorderless,
|
|
56
60
|
defaultIconLabel: intl.formatMessage(messages.pendingLabel)
|
|
@@ -77,7 +81,7 @@ const StatusIcon = ({
|
|
|
77
81
|
Icon,
|
|
78
82
|
defaultIconLabel
|
|
79
83
|
} = iconMetaBySentiment[sentiment];
|
|
80
|
-
const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';
|
|
84
|
+
const iconColor = sentiment === 'warning' || sentiment === 'pending' || sentiment === 'critical' ? 'dark' : 'light';
|
|
81
85
|
const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
|
|
82
86
|
const size = mapLegacySize[sizeProp] ?? sizeProp;
|
|
83
87
|
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.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
|
|
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.CRITICAL]: {\n Icon: Alert,\n defaultIconLabel: intl.formatMessage(messages.criticalLabel),\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 =\n sentiment === 'warning' || sentiment === 'pending' || sentiment === 'critical'\n ? 'dark'\n : '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","CRITICAL","criticalLabel","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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"}
|
|
@@ -220,6 +220,9 @@
|
|
|
220
220
|
.np-theme-personal--bright-green .wds-Button--minimal .wds-Button-avatars .np-circle {
|
|
221
221
|
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
222
222
|
}
|
|
223
|
+
.critical-comms .wds-Button {
|
|
224
|
+
--Button-background: var(--color-contrast-overlay);
|
|
225
|
+
}
|
|
223
226
|
[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 {
|
|
224
227
|
scale: -1 1;
|
|
225
228
|
}
|