@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
+ export{LanguageProvider}from"./LanguageProvider";
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["label","id","disabled","className","avatar","secondary"];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 PropTypes from"prop-types";import Body from"../body/Body";import{Typography}from"../common";import RadioButton from"../common/RadioButton";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Radio=function(a){var b=a.label,c=a.id,d=a.disabled,e=a.className,f=a.avatar,g=a.secondary,h=_objectWithoutProperties(a,_excluded),i=useTheme(),j=i.isModern;return/*#__PURE__*/_jsx("div",{className:classNames("radio np-radio",{"radio-lg":g,disabled:j&&d},e),children:/*#__PURE__*/_jsxs("label",{className:classNames({disabled:d}),htmlFor:c,children:[/*#__PURE__*/_jsx("span",{className:classNames(j?"m-r-2":"p-r-2","np-radio-button"),children:/*#__PURE__*/_jsx(RadioButton,_objectSpread({id:c,disabled:d},h))}),/*#__PURE__*/_jsxs(Body,{as:"span",type:g?Typography.BODY_LARGE_BOLD:Typography.BODY_DEFAULT,className:"np-radio__text",children:[b,g&&/*#__PURE__*/_jsx(Body,{as:"span",children:g})]}),f&&/*#__PURE__*/_jsx("span",{className:"np-radio__avatar m-l-auto",children:f})]})})};Radio.propTypes={avatar:PropTypes.element,checked:PropTypes.bool,disabled:PropTypes.bool,id:PropTypes.string,label:PropTypes.string.isRequired,name:PropTypes.string.isRequired,onChange:PropTypes.func.isRequired,secondary:PropTypes.string,value:PropTypes.oneOfType([PropTypes.number,PropTypes.string]),className:PropTypes.string},Radio.defaultProps={avatar:void 0,checked:!1,disabled:!1,id:null,secondary:null,value:"",className:void 0};export default Radio;
@@ -0,0 +1 @@
1
+ import Radio from"./Radio";export default Radio;
@@ -0,0 +1,2 @@
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 PropTypes from"prop-types";import{Component}from"react";import Radio from"../radio";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";var RadioGroup=/*#__PURE__*/function(a){function b(a){var d;return _classCallCheck(this,b),d=c.call(this,a),_defineProperty(_assertThisInitialized(d),"handleOnChange",function(a){var b=d.props.onChange;d.setState({selectedValue:a},b&&b(a))}),d.state={selectedValue:a.selectedValue},d}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"render",value:function render(){var a=this,b=this.props,c=b.radios,d=b.name,e=this.state.selectedValue;return c&&1<c.length?/*#__PURE__*/_jsx(_Fragment,{children:c.map(function(b,c){var f=b.id,g=b.avatar,h=b.value,i=b.label,j=b.disabled,k=b.secondary,l=b.readOnly;return/*#__PURE__*/_jsx(Radio// eslint-disable-next-line react/no-array-index-key
2
+ ,{id:f,value:h,label:i,name:d,disabled:j,checked:e===h,secondary:k,readOnly:l,avatar:g,onChange:function onChange(b){return a.handleOnChange(b)}},c)})}):null}}]),b}(Component);RadioGroup.propTypes={radios:PropTypes.arrayOf(PropTypes.shape({id:PropTypes.string,avatar:PropTypes.element,value:PropTypes.oneOfType([PropTypes.number,PropTypes.string]),secondary:PropTypes.string,label:PropTypes.string.isRequired,disabled:PropTypes.bool,readOnly:PropTypes.bool})).isRequired,onChange:PropTypes.func.isRequired,selectedValue:PropTypes.oneOfType([PropTypes.number,PropTypes.string]),name:PropTypes.string.isRequired},RadioGroup.defaultProps={selectedValue:null};export default RadioGroup;
@@ -0,0 +1 @@
1
+ export{default}from"./RadioGroup";
@@ -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 PropTypes from"prop-types";import Option from"../common/Option";import RadioButton from"../common/RadioButton";import{jsx as _jsx}from"react/jsx-runtime";var RadioOption=function(a){var b=a["aria-label"],c=a.media,d=a.title,e=a.content,f=a.id,g=a.name,h=a.checked,i=a.onChange,j=a.complex,k=a.disabled,l=a.value,m=a.showMediaCircle,n=a.showMediaAtAllSizes,o=a.isContainerAligned;return/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},{"aria-label":b,media:c,title:d,content:e,name:g,complex:j,disabled:k,showMediaCircle:m,showMediaAtAllSizes:n,isContainerAligned:o}),{},{button:/*#__PURE__*/_jsx(RadioButton,{id:f,name:g,checked:h,disabled:k,value:l,onChange:i})}))};RadioOption.propTypes={"aria-label":PropTypes.string,media:PropTypes.node,id:PropTypes.string.isRequired,name:PropTypes.string.isRequired,title:PropTypes.node.isRequired,content:PropTypes.node,checked:PropTypes.bool,onChange:PropTypes.func.isRequired,complex:PropTypes.bool,disabled:PropTypes.bool,value:PropTypes.string,showMediaCircle:PropTypes.bool,showMediaAtAllSizes:PropTypes.bool,isContainerAligned:PropTypes.bool},RadioOption.defaultProps={"aria-label":void 0,media:null,content:null,checked:!1,complex:!1,disabled:!1,showMediaCircle:!0,showMediaAtAllSizes:!1,isContainerAligned:!1,value:""};export default RadioOption;
@@ -0,0 +1 @@
1
+ export{default}from"./RadioOption";
@@ -0,0 +1,5 @@
1
+ import classNames from"classnames";import{jsx as _jsx}from"react/jsx-runtime";/**
2
+ *
3
+ * Neptune Web: https://transferwise.github.io/neptune-web/components/content/Section
4
+ *
5
+ */var Section=function(a){var b=a.children,c=a.className,d=a.withHorizontalPadding;return/*#__PURE__*/_jsx("div",{className:classNames("np-section",c,{"np-section--with-horizontal-padding":void 0!==d&&d}),children:b})};export default Section;
@@ -0,0 +1 @@
1
+ import{render,screen}from"../test-utils";import Section from".";import{jsx as _jsx}from"react/jsx-runtime";describe("Section",function(){it("can render children",function(){render(/*#__PURE__*/_jsx(Section,{children:"Children here"})),expect(screen.getByText("Children here")).toBeInTheDocument()})});
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{FastFlag as FastFlagIcon}from"@transferwise/icons";import{useState}from"react";import Accordion from"../accordion";import Card from"../card";import Header from"../header";import NavigationOption from"../navigationOption";import Section from"./Section";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:Section,title:"Other/Section"};export var Basic=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Section,{children:"Section 1 content"}),/*#__PURE__*/_jsx(Section,{children:"Section 2 content"})]})};export var WithHeader=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(Section,{children:[/*#__PURE__*/_jsx(Header,{title:"Section 1 title"}),"Section 1 content"]}),/*#__PURE__*/_jsxs(Section,{children:[/*#__PURE__*/_jsx(Header,{title:"Section 2 title"}),"Section 2 content"]})]})};export var withAccordion=function(){var a=[{id:"Item 1",title:"If you have a deadline, set up your transfer early",content:"Most large transfers take around 2\u20134 working days from start to finish. So set up your transfer early if you have a deadline coming up.",icon:/*#__PURE__*/_jsx(FastFlagIcon,{size:24})},{id:"Item 2",title:"Have documents on hand to speed things up",content:"When you set up your transfer, we might ask for documents that show where your money comes from. Documents you might need (opens in a new tab)",icon:/*#__PURE__*/_jsx(FastFlagIcon,{size:24})},{id:"Item 3",title:"Lorem ipsum",content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed scelerisque velit nec ex rutrum efficitur sit amet at enim. Nam a neque magna. Nullam est urna, dignissim nec erat id, euismod aliquet nulla.",icon:/*#__PURE__*/_jsx(FastFlagIcon,{size:24})}];return/*#__PURE__*/_jsxs(Section,{children:[/*#__PURE__*/_jsx(Header,{title:"Section with accordion"}),/*#__PURE__*/_jsx(Accordion,{items:a,indexOpen:0})]})};export var WithCards=function(){var a=useState(null),b=_slicedToArray(a,2),c=b[0],d=b[1],e=function(a){return c===a?d(null):void d(a)};return/*#__PURE__*/_jsxs(Section,{children:[/*#__PURE__*/_jsx(Header,{title:"Section with cards"}),/*#__PURE__*/_jsx(Card,{title:"What's in the box?!",details:"Click me to reveal.",icon:/*#__PURE__*/_jsx(FastFlagIcon,{size:24}),isExpanded:0===c,onClick:function onClick(){return e(0)},children:/*#__PURE__*/_jsx("div",{children:"Hello there!"})}),/*#__PURE__*/_jsx(Card,{title:"What's in the box?!",details:"Click me to reveal.",icon:/*#__PURE__*/_jsx(FastFlagIcon,{size:24}),isExpanded:1===c,onClick:function onClick(){return e(1)},children:/*#__PURE__*/_jsx("div",{children:"Hello there!"})})]})};export var WithNavigationOptions=function(){return/*#__PURE__*/_jsxs(Section,{children:[/*#__PURE__*/_jsx(Header,{title:"Section with options"}),/*#__PURE__*/_jsx(NavigationOption,{title:"Option 1",onClick:function onClick(){return alert("Option 1")}}),/*#__PURE__*/_jsx(NavigationOption,{title:"Option 2",onClick:function onClick(){return alert("Option 2")}})]})};
@@ -0,0 +1 @@
1
+ export{default}from"./Section";
@@ -0,0 +1,16 @@
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{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import{useState,useEffect,useRef,useMemo}from"react";import{useIntl}from"react-intl";import Button from"../button";import Chevron from"../chevron";import{Position,getSimpleRandomId}from"../common";import BottomSheet from"../common/bottomSheet";import{stopPropagation}from"../common/domHelpers";import{useLayout}from"../common/hooks";import KeyCodes from"../common/keyCodes";import Panel from"../common/panel";import Drawer from"../drawer";import messages from"./Select.messages";import Option from"./option";import SearchBox from"./searchBox";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var DEFAULT_SEARCH_VALUE="",DEFAULT_OPTIONS_PAGE_SIZE=1e3,includesString=function(a,b){return a.toLowerCase().includes(b.toLowerCase())};function defaultFilterFunction(a,b){if(isPlaceholderOption(a))return!0;var c=a.label,d=a.note,e=a.secondary,f=a.currency,g=a.searchStrings;return!!c&&includesString(c,b)||!!d&&includesString(d,b)||!!e&&includesString(e,b)||!!f&&includesString(f,b)||!!g&&g.some(function(a){return includesString(a,b)})}function isActionableOption(a){return!a.header&&!a.separator&&!a.disabled}function isHeaderOption(a){return null!=a&&"header"in a}function isSparatorOption(a){return null!=a&&"separator"in a}/**
2
+ * No option or placeholder option is selected
3
+ */var DEFAULT_SELECTED_OPTION=null;function isPlaceholderOption(a){return a===DEFAULT_SELECTED_OPTION||"placeholder"in a}export default function Select(a){function b(){if(null!=W){var a=na().filter(isActionableOption);0<a.length&&e(a[W])}}function c(a){var b,c=na().filter(isActionableOption),d=c.reduce(function(a,b,c){return null==a?k(v,b)?c:null:a},null),e=null!==(b=Y.current)&&void 0!==b?b:-1,f=e;-1===e&&(null==d?X(0):f=d);var g=f+a,h=Math.max(Math.min(0,c.length-1),g);X(h)}function d(a){return function(b){stopPropagation(b),e(a)}}function e(a){x(isPlaceholderOption(a)?DEFAULT_SELECTED_OPTION:a),pa()}function f(){var a,b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},c=b.className,d=classNames(M("np-dropdown-menu"),(a={},_defineProperty(a,M("np-dropdown-menu-desktop"),!ma),_defineProperty(a,M("np-dropdown-menu-".concat(r)),!ma&&!ga),a),M(c)),e=na();return/*#__PURE__*/_jsxs("ul",_objectSpread(_objectSpread({ref:ea,id:ja,role:"listbox",tabIndex:"-1",className:d},G),{},{children:[!o&&!fa&&!!m&&/*#__PURE__*/_jsx(h,{}),fa&&/*#__PURE__*/_jsx(SearchBox,{ref:ba,id:ka,classNames:E,value:C||S,placeholder:D||J(messages.searchPlaceholder),onChange:oa,onClick:stopPropagation}),e.slice(0,_).map(qa),_<e.length&&/*#__PURE__*/_jsx(g,{})]}))}function g(){function a(a){stopPropagation(a),aa(_+DEFAULT_OPTIONS_PAGE_SIZE)}return/*#__PURE__*/ (/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */_jsx("li",{className:classNames(M("clickable"),M("border-bottom"),M("show-more")),onClick:a,onKeyPress:a,children:/*#__PURE__*/_jsx("a",{children:"..."})}))}function h(){var a={placeholder:m};return/*#__PURE__*/ (/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */_jsx("li",{className:classNames(M("clickable"),M("border-bottom")),onClick:d(a),onKeyPress:d(a),children:/*#__PURE__*/_jsx("a",{children:m})}))}// eslint-disable-next-line react/prop-types
4
+ function i(){return/*#__PURE__*/_jsx("li",{className:M("np-separator"),"aria-hidden":!0})}// eslint-disable-next-line react/prop-types
5
+ function j(a){var b=a.children;return/*#__PURE__*/_jsx("li",{// eslint-disable-line jsx-a11y/no-noninteractive-element-interactions
6
+ className:classNames(M("np-dropdown-header"),M("np-text-title-group")),onClick:stopPropagation,onKeyPress:stopPropagation,children:b})}function k(a,b){return(null===a||void 0===a?void 0:a.value)===(null===b||void 0===b?void 0:b.value)}function l(a){return na().reduce(function(b,c,d){return d<a&&isActionableOption(c)?b+1:b},0)}var m=a.placeholder,n=a.id,o=a.required,p=a.disabled,q=a.inverse,r=a.dropdownWidth,t=a.size,u=a.block,v=a.selected,w=a.search,x=a.onChange,y=a.onFocus,z=a.onBlur,A=a.options,B=a.onSearchChange,C=a.searchValue,D=a.searchPlaceholder,E=a.classNames,F=a.dropdownUp,G=a.dropdownProps,H=a.buttonProps,I=useIntl(),J=I.formatMessage,K=useTheme(),L=K.isModern,M=function(a){return E[a]||a},s=useState(!1),N=_slicedToArray(s,2),O=N[0],P=N[1],Q=useState(DEFAULT_SEARCH_VALUE),R=_slicedToArray(Q,2),S=R[0],T=R[1],U=useState(null),V=_slicedToArray(U,2),W=V[0],X=V[1],Y=useRef(),Z=useState(DEFAULT_OPTIONS_PAGE_SIZE),$=_slicedToArray(Z,2),_=$[0],aa=$[1],ba=useRef(null),ca=useRef(null),da=useRef(null),ea=useRef(null),fa=!!B||!!w,ga=null==r,ha=useMemo(function(){return getSimpleRandomId("np-select-")},[]),ia=n||ha,ja="".concat(ia,"-listbox"),ka="".concat(ia,"-searchbox"),la=useLayout(),ma=la.isMobile,na=function(){return w&&S?A.filter(function(a){return isActionableOption(a)&&!isPlaceholderOption(a)}).filter(function(a){return"function"==typeof w?w(a,S):defaultFilterFunction(a,S)}):A},oa=function(a){aa(DEFAULT_OPTIONS_PAGE_SIZE),T(a.target.value),B&&B(a.target.value)};useEffect(function(){Y.current=W,O&&(!ma||S)&&(fa&&!!ba.current&&ba.current.focus(),!fa&&ea.current&&ea.current.focus())},[O,S,fa,ma,W]);var pa=function(){P(!1),X(null),da.current&&da.current.focus()},qa=function(a,b){var c,e=a;if(isSparatorOption(e)&&null!==e&&void 0!==e&&e.separator)return/*#__PURE__*/_jsx(i,{},b);var f=a;if(isHeaderOption(f)&&f.header)return/*#__PURE__*/_jsx(j,{children:f.header},b);var g=k(v,a),h=a,m=!h.disabled&&W===l(b),n=classNames(M("np-dropdown-item"),h.disabled?[M("disabled")]:M("clickable"),(c={},_defineProperty(c,M("active"),g),_defineProperty(c,M("np-dropdown-item--focused"),m),c)),o=h.disabled?stopPropagation:d(h);return/*#__PURE__*/ (/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */_jsx("li",{"aria-selected":g,"aria-disabled":a.disabled,role:"option",tabIndex:"-1",className:n,onClick:o,onKeyPress:o,children:/*#__PURE__*/_jsx("a",{disabled:h.disabled,children:/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},h),{},{classNames:E}))})},b))},ra=!!A.length;return O&&(C||S)&&(ra&&null==W&&X(0),!ra&&null!=W&&X(null)),/*#__PURE__*/_jsxs("div",{// eslint-disable-line jsx-a11y/no-static-element-interactions
7
+ ref:ca,className:classNames(M("np-select"),u?M("btn-block"):null,M("btn-group")),onKeyDown:function handleKeyDown(a){switch(a.keyCode){case KeyCodes.UP:case KeyCodes.DOWN:O?c(a.keyCode===KeyCodes.UP?-1:1):P(!0),stopPropagation(a);break;case KeyCodes.SPACE:a.target!==ba.current&&(O?b():P(!0),stopPropagation(a));break;case KeyCodes.ENTER:O?b():P(!0),stopPropagation(a);break;case KeyCodes.ESCAPE:pa(),stopPropagation(a);break;case KeyCodes.TAB:O&&b();break;default:}},onTouchMove:function handleTouchStart(a){a.currentTarget===a.target&&O&&pa()},onFocus:function handleOnFocus(a){y&&y(a)},onBlur:function handleOnBlur(a){var b=a.nativeEvent;if(b){var c=b.relatedTarget,d=a.currentTarget;if(d&&c&&d.contains(c))return}z&&z(a)},children:[/*#__PURE__*/_jsxs(Button,_objectSpread(_objectSpread({ref:da,id:ia,block:u,size:t,htmlType:"button",className:classNames(M("np-dropdown-toggle"),M("np-text-body-large"),q?M("np-dropdown-toggle-navy"):null)// reset Button's styles
8
+ ,type:null,priority:null,disabled:p,role:"combobox","aria-controls":ja,"aria-expanded":O,"aria-autocomplete":"none",onClick:function handleOnClick(){P(!0)}},H),{},{children:[v?/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},v),{},{classNames:E,selected:!0})):/*#__PURE__*/_jsx("span",{className:M("form-control-placeholder"),children:m}),/*#__PURE__*/_jsx(Chevron// disabled={disabled}
9
+ ,{className:classNames(M("tw-icon"),M("tw-chevron-up-icon"),M("tw-chevron"),M("bottom"),M("np-select-chevron"))})]})),ma?fa?/*#__PURE__*/_jsx(Drawer,{open:O,headerTitle:D||J(messages.searchPlaceholder),onClose:pa,children:f()}):/*#__PURE__*/_jsx(BottomSheet,{open:O,onClose:pa,children:f({className:L?"":"p-a-1"})}):/*#__PURE__*/_jsx(Panel,{open:O,flip:!1,altAxis:!0,anchorRef:ca,anchorWidth:ga,position:F?Position.TOP:Position.BOTTOM,onClose:pa,children:f({className:"p-a-1"})})]})}Select.propTypes={placeholder:PropTypes.string,id:PropTypes.string,required:PropTypes.bool,disabled:PropTypes.bool,inverse:PropTypes.bool,dropdownRight:PropTypes.oneOf(["xs","sm","md","lg","xl"]),dropdownWidth:PropTypes.oneOf(["sm","md","lg"]),size:PropTypes.oneOf(["sm","md","lg"]),block:PropTypes.bool,selected:PropTypes.shape({value:PropTypes.any.isRequired,label:PropTypes.node,icon:PropTypes.node,currency:PropTypes.string,note:PropTypes.node,secondary:PropTypes.node}),/**
10
+ * Search toggle
11
+ * if `true` default search functionality being enabled (not case sensitive search in option labels & currency props)
12
+ * if `function` you can define your own search function to implement custom search experience. This search function used while filtering the options array. The custom search function takes two parameters. First is the option the second is the keyword.
13
+ */search:PropTypes.oneOfType([PropTypes.bool,PropTypes.func]),onChange:PropTypes.func.isRequired,onFocus:PropTypes.func,onBlur:PropTypes.func,options:PropTypes.arrayOf(PropTypes.shape({value:PropTypes.any,label:PropTypes.node,header:PropTypes.node,icon:PropTypes.node,currency:PropTypes.string,note:PropTypes.node,secondary:PropTypes.node,separator:PropTypes.bool,disabled:PropTypes.bool,searchStrings:PropTypes.arrayOf(PropTypes.string)})).isRequired,/**
14
+ * To have full control of your search value and response use `onSearchChange` function combined with `searchValue` and custom filtering on the options array.
15
+ * DO NOT USE TOGETHER WITH `search` PROPERTY
16
+ */onSearchChange:PropTypes.func,searchValue:PropTypes.string,searchPlaceholder:PropTypes.string,classNames:PropTypes.objectOf(PropTypes.string),dropdownUp:PropTypes.bool,buttonProps:PropTypes.object,dropdownProps:PropTypes.object},Select.defaultProps={id:void 0,placeholder:void 0,size:"md",dropdownRight:null,dropdownWidth:null,inverse:!1,required:!1,disabled:!1,block:!0,selected:null,onFocus:null,onBlur:null,onSearchChange:void 0,search:!1,searchValue:"",searchPlaceholder:void 0,classNames:{},dropdownUp:!1,buttonProps:{},dropdownProps:{}};
@@ -0,0 +1 @@
1
+ import{defineMessages}from"react-intl";export default defineMessages({searchPlaceholder:{id:"neptune.Select.searchPlaceholder"}});
@@ -0,0 +1 @@
1
+ import Select from"./Select";export default Select;
@@ -0,0 +1,2 @@
1
+ // Option.tsx NEW
2
+ import{useTheme}from"@wise/components-theming";import{cloneElement}from"react";import Body from"../../body";import{Typography}from"../../common";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 Option(a){var b=a.label,c=a.currency,d=void 0===c?"":c,e=a.note,f=void 0===e?"":e,g=a.secondary,h=void 0===g?"":g,i=a.icon,j=a.classNames,k=void 0===j?{}:j,l=a.selected,m=void 0!==l&&l,n=useTheme(),o=n.isModern,p=function(a){return a.map(function(a){return k[a]||a}).join(" ")},q=d?"".concat(p(["currency-flag","currency-flag-".concat(d.toLowerCase()),"".concat(m?"hidden-xs":"")])):void 0,r=f?"".concat(p(["d-inline-flex align-items-center"])):void 0,s=i?/*#__PURE__*/cloneElement(i,{size:24,className:"".concat(p(["tw-icon","".concat(m&&d?"hidden-xs":"")]))}):d&&/*#__PURE__*/_jsx("i",{className:q}),t=/*#__PURE__*/_jsxs(Body,{as:"span",type:Typography.BODY_LARGE,className:r,children:[b,f&&/*#__PURE__*/_jsx(Body,{as:"span",className:o?"m-l-1":"m-l-1 body-2",children:f})]}),u=h&&/*#__PURE__*/_jsx(Body,{as:"span",className:o?"text-ellipsis":"text-ellipsis body-2",children:h});return s&&u?/*#__PURE__*/_jsxs("div",{className:"d-inline-flex",children:[/*#__PURE__*/_jsx("div",{className:"d-flex flex-column justify-content-center",children:s}),/*#__PURE__*/_jsxs("div",{className:"d-flex flex-column justify-content-center",children:[t,u]})]}):/*#__PURE__*/_jsxs(_Fragment,{children:[s,t,u]})}export default Option;
@@ -0,0 +1 @@
1
+ import Option from"./Option";export default Option;
@@ -0,0 +1 @@
1
+ import{Search as SearchIcon}from"@transferwise/icons";import classnames from"classnames";import{forwardRef}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var SearchBox=/*#__PURE__*/forwardRef(function(a,b){var c=a.id,d=a.classNames,e=void 0===d?{}:d,f=a.onChange,g=a.onClick,h=a.placeholder,i=void 0===h?void 0:h,j=a.value,k=void 0===j?"":j,l=function(a){return e[a]||a};return/*#__PURE__*/_jsx("li",{className:l("border-bottom"),children:/*#__PURE__*/_jsx("a",{className:"".concat(l("np-select-filter-link")," ").concat(l("p-a-0")),children:/*#__PURE__*/_jsxs("div",{className:l("input-group"),children:[/*#__PURE__*/_jsx("span",{className:l("input-group-addon"),children:/*#__PURE__*/_jsx(SearchIcon,{className:classnames(l("tw-icon"),l("tw-icon-search"))})}),/*#__PURE__*/_jsx("input",{ref:b,id:c,type:"text",className:classnames(l("np-select-filter"),l("form-control")),placeholder:i,value:k,spellCheck:"false",onChange:f,onClick:g})]})})})});export default SearchBox;
@@ -0,0 +1 @@
1
+ export{default}from"./SearchBox";
@@ -0,0 +1,5 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import classNames from"classnames";import PropTypes from"prop-types";import{forwardRef,useRef}from"react";import{Breakpoint}from"../common";import{useClientWidth}from"../common/hooks";import{jsx as _jsx}from"react/jsx-runtime";var Layout={COLUMN:"COLUMN"},SizeSwapper=/*#__PURE__*/forwardRef(function(a,b){var c=a.items,d=a.inline,e=useRef(null),f=useClientWidth({ref:b||e}),g=_slicedToArray(f,1),h=g[0];if(!c||0===c.length)return null;// If all breakpoints are specified and clientWidth never > breakpoint itemsToRender can be undefined.
2
+ // Do not use deconstruct here to get items and layout.
3
+ var i=[];// Always return parent container even if there are no items to display to
4
+ // keep the ref on DOM and let clientWidth be calculated properly.
5
+ return h?i=c.filter(function(a){var b=a.breakpoint,c=void 0===b?0:b;return h>=c}).pop():i.items=c.map(function(a){var b=a.items;return Object.values(b)}),/*#__PURE__*/_jsx("div",{ref:e,className:classNames("np-size-swapper",{"d-flex":!d,"d-inline-flex":d,"flex-column":i&&i.layout===Layout.COLUMN,"flex-wrap":i&&i.wrap}),style:{visibility:h?"visible":"hidden"},children:i&&i.items})});SizeSwapper.Breakpoint=Breakpoint,SizeSwapper.Layout=Layout,SizeSwapper.propTypes={inline:PropTypes.bool,/** List of items that will appear at the specified breakpoint and presented in row or columns depending on layout */items:PropTypes.arrayOf(PropTypes.shape({items:PropTypes.arrayOf(PropTypes.element),breakpoint:PropTypes.number,layout:PropTypes.oneOf([SizeSwapper.Layout.COLUMN]),wrap:PropTypes.bool})).isRequired},SizeSwapper.defaultProps={inline:!1};export default SizeSwapper;
@@ -0,0 +1 @@
1
+ export{default}from"./SizeSwapper";
@@ -0,0 +1,2 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["children","className","open","position","showSlidingPanelBorder","slidingPanelPositionFixed"];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{forwardRef}from"react";import CSSTransition from"react-transition-group/CSSTransition";import{jsx as _jsx}from"react/jsx-runtime";export var EXIT_ANIMATION=350;var SlidingPanel=/*#__PURE__*/forwardRef(function(a,b){var c=a.children,d=a.className,e=a.open,f=a.position,g=a.showSlidingPanelBorder,h=a.slidingPanelPositionFixed,i=_objectWithoutProperties(a,_excluded);return/*#__PURE__*/_jsx(CSSTransition,_objectSpread(_objectSpread({},i),{},{in:e// Wait for animation to finish before unmount.
2
+ ,timeout:{enter:0,exit:EXIT_ANIMATION},classNames:classNames("sliding-panel--open-".concat(f),g&&"sliding-panel--border-".concat(f),{"sliding-panel--fixed":h},"sliding-panel"),appear:!0,unmountOnExit:!0,children:/*#__PURE__*/_jsx("div",{ref:b,className:classNames("sliding-panel","sliding-panel--open-".concat(f),d),children:c})}))});SlidingPanel.propTypes={children:PropTypes.node,className:PropTypes.string,open:PropTypes.bool,position:PropTypes.oneOf(["top","bottom","left","right"]),showSlidingPanelBorder:PropTypes.bool,slidingPanelPositionFixed:PropTypes.bool},SlidingPanel.defaultProps={children:null,className:void 0,open:!1,position:"left",showSlidingPanelBorder:!1,slidingPanelPositionFixed:!1};export default SlidingPanel;
@@ -0,0 +1 @@
1
+ export{default}from"./SlidingPanel";
@@ -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 PropTypes from"prop-types";import{Component}from"react";import CSSTransition from"react-transition-group/CSSTransition";import ActionButton from"../actionButton";import Body from"../body";import{Theme}from"../common";import{DirectionContext}from"../provider/direction";import withNextPortal from"../withNextPortal/withNextPortal";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export var CSS_TRANSITION_DURATION=400;export var Snackbar=/*#__PURE__*/function(a){function b(){var a;return _classCallCheck(this,b),a=c.call(this),_defineProperty(_assertThisInitialized(a),"setLeaveTimeout",function(){var b=a.props.timeout;a.timeout=setTimeout(function(){a.setState({visible:!1})},b)}),a.state={visible:!1,text:""},a}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"componentWillUnmount",value:function componentWillUnmount(){clearTimeout(this.timeout),clearTimeout(this.transitionTimeout)}},{key:"shouldComponentUpdate",value:function shouldComponentUpdate(a,b){return!!a.text&&(a.timestamp!==this.props.timestamp||b.visible!==this.state.visible||b.text!==this.state.text)}},{key:"componentDidUpdate",value:function componentDidUpdate(a){var b=this,c=this.props,d=c.action,e=c.text,f=c.theme,g=c.timestamp;a.text?a.timestamp!==g&&(clearTimeout(this.timeout),this.state.visible?this.setState({visible:!1},function(){b.transitionTimeout=setTimeout(function(){b.setState({visible:!0,action:d,text:e,theme:f}),b.setLeaveTimeout()},CSS_TRANSITION_DURATION)}):(this.setState({visible:!0,action:d,text:e,theme:f}),this.setLeaveTimeout())):this.setState({visible:!0,action:d,text:e,theme:f},function(){b.setLeaveTimeout()})}},{key:"render",value:function render(){var a=this.state,b=a.action,c=a.text,d=a.theme,e=a.visible,f=this.props.timeout;return/*#__PURE__*/_jsx("div",{className:"snackbar",children:/*#__PURE__*/_jsx(CSSTransition,{in:e,classNames:"snackbar__text-container",timeout:{appear:0,enter:f,exit:CSS_TRANSITION_DURATION},unmountOnExit:!0,children:/*#__PURE__*/_jsxs(Body,{as:"span",className:"snackbar__text snackbar__text--".concat(d),children:[c,b?/*#__PURE__*/_jsx(ActionButton,{className:"snackbar__text__action",onClick:b.onClick,children:b.label}):null]})})})}}]),b}(Component);Snackbar.contextType=DirectionContext,Snackbar.propTypes={action:PropTypes.shape({label:PropTypes.string.isRequired,onClick:PropTypes.func.isRequired}),text:PropTypes.node.isRequired,theme:PropTypes.oneOf(["light","dark"]),timeout:PropTypes.number.isRequired,timestamp:PropTypes.number.isRequired},Snackbar.defaultProps={action:null,theme:Theme.LIGHT};export default withNextPortal(Snackbar);
@@ -0,0 +1 @@
1
+ import{createContext}from"react";export var SnackbarContext=/*#__PURE__*/createContext();export var SnackbarConsumer=SnackbarContext.Consumer;
@@ -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 PropTypes from"prop-types";import{Component}from"react";import SnackbarPortal from"./Snackbar";import{SnackbarContext}from"./SnackbarContext";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var SnackbarProvider=/*#__PURE__*/function(a){function b(){var a;return _classCallCheck(this,b),a=c.call(this),_defineProperty(_assertThisInitialized(a),"create",function(b){var c=b.action,d=b.text,e=b.theme;a.setState({action:c,text:d,theme:e,timestamp:Date.now()})}),a.state={text:"",timestamp:0},a}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"render",value:function render(){var a=this.state,b=a.action,c=a.text,d=a.theme,e=a.timestamp;return/*#__PURE__*/_jsxs(SnackbarContext.Provider,{value:{createSnackbar:this.create},children:[/*#__PURE__*/_jsx(SnackbarPortal,{action:b,text:c,timestamp:e,timeout:this.props.timeout,theme:d}),this.props.children]})}}]),b}(Component);SnackbarProvider.propTypes={children:PropTypes.node.isRequired,timeout:PropTypes.number},SnackbarProvider.defaultProps={timeout:4500};export default SnackbarProvider;
@@ -0,0 +1 @@
1
+ export{default as Snackbar}from"./Snackbar";
@@ -0,0 +1 @@
1
+ import{useContext}from"react";import{SnackbarContext}from"./SnackbarContext";function useSnackbar(){var a=useContext(SnackbarContext),b=a.createSnackbar;return b}export default useSnackbar;
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import{Info,Alert,Cross,Check,ClockBorderless}from"@transferwise/icons";import classNames from"classnames";import{Sentiment}from"../common";import{jsx as _jsx}from"react/jsx-runtime";var StatusIcon=function(a){var b,c=a.sentiment,d=void 0===c?Sentiment.NEUTRAL:c,e=a.size,f=(b={},_defineProperty(b,Sentiment.POSITIVE,Check),_defineProperty(b,Sentiment.NEUTRAL,Info),_defineProperty(b,Sentiment.WARNING,Alert),_defineProperty(b,Sentiment.NEGATIVE,Cross),_defineProperty(b,Sentiment.PENDING,ClockBorderless),_defineProperty(b,Sentiment.INFO,Info),_defineProperty(b,Sentiment.ERROR,Cross),_defineProperty(b,Sentiment.SUCCESS,Check),b),g=d===Sentiment.WARNING||d===Sentiment.PENDING?"dark":"light",h=f[d];return/*#__PURE__*/_jsx("span",{"data-testid":"status-icon",className:classNames("status-circle","status-circle-"+e,d),children:/*#__PURE__*/_jsx(h,{className:classNames("status-icon",g)})})};export default StatusIcon;
@@ -0,0 +1 @@
1
+ export{default}from"./StatusIcon";
@@ -0,0 +1 @@
1
+ import classNames from"classnames";import PropTypes from"prop-types";import Body from"../body/Body";import{Position}from"../common";import{useDirection}from"../common/hooks";import Tooltip from"../tooltip";import{isTouchDevice}from"./deviceDetection";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function clamp(a,b,c){return Math.max(Math.min(b,c),a)}/* eslint-disable react/no-array-index-key */var Stepper=function(a){var b=a.steps,c=a.activeStep,d=a.className,e=useDirection(),f=e.isRTL;if(0===b.length)return null;var g=clamp(0,b.length-1,c),h=1/(b.length-1),i=g/(b.length-1),j=Math.max(i-h,0),k=Math.min(g,1)*h;return/*#__PURE__*/_jsxs("div",{className:classNames("tw-stepper",d),children:[/*#__PURE__*/_jsxs("div",{className:"progress",children:[/*#__PURE__*/_jsx("div",{className:"progress-bar-filler",style:{width:"".concat(100*j,"%")}}),/*#__PURE__*/_jsx("div",{className:"progress-bar-ending",style:{width:"".concat(100*k,"%")}})]}),/*#__PURE__*/_jsx("ul",{className:"tw-stepper-steps p-t-1 m-b-0",children:b.map(function renderStep(a,b){var c=b===g,d=a.onClick&&!c,e=d?/*#__PURE__*/_jsx("button",{type:"button",className:"btn-unstyled tw-stepper__step-label",onClick:function onClick(){return d&&a.onClick()},children:/*#__PURE__*/_jsx("small",{children:a.label})}):/*#__PURE__*/_jsx(Body,{as:"span",className:"tw-stepper__step-label small",children:a.label});return/*#__PURE__*/_jsx("li",{className:classNames("hidden-xs","tw-stepper__step",c&&"tw-stepper__step--active",d&&"tw-stepper__step--clickable",a.hoverLabel&&"tw-stepper__step--has-tooltip"),style:f?{right:"".concat(100*(b*h),"%")}:{left:"".concat(100*(b*h),"%")},children:a.hoverLabel&&!isTouchDevice()?/*#__PURE__*/_jsx(Tooltip,{position:Position.BOTTOM,label:a.hoverLabel,children:e}):e},b)})})]})};/* eslint-enable react/no-array-index-key */Stepper.propTypes={steps:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.node.isRequired,onClick:PropTypes.func,hoverLabel:PropTypes.node})).isRequired,activeStep:PropTypes.number,className:PropTypes.string},Stepper.defaultProps={activeStep:0,className:void 0};export default Stepper;
@@ -0,0 +1,4 @@
1
+ function supportsTouchEvents(){var a="undefined"!=typeof window&&window.ontouchstart!==void 0,b="undefined"!=typeof navigator&&navigator.maxTouchPoints,c="undefined"!=typeof window&&window.DocumentTouch&&document instanceof window.DocumentTouch;// eslint-disable-next-line compat/compat
2
+ return!!(a||b||c)}function userAgentSuggestsTouchDevice(){var a=["android","iemobile","iphone","ipad","ipod","blackberry","bada"].map(function(a){return"(".concat(a,")")}).join("|"),b=new RegExp(a,"ig");return"undefined"!=typeof navigator&&!!navigator.userAgent.match(b)}// Important: this is not fool-proof! It gives false positives and negatives, and will be outdated.
3
+ // Only use this for small vanity changes where it still works either way.
4
+ export function isTouchDevice(){return supportsTouchEvents()||userAgentSuggestsTouchDevice()}
@@ -0,0 +1 @@
1
+ import Stepper from"./Stepper";export default Stepper;
@@ -0,0 +1 @@
1
+ import PropTypes from"prop-types";import SlidingPanel from"../slidingPanel";import{jsx as _jsx}from"react/jsx-runtime";var Sticky=function(a){var b=a.open,c=a.position,d=a.children;return/*#__PURE__*/_jsx(SlidingPanel,{open:b,position:c,slidingPanelPositionFixed:!0,showSlidingPanelBorder:!0,children:d})};Sticky.propTypes={open:PropTypes.bool,position:PropTypes.oneOf(["top","bottom"]),children:PropTypes.node},Sticky.defaultProps={open:!0,position:"bottom",children:null};export default Sticky;
@@ -0,0 +1 @@
1
+ export{default}from"./Sticky";
@@ -0,0 +1 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";var _statusLabels,_statusMapping;import{CheckCircleFill as CheckCircleIcon,ClockFill as PendingCircleIcon}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import{cloneElement}from"react";import{useIntl}from"react-intl";import requiredIf from"react-required-if";import Body from"../body";import{Status,Size,Typography,Sentiment}from"../common";import Info from"../info";import Link from"../link/Link";import StatusIcon from"../statusIcon";import{deprecated}from"../utilities";import messages from"./Summary.messages";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var BadgeIcons={done:CheckCircleIcon,pending:PendingCircleIcon},statusLabels=(_statusLabels={},_defineProperty(_statusLabels,Status.NOT_DONE,"statusNotDone"),_defineProperty(_statusLabels,Status.DONE,"statusDone"),_defineProperty(_statusLabels,Status.PENDING,"statusPending"),_statusLabels),statusMapping=(_statusMapping={},_defineProperty(_statusMapping,Status.DONE,Sentiment.POSITIVE),_defineProperty(_statusMapping,Status.PENDING,Sentiment.PENDING),_statusMapping),expiryDate=new Date("03-01-2021"),Summary=function(a){var b=a.action,c=a.as,d=a.className,e=a.content,f=a.description,g=void 0===f?e:f,h=a.help,i=a.icon,j=a.illustration,k=a.info,l=void 0===k?h:k,m=a.status,n=a.title,o=useTheme(),p=o.isModern,q=useIntl(),r=j;if(i){var s,t=null===i||void 0===i||null===(s=i.props)||void 0===s?void 0:s.size;r=24===t?i:/*#__PURE__*/cloneElement(i,{size:24})}var u=m&&BadgeIcons[m];return/*#__PURE__*/_jsxs(c,{className:classNames("np-summary d-flex align-items-start",d),"aria-label":m&&q.formatMessage(messages[statusLabels[m]]),children:[/*#__PURE__*/_jsxs("div",{className:"np-summary__icon",children:[r,u&&(p?/*#__PURE__*/_jsx(u,{size:16,className:"np-summary-icon__".concat(m)}):/*#__PURE__*/_jsx("div",{children:/*#__PURE__*/_jsx(StatusIcon,{size:Size.SMALL,sentiment:statusMapping[m]})}))]}),/*#__PURE__*/_jsxs("div",{className:"np-summary__body m-l-2",children:[/*#__PURE__*/_jsxs("div",{className:"np-summary__title d-flex",children:[/*#__PURE__*/_jsx(Body,{as:"span",type:Typography.BODY_LARGE_BOLD,className:"text-primary m-b-1",children:n}),l&&/*#__PURE__*/_jsx(Info,{"aria-label":l["aria-label"],className:"m-l-1 hidden-xs",content:l.content,presentation:l.presentation,size:p?Size.LARGE:Size.SMALL,title:l.title,onClick:l.onClick})]}),g&&/*#__PURE__*/_jsx(Body,{as:"span",type:Typography.BODY_DEFAULT,className:"d-block np-summary__description",children:g}),b&&/*#__PURE__*/_jsx(Link,{href:b.href,target:b.target,className:"np-summary__action","aria-label":b["aria-label"],onClick:b.onClick,children:b.text})]}),l&&/*#__PURE__*/_jsx(Info,{"aria-label":l["aria-label"],className:"m-l-2 hidden-sm hidden-md hidden-lg hidden-xl",content:l.content,presentation:l.presentation,size:p?Size.LARGE:Size.SMALL,title:l.title,onClick:l.onClick})]})};Summary.propTypes={/** Action displayed at the bottom of the Summary */action:PropTypes.shape({text:PropTypes.node.isRequired,href:PropTypes.string.isRequired,"aria-label":PropTypes.string,target:PropTypes.string,onClick:PropTypes.func}),/** Decides which html element should wrap the Summary */as:PropTypes.string,/** Extra classes applied to Summary */className:PropTypes.string,/** @deprecated please use description instead */content:deprecated(PropTypes.node,{component:"Summary",newProp:"description",expiryDate:expiryDate}),/** Summary description */description:PropTypes.node,/** @deprecated please use info instead */help:deprecated(PropTypes.shape({content:PropTypes.node.isRequired,title:PropTypes.node}),{component:"Summary",newProp:"info",expiryDate:expiryDate}),/** Infos displayed on help Icon click inside Popover or Modal */info:PropTypes.shape({"aria-label":PropTypes.string.isRequired,content:PropTypes.node.isRequired,onClick:PropTypes.func,presentation:PropTypes.oneOf(["POPOVER","MODAL"]),title:PropTypes.node}),/** @deprecated please use icon instead */illustration:deprecated(PropTypes.node,{component:"Summary",newProp:"icon",expiryDate:expiryDate}),/** Main Summary Icon */icon:requiredIf(PropTypes.node,function(a){var b=a.illustration;return!b}),/** Decides the badge applied to Icon */status:PropTypes.oneOf(["notDone","done","pending"]),/** Summary title */title:PropTypes.node.isRequired},Summary.defaultProps={action:null,as:"div",className:null,content:null,help:null,illustration:null,status:null};export default Summary;
@@ -0,0 +1 @@
1
+ import{defineMessages}from"react-intl";export default defineMessages({statusNotDone:{id:"neptune.Summary.statusNotDone"},statusPending:{id:"neptune.Summary.statusPending"},statusDone:{id:"neptune.Summary.statusDone"}});
@@ -0,0 +1 @@
1
+ export{default}from"./Summary";
@@ -0,0 +1 @@
1
+ import{CheckCircleFill,CrossCircleFill}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classnames from"classnames";import KeyCodes from"../common/keyCodes";import{logActionRequiredIf}from"../utilities";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Switch=function(a){var b=useTheme(),c=b.isModern,d=a.checked,e=a.className,f=a.id,g=a.onClick,h=a.disabled,i=a["aria-label"],j=i?void 0:a["aria-labelledby"];return logActionRequiredIf("Switch now expects either `aria-label` or `aria-labelledby`, and will soon make these props required. Please update your usage to provide one or the other.",!i&&!j),/*#__PURE__*/_jsxs("span",{className:classnames("np-switch",{"np-switch--unchecked":!d,"np-switch--checked":d,disabled:h},e),tabIndex:0,role:"switch","aria-checked":d,"aria-label":i,"aria-labelledby":j,id:f,"aria-disabled":h,onClick:h?void 0:g,onKeyDown:h?void 0:function handleKeyDown(a){("32"===a.code||a.keyCode===KeyCodes.SPACE)&&(a.preventDefault(),g())},children:[function returnIcon(){return c?/*#__PURE__*/_jsx("span",{className:"np-switch--thumb"}):d?/*#__PURE__*/_jsx("span",{className:"np-switch--thumb",children:/*#__PURE__*/_jsx(CheckCircleFill,{size:24})}):/*#__PURE__*/_jsx("span",{className:"np-switch--thumb",children:/*#__PURE__*/_jsx(CrossCircleFill,{size:24})})}(),/*#__PURE__*/_jsx("input",{type:"checkbox",checked:d,readOnly:!0})]})};export default Switch;
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useState}from"react";import Switch from"./Switch";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:Switch,title:"Actions/Switch"};export var Basic=function(){var a=useState(!1),b=_slicedToArray(a,2),c=b[0],d=b[1],e=useState(!1),f=_slicedToArray(e,2),g=f[0],h=f[1];return/*#__PURE__*/_jsxs("div",{className:"d-flex flex-column",children:[/*#__PURE__*/_jsx("label",{id:"labelID",htmlFor:"switchId",children:"A switch with a label"}),/*#__PURE__*/_jsx(Switch,{checked:c,className:"a-class-name","aria-labelledby":"labelID",id:"switchId",onClick:function onClick(){return d(!c)}}),/*#__PURE__*/_jsx(Switch,{checked:g,className:"a-class-name m-t-4","aria-label":"I'm a switch without label",onClick:function onClick(){return h(!g)}})]})};export var Disabled=function(){var a=useState(!1),b=_slicedToArray(a,2),c=b[0],d=b[1];return/*#__PURE__*/_jsxs("div",{className:"d-flex flex-column",children:[/*#__PURE__*/_jsx(Switch,{checked:c,disabled:!0,className:"a-class-name","aria-labelledby":"labelID",id:"switchId",onClick:function onClick(){return d(!c)}}),/*#__PURE__*/_jsx(Switch,{checked:!c,disabled:!0,className:"a-class-name","aria-labelledby":"labelID",id:"switchId",onClick:function onClick(){return d(!c)}})]})};
@@ -0,0 +1 @@
1
+ export{default}from"./Switch";
@@ -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 Option from"../common/Option";import Switch from"../switch";import{jsx as _jsx}from"react/jsx-runtime";var stopPropagation=function(a){a&&(a.stopPropagation(),a.preventDefault(),a.nativeEvent&&a.nativeEvent.stopImmediatePropagation&&a.nativeEvent.stopImmediatePropagation())},SwitchOption=function(a){var b=a.checked,c=a.complex,d=a.content,e=a.disabled,f=a.id,g=a.media,h=a.onChange,i=a.title,j=a.showMediaCircle,k=a.showMediaAtAllSizes,l=a.isContainerAligned,m=a["aria-label"],n=function(a){stopPropagation(a);e||h(!b)};return/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},{media:g,title:i,content:d,complex:c,disabled:e,showMediaCircle:j,showMediaAtAllSizes:k,isContainerAligned:l}),{},{button:/*#__PURE__*/_jsx(Switch,{id:f,checked:b,disabled:e,"aria-label":m,onClick:n}),onClick:n}))};export default SwitchOption;
@@ -0,0 +1 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{action}from"@storybook/addon-actions";import{text,boolean}from"@storybook/addon-knobs";import{FastFlag as FastFlagIcon}from"@transferwise/icons";import{useState}from"react";import{Nudge}from"..";import SwitchOption from"./SwitchOption";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:SwitchOption,title:"Option/SwitchOption"};var Template=function(){var a=useState(!1),b=_slicedToArray(a,2),c=b[0],d=b[1],e=text("title","Switch option"),f=text("content","Normally, the button and icon are vertically centered."),g=boolean("disabled",!1),h=boolean("showMediaAtAllSizes",!1),i=boolean("isContainerAligned",!1);return/*#__PURE__*/_jsx(SwitchOption,{media:/*#__PURE__*/_jsx(FastFlagIcon,{}),title:e,content:f,id:"id",checked:c,complex:!1,disabled:g,showMediaAtAllSizes:h,isContainerAligned:i,"aria-label":e,onChange:d})};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"./SwitchOption";
@@ -0,0 +1 @@
1
+ import classNames from"classnames";import PropTypes from"prop-types";import{forwardRef,useEffect,useRef}from"react";import{jsx as _jsx}from"react/jsx-runtime";var Tab=/*#__PURE__*/forwardRef(function(a,b){var c=a.children,d=a.id,e=a.disabled,f=a.panelId,g=a.selected,h=a.onKeyDown,i=a.onClick,j=a.style,k=a.focusTab,l=useRef(!0),m=function(){return l.current?void(l.current=!1):void(g&&k&&k())};return useEffect(function(){m()},[g]),/*#__PURE__*/_jsx("li",{ref:b,className:classNames("tabs__tab",g?"np-text-body-large-bold":"np-text-body-large",{"tabs__tab--selected":g,clickable:!e,disabled:e}),role:"tab",id:d,"aria-selected":g?"true":"false","aria-disabled":e?"true":"false","aria-controls":e?null:f,tabIndex:"0",style:j,onKeyDown:e?null:h,onClick:i,children:/*#__PURE__*/_jsx("span",{className:"tabs__tab__content",children:c})})});Tab.defaultProps={disabled:!1,selected:!1,onClick:null,style:null,focusTab:null},Tab.propTypes={children:PropTypes.node.isRequired,disabled:PropTypes.bool,selected:PropTypes.bool,id:PropTypes.string.isRequired,panelId:PropTypes.string.isRequired,onKeyDown:PropTypes.func.isRequired,onClick:PropTypes.func,style:PropTypes.shape({width:PropTypes.string}),focusTab:PropTypes.func};export default Tab;
@@ -0,0 +1 @@
1
+ import PropTypes from"prop-types";import{jsx as _jsx}from"react/jsx-runtime";var TabList=function(a){var b=a.children;return/*#__PURE__*/_jsx("ul",{className:"tabs__tab-list",role:"tablist",children:b})};TabList.propTypes={children:PropTypes.oneOfType([PropTypes.object,PropTypes.array]).isRequired};export default TabList;
@@ -0,0 +1 @@
1
+ import PropTypes from"prop-types";import{jsx as _jsx}from"react/jsx-runtime";var TabPanel=function(a){var b=a.children,c=a.id,d=a.tabId,e=a.style;return/*#__PURE__*/_jsx("div",{className:"tabs__panel",role:"tabpanel",id:c,"aria-labelledby":d,style:e,children:b})};TabPanel.propTypes={children:PropTypes.node.isRequired,id:PropTypes.string.isRequired,tabId:PropTypes.string.isRequired,style:PropTypes.shape({width:PropTypes.string.isRequired}).isRequired};export default TabPanel;
@@ -0,0 +1 @@
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 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}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 classNames from"classnames";import clamp from"lodash.clamp";import PropTypes from"prop-types";import{Component,Fragment}from"react";import{Spring}from"react-spring/renderprops.cjs";import{Size,Width,Direction}from"../common";import KeyCodes from"../common/keyCodes";import{DirectionContext}from"../provider/direction";import Tab from"./Tab";import TabList from"./TabList";import TabPanel from"./TabPanel";import{getElasticDragDifference,getSwipeDifference,swipedLeftToRight,swipedRightToLeft,swipeShouldChangeTab,getVelocity}from"./utils";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var MIN_INDEX=0,enabledTabsFilter=function(a){return!a.disabled},SpacerWidth={default:0,xs:8,sm:16,md:24,lg:32},Tabs=/*#__PURE__*/function(a){function b(a){var d;return _classCallCheck(this,b),d=c.call(this,a),_defineProperty(_assertThisInitialized(d),"container",null),_defineProperty(_assertThisInitialized(d),"containerWidth",0),_defineProperty(_assertThisInitialized(d),"tabRefs",[]),_defineProperty(_assertThisInitialized(d),"handleResize",function(){d.setContainerWidth(d.container),d.setState(function(a){var b=a.selectedTabIndex;return{translateTo:-(d.containerWidth*b)}})}),_defineProperty(_assertThisInitialized(d),"setContainerRefAndWidth",function(a){d.container=a,d.setContainerWidth(a)}),_defineProperty(_assertThisInitialized(d),"setContainerWidth",function(a){if(a){var b=a.getBoundingClientRect(),c=b.width;d.containerWidth=c}}),_defineProperty(_assertThisInitialized(d),"isTabDisabled",function(a){var b=d.props.tabs;return b[a]&&b[a].disabled}),_defineProperty(_assertThisInitialized(d),"getAllTabsWidth",function(){return d.tabRefs.map(function(a){return a?a.getBoundingClientRect().width:0}).reduce(function(c,a){return c+a},0)}),_defineProperty(_assertThisInitialized(d),"getDistanceToSelectedTab",function(a){return d.tabRefs.filter(function(b,c){return c<a}).map(function(a){return a?a.getBoundingClientRect().width:0}).reduce(function(c,a){return c+a},0)}),_defineProperty(_assertThisInitialized(d),"setTabWidth",function(){var a=d.state.fullWidthTabs,b=d.props,c=b.headerWidth,e=b.selected,f=d.getAllTabsWidth();!a&&(c===Width.BLOCK||d.containerWidth<f)&&d.setState({fullWidthTabs:!0,translateLineX:"".concat(100*e,"%")}),a&&c===Width.AUTO&&d.containerWidth>=f&&d.setState({fullWidthTabs:!1,translateLineX:"".concat(d.getDistanceToSelectedTab(e),"px")})}),_defineProperty(_assertThisInitialized(d),"getTabLineWidth",function(){var a=d.state.fullWidthTabs,b=d.props,c=b.selected,e=b.tabs;if(a)return"".concat(100*(1/e.length),"%");var f=d.tabRefs[c]||d.tabRefs[d.tabRefs.length-1],g=f?f.getBoundingClientRect().width:0;return"".concat(g,"px")}),_defineProperty(_assertThisInitialized(d),"getTabToSelect",function(a,b,c){var e=a;if(swipedLeftToRight(b,c)){if(e-=1,e>MIN_INDEX&&d.isTabDisabled(e))return d.getTabToSelect(e,b,c);}else if(swipedRightToLeft(b,c)&&(e+=1,e<d.MAX_INDEX&&d.isTabDisabled(e)))return d.getTabToSelect(e,b,c);return e=clamp(e,Math.max(a-1,MIN_INDEX),Math.min(a+1,d.MAX_INDEX)),d.isTabDisabled(e)?a:e}),_defineProperty(_assertThisInitialized(d),"swipedOverHalfOfContainer",function(a){return .5<=a/d.containerWidth}),_defineProperty(_assertThisInitialized(d),"calculateApplicableDragDifference",function(a){var b=a.currentSelected,c=a.nextSelected,e=a.start,f=a.end,g=getSwipeDifference(e,f),h=getElasticDragDifference(g);return swipedLeftToRight(e,f)?b>MIN_INDEX&&b!==c?Math.min(g,d.containerWidth):h:!!swipedRightToLeft(e,f)&&(b<d.MAX_INDEX&&b!==c?-Math.min(g,d.containerWidth):-h)}),_defineProperty(_assertThisInitialized(d),"switchTab",function(a){var b=d.props.onTabSelect;b(a)}),_defineProperty(_assertThisInitialized(d),"animateToTab",function(a,b){d.animateLine(a),d.animatePanel(d.getTabIndexWithoutDisabledTabs(a),b)}),_defineProperty(_assertThisInitialized(d),"animateLine",function(a){d.setState(function(b){return{translateLineX:b.fullWidthTabs?"".concat(100*a,"%"):"".concat(d.getDistanceToSelectedTab(a),"px")}})}),_defineProperty(_assertThisInitialized(d),"animatePanel",function(a){var b=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],c=d.state.translateTo,e=c,f=-(d.containerWidth*a);d.setState({selectedTabIndex:a,isAnimating:!b&&e!==f,translateFrom:e,translateTo:f})}),_defineProperty(_assertThisInitialized(d),"disableScroll",function(a){var b=d.state.isSwiping;b&&a.preventDefault()}),_defineProperty(_assertThisInitialized(d),"handleTabClick",function(a){return function(){d.switchTab(a)}}),_defineProperty(_assertThisInitialized(d),"onKeyDown",function(a){return function(b){b&&b.keyCode===KeyCodes.ENTER&&d.switchTab(a)}}),_defineProperty(_assertThisInitialized(d),"handleTouchStart",function(a){var b={x:a.nativeEvent.touches[0].clientX,y:a.nativeEvent.touches[0].clientY,time:Date.now()};d.setState({start:b,currentSwipe:[b]}),a.persist()}),_defineProperty(_assertThisInitialized(d),"handleTouchMove",function(a){var b=d.state.start,c=d.props.selected,e=d.getTabIndexWithoutDisabledTabs(c),f={x:a.nativeEvent.changedTouches[0].clientX,y:a.nativeEvent.changedTouches[0].clientY,time:Date.now()},g=getSwipeDifference(b,f),h=getSwipeDifference(b,f,"y"),i=d.state,j=i.isScrolling,k=i.isSwiping;if(a.persist(),j||k||(g>h?k=!0:j=!0),d.setState({isScrolling:j,isSwiping:k}),k){var n=d.getTabToSelect(c,b,f);d.animateLine(d.swipedOverHalfOfContainer(g)?n:c);var l=d.calculateApplicableDragDifference({currentSelected:c,nextSelected:n,start:b,end:f}),m=!!l&&-(d.containerWidth*e)+l;d.setState(function(a){return{currentSwipe:[].concat(_toConsumableArray(a.currentSwipe),[f]),translateFrom:m||a.translateFrom,translateTo:m||a.translateTo}})}}),_defineProperty(_assertThisInitialized(d),"handleTouchEnd",function(a){var b=d.state,c=b.start,e=b.isSwiping,f=d.props.selected,g={x:a.nativeEvent.changedTouches[0].clientX,y:a.nativeEvent.changedTouches[0].clientY,time:Date.now()},h=getSwipeDifference(c,g),i=getVelocity([].concat(_toConsumableArray(d.state.currentSwipe),[g]));d.setState({currentSwipe:[]});var j=f;a.persist(),e&&((swipeShouldChangeTab(c,g)||d.swipedOverHalfOfContainer(h))&&(j=d.getTabToSelect(j,c,g)),j===f?d.animateToTab(j):(d.switchTab(j),d.setState({lastSwipeVelocity:i}))),d.setState({isSwiping:!1,isScrolling:!1})}),d.state={start:null,translateX:0,translateFrom:0,translateTo:0,translateLineX:null,isAnimating:!1,isSwiping:!1,isScrolling:!1,lastSwipeVelocity:0,fullWidthTabs:a.headerWidth===Width.BLOCK},d}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"filteredTabsLength",get:function get(){return this.props.tabs.filter(enabledTabsFilter).length}},{key:"MAX_INDEX",get:function get(){return this.props.tabs.length-1}},{key:"componentDidMount",value:function componentDidMount(){var a=this.props.selected;this.setTabWidth(),this.switchTab(clamp(a,MIN_INDEX,this.MAX_INDEX)),this.animateToTab(clamp(a,MIN_INDEX,this.MAX_INDEX),!0),document.body.addEventListener("touchmove",this.disableScroll,{passive:!1}),document.body.addEventListener("touchforcechange",this.disableScroll,{passive:!1}),window.addEventListener("resize",this.handleResize)}},{key:"componentDidUpdate",value:function componentDidUpdate(a,b){var c=this.props.selected,d=a.selected,e=this.props.tabs[c],f=e&&e.disabled,g=a.tabs[d],h=g&&g.disabled,i=this.props.tabs.length,j=a.tabs.length,k=this.props.tabs.filter(enabledTabsFilter).length,l=a.tabs.filter(enabledTabsFilter).length,m=this.props.headerWidth,n=a.headerWidth,o=this.props.animatePanelsOnClick,p=!o&&!b.isSwiping;(m!==n||i!==j)&&this.setTabWidth(),(c!==d||k!==l||f!==h)&&this.animateToTab(clamp(c,MIN_INDEX,this.MAX_INDEX),c===d||p)}},{key:"componentWillUnmount",value:function componentWillUnmount(){document.body.removeEventListener("touchmove",this.disableScroll),document.body.removeEventListener("touchforcechange",this.disableScroll),window.removeEventListener("resize",this.handleResize)}},{key:"getTabIndexWithoutDisabledTabs",value:function getTabIndexWithoutDisabledTabs(a){return a-this.props.tabs.slice(0,a).filter(function(a){return!enabledTabsFilter(a)}).length}},{key:"render",value:function render(){var a=this,b=this.props,c=b.tabs,d=b.changeTabOnSwipe,e=b.name,f=b.selected,g=b.className,h=b.transitionSpacing,i=b.headerWidth,j=this.state,k=j.isSwiping,l=j.translateLineX,m=j.isAnimating,n=j.translateFrom,o=j.translateTo,p=j.lastSwipeVelocity,q=j.fullWidthTabs,r=SpacerWidth[h],s=this.filteredTabsLength,t=Math.abs(-n-this.containerWidth*f),u=k?1-t/this.containerWidth:1-Math.abs(t/this.containerWidth-1),v=(Number.isNaN(u)?0:u)*Math.min(10*Math.E,10*p*Math.E),w=m||k,x=s*this.containerWidth+2*r,y=function(a){var b=a.id;return 0<r&&/*#__PURE__*/_jsx("div",{style:{width:r,display:w?"block":"none"}},b)};return/*#__PURE__*/_jsx(DirectionContext.Consumer,{children:function children(b){var h=b===Direction.RTL;return/*#__PURE__*/_jsxs("div",{className:classNames("tabs",g,{"tabs--auto-width":i===Width.AUTO}),onTouchStart:d?a.handleTouchStart:void 0,onTouchEnd:d?a.handleTouchEnd:void 0,onTouchMove:d?a.handleTouchMove:void 0,children:[/*#__PURE__*/_jsxs(TabList,{children:[c.map(function(b,d){var g=b.title,h=b.disabled;return/*#__PURE__*/_jsx(Tab,_objectSpread(_objectSpread({ref:function ref(b){a.tabRefs[d]=b},id:"".concat(e,"-tab-").concat(d),panelId:"".concat(e,"-panel-").concat(d),selected:f===d,disabled:h,focusTab:function focusTab(){a.tabRefs[d].focus()},onClick:h?null:a.handleTabClick(d),onKeyDown:a.onKeyDown(d)},q?{style:{width:"".concat(100*(1/c.length),"%")}}:{}),{},{children:g}),g)}),l?/*#__PURE__*/_jsx("div",{className:classNames("tabs__line"),style:{width:a.getTabLineWidth(),transform:h?"translateX(-".concat(l,")"):"translateX(".concat(l,")")}}):null]}),/*#__PURE__*/_jsx("div",{ref:a.setContainerRefAndWidth,className:"tabs__panel-container",style:{overflow:w?"hidden":"visible"},children:/*#__PURE__*/_jsx(Spring,{from:{transform:"translateX(".concat(n-r,"px)")},to:{transform:"translateX(".concat(o-r,"px)")},config:{precision:k?1:.01,velocity:k?0:v,clamp:!0},onRest:function onRest(){m&&a.setState({isAnimating:!1,lastSwipeVelocity:0})},children:function children(b){return/*#__PURE__*/_jsx("div",{className:"tabs__slider",style:{width:w?"".concat(x,"px"):"100%",transform:w?b.transform:"translateX(0px)"},children:c.map(function(b,d){var g=b.content,h=b.disabled;return h?null:/*#__PURE__*/_jsxs(Fragment,{children:[d===f&&/*#__PURE__*/_jsx(y,{id:"left-spacer"}),/*#__PURE__*/_jsx(TabPanel,{tabId:"".concat(e,"-tab-").concat(d),id:"".concat(e,"-panel-").concat(d),style:{width:w?"".concat(a.containerWidth,"px"):"100%",display:w||d===f?"block":"none"},children:g},c[d].title),d===f&&/*#__PURE__*/_jsx(y,{id:"right-spacer"})]},"".concat(c[d].title,"-fragment"))})})}})})]})}})}}]),b}(Component),SpacerSizes=_objectSpread(_objectSpread({},Size),{},{NONE:"default"});Tabs.propTypes={tabs:PropTypes.arrayOf(PropTypes.shape({title:PropTypes.string.isRequired,content:PropTypes.node.isRequired,disabled:PropTypes.bool.isRequired})).isRequired,selected:PropTypes.number.isRequired,onTabSelect:PropTypes.func.isRequired,name:PropTypes.string.isRequired,animatePanelsOnClick:PropTypes.bool,changeTabOnSwipe:PropTypes.bool,className:PropTypes.string,transitionSpacing:PropTypes.oneOf(["default","xs","sm","md","lg"]),headerWidth:PropTypes.oneOf(["auto","block"])},Tabs.defaultProps={animatePanelsOnClick:!1,changeTabOnSwipe:!0,className:"",transitionSpacing:SpacerSizes.NONE,headerWidth:Width.BLOCK};export default Tabs;
@@ -0,0 +1 @@
1
+ export{default}from"./Tabs";
@@ -0,0 +1,5 @@
1
+ var MIN_SWIPE_DISTANCE=50,MIN_SWIPE_VELOCITY=.1,swipedSignificantDistance=function(a){return Math.abs(a)>MIN_SWIPE_DISTANCE},swipedWithSignificantVelocity=function(a){return a>MIN_SWIPE_VELOCITY};export var getSwipeVelocity=function(a,b){var c=b.time-a.time;return getSwipeDifference(a,b)/c};export var getSwipeDifference=function(a,b){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"x";return Math.abs(a[c]-b[c])};export var swipedLeftToRight=function(a,b){return b.x>a.x};export var swipedRightToLeft=function(a,b){return a.x>b.x};export var swipeShouldChangeTab=function(a,b){var c=getSwipeDifference(a,b),d=getSwipeVelocity(a,b);return swipedSignificantDistance(c)&&swipedWithSignificantVelocity(d)};export function getVelocity(a){try{var b=a.slice(Math.max(a.length-5,1)),c=b[0],d=b[b.length-1];return Math.abs(c.x-d.x)/(d.time-c.time)}catch(a){return 0}}/*
2
+ `elasticDrag` is the translateX value, which slows down as the difference increases
3
+ `1 - Math.E ** (-0.005 * difference)` provides a % value of how far we want to translate (0.005 being the rate)
4
+ `Math.min(150, window.innerWidth / 3)` provides the maximum translate value
5
+ */export var getElasticDragDifference=function(a){return Math.min(150,window.innerWidth/3)*(1-Math.pow(Math.E,-.005*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 PropTypes from"prop-types";import WithDisplayFormat from"../withDisplayFormat";import{jsx as _jsx}from"react/jsx-runtime";var TextareaWithDisplayFormat=function(a){return/*#__PURE__*/_jsx(WithDisplayFormat,_objectSpread(_objectSpread({},a),{},{render:function render(a){return/*#__PURE__*/_jsx("textarea",_objectSpread({},a))}}))};TextareaWithDisplayFormat.propTypes={displayPattern:PropTypes.string.isRequired,onChange:PropTypes.func.isRequired};export default TextareaWithDisplayFormat;
@@ -0,0 +1 @@
1
+ export{default}from"./TextareaWithDisplayFormat";
@@ -0,0 +1 @@
1
+ import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import Body from"../body";import{Size,Key,Typography}from"../common";import Title from"../title";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export var Tile=function(a){var b=a.className,c=a.description,d=a.disabled,e=a.href,f=a.target,g=a.media,h=a.onClick,i=a.size,j=a.title,k=i===Size.SMALL,l=useTheme(),m=l.isModern,n=e?"a":"button";return/*#__PURE__*/_jsxs(n,{className:classNames("decision","flex-column","np-tile","text-no-decoration","text-xs-center",b,{"p-a-3":!k&&m,"p-y-5 p-x-4":!k&&!m,"p-a-2":k,"np-tile--small":k,disabled:d}),href:e,target:f,"aria-label":j,onClick:d?null:h,onKeyDown:d?null:function(a){var b=a.key;(b===Key.ENTER||Key.SPACE.includes(b))&&h()},children:[/*#__PURE__*/_jsx("div",{className:"np-tile__media d-flex justify-content-center",children:g}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,className:classNames(k?"m-t-1":"m-t-2"),children:j}),m&&c&&/*#__PURE__*/_jsx(Body,{as:"span",type:Typography.BODY_DEFAULT,className:"m-t-1",children:c}),!m&&c&&/*#__PURE__*/_jsx("div",{className:"np-tile__description",children:c})]})};Tile.propTypes={/** Classes to apply to the Tile container */className:PropTypes.string,description:PropTypes.node,disabled:PropTypes.bool,href:PropTypes.string.isRequired,target:PropTypes.oneOf(["_self","_blank","_parent","_top"]),/** Accepts only Avatar and images */media:PropTypes.node.isRequired,/** Function called onClick or onKeyDown */onClick:PropTypes.func.isRequired,/** The size applied to Tile */size:PropTypes.oneOf(["sm","md"]),title:PropTypes.node.isRequired},Tile.defaultProps={className:"",description:null,disabled:!1,size:Size.MEDIUM,target:void 0};export default Tile;
@@ -0,0 +1 @@
1
+ export{default}from"./Tile";
@@ -0,0 +1 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _defineProperty from"@babel/runtime/helpers/defineProperty";var _titleTypeMapping,_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 classNames from"classnames";import{Typography}from"../common";import{jsx as _jsx}from"react/jsx-runtime";var DEFAULT_TYPE=Typography.TITLE_GROUP,titleTypeMapping=(_titleTypeMapping={},_defineProperty(_titleTypeMapping,Typography.TITLE_SCREEN,"h1"),_defineProperty(_titleTypeMapping,Typography.TITLE_SECTION,"h2"),_defineProperty(_titleTypeMapping,Typography.TITLE_SUBSECTION,"h3"),_defineProperty(_titleTypeMapping,Typography.TITLE_BODY,"h4"),_defineProperty(_titleTypeMapping,Typography.TITLE_GROUP,"h5"),_titleTypeMapping);function Title(a){var b=a.as,c=a.type,d=void 0===c?DEFAULT_TYPE:c,e=a.className,f=_objectWithoutProperties(a,_excluded),g=titleTypeMapping[d];if(g!==void 0){var i=null!==b&&void 0!==b?b:"".concat(g);return/*#__PURE__*/_jsx(i,_objectSpread(_objectSpread({},f),{},{className:classNames("np-text-".concat(d),e)}))}var h=null!==b&&void 0!==b?b:"".concat(titleTypeMapping[DEFAULT_TYPE]);return/*#__PURE__*/_jsx(h,_objectSpread(_objectSpread({},f),{},{className:classNames("np-text-".concat(DEFAULT_TYPE),e)}))}export default Title;
@@ -0,0 +1 @@
1
+ import{Typography}from"../common";import{render,screen}from"../test-utils";import Title from".";import{jsx as _jsx}from"react/jsx-runtime";describe("Title",function(){it("testing default state",function(){render(/*#__PURE__*/_jsx(Title,{children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("H5"),expect(a).toHaveClass("np-text-".concat(Typography.TITLE_GROUP))}),it("enforces tag via `as` prop",function(){render(/*#__PURE__*/_jsx(Title,{as:"span",children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("SPAN"),expect(a).toHaveClass("np-text-".concat(Typography.TITLE_GROUP))}),it("supports native HTML attrs",function(){render(/*#__PURE__*/_jsx(Title,{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(Title,{type:Typography.BODY_LARGE_BOLD,children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("H5"),expect(a).toHaveClass("np-text-".concat(Typography.TITLE_GROUP))})});
@@ -0,0 +1 @@
1
+ import{Typography}from"../common/propsValues/typography";import Title from"./Title";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:Title,title:"Typography/Title"};export var Basic=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SCREEN,children:"Screen Title"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SECTION,className:"m-t-3",children:"Section Title"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,className:"m-t-3",children:"Subsection Title"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_BODY,className:"m-t-3",children:"Body Title"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_GROUP,className:"m-t-3",children:"Group Title"})]})};
@@ -0,0 +1 @@
1
+ export{default}from"./Title";
@@ -0,0 +1,8 @@
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}/* eslint-disable @typescript-eslint/ban-ts-comment */import classNames from"classnames";import{cloneElement,useRef,useState,useEffect}from"react";import{usePopper}from"react-popper";import{Position}from"../common";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";var Tooltip=function(a){var b=a.position,c=void 0===b?Position.TOP:b,d=a.children,e=void 0===d?void 0:d,f=a.label,g=a.className,h=useState(!1),i=_slicedToArray(h,2),j=i[0],k=i[1],l=useRef(null),m=useState(null),n=_slicedToArray(m,2),o=n[0],p=n[1],q=useState(null),r=_slicedToArray(q,2),s=r[0],t=r[1],u=[];u.push({name:"arrow",options:{element:o,options:{padding:8// 8px from the edges of the popper
2
+ }}}),u.push({name:"offset",options:{offset:[0,16]}}),u.push({name:"flip",options:{fallbackPlacements:Position.TOP}});var v=usePopper(l.current,s,{placement:c,modifiers:u}),w=v.styles,x=v.attributes,y=v.forceUpdate;// If the trigger is not visible when the position is calculated, it will be incorrect. Because this can happen repeatedly (on resize for example),
3
+ // it is most simple just to always position before opening
4
+ return useEffect(function(){j&&y&&y()},[j]),/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("span",{ref:l,className:"d-inline-block",children:e?/*#__PURE__*/cloneElement(e,{/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call */onMouseOver:function onMouseOver(){var a;if(null!==e&&void 0!==e&&null!==(a=e.props)&&void 0!==a&&a.onMouseOver){var b;null===e||void 0===e||null===(b=e.props)||void 0===b?void 0:b.onMouseOver()}k(!0)},onFocus:function onFocus(){var a;null!==e&&void 0!==e&&null!==(a=e.props)&&void 0!==a&&a.onFocus&&e.props.onFocus(),k(!0)},onMouseOut:function onMouseOut(){var a;null!==e&&void 0!==e&&null!==(a=e.props)&&void 0!==a&&a.onMouseOver&&e.props.onMouseOver(),k(!1)},onBlur:function onBlur(){var a;null!==e&&void 0!==e&&null!==(a=e.props)&&void 0!==a&&a.onBlur&&e.props.onBlur(),k(!1)}/* eslint-enable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call */}):null}),j?/*#__PURE__*/_jsx("div",_objectSpread(_objectSpread({// @ts-expect-error
5
+ ref:t,className:classNames("np-tooltip","np-panel","np-panel--open","bg-screen",g)// eslint-disable-next-line react/forbid-dom-props
6
+ ,style:_objectSpread({},w.popper)},x.popper),{},{children:/*#__PURE__*/_jsxs("div",{className:"np-panel__content tooltip-inner",children:[f,/*#__PURE__*/_jsx("div",{// @ts-expect-error
7
+ ref:p,className:classNames("np-panel__arrow")// eslint-disable-next-line react/forbid-dom-props
8
+ ,style:w.arrow})]})})):null]})};export default Tooltip;
@@ -0,0 +1 @@
1
+ import{render,screen,fireEvent,userEvent}from"../test-utils";import Tooltip from".";import{jsx as _jsx}from"react/jsx-runtime";describe("Tooltip",function(){var a=/*#__PURE__*/_jsx("span",{children:"Hover over me!"});it("wraps anchor as a children and renders it",function(){render(/*#__PURE__*/_jsx(Tooltip,{label:"Tooltip",children:a})),expect(screen.getByText("Hover over me!")).toBeInTheDocument()}),it("appears onMouseOver",function(){render(/*#__PURE__*/_jsx(Tooltip,{label:"Tooltip",children:a})),expect(screen.queryByText("Tooltip")).not.toBeInTheDocument(),userEvent.hover(screen.getByText("Hover over me!")),expect(screen.getByText("Tooltip")).toBeInTheDocument()}),it("hides onMouseOut",function(){render(/*#__PURE__*/_jsx(Tooltip,{label:"Tooltip",children:a})),userEvent.hover(screen.getByText("Hover over me!")),expect(screen.getByText("Tooltip")).toBeInTheDocument(),userEvent.unhover(screen.getByText("Hover over me!"))}),it("appears onFocus",function(){render(/*#__PURE__*/_jsx(Tooltip,{label:"Tooltip",children:a})),expect(screen.queryByText("Tooltip")).not.toBeInTheDocument(),fireEvent.focus(screen.getByText("Hover over me!")),expect(screen.getByText("Tooltip")).toBeInTheDocument()}),it("hides onBlur",function(){render(/*#__PURE__*/_jsx(Tooltip,{label:"Tooltip",children:a})),fireEvent.blur(screen.getByText("Hover over me!")),expect(screen.queryByText("Tooltip")).not.toBeInTheDocument()})});
@@ -0,0 +1 @@
1
+ import{select,text}from"@storybook/addon-knobs";import Button from"../button";import{Position}from"../common";import Tooltip from"./Tooltip";import{jsx as _jsx}from"react/jsx-runtime";export default{component:Tooltip,title:"Dialogs/Tooltip"};export var Basic=function(){var a=text("label","Hey edit me!!!!!!"),b=select("position",[Position.BOTTOM,Position.TOP,Position.LEFT,Position.RIGHT],Position.BOTTOM);return/*#__PURE__*/_jsx("div",{className:"text-xs-center",children:/*#__PURE__*/_jsx(Tooltip,{label:a,position:b,children:/*#__PURE__*/_jsx(Button,{children:"Hover me"})})})};
@@ -0,0 +1 @@
1
+ import Tooltip from"./Tooltip";export default Tooltip;
@@ -0,0 +1 @@
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}}/* eslint-disable jsx-a11y/anchor-is-valid */ /* eslint-disable jsx-a11y/click-events-have-key-events */ /* eslint-disable jsx-a11y/no-static-element-interactions */import{Cross as CrossIcon}from"@transferwise/icons";import classNames from"classnames";import clamp from"lodash.clamp";import debounce from"lodash.debounce";import PropTypes from"prop-types";import{Component}from"react";import Chip from"../chips/Chip";import{Size,Sentiment}from"../common";import{addClickClassToDocumentOnIos,removeClickClassFromDocumentOnIos}from"../common/domHelpers";import KeyCodes from"../common/keyCodes";import InlineAlert from"../inlineAlert";import TypeaheadInput from"./typeaheadInput/TypeaheadInput";import TypeaheadOption from"./typeaheadOption/TypeaheadOption";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var DEFAULT_MIN_QUERY_LENGTH=3,SEARCH_DELAY=200,Typeahead=/*#__PURE__*/function(a){function b(a){var d;_classCallCheck(this,b),d=c.call(this,a),_defineProperty(_assertThisInitialized(d),"handleOnFocus",function(){var a=d.props.onFocus;d.showMenu(),a&&d.props.onFocus()}),_defineProperty(_assertThisInitialized(d),"onOptionSelected",function(a,b){a.preventDefault(),d.selectItem(b)}),_defineProperty(_assertThisInitialized(d),"handleOnChange",function(a){var b=d.state,c=b.optionsShown,e=b.selected,f=d.props,g=f.multiple,h=f.onInputChange;c||d.showMenu();var i=a.target.value;!g&&0<e.length&&d.updateSelectedValue([]),d.setState({query:i},function(){d.handleSearchDebounced(i),h&&h(i)})}),_defineProperty(_assertThisInitialized(d),"handleOnPaste",function(a){var b=d.props,c=b.allowNew,e=b.multiple,f=b.chipSeparators,g=d.state.selected;if(c&&e&&0<f.length){a.preventDefault();var j=a.clipboardData.getData("text");if(j){var h=new RegExp(f.join("|")),i=j.split(h).map(function(a){return{label:a.trim()}}).filter(function(a){return a.label});d.updateSelectedValue([].concat(_toConsumableArray(g),_toConsumableArray(i)))}}}),_defineProperty(_assertThisInitialized(d),"handleOnKeyDown",function(a){var b=d.props,c=b.showSuggestions,e=b.allowNew,f=b.multiple,g=b.chipSeparators,h=b.options,i=d.state,j=i.keyboardFocusedOptionIndex,k=i.query,l=i.selected;if(!c&&e&&f&&["Enter","Tab"].concat(_toConsumableArray(g)).includes(a.key)&&k.trim())a.preventDefault(),d.selectItem({label:k});else switch(a.keyCode){case KeyCodes.DOWN:a.preventDefault(),d.moveFocusedOption(1);break;case KeyCodes.UP:a.preventDefault(),d.moveFocusedOption(-1);break;case KeyCodes.ENTER:a.preventDefault(),h[j]?d.selectItem(h[j]):e&&k.trim()&&d.selectItem({label:k});break;case KeyCodes.BACKSPACE:f&&!k&&0<l.length&&d.updateSelectedValue(l.slice(0,-1));break;default:}}),_defineProperty(_assertThisInitialized(d),"selectItem",function(a){var b,c=d.props.multiple,e=_toConsumableArray(d.state.selected);c?(e.push(a),b=""):(e=[a],b=a.label),d.updateSelectedValue(e),d.hideMenu(),d.setState({query:b})}),_defineProperty(_assertThisInitialized(d),"stopPropagation",function(a){a.stopPropagation(),a.preventDefault(),a.nativeEvent&&a.nativeEvent.stopImmediatePropagation&&a.nativeEvent.stopImmediatePropagation()}),_defineProperty(_assertThisInitialized(d),"handleSearch",function(a){var b=d.props.onSearch;b&&b(a),d.setState(function(a){return{keyboardFocusedOptionIndex:null===a.keyboardFocusedOptionIndex?null:0}})}),_defineProperty(_assertThisInitialized(d),"handleDocumentClick",function(){if(d.state.optionsShown){d.hideMenu();var a=d.props,b=a.allowNew,c=a.onBlur,e=a.autoFillOnBlur,f=d.state.query;d.setState({isFocused:!1}),b&&e&&f.trim()&&d.selectItem({label:f}),c&&c()}}),_defineProperty(_assertThisInitialized(d),"showMenu",function(){d.setState({isFocused:!0,optionsShown:!0},function(){addClickClassToDocumentOnIos(),document.addEventListener("click",d.handleDocumentClick,!1)})}),_defineProperty(_assertThisInitialized(d),"hideMenu",function(){d.setState({optionsShown:!1,keyboardFocusedOptionIndex:null},function(){removeClickClassFromDocumentOnIos(),document.removeEventListener("click",d.handleDocumentClick,!1)})}),_defineProperty(_assertThisInitialized(d),"updateSelectedValue",function(a){var b=d.props,c=b.onChange,e=b.validateChip,f=a.some(function(a){return!e(a)});d.setState({selected:a,errorState:f},function(){c(a)})}),_defineProperty(_assertThisInitialized(d),"clear",function(a){a.preventDefault(),0<d.state.selected.length&&d.updateSelectedValue([]),d.setState({query:""})}),_defineProperty(_assertThisInitialized(d),"removeChip",function(a){var b=d.state.selected;0<b.length&&d.updateSelectedValue(_toConsumableArray(b.filter(function(b){return b!==a})))}),_defineProperty(_assertThisInitialized(d),"renderChip",function(a,b){var c=d.props.validateChip(a);return/*#__PURE__*/_jsx(Chip,{label:a.label,className:classNames("m-t-1",{"has-error":!c,"np-chip--valid":c}),onRemove:function onRemove(){return d.removeChip(a)}},b)}),_defineProperty(_assertThisInitialized(d),"renderMenu",function(a){var b=a.footer,c=a.options,e=a.id,f=a.keyboardFocusedOptionIndex,g=a.query,h=a.allowNew,i=a.showNewEntry,j=a.dropdownOpen,k=_toConsumableArray(c);return h&&g.trim()&&c.every(function(a){return a.label.trim().toUpperCase()!==g.trim().toUpperCase()})&&i&&k.push({label:g}),/*#__PURE__*/_jsx("div",{className:classNames("dropdown btn-group btn-block",{open:j}),id:"menu-".concat(e),children:/*#__PURE__*/_jsxs("ul",{className:"dropdown-menu",role:"menu","aria-labelledby":"dropdownMenu1",children:[k.map(function(a,b){return/*#__PURE__*/_jsx(TypeaheadOption,{query:g,option:a,selected:f===b,onClick:function onClick(b){d.onOptionSelected(b,a)}},"".concat(a.label).concat(b.toString()))}),b]})})});var e=a.searchDelay,f=a.initialValue,g=a.multiple;d.handleSearchDebounced=debounce(d.handleSearch,e);var h=!g&&0<f.length?f[0].label:"";return d.state={selected:f,errorState:!1,query:h,keyboardFocusedOptionIndex:null},d}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"UNSAFE_componentWillReceiveProps",value:function UNSAFE_componentWillReceiveProps(a){a.multiple!==this.props.multiple&&this.setState(function(b){var c=b.selected;return!a.multiple&&0<c.length?{query:c[0].label,selected:[c[0]]}:{query:""}})}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.handleSearchDebounced.cancel()}},{key:"moveFocusedOption",value:function moveFocusedOption(a){var b=this;this.setState(function(c){var d=c.keyboardFocusedOptionIndex,e=b.props.options,f=0;return null!==d&&(f=clamp(d+a,0,e.length-1)),{keyboardFocusedOptionIndex:f}})}},{key:"render",value:function render(){var a=this.props,b=a.id,c=a.placeholder,d=a.multiple,e=a.size,f=a.addon,g=a.name,h=a.clearable,i=a.allowNew,j=a.footer,k=a.showSuggestions,l=a.showNewEntry,m=a.options,n=a.minQueryLength,o=a.autoFocus,p=a.maxHeight,q=a.alert,r=a.inputAutoComplete,s=this.state,t=s.errorState,u=s.query,v=s.selected,w=s.optionsShown,x=s.keyboardFocusedOptionIndex,y=h&&(u||0<v.length),z=w&&k&&u.length>=n,A=this.renderMenu({footer:j,options:m,keyboardFocusedOptionIndex:x,query:u,allowNew:i,showNewEntry:l,dropdownOpen:z}),B=t||q&&q.type===Sentiment.ERROR,C=!t&&q||q&&q.type===Sentiment.ERROR,D=C&&q.type===Sentiment.WARNING,E=C&&q.type===Sentiment.NEUTRAL;return/*#__PURE__*/_jsx("div",{id:b,className:classNames("typeahead","typeahead-".concat(e),{"typeahead--has-value":0<v.length,"typeahead--empty":0===v.length,"typeahead--multiple":d,open:z}),onClick:this.stopPropagation,children:/*#__PURE__*/_jsxs("div",{className:classNames("form-group",{"has-error":B,"has-warning":D,"has-info":E}),children:[/*#__PURE__*/_jsxs("div",{className:classNames("input-group input-group-".concat(e),{"input-group--has-error":B}),children:[f&&/*#__PURE__*/_jsx("span",{className:"input-group-addon",children:f}),/*#__PURE__*/_jsx(TypeaheadInput,{autoFocus:o,multiple:d,optionsShown:w,placeholder:c,selected:v,maxHeight:p,name:g,value:u,typeaheadId:b,renderChip:this.renderChip,autoComplete:r,onChange:this.handleOnChange,onKeyDown:this.handleOnKeyDown,onFocus:this.handleOnFocus,onPaste:this.handleOnPaste}),y&&/*#__PURE__*/_jsx("div",{className:"input-group-addon",children:/*#__PURE__*/_jsx("button",{type:"button",className:"btn-unstyled",onClick:this.clear,children:/*#__PURE__*/_jsx(CrossIcon,{})})})]}),C&&/*#__PURE__*/_jsx(InlineAlert,{type:q.type,children:q.message}),A]})})}}]),b}(Component);export{Typeahead as default};Typeahead.propTypes={id:PropTypes.string.isRequired,name:PropTypes.string.isRequired,options:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.string.isRequired,note:PropTypes.string,secondary:PropTypes.string,value:PropTypes.object})).isRequired,initialValue:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.string.isRequired,note:PropTypes.string,secondary:PropTypes.string})),onChange:PropTypes.func.isRequired,allowNew:PropTypes.bool,autoFocus:PropTypes.bool,clearable:PropTypes.bool,multiple:PropTypes.bool,showSuggestions:PropTypes.bool,showNewEntry:PropTypes.bool,searchDelay:PropTypes.number,maxHeight:PropTypes.number,minQueryLength:PropTypes.number,addon:PropTypes.node,placeholder:PropTypes.string,alert:PropTypes.shape({message:PropTypes.string.isRequired,type:PropTypes.oneOf(["error","warning","neutral"]).isRequired}),footer:PropTypes.node,validateChip:PropTypes.func,onSearch:PropTypes.func,onBlur:PropTypes.func,onInputChange:PropTypes.func,onFocus:PropTypes.func,chipSeparators:PropTypes.arrayOf(PropTypes.string),size:PropTypes.oneOf(["md","lg"]),inputAutoComplete:PropTypes.string,autoFillOnBlur:PropTypes.bool},Typeahead.defaultProps={allowNew:!1,autoFocus:!1,clearable:!0,multiple:!1,maxHeight:null,showSuggestions:!0,showNewEntry:!0,searchDelay:SEARCH_DELAY,minQueryLength:3,addon:null,placeholder:null,alert:null,footer:null,size:Size.MEDIUM,chipSeparators:[],initialValue:[],onSearch:null,onBlur:null,onInputChange:null,onFocus:null,validateChip:function validateChip(){return!0},inputAutoComplete:"new-password",autoFillOnBlur:!0};
@@ -0,0 +1 @@
1
+ import Typeahead from"./Typeahead";export default Typeahead;
@@ -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}}/* eslint-disable jsx-a11y/no-autofocus */ /* eslint-disable jsx-a11y/click-events-have-key-events */ /* eslint-disable jsx-a11y/no-static-element-interactions */import classnames from"classnames";import PropTypes from"prop-types";import{Component}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var DEFAULT_INPUT_MIN_WIDTH=10,TypeaheadInput=/*#__PURE__*/function(a){function b(){var a;return _classCallCheck(this,b),a=c.call(this),_defineProperty(_assertThisInitialized(a),"recalculateWidth",function(){requestAnimationFrame(function(){a.setState({inputWidth:Math.max(DEFAULT_INPUT_MIN_WIDTH,a.sizerRef.scrollWidth+10)})})}),_defineProperty(_assertThisInitialized(a),"renderInput",function(){var b=a.props,c=b.typeaheadId,d=b.autoFocus,e=b.multiple,f=b.name,g=b.optionsShown,h=b.placeholder,i=b.selected,j=b.value,k=b.onChange,l=b.onKeyDown,m=b.onFocus,n=b.onPaste,o=b.autoComplete,p=a.state.inputWidth,q=!e||0===i.length;return/*#__PURE__*/_jsx("input",{ref:function ref(b){a.inputRef=b},className:classnames({"typeahead__input form-control":e,"form-control":!e}),type:"text",name:f,id:"input-".concat(c),autoFocus:d,placeholder:q?h:"","aria-autocomplete":"list","aria-expanded":g,"aria-haspopup":"listbox","aria-controls":"menu-".concat(c),autoComplete:o,role:"combobox",value:j,style:e&&0<i.length?{width:p}:{},onChange:k,onKeyDown:l,onClick:m,onFocus:m,onPaste:n})}),a.state={inputWidth:DEFAULT_INPUT_MIN_WIDTH},a}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"componentDidMount",value:function componentDidMount(){var a=this.props.autoFocus;a&&this.inputRef.focus()}},{key:"componentDidUpdate",value:function componentDidUpdate(a){a.value!==this.props.value&&this.props.multiple&&this.recalculateWidth()}},{key:"render",value:function render(){var a=this,b=this.props,c=b.multiple,d=b.selected,e=b.value,f=b.maxHeight,g=b.renderChip;return c?/*#__PURE__*/_jsxs("div",{className:"form-control typeahead__input-container",style:f&&{maxHeight:f},onClick:function onClick(){a.inputRef.focus()},children:[/*#__PURE__*/_jsxs("div",{className:"typeahead__input-wrapper",children:[d&&d.map(function(a,b){return g(a,b)}),this.renderInput(),/*#__PURE__*/_jsx("div",{className:"typeahead__input-aligner"})]}),/*#__PURE__*/_jsx("div",{ref:function ref(b){a.sizerRef=b},className:"sizer form-control typeahead__input",children:e})]}):this.renderInput()}}]),b}(Component);export{TypeaheadInput as default};TypeaheadInput.propTypes={typeaheadId:PropTypes.string.isRequired,name:PropTypes.string.isRequired,autoFocus:PropTypes.bool,multiple:PropTypes.bool.isRequired,value:PropTypes.string.isRequired,selected:PropTypes.arrayOf(PropTypes.object),placeholder:PropTypes.string,optionsShown:PropTypes.bool,maxHeight:PropTypes.number,autoComplete:PropTypes.string.isRequired,onChange:PropTypes.func.isRequired,renderChip:PropTypes.func.isRequired,onKeyDown:PropTypes.func.isRequired,onFocus:PropTypes.func.isRequired,onPaste:PropTypes.func.isRequired},TypeaheadInput.defaultProps={autoFocus:!1,maxHeight:null,placeholder:"",optionsShown:!1,selected:[]};
@@ -0,0 +1 @@
1
+ /* eslint-disable jsx-a11y/anchor-is-valid */import classNames from"classnames";import PropTypes from"prop-types";import hightlight from"../util/highlight";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Option=function(a){var b=a.option,c=a.selected,d=a.onClick,e=a.query,f=b.label,g=b.note,h=b.secondary;return/*#__PURE__*/_jsx("li",{role:"option","aria-selected":"false",className:classNames("typeahead__option tw-dropdown-item clickable",{"tw-dropdown-item--focused":c}),children:/*#__PURE__*/_jsxs("a",{className:"dropdown-item",href:"#",onClick:d,children:[/*#__PURE__*/_jsx("span",{children:hightlight(f,e)}),g&&/*#__PURE__*/_jsx("span",{className:"np-text-body-default m-l-1",children:g}),h&&/*#__PURE__*/_jsx("span",{className:"np-text-body-default text-ellipsis",children:h})]})})};Option.propTypes={option:PropTypes.shape({label:PropTypes.string.isRequired,note:PropTypes.string,secondary:PropTypes.string}).isRequired,query:PropTypes.string,selected:PropTypes.bool,onClick:PropTypes.func},Option.defaultProps={selected:!1,query:"",onClick:function onClick(){}};export default Option;
@@ -0,0 +1 @@
1
+ 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 function hightlight(a,b){if(a&&b){var c=a.toUpperCase().indexOf(b.trim().toUpperCase()),d=c+b.trim().length;if(-1!==c)return/*#__PURE__*/_jsxs(_Fragment,{children:[a.slice(0,Math.max(0,c)),/*#__PURE__*/_jsx("strong",{children:a.slice(c,d)}),a.slice(Math.max(0,d))]})}return a}
@@ -0,0 +1,12 @@
1
+ import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";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";var _UPLOAD_STEP_COMPONEN;import _regeneratorRuntime from"@babel/runtime/regenerator";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{Plus as PlusIcon}from"@transferwise/icons";import classNames from"classnames";import PropTypes from"prop-types";import{Component}from"react";import{injectIntl}from"react-intl";import{Status,Typography}from"../common";import Title from"../title";import messages from"./Upload.messages";import{UploadImageStep,MediaUploadStep,ProcessingStep,CompleteStep}from"./steps";import{UploadStep}from"./uploadSteps";import{postData,asyncFileRead,isSizeValid,isTypeValid,getFileType}from"./utils";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var PROCESS_STATE=["error","success"],ANIMATION_FIX=10,MAX_SIZE_DEFAULT=5e6,UPLOAD_STEP_COMPONENTS=(_UPLOAD_STEP_COMPONEN={},_defineProperty(_UPLOAD_STEP_COMPONEN,UploadStep.UPLOAD_IMAGE_STEP,UploadImageStep),_defineProperty(_UPLOAD_STEP_COMPONEN,UploadStep.MEDIA_UPLOAD_STEP,MediaUploadStep),_UPLOAD_STEP_COMPONEN),Upload=/*#__PURE__*/function(a){function b(a){var d;return _classCallCheck(this,b),d=c.call(this,a),_defineProperty(_assertThisInitialized(d),"onAnimationCompleted",/*#__PURE__*/function(){var a=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function b(a){var c,e,f,g,h,i,j;return _regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:c=d.state,e=c.response,f=c.isProcessing,g=c.fileName,h=d.props.animationDelay,f&&a===Status.SUCCEEDED&&(i=d.props.onSuccess,d.timeouts=setTimeout(function(){d.setState({isProcessing:!1,isComplete:!0},function(){return i?i(e,g):{}})},h)),f&&a===Status.FAILED&&(j=d.props.onFailure,d.timeouts=setTimeout(function(){d.setState({isProcessing:!1,isComplete:!0},function(){return j?j(e):{}})},h));case 4:case"end":return b.stop();}},b)}));return function(){return a.apply(this,arguments)}}()),_defineProperty(_assertThisInitialized(d),"asyncPost",function(a){var b=d.props,c=b.httpOptions,e=b.fetcher,f=c||{},g=f.fileInputName,h=void 0===g?a.name:g,i=f.data,j=void 0===i?{}:i,k=new FormData;return k.append(h,a),Object.keys(j).forEach(function(a){return k.append(a,j[a])}),postData(d.prepareHttpOptions(c),k,e)}),_defineProperty(_assertThisInitialized(d),"asyncResponse",function(a,b){d.timeouts=setTimeout(function(){d.setState({response:a,isError:b===PROCESS_STATE[0],isSuccess:b===PROCESS_STATE[1]})},ANIMATION_FIX)}),_defineProperty(_assertThisInitialized(d),"prepareHttpOptions",function(a){if(!a.url)throw new Error("You must supply a URL to post image data asynchronously");return a}),_defineProperty(_assertThisInitialized(d),"handleOnClear",function(a){a.preventDefault();var b=d.props.onCancel;b&&b(),d.reset()}),_defineProperty(_assertThisInitialized(d),"reset",function(){d.dragCounter=0,clearTimeout(d.timeouts),d.setState({isComplete:!1,isError:!1,isProcessing:!1,isSuccess:!1})}),_defineProperty(_assertThisInitialized(d),"showDataImage",function(a){var b=d.state.isImage;b&&d.setState({uploadedImage:a})}),_defineProperty(_assertThisInitialized(d),"fileDropped",/*#__PURE__*/function(){var a=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function b(a){var c,e,f,g,h,i,j,k,l,m;return _regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(c=d.props,e=c.httpOptions,f=c.maxSize,g=c.onStart,h=c.usDisabled,i=c.usAccept,j=d.state.isProcessing,!(h||j)){b.next=4;break}return b.abrupt("return",!1);case 4:if(a){b.next=6;break}throw new Error("Could not retrieve file");case 6:return d.setState({fileName:a.name,isDroppable:!1,isProcessing:!0}),g&&g(a),k=null,b.prev=9,b.next=12,asyncFileRead(a);case 12:k=b.sent,b.next=18;break;case 15:b.prev=15,b.t0=b["catch"](9),d.asyncResponse(b.t0,PROCESS_STATE[0]);case 18:if(k){b.next=20;break}return b.abrupt("return",!1);case 20:if(d.setState({isImage:getFileType(a,k).includes("image")}),isTypeValid(a,i,k)){b.next=25;break}return l={status:415,statusText:"Unsupported Media Type"},d.asyncResponse(l,PROCESS_STATE[0]),b.abrupt("return",!1);case 25:if(isSizeValid(a,f)){b.next=29;break}return m={status:413,statusText:"Request Entity Too Large"},d.asyncResponse(m,PROCESS_STATE[0]),b.abrupt("return",!1);case 29:if(!e){b.next=33;break}return b.next=32,d.asyncPost(a).then(function(a){return d.asyncResponse(a,"success")}).then(function(){return d.showDataImage(k),!0}).catch(function(a){return d.asyncResponse(a,PROCESS_STATE[0]),!1});case 32:return b.abrupt("return",b.sent);case 33:return d.showDataImage(k),d.asyncResponse(k,"success"),b.abrupt("return",!0);case 36:case"end":return b.stop();}},b,null,[[9,15]])}));return function(){return a.apply(this,arguments)}}()),d.dragCounter=0,d.timeouts=null,d.state={fileName:"",isComplete:!1,isError:!1,isImage:!1,isProcessing:!1,isSuccess:!1,response:null,uploadedImage:null},d}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"getErrorMessage",value:function getErrorMessage(a){return 413===a?this.props.csTooLargeMessage||this.props.intl.formatMessage(messages.csTooLargeMessage):415===a?this.props.csWrongTypeMessage||this.props.intl.formatMessage(messages.csWrongTypeMessage):this.props.csFailureText||this.props.intl.formatMessage(messages.csFailureText)}},{key:"onDragLeave",value:function onDragLeave(a){a.preventDefault(),this.dragCounter-=1,0===this.dragCounter&&this.setState({isDroppable:!1})}},{key:"onDragEnter",value:function onDragEnter(a){a.preventDefault(),this.dragCounter+=1;var b=this.props.usDisabled,c=this.state.isProcessing;1!==this.dragCounter||b||c||this.setState({isDroppable:!0})}},{key:"onDrop",value:function onDrop(a){var b=this.state.isProcessing;a.preventDefault(),b||this.reset(),a.dataTransfer&&a.dataTransfer.files&&a.dataTransfer.files[0]&&this.fileDropped(a.dataTransfer.files[0])}},{key:"render",value:function render(){var a=this,b=this.props,c=b.usDropMessage,d=b.usAccept,e=b.usButtonText,f=b.usDisabled,g=b.usHelpImage,h=b.usLabel,i=b.usPlaceholder,j=b.psButtonText,k=b.psProcessingText,l=b.csButtonText,m=b.csSuccessText,n=b.size,o=b.uploadStep,p=b.intl,q=this.state,r=q.response,s=q.fileName,t=q.isComplete,u=q.isDroppable,v=q.isError,w=q.isImage,x=q.isProcessing,y=q.isSuccess,z=q.uploadedImage,A=UPLOAD_STEP_COMPONENTS[o]||UploadImageStep;return/*#__PURE__*/_jsxs("div",{className:classNames("droppable-area",{droppable:!0,"tw-droppable-sm droppable-sm":"sm"===n,"tw-droppable-md droppable-md":"md"===n||!n,"tw-droppable-lg droppable-lg":"lg"===n,"droppable-dropping":u,"droppable-processing":x,"droppable-complete":t,"droppable-negative":v}),onDragEnter:function onDragEnter(b){return a.onDragEnter(b)},onDragLeave:function onDragLeave(b){return a.onDragLeave(b)},onDrop:function onDrop(b){return a.onDrop(b)},onDragOver:function onDragOver(a){return a.preventDefault()},children:[!x&&!t&&/*#__PURE__*/_jsx(A,{fileDropped:function fileDropped(b){return a.fileDropped(b)},isComplete:t,usAccept:d,usButtonText:e||p.formatMessage(messages.usButtonText),usDisabled:f,usHelpImage:g,usLabel:h,usPlaceholder:i||p.formatMessage(messages.usPlaceholder)}),x&&/*#__PURE__*/_jsx(ProcessingStep,{isComplete:t,isError:v,isSuccess:y,psButtonText:j||p.formatMessage(messages.psButtonText),psProcessingText:k||p.formatMessage(messages.psProcessingText),onAnimationCompleted:function onAnimationCompleted(b){return a.onAnimationCompleted(b)},onClear:function onClear(b){return a.handleOnClear(b)}}),(y||v||t)&&/*#__PURE__*/_jsx(CompleteStep,{fileName:s,isComplete:t,isError:v,isImage:w,csButtonText:l||p.formatMessage(messages.csButtonText),csFailureText:this.getErrorMessage(null===r||void 0===r?void 0:r.status),csSuccessText:m||p.formatMessage(messages.csSuccessText),uploadedImage:z,onClear:function onClear(b){return a.handleOnClear(b)}}),!x&&/*#__PURE__*/_jsx("div",{className:"droppable-dropping-card droppable-card",children:/*#__PURE__*/_jsxs("div",{className:"droppable-card-content",children:[/*#__PURE__*/_jsx("div",{className:"circle circle-sm p-t-1 text-primary",children:/*#__PURE__*/_jsx(PlusIcon,{size:"16"})}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_BODY,className:"m-t-3",children:c||p.formatMessage(messages.usDropMessage)})]})})]})}}]),b}(Component);/*
2
+ * This delay is required for the isError/isSuccess to be fired after isProcessing so the processIndicator, will be
3
+ * rendered first and then updated with the right status.
4
+ */Upload.propTypes={animationDelay:PropTypes.number,csButtonText:PropTypes.string,csFailureText:PropTypes.string,csSuccessText:PropTypes.string,csTooLargeMessage:PropTypes.string,csWrongTypeMessage:PropTypes.string,httpOptions:PropTypes.shape({url:PropTypes.string.isRequired,method:PropTypes.oneOf(["POST","PUT","PATCH"]),fileInputName:PropTypes.string,data:PropTypes.object,headers:PropTypes.object}),/**
5
+ * You can provide a fetcher function with the same interface as the global fetch function, which is used by default.
6
+ * function fetcher(input: RequestInfo, init?: RequestInit): Promise<Response>
7
+ */fetcher:PropTypes.func,maxSize:PropTypes.number,onCancel:PropTypes.func,onFailure:PropTypes.func,onStart:PropTypes.func,onSuccess:PropTypes.func,psButtonText:PropTypes.string,psProcessingText:PropTypes.string,size:PropTypes.oneOf(["sm","md","lg"]),/**
8
+ * You can provide multiple rules separated by comma, e.g.: "application/pdf,image/*".
9
+ * Using "*" will allow every file type to be uploaded.
10
+ */usAccept:PropTypes.string,usButtonText:PropTypes.string,usDisabled:PropTypes.bool,usDropMessage:PropTypes.string,usHelpImage:PropTypes.node,usLabel:PropTypes.string,usPlaceholder:PropTypes.string,uploadStep:PropTypes.oneOf(["uploadImageStep","mediaUploadStep"])},Upload.defaultProps={animationDelay:700,csButtonText:void 0,csFailureText:void 0,csSuccessText:void 0,csTooLargeMessage:void 0,csWrongTypeMessage:void 0,httpOptions:null,maxSize:MAX_SIZE_DEFAULT,onCancel:null,onFailure:null,onStart:null,onSuccess:null,psButtonText:void 0,psProcessingText:void 0,size:"md",usAccept:"image/*",usButtonText:void 0,usDisabled:!1,usDropMessage:void 0,usHelpImage:"",usLabel:"",usPlaceholder:void 0,uploadStep:UploadStep.UPLOAD_IMAGE_STEP};// this export is necessary for react-to-typescript-definitions
11
+ // to be able to properly generate TS types, this is due to us wrapping this component in `injectIntl` before exporting
12
+ export{Upload};export default injectIntl(Upload);
@@ -0,0 +1 @@
1
+ import{defineMessages}from"react-intl";export default defineMessages({csButtonText:{id:"neptune.Upload.csButtonText"},csFailureText:{id:"neptune.Upload.csFailureText"},csSuccessText:{id:"neptune.Upload.csSuccessText"},csTooLargeMessage:{id:"neptune.Upload.csTooLargeMessage"},csWrongTypeMessage:{id:"neptune.Upload.csWrongTypeMessage"},psButtonText:{id:"neptune.Upload.psButtonText"},psProcessingText:{id:"neptune.Upload.psProcessingText"},usButtonText:{id:"neptune.Upload.usButtonText"},usDropMessage:{id:"neptune.Upload.usDropMessage"},usPlaceholder:{id:"neptune.Upload.usPlaceholder"}});
@@ -0,0 +1 @@
1
+ export{UploadStep}from"./uploadSteps";export{default}from"./Upload";
@@ -0,0 +1 @@
1
+ import{AlertCircle as AlertCircleIcon,Document as DocumentIcon}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import{Priority,Typography}from"../../..";import Body from"../../../body";import Button from"../../../button";import{Sentiment,Size}from"../../../common";import StatusIcon from"../../../statusIcon";import Title from"../../../title";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 CompleteStep=function(a){var b=useTheme(),c=b.isModern,d=a.csButtonText,e=a.csFailureText,f=a.csSuccessText,g=a.fileName,h=a.isComplete,i=a.isError,j=a.isImage,k=a.onClear,l=a.uploadedImage;return/*#__PURE__*/_jsx("div",{className:"droppable-complete-card droppable-card","aria-hidden":!h,children:/*#__PURE__*/_jsxs("div",{className:"droppable-card-content",children:[/*#__PURE__*/_jsx("div",{className:"droppable-card-content d-flex flex-column align-items-center",children:i?/*#__PURE__*/_jsxs(_Fragment,{children:[c?/*#__PURE__*/_jsx(StatusIcon,{size:Size.LARGE,sentiment:Sentiment.NEGATIVE}):/*#__PURE__*/_jsx(AlertCircleIcon,{size:24,className:"text-negative"}),e&&/*#__PURE__*/_jsx("p",{className:classNames("m-t-2",{"m-b-0":c}),children:e})]}):/*#__PURE__*/_jsxs(_Fragment,{children:[j&&l?/*#__PURE__*/_jsx("img",{src:l,alt:"OK",className:"thumbnail "}):/*#__PURE__*/_jsx(DocumentIcon,{}),g&&/*#__PURE__*/_jsx(Body,{as:"p",className:"m-b-0",children:g}),f&&/*#__PURE__*/_jsx(Title,{className:"caption m-t-1",type:Typography.TITLE_BODY,children:f})]})}),d&&/*#__PURE__*/_jsx(Button,{priority:c?Priority.PRIMARY:Priority.SECONDARY,className:classNames({"m-t-1":c&&!i,"m-t-2":c&&i,"m-t-3":!c}),onClick:function onClick(a){return k(a)},children:d})]})})};CompleteStep.propTypes={csButtonText:PropTypes.string.isRequired,csSuccessText:PropTypes.string.isRequired,csFailureText:PropTypes.string.isRequired,fileName:PropTypes.string.isRequired,isComplete:PropTypes.bool.isRequired,isError:PropTypes.bool.isRequired,isImage:PropTypes.bool.isRequired,onClear:PropTypes.func.isRequired,uploadedImage:PropTypes.string},CompleteStep.defaultProps={uploadedImage:null};export default CompleteStep;
@@ -0,0 +1 @@
1
+ export{default}from"./completeStep";
@@ -0,0 +1 @@
1
+ export{default as UploadImageStep}from"./uploadImageStep";export{default as MediaUploadStep}from"./mediaUploadStep";export{default as ProcessingStep}from"./processingStep";export{default as CompleteStep}from"./completeStep";
@@ -0,0 +1 @@
1
+ export{default}from"./mediaUploadStep";
@@ -0,0 +1 @@
1
+ import{Upload as UploadIcon}from"@transferwise/icons";import PropTypes from"prop-types";import Body from"../../../body";import Button from"../../../button/Button";import{Typography}from"../../../common";import Title from"../../../title";import{getSupportedSpotMimeTypes,requestMedia}from"../../utils";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var MediaUploadStep=function(a){var b=a.isComplete,c=a.usAccept,d=a.usButtonText,e=a.usDisabled,f=a.usHelpImage,g=a.usLabel,h=a.usPlaceholder,i=a.fileDropped;return/*#__PURE__*/_jsx("div",{children:/*#__PURE__*/_jsx("div",{className:"droppable-default-card","aria-hidden":b,children:/*#__PURE__*/_jsxs("div",{className:"droppable-card-content",children:[/*#__PURE__*/_jsx("div",{className:"m-b-3",children:function getImage(){return f?"string"==typeof f?/*#__PURE__*/_jsx("img",{src:f,alt:g,className:"thumbnail text-xs-center"}):f:/*#__PURE__*/_jsx("div",{className:"circle circle-sm circle-inverse p-t-1",children:/*#__PURE__*/_jsx(UploadIcon,{size:24})})}()}),g&&/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_BODY,className:"m-b-1",children:g}),h&&/*#__PURE__*/_jsx(Body,{as:"p",type:Typography.BODY_LARGE,className:"m-b-3",children:"".concat(h)}),/*#__PURE__*/_jsx(Button,{disabled:e,onClick:function getMediaFile(){var a=getSupportedSpotMimeTypes(c);if(0===a.length)throw new Error("provided mimeTypes not supported");requestMedia({allowedMimeTypes:a}).then(function(a){return i(a)})},children:d||/*#__PURE__*/_jsx(UploadIcon,{size:24,className:"m-r-0"})})]})})})};MediaUploadStep.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 MediaUploadStep;
@@ -0,0 +1 @@
1
+ export{default}from"./processingStep";