@economic/taco 1.9.2 → 1.10.1

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 (578) hide show
  1. package/dist/components/Tag/Tag.d.ts +19 -0
  2. package/dist/components/Tag/Tag.stories.d.ts +9 -0
  3. package/dist/esm/components/Accordion/Accordion.js +10 -10
  4. package/dist/esm/components/Accordion/Accordion.js.map +1 -1
  5. package/dist/esm/components/Backdrop/Backdrop.js +1 -1
  6. package/dist/esm/components/Backdrop/Backdrop.js.map +1 -1
  7. package/dist/esm/components/Badge/Badge.js +2 -2
  8. package/dist/esm/components/Badge/Badge.js.map +1 -1
  9. package/dist/esm/components/Banner/Banner.js +2 -2
  10. package/dist/esm/components/Banner/Banner.js.map +1 -1
  11. package/dist/esm/components/Banner/util.js +4 -4
  12. package/dist/esm/components/Banner/util.js.map +1 -1
  13. package/dist/esm/components/Button/Button.js +2 -2
  14. package/dist/esm/components/Button/Button.js.map +1 -1
  15. package/dist/esm/components/Button/util.js +2 -2
  16. package/dist/esm/components/Button/util.js.map +1 -1
  17. package/dist/esm/components/Calendar/Calendar.js +11 -11
  18. package/dist/esm/components/Calendar/Calendar.js.map +1 -1
  19. package/dist/esm/components/Card/Card.js +6 -5
  20. package/dist/esm/components/Card/Card.js.map +1 -1
  21. package/dist/esm/components/Checkbox/Checkbox.js +4 -4
  22. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  23. package/dist/esm/components/Combobox/Combobox.js +8 -8
  24. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  25. package/dist/esm/components/Datepicker/Datepicker.js +11 -11
  26. package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
  27. package/dist/esm/components/Dialog/Dialog.js +3 -3
  28. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  29. package/dist/esm/components/Dialog/components/Content.js +11 -11
  30. package/dist/esm/components/Dialog/components/Content.js.map +1 -1
  31. package/dist/esm/components/Dialog/components/Drawer.js +1 -1
  32. package/dist/esm/components/Dialog/components/Drawer.js.map +1 -1
  33. package/dist/esm/components/Dialog/components/Extra.js +1 -1
  34. package/dist/esm/components/Dialog/components/Extra.js.map +1 -1
  35. package/dist/esm/components/Dialog/components/Trigger.js +1 -1
  36. package/dist/esm/components/Dialog/components/Trigger.js.map +1 -1
  37. package/dist/esm/components/Field/Field.js +2 -2
  38. package/dist/esm/components/Field/Field.js.map +1 -1
  39. package/dist/esm/components/Form/Form.js +1 -1
  40. package/dist/esm/components/Form/Form.js.map +1 -1
  41. package/dist/esm/components/Group/Group.js +1 -1
  42. package/dist/esm/components/Group/Group.js.map +1 -1
  43. package/dist/esm/components/Hanger/Hanger.js +11 -11
  44. package/dist/esm/components/Hanger/Hanger.js.map +1 -1
  45. package/dist/esm/components/HoverCard/HoverCard.js +3 -3
  46. package/dist/esm/components/HoverCard/HoverCard.js.map +1 -1
  47. package/dist/esm/components/Icon/Icon.js +1 -1
  48. package/dist/esm/components/Icon/Icon.js.map +1 -1
  49. package/dist/esm/components/Icon/components/AccountPreview.js +2 -2
  50. package/dist/esm/components/Icon/components/AccountPreview.js.map +1 -1
  51. package/dist/esm/components/Icon/components/Accounting.js +2 -2
  52. package/dist/esm/components/Icon/components/Accounting.js.map +1 -1
  53. package/dist/esm/components/Icon/components/AccountingYear.js +2 -2
  54. package/dist/esm/components/Icon/components/AccountingYear.js.map +1 -1
  55. package/dist/esm/components/Icon/components/AccountingYearCancel.js +2 -2
  56. package/dist/esm/components/Icon/components/AccountingYearCancel.js.map +1 -1
  57. package/dist/esm/components/Icon/components/ArrowBottom.js +2 -2
  58. package/dist/esm/components/Icon/components/ArrowBottom.js.map +1 -1
  59. package/dist/esm/components/Icon/components/ArrowDown.js +2 -2
  60. package/dist/esm/components/Icon/components/ArrowDown.js.map +1 -1
  61. package/dist/esm/components/Icon/components/ArrowEnd.js +2 -2
  62. package/dist/esm/components/Icon/components/ArrowEnd.js.map +1 -1
  63. package/dist/esm/components/Icon/components/ArrowLeft.js +2 -2
  64. package/dist/esm/components/Icon/components/ArrowLeft.js.map +1 -1
  65. package/dist/esm/components/Icon/components/ArrowRight.js +2 -2
  66. package/dist/esm/components/Icon/components/ArrowRight.js.map +1 -1
  67. package/dist/esm/components/Icon/components/ArrowStart.js +2 -2
  68. package/dist/esm/components/Icon/components/ArrowStart.js.map +1 -1
  69. package/dist/esm/components/Icon/components/ArrowTop.js +2 -2
  70. package/dist/esm/components/Icon/components/ArrowTop.js.map +1 -1
  71. package/dist/esm/components/Icon/components/ArrowUp.js +2 -2
  72. package/dist/esm/components/Icon/components/ArrowUp.js.map +1 -1
  73. package/dist/esm/components/Icon/components/Attach.js +2 -2
  74. package/dist/esm/components/Icon/components/Attach.js.map +1 -1
  75. package/dist/esm/components/Icon/components/AttachAuto.js +2 -2
  76. package/dist/esm/components/Icon/components/AttachAuto.js.map +1 -1
  77. package/dist/esm/components/Icon/components/AttachCancel.js +2 -2
  78. package/dist/esm/components/Icon/components/AttachCancel.js.map +1 -1
  79. package/dist/esm/components/Icon/components/Autotext.js +2 -2
  80. package/dist/esm/components/Icon/components/Autotext.js.map +1 -1
  81. package/dist/esm/components/Icon/components/AutotextInsert.js +2 -2
  82. package/dist/esm/components/Icon/components/AutotextInsert.js.map +1 -1
  83. package/dist/esm/components/Icon/components/Basic.js +2 -2
  84. package/dist/esm/components/Icon/components/Basic.js.map +1 -1
  85. package/dist/esm/components/Icon/components/BasicTabs.js +2 -2
  86. package/dist/esm/components/Icon/components/BasicTabs.js.map +1 -1
  87. package/dist/esm/components/Icon/components/BellSolid.js +2 -2
  88. package/dist/esm/components/Icon/components/BellSolid.js.map +1 -1
  89. package/dist/esm/components/Icon/components/Book.js +2 -2
  90. package/dist/esm/components/Icon/components/Book.js.map +1 -1
  91. package/dist/esm/components/Icon/components/Booking.js +2 -2
  92. package/dist/esm/components/Icon/components/Booking.js.map +1 -1
  93. package/dist/esm/components/Icon/components/Budget.js +2 -2
  94. package/dist/esm/components/Icon/components/Budget.js.map +1 -1
  95. package/dist/esm/components/Icon/components/Calendar.js +2 -2
  96. package/dist/esm/components/Icon/components/Calendar.js.map +1 -1
  97. package/dist/esm/components/Icon/components/CashAccount.js +2 -2
  98. package/dist/esm/components/Icon/components/CashAccount.js.map +1 -1
  99. package/dist/esm/components/Icon/components/CashReports.js +2 -2
  100. package/dist/esm/components/Icon/components/CashReports.js.map +1 -1
  101. package/dist/esm/components/Icon/components/Chat.js +2 -2
  102. package/dist/esm/components/Icon/components/Chat.js.map +1 -1
  103. package/dist/esm/components/Icon/components/ChatSolid.js +2 -2
  104. package/dist/esm/components/Icon/components/ChatSolid.js.map +1 -1
  105. package/dist/esm/components/Icon/components/ChevronDown.js +2 -2
  106. package/dist/esm/components/Icon/components/ChevronDown.js.map +1 -1
  107. package/dist/esm/components/Icon/components/ChevronDownDouble.js +2 -2
  108. package/dist/esm/components/Icon/components/ChevronDownDouble.js.map +1 -1
  109. package/dist/esm/components/Icon/components/ChevronDownSolid.js +2 -2
  110. package/dist/esm/components/Icon/components/ChevronDownSolid.js.map +1 -1
  111. package/dist/esm/components/Icon/components/ChevronLeft.js +2 -2
  112. package/dist/esm/components/Icon/components/ChevronLeft.js.map +1 -1
  113. package/dist/esm/components/Icon/components/ChevronLeftDouble.js +2 -2
  114. package/dist/esm/components/Icon/components/ChevronLeftDouble.js.map +1 -1
  115. package/dist/esm/components/Icon/components/ChevronLeftSolid.js +2 -2
  116. package/dist/esm/components/Icon/components/ChevronLeftSolid.js.map +1 -1
  117. package/dist/esm/components/Icon/components/ChevronRight.js +2 -2
  118. package/dist/esm/components/Icon/components/ChevronRight.js.map +1 -1
  119. package/dist/esm/components/Icon/components/ChevronRightDouble.js +2 -2
  120. package/dist/esm/components/Icon/components/ChevronRightDouble.js.map +1 -1
  121. package/dist/esm/components/Icon/components/ChevronRightSolid.js +2 -2
  122. package/dist/esm/components/Icon/components/ChevronRightSolid.js.map +1 -1
  123. package/dist/esm/components/Icon/components/ChevronUp.js +2 -2
  124. package/dist/esm/components/Icon/components/ChevronUp.js.map +1 -1
  125. package/dist/esm/components/Icon/components/ChevronUpDouble.js +2 -2
  126. package/dist/esm/components/Icon/components/ChevronUpDouble.js.map +1 -1
  127. package/dist/esm/components/Icon/components/ChevronUpSolid.js +2 -2
  128. package/dist/esm/components/Icon/components/ChevronUpSolid.js.map +1 -1
  129. package/dist/esm/components/Icon/components/CircleClose.js +2 -2
  130. package/dist/esm/components/Icon/components/CircleClose.js.map +1 -1
  131. package/dist/esm/components/Icon/components/CircleMinus.js +2 -2
  132. package/dist/esm/components/Icon/components/CircleMinus.js.map +1 -1
  133. package/dist/esm/components/Icon/components/CirclePlus.js +2 -2
  134. package/dist/esm/components/Icon/components/CirclePlus.js.map +1 -1
  135. package/dist/esm/components/Icon/components/CircleTick.js +2 -2
  136. package/dist/esm/components/Icon/components/CircleTick.js.map +1 -1
  137. package/dist/esm/components/Icon/components/Clamp.js +2 -2
  138. package/dist/esm/components/Icon/components/Clamp.js.map +1 -1
  139. package/dist/esm/components/Icon/components/ClampOpen.js +2 -2
  140. package/dist/esm/components/Icon/components/ClampOpen.js.map +1 -1
  141. package/dist/esm/components/Icon/components/Close.js +2 -2
  142. package/dist/esm/components/Icon/components/Close.js.map +1 -1
  143. package/dist/esm/components/Icon/components/ConnectionEnable.js +2 -2
  144. package/dist/esm/components/Icon/components/ConnectionEnable.js.map +1 -1
  145. package/dist/esm/components/Icon/components/ConnectionRevoke.js +2 -2
  146. package/dist/esm/components/Icon/components/ConnectionRevoke.js.map +1 -1
  147. package/dist/esm/components/Icon/components/Contacts.js +2 -2
  148. package/dist/esm/components/Icon/components/Contacts.js.map +1 -1
  149. package/dist/esm/components/Icon/components/Copy.js +2 -2
  150. package/dist/esm/components/Icon/components/Copy.js.map +1 -1
  151. package/dist/esm/components/Icon/components/Courses.js +2 -2
  152. package/dist/esm/components/Icon/components/Courses.js.map +1 -1
  153. package/dist/esm/components/Icon/components/Credit.js +2 -2
  154. package/dist/esm/components/Icon/components/Credit.js.map +1 -1
  155. package/dist/esm/components/Icon/components/Delete.js +2 -2
  156. package/dist/esm/components/Icon/components/Delete.js.map +1 -1
  157. package/dist/esm/components/Icon/components/DeletePermanently.js +2 -2
  158. package/dist/esm/components/Icon/components/DeletePermanently.js.map +1 -1
  159. package/dist/esm/components/Icon/components/Depecriate.js +2 -2
  160. package/dist/esm/components/Icon/components/Depecriate.js.map +1 -1
  161. package/dist/esm/components/Icon/components/Developer.js +2 -2
  162. package/dist/esm/components/Icon/components/Developer.js.map +1 -1
  163. package/dist/esm/components/Icon/components/DistributionTemplate.js +2 -2
  164. package/dist/esm/components/Icon/components/DistributionTemplate.js.map +1 -1
  165. package/dist/esm/components/Icon/components/Document.js +2 -2
  166. package/dist/esm/components/Icon/components/Document.js.map +1 -1
  167. package/dist/esm/components/Icon/components/DocumentApprove.js +2 -2
  168. package/dist/esm/components/Icon/components/DocumentApprove.js.map +1 -1
  169. package/dist/esm/components/Icon/components/DocumentCreateEntry.js +2 -2
  170. package/dist/esm/components/Icon/components/DocumentCreateEntry.js.map +1 -1
  171. package/dist/esm/components/Icon/components/DocumentCut.js +2 -2
  172. package/dist/esm/components/Icon/components/DocumentCut.js.map +1 -1
  173. package/dist/esm/components/Icon/components/DocumentError.js +2 -2
  174. package/dist/esm/components/Icon/components/DocumentError.js.map +1 -1
  175. package/dist/esm/components/Icon/components/DocumentIsolatePage.js +2 -2
  176. package/dist/esm/components/Icon/components/DocumentIsolatePage.js.map +1 -1
  177. package/dist/esm/components/Icon/components/DocumentMerge.js +2 -2
  178. package/dist/esm/components/Icon/components/DocumentMerge.js.map +1 -1
  179. package/dist/esm/components/Icon/components/DocumentMove.js +2 -2
  180. package/dist/esm/components/Icon/components/DocumentMove.js.map +1 -1
  181. package/dist/esm/components/Icon/components/DocumentPreview.js +2 -2
  182. package/dist/esm/components/Icon/components/DocumentPreview.js.map +1 -1
  183. package/dist/esm/components/Icon/components/DocumentReceived.js +2 -2
  184. package/dist/esm/components/Icon/components/DocumentReceived.js.map +1 -1
  185. package/dist/esm/components/Icon/components/DocumentRejectedRequest.js +2 -2
  186. package/dist/esm/components/Icon/components/DocumentRejectedRequest.js.map +1 -1
  187. package/dist/esm/components/Icon/components/DocumentSplit.js +2 -2
  188. package/dist/esm/components/Icon/components/DocumentSplit.js.map +1 -1
  189. package/dist/esm/components/Icon/components/DocumentTime.js +2 -2
  190. package/dist/esm/components/Icon/components/DocumentTime.js.map +1 -1
  191. package/dist/esm/components/Icon/components/Download.js +2 -2
  192. package/dist/esm/components/Icon/components/Download.js.map +1 -1
  193. package/dist/esm/components/Icon/components/Drag.js +2 -2
  194. package/dist/esm/components/Icon/components/Drag.js.map +1 -1
  195. package/dist/esm/components/Icon/components/ECopedia.js +2 -2
  196. package/dist/esm/components/Icon/components/ECopedia.js.map +1 -1
  197. package/dist/esm/components/Icon/components/ESignature.js +2 -2
  198. package/dist/esm/components/Icon/components/ESignature.js.map +1 -1
  199. package/dist/esm/components/Icon/components/Edit.js +2 -2
  200. package/dist/esm/components/Icon/components/Edit.js.map +1 -1
  201. package/dist/esm/components/Icon/components/EllipsisHorizontal.js +2 -2
  202. package/dist/esm/components/Icon/components/EllipsisHorizontal.js.map +1 -1
  203. package/dist/esm/components/Icon/components/EllipsisVertical.js +2 -2
  204. package/dist/esm/components/Icon/components/EllipsisVertical.js.map +1 -1
  205. package/dist/esm/components/Icon/components/EntriesOnAccount.js +2 -2
  206. package/dist/esm/components/Icon/components/EntriesOnAccount.js.map +1 -1
  207. package/dist/esm/components/Icon/components/EntriesOpen.js +2 -2
  208. package/dist/esm/components/Icon/components/EntriesOpen.js.map +1 -1
  209. package/dist/esm/components/Icon/components/EntriesWarning.js +2 -2
  210. package/dist/esm/components/Icon/components/EntriesWarning.js.map +1 -1
  211. package/dist/esm/components/Icon/components/EntryTypeCustomerInvoice.js +2 -2
  212. package/dist/esm/components/Icon/components/EntryTypeCustomerInvoice.js.map +1 -1
  213. package/dist/esm/components/Icon/components/EntryTypeCustomerPayment.js +2 -2
  214. package/dist/esm/components/Icon/components/EntryTypeCustomerPayment.js.map +1 -1
  215. package/dist/esm/components/Icon/components/EntryTypeJournalEntry.js +2 -2
  216. package/dist/esm/components/Icon/components/EntryTypeJournalEntry.js.map +1 -1
  217. package/dist/esm/components/Icon/components/EntryTypeManualCustomerInvoice.js +2 -2
  218. package/dist/esm/components/Icon/components/EntryTypeManualCustomerInvoice.js.map +1 -1
  219. package/dist/esm/components/Icon/components/EntryTypeSupplierInvoice.js +2 -2
  220. package/dist/esm/components/Icon/components/EntryTypeSupplierInvoice.js.map +1 -1
  221. package/dist/esm/components/Icon/components/EntryTypeSupplierPayment.js +2 -2
  222. package/dist/esm/components/Icon/components/EntryTypeSupplierPayment.js.map +1 -1
  223. package/dist/esm/components/Icon/components/Envelope.js +2 -2
  224. package/dist/esm/components/Icon/components/Envelope.js.map +1 -1
  225. package/dist/esm/components/Icon/components/EnvelopeApproved.js +2 -2
  226. package/dist/esm/components/Icon/components/EnvelopeApproved.js.map +1 -1
  227. package/dist/esm/components/Icon/components/ExpandView.js +2 -2
  228. package/dist/esm/components/Icon/components/ExpandView.js.map +1 -1
  229. package/dist/esm/components/Icon/components/Expenses.js +2 -2
  230. package/dist/esm/components/Icon/components/Expenses.js.map +1 -1
  231. package/dist/esm/components/Icon/components/Export.js +2 -2
  232. package/dist/esm/components/Icon/components/Export.js.map +1 -1
  233. package/dist/esm/components/Icon/components/ExportToExcel.js +2 -2
  234. package/dist/esm/components/Icon/components/ExportToExcel.js.map +1 -1
  235. package/dist/esm/components/Icon/components/ExportToPdf.js +2 -2
  236. package/dist/esm/components/Icon/components/ExportToPdf.js.map +1 -1
  237. package/dist/esm/components/Icon/components/Filter.js +2 -2
  238. package/dist/esm/components/Icon/components/Filter.js.map +1 -1
  239. package/dist/esm/components/Icon/components/FilterSolid.js +2 -2
  240. package/dist/esm/components/Icon/components/FilterSolid.js.map +1 -1
  241. package/dist/esm/components/Icon/components/GraphSolid.js +2 -2
  242. package/dist/esm/components/Icon/components/GraphSolid.js.map +1 -1
  243. package/dist/esm/components/Icon/components/Hash.js +2 -2
  244. package/dist/esm/components/Icon/components/Hash.js.map +1 -1
  245. package/dist/esm/components/Icon/components/Home.js +2 -2
  246. package/dist/esm/components/Icon/components/Home.js.map +1 -1
  247. package/dist/esm/components/Icon/components/Images.js +2 -2
  248. package/dist/esm/components/Icon/components/Images.js.map +1 -1
  249. package/dist/esm/components/Icon/components/Import.js +2 -2
  250. package/dist/esm/components/Icon/components/Import.js.map +1 -1
  251. package/dist/esm/components/Icon/components/Inbox.js +2 -2
  252. package/dist/esm/components/Icon/components/Inbox.js.map +1 -1
  253. package/dist/esm/components/Icon/components/InboxEinvoicing.js +2 -2
  254. package/dist/esm/components/Icon/components/InboxEinvoicing.js.map +1 -1
  255. package/dist/esm/components/Icon/components/InboxScanning.js +2 -2
  256. package/dist/esm/components/Icon/components/InboxScanning.js.map +1 -1
  257. package/dist/esm/components/Icon/components/InboxSmart.js +2 -2
  258. package/dist/esm/components/Icon/components/InboxSmart.js.map +1 -1
  259. package/dist/esm/components/Icon/components/Info.js +2 -2
  260. package/dist/esm/components/Icon/components/Info.js.map +1 -1
  261. package/dist/esm/components/Icon/components/Inventory.js +2 -2
  262. package/dist/esm/components/Icon/components/Inventory.js.map +1 -1
  263. package/dist/esm/components/Icon/components/InventoryMatrix.js +2 -2
  264. package/dist/esm/components/Icon/components/InventoryMatrix.js.map +1 -1
  265. package/dist/esm/components/Icon/components/JournalPro.js +2 -2
  266. package/dist/esm/components/Icon/components/JournalPro.js.map +1 -1
  267. package/dist/esm/components/Icon/components/Layout.js +2 -2
  268. package/dist/esm/components/Icon/components/Layout.js.map +1 -1
  269. package/dist/esm/components/Icon/components/LayoutBoth.js +2 -2
  270. package/dist/esm/components/Icon/components/LayoutBoth.js.map +1 -1
  271. package/dist/esm/components/Icon/components/LayoutFirst.js +2 -2
  272. package/dist/esm/components/Icon/components/LayoutFirst.js.map +1 -1
  273. package/dist/esm/components/Icon/components/LayoutLast.js +2 -2
  274. package/dist/esm/components/Icon/components/LayoutLast.js.map +1 -1
  275. package/dist/esm/components/Icon/components/LayoutNone.js +2 -2
  276. package/dist/esm/components/Icon/components/LayoutNone.js.map +1 -1
  277. package/dist/esm/components/Icon/components/LedgerCard.js +2 -2
  278. package/dist/esm/components/Icon/components/LedgerCard.js.map +1 -1
  279. package/dist/esm/components/Icon/components/LedgerCardCustomerReminder.js +2 -2
  280. package/dist/esm/components/Icon/components/LedgerCardCustomerReminder.js.map +1 -1
  281. package/dist/esm/components/Icon/components/LedgerCardManualCustomerInvoice.js +2 -2
  282. package/dist/esm/components/Icon/components/LedgerCardManualCustomerInvoice.js.map +1 -1
  283. package/dist/esm/components/Icon/components/LedgerCardObsoleteStock.js +2 -2
  284. package/dist/esm/components/Icon/components/LedgerCardObsoleteStock.js.map +1 -1
  285. package/dist/esm/components/Icon/components/LedgerCardOpeningEntry.js +2 -2
  286. package/dist/esm/components/Icon/components/LedgerCardOpeningEntry.js.map +1 -1
  287. package/dist/esm/components/Icon/components/LedgerCardReservedEntry.js +2 -2
  288. package/dist/esm/components/Icon/components/LedgerCardReservedEntry.js.map +1 -1
  289. package/dist/esm/components/Icon/components/LedgerCardShrinkagePilferage.js +2 -2
  290. package/dist/esm/components/Icon/components/LedgerCardShrinkagePilferage.js.map +1 -1
  291. package/dist/esm/components/Icon/components/LedgerCardStockAdjustment.js +2 -2
  292. package/dist/esm/components/Icon/components/LedgerCardStockAdjustment.js.map +1 -1
  293. package/dist/esm/components/Icon/components/LedgerCardTransferredOpeningEntry.js +2 -2
  294. package/dist/esm/components/Icon/components/LedgerCardTransferredOpeningEntry.js.map +1 -1
  295. package/dist/esm/components/Icon/components/Lightbulb.js +2 -2
  296. package/dist/esm/components/Icon/components/Lightbulb.js.map +1 -1
  297. package/dist/esm/components/Icon/components/Line.js +2 -2
  298. package/dist/esm/components/Icon/components/Line.js.map +1 -1
  299. package/dist/esm/components/Icon/components/List.js +2 -2
  300. package/dist/esm/components/Icon/components/List.js.map +1 -1
  301. package/dist/esm/components/Icon/components/ListBulleted.js +2 -2
  302. package/dist/esm/components/Icon/components/ListBulleted.js.map +1 -1
  303. package/dist/esm/components/Icon/components/ListSearch.js +2 -2
  304. package/dist/esm/components/Icon/components/ListSearch.js.map +1 -1
  305. package/dist/esm/components/Icon/components/LockOpen.js +2 -2
  306. package/dist/esm/components/Icon/components/LockOpen.js.map +1 -1
  307. package/dist/esm/components/Icon/components/Log.js +2 -2
  308. package/dist/esm/components/Icon/components/Log.js.map +1 -1
  309. package/dist/esm/components/Icon/components/LogOut.js +2 -2
  310. package/dist/esm/components/Icon/components/LogOut.js.map +1 -1
  311. package/dist/esm/components/Icon/components/Market.js +2 -2
  312. package/dist/esm/components/Icon/components/Market.js.map +1 -1
  313. package/dist/esm/components/Icon/components/MatchAmount.js +2 -2
  314. package/dist/esm/components/Icon/components/MatchAmount.js.map +1 -1
  315. package/dist/esm/components/Icon/components/MatchEntries.js +2 -2
  316. package/dist/esm/components/Icon/components/MatchEntries.js.map +1 -1
  317. package/dist/esm/components/Icon/components/Menu.js +2 -2
  318. package/dist/esm/components/Icon/components/Menu.js.map +1 -1
  319. package/dist/esm/components/Icon/components/Mileage.js +2 -2
  320. package/dist/esm/components/Icon/components/Mileage.js.map +1 -1
  321. package/dist/esm/components/Icon/components/ModalResize.js +2 -2
  322. package/dist/esm/components/Icon/components/ModalResize.js.map +1 -1
  323. package/dist/esm/components/Icon/components/ModalShrink.js +2 -2
  324. package/dist/esm/components/Icon/components/ModalShrink.js.map +1 -1
  325. package/dist/esm/components/Icon/components/More.js +2 -2
  326. package/dist/esm/components/Icon/components/More.js.map +1 -1
  327. package/dist/esm/components/Icon/components/MoreSolid.js +2 -2
  328. package/dist/esm/components/Icon/components/MoreSolid.js.map +1 -1
  329. package/dist/esm/components/Icon/components/Move.js +2 -2
  330. package/dist/esm/components/Icon/components/Move.js.map +1 -1
  331. package/dist/esm/components/Icon/components/NavigationList.js +2 -2
  332. package/dist/esm/components/Icon/components/NavigationList.js.map +1 -1
  333. package/dist/esm/components/Icon/components/Note.js +2 -2
  334. package/dist/esm/components/Icon/components/Note.js.map +1 -1
  335. package/dist/esm/components/Icon/components/NoteFollowUp.js +2 -2
  336. package/dist/esm/components/Icon/components/NoteFollowUp.js.map +1 -1
  337. package/dist/esm/components/Icon/components/NoteRead.js +2 -2
  338. package/dist/esm/components/Icon/components/NoteRead.js.map +1 -1
  339. package/dist/esm/components/Icon/components/Numbers.js +2 -2
  340. package/dist/esm/components/Icon/components/Numbers.js.map +1 -1
  341. package/dist/esm/components/Icon/components/PartnerApi.js +2 -2
  342. package/dist/esm/components/Icon/components/PartnerApi.js.map +1 -1
  343. package/dist/esm/components/Icon/components/Period.js +2 -2
  344. package/dist/esm/components/Icon/components/Period.js.map +1 -1
  345. package/dist/esm/components/Icon/components/PersonChange.js +2 -2
  346. package/dist/esm/components/Icon/components/PersonChange.js.map +1 -1
  347. package/dist/esm/components/Icon/components/PersonMinus.js +2 -2
  348. package/dist/esm/components/Icon/components/PersonMinus.js.map +1 -1
  349. package/dist/esm/components/Icon/components/PersonPlus.js +2 -2
  350. package/dist/esm/components/Icon/components/PersonPlus.js.map +1 -1
  351. package/dist/esm/components/Icon/components/PersonTick.js +2 -2
  352. package/dist/esm/components/Icon/components/PersonTick.js.map +1 -1
  353. package/dist/esm/components/Icon/components/Play.js +2 -2
  354. package/dist/esm/components/Icon/components/Play.js.map +1 -1
  355. package/dist/esm/components/Icon/components/PlusMinus.js +2 -2
  356. package/dist/esm/components/Icon/components/PlusMinus.js.map +1 -1
  357. package/dist/esm/components/Icon/components/Print.js +2 -2
  358. package/dist/esm/components/Icon/components/Print.js.map +1 -1
  359. package/dist/esm/components/Icon/components/ProcessPayment.js +2 -2
  360. package/dist/esm/components/Icon/components/ProcessPayment.js.map +1 -1
  361. package/dist/esm/components/Icon/components/ProductLedgerCard.js +2 -2
  362. package/dist/esm/components/Icon/components/ProductLedgerCard.js.map +1 -1
  363. package/dist/esm/components/Icon/components/Profile.js +2 -2
  364. package/dist/esm/components/Icon/components/Profile.js.map +1 -1
  365. package/dist/esm/components/Icon/components/ProjectCards.js +2 -2
  366. package/dist/esm/components/Icon/components/ProjectCards.js.map +1 -1
  367. package/dist/esm/components/Icon/components/Projects.js +2 -2
  368. package/dist/esm/components/Icon/components/Projects.js.map +1 -1
  369. package/dist/esm/components/Icon/components/Quicklinks.js +2 -2
  370. package/dist/esm/components/Icon/components/Quicklinks.js.map +1 -1
  371. package/dist/esm/components/Icon/components/RatingBankruptcy.js +2 -2
  372. package/dist/esm/components/Icon/components/RatingBankruptcy.js.map +1 -1
  373. package/dist/esm/components/Icon/components/RatingPaymentProblems.js +2 -2
  374. package/dist/esm/components/Icon/components/RatingPaymentProblems.js.map +1 -1
  375. package/dist/esm/components/Icon/components/Reconciled.js +2 -2
  376. package/dist/esm/components/Icon/components/Reconciled.js.map +1 -1
  377. package/dist/esm/components/Icon/components/Refresh.js +2 -2
  378. package/dist/esm/components/Icon/components/Refresh.js.map +1 -1
  379. package/dist/esm/components/Icon/components/Report.js +2 -2
  380. package/dist/esm/components/Icon/components/Report.js.map +1 -1
  381. package/dist/esm/components/Icon/components/ReportSolid.js +2 -2
  382. package/dist/esm/components/Icon/components/ReportSolid.js.map +1 -1
  383. package/dist/esm/components/Icon/components/Restore.js +2 -2
  384. package/dist/esm/components/Icon/components/Restore.js.map +1 -1
  385. package/dist/esm/components/Icon/components/RotateLeft.js +2 -2
  386. package/dist/esm/components/Icon/components/RotateLeft.js.map +1 -1
  387. package/dist/esm/components/Icon/components/RotateRight.js +2 -2
  388. package/dist/esm/components/Icon/components/RotateRight.js.map +1 -1
  389. package/dist/esm/components/Icon/components/Sales.js +2 -2
  390. package/dist/esm/components/Icon/components/Sales.js.map +1 -1
  391. package/dist/esm/components/Icon/components/Search.js +2 -2
  392. package/dist/esm/components/Icon/components/Search.js.map +1 -1
  393. package/dist/esm/components/Icon/components/SearchBold.js +2 -2
  394. package/dist/esm/components/Icon/components/SearchBold.js.map +1 -1
  395. package/dist/esm/components/Icon/components/Secure.js +2 -2
  396. package/dist/esm/components/Icon/components/Secure.js.map +1 -1
  397. package/dist/esm/components/Icon/components/SecureTick.js +2 -2
  398. package/dist/esm/components/Icon/components/SecureTick.js.map +1 -1
  399. package/dist/esm/components/Icon/components/Settings.js +2 -2
  400. package/dist/esm/components/Icon/components/Settings.js.map +1 -1
  401. package/dist/esm/components/Icon/components/SettingsSolid.js +2 -2
  402. package/dist/esm/components/Icon/components/SettingsSolid.js.map +1 -1
  403. package/dist/esm/components/Icon/components/Shortcuts.js +2 -2
  404. package/dist/esm/components/Icon/components/Shortcuts.js.map +1 -1
  405. package/dist/esm/components/Icon/components/ShowAll.js +2 -2
  406. package/dist/esm/components/Icon/components/ShowAll.js.map +1 -1
  407. package/dist/esm/components/Icon/components/ShowLess.js +2 -2
  408. package/dist/esm/components/Icon/components/ShowLess.js.map +1 -1
  409. package/dist/esm/components/Icon/components/ShowMore.js +2 -2
  410. package/dist/esm/components/Icon/components/ShowMore.js.map +1 -1
  411. package/dist/esm/components/Icon/components/ShowTemplate.js +2 -2
  412. package/dist/esm/components/Icon/components/ShowTemplate.js.map +1 -1
  413. package/dist/esm/components/Icon/components/Sliders.js +2 -2
  414. package/dist/esm/components/Icon/components/Sliders.js.map +1 -1
  415. package/dist/esm/components/Icon/components/Smartpay.js +2 -2
  416. package/dist/esm/components/Icon/components/Smartpay.js.map +1 -1
  417. package/dist/esm/components/Icon/components/SortBy.js +2 -2
  418. package/dist/esm/components/Icon/components/SortBy.js.map +1 -1
  419. package/dist/esm/components/Icon/components/Spinner.js +4 -4
  420. package/dist/esm/components/Icon/components/Spinner.js.map +1 -1
  421. package/dist/esm/components/Icon/components/Star.js +2 -2
  422. package/dist/esm/components/Icon/components/Star.js.map +1 -1
  423. package/dist/esm/components/Icon/components/StarSolid.js +2 -2
  424. package/dist/esm/components/Icon/components/StarSolid.js.map +1 -1
  425. package/dist/esm/components/Icon/components/Subscriptions.js +2 -2
  426. package/dist/esm/components/Icon/components/Subscriptions.js.map +1 -1
  427. package/dist/esm/components/Icon/components/SystemEntries.js +2 -2
  428. package/dist/esm/components/Icon/components/SystemEntries.js.map +1 -1
  429. package/dist/esm/components/Icon/components/Tag.js +2 -2
  430. package/dist/esm/components/Icon/components/Tag.js.map +1 -1
  431. package/dist/esm/components/Icon/components/TemplateOverride.js +2 -2
  432. package/dist/esm/components/Icon/components/TemplateOverride.js.map +1 -1
  433. package/dist/esm/components/Icon/components/Templates.js +2 -2
  434. package/dist/esm/components/Icon/components/Templates.js.map +1 -1
  435. package/dist/esm/components/Icon/components/ThumbBoth.js +2 -2
  436. package/dist/esm/components/Icon/components/ThumbBoth.js.map +1 -1
  437. package/dist/esm/components/Icon/components/ThumbDown.js +2 -2
  438. package/dist/esm/components/Icon/components/ThumbDown.js.map +1 -1
  439. package/dist/esm/components/Icon/components/ThumbDownSolid.js +2 -2
  440. package/dist/esm/components/Icon/components/ThumbDownSolid.js.map +1 -1
  441. package/dist/esm/components/Icon/components/ThumbUp.js +2 -2
  442. package/dist/esm/components/Icon/components/ThumbUp.js.map +1 -1
  443. package/dist/esm/components/Icon/components/ThumbUpSolid.js +2 -2
  444. package/dist/esm/components/Icon/components/ThumbUpSolid.js.map +1 -1
  445. package/dist/esm/components/Icon/components/Tick.js +2 -2
  446. package/dist/esm/components/Icon/components/Tick.js.map +1 -1
  447. package/dist/esm/components/Icon/components/Time.js +2 -2
  448. package/dist/esm/components/Icon/components/Time.js.map +1 -1
  449. package/dist/esm/components/Icon/components/Transfer.js +2 -2
  450. package/dist/esm/components/Icon/components/Transfer.js.map +1 -1
  451. package/dist/esm/components/Icon/components/TransferCancel.js +4 -4
  452. package/dist/esm/components/Icon/components/TransferCancel.js.map +1 -1
  453. package/dist/esm/components/Icon/components/TransferLocked.js +2 -2
  454. package/dist/esm/components/Icon/components/TransferLocked.js.map +1 -1
  455. package/dist/esm/components/Icon/components/Undock.js +2 -2
  456. package/dist/esm/components/Icon/components/Undock.js.map +1 -1
  457. package/dist/esm/components/Icon/components/Unreconciled.js +2 -2
  458. package/dist/esm/components/Icon/components/Unreconciled.js.map +1 -1
  459. package/dist/esm/components/Icon/components/Warning.js +2 -2
  460. package/dist/esm/components/Icon/components/Warning.js.map +1 -1
  461. package/dist/esm/components/Icon/components/Webshop.js +2 -2
  462. package/dist/esm/components/Icon/components/Webshop.js.map +1 -1
  463. package/dist/esm/components/Icon/components/Website.js +2 -2
  464. package/dist/esm/components/Icon/components/Website.js.map +1 -1
  465. package/dist/esm/components/Icon/components/Workflow.js +2 -2
  466. package/dist/esm/components/Icon/components/Workflow.js.map +1 -1
  467. package/dist/esm/components/Icon/components/Zoom.js +2 -2
  468. package/dist/esm/components/Icon/components/Zoom.js.map +1 -1
  469. package/dist/esm/components/IconButton/IconButton.js +1 -1
  470. package/dist/esm/components/IconButton/IconButton.js.map +1 -1
  471. package/dist/esm/components/Input/Input.js +5 -5
  472. package/dist/esm/components/Input/Input.js.map +1 -1
  473. package/dist/esm/components/Listbox/Listbox.js +6 -6
  474. package/dist/esm/components/Listbox/Listbox.js.map +1 -1
  475. package/dist/esm/components/Listbox/ScrollableList.js +9 -9
  476. package/dist/esm/components/Listbox/ScrollableList.js.map +1 -1
  477. package/dist/esm/components/Menu/Menu.js +3 -3
  478. package/dist/esm/components/Menu/Menu.js.map +1 -1
  479. package/dist/esm/components/Menu/components/Checkbox.js +7 -6
  480. package/dist/esm/components/Menu/components/Checkbox.js.map +1 -1
  481. package/dist/esm/components/Menu/components/Content.js +1 -1
  482. package/dist/esm/components/Menu/components/Content.js.map +1 -1
  483. package/dist/esm/components/Menu/components/Header.js +4 -3
  484. package/dist/esm/components/Menu/components/Header.js.map +1 -1
  485. package/dist/esm/components/Menu/components/Item.js +6 -6
  486. package/dist/esm/components/Menu/components/Item.js.map +1 -1
  487. package/dist/esm/components/Menu/components/Link.js +3 -3
  488. package/dist/esm/components/Menu/components/Link.js.map +1 -1
  489. package/dist/esm/components/Menu/components/RadioGroup.js +8 -7
  490. package/dist/esm/components/Menu/components/RadioGroup.js.map +1 -1
  491. package/dist/esm/components/Menu/components/Separator.js +1 -1
  492. package/dist/esm/components/Menu/components/Separator.js.map +1 -1
  493. package/dist/esm/components/Menu/components/Trigger.js +1 -1
  494. package/dist/esm/components/Menu/components/Trigger.js.map +1 -1
  495. package/dist/esm/components/Navigation/Navigation.js +12 -12
  496. package/dist/esm/components/Navigation/Navigation.js.map +1 -1
  497. package/dist/esm/components/Pagination/PageNumbers.js +1 -1
  498. package/dist/esm/components/Pagination/PageNumbers.js.map +1 -1
  499. package/dist/esm/components/Pagination/Pagination.js +9 -9
  500. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  501. package/dist/esm/components/Popover/Popover.js +10 -10
  502. package/dist/esm/components/Popover/Popover.js.map +1 -1
  503. package/dist/esm/components/Popover/Primitives.js +5 -5
  504. package/dist/esm/components/Popover/Primitives.js.map +1 -1
  505. package/dist/esm/components/Progress/Progress.js +2 -2
  506. package/dist/esm/components/Progress/Progress.js.map +1 -1
  507. package/dist/esm/components/Provider/Provider.js +2 -2
  508. package/dist/esm/components/Provider/Provider.js.map +1 -1
  509. package/dist/esm/components/RadioGroup/RadioGroup.js +7 -7
  510. package/dist/esm/components/RadioGroup/RadioGroup.js.map +1 -1
  511. package/dist/esm/components/SearchInput/SearchInput.js +3 -2
  512. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  513. package/dist/esm/components/Select/Select.js +11 -11
  514. package/dist/esm/components/Select/Select.js.map +1 -1
  515. package/dist/esm/components/Select/useSelect.js +1 -1
  516. package/dist/esm/components/Select/useSelect.js.map +1 -1
  517. package/dist/esm/components/Spinner/Spinner.js +4 -4
  518. package/dist/esm/components/Spinner/Spinner.js.map +1 -1
  519. package/dist/esm/components/Switch/Switch.js +3 -3
  520. package/dist/esm/components/Switch/Switch.js.map +1 -1
  521. package/dist/esm/components/Table/components/BaseTable.js +5 -5
  522. package/dist/esm/components/Table/components/BaseTable.js.map +1 -1
  523. package/dist/esm/components/Table/components/PaginatedTable.js +1 -1
  524. package/dist/esm/components/Table/components/PaginatedTable.js.map +1 -1
  525. package/dist/esm/components/Table/components/Table.js +3 -3
  526. package/dist/esm/components/Table/components/Table.js.map +1 -1
  527. package/dist/esm/components/Table/components/WindowedTable.js +7 -7
  528. package/dist/esm/components/Table/components/WindowedTable.js.map +1 -1
  529. package/dist/esm/components/Table/hooks/plugins/useRowActions.js +14 -14
  530. package/dist/esm/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  531. package/dist/esm/components/Table/hooks/plugins/useRowDraggable.js +1 -1
  532. package/dist/esm/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  533. package/dist/esm/components/Table/hooks/plugins/useRowSelect.js +2 -2
  534. package/dist/esm/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  535. package/dist/esm/components/Table/util/renderColumn.js +3 -3
  536. package/dist/esm/components/Table/util/renderColumn.js.map +1 -1
  537. package/dist/esm/components/Table/util/renderRow.js +7 -7
  538. package/dist/esm/components/Table/util/renderRow.js.map +1 -1
  539. package/dist/esm/components/Tabs/Tabs.js +4 -4
  540. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  541. package/dist/esm/components/Tag/Tag.js +53 -0
  542. package/dist/esm/components/Tag/Tag.js.map +1 -0
  543. package/dist/esm/components/Textarea/Textarea.js +1 -1
  544. package/dist/esm/components/Textarea/Textarea.js.map +1 -1
  545. package/dist/esm/components/Toast/Toast.js +3 -3
  546. package/dist/esm/components/Toast/Toast.js.map +1 -1
  547. package/dist/esm/components/Toast/Toaster.js +5 -5
  548. package/dist/esm/components/Toast/Toaster.js.map +1 -1
  549. package/dist/esm/components/Toast/util.js +5 -5
  550. package/dist/esm/components/Toast/util.js.map +1 -1
  551. package/dist/esm/components/Tooltip/Tooltip.js +5 -5
  552. package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
  553. package/dist/esm/components/Tour/Tour.js +7 -7
  554. package/dist/esm/components/Tour/Tour.js.map +1 -1
  555. package/dist/esm/components/Treeview/Treeview.js +7 -7
  556. package/dist/esm/components/Treeview/Treeview.js.map +1 -1
  557. package/dist/esm/components/VisuallyHidden/VisuallyHidden.js +1 -1
  558. package/dist/esm/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  559. package/dist/esm/hooks/useIsRefOverflowing.js +15 -0
  560. package/dist/esm/hooks/useIsRefOverflowing.js.map +1 -0
  561. package/dist/esm/index.js +1 -0
  562. package/dist/esm/index.js.map +1 -1
  563. package/dist/esm/primitives/Button.js +2 -2
  564. package/dist/esm/primitives/Button.js.map +1 -1
  565. package/dist/esm/utils/colors.js +15 -0
  566. package/dist/esm/utils/colors.js.map +1 -0
  567. package/dist/esm/utils/dom.js +4 -0
  568. package/dist/esm/utils/dom.js.map +1 -0
  569. package/dist/hooks/useIsRefOverflowing.d.ts +2 -0
  570. package/dist/index.d.ts +1 -0
  571. package/dist/taco.cjs.development.js +798 -725
  572. package/dist/taco.cjs.development.js.map +1 -1
  573. package/dist/taco.cjs.production.min.js +1 -1
  574. package/dist/taco.cjs.production.min.js.map +1 -1
  575. package/dist/utils/colors.d.ts +13 -0
  576. package/dist/utils/dom.d.ts +1 -0
  577. package/package.json +10 -9
  578. package/types.json +47 -0
