@transferwise/components 0.0.0-experimental-28eac06 → 0.0.0-experimental-9b6d886
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/avatarLayout/AvatarLayout.js +2 -9
- package/build/avatarLayout/AvatarLayout.js.map +1 -1
- package/build/avatarLayout/AvatarLayout.mjs +2 -9
- package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
- package/build/button/Button.js +79 -86
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs +80 -87
- package/build/button/Button.mjs.map +1 -1
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.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/header/Header.js +2 -2
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +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/i18n/ja.json +1 -0
- package/build/i18n/ja.json.js +1 -0
- package/build/i18n/ja.json.js.map +1 -1
- package/build/i18n/ja.json.mjs +1 -0
- package/build/i18n/ja.json.mjs.map +1 -1
- package/build/i18n/pt.json +1 -0
- package/build/i18n/pt.json.js +1 -0
- package/build/i18n/pt.json.js.map +1 -1
- package/build/i18n/pt.json.mjs +1 -0
- package/build/i18n/pt.json.mjs.map +1 -1
- package/build/i18n/ru.json +1 -0
- package/build/i18n/ru.json.js +1 -0
- package/build/i18n/ru.json.js.map +1 -1
- package/build/i18n/ru.json.mjs +1 -0
- package/build/i18n/ru.json.mjs.map +1 -1
- package/build/i18n/zh-HK.json +1 -0
- package/build/i18n/zh-HK.json.js +1 -0
- package/build/i18n/zh-HK.json.js.map +1 -1
- package/build/i18n/zh-HK.json.mjs +1 -0
- package/build/i18n/zh-HK.json.mjs.map +1 -1
- package/build/index.js +2 -2
- package/build/index.mjs +1 -1
- package/build/link/Link.js +3 -8
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.mjs +3 -8
- package/build/link/Link.mjs.map +1 -1
- package/build/main.css +70 -267
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js +4 -2
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js.map +1 -1
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs +4 -2
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs.map +1 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js +5 -3
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js.map +1 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs +5 -3
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs.map +1 -1
- package/build/select/Select.js +2 -2
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +1 -1
- 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/avatarLayout/AvatarLayout.css +0 -11
- package/build/styles/button/Button.css +15 -230
- package/build/styles/criticalBanner/CriticalCommsBanner.css +73 -21
- package/build/styles/main.css +70 -267
- package/build/types/alert/Alert.d.ts +4 -3
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/avatarLayout/AvatarLayout.d.ts.map +1 -1
- package/build/types/button/Button.d.ts +23 -2
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/button/index.d.ts +2 -2
- package/build/types/button/index.d.ts.map +1 -1
- package/build/types/circularButton/CircularButton.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/link/Link.d.ts +2 -2
- package/build/types/link/Link.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.d.ts +2 -6
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveButton/src/PrimitiveButton.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/build/types/test-utils/story-config.d.ts +1 -1
- package/build/types/test-utils/story-config.d.ts.map +1 -1
- package/build/upload/steps/completeStep/completeStep.js +2 -2
- package/build/upload/steps/completeStep/completeStep.js.map +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs +1 -1
- package/build/upload/steps/processingStep/processingStep.js +2 -2
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +1 -1
- package/build/uploadInput/UploadInput.js +3 -3
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +1 -1
- package/package.json +3 -3
- package/src/alert/Alert.spec.tsx +30 -0
- package/src/alert/Alert.story.tsx +1 -34
- package/src/alert/Alert.tests.story.tsx +1 -1
- package/src/alert/Alert.tsx +15 -20
- package/src/avatarLayout/AvatarLayout.css +0 -11
- package/src/avatarLayout/AvatarLayout.less +1 -18
- package/src/avatarLayout/AvatarLayout.tsx +2 -10
- package/src/button/Button.css +15 -230
- package/src/button/Button.less +14 -242
- package/src/button/Button.spec.tsx +226 -215
- package/src/button/Button.story.tsx +134 -761
- package/src/button/Button.tsx +132 -103
- package/src/button/__snapshots__/Button.spec.tsx.snap +309 -0
- package/src/button/index.ts +3 -2
- package/src/circularButton/CircularButton.tsx +0 -1
- 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/field/Field.story.tsx +1 -1
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +2 -1
- package/src/i18n/en.json +0 -1
- package/src/i18n/ja.json +1 -0
- package/src/i18n/pt.json +1 -0
- package/src/i18n/ru.json +1 -0
- package/src/i18n/zh-HK.json +1 -0
- package/src/index.ts +1 -0
- package/src/inputs/SelectInput.story.tsx +1 -1
- package/src/label/Label.story.tsx +1 -1
- package/src/link/Link.tsx +6 -15
- package/src/main.css +70 -267
- package/src/main.less +0 -1
- package/src/primitives/PrimitiveAnchor/src/PrimitiveAnchor.tsx +8 -2
- package/src/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.ts +2 -7
- package/src/primitives/PrimitiveAnchor/test/PrimitiveAnchor.spec.tsx +3 -1
- package/src/primitives/PrimitiveButton/src/PrimitiveButton.tsx +12 -4
- package/src/primitives/PrimitiveButton/test/PrimitiveButton.spec.tsx +13 -16
- 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/test-utils/Parameters.d.ts +1 -9
- package/src/test-utils/story-config.ts +1 -10
- package/build/button/Button.resolver.js +0 -74
- package/build/button/Button.resolver.js.map +0 -1
- package/build/button/Button.resolver.mjs +0 -72
- package/build/button/Button.resolver.mjs.map +0 -1
- package/build/button/LegacyButton.js +0 -114
- package/build/button/LegacyButton.js.map +0 -1
- package/build/button/LegacyButton.mjs +0 -112
- package/build/button/LegacyButton.mjs.map +0 -1
- package/build/styles/button/Button.vars.css +0 -46
- package/build/styles/button/LegacyButton.css +0 -23
- package/build/types/button/Button.resolver.d.ts +0 -35
- package/build/types/button/Button.resolver.d.ts.map +0 -1
- package/build/types/button/Button.types.d.ts +0 -70
- package/build/types/button/Button.types.d.ts.map +0 -1
- package/build/types/button/LegacyButton.d.ts +0 -44
- package/build/types/button/LegacyButton.d.ts.map +0 -1
- package/src/button/Button.accessibility.docs.mdx +0 -103
- package/src/button/Button.resolver.tsx +0 -73
- package/src/button/Button.tests.story.tsx +0 -27
- package/src/button/Button.types.ts +0 -92
- package/src/button/Button.vars.css +0 -46
- package/src/button/Button.vars.less +0 -55
- package/src/button/LegacyButton.css +0 -23
- package/src/button/LegacyButton.less +0 -24
- package/src/button/LegacyButton.spec.tsx +0 -147
- package/src/button/LegacyButton.story.tsx +0 -228
- package/src/button/LegacyButton.tsx +0 -177
- 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,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
|
}
|
|
@@ -1,32 +1,78 @@
|
|
|
1
|
-
.critical-comms {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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);
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
.np-theme-personal &,
|
|
9
|
+
.np-theme-personal--dark & {
|
|
10
|
+
--critical-comms-background-color: var(--color-sentiment-negative);
|
|
11
|
+
--critical-comms-title-color: var(--color-contrast);
|
|
12
|
+
--critical-comms-subtitle-color: var(--color-contrast);
|
|
13
|
+
--critical-comms-subtitle-color-padding-left: 0;
|
|
14
|
+
--critical-comms-vertical-spacing: var(--size-16);
|
|
15
|
+
|
|
16
|
+
padding: var(--padding-medium);
|
|
17
|
+
|
|
18
|
+
.tw-icon-alert-circle-fill {
|
|
19
|
+
color: var(--color-contrast);
|
|
20
|
+
|
|
21
|
+
svg {
|
|
22
|
+
width: 48px;
|
|
23
|
+
height: 48px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.cta-btn {
|
|
28
|
+
background-color: var(--color-contrast);
|
|
29
|
+
|
|
30
|
+
&:not(.disabled,:disabled):focus {
|
|
31
|
+
outline-color: var(--color-contrast);
|
|
32
|
+
}
|
|
8
33
|
}
|
|
9
34
|
}
|
|
10
35
|
|
|
11
|
-
|
|
12
|
-
|
|
36
|
+
background-color: var(--critical-comms-background-color);
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
align-items: center;
|
|
40
|
+
|
|
41
|
+
@media (--screen-sm-max) {
|
|
42
|
+
display: initial;
|
|
13
43
|
}
|
|
14
|
-
}
|
|
15
44
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
45
|
+
.critical-comms--title {
|
|
46
|
+
color: var(--critical-comms-title-color);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.critical-comms--subtitle {
|
|
50
|
+
color: var(--critical-comms-subtitle-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.critical-comms--cta {
|
|
54
|
+
padding-left: 0;
|
|
55
|
+
|
|
56
|
+
@media (--screen-sm-max) {
|
|
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
|
+
|
|
63
|
+
.critical-comms-body {
|
|
64
|
+
display: flex;
|
|
65
|
+
width: 100%;
|
|
66
|
+
|
|
67
|
+
@media (--screen-sm-max) {
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.critical-comms-content {
|
|
73
|
+
@media (--screen-sm-max) {
|
|
74
|
+
padding-top: var(--critical-comms-vertical-spacing);
|
|
75
|
+
flex-wrap: wrap;
|
|
30
76
|
}
|
|
31
77
|
}
|
|
32
|
-
}
|
|
78
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Meta } from '@storybook/react';
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
|
|
3
3
|
import CriticalCommsBanner from '.';
|
|
4
|
-
import { storyConfig } from '../test-utils';
|
|
5
4
|
|
|
6
5
|
export default {
|
|
7
6
|
component: CriticalCommsBanner,
|
|
@@ -9,33 +8,12 @@ export default {
|
|
|
9
8
|
tags: ['autodocs'],
|
|
10
9
|
} satisfies Meta<typeof CriticalCommsBanner>;
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
type Story = StoryObj<typeof CriticalCommsBanner>;
|
|
12
|
+
|
|
13
|
+
export const Basic: Story = {
|
|
13
14
|
args: {
|
|
14
15
|
title: 'Your account is overdrawn',
|
|
15
16
|
subtitle: 'Add money within the next 30 days',
|
|
16
17
|
action: { label: 'Take action', href: 'https://wise.com' },
|
|
17
18
|
},
|
|
18
19
|
};
|
|
19
|
-
|
|
20
|
-
export const Variants = storyConfig(
|
|
21
|
-
{
|
|
22
|
-
args: {
|
|
23
|
-
title: 'Your account is overdrawn',
|
|
24
|
-
subtitle: 'Add money within the next 30 days',
|
|
25
|
-
action: { label: 'Take action', href: 'https://wise.com' },
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
{ variants: ['default', 'dark', 'rtl'] },
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
export const Mobile = storyConfig(
|
|
32
|
-
{
|
|
33
|
-
tags: ['!autodocs'],
|
|
34
|
-
args: {
|
|
35
|
-
title: 'Your account is overdrawn',
|
|
36
|
-
subtitle: 'Add money within the next 30 days',
|
|
37
|
-
action: { label: 'Take action', href: 'https://wise.com' },
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
{ variants: ['default', 'dark', 'rtl', 'mobile'] },
|
|
41
|
-
);
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import Alert from '
|
|
1
|
+
import { Alert as DangerIcon, AlertCircleFill } from '@transferwise/icons';
|
|
2
|
+
import { useTheme } from '@wise/components-theming';
|
|
2
3
|
import { clsx } from 'clsx';
|
|
3
4
|
|
|
5
|
+
import Avatar, { AvatarType } from '../avatar';
|
|
6
|
+
import Body from '../body';
|
|
7
|
+
import Button from '../button';
|
|
8
|
+
import { ControlType, Priority, Size, Typography } from '../common';
|
|
9
|
+
import Title from '../title';
|
|
10
|
+
|
|
4
11
|
export type CriticalCommsBannerProps = {
|
|
5
12
|
title: string;
|
|
6
13
|
subtitle?: string;
|
|
@@ -12,15 +19,50 @@ export type CriticalCommsBannerProps = {
|
|
|
12
19
|
};
|
|
13
20
|
|
|
14
21
|
function CriticalCommsBanner({ title, subtitle, action, className }: CriticalCommsBannerProps) {
|
|
22
|
+
const { isModern } = useTheme();
|
|
15
23
|
return (
|
|
16
24
|
<div className={clsx('critical-comms', className)}>
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
<div className="critical-comms-body">
|
|
26
|
+
<Avatar
|
|
27
|
+
size={Size.MEDIUM}
|
|
28
|
+
type={AvatarType.ICON}
|
|
29
|
+
className={clsx(isModern ? 'm-r-2' : 'm-r-1')}
|
|
30
|
+
backgroundColor={
|
|
31
|
+
isModern ? 'var(--color-sentiment-negative)' : 'var(--color-background-negative)'
|
|
32
|
+
}
|
|
33
|
+
>
|
|
34
|
+
{isModern ? <AlertCircleFill /> : <DangerIcon size={24} />}
|
|
35
|
+
</Avatar>
|
|
36
|
+
<div className="critical-comms-content d-flex align-items-center flex-grow-1">
|
|
37
|
+
<div className={clsx('flex-grow-1', { 'p-x-2': !isModern })}>
|
|
38
|
+
<Title
|
|
39
|
+
type={isModern ? Typography.TITLE_BODY : Typography.TITLE_GROUP}
|
|
40
|
+
className="critical-comms--title"
|
|
41
|
+
>
|
|
42
|
+
{title}
|
|
43
|
+
</Title>
|
|
44
|
+
<Body className="critical-comms--subtitle">{subtitle}</Body>
|
|
45
|
+
</div>
|
|
46
|
+
{action ? (
|
|
47
|
+
<div className="critical-comms--cta">
|
|
48
|
+
<Button
|
|
49
|
+
block={isModern}
|
|
50
|
+
size={Size.SMALL}
|
|
51
|
+
type={ControlType.NEGATIVE}
|
|
52
|
+
priority={isModern ? Priority.SECONDARY : Priority.PRIMARY}
|
|
53
|
+
className="cta-btn"
|
|
54
|
+
onClick={() => {
|
|
55
|
+
if (action) {
|
|
56
|
+
window.location.href = action.href;
|
|
57
|
+
}
|
|
58
|
+
}}
|
|
59
|
+
>
|
|
60
|
+
{action.label}
|
|
61
|
+
</Button>
|
|
62
|
+
</div>
|
|
63
|
+
) : null}
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
24
66
|
</div>
|
|
25
67
|
);
|
|
26
68
|
}
|
|
@@ -9,9 +9,10 @@ exports[`FlowNavigation on mobile renders as expected 1`] = `
|
|
|
9
9
|
class="np-flow-header d-flex flex-wrap align-items-center justify-content-between flex__item--12 np-flow-navigation__content p-x-3 np-flow-navigation--xs-max"
|
|
10
10
|
>
|
|
11
11
|
<button
|
|
12
|
+
aria-disabled="false"
|
|
12
13
|
aria-label="back to previous step"
|
|
13
14
|
aria-live="off"
|
|
14
|
-
class="np-circle d-flex align-items-center justify-content-center np-icon-button np-icon-button-tertiary-default"
|
|
15
|
+
class="wds-Button np-circle d-flex align-items-center justify-content-center np-icon-button np-icon-button-tertiary-default"
|
|
15
16
|
style="--circle-size: 40px; --circle-icon-size: 20px; --circle-font-size: 18px;"
|
|
16
17
|
type="button"
|
|
17
18
|
>
|
package/src/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/src/i18n/ja.json
CHANGED
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"neptune.UploadButton.allFileTypes": "すべてのファイル種類",
|
|
55
55
|
"neptune.UploadButton.dropFiles": "ファイルをドロップしてアップロードする",
|
|
56
56
|
"neptune.UploadButton.instructions": "{fileTypes}、{size}MB以下",
|
|
57
|
+
"neptune.UploadButton.maximumFiles": "最大ファイル数:{maxFiles}個",
|
|
57
58
|
"neptune.UploadButton.uploadFile": "ファイルをアップロードする",
|
|
58
59
|
"neptune.UploadButton.uploadFiles": "ファイルをアップロードする",
|
|
59
60
|
"neptune.UploadInput.deleteModalBody": "このファイルを削除すると、当社のシステムからも削除されます。",
|
package/src/i18n/pt.json
CHANGED
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"neptune.UploadButton.allFileTypes": "Todos os tipos de arquivos",
|
|
55
55
|
"neptune.UploadButton.dropFiles": "Arraste o arquivo para iniciar o envio",
|
|
56
56
|
"neptune.UploadButton.instructions": "{fileTypes}, com menos de {size}MB",
|
|
57
|
+
"neptune.UploadButton.maximumFiles": "Máximo de {maxFiles} arquivos.",
|
|
57
58
|
"neptune.UploadButton.uploadFile": "Enviar arquivo",
|
|
58
59
|
"neptune.UploadButton.uploadFiles": "Enviar arquivos",
|
|
59
60
|
"neptune.UploadInput.deleteModalBody": "Se você remover este arquivo, ele será permanentemente excluído do nosso sistema.",
|
package/src/i18n/ru.json
CHANGED
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"neptune.UploadButton.allFileTypes": "Все типы файлов",
|
|
55
55
|
"neptune.UploadButton.dropFiles": "Перетащите файл, чтобы начать загрузку",
|
|
56
56
|
"neptune.UploadButton.instructions": "{fileTypes}, не превышающий {size} MB",
|
|
57
|
+
"neptune.UploadButton.maximumFiles": "Макс. количество файлов: {maxFiles}.",
|
|
57
58
|
"neptune.UploadButton.uploadFile": "Загрузить файл",
|
|
58
59
|
"neptune.UploadButton.uploadFiles": "Загрузить файлы",
|
|
59
60
|
"neptune.UploadInput.deleteModalBody": "Удаление этого файла приведет к его удалению из нашей системы.",
|
package/src/i18n/zh-HK.json
CHANGED
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"neptune.UploadButton.allFileTypes": "所有檔案類型",
|
|
55
55
|
"neptune.UploadButton.dropFiles": "拖放檔案以開始上載",
|
|
56
56
|
"neptune.UploadButton.instructions": "{fileTypes},小於{size}MB",
|
|
57
|
+
"neptune.UploadButton.maximumFiles": "最多{maxFiles}個檔案。",
|
|
57
58
|
"neptune.UploadButton.uploadFile": "上載檔案",
|
|
58
59
|
"neptune.UploadButton.uploadFiles": "上載檔案",
|
|
59
60
|
"neptune.UploadInput.deleteModalBody": "移除此檔案會把它從我們的系統中刪除。",
|
package/src/index.ts
CHANGED
|
@@ -11,6 +11,7 @@ export type { AvatarProps } from './avatar';
|
|
|
11
11
|
export type { AvatarViewProps } from './avatarView';
|
|
12
12
|
export type { AvatarLayoutProps } from './avatarLayout';
|
|
13
13
|
export type { BadgeProps } from './badge';
|
|
14
|
+
export type { ButtonProps } from './button';
|
|
14
15
|
export type { CardProps } from './card';
|
|
15
16
|
export type { CarouselProps } from './carousel';
|
|
16
17
|
export type { CheckboxProps } from './checkbox';
|
|
@@ -5,7 +5,7 @@ import { Flag } from '@wise/art';
|
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import Button from '../button';
|
|
8
|
+
import Button from '../button/Button';
|
|
9
9
|
import { getMonthNames } from '../common/dateUtils';
|
|
10
10
|
import Drawer from '../drawer';
|
|
11
11
|
import { Field } from '../field/Field';
|
package/src/link/Link.tsx
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { NavigateAway as NavigateAwayIcon } from '@transferwise/icons';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
+
import { AnchorHTMLAttributes } from 'react';
|
|
3
4
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import { PrimitiveAnchor } from '../primitives';
|
|
5
|
-
import type { PrimitiveAnchorProps } from '../primitives';
|
|
6
5
|
|
|
7
6
|
import { LinkLarge, LinkDefault } from '../common';
|
|
8
7
|
|
|
9
8
|
import messages from './Link.messages';
|
|
10
9
|
|
|
11
|
-
export type Props =
|
|
10
|
+
export type Props = AnchorHTMLAttributes<HTMLAnchorElement> & { type?: LinkLarge | LinkDefault };
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Standard Link component with navigate away icon
|
|
@@ -25,30 +24,22 @@ const Link = ({
|
|
|
25
24
|
onClick,
|
|
26
25
|
...props
|
|
27
26
|
}: Props) => {
|
|
28
|
-
const { formatMessage } = useIntl();
|
|
29
27
|
const isBlank = target === '_blank';
|
|
30
28
|
|
|
31
|
-
const
|
|
32
|
-
'np-link',
|
|
33
|
-
'd-inline-flex',
|
|
34
|
-
{
|
|
35
|
-
[`np-text-${type}`]: type,
|
|
36
|
-
},
|
|
37
|
-
className,
|
|
38
|
-
);
|
|
29
|
+
const { formatMessage } = useIntl();
|
|
39
30
|
|
|
40
31
|
return (
|
|
41
|
-
<
|
|
32
|
+
<a
|
|
42
33
|
href={href}
|
|
43
34
|
target={target}
|
|
44
|
-
className={
|
|
35
|
+
className={clsx('np-link', type ? `np-text-${type}` : undefined, 'd-inline-flex', className)}
|
|
45
36
|
aria-label={ariaLabel}
|
|
46
37
|
rel={isBlank ? 'noreferrer' : undefined}
|
|
47
38
|
onClick={onClick}
|
|
48
39
|
{...props}
|
|
49
40
|
>
|
|
50
41
|
{children} {isBlank && <NavigateAwayIcon title={formatMessage(messages.opensInNewTab)} />}
|
|
51
|
-
</
|
|
42
|
+
</a>
|
|
52
43
|
);
|
|
53
44
|
};
|
|
54
45
|
|