@transferwise/components 0.0.0-experimental-a18466a → 0.0.0-experimental-d6b038b

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 (496) hide show
  1. package/build/accordion/Accordion.js.map +1 -1
  2. package/build/accordion/Accordion.mjs.map +1 -1
  3. package/build/actionButton/ActionButton.js.map +1 -1
  4. package/build/actionButton/ActionButton.mjs.map +1 -1
  5. package/build/actionOption/ActionOption.js.map +1 -1
  6. package/build/actionOption/ActionOption.mjs.map +1 -1
  7. package/build/alert/Alert.js +1 -1
  8. package/build/alert/Alert.js.map +1 -1
  9. package/build/alert/Alert.mjs +1 -1
  10. package/build/alert/Alert.mjs.map +1 -1
  11. package/build/avatar/Avatar.js.map +1 -1
  12. package/build/avatar/Avatar.mjs.map +1 -1
  13. package/build/avatarLayout/AvatarLayout.js.map +1 -1
  14. package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
  15. package/build/badge/Badge.js.map +1 -1
  16. package/build/badge/Badge.mjs.map +1 -1
  17. package/build/body/Body.js.map +1 -1
  18. package/build/body/Body.mjs.map +1 -1
  19. package/build/button/LegacyButton.js.map +1 -1
  20. package/build/button/LegacyButton.mjs.map +1 -1
  21. package/build/card/Card.js.map +1 -1
  22. package/build/card/Card.mjs.map +1 -1
  23. package/build/checkboxButton/CheckboxButton.js.map +1 -1
  24. package/build/checkboxButton/CheckboxButton.mjs.map +1 -1
  25. package/build/checkboxOption/CheckboxOption.js.map +1 -1
  26. package/build/checkboxOption/CheckboxOption.mjs.map +1 -1
  27. package/build/circularButton/CircularButton.js.map +1 -1
  28. package/build/circularButton/CircularButton.mjs.map +1 -1
  29. package/build/common/propsValues/type.js +1 -1
  30. package/build/common/propsValues/type.js.map +1 -1
  31. package/build/common/propsValues/type.mjs +1 -1
  32. package/build/common/propsValues/type.mjs.map +1 -1
  33. package/build/common/propsValues/typography.js +1 -1
  34. package/build/common/propsValues/typography.js.map +1 -1
  35. package/build/common/propsValues/typography.mjs +1 -1
  36. package/build/common/propsValues/typography.mjs.map +1 -1
  37. package/build/criticalBanner/CriticalCommsBanner.js +68 -3
  38. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  39. package/build/criticalBanner/CriticalCommsBanner.mjs +69 -4
  40. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  41. package/build/dateInput/DateInput.js +12 -5
  42. package/build/dateInput/DateInput.js.map +1 -1
  43. package/build/dateInput/DateInput.mjs +11 -4
  44. package/build/dateInput/DateInput.mjs.map +1 -1
  45. package/build/dimmer/Dimmer.js.map +1 -1
  46. package/build/dimmer/Dimmer.mjs.map +1 -1
  47. package/build/drawer/Drawer.js.map +1 -1
  48. package/build/drawer/Drawer.mjs.map +1 -1
  49. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +16 -8
  50. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
  51. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +14 -6
  52. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
  53. package/build/field/Field.js.map +1 -1
  54. package/build/field/Field.mjs.map +1 -1
  55. package/build/flowNavigation/FlowNavigation.js.map +1 -1
  56. package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
  57. package/build/header/Header.js.map +1 -1
  58. package/build/header/Header.mjs.map +1 -1
  59. package/build/iconButton/IconButton.js.map +1 -1
  60. package/build/iconButton/IconButton.mjs.map +1 -1
  61. package/build/index.js +14 -7
  62. package/build/index.js.map +1 -1
  63. package/build/index.mjs +10 -3
  64. package/build/index.mjs.map +1 -1
  65. package/build/inputs/{_BottomSheet.js → SelectInput/BottomSheet/SelectInputBottomSheet.js} +7 -7
  66. package/build/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.js.map +1 -0
  67. package/build/inputs/{_BottomSheet.mjs → SelectInput/BottomSheet/SelectInputBottomSheet.mjs} +7 -7
  68. package/build/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.mjs.map +1 -0
  69. package/build/inputs/{_ButtonInput.js → SelectInput/ButtonInput/SelectInputButtonInput.js} +5 -5
  70. package/build/inputs/SelectInput/ButtonInput/SelectInputButtonInput.js.map +1 -0
  71. package/build/inputs/{_ButtonInput.mjs → SelectInput/ButtonInput/SelectInputButtonInput.mjs} +5 -5
  72. package/build/inputs/SelectInput/ButtonInput/SelectInputButtonInput.mjs.map +1 -0
  73. package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.js +27 -0
  74. package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.js.map +1 -0
  75. package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.mjs +25 -0
  76. package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.mjs.map +1 -0
  77. package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.js +59 -0
  78. package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.js.map +1 -0
  79. package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.mjs +56 -0
  80. package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.mjs.map +1 -0
  81. package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.js +50 -0
  82. package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.js.map +1 -0
  83. package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.mjs +48 -0
  84. package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.mjs.map +1 -0
  85. package/build/inputs/SelectInput/ItemView/SelectInputItemView.js +47 -0
  86. package/build/inputs/SelectInput/ItemView/SelectInputItemView.js.map +1 -0
  87. package/build/inputs/SelectInput/ItemView/SelectInputItemView.mjs +45 -0
  88. package/build/inputs/SelectInput/ItemView/SelectInputItemView.mjs.map +1 -0
  89. package/build/inputs/SelectInput/Option/SelectInputOption.js +42 -0
  90. package/build/inputs/SelectInput/Option/SelectInputOption.js.map +1 -0
  91. package/build/inputs/SelectInput/Option/SelectInputOption.mjs +40 -0
  92. package/build/inputs/SelectInput/Option/SelectInputOption.mjs.map +1 -0
  93. package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js +40 -0
  94. package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js.map +1 -0
  95. package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs +38 -0
  96. package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs.map +1 -0
  97. package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js +48 -0
  98. package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js.map +1 -0
  99. package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs +46 -0
  100. package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs.map +1 -0
  101. package/build/inputs/SelectInput/Options/SelectInputOptions.js +300 -0
  102. package/build/inputs/SelectInput/Options/SelectInputOptions.js.map +1 -0
  103. package/build/inputs/SelectInput/Options/SelectInputOptions.mjs +298 -0
  104. package/build/inputs/SelectInput/Options/SelectInputOptions.mjs.map +1 -0
  105. package/build/inputs/{_Popover.js → SelectInput/Popover/SelectInputPopover.js} +7 -7
  106. package/build/inputs/SelectInput/Popover/SelectInputPopover.js.map +1 -0
  107. package/build/inputs/{_Popover.mjs → SelectInput/Popover/SelectInputPopover.mjs} +7 -7
  108. package/build/inputs/SelectInput/Popover/SelectInputPopover.mjs.map +1 -0
  109. package/build/inputs/SelectInput/SelectInput.contexts.js +29 -0
  110. package/build/inputs/SelectInput/SelectInput.contexts.js.map +1 -0
  111. package/build/inputs/SelectInput/SelectInput.contexts.mjs +24 -0
  112. package/build/inputs/SelectInput/SelectInput.contexts.mjs.map +1 -0
  113. package/build/inputs/SelectInput/SelectInput.js +222 -0
  114. package/build/inputs/SelectInput/SelectInput.js.map +1 -0
  115. package/build/inputs/SelectInput/SelectInput.messages.js.map +1 -0
  116. package/build/inputs/SelectInput/SelectInput.messages.mjs.map +1 -0
  117. package/build/inputs/SelectInput/SelectInput.mjs +216 -0
  118. package/build/inputs/SelectInput/SelectInput.mjs.map +1 -0
  119. package/build/inputs/SelectInput/SelectInput.utils.js +164 -0
  120. package/build/inputs/SelectInput/SelectInput.utils.js.map +1 -0
  121. package/build/inputs/SelectInput/SelectInput.utils.mjs +154 -0
  122. package/build/inputs/SelectInput/SelectInput.utils.mjs.map +1 -0
  123. package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js +42 -0
  124. package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js.map +1 -0
  125. package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs +36 -0
  126. package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs.map +1 -0
  127. package/build/legacylistItem/LegacyListItem.js.map +1 -1
  128. package/build/legacylistItem/LegacyListItem.mjs.map +1 -1
  129. package/build/list/List.js.map +1 -1
  130. package/build/list/List.mjs.map +1 -1
  131. package/build/listItem/Button/ListItemButton.js.map +1 -1
  132. package/build/listItem/Button/ListItemButton.mjs.map +1 -1
  133. package/build/listItem/IconButton/ListItemIconButton.js.map +1 -1
  134. package/build/listItem/IconButton/ListItemIconButton.mjs.map +1 -1
  135. package/build/listItem/Image/ListItemImage.js.map +1 -1
  136. package/build/listItem/Image/ListItemImage.mjs.map +1 -1
  137. package/build/listItem/ListItem.js.map +1 -1
  138. package/build/listItem/ListItem.mjs.map +1 -1
  139. package/build/loader/Loader.js.map +1 -1
  140. package/build/loader/Loader.mjs.map +1 -1
  141. package/build/logo/Logo.js.map +1 -1
  142. package/build/logo/Logo.mjs.map +1 -1
  143. package/build/main.css +123 -105
  144. package/build/modal/Modal.js.map +1 -1
  145. package/build/modal/Modal.mjs.map +1 -1
  146. package/build/moneyInput/MoneyInput.js +9 -2
  147. package/build/moneyInput/MoneyInput.js.map +1 -1
  148. package/build/moneyInput/MoneyInput.mjs +8 -1
  149. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  150. package/build/navigationOption/NavigationOption.js.map +1 -1
  151. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  152. package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -1
  153. package/build/navigationOptionsList/NavigationOptionsList.mjs.map +1 -1
  154. package/build/nudge/Nudge.js.map +1 -1
  155. package/build/nudge/Nudge.mjs.map +1 -1
  156. package/build/phoneNumberInput/PhoneNumberInput.js +10 -3
  157. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  158. package/build/phoneNumberInput/PhoneNumberInput.mjs +9 -2
  159. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  160. package/build/popover/Popover.js.map +1 -1
  161. package/build/popover/Popover.mjs.map +1 -1
  162. package/build/processIndicator/ProcessIndicator.js.map +1 -1
  163. package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
  164. package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
  165. package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
  166. package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -1
  167. package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
  168. package/build/radioOption/RadioOption.js.map +1 -1
  169. package/build/radioOption/RadioOption.mjs.map +1 -1
  170. package/build/select/Select.js.map +1 -1
  171. package/build/select/Select.mjs.map +1 -1
  172. package/build/statusIcon/StatusIcon.js.map +1 -1
  173. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  174. package/build/styles/criticalBanner/CriticalCommsBanner.css +33 -15
  175. package/build/styles/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +96 -0
  176. package/build/styles/inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +16 -0
  177. package/build/styles/inputs/SelectInput/ClearButton/SelectInputClearButton.css +46 -0
  178. package/build/styles/inputs/SelectInput/ItemView/SelectInputItemView.css +16 -0
  179. package/build/styles/inputs/SelectInput/Option/SelectInputOption.css +33 -0
  180. package/build/styles/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +37 -0
  181. package/build/styles/inputs/SelectInput/Options/SelectInputOptions.css +81 -0
  182. package/build/styles/inputs/SelectInput/Popover/SelectInputPopover.css +46 -0
  183. package/build/styles/main.css +123 -105
  184. package/build/summary/Summary.js +1 -1
  185. package/build/summary/Summary.js.map +1 -1
  186. package/build/summary/Summary.mjs +1 -1
  187. package/build/summary/Summary.mjs.map +1 -1
  188. package/build/switchOption/SwitchOption.js +1 -1
  189. package/build/switchOption/SwitchOption.js.map +1 -1
  190. package/build/switchOption/SwitchOption.mjs +1 -1
  191. package/build/switchOption/SwitchOption.mjs.map +1 -1
  192. package/build/tabs/Tabs.js.map +1 -1
  193. package/build/tabs/Tabs.mjs.map +1 -1
  194. package/build/typeahead/Typeahead.js.map +1 -1
  195. package/build/typeahead/Typeahead.mjs.map +1 -1
  196. package/build/types/accordion/Accordion.d.ts +2 -8
  197. package/build/types/accordion/Accordion.d.ts.map +1 -1
  198. package/build/types/actionButton/ActionButton.d.ts +4 -6
  199. package/build/types/actionButton/ActionButton.d.ts.map +1 -1
  200. package/build/types/actionOption/ActionOption.d.ts +1 -1
  201. package/build/types/alert/Alert.d.ts +2 -5
  202. package/build/types/alert/Alert.d.ts.map +1 -1
  203. package/build/types/avatar/Avatar.d.ts +0 -4
  204. package/build/types/avatar/Avatar.d.ts.map +1 -1
  205. package/build/types/avatarLayout/AvatarLayout.d.ts +1 -5
  206. package/build/types/avatarLayout/AvatarLayout.d.ts.map +1 -1
  207. package/build/types/badge/Badge.d.ts +0 -2
  208. package/build/types/badge/Badge.d.ts.map +1 -1
  209. package/build/types/body/Body.d.ts +6 -2
  210. package/build/types/body/Body.d.ts.map +1 -1
  211. package/build/types/button/Button.types.d.ts +1 -4
  212. package/build/types/button/Button.types.d.ts.map +1 -1
  213. package/build/types/button/LegacyButton.d.ts +4 -4
  214. package/build/types/card/Card.d.ts +0 -1
  215. package/build/types/card/Card.d.ts.map +1 -1
  216. package/build/types/checkboxButton/CheckboxButton.d.ts +0 -2
  217. package/build/types/checkboxButton/CheckboxButton.d.ts.map +1 -1
  218. package/build/types/checkboxOption/CheckboxOption.d.ts +1 -1
  219. package/build/types/circularButton/CircularButton.d.ts +1 -1
  220. package/build/types/circularButton/CircularButton.d.ts.map +1 -1
  221. package/build/types/common/propsValues/type.d.ts +1 -1
  222. package/build/types/common/propsValues/typography.d.ts +2 -2
  223. package/build/types/criticalBanner/CriticalCommsBanner.d.ts +4 -1
  224. package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
  225. package/build/types/criticalBanner/index.d.ts +1 -0
  226. package/build/types/criticalBanner/index.d.ts.map +1 -1
  227. package/build/types/dateInput/DateInput.d.ts +0 -5
  228. package/build/types/dateInput/DateInput.d.ts.map +1 -1
  229. package/build/types/dimmer/Dimmer.d.ts +0 -6
  230. package/build/types/dimmer/Dimmer.d.ts.map +1 -1
  231. package/build/types/drawer/Drawer.d.ts +2 -8
  232. package/build/types/drawer/Drawer.d.ts.map +1 -1
  233. package/build/types/field/Field.d.ts +2 -5
  234. package/build/types/field/Field.d.ts.map +1 -1
  235. package/build/types/flowNavigation/FlowNavigation.d.ts +0 -3
  236. package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
  237. package/build/types/header/Header.d.ts +1 -5
  238. package/build/types/header/Header.d.ts.map +1 -1
  239. package/build/types/iconButton/IconButton.d.ts +0 -6
  240. package/build/types/iconButton/IconButton.d.ts.map +1 -1
  241. package/build/types/index.d.ts +1 -0
  242. package/build/types/index.d.ts.map +1 -1
  243. package/build/types/inputs/{_BottomSheet.d.ts → SelectInput/BottomSheet/SelectInputBottomSheet.d.ts} +3 -3
  244. package/build/types/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.d.ts.map +1 -0
  245. package/build/types/inputs/SelectInput/BottomSheet/index.d.ts +3 -0
  246. package/build/types/inputs/SelectInput/BottomSheet/index.d.ts.map +1 -0
  247. package/build/types/inputs/SelectInput/ButtonInput/SelectInputButtonInput.d.ts +5 -0
  248. package/build/types/inputs/SelectInput/ButtonInput/SelectInputButtonInput.d.ts.map +1 -0
  249. package/build/types/inputs/SelectInput/ButtonInput/index.d.ts +3 -0
  250. package/build/types/inputs/SelectInput/ButtonInput/index.d.ts.map +1 -0
  251. package/build/types/inputs/SelectInput/ClearButton/SelectInputClearButton.d.ts +7 -0
  252. package/build/types/inputs/SelectInput/ClearButton/SelectInputClearButton.d.ts.map +1 -0
  253. package/build/types/inputs/SelectInput/ClearButton/index.d.ts +3 -0
  254. package/build/types/inputs/SelectInput/ClearButton/index.d.ts.map +1 -0
  255. package/build/types/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.d.ts +16 -0
  256. package/build/types/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.d.ts.map +1 -0
  257. package/build/types/inputs/SelectInput/DefaultRenderTrigger/index.d.ts +2 -0
  258. package/build/types/inputs/SelectInput/DefaultRenderTrigger/index.d.ts.map +1 -0
  259. package/build/types/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.d.ts +9 -0
  260. package/build/types/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.d.ts.map +1 -0
  261. package/build/types/inputs/SelectInput/ItemView/GroupItemView/index.d.ts +3 -0
  262. package/build/types/inputs/SelectInput/ItemView/GroupItemView/index.d.ts.map +1 -0
  263. package/build/types/inputs/SelectInput/ItemView/SelectInputItemView.d.ts +11 -0
  264. package/build/types/inputs/SelectInput/ItemView/SelectInputItemView.d.ts.map +1 -0
  265. package/build/types/inputs/SelectInput/ItemView/index.d.ts +4 -0
  266. package/build/types/inputs/SelectInput/ItemView/index.d.ts.map +1 -0
  267. package/build/types/inputs/SelectInput/Option/SelectInputOption.d.ts +11 -0
  268. package/build/types/inputs/SelectInput/Option/SelectInputOption.d.ts.map +1 -0
  269. package/build/types/inputs/SelectInput/Option/index.d.ts +3 -0
  270. package/build/types/inputs/SelectInput/Option/index.d.ts.map +1 -0
  271. package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts +13 -0
  272. package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts.map +1 -0
  273. package/build/types/inputs/SelectInput/OptionContent/index.d.ts +3 -0
  274. package/build/types/inputs/SelectInput/OptionContent/index.d.ts.map +1 -0
  275. package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts +9 -0
  276. package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts.map +1 -0
  277. package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts +3 -0
  278. package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts.map +1 -0
  279. package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts +21 -0
  280. package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts.map +1 -0
  281. package/build/types/inputs/SelectInput/Options/index.d.ts +4 -0
  282. package/build/types/inputs/SelectInput/Options/index.d.ts.map +1 -0
  283. package/build/types/inputs/{_Popover.d.ts → SelectInput/Popover/SelectInputPopover.d.ts} +3 -3
  284. package/build/types/inputs/SelectInput/Popover/SelectInputPopover.d.ts.map +1 -0
  285. package/build/types/inputs/SelectInput/Popover/index.d.ts +3 -0
  286. package/build/types/inputs/SelectInput/Popover/index.d.ts.map +1 -0
  287. package/build/types/inputs/SelectInput/SelectInput.contexts.d.ts +33 -0
  288. package/build/types/inputs/SelectInput/SelectInput.contexts.d.ts.map +1 -0
  289. package/build/types/inputs/SelectInput/SelectInput.d.ts +10 -0
  290. package/build/types/inputs/SelectInput/SelectInput.d.ts.map +1 -0
  291. package/build/types/inputs/SelectInput/SelectInput.messages.d.ts.map +1 -0
  292. package/build/types/inputs/{SelectInput.d.ts → SelectInput/SelectInput.types.d.ts} +12 -38
  293. package/build/types/inputs/SelectInput/SelectInput.types.d.ts.map +1 -0
  294. package/build/types/inputs/SelectInput/SelectInput.utils.d.ts +61 -0
  295. package/build/types/inputs/SelectInput/SelectInput.utils.d.ts.map +1 -0
  296. package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts +12 -0
  297. package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts.map +1 -0
  298. package/build/types/inputs/SelectInput/TriggerButton/index.d.ts +3 -0
  299. package/build/types/inputs/SelectInput/TriggerButton/index.d.ts.map +1 -0
  300. package/build/types/inputs/SelectInput/components.d.ts +10 -0
  301. package/build/types/inputs/SelectInput/components.d.ts.map +1 -0
  302. package/build/types/inputs/SelectInput/index.d.ts +12 -0
  303. package/build/types/inputs/SelectInput/index.d.ts.map +1 -0
  304. package/build/types/legacylistItem/LegacyListItem.d.ts +1 -1
  305. package/build/types/list/List.d.ts +0 -1
  306. package/build/types/list/List.d.ts.map +1 -1
  307. package/build/types/listItem/Button/ListItemButton.d.ts +0 -4
  308. package/build/types/listItem/Button/ListItemButton.d.ts.map +1 -1
  309. package/build/types/listItem/IconButton/ListItemIconButton.d.ts +1 -3
  310. package/build/types/listItem/IconButton/ListItemIconButton.d.ts.map +1 -1
  311. package/build/types/listItem/Image/ListItemImage.d.ts +0 -2
  312. package/build/types/listItem/Image/ListItemImage.d.ts.map +1 -1
  313. package/build/types/listItem/ListItem.d.ts +0 -3
  314. package/build/types/listItem/ListItem.d.ts.map +1 -1
  315. package/build/types/loader/Loader.d.ts +1 -5
  316. package/build/types/loader/Loader.d.ts.map +1 -1
  317. package/build/types/logo/Logo.d.ts +1 -4
  318. package/build/types/logo/Logo.d.ts.map +1 -1
  319. package/build/types/modal/Modal.d.ts +0 -6
  320. package/build/types/modal/Modal.d.ts.map +1 -1
  321. package/build/types/navigationOption/NavigationOption.d.ts +1 -1
  322. package/build/types/navigationOptionsList/NavigationOptionsList.d.ts +1 -1
  323. package/build/types/nudge/Nudge.d.ts +1 -1
  324. package/build/types/nudge/Nudge.d.ts.map +1 -1
  325. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +1 -7
  326. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
  327. package/build/types/popover/Popover.d.ts +0 -1
  328. package/build/types/popover/Popover.d.ts.map +1 -1
  329. package/build/types/processIndicator/ProcessIndicator.d.ts +0 -2
  330. package/build/types/processIndicator/ProcessIndicator.d.ts.map +1 -1
  331. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +1 -8
  332. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
  333. package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts +0 -1
  334. package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts.map +1 -1
  335. package/build/types/radioOption/RadioOption.d.ts +1 -1
  336. package/build/types/select/Select.d.ts +0 -4
  337. package/build/types/select/Select.d.ts.map +1 -1
  338. package/build/types/statusIcon/StatusIcon.d.ts +1 -3
  339. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  340. package/build/types/summary/Summary.d.ts +4 -7
  341. package/build/types/summary/Summary.d.ts.map +1 -1
  342. package/build/types/switchOption/SwitchOption.d.ts +1 -1
  343. package/build/types/tabs/Tabs.d.ts +0 -2
  344. package/build/types/tabs/Tabs.d.ts.map +1 -1
  345. package/build/types/typeahead/Typeahead.d.ts +1 -14
  346. package/build/types/typeahead/Typeahead.d.ts.map +1 -1
  347. package/build/types/upload/Upload.d.ts +0 -6
  348. package/build/types/upload/Upload.d.ts.map +1 -1
  349. package/build/types/uploadInput/UploadInput.d.ts +1 -10
  350. package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
  351. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts +0 -3
  352. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
  353. package/build/upload/Upload.js.map +1 -1
  354. package/build/upload/Upload.mjs.map +1 -1
  355. package/build/uploadInput/UploadInput.js.map +1 -1
  356. package/build/uploadInput/UploadInput.mjs.map +1 -1
  357. package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
  358. package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  359. package/package.json +1 -1
  360. package/src/accordion/Accordion.tsx +2 -8
  361. package/src/actionButton/ActionButton.tsx +3 -4
  362. package/src/actionOption/ActionOption.tsx +1 -1
  363. package/src/alert/Alert.tsx +2 -5
  364. package/src/avatar/Avatar.tsx +0 -4
  365. package/src/avatarLayout/AvatarLayout.tsx +1 -5
  366. package/src/badge/Badge.tsx +0 -2
  367. package/src/body/Body.tsx +6 -2
  368. package/src/button/Button.types.ts +1 -4
  369. package/src/button/LegacyButton.tsx +4 -4
  370. package/src/card/Card.tsx +0 -1
  371. package/src/checkboxButton/CheckboxButton.tsx +0 -1
  372. package/src/checkboxOption/CheckboxOption.tsx +1 -1
  373. package/src/circularButton/CircularButton.tsx +2 -1
  374. package/src/common/propsValues/type.ts +1 -1
  375. package/src/common/propsValues/typography.ts +2 -2
  376. package/src/criticalBanner/CriticalCommsBanner.css +33 -15
  377. package/src/criticalBanner/CriticalCommsBanner.less +46 -36
  378. package/src/criticalBanner/CriticalCommsBanner.story.tsx +9 -15
  379. package/src/criticalBanner/CriticalCommsBanner.test.story.tsx +70 -0
  380. package/src/criticalBanner/CriticalCommsBanner.test.tsx +66 -0
  381. package/src/criticalBanner/CriticalCommsBanner.tsx +54 -5
  382. package/src/criticalBanner/index.ts +1 -0
  383. package/src/dateInput/DateInput.tsx +0 -5
  384. package/src/dimmer/Dimmer.tsx +0 -6
  385. package/src/drawer/Drawer.tsx +2 -8
  386. package/src/field/Field.tsx +2 -5
  387. package/src/flowNavigation/FlowNavigation.tsx +0 -3
  388. package/src/header/Header.tsx +1 -5
  389. package/src/iconButton/IconButton.tsx +0 -3
  390. package/src/index.ts +1 -0
  391. package/src/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +96 -0
  392. package/src/inputs/{_BottomSheet.tsx → SelectInput/BottomSheet/SelectInputBottomSheet.tsx} +7 -7
  393. package/src/inputs/SelectInput/BottomSheet/index.ts +2 -0
  394. package/src/inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +16 -0
  395. package/src/inputs/{_ButtonInput.tsx → SelectInput/ButtonInput/SelectInputButtonInput.tsx} +5 -5
  396. package/src/inputs/SelectInput/ButtonInput/index.ts +2 -0
  397. package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.css +46 -0
  398. package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.less +40 -0
  399. package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.tsx +29 -0
  400. package/src/inputs/SelectInput/ClearButton/index.ts +2 -0
  401. package/src/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.tsx +74 -0
  402. package/src/inputs/SelectInput/DefaultRenderTrigger/index.ts +5 -0
  403. package/src/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.tsx +61 -0
  404. package/src/inputs/SelectInput/ItemView/GroupItemView/index.ts +2 -0
  405. package/src/inputs/SelectInput/ItemView/SelectInputItemView.css +16 -0
  406. package/src/inputs/SelectInput/ItemView/SelectInputItemView.less +17 -0
  407. package/src/inputs/SelectInput/ItemView/SelectInputItemView.tsx +48 -0
  408. package/src/inputs/SelectInput/ItemView/index.ts +3 -0
  409. package/src/inputs/SelectInput/Option/SelectInputOption.css +33 -0
  410. package/src/inputs/SelectInput/Option/SelectInputOption.less +32 -0
  411. package/src/inputs/SelectInput/Option/SelectInputOption.tsx +57 -0
  412. package/src/inputs/SelectInput/Option/index.ts +2 -0
  413. package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +37 -0
  414. package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.less +38 -0
  415. package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx +72 -0
  416. package/src/inputs/SelectInput/OptionContent/index.ts +2 -0
  417. package/src/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.tsx +59 -0
  418. package/src/inputs/SelectInput/Options/OptionsContainer/index.ts +2 -0
  419. package/src/inputs/SelectInput/Options/SelectInputOptions.css +81 -0
  420. package/src/inputs/SelectInput/Options/SelectInputOptions.less +77 -0
  421. package/src/inputs/SelectInput/Options/SelectInputOptions.tsx +411 -0
  422. package/src/inputs/SelectInput/Options/index.ts +3 -0
  423. package/src/inputs/SelectInput/Popover/SelectInputPopover.css +46 -0
  424. package/src/inputs/{_Popover.tsx → SelectInput/Popover/SelectInputPopover.tsx} +7 -7
  425. package/src/inputs/SelectInput/Popover/index.ts +2 -0
  426. package/src/inputs/SelectInput/SelectInput.contexts.tsx +40 -0
  427. package/src/inputs/SelectInput/SelectInput.less +22 -0
  428. package/src/inputs/{SelectInput.test.tsx → SelectInput/SelectInput.test.tsx} +9 -11
  429. package/src/inputs/SelectInput/SelectInput.tsx +257 -0
  430. package/src/inputs/SelectInput/SelectInput.types.ts +113 -0
  431. package/src/inputs/SelectInput/SelectInput.utils.ts +206 -0
  432. package/src/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.tsx +36 -0
  433. package/src/inputs/SelectInput/TriggerButton/index.ts +5 -0
  434. package/src/inputs/{SelectInput.docs.mdx → SelectInput/_stories/SelectInput.docs.mdx} +0 -1
  435. package/src/inputs/{SelectInput.story.tsx → SelectInput/_stories/SelectInput.story.tsx} +11 -8
  436. package/src/inputs/{SelectInput.test.story.tsx → SelectInput/_stories/SelectInput.test.story.tsx} +5 -10
  437. package/src/inputs/SelectInput/components.ts +10 -0
  438. package/src/inputs/SelectInput/index.ts +14 -0
  439. package/src/legacylistItem/LegacyListItem.tsx +1 -1
  440. package/src/list/List.tsx +0 -1
  441. package/src/listItem/Button/ListItemButton.tsx +0 -2
  442. package/src/listItem/IconButton/ListItemIconButton.tsx +1 -3
  443. package/src/listItem/Image/ListItemImage.tsx +0 -2
  444. package/src/listItem/ListItem.tsx +0 -2
  445. package/src/loader/Loader.tsx +2 -6
  446. package/src/logo/Logo.tsx +1 -4
  447. package/src/main.css +123 -105
  448. package/src/main.less +1 -1
  449. package/src/modal/Modal.tsx +0 -6
  450. package/src/navigationOption/NavigationOption.tsx +1 -1
  451. package/src/navigationOptionsList/NavigationOptionsList.tsx +1 -1
  452. package/src/nudge/Nudge.tsx +1 -1
  453. package/src/phoneNumberInput/PhoneNumberInput.tsx +1 -7
  454. package/src/popover/Popover.tsx +0 -1
  455. package/src/processIndicator/ProcessIndicator.tsx +0 -2
  456. package/src/prompt/ActionPrompt/ActionPrompt.tsx +1 -8
  457. package/src/prompt/InlinePrompt/InlinePrompt.tsx +0 -1
  458. package/src/radioOption/RadioOption.tsx +1 -1
  459. package/src/select/Select.tsx +0 -4
  460. package/src/statusIcon/StatusIcon.tsx +1 -3
  461. package/src/summary/Summary.tsx +4 -7
  462. package/src/switchOption/SwitchOption.tsx +1 -1
  463. package/src/tabs/Tabs.tsx +0 -2
  464. package/src/typeahead/Typeahead.tsx +2 -14
  465. package/src/upload/Upload.tsx +0 -6
  466. package/src/uploadInput/UploadInput.tsx +4 -12
  467. package/src/withDisplayFormat/WithDisplayFormat.tsx +0 -3
  468. package/build/inputs/SelectInput.js +0 -890
  469. package/build/inputs/SelectInput.js.map +0 -1
  470. package/build/inputs/SelectInput.messages.js.map +0 -1
  471. package/build/inputs/SelectInput.messages.mjs.map +0 -1
  472. package/build/inputs/SelectInput.mjs +0 -881
  473. package/build/inputs/SelectInput.mjs.map +0 -1
  474. package/build/inputs/_BottomSheet.js.map +0 -1
  475. package/build/inputs/_BottomSheet.mjs.map +0 -1
  476. package/build/inputs/_ButtonInput.js.map +0 -1
  477. package/build/inputs/_ButtonInput.mjs.map +0 -1
  478. package/build/inputs/_Popover.js.map +0 -1
  479. package/build/inputs/_Popover.mjs.map +0 -1
  480. package/build/types/inputs/SelectInput.d.ts.map +0 -1
  481. package/build/types/inputs/SelectInput.messages.d.ts.map +0 -1
  482. package/build/types/inputs/_BottomSheet.d.ts.map +0 -1
  483. package/build/types/inputs/_ButtonInput.d.ts +0 -5
  484. package/build/types/inputs/_ButtonInput.d.ts.map +0 -1
  485. package/build/types/inputs/_Popover.d.ts.map +0 -1
  486. package/src/inputs/SelectInput.less +0 -219
  487. package/src/inputs/SelectInput.tsx +0 -1269
  488. package/build/inputs/{SelectInput.messages.js → SelectInput/SelectInput.messages.js} +0 -0
  489. package/build/inputs/{SelectInput.messages.mjs → SelectInput/SelectInput.messages.mjs} +0 -0
  490. package/build/styles/inputs/{SelectInput.css → SelectInput/SelectInput.css} +90 -90
  491. package/build/types/inputs/{SelectInput.messages.d.ts → SelectInput/SelectInput.messages.d.ts} +0 -0
  492. package/src/inputs/{_BottomSheet.less → SelectInput/BottomSheet/SelectInputBottomSheet.less} +0 -0
  493. package/src/inputs/{_ButtonInput.less → SelectInput/ButtonInput/SelectInputButtonInput.less} +0 -0
  494. package/src/inputs/{_Popover.less → SelectInput/Popover/SelectInputPopover.less} +0 -0
  495. package/src/inputs/{SelectInput.css → SelectInput/SelectInput.css} +90 -90
  496. /package/src/inputs/{SelectInput.messages.ts → SelectInput/SelectInput.messages.ts} +0 -0
