@transferwise/components 46.105.5 → 46.107.0

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 (100) hide show
  1. package/build/actionOption/ActionOption.js.map +1 -1
  2. package/build/actionOption/ActionOption.mjs.map +1 -1
  3. package/build/checkboxOption/CheckboxOption.js.map +1 -1
  4. package/build/checkboxOption/CheckboxOption.mjs.map +1 -1
  5. package/build/header/Header.js.map +1 -1
  6. package/build/header/Header.mjs.map +1 -1
  7. package/build/inputs/SelectInput.js.map +1 -1
  8. package/build/inputs/SelectInput.mjs.map +1 -1
  9. package/build/legacylistItem/LegacyListItem.js.map +1 -1
  10. package/build/legacylistItem/LegacyListItem.mjs.map +1 -1
  11. package/build/listItem/ListItem.js +8 -8
  12. package/build/listItem/ListItem.js.map +1 -1
  13. package/build/listItem/ListItem.mjs +8 -8
  14. package/build/listItem/ListItem.mjs.map +1 -1
  15. package/build/main.css +28 -7
  16. package/build/navigationOption/NavigationOption.js.map +1 -1
  17. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  18. package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -1
  19. package/build/navigationOptionsList/NavigationOptionsList.mjs.map +1 -1
  20. package/build/radioOption/RadioOption.js.map +1 -1
  21. package/build/radioOption/RadioOption.mjs.map +1 -1
  22. package/build/styles/listItem/ListItem.css +28 -7
  23. package/build/styles/listItem/ListItem.grid.css +11 -3
  24. package/build/styles/listItem/ListItem.vars.css +0 -0
  25. package/build/styles/main.css +28 -7
  26. package/build/summary/Summary.js +8 -0
  27. package/build/summary/Summary.js.map +1 -1
  28. package/build/summary/Summary.mjs +8 -0
  29. package/build/summary/Summary.mjs.map +1 -1
  30. package/build/switchOption/SwitchOption.js +8 -0
  31. package/build/switchOption/SwitchOption.js.map +1 -1
  32. package/build/switchOption/SwitchOption.mjs +8 -0
  33. package/build/switchOption/SwitchOption.mjs.map +1 -1
  34. package/build/types/actionOption/ActionOption.d.ts +8 -0
  35. package/build/types/actionOption/ActionOption.d.ts.map +1 -1
  36. package/build/types/checkboxOption/CheckboxOption.d.ts +8 -0
  37. package/build/types/checkboxOption/CheckboxOption.d.ts.map +1 -1
  38. package/build/types/header/Header.d.ts +2 -2
  39. package/build/types/header/Header.d.ts.map +1 -1
  40. package/build/types/inputs/SelectInput.d.ts +2 -1
  41. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  42. package/build/types/legacylistItem/LegacyListItem.d.ts +8 -0
  43. package/build/types/legacylistItem/LegacyListItem.d.ts.map +1 -1
  44. package/build/types/listItem/ListItem.d.ts.map +1 -1
  45. package/build/types/listItem/_stories/helpers.d.ts +1 -1
  46. package/build/types/listItem/_stories/helpers.d.ts.map +1 -1
  47. package/build/types/listItem/_stories/subcomponents.d.ts +3 -0
  48. package/build/types/listItem/_stories/subcomponents.d.ts.map +1 -1
  49. package/build/types/listItem/_stories/variants/helpers.d.ts.map +1 -1
  50. package/build/types/listItem/constants.d.ts +16 -0
  51. package/build/types/listItem/constants.d.ts.map +1 -0
  52. package/build/types/navigationOption/NavigationOption.d.ts +8 -0
  53. package/build/types/navigationOption/NavigationOption.d.ts.map +1 -1
  54. package/build/types/navigationOptionsList/NavigationOptionsList.d.ts +9 -0
  55. package/build/types/navigationOptionsList/NavigationOptionsList.d.ts.map +1 -1
  56. package/build/types/radioOption/RadioOption.d.ts +8 -0
  57. package/build/types/radioOption/RadioOption.d.ts.map +1 -1
  58. package/build/types/summary/Summary.d.ts +8 -0
  59. package/build/types/summary/Summary.d.ts.map +1 -1
  60. package/build/types/switchOption/SwitchOption.d.ts +8 -0
  61. package/build/types/switchOption/SwitchOption.d.ts.map +1 -1
  62. package/package.json +3 -3
  63. package/src/actionOption/ActionOption.story.tsx +4 -0
  64. package/src/actionOption/ActionOption.tsx +8 -0
  65. package/src/checkboxOption/CheckboxOption.story.tsx +4 -0
  66. package/src/checkboxOption/CheckboxOption.tsx +8 -0
  67. package/src/header/Header.tsx +2 -2
  68. package/src/inputs/SelectInput.tsx +2 -1
  69. package/src/legacylistItem/LegacyListItem.story.tsx +4 -0
  70. package/src/legacylistItem/LegacyListItem.tsx +8 -0
  71. package/src/listItem/ListItem.css +28 -7
  72. package/src/listItem/ListItem.grid.css +11 -3
  73. package/src/listItem/ListItem.grid.less +14 -4
  74. package/src/listItem/ListItem.less +16 -4
  75. package/src/listItem/ListItem.spec.tsx +4 -1
  76. package/src/listItem/ListItem.tsx +9 -9
  77. package/src/listItem/ListItem.vars.css +0 -0
  78. package/src/listItem/ListItem.vars.less +11 -0
  79. package/src/listItem/_stories/ListItem.layout.test.story.tsx +10 -155
  80. package/src/listItem/_stories/ListItem.scenarios.story.tsx +4 -25
  81. package/src/listItem/_stories/ListItem.story.tsx +16 -10
  82. package/src/listItem/_stories/helpers.tsx +22 -6
  83. package/src/listItem/_stories/subcomponents.tsx +14 -2
  84. package/src/listItem/_stories/variants/ListItem.medium.test.story.tsx +1 -1
  85. package/src/listItem/_stories/variants/ListItem.neutral.test.story.tsx +55 -0
  86. package/src/listItem/_stories/variants/ListItem.small.test.story.tsx +1 -1
  87. package/src/listItem/_stories/variants/helpers.tsx +28 -1
  88. package/src/listItem/constants.ts +15 -0
  89. package/src/main.css +28 -7
  90. package/src/navigationOption/NavigationOption.story.tsx +4 -1
  91. package/src/navigationOption/NavigationOption.tsx +8 -0
  92. package/src/navigationOptionsList/NavigationOptionsList.story.tsx +4 -0
  93. package/src/navigationOptionsList/NavigationOptionsList.tsx +9 -0
  94. package/src/radioOption/RadioOption.story.tsx +4 -0
  95. package/src/radioOption/RadioOption.tsx +8 -0
  96. package/src/summary/Summary.story.tsx +4 -0
  97. package/src/summary/Summary.tsx +8 -0
  98. package/src/switchOption/SwitchOption.story.tsx +4 -1
  99. package/src/switchOption/SwitchOption.tsx +8 -0
  100. package/src/table/Table.story.tsx +1 -1
