@transferwise/components 45.20.0 → 45.21.1

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 (133) hide show
  1. package/build/i18n/cs.json +11 -3
  2. package/build/i18n/de.json +11 -3
  3. package/build/i18n/en.json +1 -0
  4. package/build/i18n/es.json +11 -3
  5. package/build/i18n/fr.json +11 -3
  6. package/build/i18n/hu.json +11 -3
  7. package/build/i18n/id.json +11 -3
  8. package/build/i18n/it.json +11 -3
  9. package/build/i18n/ja.json +11 -3
  10. package/build/i18n/pl.json +11 -3
  11. package/build/i18n/pt.json +11 -3
  12. package/build/i18n/ro.json +11 -3
  13. package/build/i18n/ru.json +11 -3
  14. package/build/i18n/th.json +11 -3
  15. package/build/i18n/tr.json +11 -3
  16. package/build/i18n/uk.json +11 -3
  17. package/build/i18n/zh-CN.json +11 -3
  18. package/build/i18n/{zh.json → zh-HK.json} +11 -3
  19. package/build/index.esm.js +540 -236
  20. package/build/index.esm.js.map +1 -1
  21. package/build/index.js +540 -236
  22. package/build/index.js.map +1 -1
  23. package/build/main.css +1 -1
  24. package/build/styles/actionButton/ActionButton.css +1 -1
  25. package/build/styles/chips/Chip.css +1 -1
  26. package/build/styles/circularButton/CircularButton.css +1 -1
  27. package/build/styles/common/Option/Option.css +1 -1
  28. package/build/styles/common/bottomSheet/BottomSheet.css +1 -1
  29. package/build/styles/common/closeButton/CloseButton.css +1 -1
  30. package/build/styles/dateLookup/DateLookup.css +1 -1
  31. package/build/styles/drawer/Drawer.css +1 -1
  32. package/build/styles/flowNavigation/FlowNavigation.css +1 -1
  33. package/build/styles/inputs/SelectInput.css +1 -1
  34. package/build/styles/main.css +1 -1
  35. package/build/styles/overlayHeader/OverlayHeader.css +1 -1
  36. package/build/styles/statusIcon/StatusIcon.css +1 -1
  37. package/build/styles/summary/Summary.css +1 -1
  38. package/build/styles/typeahead/Typeahead.css +1 -1
  39. package/build/styles/uploadInput/UploadInput.css +1 -1
  40. package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
  41. package/build/types/common/locale/index.d.ts +10 -1
  42. package/build/types/common/locale/index.d.ts.map +1 -1
  43. package/build/types/common/propsValues/breakpoint.d.ts +1 -0
  44. package/build/types/common/propsValues/breakpoint.d.ts.map +1 -1
  45. package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
  46. package/build/types/dateLookup/dateHeader/DateHeader.d.ts.map +1 -1
  47. package/build/types/i18n/index.d.ts.map +1 -1
  48. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  49. package/build/types/inputs/SelectInput.messages.d.ts +9 -0
  50. package/build/types/inputs/SelectInput.messages.d.ts.map +1 -0
  51. package/build/types/logo/Logo.d.ts.map +1 -1
  52. package/build/types/test-utils/story-config.d.ts +11 -1
  53. package/build/types/test-utils/story-config.d.ts.map +1 -1
  54. package/build/types/test-utils/window-mock.d.ts +2 -0
  55. package/build/types/test-utils/window-mock.d.ts.map +1 -0
  56. package/package.json +4 -4
  57. package/src/actionButton/ActionButton.css +1 -1
  58. package/src/actionButton/ActionButton.less +5 -1
  59. package/src/chips/Chip.css +1 -1
  60. package/src/chips/Chip.less +8 -0
  61. package/src/circularButton/CircularButton.css +1 -1
  62. package/src/circularButton/CircularButton.less +9 -3
  63. package/src/common/Option/Option.css +1 -1
  64. package/src/common/Option/Option.less +6 -0
  65. package/src/common/bottomSheet/BottomSheet.css +1 -1
  66. package/src/common/bottomSheet/BottomSheet.less +1 -1
  67. package/src/common/bottomSheet/BottomSheet.spec.tsx +4 -1
  68. package/src/common/bottomSheet/BottomSheet.story.tsx +4 -0
  69. package/src/common/bottomSheet/BottomSheet.tsx +10 -1
  70. package/src/common/closeButton/CloseButton.css +1 -1
  71. package/src/common/closeButton/CloseButton.less +12 -0
  72. package/src/common/hooks/useMedia.spec.ts +3 -17
  73. package/src/common/locale/index.js +10 -1
  74. package/src/common/locale/index.spec.js +1 -34
  75. package/src/common/propsValues/breakpoint.ts +1 -0
  76. package/src/dateLookup/DateLookup.css +1 -1
  77. package/src/dateLookup/DateLookup.js +7 -3
  78. package/src/dateLookup/DateLookup.keyboardEvents.spec.js +3 -0
  79. package/src/dateLookup/DateLookup.less +6 -0
  80. package/src/dateLookup/DateLookup.story.js +6 -1
  81. package/src/dateLookup/DateLookup.testingLibrary.spec.js +3 -1
  82. package/src/dateLookup/DateLookup.view.spec.js +4 -0
  83. package/src/dateLookup/dateHeader/DateHeader.js +4 -2
  84. package/src/drawer/Drawer.css +1 -1
  85. package/src/drawer/Drawer.less +6 -8
  86. package/src/drawer/Drawer.story.js +42 -2
  87. package/src/flowNavigation/FlowNavigation.css +1 -1
  88. package/src/i18n/cs.json +11 -3
  89. package/src/i18n/de.json +11 -3
  90. package/src/i18n/en.json +1 -0
  91. package/src/i18n/es.json +11 -3
  92. package/src/i18n/fr.json +11 -3
  93. package/src/i18n/hu.json +11 -3
  94. package/src/i18n/id.json +11 -3
  95. package/src/i18n/index.ts +6 -2
  96. package/src/i18n/it.json +11 -3
  97. package/src/i18n/ja.json +11 -3
  98. package/src/i18n/pl.json +11 -3
  99. package/src/i18n/pt.json +11 -3
  100. package/src/i18n/ro.json +11 -3
  101. package/src/i18n/ru.json +11 -3
  102. package/src/i18n/th.json +11 -3
  103. package/src/i18n/tr.json +11 -3
  104. package/src/i18n/uk.json +11 -3
  105. package/src/i18n/zh-CN.json +11 -3
  106. package/src/i18n/{zh.json → zh-HK.json} +11 -3
  107. package/src/inputs/SelectInput.css +1 -1
  108. package/src/inputs/SelectInput.less +13 -1
  109. package/src/inputs/SelectInput.messages.ts +9 -0
  110. package/src/inputs/SelectInput.story.tsx +8 -5
  111. package/src/inputs/SelectInput.tsx +55 -22
  112. package/src/inputs/_BottomSheet.tsx +19 -19
  113. package/src/logo/Logo.js +5 -0
  114. package/src/main.css +1 -1
  115. package/src/modal/Modal.tsx +2 -2
  116. package/src/overlayHeader/OverlayHeader.css +1 -1
  117. package/src/popover/Popover.spec.js +3 -1
  118. package/src/radioGroup/RadioGroup.js +1 -1
  119. package/src/radioGroup/RadioGroup.spec.js +18 -0
  120. package/src/select/Select.spec.js +6 -9
  121. package/src/statusIcon/StatusIcon.css +1 -1
  122. package/src/statusIcon/StatusIcon.less +10 -0
  123. package/src/summary/Summary.css +1 -1
  124. package/src/summary/Summary.less +1 -1
  125. package/src/test-utils/index.js +1 -0
  126. package/src/test-utils/story-config.ts +21 -7
  127. package/src/test-utils/window-mock.ts +19 -0
  128. package/src/typeahead/Typeahead.css +1 -1
  129. package/src/typeahead/Typeahead.less +5 -6
  130. package/src/uploadInput/UploadInput.css +1 -1
  131. package/src/uploadInput/UploadInput.less +5 -1
  132. package/build/i18n/zh_CN.json +0 -44
  133. package/src/i18n/zh_CN.json +0 -44