package/build/index.mjs CHANGED
@@ -56,7 +56,16 @@ export { default as InputWithDisplayFormat } from './inputWithDisplayFormat/Inpu
56
56
  export { Input } from './inputs/Input.mjs';
57
57
  export { InputGroup } from './inputs/InputGroup.mjs';
58
58
  export { SearchInput } from './inputs/SearchInput.mjs';
59
- export { SelectInput, SelectInputOptionContent, SelectInputTriggerButton, sortByRelevance } from './inputs/SelectInput.mjs';
59
+ export { SelectInput } from './inputs/SelectInput/SelectInput.mjs';
60
+ export { sortByRelevance } from './inputs/SelectInput/SelectInput.utils.mjs';
61
+ import 'react-intl';
62
+ import './dateLookup/dateTrigger/DateTrigger.messages.mjs';
63
+ import '@headlessui/react';
64
+ export { SelectInputOptionContent } from './inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs';
65
+ export { SelectInputTriggerButton } from './inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs';
66
+ export { default as Section } from './section/Section.mjs';
67
+ import 'virtua';
68
+ import './inputs/SelectInput/SelectInput.messages.mjs';
60
69
  export { TextArea } from './inputs/TextArea.mjs';
61
70
  export { default as InstructionsList } from './instructionsList/InstructionsList.mjs';
