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":"focusSourceEnhance.js","names":["_react","_interopRequireDefault","require","_assignProps","lastFocusSource","focusSourceListeners","useFocusSource","handleMouseDown","React","useCallback","forEach","listener","setFocusSource","handleKeyDown","focusSourceRef","useRef","source","current","subscribeListeners","document","addEventListener","capture","unsubscribeListeners","removeEventListener","useEffect","needToAddListeners","length","sourceListener","push","needToRemoveListeners","sourceListenerIndex","indexOf","splice","exports","focusSourceEnhance","props","assignProps","_default"],"sources":["../../src/enhances/focusSourceEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport assignProps from '../assignProps';\n\nlet lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\nconst focusSourceListeners: {\n setFocusSource: (source: 'mouse' | 'keyboard' | 'none') => void;\n subscribeListeners: () => void;\n}[] = [];\nexport const useFocusSource = () => {\n const handleMouseDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('mouse')),\n [],\n );\n const handleKeyDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('keyboard')),\n [],\n );\n const focusSourceRef = React.useRef<'none' | 'mouse' | 'keyboard'>(lastFocusSource);\n const setFocusSource = React.useCallback((source: 'none' | 'mouse' | 'keyboard') => {\n focusSourceRef.current = source;\n lastFocusSource = source;\n }, []);\n const subscribeListeners = React.useCallback(() => {\n document.addEventListener('mousedown', handleMouseDown, { capture: true });\n document.addEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n const unsubscribeListeners = React.useCallback(() => {\n document.removeEventListener('mousedown', handleMouseDown, { capture: true });\n document.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n\n React.useEffect(() => {\n const needToAddListeners = focusSourceListeners.length === 0;\n const sourceListener = { setFocusSource, subscribeListeners };\n focusSourceListeners.push(sourceListener);\n if (needToAddListeners) subscribeListeners();\n const needToRemoveListeners = needToAddListeners;\n\n return () => {\n const sourceListenerIndex = focusSourceListeners.indexOf(sourceListener);\n focusSourceListeners.splice(sourceListenerIndex, 1);\n if (needToRemoveListeners) unsubscribeListeners();\n if (needToRemoveListeners && focusSourceListeners.length > 0) {\n focusSourceListeners[0].subscribeListeners();\n }\n };\n }, []);\n\n return focusSourceRef;\n};\n\nexport type FocusSourceEnhanceHook = (props: {\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n autoFocus?: boolean;\n}) => {\n tabIndex: number;\n keyboardFocused: boolean;\n onFocus: (e: React.FocusEvent) => void;\n onBlur: () => void;\n};\n\nconst focusSourceEnhance = (): FocusSourceEnhanceHook => {\n return (props) => {\n const focusSourceRef = useFocusSource();\n\n return assignProps(props, {\n focusSourceRef,\n });\n };\n};\n\nexport default focusSourceEnhance;\n"],"mappings":"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"}
1
+ {"version":3,"file":"focusSourceEnhance.js","names":["_react","_interopRequireDefault","require","_assignProps","lastFocusSource","focusSourceListeners","useFocusSource","handleMouseDown","React","useCallback","forEach","listener","setFocusSource","handleKeyDown","focusSourceRef","useRef","source","current","subscribeListeners","document","addEventListener","capture","unsubscribeListeners","removeEventListener","useEffect","needToAddListeners","length","sourceListener","push","needToRemoveListeners","sourceListenerIndex","indexOf","splice","exports","focusSourceEnhance","props","assignProps","_default"],"sources":["../../src/enhances/focusSourceEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport assignProps from '../assignProps';\n\nlet lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\nconst focusSourceListeners: {\n setFocusSource: (source: 'mouse' | 'keyboard' | 'none') => void;\n subscribeListeners: () => void;\n}[] = [];\nexport const useFocusSource = () => {\n const handleMouseDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('mouse')),\n [],\n );\n const handleKeyDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('keyboard')),\n [],\n );\n const focusSourceRef = React.useRef<'none' | 'mouse' | 'keyboard'>(lastFocusSource);\n const setFocusSource = React.useCallback((source: 'none' | 'mouse' | 'keyboard') => {\n focusSourceRef.current = source;\n lastFocusSource = source;\n }, []);\n const subscribeListeners = React.useCallback(() => {\n document.addEventListener('mousedown', handleMouseDown, { capture: true });\n document.addEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n const unsubscribeListeners = React.useCallback(() => {\n document.removeEventListener('mousedown', handleMouseDown, { capture: true });\n document.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n\n React.useEffect(() => {\n const needToAddListeners = focusSourceListeners.length === 0;\n const sourceListener = { setFocusSource, subscribeListeners };\n focusSourceListeners.push(sourceListener);\n if (needToAddListeners) subscribeListeners();\n const needToRemoveListeners = needToAddListeners;\n\n return () => {\n const sourceListenerIndex = focusSourceListeners.indexOf(sourceListener);\n focusSourceListeners.splice(sourceListenerIndex, 1);\n if (needToRemoveListeners) unsubscribeListeners();\n if (needToRemoveListeners && focusSourceListeners.length > 0) {\n focusSourceListeners[0].subscribeListeners();\n }\n };\n }, []);\n\n return focusSourceRef;\n};\n\nexport type FocusSourceEnhanceHook = (props: {\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n autoFocus?: boolean;\n}) => {\n tabIndex: number;\n keyboardFocused: boolean;\n onFocus: (e: React.FocusEvent) => void;\n onBlur: () => void;\n focusSourceRef: React.MutableRefObject<typeof lastFocusSource>;\n};\n\nconst focusSourceEnhance = (): FocusSourceEnhanceHook => {\n return (props) => {\n const focusSourceRef = useFocusSource();\n\n return assignProps(props, {\n focusSourceRef,\n });\n };\n};\n\nexport default focusSourceEnhance;\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"focusSourceEnhance.mjs","names":["React","assignProps","lastFocusSource","focusSourceListeners","useFocusSource","handleMouseDown","useCallback","forEach","listener","setFocusSource","handleKeyDown","focusSourceRef","useRef","source","current","subscribeListeners","document","addEventListener","capture","unsubscribeListeners","removeEventListener","useEffect","needToAddListeners","length","sourceListener","push","needToRemoveListeners","sourceListenerIndex","indexOf","splice","focusSourceEnhance","props"],"sources":["../../src/enhances/focusSourceEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport assignProps from '../assignProps';\n\nlet lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\nconst focusSourceListeners: {\n setFocusSource: (source: 'mouse' | 'keyboard' | 'none') => void;\n subscribeListeners: () => void;\n}[] = [];\nexport const useFocusSource = () => {\n const handleMouseDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('mouse')),\n [],\n );\n const handleKeyDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('keyboard')),\n [],\n );\n const focusSourceRef = React.useRef<'none' | 'mouse' | 'keyboard'>(lastFocusSource);\n const setFocusSource = React.useCallback((source: 'none' | 'mouse' | 'keyboard') => {\n focusSourceRef.current = source;\n lastFocusSource = source;\n }, []);\n const subscribeListeners = React.useCallback(() => {\n document.addEventListener('mousedown', handleMouseDown, { capture: true });\n document.addEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n const unsubscribeListeners = React.useCallback(() => {\n document.removeEventListener('mousedown', handleMouseDown, { capture: true });\n document.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n\n React.useEffect(() => {\n const needToAddListeners = focusSourceListeners.length === 0;\n const sourceListener = { setFocusSource, subscribeListeners };\n focusSourceListeners.push(sourceListener);\n if (needToAddListeners) subscribeListeners();\n const needToRemoveListeners = needToAddListeners;\n\n return () => {\n const sourceListenerIndex = focusSourceListeners.indexOf(sourceListener);\n focusSourceListeners.splice(sourceListenerIndex, 1);\n if (needToRemoveListeners) unsubscribeListeners();\n if (needToRemoveListeners && focusSourceListeners.length > 0) {\n focusSourceListeners[0].subscribeListeners();\n }\n };\n }, []);\n\n return focusSourceRef;\n};\n\nexport type FocusSourceEnhanceHook = (props: {\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n autoFocus?: boolean;\n}) => {\n tabIndex: number;\n keyboardFocused: boolean;\n onFocus: (e: React.FocusEvent) => void;\n onBlur: () => void;\n};\n\nconst focusSourceEnhance = (): FocusSourceEnhanceHook => {\n return (props) => {\n const focusSourceRef = useFocusSource();\n\n return assignProps(props, {\n focusSourceRef,\n });\n };\n};\n\nexport default focusSourceEnhance;\n"],"mappings":"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"}
1
+ {"version":3,"file":"focusSourceEnhance.mjs","names":["React","assignProps","lastFocusSource","focusSourceListeners","useFocusSource","handleMouseDown","useCallback","forEach","listener","setFocusSource","handleKeyDown","focusSourceRef","useRef","source","current","subscribeListeners","document","addEventListener","capture","unsubscribeListeners","removeEventListener","useEffect","needToAddListeners","length","sourceListener","push","needToRemoveListeners","sourceListenerIndex","indexOf","splice","focusSourceEnhance","props"],"sources":["../../src/enhances/focusSourceEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport assignProps from '../assignProps';\n\nlet lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\nconst focusSourceListeners: {\n setFocusSource: (source: 'mouse' | 'keyboard' | 'none') => void;\n subscribeListeners: () => void;\n}[] = [];\nexport const useFocusSource = () => {\n const handleMouseDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('mouse')),\n [],\n );\n const handleKeyDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('keyboard')),\n [],\n );\n const focusSourceRef = React.useRef<'none' | 'mouse' | 'keyboard'>(lastFocusSource);\n const setFocusSource = React.useCallback((source: 'none' | 'mouse' | 'keyboard') => {\n focusSourceRef.current = source;\n lastFocusSource = source;\n }, []);\n const subscribeListeners = React.useCallback(() => {\n document.addEventListener('mousedown', handleMouseDown, { capture: true });\n document.addEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n const unsubscribeListeners = React.useCallback(() => {\n document.removeEventListener('mousedown', handleMouseDown, { capture: true });\n document.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n\n React.useEffect(() => {\n const needToAddListeners = focusSourceListeners.length === 0;\n const sourceListener = { setFocusSource, subscribeListeners };\n focusSourceListeners.push(sourceListener);\n if (needToAddListeners) subscribeListeners();\n const needToRemoveListeners = needToAddListeners;\n\n return () => {\n const sourceListenerIndex = focusSourceListeners.indexOf(sourceListener);\n focusSourceListeners.splice(sourceListenerIndex, 1);\n if (needToRemoveListeners) unsubscribeListeners();\n if (needToRemoveListeners && focusSourceListeners.length > 0) {\n focusSourceListeners[0].subscribeListeners();\n }\n };\n }, []);\n\n return focusSourceRef;\n};\n\nexport type FocusSourceEnhanceHook = (props: {\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n autoFocus?: boolean;\n}) => {\n tabIndex: number;\n keyboardFocused: boolean;\n onFocus: (e: React.FocusEvent) => void;\n onBlur: () => void;\n focusSourceRef: React.MutableRefObject<typeof lastFocusSource>;\n};\n\nconst focusSourceEnhance = (): FocusSourceEnhanceHook => {\n return (props) => {\n const focusSourceRef = useFocusSource();\n\n return assignProps(props, {\n focusSourceRef,\n });\n };\n};\n\nexport default focusSourceEnhance;\n"],"mappings":"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"}
@@ -0,0 +1 @@
1
+ export declare function getAccessibleName(element: HTMLElement | null): string;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getAccessibleName = getAccessibleName;
8
+ var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
9
+ function getAccessibleName(element) {
10
+ var _ref, _ref2, _ref3, _getByLabelledBy;
11
+ if (element === null) {
12
+ return '';
13
+ }
14
+ return (_ref = (_ref2 = (_ref3 = (_getByLabelledBy = getByLabelledBy(element)) !== null && _getByLabelledBy !== void 0 ? _getByLabelledBy : getByAriaLabel(element)) !== null && _ref3 !== void 0 ? _ref3 : getByLabel(element)) !== null && _ref2 !== void 0 ? _ref2 : getByTitle(element)) !== null && _ref !== void 0 ? _ref : '';
15
+ }
16
+ function getByLabelledBy(element) {
17
+ var ariaLabelledBy = element.getAttribute('aria-labelledby');
18
+ if (!ariaLabelledBy) {
19
+ return null;
20
+ }
21
+ var idList = ariaLabelledBy.split(/\s/);
22
+ var result = [];
23
+ var _iterator = (0, _createForOfIteratorHelper2["default"])(idList),
24
+ _step;
25
+ try {
26
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
27
+ var id = _step.value;
28
+ var label = document.getElementById(id);
29
+ if (label) {
30
+ result.push((label.textContent || '').trim());
31
+ }
32
+ }
33
+ } catch (err) {
34
+ _iterator.e(err);
35
+ } finally {
36
+ _iterator.f();
37
+ }
38
+ return result.join(' ');
39
+ }
40
+ function getByAriaLabel(element) {
41
+ return element.getAttribute('aria-label');
42
+ }
43
+ function getByLabel(element) {
44
+ var labels = (element instanceof HTMLButtonElement || element instanceof HTMLInputElement) && element.labels;
45
+ if (!labels || !labels.length) {
46
+ return null;
47
+ }
48
+ var result = Array.prototype.map.call(labels, function (label) {
49
+ return (label.textContent || '').trim();
50
+ });
51
+ return result.join(' ');
52
+ }
53
+ function getByTitle(element) {
54
+ return element.title;
55
+ }
56
+ //# sourceMappingURL=getAccessibleName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAccessibleName.js","names":["getAccessibleName","element","_ref","_ref2","_ref3","_getByLabelledBy","getByLabelledBy","getByAriaLabel","getByLabel","getByTitle","ariaLabelledBy","getAttribute","idList","split","result","_iterator","_createForOfIteratorHelper2","_step","s","n","done","id","value","label","document","getElementById","push","textContent","trim","err","e","f","join","labels","HTMLButtonElement","HTMLInputElement","length","Array","prototype","map","call","title"],"sources":["../src/getAccessibleName.ts"],"sourcesContent":["export function getAccessibleName(element: HTMLElement | null): string {\n if (element === null) {\n return '';\n }\n\n return (\n getByLabelledBy(element) ??\n getByAriaLabel(element) ??\n getByLabel(element) ??\n getByTitle(element) ??\n ''\n );\n}\n\nfunction getByLabelledBy(element: HTMLElement): string | null {\n const ariaLabelledBy = element.getAttribute('aria-labelledby');\n\n if (!ariaLabelledBy) {\n return null;\n }\n\n const idList = ariaLabelledBy.split(/\\s/);\n const result: string[] = [];\n\n for (const id of idList) {\n const label = document.getElementById(id);\n\n if (label) {\n result.push((label.textContent || '').trim());\n }\n }\n\n return result.join(' ');\n}\nfunction getByAriaLabel(element: HTMLElement): string | null {\n return element.getAttribute('aria-label');\n}\nfunction getByLabel(element: HTMLElement): string | null {\n const labels =\n (element instanceof HTMLButtonElement || element instanceof HTMLInputElement) && element.labels;\n\n if (!labels || !labels.length) {\n return null;\n }\n\n const result = Array.prototype.map.call(labels, (label: HTMLLabelElement) => {\n return (label.textContent || '').trim();\n });\n\n return result.join(' ');\n}\n\nfunction getByTitle(element: HTMLElement): string | null {\n return element.title;\n}\n"],"mappings":";;;;;;;;AAAO,SAASA,iBAAiBA,CAACC,OAA2B,EAAU;EAAA,IAAAC,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,gBAAA;EACrE,IAAIJ,OAAO,KAAK,IAAI,EAAE;IACpB,OAAO,EAAE;EACX;EAEA,QAAAC,IAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,gBAAA,GACEC,eAAe,CAACL,OAAO,CAAC,cAAAI,gBAAA,cAAAA,gBAAA,GACxBE,cAAc,CAACN,OAAO,CAAC,cAAAG,KAAA,cAAAA,KAAA,GACvBI,UAAU,CAACP,OAAO,CAAC,cAAAE,KAAA,cAAAA,KAAA,GACnBM,UAAU,CAACR,OAAO,CAAC,cAAAC,IAAA,cAAAA,IAAA,GACnB,EAAE;AAEN;AAEA,SAASI,eAAeA,CAACL,OAAoB,EAAiB;EAC5D,IAAMS,cAAc,GAAGT,OAAO,CAACU,YAAY,CAAC,iBAAiB,CAAC;EAE9D,IAAI,CAACD,cAAc,EAAE;IACnB,OAAO,IAAI;EACb;EAEA,IAAME,MAAM,GAAGF,cAAc,CAACG,KAAK,CAAC,IAAI,CAAC;EACzC,IAAMC,MAAgB,GAAG,EAAE;EAAC,IAAAC,SAAA,OAAAC,2BAAA,aAEXJ,MAAM;IAAAK,KAAA;EAAA;IAAvB,KAAAF,SAAA,CAAAG,CAAA,MAAAD,KAAA,GAAAF,SAAA,CAAAI,CAAA,IAAAC,IAAA,GAAyB;MAAA,IAAdC,EAAE,GAAAJ,KAAA,CAAAK,KAAA;MACX,IAAMC,KAAK,GAAGC,QAAQ,CAACC,cAAc,CAACJ,EAAE,CAAC;MAEzC,IAAIE,KAAK,EAAE;QACTT,MAAM,CAACY,IAAI,CAAC,CAACH,KAAK,CAACI,WAAW,IAAI,EAAE,EAAEC,IAAI,EAAE,CAAC;MAC/C;IACF;EAAC,SAAAC,GAAA;IAAAd,SAAA,CAAAe,CAAA,CAAAD,GAAA;EAAA;IAAAd,SAAA,CAAAgB,CAAA;EAAA;EAED,OAAOjB,MAAM,CAACkB,IAAI,CAAC,GAAG,CAAC;AACzB;AACA,SAASzB,cAAcA,CAACN,OAAoB,EAAiB;EAC3D,OAAOA,OAAO,CAACU,YAAY,CAAC,YAAY,CAAC;AAC3C;AACA,SAASH,UAAUA,CAACP,OAAoB,EAAiB;EACvD,IAAMgC,MAAM,GACV,CAAChC,OAAO,YAAYiC,iBAAiB,IAAIjC,OAAO,YAAYkC,gBAAgB,KAAKlC,OAAO,CAACgC,MAAM;EAEjG,IAAI,CAACA,MAAM,IAAI,CAACA,MAAM,CAACG,MAAM,EAAE;IAC7B,OAAO,IAAI;EACb;EAEA,IAAMtB,MAAM,GAAGuB,KAAK,CAACC,SAAS,CAACC,GAAG,CAACC,IAAI,CAACP,MAAM,EAAE,UAACV,KAAuB,EAAK;IAC3E,OAAO,CAACA,KAAK,CAACI,WAAW,IAAI,EAAE,EAAEC,IAAI,EAAE;EACzC,CAAC,CAAC;EAEF,OAAOd,MAAM,CAACkB,IAAI,CAAC,GAAG,CAAC;AACzB;AAEA,SAASvB,UAAUA,CAACR,OAAoB,EAAiB;EACvD,OAAOA,OAAO,CAACwC,KAAK;AACtB"}
@@ -0,0 +1,49 @@
1
+ import _createForOfIteratorHelper from "@babel/runtime/helpers/createForOfIteratorHelper";
2
+ export function getAccessibleName(element) {
3
+ var _ref, _ref2, _ref3, _getByLabelledBy;
4
+ if (element === null) {
5
+ return '';
6
+ }
7
+ return (_ref = (_ref2 = (_ref3 = (_getByLabelledBy = getByLabelledBy(element)) !== null && _getByLabelledBy !== void 0 ? _getByLabelledBy : getByAriaLabel(element)) !== null && _ref3 !== void 0 ? _ref3 : getByLabel(element)) !== null && _ref2 !== void 0 ? _ref2 : getByTitle(element)) !== null && _ref !== void 0 ? _ref : '';
8
+ }
9
+ function getByLabelledBy(element) {
10
+ var ariaLabelledBy = element.getAttribute('aria-labelledby');
11
+ if (!ariaLabelledBy) {
12
+ return null;
13
+ }
14
+ var idList = ariaLabelledBy.split(/\s/);
15
+ var result = [];
16
+ var _iterator = _createForOfIteratorHelper(idList),
17
+ _step;
18
+ try {
19
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
20
+ var id = _step.value;
21
+ var label = document.getElementById(id);
22
+ if (label) {
23
+ result.push((label.textContent || '').trim());
24
+ }
25
+ }
26
+ } catch (err) {
27
+ _iterator.e(err);
28
+ } finally {
29
+ _iterator.f();
30
+ }
31
+ return result.join(' ');
32
+ }
33
+ function getByAriaLabel(element) {
34
+ return element.getAttribute('aria-label');
35
+ }
36
+ function getByLabel(element) {
37
+ var labels = (element instanceof HTMLButtonElement || element instanceof HTMLInputElement) && element.labels;
38
+ if (!labels || !labels.length) {
39
+ return null;
40
+ }
41
+ var result = Array.prototype.map.call(labels, function (label) {
42
+ return (label.textContent || '').trim();
43
+ });
44
+ return result.join(' ');
45
+ }
46
+ function getByTitle(element) {
47
+ return element.title;
48
+ }
49
+ //# sourceMappingURL=getAccessibleName.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAccessibleName.mjs","names":["getAccessibleName","element","_ref","_ref2","_ref3","_getByLabelledBy","getByLabelledBy","getByAriaLabel","getByLabel","getByTitle","ariaLabelledBy","getAttribute","idList","split","result","_iterator","_createForOfIteratorHelper","_step","s","n","done","id","value","label","document","getElementById","push","textContent","trim","err","e","f","join","labels","HTMLButtonElement","HTMLInputElement","length","Array","prototype","map","call","title"],"sources":["../src/getAccessibleName.ts"],"sourcesContent":["export function getAccessibleName(element: HTMLElement | null): string {\n if (element === null) {\n return '';\n }\n\n return (\n getByLabelledBy(element) ??\n getByAriaLabel(element) ??\n getByLabel(element) ??\n getByTitle(element) ??\n ''\n );\n}\n\nfunction getByLabelledBy(element: HTMLElement): string | null {\n const ariaLabelledBy = element.getAttribute('aria-labelledby');\n\n if (!ariaLabelledBy) {\n return null;\n }\n\n const idList = ariaLabelledBy.split(/\\s/);\n const result: string[] = [];\n\n for (const id of idList) {\n const label = document.getElementById(id);\n\n if (label) {\n result.push((label.textContent || '').trim());\n }\n }\n\n return result.join(' ');\n}\nfunction getByAriaLabel(element: HTMLElement): string | null {\n return element.getAttribute('aria-label');\n}\nfunction getByLabel(element: HTMLElement): string | null {\n const labels =\n (element instanceof HTMLButtonElement || element instanceof HTMLInputElement) && element.labels;\n\n if (!labels || !labels.length) {\n return null;\n }\n\n const result = Array.prototype.map.call(labels, (label: HTMLLabelElement) => {\n return (label.textContent || '').trim();\n });\n\n return result.join(' ');\n}\n\nfunction getByTitle(element: HTMLElement): string | null {\n return element.title;\n}\n"],"mappings":";AAAA,OAAO,SAASA,iBAAiBA,CAACC,OAA2B,EAAU;EAAA,IAAAC,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,gBAAA;EACrE,IAAIJ,OAAO,KAAK,IAAI,EAAE;IACpB,OAAO,EAAE;EACX;EAEA,QAAAC,IAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,gBAAA,GACEC,eAAe,CAACL,OAAO,CAAC,cAAAI,gBAAA,cAAAA,gBAAA,GACxBE,cAAc,CAACN,OAAO,CAAC,cAAAG,KAAA,cAAAA,KAAA,GACvBI,UAAU,CAACP,OAAO,CAAC,cAAAE,KAAA,cAAAA,KAAA,GACnBM,UAAU,CAACR,OAAO,CAAC,cAAAC,IAAA,cAAAA,IAAA,GACnB,EAAE;AAEN;AAEA,SAASI,eAAeA,CAACL,OAAoB,EAAiB;EAC5D,IAAMS,cAAc,GAAGT,OAAO,CAACU,YAAY,CAAC,iBAAiB,CAAC;EAE9D,IAAI,CAACD,cAAc,EAAE;IACnB,OAAO,IAAI;EACb;EAEA,IAAME,MAAM,GAAGF,cAAc,CAACG,KAAK,CAAC,IAAI,CAAC;EACzC,IAAMC,MAAgB,GAAG,EAAE;EAAC,IAAAC,SAAA,GAAAC,0BAAA,CAEXJ,MAAM;IAAAK,KAAA;EAAA;IAAvB,KAAAF,SAAA,CAAAG,CAAA,MAAAD,KAAA,GAAAF,SAAA,CAAAI,CAAA,IAAAC,IAAA,GAAyB;MAAA,IAAdC,EAAE,GAAAJ,KAAA,CAAAK,KAAA;MACX,IAAMC,KAAK,GAAGC,QAAQ,CAACC,cAAc,CAACJ,EAAE,CAAC;MAEzC,IAAIE,KAAK,EAAE;QACTT,MAAM,CAACY,IAAI,CAAC,CAACH,KAAK,CAACI,WAAW,IAAI,EAAE,EAAEC,IAAI,EAAE,CAAC;MAC/C;IACF;EAAC,SAAAC,GAAA;IAAAd,SAAA,CAAAe,CAAA,CAAAD,GAAA;EAAA;IAAAd,SAAA,CAAAgB,CAAA;EAAA;EAED,OAAOjB,MAAM,CAACkB,IAAI,CAAC,GAAG,CAAC;AACzB;AACA,SAASzB,cAAcA,CAACN,OAAoB,EAAiB;EAC3D,OAAOA,OAAO,CAACU,YAAY,CAAC,YAAY,CAAC;AAC3C;AACA,SAASH,UAAUA,CAACP,OAAoB,EAAiB;EACvD,IAAMgC,MAAM,GACV,CAAChC,OAAO,YAAYiC,iBAAiB,IAAIjC,OAAO,YAAYkC,gBAAgB,KAAKlC,OAAO,CAACgC,MAAM;EAEjG,IAAI,CAACA,MAAM,IAAI,CAACA,MAAM,CAACG,MAAM,EAAE;IAC7B,OAAO,IAAI;EACb;EAEA,IAAMtB,MAAM,GAAGuB,KAAK,CAACC,SAAS,CAACC,GAAG,CAACC,IAAI,CAACP,MAAM,EAAE,UAACV,KAAuB,EAAK;IAC3E,OAAO,CAACA,KAAK,CAACI,WAAW,IAAI,EAAE,EAAEC,IAAI,EAAE;EACzC,CAAC,CAAC;EAEF,OAAOd,MAAM,CAACkB,IAAI,CAAC,GAAG,CAAC;AACzB;AAEA,SAASvB,UAAUA,CAACR,OAAoB,EAAiB;EACvD,OAAOA,OAAO,CAACwC,KAAK;AACtB"}
@@ -1,17 +1,51 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.getEventTarget = void 0;
8
+ var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
7
9
  var getEventTarget = function getEventTarget(event) {
8
10
  if ('composedPath' in event) {
9
- var _event$composedPath;
10
- return ((_event$composedPath = event.composedPath()) === null || _event$composedPath === void 0 ? void 0 : _event$composedPath[0]) || event.target;
11
+ var composedPath = event.composedPath();
12
+ if (composedPath) {
13
+ var _iterator = (0, _createForOfIteratorHelper2["default"])(composedPath),
14
+ _step;
15
+ try {
16
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
17
+ var element = _step.value;
18
+ if ('shadowRoot' in element && element.shadowRoot) {
19
+ return element;
20
+ }
21
+ }
22
+ } catch (err) {
23
+ _iterator.e(err);
24
+ } finally {
25
+ _iterator.f();
26
+ }
27
+ }
28
+ return (composedPath === null || composedPath === void 0 ? void 0 : composedPath[0]) || event.target;
11
29
  }
12
30
  if (event.nativeEvent && 'composedPath' in event.nativeEvent) {
13
- var _event$nativeEvent$co;
14
- return ((_event$nativeEvent$co = event.nativeEvent.composedPath()) === null || _event$nativeEvent$co === void 0 ? void 0 : _event$nativeEvent$co[0]) || event.target;
31
+ var _composedPath = event.nativeEvent.composedPath();
32
+ if (_composedPath) {
33
+ var _iterator2 = (0, _createForOfIteratorHelper2["default"])(_composedPath),
34
+ _step2;
35
+ try {
36
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
37
+ var _element = _step2.value;
38
+ if ('shadowRoot' in _element && _element.shadowRoot) {
39
+ return _element;
40
+ }
41
+ }
42
+ } catch (err) {
43
+ _iterator2.e(err);
44
+ } finally {
45
+ _iterator2.f();
46
+ }
47
+ }
48
+ return (_composedPath === null || _composedPath === void 0 ? void 0 : _composedPath[0]) || event.target;
15
49
  }
16
50
  return event.target;
17
51
  };
@@ -1 +1 @@
1
- {"version":3,"file":"getEventTarget.js","names":["getEventTarget","event","_event$composedPath","composedPath","target","nativeEvent","_event$nativeEvent$co","exports"],"sources":["../src/getEventTarget.ts"],"sourcesContent":["export const getEventTarget = (event: React.SyntheticEvent | Event): EventTarget | null => {\n if ('composedPath' in event) {\n return event.composedPath()?.[0] || event.target;\n }\n if (event.nativeEvent && 'composedPath' in event.nativeEvent) {\n return event.nativeEvent.composedPath()?.[0] || event.target;\n }\n return event.target;\n};\n"],"mappings":";;;;;;AAAO,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAmC,EAAyB;EACzF,IAAI,cAAc,IAAIA,KAAK,EAAE;IAAA,IAAAC,mBAAA;IAC3B,OAAO,EAAAA,mBAAA,GAAAD,KAAK,CAACE,YAAY,EAAE,cAAAD,mBAAA,uBAApBA,mBAAA,CAAuB,CAAC,CAAC,KAAID,KAAK,CAACG,MAAM;EAClD;EACA,IAAIH,KAAK,CAACI,WAAW,IAAI,cAAc,IAAIJ,KAAK,CAACI,WAAW,EAAE;IAAA,IAAAC,qBAAA;IAC5D,OAAO,EAAAA,qBAAA,GAAAL,KAAK,CAACI,WAAW,CAACF,YAAY,EAAE,cAAAG,qBAAA,uBAAhCA,qBAAA,CAAmC,CAAC,CAAC,KAAIL,KAAK,CAACG,MAAM;EAC9D;EACA,OAAOH,KAAK,CAACG,MAAM;AACrB,CAAC;AAACG,OAAA,CAAAP,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"file":"getEventTarget.js","names":["getEventTarget","event","composedPath","_iterator","_createForOfIteratorHelper2","_step","s","n","done","element","value","shadowRoot","err","e","f","target","nativeEvent","_iterator2","_step2","exports"],"sources":["../src/getEventTarget.ts"],"sourcesContent":["export const getEventTarget = (event: React.SyntheticEvent | Event): EventTarget | null => {\n if ('composedPath' in event) {\n const composedPath = event.composedPath();\n\n if (composedPath) {\n for (const element of composedPath) {\n if ('shadowRoot' in element && element.shadowRoot) {\n return element;\n }\n }\n }\n\n return composedPath?.[0] || event.target;\n }\n if (event.nativeEvent && 'composedPath' in event.nativeEvent) {\n const composedPath = event.nativeEvent.composedPath();\n\n if (composedPath) {\n for (const element of composedPath) {\n if ('shadowRoot' in element && element.shadowRoot) {\n return element;\n }\n }\n }\n return composedPath?.[0] || event.target;\n }\n return event.target;\n};\n"],"mappings":";;;;;;;;AAAO,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAmC,EAAyB;EACzF,IAAI,cAAc,IAAIA,KAAK,EAAE;IAC3B,IAAMC,YAAY,GAAGD,KAAK,CAACC,YAAY,EAAE;IAEzC,IAAIA,YAAY,EAAE;MAAA,IAAAC,SAAA,OAAAC,2BAAA,aACMF,YAAY;QAAAG,KAAA;MAAA;QAAlC,KAAAF,SAAA,CAAAG,CAAA,MAAAD,KAAA,GAAAF,SAAA,CAAAI,CAAA,IAAAC,IAAA,GAAoC;UAAA,IAAzBC,OAAO,GAAAJ,KAAA,CAAAK,KAAA;UAChB,IAAI,YAAY,IAAID,OAAO,IAAIA,OAAO,CAACE,UAAU,EAAE;YACjD,OAAOF,OAAO;UAChB;QACF;MAAC,SAAAG,GAAA;QAAAT,SAAA,CAAAU,CAAA,CAAAD,GAAA;MAAA;QAAAT,SAAA,CAAAW,CAAA;MAAA;IACH;IAEA,OAAO,CAAAZ,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAG,CAAC,CAAC,KAAID,KAAK,CAACc,MAAM;EAC1C;EACA,IAAId,KAAK,CAACe,WAAW,IAAI,cAAc,IAAIf,KAAK,CAACe,WAAW,EAAE;IAC5D,IAAMd,aAAY,GAAGD,KAAK,CAACe,WAAW,CAACd,YAAY,EAAE;IAErD,IAAIA,aAAY,EAAE;MAAA,IAAAe,UAAA,OAAAb,2BAAA,aACMF,aAAY;QAAAgB,MAAA;MAAA;QAAlC,KAAAD,UAAA,CAAAX,CAAA,MAAAY,MAAA,GAAAD,UAAA,CAAAV,CAAA,IAAAC,IAAA,GAAoC;UAAA,IAAzBC,QAAO,GAAAS,MAAA,CAAAR,KAAA;UAChB,IAAI,YAAY,IAAID,QAAO,IAAIA,QAAO,CAACE,UAAU,EAAE;YACjD,OAAOF,QAAO;UAChB;QACF;MAAC,SAAAG,GAAA;QAAAK,UAAA,CAAAJ,CAAA,CAAAD,GAAA;MAAA;QAAAK,UAAA,CAAAH,CAAA;MAAA;IACH;IACA,OAAO,CAAAZ,aAAY,aAAZA,aAAY,uBAAZA,aAAY,CAAG,CAAC,CAAC,KAAID,KAAK,CAACc,MAAM;EAC1C;EACA,OAAOd,KAAK,CAACc,MAAM;AACrB,CAAC;AAACI,OAAA,CAAAnB,cAAA,GAAAA,cAAA"}
@@ -1,11 +1,44 @@
1
+ import _createForOfIteratorHelper from "@babel/runtime/helpers/createForOfIteratorHelper";
1
2
  export var getEventTarget = function getEventTarget(event) {
2
3
  if ('composedPath' in event) {
3
- var _event$composedPath;
4
- return ((_event$composedPath = event.composedPath()) === null || _event$composedPath === void 0 ? void 0 : _event$composedPath[0]) || event.target;
4
+ var composedPath = event.composedPath();
5
+ if (composedPath) {
6
+ var _iterator = _createForOfIteratorHelper(composedPath),
7
+ _step;
8
+ try {
9
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
10
+ var element = _step.value;
11
+ if ('shadowRoot' in element && element.shadowRoot) {
12
+ return element;
13
+ }
14
+ }
15
+ } catch (err) {
16
+ _iterator.e(err);
17
+ } finally {
18
+ _iterator.f();
19
+ }
20
+ }
21
+ return (composedPath === null || composedPath === void 0 ? void 0 : composedPath[0]) || event.target;
5
22
  }
6
23
  if (event.nativeEvent && 'composedPath' in event.nativeEvent) {
7
- var _event$nativeEvent$co;
8
- return ((_event$nativeEvent$co = event.nativeEvent.composedPath()) === null || _event$nativeEvent$co === void 0 ? void 0 : _event$nativeEvent$co[0]) || event.target;
24
+ var _composedPath = event.nativeEvent.composedPath();
25
+ if (_composedPath) {
26
+ var _iterator2 = _createForOfIteratorHelper(_composedPath),
27
+ _step2;
28
+ try {
29
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
30
+ var _element = _step2.value;
31
+ if ('shadowRoot' in _element && _element.shadowRoot) {
32
+ return _element;
33
+ }
34
+ }
35
+ } catch (err) {
36
+ _iterator2.e(err);
37
+ } finally {
38
+ _iterator2.f();
39
+ }
40
+ }
41
+ return (_composedPath === null || _composedPath === void 0 ? void 0 : _composedPath[0]) || event.target;
9
42
  }
10
43
  return event.target;
11
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"getEventTarget.mjs","names":["getEventTarget","event","_event$composedPath","composedPath","target","nativeEvent","_event$nativeEvent$co"],"sources":["../src/getEventTarget.ts"],"sourcesContent":["export const getEventTarget = (event: React.SyntheticEvent | Event): EventTarget | null => {\n if ('composedPath' in event) {\n return event.composedPath()?.[0] || event.target;\n }\n if (event.nativeEvent && 'composedPath' in event.nativeEvent) {\n return event.nativeEvent.composedPath()?.[0] || event.target;\n }\n return event.target;\n};\n"],"mappings":"AAAA,OAAO,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAmC,EAAyB;EACzF,IAAI,cAAc,IAAIA,KAAK,EAAE;IAAA,IAAAC,mBAAA;IAC3B,OAAO,EAAAA,mBAAA,GAAAD,KAAK,CAACE,YAAY,EAAE,cAAAD,mBAAA,uBAApBA,mBAAA,CAAuB,CAAC,CAAC,KAAID,KAAK,CAACG,MAAM;EAClD;EACA,IAAIH,KAAK,CAACI,WAAW,IAAI,cAAc,IAAIJ,KAAK,CAACI,WAAW,EAAE;IAAA,IAAAC,qBAAA;IAC5D,OAAO,EAAAA,qBAAA,GAAAL,KAAK,CAACI,WAAW,CAACF,YAAY,EAAE,cAAAG,qBAAA,uBAAhCA,qBAAA,CAAmC,CAAC,CAAC,KAAIL,KAAK,CAACG,MAAM;EAC9D;EACA,OAAOH,KAAK,CAACG,MAAM;AACrB,CAAC"}
1
+ {"version":3,"file":"getEventTarget.mjs","names":["getEventTarget","event","composedPath","_iterator","_createForOfIteratorHelper","_step","s","n","done","element","value","shadowRoot","err","e","f","target","nativeEvent","_iterator2","_step2"],"sources":["../src/getEventTarget.ts"],"sourcesContent":["export const getEventTarget = (event: React.SyntheticEvent | Event): EventTarget | null => {\n if ('composedPath' in event) {\n const composedPath = event.composedPath();\n\n if (composedPath) {\n for (const element of composedPath) {\n if ('shadowRoot' in element && element.shadowRoot) {\n return element;\n }\n }\n }\n\n return composedPath?.[0] || event.target;\n }\n if (event.nativeEvent && 'composedPath' in event.nativeEvent) {\n const composedPath = event.nativeEvent.composedPath();\n\n if (composedPath) {\n for (const element of composedPath) {\n if ('shadowRoot' in element && element.shadowRoot) {\n return element;\n }\n }\n }\n return composedPath?.[0] || event.target;\n }\n return event.target;\n};\n"],"mappings":";AAAA,OAAO,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAmC,EAAyB;EACzF,IAAI,cAAc,IAAIA,KAAK,EAAE;IAC3B,IAAMC,YAAY,GAAGD,KAAK,CAACC,YAAY,EAAE;IAEzC,IAAIA,YAAY,EAAE;MAAA,IAAAC,SAAA,GAAAC,0BAAA,CACMF,YAAY;QAAAG,KAAA;MAAA;QAAlC,KAAAF,SAAA,CAAAG,CAAA,MAAAD,KAAA,GAAAF,SAAA,CAAAI,CAAA,IAAAC,IAAA,GAAoC;UAAA,IAAzBC,OAAO,GAAAJ,KAAA,CAAAK,KAAA;UAChB,IAAI,YAAY,IAAID,OAAO,IAAIA,OAAO,CAACE,UAAU,EAAE;YACjD,OAAOF,OAAO;UAChB;QACF;MAAC,SAAAG,GAAA;QAAAT,SAAA,CAAAU,CAAA,CAAAD,GAAA;MAAA;QAAAT,SAAA,CAAAW,CAAA;MAAA;IACH;IAEA,OAAO,CAAAZ,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAG,CAAC,CAAC,KAAID,KAAK,CAACc,MAAM;EAC1C;EACA,IAAId,KAAK,CAACe,WAAW,IAAI,cAAc,IAAIf,KAAK,CAACe,WAAW,EAAE;IAC5D,IAAMd,aAAY,GAAGD,KAAK,CAACe,WAAW,CAACd,YAAY,EAAE;IAErD,IAAIA,aAAY,EAAE;MAAA,IAAAe,UAAA,GAAAb,0BAAA,CACMF,aAAY;QAAAgB,MAAA;MAAA;QAAlC,KAAAD,UAAA,CAAAX,CAAA,MAAAY,MAAA,GAAAD,UAAA,CAAAV,CAAA,IAAAC,IAAA,GAAoC;UAAA,IAAzBC,QAAO,GAAAS,MAAA,CAAAR,KAAA;UAChB,IAAI,YAAY,IAAID,QAAO,IAAIA,QAAO,CAACE,UAAU,EAAE;YACjD,OAAOF,QAAO;UAChB;QACF;MAAC,SAAAG,GAAA;QAAAK,UAAA,CAAAJ,CAAA,CAAAD,GAAA;MAAA;QAAAK,UAAA,CAAAH,CAAA;MAAA;IACH;IACA,OAAO,CAAAZ,aAAY,aAAZA,aAAY,uBAAZA,aAAY,CAAG,CAAC,CAAC,KAAID,KAAK,CAACc,MAAM;EAC1C;EACA,OAAOd,KAAK,CAACc,MAAM;AACrB,CAAC"}
@@ -30,7 +30,7 @@ function injectStyle(css) {
30
30
  sh = prevSh;
31
31
  } else {
32
32
  // @ts-ignore
33
- var version = "4.36.2";
33
+ var version = "4.38.0";
34
34
  sh = document.createElement('style');
35
35
  sh.setAttribute('data-ui-v', version);
36
36
  sh.classList.add(selectorClass);
@@ -23,7 +23,7 @@ function injectStyle(css) {
23
23
  sh = prevSh;
24
24
  } else {
25
25
  // @ts-ignore
26
- var version = "4.36.2";
26
+ var version = "4.38.0";
27
27
  sh = document.createElement('style');
28
28
  sh.setAttribute('data-ui-v', version);
29
29
  sh.classList.add(selectorClass);
@@ -1,2 +1,2 @@
1
1
  export declare const inputProps: string[];
2
- export default function splitProps<T extends Partial<Record<K[number], any>>, K extends Array<keyof T>>(props: T, propsList?: K): [Partial<Pick<T, Extract<keyof T, K[number]>>>, Partial<Pick<T, Exclude<keyof T, K[number]>>>];
2
+ export default function getInputProps<T extends Partial<Record<K[number], any>>, K extends Array<keyof T>>(props: T, propsList?: K, allAriaPropsToControl?: boolean): [Partial<Pick<T, Extract<keyof T, K[number]>>>, Partial<Pick<T, Exclude<keyof T, K[number]>>>];
@@ -3,15 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = splitProps;
6
+ exports["default"] = getInputProps;
7
7
  exports.inputProps = void 0;
8
8
  var inputProps = ['autoFocus', 'defaultChecked', 'checked', 'disabled', 'name', 'type', 'value', 'defaultValue', 'id', 'indeterminate', 'required', 'onInvalid', 'onChange', 'onFocus', 'onBlur', 'onKeyDown', 'onKeyPress', 'onKeyUp', 'tabIndex', 'data-ui-name'];
9
9
  exports.inputProps = inputProps;
10
- function splitProps(props, propsList) {
10
+ function getInputProps(props, propsList, allAriaPropsToControl) {
11
11
  var result = [{}, {}];
12
12
  var keysToSplit = propsList || inputProps;
13
13
  for (var key in props) {
14
- if (keysToSplit.includes(key)) {
14
+ if (keysToSplit.includes(key) || allAriaPropsToControl && key.startsWith('aria-')) {
15
15
  result[0][key] = props[key];
16
16
  } else {
17
17
  result[1][key] = props[key];
@@ -1 +1 @@
1
- {"version":3,"file":"inputProps.js","names":["inputProps","exports","splitProps","props","propsList","result","keysToSplit","key","includes"],"sources":["../src/inputProps.ts"],"sourcesContent":["export const inputProps = [\n 'autoFocus',\n 'defaultChecked',\n 'checked',\n 'disabled',\n 'name',\n 'type',\n 'value',\n 'defaultValue',\n 'id',\n 'indeterminate',\n 'required',\n 'onInvalid',\n 'onChange',\n 'onFocus',\n 'onBlur',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'tabIndex',\n 'data-ui-name',\n];\n\ntype ExtractedProps<T extends object, K extends Array<keyof T>> = Partial<\n Pick<T, Extract<keyof T, K[number]>>\n>;\ntype ExcludedProps<T extends object, K extends Array<keyof T>> = Partial<\n Pick<T, Exclude<keyof T, K[number]>>\n>;\n\nexport default function splitProps<\n T extends Partial<Record<K[number], any>>,\n K extends Array<keyof T>,\n>(props: T, propsList?: K) {\n const result: [ExtractedProps<T, K>, ExcludedProps<T, K>] = [{}, {}];\n\n const keysToSplit = propsList || (inputProps as unknown as K);\n\n for (const key in props) {\n if (keysToSplit.includes(key)) {\n result[0][key as unknown as keyof ExtractedProps<T, K>] = props[key];\n } else {\n result[1][key as unknown as keyof ExcludedProps<T, K>] = props[key];\n }\n }\n\n return result;\n}\n"],"mappings":";;;;;;;AAAO,IAAMA,UAAU,GAAG,CACxB,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,MAAM,EACN,MAAM,EACN,OAAO,EACP,cAAc,EACd,IAAI,EACJ,eAAe,EACf,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,cAAc,CACf;AAACC,OAAA,CAAAD,UAAA,GAAAA,UAAA;AASa,SAASE,UAAUA,CAGhCC,KAAQ,EAAEC,SAAa,EAAE;EACzB,IAAMC,MAAmD,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAEpE,IAAMC,WAAW,GAAGF,SAAS,IAAKJ,UAA2B;EAE7D,KAAK,IAAMO,GAAG,IAAIJ,KAAK,EAAE;IACvB,IAAIG,WAAW,CAACE,QAAQ,CAACD,GAAG,CAAC,EAAE;MAC7BF,MAAM,CAAC,CAAC,CAAC,CAACE,GAAG,CAA0C,GAAGJ,KAAK,CAACI,GAAG,CAAC;IACtE,CAAC,MAAM;MACLF,MAAM,CAAC,CAAC,CAAC,CAACE,GAAG,CAAyC,GAAGJ,KAAK,CAACI,GAAG,CAAC;IACrE;EACF;EAEA,OAAOF,MAAM;AACf"}
1
+ {"version":3,"file":"inputProps.js","names":["inputProps","exports","getInputProps","props","propsList","allAriaPropsToControl","result","keysToSplit","key","includes","startsWith"],"sources":["../src/inputProps.ts"],"sourcesContent":["export const inputProps = [\n 'autoFocus',\n 'defaultChecked',\n 'checked',\n 'disabled',\n 'name',\n 'type',\n 'value',\n 'defaultValue',\n 'id',\n 'indeterminate',\n 'required',\n 'onInvalid',\n 'onChange',\n 'onFocus',\n 'onBlur',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'tabIndex',\n 'data-ui-name',\n];\n\ntype ExtractedProps<T extends object, K extends Array<keyof T>> = Partial<\n Pick<T, Extract<keyof T, K[number]>>\n>;\ntype ExcludedProps<T extends object, K extends Array<keyof T>> = Partial<\n Pick<T, Exclude<keyof T, K[number]>>\n>;\n\nexport default function getInputProps<\n T extends Partial<Record<K[number], any>>,\n K extends Array<keyof T>,\n>(props: T, propsList?: K, allAriaPropsToControl?: boolean) {\n const result: [ExtractedProps<T, K>, ExcludedProps<T, K>] = [{}, {}];\n\n const keysToSplit = propsList || (inputProps as unknown as K);\n\n for (const key in props) {\n if (keysToSplit.includes(key) || (allAriaPropsToControl && key.startsWith('aria-'))) {\n result[0][key as unknown as keyof ExtractedProps<T, K>] = props[key];\n } else {\n result[1][key as unknown as keyof ExcludedProps<T, K>] = props[key];\n }\n }\n\n return result;\n}\n"],"mappings":";;;;;;;AAAO,IAAMA,UAAU,GAAG,CACxB,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,MAAM,EACN,MAAM,EACN,OAAO,EACP,cAAc,EACd,IAAI,EACJ,eAAe,EACf,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,cAAc,CACf;AAACC,OAAA,CAAAD,UAAA,GAAAA,UAAA;AASa,SAASE,aAAaA,CAGnCC,KAAQ,EAAEC,SAAa,EAAEC,qBAA+B,EAAE;EAC1D,IAAMC,MAAmD,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAEpE,IAAMC,WAAW,GAAGH,SAAS,IAAKJ,UAA2B;EAE7D,KAAK,IAAMQ,GAAG,IAAIL,KAAK,EAAE;IACvB,IAAII,WAAW,CAACE,QAAQ,CAACD,GAAG,CAAC,IAAKH,qBAAqB,IAAIG,GAAG,CAACE,UAAU,CAAC,OAAO,CAAE,EAAE;MACnFJ,MAAM,CAAC,CAAC,CAAC,CAACE,GAAG,CAA0C,GAAGL,KAAK,CAACK,GAAG,CAAC;IACtE,CAAC,MAAM;MACLF,MAAM,CAAC,CAAC,CAAC,CAACE,GAAG,CAAyC,GAAGL,KAAK,CAACK,GAAG,CAAC;IACrE;EACF;EAEA,OAAOF,MAAM;AACf"}
@@ -1,9 +1,9 @@
1
1
  export var inputProps = ['autoFocus', 'defaultChecked', 'checked', 'disabled', 'name', 'type', 'value', 'defaultValue', 'id', 'indeterminate', 'required', 'onInvalid', 'onChange', 'onFocus', 'onBlur', 'onKeyDown', 'onKeyPress', 'onKeyUp', 'tabIndex', 'data-ui-name'];
2
- export default function splitProps(props, propsList) {
2
+ export default function getInputProps(props, propsList, allAriaPropsToControl) {
3
3
  var result = [{}, {}];
4
4
  var keysToSplit = propsList || inputProps;
5
5
  for (var key in props) {
6
- if (keysToSplit.includes(key)) {
6
+ if (keysToSplit.includes(key) || allAriaPropsToControl && key.startsWith('aria-')) {
7
7
  result[0][key] = props[key];
8
8
  } else {
9
9
  result[1][key] = props[key];
@@ -1 +1 @@
1
- {"version":3,"file":"inputProps.mjs","names":["inputProps","splitProps","props","propsList","result","keysToSplit","key","includes"],"sources":["../src/inputProps.ts"],"sourcesContent":["export const inputProps = [\n 'autoFocus',\n 'defaultChecked',\n 'checked',\n 'disabled',\n 'name',\n 'type',\n 'value',\n 'defaultValue',\n 'id',\n 'indeterminate',\n 'required',\n 'onInvalid',\n 'onChange',\n 'onFocus',\n 'onBlur',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'tabIndex',\n 'data-ui-name',\n];\n\ntype ExtractedProps<T extends object, K extends Array<keyof T>> = Partial<\n Pick<T, Extract<keyof T, K[number]>>\n>;\ntype ExcludedProps<T extends object, K extends Array<keyof T>> = Partial<\n Pick<T, Exclude<keyof T, K[number]>>\n>;\n\nexport default function splitProps<\n T extends Partial<Record<K[number], any>>,\n K extends Array<keyof T>,\n>(props: T, propsList?: K) {\n const result: [ExtractedProps<T, K>, ExcludedProps<T, K>] = [{}, {}];\n\n const keysToSplit = propsList || (inputProps as unknown as K);\n\n for (const key in props) {\n if (keysToSplit.includes(key)) {\n result[0][key as unknown as keyof ExtractedProps<T, K>] = props[key];\n } else {\n result[1][key as unknown as keyof ExcludedProps<T, K>] = props[key];\n }\n }\n\n return result;\n}\n"],"mappings":"AAAA,OAAO,IAAMA,UAAU,GAAG,CACxB,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,MAAM,EACN,MAAM,EACN,OAAO,EACP,cAAc,EACd,IAAI,EACJ,eAAe,EACf,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,cAAc,CACf;AASD,eAAe,SAASC,UAAUA,CAGhCC,KAAQ,EAAEC,SAAa,EAAE;EACzB,IAAMC,MAAmD,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAEpE,IAAMC,WAAW,GAAGF,SAAS,IAAKH,UAA2B;EAE7D,KAAK,IAAMM,GAAG,IAAIJ,KAAK,EAAE;IACvB,IAAIG,WAAW,CAACE,QAAQ,CAACD,GAAG,CAAC,EAAE;MAC7BF,MAAM,CAAC,CAAC,CAAC,CAACE,GAAG,CAA0C,GAAGJ,KAAK,CAACI,GAAG,CAAC;IACtE,CAAC,MAAM;MACLF,MAAM,CAAC,CAAC,CAAC,CAACE,GAAG,CAAyC,GAAGJ,KAAK,CAACI,GAAG,CAAC;IACrE;EACF;EAEA,OAAOF,MAAM;AACf"}
1
+ {"version":3,"file":"inputProps.mjs","names":["inputProps","getInputProps","props","propsList","allAriaPropsToControl","result","keysToSplit","key","includes","startsWith"],"sources":["../src/inputProps.ts"],"sourcesContent":["export const inputProps = [\n 'autoFocus',\n 'defaultChecked',\n 'checked',\n 'disabled',\n 'name',\n 'type',\n 'value',\n 'defaultValue',\n 'id',\n 'indeterminate',\n 'required',\n 'onInvalid',\n 'onChange',\n 'onFocus',\n 'onBlur',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'tabIndex',\n 'data-ui-name',\n];\n\ntype ExtractedProps<T extends object, K extends Array<keyof T>> = Partial<\n Pick<T, Extract<keyof T, K[number]>>\n>;\ntype ExcludedProps<T extends object, K extends Array<keyof T>> = Partial<\n Pick<T, Exclude<keyof T, K[number]>>\n>;\n\nexport default function getInputProps<\n T extends Partial<Record<K[number], any>>,\n K extends Array<keyof T>,\n>(props: T, propsList?: K, allAriaPropsToControl?: boolean) {\n const result: [ExtractedProps<T, K>, ExcludedProps<T, K>] = [{}, {}];\n\n const keysToSplit = propsList || (inputProps as unknown as K);\n\n for (const key in props) {\n if (keysToSplit.includes(key) || (allAriaPropsToControl && key.startsWith('aria-'))) {\n result[0][key as unknown as keyof ExtractedProps<T, K>] = props[key];\n } else {\n result[1][key as unknown as keyof ExcludedProps<T, K>] = props[key];\n }\n }\n\n return result;\n}\n"],"mappings":"AAAA,OAAO,IAAMA,UAAU,GAAG,CACxB,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,MAAM,EACN,MAAM,EACN,OAAO,EACP,cAAc,EACd,IAAI,EACJ,eAAe,EACf,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,cAAc,CACf;AASD,eAAe,SAASC,aAAaA,CAGnCC,KAAQ,EAAEC,SAAa,EAAEC,qBAA+B,EAAE;EAC1D,IAAMC,MAAmD,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAEpE,IAAMC,WAAW,GAAGH,SAAS,IAAKH,UAA2B;EAE7D,KAAK,IAAMO,GAAG,IAAIL,KAAK,EAAE;IACvB,IAAII,WAAW,CAACE,QAAQ,CAACD,GAAG,CAAC,IAAKH,qBAAqB,IAAIG,GAAG,CAACE,UAAU,CAAC,OAAO,CAAE,EAAE;MACnFJ,MAAM,CAAC,CAAC,CAAC,CAACE,GAAG,CAA0C,GAAGL,KAAK,CAACK,GAAG,CAAC;IACtE,CAAC,MAAM;MACLF,MAAM,CAAC,CAAC,CAAC,CAACE,GAAG,CAAyC,GAAGL,KAAK,CAACK,GAAG,CAAC;IACrE;EACF;EAEA,OAAOF,MAAM;AACf"}
@@ -19,11 +19,11 @@ var _illustration = require("intergalactic/illustration");
19
19
  var _flexBox = require("intergalactic/flex-box");
20
20
  var _isNode = _interopRequireDefault(require("intergalactic/utils/lib/isNode"));
21
21
  /*__reshadow-styles__:"./style/widget-empty.shadow.css"*/
22
- var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SWidgetEmpty_zgvol_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x, 16px)}.___SImage_zgvol_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);width:80px;height:80px}.___SDescription_zgvol_gg_,.___STitle_zgvol_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___STitle_zgvol_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700)}.___SDescription_zgvol_gg_{text-align:center;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);max-width:400px}.___STitle_zgvol_gg_+.___SDescription_zgvol_gg_{margin-top:var(--intergalactic-spacing-1x, 4px)}.___SDescription_zgvol_gg_+.___SDescription_zgvol_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}" /*__inner_css_end__*/, "zgvol_gg_") /*__reshadow_css_end__*/, {
23
- "__SWidgetEmpty": "___SWidgetEmpty_zgvol_gg_",
24
- "__SImage": "___SImage_zgvol_gg_",
25
- "__STitle": "___STitle_zgvol_gg_",
26
- "__SDescription": "___SDescription_zgvol_gg_"
22
+ var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SWidgetEmpty_c16xm_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x, 16px)}.___SImage_c16xm_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);width:80px;height:80px}.___SDescription_c16xm_gg_,.___STitle_c16xm_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___STitle_c16xm_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700)}.___SDescription_c16xm_gg_{text-align:center;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);max-width:400px}.___STitle_c16xm_gg_+.___SDescription_c16xm_gg_{margin-top:var(--intergalactic-spacing-1x, 4px)}.___SDescription_c16xm_gg_+.___SDescription_c16xm_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}" /*__inner_css_end__*/, "c16xm_gg_") /*__reshadow_css_end__*/, {
23
+ "__SWidgetEmpty": "___SWidgetEmpty_c16xm_gg_",
24
+ "__SImage": "___SImage_c16xm_gg_",
25
+ "__STitle": "___STitle_c16xm_gg_",
26
+ "__SDescription": "___SDescription_c16xm_gg_"
27
27
  });
