intergalactic 15.109.0 → 15.110.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
package/select/index.d.ts CHANGED
@@ -7,10 +7,11 @@ import DropdownMenu, {
7
7
  DropdownMenuHandlers,
8
8
  DropdownMenuTriggerProps,
9
9
  } from 'intergalactic/dropdown-menu';
10
+ import Dropdown from 'intergalactic/dropdown';
10
11
  import { ButtonTrigger, BaseTriggerProps, ButtonTriggerProps } from 'intergalactic/base-trigger';
11
12
  import Divider from 'intergalactic/divider';
12
13
  import Input, { InputValueProps } from 'intergalactic/input';
13
- import { BoxProps } from 'intergalactic/flex-box';
14
+ import { BoxProps, Flex } from 'intergalactic/flex-box';
14
15
 
15
16
  /** @deprecated */
16
17
  export interface ISelectInputSearch extends SelectInputSearch, UnknownProperties {}
@@ -84,6 +85,10 @@ export interface ISelectOption extends SelectOption, UnknownProperties {}
84
85
  /** @deprecated */
85
86
  export interface ISelectOptionProps extends SelectOptionProps, UnknownProperties {}
86
87
  export type SelectOptionProps = DropdownMenuItemProps & {
88
+ /**
89
+ * Enables selected state
90
+ */
91
+ selected?: boolean;
87
92
  /** Value of the option */
88
93
  value: string | number;
89
94
  };
@@ -136,7 +141,7 @@ type IntergalacticSelectComponent<PropsExtending = {}> = (<
136
141
 
137
142
  declare const Select: IntergalacticSelectComponent & {
138
143
  Trigger: Intergalactic.Component<
139
- 'div',
144
+ typeof Dropdown.Trigger,
140
145
  DropdownMenuTriggerProps & ButtonTriggerProps,
141
146
  {},
142
147
  [handlers: SelectHandlers]
@@ -147,6 +152,7 @@ declare const Select: IntergalacticSelectComponent & {
147
152
  Popper: typeof DropdownMenu.Popper;
148
153
  List: typeof DropdownMenu.List;
149
154
  Menu: typeof DropdownMenu.Menu;
155
+ Group: typeof Dropdown.Group;
150
156
  Option: Intergalactic.Component<
151
157
  'option',
152
158
  SelectOptionProps,
@@ -155,8 +161,16 @@ declare const Select: IntergalacticSelectComponent & {
155
161
  > & {
156
162
  Addon: typeof DropdownMenu.Item.Addon;
157
163
  Checkbox: Intergalactic.Component<'div', SelectOptionCheckboxProps>;
164
+ Content: typeof Flex;
165
+ Hint: typeof Flex;
158
166
  };
167
+ /**
168
+ * @deprecated Use Select.Group
169
+ */
159
170
  OptionTitle: typeof DropdownMenu.ItemTitle;
171
+ /**
172
+ * @deprecated Use Select.Option.Hint or Select.Group with subTitle property
173
+ */
160
174
  OptionHint: typeof DropdownMenu.ItemHint;
161
175
  Divider: typeof Divider;
162
176
  InputSearch: typeof InputSearch;
@@ -19,16 +19,17 @@ var _react = _interopRequireDefault(require("react"));
19
19
  var _m = _interopRequireDefault(require("intergalactic/icon/Search/m"));
20
20
  var _m2 = _interopRequireDefault(require("intergalactic/icon/Close/m"));
21
21
  var _input = _interopRequireDefault(require("intergalactic/input"));
22
+ var _button = require("intergalactic/button");
22
23
  var _context = require("./context");
23
24
  var _i18nEnhance = _interopRequireDefault(require("intergalactic/utils/lib/enhances/i18nEnhance"));
24
25
  var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
25
26
  /*__reshadow-styles__:"./style/input-search.shadow.css"*/
26
- var style = ( /*__reshadow_css_start__*/_index.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__*/, {
27
- "__SInputSearch": "___SInputSearch_1qgf4_gg_",
28
- "_size_m": "_size_m_1qgf4_gg_",
29
- "__SSearchClear": "___SSearchClear_1qgf4_gg_",
30
- "_hide": "__hide_1qgf4_gg_",
31
- "__SOutline": "___SOutline_1qgf4_gg_"
27
+ var style = ( /*__reshadow_css_start__*/_index.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__*/, {
28
+ "__SInputSearch": "___SInputSearch_1jwu3_gg_",
29
+ "_size_m": "_size_m_1jwu3_gg_",
30
+ "__SSearchClear": "___SSearchClear_1jwu3_gg_",
31
+ "_hide": "__hide_1jwu3_gg_",
32
+ "__SOutline": "___SOutline_1jwu3_gg_"
32
33
  });
33
34
  var InputSearchRoot = /*#__PURE__*/function (_Component) {
34
35
  (0, _inherits2["default"])(InputSearchRoot, _Component);
@@ -78,12 +79,10 @@ var InputSearchRoot = /*#__PURE__*/function (_Component) {
78
79
  value = _this$asProps.value,
79
80
  getI18nText = _this$asProps.getI18nText;
80
81
  return {
81
- role: 'button',
82
82
  ref: this.closeIconRef,
83
83
  /* hide through css because the width of the input changes */
84
84
  hide: !value,
85
85
  'aria-hidden': !value,
86
- interactive: true,
87
86
  'aria-label': getI18nText('clearSearch'),
88
87
  onClick: this.handleClear
89
88
  };
@@ -134,12 +133,12 @@ var SearchValue = function SearchValue(props) {
134
133
  var SearchClear = function SearchClear(props) {
135
134
  var _ref4 = arguments[0],
136
135
  _ref8;
137
- var SSearchClear = _input["default"].Addon;
138
- var styles = props.styles,
139
- Children = props.Children;
136
+ var SSearchClear = _button.ButtonLink;
137
+ var styles = props.styles;
140
138
  return _ref8 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SSearchClear, _ref8.cn("SSearchClear", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
141
- "tag": _m2["default"]
142
- }, _ref4))), /*#__PURE__*/_react["default"].createElement(Children, _ref8.cn("Children", {})));
139
+ "addonLeft": _m2["default"],
140
+ "use": 'secondary'
141
+ }, _ref4))));
143
142
  };