package/src/i18n/pt.json CHANGED
@@ -1,14 +1,22 @@
1
1
  {
2
+ "neptune.Button.loadingAriaLabel": "carregando",
2
3
  "neptune.Chips.ariaLabel": "Remover {choice}",
3
4
  "neptune.ClearButton.ariaLabel": "Remover",
4
5
  "neptune.CloseButton.ariaLabel": "Fechar",
5
6
  "neptune.DateInput.day.label": "Dia",
6
7
  "neptune.DateInput.month.label": "Mês",
7
8
  "neptune.DateInput.year.label": "Ano",
9
+ "neptune.DateLookup.day": "dia",
10
+ "neptune.DateLookup.goTo20YearView": "Go to 20 year view",
11
+ "neptune.DateLookup.month": "mês",
12
+ "neptune.DateLookup.next": "próximo",
13
+ "neptune.DateLookup.previous": "anterior",
14
+ "neptune.DateLookup.selected": "selecionada",
15
+ "neptune.DateLookup.twentyYears": "20 anos",
16
+ "neptune.DateLookup.year": "ano",
17
+ "neptune.FlowNavigation.back": "back to previous step",
18
+ "neptune.Link.opensInNewTab": "(abrir a página em uma nova aba)",
8
19
  "neptune.MoneyInput.Select.placeholder": "Escolha uma opção...",
9
- "neptune.Pagination.ariaLabel": "Navegação pelas páginas",
10
- "neptune.PaginationLink.ariaLabel.active": "Ir para a página {pageNumber}",
11
- "neptune.PaginationLink.ariaLabel.inactive": "Página atual, página {pageNumber}",
12
20
  "neptune.Select.searchPlaceholder": "Buscar...",
13
21
  "neptune.Summary.statusDone": "Pronto",
14
22
  "neptune.Summary.statusNotDone": "Não iniciado",
package/src/i18n/ro.json CHANGED
@@ -1,14 +1,22 @@
1
1
  {
2
+ "neptune.Button.loadingAriaLabel": "se încarcă",
2
3
  "neptune.Chips.ariaLabel": "Șterge {choice}",
3
4
  "neptune.ClearButton.ariaLabel": "Elimină",
4
5
  "neptune.CloseButton.ariaLabel": "Închide",
5
6
  "neptune.DateInput.day.label": "Zi",
6
7
  "neptune.DateInput.month.label": "Lună",
7
8
  "neptune.DateInput.year.label": "An",
9
+ "neptune.DateLookup.day": "zi",
10
+ "neptune.DateLookup.goTo20YearView": "Accesează vizualizarea pe 20 de ani",
11
+ "neptune.DateLookup.month": "luna",
12
+ "neptune.DateLookup.next": "înainte",
13
+ "neptune.DateLookup.previous": "precedenta",
14
+ "neptune.DateLookup.selected": "selectată",
15
+ "neptune.DateLookup.twentyYears": "20 de ani",
16
+ "neptune.DateLookup.year": "anul",
17
+ "neptune.FlowNavigation.back": "înapoi la pasul anterior",
18
+ "neptune.Link.opensInNewTab": "(se deschide într-o filă nouă)",
8
19
  "neptune.MoneyInput.Select.placeholder": "Selectează o opţiune...",
9
- "neptune.Pagination.ariaLabel": "Navigare prin pagină",
10
- "neptune.PaginationLink.ariaLabel.active": "Du-te la pagina {pageNumber}",
11
- "neptune.PaginationLink.ariaLabel.inactive": "Pagina curentă, pagina {pageNumber}",
12
20
  "neptune.Select.searchPlaceholder": "Caută...",
13
21
  "neptune.Summary.statusDone": "Finalizat",
14
22
  "neptune.Summary.statusNotDone": "De făcut",
package/src/i18n/ru.json CHANGED
@@ -1,14 +1,22 @@
1
1
  {
2
+ "neptune.Button.loadingAriaLabel": "загрузка",
2
3
  "neptune.Chips.ariaLabel": "Очистить {choice}",
3
4
  "neptune.ClearButton.ariaLabel": "Очистить",
4
5
  "neptune.CloseButton.ariaLabel": "Закрыть",
5
6
  "neptune.DateInput.day.label": "День",
6
7
  "neptune.DateInput.month.label": "Месяц",
7
8
  "neptune.DateInput.year.label": "Год",
9
+ "neptune.DateLookup.day": "день",
10
+ "neptune.DateLookup.goTo20YearView": "Перейти к обзору 20 лет",
11
+ "neptune.DateLookup.month": "месяц",
12
+ "neptune.DateLookup.next": "далее",
13
+ "neptune.DateLookup.previous": "предыдущий",
14
+ "neptune.DateLookup.selected": "выбрано",
15
+ "neptune.DateLookup.twentyYears": "20 лет",
16
+ "neptune.DateLookup.year": "год",
17
+ "neptune.FlowNavigation.back": "вернуться к предыдущему шагу",
18
+ "neptune.Link.opensInNewTab": "(откроется в новой вкладке)",
8
19
  "neptune.MoneyInput.Select.placeholder": "Выберите вариант...",
9
- "neptune.Pagination.ariaLabel": "Постраничная навигация",
10
- "neptune.PaginationLink.ariaLabel.active": "Перейти на страницу {pageNumber}",
11
- "neptune.PaginationLink.ariaLabel.inactive": "Текущая страница, страница {pageNumber}",
12
20
  "neptune.Select.searchPlaceholder": "Поиск...",
13
21
  "neptune.Summary.statusDone": "Этап завершен",
14
22
  "neptune.Summary.statusNotDone": "Этап к выполнению",
package/src/i18n/th.json CHANGED
@@ -1,14 +1,22 @@
1
1
  {
2
+ "neptune.Button.loadingAriaLabel": "กำลังโหลด",
2
3
  "neptune.Chips.ariaLabel": "เคลียร์ {choice}",
3
4
  "neptune.ClearButton.ariaLabel": "ชัดเจน",
4
5
  "neptune.CloseButton.ariaLabel": "ปิด",
5
6
  "neptune.DateInput.day.label": "วัน",
6
7
  "neptune.DateInput.month.label": "เดือน",
7
8
  "neptune.DateInput.year.label": "ปี",
9
+ "neptune.DateLookup.day": "วัน",
10
+ "neptune.DateLookup.goTo20YearView": "Go to 20 year view",
11
+ "neptune.DateLookup.month": "เดือน",
12
+ "neptune.DateLookup.next": "ถัดไป",
13
+ "neptune.DateLookup.previous": "ก่อนหน้า",
14
+ "neptune.DateLookup.selected": "เลือกแล้ว",
15
+ "neptune.DateLookup.twentyYears": "20 ปี",
16
+ "neptune.DateLookup.year": "ปี",
17
+ "neptune.FlowNavigation.back": "back to previous step",
18
+ "neptune.Link.opensInNewTab": "(opens in new tab)",
8
19
  "neptune.MoneyInput.Select.placeholder": "เลือกตัวเลือก...",
9
- "neptune.Pagination.ariaLabel": "การนำทางเลขหน้า",
10
- "neptune.PaginationLink.ariaLabel.active": "ไปที่หน้า {pageNumber}",
11
- "neptune.PaginationLink.ariaLabel.inactive": "หน้าปัจจุบัน หน้า {pageNumber}",
12
20
  "neptune.Select.searchPlaceholder": "ค้นหา...",
13
21
  "neptune.Summary.statusDone": "รายการที่ทำแล้ว",
14
22
  "neptune.Summary.statusNotDone": "รายการที่ต้องทำ",
package/src/i18n/tr.json CHANGED
@@ -1,14 +1,22 @@
1
1
  {
2
+ "neptune.Button.loadingAriaLabel": "yükleniyor",
2
3
  "neptune.Chips.ariaLabel": "{choice} temizle",
3
4
  "neptune.ClearButton.ariaLabel": "Sil",
4
5
  "neptune.CloseButton.ariaLabel": "Kapat",
5
6
  "neptune.DateInput.day.label": "Gün",
6
7
  "neptune.DateInput.month.label": "Ay",
7
8
  "neptune.DateInput.year.label": "Yıl",
9
+ "neptune.DateLookup.day": "gün",
10
+ "neptune.DateLookup.goTo20YearView": "20 yıl görünümüne git",
11
+ "neptune.DateLookup.month": "ay",
12
+ "neptune.DateLookup.next": "devam et",
13
+ "neptune.DateLookup.previous": "önceki",
14
+ "neptune.DateLookup.selected": "seçili",
15
+ "neptune.DateLookup.twentyYears": "20 yıl",
16
+ "neptune.DateLookup.year": "yıl",
17
+ "neptune.FlowNavigation.back": "önceki adıma dön",
18
+ "neptune.Link.opensInNewTab": "(yeni sekmede açılır)",
8
19
  "neptune.MoneyInput.Select.placeholder": "Bir seçenek seçin...",
9
- "neptune.Pagination.ariaLabel": "Sayfalandırma gezintisi",
10
- "neptune.PaginationLink.ariaLabel.active": "{pageNumber} numaralı sayfaya git",
11
- "neptune.PaginationLink.ariaLabel.inactive": "Mevcut sayfa, sayfa {pageNumber}",
12
20
  "neptune.Select.searchPlaceholder": "Ara...",
13
21
  "neptune.Summary.statusDone": "Tamamlanan aşama",
14
22
  "neptune.Summary.statusNotDone": "Yapılacak",
package/src/i18n/uk.json CHANGED
@@ -1,14 +1,22 @@
1
1
  {
2
+ "neptune.Button.loadingAriaLabel": "завантаження",
2
3
  "neptune.Chips.ariaLabel": "Очистити {choice}",
3
4
  "neptune.ClearButton.ariaLabel": "Очистити",
4
5
  "neptune.CloseButton.ariaLabel": "Закрити",
5
6
  "neptune.DateInput.day.label": "День",
6
7
  "neptune.DateInput.month.label": "Місяць",
7
8
  "neptune.DateInput.year.label": "Рік",
9
+ "neptune.DateLookup.day": "дня",
10
+ "neptune.DateLookup.goTo20YearView": "Go to 20 year view",
11
+ "neptune.DateLookup.month": "місяць",
12
+ "neptune.DateLookup.next": "уперед",
13
+ "neptune.DateLookup.previous": "назад",
14
+ "neptune.DateLookup.selected": "вибрано",
15
+ "neptune.DateLookup.twentyYears": "20 років",
16
+ "neptune.DateLookup.year": "рік",
17
+ "neptune.FlowNavigation.back": "back to previous step",
18
+ "neptune.Link.opensInNewTab": "(opens in new tab)",
8
19
  "neptune.MoneyInput.Select.placeholder": "Виберіть варіант…",
9
- "neptune.Pagination.ariaLabel": "Перехід за сторінками",
10
- "neptune.PaginationLink.ariaLabel.active": "Перейти на сторінку {pageNumber}",
11
- "neptune.PaginationLink.ariaLabel.inactive": "Ця сторінка, сторінка {pageNumber}",
12
20
  "neptune.Select.searchPlaceholder": "Пошук…",
13
21
  "neptune.Summary.statusDone": "Виконано",
14
22
  "neptune.Summary.statusNotDone": "Не виконано",
@@ -1,14 +1,22 @@
1
1
  {
2
+ "neptune.Button.loadingAriaLabel": "正在加载",
2
3
  "neptune.Chips.ariaLabel": "清除 {choice}",
3
4
  "neptune.ClearButton.ariaLabel": "清晰",
4
5
  "neptune.CloseButton.ariaLabel": "关闭",
5
6
  "neptune.DateInput.day.label": "日",
6
7
  "neptune.DateInput.month.label": "月",
7
8
  "neptune.DateInput.year.label": "年",
9
+ "neptune.DateLookup.day": "日",
10
+ "neptune.DateLookup.goTo20YearView": "Go to 20 year view",
11
+ "neptune.DateLookup.month": "月",
12
+ "neptune.DateLookup.next": "下一页",
13
+ "neptune.DateLookup.previous": "上一页",
14
+ "neptune.DateLookup.selected": "已选",
15
+ "neptune.DateLookup.twentyYears": "20年",
16
+ "neptune.DateLookup.year": "年",
17
+ "neptune.FlowNavigation.back": "back to previous step",
18
+ "neptune.Link.opensInNewTab": "(opens in new tab)",
8
19
  "neptune.MoneyInput.Select.placeholder": "请选择...",
9
- "neptune.Pagination.ariaLabel": "分页导航",
10
- "neptune.PaginationLink.ariaLabel.active": "转到第 {pageNumber} 页",
11
- "neptune.PaginationLink.ariaLabel.inactive": "当前页面,第 {pageNumber} 页",
12
20
  "neptune.Select.searchPlaceholder": "搜索",
13
21
  "neptune.Summary.statusDone": "已完成",
14
22
  "neptune.Summary.statusNotDone": "未完成",
@@ -1,14 +1,22 @@
1
1
  {
2
+ "neptune.Button.loadingAriaLabel": "載入中",
2
3
  "neptune.Chips.ariaLabel": "清除{choice}",
3
4
  "neptune.ClearButton.ariaLabel": "清除",
4
5
  "neptune.CloseButton.ariaLabel": "關閉",
5
6
  "neptune.DateInput.day.label": "日",
6
7
  "neptune.DateInput.month.label": "月",
7
8
  "neptune.DateInput.year.label": "年",
9
+ "neptune.DateLookup.day": "日",
10
+ "neptune.DateLookup.goTo20YearView": "切換至20年視圖",
11
+ "neptune.DateLookup.month": "月",
12
+ "neptune.DateLookup.next": "下一個",
13
+ "neptune.DateLookup.previous": "上一個",
14
+ "neptune.DateLookup.selected": "已選",
15
+ "neptune.DateLookup.twentyYears": "20年",
16
+ "neptune.DateLookup.year": "年",
17
+ "neptune.FlowNavigation.back": "返回上一個步驟",
18
+ "neptune.Link.opensInNewTab": "(在新分頁中開啟)",
8
19
  "neptune.MoneyInput.Select.placeholder": "選擇一個選項…",
9
- "neptune.Pagination.ariaLabel": "分頁導航",
10
- "neptune.PaginationLink.ariaLabel.active": "前往第{pageNumber}頁",
11
- "neptune.PaginationLink.ariaLabel.inactive": "目前在第{pageNumber}頁",
12
20
  "neptune.Select.searchPlaceholder": "搜尋…",
13
21
  "neptune.Summary.statusDone": "已完成事項",
14
22
  "neptune.Summary.statusNotDone": "未完成事項",
@@ -1 +1 @@
1
- .np-bottom-sheet-v2-container{position:relative;z-index:1060}.np-bottom-sheet-v2-backdrop-container--enter,.np-bottom-sheet-v2-backdrop-container--leave{transition-duration:.15s;transition-property:opacity;transition-timing-function:ease-out}.np-bottom-sheet-v2-backdrop-container--enter-from,.np-bottom-sheet-v2-backdrop-container--leave-to{opacity:0}.np-bottom-sheet-v2-backdrop{background-color:#37517e;background-color:var(--color-content-primary);inset:0;opacity:.4;position:fixed}.np-bottom-sheet-v2{display:flex;flex-direction:column;inset:0;justify-content:flex-end;padding-left:8px;padding-left:var(--size-8);padding-right:8px;padding-right:var(--size-8);padding-top:64px;padding-top:var(--size-64);position:fixed}.np-bottom-sheet-v2-content{max-height:100%}.np-bottom-sheet-v2-content--enter,.np-bottom-sheet-v2-content--leave{transition-duration:.3s;transition-property:transform;transition-timing-function:ease-out}@media (prefers-reduced-motion:reduce){.np-bottom-sheet-v2-content--enter,.np-bottom-sheet-v2-content--leave{transition-property:opacity}}@media (prefers-reduced-motion:no-preference){.np-bottom-sheet-v2-content--enter-from,.np-bottom-sheet-v2-content--leave-to{transform:translateY(100%)}}@media (prefers-reduced-motion:reduce){.np-bottom-sheet-v2-content--enter-from,.np-bottom-sheet-v2-content--leave-to{opacity:0}}.np-bottom-sheet-v2-content-inner-container{background-color:#fff;background-color:var(--color-background-elevated);border-top-left-radius:32px;border-top-right-radius:32px;box-shadow:0 0 40px rgba(69,71,69,.2);display:flex;flex-direction:column;height:100%}.np-bottom-sheet-v2-content-inner-container:focus{outline:none}.np-bottom-sheet-v2-header{align-self:flex-end;padding:16px;padding:var(--size-16)}.np-bottom-sheet-v2-content-inner{display:grid;grid-template-rows:repeat(1,minmax(0,1fr));overflow-y:auto;padding-top:0;row-gap:8px;row-gap:var(--size-8)}.np-bottom-sheet-v2-content-inner--has-title{grid-template-rows:auto 1fr}.np-bottom-sheet-v2-content-inner--padding-md{padding:16px;padding:var(--size-16)}.np-bottom-sheet-v2-title{color:#37517e;color:var(--color-content-primary)}.np-bottom-sheet-v2-body{color:#5d7079;color:var(--color-content-secondary)}.np-button-input{align-content:center;border-radius:10px;border-radius:var(--size-10);display:inline-grid;grid-auto-columns:minmax(0,1fr);text-align:start}.np-popover-v2-container{background-color:#fff;background-color:var(--color-background-elevated);border-radius:10px;border-radius:var(--radius-small);box-shadow:0 0 40px rgba(69,71,69,.2);display:flex;flex-direction:column;max-height:var(--max-height);min-width:20rem;width:var(--width);z-index:1060}.np-popover-v2-container:focus{outline:none}.np-popover-v2{display:grid;grid-template-rows:repeat(1,minmax(0,1fr));overflow-y:auto;row-gap:8px;row-gap:var(--size-8)}.np-popover-v2--has-title{grid-template-rows:auto 1fr}.np-popover-v2--padding-md{padding:16px;padding:var(--size-16)}.np-popover-v2-title{color:#37517e;color:var(--color-content-primary)}.np-popover-v2-content{color:#5d7079;color:var(--color-content-secondary)}.np-select-input-placeholder{color:#768e9c;color:var(--color-content-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.np-select-input-options-container{display:flex;flex-direction:column;height:100%}.np-select-input-options-container:focus{outline:none}@media (min-width:576px){.np-select-input-options-container{max-height:28rem}}.np-select-input-query-container{display:flex;flex-direction:column;padding:8px;padding:var(--size-8);padding-top:0}@media (min-width:576px){.np-select-input-query-container{padding-top:8px;padding-top:var(--size-8)}}.np-select-input-listbox-container{height:var(--initial-height);overflow-y:auto;position:relative;scroll-padding-bottom:8px;scroll-padding-bottom:var(--size-8);scroll-padding-top:8px;scroll-padding-top:var(--size-8)}@media (min-width:576px){.np-select-input-listbox-container{height:auto}}.np-select-input-listbox-container--has-group{scroll-padding-top:32px;scroll-padding-top:var(--size-32)}.np-select-input-listbox{padding:8px;padding:var(--size-8)}.np-select-input-listbox:focus{outline:none}.np-select-input-separator-item{border-top-width:1px;margin:8px;margin:var(--size-8)}.np-select-input-group-item--without-needle:first-child{margin-top:-8px;margin-top:calc(var(--size-8)*-1)}.np-select-input-group-item-header{background-color:#fff;background-color:var(--color-background-elevated);color:#5d7079;color:var(--color-content-secondary);padding:8px 16px 4px;padding:var(--size-8) var(--size-16) var(--size-4);position:sticky;top:0;z-index:10}.np-select-input-option-container{align-items:center;border-radius:10px;border-radius:var(--radius-small);color:var(--color-interactive-primary);-moz-column-gap:8px;column-gap:8px;-moz-column-gap:var(--size-8);column-gap:var(--size-8);cursor:default;display:flex;padding:12px 16px;padding:var(--size-12) var(--size-16);-webkit-user-select:none;-moz-user-select:none;user-select:none}.np-select-input-option-container--active{background-color:var(--color-interactive-primary)}.np-select-input-option-container--active.np-select-input-option-container--active *{color:#00a2dd;color:var(--color-interactive-accent)}.np-select-input-option-container--disabled{opacity:.45}.np-select-input-option-check{padding:0 4px;padding:0 var(--size-4)}.np-select-input-option-check--not-selected{visibility:hidden}.np-select-input-option-check-placeholder{display:inline-block;margin-inline-start:16px;margin-inline-start:var(--size-16);width:16px;width:var(--size-16)}.np-select-input-option{flex:1}.np-select-input-option-content-container{align-items:center;color:#37517e;color:var(--color-content-primary);-moz-column-gap:8px;column-gap:8px;-moz-column-gap:var(--size-8);column-gap:var(--size-8);display:flex}.np-select-input-option-content-icon{display:flex}.np-select-input-option-content-icon--not-within-trigger{align-self:flex-start}.np-select-input-option-content-text{display:flex;flex:1;flex-direction:column;overflow:hidden}.np-select-input-option-content-text-primary{font:inherit}.np-select-input-option-content-text-secondary{color:#5d7079;color:var(--color-content-secondary)}.np-select-input-option-content-text-within-trigger{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.np-select-input-option-content-text-line-1>:not([hidden])~:not([hidden]){margin-left:8px;margin-left:var(--size-8);margin-right:8px;margin-right:var(--size-8)}.np-select-input-addon-container{align-items:center;display:inline-flex;pointer-events:none}.np-select-input-addon-container,.np-select-input-addon-container>:not([hidden])~:not([hidden]){margin-inline-start:4px;margin-inline-start:var(--size-4)}.np-select-input-addon{align-items:center;background:none;border-radius:.125rem;border-width:0;display:inline-flex;height:24px;height:var(--size-24);justify-content:center;width:24px;width:var(--size-24)}.np-select-input-addon--interactive{color:#c9cbce;color:var(--color-interactive-secondary);pointer-events:auto}.np-select-input-addon--interactive:hover{color:#b5b7ba;color:var(--color-interactive-secondary-hover)}.np-select-input-addon--interactive:focus{outline:none}.np-select-input-addon--interactive:focus-visible{outline:var(--ring-outline-color) solid var(--ring-outline-width);outline-offset:var(--ring-outline-offset)}.np-select-input-addon-separator{border-inline-start:1px solid #0000001a;border-inline-start:1px solid var(--color-border-neutral);height:24px;height:var(--size-24)}
1
+ .np-bottom-sheet-v2-container{position:relative;z-index:1060}.np-bottom-sheet-v2-backdrop-container--enter,.np-bottom-sheet-v2-backdrop-container--leave{transition-duration:.15s;transition-property:opacity;transition-timing-function:ease-out}.np-bottom-sheet-v2-backdrop-container--enter-from,.np-bottom-sheet-v2-backdrop-container--leave-to{opacity:0}.np-bottom-sheet-v2-backdrop{background-color:#37517e;background-color:var(--color-content-primary);inset:0;opacity:.4;position:fixed}.np-bottom-sheet-v2{display:flex;flex-direction:column;inset:0;justify-content:flex-end;padding-left:8px;padding-left:var(--size-8);padding-right:8px;padding-right:var(--size-8);padding-top:64px;padding-top:var(--size-64);position:fixed}.np-bottom-sheet-v2-content{max-height:100%}.np-bottom-sheet-v2-content--enter,.np-bottom-sheet-v2-content--leave{transition-duration:.3s;transition-property:transform;transition-timing-function:ease-out}@media (prefers-reduced-motion:reduce){.np-bottom-sheet-v2-content--enter,.np-bottom-sheet-v2-content--leave{transition-property:opacity}}@media (prefers-reduced-motion:no-preference){.np-bottom-sheet-v2-content--enter-from,.np-bottom-sheet-v2-content--leave-to{transform:translateY(100%)}}@media (prefers-reduced-motion:reduce){.np-bottom-sheet-v2-content--enter-from,.np-bottom-sheet-v2-content--leave-to{opacity:0}}.np-bottom-sheet-v2-content-inner-container{background-color:#fff;background-color:var(--color-background-elevated);border-top-left-radius:32px;border-top-right-radius:32px;box-shadow:0 0 40px rgba(69,71,69,.2);display:flex;flex-direction:column;height:100%}.np-bottom-sheet-v2-content-inner-container:focus{outline:none}.np-bottom-sheet-v2-header{align-self:flex-end;padding:16px;padding:var(--size-16)}.np-bottom-sheet-v2-content-inner{display:grid;grid-template-rows:repeat(1,minmax(0,1fr));overflow-y:auto;padding-top:0;row-gap:8px;row-gap:var(--size-8)}.np-bottom-sheet-v2-content-inner--has-title{grid-template-rows:auto 1fr}.np-bottom-sheet-v2-content-inner--padding-md{padding:16px;padding:var(--size-16)}.np-bottom-sheet-v2-title{color:#37517e;color:var(--color-content-primary)}.np-bottom-sheet-v2-body{color:#5d7079;color:var(--color-content-secondary)}.np-button-input{align-content:center;border-radius:10px;border-radius:var(--size-10);display:inline-grid;grid-auto-columns:minmax(0,1fr);text-align:start}.np-popover-v2-container{background-color:#fff;background-color:var(--color-background-elevated);border-radius:10px;border-radius:var(--radius-small);box-shadow:0 0 40px rgba(69,71,69,.2);display:flex;flex-direction:column;max-height:var(--max-height);min-width:20rem;width:var(--width);z-index:1060}.np-popover-v2-container:focus{outline:none}.np-popover-v2{display:grid;grid-template-rows:repeat(1,minmax(0,1fr));overflow-y:auto;row-gap:8px;row-gap:var(--size-8)}.np-popover-v2--has-title{grid-template-rows:auto 1fr}.np-popover-v2--padding-md{padding:16px;padding:var(--size-16)}.np-popover-v2-title{color:#37517e;color:var(--color-content-primary)}.np-popover-v2-content{color:#5d7079;color:var(--color-content-secondary)}.np-select-input-placeholder{color:#768e9c;color:var(--color-content-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.np-select-input-options-container{display:flex;flex-direction:column;height:100%}.np-select-input-options-container:focus{outline:none}@media (min-width:576px){.np-select-input-options-container{max-height:28rem}}.np-select-input-options-status{align-items:center;-moz-column-gap:8px;column-gap:8px;-moz-column-gap:var(--size-8);column-gap:var(--size-8);display:flex;padding:8px 24px 0;padding:var(--size-8) var(--size-24) 0}.np-select-input-options-status-icon{color:#768e9c;color:var(--color-content-tertiary);padding:0 4px;padding:0 var(--size-4)}.np-select-input-query-container{display:flex;flex-direction:column;padding:8px;padding:var(--size-8);padding-top:0}@media (min-width:576px){.np-select-input-query-container{padding-top:8px;padding-top:var(--size-8)}}.np-select-input-listbox-container{height:var(--initial-height);overflow-y:auto;position:relative;scroll-padding-bottom:8px;scroll-padding-bottom:var(--size-8);scroll-padding-top:8px;scroll-padding-top:var(--size-8)}@media (min-width:576px){.np-select-input-listbox-container{height:auto}}.np-select-input-listbox-container--has-group{scroll-padding-top:32px;scroll-padding-top:var(--size-32)}.np-select-input-listbox{padding:8px;padding:var(--size-8)}.np-select-input-listbox:focus{outline:none}.np-select-input-separator-item{border-top-width:1px;margin:8px;margin:var(--size-8)}.np-select-input-group-item--without-needle:first-child{margin-top:-8px;margin-top:calc(var(--size-8)*-1)}.np-select-input-group-item-header{background-color:#fff;background-color:var(--color-background-elevated);color:#5d7079;color:var(--color-content-secondary);padding:8px 16px 4px;padding:var(--size-8) var(--size-16) var(--size-4);position:sticky;top:0;z-index:10}.np-select-input-option-container{align-items:center;border-radius:10px;border-radius:var(--radius-small);color:var(--color-interactive-primary);-moz-column-gap:8px;column-gap:8px;-moz-column-gap:var(--size-8);column-gap:var(--size-8);cursor:default;display:flex;padding:12px 16px;padding:var(--size-12) var(--size-16);-webkit-user-select:none;-moz-user-select:none;user-select:none}.np-select-input-option-container--active{background-color:var(--color-interactive-primary)}.np-select-input-option-container--active.np-select-input-option-container--active *{color:var(--color-interactive-contrast)}.np-select-input-option-container--disabled{opacity:.45}.np-select-input-option-check{padding:0 4px;padding:0 var(--size-4)}.np-select-input-option-check--not-selected{visibility:hidden}.np-select-input-option-check-placeholder{display:inline-block;margin-inline-start:16px;margin-inline-start:var(--size-16);width:16px;width:var(--size-16)}.np-select-input-option{flex:1}.np-select-input-option-content-container{align-items:center;color:#37517e;color:var(--color-content-primary);-moz-column-gap:8px;column-gap:8px;-moz-column-gap:var(--size-8);column-gap:var(--size-8);display:flex}.np-select-input-option-content-icon{display:flex}.np-select-input-option-content-icon--not-within-trigger{align-self:flex-start}.np-select-input-option-content-text{display:flex;flex:1;flex-direction:column;overflow:hidden}.np-select-input-option-content-text-primary{font:inherit}.np-select-input-option-content-text-secondary{color:#5d7079;color:var(--color-content-secondary)}.np-select-input-option-content-text-within-trigger{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.np-select-input-option-content-text-line-1>:not([hidden])~:not([hidden]){margin-left:8px;margin-left:var(--size-8);margin-right:8px;margin-right:var(--size-8)}.np-select-input-addon-container{align-items:center;display:inline-flex;pointer-events:none}.np-select-input-addon-container,.np-select-input-addon-container>:not([hidden])~:not([hidden]){margin-inline-start:4px;margin-inline-start:var(--size-4)}.np-select-input-addon{align-items:center;background:none;border-radius:.125rem;border-width:0;display:inline-flex;height:24px;height:var(--size-24);justify-content:center;width:24px;width:var(--size-24)}.np-select-input-addon--interactive{color:#c9cbce;color:var(--color-interactive-secondary);pointer-events:auto}.np-select-input-addon--interactive:hover{color:#b5b7ba;color:var(--color-interactive-secondary-hover)}.np-select-input-addon--interactive:focus{outline:none}.np-select-input-addon--interactive:focus-visible{outline:var(--ring-outline-color) solid var(--ring-outline-width);outline-offset:var(--ring-outline-offset)}.np-select-input-addon-separator{border-inline-start:1px solid #0000001a;border-inline-start:1px solid var(--color-border-neutral);height:24px;height:var(--size-24)}
@@ -26,6 +26,18 @@
26
26
  }
27
27
  }
28
28
 
29
+ .np-select-input-options-status {
30
+ display: flex;
31
+ align-items: center;
32
+ column-gap: var(--size-8);
33
+ padding: var(--size-8) var(--size-24) 0px;
34
+ }
35
+
36
+ .np-select-input-options-status-icon {
37
+ padding: 0 var(--size-4);
38
+ color: var(--color-content-tertiary);
39
+ }
40
+
29
41
  .np-select-input-query-container {
30
42
  display: flex;
31
43
  flex-direction: column;
@@ -99,7 +111,7 @@
99
111
  background-color: var(--color-interactive-primary);
100
112
 
101
113
  && * {
102
- color: var(--color-interactive-accent); /* TODO: Use contrast token */
114
+ color: var(--color-interactive-contrast);
103
115
  }
104
116
  }
105
117
 
@@ -0,0 +1,9 @@
1
+ import { defineMessages } from 'react-intl';
2
+
3
+ export default defineMessages({
4
+ noResultsFound: {
5
+ id: 'neptune.SelectInput.noResultsFound',
6
+ defaultMessage: 'No results found',
7
+ description: 'When a user-initiated search produces no results.',
8
+ },
9
+ });
@@ -131,6 +131,10 @@ export const Basic: StoryObj<{
131
131
  action: 'cleared',
132
132
  },
133
133
  },
134
+ play: ({ canvasElement }) => {
135
+ const triggerButton = within(canvasElement).getByRole('button');
136
+ userEvent.click(triggerButton);
137
+ },
134
138
  };
135
139
 
136
140
  interface Month {
@@ -180,11 +184,10 @@ export const Months: StoryObj<{
180
184
  action: 'cleared',
181
185
  },
182
186
  },
183
- };
184
-
185
- Months.play = ({ canvasElement }) => {
186
- const canvas = within(canvasElement);
187
- userEvent.click(canvas.getByText('January'));
187
+ play: ({ canvasElement }) => {
188
+ const triggerButton = within(canvasElement).getByText('January');
189
+ userEvent.click(triggerButton);
190
+ },
188
191
  };
189
192
 
190
193
  interface Currency {
@@ -1,6 +1,6 @@
1
1
  import { Listbox as ListboxBase } from '@headlessui/react';
2
2
  import { useId } from '@radix-ui/react-id';
3
- import { Check, ChevronDown, Cross } from '@transferwise/icons';
3
+ import { Check, ChevronDown, Cross, CrossCircle } from '@transferwise/icons';
4
4
  import classNames from 'classnames';
5
5
  import mergeProps from 'merge-props';
6
6
  import { createContext, forwardRef, useContext, useEffect, useMemo, useRef, useState } from 'react';
@@ -11,12 +11,13 @@ import { useEffectEvent } from '../common/hooks/useEffectEvent';
11
11
  import { useScreenSize } from '../common/hooks/useScreenSize';
12
12
  import { PolymorphicWithOverrides } from '../common/polymorphicWithOverrides/PolymorphicWithOverrides';
13
13
  import { Breakpoint } from '../common/propsValues/breakpoint';
14
- import messages from '../dateLookup/dateTrigger/DateTrigger.messages';
14
+ import dateTriggerMessages from '../dateLookup/dateTrigger/DateTrigger.messages';
15
15
  import { wrapInFragment } from '../utilities/wrapInFragment';
16
16
  import { Merge } from '../utils';
17
17
 
18
18
  import { InputGroup } from './InputGroup';
19
19
  import { SearchInput } from './SearchInput';
20
+ import messages from './SelectInput.messages';
20
21
  import { BottomSheet } from './_BottomSheet';
21
22
  import { ButtonInput } from './_ButtonInput';
22
23
  import { Popover } from './_Popover';
@@ -83,14 +84,11 @@ function dedupeSelectInputOptionItem<T>(
83
84
  item: SelectInputOptionItem<T>,
84
85
  existingValues: Set<T>,
85
86
  ): SelectInputOptionItem<T | undefined> {
86
- if (existingValues.has(item.value)) {
87
- return {
88
- ...item,
89
- value: undefined,
90
- };
87
+ if (!existingValues.has(item.value)) {
88
+ existingValues.add(item.value);
89
+ return item;
91
90
  }
92
- existingValues.add(item.value);
93
- return item;
91
+ return { ...item, value: undefined };
94
92
  }
95
93
 
96
94
  function dedupeSelectInputItems<T>(
@@ -116,6 +114,27 @@ function dedupeSelectInputItems<T>(
116
114
  });
117
115
  }
118
116
 
117
+ function filterSelectInputOptionItem<T>(item: SelectInputOptionItem<T>, needle: string) {
118
+ return inferSearchableStrings(item.filterMatchers ?? item.value).some((haystack) =>
119
+ haystack.includes(needle),
120
+ );
121
+ }
122
+
123
+ function filterSelectInputItems<T>(items: readonly SelectInputItem<T>[], needle: string) {
124
+ return items.filter((item) => {
125
+ switch (item.type) {
126
+ case 'option': {
127
+ return filterSelectInputOptionItem(item, needle);
128
+ }
129
+ case 'group': {
130
+ return item.options.some((option) => filterSelectInputOptionItem(option, needle));
131
+ }
132
+ default:
133
+ }
134
+ return false;
135
+ });
136
+ }
137
+
119
138
  export interface SelectInputProps<T = string> {
120
139
  name?: string;
121
140
  placeholder?: string;
@@ -186,7 +205,7 @@ function SelectInputClearButton({ className, onClick }: SelectInputClearButtonPr
186
205
  return (
187
206
  <button
188
207
  type="button"
189
- aria-label={intl.formatMessage(messages.ariaLabel)}
208
+ aria-label={intl.formatMessage(dateTriggerMessages.ariaLabel)}
190
209
  className={classNames(className, 'np-select-input-addon np-select-input-addon--interactive')}
191
210
  onClick={onClick}
192
211
  >
@@ -350,9 +369,16 @@ const SelectInputOptionsContainer = forwardRef(function SelectInputOptionsContai
350
369
  ref={ref}
351
370
  onKeyDown={(event) => {
352
371
  // Prevent absorbing dismissal requests too early
353
- if (event.key !== 'Escape') {
354
- onKeyDown?.(event);
372
+ if (event.key === 'Escape') {
373
+ return;
374
+ }
375
+
376
+ // Prevent confirmation close without an active item
377
+ if (event.key === 'Enter' && ariaActiveDescendant == null) {
378
+ return;
355
379
  }
380
+
381
+ onKeyDown?.(event);
356
382
  }}
357
383
  {...restProps}
358
384
  />
@@ -373,6 +399,10 @@ function SelectInputOptions<T = string>({
373
399
  searchInputRef,
374
400
  listboxRef,
375
401
  }: SelectInputOptionsProps<T>) {
402
+ const intl = useIntl();
403
+
404
+ const controllerRef = filterable ? searchInputRef : listboxRef;
405
+
376
406
  const [query, setQuery] = useState('');
377
407
  const needle = useMemo(() => {
378
408
  if (filterable) {
@@ -380,6 +410,7 @@ function SelectInputOptions<T = string>({
380
410
  }
381
411
  return undefined;
382
412
  }, [filterable, query]);
413
+ const empty = needle != null && filterSelectInputItems(items, needle).length === 0;
383
414
 
384
415
  const listboxContainerRef = useRef<HTMLDivElement>(null);
385
416
  useEffect(() => {
@@ -391,10 +422,10 @@ function SelectInputOptions<T = string>({
391
422
  }
392
423
  }, []);
393
424
 
425
+ const showStatus = empty;
426
+ const statusId = useId();
394
427
  const listboxId = useId();
395
428
 
396
- const controllerRef = filterable ? searchInputRef : listboxRef;
397
-
398
429
  return (
399
430
  <ListboxBase.Options
400
431
  as={SelectInputOptionsContainer}
@@ -418,6 +449,7 @@ function SelectInputOptions<T = string>({
418
449
  placeholder={filterPlaceholder}
419
450
  value={query}
420
451
  aria-controls={listboxId}
452
+ aria-describedby={showStatus ? statusId : undefined}
421
453
  onKeyDown={(event) => {
422
454
  // Prevent interfering with the matcher of Headless UI
423
455
  // https://mathiasbynens.be/notes/javascript-unicode#regex
@@ -440,6 +472,13 @@ function SelectInputOptions<T = string>({
440
472
  'np-select-input-listbox-container--has-group',
441
473
  )}
442
474
  >
475
+ {empty ? (
476
+ <div id={statusId} className="np-select-input-options-status">
477
+ <CrossCircle size={16} className="np-select-input-options-status-icon" />
478
+ {intl.formatMessage(messages.noResultsFound)}
479
+ </div>
480
+ ) : null}
481
+
443
482
  <div
444
483
  ref={listboxRef}
445
484
  id={listboxId}
@@ -448,7 +487,7 @@ function SelectInputOptions<T = string>({
448
487
  tabIndex={0}
449
488
  className="np-select-input-listbox"
450
489
  >
451
- {(needle == null ? items : dedupeSelectInputItems(items)).map((item, index) => (
490
+ {(needle != null ? dedupeSelectInputItems(items) : items).map((item, index) => (
452
491
  <SelectInputItemView
453
492
  // eslint-disable-next-line react/no-array-index-key
454
493
  key={index}
@@ -478,13 +517,7 @@ function SelectInputItemView<T = string>({
478
517
  }: SelectInputItemViewProps<T>) {
479
518
  switch (item.type) {
480
519
  case 'option': {
481
- if (
482
- item.value != null &&
483
- (!needle ||
484
- inferSearchableStrings(item.filterMatchers ?? item.value).some((haystack) =>
485
- haystack.includes(needle),
486
- ))
487
- ) {
520
+ if (item.value != null && (needle == null || filterSelectInputOptionItem(item, needle))) {
488
521
  return (
489
522
  <SelectInputOption value={item.value} disabled={item.disabled}>
490
523
  {renderValue(item.value, false)}
@@ -74,24 +74,24 @@ export function BottomSheet({
74
74
  setFloatingKey((prev) => prev + 1);
75
75
  }}
76
76
  >
77
- <Transition.Child
78
- enter="np-bottom-sheet-v2-backdrop-container--enter"
79
- enterFrom="np-bottom-sheet-v2-backdrop-container--enter-from"
80
- leave="np-bottom-sheet-v2-backdrop-container--leave"
81
- leaveTo="np-bottom-sheet-v2-backdrop-container--leave-to"
82
- >
83
- <div className="np-bottom-sheet-v2-backdrop" />
84
- </Transition.Child>
85
-
86
- <div className="np-bottom-sheet-v2">
77
+ <FocusBoundary>
87
78
  <Transition.Child
88
- className="np-bottom-sheet-v2-content"
89
- enter="np-bottom-sheet-v2-content--enter"
90
- enterFrom="np-bottom-sheet-v2-content--enter-from"
91
- leave="np-bottom-sheet-v2-content--leave"
92
- leaveTo="np-bottom-sheet-v2-content--leave-to"
79
+ enter="np-bottom-sheet-v2-backdrop-container--enter"
80
+ enterFrom="np-bottom-sheet-v2-backdrop-container--enter-from"
81
+ leave="np-bottom-sheet-v2-backdrop-container--leave"
82
+ leaveTo="np-bottom-sheet-v2-backdrop-container--leave-to"
93
83
  >
94
- <FocusBoundary>
84
+ <div className="np-bottom-sheet-v2-backdrop" />
85
+ </Transition.Child>
86
+
87
+ <div className="np-bottom-sheet-v2">
88
+ <Transition.Child
89
+ className="np-bottom-sheet-v2-content"
90
+ enter="np-bottom-sheet-v2-content--enter"
91
+ enterFrom="np-bottom-sheet-v2-content--enter-from"
92
+ leave="np-bottom-sheet-v2-content--leave"
93
+ leaveTo="np-bottom-sheet-v2-content--leave-to"
94
+ >
95
95
  <FloatingFocusManager
96
96
  context={context}
97
97
  initialFocus={initialFocusRef}
@@ -130,9 +130,9 @@ export function BottomSheet({
130
130
  </div>
131
131
  </div>
132
132
  </FloatingFocusManager>
133
- </FocusBoundary>
134
- </Transition.Child>
135
- </div>
133
+ </Transition.Child>
134
+ </div>
135
+ </FocusBoundary>
136
136
  </Transition>
137
137
  </ThemeProvider>
138
138
  </FloatingPortal>
package/src/logo/Logo.js CHANGED
@@ -27,6 +27,11 @@ const Logo = ({ className, inverse, type }) => {
27
27
  ? svgPaths[`WISE_FLAG${inverse ? '_INVERSE' : ''}`]
28
28
  : svgPaths[`${type}${inverse ? '_INVERSE' : ''}`];
29
29
 
30
+ // If clientWidth is not defined, don't render anything
31
+ if (clientWidth === null) {
32
+ return null;
33
+ }
34
+
30
35
  return (
31
36
  <LogoSvg
32
37
  className={classNames('np-logo-svg', className)}