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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (670) 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 +4 -4
  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/index.css +11 -2
  17. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js +32 -24
  18. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js.map +1 -1
  19. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js +84 -61
  20. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js.map +1 -1
  21. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js +16 -15
  22. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js.map +1 -1
  23. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js +12 -13
  24. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js.map +1 -1
  25. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js +104 -68
  26. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -1
  27. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js +38 -29
  28. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js.map +1 -1
  29. package/dist/esm/packages/taco/src/charts/components/Donut/util.js +2 -2
  30. package/dist/esm/packages/taco/src/charts/components/Donut/util.js.map +1 -1
  31. package/dist/esm/packages/taco/src/charts/components/Legend.js +45 -37
  32. package/dist/esm/packages/taco/src/charts/components/Legend.js.map +1 -1
  33. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js +32 -24
  34. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js.map +1 -1
  35. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js +5 -3
  36. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js.map +1 -1
  37. package/dist/esm/packages/taco/src/charts/components/Tooltip.js +26 -25
  38. package/dist/esm/packages/taco/src/charts/components/Tooltip.js.map +1 -1
  39. package/dist/esm/packages/taco/src/charts/utils/color.js +13 -12
  40. package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -1
  41. package/dist/esm/packages/taco/src/charts/utils/common.js +39 -26
  42. package/dist/esm/packages/taco/src/charts/utils/common.js.map +1 -1
  43. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +30 -31
  44. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  45. package/dist/esm/packages/taco/src/components/Alert/Alert.js +7 -9
  46. package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
  47. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js +14 -13
  48. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js.map +1 -1
  49. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js +2 -2
  50. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js.map +1 -1
  51. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js +10 -9
  52. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
  53. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js +4 -4
  54. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js.map +1 -1
  55. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js +5 -6
  56. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js.map +1 -1
  57. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +2 -2
  58. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
  59. package/dist/esm/packages/taco/src/components/Badge/Badge.js +26 -27
  60. package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
  61. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +12 -14
  62. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
  63. package/dist/esm/packages/taco/src/components/Banner/Banner.js +7 -10
  64. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  65. package/dist/esm/packages/taco/src/components/Banner/util.js +3 -3
  66. package/dist/esm/packages/taco/src/components/Banner/util.js.map +1 -1
  67. package/dist/esm/packages/taco/src/components/Button/Button.js +28 -29
  68. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  69. package/dist/esm/packages/taco/src/components/Button/util.js +25 -24
  70. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  71. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +75 -71
  72. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  73. package/dist/esm/packages/taco/src/components/Card/Card.js +14 -15
  74. package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
  75. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +24 -22
  76. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
  77. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +21 -23
  78. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  79. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +76 -64
  80. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  81. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +60 -57
  82. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  83. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +27 -28
  84. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  85. package/dist/esm/packages/taco/src/components/Dialog/Context.js +4 -4
  86. package/dist/esm/packages/taco/src/components/Dialog/Context.js.map +1 -1
  87. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js +54 -39
  88. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  89. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +36 -38
  90. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  91. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js +3 -3
  92. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  93. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js +2 -2
  94. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js.map +1 -1
  95. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js +5 -6
  96. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js.map +1 -1
  97. package/dist/esm/packages/taco/src/components/Dialog/util.js +7 -3
  98. package/dist/esm/packages/taco/src/components/Dialog/util.js.map +1 -1
  99. package/dist/esm/packages/taco/src/components/Drawer/Context.js +5 -5
  100. package/dist/esm/packages/taco/src/components/Drawer/Context.js.map +1 -1
  101. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +61 -51
  102. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
  103. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +134 -145
  104. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  105. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js +1 -1
  106. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js.map +1 -1
  107. package/dist/esm/packages/taco/src/components/Drawer/util.js +5 -5
  108. package/dist/esm/packages/taco/src/components/Drawer/util.js.map +1 -1
  109. package/dist/esm/packages/taco/src/components/Field/Field.js +14 -12
  110. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  111. package/dist/esm/packages/taco/src/components/Form/Form.js +7 -6
  112. package/dist/esm/packages/taco/src/components/Form/Form.js.map +1 -1
  113. package/dist/esm/packages/taco/src/components/Group/Group.js +9 -7
  114. package/dist/esm/packages/taco/src/components/Group/Group.js.map +1 -1
  115. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +37 -36
  116. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
  117. package/dist/esm/packages/taco/src/components/Header/Header.js +2 -2
  118. package/dist/esm/packages/taco/src/components/Header/Header.js.map +1 -1
  119. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js +14 -10
  120. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  121. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js +5 -4
  122. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js.map +1 -1
  123. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js +7 -9
  124. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js.map +1 -1
  125. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +9 -9
  126. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  127. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +66 -46
  128. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  129. package/dist/esm/packages/taco/src/components/Header/components/Button.js +12 -8
  130. package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
  131. package/dist/esm/packages/taco/src/components/Header/components/Link.js +22 -18
  132. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  133. package/dist/esm/packages/taco/src/components/Header/components/Logo.js +4 -4
  134. package/dist/esm/packages/taco/src/components/Header/components/Logo.js.map +1 -1
  135. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +2 -2
  136. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
  137. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js +10 -9
  138. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js.map +1 -1
  139. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js +2 -2
  140. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js.map +1 -1
  141. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js +5 -7
  142. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js.map +1 -1
  143. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js +1 -1
  144. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js.map +1 -1
  145. package/dist/esm/packages/taco/src/components/Icon/Icon.js +7 -7
  146. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  147. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js +19 -0
  148. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js.map +1 -0
  149. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js +19 -0
  150. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js.map +1 -0
  151. package/dist/esm/packages/taco/src/components/Icon/components/Person.js +19 -0
  152. package/dist/esm/packages/taco/src/components/Icon/components/Person.js.map +1 -0
  153. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js +19 -0
  154. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js.map +1 -0
  155. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js +19 -0
  156. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js.map +1 -0
  157. package/dist/esm/packages/taco/src/components/Icon/components/index.js +14 -4
  158. package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
  159. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js +22 -23
  160. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
  161. package/dist/esm/packages/taco/src/components/Input/Input.js +45 -44
  162. package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
  163. package/dist/esm/packages/taco/src/components/Input/util.js +8 -5
  164. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  165. package/dist/esm/packages/taco/src/components/Layout/Layout.js +7 -5
  166. package/dist/esm/packages/taco/src/components/Layout/Layout.js.map +1 -1
  167. package/dist/esm/packages/taco/src/components/Layout/components/Content.js +2 -2
  168. package/dist/esm/packages/taco/src/components/Layout/components/Content.js.map +1 -1
  169. package/dist/esm/packages/taco/src/components/Layout/components/Context.js +4 -2
  170. package/dist/esm/packages/taco/src/components/Layout/components/Context.js.map +1 -1
  171. package/dist/esm/packages/taco/src/components/Layout/components/Page.js +2 -2
  172. package/dist/esm/packages/taco/src/components/Layout/components/Page.js.map +1 -1
  173. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +34 -27
  174. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  175. package/dist/esm/packages/taco/src/components/Layout/components/Top.js +9 -6
  176. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  177. package/dist/esm/packages/taco/src/components/List/components/Button.js +1 -1
  178. package/dist/esm/packages/taco/src/components/List/components/Button.js.map +1 -1
  179. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js +10 -7
  180. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js.map +1 -1
  181. package/dist/esm/packages/taco/src/components/List/components/Group.js +1 -1
  182. package/dist/esm/packages/taco/src/components/List/components/Group.js.map +1 -1
  183. package/dist/esm/packages/taco/src/components/List/components/Item.js +15 -13
  184. package/dist/esm/packages/taco/src/components/List/components/Item.js.map +1 -1
  185. package/dist/esm/packages/taco/src/components/List/components/Link.js +3 -3
  186. package/dist/esm/packages/taco/src/components/List/components/Link.js.map +1 -1
  187. package/dist/esm/packages/taco/src/components/List/components/Toggle.js +29 -27
  188. package/dist/esm/packages/taco/src/components/List/components/Toggle.js.map +1 -1
  189. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js +21 -26
  190. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js.map +1 -1
  191. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +82 -70
  192. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  193. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js +56 -51
  194. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js.map +1 -1
  195. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js +83 -65
  196. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js.map +1 -1
  197. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js +9 -10
  198. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js.map +1 -1
  199. package/dist/esm/packages/taco/src/components/Listbox/util.js +78 -48
  200. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  201. package/dist/esm/packages/taco/src/components/Menu/Context.js +2 -2
  202. package/dist/esm/packages/taco/src/components/Menu/Context.js.map +1 -1
  203. package/dist/esm/packages/taco/src/components/Menu/Menu.js +42 -26
  204. package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
  205. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js +8 -8
  206. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js.map +1 -1
  207. package/dist/esm/packages/taco/src/components/Menu/components/Content.js +27 -21
  208. package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
  209. package/dist/esm/packages/taco/src/components/Menu/components/Header.js +3 -3
  210. package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
  211. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +32 -32
  212. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  213. package/dist/esm/packages/taco/src/components/Menu/components/Link.js +10 -10
  214. package/dist/esm/packages/taco/src/components/Menu/components/Link.js.map +1 -1
  215. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js +15 -16
  216. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js.map +1 -1
  217. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js +1 -1
  218. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js.map +1 -1
  219. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js +7 -7
  220. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js.map +1 -1
  221. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +5 -5
  222. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
  223. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +6 -6
  224. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
  225. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +41 -36
  226. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  227. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js +6 -6
  228. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js.map +1 -1
  229. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js +6 -6
  230. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js.map +1 -1
  231. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +14 -11
  232. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
  233. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +31 -24
  234. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  235. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +7 -7
  236. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  237. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js +9 -7
  238. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js.map +1 -1
  239. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +48 -51
  240. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  241. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +26 -23
  242. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
  243. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +53 -39
  244. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  245. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js +17 -7
  246. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js.map +1 -1
  247. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js +8 -9
  248. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js.map +1 -1
  249. package/dist/esm/packages/taco/src/components/Popover/Popover.js +45 -43
  250. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  251. package/dist/esm/packages/taco/src/components/Popover/Primitives.js +1 -1
  252. package/dist/esm/packages/taco/src/components/Popover/Primitives.js.map +1 -1
  253. package/dist/esm/packages/taco/src/components/Popover/util.js +3 -1
  254. package/dist/esm/packages/taco/src/components/Popover/util.js.map +1 -1
  255. package/dist/esm/packages/taco/src/components/Progress/Progress.js +13 -11
  256. package/dist/esm/packages/taco/src/components/Progress/Progress.js.map +1 -1
  257. package/dist/esm/packages/taco/src/components/Provider/Localization.js +13 -12
  258. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  259. package/dist/esm/packages/taco/src/components/Provider/Provider.js +8 -8
  260. package/dist/esm/packages/taco/src/components/Provider/Provider.js.map +1 -1
  261. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +54 -47
  262. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  263. package/dist/esm/packages/taco/src/components/RadioGroup/util.js +7 -1
  264. package/dist/esm/packages/taco/src/components/RadioGroup/util.js.map +1 -1
  265. package/dist/esm/packages/taco/src/components/Report/Report.js +7 -5
  266. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  267. package/dist/esm/packages/taco/src/components/Report/useReport.js +1 -1
  268. package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
  269. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +17 -13
  270. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  271. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +11 -11
  272. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
  273. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +44 -39
  274. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  275. package/dist/esm/packages/taco/src/components/Select/Select.js +28 -31
  276. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  277. package/dist/esm/packages/taco/src/components/Select/useSelect.js +79 -70
  278. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  279. package/dist/esm/packages/taco/src/components/Select2/Select2.js +154 -121
  280. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  281. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js +2 -4
  282. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js.map +1 -1
  283. package/dist/esm/packages/taco/src/components/Select2/components/Context.js +4 -2
  284. package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
  285. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +45 -41
  286. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  287. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +145 -129
  288. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  289. package/dist/esm/packages/taco/src/components/Select2/components/Group.js +8 -8
  290. package/dist/esm/packages/taco/src/components/Select2/components/Group.js.map +1 -1
  291. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +36 -35
  292. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  293. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +9 -10
  294. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  295. package/dist/esm/packages/taco/src/components/Select2/components/Title.js +2 -2
  296. package/dist/esm/packages/taco/src/components/Select2/components/Title.js.map +1 -1
  297. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +173 -128
  298. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  299. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +32 -23
  300. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  301. package/dist/esm/packages/taco/src/components/Select2/utilities.js +13 -6
  302. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  303. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +16 -13
  304. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  305. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js +17 -12
  306. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js.map +1 -1
  307. package/dist/esm/packages/taco/src/components/Switch/Switch.js +14 -14
  308. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  309. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +28 -23
  310. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  311. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js +7 -3
  312. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js.map +1 -1
  313. package/dist/esm/packages/taco/src/components/Table/components/Table.js +22 -18
  314. package/dist/esm/packages/taco/src/components/Table/components/Table.js.map +1 -1
  315. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +100 -92
  316. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  317. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +136 -118
  318. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  319. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js +55 -55
  320. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  321. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js +35 -41
  322. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  323. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js +77 -71
  324. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  325. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js +56 -30
  326. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js.map +1 -1
  327. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js +151 -142
  328. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js.map +1 -1
  329. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js +22 -20
  330. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  331. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +9 -12
  332. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  333. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +41 -41
  334. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js.map +1 -1
  335. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js +16 -14
  336. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js.map +1 -1
  337. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js +32 -26
  338. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js.map +1 -1
  339. package/dist/esm/packages/taco/src/components/Table/util.js +37 -30
  340. package/dist/esm/packages/taco/src/components/Table/util.js.map +1 -1
  341. package/dist/esm/packages/taco/src/components/Table3/Table3.js +23 -23
  342. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  343. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js +13 -14
  344. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js.map +1 -1
  345. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +21 -23
  346. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  347. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js +20 -17
  348. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -1
  349. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +67 -73
  350. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  351. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js +2 -2
  352. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -1
  353. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +19 -20
  354. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -1
  355. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +26 -25
  356. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  357. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +45 -40
  358. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  359. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +7 -8
  360. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
  361. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +18 -19
  362. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
  363. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +7 -10
  364. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  365. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +38 -36
  366. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  367. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +15 -15
  368. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  369. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +8 -11
  370. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
  371. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +164 -201
  372. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -1
  373. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +40 -27
  374. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  375. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +18 -16
  376. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  377. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +25 -19
  378. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  379. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +29 -35
  380. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  381. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +34 -35
  382. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
  383. package/dist/esm/packages/taco/src/components/Tag/Tag.js +18 -16
  384. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  385. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js +8 -11
  386. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js.map +1 -1
  387. package/dist/esm/packages/taco/src/components/Toast/Toast.js +19 -20
  388. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  389. package/dist/esm/packages/taco/src/components/Toast/Toaster.js +117 -96
  390. package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
  391. package/dist/esm/packages/taco/src/components/Toast/util.js +6 -4
  392. package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
  393. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +10 -9
  394. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
  395. package/dist/esm/packages/taco/src/components/Tour/Tour.js +49 -46
  396. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  397. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +33 -27
  398. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  399. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js +15 -13
  400. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js.map +1 -1
  401. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js +1 -1
  402. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  403. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js +11 -6
  404. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js.map +1 -1
  405. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js +19 -13
  406. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js.map +1 -1
  407. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js +4 -4
  408. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
  409. package/dist/esm/packages/taco/src/hooks/useId.js +4 -2
  410. package/dist/esm/packages/taco/src/hooks/useId.js.map +1 -1
  411. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js +20 -18
  412. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
  413. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js +7 -5
  414. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js.map +1 -1
  415. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js +9 -5
  416. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js.map +1 -1
  417. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js +3 -1
  418. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js.map +1 -1
  419. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js +2 -2
  420. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js.map +1 -1
  421. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js +24 -22
  422. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js.map +1 -1
  423. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js +13 -6
  424. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js.map +1 -1
  425. package/dist/esm/packages/taco/src/hooks/useMergedRef.js +3 -3
  426. package/dist/esm/packages/taco/src/hooks/useMergedRef.js.map +1 -1
  427. package/dist/esm/packages/taco/src/hooks/usePrevious.js +2 -2
  428. package/dist/esm/packages/taco/src/hooks/usePrevious.js.map +1 -1
  429. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js +14 -14
  430. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js.map +1 -1
  431. package/dist/esm/packages/taco/src/primitives/Button.js +16 -13
  432. package/dist/esm/packages/taco/src/primitives/Button.js.map +1 -1
  433. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +50 -44
  434. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
  435. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js +4 -2
  436. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js.map +1 -1
  437. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js +9 -5
  438. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js.map +1 -1
  439. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js +16 -18
  440. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
  441. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +47 -40
  442. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
  443. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js +9 -10
  444. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js.map +1 -1
  445. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +22 -20
  446. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  447. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js +24 -27
  448. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  449. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js +11 -10
  450. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js.map +1 -1
  451. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +22 -19
  452. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  453. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js +25 -22
  454. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -1
  455. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js +6 -6
  456. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -1
  457. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +30 -14
  458. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  459. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js +18 -19
  460. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js.map +1 -1
  461. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +34 -34
  462. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
  463. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js +10 -12
  464. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js.map +1 -1
  465. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js +19 -18
  466. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -1
  467. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +42 -40
  468. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  469. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +5 -7
  470. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
  471. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +19 -24
  472. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  473. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +56 -55
  474. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
  475. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +27 -23
  476. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  477. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js +13 -16
  478. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js.map +1 -1
  479. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +86 -87
  480. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  481. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js +14 -11
  482. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  483. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +85 -58
  484. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  485. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js +18 -20
  486. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  487. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js +3 -3
  488. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  489. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js +11 -6
  490. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
  491. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +58 -49
  492. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  493. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js +28 -32
  494. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -1
  495. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js +44 -37
  496. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
  497. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js +1 -1
  498. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -1
  499. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js +11 -11
  500. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -1
  501. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js +6 -0
  502. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -0
  503. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js +23 -22
  504. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  505. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +59 -42
  506. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  507. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +39 -39
  508. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
  509. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +21 -16
  510. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
  511. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js +16 -15
  512. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -1
  513. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +51 -40
  514. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  515. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js +13 -9
  516. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js.map +1 -1
  517. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js +57 -51
  518. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  519. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +71 -67
  520. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -1
  521. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js +40 -37
  522. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -1
  523. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js +64 -44
  524. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  525. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js +62 -51
  526. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  527. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js +6 -6
  528. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -1
  529. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js +13 -5
  530. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js.map +1 -1
  531. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +93 -77
  532. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  533. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js +15 -15
  534. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js.map +1 -1
  535. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js +31 -41
  536. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js.map +1 -1
  537. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js +31 -30
  538. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js.map +1 -1
  539. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js +3 -3
  540. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -1
  541. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +14 -15
  542. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
  543. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js +2 -2
  544. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js.map +1 -1
  545. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  546. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +42 -36
  547. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  548. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js +67 -74
  549. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
  550. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js +11 -6
  551. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js.map +1 -1
  552. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js +5 -2
  553. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js.map +1 -1
  554. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js +15 -5
  555. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js.map +1 -1
  556. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js +5 -2
  557. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js.map +1 -1
  558. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js +26 -16
  559. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js.map +1 -1
  560. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js +9 -3
  561. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js.map +1 -1
  562. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js +42 -23
  563. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
  564. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js +9 -6
  565. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js.map +1 -1
  566. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js +9 -4
  567. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js.map +1 -1
  568. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js +5 -2
  569. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js.map +1 -1
  570. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js +9 -3
  571. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js.map +1 -1
  572. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js +5 -2
  573. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js.map +1 -1
  574. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js +1 -1
  575. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js.map +1 -1
  576. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js +15 -5
  577. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js.map +1 -1
  578. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js +14 -9
  579. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js.map +1 -1
  580. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +25 -13
  581. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
  582. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js +43 -22
  583. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js.map +1 -1
  584. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js +34 -24
  585. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  586. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js +4 -4
  587. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js.map +1 -1
  588. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js +3 -3
  589. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js.map +1 -1
  590. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js +18 -16
  591. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js.map +1 -1
  592. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js +2 -2
  593. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js.map +1 -1
  594. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js +6 -4
  595. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js.map +1 -1
  596. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js +8 -8
  597. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js.map +1 -1
  598. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js +6 -6
  599. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js.map +1 -1
  600. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js +8 -6
  601. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  602. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js +17 -17
  603. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  604. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js +2 -2
  605. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js.map +1 -1
  606. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +55 -55
  607. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  608. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js +59 -30
  609. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js.map +1 -1
  610. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js +4 -4
  611. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js.map +1 -1
  612. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js +33 -19
  613. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js.map +1 -1
  614. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +11 -11
  615. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
  616. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js +21 -19
  617. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  618. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js +6 -7
  619. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  620. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +138 -106
  621. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  622. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js +3 -1
  623. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  624. package/dist/esm/packages/taco/src/types.js +1 -1
  625. package/dist/esm/packages/taco/src/types.js.map +1 -1
  626. package/dist/esm/packages/taco/src/utils/aria.js +2 -2
  627. package/dist/esm/packages/taco/src/utils/aria.js.map +1 -1
  628. package/dist/esm/packages/taco/src/utils/date.js +47 -23
  629. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  630. package/dist/esm/packages/taco/src/utils/debounce.js +10 -4
  631. package/dist/esm/packages/taco/src/utils/debounce.js.map +1 -1
  632. package/dist/esm/packages/taco/src/utils/device.js +4 -2
  633. package/dist/esm/packages/taco/src/utils/device.js.map +1 -1
  634. package/dist/esm/packages/taco/src/utils/dom.js +26 -20
  635. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  636. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js +40 -38
  637. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js.map +1 -1
  638. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js +9 -7
  639. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js.map +1 -1
  640. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js +20 -9
  641. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  642. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js +9 -9
  643. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js.map +1 -1
  644. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js +8 -6
  645. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js.map +1 -1
  646. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js +16 -11
  647. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js.map +1 -1
  648. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js +11 -6
  649. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js.map +1 -1
  650. package/dist/esm/packages/taco/src/utils/input.js +10 -7
  651. package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
  652. package/dist/esm/packages/taco/src/utils/keyboard.js +8 -5
  653. package/dist/esm/packages/taco/src/utils/keyboard.js.map +1 -1
  654. package/dist/esm/packages/taco/src/utils/mergeRefs.js +2 -2
  655. package/dist/esm/packages/taco/src/utils/mergeRefs.js.map +1 -1
  656. package/dist/esm/packages/taco/src/utils/tailwind.js +5 -5
  657. package/dist/esm/packages/taco/src/utils/tailwind.js.map +1 -1
  658. package/dist/esm/packages/taco/tailwind.colors.js +1 -1
  659. package/dist/esm/packages/taco/tailwind.colors.js.map +1 -1
  660. package/dist/index.css +11 -2
  661. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.d.ts +3 -0
  662. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +0 -1
  663. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +0 -3
  664. package/dist/primitives/Table/types.d.ts +1 -1
  665. package/dist/primitives/Table/useTableManager/features/useTableServerLoading.d.ts +2 -1
  666. package/dist/taco.cjs.development.js +7944 -6916
  667. package/dist/taco.cjs.development.js.map +1 -1
  668. package/dist/taco.cjs.production.min.js +1 -1
  669. package/dist/taco.cjs.production.min.js.map +1 -1
  670. package/package.json +1 -2