144
143
  var InputSearch = (0, _core["default"])(InputSearchRoot, {
145
144
  SearchIcon: SearchIcon,
@@ -1 +1 @@
1
- {"version":3,"file":"InputSearch.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_m","_m2","_input","_context","_i18nEnhance","_intergalacticDynamicLocales","style","_index","sstyled","insert","InputSearchRoot","_Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","React","createRef","e","handlers","value","setTimeout","document","activeElement","body","closeIconRef","current","_this$inputRef$curren","inputRef","focus","_createClass2","key","uncontrolledProps","getValueProps","asProps","onChange","autoFocus","ref","getClearProps","_this$asProps","getI18nText","role","hide","interactive","onClick","handleClear","render","_ref","_ref5","Value","InputSearch","SInputSearch","Input","_this$asProps2","size","styles","hasChildren","children","Children","createElement","cn","context","Fragment","SearchIcon","_objectSpread2","assignProps","Clear","Component","i18nEnhance","localizedMessages","defaultValue","i18n","locale","selectContext","props","_ref2","arguments[0]","_ref6","SSearchIcon","Addon","SearchValue","_ref3","_ref7","SSearchValue","SearchClear","_ref4","_ref8","SSearchClear","CloseM","createComponent","_default","exports"],"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":";;;;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OA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AAC2B,KAAK;EAFnC,IAAQxB,MAAM,GAAemB,KAAK,CAA1BnB,MAAM;IAAEG,QAAQ,GAAKgB,KAAK,CAAlBhB,QAAQ;EACxB,OAAA4B,KAAA,GAAO,IAAA1F,aAAO,EAAC2D,MAAM,CAAC,eACpBrE,MAAA,YAAAyE,aAAA,CAAC4B,YAAY,EAAAD,KAAA,CAAA1B,EAAA,qBAAAI,cAAA,qBAAAjF,KAAA,CAAAkF,WAAA;IAAA,OAA2BuB;EAAM,GAAAH,KAAA,kBAC5CnG,MAAA,YAAAyE,aAAA,CAACD,QAAQ,EAAA4B,KAAA,CAAA1B,EAAA,iBAAG,CACC;AAEnB,CAAC;AAED,IAAMV,WAAW,GAAG,IAAAuC,gBAAe,EAAC3F,eAAe,EAAE;EACnDiE,UAAU,EAAEA,UAAU;EACtBd,KAAK,EAAE+B,WAAW;EAClBd,KAAK,EAAEkB;AACT,CAAC,CAAC;AAAC,IAAAM,QAAA,GAEYxC,WAAW;AAAAyC,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"InputSearch.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_m","_m2","_input","_button","_context","_i18nEnhance","_intergalacticDynamicLocales","style","_index","sstyled","insert","InputSearchRoot","_Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","React","createRef","e","handlers","value","setTimeout","document","activeElement","body","closeIconRef","current","_this$inputRef$curren","inputRef","focus","_createClass2","key","uncontrolledProps","getValueProps","asProps","onChange","autoFocus","ref","getClearProps","_this$asProps","getI18nText","hide","onClick","handleClear","render","_ref","_ref5","Value","InputSearch","SInputSearch","Input","_this$asProps2","size","styles","hasChildren","children","Children","createElement","cn","context","Fragment","SearchIcon","_objectSpread2","assignProps","Clear","Component","i18nEnhance","localizedMessages","defaultValue","i18n","locale","selectContext","props","_ref2","arguments[0]","_ref6","SSearchIcon","Addon","SearchValue","_ref3","_ref7","SSearchValue","SearchClear","_ref4","_ref8","SSearchClear","ButtonLink","CloseM","createComponent","_default","exports"],"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":";;;;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,EAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,GAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,4BAAA,GAAAT,OAAA;AAAmF;AAAA,IAAAU,KAAA,+BAAAC,MAAA,CAAAC,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAI7EC,eAAe,0BAAAC,UAAA;EAAA,IAAAC,UAAA,aAAAF,eAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,eAAA;EAAA,SAAAA,gBAAA;IAAA,IAAAK,KAAA;IAAA,IAAAC,gBAAA,mBAAAN,eAAA;IAAA,SAAAO,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAA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YAAY,GAE2B/B,iBAAK,CAACH,KAAK;EADxD,IAAQM,MAAM,GAAKmB,KAAK,CAAhBnB,MAAM;EACd,OAAA2B,KAAA,GAAO,IAAApF,aAAO,EAACyD,MAAM,CAAC,eAACpE,MAAA,YAAAwE,aAAA,CAACwB,YAAY,EAAAD,KAAA,CAAAtB,EAAA,qBAAAI,cAAA,qBAAAhF,KAAA,CAAAiF,WAAA,MAAAgB,KAAA,IAAwB;AAC9D,CAAC;AACD,IAAMG,WAAW,GAAG,SAAdA,WAAWA,CAAIV,KAAK,EAAK;EAAA,IAAAW,KAAA,GAAAT,YAAA;IAAAU,KAAA;EAC7B,IAAMC,YAAY,GAE2BC,kBAAU;EADvD,IAAQjC,MAAM,GAAKmB,KAAK,CAAhBnB,MAAM;EACd,OAAA+B,KAAA,GAAO,IAAAxF,aAAO,EAACyD,MAAM,CAAC,eAACpE,MAAA,YAAAwE,aAAA,CAAC4B,YAAY,EAAAD,KAAA,CAAA1B,EAAA,qBAAAI,cAAA,qBAAAhF,KAAA,CAAAiF,WAAA;IAAA,aAAgCwB,cAAM;IAAA,OAAO;EAAW,GAAAJ,KAAA,IAAI;AAClG,CAAC;AAED,IAAMnC,WAAW,GAAG,IAAAwC,gBAAe,EAAC1F,eAAe,EAAE;EACnD+D,UAAU,EAAEA,UAAU;EACtBd,KAAK,EAAE+B,WAAW;EAClBd,KAAK,EAAEkB;AACT,CAAC,CAAC;AAAC,IAAAO,QAAA,GAEYzC,WAAW;AAAA0C,OAAA,cAAAD,QAAA"}
@@ -13,6 +13,8 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
13
13
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
14
14
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
15
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
16
+ var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
17
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
16
18
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
17
19
  var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
18
20
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
@@ -20,30 +22,30 @@ var _index = require("intergalactic/utils/lib/core/index");
20
22
  var _core = _interopRequireWildcard(require("intergalactic/core"));
21
23
  var _react = _interopRequireDefault(require("react"));
22
24
  var _classnames = _interopRequireDefault(require("classnames"));
23
- var _dropdownMenu = require("intergalactic/dropdown-menu");
25
+ var _dropdownMenu = _interopRequireDefault(require("intergalactic/dropdown-menu"));
26
+ var _dropdown = _interopRequireWildcard(require("intergalactic/dropdown"));
24
27
  var _baseTrigger = require("intergalactic/base-trigger");
25
28
  var _divider = _interopRequireDefault(require("intergalactic/divider"));
26
- var _findComponent = _interopRequireDefault(require("intergalactic/utils/lib/findComponent"));
29
+ var _findComponent = _interopRequireWildcard(require("intergalactic/utils/lib/findComponent"));
27
30
  var _logger = _interopRequireDefault(require("intergalactic/utils/lib/logger"));
28
31
  var _resolveColorEnhance = _interopRequireDefault(require("intergalactic/utils/lib/enhances/resolveColorEnhance"));
29
32
  var _addonTextChildren = _interopRequireDefault(require("intergalactic/utils/lib/addonTextChildren"));
30
33
  var _InputSearch = _interopRequireDefault(require("./InputSearch"));
31
34
  var _flexBox = require("intergalactic/flex-box");
32
35
  var _context = require("./context");
33
- var _uniqueID = _interopRequireDefault(require("intergalactic/utils/lib/uniqueID"));
34
- var _i18nEnhance = _interopRequireDefault(require("intergalactic/utils/lib/enhances/i18nEnhance"));
35
36
  var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
36
37
  var _popper = require("intergalactic/popper");
38
+ var _assignProps6 = require("intergalactic/utils/lib/assignProps");
37
39
  var _excluded = ["Children", "options", "multiselect", "value", "uid", "forcedAdvancedMode"];
38
40
  /*__reshadow-styles__:"./style/select.shadow.css"*/
39
- var style = ( /*__reshadow_css_start__*/_index.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__*/, {
40
- "__SOptionCheckbox": "___SOptionCheckbox_lr4th_gg_",
41
- "_selected": "__selected_lr4th_gg_",
42
- "_size_l": "_size_l_lr4th_gg_",
43
- "_indeterminate": "__indeterminate_lr4th_gg_",
44
- "_theme": "__theme_lr4th_gg_",
45
- "--theme": "--theme_lr4th",
46
- "_size_m": "_size_m_lr4th_gg_"
41
+ var style = ( /*__reshadow_css_start__*/_index.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__*/, {
42
+ "__SOptionCheckbox": "___SOptionCheckbox_jpeh3_gg_",
43
+ "_selected": "__selected_jpeh3_gg_",
44
+ "_size_l": "_size_l_jpeh3_gg_",
45
+ "_indeterminate": "__indeterminate_jpeh3_gg_",
46
+ "_theme": "__theme_jpeh3_gg_",
47
+ "--theme": "--theme_jpeh3",
48
+ "_size_m": "_size_m_jpeh3_gg_"
47
49
  });
48
50
  function isSelectedOption(value, valueOption) {
49
51
  return Array.isArray(value) ? value.includes(valueOption) : valueOption === value;
@@ -54,16 +56,8 @@ function isEmptyValue(value) {
54
56
  function getEmptyValue(multiselect) {
55
57
  return multiselect ? [] : null;
56
58
  }
57
- var scrollToNode = function scrollToNode(node) {
58
- if (!node) return;
59
- if (!node.scrollIntoView) return;
60
- node.scrollIntoView({
61
- block: 'nearest',
62
- inline: 'nearest'
63
- });
64
- };
65
- var RootSelect = /*#__PURE__*/function (_Component) {
66
- (0, _inherits2["default"])(RootSelect, _Component);
59
+ var RootSelect = /*#__PURE__*/function (_AbstractDropdown) {
60
+ (0, _inherits2["default"])(RootSelect, _AbstractDropdown);
67
61
  var _super = (0, _createSuper2["default"])(RootSelect);
68
62
  function RootSelect() {
69
63
  var _this;
@@ -72,30 +66,13 @@ var RootSelect = /*#__PURE__*/function (_Component) {
72
66
  args[_key] = arguments[_key];
73
67
  }
74
68
  _this = _super.call.apply(_super, [this].concat(args));
75
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "firstSelectedOptionRef", /*#__PURE__*/_react["default"].createRef());
76
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "triggerRef", /*#__PURE__*/_react["default"].createRef());
77
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "isScrolledToFirstOption", false);
78
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "lastHandleOptionNodeCall", -1);
79
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleOptionNode", function (node) {
80
- if (!_this.asProps.scrollToSelected) return;
81
- if (Date.now() - _this.lastHandleOptionNodeCall < 30) return;
82
- _this.lastHandleOptionNodeCall = Date.now();
83
- setTimeout(function () {
84
- // in most cases 10ms timeout works perfectly and scrolls before user can see it
85
- if (_this.asProps.visible) scrollToNode(node);
86
- }, 10);
87
- setTimeout(function () {
88
- // in rare cases 10ms timeout it not enough so 30ms timeout saves the day
89
- if (_this.asProps.visible) scrollToNode(node);
90
- }, 30);
91
- });
92
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "bindHandlerOptionClick", function (optionValue) {
69
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "role", 'listbox');
70
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "bindHandlerOptionClick", function (optionValue, index) {
93
71
  return function (e) {
94
72
  var newValue = optionValue;
95
73
  var _this$asProps = _this.asProps,
96
74
  value = _this$asProps.value,
97
- multiselect = _this$asProps.multiselect,
98
- interaction = _this$asProps.interaction;
75
+ multiselect = _this$asProps.multiselect;
99
76
  if (Array.isArray(value)) {
100
77
  if (value.includes(optionValue)) {
101
78
  newValue = value.filter(function (v) {
@@ -108,6 +85,7 @@ var RootSelect = /*#__PURE__*/function (_Component) {
108
85
  _this.handlers.value(newValue, e);
109
86
  if (!multiselect) {
110
87
  _this.handlers.visible(false);
88
+ e.preventDefault();
111
89
  }
112
90
  };
113
91
  });
@@ -120,18 +98,47 @@ var RootSelect = /*#__PURE__*/function (_Component) {
120
98
  return _this;
121
99
  }
122
100
  (0, _createClass2["default"])(RootSelect, [{
101
+ key: "itemRef",
102
+ value: function itemRef(props, index, node) {
103
+ (0, _get2["default"])((0, _getPrototypeOf2["default"])(RootSelect.prototype), "itemRef", this).call(this, props, index, node);
104
+ var highlightedIndex = this.asProps.highlightedIndex;
105
+ var isHighlighted = index === highlightedIndex;
106
+ if (isHighlighted) {
107
+ this.scrollToNode(node);
108
+ }
109
+ }
110
+ }, {
123
111
  key: "uncontrolledProps",
124
112
  value: function uncontrolledProps() {
125
- return {
126
- visible: null,
113
+ var _this2 = this;
114
+ return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _get2["default"])((0, _getPrototypeOf2["default"])(RootSelect.prototype), "uncontrolledProps", this).call(this)), {}, {
115
+ visible: [null, function (visible) {
116
+ if (visible === true) {
117
+ setTimeout(function () {
118
+ var _this2$menuRef$curren, _this2$menuRef$curren2;
119
+ var options = (_this2$menuRef$curren = _this2.menuRef.current) === null || _this2$menuRef$curren === void 0 ? void 0 : _this2$menuRef$curren.querySelectorAll('[role="option"]');
120
+ var selected = (_this2$menuRef$curren2 = _this2.menuRef.current) === null || _this2$menuRef$curren2 === void 0 ? void 0 : _this2$menuRef$curren2.querySelector('[aria-selected="true"]');
121
+ if (selected && options) {
122
+ _this2.scrollToNode(selected);
123
+ for (var i = 0; i < options.length; i++) {
124
+ if (options[i] === selected) {
125
+ _this2.handlers.highlightedIndex(i);
126
+ break;
127
+ }
128
+ }
129
+ }
130
+ // for some reason, Google Chrome optimizes this timeout with 0 value with previous render (when we set aria-selected)
131
+ // and that's why its skip scrollToNodes. We selected the appropriate timeout manually.
132
+ }, 30);
133
+ }
134
+ }],
127
135
  value: null
128
- };
136
+ });
129
137
  }
130
138
  }, {
131
139
  key: "getTriggerProps",
132
140
  value: function getTriggerProps() {
133
141
  var _this$asProps2 = this.asProps,
134
- size = _this$asProps2.size,
135
142
  disabled = _this$asProps2.disabled,
136
143
  visible = _this$asProps2.visible,
137
144
  state = _this$asProps2.state,
@@ -141,18 +148,20 @@ var RootSelect = /*#__PURE__*/function (_Component) {
141
148
  forwardRef = _this$asProps2.forwardRef,
142
149
  name = _this$asProps2.name,
143
150
  multiselect = _this$asProps2.multiselect,
151
+ getI18nText = _this$asProps2.getI18nText,
152
+ highlightedIndex = _this$asProps2.highlightedIndex,
144
153
  uid = _this$asProps2.uid,
145
- disablePortal = _this$asProps2.disablePortal,
146
- getI18nText = _this$asProps2.getI18nText;
147
- return {
148
- id: "igc-".concat(uid, "-trigger"),
149
- 'aria-controls': visible ? "igc-".concat(uid, "-list") : undefined,
150
- focusHint: visible && !disablePortal ? getI18nText('triggerHint') : undefined,
151
- 'aria-haspopup': 'listbox',
152
- 'aria-expanded': visible ? 'true' : 'false',
154
+ Children = _this$asProps2.Children,
155
+ hasChildren = _this$asProps2.children;
156
+ var isMenu = (0, _findComponent.isAdvanceMode)(Children, [Select.Menu.displayName], true) || !hasChildren;
157
+ var ariaControls = isMenu ? "igc-".concat(uid, "-list") : "igc-".concat(uid, "-popper");
158
+ return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _get2["default"])((0, _getPrototypeOf2["default"])(RootSelect.prototype), "getTriggerProps", this).call(this)), {}, {
159
+ onKeyDown: (0, _assignProps6.callAllEventHandlers)(this.handlePreventCommonKeyDown.bind(this), this.handleOpenKeyDown.bind(this), this.handleArrowKeyDown.bind(this)),
160
+ 'aria-controls': visible ? ariaControls : undefined,
161
+ 'aria-haspopup': isMenu ? 'listbox' : 'dialog',
153
162
  'aria-disabled': disabled ? 'true' : 'false',
163
+ 'aria-activedescendant': visible && highlightedIndex !== null ? "igc-".concat(uid, "-option-").concat(highlightedIndex) : undefined,
154
164
  empty: isEmptyValue(value),
155
- size: size,
156
165
  value: value,
157
166
  name: name,
158
167
  $hiddenRef: forwardRef,
@@ -163,60 +172,56 @@ var RootSelect = /*#__PURE__*/function (_Component) {
163
172
  active: visible,
164
173
  onClear: this.handlerClear,
165
174
  children: this.renderChildrenTrigger(value, options),
166
- getI18nText: getI18nText,
167
- ref: this.triggerRef
168
- };
175
+ getI18nText: getI18nText
176
+ });
169
177
  }
170
178
  }, {
171
179
  key: "getListProps",
172
180
  value: function getListProps() {
173
- var _this$asProps3 = this.asProps,
174
- multiselect = _this$asProps3.multiselect,
175
- uid = _this$asProps3.uid;
176
- return {
177
- 'aria-multiselectable': multiselect ? 'true' : undefined,
178
- id: "igc-".concat(uid, "-list"),
179
- role: 'listbox',
180
- 'aria-label': 'List of options'
181
- };
181
+ var multiselect = this.asProps.multiselect;
182
+ return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _get2["default"])((0, _getPrototypeOf2["default"])(RootSelect.prototype), "getListProps", this).call(this)), {}, {
183
+ 'aria-multiselectable': multiselect ? 'true' : undefined
184
+ });
182
185
  }
183
186
  }, {
184
- key: "getMenuProps",
185
- value: function getMenuProps() {
186
- var _this$asProps4 = this.asProps,
187
- uid = _this$asProps4.uid,
188
- getI18nText = _this$asProps4.getI18nText,
189
- multiselect = _this$asProps4.multiselect;
190
- return {
191
- 'aria-multiselectable': multiselect ? 'true' : undefined,
192
- id: "igc-".concat(uid, "-list"),
193
- role: 'listbox',
194
- 'aria-label': getI18nText('optionsList')
195
- };
187
+ key: "getPopperProps",
188
+ value: function getPopperProps() {
189
+ return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _get2["default"])((0, _getPrototypeOf2["default"])(RootSelect.prototype), "getPopperProps", this).call(this)), {}, {
190
+ onKeyDown: (0, _assignProps6.callAllEventHandlers)(this.handlePreventCommonKeyDown.bind(this), this.handlePreventPopperKeyDown.bind(this), this.handleArrowKeyDown.bind(this))
191
+ });
196
192
  }
197
193
  }, {
198
194
  key: "getOptionProps",
199
- value: function getOptionProps(props) {
200
- var value = this.asProps.value;
201
- var selected = isSelectedOption(value, props.value);
202
- var other = {};
203
- if (selected) {
204
- other.ref = this.handleOptionNode;
205
- }
206
- return (0, _objectSpread2["default"])({
195
+ value: function getOptionProps(props, index) {
196
+ var _props$selected,
197
+ _this3 = this;
198
+ var _this$asProps3 = this.asProps,
199
+ value = _this$asProps3.value,
200
+ highlightedIndex = _this$asProps3.highlightedIndex,
201
+ focusSourceRef = _this$asProps3.focusSourceRef,
202
+ _this$asProps3$size = _this$asProps3.size,
203
+ size = _this$asProps3$size === void 0 ? 'm' : _this$asProps3$size;
204
+ var highlighted = index === highlightedIndex && focusSourceRef.current === 'keyboard';
205
+ var selected = (_props$selected = props.selected) !== null && _props$selected !== void 0 ? _props$selected : isSelectedOption(value, props.value);
206
+ return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _get2["default"])((0, _getPrototypeOf2["default"])(RootSelect.prototype), "getItemProps", this).call(this, props, index)), {}, {
207
+ highlighted: highlighted,
207
208
  selected: selected,
208
209
  'aria-selected': selected ? 'true' : 'false',
209
210
  'aria-disabled': props.disabled ? 'true' : 'false',
210
211
  role: 'option',
211
- onClick: this.bindHandlerOptionClick(props.value)
212
- }, other);
212
+ onClick: this.bindHandlerOptionClick(props.value, index),
213
+ ref: function ref(node) {
214
+ return _this3.itemRef(props, index, node);
215
+ },
216
+ size: size
217
+ });
213
218
  }
