@transferwise/components 0.0.0-experimental-5b64b75 → 0.0.0-experimental-702e2d3

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 (612) hide show
  1. package/build/es/no-polyfill/accordion/Accordion.js +1 -1
  2. package/build/es/no-polyfill/accordion/Accordion.story.js +1 -1
  3. package/build/es/no-polyfill/accordion/AccordionItem/AccordionItem.js +1 -1
  4. package/build/es/no-polyfill/actionButton/ActionButton.js +1 -1
  5. package/build/es/no-polyfill/actionButton/ActionButton.spec.js +1 -1
  6. package/build/es/no-polyfill/actionButton/ActionButton.story.js +1 -1
  7. package/build/es/no-polyfill/actionOption/ActionOption.js +1 -1
  8. package/build/es/no-polyfill/actionOption/ActionOption.story.js +1 -1
  9. package/build/es/no-polyfill/alert/Alert.js +1 -1
  10. package/build/es/no-polyfill/alert/Alert.story.js +1 -1
  11. package/build/es/no-polyfill/alert/inlineMarkdown/InlineMarkdown.js +1 -1
  12. package/build/es/no-polyfill/alert/withArrow/alertArrowPositions.js +1 -1
  13. package/build/es/no-polyfill/alert/withArrow/withArrow.js +1 -1
  14. package/build/es/no-polyfill/avatar/Avatar.js +1 -1
  15. package/build/es/no-polyfill/avatar/Avatar.story.js +1 -1
  16. package/build/es/no-polyfill/avatar/avatarTypes.js +1 -1
  17. package/build/es/no-polyfill/avatar/colors/colors.js +2 -2
  18. package/build/es/no-polyfill/avatarWrapper/AvatarWrapper.js +1 -1
  19. package/build/es/no-polyfill/avatarWrapper/AvatarWrapper.story.js +1 -1
  20. package/build/es/no-polyfill/badge/Badge.js +1 -1
  21. package/build/es/no-polyfill/body/Body.js +2 -2
  22. package/build/es/no-polyfill/body/Body.spec.js +1 -1
  23. package/build/es/no-polyfill/body/Body.story.js +1 -1
  24. package/build/es/no-polyfill/button/Button.js +5 -5
  25. package/build/es/no-polyfill/button/Button.story.js +1 -1
  26. package/build/es/no-polyfill/button/classMap.js +1 -1
  27. package/build/es/no-polyfill/button/legacyUtils/legacyUtils.js +2 -2
  28. package/build/es/no-polyfill/card/Card.js +1 -1
  29. package/build/es/no-polyfill/checkbox/Checkbox.js +1 -1
  30. package/build/es/no-polyfill/checkbox/Checkbox.story.js +1 -1
  31. package/build/es/no-polyfill/checkboxButton/CheckboxButton.js +1 -1
  32. package/build/es/no-polyfill/checkboxButton/CheckboxButton.spec.js +1 -1
  33. package/build/es/no-polyfill/checkboxButton/CheckboxButton.story.js +2 -2
  34. package/build/es/no-polyfill/checkboxOption/CheckboxOption.js +1 -1
  35. package/build/es/no-polyfill/checkboxOption/CheckboxOption.spec.js +1 -1
  36. package/build/es/no-polyfill/checkboxOption/CheckboxOption.story.js +1 -1
  37. package/build/es/no-polyfill/chevron/Chevron.js +1 -1
  38. package/build/es/no-polyfill/chevron/Chevron.story.js +1 -1
  39. package/build/es/no-polyfill/chips/Chip.js +1 -1
  40. package/build/es/no-polyfill/chips/Chips.js +1 -1
  41. package/build/es/no-polyfill/chips/Chips.spec.js +1 -1
  42. package/build/es/no-polyfill/chips/Chips.story.js +1 -1
  43. package/build/es/no-polyfill/circularButton/CircularButton.js +1 -1
  44. package/build/es/no-polyfill/common/DOMOperations/DOMOperations.js +3 -3
  45. package/build/es/no-polyfill/common/Option/Option.js +1 -1
  46. package/build/es/no-polyfill/common/RadioButton/RadioButton.js +1 -1
  47. package/build/es/no-polyfill/common/bottomSheet/BottomSheet.js +4 -4
  48. package/build/es/no-polyfill/common/bottomSheet/BottomSheet.spec.js +1 -1
  49. package/build/es/no-polyfill/common/bottomSheet/BottomSheet.story.js +2 -2
  50. package/build/es/no-polyfill/common/closeButton/CloseButton.js +1 -1
  51. package/build/es/no-polyfill/common/dateUtils/getDayNames/getDayNames.js +2 -2
  52. package/build/es/no-polyfill/common/dateUtils/getMonthNames/getMonthNames.js +1 -1
  53. package/build/es/no-polyfill/common/dateUtils/isDateValid/isDateValid.js +1 -1
  54. package/build/es/no-polyfill/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.js +1 -1
  55. package/build/es/no-polyfill/common/deviceDetection/deviceDetection.js +1 -1
  56. package/build/es/no-polyfill/common/direction.js +1 -1
  57. package/build/es/no-polyfill/common/domHelpers/index.js +1 -1
  58. package/build/es/no-polyfill/common/fakeEvents.js +1 -1
  59. package/build/es/no-polyfill/common/fileType.js +1 -1
  60. package/build/es/no-polyfill/common/flowHeader/FlowHeader.js +1 -1
  61. package/build/es/no-polyfill/common/focusBoundary/FocusBoundary.js +1 -1
  62. package/build/es/no-polyfill/common/focusBoundary/FocusBoundary.spec.js +1 -1
  63. package/build/es/no-polyfill/common/focusBoundary/utils/getFocusableElements.js +2 -2
  64. package/build/es/no-polyfill/common/focusBoundary/utils/resetFocus.js +1 -1
  65. package/build/es/no-polyfill/common/historyNavigator/historyNavigator.js +1 -1
  66. package/build/es/no-polyfill/common/hooks/useClientWidth/useClientWidth.js +3 -3
  67. package/build/es/no-polyfill/common/hooks/useConditionalListener/useConditionalListener.js +1 -1
  68. package/build/es/no-polyfill/common/hooks/useDirection/useDirection.js +1 -1
  69. package/build/es/no-polyfill/common/hooks/useHasIntersected/useHasIntersected.js +2 -2
  70. package/build/es/no-polyfill/common/hooks/useLayout/useLayout.js +1 -1
  71. package/build/es/no-polyfill/common/key.js +1 -1
  72. package/build/es/no-polyfill/common/locale/index.js +7 -7
  73. package/build/es/no-polyfill/common/panel/Panel.js +6 -6
  74. package/build/es/no-polyfill/common/propsValues/breakpoint.js +1 -1
  75. package/build/es/no-polyfill/common/propsValues/control.js +1 -1
  76. package/build/es/no-polyfill/common/propsValues/dateMode.js +1 -1
  77. package/build/es/no-polyfill/common/propsValues/layouts.js +1 -1
  78. package/build/es/no-polyfill/common/propsValues/markdownNodeType.js +1 -1
  79. package/build/es/no-polyfill/common/propsValues/monthFormat.js +1 -1
  80. package/build/es/no-polyfill/common/propsValues/position.js +1 -1
  81. package/build/es/no-polyfill/common/propsValues/profileType.js +1 -1
  82. package/build/es/no-polyfill/common/propsValues/scroll.js +1 -1
  83. package/build/es/no-polyfill/common/propsValues/sentiment.js +1 -1
  84. package/build/es/no-polyfill/common/propsValues/size.js +1 -1
  85. package/build/es/no-polyfill/common/propsValues/status.js +1 -1
  86. package/build/es/no-polyfill/common/propsValues/type.js +1 -1
  87. package/build/es/no-polyfill/common/propsValues/typography.js +1 -1
  88. package/build/es/no-polyfill/common/propsValues/variant.js +1 -1
  89. package/build/es/no-polyfill/common/propsValues/width.js +1 -1
  90. package/build/es/no-polyfill/common/requirements.js +2 -2
  91. package/build/es/no-polyfill/common/responsivePanel/ResponsivePanel.js +1 -1
  92. package/build/es/no-polyfill/common/textFormat/formatWithPattern/formatWithPattern.js +2 -2
  93. package/build/es/no-polyfill/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.js +1 -1
  94. package/build/es/no-polyfill/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js +1 -1
  95. package/build/es/no-polyfill/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js +1 -1
  96. package/build/es/no-polyfill/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js +1 -1
  97. package/build/es/no-polyfill/common/textFormat/unformatWithPattern/unformatWithPattern.js +1 -1
  98. package/build/es/no-polyfill/common/theme.js +1 -1
  99. package/build/es/no-polyfill/criticalBanner/CriticalCommsBanner.js +1 -1
  100. package/build/es/no-polyfill/criticalBanner/CriticalCommsBanner.story.js +1 -1
  101. package/build/es/no-polyfill/dateInput/DateInput.js +4 -10
  102. package/build/es/no-polyfill/dateInput/DateInput.story.js +1 -1
  103. package/build/es/no-polyfill/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js +1 -1
  104. package/build/es/no-polyfill/dateInput/utils/explodeDate/explodeDate.js +1 -1
  105. package/build/es/no-polyfill/dateLookup/DateLookup.js +3 -4
  106. package/build/es/no-polyfill/dateLookup/dateHeader/DateHeader.js +1 -1
  107. package/build/es/no-polyfill/dateLookup/dateTrigger/DateTrigger.js +1 -1
  108. package/build/es/no-polyfill/dateLookup/dayCalendar/DayCalendar.js +1 -1
  109. package/build/es/no-polyfill/dateLookup/dayCalendar/table/DayCalendarTable.js +4 -5
  110. package/build/es/no-polyfill/dateLookup/monthCalendar/MonthCalendar.js +1 -1
  111. package/build/es/no-polyfill/dateLookup/monthCalendar/table/MonthCalendarTable.js +1 -1
  112. package/build/es/no-polyfill/dateLookup/tableLink/TableLink.js +1 -1
  113. package/build/es/no-polyfill/dateLookup/yearCalendar/YearCalendar.js +1 -1
  114. package/build/es/no-polyfill/dateLookup/yearCalendar/table/YearCalendarTable.js +1 -1
  115. package/build/es/no-polyfill/decision/Decision.js +5 -5
  116. package/build/es/no-polyfill/decision/decisionEnums.js +2 -2
  117. package/build/es/no-polyfill/definitionList/DefinitionList.js +1 -1
  118. package/build/es/no-polyfill/dimmer/Dimmer.js +3 -3
  119. package/build/es/no-polyfill/dimmer/Dimmer.story.js +2 -2
  120. package/build/es/no-polyfill/dimmer/dimmerManager/DimmerManager.js +3 -3
  121. package/build/es/no-polyfill/display/Display.js +1 -1
  122. package/build/es/no-polyfill/display/Display.story.js +2 -2
  123. package/build/es/no-polyfill/drawer/Drawer.js +1 -1
  124. package/build/es/no-polyfill/dropFade/DropFade.js +3 -3
  125. package/build/es/no-polyfill/dropFade/DropFade.story.js +1 -1
  126. package/build/es/no-polyfill/dynamicFieldDefinitionList/DynamicFieldDefinitionList.js +1 -1
  127. package/build/es/no-polyfill/dynamicFieldDefinitionList/FormattedValue/FormattedValue.js +1 -1
  128. package/build/es/no-polyfill/dynamicFieldDefinitionList/utils/createDefinitions.js +2 -2
  129. package/build/es/no-polyfill/dynamicFieldDefinitionList/utils/text-format.js +1 -1
  130. package/build/es/no-polyfill/emphasis/Emphasis.js +2 -2
  131. package/build/es/no-polyfill/emphasis/Emphasis.story.js +1 -1
  132. package/build/es/no-polyfill/emphasis/EmphasisHtmlTransformer.js +2 -2
  133. package/build/es/no-polyfill/flowNavigation/FlowNavigation.js +2 -2
  134. package/build/es/no-polyfill/flowNavigation/animatedLabel/AnimatedLabel.js +1 -1
  135. package/build/es/no-polyfill/flowNavigation/backButton/BackButton.js +1 -1
  136. package/build/es/no-polyfill/header/Header.js +2 -2
  137. package/build/es/no-polyfill/header/Header.spec.js +1 -1
  138. package/build/es/no-polyfill/header/Header.story.js +2 -1
  139. package/build/es/no-polyfill/i18n/index.js +1 -1
  140. package/build/es/no-polyfill/image/Image.js +2 -2
  141. package/build/es/no-polyfill/info/Info.js +1 -1
  142. package/build/es/no-polyfill/info/Info.story.js +1 -1
  143. package/build/es/no-polyfill/info/infoPresentations.js +1 -1
  144. package/build/es/no-polyfill/inlineAlert/InlineAlert.js +1 -1
  145. package/build/es/no-polyfill/inputWithDisplayFormat/InputWithDisplayFormat.js +1 -1
  146. package/build/es/no-polyfill/inputs/Input.js +1 -1
  147. package/build/es/no-polyfill/inputs/TextArea.js +1 -1
  148. package/build/es/no-polyfill/inputs/_common.js +2 -2
  149. package/build/es/no-polyfill/instructionsList/InstructionsList.js +3 -3
  150. package/build/es/no-polyfill/link/Link.js +2 -2
  151. package/build/es/no-polyfill/link/Link.spec.js +1 -1
  152. package/build/es/no-polyfill/link/Link.story.js +1 -1
  153. package/build/es/no-polyfill/listItem/ListItem.js +1 -1
  154. package/build/es/no-polyfill/listItem/ListItem.spec.js +1 -1
  155. package/build/es/no-polyfill/listItem/ListItem.story.js +1 -1
  156. package/build/es/no-polyfill/loader/Loader.js +2 -2
  157. package/build/es/no-polyfill/loader/Loader.story.js +1 -1
  158. package/build/es/no-polyfill/logo/Logo.js +1 -1
  159. package/build/es/no-polyfill/logo/Logo.story.js +1 -1
  160. package/build/es/no-polyfill/logo/logoTypes.js +1 -1
  161. package/build/es/no-polyfill/markdown/Markdown.js +1 -1
  162. package/build/es/no-polyfill/markdown/Markdown.story.js +1 -1
  163. package/build/es/no-polyfill/modal/Modal.js +1 -1
  164. package/build/es/no-polyfill/modal/Modal.story.js +2 -2
  165. package/build/es/no-polyfill/money/Money.js +1 -1
  166. package/build/es/no-polyfill/money/Money.story.js +1 -1
  167. package/build/es/no-polyfill/moneyInput/MoneyInput.js +1 -1
  168. package/build/es/no-polyfill/moneyInput/MoneyInput.story.js +1 -1
  169. package/build/es/no-polyfill/moneyInput/currencyFormatting.js +2 -2
  170. package/build/es/no-polyfill/navigationOption/NavigationOption.js +1 -1
  171. package/build/es/no-polyfill/navigationOptionsList/NavigationOptionsList.js +1 -1
  172. package/build/es/no-polyfill/nudge/Nudge.js +1 -1
  173. package/build/es/no-polyfill/overlayHeader/OverlayHeader.js +1 -1
  174. package/build/es/no-polyfill/phoneNumberInput/PhoneNumberInput.js +1 -1
  175. package/build/es/no-polyfill/phoneNumberInput/data/countries.js +1 -1
  176. package/build/es/no-polyfill/phoneNumberInput/utils/cleanNumber/cleanNumber.js +1 -1
  177. package/build/es/no-polyfill/phoneNumberInput/utils/excludeCountries/excludeCountries.js +2 -2
  178. package/build/es/no-polyfill/phoneNumberInput/utils/explodeNumberModel/index.js +1 -1
  179. package/build/es/no-polyfill/phoneNumberInput/utils/filterOptionsForQuery/index.js +1 -1
  180. package/build/es/no-polyfill/phoneNumberInput/utils/findCountryByCode/index.js +1 -1
  181. package/build/es/no-polyfill/phoneNumberInput/utils/findCountryByPrefix/index.js +1 -1
  182. package/build/es/no-polyfill/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js +1 -1
  183. package/build/es/no-polyfill/phoneNumberInput/utils/isOptionAndFitsQuery/isOptionAndFitsQuery.js +1 -1
  184. package/build/es/no-polyfill/phoneNumberInput/utils/isStringNumeric/isStringNumeric.js +1 -1
  185. package/build/es/no-polyfill/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.js +1 -1
  186. package/build/es/no-polyfill/phoneNumberInput/utils/longestMatchingPrefix/index.js +1 -1
  187. package/build/es/no-polyfill/phoneNumberInput/utils/setDefaultPrefix/index.js +2 -2
  188. package/build/es/no-polyfill/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js +2 -2
  189. package/build/es/no-polyfill/popover/Popover.js +2 -2
  190. package/build/es/no-polyfill/processIndicator/ProcessIndicator.js +4 -4
  191. package/build/es/no-polyfill/processIndicator/ProcessIndicator.story.js +1 -1
  192. package/build/es/no-polyfill/progress/Progress.js +1 -1
  193. package/build/es/no-polyfill/progress/Progress.story.js +1 -1
  194. package/build/es/no-polyfill/progressBar/ProgressBar.js +1 -1
  195. package/build/es/no-polyfill/progressBar/ProgressBar.story.js +1 -1
  196. package/build/es/no-polyfill/provider/Provider.js +1 -1
  197. package/build/es/no-polyfill/provider/Provider.spec.js +1 -1
  198. package/build/es/no-polyfill/provider/Provider.story.js +1 -1
  199. package/build/es/no-polyfill/provider/direction/DirectionProvider.js +1 -1
  200. package/build/es/no-polyfill/provider/direction/DirectionProvider.spec.js +1 -1
  201. package/build/es/no-polyfill/provider/language/LanguageProvider.js +1 -1
  202. package/build/es/no-polyfill/provider/language/LanguageProvider.spec.js +1 -1
  203. package/build/es/no-polyfill/radio/Radio.js +1 -1
  204. package/build/es/no-polyfill/radioGroup/RadioGroup.js +2 -2
  205. package/build/es/no-polyfill/radioOption/RadioOption.js +1 -1
  206. package/build/es/no-polyfill/section/Section.js +1 -1
  207. package/build/es/no-polyfill/section/Section.spec.js +1 -1
  208. package/build/es/no-polyfill/section/Section.story.js +1 -1
  209. package/build/es/no-polyfill/select/Select.js +8 -9
  210. package/build/es/no-polyfill/select/option/Option.js +1 -1
  211. package/build/es/no-polyfill/select/searchBox/SearchBox.js +1 -1
  212. package/build/es/no-polyfill/sizeSwapper/SizeSwapper.js +3 -3
  213. package/build/es/no-polyfill/slidingPanel/SlidingPanel.js +1 -1
  214. package/build/es/no-polyfill/snackbar/Snackbar.js +1 -1
  215. package/build/es/no-polyfill/snackbar/SnackbarContext.js +1 -1
  216. package/build/es/no-polyfill/snackbar/SnackbarProvider.js +1 -1
  217. package/build/es/no-polyfill/snackbar/useSnackbar.js +1 -1
  218. package/build/es/no-polyfill/statusIcon/StatusIcon.js +1 -1
  219. package/build/es/no-polyfill/statusIcon/StatusIcon.story.js +1 -1
  220. package/build/es/no-polyfill/stepper/Stepper.js +1 -1
  221. package/build/es/no-polyfill/stepper/deviceDetection.js +2 -2
  222. package/build/es/no-polyfill/sticky/Sticky.js +1 -1
  223. package/build/es/no-polyfill/summary/Summary.js +1 -1
  224. package/build/es/no-polyfill/switch/Switch.js +1 -1
  225. package/build/es/no-polyfill/switch/Switch.story.js +1 -1
  226. package/build/es/no-polyfill/switchOption/SwitchOption.js +1 -1
  227. package/build/es/no-polyfill/switchOption/SwitchOption.story.js +1 -1
  228. package/build/es/no-polyfill/tabs/Tab.js +1 -1
  229. package/build/es/no-polyfill/tabs/TabList.js +1 -1
  230. package/build/es/no-polyfill/tabs/TabPanel.js +1 -1
  231. package/build/es/no-polyfill/tabs/Tabs.js +1 -5
  232. package/build/es/no-polyfill/tabs/utils.js +2 -2
  233. package/build/es/no-polyfill/textareaWithDisplayFormat/TextareaWithDisplayFormat.js +1 -1
  234. package/build/es/no-polyfill/tile/Tile.js +1 -1
  235. package/build/es/no-polyfill/title/Title.js +1 -1
  236. package/build/es/no-polyfill/title/Title.spec.js +1 -1
  237. package/build/es/no-polyfill/title/Title.story.js +1 -1
  238. package/build/es/no-polyfill/tooltip/Tooltip.js +7 -7
  239. package/build/es/no-polyfill/tooltip/Tooltip.spec.js +1 -1
  240. package/build/es/no-polyfill/tooltip/Tooltip.story.js +1 -1
  241. package/build/es/no-polyfill/typeahead/Typeahead.js +1 -1
  242. package/build/es/no-polyfill/typeahead/typeaheadInput/TypeaheadInput.js +1 -1
  243. package/build/es/no-polyfill/typeahead/typeaheadOption/TypeaheadOption.js +1 -1
  244. package/build/es/no-polyfill/typeahead/util/highlight.js +1 -1
  245. package/build/es/no-polyfill/upload/Upload.js +2 -6
  246. package/build/es/no-polyfill/upload/steps/completeStep/completeStep.js +1 -1
  247. package/build/es/no-polyfill/upload/steps/mediaUploadStep/mediaUploadStep.js +1 -1
  248. package/build/es/no-polyfill/upload/steps/processingStep/processingStep.js +1 -1
  249. package/build/es/no-polyfill/upload/steps/uploadImageStep/uploadImageStep.js +1 -1
  250. package/build/es/no-polyfill/upload/uploadSteps.js +1 -1
  251. package/build/es/no-polyfill/upload/utils/asyncFileRead/asyncFileRead.js +1 -1
  252. package/build/es/no-polyfill/upload/utils/getFileType/getFileType.js +1 -1
  253. package/build/es/no-polyfill/upload/utils/getSupportedSpotMimeTypes/getSupportedSpotMimeTypes.js +1 -1
  254. package/build/es/no-polyfill/upload/utils/isSizeValid/isSizeValid.js +1 -1
  255. package/build/es/no-polyfill/upload/utils/isTypeValid/isTypeValid.js +1 -1
  256. package/build/es/no-polyfill/upload/utils/postData/postData.js +1 -1
  257. package/build/es/no-polyfill/upload/utils/requestMedia/requestMedia.js +1 -1
  258. package/build/es/no-polyfill/uploadInput/UploadInput.js +7 -7
  259. package/build/es/no-polyfill/uploadInput/UploadInput.spec.js +1 -1
  260. package/build/es/no-polyfill/uploadInput/UploadInput.story.js +1 -1
  261. package/build/es/no-polyfill/uploadInput/uploadButton/UploadButton.js +1 -1
  262. package/build/es/no-polyfill/uploadInput/uploadButton/UploadButton.spec.js +3 -3
  263. package/build/es/no-polyfill/uploadInput/uploadButton/defaults.js +1 -1
  264. package/build/es/no-polyfill/uploadInput/uploadButton/getAllowedFileTypes.js +3 -3
  265. package/build/es/no-polyfill/uploadInput/uploadButton/getAllowedFileTypes.spec.js +1 -1
  266. package/build/es/no-polyfill/uploadInput/uploadItem/UploadItem.js +2 -2
  267. package/build/es/no-polyfill/uploadInput/uploadItem/UploadItem.spec.js +1 -1
  268. package/build/es/no-polyfill/uploadInput/uploadItem/UploadItemBody.js +1 -1
  269. package/build/es/no-polyfill/utilities/deprecatedProperty/deprecatedProperty.js +1 -1
  270. package/build/es/no-polyfill/withDisplayFormat/WithDisplayFormat.js +3 -4
  271. package/build/es/no-polyfill/withNextPortal/withNextPortal.js +1 -1
  272. package/build/es/polyfill/accordion/Accordion.js +1 -1
  273. package/build/es/polyfill/accordion/Accordion.story.js +1 -1
  274. package/build/es/polyfill/accordion/AccordionItem/AccordionItem.js +1 -1
  275. package/build/es/polyfill/actionButton/ActionButton.js +1 -1
  276. package/build/es/polyfill/actionButton/ActionButton.spec.js +1 -1
  277. package/build/es/polyfill/actionButton/ActionButton.story.js +1 -1
  278. package/build/es/polyfill/actionOption/ActionOption.js +1 -1
  279. package/build/es/polyfill/actionOption/ActionOption.story.js +1 -1
  280. package/build/es/polyfill/alert/Alert.js +1 -1
  281. package/build/es/polyfill/alert/Alert.story.js +1 -1
  282. package/build/es/polyfill/alert/inlineMarkdown/InlineMarkdown.js +1 -1
  283. package/build/es/polyfill/alert/withArrow/alertArrowPositions.js +1 -1
  284. package/build/es/polyfill/alert/withArrow/withArrow.js +1 -1
  285. package/build/es/polyfill/avatar/Avatar.js +1 -1
  286. package/build/es/polyfill/avatar/Avatar.story.js +1 -1
  287. package/build/es/polyfill/avatar/avatarTypes.js +1 -1
  288. package/build/es/polyfill/avatar/colors/colors.js +2 -2
  289. package/build/es/polyfill/avatarWrapper/AvatarWrapper.js +1 -1
  290. package/build/es/polyfill/avatarWrapper/AvatarWrapper.story.js +1 -1
  291. package/build/es/polyfill/badge/Badge.js +1 -1
  292. package/build/es/polyfill/body/Body.js +2 -2
  293. package/build/es/polyfill/body/Body.spec.js +1 -1
  294. package/build/es/polyfill/body/Body.story.js +1 -1
  295. package/build/es/polyfill/button/Button.js +5 -5
  296. package/build/es/polyfill/button/Button.story.js +1 -1
  297. package/build/es/polyfill/button/classMap.js +1 -1
  298. package/build/es/polyfill/button/legacyUtils/legacyUtils.js +2 -2
  299. package/build/es/polyfill/card/Card.js +1 -1
  300. package/build/es/polyfill/checkbox/Checkbox.js +1 -1
  301. package/build/es/polyfill/checkbox/Checkbox.story.js +1 -1
  302. package/build/es/polyfill/checkboxButton/CheckboxButton.js +1 -1
  303. package/build/es/polyfill/checkboxButton/CheckboxButton.spec.js +1 -1
  304. package/build/es/polyfill/checkboxButton/CheckboxButton.story.js +2 -2
  305. package/build/es/polyfill/checkboxOption/CheckboxOption.js +1 -1
  306. package/build/es/polyfill/checkboxOption/CheckboxOption.spec.js +1 -1
  307. package/build/es/polyfill/checkboxOption/CheckboxOption.story.js +1 -1
  308. package/build/es/polyfill/chevron/Chevron.js +1 -1
  309. package/build/es/polyfill/chevron/Chevron.story.js +1 -1
  310. package/build/es/polyfill/chips/Chip.js +1 -1
  311. package/build/es/polyfill/chips/Chips.js +1 -1
  312. package/build/es/polyfill/chips/Chips.spec.js +1 -1
  313. package/build/es/polyfill/chips/Chips.story.js +1 -1
  314. package/build/es/polyfill/circularButton/CircularButton.js +1 -1
  315. package/build/es/polyfill/common/DOMOperations/DOMOperations.js +3 -3
  316. package/build/es/polyfill/common/Option/Option.js +1 -1
  317. package/build/es/polyfill/common/RadioButton/RadioButton.js +1 -1
  318. package/build/es/polyfill/common/bottomSheet/BottomSheet.js +4 -4
  319. package/build/es/polyfill/common/bottomSheet/BottomSheet.spec.js +1 -1
  320. package/build/es/polyfill/common/bottomSheet/BottomSheet.story.js +2 -2
  321. package/build/es/polyfill/common/closeButton/CloseButton.js +1 -1
  322. package/build/es/polyfill/common/dateUtils/getDayNames/getDayNames.js +2 -2
  323. package/build/es/polyfill/common/dateUtils/getMonthNames/getMonthNames.js +1 -1
  324. package/build/es/polyfill/common/dateUtils/isDateValid/isDateValid.js +1 -1
  325. package/build/es/polyfill/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.js +1 -1
  326. package/build/es/polyfill/common/deviceDetection/deviceDetection.js +1 -1
  327. package/build/es/polyfill/common/direction.js +1 -1
  328. package/build/es/polyfill/common/domHelpers/index.js +1 -1
  329. package/build/es/polyfill/common/fakeEvents.js +1 -1
  330. package/build/es/polyfill/common/fileType.js +1 -1
  331. package/build/es/polyfill/common/flowHeader/FlowHeader.js +1 -1
  332. package/build/es/polyfill/common/focusBoundary/FocusBoundary.js +1 -1
  333. package/build/es/polyfill/common/focusBoundary/FocusBoundary.spec.js +1 -1
  334. package/build/es/polyfill/common/focusBoundary/utils/getFocusableElements.js +2 -2
  335. package/build/es/polyfill/common/focusBoundary/utils/resetFocus.js +1 -1
  336. package/build/es/polyfill/common/historyNavigator/historyNavigator.js +1 -1
  337. package/build/es/polyfill/common/hooks/useClientWidth/useClientWidth.js +3 -3
  338. package/build/es/polyfill/common/hooks/useConditionalListener/useConditionalListener.js +1 -1
  339. package/build/es/polyfill/common/hooks/useDirection/useDirection.js +1 -1
  340. package/build/es/polyfill/common/hooks/useHasIntersected/useHasIntersected.js +2 -2
  341. package/build/es/polyfill/common/hooks/useLayout/useLayout.js +1 -1
  342. package/build/es/polyfill/common/key.js +1 -1
  343. package/build/es/polyfill/common/locale/index.js +7 -7
  344. package/build/es/polyfill/common/panel/Panel.js +6 -6
  345. package/build/es/polyfill/common/propsValues/breakpoint.js +1 -1
  346. package/build/es/polyfill/common/propsValues/control.js +1 -1
  347. package/build/es/polyfill/common/propsValues/dateMode.js +1 -1
  348. package/build/es/polyfill/common/propsValues/layouts.js +1 -1
  349. package/build/es/polyfill/common/propsValues/markdownNodeType.js +1 -1
  350. package/build/es/polyfill/common/propsValues/monthFormat.js +1 -1
  351. package/build/es/polyfill/common/propsValues/position.js +1 -1
  352. package/build/es/polyfill/common/propsValues/profileType.js +1 -1
  353. package/build/es/polyfill/common/propsValues/scroll.js +1 -1
  354. package/build/es/polyfill/common/propsValues/sentiment.js +1 -1
  355. package/build/es/polyfill/common/propsValues/size.js +1 -1
  356. package/build/es/polyfill/common/propsValues/status.js +1 -1
  357. package/build/es/polyfill/common/propsValues/type.js +1 -1
  358. package/build/es/polyfill/common/propsValues/typography.js +1 -1
  359. package/build/es/polyfill/common/propsValues/variant.js +1 -1
  360. package/build/es/polyfill/common/propsValues/width.js +1 -1
  361. package/build/es/polyfill/common/requirements.js +2 -2
  362. package/build/es/polyfill/common/responsivePanel/ResponsivePanel.js +1 -1
  363. package/build/es/polyfill/common/textFormat/formatWithPattern/formatWithPattern.js +2 -2
  364. package/build/es/polyfill/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.js +1 -1
  365. package/build/es/polyfill/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js +1 -1
  366. package/build/es/polyfill/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js +1 -1
  367. package/build/es/polyfill/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js +1 -1
  368. package/build/es/polyfill/common/textFormat/unformatWithPattern/unformatWithPattern.js +1 -1
  369. package/build/es/polyfill/common/theme.js +1 -1
  370. package/build/es/polyfill/criticalBanner/CriticalCommsBanner.js +1 -1
  371. package/build/es/polyfill/criticalBanner/CriticalCommsBanner.story.js +1 -1
  372. package/build/es/polyfill/dateInput/DateInput.js +4 -10
  373. package/build/es/polyfill/dateInput/DateInput.story.js +1 -1
  374. package/build/es/polyfill/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js +1 -1
  375. package/build/es/polyfill/dateInput/utils/explodeDate/explodeDate.js +1 -1
  376. package/build/es/polyfill/dateLookup/DateLookup.js +3 -4
  377. package/build/es/polyfill/dateLookup/dateHeader/DateHeader.js +1 -1
  378. package/build/es/polyfill/dateLookup/dateTrigger/DateTrigger.js +1 -1
  379. package/build/es/polyfill/dateLookup/dayCalendar/DayCalendar.js +1 -1
  380. package/build/es/polyfill/dateLookup/dayCalendar/table/DayCalendarTable.js +4 -5
  381. package/build/es/polyfill/dateLookup/monthCalendar/MonthCalendar.js +1 -1
  382. package/build/es/polyfill/dateLookup/monthCalendar/table/MonthCalendarTable.js +1 -1
  383. package/build/es/polyfill/dateLookup/tableLink/TableLink.js +1 -1
  384. package/build/es/polyfill/dateLookup/yearCalendar/YearCalendar.js +1 -1
  385. package/build/es/polyfill/dateLookup/yearCalendar/table/YearCalendarTable.js +1 -1
  386. package/build/es/polyfill/decision/Decision.js +5 -5
  387. package/build/es/polyfill/decision/decisionEnums.js +2 -2
  388. package/build/es/polyfill/definitionList/DefinitionList.js +1 -1
  389. package/build/es/polyfill/dimmer/Dimmer.js +3 -3
  390. package/build/es/polyfill/dimmer/Dimmer.story.js +2 -2
  391. package/build/es/polyfill/dimmer/dimmerManager/DimmerManager.js +3 -3
  392. package/build/es/polyfill/display/Display.js +1 -1
  393. package/build/es/polyfill/display/Display.story.js +2 -2
  394. package/build/es/polyfill/drawer/Drawer.js +1 -1
  395. package/build/es/polyfill/dropFade/DropFade.js +3 -3
  396. package/build/es/polyfill/dropFade/DropFade.story.js +1 -1
  397. package/build/es/polyfill/dynamicFieldDefinitionList/DynamicFieldDefinitionList.js +1 -1
  398. package/build/es/polyfill/dynamicFieldDefinitionList/FormattedValue/FormattedValue.js +2 -2
  399. package/build/es/polyfill/dynamicFieldDefinitionList/utils/createDefinitions.js +2 -2
  400. package/build/es/polyfill/dynamicFieldDefinitionList/utils/text-format.js +1 -1
  401. package/build/es/polyfill/emphasis/Emphasis.js +2 -2
  402. package/build/es/polyfill/emphasis/Emphasis.story.js +1 -1
  403. package/build/es/polyfill/emphasis/EmphasisHtmlTransformer.js +2 -2
  404. package/build/es/polyfill/flowNavigation/FlowNavigation.js +2 -2
  405. package/build/es/polyfill/flowNavigation/animatedLabel/AnimatedLabel.js +1 -1
  406. package/build/es/polyfill/flowNavigation/backButton/BackButton.js +1 -1
  407. package/build/es/polyfill/header/Header.js +2 -2
  408. package/build/es/polyfill/header/Header.spec.js +1 -1
  409. package/build/es/polyfill/header/Header.story.js +2 -1
  410. package/build/es/polyfill/i18n/index.js +1 -1
  411. package/build/es/polyfill/image/Image.js +2 -2
  412. package/build/es/polyfill/info/Info.js +1 -1
  413. package/build/es/polyfill/info/Info.story.js +1 -1
  414. package/build/es/polyfill/info/infoPresentations.js +1 -1
  415. package/build/es/polyfill/inlineAlert/InlineAlert.js +1 -1
  416. package/build/es/polyfill/inputWithDisplayFormat/InputWithDisplayFormat.js +1 -1
  417. package/build/es/polyfill/inputs/Input.js +1 -1
  418. package/build/es/polyfill/inputs/TextArea.js +1 -1
  419. package/build/es/polyfill/inputs/_common.js +2 -2
  420. package/build/es/polyfill/instructionsList/InstructionsList.js +3 -3
  421. package/build/es/polyfill/link/Link.js +2 -2
  422. package/build/es/polyfill/link/Link.spec.js +1 -1
  423. package/build/es/polyfill/link/Link.story.js +1 -1
  424. package/build/es/polyfill/listItem/ListItem.js +1 -1
  425. package/build/es/polyfill/listItem/ListItem.spec.js +1 -1
  426. package/build/es/polyfill/listItem/ListItem.story.js +1 -1
  427. package/build/es/polyfill/loader/Loader.js +2 -2
  428. package/build/es/polyfill/loader/Loader.story.js +1 -1
  429. package/build/es/polyfill/logo/Logo.js +1 -1
  430. package/build/es/polyfill/logo/Logo.story.js +1 -1
  431. package/build/es/polyfill/logo/logoTypes.js +1 -1
  432. package/build/es/polyfill/markdown/Markdown.js +1 -1
  433. package/build/es/polyfill/markdown/Markdown.story.js +1 -1
  434. package/build/es/polyfill/modal/Modal.js +1 -1
  435. package/build/es/polyfill/modal/Modal.story.js +2 -2
  436. package/build/es/polyfill/money/Money.js +1 -1
  437. package/build/es/polyfill/money/Money.story.js +1 -1
  438. package/build/es/polyfill/moneyInput/MoneyInput.js +1 -1
  439. package/build/es/polyfill/moneyInput/MoneyInput.story.js +1 -1
  440. package/build/es/polyfill/moneyInput/currencyFormatting.js +2 -2
  441. package/build/es/polyfill/navigationOption/NavigationOption.js +1 -1
  442. package/build/es/polyfill/navigationOptionsList/NavigationOptionsList.js +1 -1
  443. package/build/es/polyfill/nudge/Nudge.js +1 -1
  444. package/build/es/polyfill/overlayHeader/OverlayHeader.js +1 -1
  445. package/build/es/polyfill/phoneNumberInput/PhoneNumberInput.js +1 -1
  446. package/build/es/polyfill/phoneNumberInput/data/countries.js +1 -1
  447. package/build/es/polyfill/phoneNumberInput/utils/cleanNumber/cleanNumber.js +1 -1
  448. package/build/es/polyfill/phoneNumberInput/utils/excludeCountries/excludeCountries.js +3 -3
  449. package/build/es/polyfill/phoneNumberInput/utils/explodeNumberModel/index.js +2 -2
  450. package/build/es/polyfill/phoneNumberInput/utils/filterOptionsForQuery/index.js +2 -2
  451. package/build/es/polyfill/phoneNumberInput/utils/findCountryByCode/index.js +1 -1
  452. package/build/es/polyfill/phoneNumberInput/utils/findCountryByPrefix/index.js +1 -1
  453. package/build/es/polyfill/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js +1 -1
  454. package/build/es/polyfill/phoneNumberInput/utils/isOptionAndFitsQuery/isOptionAndFitsQuery.js +2 -2
  455. package/build/es/polyfill/phoneNumberInput/utils/isStringNumeric/isStringNumeric.js +1 -1
  456. package/build/es/polyfill/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.js +2 -2
  457. package/build/es/polyfill/phoneNumberInput/utils/longestMatchingPrefix/index.js +1 -1
  458. package/build/es/polyfill/phoneNumberInput/utils/setDefaultPrefix/index.js +2 -2
  459. package/build/es/polyfill/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js +2 -2
  460. package/build/es/polyfill/popover/Popover.js +2 -2
  461. package/build/es/polyfill/processIndicator/ProcessIndicator.js +4 -4
  462. package/build/es/polyfill/processIndicator/ProcessIndicator.story.js +1 -1
  463. package/build/es/polyfill/progress/Progress.js +1 -1
  464. package/build/es/polyfill/progress/Progress.story.js +1 -1
  465. package/build/es/polyfill/progressBar/ProgressBar.js +1 -1
  466. package/build/es/polyfill/progressBar/ProgressBar.story.js +1 -1
  467. package/build/es/polyfill/provider/Provider.js +1 -1
  468. package/build/es/polyfill/provider/Provider.spec.js +1 -1
  469. package/build/es/polyfill/provider/Provider.story.js +1 -1
  470. package/build/es/polyfill/provider/direction/DirectionProvider.js +1 -1
  471. package/build/es/polyfill/provider/direction/DirectionProvider.spec.js +1 -1
  472. package/build/es/polyfill/provider/language/LanguageProvider.js +1 -1
  473. package/build/es/polyfill/provider/language/LanguageProvider.spec.js +1 -1
  474. package/build/es/polyfill/radio/Radio.js +1 -1
  475. package/build/es/polyfill/radioGroup/RadioGroup.js +2 -2
  476. package/build/es/polyfill/radioOption/RadioOption.js +1 -1
  477. package/build/es/polyfill/section/Section.js +1 -1
  478. package/build/es/polyfill/section/Section.spec.js +1 -1
  479. package/build/es/polyfill/section/Section.story.js +1 -1
  480. package/build/es/polyfill/select/Select.js +8 -9
  481. package/build/es/polyfill/select/option/Option.js +2 -2
  482. package/build/es/polyfill/select/searchBox/SearchBox.js +1 -1
  483. package/build/es/polyfill/sizeSwapper/SizeSwapper.js +3 -3
  484. package/build/es/polyfill/slidingPanel/SlidingPanel.js +1 -1
  485. package/build/es/polyfill/snackbar/Snackbar.js +1 -1
  486. package/build/es/polyfill/snackbar/SnackbarContext.js +1 -1
  487. package/build/es/polyfill/snackbar/SnackbarProvider.js +1 -1
  488. package/build/es/polyfill/snackbar/useSnackbar.js +1 -1
  489. package/build/es/polyfill/statusIcon/StatusIcon.js +1 -1
  490. package/build/es/polyfill/statusIcon/StatusIcon.story.js +1 -1
  491. package/build/es/polyfill/stepper/Stepper.js +1 -1
  492. package/build/es/polyfill/stepper/deviceDetection.js +2 -2
  493. package/build/es/polyfill/sticky/Sticky.js +1 -1
  494. package/build/es/polyfill/summary/Summary.js +1 -1
  495. package/build/es/polyfill/switch/Switch.js +1 -1
  496. package/build/es/polyfill/switch/Switch.story.js +1 -1
  497. package/build/es/polyfill/switchOption/SwitchOption.js +1 -1
  498. package/build/es/polyfill/switchOption/SwitchOption.story.js +1 -1
  499. package/build/es/polyfill/tabs/Tab.js +1 -1
  500. package/build/es/polyfill/tabs/TabList.js +1 -1
  501. package/build/es/polyfill/tabs/TabPanel.js +1 -1
  502. package/build/es/polyfill/tabs/Tabs.js +1 -5
  503. package/build/es/polyfill/tabs/utils.js +2 -2
  504. package/build/es/polyfill/textareaWithDisplayFormat/TextareaWithDisplayFormat.js +1 -1
  505. package/build/es/polyfill/tile/Tile.js +1 -1
  506. package/build/es/polyfill/title/Title.js +1 -1
  507. package/build/es/polyfill/title/Title.spec.js +1 -1
  508. package/build/es/polyfill/title/Title.story.js +1 -1
  509. package/build/es/polyfill/tooltip/Tooltip.js +7 -7
  510. package/build/es/polyfill/tooltip/Tooltip.spec.js +1 -1
  511. package/build/es/polyfill/tooltip/Tooltip.story.js +1 -1
  512. package/build/es/polyfill/typeahead/Typeahead.js +1 -1
  513. package/build/es/polyfill/typeahead/typeaheadInput/TypeaheadInput.js +1 -1
  514. package/build/es/polyfill/typeahead/typeaheadOption/TypeaheadOption.js +1 -1
  515. package/build/es/polyfill/typeahead/util/highlight.js +1 -1
  516. package/build/es/polyfill/upload/Upload.js +2 -6
  517. package/build/es/polyfill/upload/steps/completeStep/completeStep.js +1 -1
  518. package/build/es/polyfill/upload/steps/mediaUploadStep/mediaUploadStep.js +1 -1
  519. package/build/es/polyfill/upload/steps/processingStep/processingStep.js +1 -1
  520. package/build/es/polyfill/upload/steps/uploadImageStep/uploadImageStep.js +1 -1
  521. package/build/es/polyfill/upload/uploadSteps.js +1 -1
  522. package/build/es/polyfill/upload/utils/asyncFileRead/asyncFileRead.js +1 -1
  523. package/build/es/polyfill/upload/utils/getFileType/getFileType.js +1 -1
  524. package/build/es/polyfill/upload/utils/getSupportedSpotMimeTypes/getSupportedSpotMimeTypes.js +2 -2
  525. package/build/es/polyfill/upload/utils/isSizeValid/isSizeValid.js +1 -1
  526. package/build/es/polyfill/upload/utils/isTypeValid/isTypeValid.js +1 -1
  527. package/build/es/polyfill/upload/utils/postData/postData.js +1 -1
  528. package/build/es/polyfill/upload/utils/requestMedia/requestMedia.js +1 -1
  529. package/build/es/polyfill/uploadInput/UploadInput.js +7 -7
  530. package/build/es/polyfill/uploadInput/UploadInput.spec.js +1 -1
  531. package/build/es/polyfill/uploadInput/UploadInput.story.js +1 -1
  532. package/build/es/polyfill/uploadInput/uploadButton/UploadButton.js +1 -1
  533. package/build/es/polyfill/uploadInput/uploadButton/UploadButton.spec.js +3 -3
  534. package/build/es/polyfill/uploadInput/uploadButton/defaults.js +1 -1
  535. package/build/es/polyfill/uploadInput/uploadButton/getAllowedFileTypes.js +3 -3
  536. package/build/es/polyfill/uploadInput/uploadButton/getAllowedFileTypes.spec.js +1 -1
  537. package/build/es/polyfill/uploadInput/uploadItem/UploadItem.js +2 -2
  538. package/build/es/polyfill/uploadInput/uploadItem/UploadItem.spec.js +1 -1
  539. package/build/es/polyfill/uploadInput/uploadItem/UploadItemBody.js +1 -1
  540. package/build/es/polyfill/utilities/deprecatedProperty/deprecatedProperty.js +1 -1
  541. package/build/es/polyfill/withDisplayFormat/WithDisplayFormat.js +3 -4
  542. package/build/es/polyfill/withNextPortal/withNextPortal.js +1 -1
  543. package/build/main.css +1 -4194
  544. package/build/styles/accordion/Accordion.css +1 -59
  545. package/build/styles/actionButton/ActionButton.css +1 -36
  546. package/build/styles/avatar/Avatar.css +1 -239
  547. package/build/styles/badge/Badge.css +1 -67
  548. package/build/styles/button/Button.css +1 -17
  549. package/build/styles/card/Card.css +1 -88
  550. package/build/styles/checkboxButton/CheckboxButton.css +1 -21
  551. package/build/styles/chips/Chip.css +1 -169
  552. package/build/styles/circularButton/CircularButton.css +1 -175
  553. package/build/styles/common/Option/Option.css +1 -74
  554. package/build/styles/common/RadioButton/RadioButton.css +1 -3
  555. package/build/styles/common/bottomSheet/BottomSheet.css +1 -44
  556. package/build/styles/common/closeButton/CloseButton.css +1 -44
  557. package/build/styles/common/panel/Panel.css +1 -67
  558. package/build/styles/criticalBanner/CriticalCommsBanner.css +1 -73
  559. package/build/styles/dateInput/DateInput.css +1 -3
  560. package/build/styles/dateLookup/DateLookup.css +1 -80
  561. package/build/styles/dateLookup/dateTrigger/DateTrigger.css +1 -53
  562. package/build/styles/decision/Decision.css +1 -69
  563. package/build/styles/definitionList/DefinitionList.css +1 -48
  564. package/build/styles/dimmer/Dimmer.css +1 -68
  565. package/build/styles/drawer/Drawer.css +1 -77
  566. package/build/styles/dropFade/DropFade.css +1 -19
  567. package/build/styles/dynamicFieldDefinitionList/FormattedValue/FormattedValue.css +1 -4
  568. package/build/styles/emphasis/Emphasis.css +1 -25
  569. package/build/styles/flowNavigation/FlowNavigation.css +1 -85
  570. package/build/styles/flowNavigation/animatedLabel/AnimatedLabel.css +1 -26
  571. package/build/styles/flowNavigation/backButton/BackButton.css +1 -28
  572. package/build/styles/header/Header.css +1 -19
  573. package/build/styles/image/Image.css +1 -13
  574. package/build/styles/info/Info.css +1 -37
  575. package/build/styles/inputs/Input.css +1 -53
  576. package/build/styles/inputs/TextArea.css +1 -59
  577. package/build/styles/instructionsList/InstructionsList.css +1 -30
  578. package/build/styles/link/Link.css +1 -12
  579. package/build/styles/listItem/ListItem.css +1 -6
  580. package/build/styles/loader/Loader.css +1 -295
  581. package/build/styles/logo/Logo.css +1 -10
  582. package/build/styles/main.css +1 -4194
  583. package/build/styles/modal/Modal.css +1 -133
  584. package/build/styles/moneyInput/MoneyInput.css +1 -128
  585. package/build/styles/navigationOption/NavigationOption.css +1 -61
  586. package/build/styles/navigationOptionsList/NavigationOptionsList.css +1 -12
  587. package/build/styles/nudge/Nudge.css +1 -138
  588. package/build/styles/overlayHeader/OverlayHeader.css +1 -31
  589. package/build/styles/phoneNumberInput/PhoneNumberInput.css +1 -17
  590. package/build/styles/popover/Popover.css +1 -36
  591. package/build/styles/progress/Progress.css +1 -35
  592. package/build/styles/progressBar/ProgressBar.css +1 -9
  593. package/build/styles/section/Section.css +1 -8
  594. package/build/styles/select/Select.css +1 -319
  595. package/build/styles/slidingPanel/SlidingPanel.css +1 -96
  596. package/build/styles/snackbar/Snackbar.css +1 -84
  597. package/build/styles/statusIcon/StatusIcon.css +1 -50
  598. package/build/styles/stepper/Stepper.css +1 -108
  599. package/build/styles/summary/Summary.css +1 -86
  600. package/build/styles/switch/Switch.css +1 -64
  601. package/build/styles/tabs/Tabs.css +1 -104
  602. package/build/styles/tile/Tile.css +1 -58
  603. package/build/styles/tooltip/Tooltip.css +1 -38
  604. package/build/styles/typeahead/Typeahead.css +1 -167
  605. package/build/styles/typeahead/typeaheadOption/TypeaheadOption.css +1 -6
  606. package/build/styles/upload/Upload.css +1 -15
  607. package/build/styles/uploadInput/UploadInput.css +1 -53
  608. package/build/styles/uploadInput/uploadButton/UploadButton.css +1 -44
  609. package/build/styles/uploadInput/uploadItem/UploadItem.css +1 -60
  610. package/build/umd/no-polyfill/main.js +1 -1
  611. package/build/umd/polyfill/main.js +1 -1
  612. package/package.json +1 -1
