@transferwise/components 46.77.0 → 46.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (503) hide show
  1. package/build/accordion/AccordionItem/AccordionItem.js +22 -3
  2. package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
  3. package/build/accordion/AccordionItem/AccordionItem.mjs +22 -3
  4. package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
  5. package/build/actionButton/ActionButton.js +22 -1
  6. package/build/actionButton/ActionButton.js.map +1 -1
  7. package/build/actionButton/ActionButton.mjs +22 -1
  8. package/build/actionButton/ActionButton.mjs.map +1 -1
  9. package/build/actionOption/ActionOption.js +24 -2
  10. package/build/actionOption/ActionOption.js.map +1 -1
  11. package/build/actionOption/ActionOption.mjs +24 -2
  12. package/build/actionOption/ActionOption.mjs.map +1 -1
  13. package/build/alert/Alert.js +22 -6
  14. package/build/alert/Alert.js.map +1 -1
  15. package/build/alert/Alert.mjs +22 -6
  16. package/build/alert/Alert.mjs.map +1 -1
  17. package/build/alert/inlineMarkdown/InlineMarkdown.js +25 -2
  18. package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
  19. package/build/alert/inlineMarkdown/InlineMarkdown.mjs +25 -2
  20. package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
  21. package/build/avatar/Avatar.js +25 -9
  22. package/build/avatar/Avatar.js.map +1 -1
  23. package/build/avatar/Avatar.mjs +25 -9
  24. package/build/avatar/Avatar.mjs.map +1 -1
  25. package/build/avatarWrapper/AvatarWrapper.js +23 -3
  26. package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
  27. package/build/avatarWrapper/AvatarWrapper.mjs +23 -3
  28. package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
  29. package/build/badge/Badge.js +24 -12
  30. package/build/badge/Badge.js.map +1 -1
  31. package/build/badge/Badge.mjs +24 -12
  32. package/build/badge/Badge.mjs.map +1 -1
  33. package/build/button/Button.js +22 -6
  34. package/build/button/Button.js.map +1 -1
  35. package/build/button/Button.messages.js.map +1 -1
  36. package/build/button/Button.messages.mjs.map +1 -1
  37. package/build/button/Button.mjs +22 -6
  38. package/build/button/Button.mjs.map +1 -1
  39. package/build/button/classMap.js +24 -0
  40. package/build/button/classMap.js.map +1 -1
  41. package/build/button/classMap.mjs +24 -0
  42. package/build/button/classMap.mjs.map +1 -1
  43. package/build/button/legacyUtils/legacyUtils.js +30 -7
  44. package/build/button/legacyUtils/legacyUtils.js.map +1 -1
  45. package/build/button/legacyUtils/legacyUtils.mjs +30 -7
  46. package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
  47. package/build/card/Card.js +23 -3
  48. package/build/card/Card.js.map +1 -1
  49. package/build/card/Card.mjs +23 -3
  50. package/build/card/Card.mjs.map +1 -1
  51. package/build/checkbox/Checkbox.js +23 -1
  52. package/build/checkbox/Checkbox.js.map +1 -1
  53. package/build/checkbox/Checkbox.mjs +23 -1
  54. package/build/checkbox/Checkbox.mjs.map +1 -1
  55. package/build/checkboxOption/CheckboxOption.js +1 -1
  56. package/build/checkboxOption/CheckboxOption.mjs +1 -1
  57. package/build/chevron/Chevron.js +21 -1
  58. package/build/chevron/Chevron.js.map +1 -1
  59. package/build/chevron/Chevron.mjs +21 -1
  60. package/build/chevron/Chevron.mjs.map +1 -1
  61. package/build/chips/Chip.js +19 -1
  62. package/build/chips/Chip.js.map +1 -1
  63. package/build/chips/Chip.mjs +19 -1
  64. package/build/chips/Chip.mjs.map +1 -1
  65. package/build/circularButton/CircularButton.js +24 -5
  66. package/build/circularButton/CircularButton.js.map +1 -1
  67. package/build/circularButton/CircularButton.mjs +24 -5
  68. package/build/circularButton/CircularButton.mjs.map +1 -1
  69. package/build/common/bottomSheet/BottomSheet.js +3 -2
  70. package/build/common/bottomSheet/BottomSheet.js.map +1 -1
  71. package/build/common/bottomSheet/BottomSheet.mjs +3 -2
  72. package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
  73. package/build/common/circle/Circle.js +15 -2
  74. package/build/common/circle/Circle.js.map +1 -1
  75. package/build/common/circle/Circle.mjs +15 -2
  76. package/build/common/circle/Circle.mjs.map +1 -1
  77. package/build/common/hooks/useHasIntersected/useHasIntersected.js +10 -10
  78. package/build/common/hooks/useHasIntersected/useHasIntersected.js.map +1 -1
  79. package/build/common/hooks/useHasIntersected/useHasIntersected.mjs +10 -10
  80. package/build/common/hooks/useHasIntersected/useHasIntersected.mjs.map +1 -1
  81. package/build/common/locale/index.js +24 -0
  82. package/build/common/locale/index.js.map +1 -1
  83. package/build/common/locale/index.mjs +24 -0
  84. package/build/common/locale/index.mjs.map +1 -1
  85. package/build/common/panel/Panel.js +23 -2
  86. package/build/common/panel/Panel.js.map +1 -1
  87. package/build/common/panel/Panel.mjs +23 -2
  88. package/build/common/panel/Panel.mjs.map +1 -1
  89. package/build/common/responsivePanel/ResponsivePanel.js +27 -3
  90. package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
  91. package/build/common/responsivePanel/ResponsivePanel.mjs +27 -3
  92. package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
  93. package/build/criticalBanner/CriticalCommsBanner.js +22 -3
  94. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  95. package/build/criticalBanner/CriticalCommsBanner.mjs +22 -3
  96. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  97. package/build/dateInput/DateInput.js +22 -5
  98. package/build/dateInput/DateInput.js.map +1 -1
  99. package/build/dateInput/DateInput.mjs +22 -5
  100. package/build/dateInput/DateInput.mjs.map +1 -1
  101. package/build/dateLookup/DateLookup.js +24 -6
  102. package/build/dateLookup/DateLookup.js.map +1 -1
  103. package/build/dateLookup/DateLookup.mjs +24 -6
  104. package/build/dateLookup/DateLookup.mjs.map +1 -1
  105. package/build/dateLookup/dateHeader/DateHeader.js +26 -5
  106. package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
  107. package/build/dateLookup/dateHeader/DateHeader.mjs +26 -5
  108. package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
  109. package/build/dateLookup/dateTrigger/DateTrigger.js +19 -3
  110. package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -1
  111. package/build/dateLookup/dateTrigger/DateTrigger.mjs +19 -3
  112. package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -1
  113. package/build/decision/Decision.js +24 -3
  114. package/build/decision/Decision.js.map +1 -1
  115. package/build/decision/Decision.mjs +24 -3
  116. package/build/decision/Decision.mjs.map +1 -1
  117. package/build/definitionList/DefinitionList.js +23 -1
  118. package/build/definitionList/DefinitionList.js.map +1 -1
  119. package/build/definitionList/DefinitionList.mjs +23 -1
  120. package/build/definitionList/DefinitionList.mjs.map +1 -1
  121. package/build/dimmer/Dimmer.js +24 -2
  122. package/build/dimmer/Dimmer.js.map +1 -1
  123. package/build/dimmer/Dimmer.mjs +24 -2
  124. package/build/dimmer/Dimmer.mjs.map +1 -1
  125. package/build/display/Display.js +23 -1
  126. package/build/display/Display.js.map +1 -1
  127. package/build/display/Display.mjs +23 -1
  128. package/build/display/Display.mjs.map +1 -1
  129. package/build/drawer/Drawer.js +23 -4
  130. package/build/drawer/Drawer.js.map +1 -1
  131. package/build/drawer/Drawer.mjs +23 -4
  132. package/build/drawer/Drawer.mjs.map +1 -1
  133. package/build/field/Field.js +23 -2
  134. package/build/field/Field.js.map +1 -1
  135. package/build/field/Field.mjs +23 -2
  136. package/build/field/Field.mjs.map +1 -1
  137. package/build/flowNavigation/FlowNavigation.js +19 -2
  138. package/build/flowNavigation/FlowNavigation.js.map +1 -1
  139. package/build/flowNavigation/FlowNavigation.mjs +19 -2
  140. package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
  141. package/build/header/Header.js +24 -2
  142. package/build/header/Header.js.map +1 -1
  143. package/build/header/Header.mjs +24 -2
  144. package/build/header/Header.mjs.map +1 -1
  145. package/build/i18n/de.json +5 -0
  146. package/build/i18n/de.json.js +5 -0
  147. package/build/i18n/de.json.js.map +1 -1
  148. package/build/i18n/de.json.mjs +5 -0
  149. package/build/i18n/de.json.mjs.map +1 -1
  150. package/build/i18n/es.json +5 -0
  151. package/build/i18n/es.json.js +5 -0
  152. package/build/i18n/es.json.js.map +1 -1
  153. package/build/i18n/es.json.mjs +5 -0
  154. package/build/i18n/es.json.mjs.map +1 -1
  155. package/build/i18n/fr.json +5 -0
  156. package/build/i18n/fr.json.js +5 -0
  157. package/build/i18n/fr.json.js.map +1 -1
  158. package/build/i18n/fr.json.mjs +5 -0
  159. package/build/i18n/fr.json.mjs.map +1 -1
  160. package/build/i18n/hu.json +5 -0
  161. package/build/i18n/hu.json.js +5 -0
  162. package/build/i18n/hu.json.js.map +1 -1
  163. package/build/i18n/hu.json.mjs +5 -0
  164. package/build/i18n/hu.json.mjs.map +1 -1
  165. package/build/i18n/id.json +5 -0
  166. package/build/i18n/id.json.js +5 -0
  167. package/build/i18n/id.json.js.map +1 -1
  168. package/build/i18n/id.json.mjs +5 -0
  169. package/build/i18n/id.json.mjs.map +1 -1
  170. package/build/i18n/it.json +5 -0
  171. package/build/i18n/it.json.js +5 -0
  172. package/build/i18n/it.json.js.map +1 -1
  173. package/build/i18n/it.json.mjs +5 -0
  174. package/build/i18n/it.json.mjs.map +1 -1
  175. package/build/i18n/ja.json +5 -0
  176. package/build/i18n/ja.json.js +5 -0
  177. package/build/i18n/ja.json.js.map +1 -1
  178. package/build/i18n/ja.json.mjs +5 -0
  179. package/build/i18n/ja.json.mjs.map +1 -1
  180. package/build/i18n/pl.json +5 -0
  181. package/build/i18n/pl.json.js +5 -0
  182. package/build/i18n/pl.json.js.map +1 -1
  183. package/build/i18n/pl.json.mjs +5 -0
  184. package/build/i18n/pl.json.mjs.map +1 -1
  185. package/build/i18n/pt.json +5 -0
  186. package/build/i18n/pt.json.js +5 -0
  187. package/build/i18n/pt.json.js.map +1 -1
  188. package/build/i18n/pt.json.mjs +5 -0
  189. package/build/i18n/pt.json.mjs.map +1 -1
  190. package/build/i18n/ro.json +5 -0
  191. package/build/i18n/ro.json.js +5 -0
  192. package/build/i18n/ro.json.js.map +1 -1
  193. package/build/i18n/ro.json.mjs +5 -0
  194. package/build/i18n/ro.json.mjs.map +1 -1
  195. package/build/i18n/ru.json +5 -0
  196. package/build/i18n/ru.json.js +5 -0
  197. package/build/i18n/ru.json.js.map +1 -1
  198. package/build/i18n/ru.json.mjs +5 -0
  199. package/build/i18n/ru.json.mjs.map +1 -1
  200. package/build/i18n/tr.json +5 -0
  201. package/build/i18n/tr.json.js +5 -0
  202. package/build/i18n/tr.json.js.map +1 -1
  203. package/build/i18n/tr.json.mjs +5 -0
  204. package/build/i18n/tr.json.mjs.map +1 -1
  205. package/build/image/Image.js +4 -1
  206. package/build/image/Image.js.map +1 -1
  207. package/build/image/Image.mjs +4 -1
  208. package/build/image/Image.mjs.map +1 -1
  209. package/build/index.js +69 -62
  210. package/build/index.js.map +1 -1
  211. package/build/index.mjs +27 -20
  212. package/build/index.mjs.map +1 -1
  213. package/build/info/Info.js +21 -3
  214. package/build/info/Info.js.map +1 -1
  215. package/build/info/Info.mjs +21 -3
  216. package/build/info/Info.mjs.map +1 -1
  217. package/build/inlineAlert/InlineAlert.js +24 -3
  218. package/build/inlineAlert/InlineAlert.js.map +1 -1
  219. package/build/inlineAlert/InlineAlert.mjs +24 -3
  220. package/build/inlineAlert/InlineAlert.mjs.map +1 -1
  221. package/build/inputs/SearchInput.js +23 -2
  222. package/build/inputs/SearchInput.js.map +1 -1
  223. package/build/inputs/SearchInput.mjs +23 -2
  224. package/build/inputs/SearchInput.mjs.map +1 -1
  225. package/build/instructionsList/InstructionsList.js +22 -1
  226. package/build/instructionsList/InstructionsList.js.map +1 -1
  227. package/build/instructionsList/InstructionsList.mjs +22 -1
  228. package/build/instructionsList/InstructionsList.mjs.map +1 -1
  229. package/build/loader/Loader.js +22 -1
  230. package/build/loader/Loader.js.map +1 -1
  231. package/build/loader/Loader.mjs +22 -1
  232. package/build/loader/Loader.mjs.map +1 -1
  233. package/build/main.css +46 -22
  234. package/build/markdown/Markdown.js +24 -1
  235. package/build/markdown/Markdown.js.map +1 -1
  236. package/build/markdown/Markdown.mjs +24 -1
  237. package/build/markdown/Markdown.mjs.map +1 -1
  238. package/build/modal/Modal.js +22 -5
  239. package/build/modal/Modal.js.map +1 -1
  240. package/build/modal/Modal.mjs +22 -5
  241. package/build/modal/Modal.mjs.map +1 -1
  242. package/build/moneyInput/MoneyInput.js +22 -3
  243. package/build/moneyInput/MoneyInput.js.map +1 -1
  244. package/build/moneyInput/MoneyInput.mjs +22 -3
  245. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  246. package/build/navigationOption/NavigationOption.js +23 -2
  247. package/build/navigationOption/NavigationOption.js.map +1 -1
  248. package/build/navigationOption/NavigationOption.mjs +23 -2
  249. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  250. package/build/nudge/Nudge.js +19 -1
  251. package/build/nudge/Nudge.js.map +1 -1
  252. package/build/nudge/Nudge.mjs +19 -1
  253. package/build/nudge/Nudge.mjs.map +1 -1
  254. package/build/overlayHeader/OverlayHeader.js +19 -1
  255. package/build/overlayHeader/OverlayHeader.js.map +1 -1
  256. package/build/overlayHeader/OverlayHeader.mjs +19 -1
  257. package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
  258. package/build/phoneNumberInput/PhoneNumberInput.js +23 -2
  259. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  260. package/build/phoneNumberInput/PhoneNumberInput.mjs +23 -2
  261. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  262. package/build/popover/Popover.js +24 -4
  263. package/build/popover/Popover.js.map +1 -1
  264. package/build/popover/Popover.mjs +24 -4
  265. package/build/popover/Popover.mjs.map +1 -1
  266. package/build/processIndicator/ProcessIndicator.js +22 -1
  267. package/build/processIndicator/ProcessIndicator.js.map +1 -1
  268. package/build/processIndicator/ProcessIndicator.mjs +22 -1
  269. package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
  270. package/build/progressBar/ProgressBar.js +24 -2
  271. package/build/progressBar/ProgressBar.js.map +1 -1
  272. package/build/progressBar/ProgressBar.mjs +24 -2
  273. package/build/progressBar/ProgressBar.mjs.map +1 -1
  274. package/build/promoCard/PromoCard.js +22 -2
  275. package/build/promoCard/PromoCard.js.map +1 -1
  276. package/build/promoCard/PromoCard.mjs +22 -2
  277. package/build/promoCard/PromoCard.mjs.map +1 -1
  278. package/build/promoCard/PromoCardIndicator.js +22 -1
  279. package/build/promoCard/PromoCardIndicator.js.map +1 -1
  280. package/build/promoCard/PromoCardIndicator.mjs +22 -1
  281. package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
  282. package/build/provider/Provider.js +25 -2
  283. package/build/provider/Provider.js.map +1 -1
  284. package/build/provider/Provider.mjs +25 -2
  285. package/build/provider/Provider.mjs.map +1 -1
  286. package/build/radio/Radio.js +24 -2
  287. package/build/radio/Radio.js.map +1 -1
  288. package/build/radio/Radio.mjs +24 -2
  289. package/build/radio/Radio.mjs.map +1 -1
  290. package/build/segmentedControl/SegmentedControl.js +22 -1
  291. package/build/segmentedControl/SegmentedControl.js.map +1 -1
  292. package/build/segmentedControl/SegmentedControl.mjs +22 -1
  293. package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
  294. package/build/select/Select.js +26 -4
  295. package/build/select/Select.js.map +1 -1
  296. package/build/select/Select.mjs +26 -4
  297. package/build/select/Select.mjs.map +1 -1
  298. package/build/select/option/Option.js +22 -1
  299. package/build/select/option/Option.js.map +1 -1
  300. package/build/select/option/Option.mjs +22 -1
  301. package/build/select/option/Option.mjs.map +1 -1
  302. package/build/selectOption/SelectOption.js +24 -6
  303. package/build/selectOption/SelectOption.js.map +1 -1
  304. package/build/selectOption/SelectOption.mjs +24 -6
  305. package/build/selectOption/SelectOption.mjs.map +1 -1
  306. package/build/statusIcon/StatusIcon.js +26 -8
  307. package/build/statusIcon/StatusIcon.js.map +1 -1
  308. package/build/statusIcon/StatusIcon.mjs +26 -8
  309. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  310. package/build/stepper/Stepper.js +25 -3
  311. package/build/stepper/Stepper.js.map +1 -1
  312. package/build/stepper/Stepper.mjs +25 -3
  313. package/build/stepper/Stepper.mjs.map +1 -1
  314. package/build/stepper/deviceDetection.js +2 -3
  315. package/build/stepper/deviceDetection.js.map +1 -1
  316. package/build/stepper/deviceDetection.mjs +2 -3
  317. package/build/stepper/deviceDetection.mjs.map +1 -1
  318. package/build/sticky/Sticky.js +25 -2
  319. package/build/sticky/Sticky.js.map +1 -1
  320. package/build/sticky/Sticky.mjs +25 -2
  321. package/build/sticky/Sticky.mjs.map +1 -1
  322. package/build/styles/avatar/Avatar.css +29 -0
  323. package/build/styles/badge/Badge.css +6 -0
  324. package/build/styles/circularButton/CircularButton.css +2 -2
  325. package/build/styles/common/circle/Circle.css +4 -0
  326. package/build/styles/main.css +46 -22
  327. package/build/styles/statusIcon/StatusIcon.css +0 -20
  328. package/build/summary/Summary.js +21 -5
  329. package/build/summary/Summary.js.map +1 -1
  330. package/build/summary/Summary.mjs +21 -5
  331. package/build/summary/Summary.mjs.map +1 -1
  332. package/build/tabs/Tabs.js +23 -3
  333. package/build/tabs/Tabs.js.map +1 -1
  334. package/build/tabs/Tabs.mjs +23 -3
  335. package/build/tabs/Tabs.mjs.map +1 -1
  336. package/build/tile/Tile.js +24 -2
  337. package/build/tile/Tile.js.map +1 -1
  338. package/build/tile/Tile.mjs +24 -2
  339. package/build/tile/Tile.mjs.map +1 -1
  340. package/build/title/Title.js +23 -1
  341. package/build/title/Title.js.map +1 -1
  342. package/build/title/Title.mjs +23 -1
  343. package/build/title/Title.mjs.map +1 -1
  344. package/build/tooltip/Tooltip.js +22 -1
  345. package/build/tooltip/Tooltip.js.map +1 -1
  346. package/build/tooltip/Tooltip.mjs +22 -1
  347. package/build/tooltip/Tooltip.mjs.map +1 -1
  348. package/build/typeahead/Typeahead.js +22 -4
  349. package/build/typeahead/Typeahead.js.map +1 -1
  350. package/build/typeahead/Typeahead.mjs +22 -4
  351. package/build/typeahead/Typeahead.mjs.map +1 -1
  352. package/build/types/avatar/Avatar.d.ts.map +1 -1
  353. package/build/types/badge/Badge.d.ts.map +1 -1
  354. package/build/types/button/Button.d.ts.map +1 -1
  355. package/build/types/button/Button.messages.d.ts +7 -7
  356. package/build/types/button/Button.messages.d.ts.map +1 -1
  357. package/build/types/button/classMap.d.ts +10 -10
  358. package/build/types/button/classMap.d.ts.map +1 -1
  359. package/build/types/button/legacyUtils/index.d.ts +1 -1
  360. package/build/types/button/legacyUtils/index.d.ts.map +1 -1
  361. package/build/types/button/legacyUtils/legacyUtils.d.ts +20 -6
  362. package/build/types/button/legacyUtils/legacyUtils.d.ts.map +1 -1
  363. package/build/types/checkboxButton/index.d.ts +1 -1
  364. package/build/types/checkboxButton/index.d.ts.map +1 -1
  365. package/build/types/common/circle/Circle.d.ts +1 -1
  366. package/build/types/common/circle/Circle.d.ts.map +1 -1
  367. package/build/types/common/fakeEvents.d.ts +23 -0
  368. package/build/types/common/fakeEvents.d.ts.map +1 -0
  369. package/build/types/common/hooks/index.d.ts +4 -4
  370. package/build/types/common/hooks/index.d.ts.map +1 -1
  371. package/build/types/common/hooks/useConditionalListener/index.d.ts +1 -1
  372. package/build/types/common/hooks/useConditionalListener/index.d.ts.map +1 -1
  373. package/build/types/common/hooks/useDirection/index.d.ts +1 -1
  374. package/build/types/common/hooks/useDirection/index.d.ts.map +1 -1
  375. package/build/types/common/hooks/useHasIntersected/index.d.ts +1 -1
  376. package/build/types/common/hooks/useHasIntersected/index.d.ts.map +1 -1
  377. package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts +15 -4
  378. package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts.map +1 -1
  379. package/build/types/common/index.d.ts +28 -28
  380. package/build/types/common/index.d.ts.map +1 -1
  381. package/build/types/common/responsivePanel/index.d.ts +1 -1
  382. package/build/types/common/responsivePanel/index.d.ts.map +1 -1
  383. package/build/types/index.d.ts +1 -0
  384. package/build/types/index.d.ts.map +1 -1
  385. package/build/types/navigationOption/NavigationOption.d.ts +1 -0
  386. package/build/types/navigationOption/NavigationOption.d.ts.map +1 -1
  387. package/build/types/statusIcon/StatusIcon.d.ts +7 -3
  388. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  389. package/build/types/stepper/deviceDetection.d.ts +1 -1
  390. package/build/types/stepper/deviceDetection.d.ts.map +1 -1
  391. package/build/types/test-utils/style-mock.d.ts +1 -0
  392. package/build/types/test-utils/style-mock.d.ts.map +1 -0
  393. package/build/types/utilities/deprecatedProperty/deprecatedProperty.d.ts +8 -6
  394. package/build/types/utilities/deprecatedProperty/deprecatedProperty.d.ts.map +1 -1
  395. package/build/types/utilities/deprecatedProperty/index.d.ts +1 -1
  396. package/build/types/utilities/deprecatedProperty/index.d.ts.map +1 -1
  397. package/build/types/utilities/index.d.ts +2 -2
  398. package/build/types/utilities/index.d.ts.map +1 -1
  399. package/build/types/utilities/logActionRequired.d.ts +2 -2
  400. package/build/types/utilities/logActionRequired.d.ts.map +1 -1
  401. package/build/upload/Upload.js +21 -2
  402. package/build/upload/Upload.js.map +1 -1
  403. package/build/upload/Upload.mjs +21 -2
  404. package/build/upload/Upload.mjs.map +1 -1
  405. package/build/upload/steps/processingStep/processingStep.js +25 -3
  406. package/build/upload/steps/processingStep/processingStep.js.map +1 -1
  407. package/build/upload/steps/processingStep/processingStep.mjs +25 -3
  408. package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
  409. package/build/upload/steps/uploadImageStep/uploadImageStep.js +23 -3
  410. package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
  411. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +23 -3
  412. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
  413. package/build/uploadInput/UploadInput.js +22 -3
  414. package/build/uploadInput/UploadInput.js.map +1 -1
  415. package/build/uploadInput/UploadInput.mjs +22 -3
  416. package/build/uploadInput/UploadInput.mjs.map +1 -1
  417. package/build/uploadInput/uploadButton/UploadButton.js +21 -2
  418. package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
  419. package/build/uploadInput/uploadButton/UploadButton.mjs +21 -2
  420. package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
  421. package/build/uploadInput/uploadButton/defaults.js +24 -0
  422. package/build/uploadInput/uploadButton/defaults.js.map +1 -1
  423. package/build/uploadInput/uploadButton/defaults.mjs +24 -0
  424. package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
  425. package/build/uploadInput/uploadItem/UploadItem.js +21 -4
  426. package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
  427. package/build/uploadInput/uploadItem/UploadItem.mjs +21 -4
  428. package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
  429. package/build/utilities/logActionRequired.js.map +1 -1
  430. package/build/utilities/logActionRequired.mjs.map +1 -1
  431. package/build/withDisplayFormat/WithDisplayFormat.js +25 -1
  432. package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
  433. package/build/withDisplayFormat/WithDisplayFormat.mjs +25 -1
  434. package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  435. package/package.json +3 -3
  436. package/src/avatar/Avatar.css +29 -0
  437. package/src/avatar/Avatar.less +12 -0
  438. package/src/avatar/Avatar.tsx +4 -8
  439. package/src/avatarWrapper/__snapshots__/AvatarWrapper.spec.tsx.snap +11 -22
  440. package/src/badge/Badge.css +6 -0
  441. package/src/badge/Badge.less +6 -0
  442. package/src/badge/Badge.tsx +1 -11
  443. package/src/button/Button.tsx +0 -3
  444. package/src/button/legacyUtils/legacyUtils.ts +74 -0
  445. package/src/circularButton/CircularButton.css +2 -2
  446. package/src/circularButton/CircularButton.less +1 -1
  447. package/src/circularButton/CircularButton.story.tsx +3 -0
  448. package/src/circularButton/CircularButton.tsx +1 -1
  449. package/src/circularButton/__snapshots__/CircularButton.spec.tsx.snap +10 -10
  450. package/src/common/circle/Circle.css +4 -0
  451. package/src/common/circle/Circle.less +6 -0
  452. package/src/common/circle/Circle.story.tsx +2 -2
  453. package/src/common/circle/Circle.tsx +25 -2
  454. package/src/common/{fakeEvents.js → fakeEvents.ts} +1 -1
  455. package/src/common/hooks/useHasIntersected/{useHasIntersected.js → useHasIntersected.ts} +20 -11
  456. package/src/flowNavigation/{FlowNavigation.story.js → FlowNavigation.story.tsx} +34 -16
  457. package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +4 -8
  458. package/src/i18n/de.json +5 -0
  459. package/src/i18n/es.json +5 -0
  460. package/src/i18n/fr.json +5 -0
  461. package/src/i18n/hu.json +5 -0
  462. package/src/i18n/id.json +5 -0
  463. package/src/i18n/it.json +5 -0
  464. package/src/i18n/ja.json +5 -0
  465. package/src/i18n/pl.json +5 -0
  466. package/src/i18n/pt.json +5 -0
  467. package/src/i18n/ro.json +5 -0
  468. package/src/i18n/ru.json +5 -0
  469. package/src/i18n/tr.json +5 -0
  470. package/src/index.ts +1 -0
  471. package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.tsx +78 -0
  472. package/src/main.css +46 -22
  473. package/src/navigationOption/{NavigationOption.story.js → NavigationOption.story.tsx} +23 -5
  474. package/src/navigationOption/NavigationOption.tsx +1 -1
  475. package/src/overlayHeader/__snapshots__/OverlayHeader.spec.tsx.snap +2 -4
  476. package/src/promoCard/PromoCard.spec.tsx +1 -1
  477. package/src/radio/__snapshots__/Radio.rtl.spec.tsx.snap +2 -4
  478. package/src/select/{Select.story.js → Select.story.tsx} +97 -47
  479. package/src/statusIcon/StatusIcon.css +0 -20
  480. package/src/statusIcon/StatusIcon.less +0 -17
  481. package/src/statusIcon/StatusIcon.spec.tsx +2 -21
  482. package/src/statusIcon/StatusIcon.story.tsx +32 -1
  483. package/src/statusIcon/StatusIcon.tsx +11 -10
  484. package/src/stepper/{deviceDetection.js → deviceDetection.ts} +2 -6
  485. package/src/utilities/deprecatedProperty/{deprecatedProperty.spec.js → deprecatedProperty.spec.ts} +7 -13
  486. package/src/utilities/deprecatedProperty/{deprecatedProperty.js → deprecatedProperty.ts} +23 -4
  487. package/src/utilities/{logActionRequired.js → logActionRequired.ts} +2 -2
  488. package/src/button/legacyUtils/legacyUtils.js +0 -54
  489. package/src/common/requirements.js +0 -440
  490. package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.js +0 -85
  491. /package/src/button/{Button.messages.js → Button.messages.ts} +0 -0
  492. /package/src/button/{classMap.js → classMap.ts} +0 -0
  493. /package/src/button/legacyUtils/{index.js → index.ts} +0 -0
  494. /package/src/checkboxButton/{index.js → index.ts} +0 -0
  495. /package/src/common/hooks/{index.js → index.ts} +0 -0
  496. /package/src/common/hooks/useConditionalListener/{index.js → index.ts} +0 -0
  497. /package/src/common/hooks/useDirection/{index.js → index.ts} +0 -0
  498. /package/src/common/hooks/useHasIntersected/{index.js → index.ts} +0 -0
  499. /package/src/common/{index.js → index.ts} +0 -0
  500. /package/src/common/responsivePanel/{index.js → index.ts} +0 -0
  501. /package/src/test-utils/{style-mock.js → style-mock.ts} +0 -0
  502. /package/src/utilities/deprecatedProperty/{index.js → index.ts} +0 -0
  503. /package/src/utilities/{index.js → index.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Circle.js","sources":["../../../src/common/circle/Circle.tsx"],"sourcesContent":["import { HTMLAttributes, forwardRef } from 'react';\nimport { clsx } from 'clsx';\n\nexport type ShapeSize = 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72;\n\nexport type Props = {\n /**\n * Modify underlying element, `div` by default\n */\n as?: React.ElementType;\n /**\n * Set size of the circle in px, `48` by default\n */\n size?: ShapeSize;\n /**\n * When `true` will use the fixed size (`48px`) instead of the CSS spacing variable (`--size-*`)\n * as those can be dynamic a at certain viewport sizes\n */\n fixedSize?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\nconst Circle = forwardRef(function Circle(\n {\n as: Element = 'div',\n children,\n size = 48,\n fixedSize = false,\n className,\n style,\n ...props\n }: Props,\n ref,\n) {\n return (\n <Element\n {...props}\n ref={ref}\n style={{ ...style, '--circle-size': fixedSize ? `${size}px` : `var(--size-${size})` }}\n className={clsx('np-circle', 'd-flex align-items-center justify-content-center', className)}\n >\n {children}\n </Element>\n );\n});\n\nexport default Circle;\n"],"names":["Circle","forwardRef","as","Element","children","size","fixedSize","className","style","props","ref","_jsx","clsx"],"mappings":";;;;;;AAqBA,MAAMA,MAAM,gBAAGC,gBAAU,CAAC,SAASD,MAAMA,CACvC;EACEE,EAAE,EAAEC,OAAO,GAAG,KAAK;EACnBC,QAAQ;AACRC,EAAAA,IAAI,GAAG,EAAE;AACTC,EAAAA,SAAS,GAAG,KAAK;EACjBC,SAAS;EACTC,KAAK;EACL,GAAGC,KAAAA;AAAK,CACF,EACRC,GAAG,EAAA;EAEH,oBACEC,cAAA,CAACR,OAAO,EAAA;AAAA,IAAA,GACFM,KAAK;AACTC,IAAAA,GAAG,EAAEA,GAAI;AACTF,IAAAA,KAAK,EAAE;AAAE,MAAA,GAAGA,KAAK;MAAE,eAAe,EAAEF,SAAS,GAAG,CAAA,EAAGD,IAAI,CAAI,EAAA,CAAA,GAAG,cAAcA,IAAI,CAAA,CAAA,CAAA;KAAM;IACtFE,SAAS,EAAEK,SAAI,CAAC,WAAW,EAAE,kDAAkD,EAAEL,SAAS,CAAE;AAAAH,IAAAA,QAAA,EAE3FA,QAAAA;AAAQ,GACF,CAAC,CAAA;AAEd,CAAC;;;;"}
1
+ {"version":3,"file":"Circle.js","sources":["../../../src/common/circle/Circle.tsx"],"sourcesContent":["import { HTMLAttributes, forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport { useMedia } from '../hooks/useMedia';\nimport { Breakpoint } from '../propsValues/breakpoint';\n\nexport type ShapeSize = 16 | 24 | 32 | 40 | 48 | 56 | 72;\n\nexport type Props = {\n /**\n * Modify underlying element, `div` by default\n */\n as?: React.ElementType;\n /**\n * Set size of the circle in px, `48` by default\n */\n size?: ShapeSize;\n /**\n * When `true` will use the fixed size (`48px`) instead of the CSS spacing variable (`--size-*`)\n * as those can be dynamic a at certain viewport sizes\n */\n fixedSize?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\n/**\n * circle like components has custom sizes for icons\n */\nconst MAP_ICON_SIZE = {\n 16: 12,\n 24: 16,\n 32: 18,\n 40: 20,\n 48: 24,\n 56: 28,\n 72: 36,\n};\n\nconst Circle = forwardRef(function Circle(\n {\n as: Element = 'div',\n children,\n size = 48,\n fixedSize = false,\n className,\n style,\n ...props\n }: Props,\n ref,\n) {\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n return (\n <Element\n {...props}\n ref={ref}\n style={{\n '--circle-size': fixedSize ? `${size}px` : `var(--size-${size})`,\n '--circle-icon-size':\n isTinyViewport && !fixedSize\n ? `${MAP_ICON_SIZE[size] / 2}px`\n : `${MAP_ICON_SIZE[size]}px`,\n ...style,\n }}\n className={clsx('np-circle', 'd-flex align-items-center justify-content-center', className)}\n >\n {children}\n </Element>\n );\n});\n\nexport default Circle;\n"],"names":["MAP_ICON_SIZE","Circle","forwardRef","as","Element","children","size","fixedSize","className","style","props","ref","isTinyViewport","useMedia","Breakpoint","ZOOM_400","_jsx","clsx"],"mappings":";;;;;;;;AA0BA,MAAMA,aAAa,GAAG;AACpB,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAA;CACL,CAAA;AAED,MAAMC,MAAM,gBAAGC,gBAAU,CAAC,SAASD,MAAMA,CACvC;EACEE,EAAE,EAAEC,OAAO,GAAG,KAAK;EACnBC,QAAQ;AACRC,EAAAA,IAAI,GAAG,EAAE;AACTC,EAAAA,SAAS,GAAG,KAAK;EACjBC,SAAS;EACTC,KAAK;EACL,GAAGC,KAAAA;AAAK,CACF,EACRC,GAAG,EAAA;EAEH,MAAMC,cAAc,GAAGC,iBAAQ,CAAC,eAAeC,qBAAU,CAACC,QAAQ,CAAA,GAAA,CAAK,CAAC,CAAA;EACxE,oBACEC,cAAA,CAACZ,OAAO,EAAA;AAAA,IAAA,GACFM,KAAK;AACTC,IAAAA,GAAG,EAAEA,GAAI;AACTF,IAAAA,KAAK,EAAE;MACL,eAAe,EAAEF,SAAS,GAAG,CAAA,EAAGD,IAAI,CAAI,EAAA,CAAA,GAAG,CAAcA,WAAAA,EAAAA,IAAI,CAAG,CAAA,CAAA;MAChE,oBAAoB,EAClBM,cAAc,IAAI,CAACL,SAAS,GACxB,CAAA,EAAGP,aAAa,CAACM,IAAI,CAAC,GAAG,CAAC,IAAI,GAC9B,CAAA,EAAGN,aAAa,CAACM,IAAI,CAAC,CAAI,EAAA,CAAA;MAChC,GAAGG,KAAAA;KACH;IACFD,SAAS,EAAES,SAAI,CAAC,WAAW,EAAE,kDAAkD,EAAET,SAAS,CAAE;AAAAH,IAAAA,QAAA,EAE3FA,QAAAA;AAAQ,GACF,CAAC,CAAA;AAEd,CAAC;;;;"}
@@ -1,7 +1,18 @@
1
1
  import { forwardRef } from 'react';
2
2
  import { clsx } from 'clsx';
3
+ import { useMedia } from '../hooks/useMedia.mjs';
4
+ import { Breakpoint } from '../propsValues/breakpoint.mjs';
3
5
  import { jsx } from 'react/jsx-runtime';
4
6
 
7
+ const MAP_ICON_SIZE = {
8
+ 16: 12,
9
+ 24: 16,
10
+ 32: 18,
11
+ 40: 20,
12
+ 48: 24,
13
+ 56: 28,
14
+ 72: 36
15
+ };
5
16
  const Circle = /*#__PURE__*/forwardRef(function Circle({
6
17
  as: Element = 'div',
7
18
  children,
@@ -11,12 +22,14 @@ const Circle = /*#__PURE__*/forwardRef(function Circle({
11
22
  style,
12
23
  ...props
13
24
  }, ref) {
25
+ const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
14
26
  return /*#__PURE__*/jsx(Element, {
15
27
  ...props,
16
28
  ref: ref,
17
29
  style: {
18
- ...style,
19
- '--circle-size': fixedSize ? `${size}px` : `var(--size-${size})`
30
+ '--circle-size': fixedSize ? `${size}px` : `var(--size-${size})`,
31
+ '--circle-icon-size': isTinyViewport && !fixedSize ? `${MAP_ICON_SIZE[size] / 2}px` : `${MAP_ICON_SIZE[size]}px`,
32
+ ...style
20
33
  },
21
34
  className: clsx('np-circle', 'd-flex align-items-center justify-content-center', className),
22
35
  children: children
@@ -1 +1 @@
1
- {"version":3,"file":"Circle.mjs","sources":["../../../src/common/circle/Circle.tsx"],"sourcesContent":["import { HTMLAttributes, forwardRef } from 'react';\nimport { clsx } from 'clsx';\n\nexport type ShapeSize = 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72;\n\nexport type Props = {\n /**\n * Modify underlying element, `div` by default\n */\n as?: React.ElementType;\n /**\n * Set size of the circle in px, `48` by default\n */\n size?: ShapeSize;\n /**\n * When `true` will use the fixed size (`48px`) instead of the CSS spacing variable (`--size-*`)\n * as those can be dynamic a at certain viewport sizes\n */\n fixedSize?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\nconst Circle = forwardRef(function Circle(\n {\n as: Element = 'div',\n children,\n size = 48,\n fixedSize = false,\n className,\n style,\n ...props\n }: Props,\n ref,\n) {\n return (\n <Element\n {...props}\n ref={ref}\n style={{ ...style, '--circle-size': fixedSize ? `${size}px` : `var(--size-${size})` }}\n className={clsx('np-circle', 'd-flex align-items-center justify-content-center', className)}\n >\n {children}\n </Element>\n );\n});\n\nexport default Circle;\n"],"names":["Circle","forwardRef","as","Element","children","size","fixedSize","className","style","props","ref","_jsx","clsx"],"mappings":";;;;AAqBA,MAAMA,MAAM,gBAAGC,UAAU,CAAC,SAASD,MAAMA,CACvC;EACEE,EAAE,EAAEC,OAAO,GAAG,KAAK;EACnBC,QAAQ;AACRC,EAAAA,IAAI,GAAG,EAAE;AACTC,EAAAA,SAAS,GAAG,KAAK;EACjBC,SAAS;EACTC,KAAK;EACL,GAAGC,KAAAA;AAAK,CACF,EACRC,GAAG,EAAA;EAEH,oBACEC,GAAA,CAACR,OAAO,EAAA;AAAA,IAAA,GACFM,KAAK;AACTC,IAAAA,GAAG,EAAEA,GAAI;AACTF,IAAAA,KAAK,EAAE;AAAE,MAAA,GAAGA,KAAK;MAAE,eAAe,EAAEF,SAAS,GAAG,CAAA,EAAGD,IAAI,CAAI,EAAA,CAAA,GAAG,cAAcA,IAAI,CAAA,CAAA,CAAA;KAAM;IACtFE,SAAS,EAAEK,IAAI,CAAC,WAAW,EAAE,kDAAkD,EAAEL,SAAS,CAAE;AAAAH,IAAAA,QAAA,EAE3FA,QAAAA;AAAQ,GACF,CAAC,CAAA;AAEd,CAAC;;;;"}
1
+ {"version":3,"file":"Circle.mjs","sources":["../../../src/common/circle/Circle.tsx"],"sourcesContent":["import { HTMLAttributes, forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport { useMedia } from '../hooks/useMedia';\nimport { Breakpoint } from '../propsValues/breakpoint';\n\nexport type ShapeSize = 16 | 24 | 32 | 40 | 48 | 56 | 72;\n\nexport type Props = {\n /**\n * Modify underlying element, `div` by default\n */\n as?: React.ElementType;\n /**\n * Set size of the circle in px, `48` by default\n */\n size?: ShapeSize;\n /**\n * When `true` will use the fixed size (`48px`) instead of the CSS spacing variable (`--size-*`)\n * as those can be dynamic a at certain viewport sizes\n */\n fixedSize?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\n/**\n * circle like components has custom sizes for icons\n */\nconst MAP_ICON_SIZE = {\n 16: 12,\n 24: 16,\n 32: 18,\n 40: 20,\n 48: 24,\n 56: 28,\n 72: 36,\n};\n\nconst Circle = forwardRef(function Circle(\n {\n as: Element = 'div',\n children,\n size = 48,\n fixedSize = false,\n className,\n style,\n ...props\n }: Props,\n ref,\n) {\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n return (\n <Element\n {...props}\n ref={ref}\n style={{\n '--circle-size': fixedSize ? `${size}px` : `var(--size-${size})`,\n '--circle-icon-size':\n isTinyViewport && !fixedSize\n ? `${MAP_ICON_SIZE[size] / 2}px`\n : `${MAP_ICON_SIZE[size]}px`,\n ...style,\n }}\n className={clsx('np-circle', 'd-flex align-items-center justify-content-center', className)}\n >\n {children}\n </Element>\n );\n});\n\nexport default Circle;\n"],"names":["MAP_ICON_SIZE","Circle","forwardRef","as","Element","children","size","fixedSize","className","style","props","ref","isTinyViewport","useMedia","Breakpoint","ZOOM_400","_jsx","clsx"],"mappings":";;;;;;AA0BA,MAAMA,aAAa,GAAG;AACpB,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAE;AACN,EAAA,EAAE,EAAE,EAAA;CACL,CAAA;AAED,MAAMC,MAAM,gBAAGC,UAAU,CAAC,SAASD,MAAMA,CACvC;EACEE,EAAE,EAAEC,OAAO,GAAG,KAAK;EACnBC,QAAQ;AACRC,EAAAA,IAAI,GAAG,EAAE;AACTC,EAAAA,SAAS,GAAG,KAAK;EACjBC,SAAS;EACTC,KAAK;EACL,GAAGC,KAAAA;AAAK,CACF,EACRC,GAAG,EAAA;EAEH,MAAMC,cAAc,GAAGC,QAAQ,CAAC,eAAeC,UAAU,CAACC,QAAQ,CAAA,GAAA,CAAK,CAAC,CAAA;EACxE,oBACEC,GAAA,CAACZ,OAAO,EAAA;AAAA,IAAA,GACFM,KAAK;AACTC,IAAAA,GAAG,EAAEA,GAAI;AACTF,IAAAA,KAAK,EAAE;MACL,eAAe,EAAEF,SAAS,GAAG,CAAA,EAAGD,IAAI,CAAI,EAAA,CAAA,GAAG,CAAcA,WAAAA,EAAAA,IAAI,CAAG,CAAA,CAAA;MAChE,oBAAoB,EAClBM,cAAc,IAAI,CAACL,SAAS,GACxB,CAAA,EAAGP,aAAa,CAACM,IAAI,CAAC,GAAG,CAAC,IAAI,GAC9B,CAAA,EAAGN,aAAa,CAACM,IAAI,CAAC,CAAI,EAAA,CAAA;MAChC,GAAGG,KAAAA;KACH;IACFD,SAAS,EAAES,IAAI,CAAC,WAAW,EAAE,kDAAkD,EAAET,SAAS,CAAE;AAAAH,IAAAA,QAAA,EAE3FA,QAAAA;AAAQ,GACF,CAAC,CAAA;AAEd,CAAC;;;;"}
@@ -5,21 +5,20 @@ var React = require('react');
5
5
  const ObserverParams = {
6
6
  threshold: 0.1
7
7
  };
8
-
9
8
  /**
10
9
  * useHasIntersected.
11
10
  * Use this custom hook to detect when an element has became visible inside the viewport. This hook checks only if the intersection happend.
12
11
  * Once the intersection has happened the hook will not return false even if the element gets out of the viewport.
13
12
  *
14
- * @param elRef.elRef
15
- * @param {object} [elRef] - node object that contains a react reference to the element that needs to be observed.
16
- * @param {strimng} [loading = 'eager'] - string that contains the type of loading.
13
+ * @param {object} params
14
+ * @param {object} [params.elRef] - node object that contains a react reference to the element that needs to be observed.
15
+ * @param {string} [params.loading = 'eager'] - string that contains the type of loading.
17
16
  * @param elRef.loading
18
17
  * @usage `const [hasIntersected] = useHasIntersected({imageRef,loading});`
19
18
  */
20
19
  const useHasIntersected = ({
21
20
  elRef,
22
- loading
21
+ loading = 'eager'
23
22
  }) => {
24
23
  const [hasIntersected, setHasIntersected] = React.useState(false);
25
24
  const {
@@ -32,24 +31,25 @@ const useHasIntersected = ({
32
31
  entries.forEach(entry => {
33
32
  if (entry.isIntersecting) {
34
33
  setHasIntersected(true);
35
- observer.unobserve(current);
34
+ if (current) {
35
+ observer.unobserve(current);
36
+ }
36
37
  }
37
38
  });
38
39
  };
39
40
  React.useEffect(() => {
40
41
  let observer;
41
42
  let didCancel = false;
42
-
43
- // Check if window is define for SSR and Old browsers fallback
43
+ // Check if window is defined for SSR and Old browsers fallback
44
44
  if (typeof window === 'undefined' || !window.IntersectionObserver || !isValidReference()) {
45
45
  setHasIntersected(true);
46
- } else if (!didCancel) {
46
+ } else if (current && !didCancel) {
47
47
  observer = new IntersectionObserver(handleOnIntersect, ObserverParams);
48
48
  observer.observe(current);
49
49
  }
50
50
  return () => {
51
51
  didCancel = true;
52
- if (observer) {
52
+ if (observer && current) {
53
53
  observer.unobserve(current);
54
54
  }
55
55
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useHasIntersected.js","sources":["../../../../src/common/hooks/useHasIntersected/useHasIntersected.js"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nconst ObserverParams = {\n threshold: 0.1,\n};\n\n/**\n * useHasIntersected.\n * Use this custom hook to detect when an element has became visible inside the viewport. This hook checks only if the intersection happend.\n * Once the intersection has happened the hook will not return false even if the element gets out of the viewport.\n *\n * @param elRef.elRef\n * @param {object} [elRef] - node object that contains a react reference to the element that needs to be observed.\n * @param {strimng} [loading = 'eager'] - string that contains the type of loading.\n * @param elRef.loading\n * @usage `const [hasIntersected] = useHasIntersected({imageRef,loading});`\n */\nexport const useHasIntersected = ({ elRef, loading }) => {\n const [hasIntersected, setHasIntersected] = useState(false);\n\n const { current } = elRef || {};\n\n const isValidReference = () => {\n return elRef && current;\n };\n\n const handleOnIntersect = (entries, observer) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n setHasIntersected(true);\n observer.unobserve(current);\n }\n });\n };\n\n useEffect(() => {\n let observer;\n let didCancel = false;\n\n // Check if window is define for SSR and Old browsers fallback\n if (typeof window === 'undefined' || !window.IntersectionObserver || !isValidReference()) {\n setHasIntersected(true);\n } else if (!didCancel) {\n observer = new IntersectionObserver(handleOnIntersect, ObserverParams);\n observer.observe(current);\n }\n return () => {\n didCancel = true;\n if (observer) {\n observer.unobserve(current);\n }\n };\n }, [elRef]);\n\n if (loading === 'eager') {\n return [false];\n }\n\n return [hasIntersected];\n};\n"],"names":["ObserverParams","threshold","useHasIntersected","elRef","loading","hasIntersected","setHasIntersected","useState","current","isValidReference","handleOnIntersect","entries","observer","forEach","entry","isIntersecting","unobserve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AO,CAAC,CAAA;AAC3B,KAAA;AACA,IAAA,OAAO,MAAM;AACXU,MAAAA,SAAS,GAAG,IAAI,CAAA;AAChB,MAAA,IAAIN,QAAQ,EAAE;AACZA,QAAAA,QAAQ,CAACI,SAAS,CAACR,OAAO,CAAC,CAAA;AAC7B,OAAA;KACD,CAAA;AACH,GAAC,EAAE,CAACL,KAAK,CAAC,CAAC,CAAA;EAEX,IAAIC,OAAO,KAAK,OAAO,EAAE;IACvB,OAAO,CAAC,KAAK,CAAC,CAAA;AAChB,GAAA;EAEA,OAAO,CAACC,cAAc,CAAC,CAAA;AACzB;;;;"}
1
+ {"version":3,"file":"useHasIntersected.js","sources":["../../../../src/common/hooks/useHasIntersected/useHasIntersected.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nconst ObserverParams: IntersectionObserverInit = {\n threshold: 0.1,\n};\n\n/**\n * useHasIntersected.\n * Use this custom hook to detect when an element has became visible inside the viewport. This hook checks only if the intersection happend.\n * Once the intersection has happened the hook will not return false even if the element gets out of the viewport.\n *\n * @param {object} params\n * @param {object} [params.elRef] - node object that contains a react reference to the element that needs to be observed.\n * @param {string} [params.loading = 'eager'] - string that contains the type of loading.\n * @param elRef.loading\n * @usage `const [hasIntersected] = useHasIntersected({imageRef,loading});`\n */\nexport const useHasIntersected = ({\n elRef,\n loading = 'eager',\n}: {\n elRef: React.RefObject<HTMLElement>;\n loading?: 'eager' | 'lazy';\n}) => {\n const [hasIntersected, setHasIntersected] = useState(false);\n\n const { current } = elRef || {};\n\n const isValidReference = () => {\n return elRef && current;\n };\n\n const handleOnIntersect: IntersectionObserverCallback = (entries, observer) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n setHasIntersected(true);\n\n if (current) {\n observer.unobserve(current);\n }\n }\n });\n };\n\n useEffect(() => {\n let observer: IntersectionObserver | undefined;\n let didCancel = false;\n\n // Check if window is defined for SSR and Old browsers fallback\n if (typeof window === 'undefined' || !window.IntersectionObserver || !isValidReference()) {\n setHasIntersected(true);\n } else if (current && !didCancel) {\n observer = new IntersectionObserver(handleOnIntersect, ObserverParams);\n observer.observe(current);\n }\n return () => {\n didCancel = true;\n if (observer && current) {\n observer.unobserve(current);\n }\n };\n }, [elRef]);\n\n if (loading === 'eager') {\n return [false];\n }\n\n return [hasIntersected];\n};\n"],"names":["ObserverParams","threshold","useHasIntersected","elRef","loading","hasIntersected","setHasIntersected","useState","current","isValidReference","handleOnIntersect","entries","observer","forEach","entry","isIntersecting","unobserve","useEffect","didCancel","window","IntersectionObserver","observe"],"mappings":";;;;AAEA,MAAMA,cAAc,GAA6B;AAC/CC,EAAAA,SAAS,EAAE,GAAA;CACZ,CAAA;AAED;;;;;;;;;;AAUG;AACI,MAAMC,iBAAiB,GAAGA,CAAC;EAChCC,KAAK;AACLC,EAAAA,OAAO,GAAG,OAAA;AAAO,CAIlB,KAAI;EACH,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAGC,cAAQ,CAAC,KAAK,CAAC,CAAA;EAE3D,MAAM;AAAEC,IAAAA,OAAAA;AAAO,GAAE,GAAGL,KAAK,IAAI,EAAE,CAAA;EAE/B,MAAMM,gBAAgB,GAAGA,MAAK;IAC5B,OAAON,KAAK,IAAIK,OAAO,CAAA;GACxB,CAAA;AAED,EAAA,MAAME,iBAAiB,GAAiCA,CAACC,OAAO,EAAEC,QAAQ,KAAI;AAC5ED,IAAAA,OAAO,CAACE,OAAO,CAAEC,KAAK,IAAI;MACxB,IAAIA,KAAK,CAACC,cAAc,EAAE;QACxBT,iBAAiB,CAAC,IAAI,CAAC,CAAA;AAEvB,QAAA,IAAIE,OAAO,EAAE;AACXI,UAAAA,QAAQ,CAACI,SAAS,CAACR,OAAO,CAAC,CAAA;AAC7B,SAAA;AACF,OAAA;AACF,KAAC,CAAC,CAAA;GACH,CAAA;AAEDS,EAAAA,eAAS,CAAC,MAAK;AACb,IAAA,IAAIL,QAA0C,CAAA;IAC9C,IAAIM,SAAS,GAAG,KAAK,CAAA;AAErB;AACA,IAAA,IAAI,OAAOC,MAAM,KAAK,WAAW,IAAI,CAACA,MAAM,CAACC,oBAAoB,IAAI,CAACX,gBAAgB,EAAE,EAAE;MACxFH,iBAAiB,CAAC,IAAI,CAAC,CAAA;AACzB,KAAC,MAAM,IAAIE,OAAO,IAAI,CAACU,SAAS,EAAE;AAChCN,MAAAA,QAAQ,GAAG,IAAIQ,oBAAoB,CAACV,iBAAiB,EAAEV,cAAc,CAAC,CAAA;AACtEY,MAAAA,QAAQ,CAACS,OAAO,CAACb,OAAO,CAAC,CAAA;AAC3B,KAAA;AACA,IAAA,OAAO,MAAK;AACVU,MAAAA,SAAS,GAAG,IAAI,CAAA;MAChB,IAAIN,QAAQ,IAAIJ,OAAO,EAAE;AACvBI,QAAAA,QAAQ,CAACI,SAAS,CAACR,OAAO,CAAC,CAAA;AAC7B,OAAA;KACD,CAAA;AACH,GAAC,EAAE,CAACL,KAAK,CAAC,CAAC,CAAA;EAEX,IAAIC,OAAO,KAAK,OAAO,EAAE;IACvB,OAAO,CAAC,KAAK,CAAC,CAAA;AAChB,GAAA;EAEA,OAAO,CAACC,cAAc,CAAC,CAAA;AACzB;;;;"}
@@ -3,21 +3,20 @@ import { useState, useEffect } from 'react';
3
3
  const ObserverParams = {
4
4
  threshold: 0.1
5
5
  };
6
-
7
6
  /**
8
7
  * useHasIntersected.
9
8
  * Use this custom hook to detect when an element has became visible inside the viewport. This hook checks only if the intersection happend.
10
9
  * Once the intersection has happened the hook will not return false even if the element gets out of the viewport.
11
10
  *
12
- * @param elRef.elRef
13
- * @param {object} [elRef] - node object that contains a react reference to the element that needs to be observed.
14
- * @param {strimng} [loading = 'eager'] - string that contains the type of loading.
11
+ * @param {object} params
12
+ * @param {object} [params.elRef] - node object that contains a react reference to the element that needs to be observed.
13
+ * @param {string} [params.loading = 'eager'] - string that contains the type of loading.
15
14
  * @param elRef.loading
16
15
  * @usage `const [hasIntersected] = useHasIntersected({imageRef,loading});`
17
16
  */
18
17
  const useHasIntersected = ({
19
18
  elRef,
20
- loading
19
+ loading = 'eager'
21
20
  }) => {
22
21
  const [hasIntersected, setHasIntersected] = useState(false);
23
22
  const {
@@ -30,24 +29,25 @@ const useHasIntersected = ({
30
29
  entries.forEach(entry => {
31
30
  if (entry.isIntersecting) {
32
31
  setHasIntersected(true);
33
- observer.unobserve(current);
32
+ if (current) {
33
+ observer.unobserve(current);
34
+ }
34
35
  }
35
36
  });
36
37
  };
37
38
  useEffect(() => {
38
39
  let observer;
39
40
  let didCancel = false;
40
-
41
- // Check if window is define for SSR and Old browsers fallback
41
+ // Check if window is defined for SSR and Old browsers fallback
42
42
  if (typeof window === 'undefined' || !window.IntersectionObserver || !isValidReference()) {
43
43
  setHasIntersected(true);
44
- } else if (!didCancel) {
44
+ } else if (current && !didCancel) {
45
45
  observer = new IntersectionObserver(handleOnIntersect, ObserverParams);
46
46
  observer.observe(current);
47
47
  }
48
48
  return () => {
49
49
  didCancel = true;
50
- if (observer) {
50
+ if (observer && current) {
51
51
  observer.unobserve(current);
52
52
  }
53
53
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useHasIntersected.mjs","sources":["../../../../src/common/hooks/useHasIntersected/useHasIntersected.js"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nconst ObserverParams = {\n threshold: 0.1,\n};\n\n/**\n * useHasIntersected.\n * Use this custom hook to detect when an element has became visible inside the viewport. This hook checks only if the intersection happend.\n * Once the intersection has happened the hook will not return false even if the element gets out of the viewport.\n *\n * @param elRef.elRef\n * @param {object} [elRef] - node object that contains a react reference to the element that needs to be observed.\n * @param {strimng} [loading = 'eager'] - string that contains the type of loading.\n * @param elRef.loading\n * @usage `const [hasIntersected] = useHasIntersected({imageRef,loading});`\n */\nexport const useHasIntersected = ({ elRef, loading }) => {\n const [hasIntersected, setHasIntersected] = useState(false);\n\n const { current } = elRef || {};\n\n const isValidReference = () => {\n return elRef && current;\n };\n\n const handleOnIntersect = (entries, observer) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n setHasIntersected(true);\n observer.unobserve(current);\n }\n });\n };\n\n useEffect(() => {\n let observer;\n let didCancel = false;\n\n // Check if window is define for SSR and Old browsers fallback\n if (typeof window === 'undefined' || !window.IntersectionObserver || !isValidReference()) {\n setHasIntersected(true);\n } else if (!didCancel) {\n observer = new IntersectionObserver(handleOnIntersect, ObserverParams);\n observer.observe(current);\n }\n return () => {\n didCancel = true;\n if (observer) {\n observer.unobserve(current);\n }\n };\n }, [elRef]);\n\n if (loading === 'eager') {\n return [false];\n }\n\n return [hasIntersected];\n};\n"],"names":["ObserverParams","threshold","useHasIntersected","elRef","loading","hasIntersected","setHasIntersected","useState","current","isValidReference","handleOnIntersect","entries","observer","forEach","entry","isIntersecting","unobserve","useEffect","didCancel","window","IntersectionObserver","observe"],"mappings":";;AAEA,MAAMA,cAAc,GAAG;AACrBC,EAAAA,SAAS,EAAE,GAAA;AACb,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,iBAAiB,GAAGA,CAAC;EAAEC,KAAK;AAAEC,EAAAA,OAAAA;AAAQ,CAAC,KAAK;EACvD,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAGC,QAAQ,CAAC,KAAK,CAAC,CAAA;EAE3D,MAAM;AAAEC,IAAAA,OAAAA;AAAQ,GAAC,GAAGL,KAAK,IAAI,EAAE,CAAA;EAE/B,MAAMM,gBAAgB,GAAGA,MAAM;IAC7B,OAAON,KAAK,IAAIK,OAAO,CAAA;GACxB,CAAA;AAED,EAAA,MAAME,iBAAiB,GAAGA,CAACC,OAAO,EAAEC,QAAQ,KAAK;AAC/CD,IAAAA,OAAO,CAACE,OAAO,CAAEC,KAAK,IAAK;MACzB,IAAIA,KAAK,CAACC,cAAc,EAAE;QACxBT,iBAAiB,CAAC,IAAI,CAAC,CAAA;AACvBM,QAAAA,QAAQ,CAACI,SAAS,CAACR,OAAO,CAAC,CAAA;AAC7B,OAAA;AACF,KAAC,CAAC,CAAA;GACH,CAAA;AAEDS,EAAAA,SAAS,CAAC,MAAM;AACd,IAAA,IAAIL,QAAQ,CAAA;IACZ,IAAIM,SAAS,GAAG,KAAK,CAAA;;AAErB;AACA,IAAA,IAAI,OAAOC,MAAM,KAAK,WAAW,IAAI,CAACA,MAAM,CAACC,oBAAoB,IAAI,CAACX,gBAAgB,EAAE,EAAE;MACxFH,iBAAiB,CAAC,IAAI,CAAC,CAAA;AACzB,KAAC,MAAM,IAAI,CAACY,SAAS,EAAE;AACrBN,MAAAA,QAAQ,GAAG,IAAIQ,oBAAoB,CAACV,iBAAiB,EAAEV,cAAc,CAAC,CAAA;AACtEY,MAAAA,QAAQ,CAACS,OAAO,CAACb,OAAO,CAAC,CAAA;AAC3B,KAAA;AACA,IAAA,OAAO,MAAM;AACXU,MAAAA,SAAS,GAAG,IAAI,CAAA;AAChB,MAAA,IAAIN,QAAQ,EAAE;AACZA,QAAAA,QAAQ,CAACI,SAAS,CAACR,OAAO,CAAC,CAAA;AAC7B,OAAA;KACD,CAAA;AACH,GAAC,EAAE,CAACL,KAAK,CAAC,CAAC,CAAA;EAEX,IAAIC,OAAO,KAAK,OAAO,EAAE;IACvB,OAAO,CAAC,KAAK,CAAC,CAAA;AAChB,GAAA;EAEA,OAAO,CAACC,cAAc,CAAC,CAAA;AACzB;;;;"}
1
+ {"version":3,"file":"useHasIntersected.mjs","sources":["../../../../src/common/hooks/useHasIntersected/useHasIntersected.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nconst ObserverParams: IntersectionObserverInit = {\n threshold: 0.1,\n};\n\n/**\n * useHasIntersected.\n * Use this custom hook to detect when an element has became visible inside the viewport. This hook checks only if the intersection happend.\n * Once the intersection has happened the hook will not return false even if the element gets out of the viewport.\n *\n * @param {object} params\n * @param {object} [params.elRef] - node object that contains a react reference to the element that needs to be observed.\n * @param {string} [params.loading = 'eager'] - string that contains the type of loading.\n * @param elRef.loading\n * @usage `const [hasIntersected] = useHasIntersected({imageRef,loading});`\n */\nexport const useHasIntersected = ({\n elRef,\n loading = 'eager',\n}: {\n elRef: React.RefObject<HTMLElement>;\n loading?: 'eager' | 'lazy';\n}) => {\n const [hasIntersected, setHasIntersected] = useState(false);\n\n const { current } = elRef || {};\n\n const isValidReference = () => {\n return elRef && current;\n };\n\n const handleOnIntersect: IntersectionObserverCallback = (entries, observer) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n setHasIntersected(true);\n\n if (current) {\n observer.unobserve(current);\n }\n }\n });\n };\n\n useEffect(() => {\n let observer: IntersectionObserver | undefined;\n let didCancel = false;\n\n // Check if window is defined for SSR and Old browsers fallback\n if (typeof window === 'undefined' || !window.IntersectionObserver || !isValidReference()) {\n setHasIntersected(true);\n } else if (current && !didCancel) {\n observer = new IntersectionObserver(handleOnIntersect, ObserverParams);\n observer.observe(current);\n }\n return () => {\n didCancel = true;\n if (observer && current) {\n observer.unobserve(current);\n }\n };\n }, [elRef]);\n\n if (loading === 'eager') {\n return [false];\n }\n\n return [hasIntersected];\n};\n"],"names":["ObserverParams","threshold","useHasIntersected","elRef","loading","hasIntersected","setHasIntersected","useState","current","isValidReference","handleOnIntersect","entries","observer","forEach","entry","isIntersecting","unobserve","useEffect","didCancel","window","IntersectionObserver","observe"],"mappings":";;AAEA,MAAMA,cAAc,GAA6B;AAC/CC,EAAAA,SAAS,EAAE,GAAA;CACZ,CAAA;AAED;;;;;;;;;;AAUG;AACI,MAAMC,iBAAiB,GAAGA,CAAC;EAChCC,KAAK;AACLC,EAAAA,OAAO,GAAG,OAAA;AAAO,CAIlB,KAAI;EACH,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAGC,QAAQ,CAAC,KAAK,CAAC,CAAA;EAE3D,MAAM;AAAEC,IAAAA,OAAAA;AAAO,GAAE,GAAGL,KAAK,IAAI,EAAE,CAAA;EAE/B,MAAMM,gBAAgB,GAAGA,MAAK;IAC5B,OAAON,KAAK,IAAIK,OAAO,CAAA;GACxB,C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
3
4
  var direction = require('../direction.js');
5
+ require('../propsValues/control.js');
6
+ require('../propsValues/breakpoint.js');
7
+ require('../propsValues/size.js');
8
+ require('../propsValues/typography.js');
9
+ require('../propsValues/width.js');
10
+ require('../propsValues/type.js');
11
+ require('../propsValues/dateMode.js');
12
+ require('../propsValues/monthFormat.js');
13
+ require('../propsValues/position.js');
14
+ require('../propsValues/layouts.js');
15
+ require('../propsValues/status.js');
16
+ require('../propsValues/sentiment.js');
17
+ require('../propsValues/profileType.js');
18
+ require('../propsValues/variant.js');
19
+ require('../propsValues/scroll.js');
20
+ require('../propsValues/markdownNodeType.js');
21
+ require('../fileType.js');
22
+ require('@transferwise/icons');
23
+ require('clsx');
24
+ require('react');
25
+ require('react-intl');
26
+ require('../closeButton/CloseButton.messages.js');
27
+ require('react/jsx-runtime');
4
28
 
5
29
  const DEFAULT_LANG = 'en';
6
30
  const DEFAULT_LOCALE = 'en-GB';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/common/locale/index.ts"],"sourcesContent":["import { Direction } from '..';\n\nexport const DEFAULT_LANG = 'en';\nexport const DEFAULT_LOCALE = 'en-GB';\n\n/**\n * Languages written right-to-left.\n */\nexport const RTL_LANGUAGES = ['ar', 'he'];\n\n/**\n * @deprecated The source of truth for supported languages lives in Crab.\n */\nexport const SUPPORTED_LANGUAGES = [\n DEFAULT_LANG,\n 'de',\n 'es',\n 'fr',\n 'hu',\n 'id',\n 'it',\n 'ja',\n 'pl',\n 'pt',\n 'ro',\n 'ru',\n 'th',\n 'tr',\n 'uk',\n 'zh',\n];\n\n/**\n * Verifies and adjusts locale, replacing `_` with `-`.\n *\n * @param locale `es`, `es_ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc.\n * @returns `null` if locale is unrecognized by `Intl.Locale`.\n */\nexport function adjustLocale(locale: string) {\n const localeTrimmed = locale?.trim();\n if (localeTrimmed) {\n try {\n return new Intl.Locale(localeTrimmed.replace('_', '-')).baseName;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n }\n return null;\n}\n\n/**\n * Provides corresponding lang (iso2) for provided locale.\n *\n * @deprecated The use of this function almost always breaks language variants\n * e.g. Simplified and Traditional Chinese.\n * There should be no use case for this function.\n * To select the correct translations from a translations object, pass the\n * locale directly into Crab's getLocalisedMessages.\n * @param locale `es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc.\n * @returns Two-letter ISO 639-1 language code, falling back to `null` if locale is invalid or language is unsupported.\n */\nexport function getLangFromLocale(locale: string) {\n const adjustedLocale = adjustLocale(locale);\n if (adjustedLocale != null) {\n const { language } = new Intl.Locale(adjustedLocale);\n if (SUPPORTED_LANGUAGES.includes(language)) {\n return language;\n }\n }\n return null;\n}\n\n/**\n * Provides corresponding country code (iso2) for locales code with explicit region value.\n *\n * @param locale `es-ES`, `en-GB`, `ja-JP`, etc.\n * @returns `null` if the locale is invalid or the region can‘t be identified.\n */\nexport function getCountryFromLocale(locale: string) {\n const adjustedLocale = adjustLocale(locale);\n return adjustedLocale != null ? (new Intl.Locale(adjustedLocale).region ?? null) : null;\n}\n\n/**\n * Provides the layout direction for a given locale.\n *\n * @param locale `es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc.\n * @returns The layout direction based on the locale, falling back to `Direction.LTR` if the locale is invalid or unsupported.\n */\nexport function getDirectionFromLocale(locale: string) {\n const adjustedLocale = adjustLocale(locale);\n return adjustedLocale != null && RTL_LANGUAGES.includes(new Intl.Locale(adjustedLocale).language)\n ? Direction.RTL\n : Direction.LTR;\n}\n"],"names":["DEFAULT_LANG","DEFAULT_LOCALE","RTL_LANGUAGES","SUPPORTED_LANGUAGES","adjustLocale","locale","localeTrimmed","trim","Intl","Locale","replace","baseName","error","console","getLangFromLocale","adjustedLocale","language","includes","getCountryFromLocale","region","getDirectionFromLocale","Direction","RTL","LTR"],"mappings":";;;;AAEO,MAAMA,YAAY,GAAG,KAAI;AACzB,MAAMC,cAAc,GAAG,QAAO;AAErC;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AAMU,cAAc,GAAGX,YAAY,CAACC,MAAM,CAAC,CAAA;AAC3C,EAAA,OAAOU,cAAc,IAAI,IAAI,GAAI,IAAIP,IAAI,CAACC,MAAM,CAACM,cAAc,CAAC,CAACI,MAAM,IAAI,IAAI,GAAI,IAAI,CAAA;AACzF,CAAA;AAEA;;;;;AAKG;AACG,SAAUC,sBAAsBA,CAACf,MAAc,EAAA;AACnD,EAAA,MAAMU,cAAc,GAAGX,YAAY,CAACC,MAAM,CAAC,CAAA;EAC3C,OAAOU,cAAc,IAAI,IAAI,IAAIb,aAAa,CAACe,QAAQ,CAAC,IAAIT,IAAI,CAACC,MAAM,CAACM,cAAc,CAAC,CAACC,QAAQ,CAAC,GAC7FK,mBAAS,CAACC,GAAG,GACbD,mBAAS,CAACE,GAAG,CAAA;AACnB;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/common/locale/index.ts"],"sourcesContent":["import { Direction } from '..';\n\nexport const DEFAULT_LANG = 'en';\nexport const DEFAULT_LOCALE = 'en-GB';\n\n/**\n * Languages written right-to-left.\n */\nexport const RTL_LANGUAGES = ['ar', 'he'];\n\n/**\n * @deprecated The source of truth for supported languages lives in Crab.\n */\nexport const SUPPORTED_LANGUAGES = [\n DEFAULT_LANG,\n 'de',\n 'es',\n 'fr',\n 'hu',\n 'id',\n 'it',\n 'ja',\n 'pl',\n 'pt',\n 'ro',\n 'ru',\n 'th',\n 'tr',\n 'uk',\n 'zh',\n];\n\n/**\n * Verifies and adjusts locale, replacing `_` with `-`.\n *\n * @param locale `es`, `es_ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc.\n * @returns `null` if locale is unrecognized by `Intl.Locale`.\n */\nexport function adjustLocale(locale: string) {\n const localeTrimmed = locale?.trim();\n if (localeTrimmed) {\n try {\n return new Intl.Locale(localeTrimmed.replace('_', '-')).baseName;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n }\n return null;\n}\n\n/**\n * Provides corresponding lang (iso2) for provided locale.\n *\n * @deprecated The use of this function almost always breaks language variants\n * e.g. Simplified and Traditional Chinese.\n * There should be no use case for this function.\n * To select the correct translations from a translations object, pass the\n * locale directly into Crab's getLocalisedMessages.\n * @param locale `es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc.\n * @returns Two-letter ISO 639-1 language code, falling back to `null` if locale is invalid or language is unsupported.\n */\nexport function getLangFromLocale(locale: string) {\n const adjustedLocale = adjustLocale(locale);\n if (adjustedLocale != null) {\n const { language } = new Intl.Locale(adjustedLocale);\n if (SUPPORTED_LANGUAGES.includes(language)) {\n return language;\n }\n }\n return null;\n}\n\n/**\n * Provides corresponding country code (iso2) for locales code with explicit region value.\n *\n * @param locale `es-ES`, `en-GB`, `ja-JP`, etc.\n * @returns `null` if the locale is invalid or the region can‘t be identified.\n */\nexport function getCountryFromLocale(locale: string) {\n const adjustedLocale = adjustLocale(locale);\n return adjustedLocale != null ? (new Intl.Locale(adjustedLocale).region ?? null) : null;\n}\n\n/**\n * Provides the layout direction for a given locale.\n *\n * @param locale `es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc.\n * @returns The layout direction based on the locale, falling back to `Direction.LTR` if the locale is invalid or unsupported.\n */\nexport function getDirectionFromLocale(locale: string) {\n const adjustedLocale = adjustLocale(locale);\n return adjustedLocale != null && RTL_LANGUAGES.includes(new Intl.Locale(adjustedLocale).language)\n ? Direction.RTL\n : Direction.LTR;\n}\n"],"names":["DEFAULT_LANG","DEFAULT_LOCALE","RTL_LANGUAGES","SUPPORTED_LANGUAGES","adjustLocale","locale","localeTrimmed","trim","Intl","Locale","replace","baseName","error","console","getLangFromLocale","adjustedLocale","language","includes","getCountryFromLocale","region","getDirectionFromLocale","Direction","RTL","LTR"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAMA,YAAY,GAAG,KAAI;AACzB,MAAMC,cAAc,GAAG,QAAO;AAErC;;AAEG;MACUC,aAAa,GAAG,CAAC,IAAI,EA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AC,CAAA;AAC3C,EAAA,OAAOU,cAAc,IAAI,IAAI,GAAI,IAAIP,IAAI,CAACC,MAAM,CAACM,cAAc,CAAC,CAACI,MAAM,IAAI,IAAI,GAAI,IAAI,CAAA;AACzF,CAAA;AAEA;;;;;AAKG;AACG,SAAUC,sBAAsBA,CAACf,MAAc,EAAA;AACnD,EAAA,MAAMU,cAAc,GAAGX,YAAY,CAACC,MAAM,CAAC,CAAA;EAC3C,OAAOU,cAAc,IAAI,IAAI,IAAIb,aAAa,CAACe,QAAQ,CAAC,IAAIT,IAAI,CAACC,MAAM,CAACM,cAAc,CAAC,CAACC,QAAQ,CAAC,GAC7FK,mBAAS,CAACC,GAAG,GACbD,mBAAS,CAACE,GAAG,CAAA;AACnB;;;;;;;;;;;"}
@@ -1,4 +1,28 @@
1
+ import '../theme.mjs';
1
2
  import { Direction } from '../direction.mjs';
3
+ import '../propsValues/control.mjs';
4
+ import '../propsValues/breakpoint.mjs';
5
+ import '../propsValues/size.mjs';
6
+ import '../propsValues/typography.mjs';
7
+ import '../propsValues/width.mjs';
8
+ import '../propsValues/type.mjs';
9
+ import '../propsValues/dateMode.mjs';
10
+ import '../propsValues/monthFormat.mjs';
11
+ import '../propsValues/position.mjs';
12
+ import '../propsValues/layouts.mjs';
13
+ import '../propsValues/status.mjs';
14
+ import '../propsValues/sentiment.mjs';
15
+ import '../propsValues/profileType.mjs';
16
+ import '../propsValues/variant.mjs';
17
+ import '../propsValues/scroll.mjs';
18
+ import '../propsValues/markdownNodeType.mjs';
19
+ import '../fileType.mjs';
20
+ import '@transferwise/icons';
21
+ import 'clsx';
22
+ import 'react';
23
+ import 'react-intl';
24
+ import '../closeButton/CloseButton.messages.mjs';
25
+ import 'react/jsx-runtime';
2
26
 
3
27
  const DEFAULT_LANG = 'en';
4
28
  const DEFAULT_LOCALE = 'en-GB';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/common/locale/index.ts"],"sourcesContent":["import { Direction } from '..';\n\nexport const DEFAULT_LANG = 'en';\nexport const DEFAULT_LOCALE = 'en-GB';\n\n/**\n * Languages written right-to-left.\n */\nexport const RTL_LANGUAGES = ['ar', 'he'];\n\n/**\n * @deprecated The source of truth for supported languages lives in Crab.\n */\nexport const SUPPORTED_LANGUAGES = [\n DEFAULT_LANG,\n 'de',\n 'es',\n 'fr',\n 'hu',\n 'id',\n 'it',\n 'ja',\n 'pl',\n 'pt',\n 'ro',\n 'ru',\n 'th',\n 'tr',\n 'uk',\n 'zh',\n];\n\n/**\n * Verifies and adjusts locale, replacing `_` with `-`.\n *\n * @param locale `es`, `es_ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc.\n * @returns `null` if locale is unrecognized by `Intl.Locale`.\n */\nexport function adjustLocale(locale: string) {\n const localeTrimmed = locale?.trim();\n if (localeTrimmed) {\n try {\n return new Intl.Locale(localeTrimmed.replace('_', '-')).baseName;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n }\n return null;\n}\n\n/**\n * Provides corresponding lang (iso2) for provided locale.\n *\n * @deprecated The use of this function almost always breaks language variants\n * e.g. Simplified and Traditional Chinese.\n * There should be no use case for this function.\n * To select the correct translations from a translations object, pass the\n * locale directly into Crab's getLocalisedMessages.\n * @param locale `es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc.\n * @returns Two-letter ISO 639-1 language code, falling back to `null` if locale is invalid or language is unsupported.\n */\nexport function getLangFromLocale(locale: string) {\n const adjustedLocale = adjustLocale(locale);\n if (adjustedLocale != null) {\n const { language } = new Intl.Locale(adjustedLocale);\n if (SUPPORTED_LANGUAGES.includes(language)) {\n return language;\n }\n }\n return null;\n}\n\n/**\n * Provides corresponding country code (iso2) for locales code with explicit region value.\n *\n * @param locale `es-ES`, `en-GB`, `ja-JP`, etc.\n * @returns `null` if the locale is invalid or the region can‘t be identified.\n */\nexport function getCountryFromLocale(locale: string) {\n const adjustedLocale = adjustLocale(locale);\n return adjustedLocale != null ? (new Intl.Locale(adjustedLocale).region ?? null) : null;\n}\n\n/**\n * Provides the layout direction for a given locale.\n *\n * @param locale `es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc.\n * @returns The layout direction based on the locale, falling back to `Direction.LTR` if the locale is invalid or unsupported.\n */\nexport function getDirectionFromLocale(locale: string) {\n const adjustedLocale = adjustLocale(locale);\n return adjustedLocale != null && RTL_LANGUAGES.includes(new Intl.Locale(adjustedLocale).language)\n ? Direction.RTL\n : Direction.LTR;\n}\n"],"names":["DEFAULT_LANG","DEFAULT_LOCALE","RTL_LANGUAGES","SUPPORTED_LANGUAGES","adjustLocale","locale","localeTrimmed","trim","Intl","Locale","replace","baseName","error","console","getLangFromLocale","adjustedLocale","language","includes","getCountryFromLocale","region","getDirectionFromLocale","Direction","RTL","LTR"],"mappings":";;AAEO,MAAMA,YAAY,GAAG,KAAI;AACzB,MAAMC,cAAc,GAAG,QAAO;AAErC;;AAEG;MACUC,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAC;AAEzC;;AAEG;AACUC,MAAAA,mBAAmB,GAAG,CACjCH,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACL;AAED;;;;;AAKG;AACG,SAAUI,YAAYA,CAACC,MAAc,EAAA;AACzC,EAAA,MAAMC,aAAa,GAAGD,MAAM,EAAEE,IAAI,EAAE,CAAA;AACpC,EAAA,IAAID,aAAa,EAAE;IACjB,IAAI;AACF,MAAA,OAAO,IAAIE,IAAI,CAACC,MAAM,CAACH,aAAa,CAACI,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAA;KACjE,CAAC,OAAOC,KAAK,EAAE;AACd;AACAC,MAAAA,OAAO,CAACD,KAAK,CAACA,KAAK,CAAC,CAAA;AACtB,KAAA;AACF,GAAA;AACA,EAAA,OAAO,IAAI,CAAA;AACb,CAAA;AAEA;;;;;;;;;;AAUG;AACG,SAAUE,iBAAiBA,CAACT,MAAc,EAAA;AAC9C,EAAA,MAAMU,cAAc,GAAGX,YAAY,CAACC,MAAM,CAAC,CAAA;EAC3C,IAAIU,cAAc,IAAI,IAAI,EAAE;IAC1B,MAAM;AAAEC,MAAAA,QAAAA;AAAQ,KAAE,GAAG,IAAIR,IAAI,CAACC,MAAM,CAACM,cAAc,CAAC,CAAA;AACpD,IAAA,IAAIZ,mBAAmB,CAACc,QAAQ,CAACD,QAAQ,CAAC,EAAE;AAC1C,MAAA,OAAOA,QAAQ,CAAA;AACjB,KAAA;AACF,GAAA;AACA,EAAA,OAAO,IAAI,CAAA;AACb,CAAA;AAEA;;;;;AAKG;AACG,SAAUE,oBAAoBA,CAACb,MAAc,EAAA;AACjD,EAAA,MAAMU,cAAc,GAAGX,YAAY,CAACC,MAAM,CAAC,CAAA;AAC3C,EAAA,OAAOU,cAAc,IAAI,IAAI,GAAI,IAAIP,IAAI,CAACC,MAAM,CAACM,cAAc,CAAC,CAACI,MAAM,IAAI,IAAI,GAAI,IAAI,CAAA;AACzF,CAAA;AAEA;;;;;AAKG;AACG,SAAUC,sBAAsBA,CAACf,MAAc,EAAA;AACnD,EAAA,MAAMU,cAAc,GAAGX,YAAY,CAACC,MAAM,CAAC,CAAA;EAC3C,OAAOU,cAAc,IAAI,IAAI,IAAIb,aAAa,CAACe,QAAQ,CAAC,IAAIT,IAAI,CAACC,MAAM,CAACM,cAAc,CAAC,CAACC,QAAQ,CAAC,GAC7FK,SAAS,CAACC,GAAG,GACbD,SAAS,CAACE,GAAG,CAAA;AACnB;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/common/locale/index.ts"],"sourcesContent":["import { Direction } from '..';\n\nexport const DEFAULT_LANG = 'en';\nexport const DEFAULT_LOCALE = 'en-GB';\n\n/**\n * Languages written right-to-left.\n */\nexport const RTL_LANGUAGES = ['ar', 'he'];\n\n/**\n * @deprecated The source of truth for supported languages lives in Crab.\n */\nexport const SUPPORTED_LANGUAGES = [\n DEFAULT_LANG,\n 'de',\n 'es',\n 'fr',\n 'hu',\n 'id',\n 'it',\n 'ja',\n 'pl',\n 'pt',\n 'ro',\n 'ru',\n 'th',\n 'tr',\n 'uk',\n 'zh',\n];\n\n/**\n * Verifies and adjusts locale, replacing `_` with `-`.\n *\n * @param locale `es`, `es_ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc.\n * @returns `null` if locale is unrecognized by `Intl.Locale`.\n */\nexport function adjustLocale(locale: string) {\n const localeTrimmed = locale?.trim();\n if (localeTrimmed) {\n try {\n return new Intl.Locale(localeTrimmed.replace('_', '-')).baseName;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n }\n return null;\n}\n\n/**\n * Provides corresponding lang (iso2) for provided locale.\n *\n * @deprecated The use of this function almost always breaks language variants\n * e.g. Simplified and Traditional Chinese.\n * There should be no use case for this function.\n * To select the correct translations from a translations object, pass the\n * locale directly into Crab's getLocalisedMessages.\n * @param locale `es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc.\n * @returns Two-letter ISO 639-1 language code, falling back to `null` if locale is invalid or language is unsupported.\n */\nexport function getLangFromLocale(locale: string) {\n const adjustedLocale = adjustLocale(locale);\n if (adjustedLocale != null) {\n const { language } = new Intl.Locale(adjustedLocale);\n if (SUPPORTED_LANGUAGES.includes(language)) {\n return language;\n }\n }\n return null;\n}\n\n/**\n * Provides corresponding country code (iso2) for locales code with explicit region value.\n *\n * @param locale `es-ES`, `en-GB`, `ja-JP`, etc.\n * @returns `null` if the locale is invalid or the region can‘t be identified.\n */\nexport function getCountryFromLocale(locale: string) {\n const adjustedLocale = adjustLocale(locale);\n return adjustedLocale != null ? (new Intl.Locale(adjustedLocale).region ?? null) : null;\n}\n\n/**\n * Provides the layout direction for a given locale.\n *\n * @param locale `es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc.\n * @returns The layout direction based on the locale, falling back to `Direction.LTR` if the locale is invalid or unsupported.\n */\nexport function getDirectionFromLocale(locale: string) {\n const adjustedLocale = adjustLocale(locale);\n return adjustedLocale != null && RTL_LANGUAGES.includes(new Intl.Locale(adjustedLocale).language)\n ? Direction.RTL\n : Direction.LTR;\n}\n"],"names":["DEFAULT_LANG","DEFAULT_LOCALE","RTL_LANGUAGES","SUPPORTED_LANGUAGES","adjustLocale","locale","localeTrimmed","trim","Intl","Locale","replace","baseName","error","console","getLangFromLocale","adjustedLocale","language","includes","getCountryFromLocale","region","getDirectionFromLocale","Direction","RTL","LTR"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAMA,YAAY,GAAG,KAAI;AACzB,MAAMC,cAAc,GAAG,QAAO;AAErC;;AAEG;MACUC,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAC;AAEzC;;AAEG;AACUC,MAAAA,mBAAmB,GAAG,CACjCH,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACL;AAED;;;;;AAKG;AACG,SAAUI,YAAYA,CAACC,MAAc,EAAA;AACzC,EAAA,MAAMC,aAAa,GAAGD,MAAM,EAAEE,IAAI,EAAE,CAAA;AACpC,EAAA,IAAID,aAAa,EAAE;IACjB,IAAI;AACF,MAAA,OAAO,IAAIE,IAAI,CAACC,MAAM,CAACH,aAAa,CAACI,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAA;KACjE,CAAC,OAAOC,KAAK,EAAE;AACd;AACAC,MAAAA,OAAO,CAACD,KAAK,CAACA,KAAK,CAAC,CAAA;AACtB,KAAA;AACF,GAAA;AACA,EAAA,OAAO,IAAI,CAAA;AACb,CAAA;AAEA;;;;;;;;;;AAUG;AACG,SAAUE,iBAAiBA,CAACT,MAAc,EAAA;AAC9C,EAAA,MAAMU,cAAc,GAAGX,YAAY,CAACC,MAAM,CAAC,CAAA;EAC3C,IAAIU,cAAc,IAAI,IAAI,EAAE;IAC1B,MAAM;AAAEC,MAAAA,QAAAA;AAAQ,KAAE,GAAG,IAAIR,IAAI,CAACC,MAAM,CAACM,cAAc,CAAC,CAAA;AACpD,IAAA,IAAIZ,mBAAmB,CAACc,QAAQ,CAACD,QAAQ,CAAC,EAAE;AAC1C,MAAA,OAAOA,QAAQ,CAAA;AACjB,KAAA;AACF,GAAA;AACA,EAAA,OAAO,IAAI,CAAA;AACb,CAAA;AAEA;;;;;AAKG;AACG,SAAUE,oBAAoBA,CAACb,MAAc,EAAA;AACjD,EAAA,MAAMU,cAAc,GAAGX,YAAY,CAACC,MAAM,CAAC,CAAA;AAC3C,EAAA,OAAOU,cAAc,IAAI,IAAI,GAAI,IAAIP,IAAI,CAACC,MAAM,CAACM,cAAc,CAAC,CAACI,MAAM,IAAI,IAAI,GAAI,IAAI,CAAA;AACzF,CAAA;AAEA;;;;;AAKG;AACG,SAAUC,sBAAsBA,CAACf,MAAc,EAAA;AACnD,EAAA,MAAMU,cAAc,GAAGX,YAAY,CAACC,MAAM,CAAC,CAAA;EAC3C,OAAOU,cAAc,IAAI,IAAI,IAAIb,aAAa,CAACe,QAAQ,CAAC,IAAIT,IAAI,CAACC,MAAM,CAACM,cAAc,CAAC,CAACC,QAAQ,CAAC,GAC7FK,SAAS,CAACC,GAAG,GACbD,SAAS,CAACE,GAAG,CAAA;AACnB;;;;"}
@@ -3,10 +3,31 @@
3
3
  var clsx = require('clsx');
4
4
  var React = require('react');
5
5
  var reactPopper = require('react-popper');
6
+ require('../theme.js');
7
+ require('../direction.js');
8
+ require('../propsValues/control.js');
9
+ require('../propsValues/breakpoint.js');
10
+ require('../propsValues/size.js');
11
+ require('../propsValues/typography.js');
12
+ require('../propsValues/width.js');
13
+ require('../propsValues/type.js');
14
+ require('../propsValues/dateMode.js');
15
+ require('../propsValues/monthFormat.js');
16
+ var position = require('../propsValues/position.js');
17
+ require('../propsValues/layouts.js');
18
+ require('../propsValues/status.js');
19
+ require('../propsValues/sentiment.js');
20
+ require('../propsValues/profileType.js');
21
+ require('../propsValues/variant.js');
22
+ require('../propsValues/scroll.js');
23
+ require('../propsValues/markdownNodeType.js');
24
+ require('../fileType.js');
25
+ require('@transferwise/icons');
26
+ require('react-intl');
27
+ require('../closeButton/CloseButton.messages.js');
28
+ var jsxRuntime = require('react/jsx-runtime');
6
29
  var Dimmer = require('../../dimmer/Dimmer.js');
7
30
  var OverlayIdProvider = require('../../provider/overlay/OverlayIdProvider.js');
8
- var jsxRuntime = require('react/jsx-runtime');
9
- var position = require('../propsValues/position.js');
10
31
 
11
32
  const POPOVER_OFFSET = [0, 16];
12
33
  // By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
@@ -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}> &\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 ...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 // eslint-disable-next-line react/forbid-dom-props\n style={{ ...styles.popper }}\n {...attributes.popper}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div\n ref={reference}\n /* eslint-disable-next-line react/forbid-dom-props */\n style={contentStyle}\n className={clsx('np-panel__content')}\n >\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\n ref={setArrowElement}\n className={clsx('np-panel__arrow')}\n // eslint-disable-next-line react/forbid-dom-props\n style={styles.arrow}\n />\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","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,CAAA;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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C,iBAAiB,EAAA,IAAA;AAACrC,IAAAA,OAAO,EAAEA,OAAQ;AAAAF,IAAAA,QAAA,eACpFmC,cAAA,CAAA,KAAA,EAAA;AACEK,MAAAA,EAAE,EAAER,SAAU;AAAA,MAAA,GACV1B,IAAI;AACRmC,MAAAA,GAAG,EAAE7B,gBAAiB;AACtB8B,MAAAA,IAAI,EAAC,QAAA;AACL;AAAA;AACAC,MAAAA,KAAK,EAAE;AAAE,QAAA,GAAGtB,MAAM,CAACuB,MAAAA;OAAS;MAAA,GACxBtB,UAAU,CAACsB,MAAM;AACrBC,MAAAA,SAAS,EAAEC,SAAI,CAAC,UAAU,EAAE;AAAE,QAAA,gBAAgB,EAAE7C,IAAAA;AAAI,OAAE,EAAEK,IAAI,CAACuC,SAAS,CAAE;AAAA7C,MAAAA,QAAA,eAExE+C,eAAA,CAAA,KAAA,EAAA;AACEN,QAAAA,GAAG,EAAElC,SAAAA;AACL;AACAoC,QAAAA,KAAK,EAAEf,YAAa;AACpBiB,QAAAA,SAAS,EAAEC,SAAI,CAAC,mBAAmB,CAAE;AAAA9C,QAAAA,QAAA,EAEpCA,CAAAA,QAAQ,EAERH,KAAK,iBACJsC,cAAA,CAAA,KAAA,EAAA;AACEM,UAAAA,GAAG,EAAEhC,eAAgB;UACrBoC,SAAS,EAAEC,SAAI,CAAC,iBAAiB,CAAA;AACjC;AAAA;UACAH,KAAK,EAAEtB,MAAM,CAACxB,KAAAA;AAAM,SAAA,CAEvB,CAAA;OACE,CAAA;KACF,CAAA;AACP,GAAQ,CAAC,CAAA;AAEb,CAAC;;;;"}
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}> &\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 ...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 // eslint-disable-next-line react/forbid-dom-props\n style={{ ...styles.popper }}\n {...attributes.popper}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div\n ref={reference}\n /* eslint-disable-next-line react/forbid-dom-props */\n style={contentStyle}\n className={clsx('np-panel__content')}\n >\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\n ref={setArrowElement}\n className={clsx('np-panel__arrow')}\n // eslint-disable-next-line react/forbid-dom-props\n style={styles.arrow}\n />\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","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,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AAA;AACjC;AAAA;UACAH,KAAK,EAAEtB,MAAM,CAACxB,KAAAA;AAAM,SAAA,CAEvB,CAAA;OACE,CAAA;KACF,CAAA;AACP,GAAQ,CAAC,CAAA;AAEb,CAAC;;;;"}
@@ -1,10 +1,31 @@
1
1
  import { clsx } from 'clsx';
2
2
  import { forwardRef, useState, useEffect, useContext } from 'react';
3
3
  import { usePopper } from 'react-popper';
4
+ import '../theme.mjs';
5
+ import '../direction.mjs';
6
+ import '../propsValues/control.mjs';
7
+ import '../propsValues/breakpoint.mjs';
8
+ import '../propsValues/size.mjs';
9
+ import '../propsValues/typography.mjs';
10
+ import '../propsValues/width.mjs';
11
+ import '../propsValues/type.mjs';
12
+ import '../propsValues/dateMode.mjs';
13
+ import '../propsValues/monthFormat.mjs';
14
+ import { Position } from '../propsValues/position.mjs';
15
+ import '../propsValues/layouts.mjs';
16
+ import '../propsValues/status.mjs';
17
+ import '../propsValues/sentiment.mjs';
18
+ import '../propsValues/profileType.mjs';
19
+ import '../propsValues/variant.mjs';
20
+ import '../propsValues/scroll.mjs';
21
+ import '../propsValues/markdownNodeType.mjs';
22
+ import '../fileType.mjs';
23
+ import '@transferwise/icons';
24
+ import 'react-intl';
25
+ import '../closeButton/CloseButton.messages.mjs';
26
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
27
  import Dimmer from '../../dimmer/Dimmer.mjs';
5
28
  import { OverlayIdContext } from '../../provider/overlay/OverlayIdProvider.mjs';
6
- import { jsx, jsxs } from 'react/jsx-runtime';
7
- import { Position } from '../propsValues/position.mjs';
8
29
 
9
30
  const POPOVER_OFFSET = [0, 16];
10
31
  // By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
@@ -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}> &\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 ...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 // eslint-disable-next-line react/forbid-dom-props\n style={{ ...styles.popper }}\n {...attributes.popper}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div\n ref={reference}\n /* eslint-disable-next-line react/forbid-dom-props */\n style={contentStyle}\n className={clsx('np-panel__content')}\n >\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\n ref={setArrowElement}\n className={clsx('np-panel__arrow')}\n // eslint-disable-next-line react/forbid-dom-props\n style={styles.arrow}\n />\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","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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AAEC,IAAI,CAAC,iBAAiB,CAAA;AACjC;AAAA;UACAH,KAAK,EAAEtB,MAAM,CAACxB,KAAAA;AAAM,SAAA,CAEvB,CAAA;OACE,CAAA;KACF,CAAA;AACP,GAAQ,CAAC,CAAA;AAEb,CAAC;;;;"}
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}> &\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 ...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 // eslint-disable-next-line react/forbid-dom-props\n style={{ ...styles.popper }}\n {...attributes.popper}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div\n ref={reference}\n /* eslint-disable-next-line react/forbid-dom-props */\n style={contentStyle}\n className={clsx('np-panel__content')}\n >\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\n ref={setArrowElement}\n className={clsx('np-panel__arrow')}\n // eslint-disable-next-line react/forbid-dom-props\n style={styles.arrow}\n />\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","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,CAAA;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,CAAA;CAChE,CAAA;AAcD,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,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AAAA;AAAI,OAAE,EAAEK,IAAI,CAACuC,SAAS,CAAE;AAAA7C,MAAAA,QAAA,eAExE+C,IAAA,CAAA,KAAA,EAAA;AACEN,QAAAA,GAAG,EAAElC,SAAAA;AACL;AACAoC,QAAAA,KAAK,EAAEf,YAAa;AACpBiB,QAAAA,SAAS,EAAEC,IAAI,CAAC,mBAAmB,CAAE;AAAA9C,QAAAA,QAAA,EAEpCA,CAAAA,QAAQ,EAERH,KAAK,iBACJsC,GAAA,CAAA,KAAA,EAAA;AACEM,UAAAA,GAAG,EAAEhC,eAAgB;UACrBoC,SAAS,EAAEC,IAAI,CAAC,iBAAiB,CAAA;AACjC;AAAA;UACAH,KAAK,EAAEtB,MAAM,CAACxB,KAAAA;AAAM,SAAA,CAEvB,CAAA;OACE,CAAA;KACF,CAAA;AACP,GAAQ,CAAC,CAAA;AAEb,CAAC;;;;"}
@@ -1,11 +1,35 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var BottomSheet = require('../bottomSheet/BottomSheet.js');
5
- var Panel = require('../panel/Panel.js');
4
+ require('../theme.js');
5
+ require('../direction.js');
6
+ require('../propsValues/control.js');
7
+ require('../propsValues/breakpoint.js');
8
+ require('../propsValues/size.js');
9
+ require('../propsValues/typography.js');
10
+ require('../propsValues/width.js');
11
+ require('../propsValues/type.js');
12
+ require('../propsValues/dateMode.js');
13
+ require('../propsValues/monthFormat.js');
14
+ var position = require('../propsValues/position.js');
15
+ require('../propsValues/layouts.js');
16
+ require('../propsValues/status.js');
17
+ require('../propsValues/sentiment.js');
18
+ require('../propsValues/profileType.js');
19
+ require('../propsValues/variant.js');
20
+ require('../propsValues/scroll.js');
21
+ require('../propsValues/markdownNodeType.js');
22
+ require('../fileType.js');
23
+ require('@transferwise/icons');
24
+ require('clsx');
25
+ require('react-intl');
26
+ require('../closeButton/CloseButton.messages.js');
6
27
  var jsxRuntime = require('react/jsx-runtime');
28
+ var BottomSheet = require('../bottomSheet/BottomSheet.js');
29
+ require('@transferwise/neptune-validation');
30
+ require('../../provider/direction/DirectionProvider.js');
7
31
  var useLayout = require('../hooks/useLayout/useLayout.js');
8
- var position = require('../propsValues/position.js');
32
+ var Panel = require('../panel/Panel.js');
9
33
 
10
34
  const ResponsivePanel = /*#__PURE__*/React.forwardRef(function ResponsivePanel({
11
35
  anchorRef,
@@ -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';\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 'aria-labelledby': ariaLabelledBy,\n }: PanelProps,\n reference,\n) {\n const { isMobile } = useLayout();\n if (isMobile) {\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 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","ariaLabelledBy","reference","isMobile","useLayout","_jsx","BottomSheet","Panel","ref"],"mappings":";;;;;;;;;AAOA,MAAMA,eAAe,gBAAGC,gBAAU,CAA6B,SAASD,eAAeA,CACrF;EACEE,SAAS;AACTC,EAA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../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';\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 'aria-labelledby': ariaLabelledBy,\n }: PanelProps,\n reference,\n) {\n const { isMobile } = useLayout();\n if (isMobile) {\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 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","ariaLabelledBy","reference","isMobile","useLayout","_jsx","BottomSheet","Panel","ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,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;AACvB,EAAA,iBAAiB,EAAEC,cAAAA;AACR,CAAA,EACbC,SAAS,EAAA;EAET,MAAM;AAAEC,IAAAA,QAAAA;GAAU,GAAGC,mBAAS,EAAE,CAAA;AAChC,EAAA,IAAID,QAAQ,EAAE;IACZ,oBACEE,cAAA,CAACC,WAAW,EAAA;AAEV,MAAA,YAAA,EAAYN,SAAU;AACtB,MAAA,iBAAA,EAAiBC,cAAe;AAChCN,MAAAA,IAAI,EAAEA,IAAK;AACXH,MAAAA,SAAS,EAAEA,SAAU;AACrBE,MAAAA,OAAO,EAAEA,OAAQ;AAAAH,MAAAA,QAAA,EAEhBA,QAAAA;AAAQ,KAAA,EAPL,aAQO,CAAC,CAAA;AAElB,GAAA;EACA,oBACEc,cAAA,CAACE,KAAK,EAAA;AAEJC,IAAAA,GAAG,EAAEN,SAAU;AACfZ,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;AACtB,IAAA,iBAAA,EAAiBC,cAAe;AAChCT,IAAAA,SAAS,EAAEA,SAAU;AACrBE,IAAAA,OAAO,EAAEA,OAAQ;AAAAH,IAAAA,QAAA,EAEhBA,QAAAA;AAAQ,GAAA,EAbL,OAcC,CAAC,CAAA;AAEZ,CAAC;;;;"}
@@ -1,9 +1,33 @@
1
1
  import { forwardRef } from 'react';
2
- import BottomSheet from '../bottomSheet/BottomSheet.mjs';
3
- import Panel from '../panel/Panel.mjs';
2
+ import '../theme.mjs';
3
+ import '../direction.mjs';
4
+ import '../propsValues/control.mjs';
5
+ import '../propsValues/breakpoint.mjs';
6
+ import '../propsValues/size.mjs';
7
+ import '../propsValues/typography.mjs';
8
+ import '../propsValues/width.mjs';
9
+ import '../propsValues/type.mjs';
10
+ import '../propsValues/dateMode.mjs';
11
+ import '../propsValues/monthFormat.mjs';
12
+ import { Position } from '../propsValues/position.mjs';
13
+ import '../propsValues/layouts.mjs';
14
+ import '../propsValues/status.mjs';
15
+ import '../propsValues/sentiment.mjs';
16
+ import '../propsValues/profileType.mjs';
17
+ import '../propsValues/variant.mjs';
18
+ import '../propsValues/scroll.mjs';
19
+ import '../propsValues/markdownNodeType.mjs';
20
+ import '../fileType.mjs';
21
+ import '@transferwise/icons';
22
+ import 'clsx';
23
+ import 'react-intl';
24
+ import '../closeButton/CloseButton.messages.mjs';
4
25
  import { jsx } from 'react/jsx-runtime';
26
+ import BottomSheet from '../bottomSheet/BottomSheet.mjs';
27
+ import '@transferwise/neptune-validation';
28
+ import '../../provider/direction/DirectionProvider.mjs';
5
29
  import { useLayout } from '../hooks/useLayout/useLayout.mjs';
6
- import { Position } from '../propsValues/position.mjs';
30
+ import Panel from '../panel/Panel.mjs';
7
31
 
8
32
  const ResponsivePanel = /*#__PURE__*/forwardRef(function ResponsivePanel({
9
33
  anchorRef,