214
219
  }, {
215
220
  key: "getOptionCheckboxProps",
216
221
  value: function getOptionCheckboxProps() {
217
- var _this$asProps5 = this.asProps,
218
- size = _this$asProps5.size,
219
- resolveColor = _this$asProps5.resolveColor;
222
+ var _this$asProps4 = this.asProps,
223
+ size = _this$asProps4.size,
224
+ resolveColor = _this$asProps4.resolveColor;
220
225
  return {
221
226
  size: size,
222
227
  resolveColor: resolveColor
@@ -230,6 +235,17 @@ var RootSelect = /*#__PURE__*/function (_Component) {
230
235
  'aria-disabled': 'true'
231
236
  };
232
237
  }
238
+ }, {
239
+ key: "handleOpenKeyDown",
240
+ value: function handleOpenKeyDown(e) {
241
+ (0, _get2["default"])((0, _getPrototypeOf2["default"])(RootSelect.prototype), "handleOpenKeyDown", this).call(this, e);
242
+ if (this.asProps.visible !== true && ['ArrowDown', 'ArrowUp', 'Enter', ' '].includes(e.key)) {
243
+ var hasInputSearch = (0, _findComponent.isAdvanceMode)(this.asProps.Children, [Select.InputSearch.displayName], true);
244
+ var defaultIndex = hasInputSearch ? null : 0;
245
+ this.handlers.highlightedIndex(defaultIndex);
246
+ return false;
247
+ }
248
+ }
233
249
  }, {
234
250
  key: "renderChildrenTrigger",
235
251
  value: function renderChildrenTrigger(value, options) {
@@ -254,42 +270,51 @@ var RootSelect = /*#__PURE__*/function (_Component) {
254
270
  key: "render",
255
271
  value: function render() {
256
272
  var _ref2 = this.asProps;
257
- var _this$asProps6 = this.asProps,
258
- Children = _this$asProps6.Children,
259
- options = _this$asProps6.options,
260
- multiselect = _this$asProps6.multiselect,
261
- value = _this$asProps6.value,
262
- uid = _this$asProps6.uid,
263
- forcedAdvancedMode = _this$asProps6.forcedAdvancedMode,
264
- other = (0, _objectWithoutProperties2["default"])(_this$asProps6, _excluded);
273
+ var _this$asProps5 = this.asProps,
274
+ Children = _this$asProps5.Children,
275
+ options = _this$asProps5.options,
276
+ multiselect = _this$asProps5.multiselect,
277
+ value = _this$asProps5.value,
278
+ uid = _this$asProps5.uid,
279
+ forcedAdvancedMode = _this$asProps5.forcedAdvancedMode,
280
+ other = (0, _objectWithoutProperties2["default"])(_this$asProps5, _excluded);
265
281
  var advancedMode = forcedAdvancedMode || (0, _findComponent["default"])(Children, [Select.Trigger.displayName, Select.Popper.displayName]);
266
282
  _logger["default"].warn(options && advancedMode, "Don't use at the same time 'options' property and '<Select.Trigger/>/<Select.Popper/>'", other['data-ui-name'] || Select.displayName);
283
+ this.itemProps = [];
267
284
  if (options) {
268
285
  var _ref = this.asProps;
269
- return /*#__PURE__*/_react["default"].createElement(_dropdownMenu.DropdownMenuOld, (0, _core.assignProps)({}, _ref), /*#__PURE__*/_react["default"].createElement(Select.Trigger, other), /*#__PURE__*/_react["default"].createElement(Select.Menu, null, options.map(function (option, index) {
286
+ return /*#__PURE__*/_react["default"].createElement(_dropdownMenu["default"], (0, _core.assignProps)({}, _ref), /*#__PURE__*/_react["default"].createElement(Select.Trigger, other), /*#__PURE__*/_react["default"].createElement(Select.Menu, null, options.map(function (option, index) {
270
287
  return /*#__PURE__*/_react["default"].createElement(Select.Option, (0, _extends2["default"])({
271
288
  key: option.value,
272
289
  id: "igc-".concat(uid, "-option-").concat(index)
273
290
  }, option), multiselect && /*#__PURE__*/_react["default"].createElement(Select.Option.Checkbox, null), option.children);
274
291
  })));
275
292
  }
276
- return /*#__PURE__*/_react["default"].createElement(_dropdownMenu.DropdownMenuOld, (0, _core.assignProps)({}, _ref2), /*#__PURE__*/_react["default"].createElement(Children, null));
293
+ return /*#__PURE__*/_react["default"].createElement(_dropdownMenu["default"], (0, _core.assignProps)({}, _ref2), /*#__PURE__*/_react["default"].createElement(Children, null));
277
294
  }
278
295
  }]);
279
296
  return RootSelect;
280
- }(_core.Component);
297
+ }(_dropdown.AbstractDropdown);
281
298
  (0, _defineProperty2["default"])(RootSelect, "displayName", 'Select');
282
299
  (0, _defineProperty2["default"])(RootSelect, "style", style);
283
- (0, _defineProperty2["default"])(RootSelect, "enhance", [(0, _uniqueID["default"])(), (0, _i18nEnhance["default"])(_intergalacticDynamicLocales.localizedMessages), (0, _resolveColorEnhance["default"])()]);
300
+ (0, _defineProperty2["default"])(RootSelect, "enhance", Object.values(_dropdown.enhance).concat([(0, _resolveColorEnhance["default"])()]));
284
301
  (0, _defineProperty2["default"])(RootSelect, "defaultProps", function (props) {
302
+ var _props$highlightedInd, _props$selectedIndex, _props$interaction, _props$timeout;
303
+ var hasInputSearch = props.children && (0, _findComponent.isAdvanceMode)(props.children, [Select.InputSearch.displayName], true);
304
+ var defaultIndex = hasInputSearch ? null : 0;
285
305
  return {
286
306
  placeholder: props.multiselect ? 'Select options' : 'Select option',
287
307
  size: 'm',
288
308
  defaultValue: getEmptyValue(props.multiselect),
289
309
  defaultVisible: false,
310
+ defaultHighlightedIndex: (_props$highlightedInd = props.highlightedIndex) !== null && _props$highlightedInd !== void 0 ? _props$highlightedInd : defaultIndex,
311
+ defaultSelectedIndex: (_props$selectedIndex = props.selectedIndex) !== null && _props$selectedIndex !== void 0 ? _props$selectedIndex : defaultIndex,
290
312
  scrollToSelected: true,
291
313
  i18n: _intergalacticDynamicLocales.localizedMessages,
292
- locale: 'en'
314
+ locale: 'en',
315
+ interaction: (_props$interaction = props.interaction) !== null && _props$interaction !== void 0 ? _props$interaction : 'click',
316
+ inlineActions: false,
317
+ timeout: (_props$timeout = props.timeout) !== null && _props$timeout !== void 0 ? _props$timeout : 0
293
318
  };
294
319
  });
295
320
  function Trigger(_ref8) {
@@ -304,12 +329,13 @@ function Trigger(_ref8) {
304
329
  Tag = _ref8$tag === void 0 ? _baseTrigger.ButtonTrigger : _ref8$tag,
305
330
  getI18nText = _ref8.getI18nText;
306
331
  var hasInputTrigger = (0, _popper.isInputTriggerTag)(Tag);
307
- var SSelectTrigger = _dropdownMenu.DropdownMenuOld.Trigger;
332
+ var SSelectTrigger = _dropdown["default"].Trigger;
308
333
  return _ref6 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SSelectTrigger, _ref6.cn("SSelectTrigger", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
309
334
  "tag": Tag,
310
335
  "placeholder": getI18nText('selectPlaceholder'),
336
+ "role": 'combobox',
311
337
  "aria-autocomplete": hasInputTrigger && 'list' || undefined
312
- }, _ref3))), (0, _addonTextChildren["default"])(Children, Tag.Text || _baseTrigger.ButtonTrigger.Text, Tag.Addon || _baseTrigger.ButtonTrigger.Addon, true), name && /*#__PURE__*/_react["default"].createElement("input", _ref6.cn("input", {
338
+ }, _ref3))), (0, _addonTextChildren["default"])(Children, Tag.Text || _baseTrigger.ButtonTrigger.Text, Tag.Value || _baseTrigger.ButtonTrigger.Text, Tag.Addon || _baseTrigger.ButtonTrigger.Addon, true), name && /*#__PURE__*/_react["default"].createElement("input", _ref6.cn("input", {
313
339
  "type": 'hidden',
314
340
  "defaultValue": value,
315
341
  "name": name,
@@ -320,14 +346,14 @@ var optionPropsContext = /*#__PURE__*/_react["default"].createContext({});
320
346
  function Option(props) {
321
347
  var _ref4 = arguments[0],
322
348
  _ref7;
323
- var SSelectOption = _dropdownMenu.DropdownMenuOld.Item;
349
+ var SSelectOption = _dropdown["default"].Item;
324
350
  var styles = props.styles,
325
351
  Children = props.Children;
326
- return _ref7 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SSelectOption, _ref7.cn("SSelectOption", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
327
- "tag": _flexBox.Flex
328
- }, _ref4))), /*#__PURE__*/_react["default"].createElement(optionPropsContext.Provider, {
352
+ var hasCheckbox = (0, _findComponent.isAdvanceMode)(Children, [Select.Option.Checkbox.displayName]);
353
+ var hasContent = (0, _findComponent.isAdvanceMode)(Children, [Select.Option.Content.displayName]);
354
+ return _ref7 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SSelectOption, _ref7.cn("SSelectOption", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref4))), /*#__PURE__*/_react["default"].createElement(optionPropsContext.Provider, {
329
355
  value: props
330
- }, /*#__PURE__*/_react["default"].createElement(Children, _ref7.cn("Children", {}))));
356
+ }, hasCheckbox && !hasContent ? /*#__PURE__*/_react["default"].createElement(Select.Option.Content, null, /*#__PURE__*/_react["default"].createElement(Children, _ref7.cn("Children", {}))) : /*#__PURE__*/_react["default"].createElement(Children, _ref7.cn("Children", {}))));
331
357
  }
