@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,170 @@
1
+ import Link from '../../link';
2
+ import { Sentiment } from '../../common';
3
+ import { Prompt, ListItemPromptProps } from './Prompt';
4
+ import { lorem40 } from '../../test-utils';
5
+ import { StoryObj } from '@storybook/react';
6
+
7
+ export default {
8
+ component: Prompt,
9
+ title: 'Content/ListItem/Prompt',
10
+ args: {
11
+ type: Sentiment.NEGATIVE,
12
+ children: 'You have done a terrible thing',
13
+ },
14
+ argTypes: {
15
+ type: {
16
+ options: [
17
+ Sentiment.POSITIVE,
18
+ Sentiment.NEGATIVE,
19
+ Sentiment.NEUTRAL,
20
+ Sentiment.WARNING,
21
+ 'discount',
22
+ 'savings',
23
+ ],
24
+ control: { type: 'radio' },
25
+ description: 'The type of prompt to display',
26
+ },
27
+ action: {
28
+ table: {
29
+ disable: true,
30
+ },
31
+ },
32
+ children: {
33
+ type: {
34
+ name: 'string',
35
+ required: true,
36
+ description: 'The content of the prompt',
37
+ },
38
+ },
39
+ },
40
+ };
41
+
42
+ type CustomStory = StoryObj<
43
+ ListItemPromptProps & {
44
+ interactivity?: 'none' | 'full-anchor' | 'full-button' | 'link';
45
+ }
46
+ >;
47
+
48
+ export const Basic: CustomStory = {
49
+ args: {
50
+ interactivity: 'none',
51
+ },
52
+ argTypes: {
53
+ interactivity: {
54
+ options: ['none', 'full-button', 'full-anchor', 'link'],
55
+ control: { type: 'radio' },
56
+ description: 'The type of interactivity to display',
57
+ },
58
+ },
59
+ render: ({ interactivity, ...args }) => {
60
+ return (
61
+ <div>
62
+ <Prompt
63
+ type={args.type}
64
+ action={
65
+ interactivity === 'full-anchor'
66
+ ? { href: 'wise.com' }
67
+ : interactivity === 'full-button'
68
+ ? {
69
+ onClick: () => {
70
+ console.log('clicked');
71
+ },
72
+ }
73
+ : undefined
74
+ }
75
+ >
76
+ {args.children} {interactivity === 'link' && <Link href="www.wise.com">with a link</Link>}
77
+ </Prompt>
78
+ </div>
79
+ );
80
+ },
81
+ };
82
+
83
+ export const Variants = () => {
84
+ return (
85
+ <>
86
+ <div className="m-b-2">
87
+ <Prompt type={Sentiment.POSITIVE}>
88
+ Positive prompt <Link href="www.wise.com">with a link to amazing content</Link>
89
+ </Prompt>
90
+ </div>
91
+ <div className="m-b-2">
92
+ <Prompt type={Sentiment.NEGATIVE}>
93
+ Negative prompt <Link href="www.wise.com">with a link to amazing content</Link>
94
+ </Prompt>
95
+ </div>
96
+ <div className="m-b-2">
97
+ <Prompt type={Sentiment.NEUTRAL}>
98
+ Neutral prompt <Link href="www.wise.com">with a link to amazing content</Link>
99
+ </Prompt>
100
+ </div>
101
+ <div className="m-b-2">
102
+ <Prompt type={Sentiment.WARNING}>
103
+ Warning prompt <Link href="www.wise.com">with a link to amazing content</Link>
104
+ </Prompt>
105
+ </div>
106
+ <div className="m-b-2">
107
+ <Prompt type="discount">
108
+ Discount prompt <Link href="www.wise.com">with a link to amazing content</Link>
109
+ </Prompt>
110
+ </div>
111
+ <div className="m-b-2">
112
+ <Prompt type="savings">
113
+ Savings prompt <Link href="www.wise.com">with a link to amazing content</Link>
114
+ </Prompt>
115
+ </div>
116
+ <div className="m-b-2">
117
+ <Prompt
118
+ type="discount"
119
+ action={{
120
+ href: 'www.wise.com',
121
+ target: '_self',
122
+ 'aria-label': 'hidden anchor tags are accessible, right?',
123
+ }}
124
+ >
125
+ The whole prompt is secretly clickable
126
+ </Prompt>
127
+ </div>
128
+ <div className="m-b-2">
129
+ <Prompt
130
+ type="negative"
131
+ action={{
132
+ href: 'www.wise.com',
133
+ target: '_self',
134
+ 'aria-label': 'clickable <a>',
135
+ }}
136
+ >
137
+ The whole prompt is secretly clickable as an anchor tag
138
+ </Prompt>
139
+ </div>
140
+ <div className="m-b-2">
141
+ <Prompt
142
+ type="warning"
143
+ action={{
144
+ onClick: () => {
145
+ console.log('clicked');
146
+ },
147
+ 'aria-label': 'clickable button',
148
+ }}
149
+ >
150
+ The whole prompt is secretly clickable as a button
151
+ </Prompt>
152
+ </div>
153
+ <div className="m-b-2">
154
+ <Prompt
155
+ type="neutral"
156
+ action={{
157
+ href: 'www.wise.com',
158
+ target: '_self',
159
+ 'aria-label': 'clickable prompt',
160
+ }}
161
+ >
162
+ The whole prompt is secretly clickable
163
+ </Prompt>
164
+ </div>
165
+ <div className="m-b-2" style={{ maxWidth: '300px' }}>
166
+ <Prompt type="warning">The prompt has very long text that wraps {lorem40}</Prompt>
167
+ </div>
168
+ </>
169
+ );
170
+ };
@@ -0,0 +1,44 @@
1
+ import { Confetti, Tags } from '@transferwise/icons';
2
+ import { Sentiment } from '../../common';
3
+ import StatusIcon from '../../statusIcon';
4
+ import { clsx } from 'clsx';
5
+ import { LinkProps } from '../../link';
6
+ import Body from '../../body';
7
+
8
+ export type ListItemPromptProps = {
9
+ type:
10
+ | `${Sentiment.POSITIVE | Sentiment.NEGATIVE | Sentiment.NEUTRAL | Sentiment.WARNING}`
11
+ | 'discount'
12
+ | 'savings';
13
+ children: React.ReactNode;
14
+ action?: Pick<LinkProps, 'href' | 'target' | 'onClick'> & { 'aria-label'?: string };
15
+ };
16
+
17
+ export const Prompt = ({ type, children, action }: ListItemPromptProps) => {
18
+ const Wrapper = action?.href ? 'a' : action?.onClick ? 'button' : 'span';
19
+
20
+ const icon =
21
+ type === 'discount' ? (
22
+ <Tags size={16} />
23
+ ) : type === 'savings' ? (
24
+ <Confetti size={16} />
25
+ ) : (
26
+ <StatusIcon size={16} sentiment={type} />
27
+ );
28
+
29
+ return (
30
+ <Wrapper
31
+ className={clsx(
32
+ 'wds-list-item-prompt',
33
+ type,
34
+ (action?.href || action?.onClick) && 'np-prompt-interactive',
35
+ )}
36
+ {...(action ?? {})}
37
+ >
38
+ <div className="np-prompt-icon">{icon}</div>
39
+ <Body>{children}</Body>
40
+ </Wrapper>
41
+ );
42
+ };
43
+
44
+ export default Prompt;
@@ -0,0 +1,23 @@
1
+ import { useContext, useEffect } from 'react';
2
+ import {
3
+ ListItemContext,
4
+ ListItemContextData,
5
+ ListItemControlProps,
6
+ ListItemTypes,
7
+ } from './ListItem';
8
+
9
+ export function useItemControl(controlType: ListItemTypes, controlProps?: ListItemControlProps) {
10
+ const {
11
+ setControlType,
12
+ setControlProps,
13
+ props: baseItemProps,
14
+ } = useContext<ListItemContextData>(ListItemContext);
15
+
16
+ useEffect(() => {
17
+ setControlType(controlType);
18
+ // @ts-expect-error TODO: fix the type error later
19
+ setControlProps(controlProps);
20
+ }, [controlType, controlProps, setControlType, setControlProps]);
21
+
22
+ return { baseItemProps };
23
+ }
package/src/main.css CHANGED
@@ -1866,22 +1866,10 @@ button.np-option {
1866
1866
  border-color: rgba(0,0,0,0.10196);
1867
1867
  border-color: var(--color-border-neutral);
1868
1868
  }