@@ -1,9 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Edit, Briefcase, Plane } from '@transferwise/icons';
3
- import { ListItem } from '../ListItem';
4
3
  import { fn } from 'storybook/test';
5
- import Link from '../../link';
6
4
  import { Flag } from '@wise/art';
5
+ import { lorem20 } from '../../test-utils';
6
+ import Link from '../../link';
7
+ import { ListItem } from '../ListItem';
7
8
 
8
9
  export type SB_ListItem_ControlType =
9
10
  | 'non-interactive'
@@ -30,6 +31,17 @@ export const SB_LIST_ITEM_TEXT = {
30
31
  subtitle: 'And it also has a subtitle',
31
32
  valueTitle: '100 GBP',
32
33
  valueSubtitle: '200 USD',
34
+ longTitle: `This is a long title. ${lorem20}`,
35
+ longSubtitle: `And it also has a long subtitle. ${lorem20}`,
36
+ longValueTitle: (
37
+ <>
38
+ This value title
39
+ <br />
40
+ is made to span
41
+ <br />
42
+ across few lines
43
+ </>
44
+ ),
33
45
  };
34
46
 
35
47
  export const SB_LIST_ITEM_CONTROLS: Record<SB_ListItem_ControlType, ReactNode> = {
@@ -12,7 +12,7 @@ export default {
12
12
  actions: { disable: true },
13
13
  knobs: { disable: true },
14
14
  },
15
- decorators: [withSizedContainer(350)],
15
+ decorators: [withSizedContainer('medium')],
16
16
  } satisfies Meta<ListItemProps>;