@@ -1,2 +1,2 @@
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"core-js/modules/web.dom-collections.iterator.js";import{action}from"@storybook/addon-actions";import{FastFlag}from"@transferwise/icons";import{useState}from"react";import Body from"../../body/Body";import Button from"../../button";import NavigationOption from"../../navigationOption";import{lorem10,lorem500,storyConfig}from"../../test-utils";import Title from"../../title/Title";import{Typography}from"../propsValues/typography";import BottomSheet from"./BottomSheet";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{component:BottomSheet,title:"Dialogs/BottomSheet",args:{open:!0},render:a=>{// eslint-disable-next-line react-hooks/rules-of-hooks
2
- const[b,c]=useState(a.open);return/*#__PURE__*/_jsxs("div",{style:{height:"2000px"},children:[/*#__PURE__*/_jsx(Button,{onClick:()=>c(!0),children:"Open BottomSheet"}),/*#__PURE__*/_jsx(BottomSheet,_objectSpread(_objectSpread({},a),{},{open:b,onClose:()=>{c(!1),action("BottomSheet closed")()}}))]})}};export const Basic={args:{children:/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SECTION,children:"Money without borders"}),lorem10,/*#__PURE__*/_jsx("br",{}),/*#__PURE__*/_jsx("br",{}),/*#__PURE__*/_jsx(NavigationOption,{title:"Navigation option",content:"Button and icon are vertically centered.",media:/*#__PURE__*/_jsx(FastFlag,{size:24}),isContainerAligned:!0})]})},parameters:{chromatic:{delay:1e3}}};export const BasicMobile=storyConfig(Basic,{variants:["mobile"]});export const WithOverflowContent={args:{children:/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SECTION,children:"Money without borders"}),lorem10,/*#__PURE__*/_jsx(NavigationOption,{title:"Navigation option",content:"Button and icon are vertically centered.",media:/*#__PURE__*/_jsx(FastFlag,{size:24})}),/*#__PURE__*/_jsx(NavigationOption,{title:"Navigation option",content:"Button and icon are vertically centered.",media:/*#__PURE__*/_jsx(FastFlag,{size:24}),isContainerAligned:!0}),lorem500,/*#__PURE__*/_jsx(Body,{type:Typography.BODY_DEFAULT_BOLD,children:lorem10})]})},parameters:{chromatic:{delay:1e3}}};export const WithOverflowContentMobile=storyConfig(WithOverflowContent,{variants:["mobile"]});export const WithOverflowContentDark=storyConfig(WithOverflowContent,{variants:["dark"]});export const WithOverflowContentDarkMobile=storyConfig(WithOverflowContent,{variants:["dark","mobile"]});
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{action}from"@storybook/addon-actions";import{FastFlag}from"@transferwise/icons";import{useState}from"react";import Body from"../../body/Body";import Button from"../../button";import NavigationOption from"../../navigationOption";import{lorem10,lorem500,storyConfig}from"../../test-utils";import Title from"../../title/Title";import{Typography}from"../propsValues/typography";import BottomSheet from"./BottomSheet";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{component:BottomSheet,title:"Dialogs/BottomSheet",args:{open:!0},render:function render(a){// eslint-disable-next-line react-hooks/rules-of-hooks
2
+ var b=useState(a.open),c=_slicedToArray(b,2),d=c[0],e=c[1];return/*#__PURE__*/_jsxs("div",{style:{height:"2000px"},children:[/*#__PURE__*/_jsx(Button,{onClick:function onClick(){return e(!0)},children:"Open BottomSheet"}),/*#__PURE__*/_jsx(BottomSheet,_objectSpread(_objectSpread({},a),{},{open:d,onClose:function onClose(){e(!1),action("BottomSheet closed")()}}))]})}};export var Basic={args:{children:/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SECTION,children:"Money without borders"}),lorem10,/*#__PURE__*/_jsx("br",{}),/*#__PURE__*/_jsx("br",{}),/*#__PURE__*/_jsx(NavigationOption,{title:"Navigation option",content:"Button and icon are vertically centered.",media:/*#__PURE__*/_jsx(FastFlag,{size:24}),isContainerAligned:!0})]})},parameters:{chromatic:{delay:1e3}}};export var BasicMobile=storyConfig(Basic,{variants:["mobile"]});export var WithOverflowContent={args:{children:/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SECTION,children:"Money without borders"}),lorem10,/*#__PURE__*/_jsx(NavigationOption,{title:"Navigation option",content:"Button and icon are vertically centered.",media:/*#__PURE__*/_jsx(FastFlag,{size:24})}),/*#__PURE__*/_jsx(NavigationOption,{title:"Navigation option",content:"Button and icon are vertically centered.",media:/*#__PURE__*/_jsx(FastFlag,{size:24}),isContainerAligned:!0}),lorem500,/*#__PURE__*/_jsx(Body,{type:Typography.BODY_DEFAULT_BOLD,children:lorem10})]})},parameters:{chromatic:{delay:1e3}}};export var WithOverflowContentMobile=storyConfig(WithOverflowContent,{variants:["mobile"]});export var WithOverflowContentDark=storyConfig(WithOverflowContent,{variants:["dark"]});export var WithOverflowContentDarkMobile=storyConfig(WithOverflowContent,{variants:["dark","mobile"]});
@@ -1 +1 @@
1
- import{Cross,CrossCircleFill}from"@transferwise/icons";import classNames from"classnames";import{forwardRef}from"react";import{useIntl}from"react-intl";import{Size}from"../propsValues/size";import messages from"./CloseButton.messages";import{jsx as _jsx}from"react/jsx-runtime";export const CloseButton=/*#__PURE__*/forwardRef(function(a,b){var c;let{"aria-label":d,size:g=Size.MEDIUM,filled:h=!1,className:e,onClick:f}=a;const i=useIntl();null!==(c=d)&&void 0!==c?c:d=i.formatMessage(messages.ariaLabel);const j=h?CrossCircleFill:Cross;return/*#__PURE__*/_jsx("button",{ref:b,type:"button",className:classNames("np-close-button","close btn-link","text-no-decoration",{"np-close-button--large":g===Size.MEDIUM,"np-close-button--x-large":g===Size.LARGE},e),"aria-label":d,onClick:f,children:/*#__PURE__*/_jsx(j,{size:g===Size.SMALL?16:24})})});
1
+ import{Cross,CrossCircleFill}from"@transferwise/icons";import classNames from"classnames";import{forwardRef}from"react";import{useIntl}from"react-intl";import{Size}from"../propsValues/size";import messages from"./CloseButton.messages";import{jsx as _jsx}from"react/jsx-runtime";export var CloseButton=/*#__PURE__*/forwardRef(function(a,b){var c,d=a["aria-label"],e=a.size,f=void 0===e?Size.MEDIUM:e,g=a.filled,h=a.className,i=a.onClick,j=useIntl();null!==(c=d)&&void 0!==c?c:d=j.formatMessage(messages.ariaLabel);var k=void 0!==g&&g?CrossCircleFill:Cross;return/*#__PURE__*/_jsx("button",{ref:b,type:"button",className:classNames("np-close-button","close btn-link","text-no-decoration",{"np-close-button--large":f===Size.MEDIUM,"np-close-button--x-large":f===Size.LARGE},h),"aria-label":d,onClick:i,children:/*#__PURE__*/_jsx(k,{size:f===Size.SMALL?16:24})})});
@@ -1,2 +1,2 @@
1
- import{formatDate}from"@transferwise/formatting";export function getDayNames(a){let b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"short";const c=[],d=new Date(2018,0,1);// 2018 started with Monday
2
- for(;7>c.length;)c.push(formatDate(d,a,{weekday:b})),d.setDate(d.getDate()+1);return c}
1
+ import{formatDate}from"@transferwise/formatting";export function getDayNames(a){// 2018 started with Monday
2
+ for(var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"short",c=[],d=new Date(2018,0,1);7>c.length;)c.push(formatDate(d,a,{weekday:b})),d.setDate(d.getDate()+1);return c}
@@ -1 +1 @@
1
- import{formatDate}from"@transferwise/formatting";export const getMonthNames=function(a){let b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"long";const c=[],d=new Date(2018,0,1),e={month:b};for(;12>c.length;)c.push(formatDate(d,a,e)),d.setMonth(d.getMonth()+1);return c};
1
+ import{formatDate}from"@transferwise/formatting";export var getMonthNames=function(a){for(var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"long",c=[],d=new Date(2018,0,1),e={month:b};12>c.length;)c.push(formatDate(d,a,e)),d.setMonth(d.getMonth()+1);return c};
@@ -1 +1 @@
1
- export const isDateValid=a=>validDateObject(a)||validDateString(a);export const validDateString=a=>"string"==typeof a&&validDateObject(new Date(a));const validDateObject=a=>a instanceof Date&&!isNaN(a);// eslint-disable-line no-restricted-globals
1
+ export var isDateValid=function(a){return validDateObject(a)||validDateString(a)};export var validDateString=function(a){return"string"==typeof a&&validDateObject(new Date(a))};var validDateObject=function(a){return a instanceof Date&&!isNaN(a)};// eslint-disable-line no-restricted-globals
@@ -1 +1 @@
1
- import{validDateString}from"../isDateValid";export const isMonthAndYearFormat=a=>validDateString(a)&&3>a.split("-").length;
1
+ import{validDateString}from"../isDateValid";export var isMonthAndYearFormat=function(a){return validDateString(a)&&3>a.split("-").length};
@@ -1 +1 @@
1
- import"core-js/modules/es.regexp.constructor.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.regexp.to-string.js";import"core-js/modules/es.string.match.js";export function isIosDevice(){const a=["iphone","ipad","ipod"].map(a=>"(".concat(a,")")).join("|"),b=new RegExp(a,"ig");return"undefined"!=typeof navigator&&!!navigator.userAgent.match(b)}
1
+ import"core-js/modules/es.array.join.js";import"core-js/modules/es.array.map.js";import"core-js/modules/es.regexp.constructor.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.regexp.to-string.js";import"core-js/modules/es.string.match.js";export function isIosDevice(){var a=["iphone","ipad","ipod"].map(function(a){return"(".concat(a,")")}).join("|"),b=new RegExp(a,"ig");return"undefined"!=typeof navigator&&!!navigator.userAgent.match(b)}
@@ -1 +1 @@
1
- export let Direction=/*#__PURE__*/function(a){return a.RTL="rtl",a.LTR="ltr",a.AUTO="auto",a}({});
1
+ export var Direction=/*#__PURE__*/function(a){return a.RTL="rtl",a.LTR="ltr",a.AUTO="auto",a}({});
@@ -1 +1 @@
1
- export function isServerSide(){return"undefined"==typeof window}export function isBrowser(){return!isServerSide()}export function stopPropagation(a){a.stopPropagation(),a.preventDefault(),a.nativeEvent&&a.nativeEvent.stopImmediatePropagation&&a.nativeEvent.stopImmediatePropagation()}export function getSimpleRandomId(a){const b=Math.ceil(999999*Math.random());return"".concat(a).concat(b)}export{addClickClassToDocumentOnIos,removeClickClassFromDocumentOnIos}from"./documentIosClick";
1
+ import"core-js/modules/es.array.concat.js";export function isServerSide(){return"undefined"==typeof window}export function isBrowser(){return!isServerSide()}export function stopPropagation(a){a.stopPropagation(),a.preventDefault(),a.nativeEvent&&a.nativeEvent.stopImmediatePropagation&&a.nativeEvent.stopImmediatePropagation()}export function getSimpleRandomId(a){var b=Math.ceil(999999*Math.random());return"".concat(a).concat(b)}export{addClickClassToDocumentOnIos,removeClickClassFromDocumentOnIos}from"./documentIosClick";
@@ -1 +1 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}export const fakeEvent=()=>({nativeEvent:{stopImmediatePropagation(){}},stopPropagation(){},preventDefault(){}});export const fakeKeyDownEventForKey=a=>_objectSpread(_objectSpread({},fakeEvent()),{},{keyCode:a});export const fakeKeyDownEvent=function(){let a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return _objectSpread(_objectSpread({},fakeEvent()),a)};
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}export var fakeEvent=function(){return{nativeEvent:{stopImmediatePropagation:function stopImmediatePropagation(){}},stopPropagation:function stopPropagation(){},preventDefault:function preventDefault(){}}};export var fakeKeyDownEventForKey=function(a){return _objectSpread(_objectSpread({},fakeEvent()),{},{keyCode:a})};export var fakeKeyDownEvent=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return _objectSpread(_objectSpread({},fakeEvent()),a)};
@@ -1 +1 @@
1
- export let FileType=/*#__PURE__*/function(a){return a.PDF=".pdf,application/pdf",a.JPG=".jpg,.jpeg,image/jpeg",a.PNG=".png,image/png",a.CSV=".csv,text/csv",a}({});
1
+ export var FileType=/*#__PURE__*/function(a){return a.PDF=".pdf,application/pdf",a.JPG=".jpg,.jpeg,image/jpeg",a.PNG=".png,image/png",a.CSV=".csv,text/csv",a}({});
@@ -1 +1 @@
1
- import classNames from"classnames";import*as React from"react";import{Layout}from"../propsValues/layouts";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";const FlowHeader=/*#__PURE__*/React.forwardRef((a,b)=>{let{bottomContent:c,className:d,layout:g=Layout.HORIZONTAL,leftContent:e,rightContent:f}=a;const h=g===Layout.VERTICAL;return/*#__PURE__*/_jsxs("div",{ref:b,className:classNames("np-flow-header","d-flex","flex-wrap","align-items-center",d),children:[/*#__PURE__*/_jsx("div",{className:classNames("np-flow-header__left",{"flex__item--8":h}),children:e}),/*#__PURE__*/_jsx("div",{className:classNames("align-items-center","d-flex","np-flow-header__right","justify-content-end",{"flex__item--4 ":h,"order-2":!h}),children:f}),/*#__PURE__*/_jsx("div",{className:classNames("align-items-center","d-flex","justify-content-center",{"flex__item--12":h,"order-1 flex-grow-1":!h}),children:c})]})});export default FlowHeader;
1
+ import classNames from"classnames";import*as React from"react";import{Layout}from"../propsValues/layouts";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var FlowHeader=/*#__PURE__*/React.forwardRef(function(a,b){var c=a.bottomContent,d=a.className,e=a.layout,f=void 0===e?Layout.HORIZONTAL:e,g=a.leftContent,h=a.rightContent,i=f===Layout.VERTICAL;return/*#__PURE__*/_jsxs("div",{ref:b,className:classNames("np-flow-header","d-flex","flex-wrap","align-items-center",d),children:[/*#__PURE__*/_jsx("div",{className:classNames("np-flow-header__left",{"flex__item--8":i}),children:g}),/*#__PURE__*/_jsx("div",{className:classNames("align-items-center","d-flex","np-flow-header__right","justify-content-end",{"flex__item--4 ":i,"order-2":!i}),children:h}),/*#__PURE__*/_jsx("div",{className:classNames("align-items-center","d-flex","justify-content-center",{"flex__item--12":i,"order-1 flex-grow-1":!i}),children:c})]})});export default FlowHeader;
@@ -1 +1 @@
1
- import"core-js/modules/web.dom-collections.iterator.js";import{isKey,isUndefined}from"@transferwise/neptune-validation";import{useEffect,useRef,useState}from"react";import{useConditionalListener}from"../hooks";import{Key}from"../key";import{getFocusableElements,resetFocus}from"./utils";import{jsx as _jsx}from"react/jsx-runtime";const{TAB}=Key,FocusBoundary=a=>{let{children:b}=a;const c=useRef(null),d=isUndefined(document)?void 0:document,[e,f]=useState({});return useEffect(()=>{null!==c&&void 0!==c&&c.current&&(c.current.focus({preventScroll:!0}),f(getFocusableElements(c.current)))},[]),useConditionalListener({eventType:"keydown",callback:a=>{isKey({keyType:TAB,event:a})&&resetFocus({event:a,focusableEls:e})},attachListener:!0,parent:d}),/*#__PURE__*/_jsx("div",{ref:c,tabIndex:-1,className:"np-focus-boundary outline-none",children:b})};export default FocusBoundary;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{isKey,isUndefined}from"@transferwise/neptune-validation";import{useEffect,useRef,useState}from"react";import{useConditionalListener}from"../hooks";import{Key}from"../key";import{getFocusableElements,resetFocus}from"./utils";import{jsx as _jsx}from"react/jsx-runtime";var TAB=Key.TAB,FocusBoundary=function(a){var b=a.children,c=useRef(null),d=isUndefined(document)?void 0:document,e=useState({}),f=_slicedToArray(e,2),g=f[0],h=f[1];return useEffect(function(){null!==c&&void 0!==c&&c.current&&(c.current.focus({preventScroll:!0}),h(getFocusableElements(c.current)))},[]),useConditionalListener({eventType:"keydown",callback:function callback(a){isKey({keyType:TAB,event:a})&&resetFocus({event:a,focusableEls:g})},attachListener:!0,parent:d}),/*#__PURE__*/_jsx("div",{ref:c,tabIndex:-1,className:"np-focus-boundary outline-none",children:b})};export default FocusBoundary;
@@ -1 +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{render,screen,userEvent}from"../../test-utils";import FocusBoundary from"./FocusBoundary";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";const props={onClose:jest.fn()};describe("FocusBoundary",()=>{beforeEach(()=>{jest.clearAllMocks()}),it("renders component",()=>{const{container:a}=render(/*#__PURE__*/_jsx(FocusBoundary,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/_jsx("a",{href:"test",children:"Test"})})));expect(a).toMatchSnapshot()}),it("focus on container by default",()=>{render(/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("a",{href:"test",children:"not focusable"}),/*#__PURE__*/_jsx(FocusBoundary,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/_jsx("a",{href:"test",children:"Test"})}))]})),expect(c()).toHaveFocus()}),it("traps the focus when user presses tab",()=>{render(/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("a",{href:"test",children:"not focusable"}),/*#__PURE__*/_jsxs(FocusBoundary,_objectSpread(_objectSpread({},props),{},{children:[/*#__PURE__*/_jsx("a",{href:"test",children:"firstFocusable"}),/*#__PURE__*/_jsx("a",{href:"test",children:"lastFocusable"})]}))]})),userEvent.tab(),expect(a()).toHaveFocus(),userEvent.tab(),expect(b()).toHaveFocus(),userEvent.tab(),expect(a()).toHaveFocus(),userEvent.tab({shift:!0}),expect(b()).toHaveFocus(),userEvent.tab({shift:!0}),expect(a()).toHaveFocus()});const a=()=>screen.getByText("firstFocusable"),b=()=>screen.getByText("lastFocusable"),c=()=>document.querySelector(".np-focus-boundary")});
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{render,screen,userEvent}from"../../test-utils";import FocusBoundary from"./FocusBoundary";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 props={onClose:jest.fn()};describe("FocusBoundary",function(){beforeEach(function(){jest.clearAllMocks()}),it("renders component",function(){var a=render(/*#__PURE__*/_jsx(FocusBoundary,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/_jsx("a",{href:"test",children:"Test"})}))),b=a.container;expect(b).toMatchSnapshot()}),it("focus on container by default",function(){render(/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("a",{href:"test",children:"not focusable"}),/*#__PURE__*/_jsx(FocusBoundary,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/_jsx("a",{href:"test",children:"Test"})}))]})),expect(c()).toHaveFocus()}),it("traps the focus when user presses tab",function(){render(/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("a",{href:"test",children:"not focusable"}),/*#__PURE__*/_jsxs(FocusBoundary,_objectSpread(_objectSpread({},props),{},{children:[/*#__PURE__*/_jsx("a",{href:"test",children:"firstFocusable"}),/*#__PURE__*/_jsx("a",{href:"test",children:"lastFocusable"})]}))]})),userEvent.tab(),expect(a()).toHaveFocus(),userEvent.tab(),expect(b()).toHaveFocus(),userEvent.tab(),expect(a()).toHaveFocus(),userEvent.tab({shift:!0}),expect(b()).toHaveFocus(),userEvent.tab({shift:!0}),expect(a()).toHaveFocus()});var a=function(){return screen.getByText("firstFocusable")},b=function(){return screen.getByText("lastFocusable")},c=function(){return document.querySelector(".np-focus-boundary")}});
@@ -1,6 +1,6 @@
1
- import"core-js/modules/web.dom-collections.iterator.js";/**
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";/**
2
2
  * This function returns the first and the last focusable elements within a node.
3
3
  *
4
4
  * @param {Node} focusBoundaryContainer - the area that contains focused elements.
5
5
  * @returns {object} focusableEls - which contains the first focusable element and the last focusable element. First and last can be the same element if area contains one or none focusable element.
6
- */export const getFocusableElements=a=>{const b={first:a,last:a};if(null!==a&&void 0!==a&&a.querySelectorAll){const c=[...a.querySelectorAll("a, button, input, textarea, select, details,[tabindex]:not([tabindex=\"-1\"])")].filter(a=>!a.hasAttribute("disabled"));0<c.length&&([b.first]=c,b.last=c[c.length-1])}return b};
6
+ */export var getFocusableElements=function(a){var b={first:a,last:a};if(null!==a&&void 0!==a&&a.querySelectorAll){var c=_toConsumableArray(a.querySelectorAll("a, button, input, textarea, select, details,[tabindex]:not([tabindex=\"-1\"])")).filter(function(a){return!a.hasAttribute("disabled")});if(0<c.length){var d=_slicedToArray(c,1);b.first=d[0],b.last=c[c.length-1]}}return b};
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * @param {object} focusableEls - contains the first last of first focusable elements within a node.
5
5
  * @param {object} event - the triggered event