@@ -1 +1 @@
1
- {"version":3,"file":"HideOrOrderPopover.js","sources":["../../../../../../../../../../../../src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { Table as ReactTable, Column as ReactTableColumn, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { Popover, PopoverProps } from '../../../../../../../components/Popover/Popover';\nimport { Input } from '../../../../../../../components/Input/Input';\nimport * as SortablePrimitive from '../../../../../../Sortable/Sortable';\nimport { Icon } from '../../../../../../../components/Icon/Icon';\nimport { Checkbox } from '../../../../../../../components/Checkbox/Checkbox';\nimport { useLocalization } from '../../../../../../../components/Provider/Localization';\nimport { ensureOrdering, isInternalColumn } from '../../../../../useTableManager/util/columns';\n\ntype ColumnProps<TType = unknown> = React.HTMLAttributes<HTMLDivElement> & {\n column: ReactTableColumn<TType, unknown>;\n draggable?: boolean;\n};\n\nconst Column = React.forwardRef(function Column<TType = unknown>(props: ColumnProps<TType>, ref: React.Ref<HTMLDivElement>) {\n const { column, draggable = false, ...dragAttributes } = props;\n const canHide = column.getCanHide();\n\n const className = cn('group/column flex items-center gap-x-2 rounded py-1 px-2', {\n 'hover:bg-grey-200': canHide || draggable,\n 'hover:cursor-pointer': canHide,\n 'active:cursor-move active:bg-grey-300': draggable,\n });\n\n const attributes = draggable ? dragAttributes : undefined;\n const isVisible = column.getIsVisible();\n const parentHeader = column.parent?.columnDef?.header;\n\n return (\n <div {...attributes} className={className} onClick={() => column.toggleVisibility(!isVisible)} ref={ref}>\n {draggable ? <Icon name=\"drag\" className=\"text-grey-500 group-hover/column:text-grey-700 -mx-2 !h-5\" /> : null}\n <span className=\"flex-grow truncate\">\n {column.columnDef.meta?.header}\n {parentHeader ? <span className=\"italic\">({parentHeader})</span> : null}\n </span>\n {canHide ? <Checkbox checked={isVisible} onChange={() => column.toggleVisibility(!isVisible)} /> : null}\n </div>\n );\n});\n\nexport type HideOrOrderPopoverProps<TType = unknown> = PopoverProps & {\n table: ReactTable<TType>;\n};\n\nexport function HideOrOrderPopover<TType = unknown>(props: HideOrOrderPopoverProps<TType>) {\n const { table, trigger, ...popoverProps } = props;\n const { texts } = useLocalization();\n const [query, setQuery] = React.useState('');\n const allColumns = table.getAllLeafColumns();\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const columns = React.useMemo(\n () =>\n allColumns\n .filter(column => !isInternalColumn(column.id))\n .filter(column =>\n query?.length\n ? column.columnDef.meta?.header.toLowerCase().includes(query.toLowerCase()) ||\n column.parent?.columnDef.meta?.header.toLowerCase().includes(query.toLowerCase())\n : true\n ),\n [allColumns, query]\n );\n\n const listClassName = 'flex max-h-64 flex-col gap-y-px overflow-auto';\n\n const handleReorder = (activeId, overId) => {\n if (columns.find(column => column.id === overId && column.columnDef.meta?.enableOrdering === false)) {\n return;\n }\n\n const currentOrder = table.getState().columnOrder;\n const nextOrder = ensureOrdering(\n allColumns,\n SortablePrimitive.arrayMove(\n currentOrder,\n currentOrder.findIndex(c => c === activeId),\n currentOrder.findIndex(c => c === overId)\n )\n );\n\n // update column order\n table.setColumnOrder(nextOrder);\n\n // update pinned columns - because we do index based \"freezing\" instead of just pinning, pinned state needs updating to align with ordering\n if (table.getIsSomeColumnsPinned()) {\n const currentFrozenIndex = table.getState().columnPinning.left?.length ?? -1;\n\n if (currentFrozenIndex > -1) {\n table.setColumnPinning(currentPinning => ({\n ...currentPinning,\n left: nextOrder.slice(0, currentFrozenIndex),\n }));\n }\n }\n };\n\n return (\n <Popover {...popoverProps} anchor={trigger}>\n <Popover.Content>\n <div className=\"flex min-w-[100px] max-w-sm flex-col gap-2\">\n {table.options.enableHiding ? (\n <Input\n onChange={event => setQuery(event.target.value)}\n placeholder={texts.table.columnSettings.search}\n value={query}\n />\n ) : null}\n {tableMeta.columnOrdering.isEnabled && columns.length && !query?.length ? (\n <SortablePrimitive.Container reorder={handleReorder}>\n <SortablePrimitive.List id=\"columns\" className={listClassName}>\n {columns\n .filter(column => !column.getIsGrouped())\n .map(column => (\n <SortablePrimitive.Item\n key={column.id}\n id={column.id}\n disabled={!column.columnDef.meta?.enableOrdering}\n asChild>\n <Column column={column as any} draggable={column.columnDef.meta?.enableOrdering} />\n </SortablePrimitive.Item>\n ))}\n </SortablePrimitive.List>\n </SortablePrimitive.Container>\n ) : (\n <div className={listClassName}>\n {columns.length\n ? columns.map(column => <Column column={column as any} key={column.id} />)\n : texts.table.columnSettings.noResults}\n </div>\n )}\n </div>\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["Column","React","forwardRef","props","ref","column","draggable","dragAttributes","canHide","getCanHide","className","cn","attributes","undefined","isVisible","getIsVisible","parentHeader","_column$parent","parent","_column$parent$column","columnDef","header","onClick","toggleVisibility","Icon","name","meta","_column$columnDef$met","Checkbox","checked","onChange","HideOrOrderPopover","table","trigger","popoverProps","texts","useLocalization","query","setQuery","useState","allColumns","getAllLeafColumns","tableMeta","options","columns","useMemo","filter","isInternalColumn","id","_column$columnDef$met2","_column$parent2","_column$parent2$colum","length","toLowerCase","includes","listClassName","handleReorder","activeId","overId","find","_column$columnDef$met3","enableOrdering","currentOrder","getState","columnOrder","nextOrder","ensureOrdering","SortablePrimitive","findIndex","c","setColumnOrder","getIsSomeColumnsPinned","_table$getState$colum","_table$getState$colum2","currentFrozenIndex","columnPinning","left","setColumnPinning","currentPinning","slice","Popover","anchor","Content","enableHiding","Input","event","target","value","placeholder","columnSettings","search","columnOrdering","isEnabled","reorder","getIsGrouped","map","_column$columnDef$met4","_column$columnDef$met5","key","disabled","asChild","noResults"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMA,MAAM,gBAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,MAAMA,CAAkBG,KAAyB,EAAEC,GAA8B;;EACtH,MAAM;IAAEC,MAAM;IAAEC,SAAS,GAAG,KAAK;IAAE,GAAGC;GAAgB,GAAGJ,KAAK;EAC9D,MAAMK,OAAO,GAAGH,MAAM,CAACI,UAAU,EAAE;EAEnC,MAAMC,SAAS,GAAGC,EAAE,CAAC,0DAA0D,EAAE;IAC7E,mBAAmB,EAAEH,OAAO,IAAIF,SAAS;IACzC,sBAAsB,EAAEE,OAAO;IAC/B,uCAAuC,EAAEF;GAC5C,CAAC;EAEF,MAAMM,UAAU,GAAGN,SAAS,GAAGC,cAAc,GAAGM,SAAS;EACzD,MAAMC,SAAS,GAAGT,MAAM,CAACU,YAAY,EAAE;EACvC,MAAMC,YAAY,IAAAC,cAAA,GAAGZ,MAAM,C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,MAAM,CAACyF,YAAY,EAAE,CAAC,CACxCC,GAAG,CAAC1F,MAAM;IAAA,IAAA2F,sBAAA,EAAAC,sBAAA;IAAA,oBACPhG,6BAACkE,IAAsB;MACnB+B,GAAG,EAAE7F,MAAM,CAAC2C,EAAE;MACdA,EAAE,EAAE3C,MAAM,CAAC2C,EAAE;MACbmD,QAAQ,EAAE,GAAAH,sBAAA,GAAC3F,MAAM,CAACe,SAAS,CAACM,IAAI,cAAAsE,sBAAA,eAArBA,sBAAA,CAAuBnC,cAAc;MAChDuC,OAAO;oBACPnG,6BAACD,MAAM;MAACK,MAAM,EAAEA,MAAa;MAAEC,SAAS,GAAA2F,sBAAA,GAAE5F,MAAM,CAACe,SAAS,CAACM,IAAI,cAAAuE,sBAAA,uBAArBA,sBAAA,CAAuBpC;MAAkB,CAC9D;GAC5B,CAAC,CACe,CACC,kBAE9B5D;IAAKS,SAAS,EAAE6C;KACXX,OAAO,CAACQ,MAAM,GACTR,OAAO,CAACmD,GAAG,CAAC1F,MAAM,iBAAIJ,6BAACD,MAAM;IAACK,MAAM,EAAEA,MAAa;IAAE6F,GAAG,EAAE7F,MAAM,CAAC2C;IAAM,CAAC,GACxEb,KAAK,CAACH,KAAK,CAACyD,cAAc,CAACY,SAAS,CACxC,CACT,CACC,CACQ,CACZ;AAElB;;;;"}
1
+ {"version":3,"file":"HideOrOrderPopover.js","sources":["../../../../../../../../../../../../src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { Table as ReactTable, Column as ReactTableColumn, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { Popover, PopoverProps } from '../../../../../../../components/Popover/Popover';\nimport { Input } from '../../../../../../../components/Input/Input';\nimport * as SortablePrimitive from '../../../../../../Sortable/Sortable';\nimport { Icon } from '../../../../../../../components/Icon/Icon';\nimport { Checkbox } from '../../../../../../../components/Checkbox/Checkbox';\nimport { useLocalization } from '../../../../../../../components/Provider/Localization';\nimport { ensureOrdering, isInternalColumn } from '../../../../../useTableManager/util/columns';\n\ntype ColumnProps<TType = unknown> = React.HTMLAttributes<HTMLDivElement> & {\n column: ReactTableColumn<TType, unknown>;\n draggable?: boolean;\n};\n\nconst Column = React.forwardRef(function Column<TType = unknown>(props: ColumnProps<TType>, ref: React.Ref<HTMLDivElement>) {\n const { column, draggable = false, ...dragAttributes } = props;\n const canHide = column.getCanHide();\n\n const className = cn('group/column flex items-center gap-x-2 rounded py-1 px-2', {\n 'hover:bg-grey-200': canHide || draggable,\n 'hover:cursor-pointer': canHide,\n 'active:cursor-move active:bg-grey-300': draggable,\n });\n\n const attributes = draggable ? dragAttributes : undefined;\n const isVisible = column.getIsVisible();\n const parentHeader = column.parent?.columnDef?.header;\n\n return (\n <div {...attributes} className={className} onClick={() => column.toggleVisibility(!isVisible)} ref={ref}>\n {draggable ? <Icon name=\"drag\" className=\"text-grey-500 group-hover/column:text-grey-700 -mx-2 !h-5\" /> : null}\n <span className=\"flex-grow truncate\">\n {column.columnDef.meta?.header}\n {parentHeader ? <span className=\"italic\">({parentHeader})</span> : null}\n </span>\n {canHide ? <Checkbox checked={isVisible} onChange={() => column.toggleVisibility(!isVisible)} /> : null}\n </div>\n );\n});\n\nexport type HideOrOrderPopoverProps<TType = unknown> = PopoverProps & {\n table: ReactTable<TType>;\n};\n\nexport function HideOrOrderPopover<TType = unknown>(props: HideOrOrderPopoverProps<TType>) {\n const { table, trigger, ...popoverProps } = props;\n const { texts } = useLocalization();\n const [query, setQuery] = React.useState('');\n const allColumns = table.getAllLeafColumns();\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const columns = React.useMemo(\n () =>\n allColumns\n .filter(column => !isInternalColumn(column.id))\n .filter(column =>\n query?.length\n ? column.columnDef.meta?.header.toLowerCase().includes(query.toLowerCase()) ||\n column.parent?.columnDef.meta?.header.toLowerCase().includes(query.toLowerCase())\n : true\n ),\n [allColumns, query]\n );\n\n const listClassName = 'flex max-h-64 flex-col gap-y-px overflow-auto';\n\n const handleReorder = (activeId, overId) => {\n if (columns.find(column => column.id === overId && column.columnDef.meta?.enableOrdering === false)) {\n return;\n }\n\n const currentOrder = table.getState().columnOrder;\n const nextOrder = ensureOrdering(\n allColumns,\n SortablePrimitive.arrayMove(\n currentOrder,\n currentOrder.findIndex(c => c === activeId),\n currentOrder.findIndex(c => c === overId)\n )\n );\n\n // update column order\n table.setColumnOrder(nextOrder);\n\n // update pinned columns - because we do index based \"freezing\" instead of just pinning, pinned state needs updating to align with ordering\n if (table.getIsSomeColumnsPinned()) {\n const currentFrozenIndex = table.getState().columnPinning.left?.length ?? -1;\n\n if (currentFrozenIndex > -1) {\n table.setColumnPinning(currentPinning => ({\n ...currentPinning,\n left: nextOrder.slice(0, currentFrozenIndex),\n }));\n }\n }\n };\n\n return (\n <Popover {...popoverProps} anchor={trigger}>\n <Popover.Content>\n <div className=\"flex min-w-[100px] max-w-sm flex-col gap-2\">\n {table.options.enableHiding ? (\n <Input\n onChange={event => setQuery(event.target.value)}\n placeholder={texts.table.columnSettings.search}\n value={query}\n />\n ) : null}\n {tableMeta.columnOrdering.isEnabled && columns.length && !query?.length ? (\n <SortablePrimitive.Container reorder={handleReorder}>\n <SortablePrimitive.List id=\"columns\" className={listClassName}>\n {columns\n .filter(column => !column.getIsGrouped())\n .map(column => (\n <SortablePrimitive.Item\n key={column.id}\n id={column.id}\n disabled={!column.columnDef.meta?.enableOrdering}\n asChild>\n <Column column={column as any} draggable={column.columnDef.meta?.enableOrdering} />\n </SortablePrimitive.Item>\n ))}\n </SortablePrimitive.List>\n </SortablePrimitive.Container>\n ) : (\n <div className={listClassName}>\n {columns.length\n ? columns.map(column => <Column column={column as any} key={column.id} />)\n : texts.table.columnSettings.noResults}\n </div>\n )}\n </div>\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["Column","React","forwardRef","props","ref","column","_props$draggable","draggable","dragAttributes","_objectWithoutPropertiesLoose","_excluded","canHide","getCanHide","className","cn","attributes","undefined","isVisible","getIsVisible","parentHeader","_column$parent","parent","_column$parent$column","columnDef","header","onClick","toggleVisibility","Icon","name","meta","_column$columnDef$met","Checkbox","checked","onChange","HideOrOrderPopover","table","trigger","popoverProps","_excluded2","_useLocalization","useLocalization","texts","_React$useState","useState","query","setQuery","allColumns","getAllLeafColumns","tableMeta","options","columns","useMemo","filter","isInternalColumn","id","_column$columnDef$met2","_column$parent2","_column$parent2$colum","length","toLowerCase","includes","listClassName","handleReorder","activeId","overId","find","_column$columnDef$met3","enableOrdering","currentOrder","getState","columnOrder","nextOrder","ensureOrdering","SortablePrimitive","findIndex","c","setColumnOrder","getIsSomeColumnsPinned","_table$getState$colum","_table$getState$colum2","currentFrozenIndex","columnPinning","left","setColumnPinning","currentPinning","_extends","slice","Popover","anchor","Content","enableHiding","Input","event","target","value","placeholder","columnSettings","search","columnOrdering","isEnabled","reorder","getIsGrouped","map","_column$columnDef$met4","_column$columnDef$met5","key","disabled","asChild","noResults"],"mappings":";;;;;;;;;;;;;;;;AAgBA,IAAMA,MAAM,gBAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,MAAMA,CAAkBG,KAAyB,EAAEC,GAA8B;;EACtH,IAAQC,MAAM,GAA2CF,KAAK,CAAtDE,MAAM;IAAAC,gBAAA,GAA2CH,KAAK,CAA9CI,SAAS;IAATA,SAAS,GAAAD,gBAAA,cAAG,KAAK,GAAAA,gBAAA;IAAKE,cAAc,GAAAC,6BAAA,CAAKN,KAAK,EAAAO,SAAA;EAC9D,IAAMC,OAAO,GAAGN,MAAM,CAACO,UAAU,EAAE;EAEnC,IAAMC,SAAS,GAAGC,EAAE,CAAC,0DAA0D,EAAE;IAC7E,mBAAmB,EAAEH,OAAO,IAAIJ,SAAS;IACzC,sBAAsB,EAAEI,OAAO;IAC/B,uCAAuC,EAAEJ;GAC5C,CAAC;EAEF,IAAMQ,UAAU,GAAGR,SAAS,GAAGC,cAAc,GAAGQ,SAAS;EACzD,IAAMC,SAAS,GAAGZ,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ings } from '../../../../../useTableManager/util/settings.js';
7
7
  import { HideOrOrderPopover } from './HideOrOrderPopover.js';
8
8
 
9
9
  function Settings(props) {
10
- const {
11
- customSettings,
12
- table
13
- } = props;
14
- const {
15
- texts
16
- } = useLocalization();
17
- const tableMeta = table.options.meta;
18
- const canHideOrOrder = table.options.enableHiding || tableMeta.columnOrdering.isEnabled;
19
- const canChangeFontSize = tableMeta.fontSize.isEnabled;
20
- const canChangeRowHeight = tableMeta.rowHeight.isEnabled;
21
- const [popover, setPopover] = React__default.useState(undefined);
22
- let popoverElement;
10
+ var customSettings = props.customSettings,
11
+ table = props.table;
12
+ var _useLocalization = useLocalization(),
13
+ texts = _useLocalization.texts;
14
+ var tableMeta = table.options.meta;
15
+ var canHideOrOrder = table.options.enableHiding || tableMeta.columnOrdering.isEnabled;
16
+ var canChangeFontSize = tableMeta.fontSize.isEnabled;
17
+ var canChangeRowHeight = tableMeta.rowHeight.isEnabled;
18
+ var _React$useState = React__default.useState(undefined),
19
+ popover = _React$useState[0],
20
+ setPopover = _React$useState[1];
21
+ var popoverElement;
23
22
  if (popover) {
24
- const handleClosePopover = () => setPopover(undefined);
23
+ var handleClosePopover = function handleClosePopover() {
24
+ return setPopover(undefined);
25
+ };
25
26
  switch (popover) {
26
27
  case 'columnSettings':
27
28
  {
28
29
  if (canHideOrOrder) {
29
- popoverElement = popoverProps => (/*#__PURE__*/React__default.createElement(HideOrOrderPopover, Object.assign({}, popoverProps, {
30
- open: true,
31
- onChange: handleClosePopover,
32
- table: table
33
- })));
30
+ popoverElement = function popoverElement(popoverProps) {
31
+ return /*#__PURE__*/React__default.createElement(HideOrOrderPopover, Object.assign({}, popoverProps, {
32
+ open: true,
33
+ onChange: handleClosePopover,
34
+ table: table
35
+ }));
36
+ };
34
37
  }
35
38
  }
36
39
  }
@@ -38,35 +41,45 @@ function Settings(props) {
38
41
  return /*#__PURE__*/React__default.createElement(IconButton, {
39
42
  "aria-label": texts.table.otherOptions.tooltip,
40
43
  icon: "sliders",
41
- menu: popoverElement ? undefined : menuProps => (/*#__PURE__*/React__default.createElement(Menu, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu.Content, {
42
- align: "end"
43
- }, canHideOrOrder ? (/*#__PURE__*/React__default.createElement(Menu.Item, {
44
- icon: "columns",
45
- onClick: () => setPopover('columnSettings')
46
- }, texts.table.columnSettings.button)) : null, canHideOrOrder && (canChangeRowHeight || canChangeFontSize || customSettings) ? (/*#__PURE__*/React__default.createElement(Menu.Separator, null)) : null, canChangeRowHeight ? (/*#__PURE__*/React__default.createElement(Menu.Item, {
47
- icon: `height-${tableMeta.rowHeight.height}`,
48
- subMenu: () => /*#__PURE__*/React__default.createElement(RowHeightMenuItem, {
49
- tableMeta: tableMeta
50
- })
51
- }, texts.table.rowHeight.tooltip)) : null, canChangeFontSize ? (/*#__PURE__*/React__default.createElement(Menu.Item, {
52
- icon: "font-size",
53
- subMenu: () => /*#__PURE__*/React__default.createElement(FontSizeMenuItem, {
54
- tableMeta: tableMeta
55
- })
56
- }, texts.table.fontSize.tooltip)) : null, customSettings ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, canChangeRowHeight || canChangeFontSize ? /*#__PURE__*/React__default.createElement(Menu.Separator, null) : null, customSettings(getSettings(table)).map((item, index) => (/*#__PURE__*/React__default.createElement(React__default.Fragment, {
57
- key: index
58
- }, item))))) : null))),
44
+ menu: popoverElement ? undefined : function (menuProps) {
45
+ return /*#__PURE__*/React__default.createElement(Menu, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu.Content, {
46
+ align: "end"
47
+ }, canHideOrOrder ? (/*#__PURE__*/React__default.createElement(Menu.Item, {
48
+ icon: "columns",
49
+ onClick: function onClick() {
50
+ return setPopover('columnSettings');
51
+ }
52
+ }, texts.table.columnSettings.button)) : null, canHideOrOrder && (canChangeRowHeight || canChangeFontSize || customSettings) ? (/*#__PURE__*/React__default.createElement(Menu.Separator, null)) : null, canChangeRowHeight ? (/*#__PURE__*/React__default.createElement(Menu.Item, {
53
+ icon: "height-" + tableMeta.rowHeight.height,
54
+ subMenu: function subMenu() {
55
+ return /*#__PURE__*/React__default.createElement(RowHeightMenuItem, {
56
+ tableMeta: tableMeta
57
+ });
58
+ }
59
+ }, texts.table.rowHeight.tooltip)) : null, canChangeFontSize ? (/*#__PURE__*/React__default.createElement(Menu.Item, {
60
+ icon: "font-size",
61
+ subMenu: function subMenu() {
62
+ return /*#__PURE__*/React__default.createElement(FontSizeMenuItem, {
63
+ tableMeta: tableMeta
64
+ });
65
+ }
66
+ }, texts.table.fontSize.tooltip)) : null, customSettings ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, canChangeRowHeight || canChangeFontSize ? /*#__PURE__*/React__default.createElement(Menu.Separator, null) : null, customSettings(getSettings(table)).map(function (item, index) {
67
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
68
+ key: index
69
+ }, item);
70
+ }))) : null));
71
+ },
59
72
  popover: popoverElement,
