@transferwise/components 46.106.0 → 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 (90) 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/legacylistItem/LegacyListItem.js.map +1 -1
  6. package/build/legacylistItem/LegacyListItem.mjs.map +1 -1
  7. package/build/listItem/ListItem.js +8 -8
  8. package/build/listItem/ListItem.js.map +1 -1
  9. package/build/listItem/ListItem.mjs +8 -8
  10. package/build/listItem/ListItem.mjs.map +1 -1
  11. package/build/main.css +28 -7
  12. package/build/navigationOption/NavigationOption.js.map +1 -1
  13. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  14. package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -1
  15. package/build/navigationOptionsList/NavigationOptionsList.mjs.map +1 -1
  16. package/build/radioOption/RadioOption.js.map +1 -1
  17. package/build/radioOption/RadioOption.mjs.map +1 -1
  18. package/build/styles/listItem/ListItem.css +28 -7
  19. package/build/styles/listItem/ListItem.grid.css +11 -3
  20. package/build/styles/listItem/ListItem.vars.css +0 -0
  21. package/build/styles/main.css +28 -7
  22. package/build/summary/Summary.js +8 -0
  23. package/build/summary/Summary.js.map +1 -1
  24. package/build/summary/Summary.mjs +8 -0
  25. package/build/summary/Summary.mjs.map +1 -1
  26. package/build/switchOption/SwitchOption.js +8 -0
  27. package/build/switchOption/SwitchOption.js.map +1 -1
  28. package/build/switchOption/SwitchOption.mjs +8 -0
  29. package/build/switchOption/SwitchOption.mjs.map +1 -1
  30. package/build/types/actionOption/ActionOption.d.ts +8 -0
  31. package/build/types/actionOption/ActionOption.d.ts.map +1 -1
  32. package/build/types/checkboxOption/CheckboxOption.d.ts +8 -0
  33. package/build/types/checkboxOption/CheckboxOption.d.ts.map +1 -1
  34. package/build/types/legacylistItem/LegacyListItem.d.ts +8 -0
  35. package/build/types/legacylistItem/LegacyListItem.d.ts.map +1 -1
  36. package/build/types/listItem/ListItem.d.ts.map +1 -1
  37. package/build/types/listItem/_stories/helpers.d.ts +1 -1
  38. package/build/types/listItem/_stories/helpers.d.ts.map +1 -1
  39. package/build/types/listItem/_stories/subcomponents.d.ts +3 -0
  40. package/build/types/listItem/_stories/subcomponents.d.ts.map +1 -1
  41. package/build/types/listItem/_stories/variants/helpers.d.ts.map +1 -1
  42. package/build/types/listItem/constants.d.ts +16 -0
  43. package/build/types/listItem/constants.d.ts.map +1 -0
  44. package/build/types/navigationOption/NavigationOption.d.ts +8 -0
  45. package/build/types/navigationOption/NavigationOption.d.ts.map +1 -1
  46. package/build/types/navigationOptionsList/NavigationOptionsList.d.ts +9 -0
  47. package/build/types/navigationOptionsList/NavigationOptionsList.d.ts.map +1 -1
  48. package/build/types/radioOption/RadioOption.d.ts +8 -0
  49. package/build/types/radioOption/RadioOption.d.ts.map +1 -1
  50. package/build/types/summary/Summary.d.ts +8 -0
  51. package/build/types/summary/Summary.d.ts.map +1 -1
  52. package/build/types/switchOption/SwitchOption.d.ts +8 -0
  53. package/build/types/switchOption/SwitchOption.d.ts.map +1 -1
  54. package/package.json +3 -3
  55. package/src/actionOption/ActionOption.story.tsx +4 -0
  56. package/src/actionOption/ActionOption.tsx +8 -0
  57. package/src/checkboxOption/CheckboxOption.story.tsx +4 -0
  58. package/src/checkboxOption/CheckboxOption.tsx +8 -0
  59. package/src/legacylistItem/LegacyListItem.story.tsx +4 -0
  60. package/src/legacylistItem/LegacyListItem.tsx +8 -0
  61. package/src/listItem/ListItem.css +28 -7
  62. package/src/listItem/ListItem.grid.css +11 -3
  63. package/src/listItem/ListItem.grid.less +14 -4
  64. package/src/listItem/ListItem.less +16 -4
  65. package/src/listItem/ListItem.spec.tsx +4 -1
  66. package/src/listItem/ListItem.tsx +9 -9
  67. package/src/listItem/ListItem.vars.css +0 -0
  68. package/src/listItem/ListItem.vars.less +11 -0
  69. package/src/listItem/_stories/ListItem.layout.test.story.tsx +10 -155
  70. package/src/listItem/_stories/ListItem.scenarios.story.tsx +4 -25
  71. package/src/listItem/_stories/ListItem.story.tsx +16 -10
  72. package/src/listItem/_stories/helpers.tsx +22 -6
  73. package/src/listItem/_stories/subcomponents.tsx +14 -2
  74. package/src/listItem/_stories/variants/ListItem.medium.test.story.tsx +1 -1
  75. package/src/listItem/_stories/variants/ListItem.neutral.test.story.tsx +55 -0
  76. package/src/listItem/_stories/variants/ListItem.small.test.story.tsx +1 -1
  77. package/src/listItem/_stories/variants/helpers.tsx +28 -1
  78. package/src/listItem/constants.ts +15 -0
  79. package/src/main.css +28 -7
  80. package/src/navigationOption/NavigationOption.story.tsx +4 -1
  81. package/src/navigationOption/NavigationOption.tsx +8 -0
  82. package/src/navigationOptionsList/NavigationOptionsList.story.tsx +4 -0
  83. package/src/navigationOptionsList/NavigationOptionsList.tsx +9 -0
  84. package/src/radioOption/RadioOption.story.tsx +4 -0
  85. package/src/radioOption/RadioOption.tsx +8 -0
  86. package/src/summary/Summary.story.tsx +4 -0
  87. package/src/summary/Summary.tsx +8 -0
  88. package/src/switchOption/SwitchOption.story.tsx +4 -1
  89. package/src/switchOption/SwitchOption.tsx +8 -0
  90. package/src/table/Table.story.tsx +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationOption.d.ts","sourceRoot":"","sources":["../../../src/navigationOption/NavigationOption.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAEhD,QAAA,MAAM,gBAAgB,uGA2BrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"NavigationOption.d.ts","sourceRoot":"","sources":["../../../src/navigationOption/NavigationOption.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAEhD;;;;;;;GAOG;AACH,QAAA,MAAM,gBAAgB,uGA2BrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -2,6 +2,15 @@ import * as React from 'react';
2
2
  export interface NavigationOptionListProps {
3
3
  children: React.ReactNode;
4
4
  }
5
+ /**
6
+ * @deprecated Please use `<List />` and `<ListItem />` instead.
7
+ * @deprecatedSince 46.104.0
8
+ * @see [List source](../list/List.tsx)
9
+ * @see [ListItem source](../listItem/ListItem.tsx)
10
+ * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
11
+ * @see [Design docs](https://wise.design/components/list-item)
12
+ * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
13
+ */
5
14
  declare const NavigationOptionList: ({ children }: NavigationOptionListProps) => React.JSX.Element;
6
15
  export default NavigationOptionList;
7
16
  //# sourceMappingURL=NavigationOptionsList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationOptionsList.d.ts","sourceRoot":"","sources":["../../../src/navigationOptionsList/NavigationOptionsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,oBAAoB,GAAI,cAAc,yBAAyB,sBAUpE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"NavigationOptionsList.d.ts","sourceRoot":"","sources":["../../../src/navigationOptionsList/NavigationOptionsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,QAAA,MAAM,oBAAoB,GAAI,cAAc,yBAAyB,sBAUpE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -9,6 +9,14 @@ export interface RadioOptionProps<T extends string | number = string> extends Re
9
9
  showMediaAtAllSizes?: boolean;
10
10
  isContainerAligned?: boolean;
11
11
  }
