@transferwise/components 46.124.0 → 46.125.0

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 (322) hide show
  1. package/build/field/Field.js +10 -0
  2. package/build/field/Field.js.map +1 -1
  3. package/build/field/Field.mjs +10 -0
  4. package/build/field/Field.mjs.map +1 -1
  5. package/build/index.js +2 -0
  6. package/build/index.js.map +1 -1
  7. package/build/index.mjs +1 -0
  8. package/build/index.mjs.map +1 -1
  9. package/build/inputs/SelectInput.js +10 -5
  10. package/build/inputs/SelectInput.js.map +1 -1
  11. package/build/inputs/SelectInput.mjs +11 -6
  12. package/build/inputs/SelectInput.mjs.map +1 -1
  13. package/build/inputs/_BottomSheet.js +5 -2
  14. package/build/inputs/_BottomSheet.js.map +1 -1
  15. package/build/inputs/_BottomSheet.mjs +6 -3
  16. package/build/inputs/_BottomSheet.mjs.map +1 -1
  17. package/build/inputs/_Popover.js +2 -0
  18. package/build/inputs/_Popover.js.map +1 -1
  19. package/build/inputs/_Popover.mjs +2 -0
  20. package/build/inputs/_Popover.mjs.map +1 -1
  21. package/build/listItem/Prompt/ListItemPrompt.js +10 -0
  22. package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
  23. package/build/listItem/Prompt/ListItemPrompt.mjs +10 -0
  24. package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
  25. package/build/main.css +32 -2
  26. package/build/prompt/ActionPrompt/ActionPrompt.js +123 -0
  27. package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -0
  28. package/build/prompt/ActionPrompt/ActionPrompt.mjs +118 -0
  29. package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -0
  30. package/build/prompt/PrimitivePrompt/PrimitivePrompt.js +13 -11
  31. package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
  32. package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs +14 -12
  33. package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
  34. package/build/styles/main.css +32 -2
  35. package/build/styles/prompt/ActionPrompt/ActionPrompt.css +21 -0
  36. package/build/styles/prompt/PrimitivePrompt/PrimitivePrompt.css +11 -2
  37. package/build/tabs/Tabs.js +14 -171
  38. package/build/tabs/Tabs.js.map +1 -1
  39. package/build/tabs/Tabs.mjs +16 -173
  40. package/build/tabs/Tabs.mjs.map +1 -1
  41. package/build/tabs/utils.js +0 -18
  42. package/build/tabs/utils.js.map +1 -1
  43. package/build/tabs/utils.mjs +1 -17
  44. package/build/tabs/utils.mjs.map +1 -1
  45. package/build/typeahead/Typeahead.js +10 -0
  46. package/build/typeahead/Typeahead.js.map +1 -1
  47. package/build/typeahead/Typeahead.mjs +10 -0
  48. package/build/typeahead/Typeahead.mjs.map +1 -1
  49. package/build/types/index.d.ts +2 -2
  50. package/build/types/index.d.ts.map +1 -1
  51. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  52. package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
  53. package/build/types/inputs/_Popover.d.ts.map +1 -1
  54. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +26 -0
  55. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -0
  56. package/build/types/prompt/ActionPrompt/index.d.ts +3 -0
  57. package/build/types/prompt/ActionPrompt/index.d.ts.map +1 -0
  58. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
  59. package/build/types/prompt/index.d.ts +2 -0
  60. package/build/types/prompt/index.d.ts.map +1 -1
  61. package/build/types/tabs/Tabs.d.ts +2 -24
  62. package/build/types/tabs/Tabs.d.ts.map +1 -1
  63. package/build/types/tabs/utils.d.ts +0 -2
  64. package/build/types/tabs/utils.d.ts.map +1 -1
  65. package/package.json +4 -4
  66. package/src/actionButton/ActionButton.story.tsx +2 -9
  67. package/src/avatar/Avatar.story.tsx +2 -8
  68. package/src/button/_stories/{Button.tests.story.tsx → Button.test.story.tsx} +5 -10
  69. package/src/checkbox/Checkbox.story.tsx +3 -16
  70. package/src/circularButton/CircularButton.story.tsx +2 -7
  71. package/src/common/bottomSheet/BottomSheet.story.tsx +6 -32
  72. package/src/common/circle/Circle.story.tsx +3 -14
  73. package/src/criticalBanner/CriticalCommsBanner.story.tsx +3 -16
  74. package/src/dateInput/{DateInput.tests.story.tsx → DateInput.test.story.tsx} +3 -13
  75. package/src/dateLookup/DateLookup.story.tsx +9 -7
  76. package/src/header/{Header.tests.story.tsx → Header.test.story.tsx} +5 -10
  77. package/src/index.ts +2 -2
  78. package/src/info/Info.story.tsx +4 -20
  79. package/src/inputs/{SelectInput.spec.tsx → SelectInput.test.tsx} +78 -7
  80. package/src/inputs/SelectInput.tsx +21 -10
  81. package/src/inputs/_BottomSheet.tsx +7 -4
  82. package/src/inputs/_Popover.tsx +2 -0
  83. package/src/listItem/_stories/variants/ListItem.brightGreen.test.story.tsx +2 -7
  84. package/src/listItem/_stories/variants/ListItem.dark.test.story.tsx +2 -7
  85. package/src/listItem/_stories/variants/ListItem.forestGreen.test.story.tsx +2 -7
  86. package/src/listItem/_stories/variants/ListItem.rtl.test.story.tsx +2 -7
  87. package/src/main.css +32 -2
  88. package/src/main.less +1 -0
  89. package/src/modal/Modal.story.tsx +6 -31
  90. package/src/moneyInput/{MoneyInput.spec.tsx → MoneyInput.test.tsx} +26 -7
  91. package/src/prompt/ActionPrompt/ActionPrompt.css +21 -0
  92. package/src/prompt/ActionPrompt/ActionPrompt.less +23 -0
  93. package/src/prompt/ActionPrompt/ActionPrompt.story.tsx +184 -0
  94. package/src/prompt/ActionPrompt/ActionPrompt.test.tsx +256 -0
  95. package/src/prompt/ActionPrompt/ActionPrompt.tsx +129 -0
  96. package/src/prompt/ActionPrompt/index.ts +2 -0
  97. package/src/prompt/InlinePrompt/{InlinePrompt.spec.tsx → InlinePrompt.test.tsx} +3 -38
  98. package/src/prompt/PrimitivePrompt/PrimitivePrompt.css +11 -2
  99. package/src/prompt/PrimitivePrompt/PrimitivePrompt.less +12 -2
  100. package/src/prompt/PrimitivePrompt/PrimitivePrompt.test.tsx +161 -0
  101. package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +15 -11
  102. package/src/prompt/index.ts +3 -0
  103. package/src/snackbar/{Snackbar.tests.story.tsx → Snackbar.test.story.tsx} +6 -32
  104. package/src/{ssr.spec.tsx → ssr.test.tsx} +1 -0
  105. package/src/statusIcon/StatusIcon.story.tsx +5 -9
  106. package/src/tabs/Tabs.story.tsx +1 -45
  107. package/src/tabs/{Tabs.spec.tsx → Tabs.test.tsx} +0 -22
  108. package/src/tabs/Tabs.tsx +23 -240
  109. package/src/tabs/utils.test.ts +68 -0
  110. package/src/tabs/utils.ts +0 -20
  111. package/src/tooltip/Tooltip.story.tsx +2 -7
  112. package/src/tabs/utils.spec.ts +0 -126
  113. /package/src/accordion/{Accordion.spec.js → Accordion.test.js} +0 -0
  114. /package/src/accordion/AccordionItem/{AccordionItem.spec.js → AccordionItem.test.js} +0 -0
  115. /package/src/accordion/AccordionItem/__snapshots__/{AccordionItem.spec.js.snap → AccordionItem.test.js.snap} +0 -0
  116. /package/src/accordion/__snapshots__/{Accordion.spec.js.snap → Accordion.test.js.snap} +0 -0
  117. /package/src/actionButton/{ActionButton.spec.tsx → ActionButton.test.tsx} +0 -0
  118. /package/src/actionButton/__snapshots__/{ActionButton.spec.tsx.snap → ActionButton.test.tsx.snap} +0 -0
  119. /package/src/actionOption/{ActionOption.spec.tsx → ActionOption.test.tsx} +0 -0
  120. /package/src/alert/{Alert.tests.story.tsx → Alert.test.story.tsx} +0 -0
  121. /package/src/alert/{Alert.spec.tsx → Alert.test.tsx} +0 -0
  122. /package/src/avatar/{Avatar.spec.tsx → Avatar.test.tsx} +0 -0
  123. /package/src/avatarWrapper/{AvatarWrapper.spec.tsx → AvatarWrapper.test.tsx} +0 -0
  124. /package/src/avatarWrapper/__snapshots__/{AvatarWrapper.spec.tsx.snap → AvatarWrapper.test.tsx.snap} +0 -0
  125. /package/src/badge/{Badge.spec.tsx → Badge.test.tsx} +0 -0
  126. /package/src/body/{Body.spec.tsx → Body.test.tsx} +0 -0
  127. /package/src/button/{Button.spec.tsx → Button.test.tsx} +0 -0
  128. /package/src/button/{LegacyButton.spec.tsx → LegacyButton.test.tsx} +0 -0
  129. /package/src/button/_stories/{Button.brightGreen.tests.story.tsx → Button.brightGreen.test.story.tsx} +0 -0
  130. /package/src/button/_stories/{Button.dark.tests.story.tsx → Button.dark.test.story.tsx} +0 -0
  131. /package/src/button/_stories/{Button.default.tests.story.tsx → Button.default.test.story.tsx} +0 -0
  132. /package/src/button/_stories/{Button.forestGreen.tests.story.tsx → Button.forestGreen.test.story.tsx} +0 -0
  133. /package/src/button/legacyUtils/{legacyUtils.spec.tsx → legacyUtils.test.tsx} +0 -0
  134. /package/src/card/{Card.spec.tsx → Card.test.tsx} +0 -0
  135. /package/src/carousel/{Carousel.spec.tsx → Carousel.test.tsx} +0 -0
  136. /package/src/checkbox/{Checkbox.spec.tsx → Checkbox.test.tsx} +0 -0
  137. /package/src/checkbox/__snapshots__/{Checkbox.spec.tsx.snap → Checkbox.test.tsx.snap} +0 -0
  138. /package/src/checkboxButton/{CheckboxButton.spec.tsx → CheckboxButton.test.tsx} +0 -0
  139. /package/src/checkboxOption/{CheckboxOption.spec.tsx → CheckboxOption.test.tsx} +0 -0
  140. /package/src/chevron/{Chevron.spec.tsx → Chevron.test.tsx} +0 -0
  141. /package/src/chevron/__snapshots__/{Chevron.spec.tsx.snap → Chevron.test.tsx.snap} +0 -0
  142. /package/src/chips/{Chips.spec.tsx → Chips.test.tsx} +0 -0
  143. /package/src/chips/__snapshots__/{Chips.spec.tsx.snap → Chips.test.tsx.snap} +0 -0
  144. /package/src/circularButton/{CircularButton.tests.story.tsx → CircularButton.test.story.tsx} +0 -0
  145. /package/src/circularButton/{CircularButton.spec.tsx → CircularButton.test.tsx} +0 -0
  146. /package/src/common/DOMOperations/{DOMOperations.spec.tsx → DOMOperations.test.tsx} +0 -0
  147. /package/src/common/Option/{Option.spec.tsx → Option.test.tsx} +0 -0
  148. /package/src/common/RadioButton/{RadioButton.spec.tsx → RadioButton.test.tsx} +0 -0
  149. /package/src/common/RadioButton/__snapshots__/{RadioButton.spec.tsx.snap → RadioButton.test.tsx.snap} +0 -0
  150. /package/src/common/bottomSheet/{BottomSheet.spec.tsx → BottomSheet.test.tsx} +0 -0
  151. /package/src/common/bottomSheet/__snapshots__/{BottomSheet.spec.tsx.snap → BottomSheet.test.tsx.snap} +0 -0
  152. /package/src/common/card/{Card.spec.tsx → Card.test.tsx} +0 -0
  153. /package/src/common/card/__snapshots__/{Card.spec.tsx.snap → Card.test.tsx.snap} +0 -0
  154. /package/src/common/closeButton/{CloseButton.spec.tsx → CloseButton.test.tsx} +0 -0
  155. /package/src/common/closeButton/__snapshots__/{CloseButton.spec.tsx.snap → CloseButton.test.tsx.snap} +0 -0
  156. /package/src/common/dateUtils/getDayNames/{getDayNames.spec.js → getDayNames.test.js} +0 -0
  157. /package/src/common/dateUtils/getMonthNames/{getMonthNames.spec.js → getMonthNames.test.js} +0 -0
  158. /package/src/common/dateUtils/isDateValid/{isDateValid.spec.ts → isDateValid.test.ts} +0 -0
  159. /package/src/common/dateUtils/isMonthAndYearFormat/{isMonthAndYearFormat.spec.js → isMonthAndYearFormat.test.js} +0 -0
  160. /package/src/common/dateUtils/isWithinRange/{isWithinRange.spec.ts → isWithinRange.test.ts} +0 -0
  161. /package/src/common/dateUtils/moveToWithinRange/{moveToWithinRange.spec.js → moveToWithinRange.test.js} +0 -0
  162. /package/src/common/deviceDetection/{deviceDetection.spec.ts → deviceDetection.test.ts} +0 -0
  163. /package/src/common/domHelpers/{documentIosClick.spec.ts → documentIosClick.test.ts} +0 -0
  164. /package/src/common/flowHeader/{FlowHeader.spec.tsx → FlowHeader.test.tsx} +0 -0
  165. /package/src/common/flowHeader/__snapshots__/{FlowHeader.spec.tsx.snap → FlowHeader.test.tsx.snap} +0 -0
  166. /package/src/common/historyNavigator/{historyNavigator.spec.ts → historyNavigator.test.ts} +0 -0
  167. /package/src/common/hooks/useConditionalListener/{useConditionalListener.spec.js → useConditionalListener.test.js} +0 -0
  168. /package/src/common/hooks/useDirection/{useDirection.spec.js → useDirection.test.js} +0 -0
  169. /package/src/common/hooks/useHasIntersected/{useHasIntersected.spec.js → useHasIntersected.test.js} +0 -0
  170. /package/src/common/hooks/{useMedia.spec.ts → useMedia.test.ts} +0 -0
  171. /package/src/common/{initials.spec.tsx → initials.test.tsx} +0 -0
  172. /package/src/common/locale/{index.spec.ts → index.test.ts} +0 -0
  173. /package/src/common/panel/{Panel.spec.tsx → Panel.test.tsx} +0 -0
  174. /package/src/common/panel/__snapshots__/{Panel.spec.tsx.snap → Panel.test.tsx.snap} +0 -0
  175. /package/src/common/responsivePanel/{ResponsivePanel.spec.js → ResponsivePanel.test.js} +0 -0
  176. /package/src/common/textFormat/formatWithPattern/{formatWithPattern.spec.ts → formatWithPattern.test.ts} +0 -0
  177. /package/src/common/textFormat/getCountOfSymbolsInSelection/{getCountOfSymbolsInSelection.spec.ts → getCountOfSymbolsInSelection.test.ts} +0 -0
  178. /package/src/common/textFormat/getCursorPositionAfterKeystroke/{getCursorPositionAfterKeystroke.spec.ts → getCursorPositionAfterKeystroke.test.ts} +0 -0
  179. /package/src/common/textFormat/getDistanceToSymbol/{getDistanceToSymbol.spec.ts → getDistanceToSymbol.test.ts} +0 -0
  180. /package/src/common/textFormat/getSymbolsInPatternWithPosition/{getSymbolsInPatternWithPosition.spec.ts → getSymbolsInPatternWithPosition.test.ts} +0 -0
  181. /package/src/common/textFormat/unformatWithPattern/{unformatWithPattern.spec.ts → unformatWithPattern.test.ts} +0 -0
  182. /package/src/dateInput/{DateInput.spec.tsx → DateInput.test.tsx} +0 -0
  183. /package/src/dateInput/utils/convertToLocalMidnight/{convertToLocalMidnight.spec.ts → convertToLocalMidnight.test.ts} +0 -0
  184. /package/src/dateLookup/{DateLookup.tests.story.tsx → DateLookup.test.story.tsx} +0 -0
  185. /package/src/dateLookup/{DateLookup.spec.tsx → DateLookup.test.tsx} +0 -0
  186. /package/src/dateLookup/getFocusableTime/{getFocusable.spec.ts → getFocusable.test.ts} +0 -0
  187. /package/src/dateLookup/getStartOfDay/{getStartOfDay.spec.js → getStartOfDay.test.js} +0 -0
  188. /package/src/decision/{Decision.spec.tsx → Decision.test.tsx} +0 -0
  189. /package/src/dimmer/{Dimmer.spec.tsx → Dimmer.test.tsx} +0 -0
  190. /package/src/divider/{Divider.spec.tsx → Divider.test.tsx} +0 -0
  191. /package/src/drawer/{Drawer.spec.tsx → Drawer.test.tsx} +0 -0
  192. /package/src/emphasis/{Emphasis.spec.tsx → Emphasis.test.tsx} +0 -0
  193. /package/src/emphasis/{EmphasisHtmlTransformer.spec.tsx → EmphasisHtmlTransformer.test.tsx} +0 -0
  194. /package/src/expressiveMoneyInput/{ExpressiveMoneyInput.spec.tsx → ExpressiveMoneyInput.test.tsx} +0 -0
  195. /package/src/expressiveMoneyInput/amountInput/{AmountInput.spec.tsx → AmountInput.test.tsx} +0 -0
  196. /package/src/expressiveMoneyInput/amountInput/{utils.spec.ts → utils.test.ts} +0 -0
  197. /package/src/expressiveMoneyInput/currencySelector/{CurrencySelector.spec.tsx → CurrencySelector.test.tsx} +0 -0
  198. /package/src/field/{Field.spec.tsx → Field.test.tsx} +0 -0
  199. /package/src/flowNavigation/{FlowNavigation.spec.js → FlowNavigation.test.js} +0 -0
  200. /package/src/flowNavigation/__snapshots__/{FlowNavigation.spec.js.snap → FlowNavigation.test.js.snap} +0 -0
  201. /package/src/flowNavigation/animatedLabel/{AnimatedLabel.spec.js → AnimatedLabel.test.js} +0 -0
  202. /package/src/header/{Header.spec.tsx → Header.test.tsx} +0 -0
  203. /package/src/iconButton/{iconButton.spec.tsx → iconButton.test.tsx} +0 -0
  204. /package/src/image/{Image.spec.tsx → Image.test.tsx} +0 -0
  205. /package/src/info/{Info.spec.jsx → Info.test.jsx} +0 -0
  206. /package/src/inlineAlert/{InlineAlert.spec.tsx → InlineAlert.test.tsx} +0 -0
  207. /package/src/inputWithDisplayFormat/{InputWithDisplayFormat.spec.js → InputWithDisplayFormat.test.js} +0 -0
  208. /package/src/inputs/{InputGroup.spec.tsx → InputGroup.test.tsx} +0 -0
  209. /package/src/inputs/{SearchInput.spec.tsx → SearchInput.test.tsx} +0 -0
  210. /package/src/instructionsList/{InstructionsList.spec.tsx → InstructionsList.test.tsx} +0 -0
  211. /package/src/label/{Label.spec.tsx → Label.test.tsx} +0 -0
  212. /package/src/legacylistItem/{LegacyListItem.tests.story.tsx → LegacyListItem.test.story.tsx} +0 -0
  213. /package/src/legacylistItem/{LegacyListItem.spec.tsx → LegacyListItem.test.tsx} +0 -0
  214. /package/src/link/{Link.spec.tsx → Link.test.tsx} +0 -0
  215. /package/src/list/{List.spec.tsx → List.test.tsx} +0 -0
  216. /package/src/listItem/AdditionalInfo/{ListItemAdditionalInfo.spec.tsx → ListItemAdditionalInfo.test.tsx} +0 -0
  217. /package/src/listItem/AvatarLayout/{ListItemAvatarLayout.spec.tsx → ListItemAvatarLayout.test.tsx} +0 -0
  218. /package/src/listItem/AvatarView/{ListItemAvatarView.spec.tsx → ListItemAvatarView.test.tsx} +0 -0
  219. /package/src/listItem/Button/{ListItemButton.spec.tsx → ListItemButton.test.tsx} +0 -0
  220. /package/src/listItem/Checkbox/{ListItemCheckbox.spec.tsx → ListItemCheckbox.test.tsx} +0 -0
  221. /package/src/listItem/IconButton/{ListItemIconButton.spec.tsx → ListItemIconButton.test.tsx} +0 -0
  222. /package/src/listItem/Image/{ListItemImage.spec.tsx → ListItemImage.test.tsx} +0 -0
  223. /package/src/listItem/{ListItem.spec.tsx → ListItem.test.tsx} +0 -0
  224. /package/src/listItem/Navigation/{ListItemNavigation.spec.tsx → ListItemNavigation.test.tsx} +0 -0
  225. /package/src/listItem/Prompt/{ListItemPrompt.spec.tsx → ListItemPrompt.test.tsx} +0 -0
  226. /package/src/listItem/Radio/{ListItemRadio.spec.tsx → ListItemRadio.test.tsx} +0 -0
  227. /package/src/listItem/Switch/{ListItemSwitch.spec.tsx → ListItemSwitch.test.tsx} +0 -0
  228. /package/src/loader/{Loader.spec.tsx → Loader.test.tsx} +0 -0
  229. /package/src/logo/{Logo.spec.tsx → Logo.test.tsx} +0 -0
  230. /package/src/logo/__snapshots__/{Logo.spec.tsx.snap → Logo.test.tsx.snap} +0 -0
  231. /package/src/markdown/{Markdown.spec.tsx → Markdown.test.tsx} +0 -0
  232. /package/src/modal/{Modal.spec.tsx → Modal.test.tsx} +0 -0
  233. /package/src/money/{Money.spec.tsx → Money.test.tsx} +0 -0
  234. /package/src/moneyInput/{currencyFormatting.spec.ts → currencyFormatting.test.ts} +0 -0
  235. /package/src/navigationOption/{NavigationOption.spec.tsx → NavigationOption.test.tsx} +0 -0
  236. /package/src/navigationOptionsList/{NavigationOptionsList.spec.tsx → NavigationOptionsList.test.tsx} +0 -0
  237. /package/src/nudge/{Nudge.spec.tsx → Nudge.test.tsx} +0 -0
  238. /package/src/overlayHeader/{OverlayHeader.spec.tsx → OverlayHeader.test.tsx} +0 -0
  239. /package/src/overlayHeader/__snapshots__/{OverlayHeader.spec.tsx.snap → OverlayHeader.test.tsx.snap} +0 -0
  240. /package/src/phoneNumberInput/{PhoneNumberInput.spec.tsx → PhoneNumberInput.test.tsx} +0 -0
  241. /package/src/phoneNumberInput/utils/cleanNumber/{cleanNumber.spec.ts → cleanNumber.test.ts} +0 -0
  242. /package/src/phoneNumberInput/utils/excludeCountries/{excludeCountries.spec.ts → excludeCountries.test.ts} +0 -0
  243. /package/src/phoneNumberInput/utils/explodeNumberModel/{explodeNumberModel.spec.ts → explodeNumberModel.test.ts} +0 -0
  244. /package/src/phoneNumberInput/utils/findCountryByCode/{findCountryByCode.spec.ts → findCountryByCode.test.ts} +0 -0
  245. /package/src/phoneNumberInput/utils/findCountryByPrefix/{findCountryByPrefix.spec.ts → findCountryByPrefix.test.ts} +0 -0
  246. /package/src/phoneNumberInput/utils/groupCountriesByPrefix/{groupCountriesByPrefix.spec.ts → groupCountriesByPrefix.test.ts} +0 -0
  247. /package/src/phoneNumberInput/utils/isStringNumeric/{isStringNumeric.spec.ts → isStringNumeric.test.ts} +0 -0
  248. /package/src/phoneNumberInput/utils/isValidPhoneNumber/{isValidPhoneNumber.spec.ts → isValidPhoneNumber.test.ts} +0 -0
  249. /package/src/phoneNumberInput/utils/longestMatchingPrefix/{longestMatchingPrefix.spec.ts → longestMatchingPrefix.test.ts} +0 -0
  250. /package/src/phoneNumberInput/utils/setDefaultPrefix/{setDefaultPrefix.spec.ts → setDefaultPrefix.test.ts} +0 -0
  251. /package/src/phoneNumberInput/utils/sortArrayByProperty/{sortArrayByProperty.spec.ts → sortArrayByProperty.test.ts} +0 -0
  252. /package/src/popover/{Popover.spec.tsx → Popover.test.tsx} +0 -0
  253. /package/src/popover/__snapshots__/{Popover.spec.tsx.snap → Popover.test.tsx.snap} +0 -0
  254. /package/src/primitives/PrimitiveAnchor/stories/{PrimitiveAnchor.tests.story.tsx → PrimitiveAnchor.test.story.tsx} +0 -0
  255. /package/src/primitives/PrimitiveAnchor/test/{PrimitiveAnchor.spec.tsx → PrimitiveAnchor.test.tsx} +0 -0
  256. /package/src/primitives/PrimitiveButton/stories/{PrimitiveButton.tests.story.tsx → PrimitiveButton.test.story.tsx} +0 -0
  257. /package/src/primitives/PrimitiveButton/test/{PrimitiveButton.spec.tsx → PrimitiveButton.test.tsx} +0 -0
  258. /package/src/processIndicator/{ProcessIndicator.rtl.spec.tsx → ProcessIndicator.rtl.test.tsx} +0 -0
  259. /package/src/progress/{Progress.spec.tsx → Progress.test.tsx} +0 -0
  260. /package/src/progressBar/{ProgressBar.spec.tsx → ProgressBar.test.tsx} +0 -0
  261. /package/src/promoCard/{PromoCard.spec.tsx → PromoCard.test.tsx} +0 -0
  262. /package/src/promoCard/{PromoCardContext.spec.tsx → PromoCardContext.test.tsx} +0 -0
  263. /package/src/promoCard/{PromoCardGroup.spec.tsx → PromoCardGroup.test.tsx} +0 -0
  264. /package/src/promoCard/__snapshots__/{PromoCard.spec.tsx.snap → PromoCard.test.tsx.snap} +0 -0
  265. /package/src/promoCard/__snapshots__/{PromoCardGroup.spec.tsx.snap → PromoCardGroup.test.tsx.snap} +0 -0
  266. /package/src/provider/{Provider.spec.tsx → Provider.test.tsx} +0 -0
  267. /package/src/provider/direction/{DirectionProvider.spec.tsx → DirectionProvider.test.tsx} +0 -0
  268. /package/src/provider/language/{LanguageProvider.spec.tsx → LanguageProvider.test.tsx} +0 -0
  269. /package/src/radio/{Radio.spec.tsx → Radio.test.tsx} +0 -0
  270. /package/src/radioGroup/{RadioGroup.spec.tsx → RadioGroup.test.tsx} +0 -0
  271. /package/src/radioOption/{RadioOption.spec.tsx → RadioOption.test.tsx} +0 -0
  272. /package/src/section/{Section.spec.tsx → Section.test.tsx} +0 -0
  273. /package/src/segmentedControl/{SegmentedControl.spec.tsx → SegmentedControl.test.tsx} +0 -0
  274. /package/src/select/{Select.rtl.spec.tsx → Select.rtl.test.tsx} +0 -0
  275. /package/src/select/{Select.spec.tsx → Select.test.tsx} +0 -0
  276. /package/src/select/option/{Option.spec.tsx → Option.test.tsx} +0 -0
  277. /package/src/select/searchBox/{SearchBox.spec.tsx → SearchBox.test.tsx} +0 -0
  278. /package/src/sentimentSurface/{SentimentSurface.tests.story.tsx → SentimentSurface.test.story.tsx} +0 -0
  279. /package/src/sentimentSurface/{SentimentSurface.spec.tsx → SentimentSurface.test.tsx} +0 -0
  280. /package/src/slidingPanel/{SlidingPanel.spec.tsx → SlidingPanel.test.tsx} +0 -0
  281. /package/src/statusIcon/{StatusIcon.spec.tsx → StatusIcon.test.tsx} +0 -0
  282. /package/src/stepper/{Stepper.tests.story.tsx → Stepper.test.story.tsx} +0 -0
  283. /package/src/stepper/{Stepper.spec.tsx → Stepper.test.tsx} +0 -0
  284. /package/src/stepper/{deviceDetection.spec.ts → deviceDetection.test.ts} +0 -0
  285. /package/src/sticky/{Sticky.spec.tsx → Sticky.test.tsx} +0 -0
  286. /package/src/summary/{Summary.tests.story.tsx → Summary.test.story.tsx} +0 -0
  287. /package/src/summary/{Summary.spec.tsx → Summary.test.tsx} +0 -0
  288. /package/src/switch/{Switch.spec.tsx → Switch.test.tsx} +0 -0
  289. /package/src/switchOption/{SwitchOption.spec.tsx → SwitchOption.test.tsx} +0 -0
  290. /package/src/table/{Table.spec.tsx → Table.test.tsx} +0 -0
  291. /package/src/table/{TableCell.spec.tsx → TableCell.test.tsx} +0 -0
  292. /package/src/table/{TableHeader.spec.tsx → TableHeader.test.tsx} +0 -0
  293. /package/src/table/{TableRow.spec.tsx → TableRow.test.tsx} +0 -0
  294. /package/src/table/{TableStatusText.spec.tsx → TableStatusText.test.tsx} +0 -0
  295. /package/src/textareaWithDisplayFormat/{TextareaWithDisplayFormat.spec.js → TextareaWithDisplayFormat.test.js} +0 -0
  296. /package/src/tile/{Tile.spec.tsx → Tile.test.tsx} +0 -0
  297. /package/src/tile/__snapshots__/{Tile.spec.tsx.snap → Tile.test.tsx.snap} +0 -0
  298. /package/src/title/{Title.spec.tsx → Title.test.tsx} +0 -0
  299. /package/src/tooltip/{Tooltip.spec.tsx → Tooltip.test.tsx} +0 -0
  300. /package/src/tooltip/__snapshots__/{Tooltip.spec.tsx.snap → Tooltip.test.tsx.snap} +0 -0
  301. /package/src/typeahead/{Typeahead.spec.tsx → Typeahead.test.tsx} +0 -0
  302. /package/src/typeahead/typeaheadInput/{TypeaheadInput.spec.tsx → TypeaheadInput.test.tsx} +0 -0
  303. /package/src/typeahead/util/{highlight.spec.tsx → highlight.test.tsx} +0 -0
  304. /package/src/upload/{Upload.tests.story.tsx → Upload.test.story.tsx} +0 -0
  305. /package/src/upload/{Upload.spec.tsx → Upload.test.tsx} +0 -0
  306. /package/src/upload/steps/completeStep/{completeStep.spec.tsx → completeStep.test.tsx} +0 -0
  307. /package/src/upload/steps/processingStep/{processingStep.spec.tsx → processingStep.test.tsx} +0 -0
  308. /package/src/upload/steps/uploadImageStep/{uploadImageStep.spec.tsx → uploadImageStep.test.tsx} +0 -0
  309. /package/src/upload/utils/asyncFileRead/{asyncFileRead.spec.ts → asyncFileRead.test.ts} +0 -0
  310. /package/src/upload/utils/getFileType/{getFileType.spec.ts → getFileType.test.ts} +0 -0
  311. /package/src/upload/utils/isSizeValid/{isSizeValid.spec.ts → isSizeValid.test.ts} +0 -0
  312. /package/src/upload/utils/isTypeValid/{isTypeValid.spec.ts → isTypeValid.test.ts} +0 -0
  313. /package/src/upload/utils/postData/{postData.spec.ts → postData.test.ts} +0 -0
  314. /package/src/uploadInput/{UploadInput.tests.story.tsx → UploadInput.test.story.tsx} +0 -0
  315. /package/src/uploadInput/{UploadInput.spec.tsx → UploadInput.test.tsx} +0 -0
  316. /package/src/uploadInput/uploadButton/{UploadButton.spec.tsx → UploadButton.test.tsx} +0 -0
  317. /package/src/uploadInput/uploadButton/{getAllowedFileTypes.spec.ts → getAllowedFileTypes.test.ts} +0 -0
  318. /package/src/uploadInput/uploadItem/{UploadItem.spec.tsx → UploadItem.test.tsx} +0 -0
  319. /package/src/utilities/deprecatedProperty/{deprecatedProperty.spec.ts → deprecatedProperty.test.ts} +0 -0
  320. /package/src/withDisplayFormat/{WithDisplayFormat.spec.js → WithDisplayFormat.test.js} +0 -0
  321. /package/src/withId/{withId.spec.tsx → withId.test.tsx} +0 -0
  322. /package/src/withNextPortal/{withNextPortal.spec.tsx → withNextPortal.test.tsx} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/tabs/Tabs.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAa,MAAM,WAAW,CAAC;AAMnD,OAAO,EAOL,KAAK,EACN,MAAM,SAAS,CAAC;AAIjB,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC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CAAC,CA6BrD;IAEF,MAAM;CAgFP"}
