@transferwise/components 43.12.6-beta-.16 → 43.12.7

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 (1416) hide show
  1. package/build/es/no-polyfill/accordion/Accordion.js +1 -0
  2. package/build/es/no-polyfill/accordion/AccordionItem/AccordionItem.js +1 -0
  3. package/build/es/no-polyfill/accordion/AccordionItem/index.js +1 -0
  4. package/build/es/no-polyfill/accordion/index.js +1 -0
  5. package/build/es/no-polyfill/actionButton/ActionButton.js +1 -0
  6. package/build/es/no-polyfill/actionButton/ActionButton.spec.js +1 -0
  7. package/build/es/no-polyfill/actionButton/ActionButton.story.js +1 -0
  8. package/build/es/no-polyfill/actionButton/index.js +1 -0
  9. package/build/es/no-polyfill/actionOption/ActionOption.js +1 -0
  10. package/build/es/no-polyfill/actionOption/ActionOption.story.js +1 -0
  11. package/build/es/no-polyfill/actionOption/index.js +1 -0
  12. package/build/es/no-polyfill/alert/Alert.js +1 -0
  13. package/build/es/no-polyfill/alert/index.js +1 -0
  14. package/build/es/no-polyfill/alert/inlineMarkdown/InlineMarkdown.js +1 -0
  15. package/build/es/no-polyfill/alert/inlineMarkdown/index.js +1 -0
  16. package/build/es/no-polyfill/alert/withArrow/alertArrowPositions.js +2 -0
  17. package/build/es/no-polyfill/alert/withArrow/index.js +1 -0
  18. package/build/es/no-polyfill/alert/withArrow/withArrow.js +1 -0
  19. package/build/es/no-polyfill/avatar/Avatar.js +1 -0
  20. package/build/es/no-polyfill/avatar/avatarTypes.js +2 -0
  21. package/build/es/no-polyfill/avatar/index.js +1 -0
  22. package/build/es/no-polyfill/avatarWrapper/AvatarWrapper.js +1 -0
  23. package/build/es/no-polyfill/avatarWrapper/index.js +1 -0
  24. package/build/es/no-polyfill/badge/Badge.js +1 -0
  25. package/build/es/no-polyfill/badge/index.js +1 -0
  26. package/build/es/no-polyfill/body/Body.js +1 -0
  27. package/build/es/no-polyfill/body/Body.spec.js +1 -0
  28. package/build/es/no-polyfill/body/Body.story.js +1 -0
  29. package/build/es/no-polyfill/body/index.js +1 -0
  30. package/build/es/no-polyfill/button/Button.js +7 -0
  31. package/build/es/no-polyfill/button/classMap.js +1 -0
  32. package/build/es/no-polyfill/button/index.js +1 -0
  33. package/build/es/no-polyfill/button/legacyUtils/index.js +1 -0
  34. package/build/es/no-polyfill/button/legacyUtils/legacyUtils.js +4 -0
  35. package/build/es/no-polyfill/card/Card.js +1 -0
  36. package/build/es/no-polyfill/card/index.js +1 -0
  37. package/build/es/no-polyfill/checkbox/Checkbox.js +1 -0
  38. package/build/es/no-polyfill/checkbox/index.js +1 -0
  39. package/build/es/no-polyfill/checkboxButton/CheckboxButton.js +1 -0
  40. package/build/es/no-polyfill/checkboxButton/CheckboxButton.spec.js +1 -0
  41. package/build/es/no-polyfill/checkboxButton/CheckboxButton.story.js +1 -0
  42. package/build/es/no-polyfill/checkboxButton/index.js +1 -0
  43. package/build/es/no-polyfill/checkboxOption/CheckboxOption.js +1 -0
  44. package/build/es/no-polyfill/checkboxOption/CheckboxOption.spec.js +1 -0
  45. package/build/es/no-polyfill/checkboxOption/CheckboxOption.story.js +1 -0
  46. package/build/es/no-polyfill/checkboxOption/index.js +1 -0
  47. package/build/es/no-polyfill/chevron/Chevron.js +1 -0
  48. package/build/es/no-polyfill/chevron/index.js +1 -0
  49. package/build/es/no-polyfill/chips/Chip.js +1 -0
  50. package/build/es/no-polyfill/chips/Chips.js +1 -0
  51. package/build/es/no-polyfill/chips/Chips.messages.js +1 -0
  52. package/build/es/no-polyfill/chips/Chips.spec.js +1 -0
  53. package/build/es/no-polyfill/chips/Chips.story.js +1 -0
  54. package/build/es/no-polyfill/chips/index.js +1 -0
  55. package/build/es/no-polyfill/circularButton/CircularButton.js +1 -0
  56. package/build/es/no-polyfill/circularButton/index.js +1 -0
  57. package/build/es/no-polyfill/common/DOMOperations/DOMOperations.js +9 -0
  58. package/build/es/no-polyfill/common/DOMOperations/index.js +1 -0
  59. package/build/es/no-polyfill/common/Option/Option.js +1 -0
  60. package/build/es/no-polyfill/common/Option/index.js +1 -0
  61. package/build/es/no-polyfill/common/RadioButton/RadioButton.js +1 -0
  62. package/build/es/no-polyfill/common/RadioButton/index.js +1 -0
  63. package/build/es/no-polyfill/common/bottomSheet/BottomSheet.js +10 -0
  64. package/build/es/no-polyfill/common/bottomSheet/BottomSheet.spec.js +1 -0
  65. package/build/es/no-polyfill/common/bottomSheet/index.js +1 -0
  66. package/build/es/no-polyfill/common/closeButton/CloseButton.js +1 -0
  67. package/build/es/no-polyfill/common/closeButton/CloseButton.messages.js +1 -0
  68. package/build/es/no-polyfill/common/closeButton/index.js +1 -0
  69. package/build/es/no-polyfill/common/commonProps.js +0 -0
  70. package/build/es/no-polyfill/common/dateUtils/getDayNames/getDayNames.js +2 -0
  71. package/build/es/no-polyfill/common/dateUtils/getDayNames/index.js +1 -0
  72. package/build/es/no-polyfill/common/dateUtils/getMonthNames/getMonthNames.js +1 -0
  73. package/build/es/no-polyfill/common/dateUtils/getMonthNames/index.js +1 -0
  74. package/build/es/no-polyfill/common/dateUtils/index.js +1 -0
  75. package/build/es/no-polyfill/common/dateUtils/isDateValid/index.js +1 -0
  76. package/build/es/no-polyfill/common/dateUtils/isDateValid/isDateValid.js +1 -0
  77. package/build/es/no-polyfill/common/dateUtils/isMonthAndYearFormat/index.js +1 -0
  78. package/build/es/no-polyfill/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.js +1 -0
  79. package/build/es/no-polyfill/common/dateUtils/isWithinRange/index.js +1 -0
  80. package/build/es/no-polyfill/common/dateUtils/isWithinRange/isWithinRange.js +1 -0
  81. package/build/es/no-polyfill/common/dateUtils/moveToWithinRange/index.js +1 -0
  82. package/build/es/no-polyfill/common/dateUtils/moveToWithinRange/moveToWithinRange.js +2 -0
  83. package/build/es/no-polyfill/common/deviceDetection/deviceDetection.js +1 -0
  84. package/build/es/no-polyfill/common/deviceDetection/index.js +1 -0
  85. package/build/es/no-polyfill/common/direction.js +1 -0
  86. package/build/es/no-polyfill/common/domHelpers/documentIosClick.js +5 -0
  87. package/build/es/no-polyfill/common/domHelpers/index.js +1 -0
  88. package/build/es/no-polyfill/common/fakeEvents.js +1 -0
  89. package/build/es/no-polyfill/common/fileType.js +1 -0
  90. package/build/es/no-polyfill/common/flowHeader/FlowHeader.js +1 -0
  91. package/build/es/no-polyfill/common/flowHeader/index.js +1 -0
  92. package/build/es/no-polyfill/common/focusBoundary/FocusBoundary.js +1 -0
  93. package/build/es/no-polyfill/common/focusBoundary/index.js +1 -0
  94. package/build/es/no-polyfill/common/focusBoundary/utils/getFocusableElements.js +6 -0
  95. package/build/es/no-polyfill/common/focusBoundary/utils/index.js +1 -0
  96. package/build/es/no-polyfill/common/focusBoundary/utils/resetFocus.js +6 -0
  97. package/build/es/no-polyfill/common/historyNavigator/historyNavigator.js +1 -0
  98. package/build/es/no-polyfill/common/historyNavigator/index.js +1 -0
  99. package/build/es/no-polyfill/common/hooks/index.js +1 -0
  100. package/build/es/no-polyfill/common/hooks/useClientWidth/index.js +1 -0
  101. package/build/es/no-polyfill/common/hooks/useClientWidth/useClientWidth.js +5 -0
  102. package/build/es/no-polyfill/common/hooks/useConditionalListener/index.js +1 -0
  103. package/build/es/no-polyfill/common/hooks/useConditionalListener/useConditionalListener.js +3 -0
  104. package/build/es/no-polyfill/common/hooks/useDirection/index.js +1 -0
  105. package/build/es/no-polyfill/common/hooks/useDirection/useDirection.js +1 -0
  106. package/build/es/no-polyfill/common/hooks/useHasIntersected/index.js +1 -0
  107. package/build/es/no-polyfill/common/hooks/useHasIntersected/useHasIntersected.js +11 -0
  108. package/build/es/no-polyfill/common/hooks/useLayout/index.js +1 -0
  109. package/build/es/no-polyfill/common/hooks/useLayout/useLayout.js +1 -0
  110. package/build/es/no-polyfill/common/index.js +2 -0
  111. package/build/es/no-polyfill/common/key.js +1 -0
  112. package/build/es/no-polyfill/common/keyCodes.js +5 -0
  113. package/build/es/no-polyfill/common/locale/index.js +37 -0
  114. package/build/es/no-polyfill/common/panel/Panel.js +10 -0
  115. package/build/es/no-polyfill/common/panel/index.js +1 -0
  116. package/build/es/no-polyfill/common/propsValues/breakpoint.js +1 -0
  117. package/build/es/no-polyfill/common/propsValues/control.js +1 -0
  118. package/build/es/no-polyfill/common/propsValues/dateMode.js +1 -0
  119. package/build/es/no-polyfill/common/propsValues/layouts.js +1 -0
  120. package/build/es/no-polyfill/common/propsValues/markdownNodeType.js +1 -0
  121. package/build/es/no-polyfill/common/propsValues/monthFormat.js +1 -0
  122. package/build/es/no-polyfill/common/propsValues/position.js +1 -0
  123. package/build/es/no-polyfill/common/propsValues/profileType.js +1 -0
  124. package/build/es/no-polyfill/common/propsValues/scroll.js +1 -0
  125. package/build/es/no-polyfill/common/propsValues/sentiment.js +1 -0
  126. package/build/es/no-polyfill/common/propsValues/size.js +1 -0
  127. package/build/es/no-polyfill/common/propsValues/status.js +1 -0
  128. package/build/es/no-polyfill/common/propsValues/type.js +3 -0
  129. package/build/es/no-polyfill/common/propsValues/typography.js +1 -0
  130. package/build/es/no-polyfill/common/propsValues/variant.js +1 -0
  131. package/build/es/no-polyfill/common/propsValues/width.js +1 -0
  132. package/build/es/no-polyfill/common/requirements.js +3 -0
  133. package/build/es/no-polyfill/common/responsivePanel/ResponsivePanel.js +1 -0
  134. package/build/es/no-polyfill/common/responsivePanel/index.js +1 -0
  135. package/build/es/no-polyfill/common/textFormat/formatWithPattern/formatWithPattern.js +2 -0
  136. package/build/es/no-polyfill/common/textFormat/formatWithPattern/index.js +1 -0
  137. package/build/es/no-polyfill/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.js +1 -0
  138. package/build/es/no-polyfill/common/textFormat/getCountOfSymbolsInSelection/index.js +1 -0
  139. package/build/es/no-polyfill/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js +1 -0
  140. package/build/es/no-polyfill/common/textFormat/getCursorPositionAfterKeystroke/index.js +1 -0
  141. package/build/es/no-polyfill/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js +2 -0
  142. package/build/es/no-polyfill/common/textFormat/getDistanceToSymbol/index.js +1 -0
  143. package/build/es/no-polyfill/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js +1 -0
  144. package/build/es/no-polyfill/common/textFormat/getSymbolsInPatternWithPosition/index.js +1 -0
  145. package/build/es/no-polyfill/common/textFormat/index.js +1 -0
  146. package/build/es/no-polyfill/common/textFormat/unformatWithPattern/index.js +1 -0
  147. package/build/es/no-polyfill/common/textFormat/unformatWithPattern/unformatWithPattern.js +1 -0
  148. package/build/es/no-polyfill/common/theme.js +1 -0
  149. package/build/es/no-polyfill/criticalBanner/CriticalCommsBanner.js +1 -0
  150. package/build/es/no-polyfill/criticalBanner/CriticalCommsBanner.story.js +1 -0
  151. package/build/es/no-polyfill/criticalBanner/index.js +1 -0
  152. package/build/es/no-polyfill/dateInput/DateInput.js +4 -0
  153. package/build/es/no-polyfill/dateInput/DateInput.messages.js +1 -0
  154. package/build/es/no-polyfill/dateInput/index.js +1 -0
  155. package/build/es/no-polyfill/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js +2 -0
  156. package/build/es/no-polyfill/dateInput/utils/convertToLocalMidnight/index.js +1 -0
  157. package/build/es/no-polyfill/dateInput/utils/explodeDate/explodeDate.js +1 -0
  158. package/build/es/no-polyfill/dateInput/utils/explodeDate/index.js +1 -0
  159. package/build/es/no-polyfill/dateInput/utils/index.js +1 -0
  160. package/build/es/no-polyfill/dateLookup/DateLookup.js +3 -0
  161. package/build/es/no-polyfill/dateLookup/dateHeader/DateHeader.js +1 -0
  162. package/build/es/no-polyfill/dateLookup/dateHeader/index.js +1 -0
  163. package/build/es/no-polyfill/dateLookup/dateTrigger/DateTrigger.js +1 -0
  164. package/build/es/no-polyfill/dateLookup/dateTrigger/DateTrigger.messages.js +1 -0
  165. package/build/es/no-polyfill/dateLookup/dateTrigger/index.js +1 -0
  166. package/build/es/no-polyfill/dateLookup/dayCalendar/DayCalendar.js +1 -0
  167. package/build/es/no-polyfill/dateLookup/dayCalendar/index.js +1 -0
  168. package/build/es/no-polyfill/dateLookup/dayCalendar/table/DayCalendarTable.js +4 -0
  169. package/build/es/no-polyfill/dateLookup/dayCalendar/table/index.js +1 -0
  170. package/build/es/no-polyfill/dateLookup/getStartOfDay/getStartOfDay.js +5 -0
  171. package/build/es/no-polyfill/dateLookup/getStartOfDay/index.js +1 -0
  172. package/build/es/no-polyfill/dateLookup/index.js +1 -0
  173. package/build/es/no-polyfill/dateLookup/monthCalendar/MonthCalendar.js +1 -0
  174. package/build/es/no-polyfill/dateLookup/monthCalendar/index.js +1 -0
  175. package/build/es/no-polyfill/dateLookup/monthCalendar/table/MonthCalendarTable.js +1 -0
  176. package/build/es/no-polyfill/dateLookup/monthCalendar/table/index.js +1 -0
  177. package/build/es/no-polyfill/dateLookup/tableLink/TableLink.js +2 -0
  178. package/build/es/no-polyfill/dateLookup/tableLink/index.js +1 -0
  179. package/build/es/no-polyfill/dateLookup/yearCalendar/YearCalendar.js +1 -0
  180. package/build/es/no-polyfill/dateLookup/yearCalendar/index.js +1 -0
  181. package/build/es/no-polyfill/dateLookup/yearCalendar/table/YearCalendarTable.js +1 -0
  182. package/build/es/no-polyfill/dateLookup/yearCalendar/table/index.js +1 -0
  183. package/build/es/no-polyfill/decision/Decision.js +5 -0
  184. package/build/es/no-polyfill/decision/decisionEnums.js +3 -0
  185. package/build/es/no-polyfill/decision/index.js +1 -0
  186. package/build/es/no-polyfill/definitionList/DefinitionList.js +1 -0
  187. package/build/es/no-polyfill/definitionList/index.js +1 -0
  188. package/build/es/no-polyfill/dimmer/Dimmer.js +6 -0
  189. package/build/es/no-polyfill/dimmer/Dimmer.story.js +1 -0
  190. package/build/es/no-polyfill/dimmer/dimmerManager/DimmerManager.js +5 -0
  191. package/build/es/no-polyfill/dimmer/dimmerManager/index.js +1 -0
  192. package/build/es/no-polyfill/dimmer/index.js +1 -0
  193. package/build/es/no-polyfill/display/Display.js +1 -0
  194. package/build/es/no-polyfill/display/Display.story.js +1 -0
  195. package/build/es/no-polyfill/display/index.js +1 -0
  196. package/build/es/no-polyfill/drawer/Drawer.js +1 -0
  197. package/build/es/no-polyfill/drawer/index.js +1 -0
  198. package/build/es/no-polyfill/dropFade/DropFade.js +3 -0
  199. package/build/es/no-polyfill/dropFade/DropFade.story.js +1 -0
  200. package/build/es/no-polyfill/dropFade/index.js +1 -0
  201. package/build/es/no-polyfill/dynamicFieldDefinitionList/DynamicFieldDefinitionList.js +1 -0
  202. package/build/es/no-polyfill/dynamicFieldDefinitionList/FormattedValue/FormattedValue.js +8 -0
  203. package/build/es/no-polyfill/dynamicFieldDefinitionList/FormattedValue/index.js +1 -0
  204. package/build/es/no-polyfill/dynamicFieldDefinitionList/index.js +1 -0
  205. package/build/es/no-polyfill/dynamicFieldDefinitionList/utils/createDefinitions.js +2 -0
  206. package/build/es/no-polyfill/dynamicFieldDefinitionList/utils/text-format.js +1 -0
  207. package/build/es/no-polyfill/emphasis/Emphasis.js +2 -0
  208. package/build/es/no-polyfill/emphasis/EmphasisHtmlTransformer.js +7 -0
  209. package/build/es/no-polyfill/emphasis/index.js +1 -0
  210. package/build/es/no-polyfill/flowNavigation/FlowNavigation.js +2 -0
  211. package/build/es/no-polyfill/flowNavigation/animatedLabel/AnimatedLabel.js +1 -0
  212. package/build/es/no-polyfill/flowNavigation/animatedLabel/index.js +1 -0
  213. package/build/es/no-polyfill/flowNavigation/backButton/BackButton.js +1 -0
  214. package/build/es/no-polyfill/flowNavigation/backButton/index.js +1 -0
  215. package/build/es/no-polyfill/flowNavigation/index.js +1 -0
  216. package/build/es/no-polyfill/header/Header.js +5 -0
  217. package/build/es/no-polyfill/header/Header.spec.js +1 -0
  218. package/build/es/no-polyfill/header/Header.story.js +2 -0
  219. package/build/es/no-polyfill/header/index.js +1 -0
  220. package/build/es/no-polyfill/i18n/cs.json +44 -0
  221. package/build/es/no-polyfill/i18n/de.json +44 -0
  222. package/build/es/no-polyfill/i18n/en.json +44 -0
  223. package/build/es/no-polyfill/i18n/es.json +44 -0
  224. package/build/es/no-polyfill/i18n/fr.json +44 -0
  225. package/build/es/no-polyfill/i18n/hu.json +44 -0
  226. package/build/es/no-polyfill/i18n/id.json +44 -0
  227. package/build/es/no-polyfill/i18n/index.js +1 -0
  228. package/build/es/no-polyfill/i18n/it.json +44 -0
  229. package/build/es/no-polyfill/i18n/ja.json +44 -0
  230. package/build/es/no-polyfill/i18n/pl.json +44 -0
  231. package/build/es/no-polyfill/i18n/pt.json +44 -0
  232. package/build/es/no-polyfill/i18n/ro.json +44 -0
  233. package/build/es/no-polyfill/i18n/ru.json +44 -0
  234. package/build/es/no-polyfill/i18n/th.json +44 -0
  235. package/build/es/no-polyfill/i18n/tr.json +44 -0
  236. package/build/es/no-polyfill/i18n/uk.json +44 -0
  237. package/build/es/no-polyfill/i18n/zh-CN.json +44 -0
  238. package/build/es/no-polyfill/i18n/zh.json +44 -0
  239. package/build/es/no-polyfill/image/Image.js +12 -0
  240. package/build/es/no-polyfill/image/index.js +1 -0
  241. package/build/es/no-polyfill/index.js +13 -0
  242. package/build/es/no-polyfill/info/Info.js +1 -0
  243. package/build/es/no-polyfill/info/index.js +1 -0
  244. package/build/es/no-polyfill/info/infoPresentations.js +2 -0
  245. package/build/es/no-polyfill/inlineAlert/InlineAlert.js +1 -0
  246. package/build/es/no-polyfill/inlineAlert/index.js +1 -0
  247. package/build/es/no-polyfill/inputWithDisplayFormat/InputWithDisplayFormat.js +1 -0
  248. package/build/es/no-polyfill/inputWithDisplayFormat/index.js +1 -0
  249. package/build/es/no-polyfill/instructionsList/InstructionsList.js +3 -0
  250. package/build/es/no-polyfill/instructionsList/index.js +1 -0
  251. package/build/es/no-polyfill/lab/index.js +1 -0
  252. package/build/es/no-polyfill/lab/mobileNav/MobileNav.js +9 -0
  253. package/build/es/no-polyfill/lab/mobileNav/index.js +1 -0
  254. package/build/es/no-polyfill/lab/mobileNav/utils/index.js +1 -0
  255. package/build/es/no-polyfill/lab/mobileNav/utils/isIpadOsSafari/index.js +1 -0
  256. package/build/es/no-polyfill/lab/mobileNav/utils/isIpadOsSafari/isIpadOsSafari.js +1 -0
  257. package/build/es/no-polyfill/lab/mobileNav/utils/isMobileSafari/index.js +1 -0
  258. package/build/es/no-polyfill/lab/mobileNav/utils/isMobileSafari/isMobileSafari.js +1 -0
  259. package/build/es/no-polyfill/lab/pagination/Pagination.js +1 -0
  260. package/build/es/no-polyfill/lab/pagination/Pagination.messages.js +1 -0
  261. package/build/es/no-polyfill/lab/pagination/index.js +1 -0
  262. package/build/es/no-polyfill/lab/pagination/paginationLink/PaginationLink.js +1 -0
  263. package/build/es/no-polyfill/lab/pagination/paginationLink/PaginationLink.messages.js +1 -0
  264. package/build/es/no-polyfill/lab/pagination/paginationLink/index.js +1 -0
  265. package/build/es/no-polyfill/link/Link.js +5 -0
  266. package/build/es/no-polyfill/link/Link.spec.js +1 -0
  267. package/build/es/no-polyfill/link/Link.story.js +1 -0
  268. package/build/es/no-polyfill/link/index.js +1 -0
  269. package/build/es/no-polyfill/loader/Loader.js +11 -0
  270. package/build/es/no-polyfill/loader/index.js +1 -0
  271. package/build/es/no-polyfill/logo/Logo.js +1 -0
  272. package/build/es/no-polyfill/logo/index.js +1 -0
  273. package/build/es/no-polyfill/logo/logoTypes.js +2 -0
  274. package/build/es/no-polyfill/logo/svg/flag-inverse.svg +1 -0
  275. package/build/es/no-polyfill/logo/svg/flag.svg +1 -0
  276. package/build/es/no-polyfill/logo/svg/logo-business-inverse.svg +1 -0
  277. package/build/es/no-polyfill/logo/svg/logo-business.svg +1 -0
  278. package/build/es/no-polyfill/logo/svg/logo-inverse.svg +1 -0
  279. package/build/es/no-polyfill/logo/svg/logo.svg +1 -0
  280. package/build/es/no-polyfill/markdown/Markdown.js +1 -0
  281. package/build/es/no-polyfill/markdown/index.js +1 -0
  282. package/build/es/no-polyfill/modal/Modal.js +1 -0
  283. package/build/es/no-polyfill/modal/Modal.story.js +1 -0
  284. package/build/es/no-polyfill/modal/index.js +1 -0
  285. package/build/es/no-polyfill/money/Money.js +1 -0
  286. package/build/es/no-polyfill/money/index.js +1 -0
  287. package/build/es/no-polyfill/moneyInput/MoneyInput.js +5 -0
  288. package/build/es/no-polyfill/moneyInput/MoneyInput.messages.js +1 -0
  289. package/build/es/no-polyfill/moneyInput/currencyFormatting.js +4 -0
  290. package/build/es/no-polyfill/moneyInput/index.js +1 -0
  291. package/build/es/no-polyfill/navigationOption/NavigationOption.js +1 -0
  292. package/build/es/no-polyfill/navigationOption/index.js +1 -0
  293. package/build/es/no-polyfill/navigationOptionsList/NavigationOptionsList.js +1 -0
  294. package/build/es/no-polyfill/navigationOptionsList/index.js +1 -0
  295. package/build/es/no-polyfill/nudge/Nudge.js +1 -0
  296. package/build/es/no-polyfill/nudge/index.js +1 -0
  297. package/build/es/no-polyfill/overlayHeader/OverlayHeader.js +1 -0
  298. package/build/es/no-polyfill/overlayHeader/index.js +1 -0
  299. package/build/es/no-polyfill/phoneNumberInput/PhoneNumberInput.js +1 -0
  300. package/build/es/no-polyfill/phoneNumberInput/data/countries.js +1 -0
  301. package/build/es/no-polyfill/phoneNumberInput/index.js +1 -0
  302. package/build/es/no-polyfill/phoneNumberInput/utils/cleanNumber/cleanNumber.js +1 -0
  303. package/build/es/no-polyfill/phoneNumberInput/utils/cleanNumber/index.js +1 -0
  304. package/build/es/no-polyfill/phoneNumberInput/utils/explodeNumberModel/index.js +7 -0
  305. package/build/es/no-polyfill/phoneNumberInput/utils/filterOptionsForQuery/index.js +7 -0
  306. package/build/es/no-polyfill/phoneNumberInput/utils/findCountryByCode/index.js +1 -0
  307. package/build/es/no-polyfill/phoneNumberInput/utils/findCountryByPrefix/index.js +1 -0
  308. package/build/es/no-polyfill/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js +1 -0
  309. package/build/es/no-polyfill/phoneNumberInput/utils/groupCountriesByPrefix/index.js +1 -0
  310. package/build/es/no-polyfill/phoneNumberInput/utils/index.js +1 -0
  311. package/build/es/no-polyfill/phoneNumberInput/utils/isOptionAndFitsQuery/index.js +1 -0
  312. package/build/es/no-polyfill/phoneNumberInput/utils/isOptionAndFitsQuery/isOptionAndFitsQuery.js +7 -0
  313. package/build/es/no-polyfill/phoneNumberInput/utils/isStringNumeric/index.js +1 -0
  314. package/build/es/no-polyfill/phoneNumberInput/utils/isStringNumeric/isStringNumeric.js +1 -0
  315. package/build/es/no-polyfill/phoneNumberInput/utils/isValidPhoneNumber/index.js +1 -0
  316. package/build/es/no-polyfill/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.js +6 -0
  317. package/build/es/no-polyfill/phoneNumberInput/utils/longestMatchingPrefix/index.js +1 -0
  318. package/build/es/no-polyfill/phoneNumberInput/utils/setDefaultPrefix/index.js +11 -0
  319. package/build/es/no-polyfill/phoneNumberInput/utils/sortArrayByProperty/index.js +1 -0
  320. package/build/es/no-polyfill/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js +2 -0
  321. package/build/es/no-polyfill/popover/Popover.js +4 -0
  322. package/build/es/no-polyfill/popover/index.js +1 -0
  323. package/build/es/no-polyfill/processIndicator/ProcessIndicator.js +12 -0
  324. package/build/es/no-polyfill/processIndicator/index.js +1 -0
  325. package/build/es/no-polyfill/progress/Progress.js +1 -0
  326. package/build/es/no-polyfill/progress/index.js +1 -0
  327. package/build/es/no-polyfill/progressBar/ProgressBar.js +1 -0
  328. package/build/es/no-polyfill/progressBar/index.js +1 -0
  329. package/build/es/no-polyfill/provider/Provider.js +1 -0
  330. package/build/es/no-polyfill/provider/Provider.spec.js +2 -0
  331. package/build/es/no-polyfill/provider/Provider.story.js +1 -0
  332. package/build/es/no-polyfill/provider/direction/DirectionProvider.js +1 -0
  333. package/build/es/no-polyfill/provider/direction/DirectionProvider.spec.js +1 -0
  334. package/build/es/no-polyfill/provider/direction/index.js +1 -0
  335. package/build/es/no-polyfill/provider/index.js +1 -0
  336. package/build/es/no-polyfill/provider/language/LanguageProvider.js +1 -0
  337. package/build/es/no-polyfill/provider/language/LanguageProvider.spec.js +1 -0
  338. package/build/es/no-polyfill/provider/language/index.js +1 -0
  339. package/build/es/no-polyfill/radio/Radio.js +1 -0
  340. package/build/es/no-polyfill/radio/index.js +1 -0
  341. package/build/es/no-polyfill/radioGroup/RadioGroup.js +2 -0
  342. package/build/es/no-polyfill/radioGroup/index.js +1 -0
  343. package/build/es/no-polyfill/radioOption/RadioOption.js +1 -0
  344. package/build/es/no-polyfill/radioOption/index.js +1 -0
  345. package/build/es/no-polyfill/section/Section.js +5 -0
  346. package/build/es/no-polyfill/section/Section.spec.js +1 -0
  347. package/build/es/no-polyfill/section/Section.story.js +1 -0
  348. package/build/es/no-polyfill/section/index.js +1 -0
  349. package/build/es/no-polyfill/select/Select.js +16 -0
  350. package/build/es/no-polyfill/select/Select.messages.js +1 -0
  351. package/build/es/no-polyfill/select/index.js +1 -0
  352. package/build/es/no-polyfill/select/option/Option.js +2 -0
  353. package/build/es/no-polyfill/select/option/index.js +1 -0
  354. package/build/es/no-polyfill/select/searchBox/SearchBox.js +1 -0
  355. package/build/es/no-polyfill/select/searchBox/index.js +1 -0
  356. package/build/es/no-polyfill/sizeSwapper/SizeSwapper.js +5 -0
  357. package/build/es/no-polyfill/sizeSwapper/index.js +1 -0
  358. package/build/es/no-polyfill/slidingPanel/SlidingPanel.js +2 -0
  359. package/build/es/no-polyfill/slidingPanel/index.js +1 -0
  360. package/build/es/no-polyfill/snackbar/Snackbar.js +1 -0
  361. package/build/es/no-polyfill/snackbar/SnackbarContext.js +1 -0
  362. package/build/es/no-polyfill/snackbar/SnackbarProvider.js +1 -0
  363. package/build/es/no-polyfill/snackbar/index.js +1 -0
  364. package/build/es/no-polyfill/snackbar/useSnackbar.js +1 -0
  365. package/build/es/no-polyfill/statusIcon/StatusIcon.js +1 -0
  366. package/build/es/no-polyfill/statusIcon/index.js +1 -0
  367. package/build/es/no-polyfill/stepper/Stepper.js +1 -0
  368. package/build/es/no-polyfill/stepper/deviceDetection.js +4 -0
  369. package/build/es/no-polyfill/stepper/index.js +1 -0
  370. package/build/es/no-polyfill/sticky/Sticky.js +1 -0
  371. package/build/es/no-polyfill/sticky/index.js +1 -0
  372. package/build/es/no-polyfill/summary/Summary.js +1 -0
  373. package/build/es/no-polyfill/summary/Summary.messages.js +1 -0
  374. package/build/es/no-polyfill/summary/index.js +1 -0
  375. package/build/es/no-polyfill/switch/Switch.js +1 -0
  376. package/build/es/no-polyfill/switch/Switch.story.js +1 -0
  377. package/build/es/no-polyfill/switch/index.js +1 -0
  378. package/build/es/no-polyfill/switchOption/SwitchOption.js +1 -0
  379. package/build/es/no-polyfill/switchOption/SwitchOption.story.js +1 -0
  380. package/build/es/no-polyfill/switchOption/index.js +1 -0
  381. package/build/es/no-polyfill/tabs/Tab.js +1 -0
  382. package/build/es/no-polyfill/tabs/TabList.js +1 -0
  383. package/build/es/no-polyfill/tabs/TabPanel.js +1 -0
  384. package/build/es/no-polyfill/tabs/Tabs.js +1 -0
  385. package/build/es/no-polyfill/tabs/index.js +1 -0
  386. package/build/es/no-polyfill/tabs/utils.js +5 -0
  387. package/build/es/no-polyfill/textareaWithDisplayFormat/TextareaWithDisplayFormat.js +1 -0
  388. package/build/es/no-polyfill/textareaWithDisplayFormat/index.js +1 -0
  389. package/build/es/no-polyfill/tile/Tile.js +1 -0
  390. package/build/es/no-polyfill/tile/index.js +1 -0
  391. package/build/es/no-polyfill/title/Title.js +1 -0
  392. package/build/es/no-polyfill/title/Title.spec.js +1 -0
  393. package/build/es/no-polyfill/title/Title.story.js +1 -0
  394. package/build/es/no-polyfill/title/index.js +1 -0
  395. package/build/es/no-polyfill/tooltip/Tooltip.js +8 -0
  396. package/build/es/no-polyfill/tooltip/Tooltip.spec.js +1 -0
  397. package/build/es/no-polyfill/tooltip/Tooltip.story.js +1 -0
  398. package/build/es/no-polyfill/tooltip/index.js +1 -0
  399. package/build/es/no-polyfill/typeahead/Typeahead.js +1 -0
  400. package/build/es/no-polyfill/typeahead/index.js +1 -0
  401. package/build/es/no-polyfill/typeahead/typeaheadInput/TypeaheadInput.js +1 -0
  402. package/build/es/no-polyfill/typeahead/typeaheadOption/TypeaheadOption.js +1 -0
  403. package/build/es/no-polyfill/typeahead/util/highlight.js +1 -0
  404. package/build/es/no-polyfill/upload/Upload.js +12 -0
  405. package/build/es/no-polyfill/upload/Upload.messages.js +1 -0
  406. package/build/es/no-polyfill/upload/index.js +1 -0
  407. package/build/es/no-polyfill/upload/steps/completeStep/completeStep.js +1 -0
  408. package/build/es/no-polyfill/upload/steps/completeStep/index.js +1 -0
  409. package/build/es/no-polyfill/upload/steps/index.js +1 -0
  410. package/build/es/no-polyfill/upload/steps/mediaUploadStep/index.js +1 -0
  411. package/build/es/no-polyfill/upload/steps/mediaUploadStep/mediaUploadStep.js +1 -0
  412. package/build/es/no-polyfill/upload/steps/processingStep/index.js +1 -0
  413. package/build/es/no-polyfill/upload/steps/processingStep/processingStep.js +1 -0
  414. package/build/es/no-polyfill/upload/steps/uploadImageStep/index.js +1 -0
  415. package/build/es/no-polyfill/upload/steps/uploadImageStep/uploadImageStep.js +1 -0
  416. package/build/es/no-polyfill/upload/uploadSteps.js +2 -0
  417. package/build/es/no-polyfill/upload/utils/asyncFileRead/asyncFileRead.js +1 -0
  418. package/build/es/no-polyfill/upload/utils/asyncFileRead/index.js +1 -0
  419. package/build/es/no-polyfill/upload/utils/getFileType/getFileType.js +1 -0
  420. package/build/es/no-polyfill/upload/utils/getFileType/index.js +1 -0
  421. package/build/es/no-polyfill/upload/utils/getSupportedSpotMimeTypes/getSupportedSpotMimeTypes.js +2 -0
  422. package/build/es/no-polyfill/upload/utils/getSupportedSpotMimeTypes/index.js +1 -0
  423. package/build/es/no-polyfill/upload/utils/index.js +1 -0
  424. package/build/es/no-polyfill/upload/utils/isSizeValid/index.js +1 -0
  425. package/build/es/no-polyfill/upload/utils/isSizeValid/isSizeValid.js +1 -0
  426. package/build/es/no-polyfill/upload/utils/isTypeValid/index.js +1 -0
  427. package/build/es/no-polyfill/upload/utils/isTypeValid/isTypeValid.js +1 -0
  428. package/build/es/no-polyfill/upload/utils/postData/index.js +1 -0
  429. package/build/es/no-polyfill/upload/utils/postData/postData.js +1 -0
  430. package/build/es/no-polyfill/upload/utils/requestMedia/index.js +1 -0
  431. package/build/es/no-polyfill/upload/utils/requestMedia/requestMedia.js +1 -0
  432. package/build/es/no-polyfill/uploadInput/UploadInput.js +8 -0
  433. package/build/es/no-polyfill/uploadInput/UploadInput.messages.js +1 -0
  434. package/build/es/no-polyfill/uploadInput/UploadInput.spec.js +1 -0
  435. package/build/es/no-polyfill/uploadInput/UploadInput.story.js +1 -0
  436. package/build/es/no-polyfill/uploadInput/index.js +1 -0
  437. package/build/es/no-polyfill/uploadInput/types.js +1 -0
  438. package/build/es/no-polyfill/uploadInput/uploadButton/UploadButton.js +1 -0
  439. package/build/es/no-polyfill/uploadInput/uploadButton/UploadButton.messages.js +1 -0
  440. package/build/es/no-polyfill/uploadInput/uploadButton/UploadButton.spec.js +3 -0
  441. package/build/es/no-polyfill/uploadInput/uploadButton/defaults.js +1 -0
  442. package/build/es/no-polyfill/uploadInput/uploadButton/getAllowedFileTypes.js +3 -0
  443. package/build/es/no-polyfill/uploadInput/uploadButton/getAllowedFileTypes.spec.js +1 -0
  444. package/build/es/no-polyfill/uploadInput/uploadItem/UploadItem.js +2 -0
  445. package/build/es/no-polyfill/uploadInput/uploadItem/UploadItem.messages.js +1 -0
  446. package/build/es/no-polyfill/uploadInput/uploadItem/UploadItem.spec.js +1 -0
  447. package/build/es/no-polyfill/uploadInput/uploadItem/UploadItemBody.js +1 -0
  448. package/build/es/no-polyfill/utilities/deprecatedProperty/deprecatedProperty.js +1 -0
  449. package/build/es/no-polyfill/utilities/deprecatedProperty/index.js +1 -0
  450. package/build/es/no-polyfill/utilities/index.js +1 -0
  451. package/build/es/no-polyfill/utilities/logActionRequired.js +1 -0
  452. package/build/es/no-polyfill/withDisplayFormat/WithDisplayFormat.js +8 -0
  453. package/build/es/no-polyfill/withDisplayFormat/index.js +1 -0
  454. package/build/es/no-polyfill/withNextPortal/withNextPortal.js +1 -0
  455. package/build/es/no-polyfill/withNormaliser/WithNormalizer.js +7 -0
  456. package/build/es/no-polyfill/withNormaliser/index.js +1 -0
  457. package/build/es/no-polyfill/withNormaliser/validation/event-utilities/index.js +1 -0
  458. package/build/es/polyfill/accordion/Accordion.js +1 -0
  459. package/build/es/polyfill/accordion/AccordionItem/AccordionItem.js +1 -0
  460. package/build/es/polyfill/accordion/AccordionItem/index.js +1 -0
  461. package/build/es/polyfill/accordion/index.js +1 -0
  462. package/build/es/polyfill/actionButton/ActionButton.js +1 -0
  463. package/build/es/polyfill/actionButton/ActionButton.spec.js +1 -0
  464. package/build/es/polyfill/actionButton/ActionButton.story.js +1 -0
  465. package/build/es/polyfill/actionButton/index.js +1 -0
  466. package/build/es/polyfill/actionOption/ActionOption.js +1 -0
  467. package/build/es/polyfill/actionOption/ActionOption.story.js +1 -0
  468. package/build/es/polyfill/actionOption/index.js +1 -0
  469. package/build/es/polyfill/alert/Alert.js +1 -0
  470. package/build/es/polyfill/alert/index.js +1 -0
  471. package/build/es/polyfill/alert/inlineMarkdown/InlineMarkdown.js +1 -0
  472. package/build/es/polyfill/alert/inlineMarkdown/index.js +1 -0
  473. package/build/es/polyfill/alert/withArrow/alertArrowPositions.js +2 -0
  474. package/build/es/polyfill/alert/withArrow/index.js +1 -0
  475. package/build/es/polyfill/alert/withArrow/withArrow.js +1 -0
  476. package/build/es/polyfill/avatar/Avatar.js +1 -0
  477. package/build/es/polyfill/avatar/avatarTypes.js +2 -0
  478. package/build/es/polyfill/avatar/index.js +1 -0
  479. package/build/es/polyfill/avatarWrapper/AvatarWrapper.js +1 -0
  480. package/build/es/polyfill/avatarWrapper/index.js +1 -0
  481. package/build/es/polyfill/badge/Badge.js +1 -0
  482. package/build/es/polyfill/badge/index.js +1 -0
  483. package/build/es/polyfill/body/Body.js +1 -0
  484. package/build/es/polyfill/body/Body.spec.js +1 -0
  485. package/build/es/polyfill/body/Body.story.js +1 -0
  486. package/build/es/polyfill/body/index.js +1 -0
  487. package/build/es/polyfill/button/Button.js +7 -0
  488. package/build/es/polyfill/button/classMap.js +1 -0
  489. package/build/es/polyfill/button/index.js +1 -0
  490. package/build/es/polyfill/button/legacyUtils/index.js +1 -0
  491. package/build/es/polyfill/button/legacyUtils/legacyUtils.js +4 -0
  492. package/build/es/polyfill/card/Card.js +1 -0
  493. package/build/es/polyfill/card/index.js +1 -0
  494. package/build/es/polyfill/checkbox/Checkbox.js +1 -0
  495. package/build/es/polyfill/checkbox/index.js +1 -0
  496. package/build/es/polyfill/checkboxButton/CheckboxButton.js +1 -0
  497. package/build/es/polyfill/checkboxButton/CheckboxButton.spec.js +1 -0
  498. package/build/es/polyfill/checkboxButton/CheckboxButton.story.js +1 -0
  499. package/build/es/polyfill/checkboxButton/index.js +1 -0
  500. package/build/es/polyfill/checkboxOption/CheckboxOption.js +1 -0
  501. package/build/es/polyfill/checkboxOption/CheckboxOption.spec.js +1 -0
  502. package/build/es/polyfill/checkboxOption/CheckboxOption.story.js +1 -0
  503. package/build/es/polyfill/checkboxOption/index.js +1 -0
  504. package/build/es/polyfill/chevron/Chevron.js +1 -0
  505. package/build/es/polyfill/chevron/index.js +1 -0
  506. package/build/es/polyfill/chips/Chip.js +1 -0
  507. package/build/es/polyfill/chips/Chips.js +1 -0
  508. package/build/es/polyfill/chips/Chips.messages.js +1 -0
  509. package/build/es/polyfill/chips/Chips.spec.js +1 -0
  510. package/build/es/polyfill/chips/Chips.story.js +1 -0
  511. package/build/es/polyfill/chips/index.js +1 -0
  512. package/build/es/polyfill/circularButton/CircularButton.js +1 -0
  513. package/build/es/polyfill/circularButton/index.js +1 -0
  514. package/build/es/polyfill/common/DOMOperations/DOMOperations.js +9 -0
  515. package/build/es/polyfill/common/DOMOperations/index.js +1 -0
  516. package/build/es/polyfill/common/Option/Option.js +1 -0
  517. package/build/es/polyfill/common/Option/index.js +1 -0
  518. package/build/es/polyfill/common/RadioButton/RadioButton.js +1 -0
  519. package/build/es/polyfill/common/RadioButton/index.js +1 -0
  520. package/build/es/polyfill/common/bottomSheet/BottomSheet.js +10 -0
  521. package/build/es/polyfill/common/bottomSheet/BottomSheet.spec.js +1 -0
  522. package/build/es/polyfill/common/bottomSheet/index.js +1 -0
  523. package/build/es/polyfill/common/closeButton/CloseButton.js +1 -0
  524. package/build/es/polyfill/common/closeButton/CloseButton.messages.js +1 -0
  525. package/build/es/polyfill/common/closeButton/index.js +1 -0
  526. package/build/es/polyfill/common/commonProps.js +0 -0
  527. package/build/es/polyfill/common/dateUtils/getDayNames/getDayNames.js +2 -0
  528. package/build/es/polyfill/common/dateUtils/getDayNames/index.js +1 -0
  529. package/build/es/polyfill/common/dateUtils/getMonthNames/getMonthNames.js +1 -0
  530. package/build/es/polyfill/common/dateUtils/getMonthNames/index.js +1 -0
  531. package/build/es/polyfill/common/dateUtils/index.js +1 -0
  532. package/build/es/polyfill/common/dateUtils/isDateValid/index.js +1 -0
  533. package/build/es/polyfill/common/dateUtils/isDateValid/isDateValid.js +1 -0
  534. package/build/es/polyfill/common/dateUtils/isMonthAndYearFormat/index.js +1 -0
  535. package/build/es/polyfill/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.js +1 -0
  536. package/build/es/polyfill/common/dateUtils/isWithinRange/index.js +1 -0
  537. package/build/es/polyfill/common/dateUtils/isWithinRange/isWithinRange.js +1 -0
  538. package/build/es/polyfill/common/dateUtils/moveToWithinRange/index.js +1 -0
  539. package/build/es/polyfill/common/dateUtils/moveToWithinRange/moveToWithinRange.js +2 -0
  540. package/build/es/polyfill/common/deviceDetection/deviceDetection.js +1 -0
  541. package/build/es/polyfill/common/deviceDetection/index.js +1 -0
  542. package/build/es/polyfill/common/direction.js +1 -0
  543. package/build/es/polyfill/common/domHelpers/documentIosClick.js +5 -0
  544. package/build/es/polyfill/common/domHelpers/index.js +1 -0
  545. package/build/es/polyfill/common/fakeEvents.js +1 -0
  546. package/build/es/polyfill/common/fileType.js +1 -0
  547. package/build/es/polyfill/common/flowHeader/FlowHeader.js +1 -0
  548. package/build/es/polyfill/common/flowHeader/index.js +1 -0
  549. package/build/es/polyfill/common/focusBoundary/FocusBoundary.js +1 -0
  550. package/build/es/polyfill/common/focusBoundary/index.js +1 -0
  551. package/build/es/polyfill/common/focusBoundary/utils/getFocusableElements.js +6 -0
  552. package/build/es/polyfill/common/focusBoundary/utils/index.js +1 -0
  553. package/build/es/polyfill/common/focusBoundary/utils/resetFocus.js +6 -0
  554. package/build/es/polyfill/common/historyNavigator/historyNavigator.js +1 -0
  555. package/build/es/polyfill/common/historyNavigator/index.js +1 -0
  556. package/build/es/polyfill/common/hooks/index.js +1 -0
  557. package/build/es/polyfill/common/hooks/useClientWidth/index.js +1 -0
  558. package/build/es/polyfill/common/hooks/useClientWidth/useClientWidth.js +5 -0
  559. package/build/es/polyfill/common/hooks/useConditionalListener/index.js +1 -0
  560. package/build/es/polyfill/common/hooks/useConditionalListener/useConditionalListener.js +3 -0
  561. package/build/es/polyfill/common/hooks/useDirection/index.js +1 -0
  562. package/build/es/polyfill/common/hooks/useDirection/useDirection.js +1 -0
  563. package/build/es/polyfill/common/hooks/useHasIntersected/index.js +1 -0
  564. package/build/es/polyfill/common/hooks/useHasIntersected/useHasIntersected.js +11 -0
  565. package/build/es/polyfill/common/hooks/useLayout/index.js +1 -0
  566. package/build/es/polyfill/common/hooks/useLayout/useLayout.js +1 -0
  567. package/build/es/polyfill/common/index.js +2 -0
  568. package/build/es/polyfill/common/key.js +1 -0
  569. package/build/es/polyfill/common/keyCodes.js +5 -0
  570. package/build/es/polyfill/common/locale/index.js +37 -0
  571. package/build/es/polyfill/common/panel/Panel.js +10 -0
  572. package/build/es/polyfill/common/panel/index.js +1 -0
  573. package/build/es/polyfill/common/propsValues/breakpoint.js +1 -0
  574. package/build/es/polyfill/common/propsValues/control.js +1 -0
  575. package/build/es/polyfill/common/propsValues/dateMode.js +1 -0
  576. package/build/es/polyfill/common/propsValues/layouts.js +1 -0
  577. package/build/es/polyfill/common/propsValues/markdownNodeType.js +1 -0
  578. package/build/es/polyfill/common/propsValues/monthFormat.js +1 -0
  579. package/build/es/polyfill/common/propsValues/position.js +1 -0
  580. package/build/es/polyfill/common/propsValues/profileType.js +1 -0
  581. package/build/es/polyfill/common/propsValues/scroll.js +1 -0
  582. package/build/es/polyfill/common/propsValues/sentiment.js +1 -0
  583. package/build/es/polyfill/common/propsValues/size.js +1 -0
  584. package/build/es/polyfill/common/propsValues/status.js +1 -0
  585. package/build/es/polyfill/common/propsValues/type.js +3 -0
  586. package/build/es/polyfill/common/propsValues/typography.js +1 -0
  587. package/build/es/polyfill/common/propsValues/variant.js +1 -0
  588. package/build/es/polyfill/common/propsValues/width.js +1 -0
  589. package/build/es/polyfill/common/requirements.js +3 -0
  590. package/build/es/polyfill/common/responsivePanel/ResponsivePanel.js +1 -0
  591. package/build/es/polyfill/common/responsivePanel/index.js +1 -0
  592. package/build/es/polyfill/common/textFormat/formatWithPattern/formatWithPattern.js +2 -0
  593. package/build/es/polyfill/common/textFormat/formatWithPattern/index.js +1 -0
  594. package/build/es/polyfill/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.js +1 -0
  595. package/build/es/polyfill/common/textFormat/getCountOfSymbolsInSelection/index.js +1 -0
  596. package/build/es/polyfill/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js +1 -0
  597. package/build/es/polyfill/common/textFormat/getCursorPositionAfterKeystroke/index.js +1 -0
  598. package/build/es/polyfill/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js +2 -0
  599. package/build/es/polyfill/common/textFormat/getDistanceToSymbol/index.js +1 -0
  600. package/build/es/polyfill/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js +1 -0
  601. package/build/es/polyfill/common/textFormat/getSymbolsInPatternWithPosition/index.js +1 -0
  602. package/build/es/polyfill/common/textFormat/index.js +1 -0
  603. package/build/es/polyfill/common/textFormat/unformatWithPattern/index.js +1 -0
  604. package/build/es/polyfill/common/textFormat/unformatWithPattern/unformatWithPattern.js +1 -0
  605. package/build/es/polyfill/common/theme.js +1 -0
  606. package/build/es/polyfill/criticalBanner/CriticalCommsBanner.js +1 -0
  607. package/build/es/polyfill/criticalBanner/CriticalCommsBanner.story.js +1 -0
  608. package/build/es/polyfill/criticalBanner/index.js +1 -0
  609. package/build/es/polyfill/dateInput/DateInput.js +4 -0
  610. package/build/es/polyfill/dateInput/DateInput.messages.js +1 -0
  611. package/build/es/polyfill/dateInput/index.js +1 -0
  612. package/build/es/polyfill/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js +2 -0
  613. package/build/es/polyfill/dateInput/utils/convertToLocalMidnight/index.js +1 -0
  614. package/build/es/polyfill/dateInput/utils/explodeDate/explodeDate.js +1 -0
  615. package/build/es/polyfill/dateInput/utils/explodeDate/index.js +1 -0
  616. package/build/es/polyfill/dateInput/utils/index.js +1 -0
  617. package/build/es/polyfill/dateLookup/DateLookup.js +3 -0
  618. package/build/es/polyfill/dateLookup/dateHeader/DateHeader.js +1 -0
  619. package/build/es/polyfill/dateLookup/dateHeader/index.js +1 -0
  620. package/build/es/polyfill/dateLookup/dateTrigger/DateTrigger.js +1 -0
  621. package/build/es/polyfill/dateLookup/dateTrigger/DateTrigger.messages.js +1 -0
  622. package/build/es/polyfill/dateLookup/dateTrigger/index.js +1 -0
  623. package/build/es/polyfill/dateLookup/dayCalendar/DayCalendar.js +1 -0
  624. package/build/es/polyfill/dateLookup/dayCalendar/index.js +1 -0
  625. package/build/es/polyfill/dateLookup/dayCalendar/table/DayCalendarTable.js +4 -0
  626. package/build/es/polyfill/dateLookup/dayCalendar/table/index.js +1 -0
  627. package/build/es/polyfill/dateLookup/getStartOfDay/getStartOfDay.js +5 -0
  628. package/build/es/polyfill/dateLookup/getStartOfDay/index.js +1 -0
  629. package/build/es/polyfill/dateLookup/index.js +1 -0
  630. package/build/es/polyfill/dateLookup/monthCalendar/MonthCalendar.js +1 -0
  631. package/build/es/polyfill/dateLookup/monthCalendar/index.js +1 -0
  632. package/build/es/polyfill/dateLookup/monthCalendar/table/MonthCalendarTable.js +1 -0
  633. package/build/es/polyfill/dateLookup/monthCalendar/table/index.js +1 -0
  634. package/build/es/polyfill/dateLookup/tableLink/TableLink.js +2 -0
  635. package/build/es/polyfill/dateLookup/tableLink/index.js +1 -0
  636. package/build/es/polyfill/dateLookup/yearCalendar/YearCalendar.js +1 -0
  637. package/build/es/polyfill/dateLookup/yearCalendar/index.js +1 -0
  638. package/build/es/polyfill/dateLookup/yearCalendar/table/YearCalendarTable.js +1 -0
  639. package/build/es/polyfill/dateLookup/yearCalendar/table/index.js +1 -0
  640. package/build/es/polyfill/decision/Decision.js +5 -0
  641. package/build/es/polyfill/decision/decisionEnums.js +3 -0
  642. package/build/es/polyfill/decision/index.js +1 -0
  643. package/build/es/polyfill/definitionList/DefinitionList.js +1 -0
  644. package/build/es/polyfill/definitionList/index.js +1 -0
  645. package/build/es/polyfill/dimmer/Dimmer.js +6 -0
  646. package/build/es/polyfill/dimmer/Dimmer.story.js +1 -0
  647. package/build/es/polyfill/dimmer/dimmerManager/DimmerManager.js +5 -0
  648. package/build/es/polyfill/dimmer/dimmerManager/index.js +1 -0
  649. package/build/es/polyfill/dimmer/index.js +1 -0
  650. package/build/es/polyfill/display/Display.js +1 -0
  651. package/build/es/polyfill/display/Display.story.js +1 -0
  652. package/build/es/polyfill/display/index.js +1 -0
  653. package/build/es/polyfill/drawer/Drawer.js +1 -0
  654. package/build/es/polyfill/drawer/index.js +1 -0
  655. package/build/es/polyfill/dropFade/DropFade.js +3 -0
  656. package/build/es/polyfill/dropFade/DropFade.story.js +1 -0
  657. package/build/es/polyfill/dropFade/index.js +1 -0
  658. package/build/es/polyfill/dynamicFieldDefinitionList/DynamicFieldDefinitionList.js +1 -0
  659. package/build/es/polyfill/dynamicFieldDefinitionList/FormattedValue/FormattedValue.js +8 -0
  660. package/build/es/polyfill/dynamicFieldDefinitionList/FormattedValue/index.js +1 -0
  661. package/build/es/polyfill/dynamicFieldDefinitionList/index.js +1 -0
  662. package/build/es/polyfill/dynamicFieldDefinitionList/utils/createDefinitions.js +2 -0
  663. package/build/es/polyfill/dynamicFieldDefinitionList/utils/text-format.js +1 -0
  664. package/build/es/polyfill/emphasis/Emphasis.js +2 -0
  665. package/build/es/polyfill/emphasis/EmphasisHtmlTransformer.js +7 -0
  666. package/build/es/polyfill/emphasis/index.js +1 -0
  667. package/build/es/polyfill/flowNavigation/FlowNavigation.js +2 -0
  668. package/build/es/polyfill/flowNavigation/animatedLabel/AnimatedLabel.js +1 -0
  669. package/build/es/polyfill/flowNavigation/animatedLabel/index.js +1 -0
  670. package/build/es/polyfill/flowNavigation/backButton/BackButton.js +1 -0
  671. package/build/es/polyfill/flowNavigation/backButton/index.js +1 -0
  672. package/build/es/polyfill/flowNavigation/index.js +1 -0
  673. package/build/es/polyfill/header/Header.js +5 -0
  674. package/build/es/polyfill/header/Header.spec.js +1 -0
  675. package/build/es/polyfill/header/Header.story.js +2 -0
  676. package/build/es/polyfill/header/index.js +1 -0
  677. package/build/es/polyfill/i18n/cs.json +44 -0
  678. package/build/es/polyfill/i18n/de.json +44 -0
  679. package/build/es/polyfill/i18n/en.json +44 -0
  680. package/build/es/polyfill/i18n/es.json +44 -0
  681. package/build/es/polyfill/i18n/fr.json +44 -0
  682. package/build/es/polyfill/i18n/hu.json +44 -0
  683. package/build/es/polyfill/i18n/id.json +44 -0
  684. package/build/es/polyfill/i18n/index.js +1 -0
  685. package/build/es/polyfill/i18n/it.json +44 -0
  686. package/build/es/polyfill/i18n/ja.json +44 -0
  687. package/build/es/polyfill/i18n/pl.json +44 -0
  688. package/build/es/polyfill/i18n/pt.json +44 -0
  689. package/build/es/polyfill/i18n/ro.json +44 -0
  690. package/build/es/polyfill/i18n/ru.json +44 -0
  691. package/build/es/polyfill/i18n/th.json +44 -0
  692. package/build/es/polyfill/i18n/tr.json +44 -0
  693. package/build/es/polyfill/i18n/uk.json +44 -0
  694. package/build/es/polyfill/i18n/zh-CN.json +44 -0
  695. package/build/es/polyfill/i18n/zh.json +44 -0
  696. package/build/es/polyfill/image/Image.js +12 -0
  697. package/build/es/polyfill/image/index.js +1 -0
  698. package/build/es/polyfill/index.js +13 -0
  699. package/build/es/polyfill/info/Info.js +1 -0
  700. package/build/es/polyfill/info/index.js +1 -0
  701. package/build/es/polyfill/info/infoPresentations.js +2 -0
  702. package/build/es/polyfill/inlineAlert/InlineAlert.js +1 -0
  703. package/build/es/polyfill/inlineAlert/index.js +1 -0
  704. package/build/es/polyfill/inputWithDisplayFormat/InputWithDisplayFormat.js +1 -0
  705. package/build/es/polyfill/inputWithDisplayFormat/index.js +1 -0
  706. package/build/es/polyfill/instructionsList/InstructionsList.js +3 -0
  707. package/build/es/polyfill/instructionsList/index.js +1 -0
  708. package/build/es/polyfill/lab/index.js +1 -0
  709. package/build/es/polyfill/lab/mobileNav/MobileNav.js +9 -0
  710. package/build/es/polyfill/lab/mobileNav/index.js +1 -0
  711. package/build/es/polyfill/lab/mobileNav/utils/index.js +1 -0
  712. package/build/es/polyfill/lab/mobileNav/utils/isIpadOsSafari/index.js +1 -0
  713. package/build/es/polyfill/lab/mobileNav/utils/isIpadOsSafari/isIpadOsSafari.js +1 -0
  714. package/build/es/polyfill/lab/mobileNav/utils/isMobileSafari/index.js +1 -0
  715. package/build/es/polyfill/lab/mobileNav/utils/isMobileSafari/isMobileSafari.js +1 -0
  716. package/build/es/polyfill/lab/pagination/Pagination.js +1 -0
  717. package/build/es/polyfill/lab/pagination/Pagination.messages.js +1 -0
  718. package/build/es/polyfill/lab/pagination/index.js +1 -0
  719. package/build/es/polyfill/lab/pagination/paginationLink/PaginationLink.js +1 -0
  720. package/build/es/polyfill/lab/pagination/paginationLink/PaginationLink.messages.js +1 -0
  721. package/build/es/polyfill/lab/pagination/paginationLink/index.js +1 -0
  722. package/build/es/polyfill/link/Link.js +5 -0
  723. package/build/es/polyfill/link/Link.spec.js +1 -0
  724. package/build/es/polyfill/link/Link.story.js +1 -0
  725. package/build/es/polyfill/link/index.js +1 -0
  726. package/build/es/polyfill/loader/Loader.js +11 -0
  727. package/build/es/polyfill/loader/index.js +1 -0
  728. package/build/es/polyfill/logo/Logo.js +1 -0
  729. package/build/es/polyfill/logo/index.js +1 -0
  730. package/build/es/polyfill/logo/logoTypes.js +2 -0
  731. package/build/es/polyfill/logo/svg/flag-inverse.svg +1 -0
  732. package/build/es/polyfill/logo/svg/flag.svg +1 -0
  733. package/build/es/polyfill/logo/svg/logo-business-inverse.svg +1 -0
  734. package/build/es/polyfill/logo/svg/logo-business.svg +1 -0
  735. package/build/es/polyfill/logo/svg/logo-inverse.svg +1 -0
  736. package/build/es/polyfill/logo/svg/logo.svg +1 -0
  737. package/build/es/polyfill/markdown/Markdown.js +1 -0
  738. package/build/es/polyfill/markdown/index.js +1 -0
  739. package/build/es/polyfill/modal/Modal.js +1 -0
  740. package/build/es/polyfill/modal/Modal.story.js +1 -0
  741. package/build/es/polyfill/modal/index.js +1 -0
  742. package/build/es/polyfill/money/Money.js +1 -0
  743. package/build/es/polyfill/money/index.js +1 -0
  744. package/build/es/polyfill/moneyInput/MoneyInput.js +5 -0
  745. package/build/es/polyfill/moneyInput/MoneyInput.messages.js +1 -0
  746. package/build/es/polyfill/moneyInput/currencyFormatting.js +4 -0
  747. package/build/es/polyfill/moneyInput/index.js +1 -0
  748. package/build/es/polyfill/navigationOption/NavigationOption.js +1 -0
  749. package/build/es/polyfill/navigationOption/index.js +1 -0
  750. package/build/es/polyfill/navigationOptionsList/NavigationOptionsList.js +1 -0
  751. package/build/es/polyfill/navigationOptionsList/index.js +1 -0
  752. package/build/es/polyfill/nudge/Nudge.js +1 -0
  753. package/build/es/polyfill/nudge/index.js +1 -0
  754. package/build/es/polyfill/overlayHeader/OverlayHeader.js +1 -0
  755. package/build/es/polyfill/overlayHeader/index.js +1 -0
  756. package/build/es/polyfill/phoneNumberInput/PhoneNumberInput.js +1 -0
  757. package/build/es/polyfill/phoneNumberInput/data/countries.js +1 -0
  758. package/build/es/polyfill/phoneNumberInput/index.js +1 -0
  759. package/build/es/polyfill/phoneNumberInput/utils/cleanNumber/cleanNumber.js +1 -0
  760. package/build/es/polyfill/phoneNumberInput/utils/cleanNumber/index.js +1 -0
  761. package/build/es/polyfill/phoneNumberInput/utils/explodeNumberModel/index.js +7 -0
  762. package/build/es/polyfill/phoneNumberInput/utils/filterOptionsForQuery/index.js +7 -0
  763. package/build/es/polyfill/phoneNumberInput/utils/findCountryByCode/index.js +1 -0
  764. package/build/es/polyfill/phoneNumberInput/utils/findCountryByPrefix/index.js +1 -0
  765. package/build/es/polyfill/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js +1 -0
  766. package/build/es/polyfill/phoneNumberInput/utils/groupCountriesByPrefix/index.js +1 -0
  767. package/build/es/polyfill/phoneNumberInput/utils/index.js +1 -0
  768. package/build/es/polyfill/phoneNumberInput/utils/isOptionAndFitsQuery/index.js +1 -0
  769. package/build/es/polyfill/phoneNumberInput/utils/isOptionAndFitsQuery/isOptionAndFitsQuery.js +7 -0
  770. package/build/es/polyfill/phoneNumberInput/utils/isStringNumeric/index.js +1 -0
  771. package/build/es/polyfill/phoneNumberInput/utils/isStringNumeric/isStringNumeric.js +1 -0
  772. package/build/es/polyfill/phoneNumberInput/utils/isValidPhoneNumber/index.js +1 -0
  773. package/build/es/polyfill/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.js +6 -0
  774. package/build/es/polyfill/phoneNumberInput/utils/longestMatchingPrefix/index.js +1 -0
  775. package/build/es/polyfill/phoneNumberInput/utils/setDefaultPrefix/index.js +11 -0
  776. package/build/es/polyfill/phoneNumberInput/utils/sortArrayByProperty/index.js +1 -0
  777. package/build/es/polyfill/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js +2 -0
  778. package/build/es/polyfill/popover/Popover.js +4 -0
  779. package/build/es/polyfill/popover/index.js +1 -0
  780. package/build/es/polyfill/processIndicator/ProcessIndicator.js +12 -0
  781. package/build/es/polyfill/processIndicator/index.js +1 -0
  782. package/build/es/polyfill/progress/Progress.js +1 -0
  783. package/build/es/polyfill/progress/index.js +1 -0
  784. package/build/es/polyfill/progressBar/ProgressBar.js +1 -0
  785. package/build/es/polyfill/progressBar/index.js +1 -0
  786. package/build/es/polyfill/provider/Provider.js +1 -0
  787. package/build/es/polyfill/provider/Provider.spec.js +2 -0
  788. package/build/es/polyfill/provider/Provider.story.js +1 -0
  789. package/build/es/polyfill/provider/direction/DirectionProvider.js +1 -0
  790. package/build/es/polyfill/provider/direction/DirectionProvider.spec.js +1 -0
  791. package/build/es/polyfill/provider/direction/index.js +1 -0
  792. package/build/es/polyfill/provider/index.js +1 -0
  793. package/build/es/polyfill/provider/language/LanguageProvider.js +1 -0
  794. package/build/es/polyfill/provider/language/LanguageProvider.spec.js +1 -0
  795. package/build/es/polyfill/provider/language/index.js +1 -0
  796. package/build/es/polyfill/radio/Radio.js +1 -0
  797. package/build/es/polyfill/radio/index.js +1 -0
  798. package/build/es/polyfill/radioGroup/RadioGroup.js +2 -0
  799. package/build/es/polyfill/radioGroup/index.js +1 -0
  800. package/build/es/polyfill/radioOption/RadioOption.js +1 -0
  801. package/build/es/polyfill/radioOption/index.js +1 -0
  802. package/build/es/polyfill/section/Section.js +5 -0
  803. package/build/es/polyfill/section/Section.spec.js +1 -0
  804. package/build/es/polyfill/section/Section.story.js +1 -0
  805. package/build/es/polyfill/section/index.js +1 -0
  806. package/build/es/polyfill/select/Select.js +16 -0
  807. package/build/es/polyfill/select/Select.messages.js +1 -0
  808. package/build/es/polyfill/select/index.js +1 -0
  809. package/build/es/polyfill/select/option/Option.js +2 -0
  810. package/build/es/polyfill/select/option/index.js +1 -0
  811. package/build/es/polyfill/select/searchBox/SearchBox.js +1 -0
  812. package/build/es/polyfill/select/searchBox/index.js +1 -0
  813. package/build/es/polyfill/sizeSwapper/SizeSwapper.js +5 -0
  814. package/build/es/polyfill/sizeSwapper/index.js +1 -0
  815. package/build/es/polyfill/slidingPanel/SlidingPanel.js +2 -0
  816. package/build/es/polyfill/slidingPanel/index.js +1 -0
  817. package/build/es/polyfill/snackbar/Snackbar.js +1 -0
  818. package/build/es/polyfill/snackbar/SnackbarContext.js +1 -0
  819. package/build/es/polyfill/snackbar/SnackbarProvider.js +1 -0
  820. package/build/es/polyfill/snackbar/index.js +1 -0
  821. package/build/es/polyfill/snackbar/useSnackbar.js +1 -0
  822. package/build/es/polyfill/statusIcon/StatusIcon.js +1 -0
  823. package/build/es/polyfill/statusIcon/index.js +1 -0
  824. package/build/es/polyfill/stepper/Stepper.js +1 -0
  825. package/build/es/polyfill/stepper/deviceDetection.js +4 -0
  826. package/build/es/polyfill/stepper/index.js +1 -0
  827. package/build/es/polyfill/sticky/Sticky.js +1 -0
  828. package/build/es/polyfill/sticky/index.js +1 -0
  829. package/build/es/polyfill/summary/Summary.js +1 -0
  830. package/build/es/polyfill/summary/Summary.messages.js +1 -0
  831. package/build/es/polyfill/summary/index.js +1 -0
  832. package/build/es/polyfill/switch/Switch.js +1 -0
  833. package/build/es/polyfill/switch/Switch.story.js +1 -0
  834. package/build/es/polyfill/switch/index.js +1 -0
  835. package/build/es/polyfill/switchOption/SwitchOption.js +1 -0
  836. package/build/es/polyfill/switchOption/SwitchOption.story.js +1 -0
  837. package/build/es/polyfill/switchOption/index.js +1 -0
  838. package/build/es/polyfill/tabs/Tab.js +1 -0
  839. package/build/es/polyfill/tabs/TabList.js +1 -0
  840. package/build/es/polyfill/tabs/TabPanel.js +1 -0
  841. package/build/es/polyfill/tabs/Tabs.js +1 -0
  842. package/build/es/polyfill/tabs/index.js +1 -0
  843. package/build/es/polyfill/tabs/utils.js +5 -0
  844. package/build/es/polyfill/textareaWithDisplayFormat/TextareaWithDisplayFormat.js +1 -0
  845. package/build/es/polyfill/textareaWithDisplayFormat/index.js +1 -0
  846. package/build/es/polyfill/tile/Tile.js +1 -0
  847. package/build/es/polyfill/tile/index.js +1 -0
  848. package/build/es/polyfill/title/Title.js +1 -0
  849. package/build/es/polyfill/title/Title.spec.js +1 -0
  850. package/build/es/polyfill/title/Title.story.js +1 -0
  851. package/build/es/polyfill/title/index.js +1 -0
  852. package/build/es/polyfill/tooltip/Tooltip.js +8 -0
  853. package/build/es/polyfill/tooltip/Tooltip.spec.js +1 -0
  854. package/build/es/polyfill/tooltip/Tooltip.story.js +1 -0
  855. package/build/es/polyfill/tooltip/index.js +1 -0
  856. package/build/es/polyfill/typeahead/Typeahead.js +1 -0
  857. package/build/es/polyfill/typeahead/index.js +1 -0
  858. package/build/es/polyfill/typeahead/typeaheadInput/TypeaheadInput.js +1 -0
  859. package/build/es/polyfill/typeahead/typeaheadOption/TypeaheadOption.js +1 -0
  860. package/build/es/polyfill/typeahead/util/highlight.js +1 -0
  861. package/build/es/polyfill/upload/Upload.js +12 -0
  862. package/build/es/polyfill/upload/Upload.messages.js +1 -0
  863. package/build/es/polyfill/upload/index.js +1 -0
  864. package/build/es/polyfill/upload/steps/completeStep/completeStep.js +1 -0
  865. package/build/es/polyfill/upload/steps/completeStep/index.js +1 -0
  866. package/build/es/polyfill/upload/steps/index.js +1 -0
  867. package/build/es/polyfill/upload/steps/mediaUploadStep/index.js +1 -0
  868. package/build/es/polyfill/upload/steps/mediaUploadStep/mediaUploadStep.js +1 -0
  869. package/build/es/polyfill/upload/steps/processingStep/index.js +1 -0
  870. package/build/es/polyfill/upload/steps/processingStep/processingStep.js +1 -0
  871. package/build/es/polyfill/upload/steps/uploadImageStep/index.js +1 -0
  872. package/build/es/polyfill/upload/steps/uploadImageStep/uploadImageStep.js +1 -0
  873. package/build/es/polyfill/upload/uploadSteps.js +2 -0
  874. package/build/es/polyfill/upload/utils/asyncFileRead/asyncFileRead.js +1 -0
  875. package/build/es/polyfill/upload/utils/asyncFileRead/index.js +1 -0
  876. package/build/es/polyfill/upload/utils/getFileType/getFileType.js +1 -0
  877. package/build/es/polyfill/upload/utils/getFileType/index.js +1 -0
  878. package/build/es/polyfill/upload/utils/getSupportedSpotMimeTypes/getSupportedSpotMimeTypes.js +2 -0
  879. package/build/es/polyfill/upload/utils/getSupportedSpotMimeTypes/index.js +1 -0
  880. package/build/es/polyfill/upload/utils/index.js +1 -0
  881. package/build/es/polyfill/upload/utils/isSizeValid/index.js +1 -0
  882. package/build/es/polyfill/upload/utils/isSizeValid/isSizeValid.js +1 -0
  883. package/build/es/polyfill/upload/utils/isTypeValid/index.js +1 -0
  884. package/build/es/polyfill/upload/utils/isTypeValid/isTypeValid.js +1 -0
  885. package/build/es/polyfill/upload/utils/postData/index.js +1 -0
  886. package/build/es/polyfill/upload/utils/postData/postData.js +1 -0
  887. package/build/es/polyfill/upload/utils/requestMedia/index.js +1 -0
  888. package/build/es/polyfill/upload/utils/requestMedia/requestMedia.js +1 -0
  889. package/build/es/polyfill/uploadInput/UploadInput.js +8 -0
  890. package/build/es/polyfill/uploadInput/UploadInput.messages.js +1 -0
  891. package/build/es/polyfill/uploadInput/UploadInput.spec.js +1 -0
  892. package/build/es/polyfill/uploadInput/UploadInput.story.js +1 -0
  893. package/build/es/polyfill/uploadInput/index.js +1 -0
  894. package/build/es/polyfill/uploadInput/types.js +1 -0
  895. package/build/es/polyfill/uploadInput/uploadButton/UploadButton.js +1 -0
  896. package/build/es/polyfill/uploadInput/uploadButton/UploadButton.messages.js +1 -0
  897. package/build/es/polyfill/uploadInput/uploadButton/UploadButton.spec.js +3 -0
  898. package/build/es/polyfill/uploadInput/uploadButton/defaults.js +1 -0
  899. package/build/es/polyfill/uploadInput/uploadButton/getAllowedFileTypes.js +3 -0
  900. package/build/es/polyfill/uploadInput/uploadButton/getAllowedFileTypes.spec.js +1 -0
  901. package/build/es/polyfill/uploadInput/uploadItem/UploadItem.js +2 -0
  902. package/build/es/polyfill/uploadInput/uploadItem/UploadItem.messages.js +1 -0
  903. package/build/es/polyfill/uploadInput/uploadItem/UploadItem.spec.js +1 -0
  904. package/build/es/polyfill/uploadInput/uploadItem/UploadItemBody.js +1 -0
  905. package/build/es/polyfill/utilities/deprecatedProperty/deprecatedProperty.js +1 -0
  906. package/build/es/polyfill/utilities/deprecatedProperty/index.js +1 -0
  907. package/build/es/polyfill/utilities/index.js +1 -0
  908. package/build/es/polyfill/utilities/logActionRequired.js +1 -0
  909. package/build/es/polyfill/withDisplayFormat/WithDisplayFormat.js +8 -0
  910. package/build/es/polyfill/withDisplayFormat/index.js +1 -0
  911. package/build/es/polyfill/withNextPortal/withNextPortal.js +1 -0
  912. package/build/es/polyfill/withNormaliser/WithNormalizer.js +7 -0
  913. package/build/es/polyfill/withNormaliser/index.js +1 -0
  914. package/build/es/polyfill/withNormaliser/validation/event-utilities/index.js +1 -0
  915. package/build/i18n/cs.json +44 -0
  916. package/build/i18n/de.json +44 -0
  917. package/build/i18n/en.json +44 -0
  918. package/build/i18n/es.json +44 -0
  919. package/build/i18n/fr.json +44 -0
  920. package/build/i18n/hu.json +44 -0
  921. package/build/i18n/id.json +44 -0
  922. package/build/i18n/it.json +44 -0
  923. package/build/i18n/ja.json +44 -0
  924. package/build/i18n/pl.json +44 -0
  925. package/build/i18n/pt.json +44 -0
  926. package/build/i18n/ro.json +44 -0
  927. package/build/i18n/ru.json +44 -0
  928. package/build/i18n/th.json +44 -0
  929. package/build/i18n/tr.json +44 -0
  930. package/build/i18n/uk.json +44 -0
  931. package/build/i18n/zh-CN.json +44 -0
  932. package/build/i18n/zh.json +44 -0
  933. package/build/main.css +1 -0
  934. package/build/styles/accordion/Accordion.css +1 -0
  935. package/build/styles/actionButton/ActionButton.css +1 -0
  936. package/build/styles/avatar/Avatar.css +1 -0
  937. package/build/styles/badge/Badge.css +1 -0
  938. package/build/styles/button/Button.css +1 -0
  939. package/build/styles/card/Card.css +1 -0
  940. package/build/styles/checkboxButton/CheckboxButton.css +1 -0
  941. package/build/styles/chips/Chip.css +1 -0
  942. package/build/styles/circularButton/CircularButton.css +1 -0
  943. package/build/styles/common/Option/Option.css +1 -0
  944. package/build/styles/common/RadioButton/RadioButton.css +1 -0
  945. package/build/styles/common/bottomSheet/BottomSheet.css +1 -0
  946. package/build/styles/common/closeButton/CloseButton.css +1 -0
  947. package/build/styles/common/panel/Panel.css +1 -0
  948. package/build/styles/criticalBanner/CriticalCommsBanner.css +1 -0
  949. package/build/styles/dateInput/DateInput.css +1 -0
  950. package/build/styles/dateLookup/DateLookup.css +1 -0
  951. package/build/styles/dateLookup/dateTrigger/DateTrigger.css +1 -0
  952. package/build/styles/decision/Decision.css +1 -0
  953. package/build/styles/definitionList/DefinitionList.css +1 -0
  954. package/build/styles/dimmer/Dimmer.css +1 -0
  955. package/build/styles/drawer/Drawer.css +1 -0
  956. package/build/styles/dropFade/DropFade.css +1 -0
  957. package/build/styles/dynamicFieldDefinitionList/FormattedValue/FormattedValue.css +1 -0
  958. package/build/styles/emphasis/Emphasis.css +1 -0
  959. package/build/styles/flowNavigation/FlowNavigation.css +1 -0
  960. package/build/styles/flowNavigation/animatedLabel/AnimatedLabel.css +1 -0
  961. package/build/styles/flowNavigation/backButton/BackButton.css +1 -0
  962. package/build/styles/header/Header.css +1 -0
  963. package/build/styles/image/Image.css +1 -0
  964. package/build/styles/info/Info.css +1 -0
  965. package/build/styles/instructionsList/InstructionsList.css +1 -0
  966. package/build/styles/lab/mobileNav/MobileNav.css +1 -0
  967. package/build/styles/lab/pagination/Pagination.css +1 -0
  968. package/build/styles/link/Link.css +1 -0
  969. package/build/styles/loader/Loader.css +1 -0
  970. package/build/styles/logo/Logo.css +1 -0
  971. package/build/styles/main.css +1 -0
  972. package/build/styles/modal/Modal.css +1 -0
  973. package/build/styles/moneyInput/MoneyInput.css +1 -0
  974. package/build/styles/navigationOption/NavigationOption.css +1 -0
  975. package/build/styles/navigationOptionsList/NavigationOptionsList.css +1 -0
  976. package/build/styles/nudge/Nudge.css +1 -0
  977. package/build/styles/overlayHeader/OverlayHeader.css +1 -0
  978. package/build/styles/phoneNumberInput/PhoneNumberInput.css +1 -0
  979. package/build/styles/popover/Popover.css +1 -0
  980. package/build/styles/progress/Progress.css +1 -0
  981. package/build/styles/progressBar/ProgressBar.css +1 -0
  982. package/build/styles/section/Section.css +1 -0
  983. package/build/styles/select/Select.css +1 -0
  984. package/build/styles/slidingPanel/SlidingPanel.css +1 -0
  985. package/build/styles/snackbar/Snackbar.css +1 -0
  986. package/build/styles/statusIcon/StatusIcon.css +1 -0
  987. package/build/styles/stepper/Stepper.css +1 -0
  988. package/build/styles/summary/Summary.css +1 -0
  989. package/build/styles/switch/Switch.css +1 -0
  990. package/build/styles/tabs/Tabs.css +1 -0
  991. package/build/styles/tile/Tile.css +1 -0
  992. package/build/styles/tooltip/Tooltip.css +1 -0
  993. package/build/styles/typeahead/Typeahead.css +1 -0
  994. package/build/styles/typeahead/typeaheadOption/TypeaheadOption.css +1 -0
  995. package/build/styles/upload/Upload.css +1 -0
  996. package/build/styles/uploadInput/UploadInput.css +1 -0
  997. package/build/styles/uploadInput/uploadButton/UploadButton.css +1 -0
  998. package/build/styles/uploadInput/uploadItem/UploadItem.css +1 -0
  999. package/build/types/accordion/Accordion.d.ts +22 -0
  1000. package/build/types/accordion/AccordionItem/AccordionItem.d.ts +31 -0
  1001. package/build/types/accordion/AccordionItem/index.d.ts +1 -0
  1002. package/build/types/accordion/index.d.ts +1 -0
  1003. package/build/types/actionButton/ActionButton.d.ts +14 -0
  1004. package/build/types/actionButton/ActionButton.spec.d.ts +1 -0
  1005. package/build/types/actionButton/ActionButton.story.d.ts +6 -0
  1006. package/build/types/actionButton/index.d.ts +2 -0
  1007. package/build/types/actionOption/ActionOption.d.ts +16 -0
  1008. package/build/types/actionOption/ActionOption.story.d.ts +20 -0
  1009. package/build/types/actionOption/index.d.ts +1 -0
  1010. package/build/types/alert/Alert.d.ts +54 -0
  1011. package/build/types/alert/index.d.ts +1 -0
  1012. package/build/types/alert/inlineMarkdown/InlineMarkdown.d.ts +13 -0
  1013. package/build/types/alert/inlineMarkdown/index.d.ts +1 -0
  1014. package/build/types/alert/withArrow/alertArrowPositions.d.ts +8 -0
  1015. package/build/types/alert/withArrow/index.d.ts +2 -0
  1016. package/build/types/alert/withArrow/withArrow.d.ts +11 -0
  1017. package/build/types/avatar/Avatar.d.ts +22 -0
  1018. package/build/types/avatar/avatarTypes.d.ts +6 -0
  1019. package/build/types/avatar/index.d.ts +2 -0
  1020. package/build/types/avatarWrapper/AvatarWrapper.d.ts +27 -0
  1021. package/build/types/avatarWrapper/index.d.ts +2 -0
  1022. package/build/types/badge/Badge.d.ts +10 -0
  1023. package/build/types/badge/index.d.ts +1 -0
  1024. package/build/types/body/Body.d.ts +14 -0
  1025. package/build/types/body/Body.spec.d.ts +1 -0
  1026. package/build/types/body/Body.story.d.ts +8 -0
  1027. package/build/types/body/index.d.ts +1 -0
  1028. package/build/types/button/Button.d.ts +27 -0
  1029. package/build/types/button/classMap.d.ts +10 -0
  1030. package/build/types/button/index.d.ts +2 -0
  1031. package/build/types/button/legacyUtils/index.d.ts +1 -0
  1032. package/build/types/button/legacyUtils/legacyUtils.d.ts +6 -0
  1033. package/build/types/card/Card.d.ts +20 -0
  1034. package/build/types/card/index.d.ts +1 -0
  1035. package/build/types/checkbox/Checkbox.d.ts +20 -0
  1036. package/build/types/checkbox/index.d.ts +2 -0
  1037. package/build/types/checkboxButton/CheckboxButton.d.ts +4 -0
  1038. package/build/types/checkboxButton/CheckboxButton.spec.d.ts +1 -0
  1039. package/build/types/checkboxButton/CheckboxButton.story.d.ts +7 -0
  1040. package/build/types/checkboxButton/index.d.ts +1 -0
  1041. package/build/types/checkboxOption/CheckboxOption.d.ts +24 -0
  1042. package/build/types/checkboxOption/CheckboxOption.spec.d.ts +1 -0
  1043. package/build/types/checkboxOption/CheckboxOption.story.d.ts +12 -0
  1044. package/build/types/checkboxOption/index.d.ts +1 -0
  1045. package/build/types/chevron/Chevron.d.ts +17 -0
  1046. package/build/types/chevron/index.d.ts +1 -0
  1047. package/build/types/chips/Chip.d.ts +15 -0
  1048. package/build/types/chips/Chips.d.ts +22 -0
  1049. package/build/types/chips/Chips.messages.d.ts +8 -0
  1050. package/build/types/chips/Chips.spec.d.ts +1 -0
  1051. package/build/types/chips/Chips.story.d.ts +7 -0
  1052. package/build/types/chips/index.d.ts +2 -0
  1053. package/build/types/circularButton/CircularButton.d.ts +20 -0
  1054. package/build/types/circularButton/index.d.ts +1 -0
  1055. package/build/types/common/DOMOperations/DOMOperations.d.ts +2 -0
  1056. package/build/types/common/DOMOperations/index.d.ts +3 -0
  1057. package/build/types/common/Option/Option.d.ts +28 -0
  1058. package/build/types/common/Option/index.d.ts +1 -0
  1059. package/build/types/common/RadioButton/RadioButton.d.ts +36 -0
  1060. package/build/types/common/RadioButton/index.d.ts +1 -0
  1061. package/build/types/common/bottomSheet/BottomSheet.d.ts +14 -0
  1062. package/build/types/common/bottomSheet/BottomSheet.spec.d.ts +1 -0
  1063. package/build/types/common/bottomSheet/index.d.ts +1 -0
  1064. package/build/types/common/closeButton/CloseButton.d.ts +2 -0
  1065. package/build/types/common/closeButton/CloseButton.messages.d.ts +8 -0
  1066. package/build/types/common/closeButton/index.d.ts +1 -0
  1067. package/build/types/common/commonProps.d.ts +20 -0
  1068. package/build/types/common/dateUtils/getDayNames/getDayNames.d.ts +1 -0
  1069. package/build/types/common/dateUtils/getDayNames/index.d.ts +1 -0
  1070. package/build/types/common/dateUtils/getMonthNames/getMonthNames.d.ts +1 -0
  1071. package/build/types/common/dateUtils/getMonthNames/index.d.ts +1 -0
  1072. package/build/types/common/dateUtils/index.d.ts +6 -0
  1073. package/build/types/common/dateUtils/isDateValid/index.d.ts +1 -0
  1074. package/build/types/common/dateUtils/isDateValid/isDateValid.d.ts +2 -0
  1075. package/build/types/common/dateUtils/isMonthAndYearFormat/index.d.ts +1 -0
  1076. package/build/types/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.d.ts +1 -0
  1077. package/build/types/common/dateUtils/isWithinRange/index.d.ts +1 -0
  1078. package/build/types/common/dateUtils/isWithinRange/isWithinRange.d.ts +1 -0
  1079. package/build/types/common/dateUtils/moveToWithinRange/index.d.ts +1 -0
  1080. package/build/types/common/dateUtils/moveToWithinRange/moveToWithinRange.d.ts +1 -0
  1081. package/build/types/common/deviceDetection/deviceDetection.d.ts +1 -0
  1082. package/build/types/common/deviceDetection/index.d.ts +1 -0
  1083. package/build/types/common/direction.d.ts +6 -0
  1084. package/build/types/common/domHelpers/documentIosClick.d.ts +2 -0
  1085. package/build/types/common/domHelpers/index.d.ts +6 -0
  1086. package/build/types/common/fileType.d.ts +6 -0
  1087. package/build/types/common/flowHeader/FlowHeader.d.ts +2 -0
  1088. package/build/types/common/flowHeader/index.d.ts +1 -0
  1089. package/build/types/common/focusBoundary/FocusBoundary.d.ts +10 -0
  1090. package/build/types/common/focusBoundary/index.d.ts +1 -0
  1091. package/build/types/common/focusBoundary/utils/getFocusableElements.d.ts +1 -0
  1092. package/build/types/common/focusBoundary/utils/index.d.ts +2 -0
  1093. package/build/types/common/focusBoundary/utils/resetFocus.d.ts +1 -0
  1094. package/build/types/common/historyNavigator/historyNavigator.d.ts +11 -0
  1095. package/build/types/common/historyNavigator/index.d.ts +1 -0
  1096. package/build/types/common/hooks/index.d.ts +5 -0
  1097. package/build/types/common/hooks/useClientWidth/index.d.ts +1 -0
  1098. package/build/types/common/hooks/useClientWidth/useClientWidth.d.ts +9 -0
  1099. package/build/types/common/hooks/useConditionalListener/index.d.ts +1 -0
  1100. package/build/types/common/hooks/useConditionalListener/useConditionalListener.d.ts +9 -0
  1101. package/build/types/common/hooks/useDirection/index.d.ts +1 -0
  1102. package/build/types/common/hooks/useDirection/useDirection.d.ts +5 -0
  1103. package/build/types/common/hooks/useHasIntersected/index.d.ts +1 -0
  1104. package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts +4 -0
  1105. package/build/types/common/hooks/useLayout/index.d.ts +1 -0
  1106. package/build/types/common/hooks/useLayout/useLayout.d.ts +8 -0
  1107. package/build/types/common/index.d.ts +25 -0
  1108. package/build/types/common/key.d.ts +8 -0
  1109. package/build/types/common/keyCodes.d.ts +15 -0
  1110. package/build/types/common/locale/index.d.ts +52 -0
  1111. package/build/types/common/panel/Panel.d.ts +25 -0
  1112. package/build/types/common/panel/index.d.ts +1 -0
  1113. package/build/types/common/propsValues/breakpoint.d.ts +7 -0
  1114. package/build/types/common/propsValues/control.d.ts +16 -0
  1115. package/build/types/common/propsValues/dateMode.d.ts +4 -0
  1116. package/build/types/common/propsValues/layouts.d.ts +9 -0
  1117. package/build/types/common/propsValues/markdownNodeType.d.ts +18 -0
  1118. package/build/types/common/propsValues/monthFormat.d.ts +4 -0
  1119. package/build/types/common/propsValues/position.d.ts +16 -0
  1120. package/build/types/common/propsValues/profileType.d.ts +4 -0
  1121. package/build/types/common/propsValues/scroll.d.ts +6 -0
  1122. package/build/types/common/propsValues/sentiment.d.ts +19 -0
  1123. package/build/types/common/propsValues/size.d.ts +12 -0
  1124. package/build/types/common/propsValues/status.d.ts +9 -0
  1125. package/build/types/common/propsValues/type.d.ts +13 -0
  1126. package/build/types/common/propsValues/typography.d.ts +37 -0
  1127. package/build/types/common/propsValues/variant.d.ts +4 -0
  1128. package/build/types/common/propsValues/width.d.ts +4 -0
  1129. package/build/types/common/requirements.d.ts +2 -0
  1130. package/build/types/common/responsivePanel/ResponsivePanel.d.ts +14 -0
  1131. package/build/types/common/responsivePanel/index.d.ts +1 -0
  1132. package/build/types/common/textFormat/formatWithPattern/formatWithPattern.d.ts +2 -0
  1133. package/build/types/common/textFormat/formatWithPattern/index.d.ts +1 -0
  1134. package/build/types/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.d.ts +2 -0
  1135. package/build/types/common/textFormat/getCountOfSymbolsInSelection/index.d.ts +1 -0
  1136. package/build/types/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.d.ts +2 -0
  1137. package/build/types/common/textFormat/getCursorPositionAfterKeystroke/index.d.ts +1 -0
  1138. package/build/types/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.d.ts +2 -0
  1139. package/build/types/common/textFormat/getDistanceToSymbol/index.d.ts +1 -0
  1140. package/build/types/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.d.ts +2 -0
  1141. package/build/types/common/textFormat/getSymbolsInPatternWithPosition/index.d.ts +1 -0
  1142. package/build/types/common/textFormat/index.d.ts +6 -0
  1143. package/build/types/common/textFormat/unformatWithPattern/index.d.ts +1 -0
  1144. package/build/types/common/textFormat/unformatWithPattern/unformatWithPattern.d.ts +2 -0
  1145. package/build/types/common/theme.d.ts +19 -0
  1146. package/build/types/criticalBanner/CriticalCommsBanner.d.ts +12 -0
  1147. package/build/types/criticalBanner/CriticalCommsBanner.story.d.ts +8 -0
  1148. package/build/types/criticalBanner/index.d.ts +1 -0
  1149. package/build/types/dateInput/DateInput.d.ts +37 -0
  1150. package/build/types/dateInput/DateInput.messages.d.ts +19 -0
  1151. package/build/types/dateInput/index.d.ts +2 -0
  1152. package/build/types/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.d.ts +1 -0
  1153. package/build/types/dateInput/utils/convertToLocalMidnight/index.d.ts +1 -0
  1154. package/build/types/dateInput/utils/explodeDate/explodeDate.d.ts +5 -0
  1155. package/build/types/dateInput/utils/explodeDate/index.d.ts +1 -0
  1156. package/build/types/dateInput/utils/index.d.ts +2 -0
  1157. package/build/types/dateLookup/DateLookup.d.ts +26 -0
  1158. package/build/types/dateLookup/dateHeader/DateHeader.d.ts +22 -0
  1159. package/build/types/dateLookup/dateHeader/index.d.ts +1 -0
  1160. package/build/types/dateLookup/dateTrigger/DateTrigger.d.ts +33 -0
  1161. package/build/types/dateLookup/dateTrigger/DateTrigger.messages.d.ts +8 -0
  1162. package/build/types/dateLookup/dateTrigger/index.d.ts +1 -0
  1163. package/build/types/dateLookup/dayCalendar/DayCalendar.d.ts +4 -0
  1164. package/build/types/dateLookup/dayCalendar/index.d.ts +1 -0
  1165. package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts +4 -0
  1166. package/build/types/dateLookup/dayCalendar/table/index.d.ts +1 -0
  1167. package/build/types/dateLookup/getStartOfDay/getStartOfDay.d.ts +1 -0
  1168. package/build/types/dateLookup/getStartOfDay/index.d.ts +1 -0
  1169. package/build/types/dateLookup/index.d.ts +1 -0
  1170. package/build/types/dateLookup/monthCalendar/MonthCalendar.d.ts +4 -0
  1171. package/build/types/dateLookup/monthCalendar/index.d.ts +1 -0
  1172. package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts +28 -0
  1173. package/build/types/dateLookup/monthCalendar/table/index.d.ts +1 -0
  1174. package/build/types/dateLookup/tableLink/TableLink.d.ts +27 -0
  1175. package/build/types/dateLookup/tableLink/index.d.ts +1 -0
  1176. package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts +30 -0
  1177. package/build/types/dateLookup/yearCalendar/index.d.ts +1 -0
  1178. package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts +28 -0
  1179. package/build/types/dateLookup/yearCalendar/table/index.d.ts +1 -0
  1180. package/build/types/decision/Decision.d.ts +48 -0
  1181. package/build/types/decision/decisionEnums.d.ts +8 -0
  1182. package/build/types/decision/index.d.ts +2 -0
  1183. package/build/types/definitionList/DefinitionList.d.ts +24 -0
  1184. package/build/types/definitionList/index.d.ts +1 -0
  1185. package/build/types/dimmer/Dimmer.d.ts +31 -0
  1186. package/build/types/dimmer/Dimmer.story.d.ts +16 -0
  1187. package/build/types/dimmer/dimmerManager/DimmerManager.d.ts +13 -0
  1188. package/build/types/dimmer/dimmerManager/index.d.ts +1 -0
  1189. package/build/types/dimmer/index.d.ts +1 -0
  1190. package/build/types/display/Display.d.ts +9 -0
  1191. package/build/types/display/Display.story.d.ts +7 -0
  1192. package/build/types/display/index.d.ts +1 -0
  1193. package/build/types/drawer/Drawer.d.ts +36 -0
  1194. package/build/types/drawer/index.d.ts +1 -0
  1195. package/build/types/dropFade/DropFade.d.ts +6 -0
  1196. package/build/types/dropFade/DropFade.story.d.ts +10 -0
  1197. package/build/types/dropFade/index.d.ts +1 -0
  1198. package/build/types/dynamicFieldDefinitionList/DynamicFieldDefinitionList.d.ts +21 -0
  1199. package/build/types/dynamicFieldDefinitionList/FormattedValue/FormattedValue.d.ts +25 -0
  1200. package/build/types/dynamicFieldDefinitionList/FormattedValue/index.d.ts +1 -0
  1201. package/build/types/dynamicFieldDefinitionList/index.d.ts +1 -0
  1202. package/build/types/dynamicFieldDefinitionList/utils/createDefinitions.d.ts +1 -0
  1203. package/build/types/dynamicFieldDefinitionList/utils/text-format.d.ts +1 -0
  1204. package/build/types/emphasis/Emphasis.d.ts +6 -0
  1205. package/build/types/emphasis/EmphasisHtmlTransformer.d.ts +16 -0
  1206. package/build/types/emphasis/index.d.ts +1 -0
  1207. package/build/types/flowNavigation/FlowNavigation.d.ts +34 -0
  1208. package/build/types/flowNavigation/animatedLabel/AnimatedLabel.d.ts +18 -0
  1209. package/build/types/flowNavigation/animatedLabel/index.d.ts +1 -0
  1210. package/build/types/flowNavigation/backButton/BackButton.d.ts +20 -0
  1211. package/build/types/flowNavigation/backButton/index.d.ts +2 -0
  1212. package/build/types/flowNavigation/index.d.ts +1 -0
  1213. package/build/types/header/Header.d.ts +28 -0
  1214. package/build/types/header/Header.spec.d.ts +1 -0
  1215. package/build/types/header/Header.story.d.ts +10 -0
  1216. package/build/types/header/index.d.ts +1 -0
  1217. package/build/types/i18n/index.d.ts +2 -0
  1218. package/build/types/image/Image.d.ts +20 -0
  1219. package/build/types/image/index.d.ts +1 -0
  1220. package/build/types/index.d.ts +108 -0
  1221. package/build/types/info/Info.d.ts +35 -0
  1222. package/build/types/info/index.d.ts +2 -0
  1223. package/build/types/info/infoPresentations.d.ts +4 -0
  1224. package/build/types/inlineAlert/InlineAlert.d.ts +15 -0
  1225. package/build/types/inlineAlert/index.d.ts +1 -0
  1226. package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts +11 -0
  1227. package/build/types/inputWithDisplayFormat/index.d.ts +1 -0
  1228. package/build/types/instructionsList/InstructionsList.d.ts +8 -0
  1229. package/build/types/instructionsList/index.d.ts +2 -0
  1230. package/build/types/link/Link.d.ts +12 -0
  1231. package/build/types/link/Link.spec.d.ts +1 -0
  1232. package/build/types/link/Link.story.d.ts +9 -0
  1233. package/build/types/link/index.d.ts +1 -0
  1234. package/build/types/loader/Loader.d.ts +24 -0
  1235. package/build/types/loader/index.d.ts +2 -0
  1236. package/build/types/logo/Logo.d.ts +23 -0
  1237. package/build/types/logo/index.d.ts +2 -0
  1238. package/build/types/logo/logoTypes.d.ts +4 -0
  1239. package/build/types/markdown/Markdown.d.ts +25 -0
  1240. package/build/types/markdown/index.d.ts +1 -0
  1241. package/build/types/modal/Modal.d.ts +14 -0
  1242. package/build/types/modal/Modal.story.d.ts +8 -0
  1243. package/build/types/modal/index.d.ts +2 -0
  1244. package/build/types/money/Money.d.ts +11 -0
  1245. package/build/types/money/index.d.ts +1 -0
  1246. package/build/types/moneyInput/MoneyInput.d.ts +31 -0
  1247. package/build/types/moneyInput/MoneyInput.messages.d.ts +7 -0
  1248. package/build/types/moneyInput/currencyFormatting.d.ts +3 -0
  1249. package/build/types/moneyInput/index.d.ts +1 -0
  1250. package/build/types/navigationOption/NavigationOption.d.ts +4 -0
  1251. package/build/types/navigationOption/index.d.ts +1 -0
  1252. package/build/types/navigationOptionsList/NavigationOptionsList.d.ts +10 -0
  1253. package/build/types/navigationOptionsList/index.d.ts +1 -0
  1254. package/build/types/nudge/Nudge.d.ts +20 -0
  1255. package/build/types/nudge/index.d.ts +1 -0
  1256. package/build/types/overlayHeader/OverlayHeader.d.ts +18 -0
  1257. package/build/types/overlayHeader/index.d.ts +1 -0
  1258. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +23 -0
  1259. package/build/types/phoneNumberInput/data/countries.d.ts +14 -0
  1260. package/build/types/phoneNumberInput/index.d.ts +1 -0
  1261. package/build/types/phoneNumberInput/utils/cleanNumber/cleanNumber.d.ts +1 -0
  1262. package/build/types/phoneNumberInput/utils/cleanNumber/index.d.ts +1 -0
  1263. package/build/types/phoneNumberInput/utils/explodeNumberModel/index.d.ts +5 -0
  1264. package/build/types/phoneNumberInput/utils/filterOptionsForQuery/index.d.ts +1 -0
  1265. package/build/types/phoneNumberInput/utils/findCountryByCode/index.d.ts +1 -0
  1266. package/build/types/phoneNumberInput/utils/findCountryByPrefix/index.d.ts +1 -0
  1267. package/build/types/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.d.ts +1 -0
  1268. package/build/types/phoneNumberInput/utils/groupCountriesByPrefix/index.d.ts +1 -0
  1269. package/build/types/phoneNumberInput/utils/index.d.ts +12 -0
  1270. package/build/types/phoneNumberInput/utils/isOptionAndFitsQuery/index.d.ts +1 -0
  1271. package/build/types/phoneNumberInput/utils/isOptionAndFitsQuery/isOptionAndFitsQuery.d.ts +2 -0
  1272. package/build/types/phoneNumberInput/utils/isStringNumeric/index.d.ts +1 -0
  1273. package/build/types/phoneNumberInput/utils/isStringNumeric/isStringNumeric.d.ts +1 -0
  1274. package/build/types/phoneNumberInput/utils/isValidPhoneNumber/index.d.ts +1 -0
  1275. package/build/types/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.d.ts +1 -0
  1276. package/build/types/phoneNumberInput/utils/longestMatchingPrefix/index.d.ts +1 -0
  1277. package/build/types/phoneNumberInput/utils/setDefaultPrefix/index.d.ts +1 -0
  1278. package/build/types/phoneNumberInput/utils/sortArrayByProperty/index.d.ts +1 -0
  1279. package/build/types/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.d.ts +1 -0
  1280. package/build/types/popover/Popover.d.ts +20 -0
  1281. package/build/types/popover/index.d.ts +1 -0
  1282. package/build/types/processIndicator/ProcessIndicator.d.ts +19 -0
  1283. package/build/types/processIndicator/index.d.ts +2 -0
  1284. package/build/types/progress/Progress.d.ts +11 -0
  1285. package/build/types/progress/index.d.ts +1 -0
  1286. package/build/types/progressBar/ProgressBar.d.ts +14 -0
  1287. package/build/types/progressBar/index.d.ts +1 -0
  1288. package/build/types/provider/Provider.d.ts +19 -0
  1289. package/build/types/provider/Provider.spec.d.ts +1 -0
  1290. package/build/types/provider/Provider.story.d.ts +23 -0
  1291. package/build/types/provider/direction/DirectionProvider.d.ts +8 -0
  1292. package/build/types/provider/direction/DirectionProvider.spec.d.ts +1 -0
  1293. package/build/types/provider/direction/index.d.ts +1 -0
  1294. package/build/types/provider/index.d.ts +3 -0
  1295. package/build/types/provider/language/LanguageProvider.d.ts +7 -0
  1296. package/build/types/provider/language/LanguageProvider.spec.d.ts +1 -0
  1297. package/build/types/provider/language/index.d.ts +1 -0
  1298. package/build/types/radio/Radio.d.ts +21 -0
  1299. package/build/types/radio/index.d.ts +2 -0
  1300. package/build/types/radioGroup/RadioGroup.d.ts +26 -0
  1301. package/build/types/radioGroup/index.d.ts +1 -0
  1302. package/build/types/radioOption/RadioOption.d.ts +23 -0
  1303. package/build/types/radioOption/index.d.ts +1 -0
  1304. package/build/types/section/Section.d.ts +12 -0
  1305. package/build/types/section/Section.spec.d.ts +1 -0
  1306. package/build/types/section/Section.story.d.ts +15 -0
  1307. package/build/types/section/index.d.ts +1 -0
  1308. package/build/types/select/Select.d.ts +94 -0
  1309. package/build/types/select/Select.messages.d.ts +7 -0
  1310. package/build/types/select/index.d.ts +2 -0
  1311. package/build/types/select/option/Option.d.ts +13 -0
  1312. package/build/types/select/option/index.d.ts +2 -0
  1313. package/build/types/select/searchBox/SearchBox.d.ts +6 -0
  1314. package/build/types/select/searchBox/index.d.ts +1 -0
  1315. package/build/types/sizeSwapper/SizeSwapper.d.ts +2 -0
  1316. package/build/types/sizeSwapper/index.d.ts +1 -0
  1317. package/build/types/slidingPanel/SlidingPanel.d.ts +17 -0
  1318. package/build/types/slidingPanel/index.d.ts +1 -0
  1319. package/build/types/snackbar/Snackbar.d.ts +22 -0
  1320. package/build/types/snackbar/SnackbarContext.d.ts +2 -0
  1321. package/build/types/snackbar/SnackbarProvider.d.ts +12 -0
  1322. package/build/types/snackbar/useSnackbar.d.ts +2 -0
  1323. package/build/types/statusIcon/StatusIcon.d.ts +8 -0
  1324. package/build/types/statusIcon/index.d.ts +1 -0
  1325. package/build/types/stepper/Stepper.d.ts +18 -0
  1326. package/build/types/stepper/deviceDetection.d.ts +1 -0
  1327. package/build/types/stepper/index.d.ts +2 -0
  1328. package/build/types/sticky/Sticky.d.ts +14 -0
  1329. package/build/types/sticky/index.d.ts +1 -0
  1330. package/build/types/summary/Summary.d.ts +71 -0
  1331. package/build/types/summary/Summary.messages.d.ts +19 -0
  1332. package/build/types/summary/index.d.ts +1 -0
  1333. package/build/types/switch/Switch.d.ts +17 -0
  1334. package/build/types/switch/Switch.story.d.ts +15 -0
  1335. package/build/types/switch/index.d.ts +1 -0
  1336. package/build/types/switchOption/SwitchOption.d.ts +17 -0
  1337. package/build/types/switchOption/SwitchOption.story.d.ts +22 -0
  1338. package/build/types/switchOption/index.d.ts +1 -0
  1339. package/build/types/tabs/Tab.d.ts +2 -0
  1340. package/build/types/tabs/TabList.d.ts +10 -0
  1341. package/build/types/tabs/TabPanel.d.ts +18 -0
  1342. package/build/types/tabs/Tabs.d.ts +29 -0
  1343. package/build/types/tabs/index.d.ts +1 -0
  1344. package/build/types/tabs/utils.d.ts +7 -0
  1345. package/build/types/test-utils/index.d.ts +107 -0
  1346. package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts +11 -0
  1347. package/build/types/textareaWithDisplayFormat/index.d.ts +1 -0
  1348. package/build/types/tile/Tile.d.ts +39 -0
  1349. package/build/types/tile/index.d.ts +1 -0
  1350. package/build/types/title/Title.d.ts +14 -0
  1351. package/build/types/title/Title.spec.d.ts +1 -0
  1352. package/build/types/title/Title.story.d.ts +8 -0
  1353. package/build/types/title/index.d.ts +1 -0
  1354. package/build/types/tooltip/Tooltip.d.ts +9 -0
  1355. package/build/types/tooltip/Tooltip.spec.d.ts +1 -0
  1356. package/build/types/tooltip/Tooltip.story.d.ts +12 -0
  1357. package/build/types/tooltip/index.d.ts +2 -0
  1358. package/build/types/typeahead/Typeahead.d.ts +57 -0
  1359. package/build/types/typeahead/index.d.ts +2 -0
  1360. package/build/types/typeahead/typeaheadInput/TypeaheadInput.d.ts +47 -0
  1361. package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts +23 -0
  1362. package/build/types/typeahead/util/highlight.d.ts +1 -0
  1363. package/build/types/upload/Upload.d.ts +54 -0
  1364. package/build/types/upload/Upload.messages.d.ts +61 -0
  1365. package/build/types/upload/index.d.ts +2 -0
  1366. package/build/types/upload/steps/completeStep/completeStep.d.ts +20 -0
  1367. package/build/types/upload/steps/completeStep/index.d.ts +1 -0
  1368. package/build/types/upload/steps/index.d.ts +4 -0
  1369. package/build/types/upload/steps/mediaUploadStep/index.d.ts +1 -0
  1370. package/build/types/upload/steps/mediaUploadStep/mediaUploadStep.d.ts +24 -0
  1371. package/build/types/upload/steps/processingStep/index.d.ts +1 -0
  1372. package/build/types/upload/steps/processingStep/processingStep.d.ts +14 -0
  1373. package/build/types/upload/steps/uploadImageStep/index.d.ts +1 -0
  1374. package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts +22 -0
  1375. package/build/types/upload/uploadSteps.d.ts +4 -0
  1376. package/build/types/upload/utils/asyncFileRead/asyncFileRead.d.ts +1 -0
  1377. package/build/types/upload/utils/asyncFileRead/index.d.ts +1 -0
  1378. package/build/types/upload/utils/getFileType/getFileType.d.ts +1 -0
  1379. package/build/types/upload/utils/getFileType/index.d.ts +1 -0
  1380. package/build/types/upload/utils/getSupportedSpotMimeTypes/getSupportedSpotMimeTypes.d.ts +1 -0
  1381. package/build/types/upload/utils/getSupportedSpotMimeTypes/index.d.ts +1 -0
  1382. package/build/types/upload/utils/index.d.ts +7 -0
  1383. package/build/types/upload/utils/isSizeValid/index.d.ts +1 -0
  1384. package/build/types/upload/utils/isSizeValid/isSizeValid.d.ts +1 -0
  1385. package/build/types/upload/utils/isTypeValid/index.d.ts +1 -0
  1386. package/build/types/upload/utils/isTypeValid/isTypeValid.d.ts +1 -0
  1387. package/build/types/upload/utils/postData/index.d.ts +1 -0
  1388. package/build/types/upload/utils/postData/postData.d.ts +1 -0
  1389. package/build/types/upload/utils/requestMedia/index.d.ts +1 -0
  1390. package/build/types/upload/utils/requestMedia/requestMedia.d.ts +1 -0
  1391. package/build/types/uploadInput/UploadInput.d.ts +75 -0
  1392. package/build/types/uploadInput/UploadInput.messages.d.ts +38 -0
  1393. package/build/types/uploadInput/UploadInput.spec.d.ts +1 -0
  1394. package/build/types/uploadInput/UploadInput.story.d.ts +20 -0
  1395. package/build/types/uploadInput/index.d.ts +1 -0
  1396. package/build/types/uploadInput/types.d.ts +46 -0
  1397. package/build/types/uploadInput/uploadButton/UploadButton.d.ts +49 -0
  1398. package/build/types/uploadInput/uploadButton/UploadButton.messages.d.ts +28 -0
  1399. package/build/types/uploadInput/uploadButton/UploadButton.spec.d.ts +1 -0
  1400. package/build/types/uploadInput/uploadButton/defaults.d.ts +3 -0
  1401. package/build/types/uploadInput/uploadButton/getAllowedFileTypes.d.ts +3 -0
  1402. package/build/types/uploadInput/uploadButton/getAllowedFileTypes.spec.d.ts +1 -0
  1403. package/build/types/uploadInput/uploadItem/UploadItem.d.ts +20 -0
  1404. package/build/types/uploadInput/uploadItem/UploadItem.messages.d.ts +33 -0
  1405. package/build/types/uploadInput/uploadItem/UploadItem.spec.d.ts +1 -0
  1406. package/build/types/uploadInput/uploadItem/UploadItemBody.d.ts +7 -0
  1407. package/build/types/utilities/deprecatedProperty/deprecatedProperty.d.ts +7 -0
  1408. package/build/types/utilities/deprecatedProperty/index.d.ts +1 -0
  1409. package/build/types/utilities/index.d.ts +2 -0
  1410. package/build/types/utilities/logActionRequired.d.ts +2 -0
  1411. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts +90 -0
  1412. package/build/types/withDisplayFormat/index.d.ts +1 -0
  1413. package/build/types/withNextPortal/withNextPortal.d.ts +2 -0
  1414. package/build/umd/no-polyfill/main.js +1 -0
  1415. package/build/umd/polyfill/main.js +1 -0
  1416. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import Button from"../../../button";import{Status,Size,Typography}from"../../../common";import ProcessIndicator from"../../../processIndicator";import Title from"../../../title";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var ProcessingStep=function(a){var b=a.isComplete,c=a.isError,d=a.isSuccess,e=a.onAnimationCompleted,f=a.onClear,g=a.psButtonText,h=a.psProcessingText,i=useTheme(),j=i.isModern,k=Status.PROCESSING;return c&&(k=Status.FAILED),d&&(k=Status.SUCCEEDED),/*#__PURE__*/_jsx("div",{className:"droppable-processing-card droppable-card","aria-hidden":b,children:/*#__PURE__*/_jsxs("div",{className:"droppable-card-content",children:[/*#__PURE__*/_jsx(ProcessIndicator,{size:Size.Small,status:k,onAnimationCompleted:function onAnimationCompleted(a){return e(a)}}),/*#__PURE__*/_jsx(Title,{className:classNames({"m-t-3":!j,"m-b-3":!j,"m-t-2":j,"m-b-2":j}),type:Typography.TITLE_BODY,children:h}),g&&/*#__PURE__*/_jsx(Button,{onClick:function onClick(a){return f(a)},children:g})]})})};ProcessingStep.propTypes={isComplete:PropTypes.bool.isRequired,isError:PropTypes.bool.isRequired,isSuccess:PropTypes.bool.isRequired,onAnimationCompleted:PropTypes.func.isRequired,onClear:PropTypes.func.isRequired,psButtonText:PropTypes.string.isRequired,psProcessingText:PropTypes.string.isRequired};export default ProcessingStep;
