@transferwise/components 0.0.0-experimental-04d15ef → 0.0.0-experimental-d7fd1c8
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/main.css +19 -54
- package/build/styles/listItem/ListItem.css +19 -54
- package/build/styles/listItem/ListItem.grid.css +3 -3
- package/build/styles/main.css +19 -54
- package/package.json +3 -3
- package/src/listItem/ListItem.css +19 -54
- package/src/listItem/ListItem.grid.css +3 -3
- package/src/listItem/ListItem.grid.less +3 -3
- package/src/listItem/ListItem.less +23 -76
- package/src/listItem/_stories/ListItem.story.tsx +42 -5
- package/src/main.css +19 -54
package/build/main.css
CHANGED
|
@@ -2640,7 +2640,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2640
2640
|
gap: 4px 16px;
|
|
2641
2641
|
gap: var(--size-4) var(--size-16);
|
|
2642
2642
|
}
|
|
2643
|
-
@container (min-width:
|
|
2643
|
+
@container (min-width: 375px) {
|
|
2644
2644
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
2645
2645
|
grid-template-columns: auto 1fr auto;
|
|
2646
2646
|
grid-template-rows: auto auto auto;
|
|
@@ -2728,7 +2728,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2728
2728
|
grid-template-areas: "body";
|
|
2729
2729
|
}
|
|
2730
2730
|
}
|
|
2731
|
-
@container (min-width:
|
|
2731
|
+
@container (min-width: 297px) and (max-width: 375px) {
|
|
2732
2732
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl .wds-list-item-media {
|
|
2733
2733
|
margin-bottom: 12px;
|
|
2734
2734
|
margin-bottom: var(--size-12);
|
|
@@ -2856,7 +2856,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2856
2856
|
grid-template-areas: "body";
|
|
2857
2857
|
}
|
|
2858
2858
|
}
|
|
2859
|
-
@container (max-width:
|
|
2859
|
+
@container (max-width: 296px) {
|
|
2860
2860
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
2861
2861
|
grid-template-columns: auto 1fr;
|
|
2862
2862
|
grid-template-rows: auto auto auto;
|
|
@@ -3003,8 +3003,8 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3003
3003
|
background-color: #ffffff;
|
|
3004
3004
|
background-color: var(--color-background-screen);
|
|
3005
3005
|
position: relative;
|
|
3006
|
-
padding: 12px
|
|
3007
|
-
padding: var(--size-12)
|
|
3006
|
+
padding: 12px;
|
|
3007
|
+
padding: var(--size-12);
|
|
3008
3008
|
container-type: inline-size;
|
|
3009
3009
|
}
|
|
3010
3010
|
.wds-list-item + .wds-list-item-spotlight,
|
|
@@ -3038,6 +3038,12 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3038
3038
|
.wds-list-item-interactive .np-checkbox-button:has(input[type="checkbox"]:focus-visible) .tw-checkbox-button {
|
|
3039
3039
|
outline: none;
|
|
3040
3040
|
}
|
|
3041
|
+
.wds-list-item-interactive:has(.wds-list-item-control:focus-visible),
|
|
3042
|
+
.wds-list-item-interactive:has(input[type="checkbox"]:focus-visible) {
|
|
3043
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
3044
|
+
outline-offset: var(--ring-outline-offset);
|
|
3045
|
+
outline-offset: -1px;
|
|
3046
|
+
}
|
|
3041
3047
|
.wds-list-item-interactive .wds-list-item-additional-info {
|
|
3042
3048
|
--ring-outline-offset: 0;
|
|
3043
3049
|
}
|
|
@@ -3056,59 +3062,24 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3056
3062
|
position: absolute;
|
|
3057
3063
|
inset: 0;
|
|
3058
3064
|
}
|
|
3059
|
-
.wds-list-item-interactive
|
|
3060
|
-
.wds-list-item-interactive.wds-list-item-spotlight:has(input[type="checkbox"]:focus-visible) {
|
|
3061
|
-
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
3062
|
-
outline-offset: var(--ring-outline-offset);
|
|
3063
|
-
outline-offset: -1px;
|
|
3064
|
-
}
|
|
3065
|
-
.wds-list-item-interactive.wds-list-item-spotlight:not(.disabled):not(:disabled):hover {
|
|
3065
|
+
.wds-list-item-interactive:not(.disabled):not(:disabled):hover {
|
|
3066
3066
|
background-color: var(--color-background-screen-hover);
|
|
3067
3067
|
}
|
|
3068
|
-
.wds-list-item-interactive.wds-list-item-spotlight:not(.disabled):not(:disabled):active {
|
|
3069
|
-
background-color: var(--color-background-screen-active);
|
|
3070
|
-
}
|
|
3071
|
-
.wds-list-item-interactive.wds-list-item-spotlight:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover {
|
|
3072
|
-
background-color: transparent;
|
|
3073
|
-
background-color: initial;
|
|
3074
|
-
}
|
|
3075
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):has(.wds-list-item-control:focus-visible):before,
|
|
3076
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):has(input[type="checkbox"]:focus-visible):before {
|
|
3077
|
-
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
3078
|
-
outline-offset: var(--ring-outline-offset);
|
|
3079
|
-
content: '';
|
|
3080
|
-
position: absolute;
|
|
3081
|
-
inset: 0 -8px;
|
|
3082
|
-
border-radius: 16px;
|
|
3083
|
-
border-radius: var(--radius-medium);
|
|
3084
|
-
outline-offset: -1px;
|
|
3085
|
-
}
|
|
3086
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):hover:before,
|
|
3087
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):active:before {
|
|
3088
|
-
content: '';
|
|
3089
|
-
position: absolute;
|
|
3090
|
-
inset: 0 -8px;
|
|
3091
|
-
border-radius: 16px;
|
|
3092
|
-
border-radius: var(--radius-medium);
|
|
3093
|
-
}
|
|
3094
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):hover:before {
|
|
3095
|
-
background-color: var(--color-background-screen-hover);
|
|
3096
|
-
}
|
|
3097
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):active:before {
|
|
3098
|
-
background-color: var(--color-background-screen-active);
|
|
3099
|
-
}
|
|
3100
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover:before {
|
|
3101
|
-
background-color: transparent;
|
|
3102
|
-
background-color: initial;
|
|
3103
|
-
}
|
|
3104
3068
|
.wds-list-item-interactive:not(.disabled):not(:disabled):hover .wds-list-item-control-wrapper .wds-Button {
|
|
3105
3069
|
background-color: var(--Button-background-hover);
|
|
3106
3070
|
color: var(--Button-color-hover);
|
|
3107
3071
|
transition: none;
|
|
3108
3072
|
}
|
|
3073
|
+
.wds-list-item-interactive:not(.disabled):not(:disabled):active {
|
|
3074
|
+
background-color: var(--color-background-screen-active);
|
|
3075
|
+
}
|
|
3109
3076
|
.wds-list-item-interactive .wds-list-item-button-control .wds-Button {
|
|
3110
3077
|
transition: none;
|
|
3111
3078
|
}
|
|
3079
|
+
.wds-list-item-interactive:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover {
|
|
3080
|
+
background-color: transparent;
|
|
3081
|
+
background-color: initial;
|
|
3082
|
+
}
|
|
3112
3083
|
.wds-list-item-media {
|
|
3113
3084
|
grid-area: media;
|
|
3114
3085
|
}
|
|
@@ -3160,12 +3131,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3160
3131
|
color: #768e9c;
|
|
3161
3132
|
color: var(--color-content-tertiary);
|
|
3162
3133
|
}
|
|
3163
|
-
.wds-list-item-spotlight {
|
|
3164
|
-
padding-left: 12px;
|
|
3165
|
-
padding-left: var(--size-12);
|
|
3166
|
-
padding-right: 12px;
|
|
3167
|
-
padding-right: var(--size-12);
|
|
3168
|
-
}
|
|
3169
3134
|
.wds-list-item-spotlight-active {
|
|
3170
3135
|
background-color: rgba(134,167,189,0.10196);
|
|
3171
3136
|
background-color: var(--color-background-neutral);
|
|
@@ -5,7 +5,7 @@
|
|
|
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;
|
|
@@ -93,7 +93,7 @@
|
|
|
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);
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
grid-template-areas: "body";
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
@container (max-width:
|
|
224
|
+
@container (max-width: 296px) {
|
|
225
225
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
226
226
|
grid-template-columns: auto 1fr;
|
|
227
227
|
grid-template-rows: auto auto auto;
|
|
@@ -368,8 +368,8 @@
|
|
|
368
368
|
background-color: #ffffff;
|
|
369
369
|
background-color: var(--color-background-screen);
|
|
370
370
|
position: relative;
|
|
371
|
-
padding: 12px
|
|
372
|
-
padding: var(--size-12)
|
|
371
|
+
padding: 12px;
|
|
372
|
+
padding: var(--size-12);
|
|
373
373
|
container-type: inline-size;
|
|
374
374
|
}
|
|
375
375
|
.wds-list-item + .wds-list-item-spotlight,
|
|
@@ -403,6 +403,12 @@
|
|
|
403
403
|
.wds-list-item-interactive .np-checkbox-button:has(input[type="checkbox"]:focus-visible) .tw-checkbox-button {
|
|
404
404
|
outline: none;
|
|
405
405
|
}
|
|
406
|
+
.wds-list-item-interactive:has(.wds-list-item-control:focus-visible),
|
|
407
|
+
.wds-list-item-interactive:has(input[type="checkbox"]:focus-visible) {
|
|
408
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
409
|
+
outline-offset: var(--ring-outline-offset);
|
|
410
|
+
outline-offset: -1px;
|
|
411
|
+
}
|
|
406
412
|
.wds-list-item-interactive .wds-list-item-additional-info {
|
|
407
413
|
--ring-outline-offset: 0;
|
|
408
414
|
}
|
|
@@ -421,59 +427,24 @@
|
|
|
421
427
|
position: absolute;
|
|
422
428
|
inset: 0;
|
|
423
429
|
}
|
|
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 {
|
|
430
|
+
.wds-list-item-interactive:not(.disabled):not(:disabled):hover {
|
|
431
431
|
background-color: var(--color-background-screen-hover);
|
|
432
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 {
|
|
460
|
-
background-color: var(--color-background-screen-hover);
|
|
461
|
-
}
|
|
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
433
|
.wds-list-item-interactive:not(.disabled):not(:disabled):hover .wds-list-item-control-wrapper .wds-Button {
|
|
470
434
|
background-color: var(--Button-background-hover);
|
|
471
435
|
color: var(--Button-color-hover);
|
|
472
436
|
transition: none;
|
|
473
437
|
}
|
|
438
|
+
.wds-list-item-interactive:not(.disabled):not(:disabled):active {
|
|
439
|
+
background-color: var(--color-background-screen-active);
|
|
440
|
+
}
|
|
474
441
|
.wds-list-item-interactive .wds-list-item-button-control .wds-Button {
|
|
475
442
|
transition: none;
|
|
476
443
|
}
|
|
444
|
+
.wds-list-item-interactive:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover {
|
|
445
|
+
background-color: transparent;
|
|
446
|
+
background-color: initial;
|
|
447
|
+
}
|
|
477
448
|
.wds-list-item-media {
|
|
478
449
|
grid-area: media;
|
|
479
450
|
}
|
|
@@ -525,12 +496,6 @@
|
|
|
525
496
|
color: #768e9c;
|
|
526
497
|
color: var(--color-content-tertiary);
|
|
527
498
|
}
|
|
528
|
-
.wds-list-item-spotlight {
|
|
529
|
-
padding-left: 12px;
|
|
530
|
-
padding-left: var(--size-12);
|
|
531
|
-
padding-right: 12px;
|
|
532
|
-
padding-right: var(--size-12);
|
|
533
|
-
}
|
|
534
499
|
.wds-list-item-spotlight-active {
|
|
535
500
|
background-color: rgba(134,167,189,0.10196);
|
|
536
501
|
background-color: var(--color-background-neutral);
|
|
@@ -5,7 +5,7 @@
|
|
|
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;
|
|
@@ -93,7 +93,7 @@
|
|
|
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);
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
grid-template-areas: "body";
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
@container (max-width:
|
|
224
|
+
@container (max-width: 296px) {
|
|
225
225
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
226
226
|
grid-template-columns: auto 1fr;
|
|
227
227
|
grid-template-rows: auto auto auto;
|
package/build/styles/main.css
CHANGED
|
@@ -2640,7 +2640,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2640
2640
|
gap: 4px 16px;
|
|
2641
2641
|
gap: var(--size-4) var(--size-16);
|
|
2642
2642
|
}
|
|
2643
|
-
@container (min-width:
|
|
2643
|
+
@container (min-width: 375px) {
|
|
2644
2644
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
2645
2645
|
grid-template-columns: auto 1fr auto;
|
|
2646
2646
|
grid-template-rows: auto auto auto;
|
|
@@ -2728,7 +2728,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2728
2728
|
grid-template-areas: "body";
|
|
2729
2729
|
}
|
|
2730
2730
|
}
|
|
2731
|
-
@container (min-width:
|
|
2731
|
+
@container (min-width: 297px) and (max-width: 375px) {
|
|
2732
2732
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl .wds-list-item-media {
|
|
2733
2733
|
margin-bottom: 12px;
|
|
2734
2734
|
margin-bottom: var(--size-12);
|
|
@@ -2856,7 +2856,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2856
2856
|
grid-template-areas: "body";
|
|
2857
2857
|
}
|
|
2858
2858
|
}
|
|
2859
|
-
@container (max-width:
|
|
2859
|
+
@container (max-width: 296px) {
|
|
2860
2860
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
2861
2861
|
grid-template-columns: auto 1fr;
|
|
2862
2862
|
grid-template-rows: auto auto auto;
|
|
@@ -3003,8 +3003,8 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3003
3003
|
background-color: #ffffff;
|
|
3004
3004
|
background-color: var(--color-background-screen);
|
|
3005
3005
|
position: relative;
|
|
3006
|
-
padding: 12px
|
|
3007
|
-
padding: var(--size-12)
|
|
3006
|
+
padding: 12px;
|
|
3007
|
+
padding: var(--size-12);
|
|
3008
3008
|
container-type: inline-size;
|
|
3009
3009
|
}
|
|
3010
3010
|
.wds-list-item + .wds-list-item-spotlight,
|
|
@@ -3038,6 +3038,12 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3038
3038
|
.wds-list-item-interactive .np-checkbox-button:has(input[type="checkbox"]:focus-visible) .tw-checkbox-button {
|
|
3039
3039
|
outline: none;
|
|
3040
3040
|
}
|
|
3041
|
+
.wds-list-item-interactive:has(.wds-list-item-control:focus-visible),
|
|
3042
|
+
.wds-list-item-interactive:has(input[type="checkbox"]:focus-visible) {
|
|
3043
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
3044
|
+
outline-offset: var(--ring-outline-offset);
|
|
3045
|
+
outline-offset: -1px;
|
|
3046
|
+
}
|
|
3041
3047
|
.wds-list-item-interactive .wds-list-item-additional-info {
|
|
3042
3048
|
--ring-outline-offset: 0;
|
|
3043
3049
|
}
|
|
@@ -3056,59 +3062,24 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3056
3062
|
position: absolute;
|
|
3057
3063
|
inset: 0;
|
|
3058
3064
|
}
|
|
3059
|
-
.wds-list-item-interactive
|
|
3060
|
-
.wds-list-item-interactive.wds-list-item-spotlight:has(input[type="checkbox"]:focus-visible) {
|
|
3061
|
-
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
3062
|
-
outline-offset: var(--ring-outline-offset);
|
|
3063
|
-
outline-offset: -1px;
|
|
3064
|
-
}
|
|
3065
|
-
.wds-list-item-interactive.wds-list-item-spotlight:not(.disabled):not(:disabled):hover {
|
|
3065
|
+
.wds-list-item-interactive:not(.disabled):not(:disabled):hover {
|
|
3066
3066
|
background-color: var(--color-background-screen-hover);
|
|
3067
3067
|
}
|
|
3068
|
-
.wds-list-item-interactive.wds-list-item-spotlight:not(.disabled):not(:disabled):active {
|
|
3069
|
-
background-color: var(--color-background-screen-active);
|
|
3070
|
-
}
|
|
3071
|
-
.wds-list-item-interactive.wds-list-item-spotlight:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover {
|
|
3072
|
-
background-color: transparent;
|
|
3073
|
-
background-color: initial;
|
|
3074
|
-
}
|
|
3075
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):has(.wds-list-item-control:focus-visible):before,
|
|
3076
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):has(input[type="checkbox"]:focus-visible):before {
|
|
3077
|
-
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
3078
|
-
outline-offset: var(--ring-outline-offset);
|
|
3079
|
-
content: '';
|
|
3080
|
-
position: absolute;
|
|
3081
|
-
inset: 0 -8px;
|
|
3082
|
-
border-radius: 16px;
|
|
3083
|
-
border-radius: var(--radius-medium);
|
|
3084
|
-
outline-offset: -1px;
|
|
3085
|
-
}
|
|
3086
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):hover:before,
|
|
3087
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):active:before {
|
|
3088
|
-
content: '';
|
|
3089
|
-
position: absolute;
|
|
3090
|
-
inset: 0 -8px;
|
|
3091
|
-
border-radius: 16px;
|
|
3092
|
-
border-radius: var(--radius-medium);
|
|
3093
|
-
}
|
|
3094
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):hover:before {
|
|
3095
|
-
background-color: var(--color-background-screen-hover);
|
|
3096
|
-
}
|
|
3097
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):active:before {
|
|
3098
|
-
background-color: var(--color-background-screen-active);
|
|
3099
|
-
}
|
|
3100
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover:before {
|
|
3101
|
-
background-color: transparent;
|
|
3102
|
-
background-color: initial;
|
|
3103
|
-
}
|
|
3104
3068
|
.wds-list-item-interactive:not(.disabled):not(:disabled):hover .wds-list-item-control-wrapper .wds-Button {
|
|
3105
3069
|
background-color: var(--Button-background-hover);
|
|
3106
3070
|
color: var(--Button-color-hover);
|
|
3107
3071
|
transition: none;
|
|
3108
3072
|
}
|
|
3073
|
+
.wds-list-item-interactive:not(.disabled):not(:disabled):active {
|
|
3074
|
+
background-color: var(--color-background-screen-active);
|
|
3075
|
+
}
|
|
3109
3076
|
.wds-list-item-interactive .wds-list-item-button-control .wds-Button {
|
|
3110
3077
|
transition: none;
|
|
3111
3078
|
}
|
|
3079
|
+
.wds-list-item-interactive:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover {
|
|
3080
|
+
background-color: transparent;
|
|
3081
|
+
background-color: initial;
|
|
3082
|
+
}
|
|
3112
3083
|
.wds-list-item-media {
|
|
3113
3084
|
grid-area: media;
|
|
3114
3085
|
}
|
|
@@ -3160,12 +3131,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3160
3131
|
color: #768e9c;
|
|
3161
3132
|
color: var(--color-content-tertiary);
|
|
3162
3133
|
}
|
|
3163
|
-
.wds-list-item-spotlight {
|
|
3164
|
-
padding-left: 12px;
|
|
3165
|
-
padding-left: var(--size-12);
|
|
3166
|
-
padding-right: 12px;
|
|
3167
|
-
padding-right: var(--size-12);
|
|
3168
|
-
}
|
|
3169
3134
|
.wds-list-item-spotlight-active {
|
|
3170
3135
|
background-color: rgba(134,167,189,0.10196);
|
|
3171
3136
|
background-color: var(--color-background-neutral);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-d7fd1c8",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
"storybook": "^9.0.18",
|
|
84
84
|
"storybook-addon-tag-badges": "^2.0.1",
|
|
85
85
|
"storybook-addon-test-codegen": "^2.0.1",
|
|
86
|
-
"@transferwise/less-config": "3.1.2",
|
|
87
86
|
"@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/less-config": "3.1.2"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"@transferwise/icons": "^3.22.3",
|
|
@@ -5,7 +5,7 @@
|
|
|
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;
|
|
@@ -93,7 +93,7 @@
|
|
|
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);
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
grid-template-areas: "body";
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
@container (max-width:
|
|
224
|
+
@container (max-width: 296px) {
|
|
225
225
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
226
226
|
grid-template-columns: auto 1fr;
|
|
227
227
|
grid-template-rows: auto auto auto;
|
|
@@ -368,8 +368,8 @@
|
|
|
368
368
|
background-color: #ffffff;
|
|
369
369
|
background-color: var(--color-background-screen);
|
|
370
370
|
position: relative;
|
|
371
|
-
padding: 12px
|
|
372
|
-
padding: var(--size-12)
|
|
371
|
+
padding: 12px;
|
|
372
|
+
padding: var(--size-12);
|
|
373
373
|
container-type: inline-size;
|
|
374
374
|
}
|
|
375
375
|
.wds-list-item + .wds-list-item-spotlight,
|
|
@@ -403,6 +403,12 @@
|
|
|
403
403
|
.wds-list-item-interactive .np-checkbox-button:has(input[type="checkbox"]:focus-visible) .tw-checkbox-button {
|
|
404
404
|
outline: none;
|
|
405
405
|
}
|
|
406
|
+
.wds-list-item-interactive:has(.wds-list-item-control:focus-visible),
|
|
407
|
+
.wds-list-item-interactive:has(input[type="checkbox"]:focus-visible) {
|
|
408
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
409
|
+
outline-offset: var(--ring-outline-offset);
|
|
410
|
+
outline-offset: -1px;
|
|
411
|
+
}
|
|
406
412
|
.wds-list-item-interactive .wds-list-item-additional-info {
|
|
407
413
|
--ring-outline-offset: 0;
|
|
408
414
|
}
|
|
@@ -421,59 +427,24 @@
|
|
|
421
427
|
position: absolute;
|
|
422
428
|
inset: 0;
|
|
423
429
|
}
|
|
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 {
|
|
430
|
+
.wds-list-item-interactive:not(.disabled):not(:disabled):hover {
|
|
431
431
|
background-color: var(--color-background-screen-hover);
|
|
432
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 {
|
|
460
|
-
background-color: var(--color-background-screen-hover);
|
|
461
|
-
}
|
|
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
433
|
.wds-list-item-interactive:not(.disabled):not(:disabled):hover .wds-list-item-control-wrapper .wds-Button {
|
|
470
434
|
background-color: var(--Button-background-hover);
|
|
471
435
|
color: var(--Button-color-hover);
|
|
472
436
|
transition: none;
|
|
473
437
|
}
|
|
438
|
+
.wds-list-item-interactive:not(.disabled):not(:disabled):active {
|
|
439
|
+
background-color: var(--color-background-screen-active);
|
|
440
|
+
}
|
|
474
441
|
.wds-list-item-interactive .wds-list-item-button-control .wds-Button {
|
|
475
442
|
transition: none;
|
|
476
443
|
}
|
|
444
|
+
.wds-list-item-interactive:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover {
|
|
445
|
+
background-color: transparent;
|
|
446
|
+
background-color: initial;
|
|
447
|
+
}
|
|
477
448
|
.wds-list-item-media {
|
|
478
449
|
grid-area: media;
|
|
479
450
|
}
|
|
@@ -525,12 +496,6 @@
|
|
|
525
496
|
color: #768e9c;
|
|
526
497
|
color: var(--color-content-tertiary);
|
|
527
498
|
}
|
|
528
|
-
.wds-list-item-spotlight {
|
|
529
|
-
padding-left: 12px;
|
|
530
|
-
padding-left: var(--size-12);
|
|
531
|
-
padding-right: 12px;
|
|
532
|
-
padding-right: var(--size-12);
|
|
533
|
-
}
|
|
534
499
|
.wds-list-item-spotlight-active {
|
|
535
500
|
background-color: rgba(134,167,189,0.10196);
|
|
536
501
|
background-color: var(--color-background-neutral);
|
|
@@ -5,7 +5,7 @@
|
|
|
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;
|
|
@@ -93,7 +93,7 @@
|
|
|
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);
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
grid-template-areas: "body";
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
@container (max-width:
|
|
224
|
+
@container (max-width: 296px) {
|
|
225
225
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
226
226
|
grid-template-columns: auto 1fr;
|
|
227
227
|
grid-template-rows: auto auto auto;
|
|
@@ -3,7 +3,7 @@
|
|
|
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;
|
|
@@ -149,7 +149,7 @@
|
|
|
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);
|
|
@@ -378,7 +378,7 @@
|
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
-
@container (max-width:
|
|
381
|
+
@container (max-width: 296px) {
|
|
382
382
|
&.wds-list-item-hasMedia-hasControl {
|
|
383
383
|
&.wds-list-item-hasInfo-hasPrompt {
|
|
384
384
|
grid-template-columns: auto 1fr;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
border-radius: var(--radius-medium);
|
|
8
8
|
background-color: var(--color-background-screen);
|
|
9
9
|
position: relative;
|
|
10
|
-
padding: var(--size-12)
|
|
10
|
+
padding: var(--size-12);
|
|
11
11
|
container-type: inline-size;
|
|
12
12
|
|
|
13
13
|
& + .wds-list-item-spotlight,
|
|
@@ -47,6 +47,12 @@
|
|
|
47
47
|
outline: none;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
&:has(.wds-list-item-control:focus-visible),
|
|
51
|
+
&:has(input[type="checkbox"]:focus-visible) {
|
|
52
|
+
.ring();
|
|
53
|
+
outline-offset: -1px;
|
|
54
|
+
}
|
|
55
|
+
|
|
50
56
|
.wds-list-item-additional-info {
|
|
51
57
|
.ring-offset-0
|
|
52
58
|
}
|
|
@@ -70,88 +76,32 @@
|
|
|
70
76
|
}
|
|
71
77
|
}
|
|
72
78
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
&:not(.disabled, :disabled) {
|
|
83
|
-
&:hover {
|
|
84
|
-
background-color: var(--color-background-screen-hover);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&:active {
|
|
88
|
-
background-color: var(--color-background-screen-active);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button) {
|
|
93
|
-
&:hover {
|
|
94
|
-
background-color: unset;
|
|
79
|
+
&:not(.disabled, :disabled):hover {
|
|
80
|
+
background-color: var(--color-background-screen-hover);
|
|
81
|
+
|
|
82
|
+
.wds-list-item-control-wrapper {
|
|
83
|
+
.wds-Button {
|
|
84
|
+
background-color: var(--Button-background-hover);
|
|
85
|
+
color: var(--Button-color-hover);
|
|
86
|
+
transition: none;
|
|
87
|
+
}
|
|
95
88
|
}
|
|
96
|
-
}
|
|
97
89
|
}
|
|
98
90
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
&:not(.wds-list-item-spotlight) {
|
|
102
|
-
&:has(.wds-list-item-control:focus-visible),
|
|
103
|
-
&:has(input[type="checkbox"]:focus-visible) {
|
|
104
|
-
&:before {
|
|
105
|
-
.ring();
|
|
106
|
-
content: '';
|
|
107
|
-
position: absolute;
|
|
108
|
-
inset: 0 -8px;
|
|
109
|
-
border-radius: var(--radius-medium);
|
|
110
|
-
outline-offset: -1px;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&:not(.disabled, :disabled) {
|
|
115
|
-
&:hover,
|
|
116
|
-
&:active {
|
|
117
|
-
&:before {
|
|
118
|
-
content: '';
|
|
119
|
-
position: absolute;
|
|
120
|
-
inset: 0 -8px;
|
|
121
|
-
border-radius: var(--radius-medium);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&:hover:before {
|
|
126
|
-
background-color: var(--color-background-screen-hover);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&:active:before {
|
|
130
|
-
background-color: var(--color-background-screen-active);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button) {
|
|
135
|
-
&:hover:before {
|
|
136
|
-
background-color: unset;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
91
|
+
&:not(.disabled, :disabled):active {
|
|
92
|
+
background-color: var(--color-background-screen-active);
|
|
139
93
|
}
|
|
140
94
|
|
|
141
|
-
|
|
142
|
-
.wds-list-item-control-wrapper {
|
|
95
|
+
.wds-list-item-button-control {
|
|
143
96
|
.wds-Button {
|
|
144
|
-
background-color: var(--Button-background-hover);
|
|
145
|
-
color: var(--Button-color-hover);
|
|
146
97
|
transition: none;
|
|
147
98
|
}
|
|
148
99
|
}
|
|
149
|
-
}
|
|
150
100
|
|
|
151
|
-
.wds-list-item-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
101
|
+
&:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button) {
|
|
102
|
+
&:hover {
|
|
103
|
+
background-color: unset;
|
|
104
|
+
}
|
|
155
105
|
}
|
|
156
106
|
}
|
|
157
107
|
|
|
@@ -212,9 +162,6 @@
|
|
|
212
162
|
|
|
213
163
|
|
|
214
164
|
&-spotlight {
|
|
215
|
-
padding-left: var(--size-12);
|
|
216
|
-
padding-right: var(--size-12);
|
|
217
|
-
|
|
218
165
|
&-active {
|
|
219
166
|
background-color: var(--color-background-neutral);
|
|
220
167
|
&:not(.disabled, :disabled):hover {
|
|
@@ -2,6 +2,7 @@ import { useState } from 'react';
|
|
|
2
2
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
3
3
|
import { MultiCurrency, Plus } from '@transferwise/icons';
|
|
4
4
|
import { lorem5, lorem10 } from '../../test-utils';
|
|
5
|
+
import Emphasis from '../../emphasis';
|
|
5
6
|
import { ListItem, Props as ItemProps } from '../ListItem';
|
|
6
7
|
import {
|
|
7
8
|
SB_LIST_ITEM_CONTROLS as CONTROLS,
|
|
@@ -277,9 +278,9 @@ export const Responsiveness: Story = {
|
|
|
277
278
|
return (
|
|
278
279
|
<ol
|
|
279
280
|
className="list-unstyled"
|
|
280
|
-
style={{ display: 'grid', gridTemplateColumns: '
|
|
281
|
+
style={{ display: 'grid', gridTemplateColumns: '320px 360px 400px', gap: 16 }}
|
|
281
282
|
>
|
|
282
|
-
<div style={{ width: '
|
|
283
|
+
<div style={{ width: '320px' }}>
|
|
283
284
|
<ListItem
|
|
284
285
|
{...args}
|
|
285
286
|
subtitle={lorem10}
|
|
@@ -289,7 +290,7 @@ export const Responsiveness: Story = {
|
|
|
289
290
|
prompt={PROMPTS.interactive}
|
|
290
291
|
/>
|
|
291
292
|
</div>
|
|
292
|
-
<div style={{ width: '
|
|
293
|
+
<div style={{ width: '360px' }}>
|
|
293
294
|
<ListItem
|
|
294
295
|
{...args}
|
|
295
296
|
subtitle={lorem10}
|
|
@@ -299,7 +300,7 @@ export const Responsiveness: Story = {
|
|
|
299
300
|
prompt={PROMPTS.interactive}
|
|
300
301
|
/>
|
|
301
302
|
</div>
|
|
302
|
-
<div style={{ width: '
|
|
303
|
+
<div style={{ width: '400px' }}>
|
|
303
304
|
<ListItem
|
|
304
305
|
{...args}
|
|
305
306
|
subtitle={lorem10}
|
|
@@ -425,7 +426,7 @@ export const Spotlight: Story = {
|
|
|
425
426
|
* All of these limitations were put in place to ensure that the list item is compliant with
|
|
426
427
|
* accessibility guidance and offers consistent experience across all engineering platforms.
|
|
427
428
|
*
|
|
428
|
-
* Please refer to the [design documentation](https://wise.design/components/list-item
|
|
429
|
+
* Please refer to the [design documentation](https://wise.design/components/list-item#interaction) for more details.
|
|
429
430
|
*/
|
|
430
431
|
export const Interactivity: Story = {
|
|
431
432
|
render: function Render() {
|
|
@@ -501,6 +502,8 @@ export const Interactivity: Story = {
|
|
|
501
502
|
* to a new icon for improved user experience and accessibility. <br />
|
|
502
503
|
* For the same reason, only the control part of the List Item is dimmed, while all the content
|
|
503
504
|
* retains high contrast and interactivity.
|
|
505
|
+
*
|
|
506
|
+
* Please refer to the [design documentation](https://wise.design/components/list-item#accessibility:~:text=-,Disabled%20states,-) for more details
|
|
504
507
|
*/
|
|
505
508
|
export const Disabled: Story = {
|
|
506
509
|
parameters: {
|
|
@@ -668,3 +671,37 @@ export const Disabled: Story = {
|
|
|
668
671
|
</div>
|
|
669
672
|
),
|
|
670
673
|
};
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* For backwards compatibility, all of the ListItem's content elements accept `ReactNode`.
|
|
677
|
+
* That said, most of them should be fed with plain text only. The exception is `valueTitle`
|
|
678
|
+
* and `valueSubtitle` which can be augmented with sentiment colours, strikethrough or bold
|
|
679
|
+
* styles. <br />
|
|
680
|
+
*
|
|
681
|
+
* Please refer to the [design documentation](https://wise.design/components/list-item#content) for more details.
|
|
682
|
+
*/
|
|
683
|
+
export const StylingLabels: Story = {
|
|
684
|
+
args: {
|
|
685
|
+
title: lorem5,
|
|
686
|
+
subtitle: lorem10,
|
|
687
|
+
media: MEDIA.image,
|
|
688
|
+
control: CONTROLS.iconButton,
|
|
689
|
+
prompt: PROMPTS.interactive,
|
|
690
|
+
},
|
|
691
|
+
render: function Render(args) {
|
|
692
|
+
return (
|
|
693
|
+
<ol className="list-unstyled">
|
|
694
|
+
<ListItem
|
|
695
|
+
{...args}
|
|
696
|
+
valueTitle={<Emphasis text="<negative>100 GBP</negative>" />}
|
|
697
|
+
valueSubtitle={<s>125 GBP</s>}
|
|
698
|
+
/>
|
|
699
|
+
<ListItem
|
|
700
|
+
{...args}
|
|
701
|
+
valueTitle={<Emphasis text="<positive>100 GBP</positive>" />}
|
|
702
|
+
valueSubtitle={<strong>125 GBP</strong>}
|
|
703
|
+
/>
|
|
704
|
+
</ol>
|
|
705
|
+
);
|
|
706
|
+
},
|
|
707
|
+
};
|
package/src/main.css
CHANGED
|
@@ -2640,7 +2640,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2640
2640
|
gap: 4px 16px;
|
|
2641
2641
|
gap: var(--size-4) var(--size-16);
|
|
2642
2642
|
}
|
|
2643
|
-
@container (min-width:
|
|
2643
|
+
@container (min-width: 375px) {
|
|
2644
2644
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
2645
2645
|
grid-template-columns: auto 1fr auto;
|
|
2646
2646
|
grid-template-rows: auto auto auto;
|
|
@@ -2728,7 +2728,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2728
2728
|
grid-template-areas: "body";
|
|
2729
2729
|
}
|
|
2730
2730
|
}
|
|
2731
|
-
@container (min-width:
|
|
2731
|
+
@container (min-width: 297px) and (max-width: 375px) {
|
|
2732
2732
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl .wds-list-item-media {
|
|
2733
2733
|
margin-bottom: 12px;
|
|
2734
2734
|
margin-bottom: var(--size-12);
|
|
@@ -2856,7 +2856,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2856
2856
|
grid-template-areas: "body";
|
|
2857
2857
|
}
|
|
2858
2858
|
}
|
|
2859
|
-
@container (max-width:
|
|
2859
|
+
@container (max-width: 296px) {
|
|
2860
2860
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
2861
2861
|
grid-template-columns: auto 1fr;
|
|
2862
2862
|
grid-template-rows: auto auto auto;
|
|
@@ -3003,8 +3003,8 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3003
3003
|
background-color: #ffffff;
|
|
3004
3004
|
background-color: var(--color-background-screen);
|
|
3005
3005
|
position: relative;
|
|
3006
|
-
padding: 12px
|
|
3007
|
-
padding: var(--size-12)
|
|
3006
|
+
padding: 12px;
|
|
3007
|
+
padding: var(--size-12);
|
|
3008
3008
|
container-type: inline-size;
|
|
3009
3009
|
}
|
|
3010
3010
|
.wds-list-item + .wds-list-item-spotlight,
|
|
@@ -3038,6 +3038,12 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3038
3038
|
.wds-list-item-interactive .np-checkbox-button:has(input[type="checkbox"]:focus-visible) .tw-checkbox-button {
|
|
3039
3039
|
outline: none;
|
|
3040
3040
|
}
|
|
3041
|
+
.wds-list-item-interactive:has(.wds-list-item-control:focus-visible),
|
|
3042
|
+
.wds-list-item-interactive:has(input[type="checkbox"]:focus-visible) {
|
|
3043
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
3044
|
+
outline-offset: var(--ring-outline-offset);
|
|
3045
|
+
outline-offset: -1px;
|
|
3046
|
+
}
|
|
3041
3047
|
.wds-list-item-interactive .wds-list-item-additional-info {
|
|
3042
3048
|
--ring-outline-offset: 0;
|
|
3043
3049
|
}
|
|
@@ -3056,59 +3062,24 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3056
3062
|
position: absolute;
|
|
3057
3063
|
inset: 0;
|
|
3058
3064
|
}
|
|
3059
|
-
.wds-list-item-interactive
|
|
3060
|
-
.wds-list-item-interactive.wds-list-item-spotlight:has(input[type="checkbox"]:focus-visible) {
|
|
3061
|
-
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
3062
|
-
outline-offset: var(--ring-outline-offset);
|
|
3063
|
-
outline-offset: -1px;
|
|
3064
|
-
}
|
|
3065
|
-
.wds-list-item-interactive.wds-list-item-spotlight:not(.disabled):not(:disabled):hover {
|
|
3065
|
+
.wds-list-item-interactive:not(.disabled):not(:disabled):hover {
|
|
3066
3066
|
background-color: var(--color-background-screen-hover);
|
|
3067
3067
|
}
|
|
3068
|
-
.wds-list-item-interactive.wds-list-item-spotlight:not(.disabled):not(:disabled):active {
|
|
3069
|
-
background-color: var(--color-background-screen-active);
|
|
3070
|
-
}
|
|
3071
|
-
.wds-list-item-interactive.wds-list-item-spotlight:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover {
|
|
3072
|
-
background-color: transparent;
|
|
3073
|
-
background-color: initial;
|
|
3074
|
-
}
|
|
3075
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):has(.wds-list-item-control:focus-visible):before,
|
|
3076
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):has(input[type="checkbox"]:focus-visible):before {
|
|
3077
|
-
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
3078
|
-
outline-offset: var(--ring-outline-offset);
|
|
3079
|
-
content: '';
|
|
3080
|
-
position: absolute;
|
|
3081
|
-
inset: 0 -8px;
|
|
3082
|
-
border-radius: 16px;
|
|
3083
|
-
border-radius: var(--radius-medium);
|
|
3084
|
-
outline-offset: -1px;
|
|
3085
|
-
}
|
|
3086
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):hover:before,
|
|
3087
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):active:before {
|
|
3088
|
-
content: '';
|
|
3089
|
-
position: absolute;
|
|
3090
|
-
inset: 0 -8px;
|
|
3091
|
-
border-radius: 16px;
|
|
3092
|
-
border-radius: var(--radius-medium);
|
|
3093
|
-
}
|
|
3094
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):hover:before {
|
|
3095
|
-
background-color: var(--color-background-screen-hover);
|
|
3096
|
-
}
|
|
3097
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):active:before {
|
|
3098
|
-
background-color: var(--color-background-screen-active);
|
|
3099
|
-
}
|
|
3100
|
-
.wds-list-item-interactive:not(.wds-list-item-spotlight):has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover:before {
|
|
3101
|
-
background-color: transparent;
|
|
3102
|
-
background-color: initial;
|
|
3103
|
-
}
|
|
3104
3068
|
.wds-list-item-interactive:not(.disabled):not(:disabled):hover .wds-list-item-control-wrapper .wds-Button {
|
|
3105
3069
|
background-color: var(--Button-background-hover);
|
|
3106
3070
|
color: var(--Button-color-hover);
|
|
3107
3071
|
transition: none;
|
|
3108
3072
|
}
|
|
3073
|
+
.wds-list-item-interactive:not(.disabled):not(:disabled):active {
|
|
3074
|
+
background-color: var(--color-background-screen-active);
|
|
3075
|
+
}
|
|
3109
3076
|
.wds-list-item-interactive .wds-list-item-button-control .wds-Button {
|
|
3110
3077
|
transition: none;
|
|
3111
3078
|
}
|
|
3079
|
+
.wds-list-item-interactive:has(.wds-list-item-prompt:hover a, .wds-list-item-prompt:hover button):hover {
|
|
3080
|
+
background-color: transparent;
|
|
3081
|
+
background-color: initial;
|
|
3082
|
+
}
|
|
3112
3083
|
.wds-list-item-media {
|
|
3113
3084
|
grid-area: media;
|
|
3114
3085
|
}
|
|
@@ -3160,12 +3131,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3160
3131
|
color: #768e9c;
|
|
3161
3132
|
color: var(--color-content-tertiary);
|
|
3162
3133
|
}
|
|
3163
|
-
.wds-list-item-spotlight {
|
|
3164
|
-
padding-left: 12px;
|
|
3165
|
-
padding-left: var(--size-12);
|
|
3166
|
-
padding-right: 12px;
|
|
3167
|
-
padding-right: var(--size-12);
|
|
3168
|
-
}
|
|
3169
3134
|
.wds-list-item-spotlight-active {
|
|
3170
3135
|
background-color: rgba(134,167,189,0.10196);
|
|
3171
3136
|
background-color: var(--color-background-neutral);
|