intergalactic 15.80.0-prerelease.0 → 15.81.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 (336) hide show
  1. package/CHANGELOG.md +110 -0
  2. package/accordion/lib/cjs/Accordion.js +7 -7
  3. package/accordion/lib/es6/Accordion.js +7 -7
  4. package/animation/lib/cjs/Animation.js +11 -11
  5. package/animation/lib/cjs/Collapse.js +28 -28
  6. package/animation/lib/cjs/FadeInOut.js +28 -28
  7. package/animation/lib/cjs/Scale.js +28 -28
  8. package/animation/lib/cjs/Slide.js +28 -28
  9. package/animation/lib/cjs/Transform.js +28 -28
  10. package/animation/lib/es6/Animation.js +11 -11
  11. package/animation/lib/es6/Collapse.js +28 -28
  12. package/animation/lib/es6/FadeInOut.js +28 -28
  13. package/animation/lib/es6/Scale.js +28 -28
  14. package/animation/lib/es6/Slide.js +28 -28
  15. package/animation/lib/es6/Transform.js +28 -28
  16. package/badge/lib/cjs/Badge.js +6 -6
  17. package/badge/lib/es6/Badge.js +6 -6
  18. package/base-trigger/lib/cjs/BaseTrigger.js +18 -18
  19. package/base-trigger/lib/cjs/ButtonTrigger.js +3 -3
  20. package/base-trigger/lib/cjs/FilterTrigger.js +7 -7
  21. package/base-trigger/lib/cjs/LinkTrigger.js +12 -12
  22. package/base-trigger/lib/es6/BaseTrigger.js +18 -18
  23. package/base-trigger/lib/es6/ButtonTrigger.js +3 -3
  24. package/base-trigger/lib/es6/FilterTrigger.js +7 -7
  25. package/base-trigger/lib/es6/LinkTrigger.js +12 -12
  26. package/breadcrumbs/lib/cjs/Breadcrumbs.js +6 -6
  27. package/breadcrumbs/lib/es6/Breadcrumbs.js +6 -6
  28. package/button/lib/cjs/Button.js +26 -26
  29. package/button/lib/es6/Button.js +26 -26
  30. package/card/lib/cjs/Card.js +8 -8
  31. package/card/lib/es6/Card.js +8 -8
  32. package/carousel/lib/cjs/Carousel.js +19 -19
  33. package/carousel/lib/es6/Carousel.js +19 -19
  34. package/checkbox/lib/cjs/Checkbox.js +18 -18
  35. package/checkbox/lib/es6/Checkbox.js +18 -18
  36. package/color-picker/lib/cjs/ColorPicker.js +23 -23
  37. package/color-picker/lib/cjs/PaletteManager.js +23 -23
  38. package/color-picker/lib/cjs/components/InputColor.js +23 -23
  39. package/color-picker/lib/es6/ColorPicker.js +23 -23
  40. package/color-picker/lib/es6/PaletteManager.js +23 -23
  41. package/color-picker/lib/es6/components/InputColor.js +23 -23
  42. package/components.json +73 -73
  43. package/counter/lib/cjs/Counter.js +10 -10
  44. package/counter/lib/es6/Counter.js +10 -10
  45. package/d3-chart/component/Chart/AbstractChart.type.d.ts +4 -0
  46. package/d3-chart/lib/cjs/Area.js +11 -11
  47. package/d3-chart/lib/cjs/Axis.js +14 -14
  48. package/d3-chart/lib/cjs/Bar.js +10 -10
  49. package/d3-chart/lib/cjs/Bubble.js +12 -12
  50. package/d3-chart/lib/cjs/Donut.js +9 -9
  51. package/d3-chart/lib/cjs/Dots.js +8 -8
  52. package/d3-chart/lib/cjs/HorizontalBar.js +10 -10
  53. package/d3-chart/lib/cjs/Hover.js +3 -3
  54. package/d3-chart/lib/cjs/Line.js +9 -9
  55. package/d3-chart/lib/cjs/Plot.js +7 -5
  56. package/d3-chart/lib/cjs/Plot.js.map +1 -1
  57. package/d3-chart/lib/cjs/Radar.js +19 -19
  58. package/d3-chart/lib/cjs/RadialTree.js +11 -11
  59. package/d3-chart/lib/cjs/ReferenceLine.js +9 -9
  60. package/d3-chart/lib/cjs/ScatterPlot.js +9 -9
  61. package/d3-chart/lib/cjs/Tooltip.js +9 -9
  62. package/d3-chart/lib/cjs/Venn.js +9 -9
  63. package/d3-chart/lib/cjs/a11y/PlotA11yModule.js +2 -2
  64. package/d3-chart/lib/cjs/a11y/PlotA11yView.js +2 -2
  65. package/d3-chart/lib/cjs/component/Chart/AbstractChart.js +4 -2
  66. package/d3-chart/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  67. package/d3-chart/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  68. package/d3-chart/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  69. package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +17 -17
  70. package/d3-chart/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  71. package/d3-chart/lib/cjs/style/reference-line.shadow.css +1 -1
  72. package/d3-chart/lib/es6/Area.js +11 -11
  73. package/d3-chart/lib/es6/Axis.js +14 -14
  74. package/d3-chart/lib/es6/Bar.js +10 -10
  75. package/d3-chart/lib/es6/Bubble.js +12 -12
  76. package/d3-chart/lib/es6/Donut.js +9 -9
  77. package/d3-chart/lib/es6/Dots.js +8 -8
  78. package/d3-chart/lib/es6/HorizontalBar.js +10 -10
  79. package/d3-chart/lib/es6/Hover.js +3 -3
  80. package/d3-chart/lib/es6/Line.js +9 -9
  81. package/d3-chart/lib/es6/Plot.js +7 -5
  82. package/d3-chart/lib/es6/Plot.js.map +1 -1
  83. package/d3-chart/lib/es6/Radar.js +19 -19
  84. package/d3-chart/lib/es6/RadialTree.js +11 -11
  85. package/d3-chart/lib/es6/ReferenceLine.js +9 -9
  86. package/d3-chart/lib/es6/ScatterPlot.js +9 -9
  87. package/d3-chart/lib/es6/Tooltip.js +9 -9
  88. package/d3-chart/lib/es6/Venn.js +9 -9
  89. package/d3-chart/lib/es6/a11y/PlotA11yModule.js +2 -2
  90. package/d3-chart/lib/es6/a11y/PlotA11yView.js +2 -2
  91. package/d3-chart/lib/es6/component/Chart/AbstractChart.js +4 -2
  92. package/d3-chart/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  93. package/d3-chart/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  94. package/d3-chart/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  95. package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +17 -17
  96. package/d3-chart/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  97. package/d3-chart/lib/es6/style/reference-line.shadow.css +1 -1
  98. package/d3-chart/lib/types/component/Chart/AbstractChart.type.d.ts +4 -0
  99. package/data-table/lib/cjs/DataTable.js +35 -35
  100. package/data-table/lib/cjs/Head.js +1 -1
  101. package/data-table/lib/cjs/Head.js.map +1 -1
  102. package/data-table/lib/es6/DataTable.js +35 -35
  103. package/data-table/lib/es6/Head.js +1 -1
  104. package/data-table/lib/es6/Head.js.map +1 -1
  105. package/date-picker/lib/cjs/components/Calendar.js +21 -21
  106. package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js +29 -29
  107. package/date-picker/lib/cjs/components/InputTrigger.js +29 -29
  108. package/date-picker/lib/cjs/components/PickerAbstract.js +29 -29
  109. package/date-picker/lib/cjs/components/RangePickerAbstract.js +29 -29
  110. package/date-picker/lib/es6/components/Calendar.js +21 -21
  111. package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js +29 -29
  112. package/date-picker/lib/es6/components/InputTrigger.js +29 -29
  113. package/date-picker/lib/es6/components/PickerAbstract.js +29 -29
  114. package/date-picker/lib/es6/components/RangePickerAbstract.js +29 -29
  115. package/divider/lib/cjs/Divider.js +9 -9
  116. package/divider/lib/es6/Divider.js +9 -9
  117. package/dot/lib/cjs/Dot.js +10 -10
  118. package/dot/lib/es6/Dot.js +10 -10
  119. package/drag-and-drop/lib/cjs/DragAndDrop.js +192 -41
  120. package/drag-and-drop/lib/cjs/DragAndDrop.js.map +1 -1
  121. package/drag-and-drop/lib/cjs/style/drag-and-drop.shadow.css +73 -28
  122. package/drag-and-drop/lib/es6/DragAndDrop.js +192 -41
  123. package/drag-and-drop/lib/es6/DragAndDrop.js.map +1 -1
  124. package/drag-and-drop/lib/es6/style/drag-and-drop.shadow.css +73 -28
  125. package/dropdown/lib/cjs/Dropdown.js +2 -2
  126. package/dropdown/lib/es6/Dropdown.js +2 -2
  127. package/dropdown-menu/lib/cjs/DropdownMenu.js +19 -19
  128. package/dropdown-menu/lib/cjs/DropdownMenu.js.map +1 -1
  129. package/dropdown-menu/lib/cjs/styleScrollArea.js +6 -6
  130. package/dropdown-menu/lib/es6/DropdownMenu.js +19 -19
  131. package/dropdown-menu/lib/es6/DropdownMenu.js.map +1 -1
  132. package/dropdown-menu/lib/es6/styleScrollArea.js +6 -6
  133. package/ellipsis/lib/cjs/Ellipsis.js +11 -11
  134. package/ellipsis/lib/cjs/Ellipsis.js.map +1 -1
  135. package/ellipsis/lib/es6/Ellipsis.js +11 -11
  136. package/ellipsis/lib/es6/Ellipsis.js.map +1 -1
  137. package/errors/lib/cjs/Error.js +9 -9
  138. package/errors/lib/es6/Error.js +9 -9
  139. package/feature-popover/lib/cjs/FeaturePopover.js +10 -10
  140. package/feature-popover/lib/es6/FeaturePopover.js +10 -10
  141. package/feedback-form/lib/cjs/FeedbackForm.js +7 -7
  142. package/feedback-form/lib/es6/FeedbackForm.js +7 -7
  143. package/flags/lib/cjs/Flags.js +3 -3
  144. package/flags/lib/es6/Flags.js +3 -3
  145. package/flags/lib/sprites/sprite@1x.css +256 -256
  146. package/flags/lib/sprites/sprite@2x.css +257 -257
  147. package/flex-box/lib/cjs/Box/useBox.js +3 -3
  148. package/flex-box/lib/cjs/Flex/useFlex.js +3 -3
  149. package/flex-box/lib/cjs/invalid-state-box/InvalidStateBox.js +2 -2
  150. package/flex-box/lib/es6/Box/useBox.js +3 -3
  151. package/flex-box/lib/es6/Flex/useFlex.js +3 -3
  152. package/flex-box/lib/es6/invalid-state-box/InvalidStateBox.js +2 -2
  153. package/format-text/lib/cjs/FormatText.js +5 -5
  154. package/format-text/lib/es6/FormatText.js +5 -5
  155. package/fullscreen-modal/lib/cjs/FullscreenModal.js +13 -13
  156. package/fullscreen-modal/lib/es6/FullscreenModal.js +13 -13
  157. package/grid/lib/cjs/Grid.js +114 -114
  158. package/grid/lib/es6/Grid.js +114 -114
  159. package/icon/color/Confluence/l/index.js +4 -4
  160. package/icon/color/Confluence/l/index.mjs +4 -4
  161. package/icon/color/Confluence/m/index.js +4 -4
  162. package/icon/color/Confluence/m/index.mjs +4 -4
  163. package/icon/color/MicrosoftOffice/l/index.js +10 -10
  164. package/icon/color/MicrosoftOffice/l/index.mjs +10 -10
  165. package/icon/color/MicrosoftOffice/m/index.js +10 -10
  166. package/icon/color/MicrosoftOffice/m/index.mjs +10 -10
  167. package/icon/lib/cjs/Icon.js +5 -5
  168. package/icon/lib/es6/Icon.js +5 -5
  169. package/icon/pay/Discover/l/index.js +1 -1
  170. package/icon/pay/Discover/l/index.mjs +1 -1
  171. package/icon/pay/Discover/m/index.js +1 -1
  172. package/icon/pay/Discover/m/index.mjs +1 -1
  173. package/icon/pay/JCB/l/index.js +10 -10
  174. package/icon/pay/JCB/l/index.mjs +10 -10
  175. package/icon/pay/JCB/m/index.js +10 -10
  176. package/icon/pay/JCB/m/index.mjs +10 -10
  177. package/icon/pay/Visa/l/index.js +2 -2
  178. package/icon/pay/Visa/l/index.mjs +2 -2
  179. package/icon/pay/Visa/m/index.js +2 -2
  180. package/icon/pay/Visa/m/index.mjs +2 -2
  181. package/illustration/lib/cjs/index.js +1 -1
  182. package/illustration/lib/es6/index.js +1 -1
  183. package/inline-edit/lib/cjs/InlineEdit.js +4 -4
  184. package/inline-edit/lib/es6/InlineEdit.js +4 -4
  185. package/inline-input/lib/cjs/InlineInput.js +18 -18
  186. package/inline-input/lib/es6/InlineInput.js +18 -18
  187. package/input/lib/cjs/Input.js +17 -17
  188. package/input/lib/es6/Input.js +17 -17
  189. package/input-mask/lib/cjs/InputMask.js +6 -6
  190. package/input-mask/lib/es6/InputMask.js +6 -6
  191. package/input-number/lib/cjs/InputNumber.js +9 -9
  192. package/input-number/lib/es6/InputNumber.js +9 -9
  193. package/input-tags/lib/cjs/InputTags.js +12 -12
  194. package/input-tags/lib/es6/InputTags.js +12 -12
  195. package/link/lib/cjs/Link.js +16 -14
  196. package/link/lib/cjs/Link.js.map +1 -1
  197. package/link/lib/cjs/style/link.shadow.css +1 -1
  198. package/link/lib/es6/Link.js +16 -14
  199. package/link/lib/es6/Link.js.map +1 -1
  200. package/link/lib/es6/style/link.shadow.css +1 -1
  201. package/mini-chart/lib/cjs/component/score/Donut.js +9 -9
  202. package/mini-chart/lib/cjs/component/score/Line.js +17 -17
  203. package/mini-chart/lib/cjs/component/trend/Bar.js +7 -7
  204. package/mini-chart/lib/cjs/component/trend/Line.js +7 -7
  205. package/mini-chart/lib/es6/component/score/Donut.js +9 -9
  206. package/mini-chart/lib/es6/component/score/Line.js +17 -17
  207. package/mini-chart/lib/es6/component/trend/Bar.js +7 -7
  208. package/mini-chart/lib/es6/component/trend/Line.js +7 -7
  209. package/modal/lib/cjs/Modal.js +9 -9
  210. package/modal/lib/es6/Modal.js +9 -9
  211. package/notice/lib/cjs/Notice.js +13 -13
  212. package/notice/lib/es6/Notice.js +13 -13
  213. package/notice-bubble/lib/cjs/NoticeBubble.js +12 -12
  214. package/notice-bubble/lib/es6/NoticeBubble.js +12 -12
  215. package/notice-global/lib/cjs/NoticeGlobal.js +11 -11
  216. package/notice-global/lib/es6/NoticeGlobal.js +11 -11
  217. package/package.json +1 -1
  218. package/pagination/lib/cjs/Pagination.js +10 -10
  219. package/pagination/lib/es6/Pagination.js +10 -10
  220. package/pills/lib/cjs/Pills.js +13 -13
  221. package/pills/lib/es6/Pills.js +13 -13
  222. package/popper/index.d.ts +4 -0
  223. package/popper/lib/cjs/Popper.js +28 -8
  224. package/popper/lib/cjs/Popper.js.map +1 -1
  225. package/popper/lib/cjs/createPopper.js +2 -1
  226. package/popper/lib/cjs/createPopper.js.map +1 -1
  227. package/popper/lib/cjs/index.d.js.map +1 -1
  228. package/popper/lib/cjs/modifiers/cursorAnchoring.js +60 -0
  229. package/popper/lib/cjs/modifiers/cursorAnchoring.js.map +1 -0
  230. package/popper/lib/es6/Popper.js +28 -8
  231. package/popper/lib/es6/Popper.js.map +1 -1
  232. package/popper/lib/es6/createPopper.js +2 -1
  233. package/popper/lib/es6/createPopper.js.map +1 -1
  234. package/popper/lib/es6/index.d.js.map +1 -1
  235. package/popper/lib/es6/modifiers/cursorAnchoring.js +52 -0
  236. package/popper/lib/es6/modifiers/cursorAnchoring.js.map +1 -0
  237. package/popper/lib/types/index.d.ts +4 -0
  238. package/product-head/lib/cjs/Info.js +4 -4
  239. package/product-head/lib/cjs/ProductHead.js +5 -5
  240. package/product-head/lib/cjs/Title.js +4 -4
  241. package/product-head/lib/es6/Info.js +4 -4
  242. package/product-head/lib/es6/ProductHead.js +5 -5
  243. package/product-head/lib/es6/Title.js +4 -4
  244. package/progress-bar/lib/cjs/ProgressBar.js +15 -15
  245. package/progress-bar/lib/es6/ProgressBar.js +15 -15
  246. package/radio/lib/cjs/Radio.js +16 -16
  247. package/radio/lib/es6/Radio.js +16 -16
  248. package/scroll-area/lib/cjs/ScrollArea.js +21 -21
  249. package/scroll-area/lib/cjs/ScrollBar.js +6 -6
  250. package/scroll-area/lib/es6/ScrollArea.js +21 -21
  251. package/scroll-area/lib/es6/ScrollBar.js +6 -6
  252. package/select/lib/cjs/InputSearch.js +6 -6
  253. package/select/lib/cjs/Select.js +8 -8
  254. package/select/lib/es6/InputSearch.js +6 -6
  255. package/select/lib/es6/Select.js +8 -8
  256. package/side-panel/lib/cjs/SidePanel.js +15 -15
  257. package/side-panel/lib/es6/SidePanel.js +15 -15
  258. package/skeleton/lib/cjs/Charts/Area.js +9 -9
  259. package/skeleton/lib/cjs/Charts/Bar.js +9 -9
  260. package/skeleton/lib/cjs/Charts/Bubble.js +9 -9
  261. package/skeleton/lib/cjs/Charts/Donut.js +9 -9
  262. package/skeleton/lib/cjs/Charts/Histogram.js +9 -9
  263. package/skeleton/lib/cjs/Charts/Line.js +9 -9
  264. package/skeleton/lib/cjs/Charts/RadialTree.js +9 -9
  265. package/skeleton/lib/cjs/Charts/ScatterPlot.js +9 -9
  266. package/skeleton/lib/cjs/Charts/Venn.js +9 -9
  267. package/skeleton/lib/cjs/Skeleton.js +8 -8
  268. package/skeleton/lib/es6/Charts/Area.js +9 -9
  269. package/skeleton/lib/es6/Charts/Bar.js +9 -9
  270. package/skeleton/lib/es6/Charts/Bubble.js +9 -9
  271. package/skeleton/lib/es6/Charts/Donut.js +9 -9
  272. package/skeleton/lib/es6/Charts/Histogram.js +9 -9
  273. package/skeleton/lib/es6/Charts/Line.js +9 -9
  274. package/skeleton/lib/es6/Charts/RadialTree.js +9 -9
  275. package/skeleton/lib/es6/Charts/ScatterPlot.js +9 -9
  276. package/skeleton/lib/es6/Charts/Venn.js +9 -9
  277. package/skeleton/lib/es6/Skeleton.js +8 -8
  278. package/slider/lib/cjs/Slider.js +8 -7
  279. package/slider/lib/cjs/Slider.js.map +1 -1
  280. package/slider/lib/cjs/style/slider.shadow.css +9 -0
  281. package/slider/lib/es6/Slider.js +8 -7
  282. package/slider/lib/es6/Slider.js.map +1 -1
  283. package/slider/lib/es6/style/slider.shadow.css +9 -0
  284. package/spin/lib/cjs/Spin.js +13 -13
  285. package/spin/lib/es6/Spin.js +13 -13
  286. package/spin-container/lib/cjs/SpinContainer.js +8 -8
  287. package/spin-container/lib/es6/SpinContainer.js +8 -8
  288. package/sticky/lib/cjs/Sticky.js +2 -2
  289. package/sticky/lib/es6/Sticky.js +2 -2
  290. package/switch/lib/cjs/Switch.js +21 -21
  291. package/switch/lib/es6/Switch.js +21 -21
  292. package/tab-line/lib/cjs/TabLine.js +13 -13
  293. package/tab-line/lib/es6/TabLine.js +13 -13
  294. package/tab-panel/lib/cjs/TabPanel.js +8 -8
  295. package/tab-panel/lib/es6/TabPanel.js +8 -8
  296. package/tag/lib/cjs/Tag.js +20 -20
  297. package/tag/lib/es6/Tag.js +20 -20
  298. package/textarea/lib/cjs/Textarea.js +10 -8
  299. package/textarea/lib/cjs/Textarea.js.map +1 -1
  300. package/textarea/lib/es6/Textarea.js +10 -8
  301. package/textarea/lib/es6/Textarea.js.map +1 -1
  302. package/time-picker/lib/cjs/TimePicker.js +12 -12
  303. package/time-picker/lib/es6/TimePicker.js +12 -12
  304. package/tooltip/index.d.ts +13 -2
  305. package/tooltip/lib/cjs/Tooltip.js +9 -9
  306. package/tooltip/lib/cjs/index.d.js.map +1 -1
  307. package/tooltip/lib/es6/Tooltip.js +9 -9
  308. package/tooltip/lib/es6/index.d.js.map +1 -1
  309. package/tooltip/lib/types/index.d.ts +13 -2
  310. package/typography/index.d.ts +4 -1
  311. package/typography/lib/cjs/Blockquote.js +4 -4
  312. package/typography/lib/cjs/Hint.js +7 -7
  313. package/typography/lib/cjs/List.js +5 -5
  314. package/typography/lib/cjs/Text.js +34 -34
  315. package/typography/lib/cjs/index.d.js.map +1 -1
  316. package/typography/lib/es6/Blockquote.js +4 -4
  317. package/typography/lib/es6/Hint.js +7 -7
  318. package/typography/lib/es6/List.js +5 -5
  319. package/typography/lib/es6/Text.js +34 -34
  320. package/typography/lib/es6/index.d.js.map +1 -1
  321. package/typography/lib/types/index.d.ts +4 -1
  322. package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.js +2 -2
  323. package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.mjs +2 -2
  324. package/utils/lib/injectStyle.js +1 -1
  325. package/utils/lib/injectStyle.mjs +1 -1
  326. package/utils/lib/themes/auto.css +3 -1
  327. package/utils/lib/themes/default.css +3 -1
  328. package/utils/lib/themes/default.json +1 -0
  329. package/utils/lib/themes/light.css +3 -1
  330. package/utils/lib/themes/light.json +1 -0
  331. package/widget-empty/lib/cjs/WidgetEmpty.js +8 -6
  332. package/widget-empty/lib/cjs/WidgetEmpty.js.map +1 -1
  333. package/widget-empty/lib/es6/WidgetEmpty.js +8 -6
  334. package/widget-empty/lib/es6/WidgetEmpty.js.map +1 -1
  335. package/wizard/lib/cjs/Wizard.js +11 -11
  336. package/wizard/lib/es6/Wizard.js +11 -11
