@transferwise/components 46.132.1 → 46.133.1

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/chips/Chips.js.map +1 -1
  2. package/build/chips/Chips.mjs.map +1 -1
  3. package/build/inputs/InputGroup.js +10 -1
  4. package/build/inputs/InputGroup.js.map +1 -1
  5. package/build/inputs/InputGroup.mjs +10 -1
  6. package/build/inputs/InputGroup.mjs.map +1 -1
  7. package/build/label/Label.js +1 -1
  8. package/build/label/Label.js.map +1 -1
  9. package/build/label/Label.mjs +1 -1
  10. package/build/label/Label.mjs.map +1 -1
  11. package/build/logo/Logo.js +6 -0
  12. package/build/logo/Logo.js.map +1 -1
  13. package/build/logo/Logo.mjs +6 -0
  14. package/build/logo/Logo.mjs.map +1 -1
  15. package/build/main.css +22 -6
  16. package/build/phoneNumberInput/PhoneNumberInput.js +6 -1
  17. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  18. package/build/phoneNumberInput/PhoneNumberInput.mjs +6 -1
  19. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  20. package/build/styles/inputs/InputGroup.css +10 -2
  21. package/build/styles/listItem/ListItem.css +4 -4
  22. package/build/styles/listItem/ListItem.grid.css +3 -3
  23. package/build/styles/main.css +22 -6
  24. package/build/styles/phoneNumberInput/PhoneNumberInput.css +5 -0
  25. package/build/types/chips/Chips.d.ts +1 -1
  26. package/build/types/chips/Chips.d.ts.map +1 -1
  27. package/build/types/common/commonProps.d.ts +0 -6
  28. package/build/types/common/commonProps.d.ts.map +1 -1
  29. package/build/types/label/Label.d.ts.map +1 -1
  30. package/build/types/logo/Logo.d.ts +10 -1
  31. package/build/types/logo/Logo.d.ts.map +1 -1
  32. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
  33. package/package.json +19 -19
  34. package/src/button/_stories/Button.accessibility.docs.mdx +10 -6
  35. package/src/button/_stories/Button.story.tsx +15 -7
  36. package/src/checkboxButton/CheckboxButton.story.tsx +125 -44
  37. package/src/checkboxButton/CheckboxButton.test.story.tsx +236 -0
  38. package/src/chips/Chips.story.tsx +141 -102
  39. package/src/chips/Chips.test.story.tsx +177 -0
  40. package/src/chips/Chips.tsx +1 -1
  41. package/src/circularButton/CircularButton.story.tsx +261 -49
  42. package/src/circularButton/CircularButton.test.story.tsx +192 -2
  43. package/src/common/bottomSheet/BottomSheet.story.tsx +11 -9
  44. package/src/common/bottomSheet/BottomSheet.test.story.tsx +28 -15
  45. package/src/common/commonProps.ts +0 -6
  46. package/src/divider/Divider.accessibility.docs.mdx +1 -10
  47. package/src/divider/Divider.story.tsx +0 -1
  48. package/src/expressiveMoneyInput/ExpressiveMoneyInput.story.tsx +1 -2
  49. package/src/header/Header.accessibility.docs.mdx +9 -5
  50. package/src/iconButton/IconButton.story.tsx +315 -110
  51. package/src/iconButton/IconButton.test.story.tsx +217 -44
  52. package/src/inputs/InputGroup.css +10 -2
  53. package/src/inputs/InputGroup.less +12 -2
  54. package/src/inputs/InputGroup.story.tsx +27 -0
  55. package/src/inputs/InputGroup.tsx +10 -0
  56. package/src/inputs/SelectInput/_stories/SelectInput.story.tsx +0 -1
  57. package/src/label/Label.tsx +1 -2
  58. package/src/legacylistItem/LegacyListItem.test.story.tsx +1 -1
  59. package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.story.tsx +0 -1
  60. package/src/listItem/AvatarLayout/ListItemAvatarLayout.story.tsx +0 -1
  61. package/src/listItem/AvatarView/ListItemAvatarView.story.tsx +0 -1
  62. package/src/listItem/Button/ListItemButton.story.tsx +0 -1
  63. package/src/listItem/Checkbox/ListItemCheckbox.story.tsx +0 -1
  64. package/src/listItem/IconButton/ListItemIconButton.story.tsx +0 -1
  65. package/src/listItem/ListItem.css +4 -4
  66. package/src/listItem/ListItem.grid.css +3 -3
  67. package/src/listItem/ListItem.grid.less +5 -3
  68. package/src/listItem/ListItem.less +1 -1
  69. package/src/listItem/ListItem.vars.less +2 -2
  70. package/src/listItem/Navigation/ListItemNavigation.story.tsx +0 -1
  71. package/src/listItem/Prompt/ListItemPrompt.story.tsx +0 -1
  72. package/src/listItem/Radio/ListItemRadio.story.tsx +0 -1
  73. package/src/listItem/Switch/ListItemSwitch.story.tsx +0 -1
  74. package/src/listItem/_stories/ListItem.layout.test.story.tsx +55 -0
  75. package/src/listItem/_stories/ListItem.story.tsx +1 -0
  76. package/src/logo/Logo.story.tsx +181 -21
  77. package/src/logo/Logo.test.story.tsx +40 -7
  78. package/src/logo/Logo.tsx +10 -1
  79. package/src/main.css +22 -6
  80. package/src/phoneNumberInput/PhoneNumberInput.css +5 -0
  81. package/src/phoneNumberInput/PhoneNumberInput.less +7 -0
  82. package/src/phoneNumberInput/PhoneNumberInput.tsx +10 -1
  83. package/src/prompt/InlinePrompt/InlinePrompt.story.tsx +0 -1
  84. package/src/section/Section.story.tsx +12 -7
  85. package/src/sentimentSurface/SentimentSurface.story.tsx +1 -1
  86. package/src/snackbar/Snackbar.test.story.tsx +16 -104
  87. package/src/summary/Summary.test.story.tsx +1 -1
  88. package/src/switch/Switch.story.tsx +64 -42
  89. package/src/switch/Switch.test.story.tsx +123 -0
  90. package/src/switchOption/SwitchOption.story.tsx +0 -1
