@ntbjs/react-components 2.0.0-rc.3 → 2.0.0-rc.30

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 (715) hide show
  1. package/{esm/node_modules/@babel/runtime/helpers/esm/extends.js → build/_virtual/_rollupPluginBabelHelpers.js} +2 -1
  2. package/build/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  3. package/{esm/components → build}/data/Alert/Alert.js +28 -24
  4. package/build/data/Alert/Alert.js.map +1 -0
  5. package/build/data/Alert/Alert.styled.js +56 -0
  6. package/build/data/Alert/Alert.styled.js.map +1 -0
  7. package/build/data/Alert/index.js +2 -0
  8. package/build/data/Alert/index.js.map +1 -0
  9. package/{esm/components → build}/data/Badge/Badge.js +30 -32
  10. package/build/data/Badge/Badge.js.map +1 -0
  11. package/build/data/Badge/Badge.styled.js +133 -0
  12. package/build/data/Badge/Badge.styled.js.map +1 -0
  13. package/build/data/Badge/index.js +2 -0
  14. package/build/data/Badge/index.js.map +1 -0
  15. package/{esm/components → build}/data/Popover/Popover.js +31 -32
  16. package/build/data/Popover/Popover.js.map +1 -0
  17. package/{esm/components → build}/data/Popover/Popover.styled.js +40 -44
  18. package/build/data/Popover/Popover.styled.js.map +1 -0
  19. package/build/data/Popover/index.js +2 -0
  20. package/build/data/Popover/index.js.map +1 -0
  21. package/build/data/Tab/Tab.js +25 -0
  22. package/build/data/Tab/Tab.js.map +1 -0
  23. package/build/data/Tab/Tab.styled.js +13 -0
  24. package/build/data/Tab/Tab.styled.js.map +1 -0
  25. package/build/data/Tab/index.js +2 -0
  26. package/build/data/Tab/index.js.map +1 -0
  27. package/build/data/Tabs/Tabs.js +91 -0
  28. package/build/data/Tabs/Tabs.js.map +1 -0
  29. package/build/data/Tabs/Tabs.styled.js +74 -0
  30. package/build/data/Tabs/Tabs.styled.js.map +1 -0
  31. package/build/data/Tabs/index.js +2 -0
  32. package/build/data/Tabs/index.js.map +1 -0
  33. package/{esm/components → build}/data/Tooltip/Tooltip.js +17 -19
  34. package/build/data/Tooltip/Tooltip.js.map +1 -0
  35. package/build/data/Tooltip/Tooltip.styled.js +28 -0
  36. package/build/data/Tooltip/Tooltip.styled.js.map +1 -0
  37. package/build/data/Tooltip/index.js +2 -0
  38. package/build/data/Tooltip/index.js.map +1 -0
  39. package/build/data/VerificationStatusIcon/VerificationStatusIcon.js +36 -0
  40. package/build/data/VerificationStatusIcon/VerificationStatusIcon.js.map +1 -0
  41. package/{esm/components → build}/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +18 -34
  42. package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js.map +1 -0
  43. package/build/data/index.js +8 -0
  44. package/build/data/index.js.map +1 -0
  45. package/{esm → build}/hooks/useEventListner.js +5 -6
  46. package/build/hooks/useEventListner.js.map +1 -0
  47. package/build/hooks/useIsomorphicLayoutEffect.js +6 -0
  48. package/build/hooks/useIsomorphicLayoutEffect.js.map +1 -0
  49. package/{esm → build}/hooks/useOnClickOutside.js +2 -1
  50. package/build/hooks/useOnClickOutside.js.map +1 -0
  51. package/build/icons/add-circle.svg +3 -0
  52. package/build/icons/add.svg +3 -0
  53. package/build/icons/album.svg +3 -0
  54. package/build/icons/arrow-back.svg +4 -0
  55. package/{esm → build}/icons/arrow-back.svg.js +4 -4
  56. package/build/icons/arrow-back.svg.js.map +1 -0
  57. package/build/icons/arrow-drop-down.svg +4 -0
  58. package/build/icons/arrow-forward.svg +3 -0
  59. package/{esm → build}/icons/arrow-forward.svg.js +4 -4
  60. package/build/icons/arrow-forward.svg.js.map +1 -0
  61. package/build/icons/audio.svg +3 -0
  62. package/build/icons/bell.svg +3 -0
  63. package/build/icons/check-circle-filled.svg +3 -0
  64. package/build/icons/check-rectangle-filled.svg +3 -0
  65. package/{esm → build}/icons/check-rectangle-filled.svg.js +4 -4
  66. package/build/icons/check-rectangle-filled.svg.js.map +1 -0
  67. package/build/icons/check.svg +3 -0
  68. package/build/icons/clear-circle-filled.svg +14 -0
  69. package/build/icons/close.svg +4 -0
  70. package/{esm → build}/icons/close.svg.js +4 -4
  71. package/build/icons/close.svg.js.map +1 -0
  72. package/build/icons/corporate.svg +3 -0
  73. package/build/icons/delete-context-menu.svg +4 -0
  74. package/build/icons/delete.svg +3 -0
  75. package/build/icons/design-services.svg +4 -0
  76. package/build/icons/download.svg +3 -0
  77. package/build/icons/edit-note.svg +4 -0
  78. package/{esm → build}/icons/edit-note.svg.js +4 -4
  79. package/build/icons/edit-note.svg.js.map +1 -0
  80. package/build/icons/edit.svg +3 -0
  81. package/build/icons/expand-more.svg +4 -0
  82. package/{esm → build}/icons/expand-more.svg.js +4 -4
  83. package/build/icons/expand-more.svg.js.map +1 -0
  84. package/build/icons/file.svg +3 -0
  85. package/build/icons/ftp.svg +3 -0
  86. package/build/icons/gear.svg +3 -0
  87. package/build/icons/headset.svg +1 -0
  88. package/{esm → build}/icons/headset.svg.js +4 -4
  89. package/build/icons/headset.svg.js.map +1 -0
  90. package/build/icons/index.js +79 -0
  91. package/build/icons/layers.svg +3 -0
  92. package/{esm → build}/icons/layers.svg.js +4 -4
  93. package/build/icons/layers.svg.js.map +1 -0
  94. package/build/icons/library-add.svg +3 -0
  95. package/build/icons/link.svg +4 -0
  96. package/{esm → build}/icons/link.svg.js +4 -4
  97. package/build/icons/link.svg.js.map +1 -0
  98. package/build/icons/pdf.svg +3 -0
  99. package/build/icons/play.svg +3 -0
  100. package/{esm → build}/icons/play.svg.js +4 -4
  101. package/build/icons/play.svg.js.map +1 -0
  102. package/build/icons/remove-circle.svg +3 -0
  103. package/build/icons/search.svg +3 -0
  104. package/{esm → build}/icons/search.svg.js +4 -4
  105. package/build/icons/search.svg.js.map +1 -0
  106. package/build/icons/share.svg +3 -0
  107. package/build/icons/shopping_cart_add.svg +3 -0
  108. package/build/icons/star-filled.svg +3 -0
  109. package/{esm → build}/icons/star-filled.svg.js +4 -4
  110. package/build/icons/star-filled.svg.js.map +1 -0
  111. package/build/icons/star.svg +3 -0
  112. package/{esm → build}/icons/star.svg.js +4 -4
  113. package/build/icons/star.svg.js.map +1 -0
  114. package/build/icons/triangle-right.svg +4 -0
  115. package/{esm → build}/icons/triangle-right.svg.js +4 -4
  116. package/build/icons/triangle-right.svg.js.map +1 -0
  117. package/build/icons/verification.svg +3 -0
  118. package/{esm → build}/icons/verification.svg.js +4 -4
  119. package/build/icons/verification.svg.js.map +1 -0
  120. package/build/icons/warning-circle.svg +3 -0
  121. package/{esm → build}/icons/warning-circle.svg.js +4 -4
  122. package/build/icons/warning-circle.svg.js.map +1 -0
  123. package/build/icons/warning-triangle.svg +3 -0
  124. package/build/index.js +5 -0
  125. package/build/index.js.map +1 -0
  126. package/build/inputs/ActionButton/ActionButton.js +36 -0
  127. package/build/inputs/ActionButton/ActionButton.js.map +1 -0
  128. package/build/inputs/ActionButton/ActionButton.styled.js +55 -0
  129. package/build/inputs/ActionButton/ActionButton.styled.js.map +1 -0
  130. package/build/inputs/ActionButton/index.js +2 -0
  131. package/build/inputs/ActionButton/index.js.map +1 -0
  132. package/{esm/components → build}/inputs/Button/Button.js +57 -53
  133. package/build/inputs/Button/Button.js.map +1 -0
  134. package/build/inputs/Button/Button.styled.js +260 -0
  135. package/build/inputs/Button/Button.styled.js.map +1 -0
  136. package/build/inputs/Button/index.js +2 -0
  137. package/build/inputs/Button/index.js.map +1 -0
  138. package/{esm/components → build}/inputs/Checkbox/Checkbox.js +15 -16
  139. package/build/inputs/Checkbox/Checkbox.js.map +1 -0
  140. package/build/inputs/Checkbox/Checkbox.styled.js +122 -0
  141. package/build/inputs/Checkbox/Checkbox.styled.js.map +1 -0
  142. package/build/inputs/Checkbox/index.js +2 -0
  143. package/build/inputs/Checkbox/index.js.map +1 -0
  144. package/{esm/components → build}/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +61 -58
  145. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js.map +1 -0
  146. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +285 -0
  147. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js.map +1 -0
  148. package/build/inputs/CompactAutocompleteSelect/index.js +2 -0
  149. package/build/inputs/CompactAutocompleteSelect/index.js.map +1 -0
  150. package/{esm/components → build}/inputs/CompactStarRating/CompactStarRating.js +53 -50
  151. package/build/inputs/CompactStarRating/CompactStarRating.js.map +1 -0
  152. package/build/inputs/CompactStarRating/CompactStarRating.styled.js +217 -0
  153. package/build/inputs/CompactStarRating/CompactStarRating.styled.js.map +1 -0
  154. package/build/inputs/CompactStarRating/index.js +2 -0
  155. package/build/inputs/CompactStarRating/index.js.map +1 -0
  156. package/{esm/components → build}/inputs/CompactTextInput/CompactTextInput.js +58 -57
  157. package/build/inputs/CompactTextInput/CompactTextInput.js.map +1 -0
  158. package/build/inputs/CompactTextInput/CompactTextInput.styled.js +326 -0
  159. package/build/inputs/CompactTextInput/CompactTextInput.styled.js.map +1 -0
  160. package/build/inputs/CompactTextInput/index.js +2 -0
  161. package/build/inputs/CompactTextInput/index.js.map +1 -0
  162. package/{esm/components → build}/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +44 -84
  163. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js.map +1 -0
  164. package/{esm/components → build}/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +23 -32
  165. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js.map +1 -0
  166. package/build/inputs/MultiLevelCheckbox/index.js +3 -0
  167. package/build/inputs/MultiLevelCheckbox/index.js.map +1 -0
  168. package/build/inputs/MultiLevelCheckbox/types.js +27 -0
  169. package/build/inputs/MultiLevelCheckbox/types.js.map +1 -0
  170. package/{esm/components → build}/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +53 -50
  171. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js.map +1 -0
  172. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +93 -0
  173. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js.map +1 -0
  174. package/build/inputs/MultiLevelCheckboxSelect/index.js +2 -0
  175. package/build/inputs/MultiLevelCheckboxSelect/index.js.map +1 -0
  176. package/{esm/components → build}/inputs/MultiSelect/MultiSelect.js +51 -54
  177. package/build/inputs/MultiSelect/MultiSelect.js.map +1 -0
  178. package/build/inputs/MultiSelect/MultiSelect.styled.js +224 -0
  179. package/build/inputs/MultiSelect/MultiSelect.styled.js.map +1 -0
  180. package/build/inputs/MultiSelect/index.js +2 -0
  181. package/build/inputs/MultiSelect/index.js.map +1 -0
  182. package/build/inputs/Radio/Radio.js +60 -0
  183. package/build/inputs/Radio/Radio.js.map +1 -0
  184. package/{esm/components → build}/inputs/Radio/Radio.styled.js +20 -24
  185. package/build/inputs/Radio/Radio.styled.js.map +1 -0
  186. package/build/inputs/Radio/index.js +2 -0
  187. package/build/inputs/Radio/index.js.map +1 -0
  188. package/{esm/components → build}/inputs/Switch/Switch.js +11 -12
  189. package/build/inputs/Switch/Switch.js.map +1 -0
  190. package/build/inputs/Switch/Switch.styled.js +102 -0
  191. package/build/inputs/Switch/Switch.styled.js.map +1 -0
  192. package/build/inputs/Switch/index.js +2 -0
  193. package/build/inputs/Switch/index.js.map +1 -0
  194. package/{esm/components → build}/inputs/TextArea/TextArea.js +60 -64
  195. package/build/inputs/TextArea/TextArea.js.map +1 -0
  196. package/build/inputs/TextArea/TextArea.styled.js +439 -0
  197. package/build/inputs/TextArea/TextArea.styled.js.map +1 -0
  198. package/build/inputs/TextArea/index.js +2 -0
  199. package/build/inputs/TextArea/index.js.map +1 -0
  200. package/build/inputs/TextInput/TextInput.js +139 -0
  201. package/build/inputs/TextInput/TextInput.js.map +1 -0
  202. package/build/inputs/TextInput/TextInput.styled.js +231 -0
  203. package/build/inputs/TextInput/TextInput.styled.js.map +1 -0
  204. package/build/inputs/TextInput/index.js +2 -0
  205. package/build/inputs/TextInput/index.js.map +1 -0
  206. package/build/inputs/index.js +15 -0
  207. package/build/inputs/index.js.map +1 -0
  208. package/build/layout/InputGroup/InputGroup.js +20 -0
  209. package/build/layout/InputGroup/InputGroup.js.map +1 -0
  210. package/build/layout/InputGroup/InputGroup.styled.js +9 -0
  211. package/build/layout/InputGroup/InputGroup.styled.js.map +1 -0
  212. package/build/layout/SectionSeparator/SectionSeparator.js +23 -0
  213. package/build/layout/SectionSeparator/SectionSeparator.js.map +1 -0
  214. package/build/layout/SectionSeparator/SectionSeparator.styled.js +14 -0
  215. package/build/layout/SectionSeparator/SectionSeparator.styled.js.map +1 -0
  216. package/build/layout/SectionSeparator/index.js +2 -0
  217. package/build/layout/SectionSeparator/index.js.map +1 -0
  218. package/build/layout/index.js +3 -0
  219. package/build/layout/index.js.map +1 -0
  220. package/{esm/ssr → build}/ssr/index.js +1 -0
  221. package/build/ssr/index.js.map +1 -0
  222. package/build/styles/all.scss +3 -0
  223. package/build/styles/config.scss +38 -0
  224. package/build/styles/utils/colors.scss +15 -0
  225. package/build/styles/utils/colors.scss.js +4 -0
  226. package/build/styles/utils/colors.scss.js.map +1 -0
  227. package/build/styles/utils/theme.scss +33 -0
  228. package/{esm → build}/utils/dateTime.js +1 -0
  229. package/build/utils/dateTime.js.map +1 -0
  230. package/build/utils/defaultTheme.js +44 -0
  231. package/build/utils/defaultTheme.js.map +1 -0
  232. package/{esm/components → build}/widgets/AssetAction/AssetAction.js +22 -25
  233. package/build/widgets/AssetAction/AssetAction.js.map +1 -0
  234. package/build/widgets/AssetAction/AssetAction.styled.js +41 -0
  235. package/build/widgets/AssetAction/AssetAction.styled.js.map +1 -0
  236. package/build/widgets/AssetAction/index.js +2 -0
  237. package/build/widgets/AssetAction/index.js.map +1 -0
  238. package/build/widgets/AssetActionsBase/AssetActionsBase.js +29 -0
  239. package/build/widgets/AssetActionsBase/AssetActionsBase.js.map +1 -0
  240. package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js +15 -0
  241. package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js.map +1 -0
  242. package/build/widgets/AssetActionsBase/index.js +2 -0
  243. package/build/widgets/AssetActionsBase/index.js.map +1 -0
  244. package/{esm/components → build}/widgets/AssetGallery/AssetGallery.js +35 -34
  245. package/build/widgets/AssetGallery/AssetGallery.js.map +1 -0
  246. package/{esm/components → build}/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +65 -64
  247. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js.map +1 -0
  248. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +30 -0
  249. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js.map +1 -0
  250. package/{esm/components → build}/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +111 -108
  251. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -0
  252. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +329 -0
  253. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js.map +1 -0
  254. package/{esm/components → build}/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +131 -114
  255. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js.map +1 -0
  256. package/{esm/components → build}/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +98 -120
  257. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js.map +1 -0
  258. package/{esm/components → build}/widgets/AssetGallery/asset.propType.js +5 -4
  259. package/build/widgets/AssetGallery/asset.propType.js.map +1 -0
  260. package/build/widgets/AssetGallery/index.js +2 -0
  261. package/build/widgets/AssetGallery/index.js.map +1 -0
  262. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +44 -0
  263. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js.map +1 -0
  264. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +77 -0
  265. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js.map +1 -0
  266. package/build/widgets/AssetPreview/AssetPreviewTopBar/index.js +2 -0
  267. package/build/widgets/AssetPreview/AssetPreviewTopBar/index.js.map +1 -0
  268. package/build/widgets/ContextMenu/ContextMenu.js +22 -0
  269. package/build/widgets/ContextMenu/ContextMenu.js.map +1 -0
  270. package/build/widgets/ContextMenu/ContextMenu.styled.js +10 -0
  271. package/build/widgets/ContextMenu/ContextMenu.styled.js.map +1 -0
  272. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +44 -0
  273. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js.map +1 -0
  274. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +77 -0
  275. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js.map +1 -0
  276. package/build/widgets/ContextMenu/ContextMenuItem/index.js +2 -0
  277. package/build/widgets/ContextMenu/ContextMenuItem/index.js.map +1 -0
  278. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +22 -0
  279. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js.map +1 -0
  280. package/{esm/components → build}/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +5 -6
  281. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js.map +1 -0
  282. package/build/widgets/ContextMenu/ContextMenuItemsGroup/index.js +2 -0
  283. package/build/widgets/ContextMenu/ContextMenuItemsGroup/index.js.map +1 -0
  284. package/build/widgets/ContextMenu/index.js +2 -0
  285. package/build/widgets/ContextMenu/index.js.map +1 -0
  286. package/build/widgets/InfoCard/InfoCard.js +40 -0
  287. package/build/widgets/InfoCard/InfoCard.js.map +1 -0
  288. package/build/widgets/InfoCard/InfoCard.styled.js +92 -0
  289. package/build/widgets/InfoCard/InfoCard.styled.js.map +1 -0
  290. package/build/widgets/InfoCard/index.js +2 -0
  291. package/build/widgets/InfoCard/index.js.map +1 -0
  292. package/{esm/components → build}/widgets/Instructions/Instructions.js +60 -63
  293. package/build/widgets/Instructions/Instructions.js.map +1 -0
  294. package/build/widgets/Instructions/Instructions.styled.js +32 -0
  295. package/build/widgets/Instructions/Instructions.styled.js.map +1 -0
  296. package/build/widgets/Instructions/index.js +2 -0
  297. package/build/widgets/Instructions/index.js.map +1 -0
  298. package/build/widgets/ProgressBar/ProgressBar.js +72 -0
  299. package/build/widgets/ProgressBar/ProgressBar.js.map +1 -0
  300. package/build/widgets/ProgressBar/ProgressBar.styled.js +145 -0
  301. package/build/widgets/ProgressBar/ProgressBar.styled.js.map +1 -0
  302. package/build/widgets/ProgressBar/index.js +2 -0
  303. package/build/widgets/ProgressBar/index.js.map +1 -0
  304. package/build/widgets/SummaryCard/SummaryCard.js +92 -0
  305. package/build/widgets/SummaryCard/SummaryCard.js.map +1 -0
  306. package/build/widgets/SummaryCard/SummaryCard.styled.js +137 -0
  307. package/build/widgets/SummaryCard/SummaryCard.styled.js.map +1 -0
  308. package/build/widgets/SummaryCard/index.js +2 -0
  309. package/build/widgets/SummaryCard/index.js.map +1 -0
  310. package/build/widgets/index.js +12 -0
  311. package/build/widgets/index.js.map +1 -0
  312. package/package.json +49 -59
  313. package/styles/all.scss +3 -3
  314. package/styles/config.scss +1 -0
  315. package/styles/utils/colors.scss +4 -4
  316. package/styles/utils/theme.scss +0 -2
  317. package/.eslintrc +0 -19
  318. package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -84
  319. package/cjs/_virtual/index.js +0 -7
  320. package/cjs/_virtual/index2.js +0 -7
  321. package/cjs/_virtual/index3.js +0 -7
  322. package/cjs/_virtual/index4.js +0 -7
  323. package/cjs/_virtual/index5.js +0 -7
  324. package/cjs/_virtual/react-dom.development.js +0 -7
  325. package/cjs/_virtual/react-dom.production.js +0 -7
  326. package/cjs/_virtual/react-is.development.js +0 -7
  327. package/cjs/_virtual/react-is.development2.js +0 -7
  328. package/cjs/_virtual/react-is.production.min.js +0 -7
  329. package/cjs/_virtual/react-is.production.min2.js +0 -7
  330. package/cjs/_virtual/react.development.js +0 -7
  331. package/cjs/_virtual/react.production.js +0 -7
  332. package/cjs/components/data/Alert/Alert.js +0 -81
  333. package/cjs/components/data/Alert/Alert.styled.js +0 -72
  334. package/cjs/components/data/Alert/data/Alert/index.js +0 -9
  335. package/cjs/components/data/Badge/Badge.js +0 -93
  336. package/cjs/components/data/Badge/Badge.styled.js +0 -156
  337. package/cjs/components/data/Badge/data/Badge/index.js +0 -9
  338. package/cjs/components/data/Popover/Popover.js +0 -102
  339. package/cjs/components/data/Popover/Popover.styled.js +0 -159
  340. package/cjs/components/data/Popover/data/Popover/index.js +0 -9
  341. package/cjs/components/data/Tab/Tab.js +0 -31
  342. package/cjs/components/data/Tab/Tab.styled.js +0 -22
  343. package/cjs/components/data/Tab/data/Tab/index.js +0 -9
  344. package/cjs/components/data/Tabs/Tabs.js +0 -91
  345. package/cjs/components/data/Tabs/Tabs.styled.js +0 -97
  346. package/cjs/components/data/Tabs/data/Tabs/index.js +0 -9
  347. package/cjs/components/data/Tooltip/Tooltip.js +0 -50
  348. package/cjs/components/data/Tooltip/Tooltip.styled.js +0 -38
  349. package/cjs/components/data/Tooltip/data/Tooltip/index.js +0 -9
  350. package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.js +0 -42
  351. package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +0 -79
  352. package/cjs/components/data/data/index.js +0 -21
  353. package/cjs/components/inputs/ActionButton/ActionButton.js +0 -42
  354. package/cjs/components/inputs/ActionButton/ActionButton.styled.js +0 -66
  355. package/cjs/components/inputs/ActionButton/inputs/ActionButton/index.js +0 -9
  356. package/cjs/components/inputs/Button/Button.js +0 -188
  357. package/cjs/components/inputs/Button/Button.styled.js +0 -294
  358. package/cjs/components/inputs/Button/inputs/Button/index.js +0 -9
  359. package/cjs/components/inputs/Checkbox/Checkbox.js +0 -102
  360. package/cjs/components/inputs/Checkbox/Checkbox.styled.js +0 -145
  361. package/cjs/components/inputs/Checkbox/inputs/Checkbox/index.js +0 -9
  362. package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +0 -268
  363. package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +0 -352
  364. package/cjs/components/inputs/CompactAutocompleteSelect/inputs/CompactAutocompleteSelect/index.js +0 -9
  365. package/cjs/components/inputs/CompactStarRating/CompactStarRating.js +0 -178
  366. package/cjs/components/inputs/CompactStarRating/CompactStarRating.styled.js +0 -258
  367. package/cjs/components/inputs/CompactStarRating/inputs/CompactStarRating/index.js +0 -9
  368. package/cjs/components/inputs/CompactTextInput/CompactTextInput.js +0 -187
  369. package/cjs/components/inputs/CompactTextInput/CompactTextInput.styled.js +0 -352
  370. package/cjs/components/inputs/CompactTextInput/inputs/CompactTextInput/index.js +0 -9
  371. package/cjs/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +0 -253
  372. package/cjs/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +0 -89
  373. package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +0 -185
  374. package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +0 -122
  375. package/cjs/components/inputs/MultiSelect/MultiSelect.js +0 -251
  376. package/cjs/components/inputs/MultiSelect/MultiSelect.styled.js +0 -279
  377. package/cjs/components/inputs/MultiSelect/inputs/MultiSelect/index.js +0 -9
  378. package/cjs/components/inputs/Radio/Radio.js +0 -67
  379. package/cjs/components/inputs/Radio/Radio.styled.js +0 -93
  380. package/cjs/components/inputs/Radio/inputs/Radio/index.js +0 -9
  381. package/cjs/components/inputs/Switch/Switch.js +0 -69
  382. package/cjs/components/inputs/Switch/Switch.styled.js +0 -123
  383. package/cjs/components/inputs/Switch/inputs/Switch/index.js +0 -9
  384. package/cjs/components/inputs/TextArea/TextArea.js +0 -186
  385. package/cjs/components/inputs/TextArea/TextArea.styled.js +0 -455
  386. package/cjs/components/inputs/TextArea/inputs/TextArea/index.js +0 -9
  387. package/cjs/components/inputs/TextInput/TextInput.js +0 -147
  388. package/cjs/components/inputs/TextInput/TextInput.styled.js +0 -276
  389. package/cjs/components/inputs/TextInput/inputs/TextInput/index.js +0 -9
  390. package/cjs/components/inputs/inputs/index.js +0 -33
  391. package/cjs/components/layout/InputGroup/InputGroup.js +0 -26
  392. package/cjs/components/layout/InputGroup/InputGroup.styled.js +0 -18
  393. package/cjs/components/layout/InputGroup/layout/InputGroup/index.js +0 -9
  394. package/cjs/components/layout/SectionSeparator/SectionSeparator.js +0 -29
  395. package/cjs/components/layout/SectionSeparator/SectionSeparator.styled.js +0 -21
  396. package/cjs/components/layout/SectionSeparator/layout/SectionSeparator/index.js +0 -9
  397. package/cjs/components/layout/layout/index.js +0 -11
  398. package/cjs/components/widgets/AssetAction/AssetAction.js +0 -106
  399. package/cjs/components/widgets/AssetAction/AssetAction.styled.js +0 -58
  400. package/cjs/components/widgets/AssetActionsBase/AssetActionsBase.js +0 -35
  401. package/cjs/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +0 -24
  402. package/cjs/components/widgets/AssetGallery/AssetGallery.js +0 -102
  403. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +0 -392
  404. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +0 -43
  405. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +0 -402
  406. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +0 -338
  407. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +0 -396
  408. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +0 -328
  409. package/cjs/components/widgets/AssetGallery/asset.propType.js +0 -58
  410. package/cjs/components/widgets/AssetGallery/widgets/AssetGallery/index.js +0 -9
  411. package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +0 -50
  412. package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +0 -96
  413. package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/widgets/AssetPreview/AssetPreviewTopBar/index.js +0 -9
  414. package/cjs/components/widgets/ContextMenu/ContextMenu.js +0 -28
  415. package/cjs/components/widgets/ContextMenu/ContextMenu.styled.js +0 -19
  416. package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +0 -50
  417. package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +0 -93
  418. package/cjs/components/widgets/ContextMenu/ContextMenuItem/widgets/ContextMenu/ContextMenuItem/index.js +0 -9
  419. package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +0 -28
  420. package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +0 -30
  421. package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/widgets/ContextMenu/ContextMenuItemsGroup/index.js +0 -9
  422. package/cjs/components/widgets/ContextMenu/widgets/ContextMenu/index.js +0 -9
  423. package/cjs/components/widgets/InfoCard/InfoCard.js +0 -39
  424. package/cjs/components/widgets/InfoCard/InfoCard.styled.js +0 -110
  425. package/cjs/components/widgets/InfoCard/widgets/InfoCard/index.js +0 -9
  426. package/cjs/components/widgets/Instructions/Instructions.js +0 -217
  427. package/cjs/components/widgets/Instructions/Instructions.styled.js +0 -47
  428. package/cjs/components/widgets/Instructions/widgets/Instructions/index.js +0 -9
  429. package/cjs/components/widgets/ProgressBar/ProgressBar.js +0 -58
  430. package/cjs/components/widgets/ProgressBar/ProgressBar.styled.js +0 -154
  431. package/cjs/components/widgets/ProgressBar/widgets/ProgressBar/index.js +0 -9
  432. package/cjs/components/widgets/SummaryCard/SummaryCard.js +0 -92
  433. package/cjs/components/widgets/SummaryCard/SummaryCard.styled.js +0 -142
  434. package/cjs/components/widgets/widgets/index.js +0 -25
  435. package/cjs/hooks/useEventListner.js +0 -26
  436. package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -11
  437. package/cjs/hooks/useOnClickOutside.js +0 -17
  438. package/cjs/icons/arrow-back.svg.js +0 -20
  439. package/cjs/icons/arrow-forward.svg.js +0 -20
  440. package/cjs/icons/check-rectangle-filled.svg.js +0 -20
  441. package/cjs/icons/close.svg.js +0 -20
  442. package/cjs/icons/edit-note.svg.js +0 -20
  443. package/cjs/icons/expand-more.svg.js +0 -20
  444. package/cjs/icons/headset.svg.js +0 -20
  445. package/cjs/icons/layers.svg.js +0 -20
  446. package/cjs/icons/link.svg.js +0 -20
  447. package/cjs/icons/play.svg.js +0 -20
  448. package/cjs/icons/search.svg.js +0 -20
  449. package/cjs/icons/star-filled.svg.js +0 -20
  450. package/cjs/icons/star.svg.js +0 -20
  451. package/cjs/icons/triangle-right.svg.js +0 -20
  452. package/cjs/icons/verification.svg.js +0 -20
  453. package/cjs/icons/warning-circle.svg.js +0 -20
  454. package/cjs/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -11
  455. package/cjs/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -9
  456. package/cjs/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -11
  457. package/cjs/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -10
  458. package/cjs/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -9
  459. package/cjs/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -19
  460. package/cjs/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -22
  461. package/cjs/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -16
  462. package/cjs/node_modules/@babel/runtime/helpers/esm/extends.js +0 -15
  463. package/cjs/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -11
  464. package/cjs/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -20
  465. package/cjs/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -14
  466. package/cjs/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -9
  467. package/cjs/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -33
  468. package/cjs/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -9
  469. package/cjs/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -9
  470. package/cjs/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -29
  471. package/cjs/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -19
  472. package/cjs/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -15
  473. package/cjs/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -14
  474. package/cjs/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -11
  475. package/cjs/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -14
  476. package/cjs/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -13
  477. package/cjs/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -14
  478. package/cjs/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -18
  479. package/cjs/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -13
  480. package/cjs/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -15
  481. package/cjs/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -15
  482. package/cjs/node_modules/@emotion/cache/dist/emotion-cache.esm.js +0 -503
  483. package/cjs/node_modules/@emotion/hash/dist/emotion-hash.esm.js +0 -59
  484. package/cjs/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +0 -13
  485. package/cjs/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js +0 -158
  486. package/cjs/node_modules/@emotion/react/dist/emotion-react.esm.js +0 -66
  487. package/cjs/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +0 -240
  488. package/cjs/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js +0 -144
  489. package/cjs/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +0 -56
  490. package/cjs/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js +0 -16
  491. package/cjs/node_modules/@emotion/utils/dist/emotion-utils.esm.js +0 -60
  492. package/cjs/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +0 -20
  493. package/cjs/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +0 -907
  494. package/cjs/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +0 -374
  495. package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +0 -128
  496. package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +0 -165
  497. package/cjs/node_modules/@restart/hooks/esm/useMergedRefs.js +0 -46
  498. package/cjs/node_modules/@restart/hooks/esm/useUpdateEffect.js +0 -41
  499. package/cjs/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +0 -24
  500. package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +0 -186
  501. package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +0 -22
  502. package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +0 -13
  503. package/cjs/node_modules/memoize-one/dist/memoize-one.esm.js +0 -55
  504. package/cjs/node_modules/object-assign/index.js +0 -94
  505. package/cjs/node_modules/prop-types/checkPropTypes.js +0 -110
  506. package/cjs/node_modules/prop-types/factoryWithThrowingShims.js +0 -69
  507. package/cjs/node_modules/prop-types/factoryWithTypeCheckers.js +0 -621
  508. package/cjs/node_modules/prop-types/index.js +0 -33
  509. package/cjs/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -16
  510. package/cjs/node_modules/prop-types/lib/has.js +0 -7
  511. package/cjs/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -186
  512. package/cjs/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -22
  513. package/cjs/node_modules/prop-types/node_modules/react-is/index.js +0 -13
  514. package/cjs/node_modules/react/cjs/react.development.js +0 -1246
  515. package/cjs/node_modules/react/cjs/react.production.js +0 -552
  516. package/cjs/node_modules/react/index.js +0 -19
  517. package/cjs/node_modules/react-dom/cjs/react-dom.development.js +0 -432
  518. package/cjs/node_modules/react-dom/cjs/react-dom.production.js +0 -218
  519. package/cjs/node_modules/react-dom/index.js +0 -44
  520. package/cjs/node_modules/react-lazy-load-image-component/src/effects/opacity.css.js +0 -6
  521. package/cjs/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +0 -23
  522. package/cjs/node_modules/react-select/dist/Select-aab027f3.esm.js +0 -2653
  523. package/cjs/node_modules/react-select/dist/index-641ee5b8.esm.js +0 -1426
  524. package/cjs/node_modules/react-select/dist/useCreatable-84008237.esm.js +0 -101
  525. package/cjs/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js +0 -78
  526. package/cjs/node_modules/style-inject/dist/style-inject.es.js +0 -32
  527. package/cjs/node_modules/stylis/src/Enum.js +0 -24
  528. package/cjs/node_modules/stylis/src/Middleware.js +0 -37
  529. package/cjs/node_modules/stylis/src/Parser.js +0 -201
  530. package/cjs/node_modules/stylis/src/Serializer.js +0 -43
  531. package/cjs/node_modules/stylis/src/Tokenizer.js +0 -243
  532. package/cjs/node_modules/stylis/src/Utility.js +0 -134
  533. package/cjs/node_modules/tippy.js/animations/shift-away-subtle.css.js +0 -6
  534. package/cjs/node_modules/tippy.js/dist/tippy.css.js +0 -6
  535. package/cjs/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js +0 -12
  536. package/cjs/ssr/ssr/index.js +0 -12
  537. package/cjs/styles/utils/colors.scss.js +0 -11
  538. package/cjs/utils/dateTime.js +0 -20
  539. package/cjs/utils/defaultTheme.js +0 -52
  540. package/doctor-storybook.log +0 -20
  541. package/esm/_virtual/_rollupPluginBabelHelpers.js +0 -74
  542. package/esm/_virtual/index.js +0 -3
  543. package/esm/_virtual/index2.js +0 -3
  544. package/esm/_virtual/index3.js +0 -3
  545. package/esm/_virtual/index4.js +0 -3
  546. package/esm/_virtual/index5.js +0 -3
  547. package/esm/_virtual/react-dom.development.js +0 -3
  548. package/esm/_virtual/react-dom.production.js +0 -3
  549. package/esm/_virtual/react-is.development.js +0 -3
  550. package/esm/_virtual/react-is.development2.js +0 -3
  551. package/esm/_virtual/react-is.production.min.js +0 -3
  552. package/esm/_virtual/react-is.production.min2.js +0 -3
  553. package/esm/_virtual/react.development.js +0 -3
  554. package/esm/_virtual/react.production.js +0 -3
  555. package/esm/components/data/Alert/Alert.styled.js +0 -63
  556. package/esm/components/data/Alert/data/Alert/index.js +0 -1
  557. package/esm/components/data/Badge/Badge.styled.js +0 -145
  558. package/esm/components/data/Badge/data/Badge/index.js +0 -1
  559. package/esm/components/data/Popover/data/Popover/index.js +0 -1
  560. package/esm/components/data/Tab/Tab.js +0 -27
  561. package/esm/components/data/Tab/Tab.styled.js +0 -14
  562. package/esm/components/data/Tab/data/Tab/index.js +0 -1
  563. package/esm/components/data/Tabs/Tabs.js +0 -87
  564. package/esm/components/data/Tabs/Tabs.styled.js +0 -85
  565. package/esm/components/data/Tabs/data/Tabs/index.js +0 -1
  566. package/esm/components/data/Tooltip/Tooltip.styled.js +0 -29
  567. package/esm/components/data/Tooltip/data/Tooltip/index.js +0 -1
  568. package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.js +0 -38
  569. package/esm/components/data/data/index.js +0 -7
  570. package/esm/components/inputs/ActionButton/ActionButton.js +0 -38
  571. package/esm/components/inputs/ActionButton/ActionButton.styled.js +0 -58
  572. package/esm/components/inputs/ActionButton/inputs/ActionButton/index.js +0 -1
  573. package/esm/components/inputs/Button/Button.styled.js +0 -277
  574. package/esm/components/inputs/Button/inputs/Button/index.js +0 -1
  575. package/esm/components/inputs/Checkbox/Checkbox.styled.js +0 -132
  576. package/esm/components/inputs/Checkbox/inputs/Checkbox/index.js +0 -1
  577. package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +0 -324
  578. package/esm/components/inputs/CompactAutocompleteSelect/inputs/CompactAutocompleteSelect/index.js +0 -1
  579. package/esm/components/inputs/CompactStarRating/CompactStarRating.styled.js +0 -245
  580. package/esm/components/inputs/CompactStarRating/inputs/CompactStarRating/index.js +0 -1
  581. package/esm/components/inputs/CompactTextInput/CompactTextInput.styled.js +0 -335
  582. package/esm/components/inputs/CompactTextInput/inputs/CompactTextInput/index.js +0 -1
  583. package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +0 -104
  584. package/esm/components/inputs/MultiSelect/MultiSelect.styled.js +0 -251
  585. package/esm/components/inputs/MultiSelect/inputs/MultiSelect/index.js +0 -1
  586. package/esm/components/inputs/Radio/Radio.js +0 -63
  587. package/esm/components/inputs/Radio/inputs/Radio/index.js +0 -1
  588. package/esm/components/inputs/Switch/Switch.styled.js +0 -110
  589. package/esm/components/inputs/Switch/inputs/Switch/index.js +0 -1
  590. package/esm/components/inputs/TextArea/TextArea.styled.js +0 -437
  591. package/esm/components/inputs/TextArea/inputs/TextArea/index.js +0 -1
  592. package/esm/components/inputs/TextInput/TextInput.js +0 -143
  593. package/esm/components/inputs/TextInput/TextInput.styled.js +0 -261
  594. package/esm/components/inputs/TextInput/inputs/TextInput/index.js +0 -1
  595. package/esm/components/inputs/inputs/index.js +0 -13
  596. package/esm/components/layout/InputGroup/InputGroup.js +0 -22
  597. package/esm/components/layout/InputGroup/InputGroup.styled.js +0 -10
  598. package/esm/components/layout/InputGroup/layout/InputGroup/index.js +0 -1
  599. package/esm/components/layout/SectionSeparator/SectionSeparator.js +0 -25
  600. package/esm/components/layout/SectionSeparator/SectionSeparator.styled.js +0 -13
  601. package/esm/components/layout/SectionSeparator/layout/SectionSeparator/index.js +0 -1
  602. package/esm/components/layout/layout/index.js +0 -2
  603. package/esm/components/widgets/AssetAction/AssetAction.styled.js +0 -46
  604. package/esm/components/widgets/AssetActionsBase/AssetActionsBase.js +0 -31
  605. package/esm/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +0 -16
  606. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +0 -33
  607. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +0 -311
  608. package/esm/components/widgets/AssetGallery/widgets/AssetGallery/index.js +0 -1
  609. package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +0 -46
  610. package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +0 -84
  611. package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/widgets/AssetPreview/AssetPreviewTopBar/index.js +0 -1
  612. package/esm/components/widgets/ContextMenu/ContextMenu.js +0 -24
  613. package/esm/components/widgets/ContextMenu/ContextMenu.styled.js +0 -11
  614. package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +0 -46
  615. package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +0 -83
  616. package/esm/components/widgets/ContextMenu/ContextMenuItem/widgets/ContextMenu/ContextMenuItem/index.js +0 -1
  617. package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +0 -24
  618. package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/widgets/ContextMenu/ContextMenuItemsGroup/index.js +0 -1
  619. package/esm/components/widgets/ContextMenu/widgets/ContextMenu/index.js +0 -1
  620. package/esm/components/widgets/InfoCard/InfoCard.js +0 -35
  621. package/esm/components/widgets/InfoCard/InfoCard.styled.js +0 -94
  622. package/esm/components/widgets/InfoCard/widgets/InfoCard/index.js +0 -1
  623. package/esm/components/widgets/Instructions/Instructions.styled.js +0 -36
  624. package/esm/components/widgets/Instructions/widgets/Instructions/index.js +0 -1
  625. package/esm/components/widgets/ProgressBar/ProgressBar.js +0 -54
  626. package/esm/components/widgets/ProgressBar/ProgressBar.styled.js +0 -137
  627. package/esm/components/widgets/ProgressBar/widgets/ProgressBar/index.js +0 -1
  628. package/esm/components/widgets/SummaryCard/SummaryCard.js +0 -88
  629. package/esm/components/widgets/SummaryCard/SummaryCard.styled.js +0 -124
  630. package/esm/components/widgets/widgets/index.js +0 -9
  631. package/esm/hooks/useIsomorphicLayoutEffect.js +0 -7
  632. package/esm/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -7
  633. package/esm/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -5
  634. package/esm/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -7
  635. package/esm/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -6
  636. package/esm/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -5
  637. package/esm/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -15
  638. package/esm/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -18
  639. package/esm/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -12
  640. package/esm/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -7
  641. package/esm/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -16
  642. package/esm/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -10
  643. package/esm/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -5
  644. package/esm/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -29
  645. package/esm/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -5
  646. package/esm/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -5
  647. package/esm/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -25
  648. package/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -15
  649. package/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -11
  650. package/esm/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -10
  651. package/esm/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -7
  652. package/esm/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -10
  653. package/esm/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -9
  654. package/esm/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -10
  655. package/esm/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -14
  656. package/esm/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -9
  657. package/esm/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -11
  658. package/esm/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -11
  659. package/esm/node_modules/@emotion/cache/dist/emotion-cache.esm.js +0 -499
  660. package/esm/node_modules/@emotion/hash/dist/emotion-hash.esm.js +0 -55
  661. package/esm/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +0 -9
  662. package/esm/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js +0 -149
  663. package/esm/node_modules/@emotion/react/dist/emotion-react.esm.js +0 -56
  664. package/esm/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +0 -236
  665. package/esm/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js +0 -140
  666. package/esm/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +0 -52
  667. package/esm/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js +0 -12
  668. package/esm/node_modules/@emotion/utils/dist/emotion-utils.esm.js +0 -54
  669. package/esm/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +0 -16
  670. package/esm/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +0 -894
  671. package/esm/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +0 -370
  672. package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +0 -110
  673. package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +0 -138
  674. package/esm/node_modules/@restart/hooks/esm/useMergedRefs.js +0 -41
  675. package/esm/node_modules/@restart/hooks/esm/useUpdateEffect.js +0 -37
  676. package/esm/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +0 -22
  677. package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +0 -181
  678. package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +0 -17
  679. package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +0 -11
  680. package/esm/node_modules/memoize-one/dist/memoize-one.esm.js +0 -51
  681. package/esm/node_modules/object-assign/index.js +0 -90
  682. package/esm/node_modules/prop-types/checkPropTypes.js +0 -106
  683. package/esm/node_modules/prop-types/factoryWithThrowingShims.js +0 -65
  684. package/esm/node_modules/prop-types/factoryWithTypeCheckers.js +0 -617
  685. package/esm/node_modules/prop-types/index.js +0 -29
  686. package/esm/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -12
  687. package/esm/node_modules/prop-types/lib/has.js +0 -3
  688. package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -181
  689. package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -17
  690. package/esm/node_modules/prop-types/node_modules/react-is/index.js +0 -11
  691. package/esm/node_modules/react/cjs/react.development.js +0 -1244
  692. package/esm/node_modules/react/cjs/react.production.js +0 -547
  693. package/esm/node_modules/react/index.js +0 -15
  694. package/esm/node_modules/react-dom/cjs/react-dom.development.js +0 -427
  695. package/esm/node_modules/react-dom/cjs/react-dom.production.js +0 -213
  696. package/esm/node_modules/react-dom/index.js +0 -42
  697. package/esm/node_modules/react-lazy-load-image-component/src/effects/opacity.css.js +0 -4
  698. package/esm/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +0 -19
  699. package/esm/node_modules/react-select/dist/Select-aab027f3.esm.js +0 -2644
  700. package/esm/node_modules/react-select/dist/index-641ee5b8.esm.js +0 -1385
  701. package/esm/node_modules/react-select/dist/useCreatable-84008237.esm.js +0 -97
  702. package/esm/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js +0 -74
  703. package/esm/node_modules/style-inject/dist/style-inject.es.js +0 -28
  704. package/esm/node_modules/stylis/src/Enum.js +0 -12
  705. package/esm/node_modules/stylis/src/Middleware.js +0 -32
  706. package/esm/node_modules/stylis/src/Parser.js +0 -193
  707. package/esm/node_modules/stylis/src/Serializer.js +0 -38
  708. package/esm/node_modules/stylis/src/Tokenizer.js +0 -223
  709. package/esm/node_modules/stylis/src/Utility.js +0 -117
  710. package/esm/node_modules/tippy.js/animations/shift-away-subtle.css.js +0 -4
  711. package/esm/node_modules/tippy.js/dist/tippy.css.js +0 -4
  712. package/esm/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js +0 -8
  713. package/esm/styles/utils/colors.scss.js +0 -7
  714. package/esm/utils/defaultTheme.js +0 -47
  715. package/migration-storybook.log +0 -392
