@economic/taco 1.1.3 → 1.1.5-alpha.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 (405) hide show
  1. package/README.md +82 -82
  2. package/dist/esm/components/Accordion/Accordion.js.map +1 -1
  3. package/dist/esm/components/Backdrop/Backdrop.js.map +1 -1
  4. package/dist/esm/components/Badge/Badge.js.map +1 -1
  5. package/dist/esm/components/Banner/Banner.js.map +1 -1
  6. package/dist/esm/components/Banner/util.js +1 -1
  7. package/dist/esm/components/Banner/util.js.map +1 -1
  8. package/dist/esm/components/Button/Button.js.map +1 -1
  9. package/dist/esm/components/Button/util.js +18 -23
  10. package/dist/esm/components/Button/util.js.map +1 -1
  11. package/dist/esm/components/Calendar/Calendar.js.map +1 -1
  12. package/dist/esm/components/Card/Card.js +14 -12
  13. package/dist/esm/components/Card/Card.js.map +1 -1
  14. package/dist/esm/components/Checkbox/Checkbox.js +15 -18
  15. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  16. package/dist/esm/components/Combobox/Combobox.js +23 -25
  17. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  18. package/dist/esm/components/Combobox/useCombobox.js +67 -87
  19. package/dist/esm/components/Combobox/useCombobox.js.map +1 -1
  20. package/dist/esm/components/Datepicker/Datepicker.js +48 -52
  21. package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
  22. package/dist/esm/components/Datepicker/useDatepicker.js +27 -34
  23. package/dist/esm/components/Datepicker/useDatepicker.js.map +1 -1
  24. package/dist/esm/components/Dialog/Context.js +4 -4
  25. package/dist/esm/components/Dialog/Context.js.map +1 -1
  26. package/dist/esm/components/Dialog/Dialog.js +39 -58
  27. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  28. package/dist/esm/components/Dialog/components/Content.js +39 -44
  29. package/dist/esm/components/Dialog/components/Content.js.map +1 -1
  30. package/dist/esm/components/Dialog/components/Drawer.js +3 -3
  31. package/dist/esm/components/Dialog/components/Drawer.js.map +1 -1
  32. package/dist/esm/components/Dialog/components/Extra.js +2 -2
  33. package/dist/esm/components/Dialog/components/Extra.js.map +1 -1
  34. package/dist/esm/components/Dialog/components/Trigger.js +2 -2
  35. package/dist/esm/components/Dialog/components/Trigger.js.map +1 -1
  36. package/dist/esm/components/Field/Field.js +10 -12
  37. package/dist/esm/components/Field/Field.js.map +1 -1
  38. package/dist/esm/components/Form/Form.js +6 -8
  39. package/dist/esm/components/Form/Form.js.map +1 -1
  40. package/dist/esm/components/Group/Group.js +6 -8
  41. package/dist/esm/components/Group/Group.js.map +1 -1
  42. package/dist/esm/components/Hanger/Hanger.js +27 -35
  43. package/dist/esm/components/Hanger/Hanger.js.map +1 -1
  44. package/dist/esm/components/HoverCard/HoverCard.js +8 -9
  45. package/dist/esm/components/HoverCard/HoverCard.js.map +1 -1
  46. package/dist/esm/components/Icon/Icon.js +7 -8
  47. package/dist/esm/components/Icon/Icon.js.map +1 -1
  48. package/dist/esm/components/Icon/components/AccountPreview.js.map +1 -1
  49. package/dist/esm/components/Icon/components/Accounting.js.map +1 -1
  50. package/dist/esm/components/Icon/components/AccountingYear.js.map +1 -1
  51. package/dist/esm/components/Icon/components/AccountingYearCancel.js.map +1 -1
  52. package/dist/esm/components/Icon/components/ArrowBottom.js.map +1 -1
  53. package/dist/esm/components/Icon/components/ArrowDown.js.map +1 -1
  54. package/dist/esm/components/Icon/components/ArrowEnd.js.map +1 -1
  55. package/dist/esm/components/Icon/components/ArrowLeft.js.map +1 -1
  56. package/dist/esm/components/Icon/components/ArrowRight.js.map +1 -1
  57. package/dist/esm/components/Icon/components/ArrowStart.js.map +1 -1
  58. package/dist/esm/components/Icon/components/ArrowTop.js.map +1 -1
  59. package/dist/esm/components/Icon/components/ArrowUp.js.map +1 -1
  60. package/dist/esm/components/Icon/components/Attach.js.map +1 -1
  61. package/dist/esm/components/Icon/components/AttachAuto.js.map +1 -1
  62. package/dist/esm/components/Icon/components/AttachCancel.js.map +1 -1
  63. package/dist/esm/components/Icon/components/Autotext.js.map +1 -1
  64. package/dist/esm/components/Icon/components/AutotextInsert.js.map +1 -1
  65. package/dist/esm/components/Icon/components/Basic.js.map +1 -1
  66. package/dist/esm/components/Icon/components/BasicTabs.js.map +1 -1
  67. package/dist/esm/components/Icon/components/BellSolid.js.map +1 -1
  68. package/dist/esm/components/Icon/components/Book.js.map +1 -1
  69. package/dist/esm/components/Icon/components/Booking.js.map +1 -1
  70. package/dist/esm/components/Icon/components/Budget.js.map +1 -1
  71. package/dist/esm/components/Icon/components/Calendar.js.map +1 -1
  72. package/dist/esm/components/Icon/components/CashAccount.js.map +1 -1
  73. package/dist/esm/components/Icon/components/CashReports.js.map +1 -1
  74. package/dist/esm/components/Icon/components/Chat.js.map +1 -1
  75. package/dist/esm/components/Icon/components/ChatSolid.js.map +1 -1
  76. package/dist/esm/components/Icon/components/ChevronDown.js.map +1 -1
  77. package/dist/esm/components/Icon/components/ChevronDownDouble.js.map +1 -1
  78. package/dist/esm/components/Icon/components/ChevronDownSolid.js.map +1 -1
  79. package/dist/esm/components/Icon/components/ChevronLeft.js.map +1 -1
  80. package/dist/esm/components/Icon/components/ChevronLeftDouble.js.map +1 -1
  81. package/dist/esm/components/Icon/components/ChevronRight.js.map +1 -1
  82. package/dist/esm/components/Icon/components/ChevronRightDouble.js.map +1 -1
  83. package/dist/esm/components/Icon/components/ChevronUp.js.map +1 -1
  84. package/dist/esm/components/Icon/components/ChevronUpDouble.js.map +1 -1
  85. package/dist/esm/components/Icon/components/ChevronUpSolid.js.map +1 -1
  86. package/dist/esm/components/Icon/components/CircleClose.js.map +1 -1
  87. package/dist/esm/components/Icon/components/CircleMinus.js.map +1 -1
  88. package/dist/esm/components/Icon/components/CirclePlus.js.map +1 -1
  89. package/dist/esm/components/Icon/components/CircleTick.js.map +1 -1
  90. package/dist/esm/components/Icon/components/Clamp.js.map +1 -1
  91. package/dist/esm/components/Icon/components/ClampOpen.js.map +1 -1
  92. package/dist/esm/components/Icon/components/Close.js.map +1 -1
  93. package/dist/esm/components/Icon/components/ConnectionEnable.js.map +1 -1
  94. package/dist/esm/components/Icon/components/ConnectionRevoke.js.map +1 -1
  95. package/dist/esm/components/Icon/components/Contacts.js.map +1 -1
  96. package/dist/esm/components/Icon/components/Copy.js.map +1 -1
  97. package/dist/esm/components/Icon/components/Courses.js.map +1 -1
  98. package/dist/esm/components/Icon/components/Credit.js.map +1 -1
  99. package/dist/esm/components/Icon/components/Delete.js.map +1 -1
  100. package/dist/esm/components/Icon/components/DeletePermanently.js.map +1 -1
  101. package/dist/esm/components/Icon/components/Depecriate.js.map +1 -1
  102. package/dist/esm/components/Icon/components/Developer.js.map +1 -1
  103. package/dist/esm/components/Icon/components/DistributionTemplate.js.map +1 -1
  104. package/dist/esm/components/Icon/components/Document.js.map +1 -1
  105. package/dist/esm/components/Icon/components/DocumentApprove.js.map +1 -1
  106. package/dist/esm/components/Icon/components/DocumentCreateEntry.js.map +1 -1
  107. package/dist/esm/components/Icon/components/DocumentCut.js.map +1 -1
  108. package/dist/esm/components/Icon/components/DocumentError.js.map +1 -1
  109. package/dist/esm/components/Icon/components/DocumentIsolatePage.js.map +1 -1
  110. package/dist/esm/components/Icon/components/DocumentMerge.js.map +1 -1
  111. package/dist/esm/components/Icon/components/DocumentMove.js.map +1 -1
  112. package/dist/esm/components/Icon/components/DocumentPreview.js.map +1 -1
  113. package/dist/esm/components/Icon/components/DocumentReceived.js.map +1 -1
  114. package/dist/esm/components/Icon/components/DocumentRejectedRequest.js.map +1 -1
  115. package/dist/esm/components/Icon/components/DocumentSplit.js.map +1 -1
  116. package/dist/esm/components/Icon/components/DocumentTime.js.map +1 -1
  117. package/dist/esm/components/Icon/components/Download.js.map +1 -1
  118. package/dist/esm/components/Icon/components/Drag.js.map +1 -1
  119. package/dist/esm/components/Icon/components/ECopedia.js.map +1 -1
  120. package/dist/esm/components/Icon/components/ESignature.js.map +1 -1
  121. package/dist/esm/components/Icon/components/Edit.js.map +1 -1
  122. package/dist/esm/components/Icon/components/EllipsisHorizontal.js.map +1 -1
  123. package/dist/esm/components/Icon/components/EllipsisVertical.js.map +1 -1
  124. package/dist/esm/components/Icon/components/EntriesOnAccount.js.map +1 -1
  125. package/dist/esm/components/Icon/components/EntriesOpen.js.map +1 -1
  126. package/dist/esm/components/Icon/components/EntriesWarning.js.map +1 -1
  127. package/dist/esm/components/Icon/components/EntryTypeCustomerInvoice.js.map +1 -1
  128. package/dist/esm/components/Icon/components/EntryTypeCustomerPayment.js.map +1 -1
  129. package/dist/esm/components/Icon/components/EntryTypeJournalEntry.js.map +1 -1
  130. package/dist/esm/components/Icon/components/EntryTypeManualCustomerInvoice.js.map +1 -1
  131. package/dist/esm/components/Icon/components/EntryTypeSupplierInvoice.js.map +1 -1
  132. package/dist/esm/components/Icon/components/EntryTypeSupplierPayment.js.map +1 -1
  133. package/dist/esm/components/Icon/components/Envelope.js.map +1 -1
  134. package/dist/esm/components/Icon/components/EnvelopeApproved.js.map +1 -1
  135. package/dist/esm/components/Icon/components/ExpandView.js.map +1 -1
  136. package/dist/esm/components/Icon/components/Expenses.js.map +1 -1
  137. package/dist/esm/components/Icon/components/Export.js.map +1 -1
  138. package/dist/esm/components/Icon/components/ExportToExcel.js.map +1 -1
  139. package/dist/esm/components/Icon/components/ExportToPdf.js.map +1 -1
  140. package/dist/esm/components/Icon/components/Filter.js.map +1 -1
  141. package/dist/esm/components/Icon/components/FilterSolid.js.map +1 -1
  142. package/dist/esm/components/Icon/components/GraphSolid.js.map +1 -1
  143. package/dist/esm/components/Icon/components/Hash.js.map +1 -1
  144. package/dist/esm/components/Icon/components/Home.js.map +1 -1
  145. package/dist/esm/components/Icon/components/Images.js.map +1 -1
  146. package/dist/esm/components/Icon/components/Import.js.map +1 -1
  147. package/dist/esm/components/Icon/components/Inbox.js.map +1 -1
  148. package/dist/esm/components/Icon/components/InboxEinvoicing.js.map +1 -1
  149. package/dist/esm/components/Icon/components/InboxScanning.js.map +1 -1
  150. package/dist/esm/components/Icon/components/InboxSmart.js.map +1 -1
  151. package/dist/esm/components/Icon/components/Info.js.map +1 -1
  152. package/dist/esm/components/Icon/components/Inventory.js.map +1 -1
  153. package/dist/esm/components/Icon/components/InventoryMatrix.js.map +1 -1
  154. package/dist/esm/components/Icon/components/JournalPro.js.map +1 -1
  155. package/dist/esm/components/Icon/components/Layout.js.map +1 -1
  156. package/dist/esm/components/Icon/components/LayoutBoth.js.map +1 -1
  157. package/dist/esm/components/Icon/components/LayoutFirst.js.map +1 -1
  158. package/dist/esm/components/Icon/components/LayoutLast.js.map +1 -1
  159. package/dist/esm/components/Icon/components/LayoutNone.js.map +1 -1
  160. package/dist/esm/components/Icon/components/LedgerCard.js.map +1 -1
  161. package/dist/esm/components/Icon/components/LedgerCardCustomerReminder.js.map +1 -1
  162. package/dist/esm/components/Icon/components/LedgerCardManualCustomerInvoice.js.map +1 -1
  163. package/dist/esm/components/Icon/components/LedgerCardObsoleteStock.js.map +1 -1
  164. package/dist/esm/components/Icon/components/LedgerCardOpeningEntry.js.map +1 -1
  165. package/dist/esm/components/Icon/components/LedgerCardReservedEntry.js.map +1 -1
  166. package/dist/esm/components/Icon/components/LedgerCardShrinkagePilferage.js.map +1 -1
  167. package/dist/esm/components/Icon/components/LedgerCardStockAdjustment.js.map +1 -1
  168. package/dist/esm/components/Icon/components/LedgerCardTransferredOpeningEntry.js.map +1 -1
  169. package/dist/esm/components/Icon/components/Lightbulb.js.map +1 -1
  170. package/dist/esm/components/Icon/components/Line.js.map +1 -1
  171. package/dist/esm/components/Icon/components/List.js.map +1 -1
  172. package/dist/esm/components/Icon/components/ListBulleted.js.map +1 -1
  173. package/dist/esm/components/Icon/components/ListSearch.js.map +1 -1
  174. package/dist/esm/components/Icon/components/LockOpen.js.map +1 -1
  175. package/dist/esm/components/Icon/components/Log.js.map +1 -1
  176. package/dist/esm/components/Icon/components/Market.js.map +1 -1
  177. package/dist/esm/components/Icon/components/MatchAmount.js.map +1 -1
  178. package/dist/esm/components/Icon/components/MatchEntries.js.map +1 -1
  179. package/dist/esm/components/Icon/components/Mileage.js.map +1 -1
  180. package/dist/esm/components/Icon/components/ModalResize.js.map +1 -1
  181. package/dist/esm/components/Icon/components/ModalShrink.js.map +1 -1
  182. package/dist/esm/components/Icon/components/More.js.map +1 -1
  183. package/dist/esm/components/Icon/components/MoreSolid.js.map +1 -1
  184. package/dist/esm/components/Icon/components/Move.js.map +1 -1
  185. package/dist/esm/components/Icon/components/NavigationList.js.map +1 -1
  186. package/dist/esm/components/Icon/components/Note.js.map +1 -1
  187. package/dist/esm/components/Icon/components/NoteFollowUp.js.map +1 -1
  188. package/dist/esm/components/Icon/components/NoteRead.js.map +1 -1
  189. package/dist/esm/components/Icon/components/PartnerApi.js.map +1 -1
  190. package/dist/esm/components/Icon/components/Period.js.map +1 -1
  191. package/dist/esm/components/Icon/components/PersonChange.js.map +1 -1
  192. package/dist/esm/components/Icon/components/PersonMinus.js.map +1 -1
  193. package/dist/esm/components/Icon/components/PersonPlus.js.map +1 -1
  194. package/dist/esm/components/Icon/components/PersonTick.js.map +1 -1
  195. package/dist/esm/components/Icon/components/Play.js.map +1 -1
  196. package/dist/esm/components/Icon/components/PlusMinus.js.map +1 -1
  197. package/dist/esm/components/Icon/components/Print.js.map +1 -1
  198. package/dist/esm/components/Icon/components/ProcessPayment.js.map +1 -1
  199. package/dist/esm/components/Icon/components/ProductLedgerCard.js.map +1 -1
  200. package/dist/esm/components/Icon/components/ProjectCards.js.map +1 -1
  201. package/dist/esm/components/Icon/components/Projects.js.map +1 -1
  202. package/dist/esm/components/Icon/components/Quicklinks.js.map +1 -1
  203. package/dist/esm/components/Icon/components/RatingBankruptcy.js.map +1 -1
  204. package/dist/esm/components/Icon/components/RatingPaymentProblems.js.map +1 -1
  205. package/dist/esm/components/Icon/components/Reconciled.js.map +1 -1
  206. package/dist/esm/components/Icon/components/Refresh.js.map +1 -1
  207. package/dist/esm/components/Icon/components/Report.js.map +1 -1
  208. package/dist/esm/components/Icon/components/ReportSolid.js.map +1 -1
  209. package/dist/esm/components/Icon/components/Restore.js.map +1 -1
  210. package/dist/esm/components/Icon/components/RotateLeft.js.map +1 -1
  211. package/dist/esm/components/Icon/components/RotateRight.js.map +1 -1
  212. package/dist/esm/components/Icon/components/Sales.js.map +1 -1
  213. package/dist/esm/components/Icon/components/Search.js.map +1 -1
  214. package/dist/esm/components/Icon/components/SearchBold.js.map +1 -1
  215. package/dist/esm/components/Icon/components/Secure.js.map +1 -1
  216. package/dist/esm/components/Icon/components/SecureTick.js.map +1 -1
  217. package/dist/esm/components/Icon/components/Settings.js.map +1 -1
  218. package/dist/esm/components/Icon/components/SettingsSolid.js.map +1 -1
  219. package/dist/esm/components/Icon/components/Shortcuts.js.map +1 -1
  220. package/dist/esm/components/Icon/components/ShowAll.js.map +1 -1
  221. package/dist/esm/components/Icon/components/ShowLess.js.map +1 -1
  222. package/dist/esm/components/Icon/components/ShowMore.js.map +1 -1
  223. package/dist/esm/components/Icon/components/ShowTemplate.js.map +1 -1
  224. package/dist/esm/components/Icon/components/Sliders.js.map +1 -1
  225. package/dist/esm/components/Icon/components/Smartpay.js.map +1 -1
  226. package/dist/esm/components/Icon/components/SortBy.js.map +1 -1
  227. package/dist/esm/components/Icon/components/Spinner.js.map +1 -1
  228. package/dist/esm/components/Icon/components/Star.js.map +1 -1
  229. package/dist/esm/components/Icon/components/StarSolid.js.map +1 -1
  230. package/dist/esm/components/Icon/components/Subscriptions.js.map +1 -1
  231. package/dist/esm/components/Icon/components/SystemEntries.js.map +1 -1
  232. package/dist/esm/components/Icon/components/Tag.js.map +1 -1
  233. package/dist/esm/components/Icon/components/TemplateOverride.js.map +1 -1
  234. package/dist/esm/components/Icon/components/Templates.js.map +1 -1
  235. package/dist/esm/components/Icon/components/ThumbBoth.js.map +1 -1
  236. package/dist/esm/components/Icon/components/ThumbDown.js.map +1 -1
  237. package/dist/esm/components/Icon/components/ThumbDownSolid.js.map +1 -1
  238. package/dist/esm/components/Icon/components/ThumbUp.js.map +1 -1
  239. package/dist/esm/components/Icon/components/ThumbUpSolid.js.map +1 -1
  240. package/dist/esm/components/Icon/components/Tick.js.map +1 -1
  241. package/dist/esm/components/Icon/components/Time.js.map +1 -1
  242. package/dist/esm/components/Icon/components/Transfer.js.map +1 -1
  243. package/dist/esm/components/Icon/components/TransferCancel.js.map +1 -1
  244. package/dist/esm/components/Icon/components/TransferLocked.js.map +1 -1
  245. package/dist/esm/components/Icon/components/Undock.js.map +1 -1
  246. package/dist/esm/components/Icon/components/Unreconciled.js.map +1 -1
  247. package/dist/esm/components/Icon/components/Warning.js.map +1 -1
  248. package/dist/esm/components/Icon/components/Webshop.js.map +1 -1
  249. package/dist/esm/components/Icon/components/Website.js.map +1 -1
  250. package/dist/esm/components/Icon/components/Workflow.js.map +1 -1
  251. package/dist/esm/components/Icon/components/Zoom.js.map +1 -1
  252. package/dist/esm/components/Icon/components/index.js +4 -4
  253. package/dist/esm/components/Icon/components/index.js.map +1 -1
  254. package/dist/esm/components/IconButton/IconButton.js +9 -11
  255. package/dist/esm/components/IconButton/IconButton.js.map +1 -1
  256. package/dist/esm/components/Input/Input.js +25 -25
  257. package/dist/esm/components/Input/Input.js.map +1 -1
  258. package/dist/esm/components/Input/util.js +2 -2
  259. package/dist/esm/components/Input/util.js.map +1 -1
  260. package/dist/esm/components/Listbox/Listbox.js +24 -25
  261. package/dist/esm/components/Listbox/Listbox.js.map +1 -1
  262. package/dist/esm/components/Listbox/ScrollableList.js +64 -83
  263. package/dist/esm/components/Listbox/ScrollableList.js.map +1 -1
  264. package/dist/esm/components/Listbox/useListbox.js +51 -60
  265. package/dist/esm/components/Listbox/useListbox.js.map +1 -1
  266. package/dist/esm/components/Listbox/useMultiListbox.js +64 -91
  267. package/dist/esm/components/Listbox/useMultiListbox.js.map +1 -1
  268. package/dist/esm/components/Listbox/useTypeahead.js +10 -9
  269. package/dist/esm/components/Listbox/useTypeahead.js.map +1 -1
  270. package/dist/esm/components/Listbox/util.js +48 -85
  271. package/dist/esm/components/Listbox/util.js.map +1 -1
  272. package/dist/esm/components/Menu/Context.js +2 -2
  273. package/dist/esm/components/Menu/Context.js.map +1 -1
  274. package/dist/esm/components/Menu/Menu.js +16 -34
  275. package/dist/esm/components/Menu/Menu.js.map +1 -1
  276. package/dist/esm/components/Menu/components/Checkbox.js +8 -9
  277. package/dist/esm/components/Menu/components/Checkbox.js.map +1 -1
  278. package/dist/esm/components/Menu/components/Content.js +9 -11
  279. package/dist/esm/components/Menu/components/Content.js.map +1 -1
  280. package/dist/esm/components/Menu/components/Header.js +3 -3
  281. package/dist/esm/components/Menu/components/Header.js.map +1 -1
  282. package/dist/esm/components/Menu/components/Item.js +30 -31
  283. package/dist/esm/components/Menu/components/Item.js.map +1 -1
  284. package/dist/esm/components/Menu/components/Link.js +10 -11
  285. package/dist/esm/components/Menu/components/Link.js.map +1 -1
  286. package/dist/esm/components/Menu/components/RadioGroup.js +16 -18
  287. package/dist/esm/components/Menu/components/RadioGroup.js.map +1 -1
  288. package/dist/esm/components/Menu/components/Separator.js +1 -1
  289. package/dist/esm/components/Menu/components/Separator.js.map +1 -1
  290. package/dist/esm/components/Menu/components/Trigger.js +4 -4
  291. package/dist/esm/components/Menu/components/Trigger.js.map +1 -1
  292. package/dist/esm/components/Navigation/Navigation.js +35 -44
  293. package/dist/esm/components/Navigation/Navigation.js.map +1 -1
  294. package/dist/esm/components/Pagination/PageNumbers.js +23 -28
  295. package/dist/esm/components/Pagination/PageNumbers.js.map +1 -1
  296. package/dist/esm/components/Pagination/Pagination.js +39 -56
  297. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  298. package/dist/esm/components/Pagination/usePagination.js +7 -21
  299. package/dist/esm/components/Pagination/usePagination.js.map +1 -1
  300. package/dist/esm/components/Pagination/usePaginationShortcuts.js +9 -9
  301. package/dist/esm/components/Pagination/usePaginationShortcuts.js.map +1 -1
  302. package/dist/esm/components/Popover/Popover.js +29 -34
  303. package/dist/esm/components/Popover/Popover.js.map +1 -1
  304. package/dist/esm/components/Popover/Primitives.js +7 -8
  305. package/dist/esm/components/Popover/Primitives.js.map +1 -1
  306. package/dist/esm/components/Progress/Progress.js +11 -15
  307. package/dist/esm/components/Progress/Progress.js.map +1 -1
  308. package/dist/esm/components/Provider/Provider.js +13 -18
  309. package/dist/esm/components/Provider/Provider.js.map +1 -1
  310. package/dist/esm/components/RadioGroup/RadioGroup.js +45 -57
  311. package/dist/esm/components/RadioGroup/RadioGroup.js.map +1 -1
  312. package/dist/esm/components/SearchInput/SearchInput.js +12 -12
  313. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  314. package/dist/esm/components/Select/Select.js +30 -31
  315. package/dist/esm/components/Select/Select.js.map +1 -1
  316. package/dist/esm/components/Select/useSelect.js +63 -81
  317. package/dist/esm/components/Select/useSelect.js.map +1 -1
  318. package/dist/esm/components/Spinner/Spinner.js +12 -19
  319. package/dist/esm/components/Spinner/Spinner.js.map +1 -1
  320. package/dist/esm/components/Switch/Switch.js +9 -10
  321. package/dist/esm/components/Switch/Switch.js.map +1 -1
  322. package/dist/esm/components/Table/components/BaseTable.js +23 -30
  323. package/dist/esm/components/Table/components/BaseTable.js.map +1 -1
  324. package/dist/esm/components/Table/components/PaginatedTable.js +3 -7
  325. package/dist/esm/components/Table/components/PaginatedTable.js.map +1 -1
  326. package/dist/esm/components/Table/components/Table.js +18 -25
  327. package/dist/esm/components/Table/components/Table.js.map +1 -1
  328. package/dist/esm/components/Table/components/WindowedTable.js +89 -109
  329. package/dist/esm/components/Table/components/WindowedTable.js.map +1 -1
  330. package/dist/esm/components/Table/hooks/plugins/useRowActions.js +122 -146
  331. package/dist/esm/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  332. package/dist/esm/components/Table/hooks/plugins/useRowDraggable.js +57 -61
  333. package/dist/esm/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  334. package/dist/esm/components/Table/hooks/plugins/useRowEditing.js +39 -36
  335. package/dist/esm/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  336. package/dist/esm/components/Table/hooks/plugins/useRowSelect.js +79 -89
  337. package/dist/esm/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  338. package/dist/esm/components/Table/hooks/useRowCreation.js +29 -64
  339. package/dist/esm/components/Table/hooks/useRowCreation.js.map +1 -1
  340. package/dist/esm/components/Table/hooks/useTable.js +119 -141
  341. package/dist/esm/components/Table/hooks/useTable.js.map +1 -1
  342. package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js +13 -16
  343. package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  344. package/dist/esm/components/Table/util/renderColumn.js +10 -10
  345. package/dist/esm/components/Table/util/renderColumn.js.map +1 -1
  346. package/dist/esm/components/Table/util/renderRow.js +37 -46
  347. package/dist/esm/components/Table/util/renderRow.js.map +1 -1
  348. package/dist/esm/components/Table/util/rowIndexPath.js +14 -16
  349. package/dist/esm/components/Table/util/rowIndexPath.js.map +1 -1
  350. package/dist/esm/components/Table/util/sortTypes.js +23 -31
  351. package/dist/esm/components/Table/util/sortTypes.js.map +1 -1
  352. package/dist/esm/components/Table/util.js +29 -41
  353. package/dist/esm/components/Table/util.js.map +1 -1
  354. package/dist/esm/components/Tabs/Tabs.js +25 -27
  355. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  356. package/dist/esm/components/Textarea/Textarea.js +11 -9
  357. package/dist/esm/components/Textarea/Textarea.js.map +1 -1
  358. package/dist/esm/components/Toast/Toast.js +20 -21
  359. package/dist/esm/components/Toast/Toast.js.map +1 -1
  360. package/dist/esm/components/Toast/Toaster.js +88 -118
  361. package/dist/esm/components/Toast/Toaster.js.map +1 -1
  362. package/dist/esm/components/Toast/util.js +2 -2
  363. package/dist/esm/components/Toast/util.js.map +1 -1
  364. package/dist/esm/components/Tooltip/Tooltip.js +7 -8
  365. package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
  366. package/dist/esm/components/Tour/Tour.js +44 -50
  367. package/dist/esm/components/Tour/Tour.js.map +1 -1
  368. package/dist/esm/components/Treeview/Treeview.js +26 -36
  369. package/dist/esm/components/Treeview/Treeview.js.map +1 -1
  370. package/dist/esm/components/VisuallyHidden/VisuallyHidden.js +1 -1
  371. package/dist/esm/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  372. package/dist/esm/index.css +661 -661
  373. package/dist/esm/index.js +2 -1
  374. package/dist/esm/index.js.map +1 -1
  375. package/dist/esm/primitives/Button.js +9 -13
  376. package/dist/esm/primitives/Button.js.map +1 -1
  377. package/dist/esm/utils/date.js.map +1 -1
  378. package/dist/esm/utils/hooks/useBoundingClientRectListener.js.map +1 -1
  379. package/dist/esm/utils/hooks/useDraggable.js +16 -17
  380. package/dist/esm/utils/hooks/useDraggable.js.map +1 -1
  381. package/dist/esm/utils/hooks/useDropTarget.js +7 -10
  382. package/dist/esm/utils/hooks/useDropTarget.js.map +1 -1
  383. package/dist/esm/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  384. package/dist/esm/utils/hooks/useListScrollTo.js.map +1 -1
  385. package/dist/esm/utils/hooks/useOnClickOutside.js.map +1 -1
  386. package/dist/esm/utils/hooks/useProxiedRef.js.map +1 -1
  387. package/dist/esm/utils/hooks/useTimer.js +9 -17
  388. package/dist/esm/utils/hooks/useTimer.js.map +1 -1
  389. package/dist/esm/utils/input.js +7 -11
  390. package/dist/esm/utils/input.js.map +1 -1
  391. package/dist/esm/utils/mergeRefs.js +2 -2
  392. package/dist/esm/utils/mergeRefs.js.map +1 -1
  393. package/dist/esm/utils/taillwind.js +2 -2
  394. package/dist/esm/utils/taillwind.js.map +1 -1
  395. package/dist/index.css +661 -661
  396. package/dist/index.d.ts +1 -0
  397. package/dist/taco.cjs.development.js +2115 -2585
  398. package/dist/taco.cjs.development.js.map +1 -1
  399. package/dist/taco.cjs.production.min.js +1 -1
  400. package/dist/taco.cjs.production.min.js.map +1 -1
  401. package/dist/utils/tailwind.d.ts +1 -1
  402. package/package.json +4 -5
  403. package/plugins/tailwindcss-aria-attributes.js +73 -73
  404. package/tailwind.config.js +260 -255
  405. package/types.json +2603 -7007