1869
- .tw-date label {
1869
+ .np-theme-personal .tw-date label {
1870
1870
  width: 100%;
1871
- }
1872
- .tw-date .tw-date--year label {
1873
- margin-bottom: 0;
1874
- }
1875
- .tw-date .tw-date--year,
1876
- .tw-date .tw-date--month,
1877
- .tw-date .tw-date--day {
1878
1871
  margin-bottom: 0;
1879
1872
  }
1880
- @media (min-width: 576px) {
1881
- .np-theme-personal .tw-date label {
1882
- margin-bottom: 0;
1883
- }
1884
- }
1885
1873
  .tw-date-lookup-menu {
1886
1874
  width: 400px;
1887
1875
  }
@@ -2630,6 +2618,218 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
2630
2618
  border-radius: 9999px !important;
2631
2619
  border-radius: var(--radius-full) !important;
2632
2620
  }
2621
+ .wds-list-item {
2622
+ list-style: none;
2623
+ width: 100%;
2624
+ padding: 0;
2625
+ border-radius: 16px;
2626
+ border-radius: var(--radius-medium);
2627
+ background-color: #ffffff;
2628
+ background-color: var(--color-background-screen);
2629
+ gap: 16px;
2630
+ gap: var(--size-16);
2631
+ }
2632
+ .wds-list-item .partially-interactive {
2633
+ padding: 16px;
2634
+ padding: var(--size-16);
2635
+ }
2636
+ .wds-list-item label,
2637
+ .wds-list-item a {
2638
+ padding: 16px;
2639
+ padding: var(--size-16);
2640
+ }
2641
+ .wds-list-item-interactive label {
2642
+ cursor: pointer;
2643
+ }
2644
+ .wds-list-item-interactive:hover {
2645
+ background-color: var(--color-background-screen-hover);
2646
+ }
2647
+ .wds-list-item-interactive:hover .wds-list-item-control .wds-Button {
2648
+ background-color: var(--Button-background-hover);
2649
+ color: var(--Button-color-hover);
2650
+ transition: none;
2651
+ }
2652
+ .wds-list-item-interactive:active {
2653
+ background-color: var(--color-background-screen-active);
2654
+ }
2655
+ .wds-list-item-interactive .wds-list-item-control .wds-Button {
2656
+ transition: none;
2657
+ }
2658
+ .wds-list-item-media-image {
2659
+ width: var(--item-media-image-size);
2660
+ height: var(--item-media-image-size);
2661
+ }
2662
+ .wds-list-item-body {
2663
+ width: 100%;
2664
+ }
2665
+ .wds-list-item-title {
2666
+ color: #37517e;
2667
+ color: var(--color-content-primary);
2668
+ }
2669
+ .wds-list-item-additional-info {
2670
+ color: #768e9c;
2671
+ color: var(--color-content-tertiary);
2672
+ }
2673
+ .wds-list-item-value {
2674
+ flex: 0 0 auto;
2675
+ }
2676
+ .wds-list-item-control {
2677
+ flex: 0 0 auto;
2678
+ }
2679
+ .wds-list-item-navigation,
2680
+ .wds-list-item-navigation:hover,
2681
+ .wds-list-item-navigation:focus {
2682
+ -webkit-text-decoration: none;
2683
+ text-decoration: none;
2684
+ }
2685
+ .wds-list-item-spotlight-active {
2686
+ background-color: rgba(134,167,189,0.10196);
2687
+ background-color: var(--color-background-neutral);
2688
+ }
2689
+ .wds-list-item-spotlight-active:not(.disabled):not(:disabled):hover {
2690
+ background-color: var(--color-background-neutral-hover);
2691
+ }
2692
+ .wds-list-item-spotlight-active:not(.disabled):not(:disabled):active {
2693
+ background-color: var(--color-background-neutral-active);
2694
+ }
2695
+ .wds-list-item-spotlight-inactive {
2696
+ background-color: rgba(134, 167, 189, 0.025);
2697
+ border: 1px dashed rgba(0,0,0,0.10196);
2698
+ border: 1px dashed var(--color-border-neutral);
2699
+ }
2700
+ @supports (color: color-mix(in lch, red, blue)) {
2701
+ .wds-list-item-spotlight-inactive {
2702
+ background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
2703
+ }
2704
+ }
2705
+ .wds-list-item-spotlight-inactive:not(.disabled):not(:disabled):hover {
2706
+ background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
2707
+ }
2708
+ .wds-list-item-spotlight-inactive:not(.disabled):not(:disabled):active {
2709
+ background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
2710
+ }
2711
+ .wds-list-item-prompt {
2712
+ display: inline-flex;
2713
+ padding-top: calc(8px / 2);
2714
+ padding-top: calc(var(--padding-x-small) / 2);
2715
+ padding-bottom: calc(8px / 2);
2716
+ padding-bottom: calc(var(--padding-x-small) / 2);
2717
+ padding-left: calc(8px - 1px);
2718
+ padding-left: calc(var(--padding-x-small) - 1px);
2719
+ padding-right: 8px;
2720
+ padding-right: var(--padding-x-small);
2721
+ border-radius: 10px;
2722
+ border-radius: var(--radius-small);
2723
+ word-break: break-word;
2724
+ word-wrap: break-word;
2725
+ }
2726
+ .wds-list-item-prompt .np-prompt-icon {
2727
+ padding-right: calc(12px / 2);
2728
+ padding-right: calc(var(--size-12) / 2);
2729
+ padding-top: calc(4px - 1px);
2730
+ padding-top: calc(var(--size-4) - 1px);
2731
+ padding-bottom: calc(4px - 1px);
2732
+ padding-bottom: calc(var(--size-4) - 1px);
2733
+ }
2734
+ .wds-list-item-prompt .np-prompt-icon .tw-icon-tags,
2735
+ .wds-list-item-prompt .np-prompt-icon .tw-icon-confetti {
2736
+ color: var(--color-sentiment-positive-primary);
2737
+ }
2738
+ .wds-list-item-prompt a {
2739
+ text-underline-offset: calc(4px / 2);
2740
+ text-underline-offset: calc(var(--size-4) / 2);
2741
+ }
2742
+ .wds-list-item-prompt.np-prompt-interactive {
2743
+ -webkit-text-decoration: none;
2744
+ text-decoration: none;
2745
+ cursor: pointer;
2746
+ border: none;
2747
+ }
2748
+ .wds-list-item-prompt.negative {
2749
+ background-color: var(--color-sentiment-negative-secondary);
2750
+ color: var(--color-sentiment-negative-primary);
2751
+ }
2752
+ .wds-list-item-prompt.negative a {
2753
+ color: var(--color-sentiment-negative-primary);
2754
+ }
2755
+ .wds-list-item-prompt.negative a:hover {
2756
+ color: var(--color-sentiment-negative-primary-hover);
2757
+ }
2758
+ .wds-list-item-prompt.negative a:active {
2759
+ color: var(--color-sentiment-negative-primary-active);
2760
+ }
2761
+ .np-prompt-interactive.wds-list-item-prompt.negative:hover {
2762
+ background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 95%, var(--color-sentiment-negative-primary));
2763
+ }
2764
+ .np-prompt-interactive.wds-list-item-prompt.negative:active {
2765
+ background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 90%, var(--color-sentiment-negative-primary));
2766
+ }
2767
+ .wds-list-item-prompt.positive,
2768
+ .wds-list-item-prompt.discount,
2769
+ .wds-list-item-prompt.savings {
2770
+ background-color: var(--color-sentiment-positive-secondary);
2771
+ color: var(--color-sentiment-positive-primary);
2772
+ }
2773
+ .wds-list-item-prompt.positive a,
2774
+ .wds-list-item-prompt.discount a,
2775
+ .wds-list-item-prompt.savings a {
2776
+ color: var(--color-sentiment-positive-primary);
2777
+ }
2778
+ .wds-list-item-prompt.positive a:hover,
2779
+ .wds-list-item-prompt.discount a:hover,
2780
+ .wds-list-item-prompt.savings a:hover {
2781
+ color: var(--color-sentiment-positive-primary-hover);
2782
+ }
2783
+ .wds-list-item-prompt.positive a:active,
2784
+ .wds-list-item-prompt.discount a:active,
2785
+ .wds-list-item-prompt.savings a:active {
2786
+ color: var(--color-sentiment-positive-primary-active);
2787
+ }
2788
+ .np-prompt-interactive.wds-list-item-prompt.positive:hover,
2789
+ .np-prompt-interactive.wds-list-item-prompt.discount:hover,
2790
+ .np-prompt-interactive.wds-list-item-prompt.savings:hover {
2791
+ background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 95%, var(--color-sentiment-positive-primary));
2792
+ }
2793
+ .np-prompt-interactive.wds-list-item-prompt.positive:active,
2794
+ .np-prompt-interactive.wds-list-item-prompt.discount:active,
2795
+ .np-prompt-interactive.wds-list-item-prompt.savings:active {
2796
+ background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 90%, var(--color-sentiment-positive-primary));
2797
+ }
2798
+ .wds-list-item-prompt.neutral {
2799
+ background-color: rgba(134,167,189,0.10196);
2800
+ background-color: var(--color-background-neutral);
2801
+ color: #37517e;
2802
+ color: var(--color-content-primary);
2803
+ }
2804
+ .wds-list-item-prompt.neutral a {
2805
+ color: #37517e;
2806
+ color: var(--color-content-primary);
2807
+ }
2808
+ .np-prompt-interactive.wds-list-item-prompt.neutral:hover {
2809
+ background-color: var(--color-background-neutral-hover);
2810
+ }
2811
+ .np-prompt-interactive.wds-list-item-prompt.neutral:active {
2812
+ background-color: var(--color-background-neutral-active);
2813
+ }
2814
+ .wds-list-item-prompt.warning {
2815
+ background-color: var(--color-sentiment-warning-secondary);
2816
+ color: var(--color-sentiment-warning-content);
2817
+ }
2818
+ .wds-list-item-prompt.warning a {
2819
+ color: var(--color-sentiment-warning-content);
2820
+ }
2821
+ .wds-list-item-prompt.warning a:hover {
2822
+ color: var(--color-sentiment-warning-content-hover);
2823
+ }
2824
+ .wds-list-item-prompt.warning a:active {
2825
+ color: var(--color-sentiment-warning-content-active);
2826
+ }
2827
+ .np-prompt-interactive.wds-list-item-prompt.warning:hover {
2828
+ background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 90%, var(--color-sentiment-warning-primary));
2829
+ }
2830
+ .np-prompt-interactive.wds-list-item-prompt.warning:active {
2831
+ background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 80%, var(--color-sentiment-warning-primary));
2832
+ }
2633
2833
  .np-field-control {
2634
2834
  margin-top: 4px;
2635
2835
  margin-top: var(--size-4);
package/src/main.less CHANGED
@@ -38,6 +38,7 @@
38
38
  @import "./image/Image.less";
39
39
  @import "./info/Info.less";
40
40
  @import "./inputs/Input.less";
41
+ @import "./listItem/ListItem.less";
41
42
  @import "./field/Field.less";
42
43
  @import "./inputs/InputGroup.less";
43
44
  @import "./inputs/SelectInput.less";