@transferwise/components 0.0.0-experimental-d1cefe3 → 0.0.0-experimental-4242b3a

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 (195) hide show
  1. package/build/dateInput/DateInput.js +4 -4
  2. package/build/dateInput/DateInput.js.map +1 -1
  3. package/build/dateInput/DateInput.mjs +4 -4
  4. package/build/dateInput/DateInput.mjs.map +1 -1
  5. package/build/dateLookup/DateLookup.js +4 -4
  6. package/build/dateLookup/DateLookup.js.map +1 -1
  7. package/build/dateLookup/DateLookup.mjs +4 -4
  8. package/build/dateLookup/DateLookup.mjs.map +1 -1
  9. package/build/dateLookup/dayCalendar/table/DayCalendarTable.js +3 -3
  10. package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -1
  11. package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs +3 -3
  12. package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs.map +1 -1
  13. package/build/i18n/cs.json +2 -0
  14. package/build/i18n/cs.json.js +2 -0
  15. package/build/i18n/cs.json.js.map +1 -1
  16. package/build/i18n/cs.json.mjs +2 -0
  17. package/build/i18n/cs.json.mjs.map +1 -1
  18. package/build/i18n/de.json +2 -0
  19. package/build/i18n/de.json.js +2 -0
  20. package/build/i18n/de.json.js.map +1 -1
  21. package/build/i18n/de.json.mjs +2 -0
  22. package/build/i18n/de.json.mjs.map +1 -1
  23. package/build/i18n/es.json +2 -0
  24. package/build/i18n/es.json.js +2 -0
  25. package/build/i18n/es.json.js.map +1 -1
  26. package/build/i18n/es.json.mjs +2 -0
  27. package/build/i18n/es.json.mjs.map +1 -1
  28. package/build/i18n/fr.json +2 -0
  29. package/build/i18n/fr.json.js +2 -0
  30. package/build/i18n/fr.json.js.map +1 -1
  31. package/build/i18n/fr.json.mjs +2 -0
  32. package/build/i18n/fr.json.mjs.map +1 -1
  33. package/build/i18n/hu.json +2 -0
  34. package/build/i18n/hu.json.js +2 -0
  35. package/build/i18n/hu.json.js.map +1 -1
  36. package/build/i18n/hu.json.mjs +2 -0
  37. package/build/i18n/hu.json.mjs.map +1 -1
  38. package/build/i18n/id.json +2 -0
  39. package/build/i18n/id.json.js +2 -0
  40. package/build/i18n/id.json.js.map +1 -1
  41. package/build/i18n/id.json.mjs +2 -0
  42. package/build/i18n/id.json.mjs.map +1 -1
  43. package/build/i18n/it.json +2 -0
  44. package/build/i18n/it.json.js +2 -0
  45. package/build/i18n/it.json.js.map +1 -1
  46. package/build/i18n/it.json.mjs +2 -0
  47. package/build/i18n/it.json.mjs.map +1 -1
  48. package/build/i18n/ja.json +2 -0
  49. package/build/i18n/ja.json.js +2 -0
  50. package/build/i18n/ja.json.js.map +1 -1
  51. package/build/i18n/ja.json.mjs +2 -0
  52. package/build/i18n/ja.json.mjs.map +1 -1
  53. package/build/i18n/nl.json +2 -0
  54. package/build/i18n/pl.json +2 -0
  55. package/build/i18n/pl.json.js +2 -0
  56. package/build/i18n/pl.json.js.map +1 -1
  57. package/build/i18n/pl.json.mjs +2 -0
  58. package/build/i18n/pl.json.mjs.map +1 -1
  59. package/build/i18n/pt.json +2 -0
  60. package/build/i18n/pt.json.js +2 -0
  61. package/build/i18n/pt.json.js.map +1 -1
  62. package/build/i18n/pt.json.mjs +2 -0
  63. package/build/i18n/pt.json.mjs.map +1 -1
  64. package/build/i18n/ro.json +2 -0
  65. package/build/i18n/ro.json.js +2 -0
  66. package/build/i18n/ro.json.js.map +1 -1
  67. package/build/i18n/ro.json.mjs +2 -0
  68. package/build/i18n/ro.json.mjs.map +1 -1
  69. package/build/i18n/ru.json +2 -0
  70. package/build/i18n/ru.json.js +2 -0
  71. package/build/i18n/ru.json.js.map +1 -1
  72. package/build/i18n/ru.json.mjs +2 -0
  73. package/build/i18n/ru.json.mjs.map +1 -1
  74. package/build/i18n/th.json +2 -0
  75. package/build/i18n/th.json.js +2 -0
  76. package/build/i18n/th.json.js.map +1 -1
  77. package/build/i18n/th.json.mjs +2 -0
  78. package/build/i18n/th.json.mjs.map +1 -1
  79. package/build/i18n/tr.json +2 -0
  80. package/build/i18n/tr.json.js +2 -0
  81. package/build/i18n/tr.json.js.map +1 -1
  82. package/build/i18n/tr.json.mjs +2 -0
  83. package/build/i18n/tr.json.mjs.map +1 -1
  84. package/build/i18n/zh-CN.json +2 -0
  85. package/build/i18n/zh-CN.json.js +2 -0
  86. package/build/i18n/zh-CN.json.js.map +1 -1
  87. package/build/i18n/zh-CN.json.mjs +2 -0
  88. package/build/i18n/zh-CN.json.mjs.map +1 -1
  89. package/build/i18n/zh-HK.json +2 -0
  90. package/build/i18n/zh-HK.json.js +2 -0
  91. package/build/i18n/zh-HK.json.js.map +1 -1
  92. package/build/i18n/zh-HK.json.mjs +2 -0
  93. package/build/i18n/zh-HK.json.mjs.map +1 -1
  94. package/build/index.js +1 -0
  95. package/build/index.js.map +1 -1
  96. package/build/index.mjs +1 -1
  97. package/build/main.css +213 -13
  98. package/build/moneyInput/MoneyInput.js +2 -2
  99. package/build/moneyInput/MoneyInput.js.map +1 -1
  100. package/build/moneyInput/MoneyInput.mjs +2 -2
  101. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  102. package/build/snackbar/Snackbar.js +1 -1
  103. package/build/snackbar/Snackbar.js.map +1 -1
  104. package/build/snackbar/Snackbar.mjs +1 -1
  105. package/build/snackbar/Snackbar.mjs.map +1 -1
  106. package/build/styles/dateInput/DateInput.css +1 -13
  107. package/build/styles/listItem/ListItem.css +212 -0
  108. package/build/styles/main.css +213 -13
  109. package/build/tabs/Tabs.js +3 -3
  110. package/build/tabs/Tabs.js.map +1 -1
  111. package/build/tabs/Tabs.mjs +3 -3
  112. package/build/tabs/Tabs.mjs.map +1 -1
  113. package/build/typeahead/Typeahead.js +2 -2
  114. package/build/typeahead/Typeahead.js.map +1 -1
  115. package/build/typeahead/Typeahead.mjs +2 -2
  116. package/build/typeahead/Typeahead.mjs.map +1 -1
  117. package/build/typeahead/typeaheadInput/TypeaheadInput.js +2 -2
  118. package/build/typeahead/typeaheadInput/TypeaheadInput.js.map +1 -1
  119. package/build/typeahead/typeaheadInput/TypeaheadInput.mjs +2 -2
  120. package/build/typeahead/typeaheadInput/TypeaheadInput.mjs.map +1 -1
  121. package/build/types/index.d.ts +2 -0
  122. package/build/types/index.d.ts.map +1 -1
  123. package/build/types/listItem/ListItem.d.ts +50 -0
  124. package/build/types/listItem/ListItem.d.ts.map +1 -0
  125. package/build/types/listItem/ListItemAdditionalInfo.d.ts +9 -0
  126. package/build/types/listItem/ListItemAdditionalInfo.d.ts.map +1 -0
  127. package/build/types/listItem/ListItemButton.d.ts +6 -0
  128. package/build/types/listItem/ListItemButton.d.ts.map +1 -0
  129. package/build/types/listItem/ListItemCheckbox.d.ts +4 -0
  130. package/build/types/listItem/ListItemCheckbox.d.ts.map +1 -0
  131. package/build/types/listItem/ListItemIconButton.d.ts +8 -0
  132. package/build/types/listItem/ListItemIconButton.d.ts.map +1 -0
  133. package/build/types/listItem/ListItemMedia.d.ts +19 -0
  134. package/build/types/listItem/ListItemMedia.d.ts.map +1 -0
  135. package/build/types/listItem/ListItemNavigation.d.ts +4 -0
  136. package/build/types/listItem/ListItemNavigation.d.ts.map +1 -0
  137. package/build/types/listItem/ListItemSwitch.d.ts +3 -0
  138. package/build/types/listItem/ListItemSwitch.d.ts.map +1 -0
  139. package/build/types/listItem/index.d.ts +6 -0
  140. package/build/types/listItem/index.d.ts.map +1 -0
  141. package/build/types/listItem/prompt/Prompt.d.ts +12 -0
  142. package/build/types/listItem/prompt/Prompt.d.ts.map +1 -0
  143. package/build/types/listItem/useItemControl.d.ts +5 -0
  144. package/build/types/listItem/useItemControl.d.ts.map +1 -0
  145. package/build/upload/Upload.js +2 -2
  146. package/build/upload/Upload.js.map +1 -1
  147. package/build/upload/Upload.mjs +2 -2
  148. package/build/upload/Upload.mjs.map +1 -1
  149. package/build/upload/steps/uploadImageStep/uploadImageStep.js +1 -1
  150. package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
  151. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +1 -1
  152. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
  153. package/package.json +9 -9
  154. package/src/dateInput/DateInput.css +1 -13
  155. package/src/dateInput/DateInput.less +3 -20
  156. package/src/dateInput/DateInput.tests.story.tsx +3 -14
  157. package/src/dateInput/DateInput.tsx +4 -4
  158. package/src/i18n/cs.json +2 -0
  159. package/src/i18n/de.json +2 -0
  160. package/src/i18n/es.json +2 -0
  161. package/src/i18n/fr.json +2 -0
  162. package/src/i18n/hu.json +2 -0
  163. package/src/i18n/id.json +2 -0
  164. package/src/i18n/it.json +2 -0
  165. package/src/i18n/ja.json +2 -0
  166. package/src/i18n/nl.json +2 -0
  167. package/src/i18n/pl.json +2 -0
  168. package/src/i18n/pt.json +2 -0
  169. package/src/i18n/ro.json +2 -0
  170. package/src/i18n/ru.json +2 -0
  171. package/src/i18n/th.json +2 -0
  172. package/src/i18n/tr.json +2 -0
  173. package/src/i18n/zh-CN.json +2 -0
  174. package/src/i18n/zh-HK.json +2 -0
  175. package/src/index.ts +2 -0
  176. package/src/listItem/ListItem.css +212 -0
  177. package/src/listItem/ListItem.less +210 -0
  178. package/src/listItem/ListItem.spec.tsx +35 -0
  179. package/src/listItem/ListItem.story.tsx +461 -0
  180. package/src/listItem/ListItem.tsx +282 -0
  181. package/src/listItem/ListItemAdditionalInfo.tsx +31 -0
  182. package/src/listItem/ListItemButton.spec.tsx +92 -0
  183. package/src/listItem/ListItemButton.tsx +24 -0
  184. package/src/listItem/ListItemCheckbox.tsx +14 -0
  185. package/src/listItem/ListItemIconButton.tsx +16 -0
  186. package/src/listItem/ListItemMedia.tsx +52 -0
  187. package/src/listItem/ListItemNavigation.tsx +23 -0
  188. package/src/listItem/ListItemSwitch.tsx +8 -0
  189. package/src/listItem/index.ts +10 -0
  190. package/src/listItem/prompt/Prompt.spec.tsx +77 -0
  191. package/src/listItem/prompt/Prompt.story.tsx +170 -0
  192. package/src/listItem/prompt/Prompt.tsx +44 -0
  193. package/src/listItem/useItemControl.tsx +23 -0
  194. package/src/main.css +213 -13
  195. package/src/main.less +1 -0