@@ -1 +1 @@
1
- {"version":3,"file":"useRowSelect.js","sources":["../../../../../../src/components/Table/hooks/plugins/useRowSelect.tsx"],"sourcesContent":["// this wraps react-table's internal useRowSelect hook\nimport React from 'react';\nimport { useRowSelect as useBaseRowSelect, Row, PluginHook } from 'react-table';\nimport { Checkbox } from '../../../Checkbox/Checkbox';\nimport { SelectedRowsHandler } from '../../types';\n\nconst toggleBetween = (fromRowIndex: number, toRowIndex: number): [number, number] => {\n const fromIndex = toRowIndex < fromRowIndex ? toRowIndex : fromRowIndex;\n const toIndex = toRowIndex > fromRowIndex ? toRowIndex : fromRowIndex;\n\n return [fromIndex, toIndex];\n};\n\n// react-table calls \"index paths\" row ids. we named them indexPaths to reduce confusion with natural ids\n// the selection hook usess react-table's row selection, so this hok references row.id - it is the index path\n\nexport const useRowSelect = (onSelectedRows: SelectedRowsHandler | undefined): PluginHook<{}> => {\n const plugin = (hooks: any): void => {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useBaseRowSelect(hooks);\n\n if (onSelectedRows) {\n const toggleRowSelected = (indexPath: string, checked: boolean): void =>\n onSelectedRows(state => {\n const nextState = { ...state };\n\n if (checked) {\n nextState[indexPath] = true;\n } else {\n delete nextState[indexPath];\n }\n\n return nextState;\n });\n\n const prepareRow = (row: any) => {\n row.toggleRowSelected = () => toggleRowSelected(row.id, !row.isSelected);\n };\n\n hooks.prepareRow.push(prepareRow);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const lastSelectedSortedIndex = React.useRef();\n\n hooks.visibleColumns.push((columns: any) => [\n {\n id: 'selection',\n Header: ({ getToggleAllRowsSelectedProps, rows }: any) => {\n const { onChange: _, ...props } = getToggleAllRowsSelectedProps();\n\n const onChange = (checked): void => {\n if (checked) {\n // this intentionally only selects top level rows - sub rows add too much complexity\n onSelectedRows(Object.assign({}, Array(rows.length).fill(true)));\n } else {\n onSelectedRows({});\n }\n };\n\n return <Checkbox {...props} onChange={onChange} />;\n },\n Cell: ({ row, rows }: any) => {\n const { onChange: _, ...props } = row.getToggleRowSelectedProps();\n // row.index refers to the index in the original data, not the current index\n const sortedIndex = rows.findIndex((r: Row) => r.index === row.index);\n\n const onClick = (event: React.MouseEvent): void => {\n if (event.shiftKey) {\n const [fromIndex, toIndex] = toggleBetween(lastSelectedSortedIndex.current || 0, sortedIndex);\n\n for (let i = fromIndex; i <= toIndex; i++) {\n toggleRowSelected(rows[i].id, true);\n }\n } else {\n toggleRowSelected(row.id, !props.checked);\n }\n\n lastSelectedSortedIndex.current = sortedIndex;\n };\n\n return (\n <Checkbox\n {...props}\n className=\"mt-2.5\"\n onClick={onClick}\n // this is necessary to remove console spam from eslint\n onChange={() => false}\n />\n );\n },\n flex: '0 0 36px',\n className: 'flex-col justify-start !py-0',\n },\n ...columns,\n ]);\n }\n };\n plugin.pluginName = 'useRowSelect';\n return plugin;\n};\n"],"names":["toggleBetween","fromRowIndex","toRowIndex","fromIndex","toIndex","useRowSelect","onSelectedRows","plugin","hooks","useBaseRowSelect","toggleRowSelected","indexPath","checked","state","nextState","prepareRow","row","id","isSelected","push","lastSelectedSortedIndex","React","useRef","visibleColumns","columns","Header","getToggleAllRowsSelectedProps","rows","onChange","_","props","Object","assign","Array","length","fill","Checkbox","Cell","getToggleRowSelectedProps","sortedIndex","findIndex","r","index","onClick","event","shiftKey","current","i","className","flex","pluginName"],"mappings":";;;;AAAA;;AAMA,MAAMA,aAAa,GAAG,CAACC,YAAD,EAAuBC,UAAvB;EAClB,MAAMC,SAAS,GAAGD,UAAU,GAAGD,YAAb,GAA4BC,UAA5B,GAAyCD,YAA3D;EACA,MAAMG,OAAO,GAAGF,UAAU,GAAGD,YAAb,GAA4BC,UAA5B,GAAyCD,YAAzD;EAEA,OAAO,CAACE,SAAD,EAAYC,OAAZ,CAAP;AACH,CALD;AAQA;;;MAEaC,YAAY,GAAIC,cAAD;EACxB,MAAMC,MAAM,GAAIC,KAAD;;IAEXC,cAAgB,CAACD,KAAD,CAAhB;;IAEA,IAAIF,cAAJ,EAAoB;MAChB,MAAMI,iBAAiB,GAAG,CAACC,SAAD,EAAoBC,OAApB,KACtBN,cAAc,CAACO,KAAK;QAChB,MAAMC,SAAS,GAAG,EAAE,GAAGD;SAAvB;;QAEA,IAAID,OAAJ,EAAa;UACTE,SAAS,CAACH,SAAD,CAAT,GAAuB,IAAvB;SADJ,MAEO;UACH,OAAOG,SAAS,CAACH,SAAD,CAAhB;;;QAGJ,OAAOG,SAAP;OATU,CADlB;;MAaA,MAAMC,UAAU,GAAIC,GAAD;QACfA,GAAG,CAACN,iBAAJ,GAAwB,MAAMA,iBAAiB,CAACM,GAAG,CAACC,EAAL,EAAS,CAACD,GAAG,CAACE,UAAd,CAA/C;OADJ;;MAIAV,KA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C,EAA2C;gBACvCrC,iBAAiB,CAACiB,IAAI,CAACoB,CAAD,CAAJ,CAAQ9B,EAAT,EAAa,IAAb,CAAjB;;aAJR,MAMO;cACHP,iBAAiB,CAACM,GAAG,CAACC,EAAL,EAAS,CAACa,KAAK,CAAClB,OAAhB,CAAjB;;;YAGJQ,uBAAuB,CAAC0B,OAAxB,GAAkCP,WAAlC;WAXJ;;UAcA,OACIlB,4BAAA,CAACe,QAAD,oBACQN;YACJkB,SAAS,EAAC;YACVL,OAAO,EAAEA;;YAETf,QAAQ,EAAE,MAAM;YALpB,CADJ;SAnCR;QA6CIqB,IAAI,EAAE,UA7CV;QA8CID,SAAS,EAAE;OA/CyB,EAiDxC,GAAGxB,OAjDqC,CAA5C;;GA3BR;;EAgFAjB,MAAM,CAAC2C,UAAP,GAAoB,cAApB;EACA,OAAO3C,MAAP;AACH;;;;"}
1
+ {"version":3,"file":"useRowSelect.js","sources":["../../../../../../src/components/Table/hooks/plugins/useRowSelect.tsx"],"sourcesContent":["// this wraps react-table's internal useRowSelect hook\nimport React from 'react';\nimport { useRowSelect as useBaseRowSelect, Row, PluginHook } from 'react-table';\nimport { Checkbox } from '../../../Checkbox/Checkbox';\nimport { SelectedRowsHandler } from '../../types';\n\nconst toggleBetween = (fromRowIndex: number, toRowIndex: number): [number, number] => {\n const fromIndex = toRowIndex < fromRowIndex ? toRowIndex : fromRowIndex;\n const toIndex = toRowIndex > fromRowIndex ? toRowIndex : fromRowIndex;\n\n return [fromIndex, toIndex];\n};\n\n// react-table calls \"index paths\" row ids. we named them indexPaths to reduce confusion with natural ids\n// the selection hook usess react-table's row selection, so this hok references row.id - it is the index path\n\nexport const useRowSelect = (onSelectedRows: SelectedRowsHandler | undefined): PluginHook<{}> => {\n const plugin = (hooks: any): void => {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useBaseRowSelect(hooks);\n\n if (onSelectedRows) {\n const toggleRowSelected = (indexPath: string, checked: boolean): void =>\n onSelectedRows(state => {\n const nextState = { ...state };\n\n if (checked) {\n nextState[indexPath] = true;\n } else {\n delete nextState[indexPath];\n }\n\n return nextState;\n });\n\n const prepareRow = (row: any) => {\n row.toggleRowSelected = () => toggleRowSelected(row.id, !row.isSelected);\n };\n\n hooks.prepareRow.push(prepareRow);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const lastSelectedSortedIndex = React.useRef();\n\n hooks.visibleColumns.push((columns: any) => [\n {\n id: 'selection',\n Header: ({ getToggleAllRowsSelectedProps, rows }: any) => {\n const { onChange: _, ...props } = getToggleAllRowsSelectedProps();\n\n const onChange = (checked): void => {\n if (checked) {\n // this intentionally only selects top level rows - sub rows add too much complexity\n onSelectedRows(Object.assign({}, Array(rows.length).fill(true)));\n } else {\n onSelectedRows({});\n }\n };\n\n return <Checkbox {...props} onChange={onChange} />;\n },\n Cell: ({ row, rows }: any) => {\n const { onChange: _, ...props } = row.getToggleRowSelectedProps();\n // row.index refers to the index in the original data, not the current index\n const sortedIndex = rows.findIndex((r: Row) => r.index === row.index);\n\n const onClick = (event: React.MouseEvent): void => {\n if (event.shiftKey) {\n const [fromIndex, toIndex] = toggleBetween(lastSelectedSortedIndex.current || 0, sortedIndex);\n\n for (let i = fromIndex; i <= toIndex; i++) {\n toggleRowSelected(rows[i].id, true);\n }\n } else {\n toggleRowSelected(row.id, !props.checked);\n }\n\n lastSelectedSortedIndex.current = sortedIndex;\n };\n\n return (\n <Checkbox\n {...props}\n className=\"mt-2.5\"\n onClick={onClick}\n // this is necessary to remove console spam from eslint\n onChange={() => false}\n />\n );\n },\n flex: '0 0 36px',\n className: 'flex-col justify-start !py-0',\n },\n ...columns,\n ]);\n }\n };\n plugin.pluginName = 'useRowSelect';\n return plugin;\n};\n"],"names":["toggleBetween","fromRowIndex","toRowIndex","fromIndex","toIndex","useRowSelect","onSelectedRows","plugin","hooks","useBaseRowSelect","toggleRowSelected","indexPath","checked","state","nextState","prepareRow","row","id","isSelected","push","lastSelectedSortedIndex","React","useRef","visibleColumns","columns","Header","getToggleAllRowsSelectedProps","rows","onChange","_","props","Object","assign","Array","length","fill","Checkbox","Cell","getToggleRowSelectedProps","sortedIndex","findIndex","r","index","onClick","event","shiftKey","current","i","className","flex","pluginName"],"mappings":";;;;AAAA;;AAMA,MAAMA,aAAa,GAAG,CAACC,YAAD,EAAuBC,UAAvB;EAClB,MAAMC,SAAS,GAAGD,UAAU,GAAGD,YAAb,GAA4BC,UAA5B,GAAyCD,YAA3D;EACA,MAAMG,OAAO,GAAGF,UAAU,GAAGD,YAAb,GAA4BC,UAA5B,GAAyCD,YAAzD;EAEA,OAAO,CAACE,SAAD,EAAYC,OAAZ,CAAP;AACH,CALD;AAQA;;;MAEaC,YAAY,GAAIC,cAAD;EACxB,MAAMC,MAAM,GAAIC,KAAD;;IAEXC,cAAgB,CAACD,KAAD,CAAhB;;IAEA,IAAIF,cAAJ,EAAoB;MAChB,MAAMI,iBAAiB,GAAG,CAACC,SAAD,EAAoBC,OAApB,KACtBN,cAAc,CAACO,KAAK;QAChB,MAAMC,SAAS,GAAG,EAAE,GAAGD;SAAvB;;QAEA,IAAID,OAAJ,EAAa;UACTE,SAAS,CAACH,SAAD,CAAT,GAAuB,IAAvB;SADJ,MAEO;UACH,OAAOG,SAAS,CAACH,SAAD,CAAhB;;;QAGJ,OAAOG,SAAP;OATU,CADlB;;MAaA,MAAMC,UAAU,GAAIC,GAAD;QACfA,GAAG,CAACN,iBAAJ,GAAwB,MAAMA,iBAAiB,CAACM,GAAG,CAACC,EAAL,EAAS,CAACD,GAAG,CAACE,UAAd,CAA/C;OADJ;;MAIAV,KAAK,CAACO,UAAN,CAAiBI,IAAjB,CAAsBJ,UAAtB,EAlBgB;;MAqBhB,MAAMK,uBAAuB,GAAGC,cAAK,CAACC,MAAN,EAAhC;MAEAd,KAAK,CAACe,cAAN,CAAqBJ,IAArB,CAA2BK,OAAD,IAAkB,CACxC;QACIP,EAAE,EAAE,WADR;QAEIQ,MAAM,EAAE,CAAC;UAAEC,6BAAF;UAA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cA,oBACIlB,4BAAA,CAACe,QAAD,oBACQN;YACJkB,SAAS,EAAC;YACVL,OAAO,EAAEA;;YAETf,QAAQ,EAAE,MAAM;YALpB,CADJ;SAnCR;QA6CIqB,IAAI,EAAE,UA7CV;QA8CID,SAAS,EAAE;OA/CyB,EAiDxC,GAAGxB,OAjDqC,CAA5C;;GA3BR;;EAgFAjB,MAAM,CAAC2C,UAAP,GAAoB,cAApB;EACA,OAAO3C,MAAP;AACH;;;;"}
@@ -25,12 +25,12 @@ const Column = ({
25
25
  props['aria-sort'] = cell.isSortedDesc ? 'descending' : 'ascending';
26
26
  }
27
27
 
28
- return React__default.createElement("div", Object.assign({}, props, {
28
+ return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
29
29
  key: cell.id,
30
30
  "data-taco": "table-column"
31
- }), React__default.createElement("span", {
31
+ }), /*#__PURE__*/React__default.createElement("span", {
32
32
  className: "truncate"
33
- }, cell.render('Header')), cell.isSorted ? React__default.createElement(Icon, {
33
+ }, cell.render('Header')), cell.isSorted ? /*#__PURE__*/React__default.createElement(Icon, {
34
34
  name: cell.isSortedDesc ? 'chevron-down-solid' : 'chevron-up-solid',
35
35
  className: "-mt-0.5"
36
36
  }) : null);
@@ -1 +1 @@
1
- {"version":3,"file":"renderColumn.js","sources":["../../../../../src/components/Table/util/renderColumn.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { Icon } from '../../Icon/Icon';\n\nexport const Column = ({ cell }: any): any => {\n const props = {\n ...cell.getHeaderProps(),\n ...(cell.getSortByToggleProps && cell.getSortByToggleProps({ title: undefined })),\n className: cn('yt-table__cell flex flex-1 truncate p-2 align-middle text-grey-darkest hover:text-black', cell.className, {\n 'yt-table__cell__group': !!cell.columns,\n 'cursor-pointer': !cell.disableSorting,\n 'justify-start text-left': cell.align === 'left',\n 'justify-end text-right': cell.align === 'right',\n 'justify-center text-center': cell.align === 'center' || !cell.align,\n }),\n style: { ...cell.style, flex: cell.flex },\n };\n\n if (cell.isSorted) {\n props['aria-sort'] = cell.isSortedDesc ? 'descending' : 'ascending';\n }\n\n return (\n <div {...props} key={cell.id} data-taco=\"table-column\">\n <span className=\"truncate\">{cell.render('Header')}</span>\n {cell.isSorted ? (\n <Icon name={cell.isSortedDesc ? 'chevron-down-solid' : 'chevron-up-solid'} className=\"-mt-0.5\" />\n ) : null}\n </div>\n );\n};\n"],"names":["Column","cell","props","getHeaderProps","getSortByToggleProps","title","undefined","className","cn","columns","disableSorting","align","style","flex","isSorted","isSortedDesc","React","key","id","render","Icon","name"],"mappings":";;;;MAIaA,MAAM,GAAG,CAAC;EAAEC;AAAF,CAAD;EAClB,MAAMC,KAAK,GAAG,EACV,GAAGD,IAAI,CAACE,cAAL,EADO;IAEV,IAAIF,IAAI,CAACG,oBAAL,IAA6BH,IAAI,CAACG,oBAAL,CAA0B;MAAEC,KAAK,EAAEC;KAAnC,CAAjC,CAFU;IAGVC,SAAS,EAAEC,EAAE,CAAC,yFAAD,EAA4FP,IAAI,CAACM,SAAjG,EAA4G;MACrH,yBAAyB,CAAC,CAACN,IAAI,CAACQ,OADqF;MAErH,kBAAkB,CAACR,IAAI,CAACS,cAF6F;MAGrH,2BAA2BT,IAAI,CAACU,KAAL,KAAe,MAH2E;MAIrH,0BAA0BV,IAAI,CAACU,KAAL,KAAe,OAJ4E;MAKrH,8BAA8BV,IAAI,CAACU,KAAL,KAAe,QAAf,IAA2B,CAACV,IAAI,CAACU;KALtD,CAHH;IAUVC,KAAK,EAAE,EAAE,GAAGX,IAAI,CAACW,KAAV;MAAiBC,IAAI,EAAEZ,IAAI,CAACY;;GAVvC;;EAaA,IAAIZ,IAAI,CAACa,QAAT,EAAmB;IACfZ,KAAK,CAAC,WAAD,CAAL,GAAqBD,IAAI,CAACc,YAAL,GAAoB,YAApB,GAAmC,WAAxD;;;EAGJ,OACIC,4BAAA,MAAA,oBAASd;IAAOe,GAAG,EAAEhB,IAAI,CAACiB;iBAAc;IAAxC,EACIF,4BAAA,OAAA;IAAMT,SAAS,EAAC;GAAhB,EAA4BN,IAAI,CAACkB,MAAL,CAAY,QAAZ,CAA5B,CADJ,EAEKlB,IAAI,CAACa,QAAL,GACGE,4BAAA,CAACI,IAAD;IAAMC,IAAI,EAAEpB,IAAI,CAACc,YAAL,GAAoB,oBAApB,GAA2C;IAAoBR,SAAS,EAAC;GAArF,CADH,GAEG,IAJR,CADJ;AAQH;;;;"}
1
+ {"version":3,"file":"renderColumn.js","sources":["../../../../../src/components/Table/util/renderColumn.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { Icon } from '../../Icon/Icon';\n\nexport const Column = ({ cell }: any): any => {\n const props = {\n ...cell.getHeaderProps(),\n ...(cell.getSortByToggleProps && cell.getSortByToggleProps({ title: undefined })),\n className: cn('yt-table__cell flex flex-1 truncate p-2 align-middle text-grey-darkest hover:text-black', cell.className, {\n 'yt-table__cell__group': !!cell.columns,\n 'cursor-pointer': !cell.disableSorting,\n 'justify-start text-left': cell.align === 'left',\n 'justify-end text-right': cell.align === 'right',\n 'justify-center text-center': cell.align === 'center' || !cell.align,\n }),\n style: { ...cell.style, flex: cell.flex },\n };\n\n if (cell.isSorted) {\n props['aria-sort'] = cell.isSortedDesc ? 'descending' : 'ascending';\n }\n\n return (\n <div {...props} key={cell.id} data-taco=\"table-column\">\n <span className=\"truncate\">{cell.render('Header')}</span>\n {cell.isSorted ? (\n <Icon name={cell.isSortedDesc ? 'chevron-down-solid' : 'chevron-up-solid'} className=\"-mt-0.5\" />\n ) : null}\n </div>\n );\n};\n"],"names":["Column","cell","props","getHeaderProps","getSortByToggleProps","title","undefined","className","cn","columns","disableSorting","align","style","flex","isSorted","isSortedDesc","React","key","id","render","Icon","name"],"mappings":";;;;MAIaA,MAAM,GAAG,CAAC;EAAEC;AAAF,CAAD;EAClB,MAAMC,KAAK,GAAG,EACV,GAAGD,IAAI,CAACE,cAAL,EADO;IAEV,IAAIF,IAAI,CAACG,oBAAL,IAA6BH,IAAI,CAACG,oBAAL,CAA0B;MAAEC,KAAK,EAAEC;KAAnC,CAAjC,CAFU;IAGVC,SAAS,EAAEC,EAAE,CAAC,yFAAD,EAA4FP,IAAI,CAACM,SAAjG,EAA4G;MACrH,yBAAyB,CAAC,CAACN,IAAI,CAACQ,OADqF;MAErH,kBAAkB,CAACR,IAAI,CAACS,cAF6F;MAGrH,2BAA2BT,IAAI,CAACU,KAAL,KAAe,MAH2E;MAIrH,0BAA0BV,IAAI,CAACU,KAAL,KAAe,OAJ4E;MAKrH,8BAA8BV,IAAI,CAACU,KAAL,KAAe,QAAf,IAA2B,CAACV,IAAI,CAACU;KALtD,CAHH;IAUVC,KAAK,EAAE,EAAE,GAAGX,IAAI,CAACW,KAAV;MAAiBC,IAAI,EAAEZ,IAAI,CAACY;;GAVvC;;EAaA,IAAIZ,IAAI,CAACa,QAAT,EAAmB;IACfZ,KAAK,CAAC,WAAD,CAAL,GAAqBD,IAAI,CAACc,YAAL,GAAoB,YAApB,GAAmC,WAAxD;;;EAGJ,oBACIC,4BAAA,MAAA,oBAASd;IAAOe,GAAG,EAAEhB,IAAI,CAACiB;iBAAc;IAAxC,eACIF,4BAAA,OAAA;IAAMT,SAAS,EAAC;GAAhB,EAA4BN,IAAI,CAACkB,MAAL,CAAY,QAAZ,CAA5B,CADJ,EAEKlB,IAAI,CAACa,QAAL,gBACGE,4BAAA,CAACI,IAAD;IAAMC,IAAI,EAAEpB,IAAI,CAACc,YAAL,GAAoB,oBAApB,GAA2C;IAAoBR,SAAS,EAAC;GAArF,CADH,GAEG,IAJR,CADJ;AAQH;;;;"}
@@ -14,7 +14,7 @@ const renderCell = (cell, row) => {
14
14
  flex: typeof cell.column.flex === 'function' ? cell.column.flex(row) : cell.column.flex
15
15
  }
16
16
  };