@@ -8,6 +8,4 @@ export declare const getSwipeDifference: (start: Swipe, end: Swipe, axis?: "x" |
8
8
  export declare const swipedLeftToRight: (start: Swipe, end: Swipe) => boolean;
9
9
  export declare const swipedRightToLeft: (start: Swipe, end: Swipe) => boolean;
10
10
  export declare const swipeShouldChangeTab: (start: Swipe, end: Swipe) => boolean;
11
- export declare function getVelocity(coords: Swipe[]): number;
12
- export declare const getElasticDragDifference: (difference: number) => number;
13
11
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tabs/utils.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,WAIxD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,EAAE,OAAM,GAAG,GAAG,GAAS,WAEjF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,YAEzD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,YAEzD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,YAK5D,CAAC;AAEF,wBAAgB,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,UAU1C;AAOD,eAAO,MAAM,wBAAwB,GAAI,YAAY,MAAM,WACmB,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tabs/utils.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,WAIxD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,EAAE,OAAM,GAAG,GAAG,GAAS,WAEjF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,YAEzD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,YAEzD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,YAK5D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "46.124.0",
3
+ "version": "46.125.0",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -56,7 +56,7 @@
56
56
  "@storybook/react-webpack5": "10.3.0-alpha.0",
57
57
  "@testing-library/dom": "^10.4.1",
58
58
  "@testing-library/jest-dom": "^6.9.1",
59
- "@testing-library/react": "^16.3.1",
59
+ "@testing-library/react": "^16.3.2",
60
60
  "@testing-library/user-event": "^14.6.1",
61
61
  "@transferwise/icons": "^4.0.2",
62
62
  "@tsconfig/recommended": "^1.0.13",
@@ -78,6 +78,7 @@
78
78
  "jest": "^30.2.0",
79
79
  "jest-environment-jsdom": "^29.7.0",
80
80
  "jest-fetch-mock": "^3.0.3",
81
+ "jsdom-testing-mocks": "^1.16.0",
81
82
  "lodash.times": "^4.3.2",
82
83
  "react-intl": "^7.1.11",
83
84
  "rollup": "^4.54.0",
@@ -103,11 +104,10 @@
103
104
  "dependencies": {
104
105
  "@babel/runtime": "^7.28.4",
105
106
  "@floating-ui/react": "^0.27.16",
106
- "@headlessui/react": "^1.7.19",
107
+ "@headlessui/react": "^2.2.9",
107
108
  "@popperjs/core": "^2.11.8",
108
109
  "@react-aria/focus": "^3.21.3",
109
110
  "@react-aria/overlays": "^3.31.0",
110
- "@react-spring/web": "~10.0.3",
111
111
  "@transferwise/formatting": "^2.13.4",
112
112
  "@transferwise/neptune-validation": "^3.3.1",
113
113
  "clsx": "^2.1.1",
@@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { Settings } from '@transferwise/icons';
3
3
 
4
4
  import ActionButton from './ActionButton';
5
- import { allModes } from '../../.storybook/modes';
5
+ import { withVariantConfig } from '../../.storybook/helpers';
6
6
 
7
7
  /**
8
8
  * This component is deprecated please use new [Button](?path=/docs/actions-button--docs).
@@ -47,14 +47,7 @@ export const Basic: Story = {
47
47
  </div>
48
48
  </div>
49
49
  ),
50
- parameters: {
51
- variants: ['default', 'dark', 'rtl', 'mobile'],
52
- chromatic: {
53
- dark: allModes.dark,
54
- rtl: allModes.rtl,
55
- mobile: allModes.largeMobile,
56
- },
57
- },
50
+ ...withVariantConfig(['default', 'dark', 'rtl', 'mobile']),
58
51
  };
59
52
 
60
53
  export const Disabled: Story = {
@@ -5,7 +5,7 @@ import { Flag } from '@wise/art';
5
5
  import { Size } from '../common';
6
6
 
7
7
  import Avatar, { AvatarType } from '.';
8
- import { allModes } from '../../.storybook/modes';
8
+ import { withVariantConfig } from '../../.storybook/helpers';
9
9
 
10
10
  /**
11
11
  * @deprecated use **`AvatarView`** components instead
@@ -226,11 +226,5 @@ export const Table: Story = {
226
226
  </div>
227
227
  );
228
228
  },
229
- parameters: {
230
- variants: ['default', 'dark', 'rtl'],
231
- chromatic: {
232
- dark: allModes.dark,
233
- rtl: allModes.rtl,
234
- },
235
- },
229
+ ...withVariantConfig(['default', 'dark', 'rtl']),
236
230
  };
@@ -3,7 +3,7 @@ import { ArrowRight, ChevronRight, Freeze } from '@transferwise/icons';
3
3
  import { expect, userEvent, within } from 'storybook/test';
4
4
  import Button from '../Button.resolver';
5
5
  import { ButtonPriority } from '../Button.types';
6
- import { allModes } from '../../../.storybook/modes';
6
+ import { withVariantConfig } from '../../../.storybook/helpers';
7
7
 
8
8
  const meta: Meta<typeof Button> = {
9
9
  component: Button,
@@ -32,16 +32,11 @@ const buttonPriorities = ['primary', 'secondary', 'secondary-neutral', 'tertiary
32
32
  const buttonSizes = ['sm', 'md', 'lg'] as const;
33
33
  export const AllVariants: Story = {
34
34
  tags: ['!autodocs'],
35
- parameters: {
36
- padding: '0',
37
- variants: ['default', 'dark', 'bright-green', 'forest-green', 'rtl'],
38
- chromatic: {
39
- dark: allModes.dark,
40
- brightGreen: allModes.brightGreen,
41
- forestGreen: allModes.forestGreen,
42
- rtl: allModes.rtl,
35
+ ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green', 'rtl'], {
36
+ parameters: {
37
+ padding: '0',
43
38
  },
44
- },
39
+ }),
45
40
  render: () => (
46
41
  <div
47
42
  className="button-variants"
@@ -5,7 +5,7 @@ import { Field } from '../field/Field';
5
5
  import { lorem10 } from '../test-utils';
6
6
 
7
7
  import Checkbox from './Checkbox';
8
- import { allModes } from '../../.storybook/modes';
8
+ import { withVariantConfig } from '../../.storybook/helpers';
9
9
 
10
10
  const meta: Meta<typeof Checkbox> = {
11
11
  component: Checkbox,
@@ -33,25 +33,12 @@ export const Multiple: Story = {
33
33
  </>
34
34
  );
35
35
  },
36
- parameters: {
37
- variants: ['default', 'dark', 'rtl'],
38
- chromatic: {
39
- dark: allModes.dark,
40
- rtl: allModes.rtl,
41
- },
42
- },
36
+ ...withVariantConfig(['default', 'dark', 'rtl']),
43
37
  };
44
38
 
45
39
  export const MultipleMobile: Story = {
46
40
  ...Multiple,
47
- parameters: {
48
- variants: ['default', 'dark', 'rtl', 'mobile'],
49
- chromatic: {
50
- dark: allModes.dark,
51
- rtl: allModes.rtl,
52
- mobile: allModes.largeMobile,
53
- },
54
- },
41
+ ...withVariantConfig(['default', 'dark', 'rtl', 'mobile'], Multiple),
55
42
  };
56
43
 
57
44
  export const WithinField = {
@@ -6,7 +6,7 @@ import { Meta, StoryObj } from '@storybook/react-webpack5';
6
6
  import CircularButton from './CircularButton';
7
7
  import Title from '../title';
8
8
  import Body from '../body';
9
- import { allModes } from '../../.storybook/modes';
9
+ import { withVariantConfig } from '../../.storybook/helpers';
10
10
 
11
11
  export default {
12
12
  component: CircularButton,
@@ -89,10 +89,5 @@ export const All: Story = {
89
89
 
90
90
  export const All400Zoom: Story = {
91
91
  ...All,
92
- parameters: {
93
- variants: ['400%'],
94
- chromatic: {
95
- '400%': allModes.zoom400,
96
- },
97
- },
92
+ ...withVariantConfig(['400%'], All),
98
93
  };
@@ -11,7 +11,7 @@ import Title from '../../title/Title';
11
11
  import { Typography } from '../propsValues/typography';
12
12
 
13
13
  import BottomSheet from './BottomSheet';
14
- import { allModes } from '../../../.storybook/modes';
14
+ import { withVariantConfig } from '../../../.storybook/helpers';
15
15
 
16
16
  export default {
17
17
  component: BottomSheet,
@@ -67,12 +67,7 @@ export const Basic: Story = {
67
67
 
68
68
  export const BasicMobile: Story = {
69
69
  ...Basic,
70
- parameters: {
71
- variants: ['mobile'],
72
- chromatic: {
73
- mobile: allModes.largeMobile,
74
- },
75
- },
70
+ ...withVariantConfig(['mobile'], Basic),
76
71
  };
77
72
 
78
73
  export const WithOverflowContent: Story = {
@@ -106,41 +101,20 @@ export const WithOverflowContent: Story = {
106
101
 
107
102
  export const WithOverflowContentMobile: Story = {
108
103
  ...WithOverflowContent,
109
- parameters: {
110
- variants: ['mobile'],
111
- chromatic: {
112
- mobile: allModes.largeMobile,
113
- },
114
- },
104
+ ...withVariantConfig(['mobile'], WithOverflowContent),
115
105
  };
116
106
 
117
107
  export const WithOverflowContentDark: Story = {
118
108
  ...WithOverflowContent,
119
- parameters: {
120
- variants: ['dark'],
121
- chromatic: {
122
- dark: allModes.dark,
123
- },
124
- },
109
+ ...withVariantConfig(['dark'], WithOverflowContent),
125
110
  };
126
111
 
127
112
  export const WithOverflowContentDarkMobile: Story = {
128
113
  ...WithOverflowContent,
129
- parameters: {
130
- variants: ['dark', 'mobile'],
131
- chromatic: {
132
- dark: allModes.dark,
133
- mobile: allModes.largeMobile,
134
- },
135
- },
114
+ ...withVariantConfig(['dark', 'mobile'], WithOverflowContent),
136
115
  };
137
116
 
138
117
  export const WithOverflowContentZoom400: Story = {
139
118
  ...WithOverflowContent,
140
- parameters: {
141
- variants: ['400%'],
142
- chromatic: {
143
- '400%': allModes.zoom400,
144
- },
145
- },
119
+ ...withVariantConfig(['400%'], WithOverflowContent),
146
120
  };
@@ -3,7 +3,7 @@ import Circle from './Circle';
3
3
  import { Profile } from '@transferwise/icons';
4
4
  import { CircleProps } from '.';
5
5
  import Body from '../../body';
6
- import { allModes } from '../../../.storybook/modes';
6
+ import { withVariantConfig } from '../../../.storybook/helpers';
7
7
 
8
8
  export default {
9
9
  title: 'Internal/Circle',
@@ -46,13 +46,7 @@ export const Sizes: Story = {
46
46
  </div>
47
47
  );
48
48
  },
49
- parameters: {
50
- variants: ['light', 'dark'],
51
- chromatic: {
52
- light: allModes.light,
53
- dark: allModes.dark,
54
- },
55
- },
49
+ ...withVariantConfig(['light', 'dark']),
56
50
  };
57
51
 
58
52
  export const FixedSize: Story = {
@@ -83,10 +77,5 @@ export const FixedSize: Story = {
83
77
  </div>
84
78
  );
85
79
  },
86
- parameters: {
87
- variants: ['400%'],
88
- chromatic: {
89
- zoom400: allModes.zoom400,
90
- },
91
- },
80
+ ...withVariantConfig(['400%']),
92
81
  };
@@ -1,7 +1,7 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
 
3
3
  import CriticalCommsBanner from '.';
4
- import { allModes } from '../../.storybook/modes';
4
+ import { withVariantConfig } from '../../.storybook/helpers';
5
5
 
6
6
  export default {
7
7
  component: CriticalCommsBanner,
@@ -24,13 +24,7 @@ export const Variants: Story = {
24
24
  subtitle: 'Add money within the next 30 days',
25
25
  action: { label: 'Take action', href: 'https://wise.com' },
26
26
  },
27
- parameters: {
28
- variants: ['default', 'dark', 'rtl'],
29
- chromatic: {
30
- dark: allModes.dark,
31
- rtl: allModes.rtl,
32
- },
33
- },
27
+ ...withVariantConfig(['default', 'dark', 'rtl']),
34
28
  };
35
29
 
36
30
  export const Mobile: Story = {
@@ -40,12 +34,5 @@ export const Mobile: Story = {
40
34
  subtitle: 'Add money within the next 30 days',
41
35
  action: { label: 'Take action', href: 'https://wise.com' },
42
36
  },
43
- parameters: {
44
- variants: ['default', 'dark', 'rtl', 'mobile'],
45
- chromatic: {
46
- dark: allModes.dark,
47
- rtl: allModes.rtl,
48
- mobile: allModes.largeMobile,
49
- },
50
- },
37
+ ...withVariantConfig(['default', 'dark', 'rtl', 'mobile']),
51
38
  };
@@ -6,7 +6,7 @@ import { lorem10 } from '../test-utils';
6
6
 
7
7
  import Provider from '../provider/Provider';
8
8
  import translations from '../i18n';
9
- import { allModes } from '../../.storybook/modes';
9
+ import { withVariantConfig } from '../../.storybook/helpers';
10
10
 
11
11
  const meta: Meta<typeof DateInput> = {
12
12
  component: DateInput,
@@ -223,20 +223,10 @@ export const NoNonDigitsAllowed: Story = {
223
223
 
224
224
  export const BasicMobile: Story = {
225
225
  ...Basic,
226
- parameters: {
227
- variants: ['mobile'],
228
- chromatic: {
229
- mobile: allModes.largeMobile,
230
- },
231
- },
226
+ ...withVariantConfig(['mobile'], Basic),
232
227
  };
233
228
 
234
229
  export const InputErrorMobile: Story = {
235
230
  ...InputError,
236
- parameters: {
237
- variants: ['mobile'],
238
- chromatic: {
239
- mobile: allModes.largeMobile,
240
- },
241
- },
231
+ ...withVariantConfig(['mobile'], InputError),
242
232
  };
@@ -4,7 +4,7 @@ import { StoryObj } from '@storybook/react-webpack5';
4
4
  import { Field } from '..';
5
5
  import { Size } from '../common';
6
6
  import DateLookup, { type DateLookupProps } from './DateLookup';
7
- import { allModes } from '../../.storybook/modes';
7
+ import { withVariantConfig } from '../../.storybook/helpers';
8
8
 
9
9
  export default {
10
10
  component: DateLookup,
@@ -61,13 +61,15 @@ export const Basic: Story = {
61
61
  };
62
62
  export const Basic400Zoom: Story = {
63
63
  ...Basic,
64
- parameters: {
65
- chromatic: {
66
- delay: 2000,
67
- zoom400: allModes.zoom400,
64
+
65
+ ...withVariantConfig(['400%'], {
66
+ ...Basic,
67
+ parameters: {
68
+ chromatic: {
69
+ delay: 2000,
70
+ },
68
71
  },
69
- variants: ['400%'],
70
- },
72
+ }),
71
73
  };
72
74
 
73
75
  export const WithField: Story = {
@@ -1,6 +1,6 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import Header, { type HeaderProps } from './Header';
3
- import { allModes } from '../../.storybook/modes';
3
+ import { withVariantConfig } from '../../.storybook/helpers';
4
4
 
5
5
  const meta: Meta<typeof Header> = {
6
6
  component: Header,
@@ -85,16 +85,11 @@ export const SectionTrailingSpaceWithAction: Story = {
85
85
  };
86
86
 
87
87
  export const AllVariants: Story = {
88
- parameters: {
89
- padding: '0',
90
- variants: ['default', 'dark', 'bright-green', 'forest-green', 'rtl'],
91
- chromatic: {
92
- dark: allModes.dark,
93
- brightGreen: allModes.brightGreen,
94
- forestGreen: allModes.forestGreen,
95
- rtl: allModes.rtl,
88
+ ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green', 'rtl'], {
89
+ parameters: {
90
+ padding: '0',
96
91
  },
97
- },
92
+ }),
98
93
  render: () => (
99
94
  <div
100
95
  className="header-variants"
package/src/index.ts CHANGED
@@ -35,7 +35,7 @@ export type { HeaderProps } from './header';
35
35
  export type { EmphasisProps } from './emphasis';
36
36
  export type { FieldProps } from './field/Field';
37
37
  export type { InfoProps } from './info';
38
- export type { InlinePromptProps } from './prompt';
38
+ export type { InlinePromptProps, ActionPromptProps } from './prompt';
39
39
  export type { InputWithDisplayFormatProps } from './inputWithDisplayFormat';
40
40
  export type { InputProps } from './inputs/Input';
41
41
  export type { InputGroupProps } from './inputs/InputGroup';
@@ -171,7 +171,7 @@ export { default as Header } from './header';
171
171
  export { default as Image } from './image';
172
172
  export { default as Info } from './info';
173
173
  export { default as InlineAlert } from './inlineAlert';
174
- export { InlinePrompt } from './prompt';
174
+ export { InlinePrompt, ActionPrompt } from './prompt';
175
175
  export { default as InputWithDisplayFormat } from './inputWithDisplayFormat';
176
176
  export { Input } from './inputs/Input';
177
177
  export { InputGroup } from './inputs/InputGroup';
@@ -4,7 +4,7 @@ import { userEvent, within } from 'storybook/test';
4
4
  import { lorem10 } from '../test-utils';
5
5
 
6
6
  import Info, { InfoPresentation } from '.';
7
- import { allModes } from '../../.storybook/modes';
7
+ import { withVariantConfig } from '../../.storybook/helpers';
8
8
 
9
9
  const meta = {
10
10
  component: Info,
@@ -27,13 +27,7 @@ export default meta;
27
27
  type Story = StoryObj<typeof meta>;
28
28
 
29
29
  export const Basic: Story = {
30
- parameters: {
31
- variants: ['default', 'dark', 'rtl'],
32
- chromatic: {
33
- dark: allModes.dark,
34
- rtl: allModes.rtl,
35
- },
36
- },
30
+ ...withVariantConfig(['default', 'dark', 'rtl']),
37
31
  };
38
32
 
39
33
  export const OpenedPopover = {
@@ -50,12 +44,7 @@ export const OpenedPopover = {
50
44
 
51
45
  export const OpenedPopoverMobile: Story = {
52
46
  ...OpenedPopover,
53
- parameters: {
54
- variants: ['mobile'],
55
- chromatic: {
56
- mobile: allModes.largeMobile,
57
- },
58
- },
47
+ ...withVariantConfig(['mobile'], OpenedPopover),
59
48
  };
60
49
 
61
50
  export const OpenedModal = {
@@ -67,10 +56,5 @@ export const OpenedModal = {
67
56
 
68
57
  export const OpenedModalMobile: Story = {
69
58
  ...OpenedModal,
70
- parameters: {
71
- variants: ['mobile'],
72
- chromatic: {
73
- mobile: allModes.largeMobile,
74
- },
75
- },
59
+ ...withVariantConfig(['mobile'], OpenedModal),
76
60
  };
@@ -1,19 +1,15 @@
1
1
  import { screen, waitFor, within } from '@testing-library/react';
2
2
  import { userEvent } from '@testing-library/user-event';
3
+ import { mockAnimationsApi } from 'jsdom-testing-mocks';
3
4
 
4
- import {
5
- render,
6
- mockMatchMedia,
7
- mockResizeObserver,
8
- mockRequestAnimationFrame,
9
- } from '../test-utils';
5
+ import { render, mockMatchMedia, mockResizeObserver } from '../test-utils';
10
6
 
11
7
  import { SelectInput, type SelectInputOptionItem, type SelectInputProps } from './SelectInput';
12
8
  import { Field } from '../field/Field';
13
9
 
14
10
  mockMatchMedia();
15
11
  mockResizeObserver();
16
- mockRequestAnimationFrame();
12
+ mockAnimationsApi();
17
13
 
18
14
  describe('SelectInput', () => {
19
15
  it('renders placeholder', () => {
@@ -67,6 +63,81 @@ describe('SelectInput', () => {
67
63
  expect(footer).toHaveTextContent(/‘ur’$/);
68
64
  });
69
65
 
66
+ it('allows navigating the listbox with cursors', async () => {
67
+ render(
68
+ <SelectInput
69
+ items={[
70
+ { type: 'option', value: 'GBP' },
71
+ { type: 'option', value: 'EUR' },
72
+ { type: 'option', value: 'USD' },
73
+ ]}
74
+ renderFooter={({ queryNormalized: normalizedQuery }) => (
75
+ <button type="button">Footer button</button>
76
+ )}
77
+ filterable
78
+ />,
79
+ );
80
+
81
+ // opened the dropbox, with search focused
82
+ await userEvent.tab();
83
+ await userEvent.keyboard(' ');
84
+ expect(screen.getByRole('combobox')).toHaveFocus();
85
+
86
+ // search still focused but listbox can be navigated via keyboard
87
+ await userEvent.keyboard('{ArrowDown}');
88
+ expect(screen.getByRole('combobox')).toHaveFocus();
89
+ expect(screen.getByRole('option', { name: 'EUR' })).toHaveClass(
90
+ 'np-select-input-option-container--active',
91
+ );
92
+
93
+ // tab moves focus to listbox
94
+ await userEvent.tab();
95
+ expect(screen.getByRole('listbox')).toHaveFocus();
96
+ expect(screen.getByRole('combobox')).not.toHaveFocus();
97
+
98
+ // arrows still navigate within listbox
99
+ await userEvent.keyboard('{ArrowDown}');
100
+ expect(screen.getByRole('option', { name: 'USD' })).toHaveClass(
101
+ 'np-select-input-option-container--active',
102
+ );
103
+
104
+ // tab moves focus to footer but highlighted option is retained
105
+ await userEvent.tab();
106
+ expect(screen.getByRole('listbox')).not.toHaveFocus();
107
+ expect(screen.getByRole('combobox')).not.toHaveFocus();
108
+ expect(screen.getByText('Footer button')).toHaveFocus();
109
+ expect(screen.getByRole('option', { name: 'USD' })).toHaveClass(
110
+ 'np-select-input-option-container--active',
111
+ );
112
+
113
+ // shift+tab moves focus back to listbox
114
+ await userEvent.tab({ shift: true });
115
+ expect(screen.getByRole('listbox')).toHaveFocus();
116
+ expect(screen.getByRole('combobox')).not.toHaveFocus();
117
+ expect(screen.getByText('Footer button')).not.toHaveFocus();
118
+
119
+ // previously highlighted option is still active within listbox
120
+ expect(screen.getByRole('option', { name: 'USD' })).toHaveClass(
121
+ 'np-select-input-option-container--active',
122
+ );
123
+
124
+ // arrows continue to navigate within listbox
125
+ await userEvent.keyboard('{ArrowUp}');
126
+ expect(screen.getByRole('option', { name: 'EUR' })).toHaveClass(
127
+ 'np-select-input-option-container--active',
128
+ );
129
+
130
+ // shift+tab moves focus back to search input
131
+ await userEvent.tab({ shift: true });
132
+ expect(screen.getByRole('combobox')).toHaveFocus();
133
+
134
+ // arrows continue to navigate within listbox
135
+ await userEvent.keyboard('{ArrowUp}');
136
+ expect(screen.getByRole('option', { name: 'GBP' })).toHaveClass(
137
+ 'np-select-input-option-container--active',
138
+ );
139
+ });
140
+
70
141
  it('shows item selected via mouse', async () => {
71
142
  const handleClose = jest.fn();
72
143