12
+ /**
13
+ * @deprecated Please use `<ListItem />` instead.
14
+ * @deprecatedSince 46.104.0
15
+ * @see [Source](../listItem/ListItem.tsx)
16
+ * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
17
+ * @see [Design docs](https://wise.design/components/list-item)
18
+ * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
19
+ */
12
20
  declare function RadioOption<T extends string | number = ''>({ 'aria-label': ariaLabel, media, title, content, id, name, checked, onChange, complex, disabled, value, showMediaCircle, showMediaAtAllSizes, isContainerAligned, }: RadioOptionProps<T>): import("react").JSX.Element;
13
21
  export default RadioOption;
14
22
  //# sourceMappingURL=RadioOption.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioOption.d.ts","sourceRoot":"","sources":["../../../src/radioOption/RadioOption.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,CAClE,SAAQ,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,UAAU,CAAC,CAAC,EACrE,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,UAAU,CAAC;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CA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AC;CAC9B;AAED;;;;;;;GAOG;AACH,iBAAS,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,EAAE,EAAE,EACnD,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,KAAK,EACL,OAAO,EACP,EAAE,EACF,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAe,EACf,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,EAAE,gBAAgB,CAAC,CAAC,CAAC,+BAyBrB;AAED,eAAe,WAAW,CAAC"}
