@economic/taco 2.53.0-settings.6 → 2.53.0-settings.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (442) hide show
  1. package/dist/charts/components/Area/AreaChart.d.ts +1 -1
  2. package/dist/charts/components/Bar/BarChart.d.ts +1 -1
  3. package/dist/charts/components/Donut/ActiveShape.d.ts +2 -2
  4. package/dist/charts/components/Donut/CenteredLabel.d.ts +2 -2
  5. package/dist/charts/components/Donut/DonutChart.d.ts +1 -1
  6. package/dist/charts/components/Donut/Legend.d.ts +1 -1
  7. package/dist/charts/components/Legend.d.ts +2 -2
  8. package/dist/charts/components/Line/LineChart.d.ts +1 -1
  9. package/dist/charts/components/ResponsiveContainer.d.ts +1 -1
  10. package/dist/charts/components/Tooltip.d.ts +2 -2
  11. package/dist/charts/utils/common.d.ts +3 -3
  12. package/dist/components/Accordion/Accordion.d.ts +2 -2
  13. package/dist/components/Alert/Alert.d.ts +1 -1
  14. package/dist/components/AlertDialog/components/Content.d.ts +1 -1
  15. package/dist/components/Calendar/Calendar.d.ts +1 -1
  16. package/dist/components/Datepicker/Datepicker.d.ts +1 -1
  17. package/dist/components/Dialog/components/Content.d.ts +1 -1
  18. package/dist/components/Dialog/components/DialogDrawer.d.ts +2 -2
  19. package/dist/components/Drawer/components/Content.d.ts +2 -2
  20. package/dist/components/Header/components/Agreement/Badge.d.ts +1 -1
  21. package/dist/components/Header/components/Agreement/Display.d.ts +2 -2
  22. package/dist/components/Header/components/Agreement/Item.d.ts +2 -2
  23. package/dist/components/Header/components/AgreementSelector.d.ts +2 -2
  24. package/dist/components/Header/components/Button.d.ts +1 -1
  25. package/dist/components/HoverCard/HoverCard.d.ts +1 -1
  26. package/dist/components/Icon/components/AccountPreview.d.ts +1 -1
  27. package/dist/components/Icon/components/Accounting.d.ts +1 -1
  28. package/dist/components/Icon/components/AccountingYear.d.ts +1 -1
  29. package/dist/components/Icon/components/AccountingYearCancel.d.ts +1 -1
  30. package/dist/components/Icon/components/AiChatSolid.d.ts +1 -1
  31. package/dist/components/Icon/components/AiStars.d.ts +1 -1
  32. package/dist/components/Icon/components/ArrowBottom.d.ts +1 -1
  33. package/dist/components/Icon/components/ArrowDown.d.ts +1 -1
  34. package/dist/components/Icon/components/ArrowEnd.d.ts +1 -1
  35. package/dist/components/Icon/components/ArrowLeft.d.ts +1 -1
  36. package/dist/components/Icon/components/ArrowRight.d.ts +1 -1
  37. package/dist/components/Icon/components/ArrowStart.d.ts +1 -1
  38. package/dist/components/Icon/components/ArrowTop.d.ts +1 -1
  39. package/dist/components/Icon/components/ArrowUp.d.ts +1 -1
  40. package/dist/components/Icon/components/Attach.d.ts +1 -1
  41. package/dist/components/Icon/components/AttachAuto.d.ts +1 -1
  42. package/dist/components/Icon/components/AttachCancel.d.ts +1 -1
  43. package/dist/components/Icon/components/AttachWarning.d.ts +1 -1
  44. package/dist/components/Icon/components/Autopay.d.ts +1 -1
  45. package/dist/components/Icon/components/AutopayPaused.d.ts +1 -1
  46. package/dist/components/Icon/components/Autotext.d.ts +1 -1
  47. package/dist/components/Icon/components/AutotextInsert.d.ts +1 -1
  48. package/dist/components/Icon/components/Basic.d.ts +1 -1
  49. package/dist/components/Icon/components/BasicTabs.d.ts +1 -1
  50. package/dist/components/Icon/components/BellSolid.d.ts +1 -1
  51. package/dist/components/Icon/components/Book.d.ts +1 -1
  52. package/dist/components/Icon/components/Booking.d.ts +1 -1
  53. package/dist/components/Icon/components/Budget.d.ts +1 -1
  54. package/dist/components/Icon/components/Calendar.d.ts +1 -1
  55. package/dist/components/Icon/components/CashAccount.d.ts +1 -1
  56. package/dist/components/Icon/components/CashReports.d.ts +1 -1
  57. package/dist/components/Icon/components/ChartArea.d.ts +1 -1
  58. package/dist/components/Icon/components/ChartBar.d.ts +1 -1
  59. package/dist/components/Icon/components/ChartLine.d.ts +1 -1
  60. package/dist/components/Icon/components/ChartPie.d.ts +1 -1
  61. package/dist/components/Icon/components/ChartTable.d.ts +1 -1
  62. package/dist/components/Icon/components/Chat.d.ts +1 -1
  63. package/dist/components/Icon/components/ChatSolid.d.ts +1 -1
  64. package/dist/components/Icon/components/ChevronDown.d.ts +1 -1
  65. package/dist/components/Icon/components/ChevronDownDouble.d.ts +1 -1
  66. package/dist/components/Icon/components/ChevronDownSolid.d.ts +1 -1
  67. package/dist/components/Icon/components/ChevronLeft.d.ts +1 -1
  68. package/dist/components/Icon/components/ChevronLeftDouble.d.ts +1 -1
  69. package/dist/components/Icon/components/ChevronLeftSolid.d.ts +1 -1
  70. package/dist/components/Icon/components/ChevronRight.d.ts +1 -1
  71. package/dist/components/Icon/components/ChevronRightDouble.d.ts +1 -1
  72. package/dist/components/Icon/components/ChevronRightSolid.d.ts +1 -1
  73. package/dist/components/Icon/components/ChevronUp.d.ts +1 -1
  74. package/dist/components/Icon/components/ChevronUpDouble.d.ts +1 -1
  75. package/dist/components/Icon/components/ChevronUpSolid.d.ts +1 -1
  76. package/dist/components/Icon/components/CircleClose.d.ts +1 -1
  77. package/dist/components/Icon/components/CircleInformation.d.ts +1 -1
  78. package/dist/components/Icon/components/CircleMinus.d.ts +1 -1
  79. package/dist/components/Icon/components/CirclePlus.d.ts +1 -1
  80. package/dist/components/Icon/components/CircleQuestionmark.d.ts +1 -1
  81. package/dist/components/Icon/components/CircleTick.d.ts +1 -1
  82. package/dist/components/Icon/components/CircleWarning.d.ts +1 -1
  83. package/dist/components/Icon/components/Clamp.d.ts +1 -1
  84. package/dist/components/Icon/components/ClampOpen.d.ts +1 -1
  85. package/dist/components/Icon/components/Close.d.ts +1 -1
  86. package/dist/components/Icon/components/ColumnFreeze.d.ts +1 -1
  87. package/dist/components/Icon/components/ColumnUnfreeze.d.ts +1 -1
  88. package/dist/components/Icon/components/Columns.d.ts +1 -1
  89. package/dist/components/Icon/components/ConnectionEnable.d.ts +1 -1
  90. package/dist/components/Icon/components/ConnectionRevoke.d.ts +1 -1
  91. package/dist/components/Icon/components/Contacts.d.ts +1 -1
  92. package/dist/components/Icon/components/Copy.d.ts +1 -1
  93. package/dist/components/Icon/components/Courses.d.ts +1 -1
  94. package/dist/components/Icon/components/Credit.d.ts +1 -1
  95. package/dist/components/Icon/components/Delete.d.ts +1 -1
  96. package/dist/components/Icon/components/DeletePermanently.d.ts +1 -1
  97. package/dist/components/Icon/components/Depecriate.d.ts +1 -1
  98. package/dist/components/Icon/components/Developer.d.ts +1 -1
  99. package/dist/components/Icon/components/DistributionTemplate.d.ts +1 -1
  100. package/dist/components/Icon/components/Document.d.ts +1 -1
  101. package/dist/components/Icon/components/DocumentApprove.d.ts +1 -1
  102. package/dist/components/Icon/components/DocumentCreateEntry.d.ts +1 -1
  103. package/dist/components/Icon/components/DocumentCut.d.ts +1 -1
  104. package/dist/components/Icon/components/DocumentError.d.ts +1 -1
  105. package/dist/components/Icon/components/DocumentIsolatePage.d.ts +1 -1
  106. package/dist/components/Icon/components/DocumentMerge.d.ts +1 -1
  107. package/dist/components/Icon/components/DocumentMove.d.ts +1 -1
  108. package/dist/components/Icon/components/DocumentPreview.d.ts +1 -1
  109. package/dist/components/Icon/components/DocumentReceived.d.ts +1 -1
  110. package/dist/components/Icon/components/DocumentRejectedRequest.d.ts +1 -1
  111. package/dist/components/Icon/components/DocumentSigned.d.ts +1 -1
  112. package/dist/components/Icon/components/DocumentSignedSolid.d.ts +1 -1
  113. package/dist/components/Icon/components/DocumentSplit.d.ts +1 -1
  114. package/dist/components/Icon/components/DocumentTime.d.ts +1 -1
  115. package/dist/components/Icon/components/Download.d.ts +1 -1
  116. package/dist/components/Icon/components/Drag.d.ts +1 -1
  117. package/dist/components/Icon/components/ECopedia.d.ts +1 -1
  118. package/dist/components/Icon/components/Edit.d.ts +1 -1
  119. package/dist/components/Icon/components/EditSimple.d.ts +1 -1
  120. package/dist/components/Icon/components/EllipsisHorizontal.d.ts +1 -1
  121. package/dist/components/Icon/components/EllipsisVertical.d.ts +1 -1
  122. package/dist/components/Icon/components/EntriesOnAccount.d.ts +1 -1
  123. package/dist/components/Icon/components/EntriesOpen.d.ts +1 -1
  124. package/dist/components/Icon/components/EntriesWarning.d.ts +1 -1
  125. package/dist/components/Icon/components/EntryTypeCustomerInvoice.d.ts +1 -1
  126. package/dist/components/Icon/components/EntryTypeCustomerPayment.d.ts +1 -1
  127. package/dist/components/Icon/components/EntryTypeJournalEntry.d.ts +1 -1
  128. package/dist/components/Icon/components/EntryTypeManualCustomerInvoice.d.ts +1 -1
  129. package/dist/components/Icon/components/EntryTypeSupplierInvoice.d.ts +1 -1
  130. package/dist/components/Icon/components/EntryTypeSupplierPayment.d.ts +1 -1
  131. package/dist/components/Icon/components/Envelope.d.ts +1 -1
  132. package/dist/components/Icon/components/EnvelopeApproved.d.ts +1 -1
  133. package/dist/components/Icon/components/EnvelopeSolid.d.ts +1 -1
  134. package/dist/components/Icon/components/ExpandView.d.ts +1 -1
  135. package/dist/components/Icon/components/Expenses.d.ts +1 -1
  136. package/dist/components/Icon/components/Experiment.d.ts +1 -1
  137. package/dist/components/Icon/components/Export.d.ts +1 -1
  138. package/dist/components/Icon/components/ExportToExcel.d.ts +1 -1
  139. package/dist/components/Icon/components/ExportToPdf.d.ts +1 -1
  140. package/dist/components/Icon/components/EyeOff.d.ts +1 -1
  141. package/dist/components/Icon/components/EyeOn.d.ts +1 -1
  142. package/dist/components/Icon/components/Filter.d.ts +1 -1
  143. package/dist/components/Icon/components/FilterSolid.d.ts +1 -1
  144. package/dist/components/Icon/components/FontSize.d.ts +1 -1
  145. package/dist/components/Icon/components/GraphSolid.d.ts +1 -1
  146. package/dist/components/Icon/components/Hash.d.ts +1 -1
  147. package/dist/components/Icon/components/HeightExtraTall.d.ts +1 -1
  148. package/dist/components/Icon/components/HeightMedium.d.ts +1 -1
  149. package/dist/components/Icon/components/HeightShort.d.ts +1 -1
  150. package/dist/components/Icon/components/HeightTall.d.ts +1 -1
  151. package/dist/components/Icon/components/House.d.ts +1 -1
  152. package/dist/components/Icon/components/HouseSolid.d.ts +1 -1
  153. package/dist/components/Icon/components/Id.d.ts +1 -1
  154. package/dist/components/Icon/components/Images.d.ts +1 -1
  155. package/dist/components/Icon/components/Import.d.ts +1 -1
  156. package/dist/components/Icon/components/Inbox.d.ts +1 -1
  157. package/dist/components/Icon/components/InboxEinvoicing.d.ts +1 -1
  158. package/dist/components/Icon/components/InboxScanning.d.ts +1 -1
  159. package/dist/components/Icon/components/InboxSmart.d.ts +1 -1
  160. package/dist/components/Icon/components/Info.d.ts +1 -1
  161. package/dist/components/Icon/components/Inventory.d.ts +1 -1
  162. package/dist/components/Icon/components/InventoryMatrix.d.ts +1 -1
  163. package/dist/components/Icon/components/JournalPro.d.ts +1 -1
  164. package/dist/components/Icon/components/Layout.d.ts +1 -1
  165. package/dist/components/Icon/components/LayoutBoth.d.ts +1 -1
  166. package/dist/components/Icon/components/LayoutFirst.d.ts +1 -1
  167. package/dist/components/Icon/components/LayoutLast.d.ts +1 -1
  168. package/dist/components/Icon/components/LayoutNone.d.ts +1 -1
  169. package/dist/components/Icon/components/LedgerCard.d.ts +1 -1
  170. package/dist/components/Icon/components/LedgerCardCustomerReminder.d.ts +1 -1
  171. package/dist/components/Icon/components/LedgerCardManualCustomerInvoice.d.ts +1 -1
  172. package/dist/components/Icon/components/LedgerCardObsoleteStock.d.ts +1 -1
  173. package/dist/components/Icon/components/LedgerCardOpeningEntry.d.ts +1 -1
  174. package/dist/components/Icon/components/LedgerCardReservedEntry.d.ts +1 -1
  175. package/dist/components/Icon/components/LedgerCardShrinkagePilferage.d.ts +1 -1
  176. package/dist/components/Icon/components/LedgerCardStockAdjustment.d.ts +1 -1
  177. package/dist/components/Icon/components/LedgerCardTransferredOpeningEntry.d.ts +1 -1
  178. package/dist/components/Icon/components/Lightbulb.d.ts +1 -1
  179. package/dist/components/Icon/components/Line.d.ts +1 -1
  180. package/dist/components/Icon/components/LinkExternal.d.ts +1 -1
  181. package/dist/components/Icon/components/List.d.ts +1 -1
  182. package/dist/components/Icon/components/ListBulleted.d.ts +1 -1
  183. package/dist/components/Icon/components/ListSearch.d.ts +1 -1
  184. package/dist/components/Icon/components/Location.d.ts +1 -1
  185. package/dist/components/Icon/components/Lock.d.ts +1 -1
  186. package/dist/components/Icon/components/LockOpen.d.ts +1 -1
  187. package/dist/components/Icon/components/Log.d.ts +1 -1
  188. package/dist/components/Icon/components/LogOut.d.ts +1 -1
  189. package/dist/components/Icon/components/Market.d.ts +1 -1
  190. package/dist/components/Icon/components/MastercardOs.d.ts +1 -1
  191. package/dist/components/Icon/components/MatchAmount.d.ts +1 -1
  192. package/dist/components/Icon/components/MatchEntries.d.ts +1 -1
  193. package/dist/components/Icon/components/Menu.d.ts +1 -1
  194. package/dist/components/Icon/components/Mileage.d.ts +1 -1
  195. package/dist/components/Icon/components/ModalResize.d.ts +1 -1
  196. package/dist/components/Icon/components/ModalShrink.d.ts +1 -1
  197. package/dist/components/Icon/components/More.d.ts +1 -1
  198. package/dist/components/Icon/components/MoreSolid.d.ts +1 -1
  199. package/dist/components/Icon/components/Move.d.ts +1 -1
  200. package/dist/components/Icon/components/NavigationList.d.ts +1 -1
  201. package/dist/components/Icon/components/Note.d.ts +1 -1
  202. package/dist/components/Icon/components/NoteFollowUp.d.ts +1 -1
  203. package/dist/components/Icon/components/NoteRead.d.ts +1 -1
  204. package/dist/components/Icon/components/NovemberFirst.d.ts +1 -1
  205. package/dist/components/Icon/components/Numbers.d.ts +1 -1
  206. package/dist/components/Icon/components/PartnerApi.d.ts +1 -1
  207. package/dist/components/Icon/components/PaymentPaid.d.ts +1 -1
  208. package/dist/components/Icon/components/PaymentUnpaid.d.ts +1 -1
  209. package/dist/components/Icon/components/Period.d.ts +1 -1
  210. package/dist/components/Icon/components/Person.d.ts +1 -1
  211. package/dist/components/Icon/components/PersonChange.d.ts +1 -1
  212. package/dist/components/Icon/components/PersonMinus.d.ts +1 -1
  213. package/dist/components/Icon/components/PersonPlus.d.ts +1 -1
  214. package/dist/components/Icon/components/PersonSolid.d.ts +1 -1
  215. package/dist/components/Icon/components/PersonTick.d.ts +1 -1
  216. package/dist/components/Icon/components/Phone.d.ts +1 -1
  217. package/dist/components/Icon/components/PhoneSolid.d.ts +1 -1
  218. package/dist/components/Icon/components/Play.d.ts +1 -1
  219. package/dist/components/Icon/components/PlusMinus.d.ts +1 -1
  220. package/dist/components/Icon/components/Print.d.ts +1 -1
  221. package/dist/components/Icon/components/ProcessPayment.d.ts +1 -1
  222. package/dist/components/Icon/components/ProductLedgerCard.d.ts +1 -1
  223. package/dist/components/Icon/components/Profile.d.ts +1 -1
  224. package/dist/components/Icon/components/ProjectCards.d.ts +1 -1
  225. package/dist/components/Icon/components/Projects.d.ts +1 -1
  226. package/dist/components/Icon/components/QuestionMark.d.ts +1 -1
  227. package/dist/components/Icon/components/QuestionMarkBold.d.ts +1 -1
  228. package/dist/components/Icon/components/Quicklinks.d.ts +1 -1
  229. package/dist/components/Icon/components/RatingBankruptcy.d.ts +1 -1
  230. package/dist/components/Icon/components/RatingPaymentProblems.d.ts +1 -1
  231. package/dist/components/Icon/components/Reconciled.d.ts +1 -1
  232. package/dist/components/Icon/components/Refresh.d.ts +1 -1
  233. package/dist/components/Icon/components/Report.d.ts +1 -1
  234. package/dist/components/Icon/components/ReportSolid.d.ts +1 -1
  235. package/dist/components/Icon/components/Restore.d.ts +1 -1
  236. package/dist/components/Icon/components/RotateLeft.d.ts +1 -1
  237. package/dist/components/Icon/components/RotateRight.d.ts +1 -1
  238. package/dist/components/Icon/components/Sales.d.ts +1 -1
  239. package/dist/components/Icon/components/Search.d.ts +1 -1
  240. package/dist/components/Icon/components/SearchBold.d.ts +1 -1
  241. package/dist/components/Icon/components/Secure.d.ts +1 -1
  242. package/dist/components/Icon/components/SecureTick.d.ts +1 -1
  243. package/dist/components/Icon/components/Settings.d.ts +1 -1
  244. package/dist/components/Icon/components/SettingsSolid.d.ts +1 -1
  245. package/dist/components/Icon/components/Shortcuts.d.ts +1 -1
  246. package/dist/components/Icon/components/ShowAll.d.ts +1 -1
  247. package/dist/components/Icon/components/ShowLess.d.ts +1 -1
  248. package/dist/components/Icon/components/ShowMore.d.ts +1 -1
  249. package/dist/components/Icon/components/ShowTemplate.d.ts +1 -1
  250. package/dist/components/Icon/components/Sliders.d.ts +1 -1
  251. package/dist/components/Icon/components/Smartpay.d.ts +1 -1
  252. package/dist/components/Icon/components/SortBy.d.ts +1 -1
  253. package/dist/components/Icon/components/Star.d.ts +1 -1
  254. package/dist/components/Icon/components/StarSolid.d.ts +1 -1
  255. package/dist/components/Icon/components/Subscriptions.d.ts +1 -1
  256. package/dist/components/Icon/components/SystemEntries.d.ts +1 -1
  257. package/dist/components/Icon/components/Tag.d.ts +1 -1
  258. package/dist/components/Icon/components/TemplateOverride.d.ts +1 -1
  259. package/dist/components/Icon/components/Templates.d.ts +1 -1
  260. package/dist/components/Icon/components/ThumbBoth.d.ts +1 -1
  261. package/dist/components/Icon/components/ThumbDown.d.ts +1 -1
  262. package/dist/components/Icon/components/ThumbDownSolid.d.ts +1 -1
  263. package/dist/components/Icon/components/ThumbUp.d.ts +1 -1
  264. package/dist/components/Icon/components/ThumbUpSolid.d.ts +1 -1
  265. package/dist/components/Icon/components/Tick.d.ts +1 -1
  266. package/dist/components/Icon/components/TickBold.d.ts +1 -1
  267. package/dist/components/Icon/components/Time.d.ts +1 -1
  268. package/dist/components/Icon/components/Transfer.d.ts +1 -1
  269. package/dist/components/Icon/components/TransferCancel.d.ts +1 -1
  270. package/dist/components/Icon/components/TransferLocked.d.ts +1 -1
  271. package/dist/components/Icon/components/Undo.d.ts +1 -1
  272. package/dist/components/Icon/components/Undock.d.ts +1 -1
  273. package/dist/components/Icon/components/Unreconciled.d.ts +1 -1
  274. package/dist/components/Icon/components/Wallet.d.ts +1 -1
  275. package/dist/components/Icon/components/Warning.d.ts +1 -1
  276. package/dist/components/Icon/components/Webshop.d.ts +1 -1
  277. package/dist/components/Icon/components/Website.d.ts +1 -1
  278. package/dist/components/Icon/components/Workflow.d.ts +1 -1
  279. package/dist/components/Icon/components/WorkflowTemplateBasic.d.ts +1 -1
  280. package/dist/components/Icon/components/Zoom.d.ts +1 -1
  281. package/dist/components/IconButton/IconButton.d.ts +2 -2
  282. package/dist/components/Input/Input.d.ts +2 -2
  283. package/dist/components/Input/util.d.ts +7 -1
  284. package/dist/components/Layout/components/Sidebar.d.ts +14 -2
  285. package/dist/components/Layout/components/Top.d.ts +4 -4
  286. package/dist/components/List/List.d.ts +7 -7
  287. package/dist/components/List/components/Button.d.ts +1 -1
  288. package/dist/components/List/components/Collapsible.d.ts +1 -1
  289. package/dist/components/List/components/Group.d.ts +1 -1
  290. package/dist/components/List/components/Item.d.ts +1 -1
  291. package/dist/components/List/components/Link.d.ts +1 -1
  292. package/dist/components/List/components/Toggle.d.ts +2 -2
  293. package/dist/components/Listbox/Listbox.d.ts +2 -2
  294. package/dist/components/Listbox/ScrollableList.d.ts +1 -1
  295. package/dist/components/Listbox/util.d.ts +3 -3
  296. package/dist/components/Menu/components/Checkbox.d.ts +1 -1
  297. package/dist/components/Menu/components/Content.d.ts +2 -2
  298. package/dist/components/Menu/components/Item.d.ts +8 -8
  299. package/dist/components/Menu/components/Link.d.ts +1 -1
  300. package/dist/components/Menu/components/RadioGroup.d.ts +1 -1
  301. package/dist/components/Menu/components/SubMenu.d.ts +1 -1
  302. package/dist/components/Menu/components/Trigger.d.ts +1 -1
  303. package/dist/components/Navigation2/components/Group.d.ts +1 -1
  304. package/dist/components/Popover/Popover.d.ts +1 -1
  305. package/dist/components/Report/Report.d.ts +3 -1
  306. package/dist/components/ScrollArea/ScrollArea.d.ts +2 -2
  307. package/dist/components/SearchInput/SearchInput.d.ts +1 -1
  308. package/dist/components/Select/Select.d.ts +1 -1
  309. package/dist/components/Select2/components/All.d.ts +2 -2
  310. package/dist/components/Select2/components/Collection.d.ts +1 -1
  311. package/dist/components/Select2/components/Create.d.ts +1 -1
  312. package/dist/components/Select2/components/Edit.d.ts +2 -2
  313. package/dist/components/Select2/components/Group.d.ts +1 -1
  314. package/dist/components/Select2/components/Option.d.ts +1 -1
  315. package/dist/components/Select2/components/Search.d.ts +3 -3
  316. package/dist/components/Select2/components/Trigger.d.ts +1 -1
  317. package/dist/components/Select2/hooks/useChildren.d.ts +2 -2
  318. package/dist/components/Shortcut/Shortcut.d.ts +1 -1
  319. package/dist/components/Table3/Table3.d.ts +3 -4
  320. package/dist/components/Table3/components/Columns/Cell/Cell.d.ts +2 -2
  321. package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.d.ts +1 -1
  322. package/dist/components/Table3/components/Columns/Cell/EditingControlCell.d.ts +2 -2
  323. package/dist/components/Table3/components/Columns/Internal/EditingActionsMenu.d.ts +2 -2
  324. package/dist/components/Table3/components/Editing/Alert.d.ts +1 -1
  325. package/dist/components/Table3/components/Editing/DiscardChangesConfirmationDialog.d.ts +2 -2
  326. package/dist/components/Table3/components/Row/Editing/CreateNewRow.d.ts +1 -1
  327. package/dist/components/Table3/components/Row/Editing/SaveStatus.d.ts +2 -2
  328. package/dist/components/Table3/components/Row/Editing/TemporaryRow.d.ts +1 -1
  329. package/dist/components/Table3/components/Row/Row.d.ts +2 -2
  330. package/dist/components/Table3/components/Toolbar/Editing/Editing.d.ts +1 -1
  331. package/dist/components/Tag/Tag.d.ts +2 -2
  332. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  333. package/dist/components/Tour/Tour.d.ts +1 -1
  334. package/dist/components/Truncate/Truncate.d.ts +1 -1
  335. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -1
  336. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js.map +1 -1
  337. package/dist/esm/packages/taco/src/charts/components/Legend.js.map +1 -1
  338. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +9 -6
  339. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  340. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  341. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  342. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  343. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +1 -1
  344. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  345. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  346. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  347. package/dist/esm/packages/taco/src/components/Layout/components/Top.js +2 -2
  348. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  349. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  350. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  351. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  352. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  353. package/dist/esm/packages/taco/src/components/Report/Report.js +2 -3
  354. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  355. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +4 -4
  356. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  357. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  358. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  359. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +0 -2
  360. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  361. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  362. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  363. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  364. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  365. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  366. package/dist/esm/packages/taco/src/components/Table3/Table3.js +1 -3
  367. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  368. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  369. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +4 -2
  370. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  371. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +4 -1
  372. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  373. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  374. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  375. package/dist/esm/packages/taco/src/components/Tour/Tour.js +1 -1
  376. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  377. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  378. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js +2 -0
  379. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -1
  380. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +4 -4
  381. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  382. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +2 -2
  383. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  384. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  385. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  386. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +6 -14
  387. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  388. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  389. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  390. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  391. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  392. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  393. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +12 -45
  394. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  395. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  396. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
  397. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +3 -3
  398. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
  399. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  400. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  401. package/dist/esm/packages/taco/src/utils/dom.js +3 -2
  402. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  403. package/dist/primitives/BubbleSelect.d.ts +1 -1
  404. package/dist/primitives/Sortable/components/Container.d.ts +2 -2
  405. package/dist/primitives/Sortable/components/Item.d.ts +2 -1
  406. package/dist/primitives/Sortable/components/List.d.ts +1 -1
  407. package/dist/primitives/Table/Core/Table.d.ts +2 -2
  408. package/dist/primitives/Table/Core/components/Body/Body.d.ts +1 -1
  409. package/dist/primitives/Table/Core/components/Body/EmptyStateBody.d.ts +1 -1
  410. package/dist/primitives/Table/Core/components/Body/util.d.ts +4 -4
  411. package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.d.ts +2 -2
  412. package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.d.ts +2 -2
  413. package/dist/primitives/Table/Core/components/Columns/Cell/Cell.d.ts +1 -1
  414. package/dist/primitives/Table/Core/components/Columns/Internal/Actions.d.ts +2 -2
  415. package/dist/primitives/Table/Core/components/Footer/Footer.d.ts +2 -2
  416. package/dist/primitives/Table/Core/components/Footer/Summary.d.ts +2 -2
  417. package/dist/primitives/Table/Core/components/Header/Header.d.ts +1 -1
  418. package/dist/primitives/Table/Core/components/Header/components/Goto.d.ts +2 -2
  419. package/dist/primitives/Table/Core/components/Header/components/Menu.d.ts +1 -1
  420. package/dist/primitives/Table/Core/components/Header/components/Resizer.d.ts +2 -2
  421. package/dist/primitives/Table/Core/components/Header/components/SortIndicator.d.ts +3 -3
  422. package/dist/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.d.ts +2 -2
  423. package/dist/primitives/Table/Core/components/Row/Row.d.ts +1 -1
  424. package/dist/primitives/Table/Core/components/Toolbar/Toolbar.d.ts +1 -1
  425. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/Filters.d.ts +2 -2
  426. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.d.ts +2 -2
  427. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +2 -2
  428. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +1 -1
  429. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.d.ts +2 -2
  430. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.d.ts +2 -2
  431. package/dist/primitives/Table/Core/components/Toolbar/components/Print/Print.d.ts +1 -1
  432. package/dist/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.d.ts +2 -2
  433. package/dist/primitives/Table/Core/components/Toolbar/components/Search/Search.d.ts +1 -1
  434. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.d.ts +2 -2
  435. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/Settings.d.ts +2 -2
  436. package/dist/primitives/Table/Core/types.d.ts +1 -1
  437. package/dist/taco.cjs.development.js +60 -95
  438. package/dist/taco.cjs.development.js.map +1 -1
  439. package/dist/taco.cjs.production.min.js +1 -1
  440. package/dist/taco.cjs.production.min.js.map +1 -1
  441. package/dist/utils/dom.d.ts +2 -2
  442. package/package.json +26 -27
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Select2OptionProps } from './Option';
3
- export declare const Trigger: React.ForwardRefExoticComponent<Pick<React.HTMLAttributes<HTMLButtonElement>, "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
3
+ export declare const Trigger: React.ForwardRefExoticComponent<Pick<React.HTMLAttributes<HTMLButtonElement>, "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
4
4
  emptyValue?: string | number | boolean | null | undefined;
