@ntbjs/react-components 2.0.0-rc.13 → 2.0.0-rc.27

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