@@ -51,6 +51,14 @@ export interface Props {
51
51
  */
52
52
  title: ReactNode;
53
53
  }
54
+ /**
55
+ * @deprecated Please use `<ListItem />` instead.
56
+ * @deprecatedSince 46.104.0
57
+ * @see [Source](../listItem/ListItem.tsx)
58
+ * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
59
+ * @see [Design docs](https://wise.design/components/list-item)
60
+ * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
61
+ */
54
62
  declare const Summary: ({ action, as: Element, className, content, description, help, icon, illustration, info, status, title, }: Props) => import("react").JSX.Element;
55
63
  export default Summary;
56
64
  //# sourceMappingURL=Summary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Summary.d.ts","sourceRoot":"","sources":["../../../src/summary/Summary.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AAI7D,OAAO,EAEL,UAAU,EACV,aAAa,EACb,aAAa,EAId,MAAM,WAAW,CAAC;AACnB,OAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAK1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAkB5C,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;OAEG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;I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AW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE;QACL,OAAO,EAAE,SAAS,CAAC;QACnB,KAAK,CAAC,EAAE,SAAS,CAAC;KACnB,CAAC;IACF;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,GAAG,OAAO,CAAC,CAAC;IACxF;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,aAAa,GAAG,UAAU,GAAG,aAAa,CAAC;IACpD;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,OAAO,GAAI,0GAYd,KAAK,gCA4FP,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -12,6 +12,14 @@ export type SwitchOptionProps = {
12
12
  title: React.ReactNode;
13
13
  'aria-label': string;
14
14
  };
15
+ /**
16
+ * @deprecated Please use `<ListItem />` instead.
17
+ * @deprecatedSince 46.104.0
18
+ * @see [Source](../listItem/ListItem.tsx)
19
+ * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
20
+ * @see [Design docs](https://wise.design/components/list-item)
21
+ * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
22
+ */
15
23
  declare const SwitchOption: ({ checked, complex, content, disabled, id, media, onChange, title, showMediaCircle, showMediaAtAllSizes, isContainerAligned, "aria-label": ariaLabel, }: SwitchOptionProps) => import("react").JSX.Element;
16
24
  export default SwitchOption;
17
25
  //# sourceMappingURL=SwitchOption.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchOption.d.ts","sourceRoot":"","sources":["../../../src/switchOption/SwitchOption.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,iBAAiB,GAAG;IA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;GAOG;AACH,QAAA,MAAM,YAAY,GAAI,yJAanB,iBAAiB,gCAoCnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "46.106.0",
3
+ "version": "46.107.0",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -84,9 +84,9 @@
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": "14.24.5",
88
87
  "@wise/components-theming": "1.6.4",
89
- "@wise/wds-configs": "0.0.0"
88
+ "@wise/wds-configs": "0.0.0",
89
+ "@transferwise/neptune-css": "14.24.5"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "@transferwise/icons": "^3.22.4",
@@ -6,6 +6,9 @@ import { Nudge, Title, Typography } from '..';
6
6
 
7
7
  import ActionOption from './ActionOption';