5
5
  placeholder?: string | undefined;
6
6
  children: React.ReactElement<Select2OptionProps>[];
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Select2OptionProps } from '../components/Option';
3
3
  import { Select2GroupProps } from '../Select2';
4
4
  import { Select2Children, Select2OptionValue, Select2Value } from '../types';
5
- export declare const isGroup: (child: React.ReactElement<Select2OptionProps> | React.ReactElement<Select2GroupProps>) => child is React.ReactElement<Select2GroupProps, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
5
+ export declare const isGroup: (child: React.ReactElement<Select2OptionProps> | React.ReactElement<Select2GroupProps>) => child is React.ReactElement<Select2GroupProps, string | ((props: any, deprecatedLegacyContext?: any) => React.ReactElement<any, any> | null) | (new (props: any, deprecatedLegacyContext?: any) => React.Component<any, any, any>)>;
6
6
  export declare type useChildrenArgs = {
7
7
  children: Select2Children;
8
8
  emptyValue?: Select2OptionValue;
@@ -12,7 +12,7 @@ export declare type useChildrenArgs = {
12
12
  value?: Select2Value;
13
13
  };
14
14
  export declare const useChildren: ({ children: initialChildren, emptyValue, multiple, open, setValue, value }: useChildrenArgs) => {
15
- flattenedChildren: React.ReactElement<Select2OptionProps, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>[];
15
+ flattenedChildren: React.ReactElement<Select2OptionProps, string | ((props: any, deprecatedLegacyContext?: any) => React.ReactElement<any, any> | null) | (new (props: any, deprecatedLegacyContext?: any) => React.Component<any, any, any>)>[];
16
16
  filteredChildren: Select2Children;
17
17
  searchQuery: string;
18
18
  setSearchQuery: React.Dispatch<React.SetStateAction<string>>;
@@ -3,4 +3,4 @@ import { KeyDownHandlerOptions } from '../../utils/keyboard';
3
3
  export declare type ShortcutProps = Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> & {
4
4
  keys: string | KeyDownHandlerOptions;
5
5
  };
6
- export declare const Shortcut: ({ keys, ...props }: ShortcutProps) => JSX.Element;
6
+ export declare const Shortcut: ({ keys, ...props }: ShortcutProps) => React.JSX.Element;
@@ -1,10 +1,9 @@
1
1
  import React from 'react';
2
2
  import { Table3Props, Table3Ref, Table3ColumnProps, Table3GroupProps } from './types';
3
3
  import './style.css';
4
- declare function Column<TType = unknown>(_: Table3ColumnProps<TType>): null;
5
- declare namespace Column {
6
- var displayName: string;
7
- }
4
+ declare const Column: React.FC<Table3ColumnProps<unknown>> & {
5
+ <TType = unknown>(_: Table3ColumnProps<TType>): null;
6
+ };
8
7
  declare function Group(_: Table3GroupProps): null;
9
8
  declare namespace Group {
10
9
  var displayName: string;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TableCellRendererProps } from '../../../../../primitives/Table/Core/types';
3
- export declare function Cell<TType = unknown>(props: TableCellRendererProps<TType>): JSX.Element;
3
+ export declare function Cell<TType = unknown>(props: TableCellRendererProps<TType>): React.JSX.Element;
@@ -5,5 +5,5 @@ declare type TableRowMoveIndicatorProps<TType = unknown> = {
5
5
  cellRef: React.RefObject<HTMLTableCellElement>;
6
6
  isActiveRow: boolean;
7
7
  };
8
- export declare function RowMoveIndicator<TType = unknown>(props: TableRowMoveIndicatorProps<TType>): JSX.Element | null;
8
+ export declare function RowMoveIndicator<TType = unknown>(props: TableRowMoveIndicatorProps<TType>): React.JSX.Element | null;
9
9
  export {};
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TableCellRendererProps } from '../../../../../primitives/Table/Core/types';
3
- export declare function EditingControlCell<TType = unknown>(props: TableCellRendererProps<TType>): JSX.Element;
3
+ export declare function EditingControlCell<TType = unknown>(props: TableCellRendererProps<TType>): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  declare type EditingActionsMenuProps = {
3
3
  hasChanges: boolean;
4
4
  hasErrors: boolean;
@@ -6,5 +6,5 @@ declare type EditingActionsMenuProps = {
6
6
  onEditingSave: () => Promise<void>;
7
7
  isLastRow: boolean;
8
8
  };
9
- export declare function EditingActionsMenu(props: EditingActionsMenuProps): JSX.Element;
9
+ export declare function EditingActionsMenu(props: EditingActionsMenuProps): React.JSX.Element;
10
10
  export {};
@@ -8,5 +8,5 @@ declare type AlertProps<TType = unknown> = Omit<BaseAlertProps, 'children'> & {
8
8
  table: ReactTable<TType>;
9
9
  tableRef: React.RefObject<TableRef>;
10
10
  };
11
- export declare function Alert<TType = unknown>(props: AlertProps<TType>): JSX.Element;
11
+ export declare function Alert<TType = unknown>(props: AlertProps<TType>): React.JSX.Element;
12
12
  export {};
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { DialogProps } from '../../../Dialog/Dialog';
3
3
  declare type DiscardChangesConfirmationDialogProps = Partial<DialogProps> & {
4
4
  onDiscard: () => void;
5
5
  };
6
- export declare function DiscardChangesConfirmationDialog(props: DiscardChangesConfirmationDialogProps): JSX.Element;
6
+ export declare function DiscardChangesConfirmationDialog(props: DiscardChangesConfirmationDialogProps): React.JSX.Element;
7
7
  export {};
@@ -8,5 +8,5 @@ declare type CreateNewRowProps<TType = unknown> = {
8
8
  table: ReactTable<TType>;
9
9
  tableMeta: ReactTableMeta<TType>;
10
10
  };
11
- export declare function CreateNewRow<TType = unknown>(props: CreateNewRowProps<TType>): JSX.Element;
11
+ export declare function CreateNewRow<TType = unknown>(props: CreateNewRowProps<TType>): React.JSX.Element;
12
12
  export {};
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { Table as ReactTable } from '@tanstack/react-table';
3
3
  declare type SaveStatusProps<TType = unknown> = {
4
4
  rowId: string;
5
5
  table: ReactTable<TType>;
6
6
  };
7
- export declare function SaveStatus<TType = unknown>(props: SaveStatusProps<TType>): JSX.Element;
7
+ export declare function SaveStatus<TType = unknown>(props: SaveStatusProps<TType>): React.JSX.Element;
8
8
  export {};
@@ -8,5 +8,5 @@ declare type TemporaryRowProps<TType = unknown> = {
8
8
  tableMeta: ReactTableMeta<TType>;
9
9
  tableRef: React.RefObject<TableRef>;
10
10
  };
11
- export declare function TemporaryRow<TType = unknown>(props: TemporaryRowProps<TType>): JSX.Element;
11
+ export declare function TemporaryRow<TType = unknown>(props: TemporaryRowProps<TType>): React.JSX.Element;
12
12
  export {};
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { DisplayRowProps } from '../../../../primitives/Table/Core/components/Row/BuiltIns/DisplayRow';
3
- export declare function Row<TType = unknown>(props: DisplayRowProps<TType>): JSX.Element;
3
+ export declare function Row<TType = unknown>(props: DisplayRowProps<TType>): React.JSX.Element;
@@ -4,5 +4,5 @@ declare type EditingProps<TType = unknown> = React.HTMLAttributes<HTMLButtonElem
4
4
  scrollToIndex: any;
5
5
  table: ReactTable<TType>;
6
6
  };
7
- export declare function Editing<TType = unknown>(props: EditingProps<TType>): JSX.Element;
7
+ export declare function Editing<TType = unknown>(props: EditingProps<TType>): React.JSX.Element;
8
8
  export {};
@@ -9,11 +9,11 @@ export declare type TagProps = Omit<React.HTMLAttributes<HTMLSpanElement>, 'chil
9
9
  readOnly?: boolean;
10
10
  onDelete?: (event: React.MouseEvent<SVGSVGElement>) => void;
11
11
  };
