@transferwise/components 46.168.0 → 46.168.2

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 (168) hide show
  1. package/build/ListItem/ListItem.js +32 -2
  2. package/build/ListItem/ListItem.js.map +1 -1
  3. package/build/ListItem/ListItem.mjs +33 -3
  4. package/build/ListItem/ListItem.mjs.map +1 -1
  5. package/build/Prompt/Snackbar/Snackbar.js +11 -9
  6. package/build/Prompt/Snackbar/Snackbar.js.map +1 -1
  7. package/build/Prompt/Snackbar/Snackbar.mjs +7 -8
  8. package/build/Prompt/Snackbar/Snackbar.mjs.map +1 -1
  9. package/build/Prompt/Snackbar/SnackbarProvider.js +2 -2
  10. package/build/Prompt/Snackbar/SnackbarProvider.js.map +1 -1
  11. package/build/Prompt/Snackbar/SnackbarProvider.mjs +2 -2
  12. package/build/Prompt/Snackbar/SnackbarProvider.mjs.map +1 -1
  13. package/build/Prompt/Snackbar/useSnackbarSwipeDismiss.js +33 -46
  14. package/build/Prompt/Snackbar/useSnackbarSwipeDismiss.js.map +1 -1
  15. package/build/Prompt/Snackbar/useSnackbarSwipeDismiss.mjs +34 -47
  16. package/build/Prompt/Snackbar/useSnackbarSwipeDismiss.mjs.map +1 -1
  17. package/build/Provider/Provider.js +1 -24
  18. package/build/Provider/Provider.js.map +1 -1
  19. package/build/Provider/Provider.mjs +1 -24
  20. package/build/Provider/Provider.mjs.map +1 -1
  21. package/build/WithDisplayFormat/WithDisplayFormat.js +20 -8
  22. package/build/WithDisplayFormat/WithDisplayFormat.js.map +1 -1
  23. package/build/WithDisplayFormat/WithDisplayFormat.mjs +20 -8
  24. package/build/WithDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  25. package/build/i18n/cs.json +1 -0
  26. package/build/i18n/cs.json.js +1 -0
  27. package/build/i18n/cs.json.js.map +1 -1
  28. package/build/i18n/cs.json.mjs +1 -0
  29. package/build/i18n/cs.json.mjs.map +1 -1
  30. package/build/i18n/de.json +1 -0
  31. package/build/i18n/de.json.js +1 -0
  32. package/build/i18n/de.json.js.map +1 -1
  33. package/build/i18n/de.json.mjs +1 -0
  34. package/build/i18n/de.json.mjs.map +1 -1
  35. package/build/i18n/es.json +1 -0
  36. package/build/i18n/es.json.js +1 -0
  37. package/build/i18n/es.json.js.map +1 -1
  38. package/build/i18n/es.json.mjs +1 -0
  39. package/build/i18n/es.json.mjs.map +1 -1
  40. package/build/i18n/hu.json +1 -0
  41. package/build/i18n/hu.json.js +1 -0
  42. package/build/i18n/hu.json.js.map +1 -1
  43. package/build/i18n/hu.json.mjs +1 -0
  44. package/build/i18n/hu.json.mjs.map +1 -1
  45. package/build/i18n/id.json +1 -0
  46. package/build/i18n/id.json.js +1 -0
  47. package/build/i18n/id.json.js.map +1 -1
  48. package/build/i18n/id.json.mjs +1 -0
  49. package/build/i18n/id.json.mjs.map +1 -1
  50. package/build/i18n/it.json +1 -0
  51. package/build/i18n/it.json.js +1 -0
  52. package/build/i18n/it.json.js.map +1 -1
  53. package/build/i18n/it.json.mjs +1 -0
  54. package/build/i18n/it.json.mjs.map +1 -1
  55. package/build/i18n/ja.json +1 -0
  56. package/build/i18n/ja.json.js +1 -0
  57. package/build/i18n/ja.json.js.map +1 -1
  58. package/build/i18n/ja.json.mjs +1 -0
  59. package/build/i18n/ja.json.mjs.map +1 -1
  60. package/build/i18n/nl.json +1 -0
  61. package/build/i18n/nl.json.js +1 -0
  62. package/build/i18n/nl.json.js.map +1 -1
  63. package/build/i18n/nl.json.mjs +1 -0
  64. package/build/i18n/nl.json.mjs.map +1 -1
  65. package/build/i18n/pl.json +1 -0
  66. package/build/i18n/pl.json.js +1 -0
  67. package/build/i18n/pl.json.js.map +1 -1
  68. package/build/i18n/pl.json.mjs +1 -0
  69. package/build/i18n/pl.json.mjs.map +1 -1
  70. package/build/i18n/pt.json +1 -0
  71. package/build/i18n/pt.json.js +1 -0
  72. package/build/i18n/pt.json.js.map +1 -1
  73. package/build/i18n/pt.json.mjs +1 -0
  74. package/build/i18n/pt.json.mjs.map +1 -1
  75. package/build/i18n/ro.json +1 -0
  76. package/build/i18n/ro.json.js +1 -0
  77. package/build/i18n/ro.json.js.map +1 -1
  78. package/build/i18n/ro.json.mjs +1 -0
  79. package/build/i18n/ro.json.mjs.map +1 -1
  80. package/build/i18n/ru.json +1 -0
  81. package/build/i18n/ru.json.js +1 -0
  82. package/build/i18n/ru.json.js.map +1 -1
  83. package/build/i18n/ru.json.mjs +1 -0
  84. package/build/i18n/ru.json.mjs.map +1 -1
  85. package/build/i18n/th.json +1 -0
  86. package/build/i18n/th.json.js +1 -0
  87. package/build/i18n/th.json.js.map +1 -1
  88. package/build/i18n/th.json.mjs +1 -0
  89. package/build/i18n/th.json.mjs.map +1 -1
  90. package/build/i18n/uk.json +1 -0
  91. package/build/i18n/uk.json.js +1 -0
  92. package/build/i18n/uk.json.js.map +1 -1
  93. package/build/i18n/uk.json.mjs +1 -0
  94. package/build/i18n/uk.json.mjs.map +1 -1
  95. package/build/i18n/zh-HK.json +1 -0
  96. package/build/i18n/zh-HK.json.js +1 -0
  97. package/build/i18n/zh-HK.json.js.map +1 -1
  98. package/build/i18n/zh-HK.json.mjs +1 -0
  99. package/build/i18n/zh-HK.json.mjs.map +1 -1
  100. package/build/main.css +12 -16
  101. package/build/styles/Inputs/InputGroup/InputGroup.css +1 -0
  102. package/build/styles/Prompt/ActionPrompt/ActionPrompt.css +10 -2
  103. package/build/styles/Prompt/CriticalBanner/CriticalBanner.css +1 -5
  104. package/build/styles/Prompt/PrimitivePrompt/PrimitivePrompt.css +0 -9
  105. package/build/styles/Prompt/PrimitivePrompt/PrimitivePrompt.vars.css +0 -0
  106. package/build/styles/main.css +12 -16
  107. package/build/test-utils/assets/apple-pay-logo.svg +0 -0
  108. package/build/types/ListItem/ListItem.d.ts +2 -0
  109. package/build/types/ListItem/ListItem.d.ts.map +1 -1
  110. package/build/types/Prompt/Snackbar/Snackbar.d.ts +2 -1
  111. package/build/types/Prompt/Snackbar/Snackbar.d.ts.map +1 -1
  112. package/build/types/Prompt/Snackbar/useSnackbarSwipeDismiss.d.ts +6 -8
  113. package/build/types/Prompt/Snackbar/useSnackbarSwipeDismiss.d.ts.map +1 -1
  114. package/build/types/WithDisplayFormat/WithDisplayFormat.d.ts +6 -4
  115. package/build/types/WithDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
  116. package/package.json +16 -16
  117. package/src/InputWithDisplayFormat/_stories/InputWithDisplayFormat.story.tsx +39 -0
  118. package/src/Inputs/InputGroup/InputGroup.css +1 -0
  119. package/src/Inputs/InputGroup/InputGroup.less +1 -0
  120. package/src/Inputs/InputGroup/_stories/InputGroup.test.story.tsx +16 -0
  121. package/src/Inputs/SearchInput/_stories/SearchInput.test.story.tsx +9 -0
  122. package/src/Inputs/SelectInput/_stories/SelectInput.test.story.tsx +12 -0
  123. package/src/ListItem/ListItem.ssr.test.tsx +115 -0
  124. package/src/ListItem/ListItem.test.tsx +42 -0
  125. package/src/ListItem/ListItem.tsx +23 -2
  126. package/src/MoneyInput/_stories/MoneyInput.test.story.tsx +11 -0
  127. package/src/PhoneNumberInput/_stories/PhoneNumberInput.test.story.tsx +30 -0
  128. package/src/Prompt/ActionPrompt/ActionPrompt.css +10 -2
  129. package/src/Prompt/ActionPrompt/ActionPrompt.less +17 -2
  130. package/src/Prompt/ActionPrompt/_stories/ActionPrompt.test.story.tsx +29 -29
  131. package/src/Prompt/CriticalBanner/CriticalBanner.css +1 -5
  132. package/src/Prompt/CriticalBanner/CriticalBanner.less +3 -6
  133. package/src/Prompt/CriticalBanner/CriticalBanner.vars.less +3 -3
  134. package/src/Prompt/PrimitivePrompt/PrimitivePrompt.css +0 -9
  135. package/src/Prompt/PrimitivePrompt/PrimitivePrompt.less +0 -9
  136. package/src/Prompt/PrimitivePrompt/PrimitivePrompt.vars.css +0 -0
  137. package/src/Prompt/PrimitivePrompt/PrimitivePrompt.vars.less +2 -0
  138. package/src/Prompt/Snackbar/Snackbar.test.tsx +1 -69
  139. package/src/Prompt/Snackbar/Snackbar.tsx +6 -7
  140. package/src/Prompt/Snackbar/SnackbarProvider.tsx +2 -2
  141. package/src/Prompt/Snackbar/useSnackbarSwipeDismiss.ts +39 -54
  142. package/src/Provider/Provider.tsx +1 -1
  143. package/src/WithDisplayFormat/WithDisplayFormat.test.js +90 -7
  144. package/src/WithDisplayFormat/WithDisplayFormat.tsx +30 -9
  145. package/src/i18n/cs.json +1 -0
  146. package/src/i18n/de.json +1 -0
  147. package/src/i18n/es.json +1 -0
  148. package/src/i18n/hu.json +1 -0
  149. package/src/i18n/id.json +1 -0
  150. package/src/i18n/it.json +1 -0
  151. package/src/i18n/ja.json +1 -0
  152. package/src/i18n/nl.json +1 -0
  153. package/src/i18n/pl.json +1 -0
  154. package/src/i18n/pt.json +1 -0
  155. package/src/i18n/ro.json +1 -0
  156. package/src/i18n/ru.json +1 -0
  157. package/src/i18n/th.json +1 -0
  158. package/src/i18n/uk.json +1 -0
  159. package/src/i18n/zh-HK.json +1 -0
  160. package/src/main.css +12 -16
  161. package/src/test-utils/assets/apple-pay-logo.svg +0 -0
  162. package/build/Prompt/Snackbar/SnackbarPortal.js +0 -12
  163. package/build/Prompt/Snackbar/SnackbarPortal.js.map +0 -1
  164. package/build/Prompt/Snackbar/SnackbarPortal.mjs +0 -8
  165. package/build/Prompt/Snackbar/SnackbarPortal.mjs.map +0 -1
  166. package/build/types/Prompt/Snackbar/SnackbarPortal.d.ts +0 -4
  167. package/build/types/Prompt/Snackbar/SnackbarPortal.d.ts.map +0 -1
  168. package/src/Prompt/Snackbar/SnackbarPortal.tsx +0 -8