package/README.md CHANGED
@@ -1,82 +1,82 @@
1
- # @economic/taco
2
-
3
- > UI React component library
4
-
5
- ## Usage
6
-
7
- ```bash
8
- npm install --save @economic/taco
9
- ```
10
-
11
- ```javascript
12
- import { Button } from '@economic/taco';
13
-
14
- const MyComponent = () => <Button>Tada!</Button>;
15
- ```
16
-
17
- ## Development
18
-
19
- ### Guidelines for new components
20
-
21
- Start by creating a folder under `src/` with the name of the component, e.g. `<MyAwesomeComponent />`:
22
-
23
- ```
24
- src/
25
- ├── ...
26
- ├── components
27
- │   ├── MyAwesomeComponent
28
- │   │   ├── MyAwesomeComponent.css
29
- │   │   ├── MyAwesomeComponent.mdx
30
- │   │   ├── MyAwesomeComponent.test.tsx
31
- │   │   ├── MyAwesomeComponent.tsx
32
- ├── index.tsx
33
- └── ...
34
- ```
35
-
36
- Conceptually, the component's style, implementation, tests & documentation are co-located in its own folder.
37
-
38
- `MyAwesomeComponent/MyAwesomeComponent.css` Holds the component's style, directly imported in the implementation
39
- `MyAwesomeComponent/MyAwesomeComponent.mdx` Holds the component's documentation
40
- `MyAwesomeComponent/MyAwesomeComponent.test.tsx` Holds the component's tests - if applicable
41
- `MyAwesomeComponent/MyAwesomeComponent.tsx` Holds the component's implementation
42
-
43
- > If the component has a special (_snowflake_) case/variation, it's best advised to implement as separate component within the same folder (e.g. `<Button />` and `<IconButton />`)
44
-
45
- # Consumption
46
-
47
- #### Components
48
-
49
- Import individual components from tailwind as you need them.
50
-
51
- #### Styling
52
-
53
- Taco uses tailwind, but does not process its css before exporting. It exports css _with_ tailwind commands present - you must process the stylesheet with tailwind yourself.
54
-
55
- Browser targeting, purging and minification should be performed _by the consumer_.
56
-
57
- Your postcss config probably looks something like this:
58
-
59
- ```js
60
- module.exports = {
61
- plugins: ['tailwindcss', 'autoprefixer'],
62
- };
63
- ```
64
-
65
- Your `tailwind.config.js` should look something like this:
66
-
67
- ```js
68
- const tailwindConfig = require('@economic/taco/tailwind.config.js');
69
-
70
- module.exports = {
71
- presets: [require('@economic/taco/tailwind.config.js'))],
72
- content: {
73
- files: ['../src/**/*.{mdx,tsx}', './node_modules/@economic/taco/dist/taco.esm.js'],
74
- },
75
- };
76
- ```
77
-
78
- You should then import the taco stylesheet in your application:
79
-
80
- ```css
81
- import '@economic/taco/dist/index.css';
82
- ```
1
+ # @economic/taco
2
+
3
+ > UI React component library
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npm install --save @economic/taco
9
+ ```
10
+
11
+ ```javascript
12
+ import { Button } from '@economic/taco';
13
+
14
+ const MyComponent = () => <Button>Tada!</Button>;
15
+ ```
16
+
17
+ ## Development
18
+
19
+ ### Guidelines for new components
20
+
21
+ Start by creating a folder under `src/` with the name of the component, e.g. `<MyAwesomeComponent />`:
22
+
23
+ ```
24
+ src/
25
+ ├── ...
26
+ ├── components
27
+ │   ├── MyAwesomeComponent
28
+ │   │   ├── MyAwesomeComponent.css
29
+ │   │   ├── MyAwesomeComponent.mdx
30
+ │   │   ├── MyAwesomeComponent.test.tsx
31
+ │   │   ├── MyAwesomeComponent.tsx
32
+ ├── index.tsx
33
+ └── ...
34
+ ```
35
+
36
+ Conceptually, the component's style, implementation, tests & documentation are co-located in its own folder.
37
+
38
+ `MyAwesomeComponent/MyAwesomeComponent.css` Holds the component's style, directly imported in the implementation
39
+ `MyAwesomeComponent/MyAwesomeComponent.mdx` Holds the component's documentation
40
+ `MyAwesomeComponent/MyAwesomeComponent.test.tsx` Holds the component's tests - if applicable
41
+ `MyAwesomeComponent/MyAwesomeComponent.tsx` Holds the component's implementation
42
+
43
+ > If the component has a special (_snowflake_) case/variation, it's best advised to implement as separate component within the same folder (e.g. `<Button />` and `<IconButton />`)
44
+
45
+ # Consumption
46
+
47
+ #### Components
48
+
49
+ Import individual components from tailwind as you need them.
50
+
51
+ #### Styling
52
+
53
+ Taco uses tailwind, but does not process its css before exporting. It exports css _with_ tailwind commands present - you must process the stylesheet with tailwind yourself.
54
+
55
+ Browser targeting, purging and minification should be performed _by the consumer_.
56
+
57
+ Your postcss config probably looks something like this:
58
+
59
+ ```js
60
+ module.exports = {
61
+ plugins: ['tailwindcss', 'autoprefixer'],
62
+ };
63
+ ```
64
+
65
+ Your `tailwind.config.js` should look something like this:
66
+
67
+ ```js
68
+ const tailwindConfig = require('@economic/taco/tailwind.config.js');
69
+
70
+ module.exports = {
71
+ presets: [require('@economic/taco/tailwind.config.js'))],
72
+ content: {
73
+ files: ['../src/**/*.{mdx,tsx}', './node_modules/@economic/taco/dist/taco.esm.js'],
74
+ },
75
+ };
76
+ ```
77
+
78
+ You should then import the taco stylesheet in your application:
79
+
80
+ ```css
81
+ import '@economic/taco/dist/index.css';
82
+ ```
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","sources":["../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { Icon } from '../Icon/Icon';\n\ntype AccordionContext = {\n as: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n};\nconst AccordionContext = React.createContext<AccordionContext>({\n as: 'h2',\n});\n\nexport type AccordionTriggerProps = React.HTMLAttributes<HTMLElement>;\n\nconst StyledTrigger = React.forwardRef(function AccordionStyledTrigger(\n props: AccordionPrimitive.AccordionTriggerProps,\n ref: React.Ref<HTMLButtonElement>\n) {\n const isExpanded = !!props['aria-expanded'];\n\n const className = cn(\n 'w-full inline-flex justify-between items-center align-middle',\n 'focus:rounded-sm focus:border-blue focus:yt-focus',\n props.className\n );\n\n return (\n <button {...props} ref={ref} className={className}>\n {props.children}\n <Icon name={isExpanded ? 'chevron-up' : 'chevron-down'} />\n </button>\n );\n});\n\nconst Trigger = React.forwardRef(function AccordionTrigger(props: AccordionTriggerProps, ref: React.Ref<HTMLButtonElement>) {\n const { children } = props;\n const { as: Heading } = React.useContext(AccordionContext);\n\n return (\n <AccordionPrimitive.Header asChild>\n <Heading className=\"my-3\">\n <AccordionPrimitive.Trigger ref={ref} asChild>\n <StyledTrigger>{children}</StyledTrigger>\n </AccordionPrimitive.Trigger>\n </Heading>\n </AccordionPrimitive.Header>\n );\n});\n\nexport type AccordionContentProps = React.HTMLAttributes<HTMLElement>;\nconst Content = React.forwardRef(function AccordionContent(props: AccordionContentProps, ref: React.Ref<HTMLDivElement>) {\n return <AccordionPrimitive.Content {...props} ref={ref} />;\n});\n\nexport type AccordionItemProps = React.HTMLAttributes<HTMLDivElement> & {\n id: string;\n disabled?: boolean;\n};\nconst Item = (props: AccordionItemProps) => {\n const { id, ...otherProps } = props;\n return <AccordionPrimitive.Item {...otherProps} value={id} />;\n};\n\ntype AccordionBaseProps = {\n children: React.ReactNode[];\n\n /** Change what heading element accordion regions will render */\n as?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\n /** Additional classes for Accordion root element */\n className?: string;\n};\n\nexport interface AccordionUncontrolledProps extends AccordionBaseProps {\n /** Default expanded accordion(s) */\n defaultId: string | string[];\n\n id?: never;\n onChange?: never;\n}\n\nexport interface AccordionMultipleControlledProps extends AccordionBaseProps {\n /** Expanded accordions */\n id: string[];\n\n /** onChange function to receive ids of expanded accordions */\n onChange: (id: string[]) => void;\n\n defaultId?: never;\n}\nexport interface AccordionSingleControlledProps extends AccordionBaseProps {\n /** Expanded accordion */\n id: string;\n\n /** onChange function to receive id of expanded accordion */\n onChange: (id: string) => void;\n\n defaultId?: never;\n}\n\nexport type AccordionProps = AccordionUncontrolledProps | AccordionMultipleControlledProps | AccordionSingleControlledProps;\n\nexport const Accordion = (props: AccordionProps) => {\n const { id, defaultId, onChange, as = 'h2', ...otherProps } = props;\n const context = React.useMemo(() => ({ as }), [as]);\n\n let valueProps;\n\n if (defaultId) {\n valueProps = {\n defaultValue: defaultId || undefined,\n };\n } else {\n valueProps = {\n onValueChange: onChange,\n value: id || undefined,\n };\n }\n\n const type = Array.isArray(valueProps.defaultValue) || Array.isArray(valueProps.value) ? 'multiple' : 'single';\n const className = cn('divide-y divide-grey', props.className);\n\n return (\n <AccordionContext.Provider value={context}>\n <AccordionPrimitive.Root {...otherProps} {...valueProps} data-taco=\"accordion\" className={className} type={type} />\n </AccordionContext.Provider>\n );\n};\n\nAccordion.Item = Item;\nAccordion.Trigger = Trigger;\nAccordion.Content = Content;\n"],"names":["AccordionContext","React","createContext","as","StyledTrigger","forwardRef","AccordionStyledTrigger","props","ref","isExpanded","className","cn","children","Icon","name","Trigger","AccordionTrigger","useContext","Heading","AccordionPrimitive","asChild","Content","AccordionContent","Item","id","otherProps","value","Accordion","defaultId","onChange","context","useMemo","valueProps","defaultValue","undefined","onValueChange","type","Array","isArray","Provider"],"mappings":";;;;;;;;AAQA,IAAMA,gBAAgB,gBAAGC,cAAK,CAACC,aAAN,CAAsC;EAC3DC,EAAE,EAAE;AADuD,CAAtC,CAAzB;AAMA,IAAMC,aAAa,gBAAGH,cAAK,CAACI,UAAN,CAAiB,SAASC,sBAAT,CACnCC,KADmC,EAEnCC,GAFmC;EAInC,IAAMC,UAAU,GAAG,CAAC,CAACF,KAAK,CAAC,eAAD,CAA1B;EAEA,IAAMG,SAAS,GAAGC,EAAE,CAChB,8DADgB,EAEhB,mDAFgB,EAGhBJ,KAAK,CAACG,SAHU,CAApB;EAMA,OACIT,4BAAA,SAAA,oBAAYM;IAAOC,GAAG,EAAEA;IAAKE,SAAS,EAAEA;IAAxC,EACKH,KAAK,CAACK,QADX,EAEIX,4BAAA,CAACY,IAAD;IAAMC,IAAI,EAAEL,UAAU,GAAG,YAAH,GAAkB;GAAxC,CAFJ,CADJ;AAMH,CAlBqB,CAAtB;AAoBA,IAAMM,OAAO,gBAAGd,cAAK,CAACI,UAAN,CAAiB,SAASW,gBAAT,CAA0BT,KAA1B,EAAwDC,GAAxD;EAC7B,IAAQI,QAAR,GAAqBL,KAArB,CAAQK,QAAR;;EACA,wBAAwBX,cAAK,CAACgB,UAAN,CAAiBjB,gBAAjB,CAAxB;MAAYk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AAS,IAAIM;KAD/B;GADJ,MAIO;IACHF,UAAU,GAAG;MACTG,aAAa,EAAEN,QADN;MAETH,KAAK,EAAEF,EAAE,IAAIU;KAFjB;;;EAMJ,IAAME,IAAI,GAAGC,KAAK,CAACC,OAAN,CAAcN,UAAU,CAACC,YAAzB,KAA0CI,KAAK,CAACC,OAAN,CAAcN,UAAU,CAACN,KAAzB,CAA1C,GAA4E,UAA5E,GAAyF,QAAtG;EACA,IAAMhB,SAAS,GAAGC,EAAE,CAAC,sBAAD,EAAyBJ,KAAK,CAACG,SAA/B,CAApB;EAEA,OACIT,4BAAA,CAACD,gBAAgB,CAACuC,QAAlB;IAA2Bb,KAAK,EAAEI;GAAlC,EACI7B,4BAAA,CAACkB,IAAD,oBAA6BM,YAAgBO;iBAAsB;IAAYtB,SAAS,EAAEA;IAAW0B,IAAI,EAAEA;IAA3G,CADJ,CADJ;AAKH;AAEDT,SAAS,CAACJ,IAAV,GAAiBA,IAAjB;AACAI,SAAS,CAACZ,OAAV,GAAoBA,OAApB;AACAY,SAAS,CAACN,OAAV,GAAoBA,OAApB;;;;"}
1
+ {"version":3,"file":"Accordion.js","sources":["../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import React from 'react';\r\nimport cn from 'classnames';\r\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\r\nimport { Icon } from '../Icon/Icon';\r\n\r\ntype AccordionContext = {\r\n as: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\r\n};\r\nconst AccordionContext = React.createContext<AccordionContext>({\r\n as: 'h2',\r\n});\r\n\r\nexport type AccordionTriggerProps = React.HTMLAttributes<HTMLElement>;\r\n\r\nconst StyledTrigger = React.forwardRef(function AccordionStyledTrigger(\r\n props: AccordionPrimitive.AccordionTriggerProps,\r\n ref: React.Ref<HTMLButtonElement>\r\n) {\r\n const isExpanded = !!props['aria-expanded'];\r\n\r\n const className = cn(\r\n 'w-full inline-flex justify-between items-center align-middle',\r\n 'focus:rounded-sm focus:border-blue focus:yt-focus',\r\n props.className\r\n );\r\n\r\n return (\r\n <button {...props} ref={ref} className={className}>\r\n {props.children}\r\n <Icon name={isExpanded ? 'chevron-up' : 'chevron-down'} />\r\n </button>\r\n );\r\n});\r\n\r\nconst Trigger = React.forwardRef(function AccordionTrigger(props: AccordionTriggerProps, ref: React.Ref<HTMLButtonElement>) {\r\n const { children } = props;\r\n const { as: Heading } = React.useContext(AccordionContext);\r\n\r\n return (\r\n <AccordionPrimitive.Header asChild>\r\n <Heading className=\"my-3\">\r\n <AccordionPrimitive.Trigger ref={ref} asChild>\r\n <StyledTrigger>{children}</StyledTrigger>\r\n </AccordionPrimitive.Trigger>\r\n </Heading>\r\n </AccordionPrimitive.Header>\r\n );\r\n});\r\n\r\nexport type AccordionContentProps = React.HTMLAttributes<HTMLElement>;\r\nconst Content = React.forwardRef(function AccordionContent(props: AccordionContentProps, ref: React.Ref<HTMLDivElement>) {\r\n return <AccordionPrimitive.Content {...props} ref={ref} />;\r\n});\r\n\r\nexport type AccordionItemProps = React.HTMLAttributes<HTMLDivElement> & {\r\n id: string;\r\n disabled?: boolean;\r\n};\r\nconst Item = (props: AccordionItemProps) => {\r\n const { id, ...otherProps } = props;\r\n return <AccordionPrimitive.Item {...otherProps} value={id} />;\r\n};\r\n\r\ntype AccordionBaseProps = {\r\n children: React.ReactNode[];\r\n\r\n /** Change what heading element accordion regions will render */\r\n as?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\r\n\r\n /** Additional classes for Accordion root element */\r\n className?: string;\r\n};\r\n\r\nexport interface AccordionUncontrolledProps extends AccordionBaseProps {\r\n /** Default expanded accordion(s) */\r\n defaultId: string | string[];\r\n\r\n id?: never;\r\n onChange?: never;\r\n}\r\n\r\nexport interface AccordionMultipleControlledProps extends AccordionBaseProps {\r\n /** Expanded accordions */\r\n id: string[];\r\n\r\n /** onChange function to receive ids of expanded accordions */\r\n onChange: (id: string[]) => void;\r\n\r\n defaultId?: never;\r\n}\r\nexport interface AccordionSingleControlledProps extends AccordionBaseProps {\r\n /** Expanded accordion */\r\n id: string;\r\n\r\n /** onChange function to receive id of expanded accordion */\r\n onChange: (id: string) => void;\r\n\r\n defaultId?: never;\r\n}\r\n\r\nexport type AccordionProps = AccordionUncontrolledProps | AccordionMultipleControlledProps | AccordionSingleControlledProps;\r\n\r\nexport const Accordion = (props: AccordionProps) => {\r\n const { id, defaultId, onChange, as = 'h2', ...otherProps } = props;\r\n const context = React.useMemo(() => ({ as }), [as]);\r\n\r\n let valueProps;\r\n\r\n if (defaultId) {\r\n valueProps = {\r\n defaultValue: defaultId || undefined,\r\n };\r\n } else {\r\n valueProps = {\r\n onValueChange: onChange,\r\n value: id || undefined,\r\n };\r\n }\r\n\r\n const type = Array.isArray(valueProps.defaultValue) || Array.isArray(valueProps.value) ? 'multiple' : 'single';\r\n const className = cn('divide-y divide-grey', props.className);\r\n\r\n return (\r\n <AccordionContext.Provider value={context}>\r\n <AccordionPrimitive.Root {...otherProps} {...valueProps} data-taco=\"accordion\" className={className} type={type} />\r\n </AccordionContext.Provider>\r\n );\r\n};\r\n\r\nAccordion.Item = Item;\r\nAccordion.Trigger = Trigger;\r\nAccordion.Content = Content;\r\n"],"names":["AccordionContext","React","createContext","as","StyledTrigger","forwardRef","AccordionStyledTrigger","props","ref","isExpanded","className","cn","children","Icon","name","Trigger","AccordionTrigger","useContext","Heading","AccordionPrimitive","asChild","Content","AccordionContent","Item","id","otherProps","value","Accordion","defaultId","onChange","context","useMemo","valueProps","defaultValue","undefined","onValueChange","type","Array","isArray","Provider"],"mappings":";;;;;;;;AAQA,IAAMA,gBAAgB,gBAAGC,cAAK,CAACC,aAAN,CAAsC;EAC3DC,EAAE,EAAE;AADuD,CAAtC,CAAzB;AAMA,IAAMC,aAAa,gBAAGH,cAAK,CAACI,UAAN,CAAiB,SAASC,sBAAT,CACnCC,KADmC,EAEnCC,GAFmC;EAInC,IAAMC,UAAU,GAAG,CAAC,CAACF,KAAK,CAAC,eAAD,CAA1B;EAEA,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file":"Backdrop.js","sources":["../../../../src/components/Backdrop/Backdrop.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\n\nexport type BackdropProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Backdrop = React.forwardRef<HTMLDivElement, BackdropProps>(function Backdrop(props, ref) {\n const className = cn(\n 'fixed inset-0 cursor-default overflow-y-auto bg-[rgba(50,46,62,0.8)] aria-hidden:hidden z-[996]',\n props.className\n );\n\n return <div {...props} className={className} ref={ref} />;\n});\n"],"names":["Backdrop","React","props","ref","className","cn"],"mappings":";;;IAKaA,QAAQ,gBAAGC,UAAA,CAAgD,SAASD,QAAT,CAAkBE,KAAlB,EAAyBC,GAAzB;EACpE,IAAMC,SAAS,GAAGC,EAAE,CAChB,iGADgB,EAEhBH,KAAK,CAACE,SAFU,CAApB;EAKA,OAAOH,aAAA,MAAA,oBAASC;IAAOE,SAAS,EAAEA;IAAWD,GAAG,EAAEA;IAA3C,CAAP;AACH,CAPuB;;;;"}
1
+ {"version":3,"file":"Backdrop.js","sources":["../../../../src/components/Backdrop/Backdrop.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\n\r\nexport type BackdropProps = React.HTMLAttributes<HTMLDivElement>;\r\n\r\nexport const Backdrop = React.forwardRef<HTMLDivElement, BackdropProps>(function Backdrop(props, ref) {\r\n const className = cn(\r\n 'fixed inset-0 cursor-default overflow-y-auto bg-[rgba(50,46,62,0.8)] aria-hidden:hidden z-[996]',\r\n props.className\r\n );\r\n\r\n return <div {...props} className={className} ref={ref} />;\r\n});\r\n"],"names":["Backdrop","React","props","ref","className","cn"],"mappings":";;;IAKaA,QAAQ,gBAAGC,UAAA,CAAgD,SAASD,QAAT,CAAkBE,KAAlB,EAAyBC,GAAzB;EACpE,IAAMC,SAAS,GAAGC,EAAE,CAChB,iGADgB,EAEhBH,KAAK,CAACE,SAFU,CAApB;EAKA,OAAOH,aAAA,MAAA,oBAASC;IAAOE,SAAS,EAAEA;IAAWD,GAAG,EAAEA;IAA3C,CAAP;AACH,CAPuB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden';\nimport { State } from '../../types';\nimport { getStateClasses, getOutlineClasses } from '../../utils/taillwind';\nimport './Badge.css';\n\nexport type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {\n /** Content should be a numerical value or tag/status like text **/\n children: React.ReactNode;\n /** Show compact version **/\n compact?: boolean;\n /** Show outlined version **/\n outline?: boolean;\n /** State will change the style of the badge **/\n state?: State;\n};\n\nexport const Badge = React.forwardRef(function Badge(props: BadgeProps, ref: React.Ref<HTMLSpanElement>) {\n const { children, compact = false, outline = false, state, ...otherProps } = props;\n const className = cn(\n 'rounded-full border font-bold text-xs uppercase overflow-hidden whitespace-nowrap inline-flex items-center justify-center h-5',\n {\n [getOutlineClasses(state)]: outline,\n [`border-transparent ${getStateClasses(state)}`]: !outline,\n 'h-2 w-2 min-w-0': compact,\n 'h-5 py-0 px-1.5': !compact, // custom padding keeps single digits in a perfect circle\n },\n props.className\n );\n\n return (\n <span\n {...otherProps}\n aria-atomic=\"true\"\n aria-live=\"polite\"\n className={className}\n data-taco=\"badge\"\n ref={ref}\n role=\"status\"\n title={props['aria-label']}\n >\n {compact ? <VisuallyHidden>{children}</VisuallyHidden> : children}\n </span>\n );\n});\n"],"names":["Badge","React","props","ref","children","compact","outline","state","otherProps","className","cn","getOutlineClasses","getStateClasses","role","title","VisuallyHidden"],"mappings":";;;;;;;IAkBaA,KAAK,gBAAGC,UAAA,CAAiB,SAASD,KAAT,CAAeE,KAAf,EAAkCC,GAAlC;;;EAClC,IAAQC,QAAR,GAA6EF,KAA7E,CAAQE,QAAR;uBAA6EF,KAA7E,CAAkBG,OAAlB;MAAkBA,OAAlB,+BAA4B,KAA5B;uBAA6EH,KAA7E,CAAmCI,OAAnC;MAAmCA,OAAnC,+BAA6C,KAA7C;MAAoDC,KAApD,GAA6EL,KAA7E,CAAoDK,KAApD;MAA8DC,UAA9D,iCAA6EN,KAA7E;;EACA,IAAMO,SAAS,GAAGC,EAAE,CAChB,+HADgB,iBAGXC,iBAAiB,CAACJ,KAAD,CAHN,IAGgBD,OAHhB,8BAIWM,eAAe,CAACL,KAAD,CAJ1B,IAIsC,CAACD,OAJvC,MAKZ,iBALY,IAKOD,OALP,MAMZ,iBANY,IAMO,CAACA,OANR,QAQhBH,KAAK,CAACO,SARU,CAApB;EAWA,OACIR,aAAA,OAAA,oBACQO;mBACQ;iBACF;IACVC,SAAS,EAAEA;iBACD;IACVN,GAAG,EAAEA;IACLU,IAAI,EAAC;IACLC,KAAK,EAAEZ,KAAK,CAAC,YAAD;IARhB,EAUKG,OAAO,GAAGJ,aAAA,CAACc,cAAD,MAAA,EAAiBX,QAAjB,CAAH,GAAiDA,QAV7D,CADJ;AAcH,CA3BoB;;;;"}
1
+ {"version":3,"file":"Badge.js","sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden';\r\nimport { State } from '../../types';\r\nimport { getStateClasses, getOutlineClasses } from '../../utils/taillwind';\r\nimport './Badge.css';\r\n\r\nexport type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {\r\n /** Content should be a numerical value or tag/status like text **/\r\n children: React.ReactNode;\r\n /** Show compact version **/\r\n compact?: boolean;\r\n /** Show outlined version **/\r\n outline?: boolean;\r\n /** State will change the style of the badge **/\r\n state?: State;\r\n};\r\n\r\nexport const Badge = React.forwardRef(function Badge(props: BadgeProps, ref: React.Ref<HTMLSpanElement>) {\r\n const { children, compact = false, outline = false, state, ...otherProps } = props;\r\n const className = cn(\r\n 'rounded-full border font-bold text-xs uppercase overflow-hidden whitespace-nowrap inline-flex items-center justify-center h-5',\r\n {\r\n [getOutlineClasses(state)]: outline,\r\n [`border-transparent ${getStateClasses(state)}`]: !outline,\r\n 'h-2 w-2 min-w-0': compact,\r\n 'h-5 py-0 px-1.5': !compact, // custom padding keeps single digits in a perfect circle\r\n },\r\n props.className\r\n );\r\n\r\n return (\r\n <span\r\n {...otherProps}\r\n aria-atomic=\"true\"\r\n aria-live=\"polite\"\r\n className={className}\r\n data-taco=\"badge\"\r\n ref={ref}\r\n role=\"status\"\r\n title={props['aria-label']}\r\n >\r\n {compact ? <VisuallyHidden>{children}</VisuallyHidden> : children}\r\n </span>\r\n );\r\n});\r\n"],"names":["Badge","React","props","ref","children","compact","outline","state","otherProps","className","cn","getOutlineClasses","getStateClasses","role","title","VisuallyHidden"],"mappings":";;;;;;;IAkBaA,KAAK,gBAAGC,UAAA,CAAiB,SAASD,KAAT,CAAeE,KAAf,EAAkCC,GAAlC;;;EAClC,IAAQC,QAAR,GAA6EF,KAA7E,CAAQE,QAAR;uBAA6EF,KAA7E,CAAkBG,OAAlB;MAAkBA,OAAlB,+BAA4B,KAA5B;uBAA6EH,KAA7E,CAAmCI,OAAnC;MAAmCA,OAAnC,+BAA6C,KAA7C;MAAoDC,KAApD,GAA6EL,KAA7E,CAAoDK,KAApD;MAA8DC,UAA9D,iCAA6EN,KAA7E;;EACA,IAAMO,SAAS,GAAGC,EAAE,CAChB,+HADgB,iBAGXC,iBAAiB,CAACJ,KAAD,CAHN,IAGgBD,OAHhB,8BAIWM,eAAe,CAACL,KAAD,CAJ1B,IAIsC,CAACD,OAJvC,MAKZ,iBALY,IAKOD,OALP,MAMZ,iBANY,IAMO,CAACA,OANR,QAQhBH,KAAK,CAACO,SARU,CAApB;EAWA,OACIR,aAAA,OAAA,oBACQO;mBACQ;iBACF;IACVC,SAAS,EAAEA;iBACD;IACVN,GAAG,EAAEA;IACLU,IAAI,EAAC;IACLC,KAAK,EAAEZ,KAAK,CAAC,YAAD;IARhB,EAUKG,OAAO,GAAGJ,aAAA,CAACc,cAAD,MAAA,EAAiBX,QAAjB,CAAH,GAAiDA,QAV7D,CADJ;AAcH,CA3BoB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.js","sources":["../../../../src/components/Banner/Banner.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport { State } from '../../types';\nimport { getBannerIcon } from './util';\nimport { IconButton } from '../IconButton/IconButton';\n\nexport type BannerProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Content can be any react element, for e.g. a `div` */\n children: React.ReactNode;\n /** State will change the icon displayed in banner */\n state: State;\n onClose?: () => void;\n};\n\nexport const Banner = React.forwardRef(function Banner(props: BannerProps, ref: React.Ref<HTMLDivElement>) {\n const { children, state, onClose } = props;\n const className = cn('bg-white relative flex items-center gap-2 py-2 px-4 leading-6 shadow-md z-10', props.className);\n\n return (\n <div className={className} data-taco=\"banner\" ref={ref}>\n {getBannerIcon(state)}\n {children}\n {onClose ? (\n <IconButton className=\"ml-auto -mr-2 self-start\" icon=\"close\" appearance=\"discrete\" onClick={onClose} />\n ) : null}\n </div>\n );\n});\n"],"names":["Banner","React","props","ref","children","state","onClose","className","cn","getBannerIcon","IconButton","icon","appearance","onClick"],"mappings":";;;;;IAcaA,MAAM,gBAAGC,UAAA,CAAiB,SAASD,MAAT,CAAgBE,KAAhB,EAAoCC,GAApC;EACnC,IAAQC,QAAR,GAAqCF,KAArC,CAAQE,QAAR;MAAkBC,KAAlB,GAAqCH,KAArC,CAAkBG,KAAlB;MAAyBC,OAAzB,GAAqCJ,KAArC,CAAyBI,OAAzB;EACA,IAAMC,SAAS,GAAGC,EAAE,CAAC,8EAAD,EAAiFN,KAAK,CAACK,SAAvF,CAApB;EAEA,OACIN,aAAA,MAAA;IAAKM,SAAS,EAAEA;iBAAqB;IAASJ,GAAG,EAAEA;GAAnD,EACKM,aAAa,CAACJ,KAAD,CADlB,EAEKD,QAFL,EAGKE,OAAO,GACJL,aAAA,CAACS,UAAD;IAAYH,SAAS,EAAC;IAA2BI,IAAI,EAAC;IAAQC,UAAU,EAAC;IAAWC,OAAO,EAAEP;GAA7F,CADI,GAEJ,IALR,CADJ;AASH,CAbqB;;;;"}
1
+ {"version":3,"file":"Banner.js","sources":["../../../../src/components/Banner/Banner.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport { State } from '../../types';\r\nimport { getBannerIcon } from './util';\r\nimport { IconButton } from '../IconButton/IconButton';\r\n\r\nexport type BannerProps = React.HTMLAttributes<HTMLDivElement> & {\r\n /** Content can be any react element, for e.g. a `div` */\r\n children: React.ReactNode;\r\n /** State will change the icon displayed in banner */\r\n state: State;\r\n onClose?: () => void;\r\n};\r\n\r\nexport const Banner = React.forwardRef(function Banner(props: BannerProps, ref: React.Ref<HTMLDivElement>) {\r\n const { children, state, onClose } = props;\r\n const className = cn('bg-white relative flex items-center gap-2 py-2 px-4 leading-6 shadow-md z-10', props.className);\r\n\r\n return (\r\n <div className={className} data-taco=\"banner\" ref={ref}>\r\n {getBannerIcon(state)}\r\n {children}\r\n {onClose ? (\r\n <IconButton className=\"ml-auto -mr-2 self-start\" icon=\"close\" appearance=\"discrete\" onClick={onClose} />\r\n ) : null}\r\n </div>\r\n );\r\n});\r\n"],"names":["Banner","React","props","ref","children","state","onClose","className","cn","getBannerIcon","IconButton","icon","appearance","onClick"],"mappings":";;;;;IAcaA,MAAM,gBAAGC,UAAA,CAAiB,SAASD,MAAT,CAAgBE,KAAhB,EAAoCC,GAApC;EACnC,IAAQC,QAAR,GAAqCF,KAArC,CAAQE,QAAR;MAAkBC,KAAlB,GAAqCH,KAArC,CAAkBG,KAAlB;MAAyBC,OAAzB,GAAqCJ,KAArC,CAAyBI,OAAzB;EACA,IAAMC,SAAS,GAAGC,EAAE,CAAC,8EAAD,EAAiFN,KAAK,CAACK,SAAvF,CAApB;EAEA,OACIN,aAAA,MAAA;IAAKM,SAAS,EAAEA;iBAAqB;IAASJ,GAAG,EAAEA;GAAnD,EACKM,aAAa,CAACJ,KAAD,CADlB,EAEKD,QAFL,EAGKE,OAAO,GACJL,aAAA,CAACS,UAAD;IAAYH,SAAS,EAAC;IAA2BI,IAAI,EAAC;IAAQC,UAAU,EAAC;IAAWC,OAAO,EAAEP;GAA7F,CADI,GAEJ,IALR,CADJ;AASH,CAbqB;;;;"}
@@ -1,7 +1,7 @@
1
1
  import React__default from 'react';
2
2
  import { Icon } from '../Icon/Icon.js';
3
3
 
4
- var getBannerIcon = function getBannerIcon(type) {
4
+ const getBannerIcon = type => {
5
5
  switch (type) {
6
6
  case 'success':
7
7
  return React__default.createElement(Icon, {
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../../src/components/Banner/util.tsx"],"sourcesContent":["import React from 'react';\nimport { Icon } from '../Icon/Icon';\nimport { State } from '../../types';\n\nexport const getBannerIcon = (type: State): JSX.Element | null => {\n switch (type) {\n case 'success':\n return <Icon name=\"tick\" className=\"yt-green-solid mt-1 self-start rounded-full\" />;\n\n case 'error':\n return <Icon name=\"warning\" className=\"yt-red-solid mt-1 self-start rounded-full\" />;\n\n case 'warning':\n return <Icon name=\"warning\" className=\"yt-yellow-solid mt-1 self-start rounded-full\" />;\n\n case 'information':\n return <Icon name=\"info\" className=\"yt-blue-solid mt-1 self-start rounded-full\" />;\n\n default:\n return null;\n }\n};\n"],"names":["getBannerIcon","type","React","Icon","name","className"],"mappings":";;;IAIaA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,IAAD;EACzB,QAAQA,IAAR;IACI,KAAK,SAAL;MACI,OAAOC,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAOC,SAAS,EAAC;OAA5B,CAAP;;IAEJ,KAAK,OAAL;MACI,OAAOH,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAUC,SAAS,EAAC;OAA/B,CAAP;;IAEJ,KAAK,SAAL;MACI,OAAOH,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAUC,SAAS,EAAC;OAA/B,CAAP;;IAEJ,KAAK,aAAL;MACI,OAAOH,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAOC,SAAS,EAAC;OAA5B,CAAP;;IAEJ;MACI,OAAO,IAAP;;AAEX;;;;"}
1
+ {"version":3,"file":"util.js","sources":["../../../../src/components/Banner/util.tsx"],"sourcesContent":["import React from 'react';\r\nimport { Icon } from '../Icon/Icon';\r\nimport { State } from '../../types';\r\n\r\nexport const getBannerIcon = (type: State): JSX.Element | null => {\r\n switch (type) {\r\n case 'success':\r\n return <Icon name=\"tick\" className=\"yt-green-solid mt-1 self-start rounded-full\" />;\r\n\r\n case 'error':\r\n return <Icon name=\"warning\" className=\"yt-red-solid mt-1 self-start rounded-full\" />;\r\n\r\n case 'warning':\r\n return <Icon name=\"warning\" className=\"yt-yellow-solid mt-1 self-start rounded-full\" />;\r\n\r\n case 'information':\r\n return <Icon name=\"info\" className=\"yt-blue-solid mt-1 self-start rounded-full\" />;\r\n\r\n default:\r\n return null;\r\n }\r\n};\r\n"],"names":["getBannerIcon","type","React","Icon","name","className"],"mappings":";;;MAIaA,aAAa,GAAIC,IAAD;EACzB,QAAQA,IAAR;IACI,KAAK,SAAL;MACI,OAAOC,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAOC,SAAS,EAAC;OAA5B,CAAP;;IAEJ,KAAK,OAAL;MACI,OAAOH,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAUC,SAAS,EAAC;OAA/B,CAAP;;IAEJ,KAAK,SAAL;MACI,OAAOH,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAUC,SAAS,EAAC;OAA/B,CAAP;;IAEJ,KAAK,aAAL;MACI,OAAOH,4BAAA,CAACC,IAAD;QAAMC,IAAI,EAAC;QAAOC,SAAS,EAAC;OAA5B,CAAP;;IAEJ;MACI,OAAO,IAAP;;AAEX;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport { Appearance } from '../../types';\nimport * as ButtonPrimitive from '../../primitives/Button';\nimport { getAppearanceClasses, getButtonClasses, createButton } from './util';\nimport { HangerProps } from '../Hanger/Hanger';\nimport { MenuProps } from '../Menu/Menu';\nimport { DialogProps } from '../Dialog/Dialog';\nimport { PopoverProps } from '../Popover/Popover';\nimport './Button.css';\nimport { Icon } from '../Icon/Icon';\n\nexport type ButtonProps = ButtonPrimitive.ButtonProps & {\n /** Appearance will change the style of the button */\n appearance?: Appearance;\n /**\n * Dialog component associated with the button, clicking the button will open the dialog.\n * *Note* that `onClick` event on button won't be handled, as in this case, the purpose of\n * the button should be only to open the associated dialog when clicked.\n */\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\n /** If fluid, button expands to the width of it's container */\n fluid?: boolean;\n /** Hanger component associated with the button. */\n hanger?: (props: Partial<HangerProps>) => JSX.Element;\n /** Menu component associated with the button. */\n menu?: (props: Partial<MenuProps>) => JSX.Element;\n /**\n * Popover component associated with the button, clicking the button will open the popover.\n * *Note* that `onClick` event on button won't be handled, as in this case, the purpose of\n * the button should be only to open the associated popover when clicked.\n */\n popover?: (props: Partial<PopoverProps>) => JSX.Element;\n /** A tooltip to show when hovering over the button */\n tooltip?: string;\n};\n\nexport const Button = React.forwardRef(function Button(\n props: ButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>\n) {\n const { fluid, ...otherProps } = props;\n const className = cn(\n getButtonClasses(),\n getAppearanceClasses(otherProps.appearance),\n 'rounded px-3',\n {\n 'cursor-not-allowed opacity-50': props.disabled,\n 'focus:yt-focus active:focus:yt-focus': !props.disabled,\n 'w-full': fluid,\n },\n props.className\n );\n\n let children = otherProps.children;\n\n // add a chevron icon to menu buttons\n if (typeof otherProps.menu === 'function') {\n children = Array.isArray(children)\n ? [...children, <Icon key=\"chevron-down\" name=\"chevron-down\" />]\n : [children, <Icon key=\"chevron-down\" name=\"chevron-down\" />];\n }\n\n return createButton({ ...otherProps, children, 'data-taco': 'button' }, className, ref);\n});\n"],"names":["Button","React","props","ref","fluid","otherProps","className","cn","getButtonClasses","getAppearanceClasses","appearance","disabled","children","menu","Array","isArray","Icon","key","name","createButton"],"mappings":";;;;;;;IAqCaA,MAAM,gBAAGC,UAAA,CAAiB,SAASD,MAAT,CACnCE,KADmC,EAEnCC,GAFmC;EAInC,IAAQC,KAAR,GAAiCF,KAAjC,CAAQE,KAAR;MAAkBC,UAAlB,iCAAiCH,KAAjC;;EACA,IAAMI,SAAS,GAAGC,EAAE,CAChBC,gBAAgB,EADA,EAEhBC,oBAAoB,CAACJ,UAAU,CAACK,UAAZ,CAFJ,EAGhB,cAHgB,EAIhB;IACI,iCAAiCR,KAAK,CAACS,QAD3C;IAEI,wCAAwC,CAACT,KAAK,CAACS,QAFnD;IAGI,UAAUP;GAPE,EAShBF,KAAK,CAACI,SATU,CAApB;EAYA,IAAIM,QAAQ,GAAGP,UAAU,CAACO,QAA1B;;EAGA,IAAI,OAAOP,UAAU,CAACQ,IAAlB,KAA2B,UAA/B,EAA2C;IACvCD,QAAQ,GAAGE,KAAK,CAACC,OAAN,CAAcH,QAAd,cACDA,QADC,GACSX,aAAA,CAACe,IAAD;MAAMC,GAAG,EAAC;MAAeC,IAAI,EAAC;KAA9B,CADT,KAEL,CAACN,QAAD,EAAWX,aAAA,CAACe,IAAD;MAAMC,GAAG,EAAC;MAAeC,IAAI,EAAC;KAA9B,CAAX,CAFN;;;EAKJ,OAAOC,YAAY,cAAMd,UAAN;IAAkBO,QAAQ,EAARA,QAAlB;IAA4B,aAAa;MAAYN,SAArD,EAAgEH,GAAhE,CAAnB;AACH,CA3BqB;;;;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport { Appearance } from '../../types';\r\nimport * as ButtonPrimitive from '../../primitives/Button';\r\nimport { getAppearanceClasses, getButtonClasses, createButton } from './util';\r\nimport { HangerProps } from '../Hanger/Hanger';\r\nimport { MenuProps } from '../Menu/Menu';\r\nimport { DialogProps } from '../Dialog/Dialog';\r\nimport { PopoverProps } from '../Popover/Popover';\r\nimport './Button.css';\r\nimport { Icon } from '../Icon/Icon';\r\n\r\nexport type ButtonProps = ButtonPrimitive.ButtonProps & {\r\n /** Appearance will change the style of the button */\r\n appearance?: Appearance;\r\n /**\r\n * Dialog component associated with the button, clicking the button will open the dialog.\r\n * *Note* that `onClick` event on button won't be handled, as in this case, the purpose of\r\n * the button should be only to open the associated dialog when clicked.\r\n */\r\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\r\n /** If fluid, button expands to the width of it's container */\r\n fluid?: boolean;\r\n /** Hanger component associated with the button. */\r\n hanger?: (props: Partial<HangerProps>) => JSX.Element;\r\n /** Menu component associated with the button. */\r\n menu?: (props: Partial<MenuProps>) => JSX.Element;\r\n /**\r\n * Popover component associated with the button, clicking the button will open the popover.\r\n * *Note* that `onClick` event on button won't be handled, as in this case, the purpose of\r\n * the button should be only to open the associated popover when clicked.\r\n */\r\n popover?: (props: Partial<PopoverProps>) => JSX.Element;\r\n /** A tooltip to show when hovering over the button */\r\n tooltip?: string;\r\n};\r\n\r\nexport const Button = React.forwardRef(function Button(\r\n props: ButtonProps,\r\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>\r\n) {\r\n const { fluid, ...otherProps } = props;\r\n const className = cn(\r\n getButtonClasses(),\r\n getAppearanceClasses(otherProps.appearance),\r\n 'rounded px-3',\r\n {\r\n 'cursor-not-allowed opacity-50': props.disabled,\r\n 'focus:yt-focus active:focus:yt-focus': !props.disabled,\r\n 'w-full': fluid,\r\n },\r\n props.className\r\n );\r\n\r\n let children = otherProps.children;\r\n\r\n // add a chevron icon to menu buttons\r\n if (typeof otherProps.menu === 'function') {\r\n children = Array.isArray(children)\r\n ? [...children, <Icon key=\"chevron-down\" name=\"chevron-down\" />]\r\n : [children, <Icon key=\"chevron-down\" name=\"chevron-down\" />];\r\n }\r\n\r\n return createButton({ ...otherProps, children, 'data-taco': 'button' }, className, ref);\r\n});\r\n"],"names":["Button","React","props","ref","fluid","otherProps","className","cn","getButtonClasses","getAppearanceClasses","appearance","disabled","children","menu","Array","isArray","Icon","key","name","createButton"],"mappings":";;;;;;;IAqCaA,MAAM,gBAAGC,UAAA,CAAiB,SAASD,MAAT,CACnCE,KADmC,EAEnCC,GAFmC;EAInC,IAAQC,KAAR,GAAiCF,KAAjC,CAAQE,KAAR;MAAkBC,UAAlB,iCAAiCH,KAAjC;;EACA,IAAMI,SAAS,GAAGC,EAAE,CAChBC,gBAAgB,EADA,EAEhBC,oBAAoB,CAACJ,UAAU,CAACK,UAAZ,CAFJ,EAGhB,cAHgB,EAIhB;IACI,iCAAiCR,KAAK,CAACS,QAD3C;IAEI,wCAAwC,CAACT,KAAK,CAACS,QAFnD;IAGI,UAAUP;GAPE,EAShBF,KAAK,CAACI,SATU,CAApB;EAYA,IAAIM,QAAQ,GAAGP,UAAU,CAACO,QAA1B;;EAGA,IAAI,OAAOP,UAAU,CAACQ,IAAlB,KAA2B,UAA/B,EAA2C;IACvCD,QAAQ,GAAGE,KAAK,CAACC,OAAN,CAAcH,QAAd,cACDA,QADC,GACSX,aAAA,CAACe,IAAD;MAAMC,GAAG,EAAC;MAAeC,IAAI,EAAC;KAA9B,CADT,KAEL,CAACN,QAAD,EAAWX,aAAA,CAACe,IAAD;MAAMC,GAAG,EAAC;MAAeC,IAAI,EAAC;KAA9B,CAAX,CAFN;;;EAKJ,OAAOC,YAAY,cAAMd,UAAN;IAAkBO,QAAQ,EAARA,QAAlB;IAA4B,aAAa;MAAYN,SAArD,EAAgEH,GAAhE,CAAnB;AACH,CA3BqB;;;;"}
@@ -1,49 +1,44 @@
1
- import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import React__default from 'react';
3
2
  import { Button } from '../../primitives/Button.js';
4
3
  import { Tooltip } from '../Tooltip/Tooltip.js';
5
4
 
6
- var _excluded = ["dialog", "hanger", "menu", "popover", "tooltip"];
7
- var getButtonClasses = function getButtonClasses() {
5
+ const getButtonClasses = () => {
8
6
  return 'min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] gap-1 h-max leading-5 inline-flex items-center justify-center';
9
7
  };
10
- var getAppearanceClasses = function getAppearanceClasses(value, icon) {
11
- if (icon === void 0) {
12
- icon = false;
13
- }
14
-
8
+ const getAppearanceClasses = (value, icon = false) => {
15
9
  switch (value) {
16
10
  case 'primary':
17
- return "yt-blue-solid focus:bg-blue focus:text-white focus:yt-focus active:bg-blue-dark active:text-white hover:bg-blue-light hover:text-white hover:focus:bg-blue-light hover:focus:border-blue-light hover:focus:text-white disabled:hover:yt-blue-solid disabled:hover:hover:border-blue";
11
+ return `yt-blue-solid focus:bg-blue focus:text-white focus:yt-focus active:bg-blue-dark active:text-white hover:bg-blue-light hover:text-white hover:focus:bg-blue-light hover:focus:border-blue-light hover:focus:text-white disabled:hover:yt-blue-solid disabled:hover:hover:border-blue`;
18
12
 
19
13
  case 'danger':
20
- return "yt-red-solid focus:bg-red focus:text-white focus:yt-focus-red active:bg-red-dark active:text-white hover:bg-red-light hover:text-white hover:focus:bg-red-light hover:focus:text-white disabled:hover:yt-red-solid";
14
+ return `yt-red-solid focus:bg-red focus:text-white focus:yt-focus-red active:bg-red-dark active:text-white hover:bg-red-light hover:text-white hover:focus:bg-red-light hover:focus:text-white disabled:hover:yt-red-solid`;
21
15
 
22
16
  case 'ghost':
23
- return "bg-white shadow-[inset_0_0_0_1px_theme(colors.blue.DEFAULT)] text-blue focus:bg-transparent focus:text-blue active:bg-blue-lightest focus:!shadow-[inset_0_0_0_1px_theme(colors.blue.DEFAULT),0_0_0_2px_rgba(0,99,255,0.25)] active:text-blue-dark hover:bg-blue-lightest hover:shadow-[inset_0_0_0_1px_theme(colors.blue.light)] hover:text-blue-light hover:focus:bg-blue-lightest hover:focus:!shadow-[inset_0_0_0_1px_theme(colors.blue.light),0_0_0_2px_rgba(0,99,255,0.25)] hover:focus:text-blue-light";
17
+ return `bg-white shadow-[inset_0_0_0_1px_theme(colors.blue.DEFAULT)] text-blue focus:bg-transparent focus:text-blue active:bg-blue-lightest focus:!shadow-[inset_0_0_0_1px_theme(colors.blue.DEFAULT),0_0_0_2px_rgba(0,99,255,0.25)] active:text-blue-dark hover:bg-blue-lightest hover:shadow-[inset_0_0_0_1px_theme(colors.blue.light)] hover:text-blue-light hover:focus:bg-blue-lightest hover:focus:!shadow-[inset_0_0_0_1px_theme(colors.blue.light),0_0_0_2px_rgba(0,99,255,0.25)] hover:focus:text-blue-light`;
24
18
 
25
19
  case 'discrete':
26
20
  {
27
21
  if (icon) {
28
- return "bg-transparent text-black border-transparent focus:text-black focus:yt-focus active:text-black hover:text-grey-darkest hover:focus:text-grey-darkest disabled:hover:text-black ";
22
+ return `bg-transparent text-black border-transparent focus:text-black focus:yt-focus active:text-black hover:text-grey-darkest hover:focus:text-grey-darkest disabled:hover:text-black `;
29
23
  }
30
24
 
31
- return "yt-transparent focus:text-blue focus:yt-focus active:text-blue-dark hover:text-blue-light hover:focus:text-blue-light disabled:hover:yt-transparent";
25
+ return `yt-transparent focus:text-blue focus:yt-focus active:text-blue-dark hover:text-blue-light hover:focus:text-blue-light disabled:hover:yt-transparent`;
32
26
  }
33
27
 
34
28
  default:
35
- return "yt-grey-solid focus:bg-grey focus:yt-focus active:bg-grey-dark active:text-black hover:bg-grey-light hover:text-grey-darkest hover:focus:bg-grey-light hover:focus:text-grey-darkest disabled:hover:yt-grey-solid";
29
+ return `yt-grey-solid focus:bg-grey focus:yt-focus active:bg-grey-dark active:text-black hover:bg-grey-light hover:text-grey-darkest hover:focus:bg-grey-light hover:focus:text-grey-darkest disabled:hover:yt-grey-solid`;
36
30
  }
37
31
  };
38
- var createButton = function createButton(props, className, ref) {
39
- var dialog = props.dialog,
40
- hanger = props.hanger,
41
- menu = props.menu,
42
- popover = props.popover,
43
- tooltip = props.tooltip,
44
- otherProps = _objectWithoutPropertiesLoose(props, _excluded);
45
-
46
- var button = React__default.createElement(Button, Object.assign({}, otherProps, {
32
+ const createButton = (props, className, ref) => {
33
+ const {
34
+ dialog,
35
+ hanger,
36
+ menu,
37
+ popover,
38
+ tooltip,
39
+ ...otherProps
40
+ } = props;
41
+ let button = React__default.createElement(Button, Object.assign({}, otherProps, {
47
42
  className: className,
48
43
  ref: ref
49
44
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../../src/components/Button/util.tsx"],"sourcesContent":["import React from 'react';\nimport { Appearance } from '../../types';\nimport * as ButtonPrimitive from '../../primitives/Button';\nimport { Tooltip } from '../Tooltip/Tooltip';\n\nexport const getButtonClasses = () => {\n return 'min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] gap-1 h-max leading-5 inline-flex items-center justify-center';\n};\n\nexport const getAppearanceClasses = (value: Appearance | undefined, icon = false): string => {\n switch (value) {\n case 'primary':\n return `yt-blue-solid focus:bg-blue focus:text-white focus:yt-focus active:bg-blue-dark active:text-white hover:bg-blue-light hover:text-white hover:focus:bg-blue-light hover:focus:border-blue-light hover:focus:text-white disabled:hover:yt-blue-solid disabled:hover:hover:border-blue`;\n\n case 'danger':\n return `yt-red-solid focus:bg-red focus:text-white focus:yt-focus-red active:bg-red-dark active:text-white hover:bg-red-light hover:text-white hover:focus:bg-red-light hover:focus:text-white disabled:hover:yt-red-solid`;\n\n case 'ghost':\n return `bg-white shadow-[inset_0_0_0_1px_theme(colors.blue.DEFAULT)] text-blue focus:bg-transparent focus:text-blue active:bg-blue-lightest focus:!shadow-[inset_0_0_0_1px_theme(colors.blue.DEFAULT),0_0_0_2px_rgba(0,99,255,0.25)] active:text-blue-dark hover:bg-blue-lightest hover:shadow-[inset_0_0_0_1px_theme(colors.blue.light)] hover:text-blue-light hover:focus:bg-blue-lightest hover:focus:!shadow-[inset_0_0_0_1px_theme(colors.blue.light),0_0_0_2px_rgba(0,99,255,0.25)] hover:focus:text-blue-light`;\n\n case 'discrete': {\n if (icon) {\n return `bg-transparent text-black border-transparent focus:text-black focus:yt-focus active:text-black hover:text-grey-darkest hover:focus:text-grey-darkest disabled:hover:text-black `;\n }\n\n return `yt-transparent focus:text-blue focus:yt-focus active:text-blue-dark hover:text-blue-light hover:focus:text-blue-light disabled:hover:yt-transparent`;\n }\n\n default:\n return `yt-grey-solid focus:bg-grey focus:yt-focus active:bg-grey-dark active:text-black hover:bg-grey-light hover:text-grey-darkest hover:focus:bg-grey-light hover:focus:text-grey-darkest disabled:hover:yt-grey-solid`;\n }\n};\n\nexport const createButton = (\n props: any,\n className: string,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>\n): JSX.Element => {\n const { dialog, hanger, menu, popover, tooltip, ...otherProps } = props;\n\n let button = <ButtonPrimitive.Button {...otherProps} className={className} ref={ref} />;\n\n if (typeof dialog === 'function') {\n button = dialog({ trigger: button });\n } else if (typeof menu === 'function') {\n button = menu({ trigger: button, appearance: otherProps.appearance });\n } else if (typeof popover === 'function') {\n button = popover({ trigger: button });\n }\n\n if (typeof hanger === 'function') {\n button = hanger({ anchor: button });\n }\n\n if (tooltip) {\n button = <Tooltip title={tooltip}>{button}</Tooltip>;\n }\n\n return button;\n};\n"],"names":["getButtonClasses","getAppearanceClasses","value","icon","createButton","props","className","ref","dialog","hanger","menu","popover","tooltip","otherProps","button","React","ButtonPrimitive","trigger","appearance","anchor","Tooltip","title"],"mappings":";;;;;;IAKaA,gBAAgB,GAAG,SAAnBA,gBAAmB;EAC5B,OAAO,iHAAP;AACH;IAEYC,oBAAoB,GAAG,SAAvBA,oBAAuB,CAACC,KAAD,EAAgCC,IAAhC;MAAgCA;IAAAA,OAAO;;;EACvE,QAAQD,KAAR;IACI,KAAK,SAAL;MACI;;IAEJ,KAAK,QAAL;MACI;;IAEJ,KAAK,OAAL;MACI;;IAEJ,KAAK,UAAL;MAAiB;QACb,IAAIC,IAAJ,EAAU;UACN;;;QAGJ;;;IAGJ;MACI;;AAEX;IAEYC,YAAY,GAAG,SAAfA,YAAe,CACxBC,KADwB,EAExBC,SAFwB,EAGxBC,GAHwB;EAKxB,IAAQC,MAAR,GAAkEH,KAAlE,CAAQG,MAAR;MAAgBC,MAAhB,GAAkEJ,KAAlE,CAAgBI,MAAhB;MAAwBC,IAAxB,GAAkEL,KAAlE,CAAwBK,IAAxB;MAA8BC,OAA9B,GAAkEN,KAAlE,CAA8BM,OAA9B;MAAuCC,OAAvC,GAAkEP,KAAlE,CAAuCO,OAAvC;MAAmDC,UAAnD,iCAAkER,KAAlE;;EAEA,IAAIS,MAAM,GAAGC,4BAAA,CAACC,MAAD,oBAA4BH;IAAYP,SAAS,EAAEA;IAAWC,GAAG,EAAEA;IAAnE,CAAb;;EAEA,IAAI,OAAOC,MAAP,KAAkB,UAAtB,EAAkC;IAC9BM,MAAM,GAAGN,MAAM,CAAC;MAAES,OAAO,EAAEH;KAAZ,CAAf;GADJ,MAEO,IAAI,OAAOJ,IAAP,KAAgB,UAApB,EAAgC;IACnCI,MAAM,GAAGJ,IAAI,CAAC;MAAEO,OAAO,EAAEH,MAAX;MAAmBI,UAAU,EAAEL,UAAU,CAACK;KAA3C,CAAb;GADG,MAEA,IAAI,OAAOP,OAAP,KAAmB,UAAvB,EAAmC;IACtCG,MAAM,GAAGH,OAAO,CAAC;MAAEM,OAAO,EAAEH;KAAZ,CAAhB;;;EAGJ,IAAI,OAAOL,MAAP,KAAkB,UAAtB,EAAkC;IAC9BK,MAAM,GAAGL,MAAM,CAAC;MAAEU,MAAM,EAAEL;KAAX,CAAf;;;EAGJ,IAAIF,OAAJ,EAAa;IACTE,MAAM,GAAGC,4BAAA,CAACK,OAAD;MAASC,KAAK,EAAET;KAAhB,EAA0BE,MAA1B,CAAT;;;EAGJ,OAAOA,MAAP;AACH;;;;"}
1
+ {"version":3,"file":"util.js","sources":["../../../../src/components/Button/util.tsx"],"sourcesContent":["import React from 'react';\r\nimport { Appearance } from '../../types';\r\nimport * as ButtonPrimitive from '../../primitives/Button';\r\nimport { Tooltip } from '../Tooltip/Tooltip';\r\n\r\nexport const getButtonClasses = () => {\r\n return 'min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] gap-1 h-max leading-5 inline-flex items-center justify-center';\r\n};\r\n\r\nexport const getAppearanceClasses = (value: Appearance | undefined, icon = false): string => {\r\n switch (value) {\r\n case 'primary':\r\n return `yt-blue-solid focus:bg-blue focus:text-white focus:yt-focus active:bg-blue-dark active:text-white hover:bg-blue-light hover:text-white hover:focus:bg-blue-light hover:focus:border-blue-light hover:focus:text-white disabled:hover:yt-blue-solid disabled:hover:hover:border-blue`;\r\n\r\n case 'danger':\r\n return `yt-red-solid focus:bg-red focus:text-white focus:yt-focus-red active:bg-red-dark active:text-white hover:bg-red-light hover:text-white hover:focus:bg-red-light hover:focus:text-white disabled:hover:yt-red-solid`;\r\n\r\n case 'ghost':\r\n return `bg-white shadow-[inset_0_0_0_1px_theme(colors.blue.DEFAULT)] text-blue focus:bg-transparent focus:text-blue active:bg-blue-lightest focus:!shadow-[inset_0_0_0_1px_theme(colors.blue.DEFAULT),0_0_0_2px_rgba(0,99,255,0.25)] active:text-blue-dark hover:bg-blue-lightest hover:shadow-[inset_0_0_0_1px_theme(colors.blue.light)] hover:text-blue-light hover:focus:bg-blue-lightest hover:focus:!shadow-[inset_0_0_0_1px_theme(colors.blue.light),0_0_0_2px_rgba(0,99,255,0.25)] hover:focus:text-blue-light`;\r\n\r\n case 'discrete': {\r\n if (icon) {\r\n return `bg-transparent text-black border-transparent focus:text-black focus:yt-focus active:text-black hover:text-grey-darkest hover:focus:text-grey-darkest disabled:hover:text-black `;\r\n }\r\n\r\n return `yt-transparent focus:text-blue focus:yt-focus active:text-blue-dark hover:text-blue-light hover:focus:text-blue-light disabled:hover:yt-transparent`;\r\n }\r\n\r\n default:\r\n return `yt-grey-solid focus:bg-grey focus:yt-focus active:bg-grey-dark active:text-black hover:bg-grey-light hover:text-grey-darkest hover:focus:bg-grey-light hover:focus:text-grey-darkest disabled:hover:yt-grey-solid`;\r\n }\r\n};\r\n\r\nexport const createButton = (\r\n props: any,\r\n className: string,\r\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>\r\n): JSX.Element => {\r\n const { dialog, hanger, menu, popover, tooltip, ...otherProps } = props;\r\n\r\n let button = <ButtonPrimitive.Button {...otherProps} className={className} ref={ref} />;\r\n\r\n if (typeof dialog === 'function') {\r\n button = dialog({ trigger: button });\r\n } else if (typeof menu === 'function') {\r\n button = menu({ trigger: button, appearance: otherProps.appearance });\r\n } else if (typeof popover === 'function') {\r\n button = popover({ trigger: button });\r\n }\r\n\r\n if (typeof hanger === 'function') {\r\n button = hanger({ anchor: button });\r\n }\r\n\r\n if (tooltip) {\r\n button = <Tooltip title={tooltip}>{button}</Tooltip>;\r\n }\r\n\r\n return button;\r\n};\r\n"],"names":["getButtonClasses","getAppearanceClasses","value","icon","createButton","props","className","ref","dialog","hanger","menu","popover","tooltip","otherProps","button","React","ButtonPrimitive","trigger","appearance","anchor","Tooltip","title"],"mappings":";;;;MAKaA,gBAAgB,GAAG;EAC5B,OAAO,iHAAP;AACH;MAEYC,oBAAoB,GAAG,CAACC,KAAD,EAAgCC,IAAI,GAAG,KAAvC;EAChC,QAAQD,KAAR;IACI,KAAK,SAAL;MACI,4RAAA;;IAEJ,KAAK,QAAL;MACI,2NAAA;;IAEJ,KAAK,OAAL;MACI,sfAAA;;IAEJ,KAAK,UAAL;MAAiB;QACb,IAAIC,IAAJ,EAAU;UACN,wLAAA;;;QAGJ,4JAAA;;;IAGJ;MACI,0NAAA;;AAEX;MAEYC,YAAY,GAAG,CACxBC,KADwB,EAExBC,SAFwB,EAGxBC,GAHwB;EAKxB,MAAM;IAAEC,MAAF;IAAUC,MAAV;IAAkBC,IAAlB;IAAwBC,OAAxB;IAAiCC,OAAjC;IAA0C,GAAGC;MAAeR,KAAlE;EAEA,IAAIS,MAAM,GAAGC,4BAAA,CAACC,MAAD,oBAA4BH;IAAYP,SAAS,EAAEA;IAAWC,GAAG,EAAEA;IAAnE,CAAb;;EAEA,IAAI,OAAOC,MAAP,KAAkB,UAAtB,EAAkC;IAC9BM,MAAM,GAAGN,MAAM,CAAC;MAAES,OAAO,EAAEH;KAAZ,CAAf;GADJ,MAEO,IAAI,OAAOJ,IAAP,KAAgB,UAApB,EAAgC;IACnCI,MAAM,GAAGJ,IAAI,CAAC;MAAEO,OAAO,EAAEH,MAAX;MAAmBI,UAAU,EAAEL,UAAU,CAACK;KAA3C,CAAb;GADG,MAEA,IAAI,OAAOP,OAAP,KAAmB,UAAvB,EAAmC;IACtCG,MAAM,GAAGH,OAAO,CAAC;MAAEM,OAAO,EAAEH;KAAZ,CAAhB;;;EAGJ,IAAI,OAAOL,MAAP,KAAkB,UAAtB,EAAkC;IAC9BK,MAAM,GAAGL,MAAM,CAAC;MAAEU,MAAM,EAAEL;KAAX,CAAf;;;EAGJ,IAAIF,OAAJ,EAAa;IACTE,MAAM,GAAGC,4BAAA,CAACK,OAAD;MAASC,KAAK,EAAET;KAAhB,EAA0BE,MAA1B,CAAT;;;EAGJ,OAAOA,MAAP;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.js","sources":["../../../../src/components/Calendar/Calendar.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport ReactDayPicker, { NavbarElementProps, DayModifiers } from 'react-day-picker';\nimport { useLocalization } from '../Provider/Provider';\nimport './Calendar.css';\nimport { IconButton } from '../IconButton/IconButton';\n\nexport type CalendarTextsActions = {\n /** Aria-label for previous month action button */\n previousMonth: string;\n /** Aria-label for next month action button */\n nextMonth: string;\n /** Aria-label for previous year action button */\n previousYear: string;\n /** Aria-label for next year action button */\n nextYear: string;\n /** Text displayed within today action button */\n today: string;\n};\n\nexport type CalendarTexts = {\n /** Text and aria-label for action buttons in Calendar */\n actions: CalendarTextsActions;\n /** Text abbreviation for months in Calendar's header, starting with January */\n months: string[];\n /** Text abbreviation for days in Calendar's header, starting with Sunday */\n weekdaysShort: string[];\n};\n\nconst renderDay = (day: Date, modifiers: DayModifiers): React.ReactNode =>\n modifiers.disabled ? <span className=\"dot\" /> : day.getDate();\n\n/** @internal */\ntype CustomNavbarElementProps = NavbarElementProps & {\n showYearControls?: boolean;\n onMonthChange: (month: Date) => void;\n value?: Date;\n};\n\nconst thisYear = new Date().getFullYear();\nconst years: number[] = [];\n\nfor (let i = thisYear - 10; i <= thisYear + 10; i += 1) {\n years.push(i);\n}\n\nconst Navbar = React.memo(\n ({ onMonthChange, onNextClick, onPreviousClick, value = new Date() }: CustomNavbarElementProps): JSX.Element => {\n const {\n texts: {\n calendar: { actions, months },\n },\n } = useLocalization();\n\n const handleChange = function handleChange(event) {\n const { year, month } = event.target.form;\n onMonthChange(new Date(year.value, month.value));\n };\n\n return (\n <div className=\"mb-2 flex items-center justify-between\">\n <form className=\"inline-flex space-x-1\">\n <select className=\"h-8 px-2\" name=\"month\" onChange={handleChange} value={value.getMonth()}>\n {months.map((month, i) => (\n <option key={month} value={i}>\n {month}\n </option>\n ))}\n </select>\n <select className=\"h-8 px-2\" name=\"year\" onChange={handleChange} value={value.getFullYear()}>\n {years.map(year => (\n <option key={year} value={year}>\n {String(year)}\n </option>\n ))}\n </select>\n </form>\n <div>\n <IconButton\n appearance=\"discrete\"\n icon=\"chevron-left\"\n aria-label={actions.previousMonth}\n onClick={() => onPreviousClick()}\n rounded\n />\n <IconButton\n appearance=\"discrete\"\n icon=\"chevron-right\"\n aria-label={actions.nextMonth}\n onClick={() => onNextClick()}\n rounded\n />\n </div>\n </div>\n );\n }\n);\n\nexport type CalendarProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'value'> & {\n /** Handler called when a day is clicked in calendar */\n onChange: (date: Date, event?: React.MouseEvent<HTMLDivElement>) => void;\n value?: Date;\n};\n\nexport const Calendar = React.forwardRef(function Calendar(props: CalendarProps, ref: React.Ref<ReactDayPicker>) {\n const { onChange: handleChange, value, ...otherProps } = props;\n const { locale, texts } = useLocalization();\n const [visibleMonth, setVisibleMonth] = React.useState(value ?? new Date());\n\n React.useEffect(() => {\n if (visibleMonth !== value) {\n setVisibleMonth(value ?? new Date());\n }\n }, [value]);\n\n const handleDayClick = (date, modifiers, event) => {\n if (modifiers.outside || modifiers.disabled) {\n return;\n }\n\n handleChange(date, event);\n };\n\n const handleCalendarClickToday = (): void => {\n const today = new Date();\n\n // set to midday to avoid UTC offset causing dates to be mismatched server side\n today.setHours(12);\n today.setMinutes(0);\n today.setSeconds(0);\n\n handleChange(today);\n };\n\n const className = cn('flex bg-white text-xs p-4', otherProps.className);\n\n return (\n <div data-taco=\"calendar\">\n <ReactDayPicker\n {...otherProps}\n className={className}\n month={visibleMonth}\n selectedDays={value}\n locale={locale.substring(0, 2)}\n firstDayOfWeek={1}\n months={texts.calendar.months}\n weekdaysShort={texts.calendar.weekdaysShort}\n navbarElement={navProps => <Navbar {...navProps} onMonthChange={setVisibleMonth} value={visibleMonth} />}\n onDayClick={handleDayClick}\n onMonthChange={setVisibleMonth}\n onTodayButtonClick={handleCalendarClickToday}\n captionElement={() => null}\n todayButton={texts.calendar.actions.today}\n showOutsideDays\n renderDay={renderDay}\n numberOfMonths={1}\n ref={ref}\n />\n </div>\n );\n});\n"],"names":["renderDay","day","modifiers","disabled","React","className","getDate","thisYear","Date","getFullYear","years","i","push","Navbar","onMonthChange","onNextClick","onPreviousClick","value","useLocalization","texts","calendar","actions","months","handleChange","event","target","form","year","month","name","onChange","getMonth","map","key","String","IconButton","appearance","icon","previousMonth","onClick","rounded","nextMonth","Calendar","props","ref","otherProps","locale","visibleMonth","setVisibleMonth","handleDayClick","date","outside","handleCalendarClickToday","today","setHours","setMinutes","setSeconds","cn","ReactDayPicker","selectedDays","substring","firstDayOfWeek","weekdaysShort","navbarElement","navProps","onDayClick","onTodayButtonClick","captionElement","todayButton","showOutsideDays","numberOfMonths"],"mappings":";;;;;;;;;AA6BA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAACC,GAAD,EAAYC,SAAZ;EAAA,OACdA,SAA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AChBC,WAAW,EAAEjD,KAAK,CAACC,QAAN,CAAeC,OAAf,CAAuBgC;IACpCgB,eAAe;IACfrE,SAAS,EAAEA;IACXsE,cAAc,EAAE;IAChB1B,GAAG,EAAEA;IAlBT,CADJ,CADJ;AAwBH,CAxDuB;;;;"}
1
+ {"version":3,"file":"Calendar.js","sources":["../../../../src/components/Calendar/Calendar.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport ReactDayPicker, { NavbarElementProps, DayModifiers } from 'react-day-picker';\r\nimport { useLocalization } from '../Provider/Provider';\r\nimport './Calendar.css';\r\nimport { IconButton } from '../IconButton/IconButton';\r\n\r\nexport type CalendarTextsActions = {\r\n /** Aria-label for previous month action button */\r\n previousMonth: string;\r\n /** Aria-label for next month action button */\r\n nextMonth: string;\r\n /** Aria-label for previous year action button */\r\n previousYear: string;\r\n /** Aria-label for next year action button */\r\n nextYear: string;\r\n /** Text displayed within today action button */\r\n today: string;\r\n};\r\n\r\nexport type CalendarTexts = {\r\n /** Text and aria-label for action buttons in Calendar */\r\n actions: CalendarTextsActions;\r\n /** Text abbreviation for months in Calendar's header, starting with January */\r\n months: string[];\r\n /** Text abbreviation for days in Calendar's header, starting with Sunday */\r\n weekdaysShort: string[];\r\n};\r\n\r\nconst renderDay = (day: Date, modifiers: DayModifiers): React.ReactNode =>\r\n modifiers.disabled ? <span className=\"dot\" /> : day.getDate();\r\n\r\n/** @internal */\r\ntype CustomNavbarElementProps = NavbarElementProps & {\r\n showYearControls?: boolean;\r\n onMonthChange: (month: Date) => void;\r\n value?: Date;\r\n};\r\n\r\nconst thisYear = new Date().getFullYear();\r\nconst years: number[] = [];\r\n\r\nfor (let i = thisYear - 10; i <= thisYear + 10; i += 1) {\r\n years.push(i);\r\n}\r\n\r\nconst Navbar = React.memo(\r\n ({ onMonthChange, onNextClick, onPreviousClick, value = new Date() }: CustomNavbarElementProps): JSX.Element => {\r\n const {\r\n texts: {\r\n calendar: { actions, months },\r\n },\r\n } = useLocalization();\r\n\r\n const handleChange = function handleChange(event) {\r\n const { year, month } = event.target.form;\r\n onMonthChange(new Date(year.value, month.value));\r\n };\r\n\r\n return (\r\n <div className=\"mb-2 flex items-center justify-between\">\r\n <form className=\"inline-flex space-x-1\">\r\n <select className=\"h-8 px-2\" name=\"month\" onChange={handleChange} value={value.getMonth()}>\r\n {months.map((month, i) => (\r\n <option key={month} value={i}>\r\n {month}\r\n </option>\r\n ))}\r\n </select>\r\n <select className=\"h-8 px-2\" name=\"year\" onChange={handleChange} value={value.getFullYear()}>\r\n {years.map(year => (\r\n <option key={year} value={year}>\r\n {String(year)}\r\n </option>\r\n ))}\r\n </select>\r\n </form>\r\n <div>\r\n <IconButton\r\n appearance=\"discrete\"\r\n icon=\"chevron-left\"\r\n aria-label={actions.previousMonth}\r\n onClick={() => onPreviousClick()}\r\n rounded\r\n />\r\n <IconButton\r\n appearance=\"discrete\"\r\n icon=\"chevron-right\"\r\n aria-label={actions.nextMonth}\r\n onClick={() => onNextClick()}\r\n rounded\r\n />\r\n </div>\r\n </div>\r\n );\r\n }\r\n);\r\n\r\nexport type CalendarProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'value'> & {\r\n /** Handler called when a day is clicked in calendar */\r\n onChange: (date: Date, event?: React.MouseEvent<HTMLDivElement>) => void;\r\n value?: Date;\r\n};\r\n\r\nexport const Calendar = React.forwardRef(function Calendar(props: CalendarProps, ref: React.Ref<ReactDayPicker>) {\r\n const { onChange: handleChange, value, ...otherProps } = props;\r\n const { locale, texts } = useLocalization();\r\n const [visibleMonth, setVisibleMonth] = React.useState(value ?? new Date());\r\n\r\n React.useEffect(() => {\r\n if (visibleMonth !== value) {\r\n setVisibleMonth(value ?? new Date());\r\n }\r\n }, [value]);\r\n\r\n const handleDayClick = (date, modifiers, event) => {\r\n if (modifiers.outside || modifiers.disabled) {\r\n return;\r\n }\r\n\r\n handleChange(date, event);\r\n };\r\n\r\n const handleCalendarClickToday = (): void => {\r\n const today = new Date();\r\n\r\n // set to midday to avoid UTC offset causing dates to be mismatched server side\r\n today.setHours(12);\r\n today.setMinutes(0);\r\n today.setSeconds(0);\r\n\r\n handleChange(today);\r\n };\r\n\r\n const className = cn('flex bg-white text-xs p-4', otherProps.className);\r\n\r\n return (\r\n <div data-taco=\"calendar\">\r\n <ReactDayPicker\r\n {...otherProps}\r\n className={className}\r\n month={visibleMonth}\r\n selectedDays={value}\r\n locale={locale.substring(0, 2)}\r\n firstDayOfWeek={1}\r\n months={texts.calendar.months}\r\n weekdaysShort={texts.calendar.weekdaysShort}\r\n navbarElement={navProps => <Navbar {...navProps} onMonthChange={setVisibleMonth} value={visibleMonth} />}\r\n onDayClick={handleDayClick}\r\n onMonthChange={setVisibleMonth}\r\n onTodayButtonClick={handleCalendarClickToday}\r\n captionElement={() => null}\r\n todayButton={texts.calendar.actions.today}\r\n showOutsideDays\r\n renderDay={renderDay}\r\n numberOfMonths={1}\r\n ref={ref}\r\n />\r\n </div>\r\n );\r\n});\r\n"],"names":["renderDay","day","modifiers","disabled","React","className","getDate","thisYear","Date","getFullYear","years","i","push","Navbar","onMonthChange","onNextClick","onPreviousClick","value","useLocalization","texts","calendar","actions","months","handleChange","event","target","form","year","month","name","onChange","getMonth","map","key","String","IconButton","appearance","icon","previousMonth","onClick","rounded","nextMonth","Calendar","props","ref","otherProps","locale","visibleMonth","setVisibleMonth","handleDayClick","date","outside","handleCalendarClickToday","today","setHours","setMinutes","setSeconds","cn","ReactDayPicker","selectedDays","substring","firstDayOfWeek","weekdaysShort","navbarElement","navProps","onDayClick","onTodayButtonClick","captionElement","todayButton","showOutsideDays","numberOfMonths"],"mappings":";;;;;;;;;AA6BA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAACC,GAAD,EAAYC,SAAZ;EAAA,OACdA,SAAS,CAACC,QAAV,GAAqBC,aAAA,OAAA;IAAMC,SAAS,EAAC;GAAhB,CAArB,GAAgDJ,GAAG,CAACK,OAAJ,EADlC;AAAA,CAAlB;;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AChB1B,GAAG,EAAEA;IAlBT,CADJ,CADJ;AAwBH,CAxDuB;;;;"}
@@ -1,4 +1,3 @@
1
- import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import { forwardRef, createElement } from 'react';
3
2
  import cn from 'classnames';
4
3
  import '../Icon/components/index.js';
@@ -16,6 +15,7 @@ import '../Toast/Toaster.js';
16
15
  import '../Provider/Provider.js';
17
16
  import '../Calendar/Calendar.js';
18
17
  import '../Checkbox/Checkbox.js';
18
+ import '../../utils/hooks/useProxiedRef.js';
19
19
  import '../Input/Input.js';
20
20
  import '../../utils/hooks/useListKeyboardNavigation.js';
21
21
  import '../../utils/hooks/useListScrollTo.js';
@@ -51,12 +51,12 @@ import '../Switch/Switch.js';
51
51
  import '../Tour/Tour.js';
52
52
  import '../../utils/hooks/useOnClickOutside.js';
53
53
 
54
- var _excluded = ["noPadding"];
55
- var Content = /*#__PURE__*/forwardRef(function CardContent(externalProps, ref) {
56
- var noPadding = externalProps.noPadding,
57
- props = _objectWithoutPropertiesLoose(externalProps, _excluded);
58
-
59
- var className = cn('flex-grow overflow-auto', {
54
+ const Content = /*#__PURE__*/forwardRef(function CardContent(externalProps, ref) {
55
+ const {
56
+ noPadding,
57
+ ...props
58
+ } = externalProps;
59
+ const className = cn('flex-grow overflow-auto', {
60
60
  'mx-4 mb-4': !noPadding
61
61
  }, props.className);
62
62
  return createElement("div", Object.assign({}, props, {
@@ -64,11 +64,13 @@ var Content = /*#__PURE__*/forwardRef(function CardContent(externalProps, ref) {
64
64
  ref: ref
65
65
  }));
66
66
  });
67
- var Card = /*#__PURE__*/forwardRef(function Card(props, ref) {
68
- var title = props.title,
69
- menu = props.menu,
70
- children = props.children;
71
- var className = cn('bg-white flex flex-col rounded-xl shadow-[0px_0px_1px_rgba(0,0,0,0.1),0px_6px_18px_rgba(47,51,68,0.2)]', props.className);
67
+ const Card = /*#__PURE__*/forwardRef(function Card(props, ref) {
68
+ const {
69
+ title,
70
+ menu,
71
+ children
72
+ } = props;
73
+ const className = cn('bg-white flex flex-col rounded-xl shadow-[0px_0px_1px_rgba(0,0,0,0.1),0px_6px_18px_rgba(47,51,68,0.2)]', props.className);
72
74
  return createElement("div", {
73
75
  className: className,
74
76
  "data-taco": "card",
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","sources":["../../../../src/components/Card/Card.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\n\nimport { MenuProps, IconButton } from '../..';\n\nexport type CardContentProps = React.HTMLAttributes<HTMLDivElement> & {\n noPadding?: boolean;\n};\n\nconst Content = React.forwardRef<HTMLDivElement, CardContentProps>(function CardContent(externalProps, ref) {\n const { noPadding, ...props } = externalProps;\n const className = cn(\n 'flex-grow overflow-auto',\n {\n 'mx-4 mb-4': !noPadding,\n },\n props.className\n );\n return <div {...props} className={className} ref={ref} />;\n});\n\nexport type CardProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Title of the Card */\n title: string | React.ReactElement;\n /** Menu component associated with the Card */\n menu?: (props: Partial<MenuProps>) => JSX.Element;\n};\n\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(function Card(props, ref) {\n const { title, menu, children } = props;\n const className = cn(\n 'bg-white flex flex-col rounded-xl shadow-[0px_0px_1px_rgba(0,0,0,0.1),0px_6px_18px_rgba(47,51,68,0.2)]',\n props.className\n );\n\n return (\n <div className={className} data-taco=\"card\" ref={ref}>\n <div className=\"mx-4 mt-4 mb-2 flex\">\n {title && <h4 className=\"mb-0 flex-grow text-left\">{title}</h4>}\n {menu ? <IconButton icon=\"ellipsis-horizontal\" appearance=\"discrete\" menu={menu} className=\"-mt-[4px]\" /> : null}\n </div>\n {children}\n </div>\n );\n}) as React.ForwardRefExoticComponent<CardProps> & {\n Content: React.ForwardRefExoticComponent<CardContentProps>;\n};\nCard.Content = Content;\n"],"names":["Content","React","CardContent","externalProps","ref","noPadding","props","className","cn","Card","title","menu","children","IconButton","icon","appear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["import * as React from 'react';\r\nimport cn from 'classnames';\r\n\r\nimport { MenuProps, IconButton } from '../..';\r\n\r\nexport type CardContentProps = React.HTMLAttributes<HTMLDivElement> & {\r\n noPadding?: boolean;\r\n};\r\n\r\nconst Content = React.forwardRef<HTMLDivElement, CardContentProps>(function CardContent(externalProps, ref) {\r\n const { noPadding, ...props } = externalProps;\r\n const className = cn(\r\n 'flex-grow overflow-auto',\r\n {\r\n 'mx-4 mb-4': !noPadding,\r\n },\r\n props.className\r\n );\r\n return <div {...props} className={className} ref={ref} />;\r\n});\r\n\r\nexport type CardProps = React.HTMLAttributes<HTMLDivElement> & {\r\n /** Title of the Card */\r\n title: string | React.ReactElement;\r\n /** Menu component associated with the Card */\r\n menu?: (props: Partial<MenuProps>) => JSX.Element;\r\n};\r\n\r\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(function Card(props, ref) {\r\n const { title, menu, children } = props;\r\n const className = cn(\r\n 'bg-white flex flex-col rounded-xl shadow-[0px_0px_1px_rgba(0,0,0,0.1),0px_6px_18px_rgba(47,51,68,0.2)]',\r\n props.className\r\n );\r\n\r\n return (\r\n <div className={className} data-taco=\"card\" ref={ref}>\r\n <div className=\"mx-4 mt-4 mb-2 flex\">\r\n {title && <h4 className=\"mb-0 flex-grow text-left\">{title}</h4>}\r\n {menu ? <IconButton icon=\"ellipsis-horizontal\" appearance=\"discrete\" menu={menu} className=\"-mt-[4px]\" /> : null}\r\n </div>\r\n {children}\r\n </div>\r\n );\r\n}) as React.ForwardRefExoticComponent<CardProps> & {\r\n Content: React.ForwardRefExoticComponent<CardContentProps>;\r\n};\r\nCard.Content = Content;\r\n"],"names":["Content","React","CardContent","externalProps","ref","noPadding","props","className","cn","Card","title","menu","children","IconButton","icon","appearance"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAMA,OAAO,gBAAGC,UAAA,CAAmD,SAASC,WAAT,CAAqBC,aAArB,EAAoCC,GAApC;EAC/D,MAAM;IAAEC,SAAF;IAAa,GAAGC;MAAUH,aAAhC;EACA,MAAMI,SAAS,GAAGC,EAAE,CAChB,yBADgB,EAEhB;IACI,aAAa,CAACH;GAHF,EAKhBC,KAAK,CAACC,SALU,CAApB;EAOA,OAAON,aAAA,MAAA,oBAASK;IAAOC,SAAS,EAAEA;IAAWH,GAAG,EAAEA;IAA3C,CAAP;AACH,CAVe,CAAhB;MAmBaK,IAAI,gBAAGR,UAAA,CAA4C,SAASQ,IAAT,CAAcH,KAAd,EAAqBF,GAArB;EAC5D,MAAM;IAAEM,KAAF;IAASC,IAAT;IAAeC;MAAaN,KAAlC;EACA,MAAMC,SAAS,GAAGC,EAAE,CAChB,wGADgB,EAEhBF,KAAK,CAACC,SAFU,CAApB;EAKA,OACIN,aAAA,MAAA;IAAKM,SAAS,EAAEA;iBAAqB;IAAOH,GAAG,EAAEA;GAAjD,EACIH,aAAA,MAAA;IAAKM,SAAS,EAAC;GAAf,EACKG,KAAK,IAAIT,aAAA,KAAA;IAAIM,SAAS,EAAC;GAAd,EAA0CG,KAA1C,CADd,EAEKC,IAAI,GAAGV,aAAA,CAACY,UAAD;IAAYC,IAAI,EAAC;IAAsBC,UAAU,EAAC;IAAWJ,IAAI,EAAEA;IAAMJ,SAAS,EAAC;GAAnF,CAAH,GAAuG,IAFhH,CADJ,EAKKK,QALL,CADJ;AASH,CAhBmB;AAmBpBH,IAAI,CAACT,OAAL,GAAeA,OAAf;;;;"}
@@ -1,35 +1,32 @@
1
- import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import { forwardRef, createElement } from 'react';
3
2
  import cn from 'classnames';
4
3
  import { Icon } from '../Icon/Icon.js';
5
4
  import { Root, Indicator } from '@radix-ui/react-checkbox';
6
5
 
7
- var _excluded = ["checked", "highlighted", "indeterminate", "invalid", "label", "onChange"];
8
- var Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
9
- var checked = props.checked,
10
- highlighted = props.highlighted,
11
- indeterminate = props.indeterminate,
12
- invalid = props.invalid,
13
- label = props.label,
14
- onChange = props.onChange,
15
- otherProps = _objectWithoutPropertiesLoose(props, _excluded);
16
-
17
- var className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus', //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]
6
+ const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
7
+ const {
8
+ checked,
9
+ highlighted,
10
+ indeterminate,
11
+ invalid,
12
+ label,
13
+ onChange,
14
+ ...otherProps
15
+ } = props;
16
+ const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus', //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]
18
17
  props.className, {
19
18
  'border-grey-dark text-blue hover:text-blue-light focus:border-blue focus:hover:border-blue-light': !props.disabled && !invalid,
20
19
  'border-grey text-blue-light cursor-not-allowed': props.disabled,
21
20
  'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,
22
21
  'border-red text-red hover:text-red-light hover:border-red-light focus:border-red focus:hover:border-red-light': invalid && !props.disabled
23
22
  });
24
- var handleChange;
23
+ let handleChange;
25
24
 
26
25
  if (onChange) {
27
- handleChange = function handleChange(checked) {
28
- return onChange(checked === 'indeterminate' ? false : checked);
29
- };
26
+ handleChange = checked => onChange(checked === 'indeterminate' ? false : checked);
30
27
  }
31
28
 
32
- var element = createElement(Root, Object.assign({}, otherProps, {
29
+ const element = createElement(Root, Object.assign({}, otherProps, {
33
30
  "data-taco": "checkbox",
34
31
  checked: indeterminate ? 'indeterminate' : checked,
35
32
  className: className,
@@ -43,7 +40,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
43
40
  })));
44
41
 
45
42
  if (label) {
46
- var labelClassName = cn('flex items-center cursor-pointer gap-2', {
43
+ const labelClassName = cn('flex items-center cursor-pointer gap-2', {
47
44
  'cursor-not-allowed text-grey-dark': props.disabled
48
45
  }, props.className);
49
46
  return createElement("label", {