@ntbjs/react-components 1.3.0-rc.9 → 2.0.0-rc.3

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 (518) hide show
  1. package/.eslintrc +7 -8
  2. package/cjs/_virtual/_rollupPluginBabelHelpers.js +84 -0
  3. package/cjs/_virtual/index.js +7 -0
  4. package/cjs/_virtual/index2.js +7 -0
  5. package/cjs/_virtual/index3.js +7 -0
  6. package/cjs/_virtual/index4.js +7 -0
  7. package/cjs/_virtual/index5.js +7 -0
  8. package/cjs/_virtual/react-dom.development.js +7 -0
  9. package/cjs/_virtual/react-dom.production.js +7 -0
  10. package/cjs/_virtual/react-is.development.js +7 -0
  11. package/cjs/_virtual/react-is.development2.js +7 -0
  12. package/cjs/_virtual/react-is.production.min.js +7 -0
  13. package/cjs/_virtual/react-is.production.min2.js +7 -0
  14. package/cjs/_virtual/react.development.js +7 -0
  15. package/cjs/_virtual/react.production.js +7 -0
  16. package/cjs/components/data/Alert/Alert.js +81 -0
  17. package/cjs/components/data/Alert/Alert.styled.js +72 -0
  18. package/cjs/components/data/Alert/data/Alert/index.js +9 -0
  19. package/cjs/components/data/Badge/Badge.js +93 -0
  20. package/cjs/components/data/Badge/Badge.styled.js +156 -0
  21. package/cjs/components/data/Badge/data/Badge/index.js +9 -0
  22. package/cjs/components/data/Popover/Popover.js +102 -0
  23. package/cjs/components/data/Popover/Popover.styled.js +159 -0
  24. package/cjs/components/data/Popover/data/Popover/index.js +9 -0
  25. package/cjs/components/data/Tab/Tab.js +31 -0
  26. package/cjs/components/data/Tab/Tab.styled.js +22 -0
  27. package/cjs/components/data/Tab/data/Tab/index.js +9 -0
  28. package/cjs/components/data/Tabs/Tabs.js +91 -0
  29. package/cjs/components/data/Tabs/Tabs.styled.js +97 -0
  30. package/cjs/components/data/Tabs/data/Tabs/index.js +9 -0
  31. package/cjs/components/data/Tooltip/Tooltip.js +50 -0
  32. package/cjs/components/data/Tooltip/Tooltip.styled.js +38 -0
  33. package/cjs/components/data/Tooltip/data/Tooltip/index.js +9 -0
  34. package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.js +42 -0
  35. package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +79 -0
  36. package/cjs/components/data/data/index.js +21 -0
  37. package/cjs/components/inputs/ActionButton/ActionButton.js +42 -0
  38. package/cjs/components/inputs/ActionButton/ActionButton.styled.js +66 -0
  39. package/cjs/components/inputs/ActionButton/inputs/ActionButton/index.js +9 -0
  40. package/cjs/components/inputs/Button/Button.js +188 -0
  41. package/cjs/components/inputs/Button/Button.styled.js +294 -0
  42. package/cjs/components/inputs/Button/inputs/Button/index.js +9 -0
  43. package/cjs/components/inputs/Checkbox/Checkbox.js +102 -0
  44. package/cjs/components/inputs/Checkbox/Checkbox.styled.js +145 -0
  45. package/cjs/components/inputs/Checkbox/inputs/Checkbox/index.js +9 -0
  46. package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +268 -0
  47. package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +352 -0
  48. package/cjs/components/inputs/CompactAutocompleteSelect/inputs/CompactAutocompleteSelect/index.js +9 -0
  49. package/cjs/components/inputs/CompactStarRating/CompactStarRating.js +178 -0
  50. package/cjs/components/inputs/CompactStarRating/CompactStarRating.styled.js +258 -0
  51. package/cjs/components/inputs/CompactStarRating/inputs/CompactStarRating/index.js +9 -0
  52. package/cjs/components/inputs/CompactTextInput/CompactTextInput.js +187 -0
  53. package/cjs/components/inputs/CompactTextInput/CompactTextInput.styled.js +352 -0
  54. package/cjs/components/inputs/CompactTextInput/inputs/CompactTextInput/index.js +9 -0
  55. package/cjs/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +253 -0
  56. package/cjs/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +89 -0
  57. package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +185 -0
  58. package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +122 -0
  59. package/cjs/components/inputs/MultiSelect/MultiSelect.js +251 -0
  60. package/cjs/components/inputs/MultiSelect/MultiSelect.styled.js +279 -0
  61. package/cjs/components/inputs/MultiSelect/inputs/MultiSelect/index.js +9 -0
  62. package/cjs/components/inputs/Radio/Radio.js +67 -0
  63. package/cjs/components/inputs/Radio/Radio.styled.js +93 -0
  64. package/cjs/components/inputs/Radio/inputs/Radio/index.js +9 -0
  65. package/cjs/components/inputs/Switch/Switch.js +69 -0
  66. package/cjs/components/inputs/Switch/Switch.styled.js +123 -0
  67. package/cjs/components/inputs/Switch/inputs/Switch/index.js +9 -0
  68. package/cjs/components/inputs/TextArea/TextArea.js +186 -0
  69. package/cjs/components/inputs/TextArea/TextArea.styled.js +455 -0
  70. package/cjs/components/inputs/TextArea/inputs/TextArea/index.js +9 -0
  71. package/cjs/components/inputs/TextInput/TextInput.js +147 -0
  72. package/cjs/components/inputs/TextInput/TextInput.styled.js +276 -0
  73. package/cjs/components/inputs/TextInput/inputs/TextInput/index.js +9 -0
  74. package/cjs/components/inputs/inputs/index.js +33 -0
  75. package/cjs/components/layout/InputGroup/InputGroup.js +26 -0
  76. package/cjs/components/layout/InputGroup/InputGroup.styled.js +18 -0
  77. package/cjs/components/layout/InputGroup/layout/InputGroup/index.js +9 -0
  78. package/cjs/components/layout/SectionSeparator/SectionSeparator.js +29 -0
  79. package/cjs/components/layout/SectionSeparator/SectionSeparator.styled.js +21 -0
  80. package/cjs/components/layout/SectionSeparator/layout/SectionSeparator/index.js +9 -0
  81. package/cjs/components/layout/layout/index.js +11 -0
  82. package/cjs/components/widgets/AssetAction/AssetAction.js +106 -0
  83. package/cjs/components/widgets/AssetAction/AssetAction.styled.js +58 -0
  84. package/cjs/components/widgets/AssetActionsBase/AssetActionsBase.js +35 -0
  85. package/cjs/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +24 -0
  86. package/cjs/components/widgets/AssetGallery/AssetGallery.js +102 -0
  87. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +392 -0
  88. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +43 -0
  89. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +402 -0
  90. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +338 -0
  91. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +396 -0
  92. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +328 -0
  93. package/cjs/components/widgets/AssetGallery/asset.propType.js +58 -0
  94. package/cjs/components/widgets/AssetGallery/widgets/AssetGallery/index.js +9 -0
  95. package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +50 -0
  96. package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +96 -0
  97. package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/widgets/AssetPreview/AssetPreviewTopBar/index.js +9 -0
  98. package/cjs/components/widgets/ContextMenu/ContextMenu.js +28 -0
  99. package/cjs/components/widgets/ContextMenu/ContextMenu.styled.js +19 -0
  100. package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +50 -0
  101. package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +93 -0
  102. package/cjs/components/widgets/ContextMenu/ContextMenuItem/widgets/ContextMenu/ContextMenuItem/index.js +9 -0
  103. package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +28 -0
  104. package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +30 -0
  105. package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/widgets/ContextMenu/ContextMenuItemsGroup/index.js +9 -0
  106. package/cjs/components/widgets/ContextMenu/widgets/ContextMenu/index.js +9 -0
  107. package/cjs/components/widgets/InfoCard/InfoCard.js +39 -0
  108. package/cjs/components/widgets/InfoCard/InfoCard.styled.js +110 -0
  109. package/cjs/components/widgets/InfoCard/widgets/InfoCard/index.js +9 -0
  110. package/cjs/components/widgets/Instructions/Instructions.js +217 -0
  111. package/cjs/components/widgets/Instructions/Instructions.styled.js +47 -0
  112. package/cjs/components/widgets/Instructions/widgets/Instructions/index.js +9 -0
  113. package/cjs/components/widgets/ProgressBar/ProgressBar.js +58 -0
  114. package/cjs/components/widgets/ProgressBar/ProgressBar.styled.js +154 -0
  115. package/cjs/components/widgets/ProgressBar/widgets/ProgressBar/index.js +9 -0
  116. package/cjs/components/widgets/SummaryCard/SummaryCard.js +92 -0
  117. package/cjs/components/widgets/SummaryCard/SummaryCard.styled.js +142 -0
  118. package/cjs/components/widgets/widgets/index.js +25 -0
  119. package/cjs/hooks/useEventListner.js +26 -0
  120. package/cjs/hooks/useIsomorphicLayoutEffect.js +11 -0
  121. package/cjs/hooks/useOnClickOutside.js +17 -0
  122. package/cjs/icons/arrow-back.svg.js +20 -0
  123. package/cjs/icons/arrow-forward.svg.js +20 -0
  124. package/cjs/icons/check-rectangle-filled.svg.js +20 -0
  125. package/cjs/icons/close.svg.js +20 -0
  126. package/cjs/icons/edit-note.svg.js +20 -0
  127. package/cjs/icons/expand-more.svg.js +20 -0
  128. package/cjs/icons/headset.svg.js +20 -0
  129. package/cjs/icons/layers.svg.js +20 -0
  130. package/cjs/icons/link.svg.js +20 -0
  131. package/cjs/icons/play.svg.js +20 -0
  132. package/cjs/icons/search.svg.js +20 -0
  133. package/cjs/icons/star-filled.svg.js +20 -0
  134. package/cjs/icons/star.svg.js +20 -0
  135. package/cjs/icons/triangle-right.svg.js +20 -0
  136. package/cjs/icons/verification.svg.js +20 -0
  137. package/cjs/icons/warning-circle.svg.js +20 -0
  138. package/cjs/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +11 -0
  139. package/cjs/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +9 -0
  140. package/cjs/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +11 -0
  141. package/cjs/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +10 -0
  142. package/cjs/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +9 -0
  143. package/cjs/node_modules/@babel/runtime/helpers/esm/createClass.js +19 -0
  144. package/cjs/node_modules/@babel/runtime/helpers/esm/createSuper.js +22 -0
  145. package/cjs/node_modules/@babel/runtime/helpers/esm/defineProperty.js +16 -0
  146. package/cjs/node_modules/@babel/runtime/helpers/esm/extends.js +15 -0
  147. package/cjs/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +11 -0
  148. package/cjs/node_modules/@babel/runtime/helpers/esm/inherits.js +20 -0
  149. package/cjs/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +14 -0
  150. package/cjs/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +9 -0
  151. package/cjs/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +33 -0
  152. package/cjs/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +9 -0
  153. package/cjs/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +9 -0
  154. package/cjs/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +29 -0
  155. package/cjs/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +19 -0
  156. package/cjs/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +15 -0
  157. package/cjs/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +14 -0
  158. package/cjs/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +11 -0
  159. package/cjs/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +14 -0
  160. package/cjs/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +13 -0
  161. package/cjs/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +14 -0
  162. package/cjs/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +18 -0
  163. package/cjs/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +13 -0
  164. package/cjs/node_modules/@babel/runtime/helpers/esm/typeof.js +15 -0
  165. package/cjs/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +15 -0
  166. package/cjs/node_modules/@emotion/cache/dist/emotion-cache.esm.js +503 -0
  167. package/cjs/node_modules/@emotion/hash/dist/emotion-hash.esm.js +59 -0
  168. package/cjs/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +13 -0
  169. package/cjs/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js +158 -0
  170. package/cjs/node_modules/@emotion/react/dist/emotion-react.esm.js +66 -0
  171. package/cjs/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +240 -0
  172. package/cjs/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js +144 -0
  173. package/cjs/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +56 -0
  174. package/cjs/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js +16 -0
  175. package/cjs/node_modules/@emotion/utils/dist/emotion-utils.esm.js +60 -0
  176. package/cjs/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +20 -0
  177. package/cjs/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +907 -0
  178. package/cjs/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +374 -0
  179. package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +128 -0
  180. package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +165 -0
  181. package/cjs/node_modules/@restart/hooks/esm/useMergedRefs.js +46 -0
  182. package/cjs/node_modules/@restart/hooks/esm/useUpdateEffect.js +41 -0
  183. package/cjs/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +24 -0
  184. package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +186 -0
  185. package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +22 -0
  186. package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +13 -0
  187. package/cjs/node_modules/memoize-one/dist/memoize-one.esm.js +55 -0
  188. package/cjs/node_modules/object-assign/index.js +94 -0
  189. package/cjs/node_modules/prop-types/checkPropTypes.js +110 -0
  190. package/cjs/node_modules/prop-types/factoryWithThrowingShims.js +69 -0
  191. package/cjs/node_modules/prop-types/factoryWithTypeCheckers.js +621 -0
  192. package/cjs/node_modules/prop-types/index.js +33 -0
  193. package/cjs/node_modules/prop-types/lib/ReactPropTypesSecret.js +16 -0
  194. package/cjs/node_modules/prop-types/lib/has.js +7 -0
  195. package/cjs/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +186 -0
  196. package/cjs/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +22 -0
  197. package/cjs/node_modules/prop-types/node_modules/react-is/index.js +13 -0
  198. package/cjs/node_modules/react/cjs/react.development.js +1246 -0
  199. package/cjs/node_modules/react/cjs/react.production.js +552 -0
  200. package/cjs/node_modules/react/index.js +19 -0
  201. package/cjs/node_modules/react-dom/cjs/react-dom.development.js +432 -0
  202. package/cjs/node_modules/react-dom/cjs/react-dom.production.js +218 -0
  203. package/cjs/node_modules/react-dom/index.js +44 -0
  204. package/cjs/node_modules/react-lazy-load-image-component/src/effects/opacity.css.js +6 -0
  205. package/cjs/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +23 -0
  206. package/cjs/node_modules/react-select/dist/Select-aab027f3.esm.js +2653 -0
  207. package/cjs/node_modules/react-select/dist/index-641ee5b8.esm.js +1426 -0
  208. package/cjs/node_modules/react-select/dist/useCreatable-84008237.esm.js +101 -0
  209. package/cjs/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js +78 -0
  210. package/cjs/node_modules/style-inject/dist/style-inject.es.js +32 -0
  211. package/cjs/node_modules/stylis/src/Enum.js +24 -0
  212. package/cjs/node_modules/stylis/src/Middleware.js +37 -0
  213. package/cjs/node_modules/stylis/src/Parser.js +201 -0
  214. package/cjs/node_modules/stylis/src/Serializer.js +43 -0
  215. package/cjs/node_modules/stylis/src/Tokenizer.js +243 -0
  216. package/cjs/node_modules/stylis/src/Utility.js +134 -0
  217. package/cjs/node_modules/tippy.js/animations/shift-away-subtle.css.js +6 -0
  218. package/cjs/node_modules/tippy.js/dist/tippy.css.js +6 -0
  219. package/cjs/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js +12 -0
  220. package/{ssr → cjs/ssr/ssr}/index.js +1 -3
  221. package/cjs/styles/utils/colors.scss.js +11 -0
  222. package/cjs/utils/dateTime.js +20 -0
  223. package/cjs/utils/defaultTheme.js +52 -0
  224. package/doctor-storybook.log +20 -0
  225. package/esm/_virtual/_rollupPluginBabelHelpers.js +74 -0
  226. package/esm/_virtual/index.js +3 -0
  227. package/esm/_virtual/index2.js +3 -0
  228. package/esm/_virtual/index3.js +3 -0
  229. package/esm/_virtual/index4.js +3 -0
  230. package/esm/_virtual/index5.js +3 -0
  231. package/esm/_virtual/react-dom.development.js +3 -0
  232. package/esm/_virtual/react-dom.production.js +3 -0
  233. package/esm/_virtual/react-is.development.js +3 -0
  234. package/esm/_virtual/react-is.development2.js +3 -0
  235. package/esm/_virtual/react-is.production.min.js +3 -0
  236. package/esm/_virtual/react-is.production.min2.js +3 -0
  237. package/esm/_virtual/react.development.js +3 -0
  238. package/esm/_virtual/react.production.js +3 -0
  239. package/esm/components/data/Alert/Alert.js +77 -0
  240. package/esm/components/data/Alert/Alert.styled.js +63 -0
  241. package/esm/components/data/Alert/data/Alert/index.js +1 -0
  242. package/esm/components/data/Badge/Badge.js +89 -0
  243. package/esm/components/data/Badge/Badge.styled.js +145 -0
  244. package/esm/components/data/Badge/data/Badge/index.js +1 -0
  245. package/esm/components/data/Popover/Popover.js +94 -0
  246. package/esm/components/data/Popover/Popover.styled.js +150 -0
  247. package/esm/components/data/Popover/data/Popover/index.js +1 -0
  248. package/esm/components/data/Tab/Tab.js +27 -0
  249. package/esm/components/data/Tab/Tab.styled.js +14 -0
  250. package/esm/components/data/Tab/data/Tab/index.js +1 -0
  251. package/esm/components/data/Tabs/Tabs.js +87 -0
  252. package/esm/components/data/Tabs/Tabs.styled.js +85 -0
  253. package/esm/components/data/Tabs/data/Tabs/index.js +1 -0
  254. package/esm/components/data/Tooltip/Tooltip.js +46 -0
  255. package/esm/components/data/Tooltip/Tooltip.styled.js +29 -0
  256. package/esm/components/data/Tooltip/data/Tooltip/index.js +1 -0
  257. package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.js +38 -0
  258. package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +69 -0
  259. package/esm/components/data/data/index.js +7 -0
  260. package/esm/components/inputs/ActionButton/ActionButton.js +38 -0
  261. package/esm/components/inputs/ActionButton/ActionButton.styled.js +58 -0
  262. package/esm/components/inputs/ActionButton/inputs/ActionButton/index.js +1 -0
  263. package/esm/components/inputs/Button/Button.js +184 -0
  264. package/esm/components/inputs/Button/Button.styled.js +277 -0
  265. package/esm/components/inputs/Button/inputs/Button/index.js +1 -0
  266. package/esm/components/inputs/Checkbox/Checkbox.js +98 -0
  267. package/esm/components/inputs/Checkbox/Checkbox.styled.js +132 -0
  268. package/esm/components/inputs/Checkbox/inputs/Checkbox/index.js +1 -0
  269. package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +264 -0
  270. package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +324 -0
  271. package/esm/components/inputs/CompactAutocompleteSelect/inputs/CompactAutocompleteSelect/index.js +1 -0
  272. package/esm/components/inputs/CompactStarRating/CompactStarRating.js +174 -0
  273. package/esm/components/inputs/CompactStarRating/CompactStarRating.styled.js +245 -0
  274. package/esm/components/inputs/CompactStarRating/inputs/CompactStarRating/index.js +1 -0
  275. package/esm/components/inputs/CompactTextInput/CompactTextInput.js +183 -0
  276. package/esm/components/inputs/CompactTextInput/CompactTextInput.styled.js +335 -0
  277. package/esm/components/inputs/CompactTextInput/inputs/CompactTextInput/index.js +1 -0
  278. package/esm/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +247 -0
  279. package/esm/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +75 -0
  280. package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +181 -0
  281. package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +104 -0
  282. package/esm/components/inputs/MultiSelect/MultiSelect.js +247 -0
  283. package/esm/components/inputs/MultiSelect/MultiSelect.styled.js +251 -0
  284. package/esm/components/inputs/MultiSelect/inputs/MultiSelect/index.js +1 -0
  285. package/esm/components/inputs/Radio/Radio.js +63 -0
  286. package/esm/components/inputs/Radio/Radio.styled.js +84 -0
  287. package/esm/components/inputs/Radio/inputs/Radio/index.js +1 -0
  288. package/esm/components/inputs/Switch/Switch.js +65 -0
  289. package/esm/components/inputs/Switch/Switch.styled.js +110 -0
  290. package/esm/components/inputs/Switch/inputs/Switch/index.js +1 -0
  291. package/esm/components/inputs/TextArea/TextArea.js +182 -0
  292. package/esm/components/inputs/TextArea/TextArea.styled.js +437 -0
  293. package/esm/components/inputs/TextArea/inputs/TextArea/index.js +1 -0
  294. package/esm/components/inputs/TextInput/TextInput.js +143 -0
  295. package/esm/components/inputs/TextInput/TextInput.styled.js +261 -0
  296. package/esm/components/inputs/TextInput/inputs/TextInput/index.js +1 -0
  297. package/esm/components/inputs/inputs/index.js +13 -0
  298. package/esm/components/layout/InputGroup/InputGroup.js +22 -0
  299. package/esm/components/layout/InputGroup/InputGroup.styled.js +10 -0
  300. package/esm/components/layout/InputGroup/layout/InputGroup/index.js +1 -0
  301. package/esm/components/layout/SectionSeparator/SectionSeparator.js +25 -0
  302. package/esm/components/layout/SectionSeparator/SectionSeparator.styled.js +13 -0
  303. package/esm/components/layout/SectionSeparator/layout/SectionSeparator/index.js +1 -0
  304. package/esm/components/layout/layout/index.js +2 -0
  305. package/esm/components/widgets/AssetAction/AssetAction.js +102 -0
  306. package/esm/components/widgets/AssetAction/AssetAction.styled.js +46 -0
  307. package/esm/components/widgets/AssetActionsBase/AssetActionsBase.js +31 -0
  308. package/esm/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +16 -0
  309. package/esm/components/widgets/AssetGallery/AssetGallery.js +98 -0
  310. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +384 -0
  311. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +33 -0
  312. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +398 -0
  313. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +311 -0
  314. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +392 -0
  315. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +302 -0
  316. package/esm/components/widgets/AssetGallery/asset.propType.js +53 -0
  317. package/esm/components/widgets/AssetGallery/widgets/AssetGallery/index.js +1 -0
  318. package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +46 -0
  319. package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +84 -0
  320. package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/widgets/AssetPreview/AssetPreviewTopBar/index.js +1 -0
  321. package/esm/components/widgets/ContextMenu/ContextMenu.js +24 -0
  322. package/esm/components/widgets/ContextMenu/ContextMenu.styled.js +11 -0
  323. package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +46 -0
  324. package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +83 -0
  325. package/esm/components/widgets/ContextMenu/ContextMenuItem/widgets/ContextMenu/ContextMenuItem/index.js +1 -0
  326. package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +24 -0
  327. package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +22 -0
  328. package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/widgets/ContextMenu/ContextMenuItemsGroup/index.js +1 -0
  329. package/esm/components/widgets/ContextMenu/widgets/ContextMenu/index.js +1 -0
  330. package/esm/components/widgets/InfoCard/InfoCard.js +35 -0
  331. package/esm/components/widgets/InfoCard/InfoCard.styled.js +94 -0
  332. package/esm/components/widgets/InfoCard/widgets/InfoCard/index.js +1 -0
  333. package/esm/components/widgets/Instructions/Instructions.js +213 -0
  334. package/esm/components/widgets/Instructions/Instructions.styled.js +36 -0
  335. package/esm/components/widgets/Instructions/widgets/Instructions/index.js +1 -0
  336. package/esm/components/widgets/ProgressBar/ProgressBar.js +54 -0
  337. package/esm/components/widgets/ProgressBar/ProgressBar.styled.js +137 -0
  338. package/esm/components/widgets/ProgressBar/widgets/ProgressBar/index.js +1 -0
  339. package/esm/components/widgets/SummaryCard/SummaryCard.js +88 -0
  340. package/esm/components/widgets/SummaryCard/SummaryCard.styled.js +124 -0
  341. package/esm/components/widgets/widgets/index.js +9 -0
  342. package/esm/hooks/useEventListner.js +22 -0
  343. package/esm/hooks/useIsomorphicLayoutEffect.js +7 -0
  344. package/esm/hooks/useOnClickOutside.js +13 -0
  345. package/esm/icons/arrow-back.svg.js +16 -0
  346. package/esm/icons/arrow-forward.svg.js +16 -0
  347. package/esm/icons/check-rectangle-filled.svg.js +16 -0
  348. package/esm/icons/close.svg.js +16 -0
  349. package/esm/icons/edit-note.svg.js +16 -0
  350. package/esm/icons/expand-more.svg.js +16 -0
  351. package/esm/icons/headset.svg.js +16 -0
  352. package/esm/icons/layers.svg.js +16 -0
  353. package/esm/icons/link.svg.js +16 -0
  354. package/esm/icons/play.svg.js +16 -0
  355. package/esm/icons/search.svg.js +16 -0
  356. package/esm/icons/star-filled.svg.js +16 -0
  357. package/esm/icons/star.svg.js +16 -0
  358. package/esm/icons/triangle-right.svg.js +16 -0
  359. package/esm/icons/verification.svg.js +16 -0
  360. package/esm/icons/warning-circle.svg.js +16 -0
  361. package/esm/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +7 -0
  362. package/esm/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +5 -0
  363. package/esm/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +7 -0
  364. package/esm/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +6 -0
  365. package/esm/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +5 -0
  366. package/esm/node_modules/@babel/runtime/helpers/esm/createClass.js +15 -0
  367. package/esm/node_modules/@babel/runtime/helpers/esm/createSuper.js +18 -0
  368. package/esm/node_modules/@babel/runtime/helpers/esm/defineProperty.js +12 -0
  369. package/esm/node_modules/@babel/runtime/helpers/esm/extends.js +11 -0
  370. package/esm/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +7 -0
  371. package/esm/node_modules/@babel/runtime/helpers/esm/inherits.js +16 -0
  372. package/esm/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +10 -0
  373. package/esm/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +5 -0
  374. package/esm/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +29 -0
  375. package/esm/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +5 -0
  376. package/esm/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +5 -0
  377. package/esm/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +25 -0
  378. package/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +15 -0
  379. package/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +11 -0
  380. package/esm/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +10 -0
  381. package/esm/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +7 -0
  382. package/esm/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +10 -0
  383. package/esm/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +9 -0
  384. package/esm/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +10 -0
  385. package/esm/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
  386. package/esm/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
  387. package/esm/node_modules/@babel/runtime/helpers/esm/typeof.js +11 -0
  388. package/esm/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +11 -0
  389. package/esm/node_modules/@emotion/cache/dist/emotion-cache.esm.js +499 -0
  390. package/esm/node_modules/@emotion/hash/dist/emotion-hash.esm.js +55 -0
  391. package/esm/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +9 -0
  392. package/esm/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js +149 -0
  393. package/esm/node_modules/@emotion/react/dist/emotion-react.esm.js +56 -0
  394. package/esm/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +236 -0
  395. package/esm/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js +140 -0
  396. package/esm/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +52 -0
  397. package/esm/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js +12 -0
  398. package/esm/node_modules/@emotion/utils/dist/emotion-utils.esm.js +54 -0
  399. package/esm/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +16 -0
  400. package/esm/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +894 -0
  401. package/esm/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +370 -0
  402. package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +110 -0
  403. package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +138 -0
  404. package/{useMergedRefs-b6d2f8fc.js → esm/node_modules/@restart/hooks/esm/useMergedRefs.js} +4 -5
  405. package/esm/node_modules/@restart/hooks/esm/useUpdateEffect.js +37 -0
  406. package/esm/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +22 -0
  407. package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +181 -0
  408. package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +17 -0
  409. package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +11 -0
  410. package/esm/node_modules/memoize-one/dist/memoize-one.esm.js +51 -0
  411. package/esm/node_modules/object-assign/index.js +90 -0
  412. package/esm/node_modules/prop-types/checkPropTypes.js +106 -0
  413. package/esm/node_modules/prop-types/factoryWithThrowingShims.js +65 -0
  414. package/{index-39bc450c.js → esm/node_modules/prop-types/factoryWithTypeCheckers.js} +46 -514
  415. package/esm/node_modules/prop-types/index.js +29 -0
  416. package/esm/node_modules/prop-types/lib/ReactPropTypesSecret.js +12 -0
  417. package/esm/node_modules/prop-types/lib/has.js +3 -0
  418. package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +181 -0
  419. package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +17 -0
  420. package/esm/node_modules/prop-types/node_modules/react-is/index.js +11 -0
  421. package/esm/node_modules/react/cjs/react.development.js +1244 -0
  422. package/esm/node_modules/react/cjs/react.production.js +547 -0
  423. package/esm/node_modules/react/index.js +15 -0
  424. package/esm/node_modules/react-dom/cjs/react-dom.development.js +427 -0
  425. package/esm/node_modules/react-dom/cjs/react-dom.production.js +213 -0
  426. package/esm/node_modules/react-dom/index.js +42 -0
  427. package/esm/node_modules/react-lazy-load-image-component/src/effects/opacity.css.js +4 -0
  428. package/esm/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +19 -0
  429. package/esm/node_modules/react-select/dist/Select-aab027f3.esm.js +2644 -0
  430. package/esm/node_modules/react-select/dist/index-641ee5b8.esm.js +1385 -0
  431. package/esm/node_modules/react-select/dist/useCreatable-84008237.esm.js +97 -0
  432. package/esm/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js +74 -0
  433. package/esm/node_modules/style-inject/dist/style-inject.es.js +28 -0
  434. package/esm/node_modules/stylis/src/Enum.js +12 -0
  435. package/esm/node_modules/stylis/src/Middleware.js +32 -0
  436. package/esm/node_modules/stylis/src/Parser.js +193 -0
  437. package/esm/node_modules/stylis/src/Serializer.js +38 -0
  438. package/esm/node_modules/stylis/src/Tokenizer.js +223 -0
  439. package/esm/node_modules/stylis/src/Utility.js +117 -0
  440. package/esm/node_modules/tippy.js/animations/shift-away-subtle.css.js +4 -0
  441. package/esm/node_modules/tippy.js/dist/tippy.css.js +4 -0
  442. package/esm/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js +8 -0
  443. package/esm/ssr/ssr/index.js +1 -0
  444. package/esm/styles/utils/colors.scss.js +7 -0
  445. package/esm/utils/dateTime.js +16 -0
  446. package/esm/utils/defaultTheme.js +47 -0
  447. package/icons/arrow-forward.svg +3 -0
  448. package/icons/index.js +2 -0
  449. package/migration-storybook.log +392 -0
  450. package/package.json +59 -21
  451. package/styles/all.scss +3 -3
  452. package/styles/config.scss +3 -0
  453. package/styles/utils/colors.scss +1 -1
  454. package/styles/utils/theme.scss +2 -0
  455. package/ActionButton-15b418c5.js +0 -62
  456. package/Alert-e9f818d6.js +0 -118
  457. package/AssetGallery-66cb0dab.js +0 -1925
  458. package/AssetPreviewTopBar-21b7e172.js +0 -100
  459. package/AsyncSelect-368b5068.js +0 -28
  460. package/Badge-72b369a6.js +0 -222
  461. package/Button-34ce13c6.js +0 -265
  462. package/Checkbox-d77eed5d.js +0 -141
  463. package/CompactAutocompleteSelect-72d523e3.js +0 -452
  464. package/CompactStarRating-bf45f620.js +0 -340
  465. package/CompactTextInput-0b1979f1.js +0 -350
  466. package/ContextMenu-f69599d5.js +0 -33
  467. package/ContextMenuItem-9c5c4c9f.js +0 -111
  468. package/InputGroup-e30507cb.js +0 -29
  469. package/Instructions-42d2bc58.js +0 -264
  470. package/MultiLevelCheckboxSelect-acaac96b.js +0 -699
  471. package/MultiSelect-ecb48e03.js +0 -378
  472. package/Popover-a76d0fe5.js +0 -147
  473. package/Radio-7d5f630d.js +0 -87
  474. package/SectionSeparator-2a1c720b.js +0 -38
  475. package/Switch-006abdbd.js +0 -108
  476. package/Tab-87287c6e.js +0 -36
  477. package/Tabs-8e4de5a5.js +0 -152
  478. package/TextArea-76231a3b.js +0 -376
  479. package/TextInput-a440374c.js +0 -237
  480. package/Tooltip-298f0547.js +0 -62
  481. package/VerificationStatusIcon-d596165f.js +0 -122
  482. package/close-ebf2f3cf.js +0 -41
  483. package/data/Alert/index.js +0 -12
  484. package/data/Badge/index.js +0 -11
  485. package/data/Popover/index.js +0 -16
  486. package/data/Tab/index.js +0 -11
  487. package/data/Tabs/index.js +0 -13
  488. package/data/Tooltip/index.js +0 -13
  489. package/data/index.js +0 -30
  490. package/defaultTheme-fcd45bd0.js +0 -339
  491. package/edit-note-c47d292e.js +0 -41
  492. package/expand-more-94585605.js +0 -41
  493. package/inputs/ActionButton/index.js +0 -12
  494. package/inputs/AsyncSelect/index.js +0 -11
  495. package/inputs/Button/index.js +0 -19
  496. package/inputs/Checkbox/index.js +0 -13
  497. package/inputs/CompactAutocompleteSelect/index.js +0 -30
  498. package/inputs/CompactStarRating/index.js +0 -23
  499. package/inputs/CompactTextInput/index.js +0 -25
  500. package/inputs/MultiSelect/index.js +0 -17
  501. package/inputs/Radio/index.js +0 -13
  502. package/inputs/Switch/index.js +0 -13
  503. package/inputs/TextArea/index.js +0 -26
  504. package/inputs/TextInput/index.js +0 -15
  505. package/inputs/index.js +0 -62
  506. package/layout/InputGroup/index.js +0 -11
  507. package/layout/SectionSeparator/index.js +0 -11
  508. package/layout/index.js +0 -15
  509. package/react-select-creatable.esm-2f23d6c6.js +0 -7709
  510. package/shift-away-subtle-45129125.js +0 -9
  511. package/warning-circle-24522402.js +0 -41
  512. package/widgets/AssetGallery/index.js +0 -52
  513. package/widgets/AssetPreview/AssetPreviewTopBar/index.js +0 -12
  514. package/widgets/ContextMenu/ContextMenuItem/index.js +0 -11
  515. package/widgets/ContextMenu/ContextMenuItemsGroup/index.js +0 -33
  516. package/widgets/ContextMenu/index.js +0 -11
  517. package/widgets/Instructions/index.js +0 -35
  518. package/widgets/index.js +0 -60