@@ -20,6 +20,7 @@ export type EventType =
20
20
 
21
21
  interface WithDisplayFormatState {
22
22
  value: string;
23
+ prevValue: string;
23
24
  historyNavigator: HistoryNavigator;
24
25
  prevDisplayPattern: string;
25
26
  triggerType: EventType;
@@ -76,6 +77,7 @@ class WithDisplayFormat<T extends TextElementProps> extends React.Component<
76
77
  const unformattedValue = unformatWithPattern(props.value ?? '', props.displayPattern);
77
78
  this.state = {
78
79
  value: formatWithPattern(unformattedValue, props.displayPattern),
80
+ prevValue: props.value ?? '',
79
81
  historyNavigator: new HistoryNavigator(),
80
82
  prevDisplayPattern: props.displayPattern,
81
83
  triggerType: 'Initial',
@@ -87,19 +89,38 @@ class WithDisplayFormat<T extends TextElementProps> extends React.Component<
87
89
  }
88
90
 
89
91
  static getDerivedStateFromProps(
90
- { displayPattern }: WithDisplayFormatProps,
91
- { prevDisplayPattern = displayPattern, value, historyNavigator }: WithDisplayFormatState,
92
+ { displayPattern, value: propValue }: WithDisplayFormatProps,
93
+ {
94
+ prevDisplayPattern = displayPattern,
95
+ prevValue,
96
+ value,
97
+ historyNavigator,
98
+ }: WithDisplayFormatState,
92
99
  ) {
93
- if (prevDisplayPattern !== displayPattern) {
94
- const unFormattedValue = unformatWithPattern(value, prevDisplayPattern);
95
- historyNavigator.reset();
100
+ const nextValue = propValue ?? '';
101
+ const displayPatternChanged = prevDisplayPattern !== displayPattern;
102
+ const valueChanged = prevValue !== nextValue;
103
+
104
+ if (displayPatternChanged || valueChanged) {
105
+ const unformattedValue = valueChanged
106
+ ? unformatWithPattern(nextValue, displayPattern)
107
+ : unformatWithPattern(value, prevDisplayPattern);
108
+ const isEchoOfCurrentValue =
109
+ valueChanged && unformattedValue === unformatWithPattern(value, displayPattern);
110
+
111
+ if (displayPatternChanged || (valueChanged && !isEchoOfCurrentValue)) {
112
+ historyNavigator.reset([unformattedValue]);
113
+ }
96
114
 
97
115
  return {
98
116
  prevDisplayPattern: displayPattern,
99
- value: formatWithPattern(unFormattedValue, displayPattern),
100
- triggerType: null,
101
- triggerEvent: null,
102
- pastedLength: 0,
117
+ prevValue: nextValue,
118
+ value: formatWithPattern(unformattedValue, displayPattern),
119
+ ...(displayPatternChanged && {
120
+ triggerType: null,
121
+ triggerEvent: null,
122
+ pastedLength: 0,
123
+ }),
103
124
  };
104
125
  }
105
126
  return null;
package/src/i18n/cs.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "Předčíslí",
39
39
  "neptune.Select.searchPlaceholder": "Hledat...",
40
40
  "neptune.SelectInput.noResultsFound": "Nebyly nalezeny žádné výsledky",
41
+ "neptune.Snackbar.escapeDismissHint": "Pro zavření stiskněte Esc.",
41
42
  "neptune.StatusIcon.iconLabel.error": "Chyba:",
42
43
  "neptune.StatusIcon.iconLabel.information": "Informace:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "Vyřizuje se:",
package/src/i18n/de.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "Vorwahl",
39
39
  "neptune.Select.searchPlaceholder": "Wird gesucht...",
40
40
  "neptune.SelectInput.noResultsFound": "Keine Ergebnisse gefunden",
41
+ "neptune.Snackbar.escapeDismissHint": "Drück die Escape-Taste zum Schließen.",
41
42
  "neptune.StatusIcon.iconLabel.error": "Fehler:",
42
43
  "neptune.StatusIcon.iconLabel.information": "Auskünfte:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "Ausstehend:",
package/src/i18n/es.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "Prefijo",
39
39
  "neptune.Select.searchPlaceholder": "Buscar...",
40
40
  "neptune.SelectInput.noResultsFound": "No se han encontrado resultados",
41
+ "neptune.Snackbar.escapeDismissHint": "Pulsa Escape para cerrar.",
41
42
  "neptune.StatusIcon.iconLabel.error": "Error:",
42
43
  "neptune.StatusIcon.iconLabel.information": "Información:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "Pendiente:",
package/src/i18n/hu.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "Előtag",
39
39
  "neptune.Select.searchPlaceholder": "Keresés...",
40
40
  "neptune.SelectInput.noResultsFound": "Nincs találat",
41
+ "neptune.Snackbar.escapeDismissHint": "Az Escape gomb lenyomásával bezárhatod.",
41
42
  "neptune.StatusIcon.iconLabel.error": "Hiba:",
42
43
  "neptune.StatusIcon.iconLabel.information": "Információ:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "Függőben:",
package/src/i18n/id.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "Awalan",
39
39
  "neptune.Select.searchPlaceholder": "Cari...",
40
40
  "neptune.SelectInput.noResultsFound": "Hasil tidak ditemukan",
41
+ "neptune.Snackbar.escapeDismissHint": "Tekan Escape untuk menutup.",
41
42
  "neptune.StatusIcon.iconLabel.error": "Kesalahan:",
42
43
  "neptune.StatusIcon.iconLabel.information": "Informasi:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "Tertunda:",
package/src/i18n/it.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "Prefisso",
39
39
  "neptune.Select.searchPlaceholder": "Cerca...",
40
40
  "neptune.SelectInput.noResultsFound": "Nessun risultato trovato",
41
+ "neptune.Snackbar.escapeDismissHint": "Premi Esc per ignorare.",
41
42
  "neptune.StatusIcon.iconLabel.error": "Errore:",
42
43
  "neptune.StatusIcon.iconLabel.information": "Informazioni:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "In attesa:",
package/src/i18n/ja.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "プレフィックス",
39
39
  "neptune.Select.searchPlaceholder": "検索する... ",
40
40
  "neptune.SelectInput.noResultsFound": "結果が見つかりませんでした",
41
+ "neptune.Snackbar.escapeDismissHint": "Escキーを押して閉じます。",
41
42
  "neptune.StatusIcon.iconLabel.error": "エラー:",
42
43
  "neptune.StatusIcon.iconLabel.information": "情報:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "保留中:",
package/src/i18n/nl.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "Voorvoegsel",
39
39
  "neptune.Select.searchPlaceholder": "Zoeken...",
40
40
  "neptune.SelectInput.noResultsFound": "Geen resultaten gevonden",
41
+ "neptune.Snackbar.escapeDismissHint": "Druk op Escape om te verwijderen.",
41
42
  "neptune.StatusIcon.iconLabel.error": "Fout:",
42
43
  "neptune.StatusIcon.iconLabel.information": "Informatie:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "In behandeling:",
package/src/i18n/pl.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "Prefiks",
39
39
  "neptune.Select.searchPlaceholder": "Wyszukaj...",
40
40
  "neptune.SelectInput.noResultsFound": "Nie znaleziono wyników",
41
+ "neptune.Snackbar.escapeDismissHint": "Naciśnij klawisz Esc, żeby zamknąć ono.",
41
42
  "neptune.StatusIcon.iconLabel.error": "Błąd:",
42
43
  "neptune.StatusIcon.iconLabel.information": "Informacje:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "W toku:",
package/src/i18n/pt.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "Prefixo",
39
39
  "neptune.Select.searchPlaceholder": "Buscar...",
40
40
  "neptune.SelectInput.noResultsFound": "Nenhum resultado encontrado",
41
+ "neptune.Snackbar.escapeDismissHint": "Pressione Esc para fechar.",
41
42
  "neptune.StatusIcon.iconLabel.error": "Erro:",
42
43
  "neptune.StatusIcon.iconLabel.information": "Informação:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "Pendente:",
package/src/i18n/ro.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "Prefix",
39
39
  "neptune.Select.searchPlaceholder": "Caută...",
40
40
  "neptune.SelectInput.noResultsFound": "Nu s-a găsit niciun rezultat",
41
+ "neptune.Snackbar.escapeDismissHint": "Apasă pe Escape pentru a închide.",
41
42
  "neptune.StatusIcon.iconLabel.error": "Eroare:",
42
43
  "neptune.StatusIcon.iconLabel.information": "Informații:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "În așteptare:",
package/src/i18n/ru.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "Код страны",
39
39
  "neptune.Select.searchPlaceholder": "Поиск...",
40
40
  "neptune.SelectInput.noResultsFound": "Ничего не найдено",
41
+ "neptune.Snackbar.escapeDismissHint": "Нажмите Escape, чтобы закрыть.",
41
42
  "neptune.StatusIcon.iconLabel.error": "Ошибка:",
42
43
  "neptune.StatusIcon.iconLabel.information": "Информация:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "В ожидании:",
package/src/i18n/th.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "รหัสประเทศ",
39
39
  "neptune.Select.searchPlaceholder": "ค้นหา...",
40
40
  "neptune.SelectInput.noResultsFound": "ไม่พบผลลัพธ์",
41
+ "neptune.Snackbar.escapeDismissHint": "กด Escape เพื่อปิด",
41
42
  "neptune.StatusIcon.iconLabel.error": "ข้อผิดพลาด:",
42
43
  "neptune.StatusIcon.iconLabel.information": "ข้อมูล:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "รอดำเนินการ:",
package/src/i18n/uk.json CHANGED
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "Префікс",
39
39
  "neptune.Select.searchPlaceholder": "Пошук…",
40
40
  "neptune.SelectInput.noResultsFound": "Нічого не знайдено",
41
+ "neptune.Snackbar.escapeDismissHint": "Натисніть Escape, щоб закрити.",
41
42
  "neptune.StatusIcon.iconLabel.error": "Помилка:",
42
43
  "neptune.StatusIcon.iconLabel.information": "Інформація:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "Обробка:",
@@ -38,6 +38,7 @@
38
38
  "neptune.PhoneNumberInput.phoneNumberPrefix": "前綴",
39
39
  "neptune.Select.searchPlaceholder": "搜尋…",
40
40
  "neptune.SelectInput.noResultsFound": "找不到任何結果",
41
+ "neptune.Snackbar.escapeDismissHint": "按下Escape鍵以關閉。",
41
42
  "neptune.StatusIcon.iconLabel.error": "錯誤:",
42
43
  "neptune.StatusIcon.iconLabel.information": "資訊:",
43
44
  "neptune.StatusIcon.iconLabel.pending": "處理中:",
package/src/main.css CHANGED
@@ -29649,6 +29649,7 @@ button.np-option {
29649
29649
  display: inline-grid;
29650
29650
  inline-size: 100%;
29651
29651
  grid-auto-columns: minmax(0, 1fr);
29652
+ isolation: isolate;
29652
29653
  /* Prevent unwanted `group-hover/input` triggers */
29653
29654
  border-radius: var(--radius-full);
29654
29655
  }
@@ -31063,15 +31064,6 @@ button.np-link {
31063
31064
  grid-column-start: 2;
31064
31065
  grid-column-end: 3;
31065
31066
  }
31066
- @media (max-width: 599.98px) {
31067
- .wds-prompt__actions-wrapper {
31068
- grid-column: span 2;
31069
- inline-size: 100%;
31070
- }
31071
- .wds-prompt__content-wrapper--with-dismiss .wds-prompt__actions-wrapper {
31072
- grid-column: span 3;
31073
- }
31074
- }
31075
31067
  .wds-prompt__dismiss {
31076
31068
  position: relative;
31077
31069
  }
@@ -31195,6 +31187,7 @@ button.np-link {
31195
31187
  --Prompt-actions-gap: var(--size-8);
31196
31188
  --Prompt-gap: var(--size-10) var(--size-16);
31197
31189
  --Prompt-border-radius: var(--radius-large);
31190
+ container: wds-action-prompt / inline-size;
31198
31191
  }
31199
31192
  .wds-action-prompt--media-image {
31200
31193
  inline-size: var(--size-48);
@@ -31202,12 +31195,19 @@ button.np-link {
31202
31195
  -o-object-fit: contain;
31203
31196
  object-fit: contain;
31204
31197
  }
31205
- @media (max-width: 599.98px) {
31198
+ @container wds-action-prompt (width < 600px) {
31199
+ .wds-action-prompt .wds-prompt__actions-wrapper {
31200
+ grid-column: span 2;
31201
+ inline-size: 100%;
31202
+ }
31203
+ .wds-action-prompt .wds-prompt__content-wrapper--with-dismiss .wds-prompt__actions-wrapper {
31204
+ grid-column: span 3;
31205
+ }
31206
31206
  .wds-action-prompt .wds-action-prompt__action {
31207
31207
  inline-size: 100%;
31208
31208
  }
31209
31209
  }
31210
- @media (max-width: 599.98px) {
31210
+ @container wds-action-prompt (width < 600px) {
31211
31211
  .wds-action-prompt--with-two-actions .wds-action-prompt__action {
31212
31212
  flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
31213
31213
  min-inline-size: -moz-fit-content;
@@ -31230,8 +31230,6 @@ button.np-link {
31230
31230
  position: relative;
31231
31231
  --critical-banner-easing: cubic-bezier(0.9, 0, 0.7, 1);
31232
31232
  --critical-banner-duration: 150ms;
31233
- /* Override PrimitivePrompt's --screen-sm-max actions behaviour:
31234
- actions only go full-width below mobile-max token (container query) */
31235
31233
  }
31236
31234
  .wds-critical-banner.wds-prompt--neutral {
31237
31235
  --critical-banner-background-base: var(--color-background-elevated);
@@ -31310,13 +31308,11 @@ button.np-link {
31310
31308
  }
31311
31309
  }
31312
31310
  .wds-critical-banner .wds-prompt__actions-wrapper {
31313
- grid-column-start: 2;
31314
- grid-column-end: 3;
31315
31311
  max-block-size: 200px;
31316
31312
  opacity: 1;
31317
31313
  overflow: visible;
31318
31314
  }
31319
- @container (max-width: 600px) {
31315
+ @container (width < 600px) {
31320
31316
  .wds-critical-banner .wds-prompt__actions-wrapper {
31321
31317
  grid-column: span 3;
31322
31318
  inline-size: 100%;
File without changes
@@ -1,12 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var WithNextPortal = require('../../WithNextPortal/WithNextPortal.js');
6
- var Snackbar = require('./Snackbar.js');
7
-
8
- /** Renders the Snackbar into `document.body` after mount, so it's safe for SSR. */
9
- const SnackbarPortal = WithNextPortal.default(Snackbar.Snackbar);
10
-
11
- exports.default = SnackbarPortal;
12
- //# sourceMappingURL=SnackbarPortal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SnackbarPortal.js","sources":["../../../src/Prompt/Snackbar/SnackbarPortal.tsx"],"sourcesContent":["import withNextPortal from '../../WithNextPortal/WithNextPortal';\n\nimport { Snackbar } from './Snackbar';\n\n/** Renders the Snackbar into `document.body` after mount, so it's safe for SSR. */\nconst SnackbarPortal = withNextPortal(Snackbar);\n\nexport default SnackbarPortal;\n"],"names":["SnackbarPortal","withNextPortal","Snackbar"],"mappings":";;;;;;;AAIA;AACA,MAAMA,cAAc,GAAGC,sBAAc,CAACC,iBAAQ;;"}
@@ -1,8 +0,0 @@
1
- import withNextPortalWrapper from '../../WithNextPortal/WithNextPortal.mjs';
2
- import { Snackbar } from './Snackbar.mjs';
3
-
4
- /** Renders the Snackbar into `document.body` after mount, so it's safe for SSR. */
5
- const SnackbarPortal = withNextPortalWrapper(Snackbar);
6
-
7
- export { SnackbarPortal as default };
8
- //# sourceMappingURL=SnackbarPortal.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SnackbarPortal.mjs","sources":["../../../src/Prompt/Snackbar/SnackbarPortal.tsx"],"sourcesContent":["import withNextPortal from '../../WithNextPortal/WithNextPortal';\n\nimport { Snackbar } from './Snackbar';\n\n/** Renders the Snackbar into `document.body` after mount, so it's safe for SSR. */\nconst SnackbarPortal = withNextPortal(Snackbar);\n\nexport default SnackbarPortal;\n"],"names":["SnackbarPortal","withNextPortal","Snackbar"],"mappings":";;;AAIA;AACA,MAAMA,cAAc,GAAGC,qBAAc,CAACC,QAAQ;;"}
@@ -1,4 +0,0 @@
1
- /** Renders the Snackbar into `document.body` after mount, so it's safe for SSR. */
2
- declare const SnackbarPortal: (props: import("./Snackbar").SnackbarProps) => import("react").ReactPortal | null;
3
- export default SnackbarPortal;
4
- //# sourceMappingURL=SnackbarPortal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SnackbarPortal.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/SnackbarPortal.tsx"],"names":[],"mappings":"AAIA,mFAAmF;AACnF,QAAA,MAAM,cAAc,mFAA2B,CAAC;AAEhD,eAAe,cAAc,CAAC"}
@@ -1,8 +0,0 @@
1
- import withNextPortal from '../../WithNextPortal/WithNextPortal';
2
-
3
- import { Snackbar } from './Snackbar';
4
-
5
- /** Renders the Snackbar into `document.body` after mount, so it's safe for SSR. */
6
- const SnackbarPortal = withNextPortal(Snackbar);
7
-
8
- export default SnackbarPortal;