17
17
 
18
18
  export const Button = generateVariantsForControl('button');
@@ -0,0 +1,55 @@
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import List from '../../../list';
3
+ import { ListItem, type ListItemProps } from '../../ListItem';
4
+ import {
5
+ SB_LIST_ITEM_ADDITIONAL_INFO as INFO,
6
+ SB_LIST_ITEM_CONTROLS as CONTROLS,
7
+ SB_LIST_ITEM_MEDIA as MEDIA,
8
+ SB_LIST_ITEM_PROMPTS as PROMPT,
9
+ SB_LIST_ITEM_TEXT as TEXT,
10
+ SB_ListItem_ControlType as ControlType,
11
+ } from '../subcomponents';
12
+
13
+ export default {
14
+ component: ListItem,
15
+ title: 'Content/ListItem/tests/variants/surface: neutral',
16
+ tags: ['!autodocs'],
17
+ parameters: {
18
+ controls: { disable: true },
19
+ actions: { disable: true },
20
+ knobs: { disable: true },
21
+ padding: '0',
22
+ },
23
+ decorators: [
24
+ (Story) => (
25
+ <div
26
+ style={{
27
+ backgroundColor: 'var(--color-background-neutral)',
28
+ padding: 80,
29
+ minHeight: '100%',
30
+ }}
31
+ >
32
+ <Story />
33
+ </div>
34
+ ),
35
+ ],
36
+ } satisfies Meta<ListItemProps>;
37
+
38
+ type Story = StoryObj<ListItemProps>;
39
+
40
+ export const OnNeutralBackdrop: Story = {
41
+ render: () => (
42
+ <List>
43
+ <ListItem
44
+ title={TEXT.title}
45
+ subtitle={TEXT.subtitle}
46
+ valueTitle={TEXT.valueTitle}
47
+ valueSubtitle={TEXT.valueSubtitle}
48
+ additionalInfo={INFO.nonInteractive}
49
+ control={CONTROLS.button}
50
+ prompt={PROMPT.nonInteractive}
51
+ media={MEDIA.avatarDouble}
52
+ />
53
+ </List>
54
+ ),
55
+ };
@@ -12,7 +12,7 @@ export default {
12
12
  actions: { disable: true },
13
13
  knobs: { disable: true },
14
14
  },
15
- decorators: [withSizedContainer(275)],
15
+ decorators: [withSizedContainer('small')],
16
16
  } satisfies Meta<ListItemProps>;
17
17
 
18
18
  export const Button = generateVariantsForControl('button');