@@ -6,96 +6,135 @@ SDraggable[draggable] {
6
6
  -webkit-user-select: none;
7
7
  user-select: none;
8
8
 
9
- &::after {
9
+
10
+ &::before {
10
11
  content: '';
11
12
  position: absolute;
12
13
  display: none;
13
- background-image: radial-gradient(
14
- circle at center,
15
- var(--intergalactic-icon-primary-neutral, #6c6e79) 1px,
16
- transparent 0
17
- );
14
+ pointer-events: none;
15
+ background-image: radial-gradient(circle at center,
16
+ var(--intergalactic-icon-primary-neutral, #6c6e79) 1px,
17
+ transparent 0);
18
18
  background-size: 6px 6px;
19
19
  background-position: 2px 2px;
20
20
  background-repeat: repeat repeat;
21
21
  }
22
22
 
23
- &:hover::after {
23
+ &:hover::before {
24
24
  display: block;
25
25
  }
26
- &[hideHoverEffect]::after {
26
+
27
+ &[hideHoverEffect]::before {
27
28
  display: none;
28
29
  }
29
30
  }
30
31
 
31
- SDraggable[placement='top']::after {
32
+ SDraggable[placement='top']::before {
32
33
  top: 0;
33
34
  left: 0;
34
35
  width: 100%;
35
36
  height: 20px;
36
37
  }
37
38
 
38
- SDraggable[placement='top'] {
39
- padding-top: var(--intergalactic-spacing-4x, 16px);
40
- }
41
-
42
39
  SDraggable[placement='right'] {
43
- padding-right: var(--intergalactic-spacing-4x, 16px);
44
- &::after {
40
+
41
+ &::before {
45
42
  right: 0;
46
43
  }
47
44
  }
48
45
 
49
46
  SDraggable[placement='bottom'] {
50
- padding-bottom: var(--intergalactic-spacing-4x, 16px);
51
47
 
52
- &::after {
48
+ &::before {
53
49
  bottom: 0;
54
50
  }
55
51
  }
56
52
 
57
53
  SDraggable[placement='left'] {
58
- padding-left: var(--intergalactic-spacing-4x, 16px);
59
54
 
60
- &::after {
55
+ &::before {
61
56
  left: 0;
62
57
  }
63
58
  }
64
59
 
65
- SDraggable[placement='top']::after,
66
- SDraggable[placement='right']::after,
67
- SDraggable[placement='left']::after {
60
+ SDraggable[placement='top']::before,
61
+ SDraggable[placement='right']::before,
62
+ SDraggable[placement='left']::before {
68
63
  top: 0;
69
64
  }
70
65
 
71
- SDraggable[placement='top']::after,
72
- SDraggable[placement='bottom']::after {
66
+ SDraggable[placement='top']::before,
67
+ SDraggable[placement='bottom']::before {
73
68
  left: 0;
74
69
  width: 100%;
75
70
  height: 16px;
76
71
  }
77
72
 
78
- SDraggable[placement='right']::after,
79
- SDraggable[placement='left']::after {
73
+ SDraggable[placement='right']::before,
74
+ SDraggable[placement='left']::before {
80
75
  top: 0;
81
76
  width: 16px;
82
77
  height: 100%;
83
78
  }
84
79
 
85
80
  SDropZone {
86
- border: 1px dashed var(--intergalactic-border-primary, #c4c7cf);
87
- border-radius: var(--intergalactic-surface-rounded, 6px);
81
+ position: relative;
88
82
  }
89
83
 
90
84
  SDropZone[dropPreview],
91
85
  SDraggable[dropPreview] {
92
86
  background-color: var(--intergalactic-bg-secondary-neutral, #f4f5f9);
93
87
  }
88
+
89
+
94
90
  SDropZone[dark][dropPreview],
95
91
  SDraggable[dark][dropPreview] {
96
92
  background-color: var(--intergalactic-bg-primary-invert-active, #484a54);
97
93
  }
98
94
 
95
+ SDraggable:focus {
96
+ outline: none;
97
+ }
98
+
99
+ SDraggable[keyboardFocused]:focus {
100
+ box-shadow: none;
101
+ }
102
+
103
+ SDraggable[keyboardFocused]:focus:after {
104
+ position: absolute;
105
+ display: block;
106
+ content: '';
107
+ inset: 3px;
108
+ box-shadow: var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));
109
+ pointer-events: none;
110
+ }
111
+
112
+
113
+ SDraggable[keyboardDragging] {
114
+ scale: 1.1;
115
+
116
+ background-color: var(--intergalactic-bg-primary-neutral, #ffffff);
117
+ box-shadow: var(--intergalactic-box-shadow-dnd, 0px 0px 1px 0px rgba(25, 27, 35, 0.16), 0px 12px 40px 0px rgba(25, 27, 35, 0.16)) !important;
118
+
119
+
120
+ &::before {
121
+ display: block;
122
+ }
123
+
124
+ &[hideHoverEffect]::before {
125
+ display: block;
126
+ }
127
+ }
128
+
129
+ SDraggable[keyboardDragging][reversedScaling] {
130
+ scale: 0.95;
131
+ }
132
+
133
+ SDraggable[animatedScaling] {
134
+ transition: all calc(var(--intergalactic-duration-extra-fast, 100) * 1ms) ease-in-out;
135
+ }
136
+
137
+
99
138
  SA11yHint {
100
139
  position: absolute;
101
140
  /* disable-tokens-validator */
@@ -104,3 +143,9 @@ SA11yHint {
104
143
  width: 1px;
105
144
  clip: rect(0 0 0 0);
106
145
  }
146
+
147
+ @media (prefers-reduced-motion: reduce) {
148
+ SDraggable {
149
+ transition: none;
150
+ }
151
+ }
@@ -17,19 +17,24 @@ import { localizedMessages } from './translations/__intergalactic-dynamic-locale
17
17
  import i18nEnhance from 'intergalactic/utils/lib/enhances/i18nEnhance';
18
18
  import useEnhancedEffect from 'intergalactic/utils/lib/use/useEnhancedEffect';
19
19
  /*__reshadow-styles__:"./style/drag-and-drop.shadow.css"*/
20
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SDraggable_cczy6_gg_.__draggable_cczy6_gg_{position:relative;cursor:grab;-moz-user-select:none;-webkit-user-select:none;user-select:none}.___SDraggable_cczy6_gg_.__draggable_cczy6_gg_::after{content:\"\";position:absolute;display:none;background-image:radial-gradient(circle at center,var(--intergalactic-icon-primary-neutral, #6c6e79) 1px,transparent 0);background-size:6px 6px;background-position:2px 2px;background-repeat:repeat repeat}@media (hover:hover){.___SDraggable_cczy6_gg_.__draggable_cczy6_gg_:hover::after{display:block}}.___SDraggable_cczy6_gg_.__draggable_cczy6_gg_.__hideHoverEffect_cczy6_gg_::after{display:none}.___SDraggable_cczy6_gg_._placement_top_cczy6_gg_{padding-top:var(--intergalactic-spacing-4x, 16px)}.___SDraggable_cczy6_gg_._placement_right_cczy6_gg_{padding-right:var(--intergalactic-spacing-4x, 16px)}.___SDraggable_cczy6_gg_._placement_right_cczy6_gg_::after{right:0}.___SDraggable_cczy6_gg_._placement_bottom_cczy6_gg_{padding-bottom:var(--intergalactic-spacing-4x, 16px)}.___SDraggable_cczy6_gg_._placement_bottom_cczy6_gg_::after{bottom:0}.___SDraggable_cczy6_gg_._placement_left_cczy6_gg_{padding-left:var(--intergalactic-spacing-4x, 16px)}.___SDraggable_cczy6_gg_._placement_left_cczy6_gg_::after{left:0}.___SDraggable_cczy6_gg_._placement_top_cczy6_gg_::after{top:0;left:0;width:100%;height:16px}.___SDraggable_cczy6_gg_._placement_bottom_cczy6_gg_::after{left:0;width:100%;height:16px}.___SDraggable_cczy6_gg_._placement_left_cczy6_gg_::after,.___SDraggable_cczy6_gg_._placement_right_cczy6_gg_::after{top:0;width:16px;height:100%}.___SDropZone_cczy6_gg_{border:1px dashed var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-surface-rounded, 6px)}.___SDraggable_cczy6_gg_.__dropPreview_cczy6_gg_,.___SDropZone_cczy6_gg_.__dropPreview_cczy6_gg_{background-color:var(--intergalactic-bg-secondary-neutral, #f4f5f9)}.___SDraggable_cczy6_gg_.__dark_cczy6_gg_.__dropPreview_cczy6_gg_,.___SDropZone_cczy6_gg_.__dark_cczy6_gg_.__dropPreview_cczy6_gg_{background-color:var(--intergalactic-bg-primary-invert-active, #484a54)}.___SA11yHint_cczy6_gg_{position:absolute;margin-top:-1px;height:1px;width:1px;clip:rect(0 0 0 0)}" /*__inner_css_end__*/, "cczy6_gg_") /*__reshadow_css_end__*/, {
21
- "__SDraggable": "___SDraggable_cczy6_gg_",
22
- "_placement_top": "_placement_top_cczy6_gg_",
23
- "_placement_right": "_placement_right_cczy6_gg_",
24
- "_placement_left": "_placement_left_cczy6_gg_",
25
- "_placement_bottom": "_placement_bottom_cczy6_gg_",
26
- "__SDropZone": "___SDropZone_cczy6_gg_",
27
- "_dropPreview": "__dropPreview_cczy6_gg_",
28
- "_dark": "__dark_cczy6_gg_",
29
- "__SA11yHint": "___SA11yHint_cczy6_gg_",
30
- "_draggable": "__draggable_cczy6_gg_",
31
- "_hideHoverEffect": "__hideHoverEffect_cczy6_gg_"
20
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SDraggable_1ff86_gg_.__draggable_1ff86_gg_{position:relative;cursor:grab;-moz-user-select:none;-webkit-user-select:none;user-select:none}.___SDraggable_1ff86_gg_.__draggable_1ff86_gg_::before{content:\"\";position:absolute;display:none;pointer-events:none;background-image:radial-gradient(circle at center,var(--intergalactic-icon-primary-neutral, #6c6e79) 1px,transparent 0);background-size:6px 6px;background-position:2px 2px;background-repeat:repeat repeat}@media (hover:hover){.___SDraggable_1ff86_gg_.__draggable_1ff86_gg_:hover::before{display:block}}.___SDraggable_1ff86_gg_.__draggable_1ff86_gg_.__hideHoverEffect_1ff86_gg_::before{display:none}.___SDraggable_1ff86_gg_._placement_right_1ff86_gg_::before{right:0}.___SDraggable_1ff86_gg_._placement_bottom_1ff86_gg_::before{bottom:0}.___SDraggable_1ff86_gg_._placement_left_1ff86_gg_::before{left:0}.___SDraggable_1ff86_gg_._placement_top_1ff86_gg_::before{top:0;left:0;width:100%;height:16px}.___SDraggable_1ff86_gg_._placement_bottom_1ff86_gg_::before{left:0;width:100%;height:16px}.___SDraggable_1ff86_gg_._placement_left_1ff86_gg_::before,.___SDraggable_1ff86_gg_._placement_right_1ff86_gg_::before{top:0;width:16px;height:100%}.___SDropZone_1ff86_gg_{position:relative}.___SDraggable_1ff86_gg_.__dropPreview_1ff86_gg_,.___SDropZone_1ff86_gg_.__dropPreview_1ff86_gg_{background-color:var(--intergalactic-bg-secondary-neutral, #f4f5f9)}.___SDraggable_1ff86_gg_.__dark_1ff86_gg_.__dropPreview_1ff86_gg_,.___SDropZone_1ff86_gg_.__dark_1ff86_gg_.__dropPreview_1ff86_gg_{background-color:var(--intergalactic-bg-primary-invert-active, #484a54)}.___SDraggable_1ff86_gg_:focus{outline:0}.___SDraggable_1ff86_gg_.__keyboardFocused_1ff86_gg_:focus{box-shadow:none}.___SDraggable_1ff86_gg_.__keyboardFocused_1ff86_gg_:focus:after{position:absolute;display:block;content:\"\";top:3px;right:3px;bottom:3px;left:3px;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));pointer-events:none}.___SDraggable_1ff86_gg_.__keyboardDragging_1ff86_gg_{scale:1.1;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);box-shadow:var(--intergalactic-box-shadow-dnd, 0px 0px 1px 0px rgba(25, 27, 35, 0.16), 0px 12px 40px 0px rgba(25, 27, 35, 0.16))!important}.___SDraggable_1ff86_gg_.__keyboardDragging_1ff86_gg_.__hideHoverEffect_1ff86_gg_::before,.___SDraggable_1ff86_gg_.__keyboardDragging_1ff86_gg_::before{display:block}.___SDraggable_1ff86_gg_.__keyboardDragging_1ff86_gg_.__reversedScaling_1ff86_gg_{scale:.95}.___SDraggable_1ff86_gg_.__animatedScaling_1ff86_gg_{transition:all calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out}.___SA11yHint_1ff86_gg_{position:absolute;margin-top:-1px;height:1px;width:1px;clip:rect(0 0 0 0)}@media (prefers-reduced-motion:reduce){.___SDraggable_1ff86_gg_{transition:none}}" /*__inner_css_end__*/, "1ff86_gg_") /*__reshadow_css_end__*/, {
21
+ "__SDraggable": "___SDraggable_1ff86_gg_",
22
+ "_placement_top": "_placement_top_1ff86_gg_",
23
+ "_placement_right": "_placement_right_1ff86_gg_",
24
+ "_placement_left": "_placement_left_1ff86_gg_",
25
+ "_placement_bottom": "_placement_bottom_1ff86_gg_",
26
+ "__SDropZone": "___SDropZone_1ff86_gg_",
27
+ "_dropPreview": "__dropPreview_1ff86_gg_",
28
+ "_dark": "__dark_1ff86_gg_",
29
+ "_keyboardFocused": "__keyboardFocused_1ff86_gg_",
30
+ "_keyboardDragging": "__keyboardDragging_1ff86_gg_",
31
+ "_reversedScaling": "__reversedScaling_1ff86_gg_",
32
+ "_animatedScaling": "__animatedScaling_1ff86_gg_",
33
+ "__SA11yHint": "___SA11yHint_1ff86_gg_",
34
+ "_draggable": "__draggable_1ff86_gg_",
35
+ "_hideHoverEffect": "__hideHoverEffect_1ff86_gg_"
32
36
  });
37
+ import keyboardFocusEnhance from 'intergalactic/utils/lib/enhances/keyboardFocusEnhance';
33
38
  var noop = function noop() {
34
39
  /* do nothing */
35
40
  };
@@ -50,10 +55,13 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
50
55
  _defineProperty(_assertThisInitialized(_this), "state", {
51
56
  items: [],
52
57
  dragging: null,
53
- previewSwap: null,
58
+ dragOver: null,
54
59
  hideHoverEffect: false,
55
60
  // https://stackoverflow.com/questions/67118739/hover-effect-reset-when-hovering-over-other-letters
56
- a11yHint: null
61
+ a11yHint: null,
62
+ keyboardDraggingIndex: null,
63
+ animatedScaling: null,
64
+ reversedScaling: false
57
65
  });
58
66
  _defineProperty(_assertThisInitialized(_this), "handleItemDragStart", function (index) {
59
67
  var items = _this.state.items;
@@ -67,7 +75,7 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
67
75
  });
68
76
  var itemsCount = zonedItems.length;
69
77
  var itemPosition = zonedItems.findIndex(function (i) {
70
- return (i === null || i === void 0 ? void 0 : i.id) === currentItem.id;
78
+ return (i === null || i === void 0 ? void 0 : i.node) === currentItem.node || (i === null || i === void 0 ? void 0 : i.id) && (i === null || i === void 0 ? void 0 : i.id) === currentItem.id;
71
79
  });
72
80
  var a11yHint = getI18nText(zoneName ? 'grabbedWithZone' : 'grabbed', {
73
81
  itemText: itemText,
@@ -91,8 +99,9 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
91
99
  event.preventDefault();
92
100
  _this.setState({
93
101
  dragging: null,
94
- previewSwap: null
95
- // hideHoverEffect: true
102
+ dragOver: null,
103
+ reversedScaling: false,
104
+ keyboardDraggingIndex: null
96
105
  });
97
106
  });
98
107
  _defineProperty(_assertThisInitialized(_this), "handleItemDragOver", function (event) {
@@ -117,7 +126,7 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
117
126
  });
118
127
  var itemsCount = zonedItems.length;
119
128
  var itemPosition = zonedItems.findIndex(function (i) {
120
- return (i === null || i === void 0 ? void 0 : i.id) === currentItem.id;
129
+ return (i === null || i === void 0 ? void 0 : i.node) === currentItem.node || (i === null || i === void 0 ? void 0 : i.id) && (i === null || i === void 0 ? void 0 : i.id) === currentItem.id;
121
130
  });
122
131
  var i18nKey = !zoneName ? 'grabbing' : currentItem.isDropZone ? 'grabbingJustWithZone' : 'grabbingFullWithZone';
123
132
  var a11yHint = getI18nText(i18nKey, {
@@ -127,20 +136,19 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
127
136
  zoneName: zoneName || ''
128
137
  });
129
138
  if (itemIndex === ((_this$state$dragging = _this.state.dragging) === null || _this$state$dragging === void 0 ? void 0 : _this$state$dragging.index)) _this.setState({
130
- previewSwap: null,
139
+ dragOver: null,
131
140
  a11yHint: a11yHint
132
141
  });else _this.setState({
133
- previewSwap: itemIndex,
142
+ dragOver: itemIndex,
134
143
  a11yHint: a11yHint
135
144
  });
136
145
  });
137
146
  _defineProperty(_assertThisInitialized(_this), "getSwapPreview", function (index) {
138
- var _this$state$items$_th, _this$state$items$_th2, _this$state$items$_th3;
147
+ var _this$state$items$pre;
139
148
  if (!_this.state.dragging) return null;
140
- if (_this.state.previewSwap === null) return null;
141
- if (((_this$state$items$_th = _this.state.items[_this.state.previewSwap]) === null || _this$state$items$_th === void 0 ? void 0 : _this$state$items$_th.draggingAllowed) === false) return null;
142
- if (_this.state.previewSwap === index) return (_this$state$items$_th2 = _this.state.items[_this.state.dragging.index]) === null || _this$state$items$_th2 === void 0 ? void 0 : _this$state$items$_th2.children;
143
- if (_this.state.previewSwap !== null && index === _this.state.dragging.index) return (_this$state$items$_th3 = _this.state.items[_this.state.previewSwap]) === null || _this$state$items$_th3 === void 0 ? void 0 : _this$state$items$_th3.children;
149
+ var previewIndex = _this.preview[index];
150
+ if (typeof previewIndex !== 'number') return null;
151
+ return (_this$state$items$pre = _this.state.items[previewIndex]) === null || _this$state$items$pre === void 0 ? void 0 : _this$state$items$pre.children;
144
152
  });
145
153
  _defineProperty(_assertThisInitialized(_this), "handleItemDrop", function (index) {
146
154
  var _this$asProps = _this.asProps,
@@ -162,7 +170,7 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
162
170
  });
163
171
  var itemsCount = zonedItems.length;
164
172
  var itemPosition = zonedItems.findIndex(function (i) {
165
- return (i === null || i === void 0 ? void 0 : i.id) === currentItem.id;
173
+ return (i === null || i === void 0 ? void 0 : i.node) === currentItem.node || (i === null || i === void 0 ? void 0 : i.id) && (i === null || i === void 0 ? void 0 : i.id) === currentItem.id;
166
174
  });
167
175
  var i18nKey = !zoneName ? 'dropped' : currentItem.isDropZone ? 'droppedJustWithZone' : 'droppedFullWithZone';
168
176
  var a11yHint = getI18nText(i18nKey, {
@@ -174,8 +182,10 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
174
182
  _this.setState({
175
183
  a11yHint: a11yHint,
176
184
  dragging: null,
177
- previewSwap: null,
178
- hideHoverEffect: true
185
+ dragOver: null,
186
+ keyboardDraggingIndex: null,
187
+ hideHoverEffect: true,
188
+ reversedScaling: false
179
189
  });
180
190
  if (dragging && items[dragging.index]) {
181
191
  var fromNode = items[dragging.index];
@@ -205,24 +215,64 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
205
215
  hideHoverEffect: false
206
216
  });
207
217
  });
218
+ _defineProperty(_assertThisInitialized(_this), "updateItemScaling", function () {
219
+ var _this$state$items$;
220
+ var firstItemNode = (_this$state$items$ = _this.state.items[0]) === null || _this$state$items$ === void 0 ? void 0 : _this$state$items$.node;
221
+ if (!firstItemNode) return;
222
+ if (_this.state.reversedScaling) return;
223
+ var firstItemRect = firstItemNode.getBoundingClientRect();
224
+ var reversedScaling = false;
225
+ var parent = firstItemNode.parentElement;
226
+ while (parent && parent !== document.body) {
227
+ var computedStyle = getComputedStyle(parent);
228
+ var rect = parent.getBoundingClientRect();
229
+ if (computedStyle.overflow !== 'visible') {
230
+ if (rect.left >= firstItemRect.left || rect.right <= firstItemRect.right || rect.top >= firstItemRect.top || rect.bottom <= firstItemRect.bottom) {
231
+ reversedScaling = true;
232
+ break;
233
+ }
234
+ } else {
235
+ if (rect.left < firstItemRect.left && rect.right > firstItemRect.right && rect.top < firstItemRect.top && rect.bottom > firstItemRect.bottom) {
236
+ break;
237
+ }
238
+ }
239
+ parent = parent.parentElement;
240
+ }
241
+ if (_this.state.reversedScaling !== reversedScaling) {
242
+ _this.setState({
243
+ reversedScaling: reversedScaling
244
+ });
245
+ }
246
+ });
208
247
  _defineProperty(_assertThisInitialized(_this), "handleItemKeyDown", function (event, index) {
209
248
  if (event.key === ' ') {
249
+ var _this$state$items$ind;
210
250
  event.preventDefault();
211
251
  event.stopPropagation();
212
252
  if (_this.state.dragging) {
213
- var previewSwap = _this.state.previewSwap;
253
+ var dragOver = _this.state.dragOver;
254
+ var prevIndex = _this.state.dragging.index;
214
255
  _this.handleItemDrop(index);
215
256
  _this.setState({
216
257
  dragging: null,
217
- previewSwap: null,
258
+ dragOver: null,
259
+ keyboardDraggingIndex: null,
260
+ animatedScaling: index,
218
261
  hideHoverEffect: true
219
262
  });
220
- setTimeout(function () {
221
- var _this$state$items;
222
- (_this$state$items = _this.state.items[previewSwap]) === null || _this$state$items === void 0 ? void 0 : _this$state$items.node.focus();
223
- }, 0);
224
- } else {
263
+ requestAnimationFrame(function () {
264
+ var _this$state$items$pre2, _this$state$items;
265
+ var prevIndexNode = (_this$state$items$pre2 = _this.state.items[prevIndex]) === null || _this$state$items$pre2 === void 0 ? void 0 : _this$state$items$pre2.node;
266
+ if (prevIndexNode !== document.activeElement) return;
267
+ (_this$state$items = _this.state.items[dragOver]) === null || _this$state$items === void 0 ? void 0 : _this$state$items.node.focus();
268
+ });
269
+ } else if ((_this$state$items$ind = _this.state.items[index]) !== null && _this$state$items$ind !== void 0 && _this$state$items$ind.draggingAllowed) {
225
270
  _this.handleItemDragStart(index);
271
+ _this.setState({
272
+ keyboardDraggingIndex: index,
273
+ animatedScaling: index
274
+ });
275
+ _this.updateItemScaling();
226
276
  }
227
277
  return false;
228
278
  } else if (event.key === 'Escape' && _this.state.dragging) {
@@ -233,17 +283,49 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
233
283
  _this.setState({
234
284
  a11yHint: a11yHint,
235
285
  dragging: null,
236
- previewSwap: null,
286
+ dragOver: null,
287
+ keyboardDraggingIndex: null,
237
288
  hideHoverEffect: true
238
289
  });
239
290
  return false;
291
+ } else if (event.key.startsWith('Arrow')) {
292
+ if (_this.state.animatedScaling !== null) {
293
+ _this.setState({
294
+ animatedScaling: null
295
+ });
296
+ }
297
+ var item = _this.state.items[index];
298
+ if ((item === null || item === void 0 ? void 0 : item.node) !== document.activeElement) return;
299
+ event.preventDefault();
300
+ requestAnimationFrame(function () {
301
+ var _this$state$items$nex;
302
+ if ((item === null || item === void 0 ? void 0 : item.node) !== document.activeElement) return;
303
+ var rects = _this.state.items.map(function (item) {
304
+ return item === null || item === void 0 ? void 0 : item.node.getBoundingClientRect();
305
+ }).map(function (rect) {
306
+ return {
307
+ top: Math.round(rect.top),
308
+ right: Math.round(rect.right),
309
+ bottom: Math.round(rect.bottom),
310
+ left: Math.round(rect.left)
311
+ };
312
+ });
313
+ var nextIndex = findNextRectangleIndex(rects, rects[index], event.key);
314
+ if (nextIndex === -1) {
315
+ var indexDiff = event.key === 'ArrowUp' || event.key === 'ArrowLeft' ? -1 : 1;
316
+ nextIndex = index + indexDiff;
317
+ }
318
+ (_this$state$items$nex = _this.state.items[nextIndex]) === null || _this$state$items$nex === void 0 ? void 0 : _this$state$items$nex.node.focus();
319
+ });
240
320
  }
241
321
  });
242
322
  _defineProperty(_assertThisInitialized(_this), "handleItemFocus", function (index) {
243
323
  if (!_this.state.dragging) return;
244
324
  _this.setState({
245
- previewSwap: index
325
+ dragOver: index,
326
+ keyboardDraggingIndex: index
246
327
  });
328
+ _this.updateItemScaling();
247
329
  });
248
330
  _defineProperty(_assertThisInitialized(_this), "makeItemDragStartHandler", function (index) {
249
331
  return function () {
@@ -313,7 +395,7 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
313
395
  var itemIndex = customFocus;
314
396
  if (typeof itemIndex === 'string') {
315
397
  itemIndex = _this.state.items.findIndex(function (item) {
316
- return (item === null || item === void 0 ? void 0 : item.id) === itemIndex;
398
+ return (item === null || item === void 0 ? void 0 : item.id) === customFocus;
317
399
  });
318
400
  }
319
401
  if (itemIndex === -1 || typeof itemIndex !== 'number') return undefined;
@@ -322,6 +404,21 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
322
404
  return _this;
323
405
  }
324
406
  _createClass(DragAndDropRoot, [{
407
+ key: "preview",
408
+ get: function get() {
409
+ var _this$state$dragging2;
410
+ var dragging = (_this$state$dragging2 = this.state.dragging) === null || _this$state$dragging2 === void 0 ? void 0 : _this$state$dragging2.index;
411
+ var dragOver = this.state.dragOver;
412
+ if (typeof dragging !== 'number' || typeof dragOver !== 'number') return {};
413
+ var result = {};
414
+ var shift = dragging < dragOver ? 1 : -1;
415
+ for (var i = dragging; i !== dragOver; i += shift) {
416
+ result[i] = i + shift;
417
+ }
418
+ result[dragOver] = dragging;
419
+ return result;
420
+ }
421
+ }, {
325
422
  key: "getDraggableProps",
326
423
  value: function getDraggableProps(_, index) {
327
424
  return {
@@ -334,10 +431,13 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
334
431
  onMouseMove: this.handleItemMouseMove,
335
432
  onKeyDown: this.makeItemKeyDownHandler(index),
336
433
  onFocus: this.makeItemFocusHandler(index),
337
- dropPreview: index === this.state.previewSwap,
434
+ dropPreview: index === this.state.dragOver,
435
+ keyboardDragging: index === this.state.keyboardDraggingIndex,
436
+ reversedScaling: this.state.reversedScaling,
338
437
  dark: this.asProps.theme === 'dark',
339
438
  swapPreview: this.getSwapPreview(index),
340
- hideHoverEffect: this.state.hideHoverEffect
439
+ hideHoverEffect: this.state.hideHoverEffect,
440
+ animatedScaling: index === this.state.animatedScaling
341
441
  };
342
442
  }
343
443
  }, {
@@ -434,10 +534,61 @@ var Draggable = function Draggable(props) {
434
534
  return _ref5 = sstyled(styles), /*#__PURE__*/React.createElement(SDraggable, _ref5.cn("SDraggable", _objectSpread({}, _assignProps2({
435
535
  "ref": ref,
436
536
  "draggable": !noDrag,
437
- "tabIndex": 0,
438
537
  "placement": placement
439
538
  }, _ref2))), swapPreview ? swapPreview : /*#__PURE__*/React.createElement(Children, _ref5.cn("Children", {})));
440
539
  };
540
+ Draggable.enhance = [keyboardFocusEnhance()];
541
+ var findNextRectangleIndex = function findNextRectangleIndex(rectangles, current, direction) {
542
+ var candidate = null;
543
+ var minDistance = Infinity;
544
+ for (var i = 0; i < rectangles.length; i++) {
545
+ var rect = rectangles[i];
546
+ if (!rect) continue;
547
+ if (rect === current) continue;
548
+ var verticallyOverlaps = current.top <= rect.bottom && current.bottom >= rect.top;
549
+ var horizontallyOverlaps = current.left <= rect.right && current.right >= rect.left;
550
+ if (!verticallyOverlaps && !horizontallyOverlaps) continue;
551
+ switch (direction) {
552
+ case 'ArrowRight':
553
+ {
554
+ if (!verticallyOverlaps) continue;
555
+ var distance = rect.left - current.right;
556
+ if (distance < 0 || distance >= minDistance) continue;
557
+ candidate = rect;
558
+ minDistance = distance;
559
+ break;
560
+ }
561
+ case 'ArrowLeft':
562
+ {
563
+ if (!verticallyOverlaps) continue;
564
+ var _distance = current.left - rect.right;
565
+ if (_distance < 0 || _distance >= minDistance) continue;
566
+ candidate = rect;
567
+ minDistance = _distance;
568
+ break;
569
+ }
570
+ case 'ArrowUp':
571
+ {
572
+ if (!horizontallyOverlaps) continue;
573
+ var _distance2 = current.top - rect.bottom;
574
+ if (_distance2 < 0 || _distance2 >= minDistance) continue;
575
+ candidate = rect;
576
+ minDistance = _distance2;
577
+ break;
578
+ }
579
+ case 'ArrowDown':
580
+ {
581
+ if (!horizontallyOverlaps) continue;
582
+ var _distance3 = rect.top - current.bottom;
583
+ if (_distance3 < 0 || _distance3 >= minDistance) continue;
584
+ candidate = rect;
585
+ minDistance = _distance3;
586
+ break;
587
+ }
588
+ }
589
+ }
590
+ return rectangles.indexOf(candidate);
591
+ };
441
592
  var DropZone = function DropZone(props) {
442
593
  var _ref3 = arguments[0],
443
594
  _ref6;