@transferwise/components 0.0.0-experimental-a12c97e → 0.0.0-experimental-302d967
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/listItem/AvatarLayout/ListItemAvatarLayout.js +2 -0
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.js.map +1 -1
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.mjs +2 -0
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.mjs.map +1 -1
- package/build/listItem/AvatarView/ListItemAvatarView.js +2 -0
- package/build/listItem/AvatarView/ListItemAvatarView.js.map +1 -1
- package/build/listItem/AvatarView/ListItemAvatarView.mjs +2 -0
- package/build/listItem/AvatarView/ListItemAvatarView.mjs.map +1 -1
- package/build/listItem/Image/ListItemImage.js +6 -2
- package/build/listItem/Image/ListItemImage.js.map +1 -1
- package/build/listItem/Image/ListItemImage.mjs +6 -2
- package/build/listItem/Image/ListItemImage.mjs.map +1 -1
- package/build/listItem/ListItem.js +16 -14
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +16 -14
- package/build/listItem/ListItem.mjs.map +1 -1
- package/build/listItem/ListItemContext.js.map +1 -1
- package/build/listItem/ListItemContext.mjs.map +1 -1
- package/build/listItem/Navigation/ListItemNavigation.js +1 -1
- package/build/listItem/Navigation/ListItemNavigation.js.map +1 -1
- package/build/listItem/Navigation/ListItemNavigation.mjs +1 -1
- package/build/listItem/Navigation/ListItemNavigation.mjs.map +1 -1
- package/build/listItem/_stories/images/landscape.svg +1 -0
- package/build/listItem/_stories/images/portrait.svg +1 -0
- package/build/listItem/useListItemMedia.js +21 -0
- package/build/listItem/useListItemMedia.js.map +1 -0
- package/build/listItem/useListItemMedia.mjs +19 -0
- package/build/listItem/useListItemMedia.mjs.map +1 -0
- package/build/main.css +64 -101
- package/build/styles/avatarView/AvatarView.css +1 -3
- package/build/styles/listItem/ListItem.css +63 -98
- package/build/styles/listItem/ListItem.grid.css +17 -11
- package/build/styles/main.css +64 -101
- package/build/switch/Switch.js.map +1 -1
- package/build/switch/Switch.mjs.map +1 -1
- package/build/types/listItem/AvatarLayout/ListItemAvatarLayout.d.ts.map +1 -1
- package/build/types/listItem/AvatarView/ListItemAvatarView.d.ts.map +1 -1
- package/build/types/listItem/Image/ListItemImage.d.ts +1 -1
- package/build/types/listItem/Image/ListItemImage.d.ts.map +1 -1
- package/build/types/listItem/ListItem.d.ts +1 -1
- package/build/types/listItem/ListItem.d.ts.map +1 -1
- package/build/types/listItem/ListItemContext.d.ts +4 -0
- package/build/types/listItem/ListItemContext.d.ts.map +1 -1
- package/build/types/listItem/test-utils.d.ts +7 -0
- package/build/types/listItem/test-utils.d.ts.map +1 -0
- package/build/types/listItem/useListItemMedia.d.ts +6 -0
- package/build/types/listItem/useListItemMedia.d.ts.map +1 -0
- package/build/types/switch/Switch.d.ts +1 -1
- package/build/types/switch/Switch.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/avatarView/AvatarView.css +1 -3
- package/src/avatarView/AvatarView.less +1 -2
- package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.story.tsx +8 -58
- package/src/listItem/AvatarLayout/ListItemAvatarLayout.story.tsx +0 -3
- package/src/listItem/AvatarLayout/ListItemAvatarLayout.tsx +3 -0
- package/src/listItem/AvatarView/ListItemAvatarView.story.tsx +3 -21
- package/src/listItem/AvatarView/ListItemAvatarView.tsx +3 -0
- package/src/listItem/Button/ListItemButton.spec.tsx +10 -35
- package/src/listItem/Button/ListItemButton.story.tsx +37 -95
- package/src/listItem/Checkbox/ListItemCheckbox.story.tsx +0 -18
- package/src/listItem/IconButton/ListItemIconButton.story.tsx +2 -15
- package/src/listItem/Image/ListItemImage.spec.tsx +8 -5
- package/src/listItem/Image/ListItemImage.story.tsx +23 -6
- package/src/listItem/Image/ListItemImage.tsx +12 -4
- package/src/listItem/ListItem.css +63 -98
- package/src/listItem/ListItem.grid.css +17 -11
- package/src/listItem/ListItem.grid.less +24 -16
- package/src/listItem/ListItem.less +60 -113
- package/src/listItem/ListItem.tsx +24 -18
- package/src/listItem/ListItemContext.tsx +5 -0
- package/src/listItem/Navigation/ListItemNavigation.story.tsx +2 -5
- package/src/listItem/Navigation/ListItemNavigation.tsx +1 -1
- package/src/listItem/Radio/ListItemRadio.story.tsx +0 -10
- package/src/listItem/Switch/ListItemSwitch.story.tsx +0 -8
- package/src/listItem/_stories/ListItem.layout.test.story.tsx +142 -2
- package/src/listItem/_stories/ListItem.story.tsx +141 -243
- package/src/listItem/_stories/ListItem.variants.test.story.tsx +7 -2
- package/src/listItem/_stories/images/landscape.svg +1 -0
- package/src/listItem/_stories/images/portrait.svg +1 -0
- package/src/listItem/test-utils.tsx +33 -0
- package/src/listItem/useListItemMedia.tsx +13 -0
- package/src/main.css +64 -101
- package/src/switch/Switch.tsx +1 -1
- package/build/types/listItem/_stories/helpers.d.ts +0 -27
- package/build/types/listItem/_stories/helpers.d.ts.map +0 -1
- package/src/listItem/_stories/ListItem.scenarios.story.tsx +0 -209
- package/src/listItem/_stories/helpers.tsx +0 -53
|
@@ -6,6 +6,12 @@ import {
|
|
|
6
6
|
} from '../_stories/subcomponents';
|
|
7
7
|
import { ListItemImageProps } from './ListItemImage';
|
|
8
8
|
|
|
9
|
+
const IMAGE_URLS = {
|
|
10
|
+
portrait: 'https://cdn-icons-png.flaticon.com/512/656/656404.png',
|
|
11
|
+
landscape:
|
|
12
|
+
'https://wise.com/public-resources/assets/spend/card-asset/medium/v2/personal_green_wise_2023_active.svg',
|
|
13
|
+
};
|
|
14
|
+
|
|
9
15
|
export default {
|
|
10
16
|
component: ListItem.Image,
|
|
11
17
|
title: 'Content/ListItem/ListItem.Image',
|
|
@@ -15,22 +21,33 @@ export default {
|
|
|
15
21
|
},
|
|
16
22
|
},
|
|
17
23
|
args: {
|
|
18
|
-
src:
|
|
19
|
-
size:
|
|
24
|
+
src: IMAGE_URLS.landscape,
|
|
25
|
+
size: 72,
|
|
20
26
|
loading: undefined,
|
|
21
27
|
alt: undefined,
|
|
28
|
+
imageOrientation: 'landscape' as keyof typeof IMAGE_URLS,
|
|
22
29
|
},
|
|
23
|
-
|
|
30
|
+
argTypes: {
|
|
31
|
+
imageOrientation: {
|
|
32
|
+
control: { type: 'radio' },
|
|
33
|
+
options: ['portrait', 'landscape'],
|
|
34
|
+
description: 'Switch between portrait and landscape images',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
} satisfies Meta<ListItemImageProps & { imageOrientation: keyof typeof IMAGE_URLS }>;
|
|
24
38
|
|
|
25
|
-
type Story = StoryObj<ListItemImageProps>;
|
|
39
|
+
type Story = StoryObj<ListItemImageProps & { imageOrientation: keyof typeof IMAGE_URLS }>;
|
|
26
40
|
|
|
27
41
|
export const Playground: Story = {
|
|
28
|
-
render: (args: ListItemImageProps) => {
|
|
42
|
+
render: (args: ListItemImageProps & { imageOrientation: keyof typeof IMAGE_URLS }) => {
|
|
43
|
+
const { imageOrientation, ...imageProps } = args;
|
|
44
|
+
const src = IMAGE_URLS[imageOrientation];
|
|
45
|
+
|
|
29
46
|
return (
|
|
30
47
|
<ListItem
|
|
31
48
|
title="List item title"
|
|
32
49
|
subtitle="Subtitle goes here"
|
|
33
|
-
media={<ListItem.Image {...
|
|
50
|
+
media={<ListItem.Image {...imageProps} src={src} />}
|
|
34
51
|
control={CONTROLS.partialButton}
|
|
35
52
|
additionalInfo={INFO.nonInteractive}
|
|
36
53
|
/>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ImageComp, { type ImageProps } from '../../image';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
+
import { useListItemMedia } from '../useListItemMedia';
|
|
3
4
|
|
|
4
5
|
type SizeProp = {};
|
|
5
6
|
|
|
@@ -23,17 +24,24 @@ export type ListItemImageProps = Omit<ImageProps, 'stretch' | 'shrink' | 'id' |
|
|
|
23
24
|
*
|
|
24
25
|
* > **NB**: This component is [not intended for use with illustrations](https://wise.design/foundations/illustration#scale).
|
|
25
26
|
*/
|
|
26
|
-
export const Image = ({ alt = '', size = 48, ...props }: ListItemImageProps) => {
|
|
27
|
+
export const Image = ({ alt = '', size = 48, className, ...props }: ListItemImageProps) => {
|
|
28
|
+
useListItemMedia(size);
|
|
29
|
+
|
|
27
30
|
return (
|
|
28
31
|
<div
|
|
29
|
-
className={clsx('wds-list-item-media-image')}
|
|
32
|
+
className={clsx('wds-list-item-media-image-wrapper')}
|
|
30
33
|
style={
|
|
31
34
|
{
|
|
32
|
-
'--item-media-
|
|
35
|
+
'--wds-list-item-media-size': `${size}px`,
|
|
33
36
|
} as React.CSSProperties
|
|
34
37
|
}
|
|
35
38
|
>
|
|
36
|
-
<ImageComp
|
|
39
|
+
<ImageComp
|
|
40
|
+
{...props}
|
|
41
|
+
className={clsx(className, 'wds-list-item-media-image')}
|
|
42
|
+
alt={alt}
|
|
43
|
+
role={alt ? 'graphics-symbol' : 'presentation'}
|
|
44
|
+
/>
|
|
37
45
|
</div>
|
|
38
46
|
);
|
|
39
47
|
};
|
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
gap: 4px 16px;
|
|
6
6
|
gap: var(--size-4) var(--size-16);
|
|
7
7
|
}
|
|
8
|
-
@container (min-width:
|
|
8
|
+
@container (min-width: 375px) {
|
|
9
9
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
10
10
|
grid-template-columns: auto 1fr auto;
|
|
11
11
|
grid-template-rows: auto auto auto;
|
|
12
|
-
grid-template-areas: "media body control" "
|
|
12
|
+
grid-template-areas: "media body control" ". info ." ". prompt prompt";
|
|
13
13
|
}
|
|
14
14
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-noPrompt {
|
|
15
15
|
grid-template-columns: auto 1fr auto;
|
|
16
16
|
grid-template-rows: auto auto;
|
|
17
|
-
grid-template-areas: "media body control" "
|
|
17
|
+
grid-template-areas: "media body control" ". info .";
|
|
18
18
|
}
|
|
19
19
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-noInfo-hasPrompt {
|
|
20
20
|
grid-template-columns: auto 1fr auto;
|
|
21
21
|
grid-template-rows: auto auto;
|
|
22
|
-
grid-template-areas: "media body control" "
|
|
22
|
+
grid-template-areas: "media body control" ". prompt prompt";
|
|
23
23
|
}
|
|
24
24
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-noInfo-noPrompt {
|
|
25
25
|
grid-template-columns: auto 1fr auto;
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-hasPrompt {
|
|
30
30
|
grid-template-columns: auto 1fr;
|
|
31
31
|
grid-template-rows: auto auto;
|
|
32
|
-
grid-template-areas: "media body" "
|
|
32
|
+
grid-template-areas: "media body" ". info" ". prompt";
|
|
33
33
|
}
|
|
34
34
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-noPrompt {
|
|
35
35
|
grid-template-columns: auto 1fr;
|
|
36
36
|
grid-template-rows: auto auto auto;
|
|
37
|
-
grid-template-areas: "media body" "
|
|
37
|
+
grid-template-areas: "media body" ". info";
|
|
38
38
|
}
|
|
39
39
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-noInfo-hasPrompt {
|
|
40
40
|
grid-template-columns: auto 1fr;
|
|
41
41
|
grid-template-rows: auto auto;
|
|
42
|
-
grid-template-areas: "media body" "
|
|
42
|
+
grid-template-areas: "media body" ". prompt";
|
|
43
43
|
}
|
|
44
44
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-noInfo-noPrompt {
|
|
45
45
|
grid-template-columns: auto 1fr;
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
53
53
|
grid-template-columns: 1fr auto;
|
|
54
54
|
grid-template-rows: auto auto auto;
|
|
55
|
-
grid-template-areas: "body control" "info
|
|
55
|
+
grid-template-areas: "body control" "info ." "prompt prompt";
|
|
56
56
|
}
|
|
57
57
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-hasInfo-noPrompt {
|
|
58
58
|
grid-template-columns: 1fr auto;
|
|
59
59
|
grid-template-rows: auto auto;
|
|
60
|
-
grid-template-areas: "body control" "info
|
|
60
|
+
grid-template-areas: "body control" "info .";
|
|
61
61
|
}
|
|
62
62
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-noInfo-hasPrompt {
|
|
63
63
|
grid-template-columns: 1fr auto;
|
|
@@ -93,11 +93,14 @@
|
|
|
93
93
|
grid-template-areas: "body";
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
@container (min-width:
|
|
96
|
+
@container (min-width: 297px) and (max-width: 375px) {
|
|
97
97
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl .wds-list-item-media {
|
|
98
98
|
margin-bottom: 12px;
|
|
99
99
|
margin-bottom: var(--size-12);
|
|
100
100
|
}
|
|
101
|
+
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl .wds-list-item-media .wds-list-item-media-image {
|
|
102
|
+
height: auto;
|
|
103
|
+
}
|
|
101
104
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
102
105
|
grid-template-columns: 1fr auto;
|
|
103
106
|
grid-template-rows: auto auto auto auto;
|
|
@@ -138,6 +141,9 @@
|
|
|
138
141
|
margin-bottom: 16px;
|
|
139
142
|
margin-bottom: var(--size-16);
|
|
140
143
|
}
|
|
144
|
+
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl .wds-list-item-media .wds-list-item-media-image {
|
|
145
|
+
height: auto;
|
|
146
|
+
}
|
|
141
147
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-hasPrompt {
|
|
142
148
|
grid-template-columns: auto auto;
|
|
143
149
|
grid-template-rows: auto auto auto auto;
|
|
@@ -221,7 +227,7 @@
|
|
|
221
227
|
grid-template-areas: "body";
|
|
222
228
|
}
|
|
223
229
|
}
|
|
224
|
-
@container (max-width:
|
|
230
|
+
@container (max-width: 297px) {
|
|
225
231
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
226
232
|
grid-template-columns: auto 1fr;
|
|
227
233
|
grid-template-rows: auto auto auto;
|
|
@@ -368,8 +374,8 @@
|
|
|
368
374
|
background-color: #ffffff;
|
|
369
375
|
background-color: var(--color-background-screen);
|
|
370
376
|
position: relative;
|
|
371
|
-
padding: 12px
|
|
372
|
-
padding: var(--size-12)
|
|
377
|
+
padding: 12px;
|
|
378
|
+
padding: var(--size-12);
|
|
373
379
|
container-type: inline-size;
|
|
374
380
|
}
|
|
375
381
|
.wds-list-item + .wds-list-item-spotlight,
|
|
@@ -403,6 +409,12 @@
|
|
|
403
409
|
.wds-list-item-interactive .np-checkbox-button:has(input[type="checkbox"]:focus-visible) .tw-checkbox-button {
|
|
404
410
|
outline: none;
|
|
405
411
|
}
|
|
412
|
+
.wds-list-item-interactive:has(.wds-list-item-control:focus-visible),
|
|
413
|
+
.wds-list-item-interactive:has(input[type="checkbox"]:focus-visible) {
|
|
414
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
415
|
+
outline-offset: var(--ring-outline-offset);
|
|
416
|
+
outline-offset: -1px;
|
|
417
|
+
}
|
|
406
418
|
.wds-list-item-interactive .wds-list-item-additional-info {
|
|
407
419
|
--ring-outline-offset: 0;
|
|
408
420
|
}
|
|
@@ -421,68 +433,45 @@
|
|
|
421
433
|
position: absolute;
|
|
422
434
|
inset: 0;
|
|
423
435
|
}
|
|
424
|
-
.wds-list-item-interactive
|
|
425
|
-
.wds-list-item-interactive.wds-list-item-spotlight:has(input[type="checkbox"]:focus-visible) {
|
|
426
|
-
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
427
|
-
outline-offset: var(--ring-outline-offset);
|
|
428
|
-
outline-offset: -1px;
|
|
429
|
-
}
|
|
430
|
-
.wds-list-item-interactive.wds-list-item-spotlight:not(.disabled):not(:disabled):hover {
|
|
431
|
-
background-color: var(--color-background-screen-hover);
|
|
432
|
-
}
|
|
433
|
-
.wds-list-item-interactive.wds-list-item-spotlight:not(.disabled):not(:disabled):active {
|
|
434
|
-
background-color: var(--color-background-screen-active);
|
|
435
|
-
}
|
|
436
|
-
.wds-list-item-interactive.wds-list-item-spotlight:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover {
|
|
437
|
-
background-color: transparent;
|
|
438
|
-
background-color: initial;
|
|
439
|
-
}
|
|
440
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):has(.wds-list-item-control:focus-visible):before,
|
|
441
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):has(input[type="checkbox"]:focus-visible):before {
|
|
442
|
-
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
443
|
-
outline-offset: var(--ring-outline-offset);
|
|
444
|
-
content: '';
|
|
445
|
-
position: absolute;
|
|
446
|
-
inset: 0 -8px;
|
|
447
|
-
border-radius: 16px;
|
|
448
|
-
border-radius: var(--radius-medium);
|
|
449
|
-
outline-offset: -1px;
|
|
450
|
-
}
|
|
451
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):hover:before,
|
|
452
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):active:before {
|
|
453
|
-
content: '';
|
|
454
|
-
position: absolute;
|
|
455
|
-
inset: 0 -8px;
|
|
456
|
-
border-radius: 16px;
|
|
457
|
-
border-radius: var(--radius-medium);
|
|
458
|
-
}
|
|
459
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):hover:before {
|
|
436
|
+
.wds-list-item-interactive:not(.disabled):not(:disabled):hover {
|
|
460
437
|
background-color: var(--color-background-screen-hover);
|
|
461
438
|
}
|
|
462
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):active:before {
|
|
463
|
-
background-color: var(--color-background-screen-active);
|
|
464
|
-
}
|
|
465
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover:before {
|
|
466
|
-
background-color: transparent;
|
|
467
|
-
background-color: initial;
|
|
468
|
-
}
|
|
469
439
|
.wds-list-item-interactive:not(.disabled):not(:disabled):hover .wds-list-item-control-wrapper .wds-Button {
|
|
470
440
|
background-color: var(--Button-background-hover);
|
|
471
441
|
color: var(--Button-color-hover);
|
|
472
442
|
transition: none;
|
|
473
443
|
}
|
|
444
|
+
.wds-list-item-interactive:not(.disabled):not(:disabled):active {
|
|
445
|
+
background-color: var(--color-background-screen-active);
|
|
446
|
+
}
|
|
474
447
|
.wds-list-item-interactive .wds-list-item-button-control .wds-Button {
|
|
475
448
|
transition: none;
|
|
476
449
|
}
|
|
450
|
+
.wds-list-item-interactive:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover {
|
|
451
|
+
background-color: transparent;
|
|
452
|
+
background-color: initial;
|
|
453
|
+
}
|
|
477
454
|
.wds-list-item-media {
|
|
478
455
|
grid-area: media;
|
|
456
|
+
display: flex;
|
|
457
|
+
align-items: center;
|
|
458
|
+
}
|
|
459
|
+
.wds-list-item-media-image-wrapper {
|
|
460
|
+
width: var(--wds-list-item-media-size);
|
|
461
|
+
height: var(--wds-list-item-media-size);
|
|
462
|
+
display: flex;
|
|
463
|
+
align-items: center;
|
|
464
|
+
justify-content: center;
|
|
479
465
|
}
|
|
480
466
|
.wds-list-item-media-image {
|
|
481
|
-
width:
|
|
482
|
-
height:
|
|
467
|
+
width: 100%;
|
|
468
|
+
height: 100%;
|
|
469
|
+
-o-object-fit: contain;
|
|
470
|
+
object-fit: contain;
|
|
483
471
|
}
|
|
484
472
|
.wds-list-item-body {
|
|
485
473
|
grid-area: body;
|
|
474
|
+
align-items: center;
|
|
486
475
|
width: 100%;
|
|
487
476
|
display: grid;
|
|
488
477
|
grid-template-columns: 1fr max-content;
|
|
@@ -493,11 +482,18 @@
|
|
|
493
482
|
gap: var(--size-16);
|
|
494
483
|
word-break: break-word;
|
|
495
484
|
}
|
|
496
|
-
.wds-list-item-title
|
|
497
|
-
.wds-list-item-title-value {
|
|
485
|
+
.wds-list-item-title {
|
|
498
486
|
color: #37517e;
|
|
499
487
|
color: var(--color-content-primary);
|
|
500
488
|
}
|
|
489
|
+
.wds-list-item-value {
|
|
490
|
+
text-align: right;
|
|
491
|
+
}
|
|
492
|
+
.wds-list-item-body-center {
|
|
493
|
+
display: flex;
|
|
494
|
+
flex-direction: row;
|
|
495
|
+
align-items: center;
|
|
496
|
+
}
|
|
501
497
|
.wds-list-item-additional-info {
|
|
502
498
|
grid-area: info;
|
|
503
499
|
color: #768e9c;
|
|
@@ -505,12 +501,13 @@
|
|
|
505
501
|
margin-top: calc(4px * -1);
|
|
506
502
|
margin-top: calc(var(--size-4) * -1);
|
|
507
503
|
}
|
|
508
|
-
.wds-list-item-value {
|
|
509
|
-
align-items: end;
|
|
510
|
-
text-align: right;
|
|
511
|
-
}
|
|
512
504
|
.wds-list-item-control-wrapper {
|
|
513
505
|
grid-area: control;
|
|
506
|
+
align-content: center;
|
|
507
|
+
}
|
|
508
|
+
.wds-list-item-navigation .tw-icon-chevron-right {
|
|
509
|
+
color: #c9cbce;
|
|
510
|
+
color: var(--color-interactive-secondary);
|
|
514
511
|
}
|
|
515
512
|
.wds-list-item-control {
|
|
516
513
|
flex: 0 0 auto;
|
|
@@ -526,12 +523,6 @@
|
|
|
526
523
|
color: #768e9c;
|
|
527
524
|
color: var(--color-content-tertiary);
|
|
528
525
|
}
|
|
529
|
-
.wds-list-item-spotlight {
|
|
530
|
-
padding-left: 12px;
|
|
531
|
-
padding-left: var(--size-12);
|
|
532
|
-
padding-right: 12px;
|
|
533
|
-
padding-right: var(--size-12);
|
|
534
|
-
}
|
|
535
526
|
.wds-list-item-spotlight-active {
|
|
536
527
|
background-color: rgba(134,167,189,0.10196);
|
|
537
528
|
background-color: var(--color-background-neutral);
|
|
@@ -544,6 +535,8 @@
|
|
|
544
535
|
}
|
|
545
536
|
.wds-list-item-spotlight-inactive {
|
|
546
537
|
background-color: rgba(134, 167, 189, 0.025);
|
|
538
|
+
border: 1px dashed rgba(0,0,0,0.10196);
|
|
539
|
+
border: 1px dashed var(--color-border-neutral);
|
|
547
540
|
}
|
|
548
541
|
@supports (color: color-mix(in lch, red, blue)) {
|
|
549
542
|
.wds-list-item-spotlight-inactive {
|
|
@@ -556,34 +549,6 @@
|
|
|
556
549
|
.wds-list-item-spotlight-inactive:not(.disabled):not(:disabled):active {
|
|
557
550
|
background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
|
|
558
551
|
}
|
|
559
|
-
.wds-list-item .wds-list-item-spotlight__border {
|
|
560
|
-
position: absolute;
|
|
561
|
-
inset: 0;
|
|
562
|
-
width: 100%;
|
|
563
|
-
height: 100%;
|
|
564
|
-
}
|
|
565
|
-
.wds-list-item .wds-list-item-spotlight__border rect {
|
|
566
|
-
--wds-list-item-spotlight-borderWidth: 1px;
|
|
567
|
-
--wds-list-item-spotlight-borderWidthOffset: 0.5px;
|
|
568
|
-
--wds-list-item-spotlight-strokeDashSize: calc(var(--size-12) * 0.5);
|
|
569
|
-
fill: none;
|
|
570
|
-
stroke: rgba(0,0,0,0.10196);
|
|
571
|
-
stroke: var(--color-border-neutral);
|
|
572
|
-
width: calc(100% - 1px);
|
|
573
|
-
width: calc(100% - var(--wds-list-item-spotlight-borderWidth));
|
|
574
|
-
height: calc(100% - 1px);
|
|
575
|
-
height: calc(100% - var(--wds-list-item-spotlight-borderWidth));
|
|
576
|
-
x: 0.5px;
|
|
577
|
-
x: var(--wds-list-item-spotlight-borderWidthOffset);
|
|
578
|
-
y: 0.5px;
|
|
579
|
-
y: var(--wds-list-item-spotlight-borderWidthOffset);
|
|
580
|
-
rx: calc(16px - 0.5px);
|
|
581
|
-
rx: calc(var(--radius-medium) - var(--wds-list-item-spotlight-borderWidthOffset));
|
|
582
|
-
ry: calc(16px - 0.5px);
|
|
583
|
-
ry: calc(var(--radius-medium) - var(--wds-list-item-spotlight-borderWidthOffset));
|
|
584
|
-
stroke-dasharray: calc(12px * 0.5) calc(12px * 0.5);
|
|
585
|
-
stroke-dasharray: var(--wds-list-item-spotlight-strokeDashSize) var(--wds-list-item-spotlight-strokeDashSize);
|
|
586
|
-
}
|
|
587
552
|
.wds-list-item-prompt {
|
|
588
553
|
grid-area: prompt;
|
|
589
554
|
display: inline-flex;
|
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
gap: 4px 16px;
|
|
6
6
|
gap: var(--size-4) var(--size-16);
|
|
7
7
|
}
|
|
8
|
-
@container (min-width:
|
|
8
|
+
@container (min-width: 375px) {
|
|
9
9
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
10
10
|
grid-template-columns: auto 1fr auto;
|
|
11
11
|
grid-template-rows: auto auto auto;
|
|
12
|
-
grid-template-areas: "media body control" "
|
|
12
|
+
grid-template-areas: "media body control" ". info ." ". prompt prompt";
|
|
13
13
|
}
|
|
14
14
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-noPrompt {
|
|
15
15
|
grid-template-columns: auto 1fr auto;
|
|
16
16
|
grid-template-rows: auto auto;
|
|
17
|
-
grid-template-areas: "media body control" "
|
|
17
|
+
grid-template-areas: "media body control" ". info .";
|
|
18
18
|
}
|
|
19
19
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-noInfo-hasPrompt {
|
|
20
20
|
grid-template-columns: auto 1fr auto;
|
|
21
21
|
grid-template-rows: auto auto;
|
|
22
|
-
grid-template-areas: "media body control" "
|
|
22
|
+
grid-template-areas: "media body control" ". prompt prompt";
|
|
23
23
|
}
|
|
24
24
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-noInfo-noPrompt {
|
|
25
25
|
grid-template-columns: auto 1fr auto;
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-hasPrompt {
|
|
30
30
|
grid-template-columns: auto 1fr;
|
|
31
31
|
grid-template-rows: auto auto;
|
|
32
|
-
grid-template-areas: "media body" "
|
|
32
|
+
grid-template-areas: "media body" ". info" ". prompt";
|
|
33
33
|
}
|
|
34
34
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-noPrompt {
|
|
35
35
|
grid-template-columns: auto 1fr;
|
|
36
36
|
grid-template-rows: auto auto auto;
|
|
37
|
-
grid-template-areas: "media body" "
|
|
37
|
+
grid-template-areas: "media body" ". info";
|
|
38
38
|
}
|
|
39
39
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-noInfo-hasPrompt {
|
|
40
40
|
grid-template-columns: auto 1fr;
|
|
41
41
|
grid-template-rows: auto auto;
|
|
42
|
-
grid-template-areas: "media body" "
|
|
42
|
+
grid-template-areas: "media body" ". prompt";
|
|
43
43
|
}
|
|
44
44
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-noInfo-noPrompt {
|
|
45
45
|
grid-template-columns: auto 1fr;
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
53
53
|
grid-template-columns: 1fr auto;
|
|
54
54
|
grid-template-rows: auto auto auto;
|
|
55
|
-
grid-template-areas: "body control" "info
|
|
55
|
+
grid-template-areas: "body control" "info ." "prompt prompt";
|
|
56
56
|
}
|
|
57
57
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-hasInfo-noPrompt {
|
|
58
58
|
grid-template-columns: 1fr auto;
|
|
59
59
|
grid-template-rows: auto auto;
|
|
60
|
-
grid-template-areas: "body control" "info
|
|
60
|
+
grid-template-areas: "body control" "info .";
|
|
61
61
|
}
|
|
62
62
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-noInfo-hasPrompt {
|
|
63
63
|
grid-template-columns: 1fr auto;
|
|
@@ -93,11 +93,14 @@
|
|
|
93
93
|
grid-template-areas: "body";
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
@container (min-width:
|
|
96
|
+
@container (min-width: 297px) and (max-width: 375px) {
|
|
97
97
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl .wds-list-item-media {
|
|
98
98
|
margin-bottom: 12px;
|
|
99
99
|
margin-bottom: var(--size-12);
|
|
100
100
|
}
|
|
101
|
+
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl .wds-list-item-media .wds-list-item-media-image {
|
|
102
|
+
height: auto;
|
|
103
|
+
}
|
|
101
104
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
102
105
|
grid-template-columns: 1fr auto;
|
|
103
106
|
grid-template-rows: auto auto auto auto;
|
|
@@ -138,6 +141,9 @@
|
|
|
138
141
|
margin-bottom: 16px;
|
|
139
142
|
margin-bottom: var(--size-16);
|
|
140
143
|
}
|
|
144
|
+
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl .wds-list-item-media .wds-list-item-media-image {
|
|
145
|
+
height: auto;
|
|
146
|
+
}
|
|
141
147
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-hasPrompt {
|
|
142
148
|
grid-template-columns: auto auto;
|
|
143
149
|
grid-template-rows: auto auto auto auto;
|
|
@@ -221,7 +227,7 @@
|
|
|
221
227
|
grid-template-areas: "body";
|
|
222
228
|
}
|
|
223
229
|
}
|
|
224
|
-
@container (max-width:
|
|
230
|
+
@container (max-width: 297px) {
|
|
225
231
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
226
232
|
grid-template-columns: auto 1fr;
|
|
227
233
|
grid-template-rows: auto auto auto;
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
display: grid;
|
|
4
4
|
gap: var(--size-4) var(--size-16);
|
|
5
5
|
|
|
6
|
-
@container (min-width:
|
|
6
|
+
@container (min-width: 375px) {
|
|
7
7
|
&.wds-list-item-hasMedia-hasControl {
|
|
8
8
|
&.wds-list-item-hasInfo-hasPrompt {
|
|
9
9
|
grid-template-columns: auto 1fr auto;
|
|
10
10
|
grid-template-rows: auto auto auto;
|
|
11
11
|
grid-template-areas:
|
|
12
12
|
"media body control"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
". info ."
|
|
14
|
+
". prompt prompt";
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
&.wds-list-item-hasInfo-noPrompt {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
grid-template-rows: auto auto;
|
|
20
20
|
grid-template-areas:
|
|
21
21
|
"media body control"
|
|
22
|
-
"
|
|
22
|
+
". info ."
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&.wds-list-item-noInfo-hasPrompt {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
grid-template-rows: auto auto;
|
|
28
28
|
grid-template-areas:
|
|
29
29
|
"media body control"
|
|
30
|
-
"
|
|
30
|
+
". prompt prompt";
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
&.wds-list-item-noInfo-noPrompt {
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
grid-template-rows: auto auto;
|
|
45
45
|
grid-template-areas:
|
|
46
46
|
"media body"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
47
|
+
". info"
|
|
48
|
+
". prompt";
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
&.wds-list-item-hasInfo-noPrompt {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
grid-template-rows: auto auto auto;
|
|
54
54
|
grid-template-areas:
|
|
55
55
|
"media body"
|
|
56
|
-
"
|
|
56
|
+
". info"
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
&.wds-list-item-noInfo-hasPrompt {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
grid-template-rows: auto auto;
|
|
62
62
|
grid-template-areas:
|
|
63
63
|
"media body"
|
|
64
|
-
"
|
|
64
|
+
". prompt";
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
&.wds-list-item-noInfo-noPrompt {
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
grid-template-rows: auto auto auto;
|
|
83
83
|
grid-template-areas:
|
|
84
84
|
"body control"
|
|
85
|
-
"info
|
|
85
|
+
"info ."
|
|
86
86
|
"prompt prompt";
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
grid-template-rows: auto auto;
|
|
92
92
|
grid-template-areas:
|
|
93
93
|
"body control"
|
|
94
|
-
"info
|
|
94
|
+
"info ."
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
&.wds-list-item-noInfo-hasPrompt {
|
|
@@ -149,10 +149,14 @@
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
@container (min-width:
|
|
152
|
+
@container (min-width: 297px) and (max-width: 375px) {
|
|
153
153
|
&.wds-list-item-hasMedia-hasControl {
|
|
154
154
|
.wds-list-item-media {
|
|
155
155
|
margin-bottom: var(--size-12);
|
|
156
|
+
|
|
157
|
+
.wds-list-item-media-image {
|
|
158
|
+
height: auto;
|
|
159
|
+
}
|
|
156
160
|
}
|
|
157
161
|
&.wds-list-item-hasInfo-hasPrompt {
|
|
158
162
|
grid-template-columns: 1fr auto;
|
|
@@ -228,8 +232,12 @@
|
|
|
228
232
|
}
|
|
229
233
|
|
|
230
234
|
&.wds-list-item-hasMedia-noControl {
|
|
231
|
-
|
|
235
|
+
.wds-list-item-media {
|
|
232
236
|
margin-bottom: var(--size-16);
|
|
237
|
+
|
|
238
|
+
.wds-list-item-media-image {
|
|
239
|
+
height: auto;
|
|
240
|
+
}
|
|
233
241
|
}
|
|
234
242
|
&.wds-list-item-hasInfo-hasPrompt {
|
|
235
243
|
grid-template-columns: auto auto;
|
|
@@ -246,7 +254,7 @@
|
|
|
246
254
|
grid-template-rows: auto auto auto;
|
|
247
255
|
grid-template-areas:
|
|
248
256
|
"media media"
|
|
249
|
-
"body body"
|
|
257
|
+
"body body"
|
|
250
258
|
"info info";
|
|
251
259
|
}
|
|
252
260
|
|
|
@@ -378,7 +386,7 @@
|
|
|
378
386
|
}
|
|
379
387
|
}
|
|
380
388
|
|
|
381
|
-
@container (max-width:
|
|
389
|
+
@container (max-width: 297px) {
|
|
382
390
|
&.wds-list-item-hasMedia-hasControl {
|
|
383
391
|
&.wds-list-item-hasInfo-hasPrompt {
|
|
384
392
|
grid-template-columns: auto 1fr;
|
|
@@ -461,7 +469,7 @@
|
|
|
461
469
|
grid-template-rows: auto auto auto;
|
|
462
470
|
grid-template-areas:
|
|
463
471
|
"body"
|
|
464
|
-
"info"
|
|
472
|
+
"info"
|
|
465
473
|
}
|
|
466
474
|
|
|
467
475
|
&.wds-list-item-noInfo-hasPrompt {
|