@transferwise/components 0.0.0-experimental-946934e → 0.0.0-experimental-2c28aba

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/main.css CHANGED
@@ -931,6 +931,9 @@
931
931
  height: 16px;
932
932
  height: var(--size-16);
933
933
  }
934
+ .wds-inline-prompt .wds-inline-prompt-process-indicator .process-circle {
935
+ stroke: currentColor;
936
+ }
934
937
  .np-dot {
935
938
  --np-dot-size: 14px;
936
939
  position: relative;
@@ -959,7 +962,7 @@
959
962
  }
960
963
  .np-avatar-view .np-avatar-view-content {
961
964
  color: #37517e;
962
- color: var(--color-sentiment-content-primary, var(--color-content-primary));
965
+ color: var(--color-content-primary);
963
966
  }
964
967
  .np-avatar-view-interactive {
965
968
  cursor: pointer;
@@ -971,7 +974,6 @@
971
974
  }
972
975
  .np-avatar-view-non-interactive .np-circle {
973
976
  background-color: transparent;
974
- background-color: var(--color-sentiment-background-surface, transparent);
975
977
  }
976
978
  .np-avatar-view-non-interactive .np-avatar-view-content .wds-flag {
977
979
  box-shadow: none;
@@ -1944,7 +1946,7 @@
1944
1946
  width: var(--circle-size);
1945
1947
  height: var(--circle-size);
1946
1948
  flex-shrink: 0;
1947
- --circle-border-color: var(--color-sentiment-content-primary, var(--color-border-neutral));
1949
+ --circle-border-color: var(--color-border-neutral);
1948
1950
  --circle-border-width: 1px;
1949
1951
  font-size: var(--circle-font-size);
1950
1952
  font-weight: 600;
@@ -42,12 +42,6 @@ const InlinePrompt = ({
42
42
  }) => {
43
43
  const surfaceSentiment = sentiment$1 === sentiment.Sentiment.POSITIVE ? 'success' : sentiment$1;
44
44
  const renderMedia = () => {
45
- if (media && ['proposition', 'positive'].includes(sentiment$1)) {
46
- return media;
47
- }
48
- if (sentiment$1 === 'proposition') {
49
- return /*#__PURE__*/jsxRuntime.jsx(icons.GiftBox, {});
50
- }
51
45
  if (muted) {
52
46
  return /*#__PURE__*/jsxRuntime.jsx(icons.BackslashCircle, {
53
47
  size: 16,
@@ -61,6 +55,12 @@ const InlinePrompt = ({
61
55
  className: "wds-inline-prompt-process-indicator"
62
56
  });
63
57
  }
58
+ if (sentiment$1 === 'positive' && media) {
59
+ return media;
60
+ }
61
+ if (sentiment$1 === 'proposition') {
62
+ return media || /*#__PURE__*/jsxRuntime.jsx(icons.GiftBox, {});
63
+ }
64
64
  return /*#__PURE__*/jsxRuntime.jsx(StatusIcon.default, {
65
65
  size: 16,
66
66
  sentiment: sentiment$1
@@ -1 +1 @@
1
- {"version":3,"file":"InlinePrompt.js","sources":["../../../src/prompt/InlinePrompt/InlinePrompt.tsx"],"sourcesContent":["import { Sentiment } from '../../common';\nimport { BackslashCircle, GiftBox } from '@transferwise/icons';\nimport ProcessIndicator from '../../processIndicator';\nimport StatusIcon from '../../statusIcon';\nimport { clsx } from 'clsx';\nimport Body from '../../body';\nimport SentimentSurface from '../../sentimentSurface';\n\nexport type InlinePromptProps = {\n /**\n * The sentiment determines the colour scheme\n */\n sentiment?:\n | `${Sentiment.POSITIVE | Sentiment.NEGATIVE | Sentiment.NEUTRAL | Sentiment.WARNING}`\n | 'proposition';\n /**\n * Replaces the icon with a spinner while waiting for the short-lived action to finish.\n * @default false\n */\n loading?: boolean;\n /**\n * While prompts cannot be fully (visually and functionally) disabled, this prop should be enabled\n * they are associated with actually disabled component (e.g. a disabled list item or input).\n * @default false\n */\n muted?: boolean;\n /**\n * Icon override for `proposition` and `positive` sentiments. Unsupported for remaining ones.\n */\n media?: React.ReactNode;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: React.ReactNode;\n};\n\n/**\n * Inline prompts appear alongside a specific component on the screen. They help the user stay\n * informed, fix something, or get more out of what they're doing.\n */\nexport const InlinePrompt = ({\n sentiment = Sentiment.POSITIVE,\n muted = false,\n loading = false,\n className,\n children,\n media = null,\n 'data-testid': dataTestId,\n ...rest\n}: InlinePromptProps) => {\n const surfaceSentiment = sentiment === Sentiment.POSITIVE ? 'success' : sentiment;\n\n const renderMedia = () => {\n if (media && ['proposition', 'positive'].includes(sentiment)) {\n return media;\n }\n if (sentiment === 'proposition') {\n return <GiftBox />;\n }\n if (muted) {\n return <BackslashCircle size={16} data-testid=\"InlinePrompt_Muted\" />;\n }\n if (loading) {\n return (\n <ProcessIndicator\n data-testid=\"InlinePrompt_ProcessIndicator\"\n size=\"xxs\"\n className=\"wds-inline-prompt-process-indicator\"\n />\n );\n }\n return <StatusIcon size={16} sentiment={sentiment} />;\n };\n\n return (\n <SentimentSurface\n sentiment={surfaceSentiment}\n data-testid={dataTestId}\n className={clsx(\n 'wds-inline-prompt',\n `wds-inline-prompt--${sentiment}`,\n {\n 'wds-inline-prompt--muted': muted,\n 'wds-inline-prompt--loading': loading,\n },\n className,\n )}\n {...rest}\n >\n <div className=\"wds-inline-prompt__media-wrapper\">{renderMedia()}</div>\n <Body>{children}</Body>\n </SentimentSurface>\n );\n};\n"],"names":["InlinePrompt","sentiment","Sentiment","POSITIVE","muted","loading","className","children","media","dataTestId","rest","surfaceSentiment","renderMedia","includes","_jsx","GiftBox","BackslashCircle","size","ProcessIndicator","StatusIcon","_jsxs","SentimentSurface","clsx","Body"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCO,MAAMA,YAAY,GAAGA,CAAC;aAC3BC,WAAS,GAAGC,mBAAS,CAACC,QAAQ;AAC9BC,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,OAAO,GAAG,KAAK;EACfC,SAAS;EACTC,QAAQ;AACRC,EAAAA,KAAK,GAAG,IAAI;AACZ,EAAA,aAAa,EAAEC,UAAU;EACzB,GAAGC;AAAI,CACW,KAAI;EACtB,MAAMC,gBAAgB,GAAGV,WAAS,KAAKC,mBAAS,CAACC,QAAQ,GAAG,SAAS,GAAGF,WAAS;EAEjF,MAAMW,WAAW,GAAGA,MAAK;AACvB,IAAA,IAAIJ,KAAK,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAACK,QAAQ,CAACZ,WAAS,CAAC,EAAE;AAC5D,MAAA,OAAOO,KAAK;AACd,IAAA;IACA,IAAIP,WAAS,KAAK,aAAa,EAAE;AAC/B,MAAA,oBAAOa,cAAA,CAACC,aAAO,EAAA,GAAG;AACpB,IAAA;AACA,IAAA,IAAIX,KAAK,EAAE;MACT,oBAAOU,cAAA,CAACE,qBAAe,EAAA;AAACC,QAAAA,IAAI,EAAE,EAAG;QAAC,aAAA,EAAY;AAAoB,QAAG;AACvE,IAAA;AACA,IAAA,IAAIZ,OAAO,EAAE;MACX,oBACES,cAAA,CAACI,wBAAgB,EAAA;AACf,QAAA,aAAA,EAAY,+BAA+B;AAC3CD,QAAAA,IAAI,EAAC,KAAK;AACVX,QAAAA,SAAS,EAAC;AAAqC,OAAA,CAC/C;AAEN,IAAA;IACA,oBAAOQ,cAAA,CAACK,kBAAU,EAAA;AAACF,MAAAA,IAAI,EAAE,EAAG;AAAChB,MAAAA,SAAS,EAAEA;AAAU,MAAG;EACvD,CAAC;EAED,oBACEmB,eAAA,CAACC,wBAAgB,EAAA;AACfpB,IAAAA,SAAS,EAAEU,gBAAiB;AAC5B,IAAA,aAAA,EAAaF,UAAW;IACxBH,SAAS,EAAEgB,SAAI,CACb,mBAAmB,EACnB,CAAA,mBAAA,EAAsBrB,WAAS,EAAE,EACjC;AACE,MAAA,0BAA0B,EAAEG,KAAK;AACjC,MAAA,4BAA4B,EAAEC;KAC/B,EACDC,SAAS,CACT;AAAA,IAAA,GACEI,IAAI;AAAAH,IAAAA,QAAA,gBAERO,cAAA,CAAA,KAAA,EAAA;AAAKR,MAAAA,SAAS,EAAC,kCAAkC;MAAAC,QAAA,EAAEK,WAAW;AAAE,KAAM,CACtE,eAAAE,cAAA,CAACS,YAAI,EAAA;AAAAhB,MAAAA,QAAA,EAAEA;AAAQ,KAAO,CACxB;AAAA,GAAkB,CAAC;AAEvB;;;;"}
1
+ {"version":3,"file":"InlinePrompt.js","sources":["../../../src/prompt/InlinePrompt/InlinePrompt.tsx"],"sourcesContent":["import { Sentiment } from '../../common';\nimport { BackslashCircle, GiftBox } from '@transferwise/icons';\nimport ProcessIndicator from '../../processIndicator';\nimport StatusIcon from '../../statusIcon';\nimport { clsx } from 'clsx';\nimport Body from '../../body';\nimport SentimentSurface from '../../sentimentSurface';\n\nexport type InlinePromptProps = {\n /**\n * The sentiment determines the colour scheme\n */\n sentiment?:\n | `${Sentiment.POSITIVE | Sentiment.NEGATIVE | Sentiment.NEUTRAL | Sentiment.WARNING}`\n | 'proposition';\n /**\n * Replaces the icon with a spinner while waiting for the short-lived action to finish.\n * @default false\n */\n loading?: boolean;\n /**\n * While prompts cannot be fully (visually and functionally) disabled, this prop should be enabled\n * they are associated with actually disabled component (e.g. a disabled list item or input).\n * @default false\n */\n muted?: boolean;\n /**\n * Icon override for `proposition` and `positive` sentiments. Unsupported for remaining ones.\n */\n media?: React.ReactNode;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: React.ReactNode;\n};\n\n/**\n * Inline prompts appear alongside a specific component on the screen. They help the user stay\n * informed, fix something, or get more out of what they're doing.\n */\nexport const InlinePrompt = ({\n sentiment = Sentiment.POSITIVE,\n muted = false,\n loading = false,\n className,\n children,\n media = null,\n 'data-testid': dataTestId,\n ...rest\n}: InlinePromptProps) => {\n const surfaceSentiment = sentiment === Sentiment.POSITIVE ? 'success' : sentiment;\n\n const renderMedia = () => {\n if (muted) {\n return <BackslashCircle size={16} data-testid=\"InlinePrompt_Muted\" />;\n }\n if (loading) {\n return (\n <ProcessIndicator\n data-testid=\"InlinePrompt_ProcessIndicator\"\n size=\"xxs\"\n className=\"wds-inline-prompt-process-indicator\"\n />\n );\n }\n\n if (sentiment === 'positive' && media) {\n return media;\n }\n\n if (sentiment === 'proposition') {\n return media || <GiftBox />;\n }\n\n return <StatusIcon size={16} sentiment={sentiment} />;\n };\n\n return (\n <SentimentSurface\n sentiment={surfaceSentiment}\n data-testid={dataTestId}\n className={clsx(\n 'wds-inline-prompt',\n `wds-inline-prompt--${sentiment}`,\n {\n 'wds-inline-prompt--muted': muted,\n 'wds-inline-prompt--loading': loading,\n },\n className,\n )}\n {...rest}\n >\n <div className=\"wds-inline-prompt__media-wrapper\">{renderMedia()}</div>\n <Body>{children}</Body>\n </SentimentSurface>\n );\n};\n"],"names":["InlinePrompt","sentiment","Sentiment","POSITIVE","muted","loading","className","children","media","dataTestId","rest","surfaceSentiment","renderMedia","_jsx","BackslashCircle","size","ProcessIndicator","GiftBox","StatusIcon","_jsxs","SentimentSurface","clsx","Body"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCO,MAAMA,YAAY,GAAGA,CAAC;aAC3BC,WAAS,GAAGC,mBAAS,CAACC,QAAQ;AAC9BC,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,OAAO,GAAG,KAAK;EACfC,SAAS;EACTC,QAAQ;AACRC,EAAAA,KAAK,GAAG,IAAI;AACZ,EAAA,aAAa,EAAEC,UAAU;EACzB,GAAGC;AAAI,CACW,KAAI;EACtB,MAAMC,gBAAgB,GAAGV,WAAS,KAAKC,mBAAS,CAACC,QAAQ,GAAG,SAAS,GAAGF,WAAS;EAEjF,MAAMW,WAAW,GAAGA,MAAK;AACvB,IAAA,IAAIR,KAAK,EAAE;MACT,oBAAOS,cAAA,CAACC,qBAAe,EAAA;AAACC,QAAAA,IAAI,EAAE,EAAG;QAAC,aAAA,EAAY;AAAoB,QAAG;AACvE,IAAA;AACA,IAAA,IAAIV,OAAO,EAAE;MACX,oBACEQ,cAAA,CAACG,wBAAgB,EAAA;AACf,QAAA,aAAA,EAAY,+BAA+B;AAC3CD,QAAAA,IAAI,EAAC,KAAK;AACVT,QAAAA,SAAS,EAAC;AAAqC,OAAA,CAC/C;AAEN,IAAA;AAEA,IAAA,IAAIL,WAAS,KAAK,UAAU,IAAIO,KAAK,EAAE;AACrC,MAAA,OAAOA,KAAK;AACd,IAAA;IAEA,IAAIP,WAAS,KAAK,aAAa,EAAE;AAC/B,MAAA,OAAOO,KAAK,iBAAIK,cAAA,CAACI,aAAO,KAAG;AAC7B,IAAA;IAEA,oBAAOJ,cAAA,CAACK,kBAAU,EAAA;AAACH,MAAAA,IAAI,EAAE,EAAG;AAACd,MAAAA,SAAS,EAAEA;AAAU,MAAG;EACvD,CAAC;EAED,oBACEkB,eAAA,CAACC,wBAAgB,EAAA;AACfnB,IAAAA,SAAS,EAAEU,gBAAiB;AAC5B,IAAA,aAAA,EAAaF,UAAW;IACxBH,SAAS,EAAEe,SAAI,CACb,mBAAmB,EACnB,CAAA,mBAAA,EAAsBpB,WAAS,EAAE,EACjC;AACE,MAAA,0BAA0B,EAAEG,KAAK;AACjC,MAAA,4BAA4B,EAAEC;KAC/B,EACDC,SAAS,CACT;AAAA,IAAA,GACEI,IAAI;AAAAH,IAAAA,QAAA,gBAERM,cAAA,CAAA,KAAA,EAAA;AAAKP,MAAAA,SAAS,EAAC,kCAAkC;MAAAC,QAAA,EAAEK,WAAW;AAAE,KAAM,CACtE,eAAAC,cAAA,CAACS,YAAI,EAAA;AAAAf,MAAAA,QAAA,EAAEA;AAAQ,KAAO,CACxB;AAAA,GAAkB,CAAC;AAEvB;;;;"}
@@ -17,7 +17,7 @@ import '../../common/propsValues/variant.mjs';
17
17
  import '../../common/propsValues/scroll.mjs';
18
18
  import '../../common/propsValues/markdownNodeType.mjs';
19
19
  import '../../common/fileType.mjs';
20
- import { GiftBox, BackslashCircle } from '@transferwise/icons';
20
+ import { BackslashCircle, GiftBox } from '@transferwise/icons';
21
21
  import { clsx } from 'clsx';
22
22
  import 'react';
23
23
  import 'react-intl';
@@ -40,12 +40,6 @@ const InlinePrompt = ({
40
40
  }) => {
41
41
  const surfaceSentiment = sentiment === Sentiment.POSITIVE ? 'success' : sentiment;
42
42
  const renderMedia = () => {
43
- if (media && ['proposition', 'positive'].includes(sentiment)) {
44
- return media;
45
- }
46
- if (sentiment === 'proposition') {
47
- return /*#__PURE__*/jsx(GiftBox, {});
48
- }
49
43
  if (muted) {
50
44
  return /*#__PURE__*/jsx(BackslashCircle, {
51
45
  size: 16,
@@ -59,6 +53,12 @@ const InlinePrompt = ({
59
53
  className: "wds-inline-prompt-process-indicator"
60
54
  });
61
55
  }
56
+ if (sentiment === 'positive' && media) {
57
+ return media;
58
+ }
59
+ if (sentiment === 'proposition') {
60
+ return media || /*#__PURE__*/jsx(GiftBox, {});
61
+ }
62
62
  return /*#__PURE__*/jsx(StatusIcon, {
63
63
  size: 16,
64
64
  sentiment: sentiment
@@ -1 +1 @@
1
- {"version":3,"file":"InlinePrompt.mjs","sources":["../../../src/prompt/InlinePrompt/InlinePrompt.tsx"],"sourcesContent":["import { Sentiment } from '../../common';\nimport { BackslashCircle, GiftBox } from '@transferwise/icons';\nimport ProcessIndicator from '../../processIndicator';\nimport StatusIcon from '../../statusIcon';\nimport { clsx } from 'clsx';\nimport Body from '../../body';\nimport SentimentSurface from '../../sentimentSurface';\n\nexport type InlinePromptProps = {\n /**\n * The sentiment determines the colour scheme\n */\n sentiment?:\n | `${Sentiment.POSITIVE | Sentiment.NEGATIVE | Sentiment.NEUTRAL | Sentiment.WARNING}`\n | 'proposition';\n /**\n * Replaces the icon with a spinner while waiting for the short-lived action to finish.\n * @default false\n */\n loading?: boolean;\n /**\n * While prompts cannot be fully (visually and functionally) disabled, this prop should be enabled\n * they are associated with actually disabled component (e.g. a disabled list item or input).\n * @default false\n */\n muted?: boolean;\n /**\n * Icon override for `proposition` and `positive` sentiments. Unsupported for remaining ones.\n */\n media?: React.ReactNode;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: React.ReactNode;\n};\n\n/**\n * Inline prompts appear alongside a specific component on the screen. They help the user stay\n * informed, fix something, or get more out of what they're doing.\n */\nexport const InlinePrompt = ({\n sentiment = Sentiment.POSITIVE,\n muted = false,\n loading = false,\n className,\n children,\n media = null,\n 'data-testid': dataTestId,\n ...rest\n}: InlinePromptProps) => {\n const surfaceSentiment = sentiment === Sentiment.POSITIVE ? 'success' : sentiment;\n\n const renderMedia = () => {\n if (media && ['proposition', 'positive'].includes(sentiment)) {\n return media;\n }\n if (sentiment === 'proposition') {\n return <GiftBox />;\n }\n if (muted) {\n return <BackslashCircle size={16} data-testid=\"InlinePrompt_Muted\" />;\n }\n if (loading) {\n return (\n <ProcessIndicator\n data-testid=\"InlinePrompt_ProcessIndicator\"\n size=\"xxs\"\n className=\"wds-inline-prompt-process-indicator\"\n />\n );\n }\n return <StatusIcon size={16} sentiment={sentiment} />;\n };\n\n return (\n <SentimentSurface\n sentiment={surfaceSentiment}\n data-testid={dataTestId}\n className={clsx(\n 'wds-inline-prompt',\n `wds-inline-prompt--${sentiment}`,\n {\n 'wds-inline-prompt--muted': muted,\n 'wds-inline-prompt--loading': loading,\n },\n className,\n )}\n {...rest}\n >\n <div className=\"wds-inline-prompt__media-wrapper\">{renderMedia()}</div>\n <Body>{children}</Body>\n </SentimentSurface>\n );\n};\n"],"names":["InlinePrompt","sentiment","Sentiment","POSITIVE","muted","loading","className","children","media","dataTestId","rest","surfaceSentiment","renderMedia","includes","_jsx","GiftBox","BackslashCircle","size","ProcessIndicator","StatusIcon","_jsxs","SentimentSurface","clsx","Body"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCO,MAAMA,YAAY,GAAGA,CAAC;EAC3BC,SAAS,GAAGC,SAAS,CAACC,QAAQ;AAC9BC,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,OAAO,GAAG,KAAK;EACfC,SAAS;EACTC,QAAQ;AACRC,EAAAA,KAAK,GAAG,IAAI;AACZ,EAAA,aAAa,EAAEC,UAAU;EACzB,GAAGC;AAAI,CACW,KAAI;EACtB,MAAMC,gBAAgB,GAAGV,SAAS,KAAKC,SAAS,CAACC,QAAQ,GAAG,SAAS,GAAGF,SAAS;EAEjF,MAAMW,WAAW,GAAGA,MAAK;AACvB,IAAA,IAAIJ,KAAK,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAACK,QAAQ,CAACZ,SAAS,CAAC,EAAE;AAC5D,MAAA,OAAOO,KAAK;AACd,IAAA;IACA,IAAIP,SAAS,KAAK,aAAa,EAAE;AAC/B,MAAA,oBAAOa,GAAA,CAACC,OAAO,EAAA,GAAG;AACpB,IAAA;AACA,IAAA,IAAIX,KAAK,EAAE;MACT,oBAAOU,GAAA,CAACE,eAAe,EAAA;AAACC,QAAAA,IAAI,EAAE,EAAG;QAAC,aAAA,EAAY;AAAoB,QAAG;AACvE,IAAA;AACA,IAAA,IAAIZ,OAAO,EAAE;MACX,oBACES,GAAA,CAACI,gBAAgB,EAAA;AACf,QAAA,aAAA,EAAY,+BAA+B;AAC3CD,QAAAA,IAAI,EAAC,KAAK;AACVX,QAAAA,SAAS,EAAC;AAAqC,OAAA,CAC/C;AAEN,IAAA;IACA,oBAAOQ,GAAA,CAACK,UAAU,EAAA;AAACF,MAAAA,IAAI,EAAE,EAAG;AAAChB,MAAAA,SAAS,EAAEA;AAAU,MAAG;EACvD,CAAC;EAED,oBACEmB,IAAA,CAACC,gBAAgB,EAAA;AACfpB,IAAAA,SAAS,EAAEU,gBAAiB;AAC5B,IAAA,aAAA,EAAaF,UAAW;IACxBH,SAAS,EAAEgB,IAAI,CACb,mBAAmB,EACnB,CAAA,mBAAA,EAAsBrB,SAAS,EAAE,EACjC;AACE,MAAA,0BAA0B,EAAEG,KAAK;AACjC,MAAA,4BAA4B,EAAEC;KAC/B,EACDC,SAAS,CACT;AAAA,IAAA,GACEI,IAAI;AAAAH,IAAAA,QAAA,gBAERO,GAAA,CAAA,KAAA,EAAA;AAAKR,MAAAA,SAAS,EAAC,kCAAkC;MAAAC,QAAA,EAAEK,WAAW;AAAE,KAAM,CACtE,eAAAE,GAAA,CAACS,IAAI,EAAA;AAAAhB,MAAAA,QAAA,EAAEA;AAAQ,KAAO,CACxB;AAAA,GAAkB,CAAC;AAEvB;;;;"}
1
+ {"version":3,"file":"InlinePrompt.mjs","sources":["../../../src/prompt/InlinePrompt/InlinePrompt.tsx"],"sourcesContent":["import { Sentiment } from '../../common';\nimport { BackslashCircle, GiftBox } from '@transferwise/icons';\nimport ProcessIndicator from '../../processIndicator';\nimport StatusIcon from '../../statusIcon';\nimport { clsx } from 'clsx';\nimport Body from '../../body';\nimport SentimentSurface from '../../sentimentSurface';\n\nexport type InlinePromptProps = {\n /**\n * The sentiment determines the colour scheme\n */\n sentiment?:\n | `${Sentiment.POSITIVE | Sentiment.NEGATIVE | Sentiment.NEUTRAL | Sentiment.WARNING}`\n | 'proposition';\n /**\n * Replaces the icon with a spinner while waiting for the short-lived action to finish.\n * @default false\n */\n loading?: boolean;\n /**\n * While prompts cannot be fully (visually and functionally) disabled, this prop should be enabled\n * they are associated with actually disabled component (e.g. a disabled list item or input).\n * @default false\n */\n muted?: boolean;\n /**\n * Icon override for `proposition` and `positive` sentiments. Unsupported for remaining ones.\n */\n media?: React.ReactNode;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: React.ReactNode;\n};\n\n/**\n * Inline prompts appear alongside a specific component on the screen. They help the user stay\n * informed, fix something, or get more out of what they're doing.\n */\nexport const InlinePrompt = ({\n sentiment = Sentiment.POSITIVE,\n muted = false,\n loading = false,\n className,\n children,\n media = null,\n 'data-testid': dataTestId,\n ...rest\n}: InlinePromptProps) => {\n const surfaceSentiment = sentiment === Sentiment.POSITIVE ? 'success' : sentiment;\n\n const renderMedia = () => {\n if (muted) {\n return <BackslashCircle size={16} data-testid=\"InlinePrompt_Muted\" />;\n }\n if (loading) {\n return (\n <ProcessIndicator\n data-testid=\"InlinePrompt_ProcessIndicator\"\n size=\"xxs\"\n className=\"wds-inline-prompt-process-indicator\"\n />\n );\n }\n\n if (sentiment === 'positive' && media) {\n return media;\n }\n\n if (sentiment === 'proposition') {\n return media || <GiftBox />;\n }\n\n return <StatusIcon size={16} sentiment={sentiment} />;\n };\n\n return (\n <SentimentSurface\n sentiment={surfaceSentiment}\n data-testid={dataTestId}\n className={clsx(\n 'wds-inline-prompt',\n `wds-inline-prompt--${sentiment}`,\n {\n 'wds-inline-prompt--muted': muted,\n 'wds-inline-prompt--loading': loading,\n },\n className,\n )}\n {...rest}\n >\n <div className=\"wds-inline-prompt__media-wrapper\">{renderMedia()}</div>\n <Body>{children}</Body>\n </SentimentSurface>\n );\n};\n"],"names":["InlinePrompt","sentiment","Sentiment","POSITIVE","muted","loading","className","children","media","dataTestId","rest","surfaceSentiment","renderMedia","_jsx","BackslashCircle","size","ProcessIndicator","GiftBox","StatusIcon","_jsxs","SentimentSurface","clsx","Body"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCO,MAAMA,YAAY,GAAGA,CAAC;EAC3BC,SAAS,GAAGC,SAAS,CAACC,QAAQ;AAC9BC,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,OAAO,GAAG,KAAK;EACfC,SAAS;EACTC,QAAQ;AACRC,EAAAA,KAAK,GAAG,IAAI;AACZ,EAAA,aAAa,EAAEC,UAAU;EACzB,GAAGC;AAAI,CACW,KAAI;EACtB,MAAMC,gBAAgB,GAAGV,SAAS,KAAKC,SAAS,CAACC,QAAQ,GAAG,SAAS,GAAGF,SAAS;EAEjF,MAAMW,WAAW,GAAGA,MAAK;AACvB,IAAA,IAAIR,KAAK,EAAE;MACT,oBAAOS,GAAA,CAACC,eAAe,EAAA;AAACC,QAAAA,IAAI,EAAE,EAAG;QAAC,aAAA,EAAY;AAAoB,QAAG;AACvE,IAAA;AACA,IAAA,IAAIV,OAAO,EAAE;MACX,oBACEQ,GAAA,CAACG,gBAAgB,EAAA;AACf,QAAA,aAAA,EAAY,+BAA+B;AAC3CD,QAAAA,IAAI,EAAC,KAAK;AACVT,QAAAA,SAAS,EAAC;AAAqC,OAAA,CAC/C;AAEN,IAAA;AAEA,IAAA,IAAIL,SAAS,KAAK,UAAU,IAAIO,KAAK,EAAE;AACrC,MAAA,OAAOA,KAAK;AACd,IAAA;IAEA,IAAIP,SAAS,KAAK,aAAa,EAAE;AAC/B,MAAA,OAAOO,KAAK,iBAAIK,GAAA,CAACI,OAAO,KAAG;AAC7B,IAAA;IAEA,oBAAOJ,GAAA,CAACK,UAAU,EAAA;AAACH,MAAAA,IAAI,EAAE,EAAG;AAACd,MAAAA,SAAS,EAAEA;AAAU,MAAG;EACvD,CAAC;EAED,oBACEkB,IAAA,CAACC,gBAAgB,EAAA;AACfnB,IAAAA,SAAS,EAAEU,gBAAiB;AAC5B,IAAA,aAAA,EAAaF,UAAW;IACxBH,SAAS,EAAEe,IAAI,CACb,mBAAmB,EACnB,CAAA,mBAAA,EAAsBpB,SAAS,EAAE,EACjC;AACE,MAAA,0BAA0B,EAAEG,KAAK;AACjC,MAAA,4BAA4B,EAAEC;KAC/B,EACDC,SAAS,CACT;AAAA,IAAA,GACEI,IAAI;AAAAH,IAAAA,QAAA,gBAERM,GAAA,CAAA,KAAA,EAAA;AAAKP,MAAAA,SAAS,EAAC,kCAAkC;MAAAC,QAAA,EAAEK,WAAW;AAAE,KAAM,CACtE,eAAAC,GAAA,CAACS,IAAI,EAAA;AAAAf,MAAAA,QAAA,EAAEA;AAAQ,KAAO,CACxB;AAAA,GAAkB,CAAC;AAEvB;;;;"}
@@ -26,7 +26,7 @@
26
26
  }
27
27
  .np-avatar-view .np-avatar-view-content {
28
28
  color: #37517e;
29
- color: var(--color-sentiment-content-primary, var(--color-content-primary));
29
+ color: var(--color-content-primary);
30
30
  }
31
31
  .np-avatar-view-interactive {
32
32
  cursor: pointer;
@@ -38,7 +38,6 @@
38
38
  }
39
39
  .np-avatar-view-non-interactive .np-circle {
40
40
  background-color: transparent;
41
- background-color: var(--color-sentiment-background-surface, transparent);
42
41
  }
43
42
  .np-avatar-view-non-interactive .np-avatar-view-content .wds-flag {
44
43
  box-shadow: none;
@@ -4,7 +4,7 @@
4
4
  width: var(--circle-size);
5
5
  height: var(--circle-size);
6
6
  flex-shrink: 0;
7
- --circle-border-color: var(--color-sentiment-content-primary, var(--color-border-neutral));
7
+ --circle-border-color: var(--color-border-neutral);
8
8
  --circle-border-width: 1px;
9
9
  font-size: var(--circle-font-size);
10
10
  font-weight: 600;
@@ -931,6 +931,9 @@
931
931
  height: 16px;
932
932
  height: var(--size-16);
933
933
  }
934
+ .wds-inline-prompt .wds-inline-prompt-process-indicator .process-circle {
935
+ stroke: currentColor;
936
+ }
934
937
  .np-dot {
935
938
  --np-dot-size: 14px;
936
939
  position: relative;
@@ -959,7 +962,7 @@
959
962
  }
960
963
  .np-avatar-view .np-avatar-view-content {
961
964
  color: #37517e;
962
- color: var(--color-sentiment-content-primary, var(--color-content-primary));
965
+ color: var(--color-content-primary);
963
966
  }
964
967
  .np-avatar-view-interactive {
965
968
  cursor: pointer;
@@ -971,7 +974,6 @@
971
974
  }
972
975
  .np-avatar-view-non-interactive .np-circle {
973
976
  background-color: transparent;
974
- background-color: var(--color-sentiment-background-surface, transparent);
975
977
  }
976
978
  .np-avatar-view-non-interactive .np-avatar-view-content .wds-flag {
977
979
  box-shadow: none;
@@ -1944,7 +1946,7 @@
1944
1946
  width: var(--circle-size);
1945
1947
  height: var(--circle-size);
1946
1948
  flex-shrink: 0;
1947
- --circle-border-color: var(--color-sentiment-content-primary, var(--color-border-neutral));
1949
+ --circle-border-color: var(--color-border-neutral);
1948
1950
  --circle-border-width: 1px;
1949
1951
  font-size: var(--circle-font-size);
1950
1952
  font-weight: 600;
@@ -69,3 +69,6 @@
69
69
  height: 16px;
70
70
  height: var(--size-16);
71
71
  }
72
+ .wds-inline-prompt .wds-inline-prompt-process-indicator .process-circle {
73
+ stroke: currentColor;
74
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"InlinePrompt.d.ts","sourceRoot":"","sources":["../../../../src/prompt/InlinePrompt/InlinePrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAQzC,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,SAAS,CAAC,EACN,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,GACpF,aAAa,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,+FAS1B,iBAAiB,gCA4CnB,CAAC"}
1
+ {"version":3,"file":"InlinePrompt.d.ts","sourceRoot":"","sources":["../../../../src/prompt/InlinePrompt/InlinePrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAQzC,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,SAAS,CAAC,EACN,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,GACpF,aAAa,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,+FAS1B,iBAAiB,gCA+CnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-946934e",
3
+ "version": "0.0.0-experimental-2c28aba",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -84,13 +84,13 @@
84
84
  "storybook-addon-tag-badges": "^2.0.2",
85
85
  "storybook-addon-test-codegen": "^2.0.1",
86
86
  "@transferwise/less-config": "3.1.2",
87
- "@transferwise/neptune-css": "0.0.0-experimental-946934e",
87
+ "@transferwise/neptune-css": "0.0.0-experimental-2c28aba",
88
88
  "@wise/components-theming": "1.9.1",
89
89
  "@wise/wds-configs": "0.0.0"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "@transferwise/icons": "^3 || ^4",
93
- "@transferwise/neptune-css": "0.0.0-experimental-946934e",
93
+ "@transferwise/neptune-css": "0.0.0-experimental-2c28aba",
94
94
  "@wise/art": "^2.24.4",
95
95
  "@wise/components-theming": "^1.6.2",
96
96
  "react": ">=18",
@@ -26,7 +26,7 @@
26
26
  }
27
27
  .np-avatar-view .np-avatar-view-content {
28
28
  color: #37517e;
29
- color: var(--color-sentiment-content-primary, var(--color-content-primary));
29
+ color: var(--color-content-primary);
30
30
  }
31
31
  .np-avatar-view-interactive {
32
32
  cursor: pointer;
@@ -38,7 +38,6 @@
38
38
  }
39
39
  .np-avatar-view-non-interactive .np-circle {
40
40
  background-color: transparent;
41
- background-color: var(--color-sentiment-background-surface, transparent);
42
41
  }
43
42
  .np-avatar-view-non-interactive .np-avatar-view-content .wds-flag {
44
43
  box-shadow: none;
@@ -1,8 +1,8 @@
1
- @import "./Dot.less";
1
+ @import './Dot.less';
2
2
 
3
3
  .np-avatar-view {
4
4
  .np-avatar-view-content {
5
- color: var(--color-sentiment-content-primary, var(--color-content-primary));
5
+ color: var(--color-content-primary);
6
6
  }
7
7
 
8
8
  &-interactive {
@@ -15,7 +15,7 @@
15
15
 
16
16
  &-non-interactive {
17
17
  .np-circle {
18
- background-color: var(--color-sentiment-background-surface, transparent);
18
+ background-color: transparent;
19
19
  }
20
20
  .np-avatar-view-content {
21
21
  // dismiss broken shadow on Flag component (DS-6309)
@@ -4,7 +4,7 @@
4
4
  width: var(--circle-size);
5
5
  height: var(--circle-size);
6
6
  flex-shrink: 0;
7
- --circle-border-color: var(--color-sentiment-content-primary, var(--color-border-neutral));
7
+ --circle-border-color: var(--color-border-neutral);
8
8
  --circle-border-width: 1px;
9
9
  font-size: var(--circle-font-size);
10
10
  font-weight: 600;
@@ -4,7 +4,7 @@
4
4
  height: var(--circle-size);
5
5
  flex-shrink: 0;
6
6
 
7
- --circle-border-color: var(--color-sentiment-content-primary, var(--color-border-neutral));
7
+ --circle-border-color: var(--color-border-neutral);
8
8
  --circle-border-width: 1px;
9
9
 
10
10
  // circle like components have custom typography styles for for default (Inter) font
package/src/main.css CHANGED
@@ -931,6 +931,9 @@
931
931
  height: 16px;
932
932
  height: var(--size-16);
933
933
  }
934
+ .wds-inline-prompt .wds-inline-prompt-process-indicator .process-circle {
935
+ stroke: currentColor;
936
+ }
934
937
  .np-dot {
935
938
  --np-dot-size: 14px;
936
939
  position: relative;
@@ -959,7 +962,7 @@
959
962
  }
960
963
  .np-avatar-view .np-avatar-view-content {
961
964
  color: #37517e;
962
- color: var(--color-sentiment-content-primary, var(--color-content-primary));
965
+ color: var(--color-content-primary);
963
966
  }
964
967
  .np-avatar-view-interactive {
965
968
  cursor: pointer;
@@ -971,7 +974,6 @@
971
974
  }
972
975
  .np-avatar-view-non-interactive .np-circle {
973
976
  background-color: transparent;
974
- background-color: var(--color-sentiment-background-surface, transparent);
975
977
  }
976
978
  .np-avatar-view-non-interactive .np-avatar-view-content .wds-flag {
977
979
  box-shadow: none;
@@ -1944,7 +1946,7 @@
1944
1946
  width: var(--circle-size);
1945
1947
  height: var(--circle-size);
1946
1948
  flex-shrink: 0;
1947
- --circle-border-color: var(--color-sentiment-content-primary, var(--color-border-neutral));
1949
+ --circle-border-color: var(--color-border-neutral);
1948
1950
  --circle-border-width: 1px;
1949
1951
  font-size: var(--circle-font-size);
1950
1952
  font-weight: 600;
@@ -69,3 +69,6 @@
69
69
  height: 16px;
70
70
  height: var(--size-16);
71
71
  }
72
+ .wds-inline-prompt .wds-inline-prompt-process-indicator .process-circle {
73
+ stroke: currentColor;
74
+ }
@@ -64,5 +64,11 @@
64
64
  .wds-inline-prompt-process-indicator {
65
65
  width: var(--size-16);
66
66
  height: var(--size-16);
67
+
68
+ // This belongs in ProcessIndicator but there are many conflicting
69
+ // styles in the CSS package, so keeping it colocated for now.
70
+ .process-circle {
71
+ stroke: currentColor;
72
+ };
67
73
  }
68
74
  }
@@ -1,10 +1,11 @@
1
- import React from 'react';
2
1
  import { mockMatchMedia, render, screen } from '../../test-utils';
3
2
  import { InlinePrompt, InlinePromptProps } from './InlinePrompt';
4
3
  import { Sentiment } from '../../common';
5
4
 
6
5
  mockMatchMedia();
7
6
 
7
+ const MEDIA = <span data-testid="custom-media">Custom Media</span>;
8
+
8
9
  describe('InlinePrompt', () => {
9
10
  const defaultProps: InlinePromptProps = {
10
11
  children: 'Prompt message',
@@ -21,39 +22,75 @@ describe('InlinePrompt', () => {
21
22
  expect(screen.getByTestId('gift-box-icon')).toBeInTheDocument();
22
23
  });
23
24
 
24
- describe('renders with each sentiment', () => {
25
- it.each([Sentiment.POSITIVE, Sentiment.NEUTRAL, Sentiment.NEGATIVE, Sentiment.WARNING])(
26
- 'renders with sentiment %s',
27
- (sentiment) => {
28
- render(
29
- <InlinePrompt
30
- {...defaultProps}
31
- sentiment={sentiment as InlinePromptProps['sentiment']}
32
- />,
33
- );
25
+ [
26
+ { sentiment: Sentiment.NEGATIVE as const, acceptsMedia: false, statusIconLabel: 'Error:' },
27
+ { sentiment: Sentiment.WARNING as const, acceptsMedia: false, statusIconLabel: 'Warning:' },
28
+ { sentiment: Sentiment.NEUTRAL as const, acceptsMedia: false, statusIconLabel: 'Information:' },
29
+ { sentiment: Sentiment.POSITIVE as const, acceptsMedia: true, statusIconLabel: '' },
30
+ { sentiment: 'proposition' as const, acceptsMedia: true, statusIconLabel: '' },
31
+ ].forEach(({ sentiment, statusIconLabel, acceptsMedia }) => {
32
+ describe(sentiment, () => {
33
+ it('should apply correct styles', () => {
34
+ render(<InlinePrompt {...defaultProps} sentiment={sentiment} />);
34
35
  expect(screen.getByText('Prompt message').parentElement).toHaveClass(
35
36
  `wds-inline-prompt--${sentiment}`,
36
37
  );
37
- },
38
- );
39
- });
38
+ });
40
39
 
41
- it('renders muted state', () => {
42
- render(<InlinePrompt {...defaultProps} muted />);
43
- screen.debug(undefined, 99999999);
44
- expect(screen.getByText('Prompt message').parentElement).toHaveClass(
45
- 'wds-inline-prompt--muted',
46
- );
47
- expect(screen.getByTestId('InlinePrompt_Muted')).toBeInTheDocument();
48
- });
40
+ if (statusIconLabel) {
41
+ it('should render StatusIcon', () => {
42
+ render(<InlinePrompt {...defaultProps} sentiment={sentiment} />);
43
+ expect(screen.getByLabelText(statusIconLabel)).toBeInTheDocument();
44
+ });
45
+ }
49
46
 
50
- it('renders loading state', () => {
51
- render(<InlinePrompt {...defaultProps} loading />);
52
- screen.debug(undefined, 99999999);
53
- expect(screen.getByText('Prompt message').parentElement).toHaveClass(
54
- 'wds-inline-prompt--loading',
55
- );
56
- expect(screen.getByTestId('InlinePrompt_ProcessIndicator')).toBeInTheDocument();
47
+ describe('muted state', () => {
48
+ it('should render icon and apply css', () => {
49
+ render(<InlinePrompt {...defaultProps} muted sentiment={sentiment} />);
50
+ expect(screen.getByText('Prompt message').parentElement).toHaveClass(
51
+ 'wds-inline-prompt--muted',
52
+ );
53
+ expect(screen.getByTestId('InlinePrompt_Muted')).toBeInTheDocument();
54
+ });
55
+
56
+ it('should trump `media`', () => {
57
+ render(<InlinePrompt {...defaultProps} muted sentiment={sentiment} media={MEDIA} />);
58
+ expect(screen.getByTestId('InlinePrompt_Muted')).toBeInTheDocument();
59
+ expect(screen.queryByTestId('custom-media')).not.toBeInTheDocument();
60
+ });
61
+ });
62
+
63
+ describe('loading state', () => {
64
+ it('should render icon and apply css', () => {
65
+ render(<InlinePrompt {...defaultProps} sentiment={sentiment} loading />);
66
+ expect(screen.getByText('Prompt message').parentElement).toHaveClass(
67
+ 'wds-inline-prompt--loading',
68
+ );
69
+ expect(screen.getByTestId('InlinePrompt_ProcessIndicator')).toBeInTheDocument();
70
+ });
71
+
72
+ it('should trump `media`', () => {
73
+ render(<InlinePrompt {...defaultProps} sentiment={sentiment} loading media={MEDIA} />);
74
+ expect(screen.getByTestId('InlinePrompt_ProcessIndicator')).toBeInTheDocument();
75
+ expect(screen.queryByTestId('custom-media')).not.toBeInTheDocument();
76
+ });
77
+ });
78
+
79
+ describe('custom media', () => {
80
+ if (acceptsMedia) {
81
+ it('should respect `media`', () => {
82
+ render(<InlinePrompt {...defaultProps} sentiment={sentiment} media={MEDIA} />);
83
+ expect(screen.getByTestId('custom-media')).toBeInTheDocument();
84
+ });
85
+ } else {
86
+ it('should ignore `media`', () => {
87
+ render(<InlinePrompt {...defaultProps} sentiment={sentiment} media={MEDIA} />);
88
+ expect(screen.getByLabelText(statusIconLabel)).toBeInTheDocument();
89
+ expect(screen.queryByTestId('custom-media')).not.toBeInTheDocument();
90
+ });
91
+ }
92
+ });
93
+ });
57
94
  });
58
95
 
59
96
  it('applies custom className, id, and data-testid', () => {
@@ -51,12 +51,6 @@ export const InlinePrompt = ({
51
51
  const surfaceSentiment = sentiment === Sentiment.POSITIVE ? 'success' : sentiment;
52
52
 
53
53
  const renderMedia = () => {
54
- if (media && ['proposition', 'positive'].includes(sentiment)) {
55
- return media;
56
- }
57
- if (sentiment === 'proposition') {
58
- return <GiftBox />;
59
- }
60
54
  if (muted) {
61
55
  return <BackslashCircle size={16} data-testid="InlinePrompt_Muted" />;
62
56
  }
@@ -69,6 +63,15 @@ export const InlinePrompt = ({
69
63
  />
70
64
  );
71
65
  }
66
+
67
+ if (sentiment === 'positive' && media) {
68
+ return media;
69
+ }
70
+
71
+ if (sentiment === 'proposition') {
72
+ return media || <GiftBox />;
73
+ }
74
+
72
75
  return <StatusIcon size={16} sentiment={sentiment} />;
73
76
  };
74
77
 
@@ -1,5 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { Bank, Defrost } from '@transferwise/icons';
2
+ import { Defrost } from '@transferwise/icons';
3
3
  import Body from '../body';
4
4
  import Button from '../button';
5
5
  import Header from '../header';
@@ -8,8 +8,6 @@ import IconButton from '../iconButton';
8
8
  import StatusIcon from '../statusIcon';
9
9
  import SentimentSurface from './SentimentSurface';
10
10
  import type { Sentiment, Emphasis } from './SentimentSurface.types';
11
- import AvatarView from '../avatarView';
12
- import AvatarLayout from '../avatarLayout';
13
11
 
14
12
  const withComponentGrid = (Story: () => JSX.Element) => (
15
13
  <div
@@ -394,12 +392,6 @@ export const SentimentAwareComponents: Story = {
394
392
  <Button v2 priority="secondary" size="sm">
395
393
  Secondary
396
394
  </Button>
397
- <AvatarView size={32}>
398
- <Bank />
399
- </AvatarView>
400
- <AvatarView size={32} profileName="John Doe" />
401
- <AvatarView size={32} imgSrc="../avatar-rectangle-fox.webp" badge={{ status: 'warning' }} />
402
- <AvatarLayout size={32} avatars={[{ asset: <Bank /> }, { profileName: 'John Doe' }]} />
403
395
  </div>
404
396
  );
405
397
 
@@ -411,18 +403,8 @@ export const SentimentAwareComponents: Story = {
411
403
  <Header level="group" title="Success sentiment surface" />
412
404
  <SentimentSurface sentiment="success">{inner}</SentimentSurface>
413
405
 
414
- <Header level="group" title="Success Elevated sentiment surface" />
415
- <SentimentSurface sentiment="success" emphasis="elevated">
416
- {inner}
417
- </SentimentSurface>
418
-
419
406
  <Header level="group" title="Negative sentiment surface" />
420
407
  <SentimentSurface sentiment="negative">{inner}</SentimentSurface>
421
-
422
- <Header level="group" title="Negative Elevated sentiment surface" />
423
- <SentimentSurface sentiment="negative" emphasis="elevated">
424
- {inner}
425
- </SentimentSurface>
426
408
  </>
427
409
  );
428
410
  },