@economic/taco 2.47.0-server.4 → 2.47.0-server.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (662) hide show
  1. package/dist/components/Icon/components/Autopay.d.ts +3 -0
  2. package/dist/components/Icon/components/AutopayPaused.d.ts +3 -0
  3. package/dist/components/Icon/components/Person.d.ts +3 -0
  4. package/dist/components/Icon/components/PersonSolid.d.ts +3 -0
  5. package/dist/components/Icon/components/Wallet.d.ts +3 -0
  6. package/dist/components/Icon/components/index.d.ts +1 -1
  7. package/dist/components/Input/Input.d.ts +1 -1
  8. package/dist/components/Menu/components/Item.d.ts +1 -1
  9. package/dist/components/Menu/components/Link.d.ts +1 -1
  10. package/dist/components/Navigation2/components/Link.d.ts +1 -1
  11. package/dist/components/Select2/components/Option.d.ts +2 -2
  12. package/dist/components/Select2/components/Search.d.ts +1 -1
  13. package/dist/components/Tag/Tag.d.ts +1 -1
  14. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +32 -0
  15. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  16. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js +32 -24
  17. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js.map +1 -1
  18. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js +84 -61
  19. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js.map +1 -1
  20. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js +16 -15
  21. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js.map +1 -1
  22. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js +12 -13
  23. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js.map +1 -1
  24. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js +104 -68
  25. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -1
  26. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js +38 -29
  27. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js.map +1 -1
  28. package/dist/esm/packages/taco/src/charts/components/Donut/util.js +2 -2
  29. package/dist/esm/packages/taco/src/charts/components/Donut/util.js.map +1 -1
  30. package/dist/esm/packages/taco/src/charts/components/Legend.js +45 -37
  31. package/dist/esm/packages/taco/src/charts/components/Legend.js.map +1 -1
  32. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js +32 -24
  33. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js.map +1 -1
  34. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js +5 -3
  35. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js.map +1 -1
  36. package/dist/esm/packages/taco/src/charts/components/Tooltip.js +26 -25
  37. package/dist/esm/packages/taco/src/charts/components/Tooltip.js.map +1 -1
  38. package/dist/esm/packages/taco/src/charts/utils/color.js +13 -12
  39. package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -1
  40. package/dist/esm/packages/taco/src/charts/utils/common.js +39 -26
  41. package/dist/esm/packages/taco/src/charts/utils/common.js.map +1 -1
  42. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +30 -31
  43. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  44. package/dist/esm/packages/taco/src/components/Alert/Alert.js +7 -9
  45. package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
  46. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js +14 -13
  47. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js.map +1 -1
  48. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js +2 -2
  49. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js.map +1 -1
  50. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js +10 -9
  51. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
  52. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js +4 -4
  53. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js.map +1 -1
  54. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js +5 -6
  55. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js.map +1 -1
  56. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +2 -2
  57. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
  58. package/dist/esm/packages/taco/src/components/Badge/Badge.js +21 -25
  59. package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
  60. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +12 -14
  61. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
  62. package/dist/esm/packages/taco/src/components/Banner/Banner.js +7 -10
  63. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  64. package/dist/esm/packages/taco/src/components/Banner/util.js +3 -3
  65. package/dist/esm/packages/taco/src/components/Banner/util.js.map +1 -1
  66. package/dist/esm/packages/taco/src/components/Button/Button.js +28 -29
  67. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  68. package/dist/esm/packages/taco/src/components/Button/util.js +25 -24
  69. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  70. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +75 -71
  71. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  72. package/dist/esm/packages/taco/src/components/Card/Card.js +14 -15
  73. package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
  74. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +24 -22
  75. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
  76. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +21 -23
  77. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  78. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +76 -64
  79. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  80. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +60 -57
  81. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  82. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +27 -28
  83. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  84. package/dist/esm/packages/taco/src/components/Dialog/Context.js +4 -4
  85. package/dist/esm/packages/taco/src/components/Dialog/Context.js.map +1 -1
  86. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js +54 -39
  87. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  88. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +36 -38
  89. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  90. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js +3 -3
  91. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  92. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js +2 -2
  93. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js.map +1 -1
  94. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js +5 -6
  95. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js.map +1 -1
  96. package/dist/esm/packages/taco/src/components/Dialog/util.js +7 -3
  97. package/dist/esm/packages/taco/src/components/Dialog/util.js.map +1 -1
  98. package/dist/esm/packages/taco/src/components/Drawer/Context.js +5 -5
  99. package/dist/esm/packages/taco/src/components/Drawer/Context.js.map +1 -1
  100. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +61 -51
  101. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
  102. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +134 -145
  103. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  104. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js +1 -1
  105. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js.map +1 -1
  106. package/dist/esm/packages/taco/src/components/Drawer/util.js +5 -5
  107. package/dist/esm/packages/taco/src/components/Drawer/util.js.map +1 -1
  108. package/dist/esm/packages/taco/src/components/Field/Field.js +14 -12
  109. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  110. package/dist/esm/packages/taco/src/components/Form/Form.js +7 -6
  111. package/dist/esm/packages/taco/src/components/Form/Form.js.map +1 -1
  112. package/dist/esm/packages/taco/src/components/Group/Group.js +9 -7
  113. package/dist/esm/packages/taco/src/components/Group/Group.js.map +1 -1
  114. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +37 -36
  115. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
  116. package/dist/esm/packages/taco/src/components/Header/Header.js +2 -2
  117. package/dist/esm/packages/taco/src/components/Header/Header.js.map +1 -1
  118. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js +14 -10
  119. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  120. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js +5 -4
  121. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js.map +1 -1
  122. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js +7 -9
  123. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js.map +1 -1
  124. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +9 -9
  125. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  126. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +66 -46
  127. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  128. package/dist/esm/packages/taco/src/components/Header/components/Button.js +12 -8
  129. package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
  130. package/dist/esm/packages/taco/src/components/Header/components/Link.js +22 -18
  131. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  132. package/dist/esm/packages/taco/src/components/Header/components/Logo.js +4 -4
  133. package/dist/esm/packages/taco/src/components/Header/components/Logo.js.map +1 -1
  134. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +2 -2
  135. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
  136. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js +10 -9
  137. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js.map +1 -1
  138. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js +2 -2
  139. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js.map +1 -1
  140. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js +5 -7
  141. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js.map +1 -1
  142. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js +1 -1
  143. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js.map +1 -1
  144. package/dist/esm/packages/taco/src/components/Icon/Icon.js +7 -7
  145. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  146. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js +19 -0
  147. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js.map +1 -0
  148. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js +19 -0
  149. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js.map +1 -0
  150. package/dist/esm/packages/taco/src/components/Icon/components/Person.js +19 -0
  151. package/dist/esm/packages/taco/src/components/Icon/components/Person.js.map +1 -0
  152. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js +19 -0
  153. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js.map +1 -0
  154. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js +19 -0
  155. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js.map +1 -0
  156. package/dist/esm/packages/taco/src/components/Icon/components/index.js +14 -4
  157. package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
  158. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js +22 -23
  159. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
  160. package/dist/esm/packages/taco/src/components/Input/Input.js +45 -44
  161. package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
  162. package/dist/esm/packages/taco/src/components/Input/util.js +8 -5
  163. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  164. package/dist/esm/packages/taco/src/components/Layout/Layout.js +7 -5
  165. package/dist/esm/packages/taco/src/components/Layout/Layout.js.map +1 -1
  166. package/dist/esm/packages/taco/src/components/Layout/components/Content.js +2 -2
  167. package/dist/esm/packages/taco/src/components/Layout/components/Content.js.map +1 -1
  168. package/dist/esm/packages/taco/src/components/Layout/components/Context.js +4 -2
  169. package/dist/esm/packages/taco/src/components/Layout/components/Context.js.map +1 -1
  170. package/dist/esm/packages/taco/src/components/Layout/components/Page.js +2 -2
  171. package/dist/esm/packages/taco/src/components/Layout/components/Page.js.map +1 -1
  172. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +34 -27
  173. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  174. package/dist/esm/packages/taco/src/components/Layout/components/Top.js +9 -6
  175. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  176. package/dist/esm/packages/taco/src/components/List/components/Button.js +1 -1
  177. package/dist/esm/packages/taco/src/components/List/components/Button.js.map +1 -1
  178. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js +10 -7
  179. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js.map +1 -1
  180. package/dist/esm/packages/taco/src/components/List/components/Group.js +1 -1
  181. package/dist/esm/packages/taco/src/components/List/components/Group.js.map +1 -1
  182. package/dist/esm/packages/taco/src/components/List/components/Item.js +15 -13
  183. package/dist/esm/packages/taco/src/components/List/components/Item.js.map +1 -1
  184. package/dist/esm/packages/taco/src/components/List/components/Link.js +3 -3
  185. package/dist/esm/packages/taco/src/components/List/components/Link.js.map +1 -1
  186. package/dist/esm/packages/taco/src/components/List/components/Toggle.js +29 -27
  187. package/dist/esm/packages/taco/src/components/List/components/Toggle.js.map +1 -1
  188. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js +21 -26
  189. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js.map +1 -1
  190. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +82 -70
  191. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  192. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js +56 -51
  193. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js.map +1 -1
  194. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js +83 -65
  195. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js.map +1 -1
  196. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js +9 -10
  197. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js.map +1 -1
  198. package/dist/esm/packages/taco/src/components/Listbox/util.js +78 -48
  199. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  200. package/dist/esm/packages/taco/src/components/Menu/Context.js +2 -2
  201. package/dist/esm/packages/taco/src/components/Menu/Context.js.map +1 -1
  202. package/dist/esm/packages/taco/src/components/Menu/Menu.js +42 -26
  203. package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
  204. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js +8 -8
  205. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js.map +1 -1
  206. package/dist/esm/packages/taco/src/components/Menu/components/Content.js +27 -21
  207. package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
  208. package/dist/esm/packages/taco/src/components/Menu/components/Header.js +3 -3
  209. package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
  210. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +32 -32
  211. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  212. package/dist/esm/packages/taco/src/components/Menu/components/Link.js +10 -10
  213. package/dist/esm/packages/taco/src/components/Menu/components/Link.js.map +1 -1
  214. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js +15 -16
  215. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js.map +1 -1
  216. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js +1 -1
  217. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js.map +1 -1
  218. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js +7 -7
  219. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js.map +1 -1
  220. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +5 -5
  221. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
  222. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +6 -6
  223. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
  224. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +41 -36
  225. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  226. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js +6 -6
  227. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js.map +1 -1
  228. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js +6 -6
  229. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js.map +1 -1
  230. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +14 -11
  231. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
  232. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +31 -24
  233. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  234. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +7 -7
  235. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  236. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js +9 -7
  237. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js.map +1 -1
  238. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +48 -51
  239. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  240. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +26 -23
  241. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
  242. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +53 -39
  243. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  244. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js +17 -7
  245. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js.map +1 -1
  246. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js +8 -9
  247. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js.map +1 -1
  248. package/dist/esm/packages/taco/src/components/Popover/Popover.js +45 -43
  249. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  250. package/dist/esm/packages/taco/src/components/Popover/Primitives.js +1 -1
  251. package/dist/esm/packages/taco/src/components/Popover/Primitives.js.map +1 -1
  252. package/dist/esm/packages/taco/src/components/Popover/util.js +3 -1
  253. package/dist/esm/packages/taco/src/components/Popover/util.js.map +1 -1
  254. package/dist/esm/packages/taco/src/components/Progress/Progress.js +13 -11
  255. package/dist/esm/packages/taco/src/components/Progress/Progress.js.map +1 -1
  256. package/dist/esm/packages/taco/src/components/Provider/Localization.js +13 -12
  257. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  258. package/dist/esm/packages/taco/src/components/Provider/Provider.js +8 -8
  259. package/dist/esm/packages/taco/src/components/Provider/Provider.js.map +1 -1
  260. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +54 -47
  261. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  262. package/dist/esm/packages/taco/src/components/RadioGroup/util.js +7 -1
  263. package/dist/esm/packages/taco/src/components/RadioGroup/util.js.map +1 -1
  264. package/dist/esm/packages/taco/src/components/Report/Report.js +7 -5
  265. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  266. package/dist/esm/packages/taco/src/components/Report/useReport.js +1 -1
  267. package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
  268. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +17 -13
  269. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  270. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +11 -11
  271. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
  272. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +44 -39
  273. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  274. package/dist/esm/packages/taco/src/components/Select/Select.js +28 -31
  275. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  276. package/dist/esm/packages/taco/src/components/Select/useSelect.js +79 -70
  277. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  278. package/dist/esm/packages/taco/src/components/Select2/Select2.js +154 -121
  279. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  280. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js +2 -4
  281. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js.map +1 -1
  282. package/dist/esm/packages/taco/src/components/Select2/components/Context.js +4 -2
  283. package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
  284. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +45 -41
  285. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  286. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +145 -129
  287. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  288. package/dist/esm/packages/taco/src/components/Select2/components/Group.js +8 -8
  289. package/dist/esm/packages/taco/src/components/Select2/components/Group.js.map +1 -1
  290. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +29 -30
  291. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  292. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +9 -10
  293. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  294. package/dist/esm/packages/taco/src/components/Select2/components/Title.js +2 -2
  295. package/dist/esm/packages/taco/src/components/Select2/components/Title.js.map +1 -1
  296. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +136 -128
  297. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  298. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +32 -23
  299. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  300. package/dist/esm/packages/taco/src/components/Select2/utilities.js +13 -6
  301. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  302. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +16 -13
  303. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  304. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js +17 -12
  305. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js.map +1 -1
  306. package/dist/esm/packages/taco/src/components/Switch/Switch.js +14 -14
  307. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  308. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +28 -23
  309. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  310. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js +7 -3
  311. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js.map +1 -1
  312. package/dist/esm/packages/taco/src/components/Table/components/Table.js +22 -18
  313. package/dist/esm/packages/taco/src/components/Table/components/Table.js.map +1 -1
  314. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +100 -92
  315. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  316. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +136 -118
  317. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  318. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js +55 -55
  319. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  320. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js +35 -41
  321. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  322. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js +77 -71
  323. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  324. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js +56 -30
  325. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js.map +1 -1
  326. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js +151 -142
  327. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js.map +1 -1
  328. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js +22 -20
  329. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  330. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +9 -12
  331. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  332. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +41 -41
  333. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js.map +1 -1
  334. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js +16 -14
  335. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js.map +1 -1
  336. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js +32 -26
  337. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js.map +1 -1
  338. package/dist/esm/packages/taco/src/components/Table/util.js +37 -30
  339. package/dist/esm/packages/taco/src/components/Table/util.js.map +1 -1
  340. package/dist/esm/packages/taco/src/components/Table3/Table3.js +12 -10
  341. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  342. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js +13 -14
  343. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js.map +1 -1
  344. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +21 -23
  345. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  346. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js +20 -17
  347. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -1
  348. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +67 -73
  349. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  350. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js +2 -2
  351. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -1
  352. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +19 -20
  353. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -1
  354. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +26 -25
  355. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  356. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +45 -40
  357. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  358. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +7 -8
  359. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
  360. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +18 -19
  361. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
  362. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +7 -10
  363. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  364. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +38 -36
  365. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  366. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +15 -15
  367. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  368. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +8 -11
  369. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
  370. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +164 -201
  371. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -1
  372. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +40 -27
  373. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  374. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +18 -16
  375. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  376. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +25 -19
  377. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  378. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +29 -35
  379. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  380. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +34 -35
  381. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
  382. package/dist/esm/packages/taco/src/components/Tag/Tag.js +12 -12
  383. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  384. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js +8 -11
  385. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js.map +1 -1
  386. package/dist/esm/packages/taco/src/components/Toast/Toast.js +19 -20
  387. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  388. package/dist/esm/packages/taco/src/components/Toast/Toaster.js +117 -96
  389. package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
  390. package/dist/esm/packages/taco/src/components/Toast/util.js +6 -4
  391. package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
  392. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +10 -9
  393. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
  394. package/dist/esm/packages/taco/src/components/Tour/Tour.js +49 -46
  395. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  396. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +33 -27
  397. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  398. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js +15 -13
  399. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js.map +1 -1
  400. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js +1 -1
  401. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  402. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js +11 -6
  403. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js.map +1 -1
  404. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js +19 -13
  405. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js.map +1 -1
  406. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js +4 -4
  407. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
  408. package/dist/esm/packages/taco/src/hooks/useId.js +4 -2
  409. package/dist/esm/packages/taco/src/hooks/useId.js.map +1 -1
  410. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js +20 -18
  411. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
  412. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js +7 -5
  413. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js.map +1 -1
  414. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js +9 -5
  415. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js.map +1 -1
  416. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js +3 -1
  417. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js.map +1 -1
  418. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js +2 -2
  419. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js.map +1 -1
  420. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js +24 -22
  421. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js.map +1 -1
  422. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js +13 -6
  423. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js.map +1 -1
  424. package/dist/esm/packages/taco/src/hooks/useMergedRef.js +3 -3
  425. package/dist/esm/packages/taco/src/hooks/useMergedRef.js.map +1 -1
  426. package/dist/esm/packages/taco/src/hooks/usePrevious.js +2 -2
  427. package/dist/esm/packages/taco/src/hooks/usePrevious.js.map +1 -1
  428. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js +14 -14
  429. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js.map +1 -1
  430. package/dist/esm/packages/taco/src/primitives/Button.js +16 -13
  431. package/dist/esm/packages/taco/src/primitives/Button.js.map +1 -1
  432. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +50 -44
  433. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
  434. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js +4 -2
  435. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js.map +1 -1
  436. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js +9 -5
  437. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js.map +1 -1
  438. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js +16 -18
  439. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
  440. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +47 -40
  441. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
  442. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js +9 -10
  443. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js.map +1 -1
  444. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +22 -20
  445. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  446. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js +24 -27
  447. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  448. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js +11 -10
  449. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js.map +1 -1
  450. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +22 -19
  451. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  452. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js +25 -22
  453. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -1
  454. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js +6 -6
  455. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -1
  456. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +30 -14
  457. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  458. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js +18 -19
  459. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js.map +1 -1
  460. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +34 -34
  461. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
  462. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js +10 -12
  463. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js.map +1 -1
  464. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js +19 -18
  465. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -1
  466. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +42 -40
  467. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  468. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +5 -7
  469. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
  470. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +19 -24
  471. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  472. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +56 -55
  473. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
  474. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +27 -23
  475. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  476. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js +13 -16
  477. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js.map +1 -1
  478. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +86 -87
  479. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  480. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js +14 -11
  481. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  482. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +85 -58
  483. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  484. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js +18 -20
  485. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  486. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js +3 -3
  487. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  488. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js +11 -6
  489. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
  490. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +58 -49
  491. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  492. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js +28 -32
  493. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -1
  494. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js +34 -29
  495. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
  496. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js +1 -1
  497. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -1
  498. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js +11 -11
  499. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -1
  500. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js +1 -1
  501. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -1
  502. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js +23 -22
  503. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  504. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +54 -39
  505. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  506. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +39 -37
  507. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
  508. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +20 -16
  509. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
  510. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js +16 -15
  511. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -1
  512. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +50 -41
  513. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  514. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js +13 -9
  515. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js.map +1 -1
  516. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js +57 -51
  517. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  518. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +71 -67
  519. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -1
  520. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js +40 -37
  521. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -1
  522. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js +64 -44
  523. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  524. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js +62 -51
  525. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  526. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js +6 -6
  527. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -1
  528. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js +13 -5
  529. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js.map +1 -1
  530. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +93 -77
  531. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  532. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js +15 -15
  533. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js.map +1 -1
  534. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js +31 -41
  535. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js.map +1 -1
  536. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js +31 -30
  537. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js.map +1 -1
  538. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js +3 -3
  539. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -1
  540. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +14 -15
  541. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
  542. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js +2 -2
  543. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js.map +1 -1
  544. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +42 -36
  545. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  546. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js +67 -74
  547. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
  548. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js +11 -6
  549. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js.map +1 -1
  550. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js +5 -2
  551. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js.map +1 -1
  552. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js +15 -5
  553. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js.map +1 -1
  554. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js +5 -2
  555. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js.map +1 -1
  556. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js +26 -16
  557. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js.map +1 -1
  558. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js +9 -3
  559. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js.map +1 -1
  560. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js +42 -23
  561. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
  562. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js +9 -6
  563. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js.map +1 -1
  564. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js +9 -4
  565. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js.map +1 -1
  566. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js +5 -2
  567. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js.map +1 -1
  568. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js +9 -3
  569. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js.map +1 -1
  570. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js +5 -2
  571. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js.map +1 -1
  572. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js +1 -1
  573. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js.map +1 -1
  574. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js +15 -5
  575. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js.map +1 -1
  576. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js +14 -9
  577. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js.map +1 -1
  578. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +25 -13
  579. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
  580. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js +43 -24
  581. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js.map +1 -1
  582. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js +34 -24
  583. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  584. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js +4 -4
  585. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js.map +1 -1
  586. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js +3 -3
  587. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js.map +1 -1
  588. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js +18 -16
  589. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js.map +1 -1
  590. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js +2 -2
  591. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js.map +1 -1
  592. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js +6 -4
  593. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js.map +1 -1
  594. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js +8 -8
  595. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js.map +1 -1
  596. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js +6 -6
  597. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js.map +1 -1
  598. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js +8 -6
  599. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  600. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js +17 -17
  601. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  602. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js +2 -2
  603. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js.map +1 -1
  604. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +55 -55
  605. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  606. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js +59 -30
  607. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js.map +1 -1
  608. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js +4 -4
  609. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js.map +1 -1
  610. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js +33 -19
  611. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js.map +1 -1
  612. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +11 -11
  613. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
  614. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js +21 -19
  615. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  616. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js +6 -7
  617. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  618. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +138 -106
  619. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  620. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js +3 -1
  621. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  622. package/dist/esm/packages/taco/src/types.js +1 -1
  623. package/dist/esm/packages/taco/src/types.js.map +1 -1
  624. package/dist/esm/packages/taco/src/utils/aria.js +2 -2
  625. package/dist/esm/packages/taco/src/utils/aria.js.map +1 -1
  626. package/dist/esm/packages/taco/src/utils/date.js +47 -23
  627. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  628. package/dist/esm/packages/taco/src/utils/debounce.js +10 -4
  629. package/dist/esm/packages/taco/src/utils/debounce.js.map +1 -1
  630. package/dist/esm/packages/taco/src/utils/device.js +4 -2
  631. package/dist/esm/packages/taco/src/utils/device.js.map +1 -1
  632. package/dist/esm/packages/taco/src/utils/dom.js +26 -20
  633. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  634. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js +40 -38
  635. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js.map +1 -1
  636. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js +9 -7
  637. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js.map +1 -1
  638. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js +20 -9
  639. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  640. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js +9 -9
  641. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js.map +1 -1
  642. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js +8 -6
  643. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js.map +1 -1
  644. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js +16 -11
  645. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js.map +1 -1
  646. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js +11 -6
  647. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js.map +1 -1
  648. package/dist/esm/packages/taco/src/utils/input.js +10 -7
  649. package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
  650. package/dist/esm/packages/taco/src/utils/keyboard.js +8 -5
  651. package/dist/esm/packages/taco/src/utils/keyboard.js.map +1 -1
  652. package/dist/esm/packages/taco/src/utils/mergeRefs.js +2 -2
  653. package/dist/esm/packages/taco/src/utils/mergeRefs.js.map +1 -1
  654. package/dist/esm/packages/taco/src/utils/tailwind.js +5 -5
  655. package/dist/esm/packages/taco/src/utils/tailwind.js.map +1 -1
  656. package/dist/esm/packages/taco/tailwind.colors.js +1 -1
  657. package/dist/esm/packages/taco/tailwind.colors.js.map +1 -1
  658. package/dist/taco.cjs.development.js +7857 -6877
  659. package/dist/taco.cjs.development.js.map +1 -1
  660. package/dist/taco.cjs.production.min.js +1 -1
  661. package/dist/taco.cjs.production.min.js.map +1 -1
  662. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  import { isDate, isValid } from 'date-fns';
