@transferwise/components 46.100.0 → 46.100.2

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 (606) hide show
  1. package/build/accordion/Accordion.js.map +1 -1
  2. package/build/accordion/Accordion.mjs.map +1 -1
  3. package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
  4. package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
  5. package/build/actionButton/ActionButton.js.map +1 -1
  6. package/build/actionButton/ActionButton.mjs.map +1 -1
  7. package/build/actionOption/ActionOption.js.map +1 -1
  8. package/build/actionOption/ActionOption.mjs.map +1 -1
  9. package/build/alert/Alert.js.map +1 -1
  10. package/build/alert/Alert.mjs.map +1 -1
  11. package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
  12. package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
  13. package/build/avatar/Avatar.js.map +1 -1
  14. package/build/avatar/Avatar.mjs.map +1 -1
  15. package/build/avatar/avatarTypes.js.map +1 -1
  16. package/build/avatar/avatarTypes.mjs.map +1 -1
  17. package/build/avatarLayout/AvatarLayout.js +1 -1
  18. package/build/avatarLayout/AvatarLayout.js.map +1 -1
  19. package/build/avatarLayout/AvatarLayout.mjs +1 -1
  20. package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
  21. package/build/avatarView/AvatarView.js.map +1 -1
  22. package/build/avatarView/AvatarView.mjs.map +1 -1
  23. package/build/avatarView/NotificationDot.js.map +1 -1
  24. package/build/avatarView/NotificationDot.mjs.map +1 -1
  25. package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
  26. package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
  27. package/build/badge/Badge.js.map +1 -1
  28. package/build/badge/Badge.mjs.map +1 -1
  29. package/build/badge/BadgeAssets.js.map +1 -1
  30. package/build/badge/BadgeAssets.mjs.map +1 -1
  31. package/build/body/Body.js.map +1 -1
  32. package/build/body/Body.mjs.map +1 -1
  33. package/build/button/Button.js.map +1 -1
  34. package/build/button/Button.mjs.map +1 -1
  35. package/build/button/Button.resolver.js.map +1 -1
  36. package/build/button/Button.resolver.mjs.map +1 -1
  37. package/build/button/LegacyButton.js.map +1 -1
  38. package/build/button/LegacyButton.mjs.map +1 -1
  39. package/build/button/legacyUtils/legacyUtils.js.map +1 -1
  40. package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
  41. package/build/card/Card.js.map +1 -1
  42. package/build/card/Card.mjs.map +1 -1
  43. package/build/carousel/Carousel.js.map +1 -1
  44. package/build/carousel/Carousel.mjs.map +1 -1
  45. package/build/checkbox/Checkbox.js.map +1 -1
  46. package/build/checkbox/Checkbox.mjs.map +1 -1
  47. package/build/checkboxButton/CheckboxButton.js.map +1 -1
  48. package/build/checkboxButton/CheckboxButton.mjs.map +1 -1
  49. package/build/checkboxOption/CheckboxOption.js.map +1 -1
  50. package/build/checkboxOption/CheckboxOption.mjs.map +1 -1
  51. package/build/chevron/Chevron.js.map +1 -1
  52. package/build/chevron/Chevron.mjs.map +1 -1
  53. package/build/chips/Chip.js.map +1 -1
  54. package/build/chips/Chip.mjs.map +1 -1
  55. package/build/chips/Chips.js.map +1 -1
  56. package/build/chips/Chips.mjs.map +1 -1
  57. package/build/circularButton/CircularButton.js.map +1 -1
  58. package/build/circularButton/CircularButton.mjs.map +1 -1
  59. package/build/common/DOMOperations/DOMOperations.js.map +1 -1
  60. package/build/common/DOMOperations/DOMOperations.mjs.map +1 -1
  61. package/build/common/Option/Option.js.map +1 -1
  62. package/build/common/Option/Option.mjs.map +1 -1
  63. package/build/common/RadioButton/RadioButton.js.map +1 -1
  64. package/build/common/RadioButton/RadioButton.mjs.map +1 -1
  65. package/build/common/bottomSheet/BottomSheet.js.map +1 -1
  66. package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
  67. package/build/common/card/Card.js.map +1 -1
  68. package/build/common/card/Card.mjs.map +1 -1
  69. package/build/common/circle/Circle.js.map +1 -1
  70. package/build/common/circle/Circle.mjs.map +1 -1
  71. package/build/common/closeButton/CloseButton.js.map +1 -1
  72. package/build/common/closeButton/CloseButton.mjs.map +1 -1
  73. package/build/common/colors.js.map +1 -1
  74. package/build/common/colors.mjs.map +1 -1
  75. package/build/common/dateUtils/getDayNames/getDayNames.js.map +1 -1
  76. package/build/common/dateUtils/getDayNames/getDayNames.mjs.map +1 -1
  77. package/build/common/dateUtils/getMonthNames/getMonthNames.js.map +1 -1
  78. package/build/common/dateUtils/getMonthNames/getMonthNames.mjs.map +1 -1
  79. package/build/common/dateUtils/isDateValid/isDateValid.js.map +1 -1
  80. package/build/common/dateUtils/isDateValid/isDateValid.mjs.map +1 -1
  81. package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.js.map +1 -1
  82. package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.mjs.map +1 -1
  83. package/build/common/deviceDetection/deviceDetection.js.map +1 -1
  84. package/build/common/deviceDetection/deviceDetection.mjs.map +1 -1
  85. package/build/common/direction.js.map +1 -1
  86. package/build/common/direction.mjs.map +1 -1
  87. package/build/common/domHelpers/documentIosClick.js.map +1 -1
  88. package/build/common/domHelpers/documentIosClick.mjs.map +1 -1
  89. package/build/common/fileType.js.map +1 -1
  90. package/build/common/fileType.mjs.map +1 -1
  91. package/build/common/flowHeader/FlowHeader.js.map +1 -1
  92. package/build/common/flowHeader/FlowHeader.mjs.map +1 -1
  93. package/build/common/focusBoundary/FocusBoundary.js.map +1 -1
  94. package/build/common/focusBoundary/FocusBoundary.mjs.map +1 -1
  95. package/build/common/historyNavigator/historyNavigator.js.map +1 -1
  96. package/build/common/historyNavigator/historyNavigator.mjs.map +1 -1
  97. package/build/common/hooks/useConditionalListener/useConditionalListener.js.map +1 -1
  98. package/build/common/hooks/useConditionalListener/useConditionalListener.mjs.map +1 -1
  99. package/build/common/hooks/useDirection/useDirection.js.map +1 -1
  100. package/build/common/hooks/useDirection/useDirection.mjs.map +1 -1
  101. package/build/common/hooks/useEffectEvent.js.map +1 -1
  102. package/build/common/hooks/useEffectEvent.mjs.map +1 -1
  103. package/build/common/hooks/useHasIntersected/useHasIntersected.js.map +1 -1
  104. package/build/common/hooks/useHasIntersected/useHasIntersected.mjs.map +1 -1
  105. package/build/common/hooks/useLayout/useLayout.js.map +1 -1
  106. package/build/common/hooks/useLayout/useLayout.mjs.map +1 -1
  107. package/build/common/hooks/useMedia.js.map +1 -1
  108. package/build/common/hooks/useMedia.mjs.map +1 -1
  109. package/build/common/hooks/useResizeObserver.js.map +1 -1
  110. package/build/common/hooks/useResizeObserver.mjs.map +1 -1
  111. package/build/common/hooks/useScreenSize.js.map +1 -1
  112. package/build/common/hooks/useScreenSize.mjs.map +1 -1
  113. package/build/common/hooks/useVirtualKeyboard.js.map +1 -1
  114. package/build/common/hooks/useVirtualKeyboard.mjs.map +1 -1
  115. package/build/common/initials.js.map +1 -1
  116. package/build/common/initials.mjs.map +1 -1
  117. package/build/common/locale/index.js +1 -1
  118. package/build/common/locale/index.js.map +1 -1
  119. package/build/common/locale/index.mjs +1 -1
  120. package/build/common/locale/index.mjs.map +1 -1
  121. package/build/common/panel/Panel.js.map +1 -1
  122. package/build/common/panel/Panel.mjs.map +1 -1
  123. package/build/common/propsValues/breakpoint.js.map +1 -1
  124. package/build/common/propsValues/breakpoint.mjs.map +1 -1
  125. package/build/common/propsValues/control.js.map +1 -1
  126. package/build/common/propsValues/control.mjs.map +1 -1
  127. package/build/common/propsValues/dateMode.js.map +1 -1
  128. package/build/common/propsValues/dateMode.mjs.map +1 -1
  129. package/build/common/propsValues/layouts.js.map +1 -1
  130. package/build/common/propsValues/layouts.mjs.map +1 -1
  131. package/build/common/propsValues/markdownNodeType.js.map +1 -1
  132. package/build/common/propsValues/markdownNodeType.mjs.map +1 -1
  133. package/build/common/propsValues/monthFormat.js.map +1 -1
  134. package/build/common/propsValues/monthFormat.mjs.map +1 -1
  135. package/build/common/propsValues/position.js.map +1 -1
  136. package/build/common/propsValues/position.mjs.map +1 -1
  137. package/build/common/propsValues/profileType.js.map +1 -1
  138. package/build/common/propsValues/profileType.mjs.map +1 -1
  139. package/build/common/propsValues/scroll.js.map +1 -1
  140. package/build/common/propsValues/scroll.mjs.map +1 -1
  141. package/build/common/propsValues/sentiment.js.map +1 -1
  142. package/build/common/propsValues/sentiment.mjs.map +1 -1
  143. package/build/common/propsValues/size.js.map +1 -1
  144. package/build/common/propsValues/size.mjs.map +1 -1
  145. package/build/common/propsValues/status.js.map +1 -1
  146. package/build/common/propsValues/status.mjs.map +1 -1
  147. package/build/common/propsValues/type.js.map +1 -1
  148. package/build/common/propsValues/type.mjs.map +1 -1
  149. package/build/common/propsValues/typography.js.map +1 -1
  150. package/build/common/propsValues/typography.mjs.map +1 -1
  151. package/build/common/propsValues/variant.js.map +1 -1
  152. package/build/common/propsValues/variant.mjs.map +1 -1
  153. package/build/common/propsValues/width.js.map +1 -1
  154. package/build/common/propsValues/width.mjs.map +1 -1
  155. package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
  156. package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
  157. package/build/common/textFormat/formatWithPattern/formatWithPattern.js.map +1 -1
  158. package/build/common/textFormat/formatWithPattern/formatWithPattern.mjs.map +1 -1
  159. package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js.map +1 -1
  160. package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.mjs.map +1 -1
  161. package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js.map +1 -1
  162. package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.mjs.map +1 -1
  163. package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js.map +1 -1
  164. package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.mjs.map +1 -1
  165. package/build/common/textFormat/unformatWithPattern/unformatWithPattern.js.map +1 -1
  166. package/build/common/textFormat/unformatWithPattern/unformatWithPattern.mjs.map +1 -1
  167. package/build/common/theme.js.map +1 -1
  168. package/build/common/theme.mjs.map +1 -1
  169. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  170. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  171. package/build/dateInput/DateInput.js.map +1 -1
  172. package/build/dateInput/DateInput.mjs.map +1 -1
  173. package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js.map +1 -1
  174. package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.mjs.map +1 -1
  175. package/build/dateLookup/DateLookup.js +3 -2
  176. package/build/dateLookup/DateLookup.js.map +1 -1
  177. package/build/dateLookup/DateLookup.mjs +3 -2
  178. package/build/dateLookup/DateLookup.mjs.map +1 -1
  179. package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
  180. package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
  181. package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -1
  182. package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -1
  183. package/build/dateLookup/dayCalendar/DayCalendar.js.map +1 -1
  184. package/build/dateLookup/dayCalendar/DayCalendar.mjs.map +1 -1
  185. package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -1
  186. package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs.map +1 -1
  187. package/build/dateLookup/getStartOfDay/getStartOfDay.js.map +1 -1
  188. package/build/dateLookup/getStartOfDay/getStartOfDay.mjs.map +1 -1
  189. package/build/dateLookup/monthCalendar/MonthCalendar.js.map +1 -1
  190. package/build/dateLookup/monthCalendar/MonthCalendar.mjs.map +1 -1
  191. package/build/dateLookup/monthCalendar/table/MonthCalendarTable.js.map +1 -1
  192. package/build/dateLookup/monthCalendar/table/MonthCalendarTable.mjs.map +1 -1
  193. package/build/dateLookup/tableLink/TableLink.js.map +1 -1
  194. package/build/dateLookup/tableLink/TableLink.mjs.map +1 -1
  195. package/build/dateLookup/yearCalendar/YearCalendar.js.map +1 -1
  196. package/build/dateLookup/yearCalendar/YearCalendar.mjs.map +1 -1
  197. package/build/dateLookup/yearCalendar/table/YearCalendarTable.js.map +1 -1
  198. package/build/dateLookup/yearCalendar/table/YearCalendarTable.mjs.map +1 -1
  199. package/build/decision/Decision.js.map +1 -1
  200. package/build/decision/Decision.mjs.map +1 -1
  201. package/build/definitionList/DefinitionList.js.map +1 -1
  202. package/build/definitionList/DefinitionList.mjs.map +1 -1
  203. package/build/dimmer/Dimmer.js.map +1 -1
  204. package/build/dimmer/Dimmer.mjs.map +1 -1
  205. package/build/dimmer/dimmerManager/DimmerManager.js.map +1 -1
  206. package/build/dimmer/dimmerManager/DimmerManager.mjs.map +1 -1
  207. package/build/display/Display.js.map +1 -1
  208. package/build/display/Display.mjs.map +1 -1
  209. package/build/divider/Divider.js.map +1 -1
  210. package/build/divider/Divider.mjs.map +1 -1
  211. package/build/drawer/Drawer.js.map +1 -1
  212. package/build/drawer/Drawer.mjs.map +1 -1
  213. package/build/dropFade/DropFade.js.map +1 -1
  214. package/build/dropFade/DropFade.mjs.map +1 -1
  215. package/build/emphasis/Emphasis.js.map +1 -1
  216. package/build/emphasis/Emphasis.mjs.map +1 -1
  217. package/build/emphasis/EmphasisHtmlTransformer.js.map +1 -1
  218. package/build/emphasis/EmphasisHtmlTransformer.mjs.map +1 -1
  219. package/build/field/Field.js.map +1 -1
  220. package/build/field/Field.mjs.map +1 -1
  221. package/build/flowNavigation/FlowNavigation.js.map +1 -1
  222. package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
  223. package/build/flowNavigation/animatedLabel/AnimatedLabel.js.map +1 -1
  224. package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs.map +1 -1
  225. package/build/header/Header.js.map +1 -1
  226. package/build/header/Header.mjs.map +1 -1
  227. package/build/i18n/index.js +2 -0
  228. package/build/i18n/index.js.map +1 -1
  229. package/build/i18n/index.mjs +2 -0
  230. package/build/i18n/index.mjs.map +1 -1
  231. package/build/i18n/nl.json.js +81 -0
  232. package/build/i18n/nl.json.js.map +1 -0
  233. package/build/i18n/nl.json.mjs +77 -0
  234. package/build/i18n/nl.json.mjs.map +1 -0
  235. package/build/image/Image.js.map +1 -1
  236. package/build/image/Image.mjs.map +1 -1
  237. package/build/info/Info.js.map +1 -1
  238. package/build/info/Info.mjs.map +1 -1
  239. package/build/info/infoPresentations.js.map +1 -1
  240. package/build/info/infoPresentations.mjs.map +1 -1
  241. package/build/inlineAlert/InlineAlert.js.map +1 -1
  242. package/build/inlineAlert/InlineAlert.mjs.map +1 -1
  243. package/build/inputs/Input.js.map +1 -1
  244. package/build/inputs/Input.mjs.map +1 -1
  245. package/build/inputs/InputGroup.js.map +1 -1
  246. package/build/inputs/InputGroup.mjs.map +1 -1
  247. package/build/inputs/SearchInput.js.map +1 -1
  248. package/build/inputs/SearchInput.mjs.map +1 -1
  249. package/build/inputs/SelectInput.js.map +1 -1
  250. package/build/inputs/SelectInput.mjs.map +1 -1
  251. package/build/inputs/_BottomSheet.js.map +1 -1
  252. package/build/inputs/_BottomSheet.mjs.map +1 -1
  253. package/build/inputs/_ButtonInput.js.map +1 -1
  254. package/build/inputs/_ButtonInput.mjs.map +1 -1
  255. package/build/inputs/_Popover.js.map +1 -1
  256. package/build/inputs/_Popover.mjs.map +1 -1
  257. package/build/inputs/contexts.js.map +1 -1
  258. package/build/inputs/contexts.mjs.map +1 -1
  259. package/build/instructionsList/InstructionsList.js.map +1 -1
  260. package/build/instructionsList/InstructionsList.mjs.map +1 -1
  261. package/build/label/Label.js.map +1 -1
  262. package/build/label/Label.mjs.map +1 -1
  263. package/build/legacylistItem/LegacyListItem.js.map +1 -1
  264. package/build/legacylistItem/LegacyListItem.mjs.map +1 -1
  265. package/build/legacylistItem/List.js.map +1 -1
  266. package/build/legacylistItem/List.mjs.map +1 -1
  267. package/build/link/Link.js.map +1 -1
  268. package/build/link/Link.mjs.map +1 -1
  269. package/build/loader/Loader.js.map +1 -1
  270. package/build/loader/Loader.mjs.map +1 -1
  271. package/build/logo/Logo.js.map +1 -1
  272. package/build/logo/Logo.mjs.map +1 -1
  273. package/build/logo/logo-assets.js.map +1 -1
  274. package/build/logo/logo-assets.mjs.map +1 -1
  275. package/build/main.css +4 -94
  276. package/build/markdown/Markdown.js.map +1 -1
  277. package/build/markdown/Markdown.mjs.map +1 -1
  278. package/build/mocks.js.map +1 -1
  279. package/build/mocks.mjs.map +1 -1
  280. package/build/modal/Modal.js.map +1 -1
  281. package/build/modal/Modal.mjs.map +1 -1
  282. package/build/money/Money.js.map +1 -1
  283. package/build/money/Money.mjs.map +1 -1
  284. package/build/moneyInput/MoneyInput.js.map +1 -1
  285. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  286. package/build/moneyInput/currencyFormatting.js.map +1 -1
  287. package/build/moneyInput/currencyFormatting.mjs.map +1 -1
  288. package/build/navigationOption/NavigationOption.js.map +1 -1
  289. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  290. package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -1
  291. package/build/navigationOptionsList/NavigationOptionsList.mjs.map +1 -1
  292. package/build/nudge/Nudge.js.map +1 -1
  293. package/build/nudge/Nudge.mjs.map +1 -1
  294. package/build/overlayHeader/OverlayHeader.js.map +1 -1
  295. package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
  296. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  297. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  298. package/build/phoneNumberInput/data/countries.js.map +1 -1
  299. package/build/phoneNumberInput/data/countries.mjs.map +1 -1
  300. package/build/phoneNumberInput/utils/explodeNumberModel/index.js.map +1 -1
  301. package/build/phoneNumberInput/utils/explodeNumberModel/index.mjs.map +1 -1
  302. package/build/phoneNumberInput/utils/findCountryByCode/index.js.map +1 -1
  303. package/build/phoneNumberInput/utils/findCountryByCode/index.mjs.map +1 -1
  304. package/build/phoneNumberInput/utils/findCountryByPrefix/index.js.map +1 -1
  305. package/build/phoneNumberInput/utils/findCountryByPrefix/index.mjs.map +1 -1
  306. package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js.map +1 -1
  307. package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.mjs.map +1 -1
  308. package/build/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.js.map +1 -1
  309. package/build/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.mjs.map +1 -1
  310. package/build/phoneNumberInput/utils/longestMatchingPrefix/index.js.map +1 -1
  311. package/build/phoneNumberInput/utils/longestMatchingPrefix/index.mjs.map +1 -1
  312. package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js.map +1 -1
  313. package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.mjs.map +1 -1
  314. package/build/popover/Popover.js.map +1 -1
  315. package/build/popover/Popover.mjs.map +1 -1
  316. package/build/primitives/PrimitiveAnchor/PrimitiveAnchor.js.map +1 -1
  317. package/build/primitives/PrimitiveAnchor/PrimitiveAnchor.mjs.map +1 -1
  318. package/build/primitives/PrimitiveButton/PrimitiveButton.js.map +1 -1
  319. package/build/primitives/PrimitiveButton/PrimitiveButton.mjs.map +1 -1
  320. package/build/processIndicator/ProcessIndicator.js.map +1 -1
  321. package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
  322. package/build/progress/Progress.js.map +1 -1
  323. package/build/progress/Progress.mjs.map +1 -1
  324. package/build/progressBar/ProgressBar.js.map +1 -1
  325. package/build/progressBar/ProgressBar.mjs.map +1 -1
  326. package/build/promoCard/PromoCard.js.map +1 -1
  327. package/build/promoCard/PromoCard.mjs.map +1 -1
  328. package/build/promoCard/PromoCardContext.js.map +1 -1
  329. package/build/promoCard/PromoCardContext.mjs.map +1 -1
  330. package/build/promoCard/PromoCardGroup.js.map +1 -1
  331. package/build/promoCard/PromoCardGroup.mjs.map +1 -1
  332. package/build/promoCard/PromoCardIndicator.js.map +1 -1
  333. package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
  334. package/build/provider/Provider.js.map +1 -1
  335. package/build/provider/Provider.mjs.map +1 -1
  336. package/build/provider/direction/DirectionProvider.js.map +1 -1
  337. package/build/provider/direction/DirectionProvider.mjs.map +1 -1
  338. package/build/provider/language/LanguageProvider.js.map +1 -1
  339. package/build/provider/language/LanguageProvider.mjs.map +1 -1
  340. package/build/provider/overlay/OverlayIdProvider.js.map +1 -1
  341. package/build/provider/overlay/OverlayIdProvider.mjs.map +1 -1
  342. package/build/radio/Radio.js.map +1 -1
  343. package/build/radio/Radio.mjs.map +1 -1
  344. package/build/radioGroup/RadioGroup.js.map +1 -1
  345. package/build/radioGroup/RadioGroup.mjs.map +1 -1
  346. package/build/radioOption/RadioOption.js.map +1 -1
  347. package/build/radioOption/RadioOption.mjs.map +1 -1
  348. package/build/section/Section.js.map +1 -1
  349. package/build/section/Section.mjs.map +1 -1
  350. package/build/segmentedControl/SegmentedControl.js.map +1 -1
  351. package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
  352. package/build/select/Select.js.map +1 -1
  353. package/build/select/Select.mjs.map +1 -1
  354. package/build/select/option/Option.js.map +1 -1
  355. package/build/select/option/Option.mjs.map +1 -1
  356. package/build/select/searchBox/SearchBox.js.map +1 -1
  357. package/build/select/searchBox/SearchBox.mjs.map +1 -1
  358. package/build/slidingPanel/SlidingPanel.js.map +1 -1
  359. package/build/slidingPanel/SlidingPanel.mjs.map +1 -1
  360. package/build/snackbar/Snackbar.js.map +1 -1
  361. package/build/snackbar/Snackbar.mjs.map +1 -1
  362. package/build/snackbar/SnackbarContext.js.map +1 -1
  363. package/build/snackbar/SnackbarContext.mjs.map +1 -1
  364. package/build/snackbar/SnackbarProvider.js.map +1 -1
  365. package/build/snackbar/SnackbarProvider.mjs.map +1 -1
  366. package/build/snackbar/useSnackbar.js.map +1 -1
  367. package/build/snackbar/useSnackbar.mjs.map +1 -1
  368. package/build/statusIcon/StatusIcon.js.map +1 -1
  369. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  370. package/build/stepper/Stepper.js.map +1 -1
  371. package/build/stepper/Stepper.mjs.map +1 -1
  372. package/build/stepper/deviceDetection.js.map +1 -1
  373. package/build/stepper/deviceDetection.mjs.map +1 -1
  374. package/build/sticky/Sticky.js.map +1 -1
  375. package/build/sticky/Sticky.mjs.map +1 -1
  376. package/build/styles/accordion/Accordion.css +27 -16
  377. package/build/styles/avatar/Avatar.css +95 -50
  378. package/build/styles/inputs/Input.css +37 -21
  379. package/build/styles/inputs/TextArea.css +35 -20
  380. package/build/styles/loader/Loader.css +4 -90
  381. package/build/styles/main.css +4 -94
  382. package/build/styles/popover/Popover.css +19 -12
  383. package/build/styles/select/Select.css +131 -68
  384. package/build/styles/switch/Switch.css +27 -16
  385. package/build/styles/tile/Tile.css +31 -18
  386. package/build/summary/Summary.js.map +1 -1
  387. package/build/summary/Summary.mjs.map +1 -1
  388. package/build/switch/Switch.js.map +1 -1
  389. package/build/switch/Switch.mjs.map +1 -1
  390. package/build/switchOption/SwitchOption.js.map +1 -1
  391. package/build/switchOption/SwitchOption.mjs.map +1 -1
  392. package/build/table/Table.js.map +1 -1
  393. package/build/table/Table.mjs.map +1 -1
  394. package/build/table/TableCell.js.map +1 -1
  395. package/build/table/TableCell.mjs.map +1 -1
  396. package/build/table/TableHeader.js.map +1 -1
  397. package/build/table/TableHeader.mjs.map +1 -1
  398. package/build/table/TableRow.js.map +1 -1
  399. package/build/table/TableRow.mjs.map +1 -1
  400. package/build/table/TableStatusText.js.map +1 -1
  401. package/build/table/TableStatusText.mjs.map +1 -1
  402. package/build/tabs/Tab.js.map +1 -1
  403. package/build/tabs/Tab.mjs.map +1 -1
  404. package/build/tabs/TabList.js.map +1 -1
  405. package/build/tabs/TabList.mjs.map +1 -1
  406. package/build/tabs/TabPanel.js.map +1 -1
  407. package/build/tabs/TabPanel.mjs.map +1 -1
  408. package/build/tabs/Tabs.js.map +1 -1
  409. package/build/tabs/Tabs.mjs.map +1 -1
  410. package/build/tabs/utils.js.map +1 -1
  411. package/build/tabs/utils.mjs.map +1 -1
  412. package/build/tile/Tile.js.map +1 -1
  413. package/build/tile/Tile.mjs.map +1 -1
  414. package/build/title/Title.js.map +1 -1
  415. package/build/title/Title.mjs.map +1 -1
  416. package/build/tooltip/Tooltip.js.map +1 -1
  417. package/build/tooltip/Tooltip.mjs.map +1 -1
  418. package/build/typeahead/Typeahead.js.map +1 -1
  419. package/build/typeahead/Typeahead.mjs.map +1 -1
  420. package/build/typeahead/typeaheadInput/TypeaheadInput.js.map +1 -1
  421. package/build/typeahead/typeaheadInput/TypeaheadInput.mjs.map +1 -1
  422. package/build/typeahead/typeaheadOption/TypeaheadOption.js.map +1 -1
  423. package/build/typeahead/typeaheadOption/TypeaheadOption.mjs.map +1 -1
  424. package/build/typeahead/util/highlight.js.map +1 -1
  425. package/build/typeahead/util/highlight.mjs.map +1 -1
  426. package/build/types/common/locale/index.d.ts.map +1 -1
  427. package/build/types/dateLookup/DateLookup.d.ts +2 -2
  428. package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
  429. package/build/types/i18n/index.d.ts.map +1 -1
  430. package/build/types/test-utils/story-config.d.ts +2 -3
  431. package/build/types/test-utils/story-config.d.ts.map +1 -1
  432. package/build/upload/Upload.js.map +1 -1
  433. package/build/upload/Upload.mjs.map +1 -1
  434. package/build/upload/steps/completeStep/completeStep.js.map +1 -1
  435. package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
  436. package/build/upload/steps/processingStep/processingStep.js.map +1 -1
  437. package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
  438. package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
  439. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
  440. package/build/upload/utils/asyncFileRead/asyncFileRead.js.map +1 -1
  441. package/build/upload/utils/asyncFileRead/asyncFileRead.mjs.map +1 -1
  442. package/build/upload/utils/getFileType/getFileType.js.map +1 -1
  443. package/build/upload/utils/getFileType/getFileType.mjs.map +1 -1
  444. package/build/upload/utils/isSizeValid/isSizeValid.js.map +1 -1
  445. package/build/upload/utils/isSizeValid/isSizeValid.mjs.map +1 -1
  446. package/build/upload/utils/isTypeValid/isTypeValid.js.map +1 -1
  447. package/build/upload/utils/isTypeValid/isTypeValid.mjs.map +1 -1
  448. package/build/upload/utils/postData/postData.js.map +1 -1
  449. package/build/upload/utils/postData/postData.mjs.map +1 -1
  450. package/build/uploadInput/UploadInput.js.map +1 -1
  451. package/build/uploadInput/UploadInput.mjs.map +1 -1
  452. package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
  453. package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
  454. package/build/uploadInput/uploadButton/defaults.js.map +1 -1
  455. package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
  456. package/build/uploadInput/uploadButton/getAllowedFileTypes.js.map +1 -1
  457. package/build/uploadInput/uploadButton/getAllowedFileTypes.mjs.map +1 -1
  458. package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
  459. package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
  460. package/build/uploadInput/uploadItem/UploadItemLink.js.map +1 -1
  461. package/build/uploadInput/uploadItem/UploadItemLink.mjs.map +1 -1
  462. package/build/utilities/cssValueWithUnit.js.map +1 -1
  463. package/build/utilities/cssValueWithUnit.mjs.map +1 -1
  464. package/build/utilities/logActionRequired.js.map +1 -1
  465. package/build/utilities/logActionRequired.mjs.map +1 -1
  466. package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
  467. package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  468. package/build/withId/withId.js.map +1 -1
  469. package/build/withId/withId.mjs.map +1 -1
  470. package/build/withNextPortal/withNextPortal.js.map +1 -1
  471. package/build/withNextPortal/withNextPortal.mjs.map +1 -1
  472. package/package.json +37 -45
  473. package/src/accordion/Accordion.css +27 -16
  474. package/src/accordion/Accordion.story.tsx +31 -22
  475. package/src/actionButton/ActionButton.story.tsx +3 -3
  476. package/src/actionOption/ActionOption.story.tsx +2 -3
  477. package/src/alert/Alert.story.tsx +3 -3
  478. package/src/alert/Alert.tests.story.tsx +2 -2
  479. package/src/avatar/Avatar.css +95 -50
  480. package/src/avatar/Avatar.spec.tsx +7 -4
  481. package/src/avatar/Avatar.story.tsx +3 -3
  482. package/src/avatarLayout/AvatarLayout.story.tsx +1 -4
  483. package/src/avatarLayout/AvatarLayout.tsx +1 -1
  484. package/src/avatarView/AvatarView.story.tsx +1 -7
  485. package/src/avatarWrapper/AvatarWrapper.story.tsx +3 -3
  486. package/src/badge/Badge.story.tsx +49 -29
  487. package/src/body/Body.story.tsx +0 -1
  488. package/src/button/Button.accessibility.docs.mdx +1 -1
  489. package/src/button/Button.story.tsx +3 -3
  490. package/src/button/Button.tests.story.tsx +2 -2
  491. package/src/button/LegacyButton.story.tsx +4 -3
  492. package/src/card/Card.story.tsx +2 -3
  493. package/src/carousel/Carousel.story.tsx +1 -1
  494. package/src/checkbox/Checkbox.story.tsx +2 -3
  495. package/src/checkboxButton/CheckboxButton.story.tsx +3 -3
  496. package/src/checkboxOption/CheckboxOption.story.tsx +35 -30
  497. package/src/chevron/Chevron.story.tsx +1 -2
  498. package/src/chips/Chips.story.tsx +1 -2
  499. package/src/circularButton/CircularButton.story.tsx +2 -2
  500. package/src/circularButton/CircularButton.tests.story.tsx +1 -1
  501. package/src/common/bottomSheet/BottomSheet.story.tsx +7 -6
  502. package/src/common/card/Card.story.tsx +1 -2
  503. package/src/common/circle/Circle.story.tsx +2 -3
  504. package/src/common/locale/index.spec.ts +29 -17
  505. package/src/common/locale/index.ts +2 -0
  506. package/src/common/responsivePanel/ResponsivePanel.spec.js +8 -29
  507. package/src/criticalBanner/CriticalCommsBanner.story.tsx +1 -2
  508. package/src/dateInput/DateInput.story.tsx +2 -3
  509. package/src/dateInput/DateInput.tests.story.tsx +2 -2
  510. package/src/dateLookup/DateLookup.spec.tsx +5 -5
  511. package/src/dateLookup/DateLookup.story.tsx +43 -71
  512. package/src/dateLookup/DateLookup.tests.story.tsx +3 -3
  513. package/src/dateLookup/DateLookup.tsx +4 -1
  514. package/src/decision/Decision.story.tsx +24 -49
  515. package/src/definitionList/DefinitionList.story.tsx +1 -1
  516. package/src/dimmer/Dimmer.story.tsx +2 -2
  517. package/src/divider/Divider.accessibility.docs.mdx +1 -1
  518. package/src/divider/Divider.story.tsx +2 -2
  519. package/src/drawer/Drawer.story.tsx +13 -7
  520. package/src/dropFade/DropFade.story.tsx +1 -1
  521. package/src/emphasis/Emphasis.spec.tsx +8 -8
  522. package/src/emphasis/Emphasis.story.tsx +1 -2
  523. package/src/field/Field.story.tsx +4 -4
  524. package/src/flowNavigation/FlowNavigation.story.tsx +305 -260
  525. package/src/i18n/index.ts +2 -0
  526. package/src/iconButton/IconButton.story.tsx +2 -3
  527. package/src/image/Image.story.tsx +27 -54
  528. package/src/info/Info.story.tsx +3 -2
  529. package/src/inlineAlert/InlineAlert.story.tsx +1 -1
  530. package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.tsx +3 -2
  531. package/src/inputs/Input.css +37 -21
  532. package/src/inputs/InputGroup.story.tsx +1 -1
  533. package/src/inputs/SearchInput.story.tsx +1 -1
  534. package/src/inputs/SelectInput.docs.mdx +1 -1
  535. package/src/inputs/SelectInput.story.tsx +3 -3
  536. package/src/inputs/TextArea.css +35 -20
  537. package/src/instructionsList/InstructionsList.story.tsx +2 -3
  538. package/src/label/Label.story.tsx +0 -1
  539. package/src/legacylistItem/LegacyListItem.story.tsx +1 -2
  540. package/src/loader/Loader.css +4 -90
  541. package/src/loader/Loader.story.tsx +1 -2
  542. package/src/logo/Logo.story.tsx +1 -2
  543. package/src/main.css +4 -94
  544. package/src/markdown/Markdown.story.tsx +1 -2
  545. package/src/modal/Modal.story.tsx +13 -8
  546. package/src/money/Money.story.tsx +1 -1
  547. package/src/moneyInput/MoneyInput.docs.mdx +1 -1
  548. package/src/moneyInput/MoneyInput.spec.tsx +8 -5
  549. package/src/moneyInput/MoneyInput.story.tsx +2 -3
  550. package/src/moneyInput/currencyFormatting.spec.ts +1 -1
  551. package/src/navigationOption/NavigationOption.story.tsx +264 -226
  552. package/src/nudge/Nudge.story.tsx +1 -1
  553. package/src/overlayHeader/OverlayHeader.story.tsx +32 -24
  554. package/src/phoneNumberInput/PhoneNumberInput.story.tsx +1 -2
  555. package/src/phoneNumberInput/utils/setDefaultPrefix/setDefaultPrefix.spec.ts +6 -3
  556. package/src/popover/Popover.css +19 -12
  557. package/src/popover/Popover.story.tsx +3 -3
  558. package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.story.tsx +2 -3
  559. package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.tests.story.tsx +2 -2
  560. package/src/primitives/PrimitiveButton/stories/PrimitiveButton.story.tsx +2 -3
  561. package/src/primitives/PrimitiveButton/stories/PrimitiveButton.tests.story.tsx +2 -3
  562. package/src/processIndicator/ProcessIndicator.story.tsx +1 -2
  563. package/src/progress/Progress.story.tsx +1 -1
  564. package/src/progressBar/ProgressBar.story.tsx +1 -2
  565. package/src/promoCard/PromoCard.story.tsx +2 -2
  566. package/src/promoCard/PromoCardGroup.story.tsx +1 -2
  567. package/src/provider/Provider.spec.tsx +2 -2
  568. package/src/provider/Provider.story.tsx +1 -1
  569. package/src/provider/direction/DirectionProvider.spec.tsx +1 -1
  570. package/src/provider/language/LanguageProvider.spec.tsx +1 -1
  571. package/src/provider/theme/ThemeProvider.story.tsx +1 -1
  572. package/src/radio/Radio.story.tsx +59 -42
  573. package/src/radioGroup/RadioGroup.story.tsx +2 -2
  574. package/src/radioOption/RadioOption.story.tsx +73 -38
  575. package/src/segmentedControl/SegmentedControl.story.tsx +1 -1
  576. package/src/select/Select.css +131 -68
  577. package/src/select/Select.story.tsx +385 -397
  578. package/src/slidingPanel/SlidingPanel.story.tsx +30 -13
  579. package/src/snackbar/Snackbar.story.tsx +50 -36
  580. package/src/snackbar/Snackbar.tests.story.tsx +3 -2
  581. package/src/statusIcon/StatusIcon.docs.mdx +1 -1
  582. package/src/statusIcon/StatusIcon.spec.tsx +8 -5
  583. package/src/statusIcon/StatusIcon.story.tsx +2 -2
  584. package/src/stepper/Stepper.story.tsx +2 -3
  585. package/src/stepper/Stepper.tests.story.tsx +2 -2
  586. package/src/sticky/Sticky.story.tsx +2 -2
  587. package/src/summary/Summary.story.tsx +18 -17
  588. package/src/switch/Switch.css +27 -16
  589. package/src/switch/Switch.story.tsx +2 -3
  590. package/src/switchOption/SwitchOption.story.tsx +2 -2
  591. package/src/table/Table.story.tsx +1 -2
  592. package/src/tabs/Tabs.story.tsx +0 -1
  593. package/src/test-utils/story-config.ts +9 -6
  594. package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.story.tsx +2 -2
  595. package/src/tile/Tile.css +31 -18
  596. package/src/tile/Tile.story.tsx +43 -43
  597. package/src/tooltip/Tooltip.story.tsx +2 -3
  598. package/src/typeahead/Typeahead.story.tsx +3 -2
  599. package/src/upload/Upload.story.tsx +3 -3
  600. package/src/upload/Upload.tests.story.tsx +2 -2
  601. package/src/upload/utils/isTypeValid/isTypeValid.spec.ts +3 -1
  602. package/src/uploadInput/UploadInput.story.tsx +1 -2
  603. package/src/uploadInput/UploadInput.tests.story.tsx +3 -3
  604. package/src/withId/withId.docs.mdx +1 -1
  605. package/src/withId/withId.story.tsx +1 -1
  606. package/src/common/responsivePanel/__snapshots__/ResponsivePanel.spec.js.snap +0 -21
