@transferwise/components 0.0.0-experimental-d1cefe3 → 0.0.0-experimental-548b806
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/dateInput/DateInput.js +4 -4
- package/build/dateInput/DateInput.js.map +1 -1
- package/build/dateInput/DateInput.mjs +4 -4
- package/build/dateInput/DateInput.mjs.map +1 -1
- package/build/dateLookup/DateLookup.js +4 -4
- package/build/dateLookup/DateLookup.js.map +1 -1
- package/build/dateLookup/DateLookup.mjs +4 -4
- package/build/dateLookup/DateLookup.mjs.map +1 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js +3 -3
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs +3 -3
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs.map +1 -1
- package/build/i18n/cs.json +2 -0
- package/build/i18n/cs.json.js +2 -0
- package/build/i18n/cs.json.js.map +1 -1
- package/build/i18n/cs.json.mjs +2 -0
- package/build/i18n/cs.json.mjs.map +1 -1
- package/build/i18n/de.json +2 -0
- package/build/i18n/de.json.js +2 -0
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/de.json.mjs +2 -0
- package/build/i18n/de.json.mjs.map +1 -1
- package/build/i18n/es.json +2 -0
- package/build/i18n/es.json.js +2 -0
- package/build/i18n/es.json.js.map +1 -1
- package/build/i18n/es.json.mjs +2 -0
- package/build/i18n/es.json.mjs.map +1 -1
- package/build/i18n/fr.json +2 -0
- package/build/i18n/fr.json.js +2 -0
- package/build/i18n/fr.json.js.map +1 -1
- package/build/i18n/fr.json.mjs +2 -0
- package/build/i18n/fr.json.mjs.map +1 -1
- package/build/i18n/hu.json +2 -0
- package/build/i18n/hu.json.js +2 -0
- package/build/i18n/hu.json.js.map +1 -1
- package/build/i18n/hu.json.mjs +2 -0
- package/build/i18n/hu.json.mjs.map +1 -1
- package/build/i18n/id.json +2 -0
- package/build/i18n/id.json.js +2 -0
- package/build/i18n/id.json.js.map +1 -1
- package/build/i18n/id.json.mjs +2 -0
- package/build/i18n/id.json.mjs.map +1 -1
- package/build/i18n/it.json +2 -0
- package/build/i18n/it.json.js +2 -0
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/it.json.mjs +2 -0
- package/build/i18n/it.json.mjs.map +1 -1
- package/build/i18n/ja.json +2 -0
- package/build/i18n/ja.json.js +2 -0
- package/build/i18n/ja.json.js.map +1 -1
- package/build/i18n/ja.json.mjs +2 -0
- package/build/i18n/ja.json.mjs.map +1 -1
- package/build/i18n/nl.json +2 -0
- package/build/i18n/pl.json +2 -0
- package/build/i18n/pl.json.js +2 -0
- package/build/i18n/pl.json.js.map +1 -1
- package/build/i18n/pl.json.mjs +2 -0
- package/build/i18n/pl.json.mjs.map +1 -1
- package/build/i18n/pt.json +2 -0
- package/build/i18n/pt.json.js +2 -0
- package/build/i18n/pt.json.js.map +1 -1
- package/build/i18n/pt.json.mjs +2 -0
- package/build/i18n/pt.json.mjs.map +1 -1
- package/build/i18n/ro.json +2 -0
- package/build/i18n/ro.json.js +2 -0
- package/build/i18n/ro.json.js.map +1 -1
- package/build/i18n/ro.json.mjs +2 -0
- package/build/i18n/ro.json.mjs.map +1 -1
- package/build/i18n/ru.json +2 -0
- package/build/i18n/ru.json.js +2 -0
- package/build/i18n/ru.json.js.map +1 -1
- package/build/i18n/ru.json.mjs +2 -0
- package/build/i18n/ru.json.mjs.map +1 -1
- package/build/i18n/th.json +2 -0
- package/build/i18n/th.json.js +2 -0
- package/build/i18n/th.json.js.map +1 -1
- package/build/i18n/th.json.mjs +2 -0
- package/build/i18n/th.json.mjs.map +1 -1
- package/build/i18n/tr.json +2 -0
- package/build/i18n/tr.json.js +2 -0
- package/build/i18n/tr.json.js.map +1 -1
- package/build/i18n/tr.json.mjs +2 -0
- package/build/i18n/tr.json.mjs.map +1 -1
- package/build/i18n/zh-CN.json +2 -0
- package/build/i18n/zh-CN.json.js +2 -0
- package/build/i18n/zh-CN.json.js.map +1 -1
- package/build/i18n/zh-CN.json.mjs +2 -0
- package/build/i18n/zh-CN.json.mjs.map +1 -1
- package/build/i18n/zh-HK.json +2 -0
- package/build/i18n/zh-HK.json.js +2 -0
- package/build/i18n/zh-HK.json.js.map +1 -1
- package/build/i18n/zh-HK.json.mjs +2 -0
- package/build/i18n/zh-HK.json.mjs.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -1
- package/build/main.css +224 -13
- package/build/moneyInput/MoneyInput.js +2 -2
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +2 -2
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/snackbar/Snackbar.js +1 -1
- package/build/snackbar/Snackbar.js.map +1 -1
- package/build/snackbar/Snackbar.mjs +1 -1
- package/build/snackbar/Snackbar.mjs.map +1 -1
- package/build/styles/dateInput/DateInput.css +1 -13
- package/build/styles/listItem/ListItem.css +223 -0
- package/build/styles/main.css +224 -13
- package/build/tabs/Tabs.js +3 -3
- package/build/tabs/Tabs.js.map +1 -1
- package/build/tabs/Tabs.mjs +3 -3
- package/build/tabs/Tabs.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +2 -2
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs +2 -2
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/typeahead/typeaheadInput/TypeaheadInput.js +2 -2
- package/build/typeahead/typeaheadInput/TypeaheadInput.js.map +1 -1
- package/build/typeahead/typeaheadInput/TypeaheadInput.mjs +2 -2
- package/build/typeahead/typeaheadInput/TypeaheadInput.mjs.map +1 -1
- package/build/types/index.d.ts +2 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/listItem/ListItem.d.ts +50 -0
- package/build/types/listItem/ListItem.d.ts.map +1 -0
- package/build/types/listItem/ListItemAdditionalInfo.d.ts +9 -0
- package/build/types/listItem/ListItemAdditionalInfo.d.ts.map +1 -0
- package/build/types/listItem/ListItemButton.d.ts +6 -0
- package/build/types/listItem/ListItemButton.d.ts.map +1 -0
- package/build/types/listItem/ListItemCheckbox.d.ts +4 -0
- package/build/types/listItem/ListItemCheckbox.d.ts.map +1 -0
- package/build/types/listItem/ListItemIconButton.d.ts +8 -0
- package/build/types/listItem/ListItemIconButton.d.ts.map +1 -0
- package/build/types/listItem/ListItemMedia.d.ts +19 -0
- package/build/types/listItem/ListItemMedia.d.ts.map +1 -0
- package/build/types/listItem/ListItemNavigation.d.ts +4 -0
- package/build/types/listItem/ListItemNavigation.d.ts.map +1 -0
- package/build/types/listItem/ListItemSwitch.d.ts +3 -0
- package/build/types/listItem/ListItemSwitch.d.ts.map +1 -0
- package/build/types/listItem/index.d.ts +6 -0
- package/build/types/listItem/index.d.ts.map +1 -0
- package/build/types/listItem/prompt/Prompt.d.ts +12 -0
- package/build/types/listItem/prompt/Prompt.d.ts.map +1 -0
- package/build/types/listItem/useItemControl.d.ts +5 -0
- package/build/types/listItem/useItemControl.d.ts.map +1 -0
- package/build/upload/Upload.js +2 -2
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.mjs +2 -2
- package/build/upload/Upload.mjs.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
- package/package.json +12 -12
- package/src/dateInput/DateInput.css +1 -13
- package/src/dateInput/DateInput.less +3 -20
- package/src/dateInput/DateInput.tests.story.tsx +3 -14
- package/src/dateInput/DateInput.tsx +4 -4
- package/src/i18n/cs.json +2 -0
- package/src/i18n/de.json +2 -0
- package/src/i18n/es.json +2 -0
- package/src/i18n/fr.json +2 -0
- package/src/i18n/hu.json +2 -0
- package/src/i18n/id.json +2 -0
- package/src/i18n/it.json +2 -0
- package/src/i18n/ja.json +2 -0
- package/src/i18n/nl.json +2 -0
- package/src/i18n/pl.json +2 -0
- package/src/i18n/pt.json +2 -0
- package/src/i18n/ro.json +2 -0
- package/src/i18n/ru.json +2 -0
- package/src/i18n/th.json +2 -0
- package/src/i18n/tr.json +2 -0
- package/src/i18n/zh-CN.json +2 -0
- package/src/i18n/zh-HK.json +2 -0
- package/src/index.ts +2 -0
- package/src/listItem/ListItem.css +223 -0
- package/src/listItem/ListItem.less +223 -0
- package/src/listItem/ListItem.spec.tsx +35 -0
- package/src/listItem/ListItem.story.tsx +582 -0
- package/src/listItem/ListItem.tsx +283 -0
- package/src/listItem/ListItemAdditionalInfo.tsx +31 -0
- package/src/listItem/ListItemButton.spec.tsx +92 -0
- package/src/listItem/ListItemButton.tsx +24 -0
- package/src/listItem/ListItemCheckbox.tsx +14 -0
- package/src/listItem/ListItemIconButton.tsx +16 -0
- package/src/listItem/ListItemMedia.tsx +52 -0
- package/src/listItem/ListItemNavigation.tsx +26 -0
- package/src/listItem/ListItemSwitch.tsx +8 -0
- package/src/listItem/index.ts +10 -0
- package/src/listItem/prompt/Prompt.spec.tsx +77 -0
- package/src/listItem/prompt/Prompt.story.tsx +170 -0
- package/src/listItem/prompt/Prompt.tsx +44 -0
- package/src/listItem/useItemControl.tsx +23 -0
- package/src/main.css +224 -13
- package/src/main.less +1 -0
package/src/i18n/it.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Numero di telefono",
|
|
29
29
|
"neptune.Select.searchPlaceholder": "Cerca...",
|
|
30
30
|
"neptune.SelectInput.noResultsFound": "Nessun risultato trovato",
|
|
31
|
+
"neptune.SelectOption.action.label": "Scegli",
|
|
32
|
+
"neptune.SelectOption.selected.action.label": "Modifica l'opzione scelta",
|
|
31
33
|
"neptune.StatusIcon.iconLabel.error": "Errore:",
|
|
32
34
|
"neptune.StatusIcon.iconLabel.information": "Informazioni:",
|
|
33
35
|
"neptune.StatusIcon.iconLabel.pending": "In attesa:",
|
package/src/i18n/ja.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"neptune.PhoneNumberInput.phoneNumberLabel": "電話番号",
|
|
29
29
|
"neptune.Select.searchPlaceholder": "検索する... ",
|
|
30
30
|
"neptune.SelectInput.noResultsFound": "結果が見つかりませんでした",
|
|
31
|
+
"neptune.SelectOption.action.label": "選択してください",
|
|
32
|
+
"neptune.SelectOption.selected.action.label": "選択したオプションを変更する",
|
|
31
33
|
"neptune.StatusIcon.iconLabel.error": "エラー:",
|
|
32
34
|
"neptune.StatusIcon.iconLabel.information": "情報:",
|
|
33
35
|
"neptune.StatusIcon.iconLabel.pending": "保留中:",
|
package/src/i18n/nl.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Telefoonnummer",
|
|
29
29
|
"neptune.Select.searchPlaceholder": "Zoeken...",
|
|
30
30
|
"neptune.SelectInput.noResultsFound": "Geen resultaten gevonden",
|
|
31
|
+
"neptune.SelectOption.action.label": "Kiezen",
|
|
32
|
+
"neptune.SelectOption.selected.action.label": "Gekozen optie wijzigen",
|
|
31
33
|
"neptune.StatusIcon.iconLabel.error": "Fout:",
|
|
32
34
|
"neptune.StatusIcon.iconLabel.information": "Informatie:",
|
|
33
35
|
"neptune.StatusIcon.iconLabel.pending": "In behandeling:",
|
package/src/i18n/pl.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Numer telefonu",
|
|
29
29
|
"neptune.Select.searchPlaceholder": "Wyszukaj...",
|
|
30
30
|
"neptune.SelectInput.noResultsFound": "Nie znaleziono wyników",
|
|
31
|
+
"neptune.SelectOption.action.label": "Wybierz",
|
|
32
|
+
"neptune.SelectOption.selected.action.label": "Zmień wybraną opcję",
|
|
31
33
|
"neptune.StatusIcon.iconLabel.error": "Błąd:",
|
|
32
34
|
"neptune.StatusIcon.iconLabel.information": "Informacje:",
|
|
33
35
|
"neptune.StatusIcon.iconLabel.pending": "W toku:",
|
package/src/i18n/pt.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Número de telefone",
|
|
29
29
|
"neptune.Select.searchPlaceholder": "Buscar...",
|
|
30
30
|
"neptune.SelectInput.noResultsFound": "Nenhum resultado encontrado",
|
|
31
|
+
"neptune.SelectOption.action.label": "Selecionar",
|
|
32
|
+
"neptune.SelectOption.selected.action.label": "Altere a opção escolhida",
|
|
31
33
|
"neptune.StatusIcon.iconLabel.error": "Erro:",
|
|
32
34
|
"neptune.StatusIcon.iconLabel.information": "Informação:",
|
|
33
35
|
"neptune.StatusIcon.iconLabel.pending": "Pendente:",
|
package/src/i18n/ro.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Număr de telefon",
|
|
29
29
|
"neptune.Select.searchPlaceholder": "Caută...",
|
|
30
30
|
"neptune.SelectInput.noResultsFound": "Nu s-a găsit niciun rezultat",
|
|
31
|
+
"neptune.SelectOption.action.label": "Alege",
|
|
32
|
+
"neptune.SelectOption.selected.action.label": "Schimbă opțiunea aleasă",
|
|
31
33
|
"neptune.StatusIcon.iconLabel.error": "Eroare:",
|
|
32
34
|
"neptune.StatusIcon.iconLabel.information": "Informații:",
|
|
33
35
|
"neptune.StatusIcon.iconLabel.pending": "În așteptare:",
|
package/src/i18n/ru.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Номер телефона",
|
|
29
29
|
"neptune.Select.searchPlaceholder": "Поиск...",
|
|
30
30
|
"neptune.SelectInput.noResultsFound": "Ничего не найдено",
|
|
31
|
+
"neptune.SelectOption.action.label": "Выбрать",
|
|
32
|
+
"neptune.SelectOption.selected.action.label": "Изменить выбранный вариант",
|
|
31
33
|
"neptune.StatusIcon.iconLabel.error": "Ошибка:",
|
|
32
34
|
"neptune.StatusIcon.iconLabel.information": "Информация:",
|
|
33
35
|
"neptune.StatusIcon.iconLabel.pending": "В ожидании:",
|
package/src/i18n/th.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"neptune.PhoneNumberInput.phoneNumberLabel": "หมายเลขโทรศัพท์",
|
|
29
29
|
"neptune.Select.searchPlaceholder": "ค้นหา...",
|
|
30
30
|
"neptune.SelectInput.noResultsFound": "ไม่พบผลลัพธ์",
|
|
31
|
+
"neptune.SelectOption.action.label": "เลือก",
|
|
32
|
+
"neptune.SelectOption.selected.action.label": "เปลี่ยนตัวเลือกที่เลือกไว้",
|
|
31
33
|
"neptune.StatusIcon.iconLabel.error": "ข้อผิดพลาด:",
|
|
32
34
|
"neptune.StatusIcon.iconLabel.information": "ข้อมูล:",
|
|
33
35
|
"neptune.StatusIcon.iconLabel.pending": "รอดำเนินการ:",
|
package/src/i18n/tr.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Telefon numarası",
|
|
29
29
|
"neptune.Select.searchPlaceholder": "Ara...",
|
|
30
30
|
"neptune.SelectInput.noResultsFound": "Sonuç bulunamadı",
|
|
31
|
+
"neptune.SelectOption.action.label": "Seç",
|
|
32
|
+
"neptune.SelectOption.selected.action.label": "Seçilen opsiyonu değiştir",
|
|
31
33
|
"neptune.StatusIcon.iconLabel.error": "Hata:",
|
|
32
34
|
"neptune.StatusIcon.iconLabel.information": "Bilgi:",
|
|
33
35
|
"neptune.StatusIcon.iconLabel.pending": "Bekliyor:",
|
package/src/i18n/zh-CN.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"neptune.PhoneNumberInput.phoneNumberLabel": "电话号码",
|
|
29
29
|
"neptune.Select.searchPlaceholder": "搜索",
|
|
30
30
|
"neptune.SelectInput.noResultsFound": "找不到结果",
|
|
31
|
+
"neptune.SelectOption.action.label": "选择",
|
|
32
|
+
"neptune.SelectOption.selected.action.label": "更改所选选项",
|
|
31
33
|
"neptune.StatusIcon.iconLabel.error": "错误:",
|
|
32
34
|
"neptune.StatusIcon.iconLabel.information": "信息:",
|
|
33
35
|
"neptune.StatusIcon.iconLabel.pending": "待处理:",
|
package/src/i18n/zh-HK.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"neptune.PhoneNumberInput.phoneNumberLabel": "電話號碼",
|
|
29
29
|
"neptune.Select.searchPlaceholder": "搜尋…",
|
|
30
30
|
"neptune.SelectInput.noResultsFound": "找不到任何結果",
|
|
31
|
+
"neptune.SelectOption.action.label": "選擇",
|
|
32
|
+
"neptune.SelectOption.selected.action.label": "更改已選選項",
|
|
31
33
|
"neptune.StatusIcon.iconLabel.error": "錯誤:",
|
|
32
34
|
"neptune.StatusIcon.iconLabel.information": "資訊:",
|
|
33
35
|
"neptune.StatusIcon.iconLabel.pending": "處理中:",
|
package/src/index.ts
CHANGED
|
@@ -108,6 +108,7 @@ export type {
|
|
|
108
108
|
TableCellStatus,
|
|
109
109
|
TableCellType,
|
|
110
110
|
} from './table';
|
|
111
|
+
export type { ListItemProps, ListItemAdditionalInfoProps, ListItemCheckboxProps } from './listItem';
|
|
111
112
|
|
|
112
113
|
/**
|
|
113
114
|
* Components
|
|
@@ -209,6 +210,7 @@ export { default as Typeahead } from './typeahead';
|
|
|
209
210
|
export { default as Upload } from './upload';
|
|
210
211
|
export { default as UploadInput } from './uploadInput';
|
|
211
212
|
export { default as Table } from './table';
|
|
213
|
+
export { default as Item } from './table';
|
|
212
214
|
|
|
213
215
|
/**
|
|
214
216
|
* Hooks
|
|
@@ -0,0 +1,223 @@
|
|
|
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.disabled {
|
|
66
|
+
filter: none;
|
|
67
|
+
opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
.wds-list-item.disabled label {
|
|
70
|
+
cursor: not-allowed;
|
|
71
|
+
}
|
|
72
|
+
.wds-list-item.disabled .tw-icon-backslash-circle {
|
|
73
|
+
color: #768e9c;
|
|
74
|
+
color: var(--color-content-tertiary);
|
|
75
|
+
}
|
|
76
|
+
.wds-list-item-spotlight-active {
|
|
77
|
+
background-color: rgba(134,167,189,0.10196);
|
|
78
|
+
background-color: var(--color-background-neutral);
|
|
79
|
+
}
|
|
80
|
+
.wds-list-item-spotlight-active:not(.disabled):not(:disabled):hover {
|
|
81
|
+
background-color: var(--color-background-neutral-hover);
|
|
82
|
+
}
|
|
83
|
+
.wds-list-item-spotlight-active:not(.disabled):not(:disabled):active {
|
|
84
|
+
background-color: var(--color-background-neutral-active);
|
|
85
|
+
}
|
|
86
|
+
.wds-list-item-spotlight-inactive {
|
|
87
|
+
background-color: rgba(134, 167, 189, 0.025);
|
|
88
|
+
border: 1px dashed rgba(0,0,0,0.10196);
|
|
89
|
+
border: 1px dashed var(--color-border-neutral);
|
|
90
|
+
}
|
|
91
|
+
@supports (color: color-mix(in lch, red, blue)) {
|
|
92
|
+
.wds-list-item-spotlight-inactive {
|
|
93
|
+
background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
.wds-list-item-spotlight-inactive:not(.disabled):not(:disabled):hover {
|
|
97
|
+
background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
|
|
98
|
+
}
|
|
99
|
+
.wds-list-item-spotlight-inactive:not(.disabled):not(:disabled):active {
|
|
100
|
+
background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
|
|
101
|
+
}
|
|
102
|
+
.wds-list-item-prompt {
|
|
103
|
+
display: inline-flex;
|
|
104
|
+
padding-top: calc(8px / 2);
|
|
105
|
+
padding-top: calc(var(--padding-x-small) / 2);
|
|
106
|
+
padding-bottom: calc(8px / 2);
|
|
107
|
+
padding-bottom: calc(var(--padding-x-small) / 2);
|
|
108
|
+
padding-left: calc(8px - 1px);
|
|
109
|
+
padding-left: calc(var(--padding-x-small) - 1px);
|
|
110
|
+
padding-right: 8px;
|
|
111
|
+
padding-right: var(--padding-x-small);
|
|
112
|
+
border-radius: 10px;
|
|
113
|
+
border-radius: var(--radius-small);
|
|
114
|
+
word-break: break-word;
|
|
115
|
+
word-wrap: break-word;
|
|
116
|
+
}
|
|
117
|
+
.wds-list-item-prompt .np-prompt-icon {
|
|
118
|
+
padding-right: calc(12px / 2);
|
|
119
|
+
padding-right: calc(var(--size-12) / 2);
|
|
120
|
+
padding-top: calc(4px - 1px);
|
|
121
|
+
padding-top: calc(var(--size-4) - 1px);
|
|
122
|
+
padding-bottom: calc(4px - 1px);
|
|
123
|
+
padding-bottom: calc(var(--size-4) - 1px);
|
|
124
|
+
}
|
|
125
|
+
.wds-list-item-prompt .np-prompt-icon .tw-icon-tags,
|
|
126
|
+
.wds-list-item-prompt .np-prompt-icon .tw-icon-confetti {
|
|
127
|
+
color: var(--color-sentiment-positive-primary);
|
|
128
|
+
}
|
|
129
|
+
.wds-list-item-prompt a {
|
|
130
|
+
text-underline-offset: calc(4px / 2);
|
|
131
|
+
text-underline-offset: calc(var(--size-4) / 2);
|
|
132
|
+
}
|
|
133
|
+
.wds-list-item-prompt.np-prompt-interactive {
|
|
134
|
+
-webkit-text-decoration: none;
|
|
135
|
+
text-decoration: none;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
border: none;
|
|
138
|
+
}
|
|
139
|
+
.wds-list-item-prompt.negative {
|
|
140
|
+
background-color: var(--color-sentiment-negative-secondary);
|
|
141
|
+
color: var(--color-sentiment-negative-primary);
|
|
142
|
+
}
|
|
143
|
+
.wds-list-item-prompt.negative a {
|
|
144
|
+
color: var(--color-sentiment-negative-primary);
|
|
145
|
+
}
|
|
146
|
+
.wds-list-item-prompt.negative a:hover {
|
|
147
|
+
color: var(--color-sentiment-negative-primary-hover);
|
|
148
|
+
}
|
|
149
|
+
.wds-list-item-prompt.negative a:active {
|
|
150
|
+
color: var(--color-sentiment-negative-primary-active);
|
|
151
|
+
}
|
|
152
|
+
.np-prompt-interactive.wds-list-item-prompt.negative:hover {
|
|
153
|
+
background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 95%, var(--color-sentiment-negative-primary));
|
|
154
|
+
}
|
|
155
|
+
.np-prompt-interactive.wds-list-item-prompt.negative:active {
|
|
156
|
+
background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 90%, var(--color-sentiment-negative-primary));
|
|
157
|
+
}
|
|
158
|
+
.wds-list-item-prompt.positive,
|
|
159
|
+
.wds-list-item-prompt.discount,
|
|
160
|
+
.wds-list-item-prompt.savings {
|
|
161
|
+
background-color: var(--color-sentiment-positive-secondary);
|
|
162
|
+
color: var(--color-sentiment-positive-primary);
|
|
163
|
+
}
|
|
164
|
+
.wds-list-item-prompt.positive a,
|
|
165
|
+
.wds-list-item-prompt.discount a,
|
|
166
|
+
.wds-list-item-prompt.savings a {
|
|
167
|
+
color: var(--color-sentiment-positive-primary);
|
|
168
|
+
}
|
|
169
|
+
.wds-list-item-prompt.positive a:hover,
|
|
170
|
+
.wds-list-item-prompt.discount a:hover,
|
|
171
|
+
.wds-list-item-prompt.savings a:hover {
|
|
172
|
+
color: var(--color-sentiment-positive-primary-hover);
|
|
173
|
+
}
|
|
174
|
+
.wds-list-item-prompt.positive a:active,
|
|
175
|
+
.wds-list-item-prompt.discount a:active,
|
|
176
|
+
.wds-list-item-prompt.savings a:active {
|
|
177
|
+
color: var(--color-sentiment-positive-primary-active);
|
|
178
|
+
}
|
|
179
|
+
.np-prompt-interactive.wds-list-item-prompt.positive:hover,
|
|
180
|
+
.np-prompt-interactive.wds-list-item-prompt.discount:hover,
|
|
181
|
+
.np-prompt-interactive.wds-list-item-prompt.savings:hover {
|
|
182
|
+
background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 95%, var(--color-sentiment-positive-primary));
|
|
183
|
+
}
|
|
184
|
+
.np-prompt-interactive.wds-list-item-prompt.positive:active,
|
|
185
|
+
.np-prompt-interactive.wds-list-item-prompt.discount:active,
|
|
186
|
+
.np-prompt-interactive.wds-list-item-prompt.savings:active {
|
|
187
|
+
background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 90%, var(--color-sentiment-positive-primary));
|
|
188
|
+
}
|
|
189
|
+
.wds-list-item-prompt.neutral {
|
|
190
|
+
background-color: rgba(134,167,189,0.10196);
|
|
191
|
+
background-color: var(--color-background-neutral);
|
|
192
|
+
color: #37517e;
|
|
193
|
+
color: var(--color-content-primary);
|
|
194
|
+
}
|
|
195
|
+
.wds-list-item-prompt.neutral a {
|
|
196
|
+
color: #37517e;
|
|
197
|
+
color: var(--color-content-primary);
|
|
198
|
+
}
|
|
199
|
+
.np-prompt-interactive.wds-list-item-prompt.neutral:hover {
|
|
200
|
+
background-color: var(--color-background-neutral-hover);
|
|
201
|
+
}
|
|
202
|
+
.np-prompt-interactive.wds-list-item-prompt.neutral:active {
|
|
203
|
+
background-color: var(--color-background-neutral-active);
|
|
204
|
+
}
|
|
205
|
+
.wds-list-item-prompt.warning {
|
|
206
|
+
background-color: var(--color-sentiment-warning-secondary);
|
|
207
|
+
color: var(--color-sentiment-warning-content);
|
|
208
|
+
}
|
|
209
|
+
.wds-list-item-prompt.warning a {
|
|
210
|
+
color: var(--color-sentiment-warning-content);
|
|
211
|
+
}
|
|
212
|
+
.wds-list-item-prompt.warning a:hover {
|
|
213
|
+
color: var(--color-sentiment-warning-content-hover);
|
|
214
|
+
}
|
|
215
|
+
.wds-list-item-prompt.warning a:active {
|
|
216
|
+
color: var(--color-sentiment-warning-content-active);
|
|
217
|
+
}
|
|
218
|
+
.np-prompt-interactive.wds-list-item-prompt.warning:hover {
|
|
219
|
+
background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 90%, var(--color-sentiment-warning-primary));
|
|
220
|
+
}
|
|
221
|
+
.np-prompt-interactive.wds-list-item-prompt.warning:active {
|
|
222
|
+
background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 80%, var(--color-sentiment-warning-primary));
|
|
223
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
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
|
+
&.disabled {
|
|
76
|
+
filter: none;
|
|
77
|
+
opacity: 1;
|
|
78
|
+
|
|
79
|
+
label {
|
|
80
|
+
cursor: not-allowed;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.tw-icon-backslash-circle {
|
|
84
|
+
color: var(--color-content-tertiary);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&-spotlight {
|
|
89
|
+
&-active {
|
|
90
|
+
background-color: var(--color-background-neutral);
|
|
91
|
+
&:not(.disabled, :disabled):hover {
|
|
92
|
+
background-color: var(--color-background-neutral-hover);
|
|
93
|
+
}
|
|
94
|
+
&:not(.disabled, :disabled):active {
|
|
95
|
+
background-color: var(--color-background-neutral-active);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&-inactive {
|
|
100
|
+
background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
|
|
101
|
+
border: 1px dashed var(--color-border-neutral);
|
|
102
|
+
&:not(.disabled, :disabled):hover {
|
|
103
|
+
background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
|
|
104
|
+
}
|
|
105
|
+
&:not(.disabled, :disabled):active {
|
|
106
|
+
background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&-prompt {
|
|
112
|
+
display: inline-flex;
|
|
113
|
+
padding-top: calc(var(--padding-x-small) / 2);
|
|
114
|
+
padding-bottom: calc(var(--padding-x-small) / 2);
|
|
115
|
+
padding-left: calc(var(--padding-x-small) - 1px);
|
|
116
|
+
padding-right: var(--padding-x-small);
|
|
117
|
+
border-radius: var(--radius-small);
|
|
118
|
+
word-break: break-word;
|
|
119
|
+
overflow-wrap: break-word;
|
|
120
|
+
|
|
121
|
+
.np-prompt-icon {
|
|
122
|
+
padding-right: calc(var(--size-12) / 2);
|
|
123
|
+
padding-top: calc(var(--size-4) - 1px);
|
|
124
|
+
padding-bottom: calc(var(--size-4) - 1px);
|
|
125
|
+
|
|
126
|
+
.tw-icon-tags,
|
|
127
|
+
.tw-icon-confetti {
|
|
128
|
+
color: var(--color-sentiment-positive-primary);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
a {
|
|
133
|
+
text-underline-offset: calc(var(--size-4) / 2);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&.np-prompt-interactive {
|
|
137
|
+
text-decoration: none;
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
border: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&.negative {
|
|
143
|
+
background-color: var(--color-sentiment-negative-secondary);
|
|
144
|
+
color: var(--color-sentiment-negative-primary);
|
|
145
|
+
a {
|
|
146
|
+
color: var(--color-sentiment-negative-primary);
|
|
147
|
+
&:hover {
|
|
148
|
+
color: var(--color-sentiment-negative-primary-hover);
|
|
149
|
+
}
|
|
150
|
+
&:active {
|
|
151
|
+
color: var(--color-sentiment-negative-primary-active);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
.np-prompt-interactive& {
|
|
155
|
+
&:hover {
|
|
156
|
+
background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 95%, var(--color-sentiment-negative-primary));
|
|
157
|
+
}
|
|
158
|
+
&:active {
|
|
159
|
+
background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 90%, var(--color-sentiment-negative-primary));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
&.positive,
|
|
164
|
+
&.discount,
|
|
165
|
+
&.savings {
|
|
166
|
+
background-color: var(--color-sentiment-positive-secondary);
|
|
167
|
+
color: var(--color-sentiment-positive-primary);
|
|
168
|
+
a {
|
|
169
|
+
color: var(--color-sentiment-positive-primary);
|
|
170
|
+
&:hover {
|
|
171
|
+
color: var(--color-sentiment-positive-primary-hover);
|
|
172
|
+
}
|
|
173
|
+
&:active {
|
|
174
|
+
color: var(--color-sentiment-positive-primary-active);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
.np-prompt-interactive& {
|
|
178
|
+
&:hover {
|
|
179
|
+
background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 95%, var(--color-sentiment-positive-primary));
|
|
180
|
+
}
|
|
181
|
+
&:active {
|
|
182
|
+
background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 90%, var(--color-sentiment-positive-primary));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
&.neutral {
|
|
187
|
+
background-color: var(--color-background-neutral);
|
|
188
|
+
color: var(--color-content-primary);
|
|
189
|
+
a {
|
|
190
|
+
color: var(--color-content-primary);
|
|
191
|
+
}
|
|
192
|
+
.np-prompt-interactive& {
|
|
193
|
+
&:hover {
|
|
194
|
+
background-color: var(--color-background-neutral-hover);
|
|
195
|
+
}
|
|
196
|
+
&:active {
|
|
197
|
+
background-color: var(--color-background-neutral-active);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
&.warning {
|
|
202
|
+
background-color: var(--color-sentiment-warning-secondary);
|
|
203
|
+
color: var(--color-sentiment-warning-content);
|
|
204
|
+
a {
|
|
205
|
+
color: var(--color-sentiment-warning-content);
|
|
206
|
+
&:hover {
|
|
207
|
+
color: var(--color-sentiment-warning-content-hover);
|
|
208
|
+
}
|
|
209
|
+
&:active {
|
|
210
|
+
color: var(--color-sentiment-warning-content-active);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
.np-prompt-interactive& {
|
|
214
|
+
&:hover {
|
|
215
|
+
background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 90%, var(--color-sentiment-warning-primary));
|
|
216
|
+
}
|
|
217
|
+
&:active {
|
|
218
|
+
background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 80%, var(--color-sentiment-warning-primary));
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
@@ -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
|
+
});
|