332
358
  function Checkbox(providedProps) {
333
359
  var optionProps = _react["default"].useContext(optionPropsContext);
@@ -371,26 +397,30 @@ var Select = (0, _core["default"])(RootSelect, {
371
397
  Addon: _baseTrigger.ButtonTrigger.Addon,
372
398
  Text: _baseTrigger.ButtonTrigger.Text
373
399
  }],
374
- Popper: _dropdownMenu.DropdownMenuOld.Popper,
375
- List: _dropdownMenu.DropdownMenuOld.List,
376
- Menu: _dropdownMenu.DropdownMenuOld.Menu,
400
+ Popper: _dropdown["default"].Popper,
401
+ List: _dropdownMenu["default"].List,
402
+ Menu: _dropdownMenu["default"].Menu,
377
403
  Option: [Option, {
378
- Addon: _dropdownMenu.DropdownMenuOld.Item.Addon,
404
+ Addon: _dropdownMenu["default"].Item.Addon,
405
+ Content: _dropdownMenu["default"].Item.Content,
406
+ Hint: _dropdownMenu["default"].Item.Hint,
379
407
  Checkbox: Checkbox
380
408
  }],
381
- OptionTitle: _dropdownMenu.DropdownMenuOld.ItemTitle,
382
- OptionHint: _dropdownMenu.DropdownMenuOld.ItemHint,
409
+ Group: _dropdown["default"].Group,
410
+ OptionTitle: _dropdownMenu["default"].ItemTitle,
411
+ OptionHint: _dropdownMenu["default"].ItemHint,
383
412
  Divider: _divider["default"],
384
413
  InputSearch: [InputSearchWrapper, _InputSearch["default"]._______childrenComponents],
385
414
  Input: [InputSearchWrapper, _InputSearch["default"]._______childrenComponents]
386
415
  }, {
387
- parent: _dropdownMenu.DropdownMenuOld,
416
+ parent: _dropdownMenu["default"],
388
417
  context: _context.selectContext
389
418
  });
390
419
  var wrapSelect = function wrapSelect(wrapper) {
391
420
  return wrapper;
392
421
  };
393
422
  exports.wrapSelect = wrapSelect;
423
+ Select.selectedIndexContext = _dropdown.selectedIndexContext;
394
424
  var _default = Select;
395
425
  exports["default"] = _default;
396
426
  //# sourceMappingURL=Select.js.map