@@ -1,2644 +0,0 @@
1
- import _extends from '../../@babel/runtime/helpers/esm/extends.js';
2
- import _objectSpread2 from '../../@babel/runtime/helpers/esm/objectSpread2.js';
3
- import _classCallCheck from '../../@babel/runtime/helpers/esm/classCallCheck.js';
4
- import _createClass from '../../@babel/runtime/helpers/esm/createClass.js';
5
- import _inherits from '../../@babel/runtime/helpers/esm/inherits.js';
6
- import _createSuper from '../../@babel/runtime/helpers/esm/createSuper.js';
7
- import _toConsumableArray from '../../@babel/runtime/helpers/esm/toConsumableArray.js';
8
- import '../../react/index.js';
9
- import { z as isTouchCapable, A as isMobileDevice, B as multiValueAsValue, C as singleValueAsValue, D as valueTernary, E as classNames, F as defaultComponents, G as isDocumentElement, H as cleanValue, I as scrollIntoView, J as noop, M as MenuPlacer, r as removeProps, a as clearIndicatorCSS, b as containerCSS, d as css$1, e as dropdownIndicatorCSS, g as groupCSS, f as groupHeadingCSS, i as indicatorsContainerCSS, h as indicatorSeparatorCSS, j as inputCSS, l as loadingIndicatorCSS, k as loadingMessageCSS, m as menuCSS, n as menuListCSS, o as menuPortalCSS, p as multiValueCSS, q as multiValueLabelCSS, t as multiValueRemoveCSS, u as noOptionsMessageCSS, v as optionCSS, w as placeholderCSS, x as css$2, y as valueContainerCSS, K as notNullish, s as supportsPassiveEvents } from './index-641ee5b8.esm.js';
10
- import { createElement as jsx, css } from '../../@emotion/react/dist/emotion-react.esm.js';
11
- import memoizeOne from '../../memoize-one/dist/memoize-one.esm.js';
12
- import _objectWithoutProperties from '../../@babel/runtime/helpers/esm/objectWithoutProperties.js';
13
- import { r as react } from '../../../_virtual/index.js';
14
-
15
- function _EMOTION_STRINGIFIED_CSS_ERROR__$2() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
16
-
17
- // Assistive text to describe visual elements. Hidden for sighted users.
18
- var _ref = process.env.NODE_ENV === "production" ? {
19
- name: "7pg0cj-a11yText",
20
- styles: "label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"
21
- } : {
22
- name: "1f43avz-a11yText-A11yText",
23
- styles: "label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",
24
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",
25
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
26
- };
27
- var A11yText = function A11yText(props) {
28
- return jsx("span", _extends({
29
- css: _ref
30
- }, props));
31
- };
32
- var A11yText$1 = A11yText;
33
-
34
- var defaultAriaLiveMessages = {
35
- guidance: function guidance(props) {
36
- var isSearchable = props.isSearchable,
37
- isMulti = props.isMulti,
38
- tabSelectsValue = props.tabSelectsValue,
39
- context = props.context,
40
- isInitialFocus = props.isInitialFocus;
41
- switch (context) {
42
- case 'menu':
43
- return "Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(tabSelectsValue ? ', press Tab to select the option and exit the menu' : '', ".");
44
- case 'input':
45
- return isInitialFocus ? "".concat(props['aria-label'] || 'Select', " is focused ").concat(isSearchable ? ',type to refine list' : '', ", press Down to open the menu, ").concat(isMulti ? ' press left to focus selected values' : '') : '';
46
- case 'value':
47
- return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value';
48
- default:
49
- return '';
50
- }
51
- },
52
- onChange: function onChange(props) {
53
- var action = props.action,
54
- _props$label = props.label,
55
- label = _props$label === void 0 ? '' : _props$label,
56
- labels = props.labels,
57
- isDisabled = props.isDisabled;
58
- switch (action) {
59
- case 'deselect-option':
60
- case 'pop-value':
61
- case 'remove-value':
62
- return "option ".concat(label, ", deselected.");
63
- case 'clear':
64
- return 'All selected options have been cleared.';
65
- case 'initial-input-focus':
66
- return "option".concat(labels.length > 1 ? 's' : '', " ").concat(labels.join(','), ", selected.");
67
- case 'select-option':
68
- return isDisabled ? "option ".concat(label, " is disabled. Select another option.") : "option ".concat(label, ", selected.");
69
- default:
70
- return '';
71
- }
72
- },
73
- onFocus: function onFocus(props) {
74
- var context = props.context,
75
- focused = props.focused,
76
- options = props.options,
77
- _props$label2 = props.label,
78
- label = _props$label2 === void 0 ? '' : _props$label2,
79
- selectValue = props.selectValue,
80
- isDisabled = props.isDisabled,
81
- isSelected = props.isSelected,
82
- isAppleDevice = props.isAppleDevice;
83
- var getArrayIndex = function getArrayIndex(arr, item) {
84
- return arr && arr.length ? "".concat(arr.indexOf(item) + 1, " of ").concat(arr.length) : '';
85
- };
86
- if (context === 'value' && selectValue) {
87
- return "value ".concat(label, " focused, ").concat(getArrayIndex(selectValue, focused), ".");
88
- }
89
- if (context === 'menu' && isAppleDevice) {
90
- var disabled = isDisabled ? ' disabled' : '';
91
- var status = "".concat(isSelected ? ' selected' : '').concat(disabled);
92
- return "".concat(label).concat(status, ", ").concat(getArrayIndex(options, focused), ".");
93
- }
94
- return '';
95
- },
96
- onFilter: function onFilter(props) {
97
- var inputValue = props.inputValue,
98
- resultsMessage = props.resultsMessage;
99
- return "".concat(resultsMessage).concat(inputValue ? ' for search term ' + inputValue : '', ".");
100
- }
101
- };
102
-
103
- var LiveRegion = function LiveRegion(props) {
104
- var ariaSelection = props.ariaSelection,
105
- focusedOption = props.focusedOption,
106
- focusedValue = props.focusedValue,
107
- focusableOptions = props.focusableOptions,
108
- isFocused = props.isFocused,
109
- selectValue = props.selectValue,
110
- selectProps = props.selectProps,
111
- id = props.id,
112
- isAppleDevice = props.isAppleDevice;
113
- var ariaLiveMessages = selectProps.ariaLiveMessages,
114
- getOptionLabel = selectProps.getOptionLabel,
115
- inputValue = selectProps.inputValue,
116
- isMulti = selectProps.isMulti,
117
- isOptionDisabled = selectProps.isOptionDisabled,
118
- isSearchable = selectProps.isSearchable,
119
- menuIsOpen = selectProps.menuIsOpen,
120
- options = selectProps.options,
121
- screenReaderStatus = selectProps.screenReaderStatus,
122
- tabSelectsValue = selectProps.tabSelectsValue,
123
- isLoading = selectProps.isLoading;
124
- var ariaLabel = selectProps['aria-label'];
125
- var ariaLive = selectProps['aria-live'];
126
-
127
- // Update aria live message configuration when prop changes
128
- var messages = react.exports.useMemo(function () {
129
- return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});
130
- }, [ariaLiveMessages]);
131
-
132
- // Update aria live selected option when prop changes
133
- var ariaSelected = react.exports.useMemo(function () {
134
- var message = '';
135
- if (ariaSelection && messages.onChange) {
136
- var option = ariaSelection.option,
137
- selectedOptions = ariaSelection.options,
138
- removedValue = ariaSelection.removedValue,
139
- removedValues = ariaSelection.removedValues,
140
- value = ariaSelection.value;
141
- // select-option when !isMulti does not return option so we assume selected option is value
142
- var asOption = function asOption(val) {
143
- return !Array.isArray(val) ? val : null;
144
- };
145
-
146
- // If there is just one item from the action then get its label
147
- var selected = removedValue || option || asOption(value);
148
- var label = selected ? getOptionLabel(selected) : '';
149
-
150
- // If there are multiple items from the action then return an array of labels
151
- var multiSelected = selectedOptions || removedValues || undefined;
152
- var labels = multiSelected ? multiSelected.map(getOptionLabel) : [];
153
- var onChangeProps = _objectSpread2({
154
- // multiSelected items are usually items that have already been selected
155
- // or set by the user as a default value so we assume they are not disabled
156
- isDisabled: selected && isOptionDisabled(selected, selectValue),
157
- label: label,
158
- labels: labels
159
- }, ariaSelection);
160
- message = messages.onChange(onChangeProps);
161
- }
162
- return message;
163
- }, [ariaSelection, messages, isOptionDisabled, selectValue, getOptionLabel]);
164
- var ariaFocused = react.exports.useMemo(function () {
165
- var focusMsg = '';
166
- var focused = focusedOption || focusedValue;
167
- var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));
168
- if (focused && messages.onFocus) {
169
- var onFocusProps = {
170
- focused: focused,
171
- label: getOptionLabel(focused),
172
- isDisabled: isOptionDisabled(focused, selectValue),
173
- isSelected: isSelected,
174
- options: focusableOptions,
175
- context: focused === focusedOption ? 'menu' : 'value',
176
- selectValue: selectValue,
177
- isAppleDevice: isAppleDevice
178
- };
179
- focusMsg = messages.onFocus(onFocusProps);
180
- }
181
- return focusMsg;
182
- }, [focusedOption, focusedValue, getOptionLabel, isOptionDisabled, messages, focusableOptions, selectValue, isAppleDevice]);
183
- var ariaResults = react.exports.useMemo(function () {
184
- var resultsMsg = '';
185
- if (menuIsOpen && options.length && !isLoading && messages.onFilter) {
186
- var resultsMessage = screenReaderStatus({
187
- count: focusableOptions.length
188
- });
189
- resultsMsg = messages.onFilter({
190
- inputValue: inputValue,
191
- resultsMessage: resultsMessage
192
- });
193
- }
194
- return resultsMsg;
195
- }, [focusableOptions, inputValue, menuIsOpen, messages, options, screenReaderStatus, isLoading]);
196
- var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === 'initial-input-focus';
197
- var ariaGuidance = react.exports.useMemo(function () {
198
- var guidanceMsg = '';
199
- if (messages.guidance) {
200
- var context = focusedValue ? 'value' : menuIsOpen ? 'menu' : 'input';
201
- guidanceMsg = messages.guidance({
202
- 'aria-label': ariaLabel,
203
- context: context,
204
- isDisabled: focusedOption && isOptionDisabled(focusedOption, selectValue),
205
- isMulti: isMulti,
206
- isSearchable: isSearchable,
207
- tabSelectsValue: tabSelectsValue,
208
- isInitialFocus: isInitialFocus
209
- });
210
- }
211
- return guidanceMsg;
212
- }, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
213
- var ScreenReaderText = jsx(react.exports.Fragment, null, jsx("span", {
214
- id: "aria-selection"
215
- }, ariaSelected), jsx("span", {
216
- id: "aria-focused"
217
- }, ariaFocused), jsx("span", {
218
- id: "aria-results"
219
- }, ariaResults), jsx("span", {
220
- id: "aria-guidance"
221
- }, ariaGuidance));
222
- return jsx(react.exports.Fragment, null, jsx(A11yText$1, {
223
- id: id
224
- }, isInitialFocus && ScreenReaderText), jsx(A11yText$1, {
225
- "aria-live": ariaLive,
226
- "aria-atomic": "false",
227
- "aria-relevant": "additions text",
228
- role: "log"
229
- }, isFocused && !isInitialFocus && ScreenReaderText));
230
- };
231
- var LiveRegion$1 = LiveRegion;
232
-
233
- var diacritics = [{
234
- base: 'A',
235
- letters: "A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"
236
- }, {
237
- base: 'AA',
238
- letters: "\uA732"
239
- }, {
240
- base: 'AE',
241
- letters: "\xC6\u01FC\u01E2"
242
- }, {
243
- base: 'AO',
244
- letters: "\uA734"
245
- }, {
246
- base: 'AU',
247
- letters: "\uA736"
248
- }, {
249
- base: 'AV',
250
- letters: "\uA738\uA73A"
251
- }, {
252
- base: 'AY',
253
- letters: "\uA73C"
254
- }, {
255
- base: 'B',
256
- letters: "B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"
257
- }, {
258
- base: 'C',
259
- letters: "C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"
260
- }, {
261
- base: 'D',
262
- letters: "D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"
263
- }, {
264
- base: 'DZ',
265
- letters: "\u01F1\u01C4"
266
- }, {
267
- base: 'Dz',
268
- letters: "\u01F2\u01C5"
269
- }, {
270
- base: 'E',
271
- letters: "E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"
272
- }, {
273
- base: 'F',
274
- letters: "F\u24BB\uFF26\u1E1E\u0191\uA77B"
275
- }, {
276
- base: 'G',
277
- letters: "G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"
278
- }, {
279
- base: 'H',
280
- letters: "H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"
281
- }, {
282
- base: 'I',
283
- letters: "I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"
284
- }, {
285
- base: 'J',
286
- letters: "J\u24BF\uFF2A\u0134\u0248"
287
- }, {
288
- base: 'K',
289
- letters: "K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"
290
- }, {
291
- base: 'L',
292
- letters: "L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"
293
- }, {
294
- base: 'LJ',
295
- letters: "\u01C7"
296
- }, {
297
- base: 'Lj',
298
- letters: "\u01C8"
299
- }, {
300
- base: 'M',
301
- letters: "M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"
302
- }, {
303
- base: 'N',
304
- letters: "N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"
305
- }, {
306
- base: 'NJ',
307
- letters: "\u01CA"
308
- }, {
309
- base: 'Nj',
310
- letters: "\u01CB"
311
- }, {
312
- base: 'O',
313
- letters: "O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"
314
- }, {
315
- base: 'OI',
316
- letters: "\u01A2"
317
- }, {
318
- base: 'OO',
319
- letters: "\uA74E"
320
- }, {
321
- base: 'OU',
322
- letters: "\u0222"
323
- }, {
324
- base: 'P',
325
- letters: "P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"
326
- }, {
327
- base: 'Q',
328
- letters: "Q\u24C6\uFF31\uA756\uA758\u024A"
329
- }, {
330
- base: 'R',
331
- letters: "R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"
332
- }, {
333
- base: 'S',
334
- letters: "S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"
335
- }, {
336
- base: 'T',
337
- letters: "T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"
338
- }, {
339
- base: 'TZ',
340
- letters: "\uA728"
341
- }, {
342
- base: 'U',
343
- letters: "U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"
344
- }, {
345
- base: 'V',
346
- letters: "V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"
347
- }, {
348
- base: 'VY',
349
- letters: "\uA760"
350
- }, {
351
- base: 'W',
352
- letters: "W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"
353
- }, {
354
- base: 'X',
355
- letters: "X\u24CD\uFF38\u1E8A\u1E8C"
356
- }, {
357
- base: 'Y',
358
- letters: "Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"
359
- }, {
360
- base: 'Z',
361
- letters: "Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"
362
- }, {
363
- base: 'a',
364
- letters: "a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"
365
- }, {
366
- base: 'aa',
367
- letters: "\uA733"
368
- }, {
369
- base: 'ae',
370
- letters: "\xE6\u01FD\u01E3"
371
- }, {
372
- base: 'ao',
373
- letters: "\uA735"
374
- }, {
375
- base: 'au',
376
- letters: "\uA737"
377
- }, {
378
- base: 'av',
379
- letters: "\uA739\uA73B"
380
- }, {
381
- base: 'ay',
382
- letters: "\uA73D"
383
- }, {
384
- base: 'b',
385
- letters: "b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"
386
- }, {
387
- base: 'c',
388
- letters: "c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"
389
- }, {
390
- base: 'd',
391
- letters: "d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"
392
- }, {
393
- base: 'dz',
394
- letters: "\u01F3\u01C6"
395
- }, {
396
- base: 'e',
397
- letters: "e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"
398
- }, {
399
- base: 'f',
400
- letters: "f\u24D5\uFF46\u1E1F\u0192\uA77C"
401
- }, {
402
- base: 'g',
403
- letters: "g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"
404
- }, {
405
- base: 'h',
406
- letters: "h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"
407
- }, {
408
- base: 'hv',
409
- letters: "\u0195"
410
- }, {
411
- base: 'i',
412
- letters: "i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"
413
- }, {
414
- base: 'j',
415
- letters: "j\u24D9\uFF4A\u0135\u01F0\u0249"
416
- }, {
417
- base: 'k',
418
- letters: "k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"
419
- }, {
420
- base: 'l',
421
- letters: "l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"
422
- }, {
423
- base: 'lj',
424
- letters: "\u01C9"
425
- }, {
426
- base: 'm',
427
- letters: "m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"
428
- }, {
429
- base: 'n',
430
- letters: "n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"
431
- }, {
432
- base: 'nj',
433
- letters: "\u01CC"
434
- }, {
435
- base: 'o',
436
- letters: "o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"
437
- }, {
438
- base: 'oi',
439
- letters: "\u01A3"
440
- }, {
441
- base: 'ou',
442
- letters: "\u0223"
443
- }, {
444
- base: 'oo',
445
- letters: "\uA74F"
446
- }, {
447
- base: 'p',
448
- letters: "p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"
449
- }, {
450
- base: 'q',
451
- letters: "q\u24E0\uFF51\u024B\uA757\uA759"
452
- }, {
453
- base: 'r',
454
- letters: "r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"
455
- }, {
456
- base: 's',
457
- letters: "s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"
458
- }, {
459
- base: 't',
460
- letters: "t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"
461
- }, {
462
- base: 'tz',
463
- letters: "\uA729"
464
- }, {
465
- base: 'u',
466
- letters: "u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"
467
- }, {
468
- base: 'v',
469
- letters: "v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"
470
- }, {
471
- base: 'vy',
472
- letters: "\uA761"
473
- }, {
474
- base: 'w',
475
- letters: "w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"
476
- }, {
477
- base: 'x',
478
- letters: "x\u24E7\uFF58\u1E8B\u1E8D"
479
- }, {
480
- base: 'y',
481
- letters: "y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"
482
- }, {
483
- base: 'z',
484
- letters: "z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"
485
- }];
486
- var anyDiacritic = new RegExp('[' + diacritics.map(function (d) {
487
- return d.letters;
488
- }).join('') + ']', 'g');
489
- var diacriticToBase = {};
490
- for (var i = 0; i < diacritics.length; i++) {
491
- var diacritic = diacritics[i];
492
- for (var j = 0; j < diacritic.letters.length; j++) {
493
- diacriticToBase[diacritic.letters[j]] = diacritic.base;
494
- }
495
- }
496
- var stripDiacritics = function stripDiacritics(str) {
497
- return str.replace(anyDiacritic, function (match) {
498
- return diacriticToBase[match];
499
- });
500
- };
501
-
502
- var memoizedStripDiacriticsForInput = memoizeOne(stripDiacritics);
503
- var trimString = function trimString(str) {
504
- return str.replace(/^\s+|\s+$/g, '');
505
- };
506
- var defaultStringify = function defaultStringify(option) {
507
- return "".concat(option.label, " ").concat(option.value);
508
- };
509
- var createFilter = function createFilter(config) {
510
- return function (option, rawInput) {
511
- // eslint-disable-next-line no-underscore-dangle
512
- if (option.data.__isNew__) return true;
513
- var _ignoreCase$ignoreAcc = _objectSpread2({
514
- ignoreCase: true,
515
- ignoreAccents: true,
516
- stringify: defaultStringify,
517
- trim: true,
518
- matchFrom: 'any'
519
- }, config),
520
- ignoreCase = _ignoreCase$ignoreAcc.ignoreCase,
521
- ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents,
522
- stringify = _ignoreCase$ignoreAcc.stringify,
523
- trim = _ignoreCase$ignoreAcc.trim,
524
- matchFrom = _ignoreCase$ignoreAcc.matchFrom;
525
- var input = trim ? trimString(rawInput) : rawInput;
526
- var candidate = trim ? trimString(stringify(option)) : stringify(option);
527
- if (ignoreCase) {
528
- input = input.toLowerCase();
529
- candidate = candidate.toLowerCase();
530
- }
531
- if (ignoreAccents) {
532
- input = memoizedStripDiacriticsForInput(input);
533
- candidate = stripDiacritics(candidate);
534
- }
535
- return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;
536
- };
537
- };
538
-
539
- var _excluded = ["innerRef"];
540
- function DummyInput(_ref) {
541
- var innerRef = _ref.innerRef,
542
- props = _objectWithoutProperties(_ref, _excluded);
543
- // Remove animation props not meant for HTML elements
544
- var filteredProps = removeProps(props, 'onExited', 'in', 'enter', 'exit', 'appear');
545
- return jsx("input", _extends({
546
- ref: innerRef
547
- }, filteredProps, {
548
- css: /*#__PURE__*/css({
549
- label: 'dummyInput',
550
- // get rid of any default styles
551
- background: 0,
552
- border: 0,
553
- // important! this hides the flashing cursor
554
- caretColor: 'transparent',
555
- fontSize: 'inherit',
556
- gridArea: '1 / 1 / 2 / 3',
557
- outline: 0,
558
- padding: 0,
559
- // important! without `width` browsers won't allow focus
560
- width: 1,
561
- // remove cursor on desktop
562
- color: 'transparent',
563
- // remove cursor on mobile whilst maintaining "scroll into view" behaviour
564
- left: -100,
565
- opacity: 0,
566
- position: 'relative',
567
- transform: 'scale(.01)'
568
- }, process.env.NODE_ENV === "production" ? "" : ";label:DummyInput;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")
569
- }));
570
- }
571
-
572
- var cancelScroll = function cancelScroll(event) {
573
- if (event.cancelable) event.preventDefault();
574
- event.stopPropagation();
575
- };
576
- function useScrollCapture(_ref) {
577
- var isEnabled = _ref.isEnabled,
578
- onBottomArrive = _ref.onBottomArrive,
579
- onBottomLeave = _ref.onBottomLeave,
580
- onTopArrive = _ref.onTopArrive,
581
- onTopLeave = _ref.onTopLeave;
582
- var isBottom = react.exports.useRef(false);
583
- var isTop = react.exports.useRef(false);
584
- var touchStart = react.exports.useRef(0);
585
- var scrollTarget = react.exports.useRef(null);
586
- var handleEventDelta = react.exports.useCallback(function (event, delta) {
587
- if (scrollTarget.current === null) return;
588
- var _scrollTarget$current = scrollTarget.current,
589
- scrollTop = _scrollTarget$current.scrollTop,
590
- scrollHeight = _scrollTarget$current.scrollHeight,
591
- clientHeight = _scrollTarget$current.clientHeight;
592
- var target = scrollTarget.current;
593
- var isDeltaPositive = delta > 0;
594
- var availableScroll = scrollHeight - clientHeight - scrollTop;
595
- var shouldCancelScroll = false;
596
-
597
- // reset bottom/top flags
598
- if (availableScroll > delta && isBottom.current) {
599
- if (onBottomLeave) onBottomLeave(event);
600
- isBottom.current = false;
601
- }
602
- if (isDeltaPositive && isTop.current) {
603
- if (onTopLeave) onTopLeave(event);
604
- isTop.current = false;
605
- }
606
-
607
- // bottom limit
608
- if (isDeltaPositive && delta > availableScroll) {
609
- if (onBottomArrive && !isBottom.current) {
610
- onBottomArrive(event);
611
- }
612
- target.scrollTop = scrollHeight;
613
- shouldCancelScroll = true;
614
- isBottom.current = true;
615
-
616
- // top limit
617
- } else if (!isDeltaPositive && -delta > scrollTop) {
618
- if (onTopArrive && !isTop.current) {
619
- onTopArrive(event);
620
- }
621
- target.scrollTop = 0;
622
- shouldCancelScroll = true;
623
- isTop.current = true;
624
- }
625
-
626
- // cancel scroll
627
- if (shouldCancelScroll) {
628
- cancelScroll(event);
629
- }
630
- }, [onBottomArrive, onBottomLeave, onTopArrive, onTopLeave]);
631
- var onWheel = react.exports.useCallback(function (event) {
632
- handleEventDelta(event, event.deltaY);
633
- }, [handleEventDelta]);
634
- var onTouchStart = react.exports.useCallback(function (event) {
635
- // set touch start so we can calculate touchmove delta
636
- touchStart.current = event.changedTouches[0].clientY;
637
- }, []);
638
- var onTouchMove = react.exports.useCallback(function (event) {
639
- var deltaY = touchStart.current - event.changedTouches[0].clientY;
640
- handleEventDelta(event, deltaY);
641
- }, [handleEventDelta]);
642
- var startListening = react.exports.useCallback(function (el) {
643
- // bail early if no element is available to attach to
644
- if (!el) return;
645
- var notPassive = supportsPassiveEvents ? {
646
- passive: false
647
- } : false;
648
- el.addEventListener('wheel', onWheel, notPassive);
649
- el.addEventListener('touchstart', onTouchStart, notPassive);
650
- el.addEventListener('touchmove', onTouchMove, notPassive);
651
- }, [onTouchMove, onTouchStart, onWheel]);
652
- var stopListening = react.exports.useCallback(function (el) {
653
- // bail early if no element is available to detach from
654
- if (!el) return;
655
- el.removeEventListener('wheel', onWheel, false);
656
- el.removeEventListener('touchstart', onTouchStart, false);
657
- el.removeEventListener('touchmove', onTouchMove, false);
658
- }, [onTouchMove, onTouchStart, onWheel]);
659
- react.exports.useEffect(function () {
660
- if (!isEnabled) return;
661
- var element = scrollTarget.current;
662
- startListening(element);
663
- return function () {
664
- stopListening(element);
665
- };
666
- }, [isEnabled, startListening, stopListening]);
667
- return function (element) {
668
- scrollTarget.current = element;
669
- };
670
- }
671
-
672
- var STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position'];
673
- var LOCK_STYLES = {
674
- boxSizing: 'border-box',
675
- // account for possible declaration `width: 100%;` on body
676
- overflow: 'hidden',
677
- position: 'relative',
678
- height: '100%'
679
- };
680
- function preventTouchMove(e) {
681
- if (e.cancelable) e.preventDefault();
682
- }
683
- function allowTouchMove(e) {
684
- e.stopPropagation();
685
- }
686
- function preventInertiaScroll() {
687
- var top = this.scrollTop;
688
- var totalScroll = this.scrollHeight;
689
- var currentScroll = top + this.offsetHeight;
690
- if (top === 0) {
691
- this.scrollTop = 1;
692
- } else if (currentScroll === totalScroll) {
693
- this.scrollTop = top - 1;
694
- }
695
- }
696
-
697
- // `ontouchstart` check works on most browsers
698
- // `maxTouchPoints` works on IE10/11 and Surface
699
- function isTouchDevice() {
700
- return 'ontouchstart' in window || navigator.maxTouchPoints;
701
- }
702
- var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
703
- var activeScrollLocks = 0;
704
- var listenerOptions = {
705
- capture: false,
706
- passive: false
707
- };
708
- function useScrollLock(_ref) {
709
- var isEnabled = _ref.isEnabled,
710
- _ref$accountForScroll = _ref.accountForScrollbars,
711
- accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;
712
- var originalStyles = react.exports.useRef({});
713
- var scrollTarget = react.exports.useRef(null);
714
- var addScrollLock = react.exports.useCallback(function (touchScrollTarget) {
715
- if (!canUseDOM) return;
716
- var target = document.body;
717
- var targetStyle = target && target.style;
718
- if (accountForScrollbars) {
719
- // store any styles already applied to the body
720
- STYLE_KEYS.forEach(function (key) {
721
- var val = targetStyle && targetStyle[key];
722
- originalStyles.current[key] = val;
723
- });
724
- }
725
-
726
- // apply the lock styles and padding if this is the first scroll lock
727
- if (accountForScrollbars && activeScrollLocks < 1) {
728
- var currentPadding = parseInt(originalStyles.current.paddingRight, 10) || 0;
729
- var clientWidth = document.body ? document.body.clientWidth : 0;
730
- var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0;
731
- Object.keys(LOCK_STYLES).forEach(function (key) {
732
- var val = LOCK_STYLES[key];
733
- if (targetStyle) {
734
- targetStyle[key] = val;
735
- }
736
- });
737
- if (targetStyle) {
738
- targetStyle.paddingRight = "".concat(adjustedPadding, "px");
739
- }
740
- }
741
-
742
- // account for touch devices
743
- if (target && isTouchDevice()) {
744
- // Mobile Safari ignores { overflow: hidden } declaration on the body.
745
- target.addEventListener('touchmove', preventTouchMove, listenerOptions);
746
-
747
- // Allow scroll on provided target
748
- if (touchScrollTarget) {
749
- touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, listenerOptions);
750
- touchScrollTarget.addEventListener('touchmove', allowTouchMove, listenerOptions);
751
- }
752
- }
753
-
754
- // increment active scroll locks
755
- activeScrollLocks += 1;
756
- }, [accountForScrollbars]);
757
- var removeScrollLock = react.exports.useCallback(function (touchScrollTarget) {
758
- if (!canUseDOM) return;
759
- var target = document.body;
760
- var targetStyle = target && target.style;
761
-
762
- // safely decrement active scroll locks
763
- activeScrollLocks = Math.max(activeScrollLocks - 1, 0);
764
-
765
- // reapply original body styles, if any
766
- if (accountForScrollbars && activeScrollLocks < 1) {
767
- STYLE_KEYS.forEach(function (key) {
768
- var val = originalStyles.current[key];
769
- if (targetStyle) {
770
- targetStyle[key] = val;
771
- }
772
- });
773
- }
774
-
775
- // remove touch listeners
776
- if (target && isTouchDevice()) {
777
- target.removeEventListener('touchmove', preventTouchMove, listenerOptions);
778
- if (touchScrollTarget) {
779
- touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, listenerOptions);
780
- touchScrollTarget.removeEventListener('touchmove', allowTouchMove, listenerOptions);
781
- }
782
- }
783
- }, [accountForScrollbars]);
784
- react.exports.useEffect(function () {
785
- if (!isEnabled) return;
786
- var element = scrollTarget.current;
787
- addScrollLock(element);
788
- return function () {
789
- removeScrollLock(element);
790
- };
791
- }, [isEnabled, addScrollLock, removeScrollLock]);
792
- return function (element) {
793
- scrollTarget.current = element;
794
- };
795
- }
796
-
797
- function _EMOTION_STRINGIFIED_CSS_ERROR__$1() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
798
- var blurSelectInput = function blurSelectInput(event) {
799
- var element = event.target;
800
- return element.ownerDocument.activeElement && element.ownerDocument.activeElement.blur();
801
- };
802
- var _ref2$1 = process.env.NODE_ENV === "production" ? {
803
- name: "1kfdb0e",
804
- styles: "position:fixed;left:0;bottom:0;right:0;top:0"
805
- } : {
806
- name: "bp8cua-ScrollManager",
807
- styles: "position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",
808
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",
809
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
810
- };
811
- function ScrollManager(_ref) {
812
- var children = _ref.children,
813
- lockEnabled = _ref.lockEnabled,
814
- _ref$captureEnabled = _ref.captureEnabled,
815
- captureEnabled = _ref$captureEnabled === void 0 ? true : _ref$captureEnabled,
816
- onBottomArrive = _ref.onBottomArrive,
817
- onBottomLeave = _ref.onBottomLeave,
818
- onTopArrive = _ref.onTopArrive,
819
- onTopLeave = _ref.onTopLeave;
820
- var setScrollCaptureTarget = useScrollCapture({
821
- isEnabled: captureEnabled,
822
- onBottomArrive: onBottomArrive,
823
- onBottomLeave: onBottomLeave,
824
- onTopArrive: onTopArrive,
825
- onTopLeave: onTopLeave
826
- });
827
- var setScrollLockTarget = useScrollLock({
828
- isEnabled: lockEnabled
829
- });
830
- var targetRef = function targetRef(element) {
831
- setScrollCaptureTarget(element);
832
- setScrollLockTarget(element);
833
- };
834
- return jsx(react.exports.Fragment, null, lockEnabled && jsx("div", {
835
- onClick: blurSelectInput,
836
- css: _ref2$1
837
- }), children(targetRef));
838
- }
839
-
840
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
841
- var _ref2 = process.env.NODE_ENV === "production" ? {
842
- name: "1a0ro4n-requiredInput",
843
- styles: "label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"
844
- } : {
845
- name: "5kkxb2-requiredInput-RequiredInput",
846
- styles: "label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",
847
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",
848
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
849
- };
850
- var RequiredInput = function RequiredInput(_ref) {
851
- var name = _ref.name,
852
- onFocus = _ref.onFocus;
853
- return jsx("input", {
854
- required: true,
855
- name: name,
856
- tabIndex: -1,
857
- "aria-hidden": "true",
858
- onFocus: onFocus,
859
- css: _ref2
860
- // Prevent `Switching from uncontrolled to controlled` error
861
- ,
862
- value: "",
863
- onChange: function onChange() {}
864
- });
865
- };
866
- var RequiredInput$1 = RequiredInput;
867
-
868
- /// <reference types="user-agent-data-types" />
869
-
870
- function testPlatform(re) {
871
- var _window$navigator$use;
872
- return typeof window !== 'undefined' && window.navigator != null ? re.test(((_window$navigator$use = window.navigator['userAgentData']) === null || _window$navigator$use === void 0 ? void 0 : _window$navigator$use.platform) || window.navigator.platform) : false;
873
- }
874
- function isIPhone() {
875
- return testPlatform(/^iPhone/i);
876
- }
877
- function isMac() {
878
- return testPlatform(/^Mac/i);
879
- }
880
- function isIPad() {
881
- return testPlatform(/^iPad/i) ||
882
- // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
883
- isMac() && navigator.maxTouchPoints > 1;
884
- }
885
- function isIOS() {
886
- return isIPhone() || isIPad();
887
- }
888
- function isAppleDevice() {
889
- return isMac() || isIOS();
890
- }
891
-
892
- var formatGroupLabel = function formatGroupLabel(group) {
893
- return group.label;
894
- };
895
- var getOptionLabel$1 = function getOptionLabel(option) {
896
- return option.label;
897
- };
898
- var getOptionValue$1 = function getOptionValue(option) {
899
- return option.value;
900
- };
901
- var isOptionDisabled = function isOptionDisabled(option) {
902
- return !!option.isDisabled;
903
- };
904
-
905
- var defaultStyles = {
906
- clearIndicator: clearIndicatorCSS,
907
- container: containerCSS,
908
- control: css$1,
909
- dropdownIndicator: dropdownIndicatorCSS,
910
- group: groupCSS,
911
- groupHeading: groupHeadingCSS,
912
- indicatorsContainer: indicatorsContainerCSS,
913
- indicatorSeparator: indicatorSeparatorCSS,
914
- input: inputCSS,
915
- loadingIndicator: loadingIndicatorCSS,
916
- loadingMessage: loadingMessageCSS,
917
- menu: menuCSS,
918
- menuList: menuListCSS,
919
- menuPortal: menuPortalCSS,
920
- multiValue: multiValueCSS,
921
- multiValueLabel: multiValueLabelCSS,
922
- multiValueRemove: multiValueRemoveCSS,
923
- noOptionsMessage: noOptionsMessageCSS,
924
- option: optionCSS,
925
- placeholder: placeholderCSS,
926
- singleValue: css$2,
927
- valueContainer: valueContainerCSS
928
- };
929
-
930
- var colors = {
931
- primary: '#2684FF',
932
- primary75: '#4C9AFF',
933
- primary50: '#B2D4FF',
934
- primary25: '#DEEBFF',
935
- danger: '#DE350B',
936
- dangerLight: '#FFBDAD',
937
- neutral0: 'hsl(0, 0%, 100%)',
938
- neutral5: 'hsl(0, 0%, 95%)',
939
- neutral10: 'hsl(0, 0%, 90%)',
940
- neutral20: 'hsl(0, 0%, 80%)',
941
- neutral30: 'hsl(0, 0%, 70%)',
942
- neutral40: 'hsl(0, 0%, 60%)',
943
- neutral50: 'hsl(0, 0%, 50%)',
944
- neutral60: 'hsl(0, 0%, 40%)',
945
- neutral70: 'hsl(0, 0%, 30%)',
946
- neutral80: 'hsl(0, 0%, 20%)',
947
- neutral90: 'hsl(0, 0%, 10%)'
948
- };
949
- var borderRadius = 4;
950
- // Used to calculate consistent margin/padding on elements
951
- var baseUnit = 4;
952
- // The minimum height of the control
953
- var controlHeight = 38;
954
- // The amount of space between the control and menu */
955
- var menuGutter = baseUnit * 2;
956
- var spacing = {
957
- baseUnit: baseUnit,
958
- controlHeight: controlHeight,
959
- menuGutter: menuGutter
960
- };
961
- var defaultTheme = {
962
- borderRadius: borderRadius,
963
- colors: colors,
964
- spacing: spacing
965
- };
966
-
967
- var defaultProps = {
968
- 'aria-live': 'polite',
969
- backspaceRemovesValue: true,
970
- blurInputOnSelect: isTouchCapable(),
971
- captureMenuScroll: !isTouchCapable(),
972
- classNames: {},
973
- closeMenuOnSelect: true,
974
- closeMenuOnScroll: false,
975
- components: {},
976
- controlShouldRenderValue: true,
977
- escapeClearsValue: false,
978
- filterOption: createFilter(),
979
- formatGroupLabel: formatGroupLabel,
980
- getOptionLabel: getOptionLabel$1,
981
- getOptionValue: getOptionValue$1,
982
- isDisabled: false,
983
- isLoading: false,
984
- isMulti: false,
985
- isRtl: false,
986
- isSearchable: true,
987
- isOptionDisabled: isOptionDisabled,
988
- loadingMessage: function loadingMessage() {
989
- return 'Loading...';
990
- },
991
- maxMenuHeight: 300,
992
- minMenuHeight: 140,
993
- menuIsOpen: false,
994
- menuPlacement: 'bottom',
995
- menuPosition: 'absolute',
996
- menuShouldBlockScroll: false,
997
- menuShouldScrollIntoView: !isMobileDevice(),
998
- noOptionsMessage: function noOptionsMessage() {
999
- return 'No options';
1000
- },
1001
- openMenuOnFocus: false,
1002
- openMenuOnClick: true,
1003
- options: [],
1004
- pageSize: 5,
1005
- placeholder: 'Select...',
1006
- screenReaderStatus: function screenReaderStatus(_ref) {
1007
- var count = _ref.count;
1008
- return "".concat(count, " result").concat(count !== 1 ? 's' : '', " available");
1009
- },
1010
- styles: {},
1011
- tabIndex: 0,
1012
- tabSelectsValue: true,
1013
- unstyled: false
1014
- };
1015
- function toCategorizedOption(props, option, selectValue, index) {
1016
- var isDisabled = _isOptionDisabled(props, option, selectValue);
1017
- var isSelected = _isOptionSelected(props, option, selectValue);
1018
- var label = getOptionLabel(props, option);
1019
- var value = getOptionValue(props, option);
1020
- return {
1021
- type: 'option',
1022
- data: option,
1023
- isDisabled: isDisabled,
1024
- isSelected: isSelected,
1025
- label: label,
1026
- value: value,
1027
- index: index
1028
- };
1029
- }
1030
- function buildCategorizedOptions(props, selectValue) {
1031
- return props.options.map(function (groupOrOption, groupOrOptionIndex) {
1032
- if ('options' in groupOrOption) {
1033
- var categorizedOptions = groupOrOption.options.map(function (option, optionIndex) {
1034
- return toCategorizedOption(props, option, selectValue, optionIndex);
1035
- }).filter(function (categorizedOption) {
1036
- return isFocusable(props, categorizedOption);
1037
- });
1038
- return categorizedOptions.length > 0 ? {
1039
- type: 'group',
1040
- data: groupOrOption,
1041
- options: categorizedOptions,
1042
- index: groupOrOptionIndex
1043
- } : undefined;
1044
- }
1045
- var categorizedOption = toCategorizedOption(props, groupOrOption, selectValue, groupOrOptionIndex);
1046
- return isFocusable(props, categorizedOption) ? categorizedOption : undefined;
1047
- }).filter(notNullish);
1048
- }
1049
- function buildFocusableOptionsFromCategorizedOptions(categorizedOptions) {
1050
- return categorizedOptions.reduce(function (optionsAccumulator, categorizedOption) {
1051
- if (categorizedOption.type === 'group') {
1052
- optionsAccumulator.push.apply(optionsAccumulator, _toConsumableArray(categorizedOption.options.map(function (option) {
1053
- return option.data;
1054
- })));
1055
- } else {
1056
- optionsAccumulator.push(categorizedOption.data);
1057
- }
1058
- return optionsAccumulator;
1059
- }, []);
1060
- }
1061
- function buildFocusableOptionsWithIds(categorizedOptions, optionId) {
1062
- return categorizedOptions.reduce(function (optionsAccumulator, categorizedOption) {
1063
- if (categorizedOption.type === 'group') {
1064
- optionsAccumulator.push.apply(optionsAccumulator, _toConsumableArray(categorizedOption.options.map(function (option) {
1065
- return {
1066
- data: option.data,
1067
- id: "".concat(optionId, "-").concat(categorizedOption.index, "-").concat(option.index)
1068
- };
1069
- })));
1070
- } else {
1071
- optionsAccumulator.push({
1072
- data: categorizedOption.data,
1073
- id: "".concat(optionId, "-").concat(categorizedOption.index)
1074
- });
1075
- }
1076
- return optionsAccumulator;
1077
- }, []);
1078
- }
1079
- function buildFocusableOptions(props, selectValue) {
1080
- return buildFocusableOptionsFromCategorizedOptions(buildCategorizedOptions(props, selectValue));
1081
- }
1082
- function isFocusable(props, categorizedOption) {
1083
- var _props$inputValue = props.inputValue,
1084
- inputValue = _props$inputValue === void 0 ? '' : _props$inputValue;
1085
- var data = categorizedOption.data,
1086
- isSelected = categorizedOption.isSelected,
1087
- label = categorizedOption.label,
1088
- value = categorizedOption.value;
1089
- return (!shouldHideSelectedOptions(props) || !isSelected) && _filterOption(props, {
1090
- label: label,
1091
- value: value,
1092
- data: data
1093
- }, inputValue);
1094
- }
1095
- function getNextFocusedValue(state, nextSelectValue) {
1096
- var focusedValue = state.focusedValue,
1097
- lastSelectValue = state.selectValue;
1098
- var lastFocusedIndex = lastSelectValue.indexOf(focusedValue);
1099
- if (lastFocusedIndex > -1) {
1100
- var nextFocusedIndex = nextSelectValue.indexOf(focusedValue);
1101
- if (nextFocusedIndex > -1) {
1102
- // the focused value is still in the selectValue, return it
1103
- return focusedValue;
1104
- } else if (lastFocusedIndex < nextSelectValue.length) {
1105
- // the focusedValue is not present in the next selectValue array by
1106
- // reference, so return the new value at the same index
1107
- return nextSelectValue[lastFocusedIndex];
1108
- }
1109
- }
1110
- return null;
1111
- }
1112
- function getNextFocusedOption(state, options) {
1113
- var lastFocusedOption = state.focusedOption;
1114
- return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0];
1115
- }
1116
- var getFocusedOptionId = function getFocusedOptionId(focusableOptionsWithIds, focusedOption) {
1117
- var _focusableOptionsWith;
1118
- var focusedOptionId = (_focusableOptionsWith = focusableOptionsWithIds.find(function (option) {
1119
- return option.data === focusedOption;
1120
- })) === null || _focusableOptionsWith === void 0 ? void 0 : _focusableOptionsWith.id;
1121
- return focusedOptionId || null;
1122
- };
1123
- var getOptionLabel = function getOptionLabel(props, data) {
1124
- return props.getOptionLabel(data);
1125
- };
1126
- var getOptionValue = function getOptionValue(props, data) {
1127
- return props.getOptionValue(data);
1128
- };
1129
- function _isOptionDisabled(props, option, selectValue) {
1130
- return typeof props.isOptionDisabled === 'function' ? props.isOptionDisabled(option, selectValue) : false;
1131
- }
1132
- function _isOptionSelected(props, option, selectValue) {
1133
- if (selectValue.indexOf(option) > -1) return true;
1134
- if (typeof props.isOptionSelected === 'function') {
1135
- return props.isOptionSelected(option, selectValue);
1136
- }
1137
- var candidate = getOptionValue(props, option);
1138
- return selectValue.some(function (i) {
1139
- return getOptionValue(props, i) === candidate;
1140
- });
1141
- }
1142
- function _filterOption(props, option, inputValue) {
1143
- return props.filterOption ? props.filterOption(option, inputValue) : true;
1144
- }
1145
- var shouldHideSelectedOptions = function shouldHideSelectedOptions(props) {
1146
- var hideSelectedOptions = props.hideSelectedOptions,
1147
- isMulti = props.isMulti;
1148
- if (hideSelectedOptions === undefined) return isMulti;
1149
- return hideSelectedOptions;
1150
- };
1151
- var instanceId = 1;
1152
- var Select = /*#__PURE__*/function (_Component) {
1153
- _inherits(Select, _Component);
1154
- var _super = _createSuper(Select);
1155
- // Misc. Instance Properties
1156
- // ------------------------------
1157
-
1158
- // TODO
1159
-
1160
- // Refs
1161
- // ------------------------------
1162
-
1163
- // Lifecycle
1164
- // ------------------------------
1165
-
1166
- function Select(_props) {
1167
- var _this;
1168
- _classCallCheck(this, Select);
1169
- _this = _super.call(this, _props);
1170
- _this.state = {
1171
- ariaSelection: null,
1172
- focusedOption: null,
1173
- focusedOptionId: null,
1174
- focusableOptionsWithIds: [],
1175
- focusedValue: null,
1176
- inputIsHidden: false,
1177
- isFocused: false,
1178
- selectValue: [],
1179
- clearFocusValueOnUpdate: false,
1180
- prevWasFocused: false,
1181
- inputIsHiddenAfterUpdate: undefined,
1182
- prevProps: undefined,
1183
- instancePrefix: ''
1184
- };
1185
- _this.blockOptionHover = false;
1186
- _this.isComposing = false;
1187
- _this.commonProps = void 0;
1188
- _this.initialTouchX = 0;
1189
- _this.initialTouchY = 0;
1190
- _this.openAfterFocus = false;
1191
- _this.scrollToFocusedOptionOnUpdate = false;
1192
- _this.userIsDragging = void 0;
1193
- _this.isAppleDevice = isAppleDevice();
1194
- _this.controlRef = null;
1195
- _this.getControlRef = function (ref) {
1196
- _this.controlRef = ref;
1197
- };
1198
- _this.focusedOptionRef = null;
1199
- _this.getFocusedOptionRef = function (ref) {
1200
- _this.focusedOptionRef = ref;
1201
- };
1202
- _this.menuListRef = null;
1203
- _this.getMenuListRef = function (ref) {
1204
- _this.menuListRef = ref;
1205
- };
1206
- _this.inputRef = null;
1207
- _this.getInputRef = function (ref) {
1208
- _this.inputRef = ref;
1209
- };
1210
- _this.focus = _this.focusInput;
1211
- _this.blur = _this.blurInput;
1212
- _this.onChange = function (newValue, actionMeta) {
1213
- var _this$props = _this.props,
1214
- onChange = _this$props.onChange,
1215
- name = _this$props.name;
1216
- actionMeta.name = name;
1217
- _this.ariaOnChange(newValue, actionMeta);
1218
- onChange(newValue, actionMeta);
1219
- };
1220
- _this.setValue = function (newValue, action, option) {
1221
- var _this$props2 = _this.props,
1222
- closeMenuOnSelect = _this$props2.closeMenuOnSelect,
1223
- isMulti = _this$props2.isMulti,
1224
- inputValue = _this$props2.inputValue;
1225
- _this.onInputChange('', {
1226
- action: 'set-value',
1227
- prevInputValue: inputValue
1228
- });
1229
- if (closeMenuOnSelect) {
1230
- _this.setState({
1231
- inputIsHiddenAfterUpdate: !isMulti
1232
- });
1233
- _this.onMenuClose();
1234
- }
1235
- // when the select value should change, we should reset focusedValue
1236
- _this.setState({
1237
- clearFocusValueOnUpdate: true
1238
- });
1239
- _this.onChange(newValue, {
1240
- action: action,
1241
- option: option
1242
- });
1243
- };
1244
- _this.selectOption = function (newValue) {
1245
- var _this$props3 = _this.props,
1246
- blurInputOnSelect = _this$props3.blurInputOnSelect,
1247
- isMulti = _this$props3.isMulti,
1248
- name = _this$props3.name;
1249
- var selectValue = _this.state.selectValue;
1250
- var deselected = isMulti && _this.isOptionSelected(newValue, selectValue);
1251
- var isDisabled = _this.isOptionDisabled(newValue, selectValue);
1252
- if (deselected) {
1253
- var candidate = _this.getOptionValue(newValue);
1254
- _this.setValue(multiValueAsValue(selectValue.filter(function (i) {
1255
- return _this.getOptionValue(i) !== candidate;
1256
- })), 'deselect-option', newValue);
1257
- } else if (!isDisabled) {
1258
- // Select option if option is not disabled
1259
- if (isMulti) {
1260
- _this.setValue(multiValueAsValue([].concat(_toConsumableArray(selectValue), [newValue])), 'select-option', newValue);
1261
- } else {
1262
- _this.setValue(singleValueAsValue(newValue), 'select-option');
1263
- }
1264
- } else {
1265
- _this.ariaOnChange(singleValueAsValue(newValue), {
1266
- action: 'select-option',
1267
- option: newValue,
1268
- name: name
1269
- });
1270
- return;
1271
- }
1272
- if (blurInputOnSelect) {
1273
- _this.blurInput();
1274
- }
1275
- };
1276
- _this.removeValue = function (removedValue) {
1277
- var isMulti = _this.props.isMulti;
1278
- var selectValue = _this.state.selectValue;
1279
- var candidate = _this.getOptionValue(removedValue);
1280
- var newValueArray = selectValue.filter(function (i) {
1281
- return _this.getOptionValue(i) !== candidate;
1282
- });
1283
- var newValue = valueTernary(isMulti, newValueArray, newValueArray[0] || null);
1284
- _this.onChange(newValue, {
1285
- action: 'remove-value',
1286
- removedValue: removedValue
1287
- });
1288
- _this.focusInput();
1289
- };
1290
- _this.clearValue = function () {
1291
- var selectValue = _this.state.selectValue;
1292
- _this.onChange(valueTernary(_this.props.isMulti, [], null), {
1293
- action: 'clear',
1294
- removedValues: selectValue
1295
- });
1296
- };
1297
- _this.popValue = function () {
1298
- var isMulti = _this.props.isMulti;
1299
- var selectValue = _this.state.selectValue;
1300
- var lastSelectedValue = selectValue[selectValue.length - 1];
1301
- var newValueArray = selectValue.slice(0, selectValue.length - 1);
1302
- var newValue = valueTernary(isMulti, newValueArray, newValueArray[0] || null);
1303
- if (lastSelectedValue) {
1304
- _this.onChange(newValue, {
1305
- action: 'pop-value',
1306
- removedValue: lastSelectedValue
1307
- });
1308
- }
1309
- };
1310
- _this.getFocusedOptionId = function (focusedOption) {
1311
- return getFocusedOptionId(_this.state.focusableOptionsWithIds, focusedOption);
1312
- };
1313
- _this.getFocusableOptionsWithIds = function () {
1314
- return buildFocusableOptionsWithIds(buildCategorizedOptions(_this.props, _this.state.selectValue), _this.getElementId('option'));
1315
- };
1316
- _this.getValue = function () {
1317
- return _this.state.selectValue;
1318
- };
1319
- _this.cx = function () {
1320
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1321
- args[_key] = arguments[_key];
1322
- }
1323
- return classNames.apply(void 0, [_this.props.classNamePrefix].concat(args));
1324
- };
1325
- _this.getOptionLabel = function (data) {
1326
- return getOptionLabel(_this.props, data);
1327
- };
1328
- _this.getOptionValue = function (data) {
1329
- return getOptionValue(_this.props, data);
1330
- };
1331
- _this.getStyles = function (key, props) {
1332
- var unstyled = _this.props.unstyled;
1333
- var base = defaultStyles[key](props, unstyled);
1334
- base.boxSizing = 'border-box';
1335
- var custom = _this.props.styles[key];
1336
- return custom ? custom(base, props) : base;
1337
- };
1338
- _this.getClassNames = function (key, props) {
1339
- var _this$props$className, _this$props$className2;
1340
- return (_this$props$className = (_this$props$className2 = _this.props.classNames)[key]) === null || _this$props$className === void 0 ? void 0 : _this$props$className.call(_this$props$className2, props);
1341
- };
1342
- _this.getElementId = function (element) {
1343
- return "".concat(_this.state.instancePrefix, "-").concat(element);
1344
- };
1345
- _this.getComponents = function () {
1346
- return defaultComponents(_this.props);
1347
- };
1348
- _this.buildCategorizedOptions = function () {
1349
- return buildCategorizedOptions(_this.props, _this.state.selectValue);
1350
- };
1351
- _this.getCategorizedOptions = function () {
1352
- return _this.props.menuIsOpen ? _this.buildCategorizedOptions() : [];
1353
- };
1354
- _this.buildFocusableOptions = function () {
1355
- return buildFocusableOptionsFromCategorizedOptions(_this.buildCategorizedOptions());
1356
- };
1357
- _this.getFocusableOptions = function () {
1358
- return _this.props.menuIsOpen ? _this.buildFocusableOptions() : [];
1359
- };
1360
- _this.ariaOnChange = function (value, actionMeta) {
1361
- _this.setState({
1362
- ariaSelection: _objectSpread2({
1363
- value: value
1364
- }, actionMeta)
1365
- });
1366
- };
1367
- _this.onMenuMouseDown = function (event) {
1368
- if (event.button !== 0) {
1369
- return;
1370
- }
1371
- event.stopPropagation();
1372
- event.preventDefault();
1373
- _this.focusInput();
1374
- };
1375
- _this.onMenuMouseMove = function (event) {
1376
- _this.blockOptionHover = false;
1377
- };
1378
- _this.onControlMouseDown = function (event) {
1379
- // Event captured by dropdown indicator
1380
- if (event.defaultPrevented) {
1381
- return;
1382
- }
1383
- var openMenuOnClick = _this.props.openMenuOnClick;
1384
- if (!_this.state.isFocused) {
1385
- if (openMenuOnClick) {
1386
- _this.openAfterFocus = true;
1387
- }
1388
- _this.focusInput();
1389
- } else if (!_this.props.menuIsOpen) {
1390
- if (openMenuOnClick) {
1391
- _this.openMenu('first');
1392
- }
1393
- } else {
1394
- if (event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') {
1395
- _this.onMenuClose();
1396
- }
1397
- }
1398
- if (event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') {
1399
- event.preventDefault();
1400
- }
1401
- };
1402
- _this.onDropdownIndicatorMouseDown = function (event) {
1403
- // ignore mouse events that weren't triggered by the primary button
1404
- if (event && event.type === 'mousedown' && event.button !== 0) {
1405
- return;
1406
- }
1407
- if (_this.props.isDisabled) return;
1408
- var _this$props4 = _this.props,
1409
- isMulti = _this$props4.isMulti,
1410
- menuIsOpen = _this$props4.menuIsOpen;
1411
- _this.focusInput();
1412
- if (menuIsOpen) {
1413
- _this.setState({
1414
- inputIsHiddenAfterUpdate: !isMulti
1415
- });
1416
- _this.onMenuClose();
1417
- } else {
1418
- _this.openMenu('first');
1419
- }
1420
- event.preventDefault();
1421
- };
1422
- _this.onClearIndicatorMouseDown = function (event) {
1423
- // ignore mouse events that weren't triggered by the primary button
1424
- if (event && event.type === 'mousedown' && event.button !== 0) {
1425
- return;
1426
- }
1427
- _this.clearValue();
1428
- event.preventDefault();
1429
- _this.openAfterFocus = false;
1430
- if (event.type === 'touchend') {
1431
- _this.focusInput();
1432
- } else {
1433
- setTimeout(function () {
1434
- return _this.focusInput();
1435
- });
1436
- }
1437
- };
1438
- _this.onScroll = function (event) {
1439
- if (typeof _this.props.closeMenuOnScroll === 'boolean') {
1440
- if (event.target instanceof HTMLElement && isDocumentElement(event.target)) {
1441
- _this.props.onMenuClose();
1442
- }
1443
- } else if (typeof _this.props.closeMenuOnScroll === 'function') {
1444
- if (_this.props.closeMenuOnScroll(event)) {
1445
- _this.props.onMenuClose();
1446
- }
1447
- }
1448
- };
1449
- _this.onCompositionStart = function () {
1450
- _this.isComposing = true;
1451
- };
1452
- _this.onCompositionEnd = function () {
1453
- _this.isComposing = false;
1454
- };
1455
- _this.onTouchStart = function (_ref2) {
1456
- var touches = _ref2.touches;
1457
- var touch = touches && touches.item(0);
1458
- if (!touch) {
1459
- return;
1460
- }
1461
- _this.initialTouchX = touch.clientX;
1462
- _this.initialTouchY = touch.clientY;
1463
- _this.userIsDragging = false;
1464
- };
1465
- _this.onTouchMove = function (_ref3) {
1466
- var touches = _ref3.touches;
1467
- var touch = touches && touches.item(0);
1468
- if (!touch) {
1469
- return;
1470
- }
1471
- var deltaX = Math.abs(touch.clientX - _this.initialTouchX);
1472
- var deltaY = Math.abs(touch.clientY - _this.initialTouchY);
1473
- var moveThreshold = 5;
1474
- _this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold;
1475
- };
1476
- _this.onTouchEnd = function (event) {
1477
- if (_this.userIsDragging) return;
1478
-
1479
- // close the menu if the user taps outside
1480
- // we're checking on event.target here instead of event.currentTarget, because we want to assert information
1481
- // on events on child elements, not the document (which we've attached this handler to).
1482
- if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) {
1483
- _this.blurInput();
1484
- }
1485
-
1486
- // reset move vars
1487
- _this.initialTouchX = 0;
1488
- _this.initialTouchY = 0;
1489
- };
1490
- _this.onControlTouchEnd = function (event) {
1491
- if (_this.userIsDragging) return;
1492
- _this.onControlMouseDown(event);
1493
- };
1494
- _this.onClearIndicatorTouchEnd = function (event) {
1495
- if (_this.userIsDragging) return;
1496
- _this.onClearIndicatorMouseDown(event);
1497
- };
1498
- _this.onDropdownIndicatorTouchEnd = function (event) {
1499
- if (_this.userIsDragging) return;
1500
- _this.onDropdownIndicatorMouseDown(event);
1501
- };
1502
- _this.handleInputChange = function (event) {
1503
- var prevInputValue = _this.props.inputValue;
1504
- var inputValue = event.currentTarget.value;
1505
- _this.setState({
1506
- inputIsHiddenAfterUpdate: false
1507
- });
1508
- _this.onInputChange(inputValue, {
1509
- action: 'input-change',
1510
- prevInputValue: prevInputValue
1511
- });
1512
- if (!_this.props.menuIsOpen) {
1513
- _this.onMenuOpen();
1514
- }
1515
- };
1516
- _this.onInputFocus = function (event) {
1517
- if (_this.props.onFocus) {
1518
- _this.props.onFocus(event);
1519
- }
1520
- _this.setState({
1521
- inputIsHiddenAfterUpdate: false,
1522
- isFocused: true
1523
- });
1524
- if (_this.openAfterFocus || _this.props.openMenuOnFocus) {
1525
- _this.openMenu('first');
1526
- }
1527
- _this.openAfterFocus = false;
1528
- };
1529
- _this.onInputBlur = function (event) {
1530
- var prevInputValue = _this.props.inputValue;
1531
- if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) {
1532
- _this.inputRef.focus();
1533
- return;
1534
- }
1535
- if (_this.props.onBlur) {
1536
- _this.props.onBlur(event);
1537
- }
1538
- _this.onInputChange('', {
1539
- action: 'input-blur',
1540
- prevInputValue: prevInputValue
1541
- });
1542
- _this.onMenuClose();
1543
- _this.setState({
1544
- focusedValue: null,
1545
- isFocused: false
1546
- });
1547
- };
1548
- _this.onOptionHover = function (focusedOption) {
1549
- if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) {
1550
- return;
1551
- }
1552
- var options = _this.getFocusableOptions();
1553
- var focusedOptionIndex = options.indexOf(focusedOption);
1554
- _this.setState({
1555
- focusedOption: focusedOption,
1556
- focusedOptionId: focusedOptionIndex > -1 ? _this.getFocusedOptionId(focusedOption) : null
1557
- });
1558
- };
1559
- _this.shouldHideSelectedOptions = function () {
1560
- return shouldHideSelectedOptions(_this.props);
1561
- };
1562
- _this.onValueInputFocus = function (e) {
1563
- e.preventDefault();
1564
- e.stopPropagation();
1565
- _this.focus();
1566
- };
1567
- _this.onKeyDown = function (event) {
1568
- var _this$props5 = _this.props,
1569
- isMulti = _this$props5.isMulti,
1570
- backspaceRemovesValue = _this$props5.backspaceRemovesValue,
1571
- escapeClearsValue = _this$props5.escapeClearsValue,
1572
- inputValue = _this$props5.inputValue,
1573
- isClearable = _this$props5.isClearable,
1574
- isDisabled = _this$props5.isDisabled,
1575
- menuIsOpen = _this$props5.menuIsOpen,
1576
- onKeyDown = _this$props5.onKeyDown,
1577
- tabSelectsValue = _this$props5.tabSelectsValue,
1578
- openMenuOnFocus = _this$props5.openMenuOnFocus;
1579
- var _this$state = _this.state,
1580
- focusedOption = _this$state.focusedOption,
1581
- focusedValue = _this$state.focusedValue,
1582
- selectValue = _this$state.selectValue;
1583
- if (isDisabled) return;
1584
- if (typeof onKeyDown === 'function') {
1585
- onKeyDown(event);
1586
- if (event.defaultPrevented) {
1587
- return;
1588
- }
1589
- }
1590
-
1591
- // Block option hover events when the user has just pressed a key
1592
- _this.blockOptionHover = true;
1593
- switch (event.key) {
1594
- case 'ArrowLeft':
1595
- if (!isMulti || inputValue) return;
1596
- _this.focusValue('previous');
1597
- break;
1598
- case 'ArrowRight':
1599
- if (!isMulti || inputValue) return;
1600
- _this.focusValue('next');
1601
- break;
1602
- case 'Delete':
1603
- case 'Backspace':
1604
- if (inputValue) return;
1605
- if (focusedValue) {
1606
- _this.removeValue(focusedValue);
1607
- } else {
1608
- if (!backspaceRemovesValue) return;
1609
- if (isMulti) {
1610
- _this.popValue();
1611
- } else if (isClearable) {
1612
- _this.clearValue();
1613
- }
1614
- }
1615
- break;
1616
- case 'Tab':
1617
- if (_this.isComposing) return;
1618
- if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption ||
1619
- // don't capture the event if the menu opens on focus and the focused
1620
- // option is already selected; it breaks the flow of navigation
1621
- openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) {
1622
- return;
1623
- }
1624
- _this.selectOption(focusedOption);
1625
- break;
1626
- case 'Enter':
1627
- if (event.keyCode === 229) {
1628
- // ignore the keydown event from an Input Method Editor(IME)
1629
- // ref. https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode
1630
- break;
1631
- }
1632
- if (menuIsOpen) {
1633
- if (!focusedOption) return;
1634
- if (_this.isComposing) return;
1635
- _this.selectOption(focusedOption);
1636
- break;
1637
- }
1638
- return;
1639
- case 'Escape':
1640
- if (menuIsOpen) {
1641
- _this.setState({
1642
- inputIsHiddenAfterUpdate: false
1643
- });
1644
- _this.onInputChange('', {
1645
- action: 'menu-close',
1646
- prevInputValue: inputValue
1647
- });
1648
- _this.onMenuClose();
1649
- } else if (isClearable && escapeClearsValue) {
1650
- _this.clearValue();
1651
- }
1652
- break;
1653
- case ' ':
1654
- // space
1655
- if (inputValue) {
1656
- return;
1657
- }
1658
- if (!menuIsOpen) {
1659
- _this.openMenu('first');
1660
- break;
1661
- }
1662
- if (!focusedOption) return;
1663
- _this.selectOption(focusedOption);
1664
- break;
1665
- case 'ArrowUp':
1666
- if (menuIsOpen) {
1667
- _this.focusOption('up');
1668
- } else {
1669
- _this.openMenu('last');
1670
- }
1671
- break;
1672
- case 'ArrowDown':
1673
- if (menuIsOpen) {
1674
- _this.focusOption('down');
1675
- } else {
1676
- _this.openMenu('first');
1677
- }
1678
- break;
1679
- case 'PageUp':
1680
- if (!menuIsOpen) return;
1681
- _this.focusOption('pageup');
1682
- break;
1683
- case 'PageDown':
1684
- if (!menuIsOpen) return;
1685
- _this.focusOption('pagedown');
1686
- break;
1687
- case 'Home':
1688
- if (!menuIsOpen) return;
1689
- _this.focusOption('first');
1690
- break;
1691
- case 'End':
1692
- if (!menuIsOpen) return;
1693
- _this.focusOption('last');
1694
- break;
1695
- default:
1696
- return;
1697
- }
1698
- event.preventDefault();
1699
- };
1700
- _this.state.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId);
1701
- _this.state.selectValue = cleanValue(_props.value);
1702
- // Set focusedOption if menuIsOpen is set on init (e.g. defaultMenuIsOpen)
1703
- if (_props.menuIsOpen && _this.state.selectValue.length) {
1704
- var focusableOptionsWithIds = _this.getFocusableOptionsWithIds();
1705
- var focusableOptions = _this.buildFocusableOptions();
1706
- var optionIndex = focusableOptions.indexOf(_this.state.selectValue[0]);
1707
- _this.state.focusableOptionsWithIds = focusableOptionsWithIds;
1708
- _this.state.focusedOption = focusableOptions[optionIndex];
1709
- _this.state.focusedOptionId = getFocusedOptionId(focusableOptionsWithIds, focusableOptions[optionIndex]);
1710
- }
1711
- return _this;
1712
- }
1713
- _createClass(Select, [{
1714
- key: "componentDidMount",
1715
- value: function componentDidMount() {
1716
- this.startListeningComposition();
1717
- this.startListeningToTouch();
1718
- if (this.props.closeMenuOnScroll && document && document.addEventListener) {
1719
- // Listen to all scroll events, and filter them out inside of 'onScroll'
1720
- document.addEventListener('scroll', this.onScroll, true);
1721
- }
1722
- if (this.props.autoFocus) {
1723
- this.focusInput();
1724
- }
1725
-
1726
- // Scroll focusedOption into view if menuIsOpen is set on mount (e.g. defaultMenuIsOpen)
1727
- if (this.props.menuIsOpen && this.state.focusedOption && this.menuListRef && this.focusedOptionRef) {
1728
- scrollIntoView(this.menuListRef, this.focusedOptionRef);
1729
- }
1730
- }
1731
- }, {
1732
- key: "componentDidUpdate",
1733
- value: function componentDidUpdate(prevProps) {
1734
- var _this$props6 = this.props,
1735
- isDisabled = _this$props6.isDisabled,
1736
- menuIsOpen = _this$props6.menuIsOpen;
1737
- var isFocused = this.state.isFocused;
1738
- if (
1739
- // ensure focus is restored correctly when the control becomes enabled
1740
- isFocused && !isDisabled && prevProps.isDisabled ||
1741
- // ensure focus is on the Input when the menu opens
1742
- isFocused && menuIsOpen && !prevProps.menuIsOpen) {
1743
- this.focusInput();
1744
- }
1745
- if (isFocused && isDisabled && !prevProps.isDisabled) {
1746
- // ensure select state gets blurred in case Select is programmatically disabled while focused
1747
- // eslint-disable-next-line react/no-did-update-set-state
1748
- this.setState({
1749
- isFocused: false
1750
- }, this.onMenuClose);
1751
- } else if (!isFocused && !isDisabled && prevProps.isDisabled && this.inputRef === document.activeElement) {
1752
- // ensure select state gets focused in case Select is programatically re-enabled while focused (Firefox)
1753
- // eslint-disable-next-line react/no-did-update-set-state
1754
- this.setState({
1755
- isFocused: true
1756
- });
1757
- }
1758
-
1759
- // scroll the focused option into view if necessary
1760
- if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) {
1761
- scrollIntoView(this.menuListRef, this.focusedOptionRef);
1762
- this.scrollToFocusedOptionOnUpdate = false;
1763
- }
1764
- }
1765
- }, {
1766
- key: "componentWillUnmount",
1767
- value: function componentWillUnmount() {
1768
- this.stopListeningComposition();
1769
- this.stopListeningToTouch();
1770
- document.removeEventListener('scroll', this.onScroll, true);
1771
- }
1772
-
1773
- // ==============================
1774
- // Consumer Handlers
1775
- // ==============================
1776
- }, {
1777
- key: "onMenuOpen",
1778
- value: function onMenuOpen() {
1779
- this.props.onMenuOpen();
1780
- }
1781
- }, {
1782
- key: "onMenuClose",
1783
- value: function onMenuClose() {
1784
- this.onInputChange('', {
1785
- action: 'menu-close',
1786
- prevInputValue: this.props.inputValue
1787
- });
1788
- this.props.onMenuClose();
1789
- }
1790
- }, {
1791
- key: "onInputChange",
1792
- value: function onInputChange(newValue, actionMeta) {
1793
- this.props.onInputChange(newValue, actionMeta);
1794
- }
1795
-
1796
- // ==============================
1797
- // Methods
1798
- // ==============================
1799
- }, {
1800
- key: "focusInput",
1801
- value: function focusInput() {
1802
- if (!this.inputRef) return;
1803
- this.inputRef.focus();
1804
- }
1805
- }, {
1806
- key: "blurInput",
1807
- value: function blurInput() {
1808
- if (!this.inputRef) return;
1809
- this.inputRef.blur();
1810
- }
1811
-
1812
- // aliased for consumers
1813
- }, {
1814
- key: "openMenu",
1815
- value: function openMenu(focusOption) {
1816
- var _this2 = this;
1817
- var _this$state2 = this.state,
1818
- selectValue = _this$state2.selectValue,
1819
- isFocused = _this$state2.isFocused;
1820
- var focusableOptions = this.buildFocusableOptions();
1821
- var openAtIndex = focusOption === 'first' ? 0 : focusableOptions.length - 1;
1822
- if (!this.props.isMulti) {
1823
- var selectedIndex = focusableOptions.indexOf(selectValue[0]);
1824
- if (selectedIndex > -1) {
1825
- openAtIndex = selectedIndex;
1826
- }
1827
- }
1828
-
1829
- // only scroll if the menu isn't already open
1830
- this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef);
1831
- this.setState({
1832
- inputIsHiddenAfterUpdate: false,
1833
- focusedValue: null,
1834
- focusedOption: focusableOptions[openAtIndex],
1835
- focusedOptionId: this.getFocusedOptionId(focusableOptions[openAtIndex])
1836
- }, function () {
1837
- return _this2.onMenuOpen();
1838
- });
1839
- }
1840
- }, {
1841
- key: "focusValue",
1842
- value: function focusValue(direction) {
1843
- var _this$state3 = this.state,
1844
- selectValue = _this$state3.selectValue,
1845
- focusedValue = _this$state3.focusedValue;
1846
-
1847
- // Only multiselects support value focusing
1848
- if (!this.props.isMulti) return;
1849
- this.setState({
1850
- focusedOption: null
1851
- });
1852
- var focusedIndex = selectValue.indexOf(focusedValue);
1853
- if (!focusedValue) {
1854
- focusedIndex = -1;
1855
- }
1856
- var lastIndex = selectValue.length - 1;
1857
- var nextFocus = -1;
1858
- if (!selectValue.length) return;
1859
- switch (direction) {
1860
- case 'previous':
1861
- if (focusedIndex === 0) {
1862
- // don't cycle from the start to the end
1863
- nextFocus = 0;
1864
- } else if (focusedIndex === -1) {
1865
- // if nothing is focused, focus the last value first
1866
- nextFocus = lastIndex;
1867
- } else {
1868
- nextFocus = focusedIndex - 1;
1869
- }
1870
- break;
1871
- case 'next':
1872
- if (focusedIndex > -1 && focusedIndex < lastIndex) {
1873
- nextFocus = focusedIndex + 1;
1874
- }
1875
- break;
1876
- }
1877
- this.setState({
1878
- inputIsHidden: nextFocus !== -1,
1879
- focusedValue: selectValue[nextFocus]
1880
- });
1881
- }
1882
- }, {
1883
- key: "focusOption",
1884
- value: function focusOption() {
1885
- var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first';
1886
- var pageSize = this.props.pageSize;
1887
- var focusedOption = this.state.focusedOption;
1888
- var options = this.getFocusableOptions();
1889
- if (!options.length) return;
1890
- var nextFocus = 0; // handles 'first'
1891
- var focusedIndex = options.indexOf(focusedOption);
1892
- if (!focusedOption) {
1893
- focusedIndex = -1;
1894
- }
1895
- if (direction === 'up') {
1896
- nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1;
1897
- } else if (direction === 'down') {
1898
- nextFocus = (focusedIndex + 1) % options.length;
1899
- } else if (direction === 'pageup') {
1900
- nextFocus = focusedIndex - pageSize;
1901
- if (nextFocus < 0) nextFocus = 0;
1902
- } else if (direction === 'pagedown') {
1903
- nextFocus = focusedIndex + pageSize;
1904
- if (nextFocus > options.length - 1) nextFocus = options.length - 1;
1905
- } else if (direction === 'last') {
1906
- nextFocus = options.length - 1;
1907
- }
1908
- this.scrollToFocusedOptionOnUpdate = true;
1909
- this.setState({
1910
- focusedOption: options[nextFocus],
1911
- focusedValue: null,
1912
- focusedOptionId: this.getFocusedOptionId(options[nextFocus])
1913
- });
1914
- }
1915
- }, {
1916
- key: "getTheme",
1917
- value:
1918
- // ==============================
1919
- // Getters
1920
- // ==============================
1921
-
1922
- function getTheme() {
1923
- // Use the default theme if there are no customisations.
1924
- if (!this.props.theme) {
1925
- return defaultTheme;
1926
- }
1927
- // If the theme prop is a function, assume the function
1928
- // knows how to merge the passed-in default theme with
1929
- // its own modifications.
1930
- if (typeof this.props.theme === 'function') {
1931
- return this.props.theme(defaultTheme);
1932
- }
1933
- // Otherwise, if a plain theme object was passed in,
1934
- // overlay it with the default theme.
1935
- return _objectSpread2(_objectSpread2({}, defaultTheme), this.props.theme);
1936
- }
1937
- }, {
1938
- key: "getCommonProps",
1939
- value: function getCommonProps() {
1940
- var clearValue = this.clearValue,
1941
- cx = this.cx,
1942
- getStyles = this.getStyles,
1943
- getClassNames = this.getClassNames,
1944
- getValue = this.getValue,
1945
- selectOption = this.selectOption,
1946
- setValue = this.setValue,
1947
- props = this.props;
1948
- var isMulti = props.isMulti,
1949
- isRtl = props.isRtl,
1950
- options = props.options;
1951
- var hasValue = this.hasValue();
1952
- return {
1953
- clearValue: clearValue,
1954
- cx: cx,
1955
- getStyles: getStyles,
1956
- getClassNames: getClassNames,
1957
- getValue: getValue,
1958
- hasValue: hasValue,
1959
- isMulti: isMulti,
1960
- isRtl: isRtl,
1961
- options: options,
1962
- selectOption: selectOption,
1963
- selectProps: props,
1964
- setValue: setValue,
1965
- theme: this.getTheme()
1966
- };
1967
- }
1968
- }, {
1969
- key: "hasValue",
1970
- value: function hasValue() {
1971
- var selectValue = this.state.selectValue;
1972
- return selectValue.length > 0;
1973
- }
1974
- }, {
1975
- key: "hasOptions",
1976
- value: function hasOptions() {
1977
- return !!this.getFocusableOptions().length;
1978
- }
1979
- }, {
1980
- key: "isClearable",
1981
- value: function isClearable() {
1982
- var _this$props7 = this.props,
1983
- isClearable = _this$props7.isClearable,
1984
- isMulti = _this$props7.isMulti;
1985
-
1986
- // single select, by default, IS NOT clearable
1987
- // multi select, by default, IS clearable
1988
- if (isClearable === undefined) return isMulti;
1989
- return isClearable;
1990
- }
1991
- }, {
1992
- key: "isOptionDisabled",
1993
- value: function isOptionDisabled(option, selectValue) {
1994
- return _isOptionDisabled(this.props, option, selectValue);
1995
- }
1996
- }, {
1997
- key: "isOptionSelected",
1998
- value: function isOptionSelected(option, selectValue) {
1999
- return _isOptionSelected(this.props, option, selectValue);
2000
- }
2001
- }, {
2002
- key: "filterOption",
2003
- value: function filterOption(option, inputValue) {
2004
- return _filterOption(this.props, option, inputValue);
2005
- }
2006
- }, {
2007
- key: "formatOptionLabel",
2008
- value: function formatOptionLabel(data, context) {
2009
- if (typeof this.props.formatOptionLabel === 'function') {
2010
- var _inputValue = this.props.inputValue;
2011
- var _selectValue = this.state.selectValue;
2012
- return this.props.formatOptionLabel(data, {
2013
- context: context,
2014
- inputValue: _inputValue,
2015
- selectValue: _selectValue
2016
- });
2017
- } else {
2018
- return this.getOptionLabel(data);
2019
- }
2020
- }
2021
- }, {
2022
- key: "formatGroupLabel",
2023
- value: function formatGroupLabel(data) {
2024
- return this.props.formatGroupLabel(data);
2025
- }
2026
-
2027
- // ==============================
2028
- // Mouse Handlers
2029
- // ==============================
2030
- }, {
2031
- key: "startListeningComposition",
2032
- value:
2033
- // ==============================
2034
- // Composition Handlers
2035
- // ==============================
2036
-
2037
- function startListeningComposition() {
2038
- if (document && document.addEventListener) {
2039
- document.addEventListener('compositionstart', this.onCompositionStart, false);
2040
- document.addEventListener('compositionend', this.onCompositionEnd, false);
2041
- }
2042
- }
2043
- }, {
2044
- key: "stopListeningComposition",
2045
- value: function stopListeningComposition() {
2046
- if (document && document.removeEventListener) {
2047
- document.removeEventListener('compositionstart', this.onCompositionStart);
2048
- document.removeEventListener('compositionend', this.onCompositionEnd);
2049
- }
2050
- }
2051
- }, {
2052
- key: "startListeningToTouch",
2053
- value:
2054
- // ==============================
2055
- // Touch Handlers
2056
- // ==============================
2057
-
2058
- function startListeningToTouch() {
2059
- if (document && document.addEventListener) {
2060
- document.addEventListener('touchstart', this.onTouchStart, false);
2061
- document.addEventListener('touchmove', this.onTouchMove, false);
2062
- document.addEventListener('touchend', this.onTouchEnd, false);
2063
- }
2064
- }
2065
- }, {
2066
- key: "stopListeningToTouch",
2067
- value: function stopListeningToTouch() {
2068
- if (document && document.removeEventListener) {
2069
- document.removeEventListener('touchstart', this.onTouchStart);
2070
- document.removeEventListener('touchmove', this.onTouchMove);
2071
- document.removeEventListener('touchend', this.onTouchEnd);
2072
- }
2073
- }
2074
- }, {
2075
- key: "renderInput",
2076
- value:
2077
- // ==============================
2078
- // Renderers
2079
- // ==============================
2080
- function renderInput() {
2081
- var _this$props8 = this.props,
2082
- isDisabled = _this$props8.isDisabled,
2083
- isSearchable = _this$props8.isSearchable,
2084
- inputId = _this$props8.inputId,
2085
- inputValue = _this$props8.inputValue,
2086
- tabIndex = _this$props8.tabIndex,
2087
- form = _this$props8.form,
2088
- menuIsOpen = _this$props8.menuIsOpen,
2089
- required = _this$props8.required;
2090
- var _this$getComponents = this.getComponents(),
2091
- Input = _this$getComponents.Input;
2092
- var _this$state4 = this.state,
2093
- inputIsHidden = _this$state4.inputIsHidden,
2094
- ariaSelection = _this$state4.ariaSelection;
2095
- var commonProps = this.commonProps;
2096
- var id = inputId || this.getElementId('input');
2097
-
2098
- // aria attributes makes the JSX "noisy", separated for clarity
2099
- var ariaAttributes = _objectSpread2(_objectSpread2(_objectSpread2({
2100
- 'aria-autocomplete': 'list',
2101
- 'aria-expanded': menuIsOpen,
2102
- 'aria-haspopup': true,
2103
- 'aria-errormessage': this.props['aria-errormessage'],
2104
- 'aria-invalid': this.props['aria-invalid'],
2105
- 'aria-label': this.props['aria-label'],
2106
- 'aria-labelledby': this.props['aria-labelledby'],
2107
- 'aria-required': required,
2108
- role: 'combobox',
2109
- 'aria-activedescendant': this.isAppleDevice ? undefined : this.state.focusedOptionId || ''
2110
- }, menuIsOpen && {
2111
- 'aria-controls': this.getElementId('listbox')
2112
- }), !isSearchable && {
2113
- 'aria-readonly': true
2114
- }), this.hasValue() ? (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === 'initial-input-focus' && {
2115
- 'aria-describedby': this.getElementId('live-region')
2116
- } : {
2117
- 'aria-describedby': this.getElementId('placeholder')
2118
- });
2119
- if (!isSearchable) {
2120
- // use a dummy input to maintain focus/blur functionality
2121
- return /*#__PURE__*/react.exports.createElement(DummyInput, _extends({
2122
- id: id,
2123
- innerRef: this.getInputRef,
2124
- onBlur: this.onInputBlur,
2125
- onChange: noop,
2126
- onFocus: this.onInputFocus,
2127
- disabled: isDisabled,
2128
- tabIndex: tabIndex,
2129
- inputMode: "none",
2130
- form: form,
2131
- value: ""
2132
- }, ariaAttributes));
2133
- }
2134
- return /*#__PURE__*/react.exports.createElement(Input, _extends({}, commonProps, {
2135
- autoCapitalize: "none",
2136
- autoComplete: "off",
2137
- autoCorrect: "off",
2138
- id: id,
2139
- innerRef: this.getInputRef,
2140
- isDisabled: isDisabled,
2141
- isHidden: inputIsHidden,
2142
- onBlur: this.onInputBlur,
2143
- onChange: this.handleInputChange,
2144
- onFocus: this.onInputFocus,
2145
- spellCheck: "false",
2146
- tabIndex: tabIndex,
2147
- form: form,
2148
- type: "text",
2149
- value: inputValue
2150
- }, ariaAttributes));
2151
- }
2152
- }, {
2153
- key: "renderPlaceholderOrValue",
2154
- value: function renderPlaceholderOrValue() {
2155
- var _this3 = this;
2156
- var _this$getComponents2 = this.getComponents(),
2157
- MultiValue = _this$getComponents2.MultiValue,
2158
- MultiValueContainer = _this$getComponents2.MultiValueContainer,
2159
- MultiValueLabel = _this$getComponents2.MultiValueLabel,
2160
- MultiValueRemove = _this$getComponents2.MultiValueRemove,
2161
- SingleValue = _this$getComponents2.SingleValue,
2162
- Placeholder = _this$getComponents2.Placeholder;
2163
- var commonProps = this.commonProps;
2164
- var _this$props9 = this.props,
2165
- controlShouldRenderValue = _this$props9.controlShouldRenderValue,
2166
- isDisabled = _this$props9.isDisabled,
2167
- isMulti = _this$props9.isMulti,
2168
- inputValue = _this$props9.inputValue,
2169
- placeholder = _this$props9.placeholder;
2170
- var _this$state5 = this.state,
2171
- selectValue = _this$state5.selectValue,
2172
- focusedValue = _this$state5.focusedValue,
2173
- isFocused = _this$state5.isFocused;
2174
- if (!this.hasValue() || !controlShouldRenderValue) {
2175
- return inputValue ? null : /*#__PURE__*/react.exports.createElement(Placeholder, _extends({}, commonProps, {
2176
- key: "placeholder",
2177
- isDisabled: isDisabled,
2178
- isFocused: isFocused,
2179
- innerProps: {
2180
- id: this.getElementId('placeholder')
2181
- }
2182
- }), placeholder);
2183
- }
2184
- if (isMulti) {
2185
- return selectValue.map(function (opt, index) {
2186
- var isOptionFocused = opt === focusedValue;
2187
- var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
2188
- return /*#__PURE__*/react.exports.createElement(MultiValue, _extends({}, commonProps, {
2189
- components: {
2190
- Container: MultiValueContainer,
2191
- Label: MultiValueLabel,
2192
- Remove: MultiValueRemove
2193
- },
2194
- isFocused: isOptionFocused,
2195
- isDisabled: isDisabled,
2196
- key: key,
2197
- index: index,
2198
- removeProps: {
2199
- onClick: function onClick() {
2200
- return _this3.removeValue(opt);
2201
- },
2202
- onTouchEnd: function onTouchEnd() {
2203
- return _this3.removeValue(opt);
2204
- },
2205
- onMouseDown: function onMouseDown(e) {
2206
- e.preventDefault();
2207
- }
2208
- },
2209
- data: opt
2210
- }), _this3.formatOptionLabel(opt, 'value'));
2211
- });
2212
- }
2213
- if (inputValue) {
2214
- return null;
2215
- }
2216
- var singleValue = selectValue[0];
2217
- return /*#__PURE__*/react.exports.createElement(SingleValue, _extends({}, commonProps, {
2218
- data: singleValue,
2219
- isDisabled: isDisabled
2220
- }), this.formatOptionLabel(singleValue, 'value'));
2221
- }
2222
- }, {
2223
- key: "renderClearIndicator",
2224
- value: function renderClearIndicator() {
2225
- var _this$getComponents3 = this.getComponents(),
2226
- ClearIndicator = _this$getComponents3.ClearIndicator;
2227
- var commonProps = this.commonProps;
2228
- var _this$props10 = this.props,
2229
- isDisabled = _this$props10.isDisabled,
2230
- isLoading = _this$props10.isLoading;
2231
- var isFocused = this.state.isFocused;
2232
- if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {
2233
- return null;
2234
- }
2235
- var innerProps = {
2236
- onMouseDown: this.onClearIndicatorMouseDown,
2237
- onTouchEnd: this.onClearIndicatorTouchEnd,
2238
- 'aria-hidden': 'true'
2239
- };
2240
- return /*#__PURE__*/react.exports.createElement(ClearIndicator, _extends({}, commonProps, {
2241
- innerProps: innerProps,
2242
- isFocused: isFocused
2243
- }));
2244
- }
2245
- }, {
2246
- key: "renderLoadingIndicator",
2247
- value: function renderLoadingIndicator() {
2248
- var _this$getComponents4 = this.getComponents(),
2249
- LoadingIndicator = _this$getComponents4.LoadingIndicator;
2250
- var commonProps = this.commonProps;
2251
- var _this$props11 = this.props,
2252
- isDisabled = _this$props11.isDisabled,
2253
- isLoading = _this$props11.isLoading;
2254
- var isFocused = this.state.isFocused;
2255
- if (!LoadingIndicator || !isLoading) return null;
2256
- var innerProps = {
2257
- 'aria-hidden': 'true'
2258
- };
2259
- return /*#__PURE__*/react.exports.createElement(LoadingIndicator, _extends({}, commonProps, {
2260
- innerProps: innerProps,
2261
- isDisabled: isDisabled,
2262
- isFocused: isFocused
2263
- }));
2264
- }
2265
- }, {
2266
- key: "renderIndicatorSeparator",
2267
- value: function renderIndicatorSeparator() {
2268
- var _this$getComponents5 = this.getComponents(),
2269
- DropdownIndicator = _this$getComponents5.DropdownIndicator,
2270
- IndicatorSeparator = _this$getComponents5.IndicatorSeparator;
2271
-
2272
- // separator doesn't make sense without the dropdown indicator
2273
- if (!DropdownIndicator || !IndicatorSeparator) return null;
2274
- var commonProps = this.commonProps;
2275
- var isDisabled = this.props.isDisabled;
2276
- var isFocused = this.state.isFocused;
2277
- return /*#__PURE__*/react.exports.createElement(IndicatorSeparator, _extends({}, commonProps, {
2278
- isDisabled: isDisabled,
2279
- isFocused: isFocused
2280
- }));
2281
- }
2282
- }, {
2283
- key: "renderDropdownIndicator",
2284
- value: function renderDropdownIndicator() {
2285
- var _this$getComponents6 = this.getComponents(),
2286
- DropdownIndicator = _this$getComponents6.DropdownIndicator;
2287
- if (!DropdownIndicator) return null;
2288
- var commonProps = this.commonProps;
2289
- var isDisabled = this.props.isDisabled;
2290
- var isFocused = this.state.isFocused;
2291
- var innerProps = {
2292
- onMouseDown: this.onDropdownIndicatorMouseDown,
2293
- onTouchEnd: this.onDropdownIndicatorTouchEnd,
2294
- 'aria-hidden': 'true'
2295
- };
2296
- return /*#__PURE__*/react.exports.createElement(DropdownIndicator, _extends({}, commonProps, {
2297
- innerProps: innerProps,
2298
- isDisabled: isDisabled,
2299
- isFocused: isFocused
2300
- }));
2301
- }
2302
- }, {
2303
- key: "renderMenu",
2304
- value: function renderMenu() {
2305
- var _this4 = this;
2306
- var _this$getComponents7 = this.getComponents(),
2307
- Group = _this$getComponents7.Group,
2308
- GroupHeading = _this$getComponents7.GroupHeading,
2309
- Menu = _this$getComponents7.Menu,
2310
- MenuList = _this$getComponents7.MenuList,
2311
- MenuPortal = _this$getComponents7.MenuPortal,
2312
- LoadingMessage = _this$getComponents7.LoadingMessage,
2313
- NoOptionsMessage = _this$getComponents7.NoOptionsMessage,
2314
- Option = _this$getComponents7.Option;
2315
- var commonProps = this.commonProps;
2316
- var focusedOption = this.state.focusedOption;
2317
- var _this$props12 = this.props,
2318
- captureMenuScroll = _this$props12.captureMenuScroll,
2319
- inputValue = _this$props12.inputValue,
2320
- isLoading = _this$props12.isLoading,
2321
- loadingMessage = _this$props12.loadingMessage,
2322
- minMenuHeight = _this$props12.minMenuHeight,
2323
- maxMenuHeight = _this$props12.maxMenuHeight,
2324
- menuIsOpen = _this$props12.menuIsOpen,
2325
- menuPlacement = _this$props12.menuPlacement,
2326
- menuPosition = _this$props12.menuPosition,
2327
- menuPortalTarget = _this$props12.menuPortalTarget,
2328
- menuShouldBlockScroll = _this$props12.menuShouldBlockScroll,
2329
- menuShouldScrollIntoView = _this$props12.menuShouldScrollIntoView,
2330
- noOptionsMessage = _this$props12.noOptionsMessage,
2331
- onMenuScrollToTop = _this$props12.onMenuScrollToTop,
2332
- onMenuScrollToBottom = _this$props12.onMenuScrollToBottom;
2333
- if (!menuIsOpen) return null;
2334
-
2335
- // TODO: Internal Option Type here
2336
- var render = function render(props, id) {
2337
- var type = props.type,
2338
- data = props.data,
2339
- isDisabled = props.isDisabled,
2340
- isSelected = props.isSelected,
2341
- label = props.label,
2342
- value = props.value;
2343
- var isFocused = focusedOption === data;
2344
- var onHover = isDisabled ? undefined : function () {
2345
- return _this4.onOptionHover(data);
2346
- };
2347
- var onSelect = isDisabled ? undefined : function () {
2348
- return _this4.selectOption(data);
2349
- };
2350
- var optionId = "".concat(_this4.getElementId('option'), "-").concat(id);
2351
- var innerProps = {
2352
- id: optionId,
2353
- onClick: onSelect,
2354
- onMouseMove: onHover,
2355
- onMouseOver: onHover,
2356
- tabIndex: -1,
2357
- role: 'option',
2358
- 'aria-selected': _this4.isAppleDevice ? undefined : isSelected // is not supported on Apple devices
2359
- };
2360
-
2361
- return /*#__PURE__*/react.exports.createElement(Option, _extends({}, commonProps, {
2362
- innerProps: innerProps,
2363
- data: data,
2364
- isDisabled: isDisabled,
2365
- isSelected: isSelected,
2366
- key: optionId,
2367
- label: label,
2368
- type: type,
2369
- value: value,
2370
- isFocused: isFocused,
2371
- innerRef: isFocused ? _this4.getFocusedOptionRef : undefined
2372
- }), _this4.formatOptionLabel(props.data, 'menu'));
2373
- };
2374
- var menuUI;
2375
- if (this.hasOptions()) {
2376
- menuUI = this.getCategorizedOptions().map(function (item) {
2377
- if (item.type === 'group') {
2378
- var _data = item.data,
2379
- options = item.options,
2380
- groupIndex = item.index;
2381
- var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
2382
- var headingId = "".concat(groupId, "-heading");
2383
- return /*#__PURE__*/react.exports.createElement(Group, _extends({}, commonProps, {
2384
- key: groupId,
2385
- data: _data,
2386
- options: options,
2387
- Heading: GroupHeading,
2388
- headingProps: {
2389
- id: headingId,
2390
- data: item.data
2391
- },
2392
- label: _this4.formatGroupLabel(item.data)
2393
- }), item.options.map(function (option) {
2394
- return render(option, "".concat(groupIndex, "-").concat(option.index));
2395
- }));
2396
- } else if (item.type === 'option') {
2397
- return render(item, "".concat(item.index));
2398
- }
2399
- });
2400
- } else if (isLoading) {
2401
- var message = loadingMessage({
2402
- inputValue: inputValue
2403
- });
2404
- if (message === null) return null;
2405
- menuUI = /*#__PURE__*/react.exports.createElement(LoadingMessage, commonProps, message);
2406
- } else {
2407
- var _message = noOptionsMessage({
2408
- inputValue: inputValue
2409
- });
2410
- if (_message === null) return null;
2411
- menuUI = /*#__PURE__*/react.exports.createElement(NoOptionsMessage, commonProps, _message);
2412
- }
2413
- var menuPlacementProps = {
2414
- minMenuHeight: minMenuHeight,
2415
- maxMenuHeight: maxMenuHeight,
2416
- menuPlacement: menuPlacement,
2417
- menuPosition: menuPosition,
2418
- menuShouldScrollIntoView: menuShouldScrollIntoView
2419
- };
2420
- var menuElement = /*#__PURE__*/react.exports.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function (_ref4) {
2421
- var ref = _ref4.ref,
2422
- _ref4$placerProps = _ref4.placerProps,
2423
- placement = _ref4$placerProps.placement,
2424
- maxHeight = _ref4$placerProps.maxHeight;
2425
- return /*#__PURE__*/react.exports.createElement(Menu, _extends({}, commonProps, menuPlacementProps, {
2426
- innerRef: ref,
2427
- innerProps: {
2428
- onMouseDown: _this4.onMenuMouseDown,
2429
- onMouseMove: _this4.onMenuMouseMove
2430
- },
2431
- isLoading: isLoading,
2432
- placement: placement
2433
- }), /*#__PURE__*/react.exports.createElement(ScrollManager, {
2434
- captureEnabled: captureMenuScroll,
2435
- onTopArrive: onMenuScrollToTop,
2436
- onBottomArrive: onMenuScrollToBottom,
2437
- lockEnabled: menuShouldBlockScroll
2438
- }, function (scrollTargetRef) {
2439
- return /*#__PURE__*/react.exports.createElement(MenuList, _extends({}, commonProps, {
2440
- innerRef: function innerRef(instance) {
2441
- _this4.getMenuListRef(instance);
2442
- scrollTargetRef(instance);
2443
- },
2444
- innerProps: {
2445
- role: 'listbox',
2446
- 'aria-multiselectable': commonProps.isMulti,
2447
- id: _this4.getElementId('listbox')
2448
- },
2449
- isLoading: isLoading,
2450
- maxHeight: maxHeight,
2451
- focusedOption: focusedOption
2452
- }), menuUI);
2453
- }));
2454
- });
2455
-
2456
- // positioning behaviour is almost identical for portalled and fixed,
2457
- // so we use the same component. the actual portalling logic is forked
2458
- // within the component based on `menuPosition`
2459
- return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/react.exports.createElement(MenuPortal, _extends({}, commonProps, {
2460
- appendTo: menuPortalTarget,
2461
- controlElement: this.controlRef,
2462
- menuPlacement: menuPlacement,
2463
- menuPosition: menuPosition
2464
- }), menuElement) : menuElement;
2465
- }
2466
- }, {
2467
- key: "renderFormField",
2468
- value: function renderFormField() {
2469
- var _this5 = this;
2470
- var _this$props13 = this.props,
2471
- delimiter = _this$props13.delimiter,
2472
- isDisabled = _this$props13.isDisabled,
2473
- isMulti = _this$props13.isMulti,
2474
- name = _this$props13.name,
2475
- required = _this$props13.required;
2476
- var selectValue = this.state.selectValue;
2477
- if (required && !this.hasValue() && !isDisabled) {
2478
- return /*#__PURE__*/react.exports.createElement(RequiredInput$1, {
2479
- name: name,
2480
- onFocus: this.onValueInputFocus
2481
- });
2482
- }
2483
- if (!name || isDisabled) return;
2484
- if (isMulti) {
2485
- if (delimiter) {
2486
- var value = selectValue.map(function (opt) {
2487
- return _this5.getOptionValue(opt);
2488
- }).join(delimiter);
2489
- return /*#__PURE__*/react.exports.createElement("input", {
2490
- name: name,
2491
- type: "hidden",
2492
- value: value
2493
- });
2494
- } else {
2495
- var input = selectValue.length > 0 ? selectValue.map(function (opt, i) {
2496
- return /*#__PURE__*/react.exports.createElement("input", {
2497
- key: "i-".concat(i),
2498
- name: name,
2499
- type: "hidden",
2500
- value: _this5.getOptionValue(opt)
2501
- });
2502
- }) : /*#__PURE__*/react.exports.createElement("input", {
2503
- name: name,
2504
- type: "hidden",
2505
- value: ""
2506
- });
2507
- return /*#__PURE__*/react.exports.createElement("div", null, input);
2508
- }
2509
- } else {
2510
- var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : '';
2511
- return /*#__PURE__*/react.exports.createElement("input", {
2512
- name: name,
2513
- type: "hidden",
2514
- value: _value
2515
- });
2516
- }
2517
- }
2518
- }, {
2519
- key: "renderLiveRegion",
2520
- value: function renderLiveRegion() {
2521
- var commonProps = this.commonProps;
2522
- var _this$state6 = this.state,
2523
- ariaSelection = _this$state6.ariaSelection,
2524
- focusedOption = _this$state6.focusedOption,
2525
- focusedValue = _this$state6.focusedValue,
2526
- isFocused = _this$state6.isFocused,
2527
- selectValue = _this$state6.selectValue;
2528
- var focusableOptions = this.getFocusableOptions();
2529
- return /*#__PURE__*/react.exports.createElement(LiveRegion$1, _extends({}, commonProps, {
2530
- id: this.getElementId('live-region'),
2531
- ariaSelection: ariaSelection,
2532
- focusedOption: focusedOption,
2533
- focusedValue: focusedValue,
2534
- isFocused: isFocused,
2535
- selectValue: selectValue,
2536
- focusableOptions: focusableOptions,
2537
- isAppleDevice: this.isAppleDevice
2538
- }));
2539
- }
2540
- }, {
2541
- key: "render",
2542
- value: function render() {
2543
- var _this$getComponents8 = this.getComponents(),
2544
- Control = _this$getComponents8.Control,
2545
- IndicatorsContainer = _this$getComponents8.IndicatorsContainer,
2546
- SelectContainer = _this$getComponents8.SelectContainer,
2547
- ValueContainer = _this$getComponents8.ValueContainer;
2548
- var _this$props14 = this.props,
2549
- className = _this$props14.className,
2550
- id = _this$props14.id,
2551
- isDisabled = _this$props14.isDisabled,
2552
- menuIsOpen = _this$props14.menuIsOpen;
2553
- var isFocused = this.state.isFocused;
2554
- var commonProps = this.commonProps = this.getCommonProps();
2555
- return /*#__PURE__*/react.exports.createElement(SelectContainer, _extends({}, commonProps, {
2556
- className: className,
2557
- innerProps: {
2558
- id: id,
2559
- onKeyDown: this.onKeyDown
2560
- },
2561
- isDisabled: isDisabled,
2562
- isFocused: isFocused
2563
- }), this.renderLiveRegion(), /*#__PURE__*/react.exports.createElement(Control, _extends({}, commonProps, {
2564
- innerRef: this.getControlRef,
2565
- innerProps: {
2566
- onMouseDown: this.onControlMouseDown,
2567
- onTouchEnd: this.onControlTouchEnd
2568
- },
2569
- isDisabled: isDisabled,
2570
- isFocused: isFocused,
2571
- menuIsOpen: menuIsOpen
2572
- }), /*#__PURE__*/react.exports.createElement(ValueContainer, _extends({}, commonProps, {
2573
- isDisabled: isDisabled
2574
- }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/react.exports.createElement(IndicatorsContainer, _extends({}, commonProps, {
2575
- isDisabled: isDisabled
2576
- }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
2577
- }
2578
- }], [{
2579
- key: "getDerivedStateFromProps",
2580
- value: function getDerivedStateFromProps(props, state) {
2581
- var prevProps = state.prevProps,
2582
- clearFocusValueOnUpdate = state.clearFocusValueOnUpdate,
2583
- inputIsHiddenAfterUpdate = state.inputIsHiddenAfterUpdate,
2584
- ariaSelection = state.ariaSelection,
2585
- isFocused = state.isFocused,
2586
- prevWasFocused = state.prevWasFocused,
2587
- instancePrefix = state.instancePrefix;
2588
- var options = props.options,
2589
- value = props.value,
2590
- menuIsOpen = props.menuIsOpen,
2591
- inputValue = props.inputValue,
2592
- isMulti = props.isMulti;
2593
- var selectValue = cleanValue(value);
2594
- var newMenuOptionsState = {};
2595
- if (prevProps && (value !== prevProps.value || options !== prevProps.options || menuIsOpen !== prevProps.menuIsOpen || inputValue !== prevProps.inputValue)) {
2596
- var focusableOptions = menuIsOpen ? buildFocusableOptions(props, selectValue) : [];
2597
- var focusableOptionsWithIds = menuIsOpen ? buildFocusableOptionsWithIds(buildCategorizedOptions(props, selectValue), "".concat(instancePrefix, "-option")) : [];
2598
- var focusedValue = clearFocusValueOnUpdate ? getNextFocusedValue(state, selectValue) : null;
2599
- var focusedOption = getNextFocusedOption(state, focusableOptions);
2600
- var focusedOptionId = getFocusedOptionId(focusableOptionsWithIds, focusedOption);
2601
- newMenuOptionsState = {
2602
- selectValue: selectValue,
2603
- focusedOption: focusedOption,
2604
- focusedOptionId: focusedOptionId,
2605
- focusableOptionsWithIds: focusableOptionsWithIds,
2606
- focusedValue: focusedValue,
2607
- clearFocusValueOnUpdate: false
2608
- };
2609
- }
2610
- // some updates should toggle the state of the input visibility
2611
- var newInputIsHiddenState = inputIsHiddenAfterUpdate != null && props !== prevProps ? {
2612
- inputIsHidden: inputIsHiddenAfterUpdate,
2613
- inputIsHiddenAfterUpdate: undefined
2614
- } : {};
2615
- var newAriaSelection = ariaSelection;
2616
- var hasKeptFocus = isFocused && prevWasFocused;
2617
- if (isFocused && !hasKeptFocus) {
2618
- // If `value` or `defaultValue` props are not empty then announce them
2619
- // when the Select is initially focused
2620
- newAriaSelection = {
2621
- value: valueTernary(isMulti, selectValue, selectValue[0] || null),
2622
- options: selectValue,
2623
- action: 'initial-input-focus'
2624
- };
2625
- hasKeptFocus = !prevWasFocused;
2626
- }
2627
-
2628
- // If the 'initial-input-focus' action has been set already
2629
- // then reset the ariaSelection to null
2630
- if ((ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === 'initial-input-focus') {
2631
- newAriaSelection = null;
2632
- }
2633
- return _objectSpread2(_objectSpread2(_objectSpread2({}, newMenuOptionsState), newInputIsHiddenState), {}, {
2634
- prevProps: props,
2635
- ariaSelection: newAriaSelection,
2636
- prevWasFocused: hasKeptFocus
2637
- });
2638
- }
2639
- }]);
2640
- return Select;
2641
- }(react.exports.Component);
2642
- Select.defaultProps = defaultProps;
2643
-
2644
- export { Select as S, defaultProps as a, getOptionLabel$1 as b, createFilter as c, defaultTheme as d, getOptionValue$1 as g };