@transferwise/components 0.0.0-experimental-d4fb387 → 0.0.0-experimental-93ed47e
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 +29 -17
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +26 -14
- package/build/alert/Alert.mjs.map +1 -1
- package/build/common/action/Action.js +3 -2
- package/build/common/action/Action.js.map +1 -1
- package/build/common/action/Action.mjs +3 -2
- 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 +13 -74
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +14 -75
- 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 +11 -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/criticalBanner/CriticalCommsBanner.css +7 -72
- package/build/styles/main.css +11 -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 +3 -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 +3 -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.less +4 -0
- package/src/alert/Alert.story.tsx +36 -0
- package/src/alert/Alert.tsx +26 -8
- package/src/button/Button.story.tsx +7 -2
- package/src/button/LegacyButton.story.tsx +4 -1
- package/src/common/action/Action.tsx +8 -2
- 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 +2 -0
- package/src/criticalBanner/CriticalCommsBanner.tsx +18 -51
- package/src/i18n/en.json +1 -0
- package/src/main.css +11 -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
package/src/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;
|
|
@@ -4477,6 +4412,10 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4477
4412
|
.status-circle.error {
|
|
4478
4413
|
background-color: var(--color-sentiment-negative);
|
|
4479
4414
|
}
|
|
4415
|
+
.status-circle.critical {
|
|
4416
|
+
background-color: #ffffff;
|
|
4417
|
+
background-color: var(--color-background-screen);
|
|
4418
|
+
}
|
|
4480
4419
|
.status-circle.neutral {
|
|
4481
4420
|
background-color: #5d7079;
|
|
4482
4421
|
background-color: var(--color-content-secondary);
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
.status-circle.error {
|
|
18
18
|
background-color: var(--color-sentiment-negative);
|
|
19
19
|
}
|
|
20
|
+
.status-circle.critical {
|
|
21
|
+
background-color: #ffffff;
|
|
22
|
+
background-color: var(--color-background-screen);
|
|
23
|
+
}
|
|
20
24
|
.status-circle.neutral {
|
|
21
25
|
background-color: #5d7079;
|
|
22
26
|
background-color: var(--color-content-secondary);
|
|
@@ -19,6 +19,12 @@ export default defineMessages({
|
|
|
19
19
|
description:
|
|
20
20
|
'Visually hidden label read by screen readers, describing the Warning icon – normally a prefix to remaining visible content, e.g. validation result.',
|
|
21
21
|
},
|
|
22
|
+
criticalLabel: {
|
|
23
|
+
id: 'neptune.StatusIcon.iconLabel.critical',
|
|
24
|
+
defaultMessage: 'Critical:',
|
|
25
|
+
description:
|
|
26
|
+
'Visually hidden label read by screen readers, describing the Critical icon – normally a prefix to remaining visible content, e.g. validation result.',
|
|
27
|
+
},
|
|
22
28
|
pendingLabel: {
|
|
23
29
|
id: 'neptune.StatusIcon.iconLabel.pending',
|
|
24
30
|
defaultMessage: 'Pending:',
|
|
@@ -52,6 +52,10 @@ const StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: S
|
|
|
52
52
|
Icon: Alert,
|
|
53
53
|
defaultIconLabel: intl.formatMessage(messages.warningLabel),
|
|
54
54
|
},
|
|
55
|
+
[Sentiment.CRITICAL]: {
|
|
56
|
+
Icon: Alert,
|
|
57
|
+
defaultIconLabel: intl.formatMessage(messages.criticalLabel),
|
|
58
|
+
},
|
|
55
59
|
[Sentiment.PENDING]: {
|
|
56
60
|
Icon: ClockBorderless,
|
|
57
61
|
defaultIconLabel: intl.formatMessage(messages.pendingLabel),
|
|
@@ -76,7 +80,10 @@ const StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: S
|
|
|
76
80
|
};
|
|
77
81
|
const { Icon, defaultIconLabel } = iconMetaBySentiment[sentiment];
|
|
78
82
|
|
|
79
|
-
const iconColor =
|
|
83
|
+
const iconColor =
|
|
84
|
+
sentiment === 'warning' || sentiment === 'pending' || sentiment === 'critical'
|
|
85
|
+
? 'dark'
|
|
86
|
+
: 'light';
|
|
80
87
|
const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
|
|
81
88
|
const size = mapLegacySize[sizeProp] ?? sizeProp;
|
|
82
89
|
return (
|