12
- export declare const Tag: React.ForwardRefExoticComponent<Pick<React.HTMLAttributes<HTMLSpanElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
12
+ export declare const Tag: React.ForwardRefExoticComponent<Pick<React.HTMLAttributes<HTMLSpanElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
13
13
  children: string;
14
14
  color?: "green" | "yellow" | "red" | "blue" | "purple" | "brown" | "pink" | "orange" | "grey" | "transparent" | undefined;
15
15
  disabled?: boolean | undefined;
16
- icon?: "id" | React.ReactElement<IconProps, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | "account-preview" | "accounting-year-cancel" | "accounting-year" | "accounting" | "ai-chat-solid" | "ai-stars" | "arrow-bottom" | "arrow-down" | "arrow-end" | "arrow-left" | "arrow-right" | "arrow-start" | "arrow-top" | "arrow-up" | "attach-auto" | "attach-cancel" | "attach-warning" | "attach" | "autopay-paused" | "autopay" | "autotext-insert" | "autotext" | "basic-tabs" | "basic" | "bell-solid" | "book" | "booking" | "budget" | "calendar" | "cash-account" | "cash-reports" | "chart-area" | "chart-bar" | "chart-line" | "chart-pie" | "chart-table" | "chat-solid" | "chat" | "chevron-down-double" | "chevron-down-solid" | "chevron-down" | "chevron-left-double" | "chevron-left-solid" | "chevron-left" | "chevron-right-double" | "chevron-right-solid" | "chevron-right" | "chevron-up-double" | "chevron-up-solid" | "chevron-up" | "circle-close" | "circle-information" | "circle-minus" | "circle-plus" | "circle-questionmark" | "circle-tick" | "circle-warning" | "clamp-open" | "clamp" | "close" | "column-freeze" | "column-unfreeze" | "columns" | "connection-enable" | "connection-revoke" | "contacts" | "copy" | "courses" | "credit" | "delete-permanently" | "delete" | "depecriate" | "developer" | "distribution-template" | "document-approve" | "document-create-entry" | "document-cut" | "document-error" | "document-isolate-page" | "document-merge" | "document-move" | "document-preview" | "document-received" | "document-rejected-request" | "document-signed-solid" | "document-signed" | "document-split" | "document-time" | "document" | "download" | "drag" | "e-copedia" | "edit-simple" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "entries-on-account" | "entries-open" | "entries-warning" | "entry-type-customer-invoice" | "entry-type-customer-payment" | "entry-type-journal-entry" | "entry-type-manual-customer-invoice" | "entry-type-supplier-invoice" | "entry-type-supplier-payment" | "envelope-approved" | "envelope-solid" | "envelope" | "expand-view" | "expenses" | "experiment" | "export-to-excel" | "export-to-pdf" | "export" | "eye-off" | "eye-on" | "filter-solid" | "filter" | "font-size" | "graph-solid" | "hash" | "height-extra-tall" | "height-medium" | "height-short" | "height-tall" | "house-solid" | "house" | "images" | "import" | "inbox-einvoicing" | "inbox-scanning" | "inbox-smart" | "inbox" | "info" | "inventory-matrix" | "inventory" | "journal-pro" | "layout-both" | "layout-first" | "layout-last" | "layout-none" | "layout" | "ledger-card-customer-reminder" | "ledger-card-manual-customer-invoice" | "ledger-card-obsolete-stock" | "ledger-card-opening-entry" | "ledger-card-reserved-entry" | "ledger-card-shrinkage-pilferage" | "ledger-card-stock-adjustment" | "ledger-card-transferred-opening-entry" | "ledger-card" | "lightbulb" | "line" | "link-external" | "list-bulleted" | "list-search" | "list" | "location" | "lock-open" | "lock" | "log-out" | "log" | "market" | "mastercard-os" | "match-amount" | "match-entries" | "menu" | "mileage" | "modal-resize" | "modal-shrink" | "more-solid" | "more" | "move" | "navigation-list" | "note-follow-up" | "note-read" | "note" | "november-first" | "numbers" | "partner-api" | "payment-paid" | "payment-unpaid" | "period" | "person-change" | "person-minus" | "person-plus" | "person-solid" | "person-tick" | "person" | "phone-solid" | "phone" | "play" | "plus-minus" | "print" | "process-payment" | "product-ledger-card" | "profile" | "project-cards" | "projects" | "question-mark-bold" | "question-mark" | "quicklinks" | "rating-bankruptcy" | "rating-payment-problems" | "reconciled" | "refresh" | "report-solid" | "report" | "restore" | "rotate-left" | "rotate-right" | "sales" | "search-bold" | "search" | "secure-tick" | "secure" | "settings-solid" | "settings" | "shortcuts" | "show-all" | "show-less" | "show-more" | "show-template" | "sliders" | "smartpay" | "sort-by" | "star-solid" | "star" | "subscriptions" | "system-entries" | "tag" | "template-override" | "templates" | "thumb-both" | "thumb-down-solid" | "thumb-down" | "thumb-up-solid" | "thumb-up" | "tick-bold" | "tick" | "time" | "transfer-cancel" | "transfer-locked" | "transfer" | "undo" | "undock" | "unreconciled" | "wallet" | "warning" | "webshop" | "website" | "workflow-template-basic" | "workflow" | "zoom" | undefined;
16
+ icon?: "id" | React.ReactElement<IconProps, string | ((props: any, deprecatedLegacyContext?: any) => React.ReactElement<any, any> | null) | (new (props: any, deprecatedLegacyContext?: any) => React.Component<any, any, any>)> | "account-preview" | "accounting-year-cancel" | "accounting-year" | "accounting" | "ai-chat-solid" | "ai-stars" | "arrow-bottom" | "arrow-down" | "arrow-end" | "arrow-left" | "arrow-right" | "arrow-start" | "arrow-top" | "arrow-up" | "attach-auto" | "attach-cancel" | "attach-warning" | "attach" | "autopay-paused" | "autopay" | "autotext-insert" | "autotext" | "basic-tabs" | "basic" | "bell-solid" | "book" | "booking" | "budget" | "calendar" | "cash-account" | "cash-reports" | "chart-area" | "chart-bar" | "chart-line" | "chart-pie" | "chart-table" | "chat-solid" | "chat" | "chevron-down-double" | "chevron-down-solid" | "chevron-down" | "chevron-left-double" | "chevron-left-solid" | "chevron-left" | "chevron-right-double" | "chevron-right-solid" | "chevron-right" | "chevron-up-double" | "chevron-up-solid" | "chevron-up" | "circle-close" | "circle-information" | "circle-minus" | "circle-plus" | "circle-questionmark" | "circle-tick" | "circle-warning" | "clamp-open" | "clamp" | "close" | "column-freeze" | "column-unfreeze" | "columns" | "connection-enable" | "connection-revoke" | "contacts" | "copy" | "courses" | "credit" | "delete-permanently" | "delete" | "depecriate" | "developer" | "distribution-template" | "document-approve" | "document-create-entry" | "document-cut" | "document-error" | "document-isolate-page" | "document-merge" | "document-move" | "document-preview" | "document-received" | "document-rejected-request" | "document-signed-solid" | "document-signed" | "document-split" | "document-time" | "document" | "download" | "drag" | "e-copedia" | "edit-simple" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "entries-on-account" | "entries-open" | "entries-warning" | "entry-type-customer-invoice" | "entry-type-customer-payment" | "entry-type-journal-entry" | "entry-type-manual-customer-invoice" | "entry-type-supplier-invoice" | "entry-type-supplier-payment" | "envelope-approved" | "envelope-solid" | "envelope" | "expand-view" | "expenses" | "experiment" | "export-to-excel" | "export-to-pdf" | "export" | "eye-off" | "eye-on" | "filter-solid" | "filter" | "font-size" | "graph-solid" | "hash" | "height-extra-tall" | "height-medium" | "height-short" | "height-tall" | "house-solid" | "house" | "images" | "import" | "inbox-einvoicing" | "inbox-scanning" | "inbox-smart" | "inbox" | "info" | "inventory-matrix" | "inventory" | "journal-pro" | "layout-both" | "layout-first" | "layout-last" | "layout-none" | "layout" | "ledger-card-customer-reminder" | "ledger-card-manual-customer-invoice" | "ledger-card-obsolete-stock" | "ledger-card-opening-entry" | "ledger-card-reserved-entry" | "ledger-card-shrinkage-pilferage" | "ledger-card-stock-adjustment" | "ledger-card-transferred-opening-entry" | "ledger-card" | "lightbulb" | "line" | "link-external" | "list-bulleted" | "list-search" | "list" | "location" | "lock-open" | "lock" | "log-out" | "log" | "market" | "mastercard-os" | "match-amount" | "match-entries" | "menu" | "mileage" | "modal-resize" | "modal-shrink" | "more-solid" | "more" | "move" | "navigation-list" | "note-follow-up" | "note-read" | "note" | "november-first" | "numbers" | "partner-api" | "payment-paid" | "payment-unpaid" | "period" | "person-change" | "person-minus" | "person-plus" | "person-solid" | "person-tick" | "person" | "phone-solid" | "phone" | "play" | "plus-minus" | "print" | "process-payment" | "product-ledger-card" | "profile" | "project-cards" | "projects" | "question-mark-bold" | "question-mark" | "quicklinks" | "rating-bankruptcy" | "rating-payment-problems" | "reconciled" | "refresh" | "report-solid" | "report" | "restore" | "rotate-left" | "rotate-right" | "sales" | "search-bold" | "search" | "secure-tick" | "secure" | "settings-solid" | "settings" | "shortcuts" | "show-all" | "show-less" | "show-more" | "show-template" | "sliders" | "smartpay" | "sort-by" | "star-solid" | "star" | "subscriptions" | "system-entries" | "tag" | "template-override" | "templates" | "thumb-both" | "thumb-down-solid" | "thumb-down" | "thumb-up-solid" | "thumb-up" | "tick-bold" | "tick" | "time" | "transfer-cancel" | "transfer-locked" | "transfer" | "undo" | "undock" | "unreconciled" | "wallet" | "warning" | "webshop" | "website" | "workflow-template-basic" | "workflow" | "zoom" | undefined;
17
17
  readOnly?: boolean | undefined;
