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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (662) hide show
  1. package/dist/components/Icon/components/Autopay.d.ts +3 -0
  2. package/dist/components/Icon/components/AutopayPaused.d.ts +3 -0
  3. package/dist/components/Icon/components/Person.d.ts +3 -0
  4. package/dist/components/Icon/components/PersonSolid.d.ts +3 -0
  5. package/dist/components/Icon/components/Wallet.d.ts +3 -0
  6. package/dist/components/Icon/components/index.d.ts +1 -1
  7. package/dist/components/Input/Input.d.ts +1 -1
  8. package/dist/components/Menu/components/Item.d.ts +1 -1
  9. package/dist/components/Menu/components/Link.d.ts +1 -1
  10. package/dist/components/Navigation2/components/Link.d.ts +1 -1
  11. package/dist/components/Select2/components/Option.d.ts +2 -2
  12. package/dist/components/Select2/components/Search.d.ts +1 -1
  13. package/dist/components/Tag/Tag.d.ts +1 -1
  14. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +32 -0
  15. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  16. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js +32 -24
  17. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js.map +1 -1
  18. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js +84 -61
  19. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js.map +1 -1
  20. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js +16 -15
  21. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js.map +1 -1
  22. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js +12 -13
  23. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js.map +1 -1
  24. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js +104 -68
  25. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -1
  26. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js +38 -29
  27. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js.map +1 -1
  28. package/dist/esm/packages/taco/src/charts/components/Donut/util.js +2 -2
  29. package/dist/esm/packages/taco/src/charts/components/Donut/util.js.map +1 -1
  30. package/dist/esm/packages/taco/src/charts/components/Legend.js +45 -37
  31. package/dist/esm/packages/taco/src/charts/components/Legend.js.map +1 -1
  32. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js +32 -24
  33. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js.map +1 -1
  34. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js +5 -3
  35. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js.map +1 -1
  36. package/dist/esm/packages/taco/src/charts/components/Tooltip.js +26 -25
  37. package/dist/esm/packages/taco/src/charts/components/Tooltip.js.map +1 -1
  38. package/dist/esm/packages/taco/src/charts/utils/color.js +13 -12
  39. package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -1
  40. package/dist/esm/packages/taco/src/charts/utils/common.js +39 -26
  41. package/dist/esm/packages/taco/src/charts/utils/common.js.map +1 -1
  42. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +30 -31
  43. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  44. package/dist/esm/packages/taco/src/components/Alert/Alert.js +7 -9
  45. package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
  46. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js +14 -13
  47. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js.map +1 -1
  48. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js +2 -2
  49. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js.map +1 -1
  50. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js +10 -9
  51. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
  52. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js +4 -4
  53. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js.map +1 -1
  54. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js +5 -6
  55. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js.map +1 -1
  56. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +2 -2
  57. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
  58. package/dist/esm/packages/taco/src/components/Badge/Badge.js +21 -25
  59. package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
  60. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +12 -14
  61. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
  62. package/dist/esm/packages/taco/src/components/Banner/Banner.js +7 -10
  63. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  64. package/dist/esm/packages/taco/src/components/Banner/util.js +3 -3
  65. package/dist/esm/packages/taco/src/components/Banner/util.js.map +1 -1
  66. package/dist/esm/packages/taco/src/components/Button/Button.js +28 -29
  67. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  68. package/dist/esm/packages/taco/src/components/Button/util.js +25 -24
  69. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  70. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +75 -71
  71. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  72. package/dist/esm/packages/taco/src/components/Card/Card.js +14 -15
  73. package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
  74. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +24 -22
  75. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
  76. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +21 -23
  77. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  78. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +76 -64
  79. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  80. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +60 -57
  81. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  82. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +27 -28
  83. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  84. package/dist/esm/packages/taco/src/components/Dialog/Context.js +4 -4
  85. package/dist/esm/packages/taco/src/components/Dialog/Context.js.map +1 -1
  86. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js +54 -39
  87. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  88. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +36 -38
  89. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  90. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js +3 -3
  91. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  92. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js +2 -2
  93. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js.map +1 -1
  94. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js +5 -6
  95. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js.map +1 -1
  96. package/dist/esm/packages/taco/src/components/Dialog/util.js +7 -3
  97. package/dist/esm/packages/taco/src/components/Dialog/util.js.map +1 -1
  98. package/dist/esm/packages/taco/src/components/Drawer/Context.js +5 -5
  99. package/dist/esm/packages/taco/src/components/Drawer/Context.js.map +1 -1
  100. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +61 -51
  101. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
  102. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +134 -145
  103. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  104. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js +1 -1
  105. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js.map +1 -1
  106. package/dist/esm/packages/taco/src/components/Drawer/util.js +5 -5
  107. package/dist/esm/packages/taco/src/components/Drawer/util.js.map +1 -1
  108. package/dist/esm/packages/taco/src/components/Field/Field.js +14 -12
  109. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  110. package/dist/esm/packages/taco/src/components/Form/Form.js +7 -6
  111. package/dist/esm/packages/taco/src/components/Form/Form.js.map +1 -1
  112. package/dist/esm/packages/taco/src/components/Group/Group.js +9 -7
  113. package/dist/esm/packages/taco/src/components/Group/Group.js.map +1 -1
  114. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +37 -36
  115. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
  116. package/dist/esm/packages/taco/src/components/Header/Header.js +2 -2
  117. package/dist/esm/packages/taco/src/components/Header/Header.js.map +1 -1
  118. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js +14 -10
  119. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  120. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js +5 -4
  121. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js.map +1 -1
  122. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js +7 -9
  123. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js.map +1 -1
  124. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +9 -9
  125. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  126. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +66 -46
  127. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  128. package/dist/esm/packages/taco/src/components/Header/components/Button.js +12 -8
  129. package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
  130. package/dist/esm/packages/taco/src/components/Header/components/Link.js +22 -18
  131. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  132. package/dist/esm/packages/taco/src/components/Header/components/Logo.js +4 -4
  133. package/dist/esm/packages/taco/src/components/Header/components/Logo.js.map +1 -1
  134. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +2 -2
  135. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
  136. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js +10 -9
  137. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js.map +1 -1
  138. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js +2 -2
  139. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js.map +1 -1
  140. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js +5 -7
  141. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js.map +1 -1
  142. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js +1 -1
  143. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js.map +1 -1
  144. package/dist/esm/packages/taco/src/components/Icon/Icon.js +7 -7
  145. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  146. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js +19 -0
  147. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js.map +1 -0
  148. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js +19 -0
  149. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js.map +1 -0
  150. package/dist/esm/packages/taco/src/components/Icon/components/Person.js +19 -0
  151. package/dist/esm/packages/taco/src/components/Icon/components/Person.js.map +1 -0
  152. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js +19 -0
  153. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js.map +1 -0
  154. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js +19 -0
  155. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js.map +1 -0
  156. package/dist/esm/packages/taco/src/components/Icon/components/index.js +14 -4
  157. package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
  158. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js +22 -23
  159. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
  160. package/dist/esm/packages/taco/src/components/Input/Input.js +45 -44
  161. package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
  162. package/dist/esm/packages/taco/src/components/Input/util.js +8 -5
  163. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  164. package/dist/esm/packages/taco/src/components/Layout/Layout.js +7 -5
  165. package/dist/esm/packages/taco/src/components/Layout/Layout.js.map +1 -1
  166. package/dist/esm/packages/taco/src/components/Layout/components/Content.js +2 -2
  167. package/dist/esm/packages/taco/src/components/Layout/components/Content.js.map +1 -1
  168. package/dist/esm/packages/taco/src/components/Layout/components/Context.js +4 -2
  169. package/dist/esm/packages/taco/src/components/Layout/components/Context.js.map +1 -1
  170. package/dist/esm/packages/taco/src/components/Layout/components/Page.js +2 -2
  171. package/dist/esm/packages/taco/src/components/Layout/components/Page.js.map +1 -1
  172. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +34 -27
  173. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  174. package/dist/esm/packages/taco/src/components/Layout/components/Top.js +9 -6
  175. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  176. package/dist/esm/packages/taco/src/components/List/components/Button.js +1 -1
  177. package/dist/esm/packages/taco/src/components/List/components/Button.js.map +1 -1
  178. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js +10 -7
  179. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js.map +1 -1
  180. package/dist/esm/packages/taco/src/components/List/components/Group.js +1 -1
  181. package/dist/esm/packages/taco/src/components/List/components/Group.js.map +1 -1
  182. package/dist/esm/packages/taco/src/components/List/components/Item.js +15 -13
  183. package/dist/esm/packages/taco/src/components/List/components/Item.js.map +1 -1
  184. package/dist/esm/packages/taco/src/components/List/components/Link.js +3 -3
  185. package/dist/esm/packages/taco/src/components/List/components/Link.js.map +1 -1
  186. package/dist/esm/packages/taco/src/components/List/components/Toggle.js +29 -27
  187. package/dist/esm/packages/taco/src/components/List/components/Toggle.js.map +1 -1
  188. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js +21 -26
  189. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js.map +1 -1
  190. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +82 -70
  191. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  192. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js +56 -51
  193. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js.map +1 -1
  194. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js +83 -65
  195. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js.map +1 -1
  196. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js +9 -10
  197. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js.map +1 -1
  198. package/dist/esm/packages/taco/src/components/Listbox/util.js +78 -48
  199. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  200. package/dist/esm/packages/taco/src/components/Menu/Context.js +2 -2
  201. package/dist/esm/packages/taco/src/components/Menu/Context.js.map +1 -1
  202. package/dist/esm/packages/taco/src/components/Menu/Menu.js +42 -26
  203. package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
  204. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js +8 -8
  205. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js.map +1 -1
  206. package/dist/esm/packages/taco/src/components/Menu/components/Content.js +27 -21
  207. package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
  208. package/dist/esm/packages/taco/src/components/Menu/components/Header.js +3 -3
  209. package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
  210. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +32 -32
  211. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  212. package/dist/esm/packages/taco/src/components/Menu/components/Link.js +10 -10
  213. package/dist/esm/packages/taco/src/components/Menu/components/Link.js.map +1 -1
  214. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js +15 -16
  215. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js.map +1 -1
  216. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js +1 -1
  217. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js.map +1 -1
  218. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js +7 -7
  219. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js.map +1 -1
  220. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +5 -5
  221. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
  222. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +6 -6
  223. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
  224. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +41 -36
  225. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  226. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js +6 -6
  227. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js.map +1 -1
  228. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js +6 -6
  229. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js.map +1 -1
  230. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +14 -11
  231. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
  232. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +31 -24
  233. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  234. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +7 -7
  235. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  236. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js +9 -7
  237. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js.map +1 -1
  238. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +48 -51
  239. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  240. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +26 -23
  241. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
  242. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +53 -39
  243. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  244. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js +17 -7
  245. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js.map +1 -1
  246. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js +8 -9
  247. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js.map +1 -1
  248. package/dist/esm/packages/taco/src/components/Popover/Popover.js +45 -43
  249. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  250. package/dist/esm/packages/taco/src/components/Popover/Primitives.js +1 -1
  251. package/dist/esm/packages/taco/src/components/Popover/Primitives.js.map +1 -1
  252. package/dist/esm/packages/taco/src/components/Popover/util.js +3 -1
  253. package/dist/esm/packages/taco/src/components/Popover/util.js.map +1 -1
  254. package/dist/esm/packages/taco/src/components/Progress/Progress.js +13 -11
  255. package/dist/esm/packages/taco/src/components/Progress/Progress.js.map +1 -1
  256. package/dist/esm/packages/taco/src/components/Provider/Localization.js +13 -12
  257. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  258. package/dist/esm/packages/taco/src/components/Provider/Provider.js +8 -8
  259. package/dist/esm/packages/taco/src/components/Provider/Provider.js.map +1 -1
  260. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +54 -47
  261. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  262. package/dist/esm/packages/taco/src/components/RadioGroup/util.js +7 -1
  263. package/dist/esm/packages/taco/src/components/RadioGroup/util.js.map +1 -1
  264. package/dist/esm/packages/taco/src/components/Report/Report.js +7 -5
  265. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  266. package/dist/esm/packages/taco/src/components/Report/useReport.js +1 -1
  267. package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
  268. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +17 -13
  269. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  270. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +11 -11
  271. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
  272. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +44 -39
  273. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  274. package/dist/esm/packages/taco/src/components/Select/Select.js +28 -31
  275. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  276. package/dist/esm/packages/taco/src/components/Select/useSelect.js +79 -70
  277. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  278. package/dist/esm/packages/taco/src/components/Select2/Select2.js +154 -121
  279. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  280. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js +2 -4
  281. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js.map +1 -1
  282. package/dist/esm/packages/taco/src/components/Select2/components/Context.js +4 -2
  283. package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
  284. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +45 -41
  285. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  286. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +145 -129
  287. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  288. package/dist/esm/packages/taco/src/components/Select2/components/Group.js +8 -8
  289. package/dist/esm/packages/taco/src/components/Select2/components/Group.js.map +1 -1
  290. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +29 -30
  291. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  292. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +9 -10
  293. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  294. package/dist/esm/packages/taco/src/components/Select2/components/Title.js +2 -2
  295. package/dist/esm/packages/taco/src/components/Select2/components/Title.js.map +1 -1
  296. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +136 -128
  297. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  298. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +32 -23
  299. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  300. package/dist/esm/packages/taco/src/components/Select2/utilities.js +13 -6
  301. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  302. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +16 -13
  303. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  304. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js +17 -12
  305. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js.map +1 -1
  306. package/dist/esm/packages/taco/src/components/Switch/Switch.js +14 -14
  307. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  308. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +28 -23
  309. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  310. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js +7 -3
  311. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js.map +1 -1
  312. package/dist/esm/packages/taco/src/components/Table/components/Table.js +22 -18
  313. package/dist/esm/packages/taco/src/components/Table/components/Table.js.map +1 -1
  314. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +100 -92
  315. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  316. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +136 -118
  317. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  318. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js +55 -55
  319. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  320. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js +35 -41
  321. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  322. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js +77 -71
  323. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  324. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js +56 -30
  325. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js.map +1 -1
  326. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js +151 -142
  327. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js.map +1 -1
  328. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js +22 -20
  329. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  330. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +9 -12
  331. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  332. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +41 -41
  333. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js.map +1 -1
  334. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js +16 -14
  335. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js.map +1 -1
  336. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js +32 -26
  337. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js.map +1 -1
  338. package/dist/esm/packages/taco/src/components/Table/util.js +37 -30
  339. package/dist/esm/packages/taco/src/components/Table/util.js.map +1 -1
  340. package/dist/esm/packages/taco/src/components/Table3/Table3.js +12 -10
  341. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  342. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js +13 -14
  343. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js.map +1 -1
  344. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +21 -23
  345. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  346. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js +20 -17
  347. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -1
  348. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +67 -73
  349. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  350. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js +2 -2
  351. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -1
  352. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +19 -20
  353. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -1
  354. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +26 -25
  355. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  356. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +45 -40
  357. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  358. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +7 -8
  359. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
  360. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +18 -19
  361. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
  362. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +7 -10
  363. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  364. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +38 -36
  365. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  366. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +15 -15
  367. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  368. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +8 -11
  369. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
  370. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +164 -201
  371. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -1
  372. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +40 -27
  373. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  374. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +18 -16
  375. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  376. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +25 -19
  377. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  378. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +29 -35
  379. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  380. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +34 -35
  381. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
  382. package/dist/esm/packages/taco/src/components/Tag/Tag.js +12 -12
  383. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  384. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js +8 -11
  385. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js.map +1 -1
  386. package/dist/esm/packages/taco/src/components/Toast/Toast.js +19 -20
  387. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  388. package/dist/esm/packages/taco/src/components/Toast/Toaster.js +117 -96
  389. package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
  390. package/dist/esm/packages/taco/src/components/Toast/util.js +6 -4
  391. package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
  392. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +10 -9
  393. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
  394. package/dist/esm/packages/taco/src/components/Tour/Tour.js +49 -46
  395. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  396. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +33 -27
  397. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  398. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js +15 -13
  399. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js.map +1 -1
  400. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js +1 -1
  401. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  402. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js +11 -6
  403. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js.map +1 -1
  404. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js +19 -13
  405. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js.map +1 -1
  406. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js +4 -4
  407. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
  408. package/dist/esm/packages/taco/src/hooks/useId.js +4 -2
  409. package/dist/esm/packages/taco/src/hooks/useId.js.map +1 -1
  410. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js +20 -18
  411. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
  412. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js +7 -5
  413. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js.map +1 -1
  414. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js +9 -5
  415. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js.map +1 -1
  416. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js +3 -1
  417. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js.map +1 -1
  418. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js +2 -2
  419. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js.map +1 -1
  420. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js +24 -22
  421. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js.map +1 -1
  422. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js +13 -6
  423. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js.map +1 -1
  424. package/dist/esm/packages/taco/src/hooks/useMergedRef.js +3 -3
  425. package/dist/esm/packages/taco/src/hooks/useMergedRef.js.map +1 -1
  426. package/dist/esm/packages/taco/src/hooks/usePrevious.js +2 -2
  427. package/dist/esm/packages/taco/src/hooks/usePrevious.js.map +1 -1
  428. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js +14 -14
  429. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js.map +1 -1
  430. package/dist/esm/packages/taco/src/primitives/Button.js +16 -13
  431. package/dist/esm/packages/taco/src/primitives/Button.js.map +1 -1
  432. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +50 -44
  433. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
  434. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js +4 -2
  435. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js.map +1 -1
  436. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js +9 -5
  437. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js.map +1 -1
  438. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js +16 -18
  439. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
  440. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +47 -40
  441. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
  442. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js +9 -10
  443. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js.map +1 -1
  444. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +22 -20
  445. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  446. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js +24 -27
  447. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  448. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js +11 -10
  449. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js.map +1 -1
  450. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +22 -19
  451. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  452. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js +25 -22
  453. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -1
  454. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js +6 -6
  455. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -1
  456. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +30 -14
  457. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  458. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js +18 -19
  459. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js.map +1 -1
  460. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +34 -34
  461. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
  462. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js +10 -12
  463. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js.map +1 -1
  464. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js +19 -18
  465. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -1
  466. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +42 -40
  467. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  468. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +5 -7
  469. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
  470. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +19 -24
  471. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  472. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +56 -55
  473. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
  474. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +27 -23
  475. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  476. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js +13 -16
  477. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js.map +1 -1
  478. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +86 -87
  479. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  480. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js +14 -11
  481. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  482. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +85 -58
  483. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  484. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js +18 -20
  485. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  486. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js +3 -3
  487. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  488. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js +11 -6
  489. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
  490. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +58 -49
  491. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  492. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js +28 -32
  493. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -1
  494. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js +34 -29
  495. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
  496. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js +1 -1
  497. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -1
  498. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js +11 -11
  499. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -1
  500. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js +1 -1
  501. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -1
  502. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js +23 -22
  503. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  504. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +54 -39
  505. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  506. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +39 -37
  507. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
  508. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +20 -16
  509. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
  510. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js +16 -15
  511. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -1
  512. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +50 -41
  513. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  514. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js +13 -9
  515. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js.map +1 -1
  516. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js +57 -51
  517. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  518. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +71 -67
  519. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -1
  520. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js +40 -37
  521. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -1
  522. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js +64 -44
  523. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  524. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js +62 -51
  525. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  526. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js +6 -6
  527. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -1
  528. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js +13 -5
  529. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js.map +1 -1
  530. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +93 -77
  531. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  532. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js +15 -15
  533. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js.map +1 -1
  534. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js +31 -41
  535. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js.map +1 -1
  536. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js +31 -30
  537. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js.map +1 -1
  538. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js +3 -3
  539. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -1
  540. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +14 -15
  541. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
  542. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js +2 -2
  543. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js.map +1 -1
  544. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +42 -36
  545. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  546. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js +67 -74
  547. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
  548. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js +11 -6
  549. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js.map +1 -1
  550. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js +5 -2
  551. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js.map +1 -1
  552. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js +15 -5
  553. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js.map +1 -1
  554. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js +5 -2
  555. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js.map +1 -1
  556. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js +26 -16
  557. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js.map +1 -1
  558. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js +9 -3
  559. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js.map +1 -1
  560. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js +42 -23
  561. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
  562. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js +9 -6
  563. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js.map +1 -1
  564. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js +9 -4
  565. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js.map +1 -1
  566. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js +5 -2
  567. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js.map +1 -1
  568. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js +9 -3
  569. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js.map +1 -1
  570. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js +5 -2
  571. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js.map +1 -1
  572. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js +1 -1
  573. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js.map +1 -1
  574. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js +15 -5
  575. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js.map +1 -1
  576. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js +14 -9
  577. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js.map +1 -1
  578. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +25 -13
  579. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
  580. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js +43 -24
  581. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js.map +1 -1
  582. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js +34 -24
  583. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  584. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js +4 -4
  585. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js.map +1 -1
  586. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js +3 -3
  587. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js.map +1 -1
  588. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js +18 -16
  589. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js.map +1 -1
  590. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js +2 -2
  591. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js.map +1 -1
  592. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js +6 -4
  593. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js.map +1 -1
  594. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js +8 -8
  595. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js.map +1 -1
  596. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js +6 -6
  597. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js.map +1 -1
  598. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js +8 -6
  599. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  600. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js +17 -17
  601. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  602. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js +2 -2
  603. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js.map +1 -1
  604. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +55 -55
  605. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  606. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js +59 -30
  607. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js.map +1 -1
  608. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js +4 -4
  609. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js.map +1 -1
  610. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js +33 -19
  611. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js.map +1 -1
  612. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +11 -11
  613. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
  614. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js +21 -19
  615. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  616. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js +6 -7
  617. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  618. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +138 -106
  619. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  620. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js +3 -1
  621. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  622. package/dist/esm/packages/taco/src/types.js +1 -1
  623. package/dist/esm/packages/taco/src/types.js.map +1 -1
  624. package/dist/esm/packages/taco/src/utils/aria.js +2 -2
  625. package/dist/esm/packages/taco/src/utils/aria.js.map +1 -1
  626. package/dist/esm/packages/taco/src/utils/date.js +47 -23
  627. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  628. package/dist/esm/packages/taco/src/utils/debounce.js +10 -4
  629. package/dist/esm/packages/taco/src/utils/debounce.js.map +1 -1
  630. package/dist/esm/packages/taco/src/utils/device.js +4 -2
  631. package/dist/esm/packages/taco/src/utils/device.js.map +1 -1
  632. package/dist/esm/packages/taco/src/utils/dom.js +26 -20
  633. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  634. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js +40 -38
  635. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js.map +1 -1
  636. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js +9 -7
  637. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js.map +1 -1
  638. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js +20 -9
  639. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  640. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js +9 -9
  641. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js.map +1 -1
  642. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js +8 -6
  643. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js.map +1 -1
  644. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js +16 -11
  645. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js.map +1 -1
  646. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js +11 -6
  647. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js.map +1 -1
  648. package/dist/esm/packages/taco/src/utils/input.js +10 -7
  649. package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
  650. package/dist/esm/packages/taco/src/utils/keyboard.js +8 -5
  651. package/dist/esm/packages/taco/src/utils/keyboard.js.map +1 -1
  652. package/dist/esm/packages/taco/src/utils/mergeRefs.js +2 -2
  653. package/dist/esm/packages/taco/src/utils/mergeRefs.js.map +1 -1
  654. package/dist/esm/packages/taco/src/utils/tailwind.js +5 -5
  655. package/dist/esm/packages/taco/src/utils/tailwind.js.map +1 -1
  656. package/dist/esm/packages/taco/tailwind.colors.js +1 -1
  657. package/dist/esm/packages/taco/tailwind.colors.js.map +1 -1
  658. package/dist/taco.cjs.development.js +7857 -6877
  659. package/dist/taco.cjs.development.js.map +1 -1
  660. package/dist/taco.cjs.production.min.js +1 -1
  661. package/dist/taco.cjs.production.min.js.map +1 -1
  662. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