62
71
  export { Label } from './label/Label.mjs';
@@ -88,7 +97,6 @@ export { default as Radio } from './radio/Radio.mjs';
88
97
  export { default as RadioGroup } from './radioGroup/RadioGroup.mjs';
89
98
  export { default as RadioOption } from './radioOption/RadioOption.mjs';
90
99
  export { default as ResponsivePanel } from './common/responsivePanel/ResponsivePanel.mjs';
91
- export { default as Section } from './section/Section.mjs';
92
100
  export { default as SegmentedControl } from './segmentedControl/SegmentedControl.mjs';
93
101
  export { default as Select } from './select/Select.mjs';
94
102
  export { default as SentimentSurface } from './sentimentSurface/SentimentSurface.mjs';
@@ -137,7 +145,6 @@ export { MarkdownNodeType } from './common/propsValues/markdownNodeType.mjs';
137
145
  export { FileType } from './common/fileType.mjs';
138
146
  export { DEFAULT_LANG, DEFAULT_LOCALE, RTL_LANGUAGES, SUPPORTED_LANGUAGES, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, getLocaleCurrencyName } from './common/locale/index.mjs';
139
147
  export { getBrandColorFromSeed } from './common/colors.mjs';
140
- import 'react-intl';
141
148
  import './common/closeButton/CloseButton.messages.mjs';