60
- onClickCapture: event => event.preventDefault(),
73
+ onClickCapture: function onClickCapture(event) {
74
+ return event.preventDefault();
75
+ },
61
76
  tooltip: texts.table.otherOptions.tooltip
62
77
  });
63
78
  }
64
- function FontSizeMenuItem({
65
- tableMeta
66
- }) {
67
- const {
68
- texts
69
- } = useLocalization();
79
+ function FontSizeMenuItem(_ref) {
80
+ var tableMeta = _ref.tableMeta;
81
+ var _useLocalization2 = useLocalization(),
82
+ texts = _useLocalization2.texts;
70
83
  return /*#__PURE__*/React__default.createElement(Menu.SubMenu, null, /*#__PURE__*/React__default.createElement(Menu.RadioGroup, {
71
84
  onChange: tableMeta.fontSize.setSize,
72
85
  value: tableMeta.fontSize.size
@@ -79,18 +92,16 @@ function FontSizeMenuItem({
79
92
  value: FontSizes.large
80
93
  }, texts.table.fontSize.sizes.large)));
81
94
  }
82
- function RowHeightMenuItem({
83
- tableMeta
84
- }) {
85
- const {
86
- texts
87
- } = useLocalization();
95
+ function RowHeightMenuItem(_ref2) {
96
+ var tableMeta = _ref2.tableMeta;
97
+ var _useLocalization3 = useLocalization(),
98
+ texts = _useLocalization3.texts;
88
99
  return /*#__PURE__*/React__default.createElement(Menu.SubMenu, null, /*#__PURE__*/React__default.createElement(Menu.RadioGroup, {
89
100
  onChange: tableMeta.rowHeight.setHeight,
90
101
  value: tableMeta.rowHeight.height
91
102
  }, /*#__PURE__*/React__default.createElement(Menu.RadioGroup.Item, {
92
103
  value: "short"
93
- }, texts.table.rowHeight.sizes.short), /*#__PURE__*/React__default.createElement(Menu.RadioGroup.Item, {
104
+ }, texts.table.rowHeight.sizes["short"]), /*#__PURE__*/React__default.createElement(Menu.RadioGroup.Item, {
94
105
  value: "medium"
95
106
  }, texts.table.rowHeight.sizes.medium), /*#__PURE__*/React__default.createElement(Menu.RadioGroup.Item, {
96
107
  value: "tall"
@@ -1 +1 @@
1
- {"version":3,"file":"Settings.js","sources":["../../../../../../../../../../../../src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { IconButton } from '../../../../../../../components/IconButton/IconButton';\nimport { useLocalization } from '../../../../../../../components/Provider/Localization';\nimport { Menu } from '../../../../../../../components/Menu/Menu';\nimport { HideOrOrderPopover } from './HideOrOrderPopover';\nimport { getSettings } from '../../../../../useTableManager/util/settings';\nimport { FontSizes } from '../../../../../../../types';\nimport { IconName } from '../../../../../../../components/Icon/Icon';\nimport { TableCustomSettingsRenderer } from '../../../../../types';\n\nexport type SettingsProps<TType = unknown> = {\n customSettings?: TableCustomSettingsRenderer;\n table: ReactTable<TType>;\n};\n\nexport function Settings<TType = unknown>(props: SettingsProps<TType>) {\n const { customSettings, table } = props;\n const { texts } = useLocalization();\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n const canHideOrOrder = table.options.enableHiding || tableMeta.columnOrdering.isEnabled;\n const canChangeFontSize = tableMeta.fontSize.isEnabled;\n const canChangeRowHeight = tableMeta.rowHeight.isEnabled;\n\n const [popover, setPopover] = React.useState<string | undefined>(undefined);\n\n let popoverElement;\n\n if (popover) {\n const handleClosePopover = () => setPopover(undefined);\n\n switch (popover) {\n case 'columnSettings': {\n if (canHideOrOrder) {\n popoverElement = popoverProps => (\n <HideOrOrderPopover {...popoverProps} open onChange={handleClosePopover} table={table} />\n );\n }\n }\n }\n }\n\n return (\n <IconButton\n aria-label={texts.table.otherOptions.tooltip}\n icon=\"sliders\"\n menu={\n popoverElement\n ? undefined\n : menuProps => (\n <Menu {...menuProps}>\n <Menu.Content align=\"end\">\n {canHideOrOrder ? (\n <Menu.Item icon=\"columns\" onClick={() => setPopover('columnSettings')}>\n {texts.table.columnSettings.button}\n </Menu.Item>\n ) : null}\n {canHideOrOrder && (canChangeRowHeight || canChangeFontSize || customSettings) ? (\n <Menu.Separator />\n ) : null}\n {canChangeRowHeight ? (\n <Menu.Item\n icon={`height-${tableMeta.rowHeight.height}` as IconName}\n subMenu={() => <RowHeightMenuItem tableMeta={tableMeta} />}>\n {texts.table.rowHeight.tooltip}\n </Menu.Item>\n ) : null}\n {canChangeFontSize ? (\n <Menu.Item icon=\"font-size\" subMenu={() => <FontSizeMenuItem tableMeta={tableMeta} />}>\n {texts.table.fontSize.tooltip}\n </Menu.Item>\n ) : null}\n\n {customSettings ? (\n <>\n {canChangeRowHeight || canChangeFontSize ? <Menu.Separator /> : null}\n {customSettings(getSettings(table)).map((item, index) => (\n <React.Fragment key={index}>{item}</React.Fragment>\n ))}\n </>\n ) : null}\n </Menu.Content>\n </Menu>\n )\n }\n popover={popoverElement}\n onClickCapture={event => event.preventDefault()}\n tooltip={texts.table.otherOptions.tooltip}\n />\n );\n}\n\nfunction FontSizeMenuItem<TType = unknown>({ tableMeta }: { tableMeta: ReactTableMeta<TType> }) {\n const { texts } = useLocalization();\n\n return (\n <Menu.SubMenu>\n <Menu.RadioGroup onChange={tableMeta.fontSize.setSize as any} value={tableMeta.fontSize.size}>\n <Menu.RadioGroup.Item value={FontSizes.small}>{texts.table.fontSize.sizes.small}</Menu.RadioGroup.Item>\n <Menu.RadioGroup.Item value={FontSizes.medium}>{texts.table.fontSize.sizes.medium}</Menu.RadioGroup.Item>\n <Menu.RadioGroup.Item disabled={tableMeta.rowHeight.height === 'short'} value={FontSizes.large}>\n {texts.table.fontSize.sizes.large}\n </Menu.RadioGroup.Item>\n </Menu.RadioGroup>\n </Menu.SubMenu>\n );\n}\n\nfunction RowHeightMenuItem<TType = unknown>({ tableMeta }: { tableMeta: ReactTableMeta<TType> }) {\n const { texts } = useLocalization();\n\n return (\n <Menu.SubMenu>\n <Menu.RadioGroup onChange={tableMeta.rowHeight.setHeight as any} value={tableMeta.rowHeight.height}>\n <Menu.RadioGroup.Item value=\"short\">{texts.table.rowHeight.sizes.short}</Menu.RadioGroup.Item>\n <Menu.RadioGroup.Item value=\"medium\">{texts.table.rowHeight.sizes.medium}</Menu.RadioGroup.Item>\n <Menu.RadioGroup.Item value=\"tall\">{texts.table.rowHeight.sizes.tall}</Menu.RadioGroup.Item>\n <Menu.RadioGroup.Item value=\"extra-tall\">{texts.table.rowHeight.sizes.extraTall}</Menu.RadioGroup.Item>\n </Menu.RadioGroup>\n </Menu.SubMenu>\n );\n}\n"],"names":["Settings","props","customSettings","table","texts","useLocalization","tableMeta","options","meta","canHideOrOrder","enableHiding","columnOrdering","isEnabled","canChangeFontSize","fontSize","canChangeRowHeight","rowHeight","popover","setPopover","React","useState","undefined","popoverElement","handleClosePopover","popoverProps","HideOrOrderPopover","open","onChange","IconButton","otherOptions","tooltip","icon","menu","menuProps","Menu","Content","align","Item","onClick","columnSettings","button","Separator","height","subMenu","RowHeightMenuItem","FontSizeMenuItem","getSettings","map","item","index","Fragment","key","onClickCapture","event","preventDefault","SubMenu","RadioGroup","setSize","value","size","FontSizes","small","sizes","medium","disabled","large","setHeight","short","tall","extraTall"],"mappings":";;;;;;;;SAgBgBA,QAAQA,CAAkBC,KAA2B;EACjE,MAAM;IAAEC,cAAc;IAAE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QtD,KAAK,CAACD,KAAK,CAACa,SAAS,CAAC8C,KAAK,CAACM,IAAI,CAAwB,eAC5FjD,6BAACe,IAAI,CAACsB,UAAU,CAACnB,IAAI;IAACqB,KAAK,EAAC;KAActD,KAAK,CAACD,KAAK,CAACa,SAAS,CAAC8C,KAAK,CAACO,SAAS,CAAwB,CACzF,CACP;AAEvB;;;;"}
1
+ {"version":3,"file":"Settings.js","sources":["../../../../../../../../../../../../src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { IconButton } from '../../../../../../../components/IconButton/IconButton';\nimport { useLocalization } from '../../../../../../../components/Provider/Localization';\nimport { Menu } from '../../../../../../../components/Menu/Menu';\nimport { HideOrOrderPopover } from './HideOrOrderPopover';\nimport { getSettings } from '../../../../../useTableManager/util/settings';\nimport { FontSizes } from '../../../../../../../types';\nimport { IconName } from '../../../../../../../components/Icon/Icon';\nimport { TableCustomSettingsRenderer } from '../../../../../types';\n\nexport type SettingsProps<TType = unknown> = {\n customSettings?: TableCustomSettingsRenderer;\n table: ReactTable<TType>;\n};\n\nexport function Settings<TType = unknown>(props: SettingsProps<TType>) {\n const { customSettings, table } = props;\n const { texts } = useLocalization();\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n const canHideOrOrder = table.options.enableHiding || tableMeta.columnOrdering.isEnabled;\n const canChangeFontSize = tableMeta.fontSize.isEnabled;\n const canChangeRowHeight = tableMeta.rowHeight.isEnabled;\n\n const [popover, setPopover] = React.useState<string | undefined>(undefined);\n\n let popoverElement;\n\n if (popover) {\n const handleClosePopover = () => setPopover(undefined);\n\n switch (popover) {\n case 'columnSettings': {\n if (canHideOrOrder) {\n popoverElement = popoverProps => (\n <HideOrOrderPopover {...popoverProps} open onChange={handleClosePopover} table={table} />\n );\n }\n }\n }\n }\n\n return (\n <IconButton\n aria-label={texts.table.otherOptions.tooltip}\n icon=\"sliders\"\n menu={\n popoverElement\n ? undefined\n : menuProps => (\n <Menu {...menuProps}>\n <Menu.Content align=\"end\">\n {canHideOrOrder ? (\n <Menu.Item icon=\"columns\" onClick={() => setPopover('columnSettings')}>\n {texts.table.columnSettings.button}\n </Menu.Item>\n ) : null}\n {canHideOrOrder && (canChangeRowHeight || canChangeFontSize || customSettings) ? (\n <Menu.Separator />\n ) : null}\n {canChangeRowHeight ? (\n <Menu.Item\n icon={`height-${tableMeta.rowHeight.height}` as IconName}\n subMenu={() => <RowHeightMenuItem tableMeta={tableMeta} />}>\n {texts.table.rowHeight.tooltip}\n </Menu.Item>\n ) : null}\n {canChangeFontSize ? (\n <Menu.Item icon=\"font-size\" subMenu={() => <FontSizeMenuItem tableMeta={tableMeta} />}>\n {texts.table.fontSize.tooltip}\n </Menu.Item>\n ) : null}\n\n {customSettings ? (\n <>\n {canChangeRowHeight || canChangeFontSize ? <Menu.Separator /> : null}\n {customSettings(getSettings(table)).map((item, index) => (\n <React.Fragment key={index}>{item}</React.Fragment>\n ))}\n </>\n ) : null}\n </Menu.Content>\n </Menu>\n )\n }\n popover={popoverElement}\n onClickCapture={event => event.preventDefault()}\n tooltip={texts.table.otherOptions.tooltip}\n />\n );\n}\n\nfunction FontSizeMenuItem<TType = unknown>({ tableMeta }: { tableMeta: ReactTableMeta<TType> }) {\n const { texts } = useLocalization();\n\n return (\n <Menu.SubMenu>\n <Menu.RadioGroup onChange={tableMeta.fontSize.setSize as any} value={tableMeta.fontSize.size}>\n <Menu.RadioGroup.Item value={FontSizes.small}>{texts.table.fontSize.sizes.small}</Menu.RadioGroup.Item>\n <Menu.RadioGroup.Item value={FontSizes.medium}>{texts.table.fontSize.sizes.medium}</Menu.RadioGroup.Item>\n <Menu.RadioGroup.Item disabled={tableMeta.rowHeight.height === 'short'} value={FontSizes.large}>\n {texts.table.fontSize.sizes.large}\n </Menu.RadioGroup.Item>\n </Menu.RadioGroup>\n </Menu.SubMenu>\n );\n}\n\nfunction RowHeightMenuItem<TType = unknown>({ tableMeta }: { tableMeta: ReactTableMeta<TType> }) {\n const { texts } = useLocalization();\n\n return (\n <Menu.SubMenu>\n <Menu.RadioGroup onChange={tableMeta.rowHeight.setHeight as any} value={tableMeta.rowHeight.height}>\n <Menu.RadioGroup.Item value=\"short\">{texts.table.rowHeight.sizes.short}</Menu.RadioGroup.Item>\n <Menu.RadioGroup.Item value=\"medium\">{texts.table.rowHeight.sizes.medium}</Menu.RadioGroup.Item>\n <Menu.RadioGroup.Item value=\"tall\">{texts.table.rowHeight.sizes.tall}</Menu.RadioGroup.Item>\n <Menu.RadioGroup.Item value=\"extra-tall\">{texts.table.rowHeight.sizes.extraTall}</Menu.RadioGroup.Item>\n </Menu.RadioGroup>\n </Menu.SubMenu>\n );\n}\n"],"names":["Settings","props","customSettings","table","_useLocalization","useLocalization","texts","tableMeta","options","meta","canHideOrOrder","enableHiding","columnOrdering","isEnabled","canChangeFontSize","fontSize","canChangeRowHeight","rowHeight","_React$useState","React","useState","undefined","popover","setPopover","popoverElement","handleClosePopover","popoverProps","HideOrOrderPopover","open","onChange","IconButton","otherOptions","tooltip","icon","menu","menuProps","Menu","Content","align","Item","onClick","columnSettings","button","Separator","height","subMenu","RowHeightMenuItem","FontSizeMenuItem","getSettings","map","item","index","Fragment","key","onClickCapture","event","preventDefault","_ref","_useLocalization2","SubMenu","RadioGroup","setSize","value","size","FontSizes","small","sizes","medium","disabled","large","_ref2","_useLocalization3","setHeight","tall","extraTall"],"mappings":";;;;;;;;SAgBgBA,QAAQA,CAAkBC,KAA2B;EACjE,IAAQC,cAAc,GAAYD,KAAK,CAA/BC,cAAc;IAAEC,KAAK,GAAKF,KAAK,CAAfE,KAAK;EAC7B,IAAAC,gBAAA,GAAkBC,eAAe,EAAE;IAA3BC,KAAK,GAAAF,gBAAA,CAALE,KAAK;EACb,IAAMC,SAAS,GAAGJ,KAAK,CAACK,OAAO,CAACC,IAA6B;EAE7D,IAAMC,cAAc,GAAGP,KAAK,CAACK,OA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AACuB,KAAK,EAAC;KAAUxD,KAAK,CAACH,KAAK,CAACc,SAAS,CAACiD,KAAK,CAACC,MAAM,CAAwB,eAChGhD,6BAACiB,IAAI,CAACwB,UAAU,CAACrB,IAAI;IAACuB,KAAK,EAAC;KAAQxD,KAAK,CAACH,KAAK,CAACc,SAAS,CAACiD,KAAK,CAACO,IAAI,CAAwB,eAC5FtD,6BAACiB,IAAI,CAACwB,UAAU,CAACrB,IAAI;IAACuB,KAAK,EAAC;KAAcxD,KAAK,CAACH,KAAK,CAACc,SAAS,CAACiD,KAAK,CAACQ,SAAS,CAAwB,CACzF,CACP;AAEvB;;;;"}
@@ -2,11 +2,11 @@ import React__default from 'react';
2
2
  import { isElementInsideOverlay, isSiblingElementInsideSameParentOverlay, isElementInteractive, isElementInsideOrTriggeredFromContainer } from '../../../../utils/dom.js';
3
3
 
4
4
  function useTableGlobalShortcuts(table, tableRef, scrollToIndex) {
5
- const tableMeta = table.options.meta;
6
- const rows = table.getRowModel().rows;
7
- React__default.useEffect(() => {
8
- const handleKeyDown = event => {
9
- const trigger = event.target;
5
+ var tableMeta = table.options.meta;
6
+ var rows = table.getRowModel().rows;
7
+ React__default.useEffect(function () {
8
+ var handleKeyDown = function handleKeyDown(event) {
9
+ var trigger = event.target;
10
10
  if (isElementInsideOverlay(trigger) && !isSiblingElementInsideSameParentOverlay(trigger, tableRef.current) || isElementInteractive(trigger) && !isElementInsideOrTriggeredFromContainer(trigger, tableRef.current)) {
11
11
  return;
12
12
  }
@@ -18,7 +18,7 @@ function useTableGlobalShortcuts(table, tableRef, scrollToIndex) {
18
18
  }
19
19
  };
20
20
  document.addEventListener('keydown', handleKeyDown);
21
- return () => {
21
+ return function () {
22
22
  document.removeEventListener('keydown', handleKeyDown);
23
23
  };
24
24
  },
@@ -1 +1 @@
1
- {"version":3,"file":"useTableGlobalShortcuts.js","sources":["../../../../../../../../../src/primitives/Table/Core/features/useTableGlobalShortcuts.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { TableRef } from '../../types';\nimport {\n isElementInsideOrTriggeredFromContainer,\n isElementInsideOverlay,\n isElementInteractive,\n isSiblingElementInsideSameParentOverlay,\n} from '../../../../utils/dom';\n\nexport function useTableGlobalShortcuts<TType = unknown>(\n table: ReactTable<TType>,\n tableRef: React.RefObject<TableRef>,\n scrollToIndex: (index: number) => void\n) {\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const rows = table.getRowModel().rows;\n\n React.useEffect(\n () => {\n const handleKeyDown = (event: KeyboardEvent) => {\n const trigger = event.target as HTMLElement;\n\n if (\n (isElementInsideOverlay(trigger) && !isSiblingElementInsideSameParentOverlay(trigger, tableRef.current)) ||\n (isElementInteractive(trigger) && !isElementInsideOrTriggeredFromContainer(trigger, tableRef.current))\n ) {\n return;\n }\n\n tableMeta.rowActive.handleKeyDown(event, tableMeta.length, scrollToIndex);\n tableMeta.rowSelection.handleKeyDown(event, table);\n\n if (tableMeta.rowActive.rowActiveIndex !== undefined) {\n tableMeta.rowClick.handleKeyDown(event, rows[tableMeta.rowActive.rowActiveIndex]?.original);\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n },\n\n // scrollToIndex function changes when row count changes, so it is important to update handlers\n [tableRef.current, tableMeta.rowActive.rowActiveIndex, scrollToIndex]\n );\n}\n"],"names":["useTableGlobalShortcuts","table","tableRef","scrollToIndex","tableMeta","options","meta","rows","getRowModel","React","useEffect","handleKeyDown","event","trigger","target","isElementInsideOverlay","isSiblingElementInsideSameParentOverlay","current","isElementInteractive","isElementInsideOrTriggeredFromContainer","rowActive","length","rowSelection","rowActiveIndex","undefined","_rows$tableMeta$rowAc","rowClick","original","document","addEventListener","removeEventListener"],"mappings":";;;SAUgBA,uBAAuBA,CACnCC,KAAwB,EACxBC,QAAmC,EACnCC,aAAsC;EAEtC,MAAMC,SAAS,GAAGH,KAAK,CAACI,OAAO,CAACC,IAA6B;EAC7D,MAAMC,IAAI,GAAGN,KAAK,CAACO,WAAW,EAAE,CAACD,IAAI;EAErCE,cAAK,CAACC,SAAS,CACX;IACI,MAAMC,aAAa,GAAIC,KAAoB;MACvC,MAAMC,OAAO,GAAGD,KAAK,CAACE,MAAqB;MAE3C,IACKC,sBAAsB,CAACF,OAAO,CAAC,IAAI,CAACG,uCAAuC,CAACH,OAAO,EAAEX,QAAQ,CAACe,OAAO,CAAC,IACtGC,oBAAoB,CAACL,OAAO,CAAC,IAAI,CAACM,uCAAuC,CAACN,OAAO,EAAEX,QAAQ,CAACe,OAAO,CAAE,EACxG;QACE;;MAGJb,SAAS,CAACgB,SAAS,CAACT,aAAa,CAACC,KAAK,EAAER,SAAS,CAACiB,MAAM,EAAElB,aAAa,CAAC;MACzEC,SAAS,CAACkB,YAAY,CAACX,aAAa,CAACC,KAAK,EAAEX,KAAK,CAAC;MAElD,IAAIG,SAAS,CAACgB,SAAS,CAACG,cAAc,KAAKC,SAAS,EAAE;QAAA,IAAAC,qBAAA;QAClDrB,SAAS,CAACsB,QAAQ,CAACf,aAAa,CAACC,KAAK,GAAAa,qBAAA,GAAElB,IAAI,CAACH,SAAS,CAACgB,SAAS,CAACG,cAAc,CAAC,cAAAE,qBAAA,uBAAxCA,qBAAA,CAA0CE,QAAQ,CAAC;;KAElG;IAEDC,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAElB,aAAa,CAAC;IAEnD,OAAO;MACHiB,QAAQ,CAACE,mBAAmB,CAAC,SAAS,EAAEnB,aAAa,CAAC;KACzD;GACJ;;EAGD,CAACT,QAAQ,CAACe,OAAO,EAAEb,SAAS,CAACgB,SAAS,CAACG,cAAc,EAAEpB,aAAa,CAAC,CACxE;AACL;;;;"}
1
+ {"version":3,"file":"useTableGlobalShortcuts.js","sources":["../../../../../../../../../src/primitives/Table/Core/features/useTableGlobalShortcuts.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { TableRef } from '../../types';\nimport {\n isElementInsideOrTriggeredFromContainer,\n isElementInsideOverlay,\n isElementInteractive,\n isSiblingElementInsideSameParentOverlay,\n} from '../../../../utils/dom';\n\nexport function useTableGlobalShortcuts<TType = unknown>(\n table: ReactTable<TType>,\n tableRef: React.RefObject<TableRef>,\n scrollToIndex: (index: number) => void\n) {\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const rows = table.getRowModel().rows;\n\n React.useEffect(\n () => {\n const handleKeyDown = (event: KeyboardEvent) => {\n const trigger = event.target as HTMLElement;\n\n if (\n (isElementInsideOverlay(trigger) && !isSiblingElementInsideSameParentOverlay(trigger, tableRef.current)) ||\n (isElementInteractive(trigger) && !isElementInsideOrTriggeredFromContainer(trigger, tableRef.current))\n ) {\n return;\n }\n\n tableMeta.rowActive.handleKeyDown(event, tableMeta.length, scrollToIndex);\n tableMeta.rowSelection.handleKeyDown(event, table);\n\n if (tableMeta.rowActive.rowActiveIndex !== undefined) {\n tableMeta.rowClick.handleKeyDown(event, rows[tableMeta.rowActive.rowActiveIndex]?.original);\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n },\n\n // scrollToIndex function changes when row count changes, so it is important to update handlers\n [tableRef.current, tableMeta.rowActive.rowActiveIndex, scrollToIndex]\n );\n}\n"],"names":["useTableGlobalShortcuts","table","tableRef","scrollToIndex","tableMeta","options","meta","rows","getRowModel","React","useEffect","handleKeyDown","event","trigger","target","isElementInsideOverlay","isSiblingElementInsideSameParentOverlay","current","isElementInteractive","isElementInsideOrTriggeredFromContainer","rowActive","length","rowSelection","rowActiveIndex","undefined","_rows$tableMeta$rowAc","rowClick","original","document","addEventListener","removeEventListener"],"mappings":";;;SAUgBA,uBAAuBA,CACnCC,KAAwB,EACxBC,QAAmC,EACnCC,aAAsC;EAEtC,IAAMC,SAAS,GAAGH,KAAK,CAACI,OAAO,CAACC,IAA6B;EAC7D,IAAMC,IAAI,GAAGN,KAAK,CAACO,WAAW,EAAE,CAACD,IAAI;EAErCE,cAAK,CAACC,SAAS,CACX;IACI,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,KAAoB;MACvC,IAAMC,OAAO,GAAGD,KAAK,CAACE,MAAqB;MAE3C,IACKC,sBAAsB,CAACF,OAAO,CAAC,IAAI,CAACG,uCAAuC,CAACH,OAAO,EAAEX,QAAQ,CAACe,OAAO,CAAC,IACtGC,oBAAoB,CAACL,OAAO,CAAC,IAAI,CAACM,uCAAuC,CAACN,OAAO,EAAEX,QAAQ,CAACe,OAAO,CAAE,EACxG;QACE;;MAGJb,SAAS,CAACgB,SAAS,CAACT,aAAa,CAACC,KAAK,EAAER,SAAS,CAACiB,MAAM,EAAElB,aAAa,CAAC;MACzEC,SAAS,CAACkB,YAAY,CAACX,aAAa,CAACC,KAAK,EAAEX,KAAK,CAAC;MAElD,IAAIG,SAAS,CAACgB,SAAS,CAACG,cAAc,KAAKC,SAAS,EAAE;QAAA,IAAAC,qBAAA;QAClDrB,SAAS,CAACsB,QAAQ,CAACf,aAAa,CAACC,KAAK,GAAAa,qBAAA,GAAElB,IAAI,CAACH,SAAS,CAACgB,SAAS,CAACG,cAAc,CAAC,cAAAE,qBAAA,uBAAxCA,qBAAA,CAA0CE,QAAQ,CAAC;;KAElG;IAEDC,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAElB,aAAa,CAAC;IAEnD,OAAO;MACHiB,QAAQ,CAACE,mBAAmB,CAAC,SAAS,EAAEnB,aAAa,CAAC;KACzD;GACJ;;EAGD,CAACT,QAAQ,CAACe,OAAO,EAAEb,SAAS,CAACgB,SAAS,CAACG,cAAc,EAAEpB,aAAa,CAAC,CACxE;AACL;;;;"}
@@ -1,13 +1,21 @@
1
1
  import React__default from 'react';
2
2
 
3
3
  function useTableRef(table, ref) {
4
- React__default.useEffect(() => {
4
+ React__default.useEffect(function () {
5
5
  if (ref.current) {
6
6
  ref.current.instance = {
7
- resetFiltering: () => table.resetColumnFilters(),
8
- resetRowExpansion: () => table.resetExpanded(),
9
- resetRowSelection: () => table.resetRowSelection(),
10
- resetSorting: () => table.resetSorting()
7
+ resetFiltering: function resetFiltering() {
8
+ return table.resetColumnFilters();
9
+ },
10
+ resetRowExpansion: function resetRowExpansion() {
11
+ return table.resetExpanded();
12
+ },
13
+ resetRowSelection: function resetRowSelection() {
14
+ return table.resetRowSelection();
15
+ },
16
+ resetSorting: function resetSorting() {
17
+ return table.resetSorting();
18
+ }
11
19
  };
12
20
  }
13
21
  }, [table, ref.current]);
@@ -1 +1 @@
1
- {"version":3,"file":"useTableRef.js","sources":["../../../../../../../../../src/primitives/Table/Core/features/useTableRef.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable } from '@tanstack/react-table';\nimport { TableRef } from '../../types';\n\nexport function useTableRef<TType = unknown>(table: ReactTable<TType>, ref: React.RefObject<TableRef>) {\n React.useEffect(() => {\n if (ref.current) {\n ref.current.instance = {\n resetFiltering: () => table.resetColumnFilters(),\n resetRowExpansion: () => table.resetExpanded(),\n resetRowSelection: () => table.resetRowSelection(),\n resetSorting: () => table.resetSorting(),\n };\n }\n }, [table, ref.current]);\n}\n"],"names":["useTableRef","table","ref","React","useEffect","current","instance","resetFiltering","resetColumnFilters","resetRowExpansion","resetExpanded","resetRowSelection","resetSorting"],"mappings":";;SAIgBA,WAAWA,CAAkBC,KAAwB,EAAEC,GAA8B;EACjGC,cAAK,CAACC,SAAS,CAAC;IACZ,IAAIF,GAAG,CAACG,OAAO,EAAE;MACbH,GAAG,CAACG,OAAO,CAACC,QAAQ,GAAG;QACnBC,cAAc,EAAEA,MAAMN,KAAK,CAACO,kBAAkB,EAAE;QAChDC,iBAAiB,EAAEA,MAAMR,KAAK,CAACS,aAAa,EAAE;QAC9CC,iBAAiB,EAAEA,MAAMV,KAAK,CAACU,iBAAiB,EAAE;QAClDC,YAAY,EAAEA,MAAMX,KAAK,CAACW,YAAY;OACzC;;GAER,EAAE,CAACX,KAAK,EAAEC,GAAG,CAACG,OAAO,CAAC,CAAC;AAC5B;;;;"}
1
+ {"version":3,"file":"useTableRef.js","sources":["../../../../../../../../../src/primitives/Table/Core/features/useTableRef.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable } from '@tanstack/react-table';\nimport { TableRef } from '../../types';\n\nexport function useTableRef<TType = unknown>(table: ReactTable<TType>, ref: React.RefObject<TableRef>) {\n React.useEffect(() => {\n if (ref.current) {\n ref.current.instance = {\n resetFiltering: () => table.resetColumnFilters(),\n resetRowExpansion: () => table.resetExpanded(),\n resetRowSelection: () => table.resetRowSelection(),\n resetSorting: () => table.resetSorting(),\n };\n }\n }, [table, ref.current]);\n}\n"],"names":["useTableRef","table","ref","React","useEffect","current","instance","resetFiltering","resetColumnFilters","resetRowExpansion","resetExpanded","resetRowSelection","resetSorting"],"mappings":";;SAIgBA,WAAWA,CAAkBC,KAAwB,EAAEC,GAA8B;EACjGC,cAAK,CAACC,SAAS,CAAC;IACZ,IAAIF,GAAG,CAACG,OAAO,EAAE;MACbH,GAAG,CAACG,OAAO,CAACC,QAAQ,GAAG;QACnBC,cAAc,EAAE,SAAAA;UAAA,OAAMN,KAAK,CAACO,kBAAkB,EAAE;;QAChDC,iBAAiB,EAAE,SAAAA;UAAA,OAAMR,KAAK,CAACS,aAAa,EAAE;;QAC9CC,iBAAiB,EAAE,SAAAA;UAAA,OAAMV,KAAK,CAACU,iBAAiB,EAAE;;QAClDC,YAAY,EAAE,SAAAA;UAAA,OAAMX,KAAK,CAACW,YAAY,EAAE;;OAC3C;;GAER,EAAE,CAACX,KAAK,EAAEC,GAAG,CAACG,OAAO,CAAC,CAAC;AAC5B;;;;"}