6
- */export const resetFocus=a=>{let{focusableEls:{first:c,last:d},event:b}=a;const{activeElement:e}=document;b.shiftKey&&e===c&&(d&&d.focus(),b.preventDefault()),b.shiftKey||e!==d||(c&&c.focus(),b.preventDefault())};
6
+ */export var resetFocus=function(a){var b=a.focusableEls,c=b.first,d=b.last,e=a.event,f=document,g=f.activeElement;e.shiftKey&&g===c&&(d&&d.focus(),e.preventDefault()),e.shiftKey||g!==d||(c&&c.focus(),e.preventDefault())};
@@ -1 +1 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";class HistoryNavigator{constructor(){var a=this;let b=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[],c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;_defineProperty(this,"reset",function(){let b=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[""],c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:20;a.history=b,a.currIndex=0<b.length-1?b.length-1:0,a.historyLimit=c}),_defineProperty(this,"add",a=>{!this.historyLimit||this.history.length<=this.historyLimit?(this.history.push(a),this.currIndex=this.history.length-1):this.currIndex=this.history.length-1}),_defineProperty(this,"redo",()=>{const a=this.history.length;return this.currIndex=this.currIndex+1<a?this.currIndex+1:a-1,this.history[this.currIndex]}),_defineProperty(this,"undo",()=>(this.currIndex=0<this.currIndex-1?this.currIndex-1:0,this.history[this.currIndex])),this.history=b&&0<b.length?b:[""],this.currIndex=this.history.length-1,this.historyLimit=c}}export default HistoryNavigator;
1
+ import _createClass from"@babel/runtime/helpers/createClass";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _defineProperty from"@babel/runtime/helpers/defineProperty";var HistoryNavigator=/*#__PURE__*/_createClass(function a(){var b=this,c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[],d=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;_classCallCheck(this,a),_defineProperty(this,"reset",function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[""],c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:20;b.history=a,b.currIndex=0<a.length-1?a.length-1:0,b.historyLimit=c}),_defineProperty(this,"add",function(a){!b.historyLimit||b.history.length<=b.historyLimit?(b.history.push(a),b.currIndex=b.history.length-1):b.currIndex=b.history.length-1}),_defineProperty(this,"redo",function(){var a=b.history.length;return b.currIndex=b.currIndex+1<a?b.currIndex+1:a-1,b.history[b.currIndex]}),_defineProperty(this,"undo",function(){return b.currIndex=0<b.currIndex-1?b.currIndex-1:0,b.history[b.currIndex]}),this.history=c&&0<c.length?c:[""],this.currIndex=this.history.length-1,this.historyLimit=d});export default HistoryNavigator;
@@ -1,5 +1,5 @@
1
- import"core-js/modules/web.dom-collections.iterator.js";import throttle from"lodash.throttle";import{useLayoutEffect,useState,useEffect}from"react";const THROTTLE_MS=100,useIsomorphicLayoutEffect="undefined"==typeof window?useEffect:useLayoutEffect;export const useClientWidth=a=>{let{ref:b,throttleMs:c=THROTTLE_MS}=a;const[d,e]=useState(null);return useIsomorphicLayoutEffect(()=>{// eslint-disable-next-line unicorn/consistent-function-scoping
2
- const a=()=>{b&&("innerWidth"in b?e(b.innerWidth):b.current&&e(b.current.clientWidth))},d=throttle(a,c);// This assignment saves a reference to the function so it will be the same passed to both addEventListener removeEventListener.
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import throttle from"lodash.throttle";import{useLayoutEffect,useState,useEffect}from"react";var THROTTLE_MS=100,useIsomorphicLayoutEffect="undefined"==typeof window?useEffect:useLayoutEffect;export var useClientWidth=function(a){var b=a.ref,c=a.throttleMs,d=void 0===c?THROTTLE_MS:c,e=useState(null),f=_slicedToArray(e,2),g=f[0],h=f[1];return useIsomorphicLayoutEffect(function(){// eslint-disable-next-line unicorn/consistent-function-scoping
2
+ var a=function(){b&&("innerWidth"in b?h(b.innerWidth):b.current&&h(b.current.clientWidth))},c=throttle(a,d);// This assignment saves a reference to the function so it will be the same passed to both addEventListener removeEventListener.
3
3
  // If throttle gets passed directly to both add and removeEventListenet the results will be that the event
4
4
  // won't get removed even if the component is unmounted.
5
- return window.addEventListener("resize",d,!0),window.requestAnimationFrame(a),()=>window.removeEventListener("resize",d,!0)},[]),[d]};useClientWidth.THROTTLE_MS=100;
5
+ return window.addEventListener("resize",c,!0),window.requestAnimationFrame(a),function(){return window.removeEventListener("resize",c,!0)}},[]),[g]};useClientWidth.THROTTLE_MS=100;
@@ -1 +1 @@
1
- import{isUndefined}from"@transferwise/neptune-validation";import{useEffect}from"react";export const useConditionalListener=a=>{let{attachListener:b,callback:c,eventType:d,parent:e}=a;useEffect(()=>(b&&!isUndefined(e)&&e.addEventListener(d,c,!0),()=>{isUndefined(e)||e.removeEventListener(d,c,!0)}),[b,c,d,e])};
1
+ import{isUndefined}from"@transferwise/neptune-validation";import{useEffect}from"react";export var useConditionalListener=function(a){var b=a.attachListener,c=a.callback,d=a.eventType,e=a.parent;useEffect(function(){return b&&!isUndefined(e)&&e.addEventListener(d,c,!0),function(){isUndefined(e)||e.removeEventListener(d,c,!0)}},[b,c,d,e])};
@@ -1 +1 @@
1
- import{useContext}from"react";import{DirectionContext}from"../../../provider/direction/DirectionProvider";export const useDirection=()=>{const a=useContext(DirectionContext);return{direction:a,isRTL:"rtl"===a}};
1
+ import{useContext}from"react";import{DirectionContext}from"../../../provider/direction/DirectionProvider";export var useDirection=function(){var a=useContext(DirectionContext);return{direction:a,isRTL:"rtl"===a}};
@@ -1,4 +1,4 @@
1
- import"core-js/modules/web.dom-collections.iterator.js";import{useEffect,useState}from"react";const ObserverParams={threshold:.1};/**
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import"core-js/modules/es.object.to-string.js";import"core-js/modules/web.dom-collections.for-each.js";import{useEffect,useState}from"react";var ObserverParams={threshold:.1};/**
2
2
  * useHasIntersected.
3
3
  * Use this custom hook to detect when an element has became visible inside the viewport. This hook checks only if the intersection happend.
4
4
  * Once the intersection has happened the hook will not return false even if the element gets out of the viewport.
@@ -8,4 +8,4 @@ import"core-js/modules/web.dom-collections.iterator.js";import{useEffect,useStat
8
8
  * @param {strimng} [loading = 'eager'] - string that contains the type of loading.
9
9
  * @param elRef.loading
10
10
  * @usage `const [hasIntersected] = useHasIntersected({imageRef,loading});`
11
- */export const useHasIntersected=a=>{let{elRef:b,loading:c}=a;const[d,e]=useState(!1),{current:f}=b||{},g=()=>b&&f,h=(a,b)=>{a.forEach(a=>{a.isIntersecting&&(e(!0),b.unobserve(f))})};return useEffect(()=>{let a,b=!1;return"undefined"!=typeof window&&window.IntersectionObserver&&g()?!b&&(a=new IntersectionObserver(h,ObserverParams),a.observe(f)):e(!0),()=>{b=!0,a&&a.unobserve(f)}},[b]),"eager"===c?[!1]:[d]};
11
+ */export var useHasIntersected=function(a){var b=a.elRef,c=a.loading,d=useState(!1),e=_slicedToArray(d,2),f=e[0],g=e[1],h=(b||{}).current,i=function(){return b&&h},j=function(a,b){a.forEach(function(a){a.isIntersecting&&(g(!0),b.unobserve(h))})};return useEffect(function(){var a,b=!1;return"undefined"!=typeof window&&window.IntersectionObserver&&i()?!b&&(a=new IntersectionObserver(j,ObserverParams),a.observe(h)):g(!0),function(){b=!0,a&&a.unobserve(h)}},[b]),"eager"===c?[!1]:[f]};
@@ -1 +1 @@
1
- import"core-js/modules/web.dom-collections.iterator.js";import"core-js/modules/es.array.includes.js";import"core-js/modules/es.string.includes.js";import{useEffect,useState}from"react";import{Breakpoint}from"../../propsValues/breakpoint";import{useClientWidth}from"../useClientWidth/useClientWidth";export const useLayout=()=>{const a="undefined"==typeof window?void 0:window,[b,c]=useState(),[d]=useClientWidth({ref:a});return useEffect(()=>d?d<=Breakpoint.EXTRA_SMALL?void c(Breakpoint.EXTRA_SMALL):Breakpoint.EXTRA_SMALL<d&&d<=Breakpoint.SMALL?void c(Breakpoint.SMALL):Breakpoint.SMALL<d&&d<=Breakpoint.MEDIUM?void c(Breakpoint.MEDIUM):Breakpoint.MEDIUM<d&&d<=Breakpoint.LARGE?void c(Breakpoint.LARGE):void(Breakpoint.LARGE<d&&c(Breakpoint.EXTRA_LARGE)):void 0,[d]),{isMobile:!!b&&[Breakpoint.EXTRA_SMALL,Breakpoint.SMALL].includes(b),isExtraSmall:b===Breakpoint.EXTRA_SMALL,isSmall:b===Breakpoint.SMALL,isMedium:b===Breakpoint.MEDIUM,isLarge:b===Breakpoint.LARGE,isExtraLarge:b===Breakpoint.EXTRA_LARGE}};
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import"core-js/modules/es.array.includes.js";import"core-js/modules/es.string.includes.js";import{useEffect,useState}from"react";import{Breakpoint}from"../../propsValues/breakpoint";import{useClientWidth}from"../useClientWidth/useClientWidth";export var useLayout=function(){var a="undefined"==typeof window?void 0:window,b=useState(),c=_slicedToArray(b,2),d=c[0],e=c[1],f=useClientWidth({ref:a}),g=_slicedToArray(f,1),h=g[0];return useEffect(function(){return h?h<=Breakpoint.EXTRA_SMALL?void e(Breakpoint.EXTRA_SMALL):Breakpoint.EXTRA_SMALL<h&&h<=Breakpoint.SMALL?void e(Breakpoint.SMALL):Breakpoint.SMALL<h&&h<=Breakpoint.MEDIUM?void e(Breakpoint.MEDIUM):Breakpoint.MEDIUM<h&&h<=Breakpoint.LARGE?void e(Breakpoint.LARGE):void(Breakpoint.LARGE<h&&e(Breakpoint.EXTRA_LARGE)):void 0},[h]),{isMobile:!!d&&[Breakpoint.EXTRA_SMALL,Breakpoint.SMALL].includes(d),isExtraSmall:d===Breakpoint.EXTRA_SMALL,isSmall:d===Breakpoint.SMALL,isMedium:d===Breakpoint.MEDIUM,isLarge:d===Breakpoint.LARGE,isExtraLarge:d===Breakpoint.EXTRA_LARGE}};
@@ -1 +1 @@
1
- export const Key={ENTER:"Enter",ESCAPE:"Escape",SPACE:[" ","Spacebar"],TAB:"Tab",PERIOD:".",COMMA:","};
1
+ export var Key={ENTER:"Enter",ESCAPE:"Escape",SPACE:[" ","Spacebar"],TAB:"Tab",PERIOD:".",COMMA:","};
@@ -2,36 +2,36 @@ import"core-js/modules/es.string.trim.js";import"core-js/modules/es.regexp.exec.
2
2
  * Default language
