intergalactic 15.109.0-prerelease.1 → 15.110.0-prerelease.0

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 (468) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/accordion/lib/cjs/Accordion.js +9 -9
  3. package/accordion/lib/es6/Accordion.js +9 -9
  4. package/accordion/package.json +1 -1
  5. package/animation/lib/cjs/Animation.js +11 -11
  6. package/animation/lib/cjs/Collapse.js +28 -28
  7. package/animation/lib/cjs/FadeInOut.js +28 -28
  8. package/animation/lib/cjs/Scale.js +28 -28
  9. package/animation/lib/cjs/Slide.js +28 -28
  10. package/animation/lib/cjs/Transform.js +28 -28
  11. package/animation/lib/es6/Animation.js +11 -11
  12. package/animation/lib/es6/Collapse.js +28 -28
  13. package/animation/lib/es6/FadeInOut.js +28 -28
  14. package/animation/lib/es6/Scale.js +28 -28
  15. package/animation/lib/es6/Slide.js +28 -28
  16. package/animation/lib/es6/Transform.js +28 -28
  17. package/animation/package.json +1 -1
  18. package/badge/lib/cjs/Badge.js +6 -6
  19. package/badge/lib/es6/Badge.js +6 -6
  20. package/badge/package.json +1 -1
  21. package/base-trigger/lib/cjs/BaseTrigger.js +18 -18
  22. package/base-trigger/lib/cjs/ButtonTrigger.js +3 -3
  23. package/base-trigger/lib/cjs/FilterTrigger.js +9 -9
  24. package/base-trigger/lib/cjs/FilterTrigger.js.map +1 -1
  25. package/base-trigger/lib/cjs/LinkTrigger.js +12 -12
  26. package/base-trigger/lib/es6/BaseTrigger.js +18 -18
  27. package/base-trigger/lib/es6/ButtonTrigger.js +3 -3
  28. package/base-trigger/lib/es6/FilterTrigger.js +10 -10
  29. package/base-trigger/lib/es6/FilterTrigger.js.map +1 -1
  30. package/base-trigger/lib/es6/LinkTrigger.js +12 -12
  31. package/base-trigger/package.json +1 -1
  32. package/breadcrumbs/lib/cjs/Breadcrumbs.js +8 -8
  33. package/breadcrumbs/lib/es6/Breadcrumbs.js +8 -8
  34. package/breadcrumbs/package.json +1 -1
  35. package/breakpoints/package.json +1 -1
  36. package/button/lib/cjs/component/AbstractButton/AbstractButton.js +1 -1
  37. package/button/lib/cjs/component/AbstractButton/AbstractButton.js.map +1 -1
  38. package/button/lib/cjs/component/Button/Button.js +27 -27
  39. package/button/lib/cjs/component/ButtonLink/ButtonLink.js +20 -20
  40. package/button/lib/es6/component/AbstractButton/AbstractButton.js +1 -1
  41. package/button/lib/es6/component/AbstractButton/AbstractButton.js.map +1 -1
  42. package/button/lib/es6/component/Button/Button.js +27 -27
  43. package/button/lib/es6/component/ButtonLink/ButtonLink.js +20 -20
  44. package/button/package.json +1 -1
  45. package/card/lib/cjs/Card.js +6 -6
  46. package/card/lib/es6/Card.js +6 -6
  47. package/card/package.json +1 -1
  48. package/carousel/lib/cjs/Carousel.js +21 -21
  49. package/carousel/lib/es6/Carousel.js +21 -21
  50. package/carousel/package.json +1 -1
  51. package/checkbox/lib/cjs/Checkbox.js +18 -18
  52. package/checkbox/lib/es6/Checkbox.js +18 -18
  53. package/checkbox/package.json +1 -1
  54. package/color-picker/lib/cjs/ColorPicker.js +24 -24
  55. package/color-picker/lib/cjs/PaletteManager.js +24 -24
  56. package/color-picker/lib/cjs/components/InputColor.js +24 -24
  57. package/color-picker/lib/es6/ColorPicker.js +24 -24
  58. package/color-picker/lib/es6/PaletteManager.js +24 -24
  59. package/color-picker/lib/es6/components/InputColor.js +24 -24
  60. package/color-picker/package.json +1 -1
  61. package/components.json +73 -73
  62. package/core/package.json +1 -1
  63. package/counter/lib/cjs/Counter.js +11 -11
  64. package/counter/lib/es6/Counter.js +11 -11
  65. package/counter/package.json +1 -1
  66. package/d3-chart/lib/cjs/Area.js +11 -11
  67. package/d3-chart/lib/cjs/Axis.js +14 -14
  68. package/d3-chart/lib/cjs/Bar.js +16 -16
  69. package/d3-chart/lib/cjs/Bubble.js +12 -12
  70. package/d3-chart/lib/cjs/CompactHorizontalBar.js +16 -16
  71. package/d3-chart/lib/cjs/Donut.js +9 -9
  72. package/d3-chart/lib/cjs/Dots.js +8 -8
  73. package/d3-chart/lib/cjs/HorizontalBar.js +16 -16
  74. package/d3-chart/lib/cjs/Hover.js +3 -3
  75. package/d3-chart/lib/cjs/Line.js +9 -9
  76. package/d3-chart/lib/cjs/Plot.js +3 -3
  77. package/d3-chart/lib/cjs/Radar.js +19 -19
  78. package/d3-chart/lib/cjs/RadialTree.js +12 -12
  79. package/d3-chart/lib/cjs/Reference.js +12 -12
  80. package/d3-chart/lib/cjs/ScatterPlot.js +9 -9
  81. package/d3-chart/lib/cjs/Tooltip.js +9 -9
  82. package/d3-chart/lib/cjs/Venn.js +9 -9
  83. package/d3-chart/lib/cjs/a11y/PlotA11yModule.js +2 -2
  84. package/d3-chart/lib/cjs/a11y/PlotA11yView.js +2 -2
  85. package/d3-chart/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  86. package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +17 -17
  87. package/d3-chart/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  88. package/d3-chart/lib/es6/Area.js +11 -11
  89. package/d3-chart/lib/es6/Axis.js +14 -14
  90. package/d3-chart/lib/es6/Bar.js +16 -16
  91. package/d3-chart/lib/es6/Bubble.js +12 -12
  92. package/d3-chart/lib/es6/CompactHorizontalBar.js +16 -16
  93. package/d3-chart/lib/es6/Donut.js +9 -9
  94. package/d3-chart/lib/es6/Dots.js +8 -8
  95. package/d3-chart/lib/es6/HorizontalBar.js +16 -16
  96. package/d3-chart/lib/es6/Hover.js +3 -3
  97. package/d3-chart/lib/es6/Line.js +9 -9
  98. package/d3-chart/lib/es6/Plot.js +3 -3
  99. package/d3-chart/lib/es6/Radar.js +19 -19
  100. package/d3-chart/lib/es6/RadialTree.js +12 -12
  101. package/d3-chart/lib/es6/Reference.js +12 -12
  102. package/d3-chart/lib/es6/ScatterPlot.js +9 -9
  103. package/d3-chart/lib/es6/Tooltip.js +9 -9
  104. package/d3-chart/lib/es6/Venn.js +9 -9
  105. package/d3-chart/lib/es6/a11y/PlotA11yModule.js +2 -2
  106. package/d3-chart/lib/es6/a11y/PlotA11yView.js +2 -2
  107. package/d3-chart/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  108. package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +17 -17
  109. package/d3-chart/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  110. package/d3-chart/package.json +1 -1
  111. package/data-table/lib/cjs/Body.js +5 -3
  112. package/data-table/lib/cjs/Body.js.map +1 -1
  113. package/data-table/lib/cjs/DataTable.js +36 -36
  114. package/data-table/lib/es6/Body.js +5 -3
  115. package/data-table/lib/es6/Body.js.map +1 -1
  116. package/data-table/lib/es6/DataTable.js +36 -36
  117. package/data-table/package.json +1 -1
  118. package/date-picker/lib/cjs/DateRangeComparator.js +2 -4
  119. package/date-picker/lib/cjs/DateRangeComparator.js.map +1 -1
  120. package/date-picker/lib/cjs/components/Calendar.js +75 -47
  121. package/date-picker/lib/cjs/components/Calendar.js.map +1 -1
  122. package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js +42 -34
  123. package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -1
  124. package/date-picker/lib/cjs/components/InputTrigger.js +39 -37
  125. package/date-picker/lib/cjs/components/InputTrigger.js.map +1 -1
  126. package/date-picker/lib/cjs/components/PickerAbstract.js +47 -35
  127. package/date-picker/lib/cjs/components/PickerAbstract.js.map +1 -1
  128. package/date-picker/lib/cjs/components/RangePickerAbstract.js +54 -46
  129. package/date-picker/lib/cjs/components/RangePickerAbstract.js.map +1 -1
  130. package/date-picker/lib/cjs/components/index.js +5 -6
  131. package/date-picker/lib/cjs/components/index.js.map +1 -1
  132. package/date-picker/lib/cjs/style/calendar.shadow.css +17 -8
  133. package/date-picker/lib/cjs/translations/en.json +7 -2
  134. package/date-picker/lib/es6/DateRangeComparator.js +2 -4
  135. package/date-picker/lib/es6/DateRangeComparator.js.map +1 -1
  136. package/date-picker/lib/es6/components/Calendar.js +75 -47
  137. package/date-picker/lib/es6/components/Calendar.js.map +1 -1
  138. package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js +42 -34
  139. package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -1
  140. package/date-picker/lib/es6/components/InputTrigger.js +39 -37
  141. package/date-picker/lib/es6/components/InputTrigger.js.map +1 -1
  142. package/date-picker/lib/es6/components/PickerAbstract.js +47 -35
  143. package/date-picker/lib/es6/components/PickerAbstract.js.map +1 -1
  144. package/date-picker/lib/es6/components/RangePickerAbstract.js +54 -46
  145. package/date-picker/lib/es6/components/RangePickerAbstract.js.map +1 -1
  146. package/date-picker/lib/es6/components/index.js +5 -6
  147. package/date-picker/lib/es6/components/index.js.map +1 -1
  148. package/date-picker/lib/es6/style/calendar.shadow.css +17 -8
  149. package/date-picker/lib/es6/translations/en.json +7 -2
  150. package/date-picker/package.json +1 -1
  151. package/divider/lib/cjs/Divider.js +10 -10
  152. package/divider/lib/es6/Divider.js +10 -10
  153. package/divider/package.json +1 -1
  154. package/dot/lib/cjs/Dot.js +10 -10
  155. package/dot/lib/es6/Dot.js +10 -10
  156. package/dot/package.json +1 -1
  157. package/drag-and-drop/lib/cjs/DragAndDrop.js +16 -16
  158. package/drag-and-drop/lib/es6/DragAndDrop.js +16 -16
  159. package/drag-and-drop/package.json +1 -1
  160. package/dropdown/index.d.ts +15 -2
  161. package/dropdown/lib/cjs/AbstractDropdown.js +365 -0
  162. package/dropdown/lib/cjs/AbstractDropdown.js.map +1 -0
  163. package/dropdown/lib/cjs/Dropdown.js +79 -28
  164. package/dropdown/lib/cjs/Dropdown.js.map +1 -1
  165. package/dropdown/lib/cjs/DropdownItem.js +18 -0
  166. package/dropdown/lib/cjs/DropdownItem.js.map +1 -0
  167. package/dropdown/lib/cjs/index.d.js.map +1 -1
  168. package/dropdown/lib/cjs/index.js +19 -0
  169. package/dropdown/lib/cjs/index.js.map +1 -1
  170. package/dropdown/lib/cjs/style/dropdown.shadow.css +95 -0
  171. package/dropdown/lib/es6/AbstractDropdown.js +355 -0
  172. package/dropdown/lib/es6/AbstractDropdown.js.map +1 -0
  173. package/dropdown/lib/es6/Dropdown.js +80 -27
  174. package/dropdown/lib/es6/Dropdown.js.map +1 -1
  175. package/dropdown/lib/es6/DropdownItem.js +12 -0
  176. package/dropdown/lib/es6/DropdownItem.js.map +1 -0
  177. package/dropdown/lib/es6/index.d.js.map +1 -1
  178. package/dropdown/lib/es6/index.js +1 -0
  179. package/dropdown/lib/es6/index.js.map +1 -1
  180. package/dropdown/lib/es6/style/dropdown.shadow.css +95 -0
  181. package/dropdown/lib/types/index.d.ts +15 -2
  182. package/dropdown/package.json +1 -1
  183. package/dropdown-menu/index.d.ts +3 -11
  184. package/dropdown-menu/lib/cjs/DropdownMenu.js +167 -418
  185. package/dropdown-menu/lib/cjs/DropdownMenu.js.map +1 -1
  186. package/dropdown-menu/lib/cjs/index.d.js.map +1 -1
  187. package/dropdown-menu/lib/cjs/index.js +0 -7
  188. package/dropdown-menu/lib/cjs/index.js.map +1 -1
  189. package/dropdown-menu/lib/cjs/style/dropdown-menu.shadow.css +3 -91
  190. package/dropdown-menu/lib/cjs/translations/en.json +1 -3
  191. package/dropdown-menu/lib/es6/DropdownMenu.js +167 -419
  192. package/dropdown-menu/lib/es6/DropdownMenu.js.map +1 -1
  193. package/dropdown-menu/lib/es6/index.d.js.map +1 -1
  194. package/dropdown-menu/lib/es6/index.js +0 -1
  195. package/dropdown-menu/lib/es6/index.js.map +1 -1
  196. package/dropdown-menu/lib/es6/style/dropdown-menu.shadow.css +3 -91
  197. package/dropdown-menu/lib/es6/translations/en.json +1 -3
  198. package/dropdown-menu/lib/types/index.d.ts +3 -11
  199. package/dropdown-menu/package.json +1 -1
  200. package/ellipsis/lib/cjs/Ellipsis.js +10 -10
  201. package/ellipsis/lib/es6/Ellipsis.js +10 -10
  202. package/ellipsis/package.json +1 -1
  203. package/errors/lib/cjs/Error.js +9 -9
  204. package/errors/lib/es6/Error.js +9 -9
  205. package/errors/package.json +1 -1
  206. package/feature-popover/lib/cjs/FeaturePopover.js +11 -11
  207. package/feature-popover/lib/es6/FeaturePopover.js +11 -11
  208. package/feature-popover/package.json +1 -1
  209. package/feedback-form/lib/cjs/FeedbackForm.js +7 -7
  210. package/feedback-form/lib/cjs/component/checkbox-button/CheckboxButton.js +3 -3
  211. package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.js +2 -2
  212. package/feedback-form/lib/cjs/component/slider-rating/SliderRating.js +6 -6
  213. package/feedback-form/lib/es6/FeedbackForm.js +7 -7
  214. package/feedback-form/lib/es6/component/checkbox-button/CheckboxButton.js +3 -3
  215. package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.js +2 -2
  216. package/feedback-form/lib/es6/component/slider-rating/SliderRating.js +6 -6
  217. package/feedback-form/package.json +1 -1
  218. package/flags/lib/cjs/Flags.js +3 -3
  219. package/flags/lib/es6/Flags.js +3 -3
  220. package/flags/lib/sprites/sprite@1x.css +256 -256
  221. package/flags/lib/sprites/sprite@2x.css +257 -257
  222. package/flags/package.json +1 -1
  223. package/flex-box/lib/cjs/Box/useBox.js +3 -3
  224. package/flex-box/lib/cjs/Flex/useFlex.js +3 -3
  225. package/flex-box/lib/cjs/invalid-state-box/InvalidStateBox.js +2 -2
  226. package/flex-box/lib/es6/Box/useBox.js +3 -3
  227. package/flex-box/lib/es6/Flex/useFlex.js +3 -3
  228. package/flex-box/lib/es6/invalid-state-box/InvalidStateBox.js +2 -2
  229. package/flex-box/package.json +1 -1
  230. package/format-text/lib/cjs/FormatText.js +5 -5
  231. package/format-text/lib/es6/FormatText.js +5 -5
  232. package/format-text/package.json +1 -1
  233. package/fullscreen-modal/lib/cjs/FullscreenModal.js +13 -13
  234. package/fullscreen-modal/lib/es6/FullscreenModal.js +13 -13
  235. package/fullscreen-modal/package.json +1 -1
  236. package/grid/lib/cjs/Grid.js +114 -114
  237. package/grid/lib/es6/Grid.js +114 -114
  238. package/grid/package.json +1 -1
  239. package/i18n-unplugin/package.json +1 -1
  240. package/icon/color/Confluence/l/index.js +4 -4
  241. package/icon/color/Confluence/l/index.mjs +4 -4
  242. package/icon/color/Confluence/m/index.js +4 -4
  243. package/icon/color/Confluence/m/index.mjs +4 -4
  244. package/icon/color/MicrosoftOffice/l/index.js +10 -10
  245. package/icon/color/MicrosoftOffice/l/index.mjs +10 -10
  246. package/icon/color/MicrosoftOffice/m/index.js +10 -10
  247. package/icon/color/MicrosoftOffice/m/index.mjs +10 -10
  248. package/icon/lib/cjs/Icon.js +6 -6
  249. package/icon/lib/es6/Icon.js +6 -6
  250. package/icon/package.json +1 -1
  251. package/icon/pay/Discover/l/index.js +1 -1
  252. package/icon/pay/Discover/l/index.mjs +1 -1
  253. package/icon/pay/Discover/m/index.js +1 -1
  254. package/icon/pay/Discover/m/index.mjs +1 -1
  255. package/icon/pay/JCB/l/index.js +10 -10
  256. package/icon/pay/JCB/l/index.mjs +10 -10
  257. package/icon/pay/JCB/m/index.js +10 -10
  258. package/icon/pay/JCB/m/index.mjs +10 -10
  259. package/icon/pay/Visa/l/index.js +2 -2
  260. package/icon/pay/Visa/l/index.mjs +2 -2
  261. package/icon/pay/Visa/m/index.js +2 -2
  262. package/icon/pay/Visa/m/index.mjs +2 -2
  263. package/illustration/lib/cjs/index.js +1 -1
  264. package/illustration/lib/es6/index.js +1 -1
  265. package/illustration/package.json +1 -1
  266. package/inline-edit/lib/cjs/InlineEdit.js +4 -4
  267. package/inline-edit/lib/es6/InlineEdit.js +4 -4
  268. package/inline-edit/package.json +1 -1
  269. package/inline-input/lib/cjs/InlineInput.js +14 -14
  270. package/inline-input/lib/es6/InlineInput.js +14 -14
  271. package/inline-input/package.json +1 -1
  272. package/input/lib/cjs/Input.js +17 -17
  273. package/input/lib/es6/Input.js +17 -17
  274. package/input/package.json +1 -1
  275. package/input-mask/InputMask.d.ts +4 -0
  276. package/input-mask/lib/cjs/InputMask.js +11 -9
  277. package/input-mask/lib/cjs/InputMask.js.map +1 -1
  278. package/input-mask/lib/es6/InputMask.js +11 -9
  279. package/input-mask/lib/es6/InputMask.js.map +1 -1
  280. package/input-mask/lib/types/InputMask.d.ts +4 -0
  281. package/input-mask/package.json +1 -1
  282. package/input-number/lib/cjs/InputNumber.js +9 -9
  283. package/input-number/lib/es6/InputNumber.js +9 -9
  284. package/input-number/package.json +1 -1
  285. package/input-tags/lib/cjs/InputTags.js +12 -12
  286. package/input-tags/lib/es6/InputTags.js +12 -12
  287. package/input-tags/package.json +1 -1
  288. package/link/lib/cjs/Link.js +13 -13
  289. package/link/lib/cjs/Link.js.map +1 -1
  290. package/link/lib/es6/Link.js +13 -13
  291. package/link/lib/es6/Link.js.map +1 -1
  292. package/link/package.json +1 -1
  293. package/mini-chart/lib/cjs/component/score/Donut.js +9 -9
  294. package/mini-chart/lib/cjs/component/score/Line.js +17 -17
  295. package/mini-chart/lib/cjs/component/trend/Bar.js +7 -7
  296. package/mini-chart/lib/cjs/component/trend/Line.js +7 -7
  297. package/mini-chart/lib/es6/component/score/Donut.js +9 -9
  298. package/mini-chart/lib/es6/component/score/Line.js +17 -17
  299. package/mini-chart/lib/es6/component/trend/Bar.js +7 -7
  300. package/mini-chart/lib/es6/component/trend/Line.js +7 -7
  301. package/mini-chart/package.json +1 -1
  302. package/modal/lib/cjs/Modal.js +8 -8
  303. package/modal/lib/es6/Modal.js +8 -8
  304. package/modal/package.json +1 -1
  305. package/neighbor-location/package.json +1 -1
  306. package/notice/lib/cjs/Notice.js +14 -14
  307. package/notice/lib/es6/Notice.js +14 -14
  308. package/notice/package.json +1 -1
  309. package/notice-bubble/lib/cjs/NoticeBubble.js +15 -15
  310. package/notice-bubble/lib/es6/NoticeBubble.js +15 -15
  311. package/notice-bubble/package.json +1 -1
  312. package/notice-global/lib/cjs/NoticeGlobal.js +11 -11
  313. package/notice-global/lib/es6/NoticeGlobal.js +11 -11
  314. package/notice-global/package.json +1 -1
  315. package/outside-click/package.json +1 -1
  316. package/package.json +1 -1
  317. package/pagination/lib/cjs/Pagination.js +10 -10
  318. package/pagination/lib/es6/Pagination.js +10 -10
  319. package/pagination/package.json +1 -1
  320. package/pills/lib/cjs/Pills.js +13 -13
  321. package/pills/lib/es6/Pills.js +13 -13
  322. package/pills/package.json +1 -1
  323. package/popper/lib/cjs/Popper.js +6 -6
  324. package/popper/lib/es6/Popper.js +6 -6
  325. package/popper/package.json +1 -1
  326. package/portal/package.json +1 -1
  327. package/product-head/lib/cjs/Info.js +4 -4
  328. package/product-head/lib/cjs/ProductHead.js +5 -5
  329. package/product-head/lib/cjs/Title.js +4 -4
  330. package/product-head/lib/es6/Info.js +4 -4
  331. package/product-head/lib/es6/ProductHead.js +5 -5
  332. package/product-head/lib/es6/Title.js +4 -4
  333. package/product-head/package.json +1 -1
  334. package/progress-bar/lib/cjs/ProgressBar.js +15 -15
  335. package/progress-bar/lib/es6/ProgressBar.js +15 -15
  336. package/progress-bar/package.json +1 -1
  337. package/radio/lib/cjs/Radio.js +16 -16
  338. package/radio/lib/es6/Radio.js +16 -16
  339. package/radio/package.json +1 -1
  340. package/scroll-area/lib/cjs/ScrollArea.js +21 -21
  341. package/scroll-area/lib/cjs/ScrollBar.js +6 -6
  342. package/scroll-area/lib/es6/ScrollArea.js +21 -21
  343. package/scroll-area/lib/es6/ScrollBar.js +6 -6
  344. package/scroll-area/package.json +1 -1
  345. package/select/index.d.ts +16 -2
  346. package/select/lib/cjs/InputSearch.js +12 -13
  347. package/select/lib/cjs/InputSearch.js.map +1 -1
  348. package/select/lib/cjs/Select.js +149 -119
  349. package/select/lib/cjs/Select.js.map +1 -1
  350. package/select/lib/cjs/index.d.js.map +1 -1
  351. package/select/lib/cjs/style/input-search.shadow.css +5 -1
  352. package/select/lib/cjs/style/select.shadow.css +1 -1
  353. package/select/lib/cjs/translations/en.json +1 -3
  354. package/select/lib/es6/InputSearch.js +12 -13
  355. package/select/lib/es6/InputSearch.js.map +1 -1
  356. package/select/lib/es6/Select.js +142 -112
  357. package/select/lib/es6/Select.js.map +1 -1
  358. package/select/lib/es6/index.d.js.map +1 -1
  359. package/select/lib/es6/style/input-search.shadow.css +5 -1
  360. package/select/lib/es6/style/select.shadow.css +1 -1
  361. package/select/lib/es6/translations/en.json +1 -3
  362. package/select/lib/types/index.d.ts +16 -2
  363. package/select/package.json +1 -1
  364. package/side-panel/lib/cjs/SidePanel.js +17 -17
  365. package/side-panel/lib/cjs/SidePanel.js.map +1 -1
  366. package/side-panel/lib/es6/SidePanel.js +17 -17
  367. package/side-panel/lib/es6/SidePanel.js.map +1 -1
  368. package/side-panel/package.json +1 -1
  369. package/skeleton/lib/cjs/Charts/Area.js +9 -9
  370. package/skeleton/lib/cjs/Charts/Bar.js +9 -9
  371. package/skeleton/lib/cjs/Charts/Bubble.js +9 -9
  372. package/skeleton/lib/cjs/Charts/CompactHorizontalBar.js +9 -9
  373. package/skeleton/lib/cjs/Charts/Donut.js +9 -9
  374. package/skeleton/lib/cjs/Charts/Histogram.js +9 -9
  375. package/skeleton/lib/cjs/Charts/Line.js +9 -9
  376. package/skeleton/lib/cjs/Charts/RadialTree.js +9 -9
  377. package/skeleton/lib/cjs/Charts/ScatterPlot.js +9 -9
  378. package/skeleton/lib/cjs/Charts/Venn.js +9 -9
  379. package/skeleton/lib/cjs/Skeleton.js +8 -8
  380. package/skeleton/lib/es6/Charts/Area.js +9 -9
  381. package/skeleton/lib/es6/Charts/Bar.js +9 -9
  382. package/skeleton/lib/es6/Charts/Bubble.js +9 -9
  383. package/skeleton/lib/es6/Charts/CompactHorizontalBar.js +9 -9
  384. package/skeleton/lib/es6/Charts/Donut.js +9 -9
  385. package/skeleton/lib/es6/Charts/Histogram.js +9 -9
  386. package/skeleton/lib/es6/Charts/Line.js +9 -9
  387. package/skeleton/lib/es6/Charts/RadialTree.js +9 -9
  388. package/skeleton/lib/es6/Charts/ScatterPlot.js +9 -9
  389. package/skeleton/lib/es6/Charts/Venn.js +9 -9
  390. package/skeleton/lib/es6/Skeleton.js +8 -8
  391. package/skeleton/package.json +1 -1
  392. package/slider/lib/cjs/Slider.js +8 -8
  393. package/slider/lib/es6/Slider.js +8 -8
  394. package/slider/package.json +1 -1
  395. package/spin/lib/cjs/Spin.js +13 -13
  396. package/spin/lib/es6/Spin.js +13 -13
  397. package/spin/package.json +1 -1
  398. package/spin-container/lib/cjs/SpinContainer.js +8 -8
  399. package/spin-container/lib/es6/SpinContainer.js +8 -8
  400. package/spin-container/package.json +1 -1
  401. package/sticky/lib/cjs/Sticky.js +2 -2
  402. package/sticky/lib/es6/Sticky.js +2 -2
  403. package/sticky/package.json +1 -1
  404. package/switch/lib/cjs/Switch.js +21 -21
  405. package/switch/lib/es6/Switch.js +21 -21
  406. package/switch/package.json +1 -1
  407. package/tab-line/lib/cjs/TabLine.js +13 -13
  408. package/tab-line/lib/es6/TabLine.js +13 -13
  409. package/tab-line/package.json +1 -1
  410. package/tab-panel/lib/cjs/TabPanel.js +8 -8
  411. package/tab-panel/lib/es6/TabPanel.js +8 -8
  412. package/tab-panel/package.json +1 -1
  413. package/tag/lib/cjs/Tag.js +23 -23
  414. package/tag/lib/es6/Tag.js +23 -23
  415. package/tag/package.json +1 -1
  416. package/textarea/lib/cjs/Textarea.js +8 -8
  417. package/textarea/lib/es6/Textarea.js +8 -8
  418. package/textarea/package.json +1 -1
  419. package/time-picker/lib/cjs/TimePicker.js +12 -12
  420. package/time-picker/lib/es6/TimePicker.js +12 -12
  421. package/time-picker/package.json +1 -1
  422. package/tooltip/lib/cjs/Tooltip.js +9 -9
  423. package/tooltip/lib/es6/Tooltip.js +9 -9
  424. package/tooltip/package.json +1 -1
  425. package/typography/lib/cjs/Blockquote.js +4 -4
  426. package/typography/lib/cjs/Hint.js +7 -7
  427. package/typography/lib/cjs/List.js +5 -5
  428. package/typography/lib/cjs/Text.js +34 -34
  429. package/typography/lib/es6/Blockquote.js +4 -4
  430. package/typography/lib/es6/Hint.js +7 -7
  431. package/typography/lib/es6/List.js +5 -5
  432. package/typography/lib/es6/Text.js +34 -34
  433. package/typography/package.json +1 -1
  434. package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.js +2 -2
  435. package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.mjs +2 -2
  436. package/utils/lib/enhances/focusSourceEnhance.d.ts +2 -0
  437. package/utils/lib/enhances/focusSourceEnhance.js.map +1 -1
  438. package/utils/lib/enhances/focusSourceEnhance.mjs.map +1 -1
  439. package/utils/lib/getAccessibleName.d.ts +1 -0
  440. package/utils/lib/getAccessibleName.js +56 -0
  441. package/utils/lib/getAccessibleName.js.map +1 -0
  442. package/utils/lib/getAccessibleName.mjs +49 -0
  443. package/utils/lib/getAccessibleName.mjs.map +1 -0
  444. package/utils/lib/getEventTarget.js +38 -4
  445. package/utils/lib/getEventTarget.js.map +1 -1
  446. package/utils/lib/getEventTarget.mjs +37 -4
  447. package/utils/lib/getEventTarget.mjs.map +1 -1
  448. package/utils/lib/injectStyle.js +1 -1
  449. package/utils/lib/injectStyle.mjs +1 -1
  450. package/utils/lib/inputProps.d.ts +1 -1
  451. package/utils/lib/inputProps.js +3 -3
  452. package/utils/lib/inputProps.js.map +1 -1
  453. package/utils/lib/inputProps.mjs +2 -2
  454. package/utils/lib/inputProps.mjs.map +1 -1
  455. package/widget-empty/lib/cjs/WidgetEmpty.js +5 -5
  456. package/widget-empty/lib/es6/WidgetEmpty.js +5 -5
  457. package/widget-empty/package.json +1 -1
  458. package/wizard/lib/cjs/Wizard.js +14 -14
  459. package/wizard/lib/cjs/Wizard.js.map +1 -1
  460. package/wizard/lib/es6/Wizard.js +14 -14
  461. package/wizard/lib/es6/Wizard.js.map +1 -1
  462. package/wizard/package.json +1 -1
  463. package/dropdown-menu/lib/cjs/DropdownMenuOld.js +0 -682
  464. package/dropdown-menu/lib/cjs/DropdownMenuOld.js.map +0 -1
  465. package/dropdown-menu/lib/cjs/style/dropdown-menu-old.shadow.css +0 -224
  466. package/dropdown-menu/lib/es6/DropdownMenuOld.js +0 -683
  467. package/dropdown-menu/lib/es6/DropdownMenuOld.js.map +0 -1
  468. package/dropdown-menu/lib/es6/style/dropdown-menu-old.shadow.css +0 -224
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport DropdownMenu, {\n DropdownMenuContext,\n DropdownMenuItemProps,\n DropdownMenuProps,\n DropdownMenuHandlers,\n DropdownMenuTriggerProps,\n} from '@semcore/dropdown-menu';\nimport { ButtonTrigger, BaseTriggerProps, ButtonTriggerProps } from '@semcore/base-trigger';\nimport Divider from '@semcore/divider';\nimport Input, { InputValueProps } from '@semcore/input';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface ISelectInputSearch extends SelectInputSearch, UnknownProperties {}\nexport type SelectInputSearch = InputValueProps & {};\n\nexport type OptionValue = string | number;\nexport type SelectValue = string | number | Array<string | number> | null;\n\nexport type SelectOption = {\n value: OptionValue;\n children?: React.ReactNode;\n label?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface ISelectProps<T extends SelectValue = SelectValue> extends SelectProps<T> {}\nexport type SelectProps<T extends SelectValue = SelectValue> = DropdownMenuProps &\n BaseTriggerProps & {\n /**\n * Multiple select\n */\n multiselect?: boolean;\n /**\n * Options array\n */\n options?: SelectOption[];\n /**\n * The value or values array selected by default when using multiselect\n * @type SelectValue\n */\n defaultValue?: T;\n /**\n * The selected value or values array when using multiselect\n * @type SelectValue\n */\n value?: T;\n /**\n * Callback on value change\n * @type (value: SelectValue, e: React.SyntheticEvent) => boolean | void\n */\n onChange?:\n | ((value: T, e: React.SyntheticEvent) => boolean | void)\n | React.Dispatch<React.SetStateAction<T>>;\n /**\n * Trigger placeholder at not selected value\n */\n placeholder?: React.ReactNode;\n /**\n * Trigger state\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disables select\n */\n disabled?: boolean;\n /**\n * If provided, adds a hidden <input /> tag with the given name for enhancing accessibility.\n */\n name?: string;\n locale?: string;\n /**\n * If enabled, after opening select popper view will be scrolled to selected option or, if there are multiple selected options, to the first selected option.\n * @default true\n */\n scrollToSelected?: boolean;\n };\n\n/** @deprecated */\nexport interface ISelectOption extends SelectOption, UnknownProperties {}\n\n/** @deprecated */\nexport interface ISelectOptionProps extends SelectOptionProps, UnknownProperties {}\nexport type SelectOptionProps = DropdownMenuItemProps & {\n /** Value of the option */\n value: string | number;\n};\n\n/** @deprecated */\nexport interface ISelectOptionCheckboxProps extends SelectOptionCheckboxProps, UnknownProperties {}\nexport type SelectOptionCheckboxProps = BoxProps & {\n /** Checkbox theme */\n theme?: string;\n /** Visual indeterminate state */\n indeterminate?: boolean;\n\n selected?: boolean;\n};\n\ndeclare const InputSearch: Intergalactic.Component<'div', SelectInputSearch> & {\n SearchIcon: typeof Input.Addon;\n Value: typeof Input.Value;\n Clear: typeof Input.Addon;\n};\n\n/** @deprecated */\nexport interface ISelectContext extends SelectContext, UnknownProperties {}\nexport type SelectContext = DropdownMenuContext & {\n getOptionProps: PropGetterFn;\n getOptionCheckboxProps: PropGetterFn;\n getDividerProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface ISelectHandlers extends SelectHandlers, UnknownProperties {}\nexport type SelectHandlers = DropdownMenuHandlers & {\n value: (index: SelectValue) => void;\n};\n\ntype IntergalacticSelectComponent<PropsExtending = {}> = (<\n Value extends SelectValue,\n Tag extends Intergalactic.Tag = 'div',\n>(\n props: Intergalactic.InternalTypings.ComponentProps<\n Tag,\n 'div',\n SelectProps<Value>,\n SelectContext,\n [handlers: SelectHandlers]\n > &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', SelectProps>;\n\ndeclare const Select: IntergalacticSelectComponent & {\n Trigger: Intergalactic.Component<\n 'div',\n DropdownMenuTriggerProps & ButtonTriggerProps,\n {},\n [handlers: SelectHandlers]\n > & {\n Addon: typeof ButtonTrigger.Addon;\n Text: typeof ButtonTrigger.Text;\n };\n Popper: typeof DropdownMenu.Popper;\n List: typeof DropdownMenu.List;\n Menu: typeof DropdownMenu.Menu;\n Option: Intergalactic.Component<\n 'option',\n SelectOptionProps,\n SelectContext,\n [handlers: SelectHandlers]\n > & {\n Addon: typeof DropdownMenu.Item.Addon;\n Checkbox: Intergalactic.Component<'div', SelectOptionCheckboxProps>;\n };\n OptionTitle: typeof DropdownMenu.ItemTitle;\n OptionHint: typeof DropdownMenu.ItemHint;\n Divider: typeof Divider;\n InputSearch: typeof InputSearch;\n Input: typeof InputSearch;\n};\n\ndeclare const wrapSelect: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticSelectComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticSelectComponent<PropsExtending>;\n\nexport { InputSearch, wrapSelect };\nexport default Select;\n"],"mappings":""}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport DropdownMenu, {\n DropdownMenuContext,\n DropdownMenuItemProps,\n DropdownMenuProps,\n DropdownMenuHandlers,\n DropdownMenuTriggerProps,\n} from '@semcore/dropdown-menu';\nimport Dropdown from '@semcore/dropdown';\nimport { ButtonTrigger, BaseTriggerProps, ButtonTriggerProps } from '@semcore/base-trigger';\nimport Divider from '@semcore/divider';\nimport Input, { InputValueProps } from '@semcore/input';\nimport { BoxProps, Flex } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface ISelectInputSearch extends SelectInputSearch, UnknownProperties {}\nexport type SelectInputSearch = InputValueProps & {};\n\nexport type OptionValue = string | number;\nexport type SelectValue = string | number | Array<string | number> | null;\n\nexport type SelectOption = {\n value: OptionValue;\n children?: React.ReactNode;\n label?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface ISelectProps<T extends SelectValue = SelectValue> extends SelectProps<T> {}\nexport type SelectProps<T extends SelectValue = SelectValue> = DropdownMenuProps &\n BaseTriggerProps & {\n /**\n * Multiple select\n */\n multiselect?: boolean;\n /**\n * Options array\n */\n options?: SelectOption[];\n /**\n * The value or values array selected by default when using multiselect\n * @type SelectValue\n */\n defaultValue?: T;\n /**\n * The selected value or values array when using multiselect\n * @type SelectValue\n */\n value?: T;\n /**\n * Callback on value change\n * @type (value: SelectValue, e: React.SyntheticEvent) => boolean | void\n */\n onChange?:\n | ((value: T, e: React.SyntheticEvent) => boolean | void)\n | React.Dispatch<React.SetStateAction<T>>;\n /**\n * Trigger placeholder at not selected value\n */\n placeholder?: React.ReactNode;\n /**\n * Trigger state\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disables select\n */\n disabled?: boolean;\n /**\n * If provided, adds a hidden <input /> tag with the given name for enhancing accessibility.\n */\n name?: string;\n locale?: string;\n /**\n * If enabled, after opening select popper view will be scrolled to selected option or, if there are multiple selected options, to the first selected option.\n * @default true\n */\n scrollToSelected?: boolean;\n };\n\n/** @deprecated */\nexport interface ISelectOption extends SelectOption, UnknownProperties {}\n\n/** @deprecated */\nexport interface ISelectOptionProps extends SelectOptionProps, UnknownProperties {}\nexport type SelectOptionProps = DropdownMenuItemProps & {\n /**\n * Enables selected state\n */\n selected?: boolean;\n /** Value of the option */\n value: string | number;\n};\n\n/** @deprecated */\nexport interface ISelectOptionCheckboxProps extends SelectOptionCheckboxProps, UnknownProperties {}\nexport type SelectOptionCheckboxProps = BoxProps & {\n /** Checkbox theme */\n theme?: string;\n /** Visual indeterminate state */\n indeterminate?: boolean;\n\n selected?: boolean;\n};\n\ndeclare const InputSearch: Intergalactic.Component<'div', SelectInputSearch> & {\n SearchIcon: typeof Input.Addon;\n Value: typeof Input.Value;\n Clear: typeof Input.Addon;\n};\n\n/** @deprecated */\nexport interface ISelectContext extends SelectContext, UnknownProperties {}\nexport type SelectContext = DropdownMenuContext & {\n getOptionProps: PropGetterFn;\n getOptionCheckboxProps: PropGetterFn;\n getDividerProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface ISelectHandlers extends SelectHandlers, UnknownProperties {}\nexport type SelectHandlers = DropdownMenuHandlers & {\n value: (index: SelectValue) => void;\n};\n\ntype IntergalacticSelectComponent<PropsExtending = {}> = (<\n Value extends SelectValue,\n Tag extends Intergalactic.Tag = 'div',\n>(\n props: Intergalactic.InternalTypings.ComponentProps<\n Tag,\n 'div',\n SelectProps<Value>,\n SelectContext,\n [handlers: SelectHandlers]\n > &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', SelectProps>;\n\ndeclare const Select: IntergalacticSelectComponent & {\n Trigger: Intergalactic.Component<\n typeof Dropdown.Trigger,\n DropdownMenuTriggerProps & ButtonTriggerProps,\n {},\n [handlers: SelectHandlers]\n > & {\n Addon: typeof ButtonTrigger.Addon;\n Text: typeof ButtonTrigger.Text;\n };\n Popper: typeof DropdownMenu.Popper;\n List: typeof DropdownMenu.List;\n Menu: typeof DropdownMenu.Menu;\n Group: typeof Dropdown.Group;\n Option: Intergalactic.Component<\n 'option',\n SelectOptionProps,\n SelectContext,\n [handlers: SelectHandlers]\n > & {\n Addon: typeof DropdownMenu.Item.Addon;\n Checkbox: Intergalactic.Component<'div', SelectOptionCheckboxProps>;\n Content: typeof Flex;\n Hint: typeof Flex;\n };\n /**\n * @deprecated Use Select.Group\n */\n OptionTitle: typeof DropdownMenu.ItemTitle;\n /**\n * @deprecated Use Select.Option.Hint or Select.Group with subTitle property\n */\n OptionHint: typeof DropdownMenu.ItemHint;\n Divider: typeof Divider;\n InputSearch: typeof InputSearch;\n Input: typeof InputSearch;\n};\n\ndeclare const wrapSelect: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticSelectComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticSelectComponent<PropsExtending>;\n\nexport { InputSearch, wrapSelect };\nexport default Select;\n"],"mappings":""}
@@ -2,6 +2,10 @@ SInputSearch[size='m'] {
2
2
  height: 32px;
3
3
  }
4
4
 
5
+ SSearchClear {
6
+ padding: 0 var(--intergalactic-spacing-2x, 8px);
7
+ }
8
+
5
9
  SSearchClear[hide] {
6
10
  visibility: hidden;
7
11
  }
@@ -13,4 +17,4 @@ SOutline {
13
17
  width: 100%;
14
18
  border-radius: var(--intergalactic-control-rounded, 6px) var(--intergalactic-control-rounded, 6px) 0 0;
15
19
  box-sizing: content-box;
16
- }
20
+ }
@@ -91,4 +91,4 @@ SOptionCheckbox[indeterminate][size='l']:after {
91
91
  SOptionCheckbox[indeterminate][size='m']:after {
92
92
  width: 8px;
93
93
  height: 2px;
94
- }
94
+ }
@@ -1,6 +1,4 @@
1
1
  {
2
2
  "clearSearch": "Clear search field",
3
- "selectPlaceholder": "Select option",
4
- "triggerHint": "Press Tab to go to popover",
5
- "optionsList": "List of options"
3
+ "selectPlaceholder": "Select option"
6
4
  }
@@ -15,16 +15,17 @@ import createComponent, { Component, sstyled, Root } from 'intergalactic/core';
15
15
  import SearchM from 'intergalactic/icon/Search/m';
16
16
  import CloseM from 'intergalactic/icon/Close/m';
17
17
  import Input from 'intergalactic/input';
18
+ import { ButtonLink } from 'intergalactic/button';
18
19
  import { selectContext } from './context';
19
20
  import i18nEnhance from 'intergalactic/utils/lib/enhances/i18nEnhance';
20
21
  import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
21
22
  /*__reshadow-styles__:"./style/input-search.shadow.css"*/
22
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SInputSearch_1qgf4_gg_._size_m_1qgf4_gg_{height:32px}.___SSearchClear_1qgf4_gg_.__hide_1qgf4_gg_{visibility:hidden}.___SOutline_1qgf4_gg_{top:-1px;left:-1px;width:100%;border-radius:var(--intergalactic-control-rounded, 6px) var(--intergalactic-control-rounded, 6px)0 0;box-sizing:content-box}" /*__inner_css_end__*/, "1qgf4_gg_") /*__reshadow_css_end__*/, {
23
- "__SInputSearch": "___SInputSearch_1qgf4_gg_",
24
- "_size_m": "_size_m_1qgf4_gg_",
25
- "__SSearchClear": "___SSearchClear_1qgf4_gg_",
26
- "_hide": "__hide_1qgf4_gg_",
27
- "__SOutline": "___SOutline_1qgf4_gg_"
23
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SInputSearch_1jwu3_gg_._size_m_1jwu3_gg_{height:32px}.___SSearchClear_1jwu3_gg_{padding:0 var(--intergalactic-spacing-2x, 8px)}.___SSearchClear_1jwu3_gg_.__hide_1jwu3_gg_{visibility:hidden}.___SOutline_1jwu3_gg_{top:-1px;left:-1px;width:100%;border-radius:var(--intergalactic-control-rounded, 6px) var(--intergalactic-control-rounded, 6px)0 0;box-sizing:content-box}" /*__inner_css_end__*/, "1jwu3_gg_") /*__reshadow_css_end__*/, {
24
+ "__SInputSearch": "___SInputSearch_1jwu3_gg_",
25
+ "_size_m": "_size_m_1jwu3_gg_",
26
+ "__SSearchClear": "___SSearchClear_1jwu3_gg_",
27
+ "_hide": "__hide_1jwu3_gg_",
28
+ "__SOutline": "___SOutline_1jwu3_gg_"
28
29
  });
29
30
  var InputSearchRoot = /*#__PURE__*/function (_Component) {
30
31
  _inherits(InputSearchRoot, _Component);
@@ -74,12 +75,10 @@ var InputSearchRoot = /*#__PURE__*/function (_Component) {
74
75
  value = _this$asProps.value,
75
76
  getI18nText = _this$asProps.getI18nText;
76
77
  return {
77
- role: 'button',
78
78
  ref: this.closeIconRef,
79
79
  /* hide through css because the width of the input changes */
80
80
  hide: !value,
81
81
  'aria-hidden': !value,
82
- interactive: true,
83
82
  'aria-label': getI18nText('clearSearch'),
84
83
  onClick: this.handleClear
85
84
  };
@@ -130,12 +129,12 @@ var SearchValue = function SearchValue(props) {
130
129
  var SearchClear = function SearchClear(props) {
131
130
  var _ref4 = arguments[0],
132
131
  _ref8;
133
- var SSearchClear = Input.Addon;
134
- var styles = props.styles,
135
- Children = props.Children;
132
+ var SSearchClear = ButtonLink;
133
+ var styles = props.styles;
136
134
  return _ref8 = sstyled(styles), /*#__PURE__*/React.createElement(SSearchClear, _ref8.cn("SSearchClear", _objectSpread({}, _assignProps4({
137
- "tag": CloseM
138
- }, _ref4))), /*#__PURE__*/React.createElement(Children, _ref8.cn("Children", {})));
135
+ "addonLeft": CloseM,
136
+ "use": 'secondary'
137
+ }, _ref4))));
139
138
  };