@@ -0,0 +1 @@
1
+ export{default}from"./uploadImageStep";
@@ -0,0 +1 @@
1
+ import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _defineProperty from"@babel/runtime/helpers/defineProperty";function _createSuper(a){var b=_isNativeReflectConstruct();return function(){var c,d=_getPrototypeOf(a);if(b){var e=_getPrototypeOf(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return _possibleConstructorReturn(this,c)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}import{Upload as UploadIcon}from"@transferwise/icons";import PropTypes from"prop-types";import{createRef,PureComponent}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var UploadImageStep=/*#__PURE__*/function(a){function b(){var a;return _classCallCheck(this,b),a=c.call(this),_defineProperty(_assertThisInitialized(a),"onManualUpload",function(){var b=a.props.fileDropped;if(a.uploadInputRef&&a.uploadInputRef.current){var c=a.uploadInputRef.current.files[0];b(c)}}),_defineProperty(_assertThisInitialized(a),"getImage",function(){var b=a.props,c=b.usHelpImage,d=b.usLabel;return c?"string"==typeof c?/*#__PURE__*/_jsx("img",{src:c,alt:d,className:"thumbnail text-xs-center"}):c:/*#__PURE__*/_jsx("div",{className:"circle circle-sm circle-inverse p-t-1",children:/*#__PURE__*/_jsx(UploadIcon,{size:24})})}),a.uploadInputRef=/*#__PURE__*/createRef(),a}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"render",value:function render(){var a=this,b=this.props,c=b.isComplete,d=b.usAccept,e=b.usButtonText,f=b.usDisabled,g=b.usLabel,h=b.usPlaceholder;return/*#__PURE__*/_jsx("div",{children:/*#__PURE__*/_jsx("div",{className:"droppable-default-card","aria-hidden":c,children:/*#__PURE__*/_jsxs("div",{className:"droppable-card-content",children:[/*#__PURE__*/_jsx("div",{className:"m-b-3",children:this.getImage()}),g&&/*#__PURE__*/_jsx("h4",{className:"np-text-title-body m-b-1",children:g}),h&&/*#__PURE__*/_jsx("p",{className:"np-text-body-large m-b-3",children:"".concat(h)}),/*#__PURE__*/_jsxs("label",{className:"btn btn-primary btn-md ".concat(f?"disabled":""),children:[e?/*#__PURE__*/_jsx("span",{children:e}):/*#__PURE__*/_jsx(UploadIcon,{size:24,className:"m-r-0"}),/*#__PURE__*/_jsx("input",{ref:this.uploadInputRef,type:"file",accept:"*"===d?null:d,className:"tw-droppable-input hidden",disabled:f,name:"file-upload",onChange:function onChange(){return a.onManualUpload()}})]})]})})})}}]),b}(PureComponent);UploadImageStep.propTypes={fileDropped:PropTypes.func.isRequired,isComplete:PropTypes.bool.isRequired,usAccept:PropTypes.string.isRequired,usButtonText:PropTypes.string.isRequired,usDisabled:PropTypes.bool.isRequired,usHelpImage:PropTypes.node.isRequired,usLabel:PropTypes.string.isRequired,usPlaceholder:PropTypes.string.isRequired};export default UploadImageStep;
@@ -0,0 +1,2 @@
1
+ // TODO: consider to move this enum into component file once we migrate it on TypeScript or replace with some common enum
2
+ export var UploadStep;(function(a){a.UPLOAD_IMAGE_STEP="uploadImageStep",a.MEDIA_UPLOAD_STEP="mediaUploadStep"})(UploadStep||(UploadStep={}));
@@ -0,0 +1 @@
1
+ export var asyncFileRead=function(a){return new Promise(function(b,c){var d=new FileReader;d.readAsDataURL(a),d.addEventListener("load",function(a){b(a.target.result)}),d.addEventListener("error",function(a){c(a)})})};
@@ -0,0 +1 @@
1
+ export{asyncFileRead}from"./asyncFileRead";
@@ -0,0 +1 @@
1
+ export var getFileType=function(a,b){if(!a&&!b)return"";if(a&&a.type&&""!==a.type){var c;return null!==(c=a.type)&&void 0!==c?c:""}if(b){var d=b.match(/^data:([a-z]+\/[a-z]+);/);if(d&&d[1]){var e;return null!==(e=d[1])&&void 0!==e?e:""}}return""};
@@ -0,0 +1 @@
1
+ export{getFileType}from"./getFileType";
@@ -0,0 +1,2 @@
1
+ // Spot Platform's Media API only support these MIME types
2
+ var SUPPORTED_MIME_TYPES=["image/jpeg","video/*","application/pdf"];export var getSupportedSpotMimeTypes=function(a){if("*"===a)return SUPPORTED_MIME_TYPES;var b=a.split(","),c={"image/*":"image/jpeg","application/*":"application/pdf"},d=b.map(function(a){return c[a]||a});return d.filter(function(a){return SUPPORTED_MIME_TYPES.includes(a)})};
@@ -0,0 +1 @@
1
+ export{getSupportedSpotMimeTypes}from"./getSupportedSpotMimeTypes";
@@ -0,0 +1 @@
1
+ export{postData}from"./postData";export{asyncFileRead}from"./asyncFileRead";export{isSizeValid}from"./isSizeValid";export{isTypeValid}from"./isTypeValid";export{getFileType}from"./getFileType";export{getSupportedSpotMimeTypes}from"./getSupportedSpotMimeTypes";export{requestMedia}from"./requestMedia";
@@ -0,0 +1 @@
1
+ export{isSizeValid}from"./isSizeValid";
@@ -0,0 +1 @@
1
+ export var isSizeValid=function(a,b){return Number.isInteger(b)&&a.size<=b};
@@ -0,0 +1 @@
1
+ export{isTypeValid}from"./isTypeValid";
@@ -0,0 +1 @@
1
+ import{getFileType}from"../getFileType";export var isTypeValid=function(a,b,c){if(!a||!b)return!1;var d=b.replace(/\s/g,"").split(","),e=getFileType(a,c);return!!("*"===b||d.includes(e))||d.some(function(a){var b=a.split("/"),c=b[0],d=b[1];return!("*"!==d)&&e.includes(c)})};
@@ -0,0 +1 @@
1
+ export{postData}from"./postData";
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}export var postData=function(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:fetch;return c("".concat(a.url),_objectSpread({method:"POST",body:b},a)).then(function(a){if(!a.ok){var b=new Error(a.statusText);throw b.status=a.status,b.response=a,b}return a}).catch(function(a){throw a})};
@@ -0,0 +1 @@
1
+ export{requestMedia}from"./requestMedia";
@@ -0,0 +1 @@
1
+ export var requestMedia=function(a){return new Promise(function(b,c){("undefined"==typeof window||"undefined"==typeof window.microapps)&&c("microapps must be available in window to use Spot Platform's Media API"),window.microapps.requestMedia(a).then(function(a){var c=base64ToByteArray(a.bytes),d=new Blob([c],{type:a.mimeType});b(d)}).catch(function(a){return c(a)})})};var base64ToByteArray=function(a){for(var b=atob(a),c=b.length,d=Array(c),e=0;e<c;e+=1)d[e]=b.charCodeAt(e);return new Uint8Array(d)};
@@ -0,0 +1,8 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{useTheme}from"@wise/components-theming";import classNames from"classnames";import{useEffect,useRef,useState}from"react";import{useIntl}from"react-intl";import Button from"../button";import{ControlType,Priority,Status}from"../common";import Modal from"../modal";import{isSizeValid}from"../upload/utils/isSizeValid";import{isTypeValid}from"../upload/utils/isTypeValid";import MESSAGES from"./UploadInput.messages";import UploadButton from"./uploadButton/UploadButton";import{DEFAULT_SIZE_LIMIT,imageFileTypes}from"./uploadButton/defaults";import UploadItem from"./uploadItem/UploadItem";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";function generateFileId(a){var b=a.name,c=a.size,d=new Date().getTime();return"".concat(b,"_").concat(c,"_").concat(d)}var UploadInput=function(a){function b(a){function b(b){return[].concat(_toConsumableArray(b),[a])}T(b),U.current=b(U.current)}function c(a,c){var d=a.name,e=generateFileId(a),f={id:e,filename:d,status:Status.FAILED,error:c};b(f),v&&v(f)}function d(){var a=new Set([Status.SUCCEEDED,Status.PENDING]),b=U.current.filter(function(b){return b.status&&a.has(b.status)});return b.length}function e(){if(!y)return!1;var a=d();return a>=y}// One or more files selected, create entries for them
2
+ var f=a.files,g=void 0===f?[]:f,h=a.fileInputName,i=void 0===h?"file":h,j=a.className,k=a.deleteConfirm,l=a.disabled,m=a.multiple,n=void 0!==m&&m,o=a.fileTypes,p=void 0===o?imageFileTypes:o,q=a.sizeLimit,r=void 0===q?DEFAULT_SIZE_LIMIT:q,s=a.description,t=a.onUploadFile,u=a.onDeleteFile,v=a.onValidationError,w=a.onFilesChange,x=a.onDownload,y=a.maxFiles,z=a.maxFilesErrorMessage,A=a.id,B=a.sizeLimitErrorMessage,C=a.uploadButtonTitle,D=useTheme(),E=D.isModern,F=useState(null),G=_slicedToArray(F,2),H=G[0],I=G[1],J=useState(!1),K=_slicedToArray(J,2),L=K[0],M=K[1],N=useIntl(),O=N.formatMessage,P=new Set([Status.PENDING,Status.PROCESSING]),Q=useState(n||0===g.length?g:[g[0]]),R=_slicedToArray(Q,2),S=R[0],T=R[1],U=useRef(n||0===g.length?g:[g[0]]),V=function(a){function b(b){return b.filter(function(b){return a!==b&&a.id!==b.id})}T(b),U.current=b(U.current)},W=function(a,b){var c=function(c){return c.map(function(c){return c===a||c.id===a.id?_objectSpread(_objectSpread({},a),b):c})};T(c),U.current=c(U.current)},X=function(a){var b=a.id,c=a.status;c===Status.FAILED?V(a):u&&b&&(W(a,{status:Status.PROCESSING,error:void 0}),u(b).then(function(){return V(a)}).catch(function(b){W(a,{error:b})}))};// eslint-disable-line react-hooks/exhaustive-deps
3
+ return useEffect(function(){M(!0)},[]),useEffect(function(){w&&L&&w(S)},[w,S]),/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs("div",{className:classNames("np-upload-input",j,{disabled:E&&l}),children:[S.map(function(a){return/*#__PURE__*/_jsx(UploadItem,{file:a,canDelete:(!!u||a.status===Status.FAILED)&&(!a.status||!P.has(a.status)),onDelete:a.status===Status.FAILED?function(){return X(a)}:function(){return I(a)},onDownload:x},a.id)}),(n||!n&&!S.length)&&/*#__PURE__*/_jsx(UploadButton,{id:A,uploadButtonTitle:C,disabled:!E&&(e()||l),multiple:n,fileTypes:p,sizeLimit:r,description:s,maxFiles:y,onChange:function addFiles(a){for(var h=0;h<a.length;h+=1){var d=a.item(h),f=new FormData;// Returning a FormData[] array instead of FileList so we can filter out incorrect files
4
+ if(d){var g=function(){var a=d.name,g=generateFileId(d),h=Array.isArray(p)?p.join(","):p;// Check if file type is valid
5
+ if(!isTypeValid(d,h))return c(d,O(MESSAGES.fileTypeNotSupported)),"continue";// Check if the filesize is valid
6
+ // Convert to rough bytes
7
+ if(!isSizeValid(d,1e3*r)){var k=B||O(MESSAGES.fileIsTooLarge);return c(d,k),"continue"}if(e()){var l=z||O(MESSAGES.maximumFilesAlreadyUploaded,{maxFilesAllowed:y});return c(d,l),"continue"}f.append(i,d);var j={id:g,filename:a,status:Status.PENDING};if(b(j),t(f).then(function(a){var b=a.id,c=a.url,d=a.error;W(j,{id:b,url:c,error:d,status:Status.SUCCEEDED})}).catch(function(a){W(j,{error:a,status:Status.FAILED})}),!n)// Only upload a single file
8
+ return"break"}();if("continue"===g)continue;if("break"===g)break}}}})]}),/*#__PURE__*/_jsx(Modal,{title:void 0===(null===k||void 0===k?void 0:k.title)?O(MESSAGES.deleteModalTitle):k.title,body:void 0===(null===k||void 0===k?void 0:k.body)?O(MESSAGES.deleteModalBody):k.body,open:!!H,footer:/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Button,{block:!0,onClick:function onClick(){I(null)},children:(null===k||void 0===k?void 0:k.cancelText)||O(MESSAGES.deleteModalCancelButtonText)}),/*#__PURE__*/_jsx(Button,{block:!0,priority:Priority.SECONDARY,type:ControlType.NEGATIVE,onClick:function onClick(){H&&X(H),I(null)},children:(null===k||void 0===k?void 0:k.confirmText)||O(MESSAGES.deleteModalConfirmButtonText)})]}),onClose:function onClose(){I(null)}})]})};export default UploadInput;
@@ -0,0 +1 @@
1
+ import{defineMessages}from"react-intl";export default defineMessages({fileIsTooLarge:{id:"neptune.UploadInput.fileIsTooLarge"},fileTypeNotSupported:{id:"neptune.UploadInput.fileTypeNotSupported"},deleteModalTitle:{id:"neptune.UploadInput.deleteModalTitle"},deleteModalBody:{id:"neptune.UploadInput.deleteModalBody"},deleteModalCancelButtonText:{id:"neptune.UploadInput.deleteModalCancelButtonText"},deleteModalConfirmButtonText:{id:"neptune.UploadInput.deleteModalConfirmButtonText"},maximumFilesAlreadyUploaded:{id:"neptune.UploadInput.maximumFilesAlreadyUploaded"}});
@@ -0,0 +1 @@
1
+ import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import _defineProperty from"@babel/runtime/helpers/defineProperty";import _regeneratorRuntime from"@babel/runtime/regenerator";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{within}from"@testing-library/react";import userEvent from"@testing-library/user-event";import{Status}from"../common";import{render,screen,waitFor,waitForElementToBeRemoved}from"../test-utils";import UploadInput from"./UploadInput";import{TEST_IDS as UPLOAD_BUTTON_TEST_IDS}from"./uploadButton/UploadButton";import{TEST_IDS as UPLOAD_ITEM_TEST_IDS}from"./uploadItem/UploadItem";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var spiedDateObject=jest.spyOn(global,"Date");describe("UploadInput",function(){var a=new File(["foo"],"foo.png",{type:"image/png"}),b=new File(["foo"],"foo.jpg",{type:"image/jpeg"}),c=[{id:1,filename:"purchase-receipt.pdf",status:Status.SUCCEEDED},{id:2,filename:"CoWork-0317-invoice.pdf",status:Status.PROCESSING}],d={onUploadFile:jest.fn().mockResolvedValue({id:1}).mockResolvedValueOnce({id:2}).mockResolvedValueOnce({id:3}),onDeleteFile:jest.fn().mockResolvedValue({})},e=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:d;return render(/*#__PURE__*/_jsx(UploadInput,_objectSpread({},a)))};beforeEach(function(){spiedDateObject.mockImplementation(function(){return{getTime:jest.fn().mockReturnValue(Math.random())}})}),afterAll(function(){spiedDateObject.mockRestore()}),describe("single file upload",function(){it("should trigger onUploadFiles & onFilesChange with a single FormData entry containing `file` field",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function c(){var f,g,h,i;return _regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return f="11111111",g="22222222",spiedDateObject.mockImplementation(function(){return{getTime:jest.fn().mockReturnValueOnce(f).mockReturnValueOnce(g)}}),h=jest.fn(),e(_objectSpread(_objectSpread({},d),{},{onFilesChange:h})),i=screen.getByTestId(UPLOAD_BUTTON_TEST_IDS.uploadInput),userEvent.upload(i,[a,b]),c.next=9,waitFor(function(){expect(d.onUploadFile).toHaveBeenCalledTimes(1)});case 9:expect(h).toHaveBeenCalledTimes(2),expect(h).toHaveBeenNthCalledWith(1,[{filename:"foo.png",id:"foo.png_3_".concat(f),status:"pending",url:void 0}]),expect(h).toHaveBeenNthCalledWith(2,[{filename:"foo.png",id:2,status:"succeeded",url:void 0}]);case 12:case"end":return c.stop();}},c)}))),it("should render only one file even if multiple ones were supplied",function(){e(_objectSpread(_objectSpread({},d),{},{files:c})),expect(screen.getByText(c[0].filename)).toBeInTheDocument(),c.slice(1,c.length).forEach(function(a){expect(screen.queryByText(a.filename)).not.toBeInTheDocument()})})}),describe("multiple file upload",function(){it("should render all files",function(){e(_objectSpread(_objectSpread({},d),{},{files:c,multiple:!0})),c.forEach(function(a){expect(screen.getByText(a.filename)).toBeInTheDocument()})}),it("should render the UploadButton also",function(){e(_objectSpread(_objectSpread({},d),{},{files:c,multiple:!0})),expect(screen.getByText("Upload files")).toBeInTheDocument()}),it("should trigger onUploadFile with multiple FormData entries containing `file` fields",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function c(){var f;return _regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return e(_objectSpread(_objectSpread({},d),{},{multiple:!0})),d.onUploadFile.mockClear(),expect(screen.getByTestId(UPLOAD_BUTTON_TEST_IDS.uploadInput)).toHaveAttribute("multiple"),f=screen.getByTestId(UPLOAD_BUTTON_TEST_IDS.uploadInput),userEvent.upload(f,[a,b]),c.next=7,waitFor(function(){expect(d.onUploadFile).toHaveBeenCalledTimes(2)});case 7:case"end":return c.stop();}},c)})))}),describe("file deletion",function(){var a=jest.fn();beforeEach(function(){a.mockClear()}),it("should delete file with modal confirmation",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function b(){var f;return _regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return e(_objectSpread(_objectSpread({},d),{},{files:c,multiple:!0,onFilesChange:a})),f=screen.getAllByTestId(UPLOAD_ITEM_TEST_IDS.uploadItem)[0],within(f).getByLabelText("Remove file",{exact:!1}).click(),screen.getByText("Remove").click(),b.next=6,waitForElementToBeRemoved(f);case 6:expect(d.onDeleteFile).toHaveBeenCalledWith(c[0].id),expect(a).toHaveBeenCalledTimes(2),expect(a).toHaveBeenNthCalledWith(1,[{error:void 0,filename:"purchase-receipt.pdf",id:1,status:"processing"},{filename:"CoWork-0317-invoice.pdf",id:2,status:"processing"}]),expect(a).toHaveBeenLastCalledWith([{filename:"CoWork-0317-invoice.pdf",id:2,status:"processing"}]);case 10:case"end":return b.stop();}},b)}))),it("should delete file with failed state without modal confirmation",function(){var b=[{id:1,filename:"purchase-receipt.pdf",status:Status.FAILED}];e(_objectSpread(_objectSpread({},d),{},{files:b,multiple:!0,onFilesChange:a}));var c=screen.getAllByTestId(UPLOAD_ITEM_TEST_IDS.uploadItem)[0];within(c).getByLabelText("Remove file",{exact:!1}).click(),expect(c).not.toBeInTheDocument(),expect(a).toHaveBeenCalledTimes(1),expect(a).toHaveBeenCalledWith([])}),it("should not render delete button when no delete callback is provided",function(){e(_objectSpread(_objectSpread({},d),{},{files:c,multiple:!0,onDeleteFile:void 0})),expect(screen.queryByLabelText("Remove file ",{exact:!1})).not.toBeInTheDocument()})}),describe("Max File Upload limit",function(){it("should show max file number in the description next to the upload button",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function a(){return _regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e(_objectSpread(_objectSpread({},d),{},{multiple:!0,maxFiles:2})),a.next=3,waitFor(function(){expect(screen.getByText(/Maximum 2 files\./)).toBeInTheDocument()});case 3:case"end":return a.stop();}},a)}))),it("should show given error when maxFiles limit is applied and more files are uploaded",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function c(){var f,g,h,i,j;return _regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return f="Maximum files message from prop",g=jest.fn(),e(_objectSpread(_objectSpread({},d),{},{multiple:!0,maxFiles:3,maxFilesErrorMessage:f,onUploadFile:g})),g.mockImplementation(function(a){var b=a.get("file");return Promise.resolve({file:b,id:Math.random()})}),h=screen.getByTestId(UPLOAD_BUTTON_TEST_IDS.uploadInput),userEvent.upload(h,[a,b]),i=new File(["foo2"],"foo2.png",{type:"image/png"}),j=new File(["foo2"],"foo2.jpg",{type:"image/jpeg"}),userEvent.upload(h,[i,j]),c.next=11,waitFor(function(){expect(screen.getByText(f)).toBeInTheDocument()});case 11:case"end":return c.stop();}},c)}))),it("should show default error when maxFiles limit exceeds and no error message provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function c(){var f,g,h,i;return _regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return f="Sorry, this upload failed because we can only accept 2 files at once.",g=jest.fn(),e(_objectSpread(_objectSpread({},d),{},{multiple:!0,maxFiles:2,onUploadFile:g})),g.mockImplementation(function(a){var b=a.get("file");return Promise.resolve({file:b,id:Math.random()})}),h=screen.getByTestId(UPLOAD_BUTTON_TEST_IDS.uploadInput),i=new File(["foo2"],"foo2.png",{type:"image/png"}),userEvent.upload(h,[a,b,i]),c.next=9,waitFor(function(){expect(screen.getByText(f)).toBeInTheDocument()});case 9:case"end":return c.stop();}},c)})))}),describe("Misc",function(){it("should attach the input id accepted from props to the input components",function(){var a="LabelText";render(/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("label",{htmlFor:"testInputId",children:a}),/*#__PURE__*/_jsx(UploadInput,_objectSpread(_objectSpread({},d),{},{id:"testInputId"}))]})),expect(screen.getByLabelText(a)).toHaveAttribute("id","testInputId")}),it("should show the file size error when provided in props",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function a(){var b,c,f,g,h;return _regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return b=1024,c=2*b,f="file oversized",e(_objectSpread(_objectSpread({},d),{},{sizeLimit:1,sizeLimitErrorMessage:f})),g=screen.getByTestId(UPLOAD_BUTTON_TEST_IDS.uploadInput),h=new File([""],"testFile.png",{type:"image/png"}),Object.defineProperty(h,"size",{value:c}),userEvent.upload(g,[h]),a.next=10,waitFor(function(){expect(screen.getByText(f)).toBeInTheDocument()});case 10:case"end":return a.stop();}},a)})))})});
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{action}from"@storybook/addon-actions";import{Status}from"../common";import UploadInput from"./UploadInput";import{jsx as _jsx}from"react/jsx-runtime";export default{title:"Forms/UploadInput",component:UploadInput};var files=[{id:1,filename:"purchase-receipt.pdf",url:"https://wise.com/public-resources/assets/logos/wise/brand_logo_inverse.svg"},{id:2,filename:"receipt failed.png",status:Status.FAILED},{id:3,filename:"receipt failed with error string.png",status:Status.SUCCEEDED},{id:4,filename:"receipt failed with error object.png",status:Status.SUCCEEDED}],createDelayedPromise=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.successful,c=a.delaySeconds,d=void 0===c?3:c,e=a.response,f=void 0===e?{id:Math.round(1e4*Math.random()),url:"#"}:e;return new Promise(function(a,c){setTimeout(function(){return!(void 0!==b)||b?a(f):c(new Error("Unexpected error"))},1e3*d)})},props={onUploadFile:function onUploadFile(){return createDelayedPromise()},onDeleteFile:function onDeleteFile(){return createDelayedPromise()}},Template=function(a){return/*#__PURE__*/_jsx(UploadInput,_objectSpread({},a))};export var SingleFile=Template.bind({});SingleFile.args=_objectSpread({},props);export var MultipleFiles=Template.bind({});MultipleFiles.args=_objectSpread(_objectSpread({},props),{},{multiple:!0});export var UploadInputWithDescriptionFromProps=Template.bind({});UploadInputWithDescriptionFromProps.args=_objectSpread(_objectSpread({},props),{},{multiple:!0,description:"Custom file description from prop"});export var Disabled=Template.bind({});Disabled.args=_objectSpread(_objectSpread({},props),{},{disabled:!0});export var WithAnyFileType=Template.bind({});WithAnyFileType.args=_objectSpread(_objectSpread({},props),{},{fileTypes:"*"});export var WithSingleFileType=Template.bind({});WithSingleFileType.args=_objectSpread(_objectSpread({},props),{},{fileTypes:".zip,application/zip"});export var WithMultipleExistingFiles=Template.bind({});WithMultipleExistingFiles.args=_objectSpread(_objectSpread({},props),{},{files:files,multiple:!0});export var WithoutDelete=Template.bind({});WithoutDelete.args=_objectSpread(_objectSpread({},props),{},{files:files,onDeleteFile:void 0,multiple:!0});export var WithUploadFailed=Template.bind({});WithUploadFailed.args=_objectSpread(_objectSpread({},props),{},{files:files.slice(0),onUploadFile:function onUploadFile(){return createDelayedPromise({successful:!1})},multiple:!0});export var WithDeleteFailed=Template.bind({});WithDeleteFailed.args=_objectSpread(_objectSpread({},props),{},{files:files.slice(0),onDeleteFile:function onDeleteFile(){return createDelayedPromise({successful:!1})},multiple:!0});export var CustomConfirmMessage=Template.bind({});CustomConfirmMessage.args=_objectSpread(_objectSpread({},props),{},{files:files.slice(0),deleteConfirm:{title:"Sure you want to remove this invoice?",body:/*#__PURE__*/_jsx("img",{alt:"brand logo",src:"https://wise.com/public-resources/assets/logos/wise/brand_logo.svg"})}});export var withManualDownloadHandler=Template.bind({});withManualDownloadHandler.args=_objectSpread(_objectSpread({},props),{},{files:files,onDownload:action("Manual download handler")});export var withFilesChangeHandler=Template.bind({});withFilesChangeHandler.args=_objectSpread(_objectSpread({},props),{},{files:files,onFilesChange:action("Files change handler")});export var withMaxFilesToUploadLimit=Template.bind({});withMaxFilesToUploadLimit.args=_objectSpread(_objectSpread({},props),{},{multiple:!0,maxFiles:5,maxFilesErrorMessage:"Can't upload as maximum number of files allowed are already uploaded"});export var withFileSizeErrorMessage=Template.bind({});withFileSizeErrorMessage.args=_objectSpread(_objectSpread({},props),{},{sizeLimit:1,sizeLimitErrorMessage:"The file is oversized"});export var withCustomUploadButtonTitle=Template.bind({});withCustomUploadButtonTitle.args=_objectSpread(_objectSpread({},props),{},{uploadButtonTitle:"Upload the VAT receipts for FY 2022-23"});
@@ -0,0 +1 @@
1
+ export{default}from"./UploadInput";
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{PlusCircle as PlusIcon,Upload as UploadIcon}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import{useRef,useState}from"react";import{useIntl}from"react-intl";import Body from"../../body";import{Typography}from"../../common";import{useDirection}from"../../common/hooks";import MESSAGES from"./UploadButton.messages";import{DEFAULT_SIZE_LIMIT,imageFileTypes}from"./defaults";import getAllowedFileTypes from"./getAllowedFileTypes";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export var TEST_IDS;(function(a){a.uploadInput="uploadInput",a.mediaBody="mediaBody"})(TEST_IDS||(TEST_IDS={}));var onDragOver=function(a){a.preventDefault()},DEFAULT_FILE_INPUT_ID="np-upload-button",UploadButton=function(a){function b(){if(e)return e;var a=B(),b="*"===a?t(MESSAGES.allFileTypes):a;return t(MESSAGES.instructions,{fileTypes:b,size:Math.round(i/1e3)})}var c=a.disabled,d=a.multiple,e=a.description,f=a.fileTypes,g=void 0===f?imageFileTypes:f,h=a.sizeLimit,i=void 0===h?DEFAULT_SIZE_LIMIT:h,j=a.maxFiles,k=a.onChange,l=a.id,m=void 0===l?DEFAULT_FILE_INPUT_ID:l,n=a.uploadButtonTitle,o=useTheme(),p=o.isModern,q=useDirection(),r=q.isRTL,s=useIntl(),t=s.formatMessage,u=useRef(null),v=useState(!1),w=_slicedToArray(v,2),x=w[0],y=w[1],z=useRef(0),A=function(){z.current=0,y(!1)},B=function(){return"*"===g?g:Array.isArray(g)?getAllowedFileTypes(g).join(", "):getAllowedFileTypes([g]).join(", ")};return/*#__PURE__*/_jsxs("div",_objectSpread(_objectSpread({className:classNames("np-upload-button-container","droppable",{"droppable-dropping":x})},!c&&{onDragEnter:function onDragEnter(a){a.preventDefault(),z.current+=1,1===z.current&&y(!0)},onDragLeave:function onDragLeave(a){a.preventDefault(),z.current-=1,0===z.current&&y(!1)},onDrop:function onDrop(a){a.preventDefault(),A(),a.dataTransfer&&a.dataTransfer.files&&a.dataTransfer.files[0]&&k(a.dataTransfer.files)},onDragOver:onDragOver}),{},{children:[/*#__PURE__*/_jsx("input",_objectSpread(_objectSpread(_objectSpread({ref:u,id:m,type:"file"},function(){var a="*"===B();return a?null:Array.isArray(g)?{accept:g.join(",")}:{accept:g}}()),d&&{multiple:!0}),{},{className:"tw-droppable-input",disabled:c,name:"file-upload","data-testid":TEST_IDS.uploadInput,onChange:function filesSelected(a){var b=a.target.files;b&&(k(b),u.current&&(u.current.value=""))}})),/*#__PURE__*/_jsx("label",{htmlFor:m,className:classNames("btn","np-upload-accent","np-upload-button",{disabled:c}),children:/*#__PURE__*/_jsxs("div",{className:"media",children:[/*#__PURE__*/_jsx("div",{className:"np-upload-icon media-left",children:/*#__PURE__*/_jsx(UploadIcon,{size:24,className:"text-link"})}),/*#__PURE__*/_jsxs("div",{className:"media-body text-xs-left","data-testid":TEST_IDS.mediaBody,children:[/*#__PURE__*/_jsx(Body,{type:Typography.BODY_LARGE_BOLD,className:"d-block",children:function(){return n?n:t(d?MESSAGES.uploadFiles:MESSAGES.uploadFile)}()}),function(){return/*#__PURE__*/_jsx(_Fragment,{children:/*#__PURE__*/_jsxs(Body,{className:classNames({"text-primary":!c,small:!p,"font-weight-normal":!p}),children:[b(),j&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("br",{}),"Maximum ".concat(j," files.")]})]})})}()]})]})}),x&&/*#__PURE__*/_jsxs("div",{className:"droppable-card droppable-dropping-card droppable-card-content",children:[/*#__PURE__*/_jsx(PlusIcon,{className:"text-info m-x-1",size:24}),/*#__PURE__*/_jsx("div",{className:"text-info",children:t(MESSAGES.dropFile)})]})]}))};export default UploadButton;
@@ -0,0 +1 @@
1
+ import{defineMessages}from"react-intl";export default defineMessages({uploadFile:{id:"neptune.UploadButton.uploadFile"},uploadFiles:{id:"neptune.UploadButton.uploadFiles"},instructions:{id:"neptune.UploadButton.instructions"},allFileTypes:{id:"neptune.UploadButton.allFileTypes"},dropFile:{id:"neptune.UploadButton.dropFiles"}});
@@ -0,0 +1,3 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{render,screen,userEvent}from"../../test-utils";import UploadButton,{TEST_IDS}from"./UploadButton";import{imageFileTypes}from"./defaults";import{jsx as _jsx}from"react/jsx-runtime";describe("UploadButton",function(){var a=new File(["foo"],"foo.png",{type:"image/png"}),b=new File(["foo"],"foo.jpg",{type:"image/jpg"}),c={onChange:jest.fn()},d=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:c;return render(/*#__PURE__*/_jsx(UploadButton,_objectSpread({},a)))};describe("single file upload",function(){beforeEach(function(){d()}),it("should render the file input form",function(){expect(screen.getByText("Upload file")).toBeInTheDocument()}),it("should render the file input button with title, if provided",function(){d(_objectSpread(_objectSpread({},c),{},{uploadButtonTitle:"Upload your id"})),expect(screen.getByText("Upload your id")).toBeInTheDocument()}),it("should set accept to imageTypes",function(){expect(screen.getByTestId(TEST_IDS.uploadInput)).toHaveAttribute("accept",imageFileTypes.join(","))}),it("trigger onChange callback with a FileList",function(){var d=screen.getByTestId(TEST_IDS.uploadInput);// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
2
+ userEvent.upload(d,[a,b]),expect(c.onChange).toHaveBeenCalledTimes(1),expect(c.onChange.mock.calls[0][0]).toHaveLength(1)})}),describe("multiple file upload",function(){beforeEach(function(){c.onChange.mockClear(),d(_objectSpread(_objectSpread({},c),{},{multiple:!0}))}),it("should disable the file input",function(){expect(screen.getByTestId(TEST_IDS.uploadInput)).toHaveAttribute("multiple")}),it("trigger onChange callback with a FileList",function(){var d=screen.getByTestId(TEST_IDS.uploadInput);// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
3
+ userEvent.upload(d,[a,b]),expect(c.onChange).toHaveBeenCalledTimes(1),expect(c.onChange.mock.calls[0][0]).toHaveLength(2)})}),describe("disabled state",function(){beforeEach(function(){d(_objectSpread(_objectSpread({},c),{},{disabled:!0}))}),it("should disable the file input",function(){expect(screen.getByTestId(TEST_IDS.uploadInput)).toBeDisabled()})}),describe("accept all file types",function(){beforeEach(function(){d(_objectSpread(_objectSpread({},c),{},{fileTypes:["*"]}))}),it("should not add accept attribute to file input",function(){expect(screen.getByTestId(TEST_IDS.uploadInput)).not.toHaveAttribute("accept")})}),describe("description for the button",function(){it("should show default description based on the default file types provided",function(){d(_objectSpread({},c)),expect(screen.getByText("PDF, JPG, JPEG, PNG, less than 5MB")).toBeInTheDocument()}),it("should show default all files allowed description if all files are accepted",function(){d(_objectSpread(_objectSpread({},c),{},{fileTypes:["*"]})),expect(screen.getByText("All file types, less than 5MB")).toBeInTheDocument()}),it("should show custom description if provided",function(){d(_objectSpread(_objectSpread({},c),{},{fileTypes:["*"],description:"Test description"})),expect(screen.getByText("Test description")).toBeInTheDocument()}),it("should show maxFiles next to the description, if provided",function(){d(_objectSpread(_objectSpread({},c),{},{fileTypes:["*"],maxFiles:5})),expect(screen.getByText(/Maximum 5 files\./)).toBeInTheDocument()})})});
@@ -0,0 +1 @@
1
+ import{FileType}from"../../common";export var DEFAULT_SIZE_LIMIT=5e3;export var imageFileTypes=[FileType.PDF,FileType.JPG,FileType.PNG];
@@ -0,0 +1,3 @@
1
+ var getAllowedFileTypes=function(a){return a.map(function(a){return a.split(",").filter(function(a){return!a.includes("/")})// Filter out mime types
2
+ .map(function(a){return a.replace(".","").toUpperCase()})// Remove dot and convert extensions to uppercase to be displayed in the instructions
3
+ .join(", ")})};export default getAllowedFileTypes;
@@ -0,0 +1 @@
1
+ import{FileType}from"../../common";import getAllowedFileTypes from"./getAllowedFileTypes";describe("getAllowedFileTypes",function(){var a;describe("using predefined FileTypes",function(){beforeAll(function(){a=getAllowedFileTypes([FileType.PNG,FileType.JPG])}),it("parses allowed file extensions from FileType[] array",function(){expect(a).toStrictEqual(["PNG","JPG, JPEG"])})}),describe("using custom file extensions and mime types",function(){beforeAll(function(){a=getAllowedFileTypes([".xls,.xlm,application/vnd.ms-excel",".docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document",".doc,application/msword"])}),it("parses allowed file extensions from FileType[] array",function(){expect(a).toStrictEqual(["XLS, XLM","DOCX","DOC"])})}),describe("when all file types are allowed",function(){beforeAll(function(){a=getAllowedFileTypes(["*"])}),it("should return the wildcard character",function(){expect(a).toStrictEqual(["*"])})})});
@@ -0,0 +1,2 @@
1
+ import _typeof from"@babel/runtime/helpers/typeof";import{AlertCircle,CrossCircleFill}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import{useIntl}from"react-intl";import Body from"../../body";import{Size,Status,Typography,Sentiment}from"../../common";import ProcessIndicator from"../../processIndicator/ProcessIndicator";import StatusIcon from"../../statusIcon/StatusIcon";import MESSAGES from"./UploadItem.messages";import{UploadItemBody}from"./UploadItemBody";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export var TEST_IDS;(function(a){a.uploadItem="uploadItem",a.mediaBody="mediaBody"})(TEST_IDS||(TEST_IDS={}));var UploadItem=function(a){var b=a.file,c=a.canDelete,d=a.onDelete,e=a.onDownload,f=useIntl(),g=f.formatMessage,h=b.status,i=b.filename,j=b.error,k=b.url,l=useTheme(),m=l.isModern,n=[Status.SUCCEEDED,void 0].includes(h)&&!!k,o=function(){return"object"===_typeof(j)&&j.message||j||g(MESSAGES.uploadingFailed)};return/*#__PURE__*/_jsx("div",{className:classNames("np-upload-item",{"np-upload-item__link":n}),"data-testid":TEST_IDS.uploadItem,children:/*#__PURE__*/_jsxs("div",{className:"np-upload-item__body",children:[/*#__PURE__*/_jsx(UploadItemBody,{url:n?k:void 0,onDownload:function onDownloadFile(a){e&&(a.preventDefault(),e(b))},children:/*#__PURE__*/_jsx("div",{className:"np-upload-button",children:/*#__PURE__*/_jsxs("div",{className:"media",children:[/*#__PURE__*/_jsx("div",{className:"np-upload-icon media-left",children:function getIcon(){if(j||h===Status.FAILED)return m?/*#__PURE__*/_jsx(StatusIcon,{size:Size.SMALL,sentiment:Sentiment.NEGATIVE}):/*#__PURE__*/_jsx(AlertCircle,{size:24,className:"text-negative"});var a;switch(h){case Status.PROCESSING:case Status.PENDING:a=/*#__PURE__*/_jsx(ProcessIndicator,{size:Size.EXTRA_SMALL,status:Status.PROCESSING});break;case Status.SUCCEEDED:case Status.DONE:default:a=m?/*#__PURE__*/_jsx(StatusIcon,{size:Size.SMALL,sentiment:Sentiment.POSITIVE}):/*#__PURE__*/_jsx(ProcessIndicator,{size:Size.EXTRA_SMALL,status:Status.SUCCEEDED});}return m?a:/*#__PURE__*/_jsx("span",{style:{transform:"scale(0.8335)"},children:a});// Scale down ProcessIndicator to be 20px*20px to match `icons`
2
+ }()}),/*#__PURE__*/_jsxs("div",{className:"media-body text-xs-left","data-testid":TEST_IDS.mediaBody,children:[/*#__PURE__*/_jsx(Body,{className:"text-word-break d-block text-primary",children:function getTitle(){return i||g(MESSAGES.uploadedFile)}()}),function getDescription(){if(j||h===Status.FAILED)return/*#__PURE__*/_jsx(Body,{type:Typography.BODY_DEFAULT_BOLD,className:"text-negative",children:o()});switch(h){case Status.PENDING:return/*#__PURE__*/_jsx(Body,{type:Typography.BODY_DEFAULT_BOLD,children:g(MESSAGES.uploading)});case Status.PROCESSING:return/*#__PURE__*/_jsx(Body,{children:g(MESSAGES.deleting)});case Status.SUCCEEDED:case Status.DONE:default:return/*#__PURE__*/_jsx(Body,{type:Typography.BODY_DEFAULT_BOLD,className:"text-positive",children:g(MESSAGES.uploaded)});}}()]})]})})}),c&&/*#__PURE__*/_jsx("button",{"aria-label":g(MESSAGES.removeFile,{filename:i}),className:"btn np-upload-item__remove-button media-left",type:"button",onClick:function onClick(){return d()},children:/*#__PURE__*/_jsx(CrossCircleFill,{size:16})})]})})};export default UploadItem;
@@ -0,0 +1 @@
1
+ import{defineMessages}from"react-intl";export default defineMessages({uploadingFailed:{id:"neptune.UploadItem.uploadingFailed"},uploaded:{id:"neptune.UploadItem.uploaded"},uploading:{id:"neptune.UploadItem.uploading"},deleting:{id:"neptune.UploadItem.deleting"},uploadedFile:{id:"neptune.UploadItem.uploadedFile"},removeFile:{id:"neptune.UploadItem.removeFile"}});
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import userEvent from"@testing-library/user-event";import{Status}from"../../common";import{render,screen}from"../../test-utils";import UploadItem from"./UploadItem";import{jsx as _jsx}from"react/jsx-runtime";describe("UploadItem",function(){var a={file:{id:1,filename:"purchase-receipt.pdf",status:Status.SUCCEEDED,url:"https://wise.com"},canDelete:!0,onDelete:jest.fn()},b=function(){var b=0<arguments.length&&arguments[0]!==void 0?arguments[0]:a;return render(/*#__PURE__*/_jsx(UploadItem,_objectSpread({},b)))};describe("filename",function(){it("should display the filename",function(){b(),expect(screen.getByText(a.file.filename)).toBeInTheDocument()}),it("should display the default filename when it is missing",function(){b(_objectSpread(_objectSpread({},a),{},{file:_objectSpread(_objectSpread({},a.file),{},{filename:void 0})})),expect(screen.getByText("Uploaded file")).toBeInTheDocument()})}),describe("description",function(){it("should display the default uploading copy while file upload is in progress",function(){b(_objectSpread(_objectSpread({},a),{},{file:_objectSpread(_objectSpread({},a.file),{},{status:Status.PENDING})})),expect(screen.getByText("Uploading...")).toBeInTheDocument()}),it("should display the default deleting copy while file deletion is in progress",function(){b(_objectSpread(_objectSpread({},a),{},{file:_objectSpread(_objectSpread({},a.file),{},{status:Status.PROCESSING})})),expect(screen.getByText("Deleting...")).toBeInTheDocument()}),it("should display the default success copy when file upload is complete",function(){b(_objectSpread(_objectSpread({},a),{},{file:_objectSpread(_objectSpread({},a.file),{},{status:Status.SUCCEEDED})})),expect(screen.getByText("Uploaded")).toBeInTheDocument()})}),describe("failed uploads",function(){it("should display the error.message from an API response",function(){b(_objectSpread(_objectSpread({},a),{},{file:_objectSpread(_objectSpread({},a.file),{},{status:Status.FAILED,error:{message:"An API error object with message field"}})})),expect(screen.getByText("An API error object with message field")).toBeInTheDocument()}),it("should display the error if it is supplied as a string",function(){b(_objectSpread(_objectSpread({},a),{},{file:_objectSpread(_objectSpread({},a.file),{},{status:Status.FAILED,error:"An API error string"})})),expect(screen.getByText("An API error string")).toBeInTheDocument()}),it("should display default error message when error is missing but status is FAILED",function(){b(_objectSpread(_objectSpread({},a),{},{file:_objectSpread(_objectSpread({},a.file),{},{status:Status.FAILED})})),expect(screen.getByText("Uploading failed")).toBeInTheDocument()}),it("should display the error even if status is missing",function(){b(_objectSpread(_objectSpread({},a),{},{file:_objectSpread(_objectSpread({},a.file),{},{error:"An API error string without status"})})),expect(screen.getByText("An API error string without status")).toBeInTheDocument()})}),describe("file deletion",function(){it("should render the remove file button when deleteFile prop is supplied",function(){b(),expect(screen.getByLabelText("Remove file ",{exact:!1})).toBeInTheDocument()}),it("should not render the remove file button when canDelete prop is false",function(){b(_objectSpread(_objectSpread({},a),{},{canDelete:!1})),expect(screen.queryByLabelText("Remove file ",{exact:!1})).not.toBeInTheDocument()})}),describe("manual file download handler",function(){it("calls onDownload handler provided through props",function(){var c=jest.fn();b(_objectSpread(_objectSpread({},a),{},{onDownload:c})),userEvent.click(screen.getAllByRole("link")[0]),expect(c).toHaveBeenCalledTimes(1),expect(c).toHaveBeenCalledWith(a.file)})})});
@@ -0,0 +1 @@
1
+ import React from"react";import{jsx as _jsx}from"react/jsx-runtime";export var UploadItemBody=function(a){var b=a.children,c=a.url,d=a.onDownload;return c?/*#__PURE__*/_jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",onClick:d,children:b}):/*#__PURE__*/_jsx("div",{children:b})};
@@ -0,0 +1 @@
1
+ import{logActionRequired}from"../logActionRequired";var deprecatedMessage=function(a){var b=a.component,c=a.propName,d=a.message,e=a.expiryDate,f=["".concat(b," has deprecated the use of ").concat(c,".")];return d&&f.push(d),e&&f.push("".concat(c," will be removed on or after ").concat(e.toLocaleString("en-GB",{year:"numeric",month:"numeric",day:"numeric"}))),f.join(" ")},deprecated=function(a,b){var c=b.component,d=b.message,e=void 0===d?"":d,f=b.newProp,g=void 0===f?null:f,h=b.expiryDate,i=void 0===h?null:h;return function(b,d){var f=g?"Please use ".concat(g," instead."):e;null!=b[d]&&"undefined"!=typeof b[d]&&logActionRequired(deprecatedMessage({component:c,propName:d,message:f,expiryDate:i}));for(var h=arguments.length,j=Array(2<h?h-2:0),k=2;k<h;k++)j[k-2]=arguments[k];return a.apply(void 0,[b,d].concat(j))}};export default deprecated;
@@ -0,0 +1 @@
1
+ export{default}from"./deprecatedProperty";
@@ -0,0 +1 @@
1
+ export{default as deprecated}from"./deprecatedProperty";export{logActionRequired,logActionRequiredIf}from"./logActionRequired";
@@ -0,0 +1 @@
1
+ export function logActionRequired(a){var b,c;["development","test"].includes(null===(b=process)||void 0===b||null===(c=b.env)||void 0===c?void 0:c.NODE_ENV)&&console.warn(a)}export function logActionRequiredIf(a,b){b&&logActionRequired(a)}
@@ -0,0 +1,8 @@
1
+ import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _defineProperty from"@babel/runtime/helpers/defineProperty";function _createSuper(a){var b=_isNativeReflectConstruct();return function(){var c,d=_getPrototypeOf(a);if(b){var e=_getPrototypeOf(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return _possibleConstructorReturn(this,c)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}import PropTypes from"prop-types";import{Component}from"react";import{HistoryNavigator}from"../common";import{formatWithPattern,getCountOfSymbolsInSelection,getCursorPositionAfterKeystroke,unformatWithPattern,getDistanceToPreviousSymbol,getDistanceToNextSymbol}from"../common/textFormat";var WithDisplayFormat=/*#__PURE__*/function(a){function b(a){var d;_classCallCheck(this,b),d=c.call(this,a),_defineProperty(_assertThisInitialized(d),"getUserAction",function(a){var b=d.state,c=b.triggerEvent,e=b.triggerType,f=b.value,g=d.props.displayPattern,h=String.fromCharCode(c.which).toLowerCase();return"Paste"===e||"Cut"===e?e:(c.ctrlKey||c.metaKey)&&"z"===h?c.shiftKey?"Redo":"Undo":c.ctrlKey&&"d"===h?"Delete":"undefined"==typeof c.key&&a.length<=unformatWithPattern(f,g).length?"Backspace":c.key;// Detect mouse event redo
2
+ // Android Fix.
3
+ }),_defineProperty(_assertThisInitialized(d),"resetEvent",function(){d.setState({triggerType:null,triggerEvent:null,pastedLength:0})}),_defineProperty(_assertThisInitialized(d),"detectUndoRedo",function(a){var b=String.fromCharCode(a.which).toLowerCase();return(a.ctrlKey||a.metaKey)&&"z"===b?a.shiftKey?"Redo":"Undo":null}),_defineProperty(_assertThisInitialized(d),"handleOnKeyDown",function(a){a.persist();var b=a.target,c=b.selectionStart,e=b.selectionEnd,f=d.state.historyNavigator,g=d.props.displayPattern,h="";"Undo"===d.detectUndoRedo(a)?(h=formatWithPattern(f.undo(),g),d.setState({value:h,triggerType:"Undo"})):"Redo"===d.detectUndoRedo(a)?(h=formatWithPattern(f.redo(),g),d.setState({value:h,triggerType:"Redo"})):d.setState({triggerEvent:a,triggerType:"KeyDown",selectionStart:c,selectionEnd:e})}),_defineProperty(_assertThisInitialized(d),"handleOnPaste",function(a){var b=d.props.displayPattern,c=unformatWithPattern(a.clipboardData.getData("Text"),b).length;d.setState({triggerType:"Paste",pastedLength:c})}),_defineProperty(_assertThisInitialized(d),"handleOnCut",function(){d.setState({triggerType:"Cut"})}),_defineProperty(_assertThisInitialized(d),"isKeyAllowed",function(a){var b=d.props.displayPattern,c=b.split("").filter(function(a){return"*"!==a});return!c.includes(a)}),_defineProperty(_assertThisInitialized(d),"handleOnChange",function(a){var b=d.state,c=b.historyNavigator,e=b.triggerEvent,f=b.triggerType,g=d.props,h=g.displayPattern,i=g.onChange,j=a.target.value,k=unformatWithPattern(j,h),l=null===e?// triggerEvent can be null only in case of "autofilling" (via password manager extension or browser build-in one) events
4
+ "Paste":d.getUserAction(k);if(d.isKeyAllowed(l)&&"Undo"!==f&&"Redo"!==f){("Backspace"===l||"Delete"===l)&&(k=d.handleDelete(k,l));var m=formatWithPattern(k,h);c.add(k),d.handleCursorPositioning(l);var n=unformatWithPattern(m,h);d.setState({value:m},d.resetEvent(),i(n))}}),_defineProperty(_assertThisInitialized(d),"handleOnBlur",function(a){var b=d.props,c=b.displayPattern,e=b.onBlur;e&&e(unformatWithPattern(a.target.value,c))}),_defineProperty(_assertThisInitialized(d),"handleOnFocus",function(a){var b=d.props,c=b.displayPattern,e=b.onFocus;e&&(d.handleOnChange(a),e(unformatWithPattern(a.target.value,c)))}),_defineProperty(_assertThisInitialized(d),"handleDelete",function(a,b){var c=d.props.displayPattern,e=d.state,f=e.selectionStart,g=e.selectionEnd,h=_toConsumableArray(a);if(f===g){var i=f-getCountOfSymbolsInSelection(0,f,c),j=0,k=getDistanceToNextSymbol(f,c);"Backspace"===b&&(i-=1,k=getDistanceToPreviousSymbol(f,c)),0<=i&&k&&(j=1),h.splice(i,j)}return h.join("")}),_defineProperty(_assertThisInitialized(d),"handleCursorPositioning",function(a){var b=d.props.displayPattern,c=d.state,e=c.triggerEvent,f=c.selectionStart,g=c.selectionEnd,h=c.pastedLength,i=getCursorPositionAfterKeystroke(a,f,g,b,h);setTimeout(function(){e&&e.target.setSelectionRange(i,i),d.setState({selectionStart:i,selectionEnd:i})},0)});var e=a.value,f=a.displayPattern,g=unformatWithPattern(e,f);return d.state={value:formatWithPattern(g,f),historyNavigator:new HistoryNavigator,prevDisplayPattern:a.displayPattern,triggerType:null,triggerEvent:null},d}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"render",value:function render(){var a=this.props,b=a.type,c=a.inputMode,d=a.className,e=a.id,f=a.name,g=a.placeholder,h=a.readOnly,i=a.required,j=a.minLength,k=a.maxLength,l=a.disabled,m=a.autoComplete,n=this.state.value,o={type:b,inputMode:c,className:d,id:e,name:f,placeholder:g,readOnly:h,required:i,minLength:j,maxLength:k,disabled:l,autoComplete:m,value:n,onFocus:this.handleOnFocus,onBlur:this.handleOnBlur,onPaste:this.handleOnPaste,onKeyDown:this.handleOnKeyDown,onChange:this.handleOnChange,onCut:this.handleOnCut};return this.props.render(o)}}],[{key:"getDerivedStateFromProps",value:function getDerivedStateFromProps(a,b){var c=a.displayPattern,d=b.prevDisplayPattern;if(b.prevDisplayPattern!==c){var e=b.value,f=b.historyNavigator,g=unformatWithPattern(e,d);return f.reset(),{prevDisplayPattern:c,value:formatWithPattern(g,c),triggerType:null,triggerEvent:null,pastedLength:0}}return null}}]),b}(Component);WithDisplayFormat.propTypes={/**
5
+ * autocomplete hides our form help so we need to disable it when help text
6
+ * is present. Chrome ignores autocomplete=off, the only way to disable it is
7
+ * to provide an 'invalid' value, for which 'disabled' serves.
8
+ */autoComplete:PropTypes.oneOf(["on","off","disabled"]),className:PropTypes.string,disabled:PropTypes.bool,id:PropTypes.string,maxLength:PropTypes.number,minLength:PropTypes.number,name:PropTypes.string,onFocus:PropTypes.func,onBlur:PropTypes.func,onChange:PropTypes.func.isRequired,placeholder:PropTypes.string,readOnly:PropTypes.bool,render:PropTypes.func.isRequired,required:PropTypes.bool,displayPattern:PropTypes.string,type:PropTypes.string,inputMode:PropTypes.string,value:PropTypes.string},WithDisplayFormat.defaultProps={autoComplete:"off",className:null,disabled:!1,id:null,maxLength:null,minLength:null,name:null,placeholder:null,readOnly:!1,required:!1,displayPattern:"",type:"text",inputMode:null,value:"",onFocus:null,onBlur:null};export default WithDisplayFormat;
@@ -0,0 +1 @@
1
+ export{default}from"./WithDisplayFormat";
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{useState,useEffect}from"react";import{createPortal}from"react-dom";import{jsx as _jsx}from"react/jsx-runtime";export default function withNextPortalWrapper(a){return function(b){var c=useState(!1),d=_slicedToArray(c,2),e=d[0],f=d[1];return useEffect(function(){f(!0)},[f]),e?/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(a,_objectSpread({},b)),document.body):null}}
@@ -0,0 +1,7 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{cloneElement}from"react";import{normalizeEvent}from"./validation/event-utilities";var methodsToExtend=["onChange","onBlur","onFocus","onSuccess","onFailure"],WithNormaliser=function(a){var b=a.children,c=function(a){return function(c){var d=normalizeEvent(c,b.props.type);a(d)}},d={};return methodsToExtend.forEach(function(a){b.props[a]&&(d[a]=c(b.props[a]))}),/*#__PURE__*/cloneElement(b,_objectSpread({},d))};/**
2
+ *
3
+ * This function is a temporary function used to normalize the returned values from our form related components. Please DO NOT USE THIS COMPONENT.
4
+ *
5
+ * @param root0
6
+ * @param root0.children
7
+ */export default WithNormaliser;
@@ -0,0 +1 @@
1
+ export{default}from"./WithNormalizer";
@@ -0,0 +1 @@
1
+ import{isNull,isNumber,isUndefined}from"@transferwise/neptune-validation";function isSyntheticEvent(a){return!isNull(a)&&!isUndefined(a)&&!!a.nativeEvent&&a.nativeEvent instanceof Event}var normalizeEvent=function(a,b){var c=a;return a&&(isSyntheticEvent(a)?c="number"===b?parseFloat(a.target.value):a.target.value:(isNumber(a.value)||!isUndefined(a.value))&&(c=a.value)),c};export{isSyntheticEvent,normalizeEvent};
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"core-js/modules/es.array.map.js";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";import PropTypes from"prop-types";import{useState}from"react";import{Theme}from"../common";import AccordionItem from"./AccordionItem";import{jsx as _jsx}from"react/jsx-runtime";var Accordion=function(a){var b=a.items,c=a.onClick,d=a.indexOpen,e=a.theme,f=useState(function(){return b.map(function(a,b){return b===d})}),g=_slicedToArray(f,2),h=g[0],i=g[1],j=function(a){c&&c(a);var b=_toConsumableArray(h);b[a]=!h[a],i(b)};return b.map(function(a,b){return/*#__PURE__*/_jsx(AccordionItem,_objectSpread(_objectSpread({open:h[b],onClick:function(){return j(b)}},a),{},{theme:e}),a.id||b)})};Accordion.propTypes={indexOpen:PropTypes.number,items:PropTypes.arrayOf(PropTypes.shape({id:PropTypes.string,title:PropTypes.node.isRequired,content:PropTypes.node.isRequired,icon:PropTypes.node})).isRequired,onClick:PropTypes.func,theme:PropTypes.oneOf(["light","dark"])},Accordion.defaultProps={indexOpen:-1,onClick:null,theme:Theme.LIGHT};export default Accordion;
@@ -0,0 +1 @@
1
+ import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import{cloneElement}from"react";import Body from"../../body";import Chevron from"../../chevron";import{Position,Size,Typography,Theme}from"../../common";import Option from"../../common/Option";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var AccordionItem=function(a){var b=a["aria-label"],c=a.id,d=a.title,e=a.content,f=a.onClick,g=a.open,h=a.icon,i=a.theme,j=useTheme(),k=j.isModern,l=h?/*#__PURE__*/cloneElement(h,{size:24}):null;return/*#__PURE__*/_jsxs("div",{id:c,className:classNames("np-accordion-item","np-accordion-item--".concat(i),l?"np-accordion-item--with-icon":null,{"np-accordion-item--open":g}),children:[/*#__PURE__*/_jsx(Option,{"aria-label":b,as:"button",media:l,title:d,button:/*#__PURE__*/_jsx(Chevron,{orientation:g?Position.TOP:Position.DOWN,size:k?Size.MEDIUM:Size.SMALL}),inverseMediaCircle:!1,onClick:f}),g&&/*#__PURE__*/_jsx(Body,{as:"span",type:Typography.BODY_LARGE,className:classNames("np-accordion-item__content","d-block",{"has-icon":h}),children:e})]})};AccordionItem.propTypes={"aria-label":PropTypes.string,content:PropTypes.node.isRequired,icon:PropTypes.node,id:PropTypes.string,open:PropTypes.bool.isRequired,onClick:PropTypes.func.isRequired,title:PropTypes.node.isRequired,theme:PropTypes.oneOf(["light","dark"])},AccordionItem.defaultProps={"aria-label":void 0,icon:null,id:null,theme:Theme.LIGHT};export default AccordionItem;
@@ -0,0 +1 @@
1
+ export{default}from"./AccordionItem";
@@ -0,0 +1 @@
1
+ export{default}from"./Accordion";
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["disabled","className","onClick","text","children"];import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import{forwardRef}from"react";import{jsx as _jsx}from"react/jsx-runtime";var ActionButton=/*#__PURE__*/forwardRef(function(a,b){var c=a.disabled,d=a.className,e=void 0===d?void 0:d,f=a.onClick,g=a.text,h=a.children,i=_objectWithoutProperties(a,_excluded);return/*#__PURE__*/_jsx("button",_objectSpread(_objectSpread({ref:b,type:"button",className:classNames("np-action-btn","np-text-body-default-bold",e),disabled:void 0!==c&&c,onClick:f},i),{},{children:h||g}))});export default ActionButton;
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"@testing-library/jest-dom";import{render,screen,userEvent}from"../test-utils";import ActionButton from".";import{jsx as _jsx}from"react/jsx-runtime";describe("ActionButton",function(){var a={children:"Personal profile",onClick:jest.fn()};describe("by default",function(){beforeEach(function(){render(/*#__PURE__*/_jsx(ActionButton,_objectSpread({},a)))}),it("renders the text",function(){expect(screen.getByText("Personal profile")).toBeInTheDocument()}),it("is not disabled",function(){expect(screen.getByRole("button")).toBeEnabled()}),it("renders the button",function(){expect(render(/*#__PURE__*/_jsx(ActionButton,_objectSpread({},a))).container).toMatchSnapshot()})}),describe("button attributes",function(){it("disables the button if disabled",function(){render(/*#__PURE__*/_jsx(ActionButton,_objectSpread(_objectSpread({},a),{},{disabled:!0}))),expect(screen.getByRole("button")).toBeDisabled()}),it("passes through custom classes if set",function(){render(/*#__PURE__*/_jsx(ActionButton,_objectSpread(_objectSpread({},a),{},{className:"catsarethebest"}))),expect(screen.getByRole("button")).toHaveClass("catsarethebest")})}),describe("onClick",function(){it("calls onClick when clicked",function(){var b=jest.fn();render(/*#__PURE__*/_jsx(ActionButton,_objectSpread(_objectSpread({},a),{},{onClick:b}))),userEvent.click(screen.getByRole("button")),expect(b).toHaveBeenCalledTimes(1)}),it("does not call onClick when clicked if disabled",function(){var b=jest.fn();render(/*#__PURE__*/_jsx(ActionButton,_objectSpread(_objectSpread({},a),{},{disabled:!0,onClick:b}))),userEvent.click(screen.getByRole("button")),expect(b).toHaveBeenCalledTimes(0)})}),describe("deprecated",function(){it("text prop",function(){var a=jest.fn();render(/*#__PURE__*/_jsx(ActionButton,{disabled:!0,text:"Text prop",onClick:a})),expect(screen.getByText("Text prop")).toBeInTheDocument()})})});
@@ -0,0 +1 @@
1
+ import{action}from"@storybook/addon-actions";import{boolean,text}from"@storybook/addon-knobs";import{Settings}from"@transferwise/icons";import ActionButton from"./ActionButton";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export var Variants=function(){var a=text("text","Button label");return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("p",{children:"Basic"}),/*#__PURE__*/_jsx("div",{className:"text-xs-center m-b-1",children:/*#__PURE__*/_jsx(ActionButton,{disabled:!1,onClick:function onClick(){return action("Clicked!")},children:a})}),/*#__PURE__*/_jsx("p",{children:"With Icon"}),/*#__PURE__*/_jsx("div",{className:"text-xs-center",children:/*#__PURE__*/_jsxs(ActionButton,{disabled:!1,onClick:function onClick(){return action("Clicked!")},children:[/*#__PURE__*/_jsx(Settings,{className:"m-r-1"}),a]})}),/*#__PURE__*/_jsx("p",{children:"Disabled"}),/*#__PURE__*/_jsx("div",{className:"text-xs-center",children:/*#__PURE__*/_jsxs(ActionButton,{disabled:!0,onClick:function onClick(){return action("Clicked!")},children:[/*#__PURE__*/_jsx(Settings,{className:"m-r-1"}),a]})})]})};export var Basic=function(){var a=boolean("disabled",!1),b=text("text","Button label"),c=boolean("with icon",!1);return/*#__PURE__*/_jsx("div",{className:"text-xs-center",children:/*#__PURE__*/_jsxs(ActionButton,{disabled:a,onClick:function onClick(){return action("Clicked!")},children:[c&&/*#__PURE__*/_jsx(Settings,{className:"m-r-1"}),b]})})};export default{title:"Actions/ActionButton",component:ActionButton};
@@ -0,0 +1 @@
1
+ export{default}from"./ActionButton";
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"core-js/modules/es.array.join.js";import classNames from"classnames";import ActionButton from"../actionButton";import Option from"../common/Option";import{jsx as _jsx}from"react/jsx-runtime";var ActionOption=function(a){var b=a.action,c=a.disabled,d=a.onClick,e=a.media,f=a.title,g=a.content,h=a.complex,i=a.className,j=a.showMediaAtAllSizes,k=a.showMediaCircle,l=a.isContainerAligned,m={media:e,title:f,content:g,complex:h,disabled:c,showMediaAtAllSizes:j,showMediaCircle:k,className:classNames("tw-action-option",i),isContainerAligned:l};return/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},m),{},{button:/*#__PURE__*/_jsx(ActionButton,{disabled:c,"aria-label":function getAriaLabel(){var a=[];return"string"==typeof f&&a.push(f),"string"==typeof b&&a.push(b),a.join(", ")||void 0}(),onClick:d,children:b})}))};export default ActionOption;
@@ -0,0 +1 @@
1
+ import{action}from"@storybook/addon-actions";import{text,boolean}from"@storybook/addon-knobs";import{FastFlag as FastFlagIcon}from"@transferwise/icons";import{Nudge}from"..";import ActionOption from"./ActionOption";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:ActionOption,title:"Option/ActionOption"};var Template=function(){var a=text("title","Action option"),b=text("content","Normally, the button and icon are vertically centered."),c=text("action","Action"),d=boolean("disabled",!1),e=boolean("showMediaAtAllSizes",!1),f=boolean("showMediaCircle",!1),g=boolean("isContainerAligned",!1);return/*#__PURE__*/_jsx(ActionOption,{action:c,media:/*#__PURE__*/_jsx(FastFlagIcon,{}),title:a,content:b,complex:!1,disabled:d,showMediaAtAllSizes:e,showMediaCircle:f,isContainerAligned:g,onClick:action("Button Clicked")})};export var Basic=function(){return/*#__PURE__*/_jsx(Template,{})};export var Multiple=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{})]})};export var WithContainerContent=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("h2",{className:"m-b-2",children:"Choose how to pay"}),/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Nudge,{className:"m-t-2",mediaName:"globe",title:"Text that is no longer than two lines.",link:"Link",href:"#",onClick:action("action clicked"),onDismiss:action("dismissed")})]})};
@@ -0,0 +1 @@
1
+ export{default}from"./ActionOption";
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _defineProperty from"@babel/runtime/helpers/defineProperty";var _deprecatedTypeMap,_deprecatedTypeMapMes;import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.array.concat.js";import"core-js/modules/es.array.includes.js";import"core-js/modules/es.string.includes.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{InfoCircle,Warning as AlertTriangle,CrossCircle,CheckCircle,Clock}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import{cloneElement,useState,useRef}from"react";import requiredIf from"react-required-if";import Body from"../body/Body";import{Sentiment,Size,Typography,Variant}from"../common";import CloseButton from"../common/closeButton";import Link from"../link";import StatusIcon from"../statusIcon";import{logActionRequiredIf,deprecated}from"../utilities";import InlineMarkdown from"./inlineMarkdown";import withArrow from"./withArrow";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var deprecatedTypeMap=(_deprecatedTypeMap={},_defineProperty(_deprecatedTypeMap,Sentiment.SUCCESS,Sentiment.POSITIVE),_defineProperty(_deprecatedTypeMap,Sentiment.INFO,Sentiment.NEUTRAL),_defineProperty(_deprecatedTypeMap,Sentiment.ERROR,Sentiment.NEGATIVE),_deprecatedTypeMap),Alert=function(a){var b,c=useTheme(),d=c.isModern,e=(b={},_defineProperty(b,Sentiment.POSITIVE,CheckCircle),_defineProperty(b,Sentiment.NEUTRAL,InfoCircle),_defineProperty(b,Sentiment.WARNING,AlertTriangle),_defineProperty(b,Sentiment.NEGATIVE,CrossCircle),_defineProperty(b,Sentiment.PENDING,Clock),b),f=useState(!1),g=_slicedToArray(f,2),h=g[0],i=g[1],j=a.arrow,k=a.action,l=a.children,m=a.className,n=a.icon,o=a.onDismiss,p=a.message,q=a.type,r=a.variant,s=useRef(null);if(j){var v=withArrow(Alert,j);return/*#__PURE__*/_jsx(v,_objectSpread({},a))}logActionRequired(a);var t=deprecatedTypeMap[q]||q,u=e[t];return/*#__PURE__*/_jsxs("div",{role:"alert",className:classNames("alert d-flex","alert-".concat(t),m),onTouchStart:function handleTouchStart(){return i(!0)},onTouchEnd:function handleTouchEnd(a){h&&k&&null!==s&&void 0!==s&&s.current&&!s.current.contains(a.target)&&("_blank"===(null===k||void 0===k?void 0:k.target)?window.top.open(k.href):window.top.location.assign(k.href)),i(!1)},onTouchMove:function handleTouchMove(){return i(!1)},children:[/*#__PURE__*/_jsxs("div",{className:classNames("alert__content","d-flex","flex-grow-1",r),"data-testid":r,children:[function(){return n?/*#__PURE__*/cloneElement(n,{size:24}):d?/*#__PURE__*/_jsx(StatusIcon,{size:Size.LARGE,sentiment:t}):/*#__PURE__*/_jsx(u,{size:24})}(),/*#__PURE__*/_jsxs("div",{className:"alert__message",children:[/*#__PURE__*/_jsx(Body,{as:"span",className:"d-block",type:Typography.BODY_LARGE,children:l||/*#__PURE__*/_jsx(InlineMarkdown,{children:p})}),k&&/*#__PURE__*/_jsx(Link,{href:k.href,className:"m-t-1","aria-label":k["aria-label"],target:k.target,type:Typography.LINK_LARGE,children:k.text})]})]}),o&&/*#__PURE__*/_jsx(CloseButton,{ref:s,size:24,className:"m-l-2",onClick:o})]})},deprecatedTypeMapMessage=(_deprecatedTypeMapMes={},_defineProperty(_deprecatedTypeMapMes,Sentiment.SUCCESS,"Sentiment.POSITIVE"),_defineProperty(_deprecatedTypeMapMes,Sentiment.INFO,"Sentiment.NEUTRAL"),_defineProperty(_deprecatedTypeMapMes,Sentiment.ERROR,"Sentiment.NEGATIVE"),_deprecatedTypeMapMes),deprecatedTypes=Object.keys(deprecatedTypeMap);function logActionRequired(a){var b=a.size,c=a.type;logActionRequiredIf("Alert no longer supports any possible variations in size. Please remove the `size` prop.",!!b),logActionRequiredIf("Alert has deprecated the ".concat(c," value for the `type` prop. Please update to ").concat(deprecatedTypeMapMessage[c],"."),deprecatedTypes.includes(c))}Alert.propTypes={/** An optional call to action to sit under the main body of the alert. If your label is short, use aria-label to provide more context */action:PropTypes.shape({"aria-label":PropTypes.string,href:PropTypes.string.isRequired,target:PropTypes.string,text:PropTypes.node.isRequired}),className:PropTypes.string,/** An optional icon. If not provided, we will default the icon to something appropriate for the type */icon:PropTypes.element,/** The main body of the alert. Accepts plain text and bold words specified with **double stars*/message:requiredIf(PropTypes.node,function(a){var b=a.children;return!b}),/** The presence of the onDismiss handler will trigger the visibility of the close button */onDismiss:PropTypes.func,/** The type dictates which icon and colour will be used */type:PropTypes.oneOf(["negative","neutral","positive","warning","info","error","success"]),variant:PropTypes.oneOf(["desktop","mobile"]),/** @deprecated no arrow for `Alert` component anymore, consider to use [`InlineAlert`](https://transferwise.github.io/neptune-web/components/alerts/InlineAlert) component */arrow:deprecated(PropTypes.oneOf(["up-left","up-center","up-right","down-left","down-center","down-right"]),{component:"Alert",expiryDate:new Date("03-01-2021")}),/** @deprecated use `message` property instead */children:deprecated(requiredIf(PropTypes.node,function(a){var b=a.message;return!b}),{component:"Alert",message:"You should now use the `message` prop. Be aware `message` only accepts plain text or text with **bold** markdown.",expiryDate:new Date("03-01-2021")}),/** @deprecated use `onDismiss` instead */dismissible:deprecated(PropTypes.bool,{component:"Alert",message:"The Alert will now be considered dismissible if an `onDismiss` hander is present.",expiryDate:new Date("03-01-2021")})},Alert.defaultProps={action:void 0,arrow:void 0,className:void 0,dismissible:void 0,icon:void 0,type:Sentiment.NEUTRAL,variant:Variant.DESKTOP};export default Alert;
@@ -0,0 +1 @@
1
+ export{default}from"./Alert";
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import PropTypes from"prop-types";import{MarkdownNodeType}from"../../common";import Markdown from"../../markdown";import{jsx as _jsx}from"react/jsx-runtime";var allowList=[MarkdownNodeType.STRONG],InlineMarkdown=function(a){return/*#__PURE__*/_jsx(Markdown,_objectSpread(_objectSpread({},a),{},{as:"span",allowList:allowList,blockList:void 0}))};InlineMarkdown.propTypes={children:PropTypes.string.isRequired,className:PropTypes.string},InlineMarkdown.defaultProps={className:void 0};export default InlineMarkdown;
@@ -0,0 +1 @@
1
+ export{default}from"./InlineMarkdown";
@@ -0,0 +1,2 @@
1
+ // TODO: consider to move this enum into component file once we migrate it on TypeScript or replace with some common enum
2
+ export var ArrowPosition;(function(a){a.TOP_LEFT="up-left",a.TOP="up-center",a.TOP_RIGHT="up-right",a.BOTTOM_LEFT="down-left",a.BOTTOM="down-center",a.BOTTOM_RIGHT="down-right"})(ArrowPosition||(ArrowPosition={}));
@@ -0,0 +1 @@
1
+ export{ArrowPosition as AlertArrowPosition}from"./alertArrowPositions";export{default}from"./withArrow";
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";import"core-js/modules/es.array.concat.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import PropTypes from"prop-types";import{ArrowPosition}from"./alertArrowPositions";import{jsx as _jsx}from"react/jsx-runtime";function withArrow(a,b){var c=function(c){return/*#__PURE__*/_jsx(a,_objectSpread(_objectSpread({},c),{},{className:classNames(c.className,arrowClasses(b)),arrow:void 0}))};return c.propTypes={className:PropTypes.string},c.defaultProps={className:void 0},c}function arrowClasses(a){if(a){var b=["arrow"],c=ArrowPosition.BOTTOM,d=ArrowPosition.BOTTOM_LEFT,e=ArrowPosition.BOTTOM_RIGHT,f=ArrowPosition.TOP,g=ArrowPosition.TOP_RIGHT,h=ArrowPosition.TOP_LEFT;switch(a){case c:return b.concat("arrow-bottom","arrow-center");case d:return b.concat("arrow-bottom","arrow-left");case e:return b.concat("arrow-bottom","arrow-right");case f:return b.concat("arrow-center");case g:return b.concat("arrow-right");case h:default:return b;}}return""}export default withArrow;
@@ -0,0 +1 @@
1
+ import classnames from"classnames";import PropTypes from"prop-types";import{Size,Theme}from"../common";import{AvatarType}from"./avatarTypes";import{jsx as _jsx}from"react/jsx-runtime";var Avatar=function(a){var b=a.backgroundColor,c=a.children,d=a.className,e=a.outlined,f=a.size,g=a.theme,h=a.type;return/*#__PURE__*/_jsx("div",{className:classnames("tw-avatar",d,"tw-avatar--".concat(f),"tw-avatar--".concat(h),"tw-avatar--".concat(g),{"tw-avatar--outlined":e,"np-text-title-body":h===AvatarType.INITIALS}),children:/*#__PURE__*/_jsx("div",{className:"tw-avatar__content",style:{backgroundColor:b||void 0},children:c})})};Avatar.propTypes={backgroundColor:PropTypes.string,children:PropTypes.node,className:PropTypes.string,outlined:PropTypes.bool,size:PropTypes.oneOf(["sm","md","lg"]),theme:PropTypes.oneOf(["light","dark"]),type:PropTypes.oneOf(["thumbnail","icon","emoji","initials"])},Avatar.defaultProps={backgroundColor:null,children:null,className:null,outlined:!1,size:Size.MEDIUM,theme:Theme.LIGHT,type:AvatarType.THUMBNAIL};export default Avatar;
@@ -0,0 +1,2 @@
1
+ // TODO: consider to move this enum into component file once we migrate it on TypeScript or replace with some common enum
2
+ export var AvatarType;(function(a){a.THUMBNAIL="thumbnail",a.ICON="icon",a.EMOJI="emoji",a.INITIALS="initials"})(AvatarType||(AvatarType={}));
@@ -0,0 +1 @@
1
+ export{AvatarType}from"./avatarTypes";export{default}from"./Avatar";
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["url","altText","statusIcon","children"];import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";import"core-js/modules/es.function.name.js";import"core-js/modules/es.array.join.js";import"core-js/modules/es.array.map.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.string.split.js";import"core-js/modules/es.array.slice.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{Person as ProfileIcon,Briefcase as BriefcaseIcon}from"@transferwise/icons";import PropTypes from"prop-types";import{useState,useEffect}from"react";import Avatar,{AvatarType}from"../avatar";import Badge from"../badge";import{ProfileType,Size,Sentiment}from"../common";import StatusIcon from"../statusIcon/StatusIcon";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";var OptionalBadge=function(a){var b=a.url,c=a.altText,d=a.statusIcon,e=a.children,f=_objectWithoutProperties(a,_excluded);return b?/*#__PURE__*/_jsx(Badge,_objectSpread(_objectSpread({badge:/*#__PURE__*/_jsx("img",{src:b,alt:c})},f),{},{children:e})):d?/*#__PURE__*/_jsx(Badge,_objectSpread(_objectSpread({badge:/*#__PURE__*/_jsx(StatusIcon,{sentiment:d,size:Size.SMALL})},f),{},{children:e})):e};OptionalBadge.propTypes={url:PropTypes.string,altText:PropTypes.string,statusIcon:PropTypes.oneOf([Sentiment.POSITIVE,Sentiment.NEGATIVE,Sentiment.NEUTRAL,Sentiment.WARNING,Sentiment.PENDING]),children:PropTypes.node.isRequired},OptionalBadge.defaultProps={url:void 0,altText:void 0,statusIcon:void 0};var AvatarWrapper=function(a){var b=a.url,c=a.profileType,d=a.badgeUrl,e=a.badgeAltText,f=a.badgeStatusIcon,g=a.name,h=a.avatarProps,i=a.badgeProps,j=useState(!1),k=_slicedToArray(j,2),l=k[0],m=k[1],n=c===ProfileType.BUSINESS;useEffect(function(){return m(!1)},[b]);return/*#__PURE__*/_jsx(OptionalBadge,_objectSpread(_objectSpread({url:d,altText:e,statusIcon:f},i),{},{children:/*#__PURE__*/_jsx(Avatar,_objectSpread({size:Size.MEDIUM},function getAvatarProps(){return b&&!l?_objectSpread({type:AvatarType.THUMBNAIL,children:/*#__PURE__*/_jsx("img",{src:b,alt:"avatar",onError:function onError(){return m(!0)}})},h):c?_objectSpread({type:AvatarType.ICON,children:n?/*#__PURE__*/_jsx(BriefcaseIcon,{size:"24"}):/*#__PURE__*/_jsx(ProfileIcon,{size:"24"})},h):g?_objectSpread({type:AvatarType.INITIALS,children:/*#__PURE__*/_jsx(_Fragment,{children:getInitials(g)})},h):_objectSpread({type:AvatarType.ICON,children:/*#__PURE__*/_jsx(ProfileIcon,{size:"24"})},h)}()))}))};function getInitials(a){var b=a.split(" ").map(function(a){return a[0]}).join("").toUpperCase();return 1===b.length?b[0]:b[0]+b.slice(-1)}AvatarWrapper.defaultProps={url:void 0,profileType:void 0,badgeUrl:void 0,badgeAltText:void 0,badgeStatusIcon:void 0,name:void 0,avatarProps:{},badgeProps:{}},AvatarWrapper.propTypes={url:PropTypes.string,profileType:PropTypes.oneOf([ProfileType.PERSONAL,ProfileType.BUSINESS]),badgeUrl:PropTypes.string,badgeAltText:PropTypes.string,badgeStatusIcon:PropTypes.oneOf([Sentiment.POSITIVE,Sentiment.NEGATIVE,Sentiment.NEUTRAL,Sentiment.WARNING,Sentiment.PENDING]),name:PropTypes.string,avatarProps:PropTypes.shape({}),badgeProps:PropTypes.shape({})};export default AvatarWrapper;
@@ -0,0 +1 @@
1
+ import AvatarWrapper from"./AvatarWrapper";export default AvatarWrapper;
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import classNames from"classnames";import{Size,Theme}from"../common";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Badge=function(a){var b,c=a.badge,d=a.className,e=void 0===d?void 0:d,f=a.size,g=void 0===f?Size.SMALL:f,h=a.border,i=void 0===h?Theme.LIGHT:h,j=a.children,k=classNames("tw-badge",(b={},_defineProperty(b,"tw-badge-border-".concat(i),i),_defineProperty(b,"tw-badge-".concat(g),g),b),e);return/*#__PURE__*/_jsxs("div",{className:k,children:[/*#__PURE__*/_jsx("div",{className:"tw-badge__children",children:j}),/*#__PURE__*/_jsx("div",{className:"tw-badge__content",children:c})]})};export default Badge;
@@ -0,0 +1 @@
1
+ export{default}from"./Badge";
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["as","type","className"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"core-js/modules/es.array.iterator.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.set.js";import"core-js/modules/es.string.iterator.js";import"core-js/modules/web.dom-collections.iterator.js";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";import classNames from"classnames";import{Typography}from"../common/propsValues/typography";import{jsx as _jsx}from"react/jsx-runtime";var DEFAULT_TYPE=Typography.BODY_DEFAULT,bodyTypes=new Set([Typography.BODY_DEFAULT,Typography.BODY_DEFAULT_BOLD,Typography.BODY_LARGE,Typography.BODY_LARGE_BOLD]);function Body(a){var b=a.as,c=void 0===b?"div":b,d=a.type,e=void 0===d?DEFAULT_TYPE:d,f=a.className,g=_objectWithoutProperties(a,_excluded),h=bodyTypes.has(e);return/*#__PURE__*/_jsx(c,_objectSpread(_objectSpread({},g),{},{className:classNames("np-text-".concat(h?e:DEFAULT_TYPE),f)}))}export default Body;
@@ -0,0 +1 @@
1
+ import{Typography}from"../common";import{render,screen}from"../test-utils";import Body from".";import{jsx as _jsx}from"react/jsx-runtime";describe("Body",function(){it("testing default state",function(){render(/*#__PURE__*/_jsx(Body,{children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("DIV"),expect(a).toHaveClass("np-text-".concat(Typography.BODY_DEFAULT))}),it("enforces tag via `as` prop",function(){render(/*#__PURE__*/_jsx(Body,{as:"p",children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("P"),expect(a).toHaveClass("np-text-".concat(Typography.BODY_DEFAULT))}),it("supports native HTML attrs",function(){render(/*#__PURE__*/_jsx(Body,{id:"test-id",role:"banner",children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a).toHaveAttribute("id","test-id"),expect(a).toHaveAttribute("role","banner")}),it("handles unsupported typography type",function(){render(/*#__PURE__*/_jsx(Body,{type:Typography.TITLE_SCREEN,children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("DIV"),expect(a).toHaveClass("np-text-".concat(Typography.BODY_DEFAULT))})});
@@ -0,0 +1 @@
1
+ import{Typography}from"../common/propsValues/typography";import Title from"../title";import Body from"./Body";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{component:Body,title:"Typography/Body"};export var Basic=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Body Large Bold"}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE_BOLD,children:["We\u2019re building the world's most ",/*#__PURE__*/_jsx("strong",{children:"international account"}),". We\u2019re building the world's most ",/*#__PURE__*/_jsx("b",{children:"international account"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE_BOLD,children:["\u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448 ",/*#__PURE__*/_jsx("strong",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),". \u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448"," ",/*#__PURE__*/_jsx("b",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE_BOLD,children:["\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("strong",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})," ","\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("b",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE_BOLD,children:["Wir bauen den internationalen ",/*#__PURE__*/_jsx("strong",{children:"Bericht der Welt auf"}),". Wir bauen den internationalen ",/*#__PURE__*/_jsx("b",{children:"Bericht der Welt auf"}),"."]})]}),/*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Body Default"}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT,children:["We\u2019re building the world's most ",/*#__PURE__*/_jsx("strong",{children:"international account"}),". We\u2019re building the world's most ",/*#__PURE__*/_jsx("b",{children:"international account"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT,children:["\u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448 ",/*#__PURE__*/_jsx("strong",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),". \u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448"," ",/*#__PURE__*/_jsx("b",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT,children:["\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("strong",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})," ","\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("b",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT,children:["Wir bauen den internationalen ",/*#__PURE__*/_jsx("strong",{children:"Bericht der Welt auf"}),". Wir bauen den internationalen ",/*#__PURE__*/_jsx("b",{children:"Bericht der Welt auf"}),"."]})]}),/*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Body Default Bold"}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,children:["We\u2019re building the world's most ",/*#__PURE__*/_jsx("strong",{children:"international account"}),". We\u2019re building the world's most ",/*#__PURE__*/_jsx("b",{children:"international account"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,children:["\u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448 ",/*#__PURE__*/_jsx("strong",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),". \u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448"," ",/*#__PURE__*/_jsx("b",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,children:["\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("strong",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})," ","\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("b",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,children:["Wir bauen den internationalen ",/*#__PURE__*/_jsx("strong",{children:"Bericht der Welt auf"}),". Wir bauen den internationalen ",/*#__PURE__*/_jsx("b",{children:"Bericht der Welt auf"}),"."]})]}),/*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Body Large"}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE,children:["We\u2019re building the world's most ",/*#__PURE__*/_jsx("strong",{children:"international account"}),". We\u2019re building the world's most ",/*#__PURE__*/_jsx("b",{children:"international account"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE,children:["\u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448 ",/*#__PURE__*/_jsx("strong",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),". \u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448"," ",/*#__PURE__*/_jsx("b",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE,children:["\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("strong",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})," ","\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("b",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE,children:["Wir bauen den internationalen ",/*#__PURE__*/_jsx("strong",{children:"Bericht der Welt auf"}),". Wir bauen den internationalen ",/*#__PURE__*/_jsx("b",{children:"Bericht der Welt auf"}),"."]})]}),/*#__PURE__*/_jsxs(Title,{type:Typography.TITLE_SUBSECTION,children:["Copy Example without ",/*#__PURE__*/_jsx("code",{children:"<Body />"})," component"]}),/*#__PURE__*/_jsx("p",{children:"Lorem ipsum dolor sit amet consectetur adipisicing elit. Explicabo saepe repellendus accusantium eveniet temporibus perspiciatis iure ut, pariatur nihil totam iusto, delectus, modi possimus soluta. Et iusto odio autem debitis!"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Copy Example without any HTML tag"}),"Lorem ipsum dolor sit amet consectetur adipisicing elit. Explicabo saepe repellendus accusantium eveniet temporibus perspiciatis iure ut, pariatur nihil totam iusto, delectus, modi possimus soluta. Et iusto odio autem debitis!"]})};
@@ -0,0 +1 @@
1
+ export{default}from"./Body";
@@ -0,0 +1,7 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["as","block","children","className","disabled","loading","priority","size","type"],_excluded2=["htmlType"];import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import{forwardRef}from"react";import{Size,ControlType,Priority}from"../common";import{typeClassMap,priorityClassMap}from"./classMap";import{establishNewPriority,establishNewType,logDeprecationNotices}from"./legacyUtils";/** @deprecated */import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Button=/*#__PURE__*/forwardRef(function(a,b){var c,d=a.as,e=a.block,f=void 0!==e&&e,g=a.children,h=a.className,i=a.disabled,j=a.loading,k=void 0!==j&&j,l=a.priority,m=void 0===l?Priority.PRIMARY:l,n=a.size,o=void 0===n?Size.MEDIUM:n,p=a.type,q=void 0===p?ControlType.ACCENT:p,r=_objectWithoutProperties(a,_excluded);logDeprecationNotices({size:o,type:q});// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
2
+ var s,t=establishNewType(q),u=establishNewPriority(m,q),v=classNames("btn btn-".concat(o),"np-btn np-btn-".concat(o),{"btn-loading":k,"btn-block np-btn-block":f},{disabled:i||k},// @ts-expect-error fix when refactor `typeClassMap` to TypeScript
3
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
4
+ typeClassMap[t],// @ts-expect-error fix when refactor `typeClassMap` to TypeScript
5
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
6
+ priorityClassMap[u],h),w=null!==(c=d)&&void 0!==c?c:"button";// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
7
+ if("button"===w){var x=r,y=x.htmlType,z=void 0===y?"button":y,A=_objectWithoutProperties(x,_excluded2);s=_objectSpread(_objectSpread({},A),{},{disabled:i||k,type:z})}else s=_objectSpread({},r);return/*#__PURE__*/_jsxs(w,_objectSpread(_objectSpread({ref:b,className:v},s),{},{children:[g,k&&/*#__PURE__*/_jsx("span",{className:classNames("btn-loader",{"m-l-2":!f})})]}))});export default Button;
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";var _typeClassMap,_priorityClassMap;import{ControlType,Priority}from"../common";export var typeClassMap=(_typeClassMap={},_defineProperty(_typeClassMap,ControlType.ACCENT,"btn-accent"),_defineProperty(_typeClassMap,ControlType.POSITIVE,"btn-positive"),_defineProperty(_typeClassMap,ControlType.NEGATIVE,"btn-negative"),_typeClassMap);export var priorityClassMap=(_priorityClassMap={},_defineProperty(_priorityClassMap,Priority.PRIMARY,"btn-priority-1"),_defineProperty(_priorityClassMap,Priority.SECONDARY,"btn-priority-2"),_defineProperty(_priorityClassMap,Priority.TERTIARY,"btn-priority-3"),_priorityClassMap);
@@ -0,0 +1 @@
1
+ export{default}from"./Button";
@@ -0,0 +1 @@
1
+ export{establishNewPriority,establishNewType,logDeprecationNotices}from"./legacyUtils";
@@ -0,0 +1,4 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";var _deprecatedTypeMap,_oldTypePriorityMap,_deprecatedTypeMapMes;import"core-js/modules/es.object.keys.js";import"core-js/modules/es.array.concat.js";import"core-js/modules/es.array.includes.js";import"core-js/modules/es.string.includes.js";import{ControlType,Priority,Size,Type}from"../../common";import{logActionRequiredIf}from"../../utilities";var deprecatedTypeMap=(_deprecatedTypeMap={},_defineProperty(_deprecatedTypeMap,Type.PRIMARY,ControlType.ACCENT),_defineProperty(_deprecatedTypeMap,Type.SECONDARY,ControlType.ACCENT),_defineProperty(_deprecatedTypeMap,Type.LINK,ControlType.ACCENT),_defineProperty(_deprecatedTypeMap,Type.PAY,ControlType.POSITIVE),_defineProperty(_deprecatedTypeMap,Type.DANGER,ControlType.NEGATIVE),_deprecatedTypeMap),oldTypePriorityMap=(_oldTypePriorityMap={},_defineProperty(_oldTypePriorityMap,Type.DANGER,Priority.SECONDARY),_defineProperty(_oldTypePriorityMap,Type.LINK,Priority.TERTIARY),_defineProperty(_oldTypePriorityMap,Type.SECONDARY,Priority.SECONDARY),_oldTypePriorityMap),deprecatedTypeMapMessage=(_deprecatedTypeMapMes={},_defineProperty(_deprecatedTypeMapMes,Type.DANGER,"Type.NEGATIVE"),_defineProperty(_deprecatedTypeMapMes,Type.LINK,"ControlType.ACCENT with priority Priority.TERTIARY"),_defineProperty(_deprecatedTypeMapMes,Type.PAY,"ControlType.POSITIVE"),_defineProperty(_deprecatedTypeMapMes,Type.PRIMARY,"ControlType.ACCENT"),_defineProperty(_deprecatedTypeMapMes,Type.SECONDARY,"ControlType.ACCENT with priority Priority.SECONDARY"),_deprecatedTypeMapMes),deprecatedTypes=Object.keys(deprecatedTypeMap);export var establishNewType=function(a){return deprecatedTypeMap[a]||a};export var establishNewPriority=function(a,b){var c=establishNewType(b);// The old SECONDARY and LINK types now map to priorities. If they're still using one of
2
+ // these old types, ignore whatever priority they've passed and use this instead.
3
+ return oldTypePriorityMap[b]?oldTypePriorityMap[b]:a===Priority.TERTIARY&&c!==ControlType.ACCENT?Priority.SECONDARY:a;// Only ControlType.ACCENT supports tertiary styles
4
+ };export var logDeprecationNotices=function(a){var b=a.size,c=a.type;logActionRequiredIf("Button has deprecated the `Size.EXTRA_SMALL` value for the `size` prop. Please use Size.SMALL instead.",b===Size.EXTRA_SMALL),logActionRequiredIf("Button has deprecated the ".concat(c," value for the `type` prop. Please update to ").concat(deprecatedTypeMapMessage[c],"."),deprecatedTypes.includes(c))};