3
3
  *
4
4
  * @type {string}
5
- */export const DEFAULT_LANG="en";/**
5
+ */export var DEFAULT_LANG="en";/**
6
6
  * Default locale
7
7
  *
8
8
  * @type {string}
9
- */export const DEFAULT_LOCALE="en-GB";/**
9
+ */export var DEFAULT_LOCALE="en-GB";/**
10
10
  * Array of languages that are written from the right to the left
11
11
  *
12
12
  * @type {string[]}
13
- */export const RTL_LANGUAGES=["ar","he"];export const SUPPORTED_LANGUAGES=["en","de","es","fr","hu","id","it","ja","pl","pt","ro","ru","th","tr","uk","zh"];/**
13
+ */export var RTL_LANGUAGES=["ar","he"];export var SUPPORTED_LANGUAGES=["en","de","es","fr","hu","id","it","ja","pl","pt","ro","ru","th","tr","uk","zh"];/**
14
14
  * Verifies and adjusts locale (replace `_` with `-`)
15
15
  * Returns null if locale is unrecognized by {Intl.Locale}
16
16
  *
17
17
  * @param {string} locale (`es`, `es_ES`, `en-GB`, `en`, `ja`, `ja-JP` etc)
18
18
  * @returns {string|null}
19
- */export function adjustLocale(a){if(!a||0===a.trim().length)return null;try{const{baseName:b}=new Intl.Locale(a.trim().replace("_","-"));return b}catch(a){return console.error(a),null}}/**
19
+ */export function adjustLocale(a){if(!a||0===a.trim().length)return null;try{var b=new Intl.Locale(a.trim().replace("_","-")),c=b.baseName;return c}catch(a){return console.error(a),null}}/**
20
20
  * Provides corresponding lang (iso2) for provided locale
21
21
  * if locale is invalid or language is unsupported returns null
22
22
  *
23
23
  * @param {string} locale (`es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP` etc)
24
24
  * @returns {string|null}
25
- */export function getLangFromLocale(a){const b=adjustLocale(a);if(null===b)return null;try{const{language:a}=new Intl.Locale(b);return SUPPORTED_LANGUAGES.includes(a)?a:null}catch(a){return console.error(a),null}}/**
25
+ */export function getLangFromLocale(a){var b=adjustLocale(a);if(null===b)return null;try{var c=new Intl.Locale(b),d=c.language;return SUPPORTED_LANGUAGES.includes(d)?d:null}catch(a){return console.error(a),null}}/**
26
26
  * Provides corresponding country code (iso2) for locales code with explicit region value (`es-ES`, `en-GB`, `ja-JP` etc.)
27
27
  * if the value is invalid or missing region it returns null
28
28
  *
29
29
  * @param {string} locale
30
30
  * @returns {string|null}
31
- */export function getCountryFromLocale(a){const b=adjustLocale(a);if(null===b)return null;try{const{region:a}=new Intl.Locale(b);return null!==a&&void 0!==a?a:null}catch(a){return console.error(a),null}}/**
31
+ */export function getCountryFromLocale(a){var b=adjustLocale(a);if(null===b)return null;try{var c=new Intl.Locale(b),d=c.region;return null!==d&&void 0!==d?d:null}catch(a){return console.error(a),null}}/**
32
32
  * Provides the layout direction for a given locale.
33
33
  * If locale is invalid or language is unsupported returns Direction.LTR
34
34
  *
35
35
  * @param {string} locale (`es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP` etc)
36
36
  * @returns {Direction} The layout direction based on the locale
37
- */export function getDirectionFromLocale(a){try{const b=adjustLocale(a),{language:c}=new Intl.Locale(b);return RTL_LANGUAGES.includes(c)?Direction.RTL:Direction.LTR}catch(a){return console.error(a),Direction.LTR}}
37
+ */export function getDirectionFromLocale(a){try{var b=adjustLocale(a),c=new Intl.Locale(b),d=c.language;return RTL_LANGUAGES.includes(d)?Direction.RTL:Direction.LTR}catch(a){return console.error(a),Direction.LTR}}
@@ -1,10 +1,10 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";const _excluded=["arrow","flip","altAxis","children","open","onClose","position","anchorRef","anchorWidth"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"core-js/modules/web.dom-collections.iterator.js";import classnames from"classnames";import{useState,forwardRef,useEffect}from"react";import{usePopper}from"react-popper";import{Position}from"..";import Dimmer from"../../dimmer";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";const POPOVER_OFFSET=[0,16],fallbackPlacements={[Position.TOP]:[Position.BOTTOM,Position.RIGHT,Position.LEFT],[Position.BOTTOM]:[Position.TOP,Position.RIGHT,Position.LEFT],[Position.LEFT]:[Position.RIGHT,Position.TOP,Position.BOTTOM],[Position.RIGHT]:[Position.LEFT,Position.TOP,Position.BOTTOM]},Panel=/*#__PURE__*/forwardRef((a,b)=>{var c;let{arrow:g=!1,flip:h=!0,altAxis:i=!1,children:d,open:j=!1,onClose:e,position:k=Position.BOTTOM,anchorRef:f,anchorWidth:l=!1}=a,m=_objectWithoutProperties(a,_excluded);const[n,o]=useState(null),[p,q]=useState(null),r=[];i&&r.push({// https://popper.js.org/docs/v2/modifiers/prevent-overflow
2
- name:"preventOverflow",options:{altAxis:!0,tether:!1}}),g&&(r.push({name:"arrow",options:{element:n,options:{padding:8// 8px from the edges of the popper
3
- }}}),r.push({name:"offset",options:{offset:POPOVER_OFFSET}})),h&&fallbackPlacements[k]&&r.push({name:"flip",options:{fallbackPlacements:fallbackPlacements[k]}});const{styles:s,attributes:t,forceUpdate:u}=usePopper(f.current,p,{placement:k,modifiers:r});// If the trigger is not visible when the position is calculated, it will be incorrect. Because this can happen repeatedly (on resize for example),
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";var _fallbackPlacements,_excluded=["arrow","flip","altAxis","children","open","onClose","position","anchorRef","anchorWidth"];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{useState,forwardRef,useEffect}from"react";import{usePopper}from"react-popper";import{Position}from"..";import Dimmer from"../../dimmer";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var POPOVER_OFFSET=[0,16],fallbackPlacements=(_fallbackPlacements={},_defineProperty(_fallbackPlacements,Position.TOP,[Position.BOTTOM,Position.RIGHT,Position.LEFT]),_defineProperty(_fallbackPlacements,Position.BOTTOM,[Position.TOP,Position.RIGHT,Position.LEFT]),_defineProperty(_fallbackPlacements,Position.LEFT,[Position.RIGHT,Position.TOP,Position.BOTTOM]),_defineProperty(_fallbackPlacements,Position.RIGHT,[Position.LEFT,Position.TOP,Position.BOTTOM]),_fallbackPlacements),Panel=/*#__PURE__*/forwardRef(function(a,b){var c,d=a.arrow,e=void 0!==d&&d,f=a.flip,g=a.altAxis,h=a.children,i=a.open,j=void 0!==i&&i,k=a.onClose,l=a.position,m=void 0===l?Position.BOTTOM:l,n=a.anchorRef,o=a.anchorWidth,p=_objectWithoutProperties(a,_excluded),q=useState(null),r=_slicedToArray(q,2),s=r[0],t=r[1],u=useState(null),v=_slicedToArray(u,2),w=v[0],x=v[1],y=[];void 0!==g&&g&&y.push({// https://popper.js.org/docs/v2/modifiers/prevent-overflow
2
+ name:"preventOverflow",options:{altAxis:!0,tether:!1}}),e&&(y.push({name:"arrow",options:{element:s,options:{padding:8// 8px from the edges of the popper
3
+ }}}),y.push({name:"offset",options:{offset:POPOVER_OFFSET}})),(!(void 0!==f)||f)&&fallbackPlacements[m]&&y.push({name:"flip",options:{fallbackPlacements:fallbackPlacements[m]}});var z=usePopper(n.current,w,{placement:m,modifiers:y}),A=z.styles,B=z.attributes,C=z.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),
4
4
  // it is most simple just to always position before opening