140
139
  var InputSearch = createComponent(InputSearchRoot, {
141
140
  SearchIcon: SearchIcon,
@@ -1 +1 @@
1
- {"version":3,"file":"InputSearch.js","names":["React","createComponent","Component","sstyled","Root","SearchM","CloseM","Input","selectContext","i18nEnhance","localizedMessages","style","_sstyled","insert","InputSearchRoot","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","createRef","e","handlers","value","setTimeout","document","activeElement","body","closeIconRef","current","_this$inputRef$curren","inputRef","focus","_createClass","key","uncontrolledProps","getValueProps","asProps","onChange","autoFocus","ref","getClearProps","_this$asProps","getI18nText","role","hide","interactive","onClick","handleClear","render","_ref","_ref5","Value","InputSearch","SInputSearch","_this$asProps2","size","styles","hasChildren","children","Children","createElement","cn","context","Fragment","SearchIcon","_objectSpread","_assignProps","Clear","defaultValue","i18n","locale","props","_ref2","arguments[0]","_ref6","SSearchIcon","Addon","_assignProps2","SearchValue","_ref3","_ref7","SSearchValue","_assignProps3","SearchClear","_ref4","_ref8","SSearchClear","_assignProps4"],"sources":["../../src/InputSearch.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport SearchM from '@semcore/icon/Search/m';\nimport CloseM from '@semcore/icon/Close/m';\nimport Input from '@semcore/input';\nimport { selectContext } from './context';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nimport style from './style/input-search.shadow.css';\n\nclass InputSearchRoot extends Component {\n static displayName = 'InputSearch';\n\n static style = style;\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n defaultValue: '',\n i18n: localizedMessages,\n locale: 'en',\n };\n inputRef = React.createRef();\n closeIconRef = React.createRef();\n\n static contextType = selectContext;\n\n uncontrolledProps() {\n return {\n value: null,\n };\n }\n\n handleClear = (e) => {\n this.handlers.value('', e);\n setTimeout(() => {\n if (\n document.activeElement === document.body ||\n document.activeElement === this.closeIconRef.current\n ) {\n this.inputRef.current?.focus();\n }\n }, 0);\n };\n\n getValueProps() {\n const { value } = this.asProps;\n return {\n value,\n onChange: this.handlers.value,\n autoFocus: true,\n ref: this.inputRef,\n };\n }\n getClearProps() {\n const { value, getI18nText } = this.asProps;\n return {\n role: 'button',\n ref: this.closeIconRef,\n /* hide through css because the width of the input changes */\n hide: !value,\n 'aria-hidden': !value,\n interactive: true,\n 'aria-label': getI18nText('clearSearch'),\n onClick: this.handleClear,\n };\n }\n\n render() {\n const Value = Root;\n const SInputSearch = Input;\n const { size, styles, children: hasChildren, Children } = this.asProps;\n\n return sstyled(styles)(\n <SInputSearch size={size || this.context.size || 'm'} styles={styles}>\n {hasChildren ? (\n <Children />\n ) : (\n <>\n <InputSearch.SearchIcon />\n <Value render={InputSearch.Value} />\n <InputSearch.Clear />\n </>\n )}\n </SInputSearch>,\n );\n }\n}\n\nconst SearchIcon = (props) => {\n const SSearchIcon = Root;\n const { styles } = props;\n return sstyled(styles)(\n <SSearchIcon render={Input.Addon}>\n <SearchM />\n </SSearchIcon>,\n );\n};\nconst SearchValue = (props) => {\n const SSearchValue = Root;\n const { styles } = props;\n return sstyled(styles)(<SSearchValue render={Input.Value} />);\n};\nconst SearchClear = (props) => {\n const SSearchClear = Root;\n const { styles, Children } = props;\n return sstyled(styles)(\n <SSearchClear render={Input.Addon} tag={CloseM}>\n <Children />\n </SSearchClear>,\n );\n};\n\nconst InputSearch = createComponent(InputSearchRoot, {\n SearchIcon: SearchIcon,\n Value: SearchValue,\n Clear: SearchClear,\n});\n\nexport default InputSearch;\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,OAAO,MAAM,wBAAwB;AAC5C,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,KAAK,MAAM,gBAAgB;AAClC,SAASC,aAAa,QAAQ,WAAW;AACzC,OAAOC,WAAW,MAAM,yCAAyC;AACjE,SAASC,iBAAiB,QAAQ,gDAAgD;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAI7EC,eAAe,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,eAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,eAAA;EAAA,SAAAA,gBAAA;IAAA,IAAAK,KAAA;IAAAC,eAAA,OAAAN,eAAA;IAAA,SAAAO,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAL,IAAA;IAAAM,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,4BAURnB,KAAK,CAACgC,SAAS,EAAE;IAAAF,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,gCACbnB,KAAK,CAACgC,SAAS,EAAE;IAAAF,eAAA,CAAAC,sB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ACkF,KAAK;EAFnC,IAAQpB,MAAM,GAAee,KAAK,CAA1Bf,MAAM;IAAEG,QAAQ,GAAKY,KAAK,CAAlBZ,QAAQ;EACxB,OAAA0B,KAAA,GAAO/F,OAAO,CAACkE,MAAM,CAAC,eACpBrE,KAAA,CAAAyE,aAAA,CAAC0B,YAAY,EAAAD,KAAA,CAAAxB,EAAA,iBAAAI,aAAA,KAAAsB,aAAA;IAAA,OAA2B9F;EAAM,GAAA2F,KAAA,kBAC5CjG,KAAA,CAAAyE,aAAA,CAACD,QAAQ,EAAA0B,KAAA,CAAAxB,EAAA,iBAAG,CACC;AAEnB,CAAC;AAED,IAAMT,WAAW,GAAGhE,eAAe,CAACa,eAAe,EAAE;EACnD+D,UAAU,EAAEA,UAAU;EACtBb,KAAK,EAAE2B,WAAW;EAClBX,KAAK,EAAEgB;AACT,CAAC,CAAC;AAEF,eAAe/B,WAAW"}
1
+ {"version":3,"file":"InputSearch.js","names":["React","createComponent","Component","sstyled","Root","SearchM","CloseM","Input","ButtonLink","selectContext","i18nEnhance","localizedMessages","style","_sstyled","insert","InputSearchRoot","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","createRef","e","handlers","value","setTimeout","document","activeElement","body","closeIconRef","current","_this$inputRef$curren","inputRef","focus","_createClass","key","uncontrolledProps","getValueProps","asProps","onChange","autoFocus","ref","getClearProps","_this$asProps","getI18nText","hide","onClick","handleClear","render","_ref","_ref5","Value","InputSearch","SInputSearch","_this$asProps2","size","styles","hasChildren","children","Children","createElement","cn","context","Fragment","SearchIcon","_objectSpread","_assignProps","Clear","defaultValue","i18n","locale","props","_ref2","arguments[0]","_ref6","SSearchIcon","Addon","_assignProps2","SearchValue","_ref3","_ref7","SSearchValue","_assignProps3","SearchClear","_ref4","_ref8","SSearchClear","_assignProps4"],"sources":["../../src/InputSearch.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport SearchM from '@semcore/icon/Search/m';\nimport CloseM from '@semcore/icon/Close/m';\nimport Input from '@semcore/input';\nimport { ButtonLink } from '@semcore/button';\nimport { selectContext } from './context';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nimport style from './style/input-search.shadow.css';\n\nclass InputSearchRoot extends Component {\n static displayName = 'InputSearch';\n\n static style = style;\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n defaultValue: '',\n i18n: localizedMessages,\n locale: 'en',\n };\n inputRef = React.createRef();\n closeIconRef = React.createRef();\n\n static contextType = selectContext;\n\n uncontrolledProps() {\n return {\n value: null,\n };\n }\n\n handleClear = (e) => {\n this.handlers.value('', e);\n setTimeout(() => {\n if (\n document.activeElement === document.body ||\n document.activeElement === this.closeIconRef.current\n ) {\n this.inputRef.current?.focus();\n }\n }, 0);\n };\n\n getValueProps() {\n const { value } = this.asProps;\n return {\n value,\n onChange: this.handlers.value,\n autoFocus: true,\n ref: this.inputRef,\n };\n }\n getClearProps() {\n const { value, getI18nText } = this.asProps;\n return {\n ref: this.closeIconRef,\n /* hide through css because the width of the input changes */\n hide: !value,\n 'aria-hidden': !value,\n 'aria-label': getI18nText('clearSearch'),\n onClick: this.handleClear,\n };\n }\n\n render() {\n const Value = Root;\n const SInputSearch = Input;\n const { size, styles, children: hasChildren, Children } = this.asProps;\n\n return sstyled(styles)(\n <SInputSearch size={size || this.context.size || 'm'} styles={styles}>\n {hasChildren ? (\n <Children />\n ) : (\n <>\n <InputSearch.SearchIcon />\n <Value render={InputSearch.Value} />\n <InputSearch.Clear />\n </>\n )}\n </SInputSearch>,\n );\n }\n}\n\nconst SearchIcon = (props) => {\n const SSearchIcon = Root;\n const { styles } = props;\n return sstyled(styles)(\n <SSearchIcon render={Input.Addon}>\n <SearchM />\n </SSearchIcon>,\n );\n};\nconst SearchValue = (props) => {\n const SSearchValue = Root;\n const { styles } = props;\n return sstyled(styles)(<SSearchValue render={Input.Value} />);\n};\nconst SearchClear = (props) => {\n const SSearchClear = Root;\n const { styles } = props;\n return sstyled(styles)(<SSearchClear render={ButtonLink} addonLeft={CloseM} use={'secondary'} />);\n};\n\nconst InputSearch = createComponent(InputSearchRoot, {\n SearchIcon: SearchIcon,\n Value: SearchValue,\n Clear: SearchClear,\n});\n\nexport default InputSearch;\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,OAAO,MAAM,wBAAwB;AAC5C,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,KAAK,MAAM,gBAAgB;AAClC,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,aAAa,QAAQ,WAAW;AACzC,OAAOC,WAAW,MAAM,yCAAyC;AACjE,SAASC,iBAAiB,QAAQ,gDAAgD;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAI7EC,eAAe,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,eAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,eAAA;EAAA,SAAAA,gBAAA;IAAA,IAAAK,KAAA;IAAAC,eAAA,OAAAN,eAAA;IAAA,SAAAO,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAL,IAAA;IAAAM,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,4BAURp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,IAAAa,KAAA,GAAAX,YAAA;IAAAY,KAAA;EAC7B,IAAMC,YAAY,GAE2B1F,UAAU;EADvD,IAAQ4D,MAAM,GAAKe,KAAK,CAAhBf,MAAM;EACd,OAAA6B,KAAA,GAAO9F,OAAO,CAACiE,MAAM,CAAC,eAACpE,KAAA,CAAAwE,aAAA,CAAC0B,YAAY,EAAAD,KAAA,CAAAxB,EAAA,iBAAAI,aAAA,KAAAsB,aAAA;IAAA,aAAgC7F,MAAM;IAAA,OAAO;EAAW,GAAA0F,KAAA,IAAI;AAClG,CAAC;AAED,IAAMhC,WAAW,GAAG/D,eAAe,CAACc,eAAe,EAAE;EACnD6D,UAAU,EAAEA,UAAU;EACtBb,KAAK,EAAE2B,WAAW;EAClBX,KAAK,EAAEgB;AACT,CAAC,CAAC;AAEF,eAAe/B,WAAW"}
@@ -5,6 +5,8 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
5
5
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
6
6
  import _createClass from "@babel/runtime/helpers/createClass";
7
7
  import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
8
+ import _get from "@babel/runtime/helpers/get";
9
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
10
  import _inherits from "@babel/runtime/helpers/inherits";
9
11
  import _createSuper from "@babel/runtime/helpers/createSuper";
10
12
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
@@ -17,8 +19,9 @@ import { assignProps as _assignProps } from 'intergalactic/core';
17
19
  var _excluded = ["Children", "options", "multiselect", "value", "uid", "forcedAdvancedMode"];
18
20
  import React from 'react';
19
21
  import cn from 'classnames';
20
- import createComponent, { Component, Root, sstyled } from 'intergalactic/core';
21
- import { DropdownMenuOld as DropdownMenu } from 'intergalactic/dropdown-menu';
22
+ import createComponent, { Root, sstyled } from 'intergalactic/core';
23
+ import DropdownMenu from 'intergalactic/dropdown-menu';
24
+ import Dropdown, { AbstractDropdown, enhance, selectedIndexContext } from 'intergalactic/dropdown';
22
25
  import { ButtonTrigger } from 'intergalactic/base-trigger';
23
26
  import Divider from 'intergalactic/divider';
24
27
  import findComponent from 'intergalactic/utils/lib/findComponent';
@@ -28,21 +31,20 @@ import addonTextChildren from 'intergalactic/utils/lib/addonTextChildren';
28
31
  import InputSearch from './InputSearch';
29
32
  import { useBox } from 'intergalactic/flex-box';
30
33
  import { selectContext } from './context';
31
- import uniqueIDEnhancement from 'intergalactic/utils/lib/uniqueID';
32
- import i18nEnhance from 'intergalactic/utils/lib/enhances/i18nEnhance';
33
34
  import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
34
35
  import { isInputTriggerTag } from 'intergalactic/popper';
35
- import { Flex } from 'intergalactic/flex-box';
36
36
  /*__reshadow-styles__:"./style/select.shadow.css"*/
37
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SOptionCheckbox_lr4th_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-right:var(--intergalactic-spacing-2x, 8px);margin-bottom:auto;position:relative;flex-shrink:0;width:16px;height:16px}.___SOptionCheckbox_lr4th_gg_::before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--intergalactic-bg-primary-neutral, #ffffff);border:1px solid;border-radius:var(--intergalactic-addon-rounded, 4px);border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SOptionCheckbox_lr4th_gg_::after{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;margin:0 var(--intergalactic-spacing-05x, 2px);background-repeat:no-repeat;background-position:center center}.___SOptionCheckbox_lr4th_gg_.__selected_lr4th_gg_::after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iNyIgdmlld0JveD0iMCAwIDEwIDciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04LjI1IDFMNCA1LjI1TDEuNzUgMyIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==)}.___SOptionCheckbox_lr4th_gg_._size_l_lr4th_gg_{width:20px;height:20px}.___SOptionCheckbox_lr4th_gg_._size_l_lr4th_gg_.__selected_lr4th_gg_::after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMSAxLjVMNC43NSA3Ljc1TDEgNCIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==)}.___SOptionCheckbox_lr4th_gg_.__indeterminate_lr4th_gg_:before,.___SOptionCheckbox_lr4th_gg_.__selected_lr4th_gg_:before{background-color:var(--intergalactic-control-primary-info, #008ff8);border-color:var(--intergalactic-control-primary-info, #008ff8)}.___SOptionCheckbox_lr4th_gg_.__theme_lr4th_gg_:before{border-color:var(--theme_lr4th)}.___SOptionCheckbox_lr4th_gg_.__theme_lr4th_gg_.__indeterminate_lr4th_gg_:before,.___SOptionCheckbox_lr4th_gg_.__theme_lr4th_gg_.__selected_lr4th_gg_:before{background-color:var(--theme_lr4th);border-color:var(--theme_lr4th)}.___SOptionCheckbox_lr4th_gg_.__selected_lr4th_gg_{background-color:var(--intergalactic-dropdown-menu-item-selected, rgba(196, 229, 254, 0.7))}@media (hover:hover){.___SOptionCheckbox_lr4th_gg_.__selected_lr4th_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-selected-hover, #c4e5fe)}}.___SOptionCheckbox_lr4th_gg_.__indeterminate_lr4th_gg_:after{background-color:#fff;background-image:none;margin:auto;border-radius:1px}.___SOptionCheckbox_lr4th_gg_.__indeterminate_lr4th_gg_._size_l_lr4th_gg_:after{width:12px;height:2px}.___SOptionCheckbox_lr4th_gg_.__indeterminate_lr4th_gg_._size_m_lr4th_gg_:after{width:8px;height:2px}" /*__inner_css_end__*/, "lr4th_gg_") /*__reshadow_css_end__*/, {
38
- "__SOptionCheckbox": "___SOptionCheckbox_lr4th_gg_",
39
- "_selected": "__selected_lr4th_gg_",
40
- "_size_l": "_size_l_lr4th_gg_",
41
- "_indeterminate": "__indeterminate_lr4th_gg_",
42
- "_theme": "__theme_lr4th_gg_",
43
- "--theme": "--theme_lr4th",
44
- "_size_m": "_size_m_lr4th_gg_"
37
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SOptionCheckbox_jpeh3_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-right:var(--intergalactic-spacing-2x, 8px);margin-bottom:auto;position:relative;flex-shrink:0;width:16px;height:16px}.___SOptionCheckbox_jpeh3_gg_::before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--intergalactic-bg-primary-neutral, #ffffff);border:1px solid;border-radius:var(--intergalactic-addon-rounded, 4px);border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SOptionCheckbox_jpeh3_gg_::after{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;margin:0 var(--intergalactic-spacing-05x, 2px);background-repeat:no-repeat;background-position:center center}.___SOptionCheckbox_jpeh3_gg_.__selected_jpeh3_gg_::after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iNyIgdmlld0JveD0iMCAwIDEwIDciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04LjI1IDFMNCA1LjI1TDEuNzUgMyIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==)}.___SOptionCheckbox_jpeh3_gg_._size_l_jpeh3_gg_{width:20px;height:20px}.___SOptionCheckbox_jpeh3_gg_._size_l_jpeh3_gg_.__selected_jpeh3_gg_::after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMSAxLjVMNC43NSA3Ljc1TDEgNCIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==)}.___SOptionCheckbox_jpeh3_gg_.__indeterminate_jpeh3_gg_:before,.___SOptionCheckbox_jpeh3_gg_.__selected_jpeh3_gg_:before{background-color:var(--intergalactic-control-primary-info, #008ff8);border-color:var(--intergalactic-control-primary-info, #008ff8)}.___SOptionCheckbox_jpeh3_gg_.__theme_jpeh3_gg_:before{border-color:var(--theme_jpeh3)}.___SOptionCheckbox_jpeh3_gg_.__theme_jpeh3_gg_.__indeterminate_jpeh3_gg_:before,.___SOptionCheckbox_jpeh3_gg_.__theme_jpeh3_gg_.__selected_jpeh3_gg_:before{background-color:var(--theme_jpeh3);border-color:var(--theme_jpeh3)}.___SOptionCheckbox_jpeh3_gg_.__selected_jpeh3_gg_{background-color:var(--intergalactic-dropdown-menu-item-selected, rgba(196, 229, 254, 0.7))}@media (hover:hover){.___SOptionCheckbox_jpeh3_gg_.__selected_jpeh3_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-selected-hover, #c4e5fe)}}.___SOptionCheckbox_jpeh3_gg_.__indeterminate_jpeh3_gg_:after{background-color:#fff;background-image:none;margin:auto;border-radius:1px}.___SOptionCheckbox_jpeh3_gg_.__indeterminate_jpeh3_gg_._size_l_jpeh3_gg_:after{width:12px;height:2px}.___SOptionCheckbox_jpeh3_gg_.__indeterminate_jpeh3_gg_._size_m_jpeh3_gg_:after{width:8px;height:2px}" /*__inner_css_end__*/, "jpeh3_gg_") /*__reshadow_css_end__*/, {
38
+ "__SOptionCheckbox": "___SOptionCheckbox_jpeh3_gg_",
39
+ "_selected": "__selected_jpeh3_gg_",
40
+ "_size_l": "_size_l_jpeh3_gg_",
41
+ "_indeterminate": "__indeterminate_jpeh3_gg_",
42
+ "_theme": "__theme_jpeh3_gg_",
43
+ "--theme": "--theme_jpeh3",
44
+ "_size_m": "_size_m_jpeh3_gg_"
45
45
  });
