@transferwise/components 0.0.0-experimental-4c97d70 → 0.0.0-experimental-862fadc

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 (450) hide show
  1. package/build/accordion/AccordionItem/AccordionItem.js +1 -0
  2. package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
  3. package/build/accordion/AccordionItem/AccordionItem.mjs +1 -0
  4. package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
  5. package/build/actionButton/ActionButton.js +1 -0
  6. package/build/actionButton/ActionButton.js.map +1 -1
  7. package/build/actionButton/ActionButton.mjs +1 -0
  8. package/build/actionButton/ActionButton.mjs.map +1 -1
  9. package/build/actionOption/ActionOption.js +1 -0
  10. package/build/actionOption/ActionOption.js.map +1 -1
  11. package/build/actionOption/ActionOption.mjs +1 -0
  12. package/build/actionOption/ActionOption.mjs.map +1 -1
  13. package/build/alert/Alert.js +1 -0
  14. package/build/alert/Alert.js.map +1 -1
  15. package/build/alert/Alert.mjs +1 -0
  16. package/build/alert/Alert.mjs.map +1 -1
  17. package/build/alert/inlineMarkdown/InlineMarkdown.js +1 -0
  18. package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
  19. package/build/alert/inlineMarkdown/InlineMarkdown.mjs +1 -0
  20. package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
  21. package/build/avatar/Avatar.js +1 -0
  22. package/build/avatar/Avatar.js.map +1 -1
  23. package/build/avatar/Avatar.mjs +1 -0
  24. package/build/avatar/Avatar.mjs.map +1 -1
  25. package/build/avatarView/AvatarView.js +1 -0
  26. package/build/avatarView/AvatarView.js.map +1 -1
  27. package/build/avatarView/AvatarView.mjs +1 -0
  28. package/build/avatarView/AvatarView.mjs.map +1 -1
  29. package/build/avatarWrapper/AvatarWrapper.js +1 -0
  30. package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
  31. package/build/avatarWrapper/AvatarWrapper.mjs +1 -0
  32. package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
  33. package/build/badge/Badge.js +1 -0
  34. package/build/badge/Badge.js.map +1 -1
  35. package/build/badge/Badge.mjs +1 -0
  36. package/build/badge/Badge.mjs.map +1 -1
  37. package/build/badge/BadgeAssets.js +2 -1
  38. package/build/badge/BadgeAssets.js.map +1 -1
  39. package/build/badge/BadgeAssets.mjs +2 -1
  40. package/build/badge/BadgeAssets.mjs.map +1 -1
  41. package/build/button/Button.js +1 -0
  42. package/build/button/Button.js.map +1 -1
  43. package/build/button/Button.mjs +1 -0
  44. package/build/button/Button.mjs.map +1 -1
  45. package/build/button/LegacyButton.js +1 -0
  46. package/build/button/LegacyButton.js.map +1 -1
  47. package/build/button/LegacyButton.mjs +1 -0
  48. package/build/button/LegacyButton.mjs.map +1 -1
  49. package/build/button/classMap.js +1 -0
  50. package/build/button/classMap.js.map +1 -1
  51. package/build/button/classMap.mjs +1 -0
  52. package/build/button/classMap.mjs.map +1 -1
  53. package/build/button/legacyUtils/legacyUtils.js +1 -0
  54. package/build/button/legacyUtils/legacyUtils.js.map +1 -1
  55. package/build/button/legacyUtils/legacyUtils.mjs +1 -0
  56. package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
  57. package/build/card/Card.js +1 -0
  58. package/build/card/Card.js.map +1 -1
  59. package/build/card/Card.mjs +1 -0
  60. package/build/card/Card.mjs.map +1 -1
  61. package/build/checkbox/Checkbox.js +1 -0
  62. package/build/checkbox/Checkbox.js.map +1 -1
  63. package/build/checkbox/Checkbox.mjs +1 -0
  64. package/build/checkbox/Checkbox.mjs.map +1 -1
  65. package/build/chevron/Chevron.js +1 -0
  66. package/build/chevron/Chevron.js.map +1 -1
  67. package/build/chevron/Chevron.mjs +1 -0
  68. package/build/chevron/Chevron.mjs.map +1 -1
  69. package/build/chips/Chip.js +1 -0
  70. package/build/chips/Chip.js.map +1 -1
  71. package/build/chips/Chip.mjs +1 -0
  72. package/build/chips/Chip.mjs.map +1 -1
  73. package/build/circularButton/CircularButton.js +1 -0
  74. package/build/circularButton/CircularButton.js.map +1 -1
  75. package/build/circularButton/CircularButton.mjs +1 -0
  76. package/build/circularButton/CircularButton.mjs.map +1 -1
  77. package/build/common/locale/index.js +9 -4
  78. package/build/common/locale/index.js.map +1 -1
  79. package/build/common/locale/index.mjs +9 -4
  80. package/build/common/locale/index.mjs.map +1 -1
  81. package/build/common/panel/Panel.js +50 -54
  82. package/build/common/panel/Panel.js.map +1 -1
  83. package/build/common/panel/Panel.mjs +55 -59
  84. package/build/common/panel/Panel.mjs.map +1 -1
  85. package/build/common/responsivePanel/ResponsivePanel.js +1 -0
  86. package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
  87. package/build/common/responsivePanel/ResponsivePanel.mjs +1 -0
  88. package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
  89. package/build/criticalBanner/CriticalCommsBanner.js +1 -0
  90. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  91. package/build/criticalBanner/CriticalCommsBanner.mjs +1 -0
  92. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  93. package/build/dateInput/DateInput.js +1 -1
  94. package/build/dateInput/DateInput.mjs +1 -1
  95. package/build/dateLookup/DateLookup.js +1 -1
  96. package/build/dateLookup/DateLookup.mjs +1 -1
  97. package/build/dateLookup/dateHeader/DateHeader.js +1 -0
  98. package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
  99. package/build/dateLookup/dateHeader/DateHeader.mjs +1 -0
  100. package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
  101. package/build/decision/Decision.js +1 -0
  102. package/build/decision/Decision.js.map +1 -1
  103. package/build/decision/Decision.mjs +1 -0
  104. package/build/decision/Decision.mjs.map +1 -1
  105. package/build/definitionList/DefinitionList.js +1 -0
  106. package/build/definitionList/DefinitionList.js.map +1 -1
  107. package/build/definitionList/DefinitionList.mjs +1 -0
  108. package/build/definitionList/DefinitionList.mjs.map +1 -1
  109. package/build/dimmer/Dimmer.js +1 -0
  110. package/build/dimmer/Dimmer.js.map +1 -1
  111. package/build/dimmer/Dimmer.mjs +1 -0
  112. package/build/dimmer/Dimmer.mjs.map +1 -1
  113. package/build/display/Display.js +1 -0
  114. package/build/display/Display.js.map +1 -1
  115. package/build/display/Display.mjs +1 -0
  116. package/build/display/Display.mjs.map +1 -1
  117. package/build/drawer/Drawer.js +1 -0
  118. package/build/drawer/Drawer.js.map +1 -1
  119. package/build/drawer/Drawer.mjs +1 -0
  120. package/build/drawer/Drawer.mjs.map +1 -1
  121. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +4 -3
  122. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
  123. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +4 -3
  124. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
  125. package/build/field/Field.js +5 -5
  126. package/build/field/Field.mjs +5 -5
  127. package/build/flowNavigation/FlowNavigation.js +1 -0
  128. package/build/flowNavigation/FlowNavigation.js.map +1 -1
  129. package/build/flowNavigation/FlowNavigation.mjs +1 -0
  130. package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
  131. package/build/header/Header.js +1 -0
  132. package/build/header/Header.js.map +1 -1
  133. package/build/header/Header.mjs +1 -0
  134. package/build/header/Header.mjs.map +1 -1
  135. package/build/i18n/en.json +0 -2
  136. package/build/i18n/en.json.js +0 -2
  137. package/build/i18n/en.json.js.map +1 -1
  138. package/build/i18n/en.json.mjs +0 -2
  139. package/build/i18n/en.json.mjs.map +1 -1
  140. package/build/index.js +0 -2
  141. package/build/index.js.map +1 -1
  142. package/build/index.mjs +0 -1
  143. package/build/index.mjs.map +1 -1
  144. package/build/info/Info.js +1 -0
  145. package/build/info/Info.js.map +1 -1
  146. package/build/info/Info.mjs +1 -0
  147. package/build/info/Info.mjs.map +1 -1
  148. package/build/inlineAlert/InlineAlert.js +1 -0
  149. package/build/inlineAlert/InlineAlert.js.map +1 -1
  150. package/build/inlineAlert/InlineAlert.mjs +1 -0
  151. package/build/inlineAlert/InlineAlert.mjs.map +1 -1
  152. package/build/inputs/SearchInput.js +1 -0
  153. package/build/inputs/SearchInput.js.map +1 -1
  154. package/build/inputs/SearchInput.mjs +1 -0
  155. package/build/inputs/SearchInput.mjs.map +1 -1
  156. package/build/instructionsList/InstructionsList.js +1 -0
  157. package/build/instructionsList/InstructionsList.js.map +1 -1
  158. package/build/instructionsList/InstructionsList.mjs +1 -0
  159. package/build/instructionsList/InstructionsList.mjs.map +1 -1
  160. package/build/link/Link.js +1 -0
  161. package/build/link/Link.js.map +1 -1
  162. package/build/link/Link.mjs +1 -0
  163. package/build/link/Link.mjs.map +1 -1
  164. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js +1 -0
  165. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js.map +1 -1
  166. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs +1 -0
  167. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs.map +1 -1
  168. package/build/listItem/ListItem.js +1 -0
  169. package/build/listItem/ListItem.js.map +1 -1
  170. package/build/listItem/ListItem.mjs +1 -0
  171. package/build/listItem/ListItem.mjs.map +1 -1
  172. package/build/listItem/Prompt/ListItemPrompt.js +5 -5
  173. package/build/listItem/Prompt/ListItemPrompt.mjs +5 -5
  174. package/build/loader/Loader.js +1 -0
  175. package/build/loader/Loader.js.map +1 -1
  176. package/build/loader/Loader.mjs +1 -0
  177. package/build/loader/Loader.mjs.map +1 -1
  178. package/build/main.css +66 -133
  179. package/build/markdown/Markdown.js +1 -0
  180. package/build/markdown/Markdown.js.map +1 -1
  181. package/build/markdown/Markdown.mjs +1 -0
  182. package/build/markdown/Markdown.mjs.map +1 -1
  183. package/build/modal/Modal.js +1 -0
  184. package/build/modal/Modal.js.map +1 -1
  185. package/build/modal/Modal.mjs +1 -0
  186. package/build/modal/Modal.mjs.map +1 -1
  187. package/build/moneyInput/MoneyInput.js +28 -12
  188. package/build/moneyInput/MoneyInput.js.map +1 -1
  189. package/build/moneyInput/MoneyInput.mjs +30 -14
  190. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  191. package/build/moneyInput/currencyFormatting.js +8 -2
  192. package/build/moneyInput/currencyFormatting.js.map +1 -1
  193. package/build/moneyInput/currencyFormatting.mjs +5 -4
  194. package/build/moneyInput/currencyFormatting.mjs.map +1 -1
  195. package/build/navigationOption/NavigationOption.js +1 -0
  196. package/build/navigationOption/NavigationOption.js.map +1 -1
  197. package/build/navigationOption/NavigationOption.mjs +1 -0
  198. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  199. package/build/nudge/Nudge.js +1 -0
  200. package/build/nudge/Nudge.js.map +1 -1
  201. package/build/nudge/Nudge.mjs +1 -0
  202. package/build/nudge/Nudge.mjs.map +1 -1
  203. package/build/overlayHeader/OverlayHeader.js +1 -0
  204. package/build/overlayHeader/OverlayHeader.js.map +1 -1
  205. package/build/overlayHeader/OverlayHeader.mjs +1 -0
  206. package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
  207. package/build/phoneNumberInput/PhoneNumberInput.js +1 -0
  208. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  209. package/build/phoneNumberInput/PhoneNumberInput.mjs +1 -0
  210. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  211. package/build/popover/Popover.js +1 -0
  212. package/build/popover/Popover.js.map +1 -1
  213. package/build/popover/Popover.mjs +1 -0
  214. package/build/popover/Popover.mjs.map +1 -1
  215. package/build/processIndicator/ProcessIndicator.js +1 -0
  216. package/build/processIndicator/ProcessIndicator.js.map +1 -1
  217. package/build/processIndicator/ProcessIndicator.mjs +1 -0
  218. package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
  219. package/build/progressBar/ProgressBar.js +1 -0
  220. package/build/progressBar/ProgressBar.js.map +1 -1
  221. package/build/progressBar/ProgressBar.mjs +1 -0
  222. package/build/progressBar/ProgressBar.mjs.map +1 -1
  223. package/build/promoCard/PromoCard.js +1 -0
  224. package/build/promoCard/PromoCard.js.map +1 -1
  225. package/build/promoCard/PromoCard.mjs +1 -0
  226. package/build/promoCard/PromoCard.mjs.map +1 -1
  227. package/build/promoCard/PromoCardIndicator.js +1 -0
  228. package/build/promoCard/PromoCardIndicator.js.map +1 -1
  229. package/build/promoCard/PromoCardIndicator.mjs +1 -0
  230. package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
  231. package/build/prompt/ActionPrompt/ActionPrompt.js +41 -8
  232. package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
  233. package/build/prompt/ActionPrompt/ActionPrompt.mjs +41 -8
  234. package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
  235. package/build/prompt/InfoPrompt/InfoPrompt.js +1 -0
  236. package/build/prompt/InfoPrompt/InfoPrompt.js.map +1 -1
  237. package/build/prompt/InfoPrompt/InfoPrompt.mjs +1 -0
  238. package/build/prompt/InfoPrompt/InfoPrompt.mjs.map +1 -1
  239. package/build/prompt/InlinePrompt/InlinePrompt.js +1 -0
  240. package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -1
  241. package/build/prompt/InlinePrompt/InlinePrompt.mjs +1 -0
  242. package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
  243. package/build/prompt/PrimitivePrompt/PrimitivePrompt.js +0 -2
  244. package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
  245. package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs +0 -2
  246. package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
  247. package/build/radio/Radio.js +1 -0
  248. package/build/radio/Radio.js.map +1 -1
  249. package/build/radio/Radio.mjs +1 -0
  250. package/build/radio/Radio.mjs.map +1 -1
  251. package/build/segmentedControl/SegmentedControl.js +1 -0
  252. package/build/segmentedControl/SegmentedControl.js.map +1 -1
  253. package/build/segmentedControl/SegmentedControl.mjs +1 -0
  254. package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
  255. package/build/select/Select.js +2 -1
  256. package/build/select/Select.js.map +1 -1
  257. package/build/select/Select.mjs +2 -1
  258. package/build/select/Select.mjs.map +1 -1
  259. package/build/select/option/Option.js +1 -0
  260. package/build/select/option/Option.js.map +1 -1
  261. package/build/select/option/Option.mjs +1 -0
  262. package/build/select/option/Option.mjs.map +1 -1
  263. package/build/statusIcon/StatusIcon.js +1 -0
  264. package/build/statusIcon/StatusIcon.js.map +1 -1
  265. package/build/statusIcon/StatusIcon.mjs +1 -0
  266. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  267. package/build/stepper/Stepper.js +1 -0
  268. package/build/stepper/Stepper.js.map +1 -1
  269. package/build/stepper/Stepper.mjs +1 -0
  270. package/build/stepper/Stepper.mjs.map +1 -1
  271. package/build/sticky/Sticky.js +1 -0
  272. package/build/sticky/Sticky.js.map +1 -1
  273. package/build/sticky/Sticky.mjs +1 -0
  274. package/build/sticky/Sticky.mjs.map +1 -1
  275. package/build/styles/css/neptune.css +33 -22
  276. package/build/styles/less/neptune-tokens.less +5 -4
  277. package/build/styles/main.css +66 -133
  278. package/build/styles/modal/Modal.css +2 -2
  279. package/build/styles/props/neptune-tokens.css +3 -2
  280. package/build/styles/select/Select.css +2 -1
  281. package/build/styles/styles/less/neptune.css +33 -22
  282. package/build/summary/Summary.js +1 -0
  283. package/build/summary/Summary.js.map +1 -1
  284. package/build/summary/Summary.mjs +1 -0
  285. package/build/summary/Summary.mjs.map +1 -1
  286. package/build/table/Table.js +1 -0
  287. package/build/table/Table.js.map +1 -1
  288. package/build/table/Table.mjs +1 -0
  289. package/build/table/Table.mjs.map +1 -1
  290. package/build/table/TableRow.js +1 -0
  291. package/build/table/TableRow.js.map +1 -1
  292. package/build/table/TableRow.mjs +1 -0
  293. package/build/table/TableRow.mjs.map +1 -1
  294. package/build/table/TableStatusText.js +1 -0
  295. package/build/table/TableStatusText.js.map +1 -1
  296. package/build/table/TableStatusText.mjs +1 -0
  297. package/build/table/TableStatusText.mjs.map +1 -1
  298. package/build/tabs/Tabs.js +1 -0
  299. package/build/tabs/Tabs.js.map +1 -1
  300. package/build/tabs/Tabs.mjs +1 -0
  301. package/build/tabs/Tabs.mjs.map +1 -1
  302. package/build/tile/Tile.js +1 -0
  303. package/build/tile/Tile.js.map +1 -1
  304. package/build/tile/Tile.mjs +1 -0
  305. package/build/tile/Tile.mjs.map +1 -1
  306. package/build/title/Title.js +1 -0
  307. package/build/title/Title.js.map +1 -1
  308. package/build/title/Title.mjs +1 -0
  309. package/build/title/Title.mjs.map +1 -1
  310. package/build/tooltip/Tooltip.js +30 -50
  311. package/build/tooltip/Tooltip.js.map +1 -1
  312. package/build/tooltip/Tooltip.mjs +31 -51
  313. package/build/tooltip/Tooltip.mjs.map +1 -1
  314. package/build/typeahead/Typeahead.js +5 -5
  315. package/build/typeahead/Typeahead.mjs +5 -5
  316. package/build/types/badge/BadgeAssets.d.ts.map +1 -1
  317. package/build/types/common/locale/index.d.ts +1 -1
  318. package/build/types/common/locale/index.d.ts.map +1 -1
  319. package/build/types/common/panel/Panel.d.ts.map +1 -1
  320. package/build/types/expressiveMoneyInput/currencySelector/CurrencySelector.d.ts.map +1 -1
  321. package/build/types/index.d.ts +2 -2
  322. package/build/types/index.d.ts.map +1 -1
  323. package/build/types/moneyInput/MoneyInput.d.ts +6 -0
  324. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  325. package/build/types/moneyInput/currencyFormatting.d.ts +4 -3
  326. package/build/types/moneyInput/currencyFormatting.d.ts.map +1 -1
  327. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +11 -2
  328. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
  329. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +3 -8
  330. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
  331. package/build/types/prompt/index.d.ts +0 -2
  332. package/build/types/prompt/index.d.ts.map +1 -1
  333. package/build/types/test-utils/index.d.ts +0 -4
  334. package/build/types/test-utils/index.d.ts.map +1 -1
  335. package/build/types/tooltip/Tooltip.d.ts.map +1 -1
  336. package/build/upload/Upload.js +1 -0
  337. package/build/upload/Upload.js.map +1 -1
  338. package/build/upload/Upload.mjs +1 -0
  339. package/build/upload/Upload.mjs.map +1 -1
  340. package/build/upload/steps/completeStep/completeStep.js +1 -0
  341. package/build/upload/steps/completeStep/completeStep.js.map +1 -1
  342. package/build/upload/steps/completeStep/completeStep.mjs +1 -0
  343. package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
  344. package/build/upload/steps/processingStep/processingStep.js +1 -0
  345. package/build/upload/steps/processingStep/processingStep.js.map +1 -1
  346. package/build/upload/steps/processingStep/processingStep.mjs +1 -0
  347. package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
  348. package/build/upload/steps/uploadImageStep/uploadImageStep.js +1 -0
  349. package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
  350. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +1 -0
  351. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
  352. package/build/uploadInput/UploadInput.js +1 -0
  353. package/build/uploadInput/UploadInput.js.map +1 -1
  354. package/build/uploadInput/UploadInput.mjs +1 -0
  355. package/build/uploadInput/UploadInput.mjs.map +1 -1
  356. package/build/uploadInput/uploadButton/UploadButton.js +1 -0
  357. package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
  358. package/build/uploadInput/uploadButton/UploadButton.mjs +1 -0
  359. package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
  360. package/build/uploadInput/uploadButton/defaults.js +1 -0
  361. package/build/uploadInput/uploadButton/defaults.js.map +1 -1
  362. package/build/uploadInput/uploadButton/defaults.mjs +1 -0
  363. package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
  364. package/build/uploadInput/uploadItem/UploadItem.js +1 -0
  365. package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
  366. package/build/uploadInput/uploadItem/UploadItem.mjs +1 -0
  367. package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
  368. package/build/withDisplayFormat/WithDisplayFormat.js +1 -0
  369. package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
  370. package/build/withDisplayFormat/WithDisplayFormat.mjs +1 -0
  371. package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  372. package/package.json +19 -21
  373. package/src/avatarView/AvatarView.story.tsx +1 -1
  374. package/src/avatarView/AvatarView.test.story.tsx +108 -1
  375. package/src/badge/BadgeAssets.tsx +2 -0
  376. package/src/common/locale/index.test.ts +13 -4
  377. package/src/common/locale/index.ts +9 -3
  378. package/src/common/panel/Panel.tsx +56 -49
  379. package/src/expressiveMoneyInput/ExpressiveMoneyInput.story.tsx +18 -0
  380. package/src/expressiveMoneyInput/currencySelector/CurrencySelector.test.tsx +119 -1
  381. package/src/expressiveMoneyInput/currencySelector/CurrencySelector.tsx +4 -3
  382. package/src/i18n/en.json +0 -2
  383. package/src/index.ts +2 -2
  384. package/src/main.css +66 -133
  385. package/src/main.less +1 -3
  386. package/src/modal/Modal.css +2 -2
  387. package/src/modal/Modal.less +1 -1
  388. package/src/moneyInput/MoneyInput.story.tsx +10 -1
  389. package/src/moneyInput/MoneyInput.test.story.tsx +141 -1
  390. package/src/moneyInput/MoneyInput.test.tsx +45 -0
  391. package/src/moneyInput/MoneyInput.tsx +27 -3
  392. package/src/moneyInput/currencyFormatting.ts +11 -5
  393. package/src/prompt/ActionPrompt/ActionPrompt.tsx +62 -9
  394. package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +2 -9
  395. package/src/prompt/index.ts +0 -4
  396. package/src/select/Select.css +2 -1
  397. package/src/select/Select.less +6 -5
  398. package/src/select/Select.test.story.tsx +59 -0
  399. package/src/select/Select.tsx +1 -1
  400. package/src/sentimentSurface/SentimentSurface.story.tsx +17 -43
  401. package/src/styles/less/neptune.css +33 -22
  402. package/src/tooltip/Tooltip.tsx +26 -45
  403. package/build/prompt/CriticalBanner/CriticalBanner.js +0 -143
  404. package/build/prompt/CriticalBanner/CriticalBanner.js.map +0 -1
  405. package/build/prompt/CriticalBanner/CriticalBanner.mjs +0 -141
  406. package/build/prompt/CriticalBanner/CriticalBanner.mjs.map +0 -1
  407. package/build/prompt/CriticalBanner/helpers.js +0 -29
  408. package/build/prompt/CriticalBanner/helpers.js.map +0 -1
  409. package/build/prompt/CriticalBanner/helpers.mjs +0 -26
  410. package/build/prompt/CriticalBanner/helpers.mjs.map +0 -1
  411. package/build/prompt/common/Expander/Expander.js +0 -47
  412. package/build/prompt/common/Expander/Expander.js.map +0 -1
  413. package/build/prompt/common/Expander/Expander.messages.js +0 -17
  414. package/build/prompt/common/Expander/Expander.messages.js.map +0 -1
  415. package/build/prompt/common/Expander/Expander.messages.mjs +0 -13
  416. package/build/prompt/common/Expander/Expander.messages.mjs.map +0 -1
  417. package/build/prompt/common/Expander/Expander.mjs +0 -44
  418. package/build/prompt/common/Expander/Expander.mjs.map +0 -1
  419. package/build/prompt/helpers/promptMedia.js +0 -52
  420. package/build/prompt/helpers/promptMedia.js.map +0 -1
  421. package/build/prompt/helpers/promptMedia.mjs +0 -50
  422. package/build/prompt/helpers/promptMedia.mjs.map +0 -1
  423. package/build/styles/prompt/CriticalBanner/CriticalBanner.css +0 -59
  424. package/build/styles/prompt/common/Expander/Expander.css +0 -8
  425. package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts +0 -33
  426. package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts.map +0 -1
  427. package/build/types/prompt/CriticalBanner/helpers.d.ts +0 -18
  428. package/build/types/prompt/CriticalBanner/helpers.d.ts.map +0 -1
  429. package/build/types/prompt/CriticalBanner/index.d.ts +0 -3
  430. package/build/types/prompt/CriticalBanner/index.d.ts.map +0 -1
  431. package/build/types/prompt/common/Expander/Expander.d.ts +0 -20
  432. package/build/types/prompt/common/Expander/Expander.d.ts.map +0 -1
  433. package/build/types/prompt/common/Expander/Expander.messages.d.ts +0 -14
  434. package/build/types/prompt/common/Expander/Expander.messages.d.ts.map +0 -1
  435. package/build/types/prompt/helpers/promptMedia.d.ts +0 -22
  436. package/build/types/prompt/helpers/promptMedia.d.ts.map +0 -1
  437. package/src/prompt/CriticalBanner/CriticalBanner.accessibility.docs.mdx +0 -113
  438. package/src/prompt/CriticalBanner/CriticalBanner.css +0 -59
  439. package/src/prompt/CriticalBanner/CriticalBanner.less +0 -64
  440. package/src/prompt/CriticalBanner/CriticalBanner.story.tsx +0 -632
  441. package/src/prompt/CriticalBanner/CriticalBanner.test.story.tsx +0 -285
  442. package/src/prompt/CriticalBanner/CriticalBanner.tsx +0 -182
  443. package/src/prompt/CriticalBanner/helpers.ts +0 -39
  444. package/src/prompt/CriticalBanner/index.ts +0 -2
  445. package/src/prompt/common/Expander/Expander.css +0 -8
  446. package/src/prompt/common/Expander/Expander.less +0 -9
  447. package/src/prompt/common/Expander/Expander.messages.ts +0 -14
  448. package/src/prompt/common/Expander/Expander.test.tsx +0 -167
  449. package/src/prompt/common/Expander/Expander.tsx +0 -83
  450. package/src/prompt/helpers/promptMedia.tsx +0 -79
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var react = require('@floating-ui/react');
5
6
  var clsx = require('clsx');