5
- useEffect(()=>{j&&u&&u()},[j]);const v=_objectSpread({},l?{width:null===(c=f.current)||void 0===c?void 0:c.clientWidth}:void 0);return/*#__PURE__*/_jsx(Dimmer,{open:j,transparent:!0,fadeContentOnEnter:!0,fadeContentOnExit:!0,onClose:e,children:/*#__PURE__*/_jsx("div",_objectSpread(_objectSpread(_objectSpread({},m),{},{ref:q// eslint-disable-next-line react/forbid-dom-props
6
- ,style:_objectSpread({},s.popper)},t.popper),{},{className:classnames("np-panel",{"np-panel--open":j},m.className),children:/*#__PURE__*/_jsxs("div",{ref:b/* eslint-disable-next-line react/forbid-dom-props */,style:v,className:classnames("np-panel__content"),children:[d,g&&/*#__PURE__*/_jsx("div",{ref:o,className:classnames("np-panel__arrow")// eslint-disable-next-line react/forbid-dom-props
7
- ,style:s.arrow})]})}))})});// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
5
+ useEffect(function(){j&&C&&C()},[j]);var D=_objectSpread({},void 0!==o&&o?{width:null===(c=n.current)||void 0===c?void 0:c.clientWidth}:void 0);return/*#__PURE__*/_jsx(Dimmer,{open:j,transparent:!0,fadeContentOnEnter:!0,fadeContentOnExit:!0,onClose:k,children:/*#__PURE__*/_jsx("div",_objectSpread(_objectSpread(_objectSpread({},p),{},{ref:x// eslint-disable-next-line react/forbid-dom-props
6
+ ,style:_objectSpread({},A.popper)},B.popper),{},{className:classnames("np-panel",{"np-panel--open":j},p.className),children:/*#__PURE__*/_jsxs("div",{ref:b/* eslint-disable-next-line react/forbid-dom-props */,style:D,className:classnames("np-panel__content"),children:[h,e&&/*#__PURE__*/_jsx("div",{ref:t,className:classnames("np-panel__arrow")// eslint-disable-next-line react/forbid-dom-props
7
+ ,style:A.arrow})]})}))})});// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
8
8
  // the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.