@@ -1,9 +1,25 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { Menu, Plus, Settings, Star, Travel } from '@transferwise/icons';
3
- import { action } from 'storybook/actions';
2
+ import {
3
+ Menu,
4
+ Plus,
5
+ Settings,
6
+ Star,
7
+ Travel,
8
+ Cross,
9
+ Edit,
10
+ Briefcase,
11
+ Bank,
12
+ Freeze,
13
+ } from '@transferwise/icons';
14
+ import { expect, fn, userEvent, within } from 'storybook/test';
4
15
  import IconButton from './IconButton';
16
+ import { withVariantConfig } from '../../.storybook/helpers';
5
17
  import SentimentSurface from '../sentimentSurface';
6
- import { allModes } from '../../.storybook/modes';
18
+
19
+ const wait = async (ms: number) =>
20
+ new Promise<void>((resolve) => {
21
+ setTimeout(resolve, ms);
22
+ });
7
23
 
8
24
  export default {
9
25
  title: 'Actions/IconButton/Tests',
@@ -16,11 +32,19 @@ type Story = StoryObj<typeof IconButton>;
16
32
  /**
17
33
  * IconButton displayed across all themes and sentiments for visual regression testing.
18
34
  */
19
- export const AllThemesAndSentiments: Story = {
35
+ export const Variants: Story = {
20
36
  render: () => {
21
- const priorities = ['primary', 'secondary', 'tertiary', 'minimal', 'disabled'] as const;
22
- const sentiments = ['negative', 'warning', 'neutral', 'success', 'proposition'] as const;
23
- const icons = [Plus, Settings, Star, Travel];
37
+ const size = 32;
38
+ const priorities = [
39
+ { key: 'primary', label: 'primary' },
40
+ { key: 'secondary', label: 'secondary' },
41
+ { key: 'tertiary', label: 'tertiary' },
42
+ { key: 'minimal', label: 'minimal' },
43
+ { key: 'neg-primary', label: 'negative\nprimary' },
44
+ { key: 'neg-secondary', label: 'negative\nsecondary' },
45
+ { key: 'disabled', label: 'disabled' },
46
+ ] as const;
47
+ const sentiments = ['success', 'warning', 'negative', 'neutral', 'proposition'] as const;
24
48
 
25
49
  return (
26
50
  <div style={{ display: 'flex', flexDirection: 'column' }}>
@@ -29,21 +53,23 @@ export const AllThemesAndSentiments: Story = {
29
53
  <div style={{ width: '82px', paddingLeft: '8px' }} />
30
54
  {priorities.map((priority) => (
31
55
  <div
32
- key={priority}
56
+ key={priority.key}
33
57
  style={{
34
- width: '32px',
58
+ width: `${size}px`,
35
59
  textAlign: 'center',
36
60
  fontSize: '11px',
37
61
  fontWeight: 'bold',
38
62
  writingMode: 'vertical-rl',
39
63
  transform: 'rotate(180deg)',
40
- height: '60px',
64
+ height: '80px',
41
65
  display: 'flex',
42
66
  alignItems: 'center',
43
67
  justifyContent: 'center',
68
+ whiteSpace: 'pre',
69
+ lineHeight: '1',
44
70
  }}
45
71
  >
46
- {priority}
72
+ {priority.label}
47
73
  </div>
48
74
  ))}
49
75
  </div>
@@ -68,48 +94,66 @@ export const AllThemesAndSentiments: Story = {
68
94
  {sentiment} (base)
69
95
  </div>
70
96
  <IconButton
71
- size={32}
97
+ size={size}
72
98
  aria-label="Primary action"
73
99
  priority="primary"
74
100
  type="default"
75
- onClick={action('button click')}
101
+ onClick={fn()}
76
102
  >
77
103
  <Plus />
78
104
  </IconButton>
79
105
  <IconButton
80
- size={32}
106
+ size={size}
81
107
  aria-label="Secondary action"
82
108
  priority="secondary"
83
109
  type="default"
84
- onClick={action('button click')}
110
+ onClick={fn()}
85
111
  >
86
112
  <Settings />
87
113
  </IconButton>
88
114
  <IconButton
89
- size={32}
115
+ size={size}
90
116
  aria-label="Tertiary action"
91
117
  priority="tertiary"
92
118
  type="default"
93
- onClick={action('button click')}
119
+ onClick={fn()}
94
120
  >
95
121
  <Star />
96
122
  </IconButton>
97
123
  <IconButton
98
- size={32}
124
+ size={size}
99
125
  aria-label="Minimal action"
100
126
  priority="minimal"
101
127
  type="default"
102
- onClick={action('button click')}
128
+ onClick={fn()}
103
129
  >
104
130
  <Travel />
105
131
  </IconButton>
106
132
  <IconButton
107
- size={32}
133
+ size={size}
134
+ aria-label="Negative primary action"
135
+ priority="primary"
136
+ type="negative"
137
+ onClick={fn()}
138
+ >
139
+ <Cross />
140
+ </IconButton>
141
+ <IconButton
142
+ size={size}
143
+ aria-label="Negative secondary action"
144
+ priority="secondary"
145
+ type="negative"
146
+ onClick={fn()}
147
+ >
148
+ <Edit />
149
+ </IconButton>
150
+ <IconButton
151
+ size={size}
108
152
  aria-label="Disabled action"
109
153
  priority="primary"
110
154
  type="default"
111
155
  disabled
112
- onClick={action('button click')}
156
+ onClick={fn()}
113
157
  >
114
158
  <Menu />
115
159
  </IconButton>
@@ -132,63 +176,192 @@ export const AllThemesAndSentiments: Story = {
132
176
  {sentiment} (elevated)
133
177
  </div>
134
178
  <IconButton
135
- size={32}
179
+ size={size}
136
180
  aria-label="Primary action"
137
181
  priority="primary"
138
182
  type="default"
139
- onClick={action('button click')}
183
+ onClick={fn()}
140
184
  >
141
- <Plus />
185
+ <Briefcase />
142
186
  </IconButton>
143
187
  <IconButton
144
- size={32}
188
+ size={size}
145
189
  aria-label="Secondary action"
146
190
  priority="secondary"
147
191
  type="default"
148
- onClick={action('button click')}
192
+ onClick={fn()}
149
193
  >
150
- <Settings />
194
+ <Bank />
151
195
  </IconButton>
152
196
  <IconButton
153
- size={32}
197
+ size={size}
154
198
  aria-label="Tertiary action"
155
199
  priority="tertiary"
156
200
  type="default"
157
- onClick={action('button click')}
201
+ onClick={fn()}
158
202
  >
159
- <Star />
203
+ <Freeze />
160
204
  </IconButton>
161
205
  <IconButton
162
- size={32}
206
+ size={size}
163
207
  aria-label="Minimal action"
164
208
  priority="minimal"
165
209
  type="default"
166
- onClick={action('button click')}
210
+ onClick={fn()}
167
211
  >
168
- <Travel />
212
+ <Edit />
169
213
  </IconButton>
170
214
  <IconButton
171
- size={32}
215
+ size={size}
216
+ aria-label="Negative primary action"
217
+ priority="primary"
218
+ type="negative"
219
+ onClick={fn()}
220
+ >
221
+ <Cross />
222
+ </IconButton>
223
+ <IconButton
224
+ size={size}
225
+ aria-label="Negative secondary action"
226
+ priority="secondary"
227
+ type="negative"
228
+ onClick={fn()}
229
+ >
230
+ <Edit />
231
+ </IconButton>
232
+ <IconButton
233
+ size={size}
172
234
  aria-label="Disabled action"
173
235
  priority="primary"
174
236
  type="default"
175
237
  disabled
176
- onClick={action('button click')}
238
+ onClick={fn()}
177
239
  >
178
- <Menu />
240
+ <Cross />
179
241
  </IconButton>
180
242
  </SentimentSurface>,
181
243
  ])}
182
244
  </div>
183
245
  );
184
246
  },
185
- parameters: {
186
- padding: '16px',
187
- variants: ['default', 'dark', 'bright-green', 'forest-green'],
188
- chromatic: {
189
- dark: allModes.dark,
190
- brightGreen: allModes.brightGreen,
191
- forestGreen: allModes.forestGreen,
192
- },
247
+ ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green']),
248
+ };
249
+
250
+ /** Tab through each priority variant and activate with Space. */
251
+ export const KeyboardInteraction: Story = {
252
+ render: () => (
253
+ <div style={{ display: 'flex', gap: '12px', padding: '16px' }}>
254
+ <IconButton size={48} aria-label="Primary" priority="primary" type="default" onClick={fn()}>
255
+ <Plus />
256
+ </IconButton>
257
+ <IconButton
258
+ size={48}
259
+ aria-label="Secondary"
260
+ priority="secondary"
261
+ type="default"
262
+ onClick={fn()}
263
+ >
264
+ <Settings />
265
+ </IconButton>
266
+ <IconButton size={48} aria-label="Tertiary" priority="tertiary" type="default" onClick={fn()}>
267
+ <Star />
268
+ </IconButton>
269
+ <IconButton size={48} aria-label="Minimal" priority="minimal" type="default" onClick={fn()}>
270
+ <Travel />
271
+ </IconButton>
272
+ <IconButton
273
+ size={48}
274
+ aria-label="Disabled"
275
+ priority="primary"
276
+ type="default"
277
+ disabled
278
+ onClick={fn()}
279
+ >
280
+ <Menu />
281
+ </IconButton>
282
+ </div>
283
+ ),
284
+ play: async ({ canvasElement, step }) => {
285
+ const canvas = within(canvasElement);
286
+ const buttons = canvas.getAllByRole('button');
287
+
288
+ await step('tab to Primary and press Space', async () => {
289
+ await userEvent.tab();
290
+ await expect(buttons[0]).toHaveFocus();
291
+ await wait(400);
292
+ await userEvent.keyboard(' ');
293
+ });
294
+
295
+ await wait(400);
296
+
297
+ await step('tab to Secondary and press Space', async () => {
298
+ await userEvent.tab();
299
+ await expect(buttons[1]).toHaveFocus();
300
+ await wait(400);
301
+ await userEvent.keyboard(' ');
302
+ });
303
+
304
+ await wait(400);
305
+
306
+ await step('tab to Tertiary and press Space', async () => {
307
+ await userEvent.tab();
308
+ await expect(buttons[2]).toHaveFocus();
309
+ await wait(400);
310
+ await userEvent.keyboard(' ');
311
+ });
312
+
313
+ await wait(400);
314
+
315
+ await step('tab to Minimal and press Space', async () => {
316
+ await userEvent.tab();
317
+ await expect(buttons[3]).toHaveFocus();
318
+ await wait(400);
319
+ await userEvent.keyboard(' ');
320
+ });
321
+
322
+ await wait(400);
323
+
324
+ await step('tab skips Disabled button', async () => {
325
+ await userEvent.tab();
326
+ // Disabled button should be skipped
327
+ await expect(buttons[4]).not.toHaveFocus();
328
+ });
193
329
  },
194
330
  };
331
+
332
+ /** IconButton at 400% zoom for accessibility testing. */
333
+ export const Zoom400: Story = {
334
+ render: () => (
335
+ <div style={{ display: 'flex', gap: '8px', padding: '16px', flexWrap: 'wrap' }}>
336
+ <IconButton size={40} aria-label="Primary" priority="primary" type="default" onClick={fn()}>
337
+ <Plus />
338
+ </IconButton>
339
+ <IconButton
340
+ size={40}
341
+ aria-label="Secondary"
342
+ priority="secondary"
343
+ type="default"
344
+ onClick={fn()}
345
+ >
346
+ <Settings />
347
+ </IconButton>
348
+ <IconButton size={40} aria-label="Tertiary" priority="tertiary" type="default" onClick={fn()}>
349
+ <Star />
350
+ </IconButton>
351
+ <IconButton size={40} aria-label="Minimal" priority="minimal" type="default" onClick={fn()}>
352
+ <Travel />
353
+ </IconButton>
354
+ <IconButton
355
+ size={40}
356
+ aria-label="Disabled"
357
+ disabled
358
+ priority="primary"
359
+ type="default"
360
+ onClick={fn()}
361
+ >
362
+ <Menu />
363
+ </IconButton>
364
+ </div>
365
+ ),
366
+ ...withVariantConfig(['400%']),
367
+ };
@@ -10,6 +10,10 @@
10
10
  grid-column-start: 1;
11
11
  grid-row-start: 1;
12
12
  }
13
+ .np-input-group .np-input-addon--avatar + fieldset .form-control.np-form-control.np-form-control--size-md.np-button-input {
14
+ padding-left: 48px;
15
+ padding-left: var(--size-48);
16
+ }
13
17
  .np-input-addon {
14
18
  pointer-events: none;
15
19
  z-index: 10;
@@ -21,14 +25,18 @@
21
25
  transition-timing-function: ease-out;
22
26
  transition-duration: 150ms;
23
27
  }
28
+ .np-input-addon.np-input-addon--avatar > .np-avatar-view {
29
+ margin-right: 8px;
30
+ margin-right: var(--size-8);
31
+ }
24
32
  .np-input-group:disabled .np-input-addon:not(.np-input-addon--interactive) {
25
33
  opacity: 0.45;
26
34
  mix-blend-mode: luminosity;
27
35
  }
28
- .np-input-group:has( > :is(input,button,select):focus-visible) .np-input-addon {
36
+ .np-input-group:has( > :is(input, button, select):focus-visible) .np-input-addon {
29
37
  color: var(--color-interactive-primary);
30
38
  }
31
- .np-input-group:has( > :is(input,button,select):hover) .np-input-addon {
39
+ .np-input-group:has( > :is(input, button, select):hover) .np-input-addon {
32
40
  color: #b5b7ba;
33
41
  color: var(--color-interactive-secondary-hover);
34
42
  }
@@ -10,9 +10,19 @@
10
10
 
11
11
  /* Prevent unwanted `group-hover/input` triggers */
12
12
  border-radius: var(--radius-full);
13
+
14
+ .np-input-addon--avatar
15
+ + fieldset
16
+ .form-control.np-form-control.np-form-control--size-md.np-button-input {
17
+ padding-left: 48px;
18
+ padding-left: var(--size-48);
19
+ }
13
20
  }
14
21
 
15
22
  .np-input-addon {
23
+ &.np-input-addon--avatar > .np-avatar-view {
24
+ margin-right: var(--size-8);
25
+ }
16
26
  pointer-events: none;
17
27
  z-index: 10;
18
28
  display: inline-flex;
@@ -27,11 +37,11 @@
27
37
  mix-blend-mode: luminosity;
28
38
  }
29
39
 
30
- .np-input-group:has(>:is(input,button,select):focus-visible) & {
40
+ .np-input-group:has(> :is(input, button, select):focus-visible) & {
31
41
  color: var(--color-interactive-primary);
32
42
  }
33
43
 
34
- .np-input-group:has(>:is(input,button,select):hover) & {
44
+ .np-input-group:has(> :is(input, button, select):hover) & {
35
45
  color: var(--color-interactive-secondary-hover);
36
46
  }
37
47
 
@@ -6,7 +6,10 @@ import { Button } from '..';
6
6
  import { Field } from '../field/Field';
7
7
 
8
8
  import { Input } from './Input';
9
+ import { Flag } from '@wise/art';
9
10
  import { InputGroup } from './InputGroup';
11
+ import AvatarView from '../avatarView';
12
+ import PhoneNumberInput from '../phoneNumberInput';
10
13
 
11
14
  export default {
12
15
  component: InputGroup,
@@ -81,3 +84,27 @@ function InputGroupWithSuffix(args: NonNullable<Story['args']>) {
81
84
  </InputGroup>
82
85
  );
83
86
  }
87
+
88
+ export const PhoneNumberWithPrefix: Story = {
89
+ render: (args) => <PhoneNumberInputGroupWithPrefix {...args} />,
90
+ args: {
91
+ disabled: false,
92
+ },
93
+ };
94
+
95
+ function PhoneNumberInputGroupWithPrefix(args: NonNullable<Story['args']>) {
96
+ return (
97
+ <InputGroup
98
+ {...args}
99
+ addonStart={{
100
+ content: (
101
+ <AvatarView size={24}>
102
+ <Flag code="gbp" />
103
+ </AvatarView>
104
+ ),
105
+ }}
106
+ >
107
+ <PhoneNumberInput onChange={() => {}} />
108
+ </InputGroup>
109
+ );
110
+ }
@@ -126,6 +126,15 @@ function InputAddon({
126
126
  }
127
127
  });
128
128
 
129
+ const isAvatarView = (node: unknown): boolean => {
130
+ if (!node || typeof node !== 'object') return false;
131
+ const { type } = node as { type?: { displayName?: string; name?: string } };
132
+ if (!type || (typeof type !== 'function' && typeof type !== 'object')) return false;
133
+ return type.displayName === 'AvatarView' || type.name === 'AvatarView';
134
+ };
135
+
136
+ const hasAvatarView = Array.isArray(content) ? content.some(isAvatarView) : isAvatarView(content);
137
+
129
138
  return (
130
139
  /* Prevent nested controls from being labeled redundantly */
131
140
  <FieldLabelContextProvider value={undefined}>
@@ -145,6 +154,7 @@ function InputAddon({
145
154
  'np-input-addon--padding-sm': padding === 'sm',
146
155
  'np-input-addon--padding-md': padding === 'md',
147
156
  },
157
+ hasAvatarView && 'np-input-addon--avatar',
148
158
  )}
149
159
  >
150
160
  {content}
@@ -61,7 +61,6 @@ const meta = {
61
61
  },
62
62
  parameters: {
63
63
  actions: { argTypesRegex: '' },
64
- docs: { toc: true },
65
64
  },
66
65
  } satisfies Meta<typeof SelectInput>;
67
66
  export default meta;
@@ -39,8 +39,6 @@ const Label = forwardRef<HTMLLabelElement, LabelProps>(
39
39
  },
40
40
  );
41
41
 
42
- Label.displayName = 'Label';
43
-
44
42
  export type LabelOptionalProps = PropsWithChildren<CommonProps>;
45
43
 
46
44
  const Optional = function Optional({ children, className }: LabelOptionalProps) {
@@ -68,4 +66,5 @@ const Description = function Description({ id, children, className }: LabelDescr
68
66
  // eslint-disable-next-line functional/immutable-data
69
67
  const LabelNamespace = Object.assign(Label, { Optional, Description });
70
68
 
69
+ LabelNamespace.displayName = 'Label';
71
70
  export { LabelNamespace as Label };
@@ -6,7 +6,7 @@ import List from '../list';
6
6
 
7
7
  export default {
8
8
  component: LegacyListItem,
9
- tags: ['!autodocs', 'deprecated', '!manifest'],
9
+ tags: ['!autodocs', '!manifest', 'deprecated'],
10
10
  title: 'Content/LegacyListItem/Tests',
11
11
  };
12
12
 
@@ -75,7 +75,6 @@ const previewArgTypes = {
75
75
  } as const;
76
76
 
77
77
  export const Playground: StoryObj<PreviewStoryArgs> = {
78
- tags: ['!autodocs'],
79
78
  argTypes: previewArgTypes,
80
79
  args: {
81
80
  children: lorem20,
@@ -41,7 +41,6 @@ export default {
41
41
  type Story = StoryObj<ListItemAvatarLayoutProps>;
42
42
 
43
43
  export const Playground: Story = {
44
- tags: ['!autodocs'],
45
44
  render: (args: ListItemAvatarLayoutProps) => {
46
45
  return (
47
46
  <List>
@@ -117,7 +117,6 @@ export default {
117
117
  type Story = StoryObj<ListItemAvatarViewProps>;
118
118
 
119
119
  export const Playground: Story = {
120
- tags: ['!autodocs'],
121
120
  render: (args: ListItemAvatarViewProps) => {
122
121
  return (
123
122
  <List>
@@ -146,7 +146,6 @@ export default meta;
146
146
  type Story = StoryObj<ListItemButtonProps>;
147
147
 
148
148
  export const Playground: StoryObj<PreviewStoryArgs> = {
149
- tags: ['!autodocs'],
150
149
  render: (args: PreviewStoryArgs) => {
151
150
  const [props, previewProps] = getPropsForPreview(args);
152
151
 
@@ -51,7 +51,6 @@ export default meta;
51
51
  type Story = StoryObj<ListItemCheckboxProps>;
52
52
 
53
53
  export const Playground: Story = {
54
- tags: ['!autodocs'],
55
54
  render: (args: ListItemCheckboxProps) => {
56
55
  return (
57
56
  <List>
@@ -84,7 +84,6 @@ export default meta;
84
84
  type Story = StoryObj<ListItemIconButtonProps>;
85
85
 
86
86
  export const Playground: Story = {
87
- tags: ['!autodocs'],
88
87
  render: (args: ListItemIconButtonProps) => {
89
88
  return (
90
89
  <List>
@@ -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: 309px) {
12
+ @container (width > 308px) {
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: 241px) and (max-width: 308px) {
108
+ @container (240px < 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;
@@ -236,7 +236,7 @@
236
236
  margin-top: var(--size-4);
237
237
  }
238
238
  }
239
- @container (max-width: 240px) {
239
+ @container (width <= 240px) {
240
240
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
241
241
  align-content: start;
242
242
  }
@@ -531,7 +531,7 @@
531
531
  flex-direction: column;
532
532
  justify-content: center;
533
533
  }
534
- @container (min-width: 309px) {
534
+ @container (width > 308px) {
535
535
  .wds-list-item-titles,
536
536
  .wds-list-item-value {
537
537
  min-height: 100%;
@@ -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: 309px) {
12
+ @container (width > 308px) {
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: 241px) and (max-width: 308px) {
108
+ @container (240px < 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;
@@ -236,7 +236,7 @@
236
236
  margin-top: var(--size-4);
237
237
  }
238
238
  }
239
- @container (max-width: 240px) {
239
+ @container (width <= 240px) {
240
240
  .wds-list-item-gridWrapper .wds-list-item-control-wrapper {
241
241
  align-content: start;
242
242
  }