@@ -0,0 +1,2653 @@
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
+ };
1189
+ _this.blockOptionHover = false;
1190
+ _this.isComposing = false;
1191
+ _this.commonProps = void 0;
1192
+ _this.initialTouchX = 0;
1193
+ _this.initialTouchY = 0;
1194
+ _this.openAfterFocus = false;
1195
+ _this.scrollToFocusedOptionOnUpdate = false;
1196
+ _this.userIsDragging = void 0;
1197
+ _this.isAppleDevice = isAppleDevice();
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
+ }
1735
+ }, {
1736
+ key: "componentDidUpdate",
1737
+ value: function componentDidUpdate(prevProps) {
1738
+ var _this$props6 = this.props,
1739
+ isDisabled = _this$props6.isDisabled,
1740
+ menuIsOpen = _this$props6.menuIsOpen;
1741
+ var isFocused = this.state.isFocused;
1742
+ if (
1743
+ // ensure focus is restored correctly when the control becomes enabled
1744
+ isFocused && !isDisabled && prevProps.isDisabled ||
1745
+ // ensure focus is on the Input when the menu opens
1746
+ isFocused && menuIsOpen && !prevProps.menuIsOpen) {
1747
+ this.focusInput();
1748
+ }
1749
+ if (isFocused && isDisabled && !prevProps.isDisabled) {
1750
+ // ensure select state gets blurred in case Select is programmatically disabled while focused
1751
+ // eslint-disable-next-line react/no-did-update-set-state
1752
+ this.setState({
1753
+ isFocused: false
1754
+ }, this.onMenuClose);
1755
+ } else if (!isFocused && !isDisabled && prevProps.isDisabled && this.inputRef === document.activeElement) {
1756
+ // ensure select state gets focused in case Select is programatically re-enabled while focused (Firefox)
1757
+ // eslint-disable-next-line react/no-did-update-set-state
1758
+ this.setState({
1759
+ isFocused: true
1760
+ });
1761
+ }
1762
+
1763
+ // scroll the focused option into view if necessary
1764
+ if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) {
1765
+ index641ee5b8_esm.I(this.menuListRef, this.focusedOptionRef);
1766
+ this.scrollToFocusedOptionOnUpdate = false;
1767
+ }
1768
+ }
1769
+ }, {
1770
+ key: "componentWillUnmount",
1771
+ value: function componentWillUnmount() {
1772
+ this.stopListeningComposition();
1773
+ this.stopListeningToTouch();
1774
+ document.removeEventListener('scroll', this.onScroll, true);
1775
+ }
1776
+
1777
+ // ==============================
1778
+ // Consumer Handlers
1779
+ // ==============================
1780
+ }, {
1781
+ key: "onMenuOpen",
1782
+ value: function onMenuOpen() {
1783
+ this.props.onMenuOpen();
1784
+ }
1785
+ }, {
1786
+ key: "onMenuClose",
1787
+ value: function onMenuClose() {
1788
+ this.onInputChange('', {
1789
+ action: 'menu-close',
1790
+ prevInputValue: this.props.inputValue
1791
+ });
1792
+ this.props.onMenuClose();
1793
+ }
1794
+ }, {
1795
+ key: "onInputChange",
1796
+ value: function onInputChange(newValue, actionMeta) {
1797
+ this.props.onInputChange(newValue, actionMeta);
1798
+ }
1799
+
1800
+ // ==============================
1801
+ // Methods
1802
+ // ==============================
1803
+ }, {
1804
+ key: "focusInput",
1805
+ value: function focusInput() {
1806
+ if (!this.inputRef) return;
1807
+ this.inputRef.focus();
1808
+ }
1809
+ }, {
1810
+ key: "blurInput",
1811
+ value: function blurInput() {
1812
+ if (!this.inputRef) return;
1813
+ this.inputRef.blur();
1814
+ }
1815
+
1816
+ // aliased for consumers
1817
+ }, {
1818
+ key: "openMenu",
1819
+ value: function openMenu(focusOption) {
1820
+ var _this2 = this;
1821
+ var _this$state2 = this.state,
1822
+ selectValue = _this$state2.selectValue,
1823
+ isFocused = _this$state2.isFocused;
1824
+ var focusableOptions = this.buildFocusableOptions();
1825
+ var openAtIndex = focusOption === 'first' ? 0 : focusableOptions.length - 1;
1826
+ if (!this.props.isMulti) {
1827
+ var selectedIndex = focusableOptions.indexOf(selectValue[0]);
1828
+ if (selectedIndex > -1) {
1829
+ openAtIndex = selectedIndex;
1830
+ }
1831
+ }
1832
+
1833
+ // only scroll if the menu isn't already open
1834
+ this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef);
1835
+ this.setState({
1836
+ inputIsHiddenAfterUpdate: false,
1837
+ focusedValue: null,
1838
+ focusedOption: focusableOptions[openAtIndex],
1839
+ focusedOptionId: this.getFocusedOptionId(focusableOptions[openAtIndex])
1840
+ }, function () {
1841
+ return _this2.onMenuOpen();
1842
+ });
1843
+ }
1844
+ }, {
1845
+ key: "focusValue",
1846
+ value: function focusValue(direction) {
1847
+ var _this$state3 = this.state,
1848
+ selectValue = _this$state3.selectValue,
1849
+ focusedValue = _this$state3.focusedValue;
1850
+
1851
+ // Only multiselects support value focusing
1852
+ if (!this.props.isMulti) return;
1853
+ this.setState({
1854
+ focusedOption: null
1855
+ });
1856
+ var focusedIndex = selectValue.indexOf(focusedValue);
1857
+ if (!focusedValue) {
1858
+ focusedIndex = -1;
1859
+ }
1860
+ var lastIndex = selectValue.length - 1;
1861
+ var nextFocus = -1;
1862
+ if (!selectValue.length) return;
1863
+ switch (direction) {
1864
+ case 'previous':
1865
+ if (focusedIndex === 0) {
1866
+ // don't cycle from the start to the end
1867
+ nextFocus = 0;
1868
+ } else if (focusedIndex === -1) {
1869
+ // if nothing is focused, focus the last value first
1870
+ nextFocus = lastIndex;
1871
+ } else {
1872
+ nextFocus = focusedIndex - 1;
1873
+ }
1874
+ break;
1875
+ case 'next':
1876
+ if (focusedIndex > -1 && focusedIndex < lastIndex) {
1877
+ nextFocus = focusedIndex + 1;
1878
+ }
1879
+ break;
1880
+ }
1881
+ this.setState({
1882
+ inputIsHidden: nextFocus !== -1,
1883
+ focusedValue: selectValue[nextFocus]
1884
+ });
1885
+ }
1886
+ }, {
1887
+ key: "focusOption",
1888
+ value: function focusOption() {
1889
+ var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first';
1890
+ var pageSize = this.props.pageSize;
1891
+ var focusedOption = this.state.focusedOption;
1892
+ var options = this.getFocusableOptions();
1893
+ if (!options.length) return;
1894
+ var nextFocus = 0; // handles 'first'
1895
+ var focusedIndex = options.indexOf(focusedOption);
1896
+ if (!focusedOption) {
1897
+ focusedIndex = -1;
1898
+ }
1899
+ if (direction === 'up') {
1900
+ nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1;
1901
+ } else if (direction === 'down') {
1902
+ nextFocus = (focusedIndex + 1) % options.length;
1903
+ } else if (direction === 'pageup') {
1904
+ nextFocus = focusedIndex - pageSize;
1905
+ if (nextFocus < 0) nextFocus = 0;
1906
+ } else if (direction === 'pagedown') {
1907
+ nextFocus = focusedIndex + pageSize;
1908
+ if (nextFocus > options.length - 1) nextFocus = options.length - 1;
1909
+ } else if (direction === 'last') {
1910
+ nextFocus = options.length - 1;
1911
+ }
1912
+ this.scrollToFocusedOptionOnUpdate = true;
1913
+ this.setState({
1914
+ focusedOption: options[nextFocus],
1915
+ focusedValue: null,
1916
+ focusedOptionId: this.getFocusedOptionId(options[nextFocus])
1917
+ });
1918
+ }
1919
+ }, {
1920
+ key: "getTheme",
1921
+ value:
1922
+ // ==============================
1923
+ // Getters
1924
+ // ==============================
1925
+
1926
+ function getTheme() {
1927
+ // Use the default theme if there are no customisations.
1928
+ if (!this.props.theme) {
1929
+ return defaultTheme;
1930
+ }
1931
+ // If the theme prop is a function, assume the function
1932
+ // knows how to merge the passed-in default theme with
1933
+ // its own modifications.
1934
+ if (typeof this.props.theme === 'function') {
1935
+ return this.props.theme(defaultTheme);
1936
+ }
1937
+ // Otherwise, if a plain theme object was passed in,
1938
+ // overlay it with the default theme.
1939
+ return objectSpread2["default"](objectSpread2["default"]({}, defaultTheme), this.props.theme);
1940
+ }
1941
+ }, {
1942
+ key: "getCommonProps",
1943
+ value: function getCommonProps() {
1944
+ var clearValue = this.clearValue,
1945
+ cx = this.cx,
1946
+ getStyles = this.getStyles,
1947
+ getClassNames = this.getClassNames,
1948
+ getValue = this.getValue,
1949
+ selectOption = this.selectOption,
1950
+ setValue = this.setValue,
1951
+ props = this.props;
1952
+ var isMulti = props.isMulti,
1953
+ isRtl = props.isRtl,
1954
+ options = props.options;
1955
+ var hasValue = this.hasValue();
1956
+ return {
1957
+ clearValue: clearValue,
1958
+ cx: cx,
1959
+ getStyles: getStyles,
1960
+ getClassNames: getClassNames,
1961
+ getValue: getValue,
1962
+ hasValue: hasValue,
1963
+ isMulti: isMulti,
1964
+ isRtl: isRtl,
1965
+ options: options,
1966
+ selectOption: selectOption,
1967
+ selectProps: props,
1968
+ setValue: setValue,
1969
+ theme: this.getTheme()
1970
+ };
1971
+ }
1972
+ }, {
1973
+ key: "hasValue",
1974
+ value: function hasValue() {
1975
+ var selectValue = this.state.selectValue;
1976
+ return selectValue.length > 0;
1977
+ }
1978
+ }, {
1979
+ key: "hasOptions",
1980
+ value: function hasOptions() {
1981
+ return !!this.getFocusableOptions().length;
1982
+ }
1983
+ }, {
1984
+ key: "isClearable",
1985
+ value: function isClearable() {
1986
+ var _this$props7 = this.props,
1987
+ isClearable = _this$props7.isClearable,
1988
+ isMulti = _this$props7.isMulti;
1989
+
1990
+ // single select, by default, IS NOT clearable
1991
+ // multi select, by default, IS clearable
1992
+ if (isClearable === undefined) return isMulti;
1993
+ return isClearable;
1994
+ }
1995
+ }, {
1996
+ key: "isOptionDisabled",
1997
+ value: function isOptionDisabled(option, selectValue) {
1998
+ return _isOptionDisabled(this.props, option, selectValue);
1999
+ }
2000
+ }, {
2001
+ key: "isOptionSelected",
2002
+ value: function isOptionSelected(option, selectValue) {
2003
+ return _isOptionSelected(this.props, option, selectValue);
2004
+ }
2005
+ }, {
2006
+ key: "filterOption",
2007
+ value: function filterOption(option, inputValue) {
2008
+ return _filterOption(this.props, option, inputValue);
2009
+ }
2010
+ }, {
2011
+ key: "formatOptionLabel",
2012
+ value: function formatOptionLabel(data, context) {
2013
+ if (typeof this.props.formatOptionLabel === 'function') {
2014
+ var _inputValue = this.props.inputValue;
2015
+ var _selectValue = this.state.selectValue;
2016
+ return this.props.formatOptionLabel(data, {
2017
+ context: context,
2018
+ inputValue: _inputValue,
2019
+ selectValue: _selectValue
2020
+ });
2021
+ } else {
2022
+ return this.getOptionLabel(data);
2023
+ }
2024
+ }
2025
+ }, {
2026
+ key: "formatGroupLabel",
2027
+ value: function formatGroupLabel(data) {
2028
+ return this.props.formatGroupLabel(data);
2029
+ }
2030
+
2031
+ // ==============================
2032
+ // Mouse Handlers
2033
+ // ==============================
2034
+ }, {
2035
+ key: "startListeningComposition",
2036
+ value:
2037
+ // ==============================
2038
+ // Composition Handlers
2039
+ // ==============================
2040
+
2041
+ function startListeningComposition() {
2042
+ if (document && document.addEventListener) {
2043
+ document.addEventListener('compositionstart', this.onCompositionStart, false);
2044
+ document.addEventListener('compositionend', this.onCompositionEnd, false);
2045
+ }
2046
+ }
2047
+ }, {
2048
+ key: "stopListeningComposition",
2049
+ value: function stopListeningComposition() {
2050
+ if (document && document.removeEventListener) {
2051
+ document.removeEventListener('compositionstart', this.onCompositionStart);
2052
+ document.removeEventListener('compositionend', this.onCompositionEnd);
2053
+ }
2054
+ }
2055
+ }, {
2056
+ key: "startListeningToTouch",
2057
+ value:
2058
+ // ==============================
2059
+ // Touch Handlers
2060
+ // ==============================
2061
+
2062
+ function startListeningToTouch() {
2063
+ if (document && document.addEventListener) {
2064
+ document.addEventListener('touchstart', this.onTouchStart, false);
2065
+ document.addEventListener('touchmove', this.onTouchMove, false);
2066
+ document.addEventListener('touchend', this.onTouchEnd, false);
2067
+ }
2068
+ }
2069
+ }, {
2070
+ key: "stopListeningToTouch",
2071
+ value: function stopListeningToTouch() {
2072
+ if (document && document.removeEventListener) {
2073
+ document.removeEventListener('touchstart', this.onTouchStart);
2074
+ document.removeEventListener('touchmove', this.onTouchMove);
2075
+ document.removeEventListener('touchend', this.onTouchEnd);
2076
+ }
2077
+ }
2078
+ }, {
2079
+ key: "renderInput",
2080
+ value:
2081
+ // ==============================
2082
+ // Renderers
2083
+ // ==============================
2084
+ function renderInput() {
2085
+ var _this$props8 = this.props,
2086
+ isDisabled = _this$props8.isDisabled,
2087
+ isSearchable = _this$props8.isSearchable,
2088
+ inputId = _this$props8.inputId,
2089
+ inputValue = _this$props8.inputValue,
2090
+ tabIndex = _this$props8.tabIndex,
2091
+ form = _this$props8.form,
2092
+ menuIsOpen = _this$props8.menuIsOpen,
2093
+ required = _this$props8.required;
2094
+ var _this$getComponents = this.getComponents(),
2095
+ Input = _this$getComponents.Input;
2096
+ var _this$state4 = this.state,
2097
+ inputIsHidden = _this$state4.inputIsHidden,
2098
+ ariaSelection = _this$state4.ariaSelection;
2099
+ var commonProps = this.commonProps;
2100
+ var id = inputId || this.getElementId('input');
2101
+
2102
+ // aria attributes makes the JSX "noisy", separated for clarity
2103
+ var ariaAttributes = objectSpread2["default"](objectSpread2["default"](objectSpread2["default"]({
2104
+ 'aria-autocomplete': 'list',
2105
+ 'aria-expanded': menuIsOpen,
2106
+ 'aria-haspopup': true,
2107
+ 'aria-errormessage': this.props['aria-errormessage'],
2108
+ 'aria-invalid': this.props['aria-invalid'],
2109
+ 'aria-label': this.props['aria-label'],
2110
+ 'aria-labelledby': this.props['aria-labelledby'],
2111
+ 'aria-required': required,
2112
+ role: 'combobox',
2113
+ 'aria-activedescendant': this.isAppleDevice ? undefined : this.state.focusedOptionId || ''
2114
+ }, menuIsOpen && {
2115
+ 'aria-controls': this.getElementId('listbox')
2116
+ }), !isSearchable && {
2117
+ 'aria-readonly': true
2118
+ }), this.hasValue() ? (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === 'initial-input-focus' && {
2119
+ 'aria-describedby': this.getElementId('live-region')
2120
+ } : {
2121
+ 'aria-describedby': this.getElementId('placeholder')
2122
+ });
2123
+ if (!isSearchable) {
2124
+ // use a dummy input to maintain focus/blur functionality
2125
+ return /*#__PURE__*/index.react.exports.createElement(DummyInput, _extends["default"]({
2126
+ id: id,
2127
+ innerRef: this.getInputRef,
2128
+ onBlur: this.onInputBlur,
2129
+ onChange: index641ee5b8_esm.J,
2130
+ onFocus: this.onInputFocus,
2131
+ disabled: isDisabled,
2132
+ tabIndex: tabIndex,
2133
+ inputMode: "none",
2134
+ form: form,
2135
+ value: ""
2136
+ }, ariaAttributes));
2137
+ }
2138
+ return /*#__PURE__*/index.react.exports.createElement(Input, _extends["default"]({}, commonProps, {
2139
+ autoCapitalize: "none",
2140
+ autoComplete: "off",
2141
+ autoCorrect: "off",
2142
+ id: id,
2143
+ innerRef: this.getInputRef,
2144
+ isDisabled: isDisabled,
2145
+ isHidden: inputIsHidden,
2146
+ onBlur: this.onInputBlur,
2147
+ onChange: this.handleInputChange,
2148
+ onFocus: this.onInputFocus,
2149
+ spellCheck: "false",
2150
+ tabIndex: tabIndex,
2151
+ form: form,
2152
+ type: "text",
2153
+ value: inputValue
2154
+ }, ariaAttributes));
2155
+ }
2156
+ }, {
2157
+ key: "renderPlaceholderOrValue",
2158
+ value: function renderPlaceholderOrValue() {
2159
+ var _this3 = this;
2160
+ var _this$getComponents2 = this.getComponents(),
2161
+ MultiValue = _this$getComponents2.MultiValue,
2162
+ MultiValueContainer = _this$getComponents2.MultiValueContainer,
2163
+ MultiValueLabel = _this$getComponents2.MultiValueLabel,
2164
+ MultiValueRemove = _this$getComponents2.MultiValueRemove,
2165
+ SingleValue = _this$getComponents2.SingleValue,
2166
+ Placeholder = _this$getComponents2.Placeholder;
2167
+ var commonProps = this.commonProps;
2168
+ var _this$props9 = this.props,
2169
+ controlShouldRenderValue = _this$props9.controlShouldRenderValue,
2170
+ isDisabled = _this$props9.isDisabled,
2171
+ isMulti = _this$props9.isMulti,
2172
+ inputValue = _this$props9.inputValue,
2173
+ placeholder = _this$props9.placeholder;
2174
+ var _this$state5 = this.state,
2175
+ selectValue = _this$state5.selectValue,
2176
+ focusedValue = _this$state5.focusedValue,
2177
+ isFocused = _this$state5.isFocused;
2178
+ if (!this.hasValue() || !controlShouldRenderValue) {
2179
+ return inputValue ? null : /*#__PURE__*/index.react.exports.createElement(Placeholder, _extends["default"]({}, commonProps, {
2180
+ key: "placeholder",
2181
+ isDisabled: isDisabled,
2182
+ isFocused: isFocused,
2183
+ innerProps: {
2184
+ id: this.getElementId('placeholder')
2185
+ }
2186
+ }), placeholder);
2187
+ }
2188
+ if (isMulti) {
2189
+ return selectValue.map(function (opt, index$1) {
2190
+ var isOptionFocused = opt === focusedValue;
2191
+ var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
2192
+ return /*#__PURE__*/index.react.exports.createElement(MultiValue, _extends["default"]({}, commonProps, {
2193
+ components: {
2194
+ Container: MultiValueContainer,
2195
+ Label: MultiValueLabel,
2196
+ Remove: MultiValueRemove
2197
+ },
2198
+ isFocused: isOptionFocused,
2199
+ isDisabled: isDisabled,
2200
+ key: key,
2201
+ index: index$1,
2202
+ removeProps: {
2203
+ onClick: function onClick() {
2204
+ return _this3.removeValue(opt);
2205
+ },
2206
+ onTouchEnd: function onTouchEnd() {
2207
+ return _this3.removeValue(opt);
2208
+ },
2209
+ onMouseDown: function onMouseDown(e) {
2210
+ e.preventDefault();
2211
+ }
2212
+ },
2213
+ data: opt
2214
+ }), _this3.formatOptionLabel(opt, 'value'));
2215
+ });
2216
+ }
2217
+ if (inputValue) {
2218
+ return null;
2219
+ }
2220
+ var singleValue = selectValue[0];
2221
+ return /*#__PURE__*/index.react.exports.createElement(SingleValue, _extends["default"]({}, commonProps, {
2222
+ data: singleValue,
2223
+ isDisabled: isDisabled
2224
+ }), this.formatOptionLabel(singleValue, 'value'));
2225
+ }
2226
+ }, {
2227
+ key: "renderClearIndicator",
2228
+ value: function renderClearIndicator() {
2229
+ var _this$getComponents3 = this.getComponents(),
2230
+ ClearIndicator = _this$getComponents3.ClearIndicator;
2231
+ var commonProps = this.commonProps;
2232
+ var _this$props10 = this.props,
2233
+ isDisabled = _this$props10.isDisabled,
2234
+ isLoading = _this$props10.isLoading;
2235
+ var isFocused = this.state.isFocused;
2236
+ if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {
2237
+ return null;
2238
+ }
2239
+ var innerProps = {
2240
+ onMouseDown: this.onClearIndicatorMouseDown,
2241
+ onTouchEnd: this.onClearIndicatorTouchEnd,
2242
+ 'aria-hidden': 'true'
2243
+ };
2244
+ return /*#__PURE__*/index.react.exports.createElement(ClearIndicator, _extends["default"]({}, commonProps, {
2245
+ innerProps: innerProps,
2246
+ isFocused: isFocused
2247
+ }));
2248
+ }
2249
+ }, {
2250
+ key: "renderLoadingIndicator",
2251
+ value: function renderLoadingIndicator() {
2252
+ var _this$getComponents4 = this.getComponents(),
2253
+ LoadingIndicator = _this$getComponents4.LoadingIndicator;
2254
+ var commonProps = this.commonProps;
2255
+ var _this$props11 = this.props,
2256
+ isDisabled = _this$props11.isDisabled,
2257
+ isLoading = _this$props11.isLoading;
2258
+ var isFocused = this.state.isFocused;
2259
+ if (!LoadingIndicator || !isLoading) return null;
2260
+ var innerProps = {
2261
+ 'aria-hidden': 'true'
2262
+ };
2263
+ return /*#__PURE__*/index.react.exports.createElement(LoadingIndicator, _extends["default"]({}, commonProps, {
2264
+ innerProps: innerProps,
2265
+ isDisabled: isDisabled,
2266
+ isFocused: isFocused
2267
+ }));
2268
+ }
2269
+ }, {
2270
+ key: "renderIndicatorSeparator",
2271
+ value: function renderIndicatorSeparator() {
2272
+ var _this$getComponents5 = this.getComponents(),
2273
+ DropdownIndicator = _this$getComponents5.DropdownIndicator,
2274
+ IndicatorSeparator = _this$getComponents5.IndicatorSeparator;
2275
+
2276
+ // separator doesn't make sense without the dropdown indicator
2277
+ if (!DropdownIndicator || !IndicatorSeparator) return null;
2278
+ var commonProps = this.commonProps;
2279
+ var isDisabled = this.props.isDisabled;
2280
+ var isFocused = this.state.isFocused;
2281
+ return /*#__PURE__*/index.react.exports.createElement(IndicatorSeparator, _extends["default"]({}, commonProps, {
2282
+ isDisabled: isDisabled,
2283
+ isFocused: isFocused
2284
+ }));
2285
+ }
2286
+ }, {
2287
+ key: "renderDropdownIndicator",
2288
+ value: function renderDropdownIndicator() {
2289
+ var _this$getComponents6 = this.getComponents(),
2290
+ DropdownIndicator = _this$getComponents6.DropdownIndicator;
2291
+ if (!DropdownIndicator) return null;
2292
+ var commonProps = this.commonProps;
2293
+ var isDisabled = this.props.isDisabled;
2294
+ var isFocused = this.state.isFocused;
2295
+ var innerProps = {
2296
+ onMouseDown: this.onDropdownIndicatorMouseDown,
2297
+ onTouchEnd: this.onDropdownIndicatorTouchEnd,
2298
+ 'aria-hidden': 'true'
2299
+ };
2300
+ return /*#__PURE__*/index.react.exports.createElement(DropdownIndicator, _extends["default"]({}, commonProps, {
2301
+ innerProps: innerProps,
2302
+ isDisabled: isDisabled,
2303
+ isFocused: isFocused
2304
+ }));
2305
+ }
2306
+ }, {
2307
+ key: "renderMenu",
2308
+ value: function renderMenu() {
2309
+ var _this4 = this;
2310
+ var _this$getComponents7 = this.getComponents(),
2311
+ Group = _this$getComponents7.Group,
2312
+ GroupHeading = _this$getComponents7.GroupHeading,
2313
+ Menu = _this$getComponents7.Menu,
2314
+ MenuList = _this$getComponents7.MenuList,
2315
+ MenuPortal = _this$getComponents7.MenuPortal,
2316
+ LoadingMessage = _this$getComponents7.LoadingMessage,
2317
+ NoOptionsMessage = _this$getComponents7.NoOptionsMessage,
2318
+ Option = _this$getComponents7.Option;
2319
+ var commonProps = this.commonProps;
2320
+ var focusedOption = this.state.focusedOption;
2321
+ var _this$props12 = this.props,
2322
+ captureMenuScroll = _this$props12.captureMenuScroll,
2323
+ inputValue = _this$props12.inputValue,
2324
+ isLoading = _this$props12.isLoading,
2325
+ loadingMessage = _this$props12.loadingMessage,
2326
+ minMenuHeight = _this$props12.minMenuHeight,
2327
+ maxMenuHeight = _this$props12.maxMenuHeight,
2328
+ menuIsOpen = _this$props12.menuIsOpen,
2329
+ menuPlacement = _this$props12.menuPlacement,
2330
+ menuPosition = _this$props12.menuPosition,
2331
+ menuPortalTarget = _this$props12.menuPortalTarget,
2332
+ menuShouldBlockScroll = _this$props12.menuShouldBlockScroll,
2333
+ menuShouldScrollIntoView = _this$props12.menuShouldScrollIntoView,
2334
+ noOptionsMessage = _this$props12.noOptionsMessage,
2335
+ onMenuScrollToTop = _this$props12.onMenuScrollToTop,
2336
+ onMenuScrollToBottom = _this$props12.onMenuScrollToBottom;
2337
+ if (!menuIsOpen) return null;
2338
+
2339
+ // TODO: Internal Option Type here
2340
+ var render = function render(props, id) {
2341
+ var type = props.type,
2342
+ data = props.data,
2343
+ isDisabled = props.isDisabled,
2344
+ isSelected = props.isSelected,
2345
+ label = props.label,
2346
+ value = props.value;
2347
+ var isFocused = focusedOption === data;
2348
+ var onHover = isDisabled ? undefined : function () {
2349
+ return _this4.onOptionHover(data);
2350
+ };
2351
+ var onSelect = isDisabled ? undefined : function () {
2352
+ return _this4.selectOption(data);
2353
+ };
2354
+ var optionId = "".concat(_this4.getElementId('option'), "-").concat(id);
2355
+ var innerProps = {
2356
+ id: optionId,
2357
+ onClick: onSelect,
2358
+ onMouseMove: onHover,
2359
+ onMouseOver: onHover,
2360
+ tabIndex: -1,
2361
+ role: 'option',
2362
+ 'aria-selected': _this4.isAppleDevice ? undefined : isSelected // is not supported on Apple devices
2363
+ };
2364
+
2365
+ return /*#__PURE__*/index.react.exports.createElement(Option, _extends["default"]({}, commonProps, {
2366
+ innerProps: innerProps,
2367
+ data: data,
2368
+ isDisabled: isDisabled,
2369
+ isSelected: isSelected,
2370
+ key: optionId,
2371
+ label: label,
2372
+ type: type,
2373
+ value: value,
2374
+ isFocused: isFocused,
2375
+ innerRef: isFocused ? _this4.getFocusedOptionRef : undefined
2376
+ }), _this4.formatOptionLabel(props.data, 'menu'));
2377
+ };
2378
+ var menuUI;
2379
+ if (this.hasOptions()) {
2380
+ menuUI = this.getCategorizedOptions().map(function (item) {
2381
+ if (item.type === 'group') {
2382
+ var _data = item.data,
2383
+ options = item.options,
2384
+ groupIndex = item.index;
2385
+ var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
2386
+ var headingId = "".concat(groupId, "-heading");
2387
+ return /*#__PURE__*/index.react.exports.createElement(Group, _extends["default"]({}, commonProps, {
2388
+ key: groupId,
2389
+ data: _data,
2390
+ options: options,
2391
+ Heading: GroupHeading,
2392
+ headingProps: {
2393
+ id: headingId,
2394
+ data: item.data
2395
+ },
2396
+ label: _this4.formatGroupLabel(item.data)
2397
+ }), item.options.map(function (option) {
2398
+ return render(option, "".concat(groupIndex, "-").concat(option.index));
2399
+ }));
2400
+ } else if (item.type === 'option') {
2401
+ return render(item, "".concat(item.index));
2402
+ }
2403
+ });
2404
+ } else if (isLoading) {
2405
+ var message = loadingMessage({
2406
+ inputValue: inputValue
2407
+ });
2408
+ if (message === null) return null;
2409
+ menuUI = /*#__PURE__*/index.react.exports.createElement(LoadingMessage, commonProps, message);
2410
+ } else {
2411
+ var _message = noOptionsMessage({
2412
+ inputValue: inputValue
2413
+ });
2414
+ if (_message === null) return null;
2415
+ menuUI = /*#__PURE__*/index.react.exports.createElement(NoOptionsMessage, commonProps, _message);
2416
+ }
2417
+ var menuPlacementProps = {
2418
+ minMenuHeight: minMenuHeight,
2419
+ maxMenuHeight: maxMenuHeight,
2420
+ menuPlacement: menuPlacement,
2421
+ menuPosition: menuPosition,
2422
+ menuShouldScrollIntoView: menuShouldScrollIntoView
2423
+ };
2424
+ var menuElement = /*#__PURE__*/index.react.exports.createElement(index641ee5b8_esm.M, _extends["default"]({}, commonProps, menuPlacementProps), function (_ref4) {
2425
+ var ref = _ref4.ref,
2426
+ _ref4$placerProps = _ref4.placerProps,
2427
+ placement = _ref4$placerProps.placement,
2428
+ maxHeight = _ref4$placerProps.maxHeight;
2429
+ return /*#__PURE__*/index.react.exports.createElement(Menu, _extends["default"]({}, commonProps, menuPlacementProps, {
2430
+ innerRef: ref,
2431
+ innerProps: {
2432
+ onMouseDown: _this4.onMenuMouseDown,
2433
+ onMouseMove: _this4.onMenuMouseMove
2434
+ },
2435
+ isLoading: isLoading,
2436
+ placement: placement
2437
+ }), /*#__PURE__*/index.react.exports.createElement(ScrollManager, {
2438
+ captureEnabled: captureMenuScroll,
2439
+ onTopArrive: onMenuScrollToTop,
2440
+ onBottomArrive: onMenuScrollToBottom,
2441
+ lockEnabled: menuShouldBlockScroll
2442
+ }, function (scrollTargetRef) {
2443
+ return /*#__PURE__*/index.react.exports.createElement(MenuList, _extends["default"]({}, commonProps, {
2444
+ innerRef: function innerRef(instance) {
2445
+ _this4.getMenuListRef(instance);
2446
+ scrollTargetRef(instance);
2447
+ },
2448
+ innerProps: {
2449
+ role: 'listbox',
2450
+ 'aria-multiselectable': commonProps.isMulti,
2451
+ id: _this4.getElementId('listbox')
2452
+ },
2453
+ isLoading: isLoading,
2454
+ maxHeight: maxHeight,
2455
+ focusedOption: focusedOption
2456
+ }), menuUI);
2457
+ }));
2458
+ });
2459
+
2460
+ // positioning behaviour is almost identical for portalled and fixed,
2461
+ // so we use the same component. the actual portalling logic is forked
2462
+ // within the component based on `menuPosition`
2463
+ return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/index.react.exports.createElement(MenuPortal, _extends["default"]({}, commonProps, {
2464
+ appendTo: menuPortalTarget,
2465
+ controlElement: this.controlRef,
2466
+ menuPlacement: menuPlacement,
2467
+ menuPosition: menuPosition
2468
+ }), menuElement) : menuElement;
2469
+ }
2470
+ }, {
2471
+ key: "renderFormField",
2472
+ value: function renderFormField() {
2473
+ var _this5 = this;
2474
+ var _this$props13 = this.props,
2475
+ delimiter = _this$props13.delimiter,
2476
+ isDisabled = _this$props13.isDisabled,
2477
+ isMulti = _this$props13.isMulti,
2478
+ name = _this$props13.name,
2479
+ required = _this$props13.required;
2480
+ var selectValue = this.state.selectValue;
2481
+ if (required && !this.hasValue() && !isDisabled) {
2482
+ return /*#__PURE__*/index.react.exports.createElement(RequiredInput$1, {
2483
+ name: name,
2484
+ onFocus: this.onValueInputFocus
2485
+ });
2486
+ }
2487
+ if (!name || isDisabled) return;
2488
+ if (isMulti) {
2489
+ if (delimiter) {
2490
+ var value = selectValue.map(function (opt) {
2491
+ return _this5.getOptionValue(opt);
2492
+ }).join(delimiter);
2493
+ return /*#__PURE__*/index.react.exports.createElement("input", {
2494
+ name: name,
2495
+ type: "hidden",
2496
+ value: value
2497
+ });
2498
+ } else {
2499
+ var input = selectValue.length > 0 ? selectValue.map(function (opt, i) {
2500
+ return /*#__PURE__*/index.react.exports.createElement("input", {
2501
+ key: "i-".concat(i),
2502
+ name: name,
2503
+ type: "hidden",
2504
+ value: _this5.getOptionValue(opt)
2505
+ });
2506
+ }) : /*#__PURE__*/index.react.exports.createElement("input", {
2507
+ name: name,
2508
+ type: "hidden",
2509
+ value: ""
2510
+ });
2511
+ return /*#__PURE__*/index.react.exports.createElement("div", null, input);
2512
+ }
2513
+ } else {
2514
+ var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : '';
2515
+ return /*#__PURE__*/index.react.exports.createElement("input", {
2516
+ name: name,
2517
+ type: "hidden",
2518
+ value: _value
2519
+ });
2520
+ }
2521
+ }
2522
+ }, {
2523
+ key: "renderLiveRegion",
2524
+ value: function renderLiveRegion() {
2525
+ var commonProps = this.commonProps;
2526
+ var _this$state6 = this.state,
2527
+ ariaSelection = _this$state6.ariaSelection,
2528
+ focusedOption = _this$state6.focusedOption,
2529
+ focusedValue = _this$state6.focusedValue,
2530
+ isFocused = _this$state6.isFocused,
2531
+ selectValue = _this$state6.selectValue;
2532
+ var focusableOptions = this.getFocusableOptions();
2533
+ return /*#__PURE__*/index.react.exports.createElement(LiveRegion$1, _extends["default"]({}, commonProps, {
2534
+ id: this.getElementId('live-region'),
2535
+ ariaSelection: ariaSelection,
2536
+ focusedOption: focusedOption,
2537
+ focusedValue: focusedValue,
2538
+ isFocused: isFocused,
2539
+ selectValue: selectValue,
2540
+ focusableOptions: focusableOptions,
2541
+ isAppleDevice: this.isAppleDevice
2542
+ }));
2543
+ }
2544
+ }, {
2545
+ key: "render",
2546
+ value: function render() {
2547
+ var _this$getComponents8 = this.getComponents(),
2548
+ Control = _this$getComponents8.Control,
2549
+ IndicatorsContainer = _this$getComponents8.IndicatorsContainer,
2550
+ SelectContainer = _this$getComponents8.SelectContainer,
2551
+ ValueContainer = _this$getComponents8.ValueContainer;
2552
+ var _this$props14 = this.props,
2553
+ className = _this$props14.className,
2554
+ id = _this$props14.id,
2555
+ isDisabled = _this$props14.isDisabled,
2556
+ menuIsOpen = _this$props14.menuIsOpen;
2557
+ var isFocused = this.state.isFocused;
2558
+ var commonProps = this.commonProps = this.getCommonProps();
2559
+ return /*#__PURE__*/index.react.exports.createElement(SelectContainer, _extends["default"]({}, commonProps, {
2560
+ className: className,
2561
+ innerProps: {
2562
+ id: id,
2563
+ onKeyDown: this.onKeyDown
2564
+ },
2565
+ isDisabled: isDisabled,
2566
+ isFocused: isFocused
2567
+ }), this.renderLiveRegion(), /*#__PURE__*/index.react.exports.createElement(Control, _extends["default"]({}, commonProps, {
2568
+ innerRef: this.getControlRef,
2569
+ innerProps: {
2570
+ onMouseDown: this.onControlMouseDown,
2571
+ onTouchEnd: this.onControlTouchEnd
2572
+ },
2573
+ isDisabled: isDisabled,
2574
+ isFocused: isFocused,
2575
+ menuIsOpen: menuIsOpen
2576
+ }), /*#__PURE__*/index.react.exports.createElement(ValueContainer, _extends["default"]({}, commonProps, {
2577
+ isDisabled: isDisabled
2578
+ }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/index.react.exports.createElement(IndicatorsContainer, _extends["default"]({}, commonProps, {
2579
+ isDisabled: isDisabled
2580
+ }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
2581
+ }
2582
+ }], [{
2583
+ key: "getDerivedStateFromProps",
2584
+ value: function getDerivedStateFromProps(props, state) {
2585
+ var prevProps = state.prevProps,
2586
+ clearFocusValueOnUpdate = state.clearFocusValueOnUpdate,
2587
+ inputIsHiddenAfterUpdate = state.inputIsHiddenAfterUpdate,
2588
+ ariaSelection = state.ariaSelection,
2589
+ isFocused = state.isFocused,
2590
+ prevWasFocused = state.prevWasFocused,
2591
+ instancePrefix = state.instancePrefix;
2592
+ var options = props.options,
2593
+ value = props.value,
2594
+ menuIsOpen = props.menuIsOpen,
2595
+ inputValue = props.inputValue,
2596
+ isMulti = props.isMulti;
2597
+ var selectValue = index641ee5b8_esm.H(value);
2598
+ var newMenuOptionsState = {};
2599
+ if (prevProps && (value !== prevProps.value || options !== prevProps.options || menuIsOpen !== prevProps.menuIsOpen || inputValue !== prevProps.inputValue)) {
2600
+ var focusableOptions = menuIsOpen ? buildFocusableOptions(props, selectValue) : [];
2601
+ var focusableOptionsWithIds = menuIsOpen ? buildFocusableOptionsWithIds(buildCategorizedOptions(props, selectValue), "".concat(instancePrefix, "-option")) : [];
2602
+ var focusedValue = clearFocusValueOnUpdate ? getNextFocusedValue(state, selectValue) : null;
2603
+ var focusedOption = getNextFocusedOption(state, focusableOptions);
2604
+ var focusedOptionId = getFocusedOptionId(focusableOptionsWithIds, focusedOption);
2605
+ newMenuOptionsState = {
2606
+ selectValue: selectValue,
2607
+ focusedOption: focusedOption,
2608
+ focusedOptionId: focusedOptionId,
2609
+ focusableOptionsWithIds: focusableOptionsWithIds,
2610
+ focusedValue: focusedValue,
2611
+ clearFocusValueOnUpdate: false
2612
+ };
2613
+ }
2614
+ // some updates should toggle the state of the input visibility
2615
+ var newInputIsHiddenState = inputIsHiddenAfterUpdate != null && props !== prevProps ? {
2616
+ inputIsHidden: inputIsHiddenAfterUpdate,
2617
+ inputIsHiddenAfterUpdate: undefined
2618
+ } : {};
2619
+ var newAriaSelection = ariaSelection;
2620
+ var hasKeptFocus = isFocused && prevWasFocused;
2621
+ if (isFocused && !hasKeptFocus) {
2622
+ // If `value` or `defaultValue` props are not empty then announce them
2623
+ // when the Select is initially focused
2624
+ newAriaSelection = {
2625
+ value: index641ee5b8_esm.D(isMulti, selectValue, selectValue[0] || null),
2626
+ options: selectValue,
2627
+ action: 'initial-input-focus'
2628
+ };
2629
+ hasKeptFocus = !prevWasFocused;
2630
+ }
2631
+
2632
+ // If the 'initial-input-focus' action has been set already
2633
+ // then reset the ariaSelection to null
2634
+ if ((ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === 'initial-input-focus') {
2635
+ newAriaSelection = null;
2636
+ }
2637
+ return objectSpread2["default"](objectSpread2["default"](objectSpread2["default"]({}, newMenuOptionsState), newInputIsHiddenState), {}, {
2638
+ prevProps: props,
2639
+ ariaSelection: newAriaSelection,
2640
+ prevWasFocused: hasKeptFocus
2641
+ });
2642
+ }
2643
+ }]);
2644
+ return Select;
2645
+ }(index.react.exports.Component);
2646
+ Select.defaultProps = defaultProps;
2647
+
2648
+ exports.S = Select;
2649
+ exports.a = defaultProps;
2650
+ exports.b = getOptionLabel$1;
2651
+ exports.c = createFilter;
2652
+ exports.d = defaultTheme;
2653
+ exports.g = getOptionValue$1;