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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (670) hide show
  1. package/dist/components/Icon/components/Autopay.d.ts +3 -0
  2. package/dist/components/Icon/components/AutopayPaused.d.ts +3 -0
  3. package/dist/components/Icon/components/Person.d.ts +3 -0
  4. package/dist/components/Icon/components/PersonSolid.d.ts +3 -0
  5. package/dist/components/Icon/components/Wallet.d.ts +3 -0
  6. package/dist/components/Icon/components/index.d.ts +1 -1
  7. package/dist/components/Input/Input.d.ts +1 -1
  8. package/dist/components/Menu/components/Item.d.ts +1 -1
  9. package/dist/components/Menu/components/Link.d.ts +1 -1
  10. package/dist/components/Navigation2/components/Link.d.ts +1 -1
  11. package/dist/components/Select2/components/Option.d.ts +4 -4
  12. package/dist/components/Select2/components/Search.d.ts +1 -1
  13. package/dist/components/Tag/Tag.d.ts +1 -1
  14. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +32 -0
  15. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  16. package/dist/esm/index.css +11 -2
  17. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js +32 -24
  18. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js.map +1 -1
  19. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js +84 -61
  20. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js.map +1 -1
  21. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js +16 -15
  22. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js.map +1 -1
  23. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js +12 -13
  24. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js.map +1 -1
  25. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js +104 -68
  26. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -1
  27. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js +38 -29
  28. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js.map +1 -1
  29. package/dist/esm/packages/taco/src/charts/components/Donut/util.js +2 -2
  30. package/dist/esm/packages/taco/src/charts/components/Donut/util.js.map +1 -1
  31. package/dist/esm/packages/taco/src/charts/components/Legend.js +45 -37
  32. package/dist/esm/packages/taco/src/charts/components/Legend.js.map +1 -1
  33. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js +32 -24
  34. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js.map +1 -1
  35. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js +5 -3
  36. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js.map +1 -1
  37. package/dist/esm/packages/taco/src/charts/components/Tooltip.js +26 -25
  38. package/dist/esm/packages/taco/src/charts/components/Tooltip.js.map +1 -1
  39. package/dist/esm/packages/taco/src/charts/utils/color.js +13 -12
  40. package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -1
  41. package/dist/esm/packages/taco/src/charts/utils/common.js +39 -26
  42. package/dist/esm/packages/taco/src/charts/utils/common.js.map +1 -1
  43. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +30 -31
  44. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  45. package/dist/esm/packages/taco/src/components/Alert/Alert.js +7 -9
  46. package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
  47. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js +14 -13
  48. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js.map +1 -1
  49. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js +2 -2
  50. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js.map +1 -1
  51. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js +10 -9
  52. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
  53. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js +4 -4
  54. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js.map +1 -1
  55. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js +5 -6
  56. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js.map +1 -1
  57. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +2 -2
  58. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
  59. package/dist/esm/packages/taco/src/components/Badge/Badge.js +26 -27
  60. package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
  61. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +12 -14
  62. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
  63. package/dist/esm/packages/taco/src/components/Banner/Banner.js +7 -10
  64. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  65. package/dist/esm/packages/taco/src/components/Banner/util.js +3 -3
  66. package/dist/esm/packages/taco/src/components/Banner/util.js.map +1 -1
  67. package/dist/esm/packages/taco/src/components/Button/Button.js +28 -29
  68. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  69. package/dist/esm/packages/taco/src/components/Button/util.js +25 -24
  70. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  71. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +75 -71
  72. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  73. package/dist/esm/packages/taco/src/components/Card/Card.js +14 -15
  74. package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
  75. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +24 -22
  76. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
  77. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +21 -23
  78. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  79. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +76 -64
  80. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  81. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +60 -57
  82. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  83. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +27 -28
  84. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  85. package/dist/esm/packages/taco/src/components/Dialog/Context.js +4 -4
  86. package/dist/esm/packages/taco/src/components/Dialog/Context.js.map +1 -1
  87. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js +54 -39
  88. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  89. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +36 -38
  90. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  91. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js +3 -3
  92. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  93. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js +2 -2
  94. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js.map +1 -1
  95. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js +5 -6
  96. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js.map +1 -1
  97. package/dist/esm/packages/taco/src/components/Dialog/util.js +7 -3
  98. package/dist/esm/packages/taco/src/components/Dialog/util.js.map +1 -1
  99. package/dist/esm/packages/taco/src/components/Drawer/Context.js +5 -5
  100. package/dist/esm/packages/taco/src/components/Drawer/Context.js.map +1 -1
  101. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +61 -51
  102. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
  103. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +134 -145
  104. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  105. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js +1 -1
  106. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js.map +1 -1
  107. package/dist/esm/packages/taco/src/components/Drawer/util.js +5 -5
  108. package/dist/esm/packages/taco/src/components/Drawer/util.js.map +1 -1
  109. package/dist/esm/packages/taco/src/components/Field/Field.js +14 -12
  110. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  111. package/dist/esm/packages/taco/src/components/Form/Form.js +7 -6
  112. package/dist/esm/packages/taco/src/components/Form/Form.js.map +1 -1
  113. package/dist/esm/packages/taco/src/components/Group/Group.js +9 -7
  114. package/dist/esm/packages/taco/src/components/Group/Group.js.map +1 -1
  115. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +37 -36
  116. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
  117. package/dist/esm/packages/taco/src/components/Header/Header.js +2 -2
  118. package/dist/esm/packages/taco/src/components/Header/Header.js.map +1 -1
  119. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js +14 -10
  120. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  121. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js +5 -4
  122. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js.map +1 -1
  123. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js +7 -9
  124. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js.map +1 -1
  125. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +9 -9
  126. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  127. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +66 -46
  128. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  129. package/dist/esm/packages/taco/src/components/Header/components/Button.js +12 -8
  130. package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
  131. package/dist/esm/packages/taco/src/components/Header/components/Link.js +22 -18
  132. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  133. package/dist/esm/packages/taco/src/components/Header/components/Logo.js +4 -4
  134. package/dist/esm/packages/taco/src/components/Header/components/Logo.js.map +1 -1
  135. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +2 -2
  136. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
  137. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js +10 -9
  138. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js.map +1 -1
  139. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js +2 -2
  140. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js.map +1 -1
  141. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js +5 -7
  142. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js.map +1 -1
  143. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js +1 -1
  144. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js.map +1 -1
  145. package/dist/esm/packages/taco/src/components/Icon/Icon.js +7 -7
  146. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  147. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js +19 -0
  148. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js.map +1 -0
  149. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js +19 -0
  150. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js.map +1 -0
  151. package/dist/esm/packages/taco/src/components/Icon/components/Person.js +19 -0
  152. package/dist/esm/packages/taco/src/components/Icon/components/Person.js.map +1 -0
  153. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js +19 -0
  154. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js.map +1 -0
  155. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js +19 -0
  156. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js.map +1 -0
  157. package/dist/esm/packages/taco/src/components/Icon/components/index.js +14 -4
  158. package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
  159. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js +22 -23
  160. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
  161. package/dist/esm/packages/taco/src/components/Input/Input.js +45 -44
  162. package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
  163. package/dist/esm/packages/taco/src/components/Input/util.js +8 -5
  164. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  165. package/dist/esm/packages/taco/src/components/Layout/Layout.js +7 -5
  166. package/dist/esm/packages/taco/src/components/Layout/Layout.js.map +1 -1
  167. package/dist/esm/packages/taco/src/components/Layout/components/Content.js +2 -2
  168. package/dist/esm/packages/taco/src/components/Layout/components/Content.js.map +1 -1
  169. package/dist/esm/packages/taco/src/components/Layout/components/Context.js +4 -2
  170. package/dist/esm/packages/taco/src/components/Layout/components/Context.js.map +1 -1
  171. package/dist/esm/packages/taco/src/components/Layout/components/Page.js +2 -2
  172. package/dist/esm/packages/taco/src/components/Layout/components/Page.js.map +1 -1
  173. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +34 -27
  174. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  175. package/dist/esm/packages/taco/src/components/Layout/components/Top.js +9 -6
  176. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  177. package/dist/esm/packages/taco/src/components/List/components/Button.js +1 -1
  178. package/dist/esm/packages/taco/src/components/List/components/Button.js.map +1 -1
  179. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js +10 -7
  180. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js.map +1 -1
  181. package/dist/esm/packages/taco/src/components/List/components/Group.js +1 -1
  182. package/dist/esm/packages/taco/src/components/List/components/Group.js.map +1 -1
  183. package/dist/esm/packages/taco/src/components/List/components/Item.js +15 -13
  184. package/dist/esm/packages/taco/src/components/List/components/Item.js.map +1 -1
  185. package/dist/esm/packages/taco/src/components/List/components/Link.js +3 -3
  186. package/dist/esm/packages/taco/src/components/List/components/Link.js.map +1 -1
  187. package/dist/esm/packages/taco/src/components/List/components/Toggle.js +29 -27
  188. package/dist/esm/packages/taco/src/components/List/components/Toggle.js.map +1 -1
  189. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js +21 -26
  190. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js.map +1 -1
  191. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +82 -70
  192. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  193. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js +56 -51
  194. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js.map +1 -1
  195. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js +83 -65
  196. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js.map +1 -1
  197. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js +9 -10
  198. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js.map +1 -1
  199. package/dist/esm/packages/taco/src/components/Listbox/util.js +78 -48
  200. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  201. package/dist/esm/packages/taco/src/components/Menu/Context.js +2 -2
  202. package/dist/esm/packages/taco/src/components/Menu/Context.js.map +1 -1
  203. package/dist/esm/packages/taco/src/components/Menu/Menu.js +42 -26
  204. package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
  205. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js +8 -8
  206. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js.map +1 -1
  207. package/dist/esm/packages/taco/src/components/Menu/components/Content.js +27 -21
  208. package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
  209. package/dist/esm/packages/taco/src/components/Menu/components/Header.js +3 -3
  210. package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
  211. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +32 -32
  212. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  213. package/dist/esm/packages/taco/src/components/Menu/components/Link.js +10 -10
  214. package/dist/esm/packages/taco/src/components/Menu/components/Link.js.map +1 -1
  215. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js +15 -16
  216. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js.map +1 -1
  217. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js +1 -1
  218. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js.map +1 -1
  219. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js +7 -7
  220. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js.map +1 -1
  221. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +5 -5
  222. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
  223. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +6 -6
  224. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
  225. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +41 -36
  226. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  227. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js +6 -6
  228. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js.map +1 -1
  229. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js +6 -6
  230. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js.map +1 -1
  231. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +14 -11
  232. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
  233. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +31 -24
  234. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  235. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +7 -7
  236. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  237. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js +9 -7
  238. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js.map +1 -1
  239. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +48 -51
  240. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  241. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +26 -23
  242. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
  243. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +53 -39
  244. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  245. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js +17 -7
  246. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js.map +1 -1
  247. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js +8 -9
  248. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js.map +1 -1
  249. package/dist/esm/packages/taco/src/components/Popover/Popover.js +45 -43
  250. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  251. package/dist/esm/packages/taco/src/components/Popover/Primitives.js +1 -1
  252. package/dist/esm/packages/taco/src/components/Popover/Primitives.js.map +1 -1
  253. package/dist/esm/packages/taco/src/components/Popover/util.js +3 -1
  254. package/dist/esm/packages/taco/src/components/Popover/util.js.map +1 -1
  255. package/dist/esm/packages/taco/src/components/Progress/Progress.js +13 -11
  256. package/dist/esm/packages/taco/src/components/Progress/Progress.js.map +1 -1
  257. package/dist/esm/packages/taco/src/components/Provider/Localization.js +13 -12
  258. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  259. package/dist/esm/packages/taco/src/components/Provider/Provider.js +8 -8
  260. package/dist/esm/packages/taco/src/components/Provider/Provider.js.map +1 -1
  261. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +54 -47
  262. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  263. package/dist/esm/packages/taco/src/components/RadioGroup/util.js +7 -1
  264. package/dist/esm/packages/taco/src/components/RadioGroup/util.js.map +1 -1
  265. package/dist/esm/packages/taco/src/components/Report/Report.js +7 -5
  266. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  267. package/dist/esm/packages/taco/src/components/Report/useReport.js +1 -1
  268. package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
  269. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +17 -13
  270. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  271. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +11 -11
  272. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
  273. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +44 -39
  274. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  275. package/dist/esm/packages/taco/src/components/Select/Select.js +28 -31
  276. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  277. package/dist/esm/packages/taco/src/components/Select/useSelect.js +79 -70
  278. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  279. package/dist/esm/packages/taco/src/components/Select2/Select2.js +154 -121
  280. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  281. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js +2 -4
  282. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js.map +1 -1
  283. package/dist/esm/packages/taco/src/components/Select2/components/Context.js +4 -2
  284. package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
  285. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +45 -41
  286. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  287. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +145 -129
  288. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  289. package/dist/esm/packages/taco/src/components/Select2/components/Group.js +8 -8
  290. package/dist/esm/packages/taco/src/components/Select2/components/Group.js.map +1 -1
  291. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +36 -35
  292. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  293. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +9 -10
  294. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  295. package/dist/esm/packages/taco/src/components/Select2/components/Title.js +2 -2
  296. package/dist/esm/packages/taco/src/components/Select2/components/Title.js.map +1 -1
  297. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +173 -128
  298. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  299. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +32 -23
  300. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  301. package/dist/esm/packages/taco/src/components/Select2/utilities.js +13 -6
  302. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  303. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +16 -13
  304. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  305. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js +17 -12
  306. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js.map +1 -1
  307. package/dist/esm/packages/taco/src/components/Switch/Switch.js +14 -14
  308. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  309. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +28 -23
  310. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  311. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js +7 -3
  312. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js.map +1 -1
  313. package/dist/esm/packages/taco/src/components/Table/components/Table.js +22 -18
  314. package/dist/esm/packages/taco/src/components/Table/components/Table.js.map +1 -1
  315. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +100 -92
  316. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  317. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +136 -118
  318. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  319. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js +55 -55
  320. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  321. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js +35 -41
  322. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  323. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js +77 -71
  324. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  325. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js +56 -30
  326. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js.map +1 -1
  327. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js +151 -142
  328. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js.map +1 -1
  329. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js +22 -20
  330. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  331. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +9 -12
  332. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  333. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +41 -41
  334. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js.map +1 -1
  335. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js +16 -14
  336. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js.map +1 -1
  337. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js +32 -26
  338. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js.map +1 -1
  339. package/dist/esm/packages/taco/src/components/Table/util.js +37 -30
  340. package/dist/esm/packages/taco/src/components/Table/util.js.map +1 -1
  341. package/dist/esm/packages/taco/src/components/Table3/Table3.js +23 -23
  342. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  343. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js +13 -14
  344. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js.map +1 -1
  345. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +21 -23
  346. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  347. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js +20 -17
  348. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -1
  349. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +67 -73
  350. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  351. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js +2 -2
  352. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -1
  353. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +19 -20
  354. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -1
  355. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +26 -25
  356. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  357. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +45 -40
  358. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  359. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +7 -8
  360. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
  361. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +18 -19
  362. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
  363. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +7 -10
  364. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  365. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +38 -36
  366. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  367. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +15 -15
  368. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  369. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +8 -11
  370. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
  371. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +164 -201
  372. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -1
  373. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +40 -27
  374. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  375. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +18 -16
  376. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  377. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +25 -19
  378. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  379. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +29 -35
  380. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  381. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +34 -35
  382. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
  383. package/dist/esm/packages/taco/src/components/Tag/Tag.js +18 -16
  384. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  385. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js +8 -11
  386. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js.map +1 -1
  387. package/dist/esm/packages/taco/src/components/Toast/Toast.js +19 -20
  388. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  389. package/dist/esm/packages/taco/src/components/Toast/Toaster.js +117 -96
  390. package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
  391. package/dist/esm/packages/taco/src/components/Toast/util.js +6 -4
  392. package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
  393. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +10 -9
  394. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
  395. package/dist/esm/packages/taco/src/components/Tour/Tour.js +49 -46
  396. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  397. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +33 -27
  398. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  399. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js +15 -13
  400. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js.map +1 -1
  401. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js +1 -1
  402. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  403. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js +11 -6
  404. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js.map +1 -1
  405. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js +19 -13
  406. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js.map +1 -1
  407. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js +4 -4
  408. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
  409. package/dist/esm/packages/taco/src/hooks/useId.js +4 -2
  410. package/dist/esm/packages/taco/src/hooks/useId.js.map +1 -1
  411. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js +20 -18
  412. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
  413. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js +7 -5
  414. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js.map +1 -1
  415. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js +9 -5
  416. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js.map +1 -1
  417. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js +3 -1
  418. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js.map +1 -1
  419. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js +2 -2
  420. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js.map +1 -1
  421. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js +24 -22
  422. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js.map +1 -1
  423. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js +13 -6
  424. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js.map +1 -1
  425. package/dist/esm/packages/taco/src/hooks/useMergedRef.js +3 -3
  426. package/dist/esm/packages/taco/src/hooks/useMergedRef.js.map +1 -1
  427. package/dist/esm/packages/taco/src/hooks/usePrevious.js +2 -2
  428. package/dist/esm/packages/taco/src/hooks/usePrevious.js.map +1 -1
  429. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js +14 -14
  430. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js.map +1 -1
  431. package/dist/esm/packages/taco/src/primitives/Button.js +16 -13
  432. package/dist/esm/packages/taco/src/primitives/Button.js.map +1 -1
  433. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +50 -44
  434. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
  435. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js +4 -2
  436. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js.map +1 -1
  437. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js +9 -5
  438. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js.map +1 -1
  439. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js +16 -18
  440. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
  441. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +47 -40
  442. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
  443. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js +9 -10
  444. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js.map +1 -1
  445. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +22 -20
  446. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  447. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js +24 -27
  448. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  449. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js +11 -10
  450. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js.map +1 -1
  451. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +22 -19
  452. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  453. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js +25 -22
  454. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -1
  455. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js +6 -6
  456. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -1
  457. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +30 -14
  458. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  459. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js +18 -19
  460. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js.map +1 -1
  461. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +34 -34
  462. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
  463. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js +10 -12
  464. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js.map +1 -1
  465. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js +19 -18
  466. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -1
  467. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +42 -40
  468. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  469. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +5 -7
  470. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
  471. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +19 -24
  472. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  473. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +56 -55
  474. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
  475. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +27 -23
  476. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  477. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js +13 -16
  478. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js.map +1 -1
  479. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +86 -87
  480. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  481. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js +14 -11
  482. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  483. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +85 -58
  484. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  485. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js +18 -20
  486. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  487. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js +3 -3
  488. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  489. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js +11 -6
  490. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
  491. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +58 -49
  492. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  493. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js +28 -32
  494. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -1
  495. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js +44 -37
  496. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
  497. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js +1 -1
  498. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -1
  499. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js +11 -11
  500. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -1
  501. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js +6 -0
  502. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -0
  503. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js +23 -22
  504. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  505. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +59 -42
  506. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  507. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +39 -39
  508. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
  509. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +21 -16
  510. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
  511. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js +16 -15
  512. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -1
  513. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +51 -40
  514. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  515. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js +13 -9
  516. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js.map +1 -1
  517. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js +57 -51
  518. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  519. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +71 -67
  520. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -1
  521. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js +40 -37
  522. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -1
  523. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js +64 -44
  524. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  525. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js +62 -51
  526. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  527. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js +6 -6
  528. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -1
  529. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js +13 -5
  530. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js.map +1 -1
  531. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +93 -77
  532. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  533. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js +15 -15
  534. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js.map +1 -1
  535. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js +31 -41
  536. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js.map +1 -1
  537. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js +31 -30
  538. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js.map +1 -1
  539. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js +3 -3
  540. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -1
  541. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +14 -15
  542. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
  543. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js +2 -2
  544. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js.map +1 -1
  545. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  546. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +42 -36
  547. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  548. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js +67 -74
  549. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
  550. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js +11 -6
  551. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js.map +1 -1
  552. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js +5 -2
  553. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js.map +1 -1
  554. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js +15 -5
  555. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js.map +1 -1
  556. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js +5 -2
  557. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js.map +1 -1
  558. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js +26 -16
  559. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js.map +1 -1
  560. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js +9 -3
  561. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js.map +1 -1
  562. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js +42 -23
  563. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
  564. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js +9 -6
  565. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js.map +1 -1
  566. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js +9 -4
  567. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js.map +1 -1
  568. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js +5 -2
  569. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js.map +1 -1
  570. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js +9 -3
  571. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js.map +1 -1
  572. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js +5 -2
  573. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js.map +1 -1
  574. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js +1 -1
  575. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js.map +1 -1
  576. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js +15 -5
  577. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js.map +1 -1
  578. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js +14 -9
  579. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js.map +1 -1
  580. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +25 -13
  581. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
  582. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js +43 -22
  583. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js.map +1 -1
  584. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js +34 -24
  585. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  586. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js +4 -4
  587. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js.map +1 -1
  588. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js +3 -3
  589. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js.map +1 -1
  590. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js +18 -16
  591. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js.map +1 -1
  592. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js +2 -2
  593. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js.map +1 -1
  594. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js +6 -4
  595. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js.map +1 -1
  596. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js +8 -8
  597. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js.map +1 -1
  598. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js +6 -6
  599. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js.map +1 -1
  600. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js +8 -6
  601. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  602. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js +17 -17
  603. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  604. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js +2 -2
  605. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js.map +1 -1
  606. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +55 -55
  607. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  608. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js +59 -30
  609. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js.map +1 -1
  610. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js +4 -4
  611. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js.map +1 -1
  612. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js +33 -19
  613. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js.map +1 -1
  614. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +11 -11
  615. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
  616. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js +21 -19
  617. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  618. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js +6 -7
  619. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  620. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +138 -106
  621. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  622. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js +3 -1
  623. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  624. package/dist/esm/packages/taco/src/types.js +1 -1
  625. package/dist/esm/packages/taco/src/types.js.map +1 -1
  626. package/dist/esm/packages/taco/src/utils/aria.js +2 -2
  627. package/dist/esm/packages/taco/src/utils/aria.js.map +1 -1
  628. package/dist/esm/packages/taco/src/utils/date.js +47 -23
  629. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  630. package/dist/esm/packages/taco/src/utils/debounce.js +10 -4
  631. package/dist/esm/packages/taco/src/utils/debounce.js.map +1 -1
  632. package/dist/esm/packages/taco/src/utils/device.js +4 -2
  633. package/dist/esm/packages/taco/src/utils/device.js.map +1 -1
  634. package/dist/esm/packages/taco/src/utils/dom.js +26 -20
  635. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  636. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js +40 -38
  637. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js.map +1 -1
  638. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js +9 -7
  639. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js.map +1 -1
  640. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js +20 -9
  641. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  642. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js +9 -9
  643. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js.map +1 -1
  644. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js +8 -6
  645. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js.map +1 -1
  646. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js +16 -11
  647. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js.map +1 -1
  648. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js +11 -6
  649. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js.map +1 -1
  650. package/dist/esm/packages/taco/src/utils/input.js +10 -7
  651. package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
  652. package/dist/esm/packages/taco/src/utils/keyboard.js +8 -5
  653. package/dist/esm/packages/taco/src/utils/keyboard.js.map +1 -1
  654. package/dist/esm/packages/taco/src/utils/mergeRefs.js +2 -2
  655. package/dist/esm/packages/taco/src/utils/mergeRefs.js.map +1 -1
  656. package/dist/esm/packages/taco/src/utils/tailwind.js +5 -5
  657. package/dist/esm/packages/taco/src/utils/tailwind.js.map +1 -1
  658. package/dist/esm/packages/taco/tailwind.colors.js +1 -1
  659. package/dist/esm/packages/taco/tailwind.colors.js.map +1 -1
  660. package/dist/index.css +11 -2
  661. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.d.ts +3 -0
  662. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +0 -1
  663. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +0 -3
  664. package/dist/primitives/Table/types.d.ts +1 -1
  665. package/dist/primitives/Table/useTableManager/features/useTableServerLoading.d.ts +2 -1
  666. package/dist/taco.cjs.development.js +7944 -6916
  667. package/dist/taco.cjs.development.js.map +1 -1
  668. package/dist/taco.cjs.production.min.js +1 -1
  669. package/dist/taco.cjs.production.min.js.map +1 -1
  670. package/package.json +1 -2