28
28
  var getIconPath = function getIconPath(name) {
29
29
  return (0, _illustration.getIllustrationPath)(name);
@@ -14,11 +14,11 @@ import { getIllustrationPath } from 'intergalactic/illustration';
14
14
  import { Box, Flex } from 'intergalactic/flex-box';
15
15
  import isNode from 'intergalactic/utils/lib/isNode';
16
16
  /*__reshadow-styles__:"./style/widget-empty.shadow.css"*/
17
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SWidgetEmpty_zgvol_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x, 16px)}.___SImage_zgvol_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);width:80px;height:80px}.___SDescription_zgvol_gg_,.___STitle_zgvol_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___STitle_zgvol_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700)}.___SDescription_zgvol_gg_{text-align:center;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);max-width:400px}.___STitle_zgvol_gg_+.___SDescription_zgvol_gg_{margin-top:var(--intergalactic-spacing-1x, 4px)}.___SDescription_zgvol_gg_+.___SDescription_zgvol_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}" /*__inner_css_end__*/, "zgvol_gg_") /*__reshadow_css_end__*/, {
18
- "__SWidgetEmpty": "___SWidgetEmpty_zgvol_gg_",
19
- "__SImage": "___SImage_zgvol_gg_",
20
- "__STitle": "___STitle_zgvol_gg_",
21
- "__SDescription": "___SDescription_zgvol_gg_"
17
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SWidgetEmpty_c16xm_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x, 16px)}.___SImage_c16xm_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);width:80px;height:80px}.___SDescription_c16xm_gg_,.___STitle_c16xm_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___STitle_c16xm_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700)}.___SDescription_c16xm_gg_{text-align:center;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);max-width:400px}.___STitle_c16xm_gg_+.___SDescription_c16xm_gg_{margin-top:var(--intergalactic-spacing-1x, 4px)}.___SDescription_c16xm_gg_+.___SDescription_c16xm_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}" /*__inner_css_end__*/, "c16xm_gg_") /*__reshadow_css_end__*/, {
18
+ "__SWidgetEmpty": "___SWidgetEmpty_c16xm_gg_",
19
+ "__SImage": "___SImage_c16xm_gg_",
20
+ "__STitle": "___STitle_c16xm_gg_",
21
+ "__SDescription": "___SDescription_c16xm_gg_"
22
22
  });