@@ -0,0 +1,212 @@
1
+ .wds-list-item {
2
+ list-style: none;
3
+ width: 100%;
4
+ padding: 0;
5
+ border-radius: 16px;
6
+ border-radius: var(--radius-medium);
7
+ background-color: #ffffff;
8
+ background-color: var(--color-background-screen);
9
+ gap: 16px;
10
+ gap: var(--size-16);
11
+ }
12
+ .wds-list-item .partially-interactive {
13
+ padding: 16px;
14
+ padding: var(--size-16);
15
+ }
16
+ .wds-list-item label,
17
+ .wds-list-item a {
18
+ padding: 16px;
19
+ padding: var(--size-16);
20
+ }
21
+ .wds-list-item-interactive label {
22
+ cursor: pointer;
23
+ }
24
+ .wds-list-item-interactive:hover {
25
+ background-color: var(--color-background-screen-hover);
26
+ }
27
+ .wds-list-item-interactive:hover .wds-list-item-control .wds-Button {
28
+ background-color: var(--Button-background-hover);
29
+ color: var(--Button-color-hover);
30
+ transition: none;
31
+ }
32
+ .wds-list-item-interactive:active {
33
+ background-color: var(--color-background-screen-active);
34
+ }
35
+ .wds-list-item-interactive .wds-list-item-control .wds-Button {
36
+ transition: none;
37
+ }
38
+ .wds-list-item-media-image {
39
+ width: var(--item-media-image-size);
40
+ height: var(--item-media-image-size);
41
+ }
42
+ .wds-list-item-body {
43
+ width: 100%;
44
+ }
45
+ .wds-list-item-title {
46
+ color: #37517e;
47
+ color: var(--color-content-primary);
48
+ }
49
+ .wds-list-item-additional-info {
50
+ color: #768e9c;
51
+ color: var(--color-content-tertiary);
52
+ }
53
+ .wds-list-item-value {
54
+ flex: 0 0 auto;
55
+ }
56
+ .wds-list-item-control {
57
+ flex: 0 0 auto;
58
+ }
59
+ .wds-list-item-navigation,
60
+ .wds-list-item-navigation:hover,
61
+ .wds-list-item-navigation:focus {
62
+ -webkit-text-decoration: none;
63
+ text-decoration: none;
64
+ }
65
+ .wds-list-item-spotlight-active {
66
+ background-color: rgba(134,167,189,0.10196);
67
+ background-color: var(--color-background-neutral);
68
+ }
69
+ .wds-list-item-spotlight-active:not(.disabled):not(:disabled):hover {
70
+ background-color: var(--color-background-neutral-hover);
71
+ }
72
+ .wds-list-item-spotlight-active:not(.disabled):not(:disabled):active {
73
+ background-color: var(--color-background-neutral-active);
74
+ }
75
+ .wds-list-item-spotlight-inactive {
76
+ background-color: rgba(134, 167, 189, 0.025);
77
+ border: 1px dashed rgba(0,0,0,0.10196);
78
+ border: 1px dashed var(--color-border-neutral);
79
+ }
80
+ @supports (color: color-mix(in lch, red, blue)) {
81
+ .wds-list-item-spotlight-inactive {
82
+ background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
83
+ }
84
+ }
85
+ .wds-list-item-spotlight-inactive:not(.disabled):not(:disabled):hover {
86
+ background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
87
+ }
88
+ .wds-list-item-spotlight-inactive:not(.disabled):not(:disabled):active {
89
+ background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
90
+ }
91
+ .wds-list-item-prompt {
92
+ display: inline-flex;
93
+ padding-top: calc(8px / 2);
94
+ padding-top: calc(var(--padding-x-small) / 2);
95
+ padding-bottom: calc(8px / 2);
96
+ padding-bottom: calc(var(--padding-x-small) / 2);
97
+ padding-left: calc(8px - 1px);
98
+ padding-left: calc(var(--padding-x-small) - 1px);
99
+ padding-right: 8px;
100
+ padding-right: var(--padding-x-small);
101
+ border-radius: 10px;
102
+ border-radius: var(--radius-small);
103
+ word-break: break-word;
104
+ word-wrap: break-word;
105
+ }
106
+ .wds-list-item-prompt .np-prompt-icon {
107
+ padding-right: calc(12px / 2);
108
+ padding-right: calc(var(--size-12) / 2);
109
+ padding-top: calc(4px - 1px);
110
+ padding-top: calc(var(--size-4) - 1px);
111
+ padding-bottom: calc(4px - 1px);
112
+ padding-bottom: calc(var(--size-4) - 1px);
113
+ }
114
+ .wds-list-item-prompt .np-prompt-icon .tw-icon-tags,
115
+ .wds-list-item-prompt .np-prompt-icon .tw-icon-confetti {
116
+ color: var(--color-sentiment-positive-primary);
117
+ }
118
+ .wds-list-item-prompt a {
119
+ text-underline-offset: calc(4px / 2);
120
+ text-underline-offset: calc(var(--size-4) / 2);
121
+ }
122
+ .wds-list-item-prompt.np-prompt-interactive {
123
+ -webkit-text-decoration: none;
124
+ text-decoration: none;
125
+ cursor: pointer;
126
+ border: none;
127
+ }
128
+ .wds-list-item-prompt.negative {
129
+ background-color: var(--color-sentiment-negative-secondary);
130
+ color: var(--color-sentiment-negative-primary);
131
+ }
132
+ .wds-list-item-prompt.negative a {
133
+ color: var(--color-sentiment-negative-primary);
134
+ }
135
+ .wds-list-item-prompt.negative a:hover {
136
+ color: var(--color-sentiment-negative-primary-hover);
137
+ }
138
+ .wds-list-item-prompt.negative a:active {
139
+ color: var(--color-sentiment-negative-primary-active);
140
+ }
141
+ .np-prompt-interactive.wds-list-item-prompt.negative:hover {
142
+ background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 95%, var(--color-sentiment-negative-primary));
143
+ }
144
+ .np-prompt-interactive.wds-list-item-prompt.negative:active {
145
+ background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 90%, var(--color-sentiment-negative-primary));
146
+ }
147
+ .wds-list-item-prompt.positive,
148
+ .wds-list-item-prompt.discount,
149
+ .wds-list-item-prompt.savings {
150
+ background-color: var(--color-sentiment-positive-secondary);
151
+ color: var(--color-sentiment-positive-primary);
152
+ }
153
+ .wds-list-item-prompt.positive a,
154
+ .wds-list-item-prompt.discount a,
155
+ .wds-list-item-prompt.savings a {
156
+ color: var(--color-sentiment-positive-primary);
157
+ }
158
+ .wds-list-item-prompt.positive a:hover,
159
+ .wds-list-item-prompt.discount a:hover,
160
+ .wds-list-item-prompt.savings a:hover {
161
+ color: var(--color-sentiment-positive-primary-hover);
162
+ }
163
+ .wds-list-item-prompt.positive a:active,
164
+ .wds-list-item-prompt.discount a:active,
165
+ .wds-list-item-prompt.savings a:active {
166
+ color: var(--color-sentiment-positive-primary-active);
167
+ }
168
+ .np-prompt-interactive.wds-list-item-prompt.positive:hover,
169
+ .np-prompt-interactive.wds-list-item-prompt.discount:hover,
170
+ .np-prompt-interactive.wds-list-item-prompt.savings:hover {
171
+ background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 95%, var(--color-sentiment-positive-primary));
172
+ }
173
+ .np-prompt-interactive.wds-list-item-prompt.positive:active,
174
+ .np-prompt-interactive.wds-list-item-prompt.discount:active,
175
+ .np-prompt-interactive.wds-list-item-prompt.savings:active {
176
+ background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 90%, var(--color-sentiment-positive-primary));
177
+ }
178
+ .wds-list-item-prompt.neutral {
179
+ background-color: rgba(134,167,189,0.10196);
180
+ background-color: var(--color-background-neutral);
181
+ color: #37517e;
182
+ color: var(--color-content-primary);
183
+ }
184
+ .wds-list-item-prompt.neutral a {
185
+ color: #37517e;
186
+ color: var(--color-content-primary);
187
+ }
188
+ .np-prompt-interactive.wds-list-item-prompt.neutral:hover {
189
+ background-color: var(--color-background-neutral-hover);
190
+ }
191
+ .np-prompt-interactive.wds-list-item-prompt.neutral:active {
192
+ background-color: var(--color-background-neutral-active);
193
+ }
194
+ .wds-list-item-prompt.warning {
195
+ background-color: var(--color-sentiment-warning-secondary);
196
+ color: var(--color-sentiment-warning-content);
197
+ }
198
+ .wds-list-item-prompt.warning a {
199
+ color: var(--color-sentiment-warning-content);
200
+ }
201
+ .wds-list-item-prompt.warning a:hover {
202
+ color: var(--color-sentiment-warning-content-hover);
203
+ }
204
+ .wds-list-item-prompt.warning a:active {
205
+ color: var(--color-sentiment-warning-content-active);
206
+ }
207
+ .np-prompt-interactive.wds-list-item-prompt.warning:hover {
208
+ background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 90%, var(--color-sentiment-warning-primary));
209
+ }
210
+ .np-prompt-interactive.wds-list-item-prompt.warning:active {
211
+ background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 80%, var(--color-sentiment-warning-primary));
212
+ }
@@ -0,0 +1,210 @@
1
+ .wds-list-item {
2
+ list-style: none;
3
+ width: 100%;
4
+ padding: 0;
5
+ border-radius: var(--radius-medium);
6
+ background-color: var(--color-background-screen);
7
+ gap: var(--size-16);
8
+
9
+ .partially-interactive {
10
+ padding: var(--size-16);
11
+ }
12
+
13
+ label, a {
14
+ padding: var(--size-16);
15
+ }
16
+
17
+ &-interactive {
18
+ label {
19
+ cursor: pointer;
20
+ }
21
+ &:hover {
22
+ background-color: var(--color-background-screen-hover);
23
+ .wds-list-item-control {
24
+ .wds-Button {
25
+ background-color: var(--Button-background-hover);
26
+ color: var(--Button-color-hover);
27
+ transition: none;
28
+ }
29
+ }
30
+ }
31
+ &:active {
32
+ background-color: var(--color-background-screen-active);
33
+ }
34
+ .wds-list-item-control {
35
+ .wds-Button {
36
+ transition: none;
37
+ }
38
+ }
39
+ }
40
+
41
+ &-media {
42
+
43
+ &-image {
44
+ width: var(--item-media-image-size);
45
+ height: var(--item-media-image-size);
46
+ }
47
+ }
48
+
49
+ &-body {
50
+ width: 100%;
51
+ }
52
+
53
+ &-title {
54
+ color: var(--color-content-primary);
55
+ }
56
+
57
+ &-additional-info {
58
+ color: var(--color-content-tertiary);
59
+ }
60
+
61
+ &-value {
62
+ flex: 0 0 auto;
63
+ }
64
+
65
+ &-control {
66
+ flex: 0 0 auto;
67
+ }
68
+
69
+ &-navigation {
70
+ &, &:hover, &:focus {
71
+ text-decoration: none;
72
+ }
73
+ }
74
+
75
+ &-spotlight {
76
+ &-active {
77
+ background-color: var(--color-background-neutral);
78
+ &:not(.disabled, :disabled):hover {
79
+ background-color: var(--color-background-neutral-hover);
80
+ }
81
+ &:not(.disabled, :disabled):active {
82
+ background-color: var(--color-background-neutral-active);
83
+ }
84
+ }
85
+
86
+ &-inactive {
87
+ background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
88
+ border: 1px dashed var(--color-border-neutral);
89
+ &:not(.disabled, :disabled):hover {
90
+ background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
91
+ }
92
+ &:not(.disabled, :disabled):active {
93
+ background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
94
+ }
95
+ }
96
+ }
97
+
98
+ &-prompt {
99
+ display: inline-flex;
100
+ padding-top: calc(var(--padding-x-small) / 2);
101
+ padding-bottom: calc(var(--padding-x-small) / 2);
102
+ padding-left: calc(var(--padding-x-small) - 1px);
103
+ padding-right: var(--padding-x-small);
104
+ border-radius: var(--radius-small);
105
+ word-break: break-word;
106
+ overflow-wrap: break-word;
107
+
108
+ .np-prompt-icon {
109
+ padding-right: calc(var(--size-12) / 2);
110
+ padding-top: calc(var(--size-4) - 1px);
111
+ padding-bottom: calc(var(--size-4) - 1px);
112
+
113
+ .tw-icon-tags,
114
+ .tw-icon-confetti {
115
+ color: var(--color-sentiment-positive-primary);
116
+ }
117
+ }
118
+
119
+ a {
120
+ text-underline-offset: calc(var(--size-4) / 2);
121
+ }
122
+
123
+ &.np-prompt-interactive {
124
+ text-decoration: none;
125
+ cursor: pointer;
126
+ border: none;
127
+ }
128
+
129
+ &.negative {
130
+ background-color: var(--color-sentiment-negative-secondary);
131
+ color: var(--color-sentiment-negative-primary);
132
+ a {
133
+ color: var(--color-sentiment-negative-primary);
134
+ &:hover {
135
+ color: var(--color-sentiment-negative-primary-hover);
136
+ }
137
+ &:active {
138
+ color: var(--color-sentiment-negative-primary-active);
139
+ }
140
+ }
141
+ .np-prompt-interactive& {
142
+ &:hover {
143
+ background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 95%, var(--color-sentiment-negative-primary));
144
+ }
145
+ &:active {
146
+ background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 90%, var(--color-sentiment-negative-primary));
147
+ }
148
+ }
149
+ }
150
+ &.positive,
151
+ &.discount,
152
+ &.savings {
153
+ background-color: var(--color-sentiment-positive-secondary);
154
+ color: var(--color-sentiment-positive-primary);
155
+ a {
156
+ color: var(--color-sentiment-positive-primary);
157
+ &:hover {
158
+ color: var(--color-sentiment-positive-primary-hover);
159
+ }
160
+ &:active {
161
+ color: var(--color-sentiment-positive-primary-active);
162
+ }
163
+ }
164
+ .np-prompt-interactive& {
165
+ &:hover {
166
+ background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 95%, var(--color-sentiment-positive-primary));
167
+ }
168
+ &:active {
169
+ background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 90%, var(--color-sentiment-positive-primary));
170
+ }
171
+ }
172
+ }
173
+ &.neutral {
174
+ background-color: var(--color-background-neutral);
175
+ color: var(--color-content-primary);
176
+ a {
177
+ color: var(--color-content-primary);
178
+ }
179
+ .np-prompt-interactive& {
180
+ &:hover {
181
+ background-color: var(--color-background-neutral-hover);
182
+ }
183
+ &:active {
184
+ background-color: var(--color-background-neutral-active);
185
+ }
186
+ }
187
+ }
188
+ &.warning {
189
+ background-color: var(--color-sentiment-warning-secondary);
190
+ color: var(--color-sentiment-warning-content);
191
+ a {
192
+ color: var(--color-sentiment-warning-content);
193
+ &:hover {
194
+ color: var(--color-sentiment-warning-content-hover);
195
+ }
196
+ &:active {
197
+ color: var(--color-sentiment-warning-content-active);
198
+ }
199
+ }
200
+ .np-prompt-interactive& {
201
+ &:hover {
202
+ background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 90%, var(--color-sentiment-warning-primary));
203
+ }
204
+ &:active {
205
+ background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 80%, var(--color-sentiment-warning-primary));
206
+ }
207
+ }
208
+ }
209
+ }
210
+ }
@@ -0,0 +1,35 @@
1
+ import { render, screen } from '../test-utils';
2
+ import ListItem from './ListItem';
3
+
4
+ describe('ListItem', () => {
5
+ describe('spotlight', () => {
6
+ it('only fully interactive variant can have spotlight:active', () => {
7
+ render(<ListItem title="Test Title" spotlight="active" control={<ListItem.Navigation />} />);
8
+ const listItem = screen.getByRole('listitem');
9
+ expect(listItem).toHaveClass('wds-list-item-interactive');
10
+ expect(listItem).toHaveClass('wds-list-item-spotlight-active');
11
+ });
12
+
13
+ it('only fully interactive variant can have spotlight:inactive', () => {
14
+ render(
15
+ <ListItem
16
+ title="Test Title"
17
+ spotlight="inactive"
18
+ control={<ListItem.Switch onClick={() => {}} />}
19
+ />,
20
+ );
21
+ const listItem = screen.getByRole('listitem');
22
+ expect(listItem).toHaveClass('wds-list-item-interactive');
23
+ expect(listItem).toHaveClass('wds-list-item-spotlight-inactive');
24
+ });
25
+
26
+ it('non interactive variant can have spotlight', () => {
27
+ render(<ListItem title="Test Title" spotlight="inactive" />);
28
+ const listItem = screen.getByRole('listitem');
29
+ expect(listItem).toHaveClass('wds-list-item-non-interactive');
30
+ expect(listItem).not.toHaveClass('wds-list-item-interactive');
31
+ expect(listItem).not.toHaveClass('wds-list-item-spotlight-inactive');
32
+ expect(listItem).not.toHaveClass('wds-list-item-spotlight-active');
33
+ });
34
+ });
35
+ });