@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.
Files changed (75) hide show
  1. package/build/alert/Alert.js +17 -17
  2. package/build/alert/Alert.js.map +1 -1
  3. package/build/alert/Alert.mjs +14 -14
  4. package/build/alert/Alert.mjs.map +1 -1
  5. package/build/common/action/Action.js +15 -26
  6. package/build/common/action/Action.js.map +1 -1
  7. package/build/common/action/Action.mjs +15 -26
  8. package/build/common/action/Action.mjs.map +1 -1
  9. package/build/common/propsValues/sentiment.js +0 -1
  10. package/build/common/propsValues/sentiment.js.map +1 -1
  11. package/build/common/propsValues/sentiment.mjs +0 -1
  12. package/build/common/propsValues/sentiment.mjs.map +1 -1
  13. package/build/criticalBanner/CriticalCommsBanner.js +73 -10
  14. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  15. package/build/criticalBanner/CriticalCommsBanner.mjs +74 -11
  16. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  17. package/build/i18n/en.json +0 -1
  18. package/build/i18n/en.json.js +0 -1
  19. package/build/i18n/en.json.js.map +1 -1
  20. package/build/i18n/en.json.mjs +0 -1
  21. package/build/i18n/en.json.mjs.map +1 -1
  22. package/build/main.css +70 -21
  23. package/build/statusIcon/StatusIcon.js +1 -5
  24. package/build/statusIcon/StatusIcon.js.map +1 -1
  25. package/build/statusIcon/StatusIcon.messages.js +0 -3
  26. package/build/statusIcon/StatusIcon.messages.js.map +1 -1
  27. package/build/statusIcon/StatusIcon.messages.mjs +0 -3
  28. package/build/statusIcon/StatusIcon.messages.mjs.map +1 -1
  29. package/build/statusIcon/StatusIcon.mjs +1 -5
  30. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  31. package/build/styles/button/Button.css +0 -3
  32. package/build/styles/criticalBanner/CriticalCommsBanner.css +73 -21
  33. package/build/styles/main.css +70 -21
  34. package/build/types/alert/Alert.d.ts +4 -3
  35. package/build/types/alert/Alert.d.ts.map +1 -1
  36. package/build/types/common/action/Action.d.ts +2 -5
  37. package/build/types/common/action/Action.d.ts.map +1 -1
  38. package/build/types/common/propsValues/sentiment.d.ts +0 -1
  39. package/build/types/common/propsValues/sentiment.d.ts.map +1 -1
  40. package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
  41. package/build/types/index.d.ts +1 -0
  42. package/build/types/index.d.ts.map +1 -1
  43. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  44. package/build/types/statusIcon/StatusIcon.messages.d.ts +0 -5
  45. package/build/types/statusIcon/StatusIcon.messages.d.ts.map +1 -1
  46. package/build/types/test-utils/index.d.ts +0 -2
  47. package/build/types/test-utils/index.d.ts.map +1 -1
  48. package/package.json +5 -5
  49. package/src/alert/Alert.spec.tsx +30 -0
  50. package/src/alert/Alert.story.tsx +1 -34
  51. package/src/alert/Alert.tsx +15 -20
  52. package/src/button/Button.css +0 -3
  53. package/src/button/Button.less +3 -6
  54. package/src/button/Button.vars.less +4 -0
  55. package/src/common/action/Action.tsx +22 -40
  56. package/src/common/propsValues/sentiment.ts +0 -1
  57. package/src/criticalBanner/CriticalCommsBanner.css +73 -21
  58. package/src/criticalBanner/CriticalCommsBanner.less +70 -24
  59. package/src/criticalBanner/CriticalCommsBanner.story.tsx +4 -26
  60. package/src/criticalBanner/CriticalCommsBanner.tsx +50 -8
  61. package/src/i18n/en.json +0 -1
  62. package/src/index.ts +1 -0
  63. package/src/main.css +70 -21
  64. package/src/radio/Radio.spec.tsx +73 -0
  65. package/src/radio/Radio.story.tsx +22 -52
  66. package/src/radioGroup/RadioGroup.spec.tsx +91 -0
  67. package/src/radioGroup/RadioGroup.story.tsx +3 -5
  68. package/src/statusIcon/StatusIcon.less +0 -1
  69. package/src/statusIcon/StatusIcon.messages.ts +0 -6
  70. package/src/statusIcon/StatusIcon.tsx +1 -8
  71. package/src/radio/Radio.rtl.spec.tsx +0 -24
  72. package/src/radio/Radio.spec.js +0 -76
  73. package/src/radio/__snapshots__/Radio.rtl.spec.tsx.snap +0 -49
  74. package/src/radioGroup/RadioGroup.rtl.spec.tsx +0 -30
  75. package/src/radioGroup/RadioGroup.spec.js +0 -90