1
  import React__default from 'react';
2
2
  import cn from 'clsx';
3
+ import { extends as _extends } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
3
4
  import { PieChart, Tooltip, Pie, Cell } from 'recharts';
4
5
  import { getThemeColor } from '../../utils/color.js';
5
6
  import { getTooltipProps } from '../../utils/common.js';
@@ -8,99 +9,133 @@ import { HOVER_DONUT_WIDTH, DONUT_WIDTH } from './util.js';
8
9
  import { CenteredLabel } from './CenteredLabel.js';
9
10
  import { ActiveShape } from './ActiveShape.js';
10
11
 
11
- const Segment = _ => null;
12
- const DonutChart = function DonutChart({
13
- children,
14
- formatter,
15
- onClick,
16
- showLegend = false,
17
- legendPosition = 'bottom',
18
- label
19
- }) {
20
- const ref = React__default.useRef(null);
21
- const [radius, setRadius] = React__default.useState(0);
22
- const [hoveredItem, setHoveredItem] = React__default.useState([]);
12
+ var Segment = function Segment(_) {
13
+ return null;
14
+ };
15
+ var DonutChart = function DonutChart(_ref) {
16
+ var _cn;
17
+ var children = _ref.children,
18
+ formatter = _ref.formatter,
19
+ onClick = _ref.onClick,
20
+ _ref$showLegend = _ref.showLegend,
21
+ showLegend = _ref$showLegend === void 0 ? false : _ref$showLegend,
22
+ _ref$legendPosition = _ref.legendPosition,
23
+ legendPosition = _ref$legendPosition === void 0 ? 'bottom' : _ref$legendPosition,
24
+ label = _ref.label;
25
+ var ref = React__default.useRef(null);
26
+ var _React$useState = React__default.useState(0),
27
+ radius = _React$useState[0],
28
+ setRadius = _React$useState[1];
29
+ var _React$useState2 = React__default.useState([]),
30
+ hoveredItem = _React$useState2[0],
31
+ setHoveredItem = _React$useState2[1];
23
32
  // used for right legends
24
- const [selectedItem, setSelectedItem] = React__default.useState([]);
33
+ var _React$useState3 = React__default.useState([]),
34
+ selectedItem = _React$useState3[0],
35
+ setSelectedItem = _React$useState3[1];
25
36
  // used for bottom legends
26
- const [visibleItems, setVisibleItems] = React__default.useState(() => {
27
- const keys = {};
28
- React__default.Children.forEach(children, child => {
29
- keys[child.props.id] = true;
30
- });
31
- return keys;
32
- });
33
- React__default.useEffect(() => {
37
+ var _React$useState4 = React__default.useState(function () {
38
+ var keys = {};
39
+ React__default.Children.forEach(children, function (child) {
40
+ keys[child.props.id] = true;
41
+ });
42
+ return keys;
43
+ }),
44
+ visibleItems = _React$useState4[0],
45
+ setVisibleItems = _React$useState4[1];
46
+ React__default.useEffect(function () {
34
47
  if (ref.current) {
35
48
  var _ref$current$parentEl;
36
- const rect = (_ref$current$parentEl = ref.current.parentElement) === null || _ref$current$parentEl === void 0 ? void 0 : _ref$current$parentEl.getBoundingClientRect();
49
+ var rect = (_ref$current$parentEl = ref.current.parentElement) === null || _ref$current$parentEl === void 0 ? void 0 : _ref$current$parentEl.getBoundingClientRect();
37
50
  if (rect) {
38
- const width = showLegend ? rect.width / 2 : rect.width;
39
- const max = rect.height < width ? rect.height : width;
51
+ var width = showLegend ? rect.width / 2 : rect.width;
52
+ var max = rect.height < width ? rect.height : width;
40
53
  setRadius(max / 2);
41
54
  }
42
55
  }
43
56
  }, [showLegend]);
44
- const diameter = radius * 2; // get dimensions of the parent container to find the max radius, so we can fill the container AND always have a 16px wide donut
45
- const data = React__default.Children.map(children, child => ({
46
- id: child.props.id,
47
- color: child.props.color,
48
- label: child.props.label,
49
- value: child.props.value
50
- }));
51
- const displayedData = data.filter(child => visibleItems[child.id]);
52
- const total = displayedData.reduce((accum, entry) => accum + entry.value, 0);
53
- const showTooltip = (!showLegend || legendPosition === 'bottom') && displayedData.length > 0;
54
- const handleLegendClick = entry => {
57
+ var diameter = radius * 2; // get dimensions of the parent container to find the max radius, so we can fill the container AND always have a 16px wide donut
58
+ var data = React__default.Children.map(children, function (child) {
59
+ return {
60
+ id: child.props.id,
61
+ color: child.props.color,
62
+ label: child.props.label,
63
+ value: child.props.value
64
+ };
65
+ });
66
+ var displayedData = data.filter(function (child) {
67
+ return visibleItems[child.id];
68
+ });
69
+ var total = displayedData.reduce(function (accum, entry) {
70
+ return accum + entry.value;
71
+ }, 0);
72
+ var showTooltip = (!showLegend || legendPosition === 'bottom') && displayedData.length > 0;
73
+ var handleLegendClick = function handleLegendClick(entry) {
55
74
  if (legendPosition === 'bottom' && !Array.isArray(entry)) {
56
- setVisibleItems({
57
- ...visibleItems,
58
- [entry.id]: !visibleItems[entry.id]
59
- });
75
+ var _extends2;
76
+ setVisibleItems(_extends({}, visibleItems, (_extends2 = {}, _extends2[entry.id] = !visibleItems[entry.id], _extends2)));
60
77
  } else {
61
- const nextSelectedItem = Array.isArray(entry) ? entry.map(entryItem => entryItem.id) : [entry.id];
78
+ var nextSelectedItem = Array.isArray(entry) ? entry.map(function (entryItem) {
79
+ return entryItem.id;
80
+ }) : [entry.id];
62
81
  // Using slice to avoid mutation of the react state 'selectedItem'
63
- const isCurrentSegmentActive = selectedItem.slice().sort().join(',') === nextSelectedItem.sort().join(',');
82
+ var isCurrentSegmentActive = selectedItem.slice().sort().join(',') === nextSelectedItem.sort().join(',');
64
83
  if (onClick && !isCurrentSegmentActive) {
65
84
  onClick(entry);
66
85
  }
67
86
  setSelectedItem(isCurrentSegmentActive ? [] : nextSelectedItem);
68
87
  }
69
88
  };
70
- const handlePieClick = React__default.useCallback(pieId => {
89
+ var handlePieClick = React__default.useCallback(function (pieId) {
71
90
  if (onClick && pieId !== undefined) {
72
- const pieProps = displayedData.find(item => item.id === pieId);
91
+ var pieProps = displayedData.find(function (item) {
92
+ return item.id === pieId;
93
+ });
73
94
  onClick(pieProps);
74
95
  }
75
96
  }, [onClick, displayedData]);
76
- const singlePieDonutChart = displayedData.length === 1;
77
- const activeShapeColor = React__default.useMemo(() => {
78
- const getSegmentColor = item => item.reduce((colors, itemId) => {
79
- const visibleHoveredItem = displayedData.find(dataItem => dataItem.id === itemId);
80
- if (visibleHoveredItem) {
81
- colors[visibleHoveredItem.id] = visibleHoveredItem.color;
82
- }
83
- return colors;
84
- }, {});
85
- const hoveredSegmentColor = getSegmentColor(hoveredItem);
86
- const selectedSegmentColor = getSegmentColor(selectedItem);
97
+ var singlePieDonutChart = displayedData.length === 1;
98
+ var activeShapeColor = React__default.useMemo(function () {
99
+ var getSegmentColor = function getSegmentColor(item) {
100
+ return item.reduce(function (colors, itemId) {
101
+ var visibleHoveredItem = displayedData.find(function (dataItem) {
102
+ return dataItem.id === itemId;
103
+ });
104
+ if (visibleHoveredItem) {
105
+ colors[visibleHoveredItem.id] = visibleHoveredItem.color;
106
+ }
107
+ return colors;
108
+ }, {});
109
+ };
110
+ var hoveredSegmentColor = getSegmentColor(hoveredItem);
111
+ var selectedSegmentColor = getSegmentColor(selectedItem);
87
112
  return legendPosition === 'bottom' || hoveredItem.length !== 0 ? hoveredSegmentColor : selectedSegmentColor;
88
113
  }, [hoveredItem, selectedItem, legendPosition]);
89
114
  if (ref.current && !radius) {
90
115
  return null;
91
116
  }
92
- const getActiveIndex = () => {
117
+ var getActiveIndex = function getActiveIndex() {
93
118
  if (hoveredItem.length > 0) {
94
- return hoveredItem.map(itemId => displayedData.findIndex(element => element.id === itemId));
119
+ return hoveredItem.map(function (itemId) {
120
+ return displayedData.findIndex(function (element) {
121
+ return element.id === itemId;
122
+ });
123
+ });
95
124
  }
96
- return selectedItem.map(selectedItemId => displayedData.findIndex(element => element.id === selectedItemId));
125
+ return selectedItem.map(function (selectedItemId) {
126
+ return displayedData.findIndex(function (element) {
127
+ return element.id === selectedItemId;
128
+ });
129
+ });
97
130
  };
98
- const content = () => {
99
- const elements = React__default.Children.toArray(children).filter(child => /*#__PURE__*/React__default.isValidElement(child) && visibleItems[child.props.id]);
100
- return elements.length > 0 ? elements.map((child, index) => {
131
+ var content = function content() {
132
+ var elements = React__default.Children.toArray(children).filter(function (child) {
133
+ return /*#__PURE__*/React__default.isValidElement(child) && visibleItems[child.props.id];
134
+ });
135
+ return elements.length > 0 ? elements.map(function (child, index) {
101
136
  var _getThemeColor;
102
137
  return /*#__PURE__*/React__default.createElement(Cell, {
103
- key: `cell-${index}`,
138
+ key: "cell-" + index,
104
139
  name: child.props.label,
105
140
  fill: (_getThemeColor = getThemeColor(child.props.color)) !== null && _getThemeColor !== void 0 ? _getThemeColor : getThemeColor('blue-300')
106
141
  });
@@ -111,10 +146,7 @@ const DonutChart = function DonutChart({
111
146
  }));
112
147
  };
113
148
  return /*#__PURE__*/React__default.createElement("div", {
114
- className: cn('relative h-full w-full', {
115
- [`flex `]: showLegend,
116
- 'flex-col items-center': legendPosition === 'bottom'
117
- }),
149
+ className: cn('relative h-full w-full', (_cn = {}, _cn["flex "] = showLegend, _cn['flex-col items-center'] = legendPosition === 'bottom', _cn)),
118
150
  ref: ref
119
151
  }, /*#__PURE__*/React__default.createElement(CenteredLabel, {
120
152
  radius: radius,
@@ -134,7 +166,7 @@ const DonutChart = function DonutChart({
134
166
  style: {
135
167
  transform: 'rotate(90deg) scale(-1,1)'
136
168
  },
137
- singlePieDonutChart
169
+ singlePieDonutChart: singlePieDonutChart
138
170
  })))) : null, /*#__PURE__*/React__default.createElement(Pie, {
139
171
  isAnimationActive: false,
140
172
  activeIndex: getActiveIndex(),
@@ -145,8 +177,12 @@ const DonutChart = function DonutChart({
145
177
  data: displayedData.length > 0 ? displayedData : [],
146
178
  dataKey: "value",
147
179
  innerRadius: radius - HOVER_DONUT_WIDTH - DONUT_WIDTH,
148
- onMouseEnter: segment => displayedData.length > 0 && setHoveredItem([segment.id]),
149
- onMouseLeave: () => setHoveredItem([]),
180
+ onMouseEnter: function onMouseEnter(segment) {
181
+ return displayedData.length > 0 && setHoveredItem([segment.id]);
182
+ },
183
+ onMouseLeave: function onMouseLeave() {
184
+ return setHoveredItem([]);
185
+ },
150
186
  outerRadius: radius - HOVER_DONUT_WIDTH,
151
187
  paddingAngle: 2,
152
188
  // Prevents the pie group element from being focusable
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChart.js","sources":["../../../../../../../../src/charts/components/Donut/DonutChart.tsx"],"sourcesContent":["import React from 'react';\nimport * as Recharts from 'recharts';\nimport cn from 'clsx';\n\nimport { Color, getThemeColor } from '../../utils/color';\nimport { getTooltipProps } from '../../utils/common';\nimport { Legend } from './Legend';\nimport { CenteredLabel } from './CenteredLabel';\nimport { ActiveShape } from './ActiveShape';\nimport { DONUT_WIDTH, HOVER_DONUT_WIDTH } from './util';\n\nconst Segment = (_: DonutChartSegmentProps) => null;\n\nexport type DonutChartSegmentProps = {\n color: Color;\n id: string;\n label: string;\n value: number;\n};\n\nexport type SegmentIds = string[];\n\nexport type DonutChartProps = {\n children: React.ReactElement<DonutChartSegmentProps> | React.ReactElement<DonutChartSegmentProps>[];\n formatter?: (value: number) => string;\n onClick?: (segment: DonutChartSegmentProps | DonutChartSegmentProps[]) => void;\n showLegend?: boolean;\n legendPosition?: string;\n label: string;\n};\n\nexport const DonutChart = function DonutChart({\n children,\n formatter,\n onClick,\n showLegend = false,\n legendPosition = 'bottom',\n label,\n}: DonutChartProps) {\n const ref = React.useRef<HTMLDivElement>(null);\n const [radius, setRadius] = React.useState<number>(0);\n\n const [hoveredItem, setHoveredItem] = React.useState<SegmentIds>([]);\n // used for right legends\n const [selectedItem, setSelectedItem] = React.useState<SegmentIds>([]);\n // used for bottom legends\n const [visibleItems, setVisibleItems] = React.useState<Record<string, boolean>>(() => {\n const keys = {};\n\n React.Children.forEach(children, child => {\n keys[child.props.id] = true;\n });\n\n return keys;\n });\n\n React.useEffect(() => {\n if (ref.current) {\n const rect = ref.current.parentElement?.getBoundingClientRect();\n\n if (rect) {\n const width = showLegend ? rect.width / 2 : rect.width;\n const max: number = rect.height < width ? rect.height : width;\n setRadius(max / 2);\n }\n }\n }, [showLegend]);\n\n const diameter = radius * 2; // get dimensions of the parent container to find the max radius, so we can fill the container AND always have a 16px wide donut\n const data: DonutChartSegmentProps[] = React.Children.map(children, child => ({\n id: child.props.id,\n color: child.props.color,\n label: child.props.label,\n value: child.props.value,\n }));\n const displayedData = data.filter(child => visibleItems[child.id]);\n\n const total = displayedData.reduce((accum, entry) => accum + entry.value, 0);\n const showTooltip = (!showLegend || legendPosition === 'bottom') && displayedData.length > 0;\n\n const handleLegendClick = (entry: DonutChartSegmentProps | DonutChartSegmentProps[]): void => {\n if (legendPosition === 'bottom' && !Array.isArray(entry)) {\n setVisibleItems({ ...visibleItems, [entry.id]: !visibleItems[entry.id] });\n } else {\n const nextSelectedItem = Array.isArray(entry) ? entry.map(entryItem => entryItem.id) : [entry.id];\n\n // Using slice to avoid mutation of the react state 'selectedItem'\n const isCurrentSegmentActive = selectedItem.slice().sort().join(',') === nextSelectedItem.sort().join(',');\n\n if (onClick && !isCurrentSegmentActive) {\n onClick(entry);\n }\n\n setSelectedItem(isCurrentSegmentActive ? [] : nextSelectedItem);\n }\n };\n const handlePieClick = React.useCallback(\n (pieId: string | undefined) => {\n if (onClick && pieId !== undefined) {\n const pieProps = displayedData.find(item => item.id === pieId);\n\n onClick(pieProps as DonutChartSegmentProps);\n }\n },\n [onClick, displayedData]\n );\n\n const singlePieDonutChart = displayedData.length === 1;\n const activeShapeColor = React.useMemo(() => {\n const getSegmentColor = (item: SegmentIds) =>\n item.reduce((colors, itemId) => {\n const visibleHoveredItem = displayedData.find(dataItem => dataItem.id === itemId);\n\n if (visibleHoveredItem) {\n colors[visibleHoveredItem.id] = visibleHoveredItem.color;\n }\n\n return colors;\n }, {});\n\n const hoveredSegmentColor = getSegmentColor(hoveredItem);\n const selectedSegmentColor = getSegmentColor(selectedItem);\n\n return legendPosition === 'bottom' || hoveredItem.length !== 0 ? hoveredSegmentColor : selectedSegmentColor;\n }, [hoveredItem, selectedItem, legendPosition]);\n\n if (ref.current && !radius) {\n return null;\n }\n\n const getActiveIndex = () => {\n if (hoveredItem.length > 0) {\n return hoveredItem.map(itemId => displayedData.findIndex(element => element.id === itemId));\n }\n\n return selectedItem.map(selectedItemId => displayedData.findIndex(element => element.id === selectedItemId));\n };\n\n const content = () => {\n const elements = React.Children.toArray(children).filter(\n (child): child is React.ReactElement<DonutChartSegmentProps> =>\n React.isValidElement<DonutChartSegmentProps>(child) && visibleItems[child.props.id]\n );\n\n return elements.length > 0 ? (\n elements.map((child, index) => {\n return (\n <Recharts.Cell\n key={`cell-${index}`}\n name={child.props.label}\n fill={getThemeColor(child.props.color) ?? getThemeColor('blue-300')}\n />\n );\n })\n ) : (\n <Recharts.Cell key=\"empty-chart\" name={''} fill={getThemeColor('grey-200')} />\n );\n };\n\n return (\n <div\n className={cn('relative h-full w-full', {\n [`flex `]: showLegend,\n 'flex-col items-center': legendPosition === 'bottom',\n })}\n ref={ref}>\n <CenteredLabel\n radius={radius}\n legendPosition={legendPosition}\n label={label}\n total={total}\n formatter={formatter}\n showLegend={showLegend}\n />\n\n <Recharts.PieChart data={data} height={diameter} width={diameter} style={{ transform: 'rotate(90deg) scale(-1,1)' }}>\n {showTooltip ? (\n <Recharts.Tooltip\n {...getTooltipProps({\n style: { transform: 'rotate(90deg) scale(-1,1)' },\n singlePieDonutChart,\n })}\n />\n ) : null}\n <Recharts.Pie\n isAnimationActive={false}\n activeIndex={getActiveIndex()}\n activeShape={<ActiveShape pieColors={activeShapeColor} onClick={handlePieClick} />}\n data={displayedData.length > 0 ? displayedData : []}\n dataKey=\"value\"\n innerRadius={radius - HOVER_DONUT_WIDTH - DONUT_WIDTH} // offset the 12px wider hover state, and then make the donut 16px wide\n onMouseEnter={segment => displayedData.length > 0 && setHoveredItem([segment.id])}\n onMouseLeave={() => setHoveredItem([])}\n outerRadius={radius - HOVER_DONUT_WIDTH} // offset the 12px wide hover state\n paddingAngle={2}\n // Prevents the pie group element from being focusable\n rootTabIndex={-1}>\n {content()}\n </Recharts.Pie>\n </Recharts.PieChart>\n {showLegend && (\n <Legend\n data={data}\n visibleItems={visibleItems}\n onClick={handleLegendClick}\n total={total}\n setHoveredItem={setHoveredItem}\n label={label}\n legendPosition={legendPosition}\n hoveredItem={hoveredItem}\n selectedItem={selectedItem}\n formatter={formatter}\n />\n )}\n </div>\n );\n};\n\nDonutChart.Segment = Segment;\n"],"names":["Segment","_","DonutChart","children","formatter","onClick","showLegend","legendPosition","label","ref","React","useRef","radius","setRadius","useState","hoveredItem","setHoveredItem","selectedItem","setSelectedItem","visibleItems","setVisibleItems","keys","Children","forEach","child","props","id","useEffect","current","_ref$current$parentEl","rect","parentElement","getBoundingClientRect","width","max","height","diameter","data","map","color","value","displayedData","filter","total","reduce","accum","entry","showTooltip","length","handleLegendClick","Array","isArray","nextSelectedItem","entryItem","isCurrentSegmentActive","slice","sort","join","handlePieClick","useCallback","pieId","undefined","pieProps","find","item","singlePieDonutChart","activeShapeColor","useMemo","getSegmentColor","colors","itemId","visibleHoveredItem","dataItem","hoveredSegmentColor","selectedSegmentColor","getActiveIndex","findIndex","element","selectedItemId","content","elements","toArray","isValidElement","index","Recharts","key","name","fill","_getThemeColor","getThemeColor","className","cn","CenteredLabel","style","transform","getTooltipProps","isAnimationActive","activeIndex","activeShape","ActiveShape","pieColors","dataKey","innerRadius","HOVER_DONUT_WIDTH","DONUT_WIDTH","onMouseEnter","segment","onMouseLeave","outerRadius","paddingAngle","rootTabIndex","Legend"],"mappings":";;;;;;;;;;AAWA,MAAMA,O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OAAO,CAAChF,EAAE,CAAC,CAAC;IACjFiF,YAAY,EAAEA,MAAM3F,cAAc,CAAC,EAAE,CAAC;IACtC4F,WAAW,EAAEhG,MAAM,GAAG2F,iBAAiB;IACvCM,YAAY,EAAE,CAAC;;IAEfC,YAAY,EAAE,CAAC;KACd/B,OAAO,EAAE,CACC,CACC,EACnBzE,UAAU,kBACPI,6BAACqG,MAAM;IACH1E,IAAI,EAAEA,IAAI;IACVlB,YAAY,EAAEA,YAAY;IAC1Bd,OAAO,EAAE4C,iBAAiB;IAC1BN,KAAK,EAAEA,KAAK;IACZ3B,cAAc,EAAEA,cAAc;IAC9BR,KAAK,EAAEA,KAAK;IACZD,cAAc,EAAEA,cAAc;IAC9BQ,WAAW,EAAEA,WAAW;IACxBE,YAAY,EAAEA,YAAY;IAC1Bb,SAAS,EAAEA;IACb,CACL,CACC;AAEd;AAEAF,UAAU,CAACF,OAAO,GAAGA,OAAO;;;;"}
1
+ {"version":3,"file":"DonutChart.js","sources":["../../../../../../../../src/charts/components/Donut/DonutChart.tsx"],"sourcesContent":["import React from 'react';\nimport * as Recharts from 'recharts';\nimport cn from 'clsx';\n\nimport { Color, getThemeColor } from '../../utils/color';\nimport { getTooltipProps } from '../../utils/common';\nimport { Legend } from './Legend';\nimport { CenteredLabel } from './CenteredLabel';\nimport { ActiveShape } from './ActiveShape';\nimport { DONUT_WIDTH, HOVER_DONUT_WIDTH } from './util';\n\nconst Segment = (_: DonutChartSegmentProps) => null;\n\nexport type DonutChartSegmentProps = {\n color: Color;\n id: string;\n label: string;\n value: number;\n};\n\nexport type SegmentIds = string[];\n\nexport type DonutChartProps = {\n children: React.ReactElement<DonutChartSegmentProps> | React.ReactElement<DonutChartSegmentProps>[];\n formatter?: (value: number) => string;\n onClick?: (segment: DonutChartSegmentProps | DonutChartSegmentProps[]) => void;\n showLegend?: boolean;\n legendPosition?: string;\n label: string;\n};\n\nexport const DonutChart = function DonutChart({\n children,\n formatter,\n onClick,\n showLegend = false,\n legendPosition = 'bottom',\n label,\n}: DonutChartProps) {\n const ref = React.useRef<HTMLDivElement>(null);\n const [radius, setRadius] = React.useState<number>(0);\n\n const [hoveredItem, setHoveredItem] = React.useState<SegmentIds>([]);\n // used for right legends\n const [selectedItem, setSelectedItem] = React.useState<SegmentIds>([]);\n // used for bottom legends\n const [visibleItems, setVisibleItems] = React.useState<Record<string, boolean>>(() => {\n const keys = {};\n\n React.Children.forEach(children, child => {\n keys[child.props.id] = true;\n });\n\n return keys;\n });\n\n React.useEffect(() => {\n if (ref.current) {\n const rect = ref.current.parentElement?.getBoundingClientRect();\n\n if (rect) {\n const width = showLegend ? rect.width / 2 : rect.width;\n const max: number = rect.height < width ? rect.height : width;\n setRadius(max / 2);\n }\n }\n }, [showLegend]);\n\n const diameter = radius * 2; // get dimensions of the parent container to find the max radius, so we can fill the container AND always have a 16px wide donut\n const data: DonutChartSegmentProps[] = React.Children.map(children, child => ({\n id: child.props.id,\n color: child.props.color,\n label: child.props.label,\n value: child.props.value,\n }));\n const displayedData = data.filter(child => visibleItems[child.id]);\n\n const total = displayedData.reduce((accum, entry) => accum + entry.value, 0);\n const showTooltip = (!showLegend || legendPosition === 'bottom') && displayedData.length > 0;\n\n const handleLegendClick = (entry: DonutChartSegmentProps | DonutChartSegmentProps[]): void => {\n if (legendPosition === 'bottom' && !Array.isArray(entry)) {\n setVisibleItems({ ...visibleItems, [entry.id]: !visibleItems[entry.id] });\n } else {\n const nextSelectedItem = Array.isArray(entry) ? entry.map(entryItem => entryItem.id) : [entry.id];\n\n // Using slice to avoid mutation of the react state 'selectedItem'\n const isCurrentSegmentActive = selectedItem.slice().sort().join(',') === nextSelectedItem.sort().join(',');\n\n if (onClick && !isCurrentSegmentActive) {\n onClick(entry);\n }\n\n setSelectedItem(isCurrentSegmentActive ? [] : nextSelectedItem);\n }\n };\n const handlePieClick = React.useCallback(\n (pieId: string | undefined) => {\n if (onClick && pieId !== undefined) {\n const pieProps = displayedData.find(item => item.id === pieId);\n\n onClick(pieProps as DonutChartSegmentProps);\n }\n },\n [onClick, displayedData]\n );\n\n const singlePieDonutChart = displayedData.length === 1;\n const activeShapeColor = React.useMemo(() => {\n const getSegmentColor = (item: SegmentIds) =>\n item.reduce((colors, itemId) => {\n const visibleHoveredItem = displayedData.find(dataItem => dataItem.id === itemId);\n\n if (visibleHoveredItem) {\n colors[visibleHoveredItem.id] = visibleHoveredItem.color;\n }\n\n return colors;\n }, {});\n\n const hoveredSegmentColor = getSegmentColor(hoveredItem);\n const selectedSegmentColor = getSegmentColor(selectedItem);\n\n return legendPosition === 'bottom' || hoveredItem.length !== 0 ? hoveredSegmentColor : selectedSegmentColor;\n }, [hoveredItem, selectedItem, legendPosition]);\n\n if (ref.current && !radius) {\n return null;\n }\n\n const getActiveIndex = () => {\n if (hoveredItem.length > 0) {\n return hoveredItem.map(itemId => displayedData.findIndex(element => element.id === itemId));\n }\n\n return selectedItem.map(selectedItemId => displayedData.findIndex(element => element.id === selectedItemId));\n };\n\n const content = () => {\n const elements = React.Children.toArray(children).filter(\n (child): child is React.ReactElement<DonutChartSegmentProps> =>\n React.isValidElement<DonutChartSegmentProps>(child) && visibleItems[child.props.id]\n );\n\n return elements.length > 0 ? (\n elements.map((child, index) => {\n return (\n <Recharts.Cell\n key={`cell-${index}`}\n name={child.props.label}\n fill={getThemeColor(child.props.color) ?? getThemeColor('blue-300')}\n />\n );\n })\n ) : (\n <Recharts.Cell key=\"empty-chart\" name={''} fill={getThemeColor('grey-200')} />\n );\n };\n\n return (\n <div\n className={cn('relative h-full w-full', {\n [`flex `]: showLegend,\n 'flex-col items-center': legendPosition === 'bottom',\n })}\n ref={ref}>\n <CenteredLabel\n radius={radius}\n legendPosition={legendPosition}\n label={label}\n total={total}\n formatter={formatter}\n showLegend={showLegend}\n />\n\n <Recharts.PieChart data={data} height={diameter} width={diameter} style={{ transform: 'rotate(90deg) scale(-1,1)' }}>\n {showTooltip ? (\n <Recharts.Tooltip\n {...getTooltipProps({\n style: { transform: 'rotate(90deg) scale(-1,1)' },\n singlePieDonutChart,\n })}\n />\n ) : null}\n <Recharts.Pie\n isAnimationActive={false}\n activeIndex={getActiveIndex()}\n activeShape={<ActiveShape pieColors={activeShapeColor} onClick={handlePieClick} />}\n data={displayedData.length > 0 ? displayedData : []}\n dataKey=\"value\"\n innerRadius={radius - HOVER_DONUT_WIDTH - DONUT_WIDTH} // offset the 12px wider hover state, and then make the donut 16px wide\n onMouseEnter={segment => displayedData.length > 0 && setHoveredItem([segment.id])}\n onMouseLeave={() => setHoveredItem([])}\n outerRadius={radius - HOVER_DONUT_WIDTH} // offset the 12px wide hover state\n paddingAngle={2}\n // Prevents the pie group element from being focusable\n rootTabIndex={-1}>\n {content()}\n </Recharts.Pie>\n </Recharts.PieChart>\n {showLegend && (\n <Legend\n data={data}\n visibleItems={visibleItems}\n onClick={handleLegendClick}\n total={total}\n setHoveredItem={setHoveredItem}\n label={label}\n legendPosition={legendPosition}\n hoveredItem={hoveredItem}\n selectedItem={selectedItem}\n formatter={formatter}\n />\n )}\n </div>\n );\n};\n\nDonutChart.Segment = Segment;\n"],"names":["Segment","_","DonutChart","_ref","children","formatter","onClick","_ref$showLegend","showLegend","_ref$legendPosition","legendPosition","label","ref","React","useRef","_React$useState","useState","radius","setRadius","_React$useState2","hoveredItem","setHoveredItem","_React$useState3","selectedItem","setSelectedItem","_React$useState4","keys","Children","forEach","child","props","id","visibleItems","setVisibleItems","useEffect","current","_ref$current$parentEl","rect","parentElement","getBoundingClientRect","width","max","height","diameter","data","map","color","value","displayedData","filter","total","reduce","accum","entry","showTooltip","length","handleLegendClick","Array","isArray","_extends2","_extends","nextSelectedItem","entryItem","isCurrentSegmentActive","slice","sort","join","handlePieClick","useCallback","pieId","undefined","pieProps","find","item","singlePieDonutChart","activeShapeColor","useMemo","getSegmentColor","colors","itemId","visibleHoveredItem","dataItem","hoveredSegmentColor","selectedSegmentColor","getActiveIndex","findIndex","element","selectedItemId","content","elements","toArray","isValidElement","index","Recharts","key","name","fill","_getThemeColor","getThemeColor","className","cn","_cn","CenteredLabel","style","transform","getTooltipProps","isAnimationActive","activeIndex","activeShape","ActiveShape","pieColors","dataKey","innerRadius","HOVER_DONUT_WIDTH","DONUT_WIDTH","onMouseEnter","segment","onMouseLeave","outerRadius","paddingAngle","rootTabIndex","Legend"],"mappings":";;;;;;;;;;;AAWA,IAAMA,OAAO,GAAG,SAAVA,OAAOA,CAAIC,CAAyB;EAAA,OAAK,IAAI;AAAA;IAoBtCC,UAAU,GAAG,SAASA,UAAUA,CAAAC,IAAA;;MACzCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,OAAO,GAAAH,IAAA,CAAPG,OAAO;IAAAC,eAAA,GAAAJ,IAAA,CACPK,UAAU;IAAVA,UAAU,GAAAD,eAAA,cAAG,KAAK,GAAAA,eAAA;IAAAE,mBAAA,GAAAN,IAAA,CAClBO,cAAc;IAAdA,cAAc,GAAAD,mBAAA,cAAG,QAAQ,GAAAA,mBAAA;IACzBE,KAAK,GAAAR,IAAA,CAALQ,KAAK;EAEL,IAAMC,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAiB,IAAI,CAAC;EAC9C,IAAAC,eAAA,GAA4BF,cAAK,CAACG,QAAQ,CAAS,CAAC,CAAC;IAA9CC,MAAM,GAAAF,eAAA;IAAEG,SAAS,GAAAH,eAAA;EAExB,IAAAI,gBAAA,GAAsCN,cAAK,CAACG,QAAQ,CAAa,EAAE,CAAC;IAA7DI,WAAW,GAAAD,gBAAA;IAAEE,cAAc,GAAAF,gBAAA;;EAElC,IAAAG,gBAAA,GAAwCT,cAAK,CAACG,QAAQ,CAAa,EAAE,CAAC;IAA/DO,YAAY,GAAAD,gBAAA;IAAEE,eAAe,GAAAF,gBAAA;;EAEpC,IAAAG,gBAAA,GAAwCZ,cAAK,CAACG,QAAQ,CAA0B;MAC5E,IAAMU,IAAI,GAAG,EAAE;MAEfb,cAAK,CAACc,QAAQ,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BACPK,6BAAC4G,MAAM;IACH7E,IAAI,EAAEA,IAAI;IACVZ,YAAY,EAAEA,YAAY;IAC1B1B,OAAO,EAAEkD,iBAAiB;IAC1BN,KAAK,EAAEA,KAAK;IACZ7B,cAAc,EAAEA,cAAc;IAC9BV,KAAK,EAAEA,KAAK;IACZD,cAAc,EAAEA,cAAc;IAC9BU,WAAW,EAAEA,WAAW;IACxBG,YAAY,EAAEA,YAAY;IAC1BlB,SAAS,EAAEA;IACb,CACL,CACC;AAEd;AAEAH,UAAU,CAACF,OAAO,GAAGA,OAAO;;;;"}
@@ -88,40 +88,47 @@ import '../../../primitives/Table/useTableDataLoader2.js';
88
88
  import '../../../hooks/useBoundaryOverflowDetection.js';
89
89
  import '../../../utils/hooks/useOnClickOutside.js';
90
90
 
91
- const Legend = ({
92
- legendPosition,
93
- hoveredItem,
94
- selectedItem,
95
- data,
96
- onClick,
97
- setHoveredItem,
98
- formatter,
99
- total,
100
- visibleItems,
101
- label
102
- }) => {
103
- const isTotalLegendSelected = selectedItem.length === data.length;
104
- const isTotalLegendHovered = hoveredItem.length === data.length;
105
- const handleMouseLeave = () => setHoveredItem([]);
106
- const renderLegendItem = (entry, index) => {
107
- const isTotal = entry === null;
91
+ var Legend = function Legend(_ref) {
92
+ var legendPosition = _ref.legendPosition,
93
+ hoveredItem = _ref.hoveredItem,
94
+ selectedItem = _ref.selectedItem,
95
+ data = _ref.data,
96
+ _onClick = _ref.onClick,
97
+ setHoveredItem = _ref.setHoveredItem,
98
+ formatter = _ref.formatter,
99
+ total = _ref.total,
100
+ visibleItems = _ref.visibleItems,
101
+ label = _ref.label;
102
+ var isTotalLegendSelected = selectedItem.length === data.length;
103
+ var isTotalLegendHovered = hoveredItem.length === data.length;
104
+ var handleMouseLeave = function handleMouseLeave() {
105
+ return setHoveredItem([]);
106
+ };
107
+ var renderLegendItem = function renderLegendItem(entry, index) {
108
+ var isTotal = entry === null;
108
109
  // We can't use `isTotal` here because TypeScript is unable to infer the type when `entry` is not null.
109
- const itemData = entry === null ? {
110
+ var itemData = entry === null ? {
110
111
  id: 'total',
111
- label,
112
+ label: label,
112
113
  value: total,
113
114
  color: 'grey-300'
114
115
  } : entry;
115
- const isSelected = isTotal ? isTotalLegendSelected : selectedItem.includes(itemData.id);
116
- const isHovered = isTotal ? isTotalLegendHovered : hoveredItem.includes(itemData.id);
116
+ var isSelected = isTotal ? isTotalLegendSelected : selectedItem.includes(itemData.id);
117
+ var isHovered = isTotal ? isTotalLegendHovered : hoveredItem.includes(itemData.id);
117
118
  return /*#__PURE__*/React__default.createElement("li", {
118
- key: isTotal ? 'total' : `${itemData.label}-${index}`,
119
+ key: isTotal ? 'total' : itemData.label + "-" + index,
119
120
  className: cn('mr-2 flex cursor-pointer gap-2 rounded pl-0 pr-1', {
120
121
  'bg-grey-100': isHovered && (!isTotal || legendPosition === 'right'),
121
122
  'bg-grey-200': isSelected && (!isTotal || legendPosition === 'right')
122
123
  }),
123
- onClick: () => onClick(isTotal ? data : itemData),
124
- onMouseEnter: () => setHoveredItem(isTotal ? data.map(item => item.id) : [itemData.id]),
124
+ onClick: function onClick() {
125
+ return _onClick(isTotal ? data : itemData);
126
+ },
127
+ onMouseEnter: function onMouseEnter() {
128
+ return setHoveredItem(isTotal ? data.map(function (item) {
129
+ return item.id;
130
+ }) : [itemData.id]);
131
+ },
125
132
  onMouseLeave: handleMouseLeave
126
133
  }, legendPosition === 'bottom' ? (/*#__PURE__*/React__default.createElement("div", {
127
134
  className: "flex items-center gap-1"
@@ -144,11 +151,13 @@ const Legend = ({
144
151
  className: "-mt-1 flex w-full text-lg font-bold"
145
152
  }, formatter ? formatter(itemData.value) : itemData.value)))));
146
153
  };
147
- const moreButton = moreButtonText => (/*#__PURE__*/React__default.createElement(Button, {
148
- appearance: "transparent",
149
- className: "text-grey-700"
150
- }, moreButtonText));
151
- const className = cn('flex-grow pl-4', {
154
+ var moreButton = function moreButton(moreButtonText) {
155
+ return /*#__PURE__*/React__default.createElement(Button, {
156
+ appearance: "transparent",
157
+ className: "text-grey-700"
158
+ }, moreButtonText);
159
+ };
160
+ var className = cn('flex-grow pl-4', {
152
161
  'w-full': legendPosition === 'bottom'
153
162
  });
154
163
  return /*#__PURE__*/React__default.createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"Legend.js","sources":["../../../../../../../../src/charts/components/Donut/Legend.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { Button, Icon, OverflowGroup } from '../../../index';\n\nimport { getThemeColor } from '../../utils/color';\nimport { DonutChartProps, DonutChartSegmentProps, SegmentIds } from './DonutChart';\n\ntype LegendProps = Pick<DonutChartProps, 'formatter' | 'label' | 'legendPosition'> & {\n data: DonutChartSegmentProps[];\n hoveredItem: SegmentIds;\n onClick: (entry: DonutChartSegmentProps | DonutChartSegmentProps[]) => void;\n selectedItem: SegmentIds;\n setHoveredItem: React.Dispatch<React.SetStateAction<SegmentIds>>;\n total: number;\n visibleItems: Record<string, boolean>;\n};\n\nexport const Legend = ({\n legendPosition,\n hoveredItem,\n selectedItem,\n data,\n onClick,\n setHoveredItem,\n formatter,\n total,\n visibleItems,\n label,\n}: LegendProps) => {\n const isTotalLegendSelected = selectedItem.length === data.length;\n const isTotalLegendHovered = hoveredItem.length === data.length;\n\n const handleMouseLeave = () => setHoveredItem([]);\n\n const renderLegendItem = (entry: DonutChartSegmentProps | null, index?: number) => {\n const isTotal = entry === null;\n // We can't use `isTotal` here because TypeScript is unable to infer the type when `entry` is not null.\n const itemData = entry === null ? { id: 'total', label, value: total, color: 'grey-300' } : entry;\n const isSelected = isTotal ? isTotalLegendSelected : selectedItem.includes(itemData.id);\n const isHovered = isTotal ? isTotalLegendHovered : hoveredItem.includes(itemData.id);\n\n return (\n <li\n key={isTotal ? 'total' : `${itemData.label}-${index}`}\n className={cn('mr-2 flex cursor-pointer gap-2 rounded pl-0 pr-1', {\n 'bg-grey-100': isHovered && (!isTotal || legendPosition === 'right'),\n 'bg-grey-200': isSelected && (!isTotal || legendPosition === 'right'),\n })}\n onClick={() => onClick(isTotal ? data : itemData)}\n onMouseEnter={() => setHoveredItem(isTotal ? data.map(item => item.id) : [itemData.id])}\n onMouseLeave={handleMouseLeave}>\n {legendPosition === 'bottom' ? (\n <div className=\"flex items-center gap-1\">\n <span\n className={cn('ml-1 h-3 w-3 rounded-sm', {\n 'border-grey-300 border !bg-white': !visibleItems[itemData.id],\n })}\n style={{ backgroundColor: getThemeColor(itemData.color) }}>\n {visibleItems[itemData.id] && isHovered && (\n <Icon name=\"tick-bold\" className=\"mb-2.5 !h-full !w-full text-white\" />\n )}\n </span>\n <div>{itemData.label}</div>\n </div>\n ) : (\n <>\n <span\n className=\"ml-1 mt-1 h-9 w-2 rounded-[1px]\"\n style={{ backgroundColor: getThemeColor(itemData.color) }}\n />\n <div>\n {itemData.label}\n <span className=\"-mt-1 flex w-full text-lg font-bold\">\n {formatter ? formatter(itemData.value) : itemData.value}\n </span>\n </div>\n </>\n )}\n </li>\n );\n };\n\n const moreButton = moreButtonText => (\n <Button appearance=\"transparent\" className=\"text-grey-700\">\n {moreButtonText}\n </Button>\n );\n\n const className = cn('flex-grow pl-4', {\n 'w-full': legendPosition === 'bottom',\n });\n return (\n <div className={className}>\n <ul\n className={cn(\n 'mb-0 ml-0 mt-4 flex justify-center space-y-1',\n legendPosition === 'right' ? 'flex-col gap-1' : 'flex-row'\n )}>\n {legendPosition === 'right' ? (\n <>\n {renderLegendItem(null)}\n {data.map(renderLegendItem)}\n </>\n ) : (\n <OverflowGroup className=\"w-full items-center py-1\" moreButton={moreButton}>\n {data.map(renderLegendItem)}\n </OverflowGroup>\n )}\n </ul>\n </div>\n );\n};\n"],"names":["Legend","legendPosition","hoveredItem","selectedItem","data","onClick","setHoveredItem","formatter","total","visibleItems","label","isTotalLegendSelected","length","isTotalLegendHovered","handleMouseLeave","renderLegendItem","entry","index","isTotal","itemData","id","value","color","isSelected","includes","isHovered","React","key","className","cn","onMouseEnter","map","item","onMouseLeave","style","backgroundColor","get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,EAAE;IACnC,QAAQ,EAAE5B,cAAc,KAAK;GAChC,CAAC;EACF,oBACIyB;IAAKE,SAAS,EAAEA;kBACZF;IACIE,SAAS,EAAEC,EAAE,CACT,8CAA8C,EAC9C5B,cAAc,KAAK,OAAO,GAAG,gBAAgB,GAAG,UAAU;KAE7DA,cAAc,KAAK,OAAO,iBACvByB,4DACKX,gBAAgB,CAAC,IAAI,CAAC,EACtBX,IAAI,CAAC2B,GAAG,CAAChB,gBAAgB,CAAC,CAC5B,kBAEHW,6BAACiB,aAAa;IAACf,SAAS,EAAC,0BAA0B;IAACW,UAAU,EAAEA;KAC3DnC,IAAI,CAAC2B,GAAG,CAAChB,gBAAgB,CAAC,CACf,CACnB,CACA,CACH;AAEd;;;;"}
1
+ {"version":3,"file":"Legend.js","sources":["../../../../../../../../src/charts/components/Donut/Legend.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { Button, Icon, OverflowGroup } from '../../../index';\n\nimport { getThemeColor } from '../../utils/color';\nimport { DonutChartProps, DonutChartSegmentProps, SegmentIds } from './DonutChart';\n\ntype LegendProps = Pick<DonutChartProps, 'formatter' | 'label' | 'legendPosition'> & {\n data: DonutChartSegmentProps[];\n hoveredItem: SegmentIds;\n onClick: (entry: DonutChartSegmentProps | DonutChartSegmentProps[]) => void;\n selectedItem: SegmentIds;\n setHoveredItem: React.Dispatch<React.SetStateAction<SegmentIds>>;\n total: number;\n visibleItems: Record<string, boolean>;\n};\n\nexport const Legend = ({\n legendPosition,\n hoveredItem,\n selectedItem,\n data,\n onClick,\n setHoveredItem,\n formatter,\n total,\n visibleItems,\n label,\n}: LegendProps) => {\n const isTotalLegendSelected = selectedItem.length === data.length;\n const isTotalLegendHovered = hoveredItem.length === data.length;\n\n const handleMouseLeave = () => setHoveredItem([]);\n\n const renderLegendItem = (entry: DonutChartSegmentProps | null, index?: number) => {\n const isTotal = entry === null;\n // We can't use `isTotal` here because TypeScript is unable to infer the type when `entry` is not null.\n const itemData = entry === null ? { id: 'total', label, value: total, color: 'grey-300' } : entry;\n const isSelected = isTotal ? isTotalLegendSelected : selectedItem.includes(itemData.id);\n const isHovered = isTotal ? isTotalLegendHovered : hoveredItem.includes(itemData.id);\n\n return (\n <li\n key={isTotal ? 'total' : `${itemData.label}-${index}`}\n className={cn('mr-2 flex cursor-pointer gap-2 rounded pl-0 pr-1', {\n 'bg-grey-100': isHovered && (!isTotal || legendPosition === 'right'),\n 'bg-grey-200': isSelected && (!isTotal || legendPosition === 'right'),\n })}\n onClick={() => onClick(isTotal ? data : itemData)}\n onMouseEnter={() => setHoveredItem(isTotal ? data.map(item => item.id) : [itemData.id])}\n onMouseLeave={handleMouseLeave}>\n {legendPosition === 'bottom' ? (\n <div className=\"flex items-center gap-1\">\n <span\n className={cn('ml-1 h-3 w-3 rounded-sm', {\n 'border-grey-300 border !bg-white': !visibleItems[itemData.id],\n })}\n style={{ backgroundColor: getThemeColor(itemData.color) }}>\n {visibleItems[itemData.id] && isHovered && (\n <Icon name=\"tick-bold\" className=\"mb-2.5 !h-full !w-full text-white\" />\n )}\n </span>\n <div>{itemData.label}</div>\n </div>\n ) : (\n <>\n <span\n className=\"ml-1 mt-1 h-9 w-2 rounded-[1px]\"\n style={{ backgroundColor: getThemeColor(itemData.color) }}\n />\n <div>\n {itemData.label}\n <span className=\"-mt-1 flex w-full text-lg font-bold\">\n {formatter ? formatter(itemData.value) : itemData.value}\n </span>\n </div>\n </>\n )}\n </li>\n );\n };\n\n const moreButton = moreButtonText => (\n <Button appearance=\"transparent\" className=\"text-grey-700\">\n {moreButtonText}\n </Button>\n );\n\n const className = cn('flex-grow pl-4', {\n 'w-full': legendPosition === 'bottom',\n });\n return (\n <div className={className}>\n <ul\n className={cn(\n 'mb-0 ml-0 mt-4 flex justify-center space-y-1',\n legendPosition === 'right' ? 'flex-col gap-1' : 'flex-row'\n )}>\n {legendPosition === 'right' ? (\n <>\n {renderLegendItem(null)}\n {data.map(renderLegendItem)}\n </>\n ) : (\n <OverflowGroup className=\"w-full items-center py-1\" moreButton={moreButton}>\n {data.map(renderLegendItem)}\n </OverflowGroup>\n )}\n </ul>\n </div>\n );\n};\n"],"names":["Legend","_ref","legendPosition","hoveredItem","selectedItem","data","onClick","setHoveredItem","formatter","total","visibleItems","label","isTotalLegendSelected","length","isTotalLegendHovered","handleMouseLeave","renderLegendItem","entry","index","isTotal","itemData","id","value","color","isSelected","includes","isHovered","React","key","className","cn","onMouseEnter","map","item","onMouseLeave","style","backgroundColor","getThemeColor","Icon","name","moreButton","moreButtonText","Button","appearance","OverflowGroup"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiBaA,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA;MACfC,cAAc,GAAAD,IAAA,CAAdC,cAAc;IACdC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACZC,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IACJC,QAAO,GAAAL,IAAA,CAAPK,OAAO;IACPC,cAAc,GAAAN,IAAA,CAAdM,cAAc;IACdC,SAAS,GAAAP,IAAA,CAATO,SAAS;IACTC,KAAK,GAAAR,IAAA,CAALQ,KAAK;IACLC,YAAY,GAAAT,IAAA,CAAZS,YAAY;IACZC,KAAK,GAAAV,IAAA,CAALU,KAAK;EAEL,IAAMC,qBAAqB,GAAGR,YAAY,CAACS,MAAM,KAAKR,IAAI,CAACQ,MAAM;EACjE,IAAMC,oBAAoB,GAAGX,WAAW,CAACU,MAAM,KAAKR,IAAI,CAACQ,MAAM;EAE/D,IAAME,gBAAgB,GAAG,SAAnBA,gBAAgBA;IAAA,OAASR,cAAc,CAAC,EAAE,CAAC;;EAEjD,IAAMS,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,KAAoC,EAAEC,KAAc;IAC1E,IAAMC,OAAO,GAAGF,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;
1
+ var DONUT_WIDTH = 16;
2
+ var HOVER_DONUT_WIDTH = 10;
3
3
 
4
4
  export { DONUT_WIDTH, HOVER_DONUT_WIDTH };
5
5
  //# sourceMappingURL=util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../../../../../../src/charts/components/Donut/util.ts"],"sourcesContent":["export const DONUT_WIDTH = 16;\nexport const HOVER_DONUT_WIDTH = 10;\n"],"names":["DONUT_WIDTH","HOVER_DONUT_WIDTH"],"mappings":"MAAaA,WAAW,GAAG;MACdC,iBAAiB,GAAG;;;;"}
1
+ {"version":3,"file":"util.js","sources":["../../../../../../../../src/charts/components/Donut/util.ts"],"sourcesContent":["export const DONUT_WIDTH = 16;\nexport const HOVER_DONUT_WIDTH = 10;\n"],"names":["DONUT_WIDTH","HOVER_DONUT_WIDTH"],"mappings":"IAAaA,WAAW,GAAG;IACdC,iBAAiB,GAAG;;;;"}
@@ -88,28 +88,30 @@ import '../../hooks/useBoundaryOverflowDetection.js';
88
88
  import '../../utils/hooks/useOnClickOutside.js';
89
89
 
90
90
  function Legend(props) {
91
- const {
92
- activeIndex,
93
- onMouseEnter,
94
- onMouseLeave,
95
- onClick,
96
- payload,
97
- layout,
98
- activeItems
99
- } = props;
100
- const [hoverIndex, setHoverIndex] = useState(null);
101
- const handleMouseEnter = (entry, index) => {
91
+ var activeIndex = props.activeIndex,
92
+ onMouseEnter = props.onMouseEnter,
93
+ onMouseLeave = props.onMouseLeave,
94
+ onClick = props.onClick,
95
+ payload = props.payload,
96
+ layout = props.layout,
97
+ activeItems = props.activeItems;
98
+ var _useState = useState(null),
99
+ hoverIndex = _useState[0],
100
+ setHoverIndex = _useState[1];
101
+ var handleMouseEnter = function handleMouseEnter(entry, index) {
102
102
  setHoverIndex(index);
103
103
  if (activeItems[entry.dataKey]) onMouseEnter(entry, index);
104
104
  };
105
- const handleMouseLeave = () => {
105
+ var handleMouseLeave = function handleMouseLeave() {
106
106
  onMouseLeave();
107
107
  setHoverIndex(null);
108
108
  };
109
- const moreButton = moreButtonText => (/*#__PURE__*/React__default.createElement(Button, {
110
- appearance: "transparent",
111
- className: "text-grey-700"
112
- }, moreButtonText));
109
+ var moreButton = function moreButton(moreButtonText) {
110
+ return /*#__PURE__*/React__default.createElement(Button, {
111
+ appearance: "transparent",
112
+ className: "text-grey-700"
113
+ }, moreButtonText);
114
+ };
113
115
  return /*#__PURE__*/React__default.createElement("div", {
114
116
  className: "mx-auto w-auto max-w-full overflow-hidden"
115
117
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -119,27 +121,33 @@ function Legend(props) {
119
121
  }, /*#__PURE__*/React__default.createElement(OverflowGroup, {
120
122
  className: "w-full items-center py-1",
121
123
  moreButton: moreButton
122
- }, payload.map((entry, index) => (/*#__PURE__*/React__default.createElement("span", {
123
- key: `${entry.dataKey}-${index}`,
124
- className: cn(' hover:bg-grey-100 cursor-pointer px-[8px] py-[2px] hover:rounded-[4px]', {
125
- 'bg-grey-100 rounded': activeIndex === index
126
- }),
127
- onMouseEnter: () => handleMouseEnter(entry, index),
128
- onMouseLeave: handleMouseLeave,
129
- onClick: onClick ? () => onClick(entry) : undefined
130
- }, /*#__PURE__*/React__default.createElement("span", {
131
- className: "text-grey-700 flex items-center gap-[4px]"
132
- }, /*#__PURE__*/React__default.createElement("span", {
133
- className: cn('-mt-px ml-1 flex h-3 w-3 rounded-sm', {
134
- 'border-grey-300 border !bg-white': !activeItems[entry.dataKey]
135
- }),
136
- style: {
137
- backgroundColor: entry.color
138
- }
139
- }, hoverIndex === index && activeItems[entry.dataKey] && (/*#__PURE__*/React__default.createElement(Icon, {
140
- name: "tick-bold",
141
- className: "!h-full !w-full text-white"
142
- }))), entry.value)))))));
124
+ }, payload.map(function (entry, index) {
125
+ return /*#__PURE__*/React__default.createElement("span", {
126
+ key: entry.dataKey + "-" + index,
127
+ className: cn(' hover:bg-grey-100 cursor-pointer px-[8px] py-[2px] hover:rounded-[4px]', {
128
+ 'bg-grey-100 rounded': activeIndex === index
129
+ }),
130
+ onMouseEnter: function onMouseEnter() {
131
+ return handleMouseEnter(entry, index);
132
+ },
133
+ onMouseLeave: handleMouseLeave,
134
+ onClick: onClick ? function () {
135
+ return onClick(entry);
136
+ } : undefined
137
+ }, /*#__PURE__*/React__default.createElement("span", {
138
+ className: "text-grey-700 flex items-center gap-[4px]"
139
+ }, /*#__PURE__*/React__default.createElement("span", {
140
+ className: cn('-mt-px ml-1 flex h-3 w-3 rounded-sm', {
141
+ 'border-grey-300 border !bg-white': !activeItems[entry.dataKey]
142
+ }),
143
+ style: {
144
+ backgroundColor: entry.color
145
+ }
146
+ }, hoverIndex === index && activeItems[entry.dataKey] && (/*#__PURE__*/React__default.createElement(Icon, {
147
+ name: "tick-bold",
148
+ className: "!h-full !w-full text-white"
149
+ }))), entry.value));
150
+ }))));
143
151
  }
144
152
 
145
153
  export { Legend };
@@ -1 +1 @@
1
- {"version":3,"file":"Legend.js","sources":["../../../../../../../src/charts/components/Legend.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport cn from 'clsx';\nimport { Icon, OverflowGroup, Button } from '../../index';\n\nimport { ActiveChartItems, PayloadType } from './types';\n\ntype InternalProps<TType> = {\n payload: PayloadType<TType>[];\n layout: string;\n activeIndex: number | undefined;\n};\n\nexport type LegendProps<TType> = {\n activeItems: ActiveChartItems<TType>;\n onMouseEnter: (entry: PayloadType<TType>, index: number) => void;\n onMouseLeave: () => void;\n onClick: (entry: PayloadType<TType>) => void;\n};\n\nexport type Props<TType> = LegendProps<TType> & InternalProps<TType>;\n\nexport function Legend<TType>(props: LegendProps<TType>) {\n const { activeIndex, onMouseEnter, onMouseLeave, onClick, payload, layout, activeItems } = props as Props<TType>;\n const [hoverIndex, setHoverIndex] = useState<number | null>(null);\n\n const handleMouseEnter = (entry: PayloadType<TType>, index: number) => {\n setHoverIndex(index);\n if (activeItems[entry.dataKey]) onMouseEnter(entry, index);\n };\n\n const handleMouseLeave = () => {\n onMouseLeave();\n setHoverIndex(null);\n };\n\n const moreButton = moreButtonText => (\n <Button appearance=\"transparent\" className=\"text-grey-700\">\n {moreButtonText}\n </Button>\n );\n\n return (\n <div className=\"mx-auto w-auto max-w-full overflow-hidden\">\n <div className={cn('mb-0 ml-0 flex justify-center', { 'flex-col': layout === 'vertical' })}>\n {/** py-1 is need to make sure the more button focus outline doesn't get cropped */}\n <OverflowGroup className=\"w-full items-center py-1\" moreButton={moreButton}>\n {payload.map((entry, index) => (\n <span\n key={`${entry.dataKey}-${index}`}\n className={cn(' hover:bg-grey-100 cursor-pointer px-[8px] py-[2px] hover:rounded-[4px]', {\n 'bg-grey-100 rounded': activeIndex === index,\n })}\n onMouseEnter={() => handleMouseEnter(entry, index)}\n onMouseLeave={handleMouseLeave}\n onClick={onClick ? () => onClick(entry) : undefined}>\n <span className=\"text-grey-700 flex items-center gap-[4px]\">\n <span\n className={cn('-mt-px ml-1 flex h-3 w-3 rounded-sm', {\n 'border-grey-300 border !bg-white': !activeItems[entry.dataKey],\n })}\n style={{ backgroundColor: entry.color }}>\n {hoverIndex === index && activeItems[entry.dataKey] && (\n <Icon name=\"tick-bold\" className=\"!h-full !w-full text-white\" />\n )}\n </span>\n {entry.value}\n </span>\n </span>\n ))}\n </OverflowGroup>\n </div>\n </div>\n );\n}\n"],"names":["Legend","props","activeIndex","onMouseEnter","onMouseLeave","onClick","payload","layout","activeItems","hoverIndex","setHoverIndex","useState","handleMouseEnter","entry","index","dataKey","handleMouseLeave","moreButton","moreButtonText","React","Button","appearance","className","cn","OverflowGroup","map","key","undefined","style","backgroundColor","color","Icon","name","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAqBgBA,MAAMA,CAAQC,KAAyB;EACnD,MAAM;IAAEC,WAAW;IAAEC,YAAY;IAAEC,YAAY;IAAEC,OAAO;IAAEC,OAAO;IAAEC,MAAM;IAAEC;GAAa,GAAGP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EAAE;MAAEC,eAAe,EAAEhB,KAAK,CAACiB;;KAC/BrB,UAAU,KAAKK,KAAK,IAAIN,WAAW,CAACK,KAAK,CAACE,OAAO,CAAC,kBAC/CI,6BAACY,IAAI;IAACC,IAAI,EAAC,WAAW;IAACV,SAAS,EAAC;IAA+B,CACnE,CACE,EACNT,KAAK,CAACoB,KAAK,CACT,CACJ,CACV,CAAC,CACU,CACd,CACJ;AAEd;;;;"}
1
+ {"version":3,"file":"Legend.js","sources":["../../../../../../../src/charts/components/Legend.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport cn from 'clsx';\nimport { Icon, OverflowGroup, Button } from '../../index';\n\nimport { ActiveChartItems, PayloadType } from './types';\n\ntype InternalProps<TType> = {\n payload: PayloadType<TType>[];\n layout: string;\n activeIndex: number | undefined;\n};\n\nexport type LegendProps<TType> = {\n activeItems: ActiveChartItems<TType>;\n onMouseEnter: (entry: PayloadType<TType>, index: number) => void;\n onMouseLeave: () => void;\n onClick: (entry: PayloadType<TType>) => void;\n};\n\nexport type Props<TType> = LegendProps<TType> & InternalProps<TType>;\n\nexport function Legend<TType>(props: LegendProps<TType>) {\n const { activeIndex, onMouseEnter, onMouseLeave, onClick, payload, layout, activeItems } = props as Props<TType>;\n const [hoverIndex, setHoverIndex] = useState<number | null>(null);\n\n const handleMouseEnter = (entry: PayloadType<TType>, index: number) => {\n setHoverIndex(index);\n if (activeItems[entry.dataKey]) onMouseEnter(entry, index);\n };\n\n const handleMouseLeave = () => {\n onMouseLeave();\n setHoverIndex(null);\n };\n\n const moreButton = moreButtonText => (\n <Button appearance=\"transparent\" className=\"text-grey-700\">\n {moreButtonText}\n </Button>\n );\n\n return (\n <div className=\"mx-auto w-auto max-w-full overflow-hidden\">\n <div className={cn('mb-0 ml-0 flex justify-center', { 'flex-col': layout === 'vertical' })}>\n {/** py-1 is need to make sure the more button focus outline doesn't get cropped */}\n <OverflowGroup className=\"w-full items-center py-1\" moreButton={moreButton}>\n {payload.map((entry, index) => (\n <span\n key={`${entry.dataKey}-${index}`}\n className={cn(' hover:bg-grey-100 cursor-pointer px-[8px] py-[2px] hover:rounded-[4px]', {\n 'bg-grey-100 rounded': activeIndex === index,\n })}\n onMouseEnter={() => handleMouseEnter(entry, index)}\n onMouseLeave={handleMouseLeave}\n onClick={onClick ? () => onClick(entry) : undefined}>\n <span className=\"text-grey-700 flex items-center gap-[4px]\">\n <span\n className={cn('-mt-px ml-1 flex h-3 w-3 rounded-sm', {\n 'border-grey-300 border !bg-white': !activeItems[entry.dataKey],\n })}\n style={{ backgroundColor: entry.color }}>\n {hoverIndex === index && activeItems[entry.dataKey] && (\n <Icon name=\"tick-bold\" className=\"!h-full !w-full text-white\" />\n )}\n </span>\n {entry.value}\n </span>\n </span>\n ))}\n </OverflowGroup>\n </div>\n </div>\n );\n}\n"],"names":["Legend","props","activeIndex","onMouseEnter","onMouseLeave","onClick","payload","layout","activeItems","_useState","useState","hoverIndex","setHoverIndex","handleMouseEnter","entry","index","dataKey","handleMouseLeave","moreButton","moreButtonText","React","Button","appearance","className","cn","OverflowGroup","map","key","undefined","style","backgroundColor","color","Icon","name","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAqBgBA,MAAMA,CAAQC,KAAyB;EACnD,IAAQC,WAAW,GAAwED,KAAqB,CAAxGC,WAAW;IAAEC,YAAY,GAA0DF,KAAqB,CAA3FE,YAAY;IAAEC,YAAY,GAA4CH,KAAqB,CAA7EG,YAAY;IAAEC,OAAO,GAAmCJ,KAAqB,CAA/DI,OAAO;IAAEC,OAAO,GAA0BL,KAAqB,CAAtDK,OAAO;IAAEC,MAAM,GAAkBN,KAAqB,CAA7CM,MAAM;IAAEC,WAAW,GAAKP,KAAqB,CAArCO,WAAW;EACtF,IAAAC,SAAA,GAAoCC,QAAQ,CAAgB,IAAI,CAAC;IAA1DC,UAAU,GAAAF,SAAA;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