@transferwise/components 0.0.0-experimental-3179be2 → 0.0.0-experimental-279b29c

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-3179be2",
3
+ "version": "0.0.0-experimental-279b29c",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -86,8 +86,8 @@
86
86
  "storybook-addon-tag-badges": "^3.0.4",
87
87
  "storybook-addon-test-codegen": "^3.0.1",
88
88
  "@transferwise/less-config": "3.1.2",
89
- "@transferwise/neptune-css": "14.26.1",
90
89
  "@wise/components-theming": "1.10.1",
90
+ "@transferwise/neptune-css": "14.26.1",
91
91
  "@wise/wds-configs": "0.0.0"
92
92
  },
93
93
  "peerDependencies": {
@@ -303,21 +303,19 @@ export const SentimentAwareness: Story = {
303
303
  render: (args) => (
304
304
  <>
305
305
  {(['success', 'warning', 'negative', 'neutral', 'proposition'] as const).map((sentiment) =>
306
- (['base', 'elevated'] as const).map((emphasis) => (
307
- <SentimentSurface
308
- key={`${sentiment}-${emphasis}`}
309
- sentiment={sentiment}
310
- emphasis={emphasis}
311
- className="p-a-1 d-flex"
312
- style={{ gap: 'var(--size-16)' }}
313
- >
314
- <AvatarLayout avatars={[{ asset: <Freeze /> }, { asset: <Freeze /> }]} />
315
- <AvatarLayout
316
- orientation="diagonal"
317
- avatars={[{ asset: <Freeze /> }, { asset: <Freeze /> }]}
318
- />
319
- </SentimentSurface>
320
- )),
306
+ <SentimentSurface
307
+ key={`${sentiment}-base`}
308
+ sentiment={sentiment}
309
+ emphasis="base"
310
+ className="p-a-1 d-flex"
311
+ style={{ gap: 'var(--size-16)' }}
312
+ >
313
+ <AvatarLayout avatars={[{ asset: <Freeze /> }, { asset: <Freeze /> }]} />
314
+ <AvatarLayout
315
+ orientation="diagonal"
316
+ avatars={[{ asset: <Freeze /> }, { asset: <Freeze /> }]}
317
+ />
318
+ </SentimentSurface>
321
319
  )}
322
320
  </>
323
321
  ),
@@ -442,6 +442,7 @@ export const Profiles: Story = {
442
442
  * [SentimentSurface](?path=/docs/content-sentimentsurface--docs) component.
443
443
  *
444
444
  * Features like `online`, `notification`, `selected`, and `interactive` are not supported.
445
+ * For badge (`<AvatarView badge={}>`) only `flagCode` is supported.
445
446
  * Also `AvatarView` isn't supported on `"elevated"` state of `SentimentSurface`.
446
447
  */
447
448
  export const SentimentAwareness: Story = {
@@ -471,36 +472,10 @@ export const SentimentAwareness: Story = {
471
472
  <AvatarView size={32}>
472
473
  <Flag code="JPY" intrinsicSize={32} />
473
474
  </AvatarView>
474
- {sentiment === 'proposition' ? (
475
- <AvatarView
476
- size={32}
477
- badge={{
478
- asset: (
479
- <div
480
- className="d-flex align-items-center justify-content-center"
481
- style={{
482
- backgroundColor: 'var(--color-sentiment-interactive-primary)',
483
- color: 'var(--color-sentiment-interactive-control)',
484
- width: '100%',
485
- height: '100%',
486
- }}
487
- >
488
- <GiftBox />
489
- </div>
490
- ),
491
- }}
492
- >
493
- <Bank />
494
- </AvatarView>
495
- ) : (
496
- <AvatarView size={32} badge={{ status: sentiment }}>
497
- <Bank />
498
- </AvatarView>
499
- )}
500
- <AvatarView size={32} badge={{ type: 'reference' }}>
475
+ <AvatarView size={32} badge={sentiment === 'proposition' ? undefined : { status: sentiment }}>
501
476
  <Bank />
502
477
  </AvatarView>
503
- <AvatarView size={32} badge={{ type: 'action' }}>
478
+ <AvatarView size={32} badge={{ flagCode: 'eu' }}>
504
479
  <Bank />
505
480
  </AvatarView>
506
481
  </SentimentSurface>