@@ -1,6 +1,34 @@
1
- import Alert from '../alert/Alert.mjs';
1
+ import { AlertCircleFill, Alert } from '@transferwise/icons';
2
+ import { useTheme } from '@wise/components-theming';
2
3
  import { clsx } from 'clsx';
3
- import { jsx } from 'react/jsx-runtime';
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__*/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"
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 '../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;;;;"}
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,QA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AAAA,SAAK,CACL,EAACC,MAAM,gBACLI,GAAA,CAAA,KAAA,EAAA;AAAKH,UAAAA,SAAS,EAAC,qBAAqB;UAAAK,QAAA,eAClCF,GAAA,CAACmB,MAAM,EAAA;AACLC,YAAAA,KAAK,EAAEtB,QAAS;YAChBO,IAAI,EAAEC,IAAI,CAACe,KAAM;YACjBb,IAAI,EAAEc,WAAW,CAACC,QAAS;YAC3BC,QAAQ,EAAE1B,QAAQ,GAAG2B,QAAQ,CAACC,SAAS,GAAGD,QAAQ,CAACE,OAAQ;AAC3D9B,YAAAA,SAAS,EAAC,SAAS;YACnB+B,OAAO,EAAEA,MAAK;AACZ,cAAA,IAAIhC,MAAM,EAAE;AACViC,gBAAAA,MAAM,CAACC,QAAQ,CAACC,IAAI,GAAGnC,MAAM,CAACmC,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;;;;"}
@@ -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:",
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -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 .alert-critical {
2
- color: var(--color-contrast-overlay) !important;
3
- background-color: var(--color-sentiment-negative) !important;
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
- .critical-comms .alert-critical .np-text-title-body {
6
- color: var(--color-contrast-overlay);
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 .status-circle.critical {
9
- background-color: #ffffff;
10
- background-color: var(--color-background-screen);
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
- @media (min-width: 768px) {
13
- .critical-comms .alert-critical .alert__message {
14
- flex-direction: row !important;
15
- justify-content: space-between;
16
- align-items: center;
17
- width: 100%;
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
- .critical-comms .alert-critical .alert__message .alert__action {
20
- margin-top: 0;
21
- padding-left: 16px;
22
- padding-left: var(--padding-small);
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' || sentiment$1 === 'critical' ? 'dark' : 'light';
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.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;AACX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AAIA,WAAS,KAAK,SAAS,IAAIA,WAAS,KAAK,UAAU,GAC1E,MAAM,GACN,OAAO,CAAA;EACb,MAAMiC,cAAc,GAAGC,iBAAQ,CAAC,eAAeC,qBAAU,CAACC,QAAQ,CAAA,GAAA,CAAK,CAAC,CAAA;AACxE,EAAA,MAAMnC,IAAI,GAAGR,aAAa,CAACS,QAAQ,CAAC,IAAIA,QAAQ,CAAA;EAChD,oBACEmC,cAAA,CAACC,MAAM,EAAA;AACLC,IAAAA,EAAE,EAAC,MAAM;IACTtC,IAAI,EAAEgC,cAAc,IAAIhC,IAAI,GAAG,EAAE,GAAG,EAAE,GAAGA,IAAK;AAC9C,IAAA,aAAA,EAAY,aAAa;AACzBuC,IAAAA,SAAS,EAAEC,SAAI,CAAC,eAAe,EAAEzC,WAAS,CAAE;IAAA0C,QAAA,eAE5CL,cAAA,CAAC5B,IAAI,EAAA;AACH+B,MAAAA,SAAS,EAAEC,SAAI,CAAC,aAAa,EAAET,SAAS,CAAE;MAC1CW,KAAK,EAAExC,SAAS,KAAK,IAAI,GAAGyC,SAAS,GAAGzC,SAAS,IAAIQ,gBAAAA;KAEzD,CAAA;AAAA,GAAQ,CAAC,CAAA;AAEb;;;;"}
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,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M+B,cAAc,GAAGC,iBAAQ,CAAC,eAAeC,qBAAU,CAACC,QAAQ,CAAA,GAAA,CAAK,CAAC,CAAA;AACxE,EAAA,MAAMjC,IAAI,GAAGR,aAAa,CAACS,QAAQ,CAAC,IAAIA,QAAQ,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;;;;"}
@@ -12,9 +12,6 @@ var messages = reactIntl.defineMessages({
12
12
  warningLabel: {
13
13
  id: "neptune.StatusIcon.iconLabel.warning"
14
14
  },
15
- criticalLabel: {
16
- id: "neptune.StatusIcon.iconLabel.critical"
17
- },
18
15
  pendingLabel: {
19
16
  id: "neptune.StatusIcon.iconLabel.pending"
20
17
  },
@@ -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 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
+ {"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;;;;"}
@@ -10,9 +10,6 @@ var messages = defineMessages({
10
10
  warningLabel: {
11
11
  id: "neptune.StatusIcon.iconLabel.warning"
12
12
  },
13
- criticalLabel: {
14
- id: "neptune.StatusIcon.iconLabel.critical"
15
- },
16
13
  pendingLabel: {
17
14
  id: "neptune.StatusIcon.iconLabel.pending"
18
15
  },
@@ -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 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;;;;"}
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' || sentiment === 'critical' ? 'dark' : 'light';
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.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAEP,IAAI,CAACQ,aAAa,CAACC,QAAQ,CAACI,YAAY,CAAA;KAC3D;I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AAEjE,EAAA,MAAMgC,SAAS,GACbhC,SAAS,KAAK,SAAS,IAAIA,SAAS,KAAK,SAAS,IAAIA,SAAS,KAAK,UAAU,GAC1E,MAAM,GACN,OAAO,CAAA;EACb,MAAMiC,cAAc,GAAGC,QAAQ,CAAC,eAAeC,UAAU,CAACC,QAAQ,CAAA,GAAA,CAAK,CAAC,CAAA;AACxE,EAAA,MAAMnC,IAAI,GAAGR,aAAa,CAACS,QAAQ,CAAC,IAAIA,QAAQ,CAAA;EAChD,oBACEmC,GAAA,CAACC,MAAM,EAAA;AACLC,IAAAA,EAAE,EAAC,MAAM;IACTtC,IAAI,EAAEgC,cAAc,IAAIhC,IAAI,GAAG,EAAE,GAAG,EAAE,GAAGA,IAAK;AAC9C,IAAA,aAAA,EAAY,aAAa;AACzBuC,IAAAA,SAAS,EAAEC,IAAI,CAAC,eAAe,EAAEzC,SAAS,CAAE;IAAA0C,QAAA,eAE5CL,GAAA,CAAC5B,IAAI,EAAA;AACH+B,MAAAA,SAAS,EAAEC,IAAI,CAAC,aAAa,EAAET,SAAS,CAAE;MAC1CW,KAAK,EAAExC,SAAS,KAAK,IAAI,GAAGyC,SAAS,GAAGzC,SAAS,IAAIQ,gBAAAA;KAEzD,CAAA;AAAA,GAAQ,CAAC,CAAA;AAEb;;;;"}
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,gB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M,GAAG,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 .alert-critical {
2
- color: var(--color-contrast-overlay) !important;
3
- background-color: var(--color-sentiment-negative) !important;
4
- }
5
- .critical-comms .alert-critical .np-text-title-body {
6
- color: var(--color-contrast-overlay);
7
- }
8
- .critical-comms .status-circle.critical {
9
- background-color: #ffffff;
10
- background-color: var(--color-background-screen);
11
- }
12
- @media (min-width: 768px) {
13
- .critical-comms .alert-critical .alert__message {
14
- flex-direction: row !important;
15
- justify-content: space-between;
16
- align-items: center;
17
- width: 100%;
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
- .critical-comms .alert-critical .alert__message .alert__action {
20
- margin-top: 0;
21
- padding-left: 16px;
22
- padding-left: var(--padding-small);
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
  }