@@ -14,7 +14,8 @@ import {
14
14
  type Story = StoryObj<ListItemProps>;
15
15
  type VariantPartial = { title: string } & Partial<ListItemProps>;
16
16
 
17
- const { title, subtitle, valueTitle, valueSubtitle } = TEXT;
17
+ const { title, subtitle, valueTitle, valueSubtitle, longTitle, longSubtitle, longValueTitle } =
18
+ TEXT;
18
19
  const prompt = PROMPT.nonInteractive;
19
20
  const media = MEDIA.avatarSingle;
20
21
 
@@ -32,18 +33,36 @@ export const generateVariantsForControl = (
32
33
  const additionalInfo = isInteractive ? INFO.interactive : INFO.nonInteractive;
33
34
  const instances = [
34
35
  { title },
36
+ { title: longTitle },
35
37
  { title, valueTitle },
38
+ { title, valueTitle: longValueTitle },
39
+ { title: longTitle, valueTitle },
36
40
  { title, subtitle },
41
+ { title, subtitle: longSubtitle },
37
42
  { title, additionalInfo },
38
43
  { title, valueTitle, valueSubtitle },
44
+ { title, valueTitle: longValueTitle, valueSubtitle },
39
45
  { title, subtitle, inverted: true },
40
46
  { title, subtitle, valueTitle },
41
47
  { title, subtitle, valueTitle, inverted: true },
42
48
  { title, subtitle, valueTitle, valueSubtitle },
49
+ {
50
+ title: longTitle,
51
+ subtitle: longSubtitle,
52
+ valueTitle,
53
+ valueSubtitle,
54
+ additionalInfo: INFO.nonInteractive,
55
+ },
43
56
  { title, subtitle, valueTitle, valueSubtitle, inverted: true },
44
57
  { media, title },
58
+ { media, title: longTitle },
45
59
  { media, title, valueTitle },
60
+ { media, title: longTitle, valueTitle },
61
+ { media, title: longTitle, valueSubtitle },
62
+ { media, title, valueTitle: longValueTitle },
63
+ { media, title, valueTitle: longValueTitle, valueSubtitle },
46
64
  { media, title, subtitle },
65
+ { media, title: longTitle, subtitle },
47
66
  { media, title, valueTitle, valueSubtitle },
48
67
  { media, title, valueTitle },
49
68
  { media, title, valueSubtitle },
@@ -55,6 +74,14 @@ export const generateVariantsForControl = (
55
74
  isInteractive ? { media, title, subtitle, additionalInfo: INFO.interactive } : null,
56
75
  { media, title, subtitle, additionalInfo, valueTitle },
57
76
  { media, title, subtitle, additionalInfo, valueTitle, valueSubtitle },
77
+ {
78
+ media,
79
+ title: longTitle,
80
+ subtitle: longSubtitle,
81
+ valueTitle,
82
+ valueSubtitle,
83
+ additionalInfo: INFO.nonInteractive,
84
+ },
58
85
  { media, title, subtitle, additionalInfo, valueTitle, valueSubtitle, prompt },
59
86
  {
60
87
  media,
@@ -0,0 +1,15 @@
1
+ /**
2
+ * List item has 3 unique layouts managed through container queries:
3
+ * 1. width <= cq-min
4
+ * 2. cq-min < width <= cq-max
5
+ * 3. width > cq-max
6
+ *
7
+ * ⚠️ NB: These values must be kept in sync with:
8
+ * `packages/components/src/listItem/ListItem.vars.less`
9
+ *
10
+ * @see https://storybook.wise.design/?path=/story/content-listitem--responsiveness
11
+ */
12
+ export const LISTITEM_CQ = {
13
+ MIN: 240,
14
+ MAX: 308,
15
+ } as const;
package/src/main.css CHANGED
@@ -2653,7 +2653,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
2653
2653
  .wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-noInfo-hasPrompt:not(:has(.wds-list-item-subtitle-value, .wds-list-item-subtitle)) .wds-list-item-prompt {
2654
2654
  margin-top: -2px;
2655
2655
  }
2656
- @container (min-width: 375px) {
2656
+ @container (min-width: 309px) {
2657
2657
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
2658
2658
  height: var(--wds-list-item-control-wrapper-height);
2659
2659
  align-content: center;
@@ -2749,7 +2749,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
2749
2749
  grid-template-areas: "body";
2750
2750
  }
2751
2751
  }
2752
- @container (min-width: 297px) and (max-width: 375px) {
2752
+ @container (min-width: 241px) and (max-width: 308px) {
2753
2753
  .wds-list-item-gridWrapper .wds-list-item-media-image {
2754
2754
  -o-object-position: bottom left;
2755
2755
  object-position: bottom left;
@@ -2875,8 +2875,12 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
2875
2875
  grid-template-rows: auto;
2876
2876
  grid-template-areas: "body";
2877
2877
  }
2878
+ .wds-list-item-gridWrapper .wds-list-item-button-control--hasPrompt {
2879
+ margin-top: 4px;
2880
+ margin-top: var(--size-4);
2881
+ }
2878
2882
  }
2879
- @container (max-width: 297px) {
2883
+ @container (max-width: 240px) {
2880
2884
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
2881
2885
  align-content: start;
2882
2886
  }
@@ -3017,6 +3021,10 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3017
3021
  .wds-list-item-gridWrapper .wds-list-item-body .wds-list-item-value {
3018
3022
  text-align: left;
3019
3023
  }
3024
+ .wds-list-item-gridWrapper .wds-list-item-button-control--hasPrompt {
3025
+ margin-top: 4px;
3026
+ margin-top: var(--size-4);
3027
+ }
3020
3028
  }
3021
3029
  .wds-list-item-prompt {
3022
3030
  grid-area: prompt;
@@ -3298,7 +3306,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3298
3306
  }
3299
3307
  .wds-list-item-body {
3300
3308
  grid-area: body;
3301
- align-items: center;
3309
+ align-items: start;
3302
3310
  width: 100%;
3303
3311
  display: grid;
3304
3312
  grid-template-columns: 1fr max-content;
@@ -3309,14 +3317,27 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3309
3317
  gap: var(--size-16);
3310
3318
  word-break: break-word;
3311
3319
  }
3320
+ .wds-list-item-titles,
3321
+ .wds-list-item-value {
3322
+ display: flex;
3323
+ flex-direction: column;
3324
+ justify-content: center;
3325
+ }
3326
+ @container (min-width: 309px) {
3327
+ .wds-list-item-titles,
3328
+ .wds-list-item-value {
3329
+ min-height: 100%;
3330
+ min-height: var(--wds-list-item-value-min-height, 100%);
3331
+ }
3332
+ }
3333
+ .wds-list-item-value {
3334
+ text-align: right;
3335
+ }
3312
3336
  .wds-list-item-title,
3313
3337
  .wds-list-item-title-value {
3314
3338
  color: #37517e;
3315
3339
  color: var(--color-content-primary);
3316
3340
  }
3317
- .wds-list-item-value {
3318
- text-align: right;
3319
- }
3320
3341
  .wds-list-item-body-center {
3321
3342
  display: flex;
3322
3343
  flex-direction: row;
@@ -15,10 +15,13 @@ import { fn } from 'storybook/test';
15
15
 
16
16
  type StoryArgs = NavigationOptionProps & { hasTitleOnly?: boolean };
17
17
 
18
+ /**
19
+ * > ⚠️ This component is **deprecated** and superseded by the [new ListItem component](?path=/docs/content-listitem--docs) with the [ListItem.Navigation control](?path=/docs/content-listitem-listitem-navigation--docs).
20
+ */
18
21
  const meta: Meta<StoryArgs> = {
19
22
  component: NavigationOption,
20
23
  title: 'Option/NavigationOption',
21
- tags: ['autodocs'],
24
+ tags: ['deprecated'],
22
25
  argTypes: {
23
26
  href: { control: 'text' },
24
27
  title: { control: 'text' },
@@ -8,6 +8,14 @@ import { OptionProps, ReferenceType } from '../common/Option/Option';
8
8
 
9
9
  export type NavigationOptionProps = OptionProps;
10
10
 
11
+ /**
12
+ * @deprecated Please use `<ListItem />` instead.
13
+ * @deprecatedSince 46.104.0
14
+ * @see [Source](../listItem/ListItem.tsx)
15
+ * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
16
+ * @see [Design docs](https://wise.design/components/list-item)
17
+ * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
18
+ */
11
19
  const NavigationOption = forwardRef<ReferenceType, NavigationOptionProps>(
12
20
  ({ as: component = 'button', disabled = false, onClick, className, ...rest }, reference) => {
13
21
  if ('href' in rest && rest.href) {
@@ -2,9 +2,13 @@ import NavigationOption from '../navigationOption';
2
2
 
3
3
  import NavigationOptionsList from '.';
4
4
 
5
+ /**
6
+ * > ⚠️ This component is **deprecated** and superseded by the [List](?path=/docs/content-list--docs), [new ListItem component](?path=/docs/content-listitem--docs) with the [ListItem.Navigation control](?path=/docs/content-listitem-listitem-navigation--docs).
7
+ */
5
8
  export default {
6
9
  component: NavigationOptionsList,
7
10
  title: 'Option/NavigationOptionsList',
11
+ tags: ['deprecated'],
8
12
  };
9
13
 
10
14
  export const Basic = () => {
@@ -5,6 +5,15 @@ export interface NavigationOptionListProps {
5
5
  children: React.ReactNode;
6
6
  }
7
7
 
8
+ /**
9
+ * @deprecated Please use `<List />` and `<ListItem />` instead.
10
+ * @deprecatedSince 46.104.0
11
+ * @see [List source](../list/List.tsx)
12
+ * @see [ListItem source](../listItem/ListItem.tsx)
13
+ * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
14
+ * @see [Design docs](https://wise.design/components/list-item)
15
+ * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
16
+ */
8
17
  const NavigationOptionList = ({ children }: NavigationOptionListProps) => {
9
18
  return (
10
19
  <ul className="np-navigation-options-list">
@@ -5,9 +5,13 @@ import { FastFlag as FastFlagIcon } from '@transferwise/icons';
5
5
  import { Header, Nudge, Section, Title, Typography } from '..';
6
6
  import RadioOption, { RadioOptionProps } from './RadioOption';
7
7
 
8
+ /**
9
+ * > ⚠️ This component is **deprecated** and superseded by the [new ListItem component](?path=/docs/content-listitem--docs) with the [ListItem.Radio control](?path=/docs/content-listitem-listitem-radio--docs).
10
+ */
8
11
  export default {
9
12
  component: RadioOption,
10
13
  title: 'Option/RadioOption',
14
+ tags: ['deprecated'],
11
15
  argTypes: {
12
16
  disabled: { control: 'boolean' },
13
17
  secondary: { control: 'text' },
@@ -15,6 +15,14 @@ export interface RadioOptionProps<T extends string | number = string>
15
15
  isContainerAligned?: boolean;
16
16
  }
17
17
 
18
+ /**
19
+ * @deprecated Please use `<ListItem />` instead.
20
+ * @deprecatedSince 46.104.0
21
+ * @see [Source](../listItem/ListItem.tsx)
22
+ * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
23
+ * @see [Design docs](https://wise.design/components/list-item)
24
+ * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
25
+ */
18
26
  function RadioOption<T extends string | number = ''>({
19
27
  'aria-label': ariaLabel,
20
28
  media,
@@ -5,9 +5,13 @@ import { Status } from '../common';
5
5
  import { InfoPresentation } from '../info';
6
6
  import Summary, { type Props as SummaryProps } from './Summary';
7
7
 
8
+ /**
9
+ * > ⚠️ This component is **deprecated** and superseded by the [new ListItem component](?path=/docs/content-listitem--docs).
10
+ */
8
11
  export default {
9
12
  component: Summary,
10
13
  title: 'Content/Summary',
14
+ tags: ['deprecated'],
11
15
  argTypes: {
12
16
  title: { control: 'text' },
13
17
  },
@@ -90,6 +90,14 @@ export interface Props {
90
90
  title: ReactNode;
91
91
  }
92
92
 
93
+ /**
94
+ * @deprecated Please use `<ListItem />` instead.
95
+ * @deprecatedSince 46.104.0
96
+ * @see [Source](../listItem/ListItem.tsx)
97
+ * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
98
+ * @see [Design docs](https://wise.design/components/list-item)
99
+ * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
100
+ */
93
101
  const Summary = ({
94
102
  action,
95
103
  as: Element = 'div',
@@ -6,10 +6,13 @@ import { Nudge, Title, Typography } from '..';
6
6
 
7
7
  import SwitchOption, { type SwitchOptionProps } from './SwitchOption';
8
8
 
9
+ /**
10
+ * > ⚠️ This component is **deprecated** and superseded by the [new ListItem component](?path=/docs/content-listitem--docs) with the [ListItem.Switch control](?path=/docs/content-listitem-listitem-switch--docs).
11
+ */
9
12
  const meta = {
10
13
  component: SwitchOption,
11
14
  title: 'Option/SwitchOption',
12
-
15
+ tags: ['deprecated'],
13
16
  argTypes: {
14
17
  title: { control: 'text' },
15
18
  content: { control: 'text' },
@@ -26,6 +26,14 @@ const stopPropagation = (event?: MouseEvent<HTMLSpanElement>) => {
26
26
  }
27
27
  };
28
28
 
29
+ /**
30
+ * @deprecated Please use `<ListItem />` instead.
31
+ * @deprecatedSince 46.104.0
32
+ * @see [Source](../listItem/ListItem.tsx)
33
+ * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
34
+ * @see [Design docs](https://wise.design/components/list-item)
35
+ * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
36
+ */
29
37
  const SwitchOption = ({
30
38
  checked,
31
39
  complex,
@@ -5,7 +5,7 @@ import { TableRowType, TableRowClickableType } from './TableRow';
5
5
 
6
6
  export default {
7
7
  component: Table,
8
- title: 'Option/Table',
8
+ title: 'Content/Table',
9
9
  } satisfies Meta<typeof Table>;
10
10
 
11
11
  type Story = StoryObj<typeof Table>;