23
23
  export var getIconPath = function getIconPath(name) {
24
24
  return getIllustrationPath(name);
@@ -1 +1 @@
1
- {"name":"intergalactic/widget-empty","description":"Semrush WidgetEmpty Component","version":"4.35.1-prerelease.1","main":"lib/cjs/index.js","module":"lib/es6/index.js","typings":"lib/types/index.d.ts","sideEffects":false,"author":"UI-kit team <ui-kit-team@semrush.com>","license":"MIT","scripts":{"build":"pnpm semcore-builder --source=js"},"dependencies":{"@semcore/flex-box":"5.33.1-prerelease.1","@semcore/illustration":"2.34.1-prerelease.1","@semcore/utils":"4.36.2-prerelease.1"},"peerDependencies":{"@semcore/core":"^2.31.1-prerelease.1","react":"16.8 - 18","react-dom":"16.8 - 18"},"repository":{"type":"git","url":"https://github.com/semrush/intergalactic.git","directory":"semcore/widget-empty"},"devDependencies":{"@types/react":"18.0.21","@semcore/testing-utils":"1.0.0"}}
1
+ {"name":"intergalactic/widget-empty","description":"Semrush WidgetEmpty Component","version":"4.36.0-prerelease.0","main":"lib/cjs/index.js","module":"lib/es6/index.js","typings":"lib/types/index.d.ts","sideEffects":false,"author":"UI-kit team <ui-kit-team@semrush.com>","license":"MIT","scripts":{"build":"pnpm semcore-builder --source=js"},"dependencies":{"@semcore/flex-box":"5.34.0-prerelease.0","@semcore/illustration":"2.35.0-prerelease.0","@semcore/utils":"4.38.0-prerelease.0"},"peerDependencies":{"@semcore/core":"^2.32.0-prerelease.0","react":"16.8 - 18","react-dom":"16.8 - 18"},"repository":{"type":"git","url":"https://github.com/semrush/intergalactic.git","directory":"semcore/widget-empty"},"devDependencies":{"@types/react":"18.0.21","@semcore/testing-utils":"1.0.0"}}
@@ -29,18 +29,18 @@ var _button = _interopRequireDefault(require("intergalactic/button"));
29
29
  var _m2 = _interopRequireDefault(require("intergalactic/icon/ArrowRight/m"));
30
30
  var _m3 = _interopRequireDefault(require("intergalactic/icon/ArrowLeft/m"));
31
31
  /*__reshadow-styles__:"./style/wizard.shadow.css"*/
32
- var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SWizard_ye6lt_gg_{max-width:980px;max-height:700px;display:flex;padding:0;background:0 0}.___SSidebar_ye6lt_gg_{background:var(--intergalactic-control-primary-advertising, #5925ab);color:var(--intergalactic-text-primary-invert, #ffffff);font-weight:var(--intergalactic-bold, 700);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);padding:var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-2x, 8px) calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-05x, 2px));max-width:220px;flex-shrink:0;box-sizing:border-box;border-radius:var(--intergalactic-modal-rounded, 12px)0 0 var(--intergalactic-modal-rounded, 12px)}@media (max-width:1060px){.___SSidebar_ye6lt_gg_{width:44px}}.___SSidebarHeader_ye6lt_gg_{font-size:var(--intergalactic-fs-300, 16px);margin:0 var(--intergalactic-spacing-5x, 20px) var(--intergalactic-spacing-4x, 16px)}@media (max-width:1060px){.___SSidebarHeader_ye6lt_gg_{display:none}}.___SStepper_ye6lt_gg_{display:flex;font-size:var(--intergalactic-fs-200, 14px);border-radius:var(--intergalactic-control-rounded, 6px);padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-3x, 12px);cursor:pointer;position:relative;overflow:auto;line-height:var(--intergalactic-lh-200, 142%)}@media (hover:hover){.___SStepper_ye6lt_gg_:hover{background:var(--intergalactic-control-primary-advertising-hover, #421983);z-index:1}}.___SStepper_ye6lt_gg_.__active_ye6lt_gg_{background:var(--intergalactic-control-primary-advertising-active, #8649e1)}.___SStepper_ye6lt_gg_.__disabled_ye6lt_gg_,.___SStepper_ye6lt_gg_:disabled{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}@media (max-width:1060px){.___SStepper_ye6lt_gg_{padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-1x, 4px)}@media (hover:hover){.___SStepper_ye6lt_gg_:hover{width:-moz-fit-content;width:fit-content;max-width:220px}.___SStepper_ye6lt_gg_:hover .___SStepDescription_ye6lt_gg_{display:block;border-radius:var(--intergalactic-control-rounded, 6px);white-space:nowrap;overflow:auto}.___SStepper_ye6lt_gg_.__active_ye6lt_gg_:hover .___SStepDescription_ye6lt_gg_{background:var(--intergalactic-control-primary-advertising-active, #8649e1)}}}.___SStepNumber_ye6lt_gg_{display:inline-block;min-width:20px}.___SCompleted_ye6lt_gg_{margin-top:1px}@media (max-width:1060px){.___SStepDescription_ye6lt_gg_{display:none}}.___SContent_ye6lt_gg_{padding:var(--intergalactic-spacing-10x, 40px);width:100%;border-radius:0 var(--intergalactic-modal-rounded, 12px) var(--intergalactic-modal-rounded, 12px)0;background:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SSidebarMenu_ye6lt_gg_{display:contents}" /*__inner_css_end__*/, "ye6lt_gg_") /*__reshadow_css_end__*/, {
33
- "__SWizard": "___SWizard_ye6lt_gg_",
34
- "__SStepNumber": "___SStepNumber_ye6lt_gg_",
35
- "__SCompleted": "___SCompleted_ye6lt_gg_",
36
- "__SContent": "___SContent_ye6lt_gg_",
37
- "__SSidebarMenu": "___SSidebarMenu_ye6lt_gg_",
38
- "__SSidebar": "___SSidebar_ye6lt_gg_",
39
- "__SSidebarHeader": "___SSidebarHeader_ye6lt_gg_",
40
- "__SStepper": "___SStepper_ye6lt_gg_",
41
- "_active": "__active_ye6lt_gg_",
42
- "_disabled": "__disabled_ye6lt_gg_",
43
- "__SStepDescription": "___SStepDescription_ye6lt_gg_"
32
+ var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SWizard_gkj0i_gg_{max-width:980px;max-height:700px;display:flex;padding:0;background:0 0}.___SSidebar_gkj0i_gg_{background:var(--intergalactic-control-primary-advertising, #5925ab);color:var(--intergalactic-text-primary-invert, #ffffff);font-weight:var(--intergalactic-bold, 700);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);padding:var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-2x, 8px) calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-05x, 2px));max-width:220px;flex-shrink:0;box-sizing:border-box;border-radius:var(--intergalactic-modal-rounded, 12px)0 0 var(--intergalactic-modal-rounded, 12px)}@media (max-width:1060px){.___SSidebar_gkj0i_gg_{width:44px}}.___SSidebarHeader_gkj0i_gg_{font-size:var(--intergalactic-fs-300, 16px);margin:0 var(--intergalactic-spacing-5x, 20px) var(--intergalactic-spacing-4x, 16px)}@media (max-width:1060px){.___SSidebarHeader_gkj0i_gg_{display:none}}.___SStepper_gkj0i_gg_{display:flex;font-size:var(--intergalactic-fs-200, 14px);border-radius:var(--intergalactic-control-rounded, 6px);padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-3x, 12px);cursor:pointer;position:relative;overflow:auto;line-height:var(--intergalactic-lh-200, 142%)}@media (hover:hover){.___SStepper_gkj0i_gg_:hover{background:var(--intergalactic-control-primary-advertising-hover, #421983);z-index:1}}.___SStepper_gkj0i_gg_.__active_gkj0i_gg_{background:var(--intergalactic-control-primary-advertising-active, #8649e1)}.___SStepper_gkj0i_gg_.__disabled_gkj0i_gg_,.___SStepper_gkj0i_gg_:disabled{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}@media (max-width:1060px){.___SStepper_gkj0i_gg_{padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-1x, 4px)}@media (hover:hover){.___SStepper_gkj0i_gg_:hover{width:-moz-fit-content;width:fit-content;max-width:220px}.___SStepper_gkj0i_gg_:hover .___SStepDescription_gkj0i_gg_{display:block;border-radius:var(--intergalactic-control-rounded, 6px);white-space:nowrap;overflow:auto}.___SStepper_gkj0i_gg_.__active_gkj0i_gg_:hover .___SStepDescription_gkj0i_gg_{background:var(--intergalactic-control-primary-advertising-active, #8649e1)}}}.___SStepNumber_gkj0i_gg_{display:inline-block;min-width:20px}.___SCompleted_gkj0i_gg_{margin-top:1px}@media (max-width:1060px){.___SStepDescription_gkj0i_gg_{display:none}}.___SContent_gkj0i_gg_{padding:var(--intergalactic-spacing-10x, 40px);width:100%;border-radius:0 var(--intergalactic-modal-rounded, 12px) var(--intergalactic-modal-rounded, 12px)0;background:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SSidebarMenu_gkj0i_gg_{display:contents}" /*__inner_css_end__*/, "gkj0i_gg_") /*__reshadow_css_end__*/, {
33
+ "__SWizard": "___SWizard_gkj0i_gg_",
34
+ "__SStepNumber": "___SStepNumber_gkj0i_gg_",
35
+ "__SCompleted": "___SCompleted_gkj0i_gg_",
36
+ "__SContent": "___SContent_gkj0i_gg_",
37
+ "__SSidebarMenu": "___SSidebarMenu_gkj0i_gg_",
38
+ "__SSidebar": "___SSidebar_gkj0i_gg_",
39
+ "__SSidebarHeader": "___SSidebarHeader_gkj0i_gg_",
40
+ "__SStepper": "___SStepper_gkj0i_gg_",
41
+ "_active": "__active_gkj0i_gg_",
42
+ "_disabled": "__disabled_gkj0i_gg_",
43
+ "__SStepDescription": "___SStepDescription_gkj0i_gg_"
44
44
  });
45
45
  var WizardRoot = /*#__PURE__*/function (_Component) {
46
46
  (0, _inherits2["default"])(WizardRoot, _Component);
@@ -61,7 +61,7 @@ var WizardRoot = /*#__PURE__*/function (_Component) {
61
61
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "stepperRefs", []);
62
62
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "stepperFocusPrev", function (i) {
63
63
  return function () {
64
- var prevStep = _this._steps.get(_this.asProps.step);
64
+ var prevStep = _this._steps.get(i);
65
65
  if (!prevStep) return;
66
66
  _this.setState({
67
67
  highlighted: prevStep === null || prevStep === void 0 ? void 0 : prevStep.step
@@ -74,7 +74,7 @@ var WizardRoot = /*#__PURE__*/function (_Component) {
74
74
  });
75
75
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "stepperFocusNext", function (i) {
76
76
  return function () {
77
- var nextStep = _this._steps.get(_this.asProps.step + 2);
77
+ var nextStep = _this._steps.get(i + 2);
78
78
  if (!nextStep) return;
79
79
  _this.setState({
80
80
  highlighted: nextStep === null || nextStep === void 0 ? void 0 : nextStep.step