18
18
  onDelete?: ((event: React.MouseEvent<SVGSVGElement>) => void) | undefined;
19
19
  } & React.RefAttributes<HTMLSpanElement>>;
@@ -12,7 +12,7 @@ export declare type TooltipProps = Omit<React.HTMLAttributes<HTMLDivElement>, 't
12
12
  */
13
13
  placement?: 'top' | 'right' | 'bottom' | 'left';
14
14
  };
15
- export declare const Tooltip: React.ForwardRefExoticComponent<Pick<React.HTMLAttributes<HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
15
+ export declare const Tooltip: React.ForwardRefExoticComponent<Pick<React.HTMLAttributes<HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
16
16
  /** The element which activates the tooltip when hovered. Should be a single React/HTML element */
17
17
  children: React.ReactElement | any;
18
18
  /** Use this value to hide tooltip conditionally */
@@ -67,6 +67,6 @@ export declare type TourProps = {
67
67
  scrollOffset?: number;
68
68
  };
69
69
  export declare const Tour: {
70
- (props: TourProps): JSX.Element;
70
+ (props: TourProps): React.JSX.Element;
71
71
  Step: (_props: TourStepProps) => null;
72
72
  };
@@ -3,4 +3,4 @@ export declare type TruncateProps = {
3
3
  children: React.ReactElement;
4
4
  tooltip: string;
5
5
  };