@@ -1,16 +1,38 @@
1
- import { text, boolean, select } from '@storybook/addon-knobs';
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { Person as ProfileIcon, Globe as GlobeIcon } from '@transferwise/icons';
3
3
  import { useState } from 'react';
4
-
5
4
  import Select, { SelectItem, SelectOptionItem } from './Select';
6
5
 
7
6
  /**
8
- * @deprecated Use **`SelectInput`** instead (https://neptune.wise.design/blog/2023-11-28-adopting-our-new-selectinput)
7
+ * @deprecated Use **`SelectInput`** instead <br/> [https://neptune.wise.design/blog/2023-11-28-adopting-our-new-selectinput](https://neptune.wise.design/blog/2023-11-28-adopting-our-new-selectinput)
9
8
  */
10
- export default {
9
+ const meta: Meta<typeof Select> = {
11
10
  component: Select,
12
- title: 'Forms/Select (Deprecated)',
11
+ title: 'Forms/Select',
12
+ tags: ['deprecated'],
13
+ argTypes: {
14
+ id: { control: 'text' },
15
+ size: { control: 'radio', options: ['sm', 'md', 'lg'] },
16
+ dropdownRight: { control: 'radio', options: ['xs', 'sm', 'md', 'lg', 'xl'] },
17
+ dropdownWidth: { control: 'radio', options: [undefined, 'sm', 'md', 'lg'] },
18
+ placeholder: { control: 'text' },
19
+ inverse: { control: 'boolean' },
20
+ block: { control: 'boolean' },
21
+ required: { control: 'boolean' },
22
+ dropdownUp: { control: 'boolean' },
23
+ disabled: { control: 'boolean' },
24
+ search: { control: 'boolean' },
25
+ searchPlaceholder: { control: 'text' },
26
+ options: { control: false },
27
+ selected: { control: false },
28
+ onChange: { action: 'onChange' },
29
+ onSearchChange: { action: 'onSearchChange' },
30
+ searchValue: { control: false },
31
+ },
13
32
  };
33
+ export default meta;
34
+
35
+ type Story = StoryObj<typeof Select>;
14
36
 
15
37
  const ImageIcon = () => (
16
38
  <img
@@ -20,410 +42,376 @@ const ImageIcon = () => (
20
42
  />
21
43
  );
22
44
 
23
- interface SelectItemWithCountries extends SelectItem {
24
- countries?: string;
25
- }
26
-
27
45
  const isSelectOptionItem = (option: SelectItem | null): option is SelectOptionItem => {
28
46
  return option !== null && typeof option.value !== 'undefined';
29
47
  };
30
48
 
31
- export const Basic = () => {
32
- const [selected, setSelected] = useState<SelectOptionItem>({
33
- value: 0,
34
- label: 'A thing',
35
- note: 'with a note',
36
- });
37
-
38
- const size = select('size', ['sm', 'md', 'lg'], 'md');
39
- const dropdownRight = select('dropdownRight', ['xs', 'sm', 'md', 'lg', 'xl'], 'md');
40
- const dropdownWidth = select('dropdownWidth', [undefined, 'sm', 'md', 'lg'], 'md');
41
-
42
- const id = text('id', 'basic-button');
43
- const placeholder = text('placeholder', 'Placeholder text');
44
- const inverse = boolean('inverse', false);
45
- const block = boolean('block', true);
46
- const required = boolean('required', false);
47
- const dropdownUp = boolean('dropdownUp', false);
48
- const disabled = boolean('disabled', false);
49
- const search = boolean('search', true);
50
-
51
- return (
52
- <Select
53
- id={id}
54
- size={size}
55
- placeholder={placeholder}
56
- dropdownRight={dropdownRight}
57
- dropdownWidth={dropdownWidth}
58
- inverse={inverse}
59
- block={block}
60
- selected={selected}
61
- disabled={disabled}
62
- search={search}
63
- required={required}
64
- searchPlaceholder="Search placeholder"
65
- dropdownUp={dropdownUp}
66
- options={[
67
- { header: 'Basic' },
68
- { value: -1, label: 'A thing' },
69
- { value: 0, label: 'A thing', note: 'with a note' },
70
- { value: 1, label: 'Another thing', secondary: 'with secondary text this time' },
71
- {
72
- value: -2,
73
- label: 'One more thing',
74
- note: 'with a note',
75
- secondary: 'and with secondary text',
76
- },
77
- { value: 6, icon: <ImageIcon />, label: 'An <img>', note: 'with a note' },
78
- { value: 2, label: 'A disabled thing', disabled: true },
79
- { separator: true },
80
- { header: 'Icons' },
81
- { value: 3, label: 'Profile', icon: <ProfileIcon /> },
82
- {
83
- value: 4,
84
- label: 'USD',
85
- icon: <GlobeIcon />,
86
- note: 'United States dollar - Outside of the US',
87
- },
88
- { header: 'Currencies' },
89
- { value: 5, label: 'British pound', currency: 'gbp' },
90
- { value: 6, label: 'Euro', currency: 'eur' },
91
- { value: 7, label: 'USD', currency: 'usd', note: 'United States dollar' },
92
- { separator: true },
93
- { value: 8, label: 'Something else' },
94
- { header: 'Options with searchable alternatives' },
95
- {
96
- value: 9,
97
- label: 'A thing with searchable alternatives',
98
- searchStrings: ['abbreviation', 'acronym', 'nickname'],
99
- },
100
- { separator: true },
101
- { header: 'Long content options' },
102
- {
103
- value: 10,
104
- label:
105
- 'One more thing with lorem ipsum dolor sit amet, consectetur adipiscing elit consequat text',
106
- note: 'with lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor note text',
107
- secondary:
108
- 'and with lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation secondary text',
109
- },
110
- {
111
- value: 11,
112
- icon: <GlobeIcon />,
113
- label:
114
- 'One more thing with lorem ipsum dolor sit amet, consectetur adipiscing elit consequat text',
115
- note: 'with lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor note text',
116
- secondary:
117
- 'and with lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation secondary text',
118
- },
119
- ]}
120
- onChange={(option) => {
121
- if (isSelectOptionItem(option)) {
122
- setSelected(option);
123
- }
124
- }}
125
- />
126
- );
49
+ export const Basic: Story = {
50
+ args: {
51
+ id: 'basic-button',
52
+ size: 'md',
53
+ placeholder: 'Placeholder text',
54
+ dropdownRight: 'md',
55
+ dropdownWidth: 'md',
56
+ inverse: false,
57
+ block: true,
58
+ required: false,
59
+ dropdownUp: false,
60
+ disabled: false,
61
+ search: true,
62
+ searchPlaceholder: 'Search placeholder',
63
+ options: [
64
+ { header: 'Basic' },
65
+ { value: -1, label: 'A thing' },
66
+ { value: 0, label: 'A thing', note: 'with a note' },
67
+ { value: 1, label: 'Another thing', secondary: 'with secondary text this time' },
68
+ {
69
+ value: -2,
70
+ label: 'One more thing',
71
+ note: 'with a note',
72
+ secondary: 'and with secondary text',
73
+ },
74
+ { value: 6, icon: <ImageIcon />, label: 'An <img>', note: 'with a note' },
75
+ { value: 2, label: 'A disabled thing', disabled: true },
76
+ { separator: true },
77
+ { header: 'Icons' },
78
+ { value: 3, label: 'Profile', icon: <ProfileIcon /> },
79
+ {
80
+ value: 4,
81
+ label: 'USD',
82
+ icon: <GlobeIcon />,
83
+ note: 'United States dollar - Outside of the US',
84
+ },
85
+ { header: 'Currencies' },
86
+ { value: 5, label: 'British pound', currency: 'gbp' },
87
+ { value: 6, label: 'Euro', currency: 'eur' },
88
+ { value: 7, label: 'USD', currency: 'usd', note: 'United States dollar' },
89
+ { separator: true },
90
+ { value: 8, label: 'Something else' },
91
+ { header: 'Options with searchable alternatives' },
92
+ {
93
+ value: 9,
94
+ label: 'A thing with searchable alternatives',
95
+ searchStrings: ['abbreviation', 'acronym', 'nickname'],
96
+ },
97
+ { separator: true },
98
+ { header: 'Long content options' },
99
+ {
100
+ value: 10,
101
+ label:
102
+ 'One more thing with lorem ipsum dolor sit amet, consectetur adipiscing elit consequat text',
103
+ note: 'with lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor note text',
104
+ secondary:
105
+ 'and with lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation secondary text',
106
+ },
107
+ {
108
+ value: 11,
109
+ icon: <GlobeIcon />,
110
+ label:
111
+ 'One more thing with lorem ipsum dolor sit amet, consectetur adipiscing elit consequat text',
112
+ note: 'with lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor note text',
113
+ secondary:
114
+ 'and with lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation secondary text',
115
+ },
116
+ ],
117
+ selected: { value: 0, label: 'A thing', note: 'with a note' },
118
+ },
119
+ render: (args) => {
120
+ const initialSelected = args.selected ?? { value: 0, label: 'A thing', note: 'with a note' };
121
+ const [selected, setSelected] = useState<SelectOptionItem>(initialSelected);
122
+ return (
123
+ <Select
124
+ {...args}
125
+ selected={selected}
126
+ onChange={(option) => {
127
+ if (isSelectOptionItem(option)) {
128
+ setSelected(option);
129
+ }
130
+ }}
131
+ />
132
+ );
133
+ },
127
134
  };
128
135
 
129
- export const CustomSearchFunction = () => {
130
- const [selected, setSelected] = useState<SelectOptionItem>({
131
- value: 1,
132
- label: 'EUR',
133
- currency: 'EUR',
134
- });
135
-
136
- const size = select('size', ['sm', 'md', 'lg'], 'md');
137
- const dropdownRight = select('dropdownRight', ['xs', 'sm', 'md', 'lg', 'xl'], 'md');
138
- const dropdownWidth = select('dropdownWidth', [undefined, 'sm', 'md', 'lg'], 'md');
139
-
140
- const id = text('id', 'custom-search-button');
141
- const placeholder = text('placeholder', 'placeholder');
142
- const inverse = boolean('inverse', false);
143
- const block = boolean('block', true);
144
- const required = boolean('required', false);
145
- const dropdownUp = boolean('dropdownUp', false);
146
- const disabled = boolean('disabled', false);
147
- const search = boolean('search', true);
148
-
149
- return (
150
- <Select
151
- id={id}
152
- size={size}
153
- placeholder={placeholder}
154
- dropdownRight={dropdownRight}
155
- dropdownWidth={dropdownWidth}
156
- inverse={inverse}
157
- block={block}
158
- selected={selected}
159
- disabled={disabled}
160
- search={search}
161
- required={required}
162
- searchPlaceholder="Search placeholder"
163
- dropdownUp={dropdownUp}
164
- options={[
165
- { header: 'Popular currencies' },
166
- {
167
- value: 1,
168
- label: 'EUR',
169
- currency: 'EUR',
170
- searchStrings: [
171
- 'Austria',
172
- 'Belgium',
173
- 'Cyprus',
174
- 'Estonia',
175
- 'Finland',
176
- 'France',
177
- 'Germany',
178
- 'Greece',
179
- 'Ireland',
180
- 'Italy',
181
- 'Latvia',
182
- 'Lithuania',
183
- 'Luxembourg',
184
- 'Malta',
185
- 'Netherlands',
186
- 'Portugal',
187
- 'Slovakia',
188
- 'Slovenia',
189
- 'Spain',
190
- 'Andorra',
191
- 'Monaco',
192
- 'San Marino',
193
- 'Vatican City',
194
- 'Kosovo',
195
- 'Montenegro',
196
- ],
197
- },
198
- {
199
- value: 2,
200
- label: 'GBP',
201
- currency: 'GBP',
202
- searchStrings: ['Isle of Man', 'United Kingdom'],
203
- },
204
- {
205
- value: 3,
206
- label: 'INR',
207
- currency: 'INR',
208
- searchStrings: ['India'],
209
- },
210
- {
211
- value: 4,
212
- label: 'USD',
213
- currency: 'USD',
214
- searchStrings: [
215
- 'United States',
216
- 'Ecuador',
217
- 'El Salvador',
218
- 'Panama',
219
- 'East Timor',
220
- 'Zimbabwe',
221
- 'Micronesia',
222
- 'Marshall Islands',
223
- 'Palau',
224
- 'Turks and Caicos Islands',
225
- 'British Virgin Islands',
226
- 'Caribbean Netherlands',
227
- 'Bermuda',
228
- 'Bahamas',
229
- 'Puerto Rico',
230
- 'Guam',
231
- 'Northern Mariana Islands',
232
- 'American Samoa',
233
- 'U.S. Virgin Islands',
234
- ],
235
- },
236
- {
237
- value: 5,
238
- label: 'DOP',
239
- currency: 'dop',
240
- },
241
- {
242
- value: 6,
243
- label: 'UZS',
244
- currency: 'uzs',
245
- },
246
- {
247
- value: 7,
248
- label: 'TTD',
249
- currency: 'ttd',
250
- },
251
- { header: 'All currencies' },
252
- {
253
- currency: 'aed',
254
- value: 'AED',
255
- label: 'AED',
256
- searchStrings: ['United Arab Emirates'],
257
- },
258
- {
259
- currency: 'aud',
260
- value: 'AUD',
261
- label: 'AUD',
262
- note: 'Australian dollar',
263
- searchStrings: ['Australia'],
264
- secondary: '',
265
- icon: null,
266
- },
267
- {
268
- currency: 'bgn',
269
- value: 'BGN',
270
- label: 'BGN',
271
- note: 'Bulgarian lev',
272
- searchStrings: ['Bulgaria'],
273
- secondary: '',
274
- icon: null,
275
- },
276
- {
277
- currency: 'brl',
278
- value: 'BRL',
279
- label: 'BRL',
280
- note: 'Brazilian real',
281
- searchStrings: ['Brazil'],
282
- secondary: '',
283
- icon: null,
284
- },
285
- {
286
- currency: undefined,
287
- value: 'USD',
288
- label: 'USD',
289
- note: 'United States dollar - Outside of the US',
290
- searchStrings: ['United States'],
291
- secondary: '',
292
- icon: <GlobeIcon />,
293
- },
294
- ]}
295
- onChange={(option) => {
296
- if (isSelectOptionItem(option)) {
297
- setSelected(option);
298
- }
299
- }}
300
- />
301
- );
136
+ export const CustomSearchFunction: Story = {
137
+ args: {
138
+ id: 'custom-search-button',
139
+ size: 'md',
140
+ placeholder: 'placeholder',
141
+ dropdownRight: 'md',
142
+ dropdownWidth: 'md',
143
+ inverse: false,
144
+ block: true,
145
+ required: false,
146
+ dropdownUp: false,
147
+ disabled: false,
148
+ search: true,
149
+ searchPlaceholder: 'Search placeholder',
150
+ options: [
151
+ { header: 'Popular currencies' },
152
+ {
153
+ value: 1,
154
+ label: 'EUR',
155
+ currency: 'EUR',
156
+ searchStrings: [
157
+ 'Austria',
158
+ 'Belgium',
159
+ 'Cyprus',
160
+ 'Estonia',
161
+ 'Finland',
162
+ 'France',
163
+ 'Germany',
164
+ 'Greece',
165
+ 'Ireland',
166
+ 'Italy',
167
+ 'Latvia',
168
+ 'Lithuania',
169
+ 'Luxembourg',
170
+ 'Malta',
171
+ 'Netherlands',
172
+ 'Portugal',
173
+ 'Slovakia',
174
+ 'Slovenia',
175
+ 'Spain',
176
+ 'Andorra',
177
+ 'Monaco',
178
+ 'San Marino',
179
+ 'Vatican City',
180
+ 'Kosovo',
181
+ 'Montenegro',
182
+ ],
183
+ },
184
+ {
185
+ value: 2,
186
+ label: 'GBP',
187
+ currency: 'GBP',
188
+ searchStrings: ['Isle of Man', 'United Kingdom'],
189
+ },
190
+ {
191
+ value: 3,
192
+ label: 'INR',
193
+ currency: 'INR',
194
+ searchStrings: ['India'],
195
+ },
196
+ {
197
+ value: 4,
198
+ label: 'USD',
199
+ currency: 'USD',
200
+ searchStrings: [
201
+ 'United States',
202
+ 'Ecuador',
203
+ 'El Salvador',
204
+ 'Panama',
205
+ 'East Timor',
206
+ 'Zimbabwe',
207
+ 'Micronesia',
208
+ 'Marshall Islands',
209
+ 'Palau',
210
+ 'Turks and Caicos Islands',
211
+ 'British Virgin Islands',
212
+ 'Caribbean Netherlands',
213
+ 'Bermuda',
214
+ 'Bahamas',
215
+ 'Puerto Rico',
216
+ 'Guam',
217
+ 'Northern Mariana Islands',
218
+ 'American Samoa',
219
+ 'U.S. Virgin Islands',
220
+ ],
221
+ },
222
+ { value: 5, label: 'DOP', currency: 'dop' },
223
+ { value: 6, label: 'UZS', currency: 'uzs' },
224
+ { value: 7, label: 'TTD', currency: 'ttd' },
225
+ { header: 'All currencies' },
226
+ {
227
+ currency: 'aed',
228
+ value: 'AED',
229
+ label: 'AED',
230
+ searchStrings: ['United Arab Emirates'],
231
+ },
232
+ {
233
+ currency: 'aud',
234
+ value: 'AUD',
235
+ label: 'AUD',
236
+ note: 'Australian dollar',
237
+ searchStrings: ['Australia'],
238
+ secondary: '',
239
+ icon: null,
240
+ },
241
+ {
242
+ currency: 'bgn',
243
+ value: 'BGN',
244
+ label: 'BGN',
245
+ note: 'Bulgarian lev',
246
+ searchStrings: ['Bulgaria'],
247
+ secondary: '',
248
+ icon: null,
249
+ },
250
+ {
251
+ currency: 'brl',
252
+ value: 'BRL',
253
+ label: 'BRL',
254
+ note: 'Brazilian real',
255
+ searchStrings: ['Brazil'],
256
+ secondary: '',
257
+ icon: null,
258
+ },
259
+ {
260
+ currency: undefined,
261
+ value: 'USD',
262
+ label: 'USD',
263
+ note: 'United States dollar - Outside of the US',
264
+ searchStrings: ['United States'],
265
+ secondary: '',
266
+ icon: <GlobeIcon />,
267
+ },
268
+ ],
269
+ selected: { value: 1, label: 'EUR', currency: 'EUR' },
270
+ },
271
+ render: (args) => {
272
+ const initialSelected = args.selected ?? { value: 1, label: 'EUR', currency: 'EUR' };
273
+ const [selected, setSelected] = useState<SelectOptionItem>(initialSelected);
274
+ return (
275
+ <Select
276
+ {...args}
277
+ selected={selected}
278
+ onChange={(option) => {
279
+ if (isSelectOptionItem(option)) {
280
+ setSelected(option);
281
+ }
282
+ }}
283
+ />
284
+ );
285
+ },
302
286
  };
303
287
 
304
- export const AdvancedSearch = () => {
305
- const [searchValue, setSearchValue] = useState('');
306
- const [selected, setSelected] = useState<SelectOptionItem>({
307
- value: 0,
308
- label: 'A thing',
309
- note: 'with a note',
310
- });
311
-
312
- const size = select('size', ['sm', 'md', 'lg'], 'md');
313
- const dropdownRight = select('dropdownRight', ['xs', 'sm', 'md', 'lg', 'xl'], 'md');
314
- const dropdownWidth = select('dropdownWidth', [undefined, 'sm', 'md', 'lg'], 'md');
315
-
316
- const id = text('id', 'advanced-search-button');
317
- const placeholder = text('placeholder', 'placeholder');
318
- const inverse = boolean('inverse', false);
319
- const block = boolean('block', true);
320
- const required = boolean('required', false);
321
- const dropdownUp = boolean('dropdownUp', false);
322
- const disabled = boolean('disabled', false);
323
-
324
- return (
325
- <Select
326
- id={id}
327
- size={size}
328
- placeholder={placeholder}
329
- dropdownRight={dropdownRight}
330
- dropdownWidth={dropdownWidth}
331
- inverse={inverse}
332
- block={block}
333
- selected={selected}
334
- disabled={disabled}
335
- required={required}
336
- searchValue={searchValue}
337
- searchPlaceholder="searchplaceholder"
338
- dropdownUp={dropdownUp}
339
- options={[
340
- { header: 'Basic' },
341
- { value: -1, label: 'A thing' },
342
- { value: 0, label: 'A thing', note: 'with a note' },
343
- { value: 1, label: 'Another thing', secondary: 'with secondary text this time' },
344
- {
345
- value: -2,
346
- label: 'One more thing',
347
- note: 'with a note',
348
- secondary: 'and with secondary text',
349
- },
350
- { value: 2, label: 'A disabled thing', disabled: true },
351
- { separator: true },
352
- { header: 'Icons' },
353
- { value: 3, label: 'Profile', icon: <ProfileIcon /> },
354
- { value: 4, label: 'Globe', icon: <GlobeIcon /> },
355
- { header: 'Currencies' },
356
- { value: 5, label: 'British pound', currency: 'gbp' },
357
- { value: 6, label: 'Euro', currency: 'eur' },
358
- { separator: true },
359
- { value: 7, label: 'Something else' },
360
- { header: 'Options with searchable alternatives' },
361
- {
362
- value: 8,
363
- label: 'A thing with searchable alternatives',
364
- searchStrings: ['abbreviation', 'acronym', 'nickname'],
365
- },
366
- ].filter((option) => option.label?.toLowerCase().includes(searchValue))}
367
- onChange={(option) => {
368
- if (isSelectOptionItem(option)) {
369
- setSelected(option);
288
+ export const AdvancedSearch: Story = {
289
+ args: {
290
+ id: 'advanced-search-button',
291
+ size: 'md',
292
+ placeholder: 'placeholder',
293
+ dropdownRight: 'md',
294
+ dropdownWidth: 'md',
295
+ inverse: false,
296
+ block: true,
297
+ required: false,
298
+ dropdownUp: false,
299
+ disabled: false,
300
+ searchPlaceholder: 'searchplaceholder',
301
+ options: [
302
+ { header: 'Basic' },
303
+ { value: -1, label: 'A thing' },
304
+ { value: 0, label: 'A thing', note: 'with a note' },
305
+ { value: 1, label: 'Another thing', secondary: 'with secondary text this time' },
306
+ {
307
+ value: -2,
308
+ label: 'One more thing',
309
+ note: 'with a note',
310
+ secondary: 'and with secondary text',
311
+ },
312
+ { value: 2, label: 'A disabled thing', disabled: true },
313
+ { separator: true },
314
+ { header: 'Icons' },
315
+ { value: 3, label: 'Profile', icon: <ProfileIcon /> },
316
+ { value: 4, label: 'Globe', icon: <GlobeIcon /> },
317
+ { header: 'Currencies' },
318
+ { value: 5, label: 'British pound', currency: 'gbp' },
319
+ { value: 6, label: 'Euro', currency: 'eur' },
320
+ { separator: true },
321
+ { value: 7, label: 'Something else' },
322
+ { header: 'Options with searchable alternatives' },
323
+ {
324
+ value: 8,
325
+ label: 'A thing with searchable alternatives',
326
+ searchStrings: ['abbreviation', 'acronym', 'nickname'],
327
+ },
328
+ ],
329
+ selected: { value: 0, label: 'A thing', note: 'with a note' },
330
+ },
331
+ render: (args) => {
332
+ const [searchValue, setSearchValue] = useState('');
333
+ const initialSelected = args.selected ?? { value: 0, label: 'A thing', note: 'with a note' };
334
+ const [selected, setSelected] = useState<SelectOptionItem>(initialSelected);
335
+ return (
336
+ <Select
337
+ {...args}
338
+ selected={selected}
339
+ searchValue={searchValue}
340
+ options={
341
+ Array.isArray(args.options)
342
+ ? args.options.filter(
343
+ (option) =>
344
+ typeof option.label === 'string' &&
345
+ option.label.toLowerCase().includes(searchValue),
346
+ )
347
+ : []
370
348
  }
371
- }}
372
- onSearchChange={(v) => setSearchValue(v)}
373
- />
374
- );
349
+ onChange={(option) => {
350
+ if (isSelectOptionItem(option)) {
351
+ setSelected(option);
352
+ }
353
+ }}
354
+ onSearchChange={(v) => setSearchValue(v)}
355
+ />
356
+ );
357
+ },
375
358
  };
376
359
 
377
- export const SearchingLargeLists = () => {
378
- const [selected, setSelected] = useState<SelectOptionItem>({
379
- value: 'option1',
380
- label: 'Option 1',
381
- secondary: 'Here we have a description describing option 1',
382
- });
383
-
384
- const size = select('size', ['sm', 'md', 'lg'], 'md');
385
- const dropdownRight = select('dropdownRight', ['xs', 'sm', 'md', 'lg', 'xl'], 'md');
386
- const dropdownWidth = select('dropdownWidth', [undefined, 'sm', 'md', 'lg'], 'md');
387
-
388
- const id = text('id', 'large-list-button');
389
- const placeholder = text('placeholder', 'Placeholder text');
390
- const inverse = boolean('inverse', false);
391
- const block = boolean('block', true);
392
- const required = boolean('required', false);
393
- const dropdownUp = boolean('dropdownUp', false);
394
- const disabled = boolean('disabled', false);
395
-
396
- return (
397
- <Select
398
- id={id}
399
- size={size}
400
- placeholder={placeholder}
401
- dropdownRight={dropdownRight}
402
- dropdownWidth={dropdownWidth}
403
- inverse={inverse}
404
- block={block}
405
- selected={selected}
406
- disabled={disabled}
407
- search
408
- required={required}
409
- searchPlaceholder="Search placeholder"
410
- dropdownUp={dropdownUp}
411
- options={new Array(1500).fill(null).map((x, index) => ({
412
- value: `option${index + 1}`,
413
- label: `Option ${index + 1}`,
414
- secondary: `Here we have a description describing option ${index + 1}`,
415
- }))}
416
- onChange={(option) => {
417
- if (isSelectOptionItem(option)) {
418
- setSelected(option);
419
- }
420
- }}
421
- />
422
- );
360
+ export const SearchingLargeLists: Story = {
361
+ parameters: {
362
+ docs: {
363
+ canvas: {
364
+ sourceState: 'hidden',
365
+ },
366
+ },
367
+ },
368
+ args: {
369
+ id: 'large-list-button',
370
+ size: 'md',
371
+ placeholder: 'Placeholder text',
372
+ dropdownRight: 'md',
373
+ dropdownWidth: 'md',
374
+ inverse: false,
375
+ block: true,
376
+ required: false,
377
+ dropdownUp: false,
378
+ disabled: false,
379
+ search: true,
380
+ searchPlaceholder: 'Search placeholder',
381
+ options: new Array(1500).fill(null).map((x, index) => ({
382
+ value: `option${index + 1}`,
383
+ label: `Option ${index + 1}`,
384
+ secondary: `Here we have a description describing option ${index + 1}`,
385
+ })),
386
+ selected: {
387
+ value: 'option1',
388
+ label: 'Option 1',
389
+ secondary: 'Here we have a description describing option 1',
390
+ },
391
+ },
392
+ render: (args) => {
393
+ const initialSelected = args.selected ?? {
394
+ value: 'option1',
395
+ label: 'Option 1',
396
+ secondary: 'Here we have a description describing option 1',
397
+ };
398
+ const [selected, setSelected] = useState<SelectOptionItem>(initialSelected);
399
+ return (
400
+ <Select
401
+ {...args}
402
+ selected={selected}
403
+ onChange={(option) => {
404
+ if (isSelectOptionItem(option)) {
405
+ setSelected(option);
406
+ }
407
+ }}
408
+ />
409
+ );
410
+ },
423
411
  };
424
412
 
425
- export const CustomDropdownBalances = () => {
426
- return (
413
+ export const CustomDropdownBalances: Story = {
414
+ render: () => (
427
415
  <>
428
416
  Bye
429
417
  <div className="open">
@@ -451,5 +439,5 @@ export const CustomDropdownBalances = () => {
451
439
  </ul>
452
440
  </div>
453
441
  </>
454
- );
442
+ ),
455
443
  };