@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,4 +1,5 @@
1
1
  import React__default from 'react';
2
+ import { extends as _extends } from '../../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
2
3
  import { isElementInsideOrTriggeredFromContainer } from '../../../../../utils/dom.js';
3
4
  import { isPressingMetaKey } from '../../../../../utils/keyboard.js';
4
5
  import { Checkbox } from '../../../../Checkbox/Checkbox.js';
@@ -16,30 +17,26 @@ import { useEditingCellAutofocus } from './util.js';
16
17
 
17
18
  function EditingControlCell(props) {
18
19
  var _columnMeta$control;
19
- const {
20
- cell,
21
- cellRef,
22
- isHighlighted,
23
- index
24
- } = props;
25
- const {
26
- rowIndex
27
- } = React__default.useContext(RowContext);
28
- const {
29
- table
30
- } = cell.getContext();
31
- const tableMeta = table.options.meta;
32
- const columnMeta = cell.column.columnDef.meta;
33
- const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;
34
- const type = (_columnMeta$control = columnMeta.control) !== null && _columnMeta$control !== void 0 ? _columnMeta$control : 'input';
35
- const handleFocus = useEditingCellAutofocus(props);
36
- const value = cell.getValue();
20
+ var cell = props.cell,
21
+ cellRef = props.cellRef,
22
+ isHighlighted = props.isHighlighted,
23
+ index = props.index;
24
+ var _React$useContext = React__default.useContext(RowContext),
25
+ rowIndex = _React$useContext.rowIndex;
26
+ var _cell$getContext = cell.getContext(),
27
+ table = _cell$getContext.table;
28
+ var tableMeta = table.options.meta;
29
+ var columnMeta = cell.column.columnDef.meta;
30
+ var isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;
31
+ var type = (_columnMeta$control = columnMeta.control) !== null && _columnMeta$control !== void 0 ? _columnMeta$control : 'input';
32
+ var handleFocus = useEditingCellAutofocus(props);
33
+ var value = cell.getValue();
37
34
  // some controls, like select2, should trigger cell changed (validation, updates) as the value changes
38
- const hasNonTextControl = React__default.useMemo(() => {
35
+ var hasNonTextControl = React__default.useMemo(function () {
39
36
  var _cellRef$current;
40
37
  return typeof type === 'function' && !!((_cellRef$current = cellRef.current) !== null && _cellRef$current !== void 0 && _cellRef$current.querySelector('[data-taco="Select2"],[data-taco="switch"],[data-taco="checkbox"]'));
41
38
  }, [cellRef.current]);
42
- const handleChange = nextValue => {
39
+ var handleChange = function handleChange(nextValue) {
43
40
  if (nextValue !== value) {
44
41
  tableMeta.editing.setCellValue(cell, rowIndex, nextValue);
45
42
  if (hasNonTextControl) {
@@ -47,21 +44,21 @@ function EditingControlCell(props) {
47
44
  }
48
45
  }
49
46
  };
50
- const handleBlur = () => {
47
+ var handleBlur = function handleBlur() {
51
48
  tableMeta.editing.toggleDetailedMode(false);
52
49
  tableMeta.editing.onCellChanged(cell, rowIndex, !hasNonTextControl);
53
50
  };
54
51
  // ensure that blur runs when the cell gets unmounted (when vertically arrow key navigating)
55
- React__default.useEffect(() => {
56
- const ref = cellRef.current;
57
- return () => {
52
+ React__default.useEffect(function () {
53
+ var ref = cellRef.current;
54
+ return function () {
58
55
  if (document.activeElement === ref || isElementInsideOrTriggeredFromContainer(document.activeElement, ref)) {
59
56
  handleBlur();
60
57
  }
61
58
  };
62
59
  }, []);
63
- const error = tableMeta.editing.getCellError(cell);
64
- const controlProps = {
60
+ var error = tableMeta.editing.getCellError(cell);
61
+ var controlProps = {
65
62
  dataType: columnMeta.dataType,
66
63
  fontSize: tableMeta.fontSize.size,
67
64
  id: cell.column.id,
@@ -74,17 +71,16 @@ function EditingControlCell(props) {
74
71
  rowPendingChanges: tableMeta.editing.getRowValue(cell.row.id),
75
72
  tabIndex: isActiveRow ? 0 : -1,
76
73
  toggleDetailedMode: tableMeta.editing.toggleDetailedMode,
77
- type,
78
- value
74
+ type: type,
75
+ value: value
79
76
  };
80
- const cellAttributes = {
81
- ...getCellAttributes(cell, index, isHighlighted),
77
+ var cellAttributes = _extends({}, getCellAttributes(cell, index, isHighlighted), {
82
78
  'data-cell-editing-invalid': error ? true : undefined,
83
79
  'data-taco': 'cell-control',
84
80
  onFocus: handleFocus,
85
81
  ref: cellRef,
86
82
  tabIndex: -1
87
- };
83
+ });
88
84
  return /*#__PURE__*/React__default.createElement("td", Object.assign({}, cellAttributes), /*#__PURE__*/React__default.createElement(Field, {
89
85
  invalid: !!error,
90
86
  message: error
@@ -94,41 +90,37 @@ function EditingControlCell(props) {
94
90
  isActiveRow: isActiveRow
95
91
  }));
96
92
  }
97
- const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditingCell(props) {
98
- const {
99
- dataType,
100
- fontSize,
101
- id,
102
- invalid,
103
- isDetailedMode,
104
- isTruncated,
105
- onBlur,
106
- onChange,
107
- row,
108
- rowPendingChanges,
109
- tabIndex = -1,
110
- toggleDetailedMode,
111
- type = 'input',
112
- value
113
- } = props;
114
- const controlRef = React__default.useRef(null);
115
- const currentValue = row[id];
116
- const commonProps = {
117
- onBlur,
93
+ var MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditingCell(props) {
94
+ var dataType = props.dataType,
95
+ fontSize = props.fontSize,
96
+ id = props.id,
97
+ invalid = props.invalid,
98
+ isDetailedMode = props.isDetailedMode,
99
+ isTruncated = props.isTruncated,
100
+ onBlur = props.onBlur,
101
+ onChange = props.onChange,
102
+ row = props.row,
103
+ rowPendingChanges = props.rowPendingChanges,
104
+ _props$tabIndex = props.tabIndex,
105
+ tabIndex = _props$tabIndex === void 0 ? -1 : _props$tabIndex,
106
+ toggleDetailedMode = props.toggleDetailedMode,
107
+ _props$type = props.type,
108
+ type = _props$type === void 0 ? 'input' : _props$type,
109
+ value = props.value;
110
+ var controlRef = React__default.useRef(null);
111
+ var currentValue = row[id];
112
+ var commonProps = {
113
+ onBlur: onBlur,
118
114
  ref: controlRef,
119
- tabIndex
115
+ tabIndex: tabIndex
120
116
  };
121
117
  if (typeof type === 'function') {
122
- const controlFnProps = {
123
- ...commonProps,
124
- invalid,
118
+ var controlFnProps = _extends({}, commonProps, {
119
+ invalid: invalid,
125
120
  setValue: onChange,
126
- value
127
- };
128
- return type(controlFnProps, {
129
- ...row,
130
- ...rowPendingChanges
121
+ value: value
131
122
  });
123
+ return type(controlFnProps, _extends({}, row, rowPendingChanges));
132
124
  }
133
125
  if (type === 'switch') {
134
126
  return /*#__PURE__*/React__default.createElement(Switch, Object.assign({}, commonProps, {
@@ -144,8 +136,8 @@ const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditin
144
136
  ref: controlRef
145
137
  }));
146
138
  }
147
- const handleInputKeyDown = event => {
148
- const target = event.target;
139
+ var handleInputKeyDown = function handleInputKeyDown(event) {
140
+ var target = event.target;
149
141
  if (target.readOnly) {
150
142
  return;
151
143
  }
@@ -167,7 +159,9 @@ const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditin
167
159
  var _target$setSelectionR, _target$value, _target$value2;
168
160
  (_target$setSelectionR = target.setSelectionRange) === null || _target$setSelectionR === void 0 ? void 0 : _target$setSelectionR.call(target, (_target$value = target.value) === null || _target$value === void 0 ? void 0 : _target$value.length, (_target$value2 = target.value) === null || _target$value2 === void 0 ? void 0 : _target$value2.length);
169
161
  }
170
- toggleDetailedMode(editing => !editing);
162
+ toggleDetailedMode(function (editing) {
163
+ return !editing;
164
+ });
171
165
  return;
172
166
  }
173
167
  // reset the value, or exit edit mode when pressing escape
@@ -179,7 +173,7 @@ const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditin
179
173
  props.onChange(currentValue);
180
174
  }
181
175
  // have to let onChange run before selecting, otherwise the value changes
182
- requestAnimationFrame(() => {
176
+ requestAnimationFrame(function () {
183
177
  var _target$select2;
184
178
  return (_target$select2 = target.select) === null || _target$select2 === void 0 ? void 0 : _target$select2.call(target);
185
179
  });
@@ -191,22 +185,22 @@ const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditin
191
185
  toggleDetailedMode(true);
192
186
  }
193
187
  };
194
- const handleFocus = event => {
188
+ var handleFocus = function handleFocus(event) {
195
189
  if (!isDetailedMode) {
196
190
  event.target.select();
197
191
  }
198
192
  };
199
193
  if (type === 'datepicker') {
200
- const valueAsDate = parse(value);
201
- const handleChange = event => {
202
- const newDate = event.detail;
194
+ var valueAsDate = parse(value);
195
+ var _handleChange = function _handleChange(event) {
196
+ var newDate = event.detail;
203
197
  if (!valueAsDate || !newDate || isDate(valueAsDate) && isDate(newDate) && !isWeakEqual(valueAsDate, newDate)) {
204
198
  props.onChange(newDate);
205
199
  }
206
200
  };
207
201
  return /*#__PURE__*/React__default.createElement(Datepicker, Object.assign({}, commonProps, {
208
202
  invalid: invalid,
209
- onChange: handleChange,
203
+ onChange: _handleChange,
210
204
  onFocus: handleFocus,
211
205
  onKeyDown: handleInputKeyDown,
212
206
  ref: controlRef,
@@ -214,21 +208,21 @@ const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditin
214
208
  }));
215
209
  }
216
210
  if (type === 'textarea') {
217
- const handleChange = event => {
211
+ var _handleChange2 = function _handleChange2(event) {
218
212
  onChange(event.target.value);
219
213
  };
220
214
  return /*#__PURE__*/React__default.createElement(TextareaWithAutosizing, Object.assign({}, commonProps, {
221
215
  fontSize: fontSize,
222
216
  invalid: invalid,
223
217
  isTruncated: isTruncated,
224
- onChange: handleChange,
218
+ onChange: _handleChange2,
225
219
  onFocus: handleFocus,
226
220
  onKeyDown: handleInputKeyDown,
227
221
  ref: controlRef,
228
222
  value: String(value !== null && value !== void 0 ? value : '')
229
223
  }));
230
224
  }
231
- const handleChange = event => {
225
+ var handleChange = function handleChange(event) {
232
226
  onChange(dataType === 'number' && event.target.value ? Number.parseInt(event.target.value) : event.target.value);
233
227
  };
234
228
  return /*#__PURE__*/React__default.createElement(Input, Object.assign({}, commonProps, {
@@ -1 +1 @@
1
- {"version":3,"file":"EditingControlCell.js","sources":["../../../../../../../../../../src/components/Table3/components/Columns/Cell/EditingControlCell.tsx"],"sourcesContent":["import React from 'react';\nimport { TableMeta as ReactTableMeta, ColumnMeta as ReactTableColumnMeta } from '@tanstack/react-table';\nimport { isDate } from 'date-fns';\nimport { Datepicker } from '../../../../Datepicker/Datepicker';\nimport { Switch } from '../../../../Switch/Switch';\nimport { Input } from '../../../../Input/Input';\nimport { TableColumnDataType, TableColumnRendererControl, TableFontSize } from '../../../../../primitives/Table/types';\nimport * as date from '../../../../../utils/date';\nimport { RowMoveIndicator } from './Editing/RowMoveIndicator';\nimport { TextareaWithAutosizing } from './Editing/TextareaWithAutosizing';\nimport { Field } from '../../../../Field/Field';\nimport { isElementInsideOrTriggeredFromContainer } from '../../../../../utils/dom';\nimport { TableCellRendererProps } from '../../../../../primitives/Table/Core/types';\nimport { RowContext } from '../../../../../primitives/Table/Core/components/Row/RowContext';\nimport { getCellAttributes } from '../../../../../primitives/Table/Core/components/Columns/Cell/util';\nimport { useEditingCellAutofocus } from './util';\nimport { isPressingMetaKey } from '../../../../../utils/keyboard';\nimport { Checkbox } from '../../../../Checkbox/Checkbox';\n\nexport function EditingControlCell<TType = unknown>(props: TableCellRendererProps<TType>) {\n const { cell, cellRef, isHighlighted, index } = props;\n const { rowIndex } = React.useContext(RowContext);\n const { table } = cell.getContext();\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const columnMeta = cell.column.columnDef.meta as ReactTableColumnMeta<TType, unknown>;\n const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;\n const type = columnMeta.control ?? 'input';\n const handleFocus = useEditingCellAutofocus<TType>(props);\n const value = cell.getValue();\n\n // some controls, like select2, should trigger cell changed (validation, updates) as the value changes\n const hasNonTextControl = React.useMemo(() => {\n return (\n typeof type === 'function' &&\n !!cellRef.current?.querySelector('[data-taco=\"Select2\"],[data-taco=\"switch\"],[data-taco=\"checkbox\"]')\n );\n }, [cellRef.current]);\n\n const handleChange = (nextValue: unknown) => {\n if (nextValue !== value) {\n tableMeta.editing.setCellValue(cell, rowIndex, nextValue);\n\n if (hasNonTextControl) {\n tableMeta.editing.onCellChanged(cell, rowIndex);\n }\n }\n };\n\n const handleBlur = () => {\n tableMeta.editing.toggleDetailedMode(false);\n tableMeta.editing.onCellChanged(cell, rowIndex, !hasNonTextControl);\n };\n\n // ensure that blur runs when the cell gets unmounted (when vertically arrow key navigating)\n React.useEffect(() => {\n const ref = cellRef.current;\n\n return () => {\n if (document.activeElement === ref || isElementInsideOrTriggeredFromContainer(document.activeElement, ref)) {\n handleBlur();\n }\n };\n }, []);\n\n const error = tableMeta.editing.getCellError<TType>(cell);\n\n const controlProps = {\n dataType: columnMeta.dataType,\n fontSize: tableMeta.fontSize.size,\n id: cell.column.id,\n invalid: !!error,\n isDetailedMode: tableMeta.editing.isDetailedMode,\n isTruncated: !!columnMeta.enableTruncate,\n onBlur: handleBlur,\n onChange: handleChange,\n row: cell.row.original,\n rowPendingChanges: tableMeta.editing.getRowValue(cell.row.id),\n tabIndex: isActiveRow ? 0 : -1,\n toggleDetailedMode: tableMeta.editing.toggleDetailedMode,\n type,\n value,\n };\n\n const cellAttributes = {\n ...getCellAttributes(cell, index, isHighlighted),\n 'data-cell-editing-invalid': error ? true : undefined,\n 'data-taco': 'cell-control',\n onFocus: handleFocus,\n ref: cellRef,\n tabIndex: -1,\n };\n\n return (\n <td {...cellAttributes}>\n <Field invalid={!!error} message={error}>\n <MemoedEditingCell<TType> {...controlProps} />\n </Field>\n {\n // we show row move indicator here within the cell rather than the row because it is\n // an editing only feature, and we don't want to leak editing into the shared row component\n }\n <RowMoveIndicator cell={cell} cellRef={cellRef} isActiveRow={isActiveRow} />\n </td>\n );\n}\n\ntype MemoedEditingCellProps<TType = unknown, TValue = unknown> = {\n dataType?: TableColumnDataType;\n fontSize: TableFontSize;\n id: string;\n invalid: boolean;\n isDetailedMode: boolean;\n isTruncated: boolean;\n onBlur: () => void;\n onChange: (value: TValue) => void;\n row: TType;\n rowPendingChanges: Partial<TType> | undefined;\n tabIndex?: number;\n toggleDetailedMode: (detailed: React.SetStateAction<boolean>) => void;\n type: TableColumnRendererControl<TType>;\n value: TValue;\n};\n\nconst MemoedEditingCell = React.memo(function MemoedEditingCell<TType = unknown>(props: MemoedEditingCellProps<TType>) {\n const {\n dataType,\n fontSize,\n id,\n invalid,\n isDetailedMode,\n isTruncated,\n onBlur,\n onChange,\n row,\n rowPendingChanges,\n tabIndex = -1,\n toggleDetailedMode,\n type = 'input',\n value,\n } = props;\n const controlRef = React.useRef<HTMLElement>(null);\n const currentValue = row[id];\n const commonProps = {\n onBlur,\n ref: controlRef,\n tabIndex,\n };\n\n if (typeof type === 'function') {\n const controlFnProps = {\n ...commonProps,\n invalid,\n setValue: onChange,\n value,\n };\n\n return type(controlFnProps, { ...row, ...rowPendingChanges });\n }\n\n if (type === 'switch') {\n return (\n <Switch\n {...commonProps}\n checked={Boolean(value)}\n onChange={onChange}\n ref={controlRef as React.RefObject<HTMLButtonElement>}\n />\n );\n }\n\n if (type === 'checkbox') {\n return (\n <Checkbox\n {...commonProps}\n checked={Boolean(value)}\n onChange={onChange}\n ref={controlRef as React.RefObject<HTMLButtonElement>}\n />\n );\n }\n\n const handleInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n const target = event.target as HTMLInputElement | HTMLTextAreaElement;\n\n if (target.readOnly) {\n return;\n }\n\n // prevent active row navigation while in detailed mode\n if (\n isDetailedMode &&\n (event.key === 'ArrowUp' || event.key === 'ArrowDown' || event.key === 'ArrowLeft' || event.key === 'ArrowRight')\n ) {\n event.stopPropagation();\n }\n\n // enter or exit detail mode when pressing enter\n if (event.key === 'Enter') {\n // textareas support shift and enter, don't prevent default in that case\n if (event.shiftKey && isDetailedMode) {\n return;\n }\n\n event.preventDefault();\n\n if (isDetailedMode) {\n target.select?.();\n } else {\n target.setSelectionRange?.(target.value?.length, target.value?.length);\n }\n\n toggleDetailedMode(editing => !editing);\n return;\n }\n\n // reset the value, or exit edit mode when pressing escape\n if (event.key === 'Escape') {\n if (isDetailedMode) {\n event.preventDefault();\n toggleDetailedMode(false);\n\n if (value !== currentValue) {\n props.onChange(currentValue);\n }\n\n // have to let onChange run before selecting, otherwise the value changes\n requestAnimationFrame(() => target.select?.());\n }\n\n return;\n }\n\n // toggle into detailed mode when actually inputting something\n if (!isPressingMetaKey(event) && (/^[a-z0-9]$/i.test(event.key) || event.key === 'Backspace')) {\n toggleDetailedMode(true);\n }\n };\n\n const handleFocus = (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (!isDetailedMode) {\n event.target.select();\n }\n };\n\n if (type === 'datepicker') {\n const valueAsDate = date.parse(value as Date | string | undefined);\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const newDate = (event as any).detail as Date;\n\n if (!valueAsDate || !newDate || (isDate(valueAsDate) && isDate(newDate) && !date.isWeakEqual(valueAsDate, newDate))) {\n props.onChange(newDate);\n }\n };\n\n return (\n <Datepicker\n {...commonProps}\n invalid={invalid}\n onChange={handleChange}\n onFocus={handleFocus}\n onKeyDown={handleInputKeyDown}\n ref={controlRef as React.RefObject<HTMLInputElement>}\n value={valueAsDate}\n />\n );\n }\n\n if (type === 'textarea') {\n const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n onChange(event.target.value);\n };\n\n return (\n <TextareaWithAutosizing\n {...commonProps}\n fontSize={fontSize}\n invalid={invalid}\n isTruncated={isTruncated}\n onChange={handleChange}\n onFocus={handleFocus}\n onKeyDown={handleInputKeyDown}\n ref={controlRef as React.RefObject<HTMLTextAreaElement>}\n value={String(value ?? '')}\n />\n );\n }\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange(dataType === 'number' && event.target.value ? Number.parseInt(event.target.value) : event.target.value);\n };\n\n return (\n <Input\n {...commonProps}\n invalid={invalid}\n onChange={handleChange}\n onFocus={handleFocus}\n onKeyDown={handleInputKeyDown}\n ref={controlRef as React.RefObject<HTMLInputElement>}\n type={dataType === 'number' ? 'number' : undefined}\n value={dataType === 'number' ? (value as number) : String(value ?? '')}\n />\n );\n}) as <TType = unknown>(props: MemoedEditingCellProps<TType>) => JSX.Element;\n"],"names":["EditingControlCell","props","cell","cellRef","isHighlighted","index","rowIndex","React","useContext","RowContext","table","getContext","tableMeta","options","meta","columnMeta","column","columnDef","isActiveRow","rowActive","rowActiveIndex","type","_columnMeta$control","control","handleFocus","useEditingCellAutofocus","value","getValue","hasNonTextControl","useMemo","_cellRef$current","current","querySelector","handleChange","nextValue","editing","setCellValue","onCellChanged","handleBlur","toggleDetailedMode","useEffect","ref","document","activeElement","isElementInsideOrTriggeredFromContainer","error","getCellError","controlProps","dataType","fontSize","size","id","invalid","isDetailedMode","isTruncated","enableTruncate","onBlur","onChange","row","original","rowPendingChanges","getRowValue","tabIndex","cellAttributes","getCellAttributes","undefined","onFocus","Field","message","MemoedEditingCell","RowMoveIndicator","memo","controlRef","useRef","currentValue","commonProps","controlFnProps","setValue","Switch","checked","Boolean","Checkbox","handleInputKeyDown","event","target","readOnly","key","stopPropagation","shiftKey","preventDefault","_target$select","select","call","_target$setSelectionR","_target$value","_target$value2","setSelectionRange","length","requestAnimationFrame","_target$select2","isPressingMetaKey","test","valueAsDate","date","newDate","detail","isDate","Datepicker","onKeyDown","TextareaWithAutosizing","String","Number","parseInt","Input"],"mappings":";;;;;;;;;;;;;;;;SAmBgBA,kBAAkBA,CAAkBC,KAAoC;;EACpF,MAAM;IAAEC,IAAI;IAAEC,OAAO;IAAEC,aAAa;IAAEC;GAAO,GAAGJ,KAAK;EACrD,MAAM;IAAEK;GAAU,GAAGC,cAAK,CAACC,UAAU,CAACC,UAAU,CAAC;EACjD,MAAM;IAAEC;GAAO,GAAGR,IAAI,CAACS,UAAU,EAAE;EACnC,MAAMC,SAAS,GAAGF,KAAK,CAACG,OAAO,CAACC,IAA6B;EAC7D,MAAMC,UAAU,GAAGb,IAAI,CAACc,MAAM,CAACC,SAAS,CAACH,IAA4C;EACrF,MAAMI,WAAW,GAAGN,SAAS,CAACO,SAAS,CAACC,cAAc,KAAKd,QAAQ;EACnE,MAAMe,IAAI,IAAAC,mBAAA,GAAGP,UAAU,CAACQ,OAAO,cAAAD,mBAAA,cAAAA,mBAAA,GAAI,OAAO;EAC1C,MAAME,WAAW,GAAGC,uBAAuB,CAAQxB,KAAK,CAAC;EACzD,MAAMyB,KAAK,GAAGxB,IAAI,CAACyB,QAAQ,EAAE;;EAG7B,MAAMC,iBAAiB,GAAGrB,cAAK,CAACsB,OAAO,CAAC;;IACpC,OACI,OAAOR,IAAI,KAAK,UAAU,IAC1B,CAAC,GAAAS,gBAAA,GAAC3B,OAAO,CAAC4B,OAAO,cAAAD,gBAAA,eAAfA,gBAAA,CAAiBE,aAAa,CAAC,mEAAmE,CAAC;GAE5G,EAAE,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AAGqF,MAAM,CAACC,QAAQ,CAAC7B,KAAK,CAACC,MAAM,CAAC1D,KAAK,CAAC,GAAGyD,KAAK,CAACC,MAAM,CAAC1D,KAAK,CAAC;GACnH;EAED,oBACInB,6BAAC0G,KAAK,oBACEtC,WAAW;IACfvB,OAAO,EAAEA,OAAO;IAChBK,QAAQ,EAAExB,YAAY;IACtBiC,OAAO,EAAE1C,WAAW;IACpBoF,SAAS,EAAE1B,kBAAkB;IAC7BzC,GAAG,EAAE+B,UAA+C;IACpDnD,IAAI,EAAE2B,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAGiB,SAAS;IAClDvC,KAAK,EAAEsB,QAAQ,KAAK,QAAQ,GAAItB,KAAgB,GAAGoF,MAAM,CAACpF,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAE;KACvE;AAEV,CAAC,CAA2E;;;;"}
1
+ {"version":3,"file":"EditingControlCell.js","sources":["../../../../../../../../../../src/components/Table3/components/Columns/Cell/EditingControlCell.tsx"],"sourcesContent":["import React from 'react';\nimport { TableMeta as ReactTableMeta, ColumnMeta as ReactTableColumnMeta } from '@tanstack/react-table';\nimport { isDate } from 'date-fns';\nimport { Datepicker } from '../../../../Datepicker/Datepicker';\nimport { Switch } from '../../../../Switch/Switch';\nimport { Input } from '../../../../Input/Input';\nimport { TableColumnDataType, TableColumnRendererControl, TableFontSize } from '../../../../../primitives/Table/types';\nimport * as date from '../../../../../utils/date';\nimport { RowMoveIndicator } from './Editing/RowMoveIndicator';\nimport { TextareaWithAutosizing } from './Editing/TextareaWithAutosizing';\nimport { Field } from '../../../../Field/Field';\nimport { isElementInsideOrTriggeredFromContainer } from '../../../../../utils/dom';\nimport { TableCellRendererProps } from '../../../../../primitives/Table/Core/types';\nimport { RowContext } from '../../../../../primitives/Table/Core/components/Row/RowContext';\nimport { getCellAttributes } from '../../../../../primitives/Table/Core/components/Columns/Cell/util';\nimport { useEditingCellAutofocus } from './util';\nimport { isPressingMetaKey } from '../../../../../utils/keyboard';\nimport { Checkbox } from '../../../../Checkbox/Checkbox';\n\nexport function EditingControlCell<TType = unknown>(props: TableCellRendererProps<TType>) {\n const { cell, cellRef, isHighlighted, index } = props;\n const { rowIndex } = React.useContext(RowContext);\n const { table } = cell.getContext();\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const columnMeta = cell.column.columnDef.meta as ReactTableColumnMeta<TType, unknown>;\n const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;\n const type = columnMeta.control ?? 'input';\n const handleFocus = useEditingCellAutofocus<TType>(props);\n const value = cell.getValue();\n\n // some controls, like select2, should trigger cell changed (validation, updates) as the value changes\n const hasNonTextControl = React.useMemo(() => {\n return (\n typeof type === 'function' &&\n !!cellRef.current?.querySelector('[data-taco=\"Select2\"],[data-taco=\"switch\"],[data-taco=\"checkbox\"]')\n );\n }, [cellRef.current]);\n\n const handleChange = (nextValue: unknown) => {\n if (nextValue !== value) {\n tableMeta.editing.setCellValue(cell, rowIndex, nextValue);\n\n if (hasNonTextControl) {\n tableMeta.editing.onCellChanged(cell, rowIndex);\n }\n }\n };\n\n const handleBlur = () => {\n tableMeta.editing.toggleDetailedMode(false);\n tableMeta.editing.onCellChanged(cell, rowIndex, !hasNonTextControl);\n };\n\n // ensure that blur runs when the cell gets unmounted (when vertically arrow key navigating)\n React.useEffect(() => {\n const ref = cellRef.current;\n\n return () => {\n if (document.activeElement === ref || isElementInsideOrTriggeredFromContainer(document.activeElement, ref)) {\n handleBlur();\n }\n };\n }, []);\n\n const error = tableMeta.editing.getCellError<TType>(cell);\n\n const controlProps = {\n dataType: columnMeta.dataType,\n fontSize: tableMeta.fontSize.size,\n id: cell.column.id,\n invalid: !!error,\n isDetailedMode: tableMeta.editing.isDetailedMode,\n isTruncated: !!columnMeta.enableTruncate,\n onBlur: handleBlur,\n onChange: handleChange,\n row: cell.row.original,\n rowPendingChanges: tableMeta.editing.getRowValue(cell.row.id),\n tabIndex: isActiveRow ? 0 : -1,\n toggleDetailedMode: tableMeta.editing.toggleDetailedMode,\n type,\n value,\n };\n\n const cellAttributes = {\n ...getCellAttributes(cell, index, isHighlighted),\n 'data-cell-editing-invalid': error ? true : undefined,\n 'data-taco': 'cell-control',\n onFocus: handleFocus,\n ref: cellRef,\n tabIndex: -1,\n };\n\n return (\n <td {...cellAttributes}>\n <Field invalid={!!error} message={error}>\n <MemoedEditingCell<TType> {...controlProps} />\n </Field>\n {\n // we show row move indicator here within the cell rather than the row because it is\n // an editing only feature, and we don't want to leak editing into the shared row component\n }\n <RowMoveIndicator cell={cell} cellRef={cellRef} isActiveRow={isActiveRow} />\n </td>\n );\n}\n\ntype MemoedEditingCellProps<TType = unknown, TValue = unknown> = {\n dataType?: TableColumnDataType;\n fontSize: TableFontSize;\n id: string;\n invalid: boolean;\n isDetailedMode: boolean;\n isTruncated: boolean;\n onBlur: () => void;\n onChange: (value: TValue) => void;\n row: TType;\n rowPendingChanges: Partial<TType> | undefined;\n tabIndex?: number;\n toggleDetailedMode: (detailed: React.SetStateAction<boolean>) => void;\n type: TableColumnRendererControl<TType>;\n value: TValue;\n};\n\nconst MemoedEditingCell = React.memo(function MemoedEditingCell<TType = unknown>(props: MemoedEditingCellProps<TType>) {\n const {\n dataType,\n fontSize,\n id,\n invalid,\n isDetailedMode,\n isTruncated,\n onBlur,\n onChange,\n row,\n rowPendingChanges,\n tabIndex = -1,\n toggleDetailedMode,\n type = 'input',\n value,\n } = props;\n const controlRef = React.useRef<HTMLElement>(null);\n const currentValue = row[id];\n const commonProps = {\n onBlur,\n ref: controlRef,\n tabIndex,\n };\n\n if (typeof type === 'function') {\n const controlFnProps = {\n ...commonProps,\n invalid,\n setValue: onChange,\n value,\n };\n\n return type(controlFnProps, { ...row, ...rowPendingChanges });\n }\n\n if (type === 'switch') {\n return (\n <Switch\n {...commonProps}\n checked={Boolean(value)}\n onChange={onChange}\n ref={controlRef as React.RefObject<HTMLButtonElement>}\n />\n );\n }\n\n if (type === 'checkbox') {\n return (\n <Checkbox\n {...commonProps}\n checked={Boolean(value)}\n onChange={onChange}\n ref={controlRef as React.RefObject<HTMLButtonElement>}\n />\n );\n }\n\n const handleInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n const target = event.target as HTMLInputElement | HTMLTextAreaElement;\n\n if (target.readOnly) {\n return;\n }\n\n // prevent active row navigation while in detailed mode\n if (\n isDetailedMode &&\n (event.key === 'ArrowUp' || event.key === 'ArrowDown' || event.key === 'ArrowLeft' || event.key === 'ArrowRight')\n ) {\n event.stopPropagation();\n }\n\n // enter or exit detail mode when pressing enter\n if (event.key === 'Enter') {\n // textareas support shift and enter, don't prevent default in that case\n if (event.shiftKey && isDetailedMode) {\n return;\n }\n\n event.preventDefault();\n\n if (isDetailedMode) {\n target.select?.();\n } else {\n target.setSelectionRange?.(target.value?.length, target.value?.length);\n }\n\n toggleDetailedMode(editing => !editing);\n return;\n }\n\n // reset the value, or exit edit mode when pressing escape\n if (event.key === 'Escape') {\n if (isDetailedMode) {\n event.preventDefault();\n toggleDetailedMode(false);\n\n if (value !== currentValue) {\n props.onChange(currentValue);\n }\n\n // have to let onChange run before selecting, otherwise the value changes\n requestAnimationFrame(() => target.select?.());\n }\n\n return;\n }\n\n // toggle into detailed mode when actually inputting something\n if (!isPressingMetaKey(event) && (/^[a-z0-9]$/i.test(event.key) || event.key === 'Backspace')) {\n toggleDetailedMode(true);\n }\n };\n\n const handleFocus = (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (!isDetailedMode) {\n event.target.select();\n }\n };\n\n if (type === 'datepicker') {\n const valueAsDate = date.parse(value as Date | string | undefined);\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const newDate = (event as any).detail as Date;\n\n if (!valueAsDate || !newDate || (isDate(valueAsDate) && isDate(newDate) && !date.isWeakEqual(valueAsDate, newDate))) {\n props.onChange(newDate);\n }\n };\n\n return (\n <Datepicker\n {...commonProps}\n invalid={invalid}\n onChange={handleChange}\n onFocus={handleFocus}\n onKeyDown={handleInputKeyDown}\n ref={controlRef as React.RefObject<HTMLInputElement>}\n value={valueAsDate}\n />\n );\n }\n\n if (type === 'textarea') {\n const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n onChange(event.target.value);\n };\n\n return (\n <TextareaWithAutosizing\n {...commonProps}\n fontSize={fontSize}\n invalid={invalid}\n isTruncated={isTruncated}\n onChange={handleChange}\n onFocus={handleFocus}\n onKeyDown={handleInputKeyDown}\n ref={controlRef as React.RefObject<HTMLTextAreaElement>}\n value={String(value ?? '')}\n />\n );\n }\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange(dataType === 'number' && event.target.value ? Number.parseInt(event.target.value) : event.target.value);\n };\n\n return (\n <Input\n {...commonProps}\n invalid={invalid}\n onChange={handleChange}\n onFocus={handleFocus}\n onKeyDown={handleInputKeyDown}\n ref={controlRef as React.RefObject<HTMLInputElement>}\n type={dataType === 'number' ? 'number' : undefined}\n value={dataType === 'number' ? (value as number) : String(value ?? '')}\n />\n );\n}) as <TType = unknown>(props: MemoedEditingCellProps<TType>) => JSX.Element;\n"],"names":["EditingControlCell","props","cell","cellRef","isHighlighted","index","_React$useContext","React","useContext","RowContext","rowIndex","_cell$getContext","getContext","table","tableMeta","options","meta","columnMeta","column","columnDef","isActiveRow","rowActive","rowActiveIndex","type","_columnMeta$control","control","handleFocus","useEditingCellAutofocus","value","getValue","hasNonTextControl","useMemo","_cellRef$current","current","querySelector","handleChange","nextValue","editing","setCellValue","onCellChanged","handleBlur","toggleDetailedMode","useEffect","ref","document","activeElement","isElementInsideOrTriggeredFromContainer","error","getCellError","controlProps","dataType","fontSize","size","id","invalid","isDetailedMode","isTruncated","enableTruncate","onBlur","onChange","row","original","rowPendingChanges","getRowValue","tabIndex","cellAttributes","_extends","getCellAttributes","undefined","onFocus","Field","message","MemoedEditingCell","RowMoveIndicator","memo","_props$tabIndex","_props$type","controlRef","useRef","currentValue","commonProps","controlFnProps","setValue","Switch","checked","Boolean","Checkbox","handleInputKeyDown","event","target","readOnly","key","stopPropagation","shiftKey","preventDefault","_target$select","select","call","_target$setSelectionR","_target$value","_target$value2","setSelectionRange","length","requestAnimationFrame","_target$select2","isPressingMetaKey","test","valueAsDate","date","newDate","detail","isDate","Datepicker","onKeyDown","TextareaWithAutosizing","String","Number","parseInt","Input"],"mappings":";;;;;;;;;;;;;;;;;SAmBgBA,kBAAkBA,CAAkBC,KAAoC;;EACpF,IAAQC,IAAI,GAAoCD,KAAK,CAA7CC,IAAI;IAAEC,OAAO,GAA2BF,KAAK,CAAvCE,OAAO;IAAEC,aAAa,GAAYH,KAAK,CAA9BG,aAAa;IAAEC,KAAK,GAAKJ,KAAK,CAAfI,KAAK;EAC3C,IAAAC,iBAAA,GAAqBC,cAAK,CAACC,UAAU,CAACC,UAAU,CAAC;IAAzCC,QAAQ,GAAAJ,iBAAA,CAARI,QAAQ;EAChB,IAAAC,gBAAA,GAAkBT,IAAI,CAACU,UAAU,EAAE;IAA3BC,KAAK,GAAAF,gBAAA,CAALE,KAAK;EACb,IAAMC,SAAS,GAAGD,KAAK,CAACE,OAAO,CAACC,IAA6B;EAC7D,IAAMC,UAAU,GAAGf,IAAI,CAACgB,MAAM,CAACC,SAAS,CAACH,IAA4C;EACrF,IAAMI,WAAW,GAAGN,SAAS,CAACO,SAAS,CAACC,cAAc,KAAKZ,QAAQ;EACnE,IAAMa,IAAI,IAAAC,mBAAA,GAAGP,UAAU,CAACQ,OAAO,cAAAD,mBAAA,cAAAA,mBAAA,GAAI,OAAO;EAC1C,IAAME,WAAW,GAAGC,uBAAuB,CAAQ1B,KAAK,CAAC;EACzD,IAAM2B,KAAK,GAAG1B,IAAI,CAAC2B,QAAQ,EAAE;;EAG7B,IAAMC,iBAAiB,GAAGvB,cAAK,CAACwB,OAAO,CAAC;;IACpC,OACI,OAAOR,IAAI,KAAK,UAAU,IAC1B,CAAC,GAAAS,gBAAA,GAAC7B,OAAO,CAAC8B,OAAO,cAA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GuF,MAAM,CAACvF,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAE;KACvE;AAEV,CAAC,CAA2E;;;;"}
@@ -2,8 +2,8 @@ import React__default from 'react';
2
2
  import { DisplayCell } from '../../../../../primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js';
3
3
  import { useEditingCellAutofocus } from './util.js';
4
4
 
5
- const EditingDisplayCell = /*#__PURE__*/React__default.memo(function EditingDisplayCell(props) {
6
- const handleFocus = useEditingCellAutofocus(props);
5
+ var EditingDisplayCell = /*#__PURE__*/React__default.memo(function EditingDisplayCell(props) {
6
+ var handleFocus = useEditingCellAutofocus(props);
7
7
  return /*#__PURE__*/React__default.createElement(DisplayCell, Object.assign({}, props, {
8
8
  onFocus: handleFocus,
9
9
  tabIndex: -1
@@ -1 +1 @@
1
- {"version":3,"file":"EditingDisplayCell.js","sources":["../../../../../../../../../../src/components/Table3/components/Columns/Cell/EditingDisplayCell.tsx"],"sourcesContent":["import React from 'react';\nimport { DisplayCell } from '../../../../../primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell';\nimport { TableCellRendererProps } from '../../../../../primitives/Table/Core/types';\nimport { useEditingCellAutofocus } from './util';\n\nexport const EditingDisplayCell = React.memo(function EditingDisplayCell<TType = unknown>(props: TableCellRendererProps<TType>) {\n const handleFocus = useEditingCellAutofocus<TType>(props);\n return <DisplayCell<TType> {...props} onFocus={handleFocus} tabIndex={-1} />;\n}) as <TType = unknown>(props: TableCellRendererProps<TType>) => JSX.Element;\n"],"names":["EditingDisplayCell","React","memo","props","handleFocus","useEditingCellAutofocus","DisplayCell","onFocus","tabIndex"],"mappings":";;;;MAKaA,kBAAkB,gBAAGC,cAAK,CAACC,IAAI,CAAC,SAASF,kBAAkBA,CAAkBG,KAAoC;EAC1H,MAAMC,WAAW,GAAGC,uBAAuB,CAAQF,KAAK,CAAC;EACzD,oBAAOF,6BAACK,WAAW,oBAAYH,KAAK;IAAEI,OAAO,EAAEH,WAAW;IAAEI,QAAQ,EAAE,CAAC;KAAK;AAChF,CAAC;;;;"}
1
+ {"version":3,"file":"EditingDisplayCell.js","sources":["../../../../../../../../../../src/components/Table3/components/Columns/Cell/EditingDisplayCell.tsx"],"sourcesContent":["import React from 'react';\nimport { DisplayCell } from '../../../../../primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell';\nimport { TableCellRendererProps } from '../../../../../primitives/Table/Core/types';\nimport { useEditingCellAutofocus } from './util';\n\nexport const EditingDisplayCell = React.memo(function EditingDisplayCell<TType = unknown>(props: TableCellRendererProps<TType>) {\n const handleFocus = useEditingCellAutofocus<TType>(props);\n return <DisplayCell<TType> {...props} onFocus={handleFocus} tabIndex={-1} />;\n}) as <TType = unknown>(props: TableCellRendererProps<TType>) => JSX.Element;\n"],"names":["EditingDisplayCell","React","memo","props","handleFocus","useEditingCellAutofocus","DisplayCell","onFocus","tabIndex"],"mappings":";;;;IAKaA,kBAAkB,gBAAGC,cAAK,CAACC,IAAI,CAAC,SAASF,kBAAkBA,CAAkBG,KAAoC;EAC1H,IAAMC,WAAW,GAAGC,uBAAuB,CAAQF,KAAK,CAAC;EACzD,oBAAOF,6BAACK,WAAW,oBAAYH,KAAK;IAAEI,OAAO,EAAEH,WAAW;IAAEI,QAAQ,EAAE,CAAC;KAAK;AAChF,CAAC;;;;"}
@@ -4,21 +4,20 @@ import { RowContext } from '../../../../../primitives/Table/Core/components/Row/
4
4
  import { useAugmentedFocusManager } from '../../../../../primitives/Table/Core/components/Body/util.js';
5
5
 
6
6
  function useEditingCellAutofocus(props) {
7
- const focusManager = useAugmentedFocusManager();
8
- const {
9
- rowIndex
10
- } = React__default.useContext(RowContext);
11
- const table = props.cell.getContext().table;
12
- const tableMeta = table.options.meta;
13
- const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;
14
- const autoFocus = props.index === tableMeta.editing.lastFocusedCellIndex && isActiveRow;
7
+ var focusManager = useAugmentedFocusManager();
8
+ var _React$useContext = React__default.useContext(RowContext),
9
+ rowIndex = _React$useContext.rowIndex;
10
+ var table = props.cell.getContext().table;
11
+ var tableMeta = table.options.meta;
12
+ var isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;
13
+ var autoFocus = props.index === tableMeta.editing.lastFocusedCellIndex && isActiveRow;
15
14
  // focus the cell so that we trigger it's handle focus
16
- React__default.useEffect(() => {
15
+ React__default.useEffect(function () {
17
16
  if (props.cellRef.current) {
18
17
  var _props$cellRef$curren, _document$activeEleme, _document$activeEleme2;
19
- const isFocusedElementInCurrentRow = (_props$cellRef$curren = props.cellRef.current.closest('tr')) === null || _props$cellRef$curren === void 0 ? void 0 : _props$cellRef$curren.contains(document.activeElement);
20
- const isFocusedElementSearch = ((_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.getAttribute('name')) === 'table-search';
21
- const isFocusedElementMenu = ((_document$activeEleme2 = document.activeElement) === null || _document$activeEleme2 === void 0 ? void 0 : _document$activeEleme2.getAttribute('role')) === 'menu';
18
+ var isFocusedElementInCurrentRow = (_props$cellRef$curren = props.cellRef.current.closest('tr')) === null || _props$cellRef$curren === void 0 ? void 0 : _props$cellRef$curren.contains(document.activeElement);
19
+ var isFocusedElementSearch = ((_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.getAttribute('name')) === 'table-search';
20
+ var isFocusedElementMenu = ((_document$activeEleme2 = document.activeElement) === null || _document$activeEleme2 === void 0 ? void 0 : _document$activeEleme2.getAttribute('role')) === 'menu';
22
21
  if (autoFocus && !isFocusedElementInCurrentRow && !isFocusedElementSearch && !isFocusedElementMenu) {
23
22
  var _props$cellRef$curren2;
24
23
  (_props$cellRef$curren2 = props.cellRef.current) === null || _props$cellRef$curren2 === void 0 ? void 0 : _props$cellRef$curren2.focus();
@@ -26,16 +25,16 @@ function useEditingCellAutofocus(props) {
26
25
  }
27
26
  }, [tableMeta.rowActive.rowActiveIndex]);
28
27
  // when the cell receives focus we actually want to focus the control inside it...
29
- const handleFocus = event => {
28
+ var handleFocus = function handleFocus(event) {
30
29
  var _props$cellRef$curren3;
31
- const tableElement = (_props$cellRef$curren3 = props.cellRef.current) === null || _props$cellRef$curren3 === void 0 ? void 0 : _props$cellRef$curren3.closest('table');
30
+ var tableElement = (_props$cellRef$curren3 = props.cellRef.current) === null || _props$cellRef$curren3 === void 0 ? void 0 : _props$cellRef$curren3.closest('table');
32
31
  if (tableElement && table.getIsSomeColumnsPinned() && !props.cell.column.getIsPinned()) {
33
- const columnFreezingOffset = table.getLeftTotalSize();
34
- const targetRect = event.currentTarget.getBoundingClientRect();
35
- const tableRect = tableElement.getBoundingClientRect();
36
- const leftOffsetFromScrollContainer = targetRect.left - tableRect.left;
37
- const scrollbarWidth = tableElement.offsetWidth - tableElement.clientWidth; // the width of table vertical scrollbar
38
- const isFocusedElementMenu = event.currentTarget.getAttribute('data-cell-id') === '__actions';
32
+ var columnFreezingOffset = table.getLeftTotalSize();
33
+ var targetRect = event.currentTarget.getBoundingClientRect();
34
+ var tableRect = tableElement.getBoundingClientRect();
35
+ var leftOffsetFromScrollContainer = targetRect.left - tableRect.left;
36
+ var scrollbarWidth = tableElement.offsetWidth - tableElement.clientWidth; // the width of table vertical scrollbar
37
+ var isFocusedElementMenu = event.currentTarget.getAttribute('data-cell-id') === '__actions';
39
38
  if (
40
39
  // When pinned column overlaps the focused cell
41
40
  (leftOffsetFromScrollContainer < columnFreezingOffset ||
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../../../../../../../../src/components/Table3/components/Columns/Cell/util.ts"],"sourcesContent":["import React from 'react';\nimport { TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { useAugmentedFocusManager } from '../../../../../primitives/Table/Core/components/Body/util';\nimport { TableCellRendererProps } from '../../../../../primitives/Table/Core/types';\nimport { RowContext } from '../../../../../primitives/Table/Core/components/Row/RowContext';\nimport { hasFocusableElement } from '../../../../../utils/dom';\n\nexport function useEditingCellAutofocus<TType = unknown>(props: TableCellRendererProps<TType>) {\n const focusManager = useAugmentedFocusManager();\n const { rowIndex } = React.useContext(RowContext);\n const table = props.cell.getContext().table;\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;\n const autoFocus = props.index === tableMeta.editing.lastFocusedCellIndex && isActiveRow;\n\n // focus the cell so that we trigger it's handle focus\n React.useEffect(() => {\n if (props.cellRef.current) {\n const isFocusedElementInCurrentRow = props.cellRef.current.closest('tr')?.contains(document.activeElement);\n const isFocusedElementSearch = document.activeElement?.getAttribute('name') === 'table-search';\n const isFocusedElementMenu = document.activeElement?.getAttribute('role') === 'menu';\n\n if (autoFocus && !isFocusedElementInCurrentRow && !isFocusedElementSearch && !isFocusedElementMenu) {\n props.cellRef.current?.focus();\n }\n }\n }, [tableMeta.rowActive.rowActiveIndex]);\n\n // when the cell receives focus we actually want to focus the control inside it...\n const handleFocus = (event: React.FocusEvent<HTMLTableCellElement>) => {\n const tableElement = props.cellRef.current?.closest('table');\n\n if (tableElement && table.getIsSomeColumnsPinned() && !props.cell.column.getIsPinned()) {\n const columnFreezingOffset = table.getLeftTotalSize();\n const targetRect = event.currentTarget.getBoundingClientRect();\n const tableRect = tableElement.getBoundingClientRect();\n const leftOffsetFromScrollContainer = targetRect.left - tableRect.left;\n const scrollbarWidth = tableElement.offsetWidth - tableElement.clientWidth; // the width of table vertical scrollbar\n const isFocusedElementMenu = event.currentTarget.getAttribute('data-cell-id') === '__actions';\n\n if (\n // When pinned column overlaps the focused cell\n (leftOffsetFromScrollContainer < columnFreezingOffset ||\n // When focused cell goes behidn the edge of the table\n leftOffsetFromScrollContainer + targetRect.width > tableRect.width - scrollbarWidth) &&\n !isFocusedElementMenu\n ) {\n tableElement.scrollTo(props.cell.column.getStart() - columnFreezingOffset, tableElement.scrollTop);\n }\n }\n\n if (event.target === event.currentTarget && hasFocusableElement(event.currentTarget)) {\n focusManager.focusNext();\n }\n };\n\n return handleFocus;\n}\n"],"names":["useEditingCellAutofocus","props","focusManager","useAugmentedFocusManager","rowIndex","React","useContext","RowContext","table","cell","getContext","tableMeta","options","meta","isActiveRow","rowActive","rowActiveIndex","autoFocus","index","editing","lastFocusedCellIndex","useEffect","cellRef","current","_props$cellRef$curren","_document$activeEleme","_document$activeEleme2","isFocusedElementInCurrentRow","closest","contains","document","activeElement","isFocusedElementSearch","getAttribute","isFocusedElementMenu","_props$cellRef$curren2","focus","handleFocus","event","tableElement","_props$cellRef$curren3","getIsSomeColumnsPinned","column","getIsPinned","columnFreezingOffset","getLeftTotalSize","targetRect","currentTarget","getBoundingClientRect","tableRect","leftOffsetFromScrollContainer","left","scrollbarWidth","offsetWidth","clientWidth","width","scrollTo","getStart","scrollTop","target","hasFocusableElement","focusNext"],"mappings":";;;;;SAOgBA,uBAAuBA,CAAkBC,KAAoC;EACzF,MAAMC,YAAY,GAAGC,wBAAwB,EAAE;EAC/C,MAAM;IAAEC;GAAU,GAAGC,cAAK,CAACC,UAAU,CAACC,UAAU,CAAC;EACjD,MAAMC,KAAK,GAAGP,KAAK,CAACQ,IAAI,CAACC,UAAU,EAAE,CAACF,KAAK;EAC3C,MAAMG,SAAS,GAAGH,KAAK,CAACI,OAAO,CAACC,IAA6B;EAC7D,MAAMC,WAAW,GAAGH,SAAS,CAACI,SAAS,CAACC,cAAc,KAAKZ,QAAQ;EACnE,MAAMa,SAAS,GAAGhB,KAAK,CAACiB,KAAK,KAAKP,SAAS,CAACQ,OAAO,CAACC,oBAAoB,IAAIN,WAAW;;EAGvFT,cAAK,CAACgB,SAAS,CAAC;IACZ,IAAIpB,KAAK,CAACqB,OAAO,CAACC,OAAO,EAAE;MAAA,IAAAC,qBAAA,EAAAC,qBAAA,EAAAC,sBAAA;MACvB,MAAMC,4BAA4B,IAAAH,qBAAA,GAAGvB,KAAK,CAACqB,OAAO,CAACC,OAAO,CAACK,OAAO,CAAC,IAAI,CAAC,cAAAJ,qBAAA,uBAAnCA,qBAAA,CAAqCK,Q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WAAW,CAAC;MAC3E,MAAMpB,oBAAoB,GAAGI,KAAK,CAACS,aAAa,CAACd,YAAY,CAAC,cAAc,CAAC,KAAK,WAAW;MAE7F;;MAEI,CAACiB,6BAA6B,GAAGN,oBAAoB;;MAEjDM,6BAA6B,GAAGJ,UAAU,CAACS,KAAK,GAAGN,SAAS,CAACM,KAAK,GAAGH,cAAc,KACvF,CAAClB,oBAAoB,EACvB;QACEK,YAAY,CAACiB,QAAQ,CAACvD,KAAK,CAACQ,IAAI,CAACiC,MAAM,CAACe,QAAQ,EAAE,GAAGb,oBAAoB,EAAEL,YAAY,CAACmB,SAAS,CAAC;;;IAI1G,IAAIpB,KAAK,CAACqB,MAAM,KAAKrB,KAAK,CAACS,aAAa,IAAIa,mBAAmB,CAACtB,KAAK,CAACS,aAAa,CAAC,EAAE;MAClF7C,YAAY,CAAC2D,SAAS,EAAE;;GAE/B;EAED,OAAOxB,WAAW;AACtB;;;;"}
1
+ {"version":3,"file":"util.js","sources":["../../../../../../../../../../src/components/Table3/components/Columns/Cell/util.ts"],"sourcesContent":["import React from 'react';\nimport { TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { useAugmentedFocusManager } from '../../../../../primitives/Table/Core/components/Body/util';\nimport { TableCellRendererProps } from '../../../../../primitives/Table/Core/types';\nimport { RowContext } from '../../../../../primitives/Table/Core/components/Row/RowContext';\nimport { hasFocusableElement } from '../../../../../utils/dom';\n\nexport function useEditingCellAutofocus<TType = unknown>(props: TableCellRendererProps<TType>) {\n const focusManager = useAugmentedFocusManager();\n const { rowIndex } = React.useContext(RowContext);\n const table = props.cell.getContext().table;\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;\n const autoFocus = props.index === tableMeta.editing.lastFocusedCellIndex && isActiveRow;\n\n // focus the cell so that we trigger it's handle focus\n React.useEffect(() => {\n if (props.cellRef.current) {\n const isFocusedElementInCurrentRow = props.cellRef.current.closest('tr')?.contains(document.activeElement);\n const isFocusedElementSearch = document.activeElement?.getAttribute('name') === 'table-search';\n const isFocusedElementMenu = document.activeElement?.getAttribute('role') === 'menu';\n\n if (autoFocus && !isFocusedElementInCurrentRow && !isFocusedElementSearch && !isFocusedElementMenu) {\n props.cellRef.current?.focus();\n }\n }\n }, [tableMeta.rowActive.rowActiveIndex]);\n\n // when the cell receives focus we actually want to focus the control inside it...\n const handleFocus = (event: React.FocusEvent<HTMLTableCellElement>) => {\n const tableElement = props.cellRef.current?.closest('table');\n\n if (tableElement && table.getIsSomeColumnsPinned() && !props.cell.column.getIsPinned()) {\n const columnFreezingOffset = table.getLeftTotalSize();\n const targetRect = event.currentTarget.getBoundingClientRect();\n const tableRect = tableElement.getBoundingClientRect();\n const leftOffsetFromScrollContainer = targetRect.left - tableRect.left;\n const scrollbarWidth = tableElement.offsetWidth - tableElement.clientWidth; // the width of table vertical scrollbar\n const isFocusedElementMenu = event.currentTarget.getAttribute('data-cell-id') === '__actions';\n\n if (\n // When pinned column overlaps the focused cell\n (leftOffsetFromScrollContainer < columnFreezingOffset ||\n // When focused cell goes behidn the edge of the table\n leftOffsetFromScrollContainer + targetRect.width > tableRect.width - scrollbarWidth) &&\n !isFocusedElementMenu\n ) {\n tableElement.scrollTo(props.cell.column.getStart() - columnFreezingOffset, tableElement.scrollTop);\n }\n }\n\n if (event.target === event.currentTarget && hasFocusableElement(event.currentTarget)) {\n focusManager.focusNext();\n }\n };\n\n return handleFocus;\n}\n"],"names":["useEditingCellAutofocus","props","focusManager","useAugmentedFocusManager","_React$useContext","React","useContext","RowContext","rowIndex","table","cell","getContext","tableMeta","options","meta","isActiveRow","rowActive","rowActiveIndex","autoFocus","index","editing","lastFocusedCellIndex","useEffect","cellRef","current","_props$cellRef$curren","_document$activeEleme","_document$activeEleme2","isFocusedElementInCurrentRow","closest","contains","document","activeElement","isFocusedElementSearch","getAttribute","isFocusedElementMenu","_props$cellRef$curren2","focus","handleFocus","event","tableElement","_props$cellRef$curren3","getIsSomeColumnsPinned","column","getIsPinned","columnFreezingOffset","getLeftTotalSize","targetRect","currentTarget","getBoundingClientRect","tableRect","leftOffsetFromScrollContainer","left","scrollbarWidth","offsetWidth","clientWidth","width","scrollTo","getStart","scrollTop","target","hasFocusableElement","focusNext"],"mappings":";;;;;SAOgBA,uBAAuBA,CAAkBC,KAAoC;EACzF,IAAMC,YAAY,GAAGC,wBAAwB,EAAE;EAC/C,IAAAC,iBAAA,GAAqBC,cAAK,CAACC,UAAU,CAACC,UAAU,CAAC;IAAzCC,QAAQ,GAAAJ,iBAAA,CAARI,QAAQ;EAChB,IAAMC,KAAK,GAAGR,KAAK,CAACS,IAAI,CAACC,UAAU,EAAE,CAACF,KAAK;EAC3C,IAAMG,SAAS,GAAGH,KAAK,CAACI,OAAO,CAACC,IAA6B;EAC7D,IAAMC,WAAW,GAAGH,SAAS,CAACI,SAAS,CAACC,cAAc,KAAKT,QAAQ;EACnE,IAAMU,SAAS,GAAGjB,KAAK,CAACkB,KAAK,KAAKP,SAAS,CAACQ,OAAO,CAACC,oBAAoB,IAAIN,WAAW;;EAGvFV,cAAK,CAACiB,SAAS,CAAC;IACZ,IAAIrB,KAAK,CAACsB,OAAO,CAACC,OAAO,EAAE;MAAA,IAAAC,qBAAA,EAAAC,qBAAA,EAAAC,sBAAA;MACvB,IAAMC,4BAA4B,IAAAH,qBAAA,GAAGxB,KAAK,CAACsB,OAAO,CAACC,OAAO,CAACK,OAAO,CAAC,IAAI,CAAC,cAAAJ,qBAAA,uBAAnCA,qBAAA,CAAqCK,QAAQ,CAACC,QAAQ,CAACC,aAAa,CAAC;MAC1G,IAAMC,sBAAsB,GAAG,EAAAP,qBAAA,GAAAK,QAAQ,CAACC,aAAa,cAAAN,qBAAA,uBAAtBA,qBAAA,CAAwBQ,YAAY,CAAC,MAAM,CAAC,MAAK,cAAc;MAC9F,IAAMC,oBAAoB,GAAG,EAAAR,sBAAA,GAAAI,QAAQ,CAACC,aAAa,cAAAL,sBAAA,uBAAtB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vB;QACEK,YAAY,CAACiB,QAAQ,CAACxD,KAAK,CAACS,IAAI,CAACiC,MAAM,CAACe,QAAQ,EAAE,GAAGb,oBAAoB,EAAEL,YAAY,CAACmB,SAAS,CAAC;;;IAI1G,IAAIpB,KAAK,CAACqB,MAAM,KAAKrB,KAAK,CAACS,aAAa,IAAIa,mBAAmB,CAACtB,KAAK,CAACS,aAAa,CAAC,EAAE;MAClF9C,YAAY,CAAC4D,SAAS,EAAE;;GAE/B;EAED,OAAOxB,WAAW;AACtB;;;;"}
@@ -5,23 +5,20 @@ import { Menu } from '../../../../Menu/Menu.js';
5
5
  import { DiscardChangesConfirmationDialog } from '../../Editing/DiscardChangesConfirmationDialog.js';
6
6
 
7
7
  function EditingActionsMenu(props) {
8
- const {
9
- hasChanges,
10
- hasErrors,
11
- onDiscard: handleDiscard,
12
- onEditingSave: handleSave,
13
- isLastRow
14
- } = props;
15
- const {
16
- texts
17
- } = useLocalization();
18
- const handleKeyDown = event => {
8
+ var hasChanges = props.hasChanges,
9
+ hasErrors = props.hasErrors,
10
+ handleDiscard = props.onDiscard,
11
+ handleSave = props.onEditingSave,
12
+ isLastRow = props.isLastRow;
13
+ var _useLocalization = useLocalization(),
14
+ texts = _useLocalization.texts;
15
+ var handleKeyDown = function handleKeyDown(event) {
19
16
  // normally we handle this on change of active row, but when tabbing out of the last row the active row state stays on the last one.
20
17
  if (isLastRow && hasChanges && event.key === 'Tab') {
21
18
  handleSave();
22
19
  }
23
20
  };
24
- const handleMenuContentKeyDown = event => {
21
+ var handleMenuContentKeyDown = function handleMenuContentKeyDown(event) {
25
22
  // Stops the keyboard event from propagating to the Table when EditActionsMenu is open
26
23
  if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
27
24
  event.stopPropagation();
@@ -32,19 +29,23 @@ function EditingActionsMenu(props) {
32
29
  "aria-label": texts.table3.editing.actions.tooltip,
33
30
  icon: "more",
34
31
  onKeyDown: handleKeyDown,
35
- menu: menuProps => (/*#__PURE__*/React__default.createElement(Menu, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu.Content, {
36
- onKeyDown: handleMenuContentKeyDown
37
- }, /*#__PURE__*/React__default.createElement(Menu.Item, {
38
- icon: "tick",
39
- disabled: !hasChanges || hasErrors,
40
- onClick: handleSave
41
- }, texts.table3.editing.actions.save), /*#__PURE__*/React__default.createElement(Menu.Item, {
42
- icon: "close",
43
- disabled: !hasChanges,
44
- dialog: props => /*#__PURE__*/React__default.createElement(DiscardChangesConfirmationDialog, Object.assign({}, props, {
45
- onDiscard: handleDiscard
46
- }))
47
- }, texts.table3.editing.actions.clear))))
32
+ menu: function menu(menuProps) {
33
+ return /*#__PURE__*/React__default.createElement(Menu, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu.Content, {
34
+ onKeyDown: handleMenuContentKeyDown
35
+ }, /*#__PURE__*/React__default.createElement(Menu.Item, {
36
+ icon: "tick",
37
+ disabled: !hasChanges || hasErrors,
38
+ onClick: handleSave
39
+ }, texts.table3.editing.actions.save), /*#__PURE__*/React__default.createElement(Menu.Item, {
40
+ icon: "close",
41
+ disabled: !hasChanges,
42
+ dialog: function dialog(props) {
43
+ return /*#__PURE__*/React__default.createElement(DiscardChangesConfirmationDialog, Object.assign({}, props, {
44
+ onDiscard: handleDiscard
45
+ }));
46
+ }
47
+ }, texts.table3.editing.actions.clear)));
48
+ }
48
49
  });
49
50
  }
50
51
 
@@ -1 +1 @@
1
- {"version":3,"file":"EditingActionsMenu.js","sources":["../../../../../../../../../../src/components/Table3/components/Columns/Internal/EditingActionsMenu.tsx"],"sourcesContent":["import React from 'react';\nimport { IconButton } from '../../../../IconButton/IconButton';\nimport { Menu } from '../../../../Menu/Menu';\nimport { useLocalization } from '../../../../Provider/Localization';\nimport { DiscardChangesConfirmationDialog } from '../../Editing/DiscardChangesConfirmationDialog';\n\ntype EditingActionsMenuProps = {\n hasChanges: boolean;\n hasErrors: boolean;\n onDiscard: () => void;\n onEditingSave: () => Promise<void>;\n isLastRow: boolean;\n};\n\nexport function EditingActionsMenu(props: EditingActionsMenuProps) {\n const { hasChanges, hasErrors, onDiscard: handleDiscard, onEditingSave: handleSave, isLastRow } = props;\n const { texts } = useLocalization();\n\n const handleKeyDown = event => {\n // normally we handle this on change of active row, but when tabbing out of the last row the active row state stays on the last one.\n if (isLastRow && hasChanges && event.key === 'Tab') {\n handleSave();\n }\n };\n\n const handleMenuContentKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n // Stops the keyboard event from propagating to the Table when EditActionsMenu is open\n if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {\n event.stopPropagation();\n }\n };\n\n return (\n <IconButton\n appearance=\"transparent\"\n aria-label={texts.table3.editing.actions.tooltip}\n icon=\"more\"\n onKeyDown={handleKeyDown}\n menu={menuProps => (\n <Menu {...menuProps}>\n <Menu.Content onKeyDown={handleMenuContentKeyDown}>\n <Menu.Item icon=\"tick\" disabled={!hasChanges || hasErrors} onClick={handleSave}>\n {texts.table3.editing.actions.save}\n </Menu.Item>\n <Menu.Item\n icon=\"close\"\n disabled={!hasChanges}\n dialog={props => <DiscardChangesConfirmationDialog {...props} onDiscard={handleDiscard} />}>\n {texts.table3.editing.actions.clear}\n </Menu.Item>\n </Menu.Content>\n </Menu>\n )}\n />\n );\n}\n"],"names":["EditingActionsMenu","props","hasChanges","hasErrors","onDiscard","handleDiscard","onEditingSave","handleSave","isLastRow","texts","useLocalization","handleKeyDown","event","key","handleMenuContentKeyDown","stopPropagation","React","IconButton","appearance","table3","editing","actions","tooltip","icon","onKeyDown","menu","menuProps","Menu","Content","Item","disabled","onClick","save","dialog","DiscardChangesConfirmationDialog","clear"],"mappings":";;;;;;SAcgBA,kBAAkBA,CAACC,KAA8B;EAC7D,MAAM;IAAEC,UAAU;IAAEC,SAAS;IAAEC,SAAS,EAAEC,aAAa;IAAEC,aAAa,EAAEC,UAAU;IAAEC;GAAW,GAAGP,KAAK;EACvG,MAAM;IAAEQ;GAAO,GAAGC,eAAe,EAAE;EAEnC,MAAMC,aAAa,GAAGC,KAAK;;IAEvB,IAAIJ,SAAS,IAAIN,UAAU,IAAIU,KAAK,CAACC,GAAG,KAAK,KAAK,EAAE;MAChDN,UAAU,EAAE;;GAEnB;EAED,MAAMO,wBAAwB,GAAIF,KAA0C;;IAExE,IAAIA,KAAK,CAACC,GAAG,KAAK,WAAW,IAAID,KAAK,CAACC,GAAG,KAAK,YAAY,EAAE;MACzDD,KAAK,CAACG,eAAe,EAAE;;GAE9B;EAED,oBACIC,6BAACC,UAAU;IACPC,UAAU,EAAC,aAAa;kBACZT,KAAK,CAACU,MAAM,CAACC,OAAO,CAACC,OAAO,CAACC,OAAO;IAChDC,IAAI,EAAC,MAAM;IACXC,SAAS,EAAEb,aAAa;IACxBc,IAAI,EAAEC,SAAS,kBACXV,6BAACW,IAAI,oBAAKD,SAAS,gBACfV,6BAACW,IAAI,CAACC,OAAO;MAACJ,SAAS,EAAEV;oBACrBE,6BAACW,IAAI,CAACE,IAAI;MAACN,IAAI,EAAC,MAAM;MAACO,QAAQ,EAAE,CAAC5B,UAAU,IAAIC,SAAS;MAAE4B,OAAO,EAAExB;OAC/DE,KAAK,CAACU,MAAM,CAACC,OAAO,CAACC,OAAO,CAACW,IAAI,CAC1B,eACZhB,6BAACW,IAAI,CAACE,IAAI;MACNN,IAAI,EAAC,OAAO;MACZO,QAAQ,EAAE,CAAC5B,UAAU;MACrB+B,MAAM,EAAEhC,KAAK,iBAAIe,6BAACkB,gCAAgC,oBAAKjC,KAAK;QAAEG,SAAS,EAAEC;;OACxEI,KAAK,CAACU,MAAM,CAACC,OAAO,CAACC,OAAO,CAACc,KAAK,CAC3B,CACD,CACZ;IAEb;AAEV;;;;"}
1
+ {"version":3,"file":"EditingActionsMenu.js","sources":["../../../../../../../../../../src/components/Table3/components/Columns/Internal/EditingActionsMenu.tsx"],"sourcesContent":["import React from 'react';\nimport { IconButton } from '../../../../IconButton/IconButton';\nimport { Menu } from '../../../../Menu/Menu';\nimport { useLocalization } from '../../../../Provider/Localization';\nimport { DiscardChangesConfirmationDialog } from '../../Editing/DiscardChangesConfirmationDialog';\n\ntype EditingActionsMenuProps = {\n hasChanges: boolean;\n hasErrors: boolean;\n onDiscard: () => void;\n onEditingSave: () => Promise<void>;\n isLastRow: boolean;\n};\n\nexport function EditingActionsMenu(props: EditingActionsMenuProps) {\n const { hasChanges, hasErrors, onDiscard: handleDiscard, onEditingSave: handleSave, isLastRow } = props;\n const { texts } = useLocalization();\n\n const handleKeyDown = event => {\n // normally we handle this on change of active row, but when tabbing out of the last row the active row state stays on the last one.\n if (isLastRow && hasChanges && event.key === 'Tab') {\n handleSave();\n }\n };\n\n const handleMenuContentKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n // Stops the keyboard event from propagating to the Table when EditActionsMenu is open\n if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {\n event.stopPropagation();\n }\n };\n\n return (\n <IconButton\n appearance=\"transparent\"\n aria-label={texts.table3.editing.actions.tooltip}\n icon=\"more\"\n onKeyDown={handleKeyDown}\n menu={menuProps => (\n <Menu {...menuProps}>\n <Menu.Content onKeyDown={handleMenuContentKeyDown}>\n <Menu.Item icon=\"tick\" disabled={!hasChanges || hasErrors} onClick={handleSave}>\n {texts.table3.editing.actions.save}\n </Menu.Item>\n <Menu.Item\n icon=\"close\"\n disabled={!hasChanges}\n dialog={props => <DiscardChangesConfirmationDialog {...props} onDiscard={handleDiscard} />}>\n {texts.table3.editing.actions.clear}\n </Menu.Item>\n </Menu.Content>\n </Menu>\n )}\n />\n );\n}\n"],"names":["EditingActionsMenu","props","hasChanges","hasErrors","handleDiscard","onDiscard","handleSave","onEditingSave","isLastRow","_useLocalization","useLocalization","texts","handleKeyDown","event","key","handleMenuContentKeyDown","stopPropagation","React","IconButton","appearance","table3","editing","actions","tooltip","icon","onKeyDown","menu","menuProps","Menu","Content","Item","disabled","onClick","save","dialog","DiscardChangesConfirmationDialog","clear"],"mappings":";;;;;;SAcgBA,kBAA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