46
+ import { callAllEventHandlers } from 'intergalactic/utils/lib/assignProps';
47
+ import { isAdvanceMode } from 'intergalactic/utils/lib/findComponent';
46
48
  function isSelectedOption(value, valueOption) {
47
49
  return Array.isArray(value) ? value.includes(valueOption) : valueOption === value;
48
50
  }
@@ -52,16 +54,8 @@ function isEmptyValue(value) {
52
54
  function getEmptyValue(multiselect) {
53
55
  return multiselect ? [] : null;
54
56
  }
55
- var scrollToNode = function scrollToNode(node) {
56
- if (!node) return;
57
- if (!node.scrollIntoView) return;
58
- node.scrollIntoView({
59
- block: 'nearest',
60
- inline: 'nearest'
61
- });
62
- };
63
- var RootSelect = /*#__PURE__*/function (_Component) {
64
- _inherits(RootSelect, _Component);
57
+ var RootSelect = /*#__PURE__*/function (_AbstractDropdown) {
58
+ _inherits(RootSelect, _AbstractDropdown);
65
59
  var _super = _createSuper(RootSelect);
66
60
  function RootSelect() {
67
61
  var _this;
@@ -70,30 +64,13 @@ var RootSelect = /*#__PURE__*/function (_Component) {
70
64
  args[_key] = arguments[_key];
71
65
  }
72
66
  _this = _super.call.apply(_super, [this].concat(args));
73
- _defineProperty(_assertThisInitialized(_this), "firstSelectedOptionRef", /*#__PURE__*/React.createRef());
74
- _defineProperty(_assertThisInitialized(_this), "triggerRef", /*#__PURE__*/React.createRef());
75
- _defineProperty(_assertThisInitialized(_this), "isScrolledToFirstOption", false);
76
- _defineProperty(_assertThisInitialized(_this), "lastHandleOptionNodeCall", -1);
77
- _defineProperty(_assertThisInitialized(_this), "handleOptionNode", function (node) {
78
- if (!_this.asProps.scrollToSelected) return;
79
- if (Date.now() - _this.lastHandleOptionNodeCall < 30) return;
80
- _this.lastHandleOptionNodeCall = Date.now();
81
- setTimeout(function () {
82
- // in most cases 10ms timeout works perfectly and scrolls before user can see it
83
- if (_this.asProps.visible) scrollToNode(node);
84
- }, 10);
85
- setTimeout(function () {
86
- // in rare cases 10ms timeout it not enough so 30ms timeout saves the day
87
- if (_this.asProps.visible) scrollToNode(node);
88
- }, 30);
89
- });
90
- _defineProperty(_assertThisInitialized(_this), "bindHandlerOptionClick", function (optionValue) {
67
+ _defineProperty(_assertThisInitialized(_this), "role", 'listbox');
68
+ _defineProperty(_assertThisInitialized(_this), "bindHandlerOptionClick", function (optionValue, index) {
91
69
  return function (e) {
92
70
  var newValue = optionValue;
93
71
  var _this$asProps = _this.asProps,
94
72
  value = _this$asProps.value,
95
- multiselect = _this$asProps.multiselect,
96
- interaction = _this$asProps.interaction;
73
+ multiselect = _this$asProps.multiselect;
97
74
  if (Array.isArray(value)) {
98
75
  if (value.includes(optionValue)) {
99
76
  newValue = value.filter(function (v) {
@@ -106,6 +83,7 @@ var RootSelect = /*#__PURE__*/function (_Component) {
106
83
  _this.handlers.value(newValue, e);
107
84
  if (!multiselect) {
108
85
  _this.handlers.visible(false);
86
+ e.preventDefault();
109
87
  }
110
88
  };
111
89
  });
@@ -118,18 +96,47 @@ var RootSelect = /*#__PURE__*/function (_Component) {
118
96
  return _this;
119
97
  }
120
98
  _createClass(RootSelect, [{
99
+ key: "itemRef",
100
+ value: function itemRef(props, index, node) {
101
+ _get(_getPrototypeOf(RootSelect.prototype), "itemRef", this).call(this, props, index, node);
102
+ var highlightedIndex = this.asProps.highlightedIndex;
103
+ var isHighlighted = index === highlightedIndex;
104
+ if (isHighlighted) {
105
+ this.scrollToNode(node);
106
+ }
107
+ }
108
+ }, {
121
109
  key: "uncontrolledProps",
122
110
  value: function uncontrolledProps() {
123
- return {
124
- visible: null,
111
+ var _this2 = this;
112
+ return _objectSpread(_objectSpread({}, _get(_getPrototypeOf(RootSelect.prototype), "uncontrolledProps", this).call(this)), {}, {
113
+ visible: [null, function (visible) {
114
+ if (visible === true) {
115
+ setTimeout(function () {
116
+ var _this2$menuRef$curren, _this2$menuRef$curren2;
117
+ var options = (_this2$menuRef$curren = _this2.menuRef.current) === null || _this2$menuRef$curren === void 0 ? void 0 : _this2$menuRef$curren.querySelectorAll('[role="option"]');
118
+ var selected = (_this2$menuRef$curren2 = _this2.menuRef.current) === null || _this2$menuRef$curren2 === void 0 ? void 0 : _this2$menuRef$curren2.querySelector('[aria-selected="true"]');
119
+ if (selected && options) {
120
+ _this2.scrollToNode(selected);
121
+ for (var i = 0; i < options.length; i++) {
122
+ if (options[i] === selected) {
123
+ _this2.handlers.highlightedIndex(i);
124
+ break;
125
+ }
126
+ }
127
+ }
128
+ // for some reason, Google Chrome optimizes this timeout with 0 value with previous render (when we set aria-selected)
129
+ // and that's why its skip scrollToNodes. We selected the appropriate timeout manually.
130
+ }, 30);
131
+ }
132
+ }],
125
133
  value: null
126
- };
134
+ });
127
135
  }
128
136
  }, {
129
137
  key: "getTriggerProps",
130
138
  value: function getTriggerProps() {
131
139
  var _this$asProps2 = this.asProps,
132
- size = _this$asProps2.size,
133
140
  disabled = _this$asProps2.disabled,
134
141
  visible = _this$asProps2.visible,
135
142
  state = _this$asProps2.state,
@@ -139,18 +146,20 @@ var RootSelect = /*#__PURE__*/function (_Component) {
139
146
  forwardRef = _this$asProps2.forwardRef,
140
147
  name = _this$asProps2.name,
141
148
  multiselect = _this$asProps2.multiselect,
149
+ getI18nText = _this$asProps2.getI18nText,
150
+ highlightedIndex = _this$asProps2.highlightedIndex,
142
151
  uid = _this$asProps2.uid,
143
- disablePortal = _this$asProps2.disablePortal,
144
- getI18nText = _this$asProps2.getI18nText;
145
- return {
146
- id: "igc-".concat(uid, "-trigger"),
147
- 'aria-controls': visible ? "igc-".concat(uid, "-list") : undefined,
148
- focusHint: visible && !disablePortal ? getI18nText('triggerHint') : undefined,
149
- 'aria-haspopup': 'listbox',
150
- 'aria-expanded': visible ? 'true' : 'false',
152
+ Children = _this$asProps2.Children,
153
+ hasChildren = _this$asProps2.children;
154
+ var isMenu = isAdvanceMode(Children, [Select.Menu.displayName], true) || !hasChildren;
155
+ var ariaControls = isMenu ? "igc-".concat(uid, "-list") : "igc-".concat(uid, "-popper");
156
+ return _objectSpread(_objectSpread({}, _get(_getPrototypeOf(RootSelect.prototype), "getTriggerProps", this).call(this)), {}, {
157
+ onKeyDown: callAllEventHandlers(this.handlePreventCommonKeyDown.bind(this), this.handleOpenKeyDown.bind(this), this.handleArrowKeyDown.bind(this)),
158
+ 'aria-controls': visible ? ariaControls : undefined,
159
+ 'aria-haspopup': isMenu ? 'listbox' : 'dialog',
151
160
  'aria-disabled': disabled ? 'true' : 'false',
161
+ 'aria-activedescendant': visible && highlightedIndex !== null ? "igc-".concat(uid, "-option-").concat(highlightedIndex) : undefined,
152
162
  empty: isEmptyValue(value),
153
- size: size,
154
163
  value: value,
155
164
  name: name,
156
165
  $hiddenRef: forwardRef,
@@ -161,60 +170,56 @@ var RootSelect = /*#__PURE__*/function (_Component) {
161
170
  active: visible,
162
171
  onClear: this.handlerClear,
163
172
  children: this.renderChildrenTrigger(value, options),
164
- getI18nText: getI18nText,
165
- ref: this.triggerRef
166
- };
173
+ getI18nText: getI18nText
174
+ });
167
175
  }
168
176
  }, {
169
177
  key: "getListProps",
170
178
  value: function getListProps() {
171
- var _this$asProps3 = this.asProps,
172
- multiselect = _this$asProps3.multiselect,
173
- uid = _this$asProps3.uid;
174
- return {
175
- 'aria-multiselectable': multiselect ? 'true' : undefined,
176
- id: "igc-".concat(uid, "-list"),
177
- role: 'listbox',
178
- 'aria-label': 'List of options'
179
- };
179
+ var multiselect = this.asProps.multiselect;
180
+ return _objectSpread(_objectSpread({}, _get(_getPrototypeOf(RootSelect.prototype), "getListProps", this).call(this)), {}, {
181
+ 'aria-multiselectable': multiselect ? 'true' : undefined
182
+ });
180
183
  }
181
184
  }, {
182
- key: "getMenuProps",
183
- value: function getMenuProps() {
184
- var _this$asProps4 = this.asProps,
185
- uid = _this$asProps4.uid,
186
- getI18nText = _this$asProps4.getI18nText,
187
- multiselect = _this$asProps4.multiselect;
188
- return {
189
- 'aria-multiselectable': multiselect ? 'true' : undefined,
190
- id: "igc-".concat(uid, "-list"),
191
- role: 'listbox',
192
- 'aria-label': getI18nText('optionsList')
193
- };
185
+ key: "getPopperProps",
186
+ value: function getPopperProps() {
187
+ return _objectSpread(_objectSpread({}, _get(_getPrototypeOf(RootSelect.prototype), "getPopperProps", this).call(this)), {}, {
188
+ onKeyDown: callAllEventHandlers(this.handlePreventCommonKeyDown.bind(this), this.handlePreventPopperKeyDown.bind(this), this.handleArrowKeyDown.bind(this))
189
+ });
194
190
  }
195
191
  }, {
196
192
  key: "getOptionProps",
197
- value: function getOptionProps(props) {
198
- var value = this.asProps.value;
199
- var selected = isSelectedOption(value, props.value);
200
- var other = {};
201
- if (selected) {
202
- other.ref = this.handleOptionNode;
203
- }
204
- return _objectSpread({
193
+ value: function getOptionProps(props, index) {
194
+ var _props$selected,
195
+ _this3 = this;
196
+ var _this$asProps3 = this.asProps,
197
+ value = _this$asProps3.value,
198
+ highlightedIndex = _this$asProps3.highlightedIndex,
199
+ focusSourceRef = _this$asProps3.focusSourceRef,
200
+ _this$asProps3$size = _this$asProps3.size,
201
+ size = _this$asProps3$size === void 0 ? 'm' : _this$asProps3$size;
202
+ var highlighted = index === highlightedIndex && focusSourceRef.current === 'keyboard';
203
+ var selected = (_props$selected = props.selected) !== null && _props$selected !== void 0 ? _props$selected : isSelectedOption(value, props.value);
204
+ return _objectSpread(_objectSpread({}, _get(_getPrototypeOf(RootSelect.prototype), "getItemProps", this).call(this, props, index)), {}, {
205
+ highlighted: highlighted,
205
206
  selected: selected,
206
207
  'aria-selected': selected ? 'true' : 'false',
207
208
  'aria-disabled': props.disabled ? 'true' : 'false',
208
209
  role: 'option',
209
- onClick: this.bindHandlerOptionClick(props.value)
210
- }, other);
210
+ onClick: this.bindHandlerOptionClick(props.value, index),
211
+ ref: function ref(node) {
212
+ return _this3.itemRef(props, index, node);
213
+ },
214
+ size: size
215
+ });
211
216
  }
212
217
  }, {
213
218
  key: "getOptionCheckboxProps",
214
219
  value: function getOptionCheckboxProps() {
215
- var _this$asProps5 = this.asProps,
216
- size = _this$asProps5.size,
217
- resolveColor = _this$asProps5.resolveColor;
220
+ var _this$asProps4 = this.asProps,
221
+ size = _this$asProps4.size,
222
+ resolveColor = _this$asProps4.resolveColor;
218
223
  return {
219
224
  size: size,
220
225
  resolveColor: resolveColor
@@ -228,6 +233,17 @@ var RootSelect = /*#__PURE__*/function (_Component) {
228
233
  'aria-disabled': 'true'
229
234
  };
230
235
  }
236
+ }, {
237
+ key: "handleOpenKeyDown",
238
+ value: function handleOpenKeyDown(e) {
239
+ _get(_getPrototypeOf(RootSelect.prototype), "handleOpenKeyDown", this).call(this, e);
240
+ if (this.asProps.visible !== true && ['ArrowDown', 'ArrowUp', 'Enter', ' '].includes(e.key)) {
241
+ var hasInputSearch = isAdvanceMode(this.asProps.Children, [Select.InputSearch.displayName], true);
242
+ var defaultIndex = hasInputSearch ? null : 0;
243
+ this.handlers.highlightedIndex(defaultIndex);
244
+ return false;
245
+ }
246
+ }
231
247
  }, {
232
248
  key: "renderChildrenTrigger",
233
249
  value: function renderChildrenTrigger(value, options) {
@@ -252,16 +268,17 @@ var RootSelect = /*#__PURE__*/function (_Component) {
252
268
  key: "render",
253
269
  value: function render() {
254
270
  var _ref2 = this.asProps;
255
- var _this$asProps6 = this.asProps,
256
- Children = _this$asProps6.Children,
257
- options = _this$asProps6.options,
258
- multiselect = _this$asProps6.multiselect,
259
- value = _this$asProps6.value,
260
- uid = _this$asProps6.uid,
261
- forcedAdvancedMode = _this$asProps6.forcedAdvancedMode,
262
- other = _objectWithoutProperties(_this$asProps6, _excluded);
271
+ var _this$asProps5 = this.asProps,
272
+ Children = _this$asProps5.Children,
273
+ options = _this$asProps5.options,
274
+ multiselect = _this$asProps5.multiselect,
275
+ value = _this$asProps5.value,
276
+ uid = _this$asProps5.uid,
277
+ forcedAdvancedMode = _this$asProps5.forcedAdvancedMode,
278
+ other = _objectWithoutProperties(_this$asProps5, _excluded);
263
279
  var advancedMode = forcedAdvancedMode || findComponent(Children, [Select.Trigger.displayName, Select.Popper.displayName]);
264
280
  logger.warn(options && advancedMode, "Don't use at the same time 'options' property and '<Select.Trigger/>/<Select.Popper/>'", other['data-ui-name'] || Select.displayName);
281
+ this.itemProps = [];
265
282
  if (options) {
266
283
  var _ref = this.asProps;
267
284
  return /*#__PURE__*/React.createElement(DropdownMenu, _assignProps({}, _ref), /*#__PURE__*/React.createElement(Select.Trigger, other), /*#__PURE__*/React.createElement(Select.Menu, null, options.map(function (option, index) {
@@ -275,19 +292,27 @@ var RootSelect = /*#__PURE__*/function (_Component) {
275
292
  }
276
293
  }]);
277
294
  return RootSelect;
278
- }(Component);
295
+ }(AbstractDropdown);
279
296
  _defineProperty(RootSelect, "displayName", 'Select');
280
297
  _defineProperty(RootSelect, "style", style);
281
- _defineProperty(RootSelect, "enhance", [uniqueIDEnhancement(), i18nEnhance(localizedMessages), resolveColorEnhance()]);
298
+ _defineProperty(RootSelect, "enhance", Object.values(enhance).concat([resolveColorEnhance()]));
282
299
  _defineProperty(RootSelect, "defaultProps", function (props) {
300
+ var _props$highlightedInd, _props$selectedIndex, _props$interaction, _props$timeout;
301
+ var hasInputSearch = props.children && isAdvanceMode(props.children, [Select.InputSearch.displayName], true);
302
+ var defaultIndex = hasInputSearch ? null : 0;
283
303
  return {
284
304
  placeholder: props.multiselect ? 'Select options' : 'Select option',
285
305
  size: 'm',
286
306
  defaultValue: getEmptyValue(props.multiselect),
287
307
  defaultVisible: false,
308
+ defaultHighlightedIndex: (_props$highlightedInd = props.highlightedIndex) !== null && _props$highlightedInd !== void 0 ? _props$highlightedInd : defaultIndex,
309
+ defaultSelectedIndex: (_props$selectedIndex = props.selectedIndex) !== null && _props$selectedIndex !== void 0 ? _props$selectedIndex : defaultIndex,
288
310
  scrollToSelected: true,
289
311
  i18n: localizedMessages,
290
- locale: 'en'
312
+ locale: 'en',
313
+ interaction: (_props$interaction = props.interaction) !== null && _props$interaction !== void 0 ? _props$interaction : 'click',
314
+ inlineActions: false,
315
+ timeout: (_props$timeout = props.timeout) !== null && _props$timeout !== void 0 ? _props$timeout : 0
291
316
  };
292
317
  });
293
318
  function Trigger(_ref8) {
@@ -302,12 +327,13 @@ function Trigger(_ref8) {
302
327
  Tag = _ref8$tag === void 0 ? ButtonTrigger : _ref8$tag,
303
328
  getI18nText = _ref8.getI18nText;
304
329
  var hasInputTrigger = isInputTriggerTag(Tag);
305
- var SSelectTrigger = DropdownMenu.Trigger;
330
+ var SSelectTrigger = Dropdown.Trigger;
306
331
  return _ref6 = sstyled(styles), /*#__PURE__*/React.createElement(SSelectTrigger, _ref6.cn("SSelectTrigger", _objectSpread({}, _assignProps3({
307
332
  "tag": Tag,
308
333
  "placeholder": getI18nText('selectPlaceholder'),
334
+ "role": 'combobox',
309
335
  "aria-autocomplete": hasInputTrigger && 'list' || undefined
310
- }, _ref3))), addonTextChildren(Children, Tag.Text || ButtonTrigger.Text, Tag.Addon || ButtonTrigger.Addon, true), name && /*#__PURE__*/React.createElement("input", _ref6.cn("input", {
336
+ }, _ref3))), addonTextChildren(Children, Tag.Text || ButtonTrigger.Text, Tag.Value || ButtonTrigger.Text, Tag.Addon || ButtonTrigger.Addon, true), name && /*#__PURE__*/React.createElement("input", _ref6.cn("input", {
311
337
  "type": 'hidden',
312
338
  "defaultValue": value,
313
339
  "name": name,
@@ -318,14 +344,14 @@ var optionPropsContext = /*#__PURE__*/React.createContext({});
318
344
  function Option(props) {
319
345
  var _ref4 = arguments[0],
320
346
  _ref7;
321
- var SSelectOption = DropdownMenu.Item;
347
+ var SSelectOption = Dropdown.Item;
322
348
  var styles = props.styles,
323
349
  Children = props.Children;
324
- return _ref7 = sstyled(styles), /*#__PURE__*/React.createElement(SSelectOption, _ref7.cn("SSelectOption", _objectSpread({}, _assignProps4({
325
- "tag": Flex
326
- }, _ref4))), /*#__PURE__*/React.createElement(optionPropsContext.Provider, {
350
+ var hasCheckbox = isAdvanceMode(Children, [Select.Option.Checkbox.displayName]);
351
+ var hasContent = isAdvanceMode(Children, [Select.Option.Content.displayName]);
352
+ return _ref7 = sstyled(styles), /*#__PURE__*/React.createElement(SSelectOption, _ref7.cn("SSelectOption", _objectSpread({}, _assignProps4({}, _ref4))), /*#__PURE__*/React.createElement(optionPropsContext.Provider, {
327
353
  value: props
328
- }, /*#__PURE__*/React.createElement(Children, _ref7.cn("Children", {}))));
354
+ }, hasCheckbox && !hasContent ? /*#__PURE__*/React.createElement(Select.Option.Content, null, /*#__PURE__*/React.createElement(Children, _ref7.cn("Children", {}))) : /*#__PURE__*/React.createElement(Children, _ref7.cn("Children", {}))));
329
355
  }
330
356
  function Checkbox(providedProps) {
331
357
  var optionProps = React.useContext(optionPropsContext);
@@ -369,13 +395,16 @@ var Select = createComponent(RootSelect, {
369
395
  Addon: ButtonTrigger.Addon,
370
396
  Text: ButtonTrigger.Text
371
397
  }],
372
- Popper: DropdownMenu.Popper,
398
+ Popper: Dropdown.Popper,
373
399
  List: DropdownMenu.List,
374
400
  Menu: DropdownMenu.Menu,
375
401
  Option: [Option, {
376
402
  Addon: DropdownMenu.Item.Addon,
403
+ Content: DropdownMenu.Item.Content,
404
+ Hint: DropdownMenu.Item.Hint,
377
405
  Checkbox: Checkbox
378
406
  }],
407
+ Group: Dropdown.Group,
379
408
  OptionTitle: DropdownMenu.ItemTitle,
380
409
  OptionHint: DropdownMenu.ItemHint,
381
410
  Divider: Divider,
@@ -388,5 +417,6 @@ var Select = createComponent(RootSelect, {
388
417
  export var wrapSelect = function wrapSelect(wrapper) {
389
418
  return wrapper;
390
419
  };
420
+ Select.selectedIndexContext = selectedIndexContext;
391
421
  export default Select;
392
422
  //# sourceMappingURL=Select.js.map