2
2
 
3
- const isWeakEqual = (leftDate, rightDate) => {
3
+ var isWeakEqual = function isWeakEqual(leftDate, rightDate) {
4
4
  return leftDate.getFullYear() === rightDate.getFullYear() && leftDate.getMonth() === rightDate.getMonth() && leftDate.getDate() === rightDate.getDate();
5
5
  };
6
6
  function parse(date) {
7
- let value;
7
+ var value;
8
8
  if (isDate(date)) {
9
9
  value = date;
10
10
  } else if (typeof date === 'string') {
@@ -15,39 +15,63 @@ function parse(date) {
15
15
  }
16
16
  return value;
17
17
  }
18
- function format(date, mask = 'dd.mm.yy') {
18
+ function format(date, mask) {
19
+ if (mask === void 0) {
20
+ mask = 'dd.mm.yy';
21
+ }
19
22
  if (date === undefined) {
20
23
  return undefined;
21
24
  }
22
- const value = parse(date);
25
+ var value = parse(date);
23
26
  if (!isValid(value) || value === undefined) {
24
27
  return undefined;
25
28
  }
26
- const pad = v => String(v).length === 1 ? `0${v}` : v.toString();
29
+ var pad = function pad(v) {
30
+ return String(v).length === 1 ? "0" + v : v.toString();
31
+ };
27
32
  return mask.replace('dd', pad(value.getDate())).replace('mm', pad(value.getMonth() + 1)).replace('yy', String(value.getFullYear()).slice(2));
28
33
  }
29
- const parseFromCustomString = (date = '', mask = 'dd.mm.yy', defaultMonth = undefined, defaultYear = undefined) => {
34
+ var parseFromCustomString = function parseFromCustomString(date, mask, defaultMonth, defaultYear) {
35
+ var _defaultYear, _defaultMonth;
36
+ if (date === void 0) {
37
+ date = '';
38
+ }
39
+ if (mask === void 0) {
40
+ mask = 'dd.mm.yy';
41
+ }
42
+ if (defaultMonth === void 0) {
43
+ defaultMonth = undefined;
44
+ }
45
+ if (defaultYear === void 0) {
46
+ defaultYear = undefined;
47
+ }
30
48
  if (!date || !date.length) {
31
49
  return undefined;
32
50
  }
33
- const sanitizedMask = mask.split(/[^dmy]/);
34
- const dd = sanitizedMask.findIndex(x => x === 'dd');
35
- const mm = sanitizedMask.findIndex(x => x === 'mm');
36
- const yy = sanitizedMask.findIndex(x => x === 'yy' || x === 'yyyy');
37
- let day;
38
- let month;
39
- let year;
40
- const getFullYear = y => {
51
+ var sanitizedMask = mask.split(/[^dmy]/);
52
+ var dd = sanitizedMask.findIndex(function (x) {
53
+ return x === 'dd';
54
+ });
55
+ var mm = sanitizedMask.findIndex(function (x) {
56
+ return x === 'mm';
57
+ });
58
+ var yy = sanitizedMask.findIndex(function (x) {
59
+ return x === 'yy' || x === 'yyyy';
60
+ });
61
+ var day;
62
+ var month;
63
+ var year;
64
+ var getFullYear = function getFullYear(y) {
41
65
  if (y && y.length === 2) {
42
- const z = Number.parseInt(y, 10);
43
- return z > 50 ? `19${y}` : `20${y}`;
66
+ var z = Number.parseInt(y, 10);
67
+ return z > 50 ? "19" + y : "20" + y;
44
68
  }
45
69
  return y;
46
70
  };
47
- const inputParts = date.split(/\D/);
71
+ var inputParts = date.split(/\D/);
48
72
  if (inputParts.length === 1) {
49
- const fullDate = inputParts[0];
50
- const unseparatedMask = mask.replace(/[^dmy]/g, '');
73
+ var fullDate = inputParts[0];
74
+ var unseparatedMask = mask.replace(/[^dmy]/g, '');
51
75
  day = fullDate.slice(unseparatedMask.indexOf('d'), unseparatedMask.lastIndexOf('d') + 1);
52
76
  month = fullDate.slice(unseparatedMask.indexOf('m'), unseparatedMask.lastIndexOf('m') + 1);
53
77
  year = getFullYear(fullDate.slice(unseparatedMask.indexOf('y'), unseparatedMask.lastIndexOf('y') + 3)); // account for full years
@@ -59,15 +83,15 @@ const parseFromCustomString = (date = '', mask = 'dd.mm.yy', defaultMonth = unde
59
83
  day = Number.parseInt(day, 10);
60
84
  month = Number.parseInt(month, 10);
61
85
  year = Number.parseInt(year, 10);
62
- const currentDate = new Date();
63
- return new Date(/* year */Object.is(year, NaN) ? defaultYear !== null && defaultYear !== void 0 ? defaultYear : currentDate.getFullYear() : year, /* month */Object.is(month, NaN) ? defaultMonth !== null && defaultMonth !== void 0 ? defaultMonth : currentDate.getMonth() : month - 1,
86
+ var currentDate = new Date();
87
+ return new Date(/* year */Object.is(year, NaN) ? (_defaultYear = defaultYear) !== null && _defaultYear !== void 0 ? _defaultYear : currentDate.getFullYear() : year, /* month */Object.is(month, NaN) ? (_defaultMonth = defaultMonth) !== null && _defaultMonth !== void 0 ? _defaultMonth : currentDate.getMonth() : month - 1,
64
88
  // months are zero based in javascript, so subtract a day
65
89
  /* day */
66
90
  Object.is(day, NaN) ? currentDate.getDate() : day, /* hours */12, /* minutes */0 // set to midday to avoid UTC offset causing dates to be mismatched server side
67
91
  );
68
92
  };
69
- const parseFromISOString = date => {
70
- const tempDate = new Date(date);
93
+ var parseFromISOString = function parseFromISOString(date) {
94
+ var tempDate = new Date(date);
71
95
  return isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;
72
96
  };
73
97
 
@@ -1 +1 @@
1
- {"version":3,"file":"date.js","sources":["../../../../../../src/utils/date.ts"],"sourcesContent":["import { isDate, isValid } from 'date-fns';\n\nexport const isWeakEqual = (leftDate: Date, rightDate: Date) => {\n return (\n leftDate.getFullYear() === rightDate.getFullYear() &&\n leftDate.getMonth() === rightDate.getMonth() &&\n leftDate.getDate() === rightDate.getDate()\n );\n};\n\nexport function parse(date: string | Date | undefined) {\n let value: Date | undefined;\n\n if (isDate(date)) {\n value = date as Date;\n } else if (typeof date === 'string') {\n value = parseFromISOString(date as string);\n }\n\n if (!isValid(value)) {\n return undefined;\n }\n\n return value;\n}\n\nexport function format(date: string | Date | undefined, mask = 'dd.mm.yy'): string | undefined {\n if (date === undefined) {\n return undefined;\n }\n\n const value = parse(date);\n\n if (!isValid(value) || value === undefined) {\n return undefined;\n }\n\n const pad = (v: number): string => (String(v).length === 1 ? `0${v}` : v.toString());\n\n return mask\n .replace('dd', pad(value.getDate()))\n .replace('mm', pad(value.getMonth() + 1))\n .replace('yy', String(value.getFullYear()).slice(2));\n}\n\nexport const parseFromCustomString = (\n date = '',\n mask = 'dd.mm.yy',\n defaultMonth: number | undefined = undefined,\n defaultYear: number | undefined = undefined\n): Date | undefined => {\n if (!date || !date.length) {\n return undefined;\n }\n\n const sanitizedMask = mask.split(/[^dmy]/);\n const dd = sanitizedMask.findIndex(x => x === 'dd');\n const mm = sanitizedMask.findIndex(x => x === 'mm');\n const yy = sanitizedMask.findIndex(x => x === 'yy' || x === 'yyyy');\n\n let day;\n let month;\n let year;\n\n const getFullYear = (y: string): string => {\n if (y && y.length === 2) {\n const z = Number.parseInt(y, 10);\n\n return z > 50 ? `19${y}` : `20${y}`;\n }\n\n return y;\n };\n\n const inputParts = date.split(/\\D/);\n\n if (inputParts.length === 1) {\n const fullDate = inputParts[0];\n const unseparatedMask = mask.replace(/[^dmy]/g, '');\n\n day = fullDate.slice(unseparatedMask.indexOf('d'), unseparatedMask.lastIndexOf('d') + 1);\n month = fullDate.slice(unseparatedMask.indexOf('m'), unseparatedMask.lastIndexOf('m') + 1);\n year = getFullYear(fullDate.slice(unseparatedMask.indexOf('y'), unseparatedMask.lastIndexOf('y') + 3)); // account for full years\n } else {\n day = inputParts[dd];\n month = inputParts[mm];\n year = getFullYear(inputParts[yy]);\n }\n\n day = Number.parseInt(day, 10);\n month = Number.parseInt(month, 10);\n year = Number.parseInt(year, 10);\n\n const currentDate = new Date();\n\n return new Date(\n /* year */ Object.is(year, NaN) ? defaultYear ?? currentDate.getFullYear() : year,\n /* month */ Object.is(month, NaN) ? defaultMonth ?? currentDate.getMonth() : month - 1, // months are zero based in javascript, so subtract a day\n /* day */ Object.is(day, NaN) ? currentDate.getDate() : day,\n /* hours */ 12,\n /* minutes */ 0 // set to midday to avoid UTC offset causing dates to be mismatched server side\n );\n};\n\nexport const parseFromISOString = (date: string): Date | undefined => {\n const tempDate = new Date(date);\n return isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;\n};\n"],"names":["isWeakEqual","leftDate","rightDate","getFullYear","getMonth","getDate","parse","date","value","isDate","parseFromISOString","isValid","undefined","format","mask","pad","v","String","length","toString","replace","slice","parseFromCustomString","defaultMonth","defaultYear","sanitizedMask","split","dd","findIndex","x","mm","yy","day","month","year","y","z","Number","parseInt","inputParts","fullDate","unseparatedMask","indexOf","lastIndexOf","currentDate","Date","Object","is","NaN","tempDate"],"mappings":";;MAEaA,WAAW,GAAGA,CAACC,QAAc,EAAEC,SAAe;EACvD,OACID,QAAQ,CAACE,WAAW,EAAE,KAAKD,SAAS,CAACC,WAAW,EAAE,IAClDF,QAAQ,CAACG,QAAQ,EAAE,KAAKF,SAAS,CAACE,QAAQ,EAAE,IAC5CH,QAAQ,CAACI,OAAO,EAAE,KAAKH,SAAS,CAACG,OAAO,EAAE;AAElD;SAEgBC,KAAKA,CAACC,IAA+B;EACjD,IAAIC,KAAuB;EAE3B,IAAIC,MAAM,CAACF,IAAI,CAAC,EAAE;IACdC,KAAK,GAAGD,IAAY;GACvB,MAAM,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IACjCC,KAAK,GAAGE,kBAAkB,CAACH,IAAc,CAAC;;EAG9C,IAAI,CAACI,OAAO,CAACH,KAAK,CAAC,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CAACT,EAAE,CAAC;IACtBI,IAAI,GAAG/B,WAAW,CAACoC,UAAU,CAACR,EAAE,CAAC,CAAC;;EAGtCC,GAAG,GAAGK,MAAM,CAACC,QAAQ,CAACN,GAAG,EAAE,EAAE,CAAC;EAC9BC,KAAK,GAAGI,MAAM,CAACC,QAAQ,CAACL,KAAK,EAAE,EAAE,CAAC;EAClCC,IAAI,GAAGG,MAAM,CAACC,QAAQ,CAACJ,IAAI,EAAE,EAAE,CAAC;EAEhC,MAAMU,WAAW,GAAG,IAAIC,IAAI,EAAE;EAE9B,OAAO,IAAIA,IAAI,WACAC,MAAM,CAACC,EAAE,CAACb,IAAI,EAAEc,GAAG,CAAC,GAAGxB,WAAW,aAAXA,WAAW,cAAXA,WAAW,GAAIoB,WAAW,CAACzC,WAAW,EAAE,GAAG+B,IAAI,aACrEY,MAAM,CAACC,EAAE,CAACd,KAAK,EAAEe,GAAG,CAAC,GAAGzB,YAAY,aAAZA,YAAY,cAAZA,YAAY,GAAIqB,WAAW,CAACxC,QAAQ,EAAE,GAAG6B,KAAK,GAAG,CAAC;;;EAC5Ea,MAAM,CAACC,EAAE,CAACf,GAAG,EAAEgB,GAAG,CAAC,GAAGJ,WAAW,CAACvC,OAAO,EAAE,GAAG2B,GAAG,aAC/C,EAAE,eACA,CAAC;GAClB;AACL;MAEatB,kBAAkB,GAAIH,IAAY;EAC3C,MAAM0C,QAAQ,GAAG,IAAIJ,IAAI,CAACtC,IAAI,CAAC;EAC/B,OAAOI,OAAO,CAACsC,QAAQ,CAAC,GAAG3B,qBAAqB,CAACT,MAAM,CAAC,IAAIgC,IAAI,CAACtC,IAAI,CAAC,CAAC,CAAC,GAAGK,SAAS;AACxF;;;;"}
1
+ {"version":3,"file":"date.js","sources":["../../../../../../src/utils/date.ts"],"sourcesContent":["import { isDate, isValid } from 'date-fns';\n\nexport const isWeakEqual = (leftDate: Date, rightDate: Date) => {\n return (\n leftDate.getFullYear() === rightDate.getFullYear() &&\n leftDate.getMonth() === rightDate.getMonth() &&\n leftDate.getDate() === rightDate.getDate()\n );\n};\n\nexport function parse(date: string | Date | undefined) {\n let value: Date | undefined;\n\n if (isDate(date)) {\n value = date as Date;\n } else if (typeof date === 'string') {\n value = parseFromISOString(date as string);\n }\n\n if (!isValid(value)) {\n return undefined;\n }\n\n return value;\n}\n\nexport function format(date: string | Date | undefined, mask = 'dd.mm.yy'): string | undefined {\n if (date === undefined) {\n return undefined;\n }\n\n const value = parse(date);\n\n if (!isValid(value) || value === undefined) {\n return undefined;\n }\n\n const pad = (v: number): string => (String(v).length === 1 ? `0${v}` : v.toString());\n\n return mask\n .replace('dd', pad(value.getDate()))\n .replace('mm', pad(value.getMonth() + 1))\n .replace('yy', String(value.getFullYear()).slice(2));\n}\n\nexport const parseFromCustomString = (\n date = '',\n mask = 'dd.mm.yy',\n defaultMonth: number | undefined = undefined,\n defaultYear: number | undefined = undefined\n): Date | undefined => {\n if (!date || !date.length) {\n return undefined;\n }\n\n const sanitizedMask = mask.split(/[^dmy]/);\n const dd = sanitizedMask.findIndex(x => x === 'dd');\n const mm = sanitizedMask.findIndex(x => x === 'mm');\n const yy = sanitizedMask.findIndex(x => x === 'yy' || x === 'yyyy');\n\n let day;\n let month;\n let year;\n\n const getFullYear = (y: string): string => {\n if (y && y.length === 2) {\n const z = Number.parseInt(y, 10);\n\n return z > 50 ? `19${y}` : `20${y}`;\n }\n\n return y;\n };\n\n const inputParts = date.split(/\\D/);\n\n if (inputParts.length === 1) {\n const fullDate = inputParts[0];\n const unseparatedMask = mask.replace(/[^dmy]/g, '');\n\n day = fullDate.slice(unseparatedMask.indexOf('d'), unseparatedMask.lastIndexOf('d') + 1);\n month = fullDate.slice(unseparatedMask.indexOf('m'), unseparatedMask.lastIndexOf('m') + 1);\n year = getFullYear(fullDate.slice(unseparatedMask.indexOf('y'), unseparatedMask.lastIndexOf('y') + 3)); // account for full years\n } else {\n day = inputParts[dd];\n month = inputParts[mm];\n year = getFullYear(inputParts[yy]);\n }\n\n day = Number.parseInt(day, 10);\n month = Number.parseInt(month, 10);\n year = Number.parseInt(year, 10);\n\n const currentDate = new Date();\n\n return new Date(\n /* year */ Object.is(year, NaN) ? defaultYear ?? currentDate.getFullYear() : year,\n /* month */ Object.is(month, NaN) ? defaultMonth ?? currentDate.getMonth() : month - 1, // months are zero based in javascript, so subtract a day\n /* day */ Object.is(day, NaN) ? currentDate.getDate() : day,\n /* hours */ 12,\n /* minutes */ 0 // set to midday to avoid UTC offset causing dates to be mismatched server side\n );\n};\n\nexport const parseFromISOString = (date: string): Date | undefined => {\n const tempDate = new Date(date);\n return isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;\n};\n"],"names":["isWeakEqual","leftDate","rightDate","getFullYear","getMonth","getDate","parse","date","value","isDate","parseFromISOString","isValid","undefined","format","mask","pad","v","String","length","toString","replace","slice","parseFromCustomString","defaultMonth","defaultYear","sanitizedMask","split","dd","findIndex","x","mm","yy","day","month","year","y","z","Number","parseInt","inputParts","fullDate","unseparatedMask","indexOf","lastIndexOf","currentDate","Date","Object","is","NaN","_defaultYear","_defaultMonth","tempDate"],"mappings":";;IAEaA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,QAAc,EAAEC,SAAe;EACvD,OACID,QAAQ,CAACE,WAAW,EAAE,KAAKD,SAAS,CAACC,WAAW,EAAE,IAClDF,QAAQ,CAACG,QAAQ,EAAE,KAAKF,SAAS,CAACE,QAAQ,EAAE,IAC5CH,QAAQ,CAACI,OAAO,EAAE,KAAKH,SAAS,CAACG,OAAO,EAAE;AAElD;SAEgBC,KAAKA,CAACC,IAA+B;EACjD,IAAIC,KAAuB;EAE3B,IAAIC,MAAM,CAACF,IAAI,CAAC,EAAE;IACdC,KAAK,GAAGD,IAAY;GACvB,MAAM,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IACjCC,KAAK,GAAGE,kBAAkB,CAACH,IAAc,CAAC;;EAG9C,IAAI,CAACI,OAAO,CAACH,KAAK,CAAC,EAAE;IACjB,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gC,IAAI,CAACtC,IAAI,CAAC,CAAC,CAAC,GAAGK,SAAS;AACxF;;;;"}
@@ -1,8 +1,14 @@
1
- const debounce = (fn, delay) => {
2
- let timeoutId;
3
- return function (...args) {
1
+ var debounce = function debounce(fn, delay) {
2
+ var timeoutId;
3
+ return function () {
4
+ var _this = this;
5
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6
+ args[_key] = arguments[_key];
7
+ }
4
8
  clearTimeout(timeoutId);
5
- timeoutId = setTimeout(() => fn.apply(this, args), delay);
9
+ timeoutId = setTimeout(function () {
10
+ return fn.apply(_this, args);
11
+ }, delay);
6
12
  };
7
13
  };
8
14
 
@@ -1 +1 @@
1
- {"version":3,"file":"debounce.js","sources":["../../../../../../src/utils/debounce.ts"],"sourcesContent":["export const debounce = (fn: Function, delay: number) => {\n let timeoutId: ReturnType<typeof setTimeout>;\n\n return function (this: any, ...args: any[]) {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn.apply(this, args), delay);\n };\n};\n"],"names":["debounce","fn","delay","timeoutId","args","clearTimeout","setTimeout","apply"],"mappings":"MAAaA,QAAQ,GAAGA,CAACC,EAAY,EAAEC,KAAa;EAChD,IAAIC,SAAwC;EAE5C,OAAO,UAAqB,GAAGC,IAAW;IACtCC,YAAY,CAACF,SAAS,CAAC;IACvBA,SAAS,GAAGG,UAAU,CAAC,MAAML,EAAE,CAACM,KAAK,CAAC,IAAI,EAAEH,IAAI,CAAC,EAAEF,KAAK,CAAC;GAC5D;AACL;;;;"}
1
+ {"version":3,"file":"debounce.js","sources":["../../../../../../src/utils/debounce.ts"],"sourcesContent":["export const debounce = (fn: Function, delay: number) => {\n let timeoutId: ReturnType<typeof setTimeout>;\n\n return function (this: any, ...args: any[]) {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn.apply(this, args), delay);\n };\n};\n"],"names":["debounce","fn","delay","timeoutId","args","Array","_len","_key","arguments","clearTimeout","setTimeout","apply","_this"],"mappings":"IAAaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,EAAY,EAAEC,KAAa;EAChD,IAAIC,SAAwC;EAE5C,OAAO;;sCAAwBC,IAAW,OAAAC,KAAA,CAAAC,IAAA,GAAAC,IAAA,MAAAA,IAAA,GAAAD,IAAA,EAAAC,IAAA;MAAXH,IAAW,CAAAG,IAAA,IAAAC,SAAA,CAAAD,IAAA;;IACtCE,YAAY,CAACN,SAAS,CAAC;IACvBA,SAAS,GAAGO,UAAU,CAAC;MAAA,OAAMT,EAAE,CAACU,KAAK,CAACC,KAAI,EAAER,IAAI,CAAC;OAAEF,KAAK,CAAC;GAC5D;AACL;;;;"}
@@ -1,5 +1,7 @@
1
- const mobiles = /iPhone|iPad|iPod|Android/i;
2
- const isMobileDevice = navigator => !!(navigator !== null && navigator !== void 0 && navigator.userAgent) && mobiles.test(navigator.userAgent);
1
+ var mobiles = /iPhone|iPad|iPod|Android/i;
2
+ var isMobileDevice = function isMobileDevice(navigator) {
3
+ return !!(navigator !== null && navigator !== void 0 && navigator.userAgent) && mobiles.test(navigator.userAgent);
4
+ };
3
5
 
4
6
  export { isMobileDevice };
5
7
  //# sourceMappingURL=device.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"device.js","sources":["../../../../../../src/utils/device.ts"],"sourcesContent":["const mobiles = /iPhone|iPad|iPod|Android/i;\n\nexport const isMobileDevice = (navigator: Navigator | undefined) => !!navigator?.userAgent && mobiles.test(navigator.userAgent);\n"],"names":["mobiles","isMobileDevice","navigator","userAgent","test"],"mappings":"AAAA,MAAMA,OAAO,GAAG,2BAA2B;MAE9BC,cAAc,GAAIC,SAAgC,IAAK,CAAC,EAACA,SAAS,aAATA,SAAS,eAATA,SAAS,CAAEC,SAAS,KAAIH,OAAO,CAACI,IAAI,CAACF,SAAS,CAACC,SAAS;;;;"}
1
+ {"version":3,"file":"device.js","sources":["../../../../../../src/utils/device.ts"],"sourcesContent":["const mobiles = /iPhone|iPad|iPod|Android/i;\n\nexport const isMobileDevice = (navigator: Navigator | undefined) => !!navigator?.userAgent && mobiles.test(navigator.userAgent);\n"],"names":["mobiles","isMobileDevice","navigator","userAgent","test"],"mappings":"AAAA,IAAMA,OAAO,GAAG,2BAA2B;IAE9BC,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,SAAgC;EAAA,OAAK,CAAC,EAACA,SAAS,aAATA,SAAS,eAATA,SAAS,CAAEC,SAAS,KAAIH,OAAO,CAACI,IAAI,CAACF,SAAS,CAACC,SAAS,CAAC;AAAA;;;;"}
@@ -1,18 +1,22 @@
1
1
  // taken from react-aria
2
- const FOCUSABLE_ELEMENTS = ['[tabindex]:not([disabled])', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'a[href]', 'area[href]', 'summary', 'iframe', 'object', 'embed', 'audio[controls]', 'video[controls]', '[contenteditable]', 'details:not([disabled])', 'summary:not(:disabled)'];
3
- const hasFocusableElement = element => {
2
+ var FOCUSABLE_ELEMENTS = ['[tabindex]:not([disabled])', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'a[href]', 'area[href]', 'summary', 'iframe', 'object', 'embed', 'audio[controls]', 'video[controls]', '[contenteditable]', 'details:not([disabled])', 'summary:not(:disabled)'];
3
+ var hasFocusableElement = function hasFocusableElement(element) {
4
4
  if (!element) {
5
5
  return null;
6
6
  }
7
7
  return !!element.querySelector(FOCUSABLE_ELEMENTS.join(','));
8
8
  };
9
- const getIndexOfFirstChildOverflowingParent = (element, overscan = 0) => {
10
- let index = 0;
11
- let boundaryChildIndex = null;
12
- const clientRect = element.getBoundingClientRect();
13
- for (const child of Array.from(element.children)) {
14
- const right = child.getBoundingClientRect().right - clientRect.left;
15
- const width = clientRect.width - overscan;
9
+ var getIndexOfFirstChildOverflowingParent = function getIndexOfFirstChildOverflowingParent(element, overscan) {
10
+ if (overscan === void 0) {
11
+ overscan = 0;
12
+ }
13
+ var index = 0;
14
+ var boundaryChildIndex = null;
15
+ var clientRect = element.getBoundingClientRect();
16
+ for (var _i = 0, _Array$from = Array.from(element.children); _i < _Array$from.length; _i++) {
17
+ var child = _Array$from[_i];
18
+ var right = child.getBoundingClientRect().right - clientRect.left;
19
+ var width = clientRect.width - overscan;
16
20
  if (right > width) {
17
21
  boundaryChildIndex = index;
18
22
  break;
@@ -21,17 +25,19 @@ const getIndexOfFirstChildOverflowingParent = (element, overscan = 0) => {
21
25
  }
22
26
  return boundaryChildIndex;
23
27
  };
24
- const getNextFocussableElement = currentElement => {
28
+ var getNextFocussableElement = function getNextFocussableElement(currentElement) {
25
29
  if (!currentElement) {
26
30
  return null;
27
31
  }
28
- let focussableElements = [...document.querySelectorAll(FOCUSABLE_ELEMENTS.join(','))];
29
- const currentElementIndex = focussableElements.indexOf(currentElement);
32
+ var focussableElements = [].concat(document.querySelectorAll(FOCUSABLE_ELEMENTS.join(',')));
33
+ var currentElementIndex = focussableElements.indexOf(currentElement);
30
34
  if (currentElementIndex > -1) {
31
- focussableElements = focussableElements.slice(currentElementIndex + 1).filter(element => element.getAttribute('tabindex') !== '-1');
35
+ focussableElements = focussableElements.slice(currentElementIndex + 1).filter(function (element) {
36
+ return element.getAttribute('tabindex') !== '-1';
37
+ });
32
38
  if (focussableElements.length) {
33
39
  var _focussableElements$;
34
- focussableElements = focussableElements.filter(element => {
40
+ focussableElements = focussableElements.filter(function (element) {
35
41
  var _element$checkVisibil, _element$checkVisibil2;
36
42
  return (_element$checkVisibil = (_element$checkVisibil2 = element.checkVisibility) === null || _element$checkVisibil2 === void 0 ? void 0 : _element$checkVisibil2.call(element)) !== null && _element$checkVisibil !== void 0 ? _element$checkVisibil : true;
37
43
  });
@@ -40,24 +46,24 @@ const getNextFocussableElement = currentElement => {
40
46
  }
41
47
  return null;
42
48
  };
43
- const getOverlaySelector = element => {
49
+ var getOverlaySelector = function getOverlaySelector(element) {
44
50
  switch (element === null || element === void 0 ? void 0 : element.getAttribute('role')) {
45
51
  case 'dialog':
46
- return `[aria-controls='${element.id}']`;
52
+ return "[aria-controls='" + element.id + "']";
47
53
  case 'menu':
48
- return `#${element.getAttribute('aria-labelledby')}`;
54
+ return "#" + element.getAttribute('aria-labelledby');
49
55
  default:
50
56
  return undefined;
51
57
  }
52
58
  };
53
59
  function isElementTriggeredFromContainer(element, container) {
54
60
  var _getOverlaySelector, _element$closest;
55
- const selector = (_getOverlaySelector = getOverlaySelector(element)) !== null && _getOverlaySelector !== void 0 ? _getOverlaySelector : getOverlaySelector((_element$closest = element === null || element === void 0 ? void 0 : element.closest('[role=dialog],[role=menu]')) !== null && _element$closest !== void 0 ? _element$closest : null);
61
+ var selector = (_getOverlaySelector = getOverlaySelector(element)) !== null && _getOverlaySelector !== void 0 ? _getOverlaySelector : getOverlaySelector((_element$closest = element === null || element === void 0 ? void 0 : element.closest('[role=dialog],[role=menu]')) !== null && _element$closest !== void 0 ? _element$closest : null);
56
62
  if (selector) {
57
63
  if (container !== null && container !== void 0 && container.querySelector(selector)) {
58
64
  return true;
59
65
  }
60
- const elementInDocument = document.querySelector(selector);
66
+ var elementInDocument = document.querySelector(selector);
61
67
  // if the element does exist, see if it is itself connected to somethng that was triggered from the container
62
68
  if (elementInDocument) {
63
69
  return isElementTriggeredFromContainer(elementInDocument, container);
@@ -87,7 +93,7 @@ function isElementInsideTable3OrReport(element) {
87
93
  }
88
94
  function setDataFocusAttribute(target) {
89
95
  target.setAttribute('data-focus', 'programmatic');
90
- const cleanup = () => {
96
+ var cleanup = function cleanup() {
91
97
  target.removeAttribute('data-focus');
92
98
  target.removeEventListener('blur', cleanup);
93
99
  };
@@ -1 +1 @@
1
- {"version":3,"file":"dom.js","sources":["../../../../../../src/utils/dom.ts"],"sourcesContent":["// taken from react-aria\nconst FOCUSABLE_ELEMENTS = [\n '[tabindex]:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]',\n 'details:not([disabled])',\n 'summary:not(:disabled)',\n];\n\nexport const hasFocusableElement = (element: HTMLElement | null) => {\n if (!element) {\n return null;\n }\n\n return !!element.querySelector(FOCUSABLE_ELEMENTS.join(','));\n};\n\nexport const isOverflowing = (element: HTMLElement | null) =>\n element !== null ? element.scrollWidth > element.offsetWidth : false;\n\nexport const getIndexOfFirstChildOverflowingParent = (element: HTMLElement, overscan = 0) => {\n let index = 0;\n let boundaryChildIndex: number | null = null;\n const clientRect = element.getBoundingClientRect();\n\n for (const child of Array.from(element.children)) {\n const right = child.getBoundingClientRect().right - clientRect.left;\n const width = clientRect.width - overscan;\n\n if (right > width) {\n boundaryChildIndex = index;\n break;\n }\n index++;\n }\n\n return boundaryChildIndex;\n};\n\nexport const getNextFocussableElement = (currentElement: HTMLElement | null) => {\n if (!currentElement) {\n return null;\n }\n\n let focussableElements = [...document.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS.join(','))];\n const currentElementIndex = focussableElements.indexOf(currentElement);\n\n if (currentElementIndex > -1) {\n focussableElements = focussableElements\n .slice(currentElementIndex + 1)\n .filter(element => element.getAttribute('tabindex') !== '-1');\n\n if (focussableElements.length) {\n focussableElements = focussableElements.filter(element => (element as any).checkVisibility?.() ?? true);\n return focussableElements[0] ?? null;\n }\n }\n\n return null;\n};\n\nconst getOverlaySelector = (element: Element | null) => {\n switch (element?.getAttribute('role')) {\n case 'dialog':\n return `[aria-controls='${element.id}']`;\n\n case 'menu':\n return `#${element.getAttribute('aria-labelledby')}`;\n\n default:\n return undefined;\n }\n};\n\nexport function isElementTriggeredFromContainer(element: Element | null, container: Element | null) {\n const selector = getOverlaySelector(element) ?? getOverlaySelector(element?.closest('[role=dialog],[role=menu]') ?? null);\n\n if (selector) {\n if (container?.querySelector(selector)) {\n return true;\n }\n\n const elementInDocument = document.querySelector(selector);\n\n // if the element does exist, see if it is itself connected to somethng that was triggered from the container\n if (elementInDocument) {\n return isElementTriggeredFromContainer(elementInDocument, container);\n }\n\n return false;\n }\n\n return false;\n}\n\nexport function isElementInsideOrTriggeredFromContainer(element: Element | null, container: Element | null) {\n return isElementTriggeredFromContainer(element, container) || !!container?.contains(element);\n}\n\nexport function isElementInsideOverlay(element: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]');\n}\n\nexport function isSiblingElementInsideSameParentOverlay(element: Element | null, sibling: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]')?.contains(sibling);\n}\n\nexport function isElementInteractive(element: Element | null) {\n if (!element) {\n return false;\n }\n\n return (\n ['A', 'BUTTON', 'INPUT', 'TEXTAREA', 'SELECT', 'LABEL', 'OPTION'].includes(element.tagName) &&\n !(element as HTMLElement).hidden &&\n !(element as HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLButtonElement).disabled &&\n !(element as HTMLInputElement | HTMLTextAreaElement).readOnly\n );\n}\n\nexport function isElementInsideTable3OrReport(element: Element | null) {\n return !!element?.closest('[data-taco^=table]');\n}\n\nexport function setDataFocusAttribute(target: Element) {\n target.setAttribute('data-focus', 'programmatic');\n\n const cleanup = () => {\n target.removeAttribute('data-focus');\n target.removeEventListener('blur', cleanup);\n };\n\n target.addEventListener('blur', cleanup);\n}\n"],"names":["FOCUSABLE_ELEMENTS","hasFocusableElement","element","querySelector","join","getIndexOfFirstChildOverflowingParent","overscan","index","boundaryChildIndex","clientRect","getBoundingClientRect","child","Array","from","children","right","left","width","getNextFocussableElement","currentElement","focussableElements","document","querySelectorAll","currentElementIndex","indexOf","slice","filter","getAttribute","length","_focussableElements$","_element$checkVisibil","_element$checkVisibil2","checkVisibility","call","getOverlaySelector","id","undefined","isElementTriggeredFromContainer","container","selector","_getOverlaySelector","_element$closest","closest","elementInDocument","isElementInsideOrTriggeredFromContainer","contains","isElementInsideOverlay","isSiblingElementInsideSameParentOverlay","sibling","_element$closest2","isElementInteractive","includes","tagName","hidden","disabled","readOnly","isElementInsideTable3OrReport","setDataFocusAttrib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C,IAC3F,CAAElD,OAAuB,CAACmD,MAAM,IAChC,CAAEnD,OAA0F,CAACoD,QAAQ,IACrG,CAAEpD,OAAkD,CAACqD,QAAQ;AAErE;SAEgBC,6BAA6BA,CAACtD,OAAuB;EACjE,OAAO,CAAC,EAACA,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEwC,OAAO,CAAC,oBAAoB,CAAC;AACnD;SAEgBe,qBAAqBA,CAACC,MAAe;EACjDA,MAAM,CAACC,YAAY,CAAC,YAAY,EAAE,cAAc,CAAC;EAEjD,MAAMC,OAAO,GAAGA;IACZF,MAAM,CAACG,eAAe,CAAC,YAAY,CAAC;IACpCH,MAAM,CAACI,mBAAmB,CAAC,MAAM,EAAEF,OAAO,CAAC;GAC9C;EAEDF,MAAM,CAACK,gBAAgB,CAAC,MAAM,EAAEH,OAAO,CAAC;AAC5C;;;;"}
1
+ {"version":3,"file":"dom.js","sources":["../../../../../../src/utils/dom.ts"],"sourcesContent":["// taken from react-aria\nconst FOCUSABLE_ELEMENTS = [\n '[tabindex]:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]',\n 'details:not([disabled])',\n 'summary:not(:disabled)',\n];\n\nexport const hasFocusableElement = (element: HTMLElement | null) => {\n if (!element) {\n return null;\n }\n\n return !!element.querySelector(FOCUSABLE_ELEMENTS.join(','));\n};\n\nexport const isOverflowing = (element: HTMLElement | null) =>\n element !== null ? element.scrollWidth > element.offsetWidth : false;\n\nexport const getIndexOfFirstChildOverflowingParent = (element: HTMLElement, overscan = 0) => {\n let index = 0;\n let boundaryChildIndex: number | null = null;\n const clientRect = element.getBoundingClientRect();\n\n for (const child of Array.from(element.children)) {\n const right = child.getBoundingClientRect().right - clientRect.left;\n const width = clientRect.width - overscan;\n\n if (right > width) {\n boundaryChildIndex = index;\n break;\n }\n index++;\n }\n\n return boundaryChildIndex;\n};\n\nexport const getNextFocussableElement = (currentElement: HTMLElement | null) => {\n if (!currentElement) {\n return null;\n }\n\n let focussableElements = [...document.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS.join(','))];\n const currentElementIndex = focussableElements.indexOf(currentElement);\n\n if (currentElementIndex > -1) {\n focussableElements = focussableElements\n .slice(currentElementIndex + 1)\n .filter(element => element.getAttribute('tabindex') !== '-1');\n\n if (focussableElements.length) {\n focussableElements = focussableElements.filter(element => (element as any).checkVisibility?.() ?? true);\n return focussableElements[0] ?? null;\n }\n }\n\n return null;\n};\n\nconst getOverlaySelector = (element: Element | null) => {\n switch (element?.getAttribute('role')) {\n case 'dialog':\n return `[aria-controls='${element.id}']`;\n\n case 'menu':\n return `#${element.getAttribute('aria-labelledby')}`;\n\n default:\n return undefined;\n }\n};\n\nexport function isElementTriggeredFromContainer(element: Element | null, container: Element | null) {\n const selector = getOverlaySelector(element) ?? getOverlaySelector(element?.closest('[role=dialog],[role=menu]') ?? null);\n\n if (selector) {\n if (container?.querySelector(selector)) {\n return true;\n }\n\n const elementInDocument = document.querySelector(selector);\n\n // if the element does exist, see if it is itself connected to somethng that was triggered from the container\n if (elementInDocument) {\n return isElementTriggeredFromContainer(elementInDocument, container);\n }\n\n return false;\n }\n\n return false;\n}\n\nexport function isElementInsideOrTriggeredFromContainer(element: Element | null, container: Element | null) {\n return isElementTriggeredFromContainer(element, container) || !!container?.contains(element);\n}\n\nexport function isElementInsideOverlay(element: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]');\n}\n\nexport function isSiblingElementInsideSameParentOverlay(element: Element | null, sibling: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]')?.contains(sibling);\n}\n\nexport function isElementInteractive(element: Element | null) {\n if (!element) {\n return false;\n }\n\n return (\n ['A', 'BUTTON', 'INPUT', 'TEXTAREA', 'SELECT', 'LABEL', 'OPTION'].includes(element.tagName) &&\n !(element as HTMLElement).hidden &&\n !(element as HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLButtonElement).disabled &&\n !(element as HTMLInputElement | HTMLTextAreaElement).readOnly\n );\n}\n\nexport function isElementInsideTable3OrReport(element: Element | null) {\n return !!element?.closest('[data-taco^=table]');\n}\n\nexport function setDataFocusAttribute(target: Element) {\n target.setAttribute('data-focus', 'programmatic');\n\n const cleanup = () => {\n target.removeAttribute('data-focus');\n target.removeEventListener('blur', cleanup);\n };\n\n target.addEventListener('blur', cleanup);\n}\n"],"names":["FOCUSABLE_ELEMENTS","hasFocusableElement","element","querySelector","join","getIndexOfFirstChildOverflowingParent","overscan","index","boundaryChildIndex","clientRect","getBoundingClientRect","_i","_Array$from","Array","from","children","length","child","right","left","width","getNextFocussableElement","currentElement","focussableElements","concat","document","querySelectorAll","currentElementIndex","indexOf","slice","filter","getAttribute","_focussableElements$","_element$checkVisibil","_element$checkVisibil2","checkVisibility","call","getOverlaySelector","id","undefined","isElementTriggeredFromContainer","container","selector","_getOverlaySelector","_element$closest","closest","elementInDocument","isElementInsideOrTriggeredFromContainer","contains","isElementInsideOverlay","isSiblingElementInsideSameParentOverlay","sibling","_element$closest2","isElementInteractive","includes","tagName","hidden","disabled","readOnly","isElementInsideTable3OrReport","setDataFocusAttribute","target","setAttribute","cleanup","removeAttribute","removeEventListener","addEventListener"],"mappings":"AAAA;AACA,IAAMA,kBAAkB,GAAG,CACvB,4BAA4B,EAC5B,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,SAAS,EACT,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,CAC3B;IAEYC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIC,OAA2B;EAC3D,IAAI,CAACA,OAAO,EAAE;IACV,OAAO,IAAI;;EAGf,OAAO,CAAC,CAACA,OAAO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E2C,OAAO,CAAC,oBAAoB,CAAC;AACnD;SAEgBe,qBAAqBA,CAACC,MAAe;EACjDA,MAAM,CAACC,YAAY,CAAC,YAAY,EAAE,cAAc,CAAC;EAEjD,IAAMC,OAAO,GAAG,SAAVA,OAAOA;IACTF,MAAM,CAACG,eAAe,CAAC,YAAY,CAAC;IACpCH,MAAM,CAACI,mBAAmB,CAAC,MAAM,EAAEF,OAAO,CAAC;GAC9C;EAEDF,MAAM,CAACK,gBAAgB,CAAC,MAAM,EAAEH,OAAO,CAAC;AAC5C;;;;"}
@@ -1,52 +1,54 @@
1
1
  import React__default from 'react';
2
2
  import { useMove } from '@react-aria/interactions';
3
3
 
4
- const useDraggable = ref => {
5
- const [position, setPosition] = React__default.useState({
6
- x: 0,
7
- y: 0
8
- });
9
- const [dragging, setDragging] = React__default.useState(false);
10
- const {
11
- moveProps
12
- } = useMove({
13
- onMoveStart() {
14
- setDragging(true);
15
- },
16
- onMove(event) {
17
- var _ref$current;
18
- const rect = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect();
19
- // Prevent dragging out of bounds
20
- if (rect && (rect.left + event.deltaX < 0 || rect.right + event.deltaX > window.innerWidth || rect.top + event.deltaY < 0 || rect.bottom + event.deltaY > window.innerHeight)) {
21
- return;
4
+ var useDraggable = function useDraggable(ref) {
5
+ var _React$useState = React__default.useState({
6
+ x: 0,
7
+ y: 0
8
+ }),
9
+ position = _React$useState[0],
10
+ setPosition = _React$useState[1];
11
+ var _React$useState2 = React__default.useState(false),
12
+ dragging = _React$useState2[0],
13
+ setDragging = _React$useState2[1];
14
+ var _useMove = useMove({
15
+ onMoveStart: function onMoveStart() {
16
+ setDragging(true);
17
+ },
18
+ onMove: function onMove(event) {
19
+ var _ref$current;
20
+ var rect = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect();
21
+ // Prevent dragging out of bounds
22
+ if (rect && (rect.left + event.deltaX < 0 || rect.right + event.deltaX > window.innerWidth || rect.top + event.deltaY < 0 || rect.bottom + event.deltaY > window.innerHeight)) {
23
+ return;
24
+ }
25
+ setPosition(function (_ref) {
26
+ var x = _ref.x,
27
+ y = _ref.y;
28
+ x += event.deltaX;
29
+ y += event.deltaY;
30
+ return {
31
+ x: x,
32
+ y: y
33
+ };
34
+ });
35
+ },
36
+ onMoveEnd: function onMoveEnd() {
37
+ setDragging(false);
22
38
  }
23
- setPosition(({
24
- x,
25
- y
26
- }) => {
27
- x += event.deltaX;
28
- y += event.deltaY;
29
- return {
30
- x,
31
- y
32
- };
33
- });
34
- },
35
- onMoveEnd() {
36
- setDragging(false);
37
- }
38
- });
39
- const resetPosition = () => {
39
+ }),
40
+ moveProps = _useMove.moveProps;
41
+ var resetPosition = function resetPosition() {
40
42
  setPosition({
41
43
  x: 0,
42
44
  y: 0
43
45
  });
44
46
  };
45
47
  return {
46
- position,
47
- dragging,
48
+ position: position,
49
+ dragging: dragging,
48
50
  handleProps: moveProps,
49
- resetPosition
51
+ resetPosition: resetPosition
50
52
  };
51
53
  };
52
54
 
@@ -1 +1 @@
1
- {"version":3,"file":"useDraggable.js","sources":["../../../../../../../src/utils/hooks/useDraggable.tsx"],"sourcesContent":["import React from 'react';\nimport { useMove } from '@react-aria/interactions';\n\nexport const useDraggable = (ref: React.MutableRefObject<HTMLDivElement | null>): any => {\n const [position, setPosition] = React.useState({\n x: 0,\n y: 0,\n });\n\n const [dragging, setDragging] = React.useState(false);\n\n const { moveProps } = useMove({\n onMoveStart() {\n setDragging(true);\n },\n onMove(event) {\n const rect = ref.current?.getBoundingClientRect();\n\n // Prevent dragging out of bounds\n if (\n rect &&\n (rect.left + event.deltaX < 0 ||\n rect.right + event.deltaX > window.innerWidth ||\n rect.top + event.deltaY < 0 ||\n rect.bottom + event.deltaY > window.innerHeight)\n ) {\n return;\n }\n\n setPosition(({ x, y }) => {\n x += event.deltaX;\n y += event.deltaY;\n return { x, y };\n });\n },\n onMoveEnd() {\n setDragging(false);\n },\n });\n\n const resetPosition = () => {\n setPosition({\n x: 0,\n y: 0,\n });\n };\n\n return {\n position,\n dragging,\n handleProps: moveProps,\n resetPosition,\n };\n};\n"],"names":["useDraggable","ref","position","setPosition","React","useState","x","y","dragging","setDragging","moveProps","useMove","onMoveStart","onMove","event","rect","_ref$current","current","getBoundingClientRect","left","deltaX","right","window","innerWidth","top","deltaY","bottom","innerHeight","onMoveEnd","resetPosition","handleProps"],"mappings":";;;MAGaA,YAAY,GAAIC,GAAkD;EAC3E,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAC;IAC3CC,CAAC,EAAE,CAAC;IACJC,CAAC,EAAE;GACN,CAAC;EAEF,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGL,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;EAErD,MAAM;IAAEK;GAAW,GAAGC,OAAO,CAAC;IAC1BC,WAAWA;MACPH,WAAW,CAAC,IAAI,CAAC;KACpB;IACDI,MAAMA,CAACC,KAAK;;MACR,MAAMC,IAAI,IAAAC,YAAA,GAAGf,GAAG,CAACgB,OAAO,cAAAD,YAAA,uBAAXA,YAAA,CAAaE,qBAAqB,EAAE;;MAGjD,IACIH,IAAI,KACHA,IAAI,CAACI,IAAI,GAAGL,KAAK,CAACM,MAAM,GAAG,CAAC,IACzBL,IAAI,CAACM,KAAK,GAAGP,KAAK,CAACM,MAAM,GAAGE,MAAM,CAACC,UAAU,IAC7CR,IAAI,CAACS,GAAG,GAAGV,KAAK,CAACW,MAAM,GAAG,CAAC,IAC3BV,IAAI,CAACW,MAAM,GAAGZ,KAAK,CAACW,MAAM,GAAGH,MAAM,CAACK,WAAW,CAAC,EACtD;QACE;;MAGJxB,WAAW,CAAC,CAAC;QAAEG,CAAC;QAAEC;OAAG;QACjBD,CAAC,IAAIQ,KAAK,CAACM,MAAM;QACjBb,CAAC,IAAIO,KAAK,CAACW,MAAM;QACjB,OAAO;UAAEnB,CAAC;UAAEC;SAAG;OAClB,CAAC;KACL;IACDqB,SAASA;MACLnB,WAAW,CAAC,KAAK,CAAC;;GAEzB,CAAC;EAEF,MAAMoB,aAAa,GAAGA;IAClB1B,WAAW,CAAC;MACRG,CAAC,EAAE,CAAC;MACJC,CAAC,EAAE;KACN,CAAC;GACL;EAED,OAAO;IACHL,QAAQ;IACRM,QAAQ;IACRsB,WAAW,EAAEpB,SAAS;IACtBmB;GACH;AACL;;;;"}
1
+ {"version":3,"file":"useDraggable.js","sources":["../../../../../../../src/utils/hooks/useDraggable.tsx"],"sourcesContent":["import React from 'react';\nimport { useMove } from '@react-aria/interactions';\n\nexport const useDraggable = (ref: React.MutableRefObject<HTMLDivElement | null>): any => {\n const [position, setPosition] = React.useState({\n x: 0,\n y: 0,\n });\n\n const [dragging, setDragging] = React.useState(false);\n\n const { moveProps } = useMove({\n onMoveStart() {\n setDragging(true);\n },\n onMove(event) {\n const rect = ref.current?.getBoundingClientRect();\n\n // Prevent dragging out of bounds\n if (\n rect &&\n (rect.left + event.deltaX < 0 ||\n rect.right + event.deltaX > window.innerWidth ||\n rect.top + event.deltaY < 0 ||\n rect.bottom + event.deltaY > window.innerHeight)\n ) {\n return;\n }\n\n setPosition(({ x, y }) => {\n x += event.deltaX;\n y += event.deltaY;\n return { x, y };\n });\n },\n onMoveEnd() {\n setDragging(false);\n },\n });\n\n const resetPosition = () => {\n setPosition({\n x: 0,\n y: 0,\n });\n };\n\n return {\n position,\n dragging,\n handleProps: moveProps,\n resetPosition,\n };\n};\n"],"names":["useDraggable","ref","_React$useState","React","useState","x","y","position","setPosition","_React$useState2","dragging","setDragging","_useMove","useMove","onMoveStart","onMove","event","rect","_ref$current","current","getBoundingClientRect","left","deltaX","right","window","innerWidth","top","deltaY","bottom","innerHeight","_ref","onMoveEnd","moveProps","resetPosition","handleProps"],"mappings":";;;IAGaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,GAAkD;EAC3E,IAAAC,eAAA,GAAgCC,cAAK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aAAaA;IACfzB,WAAW,CAAC;MACRH,CAAC,EAAE,CAAC;MACJC,CAAC,EAAE;KACN,CAAC;GACL;EAED,OAAO;IACHC,QAAQ,EAARA,QAAQ;IACRG,QAAQ,EAARA,QAAQ;IACRwB,WAAW,EAAEF,SAAS;IACtBC,aAAa,EAAbA;GACH;AACL;;;;"}
@@ -1,21 +1,23 @@
1
1
  import React__default from 'react';
2
2
 
3
- const useDropTarget = onDrop => {
4
- const [isDraggedOver, setDraggedOver] = React__default.useState(false);
5
- const handleDragEnter = React__default.useCallback(event => {
3
+ var useDropTarget = function useDropTarget(onDrop) {
4
+ var _React$useState = React__default.useState(false),
5
+ isDraggedOver = _React$useState[0],
6
+ setDraggedOver = _React$useState[1];
7
+ var handleDragEnter = React__default.useCallback(function (event) {
6
8
  event.preventDefault();
7
9
  setDraggedOver(true);
8
10
  }, []);
9
- const handleDragLeave = React__default.useCallback(event => {
11
+ var handleDragLeave = React__default.useCallback(function (event) {
10
12
  event.preventDefault();
11
13
  if (event.target === event.currentTarget || event.relatedTarget && !event.currentTarget.contains(event.relatedTarget)) {
12
14
  setDraggedOver(false);
13
15
  }
14
16
  }, []);
15
- const handleDragOver = React__default.useCallback(event => {
17
+ var handleDragOver = React__default.useCallback(function (event) {
16
18
  event.preventDefault();
17
19
  }, []);
18
- const handleDrop = React__default.useCallback(event => {
20
+ var handleDrop = React__default.useCallback(function (event) {
19
21
  event.preventDefault();
20
22
  event.persist();
21
23
  setDraggedOver(false);
@@ -23,7 +25,7 @@ const useDropTarget = onDrop => {
23
25
  onDrop(event);
24
26
  }
25
27
  }, [onDrop]);
26
- const props = onDrop ? {
28
+ var props = onDrop ? {
27
29
  onDragEnter: handleDragEnter,
28
30
  onDragLeave: handleDragLeave,
29
31
  onDragOver: handleDragOver,
@@ -1 +1 @@
1
- {"version":3,"file":"useDropTarget.js","sources":["../../../../../../../src/utils/hooks/useDropTarget.ts"],"sourcesContent":["import React from 'react';\n\nexport type useDropTarget = [\n boolean,\n (\n | undefined\n | {\n onDragEnter: React.DragEventHandler;\n onDragLeave: React.DragEventHandler;\n onDragOver: React.DragEventHandler;\n onDrop: React.DragEventHandler;\n }\n )\n];\n\nexport const useDropTarget = (onDrop: React.DragEventHandler | undefined): useDropTarget => {\n const [isDraggedOver, setDraggedOver] = React.useState(false);\n\n const handleDragEnter = React.useCallback((event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n setDraggedOver(true);\n }, []);\n\n const handleDragLeave = React.useCallback((event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n\n if (\n event.target === event.currentTarget ||\n (event.relatedTarget && !event.currentTarget.contains(event.relatedTarget as HTMLElement))\n ) {\n setDraggedOver(false);\n }\n }, []);\n\n const handleDragOver = React.useCallback((event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n }, []);\n\n const handleDrop = React.useCallback(\n (event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n event.persist();\n\n setDraggedOver(false);\n\n if (onDrop) {\n onDrop(event);\n }\n },\n [onDrop]\n );\n\n const props = onDrop\n ? {\n onDragEnter: handleDragEnter,\n onDragLeave: handleDragLeave,\n onDragOver: handleDragOver,\n onDrop: handleDrop,\n }\n : undefined;\n\n return [isDraggedOver, props];\n};\n"],"names":["useDropTarget","onDrop","isDraggedOver","setDraggedOver","React","useState","handleDragEnter","useCallback","event","preventDefault","handleDragLeave","target","currentTarget","relatedTarget","contains","handleDragOver","handleDrop","persist","props","onDragEnter","onDragLeave","onDragOver","undefined"],"mappings":";;MAeaA,aAAa,GAAIC,MAA0C;EACpE,MAAM,CAACC,aAAa,EAAEC,cAAc,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;EAE7D,MAAMC,eAAe,GAAGF,cAAK,CAACG,WAAW,CAAEC,KAAmC;IAC1EA,KAAK,CAACC,cAAc,EAAE;IACtBN,cAAc,CAAC,IAAI,CAAC;GACvB,EAAE,EAAE,CAAC;EAEN,MAAMO,eAAe,GAAGN,cAAK,CAACG,WAAW,CAAEC,KAAmC;IAC1EA,KAAK,CAACC,cAAc,EAAE;IAEtB,IACID,KAAK,CAACG,MAAM,KAAKH,KAAK,CAACI,aAAa,IACnCJ,KAAK,CAACK,aAAa,IAAI,CAACL,KAAK,CAACI,aAAa,CAACE,QAAQ,CAACN,KAAK,CAACK,aAA4B,CAAE,EAC5F;MACEV,cAAc,CAAC,KAAK,CAAC;;GAE5B,EAAE,EAAE,CAAC;EAEN,MAAMY,cAAc,GAAGX,cAAK,CAACG,WAAW,CAAEC,KAAmC;IACzEA,KAAK,CAACC,cAAc,EAAE;GACzB,EAAE,EAAE,CAAC;EAEN,MAAMO,UAAU,GAAGZ,cAAK,CAACG,WAAW,CAC/BC,KAAmC;IAChCA,KAAK,CAACC,cAAc,EAAE;IACtBD,KAAK,CAACS,OAAO,EAAE;IAEfd,cAAc,CAAC,KAAK,CAAC;IAErB,IAAIF,MAAM,EAAE;MACRA,MAAM,CAACO,KAAK,CAAC;;GAEpB,EACD,CAACP,MAAM,CAAC,CACX;EAED,MAAMiB,KAAK,GAAGjB,MAAM,GACd;IACIkB,WAAW,EAAEb,eAAe;IAC5Bc,WAAW,EAAEV,eAAe;IAC5BW,UAAU,EAAEN,cAAc;IAC1Bd,MAAM,EAAEe;GACX,GACDM,SAAS;EAEf,OAAO,CAACpB,aAAa,EAAEgB,KAAK,CAAC;AACjC;;;;"}
1
+ {"version":3,"file":"useDropTarget.js","sources":["../../../../../../../src/utils/hooks/useDropTarget.ts"],"sourcesContent":["import React from 'react';\n\nexport type useDropTarget = [\n boolean,\n (\n | undefined\n | {\n onDragEnter: React.DragEventHandler;\n onDragLeave: React.DragEventHandler;\n onDragOver: React.DragEventHandler;\n onDrop: React.DragEventHandler;\n }\n )\n];\n\nexport const useDropTarget = (onDrop: React.DragEventHandler | undefined): useDropTarget => {\n const [isDraggedOver, setDraggedOver] = React.useState(false);\n\n const handleDragEnter = React.useCallback((event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n setDraggedOver(true);\n }, []);\n\n const handleDragLeave = React.useCallback((event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n\n if (\n event.target === event.currentTarget ||\n (event.relatedTarget && !event.currentTarget.contains(event.relatedTarget as HTMLElement))\n ) {\n setDraggedOver(false);\n }\n }, []);\n\n const handleDragOver = React.useCallback((event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n }, []);\n\n const handleDrop = React.useCallback(\n (event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n event.persist();\n\n setDraggedOver(false);\n\n if (onDrop) {\n onDrop(event);\n }\n },\n [onDrop]\n );\n\n const props = onDrop\n ? {\n onDragEnter: handleDragEnter,\n onDragLeave: handleDragLeave,\n onDragOver: handleDragOver,\n onDrop: handleDrop,\n }\n : undefined;\n\n return [isDraggedOver, props];\n};\n"],"names":["useDropTarget","onDrop","_React$useState","React","useState","isDraggedOver","setDraggedOver","handleDragEnter","useCallback","event","preventDefault","handleDragLeave","target","currentTarget","relatedTarget","contains","handleDragOver","handleDrop","persist","props","onDragEnter","onDragLeave","onDragOver","undefined"],"mappings":";;IAeaA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,MAA0C;EACpE,IAAAC,eAAA,GAAwCC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;IAAtDC,aAAa,GAAAH,eAAA;IAAEI,cAAc,GAAAJ,eAAA;EAEpC,IAAMK,eAAe,GAAGJ,cAAK,CAACK,WAAW,CAAC,UAACC,KAAmC;IAC1EA,KAAK,CAACC,cAAc,EAAE;IACtBJ,cAAc,CAAC,IAAI,CAAC;GACvB,EAAE,EAAE,CAAC;EAEN,IAAMK,eAAe,GAAGR,cAAK,CAACK,WAAW,CAAC,UAACC,KAAmC;IAC1EA,KAAK,CAACC,cAAc,EAAE;IAEtB,IACID,KAAK,CAACG,MAAM,KAAKH,KAAK,CAACI,aAAa,IACnCJ,KAAK,CAACK,aAAa,IAAI,CAACL,KAAK,CAACI,aAAa,CAACE,QAAQ,CAACN,KAAK,CAACK,aAA4B,CAAE,EAC5F;MACER,cAAc,CAAC,KAAK,CAAC;;GAE5B,EAAE,EAAE,CAAC;EAEN,IAAMU,cAAc,GAAGb,cAAK,CAACK,WAAW,CAAC,UAACC,KAAmC;IACzEA,KAAK,CAACC,cAAc,EAAE;GACzB,EAAE,EAAE,CAAC;EAEN,IAAMO,UAAU,GAAGd,cAAK,CAACK,WAAW,CAChC,UAACC,KAAmC;IAChCA,KAAK,CAACC,cAAc,EAAE;IACtBD,KAAK,CAACS,OAAO,EAAE;IAEfZ,cAAc,CAAC,KAAK,CAAC;IAErB,IAAIL,MAAM,EAAE;MACRA,MAAM,CAACQ,KAAK,CAAC;;GAEpB,EACD,CAACR,MAAM,CAAC,CACX;EAED,IAAMkB,KAAK,GAAGlB,MAAM,GACd;IACImB,WAAW,EAAEb,eAAe;IAC5Bc,WAAW,EAAEV,eAAe;IAC5BW,UAAU,EAAEN,cAAc;IAC1Bf,MAAM,EAAEgB;GACX,GACDM,SAAS;EAEf,OAAO,CAAClB,aAAa,EAAEc,KAAK,CAAC;AACjC;;;;"}
@@ -1,8 +1,11 @@
1
1
  import React__default from 'react';
2
2
 
3
- const getNextIndexFromKey = (key, length, index, direction = 'vertical') => {
4
- const previousKey = direction === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';
5
- const nextKey = direction === 'horizontal' ? 'ArrowRight' : 'ArrowDown';
3
+ var getNextIndexFromKey = function getNextIndexFromKey(key, length, index, direction) {
4
+ if (direction === void 0) {
5
+ direction = 'vertical';
6
+ }
7
+ var previousKey = direction === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';
8
+ var nextKey = direction === 'horizontal' ? 'ArrowRight' : 'ArrowDown';
6
9
  switch (key) {
7
10
  case previousKey:
8
11
  return index !== undefined ? index - 1 < 0 ? 0 : index - 1 : index;
@@ -16,12 +19,20 @@ const getNextIndexFromKey = (key, length, index, direction = 'vertical') => {
16
19
  return;
17
20
  }
18
21
  };
19
- const useListKeyboardNavigation = (length = 0, options = {
20
- direction: 'vertical'
21
- }) => {
22
- const [index, setIndex] = React__default.useState(options.initialIndex);
23
- const getNextIndex = event => {
24
- const nextIndex = getNextIndexFromKey(event.key, length, index, options.direction);
22
+ var useListKeyboardNavigation = function useListKeyboardNavigation(length, options) {
23
+ if (length === void 0) {
24
+ length = 0;
25
+ }
26
+ if (options === void 0) {
27
+ options = {
28
+ direction: 'vertical'
29
+ };
30
+ }
31
+ var _React$useState = React__default.useState(options.initialIndex),
32
+ index = _React$useState[0],
33
+ setIndex = _React$useState[1];
34
+ var getNextIndex = function getNextIndex(event) {
35
+ var nextIndex = getNextIndexFromKey(event.key, length, index, options.direction);
25
36
  if (nextIndex !== undefined) {
26
37
  event.preventDefault();
27
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useListKeyboardNavigation.js","sources":["../../../../../../../src/utils/hooks/useListKeyboardNavigation.ts"],"sourcesContent":["import React from 'react';\nimport { Orientation } from '../../types';\n\nexport const getNextIndexFromKey = (\n key: string,\n length: number,\n index: number | undefined,\n direction: Orientation = 'vertical'\n): number | undefined => {\n const previousKey = direction === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';\n const nextKey = direction === 'horizontal' ? 'ArrowRight' : 'ArrowDown';\n\n switch (key) {\n case previousKey:\n return index !== undefined ? (index - 1 < 0 ? 0 : index - 1) : index;\n\n case nextKey:\n return index !== undefined ? (index + 1 >= length ? index : index + 1) : index;\n\n case 'Home':\n return 0;\n\n case 'End':\n return length - 1;\n\n default:\n return;\n }\n};\n\nexport type useListKeyboardNavigationOptions = {\n direction?: Orientation;\n initialIndex?: number;\n};\n\nexport const useListKeyboardNavigation = (\n length = 0,\n options: useListKeyboardNavigationOptions = {\n direction: 'vertical',\n }\n): [number | undefined, (index: number | undefined) => void, (event: React.KeyboardEvent<HTMLElement>) => number | undefined] => {\n const [index, setIndex] = React.useState<number | undefined>(options.initialIndex);\n\n const getNextIndex = (event: React.KeyboardEvent<HTMLElement>): number | undefined => {\n const nextIndex = getNextIndexFromKey(event.key, length, index, options.direction);\n\n if (nextIndex !== undefined) {\n event.preventDefault();\n }\n\n return nextIndex;\n };\n\n return [index, setIndex, getNextIndex];\n};\n"],"names":["getNextIndexFromKey","key","length","index","direction","previousKey","nextKey","undefined","useListKeyboardNavigation","options","setIndex","React","useState","initialIndex","getNextIndex","event","nextIndex","preventDefault"],"mappings":";;MAGaA,mBAAmB,GAAGA,CAC/BC,GAAW,EACXC,MAAc,EACdC,KAAyB,EACzBC,YAAyB,UAAU;EAEnC,MAAMC,WAAW,GAAGD,SAAS,KAAK,YAAY,GAAG,WAAW,GAAG,SAAS;EACxE,MAAME,OAAO,GAAGF,SAAS,KAAK,YAAY,GAAG,YAAY,GAAG,WAAW;EAEvE,QAAQH,GAAG;IACP,KAAKI,WAAW;MACZ,OAAOF,KAAK,KAAKI,SAAS,GAAIJ,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAGA,KAAK,GAAG,CAAC,GAAIA,KAAK;IAExE,KAAKG,OAAO;MACR,OAAOH,KAAK,KAAKI,SAAS,GAAIJ,KAAK,GAAG,CAAC,IAAID,MAAM,GAAGC,KAAK,GAAGA,KAAK,GAAG,CAAC,GAAIA,KAAK;IAElF,KAAK,MAAM;MACP,OAAO,CAAC;IAEZ,KAAK,KAAK;MACN,OAAOD,MAAM,GAAG,CAAC;IAErB;MACI;;AAEZ;MAOaM,yBAAyB,GAAGA,CACrCN,MAAM,GAAG,CAAC,EACVO,UAA4C;EACxCL,SAAS,EAAE;CACd;EAED,MAAM,CAACD,KAAK,EAAEO,QAAQ,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAqBH,OAAO,CAACI,YAAY,CAAC;EAElF,MAAMC,YAAY,GAAIC,KAAuC;IACzD,MAAMC,SAAS,GAAGhB,mBAAmB,CAACe,KAAK,CAACd,GAAG,EAAEC,MAAM,EAAEC,KAAK,EAAEM,OAAO,CAACL,SAAS,CAAC;IAElF,IAAIY,SAAS,KAAKT,SAAS,EAAE;MACzBQ,KAAK,CAACE,cAAc,EAAE;;IAG1B,OAAOD,SAAS;GACnB;EAED,OAAO,CAACb,KAAK,EAAEO,QAAQ,EAAEI,YAAY,CAAC;AAC1C;;;;"}
1
+ {"version":3,"file":"useListKeyboardNavigation.js","sources":["../../../../../../../src/utils/hooks/useListKeyboardNavigation.ts"],"sourcesContent":["import React from 'react';\nimport { Orientation } from '../../types';\n\nexport const getNextIndexFromKey = (\n key: string,\n length: number,\n index: number | undefined,\n direction: Orientation = 'vertical'\n): number | undefined => {\n const previousKey = direction === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';\n const nextKey = direction === 'horizontal' ? 'ArrowRight' : 'ArrowDown';\n\n switch (key) {\n case previousKey:\n return index !== undefined ? (index - 1 < 0 ? 0 : index - 1) : index;\n\n case nextKey:\n return index !== undefined ? (index + 1 >= length ? index : index + 1) : index;\n\n case 'Home':\n return 0;\n\n case 'End':\n return length - 1;\n\n default:\n return;\n }\n};\n\nexport type useListKeyboardNavigationOptions = {\n direction?: Orientation;\n initialIndex?: number;\n};\n\nexport const useListKeyboardNavigation = (\n length = 0,\n options: useListKeyboardNavigationOptions = {\n direction: 'vertical',\n }\n): [number | undefined, (index: number | undefined) => void, (event: React.KeyboardEvent<HTMLElement>) => number | undefined] => {\n const [index, setIndex] = React.useState<number | undefined>(options.initialIndex);\n\n const getNextIndex = (event: React.KeyboardEvent<HTMLElement>): number | undefined => {\n const nextIndex = getNextIndexFromKey(event.key, length, index, options.direction);\n\n if (nextIndex !== undefined) {\n event.preventDefault();\n }\n\n return nextIndex;\n };\n\n return [index, setIndex, getNextIndex];\n};\n"],"names":["getNextIndexFromKey","key","length","index","direction","previousKey","nextKey","undefined","useListKeyboardNavigation","options","_React$useState","React","useState","initialIndex","setIndex","getNextIndex","event","nextIndex","preventDefault"],"mappings":";;IAGaA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAC5BC,GAAW,EACXC,MAAc,EACdC,KAAyB,EACzBC;MAAAA;IAA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