9
9
  // This mapping forces popover to try the four available positions before going back to the initial chosen one.
10
10
  export default Panel;
@@ -1 +1 @@
1
- export let Breakpoint=/*#__PURE__*/function(a){return a[a.EXTRA_SMALL=480]="EXTRA_SMALL",a[a.SMALL=576]="SMALL",a[a.MEDIUM=768]="MEDIUM",a[a.LARGE=992]="LARGE",a[a.EXTRA_LARGE=1200]="EXTRA_LARGE",a}({});
1
+ export var Breakpoint=/*#__PURE__*/function(a){return a[a.EXTRA_SMALL=480]="EXTRA_SMALL",a[a.SMALL=576]="SMALL",a[a.MEDIUM=768]="MEDIUM",a[a.LARGE=992]="LARGE",a[a.EXTRA_LARGE=1200]="EXTRA_LARGE",a}({});
@@ -1 +1 @@
1
- export let ControlType=/*#__PURE__*/function(a){return a.ACCENT="accent",a.POSITIVE="positive",a.NEGATIVE="negative",a}({});export let Priority=/*#__PURE__*/function(a){return a.PRIMARY="primary",a.SECONDARY="secondary",a.TERTIARY="tertiary",a}({});
1
+ export var ControlType=/*#__PURE__*/function(a){return a.ACCENT="accent",a.POSITIVE="positive",a.NEGATIVE="negative",a}({});export var Priority=/*#__PURE__*/function(a){return a.PRIMARY="primary",a.SECONDARY="secondary",a.TERTIARY="tertiary",a}({});
@@ -1 +1 @@
1
- export let DateMode=/*#__PURE__*/function(a){return a.DAY_MONTH_YEAR="day-month-year",a.MONTH_YEAR="month-year",a}({});
1
+ export var DateMode=/*#__PURE__*/function(a){return a.DAY_MONTH_YEAR="day-month-year",a.MONTH_YEAR="month-year",a}({});
@@ -1 +1 @@
1
- export let Layout=/*#__PURE__*/function(a){return a.VERTICAL="VERTICAL",a.VERTICAL_TWO_COLUMN="VERTICAL_TWO_COLUMN",a.VERTICAL_ONE_COLUMN="VERTICAL_ONE_COLUMN",a.HORIZONTAL="HORIZONTAL",a.HORIZONTAL_JUSTIFIED="HORIZONTAL_JUSTIFIED",a.HORIZONTAL_LEFT_ALIGNED="HORIZONTAL_LEFT_ALIGNED",a.HORIZONTAL_RIGHT_ALIGNED="HORIZONTAL_RIGHT_ALIGNED",a}({});
1
+ export var Layout=/*#__PURE__*/function(a){return a.VERTICAL="VERTICAL",a.VERTICAL_TWO_COLUMN="VERTICAL_TWO_COLUMN",a.VERTICAL_ONE_COLUMN="VERTICAL_ONE_COLUMN",a.HORIZONTAL="HORIZONTAL",a.HORIZONTAL_JUSTIFIED="HORIZONTAL_JUSTIFIED",a.HORIZONTAL_LEFT_ALIGNED="HORIZONTAL_LEFT_ALIGNED",a.HORIZONTAL_RIGHT_ALIGNED="HORIZONTAL_RIGHT_ALIGNED",a}({});
@@ -1 +1 @@
1
- export let MarkdownNodeType=/*#__PURE__*/function(a){return a.BLOCK_QUOTE="block_quote",a.CODE_BLOCK="code_block",a.CODE="code",a.EMPH="emph",a.HEADING="heading",a.HTML_BLOCK="html_block",a.HTML_INLINE="html_inline",a.IMAGE="image",a.ITEM="item",a.LINEBREAK="linebreak",a.LINK="link",a.LIST="list",a.PARAGRAPH="paragraph",a.SOFTBREAK="softbreak",a.STRONG="strong",a.THEMATIC_BREAK="thematic_break",a}({});
1
+ export var MarkdownNodeType=/*#__PURE__*/function(a){return a.BLOCK_QUOTE="block_quote",a.CODE_BLOCK="code_block",a.CODE="code",a.EMPH="emph",a.HEADING="heading",a.HTML_BLOCK="html_block",a.HTML_INLINE="html_inline",a.IMAGE="image",a.ITEM="item",a.LINEBREAK="linebreak",a.LINK="link",a.LIST="list",a.PARAGRAPH="paragraph",a.SOFTBREAK="softbreak",a.STRONG="strong",a.THEMATIC_BREAK="thematic_break",a}({});
@@ -1 +1 @@
1
- export let MonthFormat=/*#__PURE__*/function(a){return a.SHORT="short",a.LONG="long",a}({});
1
+ export var MonthFormat=/*#__PURE__*/function(a){return a.SHORT="short",a.LONG="long",a}({});
@@ -1 +1 @@
1
- export let Position=/*#__PURE__*/function(a){return a.BOTTOM="bottom",a.BOTTOM_LEFT="bottom-left",a.BOTTOM_RIGHT="bottom-right",a.CENTER="center",a.LEFT="left",a.LEFT_TOP="left-top",a.RIGHT="right",a.RIGHT_TOP="right-top",a.TOP="top",a}({});
1
+ export var Position=/*#__PURE__*/function(a){return a.BOTTOM="bottom",a.BOTTOM_LEFT="bottom-left",a.BOTTOM_RIGHT="bottom-right",a.CENTER="center",a.LEFT="left",a.LEFT_TOP="left-top",a.RIGHT="right",a.RIGHT_TOP="right-top",a.TOP="top",a}({});
@@ -1 +1 @@
1
- export let ProfileType=/*#__PURE__*/function(a){return a.BUSINESS="BUSINESS",a.PERSONAL="PERSONAL",a}({});
1
+ export var ProfileType=/*#__PURE__*/function(a){return a.BUSINESS="BUSINESS",a.PERSONAL="PERSONAL",a}({});
@@ -1 +1 @@
1
- export let Scroll=/*#__PURE__*/function(a){return a.CONTENT="content",a.VIEWPORT="viewport",a}({});
1
+ export var Scroll=/*#__PURE__*/function(a){return a.CONTENT="content",a.VIEWPORT="viewport",a}({});
@@ -1 +1 @@
1
- export let Sentiment=/*#__PURE__*/function(a){return a.NEGATIVE="negative",a.NEUTRAL="neutral",a.POSITIVE="positive",a.WARNING="warning",a.PENDING="pending",a.INFO="info",a.ERROR="error",a.SUCCESS="success",a}({});
1
+ export var Sentiment=/*#__PURE__*/function(a){return a.NEGATIVE="negative",a.NEUTRAL="neutral",a.POSITIVE="positive",a.WARNING="warning",a.PENDING="pending",a.INFO="info",a.ERROR="error",a.SUCCESS="success",a}({});
@@ -1 +1 @@
1
- export let Size=/*#__PURE__*/function(a){return a.EXTRA_SMALL="xs",a.SMALL="sm",a.MEDIUM="md",a.LARGE="lg",a.EXTRA_LARGE="xl",a}({});
1
+ export var Size=/*#__PURE__*/function(a){return a.EXTRA_SMALL="xs",a.SMALL="sm",a.MEDIUM="md",a.LARGE="lg",a.EXTRA_LARGE="xl",a}({});
@@ -1 +1 @@
1
- export let Status=/*#__PURE__*/function(a){return a.PROCESSING="processing",a.FAILED="failed",a.SUCCEEDED="succeeded",a.HIDDEN="hidden",a.DONE="done",a.NOT_DONE="notDone",a.PENDING="pending",a}({});
1
+ export var Status=/*#__PURE__*/function(a){return a.PROCESSING="processing",a.FAILED="failed",a.SUCCEEDED="succeeded",a.HIDDEN="hidden",a.DONE="done",a.NOT_DONE="notDone",a.PENDING="pending",a}({});
@@ -1,3 +1,3 @@
1
1
  /**
2
2
  * @deprecated use `ControlType` and `Priority` enums instead
3
- */export let Type=/*#__PURE__*/function(a){return a.PRIMARY="primary",a.PAY="pay",a.SECONDARY="secondary",a.DANGER="danger",a.LINK="link",a}({});
3
+ */export var Type=/*#__PURE__*/function(a){return a.PRIMARY="primary",a.PAY="pay",a.SECONDARY="secondary",a.DANGER="danger",a.LINK="link",a}({});
@@ -1 +1 @@
1
- export let Typography=/*#__PURE__*/function(a){return a.DISPLAY_EXTRA_LARGE="display-extra-large",a.DISPLAY_LARGE="display-large",a.DISPLAY_MEDIUM="display-medium",a.DISPLAY_SMALL="display-small",a.TITLE_SCREEN="title-screen",a.TITLE_SECTION="title-section",a.TITLE_SUBSECTION="title-subsection",a.TITLE_BODY="title-body",a.TITLE_GROUP="title-group",a.BODY_LARGE="body-large",a.BODY_DEFAULT="body-default",a.BODY_DEFAULT_BOLD="body-default-bold",a.BODY_LARGE_BOLD="body-large-bold",a.LINK_LARGE="link-large",a.LINK_DEFAULT="link-default",a}({});
1
+ export var Typography=/*#__PURE__*/function(a){return a.DISPLAY_EXTRA_LARGE="display-extra-large",a.DISPLAY_LARGE="display-large",a.DISPLAY_MEDIUM="display-medium",a.DISPLAY_SMALL="display-small",a.TITLE_SCREEN="title-screen",a.TITLE_SECTION="title-section",a.TITLE_SUBSECTION="title-subsection",a.TITLE_BODY="title-body",a.TITLE_GROUP="title-group",a.BODY_LARGE="body-large",a.BODY_DEFAULT="body-default",a.BODY_DEFAULT_BOLD="body-default-bold",a.BODY_LARGE_BOLD="body-large-bold",a.LINK_LARGE="link-large",a.LINK_DEFAULT="link-default",a}({});
@@ -1 +1 @@
1
- export let Variant=/*#__PURE__*/function(a){return a.DESKTOP="desktop",a.MOBILE="mobile",a}({});
1
+ export var Variant=/*#__PURE__*/function(a){return a.DESKTOP="desktop",a.MOBILE="mobile",a}({});
@@ -1 +1 @@
1
- export let Width=/*#__PURE__*/function(a){return a.BLOCK="block",a.AUTO="auto",a}({});
1
+ export var Width=/*#__PURE__*/function(a){return a.BLOCK="block",a.AUTO="auto",a}({});
@@ -1,3 +1,3 @@
1
- import"core-js/modules/es.symbol.description.js";import"core-js/modules/web.dom-collections.iterator.js";import"core-js/modules/es.regexp.constructor.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.regexp.to-string.js";/* eslint-disable no-unused-vars */ /* eslint-disable no-param-reassign */const prepRequirements=a=>{if(!a||0===a.length)return[];const b=copyOf(a);return b.forEach(a=>{a.prepared||(prepLegacyAlternatives(a),a.properties=prepFields(a.properties||a.fields),a.type&&"object"!==a.type&&!a.types&&(a.properties.type={type:"string",enum:[a.type],required:!0,hidden:!0},a.type="object"),a.prepared=!0)}),b},prepFields=(a,b,c)=>{if(!a)return{};let d=copyOf(a);return d=flattenFieldsWithGroups(d),d=transformFieldArrayToMap(d),d=transformNestedKeysToNestedSpecs(d),Object.keys(d).forEach(a=>{d[a]=prepField(d[a],b,c)}),d},prepField=(a,b,c)=>{const d=copyOf(a);return prepLegacyProps(d),prepType(d),prepPattern(d),prepValidationMessages(d,c),d},flattenFieldsWithGroups=a=>{if(Array.isArray(a)){let b=[];return a.forEach(a=>{a.fields?b=b.concat(flattenFieldWithGroup(a,a.fields)):a.group?b=b.concat(flattenFieldWithGroup(a,a.group)):b.push(a)}),b}return a},flattenFieldWithGroup=(a,b)=>(a.name&&0<b.length&&!b[0].name&&(b[0].name=a.name),a.width&&0<b.length&&!b[0].width&&(b[0].width=a.width),a.tooltip&&0<b.length&&!b[0].help&&(b[0].help={message:a.tooltip}),a.info&&0<b.length&&!b[0].help&&(b[0].help={message:a.info}),2===b.length&&b.forEach(a=>{a.width="md"}),3===b.length&&(b[0].width="md",b[1].width="md"),b),transformFieldArrayToMap=a=>{if(Array.isArray(a)){const b={};return a.forEach(a=>{const c=a.key||a.name;delete a.key,b[c]=copyOf(a)}),b}return a},transformNestedKeysToNestedSpecs=a=>{if(Array.isArray(a))throw new TypeError("Expecting a map of fields, not an array");const b={};return Object.keys(a).forEach(c=>{if(0<c.indexOf(".")){// If the key contains a period we need to nest the fields in another object
2
- const d=c.split("."),e=d[0];b[e]||(b[e]={type:"object",properties:{}}),b[e].properties[d[1]]=a[c]}else b[c]=a[c]}),b},prepType=a=>{const b=a.type&&a.type.toLowerCase&&a.type.toLowerCase();switch(b){case"text":a.type="string";break;case"date":a.type="string",a.format="date";break;case"password":a.type="string",a.control="password";break;case"checkbox":a.type="boolean";break;case"select":a.control||(a.control="select"),delete a.type;break;case"radio":a.control="radio",delete a.type;break;case"upload":a.type="string",a.format="base64url";break;case"tel":a.type="string",a.format="phone";break;case"textarea":a.type="string",a.control="textarea";break;default:}a.control||"object"===a.type||(a.control=getControlType(a))},prepLegacyAlternatives=a=>{!a.title&&a.label&&(a.title=a.label),a.title||(a.title=getNameFromType(a.type)),!a.type&&a.name&&(a.type=a.name),!a.description&&a.tooltip&&(a.description=a.tooltip),a.fieldGroups&&!a.fields&&(a.fields=flattenFieldsWithGroups(a.fieldGroups),delete a.fieldGroups)},prepLegacyProps=a=>{a.name&&!a.title&&(a.title=a.name,delete a.name),a.validationRegexp&&(a.pattern=a.validationRegexp,delete a.validationRegexp),a.min&&(a.minimum=a.min,delete a.min),a.max&&(a.maximum=a.max,delete a.max),a.example&&!a.placeholder&&(a.placeholder=a.example,delete a.example),a.tooltip&&!a.help&&(a.help={message:a.tooltip},delete a.tooltip),a.valuesAllowed&&!a.values&&(a.values=a.valuesAllowed,delete a.valuesAllowed),a.values&&a.values.map&&(a.values=prepLegacyValues(a.values)),a.value&&!a.default&&(a.default=a.value,delete a.value),a.values&&a.values&&0<a.values.length&&a.values[0]&&!a.values[0].value&&a.values[0].label&&!a.placeholder&&(a.placeholder=a.values[0].label,a.values=a.values.slice(1))},prepLegacyValues=a=>a.map(prepLegacyValue),prepLegacyValue=a=>(!a.label&&a.title&&(a.label=a.title,delete a.title),!a.label&&a.name&&(a.label=a.name,delete a.name),!a.value&&a.code&&(a.value=a.code,delete a.code),!a.value&&a.key&&(a.value=a.key,delete a.key),a),prepPattern=a=>{if(a.pattern)try{new RegExp(a.pattern)}catch(b){console.warn("API regexp is invalid"),delete a.pattern}else delete a.pattern},prepValidationMessages=(a,b)=>(a.validationMessages=a.validationMessages?a.validationMessages:b,a.validationMessages?void(a.validationMessages.minimum&&(a.validationMessages.min=a.validationMessages.minimum,delete a.validationMessages.minimum),a.validationMessages.maximum&&(a.validationMessages.max=a.validationMessages.maximum,delete a.validationMessages.maximum)):void delete a.validationMessages),getControlType=a=>{if(a.control)return a.control.toLowerCase();if(a.hidden)return"hidden";if(a.values&&0<a.values.length)return getSelectionType(a);switch(a.type){case"string":return getControlForStringFormat(a.format);case"number":case"integer":return"number";case"boolean":return"checkbox";default:return"text";}},getControlForStringFormat=a=>"date"===a?"date":"base64url"===a?"file":"password"===a?"password":"uri"===a?"text":"email"===a?"text":"phone"===a?"tel":"text",getSelectionType=a=>a.control?a.control:"select"===a.type?"select":"radio"===a.type?"radio":a.values?3<a.values.length?"select":"radio":"select",copyOf=a=>JSON.parse(JSON.stringify(a)),getNameFromType=a=>{if(a&&0<a.length){const b=a.toLowerCase().split("_").join(" ");// String.replace method only replaces first instance
1
+ import"core-js/modules/es.object.to-string.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.array.concat.js";import"core-js/modules/es.function.name.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.symbol.description.js";import"core-js/modules/es.array.iterator.js";import"core-js/modules/web.dom-collections.iterator.js";import"core-js/modules/es.array.map.js";import"core-js/modules/es.array.slice.js";import"core-js/modules/es.regexp.constructor.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.regexp.to-string.js";import"core-js/modules/es.array.join.js";/* eslint-disable no-unused-vars */ /* eslint-disable no-param-reassign */var prepRequirements=function(a){if(!a||0===a.length)return[];var b=copyOf(a);return b.forEach(function(a){a.prepared||(prepLegacyAlternatives(a),a.properties=prepFields(a.properties||a.fields),a.type&&"object"!==a.type&&!a.types&&(a.properties.type={type:"string",enum:[a.type],required:!0,hidden:!0},a.type="object"),a.prepared=!0)}),b},prepFields=function(a,b,c){if(!a)return{};var d=copyOf(a);return d=flattenFieldsWithGroups(d),d=transformFieldArrayToMap(d),d=transformNestedKeysToNestedSpecs(d),Object.keys(d).forEach(function(a){d[a]=prepField(d[a],b,c)}),d},prepField=function(a,b,c){var d=copyOf(a);return prepLegacyProps(d),prepType(d),prepPattern(d),prepValidationMessages(d,c),d},flattenFieldsWithGroups=function(a){if(Array.isArray(a)){var b=[];return a.forEach(function(a){a.fields?b=b.concat(flattenFieldWithGroup(a,a.fields)):a.group?b=b.concat(flattenFieldWithGroup(a,a.group)):b.push(a)}),b}return a},flattenFieldWithGroup=function(a,b){return a.name&&0<b.length&&!b[0].name&&(b[0].name=a.name),a.width&&0<b.length&&!b[0].width&&(b[0].width=a.width),a.tooltip&&0<b.length&&!b[0].help&&(b[0].help={message:a.tooltip}),a.info&&0<b.length&&!b[0].help&&(b[0].help={message:a.info}),2===b.length&&b.forEach(function(a){a.width="md"}),3===b.length&&(b[0].width="md",b[1].width="md"),b},transformFieldArrayToMap=function(a){if(Array.isArray(a)){var b={};return a.forEach(function(a){var c=a.key||a.name;delete a.key,b[c]=copyOf(a)}),b}return a},transformNestedKeysToNestedSpecs=function(a){if(Array.isArray(a))throw new TypeError("Expecting a map of fields, not an array");var b={};return Object.keys(a).forEach(function(c){if(0<c.indexOf(".")){// If the key contains a period we need to nest the fields in another object
2
+ var d=c.split("."),e=d[0];b[e]||(b[e]={type:"object",properties:{}}),b[e].properties[d[1]]=a[c]}else b[c]=a[c]}),b},prepType=function(a){var b=a.type&&a.type.toLowerCase&&a.type.toLowerCase();switch(b){case"text":a.type="string";break;case"date":a.type="string",a.format="date";break;case"password":a.type="string",a.control="password";break;case"checkbox":a.type="boolean";break;case"select":a.control||(a.control="select"),delete a.type;break;case"radio":a.control="radio",delete a.type;break;case"upload":a.type="string",a.format="base64url";break;case"tel":a.type="string",a.format="phone";break;case"textarea":a.type="string",a.control="textarea";break;default:}a.control||"object"===a.type||(a.control=getControlType(a))},prepLegacyAlternatives=function(a){!a.title&&a.label&&(a.title=a.label),a.title||(a.title=getNameFromType(a.type)),!a.type&&a.name&&(a.type=a.name),!a.description&&a.tooltip&&(a.description=a.tooltip),a.fieldGroups&&!a.fields&&(a.fields=flattenFieldsWithGroups(a.fieldGroups),delete a.fieldGroups)},prepLegacyProps=function(a){a.name&&!a.title&&(a.title=a.name,delete a.name),a.validationRegexp&&(a.pattern=a.validationRegexp,delete a.validationRegexp),a.min&&(a.minimum=a.min,delete a.min),a.max&&(a.maximum=a.max,delete a.max),a.example&&!a.placeholder&&(a.placeholder=a.example,delete a.example),a.tooltip&&!a.help&&(a.help={message:a.tooltip},delete a.tooltip),a.valuesAllowed&&!a.values&&(a.values=a.valuesAllowed,delete a.valuesAllowed),a.values&&a.values.map&&(a.values=prepLegacyValues(a.values)),a.value&&!a.default&&(a.default=a.value,delete a.value),a.values&&a.values&&0<a.values.length&&a.values[0]&&!a.values[0].value&&a.values[0].label&&!a.placeholder&&(a.placeholder=a.values[0].label,a.values=a.values.slice(1))},prepLegacyValues=function(a){return a.map(prepLegacyValue)},prepLegacyValue=function(a){return!a.label&&a.title&&(a.label=a.title,delete a.title),!a.label&&a.name&&(a.label=a.name,delete a.name),!a.value&&a.code&&(a.value=a.code,delete a.code),!a.value&&a.key&&(a.value=a.key,delete a.key),a},prepPattern=function(a){if(a.pattern)try{new RegExp(a.pattern)}catch(b){console.warn("API regexp is invalid"),delete a.pattern}else delete a.pattern},prepValidationMessages=function(a,b){return a.validationMessages=a.validationMessages?a.validationMessages:b,a.validationMessages?void(a.validationMessages.minimum&&(a.validationMessages.min=a.validationMessages.minimum,delete a.validationMessages.minimum),a.validationMessages.maximum&&(a.validationMessages.max=a.validationMessages.maximum,delete a.validationMessages.maximum)):void delete a.validationMessages},getControlType=function(a){if(a.control)return a.control.toLowerCase();if(a.hidden)return"hidden";if(a.values&&0<a.values.length)return getSelectionType(a);switch(a.type){case"string":return getControlForStringFormat(a.format);case"number":case"integer":return"number";case"boolean":return"checkbox";default:return"text";}},getControlForStringFormat=function(a){return"date"===a?"date":"base64url"===a?"file":"password"===a?"password":"uri"===a?"text":"email"===a?"text":"phone"===a?"tel":"text"},getSelectionType=function(a){return a.control?a.control:"select"===a.type?"select":"radio"===a.type?"radio":a.values?3<a.values.length?"select":"radio":"select"},copyOf=function(a){return JSON.parse(JSON.stringify(a))},getNameFromType=function(a){if(a&&0<a.length){var b=a.toLowerCase().split("_").join(" ");// String.replace method only replaces first instance
3
3
  return b.charAt(0).toUpperCase()+b.slice(1)}return""};export{prepFields,getControlType};
@@ -1 +1 @@
1
- import{useTheme}from"@wise/components-theming";import classNames from"classnames";import{forwardRef}from"react";import{Position}from"..";import BottomSheet from"../bottomSheet";import{useLayout}from"../hooks";import Panel from"../panel";import{jsx as _jsx}from"react/jsx-runtime";const ResponsivePanel=/*#__PURE__*/forwardRef((a,b)=>{let{anchorRef:c,arrow:f=!1,flip:g=!0,children:d,className:h=void 0,onClose:e,open:i=!1,position:j=Position.BOTTOM}=a;const{className:k}=useTheme(),{isMobile:l}=useLayout();return l?/*#__PURE__*/_jsx(BottomSheet,{open:i,className:h,onClose:e,children:d},"bottomSheet"):/*#__PURE__*/_jsx(Panel,{ref:b,flip:g,arrow:f,open:i,position:j,anchorRef:c,className:classNames(k,h),onClose:e,children:d},"panel")});export default ResponsivePanel;
1
+ import{useTheme}from"@wise/components-theming";import classNames from"classnames";import{forwardRef}from"react";import{Position}from"..";import BottomSheet from"../bottomSheet";import{useLayout}from"../hooks";import Panel from"../panel";import{jsx as _jsx}from"react/jsx-runtime";var ResponsivePanel=/*#__PURE__*/forwardRef(function(a,b){var c=a.anchorRef,d=a.arrow,e=a.flip,f=a.children,g=a.className,h=void 0===g?void 0:g,i=a.onClose,j=a.open,k=void 0!==j&&j,l=a.position,m=void 0===l?Position.BOTTOM:l,n=useTheme(),o=n.className,p=useLayout(),q=p.isMobile;return q?/*#__PURE__*/_jsx(BottomSheet,{open:k,className:h,onClose:i,children:f},"bottomSheet"):/*#__PURE__*/_jsx(Panel,{ref:b,flip:!(void 0!==e)||e,arrow:void 0!==d&&d,open:k,position:m,anchorRef:c,className:classNames(o,h),onClose:i,children:f},"panel")});export default ResponsivePanel;
@@ -1,2 +1,2 @@
1
- import"core-js/modules/es.regexp.to-string.js";import getSymbolsInPatternWithPosition from"../getSymbolsInPatternWithPosition";const formatWithPattern=(a,b)=>{if(!a||""===a)return"";const c=a.toString().split(""),d=getSymbolsInPatternWithPosition(b);let e=[];// valueArray.length increments during the cycle cause we are adding new elements.
2
- for(let f=0;f<c.length;f+=1)e=d.filter(a=>a.index===f),1===e.length&&c.splice(f,0,e.pop().symbol);return c.join("")};export default formatWithPattern;
1
+ import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.regexp.to-string.js";import"core-js/modules/es.array.join.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.array.splice.js";import getSymbolsInPatternWithPosition from"../getSymbolsInPatternWithPosition";var formatWithPattern=function(a,b){if(!a||""===a)return"";// valueArray.length increments during the cycle cause we are adding new elements.
2
+ for(var c=a.toString().split(""),d=getSymbolsInPatternWithPosition(b),e=[],f=function _loop(a){e=d.filter(function(b){return b.index===a}),1===e.length&&c.splice(a,0,e.pop().symbol)},g=0;g<c.length;g+=1)f(g);return c.join("")};export default formatWithPattern;
@@ -1 +1 @@
1
- import getSymbolsInPatternWithPosition from"../getSymbolsInPatternWithPosition";const getCountOfSymbolsInSelection=(a,b,c)=>getSymbolsInPatternWithPosition(c).filter(c=>c.index>=a&&c.index<b).length;export default getCountOfSymbolsInSelection;
1
+ import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import getSymbolsInPatternWithPosition from"../getSymbolsInPatternWithPosition";var getCountOfSymbolsInSelection=function(a,b,c){return getSymbolsInPatternWithPosition(c).filter(function(c){return c.index>=a&&c.index<b}).length};export default getCountOfSymbolsInSelection;
@@ -1 +1 @@
1
- import getCountOfSymbolsInSelection from"../getCountOfSymbolsInSelection";import{getDistanceToNextSymbol,getDistanceToPreviousSymbol}from"../getDistanceToSymbol";const getCursorPositionAfteractionstroke=(a,b,c,d,e)=>{let f=b;switch(a){case"Backspace":b===c&&(f-=getDistanceToPreviousSymbol(b,d),f=0<f?f-1:0);break;case"Paste":f+=e+getCountOfSymbolsInSelection(b,b+e,d)+getDistanceToNextSymbol(b+e,d);break;case"Cut":case"Delete":break;default:f+=1+getDistanceToNextSymbol(b,d);}return f};export default getCursorPositionAfteractionstroke;
1
+ import getCountOfSymbolsInSelection from"../getCountOfSymbolsInSelection";import{getDistanceToNextSymbol,getDistanceToPreviousSymbol}from"../getDistanceToSymbol";var getCursorPositionAfteractionstroke=function(a,b,c,d,e){var f=b;switch(a){case"Backspace":b===c&&(f-=getDistanceToPreviousSymbol(b,d),f=0<f?f-1:0);break;case"Paste":f+=e+getCountOfSymbolsInSelection(b,b+e,d)+getDistanceToNextSymbol(b+e,d);break;case"Cut":case"Delete":break;default:f+=1+getDistanceToNextSymbol(b,d);}return f};export default getCursorPositionAfteractionstroke;
@@ -1,2 +1,2 @@
1
- import"core-js/modules/es.array.reverse.js";import getSymbolsInPatternWithPosition from"../getSymbolsInPatternWithPosition";export const getDistanceToNextSymbol=(a,b)=>{const c=getSymbolsInPatternWithPosition(b),d=c.filter(b=>b.index>=a);return countConsecutiveSymbols(a,d,"left")};export const getDistanceToPreviousSymbol=(a,b)=>{const c=getSymbolsInPatternWithPosition(b),d=c.filter(b=>b.index<a).reverse();return countConsecutiveSymbols(a,d,"right")};const countConsecutiveSymbols=(a,b,c)=>{let d,e=a;for(d=0;d<b.length;d+=1){const a="left"===c?e:e-1;if(b[d].index===a)e="left"===c?e+1:e-1;else// Exit if not consecutive.
1
+ import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.array.reverse.js";import getSymbolsInPatternWithPosition from"../getSymbolsInPatternWithPosition";export var getDistanceToNextSymbol=function(a,b){var c=getSymbolsInPatternWithPosition(b),d=c.filter(function(b){return b.index>=a});return countConsecutiveSymbols(a,d,"left")};export var getDistanceToPreviousSymbol=function(a,b){var c=getSymbolsInPatternWithPosition(b),d=c.filter(function(b){return b.index<a}).reverse();return countConsecutiveSymbols(a,d,"right")};var countConsecutiveSymbols=function(a,b,c){var d,e=a;for(d=0;d<b.length;d+=1){var f="left"===c?e:e-1;if(b[d].index===f)e="left"===c?e+1:e-1;else// Exit if not consecutive.
2
2
  break}return d};
@@ -1 +1 @@
1
- const getSymbolsInPatternWithPosition=a=>{const b=[],c=a.split("");return c.forEach((a,c)=>{"*"!==a&&b.push({index:c,symbol:a})}),b};export default getSymbolsInPatternWithPosition;
1
+ import"core-js/modules/es.object.to-string.js";import"core-js/modules/web.dom-collections.for-each.js";var getSymbolsInPatternWithPosition=function(a){var b=[],c=a.split("");return c.forEach(function(a,c){"*"!==a&&b.push({index:c,symbol:a})}),b};export default getSymbolsInPatternWithPosition;
@@ -1 +1 @@
1
- import"core-js/modules/es.regexp.to-string.js";import"core-js/modules/es.array.includes.js";import"core-js/modules/es.string.includes.js";const unformatWithPattern=(a,b)=>{let c=[""];return a&&0<a.length&&(c=a.toString().split(""),c=c.filter(a=>!getSymbolsInPattern(b).includes(a))),c.join("")},getSymbolsInPattern=a=>a.split("").filter(a=>"*"!==a);export default unformatWithPattern;
1
+ import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.regexp.to-string.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.array.includes.js";import"core-js/modules/es.string.includes.js";import"core-js/modules/es.array.join.js";var unformatWithPattern=function(a,b){var c=[""];return a&&0<a.length&&(c=a.toString().split(""),c=c.filter(function(a){return!getSymbolsInPattern(b).includes(a)})),c.join("")},getSymbolsInPattern=function(a){return a.split("").filter(function(a){return"*"!==a})};export default unformatWithPattern;
@@ -1 +1 @@
1
- import"core-js/modules/web.dom-collections.iterator.js";export let Theme=/*#__PURE__*/function(a){return a.LIGHT="light",a.DARK="dark",a.NAVY="navy",a.PERSONAL="personal",a.PERSONAL_FOREST_GREEN="personal--forest-green",a.PERSONAL_BRIGHT_GREEN="personal--bright-green",a.PERSONAL_DARK="personal--dark",a}({});export const modernThemes=new Set(["personal","personal--forest-green","personal--bright-green","personal--dark"]);export const getThemeClassName=a=>"np-theme-".concat(a);
1
+ import"core-js/modules/es.array.iterator.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.set.js";import"core-js/modules/es.string.iterator.js";import"core-js/modules/web.dom-collections.iterator.js";export var Theme=/*#__PURE__*/function(a){return a.LIGHT="light",a.DARK="dark",a.NAVY="navy",a.PERSONAL="personal",a.PERSONAL_FOREST_GREEN="personal--forest-green",a.PERSONAL_BRIGHT_GREEN="personal--bright-green",a.PERSONAL_DARK="personal--dark",a}({});export var modernThemes=new Set(["personal","personal--forest-green","personal--bright-green","personal--dark"]);export var getThemeClassName=function(a){return"np-theme-".concat(a)};
@@ -1 +1 @@
1
- import{Alert as DangerIcon,AlertCircleFill}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import Avatar,{AvatarType}from"../avatar";import Body from"../body";import Button from"../button";import{ControlType,Priority,Size,Typography}from"../common";import Title from"../title";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function CriticalCommsBanner(a){let{title:b,subtitle:c,action:d,className:e}=a;const{isModern:f}=useTheme();return/*#__PURE__*/_jsx("div",{className:classNames("critical-comms",e),children:/*#__PURE__*/_jsxs("div",{className:"critical-comms-body",children:[/*#__PURE__*/_jsx(Avatar,{size:Size.MEDIUM,type:AvatarType.ICON,className:classNames(f?"m-r-2":"m-r-1"),backgroundColor:f?"var(--color-sentiment-negative)":"var(--color-background-negative)",children:f?/*#__PURE__*/_jsx(AlertCircleFill,{}):/*#__PURE__*/_jsx(DangerIcon,{size:24})}),/*#__PURE__*/_jsxs("div",{className:"critical-comms-content d-flex align-items-center flex-grow-1",children:[/*#__PURE__*/_jsxs("div",{className:classNames("flex-grow-1",{"p-x-2":!f}),children:[/*#__PURE__*/_jsx(Title,{type:f?Typography.TITLE_BODY:Typography.TITLE_GROUP,className:"critical-comms--title",children:b}),/*#__PURE__*/_jsx(Body,{className:"critical-comms--subtitle",children:c})]}),d?/*#__PURE__*/_jsx("div",{className:"critical-comms--cta",children:/*#__PURE__*/_jsx(Button,{block:f,size:Size.SMALL,type:ControlType.NEGATIVE,priority:f?Priority.SECONDARY:Priority.PRIMARY,className:"cta-btn",onClick:()=>{d&&(window.location.href=d.href)},children:d.label})}):null]})]})})}export default CriticalCommsBanner;
1
+ import{Alert as DangerIcon,AlertCircleFill}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import Avatar,{AvatarType}from"../avatar";import Body from"../body";import Button from"../button";import{ControlType,Priority,Size,Typography}from"../common";import Title from"../title";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function CriticalCommsBanner(a){var b=a.title,c=a.subtitle,d=a.action,e=a.className,f=useTheme(),g=f.isModern;return/*#__PURE__*/_jsx("div",{className:classNames("critical-comms",e),children:/*#__PURE__*/_jsxs("div",{className:"critical-comms-body",children:[/*#__PURE__*/_jsx(Avatar,{size:Size.MEDIUM,type:AvatarType.ICON,className:classNames(g?"m-r-2":"m-r-1"),backgroundColor:g?"var(--color-sentiment-negative)":"var(--color-background-negative)",children:g?/*#__PURE__*/_jsx(AlertCircleFill,{}):/*#__PURE__*/_jsx(DangerIcon,{size:24})}),/*#__PURE__*/_jsxs("div",{className:"critical-comms-content d-flex align-items-center flex-grow-1",children:[/*#__PURE__*/_jsxs("div",{className:classNames("flex-grow-1",{"p-x-2":!g}),children:[/*#__PURE__*/_jsx(Title,{type:g?Typography.TITLE_BODY:Typography.TITLE_GROUP,className:"critical-comms--title",children:b}),/*#__PURE__*/_jsx(Body,{className:"critical-comms--subtitle",children:c})]}),d?/*#__PURE__*/_jsx("div",{className:"critical-comms--cta",children:/*#__PURE__*/_jsx(Button,{block:g,size:Size.SMALL,type:ControlType.NEGATIVE,priority:g?Priority.SECONDARY:Priority.PRIMARY,className:"cta-btn",onClick:function onClick(){d&&(window.location.href=d.href)},children:d.label})}):null]})]})})}export default CriticalCommsBanner;
@@ -1 +1 @@
1
- import CriticalCommsBanner from".";export default{component:CriticalCommsBanner,title:"Feedback/CriticalCommsBanner",tags:["autodocs"]};export const Basic={args:{title:"Your account is overdrawn",subtitle:"Add money within the next 30 days",action:{label:"Take action",href:"https://wise.com"}}};
1
+ import CriticalCommsBanner from".";export default{component:CriticalCommsBanner,title:"Feedback/CriticalCommsBanner",tags:["autodocs"]};export var Basic={args:{title:"Your account is overdrawn",subtitle:"Add money within the next 30 days",action:{label:"Take action",href:"https://wise.com"}}};