@@ -1,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,OAAO,GAAIC,CAAyB,IAAK,IAAI;MAoBtCC,UAAU,GAAG,SAASA,UAAUA,CAAC;EAC1CC,QAAQ;EACRC,SAAS;EACTC,OAAO;EACPC,UAAU,GAAG,KAAK;EAClBC,cAAc,GAAG,QAAQ;EACzBC;CACc;EACd,MAAMC,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAiB,IAAI,CAAC;EAC9C,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGH,cAAK,CAACI,QAAQ,CAAS,CAAC,CAAC;EAErD,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGN,cAAK,CAACI,QAAQ,CAAa,EAAE,CAAC;;EAEpE,MAAM,CAACG,YAAY,EAAEC,eAAe,CAAC,GAAGR,cAAK,CAACI,QAAQ,CAAa,EAAE,CAAC;;EAEtE,MAAM,CAACK,YAAY,EAAEC,eAAe,CAAC,GAAGV,cAAK,CAACI,QAAQ,CAA0B;IAC5E,MAAMO,IAAI,GAAG,EAAE;IAEfX,cAAK,CAACY,QAAQ,CAACC,OAAO,CAACpB,QAAQ,EAAEqB,KAAK;MAClCH,IAAI,CAACG,KAAK,CAACC,KAAK,CAACC,EAAE,CAAC,GAAG,IAAI;KAC9B,CAAC;IAEF,OAAOL,IAAI;GACd,CAAC;EAEFX,cAAK,CAACiB,SAAS,CAAC;IACZ,IAAIlB,GAAG,CAACmB,OAAO,EAAE;MAAA,IAAAC,qBA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IAC7BuB,WAAW,eAAExF,6BAACyF,WAAW;MAACC,SAAS,EAAElC,gBAAgB;MAAE7D,OAAO,EAAEqD;MAAkB;IAClFrB,IAAI,EAAEI,aAAa,CAACO,MAAM,GAAG,CAAC,GAAGP,aAAa,GAAG,EAAE;IACnD4D,OAAO,EAAC,OAAO;IACfC,WAAW,EAAE1F,MAAM,GAAG2F,iBAAiB,GAAGC,WAAW;IACrDC,YAAY,EAAEC,OAAO,IAAIjE,aAAa,CAACO,MAAM,GAAG,CAAC,IAAIhC,cAAc,CAAC,CAAC0F,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,gB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C,YAAY,EAAE,SAAAA,aAAAC,OAAO;MAAA,OAAIpE,aAAa,CAACO,MAAM,GAAG,CAAC,IAAIlC,cAAc,CAAC,CAAC+F,OAAO,CAACrF,EAAE,CAAC,CAAC;;IACjFsF,YAAY,EAAE,SAAAA;MAAA,OAAMhG,cAAc,CAAC,EAAE,CAAC;;IACtCiG,WAAW,EAAErG,MAAM,GAAGgG,iBAAiB;IACvCM,YAAY,EAAE,CAAC;;IAEfC,YAAY,EAAE,CAAC;KACdhC,OAAO,EAAE,CACC,CACC,EACnBhF,UAAU,kBACPK,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","getThemeColor","Icon","name","moreButton","moreButtonText","Button","appearance","OverflowGroup"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiBaA,MAAM,GAAGA,CAAC;EACnBC,cAAc;EACdC,WAAW;EACXC,YAAY;EACZC,IAAI;EACJC,OAAO;EACPC,cAAc;EACdC,SAAS;EACTC,KAAK;EACLC,YAAY;EACZC;CACU;EACV,MAAMC,qBAAqB,GAAGR,YAAY,CAACS,MAAM,KAAKR,IAAI,CAACQ,MAAM;EACjE,MAAMC,oBAAoB,GAAGX,WAAW,CAACU,MAAM,KAAKR,IAAI,CAACQ,MAAM;EAE/D,MAAME,gBAAgB,GAAGA,MAAMR,cAAc,CAAC,EAAE,CAAC;EAEjD,MAAMS,gBAAgB,GAAGA,CAACC,KAAoC,EAAEC,KAAc;IAC1E,MAAMC,OAAO,GAAGF,KAAK,KAAK,IAAI;;IAE9B,MAAMG,QAAQ,GAAGH,KAAK,KAAK,IAAI,GAAG;MAAEI,EAAE,EAAE,OAAO;MAAEV,KAAK;MAAEW,KAAK,EAAEb,KAAK;MAAEc,KAAK,EAAE;KAAY,GAAGN,KAAK;IACjG,MAAMO,UAAU,GAAGL,OAAO,GAAGP,qBAAqB,GAAGR,YAAY,CAACqB,QAAQ,CAACL,QAAQ,CAACC,EAAE,CAAC;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MACxD,eACFI,0CACKP,QAAQ,CAACT,KAAK,eACfgB;MAAME,SAAS,EAAC;OACXrB,SAAS,GAAGA,SAAS,CAACY,QAAQ,CAACE,KAAK,CAAC,GAAGF,QAAQ,CAACE,KAAK,CACpD,CACL,CACP,CACN,CACA;GAEZ;EAED,MAAMkB,UAAU,GAAGC,cAAc,kBAC7Bd,6BAACe,MAAM;IAACC,UAAU,EAAC,aAAa;IAACd,SAAS,EAAC;KACtCY,cAAc,CACV,CACZ;EAED,MAAMZ,SAAS,GAAGC,EAAE,CAAC,gBAAgB,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,I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;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,5 +1,5 @@
1
- const DONUT_WIDTH = 16;
2
- const HOVER_DONUT_WIDTH = 10;
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,KAAqB;EAChH,MAAM,CAACQ,UAAU,EAAEC,aAAa,CAAC,GAAGC,QAAQ,CAAgB,IAAI,CAAC;EAEjE,MAAMC,gBAAgB,GAAGA,CAACC,KAAyB,EAAEC,KAAa;IAC9DJ,aAAa,CAACI,KAAK,CAAC;IACpB,IAAIN,WAAW,CAACK,KAAK,CAACE,OAAO,CAAC,EAAEZ,YAAY,CAACU,KAAK,EAAEC,KAAK,CAAC;GAC7D;EAED,MAAME,gBAAgB,GAAGA;IACrBZ,YAAY,EAAE;IACdM,aAAa,CAAC,IAAI,CAAC;GACtB;EAED,MAAMO,UAAU,GAAGC,cAAc,kBAC7BC,6BAACC,MAAM;IAACC,UAAU,EAAC,aAAa;IAACC,SAAS,EAAC;KACtCJ,cAAc,CACV,CACZ;EAED,oBACIC;IAAKG,SAAS,EAAC;kBACXH;IAAKG,SAAS,EAAEC,EAAE,CAAC,+BAA+B,EAAE;MAAE,UAAU,EAAEhB,MAAM,KAAK;KAAY;kBAErFY,6BAACK,aAAa;IAACF,SAAS,EAAC,0BAA0B;IAACL,UAAU,EAAEA;KAC3DX,OAAO,CAACmB,GAAG,CAAC,CAACZ,KAAK,EAAEC,KAAK,mBACtBK;IACIO,GAAG,EAAE,GAAGb,KAAK,CAACE,OAAO,IAAID,KAAK,EAAE;IAChCQ,SAAS,EAAEC,EAAE,CAAC,yEAAyE,EAAE;MACrF,qBAAqB,EAAErB,WAAW,KAAKY;KAC1C,CAAC;IACFX,YAAY,EAAEA,MAAMS,gBAAgB,CAACC,KAAK,EAAEC,KAAK,CAAC;IAClDV,YAAY,EAAEY,gBAAgB;IAC9BX,OAAO,EAAEA,OAAO,GAAG,MAAMA,OAAO,CAACQ,KAAK,CAAC,GAAGc;kBAC1CR;IAAMG,SAAS,EAAC;kBACZH;IACIG,SAAS,EAAEC,EAAE,CAAC,qCAAqC,EAAE;MACjD,kCAAkC,EAAE,CAACf,WAAW,CAACK,KAAK,CAACE,OAAO;KACjE,CAAC;IACFa,KAAK,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,CAAxG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