6
7
  var React = require('react');
7
- var reactPopper = require('react-popper');
8
8
  require('../theme.js');
9
9
  require('../direction.js');
10
10
  require('../propsValues/control.js');
@@ -24,6 +24,7 @@ require('../propsValues/variant.js');
24
24
  require('../propsValues/scroll.js');
25
25
  require('../propsValues/markdownNodeType.js');
26
26
  require('../fileType.js');
27
+ require('@transferwise/formatting');
27
28
  require('@transferwise/icons');
28
29
  require('react-intl');
29
30
  require('../closeButton/CloseButton.messages.js');
@@ -31,7 +32,7 @@ var jsxRuntime = require('react/jsx-runtime');
31
32
  var Dimmer = require('../../dimmer/Dimmer.js');
32
33
  var OverlayIdProvider = require('../../provider/overlay/OverlayIdProvider.js');
33
34
 
34
- const POPOVER_OFFSET = [0, 16];
35
+ const POPOVER_OFFSET = 16;
35
36
  // By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
36
37
  // the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.
37
38
  // This mapping forces popover to try the four available positions before going back to the initial chosen one.
@@ -54,60 +55,57 @@ const Panel = /*#__PURE__*/React.forwardRef(function Panel({
54
55
  considerHeight = false,
55
56
  ...rest
56
57
  }, reference) {
57
- const [arrowElement, setArrowElement] = React.useState(null);
58
- const [popperElement, setPopperElement] = React.useState(null);
59
- const modifiers = [];
58
+ const arrowRef = React.useRef(null);
59
+ const middleware = [];
60
+ if (arrow) {
61
+ middleware.push(react.offset(POPOVER_OFFSET));
62
+ }
63
+ if (flip && fallbackPlacements[position$1]) {
64
+ middleware.push(react.flip({
65
+ fallbackPlacements: fallbackPlacements[position$1]
66
+ }));
67
+ }
60
68
  if (altAxis) {
61
- modifiers.push({
62
- // https://popper.js.org/docs/v2/modifiers/prevent-overflow
63
- name: 'preventOverflow',
64
- options: {
65
- altAxis: true,
66
- tether: false
67
- }
68
- });
69
+ middleware.push(react.shift());
69
70
  }
70
71
  if (arrow) {
71
- modifiers.push({
72
- name: 'arrow',
73
- options: {
74
- element: arrowElement,
75
- options: {
76
- padding: 8 // 8px from the edges of the popper
77
- }
78
- }
79
- });
80
- // This lets you displace a popper element from its reference element.
81
- modifiers.push({
82
- name: 'offset',
83
- options: {
84
- offset: POPOVER_OFFSET
85
- }
86
- });
72
+ middleware.push(react.arrow({
73
+ element: arrowRef,
74
+ padding: 8
75
+ }));
87
76
  }
88
- if (flip && fallbackPlacements[position$1]) {
89
- modifiers.push({
90
- name: 'flip',
91
- options: {
92
- fallbackPlacements: fallbackPlacements[position$1]
77
+ if (considerHeight) {
78
+ middleware.push(react.size({
79
+ padding: POPOVER_OFFSET,
80
+ apply: ({
81
+ elements,
82
+ availableHeight
83
+ }) => {
84
+ elements.floating.style.setProperty('--np-panel-available-height', `${availableHeight}px`);
93
85
  }
94
- });
86
+ }));
95
87
  }
96
88
  const {
97
- styles,
98
- attributes,
99
- forceUpdate
100
- } = reactPopper.usePopper(anchorRef.current, popperElement, {
89
+ refs,
90
+ floatingStyles,
91
+ placement,
92
+ middlewareData
93
+ } = react.useFloating({
101
94
  placement: position$1,
102
- modifiers
95
+ middleware,
96
+ elements: {
97
+ reference: anchorRef.current
98
+ },
99
+ whileElementsMounted: open ? react.autoUpdate : undefined
103
100
  });
104
- // If the trigger is not visible when the position is calculated, it will be incorrect. Because this can happen repeatedly (on resize for example),
105
- // it is most simple just to always position before opening
106
- React.useEffect(() => {
107
- if (open && forceUpdate) {
108
- forceUpdate();
109
- }
110
- }, [open]);
101
+ const arrowStyle = {
102
+ ...(middlewareData.arrow?.x != null ? {
103
+ left: middlewareData.arrow.x
104
+ } : {}),
105
+ ...(middlewareData.arrow?.y != null ? {
106
+ top: middlewareData.arrow.y
107
+ } : {})
108
+ };
111
109
  const contentStyle = {
112
110
  ...(anchorWidth ? {
113
111
  width: anchorRef.current?.clientWidth
@@ -123,12 +121,10 @@ const Panel = /*#__PURE__*/React.forwardRef(function Panel({
123
121
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
124
122
  id: overlayId,
125
123
  ...rest,
126
- ref: setPopperElement,
124
+ ref: refs.setFloating,
127
125
  role: "dialog",
128
- style: {
129
- ...styles.popper
130
- },
131
- ...attributes.popper,
126
+ style: floatingStyles,
127
+ "data-popper-placement": placement,
132
128
  className: clsx.clsx('np-panel', {
133
129
  'np-panel--open': open
134
130
  }, rest.className),
@@ -137,9 +133,9 @@ const Panel = /*#__PURE__*/React.forwardRef(function Panel({
137
133
  style: contentStyle,
138
134
  className: clsx.clsx('np-panel__content'),
139
135
  children: [children, arrow && /*#__PURE__*/jsxRuntime.jsx("div", {
140
- ref: setArrowElement,
136
+ ref: arrowRef,
141
137
  className: clsx.clsx('np-panel__arrow'),
142
- style: styles.arrow
138
+ style: arrowStyle
143
139
  })]
144
140
  })
145
141
  })
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.js","sources":["../../../src/common/panel/Panel.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport {\n CSSProperties,\n HTMLAttributes,\n MutableRefObject,\n PropsWithChildren,\n SyntheticEvent,\n forwardRef,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { usePopper } from 'react-popper';\n\nimport { Position, PositionBottom, PositionLeft, PositionRight, PositionTop } from '..';\nimport Dimmer from '../../dimmer';\nimport { OverlayIdContext } from '../../provider/overlay/OverlayIdProvider';\n\nconst POPOVER_OFFSET = [0, 16];\n\n// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space\n// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.\n// This mapping forces popover to try the four available positions before going back to the initial chosen one.\nconst fallbackPlacements = {\n [Position.TOP]: [Position.BOTTOM, Position.RIGHT, Position.LEFT],\n [Position.BOTTOM]: [Position.TOP, Position.RIGHT, Position.LEFT],\n [Position.LEFT]: [Position.RIGHT, Position.TOP, Position.BOTTOM],\n [Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM],\n};\n\nexport type PanelProps = PropsWithChildren<{\n arrow?: boolean;\n flip?: boolean;\n altAxis?: boolean;\n open?: boolean;\n onClose?: (event: Event | SyntheticEvent) => void;\n position?: PositionBottom | PositionLeft | PositionRight | PositionTop;\n anchorRef: MutableRefObject<Element | null>;\n anchorWidth?: boolean;\n considerHeight?: boolean;\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nconst Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(\n {\n arrow = false,\n flip = true,\n altAxis = false,\n children,\n open = false,\n onClose,\n position = Position.BOTTOM,\n anchorRef,\n anchorWidth = false,\n considerHeight = false,\n ...rest\n }: PanelProps,\n reference,\n) {\n const [arrowElement, setArrowElement] = useState<HTMLDivElement | null>(null);\n const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);\n\n const modifiers = [];\n\n if (altAxis) {\n modifiers.push({\n // https://popper.js.org/docs/v2/modifiers/prevent-overflow\n name: 'preventOverflow',\n options: {\n altAxis: true,\n tether: false,\n },\n });\n }\n\n if (arrow) {\n modifiers.push({\n name: 'arrow',\n options: {\n element: arrowElement,\n options: {\n padding: 8, // 8px from the edges of the popper\n },\n },\n });\n // This lets you displace a popper element from its reference element.\n modifiers.push({ name: 'offset', options: { offset: POPOVER_OFFSET } });\n }\n if (flip && fallbackPlacements[position]) {\n modifiers.push({\n name: 'flip',\n options: {\n fallbackPlacements: fallbackPlacements[position],\n },\n });\n }\n\n const { styles, attributes, forceUpdate } = usePopper(anchorRef.current, popperElement, {\n placement: position,\n modifiers,\n });\n\n // If the trigger is not visible when the position is calculated, it will be incorrect. Because this can happen repeatedly (on resize for example),\n // it is most simple just to always position before opening\n useEffect(() => {\n if (open && forceUpdate) {\n forceUpdate();\n }\n }, [open]);\n\n const contentStyle: CSSProperties = {\n ...(anchorWidth ? { width: anchorRef.current?.clientWidth } : undefined),\n };\n\n const overlayId = useContext(OverlayIdContext);\n\n return (\n <Dimmer open={open} transparent fadeContentOnEnter fadeContentOnExit onClose={onClose}>\n <div\n id={overlayId}\n {...rest}\n ref={setPopperElement}\n role=\"dialog\"\n style={{ ...styles.popper }}\n {...attributes.popper}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>\n {children}\n {/* Arrow has to stay inside content to get the same animations as the \"dialog\" and to get hidden when panel is closed. */}\n {arrow && (\n <div ref={setArrowElement} className={clsx('np-panel__arrow')} style={styles.arrow} />\n )}\n </div>\n </div>\n </Dimmer>\n );\n});\n\nexport default Panel;\n"],"names":["POPOVER_OFFSET","fallbackPlacements","Position","TOP","BOTTOM","RIGHT","LEFT","Panel","forwardRef","arrow","flip","altAxis","children","open","onClose","position","anchorRef","anchorWidth","considerHeight","rest","reference","arrowElement","setArrowElement","useState","popperElement","setPopperElement","modifiers","push","name","options","tether","element","padding","offset","styles","attributes","forceUpdate","usePopper","current","placement","useEffect","contentStyle","width","clientWidth","undefined","overlayId","useContext","OverlayIdContext","_jsx","Dimmer","transparent","fadeContentOnEnter","fadeContentOnExit","id","ref","role","style","popper","className","clsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAMA,cAAc,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;AAE9B;AACA;AACA;AACA,MAAMC,kBAAkB,GAAG;AACzB,EAAA,CAACC,iBAAQ,CAACC,GAAG,GAAG,CAACD,iBAAQ,CAACE,MAAM,EAAEF,iBAAQ,CAACG,KAAK,EAAEH,iBAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,iBAAQ,CAACE,MAAM,GAAG,CAACF,iBAAQ,CAACC,GAAG,EAAED,iBAAQ,CAACG,KAAK,EAAEH,iBAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,iBAAQ,CAACI,IAAI,GAAG,CAACJ,iBAAQ,CAACG,KAAK,EAAEH,iBAAQ,CAACC,GAAG,EAAED,iBAAQ,CAACE,MAAM,CAAC;AAChE,EAAA,CAACF,iBAAQ,CAACG,KAAK,GAAG,CAACH,iBAAQ,CAACI,IAAI,EAAEJ,iBAAQ,CAACC,GAAG,EAAED,iBAAQ,CAACE,MAAM;CAChE;AAeD,MAAMG,KAAK,gBAAGC,gBAAU,CAA6B,SAASD,KAAKA,CACjE;AACEE,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,IAAI,GAAG,IAAI;AACXC,EAAAA,OAAO,GAAG,KAAK;EACfC,QAAQ;AACRC,EAAAA,IAAI,GAAG,KAAK;EACZC,OAAO;YACPC,UAAQ,GAAGb,iBAAQ,CAACE,MAAM;EAC1BY,SAAS;AACTC,EAAAA,WAAW,GAAG,KAAK;AACnBC,EAAAA,cAAc,GAAG,KAAK;EACtB,GAAGC;AAAI,CACI,EACbC,SAAS,EAAA;EAET,MAAM,CAACC,YAAY,EAAEC,eAAe,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AA,SAAS,EAAEC,SAAI,CAAC,iBAAiB,CAAE;UAACH,KAAK,EAAEtB,MAAM,CAACzB;AAAM,SAAA,CACpF;OACE;KACF;AACP,GAAQ,CAAC;AAEb,CAAC;;;;"}
1
+ {"version":3,"file":"Panel.js","sources":["../../../src/common/panel/Panel.tsx"],"sourcesContent":["import {\n arrow as arrowMiddleware,\n autoUpdate,\n flip as flipMiddleware,\n offset,\n type Placement,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/react';\nimport { clsx } from 'clsx';\nimport {\n CSSProperties,\n HTMLAttributes,\n MutableRefObject,\n PropsWithChildren,\n SyntheticEvent,\n forwardRef,\n useContext,\n useRef,\n} from 'react';\n\nimport { Position, PositionBottom, PositionLeft, PositionRight, PositionTop } from '..';\nimport Dimmer from '../../dimmer';\nimport { OverlayIdContext } from '../../provider/overlay/OverlayIdProvider';\n\nconst POPOVER_OFFSET = 16;\n\n// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space\n// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.\n// This mapping forces popover to try the four available positions before going back to the initial chosen one.\nconst fallbackPlacements: Record<string, Placement[]> = {\n [Position.TOP]: [Position.BOTTOM, Position.RIGHT, Position.LEFT],\n [Position.BOTTOM]: [Position.TOP, Position.RIGHT, Position.LEFT],\n [Position.LEFT]: [Position.RIGHT, Position.TOP, Position.BOTTOM],\n [Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM],\n};\n\nexport type PanelProps = PropsWithChildren<{\n arrow?: boolean;\n flip?: boolean;\n altAxis?: boolean;\n open?: boolean;\n onClose?: (event: Event | SyntheticEvent) => void;\n position?: PositionBottom | PositionLeft | PositionRight | PositionTop;\n anchorRef: MutableRefObject<Element | null>;\n anchorWidth?: boolean;\n considerHeight?: boolean;\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nconst Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(\n {\n arrow = false,\n flip = true,\n altAxis = false,\n children,\n open = false,\n onClose,\n position = Position.BOTTOM,\n anchorRef,\n anchorWidth = false,\n considerHeight = false,\n ...rest\n }: PanelProps,\n reference,\n) {\n const arrowRef = useRef<HTMLDivElement | null>(null);\n\n const middleware = [];\n\n if (arrow) {\n middleware.push(offset(POPOVER_OFFSET));\n }\n\n if (flip && fallbackPlacements[position]) {\n middleware.push(\n flipMiddleware({\n fallbackPlacements: fallbackPlacements[position],\n }),\n );\n }\n\n if (altAxis) {\n middleware.push(shift());\n }\n\n if (arrow) {\n middleware.push(arrowMiddleware({ element: arrowRef, padding: 8 }));\n }\n\n if (considerHeight) {\n middleware.push(\n sizeMiddleware({\n padding: POPOVER_OFFSET,\n apply: ({ elements, availableHeight }) => {\n elements.floating.style.setProperty(\n '--np-panel-available-height',\n `${availableHeight}px`,\n );\n },\n }),\n );\n }\n\n const { refs, floatingStyles, placement, middlewareData } = useFloating({\n placement: position,\n middleware,\n elements: {\n reference: anchorRef.current,\n },\n whileElementsMounted: open ? autoUpdate : undefined,\n });\n\n const arrowStyle: CSSProperties = {\n ...(middlewareData.arrow?.x != null ? { left: middlewareData.arrow.x } : {}),\n ...(middlewareData.arrow?.y != null ? { top: middlewareData.arrow.y } : {}),\n };\n\n const contentStyle: CSSProperties = {\n ...(anchorWidth ? { width: anchorRef.current?.clientWidth } : undefined),\n };\n\n const overlayId = useContext(OverlayIdContext);\n\n return (\n <Dimmer open={open} transparent fadeContentOnEnter fadeContentOnExit onClose={onClose}>\n <div\n id={overlayId}\n {...rest}\n ref={refs.setFloating}\n role=\"dialog\"\n style={floatingStyles}\n data-popper-placement={placement}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>\n {children}\n {/* Arrow has to stay inside content to get the same animations as the \"dialog\" and to get hidden when panel is closed. */}\n {arrow && <div ref={arrowRef} className={clsx('np-panel__arrow')} style={arrowStyle} />}\n </div>\n </div>\n </Dimmer>\n );\n});\n\nexport default Panel;\n"],"names":["POPOVER_OFFSET","fallbackPlacements","Position","TOP","BOTTOM","RIGHT","LEFT","Panel","forwardRef","arrow","flip","altAxis","children","open","onClose","position","anchorRef","anchorWidth","considerHeight","rest","reference","arrowRef","useRef","middleware","push","offset","flipMiddleware","shift","arrowMiddleware","element","padding","sizeMiddleware","apply","elements","availableHeight","floating","style","setProperty","refs","floatingStyles","placement","middlewareData","useFloating","current","whileElementsMounted","autoUpdate","undefined","arrowStyle","x","left","y","top","contentStyle","width","clientWidth","overlayId","useContext","OverlayIdContext","_jsx","Dimmer","transparent","fadeContentOnEnter","fadeContentOnExit","id","ref","setFloating","role","className","clsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,cAAc,GAAG,EAAE;AAEzB;AACA;AACA;AACA,MAAMC,kBAAkB,GAAgC;AACtD,EAAA,CAACC,iBAAQ,CAACC,GAAG,GAAG,CAACD,iBAAQ,CAACE,MAAM,EAAEF,iBAAQ,CAACG,KAAK,EAAEH,iBAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,iBAAQ,CAACE,MAAM,GAAG,CAACF,iBAAQ,CAACC,GAAG,EAAED,iBAAQ,CAACG,KAAK,EAAEH,iBAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,iBAAQ,CAACI,IAAI,GAAG,CAACJ,iBAAQ,CAACG,KAAK,EAAEH,iBAAQ,CAACC,GAAG,EAAED,iBAAQ,CAACE,MAAM,CAAC;AAChE,EAAA,CAACF,iBAAQ,CAACG,KAAK,GAAG,CAACH,iBAAQ,CAACI,IAAI,EAAEJ,iBAAQ,CAACC,GAAG,EAAED,iBAAQ,CAACE,MAAM;CAChE;AAeD,MAAMG,KAAK,gBAAGC,gBAAU,CAA6B,SAASD,KAAKA,CACjE;AACEE,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,IAAI,GAAG,IAAI;AACXC,EAAAA,OAAO,GAAG,KAAK;EACfC,QAAQ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KAAK,EAAEG,cAAe;AACtB,MAAA,uBAAA,EAAuBC,SAAU;AACjC2B,MAAAA,SAAS,EAAEC,SAAI,CAAC,UAAU,EAAE;AAAE,QAAA,gBAAgB,EAAEvD;AAAI,OAAE,EAAEM,IAAI,CAACgD,SAAS,CAAE;AAAAvD,MAAAA,QAAA,eAExEyD,eAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,GAAG,EAAE5C,SAAU;AAACgB,QAAAA,KAAK,EAAEgB,YAAa;AAACe,QAAAA,SAAS,EAAEC,SAAI,CAAC,mBAAmB,CAAE;AAAAxD,QAAAA,QAAA,EAAA,CAC5EA,QAAQ,EAERH,KAAK,iBAAIiD,cAAA,CAAA,KAAA,EAAA;AAAKM,UAAAA,GAAG,EAAE3C,QAAS;AAAC8C,UAAAA,SAAS,EAAEC,SAAI,CAAC,iBAAiB,CAAE;AAAChC,UAAAA,KAAK,EAAEW;AAAW,SAAA,CAAG;OACpF;KACF;AACP,GAAQ,CAAC;AAEb,CAAC;;;;"}
@@ -1,6 +1,6 @@
1
+ import { offset, flip, shift, arrow, size, useFloating, autoUpdate } from '@floating-ui/react';
1
2
  import { clsx } from 'clsx';
2
- import { forwardRef, useState, useEffect, useContext } from 'react';
3
- import { usePopper } from 'react-popper';
3
+ import { forwardRef, useRef, useContext } from 'react';
4
4
  import '../theme.mjs';
5
5
  import '../direction.mjs';
6
6
  import '../propsValues/control.mjs';
@@ -20,6 +20,7 @@ import '../propsValues/variant.mjs';
20
20
  import '../propsValues/scroll.mjs';
21
21
  import '../propsValues/markdownNodeType.mjs';
22
22
  import '../fileType.mjs';
23
+ import '@transferwise/formatting';
23
24
  import '@transferwise/icons';
24
25
  import 'react-intl';
25
26
  import '../closeButton/CloseButton.messages.mjs';
@@ -27,7 +28,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
27
28
  import Dimmer from '../../dimmer/Dimmer.mjs';
28
29
  import { OverlayIdContext } from '../../provider/overlay/OverlayIdProvider.mjs';
29
30
 
30
- const POPOVER_OFFSET = [0, 16];
31
+ const POPOVER_OFFSET = 16;
31
32
  // By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
32
33
  // the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.
33
34
  // This mapping forces popover to try the four available positions before going back to the initial chosen one.
@@ -38,8 +39,8 @@ const fallbackPlacements = {
38
39
  [Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM]
39
40
  };
40
41
  const Panel = /*#__PURE__*/forwardRef(function Panel({
41
- arrow = false,
42
- flip = true,
42
+ arrow: arrow$1 = false,
43
+ flip: flip$1 = true,
43
44
  altAxis = false,
44
45
  children,
45
46
  open = false,
@@ -50,60 +51,57 @@ const Panel = /*#__PURE__*/forwardRef(function Panel({
50
51
  considerHeight = false,
51
52
  ...rest
52
53
  }, reference) {
53
- const [arrowElement, setArrowElement] = useState(null);
54
- const [popperElement, setPopperElement] = useState(null);
55
- const modifiers = [];
54
+ const arrowRef = useRef(null);
55
+ const middleware = [];
56
+ if (arrow$1) {
57
+ middleware.push(offset(POPOVER_OFFSET));
58
+ }
59
+ if (flip$1 && fallbackPlacements[position]) {
60
+ middleware.push(flip({
61
+ fallbackPlacements: fallbackPlacements[position]
62
+ }));
63
+ }
56
64
  if (altAxis) {
57
- modifiers.push({
58
- // https://popper.js.org/docs/v2/modifiers/prevent-overflow
59
- name: 'preventOverflow',
60
- options: {
61
- altAxis: true,
62
- tether: false
63
- }
64
- });
65
+ middleware.push(shift());
65
66
  }
66
- if (arrow) {
67
- modifiers.push({
68
- name: 'arrow',
69
- options: {
70
- element: arrowElement,
71
- options: {
72
- padding: 8 // 8px from the edges of the popper
73
- }
74
- }
75
- });
76
- // This lets you displace a popper element from its reference element.
77
- modifiers.push({
78
- name: 'offset',
79
- options: {
80
- offset: POPOVER_OFFSET
81
- }
82
- });
67
+ if (arrow$1) {
68
+ middleware.push(arrow({
69
+ element: arrowRef,
70
+ padding: 8
71
+ }));
83
72
  }
84
- if (flip && fallbackPlacements[position]) {
85
- modifiers.push({
86
- name: 'flip',
87
- options: {
88
- fallbackPlacements: fallbackPlacements[position]
73
+ if (considerHeight) {
74
+ middleware.push(size({
75
+ padding: POPOVER_OFFSET,
76
+ apply: ({
77
+ elements,
78
+ availableHeight
79
+ }) => {
80
+ elements.floating.style.setProperty('--np-panel-available-height', `${availableHeight}px`);
89
81
  }
90
- });
82
+ }));
91
83
  }
92
84
  const {
93
- styles,
94
- attributes,
95
- forceUpdate
96
- } = usePopper(anchorRef.current, popperElement, {
85
+ refs,
86
+ floatingStyles,
87
+ placement,
88
+ middlewareData
89
+ } = useFloating({
97
90
  placement: position,
98
- modifiers
91
+ middleware,
92
+ elements: {
93
+ reference: anchorRef.current
94
+ },
95
+ whileElementsMounted: open ? autoUpdate : undefined
99
96
  });
100
- // If the trigger is not visible when the position is calculated, it will be incorrect. Because this can happen repeatedly (on resize for example),
101
- // it is most simple just to always position before opening
102
- useEffect(() => {
103
- if (open && forceUpdate) {
104
- forceUpdate();
105
- }
106
- }, [open]);
97
+ const arrowStyle = {
98
+ ...(middlewareData.arrow?.x != null ? {
99
+ left: middlewareData.arrow.x
100
+ } : {}),
101
+ ...(middlewareData.arrow?.y != null ? {
102
+ top: middlewareData.arrow.y
103
+ } : {})
104
+ };
107
105
  const contentStyle = {
108
106
  ...(anchorWidth ? {
109
107
  width: anchorRef.current?.clientWidth
@@ -119,12 +117,10 @@ const Panel = /*#__PURE__*/forwardRef(function Panel({
119
117
  children: /*#__PURE__*/jsx("div", {
120
118
  id: overlayId,
121
119
  ...rest,
122
- ref: setPopperElement,
120
+ ref: refs.setFloating,
123
121
  role: "dialog",
124
- style: {
125
- ...styles.popper
126
- },
127
- ...attributes.popper,
122
+ style: floatingStyles,
123
+ "data-popper-placement": placement,
128
124
  className: clsx('np-panel', {
129
125
  'np-panel--open': open
130
126
  }, rest.className),
@@ -132,10 +128,10 @@ const Panel = /*#__PURE__*/forwardRef(function Panel({
132
128
  ref: reference,
133
129
  style: contentStyle,
134
130
  className: clsx('np-panel__content'),
135
- children: [children, arrow && /*#__PURE__*/jsx("div", {
136
- ref: setArrowElement,
131
+ children: [children, arrow$1 && /*#__PURE__*/jsx("div", {
132
+ ref: arrowRef,
137
133
  className: clsx('np-panel__arrow'),
138
- style: styles.arrow
134
+ style: arrowStyle
139
135
  })]
140
136
  })
141
137
  })
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.mjs","sources":["../../../src/common/panel/Panel.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport {\n CSSProperties,\n HTMLAttributes,\n MutableRefObject,\n PropsWithChildren,\n SyntheticEvent,\n forwardRef,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { usePopper } from 'react-popper';\n\nimport { Position, PositionBottom, PositionLeft, PositionRight, PositionTop } from '..';\nimport Dimmer from '../../dimmer';\nimport { OverlayIdContext } from '../../provider/overlay/OverlayIdProvider';\n\nconst POPOVER_OFFSET = [0, 16];\n\n// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space\n// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.\n// This mapping forces popover to try the four available positions before going back to the initial chosen one.\nconst fallbackPlacements = {\n [Position.TOP]: [Position.BOTTOM, Position.RIGHT, Position.LEFT],\n [Position.BOTTOM]: [Position.TOP, Position.RIGHT, Position.LEFT],\n [Position.LEFT]: [Position.RIGHT, Position.TOP, Position.BOTTOM],\n [Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM],\n};\n\nexport type PanelProps = PropsWithChildren<{\n arrow?: boolean;\n flip?: boolean;\n altAxis?: boolean;\n open?: boolean;\n onClose?: (event: Event | SyntheticEvent) => void;\n position?: PositionBottom | PositionLeft | PositionRight | PositionTop;\n anchorRef: MutableRefObject<Element | null>;\n anchorWidth?: boolean;\n considerHeight?: boolean;\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nconst Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(\n {\n arrow = false,\n flip = true,\n altAxis = false,\n children,\n open = false,\n onClose,\n position = Position.BOTTOM,\n anchorRef,\n anchorWidth = false,\n considerHeight = false,\n ...rest\n }: PanelProps,\n reference,\n) {\n const [arrowElement, setArrowElement] = useState<HTMLDivElement | null>(null);\n const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);\n\n const modifiers = [];\n\n if (altAxis) {\n modifiers.push({\n // https://popper.js.org/docs/v2/modifiers/prevent-overflow\n name: 'preventOverflow',\n options: {\n altAxis: true,\n tether: false,\n },\n });\n }\n\n if (arrow) {\n modifiers.push({\n name: 'arrow',\n options: {\n element: arrowElement,\n options: {\n padding: 8, // 8px from the edges of the popper\n },\n },\n });\n // This lets you displace a popper element from its reference element.\n modifiers.push({ name: 'offset', options: { offset: POPOVER_OFFSET } });\n }\n if (flip && fallbackPlacements[position]) {\n modifiers.push({\n name: 'flip',\n options: {\n fallbackPlacements: fallbackPlacements[position],\n },\n });\n }\n\n const { styles, attributes, forceUpdate } = usePopper(anchorRef.current, popperElement, {\n placement: position,\n modifiers,\n });\n\n // If the trigger is not visible when the position is calculated, it will be incorrect. Because this can happen repeatedly (on resize for example),\n // it is most simple just to always position before opening\n useEffect(() => {\n if (open && forceUpdate) {\n forceUpdate();\n }\n }, [open]);\n\n const contentStyle: CSSProperties = {\n ...(anchorWidth ? { width: anchorRef.current?.clientWidth } : undefined),\n };\n\n const overlayId = useContext(OverlayIdContext);\n\n return (\n <Dimmer open={open} transparent fadeContentOnEnter fadeContentOnExit onClose={onClose}>\n <div\n id={overlayId}\n {...rest}\n ref={setPopperElement}\n role=\"dialog\"\n style={{ ...styles.popper }}\n {...attributes.popper}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>\n {children}\n {/* Arrow has to stay inside content to get the same animations as the \"dialog\" and to get hidden when panel is closed. */}\n {arrow && (\n <div ref={setArrowElement} className={clsx('np-panel__arrow')} style={styles.arrow} />\n )}\n </div>\n </div>\n </Dimmer>\n );\n});\n\nexport default Panel;\n"],"names":["POPOVER_OFFSET","fallbackPlacements","Position","TOP","BOTTOM","RIGHT","LEFT","Panel","forwardRef","arrow","flip","altAxis","children","open","onClose","position","anchorRef","anchorWidth","considerHeight","rest","reference","arrowElement","setArrowElement","useState","popperElement","setPopperElement","modifiers","push","name","options","tether","element","padding","offset","styles","attributes","forceUpdate","usePopper","current","placement","useEffect","contentStyle","width","clientWidth","undefined","overlayId","useContext","OverlayIdContext","_jsx","Dimmer","transparent","fadeContentOnEnter","fadeContentOnExit","id","ref","role","style","popper","className","clsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAMA,cAAc,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;AAE9B;AACA;AACA;AACA,MAAMC,kBAAkB,GAAG;AACzB,EAAA,CAACC,QAAQ,CAACC,GAAG,GAAG,CAACD,QAAQ,CAACE,MAAM,EAAEF,QAAQ,CAACG,KAAK,EAAEH,QAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,QAAQ,CAACE,MAAM,GAAG,CAACF,QAAQ,CAACC,GAAG,EAAED,QAAQ,CAACG,KAAK,EAAEH,QAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,QAAQ,CAACI,IAAI,GAAG,CAACJ,QAAQ,CAACG,KAAK,EAAEH,QAAQ,CAACC,GAAG,EAAED,QAAQ,CAACE,MAAM,CAAC;AAChE,EAAA,CAACF,QAAQ,CAACG,KAAK,GAAG,CAACH,QAAQ,CAACI,IAAI,EAAEJ,QAAQ,CAACC,GAAG,EAAED,QAAQ,CAACE,MAAM;CAChE;AAeD,MAAMG,KAAK,gBAAGC,UAAU,CAA6B,SAASD,KAAKA,CACjE;AACEE,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,IAAI,GAAG,IAAI;AACXC,EAAAA,OAAO,GAAG,KAAK;EACfC,QAAQ;AACRC,EAAAA,IAAI,GAAG,KAAK;EACZC,OAAO;EACPC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AAACiB,QAAAA,SAAS,EAAEC,IAAI,CAAC,mBAAmB,CAAE;AAAA/C,QAAAA,QAAA,EAAA,CAC5EA,QAAQ,EAERH,KAAK,iBACJuC,GAAA,CAAA,KAAA,EAAA;AAAKM,UAAAA,GAAG,EAAEhC,eAAgB;AAACoC,UAAAA,SAAS,EAAEC,IAAI,CAAC,iBAAiB,CAAE;UAACH,KAAK,EAAEtB,MAAM,CAACzB;AAAM,SAAA,CACpF;OACE;KACF;AACP,GAAQ,CAAC;AAEb,CAAC;;;;"}
1
+ {"version":3,"file":"Panel.mjs","sources":["../../../src/common/panel/Panel.tsx"],"sourcesContent":["import {\n arrow as arrowMiddleware,\n autoUpdate,\n flip as flipMiddleware,\n offset,\n type Placement,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/react';\nimport { clsx } from 'clsx';\nimport {\n CSSProperties,\n HTMLAttributes,\n MutableRefObject,\n PropsWithChildren,\n SyntheticEvent,\n forwardRef,\n useContext,\n useRef,\n} from 'react';\n\nimport { Position, PositionBottom, PositionLeft, PositionRight, PositionTop } from '..';\nimport Dimmer from '../../dimmer';\nimport { OverlayIdContext } from '../../provider/overlay/OverlayIdProvider';\n\nconst POPOVER_OFFSET = 16;\n\n// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space\n// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.\n// This mapping forces popover to try the four available positions before going back to the initial chosen one.\nconst fallbackPlacements: Record<string, Placement[]> = {\n [Position.TOP]: [Position.BOTTOM, Position.RIGHT, Position.LEFT],\n [Position.BOTTOM]: [Position.TOP, Position.RIGHT, Position.LEFT],\n [Position.LEFT]: [Position.RIGHT, Position.TOP, Position.BOTTOM],\n [Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM],\n};\n\nexport type PanelProps = PropsWithChildren<{\n arrow?: boolean;\n flip?: boolean;\n altAxis?: boolean;\n open?: boolean;\n onClose?: (event: Event | SyntheticEvent) => void;\n position?: PositionBottom | PositionLeft | PositionRight | PositionTop;\n anchorRef: MutableRefObject<Element | null>;\n anchorWidth?: boolean;\n considerHeight?: boolean;\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nconst Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(\n {\n arrow = false,\n flip = true,\n altAxis = false,\n children,\n open = false,\n onClose,\n position = Position.BOTTOM,\n anchorRef,\n anchorWidth = false,\n considerHeight = false,\n ...rest\n }: PanelProps,\n reference,\n) {\n const arrowRef = useRef<HTMLDivElement | null>(null);\n\n const middleware = [];\n\n if (arrow) {\n middleware.push(offset(POPOVER_OFFSET));\n }\n\n if (flip && fallbackPlacements[position]) {\n middleware.push(\n flipMiddleware({\n fallbackPlacements: fallbackPlacements[position],\n }),\n );\n }\n\n if (altAxis) {\n middleware.push(shift());\n }\n\n if (arrow) {\n middleware.push(arrowMiddleware({ element: arrowRef, padding: 8 }));\n }\n\n if (considerHeight) {\n middleware.push(\n sizeMiddleware({\n padding: POPOVER_OFFSET,\n apply: ({ elements, availableHeight }) => {\n elements.floating.style.setProperty(\n '--np-panel-available-height',\n `${availableHeight}px`,\n );\n },\n }),\n );\n }\n\n const { refs, floatingStyles, placement, middlewareData } = useFloating({\n placement: position,\n middleware,\n elements: {\n reference: anchorRef.current,\n },\n whileElementsMounted: open ? autoUpdate : undefined,\n });\n\n const arrowStyle: CSSProperties = {\n ...(middlewareData.arrow?.x != null ? { left: middlewareData.arrow.x } : {}),\n ...(middlewareData.arrow?.y != null ? { top: middlewareData.arrow.y } : {}),\n };\n\n const contentStyle: CSSProperties = {\n ...(anchorWidth ? { width: anchorRef.current?.clientWidth } : undefined),\n };\n\n const overlayId = useContext(OverlayIdContext);\n\n return (\n <Dimmer open={open} transparent fadeContentOnEnter fadeContentOnExit onClose={onClose}>\n <div\n id={overlayId}\n {...rest}\n ref={refs.setFloating}\n role=\"dialog\"\n style={floatingStyles}\n data-popper-placement={placement}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>\n {children}\n {/* Arrow has to stay inside content to get the same animations as the \"dialog\" and to get hidden when panel is closed. */}\n {arrow && <div ref={arrowRef} className={clsx('np-panel__arrow')} style={arrowStyle} />}\n </div>\n </div>\n </Dimmer>\n );\n});\n\nexport default Panel;\n"],"names":["POPOVER_OFFSET","fallbackPlacements","Position","TOP","BOTTOM","RIGHT","LEFT","Panel","forwardRef","arrow","flip","altAxis","children","open","onClose","position","anchorRef","anchorWidth","considerHeight","rest","reference","arrowRef","useRef","middleware","push","offset","flipMiddleware","shift","arrowMiddleware","element","padding","sizeMiddleware","apply","elements","availableHeight","floating","style","setProperty","refs","floatingStyles","placement","middlewareData","useFloating","current","whileElementsMounted","autoUpdate","undefined","arrowStyle","x","left","y","top","contentStyle","width","clientWidth","overlayId","useContext","OverlayIdContext","_jsx","Dimmer","transparent","fadeContentOnEnter","fadeContentOnExit","id","ref","setFloating","role","className","clsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,cAAc,GAAG,EAAE;AAEzB;AACA;AACA;AACA,MAAMC,kBAAkB,GAAgC;AACtD,EAAA,CAACC,QAAQ,CAACC,GAAG,GAAG,CAACD,QAAQ,CAACE,MAAM,EAAEF,QAAQ,CAACG,KAAK,EAAEH,QAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,QAAQ,CAACE,MAAM,GAAG,CAACF,QAAQ,CAACC,GAAG,EAAED,QAAQ,CAACG,KAAK,EAAEH,QAAQ,CAACI,IAAI,CAAC;AAChE,EAAA,CAACJ,QAAQ,CAACI,IAAI,GAAG,CAACJ,QAAQ,CAACG,KAAK,EAAEH,QAAQ,CAACC,GAAG,EAAED,QAAQ,CAACE,MAAM,CAAC;AAChE,EAAA,CAACF,QAAQ,CAACG,KAAK,GAAG,CAACH,QAAQ,CAACI,IAAI,EAAEJ,QAAQ,CAACC,GAAG,EAAED,QAAQ,CAACE,MAAM;CAChE;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A,KAAA,EAAA;AACEK,MAAAA,EAAE,EAAER,SAAU;AAAA,MAAA,GACVpC,IAAI;MACR6C,GAAG,EAAE1B,IAAI,CAAC2B,WAAY;AACtBC,MAAAA,IAAI,EAAC,QAAQ;AACb9B,MAAAA,KAAK,EAAEG,cAAe;AACtB,MAAA,uBAAA,EAAuBC,SAAU;AACjC2B,MAAAA,SAAS,EAAEC,IAAI,CAAC,UAAU,EAAE;AAAE,QAAA,gBAAgB,EAAEvD;AAAI,OAAE,EAAEM,IAAI,CAACgD,SAAS,CAAE;AAAAvD,MAAAA,QAAA,eAExEyD,IAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,GAAG,EAAE5C,SAAU;AAACgB,QAAAA,KAAK,EAAEgB,YAAa;AAACe,QAAAA,SAAS,EAAEC,IAAI,CAAC,mBAAmB,CAAE;AAAAxD,QAAAA,QAAA,EAAA,CAC5EA,QAAQ,EAERH,OAAK,iBAAIiD,GAAA,CAAA,KAAA,EAAA;AAAKM,UAAAA,GAAG,EAAE3C,QAAS;AAAC8C,UAAAA,SAAS,EAAEC,IAAI,CAAC,iBAAiB,CAAE;AAAChC,UAAAA,KAAK,EAAEW;AAAW,SAAA,CAAG;OACpF;KACF;AACP,GAAQ,CAAC;AAEb,CAAC;;;;"}
@@ -23,6 +23,7 @@ require('../propsValues/variant.js');
23
23
  require('../propsValues/scroll.js');
24
24
  require('../propsValues/markdownNodeType.js');
25
25
  require('../fileType.js');
26
+ require('@transferwise/formatting');
26
27
  require('@transferwise/icons');
27
28
  require('clsx');
28
29
  require('react-intl');
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsivePanel.js","sources":["../../../src/common/responsivePanel/ResponsivePanel.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport { Position } from '..';\nimport BottomSheet from '../bottomSheet';\nimport { useLayout } from '../hooks';\nimport Panel, { type PanelProps } from '../panel';\nimport { isServerSide } from '../domHelpers';\n\nconst ResponsivePanel = forwardRef<HTMLDivElement, PanelProps>(function ResponsivePanel(\n {\n anchorRef,\n arrow = false,\n flip = true,\n children,\n className = undefined,\n onClose,\n open = false,\n position = Position.BOTTOM,\n anchorWidth = false,\n 'aria-label': ariaLabel,\n considerHeight = false,\n 'aria-labelledby': ariaLabelledBy,\n }: PanelProps,\n reference,\n) {\n const { isMobile } = useLayout();\n const SHORT_SCREEN = 500;\n const isShortViewport = considerHeight && !isServerSide() && window.innerHeight < SHORT_SCREEN;\n\n if (isMobile || isShortViewport) {\n return (\n <BottomSheet\n key=\"bottomSheet\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n open={open}\n className={className}\n onClose={onClose}\n >\n {children}\n </BottomSheet>\n );\n }\n return (\n <Panel\n key=\"panel\"\n ref={reference}\n flip={flip}\n arrow={arrow}\n open={open}\n position={position}\n anchorWidth={anchorWidth}\n anchorRef={anchorRef}\n aria-label={ariaLabel}\n considerHeight={considerHeight}\n aria-labelledby={ariaLabelledBy}\n className={className}\n onClose={onClose}\n >\n {children}\n </Panel>\n );\n});\n\nexport default ResponsivePanel;\n"],"names":["ResponsivePanel","forwardRef","anchorRef","arrow","flip","children","className","undefined","onClose","open","position","Position","BOTTOM","anchorWidth","ariaLabel","considerHeight","ariaLabelledBy","reference","isMobile","useLayout","SHORT_SCREEN","isShortViewport","isServerSide","window","innerHeight","_jsx","BottomSheet","Panel","ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAMA,eAAe,gBAAGC,gBAAU,CAA6B,SAASD,eAAeA,CACrF;EACEE,SAAS;AACTC,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,IAAI,GAAG,IAAI;EACXC,QAAQ;AACRC,EAAAA,SAAS,GAAGC,SAAS;EACrBC,OAAO;AACPC,EAAAA,IAAI,GAAG,KAAK;YACZC,UAAQ,GAAGC,iBAAQ,CAACC,MAAM;AAC1BC,EAAAA,WAAW,GAAG,KAAK;AACnB,EAAA,YAAY,EAAEC,SAAS;AACvBC,EAAAA,cAAc,GAAG,KAAK;AACtB,EAAA,iBAAiB,EAAEC;AAAc,CACtB,EACbC,SAAS,EAAA;EAET,MAAM;AAAEC,IAAAA;GAAU,GAAGC,mBAAS,EAAE;EAChC,MAAMC,YAAY,GAAG,GAAG;AACxB,EAAA,MAAMC,eAAe,GAAGN,cAAc,IAAI,CAACO,6BAAY,EAAE,IAAIC,MAAM,CAACC,WAAW,GAAGJ,YAAY;EAE9F,IAAIF,QAAQ,IAAIG,eAAe,EAAE;IAC/B,oBACEI,cAAA,CAACC,mBAAW,EAAA;AAEV,MAAA,YAAA,EAAYZ,SAAU;AACtB,MAAA,iBAAA,EAAiBE,cAAe;AAChCP,MAAAA,IAAI,EAAEA,IAAK;AACXH,MAAAA,SAAS,EAAEA,SAAU;AACrBE,MAAAA,OAAO,EAAEA,OAAQ;AAAAH,MAAAA,QAAA,EAEhBA;AAAQ,KAAA,EAPL,aAQO,CAAC;AAElB,EAAA;EACA,oBACEoB,cAAA,CAACE,aAAK,EAAA;AAEJC,IAAAA,GAAG,EAAEX,SAAU;AACfb,IAAAA,IAAI,EAAEA,IAAK;AACXD,IAAAA,KAAK,EAAEA,KAAM;AACbM,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,QAAQ,EAAEA,UAAS;AACnBG,IAAAA,WAAW,EAAEA,WAAY;AACzBX,IAAAA,SAAS,EAAEA,SAAU;AACrB,IAAA,YAAA,EAAYY,SAAU;AACtBC,IAAAA,cAAc,EAAEA,cAAe;AAC/B,IAAA,iBAAA,EAAiBC,cAAe;AAChCV,IAAAA,SAAS,EAAEA,SAAU;AACrBE,IAAAA,OAAO,EAAEA,OAAQ;AAAAH,IAAAA,QAAA,EAEhBA;AAAQ,GAAA,EAdL,OAeC,CAAC;AAEZ,CAAC;;;;"}
1
+ {"version":3,"file":"ResponsivePanel.js","sources":["../../../src/common/responsivePanel/ResponsivePanel.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport { Position } from '..';\nimport BottomSheet from '../bottomSheet';\nimport { useLayout } from '../hooks';\nimport Panel, { type PanelProps } from '../panel';\nimport { isServerSide } from '../domHelpers';\n\nconst ResponsivePanel = forwardRef<HTMLDivElement, PanelProps>(function ResponsivePanel(\n {\n anchorRef,\n arrow = false,\n flip = true,\n children,\n className = undefined,\n onClose,\n open = false,\n position = Position.BOTTOM,\n anchorWidth = false,\n 'aria-label': ariaLabel,\n considerHeight = false,\n 'aria-labelledby': ariaLabelledBy,\n }: PanelProps,\n reference,\n) {\n const { isMobile } = useLayout();\n const SHORT_SCREEN = 500;\n const isShortViewport = considerHeight && !isServerSide() && window.innerHeight < SHORT_SCREEN;\n\n if (isMobile || isShortViewport) {\n return (\n <BottomSheet\n key=\"bottomSheet\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n open={open}\n className={className}\n onClose={onClose}\n >\n {children}\n </BottomSheet>\n );\n }\n return (\n <Panel\n key=\"panel\"\n ref={reference}\n flip={flip}\n arrow={arrow}\n open={open}\n position={position}\n anchorWidth={anchorWidth}\n anchorRef={anchorRef}\n aria-label={ariaLabel}\n considerHeight={considerHeight}\n aria-labelledby={ariaLabelledBy}\n className={className}\n onClose={onClose}\n >\n {children}\n </Panel>\n );\n});\n\nexport default ResponsivePanel;\n"],"names":["ResponsivePanel","forwardRef","anchorRef","arrow","flip","children","className","undefined","onClose","open","position","Position","BOTTOM","anchorWidth","ariaLabel","considerHeight","ariaLabelledBy","reference","isMobile","useLayout","SHORT_SCREEN","isShortViewport","isServerSide","window","innerHeight","_jsx","BottomSheet","Panel","ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAMA,eAAe,gBAAGC,gBAAU,CAA6B,SAASD,eAAeA,CACrF;EACEE,SAAS;AACTC,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,IAAI,GAAG,IAAI;EACXC,QAAQ;AACRC,EAAAA,SAAS,GAAGC,SAAS;EACrBC,OAAO;AACPC,EAAAA,IAAI,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
@@ -19,6 +19,7 @@ import '../propsValues/variant.mjs';
19
19
  import '../propsValues/scroll.mjs';
20
20
  import '../propsValues/markdownNodeType.mjs';
21
21
  import '../fileType.mjs';
22
+ import '@transferwise/formatting';
22
23
  import '@transferwise/icons';
23
24
  import 'clsx';
24
25
  import 'react-intl';
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsivePanel.mjs","sources":["../../../src/common/responsivePanel/ResponsivePanel.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport { Position } from '..';\nimport BottomSheet from '../bottomSheet';\nimport { useLayout } from '../hooks';\nimport Panel, { type PanelProps } from '../panel';\nimport { isServerSide } from '../domHelpers';\n\nconst ResponsivePanel = forwardRef<HTMLDivElement, PanelProps>(function ResponsivePanel(\n {\n anchorRef,\n arrow = false,\n flip = true,\n children,\n className = undefined,\n onClose,\n open = false,\n position = Position.BOTTOM,\n anchorWidth = false,\n 'aria-label': ariaLabel,\n considerHeight = false,\n 'aria-labelledby': ariaLabelledBy,\n }: PanelProps,\n reference,\n) {\n const { isMobile } = useLayout();\n const SHORT_SCREEN = 500;\n const isShortViewport = considerHeight && !isServerSide() && window.innerHeight < SHORT_SCREEN;\n\n if (isMobile || isShortViewport) {\n return (\n <BottomSheet\n key=\"bottomSheet\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n open={open}\n className={className}\n onClose={onClose}\n >\n {children}\n </BottomSheet>\n );\n }\n return (\n <Panel\n key=\"panel\"\n ref={reference}\n flip={flip}\n arrow={arrow}\n open={open}\n position={position}\n anchorWidth={anchorWidth}\n anchorRef={anchorRef}\n aria-label={ariaLabel}\n considerHeight={considerHeight}\n aria-labelledby={ariaLabelledBy}\n className={className}\n onClose={onClose}\n >\n {children}\n </Panel>\n );\n});\n\nexport default ResponsivePanel;\n"],"names":["ResponsivePanel","forwardRef","anchorRef","arrow","flip","children","className","undefined","onClose","open","position","Position","BOTTOM","anchorWidth","ariaLabel","considerHeight","ariaLabelledBy","reference","isMobile","use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AAS;AACnBG,IAAAA,WAAW,EAAEA,WAAY;AACzBX,IAAAA,SAAS,EAAEA,SAAU;AACrB,IAAA,YAAA,EAAYY,SAAU;AACtBC,IAAAA,cAAc,EAAEA,cAAe;AAC/B,IAAA,iBAAA,EAAiBC,cAAe;AAChCV,IAAAA,SAAS,EAAEA,SAAU;AACrBE,IAAAA,OAAO,EAAEA,OAAQ;AAAAH,IAAAA,QAAA,EAEhBA;AAAQ,GAAA,EAdL,OAeC,CAAC;AAEZ,CAAC;;;;"}
1
+ {"version":3,"file":"ResponsivePanel.mjs","sources":["../../../src/common/responsivePanel/ResponsivePanel.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport { Position } from '..';\nimport BottomSheet from '../bottomSheet';\nimport { useLayout } from '../hooks';\nimport Panel, { type PanelProps } from '../panel';\nimport { isServerSide } from '../domHelpers';\n\nconst ResponsivePanel = forwardRef<HTMLDivElement, PanelProps>(function ResponsivePanel(\n {\n anchorRef,\n arrow = false,\n flip = true,\n children,\n className = undefined,\n onClose,\n open = false,\n position = Position.BOTTOM,\n anchorWidth = false,\n 'aria-label': ariaLabel,\n considerHeight = false,\n 'aria-labelledby': ariaLabelledBy,\n }: PanelProps,\n reference,\n) {\n const { isMobile } = useLayout();\n const SHORT_SCREEN = 500;\n const isShortViewport = considerHeight && !isServerSide() && window.innerHeight < SHORT_SCREEN;\n\n if (isMobile || isShortViewport) {\n return (\n <BottomSheet\n key=\"bottomSheet\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n open={open}\n className={className}\n onClose={onClose}\n >\n {children}\n </BottomSheet>\n );\n }\n return (\n <Panel\n key=\"panel\"\n ref={reference}\n flip={flip}\n arrow={arrow}\n open={open}\n position={position}\n anchorWidth={anchorWidth}\n anchorRef={anchorRef}\n aria-label={ariaLabel}\n considerHeight={considerHeight}\n aria-labelledby={ariaLabelledBy}\n className={className}\n onClose={onClose}\n >\n {children}\n </Panel>\n );\n});\n\nexport default ResponsivePanel;\n"],"names":["ResponsivePanel","forwardRef","anchorRef","arrow","flip","children","className","undefined","onClose","open","position","Position","BOTTOM","anchorWidth","ariaLabel","considerHeight","ariaLabelledBy","reference","isMobile","useLayout","SHORT_SCREEN","isShortViewport","isServerSide","window","innerHeight","_jsx","BottomSheet","Panel","ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAMA,eAAe,gBAAGC,UAAU,CAA6B,SAASD,eAAeA,CACrF;EACEE,SAAS;AACTC,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,IAAI,GAAG,IAAI;EACXC,QAAQ;AACRC,EAAAA,SAAS,GAAGC,SAAS;EACrBC,OAAO;AACPC,EAAAA,IAAI,GAAG,KAAK;EACZC,QAAQ,GAAGC,QAAQ,CAACC,MAAM;AAC1BC,EAAAA,WAAW,GAAG,KAAK;AACnB,EAAA,YAAY,EAAEC,SAAS;AACvBC,EAAAA,cAAc,GAAG,KAAK;AACtB,EAAA,iBAAiB,EAAEC;AAAc,CACtB,EACbC,SAAS,EAAA;EAET,MAAM;AAAEC,IAAAA;GAAU,GAAGC,SAAS,EAAE;EAChC,MAAMC,YAAY,GAAG,GAAG;AACxB,EAAA,MAAMC,eAAe,GAAGN,cAAc,IAAI,CAACO,YAAY,EAAE,IAAIC,MAAM,CAACC,WAAW,GAAGJ,YAAY;EAE9F,IAAIF,QAAQ,IAAIG,eAAe,EAAE;IAC/B,oBACEI,GAAA,CAACC,WAAW,EAAA;AAEV,MAAA,YAAA,EAAYZ,SAAU;AACtB,MAAA,iBAAA,EAAiBE,cAAe;AAChCP,MAAAA,IAAI,EAAEA,IAAK;AACXH,MAAAA,SAAS,EAAEA,SAAU;AACrBE,MAAAA,OAAO,EAAEA,OAAQ;AAAAH,MAAAA,QAAA,EAEhBA;AAAQ,KAAA,EAPL,aAQO,CAAC;AAElB,EAAA;EACA,oBACEoB,GAAA,CAACE,KAAK,EAAA;AAEJC,IAAAA,GAAG,EAAEX,SAAU;AACfb,IAAAA,IAAI,EAAEA,IAAK;AACXD,IAAAA,KAAK,EAAEA,KAAM;AACbM,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,QAAQ,EAAEA,QAAS;AACnBG,IAAAA,WAAW,EAAEA,WAAY;AACzBX,IAAAA,SAAS,EAAEA,SAAU;AACrB,IAAA,YAAA,EAAYY,SAAU;AACtBC,IAAAA,cAAc,EAAEA,cAAe;AAC/B,IAAA,iBAAA,EAAiBC,cAAe;AAChCV,IAAAA,SAAS,EAAEA,SAAU;AACrBE,IAAAA,OAAO,EAAEA,OAAQ;AAAAH,IAAAA,QAAA,EAEhBA;AAAQ,GAAA,EAdL,OAeC,CAAC;AAEZ,CAAC;;;;"}
@@ -24,6 +24,7 @@ require('../common/propsValues/variant.js');
24
24
  require('../common/propsValues/scroll.js');
25
25
  require('../common/propsValues/markdownNodeType.js');
26
26
  require('../common/fileType.js');
27
+ require('@transferwise/formatting');
27
28
  require('react');
28
29
  require('react-intl');
29
30
  require('../common/closeButton/CloseButton.messages.js');
@@ -1 +1 @@
1
- {"version":3,"file":"CriticalCommsBanner.js","sources":["../../src/criticalBanner/CriticalCommsBanner.tsx"],"sourcesContent":["import { Alert as AlertIcon, ClockBorderless as ClockIcon } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { PropsWithChildren } from 'react';\n\nimport Alert from '../alert';\nimport { Sentiment } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport SentimentSurface from '../sentimentSurface';\n\nexport type CriticalCommsBannerSentiment =\n | `${Sentiment.WARNING}`\n | `${Sentiment.NEGATIVE}`\n | `${Sentiment.NEUTRAL}`;\n\nexport type CriticalCommsBannerProps = {\n title: string;\n subtitle?: string;\n action?: {\n label: string;\n href?: string;\n target?: HTMLAnchorElement['target'];\n onClick?: () => void;\n };\n sentiment?: CriticalCommsBannerSentiment;\n className?: string;\n};\n\nconst makeSurface = (sentiment: CriticalCommsBannerSentiment) => {\n const Surface = (props: PropsWithChildren<Pick<CircleProps, 'className'>>) => (\n <SentimentSurface as=\"span\" emphasis=\"elevated\" sentiment={sentiment} {...props} />\n );\n Surface.displayName = `CriticalCommsSurface(${sentiment})`;\n return Surface;\n};\n\nconst iconBySentiment: Record<CriticalCommsBannerSentiment, React.ReactNode> = {\n [Sentiment.NEGATIVE]: (\n <Circle as={makeSurface(Sentiment.NEGATIVE)} size={32} className=\"status-circle negative\">\n <AlertIcon className=\"status-icon light\" />\n </Circle>\n ),\n [Sentiment.WARNING]: (\n <Circle as={makeSurface(Sentiment.WARNING)} size={32} className=\"status-circle warning\">\n <AlertIcon className=\"status-icon dark\" />\n </Circle>\n ),\n [Sentiment.NEUTRAL]: (\n <Circle as={makeSurface(Sentiment.NEUTRAL)} size={32} className=\"status-circle neutral\">\n <ClockIcon className=\"status-icon dark\" />\n </Circle>\n ),\n};\n\nfunction CriticalCommsBanner({\n title,\n subtitle,\n action,\n sentiment = Sentiment.NEGATIVE,\n className,\n}: CriticalCommsBannerProps) {\n return (\n <SentimentSurface\n sentiment={sentiment}\n emphasis=\"elevated\"\n className={clsx('critical-comms', className)}\n >\n <Alert\n title={title}\n message={subtitle}\n action={\n action && {\n onClick: action.onClick,\n href: action.href,\n target: action.target,\n text: action.label,\n as: 'button',\n }\n }\n className={className}\n type={sentiment}\n icon={iconBySentiment[sentiment]}\n />\n </SentimentSurface>\n );\n}\n\nexport default CriticalCommsBanner;\n"],"names":["makeSurface","sentiment","Surface","props","_jsx","SentimentSurface","as","emphasis","displayName","iconBySentiment","Sentiment","NEGATIVE","Circle","size","className","children","AlertIcon","WARNING","NEUTRAL","ClockIcon","CriticalCommsBanner","title","subtitle","action","clsx","Alert","message","onClick","href","target","text","label","type","icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAMA,WAAW,GAAIC,SAAuC,IAAI;AAC9D,EAAA,MAAMC,OAAO,GAAIC,KAAwD,iBACvEC,cAAA,CAACC,wBAAgB,EAAA;AAACC,IAAAA,EAAE,EAAC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CAACC,QAAQ;AAC9BG,EAAAA;AAAS,CACgB,EAAA;EACzB,oBACEV,cAAA,CAACC,wBAAgB,EAAA;AACfJ,IAAAA,SAAS,EAAEA,WAAU;AACrBM,IAAAA,QAAQ,EAAC,UAAU;AACnBO,IAAAA,SAAS,EAAEU,SAAI,CAAC,gBAAgB,EAAEV,SAAS,CAAE;IAAAC,QAAA,eAE7CX,cAAA,CAACqB,aAAK,EAAA;AACJJ,MAAAA,KAAK,EAAEA,KAAM;AACbK,MAAAA,OAAO,EAAEJ,QAAS;MAClBC,MAAM,EACJA,MAAM,IAAI;QACRI,OAAO,EAAEJ,MAAM,CAACI,OAAO;QACvBC,IAAI,EAAEL,MAAM,CAACK,IAAI;QACjBC,MAAM,EAAEN,MAAM,CAACM,MAAM;QACrBC,IAAI,EAAEP,MAAM,CAACQ,KAAK;AAClBzB,QAAAA,EAAE,EAAE;OAEP;AACDQ,MAAAA,SAAS,EAAEA,SAAU;AACrBkB,MAAAA,IAAI,EAAE/B,WAAU;MAChBgC,IAAI,EAAExB,eAAe,CAACR,WAAS;KAAE;AAErC,GAAkB,CAAC;AAEvB;;;;"}
1
+ {"version":3,"file":"CriticalCommsBanner.js","sources":["../../src/criticalBanner/CriticalCommsBanner.tsx"],"sourcesContent":["import { Alert as AlertIcon, ClockBorderless as ClockIcon } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { PropsWithChildren } from 'react';\n\nimport Alert from '../alert';\nimport { Sentiment } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport SentimentSurface from '../sentimentSurface';\n\nexport type CriticalCommsBannerSentiment =\n | `${Sentiment.WARNING}`\n | `${Sentiment.NEGATIVE}`\n | `${Sentiment.NEUTRAL}`;\n\nexport type CriticalCommsBannerProps = {\n title: string;\n subtitle?: string;\n action?: {\n label: string;\n href?: string;\n target?: HTMLAnchorElement['target'];\n onClick?: () => void;\n };\n sentiment?: CriticalCommsBannerSentiment;\n className?: string;\n};\n\nconst makeSurface = (sentiment: CriticalCommsBannerSentiment) => {\n const Surface = (props: PropsWithChildren<Pick<CircleProps, 'className'>>) => (\n <SentimentSurface as=\"span\" emphasis=\"elevated\" sentiment={sentiment} {...props} />\n );\n Surface.displayName = `CriticalCommsSurface(${sentiment})`;\n return Surface;\n};\n\nconst iconBySentiment: Record<CriticalCommsBannerSentiment, React.ReactNode> = {\n [Sentiment.NEGATIVE]: (\n <Circle as={makeSurface(Sentiment.NEGATIVE)} size={32} className=\"status-circle negative\">\n <AlertIcon className=\"status-icon light\" />\n </Circle>\n ),\n [Sentiment.WARNING]: (\n <Circle as={makeSurface(Sentiment.WARNING)} size={32} className=\"status-circle warning\">\n <AlertIcon className=\"status-icon dark\" />\n </Circle>\n ),\n [Sentiment.NEUTRAL]: (\n <Circle as={makeSurface(Sentiment.NEUTRAL)} size={32} className=\"status-circle neutral\">\n <ClockIcon className=\"status-icon dark\" />\n </Circle>\n ),\n};\n\nfunction CriticalCommsBanner({\n title,\n subtitle,\n action,\n sentiment = Sentiment.NEGATIVE,\n className,\n}: CriticalCommsBannerProps) {\n return (\n <SentimentSurface\n sentiment={sentiment}\n emphasis=\"elevated\"\n className={clsx('critical-comms', className)}\n >\n <Alert\n title={title}\n message={subtitle}\n action={\n action && {\n onClick: action.onClick,\n href: action.href,\n target: action.target,\n text: action.label,\n as: 'button',\n }\n }\n className={className}\n type={sentiment}\n icon={iconBySentiment[sentiment]}\n />\n </SentimentSurface>\n );\n}\n\nexport default CriticalCommsBanner;\n"],"names":["makeSurface","sentiment","Surface","props","_jsx","SentimentSurface","as","emphasis","displayName","iconBySentiment","Sentiment","NEGATIVE","Circle","size","className","children","AlertIcon","WARNING","NEUTRAL","ClockIcon","CriticalCommsBanner","title","subtitle","action","clsx","Alert","message","onClick","href","target","text","label","type","icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAMA,WAAW,GAAIC,SAAuC,IAAI;AAC9D,EAAA,MAAMC,OAAO,GAAIC,KAAwD,iB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AK;EACLC,QAAQ;EACRC,MAAM;aACNtB,WAAS,GAAGS,mBAAS,CAACC,QAAQ;AAC9BG,EAAAA;AAAS,CACgB,EAAA;EACzB,oBACEV,cAAA,CAACC,wBAAgB,EAAA;AACfJ,IAAAA,SAAS,EAAEA,WAAU;AACrBM,IAAAA,QAAQ,EAAC,UAAU;AACnBO,IAAAA,SAAS,EAAEU,SAAI,CAAC,gBAAgB,EAAEV,SAAS,CAAE;IAAAC,QAAA,eAE7CX,cAAA,CAACqB,aAAK,EAAA;AACJJ,MAAAA,KAAK,EAAEA,KAAM;AACbK,MAAAA,OAAO,EAAEJ,QAAS;MAClBC,MAAM,EACJA,MAAM,IAAI;QACRI,OAAO,EAAEJ,MAAM,CAACI,OAAO;QACvBC,IAAI,EAAEL,MAAM,CAACK,IAAI;QACjBC,MAAM,EAAEN,MAAM,CAACM,MAAM;QACrBC,IAAI,EAAEP,MAAM,CAACQ,KAAK;AAClBzB,QAAAA,EAAE,EAAE;OAEP;AACDQ,MAAAA,SAAS,EAAEA,SAAU;AACrBkB,MAAAA,IAAI,EAAE/B,WAAU;MAChBgC,IAAI,EAAExB,eAAe,CAACR,WAAS;KAAE;AAErC,GAAkB,CAAC;AAEvB;;;;"}
@@ -20,6 +20,7 @@ import '../common/propsValues/variant.mjs';
20
20
  import '../common/propsValues/scroll.mjs';
21
21
  import '../common/propsValues/markdownNodeType.mjs';
22
22
  import '../common/fileType.mjs';
23
+ import '@transferwise/formatting';
23
24
  import 'react';
24
25
  import 'react-intl';
25
26
  import '../common/closeButton/CloseButton.messages.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"CriticalCommsBanner.mjs","sources":["../../src/criticalBanner/CriticalCommsBanner.tsx"],"sourcesContent":["import { Alert as AlertIcon, ClockBorderless as ClockIcon } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { PropsWithChildren } from 'react';\n\nimport Alert from '../alert';\nimport { Sentiment } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport SentimentSurface from '../sentimentSurface';\n\nexport type CriticalCommsBannerSentiment =\n | `${Sentiment.WARNING}`\n | `${Sentiment.NEGATIVE}`\n | `${Sentiment.NEUTRAL}`;\n\nexport type CriticalCommsBannerProps = {\n title: string;\n subtitle?: string;\n action?: {\n label: string;\n href?: string;\n target?: HTMLAnchorElement['target'];\n onClick?: () => void;\n };\n sentiment?: CriticalCommsBannerSentiment;\n className?: string;\n};\n\nconst makeSurface = (sentiment: CriticalCommsBannerSentiment) => {\n const Surface = (props: PropsWithChildren<Pick<CircleProps, 'className'>>) => (\n <SentimentSurface as=\"span\" emphasis=\"elevated\" sentiment={sentiment} {...props} />\n );\n Surface.displayName = `CriticalCommsSurface(${sentiment})`;\n return Surface;\n};\n\nconst iconBySentiment: Record<CriticalCommsBannerSentiment, React.ReactNode> = {\n [Sentiment.NEGATIVE]: (\n <Circle as={makeSurface(Sentiment.NEGATIVE)} size={32} className=\"status-circle negative\">\n <AlertIcon className=\"status-icon light\" />\n </Circle>\n ),\n [Sentiment.WARNING]: (\n <Circle as={makeSurface(Sentiment.WARNING)} size={32} className=\"status-circle warning\">\n <AlertIcon className=\"status-icon dark\" />\n </Circle>\n ),\n [Sentiment.NEUTRAL]: (\n <Circle as={makeSurface(Sentiment.NEUTRAL)} size={32} className=\"status-circle neutral\">\n <ClockIcon className=\"status-icon dark\" />\n </Circle>\n ),\n};\n\nfunction CriticalCommsBanner({\n title,\n subtitle,\n action,\n sentiment = Sentiment.NEGATIVE,\n className,\n}: CriticalCommsBannerProps) {\n return (\n <SentimentSurface\n sentiment={sentiment}\n emphasis=\"elevated\"\n className={clsx('critical-comms', className)}\n >\n <Alert\n title={title}\n message={subtitle}\n action={\n action && {\n onClick: action.onClick,\n href: action.href,\n target: action.target,\n text: action.label,\n as: 'button',\n }\n }\n className={className}\n type={sentiment}\n icon={iconBySentiment[sentiment]}\n />\n </SentimentSurface>\n );\n}\n\nexport default CriticalCommsBanner;\n"],"names":["makeSurface","sentiment","Surface","props","_jsx","SentimentSurface","as","emphasis","displayName","iconBySentiment","Sentiment","NEGATIVE","Circle","size","className","children","AlertIcon","WARNING","NEUTRAL","ClockIcon","CriticalCommsBanner","title","subtitle","action","clsx","Alert","message","onClick","href","target","text","label","type","icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAMA,WAAW,GAAIC,SAAuC,IAAI;AAC9D,EAAA,MAAMC,OAAO,GAAIC,KAAwD,iBACvEC,GAAA,CAACC,gBAAgB,EAAA;AAACC,IAAAA,EAAE,EAAC,MAAM;AAACC,IAAAA,QAAQ,EAAC,UAAU;AAACN,IAAAA,SAAS,EAAEA,SAAU;IAAA,GAAKE;AAAK,GAAC,CACjF;AACDD,EAAAA,OAAO,CAACM,WAAW,GAAG,CAAA,qBAAA,EAAwBP,SAAS,CAAA,CAAA,CAAG;AAC1D,EAAA,OAAOC,OAAO;AAChB,CAAC;AAED,MAAMO,eAAe,GAA0D;AAC7E,EAAA,CAACC,SAAS,CAACC,QAAQ,gBACjBP,GAAA,CAACQ,MAAM,EAAA;AAACN,IAAAA,EAAE,EAAEN,WAAW,CAACU,SAAS,CAACC,QAAQ,CAAE;AAACE,IAAAA,IAAI,EAAE,EAAG;AAACC,IAAAA,SAAS,EAAC,wBAAwB;IAAAC,QAAA,eACvFX,GAAA,CAACY,KAAS,EAAA;AAACF,MAAAA,SAAS,EAAC;KAAmB;AAC1C,GAAQ,CACT;AACD,EAAA,CAACJ,SAAS,CAACO,OAAO,gBAChBb,GAAA,CAACQ,MAAM,EAAA;AAACN,IAAAA,EAAE,EAAEN,WAAW,CAACU,SAAS,CAACO,OAAO,CAAE;AAACJ,IAAAA,IAAI,EAAE,EAAG;AAACC,IAAAA,SAAS,EAAC,uBAAuB;IAAAC,QAAA,eACrFX,GAAA,CAACY,KAAS,EAAA;AAACF,MAAAA,SAAS,EAAC;KAAkB;AACzC,GAAQ,CACT;AACD,EAAA,CAACJ,SAAS,CAACQ,OAAO,gBAChBd,GAAA,CAACQ,MAAM,EAAA;AAACN,IAAAA,EAAE,EAAEN,WAAW,CAACU,SAAS,CAACQ,OAAO,CAAE;AAACL,IAAAA,IAAI,EAAE,EAAG;AAACC,IAAAA,SAAS,EAAC,uBAAuB;IAAAC,QAAA,eACrFX,GAAA,CAACe,eAAS,EAAA;AAACL,MAAAA,SAAS,EAAC;KAAkB;GACjC;CAEX;AAED,SAASM,mBAAmBA,CAAC;EAC3BC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACNtB,SAAS,GAAGS,SAAS,CAACC,QAAQ;AAC9BG,EAAAA;AAAS,CACgB,EAAA;EACzB,oBACEV,GAAA,CAACC,gBAAgB,EAAA;AACfJ,IAAAA,SAAS,EAAEA,SAAU;AACrBM,IAAAA,QAAQ,EAAC,UAAU;AACnBO,IAAAA,SAAS,EAAEU,IAAI,CAAC,gBAAgB,EAAEV,SAAS,CAAE;IAAAC,QAAA,eAE7CX,GAAA,CAACqB,OAAK,EAAA;AACJJ,MAAAA,KAAK,EAAEA,KAAM;AACbK,MAAAA,OAAO,EAAEJ,QAAS;MAClBC,MAAM,EACJA,MAAM,IAAI;QACRI,OAAO,EAAEJ,MAAM,CAACI,OAAO;QACvBC,IAAI,EAAEL,MAAM,CAACK,IAAI;QACjBC,MAAM,EAAEN,MAAM,CAACM,MAAM;QACrBC,IAAI,EAAEP,MAAM,CAACQ,KAAK;AAClBzB,QAAAA,EAAE,EAAE;OAEP;AACDQ,MAAAA,SAAS,EAAEA,SAAU;AACrBkB,MAAAA,IAAI,EAAE/B,SAAU;MAChBgC,IAAI,EAAExB,eAAe,CAACR,SAAS;KAAE;AAErC,GAAkB,CAAC;AAEvB;;;;"}
1
+ {"version":3,"file":"CriticalCommsBanner.mjs","sources":["../../src/criticalBanner/CriticalCommsBanner.tsx"],"sourcesContent":["import { Alert as AlertIcon, ClockBorderless as ClockIcon } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { PropsWithChildren } from 'react';\n\nimport Alert from '../alert';\nimport { Sentiment } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport SentimentSurface from '../sentimentSurface';\n\nexport type CriticalCommsBannerSentiment =\n | `${Sentiment.WARNING}`\n | `${Sentiment.NEGATIVE}`\n | `${Sentiment.NEUTRAL}`;\n\nexport type CriticalCommsBannerProps = {\n title: string;\n subtitle?: string;\n action?: {\n label: string;\n href?: string;\n target?: HTMLAnchorElement['target'];\n onClick?: () => void;\n };\n sentiment?: CriticalCommsBannerSentiment;\n className?: string;\n};\n\nconst makeSurface = (sentiment: CriticalCommsBannerSentiment) => {\n const Surface = (props: PropsWithChildren<Pick<CircleProps, 'className'>>) => (\n <SentimentSurface as=\"span\" emphasis=\"elevated\" sentiment={sentiment} {...props} />\n );\n Surface.displayName = `CriticalCommsSurface(${sentiment})`;\n return Surface;\n};\n\nconst iconBySentiment: Record<CriticalCommsBannerSentiment, React.ReactNode> = {\n [Sentiment.NEGATIVE]: (\n <Circle as={makeSurface(Sentiment.NEGATIVE)} size={32} className=\"status-circle negative\">\n <AlertIcon className=\"status-icon light\" />\n </Circle>\n ),\n [Sentiment.WARNING]: (\n <Circle as={makeSurface(Sentiment.WARNING)} size={32} className=\"status-circle warning\">\n <AlertIcon className=\"status-icon dark\" />\n </Circle>\n ),\n [Sentiment.NEUTRAL]: (\n <Circle as={makeSurface(Sentiment.NEUTRAL)} size={32} className=\"status-circle neutral\">\n <ClockIcon className=\"status-icon dark\" />\n </Circle>\n ),\n};\n\nfunction CriticalCommsBanner({\n title,\n subtitle,\n action,\n sentiment = Sentiment.NEGATIVE,\n className,\n}: CriticalCommsBannerProps) {\n return (\n <SentimentSurface\n sentiment={sentiment}\n emphasis=\"elevated\"\n className={clsx('critical-comms', className)}\n >\n <Alert\n title={title}\n message={subtitle}\n action={\n action && {\n onClick: action.onClick,\n href: action.href,\n target: action.target,\n text: action.label,\n as: 'button',\n }\n }\n className={className}\n type={sentiment}\n icon={iconBySentiment[sentiment]}\n />\n </SentimentSurface>\n );\n}\n\nexport default CriticalCommsBanner;\n"],"names":["makeSurface","sentiment","Surface","props","_jsx","SentimentSurface","as","emphasis","displayName","iconBySentiment","Sentiment","NEGATIVE","Circle","size","className","children","AlertIcon","WARNING","NEUTRAL","ClockIcon","CriticalCommsBanner","title","subtitle","action","clsx","Alert","message","onClick","href","target","text","label","type","icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAMA,WAAW,GAAIC,SAAuC,IAAI;AAC9D,EAAA,MAAMC,OAAO,GAAIC,KAAwD,iBACvEC,GAAA,CAACC,gBAAgB,EAAA;AAACC,IAAAA,EAAE,EAAC,MAAM;AAACC,IAAAA,QAAQ,EAAC,UAAU;AAACN,IAAAA,SAAS,EAAEA,SAAU;IAAA,GAAKE;AAAK,GAAC,CACjF;AACDD,EAAAA,OAAO,CAACM,WAAW,GAAG,CAAA,qBAAA,EAAwBP,SAAS,CAAA,CAAA,CAAG;AAC1D,EAAA,OAAOC,OAAO;AAChB,CAAC;AAED,MAAMO,eAAe,GAA0D;AAC7E,EAAA,CAACC,SAAS,CAACC,QAAQ,gBACjBP,GAAA,CAACQ,MAAM,EAAA;AAACN,IAAAA,EAAE,EAAEN,WAAW,CAACU,SAAS,CAACC,QAAQ,CAAE;AAACE,IAAAA,IAAI,EAAE,EAAG;AAACC,IAAAA,SAAS,EAAC,wBAAwB;IAAAC,QAAA,eACvFX,GAAA,CAACY,KAAS,EAAA;AAACF,MAAAA,SAAS,EAAC;KAAmB;AAC1C,GAAQ,CACT;AACD,EAAA,CAACJ,SAAS,CAACO,OAAO,gBAChBb,GAAA,CAACQ,MAAM,EAAA;AAACN,IAAAA,EAAE,EAAEN,WAAW,CAACU,SAAS,CAACO,OAAO,CAAE;AAACJ,IAAAA,IAAI,EAAE,EAAG;AAACC,IAAAA,SAAS,EAAC,uBAAuB;IAAAC,QAAA,eACrFX,GAAA,CAACY,KAAS,EAAA;AAACF,MAAAA,SAAS,EAAC;KAAkB;AACzC,GAAQ,CACT;AACD,EAAA,CAACJ,SAAS,CAACQ,OAAO,gBAChBd,GAAA,CAACQ,MAAM,EAAA;AAACN,IAAAA,EAAE,EAAEN,WAAW,CAACU,SAAS,CAACQ,OAAO,CAAE;AAACL,IAAAA,IAAI,EAAE,EAAG;AAACC,IAAAA,SAAS,EAAC,uBAAuB;IAAAC,QAAA,eACrFX,GAAA,CAACe,eAAS,EAAA;AAACL,MAAAA,SAAS,EAAC;KAAkB;GACjC;CAEX;AAED,SAASM,mBAAmBA,CAAC;EAC3BC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACNtB,SAAS,GAAGS,SAAS,CAACC,QAAQ;AAC9BG,EAAAA;AAAS,CACgB,EAAA;EACzB,oBACEV,GAAA,CAACC,gBAAgB,EAAA;AACfJ,IAAAA,SAAS,EAAEA,SAAU;AACrBM,IAAAA,QAAQ,EAAC,UAAU;AACnBO,IAAAA,SAAS,EAAEU,IAAI,CAAC,gBAAgB,EAAEV,SAAS,CAAE;IAAAC,QAAA,eAE7CX,GAAA,CAACqB,OAAK,EAAA;AACJJ,MAAAA,KAAK,EAAEA,KAAM;AACbK,MAAAA,OAAO,EAAEJ,QAAS;MAClBC,MAAM,EACJA,MAAM,IAAI;QACRI,OAAO,EAAEJ,MAAM,CAACI,OAAO;QACvBC,IAAI,EAAEL,MAAM,CAACK,IAAI;QACjBC,MAAM,EAAEN,MAAM,CAACM,MAAM;QACrBC,IAAI,EAAEP,MAAM,CAACQ,KAAK;AAClBzB,QAAAA,EAAE,EAAE;OAEP;AACDQ,MAAAA,SAAS,EAAEA,SAAU;AACrBkB,MAAAA,IAAI,EAAE/B,SAAU;MAChBgC,IAAI,EAAExB,eAAe,CAACR,SAAS;KAAE;AAErC,GAAkB,CAAC;AAEvB;;;;"}
@@ -36,9 +36,9 @@ require('../common/propsValues/variant.js');
36
36
  require('../common/propsValues/scroll.js');
37
37
  require('../common/propsValues/markdownNodeType.js');
38
38
  require('../common/fileType.js');
39
+ require('@transferwise/formatting');
39
40
  require('../common/closeButton/CloseButton.messages.js');
40
41
  require('../inputs/SelectInput/SelectInput.messages.js');
41
- require('@transferwise/formatting');
42
42
  var getMonthNames = require('../common/dateUtils/getMonthNames/getMonthNames.js');
43
43
  var isDateValid = require('../common/dateUtils/isDateValid/isDateValid.js');
44
44
  var isMonthAndYearFormat = require('../common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.js');
@@ -32,9 +32,9 @@ import '../common/propsValues/variant.mjs';
32
32
  import '../common/propsValues/scroll.mjs';
33
33
  import '../common/propsValues/markdownNodeType.mjs';
34
34
  import '../common/fileType.mjs';
35
+ import '@transferwise/formatting';
35
36
  import '../common/closeButton/CloseButton.messages.mjs';
36
37
  import '../inputs/SelectInput/SelectInput.messages.mjs';
37
- import '@transferwise/formatting';
38
38
  import { getMonthNames } from '../common/dateUtils/getMonthNames/getMonthNames.mjs';
39
39
  import { isDateValid } from '../common/dateUtils/isDateValid/isDateValid.mjs';
40
40
  import { isMonthAndYearFormat } from '../common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.mjs';
@@ -23,11 +23,11 @@ require('../common/propsValues/variant.js');
23
23
  require('../common/propsValues/scroll.js');
24
24
  require('../common/propsValues/markdownNodeType.js');
25
25
  require('../common/fileType.js');
26
+ require('@transferwise/formatting');
26
27
  require('@transferwise/icons');
27
28
  require('react-intl');
28
29
  require('../common/closeButton/CloseButton.messages.js');
29
30
  var jsxRuntime = require('react/jsx-runtime');
30
- require('@transferwise/formatting');
31
31
  var moveToWithinRange = require('../common/dateUtils/moveToWithinRange/moveToWithinRange.js');
32
32
  var isWithinRange = require('../common/dateUtils/isWithinRange/isWithinRange.js');
33
33
  var getDateView = require('../common/dateUtils/getDateView/getDateView.js');