8
8
 
9
+ /**
10
+ * > ⚠️ This component is **deprecated** and superseded by the [new ListItem component](?path=/docs/content-listitem--docs) with the [ListItem.Button control](?path=/docs/content-listitem-listitem-button--docs).
11
+ */
9
12
  export default {
10
13
  component: ActionOption,
11
14
  title: 'Option/ActionOption',
@@ -18,6 +21,7 @@ export default {
18
21
  additionalContent:
19
22
  'Additional content goes here, this content does not align with the logo and button',
20
23
  },
24
+ tags: ['deprecated'],
21
25
  } satisfies Meta<typeof ActionOption>;
22
26
 
23
27
  type Story = StoryObj<typeof ActionOption>;
@@ -35,6 +35,14 @@ export type ActionOptionProps = {
35
35
  } & CommonProps &
36
36
  AriaLabelProperty;
37
37
 
38
+ /**
39
+ * @deprecated Please use `<ListItem />` instead.
40
+ * @deprecatedSince 46.104.0
41
+ * @see [Source](../listItem/ListItem.tsx)
42
+ * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
43
+ * @see [Design docs](https://wise.design/components/list-item)
44
+ * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
45
+ */
38
46
  const ActionOption = ({
39
47
  action,
40
48
  priority = Priority.PRIMARY,
@@ -5,6 +5,9 @@ import { FastFlag } from '@transferwise/icons';
5
5
  import { Nudge, Title, Typography } from '..';
6
6
  import CheckboxOption, { type CheckboxOptionProps } from './CheckboxOption';
7
7
 
8
+ /**
9
+ * > ⚠️ This component is **deprecated** and superseded by the [new ListItem component](?path=/docs/content-listitem--docs) with the [ListItem.Checkbox control](?path=/docs/content-listitem-listitem-checkbox--docs).
10
+ */
8
11
  const meta: Meta<typeof CheckboxOption> = {
9
12
  component: CheckboxOption,
10
13
  title: 'Option/CheckboxOption',
@@ -13,6 +16,7 @@ const meta: Meta<typeof CheckboxOption> = {
13
16
  source: { type: 'dynamic' },
14
17
  },
15
18
  },
19
+ tags: ['deprecated'],
16
20
  };
17
21
 
18
22
  export default meta;
@@ -15,6 +15,14 @@ export type CheckboxOptionProps = Omit<BaseOptionProps, 'onChange'> & {
15
15
  onChange?: (value: boolean) => void;
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
  const CheckboxOption = forwardRef<ReferenceType, CheckboxOptionProps>(
19
27
  ({ checked, disabled, onChange, ...rest }, reference) => {
20
28
  return (
@@ -8,9 +8,13 @@ import Info from '../info';
8
8
  import Title from '../title/Title';
9
9
  import LegacyListItem from '.';
10
10
 
11
+ /**
12
+ * > ⚠️ This component is **deprecated** and superseded by the [new ListItem component](?path=/docs/content-listitem--docs).
13
+ */
11
14
  export default {
12
15
  component: LegacyListItem,
13
16
  title: 'Content/LegacyListItem',
17
+ tags: ['deprecated'],
14
18
  };
15
19
 
16
20
  const Template = ({
@@ -13,6 +13,14 @@ export type LegacyListItemProps = {
13
13
  as?: ElementType;
14
14
  };
15
15
 
16
+ /**
17
+ * @deprecated Please use `<ListItem />` instead.
18
+ * @deprecatedSince 46.104.0
19
+ * @see [Source](../listItem/ListItem.tsx)
20
+ * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
21
+ * @see [Design docs](https://wise.design/components/list-item)
22
+ * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
23
+ */
16
24
  const LegacyListItem: FC<LegacyListItemProps> = ({
17
25
  media,
18
26
  action,
@@ -9,7 +9,7 @@
9
9
  .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 {
10
10
  margin-top: -2px;
11
11
  }
12
- @container (min-width: 375px) {
12
+ @container (min-width: 309px) {
13
13
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
14
14
  height: var(--wds-list-item-control-wrapper-height);
15
15
  align-content: center;
@@ -105,7 +105,7 @@
105
105
  grid-template-areas: "body";
106
106
  }
107
107
  }
108
- @container (min-width: 297px) and (max-width: 375px) {
108
+ @container (min-width: 241px) and (max-width: 308px) {
109
109
  .wds-list-item-gridWrapper .wds-list-item-media-image {
110
110
  -o-object-position: bottom left;
111
111
  object-position: bottom left;
@@ -231,8 +231,12 @@
231
231
  grid-template-rows: auto;
232
232
  grid-template-areas: "body";
233
233
  }
234
+ .wds-list-item-gridWrapper .wds-list-item-button-control--hasPrompt {
235
+ margin-top: 4px;
236
+ margin-top: var(--size-4);
237
+ }
234
238
  }
235
- @container (max-width: 297px) {
239
+ @container (max-width: 240px) {
236
240
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
237
241
  align-content: start;
238
242
  }
@@ -373,6 +377,10 @@
373
377
  .wds-list-item-gridWrapper .wds-list-item-body .wds-list-item-value {
374
378
  text-align: left;
375
379
  }
380
+ .wds-list-item-gridWrapper .wds-list-item-button-control--hasPrompt {
381
+ margin-top: 4px;
382
+ margin-top: var(--size-4);
383
+ }
376
384
  }
377
385
  .wds-list-item-prompt {
378
386
  grid-area: prompt;
@@ -654,7 +662,7 @@
654
662
  }
655
663
  .wds-list-item-body {
656
664
  grid-area: body;
657
- align-items: center;
665
+ align-items: start;
658
666
  width: 100%;
659
667
  display: grid;
660
668
  grid-template-columns: 1fr max-content;
@@ -665,14 +673,27 @@
665
673
  gap: var(--size-16);
666
674
  word-break: break-word;
667
675
  }
676
+ .wds-list-item-titles,
677
+ .wds-list-item-value {
678
+ display: flex;
679
+ flex-direction: column;
680
+ justify-content: center;
681
+ }
682
+ @container (min-width: 309px) {
683
+ .wds-list-item-titles,
684
+ .wds-list-item-value {
685
+ min-height: 100%;
686
+ min-height: var(--wds-list-item-value-min-height, 100%);
687
+ }
688
+ }
689
+ .wds-list-item-value {
690
+ text-align: right;
691
+ }
668
692
  .wds-list-item-title,
669
693
  .wds-list-item-title-value {
670
694
  color: #37517e;
671
695
  color: var(--color-content-primary);
672
696
  }
673
- .wds-list-item-value {
674
- text-align: right;
675
- }
676
697
  .wds-list-item-body-center {
677
698
  display: flex;
678
699
  flex-direction: row;
@@ -9,7 +9,7 @@
9
9
  .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 {
10
10
  margin-top: -2px;
11
11
  }
12
- @container (min-width: 375px) {
12
+ @container (min-width: 309px) {
13
13
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
14
14
  height: var(--wds-list-item-control-wrapper-height);
15
15
  align-content: center;
@@ -105,7 +105,7 @@
105
105
  grid-template-areas: "body";
106
106
  }
107
107
  }
108
- @container (min-width: 297px) and (max-width: 375px) {
108
+ @container (min-width: 241px) and (max-width: 308px) {
109
109
  .wds-list-item-gridWrapper .wds-list-item-media-image {
110
110
  -o-object-position: bottom left;
111
111
  object-position: bottom left;
@@ -231,8 +231,12 @@
231
231
  grid-template-rows: auto;
232
232
  grid-template-areas: "body";
233
233
  }
234
+ .wds-list-item-gridWrapper .wds-list-item-button-control--hasPrompt {
235
+ margin-top: 4px;
236
+ margin-top: var(--size-4);
237
+ }
234
238
  }
235
- @container (max-width: 297px) {
239
+ @container (max-width: 240px) {
236
240
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
237
241
  align-content: start;
238
242
  }
@@ -373,4 +377,8 @@
373
377
  .wds-list-item-gridWrapper .wds-list-item-body .wds-list-item-value {
374
378
  text-align: left;
375
379
  }
380
+ .wds-list-item-gridWrapper .wds-list-item-button-control--hasPrompt {
381
+ margin-top: 4px;
382
+ margin-top: var(--size-4);
383
+ }
376
384
  }
@@ -1,3 +1,5 @@
1
+ @import (reference) "./ListItem.vars.less";
2
+
1
3
  .wds-list-item {
2
4
  &-gridWrapper {
3
5
  display: grid;
@@ -10,9 +12,9 @@
10
12
  margin-top: -2px;
11
13
  }
12
14
  }
13
- }
15
+ }
14
16
 
15
- @container (min-width: 375px) {
17
+ @container (min-width: unit(@wds-list-item-cq-max + 1, px)) {
16
18
  .wds-list-item-control-wrapper {
17
19
  height: var(--wds-list-item-control-wrapper-height);
18
20
  align-content: center;
@@ -167,7 +169,7 @@
167
169
  }
168
170
  }
169
171
 
170
- @container (min-width: 297px) and (max-width: 375px) {
172
+ @container (min-width: unit(@wds-list-item-cq-min + 1, px)) and (max-width: unit(@wds-list-item-cq-max, px)) {
171
173
  .wds-list-item-media-image{
172
174
  object-position: bottom left;
173
175
  }
@@ -396,9 +398,13 @@
396
398
  "body"
397
399
  }
398
400
  }
401
+
402
+ .wds-list-item-button-control--hasPrompt{
403
+ margin-top: var(--size-4);
404
+ }
399
405
  }
400
406
 
401
- @container (max-width: 297px) {
407
+ @container (max-width: unit(@wds-list-item-cq-min, px)) {
402
408
  .wds-list-item-control-wrapper {
403
409
  align-content: start;
404
410
  }
@@ -631,6 +637,10 @@
631
637
  text-align: left;
632
638
  }
633
639
  }
640
+
641
+ .wds-list-item-button-control--hasPrompt{
642
+ margin-top: var(--size-4);
643
+ }
634
644
  }
635
645
  }
636
646
  }
@@ -1,6 +1,7 @@
1
1
  @import "./ListItem.grid.less";
2
2
  @import "./Prompt/ListItemPrompt.less";
3
3
  @import (reference) "../../node_modules/@transferwise/neptune-css/src/less/ring.less";
4
+ @import (reference) "./ListItem.vars.less";
4
5
 
5
6
  .wds-list-item {
6
7
  list-style: none;
@@ -164,7 +165,7 @@
164
165
 
165
166
  &-body {
166
167
  grid-area: body;
167
- align-items: center;
168
+ align-items: start;
168
169
  width: 100%;
169
170
  display: grid;
170
171
  grid-template-columns: var(--wds-list-item-body-left, 1fr) var(--wds-list-item-body-right, max-content);
@@ -172,14 +173,25 @@
172
173
  word-break: break-word;
173
174
  }
174
175
 
175
- &-title, &-title-value {
176
- color: var(--color-content-primary);
176
+ &-titles,
177
+ &-value{
178
+ display: flex;
179
+ flex-direction: column;
180
+ justify-content: center;
181
+
182
+ @container (min-width: unit(@wds-list-item-cq-max + 1, px)) {
183
+ min-height: var(--wds-list-item-value-min-height, 100%);
184
+ }
177
185
  }
178
186
 
179
187
  &-value {
180
188
  text-align: right;
181
189
  }
182
190
 
191
+ &-title, &-title-value {
192
+ color: var(--color-content-primary);
193
+ }
194
+
183
195
  &-body-center {
184
196
  display: flex;
185
197
  flex-direction: row;
@@ -252,7 +264,7 @@
252
264
  }
253
265
  }
254
266
 
255
-
267
+
256
268
  }
257
269
 
258
270
  .wds-list-item-spotlight__border{
@@ -1484,6 +1484,7 @@ describe('ListItem', () => {
1484
1484
  const listItem = screen.getByRole('listitem');
1485
1485
  expect(listItem).toHaveClass('wds-list-item-interactive');
1486
1486
  expect(listItem).toHaveClass('wds-list-item-spotlight-active');
1487
+ expect(listItem.querySelector('.wds-list-item-spotlight__border')).not.toBeInTheDocument();
1487
1488
  });
1488
1489
 
1489
1490
  it('only fully interactive variant can have spotlight:inactive', () => {
@@ -1497,15 +1498,17 @@ describe('ListItem', () => {
1497
1498
  const listItem = screen.getByRole('listitem');
1498
1499
  expect(listItem).toHaveClass('wds-list-item-interactive');
1499
1500
  expect(listItem).toHaveClass('wds-list-item-spotlight-inactive');
1501
+ expect(listItem.querySelector('.wds-list-item-spotlight__border')).toBeInTheDocument();
1500
1502
  });
1501
1503
 
1502
- it('non interactive variant can have spotlight', () => {
1504
+ it('non interactive variant cannot have spotlight', () => {
1503
1505
  render(<ListItem title="Test Title" spotlight="inactive" />);
1504
1506
  const listItem = screen.getByRole('listitem');
1505
1507
  expect(listItem).toHaveClass('wds-list-item-non-interactive');
1506
1508
  expect(listItem).not.toHaveClass('wds-list-item-interactive');
1507
1509
  expect(listItem).not.toHaveClass('wds-list-item-spotlight-inactive');
1508
1510
  expect(listItem).not.toHaveClass('wds-list-item-spotlight-active');
1511
+ expect(listItem.querySelector('.wds-list-item-spotlight__border')).not.toBeInTheDocument();
1509
1512
  });
1510
1513
  });
1511
1514
  });
@@ -229,8 +229,13 @@ export const ListItem = ({
229
229
  )}
230
230
  id={id}
231
231
  aria-disabled={disabled}
232
+ style={
233
+ {
234
+ '--wds-list-item-value-min-height': mediaSize ? `${mediaSize}px` : undefined,
235
+ } as React.CSSProperties
236
+ }
232
237
  >
233
- {spotlight === 'inactive' && (
238
+ {isFullyInteractive && spotlight === 'inactive' && (
234
239
  <svg aria-hidden="true" className="wds-list-item-spotlight__border">
235
240
  <rect />
236
241
  </svg>
@@ -256,11 +261,7 @@ export const ListItem = ({
256
261
  style={valueColumnWidth ? gridColumnsStyle : undefined}
257
262
  >
258
263
  {/* Title + Subtitle + Values - Group */}
259
- <span
260
- className={clsx({
261
- 'wds-list-item-body-center': title && !subtitle,
262
- })}
263
- >
264
+ <span className="wds-list-item-titles">
264
265
  {(() => {
265
266
  const titles = [
266
267
  <Body
@@ -287,8 +288,6 @@ export const ListItem = ({
287
288
  <span
288
289
  className={clsx('wds-list-item-value', {
289
290
  'flex-column': valueTitle !== undefined || valueSubtitle !== undefined,
290
- 'wds-list-item-body-center':
291
- (valueTitle && !valueSubtitle) || (!valueTitle && valueSubtitle),
292
291
  })}
293
292
  >
294
293
  {(() => {
@@ -326,6 +325,8 @@ export const ListItem = ({
326
325
  <Body
327
326
  className={clsx('wds-list-item-control-wrapper', {
328
327
  'wds-list-item-button-control': controlType === 'button',
328
+ 'wds-list-item-button-control--hasPrompt':
329
+ controlType === 'button' && Boolean(prompt),
329
330
  })}
330
331
  style={
331
332
  {
@@ -351,7 +352,6 @@ type ViewProps = PropsWithChildren<{
351
352
 
352
353
  function View({
353
354
  children,
354
- subtitle,
355
355
  additionalInfo,
356
356
  prompt,
357
357
  disabled,
File without changes
@@ -0,0 +1,11 @@
1
+ // List item has 3 unique layouts managed through container queries:
2
+ // * width <= cq-min
3
+ // * cq-min < width <= cq-max
4
+ // * width > cq-max
5
+ //
6
+ // ⚠️ These values must be kept in sync with:
7
+ // `packages/components/src/listItem/constants.ts`
8
+ //
9
+ // @see https://storybook.wise.design/?path=/story/content-listitem--responsiveness
10
+ @wds-list-item-cq-min: 240;
11
+ @wds-list-item-cq-max: 308;