142
149
  export { default as translations } from './i18n/index.mjs';
143
150
  export { default as withId } from './withId/withId.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -6,13 +6,13 @@ var focus = require('@react-aria/focus');
6
6
  var componentsTheming = require('@wise/components-theming');
7
7
  var clsx = require('clsx');
8
8
  var React = require('react');
9
- var CloseButton = require('../common/closeButton/CloseButton.js');
10
- var useVirtualKeyboard = require('../common/hooks/useVirtualKeyboard.js');
11
- var PreventScroll = require('../common/preventScroll/PreventScroll.js');
12
- var size = require('../common/propsValues/size.js');
9
+ var CloseButton = require('../../../common/closeButton/CloseButton.js');
10
+ var useVirtualKeyboard = require('../../../common/hooks/useVirtualKeyboard.js');
11
+ var PreventScroll = require('../../../common/preventScroll/PreventScroll.js');
12
+ var size = require('../../../common/propsValues/size.js');
13
13
  var jsxRuntime = require('react/jsx-runtime');
14
14
 
15
- function BottomSheet({
15
+ function SelectInputBottomSheet({
16
16
  open,
17
17
  renderTrigger,
18
18
  title,
@@ -109,5 +109,5 @@ function BottomSheet({
109
109
  });
110
110
  }
111
111
 
112
- exports.BottomSheet = BottomSheet;
113
- //# sourceMappingURL=_BottomSheet.js.map
112
+ exports.SelectInputBottomSheet = SelectInputBottomSheet;
113
+ //# sourceMappingURL=SelectInputBottomSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectInputBottomSheet.js","sources":["../../../../src/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.tsx"],"sourcesContent":["import {\n FloatingFocusManager,\n FloatingPortal,\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { Transition, TransitionChild } from '@headlessui/react';\nimport { FocusScope } from '@react-aria/focus';\nimport { ThemeProvider, useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { Fragment, useState } from 'react';\n\nimport { CloseButton } from '../../../common/closeButton';\nimport { useVirtualKeyboard } from '../../../common/hooks/useVirtualKeyboard';\nimport { PreventScroll } from '../../../common/preventScroll/PreventScroll';\nimport { Size } from '../../../common/propsValues/size';\n\nexport interface SelectInputBottomSheetProps {\n open: boolean;\n renderTrigger?: (args: {\n ref: React.RefCallback<Element>;\n getInteractionProps: (customEventHandlers?: React.HTMLProps<Element>) => {\n [key: string]: unknown;\n };\n }) => React.ReactNode;\n title?: string;\n initialFocusRef?: React.MutableRefObject<HTMLElement | null>;\n padding?: 'none' | 'md';\n children?: React.ReactNode;\n onClose?: () => void;\n onCloseEnd?: () => void;\n}\n\nexport function SelectInputBottomSheet({\n open,\n renderTrigger,\n title,\n initialFocusRef,\n padding = 'md',\n children,\n onClose,\n onCloseEnd,\n}: SelectInputBottomSheetProps) {\n useVirtualKeyboard(open);\n\n const { refs, context } = useFloating<Element>({\n open,\n onOpenChange: (value) => {\n if (!value) {\n onClose?.();\n }\n },\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss, role]);\n\n const [floatingKey, setFloatingKey] = useState(0);\n\n const { theme, screenMode } = useTheme();\n\n return (\n <>\n {open ? <PreventScroll /> : null}\n {renderTrigger?.({\n ref: refs.setReference,\n getInteractionProps: getReferenceProps,\n })}\n\n <FloatingPortal>\n <ThemeProvider theme=\"personal\" screenMode={theme === 'personal' ? screenMode : 'light'}>\n <Transition\n as=\"div\"\n show={open}\n className=\"np-bottom-sheet-v2-container\"\n beforeEnter={() => {\n setFloatingKey((prev) => prev + 1);\n }}\n afterLeave={onCloseEnd}\n >\n <TransitionChild\n as=\"div\"\n className=\"np-bottom-sheet-v2-backdrop\"\n enterFrom=\"np-bottom-sheet-v2-backdrop--closed\"\n leaveTo=\"np-bottom-sheet-v2-backdrop--closed\"\n />\n\n <div className=\"np-bottom-sheet-v2\">\n <FocusScope>\n <FloatingFocusManager context={context} initialFocus={initialFocusRef}>\n <Fragment\n key={floatingKey} // Force inner state invalidation on open\n >\n <TransitionChild\n ref={refs.setFloating}\n as=\"div\"\n className=\"np-bottom-sheet-v2-content\"\n enterFrom=\"np-bottom-sheet-v2-content--closed\"\n leaveTo=\"np-bottom-sheet-v2-content--closed\"\n {...getFloatingProps()}\n >\n <div className=\"np-bottom-sheet-v2-header\">\n <CloseButton\n size={Size.SMALL}\n onClick={() => {\n onClose?.();\n }}\n />\n </div>\n <div\n className={clsx(\n 'np-bottom-sheet-v2-content-inner',\n title && 'np-bottom-sheet-v2-content-inner--has-title',\n padding === 'md' && 'np-bottom-sheet-v2-content-inner--padding-md',\n )}\n >\n {title ? (\n <h2 className=\"np-bottom-sheet-v2-title np-text-title-body\">{title}</h2>\n ) : null}\n <div className=\"np-bottom-sheet-v2-body np-text-body-default\">\n {children}\n </div>\n </div>\n </TransitionChild>\n </Fragment>\n </FloatingFocusManager>\n </FocusScope>\n </div>\n </Transition>\n </ThemeProvider>\n </FloatingPortal>\n </>\n );\n}\n"],"names":["SelectInputBottomSheet","open","renderTrigger","title","initialFocusRef","padding","children","onClose","onCloseEnd","useVirtualKeyboard","refs","context","useFloating","onOpenChange","value","dismiss","useDismiss","role","useRole","getReferenceProps","getFloatingProps","useInteractions","floatingKey","setFloatingKey","useState","theme","screenMode","useTheme","_jsxs","_Fragment","_jsx","PreventScroll","ref","setReference","getInteractionProps","FloatingPortal","ThemeProvider","Transition","as","show","className","beforeEnter","prev","afterLeave","TransitionChild","enterFrom","leaveTo","FocusScope","FloatingFocusManager","initialFocus","Fragment","setFloating","CloseButton","size","Size","SMALL","onClick","clsx"],"mappings":"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"}
@@ -4,13 +4,13 @@ import { FocusScope } from '@react-aria/focus';
4
4
  import { useTheme, ThemeProvider } from '@wise/components-theming';
5
5
  import { clsx } from 'clsx';
6
6
  import { useState, Fragment as Fragment$1 } from 'react';
7
- import { CloseButton } from '../common/closeButton/CloseButton.mjs';
8
- import { useVirtualKeyboard } from '../common/hooks/useVirtualKeyboard.mjs';
9
- import { PreventScroll } from '../common/preventScroll/PreventScroll.mjs';
10
- import { Size } from '../common/propsValues/size.mjs';
7
+ import { CloseButton } from '../../../common/closeButton/CloseButton.mjs';
8
+ import { useVirtualKeyboard } from '../../../common/hooks/useVirtualKeyboard.mjs';
9
+ import { PreventScroll } from '../../../common/preventScroll/PreventScroll.mjs';
10
+ import { Size } from '../../../common/propsValues/size.mjs';
11
11
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
12
12
 
13
- function BottomSheet({
13
+ function SelectInputBottomSheet({
14
14
  open,
15
15
  renderTrigger,
16
16
  title,
@@ -107,5 +107,5 @@ function BottomSheet({
107
107
  });
108
108
  }
109
109
 
110
- export { BottomSheet };
111
- //# sourceMappingURL=_BottomSheet.mjs.map
110
+ export { SelectInputBottomSheet };
111
+ //# sourceMappingURL=SelectInputBottomSheet.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectInputBottomSheet.mjs","sources":["../../../../src/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.tsx"],"sourcesContent":["import {\n FloatingFocusManager,\n FloatingPortal,\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { Transition, TransitionChild } from '@headlessui/react';\nimport { FocusScope } from '@react-aria/focus';\nimport { ThemeProvider, useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { Fragment, useState } from 'react';\n\nimport { CloseButton } from '../../../common/closeButton';\nimport { useVirtualKeyboard } from '../../../common/hooks/useVirtualKeyboard';\nimport { PreventScroll } from '../../../common/preventScroll/PreventScroll';\nimport { Size } from '../../../common/propsValues/size';\n\nexport interface SelectInputBottomSheetProps {\n open: boolean;\n renderTrigger?: (args: {\n ref: React.RefCallback<Element>;\n getInteractionProps: (customEventHandlers?: React.HTMLProps<Element>) => {\n [key: string]: unknown;\n };\n }) => React.ReactNode;\n title?: string;\n initialFocusRef?: React.MutableRefObject<HTMLElement | null>;\n padding?: 'none' | 'md';\n children?: React.ReactNode;\n onClose?: () => void;\n onCloseEnd?: () => void;\n}\n\nexport function SelectInputBottomSheet({\n open,\n renderTrigger,\n title,\n initialFocusRef,\n padding = 'md',\n children,\n onClose,\n onCloseEnd,\n}: SelectInputBottomSheetProps) {\n useVirtualKeyboard(open);\n\n const { refs, context } = useFloating<Element>({\n open,\n onOpenChange: (value) => {\n if (!value) {\n onClose?.();\n }\n },\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss, role]);\n\n const [floatingKey, setFloatingKey] = useState(0);\n\n const { theme, screenMode } = useTheme();\n\n return (\n <>\n {open ? <PreventScroll /> : null}\n {renderTrigger?.({\n ref: refs.setReference,\n getInteractionProps: getReferenceProps,\n })}\n\n <FloatingPortal>\n <ThemeProvider theme=\"personal\" screenMode={theme === 'personal' ? screenMode : 'light'}>\n <Transition\n as=\"div\"\n show={open}\n className=\"np-bottom-sheet-v2-container\"\n beforeEnter={() => {\n setFloatingKey((prev) => prev + 1);\n }}\n afterLeave={onCloseEnd}\n >\n <TransitionChild\n as=\"div\"\n className=\"np-bottom-sheet-v2-backdrop\"\n enterFrom=\"np-bottom-sheet-v2-backdrop--closed\"\n leaveTo=\"np-bottom-sheet-v2-backdrop--closed\"\n />\n\n <div className=\"np-bottom-sheet-v2\">\n <FocusScope>\n <FloatingFocusManager context={context} initialFocus={initialFocusRef}>\n <Fragment\n key={floatingKey} // Force inner state invalidation on open\n >\n <TransitionChild\n ref={refs.setFloating}\n as=\"div\"\n className=\"np-bottom-sheet-v2-content\"\n enterFrom=\"np-bottom-sheet-v2-content--closed\"\n leaveTo=\"np-bottom-sheet-v2-content--closed\"\n {...getFloatingProps()}\n >\n <div className=\"np-bottom-sheet-v2-header\">\n <CloseButton\n size={Size.SMALL}\n onClick={() => {\n onClose?.();\n }}\n />\n </div>\n <div\n className={clsx(\n 'np-bottom-sheet-v2-content-inner',\n title && 'np-bottom-sheet-v2-content-inner--has-title',\n padding === 'md' && 'np-bottom-sheet-v2-content-inner--padding-md',\n )}\n >\n {title ? (\n <h2 className=\"np-bottom-sheet-v2-title np-text-title-body\">{title}</h2>\n ) : null}\n <div className=\"np-bottom-sheet-v2-body np-text-body-default\">\n {children}\n </div>\n </div>\n </TransitionChild>\n </Fragment>\n </FloatingFocusManager>\n </FocusScope>\n </div>\n </Transition>\n </ThemeProvider>\n </FloatingPortal>\n </>\n );\n}\n"],"names":["SelectInputBottomSheet","open","renderTrigger","title","initialFocusRef","padding","children","onClose","onCloseEnd","useVirtualKeyboard","refs","context","useFloating","onOpenChange","value","dismiss","useDismiss","role","useRole","getReferenceProps","getFloatingProps","useInteractions","floatingKey","setFloatingKey","useState","theme","screenMode","useTheme","_jsxs","_Fragment","_jsx","PreventScroll","ref","setReference","getInteractionProps","FloatingPortal","ThemeProvider","Transition","as","show","className","beforeEnter","prev","afterLeave","TransitionChild","enterFrom","leaveTo","FocusScope","FloatingFocusManager","initialFocus","Fragment","setFloating","CloseButton","size","Size","SMALL","onClick","clsx"],"mappings":"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"}
@@ -2,11 +2,11 @@
2
2
 
3
3
  var clsx = require('clsx');
4
4
  var React = require('react');
5
- var InputGroup = require('./InputGroup.js');
6
- var _common = require('./_common.js');
5
+ var InputGroup = require('../../InputGroup.js');
6
+ var _common = require('../../_common.js');
7
7
  var jsxRuntime = require('react/jsx-runtime');
8
8
 
9
- const ButtonInput = /*#__PURE__*/React.forwardRef(function ButtonInput({
9
+ const SelectInputButtonInput = /*#__PURE__*/React.forwardRef(function ButtonInput({
10
10
  size = 'md',
11
11
  className,
12
12
  style,
@@ -27,5 +27,5 @@ const ButtonInput = /*#__PURE__*/React.forwardRef(function ButtonInput({
27
27
  });
28
28
  });
29
29
 
30
- exports.ButtonInput = ButtonInput;
31
- //# sourceMappingURL=_ButtonInput.js.map
30
+ exports.SelectInputButtonInput = SelectInputButtonInput;
31
+ //# sourceMappingURL=SelectInputButtonInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectInputButtonInput.js","sources":["../../../../src/inputs/SelectInput/ButtonInput/SelectInputButtonInput.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { useInputPaddings } from '../../InputGroup';\nimport { inputClassNameBase } from '../../_common';\n\nexport interface SelectInputButtonInputProps extends React.ComponentPropsWithRef<'button'> {\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport const SelectInputButtonInput = forwardRef(function ButtonInput(\n { size = 'md', className, style, ...restProps }: SelectInputButtonInputProps,\n ref: React.ForwardedRef<HTMLButtonElement | null>,\n) {\n const inputPaddings = useInputPaddings();\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(inputClassNameBase({ size }), 'np-button-input', className)}\n style={{ ...inputPaddings, ...style }}\n {...restProps}\n />\n );\n});\n"],"names":["SelectInputButtonInput","forwardRef","ButtonInput","size","className","style","restProps","ref","inputPaddings","useInputPaddings","_jsx","type","clsx","inputClassNameBase"],"mappings":";;;;;;;;MAUaA,sBAAsB,gBAAGC,gBAAU,CAAC,SAASC,WAAWA,CACnE;AAAEC,EAAAA,IAAI,GAAG,IAAI;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAS,CAA+B,EAC5EC,GAAiD,EAAA;AAEjD,EAAA,MAAMC,aAAa,GAAGC,2BAAgB,EAAE;AAExC,EAAA,oBACEC,cAAA,CAAA,QAAA,EAAA;AACEH,IAAAA,GAAG,EAAEA,GAAI;AACTI,IAAAA,IAAI,EAAC,QAAQ;AACbP,IAAAA,SAAS,EAAEQ,SAAI,CAACC,0BAAkB,CAAC;AAAEV,MAAAA;AAAI,KAAE,CAAC,EAAE,iBAAiB,EAAEC,SAAS,CAAE;AAC5EC,IAAAA,KAAK,EAAE;AAAE,MAAA,GAAGG,aAAa;MAAE,GAAGH;KAAQ;IAAA,GAClCC;AAAS,GAAC,CACd;AAEN,CAAC;;;;"}
@@ -1,10 +1,10 @@
1
1
  import { clsx } from 'clsx';
2
2
  import { forwardRef } from 'react';
3
- import { useInputPaddings } from './InputGroup.mjs';
4
- import { inputClassNameBase } from './_common.mjs';
3
+ import { useInputPaddings } from '../../InputGroup.mjs';
4
+ import { inputClassNameBase } from '../../_common.mjs';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
 
7
- const ButtonInput = /*#__PURE__*/forwardRef(function ButtonInput({
7
+ const SelectInputButtonInput = /*#__PURE__*/forwardRef(function ButtonInput({
8
8
  size = 'md',
9
9
  className,
10
10
  style,
@@ -25,5 +25,5 @@ const ButtonInput = /*#__PURE__*/forwardRef(function ButtonInput({
25
25
  });
26
26
  });
27
27
 
28
- export { ButtonInput };
29
- //# sourceMappingURL=_ButtonInput.mjs.map
28
+ export { SelectInputButtonInput };
29
+ //# sourceMappingURL=SelectInputButtonInput.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectInputButtonInput.mjs","sources":["../../../../src/inputs/SelectInput/ButtonInput/SelectInputButtonInput.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { useInputPaddings } from '../../InputGroup';\nimport { inputClassNameBase } from '../../_common';\n\nexport interface SelectInputButtonInputProps extends React.ComponentPropsWithRef<'button'> {\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport const SelectInputButtonInput = forwardRef(function ButtonInput(\n { size = 'md', className, style, ...restProps }: SelectInputButtonInputProps,\n ref: React.ForwardedRef<HTMLButtonElement | null>,\n) {\n const inputPaddings = useInputPaddings();\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(inputClassNameBase({ size }), 'np-button-input', className)}\n style={{ ...inputPaddings, ...style }}\n {...restProps}\n />\n );\n});\n"],"names":["SelectInputButtonInput","forwardRef","ButtonInput","size","className","style","restProps","ref","inputPaddings","useInputPaddings","_jsx","type","clsx","inputClassNameBase"],"mappings":";;;;;;MAUaA,sBAAsB,gBAAGC,UAAU,CAAC,SAASC,WAAWA,CACnE;AAAEC,EAAAA,IAAI,GAAG,IAAI;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAS,CAA+B,EAC5EC,GAAiD,EAAA;AAEjD,EAAA,MAAMC,aAAa,GAAGC,gBAAgB,EAAE;AAExC,EAAA,oBACEC,GAAA,CAAA,QAAA,EAAA;AACEH,IAAAA,GAAG,EAAEA,GAAI;AACTI,IAAAA,IAAI,EAAC,QAAQ;AACbP,IAAAA,SAAS,EAAEQ,IAAI,CAACC,kBAAkB,CAAC;AAAEV,MAAAA;AAAI,KAAE,CAAC,EAAE,iBAAiB,EAAEC,SAAS,CAAE;AAC5EC,IAAAA,KAAK,EAAE;AAAE,MAAA,GAAGG,aAAa;MAAE,GAAGH;KAAQ;IAAA,GAClCC;AAAS,GAAC,CACd;AAEN,CAAC;;;;"}
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ var icons = require('@transferwise/icons');
4
+ var clsx = require('clsx');
5
+ var reactIntl = require('react-intl');
6
+ var DateTrigger_messages = require('../../../dateLookup/dateTrigger/DateTrigger.messages.js');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+
9
+ function SelectInputClearButton({
10
+ className,
11
+ onClick
12
+ }) {
13
+ const intl = reactIntl.useIntl();
14
+ return /*#__PURE__*/jsxRuntime.jsx("button", {
15
+ type: "button",
16
+ "aria-label": intl.formatMessage(DateTrigger_messages.default.ariaLabel),
17
+ className: clsx.clsx(className, 'np-select-input-addon np-select-input-addon--interactive'),
18
+ onClick: onClick,
19
+ children: /*#__PURE__*/jsxRuntime.jsx(icons.Cross, {
20
+ size: 16
21
+ })
22
+ });
23
+ }
24
+ // Type is already exported above
25
+
26
+ exports.SelectInputClearButton = SelectInputClearButton;
27
+ //# sourceMappingURL=SelectInputClearButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectInputClearButton.js","sources":["../../../../src/inputs/SelectInput/ClearButton/SelectInputClearButton.tsx"],"sourcesContent":["import { Cross } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\nimport dateTriggerMessages from '../../../dateLookup/dateTrigger/DateTrigger.messages';\n\nexport interface SelectInputClearButtonProps extends Pick<\n React.ComponentPropsWithoutRef<'button'>,\n 'className' | 'onClick'\n> {}\n\n/**\n * A button component used to clear the selected value in a SelectInput.\n */\nexport function SelectInputClearButton({ className, onClick }: SelectInputClearButtonProps) {\n const intl = useIntl();\n\n return (\n <button\n type=\"button\"\n aria-label={intl.formatMessage(dateTriggerMessages.ariaLabel)}\n className={clsx(className, 'np-select-input-addon np-select-input-addon--interactive')}\n onClick={onClick}\n >\n <Cross size={16} />\n </button>\n );\n}\n\n// Type is already exported above\n"],"names":["SelectInputClearButton","className","onClick","intl","useIntl","_jsx","type","formatMessage","dateTriggerMessages","ariaLabel","clsx","children","Cross","size"],"mappings":";;;;;;;;SAagBA,sBAAsBA,CAAC;EAAEC,SAAS;AAAEC,EAAAA;AAAO,CAA+B,EAAA;AACxF,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE;AAEtB,EAAA,oBACEC,cAAA,CAAA,QAAA,EAAA;AACEC,IAAAA,IAAI,EAAC,QAAQ;AACb,IAAA,YAAA,EAAYH,IAAI,CAACI,aAAa,CAACC,4BAAmB,CAACC,SAAS,CAAE;AAC9DR,IAAAA,SAAS,EAAES,SAAI,CAACT,SAAS,EAAE,0DAA0D,CAAE;AACvFC,IAAAA,OAAO,EAAEA,OAAQ;IAAAS,QAAA,eAEjBN,cAAA,CAACO,WAAK,EAAA;AAACC,MAAAA,IAAI,EAAE;KAAG;AAClB,GAAQ,CAAC;AAEb;AAEA;;;;"}
@@ -0,0 +1,25 @@
1
+ import { Cross } from '@transferwise/icons';
2
+ import { clsx } from 'clsx';
3
+ import { useIntl } from 'react-intl';
4
+ import messages from '../../../dateLookup/dateTrigger/DateTrigger.messages.mjs';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ function SelectInputClearButton({
8
+ className,
9
+ onClick
10
+ }) {
11
+ const intl = useIntl();
12
+ return /*#__PURE__*/jsx("button", {
13
+ type: "button",
14
+ "aria-label": intl.formatMessage(messages.ariaLabel),
15
+ className: clsx(className, 'np-select-input-addon np-select-input-addon--interactive'),
16
+ onClick: onClick,
17
+ children: /*#__PURE__*/jsx(Cross, {
18
+ size: 16
19
+ })
20
+ });
21
+ }
22
+ // Type is already exported above
23
+
24
+ export { SelectInputClearButton };
25
+ //# sourceMappingURL=SelectInputClearButton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectInputClearButton.mjs","sources":["../../../../src/inputs/SelectInput/ClearButton/SelectInputClearButton.tsx"],"sourcesContent":["import { Cross } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\nimport dateTriggerMessages from '../../../dateLookup/dateTrigger/DateTrigger.messages';\n\nexport interface SelectInputClearButtonProps extends Pick<\n React.ComponentPropsWithoutRef<'button'>,\n 'className' | 'onClick'\n> {}\n\n/**\n * A button component used to clear the selected value in a SelectInput.\n */\nexport function SelectInputClearButton({ className, onClick }: SelectInputClearButtonProps) {\n const intl = useIntl();\n\n return (\n <button\n type=\"button\"\n aria-label={intl.formatMessage(dateTriggerMessages.ariaLabel)}\n className={clsx(className, 'np-select-input-addon np-select-input-addon--interactive')}\n onClick={onClick}\n >\n <Cross size={16} />\n </button>\n );\n}\n\n// Type is already exported above\n"],"names":["SelectInputClearButton","className","onClick","intl","useIntl","_jsx","type","formatMessage","dateTriggerMessages","ariaLabel","clsx","children","Cross","size"],"mappings":";;;;;;SAagBA,sBAAsBA,CAAC;EAAEC,SAAS;AAAEC,EAAAA;AAAO,CAA+B,EAAA;AACxF,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE;AAEtB,EAAA,oBACEC,GAAA,CAAA,QAAA,EAAA;AACEC,IAAAA,IAAI,EAAC,QAAQ;AACb,IAAA,YAAA,EAAYH,IAAI,CAACI,aAAa,CAACC,QAAmB,CAACC,SAAS,CAAE;AAC9DR,IAAAA,SAAS,EAAES,IAAI,CAACT,SAAS,EAAE,0DAA0D,CAAE;AACvFC,IAAAA,OAAO,EAAEA,OAAQ;IAAAS,QAAA,eAEjBN,GAAA,CAACO,KAAK,EAAA;AAACC,MAAAA,IAAI,EAAE;KAAG;AAClB,GAAQ,CAAC;AAEb;AAEA;;;;"}
@@ -0,0 +1,59 @@
1
+ 'use strict';
2
+
3
+ var icons = require('@transferwise/icons');
4
+ var clsx = require('clsx');
5
+ require('react');
6
+ var InputGroup = require('../../InputGroup.js');
7
+ var SelectInputClearButton = require('../ClearButton/SelectInputClearButton.js');
8
+ var SelectInputTriggerButton = require('../TriggerButton/SelectInputTriggerButton.js');
9
+ var SelectInputButtonInput = require('../ButtonInput/SelectInputButtonInput.js');
10
+ var jsxRuntime = require('react/jsx-runtime');
11
+
12
+ function SelectInputDefaultRenderTrigger({
13
+ content,
14
+ placeholderShown,
15
+ clear,
16
+ disabled,
17
+ size,
18
+ className
19
+ }) {
20
+ return /*#__PURE__*/jsxRuntime.jsx(InputGroup.InputGroup, {
21
+ addonEnd: {
22
+ content: /*#__PURE__*/jsxRuntime.jsxs("span", {
23
+ className: clsx.clsx('np-select-input-addon-container', disabled && 'disabled'),
24
+ children: [clear != null && !placeholderShown ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
25
+ children: [/*#__PURE__*/jsxRuntime.jsx(SelectInputClearButton.SelectInputClearButton, {
26
+ onClick: event => {
27
+ event.preventDefault();
28
+ clear();
29
+ }
30
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
31
+ className: "np-select-input-addon-separator"
32
+ })]
33
+ }) : null, /*#__PURE__*/jsxRuntime.jsx("span", {
34
+ className: "np-select-input-addon",
35
+ children: /*#__PURE__*/jsxRuntime.jsx(icons.ChevronDown, {
36
+ size: 16
37
+ })
38
+ })]
39
+ }),
40
+ initialContentWidth: 24 + 4,
41
+ padding: 'sm'
42
+ },
43
+ disabled: disabled,
44
+ className: className,
45
+ children: /*#__PURE__*/jsxRuntime.jsx(SelectInputTriggerButton.SelectInputTriggerButton, {
46
+ as: SelectInputButtonInput.SelectInputButtonInput,
47
+ size: size,
48
+ children: /*#__PURE__*/jsxRuntime.jsx("span", {
49
+ className: clsx.clsx('np-select-input-content', placeholderShown && 'np-select-input-placeholder'),
50
+ children: content
51
+ })
52
+ })
53
+ });
54
+ }
55
+ const DefaultRenderTrigger = SelectInputDefaultRenderTrigger;
56
+
57
+ exports.DefaultRenderTrigger = DefaultRenderTrigger;
58
+ exports.SelectInputDefaultRenderTrigger = SelectInputDefaultRenderTrigger;
59
+ //# sourceMappingURL=SelectInputDefaultRenderTrigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectInputDefaultRenderTrigger.js","sources":["../../../../src/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.tsx"],"sourcesContent":["import { ChevronDown } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport React from 'react';\n\nimport { InputGroup } from \"../../InputGroup\";\nimport { SelectInputClearButton } from '../ClearButton';\nimport { SelectInputTriggerButton } from '../TriggerButton';\nimport { SelectInputProps } from '../SelectInput.types';\nimport { SelectInputButtonInput } from '../ButtonInput';\n\nexport interface SelectInputDefaultRenderTriggerProps {\n content: React.ReactNode;\n placeholderShown: boolean;\n clear: (() => void) | undefined;\n disabled: boolean;\n size: 'sm' | 'md' | 'lg';\n className: string | undefined;\n}\n\n/**\n * Default render function for the SelectInput trigger.\n * Displays the selected value or placeholder with clear button and dropdown indicator.\n */\nexport function SelectInputDefaultRenderTrigger({\n content,\n placeholderShown,\n clear,\n disabled,\n size,\n className,\n}: SelectInputDefaultRenderTriggerProps) {\n return (\n <InputGroup\n addonEnd={{\n content: (\n <span className={clsx('np-select-input-addon-container', disabled && 'disabled')}>\n {clear != null && !placeholderShown ? (\n <>\n <SelectInputClearButton\n onClick={(event) => {\n event.preventDefault();\n clear();\n }}\n />\n <span className=\"np-select-input-addon-separator\" />\n </>\n ) : null}\n <span className=\"np-select-input-addon\">\n <ChevronDown size={16} />\n </span>\n </span>\n ),\n initialContentWidth: 24 + 4,\n padding: 'sm',\n }}\n disabled={disabled}\n className={className}\n >\n <SelectInputTriggerButton as={SelectInputButtonInput} size={size}>\n <span\n className={clsx(\n 'np-select-input-content',\n placeholderShown && 'np-select-input-placeholder',\n )}\n >\n {content}\n </span>\n </SelectInputTriggerButton>\n </InputGroup>\n );\n}\n\nexport const DefaultRenderTrigger =\n SelectInputDefaultRenderTrigger satisfies SelectInputProps['renderTrigger'];\n"],"names":["SelectInputDefaultRenderTrigger","content","placeholderShown","clear","disabled","size","className","_jsx","InputGroup","addonEnd","_jsxs","clsx","children","_Fragment","SelectInputClearButton","onClick","event","preventDefault","ChevronDown","initialContentWidth","padding","SelectInputTriggerButton","as","SelectInputButtonInput","DefaultRenderTrigger"],"mappings":";;;;;;;;;;;AAuBM,SAAUA,+BAA+BA,CAAC;EAC9CC,OAAO;EACPC,gBAAgB;EAChBC,KAAK;EACLC,QAAQ;EACRC,IAAI;AACJC,EAAAA;AAAS,CAC4B,EAAA;EACrC,oBACEC,cAAA,CAACC,qBAAU,EAAA;AACTC,IAAAA,QAAQ,EAAE;AACRR,MAAAA,OAAO,eACLS,eAAA,CAAA,MAAA,EAAA;QAAMJ,SAAS,EAAEK,SAAI,CAAC,iCAAiC,EAAEP,QAAQ,IAAI,UAAU,CAAE;QAAAQ,QAAA,EAAA,CAC9ET,KAAK,IAAI,IAAI,IAAI,CAACD,gBAAgB,gBACjCQ,eAAA,CAAAG,mBAAA,EAAA;UAAAD,QAAA,EAAA,cACEL,cAAA,CAACO,6CAAsB,EAAA;YACrBC,OAAO,EAAGC,KAAK,IAAI;cACjBA,KAAK,CAACC,cAAc,EAAE;AACtBd,cAAAA,KAAK,EAAE;AACT,YAAA;WAAE,CAEJ,eAAAI,cAAA,CAAA,MAAA,EAAA;AAAMD,YAAAA,SAAS,EAAC;AAAiC,WAAA,CACnD;AAAA,SAAA,CAAG,GACD,IAAI,eACRC,cAAA,CAAA,MAAA,EAAA;AAAMD,UAAAA,SAAS,EAAC,uBAAuB;UAAAM,QAAA,eACrCL,cAAA,CAACW,iBAAW,EAAA;AAACb,YAAAA,IAAI,EAAE;WAAG;AACxB,SAAM,CACR;AAAA,OAAM,CACP;MACDc,mBAAmB,EAAE,EAAE,GAAG,CAAC;AAC3BC,MAAAA,OAAO,EAAE;KACT;AACFhB,IAAAA,QAAQ,EAAEA,QAAS;AACnBE,IAAAA,SAAS,EAAEA,SAAU;IAAAM,QAAA,eAErBL,cAAA,CAACc,iDAAwB,EAAA;AAACC,MAAAA,EAAE,EAAEC,6CAAuB;AAAClB,MAAAA,IAAI,EAAEA,IAAK;AAAAO,MAAAA,QAAA,eAC/DL,cAAA,CAAA,MAAA,EAAA;QACED,SAAS,EAAEK,SAAI,CACb,yBAAyB,EACzBT,gBAAgB,IAAI,6BAA6B,CACjD;AAAAU,QAAAA,QAAA,EAEDX;OACG;KACkB;AAC5B,GAAY,CAAC;AAEjB;AAEO,MAAMuB,oBAAoB,GAC/BxB;;;;;"}
@@ -0,0 +1,56 @@
1
+ import { ChevronDown } from '@transferwise/icons';
2
+ import { clsx } from 'clsx';
3
+ import 'react';
4
+ import { InputGroup } from '../../InputGroup.mjs';
5
+ import { SelectInputClearButton } from '../ClearButton/SelectInputClearButton.mjs';
6
+ import { SelectInputTriggerButton } from '../TriggerButton/SelectInputTriggerButton.mjs';
7
+ import { SelectInputButtonInput } from '../ButtonInput/SelectInputButtonInput.mjs';
8
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
+
10
+ function SelectInputDefaultRenderTrigger({
11
+ content,
12
+ placeholderShown,
13
+ clear,
14
+ disabled,
15
+ size,
16
+ className
17
+ }) {
18
+ return /*#__PURE__*/jsx(InputGroup, {
19
+ addonEnd: {
20
+ content: /*#__PURE__*/jsxs("span", {
21
+ className: clsx('np-select-input-addon-container', disabled && 'disabled'),
22
+ children: [clear != null && !placeholderShown ? /*#__PURE__*/jsxs(Fragment, {
23
+ children: [/*#__PURE__*/jsx(SelectInputClearButton, {
24
+ onClick: event => {
25
+ event.preventDefault();
26
+ clear();
27
+ }
28
+ }), /*#__PURE__*/jsx("span", {
29
+ className: "np-select-input-addon-separator"
30
+ })]
31
+ }) : null, /*#__PURE__*/jsx("span", {
32
+ className: "np-select-input-addon",
33
+ children: /*#__PURE__*/jsx(ChevronDown, {
34
+ size: 16
35
+ })
36
+ })]
37
+ }),
38
+ initialContentWidth: 24 + 4,
39
+ padding: 'sm'
40
+ },
41
+ disabled: disabled,
42
+ className: className,
43
+ children: /*#__PURE__*/jsx(SelectInputTriggerButton, {
44
+ as: SelectInputButtonInput,
45
+ size: size,
46
+ children: /*#__PURE__*/jsx("span", {
47
+ className: clsx('np-select-input-content', placeholderShown && 'np-select-input-placeholder'),
48
+ children: content
49
+ })
50
+ })
51
+ });
52
+ }
53
+ const DefaultRenderTrigger = SelectInputDefaultRenderTrigger;
54
+
55
+ export { DefaultRenderTrigger, SelectInputDefaultRenderTrigger };
56
+ //# sourceMappingURL=SelectInputDefaultRenderTrigger.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectInputDefaultRenderTrigger.mjs","sources":["../../../../src/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.tsx"],"sourcesContent":["import { ChevronDown } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport React from 'react';\n\nimport { InputGroup } from \"../../InputGroup\";\nimport { SelectInputClearButton } from '../ClearButton';\nimport { SelectInputTriggerButton } from '../TriggerButton';\nimport { SelectInputProps } from '../SelectInput.types';\nimport { SelectInputButtonInput } from '../ButtonInput';\n\nexport interface SelectInputDefaultRenderTriggerProps {\n content: React.ReactNode;\n placeholderShown: boolean;\n clear: (() => void) | undefined;\n disabled: boolean;\n size: 'sm' | 'md' | 'lg';\n className: string | undefined;\n}\n\n/**\n * Default render function for the SelectInput trigger.\n * Displays the selected value or placeholder with clear button and dropdown indicator.\n */\nexport function SelectInputDefaultRenderTrigger({\n content,\n placeholderShown,\n clear,\n disabled,\n size,\n className,\n}: SelectInputDefaultRenderTriggerProps) {\n return (\n <InputGroup\n addonEnd={{\n content: (\n <span className={clsx('np-select-input-addon-container', disabled && 'disabled')}>\n {clear != null && !placeholderShown ? (\n <>\n <SelectInputClearButton\n onClick={(event) => {\n event.preventDefault();\n clear();\n }}\n />\n <span className=\"np-select-input-addon-separator\" />\n </>\n ) : null}\n <span className=\"np-select-input-addon\">\n <ChevronDown size={16} />\n </span>\n </span>\n ),\n initialContentWidth: 24 + 4,\n padding: 'sm',\n }}\n disabled={disabled}\n className={className}\n >\n <SelectInputTriggerButton as={SelectInputButtonInput} size={size}>\n <span\n className={clsx(\n 'np-select-input-content',\n placeholderShown && 'np-select-input-placeholder',\n )}\n >\n {content}\n </span>\n </SelectInputTriggerButton>\n </InputGroup>\n );\n}\n\nexport const DefaultRenderTrigger =\n SelectInputDefaultRenderTrigger satisfies SelectInputProps['renderTrigger'];\n"],"names":["SelectInputDefaultRenderTrigger","content","placeholderShown","clear","disabled","size","className","_jsx","InputGroup","addonEnd","_jsxs","clsx","children","_Fragment","SelectInputClearButton","onClick","event","preventDefault","ChevronDown","initialContentWidth","padding","SelectInputTriggerButton","as","SelectInputButtonInput","DefaultRenderTrigger"],"mappings":";;;;;;;;;AAuBM,SAAUA,+BAA+BA,CAAC;EAC9CC,OAAO;EACPC,gBAAgB;EAChBC,KAAK;EACLC,QAAQ;EACRC,IAAI;AACJC,EAAAA;AAAS,CAC4B,EAAA;EACrC,oBACEC,GAAA,CAACC,UAAU,EAAA;AACTC,IAAAA,QAAQ,EAAE;AACRR,MAAAA,OAAO,eACLS,IAAA,CAAA,MAAA,EAAA;QAAMJ,SAAS,EAAEK,IAAI,CAAC,iCAAiC,EAAEP,QAAQ,IAAI,UAAU,CAAE;QAAAQ,QAAA,EAAA,CAC9ET,KAAK,IAAI,IAAI,IAAI,CAACD,gBAAgB,gBACjCQ,IAAA,CAAAG,QAAA,EAAA;UAAAD,QAAA,EAAA,cACEL,GAAA,CAACO,sBAAsB,EAAA;YACrBC,OAAO,EAAGC,KAAK,IAAI;cACjBA,KAAK,CAACC,cAAc,EAAE;AACtBd,cAAAA,KAAK,EAAE;AACT,YAAA;WAAE,CAEJ,eAAAI,GAAA,CAAA,MAAA,EAAA;AAAMD,YAAAA,SAAS,EAAC;AAAiC,WAAA,CACnD;AAAA,SAAA,CAAG,GACD,IAAI,eACRC,GAAA,CAAA,MAAA,EAAA;AAAMD,UAAAA,SAAS,EAAC,uBAAuB;UAAAM,QAAA,eACrCL,GAAA,CAACW,WAAW,EAAA;AAACb,YAAAA,IAAI,EAAE;WAAG;AACxB,SAAM,CACR;AAAA,OAAM,CACP;MACDc,mBAAmB,EAAE,EAAE,GAAG,CAAC;AAC3BC,MAAAA,OAAO,EAAE;KACT;AACFhB,IAAAA,QAAQ,EAAEA,QAAS;AACnBE,IAAAA,SAAS,EAAEA,SAAU;IAAAM,QAAA,eAErBL,GAAA,CAACc,wBAAwB,EAAA;AAACC,MAAAA,EAAE,EAAEC,sBAAuB;AAAClB,MAAAA,IAAI,EAAEA,IAAK;AAAAO,MAAAA,QAAA,eAC/DL,GAAA,CAAA,MAAA,EAAA;QACED,SAAS,EAAEK,IAAI,CACb,yBAAyB,EACzBT,gBAAgB,IAAI,6BAA6B,CACjD;AAAAU,QAAAA,QAAA,EAEDX;OACG;KACkB;AAC5B,GAAY,CAAC;AAEjB;AAEO,MAAMuB,oBAAoB,GAC/BxB;;;;"}
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+
3
+ var clsx = require('clsx');
4
+ var React = require('react');
5
+ var Header = require('../../../../header/Header.js');
6
+ var Section = require('../../../../section/Section.js');
7
+ var SelectInputItemView = require('../SelectInputItemView.js');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+
10
+ function SelectInputGroupItemView({
11
+ item,
12
+ renderValue,
13
+ needle
14
+ }) {
15
+ const headerId = React.useId();
16
+ const header = /*#__PURE__*/jsxRuntime.jsx(Header.default, {
17
+ as: "header",
18
+ role: "none",
19
+ id: headerId,
20
+ title: item.label
21
+ // @ts-expect-error when we migrate ActionButton to new Button this should be sorted
22
+ ,
23
+ action: item.action && {
24
+ text: item.action.label,
25
+ onClick: item.action.onClick
26
+ },
27
+ className: "np-select-input-group-item-header p-x-1"
28
+ });
29
+ return (
30
+ /*#__PURE__*/
31
+ // An empty container may be rendered when no options match `needle`
32
+ // However, pre-filtering would result in worse performance overall
33
+ jsxRuntime.jsxs(Section.default, {
34
+ as: "section",
35
+ role: "group",
36
+ "aria-labelledby": headerId,
37
+ className: clsx.clsx('m-y-0', needle === null && 'np-select-input-group-item--without-needle'),
38
+ children: [needle == null ? header : null, item.options.map((option, index) => /*#__PURE__*/jsxRuntime.jsx(SelectInputItemView.SelectInputItemView
39
+ // eslint-disable-next-line react/no-array-index-key
40
+ , {
41
+ item: option,
42
+ renderValue: renderValue,
43
+ needle: needle
44
+ }, index))]
45
+ })
46
+ );
47
+ }
48
+
49
+ exports.SelectInputGroupItemView = SelectInputGroupItemView;
50
+ //# sourceMappingURL=SelectInputGroupItemView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectInputGroupItemView.js","sources":["../../../../../src/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useId } from 'react';\nimport Header from '../../../../header';\nimport Section from '../../../../section';\nimport { SelectInputGroupItem } from '../../SelectInput.types';\nimport { SelectInputItemView, SelectInputItemViewProps } from '..';\n\nexport interface SelectInputGroupItemViewProps<T = string> extends SelectInputItemViewProps<\n T,\n SelectInputGroupItem<T | undefined>\n> {}\n\n/**\n * Component that renders a group of SelectInput options with a header.\n */\nexport function SelectInputGroupItemView<T = string>({\n item,\n renderValue,\n needle,\n}: SelectInputGroupItemViewProps<T>) {\n const headerId = useId();\n\n const header = (\n <Header\n as=\"header\"\n role=\"none\"\n id={headerId}\n title={item.label}\n // @ts-expect-error when we migrate ActionButton to new Button this should be sorted\n action={\n item.action && {\n text: item.action.label,\n onClick: item.action.onClick,\n }\n }\n className=\"np-select-input-group-item-header p-x-1\"\n />\n );\n\n return (\n // An empty container may be rendered when no options match `needle`\n // However, pre-filtering would result in worse performance overall\n <Section\n as=\"section\"\n role=\"group\"\n aria-labelledby={headerId}\n className={clsx('m-y-0', needle === null && 'np-select-input-group-item--without-needle')}\n >\n {needle == null ? header : null}\n {item.options.map((option, index) => (\n <SelectInputItemView\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n item={option}\n renderValue={renderValue}\n needle={needle}\n />\n ))}\n </Section>\n );\n}\n"],"names":["SelectInputGroupItemView","item","renderValue","needle","headerId","useId","header","_jsx","Header","as","role","id","title","label","action","text","onClick","className","_jsxs","Section","clsx","children","options","map","option","index","SelectInputItemView"],"mappings":";;;;;;;;;AAeM,SAAUA,wBAAwBA,CAAa;EACnDC,IAAI;EACJC,WAAW;AACXC,EAAAA;AAAM,CAC2B,EAAA;AACjC,EAAA,MAAMC,QAAQ,GAAGC,WAAK,EAAE;AAExB,EAAA,MAAMC,MAAM,gBACVC,cAAA,CAACC,cAAM,EAAA;AACLC,IAAAA,EAAE,EAAC,QAAQ;AACXC,IAAAA,IAAI,EAAC,MAAM;AACXC,IAAAA,EAAE,EAAEP,QAAS;IACbQ,KAAK,EAAEX,IAAI,CAACY;AACZ;AAAA;AACAC,IAAAA,MAAM,EACJb,IAAI,CAACa,MAAM,IAAI;AACbC,MAAAA,IAAI,EAAEd,IAAI,CAACa,MAAM,CAACD,KAAK;AACvBG,MAAAA,OAAO,EAAEf,IAAI,CAACa,MAAM,CAACE;KAExB;AACDC,IAAAA,SAAS,EAAC;AAAyC,GAAA,CAEtD;AAED,EAAA;AAAA;AACE;AACA;AACAC,IAAAA,eAAA,CAACC,eAAO,EAAA;AACNV,MAAAA,EAAE,EAAC,SAAS;AACZC,MAAAA,IAAI,EAAC,OAAO;AACZ,MAAA,iBAAA,EAAiBN,QAAS;MAC1Ba,SAAS,EAAEG,SAAI,CAAC,OAAO,EAAEjB,MAAM,KAAK,IAAI,IAAI,4CAA4C,CAAE;MAAAkB,QAAA,EAAA,CAEzFlB,MAAM,IAAI,IAAI,GAAGG,MAAM,GAAG,IAAI,EAC9BL,IAAI,CAACqB,OAAO,CAACC,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK,kBAC9BlB,cAAA,CAACmB;AACC;AAAA,QAAA;AAEAzB,QAAAA,IAAI,EAAEuB,MAAO;AACbtB,QAAAA,WAAW,EAAEA,WAAY;AACzBC,QAAAA,MAAM,EAAEA;OAAO,EAHVsB,KAGU,CAElB,CAAC;KACK;AAAC;AAEd;;;;"}
@@ -0,0 +1,48 @@
1
+ import { clsx } from 'clsx';
2
+ import { useId } from 'react';
3
+ import Header from '../../../../header/Header.mjs';
4
+ import Section from '../../../../section/Section.mjs';
5
+ import { SelectInputItemView } from '../SelectInputItemView.mjs';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+
8
+ function SelectInputGroupItemView({
9
+ item,
10
+ renderValue,
11
+ needle
12
+ }) {
13
+ const headerId = useId();
14
+ const header = /*#__PURE__*/jsx(Header, {
15
+ as: "header",
16
+ role: "none",
17
+ id: headerId,
18
+ title: item.label
19
+ // @ts-expect-error when we migrate ActionButton to new Button this should be sorted
20
+ ,
21
+ action: item.action && {
22
+ text: item.action.label,
23
+ onClick: item.action.onClick
24
+ },
25
+ className: "np-select-input-group-item-header p-x-1"
26
+ });
27
+ return (
28
+ /*#__PURE__*/
29
+ // An empty container may be rendered when no options match `needle`
30
+ // However, pre-filtering would result in worse performance overall
31
+ jsxs(Section, {
32
+ as: "section",
33
+ role: "group",
34
+ "aria-labelledby": headerId,
35
+ className: clsx('m-y-0', needle === null && 'np-select-input-group-item--without-needle'),
36
+ children: [needle == null ? header : null, item.options.map((option, index) => /*#__PURE__*/jsx(SelectInputItemView
37
+ // eslint-disable-next-line react/no-array-index-key
38
+ , {
39
+ item: option,
40
+ renderValue: renderValue,
41
+ needle: needle
42
+ }, index))]
43
+ })
44
+ );
45
+ }
46
+
47
+ export { SelectInputGroupItemView };
48
+ //# sourceMappingURL=SelectInputGroupItemView.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectInputGroupItemView.mjs","sources":["../../../../../src/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useId } from 'react';\nimport Header from '../../../../header';\nimport Section from '../../../../section';\nimport { SelectInputGroupItem } from '../../SelectInput.types';\nimport { SelectInputItemView, SelectInputItemViewProps } from '..';\n\nexport interface SelectInputGroupItemViewProps<T = string> extends SelectInputItemViewProps<\n T,\n SelectInputGroupItem<T | undefined>\n> {}\n\n/**\n * Component that renders a group of SelectInput options with a header.\n */\nexport function SelectInputGroupItemView<T = string>({\n item,\n renderValue,\n needle,\n}: SelectInputGroupItemViewProps<T>) {\n const headerId = useId();\n\n const header = (\n <Header\n as=\"header\"\n role=\"none\"\n id={headerId}\n title={item.label}\n // @ts-expect-error when we migrate ActionButton to new Button this should be sorted\n action={\n item.action && {\n text: item.action.label,\n onClick: item.action.onClick,\n }\n }\n className=\"np-select-input-group-item-header p-x-1\"\n />\n );\n\n return (\n // An empty container may be rendered when no options match `needle`\n // However, pre-filtering would result in worse performance overall\n <Section\n as=\"section\"\n role=\"group\"\n aria-labelledby={headerId}\n className={clsx('m-y-0', needle === null && 'np-select-input-group-item--without-needle')}\n >\n {needle == null ? header : null}\n {item.options.map((option, index) => (\n <SelectInputItemView\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n item={option}\n renderValue={renderValue}\n needle={needle}\n />\n ))}\n </Section>\n );\n}\n"],"names":["SelectInputGroupItemView","item","renderValue","needle","headerId","useId","header","_jsx","Header","as","role","id","title","label","action","text","onClick","className","_jsxs","Section","clsx","children","options","map","option","index","SelectInputItemView"],"mappings":";;;;;;;AAeM,SAAUA,wBAAwBA,CAAa;EACnDC,IAAI;EACJC,WAAW;AACXC,EAAAA;AAAM,CAC2B,EAAA;AACjC,EAAA,MAAMC,QAAQ,GAAGC,KAAK,EAAE;AAExB,EAAA,MAAMC,MAAM,gBACVC,GAAA,CAACC,MAAM,EAAA;AACLC,IAAAA,EAAE,EAAC,QAAQ;AACXC,IAAAA,IAAI,EAAC,MAAM;AACXC,IAAAA,EAAE,EAAEP,QAAS;IACbQ,KAAK,EAAEX,IAAI,CAACY;AACZ;AAAA;AACAC,IAAAA,MAAM,EACJb,IAAI,CAACa,MAAM,IAAI;AACbC,MAAAA,IAAI,EAAEd,IAAI,CAACa,MAAM,CAACD,KAAK;AACvBG,MAAAA,OAAO,EAAEf,IAAI,CAACa,MAAM,CAACE;KAExB;AACDC,IAAAA,SAAS,EAAC;AAAyC,GAAA,CAEtD;AAED,EAAA;AAAA;AACE;AACA;AACAC,IAAAA,IAAA,CAACC,OAAO,EAAA;AACNV,MAAAA,EAAE,EAAC,SAAS;AACZC,MAAAA,IAAI,EAAC,OAAO;AACZ,MAAA,iBAAA,EAAiBN,QAAS;MAC1Ba,SAAS,EAAEG,IAAI,CAAC,OAAO,EAAEjB,MAAM,KAAK,IAAI,IAAI,4CAA4C,CAAE;MAAAkB,QAAA,EAAA,CAEzFlB,MAAM,IAAI,IAAI,GAAGG,MAAM,GAAG,IAAI,EAC9BL,IAAI,CAACqB,OAAO,CAACC,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK,kBAC9BlB,GAAA,CAACmB;AACC;AAAA,QAAA;AAEAzB,QAAAA,IAAI,EAAEuB,MAAO;AACbtB,QAAAA,WAAW,EAAEA,WAAY;AACzBC,QAAAA,MAAM,EAAEA;OAAO,EAHVsB,KAGU,CAElB,CAAC;KACK;AAAC;AAEd;;;;"}
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ var SelectInput_utils = require('../SelectInput.utils.js');
4
+ var SelectInputOption = require('../Option/SelectInputOption.js');
5
+ var SelectInputGroupItemView = require('./GroupItemView/SelectInputGroupItemView.js');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function SelectInputItemView({
9
+ item,
10
+ renderValue,
11
+ needle
12
+ }) {
13
+ switch (item.type) {
14
+ case 'option':
15
+ {
16
+ if (item.value != null && (needle == null || SelectInput_utils.selectInputOptionItemIncludesNeedle(item, needle))) {
17
+ return /*#__PURE__*/jsxRuntime.jsx(SelectInputOption.SelectInputOption, {
18
+ value: item.value,
19
+ disabled: item.disabled,
20
+ children: renderValue(item.value, false)
21
+ });
22
+ }
23
+ break;
24
+ }
25
+ case 'group':
26
+ {
27
+ return /*#__PURE__*/jsxRuntime.jsx(SelectInputGroupItemView.SelectInputGroupItemView, {
28
+ item: item,
29
+ renderValue: renderValue,
30
+ needle: needle
31
+ });
32
+ }
33
+ case 'separator':
34
+ {
35
+ if (needle == null) {
36
+ return /*#__PURE__*/jsxRuntime.jsx("hr", {
37
+ className: "np-select-input-separator-item"
38
+ });
39
+ }
40
+ break;
41
+ }
42
+ }
43
+ return null;
44
+ }
45
+
46
+ exports.SelectInputItemView = SelectInputItemView;
47
+ //# sourceMappingURL=SelectInputItemView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectInputItemView.js","sources":["../../../../src/inputs/SelectInput/ItemView/SelectInputItemView.tsx"],"sourcesContent":["import { selectInputOptionItemIncludesNeedle } from '../SelectInput.utils';\nimport { SelectInputItem, SelectInputProps } from '../SelectInput.types';\nimport { SelectInputOption } from '../Option';\nimport { SelectInputGroupItemView } from './GroupItemView';\n\nexport interface SelectInputItemViewProps<\n T = string,\n I extends SelectInputItem<T | undefined> = SelectInputItem<T | undefined>,\n> extends Required<Pick<SelectInputProps<T>, 'renderValue'>> {\n item: I;\n needle: string | null | undefined;\n}\n\n/**\n * Component that renders different types of SelectInput items:\n * options, groups, or separators.\n */\nexport function SelectInputItemView<T = string>({\n item,\n renderValue,\n needle,\n}: SelectInputItemViewProps<T>) {\n switch (item.type) {\n case 'option': {\n if (\n item.value != null &&\n (needle == null || selectInputOptionItemIncludesNeedle(item, needle))\n ) {\n return (\n <SelectInputOption value={item.value} disabled={item.disabled}>\n {renderValue(item.value, false)}\n </SelectInputOption>\n );\n }\n break;\n }\n case 'group': {\n return <SelectInputGroupItemView item={item} renderValue={renderValue} needle={needle} />;\n }\n case 'separator': {\n if (needle == null) {\n return <hr className=\"np-select-input-separator-item\" />;\n }\n break;\n }\n }\n return null;\n}\n"],"names":["SelectInputItemView","item","renderValue","needle","type","value","selectInputOptionItemIncludesNeedle","_jsx","SelectInputOption","disabled","children","SelectInputGroupItemView","className"],"mappings":";;;;;;;AAiBM,SAAUA,mBAAmBA,CAAa;EAC9CC,IAAI;EACJC,WAAW;AACXC,EAAAA;AAAM,CACsB,EAAA;EAC5B,QAAQF,IAAI,CAACG,IAAI;AACf,IAAA,KAAK,QAAQ;AAAE,MAAA;AACb,QAAA,IACEH,IAAI,CAACI,KAAK,IAAI,IAAI,KACjBF,MAAM,IAAI,IAAI,IAAIG,qDAAmC,CAACL,IAAI,EAAEE,MAAM,CAAC,CAAC,EACrE;UACA,oBACEI,cAAA,CAACC,mCAAiB,EAAA;YAACH,KAAK,EAAEJ,IAAI,CAACI,KAAM;YAACI,QAAQ,EAAER,IAAI,CAACQ,QAAS;AAAAC,YAAAA,QAAA,EAC3DR,WAAW,CAACD,IAAI,CAACI,KAAK,EAAE,KAAK;AAAC,WACd,CAAC;AAExB,QAAA;AACA,QAAA;AACF,MAAA;AACA,IAAA,KAAK,OAAO;AAAE,MAAA;QACZ,oBAAOE,cAAA,CAACI,iDAAwB,EAAA;AAACV,UAAAA,IAAI,EAAEA,IAAK;AAACC,UAAAA,WAAW,EAAEA,WAAY;AAACC,UAAAA,MAAM,EAAEA;AAAO,SAAA,CAAG;AAC3F,MAAA;AACA,IAAA,KAAK,WAAW;AAAE,MAAA;QAChB,IAAIA,MAAM,IAAI,IAAI,EAAE;AAClB,UAAA,oBAAOI,cAAA,CAAA,IAAA,EAAA;AAAIK,YAAAA,SAAS,EAAC;AAAgC,YAAG;AAC1D,QAAA;AACA,QAAA;AACF,MAAA;AACF;AACA,EAAA,OAAO,IAAI;AACb;;;;"}