6
- export declare const Truncate: ({ children, tooltip }: TruncateProps) => JSX.Element;
6
+ export declare const Truncate: ({ children, tooltip }: TruncateProps) => React.JSX.Element;
@@ -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,C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ourcesContent":["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: DonutChartSegmentProps) => 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,CAA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EA,YAAY;IAC1Bb,SAAS,EAAEA;IACb,CACL,CACC;AAEd;AAEAF,UAAU,CAACF,OAAO,GAAGA,OAAO;;;;"}
@@ -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"],"mapp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;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: string) => (\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;IACvF,MAAMK,SAAS,GAAGP,OAAO,GAAGL,oBAAoB,GAAGX,WAAW,CAACsB,QAAQ,CAACL,QAAQ,CAACC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Y,QAAQ,CAACE,KAAK,CAAC,GAAGF,QAAQ,CAACE,KAAK,CACpD,CACL,CACP,CACN,CACA;GAEZ;EAED,MAAMkB,UAAU,GAAIC,cAAsB,kBACtCd,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 +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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,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: string) => (\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,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,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;;;;"}
@@ -37,22 +37,23 @@ const useCombobox = ({
37
37
  const data = useMemo(() => shouldFilterData ? filterData(flattenedData, inputValue) : flattenedData, [shouldFilterData, inputValue, flattenedData]);
38
38
  // listbox/select change value _with_ the index, but combobox changes on select of an index (click/enter), so we need state
39
39
  const [currentIndex, setCurrentIndex] = useState(inputValue !== undefined ? getIndexFromValue(data, inputValue) : undefined);
40
- const setInputValueByIndex = index => {
40
+ const setInputValueByIndex = (index, event) => {
41
41
  if (index !== undefined) {
42
42
  const option = data[index];
43
43
  if (option && !option.disabled) {
44
- setInputValueByRef(inputRef.current, option.value, 'focusout');
44
+ const eventType = event !== null && event !== void 0 ? event : 'focusout';
45
+ setInputValueByRef(inputRef.current, option.value, eventType);
45
46
  }
46
47
  }
47
48
  };
48
- const setCurrentValue = index => {
49
+ const setCurrentValue = (index, event) => {
49
50
  if (index === undefined) {
50
51
  return;
51
52
  }
52
53
  const option = data[index];
53
54
  // if the selected option is not already selected, trigger blur event
54
55
  if (option.value !== value) {
55
- setInputValueByIndex(index);
56
+ setInputValueByIndex(index, event);
56
57
  } else {
57
58
  // if the selected option is already selected, refill input with its value
58
59
  setInputValue(convertToInputValue(value));
@@ -148,7 +149,8 @@ const useCombobox = ({
148
149
  }
149
150
  case 'Tab':
150
151
  {
151
- setCurrentValue(currentIndex);
152
+ // default focusout will trigger onBlur and we don't want to trigger it twice
153
+ setCurrentValue(currentIndex, 'change');
152
154
  setOpen(false);
153
155
  return;
154
156
  }
@@ -163,7 +165,8 @@ const useCombobox = ({
163
165
  }
164
166
  }
165
167
  if (open) {
166
- setCurrentValue(currentIndex);
168
+ // we need to focusout to trigger onBlur as we are not actually blurring the input
169
+ setCurrentValue(currentIndex, 'focusout');
167
170
  setOpen(false);
168
171
  }
169
172
  return;