17
- return React__default.createElement("div", Object.assign({}, props, {
17
+ return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
18
18
  role: "gridcell",
19
19
  "data-taco": "table-cell"
20
20
  }), cell.render('Cell') || null);
@@ -66,21 +66,21 @@ const Row = /*#__PURE__*/React__default.forwardRef(function TableRow({
66
66
  cells = row.cells.filter(cell => !cell.column.hiddenOnSubRows);
67
67
  }
68
68
 
69
- const expandedRow = rowExpansionRenderer && row.isExpanded && React__default.createElement("div", null, rowExpansionRenderer(sanitizedRow, instance));
69
+ const expandedRow = rowExpansionRenderer && row.isExpanded && /*#__PURE__*/React__default.createElement("div", null, rowExpansionRenderer(sanitizedRow, instance));
70
70
  const rowContent = React__default.useMemo(() => {
71
- return React__default.createElement(React__default.Fragment, null, React__default.createElement(FocusScope, {
71
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(FocusScope, {
72
72
  key: row.original._createKey,
73
73
  contain: true,
74
74
  restoreFocus: true,
75
75
  autoFocus: true
76
- }, React__default.createElement("div", Object.assign({}, props, {
76
+ }, /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
77
77
  role: "row",
78
78
  ref: ref
79
- }), React__default.createElement("input", {
79
+ }), /*#__PURE__*/React__default.createElement("input", {
80
80
  type: "hidden",
81
81
  name: "_rowIndexPath",
82
82
  value: row.id
83
- }), React__default.createElement("input", {
83
+ }), /*#__PURE__*/React__default.createElement("input", {
84
84
  type: "hidden",
85
85
  name: "_inlineEditingUniqueId",
86
86
  value: row.original[inlineEditingUniqueId]
@@ -91,7 +91,7 @@ const Row = /*#__PURE__*/React__default.forwardRef(function TableRow({
91
91
  return rowContent;
92
92
  }
93
93
 
94
- return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", Object.assign({}, props, {
94
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
95
95
  role: "row",
96
96
  ref: ref
97
97
  }), cells.map(cell => renderCell(cell, sanitizedRow))), expandedRow);
@@ -1 +1 @@
1
- {"version":3,"file":"renderRow.js","sources":["../../../../../src/components/Table/util/renderRow.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { FocusScope } from '@react-aria/focus';\nimport { InternalTableCell, TableRow } from '../types';\nimport { sanitizeRowProps } from '../util';\n\nconst renderCell = (cell: InternalTableCell, row: TableRow<any>): JSX.Element => {\n const props = {\n ...cell.getCellProps(),\n className: cn('yt-table__cell flex-1 truncate p-2 align-middle', cell.column.className, {\n 'justify-start text-left': cell.column.align === 'left',\n 'justify-end text-right': cell.column.align === 'right',\n 'text-center': !cell.column.align,\n }),\n style: {\n ...cell.column.style,\n flex: typeof cell.column.flex === 'function' ? cell.column.flex(row) : cell.column.flex,\n },\n };\n return (\n <div {...props} role=\"gridcell\" data-taco=\"table-cell\">\n {cell.render('Cell') || null}\n </div>\n );\n};\n\nexport const Row = React.forwardRef(function TableRow({ row, index, instance, headerGroups, ...rowProps }: any, ref: any) {\n const {\n activeIndex,\n onRowClick,\n rowClassName,\n rowExpansionRenderer,\n rowHeight,\n setActiveIndex,\n style,\n inlineEditingUniqueId,\n } = rowProps;\n const sanitizedRow = sanitizeRowProps(row, rowExpansionRenderer);\n\n const props = {\n ...row.getRowProps(),\n style: {\n ...style,\n minHeight: rowHeight ? `${rowHeight}px` : undefined,\n paddingLeft: row.depth ? `${row.depth * 2}rem` : undefined,\n },\n className: cn(\n 'yt-table__row border-grey-light flex border-b min-h-[2.5rem] hover:bg-grey-light',\n {\n 'yt-table__row--active bg-grey-light hover:bg-grey-light': activeIndex === index,\n 'yt-table__row--clickable': !!onRowClick,\n 'yt-table__row--dragging': !!row.isDragging,\n 'yt-table__row--editing': !!row.isEditing,\n },\n typeof rowClassName === 'function' ? rowClassName(sanitizedRow) : rowClassName\n ),\n onClick: onRowClick\n ? (event: React.MouseEvent<HTMLElement>) => {\n if (\n event.target === event.currentTarget ||\n (event.target as HTMLElement).classList.contains('yt-table__cell')\n ) {\n event.preventDefault();\n event.persist();\n setActiveIndex(index);\n onRowClick(sanitizedRow);\n }\n }\n : () => {\n setActiveIndex(index);\n },\n };\n\n let cells = row.cells;\n\n if (row.depth > 0) {\n cells = row.cells.filter((cell: any) => !cell.column.hiddenOnSubRows);\n }\n\n const expandedRow = rowExpansionRenderer && row.isExpanded && <div>{rowExpansionRenderer(sanitizedRow, instance)}</div>;\n const rowContent = React.useMemo(() => {\n return (\n <>\n <FocusScope key={row.original._createKey} contain restoreFocus autoFocus>\n <div {...props} role=\"row\" ref={ref}>\n <input type=\"hidden\" name=\"_rowIndexPath\" value={row.id} />\n <input type=\"hidden\" name=\"_inlineEditingUniqueId\" value={row.original[inlineEditingUniqueId]} />\n {cells.map((cell: InternalTableCell) => renderCell(cell, sanitizedRow))}\n </div>\n </FocusScope>\n {expandedRow}\n </>\n );\n }, [row.original._createKey]);\n\n if (row.isEditing) {\n return rowContent;\n }\n\n return (\n <>\n <div {...props} role=\"row\" ref={ref}>\n {cells.map((cell: InternalTableCell) => renderCell(cell, sanitizedRow))}\n </div>\n {expandedRow}\n </>\n );\n});\n"],"names":["renderCell","cell","row","props","getCellProps","className","cn","column","align","style","flex","React","role","render","Row","forwardRef","TableRow","index","instance","headerGroups","rowProps","ref","activeIndex","onRowClick","rowClassName","rowExpansionRenderer","rowHeight","setActiveIndex","inlineEditingUniqueId","sanitizedRow","sanitizeRowProps","getRowProps","minHeight","undefined","paddingLeft","depth","isDragging","isEditing","onClick","event","target","currentTarget","classList","contains","preventDefault","persist","cells","filter","hiddenOnSubRows","expandedRow","isExpanded","rowContent","useMemo","FocusScope","key","original","_createKey","contain","restoreFocus","autoFocus","type","name","value","id","map"],"mappings":";;;;;AAMA,MAAMA,UAAU,GAAG,CAACC,IAAD,EAA0BC,GAA1B;EACf,MAAMC,KAAK,GAAG,EACV,GAAGF,IAAI,CAACG,YAAL,EADO;IAEVC,SAAS,EAAEC,EAAE,CAAC,iDAAD,EAAoDL,IAAI,CAACM,MAAL,CAAYF,SAAhE,EAA2E;MACpF,2BAA2BJ,IAAI,CAACM,MAAL,CAAYC,KAAZ,KAAsB,MADmC;MAEpF,0BAA0BP,IAAI,CAACM,MAAL,CAAYC,KAAZ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G,CAAC6D;KAArD,CADJ,EAEIpD,4BAAA,QAAA;MAAOiD,IAAI,EAAC;MAASC,IAAI,EAAC;MAAyBC,KAAK,EAAE5D,GAAG,CAACqD,QAAJ,CAAa3B,qBAAb;KAA1D,CAFJ,EAGKkB,KAAK,CAACkB,GAAN,CAAW/D,IAAD,IAA6BD,UAAU,CAACC,IAAD,EAAO4B,YAAP,CAAjD,CAHL,CADJ,CADJ,EAQKoB,WARL,CADJ;GADe,EAahB,CAAC/C,GAAG,CAACqD,QAAJ,CAAaC,UAAd,CAbgB,CAAnB;;EAeA,IAAItD,GAAG,CAACmC,SAAR,EAAmB;IACf,OAAOc,UAAP;;;EAGJ,OACIxC,4BAAA,wBAAA,MAAA,EACIA,4BAAA,MAAA,oBAASR;IAAOS,IAAI,EAAC;IAAMS,GAAG,EAAEA;IAAhC,EACKyB,KAAK,CAACkB,GAAN,CAAW/D,IAAD,IAA6BD,UAAU,CAACC,IAAD,EAAO4B,YAAP,CAAjD,CADL,CADJ,EAIKoB,WAJL,CADJ;AAQH,CAjFkB;;;;"}
1
+ {"version":3,"file":"renderRow.js","sources":["../../../../../src/components/Table/util/renderRow.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { FocusScope } from '@react-aria/focus';\nimport { InternalTableCell, TableRow } from '../types';\nimport { sanitizeRowProps } from '../util';\n\nconst renderCell = (cell: InternalTableCell, row: TableRow<any>): JSX.Element => {\n const props = {\n ...cell.getCellProps(),\n className: cn('yt-table__cell flex-1 truncate p-2 align-middle', cell.column.className, {\n 'justify-start text-left': cell.column.align === 'left',\n 'justify-end text-right': cell.column.align === 'right',\n 'text-center': !cell.column.align,\n }),\n style: {\n ...cell.column.style,\n flex: typeof cell.column.flex === 'function' ? cell.column.flex(row) : cell.column.flex,\n },\n };\n return (\n <div {...props} role=\"gridcell\" data-taco=\"table-cell\">\n {cell.render('Cell') || null}\n </div>\n );\n};\n\nexport const Row = React.forwardRef(function TableRow({ row, index, instance, headerGroups, ...rowProps }: any, ref: any) {\n const {\n activeIndex,\n onRowClick,\n rowClassName,\n rowExpansionRenderer,\n rowHeight,\n setActiveIndex,\n style,\n inlineEditingUniqueId,\n } = rowProps;\n const sanitizedRow = sanitizeRowProps(row, rowExpansionRenderer);\n\n const props = {\n ...row.getRowProps(),\n style: {\n ...style,\n minHeight: rowHeight ? `${rowHeight}px` : undefined,\n paddingLeft: row.depth ? `${row.depth * 2}rem` : undefined,\n },\n className: cn(\n 'yt-table__row border-grey-light flex border-b min-h-[2.5rem] hover:bg-grey-light',\n {\n 'yt-table__row--active bg-grey-light hover:bg-grey-light': activeIndex === index,\n 'yt-table__row--clickable': !!onRowClick,\n 'yt-table__row--dragging': !!row.isDragging,\n 'yt-table__row--editing': !!row.isEditing,\n },\n typeof rowClassName === 'function' ? rowClassName(sanitizedRow) : rowClassName\n ),\n onClick: onRowClick\n ? (event: React.MouseEvent<HTMLElement>) => {\n if (\n event.target === event.currentTarget ||\n (event.target as HTMLElement).classList.contains('yt-table__cell')\n ) {\n event.preventDefault();\n event.persist();\n setActiveIndex(index);\n onRowClick(sanitizedRow);\n }\n }\n : () => {\n setActiveIndex(index);\n },\n };\n\n let cells = row.cells;\n\n if (row.depth > 0) {\n cells = row.cells.filter((cell: any) => !cell.column.hiddenOnSubRows);\n }\n\n const expandedRow = rowExpansionRenderer && row.isExpanded && <div>{rowExpansionRenderer(sanitizedRow, instance)}</div>;\n const rowContent = React.useMemo(() => {\n return (\n <>\n <FocusScope key={row.original._createKey} contain restoreFocus autoFocus>\n <div {...props} role=\"row\" ref={ref}>\n <input type=\"hidden\" name=\"_rowIndexPath\" value={row.id} />\n <input type=\"hidden\" name=\"_inlineEditingUniqueId\" value={row.original[inlineEditingUniqueId]} />\n {cells.map((cell: InternalTableCell) => renderCell(cell, sanitizedRow))}\n </div>\n </FocusScope>\n {expandedRow}\n </>\n );\n }, [row.original._createKey]);\n\n if (row.isEditing) {\n return rowContent;\n }\n\n return (\n <>\n <div {...props} role=\"row\" ref={ref}>\n {cells.map((cell: InternalTableCell) => renderCell(cell, sanitizedRow))}\n </div>\n {expandedRow}\n </>\n );\n});\n"],"names":["renderCell","cell","row","props","getCellProps","className","cn","column","align","style","flex","React","role","render","Row","forwardRef","TableRow","index","instance","headerGroups","rowProps","ref","activeIndex","onRowClick","rowClassName","rowExpansionRenderer","rowHeight","setActiveIndex","inlineEditingUniqueId","sanitizedRow","sanitizeRowProps","getRowProps","minHeight","undefined","paddingLeft","depth","isDragging","isEditing","onClick","event","target","currentTarget","classList","contains","preventDefault","persist","cells","filter","hiddenOnSubRows","expandedRow","isExpanded","rowContent","useMemo","FocusScope","key","original","_createKey","contain","restoreFocus","autoFocus","type","name","value","id","map"],"mappings":";;;;;AAMA,MAAMA,UAAU,GAAG,CAACC,IAAD,EAA0BC,GAA1B;EACf,MAAMC,KAAK,GAAG,EACV,GAAGF,IAAI,CAACG,YAAL,EADO;IAEVC,SAAS,EAAEC,EAAE,CAAC,iDAAD,EAAoDL,IAAI,CAACM,MAAL,CAAYF,SAAhE,EAA2E;MACpF,2BAA2BJ,IAAI,CAACM,MAAL,CAAYC,KAAZ,KAAsB,MADmC;MAEpF,0BAA0BP,IAAI,CAACM,MAAL,CAAYC,KAAZ,KAAsB,OAFoC;MAGpF,eAAe,CAACP,IAAI,CAACM,MAAL,CAAYC;KAHnB,CAFH;IAOVC,KAAK,EAAE,EACH,GAAGR,IAAI,CAACM,MAAL,CAAYE,KADZ;MAEHC,IAAI,EAAE,OAAOT,IAAI,CAACM,MAAL,CAAYG,IAAnB,KAA4B,UAA5B,GAAyCT,IAAI,CAACM,MAAL,CAAYG,IAAZ,CAAiBR,GAAjB,CAAzC,GAAiED,IAAI,CAACM,MAAL,CAAYG;;GAT3F;EAYA,oBACIC,4BAAA,MAAA,oBAASR;IAAOS,IAAI,EAAC;iBAAqB;IAA1C,EACKX,IAAI,CAACY,MAAL,CAAY,MAAZ,KAAuB,IAD5B,CADJ;AAKH,CAlBD;;MAoBaC,GAAG,g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oBAASR;IAAOS,IAAI,EAAC;IAAMS,GAAG,EAAEA;IAAhC,EACKyB,KAAK,CAACkB,GAAN,CAAW/D,IAAD,IAA6BD,UAAU,CAACC,IAAD,EAAO4B,YAAP,CAAjD,CADL,CADJ,EAIKoB,WAJL,CADJ;AAQH,CAjFkB;;;;"}
@@ -14,7 +14,7 @@ const Tabs = /*#__PURE__*/forwardRef(function Tabs(props, ref) {
14
14
  const className = cn('yt-tabs', `yt-tabs--${orientation}`, {
15
15
  'flex w-full': orientation === 'vertical'
16
16
  }, props.className);
17
- return createElement(Root, Object.assign({}, otherProps, {
17
+ return /*#__PURE__*/createElement(Root, Object.assign({}, otherProps, {
18
18
  className: className,
19
19
  "data-taco": "tabs",
20
20
  defaultValue: defaultId,
@@ -27,7 +27,7 @@ const Tabs = /*#__PURE__*/forwardRef(function Tabs(props, ref) {
27
27
  });
28
28
  const TabList = /*#__PURE__*/forwardRef(function Tab(props, ref) {
29
29
  const className = cn('yt-tab__list border-b border-grey-light flex flex-row m-0 mb-4', props.className);
30
- return createElement(List, Object.assign({}, props, {
30
+ return /*#__PURE__*/createElement(List, Object.assign({}, props, {
31
31
  className: className,
32
32
  ref: ref
33
33
  }));
@@ -39,7 +39,7 @@ const TabTrigger = /*#__PURE__*/forwardRef(function Tab(props, ref) {
39
39
  ...otherProps
40
40
  } = props;
41
41
  const className = cn('yt-tab bg-transparent border-b-2 border-transparent text-grey-darkest m-0 py-2 px-4', disabled ? 'cursor-not-allowed !text-grey-darker' : 'cursor-pointer rounded-t hover:border-grey-dark aria-selected:border-blue aria-selected:text-black aria-selected:hover:border-blue-light hover:text-black active:yt-focus active:border-blue focus:yt-focus focus:border-blue', props.className);
42
- return createElement(Trigger, Object.assign({}, otherProps, {
42
+ return /*#__PURE__*/createElement(Trigger, Object.assign({}, otherProps, {
43
43
  className: className,
44
44
  disabled: disabled,
45
45
  ref: ref,
@@ -55,7 +55,7 @@ const TabContent = /*#__PURE__*/forwardRef(function Tab(props, ref) {
55
55
  ...otherProps
56
56
  } = props;
57
57
  const className = cn('yt-tab__panel outline-none', props.className);
58
- return createElement(Content, Object.assign({}, otherProps, {
58
+ return /*#__PURE__*/createElement(Content, Object.assign({}, otherProps, {
59
59
  className: className,
60
60
  ref: ref,
61
61
  value: id
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sources":["../../../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { Orientation } from '../../types';\nimport './Tabs.css';\n\nexport type TabsProps = React.HTMLAttributes<HTMLDivElement> & {\n /**\n * The controlled value of the tab to activate. Should be used in conjunction with `onChange`.\n */\n id?: string;\n /**\n * Set which tab is selected on mount.\n * This has to be one of the existing ids provided for tabs\n */\n defaultId?: string;\n /**\n * Content should be one or an array of `Tabs.Trigger` components inside `Tabs.List` and then\n * followed by one or an array of `Tabs.Content`.\n * *Note* that there can also be tabs that are rendered conditionally.\n */\n children: React.ReactNode;\n /**\n * Define orientation of tabs.\n * @defaultValue horizontal\n */\n orientation?: Orientation;\n /**\n * Callback that is called when tab is changed.\n */\n onChange?: (id: string) => void;\n};\n\nexport type TabListProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport type TabTriggerProps = React.HTMLAttributes<HTMLButtonElement> & {\n /**\n * A unique value that associates the trigger with a content.\n */\n id: string;\n /**\n * When true, prevents the user from interacting with the tab.\n */\n disabled?: boolean;\n};\n\nexport type TabContentProps = React.HTMLAttributes<HTMLDivElement> & {\n /**\n * A unique value that associates the content with a trigger.\n */\n id: string;\n};\n\nexport type ForwardedTabsWithStatics = React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>> & {\n /** Tab list component containing all tab triggers, rendered in a `Tabs` group component */\n List: React.ForwardRefExoticComponent<TabListProps & React.RefAttributes<HTMLDivElement>>;\n /** Tab trigger component rendered in a `Tabs.List` component */\n Trigger: React.ForwardRefExoticComponent<TabTriggerProps & React.RefAttributes<HTMLButtonElement>>;\n /** Tab content component rendered in a `Tabs` group component */\n Content: React.ForwardRefExoticComponent<TabContentProps & React.RefAttributes<HTMLDivElement>>;\n};\n\nexport const Tabs = React.forwardRef(function Tabs(props: TabsProps, ref: React.Ref<HTMLDivElement>) {\n const { id, defaultId, children, onChange, orientation = 'horizontal', ...otherProps } = props;\n const className = cn(\n 'yt-tabs',\n `yt-tabs--${orientation}`,\n {\n 'flex w-full': orientation === 'vertical',\n },\n props.className\n );\n\n return (\n <TabsPrimitive.Root\n {...otherProps}\n className={className}\n data-taco=\"tabs\"\n defaultValue={defaultId}\n dir=\"ltr\"\n onValueChange={onChange}\n orientation={orientation}\n ref={ref}\n value={id}>\n {children}\n </TabsPrimitive.Root>\n );\n}) as ForwardedTabsWithStatics;\n\nconst TabList = React.forwardRef(function Tab(props: TabListProps, ref: React.Ref<HTMLDivElement>) {\n const className = cn('yt-tab__list border-b border-grey-light flex flex-row m-0 mb-4', props.className);\n\n return <TabsPrimitive.List {...props} className={className} ref={ref} />;\n});\n\nconst TabTrigger = React.forwardRef(function Tab(props: TabTriggerProps, ref: React.Ref<HTMLButtonElement>) {\n const { id, disabled, ...otherProps } = props;\n const className = cn(\n 'yt-tab bg-transparent border-b-2 border-transparent text-grey-darkest m-0 py-2 px-4',\n disabled\n ? 'cursor-not-allowed !text-grey-darker'\n : 'cursor-pointer rounded-t hover:border-grey-dark aria-selected:border-blue aria-selected:text-black aria-selected:hover:border-blue-light hover:text-black active:yt-focus active:border-blue focus:yt-focus focus:border-blue',\n props.className\n );\n\n return (\n <TabsPrimitive.Trigger\n {...otherProps}\n className={className}\n disabled={disabled}\n ref={ref}\n style={{\n transition: 'border 0.2s ease-in',\n }}\n value={id}\n />\n );\n});\n\nconst TabContent = React.forwardRef(function Tab(props: TabContentProps, ref: React.Ref<HTMLDivElement>) {\n const { id, ...otherProps } = props;\n const className = cn('yt-tab__panel outline-none', props.className);\n\n return <TabsPrimitive.Content {...otherProps} className={className} ref={ref} value={id} />;\n});\n\nTabs.List = TabList;\nTabs.Trigger = TabTrigger;\nTabs.Content = TabContent;\n"],"names":["Tabs","React","props","ref","id","defaultId","children","onChange","orientation","otherProps","className","cn","TabsPrimitive","defaultValue","dir","onValueChange","value","TabList","Tab","TabTrigger","disabled","style","transition","TabContent","List","Trigger","Content"],"mappings":";;;;MA+DaA,IAAI,gBAAGC,UAAA,CAAiB,SAASD,IAAT,CAAcE,KAAd,EAAgCC,GAAhC;EACjC,MAAM;IAAEC,EAAF;IAAMC,SAAN;IAAiBC,QAAjB;IAA2BC,QAA3B;IAAqCC,WAAW,GAAG,YAAnD;IAAiE,GAAGC;MAAeP,KAAzF;EACA,MAAMQ,SAAS,GAAGC,EAAE,CAChB,SADgB,cAEJH,aAFI,EAGhB;IACI,eAAeA,WAAW,KAAK;GAJnB,EAMhBN,KAAK,CAACQ,SANU,CAApB;EASA,OACIT,aAAA,CAACW,IAAD,oBACQH;IACJC,SAAS,EAAEA;iBACD;IACVG,YAAY,EAAER;IACdS,GAAG,EAAC;IACJC,aAAa,EAAER;IACfC,WAAW,EAAEA;IACbL,GAAG,EAAEA;IACLa,KAAK,EAAEZ;IATX,EAUKE,QAVL,CADJ;AAcH,CAzBmB;AA2BpB,MAAMW,OAAO,gBAAGhB,UAAA,CAAiB,SAASiB,GAAT,CAAahB,KAAb,EAAkCC,GAAlC;EAC7B,MAAMO,SAAS,GAAGC,EAAE,CAAC,gEAAD,EAAmET,KAAK,CAACQ,SAAzE,CAApB;EAEA,OAAOT,aAAA,CAACW,IAAD,oBAAwBV;IAAOQ,SAAS,EAAEA;IAAWP,GAAG,EAAEA;IAA1D,CAAP;AACH,CAJe,CAAhB;AAMA,MAAMgB,UAAU,gBAAGlB,UAAA,CAAiB,SAASiB,GAAT,CAAahB,KAAb,EAAqCC,GAArC;EAChC,MAAM;IAAEC,EAAF;IAAMgB,QAAN;IAAgB,GAAGX;MAAeP,KAAxC;EACA,MAAMQ,SAAS,GAAGC,EAAE,CAChB,qFADgB,EAEhBS,QAAQ,GACF,sCADE,GAEF,+NAJU,EAKhBlB,KAAK,CAACQ,SALU,CAApB;EAQA,OACIT,aAAA,CAACW,OAAD,oBACQH;IACJC,SAAS,EAAEA;IACXU,QAAQ,EAAEA;IACVjB,GAAG,EAAEA;IACLkB,KAAK,EAAE;MACHC,UAAU,EAAE;;IAEhBN,KAAK,EAAEZ;IARX,CADJ;AAYH,CAtBkB,CAAnB;AAwBA,MAAMmB,UAAU,gBAAGtB,UAAA,CAAiB,SAASiB,GAAT,CAAahB,KAAb,EAAqCC,GAArC;EAChC,MAAM;IAAEC,EAAF;IAAM,GAAGK;MAAeP,KAA9B;EACA,MAAMQ,SAAS,GAAGC,EAAE,CAAC,4BAAD,EAA+BT,KAAK,CAACQ,SAArC,CAApB;EAEA,OAAOT,aAAA,CAACW,OAAD,oBAA2BH;IAAYC,SAAS,EAAEA;IAAWP,GAAG,EAAEA;IAAKa,KAAK,EAAEZ;IAA9E,CAAP;AACH,CALkB,CAAnB;AAOAJ,IAAI,CAACwB,IAAL,GAAYP,OAAZ;AACAjB,IAAI,CAACyB,OAAL,GAAeN,UAAf;AACAnB,IAAI,CAAC0B,OAAL,GAAeH,UAAf;;;;"}
1
+ {"version":3,"file":"Tabs.js","sources":["../../../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { Orientation } from '../../types';\nimport './Tabs.css';\n\nexport type TabsProps = React.HTMLAttributes<HTMLDivElement> & {\n /**\n * The controlled value of the tab to activate. Should be used in conjunction with `onChange`.\n */\n id?: string;\n /**\n * Set which tab is selected on mount.\n * This has to be one of the existing ids provided for tabs\n */\n defaultId?: string;\n /**\n * Content should be one or an array of `Tabs.Trigger` components inside `Tabs.List` and then\n * followed by one or an array of `Tabs.Content`.\n * *Note* that there can also be tabs that are rendered conditionally.\n */\n children: React.ReactNode;\n /**\n * Define orientation of tabs.\n * @defaultValue horizontal\n */\n orientation?: Orientation;\n /**\n * Callback that is called when tab is changed.\n */\n onChange?: (id: string) => void;\n};\n\nexport type TabListProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport type TabTriggerProps = React.HTMLAttributes<HTMLButtonElement> & {\n /**\n * A unique value that associates the trigger with a content.\n */\n id: string;\n /**\n * When true, prevents the user from interacting with the tab.\n */\n disabled?: boolean;\n};\n\nexport type TabContentProps = React.HTMLAttributes<HTMLDivElement> & {\n /**\n * A unique value that associates the content with a trigger.\n */\n id: string;\n};\n\nexport type ForwardedTabsWithStatics = React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>> & {\n /** Tab list component containing all tab triggers, rendered in a `Tabs` group component */\n List: React.ForwardRefExoticComponent<TabListProps & React.RefAttributes<HTMLDivElement>>;\n /** Tab trigger component rendered in a `Tabs.List` component */\n Trigger: React.ForwardRefExoticComponent<TabTriggerProps & React.RefAttributes<HTMLButtonElement>>;\n /** Tab content component rendered in a `Tabs` group component */\n Content: React.ForwardRefExoticComponent<TabContentProps & React.RefAttributes<HTMLDivElement>>;\n};\n\nexport const Tabs = React.forwardRef(function Tabs(props: TabsProps, ref: React.Ref<HTMLDivElement>) {\n const { id, defaultId, children, onChange, orientation = 'horizontal', ...otherProps } = props;\n const className = cn(\n 'yt-tabs',\n `yt-tabs--${orientation}`,\n {\n 'flex w-full': orientation === 'vertical',\n },\n props.className\n );\n\n return (\n <TabsPrimitive.Root\n {...otherProps}\n className={className}\n data-taco=\"tabs\"\n defaultValue={defaultId}\n dir=\"ltr\"\n onValueChange={onChange}\n orientation={orientation}\n ref={ref}\n value={id}>\n {children}\n </TabsPrimitive.Root>\n );\n}) as ForwardedTabsWithStatics;\n\nconst TabList = React.forwardRef(function Tab(props: TabListProps, ref: React.Ref<HTMLDivElement>) {\n const className = cn('yt-tab__list border-b border-grey-light flex flex-row m-0 mb-4', props.className);\n\n return <TabsPrimitive.List {...props} className={className} ref={ref} />;\n});\n\nconst TabTrigger = React.forwardRef(function Tab(props: TabTriggerProps, ref: React.Ref<HTMLButtonElement>) {\n const { id, disabled, ...otherProps } = props;\n const className = cn(\n 'yt-tab bg-transparent border-b-2 border-transparent text-grey-darkest m-0 py-2 px-4',\n disabled\n ? 'cursor-not-allowed !text-grey-darker'\n : 'cursor-pointer rounded-t hover:border-grey-dark aria-selected:border-blue aria-selected:text-black aria-selected:hover:border-blue-light hover:text-black active:yt-focus active:border-blue focus:yt-focus focus:border-blue',\n props.className\n );\n\n return (\n <TabsPrimitive.Trigger\n {...otherProps}\n className={className}\n disabled={disabled}\n ref={ref}\n style={{\n transition: 'border 0.2s ease-in',\n }}\n value={id}\n />\n );\n});\n\nconst TabContent = React.forwardRef(function Tab(props: TabContentProps, ref: React.Ref<HTMLDivElement>) {\n const { id, ...otherProps } = props;\n const className = cn('yt-tab__panel outline-none', props.className);\n\n return <TabsPrimitive.Content {...otherProps} className={className} ref={ref} value={id} />;\n});\n\nTabs.List = TabList;\nTabs.Trigger = TabTrigger;\nTabs.Content = TabContent;\n"],"names":["Tabs","React","props","ref","id","defaultId","children","onChange","orientation","otherProps","className","cn","TabsPrimitive","defaultValue","dir","onValueChange","value","TabList","Tab","TabTrigger","disabled","style","transition","TabContent","List","Trigger","Content"],"mappings":";;;;MA+DaA,IAAI,gBAAGC,UAAA,CAAiB,SAASD,IAAT,CAAcE,KAAd,EAAgCC,GAAhC;EACjC,MAAM;IAAEC,EAAF;IAAMC,SAAN;IAAiBC,QAAjB;IAA2BC,QAA3B;IAAqCC,WAAW,GAAG,YAAnD;IAAiE,GAAGC;MAAeP,KAAzF;EACA,MAAMQ,SAAS,GAAGC,EAAE,CAChB,SADgB,cAEJH,aAFI,EAGhB;IACI,eAAeA,WAAW,KAAK;GAJnB,EAMhBN,KAAK,CAACQ,SANU,CAApB;EASA,oBACIT,aAAA,CAACW,IAAD,oBACQH;IACJC,SAAS,EAAEA;iBACD;IACVG,YAAY,EAAER;IACdS,GAAG,EAAC;IACJC,aAAa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,GAAYP,OAAZ;AACAjB,IAAI,CAACyB,OAAL,GAAeN,UAAf;AACAnB,IAAI,CAAC0B,OAAL,GAAeH,UAAf;;;;"}
@@ -0,0 +1,53 @@
1
+ import React__default from 'react';
2
+ import cn from 'classnames';
3
+ import { Icon } from '../Icon/Icon.js';
4
+ import { Tooltip } from '../Tooltip/Tooltip.js';
5
+ import { colors } from '../../utils/colors.js';
6
+ import { useIsRefOverflowing } from '../../hooks/useIsRefOverflowing.js';
7
+
8
+ const Tag = /*#__PURE__*/React__default.forwardRef((props, ref) => {
9
+ const {
10
+ children,
11
+ color,
12
+ disabled,
13
+ icon,
14
+ readOnly,
15
+ onDelete,
16
+ ...otherProps
17
+ } = props;
18
+ const textRef = React__default.useRef(null);
19
+ const isOverflowed = useIsRefOverflowing(textRef);
20
+ const className = cn('inline-flex items-center rounded h-6 cursor-default', {
21
+ 'bg-opacity-50': disabled,
22
+ 'hover:bg-opacity-75': !disabled,
23
+ 'cursor-pointer': !!otherProps.onClick,
24
+ 'pointer-events-none': disabled || readOnly
25
+ }, color ? colors[color] : 'bg-grey-dark', props.className);
26
+ const content = /*#__PURE__*/React__default.createElement("span", Object.assign({}, otherProps, {
27
+ className: className,
28
+ ref: ref
29
+ }), /*#__PURE__*/React__default.createElement("span", {
30
+ className: "truncate px-2",
31
+ ref: textRef
32
+ }, icon ? typeof icon === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
33
+ name: icon,
34
+ className: "mr-1 -ml-1 -mt-0.5 !h-5 !w-5"
35
+ }) : /*#__PURE__*/React__default.cloneElement(icon, {
36
+ className: 'mr-1 -ml-1 -mt-0.5 !h-5 !w-5'
37
+ }) : null, children), onDelete ? /*#__PURE__*/React__default.createElement(Icon, {
38
+ name: "close",
39
+ onClick: onDelete,
40
+ className: "-ml-1.5 !h-6 !w-5 flex-shrink-0 cursor-pointer rounded-r p-0.5 hover:bg-black/5"
41
+ }) : null);
42
+
43
+ if (isOverflowed) {
44
+ return /*#__PURE__*/React__default.createElement(Tooltip, {
45
+ title: children
46
+ }, content);
47
+ }
48
+
49
+ return content;
50
+ });
51
+
52
+ export { Tag };
53
+ //# sourceMappingURL=Tag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.js","sources":["../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { Color, colors } from '../../utils/colors';\nimport { Icon, IconName, IconProps } from '../Icon/Icon';\nimport { Tooltip } from '../Tooltip/Tooltip';\nimport { useIsRefOverflowing } from '../../hooks/useIsRefOverflowing';\n\nexport type TagProps = Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> & {\n children: string;\n color?: Color;\n disabled?: boolean;\n icon?: React.ReactElement<IconProps> | IconName;\n readOnly?: boolean;\n onDelete?: (event: React.MouseEvent<SVGSVGElement>) => void;\n};\n\nexport const Tag = React.forwardRef<HTMLSpanElement, TagProps>((props, ref) => {\n const { children, color, disabled, icon, readOnly, onDelete, ...otherProps } = props;\n const textRef = React.useRef<HTMLDivElement>(null);\n const isOverflowed = useIsRefOverflowing(textRef);\n\n const className = cn(\n 'inline-flex items-center rounded h-6 cursor-default',\n {\n 'bg-opacity-50': disabled,\n 'hover:bg-opacity-75': !disabled,\n 'cursor-pointer': !!otherProps.onClick,\n 'pointer-events-none': disabled || readOnly,\n },\n color ? colors[color] : 'bg-grey-dark',\n props.className\n );\n\n const content = (\n <span {...otherProps} className={className} ref={ref}>\n <span className=\"truncate px-2\" ref={textRef}>\n {icon ? (\n typeof icon === 'string' ? (\n <Icon name={icon} className=\"mr-1 -ml-1 -mt-0.5 !h-5 !w-5\" />\n ) : (\n React.cloneElement(icon, { className: 'mr-1 -ml-1 -mt-0.5 !h-5 !w-5' })\n )\n ) : null}\n {children}\n </span>\n {onDelete ? (\n <Icon\n name=\"close\"\n onClick={onDelete}\n className=\"-ml-1.5 !h-6 !w-5 flex-shrink-0 cursor-pointer rounded-r p-0.5 hover:bg-black/5\"\n />\n ) : null}\n </span>\n );\n\n if (isOverflowed) {\n return <Tooltip title={children}>{content}</Tooltip>;\n }\n\n return content;\n});\n"],"names":["Tag","React","forwardRef","props","ref","children","color","disabled","icon","readOnly","onDelete","otherProps","textRef","useRef","isOverflowed","useIsRefOverflowing","className","cn","onClick","colors","content","Icon","name","cloneElement","Tooltip","title"],"mappings":";;;;;;;MAgBaA,GAAG,gBAAGC,cAAK,CAACC,UAAN,CAA4C,CAACC,KAAD,EAAQC,GAAR;EAC3D,MAAM;IAAEC,QAAF;IAAYC,KAAZ;IAAmBC,QAAnB;IAA6BC,IAA7B;IAAmCC,QAAnC;IAA6CC,QAA7C;IAAuD,GAAGC;MAAeR,KAA/E;EACA,MAAMS,OAAO,GAAGX,cAAK,CAACY,MAAN,CAA6B,IAA7B,CAAhB;EACA,MAAMC,YAAY,GAAGC,mBAAmB,CAACH,OAAD,CAAxC;EAEA,MAAMI,SAAS,GAAGC,EAAE,CAChB,qDADgB,EAEhB;IACI,iBAAiBV,QADrB;IAEI,uBAAuB,CAACA,QAF5B;IAGI,kBAAkB,CAAC,CAACI,UAAU,CAACO,OAHnC;IAII,uBAAuBX,QAAQ,IAAIE;GANvB,EAQhBH,KAAK,GAAGa,MAAM,CAACb,KAAD,CAAT,GAAmB,cARR,EAShBH,KAAK,CAACa,SATU,CAApB;EAYA,MAAMI,OAAO,gBACTnB,4BAAA,OAAA,oBAAUU;IAAYK,SAAS,EAAEA;IAAWZ,GAAG,EAAEA;IAAjD,eACIH,4BAAA,OAAA;IAAMe,SAAS,EAAC;IAAgBZ,GAAG,EAAEQ;GAArC,EACKJ,IAAI,GACD,OAAOA,IAAP,KAAgB,QAAhB,gBACIP,4BAAA,CAACoB,IAAD;IAAMC,IAAI,EAAEd;IAAMQ,SAAS,EAAC;GAA5B,CADJ,gBAGIf,cAAK,CAACsB,YAAN,CAAmBf,IAAnB,EAAyB;IAAEQ,SAAS,EAAE;GAAtC,CAJH,GAMD,IAPR,EAQKX,QARL,CADJ,EAWKK,QAAQ,gBACLT,4BAAA,CAACoB,IAAD;IACIC,IAAI,EAAC;IACLJ,OAAO,EAAER;IACTM,SAAS,EAAC;GAHd,CADK,GAML,IAjBR,CADJ;;EAsBA,IAAIF,YAAJ,EAAkB;IACd,oBAAOb,4BAAA,CAACuB,OAAD;MAASC,KAAK,EAAEpB;KAAhB,EAA2Be,OAA3B,CAAP;;;EAGJ,OAAOA,OAAP;AACH,CA5CkB;;;;"}
@@ -27,7 +27,7 @@ const Textarea = /*#__PURE__*/forwardRef(function Textarea(props, ref) {
27
27
  }
28
28
  };
29
29
 
30
- return createElement("textarea", Object.assign({}, otherProps, {
30
+ return /*#__PURE__*/createElement("textarea", Object.assign({}, otherProps, {
31
31
  className: classNames,
32
32
  "data-taco": "textarea",
33
33
  onKeyDown: handleKeyDown,
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.js","sources":["../../../../src/components/Textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport { getInputClasses } from '../Input/util';\n\nexport type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & {\n /** Draws attention to the textarea by changing its style and making it visually prominent */\n highlighted?: boolean;\n /* Whether the input is in an invalid state */\n invalid?: boolean;\n /** Value of the textarea */\n value?: string;\n};\n\nexport const Textarea = React.forwardRef(function Textarea(props: TextareaProps, ref: React.Ref<HTMLTextAreaElement>) {\n const { defaultValue: _, highlighted, invalid, onKeyDown, ...otherProps } = props;\n const classNames = cn(getInputClasses(props), 'py-1 min-h-[75px] disabled:resize-none', props.className);\n\n // home and end keys only navigate to the start/end of textarea value if the textarea container does not scroll\n // if it has scroll height then the browser reverts to native scrolling behaviour only\n // so we manually override it to ensure _our_ desired behaviour remains intact\n const handleKeyDown = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault();\n const position = event.key === 'End' ? event.currentTarget.value.length : 0;\n event.currentTarget.setSelectionRange(position, position);\n event.currentTarget.scrollTop = event.key === 'End' ? event.currentTarget.scrollHeight : 0;\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n return <textarea {...otherProps} className={classNames} data-taco=\"textarea\" onKeyDown={handleKeyDown} ref={ref} />;\n});\n"],"names":["Textarea","React","props","ref","defaultValue","_","highlighted","invalid","onKeyDown","otherProps","classNames","cn","getInputClasses","className","handleKeyDown","event","key","preventDefault","position","currentTarget","value","length","setSelectionRange","scrollTop","scrollHeight"],"mappings":";;;;MAaaA,QAAQ,gBAAGC,UAAA,CAAiB,SAASD,QAAT,CAAkBE,KAAlB,EAAwCC,GAAxC;EACrC,MAAM;IAAEC,YAAY,EAAEC,CAAhB;IAAmBC,WAAnB;IAAgCC,OAAhC;IAAyCC,SAAzC;IAAoD,GAAGC;MAAeP,KAA5E;EACA,MAAMQ,UAAU,GAAGC,EAAE,CAACC,eAAe,CAACV,KAAD,CAAhB,EAAyB,wCAAzB,EAAmEA,KAAK,CAACW,SAAzE,CAArB;;;;EAKA,MAAMC,aAAa,GAAIC,KAAD;IAClB,IAAIA,KAAK,CAACC,GAAN,KAAc,MAAd,IAAwBD,KAAK,CAACC,GAAN,KAAc,KAA1C,EAAiD;MAC7CD,KAAK,CAACE,cAAN;MACA,MAAMC,QAAQ,GAAGH,KAAK,CAACC,GAAN,KAAc,KAAd,GAAsBD,KAAK,CAACI,aAAN,CAAoBC,KAApB,CAA0BC,MAAhD,GAAyD,CAA1E;MACAN,KAAK,CAACI,aAAN,CAAoBG,iBAApB,CAAsCJ,QAAtC,EAAgDA,QAAhD;MACAH,KAAK,CAACI,aAAN,CAAoBI,SAApB,GAAgCR,KAAK,CAACC,GAAN,KAAc,KAAd,GAAsBD,KAAK,CAACI,aAAN,CAAoBK,YAA1C,GAAyD,CAAzF;;;IAGJ,IAAIhB,SAAJ,EAAe;MACXA,SAAS,CAACO,KAAD,CAAT;;GATR;;EAaA,OAAOd,aAAA,WAAA,oBAAcQ;IAAYI,SAAS,EAAEH;iBAAsB;IAAWF,SAAS,EAAEM;IAAeX,GAAG,EAAEA;IAArG,CAAP;AACH,CArBuB;;;;"}
1
+ {"version":3,"file":"Textarea.js","sources":["../../../../src/components/Textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport { getInputClasses } from '../Input/util';\n\nexport type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & {\n /** Draws attention to the textarea by changing its style and making it visually prominent */\n highlighted?: boolean;\n /* Whether the input is in an invalid state */\n invalid?: boolean;\n /** Value of the textarea */\n value?: string;\n};\n\nexport const Textarea = React.forwardRef(function Textarea(props: TextareaProps, ref: React.Ref<HTMLTextAreaElement>) {\n const { defaultValue: _, highlighted, invalid, onKeyDown, ...otherProps } = props;\n const classNames = cn(getInputClasses(props), 'py-1 min-h-[75px] disabled:resize-none', props.className);\n\n // home and end keys only navigate to the start/end of textarea value if the textarea container does not scroll\n // if it has scroll height then the browser reverts to native scrolling behaviour only\n // so we manually override it to ensure _our_ desired behaviour remains intact\n const handleKeyDown = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault();\n const position = event.key === 'End' ? event.currentTarget.value.length : 0;\n event.currentTarget.setSelectionRange(position, position);\n event.currentTarget.scrollTop = event.key === 'End' ? event.currentTarget.scrollHeight : 0;\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n return <textarea {...otherProps} className={classNames} data-taco=\"textarea\" onKeyDown={handleKeyDown} ref={ref} />;\n});\n"],"names":["Textarea","React","props","ref","defaultValue","_","highlighted","invalid","onKeyDown","otherProps","classNames","cn","getInputClasses","className","handleKeyDown","event","key","preventDefault","position","currentTarget","value","length","setSelectionRange","scrollTop","scrollHeight"],"mappings":";;;;MAaaA,QAAQ,gBAAGC,UAAA,CAAiB,SAASD,QAAT,CAAkBE,KAAlB,EAAwCC,GAAxC;EACrC,MAAM;IAAEC,YAAY,EAAEC,CAAhB;IAAmBC,WAAnB;IAAgCC,OAAhC;IAAyCC,SAAzC;IAAoD,GAAGC;MAAeP,KAA5E;EACA,MAAMQ,UAAU,GAAGC,EAAE,CAACC,eAAe,CAACV,KAAD,CAAhB,EAAyB,wCAAzB,EAAmEA,KAAK,CAACW,SAAzE,CAArB;;;;EAKA,MAAMC,aAAa,GAAIC,KAAD;IAClB,IAAIA,KAAK,CAACC,GAAN,KAAc,MAAd,IAAwBD,KAAK,CAACC,GAAN,KAAc,KAA1C,EAAiD;MAC7CD,KAAK,CAACE,cAAN;MACA,MAAMC,QAAQ,GAAGH,KAAK,CAACC,GAAN,KAAc,KAAd,GAAsBD,KAAK,CAACI,aAAN,CAAoBC,KAApB,CAA0BC,MAAhD,GAAyD,CAA1E;MACAN,KAAK,CAACI,aAAN,CAAoBG,iBAApB,CAAsCJ,QAAtC,EAAgDA,QAAhD;MACAH,KAAK,CAACI,aAAN,CAAoBI,SAApB,GAAgCR,KAAK,CAACC,GAAN,KAAc,KAAd,GAAsBD,KAAK,CAACI,aAAN,CAAoBK,YAA1C,GAAyD,CAAzF;;;IAGJ,IAAIhB,SAAJ,EAAe;MACXA,SAAS,CAACO,KAAD,CAAT;;GATR;;EAaA,oBAAOd,aAAA,WAAA,oBAAcQ;IAAYI,SAAS,EAAEH;iBAAsB;IAAWF,SAAS,EAAEM;IAAeX,GAAG,EAAEA;IAArG,CAAP;AACH,CArBuB;;;;"}
@@ -63,15 +63,15 @@ const Toast = ({
63
63
  }
64
64
  }
65
65
  }, [lastUpdated]);
66
- return React__default.createElement(motion.div, Object.assign({}, props, {
66
+ return /*#__PURE__*/React__default.createElement(motion.div, Object.assign({}, props, {
67
67
  animate: controls,
68
68
  className: className,
69
69
  "data-taco": "toast",
70
70
  onMouseEnter: timer.pause,
71
71
  onMouseLeave: timer.resume
72
- }), getBadgeIcon(type), React__default.createElement("div", {
72
+ }), getBadgeIcon(type), /*#__PURE__*/React__default.createElement("div", {
73
73
  className: "flex-grow"
74
- }, content), React__default.createElement(IconButton, {
74
+ }, content), /*#__PURE__*/React__default.createElement(IconButton, {
75
75
  appearance: "discrete",
76
76
  className: "text-grey-darkest -mr-2 cursor-pointer self-start !px-0",
77
77
  icon: "close",
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.js","sources":["../../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { motion, useAnimation } from 'framer-motion';\nimport useTimer from '../../utils/hooks/useTimer';\nimport { getBadgeIcon } from './util';\nimport { State } from '../../types';\nimport { useLocalization } from '../Provider/Provider';\nimport { IconButton } from '../IconButton/IconButton';\n\nexport type ToastsTexts = {\n /** Aria-label for the close icon button of toast */\n dismiss: string;\n};\n\nexport type ToastType = Omit<State, 'default'> | 'loading';\nexport type ToastOptions = {\n /** Provide time in milliseconds after which the toast should autoclose */\n autoClose?: number;\n /**\n * State will change the icon displayed in toast and other characteristics,\n * for e.g. `loading` state will display a progress animation.\n * Default value is `default`\n */\n type?: ToastType;\n};\nexport type ToastContent = Omit<React.ReactNode, 'null' | 'undefined'>;\nexport type ToastProps = {\n /** Provide a unique id for toast */\n id: string;\n /**\n * Content can be any valid react node, for e.g. a `div`, or a simple text.\n */\n content: ToastContent;\n /** Additional options to define your toast */\n options: ToastOptions;\n /**\n * Handler called when toast closes.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n onClose: () => void;\n lastUpdated?: number;\n lastDuplicateId?: string;\n};\n\nexport const Toast = ({ content, lastUpdated, onClose: handleClose, options, ...props }: ToastProps): JSX.Element => {\n const { texts } = useLocalization();\n const { autoClose, type = 'default' } = options;\n const className = cn('bg-white relative flex items-center py-1 px-2 mt-3 w-full rounded yt-shadow', {\n 'border border-grey': type === 'default' || type === 'loading' || !type,\n 'border border-grey-darker': type === 'success',\n 'border border-blue': type === 'information',\n 'border border-yellow-dark': type === 'warning',\n 'border border-red': type === 'error',\n });\n const timer = useTimer(autoClose, handleClose);\n const controls = useAnimation();\n\n if (!content) {\n console.warn(\n `Toast requires 'content' property, which can't be empty string, null or undefined. Current content value is set to ${\n content === '' ? 'empty string' : content\n }.`\n );\n }\n\n React.useEffect(() => {\n if (autoClose) {\n timer.start();\n }\n }, [autoClose]);\n\n const triggerUpdateAnimation = async () => {\n await controls.start({ scale: 1.05 });\n await controls.start({ scale: 1 });\n };\n\n React.useEffect(() => {\n if (lastUpdated) {\n triggerUpdateAnimation();\n\n if (timer.running) {\n timer.start();\n }\n }\n }, [lastUpdated]);\n\n return (\n <motion.div\n {...props}\n animate={controls}\n className={className}\n data-taco=\"toast\"\n onMouseEnter={timer.pause}\n onMouseLeave={timer.resume}>\n {getBadgeIcon(type)}\n <div className=\"flex-grow\">{content}</div>\n <IconButton\n appearance=\"discrete\"\n className=\"text-grey-darkest -mr-2 cursor-pointer self-start !px-0\"\n icon=\"close\"\n aria-label={texts.toasts.dismiss}\n onClick={handleClose}\n />\n </motion.div>\n );\n};\n"],"names":["Toast","content","lastUpdated","onClose","handleClose","options","props","texts","useLocalization","autoClose","type","className","cn","timer","useTimer","controls","useAnimation","console","warn","React","useEffect","start","triggerUpdateAnimation","scale","running","motion","div","animate","onMouseEnter","pause","onMouseLeave","resume","getBadgeIcon","IconButton","appearance","icon","toasts","dismiss","onClick"],"mappings":";;;;;;;;MA4CaA,KAAK,GAAG,CAAC;EAAEC,OAAF;EAAWC,WAAX;EAAwBC,OAAO,EAAEC,WAAjC;EAA8CC,OAA9C;EAAuD,GAAGC;AAA1D,CAAD;EACjB,MAAM;IAAEC;MAAUC,eAAe,EAAjC;EACA,MAAM;IAAEC,SAAF;IAAaC,IAAI,GAAG;MAAcL,OAAxC;EACA,MAAMM,SAAS,GAAGC,EAAE,CAAC,6EAAD,EAAgF;IAChG,sBAAsBF,IAAI,KAAK,SAAT,IAAsBA,IAAI,KAAK,SAA/B,IAA4C,CAACA,IAD6B;IAEhG,6BAA6BA,IAAI,KAAK,SAF0D;IAGhG,sBAAsBA,IAAI,KAAK,aAHiE;IAIhG,6BAA6BA,IAAI,KAAK,SAJ0D;I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ourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { motion, useAnimation } from 'framer-motion';\nimport useTimer from '../../utils/hooks/useTimer';\nimport { getBadgeIcon } from './util';\nimport { State } from '../../types';\nimport { useLocalization } from '../Provider/Provider';\nimport { IconButton } from '../IconButton/IconButton';\n\nexport type ToastsTexts = {\n /** Aria-label for the close icon button of toast */\n dismiss: string;\n};\n\nexport type ToastType = Omit<State, 'default'> | 'loading';\nexport type ToastOptions = {\n /** Provide time in milliseconds after which the toast should autoclose */\n autoClose?: number;\n /**\n * State will change the icon displayed in toast and other characteristics,\n * for e.g. `loading` state will display a progress animation.\n * Default value is `default`\n */\n type?: ToastType;\n};\nexport type ToastContent = Omit<React.ReactNode, 'null' | 'undefined'>;\nexport type ToastProps = {\n /** Provide a unique id for toast */\n id: string;\n /**\n * Content can be any valid react node, for e.g. a `div`, or a simple text.\n */\n content: ToastContent;\n /** Additional options to define your toast */\n options: ToastOptions;\n /**\n * Handler called when toast closes.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n onClose: () => void;\n lastUpdated?: number;\n lastDuplicateId?: string;\n};\n\nexport const Toast = ({ content, lastUpdated, onClose: handleClose, options, ...props }: ToastProps): JSX.Element => {\n const { texts } = useLocalization();\n const { autoClose, type = 'default' } = options;\n const className = cn('bg-white relative flex items-center py-1 px-2 mt-3 w-full rounded yt-shadow', {\n 'border border-grey': type === 'default' || type === 'loading' || !type,\n 'border border-grey-darker': type === 'success',\n 'border border-blue': type === 'information',\n 'border border-yellow-dark': type === 'warning',\n 'border border-red': type === 'error',\n });\n const timer = useTimer(autoClose, handleClose);\n const controls = useAnimation();\n\n if (!content) {\n console.warn(\n `Toast requires 'content' property, which can't be empty string, null or undefined. Current content value is set to ${\n content === '' ? 'empty string' : content\n }.`\n );\n }\n\n React.useEffect(() => {\n if (autoClose) {\n timer.start();\n }\n }, [autoClose]);\n\n const triggerUpdateAnimation = async () => {\n await controls.start({ scale: 1.05 });\n await controls.start({ scale: 1 });\n };\n\n React.useEffect(() => {\n if (lastUpdated) {\n triggerUpdateAnimation();\n\n if (timer.running) {\n timer.start();\n }\n }\n }, [lastUpdated]);\n\n return (\n <motion.div\n {...props}\n animate={controls}\n className={className}\n data-taco=\"toast\"\n onMouseEnter={timer.pause}\n onMouseLeave={timer.resume}>\n {getBadgeIcon(type)}\n <div className=\"flex-grow\">{content}</div>\n <IconButton\n appearance=\"discrete\"\n className=\"text-grey-darkest -mr-2 cursor-pointer self-start !px-0\"\n icon=\"close\"\n aria-label={texts.toasts.dismiss}\n onClick={handleClose}\n />\n </motion.div>\n );\n};\n"],"names":["Toast","content","lastUpdated","onClose","handleClose","options","props","texts","useLocalization","autoClose","type","className","cn","timer","useTimer","controls","useAnimation","console","warn","React","useEffect","start","triggerUpdateAnimation","scale","running","motion","div","animate","onMouseEnter","pause","onMouseLeave","resume","getBadgeIcon","IconButton","appearance","icon","toasts","dismiss","onClick"],"mappings":";;;;;;;;MA4CaA,KAAK,GAAG,CAAC;EAAEC,OAAF;EAAWC,WAAX;EAAwBC,OAAO,EAAEC,WAAjC;EAA8CC,OAA9C;EAAuD,GAAGC;AAA1D,CAAD;EACjB,MAAM;IAAEC;MAAUC,eAAe,EAAjC;EACA,MAAM;IAAEC,SAAF;IAAaC,IAAI,GAAG;MAAcL,OAAxC;EACA,MAAMM,SAAS,GAAGC,EAAE,CAAC,6EAAD,EAAgF;IAChG,sBAAsBF,IAAI,KAAK,SAAT,IAAsBA,IAAI,KAAK,SAA/B,IAA4C,CAACA,IAD6B;IAEhG,6BAA6BA,IAAI,KAAK,SAF0D;IAGhG,sBAAsBA,IAAI,KAAK,aAHiE;IAIhG,6BAA6BA,IAAI,KAAK,SAJ0D;IAKhG,qBAAqBA,IAAI,KAAK;GALd,CAApB;EAOA,MAAMG,KAAK,GAAGC,QAAQ,CAACL,SAAD,EAAYL,WAAZ,CAAtB;EACA,MAAMW,QAAQ,GAAGC,YAAY,EAA7B;;EAEA,IAAI,CAACf,OAAL,EAAc;IACVgB,OAAO,CAACC,IAAR,uHAEQjB,OAAO,KAAK,EAAZ,GAAiB,cAAjB,GAAkCA,UAF1C;;;EAOJkB,cAAK,CAACC,SAAN,CAAgB;IACZ,IAAIX,SAAJ,EAAe;MACXI,KAAK,CAACQ,KAAN;;GAFR,EAIG,CAACZ,SAAD,CAJH;;EAMA,MAAMa,sBAAsB;IAAA;6BAClBP,QAAQ,CAACM,KAAT,CAAe;QAAEE,KAAK,EAAE;OAAxB;+BACAR,QAAQ,CAACM,KAAT,CAAe;UAAEE,KAAK,EAAE;SAAxB;;KAFkB;MAAA;;GAA5B;;EAKAJ,cAAK,CAACC,SAAN,CAAgB;IACZ,IAAIlB,WAAJ,EAAiB;MACboB,sBAAsB;;MAEtB,IAAIT,KAAK,CAACW,OAAV,EAAmB;QACfX,KAAK,CAACQ,KAAN;;;GALZ,EAQG,CAACnB,WAAD,CARH;EAUA,oBACIiB,4BAAA,CAACM,MAAM,CAACC,GAAR,oBACQpB;IACJqB,OAAO,EAAEZ;IACTJ,SAAS,EAAEA;iBACD;IACViB,YAAY,EAAEf,KAAK,CAACgB;IACpBC,YAAY,EAAEjB,KAAK,CAACkB;IANxB,EAOKC,YAAY,CAACtB,IAAD,CAPjB,eAQIS,4BAAA,MAAA;IAAKR,SAAS,EAAC;GAAf,EAA4BV,OAA5B,CARJ,eASIkB,4BAAA,CAACc,UAAD;IACIC,UAAU,EAAC;IACXvB,SAAS,EAAC;IACVwB,IAAI,EAAC;kBACO5B,KAAK,CAAC6B,MAAN,CAAaC;IACzBC,OAAO,EAAElC;GALb,CATJ,CADJ;AAmBH;;;;"}
@@ -121,15 +121,15 @@ const ToastProvider = ({
121
121
  type: 'loading'
122
122
  });
123
123
  }, []);
124
- return createElement(ToastContext.Provider, Object.assign({}, props, {
124
+ return /*#__PURE__*/createElement(ToastContext.Provider, Object.assign({}, props, {
125
125
  value: toaster
126
- }), children, createElement("div", {
126
+ }), children, /*#__PURE__*/createElement("div", {
127
127
  id: "yt-toast__container",
128
128
  className: "pointer-events-all absolute bottom-0 right-0 !left-auto z-[1000] mb-4 mr-4 flex max-w-md flex-col items-end justify-end",
129
129
  role: "log"
130
- }, createElement(AnimatePresence, {
130
+ }, /*#__PURE__*/createElement(AnimatePresence, {
131
131
  initial: false
132
- }, toasts.map(toast => createElement(motion.div, {
132
+ }, toasts.map(toast => /*#__PURE__*/createElement(motion.div, {
133
133
  key: toast.id,
134
134
  transition: {
135
135
  type: 'spring',
@@ -153,7 +153,7 @@ const ToastProvider = ({
153
153
  duration: 0.2
154
154
  }
155
155
  }
156
- }, createElement(Toast, Object.assign({}, toast, {
156
+ }, /*#__PURE__*/createElement(Toast, Object.assign({}, toast, {
157
157
  onClose: () => handleClose(toast.id)
158
158
  })))))));
159
159
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Toaster.js","sources":["../../../../src/components/Toast/Toaster.tsx"],"sourcesContent":["import * as React from 'react';\nimport { v4 as uuid } from 'uuid';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { ToastOptions, Toast, ToastProps, ToastContent } from './Toast';\nimport './Toast.css';\n\nconst DEFAULT_AUTO_CLOSE_TIMEOUT = 7500;\n\ntype ToastCreator<T> = (content: ToastContent | ((close: () => void) => ToastContent), options?: ToastOptions) => T;\n\nexport interface Toaster<T> extends ToastCreator<T> {\n success: ToastCreator<T>;\n error: ToastCreator<T>;\n warning: ToastCreator<T>;\n information: ToastCreator<T>;\n loading: ToastCreator<T>;\n}\n\nexport interface ToastReference {\n /** Show a success toast */\n success: ToastCreator<void>;\n /** Show an error toast */\n error: ToastCreator<void>;\n /** Show a warning toast */\n warning: ToastCreator<void>;\n /** Show an information toast */\n information: ToastCreator<void>;\n /** Show a loading toast */\n loading: ToastCreator<void>;\n /**\n * Close an existing toast.\n * The toast function returns a reference to the active toast,\n * allowing you to programmatically close it when needed\n */\n close: () => void;\n}\n\nconst ToastContext = React.createContext<Toaster<ToastReference>>({} as Toaster<ToastReference>);\n\nexport interface ToastProviderProps {\n children: React.ReactNode;\n}\n\ntype InternalToast = Omit<ToastProps, 'onClose'>;\n\nconst insertToastWithoutDuplicates = (\n currentToasts: InternalToast[],\n id: string,\n content: ToastContent,\n options: ToastOptions,\n close: () => void\n): InternalToast[] => {\n const nextToasts = [...currentToasts];\n const existingToastIndex = currentToasts.findIndex(toast => JSON.stringify(toast.content) === JSON.stringify(content));\n\n if (existingToastIndex > -1) {\n nextToasts[existingToastIndex].lastDuplicateId = id;\n nextToasts[existingToastIndex].lastUpdated = Date.now();\n } else {\n nextToasts.push({\n id,\n content: typeof content === 'function' ? content(close) : content,\n options,\n });\n }\n\n return nextToasts;\n};\n\nexport const ToastProvider = ({ children, ...props }: ToastProviderProps): JSX.Element => {\n const [toasts, setToasts] = React.useState<InternalToast[]>([]);\n\n const handleClose = (id: string): void => {\n setToasts(currentToasts => currentToasts.filter(toast => toast.id !== id));\n };\n\n // memoize (useCallback) this function,\n // it is the value of the context provider and we don't want it to trigger state tree re-renders on provider children\n const toaster = React.useCallback((content: ToastContent, options: ToastOptions): ToastReference => {\n const id = uuid();\n const close = (): void => handleClose(id);\n\n setToasts(currentToasts => insertToastWithoutDuplicates(currentToasts, id, content, options, close));\n\n const update = (content: ToastContent, options: ToastOptions): void => {\n setToasts(currentToasts => {\n const nextToasts = currentToasts.filter(toast => {\n if (toast.lastDuplicateId) {\n return toast.lastDuplicateId !== id;\n }\n\n return toast.id !== id;\n });\n return insertToastWithoutDuplicates(nextToasts, uuid(), content, options, close);\n });\n };\n\n const success = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): void => {\n update(content, { autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT, ...options, type: 'success' });\n };\n const error = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): void => {\n update(content, { ...options, type: 'error' });\n };\n const warning = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): void => {\n update(content, { ...options, type: 'warning' });\n };\n const information = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): void => {\n update(content, { ...options, type: 'information' });\n };\n const loading = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): void => {\n update(content, { ...options, type: 'loading' });\n };\n\n return {\n success,\n error,\n warning,\n information,\n loading,\n close,\n };\n }, []) as Toaster<ToastReference>;\n\n // no need to rebind these every render, do them once in an effect\n React.useEffect(() => {\n toaster.success = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): ToastReference =>\n toaster(content, { autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT, ...options, type: 'success' });\n toaster.error = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): ToastReference =>\n toaster(content, { ...options, type: 'error' });\n toaster.warning = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): ToastReference =>\n toaster(content, { ...options, type: 'warning' });\n toaster.information = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): ToastReference =>\n toaster(content, { ...options, type: 'information' });\n toaster.loading = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): ToastReference =>\n toaster(content, { ...options, type: 'loading' });\n }, []);\n\n return (\n <ToastContext.Provider {...props} value={toaster}>\n {children}\n <div\n id=\"yt-toast__container\"\n className=\"pointer-events-all absolute bottom-0 right-0 !left-auto z-[1000] mb-4 mr-4 flex max-w-md flex-col items-end justify-end\"\n role=\"log\">\n <AnimatePresence initial={false}>\n {toasts.map((toast: InternalToast) => (\n <motion.div\n key={toast.id}\n transition={{\n type: 'spring',\n damping: 20,\n stiffness: 300,\n }}\n initial={{ opacity: 0, y: 10, scale: 0.5 }}\n animate={{ opacity: 1, y: 0, scale: 1 }}\n exit={{ opacity: 0, scale: 0.5, transition: { duration: 0.2 } }}>\n <Toast {...toast} onClose={() => handleClose(toast.id)} />\n </motion.div>\n ))}\n </AnimatePresence>\n </div>\n </ToastContext.Provider>\n );\n};\n\nexport const useToast = (): Toaster<ToastReference> => React.useContext(ToastContext);\n"],"names":["DEFAULT_AUTO_CLOSE_TIMEOUT","ToastContext","React","insertToastWithoutDuplicates","currentToasts","id","content","options","close","nextToasts","existingToastIndex","findIndex","toast","JSON","stringify","lastDuplicateId","lastUpdated","Date","now","push","ToastProvider","children","props","toasts","setToasts","handleClose","filter","toaster","uuid","update","success","autoClose","type","error","warning","information","loading","Provider","value","className","role","AnimatePresence","initial","map","motion","div","key","transition","damping","stiffness","opacity","y","scale","animate","exit","duration","Toast","onClose","useToast"],"mappings":";;;;;AAMA,MAAMA,0BAA0B,GAAG,IAAnC;AA+BA,MAAMC,YAAY,gBAAGC,aAAA,CAA6C,EAA7C,CAArB;;AAQA,MAAMC,4BAA4B,GAAG,CACjCC,aADiC,EAEjCC,EAFiC,EAGjCC,OAHiC,EAIjCC,OAJiC,EAKjCC,KALiC;EAOjC,MAAMC,UAAU,GAAG,CAAC,GAAGL,aAAJ,CAAnB;EACA,MAAMM,kBAAkB,GAAGN,aAAa,CAACO,SAAd,CAAwBC,KAAK,IAAIC,IAAI,CAACC,SAAL,CAAeF,KAAK,CAACN,OAArB,MAAkCO,IAAI,CAACC,SAAL,CAAeR,OAAf,CAAnE,CAA3B;;EAEA,IAAII,kBAAkB,GAAG,CAAC,CAA1B,EAA6B;IACzBD,UAAU,CAACC,kBAAD,CAAV,CAA+BK,eAA/B,GAAiDV,EAAjD;IACAI,UAAU,CAACC,kBAAD,CAAV,CAA+BM,WAA/B,GAA6CC,IAAI,CAACC,GAAL,EAA7C;GAFJ,MAGO;IACHT,UAAU,CAACU,IAAX,CAAgB;MACZd,EADY;MAEZC,OAAO,EAAE,OAAOA,OAAP,KAAmB,UAAnB,GAAgCA,OAAO,CAACE,KAAD,CAAvC,GAAiDF,OAF9C;MAGZC;KAHJ;;;EAOJ,OAAOE,UAAP;AACH,CAtBD;;MAwBaW,aAAa,GAAG,CAAC;EAAEC,QAAF;EAAY,GAAGC;AAAf,CAAD;EACzB,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsBtB,QAAA,CAAgC,EAAhC,CAA5B;;EAEA,MAAMuB,WAAW,GAAIpB,EAAD;IAChBmB,SAAS,CAACpB,aAAa,IAAI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OAAL;MAAcyB,IAAI,EAAE;KAA9B,CADX;GATJ,EAWG,EAXH;EAaA,OACI9B,aAAA,CAACD,YAAY,CAACoC,QAAd,oBAA2Bf;IAAOgB,KAAK,EAAEX;IAAzC,EACKN,QADL,EAEInB,aAAA,MAAA;IACIG,EAAE,EAAC;IACHkC,SAAS,EAAC;IACVC,IAAI,EAAC;GAHT,EAIItC,aAAA,CAACuC,eAAD;IAAiBC,OAAO,EAAE;GAA1B,EACKnB,MAAM,CAACoB,GAAP,CAAY/B,KAAD,IACRV,aAAA,CAAC0C,MAAM,CAACC,GAAR;IACIC,GAAG,EAAElC,KAAK,CAACP;IACX0C,UAAU,EAAE;MACRf,IAAI,EAAE,QADE;MAERgB,OAAO,EAAE,EAFD;MAGRC,SAAS,EAAE;;IAEfP,OAAO,EAAE;MAAEQ,OAAO,EAAE,CAAX;MAAcC,CAAC,EAAE,EAAjB;MAAqBC,KAAK,EAAE;;IACrCC,OAAO,EAAE;MAAEH,OAAO,EAAE,CAAX;MAAcC,CAAC,EAAE,CAAjB;MAAoBC,KAAK,EAAE;;IACpCE,IAAI,EAAE;MAAEJ,OAAO,EAAE,CAAX;MAAcE,KAAK,EAAE,GAArB;MAA0BL,UAAU,EAAE;QAAEQ,QAAQ,EAAE;;;GAT5D,EAUIrD,aAAA,CAACsD,KAAD,oBAAW5C;IAAO6C,OAAO,EAAE,MAAMhC,WAAW,CAACb,KAAK,CAACP,EAAP;IAA5C,CAVJ,CADH,CADL,CAJJ,CAFJ,CADJ;AA0BH;MAEYqD,QAAQ,GAAG,MAA+BxD,UAAA,CAAiBD,YAAjB;;;;"}
1
+ {"version":3,"file":"Toaster.js","sources":["../../../../src/components/Toast/Toaster.tsx"],"sourcesContent":["import * as React from 'react';\nimport { v4 as uuid } from 'uuid';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { ToastOptions, Toast, ToastProps, ToastContent } from './Toast';\nimport './Toast.css';\n\nconst DEFAULT_AUTO_CLOSE_TIMEOUT = 7500;\n\ntype ToastCreator<T> = (content: ToastContent | ((close: () => void) => ToastContent), options?: ToastOptions) => T;\n\nexport interface Toaster<T> extends ToastCreator<T> {\n success: ToastCreator<T>;\n error: ToastCreator<T>;\n warning: ToastCreator<T>;\n information: ToastCreator<T>;\n loading: ToastCreator<T>;\n}\n\nexport interface ToastReference {\n /** Show a success toast */\n success: ToastCreator<void>;\n /** Show an error toast */\n error: ToastCreator<void>;\n /** Show a warning toast */\n warning: ToastCreator<void>;\n /** Show an information toast */\n information: ToastCreator<void>;\n /** Show a loading toast */\n loading: ToastCreator<void>;\n /**\n * Close an existing toast.\n * The toast function returns a reference to the active toast,\n * allowing you to programmatically close it when needed\n */\n close: () => void;\n}\n\nconst ToastContext = React.createContext<Toaster<ToastReference>>({} as Toaster<ToastReference>);\n\nexport interface ToastProviderProps {\n children: React.ReactNode;\n}\n\ntype InternalToast = Omit<ToastProps, 'onClose'>;\n\nconst insertToastWithoutDuplicates = (\n currentToasts: InternalToast[],\n id: string,\n content: ToastContent,\n options: ToastOptions,\n close: () => void\n): InternalToast[] => {\n const nextToasts = [...currentToasts];\n const existingToastIndex = currentToasts.findIndex(toast => JSON.stringify(toast.content) === JSON.stringify(content));\n\n if (existingToastIndex > -1) {\n nextToasts[existingToastIndex].lastDuplicateId = id;\n nextToasts[existingToastIndex].lastUpdated = Date.now();\n } else {\n nextToasts.push({\n id,\n content: typeof content === 'function' ? content(close) : content,\n options,\n });\n }\n\n return nextToasts;\n};\n\nexport const ToastProvider = ({ children, ...props }: ToastProviderProps): JSX.Element => {\n const [toasts, setToasts] = React.useState<InternalToast[]>([]);\n\n const handleClose = (id: string): void => {\n setToasts(currentToasts => currentToasts.filter(toast => toast.id !== id));\n };\n\n // memoize (useCallback) this function,\n // it is the value of the context provider and we don't want it to trigger state tree re-renders on provider children\n const toaster = React.useCallback((content: ToastContent, options: ToastOptions): ToastReference => {\n const id = uuid();\n const close = (): void => handleClose(id);\n\n setToasts(currentToasts => insertToastWithoutDuplicates(currentToasts, id, content, options, close));\n\n const update = (content: ToastContent, options: ToastOptions): void => {\n setToasts(currentToasts => {\n const nextToasts = currentToasts.filter(toast => {\n if (toast.lastDuplicateId) {\n return toast.lastDuplicateId !== id;\n }\n\n return toast.id !== id;\n });\n return insertToastWithoutDuplicates(nextToasts, uuid(), content, options, close);\n });\n };\n\n const success = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): void => {\n update(content, { autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT, ...options, type: 'success' });\n };\n const error = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): void => {\n update(content, { ...options, type: 'error' });\n };\n const warning = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): void => {\n update(content, { ...options, type: 'warning' });\n };\n const information = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): void => {\n update(content, { ...options, type: 'information' });\n };\n const loading = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): void => {\n update(content, { ...options, type: 'loading' });\n };\n\n return {\n success,\n error,\n warning,\n information,\n loading,\n close,\n };\n }, []) as Toaster<ToastReference>;\n\n // no need to rebind these every render, do them once in an effect\n React.useEffect(() => {\n toaster.success = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): ToastReference =>\n toaster(content, { autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT, ...options, type: 'success' });\n toaster.error = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): ToastReference =>\n toaster(content, { ...options, type: 'error' });\n toaster.warning = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): ToastReference =>\n toaster(content, { ...options, type: 'warning' });\n toaster.information = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): ToastReference =>\n toaster(content, { ...options, type: 'information' });\n toaster.loading = (content: ToastContent, options?: Omit<ToastOptions, 'type'>): ToastReference =>\n toaster(content, { ...options, type: 'loading' });\n }, []);\n\n return (\n <ToastContext.Provider {...props} value={toaster}>\n {children}\n <div\n id=\"yt-toast__container\"\n className=\"pointer-events-all absolute bottom-0 right-0 !left-auto z-[1000] mb-4 mr-4 flex max-w-md flex-col items-end justify-end\"\n role=\"log\">\n <AnimatePresence initial={false}>\n {toasts.map((toast: InternalToast) => (\n <motion.div\n key={toast.id}\n transition={{\n type: 'spring',\n damping: 20,\n stiffness: 300,\n }}\n initial={{ opacity: 0, y: 10, scale: 0.5 }}\n animate={{ opacity: 1, y: 0, scale: 1 }}\n exit={{ opacity: 0, scale: 0.5, transition: { duration: 0.2 } }}>\n <Toast {...toast} onClose={() => handleClose(toast.id)} />\n </motion.div>\n ))}\n </AnimatePresence>\n </div>\n </ToastContext.Provider>\n );\n};\n\nexport const useToast = (): Toaster<ToastReference> => React.useContext(ToastContext);\n"],"names":["DEFAULT_AUTO_CLOSE_TIMEOUT","ToastContext","React","insertToastWithoutDuplicates","currentToasts","id","content","options","close","nextToasts","existingToastIndex","findIndex","toast","JSON","stringify","lastDuplicateId","lastUpdated","Date","now","push","ToastProvider","children","props","toasts","setToasts","handleClose","filter","toaster","uuid","update","success","autoClose","type","error","warning","information","loading","Provider","value","className","role","AnimatePresence","initial","map","motion","div","key","transition","damping","stiffness","opacity","y","scale","animate","exit","duration","Toast","onClose","useToast"],"mappings":";;;;;AAMA,MAAMA,0BAA0B,GAAG,IAAnC;AA+BA,MAAMC,YAAY,gBAAGC,aAAA,CAA6C,EAA7C,CAArB;;AAQA,MAAMC,4BAA4B,GAAG,CACjCC,aADiC,EAEjCC,EAFiC,EAGjCC,OAHiC,EAIjCC,OAJiC,EAKjCC,KALiC;EAOjC,MAAMC,UAAU,GAAG,CAAC,GAAGL,aAAJ,CAAnB;EACA,MAAMM,kBAAkB,GAAGN,aAAa,CAACO,SAAd,CAAwBC,KAAK,IAAIC,IAAI,CAACC,SAAL,CAAeF,KAAK,CAACN,OAArB,MAAkCO,IAAI,CAACC,SAAL,CAAeR,OAAf,CAAnE,CAA3B;;EAEA,IAAII,kBAAkB,GAAG,CAAC,CAA1B,EAA6B;IACzBD,UAAU,CAACC,kBAAD,CAAV,CAA+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AX;MAAcE,KAAK,EAAE,GAArB;MAA0BL,UAAU,EAAE;QAAEQ,QAAQ,EAAE;;;GAT5D,eAUIrD,aAAA,CAACsD,KAAD,oBAAW5C;IAAO6C,OAAO,EAAE,MAAMhC,WAAW,CAACb,KAAK,CAACP,EAAP;IAA5C,CAVJ,CADH,CADL,CAJJ,CAFJ,CADJ;AA0BH;MAEYqD,QAAQ,GAAG,MAA+BxD,UAAA,CAAiBD,YAAjB;;;;"}
@@ -8,31 +8,31 @@ const getBadgeIcon = type => {
8
8
 
9
9
  switch (type) {
10
10
  case 'success':
11
- return React__default.createElement(Icon, {
11
+ return /*#__PURE__*/React__default.createElement(Icon, {
12
12
  name: "tick",
13
13
  className: cn(css, 'yt-green-solid ')
14
14
  });
15
15
 
16
16
  case 'warning':
17
- return React__default.createElement(Icon, {
17
+ return /*#__PURE__*/React__default.createElement(Icon, {
18
18
  name: "warning",
19
19
  className: cn(css, 'yt-yellow-solid')
20
20
  });
21
21
 
22
22
  case 'error':
23
- return React__default.createElement(Icon, {
23
+ return /*#__PURE__*/React__default.createElement(Icon, {
24
24
  name: "warning",
25
25
  className: cn(css, 'yt-red-solid')
26
26
  });
27
27
 
28
28
  case 'information':
29
- return React__default.createElement(Icon, {
29
+ return /*#__PURE__*/React__default.createElement(Icon, {
30
30
  name: "info",
31
31
  className: cn(css, 'yt-blue-solid')
32
32
  });
33
33
 
34
34
  case 'loading':
35
- return React__default.createElement(Spinner, {
35
+ return /*#__PURE__*/React__default.createElement(Spinner, {
36
36
  delay: 0,
37
37
  className: cn(css, 'h-6 w-6')
38
38
  });
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../../src/components/Toast/util.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { Icon } from '../Icon/Icon';\nimport { Spinner } from '../Spinner/Spinner';\nimport { ToastType } from './Toast';\n\nexport const getBadgeIcon = (type: ToastType): JSX.Element | null => {\n const css = 'rounded-full flex-shrink-0 mr-2 mt-1 self-start';\n\n switch (type) {\n case 'success':\n return <Icon name=\"tick\" className={cn(css, 'yt-green-solid ')} />;\n\n case 'warning':\n return <Icon name=\"warning\" className={cn(css, 'yt-yellow-solid')} />;\n\n case 'error':\n return <Icon name=\"warning\" className={cn(css, 'yt-red-solid')} />;\n\n case 'information':\n return <Icon name=\"info\" className={cn(css, 'yt-blue-solid')} />;\n\n case 'loading':\n return <Spinner delay={0} className={cn(css, 'h-6 w-6')} />;\n\n default:\n return null;\n }\n};\n"],"names":["getBadgeIcon","type","css","React","Icon","name","className","cn","Spinner","delay"],"mappings":";;;;;MAMaA,YAAY,GAAIC,IAAD;EACxB,MAAMC,GAAG,GAAG,iDAAZ;;EAEA,QAAQD,IAAR;IACI,KAAK,SAAL;MACI,OAAOE,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAOC,SAAS,EAAEC,EAAE,CAACL,GAAD,EAAM,iBAAN;OAA/B,CAAP;;IAEJ,KAAK,SAAL;MACI,OAAOC,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAUC,SAAS,EAAEC,EAAE,CAACL,GAAD,EAAM,iBAAN;OAAlC,CAAP;;IAEJ,KAAK,OAAL;MACI,OAAOC,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAUC,SAAS,EAAEC,EAAE,CAACL,GAAD,EAAM,cAAN;OAAlC,CAAP;;IAEJ,KAAK,aAAL;MACI,OAAOC,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAOC,SAAS,EAAEC,EAAE,CAACL,GAAD,EAAM,eAAN;OAA/B,CAAP;;IAEJ,KAAK,SAAL;MACI,OAAOC,4BAAA,CAACK,OAAD;QAASC,KAAK,EAAE;QAAGH,SAAS,EAAEC,EAAE,CAACL,GAAD,EAAM,SAAN;OAAhC,CAAP;;IAEJ;MACI,OAAO,IAAP;;AAEX;;;;"}
1
+ {"version":3,"file":"util.js","sources":["../../../../src/components/Toast/util.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { Icon } from '../Icon/Icon';\nimport { Spinner } from '../Spinner/Spinner';\nimport { ToastType } from './Toast';\n\nexport const getBadgeIcon = (type: ToastType): JSX.Element | null => {\n const css = 'rounded-full flex-shrink-0 mr-2 mt-1 self-start';\n\n switch (type) {\n case 'success':\n return <Icon name=\"tick\" className={cn(css, 'yt-green-solid ')} />;\n\n case 'warning':\n return <Icon name=\"warning\" className={cn(css, 'yt-yellow-solid')} />;\n\n case 'error':\n return <Icon name=\"warning\" className={cn(css, 'yt-red-solid')} />;\n\n case 'information':\n return <Icon name=\"info\" className={cn(css, 'yt-blue-solid')} />;\n\n case 'loading':\n return <Spinner delay={0} className={cn(css, 'h-6 w-6')} />;\n\n default:\n return null;\n }\n};\n"],"names":["getBadgeIcon","type","css","React","Icon","name","className","cn","Spinner","delay"],"mappings":";;;;;MAMaA,YAAY,GAAIC,IAAD;EACxB,MAAMC,GAAG,GAAG,iDAAZ;;EAEA,QAAQD,IAAR;IACI,KAAK,SAAL;MACI,oBAAOE,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAOC,SAAS,EAAEC,EAAE,CAACL,GAAD,EAAM,iBAAN;OAA/B,CAAP;;IAEJ,KAAK,SAAL;MACI,oBAAOC,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAUC,SAAS,EAAEC,EAAE,CAACL,GAAD,EAAM,iBAAN;OAAlC,CAAP;;IAEJ,KAAK,OAAL;MACI,oBAAOC,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAUC,SAAS,EAAEC,EAAE,CAACL,GAAD,EAAM,cAAN;OAAlC,CAAP;;IAEJ,KAAK,aAAL;MACI,oBAAOC,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAOC,SAAS,EAAEC,EAAE,CAACL,GAAD,EAAM,eAAN;OAA/B,CAAP;;IAEJ,KAAK,SAAL;MACI,oBAAOC,4BAAA,CAACK,OAAD;QAASC,KAAK,EAAE;QAAGH,SAAS,EAAEC,EAAE,CAACL,GAAD,EAAM,SAAN;OAAhC,CAAP;;IAEJ;MACI,OAAO,IAAP;;AAEX;;;;"}
@@ -8,22 +8,22 @@ const Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
8
8
  placement,
9
9
  ...otherProps
10
10
  } = props;
11
- return createElement(Root, {
11
+ return /*#__PURE__*/createElement(Root, {
12
12
  delayDuration: 50
13
- }, createElement(Trigger, {
13
+ }, /*#__PURE__*/createElement(Trigger, {
14
14
  asChild: true,
15
15
  ref: ref
16
- }, children), createElement(Content, Object.assign({}, otherProps, {
16
+ }, children), /*#__PURE__*/createElement(Content, Object.assign({}, otherProps, {
17
17
  asChild: true,
18
18
  side: placement,
19
19
  sideOffset: 3
20
- }), createElement("div", {
20
+ }), /*#__PURE__*/createElement("div", {
21
21
  className: "wcag-purple xs:max-w-[theme(spacing.56)] max-w-[theme(spacing.32)] animate-[fade-in_150ms] rounded-sm px-2 py-1 text-xs font-bold opacity-90",
22
22
  "data-taco": "tooltip",
23
23
  style: {
24
24
  transformOrigin: 'var(--radix-tooltip-content-transform-origin)'
25
25
  }
26
- }, createElement(Arrow, {
26
+ }, /*#__PURE__*/createElement(Arrow, {
27
27
  className: "fill-purple stroke-purple -mt-px"
28
28
  }), title)));
29
29
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nexport type TooltipProps = React.HTMLAttributes<HTMLDivElement> & {\n /** The element which activates the tooltip when hovered. Should be a single React/HTML element */\n children: React.ReactElement | any;\n /** Text displayed in the tooltip */\n title: string;\n /**\n * Placement of the tooltip relative to the reference element. Placement will be reversed if a collision occurs\n * @defaultValue bottom\n */\n placement?: 'top' | 'right' | 'bottom' | 'left';\n};\n\nexport const Tooltip = React.forwardRef(function Tooltip(props: TooltipProps, ref: React.Ref<HTMLElement>) {\n const { title, children, placement, ...otherProps } = props;\n\n return (\n <TooltipPrimitive.Root delayDuration={50}>\n <TooltipPrimitive.Trigger asChild ref={ref as any}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Content {...otherProps} asChild side={placement} sideOffset={3}>\n <div\n className=\"wcag-purple xs:max-w-[theme(spacing.56)] max-w-[theme(spacing.32)] animate-[fade-in_150ms] rounded-sm px-2 py-1 text-xs font-bold opacity-90\"\n data-taco=\"tooltip\"\n style={{\n transformOrigin: 'var(--radix-tooltip-content-transform-origin)',\n }}>\n <TooltipPrimitive.Arrow className=\"fill-purple stroke-purple -mt-px\" />\n {title}\n </div>\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Root>\n );\n});\n"],"names":["Tooltip","React","props","ref","title","children","placement","otherProps","TooltipPrimitive","delayDuration","asChild","side","sideOffset","className","style","transformOrigin"],"mappings":";;;MAeaA,OAAO,gBAAGC,UAAA,CAAiB,SAASD,OAAT,CAAiBE,KAAjB,EAAsCC,GAAtC;EACpC,MAAM;IAAEC,KAAF;IAASC,QAAT;IAAmBC,SAAnB;IAA8B,GAAGC;MAAeL,KAAtD;EAEA,OACID,aAAA,CAACO,IAAD;IAAuBC,aAAa,EAAE;GAAtC,EACIR,aAAA,CAACO,OAAD;IAA0BE,OAAO;IAACP,GAAG,EAAEA;GAAvC,EACKE,QADL,CADJ,EAIIJ,aAAA,CAACO,OAAD,oBAA8BD;IAAYG,OAAO;IAACC,IAAI,EAAEL;IAAWM,UAAU,EAAE;IAA/E,EACIX,aAAA,MAAA;IACIY,SAAS,EAAC;iBACA;IACVC,KAAK,EAAE;MACHC,eAAe,EAAE;;GAJzB,EAMId,aAAA,CAACO,KAAD;IAAwBK,SAAS,EAAC;GAAlC,CANJ,EAOKT,KAPL,CADJ,CAJJ,CADJ;AAkBH,CArBsB;;;;"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nexport type TooltipProps = React.HTMLAttributes<HTMLDivElement> & {\n /** The element which activates the tooltip when hovered. Should be a single React/HTML element */\n children: React.ReactElement | any;\n /** Text displayed in the tooltip */\n title: string;\n /**\n * Placement of the tooltip relative to the reference element. Placement will be reversed if a collision occurs\n * @defaultValue bottom\n */\n placement?: 'top' | 'right' | 'bottom' | 'left';\n};\n\nexport const Tooltip = React.forwardRef(function Tooltip(props: TooltipProps, ref: React.Ref<HTMLElement>) {\n const { title, children, placement, ...otherProps } = props;\n\n return (\n <TooltipPrimitive.Root delayDuration={50}>\n <TooltipPrimitive.Trigger asChild ref={ref as any}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Content {...otherProps} asChild side={placement} sideOffset={3}>\n <div\n className=\"wcag-purple xs:max-w-[theme(spacing.56)] max-w-[theme(spacing.32)] animate-[fade-in_150ms] rounded-sm px-2 py-1 text-xs font-bold opacity-90\"\n data-taco=\"tooltip\"\n style={{\n transformOrigin: 'var(--radix-tooltip-content-transform-origin)',\n }}>\n <TooltipPrimitive.Arrow className=\"fill-purple stroke-purple -mt-px\" />\n {title}\n </div>\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Root>\n );\n});\n"],"names":["Tooltip","React","props","ref","title","children","placement","otherProps","TooltipPrimitive","delayDuration","asChild","side","sideOffset","className","style","transformOrigin"],"mappings":";;;MAeaA,OAAO,gBAAGC,UAAA,CAAiB,SAASD,OAAT,CAAiBE,KAAjB,EAAsCC,GAAtC;EACpC,MAAM;IAAEC,KAAF;IAASC,QAAT;IAAmBC,SAAnB;IAA8B,GAAGC;MAAeL,KAAtD;EAEA,oBACID,aAAA,CAACO,IAAD;IAAuBC,aAAa,EAAE;GAAtC,eACIR,aAAA,CAACO,OAAD;IAA0BE,OAAO;IAACP,GAAG,EAAEA;GAAvC,EACKE,QADL,CADJ,eAIIJ,aAAA,CAACO,OAAD,oBAA8BD;IAAYG,OAAO;IAACC,IAAI,EAAEL;IAAWM,UAAU,EAAE;IAA/E,eACIX,aAAA,MAAA;IACIY,SAAS,EAAC;iBACA;IACVC,KAAK,EAAE;MACHC,eAAe,EAAE;;GAJzB,eAMId,aAAA,CAACO,KAAD;IAAwBK,SAAS,EAAC;GAAlC,CANJ,EAOKT,KAPL,CADJ,CAJJ,CADJ;AAkBH,CArBsB;;;;"}